@gitlab/ui 64.16.0 → 64.18.0
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/CHANGELOG.md +14 -0
- package/dist/components/charts/discrete_scatter/discrete_scatter.js +2 -3
- package/dist/components/charts/heatmap/heatmap.js +4 -6
- package/dist/components/charts/legend/legend.js +2 -3
- package/dist/components/charts/line/line.js +2 -3
- package/dist/tokens/css/tokens.css +142 -0
- package/dist/tokens/css/tokens.dark.css +76 -0
- package/dist/tokens/js/tokens.dark.js +74 -0
- package/dist/tokens/js/tokens.js +140 -0
- package/dist/tokens/json/tokens.dark.grouped.json +139 -0
- package/dist/tokens/json/tokens.dark.json +2527 -0
- package/dist/tokens/json/tokens.grouped.json +139 -0
- package/dist/tokens/json/tokens.json +2527 -0
- package/dist/tokens/scss/_tokens.dark.scss +73 -0
- package/dist/tokens/scss/_tokens.scss +139 -0
- package/dist/utility_classes.css +1 -1
- package/dist/utility_classes.css.map +1 -1
- package/dist/utils/charts/config.js +3 -4
- package/dist/utils/charts/mock_data.js +3 -4
- package/dist/utils/charts/theme.js +25 -89
- package/package.json +8 -6
- package/src/components/charts/area/area.stories.js +3 -3
- package/src/components/charts/discrete_scatter/discrete_scatter.vue +2 -2
- package/src/components/charts/heatmap/heatmap.vue +4 -4
- package/src/components/charts/legend/legend.stories.js +2 -2
- package/src/components/charts/legend/legend.vue +2 -2
- package/src/components/charts/line/line.vue +2 -2
- package/src/scss/utilities.scss +8 -0
- package/src/scss/utility-mixins/border.scss +4 -0
- package/src/tokens/color.dark.tokens.json +359 -0
- package/src/tokens/color.tokens.json +709 -0
- package/src/utils/charts/config.js +3 -3
- package/src/utils/charts/mock_data.js +3 -3
- package/src/utils/charts/theme.js +152 -153
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import castArray from 'lodash/castArray';
|
|
2
2
|
import merge from 'lodash/merge';
|
|
3
|
-
import {
|
|
3
|
+
import { BLUE_500 } from '../../../dist/tokens/js/tokens';
|
|
4
4
|
import { GlBreakpointInstance } from '../breakpoints';
|
|
5
5
|
import { columnOptions } from '../constants';
|
|
6
6
|
import { areDatesEqual } from '../datetime_utility';
|
|
@@ -335,14 +335,14 @@ export const getAnnotationsConfig = (annotations) => {
|
|
|
335
335
|
return {
|
|
336
336
|
markLine: {
|
|
337
337
|
lineStyle: {
|
|
338
|
-
color:
|
|
338
|
+
color: BLUE_500,
|
|
339
339
|
},
|
|
340
340
|
silent: true,
|
|
341
341
|
data: lines,
|
|
342
342
|
},
|
|
343
343
|
markPoint: {
|
|
344
344
|
itemStyle: {
|
|
345
|
-
color:
|
|
345
|
+
color: BLUE_500,
|
|
346
346
|
},
|
|
347
347
|
symbol: arrowSymbol,
|
|
348
348
|
symbolSize: '8',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BLUE_500 } from '../../../dist/tokens/js/tokens';
|
|
2
2
|
import { hexToRgba } from '../utils';
|
|
3
3
|
import { colorFromDefaultPalette } from './theme';
|
|
4
4
|
|
|
@@ -74,7 +74,7 @@ export const mockAnnotationsSeries = {
|
|
|
74
74
|
data: [],
|
|
75
75
|
markLine: {
|
|
76
76
|
lineStyle: {
|
|
77
|
-
color:
|
|
77
|
+
color: BLUE_500,
|
|
78
78
|
},
|
|
79
79
|
data: [
|
|
80
80
|
{ xAxis: '2018-01-25T01:00:00.000Z' },
|
|
@@ -87,7 +87,7 @@ export const mockAnnotationsSeries = {
|
|
|
87
87
|
symbolSize: '8',
|
|
88
88
|
symbolOffset: [0, ' 60%'],
|
|
89
89
|
itemStyle: {
|
|
90
|
-
color:
|
|
90
|
+
color: BLUE_500,
|
|
91
91
|
},
|
|
92
92
|
data: [
|
|
93
93
|
{
|
|
@@ -1,87 +1,86 @@
|
|
|
1
|
+
import { glBorderRadiusBase } from '../../../scss_to_js/scss_variables';
|
|
1
2
|
import {
|
|
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
|
-
white,
|
|
68
|
-
} from '../../../scss_to_js/scss_variables';
|
|
3
|
+
WHITE,
|
|
4
|
+
GRAY_50,
|
|
5
|
+
GRAY_100,
|
|
6
|
+
GRAY_200,
|
|
7
|
+
GRAY_300,
|
|
8
|
+
GRAY_500,
|
|
9
|
+
GRAY_600,
|
|
10
|
+
GRAY_900,
|
|
11
|
+
RED_500,
|
|
12
|
+
DATA_VIZ_AQUA_50,
|
|
13
|
+
DATA_VIZ_AQUA_100,
|
|
14
|
+
DATA_VIZ_AQUA_200,
|
|
15
|
+
DATA_VIZ_AQUA_300,
|
|
16
|
+
DATA_VIZ_AQUA_400,
|
|
17
|
+
DATA_VIZ_AQUA_500,
|
|
18
|
+
DATA_VIZ_AQUA_600,
|
|
19
|
+
DATA_VIZ_AQUA_700,
|
|
20
|
+
DATA_VIZ_AQUA_800,
|
|
21
|
+
DATA_VIZ_AQUA_900,
|
|
22
|
+
DATA_VIZ_AQUA_950,
|
|
23
|
+
DATA_VIZ_BLUE_50,
|
|
24
|
+
DATA_VIZ_BLUE_100,
|
|
25
|
+
DATA_VIZ_BLUE_200,
|
|
26
|
+
DATA_VIZ_BLUE_300,
|
|
27
|
+
DATA_VIZ_BLUE_400,
|
|
28
|
+
DATA_VIZ_BLUE_500,
|
|
29
|
+
DATA_VIZ_BLUE_600,
|
|
30
|
+
DATA_VIZ_BLUE_700,
|
|
31
|
+
DATA_VIZ_BLUE_800,
|
|
32
|
+
DATA_VIZ_BLUE_900,
|
|
33
|
+
DATA_VIZ_BLUE_950,
|
|
34
|
+
DATA_VIZ_GREEN_50,
|
|
35
|
+
DATA_VIZ_GREEN_100,
|
|
36
|
+
DATA_VIZ_GREEN_200,
|
|
37
|
+
DATA_VIZ_GREEN_300,
|
|
38
|
+
DATA_VIZ_GREEN_400,
|
|
39
|
+
DATA_VIZ_GREEN_500,
|
|
40
|
+
DATA_VIZ_GREEN_600,
|
|
41
|
+
DATA_VIZ_GREEN_700,
|
|
42
|
+
DATA_VIZ_GREEN_800,
|
|
43
|
+
DATA_VIZ_GREEN_900,
|
|
44
|
+
DATA_VIZ_GREEN_950,
|
|
45
|
+
DATA_VIZ_MAGENTA_50,
|
|
46
|
+
DATA_VIZ_MAGENTA_100,
|
|
47
|
+
DATA_VIZ_MAGENTA_200,
|
|
48
|
+
DATA_VIZ_MAGENTA_300,
|
|
49
|
+
DATA_VIZ_MAGENTA_400,
|
|
50
|
+
DATA_VIZ_MAGENTA_500,
|
|
51
|
+
DATA_VIZ_MAGENTA_600,
|
|
52
|
+
DATA_VIZ_MAGENTA_700,
|
|
53
|
+
DATA_VIZ_MAGENTA_800,
|
|
54
|
+
DATA_VIZ_MAGENTA_900,
|
|
55
|
+
DATA_VIZ_MAGENTA_950,
|
|
56
|
+
DATA_VIZ_ORANGE_50,
|
|
57
|
+
DATA_VIZ_ORANGE_100,
|
|
58
|
+
DATA_VIZ_ORANGE_200,
|
|
59
|
+
DATA_VIZ_ORANGE_300,
|
|
60
|
+
DATA_VIZ_ORANGE_400,
|
|
61
|
+
DATA_VIZ_ORANGE_500,
|
|
62
|
+
DATA_VIZ_ORANGE_600,
|
|
63
|
+
DATA_VIZ_ORANGE_700,
|
|
64
|
+
DATA_VIZ_ORANGE_800,
|
|
65
|
+
DATA_VIZ_ORANGE_950,
|
|
66
|
+
DATA_VIZ_ORANGE_900,
|
|
67
|
+
} from '../../../dist/tokens/js/tokens';
|
|
69
68
|
import { scrollHandleSvgPath } from '../svgs/svg_paths';
|
|
70
69
|
import { hexToRgba } from '../utils';
|
|
71
70
|
|
|
72
71
|
export const themeName = 'gitlab';
|
|
73
72
|
|
|
74
73
|
export const heatmapHues = [
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
74
|
+
GRAY_100,
|
|
75
|
+
DATA_VIZ_BLUE_200,
|
|
76
|
+
DATA_VIZ_BLUE_400,
|
|
77
|
+
DATA_VIZ_BLUE_600,
|
|
78
|
+
DATA_VIZ_BLUE_800,
|
|
80
79
|
];
|
|
81
80
|
|
|
82
|
-
export const gaugeNeutralHues = [
|
|
83
|
-
export const gaugeSafeHues = [
|
|
84
|
-
export const gaugeWarningHue =
|
|
81
|
+
export const gaugeNeutralHues = [GRAY_900, GRAY_500];
|
|
82
|
+
export const gaugeSafeHues = [DATA_VIZ_BLUE_500, DATA_VIZ_BLUE_900];
|
|
83
|
+
export const gaugeWarningHue = DATA_VIZ_ORANGE_500;
|
|
85
84
|
|
|
86
85
|
/**
|
|
87
86
|
* The default palette is based on the Categorical data palette
|
|
@@ -90,71 +89,71 @@ export const gaugeWarningHue = dataVizOrange500;
|
|
|
90
89
|
* More info: https://design.gitlab.com/data-visualization/color#categorical-data
|
|
91
90
|
*/
|
|
92
91
|
export const colorPaletteDefault = [
|
|
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
|
-
|
|
92
|
+
DATA_VIZ_BLUE_500,
|
|
93
|
+
DATA_VIZ_ORANGE_600,
|
|
94
|
+
DATA_VIZ_AQUA_500,
|
|
95
|
+
DATA_VIZ_GREEN_600,
|
|
96
|
+
DATA_VIZ_MAGENTA_500,
|
|
97
|
+
DATA_VIZ_BLUE_700,
|
|
98
|
+
DATA_VIZ_ORANGE_800,
|
|
99
|
+
DATA_VIZ_AQUA_700,
|
|
100
|
+
DATA_VIZ_GREEN_800,
|
|
101
|
+
DATA_VIZ_MAGENTA_700,
|
|
102
|
+
DATA_VIZ_BLUE_900,
|
|
103
|
+
DATA_VIZ_ORANGE_950,
|
|
104
|
+
DATA_VIZ_AQUA_900,
|
|
105
|
+
DATA_VIZ_GREEN_950,
|
|
106
|
+
DATA_VIZ_MAGENTA_900,
|
|
107
|
+
DATA_VIZ_BLUE_600,
|
|
108
|
+
DATA_VIZ_ORANGE_700,
|
|
109
|
+
DATA_VIZ_AQUA_600,
|
|
110
|
+
DATA_VIZ_GREEN_700,
|
|
111
|
+
DATA_VIZ_MAGENTA_600,
|
|
112
|
+
DATA_VIZ_BLUE_800,
|
|
113
|
+
DATA_VIZ_ORANGE_900,
|
|
114
|
+
DATA_VIZ_AQUA_800,
|
|
115
|
+
DATA_VIZ_GREEN_900,
|
|
116
|
+
DATA_VIZ_MAGENTA_800,
|
|
117
|
+
DATA_VIZ_BLUE_950,
|
|
118
|
+
DATA_VIZ_ORANGE_500,
|
|
119
|
+
DATA_VIZ_AQUA_950,
|
|
120
|
+
DATA_VIZ_GREEN_500,
|
|
121
|
+
DATA_VIZ_MAGENTA_950,
|
|
123
122
|
];
|
|
124
123
|
export const colorFromDefaultPalette = (index) =>
|
|
125
124
|
colorPaletteDefault[index % colorPaletteDefault.length];
|
|
126
125
|
|
|
127
126
|
export const colorPaletteDark = [
|
|
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
|
-
|
|
127
|
+
DATA_VIZ_BLUE_500,
|
|
128
|
+
DATA_VIZ_ORANGE_400,
|
|
129
|
+
DATA_VIZ_AQUA_500,
|
|
130
|
+
DATA_VIZ_GREEN_400,
|
|
131
|
+
DATA_VIZ_MAGENTA_500,
|
|
132
|
+
DATA_VIZ_BLUE_300,
|
|
133
|
+
DATA_VIZ_ORANGE_200,
|
|
134
|
+
DATA_VIZ_AQUA_300,
|
|
135
|
+
DATA_VIZ_GREEN_200,
|
|
136
|
+
DATA_VIZ_MAGENTA_300,
|
|
137
|
+
DATA_VIZ_BLUE_100,
|
|
138
|
+
DATA_VIZ_ORANGE_50,
|
|
139
|
+
DATA_VIZ_AQUA_100,
|
|
140
|
+
DATA_VIZ_GREEN_50,
|
|
141
|
+
DATA_VIZ_MAGENTA_100,
|
|
142
|
+
DATA_VIZ_BLUE_400,
|
|
143
|
+
DATA_VIZ_ORANGE_300,
|
|
144
|
+
DATA_VIZ_AQUA_400,
|
|
145
|
+
DATA_VIZ_GREEN_300,
|
|
146
|
+
DATA_VIZ_MAGENTA_400,
|
|
147
|
+
DATA_VIZ_BLUE_200,
|
|
148
|
+
DATA_VIZ_ORANGE_100,
|
|
149
|
+
DATA_VIZ_AQUA_200,
|
|
150
|
+
DATA_VIZ_GREEN_100,
|
|
151
|
+
DATA_VIZ_MAGENTA_200,
|
|
152
|
+
DATA_VIZ_BLUE_50,
|
|
153
|
+
DATA_VIZ_ORANGE_500,
|
|
154
|
+
DATA_VIZ_AQUA_50,
|
|
155
|
+
DATA_VIZ_GREEN_500,
|
|
156
|
+
DATA_VIZ_MAGENTA_50,
|
|
158
157
|
];
|
|
159
158
|
|
|
160
159
|
export const colorFromDarkPalette = (index) => colorPaletteDark[index % colorPaletteDark.length];
|
|
@@ -163,7 +162,7 @@ const axes = {
|
|
|
163
162
|
axisLabel: {
|
|
164
163
|
margin: 8,
|
|
165
164
|
show: true,
|
|
166
|
-
color:
|
|
165
|
+
color: GRAY_600,
|
|
167
166
|
hideOverlap: true,
|
|
168
167
|
},
|
|
169
168
|
axisLine: {
|
|
@@ -172,7 +171,7 @@ const axes = {
|
|
|
172
171
|
axisPointer: {
|
|
173
172
|
lineStyle: {
|
|
174
173
|
type: 'solid',
|
|
175
|
-
color:
|
|
174
|
+
color: GRAY_600,
|
|
176
175
|
},
|
|
177
176
|
label: {
|
|
178
177
|
show: false,
|
|
@@ -182,7 +181,7 @@ const axes = {
|
|
|
182
181
|
show: true,
|
|
183
182
|
alignWithLabel: true,
|
|
184
183
|
lineStyle: {
|
|
185
|
-
color:
|
|
184
|
+
color: GRAY_200,
|
|
186
185
|
},
|
|
187
186
|
},
|
|
188
187
|
nameGap: 30,
|
|
@@ -191,13 +190,13 @@ const axes = {
|
|
|
191
190
|
},
|
|
192
191
|
splitLine: {
|
|
193
192
|
lineStyle: {
|
|
194
|
-
color: [
|
|
193
|
+
color: [GRAY_200],
|
|
195
194
|
},
|
|
196
195
|
},
|
|
197
196
|
splitArea: {
|
|
198
197
|
show: false,
|
|
199
198
|
areaStyle: {
|
|
200
|
-
color: [hexToRgba(
|
|
199
|
+
color: [hexToRgba(GRAY_50, 0.3), hexToRgba(GRAY_300, 0.3)],
|
|
201
200
|
},
|
|
202
201
|
},
|
|
203
202
|
};
|
|
@@ -210,7 +209,7 @@ export const createTheme = (options = {}) => ({
|
|
|
210
209
|
color: colorPaletteDefault,
|
|
211
210
|
backgroundColor: 'transparent',
|
|
212
211
|
textStyle: {
|
|
213
|
-
color:
|
|
212
|
+
color: GRAY_900,
|
|
214
213
|
},
|
|
215
214
|
markLine: {
|
|
216
215
|
silent: true,
|
|
@@ -219,7 +218,7 @@ export const createTheme = (options = {}) => ({
|
|
|
219
218
|
show: false,
|
|
220
219
|
},
|
|
221
220
|
lineStyle: {
|
|
222
|
-
color:
|
|
221
|
+
color: RED_500,
|
|
223
222
|
width: 1,
|
|
224
223
|
type: 'dashed',
|
|
225
224
|
},
|
|
@@ -227,7 +226,7 @@ export const createTheme = (options = {}) => ({
|
|
|
227
226
|
markArea: {
|
|
228
227
|
silent: true,
|
|
229
228
|
itemStyle: {
|
|
230
|
-
color: hexToRgba(
|
|
229
|
+
color: hexToRgba(RED_500, 0.1),
|
|
231
230
|
},
|
|
232
231
|
},
|
|
233
232
|
dataZoom: {
|
|
@@ -237,7 +236,7 @@ export const createTheme = (options = {}) => ({
|
|
|
237
236
|
dataBackground: {
|
|
238
237
|
lineStyle: {
|
|
239
238
|
width: 2,
|
|
240
|
-
color:
|
|
239
|
+
color: GRAY_200,
|
|
241
240
|
opacity: 1,
|
|
242
241
|
},
|
|
243
242
|
// render unfilled zoom-graph if the series is a line chart without area styles
|
|
@@ -245,20 +244,20 @@ export const createTheme = (options = {}) => ({
|
|
|
245
244
|
areaStyle: isLineChartWithoutArea(options)
|
|
246
245
|
? {} // Use empty object instead of null, see https://gitlab.com/gitlab-org/gitlab-ui/-/merge_requests/2185#note_707711029 for more context
|
|
247
246
|
: {
|
|
248
|
-
color:
|
|
247
|
+
color: GRAY_50,
|
|
249
248
|
opacity: 1,
|
|
250
249
|
},
|
|
251
250
|
},
|
|
252
|
-
fillerColor: hexToRgba(
|
|
251
|
+
fillerColor: hexToRgba(GRAY_200, 0.23),
|
|
253
252
|
handleIcon: scrollHandleSvgPath,
|
|
254
253
|
handleStyle: {
|
|
255
254
|
borderColor: 'transparent',
|
|
256
|
-
color:
|
|
255
|
+
color: GRAY_500,
|
|
257
256
|
},
|
|
258
257
|
handleSize: '50%',
|
|
259
258
|
labelFormatter: () => null,
|
|
260
259
|
textStyle: {
|
|
261
|
-
color:
|
|
260
|
+
color: GRAY_600,
|
|
262
261
|
},
|
|
263
262
|
},
|
|
264
263
|
toolbox: {
|
|
@@ -268,14 +267,14 @@ export const createTheme = (options = {}) => ({
|
|
|
268
267
|
emphasis: {
|
|
269
268
|
iconStyle: {
|
|
270
269
|
borderWidth: 0,
|
|
271
|
-
color:
|
|
272
|
-
textBackgroundColor:
|
|
270
|
+
color: GRAY_900,
|
|
271
|
+
textBackgroundColor: WHITE,
|
|
273
272
|
textBorderRadius: glBorderRadiusBase,
|
|
274
273
|
textPadding: [8, 12],
|
|
275
274
|
},
|
|
276
275
|
},
|
|
277
276
|
iconStyle: {
|
|
278
|
-
color:
|
|
277
|
+
color: GRAY_500,
|
|
279
278
|
borderWidth: 0,
|
|
280
279
|
},
|
|
281
280
|
itemGap: 8,
|
|
@@ -299,12 +298,12 @@ export const createTheme = (options = {}) => ({
|
|
|
299
298
|
label: {
|
|
300
299
|
normal: {
|
|
301
300
|
textStyle: {
|
|
302
|
-
color:
|
|
301
|
+
color: GRAY_50,
|
|
303
302
|
},
|
|
304
303
|
},
|
|
305
304
|
emphasis: {
|
|
306
305
|
textStyle: {
|
|
307
|
-
color:
|
|
306
|
+
color: GRAY_50,
|
|
308
307
|
},
|
|
309
308
|
},
|
|
310
309
|
},
|