buefy 3.0.1 → 3.0.3

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 (209) hide show
  1. package/README.md +2 -2
  2. package/dist/buefy.d.ts +20 -5
  3. package/dist/buefy.esm.js +49 -19
  4. package/dist/buefy.esm.min.js +2 -2
  5. package/dist/buefy.js +54 -17
  6. package/dist/buefy.min.js +2 -2
  7. package/dist/cjs/autocomplete.js +1 -1
  8. package/dist/cjs/breadcrumb.js +1 -1
  9. package/dist/cjs/button.js +1 -1
  10. package/dist/cjs/carousel.js +1 -1
  11. package/dist/cjs/checkbox.js +1 -1
  12. package/dist/cjs/clockpicker.js +1 -1
  13. package/dist/cjs/collapse.js +1 -1
  14. package/dist/cjs/colorpicker.js +2 -2
  15. package/dist/cjs/config.js +7 -1
  16. package/dist/cjs/datepicker.js +1 -1
  17. package/dist/cjs/datetimepicker.js +1 -1
  18. package/dist/cjs/dialog.js +7 -2
  19. package/dist/cjs/dropdown.js +1 -1
  20. package/dist/cjs/field.js +1 -1
  21. package/dist/cjs/icon.js +1 -1
  22. package/dist/cjs/image.js +1 -1
  23. package/dist/cjs/{index-DiQy3SCb.js → index-SLOXD6k3.js} +1 -1
  24. package/dist/cjs/index.js +10 -3
  25. package/dist/cjs/input.js +1 -1
  26. package/dist/cjs/loading.js +7 -2
  27. package/dist/cjs/menu.js +1 -1
  28. package/dist/cjs/message.js +1 -1
  29. package/dist/cjs/modal.js +7 -2
  30. package/dist/cjs/navbar.js +1 -1
  31. package/dist/cjs/notification.js +7 -2
  32. package/dist/cjs/numberinput.js +1 -1
  33. package/dist/cjs/pagination.js +1 -1
  34. package/dist/cjs/{plugins-DbyYGVpp.js → plugins-BWKpXmCr.js} +2 -1
  35. package/dist/cjs/progress.js +1 -1
  36. package/dist/cjs/radio.js +1 -1
  37. package/dist/cjs/rate.js +1 -1
  38. package/dist/cjs/select.js +1 -1
  39. package/dist/cjs/sidebar.js +1 -1
  40. package/dist/cjs/skeleton.js +1 -1
  41. package/dist/cjs/slider.js +1 -1
  42. package/dist/cjs/snackbar.js +7 -2
  43. package/dist/cjs/steps.js +1 -1
  44. package/dist/cjs/switch.js +1 -1
  45. package/dist/cjs/table.js +10 -9
  46. package/dist/cjs/tabs.js +1 -1
  47. package/dist/cjs/tag.js +1 -1
  48. package/dist/cjs/taginput.js +1 -1
  49. package/dist/cjs/timepicker.js +1 -1
  50. package/dist/cjs/toast.js +7 -2
  51. package/dist/cjs/tooltip.js +1 -1
  52. package/dist/cjs/upload.js +1 -1
  53. package/dist/components/autocomplete/index.js +1 -1
  54. package/dist/components/autocomplete/index.min.js +1 -1
  55. package/dist/components/breadcrumb/index.js +1 -1
  56. package/dist/components/breadcrumb/index.min.js +1 -1
  57. package/dist/components/button/index.js +1 -1
  58. package/dist/components/button/index.min.js +1 -1
  59. package/dist/components/carousel/index.js +1 -1
  60. package/dist/components/carousel/index.min.js +1 -1
  61. package/dist/components/checkbox/index.js +1 -1
  62. package/dist/components/checkbox/index.min.js +1 -1
  63. package/dist/components/clockpicker/index.js +1 -1
  64. package/dist/components/clockpicker/index.min.js +1 -1
  65. package/dist/components/collapse/index.js +1 -1
  66. package/dist/components/collapse/index.min.js +1 -1
  67. package/dist/components/colorpicker/index.js +1 -1
  68. package/dist/components/colorpicker/index.min.js +1 -1
  69. package/dist/components/datepicker/index.js +1 -1
  70. package/dist/components/datepicker/index.min.js +1 -1
  71. package/dist/components/datetimepicker/index.js +1 -1
  72. package/dist/components/datetimepicker/index.min.js +1 -1
  73. package/dist/components/dialog/index.js +9 -3
  74. package/dist/components/dialog/index.min.js +2 -2
  75. package/dist/components/dropdown/index.js +1 -1
  76. package/dist/components/dropdown/index.min.js +1 -1
  77. package/dist/components/field/index.js +1 -1
  78. package/dist/components/field/index.min.js +1 -1
  79. package/dist/components/icon/index.js +1 -1
  80. package/dist/components/icon/index.min.js +1 -1
  81. package/dist/components/image/index.js +1 -1
  82. package/dist/components/image/index.min.js +1 -1
  83. package/dist/components/input/index.js +1 -1
  84. package/dist/components/input/index.min.js +1 -1
  85. package/dist/components/loading/index.js +9 -3
  86. package/dist/components/loading/index.min.js +2 -2
  87. package/dist/components/menu/index.js +1 -1
  88. package/dist/components/menu/index.min.js +1 -1
  89. package/dist/components/message/index.js +1 -1
  90. package/dist/components/message/index.min.js +1 -1
  91. package/dist/components/modal/index.js +9 -3
  92. package/dist/components/modal/index.min.js +2 -2
  93. package/dist/components/navbar/index.js +1 -1
  94. package/dist/components/navbar/index.min.js +1 -1
  95. package/dist/components/notification/index.js +9 -3
  96. package/dist/components/notification/index.min.js +2 -2
  97. package/dist/components/numberinput/index.js +1 -1
  98. package/dist/components/numberinput/index.min.js +1 -1
  99. package/dist/components/pagination/index.js +1 -1
  100. package/dist/components/pagination/index.min.js +1 -1
  101. package/dist/components/progress/index.js +1 -1
  102. package/dist/components/progress/index.min.js +1 -1
  103. package/dist/components/radio/index.js +1 -1
  104. package/dist/components/radio/index.min.js +1 -1
  105. package/dist/components/rate/index.js +1 -1
  106. package/dist/components/rate/index.min.js +1 -1
  107. package/dist/components/select/index.js +1 -1
  108. package/dist/components/select/index.min.js +1 -1
  109. package/dist/components/sidebar/index.js +1 -1
  110. package/dist/components/sidebar/index.min.js +1 -1
  111. package/dist/components/skeleton/index.js +1 -1
  112. package/dist/components/skeleton/index.min.js +1 -1
  113. package/dist/components/slider/index.js +1 -1
  114. package/dist/components/slider/index.min.js +1 -1
  115. package/dist/components/snackbar/index.js +9 -3
  116. package/dist/components/snackbar/index.min.js +2 -2
  117. package/dist/components/steps/index.js +1 -1
  118. package/dist/components/steps/index.min.js +1 -1
  119. package/dist/components/switch/index.js +1 -1
  120. package/dist/components/switch/index.min.js +1 -1
  121. package/dist/components/table/index.js +10 -9
  122. package/dist/components/table/index.min.js +2 -2
  123. package/dist/components/tabs/index.js +1 -1
  124. package/dist/components/tabs/index.min.js +1 -1
  125. package/dist/components/tag/index.js +1 -1
  126. package/dist/components/tag/index.min.js +1 -1
  127. package/dist/components/taginput/index.js +1 -1
  128. package/dist/components/taginput/index.min.js +1 -1
  129. package/dist/components/timepicker/index.js +1 -1
  130. package/dist/components/timepicker/index.min.js +1 -1
  131. package/dist/components/toast/index.js +9 -3
  132. package/dist/components/toast/index.min.js +2 -2
  133. package/dist/components/tooltip/index.js +1 -1
  134. package/dist/components/tooltip/index.min.js +1 -1
  135. package/dist/components/upload/index.js +1 -1
  136. package/dist/components/upload/index.min.js +1 -1
  137. package/dist/{buefy.css → css/buefy.css} +4 -4
  138. package/dist/css/buefy.css.map +1 -0
  139. package/dist/css/buefy.min.css +1 -0
  140. package/dist/css/versions/buefy-no-reset.css +25930 -0
  141. package/dist/css/versions/buefy-no-reset.css.map +1 -0
  142. package/dist/css/versions/buefy-no-reset.min.css +1 -0
  143. package/dist/css/versions/buefy-standalone.css +5874 -0
  144. package/dist/css/versions/buefy-standalone.css.map +1 -0
  145. package/dist/css/versions/buefy-standalone.min.css +1 -0
  146. package/dist/esm/autocomplete.js +1 -1
  147. package/dist/esm/breadcrumb.js +1 -1
  148. package/dist/esm/button.js +1 -1
  149. package/dist/esm/carousel.js +1 -1
  150. package/dist/esm/checkbox.js +1 -1
  151. package/dist/esm/clockpicker.js +1 -1
  152. package/dist/esm/collapse.js +1 -1
  153. package/dist/esm/colorpicker.js +2 -2
  154. package/dist/esm/config.js +6 -2
  155. package/dist/esm/datepicker.js +1 -1
  156. package/dist/esm/datetimepicker.js +1 -1
  157. package/dist/esm/dialog.js +8 -4
  158. package/dist/esm/dropdown.js +1 -1
  159. package/dist/esm/field.js +1 -1
  160. package/dist/esm/icon.js +1 -1
  161. package/dist/esm/image.js +1 -1
  162. package/dist/esm/{index-CQegEsxK.js → index-BE58-KfV.js} +1 -1
  163. package/dist/esm/index.js +12 -11
  164. package/dist/esm/input.js +1 -1
  165. package/dist/esm/loading.js +8 -4
  166. package/dist/esm/menu.js +1 -1
  167. package/dist/esm/message.js +1 -1
  168. package/dist/esm/modal.js +8 -4
  169. package/dist/esm/navbar.js +1 -1
  170. package/dist/esm/notification.js +8 -4
  171. package/dist/esm/numberinput.js +1 -1
  172. package/dist/esm/pagination.js +1 -1
  173. package/dist/esm/{plugins-B172kuKE.js → plugins-1tLsuIZF.js} +2 -1
  174. package/dist/esm/progress.js +1 -1
  175. package/dist/esm/radio.js +1 -1
  176. package/dist/esm/rate.js +1 -1
  177. package/dist/esm/select.js +1 -1
  178. package/dist/esm/sidebar.js +1 -1
  179. package/dist/esm/skeleton.js +1 -1
  180. package/dist/esm/slider.js +1 -1
  181. package/dist/esm/snackbar.js +8 -4
  182. package/dist/esm/steps.js +1 -1
  183. package/dist/esm/switch.js +1 -1
  184. package/dist/esm/table.js +11 -10
  185. package/dist/esm/tabs.js +1 -1
  186. package/dist/esm/tag.js +1 -1
  187. package/dist/esm/taginput.js +1 -1
  188. package/dist/esm/timepicker.js +1 -1
  189. package/dist/esm/toast.js +8 -4
  190. package/dist/esm/tooltip.js +1 -1
  191. package/dist/esm/upload.js +1 -1
  192. package/package.json +6 -3
  193. package/src/components/dialog/index.ts +9 -3
  194. package/src/components/loading/index.ts +9 -3
  195. package/src/components/modal/index.ts +9 -3
  196. package/src/components/notification/index.ts +9 -3
  197. package/src/components/snackbar/index.ts +9 -3
  198. package/src/components/table/Table.vue +18 -12
  199. package/src/components/toast/index.ts +9 -3
  200. package/src/index.ts +9 -9
  201. package/src/scss/buefy.scss +0 -1
  202. package/src/scss/components/_dropdown.scss +6 -6
  203. package/src/scss/{buefy-build.scss → versions/buefy-bulma-bundle.scss} +1 -1
  204. package/src/scss/versions/buefy-no-reset.scss +16 -0
  205. package/src/utils/ConfigComponent.ts +13 -1
  206. package/src/utils/plugins.ts +3 -2
  207. package/src/utils/vue-augmentation.ts +1 -1
  208. package/dist/buefy.css.map +0 -1
  209. package/dist/buefy.min.css +0 -1
