@gitlab/ui 92.1.1 → 92.3.0

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 (449) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/bin/migrate_custom_utils_to_tw.bundled.mjs +11 -3
  3. package/dist/components/experimental/duo/chat/components/duo_chat_context/duo_chat_context_item_popover/duo_chat_context_item_popover.js +29 -1
  4. package/dist/components/experimental/duo/chat/components/duo_chat_context/duo_chat_context_item_selections/duo_chat_context_item_selections.js +18 -1
  5. package/dist/components/experimental/duo/chat/components/duo_chat_message/duo_chat_message.js +4 -6
  6. package/dist/components/experimental/duo/chat/constants.js +2 -1
  7. package/dist/index.css +4 -2
  8. package/dist/index.css.map +1 -1
  9. package/dist/tailwind.css +1 -1
  10. package/dist/tailwind.css.map +1 -1
  11. package/dist/vendor/bootstrap-vue/src/components/form/index.js +0 -4
  12. package/dist/vendor/bootstrap-vue/src/components/index.js +0 -48
  13. package/dist/vendor/bootstrap-vue/src/components/layout/index.js +0 -6
  14. package/dist/vendor/bootstrap-vue/src/components/nav/index.js +0 -6
  15. package/dist/vendor/bootstrap-vue/src/components/navbar/index.js +1 -8
  16. package/dist/vendor/bootstrap-vue/src/components/tooltip/helpers/bv-tooltip.js +2 -6
  17. package/dist/vendor/bootstrap-vue/src/constants/classes.js +1 -2
  18. package/dist/vendor/bootstrap-vue/src/constants/components.js +1 -51
  19. package/dist/vendor/bootstrap-vue/src/constants/events.js +1 -12
  20. package/dist/vendor/bootstrap-vue/src/constants/key-codes.js +1 -5
  21. package/dist/vendor/bootstrap-vue/src/constants/props.js +1 -4
  22. package/dist/vendor/bootstrap-vue/src/constants/regex.js +1 -20
  23. package/dist/vendor/bootstrap-vue/src/constants/slots.js +1 -33
  24. package/dist/vendor/bootstrap-vue/src/directives/toggle/toggle.js +1 -1
  25. package/dist/vendor/bootstrap-vue/src/index.js +0 -74
  26. package/dist/vendor/bootstrap-vue/src/utils/array.js +1 -3
  27. package/dist/vendor/bootstrap-vue/src/utils/inspect.js +1 -3
  28. package/dist/vendor/bootstrap-vue/src/utils/math.js +1 -3
  29. package/dist/vendor/bootstrap-vue/src/utils/object.js +1 -6
  30. package/dist/vendor/bootstrap-vue/src/utils/props.js +2 -8
  31. package/dist/vendor/bootstrap-vue/src/utils/string.js +1 -10
  32. package/package.json +1 -1
  33. package/src/components/base/accordion/accordion_item.scss +3 -3
  34. package/src/components/base/alert/alert.scss +3 -3
  35. package/src/components/base/avatar_labeled/avatar_labeled.scss +2 -2
  36. package/src/components/base/avatars_inline/avatars_inline.scss +1 -1
  37. package/src/components/base/badge/badge.scss +2 -2
  38. package/src/components/base/banner/banner.scss +2 -2
  39. package/src/components/base/breadcrumb/breadcrumb.scss +3 -3
  40. package/src/components/base/broadcast_message/broadcast_message.scss +3 -3
  41. package/src/components/base/button/button.scss +26 -16
  42. package/src/components/base/card/card.scss +1 -1
  43. package/src/components/base/datepicker/datepicker.scss +10 -10
  44. package/src/components/base/drawer/drawer.scss +5 -5
  45. package/src/components/base/dropdown/dropdown.scss +28 -28
  46. package/src/components/base/dropdown/dropdown_divider.scss +3 -3
  47. package/src/components/base/dropdown/dropdown_item.scss +9 -9
  48. package/src/components/base/dropdown/dropdown_section_header.scss +2 -2
  49. package/src/components/base/dropdown/dropdown_text.scss +1 -1
  50. package/src/components/base/filtered_search/filtered_search.scss +7 -7
  51. package/src/components/base/filtered_search/filtered_search_suggestion.scss +1 -1
  52. package/src/components/base/filtered_search/filtered_search_suggestion_list.scss +3 -3
  53. package/src/components/base/filtered_search/filtered_search_term.scss +2 -2
  54. package/src/components/base/filtered_search/filtered_search_token.scss +4 -4
  55. package/src/components/base/filtered_search/filtered_search_token_segment.scss +2 -2
  56. package/src/components/base/form/form_checkbox/form_checkbox.scss +10 -10
  57. package/src/components/base/form/form_group/form_group.scss +5 -5
  58. package/src/components/base/form/form_input/form_input.scss +2 -2
  59. package/src/components/base/form/form_select/form_select.scss +2 -2
  60. package/src/components/base/keyset_pagination/keyset_pagination.scss +1 -1
  61. package/src/components/base/label/label.scss +1 -1
  62. package/src/components/base/loading_icon/loading_icon.scss +1 -1
  63. package/src/components/base/markdown/markdown.scss +33 -33
  64. package/src/components/base/modal/modal.scss +11 -11
  65. package/src/components/base/new_dropdowns/dropdown.scss +14 -14
  66. package/src/components/base/new_dropdowns/dropdown_item.scss +9 -9
  67. package/src/components/base/new_dropdowns/listbox/listbox.scss +1 -1
  68. package/src/components/base/pagination/pagination.scss +3 -3
  69. package/src/components/base/path/path.scss +5 -5
  70. package/src/components/base/popover/popover.scss +5 -5
  71. package/src/components/base/search_box_by_click/search_box_by_click.scss +2 -2
  72. package/src/components/base/search_box_by_type/search_box_by_type.scss +4 -4
  73. package/src/components/base/table/table.scss +4 -4
  74. package/src/components/base/tabs/tabs/tabs.scss +10 -10
  75. package/src/components/base/toast/toast.scss +7 -7
  76. package/src/components/base/toggle/toggle.scss +6 -6
  77. package/src/components/base/token/token.scss +5 -5
  78. package/src/components/base/tooltip/tooltip.scss +3 -3
  79. package/src/components/charts/legend/legend.scss +4 -4
  80. package/src/components/charts/series_label/series_label.scss +1 -1
  81. package/src/components/experimental/duo/chat/components/duo_chat_context/duo_chat_context_item_popover/duo_chat_context_item_popover.vue +62 -30
  82. package/src/components/experimental/duo/chat/components/duo_chat_context/duo_chat_context_item_selections/duo_chat_context_item_selections.vue +29 -10
  83. package/src/components/experimental/duo/chat/components/duo_chat_message/duo_chat_message.scss +1 -1
  84. package/src/components/experimental/duo/chat/components/duo_chat_message/duo_chat_message.vue +11 -6
  85. package/src/components/experimental/duo/chat/constants.js +2 -0
  86. package/src/components/experimental/duo/chat/duo_chat.scss +4 -4
  87. package/src/components/shared_components/charts/tooltip_default_format.scss +1 -1
  88. package/src/scss/bootstrap_vue.scss +0 -18
  89. package/src/scss/typescale/_index.scss +9 -9
  90. package/src/vendor/bootstrap-vue/nuxt/index.js +0 -8
  91. package/src/vendor/bootstrap-vue/src/_utilities.scss +0 -9
  92. package/src/vendor/bootstrap-vue/src/_variables.scss +0 -52
  93. package/src/vendor/bootstrap-vue/src/components/form/index.d.ts +0 -3
  94. package/src/vendor/bootstrap-vue/src/components/form/index.js +1 -4
  95. package/src/vendor/bootstrap-vue/src/components/form/package.json +0 -12
  96. package/src/vendor/bootstrap-vue/src/components/index.d.ts +0 -24
  97. package/src/vendor/bootstrap-vue/src/components/index.js +0 -48
  98. package/src/vendor/bootstrap-vue/src/components/index.scss +0 -15
  99. package/src/vendor/bootstrap-vue/src/components/layout/index.d.ts +0 -6
  100. package/src/vendor/bootstrap-vue/src/components/layout/index.js +1 -5
  101. package/src/vendor/bootstrap-vue/src/components/layout/package.json +0 -67
  102. package/src/vendor/bootstrap-vue/src/components/modal/README.md +0 -1
  103. package/src/vendor/bootstrap-vue/src/components/nav/index.d.ts +0 -6
  104. package/src/vendor/bootstrap-vue/src/components/nav/index.js +1 -5
  105. package/src/vendor/bootstrap-vue/src/components/nav/package.json +0 -45
  106. package/src/vendor/bootstrap-vue/src/components/navbar/README.md +0 -5
  107. package/src/vendor/bootstrap-vue/src/components/navbar/index.d.ts +1 -7
  108. package/src/vendor/bootstrap-vue/src/components/navbar/index.js +2 -7
  109. package/src/vendor/bootstrap-vue/src/components/navbar/package.json +0 -75
  110. package/src/vendor/bootstrap-vue/src/components/table/README.md +1 -2
  111. package/src/vendor/bootstrap-vue/src/components/tabs/README.md +2 -2
  112. package/src/vendor/bootstrap-vue/src/components/toast/README.md +1 -3
  113. package/src/vendor/bootstrap-vue/src/components/tooltip/helpers/bv-tooltip.js +2 -6
  114. package/src/vendor/bootstrap-vue/src/constants/classes.js +0 -1
  115. package/src/vendor/bootstrap-vue/src/constants/components.js +0 -50
  116. package/src/vendor/bootstrap-vue/src/constants/events.js +0 -11
  117. package/src/vendor/bootstrap-vue/src/constants/key-codes.js +0 -4
  118. package/src/vendor/bootstrap-vue/src/constants/props.js +0 -3
  119. package/src/vendor/bootstrap-vue/src/constants/regex.js +0 -19
  120. package/src/vendor/bootstrap-vue/src/constants/slots.js +0 -32
  121. package/src/vendor/bootstrap-vue/src/directives/toggle/README.md +5 -23
  122. package/src/vendor/bootstrap-vue/src/directives/toggle/package.json +1 -1
  123. package/src/vendor/bootstrap-vue/src/directives/toggle/toggle.js +1 -1
  124. package/src/vendor/bootstrap-vue/src/index.js +0 -122
  125. package/src/vendor/bootstrap-vue/src/index.scss +0 -3
  126. package/src/vendor/bootstrap-vue/src/utils/array.js +0 -5
  127. package/src/vendor/bootstrap-vue/src/utils/config.spec.js +15 -15
  128. package/src/vendor/bootstrap-vue/src/utils/inspect.js +0 -4
  129. package/src/vendor/bootstrap-vue/src/utils/math.js +0 -4
  130. package/src/vendor/bootstrap-vue/src/utils/object.js +0 -5
  131. package/src/vendor/bootstrap-vue/src/utils/props.js +1 -7
  132. package/src/vendor/bootstrap-vue/src/utils/string.js +0 -9
  133. package/src/vendor/bootstrap-vue/src/utils/string.spec.js +1 -20
  134. package/translations.js +3 -0
  135. package/dist/vendor/bootstrap-vue/src/components/alert/alert.js +0 -179
  136. package/dist/vendor/bootstrap-vue/src/components/alert/index.js +0 -11
  137. package/dist/vendor/bootstrap-vue/src/components/aspect/aspect.js +0 -67
  138. package/dist/vendor/bootstrap-vue/src/components/aspect/index.js +0 -11
  139. package/dist/vendor/bootstrap-vue/src/components/avatar/avatar-group.js +0 -67
  140. package/dist/vendor/bootstrap-vue/src/components/avatar/avatar.js +0 -266
  141. package/dist/vendor/bootstrap-vue/src/components/avatar/index.js +0 -14
  142. package/dist/vendor/bootstrap-vue/src/components/button-toolbar/button-toolbar.js +0 -112
  143. package/dist/vendor/bootstrap-vue/src/components/button-toolbar/index.js +0 -12
  144. package/dist/vendor/bootstrap-vue/src/components/calendar/calendar.js +0 -1010
  145. package/dist/vendor/bootstrap-vue/src/components/calendar/index.js +0 -11
  146. package/dist/vendor/bootstrap-vue/src/components/card/card-body.js +0 -63
  147. package/dist/vendor/bootstrap-vue/src/components/card/card-footer.js +0 -48
  148. package/dist/vendor/bootstrap-vue/src/components/card/card-group.js +0 -33
  149. package/dist/vendor/bootstrap-vue/src/components/card/card-header.js +0 -48
  150. package/dist/vendor/bootstrap-vue/src/components/card/card-img-lazy.js +0 -46
  151. package/dist/vendor/bootstrap-vue/src/components/card/card-img.js +0 -58
  152. package/dist/vendor/bootstrap-vue/src/components/card/card-sub-title.js +0 -35
  153. package/dist/vendor/bootstrap-vue/src/components/card/card-text.js +0 -31
  154. package/dist/vendor/bootstrap-vue/src/components/card/card-title.js +0 -33
  155. package/dist/vendor/bootstrap-vue/src/components/card/card.js +0 -123
  156. package/dist/vendor/bootstrap-vue/src/components/card/index.js +0 -38
  157. package/dist/vendor/bootstrap-vue/src/components/embed/embed.js +0 -50
  158. package/dist/vendor/bootstrap-vue/src/components/embed/index.js +0 -11
  159. package/dist/vendor/bootstrap-vue/src/components/form/form-datalist.js +0 -52
  160. package/dist/vendor/bootstrap-vue/src/components/form-btn-label-control/bv-form-btn-label-control.js +0 -261
  161. package/dist/vendor/bootstrap-vue/src/components/form-datepicker/form-datepicker.js +0 -310
  162. package/dist/vendor/bootstrap-vue/src/components/form-datepicker/index.js +0 -12
  163. package/dist/vendor/bootstrap-vue/src/components/form-file/form-file.js +0 -561
  164. package/dist/vendor/bootstrap-vue/src/components/form-file/index.js +0 -12
  165. package/dist/vendor/bootstrap-vue/src/components/form-rating/form-rating.js +0 -402
  166. package/dist/vendor/bootstrap-vue/src/components/form-rating/index.js +0 -12
  167. package/dist/vendor/bootstrap-vue/src/components/form-spinbutton/form-spinbutton.js +0 -555
  168. package/dist/vendor/bootstrap-vue/src/components/form-spinbutton/index.js +0 -12
  169. package/dist/vendor/bootstrap-vue/src/components/form-tags/form-tag.js +0 -97
  170. package/dist/vendor/bootstrap-vue/src/components/form-tags/form-tags.js +0 -806
  171. package/dist/vendor/bootstrap-vue/src/components/form-tags/index.js +0 -16
  172. package/dist/vendor/bootstrap-vue/src/components/form-timepicker/form-timepicker.js +0 -281
  173. package/dist/vendor/bootstrap-vue/src/components/form-timepicker/index.js +0 -12
  174. package/dist/vendor/bootstrap-vue/src/components/image/img-lazy.js +0 -157
  175. package/dist/vendor/bootstrap-vue/src/components/image/img.js +0 -124
  176. package/dist/vendor/bootstrap-vue/src/components/image/index.js +0 -14
  177. package/dist/vendor/bootstrap-vue/src/components/jumbotron/index.js +0 -11
  178. package/dist/vendor/bootstrap-vue/src/components/jumbotron/jumbotron.js +0 -98
  179. package/dist/vendor/bootstrap-vue/src/components/layout/container.js +0 -41
  180. package/dist/vendor/bootstrap-vue/src/components/layout/row.js +0 -113
  181. package/dist/vendor/bootstrap-vue/src/components/list-group/index.js +0 -14
  182. package/dist/vendor/bootstrap-vue/src/components/list-group/list-group-item.js +0 -78
  183. package/dist/vendor/bootstrap-vue/src/components/list-group/list-group.js +0 -42
  184. package/dist/vendor/bootstrap-vue/src/components/media/index.js +0 -17
  185. package/dist/vendor/bootstrap-vue/src/components/media/media-aside.js +0 -41
  186. package/dist/vendor/bootstrap-vue/src/components/media/media-body.js +0 -31
  187. package/dist/vendor/bootstrap-vue/src/components/media/media.js +0 -61
  188. package/dist/vendor/bootstrap-vue/src/components/nav/nav-form.js +0 -45
  189. package/dist/vendor/bootstrap-vue/src/components/nav/nav-text.js +0 -26
  190. package/dist/vendor/bootstrap-vue/src/components/navbar/navbar-nav.js +0 -46
  191. package/dist/vendor/bootstrap-vue/src/components/navbar/navbar-toggle.js +0 -89
  192. package/dist/vendor/bootstrap-vue/src/components/overlay/index.js +0 -11
  193. package/dist/vendor/bootstrap-vue/src/components/overlay/overlay.js +0 -163
  194. package/dist/vendor/bootstrap-vue/src/components/pagination/index.js +0 -11
  195. package/dist/vendor/bootstrap-vue/src/components/pagination/pagination.js +0 -135
  196. package/dist/vendor/bootstrap-vue/src/components/pagination-nav/index.js +0 -11
  197. package/dist/vendor/bootstrap-vue/src/components/pagination-nav/pagination-nav.js +0 -299
  198. package/dist/vendor/bootstrap-vue/src/components/sidebar/index.js +0 -15
  199. package/dist/vendor/bootstrap-vue/src/components/sidebar/sidebar.js +0 -432
  200. package/dist/vendor/bootstrap-vue/src/components/skeleton/index.js +0 -23
  201. package/dist/vendor/bootstrap-vue/src/components/skeleton/skeleton-icon.js +0 -47
  202. package/dist/vendor/bootstrap-vue/src/components/skeleton/skeleton-img.js +0 -60
  203. package/dist/vendor/bootstrap-vue/src/components/skeleton/skeleton-table.js +0 -64
  204. package/dist/vendor/bootstrap-vue/src/components/skeleton/skeleton-wrapper.js +0 -46
  205. package/dist/vendor/bootstrap-vue/src/components/skeleton/skeleton.js +0 -49
  206. package/dist/vendor/bootstrap-vue/src/components/spinner/index.js +0 -11
  207. package/dist/vendor/bootstrap-vue/src/components/spinner/spinner.js +0 -55
  208. package/dist/vendor/bootstrap-vue/src/components/time/index.js +0 -11
  209. package/dist/vendor/bootstrap-vue/src/components/time/time.js +0 -600
  210. package/dist/vendor/bootstrap-vue/src/constants/date.js +0 -8
  211. package/dist/vendor/bootstrap-vue/src/mixins/card.js +0 -22
  212. package/dist/vendor/bootstrap-vue/src/mixins/pagination.js +0 -598
  213. package/dist/vendor/bootstrap-vue/src/utils/date.js +0 -135
  214. package/src/vendor/bootstrap-vue/src/_custom-controls.scss +0 -30
  215. package/src/vendor/bootstrap-vue/src/components/alert/README.md +0 -280
  216. package/src/vendor/bootstrap-vue/src/components/alert/alert.js +0 -185
  217. package/src/vendor/bootstrap-vue/src/components/alert/alert.spec.js +0 -442
  218. package/src/vendor/bootstrap-vue/src/components/alert/index.d.ts +0 -13
  219. package/src/vendor/bootstrap-vue/src/components/alert/index.js +0 -8
  220. package/src/vendor/bootstrap-vue/src/components/alert/package.json +0 -72
  221. package/src/vendor/bootstrap-vue/src/components/aspect/README.md +0 -65
  222. package/src/vendor/bootstrap-vue/src/components/aspect/aspect.js +0 -65
  223. package/src/vendor/bootstrap-vue/src/components/aspect/aspect.spec.js +0 -121
  224. package/src/vendor/bootstrap-vue/src/components/aspect/index.d.ts +0 -11
  225. package/src/vendor/bootstrap-vue/src/components/aspect/index.js +0 -8
  226. package/src/vendor/bootstrap-vue/src/components/aspect/package.json +0 -26
  227. package/src/vendor/bootstrap-vue/src/components/avatar/README.md +0 -567
  228. package/src/vendor/bootstrap-vue/src/components/avatar/_avatar.scss +0 -148
  229. package/src/vendor/bootstrap-vue/src/components/avatar/avatar-group.js +0 -75
  230. package/src/vendor/bootstrap-vue/src/components/avatar/avatar-group.spec.js +0 -74
  231. package/src/vendor/bootstrap-vue/src/components/avatar/avatar.js +0 -228
  232. package/src/vendor/bootstrap-vue/src/components/avatar/avatar.spec.js +0 -355
  233. package/src/vendor/bootstrap-vue/src/components/avatar/index.d.ts +0 -14
  234. package/src/vendor/bootstrap-vue/src/components/avatar/index.js +0 -9
  235. package/src/vendor/bootstrap-vue/src/components/avatar/index.scss +0 -1
  236. package/src/vendor/bootstrap-vue/src/components/avatar/package.json +0 -149
  237. package/src/vendor/bootstrap-vue/src/components/button-toolbar/README.md +0 -109
  238. package/src/vendor/bootstrap-vue/src/components/button-toolbar/button-toolbar.js +0 -117
  239. package/src/vendor/bootstrap-vue/src/components/button-toolbar/button-toolbar.spec.js +0 -185
  240. package/src/vendor/bootstrap-vue/src/components/button-toolbar/index.d.ts +0 -11
  241. package/src/vendor/bootstrap-vue/src/components/button-toolbar/index.js +0 -11
  242. package/src/vendor/bootstrap-vue/src/components/button-toolbar/package.json +0 -32
  243. package/src/vendor/bootstrap-vue/src/components/calendar/README.md +0 -735
  244. package/src/vendor/bootstrap-vue/src/components/calendar/_calendar.scss +0 -78
  245. package/src/vendor/bootstrap-vue/src/components/calendar/calendar.js +0 -1146
  246. package/src/vendor/bootstrap-vue/src/components/calendar/calendar.spec.js +0 -466
  247. package/src/vendor/bootstrap-vue/src/components/calendar/index.d.ts +0 -28
  248. package/src/vendor/bootstrap-vue/src/components/calendar/index.js +0 -8
  249. package/src/vendor/bootstrap-vue/src/components/calendar/index.scss +0 -1
  250. package/src/vendor/bootstrap-vue/src/components/calendar/package.json +0 -317
  251. package/src/vendor/bootstrap-vue/src/components/card/README.md +0 -729
  252. package/src/vendor/bootstrap-vue/src/components/card/_card-img.scss +0 -7
  253. package/src/vendor/bootstrap-vue/src/components/card/card-body.js +0 -69
  254. package/src/vendor/bootstrap-vue/src/components/card/card-body.spec.js +0 -142
  255. package/src/vendor/bootstrap-vue/src/components/card/card-footer.js +0 -48
  256. package/src/vendor/bootstrap-vue/src/components/card/card-footer.spec.js +0 -98
  257. package/src/vendor/bootstrap-vue/src/components/card/card-group.js +0 -33
  258. package/src/vendor/bootstrap-vue/src/components/card/card-group.spec.js +0 -75
  259. package/src/vendor/bootstrap-vue/src/components/card/card-header.js +0 -48
  260. package/src/vendor/bootstrap-vue/src/components/card/card-header.spec.js +0 -98
  261. package/src/vendor/bootstrap-vue/src/components/card/card-img-lazy.js +0 -47
  262. package/src/vendor/bootstrap-vue/src/components/card/card-img-lazy.spec.js +0 -204
  263. package/src/vendor/bootstrap-vue/src/components/card/card-img.js +0 -50
  264. package/src/vendor/bootstrap-vue/src/components/card/card-img.spec.js +0 -208
  265. package/src/vendor/bootstrap-vue/src/components/card/card-sub-title.js +0 -35
  266. package/src/vendor/bootstrap-vue/src/components/card/card-sub-title.spec.js +0 -60
  267. package/src/vendor/bootstrap-vue/src/components/card/card-text.js +0 -25
  268. package/src/vendor/bootstrap-vue/src/components/card/card-text.spec.js +0 -48
  269. package/src/vendor/bootstrap-vue/src/components/card/card-title.js +0 -33
  270. package/src/vendor/bootstrap-vue/src/components/card/card-title.spec.js +0 -45
  271. package/src/vendor/bootstrap-vue/src/components/card/card.js +0 -140
  272. package/src/vendor/bootstrap-vue/src/components/card/card.spec.js +0 -296
  273. package/src/vendor/bootstrap-vue/src/components/card/index.d.ts +0 -38
  274. package/src/vendor/bootstrap-vue/src/components/card/index.js +0 -40
  275. package/src/vendor/bootstrap-vue/src/components/card/index.scss +0 -1
  276. package/src/vendor/bootstrap-vue/src/components/card/package.json +0 -262
  277. package/src/vendor/bootstrap-vue/src/components/embed/README.md +0 -63
  278. package/src/vendor/bootstrap-vue/src/components/embed/embed.js +0 -51
  279. package/src/vendor/bootstrap-vue/src/components/embed/embed.spec.js +0 -110
  280. package/src/vendor/bootstrap-vue/src/components/embed/index.d.ts +0 -11
  281. package/src/vendor/bootstrap-vue/src/components/embed/index.js +0 -8
  282. package/src/vendor/bootstrap-vue/src/components/embed/package.json +0 -29
  283. package/src/vendor/bootstrap-vue/src/components/form/form-datalist.js +0 -42
  284. package/src/vendor/bootstrap-vue/src/components/form/form-datalist.spec.js +0 -57
  285. package/src/vendor/bootstrap-vue/src/components/form-btn-label-control/_form-btn-label-control.scss +0 -125
  286. package/src/vendor/bootstrap-vue/src/components/form-btn-label-control/bv-form-btn-label-control.js +0 -278
  287. package/src/vendor/bootstrap-vue/src/components/form-btn-label-control/index.scss +0 -1
  288. package/src/vendor/bootstrap-vue/src/components/form-btn-label-control/package.json +0 -5
  289. package/src/vendor/bootstrap-vue/src/components/form-datepicker/README.md +0 -694
  290. package/src/vendor/bootstrap-vue/src/components/form-datepicker/_form-datepicker.scss +0 -1
  291. package/src/vendor/bootstrap-vue/src/components/form-datepicker/form-datepicker.js +0 -342
  292. package/src/vendor/bootstrap-vue/src/components/form-datepicker/form-datepicker.spec.js +0 -562
  293. package/src/vendor/bootstrap-vue/src/components/form-datepicker/index.d.ts +0 -12
  294. package/src/vendor/bootstrap-vue/src/components/form-datepicker/index.js +0 -11
  295. package/src/vendor/bootstrap-vue/src/components/form-datepicker/index.scss +0 -1
  296. package/src/vendor/bootstrap-vue/src/components/form-datepicker/package.json +0 -420
  297. package/src/vendor/bootstrap-vue/src/components/form-file/README.md +0 -357
  298. package/src/vendor/bootstrap-vue/src/components/form-file/_form-file.scss +0 -61
  299. package/src/vendor/bootstrap-vue/src/components/form-file/form-file.js +0 -575
  300. package/src/vendor/bootstrap-vue/src/components/form-file/form-file.spec.js +0 -885
  301. package/src/vendor/bootstrap-vue/src/components/form-file/index.d.ts +0 -13
  302. package/src/vendor/bootstrap-vue/src/components/form-file/index.js +0 -11
  303. package/src/vendor/bootstrap-vue/src/components/form-file/index.scss +0 -1
  304. package/src/vendor/bootstrap-vue/src/components/form-file/package.json +0 -131
  305. package/src/vendor/bootstrap-vue/src/components/form-rating/README.md +0 -526
  306. package/src/vendor/bootstrap-vue/src/components/form-rating/_form-rating.scss +0 -57
  307. package/src/vendor/bootstrap-vue/src/components/form-rating/form-rating.js +0 -411
  308. package/src/vendor/bootstrap-vue/src/components/form-rating/form-rating.spec.js +0 -544
  309. package/src/vendor/bootstrap-vue/src/components/form-rating/index.d.ts +0 -14
  310. package/src/vendor/bootstrap-vue/src/components/form-rating/index.js +0 -8
  311. package/src/vendor/bootstrap-vue/src/components/form-rating/index.scss +0 -1
  312. package/src/vendor/bootstrap-vue/src/components/form-rating/package.json +0 -166
  313. package/src/vendor/bootstrap-vue/src/components/form-spinbutton/README.md +0 -411
  314. package/src/vendor/bootstrap-vue/src/components/form-spinbutton/_spinbutton.scss +0 -76
  315. package/src/vendor/bootstrap-vue/src/components/form-spinbutton/form-spinbutton.js +0 -572
  316. package/src/vendor/bootstrap-vue/src/components/form-spinbutton/form-spinbutton.spec.js +0 -731
  317. package/src/vendor/bootstrap-vue/src/components/form-spinbutton/index.d.ts +0 -12
  318. package/src/vendor/bootstrap-vue/src/components/form-spinbutton/index.js +0 -11
  319. package/src/vendor/bootstrap-vue/src/components/form-spinbutton/index.scss +0 -1
  320. package/src/vendor/bootstrap-vue/src/components/form-spinbutton/package.json +0 -150
  321. package/src/vendor/bootstrap-vue/src/components/form-tags/README.md +0 -880
  322. package/src/vendor/bootstrap-vue/src/components/form-tags/_form-tags.scss +0 -70
  323. package/src/vendor/bootstrap-vue/src/components/form-tags/form-tag.js +0 -94
  324. package/src/vendor/bootstrap-vue/src/components/form-tags/form-tag.spec.js +0 -166
  325. package/src/vendor/bootstrap-vue/src/components/form-tags/form-tags.js +0 -891
  326. package/src/vendor/bootstrap-vue/src/components/form-tags/form-tags.spec.js +0 -920
  327. package/src/vendor/bootstrap-vue/src/components/form-tags/index.d.ts +0 -16
  328. package/src/vendor/bootstrap-vue/src/components/form-tags/index.js +0 -14
  329. package/src/vendor/bootstrap-vue/src/components/form-tags/index.scss +0 -1
  330. package/src/vendor/bootstrap-vue/src/components/form-tags/package.json +0 -440
  331. package/src/vendor/bootstrap-vue/src/components/form-timepicker/README.md +0 -450
  332. package/src/vendor/bootstrap-vue/src/components/form-timepicker/_form-timepicker.scss +0 -1
  333. package/src/vendor/bootstrap-vue/src/components/form-timepicker/form-timepicker.js +0 -308
  334. package/src/vendor/bootstrap-vue/src/components/form-timepicker/form-timepicker.spec.js +0 -440
  335. package/src/vendor/bootstrap-vue/src/components/form-timepicker/index.d.ts +0 -12
  336. package/src/vendor/bootstrap-vue/src/components/form-timepicker/index.js +0 -11
  337. package/src/vendor/bootstrap-vue/src/components/form-timepicker/index.scss +0 -1
  338. package/src/vendor/bootstrap-vue/src/components/form-timepicker/package.json +0 -255
  339. package/src/vendor/bootstrap-vue/src/components/image/README.md +0 -322
  340. package/src/vendor/bootstrap-vue/src/components/image/img-lazy.js +0 -161
  341. package/src/vendor/bootstrap-vue/src/components/image/img-lazy.spec.js +0 -96
  342. package/src/vendor/bootstrap-vue/src/components/image/img.js +0 -139
  343. package/src/vendor/bootstrap-vue/src/components/image/img.spec.js +0 -255
  344. package/src/vendor/bootstrap-vue/src/components/image/index.d.ts +0 -14
  345. package/src/vendor/bootstrap-vue/src/components/image/index.js +0 -12
  346. package/src/vendor/bootstrap-vue/src/components/image/package.json +0 -152
  347. package/src/vendor/bootstrap-vue/src/components/jumbotron/README.md +0 -109
  348. package/src/vendor/bootstrap-vue/src/components/jumbotron/index.d.ts +0 -11
  349. package/src/vendor/bootstrap-vue/src/components/jumbotron/index.js +0 -8
  350. package/src/vendor/bootstrap-vue/src/components/jumbotron/jumbotron.js +0 -103
  351. package/src/vendor/bootstrap-vue/src/components/jumbotron/jumbotron.spec.js +0 -254
  352. package/src/vendor/bootstrap-vue/src/components/jumbotron/package.json +0 -66
  353. package/src/vendor/bootstrap-vue/src/components/layout/container.js +0 -40
  354. package/src/vendor/bootstrap-vue/src/components/layout/container.spec.js +0 -75
  355. package/src/vendor/bootstrap-vue/src/components/layout/row.js +0 -111
  356. package/src/vendor/bootstrap-vue/src/components/layout/row.spec.js +0 -138
  357. package/src/vendor/bootstrap-vue/src/components/list-group/README.md +0 -291
  358. package/src/vendor/bootstrap-vue/src/components/list-group/index.d.ts +0 -14
  359. package/src/vendor/bootstrap-vue/src/components/list-group/index.js +0 -12
  360. package/src/vendor/bootstrap-vue/src/components/list-group/list-group-item.js +0 -76
  361. package/src/vendor/bootstrap-vue/src/components/list-group/list-group-item.spec.js +0 -286
  362. package/src/vendor/bootstrap-vue/src/components/list-group/list-group.js +0 -42
  363. package/src/vendor/bootstrap-vue/src/components/list-group/list-group.spec.js +0 -132
  364. package/src/vendor/bootstrap-vue/src/components/list-group/package.json +0 -52
  365. package/src/vendor/bootstrap-vue/src/components/media/README.md +0 -183
  366. package/src/vendor/bootstrap-vue/src/components/media/_media.scss +0 -9
  367. package/src/vendor/bootstrap-vue/src/components/media/index.d.ts +0 -17
  368. package/src/vendor/bootstrap-vue/src/components/media/index.js +0 -14
  369. package/src/vendor/bootstrap-vue/src/components/media/index.scss +0 -1
  370. package/src/vendor/bootstrap-vue/src/components/media/media-aside.js +0 -45
  371. package/src/vendor/bootstrap-vue/src/components/media/media-aside.spec.js +0 -79
  372. package/src/vendor/bootstrap-vue/src/components/media/media-body.js +0 -25
  373. package/src/vendor/bootstrap-vue/src/components/media/media-body.spec.js +0 -47
  374. package/src/vendor/bootstrap-vue/src/components/media/media.js +0 -52
  375. package/src/vendor/bootstrap-vue/src/components/media/media.spec.js +0 -149
  376. package/src/vendor/bootstrap-vue/src/components/media/package.json +0 -65
  377. package/src/vendor/bootstrap-vue/src/components/nav/nav-form.js +0 -50
  378. package/src/vendor/bootstrap-vue/src/components/nav/nav-form.spec.js +0 -93
  379. package/src/vendor/bootstrap-vue/src/components/nav/nav-text.js +0 -18
  380. package/src/vendor/bootstrap-vue/src/components/nav/nav-text.spec.js +0 -30
  381. package/src/vendor/bootstrap-vue/src/components/navbar/navbar-nav.js +0 -45
  382. package/src/vendor/bootstrap-vue/src/components/navbar/navbar-nav.spec.js +0 -105
  383. package/src/vendor/bootstrap-vue/src/components/navbar/navbar-toggle.js +0 -84
  384. package/src/vendor/bootstrap-vue/src/components/navbar/navbar-toggle.spec.js +0 -189
  385. package/src/vendor/bootstrap-vue/src/components/overlay/README.md +0 -815
  386. package/src/vendor/bootstrap-vue/src/components/overlay/index.d.ts +0 -11
  387. package/src/vendor/bootstrap-vue/src/components/overlay/index.js +0 -8
  388. package/src/vendor/bootstrap-vue/src/components/overlay/overlay.js +0 -162
  389. package/src/vendor/bootstrap-vue/src/components/overlay/overlay.spec.js +0 -257
  390. package/src/vendor/bootstrap-vue/src/components/overlay/package.json +0 -130
  391. package/src/vendor/bootstrap-vue/src/components/pagination/README.md +0 -430
  392. package/src/vendor/bootstrap-vue/src/components/pagination/_pagination.scss +0 -26
  393. package/src/vendor/bootstrap-vue/src/components/pagination/index.d.ts +0 -11
  394. package/src/vendor/bootstrap-vue/src/components/pagination/index.js +0 -8
  395. package/src/vendor/bootstrap-vue/src/components/pagination/index.scss +0 -1
  396. package/src/vendor/bootstrap-vue/src/components/pagination/package.json +0 -295
  397. package/src/vendor/bootstrap-vue/src/components/pagination/pagination.js +0 -138
  398. package/src/vendor/bootstrap-vue/src/components/pagination/pagination.spec.js +0 -1198
  399. package/src/vendor/bootstrap-vue/src/components/pagination-nav/README.md +0 -544
  400. package/src/vendor/bootstrap-vue/src/components/pagination-nav/_pagination-nav.scss +0 -2
  401. package/src/vendor/bootstrap-vue/src/components/pagination-nav/index.d.ts +0 -11
  402. package/src/vendor/bootstrap-vue/src/components/pagination-nav/index.js +0 -8
  403. package/src/vendor/bootstrap-vue/src/components/pagination-nav/index.scss +0 -1
  404. package/src/vendor/bootstrap-vue/src/components/pagination-nav/package.json +0 -315
  405. package/src/vendor/bootstrap-vue/src/components/pagination-nav/pagination-nav.js +0 -281
  406. package/src/vendor/bootstrap-vue/src/components/pagination-nav/pagination-nav.spec.js +0 -671
  407. package/src/vendor/bootstrap-vue/src/components/sidebar/README.md +0 -406
  408. package/src/vendor/bootstrap-vue/src/components/sidebar/_sidebar.scss +0 -97
  409. package/src/vendor/bootstrap-vue/src/components/sidebar/index.d.ts +0 -11
  410. package/src/vendor/bootstrap-vue/src/components/sidebar/index.js +0 -10
  411. package/src/vendor/bootstrap-vue/src/components/sidebar/index.scss +0 -1
  412. package/src/vendor/bootstrap-vue/src/components/sidebar/package.json +0 -239
  413. package/src/vendor/bootstrap-vue/src/components/sidebar/sidebar.js +0 -438
  414. package/src/vendor/bootstrap-vue/src/components/sidebar/sidebar.spec.js +0 -404
  415. package/src/vendor/bootstrap-vue/src/components/skeleton/README.md +0 -275
  416. package/src/vendor/bootstrap-vue/src/components/skeleton/_skeleton.scss +0 -141
  417. package/src/vendor/bootstrap-vue/src/components/skeleton/index.d.ts +0 -23
  418. package/src/vendor/bootstrap-vue/src/components/skeleton/index.js +0 -18
  419. package/src/vendor/bootstrap-vue/src/components/skeleton/index.scss +0 -1
  420. package/src/vendor/bootstrap-vue/src/components/skeleton/package.json +0 -136
  421. package/src/vendor/bootstrap-vue/src/components/skeleton/skeleton-icon.js +0 -45
  422. package/src/vendor/bootstrap-vue/src/components/skeleton/skeleton-icon.spec.js +0 -86
  423. package/src/vendor/bootstrap-vue/src/components/skeleton/skeleton-img.js +0 -49
  424. package/src/vendor/bootstrap-vue/src/components/skeleton/skeleton-img.spec.js +0 -139
  425. package/src/vendor/bootstrap-vue/src/components/skeleton/skeleton-table.js +0 -58
  426. package/src/vendor/bootstrap-vue/src/components/skeleton/skeleton-table.spec.js +0 -119
  427. package/src/vendor/bootstrap-vue/src/components/skeleton/skeleton-wrapper.js +0 -47
  428. package/src/vendor/bootstrap-vue/src/components/skeleton/skeleton-wrapper.spec.js +0 -48
  429. package/src/vendor/bootstrap-vue/src/components/skeleton/skeleton.js +0 -46
  430. package/src/vendor/bootstrap-vue/src/components/skeleton/skeleton.spec.js +0 -126
  431. package/src/vendor/bootstrap-vue/src/components/spinner/README.md +0 -229
  432. package/src/vendor/bootstrap-vue/src/components/spinner/index.d.ts +0 -11
  433. package/src/vendor/bootstrap-vue/src/components/spinner/index.js +0 -8
  434. package/src/vendor/bootstrap-vue/src/components/spinner/package.json +0 -38
  435. package/src/vendor/bootstrap-vue/src/components/spinner/spinner.js +0 -54
  436. package/src/vendor/bootstrap-vue/src/components/spinner/spinner.spec.js +0 -305
  437. package/src/vendor/bootstrap-vue/src/components/time/README.md +0 -431
  438. package/src/vendor/bootstrap-vue/src/components/time/_time.scss +0 -41
  439. package/src/vendor/bootstrap-vue/src/components/time/index.d.ts +0 -27
  440. package/src/vendor/bootstrap-vue/src/components/time/index.js +0 -8
  441. package/src/vendor/bootstrap-vue/src/components/time/index.scss +0 -1
  442. package/src/vendor/bootstrap-vue/src/components/time/package.json +0 -123
  443. package/src/vendor/bootstrap-vue/src/components/time/time.js +0 -601
  444. package/src/vendor/bootstrap-vue/src/components/time/time.spec.js +0 -330
  445. package/src/vendor/bootstrap-vue/src/constants/date.js +0 -7
  446. package/src/vendor/bootstrap-vue/src/mixins/card.js +0 -23
  447. package/src/vendor/bootstrap-vue/src/mixins/pagination.js +0 -670
  448. package/src/vendor/bootstrap-vue/src/utils/date.js +0 -130
  449. package/src/vendor/bootstrap-vue/src/utils/date.spec.js +0 -159
