@gitlab/ui 38.2.1 → 38.5.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 +22 -0
- package/dist/components/base/filtered_search/filtered_search.js +9 -6
- package/dist/components/base/search_box_by_click/search_box_by_click.js +1 -0
- package/dist/utility_classes.css +1 -1
- package/dist/utility_classes.css.map +1 -1
- package/package.json +10 -10
- package/src/components/base/filtered_search/filtered_search.spec.js +19 -0
- package/src/components/base/filtered_search/filtered_search.vue +9 -6
- package/src/components/base/search_box_by_click/search_box_by_click.spec.js +8 -0
- package/src/components/base/search_box_by_click/search_box_by_click.vue +1 -0
- package/src/scss/utilities.scss +34 -0
- package/src/scss/utility-mixins/display.scss +12 -0
- package/src/scss/utility-mixins/spacing.scss +6 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitlab/ui",
|
|
3
|
-
"version": "38.
|
|
3
|
+
"version": "38.5.0",
|
|
4
4
|
"description": "GitLab UI Components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -88,19 +88,19 @@
|
|
|
88
88
|
"@babel/preset-env": "^7.10.2",
|
|
89
89
|
"@gitlab/eslint-plugin": "12.0.1",
|
|
90
90
|
"@gitlab/stylelint-config": "4.0.0",
|
|
91
|
-
"@gitlab/svgs": "2.
|
|
91
|
+
"@gitlab/svgs": "2.7.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",
|
|
95
|
-
"@storybook/addon-a11y": "6.4.
|
|
96
|
-
"@storybook/addon-docs": "6.4.
|
|
97
|
-
"@storybook/addon-essentials": "6.4.
|
|
95
|
+
"@storybook/addon-a11y": "6.4.20",
|
|
96
|
+
"@storybook/addon-docs": "6.4.20",
|
|
97
|
+
"@storybook/addon-essentials": "6.4.20",
|
|
98
98
|
"@storybook/addon-knobs": "6.4.0",
|
|
99
|
-
"@storybook/addon-storyshots": "6.4.
|
|
100
|
-
"@storybook/addon-storyshots-puppeteer": "6.4.
|
|
101
|
-
"@storybook/addon-viewport": "6.4.
|
|
102
|
-
"@storybook/theming": "6.4.
|
|
103
|
-
"@storybook/vue": "6.4.
|
|
99
|
+
"@storybook/addon-storyshots": "6.4.20",
|
|
100
|
+
"@storybook/addon-storyshots-puppeteer": "6.4.20",
|
|
101
|
+
"@storybook/addon-viewport": "6.4.20",
|
|
102
|
+
"@storybook/theming": "6.4.20",
|
|
103
|
+
"@storybook/vue": "6.4.20",
|
|
104
104
|
"@vue/test-utils": "1.3.0",
|
|
105
105
|
"autoprefixer": "^9.7.6",
|
|
106
106
|
"babel-jest": "^26.6.3",
|
|
@@ -730,4 +730,23 @@ describe('Filtered search integration tests', () => {
|
|
|
730
730
|
wrapper.findAllComponents(GlFilteredSearchToken).wrappers.map((cmp) => cmp.props('active'))
|
|
731
731
|
).toEqual([false, false]);
|
|
732
732
|
});
|
|
733
|
+
|
|
734
|
+
it('updates tokens list when value is passed dynamically', async () => {
|
|
735
|
+
mountComponent({ value: ['one'] });
|
|
736
|
+
await nextTick();
|
|
737
|
+
|
|
738
|
+
expect(wrapper.findAllComponents(GlFilteredSearchTerm)).toHaveLength(2);
|
|
739
|
+
|
|
740
|
+
await wrapper.setProps({
|
|
741
|
+
value: ['one two'],
|
|
742
|
+
});
|
|
743
|
+
|
|
744
|
+
const termComponents = wrapper.findAllComponents(GlFilteredSearchTerm).wrappers;
|
|
745
|
+
expect(termComponents).toHaveLength(3);
|
|
746
|
+
expect(termComponents.map((termComponent) => termComponent.props('value'))).toEqual([
|
|
747
|
+
{ data: 'one' },
|
|
748
|
+
{ data: 'two' },
|
|
749
|
+
{ data: '' },
|
|
750
|
+
]);
|
|
751
|
+
});
|
|
733
752
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import { cloneDeep } from 'lodash';
|
|
2
|
+
import { cloneDeep, isEqual } from 'lodash';
|
|
3
3
|
import PortalVue from 'portal-vue';
|
|
4
4
|
import Vue from 'vue';
|
|
5
5
|
import { GlTooltipDirective } from '../../../directives/tooltip';
|
|
@@ -174,11 +174,14 @@ export default {
|
|
|
174
174
|
deep: true,
|
|
175
175
|
immediate: true,
|
|
176
176
|
},
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
177
|
+
value: {
|
|
178
|
+
handler(newValue, oldValue) {
|
|
179
|
+
if (newValue.length && !isEqual(newValue, oldValue)) {
|
|
180
|
+
this.applyNewValue(cloneDeep(newValue));
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
immediate: true,
|
|
184
|
+
},
|
|
182
185
|
},
|
|
183
186
|
|
|
184
187
|
methods: {
|
|
@@ -36,6 +36,14 @@ describe('search box by click component', () => {
|
|
|
36
36
|
expect(wrapper.emitted().input).toEqual([['new value']]);
|
|
37
37
|
});
|
|
38
38
|
|
|
39
|
+
it('does not emit an input event when input is updated to the same value', async () => {
|
|
40
|
+
createComponent({ value: 'somevalue' });
|
|
41
|
+
|
|
42
|
+
await wrapper.setProps({ value: 'another value' });
|
|
43
|
+
|
|
44
|
+
expect(wrapper.emitted().input).toBe(undefined);
|
|
45
|
+
});
|
|
46
|
+
|
|
39
47
|
it('does not displays history dropdown by default', () => {
|
|
40
48
|
createComponent();
|
|
41
49
|
expect(wrapper.findComponent({ ref: 'historyDropdown' }).exists()).toBe(false);
|
package/src/scss/utilities.scss
CHANGED
|
@@ -2749,6 +2749,30 @@
|
|
|
2749
2749
|
}
|
|
2750
2750
|
}
|
|
2751
2751
|
|
|
2752
|
+
.gl-md-display-inline {
|
|
2753
|
+
@include gl-media-breakpoint-up(md) {
|
|
2754
|
+
display: inline;
|
|
2755
|
+
}
|
|
2756
|
+
}
|
|
2757
|
+
|
|
2758
|
+
.gl-md-display-inline\! {
|
|
2759
|
+
@include gl-media-breakpoint-up(md) {
|
|
2760
|
+
display: inline !important;
|
|
2761
|
+
}
|
|
2762
|
+
}
|
|
2763
|
+
|
|
2764
|
+
.gl-lg-display-inline {
|
|
2765
|
+
@include gl-media-breakpoint-up(lg) {
|
|
2766
|
+
display: inline;
|
|
2767
|
+
}
|
|
2768
|
+
}
|
|
2769
|
+
|
|
2770
|
+
.gl-lg-display-inline\! {
|
|
2771
|
+
@include gl-media-breakpoint-up(lg) {
|
|
2772
|
+
display: inline !important;
|
|
2773
|
+
}
|
|
2774
|
+
}
|
|
2775
|
+
|
|
2752
2776
|
.gl-display-inline-block {
|
|
2753
2777
|
display: inline-block;
|
|
2754
2778
|
}
|
|
@@ -5412,6 +5436,16 @@
|
|
|
5412
5436
|
.gl-ml-auto\! {
|
|
5413
5437
|
margin-left: auto !important;
|
|
5414
5438
|
}
|
|
5439
|
+
.gl-sm-ml-auto {
|
|
5440
|
+
@include gl-media-breakpoint-up(sm) {
|
|
5441
|
+
margin-left: auto;
|
|
5442
|
+
}
|
|
5443
|
+
}
|
|
5444
|
+
.gl-sm-ml-auto\! {
|
|
5445
|
+
@include gl-media-breakpoint-up(sm) {
|
|
5446
|
+
margin-left: auto !important;
|
|
5447
|
+
}
|
|
5448
|
+
}
|
|
5415
5449
|
.gl-ml-0 {
|
|
5416
5450
|
margin-left: 0;
|
|
5417
5451
|
}
|
|
@@ -101,6 +101,18 @@
|
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
+
@mixin gl-md-display-inline {
|
|
105
|
+
@include gl-media-breakpoint-up(md) {
|
|
106
|
+
@include gl-display-inline;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
@mixin gl-lg-display-inline {
|
|
111
|
+
@include gl-media-breakpoint-up(lg) {
|
|
112
|
+
@include gl-display-inline;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
104
116
|
@mixin gl-display-inline-block {
|
|
105
117
|
display: inline-block;
|
|
106
118
|
}
|