package/dist/buefy.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! Buefy v3.0.1 | MIT License | github.com/buefy/buefy */
1
+ /*! Buefy v3.0.3 | MIT License | github.com/buefy/buefy */
2
2
  (function (global, factory) {
3
3
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue')) :
4
4
  typeof define === 'function' && define.amd ? define(['exports', 'vue'], factory) :
@@ -756,6 +756,10 @@
756
756
  });
757
757
  };
758
758
 
759
+ const configInjectionKey = Symbol("Buefy Config Component");
760
+ function useConfigComponent() {
761
+ return vue.inject(configInjectionKey);
762
+ }
759
763
  var ConfigComponent = {
760
764
  getOptions() {
761
765
  return config;
@@ -2753,9 +2757,10 @@
2753
2757
  }
2754
2758
  Vue.component(componentName, component);
2755
2759
  };
2756
- const registerComponentProgrammatic = (Vue, property, component) => {
2760
+ const registerComponentProgrammatic = (Vue, property, component, injectionKey) => {
2757
2761
  if (!Vue.config.globalProperties.$buefy) Vue.config.globalProperties.$buefy = {};
2758
2762
  Vue.config.globalProperties.$buefy[property] = component;
2763
+ Vue.provide(injectionKey, component);
2759
2764
  };
2760
2765
 
2761
2766
  const Plugin$F = {
@@ -12172,10 +12177,14 @@
12172
12177
  return open(__spreadValues$6({ hasInput: true }, params), this.app);
12173
12178
  }
12174
12179
  }
