buefy 0.9.26 → 0.9.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (259) hide show
  1. package/README.md +3 -1
  2. package/dist/buefy.css +15904 -0
  3. package/dist/buefy.esm.js +17883 -0
  4. package/dist/buefy.esm.min.js +2 -0
  5. package/dist/buefy.js +17967 -0
  6. package/dist/buefy.min.css +1 -0
  7. package/dist/buefy.min.js +2 -0
  8. package/dist/cjs/Autocomplete-7a39c5ce.js +673 -0
  9. package/dist/cjs/Button-01827709.js +114 -0
  10. package/dist/cjs/CheckRadioMixin-c910f2ed.js +45 -0
  11. package/dist/cjs/Checkbox-43f54cc7.js +70 -0
  12. package/dist/cjs/Datepicker-680659bc.js +1679 -0
  13. package/dist/cjs/DropdownItem-422f8c34.js +559 -0
  14. package/dist/cjs/Field-4557b10c.js +315 -0
  15. package/dist/cjs/FormElementMixin-193a88b8.js +163 -0
  16. package/dist/cjs/Icon-78961800.js +189 -0
  17. package/dist/cjs/Image-c4bcd9b3.js +299 -0
  18. package/dist/cjs/InjectedChildMixin-d6bf7f91.js +135 -0
  19. package/dist/cjs/Input-e5a72d97.js +248 -0
  20. package/dist/cjs/Loading-6f2c7075.js +150 -0
  21. package/dist/cjs/MessageMixin-8d959514.js +146 -0
  22. package/dist/cjs/Modal-4cf07210.js +278 -0
  23. package/dist/cjs/NoticeMixin-01121bd2.js +154 -0
  24. package/dist/cjs/Pagination-d6b3fb85.js +413 -0
  25. package/dist/cjs/Select-2b3879bc.js +100 -0
  26. package/dist/cjs/SlotComponent-4fb48389.js +53 -0
  27. package/dist/cjs/TabbedChildMixin-907cad32.js +222 -0
  28. package/dist/cjs/Tag-437f65fb.js +154 -0
  29. package/dist/cjs/Timepicker-498fa02b.js +67 -0
  30. package/dist/cjs/TimepickerMixin-6c1a4ab4.js +661 -0
  31. package/dist/cjs/Tooltip-c1df7ee3.js +370 -0
  32. package/dist/cjs/_rollupPluginBabelHelpers-8b2e54ad.js +365 -0
  33. package/dist/cjs/autocomplete.js +22 -0
  34. package/dist/cjs/breadcrumb.js +139 -0
  35. package/dist/cjs/button.js +20 -0
  36. package/dist/cjs/carousel.js +662 -0
  37. package/dist/cjs/checkbox.js +86 -0
  38. package/dist/cjs/clockpicker.js +461 -0
  39. package/dist/cjs/collapse.js +128 -0
  40. package/dist/cjs/colorpicker.js +23 -0
  41. package/dist/cjs/config-8cfb5a4a.js +81 -0
  42. package/dist/cjs/config.js +18 -0
  43. package/dist/cjs/datepicker.js +27 -0
  44. package/dist/cjs/datetimepicker.js +377 -0
  45. package/dist/cjs/dialog.js +308 -0
  46. package/dist/cjs/dropdown.js +23 -0
  47. package/dist/cjs/field.js +18 -0
  48. package/dist/cjs/helpers.js +375 -0
  49. package/dist/cjs/icon.js +19 -0
  50. package/dist/cjs/image.js +19 -0
  51. package/dist/cjs/index-99d1c930.js +1633 -0
  52. package/dist/cjs/index.js +216 -0
  53. package/dist/cjs/input.js +21 -0
  54. package/dist/cjs/loading.js +38 -0
  55. package/dist/cjs/menu.js +304 -0
  56. package/dist/cjs/message.js +67 -0
  57. package/dist/cjs/modal.js +59 -0
  58. package/dist/cjs/navbar.js +679 -0
  59. package/dist/cjs/notification.js +181 -0
  60. package/dist/cjs/numberinput.js +278 -0
  61. package/dist/cjs/pagination.js +22 -0
  62. package/dist/cjs/plugins-7f41b028.js +94 -0
  63. package/dist/cjs/progress.js +239 -0
  64. package/dist/cjs/radio.js +130 -0
  65. package/dist/cjs/rate.js +156 -0
  66. package/dist/cjs/select.js +21 -0
  67. package/dist/cjs/sidebar.js +303 -0
  68. package/dist/cjs/skeleton.js +111 -0
  69. package/dist/cjs/slider.js +603 -0
  70. package/dist/cjs/snackbar.js +132 -0
  71. package/dist/cjs/ssr-20dba236.js +10 -0
  72. package/dist/cjs/steps.js +278 -0
  73. package/dist/cjs/switch.js +139 -0
  74. package/dist/cjs/table.js +1695 -0
  75. package/dist/cjs/tabs.js +214 -0
  76. package/dist/cjs/tag.js +70 -0
  77. package/dist/cjs/taginput.js +331 -0
  78. package/dist/cjs/timepicker.js +28 -0
  79. package/dist/cjs/toast.js +106 -0
  80. package/dist/cjs/tooltip.js +19 -0
  81. package/dist/cjs/trapFocus-261420b0.js +49 -0
  82. package/dist/cjs/upload.js +205 -0
  83. package/dist/components/autocomplete/index.js +1620 -0
  84. package/dist/components/autocomplete/index.min.js +2 -0
  85. package/dist/components/breadcrumb/index.js +297 -0
  86. package/dist/components/breadcrumb/index.min.js +2 -0
  87. package/dist/components/button/index.js +569 -0
  88. package/dist/components/button/index.min.js +2 -0
  89. package/dist/components/carousel/index.js +1629 -0
  90. package/dist/components/carousel/index.min.js +2 -0
  91. package/dist/components/checkbox/index.js +279 -0
  92. package/dist/components/checkbox/index.min.js +2 -0
  93. package/dist/components/clockpicker/index.js +3131 -0
  94. package/dist/components/clockpicker/index.min.js +2 -0
  95. package/dist/components/collapse/index.js +217 -0
  96. package/dist/components/collapse/index.min.js +2 -0
  97. package/dist/components/colorpicker/index.js +4249 -0
  98. package/dist/components/colorpicker/index.min.js +2 -0
  99. package/dist/components/datepicker/index.js +3845 -0
  100. package/dist/components/datepicker/index.min.js +2 -0
  101. package/dist/components/datetimepicker/index.js +4902 -0
  102. package/dist/components/datetimepicker/index.min.js +2 -0
  103. package/dist/components/dialog/index.js +1168 -0
  104. package/dist/components/dialog/index.min.js +2 -0
  105. package/dist/components/dropdown/index.js +1043 -0
  106. package/dist/components/dropdown/index.min.js +2 -0
  107. package/dist/components/field/index.js +511 -0
  108. package/dist/components/field/index.min.js +2 -0
  109. package/dist/components/icon/index.js +463 -0
  110. package/dist/components/icon/index.min.js +2 -0
  111. package/dist/components/image/index.js +513 -0
  112. package/dist/components/image/index.min.js +2 -0
  113. package/dist/components/input/index.js +862 -0
  114. package/dist/components/input/index.min.js +2 -0
  115. package/dist/components/loading/index.js +366 -0
  116. package/dist/components/loading/index.min.js +2 -0
  117. package/dist/components/menu/index.js +748 -0
  118. package/dist/components/menu/index.min.js +2 -0
  119. package/dist/components/message/index.js +650 -0
  120. package/dist/components/message/index.min.js +2 -0
  121. package/dist/components/modal/index.js +624 -0
  122. package/dist/components/modal/index.min.js +2 -0
  123. package/dist/components/navbar/index.js +805 -0
  124. package/dist/components/navbar/index.min.js +2 -0
  125. package/dist/components/notification/index.js +923 -0
  126. package/dist/components/notification/index.min.js +2 -0
  127. package/dist/components/numberinput/index.js +1119 -0
  128. package/dist/components/numberinput/index.min.js +2 -0
  129. package/dist/components/pagination/index.js +868 -0
  130. package/dist/components/pagination/index.min.js +2 -0
  131. package/dist/components/progress/index.js +621 -0
  132. package/dist/components/progress/index.min.js +2 -0
  133. package/dist/components/radio/index.js +260 -0
  134. package/dist/components/radio/index.min.js +2 -0
  135. package/dist/components/rate/index.js +600 -0
  136. package/dist/components/rate/index.min.js +2 -0
  137. package/dist/components/select/index.js +715 -0
  138. package/dist/components/select/index.min.js +2 -0
  139. package/dist/components/sidebar/index.js +467 -0
  140. package/dist/components/sidebar/index.min.js +2 -0
  141. package/dist/components/skeleton/index.js +200 -0
  142. package/dist/components/skeleton/index.min.js +2 -0
  143. package/dist/components/slider/index.js +1264 -0
  144. package/dist/components/slider/index.min.js +2 -0
  145. package/dist/components/snackbar/index.js +527 -0
  146. package/dist/components/snackbar/index.min.js +2 -0
  147. package/dist/components/steps/index.js +1180 -0
  148. package/dist/components/steps/index.min.js +2 -0
  149. package/dist/components/switch/index.js +297 -0
  150. package/dist/components/switch/index.min.js +2 -0
  151. package/dist/components/table/index.js +3480 -0
  152. package/dist/components/table/index.min.js +2 -0
  153. package/dist/components/tabs/index.js +1116 -0
  154. package/dist/components/tabs/index.min.js +2 -0
  155. package/dist/components/tag/index.js +307 -0
  156. package/dist/components/tag/index.min.js +2 -0
  157. package/dist/components/taginput/index.js +2104 -0
  158. package/dist/components/taginput/index.min.js +2 -0
  159. package/dist/components/timepicker/index.js +2843 -0
  160. package/dist/components/timepicker/index.min.js +2 -0
  161. package/dist/components/toast/index.js +501 -0
  162. package/dist/components/toast/index.min.js +2 -0
  163. package/dist/components/tooltip/index.js +630 -0
  164. package/dist/components/tooltip/index.min.js +2 -0
  165. package/dist/components/upload/index.js +525 -0
  166. package/dist/components/upload/index.min.js +2 -0
  167. package/dist/esm/Autocomplete-1a6e8770.js +671 -0
  168. package/dist/esm/Button-521f6efc.js +112 -0
  169. package/dist/esm/CheckRadioMixin-e726a83c.js +43 -0
  170. package/dist/esm/Checkbox-1d02686e.js +68 -0
  171. package/dist/esm/Datepicker-0ae1e826.js +1677 -0
  172. package/dist/esm/DropdownItem-55682322.js +556 -0
  173. package/dist/esm/Field-3ceba31e.js +313 -0
  174. package/dist/esm/FormElementMixin-b223d3c7.js +161 -0
  175. package/dist/esm/Icon-60d47b31.js +187 -0
  176. package/dist/esm/Image-75808acb.js +297 -0
  177. package/dist/esm/InjectedChildMixin-b4220787.js +130 -0
  178. package/dist/esm/Input-20612b63.js +246 -0
  179. package/dist/esm/Loading-ae028ea5.js +148 -0
  180. package/dist/esm/MessageMixin-d577a9f5.js +144 -0
  181. package/dist/esm/Modal-7da7641f.js +276 -0
  182. package/dist/esm/NoticeMixin-bd6f61d9.js +152 -0
  183. package/dist/esm/Pagination-68f12c1e.js +409 -0
  184. package/dist/esm/Select-97781d4e.js +98 -0
  185. package/dist/esm/SlotComponent-8871a20f.js +51 -0
  186. package/dist/esm/TabbedChildMixin-bcb13767.js +219 -0
  187. package/dist/esm/Tag-6365aa46.js +152 -0
  188. package/dist/esm/Timepicker-38480bbc.js +65 -0
  189. package/dist/esm/TimepickerMixin-d736b0a9.js +659 -0
  190. package/dist/esm/Tooltip-d98a769c.js +368 -0
  191. package/dist/esm/_rollupPluginBabelHelpers-df313029.js +350 -0
  192. package/dist/esm/autocomplete.js +18 -0
  193. package/dist/esm/breadcrumb.js +133 -0
  194. package/dist/esm/button.js +16 -0
  195. package/dist/esm/carousel.js +655 -0
  196. package/dist/esm/checkbox.js +81 -0
  197. package/dist/esm/clockpicker.js +456 -0
  198. package/dist/esm/collapse.js +123 -0
  199. package/dist/esm/colorpicker.js +14 -0
  200. package/dist/esm/config-e7d4b9c2.js +78 -0
  201. package/dist/esm/config.js +14 -0
  202. package/dist/esm/datepicker.js +23 -0
  203. package/dist/esm/datetimepicker.js +372 -0
  204. package/dist/esm/dialog.js +302 -0
  205. package/dist/esm/dropdown.js +18 -0
  206. package/dist/esm/field.js +14 -0
  207. package/dist/esm/helpers.js +348 -0
  208. package/dist/esm/icon.js +15 -0
  209. package/dist/esm/image.js +15 -0
  210. package/dist/esm/index-903f63ea.js +1629 -0
  211. package/dist/esm/index.js +182 -0
  212. package/dist/esm/input.js +17 -0
  213. package/dist/esm/loading.js +33 -0
  214. package/dist/esm/menu.js +297 -0
  215. package/dist/esm/message.js +62 -0
  216. package/dist/esm/modal.js +54 -0
  217. package/dist/esm/navbar.js +672 -0
  218. package/dist/esm/notification.js +175 -0
  219. package/dist/esm/numberinput.js +273 -0
  220. package/dist/esm/pagination.js +17 -0
  221. package/dist/esm/plugins-218aea86.js +89 -0
  222. package/dist/esm/progress.js +233 -0
  223. package/dist/esm/radio.js +124 -0
  224. package/dist/esm/rate.js +151 -0
  225. package/dist/esm/select.js +17 -0
  226. package/dist/esm/sidebar.js +298 -0
  227. package/dist/esm/skeleton.js +106 -0
  228. package/dist/esm/slider.js +597 -0
  229. package/dist/esm/snackbar.js +126 -0
  230. package/dist/esm/ssr-b847d137.js +7 -0
  231. package/dist/esm/steps.js +272 -0
  232. package/dist/esm/switch.js +134 -0
  233. package/dist/esm/table.js +1689 -0
  234. package/dist/esm/tabs.js +208 -0
  235. package/dist/esm/tag.js +65 -0
  236. package/dist/esm/taginput.js +326 -0
  237. package/dist/esm/timepicker.js +24 -0
  238. package/dist/esm/toast.js +100 -0
  239. package/dist/esm/tooltip.js +15 -0
  240. package/dist/esm/trapFocus-f0736873.js +47 -0
  241. package/dist/esm/upload.js +200 -0
  242. package/dist/vetur/attributes.json +3238 -0
  243. package/dist/vetur/tags.json +1183 -0
  244. package/package.json +3 -3
  245. package/src/components/autocomplete/Autocomplete.spec.js +16 -0
  246. package/src/components/autocomplete/Autocomplete.vue +9 -3
  247. package/src/components/colorpicker/ColorpickerHSLRepresentationSquare.vue +2 -0
  248. package/src/components/colorpicker/ColorpickerHSLRepresentationTriangle.vue +2 -0
  249. package/src/components/dropdown/Dropdown.vue +51 -3
  250. package/src/components/numberinput/Numberinput.vue +4 -0
  251. package/src/components/sidebar/Sidebar.vue +1 -0
  252. package/src/components/slider/Slider.vue +7 -2
  253. package/src/components/slider/SliderThumb.vue +8 -0
  254. package/src/components/table/Table.vue +4 -1
  255. package/src/components/table/TableColumn.spec.js +51 -0
  256. package/src/components/table/TableColumn.vue +8 -1
  257. package/src/components/taginput/Taginput.vue +7 -2
  258. package/src/components/tooltip/Tooltip.vue +10 -3
  259. package/src/scss/components/_dropdown.scss +4 -2
