@vygruppen/spor-react 12.0.2 → 12.0.3

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.
Files changed (163) hide show
  1. package/.turbo/turbo-build.log +9 -9
  2. package/.turbo/turbo-typegen.log +1 -1
  3. package/CHANGELOG.md +9 -0
  4. package/dist/index.d.mts +576 -576
  5. package/dist/index.d.ts +576 -576
  6. package/dist/index.js +8641 -8613
  7. package/dist/index.js.map +1 -1
  8. package/dist/index.mjs +8842 -8814
  9. package/dist/index.mjs.map +1 -1
  10. package/eslint.config.mjs +9 -0
  11. package/package.json +8 -5
  12. package/src/accordion/Accordion.tsx +5 -4
  13. package/src/accordion/Expandable.tsx +2 -1
  14. package/src/accordion/types.ts +3 -2
  15. package/src/alert/Alert.tsx +5 -3
  16. package/src/alert/AlertIcon.tsx +2 -1
  17. package/src/alert/ExpandableAlert.tsx +6 -4
  18. package/src/alert/ServiceAlert.tsx +5 -4
  19. package/src/alert/index.ts +1 -1
  20. package/src/breadcrumb/Breadcrumb.tsx +3 -3
  21. package/src/button/Button.tsx +4 -3
  22. package/src/button/ButtonGroup.tsx +3 -2
  23. package/src/button/Clipboard.tsx +5 -3
  24. package/src/button/CloseButton.tsx +1 -0
  25. package/src/button/FloatingActionButton.tsx +1 -0
  26. package/src/button/IconButton.tsx +1 -0
  27. package/src/button/index.tsx +1 -1
  28. package/src/color-mode/color-mode.tsx +1 -1
  29. package/src/datepicker/Calendar.tsx +5 -3
  30. package/src/datepicker/CalendarCell.tsx +2 -1
  31. package/src/datepicker/CalendarGrid.tsx +4 -3
  32. package/src/datepicker/CalendarHeader.tsx +1 -0
  33. package/src/datepicker/CalendarNavigationButton.tsx +1 -0
  34. package/src/datepicker/CalendarTriggerButton.tsx +1 -0
  35. package/src/datepicker/DateField.tsx +5 -4
  36. package/src/datepicker/DatePicker.tsx +4 -2
  37. package/src/datepicker/DateRangePicker.tsx +7 -7
  38. package/src/datepicker/DateTimeSegment.tsx +3 -2
  39. package/src/datepicker/RangeCalendar.tsx +5 -3
  40. package/src/datepicker/StyledField.tsx +2 -1
  41. package/src/datepicker/TimeField.tsx +2 -1
  42. package/src/datepicker/TimePicker.tsx +4 -2
  43. package/src/datepicker/index.tsx +1 -1
  44. package/src/datepicker/utils.ts +1 -0
  45. package/src/dialog/Dialog.tsx +1 -0
  46. package/src/dialog/Drawer.tsx +2 -1
  47. package/src/dialog/index.ts +1 -1
  48. package/src/dialog/types.ts +3 -2
  49. package/src/image/index.tsx +1 -1
  50. package/src/index.tsx +5 -5
  51. package/src/input/AttachedInputs.tsx +3 -1
  52. package/src/input/CardSelect.tsx +3 -2
  53. package/src/input/Checkbox.tsx +2 -1
  54. package/src/input/ChoiceChip.tsx +2 -1
  55. package/src/input/Combobox.tsx +1 -0
  56. package/src/input/CountryCodeSelect.tsx +2 -1
  57. package/src/input/Field.tsx +1 -0
  58. package/src/input/Input.tsx +5 -3
  59. package/src/input/InputGroup.tsx +2 -1
  60. package/src/input/ListBox.tsx +5 -4
  61. package/src/input/NativeSelect.tsx +2 -1
  62. package/src/input/NumericStepper.tsx +1 -0
  63. package/src/input/PasswordInput.tsx +1 -0
  64. package/src/input/PhoneNumberInput.tsx +2 -1
  65. package/src/input/Radio.tsx +3 -2
  66. package/src/input/SearchInput.tsx +1 -0
  67. package/src/input/Select.tsx +5 -4
  68. package/src/input/Switch.tsx +2 -1
  69. package/src/input/Textarea.tsx +3 -2
  70. package/src/input/index.ts +1 -1
  71. package/src/layout/PressableCard.tsx +2 -1
  72. package/src/layout/RadioCard.tsx +1 -0
  73. package/src/layout/Separator.tsx +2 -1
  74. package/src/layout/StaticCard.tsx +2 -1
  75. package/src/layout/index.tsx +16 -16
  76. package/src/linjetag/InfoTag.tsx +2 -1
  77. package/src/linjetag/LineIcon.tsx +1 -0
  78. package/src/linjetag/TravelTag.tsx +2 -1
  79. package/src/linjetag/icons.tsx +1 -0
  80. package/src/link/TextLink.tsx +1 -0
  81. package/src/loader/ClientOnly.tsx +1 -0
  82. package/src/loader/ColorInlineLoader.tsx +1 -0
  83. package/src/loader/ColorSpinner.tsx +1 -0
  84. package/src/loader/ContentLoader.tsx +1 -0
  85. package/src/loader/DarkFullScreenLoader.tsx +1 -0
  86. package/src/loader/DarkInlineLoader.tsx +1 -0
  87. package/src/loader/DarkSpinner.tsx +1 -0
  88. package/src/loader/LightFullScreenLoader.tsx +1 -0
  89. package/src/loader/LightInlineLoader.tsx +1 -0
  90. package/src/loader/LightSpinner.tsx +1 -0
  91. package/src/loader/Lottie.tsx +1 -2
  92. package/src/loader/ProgressBar.tsx +2 -1
  93. package/src/loader/ProgressLoader.tsx +3 -2
  94. package/src/loader/Skeleton.tsx +4 -3
  95. package/src/loader/useHydrated.tsx +1 -1
  96. package/src/logo/VyLogo.tsx +1 -0
  97. package/src/logo/VyLogoPride.tsx +1 -0
  98. package/src/logo/index.tsx +1 -1
  99. package/src/media-controller/JumpButton.tsx +3 -2
  100. package/src/media-controller/PlayPauseButton.tsx +3 -2
  101. package/src/media-controller/SkipButton.tsx +3 -2
  102. package/src/nudge/Nudge.tsx +14 -14
  103. package/src/pagination/Pagination.tsx +4 -3
  104. package/src/pagination/types.ts +2 -1
  105. package/src/popover/index.tsx +4 -3
  106. package/src/progress-indicator/ProgressDot.tsx +2 -1
  107. package/src/progress-indicator/ProgressIndicator.tsx +2 -1
  108. package/src/provider/SporProvider.tsx +4 -5
  109. package/src/stepper/Stepper.tsx +2 -1
  110. package/src/stepper/StepperStep.tsx +1 -0
  111. package/src/tab/Tabs.tsx +2 -1
  112. package/src/table/Table.tsx +2 -1
  113. package/src/table/index.tsx +14 -14
  114. package/src/theme/index.ts +7 -6
  115. package/src/theme/recipes/close-button.ts +1 -0
  116. package/src/theme/recipes/code.ts +1 -0
  117. package/src/theme/recipes/link.ts +1 -0
  118. package/src/theme/recipes/pressable-card.ts +2 -1
  119. package/src/theme/recipes/textarea.ts +1 -0
  120. package/src/theme/semantic-tokens/colors.ts +1 -1
  121. package/src/theme/semantic-tokens/index.ts +1 -1
  122. package/src/theme/slot-recipes/accordion.ts +2 -1
  123. package/src/theme/slot-recipes/alert-expandable.ts +2 -1
  124. package/src/theme/slot-recipes/alert-service.ts +1 -0
  125. package/src/theme/slot-recipes/alert.ts +1 -0
  126. package/src/theme/slot-recipes/breadcrumb.ts +2 -1
  127. package/src/theme/slot-recipes/checkbox.ts +1 -0
  128. package/src/theme/slot-recipes/datepicker.ts +1 -0
  129. package/src/theme/slot-recipes/dialog.ts +1 -0
  130. package/src/theme/slot-recipes/drawer.ts +1 -0
  131. package/src/theme/slot-recipes/field.ts +1 -0
  132. package/src/theme/slot-recipes/floating-action-button.ts +1 -0
  133. package/src/theme/slot-recipes/index.ts +2 -2
  134. package/src/theme/slot-recipes/info-tag.ts +3 -2
  135. package/src/theme/slot-recipes/line-icon.ts +1 -0
  136. package/src/theme/slot-recipes/list.ts +1 -0
  137. package/src/theme/slot-recipes/listbox.ts +1 -0
  138. package/src/theme/slot-recipes/media-controller-button.ts +1 -0
  139. package/src/theme/slot-recipes/native-select.ts +3 -2
  140. package/src/theme/slot-recipes/numeric-stepper.ts +1 -0
  141. package/src/theme/slot-recipes/pagination.ts +1 -0
  142. package/src/theme/slot-recipes/popover.ts +2 -1
  143. package/src/theme/slot-recipes/progress-bar.ts +1 -0
  144. package/src/theme/slot-recipes/radio-card.ts +2 -1
  145. package/src/theme/slot-recipes/radio.ts +1 -0
  146. package/src/theme/slot-recipes/select.ts +1 -0
  147. package/src/theme/slot-recipes/stepper.ts +1 -0
  148. package/src/theme/slot-recipes/switch.ts +2 -1
  149. package/src/theme/slot-recipes/table.ts +1 -0
  150. package/src/theme/slot-recipes/tabs.ts +1 -0
  151. package/src/theme/slot-recipes/toast.ts +1 -0
  152. package/src/theme/slot-recipes/travel-tag.ts +1 -0
  153. package/src/theme/tokens/colors.ts +1 -1
  154. package/src/theme/tokens/index.ts +4 -4
  155. package/src/theme/tokens/sizes.ts +1 -0
  156. package/src/theme/utils/input-utils.ts +1 -1
  157. package/src/toast/toast.tsx +6 -6
  158. package/src/transition/index.ts +1 -1
  159. package/src/typography/Badge.tsx +1 -2
  160. package/src/typography/Code.tsx +2 -1
  161. package/src/typography/Heading.tsx +2 -1
  162. package/src/typography/index.ts +1 -1
  163. package/src/util/externals.tsx +11 -11