12180
+ const dialogInjectionKey = Symbol("Buefy Dialog");
12181
+ function useDialog() {
12182
+ return vue.inject(dialogInjectionKey);
12183
+ }
12175
12184
  const Plugin$t = {
12176
12185
  install(Vue) {
12177
12186
  registerComponent(Vue, Dialog);
12178
- registerComponentProgrammatic(Vue, "dialog", new DialogProgrammatic(Vue));
12187
+ registerComponentProgrammatic(Vue, "dialog", new DialogProgrammatic(Vue), dialogInjectionKey);
12179
12188
  }
12180
12189
  };
12181
12190
 
@@ -12404,10 +12413,14 @@
12404
12413
  return vueInstance.mount(container);
12405
12414
  }
12406
12415
  }
12416
+ const loadingInjectionKey = Symbol("Buefy Loading");
12417
+ function useLoading() {
12418
+ return vue.inject(loadingInjectionKey);
12419
+ }
12407
12420
  const Plugin$p = {
12408
12421
  install(Vue) {
12409
12422
  registerComponent(Vue, BLoading);
12410
- registerComponentProgrammatic(Vue, "loading", new LoadingProgrammatic(Vue));
12423
+ registerComponentProgrammatic(Vue, "loading", new LoadingProgrammatic(Vue), loadingInjectionKey);
12411
12424
  }
12412
12425
  };
