@gitlab/ui 49.2.1 → 49.4.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gitlab/ui",
3
- "version": "49.2.1",
3
+ "version": "49.4.0",
4
4
  "description": "GitLab UI Components",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -27,7 +27,7 @@
27
27
  "clean": "rm -r dist storybook scss_to_js/scss_variables.* src/scss/utilities.scss",
28
28
  "cy:run": "cypress run --browser firefox",
29
29
  "start": "yarn storybook",
30
- "storybook": "yarn storybook-prep && start-storybook --ci -p 9001 -c .storybook -s ./static",
30
+ "storybook": "yarn storybook-prep && start-storybook --ci --host localhost --port 9001 -c .storybook -s ./static",
31
31
  "storybook-prep": "run-s generate-utilities build-scss-variables",
32
32
  "storybook-static": "yarn storybook-prep && build-storybook -c .storybook -o storybook -s ./static",
33
33
  "pretest:unit": "yarn build-scss-variables",
@@ -56,7 +56,7 @@
56
56
  },
57
57
  "dependencies": {
58
58
  "@popperjs/core": "^2.11.2",
59
- "bootstrap-vue": "2.20.1",
59
+ "bootstrap-vue": "2.23.1",
60
60
  "dompurify": "^2.4.0",
61
61
  "echarts": "^5.3.2",
62
62
  "iframe-resizer": "^4.3.2",
@@ -66,7 +66,7 @@
66
66
  },
