buefy 3.0.2 → 3.0.4

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/dist/buefy.d.ts +37 -4
  2. package/dist/buefy.esm.js +173 -129
  3. package/dist/buefy.esm.min.js +2 -2
  4. package/dist/buefy.js +178 -127
  5. package/dist/buefy.min.js +2 -2
  6. package/dist/cjs/autocomplete.js +1 -1
  7. package/dist/cjs/breadcrumb.js +1 -1
  8. package/dist/cjs/button.js +1 -1
  9. package/dist/cjs/carousel.js +1 -1
  10. package/dist/cjs/checkbox.js +1 -1
  11. package/dist/cjs/clockpicker.js +1 -1
  12. package/dist/cjs/collapse.js +1 -1
  13. package/dist/cjs/colorpicker.js +2 -2
  14. package/dist/cjs/config.js +7 -1
  15. package/dist/cjs/datepicker.js +1 -1
  16. package/dist/cjs/datetimepicker.js +1 -1
  17. package/dist/cjs/dialog.js +138 -118
  18. package/dist/cjs/dropdown.js +1 -1
  19. package/dist/cjs/field.js +1 -1
  20. package/dist/cjs/icon.js +1 -1
  21. package/dist/cjs/image.js +1 -1
  22. package/dist/cjs/{index-DiQy3SCb.js → index-SLOXD6k3.js} +1 -1
  23. package/dist/cjs/index.js +10 -3
  24. package/dist/cjs/input.js +1 -1
  25. package/dist/cjs/loading.js +7 -2
  26. package/dist/cjs/menu.js +1 -1
  27. package/dist/cjs/message.js +1 -1
  28. package/dist/cjs/modal.js +7 -2
  29. package/dist/cjs/navbar.js +1 -1
  30. package/dist/cjs/notification.js +7 -2
  31. package/dist/cjs/numberinput.js +1 -1
  32. package/dist/cjs/pagination.js +1 -1
  33. package/dist/cjs/{plugins-DbyYGVpp.js → plugins-BWKpXmCr.js} +2 -1
  34. package/dist/cjs/progress.js +1 -1
  35. package/dist/cjs/radio.js +1 -1
  36. package/dist/cjs/rate.js +1 -1
  37. package/dist/cjs/select.js +1 -1
  38. package/dist/cjs/sidebar.js +1 -1
  39. package/dist/cjs/skeleton.js +1 -1
  40. package/dist/cjs/slider.js +1 -1
  41. package/dist/cjs/snackbar.js +7 -2
  42. package/dist/cjs/steps.js +1 -1
  43. package/dist/cjs/switch.js +1 -1
  44. package/dist/cjs/table.js +1 -1
  45. package/dist/cjs/tabs.js +1 -1
  46. package/dist/cjs/tag.js +1 -1
  47. package/dist/cjs/taginput.js +1 -1
  48. package/dist/cjs/timepicker.js +1 -1
  49. package/dist/cjs/toast.js +7 -2
  50. package/dist/cjs/tooltip.js +1 -1
  51. package/dist/cjs/upload.js +1 -1
  52. package/dist/components/autocomplete/index.js +1 -1
  53. package/dist/components/autocomplete/index.min.js +1 -1
  54. package/dist/components/breadcrumb/index.js +1 -1
  55. package/dist/components/breadcrumb/index.min.js +1 -1
  56. package/dist/components/button/index.js +1 -1
  57. package/dist/components/button/index.min.js +1 -1
  58. package/dist/components/carousel/index.js +1 -1
  59. package/dist/components/carousel/index.min.js +1 -1
  60. package/dist/components/checkbox/index.js +1 -1
  61. package/dist/components/checkbox/index.min.js +1 -1
  62. package/dist/components/clockpicker/index.js +1 -1
  63. package/dist/components/clockpicker/index.min.js +1 -1
  64. package/dist/components/collapse/index.js +1 -1
  65. package/dist/components/collapse/index.min.js +1 -1
  66. package/dist/components/colorpicker/index.js +1 -1
  67. package/dist/components/colorpicker/index.min.js +1 -1
  68. package/dist/components/datepicker/index.js +1 -1
  69. package/dist/components/datepicker/index.min.js +1 -1
  70. package/dist/components/datetimepicker/index.js +1 -1
  71. package/dist/components/datetimepicker/index.min.js +1 -1
  72. package/dist/components/dialog/index.js +140 -119
  73. package/dist/components/dialog/index.min.js +2 -2
  74. package/dist/components/dropdown/index.js +1 -1
  75. package/dist/components/dropdown/index.min.js +1 -1
  76. package/dist/components/field/index.js +1 -1
  77. package/dist/components/field/index.min.js +1 -1
  78. package/dist/components/icon/index.js +1 -1
  79. package/dist/components/icon/index.min.js +1 -1
  80. package/dist/components/image/index.js +1 -1
  81. package/dist/components/image/index.min.js +1 -1
  82. package/dist/components/input/index.js +1 -1
  83. package/dist/components/input/index.min.js +1 -1
  84. package/dist/components/loading/index.js +9 -3
  85. package/dist/components/loading/index.min.js +2 -2
  86. package/dist/components/menu/index.js +1 -1
  87. package/dist/components/menu/index.min.js +1 -1
  88. package/dist/components/message/index.js +1 -1
  89. package/dist/components/message/index.min.js +1 -1
  90. package/dist/components/modal/index.js +9 -3
  91. package/dist/components/modal/index.min.js +2 -2
  92. package/dist/components/navbar/index.js +1 -1
  93. package/dist/components/navbar/index.min.js +1 -1
  94. package/dist/components/notification/index.js +9 -3
  95. package/dist/components/notification/index.min.js +2 -2
  96. package/dist/components/numberinput/index.js +1 -1
  97. package/dist/components/numberinput/index.min.js +1 -1
  98. package/dist/components/pagination/index.js +1 -1
  99. package/dist/components/pagination/index.min.js +1 -1
  100. package/dist/components/progress/index.js +1 -1
  101. package/dist/components/progress/index.min.js +1 -1
  102. package/dist/components/radio/index.js +1 -1
  103. package/dist/components/radio/index.min.js +1 -1
  104. package/dist/components/rate/index.js +1 -1
  105. package/dist/components/rate/index.min.js +1 -1
  106. package/dist/components/select/index.js +1 -1
  107. package/dist/components/select/index.min.js +1 -1
  108. package/dist/components/sidebar/index.js +1 -1
  109. package/dist/components/sidebar/index.min.js +1 -1
  110. package/dist/components/skeleton/index.js +1 -1
  111. package/dist/components/skeleton/index.min.js +1 -1
  112. package/dist/components/slider/index.js +1 -1
  113. package/dist/components/slider/index.min.js +1 -1
  114. package/dist/components/snackbar/index.js +9 -3
  115. package/dist/components/snackbar/index.min.js +2 -2
  116. package/dist/components/steps/index.js +1 -1
  117. package/dist/components/steps/index.min.js +1 -1
  118. package/dist/components/switch/index.js +1 -1
  119. package/dist/components/switch/index.min.js +1 -1
  120. package/dist/components/table/index.js +1 -1
  121. package/dist/components/table/index.min.js +1 -1
  122. package/dist/components/tabs/index.js +1 -1
  123. package/dist/components/tabs/index.min.js +1 -1
  124. package/dist/components/tag/index.js +1 -1
  125. package/dist/components/tag/index.min.js +1 -1
  126. package/dist/components/taginput/index.js +1 -1
  127. package/dist/components/taginput/index.min.js +1 -1
  128. package/dist/components/timepicker/index.js +1 -1
  129. package/dist/components/timepicker/index.min.js +1 -1
  130. package/dist/components/toast/index.js +9 -3
  131. package/dist/components/toast/index.min.js +2 -2
  132. package/dist/components/tooltip/index.js +1 -1
  133. package/dist/components/tooltip/index.min.js +1 -1
  134. package/dist/components/upload/index.js +1 -1
  135. package/dist/components/upload/index.min.js +1 -1
  136. package/dist/css/buefy.css +70 -61
  137. package/dist/css/buefy.css.map +1 -1
  138. package/dist/css/buefy.min.css +1 -1
  139. package/dist/css/versions/buefy-no-reset.css +70 -61
  140. package/dist/css/versions/buefy-no-reset.css.map +1 -1
  141. package/dist/css/versions/buefy-no-reset.min.css +1 -1
  142. package/dist/css/versions/buefy-standalone.css +171 -56
  143. package/dist/css/versions/buefy-standalone.css.map +1 -1
  144. package/dist/css/versions/buefy-standalone.min.css +1 -1
  145. package/dist/esm/autocomplete.js +1 -1
  146. package/dist/esm/breadcrumb.js +1 -1
  147. package/dist/esm/button.js +1 -1
  148. package/dist/esm/carousel.js +1 -1
  149. package/dist/esm/checkbox.js +1 -1
  150. package/dist/esm/clockpicker.js +1 -1
  151. package/dist/esm/collapse.js +1 -1
  152. package/dist/esm/colorpicker.js +2 -2
  153. package/dist/esm/config.js +6 -2
  154. package/dist/esm/datepicker.js +1 -1
  155. package/dist/esm/datetimepicker.js +1 -1
  156. package/dist/esm/dialog.js +139 -120
  157. package/dist/esm/dropdown.js +1 -1
  158. package/dist/esm/field.js +1 -1
  159. package/dist/esm/icon.js +1 -1
  160. package/dist/esm/image.js +1 -1
  161. package/dist/esm/{index-CQegEsxK.js → index-BE58-KfV.js} +1 -1
  162. package/dist/esm/index.js +12 -11
  163. package/dist/esm/input.js +1 -1
  164. package/dist/esm/loading.js +8 -4
  165. package/dist/esm/menu.js +1 -1
  166. package/dist/esm/message.js +1 -1
  167. package/dist/esm/modal.js +8 -4
  168. package/dist/esm/navbar.js +1 -1
  169. package/dist/esm/notification.js +8 -4
  170. package/dist/esm/numberinput.js +1 -1
  171. package/dist/esm/pagination.js +1 -1
  172. package/dist/esm/{plugins-B172kuKE.js → plugins-1tLsuIZF.js} +2 -1
  173. package/dist/esm/progress.js +1 -1
  174. package/dist/esm/radio.js +1 -1
  175. package/dist/esm/rate.js +1 -1
  176. package/dist/esm/select.js +1 -1
  177. package/dist/esm/sidebar.js +1 -1
  178. package/dist/esm/skeleton.js +1 -1
  179. package/dist/esm/slider.js +1 -1
  180. package/dist/esm/snackbar.js +8 -4
  181. package/dist/esm/steps.js +1 -1
  182. package/dist/esm/switch.js +1 -1
  183. package/dist/esm/table.js +1 -1
  184. package/dist/esm/tabs.js +1 -1
  185. package/dist/esm/tag.js +1 -1
  186. package/dist/esm/taginput.js +1 -1
  187. package/dist/esm/timepicker.js +1 -1
  188. package/dist/esm/toast.js +8 -4
  189. package/dist/esm/tooltip.js +1 -1
  190. package/dist/esm/upload.js +1 -1
  191. package/package.json +1 -2
  192. package/src/components/dialog/Dialog.vue +10 -2
  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/toast/index.ts +9 -3
  199. package/src/index.ts +9 -9
  200. package/src/scss/buefy.scss +0 -1
  201. package/src/scss/components/_checkbox.scss +4 -4
  202. package/src/scss/components/_datepicker.scss +1 -1
  203. package/src/scss/components/_dropdown.scss +7 -6
  204. package/src/scss/components/_form.scss +31 -31
  205. package/src/scss/components/_radio.scss +9 -9
  206. package/src/scss/components/_switch.scss +28 -5
  207. package/src/scss/components/_table.scss +2 -1
  208. package/src/utils/ConfigComponent.ts +13 -1
  209. package/src/utils/plugins.ts +3 -2
