@gitlab/ui 69.1.0 → 70.0.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.
Files changed (32) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/components/charts/bar/bar.js +3 -27
  3. package/dist/components/charts/column/column.js +2 -22
  4. package/dist/components/charts/discrete_scatter/discrete_scatter.js +1 -10
  5. package/dist/components/charts/heatmap/heatmap.js +1 -13
  6. package/dist/components/charts/line/line.js +1 -24
  7. package/dist/components/charts/sparkline/sparkline.js +1 -6
  8. package/dist/components/charts/stacked_column/stacked_column.js +2 -25
  9. package/dist/tokens/css/tokens.css +1 -1
  10. package/dist/tokens/css/tokens.dark.css +1 -1
  11. package/dist/tokens/js/tokens.dark.js +1 -1
  12. package/dist/tokens/js/tokens.js +1 -1
  13. package/dist/tokens/scss/_tokens.dark.scss +1 -1
  14. package/dist/tokens/scss/_tokens.scss +1 -1
  15. package/dist/utils/charts/theme.js +2 -3
  16. package/dist/utils/constants.js +1 -3
  17. package/package.json +7 -9
  18. package/src/components/charts/area/area.spec.js +1 -1
  19. package/src/components/charts/bar/bar.vue +2 -29
  20. package/src/components/charts/column/column.vue +1 -27
  21. package/src/components/charts/discrete_scatter/discrete_scatter.vue +0 -10
  22. package/src/components/charts/heatmap/heatmap.vue +1 -19
  23. package/src/components/charts/line/line.spec.js +3 -80
  24. package/src/components/charts/line/line.vue +1 -35
  25. package/src/components/charts/sparkline/sparkline.spec.js +0 -38
  26. package/src/components/charts/sparkline/sparkline.vue +0 -8
  27. package/src/components/charts/stacked_column/stacked_column.spec.js +4 -97
  28. package/src/components/charts/stacked_column/stacked_column.vue +1 -27
  29. package/src/utils/charts/theme.js +3 -2
  30. package/src/utils/constants.js +1 -3
  31. package/scss_to_js/scss_variables.js +0 -386
  32. package/scss_to_js/scss_variables.json +0 -2192
