@vygruppen/spor-react 3.1.1 → 3.1.2

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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @vygruppen/spor-react@3.1.1 build
2
+ > @vygruppen/spor-react@3.1.2 build
3
3
  > tsup src/index.tsx --dts --treeshake --format cjs,esm
4
4
 
5
5
  CLI Building entry: src/index.tsx
@@ -12,10 +12,10 @@
12
12
  "toZoned" and "toTime" are imported from external module "@internationalized/date" but never used in "dist/index.js".
13
13
  "toZoned" and "toTime" are imported from external module "@internationalized/date" but never used in "dist/chunk-GIRK7GTN.mjs".
14
14
  CJS dist/index.js 901.12 KB
15
- CJS ⚡️ Build success in 5792ms
15
+ CJS ⚡️ Build success in 4689ms
16
16
  ESM dist/index.mjs 2.01 KB
17
17
  ESM dist/CountryCodeSelect-PU2FEIUH.mjs 350.82 KB
18
18
  ESM dist/chunk-GIRK7GTN.mjs 418.55 KB
19
- ESM ⚡️ Build success in 5793ms
20
- DTS ⚡️ Build success in 21467ms
21
- DTS dist/index.d.ts 250.91 KB
19
+ ESM ⚡️ Build success in 4689ms
20
+ DTS ⚡️ Build success in 18196ms
21
+ DTS dist/index.d.ts 251.63 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @vygruppen/spor-react
2
2
 
3
+ ## 3.1.2
4
+
5
+ ### Patch Changes
6
+
7
+ - a19a1e80: Heading: Fix a bug with variants
8
+
3
9
  ## 3.1.1
4
10
 
5
11
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -1882,6 +1882,44 @@ type ColorsType = typeof tokens__default.color.alias & typeof tokens__default.co
1882
1882
  linjetag: typeof tokens__default.color.linjetag;
1883
1883
  };
1884
1884
 
1885
+ declare const textStyles: {
1886
+ "2xl": {
1887
+ fontSize: string[];
1888
+ fontFamily: string;
1889
+ lineHeight: string;
1890
+ };
1891
+ "xl-display": {
1892
+ fontSize: string[];
1893
+ fontFamily: string;
1894
+ lineHeight: string;
1895
+ };
1896
+ "xl-sans": {
1897
+ fontSize: string[];
1898
+ fontFamily: string;
1899
+ lineHeight: string;
1900
+ };
1901
+ lg: {
1902
+ fontSize: string[];
1903
+ fontFamily: string;
1904
+ lineHeight: string;
1905
+ };
1906
+ md: {
1907
+ fontSize: string[];
1908
+ fontFamily: string;
1909
+ lineHeight: string;
1910
+ };
1911
+ sm: {
1912
+ fontSize: string[];
1913
+ fontFamily: string;
1914
+ lineHeight: string;
1915
+ };
1916
+ xs: {
1917
+ fontSize: string[];
1918
+ fontFamily: string;
1919
+ lineHeight: string;
1920
+ };
1921
+ };
1922
+
1885
1923
  /** A string of CSS that should be injected in the global CSS space */
1886
1924
  declare const fontFaces: string;
1887
1925
 
@@ -6975,12 +7013,11 @@ type CodeProps = CodeProps$1 & {
6975
7013
  */
6976
7014
  declare const Code: _chakra_ui_system_dist_system_types.ComponentWithAs<As, CodeProps>;
6977
7015
 
6978
- type TextStyles = keyof typeof tokens__default.font.style;
6979
7016
  type HeadingProps = Omit<HeadingProps$1, "textStyle" | "as"> & {
6980
7017
  /** The heading level, e.g. h1, h2, h3... **/
6981
7018
  as: "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
6982
- /** The size and style of the heading */
6983
- variant?: TextStyles;
7019
+ /** The size and style of the heading. Defaults to xl-display */
7020
+ variant?: keyof typeof textStyles;
6984
7021
  };
6985
7022
  /**
6986
7023
  * Create your own fancy headings with this component.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vygruppen/spor-react",
3
- "version": "3.1.1",
3
+ "version": "3.1.2",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",
@@ -1,14 +1,12 @@
1
1
  import { HeadingProps as ChakraHeadingProps, Text } from "@chakra-ui/react";
2
- import type tokens from "@vygruppen/spor-design-tokens";
3
2
  import React from "react";
4
-
5
- type TextStyles = keyof typeof tokens.font.style;
3
+ import type { textStyles } from "../theme/foundations";
6
4
 
7
5
  export type HeadingProps = Omit<ChakraHeadingProps, "textStyle" | "as"> & {
8
6
  /** The heading level, e.g. h1, h2, h3... **/
9
7
  as: "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
10
- /** The size and style of the heading */
11
- variant?: TextStyles;
8
+ /** The size and style of the heading. Defaults to xl-display */
9
+ variant?: keyof typeof textStyles;
12
10
  };
13
11
  /**
14
12
  * Create your own fancy headings with this component.