@@ -1,891 +0,0 @@
1
- // Tagged input form control
2
- // Based loosely on https://adamwathan.me/renderless-components-in-vuejs/
3
- import { extend } from '../../vue'
4
- import { NAME_FORM_TAGS } from '../../constants/components'
5
- import {
6
- EVENT_NAME_BLUR,
7
- EVENT_NAME_FOCUS,
8
- EVENT_NAME_FOCUSIN,
9
- EVENT_NAME_FOCUSOUT,
10
- EVENT_NAME_TAG_STATE,
11
- EVENT_OPTIONS_PASSIVE
12
- } from '../../constants/events'
13
- import { CODE_BACKSPACE, CODE_DELETE, CODE_ENTER } from '../../constants/key-codes'
14
- import {
15
- PROP_TYPE_ARRAY,
16
- PROP_TYPE_ARRAY_OBJECT_STRING,
17
- PROP_TYPE_ARRAY_STRING,
18
- PROP_TYPE_BOOLEAN,
19
- PROP_TYPE_FUNCTION,
20
- PROP_TYPE_NUMBER,
21
- PROP_TYPE_OBJECT,
22
- PROP_TYPE_STRING
23
- } from '../../constants/props'
24
- import { RX_SPACES } from '../../constants/regex'
25
- import { SLOT_NAME_DEFAULT, SLOT_NAME_ADD_BUTTON_TEXT } from '../../constants/slots'
26
- import { arrayIncludes, concat } from '../../utils/array'
27
- import { cssEscape } from '../../utils/css-escape'
28
- import { attemptBlur, attemptFocus, closest, matches, requestAF, select } from '../../utils/dom'
29
- import { eventOn, eventOff, stopEvent } from '../../utils/events'
30
- import { identity } from '../../utils/identity'
31
- import { isEvent, isNumber, isString } from '../../utils/inspect'
32
- import { looseEqual } from '../../utils/loose-equal'
33
- import { makeModelMixin } from '../../utils/model'
34
- import { omit, pick, sortKeys } from '../../utils/object'
35
- import { hasPropFunction, makeProp, makePropsConfigurable } from '../../utils/props'
36
- import { escapeRegExp, toString, trim, trimLeft } from '../../utils/string'
37
- import { formControlMixin, props as formControlProps } from '../../mixins/form-control'
38
- import { formSizeMixin, props as formSizeProps } from '../../mixins/form-size'
39
- import { formStateMixin, props as formStateProps } from '../../mixins/form-state'
40
- import { idMixin, props as idProps } from '../../mixins/id'
41
- import { listenersMixin } from '../../mixins/listeners'
42
- import { normalizeSlotMixin } from '../../mixins/normalize-slot'
43
- import { BButton } from '../button/button'
44
- import { BFormInvalidFeedback } from '../form/form-invalid-feedback'
45
- import { BFormText } from '../form/form-text'
46
- import { BFormTag } from './form-tag'
47
-
48
- // --- Constants ---
49
-
50
- const {
51
- mixin: modelMixin,
52
- props: modelProps,
53
- prop: MODEL_PROP_NAME,
54
- event: MODEL_EVENT_NAME
55
- } = makeModelMixin('value', {
56
- type: PROP_TYPE_ARRAY,
57
- defaultValue: []
58
- })
59
-
60
- // Supported input types (for built in input)
61
- const TYPES = ['text', 'email', 'tel', 'url', 'number']
62
-
63
- // Default ignore input focus selector
64
- const DEFAULT_INPUT_FOCUS_SELECTOR = ['.b-form-tag', 'button', 'input', 'select'].join(' ')
65
-
66
- // --- Helper methods ---
67
-
68
- // Escape special chars in string and replace
69
- // contiguous spaces with a whitespace match
70
- const escapeRegExpChars = str => escapeRegExp(str).replace(RX_SPACES, '\\s')
71
-
72
- // Remove leading/trailing spaces from array of tags and remove duplicates
73
- const cleanTags = tags => {
74
- return concat(tags)
75
- .map(tag => trim(toString(tag)))
76
- .filter((tag, index, arr) => tag.length > 0 && arr.indexOf(tag) === index)
77
- }
78
-
79
- // Processes an input/change event, normalizing string or event argument
80
- const processEventValue = event =>
81
- isString(event) ? event : isEvent(event) ? event.target.value || '' : ''
82
-
83
- // Returns a fresh empty `tagsState` object
84
- const cleanTagsState = () => ({
85
- all: [],
86
- valid: [],
87
- invalid: [],
88
- duplicate: []
89
- })
90
-
91
- // --- Props ---
92
-
93
- const props = makePropsConfigurable(
94
- sortKeys({
95
- ...idProps,
96
- ...modelProps,
97
- ...formControlProps,
98
- ...formSizeProps,
99
- ...formStateProps,
100
- addButtonText: makeProp(PROP_TYPE_STRING, 'Add'),
101
- addButtonVariant: makeProp(PROP_TYPE_STRING, 'outline-secondary'),
102
- // Enable change event triggering tag addition
103
- // Handy if using <select> as the input
104
- addOnChange: makeProp(PROP_TYPE_BOOLEAN, false),
105
- duplicateTagText: makeProp(PROP_TYPE_STRING, 'Duplicate tag(s)'),
106
- feedbackAriaLive: makeProp(PROP_TYPE_STRING, 'assertive'),
107
- // Disable the input focus behavior when clicking
108
- // on element matching the selector (or selectors)
109
- ignoreInputFocusSelector: makeProp(PROP_TYPE_ARRAY_STRING, DEFAULT_INPUT_FOCUS_SELECTOR),
110
- // Additional attributes to add to the input element
111
- inputAttrs: makeProp(PROP_TYPE_OBJECT, {}),
112
- inputClass: makeProp(PROP_TYPE_ARRAY_OBJECT_STRING),
113
- inputId: makeProp(PROP_TYPE_STRING),
114
- inputType: makeProp(PROP_TYPE_STRING, 'text', value => {
115
- return arrayIncludes(TYPES, value)
116
- }),
117
- invalidTagText: makeProp(PROP_TYPE_STRING, 'Invalid tag(s)'),
118
- limit: makeProp(PROP_TYPE_NUMBER),
119
- limitTagsText: makeProp(PROP_TYPE_STRING, 'Tag limit reached'),
120
- // Disable ENTER key from triggering tag addition
121
- noAddOnEnter: makeProp(PROP_TYPE_BOOLEAN, false),
122
- // Disable the focus ring on the root element
123
- noOuterFocus: makeProp(PROP_TYPE_BOOLEAN, false),
124
- noTagRemove: makeProp(PROP_TYPE_BOOLEAN, false),
125
- placeholder: makeProp(PROP_TYPE_STRING, 'Add tag...'),
126
- // Enable deleting last tag in list when CODE_BACKSPACE is
127
- // pressed and input is empty
128
- removeOnDelete: makeProp(PROP_TYPE_BOOLEAN, false),
129
- // Character (or characters) that trigger adding tags
130
- separator: makeProp(PROP_TYPE_ARRAY_STRING),
131
- tagClass: makeProp(PROP_TYPE_ARRAY_OBJECT_STRING),
132
- tagPills: makeProp(PROP_TYPE_BOOLEAN, false),
133
- tagRemoveLabel: makeProp(PROP_TYPE_STRING, 'Remove tag'),
134
- tagRemovedLabel: makeProp(PROP_TYPE_STRING, 'Tag removed'),
135
- tagValidator: makeProp(PROP_TYPE_FUNCTION),
136
- tagVariant: makeProp(PROP_TYPE_STRING, 'secondary')
137
- }),
138
- NAME_FORM_TAGS
139
- )
140
-
141
- // --- Main component ---
142
-
143
- // @vue/component
144
- export const BFormTags = /*#__PURE__*/ extend({
145
- name: NAME_FORM_TAGS,
146
- mixins: [
147
- listenersMixin,
148
- idMixin,
149
- modelMixin,
150
- formControlMixin,
151
- formSizeMixin,
152
- formStateMixin,
153
- normalizeSlotMixin
154
- ],
155
- props,
156
- data() {
157
- return {
158
- hasFocus: false,
159
- newTag: '',
160
- tags: [],
161
- // Tags that were removed
162
- removedTags: [],
163
- // Populated when tags are parsed
164
- tagsState: cleanTagsState(),
165
- focusState: null
166
- }
167
- },
168
- computed: {
169
- computedInputId() {
170
- return this.inputId || this.safeId('__input__')
171
- },
172
- computedInputType() {
173
- // We only allow certain types
174
- return arrayIncludes(TYPES, this.inputType) ? this.inputType : 'text'
175
- },
176
- computedInputAttrs() {
177
- const { disabled, form } = this
178
-
179
- return {
180
- // Merge in user supplied attributes
181
- ...this.inputAttrs,
182
- // Must have attributes
183
- id: this.computedInputId,
184
- value: this.newTag,
185
- disabled,
186
- form
187
- }
188
- },
189
- computedInputHandlers() {
190
- return {
191
- ...omit(this.bvListeners, [EVENT_NAME_FOCUSIN, EVENT_NAME_FOCUSOUT]),
192
- blur: this.onInputBlur,
193
- change: this.onInputChange,
194
- focus: this.onInputFocus,
195
- input: this.onInputInput,
196
- keydown: this.onInputKeydown,
197
- reset: this.reset
198
- }
199
- },
200
- computedSeparator() {
201
- // Merge the array into a string
202
- return concat(this.separator)
203
- .filter(isString)
204
- .filter(identity)
205
- .join('')
206
- },
207
- computedSeparatorRegExp() {
208
- // We use a computed prop here to precompile the RegExp
209
- // The RegExp is a character class RE in the form of `/[abc]+/`
210
- // where a, b, and c are the valid separator characters
211
- // -> `tags = str.split(/[abc]+/).filter(t => t)`
212
- const separator = this.computedSeparator
213
- return separator ? new RegExp(`[${escapeRegExpChars(separator)}]+`) : null
214
- },
215
- computedJoiner() {
216
- // When tag(s) are invalid or duplicate, we leave them
217
- // in the input so that the user can see them
218
- // If there are more than one tag in the input, we use the
219
- // first separator character as the separator in the input
220
- // We append a space if the first separator is not a space
221
- const joiner = this.computedSeparator.charAt(0)
222
- return joiner !== ' ' ? `${joiner} ` : joiner
223
- },
224
- computeIgnoreInputFocusSelector() {
225
- // Normalize to an single selector with selectors separated by `,`
226
- return concat(this.ignoreInputFocusSelector)
227
- .filter(identity)
228
- .join(',')
229
- .trim()
230
- },
231
- disableAddButton() {
232
- // If 'Add' button should be disabled
233
- // If the input contains at least one tag that can
234
- // be added, then the 'Add' button should be enabled
235
- const newTag = trim(this.newTag)
236
- return (
237
- newTag === '' ||
238
- !this.splitTags(newTag).some(t => !arrayIncludes(this.tags, t) && this.validateTag(t))
239
- )
240
- },
241
- duplicateTags() {
242
- return this.tagsState.duplicate
243
- },
244
- hasDuplicateTags() {
245
- return this.duplicateTags.length > 0
246
- },
247
- invalidTags() {
248
- return this.tagsState.invalid
249
- },
250
- hasInvalidTags() {
251
- return this.invalidTags.length > 0
252
- },
253
- isLimitReached() {
254
- const { limit } = this
255
- return isNumber(limit) && limit >= 0 && this.tags.length >= limit
256
- }
257
- },
258
- watch: {
259
- [MODEL_PROP_NAME](newValue) {
260
- this.tags = cleanTags(newValue)
261
- },
262
- tags(newValue, oldValue) {
263
- // Update the `v-model` (if it differs from the value prop)
264
- if (!looseEqual(newValue, this[MODEL_PROP_NAME])) {
265
- this.$emit(MODEL_EVENT_NAME, newValue)
266
- }
267
- if (!looseEqual(newValue, oldValue)) {
268
- newValue = concat(newValue).filter(identity)
269
- oldValue = concat(oldValue).filter(identity)
270
- this.removedTags = oldValue.filter(old => !arrayIncludes(newValue, old))
271
- }
272
- },
273
- tagsState(newValue, oldValue) {
274
- // Emit a tag-state event when the `tagsState` object changes
275
- if (!looseEqual(newValue, oldValue)) {
276
- this.$emit(EVENT_NAME_TAG_STATE, newValue.valid, newValue.invalid, newValue.duplicate)
277
- }
278
- }
279
- },
280
- created() {
281
- // We do this in created to make sure an input event emits
282
- // if the cleaned tags are not equal to the value prop
283
- this.tags = cleanTags(this[MODEL_PROP_NAME])
284
- },
285
- mounted() {
286
- // Listen for form reset events, to reset the tags input
287
- const $form = closest('form', this.$el)
288
- if ($form) {
289
- eventOn($form, 'reset', this.reset, EVENT_OPTIONS_PASSIVE)
290
- }
291
- },
292
- beforeDestroy() {
293
- const $form = closest('form', this.$el)
294
- if ($form) {
295
- eventOff($form, 'reset', this.reset, EVENT_OPTIONS_PASSIVE)
296
- }
297
- },
298
- methods: {
299
- addTag(newTag) {
300
- newTag = isString(newTag) ? newTag : this.newTag
301
- /* istanbul ignore next */
302
- if (this.disabled || trim(newTag) === '' || this.isLimitReached) {
303
- // Early exit
304
- return
305
- }
306
- const parsed = this.parseTags(newTag)
307
- // Add any new tags to the `tags` array, or if the
308
- // array of `allTags` is empty, we clear the input
309
- if (parsed.valid.length > 0 || parsed.all.length === 0) {
310
- // Clear the user input element (and leave in any invalid/duplicate tag(s)
311
- /* istanbul ignore if: full testing to be added later */
312
- if (matches(this.getInput(), 'select')) {
313
- // The following is needed to properly
314
- // work with `<select>` elements
315
- this.newTag = ''
316
- } else {
317
- const invalidAndDuplicates = [...parsed.invalid, ...parsed.duplicate]
318
- this.newTag = parsed.all
319
- .filter(tag => arrayIncludes(invalidAndDuplicates, tag))
320
- .join(this.computedJoiner)
321
- .concat(invalidAndDuplicates.length > 0 ? this.computedJoiner.charAt(0) : '')
322
- }
323
- }
324
- if (parsed.valid.length > 0) {
325
- // We add the new tags in one atomic operation
326
- // to trigger reactivity once (instead of once per tag)
327
- // We do this after we update the new tag input value
328
- // `concat()` can be faster than array spread, when both args are arrays
329
- this.tags = concat(this.tags, parsed.valid)
330
- }
331
- this.tagsState = parsed
332
- // Attempt to re-focus the input (specifically for when using the Add
333
- // button, as the button disappears after successfully adding a tag
334
- this.focus()
335
- },
336
- removeTag(tag) {
337
- /* istanbul ignore next */
338
- if (this.disabled) {
339
- return
340
- }
341
- // TODO:
342
- // Add `onRemoveTag(tag)` user method, which if returns `false`
343
- // will prevent the tag from being removed (i.e. confirmation)
344
- // Or emit cancelable `BvEvent`
345
- this.tags = this.tags.filter(t => t !== tag)
346
- },
347
- reset() {
348
- this.newTag = ''
349
- this.tags = []
350
-
351
- this.$nextTick(() => {
352
- this.removedTags = []
353
- this.tagsState = cleanTagsState()
354
- })
355
- },
356
- // --- Input element event handlers ---
357
- onInputInput(event) {
358
- /* istanbul ignore next: hard to test composition events */
359
- if (this.disabled || (isEvent(event) && event.target.composing)) {
360
- // `event.target.composing` is set by Vue (`v-model` directive)
361
- // https://github.com/vuejs/vue/blob/dev/src/platforms/web/runtime/directives/model.js
362
- return
363
- }
364
- let newTag = processEventValue(event)
365
- const separatorRe = this.computedSeparatorRegExp
366
- if (this.newTag !== newTag) {
367
- this.newTag = newTag
368
- }
369
- // We ignore leading whitespace for the following
370
- newTag = trimLeft(newTag)
371
- if (separatorRe && separatorRe.test(newTag.slice(-1))) {
372
- // A trailing separator character was entered, so add the tag(s)
373
- // Note: More than one tag on input event is possible via copy/paste
374
- this.addTag()
375
- } else {
376
- // Validate (parse tags) on input event
377
- this.tagsState = newTag === '' ? cleanTagsState() : this.parseTags(newTag)
378
- }
379
- },
380
- onInputChange(event) {
381
- // Change is triggered on `<input>` blur, or `<select>` selected
382
- // This event is opt-in
383
- if (!this.disabled && this.addOnChange) {
384
- const newTag = processEventValue(event)
385
- /* istanbul ignore next */
386
- if (this.newTag !== newTag) {
387
- this.newTag = newTag
388
- }
389
- this.addTag()
390
- }
391
- },
392
- onInputKeydown(event) {
393
- // Early exit
394
- /* istanbul ignore next */
395
- if (this.disabled || !isEvent(event)) {
396
- return
397
- }
398
- const { keyCode } = event
399
- const value = event.target.value || ''
400
- /* istanbul ignore else: testing to be added later */
401
- if (!this.noAddOnEnter && keyCode === CODE_ENTER) {
402
- // Attempt to add the tag when user presses enter
403
- stopEvent(event, { propagation: false })
404
- this.addTag()
405
- } else if (
406
- this.removeOnDelete &&
407
- (keyCode === CODE_BACKSPACE || keyCode === CODE_DELETE) &&
408
- value === ''
409
- ) {
410
- // Remove the last tag if the user pressed backspace/delete and the input is empty
411
- stopEvent(event, { propagation: false })
412
- this.tags = this.tags.slice(0, -1)
413
- }
414
- },
415
- // --- Wrapper event handlers ---
416
- onClick(event) {
417
- const { computeIgnoreInputFocusSelector: ignoreFocusSelector } = this
418
- if (!ignoreFocusSelector || !closest(ignoreFocusSelector, event.target, true)) {
419
- this.$nextTick(() => {
420
- this.focus()
421
- })
422
- }
423
- },
424
- onInputFocus(event) {
425
- if (this.focusState !== 'out') {
426
- this.focusState = 'in'
427
- this.$nextTick(() => {
428
- requestAF(() => {
429
- if (this.hasFocus) {
430
- this.$emit(EVENT_NAME_FOCUS, event)
431
- this.focusState = null
432
- }
433
- })
434
- })
435
- }
436
- },
437
- onInputBlur(event) {
438
- if (this.focusState !== 'in') {
439
- this.focusState = 'out'
440
- this.$nextTick(() => {
441
- requestAF(() => {
442
- if (!this.hasFocus) {
443
- this.$emit(EVENT_NAME_BLUR, event)
444
- this.focusState = null
445
- }
446
- })
447
- })
448
- }
449
- },
450
- onFocusin(event) {
451
- this.hasFocus = true
452
- this.$emit(EVENT_NAME_FOCUSIN, event)
453
- },
454
- onFocusout(event) {
455
- this.hasFocus = false
456
- this.$emit(EVENT_NAME_FOCUSOUT, event)
457
- },
458
- handleAutofocus() {
459
- this.$nextTick(() => {
460
- requestAF(() => {
461
- if (this.autofocus) {
462
- this.focus()
463
- }
464
- })
465
- })
466
- },
467
- // --- Public methods ---
468
- focus() {
469
- if (!this.disabled) {
470
- attemptFocus(this.getInput())
471
- }
472
- },
473
- blur() {
474
- if (!this.disabled) {
475
- attemptBlur(this.getInput())
476
- }
477
- },
478
- // --- Private methods ---
479
- splitTags(newTag) {
480
- // Split the input into an array of raw tags
481
- newTag = toString(newTag)
482
- const separatorRe = this.computedSeparatorRegExp
483
- // Split the tag(s) via the optional separator
484
- // Normally only a single tag is provided, but copy/paste
485
- // can enter multiple tags in a single operation
486
- return (separatorRe ? newTag.split(separatorRe) : [newTag]).map(trim).filter(identity)
487
- },
488
- parseTags(newTag) {
489
- // Takes `newTag` value and parses it into `validTags`,
490
- // `invalidTags`, and duplicate tags as an object
491
- // Split the input into raw tags
492
- const tags = this.splitTags(newTag)
493
- // Base results
494
- const parsed = {
495
- all: tags,
496
- valid: [],
497
- invalid: [],
498
- duplicate: []
499
- }
500
- // Parse the unique tags
501
- tags.forEach(tag => {
502
- if (arrayIncludes(this.tags, tag) || arrayIncludes(parsed.valid, tag)) {
503
- // Unique duplicate tags
504
- if (!arrayIncludes(parsed.duplicate, tag)) {
505
- parsed.duplicate.push(tag)
506
- }
507
- } else if (this.validateTag(tag)) {
508
- // We only add unique/valid tags
509
- parsed.valid.push(tag)
510
- } else {
511
- // Unique invalid tags
512
- if (!arrayIncludes(parsed.invalid, tag)) {
513
- parsed.invalid.push(tag)
514
- }
515
- }
516
- })
517
- return parsed
518
- },
519
- validateTag(tag) {
520
- const { tagValidator } = this
521
- return hasPropFunction(tagValidator) ? tagValidator(tag) : true
522
- },
523
- getInput() {
524
- // Returns the input element reference (or null if not found)
525
- // We need to escape `computedInputId` since it can be user-provided
526
- return select(`#${cssEscape(this.computedInputId)}`, this.$el)
527
- },
528
- // Default User Interface render
529
- defaultRender({
530
- addButtonText,
531
- addButtonVariant,
532
- addTag,
533
- disableAddButton,
534
- disabled,
535
- duplicateTagText,
536
- inputAttrs,
537
- inputClass,
538
- inputHandlers,
539
- inputType,
540
- invalidTagText,
541
- isDuplicate,
542
- isInvalid,
543
- isLimitReached,
544
- limitTagsText,
545
- noTagRemove,
546
- placeholder,
547
- removeTag,
548
- tagClass,
549
- tagPills,
550
- tagRemoveLabel,
551
- tagVariant,
552
- tags
553
- }) {
554
- const h = this.$createElement
555
-
556
- // Make the list of tags
557
- const $tags = tags.map(tag => {
558
- tag = toString(tag)
559
-
560
- return h(
561
- BFormTag,
562
- {
563
- class: tagClass,
564
- // `BFormTag` will auto generate an ID
565
- // so we do not need to set the ID prop
566
- props: {
567
- disabled,
568
- noRemove: noTagRemove,
569
- pill: tagPills,
570
- removeLabel: tagRemoveLabel,
571
- tag: 'li',
572
- title: tag,
573
- variant: tagVariant
574
- },
575
- on: { remove: () => removeTag(tag) },
576
- key: `tags_${tag}`
577
- },
578
- tag
579
- )
580
- })
581
-
582
- // Feedback IDs if needed
583
- const invalidFeedbackId =
584
- invalidTagText && isInvalid ? this.safeId('__invalid_feedback__') : null
585
- const duplicateFeedbackId =
586
- duplicateTagText && isDuplicate ? this.safeId('__duplicate_feedback__') : null
587
- const limitFeedbackId =
588
- limitTagsText && isLimitReached ? this.safeId('__limit_feedback__') : null
589
-
590
- // Compute the `aria-describedby` attribute value
591
- const ariaDescribedby = [
592
- inputAttrs['aria-describedby'],
593
- invalidFeedbackId,
594
- duplicateFeedbackId,
595
- limitFeedbackId
596
- ]
597
- .filter(identity)
598
- .join(' ')
599
-
600
- // Input
601
- const $input = h('input', {
602
- staticClass: 'b-form-tags-input w-100 flex-grow-1 p-0 m-0 bg-transparent border-0',
603
- class: inputClass,
604
- style: { outline: 0, minWidth: '5rem' },
605
- attrs: {
606
- ...inputAttrs,
607
- 'aria-describedby': ariaDescribedby || null,
608
- type: inputType,
609
- placeholder: placeholder || null
610
- },
611
- domProps: { value: inputAttrs.value },
612
- on: inputHandlers,
613
- // Directive needed to get `event.target.composing` set (if needed)
614
- directives: [{ name: 'model', value: inputAttrs.value }],
615
- ref: 'input'
616
- })
617
-
618
- // Add button
619
- const $button = h(
620
- BButton,
621
- {
622
- staticClass: 'b-form-tags-button py-0',
623
- class: {
624
- // Only show the button if the tag can be added
625
- // We use the `invisible` class instead of not rendering
626
- // the button, so that we maintain layout to prevent
627
- // the user input from jumping around
628
- invisible: disableAddButton
629
- },
630
- style: { fontSize: '90%' },
631
- props: {
632
- disabled: disableAddButton || isLimitReached,
633
- variant: addButtonVariant
634
- },
635
- on: { click: () => addTag() },
636
- ref: 'button'
637
- },
638
- [this.normalizeSlot(SLOT_NAME_ADD_BUTTON_TEXT) || addButtonText]
639
- )
640
-
641
- // ID of the tags + input `<ul>` list
642
- // Note we could concatenate `inputAttrs.id` with '__tag_list__'
643
- // but `inputId` may be `null` until after mount
644
- // `safeId()` returns `null`, if no user provided ID,
645
- // until after mount when a unique ID is generated
646
- const tagListId = this.safeId('__tag_list__')
647
-
648
- const $field = h(
649
- 'li',
650
- {
651
- staticClass: 'b-form-tags-field flex-grow-1',
652
- attrs: {
653
- role: 'none',
654
- 'aria-live': 'off',
655
- 'aria-controls': tagListId
656
- },
657
- key: 'tags_field'
658
- },
659
- [
660
- h(
661
- 'div',
662
- {
663
- staticClass: 'd-flex',
664
- attrs: { role: 'group' }
665
- },
666
- [$input, $button]
667
- )
668
- ]
669
- )
670
-
671
- // Wrap in an unordered list element (we use a list for accessibility)
672
- const $ul = h(
673
- 'ul',
674
- {
675
- staticClass: 'b-form-tags-list list-unstyled mb-0 d-flex flex-wrap align-items-center',
676
- attrs: { id: tagListId },
677
- key: 'tags_list'
678
- },
679
- [$tags, $field]
680
- )
681
-
682
- // Assemble the feedback
683
- let $feedback = h()
684
- if (invalidTagText || duplicateTagText || limitTagsText) {
685
- // Add an aria live region for the invalid/duplicate tag
686
- // messages if the user has not disabled the messages
687
- const { feedbackAriaLive: ariaLive, computedJoiner: joiner } = this
688
-
689
- // Invalid tag feedback if needed (error)
690
- let $invalid = h()
691
- if (invalidFeedbackId) {
692
- $invalid = h(
693
- BFormInvalidFeedback,
694
- {
695
- props: {
696
- id: invalidFeedbackId,
697
- ariaLive,
698
- forceShow: true
699
- },
700
- key: 'tags_invalid_feedback'
701
- },
702
- [this.invalidTagText, ': ', this.invalidTags.join(joiner)]
703
- )
704
- }
705
-
706
- // Duplicate tag feedback if needed (warning, not error)
707
- let $duplicate = h()
708
- if (duplicateFeedbackId) {
709
- $duplicate = h(
710
- BFormText,
711
- {
712
- props: {
713
- id: duplicateFeedbackId,
714
- ariaLive
715
- },
716
- key: 'tags_duplicate_feedback'
717
- },
718
- [this.duplicateTagText, ': ', this.duplicateTags.join(joiner)]
719
- )
720
- }
721
-
722
- // Limit tags feedback if needed (warning, not error)
723
- let $limit = h()
724
- if (limitFeedbackId) {
725
- $limit = h(
726
- BFormText,
727
- {
728
- props: {
729
- id: limitFeedbackId,
730
- ariaLive
731
- },
732
- key: 'tags_limit_feedback'
733
- },
734
- [limitTagsText]
735
- )
736
- }
737
-
738
- $feedback = h(
739
- 'div',
740
- {
741
- attrs: {
742
- 'aria-live': 'polite',
743
- 'aria-atomic': 'true'
744
- },
745
- key: 'tags_feedback'
746
- },
747
- [$invalid, $duplicate, $limit]
748
- )
749
- }
750
-
751
- // Return the content
752
- return [$ul, $feedback]
753
- }
754
- },
755
- render(h) {
756
- const { name, disabled, required, form, tags, computedInputId, hasFocus, noOuterFocus } = this
757
-
758
- // Scoped slot properties
759
- const scope = {
760
- // Array of tags (shallow copy to prevent mutations)
761
- tags: tags.slice(),
762
- // <input> v-bind:inputAttrs
763
- inputAttrs: this.computedInputAttrs,
764
- // We don't include this in the attrs, as users may want to override this
765
- inputType: this.computedInputType,
766
- // <input> v-on:inputHandlers
767
- inputHandlers: this.computedInputHandlers,
768
- // Methods
769
- removeTag: this.removeTag,
770
- addTag: this.addTag,
771
- reset: this.reset,
772
- // <input> :id="inputId"
773
- inputId: computedInputId,
774
- // Invalid/Duplicate state information
775
- isInvalid: this.hasInvalidTags,
776
- invalidTags: this.invalidTags.slice(),
777
- isDuplicate: this.hasDuplicateTags,
778
- duplicateTags: this.duplicateTags.slice(),
779
- isLimitReached: this.isLimitReached,
780
- // If the 'Add' button should be disabled
781
- disableAddButton: this.disableAddButton,
782
- // Pass-through props
783
- ...pick(this.$props, [
784
- 'addButtonText',
785
- 'addButtonVariant',
786
- 'disabled',
787
- 'duplicateTagText',
788
- 'form',
789
- 'inputClass',
790
- 'invalidTagText',
791
- 'limit',
792
- 'limitTagsText',
793
- 'noTagRemove',
794
- 'placeholder',
795
- 'required',
796
- 'separator',
797
- 'size',
798
- 'state',
799
- 'tagClass',
800
- 'tagPills',
801
- 'tagRemoveLabel',
802
- 'tagVariant'
803
- ])
804
- }
805
-
806
- // Generate the user interface
807
- const $content = this.normalizeSlot(SLOT_NAME_DEFAULT, scope) || this.defaultRender(scope)
808
-
809
- // Generate the `aria-live` region for the current value(s)
810
- const $output = h(
811
- 'output',
812
- {
813
- staticClass: 'sr-only',
814
- attrs: {
815
- id: this.safeId('__selected_tags__'),
816
- role: 'status',
817
- for: computedInputId,
818
- 'aria-live': hasFocus ? 'polite' : 'off',
819
- 'aria-atomic': 'true',
820
- 'aria-relevant': 'additions text'
821
- }
822
- },
823
- this.tags.join(', ')
824
- )
825
-
826
- // Removed tag live region
827
- const $removed = h(
828
- 'div',
829
- {
830
- staticClass: 'sr-only',
831
- attrs: {
832
- id: this.safeId('__removed_tags__'),
833
- role: 'status',
834
- 'aria-live': hasFocus ? 'assertive' : 'off',
835
- 'aria-atomic': 'true'
836
- }
837
- },
838
- this.removedTags.length > 0 ? `(${this.tagRemovedLabel}) ${this.removedTags.join(', ')}` : ''
839
- )
840
-
841
- // Add hidden inputs for form submission
842
- let $hidden = h()
843
- if (name && !disabled) {
844
- // We add hidden inputs for each tag if a name is provided
845
- // When there are currently no tags, a visually hidden input
846
- // with empty value is rendered for proper required handling
847
- const hasTags = tags.length > 0
848
- $hidden = (hasTags ? tags : ['']).map(tag => {
849
- return h('input', {
850
- class: { 'sr-only': !hasTags },
851
- attrs: {
852
- type: hasTags ? 'hidden' : 'text',
853
- value: tag,
854
- required,
855
- name,
856
- form
857
- },
858
- key: `tag_input_${tag}`
859
- })
860
- })
861
- }
862
-
863
- // Return the rendered output
864
- return h(
865
- 'div',
866
- {
867
- staticClass: 'b-form-tags form-control h-auto',
868
- class: [
869
- {
870
- focus: hasFocus && !noOuterFocus && !disabled,
871
- disabled
872
- },
873
- this.sizeFormClass,
874
- this.stateClass
875
- ],
876
- attrs: {
877
- id: this.safeId(),
878
- role: 'group',
879
- tabindex: disabled || noOuterFocus ? null : '-1',
880
- 'aria-describedby': this.safeId('__selected_tags__')
881
- },
882
- on: {
883
- click: this.onClick,
884
- focusin: this.onFocusin,
885
- focusout: this.onFocusout
886
- }
887
- },
888
- [$output, $removed, $content, $hidden]
889
- )
890
- }
891
- })