package/CHANGELOG.md CHANGED
@@ -1,3 +1,23 @@
1
+ ## [70.0.1](https://gitlab.com/gitlab-org/gitlab-ui/compare/v70.0.0...v70.0.1) (2023-11-21)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **GlChart:** Tooltip fix on MS Edge ([5eab629](https://gitlab.com/gitlab-org/gitlab-ui/commit/5eab629cff921370f60717b5460b0d33e2188714))
7
+
8
+ # [70.0.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v69.1.0...v70.0.0) (2023-11-21)
9
+
10
+
11
+ ### Performance Improvements
12
+
13
+ * remove exported scss_to_js scripts and usages ([b198d8b](https://gitlab.com/gitlab-org/gitlab-ui/commit/b198d8ba2813b96126c65310ba52065abd845a5e))
14
+
15
+
16
+ ### BREAKING CHANGES
17
+
18
+ * Remove scss_to_js export. Prefer use of
19
+ /dist/tokens/js/tokens.js for importing generated token variables.
20
+
1
21
  # [69.1.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v69.0.0...v69.1.0) (2023-11-20)
2
22
 
3
23
 
@@ -4,7 +4,7 @@ import { dataZoomAdjustments, mergeSeriesToOptions, grid } from '../../../utils/
4
4
  import { HEIGHT_AUTO_CLASSES } from '../../../utils/charts/constants';
5
5
  import { colorFromDefaultPalette } from '../../../utils/charts/theme';
6
6
  import { engineeringNotation } from '../../../utils/number_utils';
7
- import { debounceByAnimationFrame, hexToRgba } from '../../../utils/utils';
7
+ import { hexToRgba } from '../../../utils/utils';
8
8
  import TooltipDefaultFormat from '../../shared_components/charts/tooltip_default_format';
9
9
  import Chart from '../chart/chart';
10
10
  import ChartTooltip from '../tooltip/tooltip';
@@ -97,14 +97,8 @@ var script = {
97
97
  data() {
98
98
  return {
99
99
  chart: null,
100
- showTooltip: false,
101
100
  tooltipTitle: '',
102
- tooltipContent: {},
103
- tooltipPosition: {
104
- left: '0',
105
- top: '0'
106
- },
107
- debouncedMoveShowTooltip: debounceByAnimationFrame(this.moveShowTooltip)
101
+ tooltipContent: {}
108
102
  };
109
103
  },
110
104
  computed: {
@@ -165,28 +159,10 @@ var script = {
165
159
  return this.height === 'auto';
166
160
  }
167
161
  },
168
- beforeDestroy() {
169
- if (this.chart) {
170
- this.chart.getZr().off('mousemove', this.debouncedMoveShowTooltip);
171
- this.chart.getZr().off('mouseout', this.debouncedMoveShowTooltip);
172
- }
173
- },
174
162
  methods: {
175
- moveShowTooltip(_ref) {
176
- let {
177
- event: mouseEvent
178
- } = _ref;
179
- this.tooltipPosition = {
180
- left: `${mouseEvent.zrX}px`,
181
- top: `${mouseEvent.zrY}px`
182
- };
183
- this.showTooltip = this.chart.containPixel('grid', [mouseEvent.zrX, mouseEvent.zrY]);
184
- },
185
163
  onCreated(chart) {
186
164
  this.chart = chart;
187
165
  this.$emit('created', chart);
188
- chart.getZr().on('mousemove', this.debouncedMoveShowTooltip);
189
- chart.getZr().on('mouseout', this.debouncedMoveShowTooltip);
190
166
  },
191
167
  onLabelChange(params) {
192
168
  const {
@@ -243,7 +219,7 @@ const __vue_script__ = script;
243
219
  /* template */
244
220
  var __vue_render__ = function () {
245
221
  var _obj;
246
- var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"position-relative",class:( _obj = {}, _obj[_vm.$options.HEIGHT_AUTO_CLASSES] = _vm.autoHeight, _obj )},[_c('chart',_vm._g(_vm._b({class:{ 'gl-flex-grow-1': _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:{"show":_vm.showTooltip,"chart":_vm.chart,"top":_vm.tooltipPosition.top,"left":_vm.tooltipPosition.left},scopedSlots:_vm._u([{key:"title",fn:function(){return [_c('div',[_vm._v(_vm._s(_vm.tooltipTitle)+" ("+_vm._s(_vm.yAxisTitle)+")")])]},proxy:true}],null,false,1644826356)},[_vm._v(" "),_c('tooltip-default-format',{attrs:{"tooltip-content":_vm.tooltipContent}})],1):_vm._e()],1)};
222
+ var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"position-relative",class:( _obj = {}, _obj[_vm.$options.HEIGHT_AUTO_CLASSES] = _vm.autoHeight, _obj )},[_c('chart',_vm._g(_vm._b({class:{ 'gl-flex-grow-1': _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 [_c('div',[_vm._v(_vm._s(_vm.tooltipTitle)+" ("+_vm._s(_vm.yAxisTitle)+")")])]},proxy:true}],null,false,1644826356)},[_vm._v(" "),_c('tooltip-default-format',{attrs:{"tooltip-content":_vm.tooltipContent}})],1):_vm._e()],1)};
247
223
  var __vue_staticRenderFns__ = [];
248
224
 
249
225
  /* style */
@@ -3,7 +3,6 @@ import { yAxis, generateBarSeries, generateLineSeries, defaultChartOptions, grid
3
3
  import { 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 { debounceByAnimationFrame } from '../../../utils/utils';
7
6
  import TooltipDefaultFormat from '../../shared_components/charts/tooltip_default_format';
8
7
  import Chart from '../chart/chart';
9
8
  import ChartTooltip from '../tooltip/tooltip';
@@ -76,14 +75,8 @@ var script = {
76
75
  data() {
77
76
  return {
78
77
  chart: null,
79
- showTooltip: false,
80
78
  tooltipTitle: '',
81
- tooltipContent: {},
82
- tooltipPosition: {
83
- left: '0',
84
- top: '0'
85
- },
86
- debouncedMoveShowTooltip: debounceByAnimationFrame(this.moveShowTooltip)
79
+ tooltipContent: {}
87
80
  };
88
81
  },
89
82
  computed: {
@@ -191,21 +184,8 @@ var script = {
191
184
  return this.height === 'auto';
192
185
  }
193
186
  },
194
- beforeDestroy() {
195
- this.chart.getDom().removeEventListener('mousemove', this.debouncedMoveShowTooltip);
196
- this.chart.getDom().removeEventListener('mouseout', this.debouncedMoveShowTooltip);
197
- },
198
187
  methods: {
199
- moveShowTooltip(mouseEvent) {
200
- this.tooltipPosition = {
201
- left: `${mouseEvent.zrX}px`,
202
- top: `${mouseEvent.zrY}px`
203
- };
204
- this.showTooltip = this.chart.containPixel('grid', [mouseEvent.zrX, mouseEvent.zrY]);
205
- },
206
188
  onCreated(chart) {
207
- chart.getDom().addEventListener('mousemove', this.debouncedMoveShowTooltip);
208
- chart.getDom().addEventListener('mouseout', this.debouncedMoveShowTooltip);
209
189
  this.chart = chart;
210
190
  this.$emit('created', chart);
211
191
  },
@@ -227,7 +207,7 @@ const __vue_script__ = script;
227
207
  /* template */
228
208
  var __vue_render__ = function () {
229
209
  var _obj;
230
- var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"position-relative",class:( _obj = {}, _obj[_vm.$options.HEIGHT_AUTO_CLASSES] = _vm.autoHeight, _obj )},[_c('chart',_vm._g(_vm._b({class:{ 'gl-flex-grow-1': _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:{"show":_vm.showTooltip,"chart":_vm.chart,"top":_vm.tooltipPosition.top,"left":_vm.tooltipPosition.left},scopedSlots:_vm._u([{key:"title",fn:function(){return [_c('div',[_vm._v(_vm._s(_vm.tooltipTitle)+" ("+_vm._s(_vm.xAxisTitle)+")")])]},proxy:true}],null,false,643259221)},[_vm._v(" "),_c('tooltip-default-format',{attrs:{"tooltip-content":_vm.tooltipContent}})],1):_vm._e()],1)};
210
+ var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"position-relative",class:( _obj = {}, _obj[_vm.$options.HEIGHT_AUTO_CLASSES] = _vm.autoHeight, _obj )},[_c('chart',_vm._g(_vm._b({class:{ 'gl-flex-grow-1': _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 [_c('div',[_vm._v(_vm._s(_vm.tooltipTitle)+" ("+_vm._s(_vm.xAxisTitle)+")")])]},proxy:true}],null,false,643259221)},[_vm._v(" "),_c('tooltip-default-format',{attrs:{"tooltip-content":_vm.tooltipContent}})],1):_vm._e()],1)};
231
211
  var __vue_staticRenderFns__ = [];
232
212
 
233
213
  /* style */
@@ -2,7 +2,6 @@ import merge from 'lodash/merge';
2
2
  import { GRAY_200 } from '../../../../dist/tokens/js/tokens';
3
3
  import { defaultChartOptions, dataZoomAdjustments, mergeSeriesToOptions } from '../../../utils/charts/config';
4
4
  import { colorFromDefaultPalette } from '../../../utils/charts/theme';
5
- import { debounceByAnimationFrame } from '../../../utils/utils';
6
5
  import { HEIGHT_AUTO_CLASSES } from '../../../utils/charts/constants';
7
6
  import TooltipDefaultFormat from '../../shared_components/charts/tooltip_default_format';
8
7
  import Chart from '../chart/chart';
@@ -62,14 +61,12 @@ var script = {
62
61
  data() {
63
62
  return {
64
63
  chart: null,
65
- showTooltip: false,
66
64
  tooltipTitle: '',
67
65
  tooltipContent: {},
68
66
  tooltipPosition: {
69
67
  left: '0',
70
68
  top: '0'
71
69
  },
72
- debouncedShowHideTooltip: debounceByAnimationFrame(this.showHideTooltip),
73
70
  selectedFormatTooltipText: this.formatTooltipText || this.defaultFormatTooltipText
74
71
  };
75
72
  },
@@ -139,12 +136,7 @@ var script = {
139
136
  };
140
137
  this.$set(this, 'tooltipContent', tooltipContent);
141
138
  },
142
- showHideTooltip(mouseEvent) {
143
- this.showTooltip = this.chart.containPixel('grid', [mouseEvent.zrX, mouseEvent.zrY]);
144
- },
145
139
  onCreated(chart) {
146
- chart.getDom().addEventListener('mousemove', this.debouncedShowHideTooltip);
147
- chart.getDom().addEventListener('mouseout', this.debouncedShowHideTooltip);
148
140
  this.chart = chart;
149
141
  this.$emit('created', chart);
150
142
  },
@@ -153,7 +145,6 @@ var script = {
153
145
  const data = this.getChartData(params);
154
146
  if (data.length) {
155
147
  const [left, top] = this.chart.convertToPixel('grid', data);
156
- this.showTooltip = true;
157
148
  this.tooltipPosition = {
158
149
  left: `${left}px`,
159
150
  top: `${top}px`
@@ -177,7 +168,7 @@ const __vue_script__ = script;
177
168
  /* template */
178
169
  var __vue_render__ = function () {
179
170
  var _obj;
180
- var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"position-relative",class:( _obj = {}, _obj[_vm.$options.HEIGHT_AUTO_CLASSES] = _vm.autoHeight, _obj )},[_c('chart',_vm._g(_vm._b({class:{ 'gl-flex-grow-1': _vm.autoHeight },attrs:{"height":_vm.height,"options":_vm.options},on:{"created":_vm.onCreated}},'chart',_vm.$attrs,false),_vm.$listeners)),_vm._v(" "),(!_vm.disableTooltip && _vm.chart)?_c('chart-tooltip',{attrs:{"show":_vm.showTooltip,"chart":_vm.chart,"top":_vm.tooltipPosition.top,"left":_vm.tooltipPosition.left},scopedSlots:_vm._u([{key:"title",fn:function(){return [_vm._t("tooltip-title",function(){return [_vm._v(_vm._s(_vm.tooltipTitle)+" ("+_vm._s(_vm.xAxisTitle)+")")]})]},proxy:true}],null,true)},[_vm._v(" "),_vm._t("tooltip-content",function(){return [_c('tooltip-default-format',{attrs:{"tooltip-content":_vm.tooltipContent}})]})],2):_vm._e()],1)};
171
+ var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"position-relative",class:( _obj = {}, _obj[_vm.$options.HEIGHT_AUTO_CLASSES] = _vm.autoHeight, _obj )},[_c('chart',_vm._g(_vm._b({class:{ 'gl-flex-grow-1': _vm.autoHeight },attrs:{"height":_vm.height,"options":_vm.options},on:{"created":_vm.onCreated}},'chart',_vm.$attrs,false),_vm.$listeners)),_vm._v(" "),(!_vm.disableTooltip && _vm.chart)?_c('chart-tooltip',{attrs:{"chart":_vm.chart,"top":_vm.tooltipPosition.top,"left":_vm.tooltipPosition.left},scopedSlots:_vm._u([{key:"title",fn:function(){return [_vm._t("tooltip-title",function(){return [_vm._v(_vm._s(_vm.tooltipTitle)+" ("+_vm._s(_vm.xAxisTitle)+")")]})]},proxy:true}],null,true)},[_vm._v(" "),_vm._t("tooltip-content",function(){return [_c('tooltip-default-format',{attrs:{"tooltip-content":_vm.tooltipContent}})]})],2):_vm._e()],1)};
181
172
  var __vue_staticRenderFns__ = [];
182
173
 
183
174
  /* style */
@@ -4,7 +4,6 @@ import { getDefaultTooltipContent } from '../../../utils/charts/config';
4
4
  import { HEIGHT_AUTO_CLASSES } from '../../../utils/charts/constants';
5
5
  import { heatmapHues } from '../../../utils/charts/theme';
6
6
  import { engineeringNotation } from '../../../utils/number_utils';
7
- import { debounceByAnimationFrame } from '../../../utils/utils';
8
7
  import TooltipDefaultFormat from '../../shared_components/charts/tooltip_default_format';
9
8
  import Chart from '../chart/chart';
10
9
  import ChartLegend from '../legend/legend';
@@ -111,13 +110,11 @@ var script = {
111
110
  return {
112
111
  chart: null,
113
112
  tooltip: {
114
- show: false,
115
113
  title: '',
116
114
  content: {},
117
115
  left: '0',
118
116
  top: '0'
119
117
  },
120
- debouncedShowHideTooltip: debounceByAnimationFrame(this.showHideTooltip),
121
118
  selectedFormatTooltipText: this.formatTooltipText || this.defaultFormatTooltipText
122
119
  };
123
120
  },
@@ -224,10 +221,6 @@ var script = {
224
221
  return this.height === 'auto';
225
222
  }
226
223
  },
227
- beforeDestroy() {
228
- this.chart.getDom().removeEventListener('mousemove', this.debouncedShowHideTooltip);
229
- this.chart.getDom().removeEventListener('mouseout', this.debouncedShowHideTooltip);
230
- },
231
224
  methods: {
232
225
  defaultFormatTooltipText(params) {
233
226
  const {
@@ -238,14 +231,9 @@ var script = {
238
231
  this.tooltip.title = xLabels.join(', ');
239
232
  },
240
233
  onCreated(chart) {
241
- chart.getDom().addEventListener('mousemove', this.debouncedShowHideTooltip);
242
- chart.getDom().addEventListener('mouseout', this.debouncedShowHideTooltip);
243
234
  this.chart = chart;
244
235
  this.$emit('created', chart);
245
236
  },
246
- showHideTooltip(mouseEvent) {
247
- this.tooltip.show = this.chart.containPixel('grid', [mouseEvent.zrX, mouseEvent.zrY]);
248
- },
249
237
  onLabelChange(params) {
250
238
  this.selectedFormatTooltipText(params);
251
239
  const {
@@ -276,7 +264,7 @@ const __vue_script__ = script;
276
264
  /* template */
277
265
  var __vue_render__ = function () {
278
266
  var _obj;
279
- var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"gl-heatmap",class:( _obj = {}, _obj[_vm.$options.HEIGHT_AUTO_CLASSES] = _vm.autoHeight, _obj )},[_c('chart',_vm._g(_vm._b({class:{ 'gl-flex-grow-1': _vm.autoHeight },attrs:{"height":_vm.height,"options":_vm.computedOptions},on:{"created":_vm.onCreated}},'chart',_vm.$attrs,false),_vm.$listeners)),_vm._v(" "),(_vm.chart)?_c('chart-tooltip',{attrs:{"show":_vm.tooltip.show,"chart":_vm.chart,"top":_vm.tooltip.top,"left":_vm.tooltip.left},scopedSlots:_vm._u([{key:"title",fn:function(){return [(_vm.formatTooltipText)?_vm._t("tooltip-title"):_c('div',[_vm._v("\n "+_vm._s(_vm.tooltip.title)+"\n "),(_vm.computedOptions.xAxis.name)?[_vm._v("("+_vm._s(_vm.computedOptions.xAxis.name)+")")]:_vm._e()],2)]},proxy:true}],null,true)},[_vm._v(" "),(_vm.formatTooltipText)?_vm._t("tooltip-content"):_c('tooltip-default-format',{attrs:{"tooltip-content":_vm.tooltip.content}})],2):_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,"max-text":_vm.legendMaxText,"average-text":_vm.legendAverageText}}):_vm._e()],1)};
267
+ var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"gl-heatmap",class:( _obj = {}, _obj[_vm.$options.HEIGHT_AUTO_CLASSES] = _vm.autoHeight, _obj )},[_c('chart',_vm._g(_vm._b({class:{ 'gl-flex-grow-1': _vm.autoHeight },attrs:{"height":_vm.height,"options":_vm.computedOptions},on:{"created":_vm.onCreated}},'chart',_vm.$attrs,false),_vm.$listeners)),_vm._v(" "),(_vm.chart)?_c('chart-tooltip',{attrs:{"chart":_vm.chart,"top":_vm.tooltip.top,"left":_vm.tooltip.left},scopedSlots:_vm._u([{key:"title",fn:function(){return [(_vm.formatTooltipText)?_vm._t("tooltip-title"):_c('div',[_vm._v("\n "+_vm._s(_vm.tooltip.title)+"\n "),(_vm.computedOptions.xAxis.name)?[_vm._v("("+_vm._s(_vm.computedOptions.xAxis.name)+")")]:_vm._e()],2)]},proxy:true}],null,true)},[_vm._v(" "),(_vm.formatTooltipText)?_vm._t("tooltip-content"):_c('tooltip-default-format',{attrs:{"tooltip-content":_vm.tooltip.content}})],2):_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,"max-text":_vm.legendMaxText,"average-text":_vm.legendAverageText}}):_vm._e()],1)};
280
268
  var __vue_staticRenderFns__ = [];