67
67
  "peerDependencies": {
68
68
  "@gitlab/svgs": "^1.116.0 || ^2.0.0 || ^3.0.0",
69
- "bootstrap": "4.5.3",
69
+ "bootstrap": ">=4.5.3 <=4.6.2",
70
70
  "emoji-regex": ">=10.0.0",
71
71
  "pikaday": "^1.8.0",
72
72
  "vue": "^2.6.10"
@@ -85,14 +85,14 @@
85
85
  "@rollup/plugin-commonjs": "^11.1.0",
86
86
  "@rollup/plugin-node-resolve": "^7.1.3",
87
87
  "@rollup/plugin-replace": "^2.3.2",
88
- "@storybook/addon-a11y": "6.5.12",
89
- "@storybook/addon-docs": "6.5.12",
90
- "@storybook/addon-essentials": "6.5.12",
91
- "@storybook/addon-storyshots": "6.5.12",
92
- "@storybook/addon-storyshots-puppeteer": "6.5.12",
93
- "@storybook/addon-viewport": "6.5.12",
94
- "@storybook/theming": "6.5.12",
95
- "@storybook/vue": "6.5.12",
88
+ "@storybook/addon-a11y": "6.5.13",
89
+ "@storybook/addon-docs": "6.5.13",
90
+ "@storybook/addon-essentials": "6.5.13",
91
+ "@storybook/addon-storyshots": "6.5.13",
92
+ "@storybook/addon-storyshots-puppeteer": "6.5.13",
93
+ "@storybook/addon-viewport": "6.5.13",
94
+ "@storybook/theming": "6.5.13",
95
+ "@storybook/vue": "6.5.13",
96
96
  "@vue/test-utils": "1.3.0",
97
97
  "@vue/vue2-jest": "29.0.0",
98
98
  "autoprefixer": "^9.7.6",
@@ -101,8 +101,8 @@
101
101
  "babel-plugin-lodash": "^3.3.4",
102
102
  "babel-plugin-require-context-hook": "^1.0.0",
103
103
  "babel-preset-vue": "^2.0.2",
104
- "bootstrap": "4.5.3",
105
- "cypress": "^10.10.0",
104
+ "bootstrap": "4.6.2",
105
+ "cypress": "^10.11.0",
106
106
  "emoji-regex": "^10.0.0",
107
107
  "eslint": "8.26.0",
108
108
  "eslint-import-resolver-jest": "3.0.2",
@@ -112,9 +112,9 @@
112
112
  "glob": "^7.2.0",
113
113
  "identity-obj-proxy": "^3.0.0",
114
114
  "inquirer-select-directory": "^1.2.0",
115
- "jest": "^29.1.2",
116
- "jest-circus": "29.1.2",
117
- "jest-environment-jsdom": "29.1.2",
115
+ "jest": "^29.2.2",
116
+ "jest-circus": "29.2.2",
117
+ "jest-environment-jsdom": "29.2.2",
118
118
  "jest-serializer-vue": "^2.0.2",
119
119
  "markdownlint-cli": "^0.29.0",
120
120
  "mockdate": "^2.0.5",
@@ -97,14 +97,14 @@
97
97
 
98
98
  @include gl-badge-variant(
99
99
  $variant: muted,
100
- $color: $gray-500,
101
- $icon-color: $gray-400,
100
+ $color: $gray-600,
101
+ $icon-color: $gray-500,
102
102
  $bg: $gray-50,
103
- $hover-color: $gray-600,
104
- $hover-icon-color: $gray-500,
103
+ $hover-color: $gray-700,
104
+ $hover-icon-color: $gray-600,
105
105
  $border-color: $gray-200,
106
- $active-color: $gray-700,
107
- $active-icon-color: $gray-600,
106
+ $active-color: $gray-800,
107
+ $active-icon-color: $gray-700,
108
108
  $active-bg: $gray-100
109
109
  );
110
110
 
@@ -2,7 +2,7 @@ import PortalVue from 'portal-vue';
2
2
  import Vue from 'vue';
3
3
  import { GlFilteredSearchSuggestion } from '../../../index';
4
4
  import { provide } from './common_story_options';
5
- import readme from './filtered_search_term.md';
5
+ import readme from './filtered_search_token_segment.md';
6
6
  import GlFilteredSearchTokenSegment from './filtered_search_token_segment.vue';
7
7
 
8
8
  Vue.use(PortalVue);
@@ -1,6 +1,6 @@
1
1
  <script>
2
2
  import { BFormCheckboxGroup } from 'bootstrap-vue';
3
- import formOptionsMixin from 'bootstrap-vue/src/mixins/form-options';
3
+ import { formOptionsMixin } from 'bootstrap-vue/src/mixins/form-options';
4
4
  import { SafeHtmlDirective as SafeHtml } from '../../../../directives/safe_html/safe_html';
5
5
  import GlFormCheckbox from './form_checkbox.vue';
6
6
 
@@ -1,4 +1,5 @@
1
1
  import { nextTick } from 'vue';
2
+ import { cloneDeep } from 'lodash';
2
3
  import { mount } from '@vue/test-utils';
3
4
  import GlDropdownItem from '../../dropdown/dropdown_item.vue';
4
5
  import GlFormInput from '../form_input/form_input.vue';
@@ -258,8 +259,9 @@ describe('GlFormCombobox', () => {
258
259
  const windowAlert = window.alert;
259
260
 
260
261
  beforeEach(() => {
261
- createComponent({ tokens: oneTokenList, actionList: actionsList });
262
- actionSpy = jest.spyOn(wrapper.vm.actionList[0], 'fn');
262
+ const actionList = cloneDeep(actionsList);
263
+ actionSpy = jest.spyOn(actionList[0], 'fn');
264
+ createComponent({ tokens: oneTokenList, actionList });
263
265
  window.alert = jest.fn();
264
266
  });
265
267
 
@@ -1,6 +1,6 @@
1
1
  <script>
2
2
  import { BFormRadioGroup } from 'bootstrap-vue';
3
- import formOptionsMixin from 'bootstrap-vue/src/mixins/form-options';
3
+ import { formOptionsMixin } from 'bootstrap-vue/src/mixins/form-options';
4
4
  import { SafeHtmlDirective as SafeHtml } from '../../../../directives/safe_html/safe_html';
5
5
  import GlFormRadio from '../form_radio/form_radio.vue';
6
6
 
@@ -45,6 +45,11 @@ export default {
45
45
  required: false,
46
46
  default: popoverPlacements.top,
47
47
  },
48
+ boundaryPadding: {
49
+ type: [Number, String],
50
+ required: false,
51
+ default: 5,
52
+ },
48
53
  },
49
54
  computed: {
50
55
  customClass() {
@@ -74,6 +79,7 @@ export default {
74
79
  :triggers="triggers"
75
80
  :title="title"
76
81
  :placement="placement"
82
+ :boundary-padding="boundaryPadding"
77
83
  v-bind="$attrs"
78
84
  v-on="$listeners"
79
85
  >
@@ -228,6 +228,7 @@ describe('tabs component', () => {
228
228
  props: { syncActiveTabWithQueryParams: true, queryParamName },
229
229
  });
230
230
 
231
+ await nextTick();
231
232
  await nextTick();
232
233
 
233
234
  expect(findActiveTab().text()).toBe(expectedActiveTabText);
@@ -337,10 +338,11 @@ describe('tabs component', () => {
337
338
  props: { syncActiveTabWithQueryParams: true },
338
339
  });
339
340
 
341
+ await nextTick();
340
342
  await nextTick();
341
343
 
342
- expect(wrapper.emitted('input')[0]).toEqual([1]);
343
- expect(wrapper.emitted('input')[1]).toEqual([1]);
344
+ expect(wrapper.emitted().input[0]).toEqual([0]);
345
+ expect(wrapper.emitted().input[1]).toEqual([1]);
344
346
  });
345
347
  });
346
348
  });
