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,392 @@
|
|
|
1
|
+
import { _ as _defineProperty, a as _typeof } from './chunk-d6200087.js';
|
|
2
|
+
import { g as getValueByPath } from './chunk-e5fce48f.js';
|
|
3
|
+
import { F as FormElementMixin } from './chunk-591ee4a2.js';
|
|
4
|
+
import { _ as __vue_normalize__ } from './chunk-cca88db8.js';
|
|
5
|
+
import { I as Input } from './chunk-121b1efa.js';
|
|
6
|
+
|
|
7
|
+
var script = {
|
|
8
|
+
name: 'BAutocomplete',
|
|
9
|
+
components: _defineProperty({}, Input.name, Input),
|
|
10
|
+
mixins: [FormElementMixin],
|
|
11
|
+
inheritAttrs: false,
|
|
12
|
+
props: {
|
|
13
|
+
value: [Number, String],
|
|
14
|
+
data: {
|
|
15
|
+
type: Array,
|
|
16
|
+
default: function _default() {
|
|
17
|
+
return [];
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
field: {
|
|
21
|
+
type: String,
|
|
22
|
+
default: 'value'
|
|
23
|
+
},
|
|
24
|
+
keepFirst: Boolean,
|
|
25
|
+
clearOnSelect: Boolean,
|
|
26
|
+
openOnFocus: Boolean,
|
|
27
|
+
customFormatter: Function
|
|
28
|
+
},
|
|
29
|
+
data: function data() {
|
|
30
|
+
return {
|
|
31
|
+
selected: null,
|
|
32
|
+
hovered: null,
|
|
33
|
+
isActive: false,
|
|
34
|
+
newValue: this.value,
|
|
35
|
+
newAutocomplete: this.autocomplete || 'off',
|
|
36
|
+
isListInViewportVertically: true,
|
|
37
|
+
hasFocus: false,
|
|
38
|
+
_isAutocomplete: true,
|
|
39
|
+
_elementRef: 'input'
|
|
40
|
+
};
|
|
41
|
+
},
|
|
42
|
+
computed: {
|
|
43
|
+
/**
|
|
44
|
+
* White-listed items to not close when clicked.
|
|
45
|
+
* Add input, dropdown and all children.
|
|
46
|
+
*/
|
|
47
|
+
whiteList: function whiteList() {
|
|
48
|
+
var whiteList = [];
|
|
49
|
+
whiteList.push(this.$refs.input.$el.querySelector('input'));
|
|
50
|
+
whiteList.push(this.$refs.dropdown); // Add all chidren from dropdown
|
|
51
|
+
|
|
52
|
+
if (this.$refs.dropdown !== undefined) {
|
|
53
|
+
var children = this.$refs.dropdown.querySelectorAll('*');
|
|
54
|
+
var _iteratorNormalCompletion = true;
|
|
55
|
+
var _didIteratorError = false;
|
|
56
|
+
var _iteratorError = undefined;
|
|
57
|
+
|
|
58
|
+
try {
|
|
59
|
+
for (var _iterator = children[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
60
|
+
var child = _step.value;
|
|
61
|
+
whiteList.push(child);
|
|
62
|
+
}
|
|
63
|
+
} catch (err) {
|
|
64
|
+
_didIteratorError = true;
|
|
65
|
+
_iteratorError = err;
|
|
66
|
+
} finally {
|
|
67
|
+
try {
|
|
68
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
69
|
+
_iterator.return();
|
|
70
|
+
}
|
|
71
|
+
} finally {
|
|
72
|
+
if (_didIteratorError) {
|
|
73
|
+
throw _iteratorError;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
return whiteList;
|
|
80
|
+
},
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Check if exists default slot
|
|
84
|
+
*/
|
|
85
|
+
hasDefaultSlot: function hasDefaultSlot() {
|
|
86
|
+
return !!this.$scopedSlots.default;
|
|
87
|
+
},
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Check if exists "empty" slot
|
|
91
|
+
*/
|
|
92
|
+
hasEmptySlot: function hasEmptySlot() {
|
|
93
|
+
return !!this.$slots.empty;
|
|
94
|
+
},
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Check if exists "header" slot
|
|
98
|
+
*/
|
|
99
|
+
hasHeaderSlot: function hasHeaderSlot() {
|
|
100
|
+
return !!this.$slots.header;
|
|
101
|
+
},
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Check if exists "footer" slot
|
|
105
|
+
*/
|
|
106
|
+
hasFooterSlot: function hasFooterSlot() {
|
|
107
|
+
return !!this.$slots.footer;
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
watch: {
|
|
111
|
+
/**
|
|
112
|
+
* When dropdown is toggled, check the visibility to know when
|
|
113
|
+
* to open upwards.
|
|
114
|
+
*/
|
|
115
|
+
isActive: function isActive(active) {
|
|
116
|
+
var _this = this;
|
|
117
|
+
|
|
118
|
+
if (active) {
|
|
119
|
+
this.calcDropdownInViewportVertical();
|
|
120
|
+
} else {
|
|
121
|
+
this.$nextTick(function () {
|
|
122
|
+
return _this.setHovered(null);
|
|
123
|
+
}); // Timeout to wait for the animation to finish before recalculating
|
|
124
|
+
|
|
125
|
+
setTimeout(function () {
|
|
126
|
+
_this.calcDropdownInViewportVertical();
|
|
127
|
+
}, 100);
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* When updating input's value
|
|
133
|
+
* 1. Emit changes
|
|
134
|
+
* 2. If value isn't the same as selected, set null
|
|
135
|
+
* 3. Close dropdown if value is clear or else open it
|
|
136
|
+
*/
|
|
137
|
+
newValue: function newValue(value) {
|
|
138
|
+
this.$emit('input', value); // Check if selected is invalid
|
|
139
|
+
|
|
140
|
+
var currentValue = this.getValue(this.selected);
|
|
141
|
+
|
|
142
|
+
if (currentValue && currentValue !== value) {
|
|
143
|
+
this.setSelected(null, false);
|
|
144
|
+
} // Close dropdown if input is clear or else open it
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
if (this.hasFocus && (!this.openOnFocus || value)) {
|
|
148
|
+
this.isActive = !!value;
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* When v-model is changed:
|
|
154
|
+
* 1. Update internal value.
|
|
155
|
+
* 2. If it's invalid, validate again.
|
|
156
|
+
*/
|
|
157
|
+
value: function value(_value) {
|
|
158
|
+
this.newValue = _value;
|
|
159
|
+
!this.isValid && this.$refs.input.checkHtml5Validity();
|
|
160
|
+
},
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Select first option if "keep-first
|
|
164
|
+
*/
|
|
165
|
+
data: function data(value) {
|
|
166
|
+
// Keep first option always pre-selected
|
|
167
|
+
if (this.keepFirst) {
|
|
168
|
+
this.selectFirstOption(value);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
methods: {
|
|
173
|
+
/**
|
|
174
|
+
* Set which option is currently hovered.
|
|
175
|
+
*/
|
|
176
|
+
setHovered: function setHovered(option) {
|
|
177
|
+
if (option === undefined) return;
|
|
178
|
+
this.hovered = option;
|
|
179
|
+
},
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* Set which option is currently selected, update v-model,
|
|
183
|
+
* update input value and close dropdown.
|
|
184
|
+
*/
|
|
185
|
+
setSelected: function setSelected(option) {
|
|
186
|
+
var _this2 = this;
|
|
187
|
+
|
|
188
|
+
var closeDropdown = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
189
|
+
if (option === undefined) return;
|
|
190
|
+
this.selected = option;
|
|
191
|
+
this.$emit('select', this.selected);
|
|
192
|
+
|
|
193
|
+
if (this.selected !== null) {
|
|
194
|
+
this.newValue = this.clearOnSelect ? '' : this.getValue(this.selected);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
closeDropdown && this.$nextTick(function () {
|
|
198
|
+
_this2.isActive = false;
|
|
199
|
+
});
|
|
200
|
+
},
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* Select first option
|
|
204
|
+
*/
|
|
205
|
+
selectFirstOption: function selectFirstOption(options) {
|
|
206
|
+
var _this3 = this;
|
|
207
|
+
|
|
208
|
+
this.$nextTick(function () {
|
|
209
|
+
if (options.length) {
|
|
210
|
+
// If has visible data or open on focus, keep updating the hovered
|
|
211
|
+
if (_this3.openOnFocus || _this3.newValue !== '' && _this3.hovered !== options[0]) {
|
|
212
|
+
_this3.setHovered(options[0]);
|
|
213
|
+
}
|
|
214
|
+
} else {
|
|
215
|
+
_this3.setHovered(null);
|
|
216
|
+
}
|
|
217
|
+
});
|
|
218
|
+
},
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* Enter key listener.
|
|
222
|
+
* Select the hovered option.
|
|
223
|
+
*/
|
|
224
|
+
enterPressed: function enterPressed() {
|
|
225
|
+
if (this.hovered === null) return;
|
|
226
|
+
this.setSelected(this.hovered);
|
|
227
|
+
},
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* Tab key listener.
|
|
231
|
+
* Select hovered option if it exists, close dropdown, then allow
|
|
232
|
+
* native handling to move to next tabbable element.
|
|
233
|
+
*/
|
|
234
|
+
tabPressed: function tabPressed() {
|
|
235
|
+
if (this.hovered === null) {
|
|
236
|
+
this.isActive = false;
|
|
237
|
+
return;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
this.setSelected(this.hovered);
|
|
241
|
+
},
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* Close dropdown if clicked outside.
|
|
245
|
+
*/
|
|
246
|
+
clickedOutside: function clickedOutside(event) {
|
|
247
|
+
if (this.whiteList.indexOf(event.target) < 0) this.isActive = false;
|
|
248
|
+
},
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* Return display text for the input.
|
|
252
|
+
* If object, get value from path, or else just the value.
|
|
253
|
+
*/
|
|
254
|
+
getValue: function getValue(option) {
|
|
255
|
+
if (!option) return;
|
|
256
|
+
|
|
257
|
+
if (typeof this.customFormatter !== 'undefined') {
|
|
258
|
+
return this.customFormatter(option);
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
return _typeof(option) === 'object' ? getValueByPath(option, this.field) : option;
|
|
262
|
+
},
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* Calculate if the dropdown is vertically visible when activated,
|
|
266
|
+
* otherwise it is openened upwards.
|
|
267
|
+
*/
|
|
268
|
+
calcDropdownInViewportVertical: function calcDropdownInViewportVertical() {
|
|
269
|
+
var _this4 = this;
|
|
270
|
+
|
|
271
|
+
this.$nextTick(function () {
|
|
272
|
+
/**
|
|
273
|
+
* this.$refs.dropdown may be undefined
|
|
274
|
+
* when Autocomplete is conditional rendered
|
|
275
|
+
*/
|
|
276
|
+
if (_this4.$refs.dropdown === undefined) return;
|
|
277
|
+
|
|
278
|
+
var rect = _this4.$refs.dropdown.getBoundingClientRect();
|
|
279
|
+
|
|
280
|
+
_this4.isListInViewportVertically = rect.top >= 0 && rect.bottom <= (window.innerHeight || document.documentElement.clientHeight);
|
|
281
|
+
});
|
|
282
|
+
},
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* Arrows keys listener.
|
|
286
|
+
* If dropdown is active, set hovered option, or else just open.
|
|
287
|
+
*/
|
|
288
|
+
keyArrows: function keyArrows(direction) {
|
|
289
|
+
var sum = direction === 'down' ? 1 : -1;
|
|
290
|
+
|
|
291
|
+
if (this.isActive) {
|
|
292
|
+
var index = this.data.indexOf(this.hovered) + sum;
|
|
293
|
+
index = index > this.data.length - 1 ? this.data.length : index;
|
|
294
|
+
index = index < 0 ? 0 : index;
|
|
295
|
+
this.setHovered(this.data[index]);
|
|
296
|
+
var list = this.$refs.dropdown.querySelector('.dropdown-content');
|
|
297
|
+
var element = list.querySelectorAll('a.dropdown-item:not(.is-disabled)')[index];
|
|
298
|
+
if (!element) return;
|
|
299
|
+
var visMin = list.scrollTop;
|
|
300
|
+
var visMax = list.scrollTop + list.clientHeight - element.clientHeight;
|
|
301
|
+
|
|
302
|
+
if (element.offsetTop < visMin) {
|
|
303
|
+
list.scrollTop = element.offsetTop;
|
|
304
|
+
} else if (element.offsetTop >= visMax) {
|
|
305
|
+
list.scrollTop = element.offsetTop - list.clientHeight + element.clientHeight;
|
|
306
|
+
}
|
|
307
|
+
} else {
|
|
308
|
+
this.isActive = true;
|
|
309
|
+
}
|
|
310
|
+
},
|
|
311
|
+
|
|
312
|
+
/**
|
|
313
|
+
* Focus listener.
|
|
314
|
+
* If value is the same as selected, select all text.
|
|
315
|
+
*/
|
|
316
|
+
focused: function focused(event) {
|
|
317
|
+
if (this.getValue(this.selected) === this.newValue) {
|
|
318
|
+
this.$el.querySelector('input').select();
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
if (this.openOnFocus) {
|
|
322
|
+
this.isActive = true;
|
|
323
|
+
|
|
324
|
+
if (this.keepFirst) {
|
|
325
|
+
this.selectFirstOption(this.data);
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
this.hasFocus = true;
|
|
330
|
+
this.$emit('focus', event);
|
|
331
|
+
},
|
|
332
|
+
|
|
333
|
+
/**
|
|
334
|
+
* Blur listener.
|
|
335
|
+
*/
|
|
336
|
+
onBlur: function onBlur(event) {
|
|
337
|
+
this.hasFocus = false;
|
|
338
|
+
this.$emit('blur', event);
|
|
339
|
+
},
|
|
340
|
+
onInput: function onInput(event) {
|
|
341
|
+
var currentValue = this.getValue(this.selected);
|
|
342
|
+
if (currentValue && currentValue === this.newValue) return;
|
|
343
|
+
this.$emit('typing', this.newValue);
|
|
344
|
+
}
|
|
345
|
+
},
|
|
346
|
+
created: function created() {
|
|
347
|
+
if (typeof window !== 'undefined') {
|
|
348
|
+
document.addEventListener('click', this.clickedOutside);
|
|
349
|
+
window.addEventListener('resize', this.calcDropdownInViewportVertical);
|
|
350
|
+
}
|
|
351
|
+
},
|
|
352
|
+
beforeDestroy: function beforeDestroy() {
|
|
353
|
+
if (typeof window !== 'undefined') {
|
|
354
|
+
document.removeEventListener('click', this.clickedOutside);
|
|
355
|
+
window.removeEventListener('resize', this.calcDropdownInViewportVertical);
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
};
|
|
359
|
+
|
|
360
|
+
/* script */
|
|
361
|
+
const __vue_script__ = script;
|
|
362
|
+
|
|
363
|
+
/* template */
|
|
364
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"autocomplete control",class:{'is-expanded': _vm.expanded}},[_c('b-input',_vm._b({ref:"input",attrs:{"type":"text","size":_vm.size,"loading":_vm.loading,"rounded":_vm.rounded,"icon":_vm.icon,"icon-pack":_vm.iconPack,"maxlength":_vm.maxlength,"autocomplete":_vm.newAutocomplete,"use-html5-validation":_vm.useHtml5Validation},on:{"input":_vm.onInput,"focus":_vm.focused,"blur":_vm.onBlur},nativeOn:{"keyup":function($event){if(!('button' in $event)&&_vm._k($event.keyCode,"esc",27,$event.key)){ return null; }$event.preventDefault();_vm.isActive = false;},"keydown":[function($event){if(!('button' in $event)&&_vm._k($event.keyCode,"tab",9,$event.key)){ return null; }_vm.tabPressed($event);},function($event){if(!('button' in $event)&&_vm._k($event.keyCode,"enter",13,$event.key)){ return null; }$event.preventDefault();_vm.enterPressed($event);},function($event){if(!('button' in $event)&&_vm._k($event.keyCode,"up",38,$event.key)){ return null; }$event.preventDefault();_vm.keyArrows('up');},function($event){if(!('button' in $event)&&_vm._k($event.keyCode,"down",40,$event.key)){ return null; }$event.preventDefault();_vm.keyArrows('down');}]},model:{value:(_vm.newValue),callback:function ($$v) {_vm.newValue=$$v;},expression:"newValue"}},'b-input',_vm.$attrs,false)),_vm._v(" "),_c('transition',{attrs:{"name":"fade"}},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.isActive && (_vm.data.length > 0 || _vm.hasEmptySlot || _vm.hasHeaderSlot)),expression:"isActive && (data.length > 0 || hasEmptySlot || hasHeaderSlot)"}],ref:"dropdown",staticClass:"dropdown-menu",class:{ 'is-opened-top': !_vm.isListInViewportVertically }},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.isActive),expression:"isActive"}],staticClass:"dropdown-content"},[(_vm.hasHeaderSlot)?_c('div',{staticClass:"dropdown-item"},[_vm._t("header")],2):_vm._e(),_vm._v(" "),_vm._l((_vm.data),function(option,index){return _c('a',{key:index,staticClass:"dropdown-item",class:{ 'is-hovered': option === _vm.hovered },on:{"click":function($event){_vm.setSelected(option);}}},[(_vm.hasDefaultSlot)?_vm._t("default",null,{option:option,index:index}):_c('span',[_vm._v("\n "+_vm._s(_vm.getValue(option, true))+"\n ")])],2)}),_vm._v(" "),(_vm.data.length === 0 && _vm.hasEmptySlot)?_c('div',{staticClass:"dropdown-item is-disabled"},[_vm._t("empty")],2):_vm._e(),_vm._v(" "),(_vm.hasFooterSlot)?_c('div',{staticClass:"dropdown-item"},[_vm._t("footer")],2):_vm._e()],2)])])],1)};
|
|
365
|
+
var __vue_staticRenderFns__ = [];
|
|
366
|
+
|
|
367
|
+
/* style */
|
|
368
|
+
const __vue_inject_styles__ = undefined;
|
|
369
|
+
/* scoped */
|
|
370
|
+
const __vue_scope_id__ = undefined;
|
|
371
|
+
/* module identifier */
|
|
372
|
+
const __vue_module_identifier__ = undefined;
|
|
373
|
+
/* functional template */
|
|
374
|
+
const __vue_is_functional_template__ = false;
|
|
375
|
+
/* style inject */
|
|
376
|
+
|
|
377
|
+
/* style inject SSR */
|
|
378
|
+
|
|
379
|
+
|
|
380
|
+
|
|
381
|
+
var Autocomplete = __vue_normalize__(
|
|
382
|
+
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
|
|
383
|
+
__vue_inject_styles__,
|
|
384
|
+
__vue_script__,
|
|
385
|
+
__vue_scope_id__,
|
|
386
|
+
__vue_is_functional_template__,
|
|
387
|
+
__vue_module_identifier__,
|
|
388
|
+
undefined,
|
|
389
|
+
undefined
|
|
390
|
+
);
|
|
391
|
+
|
|
392
|
+
export { Autocomplete as A };
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
/*! Buefy v0.7.10 | MIT License | github.com/buefy/buefy */
|
|
2
|
+
import { r as removeElement } from './chunk-7cf87590.js';
|
|
3
|
+
import { c as config } from './chunk-2cb6f867.js';
|
|
4
|
+
|
|
5
|
+
var NoticeMixin = {
|
|
6
|
+
props: {
|
|
7
|
+
type: {
|
|
8
|
+
type: String,
|
|
9
|
+
default: 'is-dark'
|
|
10
|
+
},
|
|
11
|
+
message: String,
|
|
12
|
+
duration: Number,
|
|
13
|
+
queue: {
|
|
14
|
+
type: Boolean,
|
|
15
|
+
default: undefined
|
|
16
|
+
},
|
|
17
|
+
position: {
|
|
18
|
+
type: String,
|
|
19
|
+
default: 'is-top',
|
|
20
|
+
validator: function validator(value) {
|
|
21
|
+
return ['is-top-right', 'is-top', 'is-top-left', 'is-bottom-right', 'is-bottom', 'is-bottom-left'].indexOf(value) > -1;
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
container: String
|
|
25
|
+
},
|
|
26
|
+
data: function data() {
|
|
27
|
+
return {
|
|
28
|
+
isActive: false,
|
|
29
|
+
parentTop: null,
|
|
30
|
+
parentBottom: null,
|
|
31
|
+
newContainer: this.container || config.defaultContainerElement
|
|
32
|
+
};
|
|
33
|
+
},
|
|
34
|
+
computed: {
|
|
35
|
+
correctParent: function correctParent() {
|
|
36
|
+
switch (this.position) {
|
|
37
|
+
case 'is-top-right':
|
|
38
|
+
case 'is-top':
|
|
39
|
+
case 'is-top-left':
|
|
40
|
+
return this.parentTop;
|
|
41
|
+
|
|
42
|
+
case 'is-bottom-right':
|
|
43
|
+
case 'is-bottom':
|
|
44
|
+
case 'is-bottom-left':
|
|
45
|
+
return this.parentBottom;
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
transition: function transition() {
|
|
49
|
+
switch (this.position) {
|
|
50
|
+
case 'is-top-right':
|
|
51
|
+
case 'is-top':
|
|
52
|
+
case 'is-top-left':
|
|
53
|
+
return {
|
|
54
|
+
enter: 'fadeInDown',
|
|
55
|
+
leave: 'fadeOut'
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
case 'is-bottom-right':
|
|
59
|
+
case 'is-bottom':
|
|
60
|
+
case 'is-bottom-left':
|
|
61
|
+
return {
|
|
62
|
+
enter: 'fadeInUp',
|
|
63
|
+
leave: 'fadeOut'
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
methods: {
|
|
69
|
+
shouldQueue: function shouldQueue() {
|
|
70
|
+
var queue = this.queue !== undefined ? this.queue : config.defaultNoticeQueue;
|
|
71
|
+
if (!queue) return false;
|
|
72
|
+
return this.parentTop.childElementCount > 0 || this.parentBottom.childElementCount > 0;
|
|
73
|
+
},
|
|
74
|
+
close: function close() {
|
|
75
|
+
var _this = this;
|
|
76
|
+
|
|
77
|
+
clearTimeout(this.timer);
|
|
78
|
+
this.isActive = false; // Timeout for the animation complete before destroying
|
|
79
|
+
|
|
80
|
+
setTimeout(function () {
|
|
81
|
+
_this.$destroy();
|
|
82
|
+
|
|
83
|
+
removeElement(_this.$el);
|
|
84
|
+
}, 150);
|
|
85
|
+
},
|
|
86
|
+
showNotice: function showNotice() {
|
|
87
|
+
var _this2 = this;
|
|
88
|
+
|
|
89
|
+
if (this.shouldQueue()) {
|
|
90
|
+
// Call recursively if should queue
|
|
91
|
+
setTimeout(function () {
|
|
92
|
+
return _this2.showNotice();
|
|
93
|
+
}, 250);
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
this.correctParent.insertAdjacentElement('afterbegin', this.$el);
|
|
98
|
+
this.isActive = true;
|
|
99
|
+
|
|
100
|
+
if (!this.indefinite) {
|
|
101
|
+
this.timer = setTimeout(function () {
|
|
102
|
+
return _this2.close();
|
|
103
|
+
}, this.newDuration);
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
setupContainer: function setupContainer() {
|
|
107
|
+
this.parentTop = document.querySelector('.notices.is-top');
|
|
108
|
+
this.parentBottom = document.querySelector('.notices.is-bottom');
|
|
109
|
+
if (this.parentTop && this.parentBottom) return;
|
|
110
|
+
|
|
111
|
+
if (!this.parentTop) {
|
|
112
|
+
this.parentTop = document.createElement('div');
|
|
113
|
+
this.parentTop.className = 'notices is-top';
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
if (!this.parentBottom) {
|
|
117
|
+
this.parentBottom = document.createElement('div');
|
|
118
|
+
this.parentBottom.className = 'notices is-bottom';
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
var container = document.querySelector(this.newContainer) || document.body;
|
|
122
|
+
container.appendChild(this.parentTop);
|
|
123
|
+
container.appendChild(this.parentBottom);
|
|
124
|
+
|
|
125
|
+
if (this.newContainer) {
|
|
126
|
+
this.parentTop.classList.add('has-custom-container');
|
|
127
|
+
this.parentBottom.classList.add('has-custom-container');
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
beforeMount: function beforeMount() {
|
|
132
|
+
this.setupContainer();
|
|
133
|
+
},
|
|
134
|
+
mounted: function mounted() {
|
|
135
|
+
this.showNotice();
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
export { NoticeMixin as N };
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { _ as __vue_normalize__ } from './chunk-cca88db8.js';
|
|
2
|
+
|
|
3
|
+
//
|
|
4
|
+
//
|
|
5
|
+
//
|
|
6
|
+
//
|
|
7
|
+
//
|
|
8
|
+
//
|
|
9
|
+
//
|
|
10
|
+
//
|
|
11
|
+
//
|
|
12
|
+
//
|
|
13
|
+
//
|
|
14
|
+
//
|
|
15
|
+
//
|
|
16
|
+
//
|
|
17
|
+
//
|
|
18
|
+
//
|
|
19
|
+
//
|
|
20
|
+
//
|
|
21
|
+
//
|
|
22
|
+
//
|
|
23
|
+
//
|
|
24
|
+
//
|
|
25
|
+
//
|
|
26
|
+
//
|
|
27
|
+
//
|
|
28
|
+
//
|
|
29
|
+
//
|
|
30
|
+
//
|
|
31
|
+
//
|
|
32
|
+
//
|
|
33
|
+
//
|
|
34
|
+
//
|
|
35
|
+
//
|
|
36
|
+
//
|
|
37
|
+
//
|
|
38
|
+
//
|
|
39
|
+
//
|
|
40
|
+
//
|
|
41
|
+
//
|
|
42
|
+
//
|
|
43
|
+
//
|
|
44
|
+
var script = {
|
|
45
|
+
name: 'BTag',
|
|
46
|
+
props: {
|
|
47
|
+
attached: Boolean,
|
|
48
|
+
closable: Boolean,
|
|
49
|
+
type: String,
|
|
50
|
+
size: String,
|
|
51
|
+
rounded: Boolean,
|
|
52
|
+
disabled: Boolean,
|
|
53
|
+
ellipsis: Boolean,
|
|
54
|
+
tabstop: {
|
|
55
|
+
type: Boolean,
|
|
56
|
+
default: true
|
|
57
|
+
},
|
|
58
|
+
ariaCloseLabel: String
|
|
59
|
+
},
|
|
60
|
+
methods: {
|
|
61
|
+
/**
|
|
62
|
+
* Emit close event when delete button is clicked
|
|
63
|
+
* or delete key is pressed.
|
|
64
|
+
*/
|
|
65
|
+
close: function close() {
|
|
66
|
+
if (this.disabled) return;
|
|
67
|
+
this.$emit('close');
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
/* script */
|
|
73
|
+
const __vue_script__ = script;
|
|
74
|
+
|
|
75
|
+
/* template */
|
|
76
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.attached && _vm.closable)?_c('div',{staticClass:"tags has-addons"},[_c('span',{staticClass:"tag",class:[_vm.type, _vm.size, { 'is-rounded': _vm.rounded }]},[_c('span',{class:{ 'has-ellipsis': _vm.ellipsis }},[_vm._t("default")],2)]),_vm._v(" "),_c('a',{staticClass:"tag is-delete",class:[_vm.size, { 'is-rounded': _vm.rounded }],attrs:{"role":"button","aria-label":_vm.ariaCloseLabel,"tabindex":_vm.tabstop ? 0 : false,"disabled":_vm.disabled},on:{"click":function($event){_vm.close();},"keyup":function($event){if(!('button' in $event)&&_vm._k($event.keyCode,"delete",[8,46],$event.key)){ return null; }$event.preventDefault();_vm.close();}}})]):_c('span',{staticClass:"tag",class:[_vm.type, _vm.size, { 'is-rounded': _vm.rounded }]},[_c('span',{class:{ 'has-ellipsis': _vm.ellipsis }},[_vm._t("default")],2),_vm._v(" "),(_vm.closable)?_c('a',{staticClass:"delete is-small",attrs:{"role":"button","aria-label":_vm.ariaCloseLabel,"disabled":_vm.disabled,"tabindex":_vm.tabstop ? 0 : false},on:{"click":function($event){_vm.close();},"keyup":function($event){if(!('button' in $event)&&_vm._k($event.keyCode,"delete",[8,46],$event.key)){ return null; }$event.preventDefault();_vm.close();}}}):_vm._e()])};
|
|
77
|
+
var __vue_staticRenderFns__ = [];
|
|
78
|
+
|
|
79
|
+
/* style */
|
|
80
|
+
const __vue_inject_styles__ = undefined;
|
|
81
|
+
/* scoped */
|
|
82
|
+
const __vue_scope_id__ = undefined;
|
|
83
|
+
/* module identifier */
|
|
84
|
+
const __vue_module_identifier__ = undefined;
|
|
85
|
+
/* functional template */
|
|
86
|
+
const __vue_is_functional_template__ = false;
|
|
87
|
+
/* style inject */
|
|
88
|
+
|
|
89
|
+
/* style inject SSR */
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
var Tag = __vue_normalize__(
|
|
94
|
+
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
|
|
95
|
+
__vue_inject_styles__,
|
|
96
|
+
__vue_script__,
|
|
97
|
+
__vue_scope_id__,
|
|
98
|
+
__vue_is_functional_template__,
|
|
99
|
+
__vue_module_identifier__,
|
|
100
|
+
undefined,
|
|
101
|
+
undefined
|
|
102
|
+
);
|
|
103
|
+
|
|
104
|
+
export { Tag as T };
|