@gitlab/ui 126.3.2 → 126.3.4

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 (77) hide show
  1. package/dist/components/base/icon/icon.js +1 -1
  2. package/dist/components/base/illustration/illustration.js +1 -1
  3. package/dist/components/charts/shared/tooltip/tooltip.js +2 -2
  4. package/dist/components/charts/stacked_column/stacked_column.js +16 -5
  5. package/dist/index.css +1 -1
  6. package/dist/index.css.map +1 -1
  7. package/dist/utils/charts/config.js +36 -1
  8. package/dist/utils/charts/mock_data.js +18 -1
  9. package/package.json +3 -3
  10. package/src/components/base/icon/icon.vue +1 -1
  11. package/src/components/base/illustration/illustration.vue +1 -1
  12. package/src/components/base/new_dropdowns/dropdown_item.scss +1 -1
  13. package/src/components/charts/shared/tooltip/tooltip.vue +2 -1
  14. package/src/components/charts/stacked_column/stacked_column.vue +16 -5
  15. package/src/tokens/build/docs/tokens-tailwind-docs.dark.json +2788 -2788
  16. package/src/tokens/build/docs/tokens-tailwind-docs.json +2788 -2788
  17. package/src/tokens/build/figma/constants.tokens.json +326 -326
  18. package/src/tokens/build/figma/contextual.tokens.json +428 -428
  19. package/src/tokens/build/figma/deprecated.tokens.json +220 -220
  20. package/src/tokens/build/figma/semantic.tokens.json +191 -191
  21. package/src/tokens/build/json/tokens.dark.json +2330 -2330
  22. package/src/tokens/build/json/tokens.json +2330 -2330
  23. package/src/tokens/constant/border.tokens.json +10 -10
  24. package/src/tokens/constant/color.alpha.tokens.json +15 -15
  25. package/src/tokens/constant/color.tokens.json +211 -211
  26. package/src/tokens/constant/font.tokens.json +27 -27
  27. package/src/tokens/constant/line_height.tokens.json +10 -10
  28. package/src/tokens/constant/opacity.tokens.json +11 -11
  29. package/src/tokens/constant/shadow.tokens.json +3 -3
  30. package/src/tokens/constant/spacing_scale.tokens.json +32 -32
  31. package/src/tokens/constant/zindex.tokens.json +7 -7
  32. package/src/tokens/contextual/alert.tokens.json +20 -20
  33. package/src/tokens/contextual/avatar.tokens.json +14 -14
  34. package/src/tokens/contextual/badge.tokens.json +112 -112
  35. package/src/tokens/contextual/banner.tokens.json +3 -3
  36. package/src/tokens/contextual/breadcrumb.tokens.json +1 -1
  37. package/src/tokens/contextual/broadcast.tokens.json +41 -41
  38. package/src/tokens/contextual/button.tokens.json +122 -122
  39. package/src/tokens/contextual/card.tokens.json +1 -1
  40. package/src/tokens/contextual/chart.tokens.json +7 -7
  41. package/src/tokens/contextual/datepicker.tokens.json +2 -2
  42. package/src/tokens/contextual/drawer.tokens.json +1 -1
  43. package/src/tokens/contextual/dropdown.tokens.json +22 -22
  44. package/src/tokens/contextual/filtered-search.tokens.json +6 -6
  45. package/src/tokens/contextual/illustration.tokens.json +32 -32
  46. package/src/tokens/contextual/label.tokens.json +12 -12
  47. package/src/tokens/contextual/link.tokens.json +4 -4
  48. package/src/tokens/contextual/modal.tokens.json +1 -1
  49. package/src/tokens/contextual/progress-bar.tokens.json +5 -5
  50. package/src/tokens/contextual/skeleton-loader.tokens.json +2 -2
  51. package/src/tokens/contextual/spinner.tokens.json +4 -4
  52. package/src/tokens/contextual/table.tokens.json +2 -2
  53. package/src/tokens/contextual/tabs.tokens.json +1 -1
  54. package/src/tokens/contextual/toggle.tokens.json +9 -9
  55. package/src/tokens/contextual/token-selector.tokens.json +1 -1
  56. package/src/tokens/contextual/token.tokens.json +3 -3
  57. package/src/tokens/deprecated/deprecated.color.data_viz.tokens.json +55 -55
  58. package/src/tokens/deprecated/deprecated.color.theme.tokens.json +72 -72
  59. package/src/tokens/deprecated/deprecated.color.tokens.json +80 -80
  60. package/src/tokens/deprecated/deprecated.color.transparency.tokens.json +13 -13
  61. package/src/tokens/semantic/action.tokens.json +76 -76
  62. package/src/tokens/semantic/background.tokens.json +7 -7
  63. package/src/tokens/semantic/border.tokens.json +5 -5
  64. package/src/tokens/semantic/control.tokens.json +21 -21
  65. package/src/tokens/semantic/feedback.tokens.json +30 -30
  66. package/src/tokens/semantic/focus-ring.tokens.json +2 -2
  67. package/src/tokens/semantic/font.tokens.json +2 -2
  68. package/src/tokens/semantic/heading.tokens.json +2 -2
  69. package/src/tokens/semantic/highlight.tokens.json +4 -4
  70. package/src/tokens/semantic/icon.tokens.json +9 -9
  71. package/src/tokens/semantic/letter_spacing.tokens.json +1 -1
  72. package/src/tokens/semantic/line_height.tokens.json +1 -1
  73. package/src/tokens/semantic/shadow.tokens.json +1 -1
  74. package/src/tokens/semantic/status.tokens.json +18 -18
  75. package/src/tokens/semantic/text.tokens.json +12 -12
  76. package/src/utils/charts/config.js +28 -0
  77. package/src/utils/charts/mock_data.js +7 -0
