buefy 0.9.26 → 0.9.28
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/README.md +3 -1
- package/dist/buefy.css +15904 -0
- package/dist/buefy.esm.js +17883 -0
- package/dist/buefy.esm.min.js +2 -0
- package/dist/buefy.js +17967 -0
- package/dist/buefy.min.css +1 -0
- package/dist/buefy.min.js +2 -0
- package/dist/cjs/Autocomplete-7a39c5ce.js +673 -0
- package/dist/cjs/Button-01827709.js +114 -0
- package/dist/cjs/CheckRadioMixin-c910f2ed.js +45 -0
- package/dist/cjs/Checkbox-43f54cc7.js +70 -0
- package/dist/cjs/Datepicker-680659bc.js +1679 -0
- package/dist/cjs/DropdownItem-422f8c34.js +559 -0
- package/dist/cjs/Field-4557b10c.js +315 -0
- package/dist/cjs/FormElementMixin-193a88b8.js +163 -0
- package/dist/cjs/Icon-78961800.js +189 -0
- package/dist/cjs/Image-c4bcd9b3.js +299 -0
- package/dist/cjs/InjectedChildMixin-d6bf7f91.js +135 -0
- package/dist/cjs/Input-e5a72d97.js +248 -0
- package/dist/cjs/Loading-6f2c7075.js +150 -0
- package/dist/cjs/MessageMixin-8d959514.js +146 -0
- package/dist/cjs/Modal-4cf07210.js +278 -0
- package/dist/cjs/NoticeMixin-01121bd2.js +154 -0
- package/dist/cjs/Pagination-d6b3fb85.js +413 -0
- package/dist/cjs/Select-2b3879bc.js +100 -0
- package/dist/cjs/SlotComponent-4fb48389.js +53 -0
- package/dist/cjs/TabbedChildMixin-907cad32.js +222 -0
- package/dist/cjs/Tag-437f65fb.js +154 -0
- package/dist/cjs/Timepicker-498fa02b.js +67 -0
- package/dist/cjs/TimepickerMixin-6c1a4ab4.js +661 -0
- package/dist/cjs/Tooltip-c1df7ee3.js +370 -0
- package/dist/cjs/_rollupPluginBabelHelpers-8b2e54ad.js +365 -0
- package/dist/cjs/autocomplete.js +22 -0
- package/dist/cjs/breadcrumb.js +139 -0
- package/dist/cjs/button.js +20 -0
- package/dist/cjs/carousel.js +662 -0
- package/dist/cjs/checkbox.js +86 -0
- package/dist/cjs/clockpicker.js +461 -0
- package/dist/cjs/collapse.js +128 -0
- package/dist/cjs/colorpicker.js +23 -0
- package/dist/cjs/config-8cfb5a4a.js +81 -0
- package/dist/cjs/config.js +18 -0
- package/dist/cjs/datepicker.js +27 -0
- package/dist/cjs/datetimepicker.js +377 -0
- package/dist/cjs/dialog.js +308 -0
- package/dist/cjs/dropdown.js +23 -0
- package/dist/cjs/field.js +18 -0
- package/dist/cjs/helpers.js +375 -0
- package/dist/cjs/icon.js +19 -0
- package/dist/cjs/image.js +19 -0
- package/dist/cjs/index-99d1c930.js +1633 -0
- package/dist/cjs/index.js +216 -0
- package/dist/cjs/input.js +21 -0
- package/dist/cjs/loading.js +38 -0
- package/dist/cjs/menu.js +304 -0
- package/dist/cjs/message.js +67 -0
- package/dist/cjs/modal.js +59 -0
- package/dist/cjs/navbar.js +679 -0
- package/dist/cjs/notification.js +181 -0
- package/dist/cjs/numberinput.js +278 -0
- package/dist/cjs/pagination.js +22 -0
- package/dist/cjs/plugins-7f41b028.js +94 -0
- package/dist/cjs/progress.js +239 -0
- package/dist/cjs/radio.js +130 -0
- package/dist/cjs/rate.js +156 -0
- package/dist/cjs/select.js +21 -0
- package/dist/cjs/sidebar.js +303 -0
- package/dist/cjs/skeleton.js +111 -0
- package/dist/cjs/slider.js +603 -0
- package/dist/cjs/snackbar.js +132 -0
- package/dist/cjs/ssr-20dba236.js +10 -0
- package/dist/cjs/steps.js +278 -0
- package/dist/cjs/switch.js +139 -0
- package/dist/cjs/table.js +1695 -0
- package/dist/cjs/tabs.js +214 -0
- package/dist/cjs/tag.js +70 -0
- package/dist/cjs/taginput.js +331 -0
- package/dist/cjs/timepicker.js +28 -0
- package/dist/cjs/toast.js +106 -0
- package/dist/cjs/tooltip.js +19 -0
- package/dist/cjs/trapFocus-261420b0.js +49 -0
- package/dist/cjs/upload.js +205 -0
- package/dist/components/autocomplete/index.js +1620 -0
- package/dist/components/autocomplete/index.min.js +2 -0
- package/dist/components/breadcrumb/index.js +297 -0
- package/dist/components/breadcrumb/index.min.js +2 -0
- package/dist/components/button/index.js +569 -0
- package/dist/components/button/index.min.js +2 -0
- package/dist/components/carousel/index.js +1629 -0
- package/dist/components/carousel/index.min.js +2 -0
- package/dist/components/checkbox/index.js +279 -0
- package/dist/components/checkbox/index.min.js +2 -0
- package/dist/components/clockpicker/index.js +3131 -0
- package/dist/components/clockpicker/index.min.js +2 -0
- package/dist/components/collapse/index.js +217 -0
- package/dist/components/collapse/index.min.js +2 -0
- package/dist/components/colorpicker/index.js +4249 -0
- package/dist/components/colorpicker/index.min.js +2 -0
- package/dist/components/datepicker/index.js +3845 -0
- package/dist/components/datepicker/index.min.js +2 -0
- package/dist/components/datetimepicker/index.js +4902 -0
- package/dist/components/datetimepicker/index.min.js +2 -0
- package/dist/components/dialog/index.js +1168 -0
- package/dist/components/dialog/index.min.js +2 -0
- package/dist/components/dropdown/index.js +1043 -0
- package/dist/components/dropdown/index.min.js +2 -0
- package/dist/components/field/index.js +511 -0
- package/dist/components/field/index.min.js +2 -0
- package/dist/components/icon/index.js +463 -0
- package/dist/components/icon/index.min.js +2 -0
- package/dist/components/image/index.js +513 -0
- package/dist/components/image/index.min.js +2 -0
- package/dist/components/input/index.js +862 -0
- package/dist/components/input/index.min.js +2 -0
- package/dist/components/loading/index.js +366 -0
- package/dist/components/loading/index.min.js +2 -0
- package/dist/components/menu/index.js +748 -0
- package/dist/components/menu/index.min.js +2 -0
- package/dist/components/message/index.js +650 -0
- package/dist/components/message/index.min.js +2 -0
- package/dist/components/modal/index.js +624 -0
- package/dist/components/modal/index.min.js +2 -0
- package/dist/components/navbar/index.js +805 -0
- package/dist/components/navbar/index.min.js +2 -0
- package/dist/components/notification/index.js +923 -0
- package/dist/components/notification/index.min.js +2 -0
- package/dist/components/numberinput/index.js +1119 -0
- package/dist/components/numberinput/index.min.js +2 -0
- package/dist/components/pagination/index.js +868 -0
- package/dist/components/pagination/index.min.js +2 -0
- package/dist/components/progress/index.js +621 -0
- package/dist/components/progress/index.min.js +2 -0
- package/dist/components/radio/index.js +260 -0
- package/dist/components/radio/index.min.js +2 -0
- package/dist/components/rate/index.js +600 -0
- package/dist/components/rate/index.min.js +2 -0
- package/dist/components/select/index.js +715 -0
- package/dist/components/select/index.min.js +2 -0
- package/dist/components/sidebar/index.js +467 -0
- package/dist/components/sidebar/index.min.js +2 -0
- package/dist/components/skeleton/index.js +200 -0
- package/dist/components/skeleton/index.min.js +2 -0
- package/dist/components/slider/index.js +1264 -0
- package/dist/components/slider/index.min.js +2 -0
- package/dist/components/snackbar/index.js +527 -0
- package/dist/components/snackbar/index.min.js +2 -0
- package/dist/components/steps/index.js +1180 -0
- package/dist/components/steps/index.min.js +2 -0
- package/dist/components/switch/index.js +297 -0
- package/dist/components/switch/index.min.js +2 -0
- package/dist/components/table/index.js +3480 -0
- package/dist/components/table/index.min.js +2 -0
- package/dist/components/tabs/index.js +1116 -0
- package/dist/components/tabs/index.min.js +2 -0
- package/dist/components/tag/index.js +307 -0
- package/dist/components/tag/index.min.js +2 -0
- package/dist/components/taginput/index.js +2104 -0
- package/dist/components/taginput/index.min.js +2 -0
- package/dist/components/timepicker/index.js +2843 -0
- package/dist/components/timepicker/index.min.js +2 -0
- package/dist/components/toast/index.js +501 -0
- package/dist/components/toast/index.min.js +2 -0
- package/dist/components/tooltip/index.js +630 -0
- package/dist/components/tooltip/index.min.js +2 -0
- package/dist/components/upload/index.js +525 -0
- package/dist/components/upload/index.min.js +2 -0
- package/dist/esm/Autocomplete-1a6e8770.js +671 -0
- package/dist/esm/Button-521f6efc.js +112 -0
- package/dist/esm/CheckRadioMixin-e726a83c.js +43 -0
- package/dist/esm/Checkbox-1d02686e.js +68 -0
- package/dist/esm/Datepicker-0ae1e826.js +1677 -0
- package/dist/esm/DropdownItem-55682322.js +556 -0
- package/dist/esm/Field-3ceba31e.js +313 -0
- package/dist/esm/FormElementMixin-b223d3c7.js +161 -0
- package/dist/esm/Icon-60d47b31.js +187 -0
- package/dist/esm/Image-75808acb.js +297 -0
- package/dist/esm/InjectedChildMixin-b4220787.js +130 -0
- package/dist/esm/Input-20612b63.js +246 -0
- package/dist/esm/Loading-ae028ea5.js +148 -0
- package/dist/esm/MessageMixin-d577a9f5.js +144 -0
- package/dist/esm/Modal-7da7641f.js +276 -0
- package/dist/esm/NoticeMixin-bd6f61d9.js +152 -0
- package/dist/esm/Pagination-68f12c1e.js +409 -0
- package/dist/esm/Select-97781d4e.js +98 -0
- package/dist/esm/SlotComponent-8871a20f.js +51 -0
- package/dist/esm/TabbedChildMixin-bcb13767.js +219 -0
- package/dist/esm/Tag-6365aa46.js +152 -0
- package/dist/esm/Timepicker-38480bbc.js +65 -0
- package/dist/esm/TimepickerMixin-d736b0a9.js +659 -0
- package/dist/esm/Tooltip-d98a769c.js +368 -0
- package/dist/esm/_rollupPluginBabelHelpers-df313029.js +350 -0
- package/dist/esm/autocomplete.js +18 -0
- package/dist/esm/breadcrumb.js +133 -0
- package/dist/esm/button.js +16 -0
- package/dist/esm/carousel.js +655 -0
- package/dist/esm/checkbox.js +81 -0
- package/dist/esm/clockpicker.js +456 -0
- package/dist/esm/collapse.js +123 -0
- package/dist/esm/colorpicker.js +14 -0
- package/dist/esm/config-e7d4b9c2.js +78 -0
- package/dist/esm/config.js +14 -0
- package/dist/esm/datepicker.js +23 -0
- package/dist/esm/datetimepicker.js +372 -0
- package/dist/esm/dialog.js +302 -0
- package/dist/esm/dropdown.js +18 -0
- package/dist/esm/field.js +14 -0
- package/dist/esm/helpers.js +348 -0
- package/dist/esm/icon.js +15 -0
- package/dist/esm/image.js +15 -0
- package/dist/esm/index-903f63ea.js +1629 -0
- package/dist/esm/index.js +182 -0
- package/dist/esm/input.js +17 -0
- package/dist/esm/loading.js +33 -0
- package/dist/esm/menu.js +297 -0
- package/dist/esm/message.js +62 -0
- package/dist/esm/modal.js +54 -0
- package/dist/esm/navbar.js +672 -0
- package/dist/esm/notification.js +175 -0
- package/dist/esm/numberinput.js +273 -0
- package/dist/esm/pagination.js +17 -0
- package/dist/esm/plugins-218aea86.js +89 -0
- package/dist/esm/progress.js +233 -0
- package/dist/esm/radio.js +124 -0
- package/dist/esm/rate.js +151 -0
- package/dist/esm/select.js +17 -0
- package/dist/esm/sidebar.js +298 -0
- package/dist/esm/skeleton.js +106 -0
- package/dist/esm/slider.js +597 -0
- package/dist/esm/snackbar.js +126 -0
- package/dist/esm/ssr-b847d137.js +7 -0
- package/dist/esm/steps.js +272 -0
- package/dist/esm/switch.js +134 -0
- package/dist/esm/table.js +1689 -0
- package/dist/esm/tabs.js +208 -0
- package/dist/esm/tag.js +65 -0
- package/dist/esm/taginput.js +326 -0
- package/dist/esm/timepicker.js +24 -0
- package/dist/esm/toast.js +100 -0
- package/dist/esm/tooltip.js +15 -0
- package/dist/esm/trapFocus-f0736873.js +47 -0
- package/dist/esm/upload.js +200 -0
- package/dist/vetur/attributes.json +3238 -0
- package/dist/vetur/tags.json +1183 -0
- package/package.json +3 -3
- package/src/components/autocomplete/Autocomplete.spec.js +16 -0
- package/src/components/autocomplete/Autocomplete.vue +9 -3
- package/src/components/colorpicker/ColorpickerHSLRepresentationSquare.vue +2 -0
- package/src/components/colorpicker/ColorpickerHSLRepresentationTriangle.vue +2 -0
- package/src/components/dropdown/Dropdown.vue +51 -3
- package/src/components/numberinput/Numberinput.vue +4 -0
- package/src/components/sidebar/Sidebar.vue +1 -0
- package/src/components/slider/Slider.vue +7 -2
- package/src/components/slider/SliderThumb.vue +8 -0
- package/src/components/table/Table.vue +4 -1
- package/src/components/table/TableColumn.spec.js +51 -0
- package/src/components/table/TableColumn.vue +8 -1
- package/src/components/taginput/Taginput.vue +7 -2
- package/src/components/tooltip/Tooltip.vue +10 -3
- package/src/scss/components/_dropdown.scss +4 -2
|
@@ -0,0 +1,1116 @@
|
|
|
1
|
+
/*! Buefy v0.9.28 | MIT License | github.com/buefy/buefy */
|
|
2
|
+
(function (global, factory) {
|
|
3
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
4
|
+
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
|
5
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Tabs = {}));
|
|
6
|
+
})(this, (function (exports) { 'use strict';
|
|
7
|
+
|
|
8
|
+
function ownKeys(e, r) {
|
|
9
|
+
var t = Object.keys(e);
|
|
10
|
+
if (Object.getOwnPropertySymbols) {
|
|
11
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
12
|
+
r && (o = o.filter(function (r) {
|
|
13
|
+
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
14
|
+
})), t.push.apply(t, o);
|
|
15
|
+
}
|
|
16
|
+
return t;
|
|
17
|
+
}
|
|
18
|
+
function _objectSpread2(e) {
|
|
19
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
20
|
+
var t = null != arguments[r] ? arguments[r] : {};
|
|
21
|
+
r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
|
|
22
|
+
_defineProperty(e, r, t[r]);
|
|
23
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
|
|
24
|
+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
return e;
|
|
28
|
+
}
|
|
29
|
+
function _toPrimitive(t, r) {
|
|
30
|
+
if ("object" != typeof t || !t) return t;
|
|
31
|
+
var e = t[Symbol.toPrimitive];
|
|
32
|
+
if (void 0 !== e) {
|
|
33
|
+
var i = e.call(t, r || "default");
|
|
34
|
+
if ("object" != typeof i) return i;
|
|
35
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
36
|
+
}
|
|
37
|
+
return ("string" === r ? String : Number)(t);
|
|
38
|
+
}
|
|
39
|
+
function _toPropertyKey(t) {
|
|
40
|
+
var i = _toPrimitive(t, "string");
|
|
41
|
+
return "symbol" == typeof i ? i : String(i);
|
|
42
|
+
}
|
|
43
|
+
function _typeof(o) {
|
|
44
|
+
"@babel/helpers - typeof";
|
|
45
|
+
|
|
46
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
47
|
+
return typeof o;
|
|
48
|
+
} : function (o) {
|
|
49
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
50
|
+
}, _typeof(o);
|
|
51
|
+
}
|
|
52
|
+
function _defineProperty(obj, key, value) {
|
|
53
|
+
key = _toPropertyKey(key);
|
|
54
|
+
if (key in obj) {
|
|
55
|
+
Object.defineProperty(obj, key, {
|
|
56
|
+
value: value,
|
|
57
|
+
enumerable: true,
|
|
58
|
+
configurable: true,
|
|
59
|
+
writable: true
|
|
60
|
+
});
|
|
61
|
+
} else {
|
|
62
|
+
obj[key] = value;
|
|
63
|
+
}
|
|
64
|
+
return obj;
|
|
65
|
+
}
|
|
66
|
+
function _toArray(arr) {
|
|
67
|
+
return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest();
|
|
68
|
+
}
|
|
69
|
+
function _arrayWithHoles(arr) {
|
|
70
|
+
if (Array.isArray(arr)) return arr;
|
|
71
|
+
}
|
|
72
|
+
function _iterableToArray(iter) {
|
|
73
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
74
|
+
}
|
|
75
|
+
function _unsupportedIterableToArray(o, minLen) {
|
|
76
|
+
if (!o) return;
|
|
77
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
78
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
79
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
80
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
|
81
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
82
|
+
}
|
|
83
|
+
function _arrayLikeToArray(arr, len) {
|
|
84
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
85
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
86
|
+
return arr2;
|
|
87
|
+
}
|
|
88
|
+
function _nonIterableRest() {
|
|
89
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
90
|
+
}
|
|
91
|
+
function _createForOfIteratorHelper(o, allowArrayLike) {
|
|
92
|
+
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
|
93
|
+
if (!it) {
|
|
94
|
+
if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
|
|
95
|
+
if (it) o = it;
|
|
96
|
+
var i = 0;
|
|
97
|
+
var F = function () {};
|
|
98
|
+
return {
|
|
99
|
+
s: F,
|
|
100
|
+
n: function () {
|
|
101
|
+
if (i >= o.length) return {
|
|
102
|
+
done: true
|
|
103
|
+
};
|
|
104
|
+
return {
|
|
105
|
+
done: false,
|
|
106
|
+
value: o[i++]
|
|
107
|
+
};
|
|
108
|
+
},
|
|
109
|
+
e: function (e) {
|
|
110
|
+
throw e;
|
|
111
|
+
},
|
|
112
|
+
f: F
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
116
|
+
}
|
|
117
|
+
var normalCompletion = true,
|
|
118
|
+
didErr = false,
|
|
119
|
+
err;
|
|
120
|
+
return {
|
|
121
|
+
s: function () {
|
|
122
|
+
it = it.call(o);
|
|
123
|
+
},
|
|
124
|
+
n: function () {
|
|
125
|
+
var step = it.next();
|
|
126
|
+
normalCompletion = step.done;
|
|
127
|
+
return step;
|
|
128
|
+
},
|
|
129
|
+
e: function (e) {
|
|
130
|
+
didErr = true;
|
|
131
|
+
err = e;
|
|
132
|
+
},
|
|
133
|
+
f: function () {
|
|
134
|
+
try {
|
|
135
|
+
if (!normalCompletion && it.return != null) it.return();
|
|
136
|
+
} finally {
|
|
137
|
+
if (didErr) throw err;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
var config = {
|
|
144
|
+
defaultContainerElement: null,
|
|
145
|
+
defaultIconPack: 'mdi',
|
|
146
|
+
defaultIconComponent: null,
|
|
147
|
+
defaultIconPrev: 'chevron-left',
|
|
148
|
+
defaultIconNext: 'chevron-right',
|
|
149
|
+
defaultLocale: undefined,
|
|
150
|
+
defaultDialogConfirmText: null,
|
|
151
|
+
defaultDialogCancelText: null,
|
|
152
|
+
defaultSnackbarDuration: 3500,
|
|
153
|
+
defaultSnackbarPosition: null,
|
|
154
|
+
defaultToastDuration: 2000,
|
|
155
|
+
defaultToastPosition: null,
|
|
156
|
+
defaultNotificationDuration: 2000,
|
|
157
|
+
defaultNotificationPosition: null,
|
|
158
|
+
defaultTooltipType: 'is-primary',
|
|
159
|
+
defaultTooltipDelay: null,
|
|
160
|
+
defaultTooltipCloseDelay: null,
|
|
161
|
+
defaultSidebarDelay: null,
|
|
162
|
+
defaultInputAutocomplete: 'on',
|
|
163
|
+
defaultDateFormatter: null,
|
|
164
|
+
defaultDateParser: null,
|
|
165
|
+
defaultDateCreator: null,
|
|
166
|
+
defaultTimeCreator: null,
|
|
167
|
+
defaultDayNames: null,
|
|
168
|
+
defaultMonthNames: null,
|
|
169
|
+
defaultFirstDayOfWeek: null,
|
|
170
|
+
defaultUnselectableDaysOfWeek: null,
|
|
171
|
+
defaultTimeFormatter: null,
|
|
172
|
+
defaultTimeParser: null,
|
|
173
|
+
defaultModalCanCancel: ['escape', 'x', 'outside', 'button'],
|
|
174
|
+
defaultModalScroll: null,
|
|
175
|
+
defaultDatepickerMobileNative: true,
|
|
176
|
+
defaultTimepickerMobileNative: true,
|
|
177
|
+
defaultTimepickerMobileModal: true,
|
|
178
|
+
defaultNoticeQueue: true,
|
|
179
|
+
defaultInputHasCounter: true,
|
|
180
|
+
defaultTaginputHasCounter: true,
|
|
181
|
+
defaultUseHtml5Validation: true,
|
|
182
|
+
defaultDropdownMobileModal: true,
|
|
183
|
+
defaultFieldLabelPosition: null,
|
|
184
|
+
defaultDatepickerYearsRange: [-100, 10],
|
|
185
|
+
defaultDatepickerNearbyMonthDays: true,
|
|
186
|
+
defaultDatepickerNearbySelectableMonthDays: false,
|
|
187
|
+
defaultDatepickerShowWeekNumber: false,
|
|
188
|
+
defaultDatepickerWeekNumberClickable: false,
|
|
189
|
+
defaultDatepickerMobileModal: true,
|
|
190
|
+
defaultTrapFocus: true,
|
|
191
|
+
defaultAutoFocus: true,
|
|
192
|
+
defaultButtonRounded: false,
|
|
193
|
+
defaultSwitchRounded: true,
|
|
194
|
+
defaultCarouselInterval: 3500,
|
|
195
|
+
defaultTabsExpanded: false,
|
|
196
|
+
defaultTabsAnimated: true,
|
|
197
|
+
defaultTabsType: null,
|
|
198
|
+
defaultStatusIcon: true,
|
|
199
|
+
defaultProgrammaticPromise: false,
|
|
200
|
+
defaultLinkTags: ['a', 'button', 'input', 'router-link', 'nuxt-link', 'n-link', 'RouterLink', 'NuxtLink', 'NLink'],
|
|
201
|
+
defaultImageWebpFallback: null,
|
|
202
|
+
defaultImageLazy: true,
|
|
203
|
+
defaultImageResponsive: true,
|
|
204
|
+
defaultImageRatio: null,
|
|
205
|
+
defaultImageSrcsetFormatter: null,
|
|
206
|
+
defaultBreadcrumbTag: 'a',
|
|
207
|
+
defaultBreadcrumbAlign: 'is-left',
|
|
208
|
+
defaultBreadcrumbSeparator: '',
|
|
209
|
+
defaultBreadcrumbSize: 'is-medium',
|
|
210
|
+
customIconPacks: null
|
|
211
|
+
};
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* Checks if the flag is set
|
|
215
|
+
* @param val
|
|
216
|
+
* @param flag
|
|
217
|
+
* @returns {boolean}
|
|
218
|
+
*/
|
|
219
|
+
function hasFlag(val, flag) {
|
|
220
|
+
return (val & flag) === flag;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Asserts a value is beetween min and max
|
|
225
|
+
* @param val
|
|
226
|
+
* @param min
|
|
227
|
+
* @param max
|
|
228
|
+
* @returns {number}
|
|
229
|
+
*/
|
|
230
|
+
function bound(val, min, max) {
|
|
231
|
+
return Math.max(min, Math.min(max, val));
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* Merge function to replace Object.assign with deep merging possibility
|
|
236
|
+
*/
|
|
237
|
+
var isObject = function isObject(item) {
|
|
238
|
+
return _typeof(item) === 'object' && !Array.isArray(item);
|
|
239
|
+
};
|
|
240
|
+
var mergeFn = function mergeFn(target, source) {
|
|
241
|
+
var deep = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
242
|
+
if (deep || !Object.assign) {
|
|
243
|
+
var isDeep = function isDeep(prop) {
|
|
244
|
+
return isObject(source[prop]) && target !== null && target.hasOwnProperty(prop) && isObject(target[prop]);
|
|
245
|
+
};
|
|
246
|
+
var replaced = Object.getOwnPropertyNames(source).map(function (prop) {
|
|
247
|
+
return _defineProperty({}, prop, isDeep(prop) ? mergeFn(target[prop], source[prop], deep) : source[prop]);
|
|
248
|
+
}).reduce(function (a, b) {
|
|
249
|
+
return _objectSpread2(_objectSpread2({}, a), b);
|
|
250
|
+
}, {});
|
|
251
|
+
return _objectSpread2(_objectSpread2({}, target), replaced);
|
|
252
|
+
} else {
|
|
253
|
+
return Object.assign(target, source);
|
|
254
|
+
}
|
|
255
|
+
};
|
|
256
|
+
var merge = mergeFn;
|
|
257
|
+
function isVueComponent(c) {
|
|
258
|
+
return c && c._isVue;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
var mdiIcons = {
|
|
262
|
+
sizes: {
|
|
263
|
+
'default': 'mdi-24px',
|
|
264
|
+
'is-small': null,
|
|
265
|
+
'is-medium': 'mdi-36px',
|
|
266
|
+
'is-large': 'mdi-48px'
|
|
267
|
+
},
|
|
268
|
+
iconPrefix: 'mdi-'
|
|
269
|
+
};
|
|
270
|
+
var faIcons = function faIcons() {
|
|
271
|
+
var faIconPrefix = config && config.defaultIconComponent ? '' : 'fa-';
|
|
272
|
+
return {
|
|
273
|
+
sizes: {
|
|
274
|
+
'default': null,
|
|
275
|
+
'is-small': null,
|
|
276
|
+
'is-medium': faIconPrefix + 'lg',
|
|
277
|
+
'is-large': faIconPrefix + '2x'
|
|
278
|
+
},
|
|
279
|
+
iconPrefix: faIconPrefix,
|
|
280
|
+
internalIcons: {
|
|
281
|
+
'information': 'info-circle',
|
|
282
|
+
'alert': 'exclamation-triangle',
|
|
283
|
+
'alert-circle': 'exclamation-circle',
|
|
284
|
+
'chevron-right': 'angle-right',
|
|
285
|
+
'chevron-left': 'angle-left',
|
|
286
|
+
'chevron-down': 'angle-down',
|
|
287
|
+
'eye-off': 'eye-slash',
|
|
288
|
+
'menu-down': 'caret-down',
|
|
289
|
+
'menu-up': 'caret-up',
|
|
290
|
+
'close-circle': 'times-circle'
|
|
291
|
+
}
|
|
292
|
+
};
|
|
293
|
+
};
|
|
294
|
+
var getIcons = function getIcons() {
|
|
295
|
+
var icons = {
|
|
296
|
+
mdi: mdiIcons,
|
|
297
|
+
fa: faIcons(),
|
|
298
|
+
fas: faIcons(),
|
|
299
|
+
far: faIcons(),
|
|
300
|
+
fad: faIcons(),
|
|
301
|
+
fab: faIcons(),
|
|
302
|
+
fal: faIcons(),
|
|
303
|
+
'fa-solid': faIcons(),
|
|
304
|
+
'fa-regular': faIcons(),
|
|
305
|
+
'fa-light': faIcons(),
|
|
306
|
+
'fa-thin': faIcons(),
|
|
307
|
+
'fa-duotone': faIcons(),
|
|
308
|
+
'fa-brands': faIcons()
|
|
309
|
+
};
|
|
310
|
+
if (config && config.customIconPacks) {
|
|
311
|
+
icons = merge(icons, config.customIconPacks, true);
|
|
312
|
+
}
|
|
313
|
+
return icons;
|
|
314
|
+
};
|
|
315
|
+
var getIcons$1 = getIcons;
|
|
316
|
+
|
|
317
|
+
var script$2 = {
|
|
318
|
+
name: 'BIcon',
|
|
319
|
+
props: {
|
|
320
|
+
type: [String, Object],
|
|
321
|
+
component: String,
|
|
322
|
+
pack: String,
|
|
323
|
+
icon: String,
|
|
324
|
+
size: String,
|
|
325
|
+
customSize: String,
|
|
326
|
+
customClass: String,
|
|
327
|
+
both: Boolean // This is used internally to show both MDI and FA icon
|
|
328
|
+
},
|
|
329
|
+
computed: {
|
|
330
|
+
iconConfig: function iconConfig() {
|
|
331
|
+
var allIcons = getIcons$1();
|
|
332
|
+
return allIcons[this.newPack];
|
|
333
|
+
},
|
|
334
|
+
iconPrefix: function iconPrefix() {
|
|
335
|
+
if (this.iconConfig && this.iconConfig.iconPrefix) {
|
|
336
|
+
return this.iconConfig.iconPrefix;
|
|
337
|
+
}
|
|
338
|
+
return '';
|
|
339
|
+
},
|
|
340
|
+
/**
|
|
341
|
+
* Internal icon name based on the pack.
|
|
342
|
+
* If pack is 'fa', gets the equivalent FA icon name of the MDI,
|
|
343
|
+
* internal icons are always MDI.
|
|
344
|
+
*/
|
|
345
|
+
newIcon: function newIcon() {
|
|
346
|
+
return "".concat(this.iconPrefix).concat(this.getEquivalentIconOf(this.icon));
|
|
347
|
+
},
|
|
348
|
+
newPack: function newPack() {
|
|
349
|
+
return this.pack || config.defaultIconPack;
|
|
350
|
+
},
|
|
351
|
+
newType: function newType() {
|
|
352
|
+
if (!this.type) return;
|
|
353
|
+
var splitType = [];
|
|
354
|
+
if (typeof this.type === 'string') {
|
|
355
|
+
splitType = this.type.split('-');
|
|
356
|
+
} else {
|
|
357
|
+
for (var key in this.type) {
|
|
358
|
+
if (this.type[key]) {
|
|
359
|
+
splitType = key.split('-');
|
|
360
|
+
break;
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
if (splitType.length <= 1) return;
|
|
365
|
+
var _splitType = splitType,
|
|
366
|
+
_splitType2 = _toArray(_splitType),
|
|
367
|
+
type = _splitType2.slice(1);
|
|
368
|
+
return "has-text-".concat(type.join('-'));
|
|
369
|
+
},
|
|
370
|
+
newCustomSize: function newCustomSize() {
|
|
371
|
+
return this.customSize || this.customSizeByPack;
|
|
372
|
+
},
|
|
373
|
+
customSizeByPack: function customSizeByPack() {
|
|
374
|
+
if (this.iconConfig && this.iconConfig.sizes) {
|
|
375
|
+
if (this.size && this.iconConfig.sizes[this.size] !== undefined) {
|
|
376
|
+
return this.iconConfig.sizes[this.size];
|
|
377
|
+
} else if (this.iconConfig.sizes.default) {
|
|
378
|
+
return this.iconConfig.sizes.default;
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
return null;
|
|
382
|
+
},
|
|
383
|
+
useIconComponent: function useIconComponent() {
|
|
384
|
+
return this.component || config.defaultIconComponent;
|
|
385
|
+
}
|
|
386
|
+
},
|
|
387
|
+
methods: {
|
|
388
|
+
/**
|
|
389
|
+
* Equivalent icon name of the MDI.
|
|
390
|
+
*/
|
|
391
|
+
getEquivalentIconOf: function getEquivalentIconOf(value) {
|
|
392
|
+
// Only transform the class if the both prop is set to true
|
|
393
|
+
if (!this.both) {
|
|
394
|
+
return value;
|
|
395
|
+
}
|
|
396
|
+
if (this.iconConfig && this.iconConfig.internalIcons && this.iconConfig.internalIcons[value]) {
|
|
397
|
+
return this.iconConfig.internalIcons[value];
|
|
398
|
+
}
|
|
399
|
+
return value;
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
};
|
|
403
|
+
|
|
404
|
+
function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier /* server only */, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {
|
|
405
|
+
if (typeof shadowMode !== 'boolean') {
|
|
406
|
+
createInjectorSSR = createInjector;
|
|
407
|
+
createInjector = shadowMode;
|
|
408
|
+
shadowMode = false;
|
|
409
|
+
}
|
|
410
|
+
// Vue.extend constructor export interop.
|
|
411
|
+
const options = typeof script === 'function' ? script.options : script;
|
|
412
|
+
// render functions
|
|
413
|
+
if (template && template.render) {
|
|
414
|
+
options.render = template.render;
|
|
415
|
+
options.staticRenderFns = template.staticRenderFns;
|
|
416
|
+
options._compiled = true;
|
|
417
|
+
// functional template
|
|
418
|
+
if (isFunctionalTemplate) {
|
|
419
|
+
options.functional = true;
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
// scopedId
|
|
423
|
+
if (scopeId) {
|
|
424
|
+
options._scopeId = scopeId;
|
|
425
|
+
}
|
|
426
|
+
let hook;
|
|
427
|
+
if (moduleIdentifier) {
|
|
428
|
+
// server build
|
|
429
|
+
hook = function (context) {
|
|
430
|
+
// 2.3 injection
|
|
431
|
+
context =
|
|
432
|
+
context || // cached call
|
|
433
|
+
(this.$vnode && this.$vnode.ssrContext) || // stateful
|
|
434
|
+
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext); // functional
|
|
435
|
+
// 2.2 with runInNewContext: true
|
|
436
|
+
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
|
|
437
|
+
context = __VUE_SSR_CONTEXT__;
|
|
438
|
+
}
|
|
439
|
+
// inject component styles
|
|
440
|
+
if (style) {
|
|
441
|
+
style.call(this, createInjectorSSR(context));
|
|
442
|
+
}
|
|
443
|
+
// register component module identifier for async chunk inference
|
|
444
|
+
if (context && context._registeredComponents) {
|
|
445
|
+
context._registeredComponents.add(moduleIdentifier);
|
|
446
|
+
}
|
|
447
|
+
};
|
|
448
|
+
// used by ssr in case component is cached and beforeCreate
|
|
449
|
+
// never gets called
|
|
450
|
+
options._ssrRegister = hook;
|
|
451
|
+
}
|
|
452
|
+
else if (style) {
|
|
453
|
+
hook = shadowMode
|
|
454
|
+
? function (context) {
|
|
455
|
+
style.call(this, createInjectorShadow(context, this.$root.$options.shadowRoot));
|
|
456
|
+
}
|
|
457
|
+
: function (context) {
|
|
458
|
+
style.call(this, createInjector(context));
|
|
459
|
+
};
|
|
460
|
+
}
|
|
461
|
+
if (hook) {
|
|
462
|
+
if (options.functional) {
|
|
463
|
+
// register for functional component in vue file
|
|
464
|
+
const originalRender = options.render;
|
|
465
|
+
options.render = function renderWithStyleInjection(h, context) {
|
|
466
|
+
hook.call(context);
|
|
467
|
+
return originalRender(h, context);
|
|
468
|
+
};
|
|
469
|
+
}
|
|
470
|
+
else {
|
|
471
|
+
// inject component registration as beforeCreate hook
|
|
472
|
+
const existing = options.beforeCreate;
|
|
473
|
+
options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
return script;
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
/* script */
|
|
480
|
+
const __vue_script__$2 = script$2;
|
|
481
|
+
|
|
482
|
+
/* template */
|
|
483
|
+
var __vue_render__$1 = 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)};
|
|
484
|
+
var __vue_staticRenderFns__$1 = [];
|
|
485
|
+
|
|
486
|
+
/* style */
|
|
487
|
+
const __vue_inject_styles__$2 = undefined;
|
|
488
|
+
/* scoped */
|
|
489
|
+
const __vue_scope_id__$2 = undefined;
|
|
490
|
+
/* module identifier */
|
|
491
|
+
const __vue_module_identifier__$2 = undefined;
|
|
492
|
+
/* functional template */
|
|
493
|
+
const __vue_is_functional_template__$2 = false;
|
|
494
|
+
/* style inject */
|
|
495
|
+
|
|
496
|
+
/* style inject SSR */
|
|
497
|
+
|
|
498
|
+
/* style inject shadow dom */
|
|
499
|
+
|
|
500
|
+
|
|
501
|
+
|
|
502
|
+
const __vue_component__$2 = /*#__PURE__*/normalizeComponent(
|
|
503
|
+
{ render: __vue_render__$1, staticRenderFns: __vue_staticRenderFns__$1 },
|
|
504
|
+
__vue_inject_styles__$2,
|
|
505
|
+
__vue_script__$2,
|
|
506
|
+
__vue_scope_id__$2,
|
|
507
|
+
__vue_is_functional_template__$2,
|
|
508
|
+
__vue_module_identifier__$2,
|
|
509
|
+
false,
|
|
510
|
+
undefined,
|
|
511
|
+
undefined,
|
|
512
|
+
undefined
|
|
513
|
+
);
|
|
514
|
+
|
|
515
|
+
var Icon = __vue_component__$2;
|
|
516
|
+
|
|
517
|
+
var SlotComponent = {
|
|
518
|
+
name: 'BSlotComponent',
|
|
519
|
+
props: {
|
|
520
|
+
component: {
|
|
521
|
+
type: Object,
|
|
522
|
+
required: true
|
|
523
|
+
},
|
|
524
|
+
name: {
|
|
525
|
+
type: String,
|
|
526
|
+
default: 'default'
|
|
527
|
+
},
|
|
528
|
+
scoped: {
|
|
529
|
+
type: Boolean
|
|
530
|
+
},
|
|
531
|
+
props: {
|
|
532
|
+
type: Object
|
|
533
|
+
},
|
|
534
|
+
tag: {
|
|
535
|
+
type: String,
|
|
536
|
+
default: 'div'
|
|
537
|
+
},
|
|
538
|
+
event: {
|
|
539
|
+
type: String,
|
|
540
|
+
default: 'hook:updated'
|
|
541
|
+
}
|
|
542
|
+
},
|
|
543
|
+
methods: {
|
|
544
|
+
refresh: function refresh() {
|
|
545
|
+
this.$forceUpdate();
|
|
546
|
+
}
|
|
547
|
+
},
|
|
548
|
+
created: function created() {
|
|
549
|
+
if (isVueComponent(this.component)) {
|
|
550
|
+
this.component.$on(this.event, this.refresh);
|
|
551
|
+
}
|
|
552
|
+
},
|
|
553
|
+
beforeDestroy: function beforeDestroy() {
|
|
554
|
+
if (isVueComponent(this.component)) {
|
|
555
|
+
this.component.$off(this.event, this.refresh);
|
|
556
|
+
}
|
|
557
|
+
},
|
|
558
|
+
render: function render(createElement) {
|
|
559
|
+
if (isVueComponent(this.component)) {
|
|
560
|
+
return createElement(this.tag, {}, this.scoped ? this.component.$scopedSlots[this.name](this.props) : this.component.$slots[this.name]);
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
};
|
|
564
|
+
|
|
565
|
+
var items = 1;
|
|
566
|
+
var sorted$1 = 3;
|
|
567
|
+
var Sorted$1 = sorted$1;
|
|
568
|
+
var ProviderParentMixin = (function (itemName) {
|
|
569
|
+
var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
570
|
+
var mixin = {
|
|
571
|
+
provide: function provide() {
|
|
572
|
+
return _defineProperty({}, 'b' + itemName, this);
|
|
573
|
+
}
|
|
574
|
+
};
|
|
575
|
+
if (hasFlag(flags, items)) {
|
|
576
|
+
mixin.data = function () {
|
|
577
|
+
return {
|
|
578
|
+
childItems: []
|
|
579
|
+
};
|
|
580
|
+
};
|
|
581
|
+
mixin.methods = {
|
|
582
|
+
_registerItem: function _registerItem(item) {
|
|
583
|
+
this.childItems.push(item);
|
|
584
|
+
},
|
|
585
|
+
_unregisterItem: function _unregisterItem(item) {
|
|
586
|
+
this.childItems = this.childItems.filter(function (i) {
|
|
587
|
+
return i !== item;
|
|
588
|
+
});
|
|
589
|
+
}
|
|
590
|
+
};
|
|
591
|
+
if (hasFlag(flags, sorted$1)) {
|
|
592
|
+
mixin.watch = {
|
|
593
|
+
/**
|
|
594
|
+
* When items are added/removed deep search in the elements default's slot
|
|
595
|
+
* And mark the items with their index
|
|
596
|
+
*/
|
|
597
|
+
childItems: function childItems(items) {
|
|
598
|
+
if (items.length > 0 && this.$scopedSlots.default) {
|
|
599
|
+
var tag = items[0].$vnode.tag;
|
|
600
|
+
var index = 0;
|
|
601
|
+
var deepSearch = function deepSearch(children) {
|
|
602
|
+
var _iterator = _createForOfIteratorHelper(children),
|
|
603
|
+
_step;
|
|
604
|
+
try {
|
|
605
|
+
var _loop = function _loop() {
|
|
606
|
+
var child = _step.value;
|
|
607
|
+
if (child.tag === tag) {
|
|
608
|
+
// An item with the same tag will for sure be found
|
|
609
|
+
var it = items.find(function (i) {
|
|
610
|
+
return i.$vnode === child;
|
|
611
|
+
});
|
|
612
|
+
if (it) {
|
|
613
|
+
it.index = index++;
|
|
614
|
+
}
|
|
615
|
+
} else if (child.tag) {
|
|
616
|
+
var sub = child.componentInstance ? child.componentInstance.$scopedSlots.default ? child.componentInstance.$scopedSlots.default() : child.componentInstance.$children : child.children;
|
|
617
|
+
if (Array.isArray(sub) && sub.length > 0) {
|
|
618
|
+
deepSearch(sub.map(function (e) {
|
|
619
|
+
return e.$vnode;
|
|
620
|
+
}));
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
};
|
|
624
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
625
|
+
_loop();
|
|
626
|
+
}
|
|
627
|
+
} catch (err) {
|
|
628
|
+
_iterator.e(err);
|
|
629
|
+
} finally {
|
|
630
|
+
_iterator.f();
|
|
631
|
+
}
|
|
632
|
+
return false;
|
|
633
|
+
};
|
|
634
|
+
deepSearch(this.$scopedSlots.default());
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
};
|
|
638
|
+
mixin.computed = {
|
|
639
|
+
/**
|
|
640
|
+
* When items are added/removed sort them according to their position
|
|
641
|
+
*/
|
|
642
|
+
sortedItems: function sortedItems() {
|
|
643
|
+
return this.childItems.slice().sort(function (i1, i2) {
|
|
644
|
+
return i1.index - i2.index;
|
|
645
|
+
});
|
|
646
|
+
}
|
|
647
|
+
};
|
|
648
|
+
}
|
|
649
|
+
}
|
|
650
|
+
return mixin;
|
|
651
|
+
});
|
|
652
|
+
|
|
653
|
+
var TabbedMixin = (function (cmp) {
|
|
654
|
+
return {
|
|
655
|
+
mixins: [ProviderParentMixin(cmp, Sorted$1)],
|
|
656
|
+
components: _defineProperty(_defineProperty({}, Icon.name, Icon), SlotComponent.name, SlotComponent),
|
|
657
|
+
props: {
|
|
658
|
+
value: {
|
|
659
|
+
type: [String, Number],
|
|
660
|
+
default: undefined
|
|
661
|
+
},
|
|
662
|
+
size: String,
|
|
663
|
+
animated: {
|
|
664
|
+
type: Boolean,
|
|
665
|
+
default: true
|
|
666
|
+
},
|
|
667
|
+
animation: String,
|
|
668
|
+
animateInitially: Boolean,
|
|
669
|
+
vertical: {
|
|
670
|
+
type: Boolean,
|
|
671
|
+
default: false
|
|
672
|
+
},
|
|
673
|
+
position: String,
|
|
674
|
+
destroyOnHide: {
|
|
675
|
+
type: Boolean,
|
|
676
|
+
default: false
|
|
677
|
+
}
|
|
678
|
+
},
|
|
679
|
+
data: function data() {
|
|
680
|
+
return {
|
|
681
|
+
activeId: this.value,
|
|
682
|
+
// Internal state
|
|
683
|
+
defaultSlots: [],
|
|
684
|
+
contentHeight: 0,
|
|
685
|
+
isTransitioning: false
|
|
686
|
+
};
|
|
687
|
+
},
|
|
688
|
+
mounted: function mounted() {
|
|
689
|
+
if (typeof this.value === 'number') {
|
|
690
|
+
// Backward compatibility: converts the index value to an id
|
|
691
|
+
var value = bound(this.value, 0, this.items.length - 1);
|
|
692
|
+
this.activeId = this.items[value].value;
|
|
693
|
+
} else {
|
|
694
|
+
this.activeId = this.value;
|
|
695
|
+
}
|
|
696
|
+
},
|
|
697
|
+
computed: {
|
|
698
|
+
activeItem: function activeItem() {
|
|
699
|
+
var _this = this;
|
|
700
|
+
return this.activeId === undefined ? this.items[0] : this.activeId === null ? null : this.childItems.find(function (i) {
|
|
701
|
+
return i.value === _this.activeId;
|
|
702
|
+
});
|
|
703
|
+
},
|
|
704
|
+
items: function items() {
|
|
705
|
+
return this.sortedItems;
|
|
706
|
+
}
|
|
707
|
+
},
|
|
708
|
+
watch: {
|
|
709
|
+
/**
|
|
710
|
+
* When v-model is changed set the new active tab.
|
|
711
|
+
*/
|
|
712
|
+
value: function value(_value) {
|
|
713
|
+
if (typeof _value === 'number') {
|
|
714
|
+
// Backward compatibility: converts the index value to an id
|
|
715
|
+
_value = bound(_value, 0, this.items.length - 1);
|
|
716
|
+
this.activeId = this.items[_value].value;
|
|
717
|
+
} else {
|
|
718
|
+
this.activeId = _value;
|
|
719
|
+
}
|
|
720
|
+
},
|
|
721
|
+
/**
|
|
722
|
+
* Sync internal state with external state
|
|
723
|
+
*/
|
|
724
|
+
activeId: function activeId(val, oldValue) {
|
|
725
|
+
var oldTab = oldValue !== undefined && oldValue !== null ? this.childItems.find(function (i) {
|
|
726
|
+
return i.value === oldValue;
|
|
727
|
+
}) : null;
|
|
728
|
+
if (oldTab && this.activeItem) {
|
|
729
|
+
oldTab.deactivate(this.activeItem.index);
|
|
730
|
+
this.activeItem.activate(oldTab.index);
|
|
731
|
+
}
|
|
732
|
+
val = this.activeItem ? typeof this.value === 'number' ? this.items.indexOf(this.activeItem) : this.activeItem.value : undefined;
|
|
733
|
+
if (val !== this.value) {
|
|
734
|
+
this.$emit('input', val);
|
|
735
|
+
}
|
|
736
|
+
}
|
|
737
|
+
},
|
|
738
|
+
methods: {
|
|
739
|
+
/**
|
|
740
|
+
* Child click listener, emit input event and change active child.
|
|
741
|
+
*/
|
|
742
|
+
childClick: function childClick(child) {
|
|
743
|
+
this.activeId = child.value;
|
|
744
|
+
},
|
|
745
|
+
getNextItemIdx: function getNextItemIdx(fromIdx) {
|
|
746
|
+
var skipDisabled = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
747
|
+
var nextItemIdx = null;
|
|
748
|
+
var idx = fromIdx + 1;
|
|
749
|
+
for (; idx < this.items.length; idx++) {
|
|
750
|
+
var item = this.items[idx];
|
|
751
|
+
if (item.visible && (!skipDisabled || skipDisabled && !item.disabled)) {
|
|
752
|
+
nextItemIdx = idx;
|
|
753
|
+
break;
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
return nextItemIdx;
|
|
757
|
+
},
|
|
758
|
+
getPrevItemIdx: function getPrevItemIdx(fromIdx) {
|
|
759
|
+
var skipDisabled = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
760
|
+
var prevItemIdx = null;
|
|
761
|
+
for (var idx = fromIdx - 1; idx >= 0; idx--) {
|
|
762
|
+
var item = this.items[idx];
|
|
763
|
+
if (item.visible && (!skipDisabled || skipDisabled && !item.disabled)) {
|
|
764
|
+
prevItemIdx = idx;
|
|
765
|
+
break;
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
return prevItemIdx;
|
|
769
|
+
}
|
|
770
|
+
}
|
|
771
|
+
};
|
|
772
|
+
});
|
|
773
|
+
|
|
774
|
+
var script$1 = {
|
|
775
|
+
name: 'BTabs',
|
|
776
|
+
mixins: [TabbedMixin('tab')],
|
|
777
|
+
props: {
|
|
778
|
+
expanded: {
|
|
779
|
+
type: Boolean,
|
|
780
|
+
default: function _default() {
|
|
781
|
+
return config.defaultTabsExpanded;
|
|
782
|
+
}
|
|
783
|
+
},
|
|
784
|
+
type: {
|
|
785
|
+
type: [String, Object],
|
|
786
|
+
default: function _default() {
|
|
787
|
+
return config.defaultTabsType;
|
|
788
|
+
}
|
|
789
|
+
},
|
|
790
|
+
animated: {
|
|
791
|
+
type: Boolean,
|
|
792
|
+
default: function _default() {
|
|
793
|
+
return config.defaultTabsAnimated;
|
|
794
|
+
}
|
|
795
|
+
},
|
|
796
|
+
multiline: Boolean
|
|
797
|
+
},
|
|
798
|
+
data: function data() {
|
|
799
|
+
return {
|
|
800
|
+
currentFocus: this.value
|
|
801
|
+
};
|
|
802
|
+
},
|
|
803
|
+
computed: {
|
|
804
|
+
mainClasses: function mainClasses() {
|
|
805
|
+
return _defineProperty({
|
|
806
|
+
'is-fullwidth': this.expanded,
|
|
807
|
+
'is-vertical': this.vertical,
|
|
808
|
+
'is-multiline': this.multiline
|
|
809
|
+
}, this.position, this.position && this.vertical);
|
|
810
|
+
},
|
|
811
|
+
navClasses: function navClasses() {
|
|
812
|
+
return [this.type, this.size, _defineProperty(_defineProperty(_defineProperty({}, this.position, this.position && !this.vertical), 'is-fullwidth', this.expanded), 'is-toggle', this.type === 'is-toggle-rounded')];
|
|
813
|
+
}
|
|
814
|
+
},
|
|
815
|
+
methods: {
|
|
816
|
+
giveFocusToTab: function giveFocusToTab(tab) {
|
|
817
|
+
if (tab.$el && tab.$el.focus) {
|
|
818
|
+
tab.$el.focus();
|
|
819
|
+
} else if (tab.focus) {
|
|
820
|
+
tab.focus();
|
|
821
|
+
}
|
|
822
|
+
},
|
|
823
|
+
manageTablistKeydown: function manageTablistKeydown(event) {
|
|
824
|
+
// https://developer.mozilla.org/fr/docs/Web/API/KeyboardEvent/key/Key_Values#Navigation_keys
|
|
825
|
+
var key = event.key;
|
|
826
|
+
switch (key) {
|
|
827
|
+
case this.vertical ? 'ArrowUp' : 'ArrowLeft':
|
|
828
|
+
case this.vertical ? 'Up' : 'Left':
|
|
829
|
+
{
|
|
830
|
+
var prevIdx = this.getPrevItemIdx(this.currentFocus, true);
|
|
831
|
+
if (prevIdx === null) {
|
|
832
|
+
// We try to give focus back to the last visible element
|
|
833
|
+
prevIdx = this.getPrevItemIdx(this.items.length, true);
|
|
834
|
+
}
|
|
835
|
+
if (prevIdx !== null && this.$refs.tabLink && prevIdx < this.$refs.tabLink.length && !this.items[prevIdx].disabled) {
|
|
836
|
+
this.giveFocusToTab(this.$refs.tabLink[prevIdx]);
|
|
837
|
+
}
|
|
838
|
+
event.preventDefault();
|
|
839
|
+
break;
|
|
840
|
+
}
|
|
841
|
+
case this.vertical ? 'ArrowDown' : 'ArrowRight':
|
|
842
|
+
case this.vertical ? 'Down' : 'Right':
|
|
843
|
+
{
|
|
844
|
+
var nextIdx = this.getNextItemIdx(this.currentFocus, true);
|
|
845
|
+
if (nextIdx === null) {
|
|
846
|
+
// We try to give focus back to the first visible element
|
|
847
|
+
nextIdx = this.getNextItemIdx(-1, true);
|
|
848
|
+
}
|
|
849
|
+
if (nextIdx !== null && this.$refs.tabLink && nextIdx < this.$refs.tabLink.length && !this.items[nextIdx].disabled) {
|
|
850
|
+
this.giveFocusToTab(this.$refs.tabLink[nextIdx]);
|
|
851
|
+
}
|
|
852
|
+
event.preventDefault();
|
|
853
|
+
break;
|
|
854
|
+
}
|
|
855
|
+
}
|
|
856
|
+
},
|
|
857
|
+
manageTabKeydown: function manageTabKeydown(event, childItem) {
|
|
858
|
+
// https://developer.mozilla.org/fr/docs/Web/API/KeyboardEvent/key/Key_Values#Navigation_keys
|
|
859
|
+
var key = event.key;
|
|
860
|
+
switch (key) {
|
|
861
|
+
case ' ':
|
|
862
|
+
case 'Space':
|
|
863
|
+
case 'Spacebar':
|
|
864
|
+
case 'Enter':
|
|
865
|
+
{
|
|
866
|
+
this.childClick(childItem);
|
|
867
|
+
event.preventDefault();
|
|
868
|
+
break;
|
|
869
|
+
}
|
|
870
|
+
}
|
|
871
|
+
}
|
|
872
|
+
}
|
|
873
|
+
};
|
|
874
|
+
|
|
875
|
+
/* script */
|
|
876
|
+
const __vue_script__$1 = script$1;
|
|
877
|
+
|
|
878
|
+
/* template */
|
|
879
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"b-tabs",class:_vm.mainClasses},[_c('nav',{staticClass:"tabs",class:_vm.navClasses,on:{"keydown":_vm.manageTablistKeydown}},[_vm._t("start"),_c('ul',{attrs:{"aria-orientation":_vm.vertical ? 'vertical' : 'horizontal',"role":"tablist"}},_vm._l((_vm.items),function(childItem,childIdx){return _c('li',{directives:[{name:"show",rawName:"v-show",value:(childItem.visible),expression:"childItem.visible"}],key:childItem.value,class:[ childItem.headerClass, { 'is-active': childItem.isActive,
|
|
880
|
+
'is-disabled': childItem.disabled }],attrs:{"role":"tab","aria-controls":((childItem.value) + "-content"),"aria-selected":("" + (childItem.isActive))}},[(childItem.$scopedSlots.header)?_c('b-slot-component',{ref:"tabLink",refInFor:true,attrs:{"component":childItem,"name":"header","tag":"a","id":((childItem.value) + "-label"),"tabindex":childItem.isActive ? 0 : -1},on:{"keydown":function($event){return _vm.manageTabKeydown($event, childItem)}},nativeOn:{"focus":function($event){_vm.currentFocus = childIdx;},"click":function($event){return _vm.childClick(childItem)}}}):_c('a',{ref:"tabLink",refInFor:true,attrs:{"id":((childItem.value) + "-label"),"tabindex":childItem.isActive ? 0 : -1},on:{"focus":function($event){_vm.currentFocus = childIdx;},"click":function($event){return _vm.childClick(childItem)},"keydown":function($event){return _vm.manageTabKeydown($event, childItem)}}},[(childItem.icon)?_c('b-icon',{attrs:{"icon":childItem.icon,"pack":childItem.iconPack,"size":_vm.size}}):_vm._e(),_c('span',[_vm._v(_vm._s(childItem.label))])],1)],1)}),0),_vm._t("end")],2),_c('section',{staticClass:"tab-content",class:{'is-transitioning': _vm.isTransitioning}},[_vm._t("default")],2)])};
|
|
881
|
+
var __vue_staticRenderFns__ = [];
|
|
882
|
+
|
|
883
|
+
/* style */
|
|
884
|
+
const __vue_inject_styles__$1 = undefined;
|
|
885
|
+
/* scoped */
|
|
886
|
+
const __vue_scope_id__$1 = undefined;
|
|
887
|
+
/* module identifier */
|
|
888
|
+
const __vue_module_identifier__$1 = undefined;
|
|
889
|
+
/* functional template */
|
|
890
|
+
const __vue_is_functional_template__$1 = false;
|
|
891
|
+
/* style inject */
|
|
892
|
+
|
|
893
|
+
/* style inject SSR */
|
|
894
|
+
|
|
895
|
+
/* style inject shadow dom */
|
|
896
|
+
|
|
897
|
+
|
|
898
|
+
|
|
899
|
+
const __vue_component__$1 = /*#__PURE__*/normalizeComponent(
|
|
900
|
+
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
|
|
901
|
+
__vue_inject_styles__$1,
|
|
902
|
+
__vue_script__$1,
|
|
903
|
+
__vue_scope_id__$1,
|
|
904
|
+
__vue_is_functional_template__$1,
|
|
905
|
+
__vue_module_identifier__$1,
|
|
906
|
+
false,
|
|
907
|
+
undefined,
|
|
908
|
+
undefined,
|
|
909
|
+
undefined
|
|
910
|
+
);
|
|
911
|
+
|
|
912
|
+
var Tabs = __vue_component__$1;
|
|
913
|
+
|
|
914
|
+
var sorted = 1;
|
|
915
|
+
var optional = 2;
|
|
916
|
+
var Sorted = sorted;
|
|
917
|
+
var InjectedChildMixin = (function (parentItemName) {
|
|
918
|
+
var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
919
|
+
var mixin = {
|
|
920
|
+
inject: {
|
|
921
|
+
parent: {
|
|
922
|
+
from: 'b' + parentItemName,
|
|
923
|
+
default: false
|
|
924
|
+
}
|
|
925
|
+
},
|
|
926
|
+
created: function created() {
|
|
927
|
+
if (!this.parent) {
|
|
928
|
+
if (!hasFlag(flags, optional)) {
|
|
929
|
+
this.$destroy();
|
|
930
|
+
throw new Error('You should wrap ' + this.$options.name + ' in a ' + parentItemName);
|
|
931
|
+
}
|
|
932
|
+
} else if (this.parent._registerItem) {
|
|
933
|
+
this.parent._registerItem(this);
|
|
934
|
+
}
|
|
935
|
+
},
|
|
936
|
+
beforeDestroy: function beforeDestroy() {
|
|
937
|
+
if (this.parent && this.parent._unregisterItem) {
|
|
938
|
+
this.parent._unregisterItem(this);
|
|
939
|
+
}
|
|
940
|
+
}
|
|
941
|
+
};
|
|
942
|
+
if (hasFlag(flags, sorted)) {
|
|
943
|
+
mixin.data = function () {
|
|
944
|
+
return {
|
|
945
|
+
index: null
|
|
946
|
+
};
|
|
947
|
+
};
|
|
948
|
+
}
|
|
949
|
+
return mixin;
|
|
950
|
+
});
|
|
951
|
+
|
|
952
|
+
var TabbedChildMixin = (function (parentCmp) {
|
|
953
|
+
return {
|
|
954
|
+
mixins: [InjectedChildMixin(parentCmp, Sorted)],
|
|
955
|
+
props: {
|
|
956
|
+
label: String,
|
|
957
|
+
icon: String,
|
|
958
|
+
iconPack: String,
|
|
959
|
+
visible: {
|
|
960
|
+
type: Boolean,
|
|
961
|
+
default: true
|
|
962
|
+
},
|
|
963
|
+
value: {
|
|
964
|
+
type: String,
|
|
965
|
+
default: function _default() {
|
|
966
|
+
return this._uid.toString();
|
|
967
|
+
}
|
|
968
|
+
},
|
|
969
|
+
headerClass: {
|
|
970
|
+
type: [String, Array, Object],
|
|
971
|
+
default: null
|
|
972
|
+
}
|
|
973
|
+
},
|
|
974
|
+
data: function data() {
|
|
975
|
+
return {
|
|
976
|
+
transitionName: null,
|
|
977
|
+
elementClass: 'item',
|
|
978
|
+
elementRole: null
|
|
979
|
+
};
|
|
980
|
+
},
|
|
981
|
+
computed: {
|
|
982
|
+
isActive: function isActive() {
|
|
983
|
+
return this.parent.activeItem === this;
|
|
984
|
+
}
|
|
985
|
+
},
|
|
986
|
+
methods: {
|
|
987
|
+
/**
|
|
988
|
+
* Activate element, alter animation name based on the index.
|
|
989
|
+
*/
|
|
990
|
+
activate: function activate(oldIndex) {
|
|
991
|
+
this.transitionName = this.index < oldIndex ? this.parent.vertical ? 'slide-down' : 'slide-next' : this.parent.vertical ? 'slide-up' : 'slide-prev';
|
|
992
|
+
},
|
|
993
|
+
/**
|
|
994
|
+
* Deactivate element, alter animation name based on the index.
|
|
995
|
+
*/
|
|
996
|
+
deactivate: function deactivate(newIndex) {
|
|
997
|
+
this.transitionName = newIndex < this.index ? this.parent.vertical ? 'slide-down' : 'slide-next' : this.parent.vertical ? 'slide-up' : 'slide-prev';
|
|
998
|
+
}
|
|
999
|
+
},
|
|
1000
|
+
render: function render(createElement) {
|
|
1001
|
+
var _this = this;
|
|
1002
|
+
// if destroy apply v-if
|
|
1003
|
+
if (this.parent.destroyOnHide) {
|
|
1004
|
+
if (!this.isActive || !this.visible) {
|
|
1005
|
+
return;
|
|
1006
|
+
}
|
|
1007
|
+
}
|
|
1008
|
+
var vnode = createElement('div', {
|
|
1009
|
+
directives: [{
|
|
1010
|
+
name: 'show',
|
|
1011
|
+
value: this.isActive && this.visible
|
|
1012
|
+
}],
|
|
1013
|
+
staticClass: this.elementClass,
|
|
1014
|
+
attrs: {
|
|
1015
|
+
'role': this.elementRole,
|
|
1016
|
+
'id': "".concat(this.value, "-content"),
|
|
1017
|
+
'aria-labelledby': this.elementRole ? "".concat(this.value, "-label") : null,
|
|
1018
|
+
'tabindex': this.isActive ? 0 : -1
|
|
1019
|
+
}
|
|
1020
|
+
}, this.$slots.default);
|
|
1021
|
+
// check animated prop
|
|
1022
|
+
if (this.parent.animated) {
|
|
1023
|
+
return createElement('transition', {
|
|
1024
|
+
props: {
|
|
1025
|
+
'name': this.parent.animation || this.transitionName,
|
|
1026
|
+
'appear': this.parent.animateInitially === true || undefined
|
|
1027
|
+
},
|
|
1028
|
+
on: {
|
|
1029
|
+
'before-enter': function beforeEnter() {
|
|
1030
|
+
_this.parent.isTransitioning = true;
|
|
1031
|
+
},
|
|
1032
|
+
'after-enter': function afterEnter() {
|
|
1033
|
+
_this.parent.isTransitioning = false;
|
|
1034
|
+
}
|
|
1035
|
+
}
|
|
1036
|
+
}, [vnode]);
|
|
1037
|
+
}
|
|
1038
|
+
return vnode;
|
|
1039
|
+
}
|
|
1040
|
+
};
|
|
1041
|
+
});
|
|
1042
|
+
|
|
1043
|
+
var script = {
|
|
1044
|
+
name: 'BTabItem',
|
|
1045
|
+
mixins: [TabbedChildMixin('tab')],
|
|
1046
|
+
props: {
|
|
1047
|
+
disabled: Boolean
|
|
1048
|
+
},
|
|
1049
|
+
data: function data() {
|
|
1050
|
+
return {
|
|
1051
|
+
elementClass: 'tab-item',
|
|
1052
|
+
elementRole: 'tabpanel'
|
|
1053
|
+
};
|
|
1054
|
+
}
|
|
1055
|
+
};
|
|
1056
|
+
|
|
1057
|
+
/* script */
|
|
1058
|
+
const __vue_script__ = script;
|
|
1059
|
+
|
|
1060
|
+
/* template */
|
|
1061
|
+
|
|
1062
|
+
/* style */
|
|
1063
|
+
const __vue_inject_styles__ = undefined;
|
|
1064
|
+
/* scoped */
|
|
1065
|
+
const __vue_scope_id__ = undefined;
|
|
1066
|
+
/* module identifier */
|
|
1067
|
+
const __vue_module_identifier__ = undefined;
|
|
1068
|
+
/* functional template */
|
|
1069
|
+
const __vue_is_functional_template__ = undefined;
|
|
1070
|
+
/* style inject */
|
|
1071
|
+
|
|
1072
|
+
/* style inject SSR */
|
|
1073
|
+
|
|
1074
|
+
/* style inject shadow dom */
|
|
1075
|
+
|
|
1076
|
+
|
|
1077
|
+
|
|
1078
|
+
const __vue_component__ = /*#__PURE__*/normalizeComponent(
|
|
1079
|
+
{},
|
|
1080
|
+
__vue_inject_styles__,
|
|
1081
|
+
__vue_script__,
|
|
1082
|
+
__vue_scope_id__,
|
|
1083
|
+
__vue_is_functional_template__,
|
|
1084
|
+
__vue_module_identifier__,
|
|
1085
|
+
false,
|
|
1086
|
+
undefined,
|
|
1087
|
+
undefined,
|
|
1088
|
+
undefined
|
|
1089
|
+
);
|
|
1090
|
+
|
|
1091
|
+
var TabItem = __vue_component__;
|
|
1092
|
+
|
|
1093
|
+
var use = function use(plugin) {
|
|
1094
|
+
if (typeof window !== 'undefined' && window.Vue) {
|
|
1095
|
+
window.Vue.use(plugin);
|
|
1096
|
+
}
|
|
1097
|
+
};
|
|
1098
|
+
var registerComponent = function registerComponent(Vue, component) {
|
|
1099
|
+
Vue.component(component.name, component);
|
|
1100
|
+
};
|
|
1101
|
+
|
|
1102
|
+
var Plugin = {
|
|
1103
|
+
install: function install(Vue) {
|
|
1104
|
+
registerComponent(Vue, Tabs);
|
|
1105
|
+
registerComponent(Vue, TabItem);
|
|
1106
|
+
}
|
|
1107
|
+
};
|
|
1108
|
+
use(Plugin);
|
|
1109
|
+
|
|
1110
|
+
exports.BTabItem = TabItem;
|
|
1111
|
+
exports.BTabs = Tabs;
|
|
1112
|
+
exports["default"] = Plugin;
|
|
1113
|
+
|
|
1114
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
1115
|
+
|
|
1116
|
+
}));
|