@gitlab/ui 119.1.0 → 119.2.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.
@@ -1,13 +1,14 @@
1
1
  import merge from 'lodash/merge';
2
2
  import truncate from 'lodash/truncate';
3
3
  import { dataZoomAdjustments, mergeSeriesToOptions, grid } from '../../../utils/charts/config';
4
- import { HEIGHT_AUTO_CLASSES } from '../../../utils/charts/constants';
4
+ import { CHART_DEFAULT_SERIES_STACK, HEIGHT_AUTO_CLASSES } from '../../../utils/charts/constants';
5
5
  import { colorFromDefaultPalette } from '../../../utils/charts/theme';
6
6
  import { engineeringNotation } from '../../../utils/number_utils';
7
7
  import { hexToRgba } from '../../../utils/utils';
8
8
  import TooltipDefaultFormat from '../shared/tooltip/tooltip_default_format/tooltip_default_format';
9
9
  import Chart from '../chart/chart';
10
10
  import ChartTooltip from '../shared/tooltip/tooltip';
11
+ import { stackedPresentationOptions } from '../../../utils/constants';
11
12
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
12
13
 
13
14
  //
@@ -96,6 +97,17 @@ var script = {
96
97
  type: [Number, String],
97
98
  required: false,
98
99
  default: null
100
+ },
101
+ /**
102
+ * Controls how multiple series data are displayed in the chart –
103
+ * `stacked` stacks series horizontally, and
104
+ * `tiled` displays series as grouped bars.
105
+ */
106
+ presentation: {
107
+ type: String,
108
+ required: false,
109
+ default: stackedPresentationOptions.stacked,
110
+ validator: value => Object.values(stackedPresentationOptions).includes(value)
99
111
  }
100
112
  },
101
113
  data() {
@@ -113,7 +125,7 @@ var script = {
113
125
  name: key,
114
126
  data: this.data[key],
115
127
  type: 'bar',
116
- stack: 'chart',
128
+ stack: this.presentation === stackedPresentationOptions.tiled ? null : CHART_DEFAULT_SERIES_STACK,
117
129
  itemStyle: {
118
130
  color: hexToRgba(barColor, 0.2),
119
131
  borderColor: barColor,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gitlab/ui",
3
- "version": "119.1.0",
3
+ "version": "119.2.0",
4
4
  "description": "GitLab UI Components",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -69,7 +69,7 @@
69
69
  "tailwind-config-viewer:export": "tailwind-config-viewer export ./tailwind-config-viewer-static"
70
70
  },
71
71
  "dependencies": {
72
- "@floating-ui/dom": "1.7.3",
72
+ "@floating-ui/dom": "1.7.4",
73
73
  "echarts": "^5.6.0",
74
74
  "gridstack": "^12.3.3",
75
75
  "iframe-resizer": "^4.4.5",
@@ -102,8 +102,8 @@
102
102
  "@babel/preset-env": "^7.28.3",
103
103
  "@babel/preset-react": "^7.27.1",
104
104
  "@cypress/grep": "^4.1.1",
105
- "@gitlab/fonts": "^1.3.0",
106
- "@gitlab/svgs": "3.143.0",
105
+ "@gitlab/fonts": "^1.3.1",
106
+ "@gitlab/svgs": "3.145.0",
107
107
  "@jest/test-sequencer": "30.0.5",
108
108
  "@rollup/plugin-commonjs": "^28.0.6",
109
109
  "@rollup/plugin-node-resolve": "^16.0.1",
@@ -122,9 +122,9 @@
122
122
  "@storybook/vue3": "^7.6.20",
123
123
  "@storybook/vue3-webpack5": "^7.6.20",
124
124
  "@types/jest-image-snapshot": "^6.4.0",
125
- "@vue/compat": "^3.5.18",
126
- "@vue/compiler-sfc": "^3.5.18",
127
- "@vue/server-renderer": "^3.5.18",
125
+ "@vue/compat": "^3.5.19",
126
+ "@vue/compiler-sfc": "^3.5.19",
127
+ "@vue/server-renderer": "^3.5.19",
128
128
  "@vue/test-utils": "1.3.6",
129
129
  "@vue/test-utils-vue3": "npm:@vue/test-utils@^2.4.6",
130
130
  "@vue/vue2-jest": "29.2.6",
@@ -171,7 +171,7 @@
171
171
  "start-server-and-test": "^2.0.13",
172
172
  "storybook": "^7.6.20",
173
173
  "storybook-dark-mode": "4.0.2",
174
- "style-dictionary": "^5.0.1",
174
+ "style-dictionary": "^5.0.2",
175
175
  "style-loader": "^4",
176
176
  "tailwind-config-viewer": "2.0.4",
177
177
  "tailwindcss": "3.4.17",
@@ -3,13 +3,14 @@
3
3
  import merge from 'lodash/merge';
4
4
  import truncate from 'lodash/truncate';
5
5
  import { grid, dataZoomAdjustments, mergeSeriesToOptions } from '../../../utils/charts/config';
6
- import { HEIGHT_AUTO_CLASSES } from '../../../utils/charts/constants';
6
+ import { CHART_DEFAULT_SERIES_STACK, HEIGHT_AUTO_CLASSES } from '../../../utils/charts/constants';
7
7
  import { colorFromDefaultPalette } from '../../../utils/charts/theme';
8
8
  import { engineeringNotation } from '../../../utils/number_utils';
9
9
  import { hexToRgba } from '../../../utils/utils';
10
10
  import TooltipDefaultFormat from '../shared/tooltip/tooltip_default_format/tooltip_default_format.vue';
11
11
  import Chart from '../chart/chart.vue';
12
12
  import ChartTooltip from '../shared/tooltip/tooltip.vue';
13
+ import { stackedPresentationOptions } from '../../../utils/constants';
13
14
 
14
15
  /**
15
16
  * `nameGap` in charts/config is set to 50 but it is not
@@ -97,6 +98,17 @@ export default {
97
98
  required: false,
98
99
  default: null,
99
100
  },
101
+ /**
102
+ * Controls how multiple series data are displayed in the chart –
103
+ * `stacked` stacks series horizontally, and
104
+ * `tiled` displays series as grouped bars.
105
+ */
106
+ presentation: {
107
+ type: String,
108
+ required: false,
109
+ default: stackedPresentationOptions.stacked,
110
+ validator: (value) => Object.values(stackedPresentationOptions).includes(value),
111
+ },
100
112
  },
101
113
  data() {
102
114
  return {
@@ -114,7 +126,10 @@ export default {
114
126
  name: key,
115
127
  data: this.data[key],
116
128
  type: 'bar',
117
- stack: 'chart',
129
+ stack:
130
+ this.presentation === stackedPresentationOptions.tiled
131
+ ? null
132
+ : CHART_DEFAULT_SERIES_STACK,
118
133
  itemStyle: {
119
134
  color: hexToRgba(barColor, 0.2),
120
135
  borderColor: barColor,