buefy 1.0.0 → 1.0.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 (588) hide show
  1. package/LICENSE.md +21 -0
  2. package/README.md +242 -0
  3. package/dist/buefy.css +15895 -0
  4. package/dist/buefy.d.ts +11706 -0
  5. package/dist/buefy.esm.js +21082 -0
  6. package/dist/buefy.esm.min.js +2 -0
  7. package/dist/buefy.js +21227 -0
  8. package/dist/buefy.min.css +1 -0
  9. package/dist/buefy.min.js +2 -0
  10. package/dist/cjs/Autocomplete-BMmOsPiK.js +864 -0
  11. package/dist/cjs/Button-Cq7yqI8p.js +118 -0
  12. package/dist/cjs/CheckRadioMixin-CDu0SN3g.js +58 -0
  13. package/dist/cjs/Checkbox-GPzAMQqM.js +85 -0
  14. package/dist/cjs/CompatFallthroughMixin-hhK0Gkhr.js +48 -0
  15. package/dist/cjs/Datepicker-B-9ReBe6.js +2120 -0
  16. package/dist/cjs/Dropdown-DtpKU9qf.js +470 -0
  17. package/dist/cjs/DropdownItem-IMOKyRGV.js +110 -0
  18. package/dist/cjs/Field-19ZCJFF8.js +405 -0
  19. package/dist/cjs/FormElementMixin-DavX4iOv.js +170 -0
  20. package/dist/cjs/Icon-lsDKE2wQ.js +184 -0
  21. package/dist/cjs/Image-CocPwU3n.js +356 -0
  22. package/dist/cjs/InjectedChildMixin-CUKn09dB.js +150 -0
  23. package/dist/cjs/Input-BcloGeZ3.js +350 -0
  24. package/dist/cjs/Loading-GqqqjipO.js +145 -0
  25. package/dist/cjs/MessageMixin-bGuuzfev.js +136 -0
  26. package/dist/cjs/Modal-CYpSQe2Q.js +315 -0
  27. package/dist/cjs/NoticeMixin--3RjH43z.js +163 -0
  28. package/dist/cjs/Pagination-D1MVdiLp.js +547 -0
  29. package/dist/cjs/Progress-DT9Qc8Id.js +177 -0
  30. package/dist/cjs/Select-DayPKwCY.js +147 -0
  31. package/dist/cjs/SlotComponent-BruGdRW3.js +41 -0
  32. package/dist/cjs/TabbedChildMixin-B3JUUwcf.js +211 -0
  33. package/dist/cjs/Tag-BprnwJJ1.js +167 -0
  34. package/dist/cjs/Timepicker-CDZ3V-2J.js +283 -0
  35. package/dist/cjs/TimepickerMixin-C9WVvcUL.js +666 -0
  36. package/dist/cjs/Tooltip-Cgighv0j.js +393 -0
  37. package/dist/cjs/_plugin-vue_export-helper-Die8u8yB.js +11 -0
  38. package/dist/cjs/autocomplete.js +23 -0
  39. package/dist/cjs/breadcrumb.js +107 -0
  40. package/dist/cjs/button.js +20 -0
  41. package/dist/cjs/carousel.js +825 -0
  42. package/dist/cjs/checkbox.js +88 -0
  43. package/dist/cjs/clockpicker.js +668 -0
  44. package/dist/cjs/collapse.js +99 -0
  45. package/dist/cjs/colorpicker.js +25 -0
  46. package/dist/cjs/config-DR826Ki2.js +103 -0
  47. package/dist/cjs/config.js +18 -0
  48. package/dist/cjs/datepicker.js +28 -0
  49. package/dist/cjs/datetimepicker.js +483 -0
  50. package/dist/cjs/dialog.js +506 -0
  51. package/dist/cjs/dropdown.js +23 -0
  52. package/dist/cjs/field.js +19 -0
  53. package/dist/cjs/helpers.js +276 -0
  54. package/dist/cjs/icon.js +19 -0
  55. package/dist/cjs/image.js +19 -0
  56. package/dist/cjs/index-DiQy3SCb.js +1942 -0
  57. package/dist/cjs/index.js +274 -0
  58. package/dist/cjs/input.js +22 -0
  59. package/dist/cjs/loading.js +87 -0
  60. package/dist/cjs/menu.js +340 -0
  61. package/dist/cjs/message.js +119 -0
  62. package/dist/cjs/modal.js +103 -0
  63. package/dist/cjs/navbar.js +572 -0
  64. package/dist/cjs/notification.js +281 -0
  65. package/dist/cjs/numberinput.js +386 -0
  66. package/dist/cjs/pagination.js +22 -0
  67. package/dist/cjs/plugins-DbyYGVpp.js +16 -0
  68. package/dist/cjs/progress.js +91 -0
  69. package/dist/cjs/radio.js +137 -0
  70. package/dist/cjs/rate.js +197 -0
  71. package/dist/cjs/select.js +22 -0
  72. package/dist/cjs/sidebar.js +309 -0
  73. package/dist/cjs/skeleton.js +78 -0
  74. package/dist/cjs/slider.js +699 -0
  75. package/dist/cjs/snackbar.js +224 -0
  76. package/dist/cjs/ssr-DVRFTu_P.js +8 -0
  77. package/dist/cjs/steps.js +347 -0
  78. package/dist/cjs/switch.js +161 -0
  79. package/dist/cjs/table.js +2391 -0
  80. package/dist/cjs/tabs.js +258 -0
  81. package/dist/cjs/tag.js +44 -0
  82. package/dist/cjs/taginput.js +425 -0
  83. package/dist/cjs/timepicker.js +29 -0
  84. package/dist/cjs/toast.js +162 -0
  85. package/dist/cjs/tooltip.js +19 -0
  86. package/dist/cjs/trapFocus-BlX6xykt.js +53 -0
  87. package/dist/cjs/upload.js +195 -0
  88. package/dist/components/autocomplete/index.js +1647 -0
  89. package/dist/components/autocomplete/index.min.js +2 -0
  90. package/dist/components/breadcrumb/index.js +173 -0
  91. package/dist/components/breadcrumb/index.min.js +2 -0
  92. package/dist/components/button/index.js +334 -0
  93. package/dist/components/button/index.min.js +2 -0
  94. package/dist/components/carousel/index.js +1534 -0
  95. package/dist/components/carousel/index.min.js +2 -0
  96. package/dist/components/checkbox/index.js +236 -0
  97. package/dist/components/checkbox/index.min.js +2 -0
  98. package/dist/components/clockpicker/index.js +2636 -0
  99. package/dist/components/clockpicker/index.min.js +2 -0
  100. package/dist/components/collapse/index.js +111 -0
  101. package/dist/components/collapse/index.min.js +2 -0
  102. package/dist/components/colorpicker/index.js +4251 -0
  103. package/dist/components/colorpicker/index.min.js +2 -0
  104. package/dist/components/datepicker/index.js +4110 -0
  105. package/dist/components/datepicker/index.min.js +2 -0
  106. package/dist/components/datetimepicker/index.js +5479 -0
  107. package/dist/components/datetimepicker/index.min.js +2 -0
  108. package/dist/components/dialog/index.js +1202 -0
  109. package/dist/components/dialog/index.min.js +2 -0
  110. package/dist/components/dropdown/index.js +680 -0
  111. package/dist/components/dropdown/index.min.js +2 -0
  112. package/dist/components/field/index.js +439 -0
  113. package/dist/components/field/index.min.js +2 -0
  114. package/dist/components/icon/index.js +212 -0
  115. package/dist/components/icon/index.min.js +2 -0
  116. package/dist/components/image/index.js +396 -0
  117. package/dist/components/image/index.min.js +2 -0
  118. package/dist/components/input/index.js +764 -0
  119. package/dist/components/input/index.min.js +2 -0
  120. package/dist/components/loading/index.js +280 -0
  121. package/dist/components/loading/index.min.js +2 -0
  122. package/dist/components/menu/index.js +586 -0
  123. package/dist/components/menu/index.min.js +2 -0
  124. package/dist/components/message/index.js +611 -0
  125. package/dist/components/message/index.min.js +2 -0
  126. package/dist/components/modal/index.js +516 -0
  127. package/dist/components/modal/index.min.js +2 -0
  128. package/dist/components/navbar/index.js +634 -0
  129. package/dist/components/navbar/index.min.js +2 -0
  130. package/dist/components/notification/index.js +976 -0
  131. package/dist/components/notification/index.min.js +2 -0
  132. package/dist/components/numberinput/index.js +1128 -0
  133. package/dist/components/numberinput/index.min.js +2 -0
  134. package/dist/components/pagination/index.js +764 -0
  135. package/dist/components/pagination/index.min.js +2 -0
  136. package/dist/components/progress/index.js +280 -0
  137. package/dist/components/progress/index.min.js +2 -0
  138. package/dist/components/radio/index.js +208 -0
  139. package/dist/components/radio/index.min.js +2 -0
  140. package/dist/components/rate/index.js +391 -0
  141. package/dist/components/rate/index.min.js +2 -0
  142. package/dist/components/select/index.js +560 -0
  143. package/dist/components/select/index.min.js +2 -0
  144. package/dist/components/sidebar/index.js +337 -0
  145. package/dist/components/sidebar/index.min.js +2 -0
  146. package/dist/components/skeleton/index.js +87 -0
  147. package/dist/components/skeleton/index.min.js +2 -0
  148. package/dist/components/slider/index.js +1171 -0
  149. package/dist/components/slider/index.min.js +2 -0
  150. package/dist/components/snackbar/index.js +439 -0
  151. package/dist/components/snackbar/index.min.js +2 -0
  152. package/dist/components/steps/index.js +925 -0
  153. package/dist/components/steps/index.min.js +2 -0
  154. package/dist/components/switch/index.js +182 -0
  155. package/dist/components/switch/index.min.js +2 -0
  156. package/dist/components/table/index.js +4208 -0
  157. package/dist/components/table/index.min.js +2 -0
  158. package/dist/components/tabs/index.js +837 -0
  159. package/dist/components/tabs/index.min.js +2 -0
  160. package/dist/components/tag/index.js +396 -0
  161. package/dist/components/tag/index.min.js +2 -0
  162. package/dist/components/taginput/index.js +2209 -0
  163. package/dist/components/taginput/index.min.js +2 -0
  164. package/dist/components/timepicker/index.js +2906 -0
  165. package/dist/components/timepicker/index.min.js +2 -0
  166. package/dist/components/toast/index.js +377 -0
  167. package/dist/components/toast/index.min.js +2 -0
  168. package/dist/components/tooltip/index.js +445 -0
  169. package/dist/components/tooltip/index.min.js +2 -0
  170. package/dist/components/upload/index.js +426 -0
  171. package/dist/components/upload/index.min.js +2 -0
  172. package/dist/esm/Autocomplete-CjbTh9D8.js +862 -0
  173. package/dist/esm/Button-DyUYShTZ.js +116 -0
  174. package/dist/esm/CheckRadioMixin-DSD_rjC8.js +56 -0
  175. package/dist/esm/Checkbox-KUMz0sfA.js +83 -0
  176. package/dist/esm/CompatFallthroughMixin-C8LPuwDr.js +46 -0
  177. package/dist/esm/Datepicker-Bl8Wfdkn.js +2118 -0
  178. package/dist/esm/Dropdown-CGTYVyoL.js +467 -0
  179. package/dist/esm/DropdownItem-Cn3nM0A3.js +108 -0
  180. package/dist/esm/Field-B7bX_uUg.js +403 -0
  181. package/dist/esm/FormElementMixin-Dd_wkBN5.js +168 -0
  182. package/dist/esm/Icon-DPyGDeRK.js +182 -0
  183. package/dist/esm/Image-DhX-4hlV.js +354 -0
  184. package/dist/esm/InjectedChildMixin-D2K-FwuO.js +145 -0
  185. package/dist/esm/Input-C4L520az.js +348 -0
  186. package/dist/esm/Loading-tuQoo6TU.js +143 -0
  187. package/dist/esm/MessageMixin-CQ7LIdvq.js +134 -0
  188. package/dist/esm/Modal-tfvyhxw_.js +313 -0
  189. package/dist/esm/NoticeMixin-ByNlva3T.js +161 -0
  190. package/dist/esm/Pagination-B-LAJQay.js +543 -0
  191. package/dist/esm/Progress-BPGTVZgr.js +174 -0
  192. package/dist/esm/Select-bl4qUzij.js +145 -0
  193. package/dist/esm/SlotComponent-BwNpVnfH.js +39 -0
  194. package/dist/esm/TabbedChildMixin-C4i6WP9j.js +208 -0
  195. package/dist/esm/Tag-jS5Bcj6N.js +165 -0
  196. package/dist/esm/Timepicker-DnkqnOBT.js +281 -0
  197. package/dist/esm/TimepickerMixin-Bikh6_Fg.js +664 -0
  198. package/dist/esm/Tooltip-CtDSXAqa.js +391 -0
  199. package/dist/esm/_plugin-vue_export-helper-OJRSZE6i.js +9 -0
  200. package/dist/esm/autocomplete.js +18 -0
  201. package/dist/esm/breadcrumb.js +101 -0
  202. package/dist/esm/button.js +15 -0
  203. package/dist/esm/carousel.js +818 -0
  204. package/dist/esm/checkbox.js +82 -0
  205. package/dist/esm/clockpicker.js +663 -0
  206. package/dist/esm/collapse.js +94 -0
  207. package/dist/esm/colorpicker.js +16 -0
  208. package/dist/esm/config-CKuo-p6e.js +100 -0
  209. package/dist/esm/config.js +14 -0
  210. package/dist/esm/datepicker.js +23 -0
  211. package/dist/esm/datetimepicker.js +478 -0
  212. package/dist/esm/dialog.js +500 -0
  213. package/dist/esm/dropdown.js +17 -0
  214. package/dist/esm/field.js +14 -0
  215. package/dist/esm/helpers.js +247 -0
  216. package/dist/esm/icon.js +14 -0
  217. package/dist/esm/image.js +14 -0
  218. package/dist/esm/index-CQegEsxK.js +1938 -0
  219. package/dist/esm/index.js +164 -0
  220. package/dist/esm/input.js +17 -0
  221. package/dist/esm/loading.js +81 -0
  222. package/dist/esm/menu.js +333 -0
  223. package/dist/esm/message.js +114 -0
  224. package/dist/esm/modal.js +97 -0
  225. package/dist/esm/navbar.js +565 -0
  226. package/dist/esm/notification.js +275 -0
  227. package/dist/esm/numberinput.js +381 -0
  228. package/dist/esm/pagination.js +16 -0
  229. package/dist/esm/plugins-B172kuKE.js +13 -0
  230. package/dist/esm/progress.js +85 -0
  231. package/dist/esm/radio.js +131 -0
  232. package/dist/esm/rate.js +192 -0
  233. package/dist/esm/select.js +17 -0
  234. package/dist/esm/sidebar.js +304 -0
  235. package/dist/esm/skeleton.js +73 -0
  236. package/dist/esm/slider.js +693 -0
  237. package/dist/esm/snackbar.js +218 -0
  238. package/dist/esm/ssr-C7yEpGLm.js +5 -0
  239. package/dist/esm/steps.js +341 -0
  240. package/dist/esm/switch.js +156 -0
  241. package/dist/esm/table.js +2385 -0
  242. package/dist/esm/tabs.js +252 -0
  243. package/dist/esm/tag.js +38 -0
  244. package/dist/esm/taginput.js +420 -0
  245. package/dist/esm/timepicker.js +24 -0
  246. package/dist/esm/toast.js +156 -0
  247. package/dist/esm/tooltip.js +14 -0
  248. package/dist/esm/trapFocus-KHP_kCNE.js +51 -0
  249. package/dist/esm/upload.js +190 -0
  250. package/dist/tsdoc-metadata.json +11 -0
  251. package/package.json +73 -6
  252. package/src/components/autocomplete/Autocomplete.spec.ts +783 -0
  253. package/src/components/autocomplete/Autocomplete.vue +966 -0
  254. package/src/components/autocomplete/__snapshots__/Autocomplete.spec.ts.snap +21 -0
  255. package/src/components/autocomplete/index.ts +16 -0
  256. package/src/components/breadcrumb/Breadcrumb.spec.ts +65 -0
  257. package/src/components/breadcrumb/Breadcrumb.vue +42 -0
  258. package/src/components/breadcrumb/BreadcrumbItem.spec.ts +74 -0
  259. package/src/components/breadcrumb/BreadcrumbItem.vue +34 -0
  260. package/src/components/breadcrumb/__snapshots__/Breadcrumb.spec.ts.snap +7 -0
  261. package/src/components/breadcrumb/__snapshots__/BreadcrumbItem.spec.ts.snap +3 -0
  262. package/src/components/breadcrumb/index.ts +19 -0
  263. package/src/components/button/Button.spec.ts +117 -0
  264. package/src/components/button/Button.vue +112 -0
  265. package/src/components/button/__snapshots__/Button.spec.ts.snap +9 -0
  266. package/src/components/button/index.ts +16 -0
  267. package/src/components/carousel/Carousel.spec.ts +304 -0
  268. package/src/components/carousel/Carousel.vue +389 -0
  269. package/src/components/carousel/CarouselItem.spec.ts +105 -0
  270. package/src/components/carousel/CarouselItem.vue +38 -0
  271. package/src/components/carousel/CarouselList.spec.ts +172 -0
  272. package/src/components/carousel/CarouselList.vue +364 -0
  273. package/src/components/carousel/__snapshots__/Carousel.spec.ts.snap +19 -0
  274. package/src/components/carousel/__snapshots__/CarouselItem.spec.ts.snap +7 -0
  275. package/src/components/carousel/__snapshots__/CarouselList.spec.ts.snap +36 -0
  276. package/src/components/carousel/index.ts +23 -0
  277. package/src/components/carousel/types.ts +17 -0
  278. package/src/components/checkbox/Checkbox.spec.ts +40 -0
  279. package/src/components/checkbox/Checkbox.vue +63 -0
  280. package/src/components/checkbox/CheckboxButton.spec.ts +46 -0
  281. package/src/components/checkbox/CheckboxButton.vue +59 -0
  282. package/src/components/checkbox/__snapshots__/Checkbox.spec.ts.snap +9 -0
  283. package/src/components/checkbox/__snapshots__/CheckboxButton.spec.ts.snap +3 -0
  284. package/src/components/checkbox/index.ts +20 -0
  285. package/src/components/clockpicker/Clockpicker.spec.ts +161 -0
  286. package/src/components/clockpicker/Clockpicker.vue +311 -0
  287. package/src/components/clockpicker/ClockpickerFace.spec.ts +99 -0
  288. package/src/components/clockpicker/ClockpickerFace.vue +272 -0
  289. package/src/components/clockpicker/__snapshots__/Clockpicker.spec.ts.snap +36 -0
  290. package/src/components/clockpicker/__snapshots__/ClockpickerFace.spec.ts.snap +9 -0
  291. package/src/components/clockpicker/index.ts +16 -0
  292. package/src/components/collapse/Collapse.spec.ts +106 -0
  293. package/src/components/collapse/Collapse.vue +98 -0
  294. package/src/components/collapse/__snapshots__/Collapse.spec.ts.snap +10 -0
  295. package/src/components/collapse/index.ts +16 -0
  296. package/src/components/colorpicker/Colorpicker.spec.ts +22 -0
  297. package/src/components/colorpicker/Colorpicker.vue +416 -0
  298. package/src/components/colorpicker/ColorpickerAlphaSlider.spec.ts +17 -0
  299. package/src/components/colorpicker/ColorpickerAlphaSlider.vue +205 -0
  300. package/src/components/colorpicker/ColorpickerHSLRepresentationSquare.spec.ts +23 -0
  301. package/src/components/colorpicker/ColorpickerHSLRepresentationSquare.vue +380 -0
  302. package/src/components/colorpicker/ColorpickerHSLRepresentationTriangle.spec.ts +23 -0
  303. package/src/components/colorpicker/ColorpickerHSLRepresentationTriangle.vue +456 -0
  304. package/src/components/colorpicker/__snapshots__/Colorpicker.spec.ts.snap +77 -0
  305. package/src/components/colorpicker/__snapshots__/ColorpickerAlphaSlider.spec.ts.snap +9 -0
  306. package/src/components/colorpicker/__snapshots__/ColorpickerHSLRepresentationSquare.spec.ts.snap +12 -0
  307. package/src/components/colorpicker/__snapshots__/ColorpickerHSLRepresentationTriangle.spec.ts.snap +36 -0
  308. package/src/components/colorpicker/index.ts +16 -0
  309. package/src/components/datepicker/Datepicker.spec.ts +482 -0
  310. package/src/components/datepicker/Datepicker.vue +908 -0
  311. package/src/components/datepicker/DatepickerMonth.spec.ts +346 -0
  312. package/src/components/datepicker/DatepickerMonth.vue +444 -0
  313. package/src/components/datepicker/DatepickerTable.spec.ts +290 -0
  314. package/src/components/datepicker/DatepickerTable.vue +398 -0
  315. package/src/components/datepicker/DatepickerTableRow.spec.ts +300 -0
  316. package/src/components/datepicker/DatepickerTableRow.vue +416 -0
  317. package/src/components/datepicker/__snapshots__/Datepicker.spec.ts.snap +54 -0
  318. package/src/components/datepicker/__snapshots__/DatepickerMonth.spec.ts.snap +33 -0
  319. package/src/components/datepicker/__snapshots__/DatepickerTable.spec.ts.snap +16 -0
  320. package/src/components/datepicker/__snapshots__/DatepickerTableRow.spec.ts.snap +23 -0
  321. package/src/components/datepicker/index.ts +17 -0
  322. package/src/components/datepicker/types.ts +41 -0
  323. package/src/components/datetimepicker/Datetimepicker.spec.ts +132 -0
  324. package/src/components/datetimepicker/Datetimepicker.vue +491 -0
  325. package/src/components/datetimepicker/index.ts +16 -0
  326. package/src/components/dialog/Dialog.spec.ts +108 -0
  327. package/src/components/dialog/Dialog.vue +300 -0
  328. package/src/components/dialog/index.ts +169 -0
  329. package/src/components/dropdown/Dropdown.spec.ts +229 -0
  330. package/src/components/dropdown/Dropdown.vue +491 -0
  331. package/src/components/dropdown/DropdownItem.spec.ts +78 -0
  332. package/src/components/dropdown/DropdownItem.vue +112 -0
  333. package/src/components/dropdown/__snapshots__/Dropdown.spec.ts.snap +15 -0
  334. package/src/components/dropdown/__snapshots__/DropdownItem.spec.ts.snap +3 -0
  335. package/src/components/dropdown/index.ts +20 -0
  336. package/src/components/field/Field.spec.ts +324 -0
  337. package/src/components/field/Field.vue +316 -0
  338. package/src/components/field/FieldBody.spec.ts +96 -0
  339. package/src/components/field/FieldBody.vue +74 -0
  340. package/src/components/field/__snapshots__/Field.spec.ts.snap +8 -0
  341. package/src/components/field/__snapshots__/FieldBody.spec.ts.snap +3 -0
  342. package/src/components/field/index.ts +16 -0
  343. package/src/components/icon/Icon.spec.ts +142 -0
  344. package/src/components/icon/Icon.vue +120 -0
  345. package/src/components/icon/__snapshots__/Icon.spec.ts.snap +3 -0
  346. package/src/components/icon/index.ts +17 -0
  347. package/src/components/image/Image.spec.ts +218 -0
  348. package/src/components/image/Image.vue +358 -0
  349. package/src/components/image/__snapshots__/Image.spec.ts.snap +37 -0
  350. package/src/components/image/index.ts +16 -0
  351. package/src/components/index.ts +179 -0
  352. package/src/components/input/Input.spec.ts +396 -0
  353. package/src/components/input/Input.vue +335 -0
  354. package/src/components/input/__snapshots__/Input.spec.ts.snap +9 -0
  355. package/src/components/input/index.ts +17 -0
  356. package/src/components/loading/Loading.spec.ts +151 -0
  357. package/src/components/loading/Loading.vue +135 -0
  358. package/src/components/loading/__snapshots__/Loading.spec.ts.snap +10 -0
  359. package/src/components/loading/index.ts +91 -0
  360. package/src/components/menu/Menu.spec.ts +21 -0
  361. package/src/components/menu/Menu.vue +31 -0
  362. package/src/components/menu/MenuItem.spec.ts +92 -0
  363. package/src/components/menu/MenuItem.vue +168 -0
  364. package/src/components/menu/MenuItemContainerMixin.ts +72 -0
  365. package/src/components/menu/MenuList.spec.ts +35 -0
  366. package/src/components/menu/MenuList.vue +47 -0
  367. package/src/components/menu/__snapshots__/Menu.spec.ts.snap +3 -0
  368. package/src/components/menu/__snapshots__/MenuItem.spec.ts.snap +9 -0
  369. package/src/components/menu/__snapshots__/MenuList.spec.ts.snap +8 -0
  370. package/src/components/menu/index.ts +25 -0
  371. package/src/components/message/Message.spec.ts +30 -0
  372. package/src/components/message/Message.vue +73 -0
  373. package/src/components/message/__snapshots__/Message.spec.ts.snap +11 -0
  374. package/src/components/message/index.ts +15 -0
  375. package/src/components/modal/Modal.spec.ts +167 -0
  376. package/src/components/modal/Modal.vue +335 -0
  377. package/src/components/modal/__snapshots__/Modal.spec.ts.snap +10 -0
  378. package/src/components/modal/index.ts +107 -0
  379. package/src/components/navbar/NavBar.spec.ts +78 -0
  380. package/src/components/navbar/NavBarBurger.spec.ts +30 -0
  381. package/src/components/navbar/NavBarItem.spec.ts +92 -0
  382. package/src/components/navbar/Navbar.vue +274 -0
  383. package/src/components/navbar/NavbarBurger.vue +29 -0
  384. package/src/components/navbar/NavbarDropdown.spec.ts +84 -0
  385. package/src/components/navbar/NavbarDropdown.vue +115 -0
  386. package/src/components/navbar/NavbarItem.vue +97 -0
  387. package/src/components/navbar/__snapshots__/NavBar.spec.ts.snap +11 -0
  388. package/src/components/navbar/__snapshots__/NavBarBurger.spec.ts.snap +3 -0
  389. package/src/components/navbar/__snapshots__/NavBarItem.spec.ts.snap +3 -0
  390. package/src/components/navbar/__snapshots__/NavbarDropdown.spec.ts.snap +7 -0
  391. package/src/components/navbar/index.ts +22 -0
  392. package/src/components/notification/Notification.spec.ts +21 -0
  393. package/src/components/notification/Notification.vue +77 -0
  394. package/src/components/notification/NotificationNotice.vue +76 -0
  395. package/src/components/notification/__snapshots__/Notification.spec.ts.snap +10 -0
  396. package/src/components/notification/index.ts +121 -0
  397. package/src/components/numberinput/Numberinput.spec.ts +445 -0
  398. package/src/components/numberinput/Numberinput.vue +372 -0
  399. package/src/components/numberinput/index.ts +16 -0
  400. package/src/components/pagination/Pagination.spec.ts +94 -0
  401. package/src/components/pagination/Pagination.vue +434 -0
  402. package/src/components/pagination/PaginationButton.spec.ts +42 -0
  403. package/src/components/pagination/PaginationButton.vue +59 -0
  404. package/src/components/pagination/__snapshots__/Pagination.spec.ts.snap +22 -0
  405. package/src/components/pagination/__snapshots__/PaginationButton.spec.ts.snap +3 -0
  406. package/src/components/pagination/index.ts +19 -0
  407. package/src/components/pagination/types.ts +11 -0
  408. package/src/components/progress/Progress.spec.ts +81 -0
  409. package/src/components/progress/Progress.vue +168 -0
  410. package/src/components/progress/ProgressBar.spec.ts +45 -0
  411. package/src/components/progress/ProgressBar.vue +74 -0
  412. package/src/components/progress/__snapshots__/Progress.spec.ts.snap +7 -0
  413. package/src/components/progress/__snapshots__/ProgressBar.spec.ts.snap +7 -0
  414. package/src/components/progress/index.ts +18 -0
  415. package/src/components/radio/Radio.spec.ts +40 -0
  416. package/src/components/radio/Radio.vue +35 -0
  417. package/src/components/radio/RadioButton.spec.ts +40 -0
  418. package/src/components/radio/RadioButton.vue +69 -0
  419. package/src/components/radio/__snapshots__/Radio.spec.ts.snap +3 -0
  420. package/src/components/radio/__snapshots__/RadioButton.spec.ts.snap +3 -0
  421. package/src/components/radio/index.ts +18 -0
  422. package/src/components/rate/Rate.spec.ts +90 -0
  423. package/src/components/rate/Rate.vue +158 -0
  424. package/src/components/rate/index.ts +15 -0
  425. package/src/components/select/Select.spec.ts +74 -0
  426. package/src/components/select/Select.vue +118 -0
  427. package/src/components/select/__snapshots__/Select.spec.ts.snap +7 -0
  428. package/src/components/select/index.ts +16 -0
  429. package/src/components/sidebar/Sidebar.spec.ts +107 -0
  430. package/src/components/sidebar/Sidebar.vue +316 -0
  431. package/src/components/sidebar/__snapshots__/Sidebar.spec.ts.snap +25 -0
  432. package/src/components/sidebar/index.ts +16 -0
  433. package/src/components/skeleton/Skeleton.spec.ts +16 -0
  434. package/src/components/skeleton/Skeleton.vue +98 -0
  435. package/src/components/skeleton/__snapshots__/Skeleton.spec.ts.snap +7 -0
  436. package/src/components/skeleton/index.ts +18 -0
  437. package/src/components/slider/Slider.spec.ts +115 -0
  438. package/src/components/slider/Slider.vue +374 -0
  439. package/src/components/slider/SliderThumb.spec.ts +176 -0
  440. package/src/components/slider/SliderThumb.vue +251 -0
  441. package/src/components/slider/SliderTick.spec.ts +33 -0
  442. package/src/components/slider/SliderTick.vue +50 -0
  443. package/src/components/slider/__snapshots__/Slider.spec.ts.snap +12 -0
  444. package/src/components/slider/__snapshots__/SliderThumb.spec.ts.snap +16 -0
  445. package/src/components/slider/__snapshots__/SliderTick.spec.ts.snap +7 -0
  446. package/src/components/slider/index.ts +19 -0
  447. package/src/components/slider/types.ts +34 -0
  448. package/src/components/snackbar/Snackbar.spec.ts +35 -0
  449. package/src/components/snackbar/Snackbar.vue +88 -0
  450. package/src/components/snackbar/__snapshots__/Snackbar.spec.ts.snap +12 -0
  451. package/src/components/snackbar/index.ts +118 -0
  452. package/src/components/steps/StepItem.spec.ts +114 -0
  453. package/src/components/steps/StepItem.vue +26 -0
  454. package/src/components/steps/Steps.spec.ts +125 -0
  455. package/src/components/steps/Steps.vue +273 -0
  456. package/src/components/steps/__snapshots__/StepItem.spec.ts.snap +7 -0
  457. package/src/components/steps/__snapshots__/Steps.spec.ts.snap +40 -0
  458. package/src/components/steps/index.ts +19 -0
  459. package/src/components/switch/Switch.spec.ts +74 -0
  460. package/src/components/switch/Switch.vue +146 -0
  461. package/src/components/switch/__snapshots__/Switch.spec.ts.snap +3 -0
  462. package/src/components/switch/index.ts +16 -0
  463. package/src/components/table/Table.spec.ts +622 -0
  464. package/src/components/table/Table.vue +1770 -0
  465. package/src/components/table/TableColumn.spec.ts +85 -0
  466. package/src/components/table/TableColumn.vue +140 -0
  467. package/src/components/table/TableMobileSort.spec.ts +47 -0
  468. package/src/components/table/TableMobileSort.vue +236 -0
  469. package/src/components/table/TablePagination.vue +86 -0
  470. package/src/components/table/__snapshots__/Table.spec.ts.snap +24 -0
  471. package/src/components/table/__snapshots__/TableMobileSort.spec.ts.snap +12 -0
  472. package/src/components/table/index.ts +32 -0
  473. package/src/components/table/mockTableColumn.ts +110 -0
  474. package/src/components/table/types.ts +110 -0
  475. package/src/components/tabs/TabItem.spec.ts +203 -0
  476. package/src/components/tabs/TabItem.vue +19 -0
  477. package/src/components/tabs/Tabs.spec.ts +122 -0
  478. package/src/components/tabs/Tabs.vue +204 -0
  479. package/src/components/tabs/__snapshots__/TabItem.spec.ts.snap +7 -0
  480. package/src/components/tabs/__snapshots__/Tabs.spec.ts.snap +33 -0
  481. package/src/components/tabs/index.ts +19 -0
  482. package/src/components/tag/Tag.spec.ts +32 -0
  483. package/src/components/tag/Tag.vue +132 -0
  484. package/src/components/tag/Taglist.spec.ts +21 -0
  485. package/src/components/tag/Taglist.vue +16 -0
  486. package/src/components/tag/__snapshots__/Tag.spec.ts.snap +6 -0
  487. package/src/components/tag/__snapshots__/Taglist.spec.ts.snap +3 -0
  488. package/src/components/tag/index.ts +19 -0
  489. package/src/components/taginput/Taginput.spec.ts +132 -0
  490. package/src/components/taginput/Taginput.vue +415 -0
  491. package/src/components/taginput/__snapshots__/Taginput.spec.ts.snap +10 -0
  492. package/src/components/taginput/index.ts +16 -0
  493. package/src/components/timepicker/Timepicker.spec.ts +108 -0
  494. package/src/components/timepicker/Timepicker.vue +183 -0
  495. package/src/components/timepicker/__snapshots__/Timepicker.spec.ts.snap +41 -0
  496. package/src/components/timepicker/index.ts +17 -0
  497. package/src/components/toast/Toast.spec.ts +74 -0
  498. package/src/components/toast/Toast.vue +46 -0
  499. package/src/components/toast/__snapshots__/Toast.spec.ts.snap +10 -0
  500. package/src/components/toast/index.ts +120 -0
  501. package/src/components/tooltip/Tooltip.spec.ts +64 -0
  502. package/src/components/tooltip/Tooltip.vue +393 -0
  503. package/src/components/tooltip/__snapshots__/Tooltip.spec.ts.snap +12 -0
  504. package/src/components/tooltip/index.ts +16 -0
  505. package/src/components/upload/Upload.spec.ts +62 -0
  506. package/src/components/upload/Upload.vue +188 -0
  507. package/src/components/upload/__snapshots__/Upload.spec.ts.snap +3 -0
  508. package/src/components/upload/index.ts +15 -0
  509. package/src/directives/clickOutside.ts +113 -0
  510. package/src/directives/trapFocus.ts +61 -0
  511. package/src/index.ts +43 -0
  512. package/src/scss/buefy-build.scss +6 -0
  513. package/src/scss/buefy.scss +39 -0
  514. package/src/scss/components/_autocomplete.scss +39 -0
  515. package/src/scss/components/_carousel.scss +204 -0
  516. package/src/scss/components/_checkbox.scss +106 -0
  517. package/src/scss/components/_clockpicker.scss +283 -0
  518. package/src/scss/components/_collapse.scss +9 -0
  519. package/src/scss/components/_colorpicker.scss +283 -0
  520. package/src/scss/components/_datepicker.scss +220 -0
  521. package/src/scss/components/_dialog.scss +54 -0
  522. package/src/scss/components/_dropdown.scss +143 -0
  523. package/src/scss/components/_form.scss +309 -0
  524. package/src/scss/components/_icon.scss +16 -0
  525. package/src/scss/components/_image.scss +20 -0
  526. package/src/scss/components/_loading.scss +45 -0
  527. package/src/scss/components/_menu.scss +11 -0
  528. package/src/scss/components/_message.scss +16 -0
  529. package/src/scss/components/_modal.scss +37 -0
  530. package/src/scss/components/_navbar.scss +22 -0
  531. package/src/scss/components/_notices.scss +144 -0
  532. package/src/scss/components/_notification.scss +8 -0
  533. package/src/scss/components/_numberinput.scss +33 -0
  534. package/src/scss/components/_pagination.scss +63 -0
  535. package/src/scss/components/_progress.scss +105 -0
  536. package/src/scss/components/_radio.scss +123 -0
  537. package/src/scss/components/_rate.scss +72 -0
  538. package/src/scss/components/_select.scss +38 -0
  539. package/src/scss/components/_sidebar.scss +107 -0
  540. package/src/scss/components/_skeleton.scss +66 -0
  541. package/src/scss/components/_slider.scss +162 -0
  542. package/src/scss/components/_steps.scss +491 -0
  543. package/src/scss/components/_switch.scss +214 -0
  544. package/src/scss/components/_table.scss +322 -0
  545. package/src/scss/components/_tabs.scss +197 -0
  546. package/src/scss/components/_tag.scss +36 -0
  547. package/src/scss/components/_taginput.scss +73 -0
  548. package/src/scss/components/_timepicker.scss +73 -0
  549. package/src/scss/components/_tooltip.scss +192 -0
  550. package/src/scss/components/_upload.scss +62 -0
  551. package/src/scss/utils/_all.scss +4 -0
  552. package/src/scss/utils/_animations.scss +183 -0
  553. package/src/scss/utils/_functions.scss +49 -0
  554. package/src/scss/utils/_helpers.scss +6 -0
  555. package/src/scss/utils/_variables-ext.scss +2 -0
  556. package/src/scss/utils/_variables.scss +16 -0
  557. package/src/utils/CheckRadioMixin.spec.ts +28 -0
  558. package/src/utils/CheckRadioMixin.ts +61 -0
  559. package/src/utils/CompatFallthroughMixin.ts +34 -0
  560. package/src/utils/ConfigComponent.ts +12 -0
  561. package/src/utils/FormElementMixin.spec.ts +41 -0
  562. package/src/utils/FormElementMixin.ts +206 -0
  563. package/src/utils/InjectedChildMixin.ts +139 -0
  564. package/src/utils/MessageMixin.spec.ts +51 -0
  565. package/src/utils/MessageMixin.ts +138 -0
  566. package/src/utils/NoticeMixin.spec.ts +55 -0
  567. package/src/utils/NoticeMixin.ts +181 -0
  568. package/src/utils/ProvideInjectTypes.ts +20 -0
  569. package/src/utils/ProviderParentMixin.ts +105 -0
  570. package/src/utils/SlotComponent.spec.ts +55 -0
  571. package/src/utils/SlotComponent.ts +38 -0
  572. package/src/utils/TabbedChildMixin.ts +96 -0
  573. package/src/utils/TabbedMixin.ts +166 -0
  574. package/src/utils/TabbedTypes.ts +33 -0
  575. package/src/utils/TimepickerMixin.spec.ts +75 -0
  576. package/src/utils/TimepickerMixin.ts +767 -0
  577. package/src/utils/color.spec.ts +55 -0
  578. package/src/utils/color.ts +507 -0
  579. package/src/utils/config.spec.ts +11 -0
  580. package/src/utils/config.ts +619 -0
  581. package/src/utils/debounce.spec.ts +52 -0
  582. package/src/utils/debounce.ts +20 -0
  583. package/src/utils/helpers.spec.ts +257 -0
  584. package/src/utils/helpers.ts +527 -0
  585. package/src/utils/icons.ts +73 -0
  586. package/src/utils/plugins.ts +20 -0
  587. package/src/utils/ssr.ts +6 -0
  588. package/src/utils/vue-augmentation.ts +35 -0
