buefy 0.7.9 → 0.8.2
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 +82 -0
- package/dist/buefy.css +13759 -8263
- package/dist/buefy.js +9073 -14866
- package/dist/buefy.min.css +1 -5
- package/dist/buefy.min.js +2 -2
- package/dist/cjs/autocomplete.js +22 -0
- package/dist/cjs/button.js +106 -0
- package/dist/cjs/checkbox.js +135 -0
- package/dist/cjs/chunk-07fe6fc0.js +247 -0
- package/dist/cjs/chunk-0af453a7.js +105 -0
- package/dist/cjs/chunk-0e89e51b.js +394 -0
- package/dist/cjs/chunk-13e039f5.js +104 -0
- package/dist/cjs/chunk-143d9e6d.js +404 -0
- package/dist/cjs/chunk-19ebd649.js +114 -0
- package/dist/cjs/chunk-1b1231ce.js +94 -0
- package/dist/cjs/chunk-1e6abfcf.js +94 -0
- package/dist/cjs/chunk-28d164b1.js +172 -0
- package/dist/cjs/chunk-3396605d.js +394 -0
- package/dist/cjs/chunk-364a37a0.js +404 -0
- package/dist/cjs/chunk-3b066933.js +103 -0
- package/dist/cjs/chunk-3dffe6e7.js +54 -0
- package/dist/cjs/chunk-4a03b064.js +199 -0
- package/dist/cjs/chunk-50b06939.js +153 -0
- package/dist/cjs/chunk-52623128.js +105 -0
- package/dist/cjs/chunk-53d4f332.js +94 -0
- package/dist/cjs/chunk-544a95da.js +404 -0
- package/dist/cjs/chunk-545f01b1.js +49 -0
- package/dist/cjs/chunk-59b91990.js +64 -0
- package/dist/cjs/chunk-5b2a3329.js +394 -0
- package/dist/cjs/chunk-60061aa8.js +172 -0
- package/dist/cjs/chunk-67658e54.js +404 -0
- package/dist/cjs/chunk-6963026a.js +86 -0
- package/dist/cjs/chunk-6cece6b7.js +140 -0
- package/dist/cjs/chunk-6d6465c1.js +140 -0
- package/dist/cjs/chunk-6e9c0aca.js +94 -0
- package/dist/cjs/chunk-77f69fca.js +106 -0
- package/dist/cjs/chunk-7a25d736.js +114 -0
- package/dist/cjs/chunk-876befa8.js +247 -0
- package/dist/cjs/chunk-8985ffff.js +105 -0
- package/dist/cjs/chunk-8a05c8c9.js +207 -0
- package/dist/cjs/chunk-90407463.js +258 -0
- package/dist/cjs/chunk-956525c9.js +106 -0
- package/dist/cjs/chunk-96ce35a2.js +114 -0
- package/dist/cjs/chunk-9da1d120.js +86 -0
- package/dist/cjs/chunk-9f6a8079.js +54 -0
- package/dist/cjs/chunk-a60dc21d.js +281 -0
- package/dist/cjs/chunk-b628277d.js +199 -0
- package/dist/cjs/chunk-c146745e.js +153 -0
- package/dist/cjs/chunk-c2aec7a9.js +547 -0
- package/dist/cjs/chunk-c9641331.js +86 -0
- package/dist/cjs/chunk-d492406b.js +172 -0
- package/dist/cjs/chunk-e0aa62a0.js +404 -0
- package/dist/cjs/chunk-e45e0329.js +48 -0
- package/dist/cjs/chunk-e5de6583.js +207 -0
- package/dist/cjs/chunk-e85cceb6.js +258 -0
- package/dist/cjs/chunk-ed5addd6.js +547 -0
- package/dist/cjs/chunk-ef4753d5.js +283 -0
- package/dist/cjs/chunk-f0c597f9.js +199 -0
- package/dist/cjs/chunk-f1df1c63.js +9 -0
- package/dist/cjs/chunk-f1ee2f5c.js +207 -0
- package/dist/cjs/chunk-fbd4d545.js +247 -0
- package/dist/cjs/clockpicker.js +447 -0
- package/dist/cjs/collapse.js +102 -0
- package/dist/cjs/datepicker.js +1281 -0
- package/dist/cjs/dialog.js +237 -0
- package/dist/cjs/dropdown.js +19 -0
- package/dist/cjs/field.js +18 -0
- package/dist/cjs/icon.js +17 -0
- package/dist/cjs/index.js +164 -0
- package/dist/cjs/input.js +20 -0
- package/dist/cjs/loading.js +166 -0
- package/dist/cjs/menu.js +231 -0
- package/dist/cjs/message.js +65 -0
- package/dist/cjs/modal.js +48 -0
- package/dist/cjs/navbar.js +258 -0
- package/dist/cjs/notification.js +142 -0
- package/dist/cjs/numberinput.js +191 -0
- package/dist/cjs/pagination.js +19 -0
- package/dist/cjs/progress.js +151 -0
- package/dist/cjs/radio.js +224 -0
- package/dist/cjs/select.js +20 -0
- package/dist/cjs/slider.js +511 -0
- package/dist/cjs/snackbar.js +114 -0
- package/dist/cjs/steps.js +352 -0
- package/dist/cjs/switch.js +144 -0
- package/dist/cjs/table.js +877 -0
- package/dist/cjs/tabs.js +258 -0
- package/dist/cjs/tag.js +63 -0
- package/dist/cjs/taginput.js +297 -0
- package/dist/cjs/timepicker.js +75 -0
- package/dist/cjs/toast.js +89 -0
- package/dist/cjs/tooltip.js +17 -0
- package/dist/cjs/upload.js +210 -0
- package/dist/components/autocomplete/index.js +1084 -2
- package/dist/components/autocomplete/index.min.js +2 -0
- package/dist/components/button/index.js +425 -2
- package/dist/components/button/index.min.js +2 -0
- package/dist/components/checkbox/index.js +342 -2
- package/dist/components/checkbox/index.min.js +2 -0
- package/dist/components/clockpicker/index.js +2340 -2
- package/dist/components/clockpicker/index.min.js +2 -0
- package/dist/components/collapse/index.js +201 -2
- package/dist/components/collapse/index.min.js +2 -0
- package/dist/components/datepicker/index.js +2720 -2
- package/dist/components/datepicker/index.min.js +2 -0
- package/dist/components/dialog/index.js +768 -2
- package/dist/components/dialog/index.min.js +2 -0
- package/dist/components/dropdown/index.js +555 -2
- package/dist/components/dropdown/index.min.js +2 -0
- package/dist/components/field/index.js +447 -2
- package/dist/components/field/index.min.js +2 -0
- package/dist/components/icon/index.js +322 -2
- package/dist/components/icon/index.min.js +2 -0
- package/dist/components/input/index.js +675 -2
- package/dist/components/input/index.min.js +2 -0
- package/dist/components/loading/index.js +282 -2
- package/dist/components/loading/index.min.js +2 -0
- package/dist/components/menu/index.js +550 -2
- package/dist/components/menu/index.min.js +2 -0
- package/dist/components/message/index.js +482 -2
- package/dist/components/message/index.min.js +2 -0
- package/dist/components/modal/index.js +400 -2
- package/dist/components/modal/index.min.js +2 -0
- package/dist/components/navbar/index.js +371 -0
- package/dist/components/navbar/index.min.js +2 -0
- package/dist/components/notification/index.js +705 -2
- package/dist/components/notification/index.min.js +2 -0
- package/dist/components/numberinput/index.js +846 -2
- package/dist/components/numberinput/index.min.js +2 -0
- package/dist/components/pagination/index.js +577 -2
- package/dist/components/pagination/index.min.js +2 -0
- package/dist/components/progress/index.js +250 -0
- package/dist/components/progress/index.min.js +2 -0
- package/dist/components/radio/index.js +323 -2
- package/dist/components/radio/index.min.js +2 -0
- package/dist/components/select/index.js +571 -2
- package/dist/components/select/index.min.js +2 -0
- package/dist/components/slider/index.js +764 -0
- package/dist/components/slider/index.min.js +2 -0
- package/dist/components/snackbar/index.js +397 -2
- package/dist/components/snackbar/index.min.js +2 -0
- package/dist/components/steps/index.js +721 -2
- package/dist/components/steps/index.min.js +2 -0
- package/dist/components/switch/index.js +243 -2
- package/dist/components/switch/index.min.js +2 -0
- package/dist/components/table/index.js +1870 -2
- package/dist/components/table/index.min.js +2 -0
- package/dist/components/tabs/index.js +627 -2
- package/dist/components/tabs/index.min.js +2 -0
- package/dist/components/tag/index.js +262 -2
- package/dist/components/tag/index.min.js +2 -0
- package/dist/components/taginput/index.js +1459 -2
- package/dist/components/taginput/index.min.js +2 -0
- package/dist/components/timepicker/index.js +2053 -2
- package/dist/components/timepicker/index.min.js +2 -0
- package/dist/components/toast/index.js +372 -2
- package/dist/components/toast/index.min.js +2 -0
- package/dist/components/tooltip/index.js +236 -2
- package/dist/components/tooltip/index.min.js +2 -0
- package/dist/components/upload/index.js +501 -2
- package/dist/components/upload/index.min.js +2 -0
- package/dist/esm/autocomplete.js +18 -0
- package/dist/esm/button.js +102 -0
- package/dist/esm/checkbox.js +131 -0
- package/dist/esm/chunk-00e3e67f.js +401 -0
- package/dist/esm/chunk-051f8b06.js +105 -0
- package/dist/esm/chunk-0566c90d.js +152 -0
- package/dist/esm/chunk-07e19446.js +545 -0
- package/dist/esm/chunk-085a700d.js +7 -0
- package/dist/esm/chunk-0ad6938a.js +53 -0
- package/dist/esm/chunk-0e3f4fb5.js +52 -0
- package/dist/esm/chunk-10c85529.js +151 -0
- package/dist/esm/chunk-121b1efa.js +197 -0
- package/dist/esm/chunk-19dad95e.js +256 -0
- package/dist/esm/chunk-231b6066.js +113 -0
- package/dist/esm/chunk-24d1a01f.js +279 -0
- package/dist/esm/chunk-297bff6b.js +393 -0
- package/dist/esm/chunk-2b2ae5c6.js +245 -0
- package/dist/esm/chunk-2cb6f867.js +46 -0
- package/dist/esm/chunk-33717194.js +392 -0
- package/dist/esm/chunk-3b811b77.js +139 -0
- package/dist/esm/chunk-3e47308f.js +104 -0
- package/dist/esm/chunk-411d6eea.js +84 -0
- package/dist/esm/chunk-4535dec5.js +92 -0
- package/dist/esm/chunk-47a5f3a1.js +103 -0
- package/dist/esm/chunk-4a5384da.js +205 -0
- package/dist/esm/chunk-4b663574.js +112 -0
- package/dist/esm/chunk-4d393f09.js +170 -0
- package/dist/esm/chunk-4d695899.js +257 -0
- package/dist/esm/chunk-4f508891.js +171 -0
- package/dist/esm/chunk-531b8274.js +281 -0
- package/dist/esm/chunk-591ee4a2.js +151 -0
- package/dist/esm/chunk-5d3bf82e.js +170 -0
- package/dist/esm/chunk-5e0b0665.js +104 -0
- package/dist/esm/chunk-648b9aa4.js +45 -0
- package/dist/esm/chunk-666940cf.js +546 -0
- package/dist/esm/chunk-67c97e13.js +246 -0
- package/dist/esm/chunk-6844653e.js +401 -0
- package/dist/esm/chunk-699b7cb4.js +245 -0
- package/dist/esm/chunk-6f881e7d.js +51 -0
- package/dist/esm/chunk-7123d158.js +256 -0
- package/dist/esm/chunk-7cf87590.js +60 -0
- package/dist/esm/chunk-823177ac.js +545 -0
- package/dist/esm/chunk-8838757a.js +401 -0
- package/dist/esm/chunk-8ca878c0.js +198 -0
- package/dist/esm/chunk-8fc2e874.js +85 -0
- package/dist/esm/chunk-912ed715.js +92 -0
- package/dist/esm/chunk-92acc21f.js +392 -0
- package/dist/esm/chunk-98e86f40.js +197 -0
- package/dist/esm/chunk-99a1f9df.js +92 -0
- package/dist/esm/chunk-9a776697.js +112 -0
- package/dist/esm/chunk-9e3207cc.js +46 -0
- package/dist/esm/chunk-9ec14e09.js +112 -0
- package/dist/esm/chunk-a5ea70d0.js +205 -0
- package/dist/esm/chunk-ac3f4847.js +138 -0
- package/dist/esm/chunk-b5376f3e.js +92 -0
- package/dist/esm/chunk-b56eb2c8.js +197 -0
- package/dist/esm/chunk-b796d1b2.js +392 -0
- package/dist/esm/chunk-b822a5db.js +205 -0
- package/dist/esm/chunk-b9bdb0e4.js +6 -0
- package/dist/esm/chunk-bfe15983.js +401 -0
- package/dist/esm/chunk-c9039f68.js +104 -0
- package/dist/esm/chunk-cc718c15.js +245 -0
- package/dist/esm/chunk-cca88db8.js +99 -0
- package/dist/esm/chunk-d6200087.js +50 -0
- package/dist/esm/chunk-daeac852.js +138 -0
- package/dist/esm/chunk-db31c548.js +103 -0
- package/dist/esm/chunk-e5568f45.js +84 -0
- package/dist/esm/chunk-e5fce48f.js +59 -0
- package/dist/esm/chunk-e84b4047.js +170 -0
- package/dist/esm/chunk-e8d90b72.js +98 -0
- package/dist/esm/chunk-e932bb68.js +206 -0
- package/dist/esm/chunk-edd8ff91.js +103 -0
- package/dist/esm/chunk-f0465d8d.js +84 -0
- package/dist/esm/chunk-f743d154.js +93 -0
- package/dist/esm/chunk-f8036b32.js +402 -0
- package/dist/esm/chunk-f984748f.js +401 -0
- package/dist/esm/chunk-fd5b0e1e.js +99 -0
- package/dist/esm/clockpicker.js +443 -0
- package/dist/esm/collapse.js +98 -0
- package/dist/esm/datepicker.js +1277 -0
- package/dist/esm/dialog.js +231 -0
- package/dist/esm/dropdown.js +14 -0
- package/dist/esm/field.js +14 -0
- package/dist/esm/icon.js +13 -0
- package/dist/esm/index.js +154 -0
- package/dist/esm/input.js +16 -0
- package/dist/esm/loading.js +159 -0
- package/dist/esm/menu.js +225 -0
- package/dist/esm/message.js +61 -0
- package/dist/esm/modal.js +42 -0
- package/dist/esm/navbar.js +253 -0
- package/dist/esm/notification.js +135 -0
- package/dist/esm/numberinput.js +187 -0
- package/dist/esm/pagination.js +15 -0
- package/dist/esm/progress.js +147 -0
- package/dist/esm/radio.js +219 -0
- package/dist/esm/select.js +16 -0
- package/dist/esm/slider.js +506 -0
- package/dist/esm/snackbar.js +108 -0
- package/dist/esm/steps.js +347 -0
- package/dist/esm/switch.js +140 -0
- package/dist/esm/table.js +872 -0
- package/dist/esm/tabs.js +253 -0
- package/dist/esm/tag.js +59 -0
- package/dist/esm/taginput.js +293 -0
- package/dist/esm/timepicker.js +71 -0
- package/dist/esm/toast.js +83 -0
- package/dist/esm/tooltip.js +13 -0
- package/dist/esm/upload.js +206 -0
- package/package.json +26 -4
- package/src/components/checkbox/Checkbox.vue +12 -4
- package/src/components/checkbox/CheckboxButton.vue +10 -2
- package/src/components/clockpicker/Clockpicker.vue +0 -5
- package/src/components/datepicker/Datepicker.spec.js +60 -0
- package/src/components/datepicker/Datepicker.vue +46 -19
- package/src/components/datepicker/DatepickerTable.spec.js +107 -2
- package/src/components/datepicker/DatepickerTable.vue +73 -4
- package/src/components/datepicker/DatepickerTableRow.spec.js +127 -17
- package/src/components/datepicker/DatepickerTableRow.vue +103 -4
- package/src/components/dialog/Dialog.vue +5 -3
- package/src/components/dialog/index.js +2 -2
- package/src/components/dropdown/Dropdown.vue +1 -4
- package/src/components/dropdown/DropdownItem.vue +7 -3
- package/src/components/field/Field.spec.js +18 -0
- package/src/components/field/Field.vue +21 -2
- package/src/components/index.js +6 -0
- package/src/components/input/Input.vue +2 -2
- package/src/components/loading/index.js +1 -1
- package/src/components/modal/index.js +1 -1
- package/src/components/navbar/NavBar.spec.js +76 -0
- package/src/components/navbar/Navbar.vue +127 -0
- package/src/components/navbar/NavbarBurger.vue +25 -0
- package/src/components/navbar/NavbarItem.vue +21 -0
- package/src/components/navbar/index.js +20 -0
- package/src/components/notification/index.js +1 -1
- package/src/components/pagination/Pagination.vue +28 -6
- package/src/components/progress/Progress.spec.js +77 -0
- package/src/components/progress/Progress.vue +108 -0
- package/src/components/progress/__snapshots__/Progress.spec.js.snap +7 -0
- package/src/components/progress/index.js +17 -0
- package/src/components/radio/Radio.spec.js +18 -1
- package/src/components/radio/Radio.vue +11 -5
- package/src/components/radio/RadioButton.spec.js +18 -1
- package/src/components/radio/RadioButton.vue +20 -8
- package/src/components/select/Select.spec.js +22 -1
- package/src/components/select/Select.vue +2 -1
- package/src/components/select/__snapshots__/Select.spec.js.snap +7 -0
- package/src/components/slider/Slider.spec.js +10 -0
- package/src/components/slider/Slider.vue +240 -0
- package/src/components/slider/SliderThumb.vue +188 -0
- package/src/components/slider/SliderTick.vue +43 -0
- package/src/components/slider/index.js +20 -0
- package/src/components/snackbar/index.js +2 -2
- package/src/components/steps/StepItem.vue +2 -3
- package/src/components/steps/Steps.vue +7 -5
- package/src/components/switch/Switch.spec.js +29 -0
- package/src/components/switch/Switch.vue +29 -5
- package/src/components/switch/__snapshots__/Switch.spec.js.snap +3 -0
- package/src/components/table/Table.vue +30 -8
- package/src/components/table/TableColumn.vue +2 -2
- package/src/components/tag/Tag.vue +4 -1
- package/src/components/taginput/Taginput.spec.js +10 -0
- package/src/components/taginput/Taginput.vue +8 -3
- package/src/components/toast/index.js +2 -2
- package/src/components/tooltip/Tooltip.vue +5 -5
- package/src/components/upload/Upload.vue +15 -8
- package/src/index.js +11 -4
- package/src/scss/buefy-build.scss +3 -3
- package/src/scss/buefy.scss +4 -0
- package/src/scss/components/_datepicker.scss +40 -1
- package/src/scss/components/_form.scss +52 -1
- package/src/scss/components/_progress.scss +45 -0
- package/src/scss/components/_radio.scss +14 -14
- package/src/scss/components/_slider.scss +138 -0
- package/src/scss/components/_steps.scss +4 -4
- package/src/scss/components/_switch.scss +54 -2
- package/src/scss/components/_taginput.scss +3 -0
- package/src/scss/components/_upload.scss +1 -3
- package/src/utils/SlotComponent.js +9 -2
- package/src/utils/TimepickerMixin.js +17 -6
- package/src/utils/config.js +4 -1
- package/src/utils/helpers.spec.js +67 -0
- package/src/utils/plugins.js +2 -1
- package/types/components.d.ts +3 -3
- package/types/index.d.ts +24 -11
- package/dist/components/index.js +0 -2
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import './chunk-e5fce48f.js';
|
|
2
|
+
import { c as config } from './chunk-9e3207cc.js';
|
|
3
|
+
import { _ as __vue_normalize__, a as registerComponentProgrammatic, u as use } from './chunk-cca88db8.js';
|
|
4
|
+
import Vue from 'vue';
|
|
5
|
+
import { N as NoticeMixin } from './chunk-daeac852.js';
|
|
6
|
+
|
|
7
|
+
//
|
|
8
|
+
var script = {
|
|
9
|
+
name: 'BToast',
|
|
10
|
+
mixins: [NoticeMixin],
|
|
11
|
+
data: function data() {
|
|
12
|
+
return {
|
|
13
|
+
newDuration: this.duration || config.defaultToastDuration
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
/* script */
|
|
19
|
+
const __vue_script__ = script;
|
|
20
|
+
|
|
21
|
+
/* template */
|
|
22
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('transition',{attrs:{"enter-active-class":_vm.transition.enter,"leave-active-class":_vm.transition.leave}},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.isActive),expression:"isActive"}],staticClass:"toast",class:[_vm.type, _vm.position],attrs:{"aria-hidden":!_vm.isActive,"role":"alert"}},[_c('div',{domProps:{"innerHTML":_vm._s(_vm.message)}})])])};
|
|
23
|
+
var __vue_staticRenderFns__ = [];
|
|
24
|
+
|
|
25
|
+
/* style */
|
|
26
|
+
const __vue_inject_styles__ = undefined;
|
|
27
|
+
/* scoped */
|
|
28
|
+
const __vue_scope_id__ = undefined;
|
|
29
|
+
/* module identifier */
|
|
30
|
+
const __vue_module_identifier__ = undefined;
|
|
31
|
+
/* functional template */
|
|
32
|
+
const __vue_is_functional_template__ = false;
|
|
33
|
+
/* style inject */
|
|
34
|
+
|
|
35
|
+
/* style inject SSR */
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
var Toast = __vue_normalize__(
|
|
40
|
+
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
|
|
41
|
+
__vue_inject_styles__,
|
|
42
|
+
__vue_script__,
|
|
43
|
+
__vue_scope_id__,
|
|
44
|
+
__vue_is_functional_template__,
|
|
45
|
+
__vue_module_identifier__,
|
|
46
|
+
undefined,
|
|
47
|
+
undefined
|
|
48
|
+
);
|
|
49
|
+
|
|
50
|
+
var ToastProgrammatic = {
|
|
51
|
+
open: function open(params) {
|
|
52
|
+
var message;
|
|
53
|
+
var parent;
|
|
54
|
+
if (typeof params === 'string') message = params;
|
|
55
|
+
var defaultParam = {
|
|
56
|
+
message: message,
|
|
57
|
+
position: config.defaultToastPosition || 'is-top'
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
if (params.parent) {
|
|
61
|
+
parent = params.parent;
|
|
62
|
+
delete params.parent;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
var propsData = Object.assign(defaultParam, params);
|
|
66
|
+
var vm = typeof window !== 'undefined' && window.Vue ? window.Vue : Vue;
|
|
67
|
+
var ToastComponent = vm.extend(Toast);
|
|
68
|
+
return new ToastComponent({
|
|
69
|
+
parent: parent,
|
|
70
|
+
el: document.createElement('div'),
|
|
71
|
+
propsData: propsData
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
var Plugin = {
|
|
76
|
+
install: function install(Vue) {
|
|
77
|
+
registerComponentProgrammatic(Vue, 'toast', ToastProgrammatic);
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
use(Plugin);
|
|
81
|
+
|
|
82
|
+
export default Plugin;
|
|
83
|
+
export { ToastProgrammatic };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import './chunk-9e3207cc.js';
|
|
2
|
+
import { r as registerComponent, u as use } from './chunk-cca88db8.js';
|
|
3
|
+
import { T as Tooltip } from './chunk-411d6eea.js';
|
|
4
|
+
export { T as Tooltip } from './chunk-411d6eea.js';
|
|
5
|
+
|
|
6
|
+
var Plugin = {
|
|
7
|
+
install: function install(Vue) {
|
|
8
|
+
registerComponent(Vue, Tooltip);
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
use(Plugin);
|
|
12
|
+
|
|
13
|
+
export default Plugin;
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import './chunk-9e3207cc.js';
|
|
2
|
+
import { F as FormElementMixin } from './chunk-10c85529.js';
|
|
3
|
+
import { _ as __vue_normalize__, r as registerComponent, u as use } from './chunk-cca88db8.js';
|
|
4
|
+
import { F as File } from './chunk-b9bdb0e4.js';
|
|
5
|
+
|
|
6
|
+
//
|
|
7
|
+
var script = {
|
|
8
|
+
name: 'BUpload',
|
|
9
|
+
mixins: [FormElementMixin],
|
|
10
|
+
inheritAttrs: false,
|
|
11
|
+
props: {
|
|
12
|
+
value: {
|
|
13
|
+
type: [Object, Function, File, Array]
|
|
14
|
+
},
|
|
15
|
+
multiple: Boolean,
|
|
16
|
+
disabled: Boolean,
|
|
17
|
+
accept: String,
|
|
18
|
+
dragDrop: Boolean,
|
|
19
|
+
type: {
|
|
20
|
+
type: String,
|
|
21
|
+
default: 'is-primary'
|
|
22
|
+
},
|
|
23
|
+
native: {
|
|
24
|
+
type: Boolean,
|
|
25
|
+
default: false
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
data: function data() {
|
|
29
|
+
return {
|
|
30
|
+
newValue: this.value,
|
|
31
|
+
dragDropFocus: false,
|
|
32
|
+
_elementRef: 'input'
|
|
33
|
+
};
|
|
34
|
+
},
|
|
35
|
+
watch: {
|
|
36
|
+
/**
|
|
37
|
+
* When v-model is changed:
|
|
38
|
+
* 1. Get value from input file
|
|
39
|
+
* 2. Set internal value.
|
|
40
|
+
* 3. Reset input value if array is empty or when input file is not found in newValue
|
|
41
|
+
* 4. If it's invalid, validate again.
|
|
42
|
+
*/
|
|
43
|
+
value: function value(_value) {
|
|
44
|
+
var inputFiles = this.$refs.input.files;
|
|
45
|
+
this.newValue = _value;
|
|
46
|
+
|
|
47
|
+
if (!this.newValue || Array.isArray(this.newValue) && this.newValue.length === 0 || !inputFiles[0] || Array.isArray(this.newValue) && !this.newValue.some(function (a) {
|
|
48
|
+
return a.name === inputFiles[0].name;
|
|
49
|
+
})) {
|
|
50
|
+
this.$refs.input.value = null;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
!this.isValid && !this.dragDrop && this.checkHtml5Validity();
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
methods: {
|
|
57
|
+
/**
|
|
58
|
+
* Listen change event on input type 'file',
|
|
59
|
+
* emit 'input' event and validate
|
|
60
|
+
*/
|
|
61
|
+
onFileChange: function onFileChange(event) {
|
|
62
|
+
if (this.disabled || this.loading) return;
|
|
63
|
+
|
|
64
|
+
if (this.dragDrop) {
|
|
65
|
+
this.updateDragDropFocus(false);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
var value = event.target.files || event.dataTransfer.files;
|
|
69
|
+
|
|
70
|
+
if (value.length === 0) {
|
|
71
|
+
if (!this.newValue) {
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
if (this.native) {
|
|
76
|
+
this.newValue = null;
|
|
77
|
+
}
|
|
78
|
+
} else if (!this.multiple) {
|
|
79
|
+
// only one element in case drag drop mode and isn't multiple
|
|
80
|
+
if (this.dragDrop && value.length !== 1) return;else {
|
|
81
|
+
var file = value[0];
|
|
82
|
+
|
|
83
|
+
if (this.checkType(file)) {
|
|
84
|
+
this.newValue = file;
|
|
85
|
+
} else if (this.newValue) {
|
|
86
|
+
this.newValue = null;
|
|
87
|
+
} else {
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
} else {
|
|
92
|
+
// always new values if native or undefined local
|
|
93
|
+
var newValues = false;
|
|
94
|
+
|
|
95
|
+
if (this.native || !this.newValue) {
|
|
96
|
+
this.newValue = [];
|
|
97
|
+
newValues = true;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
for (var i = 0; i < value.length; i++) {
|
|
101
|
+
var _file = value[i];
|
|
102
|
+
|
|
103
|
+
if (this.checkType(_file)) {
|
|
104
|
+
this.newValue.push(_file);
|
|
105
|
+
newValues = true;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
if (!newValues) {
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
this.$emit('input', this.newValue);
|
|
115
|
+
!this.dragDrop && this.checkHtml5Validity();
|
|
116
|
+
},
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Listen drag-drop to update internal variable
|
|
120
|
+
*/
|
|
121
|
+
updateDragDropFocus: function updateDragDropFocus(focus) {
|
|
122
|
+
if (!this.disabled && !this.loading) {
|
|
123
|
+
this.dragDropFocus = focus;
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Check mime type of file
|
|
129
|
+
*/
|
|
130
|
+
checkType: function checkType(file) {
|
|
131
|
+
if (!this.accept) return true;
|
|
132
|
+
var types = this.accept.split(',');
|
|
133
|
+
if (types.length === 0) return true;
|
|
134
|
+
var valid = false;
|
|
135
|
+
|
|
136
|
+
for (var i = 0; i < types.length && !valid; i++) {
|
|
137
|
+
var type = types[i].trim();
|
|
138
|
+
|
|
139
|
+
if (type) {
|
|
140
|
+
if (type.substring(0, 1) === '.') {
|
|
141
|
+
// check extension
|
|
142
|
+
var extIndex = file.name.lastIndexOf('.');
|
|
143
|
+
var extension = extIndex >= 0 ? file.name.substring(extIndex) : '';
|
|
144
|
+
|
|
145
|
+
if (extension.toLowerCase() === type.toLowerCase()) {
|
|
146
|
+
valid = true;
|
|
147
|
+
}
|
|
148
|
+
} else {
|
|
149
|
+
// check mime type
|
|
150
|
+
if (file.type.match(type)) {
|
|
151
|
+
valid = true;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
return valid;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
/* script */
|
|
163
|
+
const __vue_script__ = script;
|
|
164
|
+
|
|
165
|
+
/* template */
|
|
166
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('label',{staticClass:"upload control"},[(!_vm.dragDrop)?[_vm._t("default")]:_c('div',{staticClass:"upload-draggable",class:[_vm.type, {
|
|
167
|
+
'is-loading': _vm.loading,
|
|
168
|
+
'is-disabled': _vm.disabled,
|
|
169
|
+
'is-hovered': _vm.dragDropFocus
|
|
170
|
+
}],on:{"dragover":function($event){$event.preventDefault();_vm.updateDragDropFocus(true);},"dragleave":function($event){$event.preventDefault();_vm.updateDragDropFocus(false);},"dragenter":function($event){$event.preventDefault();_vm.updateDragDropFocus(true);},"drop":function($event){$event.preventDefault();_vm.onFileChange($event);}}},[_vm._t("default")],2),_vm._v(" "),_c('input',_vm._b({ref:"input",attrs:{"type":"file","multiple":_vm.multiple,"accept":_vm.accept,"disabled":_vm.disabled},on:{"change":_vm.onFileChange}},'input',_vm.$attrs,false))],2)};
|
|
171
|
+
var __vue_staticRenderFns__ = [];
|
|
172
|
+
|
|
173
|
+
/* style */
|
|
174
|
+
const __vue_inject_styles__ = undefined;
|
|
175
|
+
/* scoped */
|
|
176
|
+
const __vue_scope_id__ = undefined;
|
|
177
|
+
/* module identifier */
|
|
178
|
+
const __vue_module_identifier__ = undefined;
|
|
179
|
+
/* functional template */
|
|
180
|
+
const __vue_is_functional_template__ = false;
|
|
181
|
+
/* style inject */
|
|
182
|
+
|
|
183
|
+
/* style inject SSR */
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
var Upload = __vue_normalize__(
|
|
188
|
+
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
|
|
189
|
+
__vue_inject_styles__,
|
|
190
|
+
__vue_script__,
|
|
191
|
+
__vue_scope_id__,
|
|
192
|
+
__vue_is_functional_template__,
|
|
193
|
+
__vue_module_identifier__,
|
|
194
|
+
undefined,
|
|
195
|
+
undefined
|
|
196
|
+
);
|
|
197
|
+
|
|
198
|
+
var Plugin = {
|
|
199
|
+
install: function install(Vue) {
|
|
200
|
+
registerComponent(Vue, Upload);
|
|
201
|
+
}
|
|
202
|
+
};
|
|
203
|
+
use(Plugin);
|
|
204
|
+
|
|
205
|
+
export default Plugin;
|
|
206
|
+
export { Upload };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "buefy",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.2",
|
|
4
4
|
"homepage": "https://buefy.org",
|
|
5
5
|
"description": "Lightweight UI components for Vue.js based on Bulma",
|
|
6
6
|
"author": "Rafael Beraldo <rafael.pimpa@gmail.com>",
|
|
@@ -8,9 +8,14 @@
|
|
|
8
8
|
"Walter Tommasi <tommsi20@gmail.com>"
|
|
9
9
|
],
|
|
10
10
|
"license": "MIT",
|
|
11
|
-
"main": "dist/
|
|
11
|
+
"main": "dist/cjs/index.js",
|
|
12
|
+
"module": "dist/esm/index.js",
|
|
12
13
|
"unpkg": "dist/buefy.min.js",
|
|
13
14
|
"typings": "types/index.d.ts",
|
|
15
|
+
"sideEffects": [
|
|
16
|
+
"*.css",
|
|
17
|
+
"*.scss"
|
|
18
|
+
],
|
|
14
19
|
"files": [
|
|
15
20
|
"dist",
|
|
16
21
|
"src",
|
|
@@ -32,7 +37,12 @@
|
|
|
32
37
|
"unit": "jest",
|
|
33
38
|
"test": "npm run lint && npm run unit",
|
|
34
39
|
"test:watch": "npm run unit -- --watchAll",
|
|
35
|
-
"build:
|
|
40
|
+
"build:js": "rollup -c && rollup -c --environment MINIFY",
|
|
41
|
+
"build:js:watch": "rollup -c --watch",
|
|
42
|
+
"build:scss": "node-sass --output-style expanded src/scss/buefy-build.scss | node ./build/banner.js > dist/buefy.css && cleancss -o dist/buefy.min.css dist/buefy.css",
|
|
43
|
+
"build:scss:watch": "node-sass src/scss/buefy-build.scss --w",
|
|
44
|
+
"build:lib": "npm run build:js && npm run build:scss",
|
|
45
|
+
"build:lib:watch": "concurrently \"npm run build:js:watch\" \"npm run build:scss:watch \" ",
|
|
36
46
|
"build:docs": "node build/build.js",
|
|
37
47
|
"build": "npm run build:lib && npm run build:docs",
|
|
38
48
|
"cov": "./node_modules/codcov/bin/codcov"
|
|
@@ -51,11 +61,14 @@
|
|
|
51
61
|
"vue": "^2.5.13"
|
|
52
62
|
},
|
|
53
63
|
"devDependencies": {
|
|
64
|
+
"@babel/core": "^7.3.4",
|
|
65
|
+
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
|
|
66
|
+
"@babel/preset-env": "^7.3.4",
|
|
54
67
|
"@fortawesome/fontawesome-free": "5.3.1",
|
|
55
68
|
"@mdi/font": "2.7.94",
|
|
56
69
|
"@vue/test-utils": "^1.0.0-beta.25",
|
|
57
70
|
"autoprefixer": "7.1.1",
|
|
58
|
-
"axios": "0.
|
|
71
|
+
"axios": "0.18.1",
|
|
59
72
|
"babel-core": "6.25.0",
|
|
60
73
|
"babel-eslint": "7.1.1",
|
|
61
74
|
"babel-jest": "22.1.0",
|
|
@@ -65,6 +78,7 @@
|
|
|
65
78
|
"babel-preset-stage-2": "6.22.0",
|
|
66
79
|
"babel-register": "6.22.0",
|
|
67
80
|
"chalk": "1.1.3",
|
|
81
|
+
"clean-css-cli": "4.3.0",
|
|
68
82
|
"cleave.js": "1.0.1",
|
|
69
83
|
"clipboard": "1.7.1",
|
|
70
84
|
"codecov": "3.0.0",
|
|
@@ -96,6 +110,14 @@
|
|
|
96
110
|
"prerender-spa-plugin": "3.2.1",
|
|
97
111
|
"raw-loader": "0.5.1",
|
|
98
112
|
"rimraf": "2.6.0",
|
|
113
|
+
"rollup": "1.17.0",
|
|
114
|
+
"rollup-copy-plugin": "0.1.0",
|
|
115
|
+
"rollup-plugin-babel": "4.3.2",
|
|
116
|
+
"rollup-plugin-commonjs": "9.2.1",
|
|
117
|
+
"rollup-plugin-node-resolve": "4.0.1",
|
|
118
|
+
"rollup-plugin-replace": "2.1.0",
|
|
119
|
+
"rollup-plugin-terser": "4.0.4",
|
|
120
|
+
"rollup-plugin-vue": "5.0.0",
|
|
99
121
|
"sass-loader": "6.0.6",
|
|
100
122
|
"scrollreveal": "3.3.6",
|
|
101
123
|
"semver": "5.3.0",
|
|
@@ -4,11 +4,13 @@
|
|
|
4
4
|
:class="[size, { 'is-disabled': disabled }]"
|
|
5
5
|
ref="label"
|
|
6
6
|
:disabled="disabled"
|
|
7
|
+
@click="focus"
|
|
7
8
|
@keydown.prevent.enter="$refs.label.click()">
|
|
8
9
|
<input
|
|
9
10
|
v-model="computedValue"
|
|
10
11
|
:indeterminate.prop="indeterminate"
|
|
11
12
|
type="checkbox"
|
|
13
|
+
ref="input"
|
|
12
14
|
@click.stop
|
|
13
15
|
:disabled="disabled"
|
|
14
16
|
:required="required"
|
|
@@ -25,8 +27,8 @@
|
|
|
25
27
|
export default {
|
|
26
28
|
name: 'BCheckbox',
|
|
27
29
|
props: {
|
|
28
|
-
value: [String, Number, Boolean, Function, Object, Array
|
|
29
|
-
nativeValue: [String, Number, Boolean, Function, Object, Array
|
|
30
|
+
value: [String, Number, Boolean, Function, Object, Array],
|
|
31
|
+
nativeValue: [String, Number, Boolean, Function, Object, Array],
|
|
30
32
|
indeterminate: Boolean,
|
|
31
33
|
type: String,
|
|
32
34
|
disabled: Boolean,
|
|
@@ -34,11 +36,11 @@ export default {
|
|
|
34
36
|
name: String,
|
|
35
37
|
size: String,
|
|
36
38
|
trueValue: {
|
|
37
|
-
type: [String, Number, Boolean, Function, Object, Array
|
|
39
|
+
type: [String, Number, Boolean, Function, Object, Array],
|
|
38
40
|
default: true
|
|
39
41
|
},
|
|
40
42
|
falseValue: {
|
|
41
|
-
type: [String, Number, Boolean, Function, Object, Array
|
|
43
|
+
type: [String, Number, Boolean, Function, Object, Array],
|
|
42
44
|
default: false
|
|
43
45
|
}
|
|
44
46
|
},
|
|
@@ -65,6 +67,12 @@ export default {
|
|
|
65
67
|
value(value) {
|
|
66
68
|
this.newValue = value
|
|
67
69
|
}
|
|
70
|
+
},
|
|
71
|
+
methods: {
|
|
72
|
+
focus() {
|
|
73
|
+
// MacOS FireFox and Safari do not focus when clicked
|
|
74
|
+
this.$refs.input.focus()
|
|
75
|
+
}
|
|
68
76
|
}
|
|
69
77
|
}
|
|
70
78
|
</script>
|
|
@@ -8,11 +8,13 @@
|
|
|
8
8
|
'is-focused': isFocused
|
|
9
9
|
}]"
|
|
10
10
|
:disabled="disabled"
|
|
11
|
+
@click="focus"
|
|
11
12
|
@keydown.prevent.enter="$refs.label.click()">
|
|
12
13
|
<slot/>
|
|
13
14
|
<input
|
|
14
15
|
v-model="computedValue"
|
|
15
16
|
type="checkbox"
|
|
17
|
+
ref="input"
|
|
16
18
|
@click.stop
|
|
17
19
|
:disabled="disabled"
|
|
18
20
|
:required="required"
|
|
@@ -28,8 +30,8 @@
|
|
|
28
30
|
export default {
|
|
29
31
|
name: 'BCheckboxButton',
|
|
30
32
|
props: {
|
|
31
|
-
value: [String, Number, Boolean, Function, Object, Array
|
|
32
|
-
nativeValue: [String, Number, Boolean, Function, Object, Array
|
|
33
|
+
value: [String, Number, Boolean, Function, Object, Array],
|
|
34
|
+
nativeValue: [String, Number, Boolean, Function, Object, Array],
|
|
33
35
|
disabled: Boolean,
|
|
34
36
|
required: Boolean,
|
|
35
37
|
name: String,
|
|
@@ -69,6 +71,12 @@ export default {
|
|
|
69
71
|
value(value) {
|
|
70
72
|
this.newValue = value
|
|
71
73
|
}
|
|
74
|
+
},
|
|
75
|
+
methods: {
|
|
76
|
+
focus() {
|
|
77
|
+
// MacOS FireFox and Safari do not focus when clicked
|
|
78
|
+
this.$refs.input.focus()
|
|
79
|
+
}
|
|
72
80
|
}
|
|
73
81
|
}
|
|
74
82
|
</script>
|
|
@@ -203,11 +203,6 @@ export default {
|
|
|
203
203
|
? (!this.isHourFormat24 && this.meridienSelected === this.AM ? 11 : 23)
|
|
204
204
|
: 59
|
|
205
205
|
},
|
|
206
|
-
faceFormatter() {
|
|
207
|
-
return this.isSelectingHour && !this.isHourFormat24
|
|
208
|
-
? (val) => val
|
|
209
|
-
: this.formatNumber
|
|
210
|
-
},
|
|
211
206
|
faceSize() {
|
|
212
207
|
return this.pickerSize - (outerPadding * 2)
|
|
213
208
|
},
|
|
@@ -90,4 +90,64 @@ describe('BDatepicker', () => {
|
|
|
90
90
|
window.document.dispatchEvent(keyupEvent)
|
|
91
91
|
wrapper.vm.$nextTick(() => expect($dropdown.isVisible()).toBeFalsy())
|
|
92
92
|
})
|
|
93
|
+
|
|
94
|
+
describe('#dateFormatter', () => {
|
|
95
|
+
it('should add one to month since month in dates starts from 0', () => {
|
|
96
|
+
const dateToFormat = new Date(2019, 3, 1)
|
|
97
|
+
const formattedDate = wrapper.vm.dateFormatter(dateToFormat, wrapper.vm)
|
|
98
|
+
expect(formattedDate).toEqual('2019-4-1')
|
|
99
|
+
})
|
|
100
|
+
|
|
101
|
+
it('should format based on 2-digit numeric locale date with type === month', () => {
|
|
102
|
+
wrapper.setProps({
|
|
103
|
+
type: 'month'
|
|
104
|
+
})
|
|
105
|
+
const dateToFormat = new Date(2019, 3, 1)
|
|
106
|
+
const formattedDate = wrapper.vm.dateFormatter(dateToFormat, wrapper.vm)
|
|
107
|
+
expect(formattedDate).toEqual('2019-04')
|
|
108
|
+
})
|
|
109
|
+
|
|
110
|
+
it('should format a range of dates passed via array', () => {
|
|
111
|
+
const dateToFormat = [
|
|
112
|
+
new Date(2019, 3, 1),
|
|
113
|
+
new Date(2019, 3, 3)
|
|
114
|
+
]
|
|
115
|
+
const formattedDate = wrapper.vm.dateFormatter(dateToFormat, wrapper.vm)
|
|
116
|
+
expect(formattedDate).toEqual('2019-4-1 - 2019-4-3')
|
|
117
|
+
})
|
|
118
|
+
})
|
|
119
|
+
|
|
120
|
+
describe('#formatValue', () => {
|
|
121
|
+
it('should call dateFormatter, passing the date', () => {
|
|
122
|
+
const mockDateFormatter = jest.fn()
|
|
123
|
+
wrapper.setProps({
|
|
124
|
+
dateFormatter: mockDateFormatter
|
|
125
|
+
})
|
|
126
|
+
const date = new Date()
|
|
127
|
+
wrapper.vm.formatValue(date)
|
|
128
|
+
expect(mockDateFormatter.mock.calls[0][0]).toEqual(date)
|
|
129
|
+
})
|
|
130
|
+
|
|
131
|
+
it('should not call dateFormatter when value is undefined or NaN', () => {
|
|
132
|
+
const mockDateFormatter = jest.fn()
|
|
133
|
+
wrapper.setProps({
|
|
134
|
+
dateFormatter: mockDateFormatter
|
|
135
|
+
})
|
|
136
|
+
wrapper.vm.formatValue(undefined)
|
|
137
|
+
expect(mockDateFormatter.mock.calls.length).toEqual(0)
|
|
138
|
+
wrapper.vm.formatValue('buefy')
|
|
139
|
+
expect(mockDateFormatter.mock.calls.length).toEqual(0)
|
|
140
|
+
})
|
|
141
|
+
|
|
142
|
+
it('should not call dateFormatter when value is an array with undefined or NaN elements', () => {
|
|
143
|
+
const mockDateFormatter = jest.fn()
|
|
144
|
+
wrapper.setProps({
|
|
145
|
+
dateFormatter: mockDateFormatter
|
|
146
|
+
})
|
|
147
|
+
wrapper.vm.formatValue([new Date(), undefined])
|
|
148
|
+
expect(mockDateFormatter.mock.calls.length).toEqual(0)
|
|
149
|
+
wrapper.vm.formatValue([new Date(), 'buefy'])
|
|
150
|
+
expect(mockDateFormatter.mock.calls.length).toEqual(0)
|
|
151
|
+
})
|
|
152
|
+
})
|
|
93
153
|
})
|