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.
Files changed (259) hide show
  1. package/README.md +3 -1
  2. package/dist/buefy.css +15904 -0
  3. package/dist/buefy.esm.js +17883 -0
  4. package/dist/buefy.esm.min.js +2 -0
  5. package/dist/buefy.js +17967 -0
  6. package/dist/buefy.min.css +1 -0
  7. package/dist/buefy.min.js +2 -0
  8. package/dist/cjs/Autocomplete-7a39c5ce.js +673 -0
  9. package/dist/cjs/Button-01827709.js +114 -0
  10. package/dist/cjs/CheckRadioMixin-c910f2ed.js +45 -0
  11. package/dist/cjs/Checkbox-43f54cc7.js +70 -0
  12. package/dist/cjs/Datepicker-680659bc.js +1679 -0
  13. package/dist/cjs/DropdownItem-422f8c34.js +559 -0
  14. package/dist/cjs/Field-4557b10c.js +315 -0
  15. package/dist/cjs/FormElementMixin-193a88b8.js +163 -0
  16. package/dist/cjs/Icon-78961800.js +189 -0
  17. package/dist/cjs/Image-c4bcd9b3.js +299 -0
  18. package/dist/cjs/InjectedChildMixin-d6bf7f91.js +135 -0
  19. package/dist/cjs/Input-e5a72d97.js +248 -0
  20. package/dist/cjs/Loading-6f2c7075.js +150 -0
  21. package/dist/cjs/MessageMixin-8d959514.js +146 -0
  22. package/dist/cjs/Modal-4cf07210.js +278 -0
  23. package/dist/cjs/NoticeMixin-01121bd2.js +154 -0
  24. package/dist/cjs/Pagination-d6b3fb85.js +413 -0
  25. package/dist/cjs/Select-2b3879bc.js +100 -0
  26. package/dist/cjs/SlotComponent-4fb48389.js +53 -0
  27. package/dist/cjs/TabbedChildMixin-907cad32.js +222 -0
  28. package/dist/cjs/Tag-437f65fb.js +154 -0
  29. package/dist/cjs/Timepicker-498fa02b.js +67 -0
  30. package/dist/cjs/TimepickerMixin-6c1a4ab4.js +661 -0
  31. package/dist/cjs/Tooltip-c1df7ee3.js +370 -0
  32. package/dist/cjs/_rollupPluginBabelHelpers-8b2e54ad.js +365 -0
  33. package/dist/cjs/autocomplete.js +22 -0
  34. package/dist/cjs/breadcrumb.js +139 -0
  35. package/dist/cjs/button.js +20 -0
  36. package/dist/cjs/carousel.js +662 -0
  37. package/dist/cjs/checkbox.js +86 -0
  38. package/dist/cjs/clockpicker.js +461 -0
  39. package/dist/cjs/collapse.js +128 -0
  40. package/dist/cjs/colorpicker.js +23 -0
  41. package/dist/cjs/config-8cfb5a4a.js +81 -0
  42. package/dist/cjs/config.js +18 -0
  43. package/dist/cjs/datepicker.js +27 -0
  44. package/dist/cjs/datetimepicker.js +377 -0
  45. package/dist/cjs/dialog.js +308 -0
  46. package/dist/cjs/dropdown.js +23 -0
  47. package/dist/cjs/field.js +18 -0
  48. package/dist/cjs/helpers.js +375 -0
  49. package/dist/cjs/icon.js +19 -0
  50. package/dist/cjs/image.js +19 -0
  51. package/dist/cjs/index-99d1c930.js +1633 -0
  52. package/dist/cjs/index.js +216 -0
  53. package/dist/cjs/input.js +21 -0
  54. package/dist/cjs/loading.js +38 -0
  55. package/dist/cjs/menu.js +304 -0
  56. package/dist/cjs/message.js +67 -0
  57. package/dist/cjs/modal.js +59 -0
  58. package/dist/cjs/navbar.js +679 -0
  59. package/dist/cjs/notification.js +181 -0
  60. package/dist/cjs/numberinput.js +278 -0
  61. package/dist/cjs/pagination.js +22 -0
  62. package/dist/cjs/plugins-7f41b028.js +94 -0
  63. package/dist/cjs/progress.js +239 -0
  64. package/dist/cjs/radio.js +130 -0
  65. package/dist/cjs/rate.js +156 -0
  66. package/dist/cjs/select.js +21 -0
  67. package/dist/cjs/sidebar.js +303 -0
  68. package/dist/cjs/skeleton.js +111 -0
  69. package/dist/cjs/slider.js +603 -0
  70. package/dist/cjs/snackbar.js +132 -0
  71. package/dist/cjs/ssr-20dba236.js +10 -0
  72. package/dist/cjs/steps.js +278 -0
  73. package/dist/cjs/switch.js +139 -0
  74. package/dist/cjs/table.js +1695 -0
  75. package/dist/cjs/tabs.js +214 -0
  76. package/dist/cjs/tag.js +70 -0
  77. package/dist/cjs/taginput.js +331 -0
  78. package/dist/cjs/timepicker.js +28 -0
  79. package/dist/cjs/toast.js +106 -0
  80. package/dist/cjs/tooltip.js +19 -0
  81. package/dist/cjs/trapFocus-261420b0.js +49 -0
  82. package/dist/cjs/upload.js +205 -0
  83. package/dist/components/autocomplete/index.js +1620 -0
  84. package/dist/components/autocomplete/index.min.js +2 -0
  85. package/dist/components/breadcrumb/index.js +297 -0
  86. package/dist/components/breadcrumb/index.min.js +2 -0
  87. package/dist/components/button/index.js +569 -0
  88. package/dist/components/button/index.min.js +2 -0
  89. package/dist/components/carousel/index.js +1629 -0
  90. package/dist/components/carousel/index.min.js +2 -0
  91. package/dist/components/checkbox/index.js +279 -0
  92. package/dist/components/checkbox/index.min.js +2 -0
  93. package/dist/components/clockpicker/index.js +3131 -0
  94. package/dist/components/clockpicker/index.min.js +2 -0
  95. package/dist/components/collapse/index.js +217 -0
  96. package/dist/components/collapse/index.min.js +2 -0
  97. package/dist/components/colorpicker/index.js +4249 -0
  98. package/dist/components/colorpicker/index.min.js +2 -0
  99. package/dist/components/datepicker/index.js +3845 -0
  100. package/dist/components/datepicker/index.min.js +2 -0
  101. package/dist/components/datetimepicker/index.js +4902 -0
  102. package/dist/components/datetimepicker/index.min.js +2 -0
  103. package/dist/components/dialog/index.js +1168 -0
  104. package/dist/components/dialog/index.min.js +2 -0
  105. package/dist/components/dropdown/index.js +1043 -0
  106. package/dist/components/dropdown/index.min.js +2 -0
  107. package/dist/components/field/index.js +511 -0
  108. package/dist/components/field/index.min.js +2 -0
  109. package/dist/components/icon/index.js +463 -0
  110. package/dist/components/icon/index.min.js +2 -0
  111. package/dist/components/image/index.js +513 -0
  112. package/dist/components/image/index.min.js +2 -0
  113. package/dist/components/input/index.js +862 -0
  114. package/dist/components/input/index.min.js +2 -0
  115. package/dist/components/loading/index.js +366 -0
  116. package/dist/components/loading/index.min.js +2 -0
  117. package/dist/components/menu/index.js +748 -0
  118. package/dist/components/menu/index.min.js +2 -0
  119. package/dist/components/message/index.js +650 -0
  120. package/dist/components/message/index.min.js +2 -0
  121. package/dist/components/modal/index.js +624 -0
  122. package/dist/components/modal/index.min.js +2 -0
  123. package/dist/components/navbar/index.js +805 -0
  124. package/dist/components/navbar/index.min.js +2 -0
  125. package/dist/components/notification/index.js +923 -0
  126. package/dist/components/notification/index.min.js +2 -0
  127. package/dist/components/numberinput/index.js +1119 -0
  128. package/dist/components/numberinput/index.min.js +2 -0
  129. package/dist/components/pagination/index.js +868 -0
  130. package/dist/components/pagination/index.min.js +2 -0
  131. package/dist/components/progress/index.js +621 -0
  132. package/dist/components/progress/index.min.js +2 -0
  133. package/dist/components/radio/index.js +260 -0
  134. package/dist/components/radio/index.min.js +2 -0
  135. package/dist/components/rate/index.js +600 -0
  136. package/dist/components/rate/index.min.js +2 -0
  137. package/dist/components/select/index.js +715 -0
  138. package/dist/components/select/index.min.js +2 -0
  139. package/dist/components/sidebar/index.js +467 -0
  140. package/dist/components/sidebar/index.min.js +2 -0
  141. package/dist/components/skeleton/index.js +200 -0
  142. package/dist/components/skeleton/index.min.js +2 -0
  143. package/dist/components/slider/index.js +1264 -0
  144. package/dist/components/slider/index.min.js +2 -0
  145. package/dist/components/snackbar/index.js +527 -0
  146. package/dist/components/snackbar/index.min.js +2 -0
  147. package/dist/components/steps/index.js +1180 -0
  148. package/dist/components/steps/index.min.js +2 -0
  149. package/dist/components/switch/index.js +297 -0
  150. package/dist/components/switch/index.min.js +2 -0
  151. package/dist/components/table/index.js +3480 -0
  152. package/dist/components/table/index.min.js +2 -0
  153. package/dist/components/tabs/index.js +1116 -0
  154. package/dist/components/tabs/index.min.js +2 -0
  155. package/dist/components/tag/index.js +307 -0
  156. package/dist/components/tag/index.min.js +2 -0
  157. package/dist/components/taginput/index.js +2104 -0
  158. package/dist/components/taginput/index.min.js +2 -0
  159. package/dist/components/timepicker/index.js +2843 -0
  160. package/dist/components/timepicker/index.min.js +2 -0
  161. package/dist/components/toast/index.js +501 -0
  162. package/dist/components/toast/index.min.js +2 -0
  163. package/dist/components/tooltip/index.js +630 -0
  164. package/dist/components/tooltip/index.min.js +2 -0
  165. package/dist/components/upload/index.js +525 -0
  166. package/dist/components/upload/index.min.js +2 -0
  167. package/dist/esm/Autocomplete-1a6e8770.js +671 -0
  168. package/dist/esm/Button-521f6efc.js +112 -0
  169. package/dist/esm/CheckRadioMixin-e726a83c.js +43 -0
  170. package/dist/esm/Checkbox-1d02686e.js +68 -0
  171. package/dist/esm/Datepicker-0ae1e826.js +1677 -0
  172. package/dist/esm/DropdownItem-55682322.js +556 -0
  173. package/dist/esm/Field-3ceba31e.js +313 -0
  174. package/dist/esm/FormElementMixin-b223d3c7.js +161 -0
  175. package/dist/esm/Icon-60d47b31.js +187 -0
  176. package/dist/esm/Image-75808acb.js +297 -0
  177. package/dist/esm/InjectedChildMixin-b4220787.js +130 -0
  178. package/dist/esm/Input-20612b63.js +246 -0
  179. package/dist/esm/Loading-ae028ea5.js +148 -0
  180. package/dist/esm/MessageMixin-d577a9f5.js +144 -0
  181. package/dist/esm/Modal-7da7641f.js +276 -0
  182. package/dist/esm/NoticeMixin-bd6f61d9.js +152 -0
  183. package/dist/esm/Pagination-68f12c1e.js +409 -0
  184. package/dist/esm/Select-97781d4e.js +98 -0
  185. package/dist/esm/SlotComponent-8871a20f.js +51 -0
  186. package/dist/esm/TabbedChildMixin-bcb13767.js +219 -0
  187. package/dist/esm/Tag-6365aa46.js +152 -0
  188. package/dist/esm/Timepicker-38480bbc.js +65 -0
  189. package/dist/esm/TimepickerMixin-d736b0a9.js +659 -0
  190. package/dist/esm/Tooltip-d98a769c.js +368 -0
  191. package/dist/esm/_rollupPluginBabelHelpers-df313029.js +350 -0
  192. package/dist/esm/autocomplete.js +18 -0
  193. package/dist/esm/breadcrumb.js +133 -0
  194. package/dist/esm/button.js +16 -0
  195. package/dist/esm/carousel.js +655 -0
  196. package/dist/esm/checkbox.js +81 -0
  197. package/dist/esm/clockpicker.js +456 -0
  198. package/dist/esm/collapse.js +123 -0
  199. package/dist/esm/colorpicker.js +14 -0
  200. package/dist/esm/config-e7d4b9c2.js +78 -0
  201. package/dist/esm/config.js +14 -0
  202. package/dist/esm/datepicker.js +23 -0
  203. package/dist/esm/datetimepicker.js +372 -0
  204. package/dist/esm/dialog.js +302 -0
  205. package/dist/esm/dropdown.js +18 -0
  206. package/dist/esm/field.js +14 -0
  207. package/dist/esm/helpers.js +348 -0
  208. package/dist/esm/icon.js +15 -0
  209. package/dist/esm/image.js +15 -0
  210. package/dist/esm/index-903f63ea.js +1629 -0
  211. package/dist/esm/index.js +182 -0
  212. package/dist/esm/input.js +17 -0
  213. package/dist/esm/loading.js +33 -0
  214. package/dist/esm/menu.js +297 -0
  215. package/dist/esm/message.js +62 -0
  216. package/dist/esm/modal.js +54 -0
  217. package/dist/esm/navbar.js +672 -0
  218. package/dist/esm/notification.js +175 -0
  219. package/dist/esm/numberinput.js +273 -0
  220. package/dist/esm/pagination.js +17 -0
  221. package/dist/esm/plugins-218aea86.js +89 -0
  222. package/dist/esm/progress.js +233 -0
  223. package/dist/esm/radio.js +124 -0
  224. package/dist/esm/rate.js +151 -0
  225. package/dist/esm/select.js +17 -0
  226. package/dist/esm/sidebar.js +298 -0
  227. package/dist/esm/skeleton.js +106 -0
  228. package/dist/esm/slider.js +597 -0
  229. package/dist/esm/snackbar.js +126 -0
  230. package/dist/esm/ssr-b847d137.js +7 -0
  231. package/dist/esm/steps.js +272 -0
  232. package/dist/esm/switch.js +134 -0
  233. package/dist/esm/table.js +1689 -0
  234. package/dist/esm/tabs.js +208 -0
  235. package/dist/esm/tag.js +65 -0
  236. package/dist/esm/taginput.js +326 -0
  237. package/dist/esm/timepicker.js +24 -0
  238. package/dist/esm/toast.js +100 -0
  239. package/dist/esm/tooltip.js +15 -0
  240. package/dist/esm/trapFocus-f0736873.js +47 -0
  241. package/dist/esm/upload.js +200 -0
  242. package/dist/vetur/attributes.json +3238 -0
  243. package/dist/vetur/tags.json +1183 -0
  244. package/package.json +3 -3
  245. package/src/components/autocomplete/Autocomplete.spec.js +16 -0
  246. package/src/components/autocomplete/Autocomplete.vue +9 -3
  247. package/src/components/colorpicker/ColorpickerHSLRepresentationSquare.vue +2 -0
  248. package/src/components/colorpicker/ColorpickerHSLRepresentationTriangle.vue +2 -0
  249. package/src/components/dropdown/Dropdown.vue +51 -3
  250. package/src/components/numberinput/Numberinput.vue +4 -0
  251. package/src/components/sidebar/Sidebar.vue +1 -0
  252. package/src/components/slider/Slider.vue +7 -2
  253. package/src/components/slider/SliderThumb.vue +8 -0
  254. package/src/components/table/Table.vue +4 -1
  255. package/src/components/table/TableColumn.spec.js +51 -0
  256. package/src/components/table/TableColumn.vue +8 -1
  257. package/src/components/taginput/Taginput.vue +7 -2
  258. package/src/components/tooltip/Tooltip.vue +10 -3
  259. package/src/scss/components/_dropdown.scss +4 -2
