@vygruppen/spor-react 12.0.2 → 12.0.4

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 +11 -10
  2. package/.turbo/turbo-typegen.log +1 -1
  3. package/CHANGELOG.md +16 -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 +10 -7
  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
package/src/index.tsx CHANGED
@@ -1,12 +1,10 @@
1
- export * as tokens from "@vygruppen/spor-design-tokens";
2
1
  export * from "./accordion";
3
2
  export * from "./alert";
4
3
  export * from "./breadcrumb";
5
4
  export * from "./button";
6
5
  export * from "./color-mode";
7
6
  export * from "./datepicker";
8
- export * from "./theme/brand";
9
- export * from "./theme";
7
+ export * from "./dialog";
10
8
  export * from "./i18n";
11
9
  export * from "./image";
12
10
  export * from "./input";
@@ -17,16 +15,18 @@ export * from "./list";
17
15
  export * from "./loader";
18
16
  export * from "./logo";
19
17
  export * from "./media-controller";
20
- export * from "./dialog";
21
18
  export * from "./nudge";
22
19
  export * from "./pagination";
20
+ export * from "./popover";
23
21
  export * from "./progress-indicator";
24
22
  export * from "./provider";
25
23
  export * from "./stepper";
26
24
  export * from "./tab";
27
25
  export * from "./table";
26
+ export * from "./theme";
27
+ export * from "./theme/brand";
28
28
  export * from "./toast";
29
29
  export * from "./transition";
30
30
  export * from "./typography";
31
31
  export * from "./util";
32
- export * from "./popover";
32
+ export * as tokens from "@vygruppen/spor-design-tokens";
@@ -1,8 +1,10 @@
1
1
  "use client";
2
2
 
3
- import React, { forwardRef, PropsWithChildren } from "react";
4
3
  import { chakra, Group, RecipeVariantProps, useRecipe } from "@chakra-ui/react";
4
+ import React, { forwardRef, PropsWithChildren } from "react";
5
+
5
6
  import { attachedInputsRecipe } from "@/theme/recipes/attached-inputs";
7
+
6
8
  import { InputGroupProps } from "./InputGroup";
7
9
 
