@kaizen/design-tokens 10.8.4 → 10.8.5
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/cjs/js/tokens.cjs +186 -186
- package/dist/cjs/legacy/ThemeManager.cjs +2 -2
- package/dist/cjs/legacy/ThemeProvider.cjs +2 -1
- package/dist/cjs/legacy/makeCssVariableTheme.cjs +1 -1
- package/dist/cjs/legacy/mapLeafsOfObject.cjs +1 -1
- package/dist/cjs/legacy/themes/heart.cjs +1 -1
- package/dist/cjs/lib/addExtraThemeEntries.cjs +3 -3
- package/dist/cjs/lib/cssVariables.cjs +1 -1
- package/dist/cjs/lib/mapLeafsOfObject.cjs +1 -1
- package/dist/esm/js/tokens.mjs +186 -186
- package/dist/esm/legacy/ThemeManager.mjs +2 -2
- package/dist/esm/legacy/ThemeProvider.mjs +2 -1
- package/dist/esm/legacy/makeCssVariableTheme.mjs +1 -1
- package/dist/esm/legacy/mapLeafsOfObject.mjs +1 -1
- package/dist/esm/legacy/themes/heart.mjs +1 -1
- package/dist/esm/lib/addExtraThemeEntries.mjs +3 -3
- package/dist/esm/lib/cssVariables.mjs +1 -1
- package/dist/esm/lib/mapLeafsOfObject.mjs +1 -1
- package/dist/types/index.d.ts +7 -7
- package/dist/types/js/index.d.ts +1 -1
- package/dist/types/js/tokens.d.ts +1 -1
- package/dist/types/legacy/ThemeManager.d.ts +1 -1
- package/dist/types/legacy/ThemeProvider.d.ts +3 -3
- package/dist/types/legacy/makeCssVariableTheme.d.ts +1 -1
- package/dist/types/legacy/mapLeafsOfObject.d.ts +1 -1
- package/dist/types/legacy/themes/heart.d.ts +1 -1
- package/dist/types/legacy/themes/index.d.ts +1 -1
- package/dist/types/legacy/types.d.ts +72 -72
- package/dist/types/lib/makeCssVariableTheme.d.ts +1 -1
- package/dist/types/lib/mapLeafsOfObject.d.ts +1 -1
- package/dist/types/types.d.ts +72 -72
- package/less/animation.less +1 -4
- package/less/border.less +3 -16
- package/less/typography.less +94 -265
- package/package.json +4 -4
- package/sass/animation.scss +1 -4
- package/sass/border.scss +3 -16
- package/sass/typography.scss +94 -265
package/dist/cjs/js/tokens.cjs
CHANGED
|
@@ -3,299 +3,299 @@
|
|
|
3
3
|
var tokens = {
|
|
4
4
|
animation: {
|
|
5
5
|
easingFunction: {
|
|
6
|
-
easeInOut:
|
|
7
|
-
easeIn:
|
|
8
|
-
easeOut:
|
|
9
|
-
linear:
|
|
10
|
-
bounceIn:
|
|
11
|
-
bounceOut:
|
|
12
|
-
bounceInOut:
|
|
6
|
+
easeInOut: 'cubic-bezier(0.455, 0.03, 0.515, 0.955)',
|
|
7
|
+
easeIn: 'cubic-bezier(0.55, 0.085, 0.68, 0.53)',
|
|
8
|
+
easeOut: 'cubic-bezier(0.25, 0.46, 0.45, 0.94)',
|
|
9
|
+
linear: 'linear',
|
|
10
|
+
bounceIn: 'cubic-bezier(0.485, 0.155, 0.24, 1.245)',
|
|
11
|
+
bounceOut: 'cubic-bezier(0.485, 0.155, 0.515, 0.845)',
|
|
12
|
+
bounceInOut: 'cubic-bezier(0.76, -0.245, 0.24, 1.245)'
|
|
13
13
|
},
|
|
14
14
|
duration: {
|
|
15
|
-
instant:
|
|
16
|
-
immediate:
|
|
17
|
-
rapid:
|
|
18
|
-
fast:
|
|
19
|
-
slow:
|
|
20
|
-
deliberate:
|
|
15
|
+
instant: '0ms',
|
|
16
|
+
immediate: '100ms',
|
|
17
|
+
rapid: '200ms',
|
|
18
|
+
fast: '300ms',
|
|
19
|
+
slow: '400ms',
|
|
20
|
+
deliberate: '700ms'
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
23
|
border: {
|
|
24
24
|
solid: {
|
|
25
|
-
borderWidth:
|
|
26
|
-
borderRadius:
|
|
27
|
-
borderStyle:
|
|
28
|
-
borderColor:
|
|
25
|
+
borderWidth: '2px',
|
|
26
|
+
borderRadius: '7px',
|
|
27
|
+
borderStyle: 'solid',
|
|
28
|
+
borderColor: '#e1e2ea'
|
|
29
29
|
},
|
|
30
30
|
dashed: {
|
|
31
|
-
borderWidth:
|
|
32
|
-
borderRadius:
|
|
33
|
-
borderStyle:
|
|
31
|
+
borderWidth: '2px',
|
|
32
|
+
borderRadius: '7px',
|
|
33
|
+
borderStyle: 'dashed'
|
|
34
34
|
},
|
|
35
35
|
borderless: {
|
|
36
|
-
borderWidth:
|
|
37
|
-
borderRadius:
|
|
38
|
-
borderStyle:
|
|
39
|
-
borderColor:
|
|
36
|
+
borderWidth: '2px',
|
|
37
|
+
borderRadius: '7px',
|
|
38
|
+
borderStyle: 'solid',
|
|
39
|
+
borderColor: 'transparent'
|
|
40
40
|
},
|
|
41
41
|
focusRing: {
|
|
42
|
-
borderWidth:
|
|
43
|
-
borderRadius:
|
|
44
|
-
borderStyle:
|
|
42
|
+
borderWidth: '2px',
|
|
43
|
+
borderRadius: '10px',
|
|
44
|
+
borderStyle: 'solid'
|
|
45
45
|
},
|
|
46
46
|
width: {
|
|
47
|
-
1:
|
|
47
|
+
1: '1px'
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
50
|
color: {
|
|
51
51
|
purple: {
|
|
52
|
-
100:
|
|
53
|
-
200:
|
|
54
|
-
300:
|
|
55
|
-
400:
|
|
56
|
-
500:
|
|
57
|
-
600:
|
|
58
|
-
700:
|
|
59
|
-
800:
|
|
52
|
+
100: '#f4edf8',
|
|
53
|
+
200: '#dfc9ea',
|
|
54
|
+
300: '#c9a5dd',
|
|
55
|
+
400: '#ae67b1',
|
|
56
|
+
500: '#844587',
|
|
57
|
+
600: '#5f3361',
|
|
58
|
+
700: '#4a234d',
|
|
59
|
+
800: '#2f2438'
|
|
60
60
|
},
|
|
61
61
|
blue: {
|
|
62
|
-
100:
|
|
63
|
-
200:
|
|
64
|
-
300:
|
|
65
|
-
400:
|
|
66
|
-
500:
|
|
67
|
-
600:
|
|
68
|
-
700:
|
|
62
|
+
100: '#e6f6ff',
|
|
63
|
+
200: '#bde2f5',
|
|
64
|
+
300: '#73c0e8',
|
|
65
|
+
400: '#008bd6',
|
|
66
|
+
500: '#0168b3',
|
|
67
|
+
600: '#004970',
|
|
68
|
+
700: '#003157'
|
|
69
69
|
},
|
|
70
70
|
green: {
|
|
71
|
-
100:
|
|
72
|
-
200:
|
|
73
|
-
300:
|
|
74
|
-
400:
|
|
75
|
-
500:
|
|
76
|
-
600:
|
|
77
|
-
700:
|
|
71
|
+
100: '#e8f8f4',
|
|
72
|
+
200: '#c4ede2',
|
|
73
|
+
300: '#8fdbc7',
|
|
74
|
+
400: '#5dcaad',
|
|
75
|
+
500: '#3f9a86',
|
|
76
|
+
600: '#2c7d67',
|
|
77
|
+
700: '#22594a'
|
|
78
78
|
},
|
|
79
79
|
yellow: {
|
|
80
|
-
100:
|
|
81
|
-
200:
|
|
82
|
-
300:
|
|
83
|
-
400:
|
|
84
|
-
500:
|
|
85
|
-
600:
|
|
86
|
-
700:
|
|
80
|
+
100: '#fff9e4',
|
|
81
|
+
200: '#ffeeb3',
|
|
82
|
+
300: '#ffe36e',
|
|
83
|
+
400: '#ffca4d',
|
|
84
|
+
500: '#ffb600',
|
|
85
|
+
600: '#c68600',
|
|
86
|
+
700: '#876400'
|
|
87
87
|
},
|
|
88
88
|
red: {
|
|
89
|
-
100:
|
|
90
|
-
200:
|
|
91
|
-
300:
|
|
92
|
-
400:
|
|
93
|
-
500:
|
|
94
|
-
600:
|
|
95
|
-
700:
|
|
89
|
+
100: '#fdeaee',
|
|
90
|
+
200: '#f9c2cb',
|
|
91
|
+
300: '#f597a8',
|
|
92
|
+
400: '#e0707d',
|
|
93
|
+
500: '#c93b55',
|
|
94
|
+
600: '#a82433',
|
|
95
|
+
700: '#6c1e20'
|
|
96
96
|
},
|
|
97
97
|
orange: {
|
|
98
|
-
100:
|
|
99
|
-
200:
|
|
100
|
-
300:
|
|
101
|
-
400:
|
|
102
|
-
500:
|
|
103
|
-
600:
|
|
104
|
-
700:
|
|
98
|
+
100: '#fff0e8',
|
|
99
|
+
200: '#ffd1b9',
|
|
100
|
+
300: '#ffb08a',
|
|
101
|
+
400: '#ff9461',
|
|
102
|
+
500: '#e96c2f',
|
|
103
|
+
600: '#b74302',
|
|
104
|
+
700: '#903c00'
|
|
105
105
|
},
|
|
106
106
|
gray: {
|
|
107
|
-
100:
|
|
108
|
-
200:
|
|
109
|
-
300:
|
|
110
|
-
400:
|
|
111
|
-
500:
|
|
112
|
-
600:
|
|
113
|
-
},
|
|
114
|
-
white:
|
|
115
|
-
black:
|
|
107
|
+
100: '#f9f9f9',
|
|
108
|
+
200: '#f4f4f5',
|
|
109
|
+
300: '#eaeaec',
|
|
110
|
+
400: '#cdcdd0',
|
|
111
|
+
500: '#878792',
|
|
112
|
+
600: '#524e56'
|
|
113
|
+
},
|
|
114
|
+
white: '#ffffff',
|
|
115
|
+
black: '#000000'
|
|
116
116
|
},
|
|
117
117
|
dataViz: {
|
|
118
|
-
favorable:
|
|
119
|
-
unfavorable:
|
|
118
|
+
favorable: '#7dd5bd',
|
|
119
|
+
unfavorable: '#e68d97'
|
|
120
120
|
},
|
|
121
121
|
layout: {
|
|
122
|
-
contentMaxWidth:
|
|
123
|
-
contentMaxWidthWithSidebar:
|
|
124
|
-
contentSideMargin:
|
|
125
|
-
mobileActionsDrawerHeight:
|
|
126
|
-
navigationBarHeight:
|
|
122
|
+
contentMaxWidth: '1392px',
|
|
123
|
+
contentMaxWidthWithSidebar: '1080px',
|
|
124
|
+
contentSideMargin: '72px',
|
|
125
|
+
mobileActionsDrawerHeight: '60px',
|
|
126
|
+
navigationBarHeight: '72px',
|
|
127
127
|
breakpoints: {
|
|
128
|
-
medium:
|
|
129
|
-
large:
|
|
128
|
+
medium: '768px',
|
|
129
|
+
large: '1080px'
|
|
130
130
|
}
|
|
131
131
|
},
|
|
132
132
|
shadow: {
|
|
133
133
|
small: {
|
|
134
|
-
boxShadow:
|
|
134
|
+
boxShadow: '0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 3px 16px 0 rgba(0, 0, 0, 0.06)'
|
|
135
135
|
},
|
|
136
136
|
large: {
|
|
137
|
-
boxShadow:
|
|
137
|
+
boxShadow: '0 3px 9px 0 rgba(0, 0, 0, 0.1), 0 8px 40px 0 rgba(0, 0, 0, 0.08)'
|
|
138
138
|
}
|
|
139
139
|
},
|
|
140
140
|
spacing: {
|
|
141
|
-
xs:
|
|
142
|
-
sm:
|
|
143
|
-
md:
|
|
144
|
-
lg:
|
|
145
|
-
xl:
|
|
146
|
-
xxl:
|
|
147
|
-
xxxl:
|
|
148
|
-
xxxxl:
|
|
149
|
-
xxxxxl:
|
|
150
|
-
0:
|
|
151
|
-
1:
|
|
152
|
-
2:
|
|
153
|
-
4:
|
|
154
|
-
6:
|
|
155
|
-
8:
|
|
156
|
-
12:
|
|
157
|
-
16:
|
|
158
|
-
20:
|
|
159
|
-
24:
|
|
160
|
-
32:
|
|
161
|
-
40:
|
|
162
|
-
48:
|
|
163
|
-
56:
|
|
164
|
-
64:
|
|
165
|
-
72:
|
|
166
|
-
80:
|
|
167
|
-
96:
|
|
168
|
-
112:
|
|
169
|
-
128:
|
|
170
|
-
160:
|
|
171
|
-
200:
|
|
172
|
-
240:
|
|
173
|
-
280:
|
|
174
|
-
320:
|
|
141
|
+
xs: '0.375rem',
|
|
142
|
+
sm: '0.75rem',
|
|
143
|
+
md: '1.5rem',
|
|
144
|
+
lg: '2.25rem',
|
|
145
|
+
xl: '3rem',
|
|
146
|
+
xxl: '3.75rem',
|
|
147
|
+
xxxl: '4.5rem',
|
|
148
|
+
xxxxl: '5.25rem',
|
|
149
|
+
xxxxxl: '6rem',
|
|
150
|
+
0: '0',
|
|
151
|
+
1: '.0625rem',
|
|
152
|
+
2: '.125rem',
|
|
153
|
+
4: '.25rem',
|
|
154
|
+
6: '.375rem',
|
|
155
|
+
8: '.5rem',
|
|
156
|
+
12: '.75rem',
|
|
157
|
+
16: '1rem',
|
|
158
|
+
20: '1.25rem',
|
|
159
|
+
24: '1.5rem',
|
|
160
|
+
32: '2rem',
|
|
161
|
+
40: '2.5rem',
|
|
162
|
+
48: '3rem',
|
|
163
|
+
56: '3.5rem',
|
|
164
|
+
64: '4rem',
|
|
165
|
+
72: '4.5rem',
|
|
166
|
+
80: '5rem',
|
|
167
|
+
96: '6rem',
|
|
168
|
+
112: '7rem',
|
|
169
|
+
128: '8rem',
|
|
170
|
+
160: '10rem',
|
|
171
|
+
200: '12.5rem',
|
|
172
|
+
240: '15rem',
|
|
173
|
+
280: '17.5rem',
|
|
174
|
+
320: '20rem'
|
|
175
175
|
},
|
|
176
176
|
typography: {
|
|
177
177
|
dataLarge: {
|
|
178
178
|
fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
|
|
179
179
|
fontWeight: 700,
|
|
180
|
-
fontSize:
|
|
181
|
-
lineHeight:
|
|
182
|
-
letterSpacing:
|
|
180
|
+
fontSize: '5.25rem',
|
|
181
|
+
lineHeight: '5.25rem',
|
|
182
|
+
letterSpacing: 'normal'
|
|
183
183
|
},
|
|
184
184
|
dataLargeUnits: {
|
|
185
185
|
fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
|
|
186
186
|
fontWeight: 700,
|
|
187
|
-
fontSize:
|
|
188
|
-
lineHeight:
|
|
189
|
-
letterSpacing:
|
|
187
|
+
fontSize: '2.625rem',
|
|
188
|
+
lineHeight: '5.25rem',
|
|
189
|
+
letterSpacing: 'normal'
|
|
190
190
|
},
|
|
191
191
|
dataMedium: {
|
|
192
192
|
fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
|
|
193
193
|
fontWeight: 700,
|
|
194
|
-
fontSize:
|
|
195
|
-
lineHeight:
|
|
196
|
-
letterSpacing:
|
|
194
|
+
fontSize: '3rem',
|
|
195
|
+
lineHeight: '5rem',
|
|
196
|
+
letterSpacing: 'normal'
|
|
197
197
|
},
|
|
198
198
|
dataMediumUnits: {
|
|
199
199
|
fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
|
|
200
200
|
fontWeight: 700,
|
|
201
|
-
fontSize:
|
|
202
|
-
lineHeight:
|
|
203
|
-
letterSpacing:
|
|
201
|
+
fontSize: '1.5rem',
|
|
202
|
+
lineHeight: '5rem',
|
|
203
|
+
letterSpacing: 'normal'
|
|
204
204
|
},
|
|
205
205
|
dataSmall: {
|
|
206
206
|
fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
|
|
207
207
|
fontWeight: 700,
|
|
208
|
-
fontSize:
|
|
209
|
-
lineHeight:
|
|
210
|
-
letterSpacing:
|
|
208
|
+
fontSize: '1.5rem',
|
|
209
|
+
lineHeight: '1.5rem',
|
|
210
|
+
letterSpacing: 'normal'
|
|
211
211
|
},
|
|
212
212
|
dataSmallUnits: {
|
|
213
213
|
fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
|
|
214
214
|
fontWeight: 700,
|
|
215
|
-
fontSize:
|
|
216
|
-
lineHeight:
|
|
217
|
-
letterSpacing:
|
|
215
|
+
fontSize: '1.125rem',
|
|
216
|
+
lineHeight: '1.5rem',
|
|
217
|
+
letterSpacing: 'normal'
|
|
218
218
|
},
|
|
219
219
|
display0: {
|
|
220
220
|
fontFamily: '"Tiempos Headline", Georgia, serif',
|
|
221
221
|
fontWeight: 800,
|
|
222
|
-
fontSize:
|
|
223
|
-
lineHeight:
|
|
224
|
-
letterSpacing:
|
|
222
|
+
fontSize: '4.5rem',
|
|
223
|
+
lineHeight: '5.25rem',
|
|
224
|
+
letterSpacing: '0em'
|
|
225
225
|
},
|
|
226
226
|
heading1: {
|
|
227
227
|
fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
|
|
228
228
|
fontWeight: 500,
|
|
229
|
-
fontSize:
|
|
230
|
-
lineHeight:
|
|
231
|
-
letterSpacing:
|
|
229
|
+
fontSize: '2.125rem',
|
|
230
|
+
lineHeight: '2.625rem',
|
|
231
|
+
letterSpacing: 'normal'
|
|
232
232
|
},
|
|
233
233
|
heading2: {
|
|
234
234
|
fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
|
|
235
235
|
fontWeight: 600,
|
|
236
|
-
fontSize:
|
|
237
|
-
lineHeight:
|
|
238
|
-
letterSpacing:
|
|
236
|
+
fontSize: '1.75rem',
|
|
237
|
+
lineHeight: '2.25rem',
|
|
238
|
+
letterSpacing: 'normal'
|
|
239
239
|
},
|
|
240
240
|
heading3: {
|
|
241
241
|
fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
|
|
242
242
|
fontWeight: 600,
|
|
243
|
-
fontSize:
|
|
244
|
-
lineHeight:
|
|
245
|
-
letterSpacing:
|
|
243
|
+
fontSize: '1.375rem',
|
|
244
|
+
lineHeight: '1.875rem',
|
|
245
|
+
letterSpacing: 'normal'
|
|
246
246
|
},
|
|
247
247
|
heading4: {
|
|
248
248
|
fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
|
|
249
249
|
fontWeight: 600,
|
|
250
|
-
fontSize:
|
|
251
|
-
lineHeight:
|
|
252
|
-
letterSpacing:
|
|
250
|
+
fontSize: '1.125rem',
|
|
251
|
+
lineHeight: '1.5rem',
|
|
252
|
+
letterSpacing: 'normal'
|
|
253
253
|
},
|
|
254
254
|
heading5: {
|
|
255
255
|
fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
|
|
256
256
|
fontWeight: 600,
|
|
257
|
-
fontSize:
|
|
258
|
-
lineHeight:
|
|
259
|
-
letterSpacing:
|
|
257
|
+
fontSize: '1rem',
|
|
258
|
+
lineHeight: '1.5rem',
|
|
259
|
+
letterSpacing: 'normal'
|
|
260
260
|
},
|
|
261
261
|
heading6: {
|
|
262
262
|
fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
|
|
263
263
|
fontWeight: 600,
|
|
264
|
-
fontSize:
|
|
265
|
-
lineHeight:
|
|
266
|
-
letterSpacing:
|
|
264
|
+
fontSize: '0.875rem',
|
|
265
|
+
lineHeight: '1.5rem',
|
|
266
|
+
letterSpacing: 'normal'
|
|
267
267
|
},
|
|
268
268
|
paragraphIntroLede: {
|
|
269
269
|
fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
|
|
270
270
|
fontWeight: 400,
|
|
271
|
-
fontSize:
|
|
272
|
-
lineHeight:
|
|
273
|
-
letterSpacing:
|
|
274
|
-
maxWidth:
|
|
271
|
+
fontSize: '1.25rem',
|
|
272
|
+
lineHeight: '1.875rem',
|
|
273
|
+
letterSpacing: '0',
|
|
274
|
+
maxWidth: '975px'
|
|
275
275
|
},
|
|
276
276
|
paragraphBody: {
|
|
277
277
|
fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
|
|
278
278
|
fontWeight: 400,
|
|
279
|
-
fontSize:
|
|
280
|
-
lineHeight:
|
|
281
|
-
letterSpacing:
|
|
282
|
-
maxWidth:
|
|
279
|
+
fontSize: '1rem',
|
|
280
|
+
lineHeight: '1.5rem',
|
|
281
|
+
letterSpacing: 'normal',
|
|
282
|
+
maxWidth: '780px'
|
|
283
283
|
},
|
|
284
284
|
paragraphSmall: {
|
|
285
285
|
fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
|
|
286
286
|
fontWeight: 400,
|
|
287
|
-
fontSize:
|
|
288
|
-
lineHeight:
|
|
289
|
-
letterSpacing:
|
|
290
|
-
maxWidth:
|
|
287
|
+
fontSize: '0.875rem',
|
|
288
|
+
lineHeight: '1.125rem',
|
|
289
|
+
letterSpacing: 'normal',
|
|
290
|
+
maxWidth: '680px'
|
|
291
291
|
},
|
|
292
292
|
paragraphExtraSmall: {
|
|
293
293
|
fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
|
|
294
294
|
fontWeight: 400,
|
|
295
|
-
fontSize:
|
|
296
|
-
lineHeight:
|
|
297
|
-
letterSpacing:
|
|
298
|
-
maxWidth:
|
|
295
|
+
fontSize: '0.75rem',
|
|
296
|
+
lineHeight: '1.125rem',
|
|
297
|
+
letterSpacing: 'normal',
|
|
298
|
+
maxWidth: '600px'
|
|
299
299
|
},
|
|
300
300
|
paragraphBold: {
|
|
301
301
|
fontWeight: 600
|
|
@@ -303,16 +303,16 @@ var tokens = {
|
|
|
303
303
|
buttonPrimary: {
|
|
304
304
|
fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
|
|
305
305
|
fontWeight: 500,
|
|
306
|
-
fontSize:
|
|
307
|
-
lineHeight:
|
|
308
|
-
letterSpacing:
|
|
306
|
+
fontSize: '1.125rem',
|
|
307
|
+
lineHeight: '1.5rem',
|
|
308
|
+
letterSpacing: 'normal'
|
|
309
309
|
},
|
|
310
310
|
buttonSecondary: {
|
|
311
311
|
fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
|
|
312
312
|
fontWeight: 500,
|
|
313
|
-
fontSize:
|
|
314
|
-
lineHeight:
|
|
315
|
-
letterSpacing:
|
|
313
|
+
fontSize: '1rem',
|
|
314
|
+
lineHeight: '1.5rem',
|
|
315
|
+
letterSpacing: 'normal'
|
|
316
316
|
}
|
|
317
317
|
}
|
|
318
318
|
};
|
|
@@ -18,7 +18,7 @@ var ThemeManager = /** @class */function () {
|
|
|
18
18
|
function ThemeManager(theme, rootElementId, /* This allows you to stop the class from applying the theme automatically during construction. Defaults to true */
|
|
19
19
|
apply) {
|
|
20
20
|
if (rootElementId === void 0) {
|
|
21
|
-
rootElementId =
|
|
21
|
+
rootElementId = '';
|
|
22
22
|
}
|
|
23
23
|
if (apply === void 0) {
|
|
24
24
|
apply = true;
|
|
@@ -59,7 +59,7 @@ var ThemeManager = /** @class */function () {
|
|
|
59
59
|
};
|
|
60
60
|
this.applyCurrentTheme = function () {
|
|
61
61
|
var _a;
|
|
62
|
-
if (typeof window !==
|
|
62
|
+
if (typeof window !== 'undefined') {
|
|
63
63
|
_this.setRootElement((_a = document.getElementById(_this.rootElementId)) !== null && _a !== void 0 ? _a : document.documentElement);
|
|
64
64
|
var cssVariableDefinitions = makeCssVariableDefinitionsMap.makeCssVariableDefinitionsMap(_this.theme);
|
|
65
65
|
Object.entries(cssVariableDefinitions).forEach(function (_a) {
|
|
@@ -24,7 +24,7 @@ var ThemeProvider = function (_a) {
|
|
|
24
24
|
var themeManager = _a.themeManager,
|
|
25
25
|
props = tslib.__rest(_a, ["themeManager"]);
|
|
26
26
|
var themeManagerInstance = React.useState(function () {
|
|
27
|
-
return themeManager
|
|
27
|
+
return themeManager !== null && themeManager !== void 0 ? themeManager : new ThemeManager.ThemeManager(index.defaultTheme);
|
|
28
28
|
})[0];
|
|
29
29
|
var _b = React__default.default.useState(themeManagerInstance.getCurrentTheme()),
|
|
30
30
|
theme = _b[0],
|
|
@@ -39,6 +39,7 @@ var ThemeProvider = function (_a) {
|
|
|
39
39
|
cancelled = true;
|
|
40
40
|
themeManagerInstance.removeThemeChangeListener(listener);
|
|
41
41
|
};
|
|
42
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
42
43
|
}, []);
|
|
43
44
|
return React__default.default.createElement(React__default.default.Fragment, null, React__default.default.createElement(ThemeContext.Provider, {
|
|
44
45
|
value: theme
|
|
@@ -51,7 +51,7 @@ function makeCSSVariableTheme(theme, printValue) {
|
|
|
51
51
|
return child[segment] || (child[segment] = {});
|
|
52
52
|
}, augmentedTheme);
|
|
53
53
|
if (!leafKey) {
|
|
54
|
-
throw new Error(
|
|
54
|
+
throw new Error('leafKey is undefined');
|
|
55
55
|
}
|
|
56
56
|
var cssVariablesOfToken = addExtraThemeEntries.addExtraThemeEntries(leafPath, leafKey, value, printValue, {
|
|
57
57
|
augmentWithId: true
|
|
@@ -29,7 +29,7 @@ function mapLeafsOfObject(object, mapper) {
|
|
|
29
29
|
var recurser = function (currentPath, obj) {
|
|
30
30
|
var handleEntry = function (key, value) {
|
|
31
31
|
var pathToKey = tslib.__spreadArray(tslib.__spreadArray([], currentPath, true), [key], false);
|
|
32
|
-
if (typeof value ===
|
|
32
|
+
if (typeof value === 'object' && value !== null && value !== undefined) {
|
|
33
33
|
return recurser(pathToKey, value);
|
|
34
34
|
}
|
|
35
35
|
return mapper(pathToKey, value);
|
|
@@ -9,6 +9,6 @@ var tokens = require('../../js/tokens.cjs');
|
|
|
9
9
|
* - If you require direct usage of these tokens in js you can `import { tokens } from "@kaizen/design-tokens/js"`
|
|
10
10
|
*/
|
|
11
11
|
var heartTheme = tslib.__assign({
|
|
12
|
-
themeKey:
|
|
12
|
+
themeKey: 'heart'
|
|
13
13
|
}, tokens.tokens);
|
|
14
14
|
exports.heartTheme = heartTheme;
|
|
@@ -31,14 +31,14 @@ var colorString__default = /*#__PURE__*/_interopDefault(colorString);
|
|
|
31
31
|
var addExtraThemeEntries = function (path, key, value, printValue, _a) {
|
|
32
32
|
var _b;
|
|
33
33
|
var augmentWithId = _a.augmentWithId;
|
|
34
|
-
var colorRgb = typeof value ===
|
|
34
|
+
var colorRgb = typeof value === 'string' ? colorString__default.default.get.rgb(value) : null;
|
|
35
35
|
var result = (_b = {}, _b[key] = printValue(path, value), _b);
|
|
36
36
|
// Add the -rgb key containing the RGB triple of the color (if it is a color)
|
|
37
37
|
if (colorRgb) {
|
|
38
38
|
// If the value is a color, always convert to lowercase
|
|
39
39
|
result[key] = printValue(path, value).toLowerCase();
|
|
40
|
-
var rgbPath = tslib.__spreadArray(tslib.__spreadArray([], path, true), [
|
|
41
|
-
var rgbTriple = printValue(rgbPath, colorRgb.slice(0, 3).join(
|
|
40
|
+
var rgbPath = tslib.__spreadArray(tslib.__spreadArray([], path, true), ['rgb'], false);
|
|
41
|
+
var rgbTriple = printValue(rgbPath, colorRgb.slice(0, 3).join(', '));
|
|
42
42
|
result["".concat(key, "-rgb")] = rgbTriple;
|
|
43
43
|
if (augmentWithId) {
|
|
44
44
|
result["".concat(key, "-rgb-id")] = cssVariables.objectPathToCssVarIdentifier(rgbPath);
|
|
@@ -32,7 +32,7 @@ var objectPathToCssVarFunction = function (path, value) {
|
|
|
32
32
|
* Output: "--color-wisteria-100"
|
|
33
33
|
*/
|
|
34
34
|
var objectPathToCssVarIdentifier = function (path) {
|
|
35
|
-
return "--".concat(path.map(kebab__default.default).join(
|
|
35
|
+
return "--".concat(path.map(kebab__default.default).join('-'));
|
|
36
36
|
};
|
|
37
37
|
exports.objectPathToCssVarFunction = objectPathToCssVarFunction;
|
|
38
38
|
exports.objectPathToCssVarIdentifier = objectPathToCssVarIdentifier;
|
|
@@ -26,7 +26,7 @@ function mapLeafsOfObject(object, mapper) {
|
|
|
26
26
|
var recurser = function (currentPath, obj) {
|
|
27
27
|
var handleEntry = function (key, value) {
|
|
28
28
|
var pathToKey = tslib.__spreadArray(tslib.__spreadArray([], currentPath, true), [key], false);
|
|
29
|
-
if (typeof value ===
|
|
29
|
+
if (typeof value === 'object' && value !== null && value !== undefined) {
|
|
30
30
|
return recurser(pathToKey, value);
|
|
31
31
|
}
|
|
32
32
|
return mapper(pathToKey, value);
|