@@ -18,7 +18,7 @@ $floating-in-height: 3.25em !default;
18
18
  .field {
19
19
  flex-shrink: 0;
20
20
  &:not(:last-child) {
21
- margin-right: 0.75rem;
21
+ margin-inline-end: 0.75rem;
22
22
  }
23
23
  &.is-expanded {
24
24
  flex-grow: 1;
@@ -32,16 +32,16 @@ $floating-in-height: 3.25em !default;
32
32
  .button,
33
33
  .input,
34
34
  .select select {
35
- border-bottom-left-radius: cv.getVar('input-radius');
36
- border-top-left-radius: cv.getVar('input-radius');
35
+ border-start-start-radius: cv.getVar('input-radius');
36
+ border-end-start-radius: cv.getVar('input-radius');
37
37
  }
38
38
  }
39
39
  &:last-child .control {
40
40
  .button,
41
41
  .input,
42
42
  .select select {
43
- border-bottom-right-radius: cv.getVar('input-radius');
44
- border-top-right-radius: cv.getVar('input-radius');
43
+ border-start-end-radius: cv.getVar('input-radius');
44
+ border-end-end-radius: cv.getVar('input-radius');
45
45
  }
46
46
  }
47
47
  .control {
@@ -60,8 +60,8 @@ $floating-in-height: 3.25em !default;
60
60
  .button,
61
61
  .input,
62
62
  .select select {
63
- border-bottom-left-radius: 0;
64
- border-top-left-radius: 0;
63
+ border-start-start-radius: 0;
64
+ border-end-start-radius: 0;
65
65
  }
66
66
  }
67
67
  }