281
269
 
282
270
  /* style */
@@ -4,7 +4,6 @@ import { symbolSize, lineStyle, getThresholdConfig, generateAnnotationSeries, de
4
4
  import { LEGEND_AVERAGE_TEXT, LEGEND_MAX_TEXT, LEGEND_MIN_TEXT, LEGEND_CURRENT_TEXT, LEGEND_LAYOUT_INLINE, LEGEND_LAYOUT_TABLE, HEIGHT_AUTO_CLASSES } from '../../../utils/charts/constants';
5
5
  import { colorFromDefaultPalette } from '../../../utils/charts/theme';
6
6
  import { seriesHasAnnotations, isDataPointAnnotation } from '../../../utils/charts/utils';
7
- import { debounceByAnimationFrame } from '../../../utils/utils';
8
7
  import TooltipDefaultFormat from '../../shared_components/charts/tooltip_default_format';
9
8
  import Chart from '../chart/chart';
10
9
  import ChartLegend from '../legend/legend';
@@ -100,13 +99,8 @@ var script = {
100
99
  // https://gitlab.com/gitlab-org/gitlab-ui/-/issues/618
101
100
  return {
102
101
  chart: null,
103
- showDataTooltip: false,
104
102
  dataTooltipTitle: '',
105
103
  dataTooltipContent: {},
106
- dataTooltipPosition: {
107
- left: '0',
108
- top: '0'
109
- },
110
104
  showAnnotationsTooltip: false,
111
105
  annotationsTooltipTitle: '',
112
106
  annotationsTooltipContent: '',
@@ -114,7 +108,6 @@ var script = {
114
108
  left: '0',
115
109
  top: '0'
116
110
  },
117
- debouncedShowHideTooltip: debounceByAnimationFrame(this.showHideTooltip),
118
111
  selectedFormatTooltipText: this.formatTooltipText || this.defaultFormatTooltipText
119
112
  };
120
113
  },
@@ -214,8 +207,6 @@ var script = {
214
207
  }
215
208
  },