@@ -538,6 +538,41 @@ const getTooltipContent = function () {
538
538
  }, {});
539
539
  };
540
540
 
541
+ /**
542
+ * Enriches tooltip parameters with stack information for proper series ordering.
543
+ *
544
+ * In stacked column charts, series are grouped by their `stack` property to determine
545
+ * visual stacking and tooltip display order. ECharts doesn't provide stack data
546
+ * in tooltip params by default, so this function manually adds it by mapping
547
+ * series names to their configured stack values.
548
+ *
549
+ * @param {Object} params - Tooltip parameters from ECharts
550
+ * @param {Object} options - Chart configuration with series definitions
551
+ * @returns {Object} Enhanced tooltip parameters with stack data
552
+ */
553
+ const getTooltipParams = function () {
554
+ let params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
555
+ let options = arguments.length > 1 ? arguments[1] : undefined;
556
+ if (!params) return null;
557
+ const {
558
+ series: optionsSeries = []
559
+ } = options !== null && options !== void 0 ? options : {};
560
+ const seriesStacks = Object.fromEntries(optionsSeries.map(_ref8 => {
561
+ let {
562
+ name,
563
+ stack
564
+ } = _ref8;
565
+ return [name, stack];
566
+ }));
567
+ return {
568
+ ...params,
569
+ seriesData: params.seriesData.map(series => ({
570
+ ...series,
571
+ stack: seriesStacks[series.seriesName]
572
+ }))
573
+ };
574
+ };
575
+
541
576
  /**
542
577
  * The method works well if tooltip content should be against y-axis values.
543
578
  * However, for bar charts, the tooltip should be against x-axis values.
@@ -579,4 +614,4 @@ const getDefaultTooltipContent = function (params) {
579
614
  };
580
615
  };
581
616
 
582
- export { annotationsYAxisCoords, axes, dataZoomAdjustments, defaultAreaOpacity, defaultChartOptions, defaultFontSize, defaultHeight, defaultWidth, generateAnnotationSeries, generateBarSeries, generateLineSeries, getAnnotationsConfig, getDataZoomConfig, getDefaultTooltipContent, getThresholdConfig, getTooltipAxisConfig, getTooltipContent, getTooltipTitle, grid, gridWithSecondaryYAxis, lineStyle, mergeAnnotationAxisToOptions, mergeSeriesToOptions, parseAnnotations, symbolSize, toolboxHeight, validRenderers, xAxis, yAxis };
617
+ export { annotationsYAxisCoords, axes, dataZoomAdjustments, defaultAreaOpacity, defaultChartOptions, defaultFontSize, defaultHeight, defaultWidth, generateAnnotationSeries, generateBarSeries, generateLineSeries, getAnnotationsConfig, getDataZoomConfig, getDefaultTooltipContent, getThresholdConfig, getTooltipAxisConfig, getTooltipContent, getTooltipParams, getTooltipTitle, grid, gridWithSecondaryYAxis, lineStyle, mergeAnnotationAxisToOptions, mergeSeriesToOptions, parseAnnotations, symbolSize, toolboxHeight, validRenderers, xAxis, yAxis };
@@ -112,6 +112,23 @@ const mockDefaultStackedBarData = [{
112
112
  name: 'Fun 4',
113
113
  data: [8, 9, 5, 40, 13, 19, 58, 21, 47, 59, 23, 46]
114
114
  }];
115
+ const mockMultiStackBarData = [{
116
+ name: 'Fun 1',
117
+ data: [58, 49, 38, 23, 27, 68, 38, 35, 7, 64, 65, 31],
118
+ stack: 'stack-1'
119
+ }, {
120
+ name: 'Fun 2',
121
+ data: [8, 6, 34, 19, 9, 7, 17, 25, 14, 7, 10, 32],
122
+ stack: 'stack-1'
123
+ }, {
124
+ name: 'Fun 3',
125
+ data: [67, 60, 66, 32, 61, 54, 13, 50, 16, 11, 47, 28],
126
+ stack: 'stack-2'
127
+ }, {
128
+ name: 'Fun 4',
129
+ data: [8, 9, 5, 40, 13, 19, 58, 21, 47, 59, 23, 46],
130
+ stack: 'stack-2'
131
+ }];
115
132
  const mockDefaultStackedLineData = [{
116
133
  name: 'Stacked median line',
117
134
  data: [67, 60, 66, 32, 61, 54, 13, 50, 16, 11, 47, 28]
@@ -171,4 +188,4 @@ const mockSecondaryTrendlineData = [{
171
188
  data: [['Joe', 220], ['Sarah', 392], ['Tom', 291], ['Mary', 594], ['Mike', 320], ['Ben', 230], ['Jane', 120], ['Anne', 290]]
172
189
  }];
173
190
 
174
- export { mockAnnotationsConfigs, mockAnnotationsSeries, mockDefaultBarChartConfig, mockDefaultBarData, mockDefaultDataZoomConfig, mockDefaultLineChartConfig, mockDefaultLineData, mockDefaultStackedBarData, mockDefaultStackedLineData, mockRawBarData, mockSecondaryBarData, mockSecondaryData, mockSecondaryTrendlineData };
191
+ export { mockAnnotationsConfigs, mockAnnotationsSeries, mockDefaultBarChartConfig, mockDefaultBarData, mockDefaultDataZoomConfig, mockDefaultLineChartConfig, mockDefaultLineData, mockDefaultStackedBarData, mockDefaultStackedLineData, mockMultiStackBarData, mockRawBarData, mockSecondaryBarData, mockSecondaryData, mockSecondaryTrendlineData };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gitlab/ui",
3
- "version": "126.3.2",
3
+ "version": "126.3.4",
4
4
  "description": "GitLab UI Components",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -131,7 +131,7 @@
131
131
  "autoprefixer": "10.4.22",
132
132
  "axe-playwright": "^2.2.2",
133
133
  "babel-loader": "^9.2.1",
134
- "cypress": "14.5.4",
134
+ "cypress": "15.7.1",
135
135
  "cypress-real-events": "^1.15.0",
136
136
  "dompurify": "^3.1.2",
137
137
  "emoji-regex": "^10.6.0",
@@ -159,7 +159,7 @@
159
159
  "rollup-plugin-string": "^3.0.0",
160
160
  "rollup-plugin-svg": "^2.0.0",
161
161
  "rollup-plugin-vue": "^5.1.9",
162
- "sass": "^1.94.2",
162
+ "sass": "^1.95.0",
163
163
  "sass-loader": "^10.5.2",
164
164
  "sass-true": "^9",
165
165
  "start-server-and-test": "^2.1.3",
@@ -28,7 +28,7 @@ export default {
28
28
  default: undefined,
29
29
  },
30
30
  /**
31
- * One of the icons from https://gitlab-org.gitlab.io/gitlab-svgs/ project
31
+ * One of the icons from https://design.gitlab.com/product-foundations/iconography-directory
32
32
  */
