@vygruppen/spor-react 12.9.0 → 12.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vygruppen/spor-react",
3
3
  "type": "module",
4
- "version": "12.9.0",
4
+ "version": "12.10.0",
5
5
  "exports": {
6
6
  ".": {
7
7
  "types": "./dist/index.d.ts",
@@ -46,7 +46,7 @@
46
46
  "react-stately": "^3.31.1",
47
47
  "react-swipeable": "^7.0.1",
48
48
  "usehooks-ts": "^3.1.0",
49
- "@vygruppen/spor-design-tokens": "4.0.7",
49
+ "@vygruppen/spor-design-tokens": "4.0.8",
50
50
  "@vygruppen/spor-icon-react": "4.2.1",
51
51
  "@vygruppen/spor-loader": "0.7.0"
52
52
  },
@@ -67,8 +67,8 @@
67
67
  "vitest": "^0.26.3",
68
68
  "vitest-axe": "^0.1.0",
69
69
  "vitest-canvas-mock": "^0.2.2",
70
- "@vygruppen/eslint-config": "1.1.1",
71
- "@vygruppen/tsconfig": "0.1.1"
70
+ "@vygruppen/tsconfig": "0.1.1",
71
+ "@vygruppen/eslint-config": "1.1.1"
72
72
  },
73
73
  "peerDependencies": {
74
74
  "react": ">=18.0.0 <19.0.0",
@@ -12,8 +12,18 @@ import { fontFaces } from "../theme/brand";
12
12
  import { Toaster } from "../toast/toast";
13
13
 
14
14
  type SporProviderProps = Omit<ChakraProviderProps, "value"> & {
15
+ /**
16
+ * The current language of your application. Used for built-in microcopy and labels. Default is Norwegian (bokmål).
17
+ */
15
18
  language?: Language;
19
+ /**
20
+ * The theme to use for colors and design tokens. If not provided, the default Spor theme is used.
21
+ */
16
22
  theme?: SystemContext;
23
+ /**
24
+ * If true, enables system color mode. If false, the default theme is light.
25
+ */
26
+ enableSystemColorMode?: boolean;
17
27
  };
18
28
 
19
29
  /**
@@ -56,12 +66,13 @@ import { theme } from '../../../../apps/docs/app/features/portable-text/code-blo
56
66
  export const SporProvider = ({
57
67
  language = Language.NorwegianBokmal,
58
68
  theme = system,
69
+ enableSystemColorMode = true,
59
70
  children,
60
71
  }: SporProviderProps) => {
61
72
  return (
62
73
  <LanguageProvider language={language}>
63
74
  <ChakraProvider value={theme}>
64
- <ColorModeProvider>
75
+ <ColorModeProvider enableSystem={enableSystemColorMode}>
65
76
  <Toaster />
66
77
  <Global styles={fontFaces} />
67
78
 
@@ -68,7 +68,7 @@ export const choiceChipSlotRecipe = defineSlotRecipe({
68
68
  label: {
69
69
  display: "flex",
70
70
  alignItems: "center",
71
-
71
+ gap: "1",
72
72
  fontSize: "xs",
73
73
  },
74
74
  },