@gitlab/ui 111.0.0 → 111.1.1
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/base/token_selector/token_container.js +1 -1
- package/dist/components/base/token_selector/token_selector.js +2 -1
- package/dist/components/charts/discrete_scatter/discrete_scatter.js +1 -2
- package/dist/components/charts/heatmap/heatmap.js +4 -4
- package/dist/components/charts/legend/legend.js +1 -2
- package/dist/components/charts/line/line.js +1 -2
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/tailwind.css +1 -1
- package/dist/tailwind.css.map +1 -1
- package/dist/tokens/build/js/tokens.dark.js +8 -1
- package/dist/tokens/build/js/tokens.js +8 -1
- package/dist/tokens/css/tokens.css +8 -1
- package/dist/tokens/css/tokens.dark.css +8 -1
- package/dist/tokens/js/tokens.dark.js +7 -0
- package/dist/tokens/js/tokens.js +7 -0
- package/dist/tokens/json/tokens.dark.json +176 -1
- package/dist/tokens/json/tokens.json +176 -1
- package/dist/tokens/scss/_tokens.dark.scss +8 -1
- package/dist/tokens/scss/_tokens.scss +8 -1
- package/dist/tokens/scss/_tokens_custom_properties.scss +7 -0
- package/dist/utils/charts/theme.js +31 -29
- package/dist/utils/is_slot_empty.js +1 -8
- package/package.json +1 -1
- package/src/components/base/token_selector/token_container.vue +3 -2
- package/src/components/base/token_selector/token_selector.scss +1 -0
- package/src/components/base/token_selector/token_selector.vue +3 -0
- package/src/components/charts/discrete_scatter/discrete_scatter.vue +1 -2
- package/src/components/charts/heatmap/heatmap.vue +4 -4
- package/src/components/charts/legend/legend.vue +1 -2
- package/src/components/charts/line/line.vue +1 -2
- package/src/tokens/build/css/tokens.css +8 -1
- package/src/tokens/build/css/tokens.dark.css +8 -1
- package/src/tokens/build/js/tokens.dark.js +7 -0
- package/src/tokens/build/js/tokens.js +7 -0
- package/src/tokens/build/json/tokens.dark.json +176 -1
- package/src/tokens/build/json/tokens.json +176 -1
- package/src/tokens/build/scss/_tokens.dark.scss +8 -1
- package/src/tokens/build/scss/_tokens.scss +8 -1
- package/src/tokens/build/scss/_tokens_custom_properties.scss +7 -0
- package/src/tokens/contextual/chart.tokens.json +68 -0
- package/src/tokens/contextual/dropdown.tokens.json +2 -0
- package/src/utils/charts/theme.js +150 -153
- package/src/utils/is_slot_empty.js +1 -10
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { GL_COLOR_NEUTRAL_100, GL_COLOR_DATA_BLUE_200, GL_COLOR_DATA_BLUE_400, GL_COLOR_DATA_BLUE_600, GL_COLOR_DATA_BLUE_800, GL_COLOR_NEUTRAL_900, GL_COLOR_NEUTRAL_500, GL_COLOR_DATA_BLUE_500, GL_COLOR_DATA_BLUE_900, GL_COLOR_DATA_ORANGE_500, GL_COLOR_DATA_ORANGE_600, GL_COLOR_DATA_AQUA_500, GL_COLOR_DATA_GREEN_600, GL_COLOR_DATA_MAGENTA_500, GL_COLOR_DATA_BLUE_700, GL_COLOR_DATA_ORANGE_800, GL_COLOR_DATA_AQUA_700, GL_COLOR_DATA_GREEN_800, GL_COLOR_DATA_MAGENTA_700, GL_COLOR_DATA_ORANGE_950, GL_COLOR_DATA_AQUA_900, GL_COLOR_DATA_GREEN_950, GL_COLOR_DATA_MAGENTA_900, GL_COLOR_DATA_ORANGE_700, GL_COLOR_DATA_AQUA_600, GL_COLOR_DATA_GREEN_700, GL_COLOR_DATA_MAGENTA_600, GL_COLOR_DATA_ORANGE_900, GL_COLOR_DATA_AQUA_800, GL_COLOR_DATA_GREEN_900, GL_COLOR_DATA_MAGENTA_800, GL_COLOR_DATA_BLUE_950, GL_COLOR_DATA_AQUA_950, GL_COLOR_DATA_GREEN_500, GL_COLOR_DATA_MAGENTA_950, GL_COLOR_DATA_ORANGE_400, GL_COLOR_DATA_GREEN_400, GL_COLOR_DATA_BLUE_300, GL_COLOR_DATA_ORANGE_200, GL_COLOR_DATA_AQUA_300, GL_COLOR_DATA_GREEN_200, GL_COLOR_DATA_MAGENTA_300, GL_COLOR_DATA_BLUE_100, GL_COLOR_DATA_ORANGE_50, GL_COLOR_DATA_AQUA_100, GL_COLOR_DATA_GREEN_50, GL_COLOR_DATA_MAGENTA_100, GL_COLOR_DATA_ORANGE_300, GL_COLOR_DATA_AQUA_400, GL_COLOR_DATA_GREEN_300, GL_COLOR_DATA_MAGENTA_400, GL_COLOR_DATA_ORANGE_100, GL_COLOR_DATA_AQUA_200, GL_COLOR_DATA_GREEN_100, GL_COLOR_DATA_MAGENTA_200, GL_COLOR_DATA_BLUE_50, GL_COLOR_DATA_AQUA_50, GL_COLOR_DATA_MAGENTA_50, GL_COLOR_NEUTRAL_50 } from '../../tokens/build/js/tokens';
|
|
2
2
|
import { scrollHandleSvgPath, marqueeSelectionSvgPath, redoSvgPath, clearAllSvgPath, downloadSvgPath } from '../svgs/svg_paths';
|
|
3
|
-
import { hexToRgba } from '../utils';
|
|
4
3
|
|
|
5
4
|
const GL_BORDER_RADIUS_BASE = '0.25rem';
|
|
6
5
|
const themeName = 'gitlab';
|
|
7
|
-
const heatmapHues = [
|
|
8
|
-
const gaugeNeutralHues = [
|
|
9
|
-
const gaugeSafeHues = [
|
|
10
|
-
const gaugeWarningHue =
|
|
6
|
+
const heatmapHues = [GL_COLOR_NEUTRAL_100, GL_COLOR_DATA_BLUE_200, GL_COLOR_DATA_BLUE_400, GL_COLOR_DATA_BLUE_600, GL_COLOR_DATA_BLUE_800];
|
|
7
|
+
const gaugeNeutralHues = [GL_COLOR_NEUTRAL_900, GL_COLOR_NEUTRAL_500];
|
|
8
|
+
const gaugeSafeHues = [GL_COLOR_DATA_BLUE_500, GL_COLOR_DATA_BLUE_900];
|
|
9
|
+
const gaugeWarningHue = GL_COLOR_DATA_ORANGE_500;
|
|
11
10
|
|
|
12
11
|
/**
|
|
13
12
|
* The default palette is based on the Categorical data palette
|
|
@@ -15,15 +14,15 @@ const gaugeWarningHue = DATA_VIZ_ORANGE_500;
|
|
|
15
14
|
* differentiate qualitative data, and lightness to differentiate quantitive data.
|
|
16
15
|
* More info: https://design.gitlab.com/data-visualization/color#categorical-data
|
|
17
16
|
*/
|
|
18
|
-
const colorPaletteDefault = [
|
|
17
|
+
const colorPaletteDefault = [GL_COLOR_DATA_BLUE_500, GL_COLOR_DATA_ORANGE_600, GL_COLOR_DATA_AQUA_500, GL_COLOR_DATA_GREEN_600, GL_COLOR_DATA_MAGENTA_500, GL_COLOR_DATA_BLUE_700, GL_COLOR_DATA_ORANGE_800, GL_COLOR_DATA_AQUA_700, GL_COLOR_DATA_GREEN_800, GL_COLOR_DATA_MAGENTA_700, GL_COLOR_DATA_BLUE_900, GL_COLOR_DATA_ORANGE_950, GL_COLOR_DATA_AQUA_900, GL_COLOR_DATA_GREEN_950, GL_COLOR_DATA_MAGENTA_900, GL_COLOR_DATA_BLUE_600, GL_COLOR_DATA_ORANGE_700, GL_COLOR_DATA_AQUA_600, GL_COLOR_DATA_GREEN_700, GL_COLOR_DATA_MAGENTA_600, GL_COLOR_DATA_BLUE_800, GL_COLOR_DATA_ORANGE_900, GL_COLOR_DATA_AQUA_800, GL_COLOR_DATA_GREEN_900, GL_COLOR_DATA_MAGENTA_800, GL_COLOR_DATA_BLUE_950, GL_COLOR_DATA_ORANGE_500, GL_COLOR_DATA_AQUA_950, GL_COLOR_DATA_GREEN_500, GL_COLOR_DATA_MAGENTA_950];
|
|
19
18
|
const colorFromDefaultPalette = index => colorPaletteDefault[index % colorPaletteDefault.length];
|
|
20
|
-
const colorPaletteDark = [
|
|
19
|
+
const colorPaletteDark = [GL_COLOR_DATA_BLUE_500, GL_COLOR_DATA_ORANGE_400, GL_COLOR_DATA_AQUA_500, GL_COLOR_DATA_GREEN_400, GL_COLOR_DATA_MAGENTA_500, GL_COLOR_DATA_BLUE_300, GL_COLOR_DATA_ORANGE_200, GL_COLOR_DATA_AQUA_300, GL_COLOR_DATA_GREEN_200, GL_COLOR_DATA_MAGENTA_300, GL_COLOR_DATA_BLUE_100, GL_COLOR_DATA_ORANGE_50, GL_COLOR_DATA_AQUA_100, GL_COLOR_DATA_GREEN_50, GL_COLOR_DATA_MAGENTA_100, GL_COLOR_DATA_BLUE_400, GL_COLOR_DATA_ORANGE_300, GL_COLOR_DATA_AQUA_400, GL_COLOR_DATA_GREEN_300, GL_COLOR_DATA_MAGENTA_400, GL_COLOR_DATA_BLUE_200, GL_COLOR_DATA_ORANGE_100, GL_COLOR_DATA_AQUA_200, GL_COLOR_DATA_GREEN_100, GL_COLOR_DATA_MAGENTA_200, GL_COLOR_DATA_BLUE_50, GL_COLOR_DATA_ORANGE_500, GL_COLOR_DATA_AQUA_50, GL_COLOR_DATA_GREEN_500, GL_COLOR_DATA_MAGENTA_50];
|
|
21
20
|
const colorFromDarkPalette = index => colorPaletteDark[index % colorPaletteDark.length];
|
|
22
21
|
const axes = {
|
|
23
22
|
axisLabel: {
|
|
24
23
|
margin: 8,
|
|
25
24
|
show: true,
|
|
26
|
-
color:
|
|
25
|
+
color: 'var(--gl-chart-axis-text-color)',
|
|
27
26
|
hideOverlap: true
|
|
28
27
|
},
|
|
29
28
|
axisLine: {
|
|
@@ -32,7 +31,7 @@ const axes = {
|
|
|
32
31
|
axisPointer: {
|
|
33
32
|
lineStyle: {
|
|
34
33
|
type: 'solid',
|
|
35
|
-
color:
|
|
34
|
+
color: 'var(--gl-chart-axis-pointer-color)'
|
|
36
35
|
},
|
|
37
36
|
label: {
|
|
38
37
|
show: false
|
|
@@ -42,7 +41,7 @@ const axes = {
|
|
|
42
41
|
show: true,
|
|
43
42
|
alignWithLabel: true,
|
|
44
43
|
lineStyle: {
|
|
45
|
-
color:
|
|
44
|
+
color: 'var(--gl-chart-axis-line-color)'
|
|
46
45
|
}
|
|
47
46
|
},
|
|
48
47
|
nameGap: 30,
|
|
@@ -51,14 +50,11 @@ const axes = {
|
|
|
51
50
|
},
|
|
52
51
|
splitLine: {
|
|
53
52
|
lineStyle: {
|
|
54
|
-
color: [
|
|
53
|
+
color: ['var(--gl-chart-axis-line-color)']
|
|
55
54
|
}
|
|
56
55
|
},
|
|
57
56
|
splitArea: {
|
|
58
|
-
show: false
|
|
59
|
-
areaStyle: {
|
|
60
|
-
color: [hexToRgba(GRAY_50, 0.3), hexToRgba(GRAY_300, 0.3)]
|
|
61
|
-
}
|
|
57
|
+
show: false
|
|
62
58
|
}
|
|
63
59
|
};
|
|
64
60
|
const isLineChartWithoutArea = options => Array.isArray(options === null || options === void 0 ? void 0 : options.series) && options.series.some(series => series.type === 'line' && !series.areaStyle);
|
|
@@ -68,7 +64,7 @@ const createTheme = function () {
|
|
|
68
64
|
color: colorPaletteDefault,
|
|
69
65
|
backgroundColor: 'transparent',
|
|
70
66
|
textStyle: {
|
|
71
|
-
color:
|
|
67
|
+
color: 'var(--gl-text-color-default)'
|
|
72
68
|
},
|
|
73
69
|
markLine: {
|
|
74
70
|
silent: true,
|
|
@@ -77,7 +73,7 @@ const createTheme = function () {
|
|
|
77
73
|
show: false
|
|
78
74
|
},
|
|
79
75
|
lineStyle: {
|
|
80
|
-
color:
|
|
76
|
+
color: 'var(--gl-chart-threshold-line-color)',
|
|
81
77
|
width: 1,
|
|
82
78
|
type: 'dashed'
|
|
83
79
|
}
|
|
@@ -85,7 +81,7 @@ const createTheme = function () {
|
|
|
85
81
|
markArea: {
|
|
86
82
|
silent: true,
|
|
87
83
|
itemStyle: {
|
|
88
|
-
color:
|
|
84
|
+
color: 'var(--gl-chart-threshold-area-color)'
|
|
89
85
|
}
|
|
90
86
|
},
|
|
91
87
|
dataZoom: {
|
|
@@ -95,27 +91,32 @@ const createTheme = function () {
|
|
|
95
91
|
dataBackground: {
|
|
96
92
|
lineStyle: {
|
|
97
93
|
width: 2,
|
|
98
|
-
color:
|
|
94
|
+
color: 'var(--gl-chart-axis-line-color)',
|
|
99
95
|
opacity: 1
|
|
100
96
|
},
|
|
101
97
|
// render unfilled zoom-graph if the series is a line chart without area styles
|
|
102
98
|
// more details: https://gitlab.com/gitlab-org/gitlab-ui/-/merge_requests/2364#note_666637306
|
|
103
99
|
areaStyle: isLineChartWithoutArea(options) ? {} // Use empty object instead of null, see https://gitlab.com/gitlab-org/gitlab-ui/-/merge_requests/2185#note_707711029 for more context
|
|
104
100
|
: {
|
|
105
|
-
color:
|
|
101
|
+
color: 'var(--gl-background-color-strong)',
|
|
106
102
|
opacity: 1
|
|
107
103
|
}
|
|
108
104
|
},
|
|
109
|
-
fillerColor:
|
|
105
|
+
fillerColor: 'var(--gl-chart-zoom-filler-color)',
|
|
110
106
|
handleIcon: scrollHandleSvgPath,
|
|
107
|
+
emphasis: {
|
|
108
|
+
handleStyle: {
|
|
109
|
+
color: 'var(--gl-chart-zoom-handle-color)'
|
|
110
|
+
}
|
|
111
|
+
},
|
|
111
112
|
handleStyle: {
|
|
112
113
|
borderColor: 'transparent',
|
|
113
|
-
color:
|
|
114
|
+
color: 'var(--gl-chart-zoom-handle-color)'
|
|
114
115
|
},
|
|
115
116
|
handleSize: '50%',
|
|
116
117
|
labelFormatter: () => null,
|
|
117
118
|
textStyle: {
|
|
118
|
-
color:
|
|
119
|
+
color: 'var(--gl-chart-axis-text-color)'
|
|
119
120
|
}
|
|
120
121
|
},
|
|
121
122
|
toolbox: {
|
|
@@ -125,14 +126,15 @@ const createTheme = function () {
|
|
|
125
126
|
emphasis: {
|
|
126
127
|
iconStyle: {
|
|
127
128
|
borderWidth: 0,
|
|
128
|
-
color:
|
|
129
|
-
|
|
129
|
+
color: 'var(--gl-icon-color-default)',
|
|
130
|
+
textFill: 'var(--gl-feedback-strong-text-color)',
|
|
131
|
+
textBackgroundColor: 'var(--gl-feedback-strong-background-color)',
|
|
130
132
|
textBorderRadius: GL_BORDER_RADIUS_BASE,
|
|
131
133
|
textPadding: [8, 12]
|
|
132
134
|
}
|
|
133
135
|
},
|
|
134
136
|
iconStyle: {
|
|
135
|
-
color:
|
|
137
|
+
color: 'var(--gl-icon-color-default)',
|
|
136
138
|
borderWidth: 0
|
|
137
139
|
},
|
|
138
140
|
itemGap: 8,
|
|
@@ -162,12 +164,12 @@ const createTheme = function () {
|
|
|
162
164
|
label: {
|
|
163
165
|
normal: {
|
|
164
166
|
textStyle: {
|
|
165
|
-
color:
|
|
167
|
+
color: GL_COLOR_NEUTRAL_50
|
|
166
168
|
}
|
|
167
169
|
},
|
|
168
170
|
emphasis: {
|
|
169
171
|
textStyle: {
|
|
170
|
-
color:
|
|
172
|
+
color: GL_COLOR_NEUTRAL_50
|
|
171
173
|
}
|
|
172
174
|
}
|
|
173
175
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import Vue from 'vue';
|
|
2
|
-
import { isVue3 } from './constants';
|
|
3
2
|
|
|
4
3
|
// Fragment will be available only in Vue.js 3
|
|
5
4
|
const {
|
|
@@ -7,9 +6,6 @@ const {
|
|
|
7
6
|
Comment,
|
|
8
7
|
Text
|
|
9
8
|
} = Vue;
|
|
10
|
-
function callIfNeeded(fnOrResult, args) {
|
|
11
|
-
return fnOrResult instanceof Function ? fnOrResult(args) : fnOrResult;
|
|
12
|
-
}
|
|
13
9
|
function isVnodeEmpty(vnode) {
|
|
14
10
|
if (!vnode || Comment && vnode.type === Comment) {
|
|
15
11
|
return true;
|
|
@@ -31,10 +27,7 @@ function isVnodeEmpty(vnode) {
|
|
|
31
27
|
}
|
|
32
28
|
function isSlotEmpty(vueInstance, slot, slotArgs) {
|
|
33
29
|
var _vueInstance$$scopedS, _vueInstance$$scopedS2;
|
|
34
|
-
const slotContent =
|
|
35
|
-
// we need to check both $slots and $scopedSlots due to https://github.com/vuejs/core/issues/8869
|
|
36
|
-
// additionally, in @vue/compat $slot might be a function instead of array of vnodes (sigh)
|
|
37
|
-
callIfNeeded(vueInstance.$slots[slot] || vueInstance.$scopedSlots[slot], slotArgs) : (_vueInstance$$scopedS = (_vueInstance$$scopedS2 = vueInstance.$scopedSlots)[slot]) === null || _vueInstance$$scopedS === void 0 ? void 0 : _vueInstance$$scopedS.call(_vueInstance$$scopedS2, slotArgs);
|
|
30
|
+
const slotContent = (_vueInstance$$scopedS = (_vueInstance$$scopedS2 = vueInstance.$scopedSlots)[slot]) === null || _vueInstance$$scopedS === void 0 ? void 0 : _vueInstance$$scopedS.call(_vueInstance$$scopedS2, slotArgs);
|
|
38
31
|
|
|
39
32
|
// eslint-disable-next-line unicorn/no-array-callback-reference
|
|
40
33
|
return isVnodeEmpty(slotContent);
|
package/package.json
CHANGED
|
@@ -131,11 +131,12 @@ export default {
|
|
|
131
131
|
<div class="gl-flex gl-w-full gl-flex-nowrap gl-items-start">
|
|
132
132
|
<div
|
|
133
133
|
ref="tokenContainer"
|
|
134
|
-
class="-gl-mx-1 -gl-my-1 gl-flex gl-w-
|
|
134
|
+
class="-gl-mx-1 -gl-my-1 gl-flex gl-w-auto gl-list-none gl-flex-wrap gl-items-center gl-p-0"
|
|
135
135
|
role="listbox"
|
|
136
136
|
aria-multiselectable="false"
|
|
137
137
|
aria-orientation="horizontal"
|
|
138
138
|
:aria-invalid="state === false && 'true'"
|
|
139
|
+
aria-label="token list"
|
|
139
140
|
@keydown.left="handleLeftArrow"
|
|
140
141
|
@keydown.right="handleRightArrow"
|
|
141
142
|
@keydown.home="handleHome"
|
|
@@ -168,8 +169,8 @@ export default {
|
|
|
168
169
|
</slot>
|
|
169
170
|
</gl-token>
|
|
170
171
|
</div>
|
|
171
|
-
<slot name="text-input"></slot>
|
|
172
172
|
</div>
|
|
173
|
+
<slot name="text-input"></slot>
|
|
173
174
|
<div v-if="showClearAllButton" class="gl-ml-3 gl-p-1">
|
|
174
175
|
<gl-button
|
|
175
176
|
size="small"
|
|
@@ -330,6 +330,8 @@ export default {
|
|
|
330
330
|
* @property {object} token
|
|
331
331
|
*/
|
|
332
332
|
this.$emit('token-add', dropdownItem);
|
|
333
|
+
|
|
334
|
+
this.focusTextInput();
|
|
333
335
|
},
|
|
334
336
|
removeToken(token) {
|
|
335
337
|
/**
|
|
@@ -425,6 +427,7 @@ export default {
|
|
|
425
427
|
<input
|
|
426
428
|
ref="textInput"
|
|
427
429
|
type="text"
|
|
430
|
+
aria-label="token selector"
|
|
428
431
|
class="gl-token-selector-input gl-h-auto gl-w-4/10 gl-grow gl-border-none gl-bg-transparent gl-px-1 gl-font-regular gl-text-base gl-leading-normal gl-text-default gl-outline-none"
|
|
429
432
|
:value="inputText"
|
|
430
433
|
:autocomplete="autocomplete"
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import merge from 'lodash/merge';
|
|
3
|
-
import { GRAY_200 } from '../../../tokens/build/js/tokens';
|
|
4
3
|
import {
|
|
5
4
|
defaultChartOptions,
|
|
6
5
|
dataZoomAdjustments,
|
|
@@ -112,7 +111,7 @@ export default {
|
|
|
112
111
|
alignWithLabel: true,
|
|
113
112
|
show: true,
|
|
114
113
|
lineStyle: {
|
|
115
|
-
color:
|
|
114
|
+
color: 'var(--gl-chart-axis-line-color)',
|
|
116
115
|
},
|
|
117
116
|
},
|
|
118
117
|
axisLabel: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!-- eslint-disable vue/multi-word-component-names -->
|
|
2
2
|
<script>
|
|
3
3
|
import merge from 'lodash/merge';
|
|
4
|
-
import {
|
|
4
|
+
import { GL_COLOR_NEUTRAL_0, GL_COLOR_NEUTRAL_100 } from '../../../tokens/build/js/tokens';
|
|
5
5
|
import { getTooltipTitle, getTooltipContent } from '../../../utils/charts/config';
|
|
6
6
|
import { HEIGHT_AUTO_CLASSES } from '../../../utils/charts/constants';
|
|
7
7
|
import { heatmapHues } from '../../../utils/charts/theme';
|
|
@@ -140,7 +140,7 @@ export default {
|
|
|
140
140
|
right: '32px',
|
|
141
141
|
show: true,
|
|
142
142
|
borderWidth: 0,
|
|
143
|
-
backgroundColor:
|
|
143
|
+
backgroundColor: GL_COLOR_NEUTRAL_100,
|
|
144
144
|
},
|
|
145
145
|
visualMap: {
|
|
146
146
|
min,
|
|
@@ -164,7 +164,7 @@ export default {
|
|
|
164
164
|
show: true,
|
|
165
165
|
interval: 0,
|
|
166
166
|
lineStyle: {
|
|
167
|
-
color:
|
|
167
|
+
color: GL_COLOR_NEUTRAL_0,
|
|
168
168
|
width: 2,
|
|
169
169
|
},
|
|
170
170
|
},
|
|
@@ -191,7 +191,7 @@ export default {
|
|
|
191
191
|
show: true,
|
|
192
192
|
interval: 0,
|
|
193
193
|
lineStyle: {
|
|
194
|
-
color:
|
|
194
|
+
color: GL_COLOR_NEUTRAL_0,
|
|
195
195
|
width: 2,
|
|
196
196
|
},
|
|
197
197
|
},
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
<!-- eslint-disable vue/multi-word-component-names -->
|
|
2
2
|
<script>
|
|
3
3
|
import * as echarts from 'echarts';
|
|
4
|
-
import { GRAY_200 } from '../../../tokens/build/js/tokens';
|
|
5
4
|
import { defaultFontSize } from '../../../utils/charts/config';
|
|
6
5
|
import {
|
|
7
6
|
LEGEND_LAYOUT_INLINE,
|
|
@@ -146,7 +145,7 @@ export default {
|
|
|
146
145
|
this.chart.dispatchAction({ type: 'downplay', seriesName: name });
|
|
147
146
|
},
|
|
148
147
|
getColor(color, key) {
|
|
149
|
-
return this.disabledSeries[key] ?
|
|
148
|
+
return this.disabledSeries[key] ? 'var(--gl-chart-axis-line-color)' : color;
|
|
150
149
|
},
|
|
151
150
|
suppressLastActiveSeriesLabelToggle({ selected }) {
|
|
152
151
|
const selectedSeriesLabels = Object.entries(selected).filter(([, isSelected]) =>
|
|
@@ -19,7 +19,6 @@
|
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
21
|
import merge from 'lodash/merge';
|
|
22
|
-
import { GRAY_200 } from '../../../tokens/build/js/tokens';
|
|
23
22
|
import {
|
|
24
23
|
defaultChartOptions,
|
|
25
24
|
grid,
|
|
@@ -193,7 +192,7 @@ export default {
|
|
|
193
192
|
alignWithLabel: true,
|
|
194
193
|
show: true,
|
|
195
194
|
lineStyle: {
|
|
196
|
-
color:
|
|
195
|
+
color: 'var(--gl-chart-axis-line-color)',
|
|
197
196
|
},
|
|
198
197
|
},
|
|
199
198
|
},
|
|
@@ -244,6 +244,7 @@
|
|
|
244
244
|
--gl-avatar-fallback-background-color-green: #91d4a83d; /* Green background for avatar fallback with no particular meaning. */
|
|
245
245
|
--gl-avatar-fallback-background-color-orange: #e9be743d; /* Orange background for avatar fallback with no particular meaning. */
|
|
246
246
|
--gl-avatar-fallback-background-color-neutral: #bfbfc33d; /* Neutral background for avatar fallback with no particular meaning. */
|
|
247
|
+
--gl-chart-threshold-area-color: rgba(221,43,14,0.1); /* Used in charts to delineate a threshold area in a chart. */
|
|
247
248
|
--gl-illustration-stroke-color-default: #171321; /* Default stroke color to define shape and provide essential detail. */
|
|
248
249
|
--gl-illustration-stroke-width-default: 0.125rem; /* Default stroke width to define shape and provide essential detail. */
|
|
249
250
|
--gl-illustration-fill-color-default: #fff; /* Default fill color for an element where specific meaning or emphasis is not required. */
|
|
@@ -750,6 +751,9 @@
|
|
|
750
751
|
--gl-button-disabled-foreground-color: var(--gl-color-neutral-500); /* Used for the foreground of a disabled button. */
|
|
751
752
|
--gl-button-disabled-background-color: var(--gl-color-neutral-10); /* Used for the background of a disabled button. */
|
|
752
753
|
--gl-button-disabled-border-color: var(--gl-color-neutral-100); /* Used for the border of a disabled button. */
|
|
754
|
+
--gl-chart-axis-line-color: var(--gl-color-neutral-200); /* Used in charts for axis line color. */
|
|
755
|
+
--gl-chart-threshold-line-color: var(--gl-color-red-500); /* Used in charts to divide a threshold area in a chart from other data. */
|
|
756
|
+
--gl-chart-zoom-filler-color: var(--gl-color-alpha-dark-8); /* Used in charts for the overlay color when zooming in on a specific area of data. */
|
|
753
757
|
--gl-datepicker-background-color: var(--gl-color-neutral-0); /* Used for the background color of datepicker. */
|
|
754
758
|
--gl-dropdown-option-background-color-unselected-default: var(--gl-action-neutral-background-color-default); /* Used for the background of an unselected dropdown option in the default state. */
|
|
755
759
|
--gl-dropdown-option-background-color-unselected-hover: var(--gl-action-neutral-background-color-hover); /* Used for the background of an unselected dropdown option in the hover state. */
|
|
@@ -953,10 +957,11 @@
|
|
|
953
957
|
--gl-button-selected-background-color-hover: var(--gl-button-default-primary-background-color-hover); /* Used for the background of a selected button in the hover state. */
|
|
954
958
|
--gl-button-selected-background-color-active: var(--gl-button-default-primary-background-color-active); /* Used for the background of a selected button in the active state. */
|
|
955
959
|
--gl-button-selected-border-color-focus: var(--gl-button-selected-border-color-hover); /* Used for the border of a selected button in the focus state. */
|
|
960
|
+
--gl-chart-axis-text-color: var(--gl-text-color-subtle); /* Used in charts for the text color of axis titles and labels. */
|
|
956
961
|
--gl-datepicker-date-text-color-selected: var(--gl-control-indicator-color-selected); /* Used for the datepicker date text color state indicators. */
|
|
957
962
|
--gl-dropdown-background-color: var(--gl-background-color-overlap); /* Used for the background of a dropdown. */
|
|
958
963
|
--gl-dropdown-border-color: var(--gl-border-color-strong); /* Used for the border of a dropdown. */
|
|
959
|
-
--gl-dropdown-divider-color: var(--gl-border-color-default);
|
|
964
|
+
--gl-dropdown-divider-color: var(--gl-border-color-default); /* Used for the divider of a dropdown. */
|
|
960
965
|
--gl-dropdown-option-text-color-default: var(--gl-action-neutral-foreground-color-default); /* Used for the text of a dropdown option in the default state. */
|
|
961
966
|
--gl-dropdown-option-text-color-disabled: var(--gl-action-disabled-foreground-color); /* Used for the text of a dropdown option in the disabled state. */
|
|
962
967
|
--gl-dropdown-option-indicator-color-selected-default: var(--gl-control-background-color-selected-default); /* Used for the dropdown selected option indicator in the default state. */
|
|
@@ -1027,6 +1032,8 @@
|
|
|
1027
1032
|
--gl-button-selected-foreground-color-focus: var(--gl-button-default-primary-foreground-color-focus); /* Used for the foreground of a selected button in the focus state. */
|
|
1028
1033
|
--gl-button-selected-foreground-color-active: var(--gl-button-default-primary-foreground-color-active); /* Used for the foreground of a selected button in the active state. */
|
|
1029
1034
|
--gl-button-selected-background-color-focus: var(--gl-button-default-primary-background-color-focus); /* Used for the background of a selected button in the focus state. */
|
|
1035
|
+
--gl-chart-axis-pointer-color: var(--gl-icon-color-subtle); /* Used in charts for the color of the reference line and axis value under mouse pointer. */
|
|
1036
|
+
--gl-chart-zoom-handle-color: var(--gl-icon-color-subtle); /* Used in charts for the handle color when zooming in on a specific area of data. */
|
|
1030
1037
|
--gl-dropdown-option-text-color-hover: var(--gl-action-neutral-foreground-color-hover); /* Used for the text of a dropdown option in the hover state. */
|
|
1031
1038
|
--gl-dropdown-option-text-color-focus: var(--gl-action-neutral-foreground-color-focus); /* Used for the text of a dropdown option in the focus state. */
|
|
1032
1039
|
--gl-dropdown-option-text-color-active: var(--gl-action-neutral-foreground-color-active); /* Used for the text of a dropdown option in the active state. */
|
|
@@ -244,6 +244,7 @@
|
|
|
244
244
|
--gl-avatar-fallback-background-color-green: #91d4a83d; /* Green background for avatar fallback with no particular meaning. */
|
|
245
245
|
--gl-avatar-fallback-background-color-orange: #e9be743d; /* Orange background for avatar fallback with no particular meaning. */
|
|
246
246
|
--gl-avatar-fallback-background-color-neutral: #bfbfc33d; /* Neutral background for avatar fallback with no particular meaning. */
|
|
247
|
+
--gl-chart-threshold-area-color: rgba(221,43,14,0.1); /* Used in charts to delineate a threshold area in a chart. */
|
|
247
248
|
--gl-illustration-stroke-color-default: #e3e3e8; /* Default stroke color to define shape and provide essential detail. */
|
|
248
249
|
--gl-illustration-stroke-width-default: 0.09375rem; /* Default stroke width to define shape and provide essential detail. */
|
|
249
250
|
--gl-illustration-fill-color-default: #423f4f; /* Default fill color for an element where specific meaning or emphasis is not required. */
|
|
@@ -750,6 +751,9 @@
|
|
|
750
751
|
--gl-button-disabled-foreground-color: var(--gl-color-neutral-400); /* Used for the foreground of a disabled button. */
|
|
751
752
|
--gl-button-disabled-background-color: rgba(137, 136, 141, 0.16); /* Used for the background of a disabled button. */
|
|
752
753
|
--gl-button-disabled-border-color: var(--gl-color-alpha-0); /* Used for the border of a disabled button. */
|
|
754
|
+
--gl-chart-axis-line-color: var(--gl-color-neutral-700); /* Used in charts for axis line color. */
|
|
755
|
+
--gl-chart-threshold-line-color: var(--gl-color-red-600); /* Used in charts to divide a threshold area in a chart from other data. */
|
|
756
|
+
--gl-chart-zoom-filler-color: var(--gl-color-alpha-light-16); /* Used in charts for the overlay color when zooming in on a specific area of data. */
|
|
753
757
|
--gl-datepicker-background-color: var(--gl-color-neutral-900); /* Used for the background color of datepicker. */
|
|
754
758
|
--gl-dropdown-option-background-color-unselected-default: var(--gl-action-neutral-background-color-default); /* Used for the background of an unselected dropdown option in the default state. */
|
|
755
759
|
--gl-dropdown-option-background-color-unselected-hover: var(--gl-action-neutral-background-color-hover); /* Used for the background of an unselected dropdown option in the hover state. */
|
|
@@ -953,10 +957,11 @@
|
|
|
953
957
|
--gl-button-selected-background-color-hover: var(--gl-color-neutral-200); /* Used for the background of a selected button in the hover state. */
|
|
954
958
|
--gl-button-selected-background-color-active: var(--gl-color-neutral-400); /* Used for the background of a selected button in the active state. */
|
|
955
959
|
--gl-button-selected-border-color-focus: var(--gl-button-selected-border-color-hover); /* Used for the border of a selected button in the focus state. */
|
|
960
|
+
--gl-chart-axis-text-color: var(--gl-text-color-subtle); /* Used in charts for the text color of axis titles and labels. */
|
|
956
961
|
--gl-datepicker-date-text-color-selected: var(--gl-control-indicator-color-selected); /* Used for the datepicker date text color state indicators. */
|
|
957
962
|
--gl-dropdown-background-color: var(--gl-background-color-overlap); /* Used for the background of a dropdown. */
|
|
958
963
|
--gl-dropdown-border-color: var(--gl-border-color-default); /* Used for the border of a dropdown. */
|
|
959
|
-
--gl-dropdown-divider-color: var(--gl-border-color-subtle);
|
|
964
|
+
--gl-dropdown-divider-color: var(--gl-border-color-subtle); /* Used for the divider of a dropdown. */
|
|
960
965
|
--gl-dropdown-option-text-color-default: var(--gl-action-neutral-foreground-color-default); /* Used for the text of a dropdown option in the default state. */
|
|
961
966
|
--gl-dropdown-option-text-color-disabled: var(--gl-action-disabled-foreground-color); /* Used for the text of a dropdown option in the disabled state. */
|
|
962
967
|
--gl-dropdown-option-indicator-color-selected-default: var(--gl-control-background-color-selected-default); /* Used for the dropdown selected option indicator in the default state. */
|
|
@@ -1027,6 +1032,8 @@
|
|
|
1027
1032
|
--gl-button-selected-foreground-color-focus: var(--gl-color-neutral-950); /* Used for the foreground of a selected button in the focus state. */
|
|
1028
1033
|
--gl-button-selected-foreground-color-active: var(--gl-color-neutral-950); /* Used for the foreground of a selected button in the active state. */
|
|
1029
1034
|
--gl-button-selected-background-color-focus: var(--gl-color-neutral-200); /* Used for the background of a selected button in the focus state. */
|
|
1035
|
+
--gl-chart-axis-pointer-color: var(--gl-icon-color-subtle); /* Used in charts for the color of the reference line and axis value under mouse pointer. */
|
|
1036
|
+
--gl-chart-zoom-handle-color: var(--gl-icon-color-subtle); /* Used in charts for the handle color when zooming in on a specific area of data. */
|
|
1030
1037
|
--gl-dropdown-option-text-color-hover: var(--gl-action-neutral-foreground-color-hover); /* Used for the text of a dropdown option in the hover state. */
|
|
1031
1038
|
--gl-dropdown-option-text-color-focus: var(--gl-action-neutral-foreground-color-focus); /* Used for the text of a dropdown option in the focus state. */
|
|
1032
1039
|
--gl-dropdown-option-text-color-active: var(--gl-action-neutral-foreground-color-active); /* Used for the text of a dropdown option in the active state. */
|
|
@@ -624,6 +624,13 @@ export const GL_BUTTON_SELECTED_BORDER_COLOR_ACTIVE = 'transparent';
|
|
|
624
624
|
export const GL_BUTTON_DISABLED_FOREGROUND_COLOR = '#89888d';
|
|
625
625
|
export const GL_BUTTON_DISABLED_BACKGROUND_COLOR = 'rgba(137, 136, 141, 0.16)';
|
|
626
626
|
export const GL_BUTTON_DISABLED_BORDER_COLOR = 'transparent';
|
|
627
|
+
export const GL_CHART_AXIS_POINTER_COLOR = '#bfbfc3';
|
|
628
|
+
export const GL_CHART_AXIS_LINE_COLOR = '#4c4b51';
|
|
629
|
+
export const GL_CHART_AXIS_TEXT_COLOR = '#bfbfc3';
|
|
630
|
+
export const GL_CHART_THRESHOLD_AREA_COLOR = 'rgba(221,43,14,0.1)';
|
|
631
|
+
export const GL_CHART_THRESHOLD_LINE_COLOR = '#c91c00';
|
|
632
|
+
export const GL_CHART_ZOOM_FILLER_COLOR = 'rgba(255, 255, 255, 0.16)';
|
|
633
|
+
export const GL_CHART_ZOOM_HANDLE_COLOR = '#bfbfc3';
|
|
627
634
|
export const GL_DATEPICKER_BACKGROUND_COLOR = '#28272d';
|
|
628
635
|
export const GL_DATEPICKER_DATE_TEXT_COLOR_SELECTED = '#18171d';
|
|
629
636
|
export const GL_DROPDOWN_BACKGROUND_COLOR = '#28272d';
|
|
@@ -624,6 +624,13 @@ export const GL_BUTTON_SELECTED_BORDER_COLOR_ACTIVE = '#626168';
|
|
|
624
624
|
export const GL_BUTTON_DISABLED_FOREGROUND_COLOR = '#737278';
|
|
625
625
|
export const GL_BUTTON_DISABLED_BACKGROUND_COLOR = '#fbfafd';
|
|
626
626
|
export const GL_BUTTON_DISABLED_BORDER_COLOR = '#dcdcde';
|
|
627
|
+
export const GL_CHART_AXIS_POINTER_COLOR = '#626168';
|
|
628
|
+
export const GL_CHART_AXIS_LINE_COLOR = '#bfbfc3';
|
|
629
|
+
export const GL_CHART_AXIS_TEXT_COLOR = '#626168';
|
|
630
|
+
export const GL_CHART_THRESHOLD_AREA_COLOR = 'rgba(221,43,14,0.1)';
|
|
631
|
+
export const GL_CHART_THRESHOLD_LINE_COLOR = '#dd2b0e';
|
|
632
|
+
export const GL_CHART_ZOOM_FILLER_COLOR = 'rgba(05, 05, 06, 0.08)';
|
|
633
|
+
export const GL_CHART_ZOOM_HANDLE_COLOR = '#626168';
|
|
627
634
|
export const GL_DATEPICKER_BACKGROUND_COLOR = '#fff';
|
|
628
635
|
export const GL_DATEPICKER_DATE_TEXT_COLOR_SELECTED = '#fff';
|
|
629
636
|
export const GL_DROPDOWN_BACKGROUND_COLOR = '#fff';
|