@gitlab/ui 55.0.0 → 55.1.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 +14 -0
- package/dist/components/base/filtered_search/filtered_search_token.js +4 -1
- package/dist/components/base/new_dropdowns/disclosure/disclosure_dropdown.js +2 -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 +2 -2
- package/src/components/base/filtered_search/filtered_search_token.spec.js +20 -1
- package/src/components/base/filtered_search/filtered_search_token.vue +7 -0
- package/src/components/base/new_dropdowns/disclosure/disclosure_dropdown.stories.js +1 -1
- package/src/components/base/new_dropdowns/disclosure/disclosure_dropdown.vue +2 -2
- package/src/scss/utilities.scss +2 -2
- package/src/scss/utility-mixins/background.scss +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitlab/ui",
|
|
3
|
-
"version": "55.
|
|
3
|
+
"version": "55.1.0",
|
|
4
4
|
"description": "GitLab UI Components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"@gitlab/eslint-plugin": "18.1.0",
|
|
88
88
|
"@gitlab/fonts": "^1.2.0",
|
|
89
89
|
"@gitlab/stylelint-config": "4.1.0",
|
|
90
|
-
"@gitlab/svgs": "3.
|
|
90
|
+
"@gitlab/svgs": "3.19.0",
|
|
91
91
|
"@rollup/plugin-commonjs": "^11.1.0",
|
|
92
92
|
"@rollup/plugin-node-resolve": "^7.1.3",
|
|
93
93
|
"@rollup/plugin-replace": "^2.3.2",
|
|
@@ -33,9 +33,10 @@ describe('Filtered search token', () => {
|
|
|
33
33
|
cursorPosition: 'end',
|
|
34
34
|
};
|
|
35
35
|
|
|
36
|
-
const createComponent = (props) => {
|
|
36
|
+
const createComponent = (props, options = {}) => {
|
|
37
37
|
wrapper = shallowMount(GlFilteredSearchToken, {
|
|
38
38
|
propsData: { ...defaultProps, ...props },
|
|
39
|
+
...options,
|
|
39
40
|
});
|
|
40
41
|
};
|
|
41
42
|
|
|
@@ -372,4 +373,22 @@ describe('Filtered search token', () => {
|
|
|
372
373
|
}
|
|
373
374
|
);
|
|
374
375
|
});
|
|
376
|
+
|
|
377
|
+
it('renders title options passed via slot', async () => {
|
|
378
|
+
createComponent(
|
|
379
|
+
{},
|
|
380
|
+
{
|
|
381
|
+
slots: {
|
|
382
|
+
'title-option': '<div>new title</div>',
|
|
383
|
+
},
|
|
384
|
+
stubs: {
|
|
385
|
+
GlFilteredSearchTokenSegment: {
|
|
386
|
+
template: `<div><slot name="option" v-bind='{ option: { value: "default title"} }'></slot></div>`,
|
|
387
|
+
},
|
|
388
|
+
},
|
|
389
|
+
}
|
|
390
|
+
);
|
|
391
|
+
|
|
392
|
+
expect(findTitleSegment().text()).toBe('new title');
|
|
393
|
+
});
|
|
375
394
|
});
|
|
@@ -303,6 +303,10 @@ export default {
|
|
|
303
303
|
this.$emit('destroy');
|
|
304
304
|
}
|
|
305
305
|
},
|
|
306
|
+
|
|
307
|
+
hasTitleOptionSlot() {
|
|
308
|
+
return Boolean(this.$scopedSlots['title-option']);
|
|
309
|
+
},
|
|
306
310
|
},
|
|
307
311
|
};
|
|
308
312
|
</script>
|
|
@@ -346,6 +350,9 @@ export default {
|
|
|
346
350
|
{{ inputValue }}
|
|
347
351
|
</gl-token>
|
|
348
352
|
</template>
|
|
353
|
+
<template v-if="hasTitleOptionSlot()" #option>
|
|
354
|
+
<slot name="title-option"></slot>
|
|
355
|
+
</template>
|
|
349
356
|
</gl-filtered-search-token-segment>
|
|
350
357
|
|
|
351
358
|
<gl-filtered-search-token-segment
|
|
@@ -36,7 +36,7 @@ const generateProps = ({
|
|
|
36
36
|
loading = defaultValue('loading'),
|
|
37
37
|
noCaret = defaultValue('noCaret'),
|
|
38
38
|
placement = defaultValue('placement'),
|
|
39
|
-
toggleId = defaultValue('toggleId'),
|
|
39
|
+
toggleId = defaultValue('toggleId')(),
|
|
40
40
|
toggleText,
|
|
41
41
|
textSrOnly = defaultValue('textSrOnly'),
|
|
42
42
|
icon = '',
|
|
@@ -111,12 +111,12 @@ export default {
|
|
|
111
111
|
},
|
|
112
112
|
/**
|
|
113
113
|
* Custom toggle id.
|
|
114
|
-
*
|
|
114
|
+
* For instance, it can be referenced by tooltip or popover
|
|
115
115
|
*/
|
|
116
116
|
toggleId: {
|
|
117
117
|
type: String,
|
|
118
118
|
required: false,
|
|
119
|
-
default: uniqueId('dropdown-toggle-btn-'),
|
|
119
|
+
default: () => uniqueId('dropdown-toggle-btn-'),
|
|
120
120
|
},
|
|
121
121
|
/**
|
|
122
122
|
* Additional CSS classes to customize toggle appearance
|
package/src/scss/utilities.scss
CHANGED
|
@@ -219,11 +219,11 @@
|
|
|
219
219
|
}
|
|
220
220
|
|
|
221
221
|
.gl-bg-gray-500 {
|
|
222
|
-
background-color: $gray-
|
|
222
|
+
background-color: $gray-500
|
|
223
223
|
}
|
|
224
224
|
|
|
225
225
|
.gl-bg-gray-500\! {
|
|
226
|
-
background-color: $gray-
|
|
226
|
+
background-color: $gray-500 !important
|
|
227
227
|
}
|
|
228
228
|
|
|
229
229
|
.gl-bg-gray-600 {
|