buefy 0.9.9 → 0.9.13

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 (278) hide show
  1. package/CHANGELOG.md +1639 -1609
  2. package/dist/buefy.css +20 -2
  3. package/dist/buefy.esm.js +2227 -1869
  4. package/dist/buefy.esm.min.js +2 -2
  5. package/dist/buefy.js +2266 -1907
  6. package/dist/buefy.min.css +1 -1
  7. package/dist/buefy.min.js +2 -2
  8. package/dist/cjs/autocomplete.js +6 -6
  9. package/dist/cjs/breadcrumb.js +127 -0
  10. package/dist/cjs/button.js +6 -107
  11. package/dist/cjs/carousel.js +9 -7
  12. package/dist/cjs/checkbox.js +5 -5
  13. package/dist/cjs/{chunk-d33a8a78.js → chunk-114191ae.js} +3 -3
  14. package/dist/cjs/{chunk-dafdb70c.js → chunk-2062216d.js} +39 -3
  15. package/dist/cjs/{chunk-64efc596.js → chunk-2911aa4b.js} +20 -16
  16. package/dist/cjs/{chunk-96ab31c1.js → chunk-2ae50815.js} +7 -7
  17. package/dist/cjs/{chunk-c3032504.js → chunk-2c7de785.js} +3 -3
  18. package/dist/cjs/{chunk-50ff3a78.js → chunk-30670fac.js} +96 -15
  19. package/dist/cjs/{chunk-e57b3891.js → chunk-34949503.js} +2 -2
  20. package/dist/cjs/{chunk-0abd2223.js → chunk-3b43d77a.js} +2 -2
  21. package/dist/cjs/{chunk-dcdbe2e8.js → chunk-3cc5d9a6.js} +1 -1
  22. package/dist/cjs/{chunk-0b57168e.js → chunk-61023b09.js} +3 -3
  23. package/dist/cjs/chunk-6cb902f8.js +314 -0
  24. package/dist/cjs/{chunk-adb01a93.js → chunk-7da0c017.js} +26 -24
  25. package/dist/cjs/{chunk-60255743.js → chunk-9103eeda.js} +4 -0
  26. package/dist/cjs/{chunk-14c82365.js → chunk-92621ff7.js} +37 -0
  27. package/dist/cjs/{chunk-816cba7a.js → chunk-9e4cf4c5.js} +1 -1
  28. package/dist/cjs/{chunk-33b9d1cf.js → chunk-a11294f9.js} +27 -26
  29. package/dist/cjs/{chunk-430b5370.js → chunk-bfcad370.js} +25 -2
  30. package/dist/cjs/{chunk-cc470e7c.js → chunk-c6fbc7b4.js} +7 -7
  31. package/dist/cjs/{chunk-993f89de.js → chunk-c7b2aa4b.js} +5 -4
  32. package/dist/cjs/{chunk-6474e963.js → chunk-d0f8ea39.js} +9 -9
  33. package/dist/cjs/{chunk-3acb500b.js → chunk-d120e215.js} +2 -2
  34. package/dist/cjs/{chunk-f5baaa70.js → chunk-d54e40f6.js} +2 -1
  35. package/dist/cjs/{chunk-916a2858.js → chunk-f5106717.js} +4 -4
  36. package/dist/cjs/chunk-fe2f57ee.js +110 -0
  37. package/dist/cjs/{chunk-2571dc7c.js → chunk-fefd7b77.js} +0 -0
  38. package/dist/cjs/clockpicker.js +11 -11
  39. package/dist/cjs/config.js +2 -2
  40. package/dist/cjs/datepicker.js +12 -12
  41. package/dist/cjs/datetimepicker.js +22 -15
  42. package/dist/cjs/dialog.js +13 -11
  43. package/dist/cjs/dropdown.js +8 -8
  44. package/dist/cjs/field.js +5 -5
  45. package/dist/cjs/helpers.js +2 -3
  46. package/dist/cjs/icon.js +3 -3
  47. package/dist/cjs/image.js +6 -311
  48. package/dist/cjs/index.js +29 -23
  49. package/dist/cjs/input.js +5 -5
  50. package/dist/cjs/loading.js +6 -6
  51. package/dist/cjs/menu.js +3 -3
  52. package/dist/cjs/message.js +6 -6
  53. package/dist/cjs/modal.js +6 -6
  54. package/dist/cjs/navbar.js +16 -4
  55. package/dist/cjs/notification.js +23 -11
  56. package/dist/cjs/numberinput.js +9 -7
  57. package/dist/cjs/pagination.js +8 -8
  58. package/dist/cjs/progress.js +10 -6
  59. package/dist/cjs/radio.js +3 -3
  60. package/dist/cjs/rate.js +3 -3
  61. package/dist/cjs/select.js +7 -7
  62. package/dist/cjs/sidebar.js +2 -2
  63. package/dist/cjs/slider.js +4 -4
  64. package/dist/cjs/snackbar.js +5 -5
  65. package/dist/cjs/steps.js +8 -8
  66. package/dist/cjs/switch.js +1 -1
  67. package/dist/cjs/table.js +13 -13
  68. package/dist/cjs/tabs.js +8 -8
  69. package/dist/cjs/tag.js +3 -3
  70. package/dist/cjs/taginput.js +34 -22
  71. package/dist/cjs/timepicker.js +13 -13
  72. package/dist/cjs/toast.js +5 -5
  73. package/dist/cjs/tooltip.js +5 -5
  74. package/dist/cjs/upload.js +5 -5
  75. package/dist/components/autocomplete/index.js +98 -13
  76. package/dist/components/autocomplete/index.min.js +2 -2
  77. package/dist/components/breadcrumb/index.js +293 -0
  78. package/dist/components/breadcrumb/index.min.js +2 -0
  79. package/dist/components/button/index.js +5 -1
  80. package/dist/components/button/index.min.js +2 -2
  81. package/dist/components/carousel/index.js +348 -15
  82. package/dist/components/carousel/index.min.js +2 -2
  83. package/dist/components/checkbox/index.js +1 -1
  84. package/dist/components/checkbox/index.min.js +1 -1
  85. package/dist/components/clockpicker/index.js +54 -47
  86. package/dist/components/clockpicker/index.min.js +2 -2
  87. package/dist/components/collapse/index.js +1 -1
  88. package/dist/components/collapse/index.min.js +1 -1
  89. package/dist/components/datepicker/index.js +41 -32
  90. package/dist/components/datepicker/index.min.js +2 -2
  91. package/dist/components/datetimepicker/index.js +75 -58
  92. package/dist/components/datetimepicker/index.min.js +2 -2
  93. package/dist/components/dialog/index.js +126 -18
  94. package/dist/components/dialog/index.min.js +2 -2
  95. package/dist/components/dropdown/index.js +5 -1
  96. package/dist/components/dropdown/index.min.js +1 -1
  97. package/dist/components/field/index.js +29 -23
  98. package/dist/components/field/index.min.js +2 -2
  99. package/dist/components/icon/index.js +5 -1
  100. package/dist/components/icon/index.min.js +2 -2
  101. package/dist/components/image/index.js +463 -444
  102. package/dist/components/image/index.min.js +2 -2
  103. package/dist/components/input/index.js +5 -1
  104. package/dist/components/input/index.min.js +2 -2
  105. package/dist/components/loading/index.js +2 -2
  106. package/dist/components/loading/index.min.js +2 -2
  107. package/dist/components/menu/index.js +5 -1
  108. package/dist/components/menu/index.min.js +2 -2
  109. package/dist/components/message/index.js +43 -3
  110. package/dist/components/message/index.min.js +2 -2
  111. package/dist/components/modal/index.js +7 -2
  112. package/dist/components/modal/index.min.js +2 -2
  113. package/dist/components/navbar/index.js +16 -4
  114. package/dist/components/navbar/index.min.js +2 -2
  115. package/dist/components/notification/index.js +59 -6
  116. package/dist/components/notification/index.min.js +2 -2
  117. package/dist/components/numberinput/index.js +9 -3
  118. package/dist/components/numberinput/index.min.js +2 -2
  119. package/dist/components/pagination/index.js +5 -1
  120. package/dist/components/pagination/index.min.js +2 -2
  121. package/dist/components/progress/index.js +10 -2
  122. package/dist/components/progress/index.min.js +2 -2
  123. package/dist/components/radio/index.js +1 -1
  124. package/dist/components/radio/index.min.js +1 -1
  125. package/dist/components/rate/index.js +5 -1
  126. package/dist/components/rate/index.min.js +2 -2
  127. package/dist/components/select/index.js +5 -1
  128. package/dist/components/select/index.min.js +2 -2
  129. package/dist/components/sidebar/index.js +5 -1
  130. package/dist/components/sidebar/index.min.js +1 -1
  131. package/dist/components/skeleton/index.js +1 -1
  132. package/dist/components/skeleton/index.min.js +1 -1
  133. package/dist/components/slider/index.js +5 -1
  134. package/dist/components/slider/index.min.js +2 -2
  135. package/dist/components/snackbar/index.js +7 -2
  136. package/dist/components/snackbar/index.min.js +2 -2
  137. package/dist/components/steps/index.js +5 -1
  138. package/dist/components/steps/index.min.js +2 -2
  139. package/dist/components/switch/index.js +5 -1
  140. package/dist/components/switch/index.min.js +1 -1
  141. package/dist/components/table/index.js +6 -2
  142. package/dist/components/table/index.min.js +2 -2
  143. package/dist/components/tabs/index.js +5 -1
  144. package/dist/components/tabs/index.min.js +2 -2
  145. package/dist/components/tag/index.js +26 -3
  146. package/dist/components/tag/index.min.js +2 -2
  147. package/dist/components/taginput/index.js +185 -29
  148. package/dist/components/taginput/index.min.js +2 -2
  149. package/dist/components/timepicker/index.js +54 -47
  150. package/dist/components/timepicker/index.min.js +2 -2
  151. package/dist/components/toast/index.js +7 -2
  152. package/dist/components/toast/index.min.js +2 -2
  153. package/dist/components/tooltip/index.js +5 -1
  154. package/dist/components/tooltip/index.min.js +1 -1
  155. package/dist/components/upload/index.js +5 -1
  156. package/dist/components/upload/index.min.js +2 -2
  157. package/dist/esm/autocomplete.js +7 -7
  158. package/dist/esm/breadcrumb.js +122 -0
  159. package/dist/esm/button.js +6 -107
  160. package/dist/esm/carousel.js +7 -5
  161. package/dist/esm/{chunk-56040896.js → chunk-18e8b067.js} +3 -3
  162. package/dist/esm/{chunk-fa404a2c.js → chunk-21fc0948.js} +7 -7
  163. package/dist/esm/{chunk-f9299099.js → chunk-22e9f916.js} +19 -15
  164. package/dist/esm/{chunk-1fafdf15.js → chunk-2452e3d3.js} +37 -1
  165. package/dist/esm/{chunk-1297c2c9.js → chunk-29ca0df8.js} +1 -1
  166. package/dist/esm/{chunk-3c2169d7.js → chunk-2f2f0a74.js} +25 -2
  167. package/dist/esm/{chunk-cf72ce36.js → chunk-3773c62d.js} +2 -2
  168. package/dist/esm/{chunk-2c957994.js → chunk-4b67a181.js} +3 -3
  169. package/dist/esm/{chunk-45740cdc.js → chunk-6019fd7a.js} +96 -15
  170. package/dist/esm/chunk-71a547bc.js +312 -0
  171. package/dist/esm/{chunk-516e4877.js → chunk-75a5af93.js} +1 -1
  172. package/dist/esm/{chunk-4e380ee2.js → chunk-799e084d.js} +2 -1
  173. package/dist/esm/{chunk-37678809.js → chunk-83eb0d37.js} +3 -3
  174. package/dist/esm/{chunk-34c74085.js → chunk-8d0f95b8.js} +4 -4
  175. package/dist/esm/{chunk-652f2dad.js → chunk-8ed29c41.js} +4 -0
  176. package/dist/esm/{chunk-742a9694.js → chunk-9f7f7441.js} +3 -2
  177. package/dist/esm/{chunk-f160efb9.js → chunk-ae8ab23a.js} +4 -4
  178. package/dist/esm/{chunk-c3b09672.js → chunk-b07e3182.js} +26 -24
  179. package/dist/esm/{chunk-e36a4f2c.js → chunk-b0c0c6b0.js} +0 -0
  180. package/dist/esm/{chunk-ee935ae6.js → chunk-c9c58d0c.js} +1 -1
  181. package/dist/esm/{chunk-1d62828e.js → chunk-d7f92d97.js} +39 -3
  182. package/dist/esm/{chunk-7fd02ffe.js → chunk-d92f0cd9.js} +2 -2
  183. package/dist/esm/chunk-e7c9b2cb.js +108 -0
  184. package/dist/esm/{chunk-0e22ae0a.js → chunk-ece062a7.js} +27 -26
  185. package/dist/esm/clockpicker.js +9 -9
  186. package/dist/esm/config.js +2 -2
  187. package/dist/esm/datepicker.js +11 -11
  188. package/dist/esm/datetimepicker.js +21 -14
  189. package/dist/esm/dialog.js +10 -8
  190. package/dist/esm/dropdown.js +5 -5
  191. package/dist/esm/field.js +4 -4
  192. package/dist/esm/helpers.js +2 -3
  193. package/dist/esm/icon.js +4 -4
  194. package/dist/esm/image.js +6 -311
  195. package/dist/esm/index.js +106 -100
  196. package/dist/esm/input.js +6 -6
  197. package/dist/esm/loading.js +4 -4
  198. package/dist/esm/menu.js +3 -3
  199. package/dist/esm/message.js +5 -5
  200. package/dist/esm/modal.js +4 -4
  201. package/dist/esm/navbar.js +16 -4
  202. package/dist/esm/notification.js +22 -10
  203. package/dist/esm/numberinput.js +9 -7
  204. package/dist/esm/pagination.js +5 -5
  205. package/dist/esm/progress.js +8 -4
  206. package/dist/esm/rate.js +3 -3
  207. package/dist/esm/select.js +6 -6
  208. package/dist/esm/sidebar.js +2 -2
  209. package/dist/esm/slider.js +3 -3
  210. package/dist/esm/snackbar.js +4 -4
  211. package/dist/esm/steps.js +6 -6
  212. package/dist/esm/switch.js +1 -1
  213. package/dist/esm/table.js +9 -9
  214. package/dist/esm/tabs.js +6 -6
  215. package/dist/esm/tag.js +2 -2
  216. package/dist/esm/taginput.js +33 -21
  217. package/dist/esm/timepicker.js +12 -12
  218. package/dist/esm/toast.js +4 -4
  219. package/dist/esm/tooltip.js +4 -4
  220. package/dist/esm/upload.js +3 -3
  221. package/dist/vetur/attributes.json +95 -19
  222. package/dist/vetur/tags.json +37 -4
  223. package/package.json +2 -2
  224. package/src/components/autocomplete/Autocomplete.spec.js +70 -0
  225. package/src/components/autocomplete/Autocomplete.vue +93 -18
  226. package/src/components/breadcrumb/Breadcrumb.spec.js +63 -0
  227. package/src/components/breadcrumb/Breadcrumb.vue +43 -0
  228. package/src/components/breadcrumb/BreadcrumbItem.spec.js +25 -0
  229. package/src/components/breadcrumb/BreadcrumbItem.vue +33 -0
  230. package/src/components/breadcrumb/__snapshots__/Breadcrumb.spec.js.snap +7 -0
  231. package/src/components/breadcrumb/__snapshots__/BreadcrumbItem.spec.js.snap +7 -0
  232. package/src/components/breadcrumb/index.js +20 -0
  233. package/src/components/carousel/CarouselList.vue +3 -1
  234. package/src/components/carousel/__snapshots__/CarouselList.spec.js.snap +128 -8
  235. package/src/components/clockpicker/Clockpicker.vue +259 -259
  236. package/src/components/datepicker/Datepicker.vue +10 -6
  237. package/src/components/datetimepicker/Datetimepicker.vue +8 -1
  238. package/src/components/dialog/Dialog.vue +10 -10
  239. package/src/components/field/Field.vue +271 -270
  240. package/src/components/image/Image.spec.js +197 -183
  241. package/src/components/image/Image.vue +4 -2
  242. package/src/components/index.js +2 -0
  243. package/src/components/loading/Loading.vue +1 -1
  244. package/src/components/loading/__snapshots__/Loading.spec.js.snap +1 -1
  245. package/src/components/message/Message.vue +7 -1
  246. package/src/components/message/__snapshots__/Message.spec.js.snap +1 -0
  247. package/src/components/modal/Modal.vue +2 -0
  248. package/src/components/navbar/Navbar.vue +5 -1
  249. package/src/components/navbar/NavbarBurger.vue +1 -0
  250. package/src/components/navbar/NavbarDropdown.vue +8 -2
  251. package/src/components/navbar/__snapshots__/NavBar.spec.js.snap +11 -11
  252. package/src/components/navbar/__snapshots__/NavBarBurger.spec.js.snap +3 -0
  253. package/src/components/navbar/__snapshots__/NavbarDropdown.spec.js.snap +1 -1
  254. package/src/components/notification/Notification.vue +6 -0
  255. package/src/components/notification/NotificationNotice.vue +16 -3
  256. package/src/components/notification/__snapshots__/Notification.spec.js.snap +1 -0
  257. package/src/components/numberinput/Numberinput.spec.js +10 -0
  258. package/src/components/numberinput/Numberinput.vue +4 -2
  259. package/src/components/progress/Progress.vue +6 -2
  260. package/src/components/snackbar/Snackbar.vue +2 -0
  261. package/src/components/tag/Tag.vue +25 -2
  262. package/src/components/tag/__snapshots__/Tag.spec.js.snap +1 -1
  263. package/src/components/taginput/Taginput.spec.js +57 -1
  264. package/src/components/taginput/Taginput.vue +373 -364
  265. package/src/components/toast/Toast.vue +1 -1
  266. package/src/index.js +2 -0
  267. package/src/scss/buefy.scss +1 -0
  268. package/src/scss/components/_loading.scss +2 -1
  269. package/src/scss/components/_message.scss +3 -0
  270. package/src/scss/components/_notification.scss +8 -0
  271. package/src/scss/components/_progress.scss +8 -0
  272. package/src/utils/MessageMixin.js +32 -1
  273. package/src/utils/NoticeMixin.js +1 -0
  274. package/src/utils/TimepickerMixin.js +718 -716
  275. package/src/utils/config.js +4 -0
  276. package/src/utils/helpers.js +1 -2
  277. package/types/components.d.ts +5 -0
  278. package/src/components/navbar/__snapshots__/NavbarBurger.spec.js.snap +0 -3
