@gitlab/ui 88.6.0 → 89.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.
Files changed (36) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/index.css +1 -1
  3. package/dist/index.css.map +1 -1
  4. package/dist/index.js +0 -2
  5. package/dist/vendor/bootstrap-vue/src/components/index.js +0 -2
  6. package/dist/vendor/bootstrap-vue/src/components/tooltip/helpers/bv-tooltip.js +1 -1
  7. package/dist/vendor/bootstrap-vue/src/constants/components.js +1 -3
  8. package/dist/vendor/bootstrap-vue/src/index.js +0 -3
  9. package/package.json +1 -1
  10. package/src/index.js +0 -2
  11. package/src/scss/bootstrap.scss +0 -1
  12. package/src/scss/components.scss +0 -1
  13. package/src/vendor/bootstrap-vue/nuxt/index.js +0 -1
  14. package/src/vendor/bootstrap-vue/package.json +0 -1
  15. package/src/vendor/bootstrap-vue/src/components/index.d.ts +0 -1
  16. package/src/vendor/bootstrap-vue/src/components/index.js +0 -2
  17. package/src/vendor/bootstrap-vue/src/components/tooltip/helpers/bv-tooltip.js +1 -1
  18. package/src/vendor/bootstrap-vue/src/constants/components.js +0 -2
  19. package/src/vendor/bootstrap-vue/src/index.js +0 -5
  20. package/dist/components/base/carousel/carousel.js +0 -48
  21. package/dist/components/base/carousel/carousel_slide.js +0 -47
  22. package/dist/vendor/bootstrap-vue/src/components/carousel/carousel-slide.js +0 -123
  23. package/dist/vendor/bootstrap-vue/src/components/carousel/carousel.js +0 -617
  24. package/dist/vendor/bootstrap-vue/src/components/carousel/index.js +0 -14
  25. package/src/components/base/carousel/carousel.md +0 -3
  26. package/src/components/base/carousel/carousel.scss +0 -29
  27. package/src/components/base/carousel/carousel.vue +0 -19
  28. package/src/components/base/carousel/carousel_slide.vue +0 -18
  29. package/src/vendor/bootstrap-vue/src/components/carousel/README.md +0 -320
  30. package/src/vendor/bootstrap-vue/src/components/carousel/carousel-slide.js +0 -132
  31. package/src/vendor/bootstrap-vue/src/components/carousel/carousel-slide.spec.js +0 -276
  32. package/src/vendor/bootstrap-vue/src/components/carousel/carousel.js +0 -655
  33. package/src/vendor/bootstrap-vue/src/components/carousel/carousel.spec.js +0 -1069
  34. package/src/vendor/bootstrap-vue/src/components/carousel/index.d.ts +0 -20
  35. package/src/vendor/bootstrap-vue/src/components/carousel/index.js +0 -12
  36. package/src/vendor/bootstrap-vue/src/components/carousel/package.json +0 -185
