@vygruppen/spor-react 3.1.0 → 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.
package/dist/index.d.ts CHANGED
@@ -45,7 +45,7 @@ type AccordionProps = Omit<AccordionProps$1, "variant" | "size"> & {
45
45
  declare const Accordion: _chakra_ui_system_dist_system_types.ComponentWithAs<"div", AccordionProps>;
46
46
 
47
47
  type HeadingLevel = "h2" | "h3" | "h4" | "h5" | "h6";
48
- type ExpandableProps = AccordionProps & {
48
+ type ExpandableProps = Omit<AccordionProps, "title"> & {
49
49
  /** The hidden content */
50
50
  children: React__default.ReactNode;
51
51
  /** The title that's shown inside the toggle button */
@@ -75,7 +75,7 @@ type ExpandableProps = AccordionProps & {
75
75
  * ```
76
76
  */
77
77
  declare const Expandable: ({ children, headingLevel, title, leftIcon, size, ...rest }: ExpandableProps) => React__default.JSX.Element;
78
- type ExpandableItemProps = AccordionItemProps & {
78
+ type ExpandableItemProps = Omit<AccordionItemProps, "title"> & {
79
79
  /** The hidden content */
80
80
  children: React__default.ReactNode;
81
81
  /** The title that's shown inside the toggle button */
@@ -166,7 +166,7 @@ type ExpandableAlertProps = BaseAlertProps & {
166
166
  * </ExpandableAlert>
167
167
  * ```
168
168
  */
169
- declare const ExpandableAlert: ({ variant, children, title, headingLevel, defaultOpen, onToggle, }: ExpandableAlertProps) => React__default.JSX.Element;
169
+ declare const ExpandableAlert: ({ variant, children, title, headingLevel, defaultOpen, onToggle, ...boxProps }: ExpandableAlertProps) => React__default.JSX.Element;
170
170
 
171
171
  type StaticAlertProps = BaseAlertProps;
172
172
  /**
@@ -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
 
@@ -5172,7 +5210,7 @@ declare const theme: {
5172
5210
  sizes?: {
5173
5211
  "2xs": {
5174
5212
  container: {
5175
- [x: string]: string | 1 | 2 | 3 | 6 | 4 | 5 | 7 | 8 | 9 | 10 | 12 | 14 | 16 | 20 | 24 | 0.5 | 1.5 | 60 | {
5213
+ [x: string]: string | 1 | 2 | 3 | 6 | 4 | 5 | 7 | 8 | 9 | 10 | 12 | 14 | 16 | 20 | 0.5 | 1.5 | 24 | 60 | {
5176
5214
  sm: string;
5177
5215
  md: string;
5178
5216
  lg: string;
@@ -5180,7 +5218,7 @@ declare const theme: {
5180
5218
  } | 2.5 | 3.5 | 28 | 32 | 36 | 40 | 44 | 48 | 52 | 56 | 64 | 72 | 80 | 96;
5181
5219
  };
5182
5220
  excessLabel: {
5183
- [x: string]: string | 1 | 2 | 3 | 6 | 4 | 5 | 7 | 8 | 9 | 10 | 12 | 14 | 16 | 20 | 24 | 0.5 | 1.5 | 60 | 2.5 | 3.5 | 28 | 32 | 36 | 40 | 44 | 48 | 52 | 56 | 64 | 72 | 80 | 96 | {
5221
+ [x: string]: string | 1 | 2 | 3 | 6 | 4 | 5 | 7 | 8 | 9 | 10 | 12 | 14 | 16 | 20 | 0.5 | 1.5 | 24 | 60 | 2.5 | 3.5 | 28 | 32 | 36 | 40 | 44 | 48 | 52 | 56 | 64 | 72 | 80 | 96 | {
5184
5222
  sm: string;
5185
5223
  md: string;
5186
5224
  lg: string;
@@ -5190,7 +5228,7 @@ declare const theme: {
5190
5228
  };
5191
5229
  xs: {
5192
5230
  container: {
5193
- [x: string]: string | 1 | 2 | 3 | 6 | 4 | 5 | 7 | 8 | 9 | 10 | 12 | 14 | 16 | 20 | 24 | 0.5 | 1.5 | 60 | 2.5 | 3.5 | 28 | 32 | 36 | 40 | 44 | 48 | 52 | 56 | 64 | 72 | 80 | 96 | {
5231
+ [x: string]: string | 1 | 2 | 3 | 6 | 4 | 5 | 7 | 8 | 9 | 10 | 12 | 14 | 16 | 20 | 0.5 | 1.5 | 24 | 60 | 2.5 | 3.5 | 28 | 32 | 36 | 40 | 44 | 48 | 52 | 56 | 64 | 72 | 80 | 96 | {
5194
5232
  sm: string;
5195
5233
  md: string;
5196
5234
  lg: string;
@@ -5198,7 +5236,7 @@ declare const theme: {
5198
5236
  };
5199
5237
  };
5200
5238
  excessLabel: {
5201
- [x: string]: string | 1 | 2 | 3 | 6 | 4 | 5 | 7 | 8 | 9 | 10 | 12 | 14 | 16 | 20 | 24 | 0.5 | 1.5 | 60 | 2.5 | 3.5 | 28 | 32 | 36 | 40 | 44 | 48 | 52 | 56 | 64 | 72 | 80 | 96 | {
5239
+ [x: string]: string | 1 | 2 | 3 | 6 | 4 | 5 | 7 | 8 | 9 | 10 | 12 | 14 | 16 | 20 | 0.5 | 1.5 | 24 | 60 | 2.5 | 3.5 | 28 | 32 | 36 | 40 | 44 | 48 | 52 | 56 | 64 | 72 | 80 | 96 | {
5202
5240
  sm: string;
5203
5241
  md: string;
5204
5242
  lg: string;
@@ -5208,7 +5246,7 @@ declare const theme: {
5208
5246
  };
5209
5247
  sm: {
5210
5248
  container: {
5211
- [x: string]: string | 1 | 2 | 3 | 6 | 4 | 5 | 7 | 8 | 9 | 10 | 12 | 14 | 16 | 20 | 24 | 0.5 | 1.5 | 60 | 2.5 | 3.5 | 28 | 32 | 36 | 40 | 44 | 48 | 52 | 56 | 64 | 72 | 80 | 96 | {
5249
+ [x: string]: string | 1 | 2 | 3 | 6 | 4 | 5 | 7 | 8 | 9 | 10 | 12 | 14 | 16 | 20 | 0.5 | 1.5 | 24 | 60 | 2.5 | 3.5 | 28 | 32 | 36 | 40 | 44 | 48 | 52 | 56 | 64 | 72 | 80 | 96 | {
5212
5250
  sm: string;
5213
5251
  md: string;
5214
5252
  lg: string;
@@ -5216,7 +5254,7 @@ declare const theme: {
5216
5254
  };
5217
5255
  };
5218
5256
  excessLabel: {
5219
- [x: string]: string | 1 | 2 | 3 | 6 | 4 | 5 | 7 | 8 | 9 | 10 | 12 | 14 | 16 | 20 | 24 | 0.5 | 1.5 | 60 | 2.5 | 3.5 | 28 | 32 | 36 | 40 | 44 | 48 | 52 | 56 | 64 | 72 | 80 | 96 | {
5257
+ [x: string]: string | 1 | 2 | 3 | 6 | 4 | 5 | 7 | 8 | 9 | 10 | 12 | 14 | 16 | 20 | 0.5 | 1.5 | 24 | 60 | 2.5 | 3.5 | 28 | 32 | 36 | 40 | 44 | 48 | 52 | 56 | 64 | 72 | 80 | 96 | {
5220
5258
  sm: string;
5221
5259
  md: string;
5222
5260
  lg: string;
@@ -5226,7 +5264,7 @@ declare const theme: {
5226
5264
  };
5227
5265
  md: {
5228
5266
  container: {
5229
- [x: string]: string | 1 | 2 | 3 | 6 | 4 | 5 | 7 | 8 | 9 | 10 | 12 | 14 | 16 | 20 | 24 | 0.5 | 1.5 | 60 | 2.5 | 3.5 | 28 | 32 | 36 | 40 | 44 | 48 | 52 | 56 | 64 | 72 | 80 | 96 | {
5267
+ [x: string]: string | 1 | 2 | 3 | 6 | 4 | 5 | 7 | 8 | 9 | 10 | 12 | 14 | 16 | 20 | 0.5 | 1.5 | 24 | 60 | 2.5 | 3.5 | 28 | 32 | 36 | 40 | 44 | 48 | 52 | 56 | 64 | 72 | 80 | 96 | {
5230
5268
  sm: string;
5231
5269
  md: string;
5232
5270
  lg: string;
@@ -5234,7 +5272,7 @@ declare const theme: {
5234
5272
  };
5235
5273
  };
5236
5274
  excessLabel: {
5237
- [x: string]: string | 1 | 2 | 3 | 6 | 4 | 5 | 7 | 8 | 9 | 10 | 12 | 14 | 16 | 20 | 24 | 0.5 | 1.5 | 60 | 2.5 | 3.5 | 28 | 32 | 36 | 40 | 44 | 48 | 52 | 56 | 64 | 72 | 80 | 96 | {
5275
+ [x: string]: string | 1 | 2 | 3 | 6 | 4 | 5 | 7 | 8 | 9 | 10 | 12 | 14 | 16 | 20 | 0.5 | 1.5 | 24 | 60 | 2.5 | 3.5 | 28 | 32 | 36 | 40 | 44 | 48 | 52 | 56 | 64 | 72 | 80 | 96 | {
5238
5276
  sm: string;
5239
5277
  md: string;
5240
5278
  lg: string;
@@ -5244,7 +5282,7 @@ declare const theme: {
5244
5282
  };
5245
5283
  lg: {
5246
5284
  container: {
5247
- [x: string]: string | 1 | 2 | 3 | 6 | 4 | 5 | 7 | 8 | 9 | 10 | 12 | 14 | 16 | 20 | 24 | 0.5 | 1.5 | 60 | 2.5 | 3.5 | 28 | 32 | 36 | 40 | 44 | 48 | 52 | 56 | 64 | 72 | 80 | 96 | {
5285
+ [x: string]: string | 1 | 2 | 3 | 6 | 4 | 5 | 7 | 8 | 9 | 10 | 12 | 14 | 16 | 20 | 0.5 | 1.5 | 24 | 60 | 2.5 | 3.5 | 28 | 32 | 36 | 40 | 44 | 48 | 52 | 56 | 64 | 72 | 80 | 96 | {
5248
5286
  sm: string;
5249
5287
  md: string;
5250
5288
  lg: string;
@@ -5252,7 +5290,7 @@ declare const theme: {
5252
5290
  };
5253
5291
  };
5254
5292
  excessLabel: {
5255
- [x: string]: string | 1 | 2 | 3 | 6 | 4 | 5 | 7 | 8 | 9 | 10 | 12 | 14 | 16 | 20 | 24 | 0.5 | 1.5 | 60 | 2.5 | 3.5 | 28 | 32 | 36 | 40 | 44 | 48 | 52 | 56 | 64 | 72 | 80 | 96 | {
5293
+ [x: string]: string | 1 | 2 | 3 | 6 | 4 | 5 | 7 | 8 | 9 | 10 | 12 | 14 | 16 | 20 | 0.5 | 1.5 | 24 | 60 | 2.5 | 3.5 | 28 | 32 | 36 | 40 | 44 | 48 | 52 | 56 | 64 | 72 | 80 | 96 | {
5256
5294
  sm: string;
5257
5295
  md: string;
5258
5296
  lg: string;
@@ -5262,7 +5300,7 @@ declare const theme: {
5262
5300
  };
5263
5301
  xl: {
5264
5302
  container: {
5265
- [x: string]: string | 1 | 2 | 3 | 6 | 4 | 5 | 7 | 8 | 9 | 10 | 12 | 14 | 16 | 20 | 24 | 0.5 | 1.5 | 60 | 2.5 | 3.5 | 28 | 32 | 36 | 40 | 44 | 48 | 52 | 56 | 64 | 72 | 80 | 96 | {
5303
+ [x: string]: string | 1 | 2 | 3 | 6 | 4 | 5 | 7 | 8 | 9 | 10 | 12 | 14 | 16 | 20 | 0.5 | 1.5 | 24 | 60 | 2.5 | 3.5 | 28 | 32 | 36 | 40 | 44 | 48 | 52 | 56 | 64 | 72 | 80 | 96 | {
5266
5304
  sm: string;
5267
5305
  md: string;
5268
5306
  lg: string;
@@ -5270,7 +5308,7 @@ declare const theme: {
5270
5308
  };
5271
5309
  };
5272
5310
  excessLabel: {
5273
- [x: string]: string | 1 | 2 | 3 | 6 | 4 | 5 | 7 | 8 | 9 | 10 | 12 | 14 | 16 | 20 | 24 | 0.5 | 1.5 | 60 | 2.5 | 3.5 | 28 | 32 | 36 | 40 | 44 | 48 | 52 | 56 | 64 | 72 | 80 | 96 | {
5311
+ [x: string]: string | 1 | 2 | 3 | 6 | 4 | 5 | 7 | 8 | 9 | 10 | 12 | 14 | 16 | 20 | 0.5 | 1.5 | 24 | 60 | 2.5 | 3.5 | 28 | 32 | 36 | 40 | 44 | 48 | 52 | 56 | 64 | 72 | 80 | 96 | {
5274
5312
  sm: string;
5275
5313
  md: string;
5276
5314
  lg: string;
@@ -5280,7 +5318,7 @@ declare const theme: {
5280
5318
  };
5281
5319
  "2xl": {
5282
5320
  container: {
5283
- [x: string]: string | 1 | 2 | 3 | 6 | 4 | 5 | 7 | 8 | 9 | 10 | 12 | 14 | 16 | 20 | 24 | 0.5 | 1.5 | 60 | 2.5 | 3.5 | 28 | 32 | 36 | 40 | 44 | 48 | 52 | 56 | 64 | 72 | 80 | 96 | {
5321
+ [x: string]: string | 1 | 2 | 3 | 6 | 4 | 5 | 7 | 8 | 9 | 10 | 12 | 14 | 16 | 20 | 0.5 | 1.5 | 24 | 60 | 2.5 | 3.5 | 28 | 32 | 36 | 40 | 44 | 48 | 52 | 56 | 64 | 72 | 80 | 96 | {
5284
5322
  sm: string;
5285
5323
  md: string;
5286
5324
  lg: string;
@@ -5288,7 +5326,7 @@ declare const theme: {
5288
5326
  };
5289
5327
  };
5290
5328
  excessLabel: {
5291
- [x: string]: string | 1 | 2 | 3 | 6 | 4 | 5 | 7 | 8 | 9 | 10 | 12 | 14 | 16 | 20 | 24 | 0.5 | 1.5 | 60 | 2.5 | 3.5 | 28 | 32 | 36 | 40 | 44 | 48 | 52 | 56 | 64 | 72 | 80 | 96 | {
5329
+ [x: string]: string | 1 | 2 | 3 | 6 | 4 | 5 | 7 | 8 | 9 | 10 | 12 | 14 | 16 | 20 | 0.5 | 1.5 | 24 | 60 | 2.5 | 3.5 | 28 | 32 | 36 | 40 | 44 | 48 | 52 | 56 | 64 | 72 | 80 | 96 | {
5292
5330
  sm: string;
5293
5331
  md: string;
5294
5332
  lg: string;
@@ -5298,7 +5336,7 @@ declare const theme: {
5298
5336
  };
5299
5337
  full: {
5300
5338
  container: {
5301
- [x: string]: string | 1 | 2 | 3 | 6 | 4 | 5 | 7 | 8 | 9 | 10 | 12 | 14 | 16 | 20 | 24 | 0.5 | 1.5 | 60 | 2.5 | 3.5 | 28 | 32 | 36 | 40 | 44 | 48 | 52 | 56 | 64 | 72 | 80 | 96 | {
5339
+ [x: string]: string | 1 | 2 | 3 | 6 | 4 | 5 | 7 | 8 | 9 | 10 | 12 | 14 | 16 | 20 | 0.5 | 1.5 | 24 | 60 | 2.5 | 3.5 | 28 | 32 | 36 | 40 | 44 | 48 | 52 | 56 | 64 | 72 | 80 | 96 | {
5302
5340
  sm: string;
5303
5341
  md: string;
5304
5342
  lg: string;
@@ -5306,7 +5344,7 @@ declare const theme: {
5306
5344
  };
5307
5345
  };
5308
5346
  excessLabel: {
5309
- [x: string]: string | 1 | 2 | 3 | 6 | 4 | 5 | 7 | 8 | 9 | 10 | 12 | 14 | 16 | 20 | 24 | 0.5 | 1.5 | 60 | 2.5 | 3.5 | 28 | 32 | 36 | 40 | 44 | 48 | 52 | 56 | 64 | 72 | 80 | 96 | {
5347
+ [x: string]: string | 1 | 2 | 3 | 6 | 4 | 5 | 7 | 8 | 9 | 10 | 12 | 14 | 16 | 20 | 0.5 | 1.5 | 24 | 60 | 2.5 | 3.5 | 28 | 32 | 36 | 40 | 44 | 48 | 52 | 56 | 64 | 72 | 80 | 96 | {
5310
5348
  sm: string;
5311
5349
  md: string;
5312
5350
  lg: string;
@@ -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.