@gitlab/ui 42.8.0 → 42.10.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.
- package/CHANGELOG.md +26 -0
- package/dist/components/base/form/form_checkbox/form_checkbox.js +9 -1
- package/dist/components/charts/stacked_column/stacked_column.js +2 -2
- package/dist/directives/hover_load/hover_load.js +1 -1
- package/dist/index.css.map +1 -1
- package/dist/utility_classes.css +1 -1
- package/dist/utility_classes.css.map +1 -1
- package/package.json +2 -2
- package/src/components/base/form/form_checkbox/form_checkbox.vue +15 -1
- package/src/components/charts/stacked_column/stacked_column.vue +2 -1
- package/src/directives/hover_load/hover_load.js +1 -1
- package/src/directives/hover_load/hover_load.spec.js +19 -20
- package/src/scss/utilities.scss +18 -8
- package/src/scss/utility-mixins/grid.scss +0 -4
- package/src/scss/utility-mixins/spacing.scss +13 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitlab/ui",
|
|
3
|
-
"version": "42.
|
|
3
|
+
"version": "42.10.1",
|
|
4
4
|
"description": "GitLab UI Components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"@babel/preset-env": "^7.10.2",
|
|
84
84
|
"@gitlab/eslint-plugin": "12.3.0",
|
|
85
85
|
"@gitlab/stylelint-config": "4.1.0",
|
|
86
|
-
"@gitlab/svgs": "2.
|
|
86
|
+
"@gitlab/svgs": "2.22.0",
|
|
87
87
|
"@rollup/plugin-commonjs": "^11.1.0",
|
|
88
88
|
"@rollup/plugin-node-resolve": "^7.1.3",
|
|
89
89
|
"@rollup/plugin-replace": "^2.3.2",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import { BFormCheckbox } from 'bootstrap-vue';
|
|
3
|
+
import { uniqueId } from 'lodash';
|
|
3
4
|
|
|
4
5
|
export default {
|
|
5
6
|
name: 'GlFormCheckbox',
|
|
@@ -11,6 +12,13 @@ export default {
|
|
|
11
12
|
prop: 'checked',
|
|
12
13
|
event: 'input',
|
|
13
14
|
},
|
|
15
|
+
props: {
|
|
16
|
+
id: {
|
|
17
|
+
type: String,
|
|
18
|
+
required: false,
|
|
19
|
+
default: () => uniqueId(),
|
|
20
|
+
},
|
|
21
|
+
},
|
|
14
22
|
methods: {
|
|
15
23
|
change($event) {
|
|
16
24
|
/**
|
|
@@ -33,7 +41,13 @@ export default {
|
|
|
33
41
|
</script>
|
|
34
42
|
|
|
35
43
|
<template>
|
|
36
|
-
<b-form-checkbox
|
|
44
|
+
<b-form-checkbox
|
|
45
|
+
v-bind="$attrs"
|
|
46
|
+
:id="id"
|
|
47
|
+
class="gl-form-checkbox"
|
|
48
|
+
@change="change"
|
|
49
|
+
@input="input"
|
|
50
|
+
>
|
|
37
51
|
<!-- @slot The checkbox content to display. -->
|
|
38
52
|
<slot></slot>
|
|
39
53
|
<p v-if="Boolean($scopedSlots.help)" class="help-text">
|
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
LEGEND_MIN_TEXT,
|
|
18
18
|
LEGEND_MAX_TEXT,
|
|
19
19
|
CHART_TYPE_LINE,
|
|
20
|
+
ANNOTATION_TOOLTIP_TOP_OFFSET,
|
|
20
21
|
} from '../../../utils/charts/constants';
|
|
21
22
|
import { colorFromDefaultPalette } from '../../../utils/charts/theme';
|
|
22
23
|
import { columnOptions } from '../../../utils/constants';
|
|
@@ -259,7 +260,7 @@ export default {
|
|
|
259
260
|
moveShowTooltip(mouseEvent) {
|
|
260
261
|
this.tooltipPosition = {
|
|
261
262
|
left: `${mouseEvent.zrX}px`,
|
|
262
|
-
top: `${mouseEvent.zrY}px`,
|
|
263
|
+
top: `${mouseEvent.zrY + ANNOTATION_TOOLTIP_TOP_OFFSET}px`,
|
|
263
264
|
};
|
|
264
265
|
this.showTooltip = this.chart.containPixel('grid', [mouseEvent.zrX, mouseEvent.zrY]);
|
|
265
266
|
},
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils';
|
|
2
|
-
import { HoverLoadDirective as hoverLoad } from './hover_load';
|
|
2
|
+
import { HoverLoadDirective as hoverLoad, DELAY_ON_HOVER } from './hover_load';
|
|
3
|
+
|
|
4
|
+
jest.useFakeTimers();
|
|
3
5
|
|
|
4
6
|
describe('hover load directive', () => {
|
|
5
7
|
let wrapper;
|
|
@@ -26,28 +28,25 @@ describe('hover load directive', () => {
|
|
|
26
28
|
});
|
|
27
29
|
|
|
28
30
|
it.each`
|
|
29
|
-
hoverDuration |
|
|
30
|
-
${
|
|
31
|
-
${
|
|
32
|
-
`(
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
31
|
+
hoverDuration | action | expectedCalls
|
|
32
|
+
${DELAY_ON_HOVER} | ${'triggers'} | ${1}
|
|
33
|
+
${DELAY_ON_HOVER - 1} | ${'does not trigger'} | ${0}
|
|
34
|
+
`('$action the callback after $hoverDuration ms', ({ hoverDuration, expectedCalls }) => {
|
|
35
|
+
const mockHandleLoad = jest.fn();
|
|
36
|
+
createComponent(mockHandleLoad);
|
|
37
|
+
|
|
38
|
+
findTarget().trigger('mouseover');
|
|
39
|
+
|
|
40
|
+
jest.advanceTimersByTime(hoverDuration);
|
|
37
41
|
|
|
38
|
-
|
|
39
|
-
await new Promise((resolve) => {
|
|
40
|
-
setTimeout(resolve, hoverDuration);
|
|
41
|
-
});
|
|
42
|
-
findTarget().trigger('mouseout');
|
|
42
|
+
findTarget().trigger('mouseout');
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}
|
|
44
|
+
expect(mockHandleLoad).toHaveBeenCalledTimes(expectedCalls);
|
|
45
|
+
|
|
46
|
+
if (expectedCalls) {
|
|
47
|
+
expect(mockHandleLoad).toHaveBeenCalledWith(findTarget().element);
|
|
49
48
|
}
|
|
50
|
-
);
|
|
49
|
+
});
|
|
51
50
|
|
|
52
51
|
it('cleans up the mouseover event when component is destroyed', () => {
|
|
53
52
|
createComponent(jest.fn());
|
package/src/scss/utilities.scss
CHANGED
|
@@ -3599,14 +3599,6 @@
|
|
|
3599
3599
|
}
|
|
3600
3600
|
}
|
|
3601
3601
|
|
|
3602
|
-
.gl-grid-gap-6 {
|
|
3603
|
-
gap: $gl-spacing-scale-6;
|
|
3604
|
-
}
|
|
3605
|
-
|
|
3606
|
-
.gl-grid-gap-6\! {
|
|
3607
|
-
gap: $gl-spacing-scale-6 !important;
|
|
3608
|
-
}
|
|
3609
|
-
|
|
3610
3602
|
.gl-list-style-none {
|
|
3611
3603
|
list-style-type: none
|
|
3612
3604
|
}
|
|
@@ -6138,6 +6130,24 @@
|
|
|
6138
6130
|
margin-left: #{$gl-spacing-scale-5} !important;
|
|
6139
6131
|
}
|
|
6140
6132
|
}
|
|
6133
|
+
.gl-gap-3 {
|
|
6134
|
+
gap: $gl-spacing-scale-3;
|
|
6135
|
+
}
|
|
6136
|
+
.gl-gap-3\! {
|
|
6137
|
+
gap: $gl-spacing-scale-3 !important;
|
|
6138
|
+
}
|
|
6139
|
+
.gl-gap-6 {
|
|
6140
|
+
gap: $gl-spacing-scale-6;
|
|
6141
|
+
}
|
|
6142
|
+
.gl-gap-6\! {
|
|
6143
|
+
gap: $gl-spacing-scale-6 !important;
|
|
6144
|
+
}
|
|
6145
|
+
.gl-grid-gap-6 {
|
|
6146
|
+
gap: $gl-spacing-scale-6;
|
|
6147
|
+
}
|
|
6148
|
+
.gl-grid-gap-6\! {
|
|
6149
|
+
gap: $gl-spacing-scale-6 !important;
|
|
6150
|
+
}
|
|
6141
6151
|
.gl-xs-mb-3 {
|
|
6142
6152
|
@include gl-media-breakpoint-down(sm) {
|
|
6143
6153
|
margin-bottom: $gl-spacing-scale-3;
|
|
@@ -785,6 +785,19 @@
|
|
|
785
785
|
}
|
|
786
786
|
}
|
|
787
787
|
|
|
788
|
+
@mixin gl-gap-3 {
|
|
789
|
+
gap: $gl-spacing-scale-3;
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
@mixin gl-gap-6 {
|
|
793
|
+
gap: $gl-spacing-scale-6;
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
/* Deprecated */
|
|
797
|
+
@mixin gl-grid-gap-6 {
|
|
798
|
+
@include gl-gap-6;
|
|
799
|
+
}
|
|
800
|
+
|
|
788
801
|
/**
|
|
789
802
|
* Responsive margin utilities.
|
|
790
803
|
*
|