@gitlab/ui 56.2.1 → 56.3.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/CHANGELOG.md +13 -0
- package/dist/components/base/form/form_checkbox/form_checkbox_group.js +1 -1
- package/dist/components/base/form/form_radio_group/form_radio_group.js +1 -1
- package/dist/components/base/popover/popover.js +6 -1
- package/dist/components/base/table/table.js +12 -1
- package/dist/components/base/table_lite/table_lite.js +13 -2
- package/dist/index.css +2 -2
- package/dist/index.css.map +1 -1
- package/package.json +3 -3
- package/scss_to_js/scss_variables.js +1 -0
- package/scss_to_js/scss_variables.json +5 -0
- package/src/components/base/form/form_checkbox/form_checkbox_group.vue +1 -1
- package/src/components/base/form/form_input/form_input.scss +0 -5
- package/src/components/base/form/form_radio_group/form_radio_group.vue +1 -1
- package/src/components/base/form/form_select/form_select.scss +1 -6
- package/src/components/base/popover/popover.vue +6 -0
- package/src/components/base/table/table.spec.js +12 -1
- package/src/components/base/table/table.vue +11 -1
- package/src/components/base/table_lite/table_lite.spec.js +21 -0
- package/src/components/base/table_lite/table_lite.vue +9 -1
- package/src/scss/variables.scss +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitlab/ui",
|
|
3
|
-
"version": "56.
|
|
3
|
+
"version": "56.3.0",
|
|
4
4
|
"description": "GitLab UI Components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
63
|
"@popperjs/core": "^2.11.2",
|
|
64
|
-
"bootstrap-vue": "2.
|
|
64
|
+
"bootstrap-vue": "2.23.1",
|
|
65
65
|
"dompurify": "^2.4.5",
|
|
66
66
|
"echarts": "^5.3.2",
|
|
67
67
|
"iframe-resizer": "^4.3.2",
|
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
"babel-loader": "^8.0.5",
|
|
114
114
|
"babel-plugin-require-context-hook": "^1.0.0",
|
|
115
115
|
"babel-preset-vue": "^2.0.2",
|
|
116
|
-
"bootstrap": "4.
|
|
116
|
+
"bootstrap": "4.6.2",
|
|
117
117
|
"bootstrap-vue-vue3": "npm:bootstrap-vue@2.23.1",
|
|
118
118
|
"cypress": "^11.2.0",
|
|
119
119
|
"emoji-regex": "^10.0.0",
|
|
@@ -341,6 +341,7 @@ export const modalTitleLineHeight = '1.25rem'
|
|
|
341
341
|
export const modalBackdropBg = '#000'
|
|
342
342
|
export const modalBackdropOpacity = '0.64'
|
|
343
343
|
export const bodyColor = '#333238'
|
|
344
|
+
export const enableValidationIcons = 'false'
|
|
344
345
|
export const secondary = '#ececef'
|
|
345
346
|
export const success = '#108548'
|
|
346
347
|
export const info = '#1f75cb'
|
|
@@ -1815,6 +1815,11 @@
|
|
|
1815
1815
|
"value": "$gl-text-color",
|
|
1816
1816
|
"compiledValue": "#333238"
|
|
1817
1817
|
},
|
|
1818
|
+
{
|
|
1819
|
+
"name": "$enable-validation-icons",
|
|
1820
|
+
"value": "false",
|
|
1821
|
+
"compiledValue": "false"
|
|
1822
|
+
},
|
|
1818
1823
|
{
|
|
1819
1824
|
"name": "$secondary",
|
|
1820
1825
|
"value": "$gray-50",
|
|
@@ -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
|
|
|
@@ -31,17 +31,12 @@
|
|
|
31
31
|
|
|
32
32
|
&.is-invalid {
|
|
33
33
|
@include gl-inset-border-1-red-500;
|
|
34
|
-
background-image: none;
|
|
35
34
|
|
|
36
35
|
&:focus {
|
|
37
36
|
@include gl-focus($color: $red-500);
|
|
38
37
|
}
|
|
39
38
|
}
|
|
40
39
|
|
|
41
|
-
&.is-valid {
|
|
42
|
-
background-image: none;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
40
|
&::placeholder {
|
|
46
41
|
@include gl-text-gray-400;
|
|
47
42
|
}
|
|
@@ -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
|
|
|
@@ -16,6 +16,7 @@ See: https://gitlab.com/gitlab-org/gitlab/issues/30055
|
|
|
16
16
|
@include gl-line-height-normal;
|
|
17
17
|
@include gl-py-3;
|
|
18
18
|
@include gl-pl-4;
|
|
19
|
+
padding-right: $gl-spacing-scale-2 + $gl-spacing-scale-6;
|
|
19
20
|
@include gl-h-auto;
|
|
20
21
|
@include gl-inset-border-1-gray-400;
|
|
21
22
|
@include gl-border-none;
|
|
@@ -36,12 +37,6 @@ See: https://gitlab.com/gitlab-org/gitlab/issues/30055
|
|
|
36
37
|
@include gl-cursor-not-allowed;
|
|
37
38
|
}
|
|
38
39
|
|
|
39
|
-
&.is-valid,
|
|
40
|
-
&.is-invalid {
|
|
41
|
-
padding-right: $gl-spacing-scale-2 + $gl-spacing-scale-6;
|
|
42
|
-
background-image: url($gl-icon-select-chevron-down);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
40
|
&.is-invalid:not(:disabled) {
|
|
46
41
|
@include gl-inset-border-1-red-400;
|
|
47
42
|
|
|
@@ -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
|
>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
import { BTable } from 'bootstrap-vue';
|
|
2
3
|
import { logWarning } from '../../../utils/utils';
|
|
3
4
|
import { waitForAnimationFrame } from '../../../utils/test_utils';
|
|
4
5
|
import { glTableLiteWarning } from './constants';
|
|
@@ -10,18 +11,22 @@ jest.mock('../../../utils/utils', () => ({
|
|
|
10
11
|
}));
|
|
11
12
|
|
|
12
13
|
describe('GlTable', () => {
|
|
14
|
+
let wrapper;
|
|
15
|
+
|
|
13
16
|
const slotsTemplate = {
|
|
14
17
|
empty: `
|
|
15
18
|
<p>Placeholder empty text</p>`,
|
|
16
19
|
};
|
|
17
20
|
|
|
18
21
|
const factory = ({ props = {}, scopedSlots = {} } = {}) => {
|
|
19
|
-
shallowMount(Table, {
|
|
22
|
+
wrapper = shallowMount(Table, {
|
|
20
23
|
scopedSlots,
|
|
21
24
|
propsData: props,
|
|
22
25
|
});
|
|
23
26
|
};
|
|
24
27
|
|
|
28
|
+
const findBTable = () => wrapper.findComponent(BTable);
|
|
29
|
+
|
|
25
30
|
afterEach(() => {
|
|
26
31
|
logWarning.mockClear();
|
|
27
32
|
});
|
|
@@ -46,4 +51,10 @@ describe('GlTable', () => {
|
|
|
46
51
|
|
|
47
52
|
expect(logWarning).not.toHaveBeenCalled();
|
|
48
53
|
});
|
|
54
|
+
|
|
55
|
+
it('adds gl-table class to tableClass prop', () => {
|
|
56
|
+
factory({ props: { tableClass: 'test-class' } });
|
|
57
|
+
|
|
58
|
+
expect(findBTable().props().tableClass).toEqual(['gl-table', 'test-class']);
|
|
59
|
+
});
|
|
49
60
|
});
|
|
@@ -11,11 +11,21 @@ const shouldUseFullTable = ({ $attrs, $scopedSlots }) => {
|
|
|
11
11
|
);
|
|
12
12
|
};
|
|
13
13
|
|
|
14
|
+
const { tableClass } = BTable.options.props;
|
|
15
|
+
|
|
14
16
|
export default {
|
|
15
17
|
components: {
|
|
16
18
|
BTable,
|
|
17
19
|
},
|
|
18
20
|
inheritAttrs: false,
|
|
21
|
+
props: {
|
|
22
|
+
tableClass,
|
|
23
|
+
},
|
|
24
|
+
computed: {
|
|
25
|
+
localTableClass() {
|
|
26
|
+
return ['gl-table', this.tableClass];
|
|
27
|
+
},
|
|
28
|
+
},
|
|
19
29
|
mounted() {
|
|
20
30
|
// logWarning will call isDev before logging any message
|
|
21
31
|
// this additional call to isDev is being made to exit the condition early when run in production
|
|
@@ -27,7 +37,7 @@ export default {
|
|
|
27
37
|
</script>
|
|
28
38
|
|
|
29
39
|
<template>
|
|
30
|
-
<b-table class="
|
|
40
|
+
<b-table :table-class="localTableClass" v-bind="$attrs" v-on="$listeners">
|
|
31
41
|
<template v-for="slot in Object.keys($scopedSlots)" #[slot]="scope">
|
|
32
42
|
<slot :name="slot" v-bind="scope"></slot>
|
|
33
43
|
</template>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
import { BTableLite } from 'bootstrap-vue';
|
|
3
|
+
import GlTableLite from './table_lite.vue';
|
|
4
|
+
|
|
5
|
+
describe('GlTableLite', () => {
|
|
6
|
+
let wrapper;
|
|
7
|
+
|
|
8
|
+
const factory = (propsData) => {
|
|
9
|
+
wrapper = shallowMount(GlTableLite, {
|
|
10
|
+
propsData,
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const findBTableLite = () => wrapper.findComponent(BTableLite);
|
|
15
|
+
|
|
16
|
+
it('adds gl-table class to tableClass prop', () => {
|
|
17
|
+
factory({ tableClass: 'test-class' });
|
|
18
|
+
|
|
19
|
+
expect(findBTableLite().props().tableClass).toEqual(['gl-table', 'test-class']);
|
|
20
|
+
});
|
|
21
|
+
});
|
|
@@ -1,16 +1,24 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import { BTableLite } from 'bootstrap-vue';
|
|
3
3
|
|
|
4
|
+
const { tableClass } = BTableLite.options.props;
|
|
5
|
+
|
|
4
6
|
export default {
|
|
5
7
|
components: {
|
|
6
8
|
BTableLite,
|
|
7
9
|
},
|
|
8
10
|
inheritAttrs: false,
|
|
11
|
+
props: { tableClass },
|
|
12
|
+
computed: {
|
|
13
|
+
localTableClass() {
|
|
14
|
+
return ['gl-table', this.tableClass];
|
|
15
|
+
},
|
|
16
|
+
},
|
|
9
17
|
};
|
|
10
18
|
</script>
|
|
11
19
|
|
|
12
20
|
<template>
|
|
13
|
-
<b-table-lite class="
|
|
21
|
+
<b-table-lite :table-class="localTableClass" v-bind="$attrs" v-on="$listeners">
|
|
14
22
|
<template v-for="slot in Object.keys($scopedSlots)" #[slot]="scope">
|
|
15
23
|
<!-- @slot See https://bootstrap-vue.org/docs/components/table#comp-ref-b-table-lite-slots for available slots. -->
|
|
16
24
|
<slot :name="slot" v-bind="scope"></slot>
|
package/src/scss/variables.scss
CHANGED
|
@@ -484,6 +484,7 @@ $modal-backdrop-opacity: 0.64;
|
|
|
484
484
|
// these should ideally be moved further up in the file to the compoent-relevant sections
|
|
485
485
|
// but they can wait here for now
|
|
486
486
|
$body-color: $gl-text-color !default;
|
|
487
|
+
$enable-validation-icons: false;
|
|
487
488
|
|
|
488
489
|
$secondary: $gray-50;
|
|
489
490
|
$success: $green-500;
|