buefy 0.7.9 → 0.8.2

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 (347) hide show
  1. package/CHANGELOG.md +82 -0
  2. package/dist/buefy.css +13759 -8263
  3. package/dist/buefy.js +9073 -14866
  4. package/dist/buefy.min.css +1 -5
  5. package/dist/buefy.min.js +2 -2
  6. package/dist/cjs/autocomplete.js +22 -0
  7. package/dist/cjs/button.js +106 -0
  8. package/dist/cjs/checkbox.js +135 -0
  9. package/dist/cjs/chunk-07fe6fc0.js +247 -0
  10. package/dist/cjs/chunk-0af453a7.js +105 -0
  11. package/dist/cjs/chunk-0e89e51b.js +394 -0
  12. package/dist/cjs/chunk-13e039f5.js +104 -0
  13. package/dist/cjs/chunk-143d9e6d.js +404 -0
  14. package/dist/cjs/chunk-19ebd649.js +114 -0
  15. package/dist/cjs/chunk-1b1231ce.js +94 -0
  16. package/dist/cjs/chunk-1e6abfcf.js +94 -0
  17. package/dist/cjs/chunk-28d164b1.js +172 -0
  18. package/dist/cjs/chunk-3396605d.js +394 -0
  19. package/dist/cjs/chunk-364a37a0.js +404 -0
  20. package/dist/cjs/chunk-3b066933.js +103 -0
  21. package/dist/cjs/chunk-3dffe6e7.js +54 -0
  22. package/dist/cjs/chunk-4a03b064.js +199 -0
  23. package/dist/cjs/chunk-50b06939.js +153 -0
  24. package/dist/cjs/chunk-52623128.js +105 -0
  25. package/dist/cjs/chunk-53d4f332.js +94 -0
  26. package/dist/cjs/chunk-544a95da.js +404 -0
  27. package/dist/cjs/chunk-545f01b1.js +49 -0
  28. package/dist/cjs/chunk-59b91990.js +64 -0
  29. package/dist/cjs/chunk-5b2a3329.js +394 -0
  30. package/dist/cjs/chunk-60061aa8.js +172 -0
  31. package/dist/cjs/chunk-67658e54.js +404 -0
  32. package/dist/cjs/chunk-6963026a.js +86 -0
  33. package/dist/cjs/chunk-6cece6b7.js +140 -0
  34. package/dist/cjs/chunk-6d6465c1.js +140 -0
  35. package/dist/cjs/chunk-6e9c0aca.js +94 -0
  36. package/dist/cjs/chunk-77f69fca.js +106 -0
  37. package/dist/cjs/chunk-7a25d736.js +114 -0
  38. package/dist/cjs/chunk-876befa8.js +247 -0
  39. package/dist/cjs/chunk-8985ffff.js +105 -0
  40. package/dist/cjs/chunk-8a05c8c9.js +207 -0
  41. package/dist/cjs/chunk-90407463.js +258 -0
  42. package/dist/cjs/chunk-956525c9.js +106 -0
  43. package/dist/cjs/chunk-96ce35a2.js +114 -0
  44. package/dist/cjs/chunk-9da1d120.js +86 -0
  45. package/dist/cjs/chunk-9f6a8079.js +54 -0
  46. package/dist/cjs/chunk-a60dc21d.js +281 -0
  47. package/dist/cjs/chunk-b628277d.js +199 -0
  48. package/dist/cjs/chunk-c146745e.js +153 -0
  49. package/dist/cjs/chunk-c2aec7a9.js +547 -0
  50. package/dist/cjs/chunk-c9641331.js +86 -0
  51. package/dist/cjs/chunk-d492406b.js +172 -0
  52. package/dist/cjs/chunk-e0aa62a0.js +404 -0
  53. package/dist/cjs/chunk-e45e0329.js +48 -0
  54. package/dist/cjs/chunk-e5de6583.js +207 -0
  55. package/dist/cjs/chunk-e85cceb6.js +258 -0
  56. package/dist/cjs/chunk-ed5addd6.js +547 -0
  57. package/dist/cjs/chunk-ef4753d5.js +283 -0
  58. package/dist/cjs/chunk-f0c597f9.js +199 -0
  59. package/dist/cjs/chunk-f1df1c63.js +9 -0
  60. package/dist/cjs/chunk-f1ee2f5c.js +207 -0
  61. package/dist/cjs/chunk-fbd4d545.js +247 -0
  62. package/dist/cjs/clockpicker.js +447 -0
  63. package/dist/cjs/collapse.js +102 -0
  64. package/dist/cjs/datepicker.js +1281 -0
  65. package/dist/cjs/dialog.js +237 -0
  66. package/dist/cjs/dropdown.js +19 -0
  67. package/dist/cjs/field.js +18 -0
  68. package/dist/cjs/icon.js +17 -0
  69. package/dist/cjs/index.js +164 -0
  70. package/dist/cjs/input.js +20 -0
  71. package/dist/cjs/loading.js +166 -0
  72. package/dist/cjs/menu.js +231 -0
  73. package/dist/cjs/message.js +65 -0
  74. package/dist/cjs/modal.js +48 -0
  75. package/dist/cjs/navbar.js +258 -0
  76. package/dist/cjs/notification.js +142 -0
  77. package/dist/cjs/numberinput.js +191 -0
  78. package/dist/cjs/pagination.js +19 -0
  79. package/dist/cjs/progress.js +151 -0
  80. package/dist/cjs/radio.js +224 -0
  81. package/dist/cjs/select.js +20 -0
  82. package/dist/cjs/slider.js +511 -0
  83. package/dist/cjs/snackbar.js +114 -0
  84. package/dist/cjs/steps.js +352 -0
  85. package/dist/cjs/switch.js +144 -0
  86. package/dist/cjs/table.js +877 -0
  87. package/dist/cjs/tabs.js +258 -0
  88. package/dist/cjs/tag.js +63 -0
  89. package/dist/cjs/taginput.js +297 -0
  90. package/dist/cjs/timepicker.js +75 -0
  91. package/dist/cjs/toast.js +89 -0
  92. package/dist/cjs/tooltip.js +17 -0
  93. package/dist/cjs/upload.js +210 -0
  94. package/dist/components/autocomplete/index.js +1084 -2
  95. package/dist/components/autocomplete/index.min.js +2 -0
  96. package/dist/components/button/index.js +425 -2
  97. package/dist/components/button/index.min.js +2 -0
  98. package/dist/components/checkbox/index.js +342 -2
  99. package/dist/components/checkbox/index.min.js +2 -0
  100. package/dist/components/clockpicker/index.js +2340 -2
  101. package/dist/components/clockpicker/index.min.js +2 -0
  102. package/dist/components/collapse/index.js +201 -2
  103. package/dist/components/collapse/index.min.js +2 -0
  104. package/dist/components/datepicker/index.js +2720 -2
  105. package/dist/components/datepicker/index.min.js +2 -0
  106. package/dist/components/dialog/index.js +768 -2
  107. package/dist/components/dialog/index.min.js +2 -0
  108. package/dist/components/dropdown/index.js +555 -2
  109. package/dist/components/dropdown/index.min.js +2 -0
  110. package/dist/components/field/index.js +447 -2
  111. package/dist/components/field/index.min.js +2 -0
  112. package/dist/components/icon/index.js +322 -2
  113. package/dist/components/icon/index.min.js +2 -0
  114. package/dist/components/input/index.js +675 -2
  115. package/dist/components/input/index.min.js +2 -0
  116. package/dist/components/loading/index.js +282 -2
  117. package/dist/components/loading/index.min.js +2 -0
  118. package/dist/components/menu/index.js +550 -2
  119. package/dist/components/menu/index.min.js +2 -0
  120. package/dist/components/message/index.js +482 -2
  121. package/dist/components/message/index.min.js +2 -0
  122. package/dist/components/modal/index.js +400 -2
  123. package/dist/components/modal/index.min.js +2 -0
  124. package/dist/components/navbar/index.js +371 -0
  125. package/dist/components/navbar/index.min.js +2 -0
  126. package/dist/components/notification/index.js +705 -2
  127. package/dist/components/notification/index.min.js +2 -0
  128. package/dist/components/numberinput/index.js +846 -2
  129. package/dist/components/numberinput/index.min.js +2 -0
  130. package/dist/components/pagination/index.js +577 -2
  131. package/dist/components/pagination/index.min.js +2 -0
  132. package/dist/components/progress/index.js +250 -0
  133. package/dist/components/progress/index.min.js +2 -0
  134. package/dist/components/radio/index.js +323 -2
  135. package/dist/components/radio/index.min.js +2 -0
  136. package/dist/components/select/index.js +571 -2
  137. package/dist/components/select/index.min.js +2 -0
  138. package/dist/components/slider/index.js +764 -0
  139. package/dist/components/slider/index.min.js +2 -0
  140. package/dist/components/snackbar/index.js +397 -2
  141. package/dist/components/snackbar/index.min.js +2 -0
  142. package/dist/components/steps/index.js +721 -2
  143. package/dist/components/steps/index.min.js +2 -0
  144. package/dist/components/switch/index.js +243 -2
  145. package/dist/components/switch/index.min.js +2 -0
  146. package/dist/components/table/index.js +1870 -2
  147. package/dist/components/table/index.min.js +2 -0
  148. package/dist/components/tabs/index.js +627 -2
  149. package/dist/components/tabs/index.min.js +2 -0
  150. package/dist/components/tag/index.js +262 -2
  151. package/dist/components/tag/index.min.js +2 -0
  152. package/dist/components/taginput/index.js +1459 -2
  153. package/dist/components/taginput/index.min.js +2 -0
  154. package/dist/components/timepicker/index.js +2053 -2
  155. package/dist/components/timepicker/index.min.js +2 -0
  156. package/dist/components/toast/index.js +372 -2
  157. package/dist/components/toast/index.min.js +2 -0
  158. package/dist/components/tooltip/index.js +236 -2
  159. package/dist/components/tooltip/index.min.js +2 -0
  160. package/dist/components/upload/index.js +501 -2
  161. package/dist/components/upload/index.min.js +2 -0
  162. package/dist/esm/autocomplete.js +18 -0
  163. package/dist/esm/button.js +102 -0
  164. package/dist/esm/checkbox.js +131 -0
  165. package/dist/esm/chunk-00e3e67f.js +401 -0
  166. package/dist/esm/chunk-051f8b06.js +105 -0
  167. package/dist/esm/chunk-0566c90d.js +152 -0
  168. package/dist/esm/chunk-07e19446.js +545 -0
  169. package/dist/esm/chunk-085a700d.js +7 -0
  170. package/dist/esm/chunk-0ad6938a.js +53 -0
  171. package/dist/esm/chunk-0e3f4fb5.js +52 -0
  172. package/dist/esm/chunk-10c85529.js +151 -0
  173. package/dist/esm/chunk-121b1efa.js +197 -0
  174. package/dist/esm/chunk-19dad95e.js +256 -0
  175. package/dist/esm/chunk-231b6066.js +113 -0
  176. package/dist/esm/chunk-24d1a01f.js +279 -0
  177. package/dist/esm/chunk-297bff6b.js +393 -0
  178. package/dist/esm/chunk-2b2ae5c6.js +245 -0
  179. package/dist/esm/chunk-2cb6f867.js +46 -0
  180. package/dist/esm/chunk-33717194.js +392 -0
  181. package/dist/esm/chunk-3b811b77.js +139 -0
  182. package/dist/esm/chunk-3e47308f.js +104 -0
  183. package/dist/esm/chunk-411d6eea.js +84 -0
  184. package/dist/esm/chunk-4535dec5.js +92 -0
  185. package/dist/esm/chunk-47a5f3a1.js +103 -0
  186. package/dist/esm/chunk-4a5384da.js +205 -0
  187. package/dist/esm/chunk-4b663574.js +112 -0
  188. package/dist/esm/chunk-4d393f09.js +170 -0
  189. package/dist/esm/chunk-4d695899.js +257 -0
  190. package/dist/esm/chunk-4f508891.js +171 -0
  191. package/dist/esm/chunk-531b8274.js +281 -0
  192. package/dist/esm/chunk-591ee4a2.js +151 -0
  193. package/dist/esm/chunk-5d3bf82e.js +170 -0
  194. package/dist/esm/chunk-5e0b0665.js +104 -0
  195. package/dist/esm/chunk-648b9aa4.js +45 -0
  196. package/dist/esm/chunk-666940cf.js +546 -0
  197. package/dist/esm/chunk-67c97e13.js +246 -0
  198. package/dist/esm/chunk-6844653e.js +401 -0
  199. package/dist/esm/chunk-699b7cb4.js +245 -0
  200. package/dist/esm/chunk-6f881e7d.js +51 -0
  201. package/dist/esm/chunk-7123d158.js +256 -0
  202. package/dist/esm/chunk-7cf87590.js +60 -0
  203. package/dist/esm/chunk-823177ac.js +545 -0
  204. package/dist/esm/chunk-8838757a.js +401 -0
  205. package/dist/esm/chunk-8ca878c0.js +198 -0
  206. package/dist/esm/chunk-8fc2e874.js +85 -0
  207. package/dist/esm/chunk-912ed715.js +92 -0
  208. package/dist/esm/chunk-92acc21f.js +392 -0
  209. package/dist/esm/chunk-98e86f40.js +197 -0
  210. package/dist/esm/chunk-99a1f9df.js +92 -0
  211. package/dist/esm/chunk-9a776697.js +112 -0
  212. package/dist/esm/chunk-9e3207cc.js +46 -0
  213. package/dist/esm/chunk-9ec14e09.js +112 -0
  214. package/dist/esm/chunk-a5ea70d0.js +205 -0
  215. package/dist/esm/chunk-ac3f4847.js +138 -0
  216. package/dist/esm/chunk-b5376f3e.js +92 -0
  217. package/dist/esm/chunk-b56eb2c8.js +197 -0
  218. package/dist/esm/chunk-b796d1b2.js +392 -0
  219. package/dist/esm/chunk-b822a5db.js +205 -0
  220. package/dist/esm/chunk-b9bdb0e4.js +6 -0
  221. package/dist/esm/chunk-bfe15983.js +401 -0
  222. package/dist/esm/chunk-c9039f68.js +104 -0
  223. package/dist/esm/chunk-cc718c15.js +245 -0
  224. package/dist/esm/chunk-cca88db8.js +99 -0
  225. package/dist/esm/chunk-d6200087.js +50 -0
  226. package/dist/esm/chunk-daeac852.js +138 -0
  227. package/dist/esm/chunk-db31c548.js +103 -0
  228. package/dist/esm/chunk-e5568f45.js +84 -0
  229. package/dist/esm/chunk-e5fce48f.js +59 -0
  230. package/dist/esm/chunk-e84b4047.js +170 -0
  231. package/dist/esm/chunk-e8d90b72.js +98 -0
  232. package/dist/esm/chunk-e932bb68.js +206 -0
  233. package/dist/esm/chunk-edd8ff91.js +103 -0
  234. package/dist/esm/chunk-f0465d8d.js +84 -0
  235. package/dist/esm/chunk-f743d154.js +93 -0
  236. package/dist/esm/chunk-f8036b32.js +402 -0
  237. package/dist/esm/chunk-f984748f.js +401 -0
  238. package/dist/esm/chunk-fd5b0e1e.js +99 -0
  239. package/dist/esm/clockpicker.js +443 -0
  240. package/dist/esm/collapse.js +98 -0
  241. package/dist/esm/datepicker.js +1277 -0
  242. package/dist/esm/dialog.js +231 -0
  243. package/dist/esm/dropdown.js +14 -0
  244. package/dist/esm/field.js +14 -0
  245. package/dist/esm/icon.js +13 -0
  246. package/dist/esm/index.js +154 -0
  247. package/dist/esm/input.js +16 -0
  248. package/dist/esm/loading.js +159 -0
  249. package/dist/esm/menu.js +225 -0
  250. package/dist/esm/message.js +61 -0
  251. package/dist/esm/modal.js +42 -0
  252. package/dist/esm/navbar.js +253 -0
  253. package/dist/esm/notification.js +135 -0
  254. package/dist/esm/numberinput.js +187 -0
  255. package/dist/esm/pagination.js +15 -0
  256. package/dist/esm/progress.js +147 -0
  257. package/dist/esm/radio.js +219 -0
  258. package/dist/esm/select.js +16 -0
  259. package/dist/esm/slider.js +506 -0
  260. package/dist/esm/snackbar.js +108 -0
  261. package/dist/esm/steps.js +347 -0
  262. package/dist/esm/switch.js +140 -0
  263. package/dist/esm/table.js +872 -0
  264. package/dist/esm/tabs.js +253 -0
  265. package/dist/esm/tag.js +59 -0
  266. package/dist/esm/taginput.js +293 -0
  267. package/dist/esm/timepicker.js +71 -0
  268. package/dist/esm/toast.js +83 -0
  269. package/dist/esm/tooltip.js +13 -0
  270. package/dist/esm/upload.js +206 -0
  271. package/package.json +26 -4
  272. package/src/components/checkbox/Checkbox.vue +12 -4
  273. package/src/components/checkbox/CheckboxButton.vue +10 -2
  274. package/src/components/clockpicker/Clockpicker.vue +0 -5
  275. package/src/components/datepicker/Datepicker.spec.js +60 -0
  276. package/src/components/datepicker/Datepicker.vue +46 -19
  277. package/src/components/datepicker/DatepickerTable.spec.js +107 -2
  278. package/src/components/datepicker/DatepickerTable.vue +73 -4
  279. package/src/components/datepicker/DatepickerTableRow.spec.js +127 -17
  280. package/src/components/datepicker/DatepickerTableRow.vue +103 -4
  281. package/src/components/dialog/Dialog.vue +5 -3
  282. package/src/components/dialog/index.js +2 -2
  283. package/src/components/dropdown/Dropdown.vue +1 -4
  284. package/src/components/dropdown/DropdownItem.vue +7 -3
  285. package/src/components/field/Field.spec.js +18 -0
  286. package/src/components/field/Field.vue +21 -2
  287. package/src/components/index.js +6 -0
  288. package/src/components/input/Input.vue +2 -2
  289. package/src/components/loading/index.js +1 -1
  290. package/src/components/modal/index.js +1 -1
  291. package/src/components/navbar/NavBar.spec.js +76 -0
  292. package/src/components/navbar/Navbar.vue +127 -0
  293. package/src/components/navbar/NavbarBurger.vue +25 -0
  294. package/src/components/navbar/NavbarItem.vue +21 -0
  295. package/src/components/navbar/index.js +20 -0
  296. package/src/components/notification/index.js +1 -1
  297. package/src/components/pagination/Pagination.vue +28 -6
  298. package/src/components/progress/Progress.spec.js +77 -0
  299. package/src/components/progress/Progress.vue +108 -0
  300. package/src/components/progress/__snapshots__/Progress.spec.js.snap +7 -0
  301. package/src/components/progress/index.js +17 -0
  302. package/src/components/radio/Radio.spec.js +18 -1
  303. package/src/components/radio/Radio.vue +11 -5
  304. package/src/components/radio/RadioButton.spec.js +18 -1
  305. package/src/components/radio/RadioButton.vue +20 -8
  306. package/src/components/select/Select.spec.js +22 -1
  307. package/src/components/select/Select.vue +2 -1
  308. package/src/components/select/__snapshots__/Select.spec.js.snap +7 -0
  309. package/src/components/slider/Slider.spec.js +10 -0
  310. package/src/components/slider/Slider.vue +240 -0
  311. package/src/components/slider/SliderThumb.vue +188 -0
  312. package/src/components/slider/SliderTick.vue +43 -0
  313. package/src/components/slider/index.js +20 -0
  314. package/src/components/snackbar/index.js +2 -2
  315. package/src/components/steps/StepItem.vue +2 -3
  316. package/src/components/steps/Steps.vue +7 -5
  317. package/src/components/switch/Switch.spec.js +29 -0
  318. package/src/components/switch/Switch.vue +29 -5
  319. package/src/components/switch/__snapshots__/Switch.spec.js.snap +3 -0
  320. package/src/components/table/Table.vue +30 -8
  321. package/src/components/table/TableColumn.vue +2 -2
  322. package/src/components/tag/Tag.vue +4 -1
  323. package/src/components/taginput/Taginput.spec.js +10 -0
  324. package/src/components/taginput/Taginput.vue +8 -3
  325. package/src/components/toast/index.js +2 -2
  326. package/src/components/tooltip/Tooltip.vue +5 -5
  327. package/src/components/upload/Upload.vue +15 -8
  328. package/src/index.js +11 -4
  329. package/src/scss/buefy-build.scss +3 -3
  330. package/src/scss/buefy.scss +4 -0
  331. package/src/scss/components/_datepicker.scss +40 -1
  332. package/src/scss/components/_form.scss +52 -1
  333. package/src/scss/components/_progress.scss +45 -0
  334. package/src/scss/components/_radio.scss +14 -14
  335. package/src/scss/components/_slider.scss +138 -0
  336. package/src/scss/components/_steps.scss +4 -4
  337. package/src/scss/components/_switch.scss +54 -2
  338. package/src/scss/components/_taginput.scss +3 -0
  339. package/src/scss/components/_upload.scss +1 -3
  340. package/src/utils/SlotComponent.js +9 -2
  341. package/src/utils/TimepickerMixin.js +17 -6
  342. package/src/utils/config.js +4 -1
  343. package/src/utils/helpers.spec.js +67 -0
  344. package/src/utils/plugins.js +2 -1
  345. package/types/components.d.ts +3 -3
  346. package/types/index.d.ts +24 -11
  347. package/dist/components/index.js +0 -2
