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,313 @@
|
|
|
1
|
+
import { _ as _defineProperty } from './_rollupPluginBabelHelpers-df313029.js';
|
|
2
|
+
import { c as config } from './config-e7d4b9c2.js';
|
|
3
|
+
import { n as normalizeComponent } from './plugins-218aea86.js';
|
|
4
|
+
|
|
5
|
+
var script$1 = {
|
|
6
|
+
name: 'BFieldBody',
|
|
7
|
+
props: {
|
|
8
|
+
message: {
|
|
9
|
+
type: [String, Array]
|
|
10
|
+
},
|
|
11
|
+
type: {
|
|
12
|
+
type: [String, Object]
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
render: function render(createElement) {
|
|
16
|
+
var _this = this;
|
|
17
|
+
var first = true;
|
|
18
|
+
return createElement('div', {
|
|
19
|
+
attrs: {
|
|
20
|
+
'class': 'field-body'
|
|
21
|
+
}
|
|
22
|
+
}, this.$slots.default.map(function (element) {
|
|
23
|
+
// skip returns and comments
|
|
24
|
+
if (!element.tag) {
|
|
25
|
+
return element;
|
|
26
|
+
}
|
|
27
|
+
var message;
|
|
28
|
+
if (first) {
|
|
29
|
+
message = _this.message;
|
|
30
|
+
first = false;
|
|
31
|
+
}
|
|
32
|
+
return createElement('b-field', {
|
|
33
|
+
attrs: {
|
|
34
|
+
type: _this.type,
|
|
35
|
+
message: message
|
|
36
|
+
}
|
|
37
|
+
}, [element]);
|
|
38
|
+
}));
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
/* script */
|
|
43
|
+
const __vue_script__$1 = script$1;
|
|
44
|
+
|
|
45
|
+
/* template */
|
|
46
|
+
|
|
47
|
+
/* style */
|
|
48
|
+
const __vue_inject_styles__$1 = undefined;
|
|
49
|
+
/* scoped */
|
|
50
|
+
const __vue_scope_id__$1 = undefined;
|
|
51
|
+
/* module identifier */
|
|
52
|
+
const __vue_module_identifier__$1 = undefined;
|
|
53
|
+
/* functional template */
|
|
54
|
+
const __vue_is_functional_template__$1 = undefined;
|
|
55
|
+
/* style inject */
|
|
56
|
+
|
|
57
|
+
/* style inject SSR */
|
|
58
|
+
|
|
59
|
+
/* style inject shadow dom */
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
const __vue_component__$1 = /*#__PURE__*/normalizeComponent(
|
|
64
|
+
{},
|
|
65
|
+
__vue_inject_styles__$1,
|
|
66
|
+
__vue_script__$1,
|
|
67
|
+
__vue_scope_id__$1,
|
|
68
|
+
__vue_is_functional_template__$1,
|
|
69
|
+
__vue_module_identifier__$1,
|
|
70
|
+
false,
|
|
71
|
+
undefined,
|
|
72
|
+
undefined,
|
|
73
|
+
undefined
|
|
74
|
+
);
|
|
75
|
+
|
|
76
|
+
var FieldBody = __vue_component__$1;
|
|
77
|
+
|
|
78
|
+
var script = {
|
|
79
|
+
name: 'BField',
|
|
80
|
+
components: _defineProperty({}, FieldBody.name, FieldBody),
|
|
81
|
+
provide: function provide() {
|
|
82
|
+
return {
|
|
83
|
+
'BField': this
|
|
84
|
+
};
|
|
85
|
+
},
|
|
86
|
+
inject: {
|
|
87
|
+
parent: {
|
|
88
|
+
from: 'BField',
|
|
89
|
+
default: false
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
// Used internally only when using Field in Field
|
|
93
|
+
props: {
|
|
94
|
+
type: [String, Object],
|
|
95
|
+
label: String,
|
|
96
|
+
labelFor: String,
|
|
97
|
+
message: [String, Array, Object],
|
|
98
|
+
grouped: Boolean,
|
|
99
|
+
groupMultiline: Boolean,
|
|
100
|
+
position: String,
|
|
101
|
+
expanded: Boolean,
|
|
102
|
+
horizontal: Boolean,
|
|
103
|
+
addons: {
|
|
104
|
+
type: Boolean,
|
|
105
|
+
default: true
|
|
106
|
+
},
|
|
107
|
+
customClass: String,
|
|
108
|
+
labelPosition: {
|
|
109
|
+
type: String,
|
|
110
|
+
default: function _default() {
|
|
111
|
+
return config.defaultFieldLabelPosition;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
data: function data() {
|
|
116
|
+
return {
|
|
117
|
+
newType: this.type,
|
|
118
|
+
newMessage: this.message,
|
|
119
|
+
fieldLabelSize: null,
|
|
120
|
+
_isField: true // Used internally by Input and Select
|
|
121
|
+
};
|
|
122
|
+
},
|
|
123
|
+
computed: {
|
|
124
|
+
rootClasses: function rootClasses() {
|
|
125
|
+
return [{
|
|
126
|
+
'is-expanded': this.expanded,
|
|
127
|
+
'is-horizontal': this.horizontal,
|
|
128
|
+
'is-floating-in-label': this.hasLabel && !this.horizontal && this.labelPosition === 'inside',
|
|
129
|
+
'is-floating-label': this.hasLabel && !this.horizontal && this.labelPosition === 'on-border'
|
|
130
|
+
}, this.numberInputClasses];
|
|
131
|
+
},
|
|
132
|
+
innerFieldClasses: function innerFieldClasses() {
|
|
133
|
+
return [this.fieldType(), this.newPosition, {
|
|
134
|
+
'is-grouped-multiline': this.groupMultiline
|
|
135
|
+
}];
|
|
136
|
+
},
|
|
137
|
+
hasInnerField: function hasInnerField() {
|
|
138
|
+
return this.grouped || this.groupMultiline || this.hasAddons();
|
|
139
|
+
},
|
|
140
|
+
/**
|
|
141
|
+
* Correct Bulma class for the side of the addon or group.
|
|
142
|
+
*
|
|
143
|
+
* This is not kept like the others (is-small, etc.),
|
|
144
|
+
* because since 'has-addons' is set automatically it
|
|
145
|
+
* doesn't make sense to teach users what addons are exactly.
|
|
146
|
+
*/
|
|
147
|
+
newPosition: function newPosition() {
|
|
148
|
+
if (this.position === undefined) return;
|
|
149
|
+
var position = this.position.split('-');
|
|
150
|
+
if (position.length < 1) return;
|
|
151
|
+
var prefix = this.grouped ? 'is-grouped-' : 'has-addons-';
|
|
152
|
+
if (this.position) return prefix + position[1];
|
|
153
|
+
},
|
|
154
|
+
/**
|
|
155
|
+
* Formatted message in case it's an array
|
|
156
|
+
* (each element is separated by <br> tag)
|
|
157
|
+
*/
|
|
158
|
+
formattedMessage: function formattedMessage() {
|
|
159
|
+
if (this.parent && this.parent.hasInnerField) {
|
|
160
|
+
return ''; // Message will be displayed in parent field
|
|
161
|
+
}
|
|
162
|
+
if (typeof this.newMessage === 'string') {
|
|
163
|
+
return [this.newMessage];
|
|
164
|
+
}
|
|
165
|
+
var messages = [];
|
|
166
|
+
if (Array.isArray(this.newMessage)) {
|
|
167
|
+
this.newMessage.forEach(function (message) {
|
|
168
|
+
if (typeof message === 'string') {
|
|
169
|
+
messages.push(message);
|
|
170
|
+
} else {
|
|
171
|
+
for (var key in message) {
|
|
172
|
+
if (message[key]) {
|
|
173
|
+
messages.push(key);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
});
|
|
178
|
+
} else {
|
|
179
|
+
for (var key in this.newMessage) {
|
|
180
|
+
if (this.newMessage[key]) {
|
|
181
|
+
messages.push(key);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
return messages.filter(function (m) {
|
|
186
|
+
if (m) return m;
|
|
187
|
+
});
|
|
188
|
+
},
|
|
189
|
+
hasLabel: function hasLabel() {
|
|
190
|
+
return this.label || this.$slots.label;
|
|
191
|
+
},
|
|
192
|
+
hasMessage: function hasMessage() {
|
|
193
|
+
return (!this.parent || !this.parent.hasInnerField) && this.newMessage || this.$slots.message;
|
|
194
|
+
},
|
|
195
|
+
numberInputClasses: function numberInputClasses() {
|
|
196
|
+
if (this.$slots.default) {
|
|
197
|
+
var numberinput = this.$slots.default.filter(function (node) {
|
|
198
|
+
return node.tag && node.tag.toLowerCase().indexOf('numberinput') >= 0;
|
|
199
|
+
})[0];
|
|
200
|
+
if (numberinput) {
|
|
201
|
+
var classes = ['has-numberinput'];
|
|
202
|
+
var controlsPosition = numberinput.componentOptions.propsData.controlsPosition;
|
|
203
|
+
var size = numberinput.componentOptions.propsData.size;
|
|
204
|
+
if (controlsPosition) {
|
|
205
|
+
classes.push("has-numberinput-".concat(controlsPosition));
|
|
206
|
+
}
|
|
207
|
+
if (size) {
|
|
208
|
+
classes.push("has-numberinput-".concat(size));
|
|
209
|
+
}
|
|
210
|
+
return classes;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
return null;
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
watch: {
|
|
217
|
+
/**
|
|
218
|
+
* Set internal type when prop change.
|
|
219
|
+
*/
|
|
220
|
+
type: function type(value) {
|
|
221
|
+
this.newType = value;
|
|
222
|
+
},
|
|
223
|
+
/**
|
|
224
|
+
* Set internal message when prop change.
|
|
225
|
+
*/
|
|
226
|
+
message: function message(value) {
|
|
227
|
+
this.newMessage = value;
|
|
228
|
+
},
|
|
229
|
+
/**
|
|
230
|
+
* Set parent message if we use Field in Field.
|
|
231
|
+
*/
|
|
232
|
+
newMessage: function newMessage(value) {
|
|
233
|
+
if (this.parent && this.parent.hasInnerField) {
|
|
234
|
+
if (!this.parent.type) {
|
|
235
|
+
this.parent.newType = this.newType;
|
|
236
|
+
}
|
|
237
|
+
if (!this.parent.message) {
|
|
238
|
+
this.parent.newMessage = value;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
},
|
|
243
|
+
methods: {
|
|
244
|
+
/**
|
|
245
|
+
* Field has addons if there are more than one slot
|
|
246
|
+
* (element / component) in the Field.
|
|
247
|
+
* Or is grouped when prop is set.
|
|
248
|
+
* Is a method to be called when component re-render.
|
|
249
|
+
*/
|
|
250
|
+
fieldType: function fieldType() {
|
|
251
|
+
if (this.grouped) return 'is-grouped';
|
|
252
|
+
if (this.hasAddons()) return 'has-addons';
|
|
253
|
+
},
|
|
254
|
+
hasAddons: function hasAddons() {
|
|
255
|
+
var renderedNode = 0;
|
|
256
|
+
if (this.$slots.default) {
|
|
257
|
+
renderedNode = this.$slots.default.reduce(function (i, node) {
|
|
258
|
+
return node.tag ? i + 1 : i;
|
|
259
|
+
}, 0);
|
|
260
|
+
}
|
|
261
|
+
return renderedNode > 1 && this.addons && !this.horizontal;
|
|
262
|
+
}
|
|
263
|
+
},
|
|
264
|
+
mounted: function mounted() {
|
|
265
|
+
if (this.horizontal) {
|
|
266
|
+
// Bulma docs: .is-normal for any .input or .button
|
|
267
|
+
var elements = this.$el.querySelectorAll('.input, .select, .button, .textarea, .b-slider');
|
|
268
|
+
if (elements.length > 0) {
|
|
269
|
+
this.fieldLabelSize = 'is-normal';
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
};
|
|
274
|
+
|
|
275
|
+
/* script */
|
|
276
|
+
const __vue_script__ = script;
|
|
277
|
+
|
|
278
|
+
/* template */
|
|
279
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"field",class:_vm.rootClasses},[(_vm.horizontal)?_c('div',{staticClass:"field-label",class:[_vm.customClass, _vm.fieldLabelSize]},[(_vm.hasLabel)?_c('label',{staticClass:"label",class:_vm.customClass,attrs:{"for":_vm.labelFor}},[(_vm.$slots.label)?_vm._t("label"):[_vm._v(_vm._s(_vm.label))]],2):_vm._e()]):[(_vm.hasLabel)?_c('label',{staticClass:"label",class:_vm.customClass,attrs:{"for":_vm.labelFor}},[(_vm.$slots.label)?_vm._t("label"):[_vm._v(_vm._s(_vm.label))]],2):_vm._e()],(_vm.horizontal)?_c('b-field-body',{attrs:{"message":_vm.newMessage ? _vm.formattedMessage : '',"type":_vm.newType}},[_vm._t("default")],2):(_vm.hasInnerField)?_c('div',{staticClass:"field-body"},[_c('b-field',{class:_vm.innerFieldClasses,attrs:{"addons":false,"type":_vm.type}},[_vm._t("default")],2)],1):[_vm._t("default")],(_vm.hasMessage && !_vm.horizontal)?_c('p',{staticClass:"help",class:_vm.newType},[(_vm.$slots.message)?_vm._t("message",null,{"messages":_vm.formattedMessage}):[_vm._l((_vm.formattedMessage),function(mess,i){return [_vm._v(" "+_vm._s(mess)+" "),((i + 1) < _vm.formattedMessage.length)?_c('br',{key:i}):_vm._e()]})]],2):_vm._e()],2)};
|
|
280
|
+
var __vue_staticRenderFns__ = [];
|
|
281
|
+
|
|
282
|
+
/* style */
|
|
283
|
+
const __vue_inject_styles__ = undefined;
|
|
284
|
+
/* scoped */
|
|
285
|
+
const __vue_scope_id__ = undefined;
|
|
286
|
+
/* module identifier */
|
|
287
|
+
const __vue_module_identifier__ = undefined;
|
|
288
|
+
/* functional template */
|
|
289
|
+
const __vue_is_functional_template__ = false;
|
|
290
|
+
/* style inject */
|
|
291
|
+
|
|
292
|
+
/* style inject SSR */
|
|
293
|
+
|
|
294
|
+
/* style inject shadow dom */
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
const __vue_component__ = /*#__PURE__*/normalizeComponent(
|
|
299
|
+
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
|
|
300
|
+
__vue_inject_styles__,
|
|
301
|
+
__vue_script__,
|
|
302
|
+
__vue_scope_id__,
|
|
303
|
+
__vue_is_functional_template__,
|
|
304
|
+
__vue_module_identifier__,
|
|
305
|
+
false,
|
|
306
|
+
undefined,
|
|
307
|
+
undefined,
|
|
308
|
+
undefined
|
|
309
|
+
);
|
|
310
|
+
|
|
311
|
+
var Field = __vue_component__;
|
|
312
|
+
|
|
313
|
+
export { Field as F };
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { c as config } from './config-e7d4b9c2.js';
|
|
2
|
+
import { isVueComponent } from './helpers.js';
|
|
3
|
+
|
|
4
|
+
var FormElementMixin = {
|
|
5
|
+
props: {
|
|
6
|
+
size: String,
|
|
7
|
+
expanded: Boolean,
|
|
8
|
+
loading: Boolean,
|
|
9
|
+
rounded: Boolean,
|
|
10
|
+
icon: String,
|
|
11
|
+
iconPack: String,
|
|
12
|
+
// Native options to use in HTML5 validation
|
|
13
|
+
autocomplete: String,
|
|
14
|
+
maxlength: [Number, String],
|
|
15
|
+
useHtml5Validation: {
|
|
16
|
+
type: Boolean,
|
|
17
|
+
default: function _default() {
|
|
18
|
+
return config.defaultUseHtml5Validation;
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
validationMessage: String,
|
|
22
|
+
locale: {
|
|
23
|
+
type: [String, Array],
|
|
24
|
+
default: function _default() {
|
|
25
|
+
return config.defaultLocale;
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
statusIcon: {
|
|
29
|
+
type: Boolean,
|
|
30
|
+
default: function _default() {
|
|
31
|
+
return config.defaultStatusIcon;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
data: function data() {
|
|
36
|
+
return {
|
|
37
|
+
isValid: true,
|
|
38
|
+
isFocused: false,
|
|
39
|
+
newIconPack: this.iconPack || config.defaultIconPack
|
|
40
|
+
};
|
|
41
|
+
},
|
|
42
|
+
computed: {
|
|
43
|
+
/**
|
|
44
|
+
* Find parent Field, max 3 levels deep.
|
|
45
|
+
*/
|
|
46
|
+
parentField: function parentField() {
|
|
47
|
+
var parent = this.$parent;
|
|
48
|
+
for (var i = 0; i < 3; i++) {
|
|
49
|
+
if (parent && !parent.$data._isField) {
|
|
50
|
+
parent = parent.$parent;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
return parent;
|
|
54
|
+
},
|
|
55
|
+
/**
|
|
56
|
+
* Get the type prop from parent if it's a Field.
|
|
57
|
+
*/
|
|
58
|
+
statusType: function statusType() {
|
|
59
|
+
var _ref = this.parentField || {},
|
|
60
|
+
newType = _ref.newType;
|
|
61
|
+
if (!newType) return;
|
|
62
|
+
if (typeof newType === 'string') {
|
|
63
|
+
return newType;
|
|
64
|
+
} else {
|
|
65
|
+
for (var key in newType) {
|
|
66
|
+
if (newType[key]) {
|
|
67
|
+
return key;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
/**
|
|
73
|
+
* Get the message prop from parent if it's a Field.
|
|
74
|
+
*/
|
|
75
|
+
statusMessage: function statusMessage() {
|
|
76
|
+
if (!this.parentField) return;
|
|
77
|
+
return this.parentField.newMessage || this.parentField.$slots.message;
|
|
78
|
+
},
|
|
79
|
+
/**
|
|
80
|
+
* Fix icon size for inputs, large was too big
|
|
81
|
+
*/
|
|
82
|
+
iconSize: function iconSize() {
|
|
83
|
+
switch (this.size) {
|
|
84
|
+
case 'is-small':
|
|
85
|
+
return this.size;
|
|
86
|
+
case 'is-medium':
|
|
87
|
+
return;
|
|
88
|
+
case 'is-large':
|
|
89
|
+
return this.newIconPack === 'mdi' ? 'is-medium' : '';
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
methods: {
|
|
94
|
+
/**
|
|
95
|
+
* Focus method that work dynamically depending on the component.
|
|
96
|
+
*/
|
|
97
|
+
focus: function focus() {
|
|
98
|
+
var el = this.getElement();
|
|
99
|
+
if (el === undefined) return;
|
|
100
|
+
this.$nextTick(function () {
|
|
101
|
+
if (el) el.focus();
|
|
102
|
+
});
|
|
103
|
+
},
|
|
104
|
+
onBlur: function onBlur($event) {
|
|
105
|
+
this.isFocused = false;
|
|
106
|
+
this.$emit('blur', $event);
|
|
107
|
+
this.checkHtml5Validity();
|
|
108
|
+
},
|
|
109
|
+
onFocus: function onFocus($event) {
|
|
110
|
+
this.isFocused = true;
|
|
111
|
+
this.$emit('focus', $event);
|
|
112
|
+
},
|
|
113
|
+
getElement: function getElement() {
|
|
114
|
+
var el = this.$refs[this.$data._elementRef];
|
|
115
|
+
while (isVueComponent(el)) {
|
|
116
|
+
el = el.$refs[el.$data._elementRef];
|
|
117
|
+
}
|
|
118
|
+
return el;
|
|
119
|
+
},
|
|
120
|
+
setInvalid: function setInvalid() {
|
|
121
|
+
var type = 'is-danger';
|
|
122
|
+
var message = this.validationMessage || this.getElement().validationMessage;
|
|
123
|
+
this.setValidity(type, message);
|
|
124
|
+
},
|
|
125
|
+
setValidity: function setValidity(type, message) {
|
|
126
|
+
var _this = this;
|
|
127
|
+
this.$nextTick(function () {
|
|
128
|
+
if (_this.parentField) {
|
|
129
|
+
// Set type only if not defined
|
|
130
|
+
if (!_this.parentField.type) {
|
|
131
|
+
_this.parentField.newType = type;
|
|
132
|
+
}
|
|
133
|
+
// Set message only if not defined
|
|
134
|
+
if (!_this.parentField.message) {
|
|
135
|
+
_this.parentField.newMessage = message;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
},
|
|
140
|
+
/**
|
|
141
|
+
* Check HTML5 validation, set isValid property.
|
|
142
|
+
* If validation fail, send 'is-danger' type,
|
|
143
|
+
* and error message to parent if it's a Field.
|
|
144
|
+
*/
|
|
145
|
+
checkHtml5Validity: function checkHtml5Validity() {
|
|
146
|
+
if (!this.useHtml5Validation) return;
|
|
147
|
+
var el = this.getElement();
|
|
148
|
+
if (el === undefined) return;
|
|
149
|
+
if (!el.checkValidity()) {
|
|
150
|
+
this.setInvalid();
|
|
151
|
+
this.isValid = false;
|
|
152
|
+
} else {
|
|
153
|
+
this.setValidity(null, null);
|
|
154
|
+
this.isValid = true;
|
|
155
|
+
}
|
|
156
|
+
return this.isValid;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
export { FormElementMixin as F };
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import { m as _toArray } from './_rollupPluginBabelHelpers-df313029.js';
|
|
2
|
+
import { c as config } from './config-e7d4b9c2.js';
|
|
3
|
+
import { merge } from './helpers.js';
|
|
4
|
+
import { n as normalizeComponent } from './plugins-218aea86.js';
|
|
5
|
+
|
|
6
|
+
var mdiIcons = {
|
|
7
|
+
sizes: {
|
|
8
|
+
'default': 'mdi-24px',
|
|
9
|
+
'is-small': null,
|
|
10
|
+
'is-medium': 'mdi-36px',
|
|
11
|
+
'is-large': 'mdi-48px'
|
|
12
|
+
},
|
|
13
|
+
iconPrefix: 'mdi-'
|
|
14
|
+
};
|
|
15
|
+
var faIcons = function faIcons() {
|
|
16
|
+
var faIconPrefix = config && config.defaultIconComponent ? '' : 'fa-';
|
|
17
|
+
return {
|
|
18
|
+
sizes: {
|
|
19
|
+
'default': null,
|
|
20
|
+
'is-small': null,
|
|
21
|
+
'is-medium': faIconPrefix + 'lg',
|
|
22
|
+
'is-large': faIconPrefix + '2x'
|
|
23
|
+
},
|
|
24
|
+
iconPrefix: faIconPrefix,
|
|
25
|
+
internalIcons: {
|
|
26
|
+
'information': 'info-circle',
|
|
27
|
+
'alert': 'exclamation-triangle',
|
|
28
|
+
'alert-circle': 'exclamation-circle',
|
|
29
|
+
'chevron-right': 'angle-right',
|
|
30
|
+
'chevron-left': 'angle-left',
|
|
31
|
+
'chevron-down': 'angle-down',
|
|
32
|
+
'eye-off': 'eye-slash',
|
|
33
|
+
'menu-down': 'caret-down',
|
|
34
|
+
'menu-up': 'caret-up',
|
|
35
|
+
'close-circle': 'times-circle'
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
var getIcons = function getIcons() {
|
|
40
|
+
var icons = {
|
|
41
|
+
mdi: mdiIcons,
|
|
42
|
+
fa: faIcons(),
|
|
43
|
+
fas: faIcons(),
|
|
44
|
+
far: faIcons(),
|
|
45
|
+
fad: faIcons(),
|
|
46
|
+
fab: faIcons(),
|
|
47
|
+
fal: faIcons(),
|
|
48
|
+
'fa-solid': faIcons(),
|
|
49
|
+
'fa-regular': faIcons(),
|
|
50
|
+
'fa-light': faIcons(),
|
|
51
|
+
'fa-thin': faIcons(),
|
|
52
|
+
'fa-duotone': faIcons(),
|
|
53
|
+
'fa-brands': faIcons()
|
|
54
|
+
};
|
|
55
|
+
if (config && config.customIconPacks) {
|
|
56
|
+
icons = merge(icons, config.customIconPacks, true);
|
|
57
|
+
}
|
|
58
|
+
return icons;
|
|
59
|
+
};
|
|
60
|
+
var getIcons$1 = getIcons;
|
|
61
|
+
|
|
62
|
+
var script = {
|
|
63
|
+
name: 'BIcon',
|
|
64
|
+
props: {
|
|
65
|
+
type: [String, Object],
|
|
66
|
+
component: String,
|
|
67
|
+
pack: String,
|
|
68
|
+
icon: String,
|
|
69
|
+
size: String,
|
|
70
|
+
customSize: String,
|
|
71
|
+
customClass: String,
|
|
72
|
+
both: Boolean // This is used internally to show both MDI and FA icon
|
|
73
|
+
},
|
|
74
|
+
computed: {
|
|
75
|
+
iconConfig: function iconConfig() {
|
|
76
|
+
var allIcons = getIcons$1();
|
|
77
|
+
return allIcons[this.newPack];
|
|
78
|
+
},
|
|
79
|
+
iconPrefix: function iconPrefix() {
|
|
80
|
+
if (this.iconConfig && this.iconConfig.iconPrefix) {
|
|
81
|
+
return this.iconConfig.iconPrefix;
|
|
82
|
+
}
|
|
83
|
+
return '';
|
|
84
|
+
},
|
|
85
|
+
/**
|
|
86
|
+
* Internal icon name based on the pack.
|
|
87
|
+
* If pack is 'fa', gets the equivalent FA icon name of the MDI,
|
|
88
|
+
* internal icons are always MDI.
|
|
89
|
+
*/
|
|
90
|
+
newIcon: function newIcon() {
|
|
91
|
+
return "".concat(this.iconPrefix).concat(this.getEquivalentIconOf(this.icon));
|
|
92
|
+
},
|
|
93
|
+
newPack: function newPack() {
|
|
94
|
+
return this.pack || config.defaultIconPack;
|
|
95
|
+
},
|
|
96
|
+
newType: function newType() {
|
|
97
|
+
if (!this.type) return;
|
|
98
|
+
var splitType = [];
|
|
99
|
+
if (typeof this.type === 'string') {
|
|
100
|
+
splitType = this.type.split('-');
|
|
101
|
+
} else {
|
|
102
|
+
for (var key in this.type) {
|
|
103
|
+
if (this.type[key]) {
|
|
104
|
+
splitType = key.split('-');
|
|
105
|
+
break;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
if (splitType.length <= 1) return;
|
|
110
|
+
var _splitType = splitType,
|
|
111
|
+
_splitType2 = _toArray(_splitType),
|
|
112
|
+
type = _splitType2.slice(1);
|
|
113
|
+
return "has-text-".concat(type.join('-'));
|
|
114
|
+
},
|
|
115
|
+
newCustomSize: function newCustomSize() {
|
|
116
|
+
return this.customSize || this.customSizeByPack;
|
|
117
|
+
},
|
|
118
|
+
customSizeByPack: function customSizeByPack() {
|
|
119
|
+
if (this.iconConfig && this.iconConfig.sizes) {
|
|
120
|
+
if (this.size && this.iconConfig.sizes[this.size] !== undefined) {
|
|
121
|
+
return this.iconConfig.sizes[this.size];
|
|
122
|
+
} else if (this.iconConfig.sizes.default) {
|
|
123
|
+
return this.iconConfig.sizes.default;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
return null;
|
|
127
|
+
},
|
|
128
|
+
useIconComponent: function useIconComponent() {
|
|
129
|
+
return this.component || config.defaultIconComponent;
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
methods: {
|
|
133
|
+
/**
|
|
134
|
+
* Equivalent icon name of the MDI.
|
|
135
|
+
*/
|
|
136
|
+
getEquivalentIconOf: function getEquivalentIconOf(value) {
|
|
137
|
+
// Only transform the class if the both prop is set to true
|
|
138
|
+
if (!this.both) {
|
|
139
|
+
return value;
|
|
140
|
+
}
|
|
141
|
+
if (this.iconConfig && this.iconConfig.internalIcons && this.iconConfig.internalIcons[value]) {
|
|
142
|
+
return this.iconConfig.internalIcons[value];
|
|
143
|
+
}
|
|
144
|
+
return value;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
/* script */
|
|
150
|
+
const __vue_script__ = script;
|
|
151
|
+
|
|
152
|
+
/* template */
|
|
153
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('span',{staticClass:"icon",class:[_vm.newType, _vm.size]},[(!_vm.useIconComponent)?_c('i',{class:[_vm.newPack, _vm.newIcon, _vm.newCustomSize, _vm.customClass]}):_c(_vm.useIconComponent,{tag:"component",class:[_vm.customClass],attrs:{"icon":[_vm.newPack, _vm.newIcon],"size":_vm.newCustomSize}})],1)};
|
|
154
|
+
var __vue_staticRenderFns__ = [];
|
|
155
|
+
|
|
156
|
+
/* style */
|
|
157
|
+
const __vue_inject_styles__ = undefined;
|
|
158
|
+
/* scoped */
|
|
159
|
+
const __vue_scope_id__ = undefined;
|
|
160
|
+
/* module identifier */
|
|
161
|
+
const __vue_module_identifier__ = undefined;
|
|
162
|
+
/* functional template */
|
|
163
|
+
const __vue_is_functional_template__ = false;
|
|
164
|
+
/* style inject */
|
|
165
|
+
|
|
166
|
+
/* style inject SSR */
|
|
167
|
+
|
|
168
|
+
/* style inject shadow dom */
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
const __vue_component__ = /*#__PURE__*/normalizeComponent(
|
|
173
|
+
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
|
|
174
|
+
__vue_inject_styles__,
|
|
175
|
+
__vue_script__,
|
|
176
|
+
__vue_scope_id__,
|
|
177
|
+
__vue_is_functional_template__,
|
|
178
|
+
__vue_module_identifier__,
|
|
179
|
+
false,
|
|
180
|
+
undefined,
|
|
181
|
+
undefined,
|
|
182
|
+
undefined
|
|
183
|
+
);
|
|
184
|
+
|
|
185
|
+
var Icon = __vue_component__;
|
|
186
|
+
|
|
187
|
+
export { Icon as I };
|