@gitlab/ui 108.5.0 → 108.7.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/stacked_column/stacked_column.js +37 -27
- package/dist/index.css +2 -2
- package/dist/index.css.map +1 -1
- package/dist/tokens/build/js/tokens.dark.js +12 -12
- package/dist/tokens/build/js/tokens.js +1 -1
- package/dist/tokens/css/tokens.css +1 -1
- package/dist/tokens/css/tokens.dark.css +11 -11
- package/dist/tokens/js/tokens.dark.js +12 -12
- package/dist/tokens/js/tokens.js +1 -1
- package/dist/tokens/json/tokens.dark.json +47 -23
- package/dist/tokens/json/tokens.json +36 -12
- package/dist/tokens/scss/_tokens.dark.scss +11 -11
- package/dist/tokens/scss/_tokens.scss +1 -1
- package/dist/utils/charts/config.js +2 -1
- package/package.json +1 -1
- package/src/components/base/button/button.scss +32 -1
- package/src/components/base/button_group/button_group.scss +7 -7
- package/src/components/charts/stacked_column/stacked_column.vue +36 -34
- package/src/tokens/build/css/tokens.css +1 -1
- package/src/tokens/build/css/tokens.dark.css +11 -11
- package/src/tokens/build/js/tokens.dark.js +12 -12
- package/src/tokens/build/js/tokens.js +1 -1
- package/src/tokens/build/json/tokens.dark.json +47 -23
- package/src/tokens/build/json/tokens.json +36 -12
- package/src/tokens/build/scss/_tokens.dark.scss +11 -11
- package/src/tokens/build/scss/_tokens.scss +1 -1
- package/src/tokens/contextual/button.tokens.json +35 -11
- package/src/utils/charts/config.js +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [108.7.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v108.6.0...v108.7.0) (2025-02-26)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **GlStackedColumnChart:** Simplify chart tooltip API ([837c638](https://gitlab.com/gitlab-org/gitlab-ui/commit/837c638616a4cf1856482859b04a8315f2c99b65))
|
|
7
|
+
|
|
8
|
+
# [108.6.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v108.5.0...v108.6.0) (2025-02-26)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* **GlButtonGroup:** Selected state ([f4afaec](https://gitlab.com/gitlab-org/gitlab-ui/commit/f4afaecf6dca9c0c188289f69f0fa2204d43c047))
|
|
14
|
+
|
|
1
15
|
# [108.5.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v108.4.1...v108.5.0) (2025-02-26)
|
|
2
16
|
|
|
3
17
|
|
|
@@ -3,10 +3,10 @@ import { yAxis, generateBarSeries, generateLineSeries, defaultChartOptions, grid
|
|
|
3
3
|
import { LEGEND_AVERAGE_TEXT, LEGEND_MAX_TEXT, LEGEND_MIN_TEXT, LEGEND_CURRENT_TEXT, LEGEND_LAYOUT_INLINE, LEGEND_LAYOUT_TABLE, CHART_TYPE_LINE, HEIGHT_AUTO_CLASSES } from '../../../utils/charts/constants';
|
|
4
4
|
import { colorFromDefaultPalette } from '../../../utils/charts/theme';
|
|
5
5
|
import { columnOptions } from '../../../utils/constants';
|
|
6
|
-
import TooltipDefaultFormat from '../../shared_components/charts/tooltip_default_format';
|
|
7
6
|
import Chart from '../chart/chart';
|
|
8
7
|
import ChartLegend from '../legend/legend';
|
|
9
8
|
import ChartTooltip from '../tooltip/tooltip';
|
|
9
|
+
import TooltipDefaultFormat from '../../shared_components/charts/tooltip_default_format';
|
|
10
10
|
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
11
11
|
|
|
12
12
|
const yAxisDefaults = {
|
|
@@ -112,6 +112,12 @@ var script = {
|
|
|
112
112
|
return [LEGEND_LAYOUT_INLINE, LEGEND_LAYOUT_TABLE].indexOf(layout) !== -1;
|
|
113
113
|
}
|
|
114
114
|
},
|
|
115
|
+
/**
|
|
116
|
+
* Callback called when showing or refreshing a tooltip.
|
|
117
|
+
* **Deprecated:** Use slots `#tooltip-title`, `#tooltip-content` or `#tooltip-value`.
|
|
118
|
+
*
|
|
119
|
+
* @deprecated Use slots `#tooltip-title`, `#tooltip-content` or `#tooltip-value`.
|
|
120
|
+
*/
|
|
115
121
|
formatTooltipText: {
|
|
116
122
|
type: Function,
|
|
117
123
|
required: false,
|
|
@@ -133,9 +139,7 @@ var script = {
|
|
|
133
139
|
},
|
|
134
140
|
data() {
|
|
135
141
|
return {
|
|
136
|
-
chart: null
|
|
137
|
-
tooltipTitle: '',
|
|
138
|
-
tooltipContent: {}
|
|
142
|
+
chart: null
|
|
139
143
|
};
|
|
140
144
|
},
|
|
141
145
|
computed: {
|
|
@@ -216,7 +220,7 @@ var script = {
|
|
|
216
220
|
show: true,
|
|
217
221
|
type: 'none',
|
|
218
222
|
label: {
|
|
219
|
-
formatter: this.
|
|
223
|
+
formatter: this.formatTooltipText
|
|
220
224
|
}
|
|
221
225
|
},
|
|
222
226
|
data: this.groupBy,
|
|
@@ -272,28 +276,34 @@ var script = {
|
|
|
272
276
|
this.chart = chart;
|
|
273
277
|
this.$emit('created', chart);
|
|
274
278
|
},
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
return acc;
|
|
285
|
-
}, {
|
|
286
|
-
tooltipContent: {}
|
|
287
|
-
});
|
|
288
|
-
this.tooltipTitle = params.value;
|
|
289
|
-
this.$set(this, 'tooltipContent', tooltipContent);
|
|
279
|
+
getTooltipTitle(_ref4) {
|
|
280
|
+
var _options$xAxis, _options$xAxis$;
|
|
281
|
+
let {
|
|
282
|
+
params
|
|
283
|
+
} = _ref4;
|
|
284
|
+
if (!params) return '';
|
|
285
|
+
const options = this.chart.getOption();
|
|
286
|
+
const titleAxisName = options === null || options === void 0 ? void 0 : (_options$xAxis = options.xAxis) === null || _options$xAxis === void 0 ? void 0 : (_options$xAxis$ = _options$xAxis[0]) === null || _options$xAxis$ === void 0 ? void 0 : _options$xAxis$.name;
|
|
287
|
+
return titleAxisName ? `${params.value} (${titleAxisName})` : params.value;
|
|
290
288
|
},
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
|
|
289
|
+
getTooltipContent(_ref5) {
|
|
290
|
+
let {
|
|
291
|
+
params
|
|
292
|
+
} = _ref5;
|
|
293
|
+
if (!params) return {};
|
|
294
|
+
const tooltipContentEntries = params.seriesData.toSorted((a, b) => b.seriesIndex - a.seriesIndex) // Invert stacking order so it matches chart (see https://github.com/apache/echarts/issues/14700)
|
|
295
|
+
.map(_ref6 => {
|
|
296
|
+
let {
|
|
297
|
+
seriesName = '',
|
|
298
|
+
value,
|
|
299
|
+
borderColor
|
|
300
|
+
} = _ref6;
|
|
301
|
+
return [seriesName, {
|
|
302
|
+
value,
|
|
303
|
+
color: borderColor
|
|
304
|
+
}];
|
|
305
|
+
});
|
|
306
|
+
return Object.fromEntries(tooltipContentEntries);
|
|
297
307
|
}
|
|
298
308
|
},
|
|
299
309
|
HEIGHT_AUTO_CLASSES
|
|
@@ -305,7 +315,7 @@ const __vue_script__ = script;
|
|
|
305
315
|
/* template */
|
|
306
316
|
var __vue_render__ = function () {
|
|
307
317
|
var _obj;
|
|
308
|
-
var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"gl-relative",class:( _obj = {}, _obj[_vm.$options.HEIGHT_AUTO_CLASSES] = _vm.autoHeight, _obj )},[_c('chart',_vm._g(_vm._b({class:{ 'gl-grow': _vm.autoHeight },attrs:{"height":_vm.height,"options":_vm.options},on:{"created":_vm.onCreated}},'chart',_vm.$attrs,false),_vm.$listeners)),_vm._v(" "),(_vm.chart)?_c('chart-tooltip',{attrs:{"chart":_vm.chart},scopedSlots:_vm._u([{key:"title",fn:function(){return [_vm._t("tooltip-title",function(){return [_vm._v(_vm._s(_vm.
|
|
318
|
+
var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"gl-relative",class:( _obj = {}, _obj[_vm.$options.HEIGHT_AUTO_CLASSES] = _vm.autoHeight, _obj )},[_c('chart',_vm._g(_vm._b({class:{ 'gl-grow': _vm.autoHeight },attrs:{"height":_vm.height,"options":_vm.options},on:{"created":_vm.onCreated}},'chart',_vm.$attrs,false),_vm.$listeners)),_vm._v(" "),(_vm.chart)?_c('chart-tooltip',{attrs:{"chart":_vm.chart,"use-default-tooltip-formatter":!_vm.formatTooltipText},scopedSlots:_vm._u([{key:"title",fn:function(scope){return [_vm._t("tooltip-title",function(){return [_vm._v(_vm._s(_vm.getTooltipTitle(scope)))]},null,scope)]}},{key:"default",fn:function(scope){return [_vm._t("tooltip-content",function(){return [_c('tooltip-default-format',{attrs:{"tooltip-content":_vm.getTooltipContent(scope)},scopedSlots:_vm._u([(_vm.$scopedSlots['tooltip-value'])?{key:"tooltip-value",fn:function(valueScope){return [_vm._t("tooltip-value",null,null,valueScope)]}}:null],null,true)})]},null,scope)]}}],null,true)}):_vm._e(),_vm._v(" "),(_vm.compiledOptions)?_c('chart-legend',{style:(_vm.legendStyle),attrs:{"chart":_vm.chart,"series-info":_vm.seriesInfo,"text-style":_vm.compiledOptions.textStyle,"min-text":_vm.legendMinText,"max-text":_vm.legendMaxText,"average-text":_vm.legendAverageText,"current-text":_vm.legendCurrentText,"layout":_vm.legendLayout}}):_vm._e()],1)};
|
|
309
319
|
var __vue_staticRenderFns__ = [];
|
|
310
320
|
|
|
311
321
|
/* style */
|