216
209
  beforeDestroy() {
217
- this.chart.getDom().removeEventListener('mousemove', this.debouncedShowHideTooltip);
218
- this.chart.getDom().removeEventListener('mouseout', this.debouncedShowHideTooltip);
219
210
  this.chart.off('mouseout', this.onChartDataPointMouseOut);
220
211
  this.chart.off('mouseover', this.onChartDataPointMouseOver);
221
212
  },
@@ -236,13 +227,6 @@ var script = {
236
227
  };
237
228
  },
238
229
  onCreated(chart) {
239
- // These listeners are used to show/hide data tooltips
240
- // when the mouse is hovered over the parent container
241
- // of echarts' svg element. This works only for data points
242
- // and not markPoints.
243
- chart.getDom().addEventListener('mousemove', this.debouncedShowHideTooltip);
244
- chart.getDom().addEventListener('mouseout', this.debouncedShowHideTooltip);
245
-
246
230
  // eCharts inbuild mouse events
247
231
  // https://echarts.apache.org/en/api.html#events.Mouse%20events
248
232
  // is used to attach listeners to markPoints. These listeners
@@ -260,13 +244,6 @@ var script = {
260
244
  this.chart = chart;
261
245
  this.$emit('created', chart);
262
246
  },
263
- showHideTooltip(mouseEvent) {
264
- this.showDataTooltip = this.chart.containPixel('grid', [mouseEvent.zrX, mouseEvent.zrY]);
265
- this.dataTooltipPosition = {
266
- left: `${mouseEvent.zrX}px`,
267
- top: `${mouseEvent.zrY}px`
268
- };
269
- },
270
247
  onChartDataPointMouseOut() {
271
248
  this.showAnnotationsTooltip = false;
272
249
  },
@@ -306,7 +283,7 @@ const __vue_script__ = script;
306
283
  /* template */
307
284
  var __vue_render__ = function () {
308
285
  var _obj;
309
- var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"position-relative",class:( _obj = {}, _obj[_vm.$options.HEIGHT_AUTO_CLASSES] = _vm.autoHeight, _obj )},[_c('chart',_vm._g(_vm._b({class:{ 'gl-flex-grow-1': _vm.autoHeight },attrs:{"height":_vm.height,"options":_vm.options},on:{"created":_vm.onCreated}},'chart',_vm.$attrs,false),_vm.$listeners)),_vm._v(" "),(_vm.shouldShowAnnotationsTooltip)?_c('chart-tooltip',{ref:"annotationsTooltip",attrs:{"id":"annotationsTooltip","show":_vm.showAnnotationsTooltip,"chart":_vm.chart,"top":_vm.annotationsTooltipPosition.top,"left":_vm.annotationsTooltipPosition.left,"placement":"bottom"},scopedSlots:_vm._u([{key:"title",fn:function(){return [_c('div',[_vm._v(_vm._s(_vm.annotationsTooltipTitle))])]},proxy:true}],null,false,1889294429)},[_vm._v(" "),_c('div',[_vm._v(_vm._s(_vm.annotationsTooltipContent))])]):_vm._e(),_vm._v(" "),(_vm.chart)?_c('chart-tooltip',{ref:"dataTooltip",staticClass:"gl-pointer-events-none",attrs:{"id":"dataTooltip","show":_vm.showDataTooltip,"chart":_vm.chart,"top":_vm.dataTooltipPosition.top,"left":_vm.dataTooltipPosition.left},scopedSlots:_vm._u([{key:"title",fn:function(){return [(_vm.formatTooltipText)?_vm._t("tooltip-title"):_c('div',[_vm._v("\n "+_vm._s(_vm.dataTooltipTitle)+"\n "),(_vm.options.xAxis.name)?[_vm._v("("+_vm._s(_vm.options.xAxis.name)+")")]:_vm._e()],2)]},proxy:true}],null,true)},[_vm._v(" "),(_vm.formatTooltipText)?_vm._t("tooltip-content"):_c('tooltip-default-format',{attrs:{"tooltip-content":_vm.dataTooltipContent},scopedSlots:_vm._u([(_vm.$scopedSlots['tooltip-value'])?{key:"tooltip-value",fn:function(scope){return [_vm._t("tooltip-value",null,null,scope)]}}:null],null,true)})],2):_vm._e(),_vm._v(" "),(_vm.hasLegend)?_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)};
286
+ var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"position-relative",class:( _obj = {}, _obj[_vm.$options.HEIGHT_AUTO_CLASSES] = _vm.autoHeight, _obj )},[_c('chart',_vm._g(_vm._b({class:{ 'gl-flex-grow-1': _vm.autoHeight },attrs:{"height":_vm.height,"options":_vm.options},on:{"created":_vm.onCreated}},'chart',_vm.$attrs,false),_vm.$listeners)),_vm._v(" "),(_vm.shouldShowAnnotationsTooltip)?_c('chart-tooltip',{ref:"annotationsTooltip",attrs:{"id":"annotationsTooltip","show":_vm.showAnnotationsTooltip,"chart":_vm.chart,"top":_vm.annotationsTooltipPosition.top,"left":_vm.annotationsTooltipPosition.left,"placement":"bottom"},scopedSlots:_vm._u([{key:"title",fn:function(){return [_c('div',[_vm._v(_vm._s(_vm.annotationsTooltipTitle))])]},proxy:true}],null,false,1889294429)},[_vm._v(" "),_c('div',[_vm._v(_vm._s(_vm.annotationsTooltipContent))])]):_vm._e(),_vm._v(" "),(_vm.chart)?_c('chart-tooltip',{ref:"dataTooltip",attrs:{"chart":_vm.chart},scopedSlots:_vm._u([{key:"title",fn:function(){return [(_vm.formatTooltipText)?_vm._t("tooltip-title"):_c('div',[_vm._v("\n "+_vm._s(_vm.dataTooltipTitle)+"\n "),(_vm.options.xAxis.name)?[_vm._v("("+_vm._s(_vm.options.xAxis.name)+")")]:_vm._e()],2)]},proxy:true}],null,true)},[_vm._v(" "),(_vm.formatTooltipText)?_vm._t("tooltip-content"):_c('tooltip-default-format',{attrs:{"tooltip-content":_vm.dataTooltipContent},scopedSlots:_vm._u([(_vm.$scopedSlots['tooltip-value'])?{key:"tooltip-value",fn:function(scope){return [_vm._t("tooltip-value",null,null,scope)]}}:null],null,true)})],2):_vm._e(),_vm._v(" "),(_vm.hasLegend)?_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)};
310
287
  var __vue_staticRenderFns__ = [];
