@dhis2/ui-constants 8.14.9 → 8.15.0-alpha.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/package.json +5 -3
  2. package/types/index.d.ts +63 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhis2/ui-constants",
3
- "version": "8.14.9",
3
+ "version": "8.15.0-alpha.2",
4
4
  "description": "Constants used in the UI libs",
5
5
  "main": "./build/cjs/index.js",
6
6
  "module": "./build/es/index.js",
@@ -29,6 +29,8 @@
29
29
  "prop-types": "^15.7.2"
30
30
  },
31
31
  "files": [
32
- "build"
33
- ]
32
+ "build",
33
+ "types"
34
+ ],
35
+ "types": "types"
34
36
  }
@@ -0,0 +1,63 @@
1
+ export type ColorBase = 'blue' | 'teal' | 'red' | 'yellow' | 'green' | 'grey'
2
+ export type ColorVariant =
3
+ | '900'
4
+ | '800'
5
+ | '700'
6
+ | '600'
7
+ | '500'
8
+ | '400'
9
+ | '300'
10
+ | '200'
11
+ | '100'
12
+ | '050'
13
+ export type ColorProp = `${ColorBase}${ColorVariant}` | 'white'
14
+
15
+ export const colors: Record<ColorProp, string>
16
+
17
+ export type ElevantionVariant = 'e100' | 'e200' | 'e300' | 'e400'
18
+ export const elevations: Record<ElevantionVariant, string>
19
+
20
+ export type SpacerVariant =
21
+ | 'dp4'
22
+ | 'dp8'
23
+ | 'dp12'
24
+ | 'dp16'
25
+ | 'dp24'
26
+ | 'dp32'
27
+ | 'dp48'
28
+ | 'dp64'
29
+ | 'dp96'
30
+ | 'dp128'
31
+ | 'dp192'
32
+ | 'dp256'
33
+ | 'dp384'
34
+ | 'dp512'
35
+ | 'dp640'
36
+ export const spacersNum: Record<SpacerVariant, number>
37
+ export const spacers: Record<SpacerVariant, string>
38
+
39
+ export type LayerVariant = 'applicationTop' | 'blocking' | 'alert'
40
+ export const layer: Record<LayerVariant, number>
41
+
42
+ export type ThemeBase = 'primary' | 'secondary'
43
+ export type ThemeVariant =
44
+ | '900'
45
+ | '800'
46
+ | '700'
47
+ | '600'
48
+ | '500'
49
+ | '400'
50
+ | '300'
51
+ | '200'
52
+ | '100'
53
+ | '050'
54
+ export type ThemeProp =
55
+ | `${ThemeBase}${ThemeVariant}`
56
+ | 'default'
57
+ | 'error'
58
+ | 'valid'
59
+ | 'warning'
60
+ | 'disabled'
61
+ | 'focus'
62
+ | 'fonts'
63
+ export const theme: Record<ThemeProp, string>