@@ -1,507 +1,526 @@
1
- /*! Buefy v0.9.9 | MIT License | github.com/buefy/buefy */
1
+ /*! Buefy v0.9.13 | MIT License | github.com/buefy/buefy */
2
2
  (function (global, factory) {
3
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
4
- typeof define === 'function' && define.amd ? define(['exports'], factory) :
5
- (global = global || self, factory(global.Image = {}));
3
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
4
+ typeof define === 'function' && define.amd ? define(['exports'], factory) :
5
+ (global = global || self, factory(global.Image = {}));
6
6
  }(this, function (exports) { 'use strict';
7
7
 
8
- var config = {
9
- defaultContainerElement: null,
10
- defaultIconPack: 'mdi',
11
- defaultIconComponent: null,
12
- defaultIconPrev: 'chevron-left',
13
- defaultIconNext: 'chevron-right',
14
- defaultLocale: undefined,
15
- defaultDialogConfirmText: null,
16
- defaultDialogCancelText: null,
17
- defaultSnackbarDuration: 3500,
18
- defaultSnackbarPosition: null,
19
- defaultToastDuration: 2000,
20
- defaultToastPosition: null,
21
- defaultNotificationDuration: 2000,
22
- defaultNotificationPosition: null,
23
- defaultTooltipType: 'is-primary',
24
- defaultTooltipDelay: null,
25
- defaultSidebarDelay: null,
26
- defaultInputAutocomplete: 'on',
27
- defaultDateFormatter: null,
28
- defaultDateParser: null,
29
- defaultDateCreator: null,
30
- defaultTimeCreator: null,
31
- defaultDayNames: null,
32
- defaultMonthNames: null,
33
- defaultFirstDayOfWeek: null,
34
- defaultUnselectableDaysOfWeek: null,
35
- defaultTimeFormatter: null,
36
- defaultTimeParser: null,
37
- defaultModalCanCancel: ['escape', 'x', 'outside', 'button'],
38
- defaultModalScroll: null,
39
- defaultDatepickerMobileNative: true,
40
- defaultTimepickerMobileNative: true,
41
- defaultNoticeQueue: true,
42
- defaultInputHasCounter: true,
43
- defaultTaginputHasCounter: true,
44
- defaultUseHtml5Validation: true,
45
- defaultDropdownMobileModal: true,
46
- defaultFieldLabelPosition: null,
47
- defaultDatepickerYearsRange: [-100, 10],
48
- defaultDatepickerNearbyMonthDays: true,
49
- defaultDatepickerNearbySelectableMonthDays: false,
50
- defaultDatepickerShowWeekNumber: false,
51
- defaultDatepickerWeekNumberClickable: false,
52
- defaultDatepickerMobileModal: true,
53
- defaultTrapFocus: true,
54
- defaultAutoFocus: true,
55
- defaultButtonRounded: false,
56
- defaultSwitchRounded: true,
57
- defaultCarouselInterval: 3500,
58
- defaultTabsExpanded: false,
59
- defaultTabsAnimated: true,
60
- defaultTabsType: null,
61
- defaultStatusIcon: true,
62
- defaultProgrammaticPromise: false,
63
- defaultLinkTags: ['a', 'button', 'input', 'router-link', 'nuxt-link', 'n-link', 'RouterLink', 'NuxtLink', 'NLink'],
64
- defaultImageWebpFallback: null,
65
- defaultImageLazy: true,
66
- defaultImageResponsive: true,
67
- defaultImageRatio: null,
68
- defaultImageSrcsetFormatter: null,
69
- customIconPacks: null
70
- };
71
-
72
- /**
73
- * Based on
74
- * https://github.com/fregante/supports-webp
75
- */
76
-
77
- function isWebpSupported() {
78
- return new Promise(function (resolve) {
79
- var image = new Image();
80
-
81
- image.onerror = function () {
82
- return resolve(false);
83
- };
84
-
85
- image.onload = function () {
86
- return resolve(image.width === 1);
87
- };
88
-
89
- image.src = 'data:image/webp;base64,UklGRiQAAABXRUJQVlA4IBgAAAAwAQCdASoBAAEAAwA0JaQAA3AA/vuUAAA=';
90
- }).catch(function () {
91
- return false;
8
+ function _defineProperty(obj, key, value) {
9
+ if (key in obj) {
10
+ Object.defineProperty(obj, key, {
11
+ value: value,
12
+ enumerable: true,
13
+ configurable: true,
14
+ writable: true
92
15
  });
16
+ } else {
17
+ obj[key] = value;
93
18
  }
94
19
 
95
- //
96
- var script = {
97
- name: 'BImage',
98
- props: {
99
- src: String,
100
- alt: String,
101
- srcFallback: String,
102
- webpFallback: {
103
- type: String,
104
- default: function _default() {
105
- return config.defaultImageWebpFallback;
106
- }
107
- },
108
- lazy: {
109
- type: Boolean,
110
- default: function _default() {
111
- return config.defaultImageLazy;
112
- }
113
- },
114
- responsive: {
115
- type: Boolean,
116
- default: function _default() {
117
- return config.defaultImageResponsive;
118
- }
119
- },
120
- ratio: {
121
- type: String,
122
- default: function _default() {
123
- return config.defaultImageRatio;
124
- }
125
- },
126
- placeholder: String,
127
- srcset: String,
128
- srcsetSizes: Array,
129
- srcsetFormatter: {
130
- type: Function,
131
- default: function _default(src, size, vm) {
132
- if (typeof config.defaultImageSrcsetFormatter === 'function') {
133
- return config.defaultImageSrcsetFormatter(src, size);
134
- } else {
135
- return vm.formatSrcset(src, size);
136
- }
20
+ return obj;
21
+ }
22
+
23
+ var config = {
24
+ defaultContainerElement: null,
25
+ defaultIconPack: 'mdi',
26
+ defaultIconComponent: null,
27
+ defaultIconPrev: 'chevron-left',
28
+ defaultIconNext: 'chevron-right',
29
+ defaultLocale: undefined,
30
+ defaultDialogConfirmText: null,
31
+ defaultDialogCancelText: null,
32
+ defaultSnackbarDuration: 3500,
33
+ defaultSnackbarPosition: null,
34
+ defaultToastDuration: 2000,
35
+ defaultToastPosition: null,
36
+ defaultNotificationDuration: 2000,
37
+ defaultNotificationPosition: null,
38
+ defaultTooltipType: 'is-primary',
39
+ defaultTooltipDelay: null,
40
+ defaultSidebarDelay: null,
41
+ defaultInputAutocomplete: 'on',
42
+ defaultDateFormatter: null,
43
+ defaultDateParser: null,
44
+ defaultDateCreator: null,
45
+ defaultTimeCreator: null,
46
+ defaultDayNames: null,
47
+ defaultMonthNames: null,
48
+ defaultFirstDayOfWeek: null,
49
+ defaultUnselectableDaysOfWeek: null,
50
+ defaultTimeFormatter: null,
51
+ defaultTimeParser: null,
52
+ defaultModalCanCancel: ['escape', 'x', 'outside', 'button'],
53
+ defaultModalScroll: null,
54
+ defaultDatepickerMobileNative: true,
55
+ defaultTimepickerMobileNative: true,
56
+ defaultNoticeQueue: true,
57
+ defaultInputHasCounter: true,
58
+ defaultTaginputHasCounter: true,
59
+ defaultUseHtml5Validation: true,
60
+ defaultDropdownMobileModal: true,
61
+ defaultFieldLabelPosition: null,
62
+ defaultDatepickerYearsRange: [-100, 10],
63
+ defaultDatepickerNearbyMonthDays: true,
64
+ defaultDatepickerNearbySelectableMonthDays: false,
65
+ defaultDatepickerShowWeekNumber: false,
66
+ defaultDatepickerWeekNumberClickable: false,
67
+ defaultDatepickerMobileModal: true,
68
+ defaultTrapFocus: true,
69
+ defaultAutoFocus: true,
70
+ defaultButtonRounded: false,
71
+ defaultSwitchRounded: true,
72
+ defaultCarouselInterval: 3500,
73
+ defaultTabsExpanded: false,
74
+ defaultTabsAnimated: true,
75
+ defaultTabsType: null,
76
+ defaultStatusIcon: true,
77
+ defaultProgrammaticPromise: false,
78
+ defaultLinkTags: ['a', 'button', 'input', 'router-link', 'nuxt-link', 'n-link', 'RouterLink', 'NuxtLink', 'NLink'],
79
+ defaultImageWebpFallback: null,
80
+ defaultImageLazy: true,
81
+ defaultImageResponsive: true,
82
+ defaultImageRatio: null,
83
+ defaultImageSrcsetFormatter: null,
84
+ defaultBreadcrumbTag: 'a',
85
+ defaultBreadcrumbAlign: 'is-left',
86
+ defaultBreadcrumbSeparator: '',
87
+ defaultBreadcrumbSize: 'is-medium',
88
+ customIconPacks: null
89
+ };
90
+
91
+ /**
92
+ * Based on
93
+ * https://github.com/fregante/supports-webp
94
+ */
95
+
96
+ function isWebpSupported() {
97
+ return new Promise(function (resolve) {
98
+ var image = new Image();
99
+
100
+ image.onerror = function () {
101
+ return resolve(false);
102
+ };
103
+
104
+ image.onload = function () {
105
+ return resolve(image.width === 1);
106
+ };
107
+
108
+ image.src = 'data:image/webp;base64,UklGRiQAAABXRUJQVlA4IBgAAAAwAQCdASoBAAEAAwA0JaQAA3AA/vuUAAA=';
109
+ }).catch(function () {
110
+ return false;
111
+ });
112
+ }
113
+
114
+ var script = {
115
+ name: 'BImage',
116
+ props: {
117
+ src: String,
118
+ alt: String,
119
+ srcFallback: String,
120
+ webpFallback: {
121
+ type: String,
122
+ default: function _default() {
123
+ return config.defaultImageWebpFallback;
124
+ }
125
+ },
126
+ lazy: {
127
+ type: Boolean,
128
+ default: function _default() {
129
+ return config.defaultImageLazy;
130
+ }
131
+ },
132
+ responsive: {
133
+ type: Boolean,
134
+ default: function _default() {
135
+ return config.defaultImageResponsive;
136
+ }
137
+ },
138
+ ratio: {
139
+ type: String,
140
+ default: function _default() {
141
+ return config.defaultImageRatio;
142
+ }
143
+ },
144
+ placeholder: String,
145
+ srcset: String,
146
+ srcsetSizes: Array,
147
+ srcsetFormatter: {
148
+ type: Function,
149
+ default: function _default(src, size, vm) {
150
+ if (typeof config.defaultImageSrcsetFormatter === 'function') {
151
+ return config.defaultImageSrcsetFormatter(src, size);
152
+ } else {
153
+ return vm.formatSrcset(src, size);
137
154
  }
138
- },
139
- rounded: {
140
- type: Boolean,
141
- default: false
142
- },
143
- captionFirst: {
144
- type: Boolean,
145
- default: false
146
155
  }
147
156
  },
148
- data: function data() {
149
- return {
150
- clientWidth: 0,
151
- webpSupportVerified: false,
152
- webpSupported: false,
153
- useNativeLazy: false,
154
- observer: null,
155
- inViewPort: false,
156
- bulmaKnownRatio: ['square', '1by1', '5by4', '4by3', '3by2', '5by3', '16by9', 'b2y1', '3by1', '4by5', '3by4', '2by3', '3by5', '9by16', '1by2', '1by3'],
157
- loaded: false,
158
- failed: false
159
- };
157
+ rounded: {
158
+ type: Boolean,
159
+ default: false
160
160
  },
161
- computed: {
162
- ratioPattern: function ratioPattern() {
163
- return new RegExp(/([0-9]+)by([0-9]+)/);
164
- },
165
- hasRatio: function hasRatio() {
166
- return this.ratio && this.ratioPattern.test(this.ratio);
167
- },
168
- figureClasses: function figureClasses() {
169
- var classes = {
170
- image: this.responsive
171
- };
161
+ captionFirst: {
162
+ type: Boolean,
163
+ default: false
164
+ },
165
+ customClass: String
166
+ },
167
+ data: function data() {
168
+ return {
169
+ clientWidth: 0,
170
+ webpSupportVerified: false,
171
+ webpSupported: false,
172
+ useNativeLazy: false,
173
+ observer: null,
174
+ inViewPort: false,
175
+ bulmaKnownRatio: ['square', '1by1', '5by4', '4by3', '3by2', '5by3', '16by9', 'b2y1', '3by1', '4by5', '3by4', '2by3', '3by5', '9by16', '1by2', '1by3'],
176
+ loaded: false,
177
+ failed: false
178
+ };
179
+ },
180
+ computed: {
181
+ ratioPattern: function ratioPattern() {
182
+ return new RegExp(/([0-9]+)by([0-9]+)/);
183
+ },
184
+ hasRatio: function hasRatio() {
185
+ return this.ratio && this.ratioPattern.test(this.ratio);
186
+ },
187
+ figureClasses: function figureClasses() {
188
+ var classes = {
189
+ image: this.responsive
190
+ };
172
191
 
173
- if (this.hasRatio && this.bulmaKnownRatio.indexOf(this.ratio) >= 0) {
174
- classes["is-".concat(this.ratio)] = true;
175
- }
192
+ if (this.hasRatio && this.bulmaKnownRatio.indexOf(this.ratio) >= 0) {
193
+ classes["is-".concat(this.ratio)] = true;
194
+ }
176
195
 
177
- return classes;
178
- },
179
- figureStyles: function figureStyles() {
180
- if (this.hasRatio && this.bulmaKnownRatio.indexOf(this.ratio) < 0) {
181
- var ratioValues = this.ratioPattern.exec(this.ratio);
182
- return {
183
- paddingTop: "".concat(ratioValues[2] / ratioValues[1] * 100, "%")
184
- };
185
- }
186
- },
187
- imgClasses: function imgClasses() {
196
+ return classes;
197
+ },
198
+ figureStyles: function figureStyles() {
199
+ if (this.hasRatio && this.bulmaKnownRatio.indexOf(this.ratio) < 0) {
200
+ var ratioValues = this.ratioPattern.exec(this.ratio);
188
201
  return {
189
- 'is-rounded': this.rounded,
190
- 'has-ratio': this.hasRatio
202
+ paddingTop: "".concat(ratioValues[2] / ratioValues[1] * 100, "%")
191
203
  };
192
- },
193
- srcExt: function srcExt() {
194
- return this.getExt(this.src);
195
- },
196
- isWepb: function isWepb() {
197
- return this.srcExt === 'webp';
198
- },
199
- computedSrc: function computedSrc() {
200
- var src = this.src;
201
-
202
- if (this.failed && this.srcFallback) {
203
- src = this.srcFallback;
204
- }
205
-
206
- if (!this.webpSupported && this.isWepb && this.webpFallback) {
207
- if (this.webpFallback.startsWith('.')) {
208
- return src.replace(/\.webp/gi, "".concat(this.webpFallback));
209
- }
204
+ }
205
+ },
206
+ imgClasses: function imgClasses() {
207
+ return _defineProperty({
208
+ 'is-rounded': this.rounded,
209
+ 'has-ratio': this.hasRatio
210
+ }, this.customClass, !!this.customClass);
211
+ },
212
+ srcExt: function srcExt() {
213
+ return this.getExt(this.src);
214
+ },
215
+ isWepb: function isWepb() {
216
+ return this.srcExt === 'webp';
217
+ },
218
+ computedSrc: function computedSrc() {
219
+ var src = this.src;
210
220
 
211
- return this.webpFallback;
212
- }
221
+ if (this.failed && this.srcFallback) {
222
+ src = this.srcFallback;
223
+ }
213
224
 
214
- return src;
215
- },
216
- computedWidth: function computedWidth() {
217
- if (this.responsive && this.clientWidth > 0) {
218
- return this.clientWidth;
219
- }
220
- },
221
- computedNativeLazy: function computedNativeLazy() {
222
- if (this.lazy && this.useNativeLazy) {
223
- return 'lazy';
224
- }
225
- },
226
- isDisplayed: function isDisplayed() {
227
- return (this.webpSupportVerified || !this.isWepb) && (!this.lazy || this.useNativeLazy || this.inViewPort);
228
- },
229
- placeholderExt: function placeholderExt() {
230
- if (this.placeholder) {
231
- return this.getExt(this.placeholder);
225
+ if (!this.webpSupported && this.isWepb && this.webpFallback) {
226
+ if (this.webpFallback.startsWith('.')) {
227
+ return src.replace(/\.webp/gi, "".concat(this.webpFallback));
232
228
  }
233
- },
234
- isPlaceholderWepb: function isPlaceholderWepb() {
235
- if (this.placeholder) {
236
- return this.placeholderExt === 'webp';
237
- }
238
- },
239
- computedPlaceholder: function computedPlaceholder() {
240
- if (!this.webpSupported && this.isPlaceholderWepb && this.webpFallback && this.webpFallback.startsWith('.')) {
241
- return this.placeholder.replace(/\.webp/gi, "".concat(this.webpFallback));
242
- }
243
-
244
- return this.placeholder;
245
- },
246
- isPlaceholderDisplayed: function isPlaceholderDisplayed() {
247
- return !this.loaded && (this.$slots.placeholder || this.placeholder && (this.webpSupportVerified || !this.isPlaceholderWepb));
248
- },
249
- computedSrcset: function computedSrcset() {
250
- var _this = this;
251
-
252
- if (this.srcset) {
253
- if (!this.webpSupported && this.isWepb && this.webpFallback && this.webpFallback.startsWith('.')) {
254
- return this.srcset.replace(/\.webp/gi, "".concat(this.webpFallback));
255
- }
256
229
 
257
- return this.srcset;
258
- }
230
+ return this.webpFallback;
231
+ }
259
232
 
260
- if (this.srcsetSizes && Array.isArray(this.srcsetSizes) && this.srcsetSizes.length > 0) {
261
- return this.srcsetSizes.map(function (size) {
262
- return "".concat(_this.srcsetFormatter(_this.computedSrc, size, _this), " ").concat(size, "w");
263
- }).join(',');
264
- }
265
- },
266
- computedSizes: function computedSizes() {
267
- if (this.computedSrcset && this.computedWidth) {
268
- return "".concat(this.computedWidth, "px");
269
- }
270
- },
271
- isCaptionFirst: function isCaptionFirst() {
272
- return this.$slots.caption && this.captionFirst;
273
- },
274
- isCaptionLast: function isCaptionLast() {
275
- return this.$slots.caption && !this.captionFirst;
233
+ return src;
234
+ },
235
+ computedWidth: function computedWidth() {
236
+ if (this.responsive && this.clientWidth > 0) {
237
+ return this.clientWidth;
276
238
  }
277
239
  },
278
- methods: {
279
- getExt: function getExt(filename) {
280
- var clean = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
281
-
282
- if (filename) {
283
- var noParam = clean ? filename.split('?')[0] : filename;
284
- return noParam.split('.').pop();
285
- }
286
-
287
- return '';
288
- },
289
- setWidth: function setWidth() {
290
- this.clientWidth = this.$el.clientWidth;
291
- },
292
- formatSrcset: function formatSrcset(src, size) {
293
- var ext = this.getExt(src, false);
294
- var name = src.split('.').slice(0, -1).join('.');
295
- return "".concat(name, "-").concat(size, ".").concat(ext);
296
- },
297
- onLoad: function onLoad(event) {
298
- this.loaded = true;
299
- this.emit('load', event);
300
- },
301
- onError: function onError(event) {
302
- this.emit('error', event);
303
-
304
- if (!this.failed) {
305
- this.failed = true;
306
- }
307
- },
308
- emit: function emit(eventName, event) {
309
- var target = event.target;
310
- this.$emit(eventName, event, target.currentSrc || target.src || this.computedSrc);
240
+ computedNativeLazy: function computedNativeLazy() {
241
+ if (this.lazy && this.useNativeLazy) {
242
+ return 'lazy';
311
243
  }
312
244
  },
313
- created: function created() {
314
- var _this2 = this;
315
-
316
- if (this.isWepb) {
317
- isWebpSupported().then(function (supported) {
318
- _this2.webpSupportVerified = true;
319
- _this2.webpSupported = supported;
320
- });
245
+ isDisplayed: function isDisplayed() {
246
+ return (this.webpSupportVerified || !this.isWepb) && (!this.lazy || this.useNativeLazy || this.inViewPort);
247
+ },
248
+ placeholderExt: function placeholderExt() {
249
+ if (this.placeholder) {
250
+ return this.getExt(this.placeholder);
321
251
  }
322
-
323
- if (this.lazy) {
324
- // We use native lazy loading if supported
325
- // We try to use Intersection Observer if native lazy loading is not supported
326
- // We use the lazy attribute anyway if we cannot detect support (SSR for example).
327
- var nativeLazySupported = typeof window !== 'undefined' && 'HTMLImageElement' in window && 'loading' in HTMLImageElement.prototype;
328
- var intersectionObserverSupported = typeof window !== 'undefined' && 'IntersectionObserver' in window;
329
-
330
- if (!nativeLazySupported && intersectionObserverSupported) {
331
- this.observer = new IntersectionObserver(function (events) {
332
- var _events$ = events[0],
333
- target = _events$.target,
334
- isIntersecting = _events$.isIntersecting;
335
-
336
- if (isIntersecting && !_this2.inViewPort) {
337
- _this2.inViewPort = true;
338
-
339
- _this2.observer.unobserve(target);
340
- }
341
- });
342
- } else {
343
- this.useNativeLazy = true;
344
- }
252
+ },
253
+ isPlaceholderWepb: function isPlaceholderWepb() {
254
+ if (this.placeholder) {
255
+ return this.placeholderExt === 'webp';
345
256
  }
346
257
  },
347
- mounted: function mounted() {
348
- if (this.lazy && this.observer) {
349
- this.observer.observe(this.$el);
258
+ computedPlaceholder: function computedPlaceholder() {
259
+ if (!this.webpSupported && this.isPlaceholderWepb && this.webpFallback && this.webpFallback.startsWith('.')) {
260
+ return this.placeholder.replace(/\.webp/gi, "".concat(this.webpFallback));
350
261
  }
351
262
 
352
- this.setWidth();
263
+ return this.placeholder;
264
+ },
265
+ isPlaceholderDisplayed: function isPlaceholderDisplayed() {
266
+ return !this.loaded && (this.$slots.placeholder || this.placeholder && (this.webpSupportVerified || !this.isPlaceholderWepb));
267
+ },
268
+ computedSrcset: function computedSrcset() {
269
+ var _this = this;
270
+
271
+ if (this.srcset) {
272
+ if (!this.webpSupported && this.isWepb && this.webpFallback && this.webpFallback.startsWith('.')) {
273
+ return this.srcset.replace(/\.webp/gi, "".concat(this.webpFallback));
274
+ }
353
275
 
354
- if (typeof window !== 'undefined') {
355
- window.addEventListener('resize', this.setWidth);
276
+ return this.srcset;
277
+ }
278
+
279
+ if (this.srcsetSizes && Array.isArray(this.srcsetSizes) && this.srcsetSizes.length > 0) {
280
+ return this.srcsetSizes.map(function (size) {
281
+ return "".concat(_this.srcsetFormatter(_this.computedSrc, size, _this), " ").concat(size, "w");
282
+ }).join(',');
356
283
  }
357
284
  },
358
- beforeDestroy: function beforeDestroy() {
359
- if (this.observer) {
360
- this.observer.disconnect();
285
+ computedSizes: function computedSizes() {
286
+ if (this.computedSrcset && this.computedWidth) {
287
+ return "".concat(this.computedWidth, "px");
288
+ }
289
+ },
290
+ isCaptionFirst: function isCaptionFirst() {
291
+ return this.$slots.caption && this.captionFirst;
292
+ },
293
+ isCaptionLast: function isCaptionLast() {
294
+ return this.$slots.caption && !this.captionFirst;
295
+ }
296
+ },
297
+ methods: {
298
+ getExt: function getExt(filename) {
299
+ var clean = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
300
+
301
+ if (filename) {
302
+ var noParam = clean ? filename.split('?')[0] : filename;
303
+ return noParam.split('.').pop();
361
304
  }
362
305
 
363
- if (typeof window !== 'undefined') {
364
- window.removeEventListener('resize', this.setWidth);
306
+ return '';
307
+ },
308
+ setWidth: function setWidth() {
309
+ this.clientWidth = this.$el.clientWidth;
310
+ },
311
+ formatSrcset: function formatSrcset(src, size) {
312
+ var ext = this.getExt(src, false);
313
+ var name = src.split('.').slice(0, -1).join('.');
314
+ return "".concat(name, "-").concat(size, ".").concat(ext);
315
+ },
316
+ onLoad: function onLoad(event) {
317
+ this.loaded = true;
318
+ this.emit('load', event);
319
+ },
320
+ onError: function onError(event) {
321
+ this.emit('error', event);
322
+
323
+ if (!this.failed) {
324
+ this.failed = true;
365
325
  }
326
+ },
327
+ emit: function emit(eventName, event) {
328
+ var target = event.target;
329
+ this.$emit(eventName, event, target.currentSrc || target.src || this.computedSrc);
330
+ }
331
+ },
332
+ created: function created() {
333
+ var _this2 = this;
334
+
335
+ if (this.isWepb) {
336
+ isWebpSupported().then(function (supported) {
337
+ _this2.webpSupportVerified = true;
338
+ _this2.webpSupported = supported;
339
+ });
366
340
  }
367
- };
368
-
369
- function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier
370
- /* server only */
371
- , shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {
372
- if (typeof shadowMode !== 'boolean') {
373
- createInjectorSSR = createInjector;
374
- createInjector = shadowMode;
375
- shadowMode = false;
376
- } // Vue.extend constructor export interop.
377
341
 
342
+ if (this.lazy) {
343
+ // We use native lazy loading if supported
344
+ // We try to use Intersection Observer if native lazy loading is not supported
345
+ // We use the lazy attribute anyway if we cannot detect support (SSR for example).
346
+ var nativeLazySupported = typeof window !== 'undefined' && 'HTMLImageElement' in window && 'loading' in HTMLImageElement.prototype;
347
+ var intersectionObserverSupported = typeof window !== 'undefined' && 'IntersectionObserver' in window;
378
348
 
379
- var options = typeof script === 'function' ? script.options : script; // render functions
349
+ if (!nativeLazySupported && intersectionObserverSupported) {
350
+ this.observer = new IntersectionObserver(function (events) {
351
+ var _events$ = events[0],
352
+ target = _events$.target,
353
+ isIntersecting = _events$.isIntersecting;
380
354
 
381
- if (template && template.render) {
382
- options.render = template.render;
383
- options.staticRenderFns = template.staticRenderFns;
384
- options._compiled = true; // functional template
355
+ if (isIntersecting && !_this2.inViewPort) {
356
+ _this2.inViewPort = true;
385
357
 
386
- if (isFunctionalTemplate) {
387
- options.functional = true;
358
+ _this2.observer.unobserve(target);
359
+ }
360
+ });
361
+ } else {
362
+ this.useNativeLazy = true;
388
363
  }
389
- } // scopedId
364
+ }
365
+ },
366
+ mounted: function mounted() {
367
+ if (this.lazy && this.observer) {
368
+ this.observer.observe(this.$el);
369
+ }
390
370
 
371
+ this.setWidth();
391
372
 
392
- if (scopeId) {
393
- options._scopeId = scopeId;
373
+ if (typeof window !== 'undefined') {
374
+ window.addEventListener('resize', this.setWidth);
375
+ }
376
+ },
377
+ beforeDestroy: function beforeDestroy() {
378
+ if (this.observer) {
379
+ this.observer.disconnect();
394
380
  }
395
381
 
396
- var hook;
382
+ if (typeof window !== 'undefined') {
383
+ window.removeEventListener('resize', this.setWidth);
384
+ }
385
+ }
386
+ };
397
387
 
398
- if (moduleIdentifier) {
399
- // server build
400
- hook = function hook(context) {
401
- // 2.3 injection
402
- context = context || // cached call
403
- this.$vnode && this.$vnode.ssrContext || // stateful
404
- this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext; // functional
405
- // 2.2 with runInNewContext: true
388
+ function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier
389
+ /* server only */
390
+ , shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {
391
+ if (typeof shadowMode !== 'boolean') {
392
+ createInjectorSSR = createInjector;
393
+ createInjector = shadowMode;
394
+ shadowMode = false;
395
+ } // Vue.extend constructor export interop.
406
396
 
407
- if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
408
- context = __VUE_SSR_CONTEXT__;
409
- } // inject component styles
410
397
 
398
+ var options = typeof script === 'function' ? script.options : script; // render functions
411
399
 
412
- if (style) {
413
- style.call(this, createInjectorSSR(context));
414
- } // register component module identifier for async chunk inference
400
+ if (template && template.render) {
401
+ options.render = template.render;
402
+ options.staticRenderFns = template.staticRenderFns;
403
+ options._compiled = true; // functional template
415
404
 
405
+ if (isFunctionalTemplate) {
406
+ options.functional = true;
407
+ }
408
+ } // scopedId
416
409
 
417
- if (context && context._registeredComponents) {
418
- context._registeredComponents.add(moduleIdentifier);
419
- }
420
- }; // used by ssr in case component is cached and beforeCreate
421
- // never gets called
422
410
 
411
+ if (scopeId) {
412
+ options._scopeId = scopeId;
413
+ }
423
414
 
424
- options._ssrRegister = hook;
425
- } else if (style) {
426
- hook = shadowMode ? function () {
427
- style.call(this, createInjectorShadow(this.$root.$options.shadowRoot));
428
- } : function (context) {
429
- style.call(this, createInjector(context));
430
- };
431
- }
415
+ var hook;
432
416
 
433
- if (hook) {
434
- if (options.functional) {
435
- // register for functional component in vue file
436
- var originalRender = options.render;
417
+ if (moduleIdentifier) {
418
+ // server build
419
+ hook = function hook(context) {
420
+ // 2.3 injection
421
+ context = context || // cached call
422
+ this.$vnode && this.$vnode.ssrContext || // stateful
423
+ this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext; // functional
424
+ // 2.2 with runInNewContext: true
437
425
 
438
- options.render = function renderWithStyleInjection(h, context) {
439
- hook.call(context);
440
- return originalRender(h, context);
441
- };
442
- } else {
443
- // inject component registration as beforeCreate hook
444
- var existing = options.beforeCreate;
445
- options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
426
+ if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
427
+ context = __VUE_SSR_CONTEXT__;
428
+ } // inject component styles
429
+
430
+
431
+ if (style) {
432
+ style.call(this, createInjectorSSR(context));
433
+ } // register component module identifier for async chunk inference
434
+
435
+
436
+ if (context && context._registeredComponents) {
437
+ context._registeredComponents.add(moduleIdentifier);
446
438
  }
447
- }
439
+ }; // used by ssr in case component is cached and beforeCreate
440
+ // never gets called
441
+
448
442
 
449
- return script;
443
+ options._ssrRegister = hook;
444
+ } else if (style) {
445
+ hook = shadowMode ? function () {
446
+ style.call(this, createInjectorShadow(this.$root.$options.shadowRoot));
447
+ } : function (context) {
448
+ style.call(this, createInjector(context));
449
+ };
450
450
  }
451
451
 
452
- var normalizeComponent_1 = normalizeComponent;
453
-
454
- /* script */
455
- const __vue_script__ = script;
456
-
457
- /* template */
458
- var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('figure',{staticClass:"b-image-wrapper",class:_vm.figureClasses,style:(_vm.figureStyles)},[(_vm.isCaptionFirst)?_c('figcaption',[_vm._t("caption")],2):_vm._e(),_c('transition',{attrs:{"name":"fade"}},[(_vm.isDisplayed)?_c('img',{class:_vm.imgClasses,attrs:{"srcset":_vm.computedSrcset,"src":_vm.computedSrc,"alt":_vm.alt,"width":_vm.computedWidth,"sizes":_vm.computedSizes,"loading":_vm.computedNativeLazy},on:{"load":_vm.onLoad,"error":_vm.onError}}):_vm._e()]),_c('transition',{attrs:{"name":"fade"}},[(_vm.isPlaceholderDisplayed)?_vm._t("placeholder",[_c('img',{staticClass:"placeholder",class:_vm.imgClasses,attrs:{"src":_vm.computedPlaceholder,"alt":_vm.alt}})]):_vm._e()],2),(_vm.isCaptionLast)?_c('figcaption',[_vm._t("caption")],2):_vm._e()],1)};
459
- var __vue_staticRenderFns__ = [];
460
-
461
- /* style */
462
- const __vue_inject_styles__ = undefined;
463
- /* scoped */
464
- const __vue_scope_id__ = undefined;
465
- /* module identifier */
466
- const __vue_module_identifier__ = undefined;
467
- /* functional template */
468
- const __vue_is_functional_template__ = false;
469
- /* style inject */
470
-
471
- /* style inject SSR */
472
-
473
-
474
-
475
- var Image$1 = normalizeComponent_1(
476
- { render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
477
- __vue_inject_styles__,
478
- __vue_script__,
479
- __vue_scope_id__,
480
- __vue_is_functional_template__,
481
- __vue_module_identifier__,
482
- undefined,
483
- undefined
484
- );
485
-
486
- var use = function use(plugin) {
487
- if (typeof window !== 'undefined' && window.Vue) {
488
- window.Vue.use(plugin);
489
- }
490
- };
491
- var registerComponent = function registerComponent(Vue, component) {
492
- Vue.component(component.name, component);
493
- };
494
-
495
- var Plugin = {
496
- install: function install(Vue) {
497
- registerComponent(Vue, Image$1);
452
+ if (hook) {
453
+ if (options.functional) {
454
+ // register for functional component in vue file
455
+ var originalRender = options.render;
456
+
457
+ options.render = function renderWithStyleInjection(h, context) {
458
+ hook.call(context);
459
+ return originalRender(h, context);
460
+ };
461
+ } else {
462
+ // inject component registration as beforeCreate hook
463
+ var existing = options.beforeCreate;
464
+ options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
498
465
  }
499
- };
500
- use(Plugin);
466
+ }
467
+
468
+ return script;
469
+ }
470
+
471
+ var normalizeComponent_1 = normalizeComponent;
472
+
473
+ /* script */
474
+ const __vue_script__ = script;
475
+
476
+ /* template */
477
+ var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('figure',{staticClass:"b-image-wrapper",class:_vm.figureClasses,style:(_vm.figureStyles)},[(_vm.isCaptionFirst)?_c('figcaption',[_vm._t("caption")],2):_vm._e(),_c('transition',{attrs:{"name":"fade"}},[(_vm.isDisplayed)?_c('img',{class:_vm.imgClasses,attrs:{"srcset":_vm.computedSrcset,"src":_vm.computedSrc,"alt":_vm.alt,"width":_vm.computedWidth,"sizes":_vm.computedSizes,"loading":_vm.computedNativeLazy},on:{"load":_vm.onLoad,"error":_vm.onError}}):_vm._e()]),_c('transition',{attrs:{"name":"fade"}},[(_vm.isPlaceholderDisplayed)?_vm._t("placeholder",[_c('img',{staticClass:"placeholder",class:_vm.imgClasses,attrs:{"src":_vm.computedPlaceholder,"alt":_vm.alt}})]):_vm._e()],2),(_vm.isCaptionLast)?_c('figcaption',[_vm._t("caption")],2):_vm._e()],1)};
478
+ var __vue_staticRenderFns__ = [];
479
+
480
+ /* style */
481
+ const __vue_inject_styles__ = undefined;
482
+ /* scoped */
483
+ const __vue_scope_id__ = undefined;
484
+ /* module identifier */
485
+ const __vue_module_identifier__ = undefined;
486
+ /* functional template */
487
+ const __vue_is_functional_template__ = false;
488
+ /* style inject */
489
+
490
+ /* style inject SSR */
491
+
492
+
493
+
494
+ var Image$1 = normalizeComponent_1(
495
+ { render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
496
+ __vue_inject_styles__,
497
+ __vue_script__,
498
+ __vue_scope_id__,
499
+ __vue_is_functional_template__,
500
+ __vue_module_identifier__,
501
+ undefined,
502
+ undefined
503
+ );
504
+
505
+ var use = function use(plugin) {
506
+ if (typeof window !== 'undefined' && window.Vue) {
507
+ window.Vue.use(plugin);
508
+ }
509
+ };
510
+ var registerComponent = function registerComponent(Vue, component) {
511
+ Vue.component(component.name, component);
512
+ };
513
+
514
+ var Plugin = {
515
+ install: function install(Vue) {
516
+ registerComponent(Vue, Image$1);
517
+ }
518
+ };
519
+ use(Plugin);
501
520
 
502
- exports.BImage = Image$1;
503
- exports.default = Plugin;
521
+ exports.BImage = Image$1;
522
+ exports.default = Plugin;
504
523
 
505
- Object.defineProperty(exports, '__esModule', { value: true });
524
+ Object.defineProperty(exports, '__esModule', { value: true });
506
525
 
507
526
  }));