12413
12426
 
@@ -13222,10 +13235,14 @@
13222
13235
  return vueInstance.mount(container);
13223
13236
  }
13224
13237
  }
13238
+ const modalInjectionKey = Symbol("Buefy Modal");
13239
+ function useModal() {
13240
+ return vue.inject(modalInjectionKey);
13241
+ }
13225
13242
  const Plugin$m = {
13226
13243
  install(Vue) {
13227
13244
  registerComponent(Vue, Modal);
13228
- registerComponentProgrammatic(Vue, "modal", new ModalProgrammatic(Vue));
13245
+ registerComponentProgrammatic(Vue, "modal", new ModalProgrammatic(Vue), modalInjectionKey);
13229
13246
  }
13230
13247
  };
13231
13248
 
@@ -13642,10 +13659,14 @@
13642
13659
  return vueInstance.mount(container);
13643
13660
  }
13644
13661
  }
13662
+ const notificationInjectionKey = Symbol("Buefy Notification");
13663
+ function useNotification() {
13664
+ return vue.inject(notificationInjectionKey);
13665
+ }
13645
13666
  const Plugin$l = {
13646
13667
  install(Vue) {
13647
13668
  registerComponent(Vue, Notification);
13648
- registerComponentProgrammatic(Vue, "notification", new NotificationProgrammatic(Vue));
13669
+ registerComponentProgrammatic(Vue, "notification", new NotificationProgrammatic(Vue), notificationInjectionKey);
13649
13670
  }
13650
13671
  };
13651
13672
 
@@ -16776,9 +16797,13 @@
16776
16797
  return vueInstance.mount(container);
