@gitlab/ui 32.68.0 → 33.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 +42 -0
- package/dist/components/base/datepicker/datepicker.js +4 -1
- package/dist/components/base/dropdown/dropdown.js +4 -4
- package/dist/components/base/filtered_search/filtered_search.js +5 -2
- package/dist/components/base/filtered_search/filtered_search_token.js +12 -8
- package/dist/components/base/filtered_search/filtered_search_token_segment.js +6 -5
- package/dist/components/base/form/form_checkbox_tree/models/node.js +9 -8
- package/dist/components/base/form/form_checkbox_tree/models/tree.js +21 -10
- package/dist/components/base/form/form_input/form_input.js +14 -4
- package/dist/components/base/form/form_textarea/form_textarea.js +14 -4
- package/dist/components/base/infinite_scroll/infinite_scroll.documentation.js +2 -33
- package/dist/components/base/infinite_scroll/infinite_scroll.js +21 -3
- package/dist/components/base/pagination/pagination.js +2 -1
- package/dist/components/base/path/path.js +6 -5
- package/dist/components/base/popover/popover.js +25 -2
- package/dist/components/base/segmented_control/segmented_control.js +9 -4
- package/dist/components/base/skeleton_loader/skeleton_loader.js +6 -4
- package/dist/components/base/sorting/sorting_item.js +6 -5
- package/dist/components/base/table/table.js +5 -4
- package/dist/components/base/tabs/tabs/scrollable_tabs.js +6 -5
- package/dist/components/base/toast/toast.js +2 -1
- package/dist/components/base/token_selector/token_container.js +2 -1
- package/dist/components/base/token_selector/token_selector.js +2 -1
- package/dist/components/charts/bar/bar.js +2 -1
- package/dist/components/charts/column/column.documentation.js +1 -7
- package/dist/components/charts/column/column.js +17 -14
- package/dist/components/charts/gauge/gauge.js +45 -42
- package/dist/components/charts/sparkline/sparkline.js +6 -4
- package/dist/components/charts/stacked_column/stacked_column.js +17 -14
- package/dist/components/utilities/friendly_wrap/friendly_wrap.js +4 -3
- package/dist/components/utilities/sprintf/sprintf.js +4 -2
- package/dist/directives/hover_load/hover_load.js +5 -3
- package/dist/directives/outside/outside.js +12 -8
- package/dist/directives/resize_observer/examples/resize_observer.basic.example.js +7 -6
- package/dist/directives/resize_observer/resize_observer.js +12 -8
- package/dist/directives/safe_link/safe_link.js +12 -6
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/utility_classes.css +1 -1
- package/dist/utility_classes.css.map +1 -1
- package/dist/utils/charts/config.js +95 -72
- package/dist/utils/charts/story_config.js +4 -2
- package/dist/utils/charts/theme.js +106 -103
- package/dist/utils/charts/utils.js +14 -6
- package/dist/utils/number_utils.js +14 -5
- package/dist/utils/use_mock_intersection_observer.js +31 -11
- package/dist/utils/utils.js +15 -4
- package/dist/utils/validation_utils.js +3 -1
- package/documentation/documented_stories.js +2 -0
- package/package.json +17 -14
- package/src/components/base/infinite_scroll/infinite_scroll.documentation.js +0 -38
- package/src/components/base/infinite_scroll/infinite_scroll.md +0 -4
- package/src/components/base/infinite_scroll/infinite_scroll.stories.js +49 -24
- package/src/components/base/infinite_scroll/infinite_scroll.vue +18 -0
- package/src/components/base/popover/popover.scss +0 -5
- package/src/components/base/popover/popover.spec.js +42 -1
- package/src/components/base/popover/popover.stories.js +18 -0
- package/src/components/base/popover/popover.vue +32 -2
- package/src/components/base/search_box_by_click/search_box_by_click.scss +4 -0
- package/src/components/base/search_box_by_type/search_box_by_type.scss +4 -0
- package/src/components/charts/column/column.documentation.js +0 -5
- package/src/components/charts/column/column.stories.js +61 -88
- package/src/scss/utilities.scss +12 -26
- package/src/scss/utility-mixins/flex.scss +1 -8
- package/src/scss/utility-mixins/sizing.scss +4 -0
- package/src/scss/utility-mixins/spacing.scss +1 -7
- package/dist/components/charts/column/examples/column.basic.example.js +0 -49
- package/dist/components/charts/column/examples/index.js +0 -13
- package/src/components/charts/column/column.md +0 -1
- package/src/components/charts/column/examples/column.basic.example.vue +0 -22
- package/src/components/charts/column/examples/index.js +0 -15
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { withKnobs, object, text } from '@storybook/addon-knobs';
|
|
2
1
|
import { GlColumnChart } from '../../../../charts';
|
|
3
|
-
import { documentedStoriesOf } from '../../../../documentation/documented_stories';
|
|
4
2
|
import {
|
|
5
3
|
mockDefaultLineData,
|
|
6
4
|
mockDefaultBarData,
|
|
@@ -8,11 +6,6 @@ import {
|
|
|
8
6
|
mockSecondaryTrendlineData,
|
|
9
7
|
} from '../../../utils/charts/mock_data';
|
|
10
8
|
import { toolbox } from '../../../utils/charts/story_config';
|
|
11
|
-
import readme from './column.md';
|
|
12
|
-
|
|
13
|
-
const components = {
|
|
14
|
-
GlColumnChart,
|
|
15
|
-
};
|
|
16
9
|
|
|
17
10
|
const template = `
|
|
18
11
|
<gl-column-chart
|
|
@@ -27,7 +20,7 @@ const template = `
|
|
|
27
20
|
/>
|
|
28
21
|
`;
|
|
29
22
|
|
|
30
|
-
|
|
23
|
+
const generateProps = ({
|
|
31
24
|
bars = mockDefaultBarData,
|
|
32
25
|
lines = [],
|
|
33
26
|
option = {},
|
|
@@ -36,85 +29,65 @@ function generateProps({
|
|
|
36
29
|
xAxisType = 'category',
|
|
37
30
|
secondaryData = [],
|
|
38
31
|
secondaryDataTitle = '',
|
|
39
|
-
} = {}) {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
},
|
|
50
|
-
option: {
|
|
51
|
-
default: object('Echart Options', option),
|
|
52
|
-
},
|
|
53
|
-
yAxisTitle: {
|
|
54
|
-
default: text('Y Axis Title', yAxisTitle),
|
|
55
|
-
},
|
|
56
|
-
secondaryDataTitle: {
|
|
57
|
-
default: text('Secondary Y Axis Title', secondaryDataTitle),
|
|
58
|
-
},
|
|
59
|
-
xAxisTitle: {
|
|
60
|
-
default: text('X Axis Title', xAxisTitle),
|
|
61
|
-
},
|
|
62
|
-
xAxisType: {
|
|
63
|
-
default: text('X Axis Type', xAxisType),
|
|
64
|
-
},
|
|
65
|
-
};
|
|
66
|
-
}
|
|
32
|
+
} = {}) => ({
|
|
33
|
+
bars,
|
|
34
|
+
lines,
|
|
35
|
+
option,
|
|
36
|
+
yAxisTitle,
|
|
37
|
+
xAxisTitle,
|
|
38
|
+
xAxisType,
|
|
39
|
+
secondaryData,
|
|
40
|
+
secondaryDataTitle,
|
|
41
|
+
});
|
|
67
42
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
.
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
},
|
|
90
|
-
}),
|
|
91
|
-
components,
|
|
92
|
-
template,
|
|
93
|
-
}))
|
|
94
|
-
.add('with toolbox', () => ({
|
|
95
|
-
props: generateProps({
|
|
96
|
-
option: {
|
|
97
|
-
toolbox,
|
|
43
|
+
const Template = (args, { argTypes }) => ({
|
|
44
|
+
components: { GlColumnChart },
|
|
45
|
+
props: Object.keys(argTypes),
|
|
46
|
+
template,
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
export const Default = Template.bind({});
|
|
50
|
+
Default.args = generateProps();
|
|
51
|
+
|
|
52
|
+
export const WithLineSeries = Template.bind({});
|
|
53
|
+
WithLineSeries.args = generateProps({
|
|
54
|
+
lines: mockDefaultLineData,
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
export const WithZoomAndScroll = Template.bind({});
|
|
58
|
+
WithZoomAndScroll.args = generateProps({
|
|
59
|
+
option: {
|
|
60
|
+
dataZoom: [
|
|
61
|
+
{
|
|
62
|
+
type: 'slider',
|
|
63
|
+
startValue: 1,
|
|
98
64
|
},
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
65
|
+
],
|
|
66
|
+
},
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
export const WithToolbox = Template.bind({});
|
|
70
|
+
WithToolbox.args = generateProps({
|
|
71
|
+
option: {
|
|
72
|
+
toolbox,
|
|
73
|
+
},
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
export const SecondaryYAxis = Template.bind({});
|
|
77
|
+
SecondaryYAxis.args = generateProps({
|
|
78
|
+
legend: true,
|
|
79
|
+
secondaryData: mockSecondaryBarData,
|
|
80
|
+
secondaryDataTitle: 'New bar data',
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
export const SecondaryYAxisLine = Template.bind({});
|
|
84
|
+
SecondaryYAxisLine.args = generateProps({
|
|
85
|
+
legend: true,
|
|
86
|
+
secondaryData: mockSecondaryTrendlineData,
|
|
87
|
+
secondaryDataTitle: 'New line data',
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
export default {
|
|
91
|
+
title: 'charts/column-chart',
|
|
92
|
+
component: GlColumnChart,
|
|
93
|
+
};
|
package/src/scss/utilities.scss
CHANGED
|
@@ -2908,18 +2908,6 @@
|
|
|
2908
2908
|
}
|
|
2909
2909
|
}
|
|
2910
2910
|
|
|
2911
|
-
.gl-flex-sm-wrap {
|
|
2912
|
-
@include gl-media-breakpoint-up(sm) {
|
|
2913
|
-
flex-wrap: wrap;
|
|
2914
|
-
}
|
|
2915
|
-
}
|
|
2916
|
-
|
|
2917
|
-
.gl-flex-sm-wrap\! {
|
|
2918
|
-
@include gl-media-breakpoint-up(sm) {
|
|
2919
|
-
flex-wrap: wrap !important;
|
|
2920
|
-
}
|
|
2921
|
-
}
|
|
2922
|
-
|
|
2923
2911
|
.gl-flex-nowrap {
|
|
2924
2912
|
flex-wrap: nowrap;
|
|
2925
2913
|
}
|
|
@@ -3196,13 +3184,13 @@
|
|
|
3196
3184
|
justify-content: flex-start !important;
|
|
3197
3185
|
}
|
|
3198
3186
|
|
|
3199
|
-
.gl-justify-content-
|
|
3187
|
+
.gl-md-justify-content-start {
|
|
3200
3188
|
@include gl-media-breakpoint-up(md) {
|
|
3201
3189
|
justify-content: flex-start;
|
|
3202
3190
|
}
|
|
3203
3191
|
}
|
|
3204
3192
|
|
|
3205
|
-
.gl-justify-content-
|
|
3193
|
+
.gl-md-justify-content-start\! {
|
|
3206
3194
|
@include gl-media-breakpoint-up(md) {
|
|
3207
3195
|
justify-content: flex-start !important;
|
|
3208
3196
|
}
|
|
@@ -4347,6 +4335,14 @@
|
|
|
4347
4335
|
min-width: $gl-spacing-scale-8 !important;
|
|
4348
4336
|
}
|
|
4349
4337
|
|
|
4338
|
+
.gl-min-w-9 {
|
|
4339
|
+
min-width: $gl-spacing-scale-9;
|
|
4340
|
+
}
|
|
4341
|
+
|
|
4342
|
+
.gl-min-w-9\! {
|
|
4343
|
+
min-width: $gl-spacing-scale-9 !important;
|
|
4344
|
+
}
|
|
4345
|
+
|
|
4350
4346
|
.gl-min-w-10 {
|
|
4351
4347
|
min-width: $gl-spacing-scale-10;
|
|
4352
4348
|
}
|
|
@@ -4828,16 +4824,6 @@
|
|
|
4828
4824
|
.gl-pt-2\! {
|
|
4829
4825
|
padding-top: $gl-spacing-scale-2 !important;
|
|
4830
4826
|
}
|
|
4831
|
-
.gl-pt-md-2 {
|
|
4832
|
-
@include gl-media-breakpoint-up(md) {
|
|
4833
|
-
padding-top: $gl-spacing-scale-2;
|
|
4834
|
-
}
|
|
4835
|
-
}
|
|
4836
|
-
.gl-pt-md-2\! {
|
|
4837
|
-
@include gl-media-breakpoint-up(md) {
|
|
4838
|
-
padding-top: $gl-spacing-scale-2 !important;
|
|
4839
|
-
}
|
|
4840
|
-
}
|
|
4841
4827
|
.gl-pt-3 {
|
|
4842
4828
|
padding-top: $gl-spacing-scale-3;
|
|
4843
4829
|
}
|
|
@@ -5100,12 +5086,12 @@
|
|
|
5100
5086
|
.gl-mt-n1\! {
|
|
5101
5087
|
margin-top: -$gl-spacing-scale-1 !important;
|
|
5102
5088
|
}
|
|
5103
|
-
.gl-mt-
|
|
5089
|
+
.gl-md-mt-n2 {
|
|
5104
5090
|
@include gl-media-breakpoint-up(md) {
|
|
5105
5091
|
margin-top: -$gl-spacing-scale-2;
|
|
5106
5092
|
}
|
|
5107
5093
|
}
|
|
5108
|
-
.gl-mt-
|
|
5094
|
+
.gl-md-mt-n2\! {
|
|
5109
5095
|
@include gl-media-breakpoint-up(md) {
|
|
5110
5096
|
margin-top: -$gl-spacing-scale-2 !important;
|
|
5111
5097
|
}
|
|
@@ -79,13 +79,6 @@
|
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
// Deprecated, prefer `gl-sm-flex-wrap`
|
|
83
|
-
@mixin gl-flex-sm-wrap {
|
|
84
|
-
@include gl-media-breakpoint-up(sm) {
|
|
85
|
-
@include gl-flex-wrap;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
82
|
@mixin gl-flex-nowrap {
|
|
90
83
|
flex-wrap: nowrap;
|
|
91
84
|
}
|
|
@@ -224,7 +217,7 @@
|
|
|
224
217
|
justify-content: flex-start;
|
|
225
218
|
}
|
|
226
219
|
|
|
227
|
-
@mixin gl-justify-content-
|
|
220
|
+
@mixin gl-md-justify-content-start {
|
|
228
221
|
@include gl-media-breakpoint-up(md) {
|
|
229
222
|
@include gl-justify-content-start;
|
|
230
223
|
}
|
|
@@ -202,12 +202,6 @@
|
|
|
202
202
|
padding-top: $gl-spacing-scale-2;
|
|
203
203
|
}
|
|
204
204
|
|
|
205
|
-
@mixin gl-pt-md-2 {
|
|
206
|
-
@include gl-media-breakpoint-up(md) {
|
|
207
|
-
padding-top: $gl-spacing-scale-2;
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
|
|
211
205
|
@mixin gl-pt-3 {
|
|
212
206
|
padding-top: $gl-spacing-scale-3;
|
|
213
207
|
}
|
|
@@ -386,7 +380,7 @@
|
|
|
386
380
|
margin-top: -$gl-spacing-scale-1;
|
|
387
381
|
}
|
|
388
382
|
|
|
389
|
-
@mixin gl-mt-
|
|
383
|
+
@mixin gl-md-mt-n2 {
|
|
390
384
|
@include gl-media-breakpoint-up(md) {
|
|
391
385
|
margin-top: -$gl-spacing-scale-2;
|
|
392
386
|
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
2
|
-
|
|
3
|
-
/* script */
|
|
4
|
-
|
|
5
|
-
/* template */
|
|
6
|
-
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('gl-column-chart',{attrs:{"bars":[
|
|
7
|
-
{
|
|
8
|
-
name: 'Full',
|
|
9
|
-
data: [
|
|
10
|
-
['Joe', 1220],
|
|
11
|
-
['Sarah', 932],
|
|
12
|
-
['Tom', 901],
|
|
13
|
-
['Mary', 934],
|
|
14
|
-
['Mike', 1290],
|
|
15
|
-
['Ben', 1330],
|
|
16
|
-
['Jane', 1320] ],
|
|
17
|
-
} ],"option":{},"y-axis-title":"Pushes by day","x-axis-title":"User","x-axis-type":"category"}})};
|
|
18
|
-
var __vue_staticRenderFns__ = [];
|
|
19
|
-
|
|
20
|
-
/* style */
|
|
21
|
-
const __vue_inject_styles__ = undefined;
|
|
22
|
-
/* scoped */
|
|
23
|
-
const __vue_scope_id__ = undefined;
|
|
24
|
-
/* module identifier */
|
|
25
|
-
const __vue_module_identifier__ = undefined;
|
|
26
|
-
/* functional template */
|
|
27
|
-
const __vue_is_functional_template__ = false;
|
|
28
|
-
/* style inject */
|
|
29
|
-
|
|
30
|
-
/* style inject SSR */
|
|
31
|
-
|
|
32
|
-
/* style inject shadow dom */
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
const __vue_component__ = __vue_normalize__(
|
|
37
|
-
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
|
|
38
|
-
__vue_inject_styles__,
|
|
39
|
-
{},
|
|
40
|
-
__vue_scope_id__,
|
|
41
|
-
__vue_is_functional_template__,
|
|
42
|
-
__vue_module_identifier__,
|
|
43
|
-
false,
|
|
44
|
-
undefined,
|
|
45
|
-
undefined,
|
|
46
|
-
undefined
|
|
47
|
-
);
|
|
48
|
-
|
|
49
|
-
export default __vue_component__;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import ColumnChartBasicExample from './column.basic.example';
|
|
2
|
-
|
|
3
|
-
var index = [{
|
|
4
|
-
name: 'Basic',
|
|
5
|
-
items: [{
|
|
6
|
-
id: 'column-basic',
|
|
7
|
-
name: 'Basic',
|
|
8
|
-
description: 'Basic Column Chart',
|
|
9
|
-
component: ColumnChartBasicExample
|
|
10
|
-
}]
|
|
11
|
-
}];
|
|
12
|
-
|
|
13
|
-
export default index;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
### Column Chart
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<gl-column-chart
|
|
3
|
-
:bars="[
|
|
4
|
-
{
|
|
5
|
-
name: 'Full',
|
|
6
|
-
data: [
|
|
7
|
-
['Joe', 1220],
|
|
8
|
-
['Sarah', 932],
|
|
9
|
-
['Tom', 901],
|
|
10
|
-
['Mary', 934],
|
|
11
|
-
['Mike', 1290],
|
|
12
|
-
['Ben', 1330],
|
|
13
|
-
['Jane', 1320],
|
|
14
|
-
],
|
|
15
|
-
},
|
|
16
|
-
]"
|
|
17
|
-
:option="{}"
|
|
18
|
-
y-axis-title="Pushes by day"
|
|
19
|
-
x-axis-title="User"
|
|
20
|
-
x-axis-type="category"
|
|
21
|
-
/>
|
|
22
|
-
</template>
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import ColumnChartBasicExample from './column.basic.example.vue';
|
|
2
|
-
|
|
3
|
-
export default [
|
|
4
|
-
{
|
|
5
|
-
name: 'Basic',
|
|
6
|
-
items: [
|
|
7
|
-
{
|
|
8
|
-
id: 'column-basic',
|
|
9
|
-
name: 'Basic',
|
|
10
|
-
description: 'Basic Column Chart',
|
|
11
|
-
component: ColumnChartBasicExample,
|
|
12
|
-
},
|
|
13
|
-
],
|
|
14
|
-
},
|
|
15
|
-
];
|