@@ -0,0 +1,1264 @@
1
+ /*! Buefy v0.9.28 | MIT License | github.com/buefy/buefy */
2
+ (function (global, factory) {
3
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
4
+ typeof define === 'function' && define.amd ? define(['exports'], factory) :
5
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Slider = {}));
6
+ })(this, (function (exports) { 'use strict';
7
+
8
+ function _toPrimitive(t, r) {
9
+ if ("object" != typeof t || !t) return t;
10
+ var e = t[Symbol.toPrimitive];
11
+ if (void 0 !== e) {
12
+ var i = e.call(t, r || "default");
13
+ if ("object" != typeof i) return i;
14
+ throw new TypeError("@@toPrimitive must return a primitive value.");
15
+ }
16
+ return ("string" === r ? String : Number)(t);
17
+ }
18
+ function _toPropertyKey(t) {
19
+ var i = _toPrimitive(t, "string");
20
+ return "symbol" == typeof i ? i : String(i);
21
+ }
22
+ function _typeof(o) {
23
+ "@babel/helpers - typeof";
24
+
25
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
26
+ return typeof o;
27
+ } : function (o) {
28
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
29
+ }, _typeof(o);
30
+ }
31
+ function _defineProperty(obj, key, value) {
32
+ key = _toPropertyKey(key);
33
+ if (key in obj) {
34
+ Object.defineProperty(obj, key, {
35
+ value: value,
36
+ enumerable: true,
37
+ configurable: true,
38
+ writable: true
39
+ });
40
+ } else {
41
+ obj[key] = value;
42
+ }
43
+ return obj;
44
+ }
45
+ function _toConsumableArray(arr) {
46
+ return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
47
+ }
48
+ function _arrayWithoutHoles(arr) {
49
+ if (Array.isArray(arr)) return _arrayLikeToArray(arr);
50
+ }
51
+ function _iterableToArray(iter) {
52
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
53
+ }
54
+ function _unsupportedIterableToArray(o, minLen) {
55
+ if (!o) return;
56
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
57
+ var n = Object.prototype.toString.call(o).slice(8, -1);
58
+ if (n === "Object" && o.constructor) n = o.constructor.name;
59
+ if (n === "Map" || n === "Set") return Array.from(o);
60
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
61
+ }
62
+ function _arrayLikeToArray(arr, len) {
63
+ if (len == null || len > arr.length) len = arr.length;
64
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
65
+ return arr2;
66
+ }
67
+ function _nonIterableSpread() {
68
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
69
+ }
70
+ function _createForOfIteratorHelper(o, allowArrayLike) {
71
+ var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
72
+ if (!it) {
73
+ if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
74
+ if (it) o = it;
75
+ var i = 0;
76
+ var F = function () {};
77
+ return {
78
+ s: F,
79
+ n: function () {
80
+ if (i >= o.length) return {
81
+ done: true
82
+ };
83
+ return {
84
+ done: false,
85
+ value: o[i++]
86
+ };
87
+ },
88
+ e: function (e) {
89
+ throw e;
90
+ },
91
+ f: F
92
+ };
93
+ }
94
+ throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
95
+ }
96
+ var normalCompletion = true,
97
+ didErr = false,
98
+ err;
99
+ return {
100
+ s: function () {
101
+ it = it.call(o);
102
+ },
103
+ n: function () {
104
+ var step = it.next();
105
+ normalCompletion = step.done;
106
+ return step;
107
+ },
108
+ e: function (e) {
109
+ didErr = true;
110
+ err = e;
111
+ },
112
+ f: function () {
113
+ try {
114
+ if (!normalCompletion && it.return != null) it.return();
115
+ } finally {
116
+ if (didErr) throw err;
117
+ }
118
+ }
119
+ };
120
+ }
121
+
122
+ var config = {
123
+ defaultContainerElement: null,
124
+ defaultIconPack: 'mdi',
125
+ defaultIconComponent: null,
126
+ defaultIconPrev: 'chevron-left',
127
+ defaultIconNext: 'chevron-right',
128
+ defaultLocale: undefined,
129
+ defaultDialogConfirmText: null,
130
+ defaultDialogCancelText: null,
131
+ defaultSnackbarDuration: 3500,
132
+ defaultSnackbarPosition: null,
133
+ defaultToastDuration: 2000,
134
+ defaultToastPosition: null,
135
+ defaultNotificationDuration: 2000,
136
+ defaultNotificationPosition: null,
137
+ defaultTooltipType: 'is-primary',
138
+ defaultTooltipDelay: null,
139
+ defaultTooltipCloseDelay: null,
140
+ defaultSidebarDelay: null,
141
+ defaultInputAutocomplete: 'on',
142
+ defaultDateFormatter: null,
143
+ defaultDateParser: null,
144
+ defaultDateCreator: null,
145
+ defaultTimeCreator: null,
146
+ defaultDayNames: null,
147
+ defaultMonthNames: null,
148
+ defaultFirstDayOfWeek: null,
149
+ defaultUnselectableDaysOfWeek: null,
150
+ defaultTimeFormatter: null,
151
+ defaultTimeParser: null,
152
+ defaultModalCanCancel: ['escape', 'x', 'outside', 'button'],
153
+ defaultModalScroll: null,
154
+ defaultDatepickerMobileNative: true,
155
+ defaultTimepickerMobileNative: true,
156
+ defaultTimepickerMobileModal: true,
157
+ defaultNoticeQueue: true,
158
+ defaultInputHasCounter: true,
159
+ defaultTaginputHasCounter: true,
160
+ defaultUseHtml5Validation: true,
161
+ defaultDropdownMobileModal: true,
162
+ defaultFieldLabelPosition: null,
163
+ defaultDatepickerYearsRange: [-100, 10],
164
+ defaultDatepickerNearbyMonthDays: true,
165
+ defaultDatepickerNearbySelectableMonthDays: false,
166
+ defaultDatepickerShowWeekNumber: false,
167
+ defaultDatepickerWeekNumberClickable: false,
168
+ defaultDatepickerMobileModal: true,
169
+ defaultTrapFocus: true,
170
+ defaultAutoFocus: true,
171
+ defaultButtonRounded: false,
172
+ defaultSwitchRounded: true,
173
+ defaultCarouselInterval: 3500,
174
+ defaultTabsExpanded: false,
175
+ defaultTabsAnimated: true,
176
+ defaultTabsType: null,
177
+ defaultStatusIcon: true,
178
+ defaultProgrammaticPromise: false,
179
+ defaultLinkTags: ['a', 'button', 'input', 'router-link', 'nuxt-link', 'n-link', 'RouterLink', 'NuxtLink', 'NLink'],
180
+ defaultImageWebpFallback: null,
181
+ defaultImageLazy: true,
182
+ defaultImageResponsive: true,
183
+ defaultImageRatio: null,
184
+ defaultImageSrcsetFormatter: null,
185
+ defaultBreadcrumbTag: 'a',
186
+ defaultBreadcrumbAlign: 'is-left',
187
+ defaultBreadcrumbSeparator: '',
188
+ defaultBreadcrumbSize: 'is-medium',
189
+ customIconPacks: null
190
+ };
191
+
192
+ /**
193
+ * Asserts a value is beetween min and max
194
+ * @param val
195
+ * @param min
196
+ * @param max
197
+ * @returns {number}
198
+ */
199
+ function bound(val, min, max) {
200
+ return Math.max(min, Math.min(max, val));
201
+ }
202
+ function removeElement(el) {
203
+ if (typeof el.remove !== 'undefined') {
204
+ el.remove();
205
+ } else if (typeof el.parentNode !== 'undefined' && el.parentNode !== null) {
206
+ el.parentNode.removeChild(el);
207
+ }
208
+ }
209
+ function createAbsoluteElement(el) {
210
+ var root = document.createElement('div');
211
+ root.style.position = 'absolute';
212
+ root.style.left = '0px';
213
+ root.style.top = '0px';
214
+ root.style.width = '100%';
215
+ var wrapper = document.createElement('div');
216
+ root.appendChild(wrapper);
217
+ wrapper.appendChild(el);
218
+ document.body.appendChild(root);
219
+ return root;
220
+ }
221
+
222
+ var script$3 = {
223
+ name: 'BTooltip',
224
+ props: {
225
+ active: {
226
+ type: Boolean,
227
+ default: true
228
+ },
229
+ type: {
230
+ type: String,
231
+ default: function _default() {
232
+ return config.defaultTooltipType;
233
+ }
234
+ },
235
+ label: String,
236
+ delay: {
237
+ type: Number,
238
+ default: function _default() {
239
+ return config.defaultTooltipDelay;
240
+ }
241
+ },
242
+ closeDelay: {
243
+ type: Number,
244
+ default: function _default() {
245
+ return config.defaultTooltipCloseDelay;
246
+ }
247
+ },
248
+ position: {
249
+ type: String,
250
+ default: 'is-top',
251
+ validator: function validator(value) {
252
+ return ['is-top', 'is-bottom', 'is-left', 'is-right'].indexOf(value) > -1;
253
+ }
254
+ },
255
+ triggers: {
256
+ type: Array,
257
+ default: function _default() {
258
+ return ['hover'];
259
+ }
260
+ },
261
+ always: Boolean,
262
+ square: Boolean,
263
+ dashed: Boolean,
264
+ multilined: Boolean,
265
+ size: {
266
+ type: String,
267
+ default: 'is-medium'
268
+ },
269
+ appendToBody: Boolean,
270
+ animated: {
271
+ type: Boolean,
272
+ default: true
273
+ },
274
+ animation: {
275
+ type: String,
276
+ default: 'fade'
277
+ },
278
+ contentClass: String,
279
+ autoClose: {
280
+ type: [Array, Boolean],
281
+ default: true
282
+ }
283
+ },
284
+ data: function data() {
285
+ return {
286
+ isActive: false,
287
+ triggerStyle: {},
288
+ timer: null,
289
+ _bodyEl: undefined,
290
+ // Used to append to body
291
+ resizeObserver: undefined,
292
+ resizeListener: undefined,
293
+ timeOutID: null
294
+ };
295
+ },
296
+ computed: {
297
+ rootClasses: function rootClasses() {
298
+ return ['b-tooltip', this.type, this.position, this.size, {
299
+ 'is-square': this.square,
300
+ 'is-always': this.always,
301
+ 'is-multiline': this.multilined,
302
+ 'is-dashed': this.dashed
303
+ }];
304
+ },
305
+ newAnimation: function newAnimation() {
306
+ return this.animated ? this.animation : undefined;
307
+ }
308
+ },
309
+ watch: {
310
+ isActive: function isActive() {
311
+ this.$emit(this.isActive ? 'open' : 'close');
312
+ if (this.appendToBody) {
313
+ this.updateAppendToBody();
314
+ }
315
+ }
316
+ },
317
+ methods: {
318
+ updateAppendToBody: function updateAppendToBody() {
319
+ var tooltip = this.$refs.tooltip;
320
+ var trigger = this.$refs.trigger;
321
+ if (tooltip && trigger) {
322
+ // update wrapper tooltip
323
+ var tooltipEl = this.$data._bodyEl.children[0];
324
+ tooltipEl.classList.forEach(function (item) {
325
+ return tooltipEl.classList.remove(item);
326
+ });
327
+ if (this.$vnode && this.$vnode.data && this.$vnode.data.staticClass) {
328
+ tooltipEl.classList.add(this.$vnode.data.staticClass);
329
+ }
330
+ this.rootClasses.forEach(function (item) {
331
+ if (_typeof(item) === 'object') {
332
+ for (var key in item) {
333
+ if (item[key]) {
334
+ tooltipEl.classList.add(key);
335
+ }
336
+ }
337
+ } else {
338
+ tooltipEl.classList.add(item);
339
+ }
340
+ });
341
+ var rect = trigger.getBoundingClientRect();
342
+ var top = rect.top + window.scrollY;
343
+ var left = rect.left + window.scrollX;
344
+
345
+ // `tooltipEl` will be placed relative to `wrapper`
346
+ // because `wrapper` should create a stacking context
347
+ // as its z-index is non-auto
348
+ tooltipEl.style.position = 'absolute';
349
+ switch (this.position) {
350
+ case 'is-top':
351
+ tooltipEl.style.width = "".concat(trigger.clientWidth, "px");
352
+ tooltipEl.style.height = '0px';
353
+ tooltipEl.style.top = '0px';
354
+ tooltipEl.style.left = '0px';
355
+ break;
356
+ case 'is-bottom':
357
+ tooltipEl.style.width = "".concat(trigger.clientWidth, "px");
358
+ tooltipEl.style.height = '0px';
359
+ tooltipEl.style.top = "".concat(trigger.clientHeight, "px");
360
+ tooltipEl.style.left = '0px';
361
+ break;
362
+ case 'is-left':
363
+ tooltipEl.style.width = '0px';
364
+ tooltipEl.style.height = "".concat(trigger.clientHeight, "px");
365
+ tooltipEl.style.top = '0px';
366
+ tooltipEl.style.left = '0px';
367
+ break;
368
+ case 'is-right':
369
+ tooltipEl.style.width = '0px';
370
+ tooltipEl.style.height = "".concat(trigger.clientHeight, "px");
371
+ tooltipEl.style.top = '0px';
372
+ tooltipEl.style.left = "".concat(trigger.clientWidth, "px");
373
+ break;
374
+ }
375
+ var wrapper = this.$data._bodyEl;
376
+ wrapper.style.position = 'absolute';
377
+ wrapper.style.top = "".concat(top, "px");
378
+ wrapper.style.left = "".concat(left, "px");
379
+ wrapper.style.width = '0px';
380
+ wrapper.style.zIndex = this.isActive || this.always ? '99' : '-1';
381
+ this.triggerStyle = {
382
+ zIndex: this.isActive || this.always ? '100' : undefined
383
+ };
384
+ }
385
+ },
386
+ onClick: function onClick() {
387
+ var _this = this;
388
+ if (this.triggers.indexOf('click') < 0) return;
389
+ // if not active, toggle after clickOutside event
390
+ // this fixes toggling programmatic
391
+ this.$nextTick(function () {
392
+ _this.timeOutID = setTimeout(function () {
393
+ return _this.open();
394
+ });
395
+ });
396
+ },
397
+ onHover: function onHover() {
398
+ if (this.triggers.indexOf('hover') < 0) return;
399
+ this.open();
400
+ },
401
+ onContextMenu: function onContextMenu(e) {
402
+ if (this.triggers.indexOf('contextmenu') < 0) return;
403
+ e.preventDefault();
404
+ this.open();
405
+ },
406
+ onFocus: function onFocus() {
407
+ if (this.triggers.indexOf('focus') < 0) return;
408
+ this.open();
409
+ },
410
+ open: function open() {
411
+ var _this2 = this;
412
+ if (this.delay) {
413
+ this.timer = setTimeout(function () {
414
+ _this2.isActive = true;
415
+ _this2.timer = null;
416
+ }, this.delay);
417
+ } else {
418
+ this.isActive = true;
419
+ }
420
+ },
421
+ close: function close() {
422
+ var _this3 = this;
423
+ if (typeof this.autoClose === 'boolean') {
424
+ if (this.autoClose && this.timer) clearTimeout(this.timer);
425
+ if (this.closeDelay) {
426
+ this.timer = setTimeout(function () {
427
+ _this3.isActive = !_this3.autoClose;
428
+ _this3.timer = null;
429
+ }, this.closeDelay);
430
+ } else {
431
+ this.isActive = !this.autoClose;
432
+ }
433
+ }
434
+ },
435
+ /**
436
+ * Close tooltip if clicked outside.
437
+ */
438
+ clickedOutside: function clickedOutside(event) {
439
+ if (this.isActive) {
440
+ if (Array.isArray(this.autoClose)) {
441
+ if (this.autoClose.includes('outside')) {
442
+ if (!this.isInWhiteList(event.target)) {
443
+ this.isActive = false;
444
+ return;
445
+ }
446
+ }
447
+ if (this.autoClose.includes('inside')) {
448
+ if (this.isInWhiteList(event.target)) this.isActive = false;
449
+ }
450
+ }
451
+ }
452
+ },
453
+ /**
454
+ * Keypress event that is bound to the document
455
+ */
456
+ keyPress: function keyPress(_ref) {
457
+ var key = _ref.key;
458
+ if (this.isActive && (key === 'Escape' || key === 'Esc')) {
459
+ if (Array.isArray(this.autoClose)) {
460
+ if (this.autoClose.indexOf('escape') >= 0) this.isActive = false;
461
+ }
462
+ }
463
+ },
464
+ /**
465
+ * White-listed items to not close when clicked.
466
+ */
467
+ isInWhiteList: function isInWhiteList(el) {
468
+ if (el === this.$refs.content) return true;
469
+ // All chidren from content
470
+ if (this.$refs.content !== undefined) {
471
+ var children = this.$refs.content.querySelectorAll('*');
472
+ var _iterator = _createForOfIteratorHelper(children),
473
+ _step;
474
+ try {
475
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
476
+ var child = _step.value;
477
+ if (el === child) {
478
+ return true;
479
+ }
480
+ }
481
+ } catch (err) {
482
+ _iterator.e(err);
483
+ } finally {
484
+ _iterator.f();
485
+ }
486
+ }
487
+ return false;
488
+ }
489
+ },
490
+ mounted: function mounted() {
491
+ var _this4 = this;
492
+ this.controller = new window.AbortController();
493
+ if (this.appendToBody && typeof window !== 'undefined') {
494
+ this.$data._bodyEl = createAbsoluteElement(this.$refs.content);
495
+ this.updateAppendToBody();
496
+ // updates the tooltip position if the tooltip is inside
497
+ // `.animation-content`
498
+ var animation = this.$el.closest('.animation-content');
499
+ if (animation != null) {
500
+ var listener = function listener() {
501
+ _this4.updateAppendToBody();
502
+ animation.removeEventListener('transitionend', listener);
503
+ };
504
+ animation.addEventListener('transitionend', listener, {
505
+ signal: this.controller.signal
506
+ });
507
+ }
508
+ // observes changes in the window size
509
+ this.resizeListener = function () {
510
+ return _this4.updateAppendToBody();
511
+ };
512
+ window.addEventListener('resize', this.resizeListener);
513
+ // observes changes in the size of the immediate parent
514
+ this.resizeObserver = new ResizeObserver(this.resizeListener);
515
+ if (this.$el.parentNode != null && this.$el.parentNode.nodeType === Node.ELEMENT_NODE) {
516
+ this.resizeObserver.observe(this.$el.parentNode);
517
+ }
518
+ }
519
+ },
520
+ created: function created() {
521
+ if (typeof window !== 'undefined') {
522
+ document.addEventListener('click', this.clickedOutside);
523
+ document.addEventListener('keyup', this.keyPress);
524
+ }
525
+ },
526
+ beforeDestroy: function beforeDestroy() {
527
+ if (typeof window !== 'undefined') {
528
+ document.removeEventListener('click', this.clickedOutside);
529
+ document.removeEventListener('keyup', this.keyPress);
530
+ }
531
+ if (this.resizeListener != null) {
532
+ window.removeEventListener('resize', this.resizeListener);
533
+ }
534
+ if (this.resizeObserver != null) {
535
+ this.resizeObserver.disconnect();
536
+ }
537
+ if (this.appendToBody) {
538
+ removeElement(this.$data._bodyEl);
539
+ }
540
+ this.controller.abort();
541
+ clearTimeout(this.timer);
542
+ clearTimeout(this.timeOutID);
543
+ }
544
+ };
545
+
546
+ function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier /* server only */, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {
547
+ if (typeof shadowMode !== 'boolean') {
548
+ createInjectorSSR = createInjector;
549
+ createInjector = shadowMode;
550
+ shadowMode = false;
551
+ }
552
+ // Vue.extend constructor export interop.
553
+ const options = typeof script === 'function' ? script.options : script;
554
+ // render functions
555
+ if (template && template.render) {
556
+ options.render = template.render;
557
+ options.staticRenderFns = template.staticRenderFns;
558
+ options._compiled = true;
559
+ // functional template
560
+ if (isFunctionalTemplate) {
561
+ options.functional = true;
562
+ }
563
+ }
564
+ // scopedId
565
+ if (scopeId) {
566
+ options._scopeId = scopeId;
567
+ }
568
+ let hook;
569
+ if (moduleIdentifier) {
570
+ // server build
571
+ hook = function (context) {
572
+ // 2.3 injection
573
+ context =
574
+ context || // cached call
575
+ (this.$vnode && this.$vnode.ssrContext) || // stateful
576
+ (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext); // functional
577
+ // 2.2 with runInNewContext: true
578
+ if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
579
+ context = __VUE_SSR_CONTEXT__;
580
+ }
581
+ // inject component styles
582
+ if (style) {
583
+ style.call(this, createInjectorSSR(context));
584
+ }
585
+ // register component module identifier for async chunk inference
586
+ if (context && context._registeredComponents) {
587
+ context._registeredComponents.add(moduleIdentifier);
588
+ }
589
+ };
590
+ // used by ssr in case component is cached and beforeCreate
591
+ // never gets called
592
+ options._ssrRegister = hook;
593
+ }
594
+ else if (style) {
595
+ hook = shadowMode
596
+ ? function (context) {
597
+ style.call(this, createInjectorShadow(context, this.$root.$options.shadowRoot));
598
+ }
599
+ : function (context) {
600
+ style.call(this, createInjector(context));
601
+ };
602
+ }
603
+ if (hook) {
604
+ if (options.functional) {
605
+ // register for functional component in vue file
606
+ const originalRender = options.render;
607
+ options.render = function renderWithStyleInjection(h, context) {
608
+ hook.call(context);
609
+ return originalRender(h, context);
610
+ };
611
+ }
612
+ else {
613
+ // inject component registration as beforeCreate hook
614
+ const existing = options.beforeCreate;
615
+ options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
616
+ }
617
+ }
618
+ return script;
619
+ }
620
+
621
+ /* script */
622
+ const __vue_script__$3 = script$3;
623
+
624
+ /* template */
625
+ var __vue_render__$3 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{ref:"tooltip",class:_vm.rootClasses},[_c('transition',{attrs:{"name":_vm.newAnimation}},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.active && (_vm.isActive || _vm.always)),expression:"active && (isActive || always)"}],ref:"content",class:['tooltip-content', _vm.contentClass]},[(_vm.label)?[_vm._v(_vm._s(_vm.label))]:(_vm.$slots.content)?[_vm._t("content")]:_vm._e()],2)]),_c('div',{ref:"trigger",staticClass:"tooltip-trigger",style:(_vm.triggerStyle),on:{"click":_vm.onClick,"contextmenu":_vm.onContextMenu,"mouseenter":_vm.onHover,"!focus":function($event){return _vm.onFocus($event)},"!blur":function($event){return _vm.close($event)},"mouseleave":_vm.close}},[_vm._t("default")],2)],1)};
626
+ var __vue_staticRenderFns__$3 = [];
627
+
628
+ /* style */
629
+ const __vue_inject_styles__$3 = undefined;
630
+ /* scoped */
631
+ const __vue_scope_id__$3 = undefined;
632
+ /* module identifier */
633
+ const __vue_module_identifier__$3 = undefined;
634
+ /* functional template */
635
+ const __vue_is_functional_template__$3 = false;
636
+ /* style inject */
637
+
638
+ /* style inject SSR */
639
+
640
+ /* style inject shadow dom */
641
+
642
+
643
+
644
+ const __vue_component__$3 = /*#__PURE__*/normalizeComponent(
645
+ { render: __vue_render__$3, staticRenderFns: __vue_staticRenderFns__$3 },
646
+ __vue_inject_styles__$3,
647
+ __vue_script__$3,
648
+ __vue_scope_id__$3,
649
+ __vue_is_functional_template__$3,
650
+ __vue_module_identifier__$3,
651
+ false,
652
+ undefined,
653
+ undefined,
654
+ undefined
655
+ );
656
+
657
+ var Tooltip = __vue_component__$3;
658
+
659
+ var script$2 = {
660
+ name: 'BSliderThumb',
661
+ components: _defineProperty({}, Tooltip.name, Tooltip),
662
+ inheritAttrs: false,
663
+ props: {
664
+ value: {
665
+ type: Number,
666
+ default: 0
667
+ },
668
+ type: {
669
+ type: String,
670
+ default: ''
671
+ },
672
+ tooltip: {
673
+ type: Boolean,
674
+ default: true
675
+ },
676
+ indicator: {
677
+ type: Boolean,
678
+ default: false
679
+ },
680
+ customFormatter: Function,
681
+ format: {
682
+ type: String,
683
+ default: 'raw',
684
+ validator: function validator(value) {
685
+ return ['raw', 'percent'].indexOf(value) >= 0;
686
+ }
687
+ },
688
+ locale: {
689
+ type: [String, Array],
690
+ default: function _default() {
691
+ return config.defaultLocale;
692
+ }
693
+ },
694
+ tooltipAlways: {
695
+ type: Boolean,
696
+ default: false
697
+ }
698
+ },
699
+ data: function data() {
700
+ return {
701
+ isFocused: false,
702
+ dragging: false,
703
+ startX: 0,
704
+ startPosition: 0,
705
+ newPosition: null,
706
+ oldValue: this.value
707
+ };
708
+ },
709
+ computed: {
710
+ disabled: function disabled() {
711
+ return this.$parent.disabled;
712
+ },
713
+ max: function max() {
714
+ return this.$parent.max;
715
+ },
716
+ min: function min() {
717
+ return this.$parent.min;
718
+ },
719
+ step: function step() {
720
+ return this.$parent.step;
721
+ },
722
+ precision: function precision() {
723
+ return this.$parent.precision;
724
+ },
725
+ currentPosition: function currentPosition() {
726
+ return "".concat((this.value - this.min) / (this.max - this.min) * 100, "%");
727
+ },
728
+ wrapperStyle: function wrapperStyle() {
729
+ return {
730
+ left: this.currentPosition
731
+ };
732
+ },
733
+ formattedValue: function formattedValue() {
734
+ if (typeof this.customFormatter !== 'undefined') {
735
+ return this.customFormatter(this.value);
736
+ }
737
+ if (this.format === 'percent') {
738
+ return new Intl.NumberFormat(this.locale, {
739
+ style: 'percent'
740
+ }).format((this.value - this.min) / (this.max - this.min));
741
+ }
742
+ return new Intl.NumberFormat(this.locale).format(this.value);
743
+ }
744
+ },
745
+ methods: {
746
+ onFocus: function onFocus() {
747
+ this.isFocused = true;
748
+ },
749
+ onBlur: function onBlur() {
750
+ this.isFocused = false;
751
+ },
752
+ onButtonDown: function onButtonDown(event) {
753
+ if (this.disabled) return;
754
+ event.preventDefault();
755
+ this.onDragStart(event);
756
+ if (typeof window !== 'undefined') {
757
+ document.addEventListener('mousemove', this.onDragging);
758
+ document.addEventListener('touchmove', this.onDragging);
759
+ document.addEventListener('mouseup', this.onDragEnd);
760
+ document.addEventListener('touchend', this.onDragEnd);
761
+ document.addEventListener('contextmenu', this.onDragEnd);
762
+ }
763
+ },
764
+ onLeftKeyDown: function onLeftKeyDown() {
765
+ if (this.disabled || this.value === this.min) return;
766
+ this.newPosition = parseFloat(this.currentPosition) - this.step / (this.max - this.min) * 100;
767
+ this.setPosition(this.newPosition);
768
+ this.$parent.emitValue('change');
769
+ },
770
+ onRightKeyDown: function onRightKeyDown() {
771
+ if (this.disabled || this.value === this.max) return;
772
+ this.newPosition = parseFloat(this.currentPosition) + this.step / (this.max - this.min) * 100;
773
+ this.setPosition(this.newPosition);
774
+ this.$parent.emitValue('change');
775
+ },
776
+ onHomeKeyDown: function onHomeKeyDown() {
777
+ if (this.disabled || this.value === this.min) return;
778
+ this.newPosition = 0;
779
+ this.setPosition(this.newPosition);
780
+ this.$parent.emitValue('change');
781
+ },
782
+ onEndKeyDown: function onEndKeyDown() {
783
+ if (this.disabled || this.value === this.max) return;
784
+ this.newPosition = 100;
785
+ this.setPosition(this.newPosition);
786
+ this.$parent.emitValue('change');
787
+ },
788
+ onDragStart: function onDragStart(event) {
789
+ this.dragging = true;
790
+ this.$emit('dragstart');
791
+ if (event.type === 'touchstart') {
792
+ event.clientX = event.touches[0].clientX;
793
+ }
794
+ this.startX = event.clientX;
795
+ this.startPosition = parseFloat(this.currentPosition);
796
+ this.newPosition = this.startPosition;
797
+ },
798
+ onDragging: function onDragging(event) {
799
+ if (this.dragging) {
800
+ if (event.type === 'touchmove') {
801
+ event.clientX = event.touches[0].clientX;
802
+ }
803
+ var diff = (event.clientX - this.startX) / this.$parent.sliderSize() * 100;
804
+ this.newPosition = this.startPosition + diff;
805
+ this.setPosition(this.newPosition);
806
+ }
807
+ },
808
+ onDragEnd: function onDragEnd() {
809
+ this.dragging = false;
810
+ this.$emit('dragend');
811
+ if (this.value !== this.oldValue) {
812
+ this.$parent.emitValue('change');
813
+ }
814
+ this.setPosition(this.newPosition);
815
+ if (typeof window !== 'undefined') {
816
+ document.removeEventListener('mousemove', this.onDragging);
817
+ document.removeEventListener('touchmove', this.onDragging);
818
+ document.removeEventListener('mouseup', this.onDragEnd);
819
+ document.removeEventListener('touchend', this.onDragEnd);
820
+ document.removeEventListener('contextmenu', this.onDragEnd);
821
+ }
822
+ },
823
+ setPosition: function setPosition(percent) {
824
+ if (percent === null || isNaN(percent)) return;
825
+ if (percent < 0) {
826
+ percent = 0;
827
+ } else if (percent > 100) {
828
+ percent = 100;
829
+ }
830
+ var stepLength = 100 / ((this.max - this.min) / this.step);
831
+ var steps = Math.round(percent / stepLength);
832
+ var value = steps * stepLength / 100 * (this.max - this.min) + this.min;
833
+ value = parseFloat(value.toFixed(this.precision));
834
+ this.$emit('input', value);
835
+ if (!this.dragging && value !== this.oldValue) {
836
+ this.oldValue = value;
837
+ }
838
+ }
839
+ },
840
+ beforeDestroy: function beforeDestroy() {
841
+ document.removeEventListener('mousemove', this.onDragging);
842
+ document.removeEventListener('touchmove', this.onDragging);
843
+ document.removeEventListener('mouseup', this.onDragEnd);
844
+ document.removeEventListener('touchend', this.onDragEnd);
845
+ document.removeEventListener('contextmenu', this.onDragEnd);
846
+ }
847
+ };
848
+
849
+ /* script */
850
+ const __vue_script__$2 = script$2;
851
+
852
+ /* template */
853
+ var __vue_render__$2 = 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, 'has-indicator': _vm.indicator},style:(_vm.wrapperStyle)},[_c('b-tooltip',{attrs:{"label":_vm.formattedValue,"type":_vm.type,"always":_vm.dragging || _vm.isFocused || _vm.tooltipAlways,"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(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"left",37,$event.key,["Left","ArrowLeft"])){ return null; }if('button' in $event && $event.button !== 0){ return null; }$event.preventDefault();return _vm.onLeftKeyDown($event)},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"right",39,$event.key,["Right","ArrowRight"])){ return null; }if('button' in $event && $event.button !== 2){ return null; }$event.preventDefault();return _vm.onRightKeyDown($event)},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"down",40,$event.key,["Down","ArrowDown"])){ return null; }$event.preventDefault();return _vm.onLeftKeyDown($event)},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"up",38,$event.key,["Up","ArrowUp"])){ return null; }$event.preventDefault();return _vm.onRightKeyDown($event)},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"home",undefined,$event.key,undefined)){ return null; }$event.preventDefault();return _vm.onHomeKeyDown($event)},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"end",undefined,$event.key,undefined)){ return null; }$event.preventDefault();return _vm.onEndKeyDown($event)}]}},'div',_vm.$attrs,false),[(_vm.indicator)?_c('span',[_vm._v(_vm._s(_vm.formattedValue))]):_vm._e()])])],1)};
854
+ var __vue_staticRenderFns__$2 = [];
855
+
856
+ /* style */
857
+ const __vue_inject_styles__$2 = undefined;
858
+ /* scoped */
859
+ const __vue_scope_id__$2 = undefined;
860
+ /* module identifier */
861
+ const __vue_module_identifier__$2 = undefined;
862
+ /* functional template */
863
+ const __vue_is_functional_template__$2 = false;
864
+ /* style inject */
865
+
866
+ /* style inject SSR */
867
+
868
+ /* style inject shadow dom */
869
+
870
+
871
+
872
+ const __vue_component__$2 = /*#__PURE__*/normalizeComponent(
873
+ { render: __vue_render__$2, staticRenderFns: __vue_staticRenderFns__$2 },
874
+ __vue_inject_styles__$2,
875
+ __vue_script__$2,
876
+ __vue_scope_id__$2,
877
+ __vue_is_functional_template__$2,
878
+ __vue_module_identifier__$2,
879
+ false,
880
+ undefined,
881
+ undefined,
882
+ undefined
883
+ );
884
+
885
+ var SliderThumb = __vue_component__$2;
886
+
887
+ //
888
+ //
889
+ //
890
+ //
891
+ //
892
+ //
893
+ //
894
+ //
895
+ //
896
+ //
897
+ //
898
+
899
+ var script$1 = {
900
+ name: 'BSliderTick',
901
+ props: {
902
+ value: {
903
+ type: Number,
904
+ default: 0
905
+ }
906
+ },
907
+ computed: {
908
+ position: function position() {
909
+ var pos = (this.value - this.$parent.min) / (this.$parent.max - this.$parent.min) * 100;
910
+ return pos >= 0 && pos <= 100 ? pos : 0;
911
+ },
912
+ hidden: function hidden() {
913
+ return this.value === this.$parent.min || this.value === this.$parent.max;
914
+ }
915
+ },
916
+ methods: {
917
+ getTickStyle: function getTickStyle(position) {
918
+ return {
919
+ 'left': position + '%'
920
+ };
921
+ }
922
+ },
923
+ created: function created() {
924
+ if (!this.$parent.$data._isSlider) {
925
+ this.$destroy();
926
+ throw new Error('You should wrap bSliderTick on a bSlider');
927
+ }
928
+ }
929
+ };
930
+
931
+ /* script */
932
+ const __vue_script__$1 = script$1;
933
+
934
+ /* template */
935
+ 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()])};
936
+ var __vue_staticRenderFns__$1 = [];
937
+
938
+ /* style */
939
+ const __vue_inject_styles__$1 = undefined;
940
+ /* scoped */
941
+ const __vue_scope_id__$1 = undefined;
942
+ /* module identifier */
943
+ const __vue_module_identifier__$1 = undefined;
944
+ /* functional template */
945
+ const __vue_is_functional_template__$1 = false;
946
+ /* style inject */
947
+
948
+ /* style inject SSR */
949
+
950
+ /* style inject shadow dom */
951
+
952
+
953
+
954
+ const __vue_component__$1 = /*#__PURE__*/normalizeComponent(
955
+ { render: __vue_render__$1, staticRenderFns: __vue_staticRenderFns__$1 },
956
+ __vue_inject_styles__$1,
957
+ __vue_script__$1,
958
+ __vue_scope_id__$1,
959
+ __vue_is_functional_template__$1,
960
+ __vue_module_identifier__$1,
961
+ false,
962
+ undefined,
963
+ undefined,
964
+ undefined
965
+ );
966
+
967
+ var SliderTick = __vue_component__$1;
968
+
969
+ var script = {
970
+ name: 'BSlider',
971
+ components: _defineProperty(_defineProperty({}, SliderThumb.name, SliderThumb), SliderTick.name, SliderTick),
972
+ props: {
973
+ value: {
974
+ type: [Number, Array],
975
+ default: 0
976
+ },
977
+ min: {
978
+ type: Number,
979
+ default: 0
980
+ },
981
+ max: {
982
+ type: Number,
983
+ default: 100
984
+ },
985
+ step: {
986
+ type: Number,
987
+ default: 1
988
+ },
989
+ type: {
990
+ type: String,
991
+ default: 'is-primary'
992
+ },
993
+ size: String,
994
+ ticks: {
995
+ type: Boolean,
996
+ default: false
997
+ },
998
+ tooltip: {
999
+ type: Boolean,
1000
+ default: true
1001
+ },
1002
+ tooltipType: String,
1003
+ rounded: {
1004
+ type: Boolean,
1005
+ default: false
1006
+ },
1007
+ disabled: {
1008
+ type: Boolean,
1009
+ default: false
1010
+ },
1011
+ lazy: {
1012
+ type: Boolean,
1013
+ default: false
1014
+ },
1015
+ customFormatter: Function,
1016
+ ariaLabel: [String, Array],
1017
+ biggerSliderFocus: {
1018
+ type: Boolean,
1019
+ default: false
1020
+ },
1021
+ indicator: {
1022
+ type: Boolean,
1023
+ default: false
1024
+ },
1025
+ format: {
1026
+ type: String,
1027
+ default: 'raw',
1028
+ validator: function validator(value) {
1029
+ return ['raw', 'percent'].indexOf(value) >= 0;
1030
+ }
1031
+ },
1032
+ locale: {
1033
+ type: [String, Array],
1034
+ default: function _default() {
1035
+ return config.defaultLocale;
1036
+ }
1037
+ },
1038
+ tooltipAlways: {
1039
+ type: Boolean,
1040
+ default: false
1041
+ }
1042
+ },
1043
+ data: function data() {
1044
+ return {
1045
+ value1: null,
1046
+ value2: null,
1047
+ dragging: false,
1048
+ isRange: false,
1049
+ _isSlider: true,
1050
+ // Used by Thumb and Tick
1051
+ timeOutID: null
1052
+ };
1053
+ },
1054
+ computed: {
1055
+ newTooltipType: function newTooltipType() {
1056
+ return this.tooltipType ? this.tooltipType : this.type;
1057
+ },
1058
+ tickValues: function tickValues() {
1059
+ if (!this.ticks || this.min > this.max || this.step === 0) return [];
1060
+ var result = [];
1061
+ for (var i = this.min + this.step; i < this.max; i = i + this.step) {
1062
+ result.push(i);
1063
+ }
1064
+ return result;
1065
+ },
1066
+ minValue: function minValue() {
1067
+ return Math.min(this.value1, this.value2);
1068
+ },
1069
+ maxValue: function maxValue() {
1070
+ return Math.max(this.value1, this.value2);
1071
+ },
1072
+ barSize: function barSize() {
1073
+ return this.isRange ? "".concat(100 * (this.maxValue - this.minValue) / (this.max - this.min), "%") : "".concat(100 * (this.value1 - this.min) / (this.max - this.min), "%");
1074
+ },
1075
+ barStart: function barStart() {
1076
+ return this.isRange ? "".concat(100 * (this.minValue - this.min) / (this.max - this.min), "%") : '0%';
1077
+ },
1078
+ precision: function precision() {
1079
+ var precisions = [this.min, this.max, this.step].map(function (item) {
1080
+ var decimal = ('' + item).split('.')[1];
1081
+ return decimal ? decimal.length : 0;
1082
+ });
1083
+ return Math.max.apply(Math, _toConsumableArray(precisions));
1084
+ },
1085
+ barStyle: function barStyle() {
1086
+ return {
1087
+ width: this.barSize,
1088
+ left: this.barStart
1089
+ };
1090
+ },
1091
+ rootClasses: function rootClasses() {
1092
+ return {
1093
+ 'is-rounded': this.rounded,
1094
+ 'is-dragging': this.dragging,
1095
+ 'is-disabled': this.disabled,
1096
+ 'slider-focus': this.biggerSliderFocus
1097
+ };
1098
+ }
1099
+ },
1100
+ watch: {
1101
+ /**
1102
+ * When v-model is changed set the new active step.
1103
+ */
1104
+ value: function value(_value) {
1105
+ this.setValues(_value);
1106
+ },
1107
+ value1: function value1() {
1108
+ this.onInternalValueUpdate();
1109
+ },
1110
+ value2: function value2() {
1111
+ this.onInternalValueUpdate();
1112
+ },
1113
+ min: function min() {
1114
+ this.setValues(this.value);
1115
+ },
1116
+ max: function max() {
1117
+ this.setValues(this.value);
1118
+ }
1119
+ },
1120
+ methods: {
1121
+ setValues: function setValues(newValue) {
1122
+ if (this.min > this.max) {
1123
+ return;
1124
+ }
1125
+ if (Array.isArray(newValue)) {
1126
+ this.isRange = true;
1127
+ var smallValue = typeof newValue[0] !== 'number' || isNaN(newValue[0]) ? this.min : bound(newValue[0], this.min, this.max);
1128
+ var largeValue = typeof newValue[1] !== 'number' || isNaN(newValue[1]) ? this.max : bound(newValue[1], this.min, this.max);
1129
+ this.value1 = this.isThumbReversed ? largeValue : smallValue;
1130
+ this.value2 = this.isThumbReversed ? smallValue : largeValue;
1131
+ } else {
1132
+ this.isRange = false;
1133
+ this.value1 = isNaN(newValue) ? this.min : bound(newValue, this.min, this.max);
1134
+ this.value2 = null;
1135
+ }
1136
+ },
1137
+ onInternalValueUpdate: function onInternalValueUpdate() {
1138
+ if (this.isRange) {
1139
+ this.isThumbReversed = this.value1 > this.value2;
1140
+ }
1141
+ if (!this.lazy || !this.dragging) {
1142
+ this.emitValue('input');
1143
+ }
1144
+ if (this.dragging) {
1145
+ this.emitValue('dragging');
1146
+ }
1147
+ },
1148
+ sliderSize: function sliderSize() {
1149
+ return this.$refs.slider.getBoundingClientRect().width;
1150
+ },
1151
+ onSliderClick: function onSliderClick(event) {
1152
+ if (this.disabled || this.isTrackClickDisabled) return;
1153
+ var sliderOffsetLeft = this.$refs.slider.getBoundingClientRect().left;
1154
+ var percent = (event.clientX - sliderOffsetLeft) / this.sliderSize() * 100;
1155
+ var targetValue = this.min + percent * (this.max - this.min) / 100;
1156
+ var diffFirst = Math.abs(targetValue - this.value1);
1157
+ if (!this.isRange) {
1158
+ if (diffFirst < this.step / 2) return;
1159
+ this.$refs.button1.setPosition(percent);
1160
+ } else {
1161
+ var diffSecond = Math.abs(targetValue - this.value2);
1162
+ if (diffFirst <= diffSecond) {
1163
+ if (diffFirst < this.step / 2) return;
1164
+ this.$refs['button1'].setPosition(percent);
1165
+ } else {
1166
+ if (diffSecond < this.step / 2) return;
1167
+ this.$refs['button2'].setPosition(percent);
1168
+ }
1169
+ }
1170
+ this.emitValue('change');
1171
+ },
1172
+ onDragStart: function onDragStart() {
1173
+ this.dragging = true;
1174
+ this.$emit('dragstart');
1175
+ },
1176
+ onDragEnd: function onDragEnd() {
1177
+ var _this = this;
1178
+ this.isTrackClickDisabled = true;
1179
+ this.timeOutID = setTimeout(function () {
1180
+ // avoid triggering onSliderClick after dragend
1181
+ _this.isTrackClickDisabled = false;
1182
+ }, 0);
1183
+ this.dragging = false;
1184
+ this.$emit('dragend');
1185
+ if (this.lazy) {
1186
+ this.emitValue('input');
1187
+ }
1188
+ },
1189
+ emitValue: function emitValue(type) {
1190
+ this.$emit(type, this.isRange ? [this.minValue, this.maxValue] : this.value1);
1191
+ }
1192
+ },
1193
+ created: function created() {
1194
+ this.isThumbReversed = false;
1195
+ this.isTrackClickDisabled = false;
1196
+ this.setValues(this.value);
1197
+ },
1198
+ beforeDestroy: function beforeDestroy() {
1199
+ clearTimeout(this.timeOutID);
1200
+ }
1201
+ };
1202
+
1203
+ /* script */
1204
+ const __vue_script__ = script;
1205
+
1206
+ /* template */
1207
+ var __vue_render__ = 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 ],on:{"click":_vm.onSliderClick}},[_c('div',{ref:"slider",staticClass:"b-slider-track"},[_c('div',{staticClass:"b-slider-fill",style:(_vm.barStyle)}),(_vm.ticks)?_vm._l((_vm.tickValues),function(val,key){return _c('b-slider-tick',{key:key,attrs:{"value":val}})}):_vm._e(),_vm._t("default"),_c('b-slider-thumb',{ref:"button1",attrs:{"tooltip-always":_vm.tooltipAlways,"type":_vm.newTooltipType,"tooltip":_vm.tooltip,"custom-formatter":_vm.customFormatter,"indicator":_vm.indicator,"format":_vm.format,"locale":_vm.locale,"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},on:{"dragstart":_vm.onDragStart,"dragend":_vm.onDragEnd},model:{value:(_vm.value1),callback:function ($$v) {_vm.value1=$$v;},expression:"value1"}}),(_vm.isRange)?_c('b-slider-thumb',{ref:"button2",attrs:{"tooltip-always":_vm.tooltipAlways,"type":_vm.newTooltipType,"tooltip":_vm.tooltip,"custom-formatter":_vm.customFormatter,"indicator":_vm.indicator,"format":_vm.format,"locale":_vm.locale,"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},on:{"dragstart":_vm.onDragStart,"dragend":_vm.onDragEnd},model:{value:(_vm.value2),callback:function ($$v) {_vm.value2=$$v;},expression:"value2"}}):_vm._e()],2)])};
1208
+ var __vue_staticRenderFns__ = [];
1209
+
1210
+ /* style */
1211
+ const __vue_inject_styles__ = undefined;
1212
+ /* scoped */
1213
+ const __vue_scope_id__ = undefined;
1214
+ /* module identifier */
1215
+ const __vue_module_identifier__ = undefined;
1216
+ /* functional template */
1217
+ const __vue_is_functional_template__ = false;
1218
+ /* style inject */
1219
+
1220
+ /* style inject SSR */
1221
+
1222
+ /* style inject shadow dom */
1223
+
1224
+
1225
+
1226
+ const __vue_component__ = /*#__PURE__*/normalizeComponent(
1227
+ { render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
1228
+ __vue_inject_styles__,
1229
+ __vue_script__,
1230
+ __vue_scope_id__,
1231
+ __vue_is_functional_template__,
1232
+ __vue_module_identifier__,
1233
+ false,
1234
+ undefined,
1235
+ undefined,
1236
+ undefined
1237
+ );
1238
+
1239
+ var Slider = __vue_component__;
1240
+
1241
+ var use = function use(plugin) {
1242
+ if (typeof window !== 'undefined' && window.Vue) {
1243
+ window.Vue.use(plugin);
1244
+ }
1245
+ };
1246
+ var registerComponent = function registerComponent(Vue, component) {
1247
+ Vue.component(component.name, component);
1248
+ };
1249
+
1250
+ var Plugin = {
1251
+ install: function install(Vue) {
1252
+ registerComponent(Vue, Slider);
1253
+ registerComponent(Vue, SliderTick);
1254
+ }
1255
+ };
1256
+ use(Plugin);
1257
+
1258
+ exports.BSlider = Slider;
1259
+ exports.BSliderTick = SliderTick;
1260
+ exports["default"] = Plugin;
1261
+
1262
+ Object.defineProperty(exports, '__esModule', { value: true });
1263
+
1264
+ }));