@gitlab/ui 56.2.0 → 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 +20 -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/dist/utility_classes.css +1 -1
- package/dist/utility_classes.css.map +1 -1
- package/package.json +9 -9
- package/scss_to_js/scss_variables.js +2 -0
- package/scss_to_js/scss_variables.json +10 -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/utilities.scss +56 -0
- package/src/scss/utility-mixins/border.scss +20 -0
- package/src/scss/utility-mixins/flex.scss +4 -0
- package/src/scss/utility-mixins/typography.scss +4 -0
- package/src/scss/variables.scss +2 -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,8 +61,8 @@
|
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
63
|
"@popperjs/core": "^2.11.2",
|
|
64
|
-
"bootstrap-vue": "2.
|
|
65
|
-
"dompurify": "^2.4.
|
|
64
|
+
"bootstrap-vue": "2.23.1",
|
|
65
|
+
"dompurify": "^2.4.5",
|
|
66
66
|
"echarts": "^5.3.2",
|
|
67
67
|
"iframe-resizer": "^4.3.2",
|
|
68
68
|
"lodash": "^4.17.20",
|
|
@@ -85,10 +85,10 @@
|
|
|
85
85
|
"@arkweid/lefthook": "0.7.7",
|
|
86
86
|
"@babel/core": "^7.21.0",
|
|
87
87
|
"@babel/preset-env": "^7.20.2",
|
|
88
|
-
"@gitlab/eslint-plugin": "18.
|
|
88
|
+
"@gitlab/eslint-plugin": "18.2.0",
|
|
89
89
|
"@gitlab/fonts": "^1.2.0",
|
|
90
90
|
"@gitlab/stylelint-config": "4.1.0",
|
|
91
|
-
"@gitlab/svgs": "3.
|
|
91
|
+
"@gitlab/svgs": "3.22.0",
|
|
92
92
|
"@rollup/plugin-commonjs": "^11.1.0",
|
|
93
93
|
"@rollup/plugin-node-resolve": "^7.1.3",
|
|
94
94
|
"@rollup/plugin-replace": "^2.3.2",
|
|
@@ -113,14 +113,14 @@
|
|
|
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",
|
|
120
|
-
"eslint": "8.
|
|
120
|
+
"eslint": "8.35.0",
|
|
121
121
|
"eslint-import-resolver-jest": "3.0.2",
|
|
122
122
|
"eslint-plugin-cypress": "2.12.1",
|
|
123
|
-
"eslint-plugin-storybook": "0.6.
|
|
123
|
+
"eslint-plugin-storybook": "0.6.11",
|
|
124
124
|
"file-loader": "^4.2.0",
|
|
125
125
|
"glob": "^7.2.0",
|
|
126
126
|
"identity-obj-proxy": "^3.0.0",
|
|
@@ -134,7 +134,7 @@
|
|
|
134
134
|
"pikaday": "^1.8.0",
|
|
135
135
|
"plop": "^2.5.4",
|
|
136
136
|
"postcss": "8.4.14",
|
|
137
|
-
"postcss-loader": "^
|
|
137
|
+
"postcss-loader": "^7.0.2",
|
|
138
138
|
"postcss-scss": "4.0.4",
|
|
139
139
|
"prettier": "2.6.2",
|
|
140
140
|
"puppeteer": "15.5.0",
|
|
@@ -250,6 +250,7 @@ export const glTextColorSecondary = '#737278'
|
|
|
250
250
|
export const glTextColorDisabled = '#89888d'
|
|
251
251
|
export const glFontWeightLight = '300'
|
|
252
252
|
export const glFontWeightNormal = '400'
|
|
253
|
+
export const glFontWeightSemibold = '500'
|
|
253
254
|
export const glFontWeightBold = '600'
|
|
254
255
|
export const glFontWeights = '("normal": 400, "bold": 600)'
|
|
255
256
|
export const glLineHeight16 = '1rem'
|
|
@@ -340,6 +341,7 @@ export const modalTitleLineHeight = '1.25rem'
|
|
|
340
341
|
export const modalBackdropBg = '#000'
|
|
341
342
|
export const modalBackdropOpacity = '0.64'
|
|
342
343
|
export const bodyColor = '#333238'
|
|
344
|
+
export const enableValidationIcons = 'false'
|
|
343
345
|
export const secondary = '#ececef'
|
|
344
346
|
export const success = '#108548'
|
|
345
347
|
export const info = '#1f75cb'
|
|
@@ -1287,6 +1287,11 @@
|
|
|
1287
1287
|
"value": "400",
|
|
1288
1288
|
"compiledValue": "400"
|
|
1289
1289
|
},
|
|
1290
|
+
{
|
|
1291
|
+
"name": "$gl-font-weight-semibold",
|
|
1292
|
+
"value": "500",
|
|
1293
|
+
"compiledValue": "500"
|
|
1294
|
+
},
|
|
1290
1295
|
{
|
|
1291
1296
|
"name": "$gl-font-weight-bold",
|
|
1292
1297
|
"value": "600",
|
|
@@ -1810,6 +1815,11 @@
|
|
|
1810
1815
|
"value": "$gl-text-color",
|
|
1811
1816
|
"compiledValue": "#333238"
|
|
1812
1817
|
},
|
|
1818
|
+
{
|
|
1819
|
+
"name": "$enable-validation-icons",
|
|
1820
|
+
"value": "false",
|
|
1821
|
+
"compiledValue": "false"
|
|
1822
|
+
},
|
|
1813
1823
|
{
|
|
1814
1824
|
"name": "$secondary",
|
|
1815
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/utilities.scss
CHANGED
|
@@ -1085,6 +1085,14 @@
|
|
|
1085
1085
|
border-color: $white !important;
|
|
1086
1086
|
}
|
|
1087
1087
|
|
|
1088
|
+
.gl-border-transparent {
|
|
1089
|
+
border-color: transparent;
|
|
1090
|
+
}
|
|
1091
|
+
|
|
1092
|
+
.gl-border-transparent\! {
|
|
1093
|
+
border-color: transparent !important;
|
|
1094
|
+
}
|
|
1095
|
+
|
|
1088
1096
|
.gl-border-t-transparent {
|
|
1089
1097
|
border-top-color: transparent;
|
|
1090
1098
|
}
|
|
@@ -1093,6 +1101,30 @@
|
|
|
1093
1101
|
border-top-color: transparent !important;
|
|
1094
1102
|
}
|
|
1095
1103
|
|
|
1104
|
+
.gl-border-r-transparent {
|
|
1105
|
+
border-right-color: transparent;
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1108
|
+
.gl-border-r-transparent\! {
|
|
1109
|
+
border-right-color: transparent !important;
|
|
1110
|
+
}
|
|
1111
|
+
|
|
1112
|
+
.gl-border-b-transparent {
|
|
1113
|
+
border-bottom-color: transparent;
|
|
1114
|
+
}
|
|
1115
|
+
|
|
1116
|
+
.gl-border-b-transparent\! {
|
|
1117
|
+
border-bottom-color: transparent !important;
|
|
1118
|
+
}
|
|
1119
|
+
|
|
1120
|
+
.gl-border-l-transparent {
|
|
1121
|
+
border-left-color: transparent;
|
|
1122
|
+
}
|
|
1123
|
+
|
|
1124
|
+
.gl-border-l-transparent\! {
|
|
1125
|
+
border-left-color: transparent !important;
|
|
1126
|
+
}
|
|
1127
|
+
|
|
1096
1128
|
.gl-border-gray-50 {
|
|
1097
1129
|
border-color: $gray-50;
|
|
1098
1130
|
}
|
|
@@ -1301,6 +1333,14 @@
|
|
|
1301
1333
|
border-bottom-color: $gray-10 !important;
|
|
1302
1334
|
}
|
|
1303
1335
|
|
|
1336
|
+
.gl-border-b-gray-50 {
|
|
1337
|
+
border-bottom-color: $gray-50;
|
|
1338
|
+
}
|
|
1339
|
+
|
|
1340
|
+
.gl-border-b-gray-50\! {
|
|
1341
|
+
border-bottom-color: $gray-50 !important;
|
|
1342
|
+
}
|
|
1343
|
+
|
|
1304
1344
|
.gl-border-b-gray-100 {
|
|
1305
1345
|
border-bottom-color: $gray-100;
|
|
1306
1346
|
}
|
|
@@ -3544,6 +3584,14 @@
|
|
|
3544
3584
|
flex-basis: 50% !important;
|
|
3545
3585
|
}
|
|
3546
3586
|
|
|
3587
|
+
.gl-flex-basis-full {
|
|
3588
|
+
flex-basis: 100%;
|
|
3589
|
+
}
|
|
3590
|
+
|
|
3591
|
+
.gl-flex-basis-full\! {
|
|
3592
|
+
flex-basis: 100% !important;
|
|
3593
|
+
}
|
|
3594
|
+
|
|
3547
3595
|
.gl-justify-content-center {
|
|
3548
3596
|
justify-content: center;
|
|
3549
3597
|
}
|
|
@@ -8019,6 +8067,14 @@
|
|
|
8019
8067
|
font-weight: $gl-font-weight-normal !important;
|
|
8020
8068
|
}
|
|
8021
8069
|
|
|
8070
|
+
.gl-font-weight-semibold {
|
|
8071
|
+
font-weight: $gl-font-weight-semibold;
|
|
8072
|
+
}
|
|
8073
|
+
|
|
8074
|
+
.gl-font-weight-semibold\! {
|
|
8075
|
+
font-weight: $gl-font-weight-semibold !important;
|
|
8076
|
+
}
|
|
8077
|
+
|
|
8022
8078
|
.gl-font-weight-bold {
|
|
8023
8079
|
font-weight: $gl-font-weight-bold;
|
|
8024
8080
|
}
|
|
@@ -99,10 +99,26 @@
|
|
|
99
99
|
border-color: $white;
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
+
@mixin gl-border-transparent {
|
|
103
|
+
border-color: transparent;
|
|
104
|
+
}
|
|
105
|
+
|
|
102
106
|
@mixin gl-border-t-transparent {
|
|
103
107
|
border-top-color: transparent;
|
|
104
108
|
}
|
|
105
109
|
|
|
110
|
+
@mixin gl-border-r-transparent {
|
|
111
|
+
border-right-color: transparent;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
@mixin gl-border-b-transparent {
|
|
115
|
+
border-bottom-color: transparent;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
@mixin gl-border-l-transparent {
|
|
119
|
+
border-left-color: transparent;
|
|
120
|
+
}
|
|
121
|
+
|
|
106
122
|
@mixin gl-border-gray-50 {
|
|
107
123
|
border-color: $gray-50;
|
|
108
124
|
}
|
|
@@ -191,6 +207,10 @@
|
|
|
191
207
|
border-bottom-color: $gray-10;
|
|
192
208
|
}
|
|
193
209
|
|
|
210
|
+
@mixin gl-border-b-gray-50 {
|
|
211
|
+
border-bottom-color: $gray-50;
|
|
212
|
+
}
|
|
213
|
+
|
|
194
214
|
@mixin gl-border-b-gray-100 {
|
|
195
215
|
border-bottom-color: $gray-100;
|
|
196
216
|
}
|
package/src/scss/variables.scss
CHANGED
|
@@ -319,6 +319,7 @@ $gl-text-color-disabled: $gray-400 !default;
|
|
|
319
319
|
|
|
320
320
|
$gl-font-weight-light: 300;
|
|
321
321
|
$gl-font-weight-normal: 400;
|
|
322
|
+
$gl-font-weight-semibold: 500;
|
|
322
323
|
$gl-font-weight-bold: 600;
|
|
323
324
|
|
|
324
325
|
$gl-font-weights: (
|
|
@@ -483,6 +484,7 @@ $modal-backdrop-opacity: 0.64;
|
|
|
483
484
|
// these should ideally be moved further up in the file to the compoent-relevant sections
|
|
484
485
|
// but they can wait here for now
|
|
485
486
|
$body-color: $gl-text-color !default;
|
|
487
|
+
$enable-validation-icons: false;
|
|
486
488
|
|
|
487
489
|
$secondary: $gray-50;
|
|
488
490
|
$success: $green-500;
|