@gitlab/ui 101.7.1 → 101.8.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 +7 -0
- package/dist/components/base/icon/icon.js +10 -21
- package/dist/components/base/toast/toast.js +0 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/tokens/build/js/tokens.dark.js +5 -5
- package/dist/tokens/css/tokens.css +1 -1
- package/dist/tokens/css/tokens.dark.css +2 -2
- package/dist/tokens/js/tokens.dark.js +5 -5
- package/dist/tokens/json/tokens.dark.json +7 -10
- package/dist/tokens/json/tokens.json +2 -5
- package/dist/tokens/scss/_tokens.dark.scss +2 -2
- package/dist/tokens/scss/_tokens.scss +1 -1
- package/dist/vendor/bootstrap-vue/src/components/toast/toast.js +0 -17
- package/package.json +1 -1
- package/src/components/base/icon/icon.vue +10 -19
- package/src/components/base/toast/toast.js +0 -1
- package/src/tokens/build/css/tokens.css +1 -1
- package/src/tokens/build/css/tokens.dark.css +2 -2
- package/src/tokens/build/js/tokens.dark.js +5 -5
- package/src/tokens/build/json/tokens.dark.json +7 -10
- package/src/tokens/build/json/tokens.json +2 -5
- package/src/tokens/build/scss/_tokens.dark.scss +2 -2
- package/src/tokens/build/scss/_tokens.scss +1 -1
- package/src/tokens/contextual/link.tokens.json +1 -4
- package/src/tokens/text.tokens.json +1 -1
- package/src/vendor/bootstrap-vue/src/components/toast/README.md +1 -2
- package/src/vendor/bootstrap-vue/src/components/toast/helpers/bv-toast.spec.js +0 -14
- package/src/vendor/bootstrap-vue/src/components/toast/index.d.ts +0 -1
- package/src/vendor/bootstrap-vue/src/components/toast/package.json +0 -4
- package/src/vendor/bootstrap-vue/src/components/toast/toast.js +1 -18
- package/src/vendor/bootstrap-vue/src/components/toast/toast.spec.js +0 -40
|
@@ -32,7 +32,6 @@ import { idMixin, props as idProps } from '../../mixins/id'
|
|
|
32
32
|
import { listenOnRootMixin } from '../../mixins/listen-on-root'
|
|
33
33
|
import { normalizeSlotMixin } from '../../mixins/normalize-slot'
|
|
34
34
|
import { scopedStyleMixin } from '../../mixins/scoped-style'
|
|
35
|
-
import { BButtonClose } from '../button/button-close'
|
|
36
35
|
import { BLink, props as BLinkProps } from '../link/link'
|
|
37
36
|
import { BVTransition } from '../transition/bv-transition'
|
|
38
37
|
import { BToaster } from './toaster'
|
|
@@ -69,7 +68,6 @@ export const props = makePropsConfigurable(
|
|
|
69
68
|
// Switches role to 'status' and aria-live to 'polite'
|
|
70
69
|
isStatus: makeProp(PROP_TYPE_BOOLEAN, false),
|
|
71
70
|
noAutoHide: makeProp(PROP_TYPE_BOOLEAN, false),
|
|
72
|
-
noCloseButton: makeProp(PROP_TYPE_BOOLEAN, false),
|
|
73
71
|
noFade: makeProp(PROP_TYPE_BOOLEAN, false),
|
|
74
72
|
noHoverPause: makeProp(PROP_TYPE_BOOLEAN, false),
|
|
75
73
|
solid: makeProp(PROP_TYPE_BOOLEAN, false),
|
|
@@ -340,28 +338,13 @@ export const BToast = /*#__PURE__*/ extend({
|
|
|
340
338
|
},
|
|
341
339
|
// Render helper for generating the toast
|
|
342
340
|
makeToast(h) {
|
|
343
|
-
const {
|
|
341
|
+
const { slotScope } = this
|
|
344
342
|
const link = isLink(this)
|
|
345
343
|
const $headerContent = []
|
|
346
344
|
|
|
347
345
|
const $title = this.normalizeSlot(SLOT_NAME_TOAST_TITLE, slotScope)
|
|
348
346
|
if ($title) {
|
|
349
347
|
$headerContent.push($title)
|
|
350
|
-
} else if (title) {
|
|
351
|
-
$headerContent.push(h('strong', { staticClass: 'mr-2' }, title))
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
if (!this.noCloseButton) {
|
|
355
|
-
$headerContent.push(
|
|
356
|
-
h(BButtonClose, {
|
|
357
|
-
staticClass: 'ml-auto mb-1',
|
|
358
|
-
on: {
|
|
359
|
-
click: () => {
|
|
360
|
-
this.hide()
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
})
|
|
364
|
-
)
|
|
365
348
|
}
|
|
366
349
|
|
|
367
350
|
let $header = h()
|
|
@@ -46,18 +46,6 @@ describe('b-toast', () => {
|
|
|
46
46
|
expect($toast.classes()).toContain('toast')
|
|
47
47
|
expect($toast.attributes('tabindex')).toEqual('0')
|
|
48
48
|
|
|
49
|
-
expect($toast.find('.toast-header').exists()).toBe(true)
|
|
50
|
-
const $header = $toast.find('.toast-header')
|
|
51
|
-
expect($header.element.tagName).toBe('HEADER')
|
|
52
|
-
expect($header.classes().length).toBe(1)
|
|
53
|
-
expect($header.find('strong').exists()).toBe(true)
|
|
54
|
-
expect($header.find('strong').text()).toEqual('title')
|
|
55
|
-
expect($header.find('strong').classes()).toContain('mr-2')
|
|
56
|
-
expect($header.find('button').exists()).toBe(true)
|
|
57
|
-
expect($header.find('button').classes()).toContain('close')
|
|
58
|
-
expect($header.find('button').classes()).toContain('ml-auto')
|
|
59
|
-
expect($header.find('button').classes()).toContain('mb-1')
|
|
60
|
-
|
|
61
49
|
expect($toast.find('.toast-body').exists()).toBe(true)
|
|
62
50
|
const $body = $toast.find('.toast-body')
|
|
63
51
|
expect($body.element.tagName).toBe('DIV')
|
|
@@ -67,34 +55,6 @@ describe('b-toast', () => {
|
|
|
67
55
|
wrapper.destroy()
|
|
68
56
|
})
|
|
69
57
|
|
|
70
|
-
it('has correct header tag when "header-tag" prop is set', async () => {
|
|
71
|
-
const wrapper = mount(BToast, {
|
|
72
|
-
attachTo: document.body,
|
|
73
|
-
propsData: {
|
|
74
|
-
static: true,
|
|
75
|
-
noAutoHide: true,
|
|
76
|
-
visible: true,
|
|
77
|
-
title: 'title',
|
|
78
|
-
headerTag: 'div'
|
|
79
|
-
},
|
|
80
|
-
slots: {
|
|
81
|
-
default: 'content'
|
|
82
|
-
}
|
|
83
|
-
})
|
|
84
|
-
|
|
85
|
-
expect(wrapper.vm).toBeDefined()
|
|
86
|
-
await waitNT(wrapper.vm)
|
|
87
|
-
await waitRAF()
|
|
88
|
-
await waitNT(wrapper.vm)
|
|
89
|
-
await waitRAF()
|
|
90
|
-
|
|
91
|
-
const $header = wrapper.find('.toast-header')
|
|
92
|
-
expect($header.exists()).toBe(true)
|
|
93
|
-
expect($header.element.tagName).toBe('DIV')
|
|
94
|
-
|
|
95
|
-
wrapper.destroy()
|
|
96
|
-
})
|
|
97
|
-
|
|
98
58
|
it('visible prop works', async () => {
|
|
99
59
|
const wrapper = mount(BToast, {
|
|
100
60
|
attachTo: document.body,
|