@vygruppen/spor-react 12.0.1 → 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 +10 -11
  2. package/.turbo/turbo-typegen.log +3 -2
  3. package/CHANGELOG.md +15 -0
  4. package/dist/index.d.mts +576 -576
  5. package/dist/index.d.ts +576 -576
  6. package/dist/index.js +8643 -8613
  7. package/dist/index.js.map +1 -1
  8. package/dist/index.mjs +8848 -8818
  9. package/dist/index.mjs.map +1 -1
  10. package/eslint.config.mjs +9 -0
  11. package/package.json +9 -6
  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 +3 -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
@@ -1,4 +1,5 @@
1
1
  import { defineSlotRecipe } from "@chakra-ui/react";
2
+
2
3
  import { tableAnatomy } from "./anatomy";
3
4
 
4
5
  const numericStyles = {
@@ -15,6 +16,8 @@ export const tableSlotRecipe = defineSlotRecipe({
15
16
  tableLayout: "fixed",
16
17
  borderCollapse: "collapse",
17
18
  width: "100%",
19
+ minWidth: "36rem",
20
+ overflowX: "auto",
18
21
  },
19
22
  columnHeader: {
20
23
  fontWeight: "bold",
@@ -1,4 +1,5 @@
1
1
  import { defineSlotRecipe } from "@chakra-ui/react";
2
+
2
3
  import { tabsAnatomy } from "./anatomy";
3
4
 
4
5
  export const tabsSlotRecipe = defineSlotRecipe({
@@ -1,4 +1,5 @@
1
1
  import { defineSlotRecipe } from "@chakra-ui/react";
2
+
2
3
  import { toastAnatomy } from "./anatomy";
3
4
 
4
5
  export const toastSlotRecipe = defineSlotRecipe({
@@ -1,4 +1,5 @@
1
1
  import { defineSlotRecipe } from "@chakra-ui/react";
2
+
2
3
  import { travelTagAnatomy } from "./anatomy";
3
4
 
4
5
  export const travelTagSlotRecipe = defineSlotRecipe({
@@ -1,7 +1,7 @@
1
1
  import { defineTokens } from "@chakra-ui/react";
2
+ import aliasJson from "@vygruppen/spor-design-tokens/tokens/color/alias.json";
2
3
  import linjetagJson from "@vygruppen/spor-design-tokens/tokens/color/linjetag.json";
3
4
  import paletteJson from "@vygruppen/spor-design-tokens/tokens/color/palette.json";
4
- import aliasJson from "@vygruppen/spor-design-tokens/tokens/color/alias.json";
5
5
 
6
6
  export const colors = defineTokens.colors({
7
7
  ...aliasJson.color.alias,
@@ -1,20 +1,20 @@
1
- import { aspectRatios } from "./aspect-ratios";
2
1
  import { animations } from "./animations";
2
+ import { aspectRatios } from "./aspect-ratios";
3
3
  import { blurs } from "./blurs";
4
4
  import { borders } from "./borders";
5
5
  import { colors } from "./colors";
6
+ import { cursor } from "./cursor";
6
7
  import { durations } from "./durations";
7
8
  import { easings } from "./easings";
8
- import { fonts } from "./fonts";
9
9
  import { fontSizes } from "./font-sizes";
10
10
  import { fontWeights } from "./font-weights";
11
+ import { fonts } from "./fonts";
11
12
  import { letterSpacings } from "./letter-spacings";
12
13
  import { lineHeights } from "./line-heights";
13
14
  import { radii } from "./radii";
14
- import { spacing } from "./spacing";
15
15
  import { sizes } from "./sizes";
16
+ import { spacing } from "./spacing";
16
17
  import { zIndex } from "./z-index";
17
- import { cursor } from "./cursor";
18
18
 
19
19
  export const tokens = {
20
20
  aspectRatios,
@@ -1,5 +1,6 @@
1
1
  import { defineTokens } from "@chakra-ui/react";
2
2
  import tokens from "@vygruppen/spor-design-tokens";
3
+
3
4
  import { spacing } from "./spacing";
4
5
 
5
6
  export const largeSizes = defineTokens.sizes({
@@ -1,7 +1,7 @@
1
1
  import { coreBackground, coreBorder, coreText } from "./core-utils";
2
2
  import { floatingBackground, floatingBorder } from "./floating-utils";
3
- import { InputState } from "./types";
4
3
  import { surface } from "./surface-utils";
4
+ import { InputState } from "./types";
5
5
 
6
6
  export function inputVariant(state: InputState) {
7
7
  switch (state) {
@@ -1,21 +1,21 @@
1
1
  "use client";
2
2
 
3
- import React from "react";
4
-
5
3
  import {
6
- Toaster as ChakraToaster,
4
+ createToaster,
7
5
  Icon,
8
6
  Portal,
9
7
  Stack,
10
8
  Toast,
11
- createToaster,
9
+ Toaster as ChakraToaster,
12
10
  } from "@chakra-ui/react";
13
- import { createTexts, useTranslation } from "@/i18n";
14
11
  import {
12
+ ErrorFill18Icon,
15
13
  InformationFill18Icon,
16
14
  SuccessFill18Icon,
17
- ErrorFill18Icon,
18
15
  } from "@vygruppen/spor-icon-react";
16
+ import React from "react";
17
+
18
+ import { createTexts, useTranslation } from "@/i18n";
19
19
 
20
20
  const toaster = createToaster({
21
21
  placement: "bottom",
@@ -1,2 +1,2 @@
1
- export { Collapsible } from "@chakra-ui/react";
2
1
  export type { CollapsibleRootProps } from "@chakra-ui/react";
2
+ export { Collapsible } from "@chakra-ui/react";
@@ -1,9 +1,8 @@
1
1
  "use client";
2
-
3
2
  import {
4
- Box,
5
3
  Badge as ChakraBadge,
6
4
  BadgeProps as ChakraBadgeProps,
5
+ Box,
7
6
  } from "@chakra-ui/react";
8
7
  import { IconComponent } from "@vygruppen/spor-icon-react";
9
8
  import React, { forwardRef } from "react";
@@ -1,12 +1,13 @@
1
1
  "use client";
2
2
 
3
- import React from "react"; // Added explicit React import
4
3
  import {
5
4
  chakra,
6
5
  Code as ChakraCode,
7
6
  CodeProps,
8
7
  RecipeVariantProps,
9
8
  } from "@chakra-ui/react";
9
+ import React from "react"; // Added explicit React import
10
+
10
11
  import { codeRecipie } from "../theme/recipes/code";
11
12
 
12
13
  type CodeVariantProps = RecipeVariantProps<typeof codeRecipie> & CodeProps;
@@ -1,10 +1,11 @@
1
1
  "use client";
2
2
  import {
3
- HeadingProps as ChakraHeadingProps,
4
3
  ConditionalValue,
4
+ HeadingProps as ChakraHeadingProps,
5
5
  Text,
6
6
  } from "@chakra-ui/react";
7
7
  import React, { forwardRef } from "react";
8
+
8
9
  import { slugify } from "..";
9
10
 
10
11
  export type HeadingProps = Omit<ChakraHeadingProps, "textStyle" | "as"> & {
@@ -1,5 +1,5 @@
1
- export { Em, Kbd } from "@chakra-ui/react";
2
1
  export * from "./Badge";
3
2
  export * from "./Code";
4
3
  export * from "./Heading";
5
4
  export * from "./Text";
5
+ export { Em, Kbd } from "@chakra-ui/react";
@@ -1,22 +1,22 @@
1
1
  /** This file works as a proxy for all Chakra UI exports */
2
+ export type { PortalProps, UseDisclosureProps } from "@chakra-ui/react";
2
3
  export {
4
+ createListCollection,
5
+ defineRecipe,
6
+ defineStyle,
7
+ For,
8
+ FormatByte,
9
+ FormatNumber,
10
+ LocaleProvider,
3
11
  Portal,
12
+ Show,
4
13
  useBreakpointValue,
14
+ useCheckbox,
5
15
  useClipboard,
6
16
  useControllableProp,
7
17
  useDisclosure,
8
18
  useMediaQuery,
9
19
  useToken,
10
- defineRecipe,
11
- defineStyle,
12
- For,
13
- FormatNumber,
14
- FormatByte,
15
- LocaleProvider,
16
- Show,
17
20
  VisuallyHidden,
18
- createListCollection,
19
- useCheckbox,
20
21
  } from "@chakra-ui/react";
21
- export { useMap, useOnClickOutside, useIsClient } from "usehooks-ts";
22
- export type { PortalProps, UseDisclosureProps } from "@chakra-ui/react";
22
+ export { useIsClient, useMap, useOnClickOutside } from "usehooks-ts";