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,2209 @@
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.Taginput = {}, global.Vue));
6
+ })(this, (function (exports, vue) { 'use strict';
7
+
8
+ function getValueByPath(obj, path) {
9
+ return path.split(".").reduce((o, i) => o ? o[i] : null, obj);
10
+ }
11
+ function removeElement(el) {
12
+ if (typeof el.remove !== "undefined") {
13
+ el.remove();
14
+ } else if (typeof el.parentNode !== "undefined" && el.parentNode !== null) {
15
+ el.parentNode.removeChild(el);
16
+ }
17
+ }
18
+ function createAbsoluteElement(el) {
19
+ const root = document.createElement("div");
20
+ root.style.position = "absolute";
21
+ root.style.left = "0px";
22
+ root.style.top = "0px";
23
+ root.style.width = "100%";
24
+ const wrapper = document.createElement("div");
25
+ root.appendChild(wrapper);
26
+ wrapper.appendChild(el);
27
+ document.body.appendChild(root);
28
+ return root;
29
+ }
30
+ function toCssWidth(width) {
31
+ return width === void 0 ? null : isNaN(+width) ? `${width}` : width + "px";
32
+ }
33
+ function isCustomElement(vm) {
34
+ return vm.$root != null && "shadowRoot" in vm.$root.$options;
35
+ }
36
+
37
+ let config = {
38
+ defaultIconPack: "mdi",
39
+ defaultIconComponent: null,
40
+ defaultLocale: void 0,
41
+ defaultInputAutocomplete: "on",
42
+ defaultInputHasCounter: true,
43
+ defaultCompatFallthrough: true,
44
+ defaultTaginputHasCounter: true,
45
+ defaultUseHtml5Validation: true,
46
+ defaultStatusIcon: true};
47
+
48
+ const mdiIcons = {
49
+ sizes: {
50
+ default: "mdi-24px",
51
+ "is-small": null,
52
+ "is-medium": "mdi-36px",
53
+ "is-large": "mdi-48px"
54
+ },
55
+ iconPrefix: "mdi-"
56
+ };
57
+ const faIcons = () => {
58
+ const faIconPrefix = "fa-";
59
+ return {
60
+ sizes: {
61
+ default: null,
62
+ "is-small": null,
63
+ "is-medium": faIconPrefix + "lg",
64
+ "is-large": faIconPrefix + "2x"
65
+ },
66
+ iconPrefix: faIconPrefix,
67
+ internalIcons: {
68
+ information: "info-circle",
69
+ alert: "exclamation-triangle",
70
+ "alert-circle": "exclamation-circle",
71
+ "chevron-right": "angle-right",
72
+ "chevron-left": "angle-left",
73
+ "chevron-down": "angle-down",
74
+ "eye-off": "eye-slash",
75
+ "menu-down": "caret-down",
76
+ "menu-up": "caret-up",
77
+ "close-circle": "times-circle"
78
+ }
79
+ };
80
+ };
81
+ const getIcons = () => {
82
+ let icons = {
83
+ mdi: mdiIcons,
84
+ fa: faIcons(),
85
+ fas: faIcons(),
86
+ far: faIcons(),
87
+ fad: faIcons(),
88
+ fab: faIcons(),
89
+ fal: faIcons(),
90
+ "fa-solid": faIcons(),
91
+ "fa-regular": faIcons(),
92
+ "fa-light": faIcons(),
93
+ "fa-thin": faIcons(),
94
+ "fa-duotone": faIcons(),
95
+ "fa-brands": faIcons()
96
+ };
97
+ return icons;
98
+ };
99
+
100
+ var _sfc_main$4 = vue.defineComponent({
101
+ name: "BIcon",
102
+ props: {
103
+ type: [String, Object],
104
+ component: String,
105
+ pack: String,
106
+ icon: {
107
+ type: String,
108
+ required: true
109
+ },
110
+ size: String,
111
+ customSize: String,
112
+ customClass: String,
113
+ both: Boolean
114
+ // This is used internally to show both MDI and FA icon
115
+ },
116
+ computed: {
117
+ iconConfig() {
118
+ const allIcons = getIcons();
119
+ return allIcons[this.newPack];
120
+ },
121
+ iconPrefix() {
122
+ if (this.iconConfig && this.iconConfig.iconPrefix) {
123
+ return this.iconConfig.iconPrefix;
124
+ }
125
+ return "";
126
+ },
127
+ /*
128
+ * Internal icon name based on the pack.
129
+ * If pack is 'fa', gets the equivalent FA icon name of the MDI,
130
+ * internal icons are always MDI.
131
+ */
132
+ newIcon() {
133
+ return `${this.iconPrefix}${this.getEquivalentIconOf(this.icon)}`;
134
+ },
135
+ newPack() {
136
+ return this.pack || config.defaultIconPack;
137
+ },
138
+ newType() {
139
+ if (!this.type) return;
140
+ let splitType = [];
141
+ if (typeof this.type === "string") {
142
+ splitType = this.type.split("-");
143
+ } else {
144
+ for (const key in this.type) {
145
+ if (this.type[key]) {
146
+ splitType = key.split("-");
147
+ break;
148
+ }
149
+ }
150
+ }
151
+ if (splitType.length <= 1) return;
152
+ const [, ...type] = splitType;
153
+ return `has-text-${type.join("-")}`;
154
+ },
155
+ newCustomSize() {
156
+ return this.customSize || this.customSizeByPack;
157
+ },
158
+ customSizeByPack() {
159
+ if (this.iconConfig && this.iconConfig.sizes) {
160
+ if (this.size && this.iconConfig.sizes[this.size] !== void 0) {
161
+ return this.iconConfig.sizes[this.size];
162
+ } else if (this.iconConfig.sizes.default) {
163
+ return this.iconConfig.sizes.default;
164
+ }
165
+ }
166
+ return null;
167
+ },
168
+ useIconComponent() {
169
+ return this.component || config.defaultIconComponent;
170
+ }
171
+ },
172
+ methods: {
173
+ /*
174
+ * Equivalent icon name of the MDI.
175
+ */
176
+ getEquivalentIconOf(value) {
177
+ if (!this.both) {
178
+ return value;
179
+ }
180
+ if (this.iconConfig == null) {
181
+ return value;
182
+ }
183
+ const maybeInternal = this.iconConfig;
184
+ if (maybeInternal && maybeInternal.internalIcons && maybeInternal.internalIcons[value]) {
185
+ return maybeInternal.internalIcons[value];
186
+ }
187
+ return value;
188
+ }
189
+ }
190
+ });
191
+
192
+ var _export_sfc = (sfc, props) => {
193
+ const target = sfc.__vccOpts || sfc;
194
+ for (const [key, val] of props) {
195
+ target[key] = val;
196
+ }
197
+ return target;
198
+ };
199
+
200
+ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
201
+ return vue.openBlock(), vue.createElementBlock(
202
+ "span",
203
+ {
204
+ class: vue.normalizeClass(["icon", [_ctx.newType, _ctx.size]])
205
+ },
206
+ [
207
+ !_ctx.useIconComponent ? (vue.openBlock(), vue.createElementBlock(
208
+ "i",
209
+ {
210
+ key: 0,
211
+ class: vue.normalizeClass([_ctx.newPack, _ctx.newIcon, _ctx.newCustomSize, _ctx.customClass])
212
+ },
213
+ null,
214
+ 2
215
+ /* CLASS */
216
+ )) : (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.useIconComponent), {
217
+ key: 1,
218
+ icon: [_ctx.newPack, _ctx.newIcon],
219
+ size: _ctx.newCustomSize,
220
+ class: vue.normalizeClass([_ctx.customClass])
221
+ }, null, 8, ["icon", "size", "class"]))
222
+ ],
223
+ 2
224
+ /* CLASS */
225
+ );
226
+ }
227
+ var BIcon = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$4]]);
228
+
229
+ var _sfc_main$3 = vue.defineComponent({
230
+ name: "BTag",
231
+ components: { BIcon },
232
+ props: {
233
+ attached: Boolean,
234
+ closable: Boolean,
235
+ type: [String, Object],
236
+ size: String,
237
+ rounded: Boolean,
238
+ disabled: Boolean,
239
+ ellipsis: Boolean,
240
+ tabstop: {
241
+ type: Boolean,
242
+ default: true
243
+ },
244
+ ariaCloseLabel: String,
245
+ icon: String,
246
+ iconType: String,
247
+ iconPack: String,
248
+ closeType: String,
249
+ closeIcon: String,
250
+ closeIconPack: String,
251
+ closeIconType: String
252
+ },
253
+ emits: {
254
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
255
+ click: (_) => true,
256
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
257
+ close: (_) => true
258
+ },
259
+ computed: {
260
+ // setting a boolean attribute `false` does not remove it on Vue 3.
261
+ // `null` or `undefined` has to be given to remove it.
262
+ disabledOrUndefined() {
263
+ return this.disabled || void 0;
264
+ }
265
+ },
266
+ methods: {
267
+ /*
268
+ * Emit close event when delete button is clicked
269
+ * or delete key is pressed.
270
+ */
271
+ close(event) {
272
+ if (this.disabled) return;
273
+ this.$emit("close", event);
274
+ },
275
+ /*
276
+ * Emit click event when tag is clicked.
277
+ */
278
+ click(event) {
279
+ if (this.disabled) return;
280
+ this.$emit("click", event);
281
+ }
282
+ }
283
+ });
284
+
285
+ const _hoisted_1$3 = {
286
+ key: 0,
287
+ class: "tags has-addons inline-tags"
288
+ };
289
+ const _hoisted_2$3 = ["aria-label", "tabindex", "disabled"];
290
+ const _hoisted_3$2 = ["aria-label", "disabled", "tabindex"];
291
+ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
292
+ const _component_b_icon = vue.resolveComponent("b-icon");
293
+ return _ctx.attached && _ctx.closable ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$3, [
294
+ vue.createElementVNode(
295
+ "span",
296
+ {
297
+ class: vue.normalizeClass(["tag", [_ctx.type, _ctx.size, { "is-rounded": _ctx.rounded }]])
298
+ },
299
+ [
300
+ _ctx.icon ? (vue.openBlock(), vue.createBlock(_component_b_icon, {
301
+ key: 0,
302
+ icon: _ctx.icon,
303
+ size: _ctx.size,
304
+ type: _ctx.iconType,
305
+ pack: _ctx.iconPack
306
+ }, null, 8, ["icon", "size", "type", "pack"])) : vue.createCommentVNode("v-if", true),
307
+ vue.createElementVNode(
308
+ "span",
309
+ {
310
+ class: vue.normalizeClass({ "has-ellipsis": _ctx.ellipsis }),
311
+ onClick: _cache[0] || (_cache[0] = (...args) => _ctx.click && _ctx.click(...args))
312
+ },
313
+ [
314
+ vue.renderSlot(_ctx.$slots, "default")
315
+ ],
316
+ 2
317
+ /* CLASS */
318
+ )
319
+ ],
320
+ 2
321
+ /* CLASS */
322
+ ),
323
+ vue.createElementVNode("a", {
324
+ class: vue.normalizeClass(["tag", [
325
+ _ctx.size,
326
+ _ctx.closeType,
327
+ { "is-rounded": _ctx.rounded },
328
+ _ctx.closeIcon ? "has-delete-icon" : "is-delete"
329
+ ]]),
330
+ role: "button",
331
+ "aria-label": _ctx.ariaCloseLabel,
332
+ tabindex: _ctx.tabstop ? 0 : void 0,
333
+ disabled: _ctx.disabledOrUndefined,
334
+ onClick: _cache[1] || (_cache[1] = (...args) => _ctx.close && _ctx.close(...args)),
335
+ onKeyup: _cache[2] || (_cache[2] = vue.withKeys(vue.withModifiers((...args) => _ctx.close && _ctx.close(...args), ["prevent"]), ["delete"]))
336
+ }, [
337
+ _ctx.closeIcon ? (vue.openBlock(), vue.createBlock(_component_b_icon, {
338
+ key: 0,
339
+ "custom-class": "",
340
+ icon: _ctx.closeIcon,
341
+ size: _ctx.size,
342
+ type: _ctx.closeIconType,
343
+ pack: _ctx.closeIconPack
344
+ }, null, 8, ["icon", "size", "type", "pack"])) : vue.createCommentVNode("v-if", true)
345
+ ], 42, _hoisted_2$3)
346
+ ])) : (vue.openBlock(), vue.createElementBlock(
347
+ "span",
348
+ {
349
+ key: 1,
350
+ class: vue.normalizeClass(["tag", [_ctx.type, _ctx.size, { "is-rounded": _ctx.rounded }]])
351
+ },
352
+ [
353
+ _ctx.icon ? (vue.openBlock(), vue.createBlock(_component_b_icon, {
354
+ key: 0,
355
+ icon: _ctx.icon,
356
+ size: _ctx.size,
357
+ type: _ctx.iconType,
358
+ pack: _ctx.iconPack
359
+ }, null, 8, ["icon", "size", "type", "pack"])) : vue.createCommentVNode("v-if", true),
360
+ vue.createElementVNode(
361
+ "span",
362
+ {
363
+ class: vue.normalizeClass({ "has-ellipsis": _ctx.ellipsis }),
364
+ onClick: _cache[3] || (_cache[3] = (...args) => _ctx.click && _ctx.click(...args))
365
+ },
366
+ [
367
+ vue.renderSlot(_ctx.$slots, "default")
368
+ ],
369
+ 2
370
+ /* CLASS */
371
+ ),
372
+ _ctx.closable ? (vue.openBlock(), vue.createElementBlock("a", {
373
+ key: 1,
374
+ role: "button",
375
+ "aria-label": _ctx.ariaCloseLabel,
376
+ class: vue.normalizeClass(["delete is-small", _ctx.closeType]),
377
+ disabled: _ctx.disabledOrUndefined,
378
+ tabindex: _ctx.tabstop ? 0 : void 0,
379
+ onClick: _cache[4] || (_cache[4] = (...args) => _ctx.close && _ctx.close(...args)),
380
+ onKeyup: _cache[5] || (_cache[5] = vue.withKeys(vue.withModifiers((...args) => _ctx.close && _ctx.close(...args), ["prevent"]), ["delete"]))
381
+ }, null, 42, _hoisted_3$2)) : vue.createCommentVNode("v-if", true)
382
+ ],
383
+ 2
384
+ /* CLASS */
385
+ ));
386
+ }
387
+ var BTag = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$3]]);
388
+
389
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
390
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
391
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
392
+ var __objRest = (source, exclude) => {
393
+ var target = {};
394
+ for (var prop in source)
395
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
396
+ target[prop] = source[prop];
397
+ if (source != null && __getOwnPropSymbols)
398
+ for (var prop of __getOwnPropSymbols(source)) {
399
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
400
+ target[prop] = source[prop];
401
+ }
402
+ return target;
403
+ };
404
+ var CompatFallthroughMixin = vue.defineComponent({
405
+ inheritAttrs: false,
406
+ props: {
407
+ compatFallthrough: {
408
+ type: Boolean,
409
+ default: () => config.defaultCompatFallthrough
410
+ }
411
+ },
412
+ computed: {
413
+ rootAttrs() {
414
+ return this.compatFallthrough ? {
415
+ class: this.$attrs.class,
416
+ style: this.$attrs.style,
417
+ id: this.$attrs.id
418
+ } : {};
419
+ },
420
+ fallthroughAttrs() {
421
+ if (this.compatFallthrough) {
422
+ const _a = this.$attrs, { style: _1, class: _2, id: _3 } = _a, rest = __objRest(_a, ["style", "class", "id"]);
423
+ return rest;
424
+ } else {
425
+ return this.$attrs;
426
+ }
427
+ }
428
+ }
429
+ });
430
+
431
+ const FormElementMixin = vue.defineComponent({
432
+ props: {
433
+ size: String,
434
+ expanded: Boolean,
435
+ loading: Boolean,
436
+ rounded: Boolean,
437
+ icon: String,
438
+ iconPack: String,
439
+ maxlength: [Number, String],
440
+ useHtml5Validation: {
441
+ type: Boolean,
442
+ default: () => config.defaultUseHtml5Validation
443
+ },
444
+ validationMessage: String,
445
+ locale: {
446
+ type: [String, Array],
447
+ default: () => {
448
+ return config.defaultLocale;
449
+ }
450
+ },
451
+ statusIcon: {
452
+ type: Boolean,
453
+ default: () => {
454
+ return config.defaultStatusIcon;
455
+ }
456
+ }
457
+ },
458
+ emits: {
459
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
460
+ blur: (event) => true,
461
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
462
+ focus: (event) => true
463
+ },
464
+ data() {
465
+ return {
466
+ isValid: true,
467
+ isFocused: false,
468
+ newIconPack: this.iconPack || config.defaultIconPack,
469
+ // host component must override this
470
+ _elementRef: ""
471
+ };
472
+ },
473
+ computed: {
474
+ /*
475
+ * Find parent Field, max 3 levels deep.
476
+ */
477
+ parentField() {
478
+ let parent = this.$parent;
479
+ for (let i = 0; i < 3; i++) {
480
+ if (parent && !parent.$data._isField) {
481
+ parent = parent.$parent;
482
+ }
483
+ }
484
+ return parent;
485
+ },
486
+ /*
487
+ * Get the type prop from parent if it's a Field.
488
+ */
489
+ statusType() {
490
+ const { newType } = this.parentField || {};
491
+ if (!newType) return;
492
+ if (typeof newType === "string") {
493
+ return newType;
494
+ } else {
495
+ for (const key in newType) {
496
+ if (newType[key]) {
497
+ return key;
498
+ }
499
+ }
500
+ }
501
+ return void 0;
502
+ },
503
+ /*
504
+ * Get the message prop from parent if it's a Field.
505
+ */
506
+ statusMessage() {
507
+ if (!this.parentField) return;
508
+ return this.parentField.newMessage || this.parentField.$slots.message;
509
+ },
510
+ /*
511
+ * Fix icon size for inputs, large was too big
512
+ */
513
+ iconSize() {
514
+ switch (this.size) {
515
+ case "is-small":
516
+ return this.size;
517
+ case "is-medium":
518
+ return;
519
+ case "is-large":
520
+ return this.newIconPack === "mdi" ? "is-medium" : "";
521
+ }
522
+ return void 0;
523
+ }
524
+ },
525
+ methods: {
526
+ /*
527
+ * Focus method that work dynamically depending on the component.
528
+ */
529
+ focus() {
530
+ const el = this.getElement();
531
+ if (el === void 0) return;
532
+ this.$nextTick(() => {
533
+ if (el) el.focus();
534
+ });
535
+ },
536
+ onBlur($event) {
537
+ this.isFocused = false;
538
+ this.$emit("blur", $event);
539
+ this.checkHtml5Validity();
540
+ },
541
+ onFocus($event) {
542
+ this.isFocused = true;
543
+ this.$emit("focus", $event);
544
+ },
545
+ getElement() {
546
+ let el = this.$refs[this.$data._elementRef];
547
+ while (el != null && typeof el === "object" && "$refs" in el) {
548
+ const form = el;
549
+ el = form.$refs[form.$data._elementRef];
550
+ }
551
+ return el;
552
+ },
553
+ setInvalid() {
554
+ const type = "is-danger";
555
+ const message = this.validationMessage || this.getElement().validationMessage;
556
+ this.setValidity(type, message);
557
+ },
558
+ setValidity(type, message) {
559
+ this.$nextTick(() => {
560
+ if (this.parentField) {
561
+ if (!this.parentField.type) {
562
+ this.parentField.newType = type;
563
+ }
564
+ if (!this.parentField.message) {
565
+ this.parentField.newMessage = message;
566
+ }
567
+ }
568
+ });
569
+ },
570
+ /*
571
+ * Check HTML5 validation, set isValid property.
572
+ * If validation fail, send 'is-danger' type,
573
+ * and error message to parent if it's a Field.
574
+ */
575
+ checkHtml5Validity() {
576
+ if (!this.useHtml5Validation) {
577
+ return false;
578
+ }
579
+ const el = this.getElement();
580
+ if (el == null) {
581
+ return false;
582
+ }
583
+ if (!el.checkValidity()) {
584
+ this.setInvalid();
585
+ this.isValid = false;
586
+ } else {
587
+ this.setValidity(null, null);
588
+ this.isValid = true;
589
+ }
590
+ return this.isValid;
591
+ }
592
+ }
593
+ });
594
+
595
+ var _sfc_main$2 = vue.defineComponent({
596
+ name: "BInput",
597
+ components: { BIcon },
598
+ mixins: [CompatFallthroughMixin, FormElementMixin],
599
+ props: {
600
+ modelValue: {
601
+ type: [Number, String]
602
+ },
603
+ type: {
604
+ type: String,
605
+ default: "text"
606
+ },
607
+ lazy: {
608
+ type: Boolean,
609
+ default: false
610
+ },
611
+ passwordReveal: Boolean,
612
+ iconClickable: Boolean,
613
+ hasCounter: {
614
+ type: Boolean,
615
+ default: () => config.defaultInputHasCounter
616
+ },
617
+ customClass: {
618
+ type: String,
619
+ default: ""
620
+ },
621
+ iconRight: String,
622
+ iconRightClickable: Boolean,
623
+ iconRightType: String,
624
+ // Native options to use in HTML5 validation
625
+ autocomplete: String
626
+ },
627
+ emits: {
628
+ /* eslint-disable @typescript-eslint/no-unused-vars */
629
+ "icon-click": (event) => true,
630
+ "icon-right-click": (event) => true,
631
+ "update:modelValue": (value) => true
632
+ /* eslint-enable @typescript-eslint/no-unused-vars */
633
+ },
634
+ data() {
635
+ return {
636
+ newValue: this.modelValue,
637
+ newType: this.type,
638
+ newAutocomplete: this.autocomplete || config.defaultInputAutocomplete,
639
+ isPasswordVisible: false,
640
+ _elementRef: this.type === "textarea" ? "textarea" : "input"
641
+ };
642
+ },
643
+ computed: {
644
+ computedValue: {
645
+ get() {
646
+ return this.newValue;
647
+ },
648
+ set(value) {
649
+ this.newValue = value;
650
+ this.$emit("update:modelValue", value);
651
+ }
652
+ },
653
+ rootClasses() {
654
+ return [
655
+ this.iconPosition,
656
+ this.size,
657
+ {
658
+ "is-expanded": this.expanded,
659
+ "is-loading": this.loading,
660
+ "is-clearfix": !this.hasMessage
661
+ }
662
+ ];
663
+ },
664
+ inputClasses() {
665
+ return [
666
+ this.statusType,
667
+ this.size,
668
+ { "is-rounded": this.rounded }
669
+ ];
670
+ },
671
+ hasIconRight() {
672
+ return this.passwordReveal || this.loading || this.statusIcon && this.statusTypeIcon || this.iconRight;
673
+ },
674
+ rightIcon() {
675
+ if (this.passwordReveal) {
676
+ return this.passwordVisibleIcon;
677
+ } else if (this.iconRight) {
678
+ return this.iconRight;
679
+ }
680
+ return this.statusTypeIcon;
681
+ },
682
+ rightIconType() {
683
+ if (this.passwordReveal) {
684
+ return "is-primary";
685
+ } else if (this.iconRight) {
686
+ return this.iconRightType || void 0;
687
+ }
688
+ return this.statusType;
689
+ },
690
+ /*
691
+ * Position of the icon or if it's both sides.
692
+ */
693
+ iconPosition() {
694
+ let iconClasses = "";
695
+ if (this.icon) {
696
+ iconClasses += "has-icons-left ";
697
+ }
698
+ if (this.hasIconRight) {
699
+ iconClasses += "has-icons-right";
700
+ }
701
+ return iconClasses;
702
+ },
703
+ /*
704
+ * Icon name (MDI) based on the type.
705
+ */
706
+ statusTypeIcon() {
707
+ switch (this.statusType) {
708
+ case "is-success":
709
+ return "check";
710
+ case "is-danger":
711
+ return "alert-circle";
712
+ case "is-info":
713
+ return "information";
714
+ case "is-warning":
715
+ return "alert";
716
+ default:
717
+ return void 0;
718
+ }
719
+ },
720
+ /*
721
+ * Check if have any message prop from parent if it's a Field.
722
+ */
723
+ hasMessage() {
724
+ return !!this.statusMessage;
725
+ },
726
+ /*
727
+ * Current password-reveal icon name.
728
+ */
729
+ passwordVisibleIcon() {
730
+ return !this.isPasswordVisible ? "eye" : "eye-off";
731
+ },
732
+ /*
733
+ * Get value length
734
+ */
735
+ valueLength() {
736
+ if (typeof this.computedValue === "string") {
737
+ return Array.from(this.computedValue).length;
738
+ } else if (typeof this.computedValue === "number") {
739
+ return this.computedValue.toString().length;
740
+ }
741
+ return 0;
742
+ }
743
+ },
744
+ watch: {
745
+ /*
746
+ * When v-model is changed:
747
+ * 1. Set internal value.
748
+ * 2. Validate it if the value came from outside;
749
+ * i.e., not equal to computedValue
750
+ */
751
+ modelValue(value) {
752
+ const fromOutside = this.computedValue != value;
753
+ this.newValue = value;
754
+ if (fromOutside) {
755
+ this.$nextTick(() => {
756
+ !this.isValid && this.checkHtml5Validity();
757
+ });
758
+ }
759
+ },
760
+ type(type) {
761
+ this.newType = type;
762
+ }
763
+ },
764
+ methods: {
765
+ /*
766
+ * Toggle the visibility of a password-reveal input
767
+ * by changing the type and focus the input right away.
768
+ */
769
+ togglePasswordVisibility() {
770
+ this.isPasswordVisible = !this.isPasswordVisible;
771
+ this.newType = this.isPasswordVisible ? "text" : "password";
772
+ this.$nextTick(() => {
773
+ this.focus();
774
+ });
775
+ },
776
+ iconClick(emit, event) {
777
+ this.$emit(emit, event);
778
+ this.$nextTick(() => {
779
+ this.focus();
780
+ });
781
+ },
782
+ rightIconClick(event) {
783
+ if (this.passwordReveal) {
784
+ this.togglePasswordVisibility();
785
+ } else if (this.iconRightClickable) {
786
+ this.iconClick("icon-right-click", event);
787
+ }
788
+ },
789
+ onInput() {
790
+ if (!this.lazy) {
791
+ this.revalidate();
792
+ }
793
+ },
794
+ onChange() {
795
+ if (this.lazy) {
796
+ this.revalidate();
797
+ }
798
+ },
799
+ revalidate() {
800
+ !this.isValid && this.checkHtml5Validity();
801
+ }
802
+ }
803
+ });
804
+
805
+ const _hoisted_1$2 = ["type", "autocomplete", "maxlength"];
806
+ const _hoisted_2$2 = ["maxlength"];
807
+ const _hoisted_3$1 = ["type", "autocomplete", "maxlength"];
808
+ const _hoisted_4$1 = ["maxlength"];
809
+ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
810
+ const _component_b_icon = vue.resolveComponent("b-icon");
811
+ return vue.openBlock(), vue.createElementBlock(
812
+ "div",
813
+ vue.mergeProps({
814
+ class: ["control", _ctx.rootClasses]
815
+ }, _ctx.rootAttrs),
816
+ [
817
+ _ctx.lazy ? (vue.openBlock(), vue.createElementBlock(
818
+ vue.Fragment,
819
+ { key: 0 },
820
+ [
821
+ _ctx.type !== "textarea" ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("input", vue.mergeProps({
822
+ key: 0,
823
+ ref: "input",
824
+ class: ["input", [_ctx.inputClasses, _ctx.customClass]],
825
+ type: _ctx.newType,
826
+ autocomplete: _ctx.newAutocomplete,
827
+ maxlength: _ctx.maxlength,
828
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.computedValue = $event)
829
+ }, _ctx.fallthroughAttrs, {
830
+ onInput: _cache[1] || (_cache[1] = (...args) => _ctx.onInput && _ctx.onInput(...args)),
831
+ onChange: _cache[2] || (_cache[2] = (...args) => _ctx.onChange && _ctx.onChange(...args)),
832
+ onBlur: _cache[3] || (_cache[3] = (...args) => _ctx.onBlur && _ctx.onBlur(...args)),
833
+ onFocus: _cache[4] || (_cache[4] = (...args) => _ctx.onFocus && _ctx.onFocus(...args))
834
+ }), null, 16, _hoisted_1$2)), [
835
+ [
836
+ vue.vModelDynamic,
837
+ _ctx.computedValue,
838
+ void 0,
839
+ { lazy: true }
840
+ ]
841
+ ]) : vue.withDirectives((vue.openBlock(), vue.createElementBlock("textarea", vue.mergeProps({
842
+ key: 1,
843
+ ref: "textarea",
844
+ class: ["textarea", [_ctx.inputClasses, _ctx.customClass]],
845
+ maxlength: _ctx.maxlength,
846
+ "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => _ctx.computedValue = $event)
847
+ }, _ctx.fallthroughAttrs, {
848
+ onInput: _cache[6] || (_cache[6] = (...args) => _ctx.onInput && _ctx.onInput(...args)),
849
+ onChange: _cache[7] || (_cache[7] = (...args) => _ctx.onChange && _ctx.onChange(...args)),
850
+ onBlur: _cache[8] || (_cache[8] = (...args) => _ctx.onBlur && _ctx.onBlur(...args)),
851
+ onFocus: _cache[9] || (_cache[9] = (...args) => _ctx.onFocus && _ctx.onFocus(...args))
852
+ }), null, 16, _hoisted_2$2)), [
853
+ [
854
+ vue.vModelText,
855
+ _ctx.computedValue,
856
+ void 0,
857
+ { lazy: true }
858
+ ]
859
+ ])
860
+ ],
861
+ 64
862
+ /* STABLE_FRAGMENT */
863
+ )) : (vue.openBlock(), vue.createElementBlock(
864
+ vue.Fragment,
865
+ { key: 1 },
866
+ [
867
+ _ctx.type !== "textarea" ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("input", vue.mergeProps({
868
+ key: 0,
869
+ ref: "input",
870
+ class: ["input", [_ctx.inputClasses, _ctx.customClass]],
871
+ type: _ctx.newType,
872
+ autocomplete: _ctx.newAutocomplete,
873
+ maxlength: _ctx.maxlength,
874
+ "onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => _ctx.computedValue = $event)
875
+ }, _ctx.fallthroughAttrs, {
876
+ onInput: _cache[11] || (_cache[11] = (...args) => _ctx.onInput && _ctx.onInput(...args)),
877
+ onChange: _cache[12] || (_cache[12] = (...args) => _ctx.onChange && _ctx.onChange(...args)),
878
+ onBlur: _cache[13] || (_cache[13] = (...args) => _ctx.onBlur && _ctx.onBlur(...args)),
879
+ onFocus: _cache[14] || (_cache[14] = (...args) => _ctx.onFocus && _ctx.onFocus(...args))
880
+ }), null, 16, _hoisted_3$1)), [
881
+ [vue.vModelDynamic, _ctx.computedValue]
882
+ ]) : vue.withDirectives((vue.openBlock(), vue.createElementBlock("textarea", vue.mergeProps({
883
+ key: 1,
884
+ ref: "textarea",
885
+ class: ["textarea", [_ctx.inputClasses, _ctx.customClass]],
886
+ maxlength: _ctx.maxlength,
887
+ "onUpdate:modelValue": _cache[15] || (_cache[15] = ($event) => _ctx.computedValue = $event)
888
+ }, _ctx.fallthroughAttrs, {
889
+ onInput: _cache[16] || (_cache[16] = (...args) => _ctx.onInput && _ctx.onInput(...args)),
890
+ onChange: _cache[17] || (_cache[17] = (...args) => _ctx.onChange && _ctx.onChange(...args)),
891
+ onBlur: _cache[18] || (_cache[18] = (...args) => _ctx.onBlur && _ctx.onBlur(...args)),
892
+ onFocus: _cache[19] || (_cache[19] = (...args) => _ctx.onFocus && _ctx.onFocus(...args))
893
+ }), null, 16, _hoisted_4$1)), [
894
+ [vue.vModelText, _ctx.computedValue]
895
+ ])
896
+ ],
897
+ 64
898
+ /* STABLE_FRAGMENT */
899
+ )),
900
+ _ctx.icon ? (vue.openBlock(), vue.createBlock(_component_b_icon, {
901
+ key: 2,
902
+ class: vue.normalizeClass(["is-left", { "is-clickable": _ctx.iconClickable }]),
903
+ icon: _ctx.icon,
904
+ pack: _ctx.iconPack,
905
+ size: _ctx.iconSize,
906
+ onClick: _cache[20] || (_cache[20] = ($event) => _ctx.iconClick("icon-click", $event))
907
+ }, null, 8, ["class", "icon", "pack", "size"])) : vue.createCommentVNode("v-if", true),
908
+ !_ctx.loading && _ctx.hasIconRight && _ctx.rightIcon ? (vue.openBlock(), vue.createBlock(_component_b_icon, {
909
+ key: 3,
910
+ class: vue.normalizeClass(["is-right", { "is-clickable": _ctx.passwordReveal || _ctx.iconRightClickable }]),
911
+ icon: _ctx.rightIcon,
912
+ pack: _ctx.iconPack,
913
+ size: _ctx.iconSize,
914
+ type: _ctx.rightIconType,
915
+ both: "",
916
+ onClick: _ctx.rightIconClick
917
+ }, null, 8, ["class", "icon", "pack", "size", "type", "onClick"])) : vue.createCommentVNode("v-if", true),
918
+ _ctx.maxlength && _ctx.hasCounter && _ctx.type !== "number" ? (vue.openBlock(), vue.createElementBlock(
919
+ "small",
920
+ {
921
+ key: 4,
922
+ class: vue.normalizeClass(["help counter", { "is-invisible": !_ctx.isFocused }])
923
+ },
924
+ vue.toDisplayString(_ctx.valueLength) + " / " + vue.toDisplayString(_ctx.maxlength),
925
+ 3
926
+ /* TEXT, CLASS */
927
+ )) : vue.createCommentVNode("v-if", true)
928
+ ],
929
+ 16
930
+ /* FULL_PROPS */
931
+ );
932
+ }
933
+ var BInput = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2]]);
934
+
935
+ var _sfc_main$1 = vue.defineComponent({
936
+ name: "BAutocomplete",
937
+ components: { BInput },
938
+ mixins: [CompatFallthroughMixin, FormElementMixin],
939
+ props: {
940
+ modelValue: [Number, String, null],
941
+ data: {
942
+ type: Array,
943
+ default: () => []
944
+ },
945
+ field: {
946
+ type: String,
947
+ default: "value"
948
+ },
949
+ keepFirst: Boolean,
950
+ clearOnSelect: Boolean,
951
+ openOnFocus: Boolean,
952
+ customFormatter: {
953
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
954
+ type: Function
955
+ },
956
+ checkInfiniteScroll: Boolean,
957
+ keepOpen: Boolean,
958
+ selectOnClickOutside: Boolean,
959
+ clearable: Boolean,
960
+ maxHeight: [String, Number],
961
+ dropdownPosition: {
962
+ type: String,
963
+ default: "auto"
964
+ },
965
+ groupField: String,
966
+ groupOptions: String,
967
+ iconRight: String,
968
+ iconRightClickable: Boolean,
969
+ appendToBody: Boolean,
970
+ type: {
971
+ type: String,
972
+ default: "text"
973
+ },
974
+ confirmKeys: {
975
+ type: Array,
976
+ default: () => ["Tab", "Enter"]
977
+ },
978
+ selectableHeader: Boolean,
979
+ selectableFooter: Boolean,
980
+ // Native options to use in HTML5 validation
981
+ autocomplete: String
982
+ },
983
+ emits: {
984
+ /* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any */
985
+ active: (active) => true,
986
+ blur: (event) => true,
987
+ focus: (event) => true,
988
+ "icon-click": (event) => true,
989
+ "icon-right-click": (event) => true,
990
+ "infinite-scroll": () => true,
991
+ select: (selected, event) => true,
992
+ "select-footer": (event) => true,
993
+ "select-header": (event) => true,
994
+ typing: (value) => true,
995
+ "update:modelValue": (value) => true
996
+ /* eslint-enable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any */
997
+ },
998
+ data() {
999
+ return {
1000
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1001
+ selected: null,
1002
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1003
+ hovered: null,
1004
+ headerHovered: null,
1005
+ footerHovered: null,
1006
+ isActive: false,
1007
+ newValue: this.modelValue,
1008
+ newAutocomplete: this.autocomplete || "off",
1009
+ ariaAutocomplete: this.keepFirst ? "both" : "list",
1010
+ isListInViewportVertically: true,
1011
+ hasFocus: false,
1012
+ style: {},
1013
+ _isAutocomplete: true,
1014
+ _elementRef: "input",
1015
+ _bodyEl: void 0,
1016
+ // Used to append to body
1017
+ timeOutID: void 0
1018
+ };
1019
+ },
1020
+ computed: {
1021
+ computedData() {
1022
+ const { groupField, groupOptions } = this;
1023
+ if (groupField) {
1024
+ if (groupOptions) {
1025
+ const newData = [];
1026
+ this.data.forEach((option) => {
1027
+ const group = getValueByPath(option, groupField);
1028
+ const items = getValueByPath(option, groupOptions);
1029
+ newData.push({ group, items });
1030
+ });
1031
+ return newData;
1032
+ } else {
1033
+ const tmp = {};
1034
+ this.data.forEach((option) => {
1035
+ const group = getValueByPath(option, groupField);
1036
+ if (!tmp[group]) tmp[group] = [];
1037
+ tmp[group].push(option);
1038
+ });
1039
+ const newData = [];
1040
+ Object.keys(tmp).forEach((group) => {
1041
+ newData.push({ group, items: tmp[group] });
1042
+ });
1043
+ return newData;
1044
+ }
1045
+ }
1046
+ return [{ items: this.data }];
1047
+ },
1048
+ isEmpty() {
1049
+ if (!this.computedData) return true;
1050
+ return !this.computedData.some(
1051
+ (element) => element.items && element.items.length
1052
+ );
1053
+ },
1054
+ /*
1055
+ * White-listed items to not close when clicked.
1056
+ * Add input, dropdown and all children.
1057
+ */
1058
+ whiteList() {
1059
+ var _a;
1060
+ this.computedData;
1061
+ const whiteList = [];
1062
+ whiteList.push(this.$refs.input.$el.querySelector("input"));
1063
+ whiteList.push(this.$refs.dropdown);
1064
+ if (this.$refs.dropdown != null) {
1065
+ const children = this.$refs.dropdown.querySelectorAll("*");
1066
+ for (const child of children) {
1067
+ whiteList.push(child);
1068
+ }
1069
+ }
1070
+ if (((_a = this.$parent) == null ? void 0 : _a.$data)._isTaginput) {
1071
+ whiteList.push(this.$parent.$el);
1072
+ const tagInputChildren = this.$parent.$el.querySelectorAll("*");
1073
+ for (const tagInputChild of tagInputChildren) {
1074
+ whiteList.push(tagInputChild);
1075
+ }
1076
+ }
1077
+ return whiteList;
1078
+ },
1079
+ /*
1080
+ * Check if exists default slot
1081
+ */
1082
+ hasDefaultSlot() {
1083
+ return !!this.$slots.default;
1084
+ },
1085
+ /*
1086
+ * Check if exists group slot
1087
+ */
1088
+ hasGroupSlot() {
1089
+ return !!this.$slots.group;
1090
+ },
1091
+ /*
1092
+ * Check if exists "empty" slot
1093
+ */
1094
+ hasEmptySlot() {
1095
+ return !!this.$slots.empty;
1096
+ },
1097
+ /*
1098
+ * Check if exists "header" slot
1099
+ */
1100
+ hasHeaderSlot() {
1101
+ return !!this.$slots.header;
1102
+ },
1103
+ /*
1104
+ * Check if exists "footer" slot
1105
+ */
1106
+ hasFooterSlot() {
1107
+ return !!this.$slots.footer;
1108
+ },
1109
+ /*
1110
+ * Apply dropdownPosition property
1111
+ */
1112
+ isOpenedTop() {
1113
+ return this.dropdownPosition === "top" || this.dropdownPosition === "auto" && !this.isListInViewportVertically;
1114
+ },
1115
+ newIconRight() {
1116
+ if (this.clearable && this.newValue) {
1117
+ return "close-circle";
1118
+ }
1119
+ return this.iconRight;
1120
+ },
1121
+ newIconRightClickable() {
1122
+ if (this.clearable) {
1123
+ return true;
1124
+ }
1125
+ return this.iconRightClickable;
1126
+ },
1127
+ contentStyle() {
1128
+ return {
1129
+ maxHeight: toCssWidth(this.maxHeight) || void 0
1130
+ };
1131
+ }
1132
+ },
1133
+ watch: {
1134
+ /*
1135
+ * When dropdown is toggled, check the visibility to know when
1136
+ * to open upwards.
1137
+ */
1138
+ isActive(active) {
1139
+ if (this.dropdownPosition === "auto") {
1140
+ if (active) {
1141
+ this.calcDropdownInViewportVertical();
1142
+ } else {
1143
+ this.timeOutID = setTimeout(() => {
1144
+ this.calcDropdownInViewportVertical();
1145
+ }, 100);
1146
+ }
1147
+ }
1148
+ this.$nextTick(() => {
1149
+ this.$emit("active", active);
1150
+ });
1151
+ },
1152
+ /*
1153
+ * When checkInfiniteScroll property changes scroll event should be removed or added
1154
+ */
1155
+ checkInfiniteScroll(checkInfiniteScroll) {
1156
+ if (!this.$refs.dropdown) return;
1157
+ const list = this.$refs.dropdown.querySelector(
1158
+ ".dropdown-content"
1159
+ );
1160
+ if (!list) return;
1161
+ if (checkInfiniteScroll === true) {
1162
+ list.addEventListener(
1163
+ "scroll",
1164
+ this.checkIfReachedTheEndOfScroll
1165
+ );
1166
+ return;
1167
+ }
1168
+ list.removeEventListener(
1169
+ "scroll",
1170
+ this.checkIfReachedTheEndOfScroll
1171
+ );
1172
+ },
1173
+ /*
1174
+ * When updating input's value
1175
+ * 1. Emit changes
1176
+ * 2. If value isn't the same as selected, set null
1177
+ * 3. Close dropdown if value is clear or else open it
1178
+ */
1179
+ newValue(value) {
1180
+ this.$emit("update:modelValue", value);
1181
+ const currentValue = this.getValue(this.selected);
1182
+ if (currentValue !== void 0 && currentValue !== null && currentValue !== value) {
1183
+ this.setSelected(null, false);
1184
+ }
1185
+ if (this.hasFocus && (!this.openOnFocus || value !== "")) {
1186
+ this.isActive = value !== "" && value !== void 0 && value !== null;
1187
+ }
1188
+ },
1189
+ /*
1190
+ * When v-model is changed:
1191
+ * 1. Update internal value.
1192
+ * 2. If it's invalid, validate again.
1193
+ */
1194
+ modelValue(value) {
1195
+ this.newValue = value;
1196
+ },
1197
+ keepFirst(value) {
1198
+ this.ariaAutocomplete = value ? "both" : "list";
1199
+ },
1200
+ /*
1201
+ * Select first option if "keep-first
1202
+ */
1203
+ data() {
1204
+ if (this.keepFirst) {
1205
+ this.$nextTick(() => {
1206
+ if (this.isActive) {
1207
+ this.selectFirstOption(this.computedData);
1208
+ } else {
1209
+ this.setHovered(null);
1210
+ }
1211
+ });
1212
+ } else {
1213
+ if (this.hovered) {
1214
+ const hoveredValue = this.getValue(this.hovered);
1215
+ const data = this.computedData.map((d) => d.items).reduce((a, b) => [...a, ...b], []);
1216
+ if (!data.some((d) => this.getValue(d) === hoveredValue)) {
1217
+ this.setHovered(null);
1218
+ }
1219
+ }
1220
+ }
1221
+ },
1222
+ /*
1223
+ * When appendToBody property changes, handle the transition properly
1224
+ */
1225
+ appendToBody(newValue, oldValue) {
1226
+ if (newValue && !oldValue) {
1227
+ if (this.isActive && this.$refs.dropdown && !this.$data._bodyEl) {
1228
+ this.$data._bodyEl = createAbsoluteElement(
1229
+ this.$refs.dropdown
1230
+ );
1231
+ this.updateAppendToBody();
1232
+ }
1233
+ } else if (!newValue && oldValue) {
1234
+ if (this.$data._bodyEl) {
1235
+ removeElement(this.$data._bodyEl);
1236
+ this.$data._bodyEl = void 0;
1237
+ }
1238
+ }
1239
+ }
1240
+ },
1241
+ methods: {
1242
+ /*
1243
+ * Set which option is currently hovered.
1244
+ */
1245
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1246
+ setHovered(option) {
1247
+ if (option === void 0) return;
1248
+ this.hovered = option;
1249
+ },
1250
+ /*
1251
+ * Set which option is currently selected, update v-model,
1252
+ * update input value and close dropdown.
1253
+ */
1254
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1255
+ setSelected(option, closeDropdown = true, event) {
1256
+ if (option === void 0) return;
1257
+ this.selected = option;
1258
+ this.$emit("select", this.selected, event);
1259
+ if (this.selected !== null) {
1260
+ if (this.clearOnSelect) {
1261
+ this.newValue = "";
1262
+ } else {
1263
+ this.newValue = this.getValue(this.selected);
1264
+ }
1265
+ this.setHovered(null);
1266
+ }
1267
+ closeDropdown && this.$nextTick(() => {
1268
+ this.isActive = false;
1269
+ });
1270
+ this.checkValidity();
1271
+ },
1272
+ /*
1273
+ * Select first option
1274
+ */
1275
+ selectFirstOption(computedData) {
1276
+ this.$nextTick(() => {
1277
+ const nonEmptyElements = computedData.filter(
1278
+ (element) => element.items && element.items.length
1279
+ );
1280
+ if (nonEmptyElements.length) {
1281
+ const option = nonEmptyElements[0].items[0];
1282
+ this.setHovered(option);
1283
+ } else {
1284
+ this.setHovered(null);
1285
+ }
1286
+ });
1287
+ },
1288
+ /*
1289
+ * Find index of hovered item in data array by comparing display values
1290
+ * instead of object references. This fixes the bug with computed data
1291
+ * where proxy objects cause indexOf to fail.
1292
+ */
1293
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1294
+ findHoveredIndex(data) {
1295
+ if (this.hovered === null || this.hovered === void 0) {
1296
+ return -1;
1297
+ }
1298
+ const exactIndex = data.indexOf(this.hovered);
1299
+ if (exactIndex !== -1) {
1300
+ return exactIndex;
1301
+ }
1302
+ const hoveredValue = this.getValue(this.hovered);
1303
+ if (hoveredValue === null || hoveredValue === void 0) {
1304
+ return -1;
1305
+ }
1306
+ return data.findIndex((item) => {
1307
+ if (item === null || item === void 0) {
1308
+ return hoveredValue === null || hoveredValue === void 0;
1309
+ }
1310
+ return this.getValue(item) === hoveredValue;
1311
+ });
1312
+ },
1313
+ keydown(event) {
1314
+ const { key } = event;
1315
+ if (key === "Enter") event.preventDefault();
1316
+ if (key === "Escape" || key === "Tab") {
1317
+ this.isActive = false;
1318
+ }
1319
+ if (this.confirmKeys.indexOf(key) >= 0) {
1320
+ if (key === ",") event.preventDefault();
1321
+ const closeDropdown = !this.keepOpen || key === "Tab";
1322
+ if (this.hovered === null) {
1323
+ this.checkIfHeaderOrFooterSelected(
1324
+ event,
1325
+ null,
1326
+ closeDropdown
1327
+ );
1328
+ return;
1329
+ }
1330
+ this.setSelected(this.hovered, closeDropdown, event);
1331
+ }
1332
+ },
1333
+ selectHeaderOrFoterByClick(event, origin) {
1334
+ this.checkIfHeaderOrFooterSelected(event, { origin });
1335
+ },
1336
+ /*
1337
+ * Check if header or footer was selected.
1338
+ */
1339
+ checkIfHeaderOrFooterSelected(event, triggerClick, closeDropdown = true) {
1340
+ if (this.selectableHeader && (this.headerHovered || triggerClick && triggerClick.origin === "header")) {
1341
+ this.$emit("select-header", event);
1342
+ this.headerHovered = false;
1343
+ if (triggerClick) this.setHovered(null);
1344
+ if (closeDropdown) this.isActive = false;
1345
+ }
1346
+ if (this.selectableFooter && (this.footerHovered || triggerClick && triggerClick.origin === "footer")) {
1347
+ this.$emit("select-footer", event);
1348
+ this.footerHovered = false;
1349
+ if (triggerClick) this.setHovered(null);
1350
+ if (closeDropdown) this.isActive = false;
1351
+ }
1352
+ },
1353
+ /*
1354
+ * Close dropdown if clicked outside.
1355
+ */
1356
+ clickedOutside(event) {
1357
+ const target = isCustomElement(this) ? event.composedPath()[0] : event.target;
1358
+ if (!this.hasFocus && this.whiteList.indexOf(target) < 0) {
1359
+ if (this.keepFirst && this.hovered && this.selectOnClickOutside) {
1360
+ this.setSelected(this.hovered, true);
1361
+ } else {
1362
+ this.isActive = false;
1363
+ }
1364
+ }
1365
+ },
1366
+ /*
1367
+ * Return display text for the input.
1368
+ * If object, get value from path, or else just the value.
1369
+ */
1370
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1371
+ getValue(option) {
1372
+ if (option === null) return;
1373
+ if (typeof this.customFormatter !== "undefined") {
1374
+ return this.customFormatter(option);
1375
+ }
1376
+ return typeof option === "object" ? getValueByPath(option, this.field) : option;
1377
+ },
1378
+ /*
1379
+ * Check if the scroll list inside the dropdown
1380
+ * reached it's end.
1381
+ */
1382
+ checkIfReachedTheEndOfScroll() {
1383
+ const list = this.$refs.dropdown.querySelector(
1384
+ ".dropdown-content"
1385
+ );
1386
+ const footerHeight = this.hasFooterSlot ? list.querySelectorAll("div.dropdown-footer")[0].clientHeight : 0;
1387
+ if (list.clientHeight !== list.scrollHeight && list.scrollTop + list.parentElement.clientHeight + footerHeight >= list.scrollHeight) {
1388
+ this.$emit("infinite-scroll");
1389
+ }
1390
+ },
1391
+ /*
1392
+ * Calculate if the dropdown is vertically visible when activated,
1393
+ * otherwise it is openened upwards.
1394
+ */
1395
+ calcDropdownInViewportVertical() {
1396
+ this.$nextTick(() => {
1397
+ var _a;
1398
+ if (this.$refs.dropdown == null) return;
1399
+ const rect = this.$refs.dropdown.getBoundingClientRect();
1400
+ this.isListInViewportVertically = rect.top >= 0 && rect.bottom <= ((window == null ? void 0 : window.innerHeight) || ((_a = document == null ? void 0 : document.documentElement) == null ? void 0 : _a.clientHeight));
1401
+ if (this.appendToBody) {
1402
+ this.updateAppendToBody();
1403
+ }
1404
+ });
1405
+ },
1406
+ /*
1407
+ * Arrows keys listener.
1408
+ * If dropdown is active, set hovered option, or else just open.
1409
+ */
1410
+ keyArrows(direction) {
1411
+ const sum = direction === "down" ? 1 : -1;
1412
+ if (this.isActive) {
1413
+ const data = this.computedData.map((d) => d.items).reduce((a, b) => [...a, ...b], []);
1414
+ if (this.hasHeaderSlot && this.selectableHeader) {
1415
+ data.unshift(void 0);
1416
+ }
1417
+ if (this.hasFooterSlot && this.selectableFooter) {
1418
+ data.push(void 0);
1419
+ }
1420
+ let index;
1421
+ if (this.headerHovered) {
1422
+ index = 0 + sum;
1423
+ } else if (this.footerHovered) {
1424
+ index = data.length - 1 + sum;
1425
+ } else {
1426
+ index = this.findHoveredIndex(data) + sum;
1427
+ }
1428
+ index = index > data.length - 1 ? data.length - 1 : index;
1429
+ index = index < 0 ? 0 : index;
1430
+ this.footerHovered = false;
1431
+ this.headerHovered = false;
1432
+ this.setHovered(data[index] !== void 0 ? data[index] : null);
1433
+ if (this.hasFooterSlot && this.selectableFooter && index === data.length - 1) {
1434
+ this.footerHovered = true;
1435
+ }
1436
+ if (this.hasHeaderSlot && this.selectableHeader && index === 0) {
1437
+ this.headerHovered = true;
1438
+ }
1439
+ const list = this.$refs.dropdown.querySelector(
1440
+ ".dropdown-content"
1441
+ );
1442
+ let querySelectorText = "a.dropdown-item:not(.is-disabled)";
1443
+ if (this.hasHeaderSlot && this.selectableHeader) {
1444
+ querySelectorText += ",div.dropdown-header";
1445
+ }
1446
+ if (this.hasFooterSlot && this.selectableFooter) {
1447
+ querySelectorText += ",div.dropdown-footer";
1448
+ }
1449
+ const element = list.querySelectorAll(querySelectorText)[index];
1450
+ if (!element) return;
1451
+ const visMin = list.scrollTop;
1452
+ const visMax = list.scrollTop + list.clientHeight - element.clientHeight;
1453
+ if (element.offsetTop < visMin) {
1454
+ list.scrollTop = element.offsetTop;
1455
+ } else if (element.offsetTop >= visMax) {
1456
+ list.scrollTop = element.offsetTop - list.clientHeight + element.clientHeight;
1457
+ }
1458
+ } else {
1459
+ this.isActive = true;
1460
+ }
1461
+ },
1462
+ /*
1463
+ * Focus listener.
1464
+ * If value is the same as selected, select all text.
1465
+ */
1466
+ focused(event) {
1467
+ if (this.getValue(this.selected) === this.newValue) {
1468
+ this.$el.querySelector("input").select();
1469
+ }
1470
+ if (this.openOnFocus) {
1471
+ this.isActive = true;
1472
+ if (this.keepFirst) {
1473
+ this.selectFirstOption(this.computedData);
1474
+ }
1475
+ }
1476
+ this.hasFocus = true;
1477
+ this.$emit("focus", event);
1478
+ },
1479
+ /*
1480
+ * Blur listener.
1481
+ */
1482
+ onBlur(event) {
1483
+ this.hasFocus = false;
1484
+ this.$emit("blur", event);
1485
+ },
1486
+ onInput() {
1487
+ const currentValue = this.getValue(this.selected);
1488
+ if (currentValue !== void 0 && currentValue !== null && currentValue === this.newValue) {
1489
+ return;
1490
+ }
1491
+ this.$emit("typing", this.newValue);
1492
+ this.checkValidity();
1493
+ },
1494
+ rightIconClick(event) {
1495
+ if (this.clearable) {
1496
+ this.newValue = "";
1497
+ this.setSelected(null, false);
1498
+ if (this.openOnFocus) {
1499
+ this.$refs.input.$el.focus();
1500
+ }
1501
+ } else {
1502
+ this.$emit("icon-right-click", event);
1503
+ }
1504
+ },
1505
+ checkValidity() {
1506
+ if (this.useHtml5Validation) {
1507
+ this.$nextTick(() => {
1508
+ this.checkHtml5Validity();
1509
+ });
1510
+ }
1511
+ },
1512
+ updateAppendToBody() {
1513
+ const dropdownMenu = this.$refs.dropdown;
1514
+ const trigger = this.$parent.$data._isTaginput ? this.$parent.$el : this.$refs.input.$el;
1515
+ if (dropdownMenu && trigger) {
1516
+ if (!this.$data._bodyEl) {
1517
+ this.$data._bodyEl = createAbsoluteElement(dropdownMenu);
1518
+ }
1519
+ const root = this.$data._bodyEl;
1520
+ root.classList.forEach((item) => root.classList.remove(item));
1521
+ root.classList.add("autocomplete");
1522
+ root.classList.add("control");
1523
+ if (this.expanded) {
1524
+ root.classList.add("is-expanded");
1525
+ }
1526
+ const rect = trigger.getBoundingClientRect();
1527
+ let top = rect.top + window.scrollY;
1528
+ const left = rect.left + window.scrollX;
1529
+ if (!this.isOpenedTop) {
1530
+ top += trigger.clientHeight;
1531
+ } else {
1532
+ top -= dropdownMenu.clientHeight;
1533
+ }
1534
+ this.style = {
1535
+ position: "absolute",
1536
+ top: `${top}px`,
1537
+ left: `${left}px`,
1538
+ width: `${trigger.clientWidth}px`,
1539
+ maxWidth: `${trigger.clientWidth}px`,
1540
+ zIndex: "99"
1541
+ };
1542
+ }
1543
+ }
1544
+ },
1545
+ created() {
1546
+ if (typeof window !== "undefined") {
1547
+ document.addEventListener("click", this.clickedOutside);
1548
+ if (this.dropdownPosition === "auto") {
1549
+ window.addEventListener(
1550
+ "resize",
1551
+ this.calcDropdownInViewportVertical
1552
+ );
1553
+ }
1554
+ if (this.appendToBody) {
1555
+ window.addEventListener(
1556
+ "scroll",
1557
+ this.calcDropdownInViewportVertical
1558
+ );
1559
+ }
1560
+ }
1561
+ },
1562
+ mounted() {
1563
+ if (this.checkInfiniteScroll && this.$refs.dropdown && this.$refs.dropdown.querySelector(".dropdown-content")) {
1564
+ const list = this.$refs.dropdown.querySelector(
1565
+ ".dropdown-content"
1566
+ );
1567
+ list.addEventListener("scroll", this.checkIfReachedTheEndOfScroll);
1568
+ }
1569
+ if (this.appendToBody) {
1570
+ this.$data._bodyEl = createAbsoluteElement(
1571
+ this.$refs.dropdown
1572
+ );
1573
+ this.updateAppendToBody();
1574
+ }
1575
+ },
1576
+ beforeUnmount() {
1577
+ if (typeof window !== "undefined") {
1578
+ document.removeEventListener("click", this.clickedOutside);
1579
+ if (this.dropdownPosition === "auto") {
1580
+ window.removeEventListener(
1581
+ "resize",
1582
+ this.calcDropdownInViewportVertical
1583
+ );
1584
+ }
1585
+ if (this.appendToBody) {
1586
+ window.removeEventListener(
1587
+ "scroll",
1588
+ this.calcDropdownInViewportVertical
1589
+ );
1590
+ }
1591
+ }
1592
+ if (this.checkInfiniteScroll && this.$refs.dropdown && this.$refs.dropdown.querySelector(".dropdown-content")) {
1593
+ const list = this.$refs.dropdown.querySelector(
1594
+ ".dropdown-content"
1595
+ );
1596
+ list.removeEventListener(
1597
+ "scroll",
1598
+ this.checkIfReachedTheEndOfScroll
1599
+ );
1600
+ }
1601
+ if (this.appendToBody && this.$data._bodyEl) {
1602
+ removeElement(this.$data._bodyEl);
1603
+ }
1604
+ clearTimeout(this.timeOutID);
1605
+ }
1606
+ });
1607
+
1608
+ const _hoisted_1$1 = {
1609
+ key: 1,
1610
+ class: "has-text-weight-bold"
1611
+ };
1612
+ const _hoisted_2$1 = ["onClick"];
1613
+ const _hoisted_3 = { key: 1 };
1614
+ const _hoisted_4 = {
1615
+ key: 1,
1616
+ class: "dropdown-item is-disabled"
1617
+ };
1618
+ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
1619
+ const _component_b_input = vue.resolveComponent("b-input");
1620
+ return vue.openBlock(), vue.createElementBlock(
1621
+ "div",
1622
+ vue.mergeProps({
1623
+ class: ["autocomplete control", { "is-expanded": _ctx.expanded }]
1624
+ }, _ctx.rootAttrs),
1625
+ [
1626
+ vue.createVNode(_component_b_input, vue.mergeProps({
1627
+ modelValue: _ctx.newValue,
1628
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.newValue = $event),
1629
+ ref: "input",
1630
+ type: _ctx.type,
1631
+ size: _ctx.size,
1632
+ loading: _ctx.loading,
1633
+ rounded: _ctx.rounded,
1634
+ icon: _ctx.icon,
1635
+ "icon-right": _ctx.newIconRight,
1636
+ "icon-right-clickable": _ctx.newIconRightClickable,
1637
+ "icon-pack": _ctx.iconPack,
1638
+ maxlength: _ctx.maxlength,
1639
+ autocomplete: _ctx.newAutocomplete,
1640
+ "use-html5-validation": false,
1641
+ "aria-autocomplete": _ctx.ariaAutocomplete
1642
+ }, _ctx.fallthroughAttrs, {
1643
+ "onUpdate:modelValue": _ctx.onInput,
1644
+ onFocus: _ctx.focused,
1645
+ onBlur: _ctx.onBlur,
1646
+ onKeydown: [
1647
+ _ctx.keydown,
1648
+ _cache[1] || (_cache[1] = vue.withKeys(vue.withModifiers(($event) => _ctx.keyArrows("up"), ["prevent"]), ["up"])),
1649
+ _cache[2] || (_cache[2] = vue.withKeys(vue.withModifiers(($event) => _ctx.keyArrows("down"), ["prevent"]), ["down"]))
1650
+ ],
1651
+ onIconRightClick: _ctx.rightIconClick,
1652
+ onIconClick: _cache[3] || (_cache[3] = (event) => _ctx.$emit("icon-click", event))
1653
+ }), null, 16, ["modelValue", "type", "size", "loading", "rounded", "icon", "icon-right", "icon-right-clickable", "icon-pack", "maxlength", "autocomplete", "aria-autocomplete", "onUpdate:modelValue", "onFocus", "onBlur", "onKeydown", "onIconRightClick"]),
1654
+ vue.createVNode(vue.Transition, {
1655
+ name: "fade",
1656
+ persisted: ""
1657
+ }, {
1658
+ default: vue.withCtx(() => [
1659
+ vue.withDirectives(vue.createElementVNode(
1660
+ "div",
1661
+ {
1662
+ class: vue.normalizeClass(["dropdown-menu", { "is-opened-top": _ctx.isOpenedTop && !_ctx.appendToBody }]),
1663
+ style: vue.normalizeStyle(_ctx.style),
1664
+ ref: "dropdown"
1665
+ },
1666
+ [
1667
+ vue.withDirectives(vue.createElementVNode(
1668
+ "div",
1669
+ {
1670
+ class: "dropdown-content",
1671
+ style: vue.normalizeStyle(_ctx.contentStyle)
1672
+ },
1673
+ [
1674
+ _ctx.hasHeaderSlot ? (vue.openBlock(), vue.createElementBlock(
1675
+ "div",
1676
+ {
1677
+ key: 0,
1678
+ class: vue.normalizeClass(["dropdown-item dropdown-header", { "is-hovered": _ctx.headerHovered }]),
1679
+ role: "button",
1680
+ tabindex: "0",
1681
+ onClick: _cache[4] || (_cache[4] = ($event) => _ctx.selectHeaderOrFoterByClick($event, "header"))
1682
+ },
1683
+ [
1684
+ vue.renderSlot(_ctx.$slots, "header")
1685
+ ],
1686
+ 2
1687
+ /* CLASS */
1688
+ )) : vue.createCommentVNode("v-if", true),
1689
+ (vue.openBlock(true), vue.createElementBlock(
1690
+ vue.Fragment,
1691
+ null,
1692
+ vue.renderList(_ctx.computedData, (element, groupindex) => {
1693
+ return vue.openBlock(), vue.createElementBlock(
1694
+ vue.Fragment,
1695
+ null,
1696
+ [
1697
+ element.group ? (vue.openBlock(), vue.createElementBlock("div", {
1698
+ key: groupindex + "group",
1699
+ class: "dropdown-item"
1700
+ }, [
1701
+ _ctx.hasGroupSlot ? vue.renderSlot(_ctx.$slots, "group", {
1702
+ key: 0,
1703
+ group: element.group,
1704
+ index: groupindex
1705
+ }) : (vue.openBlock(), vue.createElementBlock(
1706
+ "span",
1707
+ _hoisted_1$1,
1708
+ vue.toDisplayString(element.group),
1709
+ 1
1710
+ /* TEXT */
1711
+ ))
1712
+ ])) : vue.createCommentVNode("v-if", true),
1713
+ (vue.openBlock(true), vue.createElementBlock(
1714
+ vue.Fragment,
1715
+ null,
1716
+ vue.renderList(element.items, (option, index) => {
1717
+ return vue.openBlock(), vue.createElementBlock("a", {
1718
+ key: groupindex + ":" + index,
1719
+ class: vue.normalizeClass(["dropdown-item", { "is-hovered": option === _ctx.hovered }]),
1720
+ role: "button",
1721
+ tabindex: "0",
1722
+ onClick: vue.withModifiers(($event) => _ctx.setSelected(option, !_ctx.keepOpen, $event), ["stop"])
1723
+ }, [
1724
+ _ctx.hasDefaultSlot ? vue.renderSlot(_ctx.$slots, "default", {
1725
+ key: 0,
1726
+ option,
1727
+ index
1728
+ }) : (vue.openBlock(), vue.createElementBlock(
1729
+ "span",
1730
+ _hoisted_3,
1731
+ vue.toDisplayString(_ctx.getValue(option)),
1732
+ 1
1733
+ /* TEXT */
1734
+ ))
1735
+ ], 10, _hoisted_2$1);
1736
+ }),
1737
+ 128
1738
+ /* KEYED_FRAGMENT */
1739
+ ))
1740
+ ],
1741
+ 64
1742
+ /* STABLE_FRAGMENT */
1743
+ );
1744
+ }),
1745
+ 256
1746
+ /* UNKEYED_FRAGMENT */
1747
+ )),
1748
+ _ctx.isEmpty && _ctx.hasEmptySlot ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4, [
1749
+ vue.renderSlot(_ctx.$slots, "empty")
1750
+ ])) : vue.createCommentVNode("v-if", true),
1751
+ _ctx.hasFooterSlot ? (vue.openBlock(), vue.createElementBlock(
1752
+ "div",
1753
+ {
1754
+ key: 2,
1755
+ class: vue.normalizeClass(["dropdown-item dropdown-footer", { "is-hovered": _ctx.footerHovered }]),
1756
+ role: "button",
1757
+ tabindex: "0",
1758
+ onClick: _cache[5] || (_cache[5] = ($event) => _ctx.selectHeaderOrFoterByClick($event, "footer"))
1759
+ },
1760
+ [
1761
+ vue.renderSlot(_ctx.$slots, "footer")
1762
+ ],
1763
+ 2
1764
+ /* CLASS */
1765
+ )) : vue.createCommentVNode("v-if", true)
1766
+ ],
1767
+ 4
1768
+ /* STYLE */
1769
+ ), [
1770
+ [vue.vShow, _ctx.isActive]
1771
+ ])
1772
+ ],
1773
+ 6
1774
+ /* CLASS, STYLE */
1775
+ ), [
1776
+ [vue.vShow, _ctx.isActive && (!_ctx.isEmpty || _ctx.hasEmptySlot || _ctx.hasHeaderSlot || _ctx.hasFooterSlot)]
1777
+ ])
1778
+ ]),
1779
+ _: 3
1780
+ /* FORWARDED */
1781
+ })
1782
+ ],
1783
+ 16
1784
+ /* FULL_PROPS */
1785
+ );
1786
+ }
1787
+ var BAutocomplete = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1]]);
1788
+
1789
+ var _sfc_main = vue.defineComponent({
1790
+ name: "BTaginput",
1791
+ components: {
1792
+ BAutocomplete,
1793
+ BTag
1794
+ },
1795
+ mixins: [CompatFallthroughMixin, FormElementMixin],
1796
+ props: {
1797
+ modelValue: {
1798
+ type: Array,
1799
+ default: () => []
1800
+ },
1801
+ data: {
1802
+ type: Array,
1803
+ default: () => []
1804
+ },
1805
+ type: String,
1806
+ closeType: String,
1807
+ attached: {
1808
+ type: Boolean,
1809
+ default: false
1810
+ },
1811
+ maxtags: Number,
1812
+ hasCounter: {
1813
+ type: Boolean,
1814
+ default: () => config.defaultTaginputHasCounter
1815
+ },
1816
+ field: {
1817
+ type: String,
1818
+ default: "value"
1819
+ },
1820
+ autocomplete: Boolean,
1821
+ groupField: String,
1822
+ groupOptions: String,
1823
+ nativeAutocomplete: String,
1824
+ openOnFocus: Boolean,
1825
+ keepOpen: {
1826
+ type: Boolean,
1827
+ default: true
1828
+ },
1829
+ keepFirst: Boolean,
1830
+ disabled: Boolean,
1831
+ ellipsis: Boolean,
1832
+ closable: {
1833
+ type: Boolean,
1834
+ default: true
1835
+ },
1836
+ ariaCloseLabel: String,
1837
+ confirmKeys: {
1838
+ type: Array,
1839
+ default: () => [",", "Tab", "Enter"]
1840
+ },
1841
+ removeOnKeys: {
1842
+ type: Array,
1843
+ default: () => ["Backspace"]
1844
+ },
1845
+ allowNew: Boolean,
1846
+ onPasteSeparators: {
1847
+ type: Array,
1848
+ default: () => [","]
1849
+ },
1850
+ beforeAdding: {
1851
+ type: Function,
1852
+ default: () => true
1853
+ },
1854
+ allowDuplicates: {
1855
+ type: Boolean,
1856
+ default: false
1857
+ },
1858
+ checkInfiniteScroll: {
1859
+ type: Boolean,
1860
+ default: false
1861
+ },
1862
+ createTag: {
1863
+ type: Function,
1864
+ default: (tag) => tag
1865
+ },
1866
+ appendToBody: Boolean
1867
+ },
1868
+ emits: {
1869
+ /* eslint-disable @typescript-eslint/no-unused-vars */
1870
+ add: (tag) => true,
1871
+ "infinite-scroll": () => true,
1872
+ remove: (tag) => true,
1873
+ typing: (value) => true,
1874
+ "update:modelValue": (tags) => true
1875
+ /* eslint-enable @typescript-eslint/no-unused-vars */
1876
+ },
1877
+ data() {
1878
+ return {
1879
+ tags: Array.isArray(this.modelValue) ? this.modelValue.slice(0) : this.modelValue || [],
1880
+ newTag: "",
1881
+ isComposing: false,
1882
+ _elementRef: "autocomplete",
1883
+ _isTaginput: true,
1884
+ requestID: null
1885
+ };
1886
+ },
1887
+ computed: {
1888
+ rootClasses() {
1889
+ return {
1890
+ "is-expanded": this.expanded
1891
+ };
1892
+ },
1893
+ containerClasses() {
1894
+ return {
1895
+ "is-focused": this.isFocused,
1896
+ "is-focusable": this.hasInput
1897
+ };
1898
+ },
1899
+ valueLength() {
1900
+ return this.newTag.trim().length;
1901
+ },
1902
+ hasDefaultSlot() {
1903
+ return !!this.$slots.default;
1904
+ },
1905
+ hasEmptySlot() {
1906
+ return !!this.$slots.empty;
1907
+ },
1908
+ hasHeaderSlot() {
1909
+ return !!this.$slots.header;
1910
+ },
1911
+ hasFooterSlot() {
1912
+ return !!this.$slots.footer;
1913
+ },
1914
+ /*
1915
+ * Show the input field if a maxtags hasn't been set or reached.
1916
+ */
1917
+ hasInput() {
1918
+ return this.maxtags == null || this.maxtags === 1 || this.tagsLength < this.maxtags;
1919
+ },
1920
+ tagsLength() {
1921
+ return this.tags.length;
1922
+ },
1923
+ /*
1924
+ * If Taginput has onPasteSeparators prop,
1925
+ * returning new RegExp used to split pasted string.
1926
+ */
1927
+ separatorsAsRegExp() {
1928
+ const sep = this.onPasteSeparators;
1929
+ return sep.length ? new RegExp(sep.map((s) => {
1930
+ return s ? s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&") : null;
1931
+ }).join("|"), "g") : null;
1932
+ },
1933
+ disabledOrUndefined() {
1934
+ return this.disabled || void 0;
1935
+ }
1936
+ },
1937
+ watch: {
1938
+ /*
1939
+ * When v-model is changed set internal value.
1940
+ */
1941
+ modelValue(value) {
1942
+ this.tags = Array.isArray(value) ? value.slice(0) : value || [];
1943
+ },
1944
+ hasInput() {
1945
+ if (!this.hasInput) this.onBlur();
1946
+ }
1947
+ },
1948
+ methods: {
1949
+ addTag(tag) {
1950
+ const tagToAdd = tag || this.newTag.trim();
1951
+ if (tagToAdd) {
1952
+ if (!this.autocomplete) {
1953
+ const reg = this.separatorsAsRegExp;
1954
+ if (reg && tagToAdd.match(reg)) {
1955
+ tagToAdd.split(reg).map((t) => t.trim()).filter((t) => t.length !== 0).map(this.addTag);
1956
+ return;
1957
+ }
1958
+ }
1959
+ const add = !this.allowDuplicates ? this.tags.indexOf(tagToAdd) === -1 : true;
1960
+ if (add && this.beforeAdding(tagToAdd)) {
1961
+ if (this.maxtags === 1) {
1962
+ this.tags = [];
1963
+ }
1964
+ this.tags.push(this.createTag(tagToAdd));
1965
+ this.$emit("update:modelValue", this.tags);
1966
+ this.$emit("add", tagToAdd);
1967
+ }
1968
+ this.requestID = requestAnimationFrame(() => {
1969
+ this.newTag = "";
1970
+ this.$emit("typing", "");
1971
+ });
1972
+ }
1973
+ },
1974
+ getNormalizedTagText(tag) {
1975
+ if (typeof tag === "object") {
1976
+ tag = getValueByPath(tag, this.field);
1977
+ }
1978
+ return `${tag}`;
1979
+ },
1980
+ customOnBlur(event) {
1981
+ if (!this.autocomplete) this.addTag();
1982
+ this.onBlur(event);
1983
+ },
1984
+ onSelect(option) {
1985
+ if (!option) return;
1986
+ this.addTag(option);
1987
+ this.$nextTick(() => {
1988
+ this.newTag = "";
1989
+ });
1990
+ },
1991
+ removeTag(index, event) {
1992
+ const tag = this.tags.splice(index, 1)[0];
1993
+ this.$emit("update:modelValue", this.tags);
1994
+ this.$emit("remove", tag);
1995
+ if (event) event.stopPropagation();
1996
+ if (this.openOnFocus && this.$refs.autocomplete) {
1997
+ this.$refs.autocomplete.focus();
1998
+ }
1999
+ return tag;
2000
+ },
2001
+ removeLastTag() {
2002
+ if (this.tagsLength > 0) {
2003
+ this.removeTag(this.tagsLength - 1);
2004
+ }
2005
+ },
2006
+ keydown(event) {
2007
+ const { key } = event;
2008
+ if (this.removeOnKeys.indexOf(key) !== -1 && !this.newTag.length) {
2009
+ this.removeLastTag();
2010
+ }
2011
+ if (this.autocomplete && !this.allowNew) return;
2012
+ if (this.confirmKeys.indexOf(key) >= 0) {
2013
+ if (key !== "Tab") event.preventDefault();
2014
+ if (key === "Enter" && this.isComposing) return;
2015
+ this.addTag();
2016
+ }
2017
+ },
2018
+ onTyping(event) {
2019
+ this.$emit("typing", typeof event === "number" ? event : event == null ? void 0 : event.trim());
2020
+ },
2021
+ emitInfiniteScroll() {
2022
+ this.$emit("infinite-scroll");
2023
+ }
2024
+ },
2025
+ beforeUnmount() {
2026
+ cancelAnimationFrame(this.requestID);
2027
+ }
2028
+ });
2029
+
2030
+ const _hoisted_1 = ["disabled"];
2031
+ const _hoisted_2 = {
2032
+ key: 0,
2033
+ class: "help counter"
2034
+ };
2035
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
2036
+ const _component_b_tag = vue.resolveComponent("b-tag");
2037
+ const _component_b_autocomplete = vue.resolveComponent("b-autocomplete");
2038
+ return vue.openBlock(), vue.createElementBlock(
2039
+ "div",
2040
+ vue.mergeProps({
2041
+ class: ["taginput control", _ctx.rootClasses]
2042
+ }, _ctx.rootAttrs),
2043
+ [
2044
+ vue.createElementVNode("div", {
2045
+ class: vue.normalizeClass(["taginput-container", [_ctx.statusType, _ctx.size, _ctx.containerClasses]]),
2046
+ disabled: _ctx.disabledOrUndefined,
2047
+ onClick: _cache[3] || (_cache[3] = ($event) => _ctx.hasInput && _ctx.focus())
2048
+ }, [
2049
+ vue.renderSlot(_ctx.$slots, "selected", { tags: _ctx.tags }, () => [
2050
+ (vue.openBlock(true), vue.createElementBlock(
2051
+ vue.Fragment,
2052
+ null,
2053
+ vue.renderList(_ctx.tags, (tag, index) => {
2054
+ return vue.openBlock(), vue.createBlock(_component_b_tag, {
2055
+ key: _ctx.getNormalizedTagText(tag) + index,
2056
+ type: _ctx.type,
2057
+ "close-type": _ctx.closeType,
2058
+ size: _ctx.size,
2059
+ rounded: _ctx.rounded,
2060
+ attached: _ctx.attached,
2061
+ tabstop: false,
2062
+ disabled: _ctx.disabledOrUndefined,
2063
+ ellipsis: _ctx.ellipsis,
2064
+ closable: _ctx.closable,
2065
+ "aria-close-label": _ctx.ariaCloseLabel,
2066
+ title: _ctx.ellipsis && _ctx.getNormalizedTagText(tag),
2067
+ onClose: ($event) => _ctx.removeTag(index, $event)
2068
+ }, {
2069
+ default: vue.withCtx(() => [
2070
+ vue.renderSlot(_ctx.$slots, "tag", { tag }, () => [
2071
+ vue.createTextVNode(
2072
+ vue.toDisplayString(_ctx.getNormalizedTagText(tag)),
2073
+ 1
2074
+ /* TEXT */
2075
+ )
2076
+ ])
2077
+ ]),
2078
+ _: 2
2079
+ /* DYNAMIC */
2080
+ }, 1032, ["type", "close-type", "size", "rounded", "attached", "disabled", "ellipsis", "closable", "aria-close-label", "title", "onClose"]);
2081
+ }),
2082
+ 128
2083
+ /* KEYED_FRAGMENT */
2084
+ ))
2085
+ ]),
2086
+ _ctx.hasInput ? (vue.openBlock(), vue.createBlock(_component_b_autocomplete, vue.mergeProps({
2087
+ key: 0,
2088
+ ref: "autocomplete",
2089
+ modelValue: _ctx.newTag,
2090
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.newTag = $event)
2091
+ }, _ctx.fallthroughAttrs, {
2092
+ data: _ctx.data,
2093
+ field: _ctx.field,
2094
+ icon: _ctx.icon,
2095
+ "icon-pack": _ctx.iconPack,
2096
+ maxlength: _ctx.maxlength,
2097
+ "has-counter": false,
2098
+ size: _ctx.size,
2099
+ disabled: _ctx.disabledOrUndefined,
2100
+ loading: _ctx.loading,
2101
+ autocomplete: _ctx.nativeAutocomplete,
2102
+ "open-on-focus": _ctx.openOnFocus,
2103
+ "keep-open": _ctx.keepOpen,
2104
+ "keep-first": _ctx.keepFirst,
2105
+ "group-field": _ctx.groupField,
2106
+ "group-options": _ctx.groupOptions,
2107
+ "use-html5-validation": _ctx.useHtml5Validation,
2108
+ "check-infinite-scroll": _ctx.checkInfiniteScroll,
2109
+ "append-to-body": _ctx.appendToBody,
2110
+ "confirm-keys": _ctx.confirmKeys,
2111
+ onTyping: _ctx.onTyping,
2112
+ onFocus: _ctx.onFocus,
2113
+ onBlur: _ctx.customOnBlur,
2114
+ onKeydown: _ctx.keydown,
2115
+ onCompositionstart: _cache[1] || (_cache[1] = ($event) => _ctx.isComposing = true),
2116
+ onCompositionend: _cache[2] || (_cache[2] = ($event) => _ctx.isComposing = false),
2117
+ onSelect: _ctx.onSelect,
2118
+ onInfiniteScroll: _ctx.emitInfiniteScroll
2119
+ }), vue.createSlots({
2120
+ _: 2
2121
+ /* DYNAMIC */
2122
+ }, [
2123
+ _ctx.hasHeaderSlot ? {
2124
+ name: "header",
2125
+ fn: vue.withCtx(() => [
2126
+ vue.renderSlot(_ctx.$slots, "header")
2127
+ ]),
2128
+ key: "0"
2129
+ } : void 0,
2130
+ _ctx.hasDefaultSlot ? {
2131
+ name: "default",
2132
+ fn: vue.withCtx((props) => [
2133
+ vue.renderSlot(_ctx.$slots, "default", {
2134
+ option: props.option,
2135
+ index: props.index
2136
+ })
2137
+ ]),
2138
+ key: "1"
2139
+ } : void 0,
2140
+ _ctx.hasEmptySlot ? {
2141
+ name: "empty",
2142
+ fn: vue.withCtx(() => [
2143
+ vue.renderSlot(_ctx.$slots, "empty")
2144
+ ]),
2145
+ key: "2"
2146
+ } : void 0,
2147
+ _ctx.hasFooterSlot ? {
2148
+ name: "footer",
2149
+ fn: vue.withCtx(() => [
2150
+ vue.renderSlot(_ctx.$slots, "footer")
2151
+ ]),
2152
+ key: "3"
2153
+ } : void 0
2154
+ ]), 1040, ["modelValue", "data", "field", "icon", "icon-pack", "maxlength", "size", "disabled", "loading", "autocomplete", "open-on-focus", "keep-open", "keep-first", "group-field", "group-options", "use-html5-validation", "check-infinite-scroll", "append-to-body", "confirm-keys", "onTyping", "onFocus", "onBlur", "onKeydown", "onSelect", "onInfiniteScroll"])) : vue.createCommentVNode("v-if", true)
2155
+ ], 10, _hoisted_1),
2156
+ _ctx.hasCounter && (_ctx.maxtags || _ctx.maxlength) ? (vue.openBlock(), vue.createElementBlock("small", _hoisted_2, [
2157
+ _ctx.maxlength && _ctx.valueLength > 0 ? (vue.openBlock(), vue.createElementBlock(
2158
+ vue.Fragment,
2159
+ { key: 0 },
2160
+ [
2161
+ vue.createTextVNode(
2162
+ vue.toDisplayString(_ctx.valueLength) + " / " + vue.toDisplayString(_ctx.maxlength),
2163
+ 1
2164
+ /* TEXT */
2165
+ )
2166
+ ],
2167
+ 64
2168
+ /* STABLE_FRAGMENT */
2169
+ )) : _ctx.maxtags ? (vue.openBlock(), vue.createElementBlock(
2170
+ vue.Fragment,
2171
+ { key: 1 },
2172
+ [
2173
+ vue.createTextVNode(
2174
+ vue.toDisplayString(_ctx.tagsLength) + " / " + vue.toDisplayString(_ctx.maxtags),
2175
+ 1
2176
+ /* TEXT */
2177
+ )
2178
+ ],
2179
+ 64
2180
+ /* STABLE_FRAGMENT */
2181
+ )) : vue.createCommentVNode("v-if", true)
2182
+ ])) : vue.createCommentVNode("v-if", true)
2183
+ ],
2184
+ 16
2185
+ /* FULL_PROPS */
2186
+ );
2187
+ }
2188
+ var Taginput = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
2189
+
2190
+ const registerComponent = (Vue, component, name) => {
2191
+ const componentName = component.name;
2192
+ if (componentName == null) {
2193
+ throw new Error("Buefy.registerComponent: missing component name");
2194
+ }
2195
+ Vue.component(componentName, component);
2196
+ };
2197
+
2198
+ const Plugin = {
2199
+ install(Vue) {
2200
+ registerComponent(Vue, Taginput);
2201
+ }
2202
+ };
2203
+
2204
+ exports.BTaginput = Taginput;
2205
+ exports.default = Plugin;
2206
+
2207
+ Object.defineProperty(exports, '__esModule', { value: true });
2208
+
2209
+ }));