311
288
 
312
289
  /* style */
@@ -84,7 +84,6 @@ var script = {
84
84
  return {
85
85
  chartInstance: null,
86
86
  tooltip: {
87
- show: false,
88
87
  title: '',
89
88
  content: '',
90
89
  position: {
@@ -189,9 +188,6 @@ var script = {
189
188
  handleResize() {
190
189
  this.chartInstance.resize();
191
190
  },
192
- hideTooltip() {
193
- this.tooltip.show = false;
194
- },
195
191
  setTooltipPosition(data) {
196
192
  const [left, top] = this.chartInstance.convertToPixel('grid', data);
197
193
  this.tooltip.position = {
@@ -216,7 +212,6 @@ var script = {
216
212
  if (!data) return;
217
213
  const [title, content] = data;
218
214
  if (isNil(title) || isNil(content)) return;
219
- this.tooltip.show = true;
220
215
  this.tooltip.title = title;
221
216
  this.tooltip.content = content;
222
217
  this.setTooltipPosition(data);
@@ -231,7 +226,7 @@ const __vue_script__ = script;
231
226
  /* template */
232
227
  var __vue_render__ = function () {
233
228
  var _obj;
234
- var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{directives:[{name:"resize-observer",rawName:"v-resize-observer",value:(_vm.handleResize),expression:"handleResize"}],staticClass:"gl-display-flex gl-align-items-center",class:{ 'gl-h-full': _vm.autoHeight },on:{"mouseleave":_vm.hideTooltip}},[_vm._t("default"),_vm._v(" "),_c('div',{staticClass:"gl-flex-grow-1 gl-relative",class:( _obj = {}, _obj[_vm.$options.HEIGHT_AUTO_HORIZONTAL_LAYOUT_CLASSES] = _vm.autoHeight, _obj ),attrs:{"data-testid":"chart-container"}},[_c('chart',_vm._g(_vm._b({class:{ 'gl-flex-grow-1': _vm.autoHeight },attrs:{"height":_vm.height,"options":_vm.options},on:{"created":_vm.onChartCreated}},'chart',_vm.$attrs,false),_vm.$listeners)),_vm._v(" "),(_vm.chartInstance)?_c('chart-tooltip',{style:({ pointerEvents: 'none' }),attrs:{"show":_vm.tooltip.show,"chart":_vm.chartInstance,"top":_vm.tooltip.position.top,"left":_vm.tooltip.position.left,"placement":"top"},scopedSlots:_vm._u([{key:"title",fn:function(){return [_c('div',{staticClass:"gl-white-space-nowrap",attrs:{"data-testid":"tooltip-title"}},[_vm._v("\n "+_vm._s(_vm.tooltip.title)+"\n ")])]},proxy:true},{key:"default",fn:function(){return [_c('div',{staticClass:"gl-display-flex",attrs:{"data-testid":"tooltip-content"}},[(_vm.tooltipLabel)?_c('span',{staticClass:"gl-pr-6 gl-mr-auto"},[_vm._v(_vm._s(_vm.tooltipLabel))]):_vm._e(),_vm._v(" "),_c('strong',[_vm._v(_vm._s(_vm.tooltip.content))])])]},proxy:true}],null,false,2830367259)}):_vm._e()],1),_vm._v(" "),(_vm.showLastYValue)?_c('span',{staticClass:"gl-display-inline-flex gl-justify-content-center gl-ml-5",attrs:{"data-testid":"last-y-value"}},[_vm._v("\n "+_vm._s(_vm.lastYValue)+"\n ")]):_vm._e()],2)};
229
+ var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{directives:[{name:"resize-observer",rawName:"v-resize-observer",value:(_vm.handleResize),expression:"handleResize"}],staticClass:"gl-display-flex gl-align-items-center",class:{ 'gl-h-full': _vm.autoHeight }},[_vm._t("default"),_vm._v(" "),_c('div',{staticClass:"gl-flex-grow-1 gl-relative",class:( _obj = {}, _obj[_vm.$options.HEIGHT_AUTO_HORIZONTAL_LAYOUT_CLASSES] = _vm.autoHeight, _obj ),attrs:{"data-testid":"chart-container"}},[_c('chart',_vm._g(_vm._b({class:{ 'gl-flex-grow-1': _vm.autoHeight },attrs:{"height":_vm.height,"options":_vm.options},on:{"created":_vm.onChartCreated}},'chart',_vm.$attrs,false),_vm.$listeners)),_vm._v(" "),(_vm.chartInstance)?_c('chart-tooltip',{attrs:{"chart":_vm.chartInstance,"top":_vm.tooltip.position.top,"left":_vm.tooltip.position.left,"placement":"top"},scopedSlots:_vm._u([{key:"title",fn:function(){return [_c('div',{staticClass:"gl-white-space-nowrap",attrs:{"data-testid":"tooltip-title"}},[_vm._v("\n "+_vm._s(_vm.tooltip.title)+"\n ")])]},proxy:true},{key:"default",fn:function(){return [_c('div',{staticClass:"gl-display-flex",attrs:{"data-testid":"tooltip-content"}},[(_vm.tooltipLabel)?_c('span',{staticClass:"gl-pr-6 gl-mr-auto"},[_vm._v(_vm._s(_vm.tooltipLabel))]):_vm._e(),_vm._v(" "),_c('strong',[_vm._v(_vm._s(_vm.tooltip.content))])])]},proxy:true}],null,false,2830367259)}):_vm._e()],1),_vm._v(" "),(_vm.showLastYValue)?_c('span',{staticClass:"gl-display-inline-flex gl-justify-content-center gl-ml-5",attrs:{"data-testid":"last-y-value"}},[_vm._v("\n "+_vm._s(_vm.lastYValue)+"\n ")]):_vm._e()],2)};
235
230
  var __vue_staticRenderFns__ = [];
236
231
 
237
232
  /* style */
@@ -3,7 +3,6 @@ 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 { debounceByAnimationFrame } from '../../../utils/utils';
7
6
  import TooltipDefaultFormat from '../../shared_components/charts/tooltip_default_format';
8
7
  import Chart from '../chart/chart';
9
8
  import ChartLegend from '../legend/legend';
@@ -130,14 +129,8 @@ var script = {
130
129
  data() {
131
130
  return {
132
131
  chart: null,
133
- showTooltip: false,
134
132
  tooltipTitle: '',
135
- tooltipContent: {},
136
- tooltipPosition: {
137
- left: '0',
138
- top: '0'
139
- },
140
- debouncedMoveShowTooltip: debounceByAnimationFrame(this.moveShowTooltip)
133
+ tooltipContent: {}
141
134
  };
142
135
  },
143
136
  computed: {
@@ -265,28 +258,12 @@ var script = {
265
258
  return this.height === 'auto';
266
259
  }
267
260
  },
268
- beforeDestroy() {
269
- this.chart.getZr().off('mousemove', this.debouncedMoveShowTooltip);
270
- this.chart.getZr().off('mouseout', this.debouncedMoveShowTooltip);
271
- },
272
261
  methods: {
273
262
  getColor(index) {
274
263
  var _this$customPalette;
275
264
  return this.customPalette ? (_this$customPalette = this.customPalette) === null || _this$customPalette === void 0 ? void 0 : _this$customPalette[index] : colorFromDefaultPalette(index);
276
265
  },
277
- moveShowTooltip(_ref4) {
278
- let {
279
- event: mouseEvent
280
- } = _ref4;
281
- this.tooltipPosition = {
282
- left: `${mouseEvent.zrX}px`,
283
- top: `${mouseEvent.zrY}px`
284
- };
285
- this.showTooltip = this.chart.containPixel('grid', [mouseEvent.zrX, mouseEvent.zrY]);
286
- },
287
266
  onCreated(chart) {
288
- chart.getZr().on('mousemove', this.debouncedMoveShowTooltip);
289
- chart.getZr().on('mouseout', this.debouncedMoveShowTooltip);
290
267
  this.chart = chart;
291
268
  this.$emit('created', chart);
292
269
  },
@@ -323,7 +300,7 @@ const __vue_script__ = script;
323
300
  /* template */
324
301
  var __vue_render__ = function () {
325
302
  var _obj;
326
- var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"position-relative",class:( _obj = {}, _obj[_vm.$options.HEIGHT_AUTO_CLASSES] = _vm.autoHeight, _obj )},[_c('chart',_vm._g(_vm._b({class:{ 'gl-flex-grow-1': _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:{"show":_vm.showTooltip,"chart":_vm.chart,"top":_vm.tooltipPosition.top,"left":_vm.tooltipPosition.left},scopedSlots:_vm._u([{key:"title",fn:function(){return [_vm._t("tooltip-title",function(){return [_vm._v(_vm._s(_vm.tooltipTitle)+" ("+_vm._s(_vm.xAxisTitle)+")")]})]},proxy:true}],null,true)},[_vm._v(" "),_vm._t("tooltip-content",function(){return [_c('tooltip-default-format',{attrs:{"tooltip-content":_vm.tooltipContent}})]})],2):_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)};
303
+ var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"position-relative",class:( _obj = {}, _obj[_vm.$options.HEIGHT_AUTO_CLASSES] = _vm.autoHeight, _obj )},[_c('chart',_vm._g(_vm._b({class:{ 'gl-flex-grow-1': _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.tooltipTitle)+" ("+_vm._s(_vm.xAxisTitle)+")")]})]},proxy:true}],null,true)},[_vm._v(" "),_vm._t("tooltip-content",function(){return [_c('tooltip-default-format',{attrs:{"tooltip-content":_vm.tooltipContent}})]})],2):_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)};
327
304
  var __vue_staticRenderFns__ = [];