33
33
  name: {
34
34
  type: String,
@@ -16,7 +16,7 @@ export default {
16
16
  name: 'GlIllustration',
17
17
  props: {
18
18
  /**
19
- * One of the illustrations from https://gitlab-org.gitlab.io/gitlab-svgs/ project
19
+ * One of the illustrations from https://design.gitlab.com/product-foundations/illustration-directory
20
20
  */
21
21
  name: {
22
22
  type: String,
@@ -146,7 +146,7 @@
146
146
  }
147
147
 
148
148
  &:hover {
149
- .gl-new-dropdown-item-content {
149
+ .gl-new-dropdown-item-content:not(:disabled):not(.disabled) {
150
150
  color: var(--gl-action-danger-foreground-color-hover);
151
151
  background-color: var(--gl-action-danger-background-color-hover);
152
152
  }
@@ -9,6 +9,7 @@ import {
9
9
  getTooltipTitle,
10
10
  getTooltipContent,
11
11
  getTooltipAxisConfig,
12
+ getTooltipParams,
12
13
  } from '../../../../utils/charts/config';
13
14
 
14
15
  import TooltipDefaultFormat from './tooltip_default_format/tooltip_default_format.vue';
@@ -242,7 +243,7 @@ export default {
242
243
 
243
244
  this.title = getTooltipTitle(params, titleAxisName, dimensionIndex);
244
245
  this.content = getTooltipContent(params, valueAxisName, metricIndex);
245
- this.params = params;
246
+ this.params = getTooltipParams(params, options);
246
247
  },
247
248
  },
248
249
  },
@@ -1,5 +1,6 @@
1
1
  <script>
2
2
  import merge from 'lodash/merge';
3
+ import groupBy from 'lodash/groupBy';
3
4
  import {
4
5
  defaultChartOptions,
5
6
  grid,
@@ -310,12 +311,22 @@ export default {
310
311
  getTooltipContent({ params }) {
311
312
  if (!params) return {};
312
313
 
313
- const tooltipContentEntries = params.seriesData
314
- .toSorted((a, b) => b.seriesIndex - a.seriesIndex) // Invert stacking order so it matches chart (see https://github.com/apache/echarts/issues/14700)
315
- .map(({ seriesName = '', value, borderColor }) => [
314
+ // Group by stack and invert order within so it matches `stacked` presentation (see https://github.com/apache/echarts/issues/14700).
315
+ const seriesDataGroupedByStack = groupBy(
316
+ params.seriesData,
317
+ ({ stack, seriesIndex }) => stack ?? seriesIndex,
318
+ );
319
+
320
+ const sortedSeriesData = Object.values(seriesDataGroupedByStack).flatMap((seriesDataStack) =>
321
+ seriesDataStack.toSorted((a, b) => b.seriesIndex - a.seriesIndex),
322
+ );
323
+
324
+ const tooltipContentEntries = sortedSeriesData.map(
325
+ ({ seriesName = '', value, borderColor, color }) => [
316
326
  seriesName,
317
- { value, color: borderColor },
318
- ]);
327
+ { value, color: borderColor ?? color },
328
+ ],
329
+ );
319
330
 
320
331
  return Object.fromEntries(tooltipContentEntries);
321
332
  },