8
10
  /**
@@ -1,15 +1,16 @@
1
1
  "use client";
2
2
  import {
3
+ Popover as ChakraPopover,
3
4
  PopoverRootProps,
4
- usePopoverContext,
5
5
  Portal,
6
- Popover as ChakraPopover,
6
+ usePopoverContext,
7
7
  } from "@chakra-ui/react";
8
8
  import {
9
9
  DropdownDownFill18Icon,
10
10
  DropdownDownFill24Icon,
11
11
  } from "@vygruppen/spor-icon-react";
12
12
  import React, { forwardRef, ReactNode } from "react";
13
+
13
14
  import { Button, ButtonProps, StaticCard, StaticCardProps } from "..";
14
15
 
15
16
  export const CardSelect = ({ size = "md", ...props }: PopoverRootProps) => {
@@ -1,4 +1,3 @@
1
- import { checkboxSlotRecipe } from "@/theme/slot-recipes/checkbox";
2
1
  import {
3
2
  Checkbox as ChakraCheckbox,
4
3
  RecipeVariantProps,
@@ -6,6 +5,8 @@ import {
6
5
  import * as React from "react";
7
6
  import { PropsWithChildren } from "react";
8
7
 
8
+ import { checkboxSlotRecipe } from "@/theme/slot-recipes/checkbox";
9
+
9
10
  type CheckboxVariantProps = RecipeVariantProps<typeof checkboxSlotRecipe>;
10
11
 
11
12
  type CheckboxProps = ChakraCheckbox.RootProps &
@@ -1,5 +1,4 @@
1
1
  "use client";
2
- import { choiceChipRecipe } from "@/theme/recipes/choice-chip";
3
2
  import {
4
3
  chakra,
5
4
  RecipeVariantProps,
@@ -9,6 +8,8 @@ import {
9
8
  import { CloseOutline24Icon } from "@vygruppen/spor-icon-react";
10
9
  import React, { ChangeEvent, PropsWithChildren, useId } from "react";
11
10
 
11
+ import { choiceChipRecipe } from "@/theme/recipes/choice-chip";
12
+
12
13
  type ChoiceChipVariantProps = RecipeVariantProps<typeof choiceChipRecipe>;
13
14
 
14
15
  export type ChoiceChipProps = PropsWithChildren<ChoiceChipVariantProps> & {
@@ -9,6 +9,7 @@ import React, {
9
9
  } from "react";
10
10
  import { AriaComboBoxProps, useComboBox, useFilter } from "react-aria";
11
11
  import { useComboBoxState } from "react-stately";
12
+
12
13
  import { ColorSpinner, Input, InputProps, ListBox } from "..";
13
14
  import { Popover } from "./Popover";
14
15
 
@@ -3,11 +3,12 @@
3
3
  import { createListCollection } from "@chakra-ui/react";
4
4
  import { getSupportedCallingCodes } from "awesome-phonenumber";
5
5
  import React, { forwardRef } from "react";
6
+
6
7
  import {
8
+ createTexts,
7
9
  Select,
8
10
  SelectItem,
9
11
  SelectProps,
10
- createTexts,
11
12
  useTranslation,
12
13
  } from "..";
13
14
 
@@ -6,6 +6,7 @@ import {
6
6
  useSlotRecipe,
7
7
  } from "@chakra-ui/react";
8
8
  import * as React from "react";
9
+
9
10
  import { fieldSlotRecipe } from "../theme/slot-recipes/field";
10
11
 
11
12
  type FieldVariantProps = RecipeVariantProps<typeof fieldSlotRecipe>;
@@ -1,14 +1,16 @@
1
1
  "use client";
2
2
 
3
- import { inputRecipe } from "@/theme/recipes/input";
4
3
  import {
5
4
  chakra,
5
+ Input as ChakraInput,
6
6
  InputProps as ChakraInputProps,
7
- useRecipe,
8
7
  type RecipeVariantProps,
9
- Input as ChakraInput,
8
+ useRecipe,
10
9
  } from "@chakra-ui/react";
11
10
  import React, { forwardRef, PropsWithChildren } from "react";
11
+
12
+ import { inputRecipe } from "@/theme/recipes/input";
13
+
12
14
  import { Field, FieldProps } from "./Field";
13
15
  import { InputGroup } from "./InputGroup";
14
16
 
@@ -1,8 +1,9 @@
1
1
  "use client";
2
2
 
3
- import type { InputElementProps, GroupProps } from "@chakra-ui/react";
3
+ import type { GroupProps, InputElementProps } from "@chakra-ui/react";
4
4
  import { Group, InputElement } from "@chakra-ui/react";
5
5
  import * as React from "react";
6
+
6
7
  import { FieldLabel } from "./Field";
7
8
 
8
9
  export type InputGroupProps = GroupProps & {
@@ -1,11 +1,11 @@
1
1
  "use client";
2
2
  import {
3
3
  Box,
4
+ type BoxProps,
4
5
  ListItem,
5
6
  ListRootProps,
6
7
  RecipeVariantProps,
7
8
  useSlotRecipe,
8
- type BoxProps,
9
9
  } from "@chakra-ui/react";
10
10
  import type { Node } from "@react-types/shared";
11
11
  import React, {
@@ -22,6 +22,7 @@ import {
22
22
  useOption,
23
23
  } from "react-aria";
24
24
  import { type ListState, type SelectState } from "react-stately";
25
+
25
26
  import { List } from "..";
26
27
  import { useColorModeValue } from "../color-mode";
27
28
  import { listBoxSlotRecipe } from "../theme/slot-recipes/listbox";
@@ -117,7 +118,7 @@ export const ListBox = forwardRef<HTMLDivElement, ListBoxProps<object>>(
117
118
  * Useful if you want to render a custom Item - especially if it has a description.
118
119
  */
