@gitlab/ui 97.3.0 → 98.0.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 +13 -0
- package/dist/index.js +0 -1
- package/dist/vendor/bootstrap-vue/src/components/collapse/collapse.js +3 -36
- package/dist/vendor/bootstrap-vue/src/components/tabs/tabs.js +1 -1
- package/dist/vendor/bootstrap-vue/src/components/transition/bv-transition.js +12 -2
- package/dist/vendor/bootstrap-vue/src/constants/components.js +1 -3
- package/dist/vendor/bootstrap-vue/src/constants/env.js +1 -2
- package/dist/vendor/bootstrap-vue/src/index.js +0 -2
- package/dist/vendor/bootstrap-vue/src/mixins/dropdown.js +12 -39
- package/package.json +2 -1
- package/src/index.js +0 -1
- package/src/scss/bootstrap_vue.scss +0 -1
- package/src/scss/components.scss +0 -1
- package/src/vendor/bootstrap-vue/package.json +3 -20
- package/src/vendor/bootstrap-vue/src/components/collapse/MODIFICATIONS.md +14 -0
- package/src/vendor/bootstrap-vue/src/components/collapse/collapse.js +3 -37
- package/src/vendor/bootstrap-vue/src/components/collapse/collapse.spec.js +0 -132
- package/src/vendor/bootstrap-vue/src/components/collapse/package.json +0 -4
- package/src/vendor/bootstrap-vue/src/components/dropdown/README.md +1 -1
- package/src/vendor/bootstrap-vue/src/components/form-input/form-input.spec.js +3 -0
- package/src/vendor/bootstrap-vue/src/components/index.d.ts +0 -1
- package/src/vendor/bootstrap-vue/src/components/index.scss +0 -1
- package/src/vendor/bootstrap-vue/src/components/modal/MODIFICATIONS.md +8 -5
- package/src/vendor/bootstrap-vue/src/components/nav/package.json +1 -1
- package/src/vendor/bootstrap-vue/src/components/popover/popover.spec.js +0 -1
- package/src/vendor/bootstrap-vue/src/components/table/table-filtering.spec.js +1 -1
- package/src/vendor/bootstrap-vue/src/components/tabs/tabs.js +1 -1
- package/src/vendor/bootstrap-vue/src/components/toast/toast.spec.js +6 -18
- package/src/vendor/bootstrap-vue/src/components/tooltip/tooltip.spec.js +67 -356
- package/src/vendor/bootstrap-vue/src/components/transition/bv-transition.js +15 -2
- package/src/vendor/bootstrap-vue/src/constants/components.js +0 -2
- package/src/vendor/bootstrap-vue/src/constants/env.js +0 -3
- package/src/vendor/bootstrap-vue/src/directives/tooltip/tooltip.spec.js +46 -79
- package/src/vendor/bootstrap-vue/src/index.js +0 -4
- package/src/vendor/bootstrap-vue/src/mixins/dropdown.js +12 -36
- package/src/vendor/bootstrap-vue/src/utils/config.spec.js +20 -2
- package/dist/components/base/navbar/navbar.js +0 -48
- package/dist/vendor/bootstrap-vue/src/components/navbar/index.js +0 -2
- package/dist/vendor/bootstrap-vue/src/components/navbar/navbar-brand.js +0 -40
- package/dist/vendor/bootstrap-vue/src/components/navbar/navbar.js +0 -72
- package/src/components/base/navbar/navbar.md +0 -4
- package/src/components/base/navbar/navbar.scss +0 -0
- package/src/components/base/navbar/navbar.vue +0 -17
- package/src/vendor/bootstrap-vue/src/components/navbar/README.md +0 -332
- package/src/vendor/bootstrap-vue/src/components/navbar/_navbar.scss +0 -1
- package/src/vendor/bootstrap-vue/src/components/navbar/index.d.ts +0 -10
- package/src/vendor/bootstrap-vue/src/components/navbar/index.js +0 -4
- package/src/vendor/bootstrap-vue/src/components/navbar/index.scss +0 -1
- package/src/vendor/bootstrap-vue/src/components/navbar/navbar-brand.js +0 -42
- package/src/vendor/bootstrap-vue/src/components/navbar/navbar-brand.spec.js +0 -50
- package/src/vendor/bootstrap-vue/src/components/navbar/navbar.js +0 -78
- package/src/vendor/bootstrap-vue/src/components/navbar/navbar.spec.js +0 -130
- package/src/vendor/bootstrap-vue/src/components/navbar/package.json +0 -54
|
@@ -46,32 +46,6 @@ describe('collapse', () => {
|
|
|
46
46
|
expect(wrapper.attributes('id')).toBeDefined()
|
|
47
47
|
expect(wrapper.attributes('id')).toEqual('test')
|
|
48
48
|
expect(wrapper.classes()).toContain('collapse')
|
|
49
|
-
expect(wrapper.classes()).not.toContain('navbar-collapse')
|
|
50
|
-
expect(wrapper.classes()).not.toContain('show')
|
|
51
|
-
expect(wrapper.element.style.display).toEqual('none')
|
|
52
|
-
expect(wrapper.text()).toEqual('')
|
|
53
|
-
|
|
54
|
-
wrapper.destroy()
|
|
55
|
-
})
|
|
56
|
-
|
|
57
|
-
it('should have expected structure when prop is-nav is set', async () => {
|
|
58
|
-
const wrapper = mount(BCollapse, {
|
|
59
|
-
attachTo: document.body,
|
|
60
|
-
propsData: {
|
|
61
|
-
// 'id' is a required prop
|
|
62
|
-
id: 'test',
|
|
63
|
-
isNav: true
|
|
64
|
-
}
|
|
65
|
-
})
|
|
66
|
-
// const rootWrapper = createWrapper(wrapper.vm.$root)
|
|
67
|
-
expect(wrapper.vm).toBeDefined()
|
|
68
|
-
await waitNT(wrapper.vm)
|
|
69
|
-
await waitRAF()
|
|
70
|
-
expect(wrapper.element.tagName).toBe('DIV')
|
|
71
|
-
expect(wrapper.attributes('id')).toBeDefined()
|
|
72
|
-
expect(wrapper.attributes('id')).toEqual('test')
|
|
73
|
-
expect(wrapper.classes()).toContain('collapse')
|
|
74
|
-
expect(wrapper.classes()).toContain('navbar-collapse')
|
|
75
49
|
expect(wrapper.classes()).not.toContain('show')
|
|
76
50
|
expect(wrapper.element.style.display).toEqual('none')
|
|
77
51
|
expect(wrapper.text()).toEqual('')
|
|
@@ -369,112 +343,6 @@ describe('collapse', () => {
|
|
|
369
343
|
wrapper.destroy()
|
|
370
344
|
})
|
|
371
345
|
|
|
372
|
-
it('should close when clicking on contained nav-link prop is-nav is set', async () => {
|
|
373
|
-
const App = {
|
|
374
|
-
render(h) {
|
|
375
|
-
return h('div', [
|
|
376
|
-
// JSDOM supports `getComputedStyle()` when using stylesheets (non responsive)
|
|
377
|
-
// https://github.com/jsdom/jsdom/blob/master/Changelog.md#030
|
|
378
|
-
h('style', { attrs: { type: 'text/css' } }, '.collapse:not(.show) { display: none; }'),
|
|
379
|
-
h(
|
|
380
|
-
BCollapse,
|
|
381
|
-
{
|
|
382
|
-
props: {
|
|
383
|
-
id: 'test',
|
|
384
|
-
isNav: true,
|
|
385
|
-
visible: true
|
|
386
|
-
}
|
|
387
|
-
},
|
|
388
|
-
[h('a', { class: 'nav-link', attrs: { href: '#' } }, 'nav link')]
|
|
389
|
-
)
|
|
390
|
-
])
|
|
391
|
-
}
|
|
392
|
-
}
|
|
393
|
-
const wrapper = mount(App, {
|
|
394
|
-
attachTo: document.body
|
|
395
|
-
})
|
|
396
|
-
|
|
397
|
-
expect(wrapper.vm).toBeDefined()
|
|
398
|
-
const $collapse = wrapper.findComponent(BCollapse)
|
|
399
|
-
expect($collapse.vm).toBeDefined()
|
|
400
|
-
|
|
401
|
-
expect(wrapper.find('style').exists()).toBe(true)
|
|
402
|
-
|
|
403
|
-
await waitNT(wrapper.vm)
|
|
404
|
-
await waitRAF()
|
|
405
|
-
await waitNT(wrapper.vm)
|
|
406
|
-
await waitRAF()
|
|
407
|
-
|
|
408
|
-
expect($collapse.classes()).toContain('show')
|
|
409
|
-
expect($collapse.element.style.display).toEqual('')
|
|
410
|
-
expect($collapse.find('.nav-link').exists()).toBe(true)
|
|
411
|
-
|
|
412
|
-
// Click on link
|
|
413
|
-
await wrapper.find('.nav-link').trigger('click')
|
|
414
|
-
await waitRAF()
|
|
415
|
-
await waitRAF()
|
|
416
|
-
expect($collapse.classes()).not.toContain('show')
|
|
417
|
-
expect($collapse.element.style.display).toEqual('none')
|
|
418
|
-
|
|
419
|
-
wrapper.destroy()
|
|
420
|
-
})
|
|
421
|
-
|
|
422
|
-
it('should not close when clicking on nav-link prop is-nav is set & collapse is display block important', async () => {
|
|
423
|
-
const App = {
|
|
424
|
-
render(h) {
|
|
425
|
-
return h('div', [
|
|
426
|
-
// JSDOM supports `getComputedStyle()` when using stylesheets (non responsive)
|
|
427
|
-
// Although it appears to be picky about CSS definition ordering
|
|
428
|
-
// https://github.com/jsdom/jsdom/blob/master/Changelog.md#030
|
|
429
|
-
h(
|
|
430
|
-
'style',
|
|
431
|
-
{ attrs: { type: 'text/css' } },
|
|
432
|
-
'.collapse:not(.show) { display: none; } .d-block { display: block !important; }'
|
|
433
|
-
),
|
|
434
|
-
h(
|
|
435
|
-
BCollapse,
|
|
436
|
-
{
|
|
437
|
-
class: 'd-block',
|
|
438
|
-
props: {
|
|
439
|
-
id: 'test',
|
|
440
|
-
isNav: true,
|
|
441
|
-
visible: true
|
|
442
|
-
}
|
|
443
|
-
},
|
|
444
|
-
[h('a', { class: 'nav-link', attrs: { href: '#' } }, 'nav link')]
|
|
445
|
-
)
|
|
446
|
-
])
|
|
447
|
-
}
|
|
448
|
-
}
|
|
449
|
-
const wrapper = mount(App, {
|
|
450
|
-
attachTo: document.body
|
|
451
|
-
})
|
|
452
|
-
|
|
453
|
-
expect(wrapper.vm).toBeDefined()
|
|
454
|
-
const $collapse = wrapper.findComponent(BCollapse)
|
|
455
|
-
expect($collapse.vm).toBeDefined()
|
|
456
|
-
|
|
457
|
-
expect(wrapper.find('style').exists()).toBe(true)
|
|
458
|
-
|
|
459
|
-
await waitNT(wrapper.vm)
|
|
460
|
-
await waitRAF()
|
|
461
|
-
await waitNT(wrapper.vm)
|
|
462
|
-
await waitRAF()
|
|
463
|
-
|
|
464
|
-
expect($collapse.classes()).toContain('show')
|
|
465
|
-
expect($collapse.element.style.display).toEqual('')
|
|
466
|
-
expect($collapse.find('.nav-link').exists()).toBe(true)
|
|
467
|
-
|
|
468
|
-
// Click on link
|
|
469
|
-
await wrapper.find('.nav-link').trigger('click')
|
|
470
|
-
await waitRAF()
|
|
471
|
-
await waitRAF()
|
|
472
|
-
expect($collapse.classes()).toContain('show')
|
|
473
|
-
expect($collapse.element.style.display).toEqual('')
|
|
474
|
-
|
|
475
|
-
wrapper.destroy()
|
|
476
|
-
})
|
|
477
|
-
|
|
478
346
|
it('should not respond to root toggle event that does not match ID', async () => {
|
|
479
347
|
const wrapper = mount(BCollapse, {
|
|
480
348
|
attachTo: document.body,
|
|
@@ -20,10 +20,6 @@
|
|
|
20
20
|
"version": "2.2.0",
|
|
21
21
|
"description": "When set, and prop 'visible' is true on mount, will animate on initial mount"
|
|
22
22
|
},
|
|
23
|
-
{
|
|
24
|
-
"prop": "isNav",
|
|
25
|
-
"description": "When set, signifies that the collapse is part of a navbar, enabling certain features for navbar support"
|
|
26
|
-
},
|
|
27
23
|
{
|
|
28
24
|
"prop": "visible",
|
|
29
25
|
"description": "When 'true', expands the collapse"
|
|
@@ -723,7 +723,7 @@ the dropdown menu, ensure they are wrapped with a plain `<li>`.
|
|
|
723
723
|
## See also
|
|
724
724
|
|
|
725
725
|
- [`<b-nav-item-dropdown>`](?path=/docs/base-nav--docs#dropdown-support) for dropdown support inside
|
|
726
|
-
`<b-nav>`
|
|
726
|
+
`<b-nav>`
|
|
727
727
|
- [Router Link Support](?path=/docs/base-link--docs#router-link-support) reference for information
|
|
728
728
|
about router-link specific props available on `<b-dropdown-item>`
|
|
729
729
|
|
|
@@ -927,6 +927,8 @@ describe('form-input', () => {
|
|
|
927
927
|
const origGetBCR = Element.prototype.getBoundingClientRect
|
|
928
928
|
|
|
929
929
|
beforeEach(() => {
|
|
930
|
+
// @gitlab-ui: In order to get these tests passing we needed to use real timers
|
|
931
|
+
jest.useRealTimers()
|
|
930
932
|
// Mock `getBoundingClientRect()` so that the `isVisible(el)` test returns `true`
|
|
931
933
|
Element.prototype.getBoundingClientRect = jest.fn(() => ({
|
|
932
934
|
width: 24,
|
|
@@ -941,6 +943,7 @@ describe('form-input', () => {
|
|
|
941
943
|
afterEach(() => {
|
|
942
944
|
// Restore prototype
|
|
943
945
|
Element.prototype.getBoundingClientRect = origGetBCR
|
|
946
|
+
jest.useFakeTimers()
|
|
944
947
|
})
|
|
945
948
|
|
|
946
949
|
it('works when true', async () => {
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
# Modifications to Vendored Code
|
|
2
2
|
|
|
3
3
|
**Library**: BootstrapVue
|
|
4
|
-
**Version**: 2.23.1
|
|
4
|
+
**Version**: 2.23.1 **Link:** https://bootstrap-vue.org **Source:**
|
|
5
|
+
https://github.com/bootstrap-vue/bootstrap-vue **Copyright:** (c) 2016-2024 BootstrapVue
|
|
6
|
+
**License:** (c)
|
|
7
|
+
[2016-2024 BootstrapVue](https://github.com/bootstrap-vue/bootstrap-vue/blob/master/LICENSE)
|
|
5
8
|
|
|
6
9
|
This file documents modifications made to the original BootstrapVue component files.
|
|
7
10
|
|
|
8
|
-
## Removed unnecessary properties
|
|
11
|
+
## Removed unnecessary properties
|
|
9
12
|
|
|
10
13
|
The following properties have been removed as they are no longer supported in our implementation:
|
|
11
14
|
|
|
@@ -19,9 +22,9 @@ The following properties have been removed as they are no longer supported in ou
|
|
|
19
22
|
- `footerBorderVariant`
|
|
20
23
|
- `footerTextVariant`
|
|
21
24
|
|
|
22
|
-
These properties were removed to streamline the component for our use case, as they are no longer
|
|
23
|
-
The following files have been modified from the original:
|
|
25
|
+
These properties were removed to streamline the component for our use case, as they are no longer
|
|
26
|
+
necessary in our project. The following files have been modified from the original:
|
|
24
27
|
|
|
25
28
|
- `modal.js`: Removed unnecessary properties.
|
|
26
29
|
- `package.json`: Removed unnecessary properties.
|
|
27
|
-
- `README.md`: Removed unnecessary properties.
|
|
30
|
+
- `README.md`: Removed unnecessary properties.
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
{
|
|
80
80
|
"prop": "boundary",
|
|
81
81
|
"version": "2.4.0",
|
|
82
|
-
"description": "The boundary constraint of the menu: 'scrollParent', 'window', 'viewport', or a reference to an HTMLElement.
|
|
82
|
+
"description": "The boundary constraint of the menu: 'scrollParent', 'window', 'viewport', or a reference to an HTMLElement."
|
|
83
83
|
},
|
|
84
84
|
{
|
|
85
85
|
"prop": "dropleft",
|
|
@@ -371,7 +371,7 @@ describe('table > filtering', () => {
|
|
|
371
371
|
lastFilterTimer = wrapper.vm.$_filterTimer
|
|
372
372
|
expect(wrapper.vm.localFilter).not.toEqual('z')
|
|
373
373
|
|
|
374
|
-
jest.
|
|
374
|
+
jest.advanceTimersByTime(101)
|
|
375
375
|
await waitNT(wrapper.vm)
|
|
376
376
|
expect(wrapper.emitted('input').length).toBe(2)
|
|
377
377
|
expect(wrapper.emitted('input')[1][0]).toEqual([testItems[2]])
|
|
@@ -187,7 +187,7 @@ const BVTabButton = /*#__PURE__*/ extend({
|
|
|
187
187
|
|
|
188
188
|
// --- Props ---
|
|
189
189
|
|
|
190
|
-
const navProps = omit(BNavProps, ['tabs', '
|
|
190
|
+
const navProps = omit(BNavProps, ['tabs', 'cardHeader'])
|
|
191
191
|
|
|
192
192
|
export const props = makePropsConfigurable(
|
|
193
193
|
sortKeys({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { mount } from '@vue/test-utils'
|
|
2
|
-
import { waitNT, waitRAF } from '../../../tests/utils'
|
|
2
|
+
import { ensureEventEmitted, waitNT, waitRAF } from '../../../tests/utils'
|
|
3
3
|
import { BToast } from './toast'
|
|
4
4
|
|
|
5
5
|
describe('b-toast', () => {
|
|
@@ -217,14 +217,14 @@ describe('b-toast', () => {
|
|
|
217
217
|
})
|
|
218
218
|
|
|
219
219
|
it('auto-hide works', async () => {
|
|
220
|
-
jest.useFakeTimers()
|
|
221
220
|
const wrapper = mount(BToast, {
|
|
222
221
|
attachTo: document.body,
|
|
223
222
|
propsData: {
|
|
224
223
|
static: true,
|
|
225
224
|
noAutoHide: false,
|
|
226
225
|
visible: true,
|
|
227
|
-
title: 'title'
|
|
226
|
+
title: 'title',
|
|
227
|
+
autoHideDelay: 1000
|
|
228
228
|
},
|
|
229
229
|
slots: {
|
|
230
230
|
default: 'content'
|
|
@@ -232,10 +232,7 @@ describe('b-toast', () => {
|
|
|
232
232
|
})
|
|
233
233
|
|
|
234
234
|
expect(wrapper.vm).toBeDefined()
|
|
235
|
-
|
|
236
|
-
await waitRAF()
|
|
237
|
-
await waitNT(wrapper.vm)
|
|
238
|
-
await waitRAF()
|
|
235
|
+
|
|
239
236
|
await waitNT(wrapper.vm)
|
|
240
237
|
await waitRAF()
|
|
241
238
|
await waitNT(wrapper.vm)
|
|
@@ -244,19 +241,10 @@ describe('b-toast', () => {
|
|
|
244
241
|
expect(wrapper.element.tagName).toBe('DIV')
|
|
245
242
|
expect(wrapper.vm.$_dismissTimer).not.toEqual(null)
|
|
246
243
|
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
await waitNT(wrapper.vm)
|
|
250
|
-
await waitRAF()
|
|
251
|
-
await waitNT(wrapper.vm)
|
|
252
|
-
await waitRAF()
|
|
253
|
-
await waitNT(wrapper.vm)
|
|
254
|
-
await waitRAF()
|
|
255
|
-
await waitNT(wrapper.vm)
|
|
256
|
-
await waitRAF()
|
|
244
|
+
await ensureEventEmitted(wrapper, 'hidden')
|
|
257
245
|
|
|
258
|
-
expect(wrapper.element.nodeType).toBe(Node.COMMENT_NODE)
|
|
259
246
|
expect(wrapper.vm.$_dismissTimer).toBe(null)
|
|
247
|
+
expect(wrapper.element.nodeType).toBe(Node.COMMENT_NODE)
|
|
260
248
|
|
|
261
249
|
wrapper.destroy()
|
|
262
250
|
})
|