@@ -129,12 +129,12 @@ export default {
129
129
  /**
130
130
  * When the query parameter is updated, update the active tab to match.
131
131
  */
132
- syncActiveTabFromQueryParams() {
132
+ async syncActiveTabFromQueryParams() {
133
+ await this.$nextTick();
133
134
  const queryParamValue = this.getQueryParamValue();
134
135
  const tabIndexToActivate = this.getTabs().findIndex(
135
136
  (tab, tabIndex) => this.getTabQueryParamValue(tabIndex) === queryParamValue
136
137
  );
137
-
138
138
  this.activeTabIndex = tabIndexToActivate !== -1 ? tabIndexToActivate : 0;
139
139
  },
140
140
 
@@ -1,8 +1,9 @@
1
1
  ### ECharts Wrapper
2
2
 
3
- The chart component is a Vue component wrapper around [ECharts]. The chart component accepts width
4
- and height props in order to allow the user to make it responsive, but it is not responsive by
5
- default.
3
+ The chart component is a Vue component wrapper around
4
+ [Apache ECharts](https://echarts.apache.org/en/api.html#echarts). The chart component accepts width
5
+ and height props in order to allow the user to make it responsive, but it is not responsive
6
+ by default.
6
7
 
7
8
  > Note: In every case there should be a specific component for each type of chart
8
9
  (i.e. Line, Area, Bar, etc.). This component should only need to be used by chart type components
@@ -15,6 +16,5 @@ This component emits the following events during the ECharts lifecycle:
15
16
  - `created`: emitted after calling `echarts.init`
16
17
  - `updated`: emitted after calling `echarts.setOption`
17
18
 
18
- In all cases, the event payload is the echart instance.
19
-
20
- [echarts]: https://echarts.apache.org
19
+ In all cases, the event payload is the
20
+ [echart instance](https://echarts.apache.org/en/api.html#echartsInstance).
@@ -16,6 +16,10 @@ export default {
16
16
  resizeObserver: GlResizeObserverDirective,
17
17
  },
18
18
  props: {
19
+ /**
20
+ * The ECharts configuration object.
21
+ * https://echarts.apache.org/en/option.html#title
22
+ */
19
23
  options: {
20
24
  type: Object,
21
25
  required: true,
@@ -42,11 +46,19 @@ export default {
42
46
  default: null,
43
47
  validator: sizeValidator,
44
48
  },
49
+ /**
50
+ * An ECharts group id. Used to connect multiple charts.
51
+ * https://echarts.apache.org/en/api.html#echarts.connect
52
+ */
45
53
  groupId: {
46
54
  type: String,
47
55
  required: false,
48
56
  default: '',
49
57
  },
58
+ /**
59
+ * How the chart should be rendered. Valid options are 'canvas' or 'svg'.
60
+ * https://echarts.apache.org/handbook/en/best-practices/canvas-vs-svg/
61
+ */
50
62
  renderer: {
51
63
  type: String,
52
64
  required: false,