@@ -0,0 +1,715 @@
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.Select = {}));
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
+
92
+ var config = {
93
+ defaultContainerElement: null,
94
+ defaultIconPack: 'mdi',
95
+ defaultIconComponent: null,
96
+ defaultIconPrev: 'chevron-left',
97
+ defaultIconNext: 'chevron-right',
98
+ defaultLocale: undefined,
99
+ defaultDialogConfirmText: null,
100
+ defaultDialogCancelText: null,
101
+ defaultSnackbarDuration: 3500,
102
+ defaultSnackbarPosition: null,
103
+ defaultToastDuration: 2000,
104
+ defaultToastPosition: null,
105
+ defaultNotificationDuration: 2000,
106
+ defaultNotificationPosition: null,
107
+ defaultTooltipType: 'is-primary',
108
+ defaultTooltipDelay: null,
109
+ defaultTooltipCloseDelay: null,
110
+ defaultSidebarDelay: null,
111
+ defaultInputAutocomplete: 'on',
112
+ defaultDateFormatter: null,
113
+ defaultDateParser: null,
114
+ defaultDateCreator: null,
115
+ defaultTimeCreator: null,
116
+ defaultDayNames: null,
117
+ defaultMonthNames: null,
118
+ defaultFirstDayOfWeek: null,
119
+ defaultUnselectableDaysOfWeek: null,
120
+ defaultTimeFormatter: null,
121
+ defaultTimeParser: null,
122
+ defaultModalCanCancel: ['escape', 'x', 'outside', 'button'],
123
+ defaultModalScroll: null,
124
+ defaultDatepickerMobileNative: true,
125
+ defaultTimepickerMobileNative: true,
126
+ defaultTimepickerMobileModal: true,
127
+ defaultNoticeQueue: true,
128
+ defaultInputHasCounter: true,
129
+ defaultTaginputHasCounter: true,
130
+ defaultUseHtml5Validation: true,
131
+ defaultDropdownMobileModal: true,
132
+ defaultFieldLabelPosition: null,
133
+ defaultDatepickerYearsRange: [-100, 10],
134
+ defaultDatepickerNearbyMonthDays: true,
135
+ defaultDatepickerNearbySelectableMonthDays: false,
136
+ defaultDatepickerShowWeekNumber: false,
137
+ defaultDatepickerWeekNumberClickable: false,
138
+ defaultDatepickerMobileModal: true,
139
+ defaultTrapFocus: true,
140
+ defaultAutoFocus: true,
141
+ defaultButtonRounded: false,
142
+ defaultSwitchRounded: true,
143
+ defaultCarouselInterval: 3500,
144
+ defaultTabsExpanded: false,
145
+ defaultTabsAnimated: true,
146
+ defaultTabsType: null,
147
+ defaultStatusIcon: true,
148
+ defaultProgrammaticPromise: false,
149
+ defaultLinkTags: ['a', 'button', 'input', 'router-link', 'nuxt-link', 'n-link', 'RouterLink', 'NuxtLink', 'NLink'],
150
+ defaultImageWebpFallback: null,
151
+ defaultImageLazy: true,
152
+ defaultImageResponsive: true,
153
+ defaultImageRatio: null,
154
+ defaultImageSrcsetFormatter: null,
155
+ defaultBreadcrumbTag: 'a',
156
+ defaultBreadcrumbAlign: 'is-left',
157
+ defaultBreadcrumbSeparator: '',
158
+ defaultBreadcrumbSize: 'is-medium',
159
+ customIconPacks: null
160
+ };
161
+
162
+ /**
163
+ * Merge function to replace Object.assign with deep merging possibility
164
+ */
165
+ var isObject = function isObject(item) {
166
+ return _typeof(item) === 'object' && !Array.isArray(item);
167
+ };
168
+ var mergeFn = function mergeFn(target, source) {
169
+ var deep = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
170
+ if (deep || !Object.assign) {
171
+ var isDeep = function isDeep(prop) {
172
+ return isObject(source[prop]) && target !== null && target.hasOwnProperty(prop) && isObject(target[prop]);
173
+ };
174
+ var replaced = Object.getOwnPropertyNames(source).map(function (prop) {
175
+ return _defineProperty({}, prop, isDeep(prop) ? mergeFn(target[prop], source[prop], deep) : source[prop]);
176
+ }).reduce(function (a, b) {
177
+ return _objectSpread2(_objectSpread2({}, a), b);
178
+ }, {});
179
+ return _objectSpread2(_objectSpread2({}, target), replaced);
180
+ } else {
181
+ return Object.assign(target, source);
182
+ }
183
+ };
184
+ var merge = mergeFn;
185
+ function isVueComponent(c) {
186
+ return c && c._isVue;
187
+ }
188
+
189
+ var mdiIcons = {
190
+ sizes: {
191
+ 'default': 'mdi-24px',
192
+ 'is-small': null,
193
+ 'is-medium': 'mdi-36px',
194
+ 'is-large': 'mdi-48px'
195
+ },
196
+ iconPrefix: 'mdi-'
197
+ };
198
+ var faIcons = function faIcons() {
199
+ var faIconPrefix = config && config.defaultIconComponent ? '' : 'fa-';
200
+ return {
201
+ sizes: {
202
+ 'default': null,
203
+ 'is-small': null,
204
+ 'is-medium': faIconPrefix + 'lg',
205
+ 'is-large': faIconPrefix + '2x'
206
+ },
207
+ iconPrefix: faIconPrefix,
208
+ internalIcons: {
209
+ 'information': 'info-circle',
210
+ 'alert': 'exclamation-triangle',
211
+ 'alert-circle': 'exclamation-circle',
212
+ 'chevron-right': 'angle-right',
213
+ 'chevron-left': 'angle-left',
214
+ 'chevron-down': 'angle-down',
215
+ 'eye-off': 'eye-slash',
216
+ 'menu-down': 'caret-down',
217
+ 'menu-up': 'caret-up',
218
+ 'close-circle': 'times-circle'
219
+ }
220
+ };
221
+ };
222
+ var getIcons = function getIcons() {
223
+ var icons = {
224
+ mdi: mdiIcons,
225
+ fa: faIcons(),
226
+ fas: faIcons(),
227
+ far: faIcons(),
228
+ fad: faIcons(),
229
+ fab: faIcons(),
230
+ fal: faIcons(),
231
+ 'fa-solid': faIcons(),
232
+ 'fa-regular': faIcons(),
233
+ 'fa-light': faIcons(),
234
+ 'fa-thin': faIcons(),
235
+ 'fa-duotone': faIcons(),
236
+ 'fa-brands': faIcons()
237
+ };
238
+ if (config && config.customIconPacks) {
239
+ icons = merge(icons, config.customIconPacks, true);
240
+ }
241
+ return icons;
242
+ };
243
+ var getIcons$1 = getIcons;
244
+
245
+ var script$1 = {
246
+ name: 'BIcon',
247
+ props: {
248
+ type: [String, Object],
249
+ component: String,
250
+ pack: String,
251
+ icon: String,
252
+ size: String,
253
+ customSize: String,
254
+ customClass: String,
255
+ both: Boolean // This is used internally to show both MDI and FA icon
256
+ },
257
+ computed: {
258
+ iconConfig: function iconConfig() {
259
+ var allIcons = getIcons$1();
260
+ return allIcons[this.newPack];
261
+ },
262
+ iconPrefix: function iconPrefix() {
263
+ if (this.iconConfig && this.iconConfig.iconPrefix) {
264
+ return this.iconConfig.iconPrefix;
265
+ }
266
+ return '';
267
+ },
268
+ /**
269
+ * Internal icon name based on the pack.
270
+ * If pack is 'fa', gets the equivalent FA icon name of the MDI,
271
+ * internal icons are always MDI.
272
+ */
273
+ newIcon: function newIcon() {
274
+ return "".concat(this.iconPrefix).concat(this.getEquivalentIconOf(this.icon));
275
+ },
276
+ newPack: function newPack() {
277
+ return this.pack || config.defaultIconPack;
278
+ },
279
+ newType: function newType() {
280
+ if (!this.type) return;
281
+ var splitType = [];
282
+ if (typeof this.type === 'string') {
283
+ splitType = this.type.split('-');
284
+ } else {
285
+ for (var key in this.type) {
286
+ if (this.type[key]) {
287
+ splitType = key.split('-');
288
+ break;
289
+ }
290
+ }
291
+ }
292
+ if (splitType.length <= 1) return;
293
+ var _splitType = splitType,
294
+ _splitType2 = _toArray(_splitType),
295
+ type = _splitType2.slice(1);
296
+ return "has-text-".concat(type.join('-'));
297
+ },
298
+ newCustomSize: function newCustomSize() {
299
+ return this.customSize || this.customSizeByPack;
300
+ },
301
+ customSizeByPack: function customSizeByPack() {
302
+ if (this.iconConfig && this.iconConfig.sizes) {
303
+ if (this.size && this.iconConfig.sizes[this.size] !== undefined) {
304
+ return this.iconConfig.sizes[this.size];
305
+ } else if (this.iconConfig.sizes.default) {
306
+ return this.iconConfig.sizes.default;
307
+ }
308
+ }
309
+ return null;
310
+ },
311
+ useIconComponent: function useIconComponent() {
312
+ return this.component || config.defaultIconComponent;
313
+ }
314
+ },
315
+ methods: {
316
+ /**
317
+ * Equivalent icon name of the MDI.
318
+ */
319
+ getEquivalentIconOf: function getEquivalentIconOf(value) {
320
+ // Only transform the class if the both prop is set to true
321
+ if (!this.both) {
322
+ return value;
323
+ }
324
+ if (this.iconConfig && this.iconConfig.internalIcons && this.iconConfig.internalIcons[value]) {
325
+ return this.iconConfig.internalIcons[value];
326
+ }
327
+ return value;
328
+ }
329
+ }
330
+ };
331
+
332
+ function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier /* server only */, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {
333
+ if (typeof shadowMode !== 'boolean') {
334
+ createInjectorSSR = createInjector;
335
+ createInjector = shadowMode;
336
+ shadowMode = false;
337
+ }
338
+ // Vue.extend constructor export interop.
339
+ const options = typeof script === 'function' ? script.options : script;
340
+ // render functions
341
+ if (template && template.render) {
342
+ options.render = template.render;
343
+ options.staticRenderFns = template.staticRenderFns;
344
+ options._compiled = true;
345
+ // functional template
346
+ if (isFunctionalTemplate) {
347
+ options.functional = true;
348
+ }
349
+ }
350
+ // scopedId
351
+ if (scopeId) {
352
+ options._scopeId = scopeId;
353
+ }
354
+ let hook;
355
+ if (moduleIdentifier) {
356
+ // server build
357
+ hook = function (context) {
358
+ // 2.3 injection
359
+ context =
360
+ context || // cached call
361
+ (this.$vnode && this.$vnode.ssrContext) || // stateful
362
+ (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext); // functional
363
+ // 2.2 with runInNewContext: true
364
+ if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
365
+ context = __VUE_SSR_CONTEXT__;
366
+ }
367
+ // inject component styles
368
+ if (style) {
369
+ style.call(this, createInjectorSSR(context));
370
+ }
371
+ // register component module identifier for async chunk inference
372
+ if (context && context._registeredComponents) {
373
+ context._registeredComponents.add(moduleIdentifier);
374
+ }
375
+ };
376
+ // used by ssr in case component is cached and beforeCreate
377
+ // never gets called
378
+ options._ssrRegister = hook;
379
+ }
380
+ else if (style) {
381
+ hook = shadowMode
382
+ ? function (context) {
383
+ style.call(this, createInjectorShadow(context, this.$root.$options.shadowRoot));
384
+ }
385
+ : function (context) {
386
+ style.call(this, createInjector(context));
387
+ };
388
+ }
389
+ if (hook) {
390
+ if (options.functional) {
391
+ // register for functional component in vue file
392
+ const originalRender = options.render;
393
+ options.render = function renderWithStyleInjection(h, context) {
394
+ hook.call(context);
395
+ return originalRender(h, context);
396
+ };
397
+ }
398
+ else {
399
+ // inject component registration as beforeCreate hook
400
+ const existing = options.beforeCreate;
401
+ options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
402
+ }
403
+ }
404
+ return script;
405
+ }
406
+
407
+ /* script */
408
+ const __vue_script__$1 = script$1;
409
+
410
+ /* template */
411
+ 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)};
412
+ var __vue_staticRenderFns__$1 = [];
413
+
414
+ /* style */
415
+ const __vue_inject_styles__$1 = undefined;
416
+ /* scoped */
417
+ const __vue_scope_id__$1 = undefined;
418
+ /* module identifier */
419
+ const __vue_module_identifier__$1 = undefined;
420
+ /* functional template */
421
+ const __vue_is_functional_template__$1 = false;
422
+ /* style inject */
423
+
424
+ /* style inject SSR */
425
+
426
+ /* style inject shadow dom */
427
+
428
+
429
+
430
+ const __vue_component__$1 = /*#__PURE__*/normalizeComponent(
431
+ { render: __vue_render__$1, staticRenderFns: __vue_staticRenderFns__$1 },
432
+ __vue_inject_styles__$1,
433
+ __vue_script__$1,
434
+ __vue_scope_id__$1,
435
+ __vue_is_functional_template__$1,
436
+ __vue_module_identifier__$1,
437
+ false,
438
+ undefined,
439
+ undefined,
440
+ undefined
441
+ );
442
+
443
+ var Icon = __vue_component__$1;
444
+
445
+ var FormElementMixin = {
446
+ props: {
447
+ size: String,
448
+ expanded: Boolean,
449
+ loading: Boolean,
450
+ rounded: Boolean,
451
+ icon: String,
452
+ iconPack: String,
453
+ // Native options to use in HTML5 validation
454
+ autocomplete: String,
455
+ maxlength: [Number, String],
456
+ useHtml5Validation: {
457
+ type: Boolean,
458
+ default: function _default() {
459
+ return config.defaultUseHtml5Validation;
460
+ }
461
+ },
462
+ validationMessage: String,
463
+ locale: {
464
+ type: [String, Array],
465
+ default: function _default() {
466
+ return config.defaultLocale;
467
+ }
468
+ },
469
+ statusIcon: {
470
+ type: Boolean,
471
+ default: function _default() {
472
+ return config.defaultStatusIcon;
473
+ }
474
+ }
475
+ },
476
+ data: function data() {
477
+ return {
478
+ isValid: true,
479
+ isFocused: false,
480
+ newIconPack: this.iconPack || config.defaultIconPack
481
+ };
482
+ },
483
+ computed: {
484
+ /**
485
+ * Find parent Field, max 3 levels deep.
486
+ */
487
+ parentField: function parentField() {
488
+ var parent = this.$parent;
489
+ for (var i = 0; i < 3; i++) {
490
+ if (parent && !parent.$data._isField) {
491
+ parent = parent.$parent;
492
+ }
493
+ }
494
+ return parent;
495
+ },
496
+ /**
497
+ * Get the type prop from parent if it's a Field.
498
+ */
499
+ statusType: function statusType() {
500
+ var _ref = this.parentField || {},
501
+ newType = _ref.newType;
502
+ if (!newType) return;
503
+ if (typeof newType === 'string') {
504
+ return newType;
505
+ } else {
506
+ for (var key in newType) {
507
+ if (newType[key]) {
508
+ return key;
509
+ }
510
+ }
511
+ }
512
+ },
513
+ /**
514
+ * Get the message prop from parent if it's a Field.
515
+ */
516
+ statusMessage: function statusMessage() {
517
+ if (!this.parentField) return;
518
+ return this.parentField.newMessage || this.parentField.$slots.message;
519
+ },
520
+ /**
521
+ * Fix icon size for inputs, large was too big
522
+ */
523
+ iconSize: function iconSize() {
524
+ switch (this.size) {
525
+ case 'is-small':
526
+ return this.size;
527
+ case 'is-medium':
528
+ return;
529
+ case 'is-large':
530
+ return this.newIconPack === 'mdi' ? 'is-medium' : '';
531
+ }
532
+ }
533
+ },
534
+ methods: {
535
+ /**
536
+ * Focus method that work dynamically depending on the component.
537
+ */
538
+ focus: function focus() {
539
+ var el = this.getElement();
540
+ if (el === undefined) return;
541
+ this.$nextTick(function () {
542
+ if (el) el.focus();
543
+ });
544
+ },
545
+ onBlur: function onBlur($event) {
546
+ this.isFocused = false;
547
+ this.$emit('blur', $event);
548
+ this.checkHtml5Validity();
549
+ },
550
+ onFocus: function onFocus($event) {
551
+ this.isFocused = true;
552
+ this.$emit('focus', $event);
553
+ },
554
+ getElement: function getElement() {
555
+ var el = this.$refs[this.$data._elementRef];
556
+ while (isVueComponent(el)) {
557
+ el = el.$refs[el.$data._elementRef];
558
+ }
559
+ return el;
560
+ },
561
+ setInvalid: function setInvalid() {
562
+ var type = 'is-danger';
563
+ var message = this.validationMessage || this.getElement().validationMessage;
564
+ this.setValidity(type, message);
565
+ },
566
+ setValidity: function setValidity(type, message) {
567
+ var _this = this;
568
+ this.$nextTick(function () {
569
+ if (_this.parentField) {
570
+ // Set type only if not defined
571
+ if (!_this.parentField.type) {
572
+ _this.parentField.newType = type;
573
+ }
574
+ // Set message only if not defined
575
+ if (!_this.parentField.message) {
576
+ _this.parentField.newMessage = message;
577
+ }
578
+ }
579
+ });
580
+ },
581
+ /**
582
+ * Check HTML5 validation, set isValid property.
583
+ * If validation fail, send 'is-danger' type,
584
+ * and error message to parent if it's a Field.
585
+ */
586
+ checkHtml5Validity: function checkHtml5Validity() {
587
+ if (!this.useHtml5Validation) return;
588
+ var el = this.getElement();
589
+ if (el === undefined) return;
590
+ if (!el.checkValidity()) {
591
+ this.setInvalid();
592
+ this.isValid = false;
593
+ } else {
594
+ this.setValidity(null, null);
595
+ this.isValid = true;
596
+ }
597
+ return this.isValid;
598
+ }
599
+ }
600
+ };
601
+
602
+ var script = {
603
+ name: 'BSelect',
604
+ components: _defineProperty({}, Icon.name, Icon),
605
+ mixins: [FormElementMixin],
606
+ inheritAttrs: false,
607
+ props: {
608
+ value: {
609
+ type: [String, Number, Boolean, Object, Array, Function, Date],
610
+ default: null
611
+ },
612
+ placeholder: String,
613
+ multiple: Boolean,
614
+ nativeSize: [String, Number]
615
+ },
616
+ data: function data() {
617
+ return {
618
+ selected: this.value,
619
+ _elementRef: 'select'
620
+ };
621
+ },
622
+ computed: {
623
+ computedValue: {
624
+ get: function get() {
625
+ return this.selected;
626
+ },
627
+ set: function set(value) {
628
+ this.selected = value;
629
+ this.$emit('input', value);
630
+ !this.isValid && this.checkHtml5Validity();
631
+ }
632
+ },
633
+ spanClasses: function spanClasses() {
634
+ return [this.size, this.statusType, {
635
+ 'is-fullwidth': this.expanded,
636
+ 'is-loading': this.loading,
637
+ 'is-multiple': this.multiple,
638
+ 'is-rounded': this.rounded,
639
+ 'is-empty': this.selected === null
640
+ }];
641
+ }
642
+ },
643
+ watch: {
644
+ /**
645
+ * When v-model is changed:
646
+ * 1. Set the selected option.
647
+ * 2. If it's invalid, validate again.
648
+ */
649
+ value: function value(_value) {
650
+ this.selected = _value;
651
+ !this.isValid && this.checkHtml5Validity();
652
+ }
653
+ }
654
+ };
655
+
656
+ /* script */
657
+ const __vue_script__ = script;
658
+
659
+ /* template */
660
+ var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"control",class:{ 'is-expanded': _vm.expanded, 'has-icons-left': _vm.icon }},[_c('span',{staticClass:"select",class:_vm.spanClasses},[_c('select',_vm._b({directives:[{name:"model",rawName:"v-model",value:(_vm.computedValue),expression:"computedValue"}],ref:"select",attrs:{"multiple":_vm.multiple,"size":_vm.nativeSize},on:{"blur":function($event){_vm.$emit('blur', $event) && _vm.checkHtml5Validity();},"focus":function($event){return _vm.$emit('focus', $event)},"change":function($event){var $$selectedVal = Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = "_value" in o ? o._value : o.value;return val}); _vm.computedValue=$event.target.multiple ? $$selectedVal : $$selectedVal[0];}}},'select',_vm.$attrs,false),[(_vm.placeholder)?[(_vm.computedValue == null)?_c('option',{attrs:{"disabled":"","hidden":""},domProps:{"value":null}},[_vm._v(" "+_vm._s(_vm.placeholder)+" ")]):_vm._e()]:_vm._e(),_vm._t("default")],2)]),(_vm.icon)?_c('b-icon',{staticClass:"is-left",attrs:{"icon":_vm.icon,"pack":_vm.iconPack,"size":_vm.iconSize}}):_vm._e()],1)};
661
+ var __vue_staticRenderFns__ = [];
662
+
663
+ /* style */
664
+ const __vue_inject_styles__ = undefined;
665
+ /* scoped */
666
+ const __vue_scope_id__ = undefined;
667
+ /* module identifier */
668
+ const __vue_module_identifier__ = undefined;
669
+ /* functional template */
670
+ const __vue_is_functional_template__ = false;
671
+ /* style inject */
672
+
673
+ /* style inject SSR */
674
+
675
+ /* style inject shadow dom */
676
+
677
+
678
+
679
+ const __vue_component__ = /*#__PURE__*/normalizeComponent(
680
+ { render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
681
+ __vue_inject_styles__,
682
+ __vue_script__,
683
+ __vue_scope_id__,
684
+ __vue_is_functional_template__,
685
+ __vue_module_identifier__,
686
+ false,
687
+ undefined,
688
+ undefined,
689
+ undefined
690
+ );
691
+
692
+ var Select = __vue_component__;
693
+
694
+ var use = function use(plugin) {
695
+ if (typeof window !== 'undefined' && window.Vue) {
696
+ window.Vue.use(plugin);
697
+ }
698
+ };
699
+ var registerComponent = function registerComponent(Vue, component) {
700
+ Vue.component(component.name, component);
701
+ };
702
+
703
+ var Plugin = {
704
+ install: function install(Vue) {
705
+ registerComponent(Vue, Select);
706
+ }
707
+ };
708
+ use(Plugin);
709
+
710
+ exports.BSelect = Select;
711
+ exports["default"] = Plugin;
712
+
713
+ Object.defineProperty(exports, '__esModule', { value: true });
714
+
715
+ }));