@gitlab/ui 78.10.0 → 78.11.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,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Mon, 08 Apr 2024 17:41:40 GMT
3
+ * Generated on Wed, 10 Apr 2024 09:37:45 GMT
4
4
  */
5
5
 
6
6
  :root {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Mon, 08 Apr 2024 17:41:40 GMT
3
+ * Generated on Wed, 10 Apr 2024 09:37:45 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, 08 Apr 2024 17:41:40 GMT
3
+ * Generated on Wed, 10 Apr 2024 09:37:45 GMT
4
4
  */
5
5
 
6
6
  export const DATA_VIZ_GREEN_50 = "#133a03";
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Mon, 08 Apr 2024 17:41:40 GMT
3
+ * Generated on Wed, 10 Apr 2024 09:37:45 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, 08 Apr 2024 17:41:40 GMT
3
+ // Generated on Wed, 10 Apr 2024 09:37:45 GMT
4
4
 
5
5
  $gl-text-tertiary: #737278 !default;
6
6
  $gl-text-secondary: #89888d !default;
@@ -1,6 +1,6 @@
1
1
 
2
2
  // Do not edit directly
3
- // Generated on Mon, 08 Apr 2024 17:41:40 GMT
3
+ // Generated on Wed, 10 Apr 2024 09:37:45 GMT
4
4
 
5
5
  $gl-text-tertiary: #89888d !default;
6
6
  $gl-text-secondary: #737278 !default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gitlab/ui",
3
- "version": "78.10.0",
3
+ "version": "78.11.0",
4
4
  "description": "GitLab UI Components",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -93,10 +93,10 @@
93
93
  },
94
94
  "devDependencies": {
95
95
  "@arkweid/lefthook": "0.7.7",
96
- "@babel/core": "^7.24.3",
96
+ "@babel/core": "^7.24.4",
97
97
  "@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6",
98
98
  "@babel/plugin-proposal-optional-chaining": "^7.21.0",
99
- "@babel/preset-env": "^7.24.3",
99
+ "@babel/preset-env": "^7.24.4",
100
100
  "@babel/preset-react": "^7.24.1",
101
101
  "@cypress/grep": "^4.0.1",
102
102
  "@gitlab/eslint-plugin": "19.5.0",
@@ -131,7 +131,7 @@
131
131
  "babel-jest": "29.0.1",
132
132
  "babel-loader": "^8.0.5",
133
133
  "bootstrap": "4.6.2",
134
- "cypress": "13.7.0",
134
+ "cypress": "13.7.2",
135
135
  "cypress-axe": "^1.4.0",
136
136
  "cypress-real-events": "^1.11.0",
137
137
  "dompurify": "^3.0.0",
@@ -17,7 +17,7 @@ $label-close-button: '.gl-label-close.gl-button';
17
17
  }
18
18
 
19
19
  &:focus-within {
20
- @include gl-focus($color: var(--label-background-color), $important: true);
20
+ @include gl-focus($color: var(--label-background-color, $white), $important: true);
21
21
  }
22
22
 
23
23
  .gl-label-link {
@@ -1,5 +1,6 @@
1
1
  import { shallowMount } from '@vue/test-utils';
2
2
 
3
+ import { nextTick } from 'vue';
3
4
  import { createMockChartInstance } from '~helpers/chart_stubs';
4
5
  import { expectHeightAutoClasses } from '~helpers/chart_height';
5
6
  import Chart from '../chart/chart.vue';
@@ -76,6 +77,22 @@ describe('heatmap component', () => {
76
77
  });
77
78
  });
78
79
 
80
+ describe('showTooltip', () => {
81
+ it('is true by default', async () => {
82
+ createComponent();
83
+ await nextTick();
84
+
85
+ expect(findChartTooltip().props('show')).toBe(true);
86
+ });
87
+
88
+ it('sets show prop on the tooltip component', async () => {
89
+ createComponent({ showTooltip: false });
90
+ await nextTick();
91
+
92
+ expect(findChartTooltip().props('show')).toBe(false);
93
+ });
94
+ });
95
+
79
96
  describe('height', () => {
80
97
  expectHeightAutoClasses({
81
98
  createComponent,
@@ -25,6 +25,7 @@ const template = `
25
25
  :y-axis-name="yAxisName"
26
26
  :options="options"
27
27
  :height="height"
28
+ :show-tooltip="showTooltip"
28
29
  />
29
30
  `;
30
31
 
@@ -36,6 +37,7 @@ const generateProps = ({
36
37
  yAxisName = 'Day',
37
38
  options = {},
38
39
  height = null,
40
+ showTooltip = true,
39
41
  } = {}) => ({
40
42
  data,
41
43
  xAxisLabels,
@@ -44,6 +46,7 @@ const generateProps = ({
44
46
  yAxisName,
45
47
  options,
46
48
  height,
49
+ showTooltip,
47
50
  });
48
51
 
49
52
  const Template = (args, { argTypes }) => ({
@@ -106,6 +106,11 @@ export default {
106
106
  required: false,
107
107
  default: null,
108
108
  },
109
+ showTooltip: {
110
+ type: Boolean,
111
+ default: true,
112
+ required: false,
113
+ },
109
114
  },
110
115
  data() {
111
116
  return {
@@ -258,7 +263,13 @@ export default {
258
263
  @created="onCreated"
259
264
  v-on="$listeners"
260
265
  />
261
- <chart-tooltip v-if="chart" :chart="chart" :top="tooltip.top" :left="tooltip.left">
266
+ <chart-tooltip
267
+ v-if="chart"
268
+ :chart="chart"
269
+ :top="tooltip.top"
270
+ :left="tooltip.left"
271
+ :show="showTooltip"
272
+ >
262
273
  <template #title>
263
274
  <slot v-if="formatTooltipText" name="tooltip-title"></slot>
264
275
  <div v-else>{{ tooltip.title }}</div>