@@ -1,276 +0,0 @@
1
- import { mount } from '@vue/test-utils'
2
- import { BCarouselSlide } from './carousel-slide'
3
-
4
- describe('carousel-slide', () => {
5
- it('has expected default structure', async () => {
6
- const wrapper = mount(BCarouselSlide)
7
-
8
- expect(wrapper.element.tagName).toBe('DIV')
9
- expect(wrapper.classes().length).toBe(1)
10
- expect(wrapper.classes()).toContain('carousel-item')
11
- expect(wrapper.attributes('role')).toBeDefined()
12
- expect(wrapper.attributes('role')).toBe('listitem')
13
-
14
- wrapper.destroy()
15
- })
16
-
17
- it('does not have child "carousel-caption" by default', async () => {
18
- const wrapper = mount(BCarouselSlide)
19
-
20
- expect(wrapper.find('.carousel-caption').exists()).toBe(false)
21
-
22
- wrapper.destroy()
23
- })
24
-
25
- it('does not have "img" by default', async () => {
26
- const wrapper = mount(BCarouselSlide)
27
- expect(wrapper.find('img').exists()).toBe(false)
28
-
29
- wrapper.destroy()
30
- })
31
-
32
- it('does not have caption tag "h3" by default', async () => {
33
- const wrapper = mount(BCarouselSlide)
34
- expect(wrapper.find('h3').exists()).toBe(false)
35
-
36
- wrapper.destroy()
37
- })
38
-
39
- it('does not have text tag "p" by default', async () => {
40
- const wrapper = mount(BCarouselSlide)
41
-
42
- expect(wrapper.find('p').exists()).toBe(false)
43
-
44
- wrapper.destroy()
45
- })
46
-
47
- it('renders default slot inside "carousel-caption"', async () => {
48
- const wrapper = mount(BCarouselSlide, {
49
- slots: {
50
- default: 'foobar'
51
- }
52
- })
53
-
54
- expect(wrapper.find('.carousel-caption').exists()).toBe(true)
55
- expect(wrapper.find('.carousel-caption').text()).toContain('foobar')
56
-
57
- wrapper.destroy()
58
- })
59
-
60
- it('has caption tag "h3" when prop "caption" is set', async () => {
61
- const wrapper = mount(BCarouselSlide, {
62
- propsData: {
63
- caption: 'foobar'
64
- }
65
- })
66
-
67
- const content = wrapper.find('.carousel-caption')
68
- expect(content.find('h3').exists()).toBe(true)
69
- expect(content.find('h3').text()).toBe('foobar')
70
-
71
- wrapper.destroy()
72
- })
73
-
74
- it('has text tag "p" when prop "text" is set', async () => {
75
- const wrapper = mount(BCarouselSlide, {
76
- propsData: {
77
- text: 'foobar'
78
- }
79
- })
80
-
81
- const content = wrapper.find('.carousel-caption')
82
- expect(content.find('p').exists()).toBe(true)
83
- expect(content.find('p').text()).toBe('foobar')
84
-
85
- wrapper.destroy()
86
- })
87
-
88
- it('has custom content tag when prop "content-tag" is set', async () => {
89
- const wrapper = mount(BCarouselSlide, {
90
- propsData: {
91
- contentTag: 'span'
92
- },
93
- slots: {
94
- default: 'foobar'
95
- }
96
- })
97
-
98
- expect(wrapper.find('.carousel-caption').exists()).toBe(true)
99
- expect(wrapper.find('.carousel-caption').element.tagName).toBe('SPAN')
100
-
101
- wrapper.destroy()
102
- })
103
-
104
- it('has display classes on "carousel-caption" when prop "content-visible-up" is set', async () => {
105
- const wrapper = mount(BCarouselSlide, {
106
- propsData: {
107
- contentVisibleUp: 'lg'
108
- },
109
- slots: {
110
- default: 'foobar'
111
- }
112
- })
113
-
114
- expect(wrapper.find('.carousel-caption').exists()).toBe(true)
115
- expect(wrapper.find('.carousel-caption').classes()).toContain('d-none')
116
- expect(wrapper.find('.carousel-caption').classes()).toContain('d-lg-block')
117
- expect(wrapper.find('.carousel-caption').classes().length).toBe(3)
118
-
119
- wrapper.destroy()
120
- })
121
-
122
- it('does not have style "background" when prop "background" not set', async () => {
123
- const wrapper = mount(BCarouselSlide)
124
-
125
- expect(wrapper.attributes('style')).toBeUndefined()
126
-
127
- wrapper.destroy()
128
- })
129
-
130
- it('has style "background" when prop "background" is set', async () => {
131
- const wrapper = mount(BCarouselSlide, {
132
- propsData: {
133
- background: 'rgb(1, 2, 3)'
134
- }
135
- })
136
-
137
- expect(wrapper.attributes('style')).toBeDefined()
138
- expect(wrapper.attributes('style')).toContain('background:')
139
- expect(wrapper.attributes('style')).toContain('rgb(')
140
-
141
- wrapper.destroy()
142
- })
143
-
144
- it('has style background inherited from carousel parent', async () => {
145
- const wrapper = mount(BCarouselSlide, {
146
- provide: {
147
- getBvCarousel: () => ({
148
- background: 'rgb(1, 2, 3)'
149
- })
150
- }
151
- })
152
-
153
- expect(wrapper.attributes('style')).toBeDefined()
154
- expect(wrapper.attributes('style')).toContain('background:')
155
- expect(wrapper.attributes('style')).toContain('rgb(')
156
-
157
- wrapper.destroy()
158
- })
159
-
160
- it('has custom caption tag when prop "caption-tag" is set', async () => {
161
- const wrapper = mount(BCarouselSlide, {
162
- propsData: {
163
- captionTag: 'h1',
164
- caption: 'foobar'
165
- }
166
- })
167
-
168
- const content = wrapper.find('.carousel-caption')
169
- expect(content.find('h1').exists()).toBe(true)
170
- expect(content.find('h1').text()).toBe('foobar')
171
-
172
- wrapper.destroy()
173
- })
174
-
175
- it('has custom text tag when prop "text-tag is set', async () => {
176
- const wrapper = mount(BCarouselSlide, {
177
- propsData: {
178
- textTag: 'span',
179
- text: 'foobar'
180
- }
181
- })
182
-
183
- const content = wrapper.find('.carousel-caption')
184
- expect(content.find('span').exists()).toBe(true)
185
- expect(content.find('span').text()).toBe('foobar')
186
-
187
- wrapper.destroy()
188
- })
189
-
190
- it('has image when prop "img-src" is set', async () => {
191
- const wrapper = mount(BCarouselSlide, {
192
- propsData: {
193
- imgSrc: 'https://picsum.photos/1024/480/?image=52'
194
- }
195
- })
196
-
197
- expect(wrapper.find('img').exists()).toBe(true)
198
- expect(wrapper.find('img').attributes('src')).toBeDefined()
199
- expect(wrapper.find('img').attributes('src')).toBe('https://picsum.photos/1024/480/?image=52')
200
-
201
- wrapper.destroy()
202
- })
203
-
204
- it('has image when prop "img-blank" is set', async () => {
205
- const wrapper = mount(BCarouselSlide, {
206
- propsData: {
207
- imgBlank: true
208
- }
209
- })
210
-
211
- expect(wrapper.find('img').exists()).toBe(true)
212
- expect(wrapper.find('img').attributes('src')).toBeDefined()
213
- expect(wrapper.find('img').attributes('src')).toContain('data:')
214
-
215
- wrapper.destroy()
216
- })
217
-
218
- it('has image with "alt" attr when prop "img-alt" is set', async () => {
219
- const wrapper = mount(BCarouselSlide, {
220
- propsData: {
221
- imgSrc: 'https://picsum.photos/1024/480/?image=52',
222
- imgAlt: 'foobar'
223
- }
224
- })
225
-
226
- expect(wrapper.find('img').exists()).toBe(true)
227
- expect(wrapper.find('img').attributes('src')).toBeDefined()
228
- expect(wrapper.find('img').attributes('alt')).toBeDefined()
229
- expect(wrapper.find('img').attributes('alt')).toBe('foobar')
230
-
231
- wrapper.destroy()
232
- })
233
-
234
- it('has image with "width" and "height" attrs when props "img-width" and "img-height" are set', async () => {
235
- const wrapper = mount(BCarouselSlide, {
236
- propsData: {
237
- imgSrc: 'https://picsum.photos/1024/480/?image=52',
238
- imgWidth: '1024',
239
- imgHeight: '480'
240
- }
241
- })
242
-
243
- expect(wrapper.find('img').exists()).toBe(true)
244
- expect(wrapper.find('img').attributes('src')).toBeDefined()
245
- expect(wrapper.find('img').attributes('width')).toBeDefined()
246
- expect(wrapper.find('img').attributes('width')).toBe('1024')
247
- expect(wrapper.find('img').attributes('height')).toBeDefined()
248
- expect(wrapper.find('img').attributes('height')).toBe('480')
249
-
250
- wrapper.destroy()
251
- })
252
-
253
- it('has image with "width" and "height" attrs inherited from carousel parent', async () => {
254
- const wrapper = mount(BCarouselSlide, {
255
- provide: {
256
- // Mock carousel injection
257
- getBvCarousel: () => ({
258
- imgWidth: '1024',
259
- imgHeight: '480'
260
- })
261
- },
262
- propsData: {
263
- imgSrc: 'https://picsum.photos/1024/480/?image=52'
264
- }
265
- })
266
-
267
- expect(wrapper.find('img').exists()).toBe(true)
268
- expect(wrapper.find('img').attributes('src')).toBeDefined()
269
- expect(wrapper.find('img').attributes('width')).toBeDefined()
270
- expect(wrapper.find('img').attributes('width')).toBe('1024')
271
- expect(wrapper.find('img').attributes('height')).toBeDefined()
272
- expect(wrapper.find('img').attributes('height')).toBe('480')
273
-
274
- wrapper.destroy()
275
- })
276
- })