16777
16798
  }
16778
16799
  }
16800
+ const snackbarInjectionKey = Symbol("Buefy Snackbar");
16801
+ function useSnackbar() {
16802
+ return vue.inject(snackbarInjectionKey);
16803
+ }
16779
16804
  const Plugin$a = {
16780
16805
  install(Vue) {
16781
- registerComponentProgrammatic(Vue, "snackbar", new SnackbarProgrammatic(Vue));
16806
+ registerComponentProgrammatic(Vue, "snackbar", new SnackbarProgrammatic(Vue), snackbarInjectionKey);
16782
16807
  }
16783
16808
  };
16784
16809
 
@@ -18884,15 +18909,16 @@
18884
18909
  if (!this.canDragRow) return;
18885
18910
  this.$emit("dragleave", { event, row, index });
18886
18911
  },
18887
- // FIXME: this method may emit events not listed in `emits`.
18888
- // I decided not to list them to check if event listeners are actually
18889
- // set in `$attrs`. The original idea of this method was to address
18890
- // some performance issues and introduced at the commit:
18891
- // https://github.com/ntohq/buefy-next/commit/e38726497785145195e9605840e33980fd4ae9e0
18892
- // I am not sure whether the justification at https://github.com/buefy/buefy/pull/2150
18893
- // is still relevant with Vue 3.
18912
+ // this method is for "mouseenter", and "mouseleave" events.
18913
+ // the original idea of this method was introduced by the PR
18914
+ // https://github.com/buefy/buefy/pull/2150
18915
+ // to address some performance issues related to these events.
18916
+ // I am not sure whether the justification made at the PR is still
18917
+ // relevant to Vue 3.
18918
+ // btw, this function was made by the PR https://github.com/buefy/buefy/pull/3236
18894
18919
  emitEventForRow(eventName, event, row) {
18895
- return this.$attrs[`on${eventName}`] ? this.$emit(eventName, row, event) : null;
18920
+ const listener = this.$attrs[vue.toHandlerKey(eventName)] || this.$attrs[vue.toHandlerKey(vue.camelize(eventName))];
18921
+ return listener != null ? this.$emit(eventName, row, event) : null;
18896
18922
  },
18897
18923
  /*
18898
18924
  * Emits drag start event (column)
@@ -20851,9 +20877,13 @@
20851
20877
  return vueInstance.mount(container);
20852
20878
  }
20853
20879
  }
20880
+ const toastInjectionKey = Symbol("Buefy Toast");
20881
+ function useToast() {
20882
+ return vue.inject(toastInjectionKey);
20883
+ }
20854
20884
  const Plugin$2 = {
20855
20885
  install(Vue) {
20856
- registerComponentProgrammatic(Vue, "toast", new ToastProgrammatic(Vue));
20886
+ registerComponentProgrammatic(Vue, "toast", new ToastProgrammatic(Vue), toastInjectionKey);
20857
20887
  }
20858
20888
  };
20859
20889
 
@@ -21093,7 +21123,7 @@
21093
21123
  install(Vue, options = {}) {
21094
21124
  setOptions(merge(config, options, true));
21095
21125
  allComponents.forEach((component) => Vue.use(component));
21096
- registerComponentProgrammatic(Vue, "config", ConfigComponent);
21126
+ registerComponentProgrammatic(Vue, "config", ConfigComponent, configInjectionKey);
21097
21127
  Vue.config.globalProperties.$buefy.globalNoticeInterval = void 0;
21098
21128
  }
21099
21129
  };
@@ -21236,6 +21266,13 @@
21236
21266
  exports.sign = sign;
21237
21267
  exports.toCssWidth = toCssWidth;
21238
21268
  exports.translateTouchAsDragEvent = translateTouchAsDragEvent;
21269
+ exports.useConfigComponent = useConfigComponent;
21270
+ exports.useDialog = useDialog;
21271
+ exports.useLoading = useLoading;
21272
+ exports.useModal = useModal;
21273
+ exports.useNotification = useNotification;
21274
+ exports.useSnackbar = useSnackbar;
21275
+ exports.useToast = useToast;
21239
21276
 
21240
21277
  Object.defineProperty(exports, '__esModule', { value: true });
21241
21278