@gitlab/ui 52.7.0 → 52.7.2
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/broadcast_message/broadcast_message.js +1 -1
- package/dist/components/base/new_dropdowns/listbox/listbox.js +1 -1
- package/dist/components/base/new_dropdowns/listbox/listbox_search_input.js +2 -3
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/package.json +9 -9
- package/scss_to_js/scss_variables.js +0 -1
- package/scss_to_js/scss_variables.json +0 -5
- package/src/components/base/broadcast_message/broadcast_message.scss +0 -4
- package/src/components/base/broadcast_message/broadcast_message.vue +1 -1
- package/src/components/base/new_dropdowns/listbox/listbox.spec.js +27 -0
- package/src/components/base/new_dropdowns/listbox/listbox.stories.js +3 -0
- package/src/components/base/new_dropdowns/listbox/listbox.vue +2 -0
- package/src/components/base/new_dropdowns/listbox/listbox_search_input.spec.js +2 -4
- package/src/components/base/new_dropdowns/listbox/listbox_search_input.vue +2 -3
- package/src/scss/variables.scss +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitlab/ui",
|
|
3
|
-
"version": "52.7.
|
|
3
|
+
"version": "52.7.2",
|
|
4
4
|
"description": "GitLab UI Components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -91,14 +91,14 @@
|
|
|
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",
|
|
94
|
-
"@storybook/addon-a11y": "6.5.
|
|
95
|
-
"@storybook/addon-docs": "6.5.
|
|
96
|
-
"@storybook/addon-essentials": "6.5.
|
|
97
|
-
"@storybook/addon-storyshots": "6.5.
|
|
98
|
-
"@storybook/addon-storyshots-puppeteer": "6.5.
|
|
99
|
-
"@storybook/addon-viewport": "6.5.
|
|
100
|
-
"@storybook/theming": "6.5.
|
|
101
|
-
"@storybook/vue": "6.5.
|
|
94
|
+
"@storybook/addon-a11y": "6.5.15",
|
|
95
|
+
"@storybook/addon-docs": "6.5.15",
|
|
96
|
+
"@storybook/addon-essentials": "6.5.15",
|
|
97
|
+
"@storybook/addon-storyshots": "6.5.15",
|
|
98
|
+
"@storybook/addon-storyshots-puppeteer": "6.5.15",
|
|
99
|
+
"@storybook/addon-viewport": "6.5.15",
|
|
100
|
+
"@storybook/theming": "6.5.15",
|
|
101
|
+
"@storybook/vue": "6.5.15",
|
|
102
102
|
"@vue/compat": "^3.2.40",
|
|
103
103
|
"@vue/compiler-sfc": "^3.2.40",
|
|
104
104
|
"@vue/test-utils": "1.3.0",
|
|
@@ -327,7 +327,6 @@ export const glDropdownWidth = '15rem'
|
|
|
327
327
|
export const glDropdownWidthNarrow = '10rem'
|
|
328
328
|
export const glDropdownWidthWide = '25rem'
|
|
329
329
|
export const glMaxDropdownMaxHeight = '19.5rem'
|
|
330
|
-
export const glBroadcastMessageTextMaxWidth = '58.375rem'
|
|
331
330
|
export const glBroadcastMessageNotificationMaxWidth = '18.75rem'
|
|
332
331
|
export const glModalSmallWidth = '32rem'
|
|
333
332
|
export const glModalMediumWidth = '48rem'
|
|
@@ -1745,11 +1745,6 @@
|
|
|
1745
1745
|
"value": "px-to-rem(312px)",
|
|
1746
1746
|
"compiledValue": "19.5rem"
|
|
1747
1747
|
},
|
|
1748
|
-
{
|
|
1749
|
-
"name": "$gl-broadcast-message-text-max-width",
|
|
1750
|
-
"value": "px-to-rem(934px)",
|
|
1751
|
-
"compiledValue": "58.375rem"
|
|
1752
|
-
},
|
|
1753
1748
|
{
|
|
1754
1749
|
"name": "$gl-broadcast-message-notification-max-width",
|
|
1755
1750
|
"value": "px-to-rem(300px)",
|
|
@@ -79,7 +79,7 @@ export default {
|
|
|
79
79
|
<div class="gl-broadcast-message-icon gl-line-height-normal">
|
|
80
80
|
<gl-icon :name="iconName" />
|
|
81
81
|
</div>
|
|
82
|
-
<div class="gl-
|
|
82
|
+
<div class="gl-my-n1">
|
|
83
83
|
<!-- @slot The broadcast message's text -->
|
|
84
84
|
<slot></slot>
|
|
85
85
|
</div>
|
|
@@ -561,4 +561,31 @@ describe('GlListbox', () => {
|
|
|
561
561
|
expect(findIntersectionObserver().exists()).toBe(false);
|
|
562
562
|
});
|
|
563
563
|
});
|
|
564
|
+
|
|
565
|
+
describe('items test IDs without groups', () => {
|
|
566
|
+
beforeEach(() => {
|
|
567
|
+
buildWrapper({
|
|
568
|
+
items: mockOptions,
|
|
569
|
+
});
|
|
570
|
+
});
|
|
571
|
+
|
|
572
|
+
it.each(mockOptions)('sets the test ID for %s', (option) => {
|
|
573
|
+
expect(wrapper.find(`[data-testid="listbox-item-${option.value}"]`).exists()).toBe(true);
|
|
574
|
+
});
|
|
575
|
+
});
|
|
576
|
+
|
|
577
|
+
describe('items test IDs with groups', () => {
|
|
578
|
+
beforeEach(() => {
|
|
579
|
+
buildWrapper({
|
|
580
|
+
items: mockGroups,
|
|
581
|
+
});
|
|
582
|
+
});
|
|
583
|
+
|
|
584
|
+
it.each([...mockGroups[0].options, ...mockGroups[1].options])(
|
|
585
|
+
'sets the test ID for %s',
|
|
586
|
+
(option) => {
|
|
587
|
+
expect(wrapper.find(`[data-testid="listbox-item-${option.value}"]`).exists()).toBe(true);
|
|
588
|
+
}
|
|
589
|
+
);
|
|
590
|
+
});
|
|
564
591
|
});
|
|
@@ -590,5 +590,8 @@ export const InfiniteScroll = (
|
|
|
590
590
|
InfiniteScroll.argTypes = {
|
|
591
591
|
...disableControls(['infiniteScroll', 'infiniteScrollLoading', 'items']),
|
|
592
592
|
};
|
|
593
|
+
InfiniteScroll.parameters = {
|
|
594
|
+
storyshots: { disable: true },
|
|
595
|
+
};
|
|
593
596
|
InfiniteScroll.args = generateProps();
|
|
594
597
|
InfiniteScroll.decorators = [makeContainer({ height: '370px' })];
|
|
@@ -614,6 +614,7 @@ export default {
|
|
|
614
614
|
<template v-if="isOption(item)">
|
|
615
615
|
<gl-listbox-item
|
|
616
616
|
:key="item.value"
|
|
617
|
+
:data-testid="`listbox-item-${item.value}`"
|
|
617
618
|
:is-selected="isSelected(item)"
|
|
618
619
|
:is-focused="isFocused(item)"
|
|
619
620
|
:is-check-centered="isCheckCentered"
|
|
@@ -637,6 +638,7 @@ export default {
|
|
|
637
638
|
<gl-listbox-item
|
|
638
639
|
v-for="option in item.options"
|
|
639
640
|
:key="option.value"
|
|
641
|
+
:data-testid="`listbox-item-${option.value}`"
|
|
640
642
|
:is-selected="isSelected(option)"
|
|
641
643
|
:is-focused="isFocused(option)"
|
|
642
644
|
:is-check-centered="isCheckCentered"
|
|
@@ -53,11 +53,9 @@ describe('listbox search input component', () => {
|
|
|
53
53
|
expect(findInput().element.value).toEqual(newSearchValue);
|
|
54
54
|
});
|
|
55
55
|
|
|
56
|
-
it(`emits ${modelEvent} event when input value changes`, () => {
|
|
56
|
+
it(`emits ${modelEvent} event when input value changes`, async () => {
|
|
57
57
|
findInput().setValue(newSearchValue);
|
|
58
|
-
|
|
59
|
-
expect(wrapper.emitted('input')).toEqual(undefined);
|
|
60
|
-
jest.advanceTimersByTime(1);
|
|
58
|
+
await nextTick();
|
|
61
59
|
expect(wrapper.emitted('input')).toEqual([[newSearchValue]]);
|
|
62
60
|
});
|
|
63
61
|
});
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import debounce from 'lodash/debounce';
|
|
3
2
|
import GlClearIconButton from '../../../shared_components/clear_icon_button/clear_icon_button.vue';
|
|
4
3
|
import GlIcon from '../../icon/icon.vue';
|
|
5
4
|
|
|
@@ -37,9 +36,9 @@ export default {
|
|
|
37
36
|
inputListeners() {
|
|
38
37
|
return {
|
|
39
38
|
...this.$listeners,
|
|
40
|
-
input:
|
|
39
|
+
input: (event) => {
|
|
41
40
|
this.$emit('input', event.target.value);
|
|
42
|
-
},
|
|
41
|
+
},
|
|
43
42
|
};
|
|
44
43
|
},
|
|
45
44
|
},
|
package/src/scss/variables.scss
CHANGED
|
@@ -462,7 +462,6 @@ $gl-dropdown-width-wide: px-to-rem(400px);
|
|
|
462
462
|
$gl-max-dropdown-max-height: px-to-rem(312px);
|
|
463
463
|
|
|
464
464
|
// Broadcast messages
|
|
465
|
-
$gl-broadcast-message-text-max-width: px-to-rem(934px);
|
|
466
465
|
$gl-broadcast-message-notification-max-width: px-to-rem(300px);
|
|
467
466
|
|
|
468
467
|
// Modal Widths
|