@@ -70,15 +70,15 @@ $floating-in-height: 3.25em !default;
70
70
  .button,
71
71
  .input,
72
72
  .select select {
73
- border-bottom-right-radius: 0;
74
- border-top-right-radius: 0;
73
+ border-start-end-radius: 0;
74
+ border-end-end-radius: 0;
75
75
  }
76
76
  }
77
77
  }
78
78
  }
79
79
  &.b-numberinput {
80
80
  .control {
81
- margin-right: unset;
81
+ margin-inline-end: unset;
82
82
  }
83
83
  }
84
84
  }
@@ -91,7 +91,7 @@ $floating-in-height: 3.25em !default;
91
91
 
92
92
  .label {
93
93
  position: absolute;
94
- left: 1em;
94
+ inset-inline-start: 1em;
95
95
  font-size: calc(#{cv.getVar('size-normal')} * 0.75);
96
96
  background-color: transparent;
97
97
  z-index: 5;
@@ -112,7 +112,7 @@ $floating-in-height: 3.25em !default;
112
112
  }
113
113
  .taginput .counter {
114
114
  float: none;
115
- text-align: right;
115
+ text-align: end;
116
116
  }
117
117
 
118
118
  &.has-addons {
@@ -121,8 +121,8 @@ $floating-in-height: 3.25em !default;
121
121
  .button,
122
122
  .input,
123
123
  .select select {
124
- border-bottom-left-radius: cv.getVar('input-radius');
125
- border-top-left-radius: cv.getVar('input-radius');
124
+ border-start-start-radius: cv.getVar('input-radius');
125
+ border-end-start-radius: cv.getVar('input-radius');
126
126
  }
127
127
  }
128
128
  }
