@gitlab/ui 101.12.0 → 101.13.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
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [101.13.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v101.12.0...v101.13.0) (2024-11-07)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **GlDropdown:** Replace BootstrapCSS Util Class with GitLab UI Class ([8772f60](https://gitlab.com/gitlab-org/gitlab-ui/commit/8772f60748198a11f8db12e57316e907cbbdb4fb))
|
|
7
|
+
|
|
1
8
|
# [101.12.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v101.11.0...v101.12.0) (2024-11-06)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -63,7 +63,7 @@ const BDropdown = /*#__PURE__*/extend({
|
|
|
63
63
|
'btn-group': split || !block,
|
|
64
64
|
// When `block` is enabled and we are in `split` mode the 'd-flex' class
|
|
65
65
|
// needs to be applied to allow the buttons to stretch to full width
|
|
66
|
-
'
|
|
66
|
+
'gl-flex': block && split
|
|
67
67
|
}];
|
|
68
68
|
},
|
|
69
69
|
menuClasses() {
|
|
@@ -138,7 +138,7 @@ const BDropdown = /*#__PURE__*/extend({
|
|
|
138
138
|
|
|
139
139
|
// Overwrite button content for the toggle when in `split` mode
|
|
140
140
|
$buttonChildren = [h('span', {
|
|
141
|
-
class: ['sr-only']
|
|
141
|
+
class: ['gl-sr-only']
|
|
142
142
|
}, [this.toggleText])];
|
|
143
143
|
buttonContentDomProps = {};
|
|
144
144
|
}
|
package/package.json
CHANGED
|
@@ -72,7 +72,7 @@ export const BDropdown = /*#__PURE__*/ extend({
|
|
|
72
72
|
'btn-group': split || !block,
|
|
73
73
|
// When `block` is enabled and we are in `split` mode the 'd-flex' class
|
|
74
74
|
// needs to be applied to allow the buttons to stretch to full width
|
|
75
|
-
'
|
|
75
|
+
'gl-flex': block && split
|
|
76
76
|
}
|
|
77
77
|
]
|
|
78
78
|
},
|
|
@@ -137,7 +137,7 @@ export const BDropdown = /*#__PURE__*/ extend({
|
|
|
137
137
|
)
|
|
138
138
|
|
|
139
139
|
// Overwrite button content for the toggle when in `split` mode
|
|
140
|
-
$buttonChildren = [h('span', { class: ['sr-only'] }, [this.toggleText])]
|
|
140
|
+
$buttonChildren = [h('span', { class: ['gl-sr-only'] }, [this.toggleText])]
|
|
141
141
|
buttonContentDomProps = {}
|
|
142
142
|
}
|
|
143
143
|
const ariaHasPopupRoles = ['menu', 'listbox', 'tree', 'grid', 'dialog']
|
|
@@ -132,8 +132,8 @@ describe('dropdown', () => {
|
|
|
132
132
|
expect($toggle.attributes('id')).toEqual(`${wrapperId}__BV_toggle_`)
|
|
133
133
|
expect($toggle.attributes('type')).toBeDefined()
|
|
134
134
|
expect($toggle.attributes('type')).toEqual('button')
|
|
135
|
-
expect($toggle.findAll('span.sr-only').length).toBe(1)
|
|
136
|
-
expect($toggle.find('span.sr-only').text()).toEqual('Toggle dropdown')
|
|
135
|
+
expect($toggle.findAll('span.gl-sr-only').length).toBe(1)
|
|
136
|
+
expect($toggle.find('span.gl-sr-only').text()).toEqual('Toggle dropdown')
|
|
137
137
|
expect($toggle.text()).toEqual('Toggle dropdown')
|
|
138
138
|
|
|
139
139
|
expect(wrapper.findAll('.dropdown-menu').length).toBe(1)
|
|
@@ -239,7 +239,7 @@ describe('dropdown', () => {
|
|
|
239
239
|
|
|
240
240
|
expect($split.text()).toEqual('foobar')
|
|
241
241
|
expect($toggle.classes()).toContain('dropdown-toggle')
|
|
242
|
-
// Toggle has `sr-only` hidden text
|
|
242
|
+
// Toggle has `gl-sr-only` hidden text
|
|
243
243
|
expect($toggle.text()).toEqual('Toggle dropdown')
|
|
244
244
|
|
|
245
245
|
wrapper.destroy()
|
|
@@ -306,7 +306,7 @@ describe('dropdown', () => {
|
|
|
306
306
|
wrapper.destroy()
|
|
307
307
|
})
|
|
308
308
|
|
|
309
|
-
it('should have "btn-group" and "
|
|
309
|
+
it('should have "btn-group" and "gl-flex" classes when block and split are true', async () => {
|
|
310
310
|
const wrapper = mount(BDropdown, {
|
|
311
311
|
attachTo: document.body,
|
|
312
312
|
propsData: {
|
|
@@ -316,7 +316,7 @@ describe('dropdown', () => {
|
|
|
316
316
|
})
|
|
317
317
|
|
|
318
318
|
expect(wrapper.classes()).toContain('btn-group')
|
|
319
|
-
expect(wrapper.classes()).toContain('
|
|
319
|
+
expect(wrapper.classes()).toContain('gl-flex')
|
|
320
320
|
|
|
321
321
|
wrapper.destroy()
|
|
322
322
|
})
|