@gitlab/ui 63.0.0 → 63.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/new_dropdowns/listbox/listbox.js +62 -2
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/utils/charts/theme.js +28 -3
- package/package.json +14 -14
- package/src/components/base/new_dropdowns/dropdown.scss +66 -0
- package/src/components/base/new_dropdowns/dropdown_item.scss +7 -2
- package/src/components/base/new_dropdowns/listbox/listbox.vue +80 -2
- package/src/components/charts/legend/legend.md +16 -0
- package/src/components/charts/legend/legend.stories.js +6 -0
- package/src/components/charts/stacked_column/__snapshots__/stacked_column.spec.js.snap +9 -9
- package/src/utils/charts/theme.js +70 -12
|
@@ -11,19 +11,32 @@ const gray300 = '#a4a3a8';
|
|
|
11
11
|
const gray500 = '#737278';
|
|
12
12
|
const gray600 = '#626168';
|
|
13
13
|
const gray900 = '#333238';
|
|
14
|
+
const dataVizGreen50 = '#ddfab7';
|
|
15
|
+
const dataVizGreen100 = '#c6ed94';
|
|
16
|
+
const dataVizGreen200 = '#b0d97b';
|
|
17
|
+
const dataVizGreen300 = '#94c25e';
|
|
18
|
+
const dataVizGreen400 = '#81ac41';
|
|
14
19
|
const dataVizGreen500 = '#619025';
|
|
15
20
|
const dataVizGreen600 = '#4e7f0e';
|
|
16
21
|
const dataVizGreen700 = '#366800';
|
|
17
22
|
const dataVizGreen800 = '#275600';
|
|
18
23
|
const dataVizGreen900 = '#1a4500';
|
|
19
24
|
const dataVizGreen950 = '#133a03';
|
|
25
|
+
const dataVizAqua50 = '#b5fefd';
|
|
26
|
+
const dataVizAqua100 = '#93f2ef';
|
|
27
|
+
const dataVizAqua200 = '#5edee3';
|
|
28
|
+
const dataVizAqua300 = '#32c5d2';
|
|
29
|
+
const dataVizAqua400 = '#00acc4';
|
|
20
30
|
const dataVizAqua500 = '#0090b1';
|
|
21
31
|
const dataVizAqua600 = '#007b9b';
|
|
22
32
|
const dataVizAqua700 = '#006381';
|
|
23
33
|
const dataVizAqua800 = '#00516c';
|
|
24
34
|
const dataVizAqua900 = '#004059';
|
|
25
35
|
const dataVizAqua950 = '#00344b';
|
|
36
|
+
const dataVizBlue50 = '#e9ebff';
|
|
37
|
+
const dataVizBlue100 = '#d2dcff';
|
|
26
38
|
const dataVizBlue200 = '#b7c6ff';
|
|
39
|
+
const dataVizBlue300 = '#97acff';
|
|
27
40
|
const dataVizBlue400 = '#7992f5';
|
|
28
41
|
const dataVizBlue500 = '#617ae2';
|
|
29
42
|
const dataVizBlue600 = '#4e65cd';
|
|
@@ -31,12 +44,22 @@ const dataVizBlue700 = '#3f51ae';
|
|
|
31
44
|
const dataVizBlue800 = '#374291';
|
|
32
45
|
const dataVizBlue900 = '#303470';
|
|
33
46
|
const dataVizBlue950 = '#2a2b59';
|
|
47
|
+
const dataVizMagenta50 = '#ffe3eb';
|
|
48
|
+
const dataVizMagenta100 = '#ffccdb';
|
|
49
|
+
const dataVizMagenta200 = '#fcacc5';
|
|
50
|
+
const dataVizMagenta300 = '#f88aaf';
|
|
51
|
+
const dataVizMagenta400 = '#e86e9a';
|
|
34
52
|
const dataVizMagenta500 = '#cf4d81';
|
|
35
53
|
const dataVizMagenta600 = '#b93d71';
|
|
36
54
|
const dataVizMagenta700 = '#9a2e5d';
|
|
37
55
|
const dataVizMagenta800 = '#7c214f';
|
|
38
56
|
const dataVizMagenta900 = '#661e3a';
|
|
39
57
|
const dataVizMagenta950 = '#541d31';
|
|
58
|
+
const dataVizOrange50 = '#fae8d1';
|
|
59
|
+
const dataVizOrange100 = '#f5d6b3';
|
|
60
|
+
const dataVizOrange200 = '#eebd8c';
|
|
61
|
+
const dataVizOrange300 = '#e99b60';
|
|
62
|
+
const dataVizOrange400 = '#e07e41';
|
|
40
63
|
const dataVizOrange500 = '#c95d2e';
|
|
41
64
|
const dataVizOrange600 = '#b14f18';
|
|
42
65
|
const dataVizOrange700 = '#92430a';
|
|
@@ -55,10 +78,12 @@ const gaugeWarningHue = dataVizOrange500;
|
|
|
55
78
|
* The default palette is based on the Categorical data palette
|
|
56
79
|
* Categorical data (also known as qualitative or thematic) uses hue to
|
|
57
80
|
* differentiate qualitative data, and lightness to differentiate quantitive data.
|
|
58
|
-
* More info: https://gitlab.com/
|
|
81
|
+
* More info: https://design.gitlab.com/data-visualization/color#categorical-data
|
|
59
82
|
*/
|
|
60
|
-
const colorPaletteDefault = [dataVizBlue500, dataVizOrange600, dataVizAqua500,
|
|
83
|
+
const colorPaletteDefault = [dataVizBlue500, dataVizOrange600, dataVizAqua500, dataVizGreen600, dataVizMagenta500, dataVizBlue700, dataVizOrange800, dataVizAqua700, dataVizGreen800, dataVizMagenta700, dataVizBlue900, dataVizOrange950, dataVizAqua900, dataVizGreen950, dataVizMagenta900, dataVizBlue600, dataVizOrange700, dataVizAqua600, dataVizGreen700, dataVizMagenta600, dataVizBlue800, dataVizOrange900, dataVizAqua800, dataVizGreen900, dataVizMagenta800, dataVizBlue950, dataVizOrange500, dataVizAqua950, dataVizGreen500, dataVizMagenta950];
|
|
61
84
|
const colorFromDefaultPalette = index => colorPaletteDefault[index % colorPaletteDefault.length];
|
|
85
|
+
const colorPaletteDark = [dataVizBlue500, dataVizOrange400, dataVizAqua500, dataVizGreen400, dataVizMagenta500, dataVizBlue300, dataVizOrange200, dataVizAqua300, dataVizGreen200, dataVizMagenta300, dataVizBlue100, dataVizOrange50, dataVizAqua100, dataVizGreen50, dataVizMagenta100, dataVizBlue400, dataVizOrange300, dataVizAqua400, dataVizGreen300, dataVizMagenta400, dataVizBlue200, dataVizOrange100, dataVizAqua200, dataVizGreen100, dataVizMagenta200, dataVizBlue50, dataVizOrange500, dataVizAqua50, dataVizGreen500, dataVizMagenta50];
|
|
86
|
+
const colorFromDarkPalette = index => colorPaletteDark[index % colorPaletteDark.length];
|
|
62
87
|
const axes = {
|
|
63
88
|
axisLabel: {
|
|
64
89
|
margin: 8,
|
|
@@ -229,4 +254,4 @@ const createTheme = function () {
|
|
|
229
254
|
};
|
|
230
255
|
};
|
|
231
256
|
|
|
232
|
-
export { colorFromDefaultPalette, colorPaletteDefault, createTheme, gaugeNeutralHues, gaugeSafeHues, gaugeWarningHue, heatmapHues, themeName };
|
|
257
|
+
export { colorFromDarkPalette, colorFromDefaultPalette, colorPaletteDark, colorPaletteDefault, createTheme, gaugeNeutralHues, gaugeSafeHues, gaugeWarningHue, heatmapHues, themeName };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitlab/ui",
|
|
3
|
-
"version": "63.
|
|
3
|
+
"version": "63.1.1",
|
|
4
4
|
"description": "GitLab UI Components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -89,22 +89,22 @@
|
|
|
89
89
|
"@gitlab/eslint-plugin": "19.0.0",
|
|
90
90
|
"@gitlab/fonts": "^1.2.0",
|
|
91
91
|
"@gitlab/stylelint-config": "4.1.0",
|
|
92
|
-
"@gitlab/svgs": "3.
|
|
92
|
+
"@gitlab/svgs": "3.47.0",
|
|
93
93
|
"@rollup/plugin-commonjs": "^11.1.0",
|
|
94
94
|
"@rollup/plugin-node-resolve": "^7.1.3",
|
|
95
95
|
"@rollup/plugin-replace": "^2.3.2",
|
|
96
|
-
"@storybook/addon-a11y": "7.0.
|
|
97
|
-
"@storybook/addon-docs": "7.0.
|
|
98
|
-
"@storybook/addon-essentials": "7.0.
|
|
99
|
-
"@storybook/addon-storyshots": "7.0.
|
|
100
|
-
"@storybook/addon-storyshots-puppeteer": "7.0.
|
|
101
|
-
"@storybook/addon-viewport": "7.0.
|
|
102
|
-
"@storybook/builder-webpack5": "7.0.
|
|
103
|
-
"@storybook/theming": "7.0.
|
|
104
|
-
"@storybook/vue": "7.0.
|
|
105
|
-
"@storybook/vue-webpack5": "7.0.
|
|
106
|
-
"@storybook/vue3": "7.0.
|
|
107
|
-
"@storybook/vue3-webpack5": "7.0.
|
|
96
|
+
"@storybook/addon-a11y": "7.0.12",
|
|
97
|
+
"@storybook/addon-docs": "7.0.12",
|
|
98
|
+
"@storybook/addon-essentials": "7.0.12",
|
|
99
|
+
"@storybook/addon-storyshots": "7.0.12",
|
|
100
|
+
"@storybook/addon-storyshots-puppeteer": "7.0.12",
|
|
101
|
+
"@storybook/addon-viewport": "7.0.12",
|
|
102
|
+
"@storybook/builder-webpack5": "7.0.12",
|
|
103
|
+
"@storybook/theming": "7.0.12",
|
|
104
|
+
"@storybook/vue": "7.0.12",
|
|
105
|
+
"@storybook/vue-webpack5": "7.0.12",
|
|
106
|
+
"@storybook/vue3": "7.0.12",
|
|
107
|
+
"@storybook/vue3-webpack5": "7.0.12",
|
|
108
108
|
"@vue/compat": "^3.2.40",
|
|
109
109
|
"@vue/compiler-sfc": "^3.2.40",
|
|
110
110
|
"@vue/test-utils": "1.3.0",
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
.gl-new-dropdown-contents {
|
|
35
|
+
@include gl-relative;
|
|
35
36
|
@include gl-flex-grow-1;
|
|
36
37
|
@include gl-overflow-y-auto;
|
|
37
38
|
@include gl-pl-0;
|
|
@@ -101,4 +102,69 @@
|
|
|
101
102
|
@include gl-mx-0;
|
|
102
103
|
}
|
|
103
104
|
}
|
|
105
|
+
|
|
106
|
+
$dropdown-content-padding: 0.25rem;
|
|
107
|
+
|
|
108
|
+
// Scrim overlay related styles (the shadow that appears above and below the content) indicating that the content is scrollable
|
|
109
|
+
.gl-new-dropdown-contents-with-scrim-overlay {
|
|
110
|
+
padding: 0;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.gl-new-dropdown-contents {
|
|
114
|
+
.top-scrim-wrapper,
|
|
115
|
+
.bottom-scrim-wrapper {
|
|
116
|
+
height: $dropdown-content-padding;
|
|
117
|
+
opacity: 0;
|
|
118
|
+
position: sticky;
|
|
119
|
+
z-index: 1;
|
|
120
|
+
display: block;
|
|
121
|
+
overflow: visible;
|
|
122
|
+
left: 1px;
|
|
123
|
+
right: 1px;
|
|
124
|
+
pointer-events: none;
|
|
125
|
+
transition: opacity 0.1s;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.top-scrim-wrapper {
|
|
129
|
+
top: 0;
|
|
130
|
+
|
|
131
|
+
.top-scrim {
|
|
132
|
+
left: 0;
|
|
133
|
+
right: 0;
|
|
134
|
+
|
|
135
|
+
&.top-scrim-light {
|
|
136
|
+
height: 2.25rem;
|
|
137
|
+
border-radius: 0.375rem 0.375rem 0 0;
|
|
138
|
+
background: linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0));
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
&.top-scrim-dark {
|
|
142
|
+
height: 0.25rem;
|
|
143
|
+
background: linear-gradient(180deg, rgba(0, 0, 0, 0.16) 0%, rgba(255, 255, 255, 0) 100%);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.bottom-scrim-wrapper {
|
|
149
|
+
bottom: 0;
|
|
150
|
+
height: $dropdown-content-padding;
|
|
151
|
+
|
|
152
|
+
.bottom-scrim {
|
|
153
|
+
height: 0;
|
|
154
|
+
position: relative;
|
|
155
|
+
top: calc(-2.25rem + #{$dropdown-content-padding});
|
|
156
|
+
border-radius: 0 0 0.375rem 0.375rem;
|
|
157
|
+
background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1));
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
&.top-scrim-visible .top-scrim-wrapper,
|
|
162
|
+
&.bottom-scrim-visible .bottom-scrim-wrapper {
|
|
163
|
+
opacity: 1;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
&.bottom-scrim-visible .bottom-scrim {
|
|
167
|
+
height: 2.25rem;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
104
170
|
}
|
|
@@ -3,11 +3,16 @@
|
|
|
3
3
|
@include gl-px-2;
|
|
4
4
|
@include gl-my-1;
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
/* when there is a scrim `li` items inside the list, the first and last real items
|
|
7
|
+
do not match the selector `:first-child` and `:last-child`,
|
|
8
|
+
that's why we have to target them with a different selector */
|
|
9
|
+
&:first-child,
|
|
10
|
+
.gl-new-dropdown-contents-with-scrim-overlay > &:nth-child(3):not(:last-child) {
|
|
7
11
|
@include gl-mt-0;
|
|
8
12
|
}
|
|
9
13
|
|
|
10
|
-
&:last-child
|
|
14
|
+
&:last-child,
|
|
15
|
+
.gl-new-dropdown-contents-with-scrim-overlay > &:nth-last-child(3):not(:first-child) {
|
|
11
16
|
@include gl-mb-0;
|
|
12
17
|
}
|
|
13
18
|
|
|
@@ -314,6 +314,8 @@ export default {
|
|
|
314
314
|
listboxId: uniqueId('listbox-'),
|
|
315
315
|
nextFocusedItemIndex: null,
|
|
316
316
|
searchStr: '',
|
|
317
|
+
topBoundaryVisible: true,
|
|
318
|
+
bottomBoundaryVisible: true,
|
|
317
319
|
};
|
|
318
320
|
},
|
|
319
321
|
computed: {
|
|
@@ -321,6 +323,15 @@ export default {
|
|
|
321
323
|
if (this.items.length === 0 || isOption(this.items[0])) return 'ul';
|
|
322
324
|
return 'div';
|
|
323
325
|
},
|
|
326
|
+
listboxClasses() {
|
|
327
|
+
return {
|
|
328
|
+
'top-scrim-visible': !this.topBoundaryVisible,
|
|
329
|
+
'bottom-scrim-visible': !this.bottomBoundaryVisible,
|
|
330
|
+
};
|
|
331
|
+
},
|
|
332
|
+
itemTag() {
|
|
333
|
+
return this.listboxTag === 'ul' ? 'li' : 'div';
|
|
334
|
+
},
|
|
324
335
|
flattenedOptions() {
|
|
325
336
|
return flattenedOptions(this.items);
|
|
326
337
|
},
|
|
@@ -379,6 +390,12 @@ export default {
|
|
|
379
390
|
}
|
|
380
391
|
return toggleClasses;
|
|
381
392
|
},
|
|
393
|
+
hasHeader() {
|
|
394
|
+
return this.headerText || this.searchable;
|
|
395
|
+
},
|
|
396
|
+
hasFooter() {
|
|
397
|
+
return Boolean(this.$scopedSlots.footer);
|
|
398
|
+
},
|
|
382
399
|
},
|
|
383
400
|
watch: {
|
|
384
401
|
selected: {
|
|
@@ -394,6 +411,15 @@ export default {
|
|
|
394
411
|
}
|
|
395
412
|
},
|
|
396
413
|
},
|
|
414
|
+
items: {
|
|
415
|
+
handler() {
|
|
416
|
+
this.$nextTick(() => {
|
|
417
|
+
/* Every time the list of items changes (on search),
|
|
418
|
+
* the observed elements are recreated, thus we need to start obesrving them again */
|
|
419
|
+
this.observeScroll();
|
|
420
|
+
});
|
|
421
|
+
},
|
|
422
|
+
},
|
|
397
423
|
...(process.env.NODE_ENV !== 'production'
|
|
398
424
|
? {
|
|
399
425
|
resetButtonLabel: {
|
|
@@ -419,6 +445,12 @@ export default {
|
|
|
419
445
|
}
|
|
420
446
|
: {}),
|
|
421
447
|
},
|
|
448
|
+
mounted() {
|
|
449
|
+
this.observeScroll();
|
|
450
|
+
},
|
|
451
|
+
beforeDestroy() {
|
|
452
|
+
this.scrollObserver?.disconnect();
|
|
453
|
+
},
|
|
422
454
|
methods: {
|
|
423
455
|
open() {
|
|
424
456
|
this.$refs.baseDropdown.open();
|
|
@@ -581,6 +613,35 @@ export default {
|
|
|
581
613
|
'aria-posinset': index + 1,
|
|
582
614
|
};
|
|
583
615
|
},
|
|
616
|
+
observeScroll() {
|
|
617
|
+
const root = this.$refs.list;
|
|
618
|
+
|
|
619
|
+
const options = {
|
|
620
|
+
rootMargin: '8px',
|
|
621
|
+
root,
|
|
622
|
+
threshold: 1.0,
|
|
623
|
+
};
|
|
624
|
+
|
|
625
|
+
this.scrollObserver?.disconnect();
|
|
626
|
+
|
|
627
|
+
const observer = new IntersectionObserver((entries) => {
|
|
628
|
+
entries.forEach((entry) => {
|
|
629
|
+
this[entry.target?.$__visibilityProp] = entry.isIntersecting;
|
|
630
|
+
});
|
|
631
|
+
}, options);
|
|
632
|
+
|
|
633
|
+
const topBoundary = this.$refs['top-boundary'];
|
|
634
|
+
const bottomBoundary = this.$refs['bottom-boundary'];
|
|
635
|
+
if (topBoundary) {
|
|
636
|
+
topBoundary.$__visibilityProp = 'topBoundaryVisible';
|
|
637
|
+
observer.observe(topBoundary);
|
|
638
|
+
}
|
|
639
|
+
if (bottomBoundary) {
|
|
640
|
+
bottomBoundary.$__visibilityProp = 'bottomBoundaryVisible';
|
|
641
|
+
observer.observe(bottomBoundary);
|
|
642
|
+
}
|
|
643
|
+
this.scrollObserver = observer;
|
|
644
|
+
},
|
|
584
645
|
isOption,
|
|
585
646
|
},
|
|
586
647
|
};
|
|
@@ -663,10 +724,18 @@ export default {
|
|
|
663
724
|
ref="list"
|
|
664
725
|
:aria-labelledby="listAriaLabelledBy || headerId || toggleId"
|
|
665
726
|
role="listbox"
|
|
666
|
-
class="gl-new-dropdown-contents"
|
|
727
|
+
class="gl-new-dropdown-contents gl-new-dropdown-contents-with-scrim-overlay"
|
|
728
|
+
:class="listboxClasses"
|
|
667
729
|
tabindex="-1"
|
|
668
730
|
@keydown="onKeydown"
|
|
669
731
|
>
|
|
732
|
+
<component :is="itemTag" class="top-scrim-wrapper" aria-hidden="true" data-testid="top-scrim">
|
|
733
|
+
<div
|
|
734
|
+
class="top-scrim"
|
|
735
|
+
:class="{ 'top-scrim-light': !hasHeader, 'top-scrim-dark': hasHeader }"
|
|
736
|
+
></div>
|
|
737
|
+
</component>
|
|
738
|
+
<component :is="itemTag" ref="top-boundary" aria-hidden="true" />
|
|
670
739
|
<template v-for="(item, index) in items">
|
|
671
740
|
<template v-if="isOption(item)">
|
|
672
741
|
<gl-listbox-item
|
|
@@ -714,13 +783,22 @@ export default {
|
|
|
714
783
|
</gl-listbox-group>
|
|
715
784
|
</template>
|
|
716
785
|
</template>
|
|
717
|
-
<component :is="
|
|
786
|
+
<component :is="itemTag" v-if="infiniteScrollLoading">
|
|
718
787
|
<gl-loading-icon data-testid="listbox-infinite-scroll-loader" size="md" class="gl-my-3" />
|
|
719
788
|
</component>
|
|
720
789
|
<gl-intersection-observer
|
|
721
790
|
v-if="showIntersectionObserver"
|
|
722
791
|
@appear="onIntersectionObserverAppear"
|
|
723
792
|
/>
|
|
793
|
+
<component :is="itemTag" ref="bottom-boundary" aria-hidden="true" />
|
|
794
|
+
<component
|
|
795
|
+
:is="itemTag"
|
|
796
|
+
class="bottom-scrim-wrapper"
|
|
797
|
+
aria-hidden="true"
|
|
798
|
+
data-testid="bottom-scrim"
|
|
799
|
+
>
|
|
800
|
+
<div class="bottom-scrim" :class="{ 'gl-rounded-0!': hasFooter }"></div>
|
|
801
|
+
</component>
|
|
724
802
|
</component>
|
|
725
803
|
<span
|
|
726
804
|
v-if="announceSRSearchResults"
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
## Disabling Legends
|
|
2
|
+
|
|
3
|
+
By default, to prevent the chart from disappearing, all legends can't be toggled off – the last
|
|
4
|
+
active legend will be disabled. To manually disable a legend, pass it the
|
|
5
|
+
`disabled` property in `seriesInfo`:
|
|
6
|
+
|
|
7
|
+
```js
|
|
8
|
+
seriesInfo = [
|
|
9
|
+
{
|
|
10
|
+
name: 'Example Legend',
|
|
11
|
+
color: 'blue',
|
|
12
|
+
disabled: true,
|
|
13
|
+
type: 'line'
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
```
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
SERIES_NAME_LONG_WITHOUT_SPACES,
|
|
8
8
|
} from '../../../utils/stories_constants';
|
|
9
9
|
import { gray200 } from '../../../../scss_to_js/scss_variables';
|
|
10
|
+
import readme from './legend.md';
|
|
10
11
|
|
|
11
12
|
const generateOptions = (seriesLength, seriesNameType) => {
|
|
12
13
|
return {
|
|
@@ -127,5 +128,10 @@ export default {
|
|
|
127
128
|
component: GlChartLegend,
|
|
128
129
|
parameters: {
|
|
129
130
|
controls: { disable: true },
|
|
131
|
+
docs: {
|
|
132
|
+
description: {
|
|
133
|
+
component: readme,
|
|
134
|
+
},
|
|
135
|
+
},
|
|
130
136
|
},
|
|
131
137
|
};
|
|
@@ -418,13 +418,13 @@ Object {
|
|
|
418
418
|
],
|
|
419
419
|
"emphasis": Object {
|
|
420
420
|
"itemStyle": Object {
|
|
421
|
-
"color": "rgba(
|
|
421
|
+
"color": "rgba(78, 127, 14, 0.4)",
|
|
422
422
|
},
|
|
423
423
|
},
|
|
424
424
|
"itemStyle": Object {
|
|
425
|
-
"borderColor": "#
|
|
425
|
+
"borderColor": "#4e7f0e",
|
|
426
426
|
"borderWidth": 1,
|
|
427
|
-
"color": "rgba(
|
|
427
|
+
"color": "rgba(78, 127, 14, 0.2)",
|
|
428
428
|
},
|
|
429
429
|
"name": "Fun 4",
|
|
430
430
|
"stack": Array [
|
|
@@ -779,13 +779,13 @@ Object {
|
|
|
779
779
|
],
|
|
780
780
|
"emphasis": Object {
|
|
781
781
|
"itemStyle": Object {
|
|
782
|
-
"color": "rgba(
|
|
782
|
+
"color": "rgba(78, 127, 14, 0.4)",
|
|
783
783
|
},
|
|
784
784
|
},
|
|
785
785
|
"itemStyle": Object {
|
|
786
|
-
"borderColor": "#
|
|
786
|
+
"borderColor": "#4e7f0e",
|
|
787
787
|
"borderWidth": 1,
|
|
788
|
-
"color": "rgba(
|
|
788
|
+
"color": "rgba(78, 127, 14, 0.2)",
|
|
789
789
|
},
|
|
790
790
|
"name": "Fun 4",
|
|
791
791
|
"stack": Array [
|
|
@@ -823,13 +823,13 @@ Object {
|
|
|
823
823
|
],
|
|
824
824
|
"emphasis": Object {
|
|
825
825
|
"itemStyle": Object {
|
|
826
|
-
"color": "rgba(
|
|
826
|
+
"color": "rgba(207, 77, 129, 0.4)",
|
|
827
827
|
},
|
|
828
828
|
},
|
|
829
829
|
"itemStyle": Object {
|
|
830
|
-
"borderColor": "#
|
|
830
|
+
"borderColor": "#cf4d81",
|
|
831
831
|
"borderWidth": 1,
|
|
832
|
-
"color": "rgba(
|
|
832
|
+
"color": "rgba(207, 77, 129, 0.2)",
|
|
833
833
|
},
|
|
834
834
|
"name": "Secondary 1",
|
|
835
835
|
"stack": "tiled",
|
|
@@ -8,13 +8,21 @@ import {
|
|
|
8
8
|
gray900,
|
|
9
9
|
red500,
|
|
10
10
|
whiteNormal,
|
|
11
|
+
dataVizAqua50,
|
|
12
|
+
dataVizAqua100,
|
|
13
|
+
dataVizAqua200,
|
|
14
|
+
dataVizAqua300,
|
|
15
|
+
dataVizAqua400,
|
|
11
16
|
dataVizAqua500,
|
|
12
17
|
dataVizAqua600,
|
|
13
18
|
dataVizAqua700,
|
|
14
19
|
dataVizAqua800,
|
|
15
20
|
dataVizAqua900,
|
|
16
21
|
dataVizAqua950,
|
|
22
|
+
dataVizBlue50,
|
|
23
|
+
dataVizBlue100,
|
|
17
24
|
dataVizBlue200,
|
|
25
|
+
dataVizBlue300,
|
|
18
26
|
dataVizBlue400,
|
|
19
27
|
dataVizBlue500,
|
|
20
28
|
dataVizBlue600,
|
|
@@ -22,18 +30,33 @@ import {
|
|
|
22
30
|
dataVizBlue800,
|
|
23
31
|
dataVizBlue900,
|
|
24
32
|
dataVizBlue950,
|
|
33
|
+
dataVizGreen50,
|
|
34
|
+
dataVizGreen100,
|
|
35
|
+
dataVizGreen200,
|
|
36
|
+
dataVizGreen300,
|
|
37
|
+
dataVizGreen400,
|
|
25
38
|
dataVizGreen500,
|
|
26
39
|
dataVizGreen600,
|
|
27
40
|
dataVizGreen700,
|
|
28
41
|
dataVizGreen800,
|
|
29
42
|
dataVizGreen900,
|
|
30
43
|
dataVizGreen950,
|
|
44
|
+
dataVizMagenta50,
|
|
45
|
+
dataVizMagenta100,
|
|
46
|
+
dataVizMagenta200,
|
|
47
|
+
dataVizMagenta300,
|
|
48
|
+
dataVizMagenta400,
|
|
31
49
|
dataVizMagenta500,
|
|
32
50
|
dataVizMagenta600,
|
|
33
51
|
dataVizMagenta700,
|
|
34
52
|
dataVizMagenta800,
|
|
35
53
|
dataVizMagenta900,
|
|
36
54
|
dataVizMagenta950,
|
|
55
|
+
dataVizOrange50,
|
|
56
|
+
dataVizOrange100,
|
|
57
|
+
dataVizOrange200,
|
|
58
|
+
dataVizOrange300,
|
|
59
|
+
dataVizOrange400,
|
|
37
60
|
dataVizOrange500,
|
|
38
61
|
dataVizOrange600,
|
|
39
62
|
dataVizOrange700,
|
|
@@ -64,43 +87,78 @@ export const gaugeWarningHue = dataVizOrange500;
|
|
|
64
87
|
* The default palette is based on the Categorical data palette
|
|
65
88
|
* Categorical data (also known as qualitative or thematic) uses hue to
|
|
66
89
|
* differentiate qualitative data, and lightness to differentiate quantitive data.
|
|
67
|
-
* More info: https://gitlab.com/
|
|
90
|
+
* More info: https://design.gitlab.com/data-visualization/color#categorical-data
|
|
68
91
|
*/
|
|
69
92
|
export const colorPaletteDefault = [
|
|
70
93
|
dataVizBlue500,
|
|
71
94
|
dataVizOrange600,
|
|
72
95
|
dataVizAqua500,
|
|
73
|
-
|
|
74
|
-
|
|
96
|
+
dataVizGreen600,
|
|
97
|
+
dataVizMagenta500,
|
|
75
98
|
dataVizBlue700,
|
|
76
99
|
dataVizOrange800,
|
|
77
100
|
dataVizAqua700,
|
|
78
|
-
|
|
79
|
-
|
|
101
|
+
dataVizGreen800,
|
|
102
|
+
dataVizMagenta700,
|
|
80
103
|
dataVizBlue900,
|
|
81
104
|
dataVizOrange950,
|
|
82
105
|
dataVizAqua900,
|
|
83
|
-
|
|
84
|
-
|
|
106
|
+
dataVizGreen950,
|
|
107
|
+
dataVizMagenta900,
|
|
85
108
|
dataVizBlue600,
|
|
86
109
|
dataVizOrange700,
|
|
87
110
|
dataVizAqua600,
|
|
88
|
-
|
|
89
|
-
|
|
111
|
+
dataVizGreen700,
|
|
112
|
+
dataVizMagenta600,
|
|
90
113
|
dataVizBlue800,
|
|
91
114
|
dataVizOrange900,
|
|
92
115
|
dataVizAqua800,
|
|
93
|
-
|
|
94
|
-
|
|
116
|
+
dataVizGreen900,
|
|
117
|
+
dataVizMagenta800,
|
|
95
118
|
dataVizBlue950,
|
|
96
119
|
dataVizOrange500,
|
|
97
120
|
dataVizAqua950,
|
|
98
121
|
dataVizGreen500,
|
|
99
|
-
|
|
122
|
+
dataVizMagenta950,
|
|
100
123
|
];
|
|
101
124
|
export const colorFromDefaultPalette = (index) =>
|
|
102
125
|
colorPaletteDefault[index % colorPaletteDefault.length];
|
|
103
126
|
|
|
127
|
+
export const colorPaletteDark = [
|
|
128
|
+
dataVizBlue500,
|
|
129
|
+
dataVizOrange400,
|
|
130
|
+
dataVizAqua500,
|
|
131
|
+
dataVizGreen400,
|
|
132
|
+
dataVizMagenta500,
|
|
133
|
+
dataVizBlue300,
|
|
134
|
+
dataVizOrange200,
|
|
135
|
+
dataVizAqua300,
|
|
136
|
+
dataVizGreen200,
|
|
137
|
+
dataVizMagenta300,
|
|
138
|
+
dataVizBlue100,
|
|
139
|
+
dataVizOrange50,
|
|
140
|
+
dataVizAqua100,
|
|
141
|
+
dataVizGreen50,
|
|
142
|
+
dataVizMagenta100,
|
|
143
|
+
dataVizBlue400,
|
|
144
|
+
dataVizOrange300,
|
|
145
|
+
dataVizAqua400,
|
|
146
|
+
dataVizGreen300,
|
|
147
|
+
dataVizMagenta400,
|
|
148
|
+
dataVizBlue200,
|
|
149
|
+
dataVizOrange100,
|
|
150
|
+
dataVizAqua200,
|
|
151
|
+
dataVizGreen100,
|
|
152
|
+
dataVizMagenta200,
|
|
153
|
+
dataVizBlue50,
|
|
154
|
+
dataVizOrange500,
|
|
155
|
+
dataVizAqua50,
|
|
156
|
+
dataVizGreen500,
|
|
157
|
+
dataVizMagenta50,
|
|
158
|
+
];
|
|
159
|
+
|
|
160
|
+
export const colorFromDarkPalette = (index) => colorPaletteDark[index % colorPaletteDark.length];
|
|
161
|
+
|
|
104
162
|
const axes = {
|
|
105
163
|
axisLabel: {
|
|
106
164
|
margin: 8,
|