@@ -0,0 +1,2906 @@
1
+ /*! Buefy v1.0.2 | MIT License | github.com/buefy/buefy */
2
+ (function (global, factory) {
3
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue')) :
4
+ typeof define === 'function' && define.amd ? define(['exports', 'vue'], factory) :
5
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Timepicker = {}, global.Vue));
6
+ })(this, (function (exports, vue) { 'use strict';
7
+
8
+ let config = {
9
+ defaultIconPack: "mdi",
10
+ defaultIconComponent: null,
11
+ defaultLocale: void 0,
12
+ defaultInputAutocomplete: "on",
13
+ defaultTimepickerMobileNative: true,
14
+ defaultTimepickerMobileModal: true,
15
+ defaultInputHasCounter: true,
16
+ defaultCompatFallthrough: true,
17
+ defaultUseHtml5Validation: true,
18
+ defaultDropdownMobileModal: true,
19
+ defaultFieldLabelPosition: null,
20
+ defaultTrapFocus: true,
21
+ defaultStatusIcon: true};
22
+
23
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
24
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
25
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
26
+ var __objRest = (source, exclude) => {
27
+ var target = {};
28
+ for (var prop in source)
29
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
30
+ target[prop] = source[prop];
31
+ if (source != null && __getOwnPropSymbols)
32
+ for (var prop of __getOwnPropSymbols(source)) {
33
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
34
+ target[prop] = source[prop];
35
+ }
36
+ return target;
37
+ };
38
+ var CompatFallthroughMixin = vue.defineComponent({
39
+ inheritAttrs: false,
40
+ props: {
41
+ compatFallthrough: {
42
+ type: Boolean,
43
+ default: () => config.defaultCompatFallthrough
44
+ }
45
+ },
46
+ computed: {
47
+ rootAttrs() {
48
+ return this.compatFallthrough ? {
49
+ class: this.$attrs.class,
50
+ style: this.$attrs.style,
51
+ id: this.$attrs.id
52
+ } : {};
53
+ },
54
+ fallthroughAttrs() {
55
+ if (this.compatFallthrough) {
56
+ const _a = this.$attrs, { style: _1, class: _2, id: _3 } = _a, rest = __objRest(_a, ["style", "class", "id"]);
57
+ return rest;
58
+ } else {
59
+ return this.$attrs;
60
+ }
61
+ }
62
+ }
63
+ });
64
+
65
+ const isMobile = {
66
+ Android: function() {
67
+ return typeof window !== "undefined" && window.navigator.userAgent.match(/Android/i);
68
+ },
69
+ BlackBerry: function() {
70
+ return typeof window !== "undefined" && window.navigator.userAgent.match(/BlackBerry/i);
71
+ },
72
+ iOS: function() {
73
+ return typeof window !== "undefined" && (window.navigator.userAgent.match(/iPhone|iPad|iPod/i) || window.navigator.platform === "MacIntel" && window.navigator.maxTouchPoints > 1);
74
+ },
75
+ Opera: function() {
76
+ return typeof window !== "undefined" && window.navigator.userAgent.match(/Opera Mini/i);
77
+ },
78
+ Windows: function() {
79
+ return typeof window !== "undefined" && window.navigator.userAgent.match(/IEMobile/i);
80
+ },
81
+ any: function() {
82
+ return isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows();
83
+ }
84
+ };
85
+ function removeElement(el) {
86
+ if (typeof el.remove !== "undefined") {
87
+ el.remove();
88
+ } else if (typeof el.parentNode !== "undefined" && el.parentNode !== null) {
89
+ el.parentNode.removeChild(el);
90
+ }
91
+ }
92
+ function createAbsoluteElement(el) {
93
+ const root = document.createElement("div");
94
+ root.style.position = "absolute";
95
+ root.style.left = "0px";
96
+ root.style.top = "0px";
97
+ root.style.width = "100%";
98
+ const wrapper = document.createElement("div");
99
+ root.appendChild(wrapper);
100
+ wrapper.appendChild(el);
101
+ document.body.appendChild(root);
102
+ return root;
103
+ }
104
+ function toCssWidth(width) {
105
+ return width === void 0 ? null : isNaN(+width) ? `${width}` : width + "px";
106
+ }
107
+ function matchWithGroups(pattern, str) {
108
+ const matches = str.match(pattern);
109
+ const groupNames = pattern.toString().match(/<(.+?)>/g);
110
+ if (groupNames == null) {
111
+ throw new RangeError("pattern must contain at least one group");
112
+ }
113
+ return groupNames.map((group) => {
114
+ const groupMatches = group.match(/<(.+)>/);
115
+ return groupMatches[1];
116
+ }).reduce((acc, curr, index) => {
117
+ if (matches && matches.length > index) {
118
+ acc[curr] = matches[index + 1];
119
+ } else {
120
+ acc[curr] = null;
121
+ }
122
+ return acc;
123
+ }, {});
124
+ }
125
+ function isCustomElement(vm) {
126
+ return vm.$root != null && "shadowRoot" in vm.$root.$options;
127
+ }
128
+ function isTag(vnode) {
129
+ return vnode.type !== vue.Comment && vnode.type !== vue.Text && vnode.type !== vue.Static;
130
+ }
131
+
132
+ var _sfc_main$6 = vue.defineComponent({
133
+ name: "BFieldBody",
134
+ inject: {
135
+ parent: {
136
+ from: "BField",
137
+ default: null
138
+ }
139
+ },
140
+ props: {
141
+ message: {
142
+ type: [String, Array]
143
+ },
144
+ type: {
145
+ type: [String, Object]
146
+ }
147
+ },
148
+ render() {
149
+ let first = true;
150
+ let children = typeof this.$slots.default === "function" ? this.$slots.default() : this.$slots.default;
151
+ if (children != null && children.length === 1 && children[0].type === vue.Fragment) {
152
+ children = children[0].children;
153
+ }
154
+ return vue.h(
155
+ "div",
156
+ { class: "field-body" },
157
+ {
158
+ default: () => {
159
+ return children != null && children.map((element) => {
160
+ if (element.type === vue.Comment || element.type === vue.Text) {
161
+ return element;
162
+ }
163
+ let message;
164
+ if (first) {
165
+ message = this.message;
166
+ first = false;
167
+ }
168
+ const parentField = this.parent;
169
+ return vue.h(
170
+ // parentField.$.type is supposed to be BField
171
+ // it falls back to `resolveComponent('b-field')`
172
+ // but won't work unless `BField` is globally registered
173
+ // should not be a problem as long as `BFieldBody` is properly used
174
+ parentField ? parentField.$.type : vue.resolveComponent("b-field"),
175
+ {
176
+ type: this.type,
177
+ message
178
+ },
179
+ () => element
180
+ );
181
+ });
182
+ }
183
+ }
184
+ );
185
+ }
186
+ });
187
+
188
+ const Field = vue.defineComponent({
189
+ name: "BField",
190
+ components: { BFieldBody: _sfc_main$6 },
191
+ provide() {
192
+ return {
193
+ BField: this
194
+ };
195
+ },
196
+ inject: {
197
+ parent: {
198
+ from: "BField",
199
+ default: false
200
+ }
201
+ },
202
+ // Used internally only when using Field in Field
203
+ props: {
204
+ type: {
205
+ type: [String, Object],
206
+ default: void 0
207
+ },
208
+ label: String,
209
+ labelFor: String,
210
+ message: {
211
+ type: [String, Array, Object],
212
+ default: void 0
213
+ },
214
+ grouped: Boolean,
215
+ groupMultiline: Boolean,
216
+ position: String,
217
+ expanded: Boolean,
218
+ horizontal: Boolean,
219
+ addons: {
220
+ type: Boolean,
221
+ default: true
222
+ },
223
+ customClass: String,
224
+ labelPosition: {
225
+ type: String,
226
+ default: () => {
227
+ return config.defaultFieldLabelPosition;
228
+ }
229
+ }
230
+ },
231
+ data() {
232
+ return {
233
+ newType: this.type,
234
+ newMessage: this.message,
235
+ fieldLabelSize: null,
236
+ numberInputClasses: [],
237
+ _isField: true
238
+ // Used internally by Input and Select
239
+ };
240
+ },
241
+ computed: {
242
+ rootClasses() {
243
+ return [
244
+ {
245
+ "is-expanded": this.expanded,
246
+ "is-horizontal": this.horizontal,
247
+ "is-floating-in-label": this.hasLabel && !this.horizontal && this.labelPosition === "inside",
248
+ "is-floating-label": this.hasLabel && !this.horizontal && this.labelPosition === "on-border"
249
+ },
250
+ this.numberInputClasses
251
+ ];
252
+ },
253
+ innerFieldClasses() {
254
+ return [
255
+ this.fieldType(),
256
+ this.newPosition,
257
+ {
258
+ "is-grouped-multiline": this.groupMultiline
259
+ }
260
+ ];
261
+ },
262
+ hasInnerField() {
263
+ return this.grouped || this.groupMultiline || this.hasAddons();
264
+ },
265
+ /*
266
+ * Correct Bulma class for the side of the addon or group.
267
+ *
268
+ * This is not kept like the others (is-small, etc.),
269
+ * because since 'has-addons' is set automatically it
270
+ * doesn't make sense to teach users what addons are exactly.
271
+ */
272
+ newPosition() {
273
+ if (this.position === void 0) return;
274
+ const position = this.position.split("-");
275
+ if (position.length < 1) return;
276
+ const prefix = this.grouped ? "is-grouped-" : "has-addons-";
277
+ if (this.position) return prefix + position[1];
278
+ return void 0;
279
+ },
280
+ /*
281
+ * Formatted message in case it's an array
282
+ * (each element is separated by <br> tag)
283
+ */
284
+ formattedMessage() {
285
+ const parentField = this.parent;
286
+ if (parentField && parentField.hasInnerField) {
287
+ return "";
288
+ }
289
+ if (typeof this.newMessage === "string") {
290
+ return [this.newMessage];
291
+ }
292
+ const messages = [];
293
+ if (Array.isArray(this.newMessage)) {
294
+ this.newMessage.forEach((message) => {
295
+ if (typeof message === "string") {
296
+ messages.push(message);
297
+ } else {
298
+ for (const key in message) {
299
+ if (message[key]) {
300
+ messages.push(key);
301
+ }
302
+ }
303
+ }
304
+ });
305
+ } else {
306
+ for (const key in this.newMessage) {
307
+ if (this.newMessage[key]) {
308
+ messages.push(key);
309
+ }
310
+ }
311
+ }
312
+ return messages.filter((m) => !!m);
313
+ },
314
+ hasLabel() {
315
+ return this.label || this.$slots.label;
316
+ },
317
+ hasMessage() {
318
+ const parentField = this.parent;
319
+ return (!parentField || !parentField.hasInnerField) && this.newMessage || this.$slots.message;
320
+ }
321
+ },
322
+ watch: {
323
+ /*
324
+ * Set internal type when prop change.
325
+ */
326
+ type(value) {
327
+ this.newType = value;
328
+ },
329
+ /*
330
+ * Set internal message when prop change.
331
+ */
332
+ message(value) {
333
+ if (JSON.stringify(value) !== JSON.stringify(this.newMessage)) {
334
+ this.newMessage = value;
335
+ }
336
+ },
337
+ /*
338
+ * Set parent message if we use Field in Field.
339
+ */
340
+ newMessage(value) {
341
+ const parentField = this.parent;
342
+ if (parentField && parentField.hasInnerField) {
343
+ if (!parentField.type) {
344
+ parentField.newType = this.newType;
345
+ }
346
+ if (!parentField.message) {
347
+ parentField.newMessage = value;
348
+ }
349
+ }
350
+ }
351
+ },
352
+ methods: {
353
+ /*
354
+ * Field has addons if there are more than one slot
355
+ * (element / component) in the Field.
356
+ * Or is grouped when prop is set.
357
+ * Is a method to be called when component re-render.
358
+ */
359
+ fieldType() {
360
+ if (this.grouped) return "is-grouped";
361
+ if (this.hasAddons()) return "has-addons";
362
+ },
363
+ hasAddons() {
364
+ let renderedNode = 0;
365
+ if (this.$slots.default) {
366
+ renderedNode = this.$slots.default().reduce((i, node) => isTag(node) ? i + 1 : i, 0);
367
+ }
368
+ return renderedNode > 1 && this.addons && !this.horizontal;
369
+ },
370
+ // called by a number input if it is a direct child.
371
+ wrapNumberinput({ controlsPosition, size }) {
372
+ const classes = ["has-numberinput"];
373
+ if (controlsPosition) {
374
+ classes.push(`has-numberinput-${controlsPosition}`);
375
+ }
376
+ if (size) {
377
+ classes.push(`has-numberinput-${size}`);
378
+ }
379
+ this.numberInputClasses = classes;
380
+ }
381
+ },
382
+ mounted() {
383
+ if (this.horizontal) {
384
+ const elements = this.$el.querySelectorAll(".input, .select, .button, .textarea, .b-slider");
385
+ if (elements.length > 0) {
386
+ this.fieldLabelSize = "is-normal";
387
+ }
388
+ }
389
+ }
390
+ });
391
+
392
+ var _export_sfc = (sfc, props) => {
393
+ const target = sfc.__vccOpts || sfc;
394
+ for (const [key, val] of props) {
395
+ target[key] = val;
396
+ }
397
+ return target;
398
+ };
399
+
400
+ const _hoisted_1$5 = ["for"];
401
+ const _hoisted_2$5 = ["for"];
402
+ const _hoisted_3$4 = {
403
+ key: 3,
404
+ class: "field-body"
405
+ };
406
+ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
407
+ const _component_b_field_body = vue.resolveComponent("b-field-body");
408
+ const _component_b_field = vue.resolveComponent("b-field");
409
+ return vue.openBlock(), vue.createElementBlock(
410
+ "div",
411
+ {
412
+ class: vue.normalizeClass(["field", _ctx.rootClasses])
413
+ },
414
+ [
415
+ _ctx.horizontal ? (vue.openBlock(), vue.createElementBlock(
416
+ "div",
417
+ {
418
+ key: 0,
419
+ class: vue.normalizeClass(["field-label", [_ctx.customClass, _ctx.fieldLabelSize]])
420
+ },
421
+ [
422
+ _ctx.hasLabel ? (vue.openBlock(), vue.createElementBlock("label", {
423
+ key: 0,
424
+ for: _ctx.labelFor,
425
+ class: vue.normalizeClass([_ctx.customClass, "label"])
426
+ }, [
427
+ _ctx.$slots.label ? vue.renderSlot(_ctx.$slots, "label", { key: 0 }) : (vue.openBlock(), vue.createElementBlock(
428
+ vue.Fragment,
429
+ { key: 1 },
430
+ [
431
+ vue.createTextVNode(
432
+ vue.toDisplayString(_ctx.label),
433
+ 1
434
+ /* TEXT */
435
+ )
436
+ ],
437
+ 64
438
+ /* STABLE_FRAGMENT */
439
+ ))
440
+ ], 10, _hoisted_1$5)) : vue.createCommentVNode("v-if", true)
441
+ ],
442
+ 2
443
+ /* CLASS */
444
+ )) : (vue.openBlock(), vue.createElementBlock(
445
+ vue.Fragment,
446
+ { key: 1 },
447
+ [
448
+ _ctx.hasLabel ? (vue.openBlock(), vue.createElementBlock("label", {
449
+ key: 0,
450
+ for: _ctx.labelFor,
451
+ class: vue.normalizeClass([_ctx.customClass, "label"])
452
+ }, [
453
+ _ctx.$slots.label ? vue.renderSlot(_ctx.$slots, "label", { key: 0 }) : (vue.openBlock(), vue.createElementBlock(
454
+ vue.Fragment,
455
+ { key: 1 },
456
+ [
457
+ vue.createTextVNode(
458
+ vue.toDisplayString(_ctx.label),
459
+ 1
460
+ /* TEXT */
461
+ )
462
+ ],
463
+ 64
464
+ /* STABLE_FRAGMENT */
465
+ ))
466
+ ], 10, _hoisted_2$5)) : vue.createCommentVNode("v-if", true)
467
+ ],
468
+ 64
469
+ /* STABLE_FRAGMENT */
470
+ )),
471
+ _ctx.horizontal ? (vue.openBlock(), vue.createBlock(_component_b_field_body, {
472
+ key: 2,
473
+ message: _ctx.newMessage ? _ctx.formattedMessage : "",
474
+ type: _ctx.newType
475
+ }, {
476
+ default: vue.withCtx(() => [
477
+ vue.renderSlot(_ctx.$slots, "default")
478
+ ]),
479
+ _: 3
480
+ /* FORWARDED */
481
+ }, 8, ["message", "type"])) : _ctx.hasInnerField ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$4, [
482
+ vue.createVNode(_component_b_field, {
483
+ addons: false,
484
+ type: _ctx.type,
485
+ class: vue.normalizeClass(_ctx.innerFieldClasses)
486
+ }, {
487
+ default: vue.withCtx(() => [
488
+ vue.renderSlot(_ctx.$slots, "default")
489
+ ]),
490
+ _: 3
491
+ /* FORWARDED */
492
+ }, 8, ["type", "class"])
493
+ ])) : vue.renderSlot(_ctx.$slots, "default", { key: 4 }),
494
+ _ctx.hasMessage && !_ctx.horizontal ? (vue.openBlock(), vue.createElementBlock(
495
+ "p",
496
+ {
497
+ key: 5,
498
+ class: vue.normalizeClass(["help", _ctx.newType])
499
+ },
500
+ [
501
+ _ctx.$slots.message ? vue.renderSlot(_ctx.$slots, "message", {
502
+ key: 0,
503
+ messages: _ctx.formattedMessage
504
+ }) : (vue.openBlock(true), vue.createElementBlock(
505
+ vue.Fragment,
506
+ { key: 1 },
507
+ vue.renderList(_ctx.formattedMessage, (mess, i) => {
508
+ return vue.openBlock(), vue.createElementBlock(
509
+ vue.Fragment,
510
+ null,
511
+ [
512
+ vue.createTextVNode(
513
+ vue.toDisplayString(mess) + " ",
514
+ 1
515
+ /* TEXT */
516
+ ),
517
+ i + 1 < _ctx.formattedMessage.length ? (vue.openBlock(), vue.createElementBlock("br", { key: i })) : vue.createCommentVNode("v-if", true)
518
+ ],
519
+ 64
520
+ /* STABLE_FRAGMENT */
521
+ );
522
+ }),
523
+ 256
524
+ /* UNKEYED_FRAGMENT */
525
+ ))
526
+ ],
527
+ 2
528
+ /* CLASS */
529
+ )) : vue.createCommentVNode("v-if", true)
530
+ ],
531
+ 2
532
+ /* CLASS */
533
+ );
534
+ }
535
+ var BField = /* @__PURE__ */ _export_sfc(Field, [["render", _sfc_render$6]]);
536
+
537
+ const FormElementMixin = vue.defineComponent({
538
+ props: {
539
+ size: String,
540
+ expanded: Boolean,
541
+ loading: Boolean,
542
+ rounded: Boolean,
543
+ icon: String,
544
+ iconPack: String,
545
+ maxlength: [Number, String],
546
+ useHtml5Validation: {
547
+ type: Boolean,
548
+ default: () => config.defaultUseHtml5Validation
549
+ },
550
+ validationMessage: String,
551
+ locale: {
552
+ type: [String, Array],
553
+ default: () => {
554
+ return config.defaultLocale;
555
+ }
556
+ },
557
+ statusIcon: {
558
+ type: Boolean,
559
+ default: () => {
560
+ return config.defaultStatusIcon;
561
+ }
562
+ }
563
+ },
564
+ emits: {
565
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
566
+ blur: (event) => true,
567
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
568
+ focus: (event) => true
569
+ },
570
+ data() {
571
+ return {
572
+ isValid: true,
573
+ isFocused: false,
574
+ newIconPack: this.iconPack || config.defaultIconPack,
575
+ // host component must override this
576
+ _elementRef: ""
577
+ };
578
+ },
579
+ computed: {
580
+ /*
581
+ * Find parent Field, max 3 levels deep.
582
+ */
583
+ parentField() {
584
+ let parent = this.$parent;
585
+ for (let i = 0; i < 3; i++) {
586
+ if (parent && !parent.$data._isField) {
587
+ parent = parent.$parent;
588
+ }
589
+ }
590
+ return parent;
591
+ },
592
+ /*
593
+ * Get the type prop from parent if it's a Field.
594
+ */
595
+ statusType() {
596
+ const { newType } = this.parentField || {};
597
+ if (!newType) return;
598
+ if (typeof newType === "string") {
599
+ return newType;
600
+ } else {
601
+ for (const key in newType) {
602
+ if (newType[key]) {
603
+ return key;
604
+ }
605
+ }
606
+ }
607
+ return void 0;
608
+ },
609
+ /*
610
+ * Get the message prop from parent if it's a Field.
611
+ */
612
+ statusMessage() {
613
+ if (!this.parentField) return;
614
+ return this.parentField.newMessage || this.parentField.$slots.message;
615
+ },
616
+ /*
617
+ * Fix icon size for inputs, large was too big
618
+ */
619
+ iconSize() {
620
+ switch (this.size) {
621
+ case "is-small":
622
+ return this.size;
623
+ case "is-medium":
624
+ return;
625
+ case "is-large":
626
+ return this.newIconPack === "mdi" ? "is-medium" : "";
627
+ }
628
+ return void 0;
629
+ }
630
+ },
631
+ methods: {
632
+ /*
633
+ * Focus method that work dynamically depending on the component.
634
+ */
635
+ focus() {
636
+ const el = this.getElement();
637
+ if (el === void 0) return;
638
+ this.$nextTick(() => {
639
+ if (el) el.focus();
640
+ });
641
+ },
642
+ onBlur($event) {
643
+ this.isFocused = false;
644
+ this.$emit("blur", $event);
645
+ this.checkHtml5Validity();
646
+ },
647
+ onFocus($event) {
648
+ this.isFocused = true;
649
+ this.$emit("focus", $event);
650
+ },
651
+ getElement() {
652
+ let el = this.$refs[this.$data._elementRef];
653
+ while (el != null && typeof el === "object" && "$refs" in el) {
654
+ const form = el;
655
+ el = form.$refs[form.$data._elementRef];
656
+ }
657
+ return el;
658
+ },
659
+ setInvalid() {
660
+ const type = "is-danger";
661
+ const message = this.validationMessage || this.getElement().validationMessage;
662
+ this.setValidity(type, message);
663
+ },
664
+ setValidity(type, message) {
665
+ this.$nextTick(() => {
666
+ if (this.parentField) {
667
+ if (!this.parentField.type) {
668
+ this.parentField.newType = type;
669
+ }
670
+ if (!this.parentField.message) {
671
+ this.parentField.newMessage = message;
672
+ }
673
+ }
674
+ });
675
+ },
676
+ /*
677
+ * Check HTML5 validation, set isValid property.
678
+ * If validation fail, send 'is-danger' type,
679
+ * and error message to parent if it's a Field.
680
+ */
681
+ checkHtml5Validity() {
682
+ if (!this.useHtml5Validation) {
683
+ return false;
684
+ }
685
+ const el = this.getElement();
686
+ if (el == null) {
687
+ return false;
688
+ }
689
+ if (!el.checkValidity()) {
690
+ this.setInvalid();
691
+ this.isValid = false;
692
+ } else {
693
+ this.setValidity(null, null);
694
+ this.isValid = true;
695
+ }
696
+ return this.isValid;
697
+ }
698
+ }
699
+ });
700
+
701
+ const findFocusable = (element, programmatic = false) => {
702
+ if (!element) {
703
+ return null;
704
+ }
705
+ if (programmatic) {
706
+ return element.querySelectorAll('*[tabindex="-1"]');
707
+ }
708
+ return element.querySelectorAll(`a[href]:not([tabindex="-1"]),
709
+ area[href],
710
+ input:not([disabled]),
711
+ select:not([disabled]),
712
+ textarea:not([disabled]),
713
+ button:not([disabled]),
714
+ iframe,
715
+ object,
716
+ embed,
717
+ *[tabindex]:not([tabindex="-1"]),
718
+ *[contenteditable]`);
719
+ };
720
+ let onKeyDown;
721
+ const beforeMount = (el, { value = true }) => {
722
+ if (value) {
723
+ let focusable = findFocusable(el);
724
+ let focusableProg = findFocusable(el, true);
725
+ if (focusable && focusable.length > 0) {
726
+ onKeyDown = (event) => {
727
+ focusable = findFocusable(el);
728
+ focusableProg = findFocusable(el, true);
729
+ const firstFocusable = focusable[0];
730
+ const lastFocusable = focusable[focusable.length - 1];
731
+ if (event.target === firstFocusable && event.shiftKey && event.key === "Tab") {
732
+ event.preventDefault();
733
+ lastFocusable.focus();
734
+ } else if ((event.target === lastFocusable || Array.from(focusableProg).indexOf(event.target) >= 0) && !event.shiftKey && event.key === "Tab") {
735
+ event.preventDefault();
736
+ firstFocusable.focus();
737
+ }
738
+ };
739
+ el.addEventListener("keydown", onKeyDown);
740
+ }
741
+ }
742
+ };
743
+ const unmounted = (el) => {
744
+ el.removeEventListener("keydown", onKeyDown);
745
+ };
746
+ const directive = {
747
+ beforeMount,
748
+ unmounted
749
+ };
750
+
751
+ const DEFAULT_CLOSE_OPTIONS = ["escape", "outside"];
752
+ const DROPDOWN_INJECTION_KEY = Symbol("bdropdown");
753
+ var _sfc_main$5 = vue.defineComponent({
754
+ name: "BDropdown",
755
+ directives: {
756
+ trapFocus: directive
757
+ },
758
+ provide() {
759
+ return {
760
+ [DROPDOWN_INJECTION_KEY]: this
761
+ };
762
+ },
763
+ props: {
764
+ modelValue: {
765
+ type: [
766
+ String,
767
+ Number,
768
+ Boolean,
769
+ Object,
770
+ Array,
771
+ Function
772
+ ],
773
+ default: null
774
+ },
775
+ disabled: Boolean,
776
+ inline: Boolean,
777
+ scrollable: Boolean,
778
+ maxHeight: {
779
+ type: [String, Number],
780
+ default: 200
781
+ },
782
+ position: {
783
+ type: String,
784
+ validator(value) {
785
+ return [
786
+ "is-top-right",
787
+ "is-top-left",
788
+ "is-bottom-left",
789
+ "is-bottom-right"
790
+ ].indexOf(value) > -1;
791
+ }
792
+ },
793
+ triggers: {
794
+ type: Array,
795
+ default: () => ["click"]
796
+ },
797
+ mobileModal: {
798
+ type: Boolean,
799
+ default: () => {
800
+ return config.defaultDropdownMobileModal;
801
+ }
802
+ },
803
+ ariaRole: {
804
+ type: String,
805
+ validator(value) {
806
+ return [
807
+ "menu",
808
+ "list",
809
+ "dialog"
810
+ ].indexOf(value) > -1;
811
+ },
812
+ default: null
813
+ },
814
+ animation: {
815
+ type: String,
816
+ default: "fade"
817
+ },
818
+ multiple: Boolean,
819
+ trapFocus: {
820
+ type: Boolean,
821
+ default: () => {
822
+ return config.defaultTrapFocus;
823
+ }
824
+ },
825
+ closeOnClick: {
826
+ type: Boolean,
827
+ default: true
828
+ },
829
+ canClose: {
830
+ type: [Array, Boolean],
831
+ default: true
832
+ },
833
+ expanded: Boolean,
834
+ appendToBody: Boolean,
835
+ appendToBodyCopyParent: Boolean,
836
+ triggerTabindex: {
837
+ type: Number,
838
+ default: 0
839
+ }
840
+ },
841
+ emits: {
842
+ /* eslint-disable @typescript-eslint/no-unused-vars */
843
+ "active-change": (_isActive) => true,
844
+ change: (_selected) => true,
845
+ "update:modelValue": (_value) => true
846
+ /* eslint-enable @typescript-eslint/no-unused-vars */
847
+ },
848
+ data() {
849
+ return {
850
+ selected: this.modelValue,
851
+ style: {},
852
+ isActive: false,
853
+ isHoverable: false,
854
+ maybeTap: false,
855
+ isTouchEnabled: false,
856
+ _bodyEl: void 0,
857
+ // Used to append to body
858
+ timeOutID: void 0,
859
+ timeOutID2: void 0
860
+ };
861
+ },
862
+ computed: {
863
+ rootClasses() {
864
+ return [this.position, {
865
+ "is-disabled": this.disabled,
866
+ "is-hoverable": this.hoverable,
867
+ "is-inline": this.inline,
868
+ "is-active": this.isActive || this.inline,
869
+ "is-mobile-modal": this.isMobileModal,
870
+ "is-expanded": this.expanded,
871
+ "is-touch-enabled": this.isTouchEnabled
872
+ }];
873
+ },
874
+ isMobileModal() {
875
+ return this.mobileModal && !this.inline;
876
+ },
877
+ cancelOptions() {
878
+ return typeof this.canClose === "boolean" ? this.canClose ? DEFAULT_CLOSE_OPTIONS : [] : this.canClose;
879
+ },
880
+ contentStyle() {
881
+ var _a;
882
+ return {
883
+ maxHeight: this.scrollable ? (_a = toCssWidth(this.maxHeight)) != null ? _a : void 0 : void 0,
884
+ overflow: this.scrollable ? "auto" : void 0
885
+ };
886
+ },
887
+ hoverable() {
888
+ return this.triggers.indexOf("hover") >= 0;
889
+ }
890
+ },
891
+ watch: {
892
+ /*
893
+ * When v-model is changed set the new selected item.
894
+ */
895
+ modelValue(value) {
896
+ this.selected = value;
897
+ },
898
+ /*
899
+ * Emit event when isActive value is changed.
900
+ *
901
+ * Also resets `isTouchEnabled` when it turns inactive.
902
+ */
903
+ isActive(value) {
904
+ this.$emit("active-change", value);
905
+ if (!value) {
906
+ this.timeOutID = setTimeout(() => {
907
+ if (!this.isActive) {
908
+ this.isTouchEnabled = false;
909
+ }
910
+ }, 250);
911
+ }
912
+ this.handleScroll();
913
+ if (this.appendToBody) {
914
+ this.$nextTick(() => {
915
+ this.updateAppendToBody();
916
+ });
917
+ }
918
+ },
919
+ isHoverable(value) {
920
+ if (this.hoverable) {
921
+ this.$emit("active-change", value);
922
+ }
923
+ }
924
+ },
925
+ methods: {
926
+ handleScroll() {
927
+ if (typeof window === "undefined") return;
928
+ if (this.isMobileModal) {
929
+ if (this.isActive) {
930
+ document.documentElement.classList.add("is-clipped-touch");
931
+ } else {
932
+ document.documentElement.classList.remove("is-clipped-touch");
933
+ }
934
+ }
935
+ },
936
+ /*
937
+ * Click listener from DropdownItem.
938
+ * 1. Set new selected item.
939
+ * 2. Emit input event to update the user v-model.
940
+ * 3. Close the dropdown.
941
+ */
942
+ selectItem(value) {
943
+ if (this.multiple) {
944
+ if (this.selected) {
945
+ const selected = this.selected;
946
+ if (selected.indexOf(value) === -1) {
947
+ this.selected = [...selected, value];
948
+ } else {
949
+ this.selected = selected.filter((val) => val !== value);
950
+ }
951
+ } else {
952
+ this.selected = [value];
953
+ }
954
+ this.$emit("change", this.selected);
955
+ } else {
956
+ if (this.selected !== value) {
957
+ this.selected = value;
958
+ this.$emit("change", this.selected);
959
+ }
960
+ }
961
+ this.$emit("update:modelValue", this.selected);
962
+ if (!this.multiple) {
963
+ this.isActive = !this.closeOnClick;
964
+ if (this.hoverable && this.closeOnClick) {
965
+ this.isHoverable = false;
966
+ }
967
+ }
968
+ },
969
+ /*
970
+ * White-listed items to not close when clicked.
971
+ */
972
+ isInWhiteList(el) {
973
+ if (el === this.$refs.dropdownMenu) return true;
974
+ if (el === this.$refs.trigger) return true;
975
+ if (this.$refs.dropdownMenu != null) {
976
+ const children = this.$refs.dropdownMenu.querySelectorAll("*");
977
+ for (const child of children) {
978
+ if (el === child) {
979
+ return true;
980
+ }
981
+ }
982
+ }
983
+ if (this.$refs.trigger != null) {
984
+ const children = this.$refs.trigger.querySelectorAll("*");
985
+ for (const child of children) {
986
+ if (el === child) {
987
+ return true;
988
+ }
989
+ }
990
+ }
991
+ return false;
992
+ },
993
+ /*
994
+ * Close dropdown if clicked outside.
995
+ */
996
+ clickedOutside(event) {
997
+ if (this.cancelOptions.indexOf("outside") < 0) return;
998
+ if (this.inline) return;
999
+ const target = isCustomElement(this) ? event.composedPath()[0] : event.target;
1000
+ if (!this.isInWhiteList(target)) this.isActive = false;
1001
+ },
1002
+ /*
1003
+ * Keypress event that is bound to the document
1004
+ */
1005
+ keyPress({ key }) {
1006
+ if (this.isActive && (key === "Escape" || key === "Esc")) {
1007
+ if (this.cancelOptions.indexOf("escape") < 0) return;
1008
+ this.isActive = false;
1009
+ }
1010
+ },
1011
+ onClick() {
1012
+ if (this.triggers.indexOf("hover") !== -1) return;
1013
+ if (this.triggers.indexOf("click") < 0) return;
1014
+ this.toggle();
1015
+ },
1016
+ onContextMenu() {
1017
+ if (this.triggers.indexOf("contextmenu") < 0) return;
1018
+ this.toggle();
1019
+ },
1020
+ onHover() {
1021
+ if (this.triggers.indexOf("hover") < 0) return;
1022
+ if (this.isTouchEnabled) return;
1023
+ this.isHoverable = true;
1024
+ },
1025
+ // takes care of touch-enabled devices
1026
+ // - does nothing if hover trigger is disabled
1027
+ // - suppresses hover trigger by setting isTouchEnabled
1028
+ // - handles only a tap; i.e., touchstart on the trigger immediately
1029
+ // folowed by touchend
1030
+ onTouchStart() {
1031
+ this.maybeTap = true;
1032
+ },
1033
+ onTouchMove() {
1034
+ this.maybeTap = false;
1035
+ },
1036
+ onTouchEnd(e) {
1037
+ if (this.triggers.indexOf("hover") === -1) return;
1038
+ if (!this.maybeTap) return;
1039
+ e.preventDefault();
1040
+ this.maybeTap = false;
1041
+ this.isTouchEnabled = true;
1042
+ this.toggle();
1043
+ },
1044
+ onFocus() {
1045
+ if (this.triggers.indexOf("focus") < 0) return;
1046
+ this.toggle();
1047
+ },
1048
+ /*
1049
+ * Toggle dropdown if it's not disabled.
1050
+ */
1051
+ toggle() {
1052
+ if (this.disabled) return;
1053
+ if (!this.isActive) {
1054
+ this.timeOutID2 = setTimeout(() => {
1055
+ const value = !this.isActive;
1056
+ this.isActive = value;
1057
+ });
1058
+ } else {
1059
+ this.isActive = !this.isActive;
1060
+ }
1061
+ },
1062
+ updateAppendToBody() {
1063
+ const dropdown = this.$refs.dropdown;
1064
+ const dropdownMenu = this.$refs.dropdownMenu;
1065
+ const trigger = this.$refs.trigger;
1066
+ if (dropdownMenu && trigger) {
1067
+ const dropdownWrapper = this.$data._bodyEl.children[0];
1068
+ dropdownWrapper.classList.forEach((item) => dropdownWrapper.classList.remove(item));
1069
+ dropdownWrapper.classList.add("dropdown");
1070
+ dropdownWrapper.classList.add("dropdown-menu-animation");
1071
+ this.rootClasses.forEach((item) => {
1072
+ if (item && typeof item === "object") {
1073
+ for (const key in item) {
1074
+ if (item[key]) {
1075
+ dropdownWrapper.classList.add(key);
1076
+ }
1077
+ }
1078
+ }
1079
+ });
1080
+ if (this.appendToBodyCopyParent) {
1081
+ const parentNode = this.$refs.dropdown.parentNode;
1082
+ const parent = this.$data._bodyEl;
1083
+ parent.classList.forEach((item) => parent.classList.remove(item));
1084
+ parentNode.classList.forEach((item) => {
1085
+ parent.classList.add(item);
1086
+ });
1087
+ }
1088
+ const rect = trigger.getBoundingClientRect();
1089
+ let top = rect.top + window.scrollY;
1090
+ let left = rect.left + window.scrollX;
1091
+ if (!this.position || this.position.indexOf("bottom") >= 0) {
1092
+ top += trigger.clientHeight;
1093
+ } else {
1094
+ top -= dropdownMenu.clientHeight;
1095
+ }
1096
+ if (this.position && this.position.indexOf("left") >= 0) {
1097
+ left -= dropdownMenu.clientWidth - trigger.clientWidth;
1098
+ }
1099
+ this.style = {
1100
+ position: "absolute",
1101
+ top: `${top}px`,
1102
+ left: `${left}px`,
1103
+ zIndex: "99",
1104
+ width: this.expanded ? `${dropdown.offsetWidth}px` : void 0
1105
+ };
1106
+ }
1107
+ }
1108
+ },
1109
+ mounted() {
1110
+ if (this.appendToBody) {
1111
+ this.$data._bodyEl = createAbsoluteElement(this.$refs.dropdownMenu);
1112
+ this.updateAppendToBody();
1113
+ }
1114
+ },
1115
+ created() {
1116
+ if (typeof window !== "undefined") {
1117
+ document.addEventListener("click", this.clickedOutside);
1118
+ document.addEventListener("keyup", this.keyPress);
1119
+ }
1120
+ },
1121
+ beforeUnmount() {
1122
+ if (typeof window !== "undefined") {
1123
+ document.removeEventListener("click", this.clickedOutside);
1124
+ document.removeEventListener("keyup", this.keyPress);
1125
+ }
1126
+ if (this.appendToBody) {
1127
+ removeElement(this.$data._bodyEl);
1128
+ }
1129
+ clearTimeout(this.timeOutID);
1130
+ clearTimeout(this.timeOutID2);
1131
+ }
1132
+ });
1133
+
1134
+ const _hoisted_1$4 = ["tabindex"];
1135
+ const _hoisted_2$4 = ["aria-hidden"];
1136
+ const _hoisted_3$3 = ["aria-hidden"];
1137
+ const _hoisted_4$2 = ["role", "aria-modal"];
1138
+ function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
1139
+ const _directive_trap_focus = vue.resolveDirective("trap-focus");
1140
+ return vue.openBlock(), vue.createElementBlock(
1141
+ "div",
1142
+ {
1143
+ class: vue.normalizeClass(["dropdown dropdown-menu-animation", _ctx.rootClasses]),
1144
+ ref: "dropdown",
1145
+ onMouseleave: _cache[7] || (_cache[7] = ($event) => _ctx.isHoverable = false)
1146
+ },
1147
+ [
1148
+ !_ctx.inline ? (vue.openBlock(), vue.createElementBlock("div", {
1149
+ key: 0,
1150
+ tabindex: _ctx.disabled ? void 0 : _ctx.triggerTabindex,
1151
+ ref: "trigger",
1152
+ class: "dropdown-trigger",
1153
+ onClick: _cache[0] || (_cache[0] = (...args) => _ctx.onClick && _ctx.onClick(...args)),
1154
+ onContextmenu: _cache[1] || (_cache[1] = vue.withModifiers((...args) => _ctx.onContextMenu && _ctx.onContextMenu(...args), ["prevent"])),
1155
+ onMouseenter: _cache[2] || (_cache[2] = (...args) => _ctx.onHover && _ctx.onHover(...args)),
1156
+ onFocusCapture: _cache[3] || (_cache[3] = (...args) => _ctx.onFocus && _ctx.onFocus(...args)),
1157
+ onTouchstart: _cache[4] || (_cache[4] = (...args) => _ctx.onTouchStart && _ctx.onTouchStart(...args)),
1158
+ onTouchmove: _cache[5] || (_cache[5] = (...args) => _ctx.onTouchMove && _ctx.onTouchMove(...args)),
1159
+ onTouchend: _cache[6] || (_cache[6] = (...args) => _ctx.onTouchEnd && _ctx.onTouchEnd(...args)),
1160
+ "aria-haspopup": "true"
1161
+ }, [
1162
+ vue.renderSlot(_ctx.$slots, "trigger", { active: _ctx.isActive })
1163
+ ], 40, _hoisted_1$4)) : vue.createCommentVNode("v-if", true),
1164
+ vue.createVNode(vue.Transition, { name: _ctx.animation }, {
1165
+ default: vue.withCtx(() => [
1166
+ _ctx.isMobileModal ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
1167
+ key: 0,
1168
+ class: "background",
1169
+ "aria-hidden": !_ctx.isActive
1170
+ }, null, 8, _hoisted_2$4)), [
1171
+ [vue.vShow, _ctx.isActive]
1172
+ ]) : vue.createCommentVNode("v-if", true)
1173
+ ]),
1174
+ _: 1
1175
+ /* STABLE */
1176
+ }, 8, ["name"]),
1177
+ vue.createVNode(vue.Transition, {
1178
+ name: _ctx.animation,
1179
+ persisted: ""
1180
+ }, {
1181
+ default: vue.withCtx(() => [
1182
+ vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
1183
+ ref: "dropdownMenu",
1184
+ class: "dropdown-menu",
1185
+ style: vue.normalizeStyle(_ctx.style),
1186
+ "aria-hidden": !_ctx.isActive
1187
+ }, [
1188
+ vue.createElementVNode("div", {
1189
+ class: "dropdown-content",
1190
+ role: _ctx.ariaRole,
1191
+ "aria-modal": !_ctx.inline,
1192
+ style: vue.normalizeStyle(_ctx.contentStyle)
1193
+ }, [
1194
+ vue.renderSlot(_ctx.$slots, "default")
1195
+ ], 12, _hoisted_4$2)
1196
+ ], 12, _hoisted_3$3)), [
1197
+ [vue.vShow, !_ctx.disabled && (_ctx.isActive || _ctx.isHoverable) || _ctx.inline],
1198
+ [_directive_trap_focus, _ctx.trapFocus]
1199
+ ])
1200
+ ]),
1201
+ _: 3
1202
+ /* FORWARDED */
1203
+ }, 8, ["name"])
1204
+ ],
1205
+ 34
1206
+ /* CLASS, NEED_HYDRATION */
1207
+ );
1208
+ }
1209
+ var BDropdown = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$5]]);
1210
+
1211
+ var _sfc_main$4 = vue.defineComponent({
1212
+ name: "BDropdownItem",
1213
+ inject: {
1214
+ parent: {
1215
+ from: DROPDOWN_INJECTION_KEY,
1216
+ default: void 0
1217
+ }
1218
+ },
1219
+ props: {
1220
+ value: {
1221
+ type: [String, Number, Boolean, Object, Array, Function],
1222
+ default: null
1223
+ },
1224
+ separator: Boolean,
1225
+ disabled: Boolean,
1226
+ custom: Boolean,
1227
+ focusable: {
1228
+ type: Boolean,
1229
+ default: true
1230
+ },
1231
+ paddingless: Boolean,
1232
+ hasLink: Boolean,
1233
+ ariaRole: {
1234
+ type: String,
1235
+ default: ""
1236
+ }
1237
+ },
1238
+ emits: {
1239
+ click: () => true
1240
+ },
1241
+ computed: {
1242
+ anchorClasses() {
1243
+ return {
1244
+ "is-disabled": this.parent.disabled || this.disabled,
1245
+ "is-paddingless": this.paddingless,
1246
+ "is-active": this.isActive
1247
+ };
1248
+ },
1249
+ itemClasses() {
1250
+ return {
1251
+ "dropdown-item": !this.hasLink,
1252
+ "is-disabled": this.disabled,
1253
+ "is-paddingless": this.paddingless,
1254
+ "is-active": this.isActive,
1255
+ "has-link": this.hasLink
1256
+ };
1257
+ },
1258
+ ariaRoleItem() {
1259
+ return this.ariaRole === "menuitem" || this.ariaRole === "listitem" ? this.ariaRole : void 0;
1260
+ },
1261
+ isClickable() {
1262
+ return !this.parent.disabled && !this.separator && !this.disabled && !this.custom;
1263
+ },
1264
+ isActive() {
1265
+ if (this.parent.selected === null) return false;
1266
+ if (this.parent.multiple) {
1267
+ return this.parent.selected.indexOf(this.value) >= 0;
1268
+ }
1269
+ return this.value === this.parent.selected;
1270
+ },
1271
+ isFocusable() {
1272
+ return this.hasLink ? false : this.focusable;
1273
+ }
1274
+ },
1275
+ methods: {
1276
+ /*
1277
+ * Click listener, select the item.
1278
+ */
1279
+ selectItem() {
1280
+ if (!this.isClickable) return;
1281
+ this.parent.selectItem(this.value);
1282
+ this.$emit("click");
1283
+ }
1284
+ }
1285
+ });
1286
+
1287
+ const _hoisted_1$3 = {
1288
+ key: 0,
1289
+ class: "dropdown-divider"
1290
+ };
1291
+ const _hoisted_2$3 = ["role", "tabindex"];
1292
+ const _hoisted_3$2 = ["role", "tabindex"];
1293
+ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
1294
+ return _ctx.separator ? (vue.openBlock(), vue.createElementBlock("hr", _hoisted_1$3)) : !_ctx.custom && !_ctx.hasLink ? (vue.openBlock(), vue.createElementBlock("a", {
1295
+ key: 1,
1296
+ class: vue.normalizeClass(["dropdown-item", _ctx.anchorClasses]),
1297
+ onClick: _cache[0] || (_cache[0] = (...args) => _ctx.selectItem && _ctx.selectItem(...args)),
1298
+ role: _ctx.ariaRoleItem,
1299
+ tabindex: _ctx.isFocusable ? 0 : void 0
1300
+ }, [
1301
+ vue.renderSlot(_ctx.$slots, "default")
1302
+ ], 10, _hoisted_2$3)) : (vue.openBlock(), vue.createElementBlock("div", {
1303
+ key: 2,
1304
+ class: vue.normalizeClass(_ctx.itemClasses),
1305
+ onClick: _cache[1] || (_cache[1] = (...args) => _ctx.selectItem && _ctx.selectItem(...args)),
1306
+ role: _ctx.ariaRoleItem,
1307
+ tabindex: _ctx.isFocusable ? 0 : void 0
1308
+ }, [
1309
+ vue.renderSlot(_ctx.$slots, "default")
1310
+ ], 10, _hoisted_3$2));
1311
+ }
1312
+ var BDropdownItem = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$4]]);
1313
+
1314
+ const registerComponent = (Vue, component, name) => {
1315
+ const componentName = component.name;
1316
+ if (componentName == null) {
1317
+ throw new Error("Buefy.registerComponent: missing component name");
1318
+ }
1319
+ Vue.component(componentName, component);
1320
+ };
1321
+
1322
+ const mdiIcons = {
1323
+ sizes: {
1324
+ default: "mdi-24px",
1325
+ "is-small": null,
1326
+ "is-medium": "mdi-36px",
1327
+ "is-large": "mdi-48px"
1328
+ },
1329
+ iconPrefix: "mdi-"
1330
+ };
1331
+ const faIcons = () => {
1332
+ const faIconPrefix = "fa-";
1333
+ return {
1334
+ sizes: {
1335
+ default: null,
1336
+ "is-small": null,
1337
+ "is-medium": faIconPrefix + "lg",
1338
+ "is-large": faIconPrefix + "2x"
1339
+ },
1340
+ iconPrefix: faIconPrefix,
1341
+ internalIcons: {
1342
+ information: "info-circle",
1343
+ alert: "exclamation-triangle",
1344
+ "alert-circle": "exclamation-circle",
1345
+ "chevron-right": "angle-right",
1346
+ "chevron-left": "angle-left",
1347
+ "chevron-down": "angle-down",
1348
+ "eye-off": "eye-slash",
1349
+ "menu-down": "caret-down",
1350
+ "menu-up": "caret-up",
1351
+ "close-circle": "times-circle"
1352
+ }
1353
+ };
1354
+ };
1355
+ const getIcons = () => {
1356
+ let icons = {
1357
+ mdi: mdiIcons,
1358
+ fa: faIcons(),
1359
+ fas: faIcons(),
1360
+ far: faIcons(),
1361
+ fad: faIcons(),
1362
+ fab: faIcons(),
1363
+ fal: faIcons(),
1364
+ "fa-solid": faIcons(),
1365
+ "fa-regular": faIcons(),
1366
+ "fa-light": faIcons(),
1367
+ "fa-thin": faIcons(),
1368
+ "fa-duotone": faIcons(),
1369
+ "fa-brands": faIcons()
1370
+ };
1371
+ return icons;
1372
+ };
1373
+
1374
+ var _sfc_main$3 = vue.defineComponent({
1375
+ name: "BIcon",
1376
+ props: {
1377
+ type: [String, Object],
1378
+ component: String,
1379
+ pack: String,
1380
+ icon: {
1381
+ type: String,
1382
+ required: true
1383
+ },
1384
+ size: String,
1385
+ customSize: String,
1386
+ customClass: String,
1387
+ both: Boolean
1388
+ // This is used internally to show both MDI and FA icon
1389
+ },
1390
+ computed: {
1391
+ iconConfig() {
1392
+ const allIcons = getIcons();
1393
+ return allIcons[this.newPack];
1394
+ },
1395
+ iconPrefix() {
1396
+ if (this.iconConfig && this.iconConfig.iconPrefix) {
1397
+ return this.iconConfig.iconPrefix;
1398
+ }
1399
+ return "";
1400
+ },
1401
+ /*
1402
+ * Internal icon name based on the pack.
1403
+ * If pack is 'fa', gets the equivalent FA icon name of the MDI,
1404
+ * internal icons are always MDI.
1405
+ */
1406
+ newIcon() {
1407
+ return `${this.iconPrefix}${this.getEquivalentIconOf(this.icon)}`;
1408
+ },
1409
+ newPack() {
1410
+ return this.pack || config.defaultIconPack;
1411
+ },
1412
+ newType() {
1413
+ if (!this.type) return;
1414
+ let splitType = [];
1415
+ if (typeof this.type === "string") {
1416
+ splitType = this.type.split("-");
1417
+ } else {
1418
+ for (const key in this.type) {
1419
+ if (this.type[key]) {
1420
+ splitType = key.split("-");
1421
+ break;
1422
+ }
1423
+ }
1424
+ }
1425
+ if (splitType.length <= 1) return;
1426
+ const [, ...type] = splitType;
1427
+ return `has-text-${type.join("-")}`;
1428
+ },
1429
+ newCustomSize() {
1430
+ return this.customSize || this.customSizeByPack;
1431
+ },
1432
+ customSizeByPack() {
1433
+ if (this.iconConfig && this.iconConfig.sizes) {
1434
+ if (this.size && this.iconConfig.sizes[this.size] !== void 0) {
1435
+ return this.iconConfig.sizes[this.size];
1436
+ } else if (this.iconConfig.sizes.default) {
1437
+ return this.iconConfig.sizes.default;
1438
+ }
1439
+ }
1440
+ return null;
1441
+ },
1442
+ useIconComponent() {
1443
+ return this.component || config.defaultIconComponent;
1444
+ }
1445
+ },
1446
+ methods: {
1447
+ /*
1448
+ * Equivalent icon name of the MDI.
1449
+ */
1450
+ getEquivalentIconOf(value) {
1451
+ if (!this.both) {
1452
+ return value;
1453
+ }
1454
+ if (this.iconConfig == null) {
1455
+ return value;
1456
+ }
1457
+ const maybeInternal = this.iconConfig;
1458
+ if (maybeInternal && maybeInternal.internalIcons && maybeInternal.internalIcons[value]) {
1459
+ return maybeInternal.internalIcons[value];
1460
+ }
1461
+ return value;
1462
+ }
1463
+ }
1464
+ });
1465
+
1466
+ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
1467
+ return vue.openBlock(), vue.createElementBlock(
1468
+ "span",
1469
+ {
1470
+ class: vue.normalizeClass(["icon", [_ctx.newType, _ctx.size]])
1471
+ },
1472
+ [
1473
+ !_ctx.useIconComponent ? (vue.openBlock(), vue.createElementBlock(
1474
+ "i",
1475
+ {
1476
+ key: 0,
1477
+ class: vue.normalizeClass([_ctx.newPack, _ctx.newIcon, _ctx.newCustomSize, _ctx.customClass])
1478
+ },
1479
+ null,
1480
+ 2
1481
+ /* CLASS */
1482
+ )) : (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.useIconComponent), {
1483
+ key: 1,
1484
+ icon: [_ctx.newPack, _ctx.newIcon],
1485
+ size: _ctx.newCustomSize,
1486
+ class: vue.normalizeClass([_ctx.customClass])
1487
+ }, null, 8, ["icon", "size", "class"]))
1488
+ ],
1489
+ 2
1490
+ /* CLASS */
1491
+ );
1492
+ }
1493
+ var BIcon = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$3]]);
1494
+
1495
+ var _sfc_main$2 = vue.defineComponent({
1496
+ name: "BInput",
1497
+ components: { BIcon },
1498
+ mixins: [CompatFallthroughMixin, FormElementMixin],
1499
+ props: {
1500
+ modelValue: {
1501
+ type: [Number, String]
1502
+ },
1503
+ type: {
1504
+ type: String,
1505
+ default: "text"
1506
+ },
1507
+ lazy: {
1508
+ type: Boolean,
1509
+ default: false
1510
+ },
1511
+ passwordReveal: Boolean,
1512
+ iconClickable: Boolean,
1513
+ hasCounter: {
1514
+ type: Boolean,
1515
+ default: () => config.defaultInputHasCounter
1516
+ },
1517
+ customClass: {
1518
+ type: String,
1519
+ default: ""
1520
+ },
1521
+ iconRight: String,
1522
+ iconRightClickable: Boolean,
1523
+ iconRightType: String,
1524
+ // Native options to use in HTML5 validation
1525
+ autocomplete: String
1526
+ },
1527
+ emits: {
1528
+ /* eslint-disable @typescript-eslint/no-unused-vars */
1529
+ "icon-click": (event) => true,
1530
+ "icon-right-click": (event) => true,
1531
+ "update:modelValue": (value) => true
1532
+ /* eslint-enable @typescript-eslint/no-unused-vars */
1533
+ },
1534
+ data() {
1535
+ return {
1536
+ newValue: this.modelValue,
1537
+ newType: this.type,
1538
+ newAutocomplete: this.autocomplete || config.defaultInputAutocomplete,
1539
+ isPasswordVisible: false,
1540
+ _elementRef: this.type === "textarea" ? "textarea" : "input"
1541
+ };
1542
+ },
1543
+ computed: {
1544
+ computedValue: {
1545
+ get() {
1546
+ return this.newValue;
1547
+ },
1548
+ set(value) {
1549
+ this.newValue = value;
1550
+ this.$emit("update:modelValue", value);
1551
+ }
1552
+ },
1553
+ rootClasses() {
1554
+ return [
1555
+ this.iconPosition,
1556
+ this.size,
1557
+ {
1558
+ "is-expanded": this.expanded,
1559
+ "is-loading": this.loading,
1560
+ "is-clearfix": !this.hasMessage
1561
+ }
1562
+ ];
1563
+ },
1564
+ inputClasses() {
1565
+ return [
1566
+ this.statusType,
1567
+ this.size,
1568
+ { "is-rounded": this.rounded }
1569
+ ];
1570
+ },
1571
+ hasIconRight() {
1572
+ return this.passwordReveal || this.loading || this.statusIcon && this.statusTypeIcon || this.iconRight;
1573
+ },
1574
+ rightIcon() {
1575
+ if (this.passwordReveal) {
1576
+ return this.passwordVisibleIcon;
1577
+ } else if (this.iconRight) {
1578
+ return this.iconRight;
1579
+ }
1580
+ return this.statusTypeIcon;
1581
+ },
1582
+ rightIconType() {
1583
+ if (this.passwordReveal) {
1584
+ return "is-primary";
1585
+ } else if (this.iconRight) {
1586
+ return this.iconRightType || void 0;
1587
+ }
1588
+ return this.statusType;
1589
+ },
1590
+ /*
1591
+ * Position of the icon or if it's both sides.
1592
+ */
1593
+ iconPosition() {
1594
+ let iconClasses = "";
1595
+ if (this.icon) {
1596
+ iconClasses += "has-icons-left ";
1597
+ }
1598
+ if (this.hasIconRight) {
1599
+ iconClasses += "has-icons-right";
1600
+ }
1601
+ return iconClasses;
1602
+ },
1603
+ /*
1604
+ * Icon name (MDI) based on the type.
1605
+ */
1606
+ statusTypeIcon() {
1607
+ switch (this.statusType) {
1608
+ case "is-success":
1609
+ return "check";
1610
+ case "is-danger":
1611
+ return "alert-circle";
1612
+ case "is-info":
1613
+ return "information";
1614
+ case "is-warning":
1615
+ return "alert";
1616
+ default:
1617
+ return void 0;
1618
+ }
1619
+ },
1620
+ /*
1621
+ * Check if have any message prop from parent if it's a Field.
1622
+ */
1623
+ hasMessage() {
1624
+ return !!this.statusMessage;
1625
+ },
1626
+ /*
1627
+ * Current password-reveal icon name.
1628
+ */
1629
+ passwordVisibleIcon() {
1630
+ return !this.isPasswordVisible ? "eye" : "eye-off";
1631
+ },
1632
+ /*
1633
+ * Get value length
1634
+ */
1635
+ valueLength() {
1636
+ if (typeof this.computedValue === "string") {
1637
+ return Array.from(this.computedValue).length;
1638
+ } else if (typeof this.computedValue === "number") {
1639
+ return this.computedValue.toString().length;
1640
+ }
1641
+ return 0;
1642
+ }
1643
+ },
1644
+ watch: {
1645
+ /*
1646
+ * When v-model is changed:
1647
+ * 1. Set internal value.
1648
+ * 2. Validate it if the value came from outside;
1649
+ * i.e., not equal to computedValue
1650
+ */
1651
+ modelValue(value) {
1652
+ const fromOutside = this.computedValue != value;
1653
+ this.newValue = value;
1654
+ if (fromOutside) {
1655
+ this.$nextTick(() => {
1656
+ !this.isValid && this.checkHtml5Validity();
1657
+ });
1658
+ }
1659
+ },
1660
+ type(type) {
1661
+ this.newType = type;
1662
+ }
1663
+ },
1664
+ methods: {
1665
+ /*
1666
+ * Toggle the visibility of a password-reveal input
1667
+ * by changing the type and focus the input right away.
1668
+ */
1669
+ togglePasswordVisibility() {
1670
+ this.isPasswordVisible = !this.isPasswordVisible;
1671
+ this.newType = this.isPasswordVisible ? "text" : "password";
1672
+ this.$nextTick(() => {
1673
+ this.focus();
1674
+ });
1675
+ },
1676
+ iconClick(emit, event) {
1677
+ this.$emit(emit, event);
1678
+ this.$nextTick(() => {
1679
+ this.focus();
1680
+ });
1681
+ },
1682
+ rightIconClick(event) {
1683
+ if (this.passwordReveal) {
1684
+ this.togglePasswordVisibility();
1685
+ } else if (this.iconRightClickable) {
1686
+ this.iconClick("icon-right-click", event);
1687
+ }
1688
+ },
1689
+ onInput() {
1690
+ if (!this.lazy) {
1691
+ this.revalidate();
1692
+ }
1693
+ },
1694
+ onChange() {
1695
+ if (this.lazy) {
1696
+ this.revalidate();
1697
+ }
1698
+ },
1699
+ revalidate() {
1700
+ !this.isValid && this.checkHtml5Validity();
1701
+ }
1702
+ }
1703
+ });
1704
+
1705
+ const _hoisted_1$2 = ["type", "autocomplete", "maxlength"];
1706
+ const _hoisted_2$2 = ["maxlength"];
1707
+ const _hoisted_3$1 = ["type", "autocomplete", "maxlength"];
1708
+ const _hoisted_4$1 = ["maxlength"];
1709
+ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
1710
+ const _component_b_icon = vue.resolveComponent("b-icon");
1711
+ return vue.openBlock(), vue.createElementBlock(
1712
+ "div",
1713
+ vue.mergeProps({
1714
+ class: ["control", _ctx.rootClasses]
1715
+ }, _ctx.rootAttrs),
1716
+ [
1717
+ _ctx.lazy ? (vue.openBlock(), vue.createElementBlock(
1718
+ vue.Fragment,
1719
+ { key: 0 },
1720
+ [
1721
+ _ctx.type !== "textarea" ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("input", vue.mergeProps({
1722
+ key: 0,
1723
+ ref: "input",
1724
+ class: ["input", [_ctx.inputClasses, _ctx.customClass]],
1725
+ type: _ctx.newType,
1726
+ autocomplete: _ctx.newAutocomplete,
1727
+ maxlength: _ctx.maxlength,
1728
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.computedValue = $event)
1729
+ }, _ctx.fallthroughAttrs, {
1730
+ onInput: _cache[1] || (_cache[1] = (...args) => _ctx.onInput && _ctx.onInput(...args)),
1731
+ onChange: _cache[2] || (_cache[2] = (...args) => _ctx.onChange && _ctx.onChange(...args)),
1732
+ onBlur: _cache[3] || (_cache[3] = (...args) => _ctx.onBlur && _ctx.onBlur(...args)),
1733
+ onFocus: _cache[4] || (_cache[4] = (...args) => _ctx.onFocus && _ctx.onFocus(...args))
1734
+ }), null, 16, _hoisted_1$2)), [
1735
+ [
1736
+ vue.vModelDynamic,
1737
+ _ctx.computedValue,
1738
+ void 0,
1739
+ { lazy: true }
1740
+ ]
1741
+ ]) : vue.withDirectives((vue.openBlock(), vue.createElementBlock("textarea", vue.mergeProps({
1742
+ key: 1,
1743
+ ref: "textarea",
1744
+ class: ["textarea", [_ctx.inputClasses, _ctx.customClass]],
1745
+ maxlength: _ctx.maxlength,
1746
+ "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => _ctx.computedValue = $event)
1747
+ }, _ctx.fallthroughAttrs, {
1748
+ onInput: _cache[6] || (_cache[6] = (...args) => _ctx.onInput && _ctx.onInput(...args)),
1749
+ onChange: _cache[7] || (_cache[7] = (...args) => _ctx.onChange && _ctx.onChange(...args)),
1750
+ onBlur: _cache[8] || (_cache[8] = (...args) => _ctx.onBlur && _ctx.onBlur(...args)),
1751
+ onFocus: _cache[9] || (_cache[9] = (...args) => _ctx.onFocus && _ctx.onFocus(...args))
1752
+ }), null, 16, _hoisted_2$2)), [
1753
+ [
1754
+ vue.vModelText,
1755
+ _ctx.computedValue,
1756
+ void 0,
1757
+ { lazy: true }
1758
+ ]
1759
+ ])
1760
+ ],
1761
+ 64
1762
+ /* STABLE_FRAGMENT */
1763
+ )) : (vue.openBlock(), vue.createElementBlock(
1764
+ vue.Fragment,
1765
+ { key: 1 },
1766
+ [
1767
+ _ctx.type !== "textarea" ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("input", vue.mergeProps({
1768
+ key: 0,
1769
+ ref: "input",
1770
+ class: ["input", [_ctx.inputClasses, _ctx.customClass]],
1771
+ type: _ctx.newType,
1772
+ autocomplete: _ctx.newAutocomplete,
1773
+ maxlength: _ctx.maxlength,
1774
+ "onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => _ctx.computedValue = $event)
1775
+ }, _ctx.fallthroughAttrs, {
1776
+ onInput: _cache[11] || (_cache[11] = (...args) => _ctx.onInput && _ctx.onInput(...args)),
1777
+ onChange: _cache[12] || (_cache[12] = (...args) => _ctx.onChange && _ctx.onChange(...args)),
1778
+ onBlur: _cache[13] || (_cache[13] = (...args) => _ctx.onBlur && _ctx.onBlur(...args)),
1779
+ onFocus: _cache[14] || (_cache[14] = (...args) => _ctx.onFocus && _ctx.onFocus(...args))
1780
+ }), null, 16, _hoisted_3$1)), [
1781
+ [vue.vModelDynamic, _ctx.computedValue]
1782
+ ]) : vue.withDirectives((vue.openBlock(), vue.createElementBlock("textarea", vue.mergeProps({
1783
+ key: 1,
1784
+ ref: "textarea",
1785
+ class: ["textarea", [_ctx.inputClasses, _ctx.customClass]],
1786
+ maxlength: _ctx.maxlength,
1787
+ "onUpdate:modelValue": _cache[15] || (_cache[15] = ($event) => _ctx.computedValue = $event)
1788
+ }, _ctx.fallthroughAttrs, {
1789
+ onInput: _cache[16] || (_cache[16] = (...args) => _ctx.onInput && _ctx.onInput(...args)),
1790
+ onChange: _cache[17] || (_cache[17] = (...args) => _ctx.onChange && _ctx.onChange(...args)),
1791
+ onBlur: _cache[18] || (_cache[18] = (...args) => _ctx.onBlur && _ctx.onBlur(...args)),
1792
+ onFocus: _cache[19] || (_cache[19] = (...args) => _ctx.onFocus && _ctx.onFocus(...args))
1793
+ }), null, 16, _hoisted_4$1)), [
1794
+ [vue.vModelText, _ctx.computedValue]
1795
+ ])
1796
+ ],
1797
+ 64
1798
+ /* STABLE_FRAGMENT */
1799
+ )),
1800
+ _ctx.icon ? (vue.openBlock(), vue.createBlock(_component_b_icon, {
1801
+ key: 2,
1802
+ class: vue.normalizeClass(["is-left", { "is-clickable": _ctx.iconClickable }]),
1803
+ icon: _ctx.icon,
1804
+ pack: _ctx.iconPack,
1805
+ size: _ctx.iconSize,
1806
+ onClick: _cache[20] || (_cache[20] = ($event) => _ctx.iconClick("icon-click", $event))
1807
+ }, null, 8, ["class", "icon", "pack", "size"])) : vue.createCommentVNode("v-if", true),
1808
+ !_ctx.loading && _ctx.hasIconRight && _ctx.rightIcon ? (vue.openBlock(), vue.createBlock(_component_b_icon, {
1809
+ key: 3,
1810
+ class: vue.normalizeClass(["is-right", { "is-clickable": _ctx.passwordReveal || _ctx.iconRightClickable }]),
1811
+ icon: _ctx.rightIcon,
1812
+ pack: _ctx.iconPack,
1813
+ size: _ctx.iconSize,
1814
+ type: _ctx.rightIconType,
1815
+ both: "",
1816
+ onClick: _ctx.rightIconClick
1817
+ }, null, 8, ["class", "icon", "pack", "size", "type", "onClick"])) : vue.createCommentVNode("v-if", true),
1818
+ _ctx.maxlength && _ctx.hasCounter && _ctx.type !== "number" ? (vue.openBlock(), vue.createElementBlock(
1819
+ "small",
1820
+ {
1821
+ key: 4,
1822
+ class: vue.normalizeClass(["help counter", { "is-invisible": !_ctx.isFocused }])
1823
+ },
1824
+ vue.toDisplayString(_ctx.valueLength) + " / " + vue.toDisplayString(_ctx.maxlength),
1825
+ 3
1826
+ /* TEXT, CLASS */
1827
+ )) : vue.createCommentVNode("v-if", true)
1828
+ ],
1829
+ 16
1830
+ /* FULL_PROPS */
1831
+ );
1832
+ }
1833
+ var BInput = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2]]);
1834
+
1835
+ const AM = "AM";
1836
+ const PM = "PM";
1837
+ const HOUR_FORMAT_24 = "24";
1838
+ const HOUR_FORMAT_12 = "12";
1839
+ const defaultTimeFormatter = (date, vm) => {
1840
+ return vm.dtf.format(date);
1841
+ };
1842
+ const defaultTimeParser = (timeString, vm) => {
1843
+ if (timeString) {
1844
+ let d = null;
1845
+ if (vm.computedValue && !isNaN(vm.computedValue.valueOf())) {
1846
+ d = new Date(vm.computedValue);
1847
+ } else {
1848
+ d = vm.timeCreator();
1849
+ d.setMilliseconds(0);
1850
+ }
1851
+ if (vm.dtf.formatToParts && typeof vm.dtf.formatToParts === "function") {
1852
+ const formatRegex = vm.dtf.formatToParts(d).map((part) => {
1853
+ if (part.type === "literal") {
1854
+ return part.value.replace(/ /g, "\\s?");
1855
+ } else if (part.type === "dayPeriod") {
1856
+ return `((?!=<${part.type}>)(${vm.amString}|${vm.pmString}|${AM}|${PM}|${AM.toLowerCase()}|${PM.toLowerCase()})?)`;
1857
+ }
1858
+ return `((?!=<${part.type}>)\\d+)`;
1859
+ }).join("");
1860
+ const timeGroups = matchWithGroups(formatRegex, timeString);
1861
+ timeGroups.hour = timeGroups.hour ? parseInt(timeGroups.hour + "", 10) : null;
1862
+ timeGroups.minute = timeGroups.minute ? parseInt(timeGroups.minute + "", 10) : null;
1863
+ timeGroups.second = timeGroups.second ? parseInt(timeGroups.second + "", 10) : null;
1864
+ if (timeGroups.hour && timeGroups.hour >= 0 && timeGroups.hour < 24 && timeGroups.minute && timeGroups.minute >= 0 && timeGroups.minute < 59) {
1865
+ const dayPeriod = timeGroups.dayPeriod;
1866
+ if (dayPeriod && (dayPeriod.toLowerCase() === vm.pmString.toLowerCase() || dayPeriod.toLowerCase() === PM.toLowerCase()) && timeGroups.hour < 12) {
1867
+ timeGroups.hour += 12;
1868
+ }
1869
+ d.setHours(timeGroups.hour);
1870
+ d.setMinutes(timeGroups.minute);
1871
+ d.setSeconds(timeGroups.second || 0);
1872
+ return d;
1873
+ }
1874
+ }
1875
+ let am = false;
1876
+ if (vm.hourFormat === HOUR_FORMAT_12) {
1877
+ const dateString12 = timeString.split(" ");
1878
+ timeString = dateString12[0];
1879
+ am = dateString12[1] === vm.amString || dateString12[1] === AM;
1880
+ }
1881
+ const time = timeString.split(":");
1882
+ let hours = parseInt(time[0], 10);
1883
+ const minutes = parseInt(time[1], 10);
1884
+ const seconds = vm.enableSeconds ? parseInt(time[2], 10) : 0;
1885
+ if (isNaN(hours) || hours < 0 || hours > 23 || vm.hourFormat === HOUR_FORMAT_12 && (hours < 1 || hours > 12) || isNaN(minutes) || minutes < 0 || minutes > 59) {
1886
+ return null;
1887
+ }
1888
+ d.setSeconds(seconds);
1889
+ d.setMinutes(minutes);
1890
+ if (vm.hourFormat === HOUR_FORMAT_12) {
1891
+ if (am && hours === 12) {
1892
+ hours = 0;
1893
+ } else if (!am && hours !== 12) {
1894
+ hours += 12;
1895
+ }
1896
+ }
1897
+ d.setHours(hours);
1898
+ return new Date(d.getTime());
1899
+ }
1900
+ return null;
1901
+ };
1902
+ var TimepickerMixin = vue.defineComponent({
1903
+ mixins: [CompatFallthroughMixin, FormElementMixin],
1904
+ props: {
1905
+ modelValue: [Date, null],
1906
+ inline: Boolean,
1907
+ minTime: [Date, null],
1908
+ maxTime: [Date, null],
1909
+ placeholder: String,
1910
+ editable: Boolean,
1911
+ disabled: Boolean,
1912
+ hourFormat: {
1913
+ type: String,
1914
+ validator: (value) => {
1915
+ return value === HOUR_FORMAT_24 || value === HOUR_FORMAT_12;
1916
+ }
1917
+ },
1918
+ incrementHours: {
1919
+ type: Number,
1920
+ default: 1
1921
+ },
1922
+ incrementMinutes: {
1923
+ type: Number,
1924
+ default: 1
1925
+ },
1926
+ incrementSeconds: {
1927
+ type: Number,
1928
+ default: 1
1929
+ },
1930
+ timeFormatter: {
1931
+ type: Function,
1932
+ default: (date, vm) => {
1933
+ {
1934
+ return defaultTimeFormatter(date, vm);
1935
+ }
1936
+ }
1937
+ },
1938
+ timeParser: {
1939
+ type: Function,
1940
+ default: (date, vm) => {
1941
+ {
1942
+ return defaultTimeParser(date, vm);
1943
+ }
1944
+ }
1945
+ },
1946
+ mobileNative: {
1947
+ type: Boolean,
1948
+ default: () => config.defaultTimepickerMobileNative
1949
+ },
1950
+ mobileModal: {
1951
+ type: Boolean,
1952
+ default: () => config.defaultTimepickerMobileModal
1953
+ },
1954
+ timeCreator: {
1955
+ type: Function,
1956
+ default: () => {
1957
+ {
1958
+ return /* @__PURE__ */ new Date();
1959
+ }
1960
+ }
1961
+ },
1962
+ position: String,
1963
+ unselectableTimes: Array,
1964
+ openOnFocus: Boolean,
1965
+ enableSeconds: Boolean,
1966
+ defaultMinutes: Number,
1967
+ defaultSeconds: Number,
1968
+ focusable: {
1969
+ type: Boolean,
1970
+ default: true
1971
+ },
1972
+ tzOffset: {
1973
+ type: Number,
1974
+ default: 0
1975
+ },
1976
+ appendToBody: Boolean,
1977
+ resetOnMeridianChange: {
1978
+ type: Boolean,
1979
+ default: false
1980
+ }
1981
+ },
1982
+ emits: {
1983
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
1984
+ "update:modelValue": (_value) => true
1985
+ },
1986
+ data() {
1987
+ return {
1988
+ dateSelected: this.modelValue,
1989
+ hoursSelected: null,
1990
+ minutesSelected: null,
1991
+ secondsSelected: null,
1992
+ meridienSelected: null,
1993
+ _elementRef: "input",
1994
+ AM,
1995
+ PM,
1996
+ HOUR_FORMAT_24,
1997
+ HOUR_FORMAT_12
1998
+ };
1999
+ },
2000
+ computed: {
2001
+ computedValue: {
2002
+ get() {
2003
+ return this.dateSelected;
2004
+ },
2005
+ set(value) {
2006
+ this.dateSelected = value;
2007
+ this.$emit("update:modelValue", this.dateSelected);
2008
+ }
2009
+ },
2010
+ localeOptions() {
2011
+ return new Intl.DateTimeFormat(this.locale, {
2012
+ hour: "numeric",
2013
+ minute: "numeric",
2014
+ second: this.enableSeconds ? "numeric" : void 0
2015
+ }).resolvedOptions();
2016
+ },
2017
+ dtf() {
2018
+ return new Intl.DateTimeFormat(this.locale, {
2019
+ hour: this.localeOptions.hour || "numeric",
2020
+ minute: this.localeOptions.minute || "numeric",
2021
+ second: this.enableSeconds ? this.localeOptions.second || "numeric" : void 0,
2022
+ // Fixes 12 hour display github.com/buefy/buefy/issues/3418
2023
+ hourCycle: !this.isHourFormat24 ? "h12" : "h23"
2024
+ });
2025
+ },
2026
+ newHourFormat() {
2027
+ return this.hourFormat || (this.localeOptions.hour12 ? HOUR_FORMAT_12 : HOUR_FORMAT_24);
2028
+ },
2029
+ sampleTime() {
2030
+ const d = this.timeCreator();
2031
+ d.setHours(10);
2032
+ d.setSeconds(0);
2033
+ d.setMinutes(0);
2034
+ d.setMilliseconds(0);
2035
+ return d;
2036
+ },
2037
+ hourLiteral() {
2038
+ if (this.dtf.formatToParts && typeof this.dtf.formatToParts === "function") {
2039
+ const d = this.sampleTime;
2040
+ const parts = this.dtf.formatToParts(d);
2041
+ const literal = parts.find((part, idx) => idx > 0 && parts[idx - 1].type === "hour");
2042
+ if (literal) {
2043
+ return literal.value;
2044
+ }
2045
+ }
2046
+ return ":";
2047
+ },
2048
+ minuteLiteral() {
2049
+ if (this.dtf.formatToParts && typeof this.dtf.formatToParts === "function") {
2050
+ const d = this.sampleTime;
2051
+ const parts = this.dtf.formatToParts(d);
2052
+ const literal = parts.find((part, idx) => idx > 0 && parts[idx - 1].type === "minute");
2053
+ if (literal) {
2054
+ return literal.value;
2055
+ }
2056
+ }
2057
+ return ":";
2058
+ },
2059
+ secondLiteral() {
2060
+ if (this.dtf.formatToParts && typeof this.dtf.formatToParts === "function") {
2061
+ const d = this.sampleTime;
2062
+ const parts = this.dtf.formatToParts(d);
2063
+ const literal = parts.find((part, idx) => idx > 0 && parts[idx - 1].type === "second");
2064
+ if (literal) {
2065
+ return literal.value;
2066
+ }
2067
+ }
2068
+ return void 0;
2069
+ },
2070
+ amString() {
2071
+ if (this.dtf.formatToParts && typeof this.dtf.formatToParts === "function") {
2072
+ const d = this.sampleTime;
2073
+ d.setHours(10);
2074
+ const dayPeriod = this.dtf.formatToParts(d).find((part) => part.type === "dayPeriod");
2075
+ if (dayPeriod) {
2076
+ return dayPeriod.value;
2077
+ }
2078
+ }
2079
+ return AM;
2080
+ },
2081
+ pmString() {
2082
+ if (this.dtf.formatToParts && typeof this.dtf.formatToParts === "function") {
2083
+ const d = this.sampleTime;
2084
+ d.setHours(20);
2085
+ const dayPeriod = this.dtf.formatToParts(d).find((part) => part.type === "dayPeriod");
2086
+ if (dayPeriod) {
2087
+ return dayPeriod.value;
2088
+ }
2089
+ }
2090
+ return PM;
2091
+ },
2092
+ hours() {
2093
+ if (!this.incrementHours || this.incrementHours < 1) throw new Error("Hour increment cannot be null or less than 1.");
2094
+ const hours = [];
2095
+ const numberOfHours = this.isHourFormat24 ? 24 : 12;
2096
+ for (let i = 0; i < numberOfHours; i += this.incrementHours) {
2097
+ let value = i;
2098
+ let label = value;
2099
+ if (!this.isHourFormat24) {
2100
+ value = i + 1;
2101
+ label = value;
2102
+ if (this.meridienSelected === this.amString) {
2103
+ if (value === 12) {
2104
+ value = 0;
2105
+ }
2106
+ } else if (this.meridienSelected === this.pmString) {
2107
+ if (value !== 12) {
2108
+ value += 12;
2109
+ }
2110
+ }
2111
+ }
2112
+ hours.push({
2113
+ label: this.formatNumber(label),
2114
+ value
2115
+ });
2116
+ }
2117
+ return hours;
2118
+ },
2119
+ minutes() {
2120
+ if (!this.incrementMinutes || this.incrementMinutes < 1) throw new Error("Minute increment cannot be null or less than 1.");
2121
+ const minutes = [];
2122
+ for (let i = 0; i < 60; i += this.incrementMinutes) {
2123
+ minutes.push({
2124
+ label: this.formatNumber(i, true),
2125
+ value: i
2126
+ });
2127
+ }
2128
+ return minutes;
2129
+ },
2130
+ seconds() {
2131
+ if (!this.incrementSeconds || this.incrementSeconds < 1) throw new Error("Second increment cannot be null or less than 1.");
2132
+ const seconds = [];
2133
+ for (let i = 0; i < 60; i += this.incrementSeconds) {
2134
+ seconds.push({
2135
+ label: this.formatNumber(i, true),
2136
+ value: i
2137
+ });
2138
+ }
2139
+ return seconds;
2140
+ },
2141
+ meridiens() {
2142
+ return [this.amString, this.pmString];
2143
+ },
2144
+ isMobile() {
2145
+ return this.mobileNative && isMobile.any();
2146
+ },
2147
+ isHourFormat24() {
2148
+ return this.newHourFormat === HOUR_FORMAT_24;
2149
+ },
2150
+ disabledOrUndefined() {
2151
+ return this.disabled || void 0;
2152
+ }
2153
+ },
2154
+ watch: {
2155
+ hourFormat() {
2156
+ if (this.hoursSelected !== null) {
2157
+ this.meridienSelected = this.hoursSelected >= 12 ? this.pmString : this.amString;
2158
+ }
2159
+ },
2160
+ locale() {
2161
+ if (!this.modelValue) {
2162
+ this.meridienSelected = this.amString;
2163
+ }
2164
+ },
2165
+ /*
2166
+ * When v-model is changed:
2167
+ * 1. Update internal value.
2168
+ * 2. If it's invalid, validate again.
2169
+ */
2170
+ modelValue: {
2171
+ handler(value) {
2172
+ this.updateInternalState(value);
2173
+ !this.isValid && this.$refs.input.checkHtml5Validity();
2174
+ },
2175
+ immediate: true
2176
+ }
2177
+ },
2178
+ methods: {
2179
+ onMeridienChange(value) {
2180
+ if (this.hoursSelected !== null && this.resetOnMeridianChange) {
2181
+ this.hoursSelected = null;
2182
+ this.minutesSelected = null;
2183
+ this.secondsSelected = null;
2184
+ this.computedValue = null;
2185
+ } else if (this.hoursSelected !== null) {
2186
+ if (value === this.pmString) {
2187
+ this.hoursSelected += 12;
2188
+ } else if (value === this.amString) {
2189
+ this.hoursSelected -= 12;
2190
+ }
2191
+ }
2192
+ this.updateDateSelected(
2193
+ this.hoursSelected,
2194
+ this.minutesSelected,
2195
+ this.enableSeconds ? this.secondsSelected : 0,
2196
+ value
2197
+ );
2198
+ },
2199
+ onHoursChange(value) {
2200
+ if (!this.minutesSelected && typeof this.defaultMinutes !== "undefined") {
2201
+ this.minutesSelected = this.defaultMinutes;
2202
+ }
2203
+ if (!this.secondsSelected && typeof this.defaultSeconds !== "undefined") {
2204
+ this.secondsSelected = this.defaultSeconds;
2205
+ }
2206
+ this.updateDateSelected(
2207
+ parseInt(`${value}`, 10),
2208
+ this.minutesSelected,
2209
+ this.enableSeconds ? this.secondsSelected : 0,
2210
+ this.meridienSelected
2211
+ );
2212
+ },
2213
+ onMinutesChange(value) {
2214
+ if (!this.secondsSelected && this.defaultSeconds) {
2215
+ this.secondsSelected = this.defaultSeconds;
2216
+ }
2217
+ this.updateDateSelected(
2218
+ this.hoursSelected,
2219
+ parseInt(`${value}`, 10),
2220
+ this.enableSeconds ? this.secondsSelected : 0,
2221
+ this.meridienSelected
2222
+ );
2223
+ },
2224
+ onSecondsChange(value) {
2225
+ this.updateDateSelected(
2226
+ this.hoursSelected,
2227
+ this.minutesSelected,
2228
+ parseInt(`${value}`, 10),
2229
+ this.meridienSelected
2230
+ );
2231
+ },
2232
+ updateDateSelected(hours, minutes, seconds, meridiens) {
2233
+ if (hours != null && minutes != null && (!this.isHourFormat24 && meridiens !== null || this.isHourFormat24)) {
2234
+ let time = null;
2235
+ if (this.computedValue && !isNaN(this.computedValue.valueOf())) {
2236
+ time = new Date(this.computedValue);
2237
+ } else {
2238
+ time = this.timeCreator();
2239
+ time.setMilliseconds(0);
2240
+ }
2241
+ time.setHours(hours);
2242
+ time.setMinutes(minutes);
2243
+ time.setSeconds(seconds);
2244
+ if (!isNaN(time.getTime())) this.computedValue = new Date(time.getTime());
2245
+ }
2246
+ },
2247
+ updateInternalState(value) {
2248
+ if (value) {
2249
+ this.hoursSelected = value.getHours();
2250
+ this.minutesSelected = value.getMinutes();
2251
+ this.secondsSelected = value.getSeconds();
2252
+ this.meridienSelected = value.getHours() >= 12 ? this.pmString : this.amString;
2253
+ } else {
2254
+ this.hoursSelected = null;
2255
+ this.minutesSelected = null;
2256
+ this.secondsSelected = null;
2257
+ this.meridienSelected = this.amString;
2258
+ }
2259
+ this.dateSelected = value;
2260
+ },
2261
+ isHourDisabled(hour) {
2262
+ let disabled = false;
2263
+ if (this.minTime) {
2264
+ const minHours = this.minTime.getHours();
2265
+ const noMinutesAvailable = this.minutes.every((minute) => {
2266
+ return this.isMinuteDisabledForHour(hour, minute.value);
2267
+ });
2268
+ disabled = hour < minHours || noMinutesAvailable;
2269
+ }
2270
+ if (this.maxTime) {
2271
+ if (!disabled) {
2272
+ const maxHours = this.maxTime.getHours();
2273
+ disabled = hour > maxHours;
2274
+ }
2275
+ }
2276
+ if (this.unselectableTimes) {
2277
+ if (!disabled) {
2278
+ const unselectable = this.unselectableTimes.filter((time) => {
2279
+ if (this.enableSeconds && this.secondsSelected !== null) {
2280
+ return time.getHours() === hour && time.getMinutes() === this.minutesSelected && time.getSeconds() === this.secondsSelected;
2281
+ } else if (this.minutesSelected !== null) {
2282
+ return time.getHours() === hour && time.getMinutes() === this.minutesSelected;
2283
+ }
2284
+ return false;
2285
+ });
2286
+ if (unselectable.length > 0) {
2287
+ disabled = true;
2288
+ } else {
2289
+ disabled = this.minutes.every((minute) => {
2290
+ return this.unselectableTimes.filter((time) => {
2291
+ return time.getHours() === hour && time.getMinutes() === minute.value;
2292
+ }).length > 0;
2293
+ });
2294
+ }
2295
+ }
2296
+ }
2297
+ return disabled;
2298
+ },
2299
+ isMinuteDisabledForHour(hour, minute) {
2300
+ let disabled = false;
2301
+ if (this.minTime) {
2302
+ const minHours = this.minTime.getHours();
2303
+ const minMinutes = this.minTime.getMinutes();
2304
+ disabled = hour === minHours && minute < minMinutes;
2305
+ }
2306
+ if (this.maxTime) {
2307
+ if (!disabled) {
2308
+ const maxHours = this.maxTime.getHours();
2309
+ const maxMinutes = this.maxTime.getMinutes();
2310
+ disabled = hour === maxHours && minute > maxMinutes;
2311
+ }
2312
+ }
2313
+ return disabled;
2314
+ },
2315
+ isMinuteDisabled(minute) {
2316
+ let disabled = false;
2317
+ if (this.hoursSelected !== null) {
2318
+ if (this.isHourDisabled(this.hoursSelected)) {
2319
+ disabled = true;
2320
+ } else {
2321
+ disabled = this.isMinuteDisabledForHour(this.hoursSelected, minute);
2322
+ }
2323
+ if (this.unselectableTimes) {
2324
+ if (!disabled) {
2325
+ const unselectable = this.unselectableTimes.filter((time) => {
2326
+ if (this.enableSeconds && this.secondsSelected !== null) {
2327
+ return time.getHours() === this.hoursSelected && time.getMinutes() === minute && time.getSeconds() === this.secondsSelected;
2328
+ } else {
2329
+ return time.getHours() === this.hoursSelected && time.getMinutes() === minute;
2330
+ }
2331
+ });
2332
+ disabled = unselectable.length > 0;
2333
+ }
2334
+ }
2335
+ }
2336
+ return disabled;
2337
+ },
2338
+ isSecondDisabled(second) {
2339
+ let disabled = false;
2340
+ if (this.minutesSelected !== null) {
2341
+ if (this.isMinuteDisabled(this.minutesSelected)) {
2342
+ disabled = true;
2343
+ } else {
2344
+ if (this.minTime) {
2345
+ const minHours = this.minTime.getHours();
2346
+ const minMinutes = this.minTime.getMinutes();
2347
+ const minSeconds = this.minTime.getSeconds();
2348
+ disabled = this.hoursSelected === minHours && this.minutesSelected === minMinutes && second < minSeconds;
2349
+ }
2350
+ if (this.maxTime) {
2351
+ if (!disabled) {
2352
+ const maxHours = this.maxTime.getHours();
2353
+ const maxMinutes = this.maxTime.getMinutes();
2354
+ const maxSeconds = this.maxTime.getSeconds();
2355
+ disabled = this.hoursSelected === maxHours && this.minutesSelected === maxMinutes && second > maxSeconds;
2356
+ }
2357
+ }
2358
+ }
2359
+ if (this.unselectableTimes) {
2360
+ if (!disabled) {
2361
+ const unselectable = this.unselectableTimes.filter((time) => {
2362
+ return time.getHours() === this.hoursSelected && time.getMinutes() === this.minutesSelected && time.getSeconds() === second;
2363
+ });
2364
+ disabled = unselectable.length > 0;
2365
+ }
2366
+ }
2367
+ }
2368
+ return disabled;
2369
+ },
2370
+ /*
2371
+ * Parse string into date
2372
+ */
2373
+ onChange(value) {
2374
+ const date = this.timeParser(value, this);
2375
+ this.updateInternalState(date);
2376
+ if (date && !isNaN(date.valueOf())) {
2377
+ this.computedValue = date;
2378
+ } else {
2379
+ this.computedValue = null;
2380
+ this.$refs.input.newValue = this.computedValue;
2381
+ }
2382
+ },
2383
+ /*
2384
+ * Toggle timepicker
2385
+ */
2386
+ toggle(active) {
2387
+ if (this.$refs.dropdown) {
2388
+ this.$refs.dropdown.isActive = typeof active === "boolean" ? active : !this.$refs.dropdown.isActive;
2389
+ }
2390
+ },
2391
+ /*
2392
+ * Close timepicker
2393
+ */
2394
+ close() {
2395
+ this.toggle(false);
2396
+ },
2397
+ /*
2398
+ * Call default onFocus method and show timepicker
2399
+ */
2400
+ handleOnFocus() {
2401
+ this.onFocus();
2402
+ if (this.openOnFocus) {
2403
+ this.toggle(true);
2404
+ }
2405
+ },
2406
+ /*
2407
+ * Format date into string 'HH-MM-SS'
2408
+ */
2409
+ formatHHMMSS(value) {
2410
+ const date = new Date(value);
2411
+ if (value && !isNaN(date.valueOf())) {
2412
+ const hours = date.getHours();
2413
+ const minutes = date.getMinutes();
2414
+ const seconds = date.getSeconds();
2415
+ return this.formatNumber(hours, true) + ":" + this.formatNumber(minutes, true) + ":" + this.formatNumber(seconds, true);
2416
+ }
2417
+ return "";
2418
+ },
2419
+ /*
2420
+ * Parse time from string
2421
+ */
2422
+ onChangeNativePicker(event) {
2423
+ const date = event.target.value;
2424
+ if (date) {
2425
+ let time = null;
2426
+ if (this.computedValue && !isNaN(this.computedValue.valueOf())) {
2427
+ time = new Date(this.computedValue);
2428
+ } else {
2429
+ time = /* @__PURE__ */ new Date();
2430
+ time.setMilliseconds(0);
2431
+ }
2432
+ const t = date.split(":");
2433
+ time.setHours(parseInt(t[0], 10));
2434
+ time.setMinutes(parseInt(t[1], 10));
2435
+ time.setSeconds(t[2] ? parseInt(t[2], 10) : 0);
2436
+ this.computedValue = new Date(time.getTime());
2437
+ } else {
2438
+ this.computedValue = null;
2439
+ }
2440
+ },
2441
+ formatNumber(value, prependZero) {
2442
+ return this.isHourFormat24 || prependZero ? this.pad(value) : `${value}`;
2443
+ },
2444
+ pad(value) {
2445
+ return (value < 10 ? "0" : "") + value;
2446
+ },
2447
+ /*
2448
+ * Format date into string
2449
+ */
2450
+ formatValue(date) {
2451
+ if (date && !isNaN(date.valueOf())) {
2452
+ return this.timeFormatter(date, this);
2453
+ } else {
2454
+ return null;
2455
+ }
2456
+ },
2457
+ /*
2458
+ * Keypress event that is bound to the document.
2459
+ */
2460
+ keyPress({ key }) {
2461
+ if (this.$refs.dropdown && this.$refs.dropdown.isActive && (key === "Escape" || key === "Esc")) {
2462
+ this.toggle(false);
2463
+ }
2464
+ },
2465
+ /*
2466
+ * Emit 'blur' event on dropdown is not active (closed)
2467
+ */
2468
+ onActiveChange(value) {
2469
+ if (!value) {
2470
+ this.onBlur();
2471
+ }
2472
+ }
2473
+ },
2474
+ created() {
2475
+ if (typeof window !== "undefined") {
2476
+ document.addEventListener("keyup", this.keyPress);
2477
+ }
2478
+ },
2479
+ beforeUnmounted() {
2480
+ if (typeof window !== "undefined") {
2481
+ document.removeEventListener("keyup", this.keyPress);
2482
+ }
2483
+ }
2484
+ });
2485
+
2486
+ var _sfc_main$1 = vue.defineComponent({
2487
+ name: "BSelect",
2488
+ components: {
2489
+ BIcon
2490
+ },
2491
+ mixins: [CompatFallthroughMixin, FormElementMixin],
2492
+ props: {
2493
+ modelValue: {
2494
+ type: [
2495
+ String,
2496
+ Number,
2497
+ Boolean,
2498
+ Object,
2499
+ Array,
2500
+ Function,
2501
+ Date,
2502
+ null
2503
+ ],
2504
+ default: null
2505
+ },
2506
+ placeholder: String,
2507
+ multiple: Boolean,
2508
+ nativeSize: [String, Number]
2509
+ },
2510
+ emits: {
2511
+ /* eslint-disable @typescript-eslint/no-unused-vars */
2512
+ blur: (_event) => true,
2513
+ focus: (_event) => true,
2514
+ "update:modelValue": (_value) => true
2515
+ /* eslint-enable @typescript-eslint/no-unused-vars */
2516
+ },
2517
+ data() {
2518
+ return {
2519
+ selected: this.modelValue,
2520
+ _elementRef: "select"
2521
+ };
2522
+ },
2523
+ computed: {
2524
+ computedValue: {
2525
+ get() {
2526
+ return this.selected;
2527
+ },
2528
+ set(value) {
2529
+ this.selected = value;
2530
+ this.$emit("update:modelValue", value);
2531
+ !this.isValid && this.checkHtml5Validity();
2532
+ }
2533
+ },
2534
+ spanClasses() {
2535
+ return [this.size, this.statusType, {
2536
+ "is-fullwidth": this.expanded,
2537
+ "is-loading": this.loading,
2538
+ "is-multiple": this.multiple,
2539
+ "is-rounded": this.rounded,
2540
+ "is-empty": this.selected === null
2541
+ }];
2542
+ }
2543
+ },
2544
+ watch: {
2545
+ /*
2546
+ * When v-model is changed:
2547
+ * 1. Set the selected option.
2548
+ * 2. If it's invalid, validate again.
2549
+ */
2550
+ modelValue(value) {
2551
+ this.selected = value;
2552
+ !this.isValid && this.checkHtml5Validity();
2553
+ }
2554
+ }
2555
+ });
2556
+
2557
+ const _hoisted_1$1 = ["multiple", "size"];
2558
+ const _hoisted_2$1 = {
2559
+ key: 0,
2560
+ value: null,
2561
+ disabled: "",
2562
+ hidden: ""
2563
+ };
2564
+ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
2565
+ const _component_b_icon = vue.resolveComponent("b-icon");
2566
+ return vue.openBlock(), vue.createElementBlock(
2567
+ "div",
2568
+ vue.mergeProps({
2569
+ class: ["control", { "is-expanded": _ctx.expanded, "has-icons-left": _ctx.icon }]
2570
+ }, _ctx.rootAttrs),
2571
+ [
2572
+ vue.createElementVNode(
2573
+ "span",
2574
+ {
2575
+ class: vue.normalizeClass(["select", _ctx.spanClasses])
2576
+ },
2577
+ [
2578
+ vue.withDirectives(vue.createElementVNode("select", vue.mergeProps({
2579
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.computedValue = $event),
2580
+ ref: "select",
2581
+ multiple: _ctx.multiple,
2582
+ size: _ctx.nativeSize
2583
+ }, _ctx.fallthroughAttrs, {
2584
+ onBlur: _cache[1] || (_cache[1] = (...args) => _ctx.onBlur && _ctx.onBlur(...args)),
2585
+ onFocus: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("focus", $event))
2586
+ }), [
2587
+ _ctx.placeholder ? (vue.openBlock(), vue.createElementBlock(
2588
+ vue.Fragment,
2589
+ { key: 0 },
2590
+ [
2591
+ _ctx.computedValue == null ? (vue.openBlock(), vue.createElementBlock(
2592
+ "option",
2593
+ _hoisted_2$1,
2594
+ vue.toDisplayString(_ctx.placeholder),
2595
+ 1
2596
+ /* TEXT */
2597
+ )) : vue.createCommentVNode("v-if", true)
2598
+ ],
2599
+ 64
2600
+ /* STABLE_FRAGMENT */
2601
+ )) : vue.createCommentVNode("v-if", true),
2602
+ vue.renderSlot(_ctx.$slots, "default")
2603
+ ], 16, _hoisted_1$1), [
2604
+ [vue.vModelSelect, _ctx.computedValue]
2605
+ ])
2606
+ ],
2607
+ 2
2608
+ /* CLASS */
2609
+ ),
2610
+ _ctx.icon ? (vue.openBlock(), vue.createBlock(_component_b_icon, {
2611
+ key: 0,
2612
+ class: "is-left",
2613
+ icon: _ctx.icon,
2614
+ pack: _ctx.iconPack,
2615
+ size: _ctx.iconSize
2616
+ }, null, 8, ["icon", "pack", "size"])) : vue.createCommentVNode("v-if", true)
2617
+ ],
2618
+ 16
2619
+ /* FULL_PROPS */
2620
+ );
2621
+ }
2622
+ var BSelect = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1]]);
2623
+
2624
+ var _sfc_main = vue.defineComponent({
2625
+ name: "BTimepicker",
2626
+ components: {
2627
+ BInput,
2628
+ BField,
2629
+ BSelect,
2630
+ BDropdown,
2631
+ BDropdownItem
2632
+ },
2633
+ mixins: [TimepickerMixin],
2634
+ data() {
2635
+ return {
2636
+ _isTimepicker: true
2637
+ };
2638
+ },
2639
+ computed: {
2640
+ nativeStep() {
2641
+ if (this.enableSeconds) {
2642
+ return "1";
2643
+ } else {
2644
+ return void 0;
2645
+ }
2646
+ }
2647
+ }
2648
+ });
2649
+
2650
+ const _hoisted_1 = ["value", "disabled"];
2651
+ const _hoisted_2 = { class: "control is-colon" };
2652
+ const _hoisted_3 = ["value", "disabled"];
2653
+ const _hoisted_4 = { class: "control is-colon" };
2654
+ const _hoisted_5 = ["value", "disabled"];
2655
+ const _hoisted_6 = { class: "control is-colon" };
2656
+ const _hoisted_7 = ["value"];
2657
+ const _hoisted_8 = {
2658
+ key: 0,
2659
+ class: "timepicker-footer"
2660
+ };
2661
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
2662
+ const _component_b_input = vue.resolveComponent("b-input");
2663
+ const _component_b_select = vue.resolveComponent("b-select");
2664
+ const _component_b_field = vue.resolveComponent("b-field");
2665
+ const _component_b_dropdown_item = vue.resolveComponent("b-dropdown-item");
2666
+ const _component_b_dropdown = vue.resolveComponent("b-dropdown");
2667
+ return vue.openBlock(), vue.createElementBlock(
2668
+ "div",
2669
+ vue.mergeProps({
2670
+ class: ["timepicker control", [_ctx.size, { "is-expanded": _ctx.expanded }]]
2671
+ }, _ctx.rootAttrs),
2672
+ [
2673
+ !_ctx.isMobile || _ctx.inline ? (vue.openBlock(), vue.createBlock(_component_b_dropdown, {
2674
+ key: 0,
2675
+ ref: "dropdown",
2676
+ position: _ctx.position,
2677
+ disabled: _ctx.disabledOrUndefined,
2678
+ inline: _ctx.inline,
2679
+ "mobile-modal": _ctx.mobileModal,
2680
+ "append-to-body": _ctx.appendToBody,
2681
+ "append-to-body-copy-parent": "",
2682
+ onActiveChange: _ctx.onActiveChange
2683
+ }, vue.createSlots({
2684
+ default: vue.withCtx(() => [
2685
+ vue.createVNode(_component_b_dropdown_item, {
2686
+ disabled: _ctx.disabledOrUndefined,
2687
+ focusable: _ctx.focusable,
2688
+ custom: ""
2689
+ }, {
2690
+ default: vue.withCtx(() => [
2691
+ vue.createVNode(_component_b_field, {
2692
+ grouped: "",
2693
+ position: "is-centered"
2694
+ }, {
2695
+ default: vue.withCtx(() => [
2696
+ vue.createVNode(_component_b_select, {
2697
+ modelValue: _ctx.hoursSelected,
2698
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => _ctx.hoursSelected = $event),
2699
+ onChange: _cache[3] || (_cache[3] = ($event) => _ctx.onHoursChange($event.target.value)),
2700
+ disabled: _ctx.disabledOrUndefined,
2701
+ placeholder: "00"
2702
+ }, {
2703
+ default: vue.withCtx(() => [
2704
+ (vue.openBlock(true), vue.createElementBlock(
2705
+ vue.Fragment,
2706
+ null,
2707
+ vue.renderList(_ctx.hours, (hour) => {
2708
+ return vue.openBlock(), vue.createElementBlock("option", {
2709
+ value: hour.value,
2710
+ key: hour.value,
2711
+ disabled: _ctx.isHourDisabled(hour.value) || void 0
2712
+ }, vue.toDisplayString(hour.label), 9, _hoisted_1);
2713
+ }),
2714
+ 128
2715
+ /* KEYED_FRAGMENT */
2716
+ ))
2717
+ ]),
2718
+ _: 1
2719
+ /* STABLE */
2720
+ }, 8, ["modelValue", "disabled"]),
2721
+ vue.createElementVNode(
2722
+ "span",
2723
+ _hoisted_2,
2724
+ vue.toDisplayString(_ctx.hourLiteral),
2725
+ 1
2726
+ /* TEXT */
2727
+ ),
2728
+ vue.createVNode(_component_b_select, {
2729
+ modelValue: _ctx.minutesSelected,
2730
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => _ctx.minutesSelected = $event),
2731
+ onChange: _cache[5] || (_cache[5] = ($event) => _ctx.onMinutesChange($event.target.value)),
2732
+ disabled: _ctx.disabledOrUndefined,
2733
+ placeholder: "00"
2734
+ }, {
2735
+ default: vue.withCtx(() => [
2736
+ (vue.openBlock(true), vue.createElementBlock(
2737
+ vue.Fragment,
2738
+ null,
2739
+ vue.renderList(_ctx.minutes, (minute) => {
2740
+ return vue.openBlock(), vue.createElementBlock("option", {
2741
+ value: minute.value,
2742
+ key: minute.value,
2743
+ disabled: _ctx.isMinuteDisabled(minute.value) || void 0
2744
+ }, vue.toDisplayString(minute.label), 9, _hoisted_3);
2745
+ }),
2746
+ 128
2747
+ /* KEYED_FRAGMENT */
2748
+ ))
2749
+ ]),
2750
+ _: 1
2751
+ /* STABLE */
2752
+ }, 8, ["modelValue", "disabled"]),
2753
+ _ctx.enableSeconds ? (vue.openBlock(), vue.createElementBlock(
2754
+ vue.Fragment,
2755
+ { key: 0 },
2756
+ [
2757
+ vue.createElementVNode(
2758
+ "span",
2759
+ _hoisted_4,
2760
+ vue.toDisplayString(_ctx.minuteLiteral),
2761
+ 1
2762
+ /* TEXT */
2763
+ ),
2764
+ vue.createVNode(_component_b_select, {
2765
+ modelValue: _ctx.secondsSelected,
2766
+ "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => _ctx.secondsSelected = $event),
2767
+ onChange: _cache[7] || (_cache[7] = ($event) => _ctx.onSecondsChange($event.target.value)),
2768
+ disabled: _ctx.disabledOrUndefined,
2769
+ placeholder: "00"
2770
+ }, {
2771
+ default: vue.withCtx(() => [
2772
+ (vue.openBlock(true), vue.createElementBlock(
2773
+ vue.Fragment,
2774
+ null,
2775
+ vue.renderList(_ctx.seconds, (second) => {
2776
+ return vue.openBlock(), vue.createElementBlock("option", {
2777
+ value: second.value,
2778
+ key: second.value,
2779
+ disabled: _ctx.isSecondDisabled(second.value) || void 0
2780
+ }, vue.toDisplayString(second.label), 9, _hoisted_5);
2781
+ }),
2782
+ 128
2783
+ /* KEYED_FRAGMENT */
2784
+ ))
2785
+ ]),
2786
+ _: 1
2787
+ /* STABLE */
2788
+ }, 8, ["modelValue", "disabled"]),
2789
+ vue.createElementVNode(
2790
+ "span",
2791
+ _hoisted_6,
2792
+ vue.toDisplayString(_ctx.secondLiteral),
2793
+ 1
2794
+ /* TEXT */
2795
+ )
2796
+ ],
2797
+ 64
2798
+ /* STABLE_FRAGMENT */
2799
+ )) : vue.createCommentVNode("v-if", true),
2800
+ !_ctx.isHourFormat24 ? (vue.openBlock(), vue.createBlock(_component_b_select, {
2801
+ key: 1,
2802
+ modelValue: _ctx.meridienSelected,
2803
+ "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => _ctx.meridienSelected = $event),
2804
+ onChange: _cache[9] || (_cache[9] = ($event) => _ctx.onMeridienChange($event.target.value)),
2805
+ disabled: _ctx.disabledOrUndefined
2806
+ }, {
2807
+ default: vue.withCtx(() => [
2808
+ (vue.openBlock(true), vue.createElementBlock(
2809
+ vue.Fragment,
2810
+ null,
2811
+ vue.renderList(_ctx.meridiens, (meridien) => {
2812
+ return vue.openBlock(), vue.createElementBlock("option", {
2813
+ value: meridien,
2814
+ key: meridien
2815
+ }, vue.toDisplayString(meridien), 9, _hoisted_7);
2816
+ }),
2817
+ 128
2818
+ /* KEYED_FRAGMENT */
2819
+ ))
2820
+ ]),
2821
+ _: 1
2822
+ /* STABLE */
2823
+ }, 8, ["modelValue", "disabled"])) : vue.createCommentVNode("v-if", true)
2824
+ ]),
2825
+ _: 1
2826
+ /* STABLE */
2827
+ }),
2828
+ _ctx.$slots.default !== void 0 ? (vue.openBlock(), vue.createElementBlock("footer", _hoisted_8, [
2829
+ vue.renderSlot(_ctx.$slots, "default")
2830
+ ])) : vue.createCommentVNode("v-if", true)
2831
+ ]),
2832
+ _: 3
2833
+ /* FORWARDED */
2834
+ }, 8, ["disabled", "focusable"])
2835
+ ]),
2836
+ _: 2
2837
+ /* DYNAMIC */
2838
+ }, [
2839
+ !_ctx.inline ? {
2840
+ name: "trigger",
2841
+ fn: vue.withCtx(() => [
2842
+ vue.renderSlot(_ctx.$slots, "trigger", {}, () => [
2843
+ vue.createVNode(_component_b_input, vue.mergeProps({
2844
+ ref: "input",
2845
+ autocomplete: "off",
2846
+ "model-value": _ctx.formatValue(_ctx.computedValue),
2847
+ placeholder: _ctx.placeholder,
2848
+ size: _ctx.size,
2849
+ icon: _ctx.icon,
2850
+ "icon-pack": _ctx.iconPack,
2851
+ loading: _ctx.loading,
2852
+ disabled: _ctx.disabledOrUndefined,
2853
+ readonly: !_ctx.editable || void 0,
2854
+ rounded: _ctx.rounded
2855
+ }, _ctx.fallthroughAttrs, {
2856
+ "use-html5-validation": _ctx.useHtml5Validation,
2857
+ onKeyup: _cache[0] || (_cache[0] = vue.withKeys(($event) => _ctx.toggle(true), ["enter"])),
2858
+ onChange: _cache[1] || (_cache[1] = ($event) => _ctx.onChange($event.target.value)),
2859
+ onFocus: _ctx.handleOnFocus
2860
+ }), null, 16, ["model-value", "placeholder", "size", "icon", "icon-pack", "loading", "disabled", "readonly", "rounded", "use-html5-validation", "onFocus"])
2861
+ ])
2862
+ ]),
2863
+ key: "0"
2864
+ } : void 0
2865
+ ]), 1032, ["position", "disabled", "inline", "mobile-modal", "append-to-body", "onActiveChange"])) : (vue.openBlock(), vue.createBlock(_component_b_input, vue.mergeProps({
2866
+ key: 1,
2867
+ ref: "input",
2868
+ type: "time",
2869
+ step: _ctx.nativeStep,
2870
+ autocomplete: "off",
2871
+ "model-value": _ctx.formatHHMMSS(_ctx.computedValue),
2872
+ placeholder: _ctx.placeholder,
2873
+ size: _ctx.size,
2874
+ icon: _ctx.icon,
2875
+ "icon-pack": _ctx.iconPack,
2876
+ rounded: _ctx.rounded,
2877
+ loading: _ctx.loading,
2878
+ max: _ctx.formatHHMMSS(_ctx.maxTime),
2879
+ min: _ctx.formatHHMMSS(_ctx.minTime),
2880
+ disabled: _ctx.disabledOrUndefined,
2881
+ readonly: false
2882
+ }, _ctx.fallthroughAttrs, {
2883
+ "use-html5-validation": _ctx.useHtml5Validation,
2884
+ onChange: _cache[10] || (_cache[10] = ($event) => _ctx.onChange($event.target.value)),
2885
+ onFocus: _ctx.handleOnFocus,
2886
+ onBlur: _cache[11] || (_cache[11] = ($event) => _ctx.onBlur() && _ctx.checkHtml5Validity())
2887
+ }), null, 16, ["step", "model-value", "placeholder", "size", "icon", "icon-pack", "rounded", "loading", "max", "min", "disabled", "use-html5-validation", "onFocus"]))
2888
+ ],
2889
+ 16
2890
+ /* FULL_PROPS */
2891
+ );
2892
+ }
2893
+ var Timepicker = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
2894
+
2895
+ const Plugin = {
2896
+ install(Vue) {
2897
+ registerComponent(Vue, Timepicker);
2898
+ }
2899
+ };
2900
+
2901
+ exports.BTimepicker = Timepicker;
2902
+ exports.default = Plugin;
2903
+
2904
+ Object.defineProperty(exports, '__esModule', { value: true });
2905
+
2906
+ }));