@gitlab/ui 114.0.1 → 114.1.1
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/package.json +9 -28
- package/CHANGELOG.md +0 -13132
- package/src/vendor/bootstrap/LICENSE +0 -11
- package/src/vendor/bootstrap-vue/LICENSE +0 -11
- package/src/vendor/bootstrap-vue/package.json +0 -144
- package/src/vendor/bootstrap-vue/src/components/button/MODIFICATIONS.md +0 -16
- package/src/vendor/bootstrap-vue/src/components/button/README.md +0 -240
- package/src/vendor/bootstrap-vue/src/components/button/button-close.spec.js +0 -210
- package/src/vendor/bootstrap-vue/src/components/button/button.spec.js +0 -349
- package/src/vendor/bootstrap-vue/src/components/button/package.json +0 -105
- package/src/vendor/bootstrap-vue/src/components/dropdown/README.md +0 -730
- package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown-divider.spec.js +0 -58
- package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown-form.spec.js +0 -110
- package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown-group.spec.js +0 -94
- package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown-header.spec.js +0 -73
- package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown-item-button.spec.js +0 -117
- package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown-item.spec.js +0 -147
- package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown-text.spec.js +0 -59
- package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown.spec.js +0 -1121
- package/src/vendor/bootstrap-vue/src/components/dropdown/package.json +0 -368
- package/src/vendor/bootstrap-vue/src/components/form/README.md +0 -365
- package/src/vendor/bootstrap-vue/src/components/form/form-invalid-feedback.spec.js +0 -170
- package/src/vendor/bootstrap-vue/src/components/form/form-text.spec.js +0 -93
- package/src/vendor/bootstrap-vue/src/components/form/form-valid-feedback.spec.js +0 -157
- package/src/vendor/bootstrap-vue/src/components/form/form.spec.js +0 -97
- package/src/vendor/bootstrap-vue/src/components/form/package.json +0 -112
- package/src/vendor/bootstrap-vue/src/components/form-checkbox/README.md +0 -691
- package/src/vendor/bootstrap-vue/src/components/form-checkbox/form-checkbox-group.spec.js +0 -525
- package/src/vendor/bootstrap-vue/src/components/form-checkbox/form-checkbox.spec.js +0 -922
- package/src/vendor/bootstrap-vue/src/components/form-checkbox/package.json +0 -172
- package/src/vendor/bootstrap-vue/src/components/form-group/README.md +0 -339
- package/src/vendor/bootstrap-vue/src/components/form-group/form-group.spec.js +0 -477
- package/src/vendor/bootstrap-vue/src/components/form-group/package.json +0 -183
- package/src/vendor/bootstrap-vue/src/components/form-radio/README.md +0 -437
- package/src/vendor/bootstrap-vue/src/components/form-radio/form-radio-group.spec.js +0 -357
- package/src/vendor/bootstrap-vue/src/components/form-radio/form-radio.spec.js +0 -587
- package/src/vendor/bootstrap-vue/src/components/form-radio/package.json +0 -162
- package/src/vendor/bootstrap-vue/src/components/form-select/README.md +0 -504
- package/src/vendor/bootstrap-vue/src/components/form-select/form-select-option-group.spec.js +0 -138
- package/src/vendor/bootstrap-vue/src/components/form-select/form-select-option.spec.js +0 -75
- package/src/vendor/bootstrap-vue/src/components/form-select/form-select.spec.js +0 -723
- package/src/vendor/bootstrap-vue/src/components/form-select/package.json +0 -132
- package/src/vendor/bootstrap-vue/src/components/form-textarea/README.md +0 -453
- package/src/vendor/bootstrap-vue/src/components/form-textarea/form-textarea.spec.js +0 -1000
- package/src/vendor/bootstrap-vue/src/components/form-textarea/package.json +0 -122
- package/src/vendor/bootstrap-vue/src/components/layout/README.md +0 -791
- package/src/vendor/bootstrap-vue/src/components/layout/col.spec.js +0 -192
- package/src/vendor/bootstrap-vue/src/components/layout/form-row.spec.js +0 -45
- package/src/vendor/bootstrap-vue/src/components/layout/package.json +0 -99
- package/src/vendor/bootstrap-vue/src/components/link/README.md +0 -76
- package/src/vendor/bootstrap-vue/src/components/link/link.spec.js +0 -434
- package/src/vendor/bootstrap-vue/src/components/link/package.json +0 -57
- package/src/vendor/bootstrap-vue/src/components/modal/MODIFICATIONS.md +0 -30
- package/src/vendor/bootstrap-vue/src/components/modal/README.md +0 -1067
- package/src/vendor/bootstrap-vue/src/components/modal/helpers/bv-modal-event.class.spec.js +0 -82
- package/src/vendor/bootstrap-vue/src/components/modal/modal.spec.js +0 -1418
- package/src/vendor/bootstrap-vue/src/components/modal/package.json +0 -544
- package/src/vendor/bootstrap-vue/src/components/nav/README.md +0 -362
- package/src/vendor/bootstrap-vue/src/components/nav/nav-item.spec.js +0 -127
- package/src/vendor/bootstrap-vue/src/components/nav/nav.spec.js +0 -177
- package/src/vendor/bootstrap-vue/src/components/nav/package.json +0 -73
- package/src/vendor/bootstrap-vue/src/components/popover/README.md +0 -919
- package/src/vendor/bootstrap-vue/src/components/popover/package.json +0 -261
- package/src/vendor/bootstrap-vue/src/components/popover/popover.spec.js +0 -198
- package/src/vendor/bootstrap-vue/src/components/table/README.md +0 -3157
- package/src/vendor/bootstrap-vue/src/components/table/helpers/default-sort-compare.spec.js +0 -112
- package/src/vendor/bootstrap-vue/src/components/table/helpers/normalize-fields.spec.js +0 -93
- package/src/vendor/bootstrap-vue/src/components/table/package.json +0 -1763
- package/src/vendor/bootstrap-vue/src/components/table/table-busy.spec.js +0 -150
- package/src/vendor/bootstrap-vue/src/components/table/table-caption.spec.js +0 -176
- package/src/vendor/bootstrap-vue/src/components/table/table-colgroup.spec.js +0 -81
- package/src/vendor/bootstrap-vue/src/components/table/table-filtering.spec.js +0 -409
- package/src/vendor/bootstrap-vue/src/components/table/table-item-formatter.spec.js +0 -56
- package/src/vendor/bootstrap-vue/src/components/table/table-lite.spec.js +0 -682
- package/src/vendor/bootstrap-vue/src/components/table/table-pagination.spec.js +0 -133
- package/src/vendor/bootstrap-vue/src/components/table/table-primarykey.spec.js +0 -83
- package/src/vendor/bootstrap-vue/src/components/table/table-provider.spec.js +0 -411
- package/src/vendor/bootstrap-vue/src/components/table/table-row-details.spec.js +0 -459
- package/src/vendor/bootstrap-vue/src/components/table/table-selectable.spec.js +0 -1182
- package/src/vendor/bootstrap-vue/src/components/table/table-simple.spec.js +0 -206
- package/src/vendor/bootstrap-vue/src/components/table/table-sorting.spec.js +0 -858
- package/src/vendor/bootstrap-vue/src/components/table/table-sticky-column.spec.js +0 -377
- package/src/vendor/bootstrap-vue/src/components/table/table-tbody-bottom-row.spec.js +0 -94
- package/src/vendor/bootstrap-vue/src/components/table/table-tbody-row-events.spec.js +0 -529
- package/src/vendor/bootstrap-vue/src/components/table/table-tbody-top-row.spec.js +0 -88
- package/src/vendor/bootstrap-vue/src/components/table/table-tbody-transition.spec.js +0 -83
- package/src/vendor/bootstrap-vue/src/components/table/table-tfoot-custom.spec.js +0 -91
- package/src/vendor/bootstrap-vue/src/components/table/table-tfoot-events.spec.js +0 -137
- package/src/vendor/bootstrap-vue/src/components/table/table-thead-events.spec.js +0 -155
- package/src/vendor/bootstrap-vue/src/components/table/table-thead-top.spec.js +0 -96
- package/src/vendor/bootstrap-vue/src/components/table/table.spec.js +0 -692
- package/src/vendor/bootstrap-vue/src/components/tabs/README.md +0 -433
- package/src/vendor/bootstrap-vue/src/components/tabs/package.json +0 -205
- package/src/vendor/bootstrap-vue/src/components/tabs/tab.spec.js +0 -330
- package/src/vendor/bootstrap-vue/src/components/tabs/tabs.spec.js +0 -778
- package/src/vendor/bootstrap-vue/src/components/toast/README.md +0 -655
- package/src/vendor/bootstrap-vue/src/components/toast/helpers/bv-toast.spec.js +0 -117
- package/src/vendor/bootstrap-vue/src/components/toast/package.json +0 -184
- package/src/vendor/bootstrap-vue/src/components/toast/toast.spec.js +0 -294
- package/src/vendor/bootstrap-vue/src/components/toast/toaster.spec.js +0 -77
- package/src/vendor/bootstrap-vue/src/components/tooltip/README.md +0 -559
- package/src/vendor/bootstrap-vue/src/components/tooltip/package.json +0 -258
- package/src/vendor/bootstrap-vue/src/components/tooltip/tooltip.spec.js +0 -1240
- package/src/vendor/bootstrap-vue/src/components/transition/package.json +0 -5
- package/src/vendor/bootstrap-vue/src/components/transporter/package.json +0 -5
- package/src/vendor/bootstrap-vue/src/components/transporter/transporter.spec.js +0 -85
- package/src/vendor/bootstrap-vue/src/directives/modal/modal.spec.js +0 -191
- package/src/vendor/bootstrap-vue/src/directives/tooltip/README.md +0 -521
- package/src/vendor/bootstrap-vue/src/directives/tooltip/package.json +0 -131
- package/src/vendor/bootstrap-vue/src/directives/tooltip/tooltip.spec.js +0 -190
- package/src/vendor/bootstrap-vue/src/directives/visible/README.md +0 -244
- package/src/vendor/bootstrap-vue/src/directives/visible/package.json +0 -24
- package/src/vendor/bootstrap-vue/src/mixins/attrs.spec.js +0 -194
- package/src/vendor/bootstrap-vue/src/mixins/click-out.spec.js +0 -52
- package/src/vendor/bootstrap-vue/src/mixins/focus-in.spec.js +0 -53
- package/src/vendor/bootstrap-vue/src/mixins/listen-on-document.spec.js +0 -117
- package/src/vendor/bootstrap-vue/src/mixins/listen-on-root.spec.js +0 -77
- package/src/vendor/bootstrap-vue/src/mixins/listen-on-window.spec.js +0 -115
- package/src/vendor/bootstrap-vue/src/mixins/listeners.spec.js +0 -245
- package/src/vendor/bootstrap-vue/src/utils/bv-event.class.spec.js +0 -66
- package/src/vendor/bootstrap-vue/src/utils/clone-deep.spec.js +0 -70
- package/src/vendor/bootstrap-vue/src/utils/config.spec.js +0 -169
- package/src/vendor/bootstrap-vue/src/utils/css-escape.spec.js +0 -82
- package/src/vendor/bootstrap-vue/src/utils/dom.spec.js +0 -291
- package/src/vendor/bootstrap-vue/src/utils/events.spec.js +0 -41
- package/src/vendor/bootstrap-vue/src/utils/get.spec.js +0 -109
- package/src/vendor/bootstrap-vue/src/utils/inspect.spec.js +0 -251
- package/src/vendor/bootstrap-vue/src/utils/loose-equal.spec.js +0 -203
- package/src/vendor/bootstrap-vue/src/utils/normalize-slot.spec.js +0 -63
- package/src/vendor/bootstrap-vue/src/utils/number.spec.js +0 -72
- package/src/vendor/bootstrap-vue/src/utils/object.spec.js +0 -61
- package/src/vendor/bootstrap-vue/src/utils/props.spec.js +0 -112
- package/src/vendor/bootstrap-vue/src/utils/router.spec.js +0 -248
- package/src/vendor/bootstrap-vue/src/utils/string.spec.js +0 -65
- package/src/vendor/bootstrap-vue/src/utils/stringify-object-values.spec.js +0 -47
- package/src/vendor/bootstrap-vue/src/utils/warn.spec.js +0 -54
|
@@ -1,192 +0,0 @@
|
|
|
1
|
-
import { mount } from '@vue/test-utils'
|
|
2
|
-
import { BCol } from './col'
|
|
3
|
-
|
|
4
|
-
describe('layout > col', () => {
|
|
5
|
-
it('should have default expected structure', async () => {
|
|
6
|
-
const wrapper = mount(BCol)
|
|
7
|
-
|
|
8
|
-
expect(wrapper.element.tagName).toBe('DIV')
|
|
9
|
-
expect(wrapper.classes()).toContain('col')
|
|
10
|
-
expect(wrapper.classes().length).toBe(1)
|
|
11
|
-
expect(wrapper.findAll('.col > *').length).toBe(0)
|
|
12
|
-
expect(wrapper.text()).toEqual('')
|
|
13
|
-
|
|
14
|
-
wrapper.destroy()
|
|
15
|
-
})
|
|
16
|
-
|
|
17
|
-
it('renders custom root element when tag prop set', async () => {
|
|
18
|
-
const wrapper = mount(BCol, {
|
|
19
|
-
propsData: {
|
|
20
|
-
tag: 'span'
|
|
21
|
-
}
|
|
22
|
-
})
|
|
23
|
-
|
|
24
|
-
expect(wrapper.element.tagName).toBe('SPAN')
|
|
25
|
-
expect(wrapper.classes()).toContain('col')
|
|
26
|
-
expect(wrapper.classes().length).toBe(1)
|
|
27
|
-
expect(wrapper.findAll('.col > *').length).toBe(0)
|
|
28
|
-
expect(wrapper.text()).toEqual('')
|
|
29
|
-
|
|
30
|
-
wrapper.destroy()
|
|
31
|
-
})
|
|
32
|
-
|
|
33
|
-
it('should apply breakpoint specific col-{bp}-{#} classes', async () => {
|
|
34
|
-
const wrapper = mount(BCol, {
|
|
35
|
-
propsData: {
|
|
36
|
-
cols: 6,
|
|
37
|
-
sm: 5,
|
|
38
|
-
md: 4,
|
|
39
|
-
lg: 3,
|
|
40
|
-
xl: 2
|
|
41
|
-
}
|
|
42
|
-
})
|
|
43
|
-
|
|
44
|
-
expect(wrapper.element.tagName).toBe('DIV')
|
|
45
|
-
expect(wrapper.classes()).toContain('col-6')
|
|
46
|
-
expect(wrapper.classes()).toContain('col-sm-5')
|
|
47
|
-
expect(wrapper.classes()).toContain('col-md-4')
|
|
48
|
-
expect(wrapper.classes()).toContain('col-lg-3')
|
|
49
|
-
expect(wrapper.classes()).toContain('col-xl-2')
|
|
50
|
-
expect(wrapper.classes().length).toBe(5)
|
|
51
|
-
|
|
52
|
-
wrapper.destroy()
|
|
53
|
-
})
|
|
54
|
-
|
|
55
|
-
it('should not have class "col" when only single breakpoint prop specified', async () => {
|
|
56
|
-
const wrapper = mount(BCol, {
|
|
57
|
-
propsData: {
|
|
58
|
-
sm: 5
|
|
59
|
-
}
|
|
60
|
-
})
|
|
61
|
-
|
|
62
|
-
expect(wrapper.element.tagName).toBe('DIV')
|
|
63
|
-
expect(wrapper.classes()).toContain('col-sm-5')
|
|
64
|
-
expect(wrapper.classes().length).toBe(1)
|
|
65
|
-
|
|
66
|
-
wrapper.destroy()
|
|
67
|
-
})
|
|
68
|
-
|
|
69
|
-
it('should apply ".offset-*" classes with "offset-{bp}-{#}" props', async () => {
|
|
70
|
-
const wrapper = mount(BCol, {
|
|
71
|
-
propsData: {
|
|
72
|
-
offset: 6,
|
|
73
|
-
offsetSm: 5,
|
|
74
|
-
offsetMd: 4,
|
|
75
|
-
offsetLg: 3,
|
|
76
|
-
offsetXl: 2
|
|
77
|
-
}
|
|
78
|
-
})
|
|
79
|
-
|
|
80
|
-
expect(wrapper.element.tagName).toBe('DIV')
|
|
81
|
-
expect(wrapper.classes()).toContain('col')
|
|
82
|
-
expect(wrapper.classes()).toContain('offset-6')
|
|
83
|
-
expect(wrapper.classes()).toContain('offset-sm-5')
|
|
84
|
-
expect(wrapper.classes()).toContain('offset-md-4')
|
|
85
|
-
expect(wrapper.classes()).toContain('offset-lg-3')
|
|
86
|
-
expect(wrapper.classes()).toContain('offset-xl-2')
|
|
87
|
-
expect(wrapper.classes().length).toBe(6)
|
|
88
|
-
|
|
89
|
-
wrapper.destroy()
|
|
90
|
-
})
|
|
91
|
-
|
|
92
|
-
it('should apply ".order-*" classes with "order-{bp}-{#}" props', async () => {
|
|
93
|
-
const wrapper = mount(BCol, {
|
|
94
|
-
propsData: {
|
|
95
|
-
order: 6,
|
|
96
|
-
orderSm: 5,
|
|
97
|
-
orderMd: 4,
|
|
98
|
-
orderLg: 3,
|
|
99
|
-
orderXl: 2
|
|
100
|
-
}
|
|
101
|
-
})
|
|
102
|
-
|
|
103
|
-
expect(wrapper.element.tagName).toBe('DIV')
|
|
104
|
-
expect(wrapper.classes()).toContain('col')
|
|
105
|
-
expect(wrapper.classes()).toContain('order-6')
|
|
106
|
-
expect(wrapper.classes()).toContain('order-sm-5')
|
|
107
|
-
expect(wrapper.classes()).toContain('order-md-4')
|
|
108
|
-
expect(wrapper.classes()).toContain('order-lg-3')
|
|
109
|
-
expect(wrapper.classes()).toContain('order-xl-2')
|
|
110
|
-
expect(wrapper.classes().length).toBe(6)
|
|
111
|
-
|
|
112
|
-
wrapper.destroy()
|
|
113
|
-
})
|
|
114
|
-
|
|
115
|
-
it("should apply boolean breakpoint classes for 'sm', 'md', 'lg', 'xl' prop", async () => {
|
|
116
|
-
const wrapper = mount(BCol, {
|
|
117
|
-
propsData: {
|
|
118
|
-
col: true,
|
|
119
|
-
sm: true,
|
|
120
|
-
md: true,
|
|
121
|
-
lg: true,
|
|
122
|
-
xl: true
|
|
123
|
-
}
|
|
124
|
-
})
|
|
125
|
-
|
|
126
|
-
expect(wrapper.element.tagName).toBe('DIV')
|
|
127
|
-
expect(wrapper.classes()).toContain('col')
|
|
128
|
-
expect(wrapper.classes()).toContain('col-sm')
|
|
129
|
-
expect(wrapper.classes()).toContain('col-md')
|
|
130
|
-
expect(wrapper.classes()).toContain('col-lg')
|
|
131
|
-
expect(wrapper.classes()).toContain('col-xl')
|
|
132
|
-
expect(wrapper.classes().length).toBe(5)
|
|
133
|
-
|
|
134
|
-
wrapper.destroy()
|
|
135
|
-
})
|
|
136
|
-
|
|
137
|
-
it("should apply boolean breakpoint classes for 'sm', 'md', 'lg', 'xl' prop set to empty string", async () => {
|
|
138
|
-
const wrapper = mount(BCol, {
|
|
139
|
-
propsData: {
|
|
140
|
-
sm: '',
|
|
141
|
-
md: '',
|
|
142
|
-
lg: '',
|
|
143
|
-
xl: ''
|
|
144
|
-
}
|
|
145
|
-
})
|
|
146
|
-
|
|
147
|
-
expect(wrapper.element.tagName).toBe('DIV')
|
|
148
|
-
expect(wrapper.classes()).toContain('col-sm')
|
|
149
|
-
expect(wrapper.classes()).toContain('col-md')
|
|
150
|
-
expect(wrapper.classes()).toContain('col-lg')
|
|
151
|
-
expect(wrapper.classes()).toContain('col-xl')
|
|
152
|
-
expect(wrapper.classes().length).toBe(4)
|
|
153
|
-
|
|
154
|
-
wrapper.destroy()
|
|
155
|
-
})
|
|
156
|
-
|
|
157
|
-
it('should apply ".align-self-*" class with "align-self" prop', async () => {
|
|
158
|
-
const wrapper = mount(BCol, {
|
|
159
|
-
propsData: {
|
|
160
|
-
alignSelf: 'center'
|
|
161
|
-
}
|
|
162
|
-
})
|
|
163
|
-
|
|
164
|
-
expect(wrapper.element.tagName).toBe('DIV')
|
|
165
|
-
expect(wrapper.classes()).toContain('col')
|
|
166
|
-
expect(wrapper.classes()).toContain('align-self-center')
|
|
167
|
-
expect(wrapper.classes().length).toBe(2)
|
|
168
|
-
|
|
169
|
-
wrapper.destroy()
|
|
170
|
-
})
|
|
171
|
-
|
|
172
|
-
// it('computeBkPtClass helper should compute boolean classes', async () => {
|
|
173
|
-
// expect(computeBkPtClass('col', 'sm', true)).toBe('col-sm')
|
|
174
|
-
// expect(computeBkPtClass('col', 'md', true)).toBe('col-md')
|
|
175
|
-
// expect(computeBkPtClass('col', 'lg', true)).toBe('col-lg')
|
|
176
|
-
// expect(computeBkPtClass('col', 'xl', true)).toBe('col-xl')
|
|
177
|
-
// })
|
|
178
|
-
//
|
|
179
|
-
// it('computeBkPtClass helper should compute boolean classes when given empty string', async () => {
|
|
180
|
-
// expect(computeBkPtClass('col', 'sm', '')).toBe('col-sm')
|
|
181
|
-
// expect(computeBkPtClass('col', 'md', '')).toBe('col-md')
|
|
182
|
-
// expect(computeBkPtClass('col', 'lg', '')).toBe('col-lg')
|
|
183
|
-
// expect(computeBkPtClass('col', 'xl', '')).toBe('col-xl')
|
|
184
|
-
// })
|
|
185
|
-
//
|
|
186
|
-
// it("computeBkPtClass helper should NOT compute boolean classes when value 'false' (return 'undefined')", async () => {
|
|
187
|
-
// expect(computeBkPtClass('col', 'sm', false)).toBe(undefined)
|
|
188
|
-
// expect(computeBkPtClass('col', 'md', false)).toBe(undefined)
|
|
189
|
-
// expect(computeBkPtClass('col', 'lg', false)).toBe(undefined)
|
|
190
|
-
// expect(computeBkPtClass('col', 'xl', false)).toBe(undefined)
|
|
191
|
-
// })
|
|
192
|
-
})
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { mount } from '@vue/test-utils'
|
|
2
|
-
import { BFormRow } from './form-row'
|
|
3
|
-
|
|
4
|
-
describe('layout > form-row', () => {
|
|
5
|
-
it('has expected default structure', async () => {
|
|
6
|
-
const wrapper = mount(BFormRow)
|
|
7
|
-
|
|
8
|
-
expect(wrapper.element.tagName).toBe('DIV')
|
|
9
|
-
expect(wrapper.classes()).toContain('form-row')
|
|
10
|
-
expect(wrapper.classes().length).toBe(1)
|
|
11
|
-
expect(wrapper.text()).toEqual('')
|
|
12
|
-
|
|
13
|
-
wrapper.destroy()
|
|
14
|
-
})
|
|
15
|
-
|
|
16
|
-
it('custom root element when prop tag set', async () => {
|
|
17
|
-
const wrapper = mount(BFormRow, {
|
|
18
|
-
propsData: {
|
|
19
|
-
tag: 'span'
|
|
20
|
-
}
|
|
21
|
-
})
|
|
22
|
-
|
|
23
|
-
expect(wrapper.element.tagName).toBe('SPAN')
|
|
24
|
-
expect(wrapper.classes()).toContain('form-row')
|
|
25
|
-
expect(wrapper.classes().length).toBe(1)
|
|
26
|
-
expect(wrapper.text()).toEqual('')
|
|
27
|
-
|
|
28
|
-
wrapper.destroy()
|
|
29
|
-
})
|
|
30
|
-
|
|
31
|
-
it('renders default slot content', async () => {
|
|
32
|
-
const wrapper = mount(BFormRow, {
|
|
33
|
-
slots: {
|
|
34
|
-
default: 'foobar'
|
|
35
|
-
}
|
|
36
|
-
})
|
|
37
|
-
|
|
38
|
-
expect(wrapper.element.tagName).toBe('DIV')
|
|
39
|
-
expect(wrapper.classes()).toContain('form-row')
|
|
40
|
-
expect(wrapper.classes().length).toBe(1)
|
|
41
|
-
expect(wrapper.text()).toEqual('foobar')
|
|
42
|
-
|
|
43
|
-
wrapper.destroy()
|
|
44
|
-
})
|
|
45
|
-
})
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@bootstrap-vue/layout",
|
|
3
|
-
"version": "1.0.0",
|
|
4
|
-
"meta": {
|
|
5
|
-
"title": "Layout and Grid System",
|
|
6
|
-
"description": "Use the powerful mobile-first flexbox grid (via the <b-container>, <b-row>, <b-form-row> and <b-col> components) to build layouts of all shapes and sizes thanks to a twelve column system, five default responsive tiers, CSS Sass variables and mixins, and dozens of predefined classes.",
|
|
7
|
-
"slug": "layout",
|
|
8
|
-
"components": [
|
|
9
|
-
{
|
|
10
|
-
"component": "BCol",
|
|
11
|
-
"props": [
|
|
12
|
-
{
|
|
13
|
-
"prop": "alignSelf",
|
|
14
|
-
"description": "Vertical alignment of the grid cell with respect to the row: 'start', 'center', 'end', 'baseline', or 'stretch'"
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
"prop": "col",
|
|
18
|
-
"description": "When true makes an equal width column grid cell spans for xs and up breakpoints"
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
"prop": "cols",
|
|
22
|
-
"description": "Number of columns the grid cell spans for xs and up breakpoints"
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
"prop": "lg",
|
|
26
|
-
"description": "Number of columns the grid cell spans for lg and up breakpoints"
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
"prop": "md",
|
|
30
|
-
"description": "Number of columns the grid cell spans for md and up breakpoints"
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
"prop": "offset",
|
|
34
|
-
"description": "Number of columns the grid cell is offset for xs and up breakpoints"
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
"prop": "offsetLg",
|
|
38
|
-
"description": "Number of columns the grid cell is offset for lg and up breakpoints"
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
"prop": "offsetMd",
|
|
42
|
-
"description": "Number of columns the grid cell is offset for md and up breakpoints"
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
"prop": "offsetSm",
|
|
46
|
-
"description": "Number of columns the grid cell is offset for sm and up breakpoints"
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
"prop": "offsetXl",
|
|
50
|
-
"description": "Number of columns the grid cell is offset for xl and up breakpoints"
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
"prop": "order",
|
|
54
|
-
"description": "Flex order of the grid cell for xs and up breakpoints"
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
"prop": "orderLg",
|
|
58
|
-
"description": "Flex order of the grid cell for lg and up breakpoints"
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
"prop": "orderMd",
|
|
62
|
-
"description": "Flex order of the grid cell for md and up breakpoints"
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
"prop": "orderSm",
|
|
66
|
-
"description": "Flex order of the grid cell for sm and up breakpoints"
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
"prop": "orderXl",
|
|
70
|
-
"description": "Flex order of the grid cell for xl and up breakpoints"
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
"prop": "sm",
|
|
74
|
-
"description": "Number of columns the grid cell spans for sm and up breakpoints"
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
"prop": "xl",
|
|
78
|
-
"description": "Number of columns the grid cell spans for xl and up breakpoints"
|
|
79
|
-
}
|
|
80
|
-
],
|
|
81
|
-
"slots": [
|
|
82
|
-
{
|
|
83
|
-
"name": "default",
|
|
84
|
-
"description": "Content to place in the col"
|
|
85
|
-
}
|
|
86
|
-
]
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
"component": "BFormRow",
|
|
90
|
-
"slots": [
|
|
91
|
-
{
|
|
92
|
-
"name": "default",
|
|
93
|
-
"description": "Content to place in the form row"
|
|
94
|
-
}
|
|
95
|
-
]
|
|
96
|
-
}
|
|
97
|
-
]
|
|
98
|
-
}
|
|
99
|
-
}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
# Link
|
|
2
|
-
|
|
3
|
-
> Use BootstrapVue's custom `b-link` component for generating a standard `<a>` link or
|
|
4
|
-
> `<router-link>`. `<b-link>` supports the `disabled` state and `click` event propagation.
|
|
5
|
-
|
|
6
|
-
`<b-link>` is the building block for most BootstrapVue components that offer link functionality.
|
|
7
|
-
|
|
8
|
-
```html
|
|
9
|
-
<div>
|
|
10
|
-
<b-link href="#foo">Link</b-link>
|
|
11
|
-
</div>
|
|
12
|
-
|
|
13
|
-
<!-- b-link.vue -->
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
## Link type
|
|
17
|
-
|
|
18
|
-
By specifying a value in the `href` prop, a standard link (`<a>`) element will be rendered. To
|
|
19
|
-
generate a `<router-link>` instead, specify the route location via the `to` prop.
|
|
20
|
-
|
|
21
|
-
Router links support various additional props. Refer to the
|
|
22
|
-
[Router support](?path=/docs/base-link--docs#router-link-support) reference section for details.
|
|
23
|
-
|
|
24
|
-
If your app is running under [Nuxt.js](https://nuxtjs.org), the
|
|
25
|
-
[`<nuxt-link>`](https://nuxtjs.org/api/components-nuxt-link) component will be used instead of
|
|
26
|
-
`<router-link>`. The `<nuxt-link>` component supports all the same features as `<router-link>` (as
|
|
27
|
-
it is a wrapper component for `<router-link>`) and more.
|
|
28
|
-
|
|
29
|
-
### Third party router links
|
|
30
|
-
|
|
31
|
-
BootstrapVue auto detects using `<router-link>` and `<nuxt-link>` link components. Some 3rd party
|
|
32
|
-
frameworks also provide customized versions of `<router-link>`, such as
|
|
33
|
-
[Gridsome's `<g-link>` component](https://gridsome.org/docs/linking/). `<b-link>` can support these
|
|
34
|
-
third party `<router-link>` compatible components via the use of the `router-component-name` prop.
|
|
35
|
-
All `vue-router` props (excluding `<nuxt-link>` specific props) will be passed to the specified
|
|
36
|
-
router link component.
|
|
37
|
-
|
|
38
|
-
Note that the 3rd party component will only be used when the `to` prop is set.
|
|
39
|
-
|
|
40
|
-
## Links with `href="#"`
|
|
41
|
-
|
|
42
|
-
Typically `<a href="#">` will cause the document to scroll to the top of page when clicked.
|
|
43
|
-
`<b-link>` addresses this by preventing the default action (scroll to top) when `href` is set to
|
|
44
|
-
`#`.
|
|
45
|
-
|
|
46
|
-
If you need scroll to top behaviour, use a standard `<a href="#">...</a>` tag.
|
|
47
|
-
|
|
48
|
-
## Link disabled state
|
|
49
|
-
|
|
50
|
-
Disable link functionality by setting the `disabled` prop to true.
|
|
51
|
-
|
|
52
|
-
```html
|
|
53
|
-
<div>
|
|
54
|
-
<b-link href="#foo" disabled>Disabled Link</b-link>
|
|
55
|
-
</div>
|
|
56
|
-
|
|
57
|
-
<!-- b-link-disabled.vue -->
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
Disabling a link will set the Bootstrap v4 `.disabled` class on the link as well as handles stopping
|
|
61
|
-
event propagation, preventing the default action from occurring, and removing the link from the
|
|
62
|
-
document tab sequence (`tabindex="-1"`).
|
|
63
|
-
|
|
64
|
-
**Note:** Bootstrap v4 CSS currently does not style disabled links differently than non-disabled
|
|
65
|
-
links. You can use the following custom CSS to style disabled links (by preventing hover style
|
|
66
|
-
changes):
|
|
67
|
-
|
|
68
|
-
```css
|
|
69
|
-
a.disabled {
|
|
70
|
-
pointer-events: none;
|
|
71
|
-
}
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
Not all browsers support `pointer-events: none;`.
|
|
75
|
-
|
|
76
|
-
<!-- Component reference added automatically from component package.json -->
|