@charcoal-ui/theme 5.0.0-beta.3 → 5.0.0-beta.4

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/src/default.ts CHANGED
@@ -1,167 +1,203 @@
1
- import rgba from 'polished/lib/color/rgba'
1
+ /** This file is auto generated. DO NOT EDIT BY HAND. */
2
2
  import { CharcoalTheme } from './theme'
3
- import {
4
- BORDER_RADIUS,
5
- BREAKPOINT,
6
- COLUMN_UNIT,
7
- GUTTER_UNIT,
8
- SPACING,
9
- TYPOGRAPHY_SIZE,
10
- } from '@charcoal-ui/foundation'
11
- import { applyEffect } from '@charcoal-ui/utils'
12
-
13
- const outlineEffect = {
14
- type: 'opacity',
15
- opacity: 0.32,
16
- } as const
17
-
18
- const assertive = '#ff2b00'
19
- const brand = '#0096fa'
20
- const borderForLight = rgba('#000000', 0.08)
21
- const borderForDark = rgba('#ffffff', 0.12)
22
3
 
23
4
  const common = {
24
- typography: {
25
- size: TYPOGRAPHY_SIZE,
5
+ borderRadius: {
6
+ '4': 4,
7
+ '8': 8,
8
+ '16': 16,
9
+ '24': 24,
10
+ none: 0,
11
+ oval: 999999,
26
12
  },
27
- spacing: SPACING,
28
- grid: {
29
- unit: {
30
- column: COLUMN_UNIT,
31
- gutter: GUTTER_UNIT,
32
- },
13
+ breakpoint: {
14
+ screen1: 744,
15
+ screen2: 952,
16
+ screen3: 1160,
17
+ screen4: 1368,
33
18
  },
34
- borderRadius: BORDER_RADIUS,
35
- transition: {
36
- default: {
37
- duration: 0.2,
19
+ elementEffect: {
20
+ disabled: {
21
+ opacity: 0.32,
22
+ type: 'opacity',
38
23
  },
39
24
  },
40
- breakpoint: {
41
- screen1: BREAKPOINT[6],
42
- screen2: BREAKPOINT[8],
43
- screen3: BREAKPOINT[10],
44
- screen4: BREAKPOINT[12],
45
- },
46
25
  gradientColor: {
47
- surface5: [
48
- { color: rgba('#000000', 0.32), ratio: 0 },
49
- { color: rgba('#000000', 0), ratio: 100 },
50
- ],
51
26
  callToAction: [
52
- { color: '#d1ff1a', ratio: 0 },
53
- { color: '#1ad1ff', ratio: 100 },
27
+ {
28
+ color: '#d1ff1a',
29
+ ratio: 0,
30
+ },
31
+ {
32
+ color: '#1ad1ff',
33
+ ratio: 100,
34
+ },
35
+ ],
36
+ surface5: [
37
+ {
38
+ color: 'rgba(0,0,0,0.32)',
39
+ ratio: 0,
40
+ },
41
+ {
42
+ color: 'rgba(0,0,0,0)',
43
+ ratio: 100,
44
+ },
54
45
  ],
55
46
  },
47
+ grid: {
48
+ unit: {
49
+ column: 80,
50
+ gutter: 24,
51
+ },
52
+ },
56
53
  outline: {
57
- default: {
58
- color: applyEffect(brand, outlineEffect),
54
+ assertive: {
55
+ color: 'rgba(255,43,0,0.32)',
59
56
  weight: 4,
60
57
  },
61
- assertive: {
62
- color: applyEffect(assertive, outlineEffect),
58
+ default: {
59
+ color: 'rgba(0,150,250,0.32)',
63
60
  weight: 4,
64
61
  },
65
62
  },
66
- elementEffect: {
67
- disabled: {
68
- type: 'opacity',
69
- opacity: 0.32,
63
+ spacing: {
64
+ '0': 0,
65
+ '4': 4,
66
+ '8': 8,
67
+ '16': 16,
68
+ '24': 24,
69
+ '40': 40,
70
+ '64': 64,
71
+ '104': 104,
72
+ '168': 168,
73
+ '272': 272,
74
+ '440': 440,
75
+ },
76
+ transition: {
77
+ default: {
78
+ duration: 0.2,
79
+ },
80
+ },
81
+ typography: {
82
+ size: {
83
+ '12': {
84
+ fontSize: 12,
85
+ lineHeight: 20,
86
+ },
87
+ '14': {
88
+ fontSize: 14,
89
+ lineHeight: 22,
90
+ },
91
+ '16': {
92
+ fontSize: 16,
93
+ lineHeight: 24,
94
+ },
95
+ '20': {
96
+ fontSize: 20,
97
+ lineHeight: 28,
98
+ },
99
+ '32': {
100
+ fontSize: 32,
101
+ lineHeight: 40,
102
+ },
70
103
  },
71
104
  },
72
105
  } as const
73
106
 
74
107
  export const light: CharcoalTheme = {
75
108
  ...common,
76
- effect: {
77
- hover: {
78
- type: 'alpha',
79
- color: rgba('#000000', 0.04), // surface3
109
+ ...{
110
+ border: {
111
+ default: {
112
+ color: 'rgba(0,0,0,0.08)',
113
+ },
80
114
  },
81
- press: {
82
- type: 'alpha',
83
- color: rgba('#000000', 0.16), // surface10
115
+ color: {
116
+ assertive: '#ff2b00',
117
+ background1: '#ffffff',
118
+ background2: '#f5f5f5',
119
+ border: 'rgba(0,0,0,0.08)',
120
+ brand: '#0096fa',
121
+ icon6: 'rgba(255,255,255,0.28)',
122
+ link1: '#3d7699',
123
+ link2: 'rgba(255,255,255,0.36)',
124
+ success: '#b1cc29',
125
+ surface1: '#ffffff',
126
+ surface10: 'rgba(0,0,0,0.16)',
127
+ surface2: 'rgba(0,0,0,0.02)',
128
+ surface3: 'rgba(0,0,0,0.04)',
129
+ surface4: 'rgba(0,0,0,0.32)',
130
+ surface6: 'rgba(0,0,0,0.88)',
131
+ surface7: 'rgba(0,0,0,0.02)',
132
+ surface8: 'rgba(0,0,0,0.88)',
133
+ surface9: '#ffffff',
134
+ text1: '#1f1f1f',
135
+ text2: '#474747',
136
+ text3: '#858585',
137
+ text4: '#adadad',
138
+ text5: '#ffffff',
139
+ transparent: 'rgba(0,0,0,0)',
140
+ updatedItem: 'rgba(0,150,250,0.04)',
141
+ warning: '#ffaf0f',
84
142
  },
85
- },
86
- color: {
87
- // TODO: colors should be picked from foundation color palette
88
- transparent: rgba('#000000', 0),
89
- background1: '#ffffff',
90
- background2: '#f5f5f5',
91
- icon6: rgba('#ffffff', 0.28),
92
- link1: '#3d7699',
93
- link2: rgba('#ffffff', 0.36),
94
- surface1: '#ffffff',
95
- surface2: rgba('#000000', 0.02),
96
- surface3: rgba('#000000', 0.04),
97
- surface4: rgba('#000000', 0.32),
98
- surface6: rgba('#000000', 0.88),
99
- surface7: rgba('#000000', 0.02),
100
- surface8: rgba('#000000', 0.88),
101
- surface9: '#ffffff',
102
- surface10: rgba('#000000', 0.16),
103
- text1: '#1f1f1f',
104
- text2: '#474747',
105
- text3: '#858585',
106
- text4: '#adadad',
107
- text5: '#ffffff',
108
- brand,
109
- assertive,
110
- warning: '#ffaf0f',
111
- success: '#b1cc29',
112
- updatedItem: rgba(0, 150, 250, 0.04),
113
- border: borderForLight,
114
- },
115
- border: {
116
- default: {
117
- color: borderForLight,
143
+ effect: {
144
+ hover: {
145
+ color: 'rgba(0,0,0,0.04)',
146
+ type: 'alpha',
147
+ },
148
+ press: {
149
+ color: 'rgba(0,0,0,0.16)',
150
+ type: 'alpha',
151
+ },
118
152
  },
119
153
  },
120
154
  }
121
155
 
122
156
  export const dark: CharcoalTheme = {
123
157
  ...common,
124
- effect: {
125
- hover: {
126
- type: 'alpha',
127
- color: rgba('#ffffff', 0.12), // surface3
158
+ ...{
159
+ border: {
160
+ default: {
161
+ color: 'rgba(255,255,255,0.12)',
162
+ },
128
163
  },
129
- press: {
130
- type: 'alpha',
131
- color: rgba('#ffffff', 0.2), // surface10
164
+ color: {
165
+ assertive: '#ff2b00',
166
+ background1: '#1f1f1f',
167
+ background2: '#000000',
168
+ border: 'rgba(255,255,255,0.12)',
169
+ brand: '#0096fa',
170
+ icon6: 'rgba(255,255,255,0.28)',
171
+ link1: '#669FC2',
172
+ link2: 'rgba(255,255,255,0.36)',
173
+ success: '#b1cc29',
174
+ surface1: '#1f1f1f',
175
+ surface10: 'rgba(255,255,255,0.2)',
176
+ surface2: 'rgba(0,0,0,0.16)',
177
+ surface3: 'rgba(255,255,255,0.12)',
178
+ surface4: 'rgba(0,0,0,0.32)',
179
+ surface6: 'rgba(255,255,255,0.12)',
180
+ surface7: 'rgba(0,0,0,0)',
181
+ surface8: 'rgba(0,0,0,0.88)',
182
+ surface9: '#333333',
183
+ text1: '#f5f5f5',
184
+ text2: '#d6d6d6',
185
+ text3: '#858585',
186
+ text4: '#5c5c5c',
187
+ text5: '#f5f5f5',
188
+ transparent: 'rgba(0,0,0,0)',
189
+ updatedItem: 'rgba(0,150,250,0.12)',
190
+ warning: '#ffaf0f',
132
191
  },
133
- },
134
- color: {
135
- transparent: rgba('#000000', 0),
136
- background1: '#1f1f1f',
137
- background2: '#000000',
138
- icon6: light.color.icon6,
139
- link1: '#669FC2',
140
- link2: light.color.link2,
141
- surface1: '#1f1f1f',
142
- surface2: rgba('#000000', 0.16),
143
- surface3: rgba('#ffffff', 0.12),
144
- surface4: light.color.surface4,
145
- surface6: rgba('#ffffff', 0.12),
146
- surface7: rgba('#000000', 0),
147
- surface8: light.color.surface8,
148
- surface9: '#333333',
149
- surface10: rgba('#ffffff', 0.2),
150
- text1: '#f5f5f5',
151
- text2: '#d6d6d6',
152
- text3: '#858585',
153
- text4: '#5c5c5c',
154
- text5: '#f5f5f5',
155
- brand,
156
- assertive,
157
- warning: light.color.warning,
158
- success: light.color.success,
159
- updatedItem: rgba(0, 150, 250, 0.12),
160
- border: borderForDark,
161
- },
162
- border: {
163
- default: {
164
- color: borderForDark,
192
+ effect: {
193
+ hover: {
194
+ color: 'rgba(255,255,255,0.12)',
195
+ type: 'alpha',
196
+ },
197
+ press: {
198
+ color: 'rgba(255,255,255,0.2)',
199
+ type: 'alpha',
200
+ },
165
201
  },
166
202
  },
167
203
  }