328
305
 
329
306
  /* style */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Mon, 20 Nov 2023 13:24:46 GMT
3
+ * Generated on Tue, 21 Nov 2023 13:00:27 GMT
4
4
  */
5
5
 
6
6
  :root {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Mon, 20 Nov 2023 13:24:46 GMT
3
+ * Generated on Tue, 21 Nov 2023 13:00:27 GMT
4
4
  */
5
5
 
6
6
  :root.gl-dark {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Mon, 20 Nov 2023 13:24:46 GMT
3
+ * Generated on Tue, 21 Nov 2023 13:00:27 GMT
4
4
  */
5
5
 
6
6
  export const BLACK = "#fff";
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Mon, 20 Nov 2023 13:24:46 GMT
3
+ * Generated on Tue, 21 Nov 2023 13:00:27 GMT
4
4
  */
5
5
 
6
6
  export const DATA_VIZ_GREEN_50 = "#ddfab7";
@@ -1,6 +1,6 @@
1
1
 
2
2
  // Do not edit directly
3
- // Generated on Mon, 20 Nov 2023 13:24:46 GMT
3
+ // Generated on Tue, 21 Nov 2023 13:00:27 GMT
4
4
 
5
5
  $red-950: #fff4f3;
6
6
  $red-900: #fcf1ef;
@@ -1,6 +1,6 @@
1
1
 
2
2
  // Do not edit directly
3
- // Generated on Mon, 20 Nov 2023 13:24:46 GMT
3
+ // Generated on Tue, 21 Nov 2023 13:00:27 GMT
4
4
 
5
5
  $gl-line-height-52: 3.25rem;
6
6
  $gl-line-height-44: 2.75rem;
@@ -2,8 +2,7 @@ import { GRAY_600, GRAY_200, GRAY_50, GRAY_300, GRAY_100, DATA_VIZ_BLUE_200, DAT
2
2
  import { scrollHandleSvgPath } from '../svgs/svg_paths';
3
3
  import { hexToRgba } from '../utils';
4
4
 
5
- const glBorderRadiusBase = '0.25rem';
6
-
5
+ const GL_BORDER_RADIUS_BASE = '0.25rem';
7
6
  const themeName = 'gitlab';
8
7
  const heatmapHues = [GRAY_100, DATA_VIZ_BLUE_200, DATA_VIZ_BLUE_400, DATA_VIZ_BLUE_600, DATA_VIZ_BLUE_800];
9
8
  const gaugeNeutralHues = [GRAY_900, GRAY_500];
@@ -128,7 +127,7 @@ const createTheme = function () {
128
127
  borderWidth: 0,
129
128
  color: GRAY_900,
130
129
  textBackgroundColor: WHITE,
131
- textBorderRadius: glBorderRadiusBase,
130
+ textBorderRadius: GL_BORDER_RADIUS_BASE,
132
131
  textPadding: [8, 12]
133
132
  }
134
133
  },
@@ -1,7 +1,5 @@
1
1
  import { POSITION } from '../components/utilities/truncate/constants';
2
2
 
3
- const glIconSizes = '8 12 14 16 24 32 48 72';
4
-
5
3
  function appendDefaultOption(options) {
6
4
  return {
7
5
  ...options,
@@ -131,7 +129,7 @@ const datepickerWidthOptionsMap = {
131
129
  };
132
130
 
133
131
  // size options all have corresponding styles (e.g. .s12 defined in icon.scss)
134
- const iconSizeOptions = glIconSizes.split(' ').map(Number);
132
+ const iconSizeOptions = [8, 12, 14, 16, 24, 32, 48, 72];
135
133
  const triggerVariantOptions = {
136
134
  click: 'click',
137
135
  hover: 'hover',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gitlab/ui",
3
- "version": "69.1.0",
3
+ "version": "70.0.1",
4
4
  "description": "GitLab UI Components",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -17,27 +17,25 @@
17
17
  "files": [
18
18
  "src",
19
19
  "dist",
20
- "scss_to_js",
21
20
  "translations.json"
22
21
  ],
23
22
  "scripts": {
24
23
  "build": "NODE_ENV=production rollup -c",
25
- "prebuild": "run-s build-tokens build-scss-variables generate-utilities",
26
- "prepare": "run-s build-tokens build-scss-variables generate-utilities",
24
+ "prebuild": "run-s build-tokens generate-utilities",
25
+ "prepare": "run-s build-tokens generate-utilities",
27
26
  "generate-utilities": "make src/scss/utilities.scss",
28
27
  "copy-fonts": "make copy-fonts",
29
- "build-scss-variables": "make scss_to_js/scss_variables.js",
30
28
  "build-tokens": "node ./bin/build_tokens.js",
31
- "clean": "rm -r dist storybook scss_to_js/scss_variables.* src/scss/utilities.scss",
29
+ "clean": "rm -r dist storybook src/scss/utilities.scss",
32
30
  "cy:a11y": "cypress run --browser chrome --env grepTags=@a11y",
33
31
  "cy:edge": "cypress run --browser edge --env grepTags=-@a11y",
34
32
  "cy:run": "cypress run --browser firefox --env grepTags=-@a11y",
35
33
  "start": "yarn storybook",
36
34
  "storybook": "yarn storybook-prep && storybook dev --ci --host ${STORYBOOK_HOST:-localhost} --port 9001 -c .storybook",
37
35
  "storybook-vue3": "yarn storybook-prep && VUE_VERSION=3 storybook dev --ci --host ${STORYBOOK_HOST:-localhost} --port 9001 -c .storybook",
38
- "storybook-prep": "run-s copy-fonts build-tokens generate-utilities build-scss-variables",
36
+ "storybook-prep": "run-s copy-fonts build-tokens generate-utilities",
39
37
  "storybook-static": "yarn storybook-prep && storybook build -c .storybook -o storybook",
40
- "pretest:unit": "yarn build-tokens build-scss-variables",
38
+ "pretest:unit": "yarn build-tokens",
41
39
  "test": "run-s test:unit test:visual",
42
40
  "test:integration": "NODE_ENV=test start-server-and-test start http://${STORYBOOK_HOST:-localhost}:9001/iframe.html 'yarn cy:run && yarn cy:a11y'",
43
41
  "test:unit": "NODE_ENV=test jest --testPathIgnorePatterns storyshots.spec.js",
@@ -129,7 +127,7 @@
129
127
  "cypress-real-events": "^1.11.0",
130
128
  "dompurify": "^3.0.0",
131
129
  "emoji-regex": "^10.0.0",
132
- "eslint": "8.53.0",
130
+ "eslint": "8.54.0",
133
131
  "eslint-import-resolver-jest": "3.0.2",
134
132
  "eslint-plugin-cypress": "2.15.1",
135
133
  "eslint-plugin-storybook": "0.6.15",
@@ -142,7 +142,7 @@ describe('area component', () => {
142
142
  });
143
143
 
144
144
  it('is initialized', () => {
145
- expect(findDataTooltip().exists()).toBe(true);
145
+ expect(findDataTooltip().props('chart')).toBe(mockChartInstance);
146
146
  });
147
147
  });
148
148