@@ -132,15 +132,15 @@ $floating-in-height: 3.25em !default;
132
132
  &.is-floating-label {
133
133
  .label {
134
134
  top: -0.775em;
135
- padding-left: 0.125em;
136
- padding-right: 0.125em;
135
+ padding-inline-start: 0.125em;
136
+ padding-inline-end: 0.125em;
137
137
  &:before {
138
138
  content: '';
139
139
  display: block;
140
140
  position: absolute;
141
141
  top: 0.775em;
142
- left: 0;
143
- right: 0;
142
+ inset-inline-start: 0;
143
+ inset-inline-end: 0;
144
144
  height: 0.375em;
145
145
  background-color: cv.getVar('input-background-color');
146
146
  z-index: -1;
@@ -237,41 +237,41 @@ $floating-in-height: 3.25em !default;
237
237
  &.is-floating-label, &.is-floating-in-label {
238
238
  &.has-numberinput {
239
239
  .label {
240
- margin-left: calc(#{cv.getVar('size-normal')} * 3);
240
+ margin-inline-start: calc(#{cv.getVar('size-normal')} * 3);
241
241
  }
242
242
  &.has-numberinput-is-small {
243
243
  .label {
244
- margin-left: calc(#{cv.getVar('size-small')} * 3);
244
+ margin-inline-start: calc(#{cv.getVar('size-small')} * 3);
245
245
  }
246
246
  }
247
247
  &.has-numberinput-is-medium {
248
248
  .label {
249
- margin-left: calc(#{cv.getVar('size-medium')} * 3);
249
+ margin-inline-start: calc(#{cv.getVar('size-medium')} * 3);
250
250
  }
251
251
  }
252
252
  &.has-numberinput-is-large {
253
253
  .label {
254
- margin-left: calc(#{cv.getVar('size-large')} * 3);
254
+ margin-inline-start: calc(#{cv.getVar('size-large')} * 3);
255
255
  }
256
256
  }
257
257
  }
258
258
  &.has-numberinput-compact {
259
259
  .label {
260
- margin-left: calc(#{cv.getVar('size-normal')} * 2.25);
260
+ margin-inline-start: calc(#{cv.getVar('size-normal')} * 2.25);
261
261
  }
262
262
  &.has-numberinput-is-small {
263
263
  .label {
264
- margin-left: calc(#{cv.getVar('size-small')} * 2.25);
264
+ margin-inline-start: calc(#{cv.getVar('size-small')} * 2.25);
265
265
  }
266
266
  }
267
267
  &.has-numberinput-is-medium {
268
268
  .label {
269
- margin-left: calc(#{cv.getVar('size-medium')} * 2.25);
269
+ margin-inline-start: calc(#{cv.getVar('size-medium')} * 2.25);
270
270
  }
271
271
  }
272
272
  &.has-numberinput-is-large {
273
273
  .label {
274
- margin-left: calc(#{cv.getVar('size-large')} * 2.25);
274
+ margin-inline-start: calc(#{cv.getVar('size-large')} * 2.25);
275
275
  }
276
276
  }
277
277
  }
@@ -280,13 +280,13 @@ $floating-in-height: 3.25em !default;
280
280
  &.is-floating-in-label {
281
281
  .label {
282
282
  position: relative;
283
- left: calc(3.25em + 2em);
283
+ inset-inline-start: calc(3.25em + 2em);
284
284
  }
285
285
  }
286
286
  &.is-floating-label {
287
287
  .label {
288
288
  position: relative;
289
- left: calc(3.25em + 2em);
289
+ inset-inline-start: calc(3.25em + 2em);
290
290
  }
291
291
  }
292
292
  }
@@ -294,8 +294,8 @@ $floating-in-height: 3.25em !default;
294
294
 
295
295
  .#{iv.$class-prefix}control {
296
296
  .help.counter {
297
- float: right;
298
- margin-left: 0.5em;
297
+ float: inline-end;
298
+ margin-inline-start: 0.5em;
299
299
  }
300
300
  .icon {
301
301
  &.is-clickable {
@@ -306,6 +306,6 @@ $floating-in-height: 3.25em !default;
306
306
  // fix Bulma 0.8.2
307
307
  &.is-loading::after {
308
308
  top: calc(50% - (1em * 0.5));
309
- right: calc((2.5em * 0.5) - .5em);
309
+ inset-inline-end: calc((2.5em * 0.5) - .5em);
310
310
  }
311
311
  }
@@ -42,18 +42,18 @@ $radio-shadow: cv.getVar('shadow') !default;
42
42
  display: inline-flex;
43
43
  align-items: center;
44
44
  &:not(.button) {
45
- margin-right: 0.5em;
45
+ margin-inline-end: 0.5em;
46
46
  & + .radio:last-child {
47
- margin-right: 0;
47
+ margin-inline-end: 0;
48
48
  }
49
49
  }
50
50
  // reset Bulma
51
51
  & + .radio {
52
- margin-left: 0;
52
+ margin-inline-start: 0;
53
53
  }
54
54
  input[type=radio] {
55
55
  position: absolute;
56
- left: 0;
56
+ inset-inline-start: 0;
57
57
  opacity: 0;
58
58
  outline: none;
59
59
  z-index: -1;
@@ -71,10 +71,10 @@ $radio-shadow: cv.getVar('shadow') !default;
71
71
  content: "";
72
72
  display: flex;
73
73
  position: absolute;
74
- left: 50%;
75
- margin-left: calc(#{cv.getVar('radio-size')} * -0.5);
76
- bottom: 50%;
77
- margin-bottom: calc(#{ cv.getVar('radio-size')} * -0.5);
74
+ inset-inline-start: 50%;
75
+ margin-inline-start: calc(#{cv.getVar('radio-size')} * -0.5);
76
+ inset-block-end: 50%;
77
+ margin-block-end: calc(#{ cv.getVar('radio-size')} * -0.5);
78
78
  width: cv.getVar('radio-size');
79
79
  height: cv.getVar('radio-size');
80
80
  transition: transform cv.getVar('speed-slow') cv.getVar('easing');
@@ -102,7 +102,7 @@ $radio-shadow: cv.getVar('shadow') !default;
102
102
  }
103
103
  }
104
104
  .control-label {
105
- padding-left: cv.getVar('control-padding-horizontal');
105
+ padding-inline-start: cv.getVar('control-padding-horizontal');
106
106
  }
107
107
  &.button {
108
108
  display: flex;
@@ -70,13 +70,13 @@ $input-border-l-delta: 0% !default;
70
70
  display: inline-flex;
71
71
  align-items: center;
72
72
  position: relative;
73
- margin-right: 0.5em;
73
+ margin-inline-end: 0.5em;
74
74
  & + .switch:last-child {
75
- margin-right: 0;
75
+ margin-inline-end: 0;
76
76
  }
77
77
  input[type=checkbox] {
78
78
  position: absolute;
79
- left: 0;
79
+ inset-inline-start: 0;
80
80
  opacity: 0;
81
81
  outline: none;
82
82
  z-index: -1;
@@ -133,13 +133,13 @@ $input-border-l-delta: 0% !default;
133
133
  &.has-left-label {
134
134
  flex-direction: row-reverse;
135
135
  .control-label {
136
- padding-right: cv.getVar('control-padding-horizontal');
136
+ padding-inline-end: cv.getVar('control-padding-horizontal');
137
137
  }
138
138
  }
139
139
 
140
140
  &:not(.has-left-label) {
141
141
  .control-label {
142
- padding-left: cv.getVar('control-padding-horizontal');
142
+ padding-inline-start: cv.getVar('control-padding-horizontal');
143
143
  }
144
144
  }
145
145
 
@@ -208,3 +208,26 @@ $input-border-l-delta: 0% !default;
208
208
  color: cv.getVar('input-disabled-color');
209
209
  }
210
210
  }
211
+
212
+ // RTL support for switch toggle animation
213
+ // In RTL, the transform direction and origin need to be flipped
214
+ [dir="rtl"] .#{iv.$class-prefix}switch {
215
+ input[type=checkbox] {
216
+ + .check {
217
+ &:before {
218
+ transform-origin: right;
219
+ }
220
+ }
221
+ &:checked + .check {
222
+ &:before {
223
+ // In RTL, move left (negative direction) by the same amount
224
+ transform: translate3d(-100%, 0, 0);
225
+ }
226
+ &.is-elastic:before {
227
+ // Might be a little offset if base font is not 16px
228
+ transform: translate3d(-50%, 0, 0) scaleX(1.5);
229
+ }
230
+ }
231
+ }
232
+ }
233
+
@@ -1,6 +1,7 @@
1
1
  @use "bulma/sass/utilities/css-variables" as cv;
2
2
  @use "bulma/sass/utilities/initial-variables" as iv;
3
3
  @use "bulma/sass/utilities/mixins" as mixins;
4
+ @use "../utils/_functions" as fn;
4
5
 
5
6
  $table-sticky-header-height: 300px !default;
6
7
 
@@ -188,7 +189,7 @@ $table-sticky-header-height: 300px !default;
188
189
  &.is-selected {
189
190
  .checkbox input {
190
191
  &:checked + .check {
191
- background: cv.getVar('table-row-active-color') url(checkmark(cv.getVar('table-row-active-background-color'))) no-repeat center center;
192
+ background: cv.getVar('table-row-active-color') url(fn.checkmark(cv.getVar('table-row-active-background-color'))) no-repeat center center;
192
193
  }
193
194
  + .check {
194
195
  border-color: cv.getVar('table-row-active-color');
@@ -1,6 +1,18 @@
1
1
  import config, { setOptions } from './config'
2
2
  import type { BuefyConfigOptions } from './config'
3
3
  import { merge } from './helpers'
4
+ import { inject, type InjectionKey } from 'vue'
5
+
6
+ interface ConfigComponent {
7
+ getOptions(): BuefyConfigOptions,
8
+ setOptions(options: BuefyConfigOptions): void
9
+ }
10
+
11
+ export const configInjectionKey = Symbol('Buefy Config Component') as InjectionKey<ConfigComponent>
12
+
13
+ export function useConfigComponent() {
14
+ return inject(configInjectionKey)
15
+ }
4
16
 
5
17
  export default {
6
18
  getOptions() {
@@ -9,4 +21,4 @@ export default {
9
21
  setOptions(options: BuefyConfigOptions) {
10
22
  setOptions(merge(config, options, true))
11
23
  }
12
- }
24
+ } as ConfigComponent
@@ -1,4 +1,4 @@
1
- import type { App, Component } from 'vue'
1
+ import type { App, Component, InjectionKey } from 'vue'
2
2
 
3
3
  // use `name` to register a Functional Component which will become unresolvable
4
4
  // in production build due to name mangling.
@@ -13,8 +13,9 @@ export const registerComponent = (Vue: App, component: Component, name?: string)
13
13
  export const registerComponentProgrammatic = <
14
14
  K extends keyof App['config']['globalProperties']['$buefy'],
15
15
  C extends App['config']['globalProperties']['$buefy'][K]
16
- >(Vue: App, property: K, component: C) => {
16
+ >(Vue: App, property: K, component: C, injectionKey: InjectionKey<C>) => {
17
17
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
18
18
  if (!Vue.config.globalProperties.$buefy) Vue.config.globalProperties.$buefy = {} as any
19
19
  Vue.config.globalProperties.$buefy[property] = component
20
+ Vue.provide(injectionKey, component)
20
21
  }