@@ -24,7 +24,7 @@ let hydrating = true;
24
24
  * ```
25
25
  */
26
26
  export function useHydrated() {
27
- let [hydrated, setHydrated] = useState(() => !hydrating);
27
+ const [hydrated, setHydrated] = useState(() => !hydrating);
28
28
 
29
29
  useEffect(function hydrate() {
30
30
  hydrating = false;
@@ -1,5 +1,6 @@
1
1
  import { Box, BoxProps, chakra, Icon } from "@chakra-ui/react";
2
2
  import React, { forwardRef, SVGProps, useId } from "react";
3
+
3
4
  import { useColorMode } from "..";
4
5
 
5
6
  export const SvgBox = chakra("svg");
@@ -1,5 +1,6 @@
1
1
  import { BoxProps } from "@chakra-ui/react";
2
2
  import React, { forwardRef, useId } from "react";
3
+
3
4
  import { SvgBox } from "./VyLogo";
4
5
 
5
6
  export type VyLogoPrideProps = BoxProps;
@@ -1,3 +1,3 @@
1
+ export * from "./CargonetLogo";
1
2
  export * from "./VyLogo";
2
3
  export * from "./VyLogoPride";
3
- export * from "./CargonetLogo";
@@ -5,12 +5,13 @@ import {
5
5
  RecipeVariantProps,
6
6
  useSlotRecipe,
7
7
  } from "@chakra-ui/react";
8
- import React, { forwardRef, PropsWithChildren } from "react";
9
- import { createTexts, useTranslation } from "..";
10
8
  import {
11
9
  Backward15MediaControllerFill30Icon,
12
10
  Forward15MediaControllerFill30Icon,
13
11
  } from "@vygruppen/spor-icon-react";
12
+ import React, { forwardRef, PropsWithChildren } from "react";
13
+
14
+ import { createTexts, useTranslation } from "..";
14
15
  import { mediaControllerSlotRecipe } from "../theme/slot-recipes/media-controller-button";
15
16
 
16
17
  export type MediaControllerVariantProps = RecipeVariantProps<
@@ -1,11 +1,12 @@
1
1
  "use client";
2
2
  import { BoxProps, Center, useSlotRecipe } from "@chakra-ui/react";
3
- import React, { forwardRef, PropsWithChildren } from "react";
4
- import { createTexts, MediaControllerVariantProps, useTranslation } from "..";
5
3
  import {
6
4
  PauseMediaControllerFill24Icon,
7
5
  PlayMediaControllerFill24Icon,
8
6
  } from "@vygruppen/spor-icon-react";
7
+ import React, { forwardRef, PropsWithChildren } from "react";
8
+
9
+ import { createTexts, MediaControllerVariantProps, useTranslation } from "..";
9
10
 
10
11
  type PlayPauseButtonProps = BoxProps &
11
12
  PropsWithChildren<MediaControllerVariantProps> & {
@@ -1,11 +1,12 @@
1
1
  "use client";
2
2
  import { BoxProps, Center, useSlotRecipe } from "@chakra-ui/react";
3
- import React, { forwardRef, PropsWithChildren } from "react";
4
- import { createTexts, MediaControllerVariantProps, useTranslation } from "..";
5
3
  import {
6
4
  NextMediaControllerFill30Icon,
7
5
  PreviousMediaControllerFill30Icon,
8
6
  } from "@vygruppen/spor-icon-react";
7
+ import React, { forwardRef, PropsWithChildren } from "react";
8
+
9
+ import { createTexts, MediaControllerVariantProps, useTranslation } from "..";
9
10
 
10
11
  type SkipButtonProps = BoxProps &
11
12
  PropsWithChildren<MediaControllerVariantProps> & {
@@ -1,4 +1,17 @@
1
1
  "use client";
2
+ import {
3
+ PopoverCloseTrigger,
4
+ usePopover,
5
+ usePopoverContext,
6
+ } from "@ark-ui/react";
7
+ import {
8
+ Box,
9
+ BoxProps,
10
+ chakra,
11
+ Popover as ChakraPopover,
12
+ PopoverRootProps,
13
+ } from "@chakra-ui/react";
14
+ import { ArrowRightFill18Icon } from "@vygruppen/spor-icon-react";
2
15
  import React, {
3
16
  forwardRef,
4
17
  PropsWithChildren,
@@ -6,6 +19,7 @@ import React, {
6
19
  useRef,
7
20
  useState,
8
21
  } from "react";
22
+
9
23
  import {
10
24
  Button,
11
25
  createTexts,
@@ -18,20 +32,6 @@ import {
18
32
  useTranslation,
19
33
  } from "..";
20
34
 
21
- import {
22
- Box,
23
- BoxProps,
24
- chakra,
25
- Popover as ChakraPopover,
26
- PopoverRootProps,
27
- } from "@chakra-ui/react";
28
- import { ArrowRightFill18Icon } from "@vygruppen/spor-icon-react";
29
- import {
30
- PopoverCloseTrigger,
31
- usePopover,
32
- usePopoverContext,
33
- } from "@ark-ui/react";
34
-
35
35
  const EXPIRATION_DELAY_MS = 30 * 24 * 60 * 60 * 1000; // 30 days in milliseconds
36
36
 
37
37
  const isNudgeExpired = (
@@ -2,16 +2,17 @@
2
2
 
3
3
  import {
4
4
  Box,
5
- Pagination as ChakraPagination,
6
5
  createContext,
6
+ Pagination as ChakraPagination,
7
7
  usePaginationContext,
8
8
  useSlotRecipe,
9
9
  } from "@chakra-ui/react";
10
- import * as React from "react";
11
10
  import {
12
- DropdownRightOutline18Icon,
13
11
  DropdownLeftOutline18Icon,
12
+ DropdownRightOutline18Icon,
14
13
  } from "@vygruppen/spor-icon-react";
14
+ import * as React from "react";
15
+
15
16
  import { createTexts, List, ListItem, useTranslation } from "..";
16
17
  import { ButtonVariantContext, PaginationRootProps } from "./types";
17
18
 
@@ -1,9 +1,10 @@
1
- import { paginationSlotRecipe } from "@/theme/slot-recipes/pagination";
2
1
  import {
3
2
  Pagination as ChakraPagination,
4
3
  RecipeVariantProps,
5
4
  } from "@chakra-ui/react";
6
5
 
6
+ import { paginationSlotRecipe } from "@/theme/slot-recipes/pagination";
7
+
7
8
  export type PaginationVariantProps = RecipeVariantProps<
8
9
  typeof paginationSlotRecipe
9
10
  >;
@@ -1,14 +1,15 @@
1
1
  "use client";
2
2
 
3
- import { CloseButton } from "@/button";
4
- import { useColorMode } from "@/color-mode";
5
3
  import {
6
- Portal,
7
4
  Popover as ChakraPopover,
5
+ Portal,
8
6
  usePopoverContext,
9
7
  } from "@chakra-ui/react";
10
8
  import React, { forwardRef, useEffect } from "react";
11
9
 
10
+ import { CloseButton } from "@/button";
11
+ import { useColorMode } from "@/color-mode";
12
+
12
13
  export const Popover = ChakraPopover.Root;
13
14
 
14
15
  export const PopoverTrigger = forwardRef<
@@ -1,6 +1,7 @@
1
1
  "use client";
2
- import React, { PropsWithChildren } from "react";
3
2
  import { chakra, useSlotRecipe } from "@chakra-ui/react";
3
+ import React, { PropsWithChildren } from "react";
4
+
4
5
  import { ProgressIndicatorVariantProps } from "./ProgressIndicator";
5
6
 
6
7
  type ProgressDot = PropsWithChildren<ProgressIndicatorVariantProps> & {
@@ -1,9 +1,10 @@
1
1
  "use client";
2
2
  import { BoxProps, RecipeVariantProps, useSlotRecipe } from "@chakra-ui/react";
3
3
  import React, { forwardRef, PropsWithChildren } from "react";
4
+
4
5
  import { Box, createTexts, useTranslation } from "..";
5
- import { ProgressDot } from "./ProgressDot";
6
6
  import { progressIndicatorRecipe } from "../theme/slot-recipes/progress-indicator";
7
+ import { ProgressDot } from "./ProgressDot";
7
8
 
8
9
  export type ProgressIndicatorVariantProps = RecipeVariantProps<
9
10
  typeof progressIndicatorRecipe
@@ -1,13 +1,12 @@
1
1
  "use client";
2
+ import { ChakraProvider, ChakraProviderProps } from "@chakra-ui/react";
2
3
  import { Global } from "@emotion/react";
3
4
  import React from "react";
4
- import { Language, LanguageProvider, system, themes } from "..";
5
5
 
6
- import { Toaster } from "../toast/toast";
7
-
8
- import { Brand, fontFaces } from "../theme/brand";
9
- import { ChakraProvider, ChakraProviderProps } from "@chakra-ui/react";
6
+ import { Language, LanguageProvider, system, themes } from "..";
10
7
  import { ColorModeProvider } from "../color-mode";
8
+ import { Brand, fontFaces } from "../theme/brand";
9
+ import { Toaster } from "../toast/toast";
11
10
 
12
11
  type SporProviderProps = Omit<ChakraProviderProps, "value"> & {
13
12
  language?: Language;
@@ -2,9 +2,10 @@
2
2
  import { Flex, RecipeVariantProps, useSlotRecipe } from "@chakra-ui/react";
3
3
  import { ArrowLeftFill24Icon } from "@vygruppen/spor-icon-react";
4
4
  import React, { forwardRef, PropsWithChildren } from "react";
5
- import { StepperStep } from ".";
5
+
6
6
  import { Box, createTexts, IconButton, Text, useTranslation } from "..";
7
7
  import { stepperSlotRecipe } from "../theme/slot-recipes/stepper";
8
+ import { StepperStep } from ".";
8
9
  import { StepperProvider } from "./StepperContext";
9
10
 
10
11
  export type StepperVariantProps = RecipeVariantProps<typeof stepperSlotRecipe>;
@@ -2,6 +2,7 @@
2
2
  import { useSlotRecipe } from "@chakra-ui/react";
3
3
  import { DropdownRightFill18Icon } from "@vygruppen/spor-icon-react";
4
4
  import React, { PropsWithChildren } from "react";
5
+
5
6
  import { Box, Button, Text } from "..";
6
7
  import { StepperVariantProps } from "./Stepper";
7
8
  import { useStepper } from "./StepperContext";
package/src/tab/Tabs.tsx CHANGED
@@ -1,11 +1,12 @@
1
1
  "use client";
2
2
  import {
3
+ RecipeVariantProps,
3
4
  Tabs as ChakraTabs,
4
5
  TabsRootProps as ChakraTabsRootProps,
5
- RecipeVariantProps,
6
6
  } from "@chakra-ui/react";
7
7
  import * as React from "react";
8
8
  import { forwardRef, PropsWithChildren } from "react";
9
+
9
10
  import { tabsSlotRecipe } from "../theme/slot-recipes/tabs";
10
11
 
11
12
  type TabsVariantProps = RecipeVariantProps<typeof tabsSlotRecipe>;
@@ -1,12 +1,13 @@
1
1
  "use client";
2
2
  import {
3
3
  Box,
4
+ RecipeVariantProps,
4
5
  Table as ChakraTable,
5
6
  TableRootProps as ChakraTableProps,
6
- RecipeVariantProps,
7
7
  useSlotRecipe,
8
8
  } from "@chakra-ui/react";
9
9
  import React, { forwardRef, PropsWithChildren } from "react";
10
+
10
11
  import { tableSlotRecipe } from "../theme/slot-recipes/table";
11
12
 
12
13
  type TableVariantProps = RecipeVariantProps<typeof tableSlotRecipe>;
@@ -1,23 +1,23 @@
1
- export {
2
- TableCaption,
3
- TableHeader,
4
- TableRow,
5
- TableColumn,
6
- TableColumnHeader,
7
- TableRoot,
8
- TableBody,
9
- TableCell,
10
- TableFooter,
11
- } from "@chakra-ui/react";
1
+ export * from "./Table";
12
2
  export type {
13
3
  TableBodyProps,
14
4
  TableCaptionProps,
15
5
  TableCellProps,
16
6
  TableColumnHeaderProps,
7
+ TableColumnProps,
17
8
  TableFooterProps,
18
- TableRowProps,
19
9
  TableHeaderProps,
20
- TableColumnProps,
21
10
  TableRootProps,
11
+ TableRowProps,
12
+ } from "@chakra-ui/react";
13
+ export {
14
+ TableBody,
15
+ TableCaption,
16
+ TableCell,
17
+ TableColumn,
18
+ TableColumnHeader,
19
+ TableFooter,
20
+ TableHeader,
21
+ TableRoot,
22
+ TableRow,
22
23
  } from "@chakra-ui/react";
23
- export * from "./Table";
@@ -3,17 +3,18 @@ import {
3
3
  defaultBaseConfig,
4
4
  defineConfig,
5
5
  } from "@chakra-ui/react";
6
- import { animationStyles } from "./tokens/animation-styles";
7
- import { breakpoints } from "./tokens/breakpoints";
8
- import { globalCss } from "./tokens/global-css";
9
- import { keyframes } from "./tokens/keyframes";
6
+
7
+ import { Brand } from "./brand";
10
8
  import { recipes } from "./recipes";
11
9
  import { semanticTokens } from "./semantic-tokens";
12
10
  import { slotRecipes } from "./slot-recipes";
13
- import { textStyles } from "./tokens/text-styles";
14
11
  import { tokens } from "./tokens";
15
- import { Brand } from "./brand";
12
+ import { animationStyles } from "./tokens/animation-styles";
13
+ import { breakpoints } from "./tokens/breakpoints";
16
14
  import { config } from "./tokens/config";
15
+ import { globalCss } from "./tokens/global-css";
16
+ import { keyframes } from "./tokens/keyframes";
17
+ import { textStyles } from "./tokens/text-styles";
17
18
 
18
19
  const generateTheme = (brand: Brand) => {
19
20
  return defineConfig({
@@ -1,4 +1,5 @@
1
1
  import { defineRecipe } from "@chakra-ui/react";
2
+
2
3
  import { ghostBackground } from "../utils/ghost-utils";
3
4
 
4
5
  export const closeButtonRecipe = defineRecipe({
@@ -1,4 +1,5 @@
1
1
  import { defineRecipe } from "@chakra-ui/react";
2
+
2
3
  import { badgeRecipie } from "./badge";
3
4
 
4
5
  export const codeRecipie = defineRecipe({
@@ -1,4 +1,5 @@
1
1
  import { defineRecipe } from "@chakra-ui/react";
2
+
2
3
  import { coreText } from "../utils/core-utils";
3
4
 
4
5
  export const linkRecipe = defineRecipe({
@@ -1,6 +1,7 @@
1
- import { defineRecipe } from "../../util";
2
1
  import tokens from "@vygruppen/spor-design-tokens";
3
2
 
3
+ import { defineRecipe } from "../../util";
4
+
4
5
  export const pressableCardRecipe = defineRecipe({
5
6
  base: {
6
7
  appearance: "none",
@@ -1,4 +1,5 @@
1
1
  import { defineRecipe } from "@chakra-ui/react";
2
+
2
3
  import { inputRecipe } from "./input";
3
4
 
4
5
  export const textareaRecipe = defineRecipe({
@@ -1,7 +1,7 @@
1
1
  import { defineSemanticTokens } from "@chakra-ui/react";
2
+ import cargonetJson from "@vygruppen/spor-design-tokens/tokens/color/cargonet.json";
2
3
  import vyDigitalJson from "@vygruppen/spor-design-tokens/tokens/color/vy-digital.json";
3
4
  import VyUtviklingJson from "@vygruppen/spor-design-tokens/tokens/color/vy-utvikling.json";
4
- import cargonetJson from "@vygruppen/spor-design-tokens/tokens/color/cargonet.json";
5
5
 
6
6
  export enum Brand {
7
7
  VyDigital = "VyDigital",
@@ -1,5 +1,5 @@
1
1
  import { Brand } from "../brand";
2
- import { cargonetColors, vyUtviklingColors, vyDigitalColors } from "./colors";
2
+ import { cargonetColors, vyDigitalColors, vyUtviklingColors } from "./colors";
3
3
  import { radii } from "./radii";
4
4
  import { shadows } from "./shadows";
5
5
 
@@ -1,7 +1,8 @@
1
+ import { defineSlotRecipe } from "@chakra-ui/react";
2
+
1
3
  import { coreBorder, coreText } from "../utils/core-utils";
2
4
  import { floatingBackground, floatingBorder } from "../utils/floating-utils";
3
5
  import { ghostBackground } from "../utils/ghost-utils";
4
- import { defineSlotRecipe } from "@chakra-ui/react";
5
6
  import { accordionAnatomy } from "./anatomy";
6
7
 
7
8
  export const accordionSlotRecipe = defineSlotRecipe({
@@ -1,7 +1,8 @@
1
1
  import { defineSlotRecipe } from "@chakra-ui/react";
2
+ import tokens from "@vygruppen/spor-design-tokens";
3
+
2
4
  import { alertSlotRecipe } from "./alert";
3
5
  import { alertExpandableAnatomy } from "./anatomy";
4
- import tokens from "@vygruppen/spor-design-tokens";
5
6
 
6
7
  export const alertExpandableSlotRecipe = defineSlotRecipe({
7
8
  className: "spor-alert-expandable",
@@ -1,4 +1,5 @@
1
1
  import { defineSlotRecipe } from "@chakra-ui/react";
2
+
2
3
  import { alertServiceAnatomy } from "./anatomy";
3
4
 
4
5
  export const alertServiceSlotRecipe = defineSlotRecipe({
@@ -1,4 +1,5 @@
1
1
  import { defineSlotRecipe } from "@chakra-ui/react";
2
+
2
3
  import { alertAnatomy } from "./anatomy";
3
4
 
4
5
  const createVariant = (variant: string) => ({
@@ -1,7 +1,8 @@
1
1
  import { defineSlotRecipe } from "@chakra-ui/react";
2
- import { breadcrumbAnatomy } from "./anatomy";
3
2
  import tokens from "@vygruppen/spor-design-tokens";
4
3
 
4
+ import { breadcrumbAnatomy } from "./anatomy";
5
+
5
6
  export const breadcrumbSlotRecipe = defineSlotRecipe({
6
7
  slots: breadcrumbAnatomy.keys(),
7
8
  base: {
@@ -1,5 +1,6 @@
1
1
  import { defineSlotRecipe } from "@chakra-ui/react";
2
2
  import tokens from "@vygruppen/spor-design-tokens";
3
+
3
4
  import { brandBackground, brandText } from "../utils/brand-utils";
4
5
  import { coreBackground, coreText } from "../utils/core-utils";
5
6
  import { checkboxAnatomy } from "./anatomy";
@@ -1,4 +1,5 @@
1
1
  import { defineSlotRecipe } from "@chakra-ui/react";
2
+
2
3
  import { datepickerAnatomy } from "./anatomy";
3
4
 
4
5
  export const datePickerSlotRecipe = defineSlotRecipe({
@@ -1,4 +1,5 @@
1
1
  import { defineSlotRecipe } from "@chakra-ui/react";
2
+
2
3
  import { dialogAnatomy } from "./anatomy";
3
4
 
4
5
  export const dialogSlotRecipe = defineSlotRecipe({
@@ -1,4 +1,5 @@
1
1
  import { defineSlotRecipe } from "@chakra-ui/react";
2
+
2
3
  import { drawerAnatomy } from "./anatomy";
3
4
 
4
5
  export const drawerSlotRecipe = defineSlotRecipe({
@@ -1,4 +1,5 @@
1
1
  import { defineSlotRecipe } from "@chakra-ui/react";
2
+
2
3
  import { fieldAnatomy } from "./anatomy";
3
4
 
4
5
  export const fieldSlotRecipe = defineSlotRecipe({
@@ -1,5 +1,6 @@
1
1
  import { defineSlotRecipe } from "@chakra-ui/react";
2
2
  import tokens from "@vygruppen/spor-design-tokens";
3
+
3
4
  import { floatingActionButtonAnatomy } from "./anatomy";
4
5
 
5
6
  export const floatingActionButtonSlotRecipe = defineSlotRecipe({
@@ -16,10 +16,10 @@ import { listBoxSlotRecipe } from "./listbox";
16
16
  import { mediaControllerSlotRecipe } from "./media-controller-button";
17
17
  import { nativeSelectSlotRecipe } from "./native-select";
18
18
  import { numericStepperRecipe } from "./numeric-stepper";
19
+ import { paginationSlotRecipe } from "./pagination";
19
20
  import { popoverSlotRecipe } from "./popover";
20
21
  import { progressBarRecipe } from "./progress-bar";
21
22
  import { progressIndicatorRecipe } from "./progress-indicator";
22
- import { paginationSlotRecipe } from "./pagination";
23
23
  import { radioGroupSlotRecipe } from "./radio";
24
24
  import { radioCardSlotRecipe } from "./radio-card";
25
25
  import { selectSlotRecipe } from "./select";
@@ -27,8 +27,8 @@ import { stepperSlotRecipe } from "./stepper";
27
27
  import { switchSlotRecipe } from "./switch";
28
28
  import { tableSlotRecipe } from "./table";
29
29
  import { tabsSlotRecipe } from "./tabs";
30
- import { travelTagSlotRecipe } from "./travel-tag";
31
30
  import { toastSlotRecipe } from "./toast";
31
+ import { travelTagSlotRecipe } from "./travel-tag";
32
32
 
33
33
  export const slotRecipes = {
34
34
  accordion: accordionSlotRecipe,
@@ -1,7 +1,8 @@
1
1
  import { defineSlotRecipe } from "@chakra-ui/react";
2
- import { travelTagSlotRecipe } from "./travel-tag";
3
- import { infoTagAnatomy } from "./anatomy";
2
+
4
3
  import { coreBorder } from "../utils/core-utils";
4
+ import { infoTagAnatomy } from "./anatomy";
5
+ import { travelTagSlotRecipe } from "./travel-tag";
5
6
 
6
7
  export const infoTagSlotRecipe = defineSlotRecipe({
7
8
  slots: infoTagAnatomy.keys(),
@@ -1,4 +1,5 @@
1
1
  import { defineSlotRecipe } from "@chakra-ui/react";
2
+
2
3
  import { linjetagAnatomy } from "./anatomy";
3
4
 
4
5
  export const lineIconSlotRecipe = defineSlotRecipe({
@@ -1,4 +1,5 @@
1
1
  import { defineSlotRecipe } from "@chakra-ui/react";
2
+
2
3
  import { listAnatomy } from "./anatomy";
3
4
 
4
5
  export const listSlotRecipe = defineSlotRecipe({
@@ -1,4 +1,5 @@
1
1
  import { defineSlotRecipe } from "@chakra-ui/react";
2
+
2
3
  import { listBoxAnatomy } from "./anatomy";
3
4
 
4
5
  export const listBoxSlotRecipe = defineSlotRecipe({
@@ -1,4 +1,5 @@
1
1
  import { defineSlotRecipe } from "@chakra-ui/react";
2
+
2
3
  import { mediaControllerAnatomy } from "./anatomy";
3
4
 
4
5
  export const mediaControllerSlotRecipe = defineSlotRecipe({
@@ -1,7 +1,8 @@
1
- import { coreText } from "../utils/core-utils";
2
1
  import { defineSlotRecipe } from "@chakra-ui/react";
3
- import { NativeSelectAnatomy } from "./anatomy";
2
+
4
3
  import { inputRecipe } from "../recipes/input";
4
+ import { coreText } from "../utils/core-utils";
5
+ import { NativeSelectAnatomy } from "./anatomy";
5
6
 
6
7
  export const nativeSelectSlotRecipe = defineSlotRecipe({
7
8
  slots: NativeSelectAnatomy.keys(),
@@ -1,4 +1,5 @@
1
1
  import { defineSlotRecipe } from "@chakra-ui/react";
2
+
2
3
  import { numericStepperAnatomy } from "./anatomy";
3
4
 
4
5
  export const numericStepperRecipe = defineSlotRecipe({
@@ -1,4 +1,5 @@
1
1
  import { defineSlotRecipe } from "@chakra-ui/react";
2
+
2
3
  import { coreBackground, coreText } from "../utils/core-utils";
3
4
  import { ghostBackground } from "../utils/ghost-utils";
4
5
  import { paginationAnatomy } from "./anatomy";
@@ -1,5 +1,6 @@
1
- import { surface } from "./../utils/surface-utils";
2
1
  import { defineSlotRecipe } from "@chakra-ui/react";
2
+
3
+ import { surface } from "./../utils/surface-utils";
3
4
  import { popoverAnatomy } from "./anatomy";
4
5
 
5
6
  export const popoverSlotRecipe = defineSlotRecipe({
@@ -1,4 +1,5 @@
1
1
  import { defineSlotRecipe } from "@chakra-ui/react";
2
+
2
3
  import { progressBarAnotomy } from "./anatomy";
3
4
 
4
5
  export const progressBarRecipe = defineSlotRecipe({
@@ -1,9 +1,10 @@
1
1
  import { defineSlotRecipe } from "@chakra-ui/react";
2
+ import tokens from "@vygruppen/spor-design-tokens";
3
+
2
4
  import { coreBackground, coreBorder, coreText } from "../utils/core-utils";
3
5
  import { floatingBackground, floatingBorder } from "../utils/floating-utils";
4
6
  import { outlineBorder } from "../utils/outline-utils";
5
7
  import { radioCardAnatomy } from "./anatomy";
6
- import tokens from "@vygruppen/spor-design-tokens";
7
8
 
8
9
  export const radioCardSlotRecipe = defineSlotRecipe({
9
10
  className: "spor-radio-card",
@@ -1,4 +1,5 @@
1
1
  import { defineSlotRecipe } from "@chakra-ui/react";
2
+
2
3
  import { radioAnatomy } from "./anatomy";
3
4
 
4
5
  export const radioGroupSlotRecipe = defineSlotRecipe({
@@ -1,4 +1,5 @@
1
1
  import { defineSlotRecipe } from "@chakra-ui/react";
2
+
2
3
  import { selectAnatomy } from "./anatomy";
3
4
 
4
5
  export const selectSlotRecipe = defineSlotRecipe({
@@ -1,4 +1,5 @@
1
1
  import { defineSlotRecipe } from "@chakra-ui/react";
2
+
2
3
  import { accentBackground, accentText } from "../utils/accent-utils";
3
4
  import { brandBackground } from "../utils/brand-utils";
4
5
  import { coreText } from "../utils/core-utils";
@@ -1,7 +1,8 @@
1
1
  import { defineSlotRecipe } from "@chakra-ui/react";
2
- import { switchAnatomy } from "./anatomy";
3
2
  import tokens from "@vygruppen/spor-design-tokens";
4
3
 
4
+ import { switchAnatomy } from "./anatomy";
5
+
5
6
  export const switchSlotRecipe = defineSlotRecipe({
6
7
  slots: switchAnatomy.keys(),
7
8
  className: "spor-switch",