@@ -0,0 +1,16 @@
1
+ import './chunk-d6200087.js';
2
+ import './chunk-9e3207cc.js';
3
+ import './chunk-10c85529.js';
4
+ import './chunk-e84b4047.js';
5
+ import { r as registerComponent, u as use } from './chunk-cca88db8.js';
6
+ import { S as Select } from './chunk-912ed715.js';
7
+ export { S as Select } from './chunk-912ed715.js';
8
+
9
+ var Plugin = {
10
+ install: function install(Vue) {
11
+ registerComponent(Vue, Select);
12
+ }
13
+ };
14
+ use(Plugin);
15
+
16
+ export default Plugin;
@@ -0,0 +1,506 @@
1
+ import { _ as _defineProperty, b as _toConsumableArray } from './chunk-d6200087.js';
2
+ import './chunk-9e3207cc.js';
3
+ import { _ as __vue_normalize__, r as registerComponent, u as use } from './chunk-cca88db8.js';
4
+ import { T as Tooltip } from './chunk-411d6eea.js';
5
+
6
+ var script = {
7
+ name: 'BSliderThumb',
8
+ components: _defineProperty({}, Tooltip.name, Tooltip),
9
+ inheritAttrs: false,
10
+ props: {
11
+ value: {
12
+ type: Number,
13
+ default: 0
14
+ },
15
+ type: {
16
+ type: String,
17
+ default: ''
18
+ },
19
+ tooltip: {
20
+ type: Boolean,
21
+ default: true
22
+ }
23
+ },
24
+ data: function data() {
25
+ return {
26
+ isFocused: false,
27
+ dragging: false,
28
+ startX: 0,
29
+ startPosition: 0,
30
+ newPosition: null,
31
+ oldValue: this.value
32
+ };
33
+ },
34
+ computed: {
35
+ disabled: function disabled() {
36
+ return this.$parent.disabled;
37
+ },
38
+ max: function max() {
39
+ return this.$parent.max;
40
+ },
41
+ min: function min() {
42
+ return this.$parent.min;
43
+ },
44
+ step: function step() {
45
+ return this.$parent.step;
46
+ },
47
+ precision: function precision() {
48
+ return this.$parent.precision;
49
+ },
50
+ currentPosition: function currentPosition() {
51
+ return "".concat((this.value - this.min) / (this.max - this.min) * 100, "%");
52
+ },
53
+ wrapperStyle: function wrapperStyle() {
54
+ return {
55
+ left: this.currentPosition
56
+ };
57
+ }
58
+ },
59
+ watch: {
60
+ dragging: function dragging(val) {
61
+ this.$parent.dragging = val;
62
+ }
63
+ },
64
+ methods: {
65
+ onFocus: function onFocus() {
66
+ this.isFocused = true;
67
+ },
68
+ onBlur: function onBlur() {
69
+ this.isFocused = false;
70
+ },
71
+ onButtonDown: function onButtonDown(event) {
72
+ if (this.disabled) return;
73
+ event.preventDefault();
74
+ this.onDragStart(event);
75
+
76
+ if (typeof window !== 'undefined') {
77
+ document.addEventListener('mousemove', this.onDragging);
78
+ document.addEventListener('touchmove', this.onDragging);
79
+ document.addEventListener('mouseup', this.onDragEnd);
80
+ document.addEventListener('touchend', this.onDragEnd);
81
+ document.addEventListener('contextmenu', this.onDragEnd);
82
+ }
83
+ },
84
+ onLeftKeyDown: function onLeftKeyDown() {
85
+ if (this.disabled || this.value === this.min) return;
86
+ this.newPosition = parseFloat(this.currentPosition) - this.step / (this.max - this.min) * 100;
87
+ this.setPosition(this.newPosition);
88
+ this.$parent.emitChange();
89
+ },
90
+ onRightKeyDown: function onRightKeyDown() {
91
+ if (this.disabled || this.value === this.max) return;
92
+ this.newPosition = parseFloat(this.currentPosition) + this.step / (this.max - this.min) * 100;
93
+ this.setPosition(this.newPosition);
94
+ this.$parent.emitChange();
95
+ },
96
+ onHomeKeyDown: function onHomeKeyDown() {
97
+ if (this.disabled || this.value === this.min) return;
98
+ this.newPosition = 0;
99
+ this.setPosition(this.newPosition);
100
+ this.$parent.emitChange();
101
+ },
102
+ onEndKeyDown: function onEndKeyDown() {
103
+ if (this.disabled || this.value === this.max) return;
104
+ this.newPosition = 100;
105
+ this.setPosition(this.newPosition);
106
+ this.$parent.emitChange();
107
+ },
108
+ onDragStart: function onDragStart(event) {
109
+ this.dragging = true;
110
+
111
+ if (event.type === 'touchstart') {
112
+ event.clientX = event.touches[0].clientX;
113
+ }
114
+
115
+ this.startX = event.clientX;
116
+ this.startPosition = parseFloat(this.currentPosition);
117
+ this.newPosition = this.startPosition;
118
+ },
119
+ onDragging: function onDragging(event) {
120
+ if (this.dragging) {
121
+ if (event.type === 'touchmove') {
122
+ event.clientX = event.touches[0].clientX;
123
+ }
124
+
125
+ var diff = (event.clientX - this.startX) / this.$parent.sliderSize * 100;
126
+ this.newPosition = this.startPosition + diff;
127
+ this.setPosition(this.newPosition);
128
+ }
129
+ },
130
+ onDragEnd: function onDragEnd() {
131
+ var _this = this;
132
+
133
+ if (this.value !== this.oldValue) {
134
+ this.$parent.emitChange();
135
+ }
136
+
137
+ setTimeout(function () {
138
+ // defer to prevent triggering click on the track
139
+ _this.dragging = false;
140
+
141
+ _this.setPosition(_this.newPosition);
142
+ });
143
+
144
+ if (typeof window !== 'undefined') {
145
+ document.removeEventListener('mousemove', this.onDragging);
146
+ document.removeEventListener('touchmove', this.onDragging);
147
+ document.removeEventListener('mouseup', this.onDragEnd);
148
+ document.removeEventListener('touchend', this.onDragEnd);
149
+ document.removeEventListener('contextmenu', this.onDragEnd);
150
+ }
151
+ },
152
+ setPosition: function setPosition(percent) {
153
+ if (percent === null || isNaN(percent)) return;
154
+
155
+ if (percent < 0) {
156
+ percent = 0;
157
+ } else if (percent > 100) {
158
+ percent = 100;
159
+ }
160
+
161
+ var stepLength = 100 / ((this.max - this.min) / this.step);
162
+ var steps = Math.round(percent / stepLength);
163
+ var value = steps * stepLength / 100 * (this.max - this.min) + this.min;
164
+ value = parseFloat(value.toFixed(this.precision));
165
+ this.$emit('input', value);
166
+
167
+ if (!this.dragging && value !== this.oldValue) {
168
+ this.oldValue = value;
169
+ }
170
+ }
171
+ }
172
+ };
173
+
174
+ /* script */
175
+ const __vue_script__ = script;
176
+
177
+ /* template */
178
+ var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"b-slider-thumb-wrapper",class:{ 'is-dragging': _vm.dragging },style:(_vm.wrapperStyle)},[_c('b-tooltip',{attrs:{"label":_vm.value.toString(),"type":_vm.type,"always":_vm.dragging || _vm.isFocused,"active":!_vm.disabled && _vm.tooltip}},[_c('div',_vm._b({staticClass:"b-slider-thumb",attrs:{"tabindex":_vm.disabled ? false : 0},on:{"mousedown":_vm.onButtonDown,"touchstart":_vm.onButtonDown,"focus":_vm.onFocus,"blur":_vm.onBlur,"keydown":[function($event){if(!('button' in $event)&&_vm._k($event.keyCode,"left",37,$event.key)){ return null; }if('button' in $event && $event.button !== 0){ return null; }$event.preventDefault();_vm.onLeftKeyDown($event);},function($event){if(!('button' in $event)&&_vm._k($event.keyCode,"right",39,$event.key)){ return null; }if('button' in $event && $event.button !== 2){ return null; }$event.preventDefault();_vm.onRightKeyDown($event);},function($event){if(!('button' in $event)&&_vm._k($event.keyCode,"down",40,$event.key)){ return null; }$event.preventDefault();_vm.onLeftKeyDown($event);},function($event){if(!('button' in $event)&&_vm._k($event.keyCode,"up",38,$event.key)){ return null; }$event.preventDefault();_vm.onRightKeyDown($event);},function($event){if(!('button' in $event)&&_vm._k($event.keyCode,"home",undefined,$event.key)){ return null; }$event.preventDefault();_vm.onHomeKeyDown($event);},function($event){if(!('button' in $event)&&_vm._k($event.keyCode,"end",undefined,$event.key)){ return null; }$event.preventDefault();_vm.onEndKeyDown($event);}]}},'div',_vm.$attrs,false))])],1)};
179
+ var __vue_staticRenderFns__ = [];
180
+
181
+ /* style */
182
+ const __vue_inject_styles__ = undefined;
183
+ /* scoped */
184
+ const __vue_scope_id__ = undefined;
185
+ /* module identifier */
186
+ const __vue_module_identifier__ = undefined;
187
+ /* functional template */
188
+ const __vue_is_functional_template__ = false;
189
+ /* style inject */
190
+
191
+ /* style inject SSR */
192
+
193
+
194
+
195
+ var SliderThumb = __vue_normalize__(
196
+ { render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
197
+ __vue_inject_styles__,
198
+ __vue_script__,
199
+ __vue_scope_id__,
200
+ __vue_is_functional_template__,
201
+ __vue_module_identifier__,
202
+ undefined,
203
+ undefined
204
+ );
205
+
206
+ //
207
+ //
208
+ //
209
+ //
210
+ //
211
+ //
212
+ //
213
+ //
214
+ //
215
+ //
216
+ //
217
+ var script$1 = {
218
+ name: 'BSliderTick',
219
+ props: {
220
+ value: {
221
+ type: Number,
222
+ default: 0
223
+ }
224
+ },
225
+ computed: {
226
+ position: function position() {
227
+ var pos = (this.value - this.$parent.min) / (this.$parent.max - this.$parent.min) * 100;
228
+ return pos >= 0 && pos <= 100 ? pos : 0;
229
+ },
230
+ hidden: function hidden() {
231
+ return this.value === this.$parent.min || this.value === this.$parent.max;
232
+ }
233
+ },
234
+ methods: {
235
+ getTickStyle: function getTickStyle(position) {
236
+ return {
237
+ 'left': position + '%'
238
+ };
239
+ }
240
+ },
241
+ created: function created() {
242
+ if (!this.$parent.$data._isSlider) {
243
+ this.$destroy();
244
+ throw new Error('You should wrap bSliderTick on a bSlider');
245
+ }
246
+ }
247
+ };
248
+
249
+ /* script */
250
+ const __vue_script__$1 = script$1;
251
+
252
+ /* template */
253
+ var __vue_render__$1 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"b-slider-tick",class:{ 'is-tick-hidden': _vm.hidden },style:(_vm.getTickStyle(_vm.position))},[(_vm.$slots.default)?_c('span',{staticClass:"b-slider-tick-label"},[_vm._t("default")],2):_vm._e()])};
254
+ var __vue_staticRenderFns__$1 = [];
255
+
256
+ /* style */
257
+ const __vue_inject_styles__$1 = undefined;
258
+ /* scoped */
259
+ const __vue_scope_id__$1 = undefined;
260
+ /* module identifier */
261
+ const __vue_module_identifier__$1 = undefined;
262
+ /* functional template */
263
+ const __vue_is_functional_template__$1 = false;
264
+ /* style inject */
265
+
266
+ /* style inject SSR */
267
+
268
+
269
+
270
+ var SliderTick = __vue_normalize__(
271
+ { render: __vue_render__$1, staticRenderFns: __vue_staticRenderFns__$1 },
272
+ __vue_inject_styles__$1,
273
+ __vue_script__$1,
274
+ __vue_scope_id__$1,
275
+ __vue_is_functional_template__$1,
276
+ __vue_module_identifier__$1,
277
+ undefined,
278
+ undefined
279
+ );
280
+
281
+ var _components;
282
+ var script$2 = {
283
+ name: 'BSlider',
284
+ components: (_components = {}, _defineProperty(_components, SliderThumb.name, SliderThumb), _defineProperty(_components, SliderTick.name, SliderTick), _components),
285
+ props: {
286
+ value: {
287
+ type: [Number, Array],
288
+ default: 0
289
+ },
290
+ min: {
291
+ type: Number,
292
+ default: 0
293
+ },
294
+ max: {
295
+ type: Number,
296
+ default: 100
297
+ },
298
+ step: {
299
+ type: Number,
300
+ default: 1
301
+ },
302
+ type: {
303
+ type: String,
304
+ default: 'is-primary'
305
+ },
306
+ size: String,
307
+ ticks: {
308
+ type: Boolean,
309
+ default: false
310
+ },
311
+ tooltip: {
312
+ type: Boolean,
313
+ default: true
314
+ },
315
+ tooltipType: String,
316
+ rounded: {
317
+ type: Boolean,
318
+ default: false
319
+ },
320
+ disabled: {
321
+ type: Boolean,
322
+ default: false
323
+ },
324
+ ariaLabel: [String, Array]
325
+ },
326
+ data: function data() {
327
+ return {
328
+ value1: null,
329
+ value2: null,
330
+ dragging: false,
331
+ isRange: false,
332
+ newTooltipType: this.tooltipType ? this.tooltipType : this.type,
333
+ _isSlider: true // Used by Thumb and Tick
334
+
335
+ };
336
+ },
337
+ computed: {
338
+ tickValues: function tickValues() {
339
+ if (!this.ticks || this.min > this.max || this.step === 0) return [];
340
+ var result = [];
341
+
342
+ for (var i = this.min + this.step; i < this.max; i = i + this.step) {
343
+ result.push(i);
344
+ }
345
+
346
+ return result;
347
+ },
348
+ minValue: function minValue() {
349
+ return Math.min(this.value1, this.value2);
350
+ },
351
+ maxValue: function maxValue() {
352
+ return Math.max(this.value1, this.value2);
353
+ },
354
+ barSize: function barSize() {
355
+ return this.isRange ? "".concat(100 * (this.maxValue - this.minValue) / (this.max - this.min), "%") : "".concat(100 * (this.value1 - this.min) / (this.max - this.min), "%");
356
+ },
357
+ barStart: function barStart() {
358
+ return this.isRange ? "".concat(100 * (this.minValue - this.min) / (this.max - this.min), "%") : '0%';
359
+ },
360
+ precision: function precision() {
361
+ var precisions = [this.min, this.max, this.step].map(function (item) {
362
+ var decimal = ('' + item).split('.')[1];
363
+ return decimal ? decimal.length : 0;
364
+ });
365
+ return Math.max.apply(Math, _toConsumableArray(precisions));
366
+ },
367
+ barStyle: function barStyle() {
368
+ return {
369
+ width: this.barSize,
370
+ left: this.barStart
371
+ };
372
+ },
373
+ sliderSize: function sliderSize() {
374
+ return this.$refs.slider['clientWidth'];
375
+ },
376
+ rootClasses: function rootClasses() {
377
+ return {
378
+ 'is-rounded': this.rounded,
379
+ 'is-dragging': this.dragging,
380
+ 'is-disabled': this.disabled
381
+ };
382
+ }
383
+ },
384
+ watch: {
385
+ /**
386
+ * When v-model is changed set the new active step.
387
+ */
388
+ value: function value(_value) {
389
+ this.setValues(_value);
390
+ },
391
+ value1: function value1(val) {
392
+ this.isThumbReversed = this.value1 > this.value2;
393
+
394
+ if (this.isRange) {
395
+ this.$emit('input', [this.minValue, this.maxValue]);
396
+ } else {
397
+ this.$emit('input', val);
398
+ }
399
+ },
400
+ value2: function value2(val) {
401
+ this.isThumbReversed = this.value1 > this.value2;
402
+
403
+ if (this.isRange) {
404
+ this.$emit('input', [this.minValue, this.maxValue]);
405
+ }
406
+ },
407
+ min: function min() {
408
+ this.setValues();
409
+ },
410
+ max: function max() {
411
+ this.setValues();
412
+ }
413
+ },
414
+ methods: {
415
+ setValues: function setValues(newValue) {
416
+ if (this.min > this.max) {
417
+ return;
418
+ }
419
+
420
+ if (Array.isArray(newValue)) {
421
+ this.isRange = true;
422
+ var smallValue = typeof newValue[0] !== 'number' || isNaN(newValue[0]) ? this.min : Math.min(Math.max(this.min, newValue[0]), this.max);
423
+ var largeValue = typeof newValue[1] !== 'number' || isNaN(newValue[1]) ? this.max : Math.max(Math.min(this.max, newValue[1]), this.min);
424
+ this.value1 = this.isThumbReversed ? largeValue : smallValue;
425
+ this.value2 = this.isThumbReversed ? smallValue : largeValue;
426
+ } else {
427
+ this.isRange = false;
428
+ this.value1 = isNaN(newValue) ? this.min : Math.min(this.max, Math.max(this.min, newValue));
429
+ }
430
+ },
431
+ onSliderClick: function onSliderClick(event) {
432
+ if (this.disabled || this.dragging) return;
433
+ var sliderOffsetLeft = this.$refs.slider.getBoundingClientRect().left;
434
+ var percent = (event.clientX - sliderOffsetLeft) / this.sliderSize * 100;
435
+ var targetValue = this.min + percent * (this.max - this.min) / 100;
436
+ var diffFirst = Math.abs(targetValue - this.value1);
437
+
438
+ if (!this.isRange) {
439
+ if (diffFirst < this.step / 2) return;
440
+ this.$refs.button1.setPosition(percent);
441
+ } else {
442
+ var diffSecond = Math.abs(targetValue - this.value2);
443
+
444
+ if (diffFirst <= diffSecond) {
445
+ if (diffFirst < this.step / 2) return;
446
+ this.$refs['button1'].setPosition(percent);
447
+ } else {
448
+ if (diffSecond < this.step / 2) return;
449
+ this.$refs['button2'].setPosition(percent);
450
+ }
451
+ }
452
+
453
+ this.emitChange();
454
+ },
455
+ emitChange: function emitChange() {
456
+ this.$emit('change', this.isRange ? [this.minValue, this.maxValue] : this.value1);
457
+ }
458
+ },
459
+ created: function created() {
460
+ this.setValues(this.value);
461
+ this.isThumbReversed = false;
462
+ }
463
+ };
464
+
465
+ /* script */
466
+ const __vue_script__$2 = script$2;
467
+
468
+ /* template */
469
+ var __vue_render__$2 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"b-slider",class:[_vm.size, _vm.type, _vm.rootClasses]},[_c('div',{ref:"slider",staticClass:"b-slider-track",on:{"click":_vm.onSliderClick}},[_c('div',{staticClass:"b-slider-fill",style:(_vm.barStyle)}),_vm._v(" "),(_vm.ticks)?_vm._l((_vm.tickValues),function(val,key){return _c('b-slider-tick',{key:key,attrs:{"value":val}})}):_vm._e(),_vm._v(" "),_vm._t("default"),_vm._v(" "),_c('b-slider-thumb',{ref:"button1",attrs:{"type":_vm.newTooltipType,"tooltip":_vm.tooltip,"role":"slider","aria-valuenow":_vm.value1,"aria-valuemin":_vm.min,"aria-valuemax":_vm.max,"aria-orientation":"horizontal","aria-label":Array.isArray(_vm.ariaLabel) ? _vm.ariaLabel[0] : _vm.ariaLabel,"aria-disabled":_vm.disabled},model:{value:(_vm.value1),callback:function ($$v) {_vm.value1=$$v;},expression:"value1"}}),_vm._v(" "),(_vm.isRange)?_c('b-slider-thumb',{ref:"button2",attrs:{"type":_vm.newTooltipType,"tooltip":_vm.tooltip,"role":"slider","aria-valuenow":_vm.value2,"aria-valuemin":_vm.min,"aria-valuemax":_vm.max,"aria-orientation":"horizontal","aria-label":Array.isArray(_vm.ariaLabel) ? _vm.ariaLabel[1] : '',"aria-disabled":_vm.disabled},model:{value:(_vm.value2),callback:function ($$v) {_vm.value2=$$v;},expression:"value2"}}):_vm._e()],2)])};
470
+ var __vue_staticRenderFns__$2 = [];
471
+
472
+ /* style */
473
+ const __vue_inject_styles__$2 = undefined;
474
+ /* scoped */
475
+ const __vue_scope_id__$2 = undefined;
476
+ /* module identifier */
477
+ const __vue_module_identifier__$2 = undefined;
478
+ /* functional template */
479
+ const __vue_is_functional_template__$2 = false;
480
+ /* style inject */
481
+
482
+ /* style inject SSR */
483
+
484
+
485
+
486
+ var Slider = __vue_normalize__(
487
+ { render: __vue_render__$2, staticRenderFns: __vue_staticRenderFns__$2 },
488
+ __vue_inject_styles__$2,
489
+ __vue_script__$2,
490
+ __vue_scope_id__$2,
491
+ __vue_is_functional_template__$2,
492
+ __vue_module_identifier__$2,
493
+ undefined,
494
+ undefined
495
+ );
496
+
497
+ var Plugin = {
498
+ install: function install(Vue) {
499
+ registerComponent(Vue, Slider);
500
+ registerComponent(Vue, SliderTick);
501
+ }
502
+ };
503
+ use(Plugin);
504
+
505
+ export default Plugin;
506
+ export { Slider, SliderTick };
@@ -0,0 +1,108 @@
1
+ import './chunk-e5fce48f.js';
2
+ import { c as config } from './chunk-9e3207cc.js';
3
+ import { _ as __vue_normalize__, a as registerComponentProgrammatic, u as use } from './chunk-cca88db8.js';
4
+ import Vue from 'vue';
5
+ import { N as NoticeMixin } from './chunk-daeac852.js';
6
+
7
+ //
8
+ var script = {
9
+ name: 'BSnackbar',
10
+ mixins: [NoticeMixin],
11
+ props: {
12
+ actionText: {
13
+ type: String,
14
+ default: 'OK'
15
+ },
16
+ onAction: {
17
+ type: Function,
18
+ default: function _default() {}
19
+ },
20
+ indefinite: {
21
+ type: Boolean,
22
+ default: false
23
+ }
24
+ },
25
+ data: function data() {
26
+ return {
27
+ newDuration: this.duration || config.defaultSnackbarDuration
28
+ };
29
+ },
30
+ methods: {
31
+ /**
32
+ * Click listener.
33
+ * Call action prop before closing (from Mixin).
34
+ */
35
+ action: function action() {
36
+ this.onAction();
37
+ this.close();
38
+ }
39
+ }
40
+ };
41
+
42
+ /* script */
43
+ const __vue_script__ = script;
44
+
45
+ /* template */
46
+ var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('transition',{attrs:{"enter-active-class":_vm.transition.enter,"leave-active-class":_vm.transition.leave}},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.isActive),expression:"isActive"}],staticClass:"snackbar",class:[_vm.type,_vm.position]},[_c('div',{staticClass:"text",domProps:{"innerHTML":_vm._s(_vm.message)}}),_vm._v(" "),(_vm.actionText)?_c('div',{staticClass:"action",class:_vm.type,on:{"click":_vm.action}},[_c('button',{staticClass:"button"},[_vm._v(_vm._s(_vm.actionText))])]):_vm._e()])])};
47
+ var __vue_staticRenderFns__ = [];
48
+
49
+ /* style */
50
+ const __vue_inject_styles__ = undefined;
51
+ /* scoped */
52
+ const __vue_scope_id__ = undefined;
53
+ /* module identifier */
54
+ const __vue_module_identifier__ = undefined;
55
+ /* functional template */
56
+ const __vue_is_functional_template__ = false;
57
+ /* style inject */
58
+
59
+ /* style inject SSR */
60
+
61
+
62
+
63
+ var Snackbar = __vue_normalize__(
64
+ { render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
65
+ __vue_inject_styles__,
66
+ __vue_script__,
67
+ __vue_scope_id__,
68
+ __vue_is_functional_template__,
69
+ __vue_module_identifier__,
70
+ undefined,
71
+ undefined
72
+ );
73
+
74
+ var SnackbarProgrammatic = {
75
+ open: function open(params) {
76
+ var message;
77
+ var parent;
78
+ if (typeof params === 'string') message = params;
79
+ var defaultParam = {
80
+ type: 'is-success',
81
+ position: config.defaultSnackbarPosition || 'is-bottom-right',
82
+ message: message
83
+ };
84
+
85
+ if (params.parent) {
86
+ parent = params.parent;
87
+ delete params.parent;
88
+ }
89
+
90
+ var propsData = Object.assign(defaultParam, params);
91
+ var vm = typeof window !== 'undefined' && window.Vue ? window.Vue : Vue;
92
+ var SnackbarComponent = vm.extend(Snackbar);
93
+ return new SnackbarComponent({
94
+ parent: parent,
95
+ el: document.createElement('div'),
96
+ propsData: propsData
97
+ });
98
+ }
99
+ };
100
+ var Plugin = {
101
+ install: function install(Vue) {
102
+ registerComponentProgrammatic(Vue, 'snackbar', SnackbarProgrammatic);
103
+ }
104
+ };
105
+ use(Plugin);
106
+
107
+ export default Plugin;
108
+ export { SnackbarProgrammatic };