buefy 0.9.24 → 0.9.26
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 +68 -76
- package/src/components/autocomplete/Autocomplete.vue +1 -1
- package/src/components/autocomplete/__snapshots__/Autocomplete.spec.js.snap +4 -13
- package/src/components/breadcrumb/__snapshots__/Breadcrumb.spec.js.snap +1 -1
- package/src/components/button/Button.spec.js +8 -0
- package/src/components/button/Button.vue +1 -1
- package/src/components/button/__snapshots__/Button.spec.js.snap +1 -6
- package/src/components/carousel/__snapshots__/Carousel.spec.js.snap +7 -14
- package/src/components/carousel/__snapshots__/CarouselList.spec.js.snap +67 -86
- package/src/components/checkbox/__snapshots__/Checkbox.spec.js.snap +1 -1
- package/src/components/clockpicker/__snapshots__/Clockpicker.spec.js.snap +14 -19
- package/src/components/clockpicker/__snapshots__/ClockpickerFace.spec.js.snap +3 -3
- package/src/components/collapse/__snapshots__/Collapse.spec.js.snap +2 -2
- package/src/components/colorpicker/__snapshots__/Colorpicker.spec.js.snap +7 -28
- package/src/components/colorpicker/__snapshots__/ColorpickerAlphaSlider.spec.js.snap +3 -5
- package/src/components/colorpicker/__snapshots__/ColorpickerHSLRepresentationSquare.spec.js.snap +6 -6
- package/src/components/colorpicker/__snapshots__/ColorpickerHSLRepresentationTriangle.spec.js.snap +29 -29
- package/src/components/datepicker/Datepicker.spec.js +11 -4
- package/src/components/datepicker/DatepickerMonth.spec.js +3 -5
- package/src/components/datepicker/__snapshots__/Datepicker.spec.js.snap +381 -397
- package/src/components/datepicker/__snapshots__/DatepickerMonth.spec.js.snap +27 -27
- package/src/components/datepicker/__snapshots__/DatepickerTable.spec.js.snap +10 -10
- package/src/components/datepicker/__snapshots__/DatepickerTableRow.spec.js.snap +1 -11
- package/src/components/datetimepicker/Datetimepicker.spec.js +9 -3
- package/src/components/dialog/Dialog.spec.js +29 -0
- package/src/components/dialog/Dialog.vue +19 -1
- package/src/components/dropdown/__snapshots__/Dropdown.spec.js.snap +5 -5
- package/src/components/field/__snapshots__/Field.spec.js.snap +1 -6
- package/src/components/image/__snapshots__/Image.spec.js.snap +9 -25
- package/src/components/input/__snapshots__/Input.spec.js.snap +1 -7
- package/src/components/loading/__snapshots__/Loading.spec.js.snap +4 -4
- package/src/components/menu/__snapshots__/MenuItem.spec.js.snap +1 -6
- package/src/components/menu/__snapshots__/MenuList.spec.js.snap +2 -2
- package/src/components/message/__snapshots__/Message.spec.js.snap +1 -7
- package/src/components/modal/Modal.spec.js +26 -0
- package/src/components/modal/Modal.vue +5 -1
- package/src/components/modal/__snapshots__/Modal.spec.js.snap +4 -4
- package/src/components/navbar/NavbarDropdown.vue +2 -11
- package/src/components/navbar/__snapshots__/NavBar.spec.js.snap +5 -5
- package/src/components/navbar/__snapshots__/NavbarDropdown.spec.js.snap +1 -1
- package/src/components/notification/__snapshots__/Notification.spec.js.snap +1 -6
- package/src/components/numberinput/Numberinput.spec.js +39 -14
- package/src/components/pagination/__snapshots__/Pagination.spec.js.snap +3 -13
- package/src/components/progress/__snapshots__/Progress.spec.js.snap +1 -5
- package/src/components/progress/__snapshots__/ProgressBar.spec.js.snap +1 -5
- package/src/components/select/__snapshots__/Select.spec.js.snap +1 -5
- package/src/components/sidebar/__snapshots__/Sidebar.spec.js.snap +8 -10
- package/src/components/skeleton/__snapshots__/Skeleton.spec.js.snap +1 -1
- package/src/components/slider/__snapshots__/Slider.spec.js.snap +3 -6
- package/src/components/slider/__snapshots__/SliderThumb.spec.js.snap +3 -7
- package/src/components/slider/__snapshots__/SliderTick.spec.js.snap +1 -5
- package/src/components/snackbar/__snapshots__/Snackbar.spec.js.snap +2 -3
- package/src/components/steps/__snapshots__/StepItem.spec.js.snap +1 -1
- package/src/components/steps/__snapshots__/Steps.spec.js.snap +22 -28
- package/src/components/table/Table.spec.js +288 -0
- package/src/components/table/Table.vue +255 -44
- package/src/components/table/TableColumn.vue +3 -0
- package/src/components/table/__snapshots__/Table.spec.js.snap +11 -17
- package/src/components/table/__snapshots__/TableMobileSort.spec.js.snap +3 -8
- package/src/components/tabs/__snapshots__/TabItem.spec.js.snap +1 -1
- package/src/components/tabs/__snapshots__/Tabs.spec.js.snap +14 -16
- package/src/components/tag/Tag.vue +2 -2
- package/src/components/tag/__snapshots__/Tag.spec.js.snap +1 -4
- package/src/components/taginput/__snapshots__/Taginput.spec.js.snap +1 -4
- package/src/components/timepicker/Timepicker.spec.js +7 -1
- package/src/components/timepicker/__snapshots__/Timepicker.spec.js.snap +255 -238
- package/src/components/toast/__snapshots__/Toast.spec.js.snap +1 -1
- package/src/components/tooltip/Tooltip.vue +46 -13
- package/src/components/tooltip/__snapshots__/Tooltip.spec.js.snap +6 -1
- package/src/scss/components/_icon.scss +2 -2
- package/src/scss/components/_modal.scss +13 -0
- package/src/scss/components/_table.scss +48 -5
- package/src/scss/components/_tag.scss +9 -0
- package/src/utils/helpers.js +52 -5
|
@@ -1,32 +1,11 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
3
|
exports[`BColorpicker render correctly 1`] = `
|
|
4
|
-
<div class="colorpicker control">
|
|
5
|
-
|
|
6
|
-
<
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
<div class="colorpicker-content">
|
|
12
|
-
<b-colorpicker-h-s-l-representation-triangle-stub value="#000000" size="200" thickness="20"></b-colorpicker-h-s-l-representation-triangle-stub>
|
|
13
|
-
</div>
|
|
14
|
-
</div>
|
|
15
|
-
<footer class="colorpicker-footer">
|
|
16
|
-
<!---->
|
|
17
|
-
<b-field-stub grouped="true" addons="true" class="colorpicker-fields">
|
|
18
|
-
<b-field-stub label="R" horizontal="true" addons="true">
|
|
19
|
-
<b-input-stub size="is-small" usehtml5validation="true" statusicon="true" value="0" type="number" hascounter="true" customclass="" aria-label="Red"></b-input-stub>
|
|
20
|
-
</b-field-stub>
|
|
21
|
-
<b-field-stub label="G" horizontal="true" addons="true">
|
|
22
|
-
<b-input-stub size="is-small" usehtml5validation="true" statusicon="true" value="0" type="number" hascounter="true" customclass="" aria-label="Green"></b-input-stub>
|
|
23
|
-
</b-field-stub>
|
|
24
|
-
<b-field-stub label="B" horizontal="true" addons="true">
|
|
25
|
-
<b-input-stub size="is-small" usehtml5validation="true" statusicon="true" value="0" type="number" hascounter="true" customclass="" aria-label="Blue"></b-input-stub>
|
|
26
|
-
</b-field-stub>
|
|
27
|
-
</b-field-stub>
|
|
28
|
-
</footer>
|
|
29
|
-
</b-dropdown-item-stub>
|
|
30
|
-
</b-dropdown-stub>
|
|
31
|
-
</div>
|
|
4
|
+
<div class="colorpicker control"><b-dropdown-stub maxheight="200" triggers="click" mobilemodal="true" ariarole="dialog" animation="fade" trapfocus="true" closeonclick="true" canclose="true" appendtobodycopyparent="true" triggertabindex="0"> <b-dropdown-item-stub custom="true" focusable="true" ariarole="" class="">
|
|
5
|
+
<div>
|
|
6
|
+
<header class="colorpicker-header"><!----></header>
|
|
7
|
+
<div class="colorpicker-content"><b-colorpicker-h-s-l-representation-triangle-stub value="#000000" size="200" thickness="20"></b-colorpicker-h-s-l-representation-triangle-stub></div>
|
|
8
|
+
</div>
|
|
9
|
+
<footer class="colorpicker-footer"><!----> <b-field-stub grouped="true" addons="true" class="colorpicker-fields"><b-field-stub label="R" horizontal="true" addons="true"><b-input-stub size="is-small" usehtml5validation="true" statusicon="true" value="0" type="number" hascounter="true" customclass="" aria-label="Red"></b-input-stub></b-field-stub> <b-field-stub label="G" horizontal="true" addons="true"><b-input-stub size="is-small" usehtml5validation="true" statusicon="true" value="0" type="number" hascounter="true" customclass="" aria-label="Green"></b-input-stub></b-field-stub> <b-field-stub label="B" horizontal="true" addons="true"><b-input-stub size="is-small" usehtml5validation="true" statusicon="true" value="0" type="number" hascounter="true" customclass="" aria-label="Blue"></b-input-stub></b-field-stub></b-field-stub></footer>
|
|
10
|
+
</b-dropdown-item-stub></b-dropdown-stub></div>
|
|
32
11
|
`;
|
|
@@ -2,10 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
exports[`BColorpickerAlphaSlider render correctly 1`] = `
|
|
4
4
|
<div class="b-colorpicker-alpha-slider" style="background-size: 100% 100%, 1em 1em, 1em 1em;">
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
</b-tooltip-stub>
|
|
9
|
-
</div>
|
|
5
|
+
<div role="slider" tabindex="0" aria-label="Tranparency" aria-valuemin="0" aria-valuenow="61" aria-valuemax="100" class="alpha-range-thumb" style="left: 61%;"><b-tooltip-stub active="true" type="is-primary" label="61%" position="is-top" triggers="hover" size="is-medium" animated="true" animation="fade" autoclose="true">
|
|
6
|
+
|
|
7
|
+
</b-tooltip-stub></div>
|
|
10
8
|
</div>
|
|
11
9
|
`;
|
package/src/components/colorpicker/__snapshots__/ColorpickerHSLRepresentationSquare.spec.js.snap
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
exports[`BColorpickerHSLRepresentationSquare render correctly 1`] = `
|
|
4
4
|
<div class="b-colorpicker-square" style="width: 200px;">
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
<div class="colorpicker-square-slider-hue">
|
|
6
|
+
<div role="slider" tabindex="0" aria-label="Hue" aria-valuemin="0" aria-valuemax="359" class="hue-range-thumb" style="left: 36.4px; top: 190px; width: 18px;"></div>
|
|
7
|
+
</div>
|
|
8
|
+
<div aria-datascales="lightness, saturation" class="colorpicker-square-slider-sl" style="margin: 20px;">
|
|
9
|
+
<div role="slider" tabindex="0" aria-datavalues="67%, 20%" class="sl-range-thumb" style="left: 67%; top: 80%;"></div>
|
|
10
|
+
</div>
|
|
11
11
|
</div>
|
|
12
12
|
`;
|
package/src/components/colorpicker/__snapshots__/ColorpickerHSLRepresentationTriangle.spec.js.snap
CHANGED
|
@@ -2,35 +2,35 @@
|
|
|
2
2
|
|
|
3
3
|
exports[`BColorpickerHSLRepresentationTriangle render correctly 1`] = `
|
|
4
4
|
<svg viewBox="0 0 200 200" class="b-colorpicker-triangle">
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
</g>
|
|
27
|
-
</g>
|
|
28
|
-
<g role="graphics-datagroup" aria-datascales="lightness, saturation" class="colorpicker-triangle-slider-sl" style="transform: rotate(210deg) translate(50%, 50%);">
|
|
29
|
-
<path d="M0 -78L67.54998149484 39H-67.54998149484z" fill="url(#cp-triangle-gradient-ligthness-0)"></path>
|
|
30
|
-
<path d="M0 -78L67.54998149484 39H-67.54998149484z" fill="url(#cp-triangle-gradient-saturation-0)" style="mix-blend-mode: overlay;"></path>
|
|
31
|
-
<foreignObject x="34.010373654636" y="-44.885000000000005" width="12" height="12">
|
|
32
|
-
<div tabindex="0" aria-datavalues="67%, 20%" class="sl-range-thumb"></div>
|
|
33
|
-
</foreignObject>
|
|
5
|
+
<defs>
|
|
6
|
+
<linearGradient id="cp-triangle-gradient-ligthness-0" x1="0" y1="0" x2="1" y2="0">
|
|
7
|
+
<stop offset="0%" stop-color="#fff"></stop>
|
|
8
|
+
<stop offset="100%" stop-color="#000"></stop>
|
|
9
|
+
</linearGradient>
|
|
10
|
+
<linearGradient id="cp-triangle-gradient-saturation-0" x1="0" y1="0" x2="0" y2="1">
|
|
11
|
+
<stop offset="0%" stop-color="hsl(210deg, 100%, 50%)" stop-opacity="1"></stop>
|
|
12
|
+
<stop offset="100%" stop-color="hsl(210deg, 100%, 50%)" stop-opacity="0"></stop>
|
|
13
|
+
</linearGradient>
|
|
14
|
+
<clipPath id="cp-triangle-clip-0">
|
|
15
|
+
<path d="M2 100a98 98 0 1 1 196 0h-20a-78 78 0 1 0 -156 0a78 78 0 1 0 156 0h20a98 98 0 1 1 -196 0z"></path>
|
|
16
|
+
</clipPath>
|
|
17
|
+
</defs>
|
|
18
|
+
<g class="colorpicker-triangle-slider-hue">
|
|
19
|
+
<foreignObject x="0" y="0" width="200" height="200" clip-path="url(#cp-triangle-clip-0)">
|
|
20
|
+
<div class="colorpicker-triangle-hue"></div>
|
|
21
|
+
</foreignObject>
|
|
22
|
+
<g style="transform: rotate(210deg);">
|
|
23
|
+
<foreignObject x="96" y="0" width="8" height="24">
|
|
24
|
+
<div role="slider" tabindex="0" aria-label="Hue" aria-valuemin="0" aria-valuenow="210" aria-valuemax="360" class="hue-range-thumb"></div>
|
|
25
|
+
</foreignObject>
|
|
34
26
|
</g>
|
|
27
|
+
</g>
|
|
28
|
+
<g role="graphics-datagroup" aria-datascales="lightness, saturation" class="colorpicker-triangle-slider-sl" style="transform: rotate(210deg) translate(50%, 50%);">
|
|
29
|
+
<path d="M0 -78L67.54998149484 39H-67.54998149484z" fill="url(#cp-triangle-gradient-ligthness-0)"></path>
|
|
30
|
+
<path d="M0 -78L67.54998149484 39H-67.54998149484z" fill="url(#cp-triangle-gradient-saturation-0)" style="mix-blend-mode: overlay;"></path>
|
|
31
|
+
<foreignObject x="34.010373654636" y="-44.885000000000005" width="12" height="12">
|
|
32
|
+
<div tabindex="0" aria-datavalues="67%, 20%" class="sl-range-thumb"></div>
|
|
33
|
+
</foreignObject>
|
|
34
|
+
</g>
|
|
35
35
|
</svg>
|
|
36
36
|
`;
|
|
@@ -264,10 +264,17 @@ describe('BDatepicker', () => {
|
|
|
264
264
|
})
|
|
265
265
|
|
|
266
266
|
describe('#dateFormatter', () => {
|
|
267
|
+
beforeEach(() => {
|
|
268
|
+
// uses en-US locale to make outputs predictable
|
|
269
|
+
wrapper.setProps({
|
|
270
|
+
locale: 'en-US'
|
|
271
|
+
})
|
|
272
|
+
})
|
|
273
|
+
|
|
267
274
|
it('should add one to month since month in dates starts from 0', () => {
|
|
268
275
|
const dateToFormat = new Date(2019, 3, 1)
|
|
269
276
|
const formattedDate = wrapper.vm.dateFormatter(dateToFormat, wrapper.vm)
|
|
270
|
-
expect(formattedDate).toEqual('
|
|
277
|
+
expect(formattedDate).toEqual('4/1/2019')
|
|
271
278
|
})
|
|
272
279
|
|
|
273
280
|
it('should format based on 2-digit numeric locale date with type === month', () => {
|
|
@@ -276,7 +283,7 @@ describe('BDatepicker', () => {
|
|
|
276
283
|
})
|
|
277
284
|
const dateToFormat = new Date(2019, 3, 1)
|
|
278
285
|
const formattedDate = wrapper.vm.dateFormatter(dateToFormat, wrapper.vm)
|
|
279
|
-
expect(formattedDate).toEqual('2019
|
|
286
|
+
expect(formattedDate).toEqual('4/2019')
|
|
280
287
|
})
|
|
281
288
|
|
|
282
289
|
it('should format a range of dates passed via array', () => {
|
|
@@ -285,7 +292,7 @@ describe('BDatepicker', () => {
|
|
|
285
292
|
new Date(2019, 3, 3)
|
|
286
293
|
]
|
|
287
294
|
const formattedDate = wrapper.vm.dateFormatter(dateToFormat, wrapper.vm)
|
|
288
|
-
expect(formattedDate).toEqual('
|
|
295
|
+
expect(formattedDate).toEqual('4/1/2019 - 4/3/2019')
|
|
289
296
|
})
|
|
290
297
|
|
|
291
298
|
describe('multiple', () => {
|
|
@@ -305,7 +312,7 @@ describe('BDatepicker', () => {
|
|
|
305
312
|
new Date(2019, 3, 3)
|
|
306
313
|
]
|
|
307
314
|
const formattedDate = wrapper.vm.dateFormatter(dateToFormat, wrapper.vm)
|
|
308
|
-
expect(formattedDate).toEqual('
|
|
315
|
+
expect(formattedDate).toEqual('4/1/2019, 4/13/2019, 4/3/2019')
|
|
309
316
|
})
|
|
310
317
|
|
|
311
318
|
it('react accordingly when setting computedValue', () => {
|
|
@@ -5,12 +5,10 @@ import config, {setOptions} from '@utils/config'
|
|
|
5
5
|
|
|
6
6
|
let wrapper
|
|
7
7
|
|
|
8
|
+
// it used to create a Date in UTC but should use the local timezone,
|
|
9
|
+
// because DatepickerMonth deals with the local timezone
|
|
8
10
|
const newDate = (y, m, d) => {
|
|
9
|
-
|
|
10
|
-
date.getDate = jest.fn(() => date.getUTCDate())
|
|
11
|
-
date.getMonth = jest.fn(() => date.getUTCMonth())
|
|
12
|
-
date.getFullYear = jest.fn(() => date.getUTCFullYear())
|
|
13
|
-
return date
|
|
11
|
+
return new Date(y, m, d)
|
|
14
12
|
}
|
|
15
13
|
|
|
16
14
|
const thisMonth = newDate(2020, 4, 15).getUTCMonth()
|