/
g100.js
345 lines (305 loc) · 8.32 KB
/
g100.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
/**
* Copyright IBM Corp. 2018, 2023
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
import {
// Blue
blue40,
blue60,
blue70,
blue80,
blue100,
// Gray
gray10,
gray10Hover,
gray20,
gray30,
gray30Hover,
gray40,
gray50,
gray60,
gray60Hover,
gray70,
gray70Hover,
gray80,
gray80Hover,
gray90,
gray90Hover,
gray100,
// Support
blue30,
blue50,
green40,
green50,
yellow30,
orange40,
red40,
red50,
red60,
purple40,
purple50,
// Constants
white,
black,
// Tools
rgba,
} from '@carbon/colors';
import { adjustLightness, adjustAlpha } from './tools';
// Background
export const background = gray100;
export const backgroundInverse = gray10;
export const backgroundBrand = blue60;
export const backgroundActive = adjustAlpha(gray50, 0.4);
export const backgroundHover = adjustAlpha(gray50, 0.16);
export const backgroundInverseHover = gray10Hover;
export const backgroundSelected = adjustAlpha(gray50, 0.24);
export const backgroundSelectedHover = adjustAlpha(gray50, 0.32);
// Layer
// layer-01
export const layer01 = gray90;
export const layerActive01 = gray70;
export const layerHover01 = gray90Hover;
export const layerSelected01 = gray80;
export const layerSelectedHover01 = gray80Hover;
// layer-02
export const layer02 = gray80;
export const layerActive02 = gray60;
export const layerHover02 = gray80Hover;
export const layerSelected02 = gray70;
export const layerSelectedHover02 = gray70Hover;
// layer-03
export const layer03 = gray70;
export const layerActive03 = gray50;
export const layerHover03 = gray70Hover;
export const layerSelected03 = gray60;
export const layerSelectedHover03 = gray60Hover;
// layer
export const layerSelectedInverse = gray10;
export const layerSelectedDisabled = gray40;
// layer-accent-01
export const layerAccent01 = gray80;
export const layerAccentActive01 = gray60;
export const layerAccentHover01 = gray80Hover;
// layer-accent-02
export const layerAccent02 = gray70;
export const layerAccentActive02 = gray50;
export const layerAccentHover02 = gray70Hover;
// layer-accent-03
export const layerAccent03 = gray60;
export const layerAccentActive03 = gray80;
export const layerAccentHover03 = gray60Hover;
// Field
// field-01
export const field01 = gray90;
export const fieldHover01 = gray90Hover;
// field-02
export const field02 = gray80;
export const fieldHover02 = gray80Hover;
// field-03
export const field03 = gray70;
export const fieldHover03 = gray70Hover;
// Border
// border-subtle-00
export const borderSubtle00 = gray80;
// border-subtle-01
export const borderSubtle01 = gray70;
export const borderSubtleSelected01 = gray60;
// border-subtle-02
export const borderSubtle02 = gray60;
export const borderSubtleSelected02 = gray50;
// border-subtle-03
export const borderSubtle03 = gray60;
export const borderSubtleSelected03 = gray50;
// border-strong
export const borderStrong01 = gray60;
export const borderStrong02 = gray50;
export const borderStrong03 = gray40;
// border-tile
export const borderTile01 = gray70;
export const borderTile02 = gray60;
export const borderTile03 = gray50;
// border-inverse
export const borderInverse = gray10;
// border-interactive
export const borderInteractive = blue50;
// border
export const borderDisabled = adjustAlpha(gray50, 0.5);
// Text
export const textPrimary = gray10;
export const textSecondary = gray30;
export const textPlaceholder = adjustAlpha(textPrimary, 0.4);
export const textHelper = gray40;
export const textError = red40;
export const textInverse = gray100;
export const textOnColor = white;
export const textOnColorDisabled = adjustAlpha(textOnColor, 0.25);
export const textDisabled = adjustAlpha(textPrimary, 0.25);
// Link
export const linkPrimary = blue40;
export const linkPrimaryHover = blue30;
export const linkSecondary = blue30;
export const linkInverse = blue60;
export const linkVisited = purple40;
export const linkInverseActive = gray100;
export const linkInverseHover = blue70;
// Icon
export const iconPrimary = gray10;
export const iconSecondary = gray30;
export const iconInverse = gray100;
export const iconOnColor = white;
export const iconOnColorDisabled = adjustAlpha(iconOnColor, 0.25);
export const iconDisabled = adjustAlpha(iconPrimary, 0.25);
export const iconInteractive = white;
// Support
export const supportError = red50;
export const supportSuccess = green40;
export const supportWarning = yellow30;
export const supportInfo = blue50;
export const supportErrorInverse = red60;
export const supportSuccessInverse = green50;
export const supportWarningInverse = yellow30;
export const supportInfoInverse = blue70;
export const supportCautionMinor = yellow30;
export const supportCautionMajor = orange40;
export const supportCautionUndefined = purple50;
// Focus
export const focus = white;
export const focusInset = gray100;
export const focusInverse = blue60;
// Skeleton
export const skeletonBackground = adjustLightness(background, 7);
export const skeletonElement = gray80;
// Misc
export const interactive = blue50;
export const highlight = blue80;
export const overlay = rgba(black, 0.65);
export const toggleOff = gray60;
export const shadow = rgba(black, 0.8);
//// AI - Experimental (Use at your own risk)
// Slug tokens
export const slugBackground = gray30;
export const slugGradient = `${gray50} linear-gradient(135deg, ${gray10} 0%, rgba(${white}, 0) 100%)`;
export const slugBackgroundHover = gray20;
export const slugGradientHover = `${gray40} linear-gradient(135deg, ${white} 0%, rgba(${white}, 0) 100%)`;
export const slugHollowHover = gray30Hover;
//// Phase 2 - new \\\\
// Shared
export const aiInnerShadow = rgba(blue50, 0.2);
export const aiAuraStartTable = rgba(blue50, 0.15);
export const aiAuraStart = rgba(blue50, 0.1);
export const aiAuraEnd = rgba(black, 0);
export const aiBorderStrong = blue40;
export const aiBorderStart = blue50;
export const aiBorderEnd = rgba(blue30, 0.24);
export const aiDropShadow = rgba(blue60, 0.32);
export const aiAuraHoverBackground = layerHover01;
export const aiAuraHoverStart = rgba(blue50, 0.4);
export const aiAuraHoverEnd = rgba(black, 0);
// AI Popover
export const aiPopoverShadowOuter01 = rgba(blue80, 0.25);
export const aiPopoverShadowOuter02 = rgba(black, 0.65);
// AI skeleton
export const aiSkeletonBackground = blue30;
export const aiSkeletonElementBackground = blue80;
// AI Modal tokens
export const aiOverlay = rgba(blue100, 0.5);
// One off tokens for caret
export const aiPopoverCaretCenter = '#3F68AF';
export const aiPopoverCaretBottom = '#3D4655';
export const aiPopoverCaretBottomBackgroundActions = '#192436';
export const aiPopoverCaretBottomBackground = '#213250';
// Chat tokens
export const chatPromptBackground = gray100;
export const chatPromptBorderStart = gray90;
export const chatPromptBorderEnd = rgba(gray90, 0);
export const chatBubbleUser = gray80;
export const chatBubbleAgent = gray90;
export const chatBubbleAgentBorder = gray70;
export const chatAvatarBot = gray50;
export const chatAvatarAgent = gray30;
export const chatAvatarUser = blue50;
export const chatShellBackground = gray90;
export const chatHeaderBackground = gray90;
export {
// Type
caption01,
caption02,
label01,
label02,
helperText01,
helperText02,
bodyShort01,
bodyLong01,
bodyShort02,
bodyLong02,
code01,
code02,
heading01,
productiveHeading01,
heading02,
productiveHeading02,
productiveHeading03,
productiveHeading04,
productiveHeading05,
productiveHeading06,
productiveHeading07,
expressiveHeading01,
expressiveHeading02,
expressiveHeading03,
expressiveHeading04,
expressiveHeading05,
expressiveHeading06,
expressiveParagraph01,
quotation01,
quotation02,
display01,
display02,
display03,
display04,
// Layout
// Spacing
spacing01,
spacing02,
spacing03,
spacing04,
spacing05,
spacing06,
spacing07,
spacing08,
spacing09,
spacing10,
spacing11,
spacing12,
spacing13,
// Fluid spacing
fluidSpacing01,
fluidSpacing02,
fluidSpacing03,
fluidSpacing04,
// Containers
container01,
container02,
container03,
container04,
container05,
sizeXSmall,
sizeSmall,
sizeMedium,
sizeLarge,
sizeXLarge,
size2XLarge,
// Icon sizes
iconSize01,
iconSize02,
// Layout
// Deprecated ☠️
layout01,
layout02,
layout03,
layout04,
layout05,
layout06,
layout07,
} from './white';