119
120
  export function ItemLabel({ children }: { children: React.ReactNode }) {
120
- let { labelProps } = useOptionContext();
121
+ const { labelProps } = useOptionContext();
121
122
  return <Box {...labelProps}>{children}</Box>;
122
123
  }
123
124
 
@@ -127,7 +128,7 @@ export function ItemLabel({ children }: { children: React.ReactNode }) {
127
128
  * Useful if you want to render a custom Item with more than just a label.
128
129
  */
129
130
  export function ItemDescription({ children }: { children: React.ReactNode }) {
130
- let { descriptionProps } = useOptionContext();
131
+ const { descriptionProps } = useOptionContext();
131
132
  const recipe = useSlotRecipe({ key: "listbox" });
132
133
  const styles = recipe({});
133
134
  return (
@@ -156,7 +157,7 @@ function Option({ item, state }: OptionProps) {
156
157
  const recipe = useSlotRecipe({ key: "listBox" });
157
158
  const styles = recipe({});
158
159
 
159
- let dataFields: Record<string, boolean> = {};
160
+ const dataFields: Record<string, boolean> = {};
160
161
  if (isSelected) {
161
162
  dataFields["data-selected"] = true;
162
163
  }
@@ -1,12 +1,13 @@
1
1
  "use client";
2
2
  import {
3
- RecipeVariantProps,
4
3
  NativeSelect as ChakraNativeSelect,
4
+ RecipeVariantProps,
5
5
  useSlotRecipe,
6
6
  NativeSelectFieldProps as ChakraNativeSelectFieldProps,
7
7
  } from "@chakra-ui/react";
8
8
  import { DropdownDownFill18Icon } from "@vygruppen/spor-icon-react";
9
9
  import * as React from "react";
10
+
10
11
  import { nativeSelectSlotRecipe } from "../theme/slot-recipes/native-select";
11
12
  import { Field } from "./Field";
12
13
 
@@ -6,6 +6,7 @@ import {
6
6
  useSlotRecipe,
7
7
  } from "@chakra-ui/react";
8
8
  import React, { PropsWithChildren, useRef } from "react";
9
+
9
10
  import { BoxProps, createTexts, IconButton, useTranslation } from "..";
10
11
  import { numericStepperRecipe } from "../theme/slot-recipes/numeric-stepper";
11
12
  import { Field } from "./Field";
@@ -2,6 +2,7 @@
2
2
 
3
3
  import { Button, useControllableState } from "@chakra-ui/react";
4
4
  import React, { forwardRef } from "react";
5
+
5
6
  import { ButtonProps, Input, InputProps } from "..";
6
7
  import { createTexts, useTranslation } from "..";
7
8
  import { InputGroupProps } from "./InputGroup";
@@ -1,7 +1,8 @@
1
1
  "use client";
2
2
  import { useControllableState } from "@chakra-ui/react";
3
3
  import React, { forwardRef } from "react";
4
- import { Input, InputProps, createTexts, useTranslation } from "..";
4
+
5
+ import { createTexts, Input, InputProps, useTranslation } from "..";
5
6
  import { AttachedInputs } from "./AttachedInputs";
6
7
  import { CountryCodeSelect } from "./CountryCodeSelect";
7
8
 
@@ -1,8 +1,9 @@
1
1
  "use client";
2
- import React, { forwardRef, PropsWithChildren } from "react";
3
2
  import { RecipeVariantProps } from "@chakra-ui/react";
4
- import { radioGroupSlotRecipe } from "../theme/slot-recipes/radio";
5
3
  import { RadioGroup as ChakraRadioGroup } from "@chakra-ui/react";
4
+ import React, { forwardRef, PropsWithChildren } from "react";
5
+
6
+ import { radioGroupSlotRecipe } from "../theme/slot-recipes/radio";
6
7
 
7
8
  type RadioVariants = RecipeVariantProps<typeof radioGroupSlotRecipe>;
8
9
 
@@ -5,6 +5,7 @@ import {
5
5
  SearchOutline24Icon,
6
6
  } from "@vygruppen/spor-icon-react";
7
7
  import React, { forwardRef } from "react";
8
+
8
9
  import { createTexts, Input, InputProps, useTranslation } from "..";
9
10
  import { IconButton } from "../button/IconButton";
10
11
 
@@ -1,16 +1,14 @@
1
1
  "use client";
2
2
 
3
- import { CloseButton } from "@/button";
4
- import { selectSlotRecipe } from "@/theme/slot-recipes/select";
5
3
  import type {
6
- SelectRootProps as ChakraSelectRootProps,
7
4
  CollectionItem,
8
5
  RecipeVariantProps,
6
+ SelectRootProps as ChakraSelectRootProps,
9
7
  } from "@chakra-ui/react";
10
8
  import {
11
9
  Box,
12
- Select as ChakraSelect,
13
10
  Portal,
11
+ Select as ChakraSelect,
14
12
  useSlotRecipe,
15
13
  } from "@chakra-ui/react";
16
14
  import {
@@ -20,6 +18,9 @@ import {
20
18
  import * as React from "react";
21
19
  import { PropsWithChildren } from "react";
22
20
 
21
+ import { CloseButton } from "@/button";
22
+ import { selectSlotRecipe } from "@/theme/slot-recipes/select";
23
+
23
24
  type SelectVariantProps = RecipeVariantProps<typeof selectSlotRecipe>;
24
25
 
25
26
  export type SelectProps = ChakraSelectRootProps &
@@ -1,11 +1,12 @@
1
1
  "use client";
2
2
  import {
3
+ ConditionalValue,
3
4
  RecipeVariantProps,
4
5
  Switch as ChakraSwitch,
5
- ConditionalValue,
6
6
  useSlotRecipe,
7
7
  } from "@chakra-ui/react";
8
8
  import React, { forwardRef, PropsWithChildren } from "react";
9
+
9
10
  import { switchSlotRecipe } from "../theme/slot-recipes/switch";
10
11
  import { Field } from "./Field";
11
12
 
@@ -1,11 +1,11 @@
1
1
  "use client";
2
2
 
3
3
  import {
4
+ FieldLabel,
4
5
  RecipeVariantProps,
5
- useRecipe,
6
6
  Textarea as ChakraTextarea,
7
7
  TextareaProps as ChakraTextareaProps,
8
- FieldLabel,
8
+ useRecipe,
9
9
  } from "@chakra-ui/react";
10
10
  import React, {
11
11
  forwardRef,
@@ -15,6 +15,7 @@ import React, {
15
15
  useRef,
16
16
  useState,
17
17
  } from "react";
18
+
18
19
  import { textareaRecipe } from "../theme/recipes/textarea";
19
20
  import { Field, FieldProps } from "./Field";
20
21
 
@@ -13,6 +13,6 @@ export * from "./PasswordInput";
13
13
  export * from "./PhoneNumberInput";
14
14
  export * from "./Radio";
15
15
  export * from "./SearchInput";
16
+ export * from "./Select";
16
17
  export * from "./Switch";
17
18
  export * from "./Textarea";
18
- export * from "./Select";
@@ -1,6 +1,7 @@
1
1
  "use client";
2
- import React, { forwardRef } from "react";
3
2
  import { ButtonProps, chakra, RecipeVariantProps } from "@chakra-ui/react";
3
+ import React, { forwardRef } from "react";
4
+
4
5
  import { pressableCardRecipe } from "../theme/recipes/pressable-card";
5
6
 
6
7
  /**
@@ -5,6 +5,7 @@ import {
5
5
  useSlotRecipe,
6
6
  } from "@chakra-ui/react";
7
7
  import React, { forwardRef, useId } from "react";
8
+
8
9
  import { radioCardSlotRecipe } from "../theme/slot-recipes/radio-card";
9
10
 
10
11
  /**
@@ -2,11 +2,12 @@
2
2
 
3
3
  import {
4
4
  RecipeVariantProps,
5
- useRecipe,
6
5
  Separator as ChakraSeparator,
7
6
  SeparatorProps as ChakraSeparatorProps,
7
+ useRecipe,
8
8
  } from "@chakra-ui/react";
9
9
  import React, { forwardRef, PropsWithChildren } from "react";
10
+
10
11
  import { separatorRecipe } from "../theme/recipes/separator";
11
12
 
12
13
  type SeparatorVariantProps = RecipeVariantProps<typeof separatorRecipe>;
@@ -1,6 +1,7 @@
1
1
  "use client";
2
- import React, { forwardRef } from "react";
3
2
  import { Box, BoxProps, chakra, RecipeVariantProps } from "@chakra-ui/react";
3
+ import React, { forwardRef } from "react";
4
+
4
5
  import { staticCardRecipe } from "../theme/recipes/static-card";
5
6
 
6
7
  /**
@@ -1,3 +1,17 @@
1
+ export * from "./PressableCard";
2
+ export * from "./RadioCard";
3
+ export * from "./Separator";
4
+ export * from "./StaticCard";
5
+ export type {
6
+ BoxProps,
7
+ CenterProps,
8
+ ContainerProps,
9
+ FlexProps,
10
+ GridItemProps,
11
+ GridProps,
12
+ SimpleGridProps,
13
+ SpacerProps,
14
+ } from "@chakra-ui/react";
1
15
  export {
2
16
  Box,
3
17
  Center,
@@ -5,24 +19,10 @@ export {
5
19
  Flex,
6
20
  Grid,
7
21
  GridItem,
8
- Stack,
9
22
  HStack,
10
23
  SimpleGrid,
11
24
  Spacer,
12
- VStack,
13
25
  Span,
26
+ Stack,
27
+ VStack,
14
28
  } from "@chakra-ui/react";
15
- export type {
16
- BoxProps,
17
- CenterProps,
18
- ContainerProps,
19
- FlexProps,
20
- GridItemProps,
21
- GridProps,
22
- SimpleGridProps,
23
- SpacerProps,
24
- } from "@chakra-ui/react";
25
- export * from "./Separator";
26
- export * from "./RadioCard";
27
- export * from "./StaticCard";
28
- export * from "./PressableCard";
@@ -1,9 +1,10 @@
1
1
  "use client";
2
2
  import { Box, RecipeVariantProps, useSlotRecipe } from "@chakra-ui/react";
3
3
  import React, { PropsWithChildren } from "react";
4
+
5
+ import { infoTagSlotRecipe } from "../theme/slot-recipes/info-tag";
4
6
  import { LineIcon } from "./LineIcon";
5
7
  import type { TagProps } from "./types";
6
- import { infoTagSlotRecipe } from "../theme/slot-recipes/info-tag";
7
8
 
8
9
  type InfoTagVariantProps = RecipeVariantProps<typeof infoTagSlotRecipe>;
9
10
 
@@ -6,6 +6,7 @@ import {
6
6
  useSlotRecipe,
7
7
  } from "@chakra-ui/react";
8
8
  import React, { forwardRef, PropsWithChildren } from "react";
9
+
9
10
  import { lineIconSlotRecipe } from "../theme/slot-recipes/line-icon";
10
11
  import { getCorrectIcon } from "./icons";
11
12
  import { CustomVariantProps, TagProps } from "./types";
@@ -14,9 +14,10 @@ import {
14
14
  WarningFill24Icon,
15
15
  } from "@vygruppen/spor-icon-react";
16
16
  import React, { forwardRef, PropsWithChildren } from "react";
17
+
18
+ import { travelTagSlotRecipe } from "../theme/slot-recipes/travel-tag";
17
19
  import { LineIcon } from "./LineIcon";
18
20
  import type { TagProps } from "./types";
19
- import { travelTagSlotRecipe } from "../theme/slot-recipes/travel-tag";
20
21
 
21
22
  type TravelTagVariantProps = RecipeVariantProps<typeof travelTagSlotRecipe>;
22
23
 
@@ -26,6 +26,7 @@ import {
26
26
  WalkFill30Icon,
27
27
  } from "@vygruppen/spor-icon-react";
28
28
  import React from "react";
29
+
29
30
  import type { Size, Variant } from "./types";
30
31
 
31
32
  const icons: Record<Variant, Record<Size, React.ComponentType>> = {
@@ -6,6 +6,7 @@ import {
6
6
  } from "@chakra-ui/react";
7
7
  import { LinkOutOutline24Icon } from "@vygruppen/spor-icon-react";
8
8
  import React, { forwardRef, PropsWithChildren } from "react";
9
+
9
10
  import { createTexts, useTranslation } from "..";
10
11
  import { linkRecipe } from "../theme/recipes/link";
11
12
 
@@ -1,5 +1,6 @@
1
1
  "use client";
2
2
  import React, { PropsWithChildren } from "react";
3
+
3
4
  import { useHydrated } from "./useHydrated";
4
5
 
5
6
  type ClientOnlyProps = PropsWithChildren<{
@@ -1,6 +1,7 @@
1
1
  import { Box, BoxProps, Center, VisuallyHidden } from "@chakra-ui/react";
2
2
  import { inlineLoaderColorData } from "@vygruppen/spor-loader";
3
3
  import React from "react";
4
+
4
5
  import { ClientOnly } from "./ClientOnly";
5
6
  import Lottie from "./Lottie";
6
7
 
@@ -2,6 +2,7 @@
2
2
  import { Box, BoxProps, Center, VisuallyHidden } from "@chakra-ui/react";
3
3
  import { spinnerColorData } from "@vygruppen/spor-loader";
4
4
  import React from "react";
5
+
5
6
  import { ClientOnly } from "./ClientOnly";
6
7
  import Lottie from "./Lottie";
7
8
 
@@ -2,6 +2,7 @@
2
2
  import { Box, BoxProps, VisuallyHidden } from "@chakra-ui/react";
3
3
  import { contentLoaderData } from "@vygruppen/spor-loader";
4
4
  import React from "react";
5
+
5
6
  import { ClientOnly } from "./ClientOnly";
6
7
  import Lottie from "./Lottie";
7
8
 
@@ -2,6 +2,7 @@
2
2
  import { Box, BoxProps, Center, VisuallyHidden } from "@chakra-ui/react";
3
3
  import { fullScreenLoaderWhiteData } from "@vygruppen/spor-loader";
4
4
  import React from "react";
5
+
5
6
  import { ClientOnly } from "./ClientOnly";
6
7
  import Lottie from "./Lottie";
7
8
 
@@ -2,6 +2,7 @@
2
2
  import { Box, BoxProps, Center, VisuallyHidden } from "@chakra-ui/react";
3
3
  import { inlineLoaderDarkData } from "@vygruppen/spor-loader";
4
4
  import React from "react";
5
+
5
6
  import { ClientOnly } from "./ClientOnly";
6
7
  import Lottie from "./Lottie";
7
8
 
@@ -1,6 +1,7 @@
1
1
  "use client";
2
2
  import { spinnerDarkData, spinnerLightData } from "@vygruppen/spor-loader";
3
3
  import React from "react";
4
+
4
5
  import { Box, BoxProps, Center, useColorMode, VisuallyHidden } from "..";
5
6
  import { ClientOnly } from "./ClientOnly";
6
7
  import Lottie from "./Lottie";
@@ -2,6 +2,7 @@
2
2
  import { Box, BoxProps, Center, VisuallyHidden } from "@chakra-ui/react";
3
3
  import { fullScreenLoaderBlackData } from "@vygruppen/spor-loader";
4
4
  import React from "react";
5
+
5
6
  import { ClientOnly } from "./ClientOnly";
6
7
  import Lottie from "./Lottie";
7
8
 
@@ -2,6 +2,7 @@
2
2
  import { Box, BoxProps, Center, VisuallyHidden } from "@chakra-ui/react";
3
3
  import { inlineLoaderLightData } from "@vygruppen/spor-loader";
4
4
  import React from "react";
5
+
5
6
  import { ClientOnly } from "./ClientOnly";
6
7
  import Lottie from "./Lottie";
7
8
 
@@ -2,6 +2,7 @@
2
2
  import { Box, BoxProps, Center, VisuallyHidden } from "@chakra-ui/react";
3
3
  import { spinnerLightData } from "@vygruppen/spor-loader";
4
4
  import React from "react";
5
+
5
6
  import { ClientOnly } from "./ClientOnly";
6
7
  import Lottie from "./Lottie";
7
8
 
@@ -1,6 +1,5 @@
1
- import React from "react";
2
-
3
1
  import ReactLottie from "lottie-react";
2
+ import React from "react";
4
3
 
5
4
  /**
6
5
  * A wrapper around Lottie to make it tree-shakeable for SSR.
@@ -2,11 +2,12 @@
2
2
  import {
3
3
  BoxProps,
4
4
  Progress,
5
- UseProgressProps,
6
5
  RecipeVariantProps,
6
+ UseProgressProps,
7
7
  useSlotRecipe,
8
8
  } from "@chakra-ui/react";
9
9
  import React, { forwardRef, PropsWithChildren } from "react";
10
+
10
11
  import { progressBarRecipe } from "../theme/slot-recipes/progress-bar";
11
12
  import { useRotatingLabel } from "./useRotatingLabel";
12
13
 
@@ -6,11 +6,12 @@ import {
6
6
  RecipeVariantProps,
7
7
  Text,
8
8
  } from "@chakra-ui/react";
9
- import React, { forwardRef, useId, useRef, useState, useEffect } from "react";
9
+ import React, { forwardRef, useEffect, useId, useRef, useState } from "react";
10
10
  import { useProgressBar } from "react-aria";
11
+
11
12
  import { createTexts, useTranslation } from "..";
12
- import { useRotatingLabel } from "./useRotatingLabel";
13
13
  import { progressLoaderRecipe } from "../theme/recipes/progress-loader";
14
+ import { useRotatingLabel } from "./useRotatingLabel";
14
15
  export type ProgressLoaderVariantProps = RecipeVariantProps<
15
16
  typeof progressLoaderRecipe
16
17
  >;
@@ -1,19 +1,20 @@
1
1
  "use client";
2
- import { skeletonRecipe } from "@/theme/recipes/skeleton";
3
2
  import type {
4
- SkeletonProps as ChakraSkeletonProps,
5
3
  CircleProps,
6
4
  RecipeVariantProps,
5
+ SkeletonProps as ChakraSkeletonProps,
7
6
  } from "@chakra-ui/react";
8
7
  import {
9
- Skeleton as ChakraSkeleton,
10
8
  Circle,
9
+ Skeleton as ChakraSkeleton,
11
10
  Stack,
12
11
  useRecipe,
13
12
  } from "@chakra-ui/react";
14
13
  import * as React from "react";
15
14
  import { forwardRef } from "react";
16
15
 
16
+ import { skeletonRecipe } from "@/theme/recipes/skeleton";
17
+
17
18
  type SkeletonVariantProps = RecipeVariantProps<typeof skeletonRecipe>;
18
19
 
19
20
  export type SkeletonCircleProps = ChakraSkeletonProps &