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,170 @@
|
|
|
1
|
+
import { c as config } from './chunk-648b9aa4.js';
|
|
2
|
+
import { _ as __vue_normalize__ } from './chunk-cca88db8.js';
|
|
3
|
+
|
|
4
|
+
//
|
|
5
|
+
var script = {
|
|
6
|
+
name: 'BIcon',
|
|
7
|
+
props: {
|
|
8
|
+
type: [String, Object],
|
|
9
|
+
pack: String,
|
|
10
|
+
icon: String,
|
|
11
|
+
size: String,
|
|
12
|
+
customSize: String,
|
|
13
|
+
customClass: String,
|
|
14
|
+
both: Boolean // This is used internally to show both MDI and FA icon
|
|
15
|
+
|
|
16
|
+
},
|
|
17
|
+
computed: {
|
|
18
|
+
/**
|
|
19
|
+
* Internal icon name based on the pack.
|
|
20
|
+
* If pack is 'fa', gets the equivalent FA icon name of the MDI,
|
|
21
|
+
* internal icons are always MDI.
|
|
22
|
+
*/
|
|
23
|
+
newIcon: function newIcon() {
|
|
24
|
+
return this.newPack === 'mdi' ? "".concat(this.newPack, "-").concat(this.icon) : this.addFAPrefix(this.getEquivalentIconOf(this.icon));
|
|
25
|
+
},
|
|
26
|
+
newPack: function newPack() {
|
|
27
|
+
return this.pack || config.defaultIconPack;
|
|
28
|
+
},
|
|
29
|
+
newType: function newType() {
|
|
30
|
+
if (!this.type) return;
|
|
31
|
+
var splitType = [];
|
|
32
|
+
|
|
33
|
+
if (typeof this.type === 'string') {
|
|
34
|
+
splitType = this.type.split('-');
|
|
35
|
+
} else {
|
|
36
|
+
for (var key in this.type) {
|
|
37
|
+
if (this.type[key]) {
|
|
38
|
+
splitType = key.split('-');
|
|
39
|
+
break;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
if (splitType.length <= 1) return;
|
|
45
|
+
return "has-text-".concat(splitType[1]);
|
|
46
|
+
},
|
|
47
|
+
newCustomSize: function newCustomSize() {
|
|
48
|
+
return this.customSize || this.customSizeByPack;
|
|
49
|
+
},
|
|
50
|
+
customSizeByPack: function customSizeByPack() {
|
|
51
|
+
var defaultSize = this.newPack === 'mdi' ? 'mdi-24px' : this.addFAPrefix('lg');
|
|
52
|
+
var mediumSize = this.newPack === 'mdi' ? 'mdi-36px' : this.addFAPrefix('2x');
|
|
53
|
+
var largeSize = this.newPack === 'mdi' ? 'mdi-48px' : this.addFAPrefix('3x');
|
|
54
|
+
|
|
55
|
+
switch (this.size) {
|
|
56
|
+
case 'is-small':
|
|
57
|
+
return;
|
|
58
|
+
|
|
59
|
+
case 'is-medium':
|
|
60
|
+
return mediumSize;
|
|
61
|
+
|
|
62
|
+
case 'is-large':
|
|
63
|
+
return largeSize;
|
|
64
|
+
|
|
65
|
+
default:
|
|
66
|
+
return defaultSize;
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
useIconComponent: function useIconComponent() {
|
|
70
|
+
return config.defaultIconComponent;
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
methods: {
|
|
74
|
+
addFAPrefix: function addFAPrefix(value) {
|
|
75
|
+
if (this.useIconComponent) {
|
|
76
|
+
return value;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
return "fa-".concat(value);
|
|
80
|
+
},
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Equivalent FA icon name of the MDI.
|
|
84
|
+
*/
|
|
85
|
+
getEquivalentIconOf: function getEquivalentIconOf(value) {
|
|
86
|
+
// Only transform the class if the both prop is set to true
|
|
87
|
+
if (!this.both) {
|
|
88
|
+
return value;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
switch (value) {
|
|
92
|
+
case 'check':
|
|
93
|
+
return 'check';
|
|
94
|
+
|
|
95
|
+
case 'information':
|
|
96
|
+
return 'info-circle';
|
|
97
|
+
|
|
98
|
+
case 'check-circle':
|
|
99
|
+
return 'check-circle';
|
|
100
|
+
|
|
101
|
+
case 'alert':
|
|
102
|
+
return 'exclamation-triangle';
|
|
103
|
+
|
|
104
|
+
case 'alert-circle':
|
|
105
|
+
return 'exclamation-circle';
|
|
106
|
+
|
|
107
|
+
case 'arrow-up':
|
|
108
|
+
return 'arrow-up';
|
|
109
|
+
|
|
110
|
+
case 'chevron-right':
|
|
111
|
+
return 'angle-right';
|
|
112
|
+
|
|
113
|
+
case 'chevron-left':
|
|
114
|
+
return 'angle-left';
|
|
115
|
+
|
|
116
|
+
case 'chevron-down':
|
|
117
|
+
return 'angle-down';
|
|
118
|
+
|
|
119
|
+
case 'eye':
|
|
120
|
+
return 'eye';
|
|
121
|
+
|
|
122
|
+
case 'eye-off':
|
|
123
|
+
return 'eye-slash';
|
|
124
|
+
|
|
125
|
+
case 'menu-down':
|
|
126
|
+
return 'caret-down';
|
|
127
|
+
|
|
128
|
+
case 'menu-up':
|
|
129
|
+
return 'caret-up';
|
|
130
|
+
|
|
131
|
+
default:
|
|
132
|
+
return value;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
/* script */
|
|
139
|
+
const __vue_script__ = script;
|
|
140
|
+
|
|
141
|
+
/* template */
|
|
142
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('span',{staticClass:"icon",class:[_vm.newType, _vm.size]},[(!_vm.useIconComponent)?_c('i',{class:[_vm.newPack, _vm.newIcon, _vm.newCustomSize, _vm.customClass]}):_c(_vm.useIconComponent,{tag:"component",class:[_vm.customClass],attrs:{"icon":[_vm.newPack, _vm.newIcon],"size":_vm.newCustomSize}})],1)};
|
|
143
|
+
var __vue_staticRenderFns__ = [];
|
|
144
|
+
|
|
145
|
+
/* style */
|
|
146
|
+
const __vue_inject_styles__ = undefined;
|
|
147
|
+
/* scoped */
|
|
148
|
+
const __vue_scope_id__ = undefined;
|
|
149
|
+
/* module identifier */
|
|
150
|
+
const __vue_module_identifier__ = undefined;
|
|
151
|
+
/* functional template */
|
|
152
|
+
const __vue_is_functional_template__ = false;
|
|
153
|
+
/* style inject */
|
|
154
|
+
|
|
155
|
+
/* style inject SSR */
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
var Icon = __vue_normalize__(
|
|
160
|
+
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
|
|
161
|
+
__vue_inject_styles__,
|
|
162
|
+
__vue_script__,
|
|
163
|
+
__vue_scope_id__,
|
|
164
|
+
__vue_is_functional_template__,
|
|
165
|
+
__vue_module_identifier__,
|
|
166
|
+
undefined,
|
|
167
|
+
undefined
|
|
168
|
+
);
|
|
169
|
+
|
|
170
|
+
export { Icon as I };
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
/*! Buefy v0.7.10 | MIT License | github.com/buefy/buefy */
|
|
2
|
+
import { _ as _defineProperty } from './chunk-6f881e7d.js';
|
|
3
|
+
import { c as config } from './chunk-2cb6f867.js';
|
|
4
|
+
import { _ as __vue_normalize__ } from './chunk-fd5b0e1e.js';
|
|
5
|
+
|
|
6
|
+
var script = {
|
|
7
|
+
name: 'BFieldBody',
|
|
8
|
+
props: {
|
|
9
|
+
message: {
|
|
10
|
+
type: String
|
|
11
|
+
},
|
|
12
|
+
type: {
|
|
13
|
+
type: [String, Object]
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
render: function render(createElement) {
|
|
17
|
+
var _this = this;
|
|
18
|
+
|
|
19
|
+
return createElement('div', {
|
|
20
|
+
attrs: {
|
|
21
|
+
'class': 'field-body'
|
|
22
|
+
}
|
|
23
|
+
}, this.$slots.default.map(function (element) {
|
|
24
|
+
// skip returns and comments
|
|
25
|
+
if (!element.tag) {
|
|
26
|
+
return element;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
if (_this.message) {
|
|
30
|
+
return createElement('b-field', {
|
|
31
|
+
attrs: {
|
|
32
|
+
message: _this.message,
|
|
33
|
+
'type': _this.type
|
|
34
|
+
}
|
|
35
|
+
}, [element]);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return createElement('b-field', {
|
|
39
|
+
attrs: {
|
|
40
|
+
'type': _this.type
|
|
41
|
+
}
|
|
42
|
+
}, [element]);
|
|
43
|
+
}));
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
/* script */
|
|
48
|
+
const __vue_script__ = script;
|
|
49
|
+
|
|
50
|
+
/* template */
|
|
51
|
+
|
|
52
|
+
/* style */
|
|
53
|
+
const __vue_inject_styles__ = undefined;
|
|
54
|
+
/* scoped */
|
|
55
|
+
const __vue_scope_id__ = undefined;
|
|
56
|
+
/* module identifier */
|
|
57
|
+
const __vue_module_identifier__ = undefined;
|
|
58
|
+
/* functional template */
|
|
59
|
+
const __vue_is_functional_template__ = undefined;
|
|
60
|
+
/* style inject */
|
|
61
|
+
|
|
62
|
+
/* style inject SSR */
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
var FieldBody = __vue_normalize__(
|
|
67
|
+
{},
|
|
68
|
+
__vue_inject_styles__,
|
|
69
|
+
__vue_script__,
|
|
70
|
+
__vue_scope_id__,
|
|
71
|
+
__vue_is_functional_template__,
|
|
72
|
+
__vue_module_identifier__,
|
|
73
|
+
undefined,
|
|
74
|
+
undefined
|
|
75
|
+
);
|
|
76
|
+
|
|
77
|
+
var script$1 = {
|
|
78
|
+
name: 'BField',
|
|
79
|
+
components: _defineProperty({}, FieldBody.name, FieldBody),
|
|
80
|
+
props: {
|
|
81
|
+
type: [String, Object],
|
|
82
|
+
label: String,
|
|
83
|
+
labelFor: String,
|
|
84
|
+
message: [String, Array, Object],
|
|
85
|
+
grouped: Boolean,
|
|
86
|
+
groupMultiline: Boolean,
|
|
87
|
+
position: String,
|
|
88
|
+
expanded: Boolean,
|
|
89
|
+
horizontal: Boolean,
|
|
90
|
+
addons: {
|
|
91
|
+
type: Boolean,
|
|
92
|
+
default: true
|
|
93
|
+
},
|
|
94
|
+
customClass: String,
|
|
95
|
+
labelPosition: {
|
|
96
|
+
type: String,
|
|
97
|
+
default: function _default() {
|
|
98
|
+
return config.defaultFieldLabelPosition;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
data: function data() {
|
|
103
|
+
return {
|
|
104
|
+
newType: this.type,
|
|
105
|
+
newMessage: this.message,
|
|
106
|
+
fieldLabelSize: null,
|
|
107
|
+
_isField: true // Used internally by Input and Select
|
|
108
|
+
|
|
109
|
+
};
|
|
110
|
+
},
|
|
111
|
+
computed: {
|
|
112
|
+
rootClasses: function rootClasses() {
|
|
113
|
+
return [this.newPosition, {
|
|
114
|
+
'is-expanded': this.expanded,
|
|
115
|
+
'is-grouped-multiline': this.groupMultiline,
|
|
116
|
+
'is-horizontal': this.horizontal,
|
|
117
|
+
'is-floating-in-label': this.hasLabel && !this.horizontal && this.labelPosition === 'inside',
|
|
118
|
+
'is-floating-label': this.hasLabel && !this.horizontal && this.labelPosition === 'on-border'
|
|
119
|
+
}];
|
|
120
|
+
},
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Correct Bulma class for the side of the addon or group.
|
|
124
|
+
*
|
|
125
|
+
* This is not kept like the others (is-small, etc.),
|
|
126
|
+
* because since 'has-addons' is set automatically it
|
|
127
|
+
* doesn't make sense to teach users what addons are exactly.
|
|
128
|
+
*/
|
|
129
|
+
newPosition: function newPosition() {
|
|
130
|
+
if (this.position === undefined) return;
|
|
131
|
+
var position = this.position.split('-');
|
|
132
|
+
if (position.length < 1) return;
|
|
133
|
+
var prefix = this.grouped ? 'is-grouped-' : 'has-addons-';
|
|
134
|
+
if (this.position) return prefix + position[1];
|
|
135
|
+
},
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Formatted message in case it's an array
|
|
139
|
+
* (each element is separated by <br> tag)
|
|
140
|
+
*/
|
|
141
|
+
formattedMessage: function formattedMessage() {
|
|
142
|
+
if (typeof this.newMessage === 'string') {
|
|
143
|
+
return this.newMessage;
|
|
144
|
+
} else {
|
|
145
|
+
var messages = [];
|
|
146
|
+
|
|
147
|
+
if (Array.isArray(this.newMessage)) {
|
|
148
|
+
this.newMessage.forEach(function (message) {
|
|
149
|
+
if (typeof message === 'string') {
|
|
150
|
+
messages.push(message);
|
|
151
|
+
} else {
|
|
152
|
+
for (var key in message) {
|
|
153
|
+
if (message[key]) {
|
|
154
|
+
messages.push(key);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
} else {
|
|
160
|
+
for (var key in this.newMessage) {
|
|
161
|
+
if (this.newMessage[key]) {
|
|
162
|
+
messages.push(key);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
return messages.filter(function (m) {
|
|
168
|
+
if (m) return m;
|
|
169
|
+
}).join(' <br> ');
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
hasLabel: function hasLabel() {
|
|
173
|
+
return this.label || this.$slots.label;
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
watch: {
|
|
177
|
+
/**
|
|
178
|
+
* Set internal type when prop change.
|
|
179
|
+
*/
|
|
180
|
+
type: function type(value) {
|
|
181
|
+
this.newType = value;
|
|
182
|
+
},
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Set internal message when prop change.
|
|
186
|
+
*/
|
|
187
|
+
message: function message(value) {
|
|
188
|
+
this.newMessage = value;
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
methods: {
|
|
192
|
+
/**
|
|
193
|
+
* Field has addons if there are more than one slot
|
|
194
|
+
* (element / component) in the Field.
|
|
195
|
+
* Or is grouped when prop is set.
|
|
196
|
+
* Is a method to be called when component re-render.
|
|
197
|
+
*/
|
|
198
|
+
fieldType: function fieldType() {
|
|
199
|
+
if (this.grouped) return 'is-grouped';
|
|
200
|
+
var renderedNode = 0;
|
|
201
|
+
|
|
202
|
+
if (this.$slots.default) {
|
|
203
|
+
renderedNode = this.$slots.default.reduce(function (i, node) {
|
|
204
|
+
return node.tag ? i + 1 : i;
|
|
205
|
+
}, 0);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
if (renderedNode > 1 && this.addons && !this.horizontal) {
|
|
209
|
+
return 'has-addons';
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
mounted: function mounted() {
|
|
214
|
+
if (this.horizontal) {
|
|
215
|
+
// Bulma docs: .is-normal for any .input or .button
|
|
216
|
+
var elements = this.$el.querySelectorAll('.input, .select, .button, .textarea, .b-slider');
|
|
217
|
+
|
|
218
|
+
if (elements.length > 0) {
|
|
219
|
+
this.fieldLabelSize = 'is-normal';
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
};
|
|
224
|
+
|
|
225
|
+
/* script */
|
|
226
|
+
const __vue_script__$1 = script$1;
|
|
227
|
+
|
|
228
|
+
/* template */
|
|
229
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"field",class:[_vm.rootClasses, _vm.fieldType()]},[(_vm.horizontal)?_c('div',{staticClass:"field-label",class:[_vm.customClass, _vm.fieldLabelSize]},[(_vm.hasLabel)?_c('label',{staticClass:"label",class:_vm.customClass,attrs:{"for":_vm.labelFor}},[(_vm.$slots.label)?_vm._t("label"):[_vm._v(_vm._s(_vm.label))]],2):_vm._e()]):[(_vm.hasLabel)?_c('label',{staticClass:"label",class:_vm.customClass,attrs:{"for":_vm.labelFor}},[(_vm.$slots.label)?_vm._t("label"):[_vm._v(_vm._s(_vm.label))]],2):_vm._e()],_vm._v(" "),(_vm.horizontal)?_c('b-field-body',{attrs:{"message":_vm.newMessage ? _vm.formattedMessage : '',"type":_vm.newType}},[_vm._t("default")],2):[_vm._t("default")],_vm._v(" "),(_vm.newMessage && !_vm.horizontal)?_c('p',{staticClass:"help",class:_vm.newType,domProps:{"innerHTML":_vm._s(_vm.formattedMessage)}}):_vm._e()],2)};
|
|
230
|
+
var __vue_staticRenderFns__ = [];
|
|
231
|
+
|
|
232
|
+
/* style */
|
|
233
|
+
const __vue_inject_styles__$1 = undefined;
|
|
234
|
+
/* scoped */
|
|
235
|
+
const __vue_scope_id__$1 = undefined;
|
|
236
|
+
/* module identifier */
|
|
237
|
+
const __vue_module_identifier__$1 = undefined;
|
|
238
|
+
/* functional template */
|
|
239
|
+
const __vue_is_functional_template__$1 = false;
|
|
240
|
+
/* style inject */
|
|
241
|
+
|
|
242
|
+
/* style inject SSR */
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
var Field = __vue_normalize__(
|
|
247
|
+
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
|
|
248
|
+
__vue_inject_styles__$1,
|
|
249
|
+
__vue_script__$1,
|
|
250
|
+
__vue_scope_id__$1,
|
|
251
|
+
__vue_is_functional_template__$1,
|
|
252
|
+
__vue_module_identifier__$1,
|
|
253
|
+
undefined,
|
|
254
|
+
undefined
|
|
255
|
+
);
|
|
256
|
+
|
|
257
|
+
export { Field as F };
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
/*! Buefy v0.7.10 | MIT License | github.com/buefy/buefy */
|
|
2
|
+
import { c as config } from './chunk-2cb6f867.js';
|
|
3
|
+
import { _ as __vue_normalize__ } from './chunk-fd5b0e1e.js';
|
|
4
|
+
|
|
5
|
+
//
|
|
6
|
+
var script = {
|
|
7
|
+
name: 'BIcon',
|
|
8
|
+
props: {
|
|
9
|
+
type: [String, Object],
|
|
10
|
+
pack: String,
|
|
11
|
+
icon: String,
|
|
12
|
+
size: String,
|
|
13
|
+
customSize: String,
|
|
14
|
+
customClass: String,
|
|
15
|
+
both: Boolean // This is used internally to show both MDI and FA icon
|
|
16
|
+
|
|
17
|
+
},
|
|
18
|
+
computed: {
|
|
19
|
+
/**
|
|
20
|
+
* Internal icon name based on the pack.
|
|
21
|
+
* If pack is 'fa', gets the equivalent FA icon name of the MDI,
|
|
22
|
+
* internal icons are always MDI.
|
|
23
|
+
*/
|
|
24
|
+
newIcon: function newIcon() {
|
|
25
|
+
return this.newPack === 'mdi' ? "".concat(this.newPack, "-").concat(this.icon) : this.addFAPrefix(this.getEquivalentIconOf(this.icon));
|
|
26
|
+
},
|
|
27
|
+
newPack: function newPack() {
|
|
28
|
+
return this.pack || config.defaultIconPack;
|
|
29
|
+
},
|
|
30
|
+
newType: function newType() {
|
|
31
|
+
if (!this.type) return;
|
|
32
|
+
var splitType = [];
|
|
33
|
+
|
|
34
|
+
if (typeof this.type === 'string') {
|
|
35
|
+
splitType = this.type.split('-');
|
|
36
|
+
} else {
|
|
37
|
+
for (var key in this.type) {
|
|
38
|
+
if (this.type[key]) {
|
|
39
|
+
splitType = key.split('-');
|
|
40
|
+
break;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
if (splitType.length <= 1) return;
|
|
46
|
+
return "has-text-".concat(splitType[1]);
|
|
47
|
+
},
|
|
48
|
+
newCustomSize: function newCustomSize() {
|
|
49
|
+
return this.customSize || this.customSizeByPack;
|
|
50
|
+
},
|
|
51
|
+
customSizeByPack: function customSizeByPack() {
|
|
52
|
+
var defaultSize = this.newPack === 'mdi' ? 'mdi-24px' : this.addFAPrefix('lg');
|
|
53
|
+
var mediumSize = this.newPack === 'mdi' ? 'mdi-36px' : this.addFAPrefix('2x');
|
|
54
|
+
var largeSize = this.newPack === 'mdi' ? 'mdi-48px' : this.addFAPrefix('3x');
|
|
55
|
+
|
|
56
|
+
switch (this.size) {
|
|
57
|
+
case 'is-small':
|
|
58
|
+
return;
|
|
59
|
+
|
|
60
|
+
case 'is-medium':
|
|
61
|
+
return mediumSize;
|
|
62
|
+
|
|
63
|
+
case 'is-large':
|
|
64
|
+
return largeSize;
|
|
65
|
+
|
|
66
|
+
default:
|
|
67
|
+
return defaultSize;
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
useIconComponent: function useIconComponent() {
|
|
71
|
+
return config.defaultIconComponent;
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
methods: {
|
|
75
|
+
addFAPrefix: function addFAPrefix(value) {
|
|
76
|
+
if (this.useIconComponent) {
|
|
77
|
+
return value;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
return "fa-".concat(value);
|
|
81
|
+
},
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Equivalent FA icon name of the MDI.
|
|
85
|
+
*/
|
|
86
|
+
getEquivalentIconOf: function getEquivalentIconOf(value) {
|
|
87
|
+
// Only transform the class if the both prop is set to true
|
|
88
|
+
if (!this.both) {
|
|
89
|
+
return value;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
switch (value) {
|
|
93
|
+
case 'check':
|
|
94
|
+
return 'check';
|
|
95
|
+
|
|
96
|
+
case 'information':
|
|
97
|
+
return 'info-circle';
|
|
98
|
+
|
|
99
|
+
case 'check-circle':
|
|
100
|
+
return 'check-circle';
|
|
101
|
+
|
|
102
|
+
case 'alert':
|
|
103
|
+
return 'exclamation-triangle';
|
|
104
|
+
|
|
105
|
+
case 'alert-circle':
|
|
106
|
+
return 'exclamation-circle';
|
|
107
|
+
|
|
108
|
+
case 'arrow-up':
|
|
109
|
+
return 'arrow-up';
|
|
110
|
+
|
|
111
|
+
case 'chevron-right':
|
|
112
|
+
return 'angle-right';
|
|
113
|
+
|
|
114
|
+
case 'chevron-left':
|
|
115
|
+
return 'angle-left';
|
|
116
|
+
|
|
117
|
+
case 'chevron-down':
|
|
118
|
+
return 'angle-down';
|
|
119
|
+
|
|
120
|
+
case 'eye':
|
|
121
|
+
return 'eye';
|
|
122
|
+
|
|
123
|
+
case 'eye-off':
|
|
124
|
+
return 'eye-slash';
|
|
125
|
+
|
|
126
|
+
case 'menu-down':
|
|
127
|
+
return 'caret-down';
|
|
128
|
+
|
|
129
|
+
case 'menu-up':
|
|
130
|
+
return 'caret-up';
|
|
131
|
+
|
|
132
|
+
default:
|
|
133
|
+
return value;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
/* script */
|
|
140
|
+
const __vue_script__ = script;
|
|
141
|
+
|
|
142
|
+
/* template */
|
|
143
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('span',{staticClass:"icon",class:[_vm.newType, _vm.size]},[(!_vm.useIconComponent)?_c('i',{class:[_vm.newPack, _vm.newIcon, _vm.newCustomSize, _vm.customClass]}):_c(_vm.useIconComponent,{tag:"component",class:[_vm.customClass],attrs:{"icon":[_vm.newPack, _vm.newIcon],"size":_vm.newCustomSize}})],1)};
|
|
144
|
+
var __vue_staticRenderFns__ = [];
|
|
145
|
+
|
|
146
|
+
/* style */
|
|
147
|
+
const __vue_inject_styles__ = undefined;
|
|
148
|
+
/* scoped */
|
|
149
|
+
const __vue_scope_id__ = undefined;
|
|
150
|
+
/* module identifier */
|
|
151
|
+
const __vue_module_identifier__ = undefined;
|
|
152
|
+
/* functional template */
|
|
153
|
+
const __vue_is_functional_template__ = false;
|
|
154
|
+
/* style inject */
|
|
155
|
+
|
|
156
|
+
/* style inject SSR */
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
var Icon = __vue_normalize__(
|
|
161
|
+
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
|
|
162
|
+
__vue_inject_styles__,
|
|
163
|
+
__vue_script__,
|
|
164
|
+
__vue_scope_id__,
|
|
165
|
+
__vue_is_functional_template__,
|
|
166
|
+
__vue_module_identifier__,
|
|
167
|
+
undefined,
|
|
168
|
+
undefined
|
|
169
|
+
);
|
|
170
|
+
|
|
171
|
+
export { Icon as I };
|