@gitlab/ui 101.7.0 → 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.
Files changed (33) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/components/base/icon/icon.js +10 -21
  3. package/dist/components/base/toast/toast.js +0 -1
  4. package/dist/index.css +1 -1
  5. package/dist/index.css.map +1 -1
  6. package/dist/tokens/build/js/tokens.dark.js +5 -5
  7. package/dist/tokens/css/tokens.css +1 -1
  8. package/dist/tokens/css/tokens.dark.css +2 -2
  9. package/dist/tokens/js/tokens.dark.js +5 -5
  10. package/dist/tokens/json/tokens.dark.json +7 -10
  11. package/dist/tokens/json/tokens.json +2 -5
  12. package/dist/tokens/scss/_tokens.dark.scss +2 -2
  13. package/dist/tokens/scss/_tokens.scss +1 -1
  14. package/dist/vendor/bootstrap-vue/src/components/toast/toast.js +0 -17
  15. package/package.json +2 -2
  16. package/src/components/base/icon/icon.vue +10 -19
  17. package/src/components/base/toast/toast.js +0 -1
  18. package/src/components/experimental/duo/chat/duo_chat.scss +2 -0
  19. package/src/tokens/build/css/tokens.css +1 -1
  20. package/src/tokens/build/css/tokens.dark.css +2 -2
  21. package/src/tokens/build/js/tokens.dark.js +5 -5
  22. package/src/tokens/build/json/tokens.dark.json +7 -10
  23. package/src/tokens/build/json/tokens.json +2 -5
  24. package/src/tokens/build/scss/_tokens.dark.scss +2 -2
  25. package/src/tokens/build/scss/_tokens.scss +1 -1
  26. package/src/tokens/contextual/link.tokens.json +1 -4
  27. package/src/tokens/text.tokens.json +1 -1
  28. package/src/vendor/bootstrap-vue/src/components/toast/README.md +1 -2
  29. package/src/vendor/bootstrap-vue/src/components/toast/helpers/bv-toast.spec.js +0 -14
  30. package/src/vendor/bootstrap-vue/src/components/toast/index.d.ts +0 -1
  31. package/src/vendor/bootstrap-vue/src/components/toast/package.json +0 -4
  32. package/src/vendor/bootstrap-vue/src/components/toast/toast.js +1 -18
  33. package/src/vendor/bootstrap-vue/src/components/toast/toast.spec.js +0 -40
@@ -41,10 +41,6 @@
41
41
  "prop": "noAutoHide",
42
42
  "description": "When set, disabled the toast from automatically dismissing itself"
43
43
  },
44
- {
45
- "prop": "noCloseButton",
46
- "description": "When set, hides the close button in the toast header"
47
- },
48
44
  {
49
45
  "prop": "noHoverPause",
50
46
  "description": "When set, disables the pausing of the auto hide delay when the mouse hovers the toast"
@@ -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 { title, slotScope } = this
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,