@gitlab/ui 131.3.0 → 131.3.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 (384) hide show
  1. package/package.json +4 -4
  2. package/src/components/utilities/truncate/truncate.scss +3 -1
  3. package/src/scss/mixins.scss +3 -1
  4. package/src/vendor/bootstrap-vue/src/components/tooltip/tooltip.js +86 -25
  5. package/tailwind.defaults.js +10 -1
  6. package/dist/charts.js +0 -13
  7. package/dist/components/base/accordion/accordion.js +0 -69
  8. package/dist/components/base/accordion/accordion_item.js +0 -160
  9. package/dist/components/base/accordion/constants.js +0 -3
  10. package/dist/components/base/alert/alert.js +0 -263
  11. package/dist/components/base/animated_icon/animated_chevron_down_up_icon.js +0 -45
  12. package/dist/components/base/animated_icon/animated_chevron_lg_down_up_icon.js +0 -45
  13. package/dist/components/base/animated_icon/animated_chevron_lg_right_down_icon.js +0 -45
  14. package/dist/components/base/animated_icon/animated_chevron_right_down_icon.js +0 -45
  15. package/dist/components/base/animated_icon/animated_duo_chat_icon.js +0 -45
  16. package/dist/components/base/animated_icon/animated_loader_icon.js +0 -45
  17. package/dist/components/base/animated_icon/animated_notifications_icon.js +0 -45
  18. package/dist/components/base/animated_icon/animated_sidebar_icon.js +0 -45
  19. package/dist/components/base/animated_icon/animated_smile_icon.js +0 -45
  20. package/dist/components/base/animated_icon/animated_sort_icon.js +0 -45
  21. package/dist/components/base/animated_icon/animated_star_icon.js +0 -45
  22. package/dist/components/base/animated_icon/animated_todo_icon.js +0 -45
  23. package/dist/components/base/animated_icon/animated_upload_icon.js +0 -45
  24. package/dist/components/base/animated_icon/base_animated_icon.js +0 -77
  25. package/dist/components/base/attribute_list/attribute_list.js +0 -100
  26. package/dist/components/base/avatar/avatar.js +0 -175
  27. package/dist/components/base/avatar/utils.js +0 -17
  28. package/dist/components/base/avatar_labeled/avatar_labeled.js +0 -198
  29. package/dist/components/base/avatar_link/avatar_link.js +0 -47
  30. package/dist/components/base/avatars_inline/avatars_inline.js +0 -139
  31. package/dist/components/base/badge/badge.js +0 -197
  32. package/dist/components/base/banner/banner.js +0 -149
  33. package/dist/components/base/breadcrumb/breadcrumb.js +0 -282
  34. package/dist/components/base/breadcrumb/breadcrumb_item.js +0 -96
  35. package/dist/components/base/broadcast_message/broadcast_message.js +0 -113
  36. package/dist/components/base/broadcast_message/constants.js +0 -5
  37. package/dist/components/base/button/button.js +0 -419
  38. package/dist/components/base/button_group/button_group.js +0 -53
  39. package/dist/components/base/card/card.js +0 -69
  40. package/dist/components/base/collapse/collapse.js +0 -163
  41. package/dist/components/base/color_mode_toggle/color_mode_toggle.js +0 -92
  42. package/dist/components/base/datepicker/datepicker.js +0 -475
  43. package/dist/components/base/daterange_picker/daterange_picker.js +0 -394
  44. package/dist/components/base/drawer/drawer.js +0 -156
  45. package/dist/components/base/dropdown/dropdown.js +0 -330
  46. package/dist/components/base/dropdown/dropdown_divider.js +0 -48
  47. package/dist/components/base/dropdown/dropdown_form.js +0 -48
  48. package/dist/components/base/dropdown/dropdown_item.js +0 -175
  49. package/dist/components/base/dropdown/dropdown_section_header.js +0 -48
  50. package/dist/components/base/dropdown/dropdown_text.js +0 -48
  51. package/dist/components/base/filtered_search/common_story_options.js +0 -14
  52. package/dist/components/base/filtered_search/filtered_search.js +0 -428
  53. package/dist/components/base/filtered_search/filtered_search_suggestion.js +0 -95
  54. package/dist/components/base/filtered_search/filtered_search_suggestion_list.js +0 -139
  55. package/dist/components/base/filtered_search/filtered_search_term.js +0 -217
  56. package/dist/components/base/filtered_search/filtered_search_token.js +0 -383
  57. package/dist/components/base/filtered_search/filtered_search_token_segment.js +0 -444
  58. package/dist/components/base/filtered_search/filtered_search_utils.js +0 -241
  59. package/dist/components/base/form/form.js +0 -43
  60. package/dist/components/base/form/form_character_count/form_character_count.js +0 -107
  61. package/dist/components/base/form/form_checkbox/form_checkbox.js +0 -342
  62. package/dist/components/base/form/form_checkbox/form_checkbox_group.js +0 -186
  63. package/dist/components/base/form/form_combobox/constants.js +0 -55
  64. package/dist/components/base/form/form_combobox/form_combobox.js +0 -239
  65. package/dist/components/base/form/form_date/form_date.js +0 -143
  66. package/dist/components/base/form/form_fields/form_field_validator.js +0 -93
  67. package/dist/components/base/form/form_fields/form_fields.js +0 -289
  68. package/dist/components/base/form/form_fields/form_fields_loop.js +0 -75
  69. package/dist/components/base/form/form_fields/mappers.js +0 -13
  70. package/dist/components/base/form/form_fields/validators.js +0 -48
  71. package/dist/components/base/form/form_group/form_group.js +0 -119
  72. package/dist/components/base/form/form_input/form_input.js +0 -695
  73. package/dist/components/base/form/form_input_group/form_input_group.js +0 -120
  74. package/dist/components/base/form/form_input_group/form_input_group_mixin.js +0 -41
  75. package/dist/components/base/form/form_radio/form_radio.js +0 -259
  76. package/dist/components/base/form/form_radio_group/form_radio_group.js +0 -187
  77. package/dist/components/base/form/form_select/constants.js +0 -12
  78. package/dist/components/base/form/form_select/form_select.js +0 -96
  79. package/dist/components/base/form/form_textarea/form_textarea.js +0 -166
  80. package/dist/components/base/form/input_group_text/input_group_text.js +0 -43
  81. package/dist/components/base/icon/icon.js +0 -113
  82. package/dist/components/base/illustration/illustration.js +0 -80
  83. package/dist/components/base/infinite_scroll/infinite_scroll.js +0 -196
  84. package/dist/components/base/keyset_pagination/keyset_pagination.js +0 -152
  85. package/dist/components/base/label/label.js +0 -174
  86. package/dist/components/base/link/link.js +0 -332
  87. package/dist/components/base/loading_icon/loading_icon.js +0 -120
  88. package/dist/components/base/markdown/markdown.js +0 -50
  89. package/dist/components/base/modal/modal.js +0 -259
  90. package/dist/components/base/new_dropdowns/base_dropdown/base_dropdown.js +0 -716
  91. package/dist/components/base/new_dropdowns/base_dropdown/constants.js +0 -5
  92. package/dist/components/base/new_dropdowns/base_dropdown/dropdown_container.js +0 -32
  93. package/dist/components/base/new_dropdowns/constants.js +0 -24
  94. package/dist/components/base/new_dropdowns/disclosure/constants.js +0 -8
  95. package/dist/components/base/new_dropdowns/disclosure/disclosure_dropdown.js +0 -400
  96. package/dist/components/base/new_dropdowns/disclosure/disclosure_dropdown_group.js +0 -112
  97. package/dist/components/base/new_dropdowns/disclosure/disclosure_dropdown_item.js +0 -196
  98. package/dist/components/base/new_dropdowns/disclosure/mock_data.js +0 -168
  99. package/dist/components/base/new_dropdowns/disclosure/utils.js +0 -84
  100. package/dist/components/base/new_dropdowns/listbox/listbox.js +0 -997
  101. package/dist/components/base/new_dropdowns/listbox/listbox_group.js +0 -58
  102. package/dist/components/base/new_dropdowns/listbox/listbox_item.js +0 -112
  103. package/dist/components/base/new_dropdowns/listbox/listbox_search_input.js +0 -94
  104. package/dist/components/base/new_dropdowns/listbox/mock_data.js +0 -131
  105. package/dist/components/base/new_dropdowns/listbox/utils.js +0 -33
  106. package/dist/components/base/pagination/pagination.js +0 -397
  107. package/dist/components/base/path/data.js +0 -34
  108. package/dist/components/base/path/path.js +0 -177
  109. package/dist/components/base/popover/popover.js +0 -142
  110. package/dist/components/base/progress_bar/progress_bar.js +0 -117
  111. package/dist/components/base/search_box_by_click/search_box_by_click.js +0 -245
  112. package/dist/components/base/search_box_by_type/search_box_by_type.js +0 -187
  113. package/dist/components/base/segmented_control/segmented_control.js +0 -73
  114. package/dist/components/base/skeleton_loader/skeleton_loader.js +0 -232
  115. package/dist/components/base/sorting/sorting.js +0 -180
  116. package/dist/components/base/table/constants.js +0 -5
  117. package/dist/components/base/table/table.js +0 -187
  118. package/dist/components/base/table_lite/table_lite.js +0 -80
  119. package/dist/components/base/tabs/constants.js +0 -3
  120. package/dist/components/base/tabs/tab/tab.js +0 -113
  121. package/dist/components/base/tabs/tabs/scrollable_tabs.js +0 -162
  122. package/dist/components/base/tabs/tabs/tabs.js +0 -223
  123. package/dist/components/base/toast/index.js +0 -66
  124. package/dist/components/base/toast/toast.js +0 -125
  125. package/dist/components/base/toast/toaster.js +0 -87
  126. package/dist/components/base/toggle/toggle.js +0 -178
  127. package/dist/components/base/token/token.js +0 -97
  128. package/dist/components/base/token_selector/helpers.js +0 -5
  129. package/dist/components/base/token_selector/token_container.js +0 -160
  130. package/dist/components/base/token_selector/token_selector.js +0 -454
  131. package/dist/components/base/token_selector/token_selector_dropdown.js +0 -223
  132. package/dist/components/base/tooltip/tooltip.js +0 -54
  133. package/dist/components/charts/area/area.js +0 -329
  134. package/dist/components/charts/bar/bar.js +0 -207
  135. package/dist/components/charts/chart/chart.js +0 -215
  136. package/dist/components/charts/column/column.js +0 -221
  137. package/dist/components/charts/discrete_scatter/discrete_scatter.js +0 -199
  138. package/dist/components/charts/gauge/gauge.js +0 -205
  139. package/dist/components/charts/heatmap/heatmap.js +0 -299
  140. package/dist/components/charts/heatmap/index.js +0 -2
  141. package/dist/components/charts/legend/legend.js +0 -245
  142. package/dist/components/charts/line/line.js +0 -340
  143. package/dist/components/charts/series_label/series_label.js +0 -101
  144. package/dist/components/charts/shared/tooltip/tooltip.js +0 -369
  145. package/dist/components/charts/shared/tooltip/tooltip_default_format/tooltip_default_format.js +0 -53
  146. package/dist/components/charts/single_stat/single_stat.js +0 -164
  147. package/dist/components/charts/sparkline/sparkline.js +0 -299
  148. package/dist/components/charts/stacked_column/stacked_column.js +0 -380
  149. package/dist/components/dashboards/dashboard_layout/dashboard_layout.js +0 -125
  150. package/dist/components/dashboards/dashboard_layout/grid_layout/grid_layout.js +0 -326
  151. package/dist/components/dashboards/dashboard_layout/validators.js +0 -14
  152. package/dist/components/dashboards/dashboard_panel/dashboard_panel.js +0 -236
  153. package/dist/components/dashboards/mock_data.js +0 -49
  154. package/dist/components/experimental/experiment_badge/constants.js +0 -4
  155. package/dist/components/experimental/experiment_badge/experiment_badge.js +0 -102
  156. package/dist/components/extended/multi_step_form_template/multi_step_form_template.js +0 -87
  157. package/dist/components/index.js +0 -107
  158. package/dist/components/mixins/button_mixin.js +0 -11
  159. package/dist/components/mixins/safe_link_mixin.js +0 -30
  160. package/dist/components/mixins/tooltip_mixin.js +0 -21
  161. package/dist/components/regions/dashboard_skeleton/dashboard_skeleton.js +0 -53
  162. package/dist/components/regions/empty_state/empty_state.js +0 -181
  163. package/dist/components/shared_components/clear_icon_button/clear_icon_button.js +0 -64
  164. package/dist/components/shared_components/clipboard_button/clipboard_button.js +0 -100
  165. package/dist/components/shared_components/close_button/close_button.js +0 -55
  166. package/dist/components/utilities/animated_number/animated_number.js +0 -131
  167. package/dist/components/utilities/friendly_wrap/friendly_wrap.js +0 -75
  168. package/dist/components/utilities/intersection_observer/intersection_observer.js +0 -88
  169. package/dist/components/utilities/intersperse/intersperse.js +0 -104
  170. package/dist/components/utilities/sprintf/sprintf.js +0 -171
  171. package/dist/components/utilities/truncate/constants.js +0 -8
  172. package/dist/components/utilities/truncate/truncate.js +0 -154
  173. package/dist/components/utilities/truncate_text/constants.js +0 -7
  174. package/dist/components/utilities/truncate_text/truncate_text.js +0 -146
  175. package/dist/config.js +0 -53
  176. package/dist/directives/hover_load/hover_load.js +0 -45
  177. package/dist/directives/index.js +0 -8
  178. package/dist/directives/modal.js +0 -1
  179. package/dist/directives/outside/outside.js +0 -149
  180. package/dist/directives/resize_observer/resize_observer.js +0 -58
  181. package/dist/directives/safe_html/constants.js +0 -6
  182. package/dist/directives/safe_html/safe_html.js +0 -39
  183. package/dist/directives/safe_link/mock_data.js +0 -10
  184. package/dist/directives/safe_link/safe_link.js +0 -67
  185. package/dist/directives/tooltip/container.js +0 -7
  186. package/dist/directives/tooltip/tooltip.js +0 -18
  187. package/dist/index.css +0 -7
  188. package/dist/index.css.map +0 -1
  189. package/dist/index.js +0 -2
  190. package/dist/tailwind.css +0 -2
  191. package/dist/tailwind.css.map +0 -1
  192. package/dist/tokens/build/js/tokens.dark.js +0 -1410
  193. package/dist/tokens/build/js/tokens.js +0 -1410
  194. package/dist/tokens/common_story_options.js +0 -29
  195. package/dist/tokens/tokens_story.js +0 -76
  196. package/dist/utils/breakpoints.js +0 -20
  197. package/dist/utils/charts/config.js +0 -616
  198. package/dist/utils/charts/constants.js +0 -69
  199. package/dist/utils/charts/mock_data.js +0 -191
  200. package/dist/utils/charts/story_config.js +0 -24
  201. package/dist/utils/charts/theme.js +0 -200
  202. package/dist/utils/charts/utils.js +0 -54
  203. package/dist/utils/constants.js +0 -333
  204. package/dist/utils/data_utils.js +0 -19
  205. package/dist/utils/datetime_utility.js +0 -61
  206. package/dist/utils/equality_utils.js +0 -84
  207. package/dist/utils/i18n.js +0 -65
  208. package/dist/utils/is_slot_empty.js +0 -34
  209. package/dist/utils/number_utils.js +0 -132
  210. package/dist/utils/play_utils.js +0 -11
  211. package/dist/utils/set_utils.js +0 -25
  212. package/dist/utils/stories_constants.js +0 -29
  213. package/dist/utils/stories_utils.js +0 -62
  214. package/dist/utils/story_decorators/container.js +0 -19
  215. package/dist/utils/string_utils.js +0 -69
  216. package/dist/utils/svgs/svg_paths.js +0 -7
  217. package/dist/utils/test_utils.js +0 -33
  218. package/dist/utils/use_fake_date.js +0 -29
  219. package/dist/utils/use_mock_intersection_observer.js +0 -105
  220. package/dist/utils/utils.js +0 -205
  221. package/dist/utils.js +0 -5
  222. package/dist/vendor/bootstrap-vue/src/bv-config.js +0 -8
  223. package/dist/vendor/bootstrap-vue/src/components/button/button-close.js +0 -81
  224. package/dist/vendor/bootstrap-vue/src/components/button/button.js +0 -204
  225. package/dist/vendor/bootstrap-vue/src/components/button/index.js +0 -2
  226. package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-divider.js +0 -41
  227. package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-form.js +0 -52
  228. package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-group.js +0 -75
  229. package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-header.js +0 -52
  230. package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-item-button.js +0 -85
  231. package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-item.js +0 -97
  232. package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-text.js +0 -60
  233. package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown.js +0 -271
  234. package/dist/vendor/bootstrap-vue/src/components/dropdown/index.js +0 -8
  235. package/dist/vendor/bootstrap-vue/src/components/form/form-invalid-feedback.js +0 -53
  236. package/dist/vendor/bootstrap-vue/src/components/form/form-text.js +0 -55
  237. package/dist/vendor/bootstrap-vue/src/components/form/form-valid-feedback.js +0 -53
  238. package/dist/vendor/bootstrap-vue/src/components/form/form.js +0 -56
  239. package/dist/vendor/bootstrap-vue/src/components/form/index.js +0 -4
  240. package/dist/vendor/bootstrap-vue/src/components/form-group/form-group.js +0 -348
  241. package/dist/vendor/bootstrap-vue/src/components/form-group/index.js +0 -1
  242. package/dist/vendor/bootstrap-vue/src/components/form-select/form-select-option-group.js +0 -54
  243. package/dist/vendor/bootstrap-vue/src/components/form-select/form-select-option.js +0 -41
  244. package/dist/vendor/bootstrap-vue/src/components/form-select/form-select.js +0 -143
  245. package/dist/vendor/bootstrap-vue/src/components/form-select/helpers/mixin-options.js +0 -56
  246. package/dist/vendor/bootstrap-vue/src/components/form-select/index.js +0 -3
  247. package/dist/vendor/bootstrap-vue/src/components/form-textarea/form-textarea.js +0 -217
  248. package/dist/vendor/bootstrap-vue/src/components/form-textarea/index.js +0 -1
  249. package/dist/vendor/bootstrap-vue/src/components/layout/col.js +0 -156
  250. package/dist/vendor/bootstrap-vue/src/components/layout/form-row.js +0 -34
  251. package/dist/vendor/bootstrap-vue/src/components/layout/index.js +0 -2
  252. package/dist/vendor/bootstrap-vue/src/components/link/index.js +0 -1
  253. package/dist/vendor/bootstrap-vue/src/components/link/link.js +0 -283
  254. package/dist/vendor/bootstrap-vue/src/components/modal/helpers/bv-modal-event.class.js +0 -21
  255. package/dist/vendor/bootstrap-vue/src/components/modal/helpers/modal-manager.js +0 -212
  256. package/dist/vendor/bootstrap-vue/src/components/modal/index.js +0 -1
  257. package/dist/vendor/bootstrap-vue/src/components/modal/modal.js +0 -887
  258. package/dist/vendor/bootstrap-vue/src/components/popover/helpers/bv-popover-template.js +0 -55
  259. package/dist/vendor/bootstrap-vue/src/components/popover/helpers/bv-popover.js +0 -31
  260. package/dist/vendor/bootstrap-vue/src/components/popover/index.js +0 -1
  261. package/dist/vendor/bootstrap-vue/src/components/popover/popover.js +0 -49
  262. package/dist/vendor/bootstrap-vue/src/components/table/helpers/constants.js +0 -22
  263. package/dist/vendor/bootstrap-vue/src/components/table/helpers/default-sort-compare.js +0 -64
  264. package/dist/vendor/bootstrap-vue/src/components/table/helpers/filter-event.js +0 -40
  265. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-bottom-row.js +0 -43
  266. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-busy.js +0 -83
  267. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-caption.js +0 -50
  268. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-colgroup.js +0 -32
  269. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-empty.js +0 -82
  270. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-filtering.js +0 -274
  271. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-items.js +0 -154
  272. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-pagination.js +0 -44
  273. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-provider.js +0 -191
  274. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-selectable.js +0 -213
  275. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-sorting.js +0 -275
  276. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-stacked.js +0 -39
  277. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-table-renderer.js +0 -186
  278. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-tbody-row.js +0 -338
  279. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-tbody.js +0 -243
  280. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-tfoot.js +0 -50
  281. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-thead.js +0 -218
  282. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-top-row.js +0 -42
  283. package/dist/vendor/bootstrap-vue/src/components/table/helpers/normalize-fields.js +0 -86
  284. package/dist/vendor/bootstrap-vue/src/components/table/helpers/sanitize-row.js +0 -32
  285. package/dist/vendor/bootstrap-vue/src/components/table/helpers/stringify-record-values.js +0 -11
  286. package/dist/vendor/bootstrap-vue/src/components/table/helpers/text-selection-active.js +0 -14
  287. package/dist/vendor/bootstrap-vue/src/components/table/index.js +0 -9
  288. package/dist/vendor/bootstrap-vue/src/components/table/table-lite.js +0 -51
  289. package/dist/vendor/bootstrap-vue/src/components/table/table-simple.js +0 -44
  290. package/dist/vendor/bootstrap-vue/src/components/table/table.js +0 -67
  291. package/dist/vendor/bootstrap-vue/src/components/table/tbody.js +0 -116
  292. package/dist/vendor/bootstrap-vue/src/components/table/td.js +0 -204
  293. package/dist/vendor/bootstrap-vue/src/components/table/tfoot.js +0 -96
  294. package/dist/vendor/bootstrap-vue/src/components/table/th.js +0 -26
  295. package/dist/vendor/bootstrap-vue/src/components/table/thead.js +0 -99
  296. package/dist/vendor/bootstrap-vue/src/components/table/tr.js +0 -121
  297. package/dist/vendor/bootstrap-vue/src/components/tabs/index.js +0 -2
  298. package/dist/vendor/bootstrap-vue/src/components/tabs/tab.js +0 -238
  299. package/dist/vendor/bootstrap-vue/src/components/tabs/tabs.js +0 -601
  300. package/dist/vendor/bootstrap-vue/src/components/tooltip/helpers/bv-popper.js +0 -251
  301. package/dist/vendor/bootstrap-vue/src/components/tooltip/helpers/bv-tooltip-template.js +0 -118
  302. package/dist/vendor/bootstrap-vue/src/components/tooltip/helpers/bv-tooltip.js +0 -932
  303. package/dist/vendor/bootstrap-vue/src/components/tooltip/index.js +0 -1
  304. package/dist/vendor/bootstrap-vue/src/components/tooltip/tooltip.js +0 -269
  305. package/dist/vendor/bootstrap-vue/src/components/transition/bv-transition.js +0 -103
  306. package/dist/vendor/bootstrap-vue/src/components/transporter/transporter.js +0 -205
  307. package/dist/vendor/bootstrap-vue/src/constants/components.js +0 -55
  308. package/dist/vendor/bootstrap-vue/src/constants/config.js +0 -11
  309. package/dist/vendor/bootstrap-vue/src/constants/env.js +0 -36
  310. package/dist/vendor/bootstrap-vue/src/constants/events.js +0 -56
  311. package/dist/vendor/bootstrap-vue/src/constants/key-codes.js +0 -11
  312. package/dist/vendor/bootstrap-vue/src/constants/popper.js +0 -10
  313. package/dist/vendor/bootstrap-vue/src/constants/props.js +0 -24
  314. package/dist/vendor/bootstrap-vue/src/constants/regex.js +0 -35
  315. package/dist/vendor/bootstrap-vue/src/constants/safe-types.js +0 -15
  316. package/dist/vendor/bootstrap-vue/src/constants/slots.js +0 -36
  317. package/dist/vendor/bootstrap-vue/src/directives/modal/index.js +0 -1
  318. package/dist/vendor/bootstrap-vue/src/directives/modal/modal.js +0 -112
  319. package/dist/vendor/bootstrap-vue/src/directives/tooltip/index.js +0 -1
  320. package/dist/vendor/bootstrap-vue/src/directives/tooltip/tooltip.js +0 -265
  321. package/dist/vendor/bootstrap-vue/src/directives/visible/index.js +0 -1
  322. package/dist/vendor/bootstrap-vue/src/directives/visible/visible.js +0 -187
  323. package/dist/vendor/bootstrap-vue/src/mixins/attrs.js +0 -5
  324. package/dist/vendor/bootstrap-vue/src/mixins/click-out.js +0 -54
  325. package/dist/vendor/bootstrap-vue/src/mixins/dropdown.js +0 -470
  326. package/dist/vendor/bootstrap-vue/src/mixins/focus-in.js +0 -46
  327. package/dist/vendor/bootstrap-vue/src/mixins/form-control.js +0 -73
  328. package/dist/vendor/bootstrap-vue/src/mixins/form-custom.js +0 -26
  329. package/dist/vendor/bootstrap-vue/src/mixins/form-options.js +0 -91
  330. package/dist/vendor/bootstrap-vue/src/mixins/form-selection.js +0 -62
  331. package/dist/vendor/bootstrap-vue/src/mixins/form-size.js +0 -26
  332. package/dist/vendor/bootstrap-vue/src/mixins/form-state.js +0 -50
  333. package/dist/vendor/bootstrap-vue/src/mixins/form-text.js +0 -293
  334. package/dist/vendor/bootstrap-vue/src/mixins/form-validity.js +0 -50
  335. package/dist/vendor/bootstrap-vue/src/mixins/has-listener.js +0 -29
  336. package/dist/vendor/bootstrap-vue/src/mixins/id.js +0 -57
  337. package/dist/vendor/bootstrap-vue/src/mixins/listen-on-document.js +0 -63
  338. package/dist/vendor/bootstrap-vue/src/mixins/listen-on-root.js +0 -121
  339. package/dist/vendor/bootstrap-vue/src/mixins/listen-on-window.js +0 -63
  340. package/dist/vendor/bootstrap-vue/src/mixins/listeners.js +0 -25
  341. package/dist/vendor/bootstrap-vue/src/mixins/model.js +0 -10
  342. package/dist/vendor/bootstrap-vue/src/mixins/normalize-slot.js +0 -30
  343. package/dist/vendor/bootstrap-vue/src/mixins/scoped-style.js +0 -18
  344. package/dist/vendor/bootstrap-vue/src/mixins/use-parent.js +0 -14
  345. package/dist/vendor/bootstrap-vue/src/utils/array.js +0 -28
  346. package/dist/vendor/bootstrap-vue/src/utils/bv-event.class.js +0 -60
  347. package/dist/vendor/bootstrap-vue/src/utils/cache.js +0 -60
  348. package/dist/vendor/bootstrap-vue/src/utils/clone-deep.js +0 -18
  349. package/dist/vendor/bootstrap-vue/src/utils/config-set.js +0 -86
  350. package/dist/vendor/bootstrap-vue/src/utils/config.js +0 -71
  351. package/dist/vendor/bootstrap-vue/src/utils/create-new-child-component.js +0 -133
  352. package/dist/vendor/bootstrap-vue/src/utils/css-escape.js +0 -70
  353. package/dist/vendor/bootstrap-vue/src/utils/dom.js +0 -298
  354. package/dist/vendor/bootstrap-vue/src/utils/element-to-vue-instance-registry.js +0 -28
  355. package/dist/vendor/bootstrap-vue/src/utils/env.js +0 -16
  356. package/dist/vendor/bootstrap-vue/src/utils/events.js +0 -78
  357. package/dist/vendor/bootstrap-vue/src/utils/get-event-root.js +0 -5
  358. package/dist/vendor/bootstrap-vue/src/utils/get-instance-from-directive.js +0 -3
  359. package/dist/vendor/bootstrap-vue/src/utils/get-scope-id.js +0 -9
  360. package/dist/vendor/bootstrap-vue/src/utils/get.js +0 -63
  361. package/dist/vendor/bootstrap-vue/src/utils/html.js +0 -16
  362. package/dist/vendor/bootstrap-vue/src/utils/identity.js +0 -3
  363. package/dist/vendor/bootstrap-vue/src/utils/inspect.js +0 -35
  364. package/dist/vendor/bootstrap-vue/src/utils/locale.js +0 -19
  365. package/dist/vendor/bootstrap-vue/src/utils/loose-equal.js +0 -59
  366. package/dist/vendor/bootstrap-vue/src/utils/loose-index-of.js +0 -13
  367. package/dist/vendor/bootstrap-vue/src/utils/math.js +0 -9
  368. package/dist/vendor/bootstrap-vue/src/utils/memoize.js +0 -14
  369. package/dist/vendor/bootstrap-vue/src/utils/model.js +0 -33
  370. package/dist/vendor/bootstrap-vue/src/utils/noop.js +0 -3
  371. package/dist/vendor/bootstrap-vue/src/utils/normalize-slot.js +0 -51
  372. package/dist/vendor/bootstrap-vue/src/utils/number.js +0 -23
  373. package/dist/vendor/bootstrap-vue/src/utils/object.js +0 -72
  374. package/dist/vendor/bootstrap-vue/src/utils/observe-dom.js +0 -76
  375. package/dist/vendor/bootstrap-vue/src/utils/on-instance-destroy.js +0 -22
  376. package/dist/vendor/bootstrap-vue/src/utils/plugins.js +0 -124
  377. package/dist/vendor/bootstrap-vue/src/utils/props.js +0 -67
  378. package/dist/vendor/bootstrap-vue/src/utils/router.js +0 -150
  379. package/dist/vendor/bootstrap-vue/src/utils/safe-vue-instance.js +0 -14
  380. package/dist/vendor/bootstrap-vue/src/utils/stable-sort.js +0 -28
  381. package/dist/vendor/bootstrap-vue/src/utils/string.js +0 -47
  382. package/dist/vendor/bootstrap-vue/src/utils/stringify-object-values.js +0 -31
  383. package/dist/vendor/bootstrap-vue/src/utils/warn.js +0 -45
  384. package/dist/vendor/bootstrap-vue/src/vue.js +0 -55
@@ -1,932 +0,0 @@
1
- import { extend, COMPONENT_UID_KEY } from '../../../vue';
2
- import { NAME_MODAL, NAME_TOOLTIP_HELPER } from '../../../constants/components';
3
- import { EVENT_NAME_HIDDEN, EVENT_NAME_SHOW, EVENT_NAME_SHOWN, EVENT_NAME_HIDE, EVENT_NAME_FOCUSIN, EVENT_NAME_FOCUSOUT, EVENT_NAME_MOUSEENTER, EVENT_NAME_MOUSELEAVE, EVENT_NAME_ENABLED, EVENT_NAME_DISABLED, EVENT_OPTIONS_NO_CAPTURE, EVENT_NAME_DISABLE, EVENT_NAME_ENABLE } from '../../../constants/events';
4
- import { onInstanceDestroy } from '../../../utils/on-instance-destroy';
5
- import { useParentMixin } from '../../../mixins/use-parent';
6
- import { concat, arrayIncludes, from } from '../../../utils/array';
7
- import { getInstanceFromElement } from '../../../utils/element-to-vue-instance-registry';
8
- import { requestAF, contains, isVisible, getById, isElement, closest, hasClass, select, getAttr, setAttr, removeAttr, hasAttr, isDisabled, attemptFocus } from '../../../utils/dom';
9
- import { getRootEventName, eventOn, eventOff, getRootActionEventName, eventOnOff } from '../../../utils/events';
10
- import { getScopeId } from '../../../utils/get-scope-id';
11
- import { identity } from '../../../utils/identity';
12
- import { isPlainObject, isNumber, isString, isUndefined, isUndefinedOrNull, isFunction } from '../../../utils/inspect';
13
- import { looseEqual } from '../../../utils/loose-equal';
14
- import { mathMax } from '../../../utils/math';
15
- import { noop } from '../../../utils/noop';
16
- import { toInteger } from '../../../utils/number';
17
- import { keys } from '../../../utils/object';
18
- import { warn } from '../../../utils/warn';
19
- import { BvEvent } from '../../../utils/bv-event.class';
20
- import { createNewChildComponent, eventProp } from '../../../utils/create-new-child-component';
21
- import { listenOnRootMixin } from '../../../mixins/listen-on-root';
22
- import { BVTooltipTemplate } from './bv-tooltip-template';
23
-
24
- // Tooltip "Class" (Built as a renderless Vue instance)
25
- //
26
- // Handles trigger events, etc.
27
- // Instantiates template on demand
28
-
29
-
30
- // --- Constants ---
31
-
32
- // Modal container selector for appending tooltip/popover
33
- const MODAL_SELECTOR = '.modal-content';
34
-
35
- // Modal `$root` hidden event
36
- const ROOT_EVENT_NAME_MODAL_HIDDEN = getRootEventName(NAME_MODAL, EVENT_NAME_HIDDEN);
37
-
38
- // For finding the container to append to
39
- const CONTAINER_SELECTOR = MODAL_SELECTOR;
40
-
41
- // For dropdown sniffing
42
- const DROPDOWN_CLASS = 'dropdown';
43
- const DROPDOWN_OPEN_SELECTOR = '.dropdown-menu.show';
44
-
45
- // Data attribute to temporary store the `title` attribute's value
46
- const DATA_TITLE_ATTR = 'data-original-title';
47
-
48
- // Data specific to popper and template
49
- // We don't use props, as we need reactivity (we can't pass reactive props)
50
- const templateData = {
51
- // Text string or Scoped slot function
52
- title: '',
53
- // Text string or Scoped slot function
54
- content: '',
55
- // String
56
- variant: null,
57
- // String, Array, Object
58
- customClass: null,
59
- // String or array of Strings (overwritten by BVPopper)
60
- triggers: '',
61
- // String (overwritten by BVPopper)
62
- placement: 'auto',
63
- // String or array of strings
64
- fallbackPlacement: 'flip',
65
- // Element or Component reference (or function that returns element) of
66
- // the element that will have the trigger events bound, and is also
67
- // default element for positioning
68
- target: null,
69
- // HTML ID, Element or Component reference
70
- container: null,
71
- // 'body'
72
- // Boolean
73
- noFade: false,
74
- // 'scrollParent', 'viewport', 'window', Element, or Component reference
75
- boundary: 'scrollParent',
76
- // Tooltip/popover will try and stay away from
77
- // boundary edge by this many pixels (Number)
78
- boundaryPadding: 5,
79
- // Arrow offset (Number)
80
- offset: 0,
81
- // Hover/focus delay (Number or Object)
82
- delay: 0,
83
- // Arrow of Tooltip/popover will try and stay away from
84
- // the edge of tooltip/popover edge by this many pixels
85
- arrowPadding: 6,
86
- // Interactive state (Boolean)
87
- interactive: true,
88
- // Disabled state (Boolean)
89
- disabled: false,
90
- // ID to use for tooltip/popover
91
- id: null,
92
- // Flag used by directives only, for HTML content
93
- html: false
94
- };
95
-
96
- // --- Main component ---
97
-
98
- // @vue/component
99
- const BVTooltip = /*#__PURE__*/extend({
100
- name: NAME_TOOLTIP_HELPER,
101
- mixins: [listenOnRootMixin, useParentMixin],
102
- data() {
103
- return {
104
- // BTooltip/BPopover/VBTooltip will update this data
105
- // Via the exposed updateData() method on this instance
106
- // BVPopover will override some of these defaults
107
- ...templateData,
108
- // State management data
109
- activeTrigger: {
110
- // manual: false,
111
- hover: false,
112
- click: false,
113
- focus: false
114
- },
115
- localShow: false
116
- };
117
- },
118
- computed: {
119
- templateType() {
120
- // Overwritten by BVPopover
121
- return 'tooltip';
122
- },
123
- computedId() {
124
- return this.id || `__bv_${this.templateType}_${this[COMPONENT_UID_KEY]}__`;
125
- },
126
- computedDelay() {
127
- // Normalizes delay into object form
128
- const delay = {
129
- show: 0,
130
- hide: 0
131
- };
132
- if (isPlainObject(this.delay)) {
133
- delay.show = mathMax(toInteger(this.delay.show, 0), 0);
134
- delay.hide = mathMax(toInteger(this.delay.hide, 0), 0);
135
- } else if (isNumber(this.delay) || isString(this.delay)) {
136
- delay.show = delay.hide = mathMax(toInteger(this.delay, 0), 0);
137
- }
138
- return delay;
139
- },
140
- computedTriggers() {
141
- // Returns the triggers in sorted array form
142
- // TODO: Switch this to object form for easier lookup
143
- return concat(this.triggers).filter(identity).join(' ').trim().toLowerCase().split(/\s+/).sort();
144
- },
145
- isWithActiveTrigger() {
146
- for (const trigger in this.activeTrigger) {
147
- if (this.activeTrigger[trigger]) {
148
- return true;
149
- }
150
- }
151
- return false;
152
- },
153
- computedTemplateData() {
154
- const {
155
- title,
156
- content,
157
- variant,
158
- customClass,
159
- noFade,
160
- interactive
161
- } = this;
162
- return {
163
- title,
164
- content,
165
- variant,
166
- customClass,
167
- noFade,
168
- interactive
169
- };
170
- }
171
- },
172
- watch: {
173
- computedTriggers(newTriggers, oldTriggers) {
174
- // Triggers have changed, so re-register them
175
- /* istanbul ignore next */
176
- if (!looseEqual(newTriggers, oldTriggers)) {
177
- this.$nextTick(() => {
178
- // Disable trigger listeners
179
- this.unListen();
180
- // Clear any active triggers that are no longer in the list of triggers
181
- oldTriggers.forEach(trigger => {
182
- if (!arrayIncludes(newTriggers, trigger)) {
183
- if (this.activeTrigger[trigger]) {
184
- this.activeTrigger[trigger] = false;
185
- }
186
- }
187
- });
188
- // Re-enable the trigger listeners
189
- this.listen();
190
- });
191
- }
192
- },
193
- computedTemplateData() {
194
- // If any of the while open reactive "props" change,
195
- // ensure that the template updates accordingly
196
- this.handleTemplateUpdate();
197
- },
198
- title(newValue, oldValue) {
199
- // Make sure to hide the tooltip when the title is set empty
200
- if (newValue !== oldValue && !newValue) {
201
- this.hide();
202
- }
203
- },
204
- disabled(newValue) {
205
- if (newValue) {
206
- this.disable();
207
- } else {
208
- this.enable();
209
- }
210
- }
211
- },
212
- created() {
213
- // Create non-reactive properties
214
- this.$_tip = null;
215
- this.$_hoverTimeout = null;
216
- this.$_hoverState = '';
217
- this.$_visibleInterval = null;
218
- this.$_enabled = !this.disabled;
219
- this.$_noop = noop.bind(this);
220
-
221
- // Destroy ourselves when the parent is destroyed
222
- if (this.bvParent) {
223
- onInstanceDestroy(this.bvParent, () => {
224
- this.$nextTick(() => {
225
- // In a `requestAF()` to release control back to application
226
- requestAF(() => {
227
- this.$destroy();
228
- });
229
- });
230
- });
231
- }
232
- this.$nextTick(() => {
233
- const target = this.getTarget();
234
- if (target && contains(document.body, target)) {
235
- // Copy the parent's scoped style attribute
236
- this.scopeId = getScopeId(this.bvParent);
237
- // Set up all trigger handlers and listeners
238
- this.listen();
239
- } else {
240
- /* istanbul ignore next */
241
- warn(isString(this.target) ? `Unable to find target element by ID "#${this.target}" in document.` : 'The provided target is no valid HTML element.', this.templateType);
242
- }
243
- });
244
- },
245
- /* istanbul ignore next */
246
- updated() {
247
- // Usually called when the slots/data changes
248
- this.$nextTick(this.handleTemplateUpdate);
249
- },
250
- /* istanbul ignore next */
251
- deactivated() {
252
- // In a keepalive that has been deactivated, so hide
253
- // the tooltip/popover if it is showing
254
- this.forceHide();
255
- },
256
- beforeDestroy() {
257
- // Remove all handler/listeners
258
- this.unListen();
259
- this.setWhileOpenListeners(false);
260
- // Clear any timeouts/intervals
261
- this.clearHoverTimeout();
262
- this.clearVisibilityInterval();
263
- // Destroy the template
264
- this.destroyTemplate();
265
- // Remove any other private properties created during create
266
- this.$_noop = null;
267
- },
268
- methods: {
269
- // --- Methods for creating and destroying the template ---
270
- getTemplate() {
271
- // Overridden by BVPopover
272
- return BVTooltipTemplate;
273
- },
274
- updateData() {
275
- let data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
276
- // Method for updating popper/template data
277
- // We only update data if it exists, and has not changed
278
- let titleUpdated = false;
279
- keys(templateData).forEach(prop => {
280
- if (!isUndefined(data[prop]) && this[prop] !== data[prop]) {
281
- this[prop] = data[prop];
282
- if (prop === 'title') {
283
- titleUpdated = true;
284
- }
285
- }
286
- });
287
- // If the title has updated, we may need to handle the `title`
288
- // attribute on the trigger target
289
- // We only do this while the template is open
290
- if (titleUpdated && this.localShow) {
291
- this.fixTitle();
292
- }
293
- },
294
- createTemplateAndShow() {
295
- // Creates the template instance and show it
296
- const container = this.getContainer();
297
- const Template = this.getTemplate();
298
- const $tip = this.$_tip = createNewChildComponent(this, Template, {
299
- // The following is not reactive to changes in the props data
300
- propsData: {
301
- // These values cannot be changed while template is showing
302
- id: this.computedId,
303
- html: this.html,
304
- placement: this.placement,
305
- fallbackPlacement: this.fallbackPlacement,
306
- target: this.getPlacementTarget(),
307
- boundary: this.getBoundary(),
308
- // Ensure the following are integers
309
- offset: toInteger(this.offset, 0),
310
- arrowPadding: toInteger(this.arrowPadding, 0),
311
- boundaryPadding: toInteger(this.boundaryPadding, 0),
312
- // Template transition phase events (handled once only)
313
- [eventProp(EVENT_NAME_SHOW, {
314
- once: true
315
- })]: this.onTemplateShow,
316
- [eventProp(EVENT_NAME_SHOWN, {
317
- once: true
318
- })]: this.onTemplateShown,
319
- [eventProp(EVENT_NAME_HIDE, {
320
- once: true
321
- })]: this.onTemplateHide,
322
- [eventProp(EVENT_NAME_HIDDEN, {
323
- once: true
324
- })]: this.onTemplateHidden,
325
- // Convenience events from template
326
- [eventProp(EVENT_NAME_FOCUSIN)]: this.handleEvent,
327
- [eventProp(EVENT_NAME_FOCUSOUT)]: this.handleEvent,
328
- [eventProp(EVENT_NAME_MOUSEENTER)]: this.handleEvent,
329
- [eventProp(EVENT_NAME_MOUSELEAVE)]: this.handleEvent
330
- }
331
- });
332
- // We set the initial reactive data (values that can be changed while open)
333
- this.handleTemplateUpdate();
334
- // When the template gets destroyed for any reason
335
- onInstanceDestroy($tip, this.destroyTemplate);
336
- // Mount (which triggers the `show`)
337
- $tip.$mount(container.appendChild(document.createElement('div')));
338
- // Template will automatically remove its markup from DOM when hidden
339
- },
340
- hideTemplate() {
341
- // Trigger the template to start hiding
342
- // The template will emit the `hide` event after this and
343
- // then emit the `hidden` event once it is fully hidden
344
- // The `hook:destroyed` will also be called (safety measure)
345
- this.$_tip && this.$_tip.hide();
346
- // Clear out any stragging active triggers
347
- this.clearActiveTriggers();
348
- // Reset the hover state
349
- this.$_hoverState = '';
350
- },
351
- // Destroy the template instance and reset state
352
- destroyTemplate() {
353
- this.setWhileOpenListeners(false);
354
- this.clearHoverTimeout();
355
- this.$_hoverState = '';
356
- this.clearActiveTriggers();
357
- this.localPlacementTarget = null;
358
- try {
359
- this.$_tip.$destroy();
360
- } catch {}
361
- this.$_tip = null;
362
- this.removeAriaDescribedby();
363
- this.restoreTitle();
364
- this.localShow = false;
365
- },
366
- getTemplateElement() {
367
- return this.$_tip ? this.$_tip.$el : null;
368
- },
369
- handleTemplateUpdate() {
370
- // Update our template title/content "props"
371
- // So that the template updates accordingly
372
- const $tip = this.$_tip;
373
- if ($tip) {
374
- const props = ['title', 'content', 'variant', 'customClass', 'noFade', 'interactive'];
375
- // Only update the values if they have changed
376
- props.forEach(prop => {
377
- if ($tip[prop] !== this[prop]) {
378
- $tip[prop] = this[prop];
379
- }
380
- });
381
- }
382
- },
383
- // --- Show/Hide handlers ---
384
- // Show the tooltip
385
- show() {
386
- const target = this.getTarget();
387
- if (!target || !contains(document.body, target) || !isVisible(target) || this.dropdownOpen() || (isUndefinedOrNull(this.title) || this.title === '') && (isUndefinedOrNull(this.content) || this.content === '')) {
388
- // If trigger element isn't in the DOM or is not visible, or
389
- // is on an open dropdown toggle, or has no content, then
390
- // we exit without showing
391
- return;
392
- }
393
- // If tip already exists, exit early
394
- if (this.$_tip || this.localShow) {
395
- /* istanbul ignore next */
396
- return;
397
- }
398
- // In the process of showing
399
- this.localShow = true;
400
- // Create a cancelable BvEvent
401
- const showEvent = this.buildEvent(EVENT_NAME_SHOW, {
402
- cancelable: true
403
- });
404
- this.emitEvent(showEvent);
405
- // Don't show if event cancelled
406
- /* istanbul ignore if */
407
- if (showEvent.defaultPrevented) {
408
- // Destroy the template (if for some reason it was created)
409
- this.destroyTemplate();
410
- return;
411
- }
412
- // Fix the title attribute on target
413
- this.fixTitle();
414
- // Set aria-describedby on target
415
- this.addAriaDescribedby();
416
- // Create and show the tooltip
417
- this.createTemplateAndShow();
418
- },
419
- hide() {
420
- let force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
421
- // Hide the tooltip
422
- const tip = this.getTemplateElement();
423
- /* istanbul ignore if */
424
- if (!tip || !this.localShow) {
425
- this.restoreTitle();
426
- return;
427
- }
428
-
429
- // Emit cancelable BvEvent 'hide'
430
- // We disable cancelling if `force` is true
431
- const hideEvent = this.buildEvent(EVENT_NAME_HIDE, {
432
- cancelable: !force
433
- });
434
- this.emitEvent(hideEvent);
435
- /* istanbul ignore if: ignore for now */
436
- if (hideEvent.defaultPrevented) {
437
- // Don't hide if event cancelled
438
- return;
439
- }
440
-
441
- // Tell the template to hide
442
- this.hideTemplate();
443
- },
444
- forceHide() {
445
- // Forcefully hides/destroys the template, regardless of any active triggers
446
- const tip = this.getTemplateElement();
447
- if (!tip || !this.localShow) {
448
- /* istanbul ignore next */
449
- return;
450
- }
451
- // Disable while open listeners/watchers
452
- // This is also done in the template `hide` event handler
453
- this.setWhileOpenListeners(false);
454
- // Clear any hover enter/leave event
455
- this.clearHoverTimeout();
456
- this.$_hoverState = '';
457
- this.clearActiveTriggers();
458
- // Disable the fade animation on the template
459
- if (this.$_tip) {
460
- this.$_tip.noFade = true;
461
- }
462
- // Hide the tip (with force = true)
463
- this.hide(true);
464
- },
465
- enable() {
466
- this.$_enabled = true;
467
- // Create a non-cancelable BvEvent
468
- this.emitEvent(this.buildEvent(EVENT_NAME_ENABLED));
469
- },
470
- disable() {
471
- this.$_enabled = false;
472
- // Create a non-cancelable BvEvent
473
- this.emitEvent(this.buildEvent(EVENT_NAME_DISABLED));
474
- },
475
- // --- Handlers for template events ---
476
- // When template is inserted into DOM, but not yet shown
477
- onTemplateShow() {
478
- // Enable while open listeners/watchers
479
- this.setWhileOpenListeners(true);
480
- },
481
- // When template show transition completes
482
- onTemplateShown() {
483
- const prevHoverState = this.$_hoverState;
484
- this.$_hoverState = '';
485
- /* istanbul ignore next: occasional Node 10 coverage error */
486
- if (prevHoverState === 'out') {
487
- this.leave(null);
488
- }
489
- // Emit a non-cancelable BvEvent 'shown'
490
- this.emitEvent(this.buildEvent(EVENT_NAME_SHOWN));
491
- },
492
- // When template is starting to hide
493
- onTemplateHide() {
494
- // Disable while open listeners/watchers
495
- this.setWhileOpenListeners(false);
496
- },
497
- // When template has completed closing (just before it self destructs)
498
- onTemplateHidden() {
499
- // Destroy the template
500
- this.destroyTemplate();
501
- // Emit a non-cancelable BvEvent 'shown'
502
- this.emitEvent(this.buildEvent(EVENT_NAME_HIDDEN));
503
- },
504
- // --- Helper methods ---
505
- getTarget() {
506
- let {
507
- target
508
- } = this;
509
- if (isString(target)) {
510
- target = getById(target.replace(/^#/, ''));
511
- } else if (isFunction(target)) {
512
- target = target();
513
- } else if (target) {
514
- target = target.$el || target;
515
- }
516
- return isElement(target) ? target : null;
517
- },
518
- getPlacementTarget() {
519
- // This is the target that the tooltip will be placed on, which may not
520
- // necessarily be the same element that has the trigger event listeners
521
- // For now, this is the same as target
522
- // TODO:
523
- // Add in child selector support
524
- // Add in visibility checks for this element
525
- // Fallback to target if not found
526
- return this.getTarget();
527
- },
528
- getTargetId() {
529
- // Returns the ID of the trigger element
530
- const target = this.getTarget();
531
- return target && target.id ? target.id : null;
532
- },
533
- getContainer() {
534
- // Handle case where container may be a component ref
535
- const container = this.container ? this.container.$el || this.container : false;
536
- const body = document.body;
537
- const target = this.getTarget();
538
- // If we are in a modal, we append to the modal, else append
539
- // to body, unless a container is specified
540
- // TODO:
541
- // Template should periodically check to see if it is in dom
542
- // And if not, self destruct (if container got v-if'ed out of DOM)
543
- // Or this could possibly be part of the visibility check
544
- return container === false ? closest(CONTAINER_SELECTOR, target) || body : /*istanbul ignore next */isString(container) ? /*istanbul ignore next */getById(container.replace(/^#/, '')) || body : /*istanbul ignore next */body;
545
- },
546
- getBoundary() {
547
- return this.boundary ? this.boundary.$el || this.boundary : 'scrollParent';
548
- },
549
- isInModal() {
550
- const target = this.getTarget();
551
- return target && closest(MODAL_SELECTOR, target);
552
- },
553
- isDropdown() {
554
- // Returns true if trigger is a dropdown
555
- const target = this.getTarget();
556
- return target && hasClass(target, DROPDOWN_CLASS);
557
- },
558
- dropdownOpen() {
559
- // Returns true if trigger is a dropdown and the dropdown menu is open
560
- const target = this.getTarget();
561
- return this.isDropdown() && target && select(DROPDOWN_OPEN_SELECTOR, target);
562
- },
563
- clearHoverTimeout() {
564
- clearTimeout(this.$_hoverTimeout);
565
- this.$_hoverTimeout = null;
566
- },
567
- clearVisibilityInterval() {
568
- clearInterval(this.$_visibleInterval);
569
- this.$_visibleInterval = null;
570
- },
571
- clearActiveTriggers() {
572
- for (const trigger in this.activeTrigger) {
573
- this.activeTrigger[trigger] = false;
574
- }
575
- },
576
- addAriaDescribedby() {
577
- // Add aria-describedby on trigger element, without removing any other IDs
578
- const target = this.getTarget();
579
- let desc = getAttr(target, 'aria-describedby') || '';
580
- desc = desc.split(/\s+/).concat(this.computedId).join(' ').trim();
581
- // Update/add aria-described by
582
- setAttr(target, 'aria-describedby', desc);
583
- },
584
- removeAriaDescribedby() {
585
- // Remove aria-describedby on trigger element, without removing any other IDs
586
- const target = this.getTarget();
587
- let desc = getAttr(target, 'aria-describedby') || '';
588
- desc = desc.split(/\s+/).filter(d => d !== this.computedId).join(' ').trim();
589
- // Update or remove aria-describedby
590
- if (desc) {
591
- /* istanbul ignore next */
592
- setAttr(target, 'aria-describedby', desc);
593
- } else {
594
- removeAttr(target, 'aria-describedby');
595
- }
596
- },
597
- fixTitle() {
598
- // If the target has a `title` attribute,
599
- // remove it and store it on a data attribute
600
- const target = this.getTarget();
601
- if (hasAttr(target, 'title')) {
602
- // Get `title` attribute value and remove it from target
603
- const title = getAttr(target, 'title');
604
- setAttr(target, 'title', '');
605
- // Only set the data attribute when the value is truthy
606
- if (title) {
607
- setAttr(target, DATA_TITLE_ATTR, title);
608
- }
609
- }
610
- },
611
- restoreTitle() {
612
- // If the target had a `title` attribute,
613
- // restore it and remove the data attribute
614
- const target = this.getTarget();
615
- if (hasAttr(target, DATA_TITLE_ATTR)) {
616
- // Get data attribute value and remove it from target
617
- const title = getAttr(target, DATA_TITLE_ATTR);
618
- removeAttr(target, DATA_TITLE_ATTR);
619
- // Only restore the `title` attribute when the value is truthy
620
- if (title) {
621
- setAttr(target, 'title', title);
622
- }
623
- }
624
- },
625
- // --- BvEvent helpers ---
626
- buildEvent(type) {
627
- let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
628
- // Defaults to a non-cancellable event
629
- return new BvEvent(type, {
630
- cancelable: false,
631
- target: this.getTarget(),
632
- relatedTarget: this.getTemplateElement() || null,
633
- componentId: this.computedId,
634
- vueTarget: this,
635
- // Add in option overrides
636
- ...options
637
- });
638
- },
639
- emitEvent(bvEvent) {
640
- const {
641
- type
642
- } = bvEvent;
643
- this.emitOnRoot(getRootEventName(this.templateType, type), bvEvent);
644
- this.$emit(type, bvEvent);
645
- },
646
- // --- Event handler setup methods ---
647
- listen() {
648
- // Enable trigger event handlers
649
- const el = this.getTarget();
650
- if (!el) {
651
- /* istanbul ignore next */
652
- return;
653
- }
654
- // Listen for global show/hide events
655
- this.setRootListener(true);
656
- // Set up our listeners on the target trigger element
657
- this.computedTriggers.forEach(trigger => {
658
- if (trigger === 'click') {
659
- eventOn(el, 'click', this.handleEvent, EVENT_OPTIONS_NO_CAPTURE);
660
- } else if (trigger === 'focus') {
661
- eventOn(el, 'focusin', this.handleEvent, EVENT_OPTIONS_NO_CAPTURE);
662
- eventOn(el, 'focusout', this.handleEvent, EVENT_OPTIONS_NO_CAPTURE);
663
- } else if (trigger === 'blur') {
664
- // Used to close $tip when element loses focus
665
- /* istanbul ignore next */
666
- eventOn(el, 'focusout', this.handleEvent, EVENT_OPTIONS_NO_CAPTURE);
667
- } else if (trigger === 'hover') {
668
- eventOn(el, 'mouseenter', this.handleEvent, EVENT_OPTIONS_NO_CAPTURE);
669
- eventOn(el, 'mouseleave', this.handleEvent, EVENT_OPTIONS_NO_CAPTURE);
670
- }
671
- }, this);
672
- },
673
- /* istanbul ignore next */
674
- unListen() {
675
- // Remove trigger event handlers
676
- const events = ['click', 'focusin', 'focusout', 'mouseenter', 'mouseleave'];
677
- const target = this.getTarget();
678
-
679
- // Stop listening for global show/hide/enable/disable events
680
- this.setRootListener(false);
681
-
682
- // Clear out any active target listeners
683
- events.forEach(event => {
684
- target && eventOff(target, event, this.handleEvent, EVENT_OPTIONS_NO_CAPTURE);
685
- }, this);
686
- },
687
- setRootListener(on) {
688
- // Listen for global `bv::{hide|show}::{tooltip|popover}` hide request event
689
- const method = on ? 'listenOnRoot' : 'listenOffRoot';
690
- const type = this.templateType;
691
- this[method](getRootActionEventName(type, EVENT_NAME_HIDE), this.doHide);
692
- this[method](getRootActionEventName(type, EVENT_NAME_SHOW), this.doShow);
693
- this[method](getRootActionEventName(type, EVENT_NAME_DISABLE), this.doDisable);
694
- this[method](getRootActionEventName(type, EVENT_NAME_ENABLE), this.doEnable);
695
- },
696
- setWhileOpenListeners(on) {
697
- // Events that are only registered when the template is showing
698
- // Modal close events
699
- this.setModalListener(on);
700
- // Dropdown open events (if we are attached to a dropdown)
701
- this.setDropdownListener(on);
702
- // Periodic $element visibility check
703
- // For handling when tip target is in <keepalive>, tabs, etc
704
- this.visibleCheck(on);
705
- // On-touch start listeners
706
- this.setOnTouchStartListener(on);
707
- },
708
- // Handler for periodic visibility check
709
- visibleCheck(on) {
710
- this.clearVisibilityInterval();
711
- const target = this.getTarget();
712
- if (on) {
713
- this.$_visibleInterval = setInterval(() => {
714
- const tip = this.getTemplateElement();
715
- if (tip && this.localShow && (!target.parentNode || !isVisible(target))) {
716
- // Target element is no longer visible or not in DOM, so force-hide the tooltip
717
- this.forceHide();
718
- }
719
- }, 100);
720
- }
721
- },
722
- setModalListener(on) {
723
- // Handle case where tooltip/target is in a modal
724
- if (this.isInModal()) {
725
- // We can listen for modal hidden events on `$root`
726
- this[on ? 'listenOnRoot' : 'listenOffRoot'](ROOT_EVENT_NAME_MODAL_HIDDEN, this.forceHide);
727
- }
728
- },
729
- /* istanbul ignore next: JSDOM doesn't support `ontouchstart` */
730
- setOnTouchStartListener(on) {
731
- // If this is a touch-enabled device we add extra empty
732
- // `mouseover` listeners to the body's immediate children
733
- // Only needed because of broken event delegation on iOS
734
- // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
735
- if ('ontouchstart' in document.documentElement) {
736
- from(document.body.children).forEach(el => {
737
- eventOnOff(on, el, 'mouseover', this.$_noop);
738
- });
739
- }
740
- },
741
- setDropdownListener(on) {
742
- const target = this.getTarget();
743
- if (!target || !this.bvEventRoot || !this.isDropdown) {
744
- return;
745
- }
746
- // We can listen for dropdown shown events on its instance
747
- // TODO:
748
- // We could grab the ID from the dropdown, and listen for
749
- // $root events for that particular dropdown id
750
- // Dropdown shown and hidden events will need to emit
751
- // Note: Dropdown auto-ID happens in a `$nextTick()` after mount
752
- // So the ID lookup would need to be done in a `$nextTick()`
753
- const instance = getInstanceFromElement(target);
754
- if (instance) {
755
- instance[on ? '$on' : '$off'](EVENT_NAME_SHOWN, this.forceHide);
756
- }
757
- },
758
- // --- Event handlers ---
759
- handleEvent(event) {
760
- // General trigger event handler
761
- // target is the trigger element
762
- const target = this.getTarget();
763
- if (!target || isDisabled(target) || !this.$_enabled || this.dropdownOpen()) {
764
- // If disabled or not enabled, or if a dropdown that is open, don't do anything
765
- // If tip is shown before element gets disabled, then tip will not
766
- // close until no longer disabled or forcefully closed
767
- return;
768
- }
769
- const type = event.type;
770
- const triggers = this.computedTriggers;
771
- if (type === 'click' && arrayIncludes(triggers, 'click')) {
772
- this.click(event);
773
- } else if (type === 'mouseenter' && arrayIncludes(triggers, 'hover')) {
774
- // `mouseenter` is a non-bubbling event
775
- this.enter(event);
776
- } else if (type === 'focusin' && arrayIncludes(triggers, 'focus')) {
777
- // `focusin` is a bubbling event
778
- // `event` includes `relatedTarget` (element losing focus)
779
- this.enter(event);
780
- } else if (type === 'focusout' && (arrayIncludes(triggers, 'focus') || arrayIncludes(triggers, 'blur')) || type === 'mouseleave' && arrayIncludes(triggers, 'hover')) {
781
- // `focusout` is a bubbling event
782
- // `mouseleave` is a non-bubbling event
783
- // `tip` is the template (will be null if not open)
784
- const tip = this.getTemplateElement();
785
- // `eventTarget` is the element which is losing focus/hover and
786
- const eventTarget = event.target;
787
- // `relatedTarget` is the element gaining focus/hover
788
- const relatedTarget = event.relatedTarget;
789
- /* istanbul ignore next */
790
- if (
791
- // From tip to target
792
- tip && contains(tip, eventTarget) && contains(target, relatedTarget) ||
793
- // From target to tip
794
- tip && contains(target, eventTarget) && contains(tip, relatedTarget) ||
795
- // Within tip
796
- tip && contains(tip, eventTarget) && contains(tip, relatedTarget) ||
797
- // Within target
798
- contains(target, eventTarget) && contains(target, relatedTarget)) {
799
- // If focus/hover moves within `tip` and `target`, don't trigger a leave
800
- return;
801
- }
802
- // Otherwise trigger a leave
803
- this.leave(event);
804
- }
805
- },
806
- doHide(id) {
807
- // Programmatically hide tooltip or popover
808
- if (!id || this.getTargetId() === id || this.computedId === id) {
809
- // Close all tooltips or popovers, or this specific tip (with ID)
810
- this.forceHide();
811
- }
812
- },
813
- doShow(id) {
814
- // Programmatically show tooltip or popover
815
- if (!id || this.getTargetId() === id || this.computedId === id) {
816
- // Open all tooltips or popovers, or this specific tip (with ID)
817
- this.show();
818
- }
819
- },
820
- /*istanbul ignore next: ignore for now */
821
- doDisable(id) /*istanbul ignore next: ignore for now */{
822
- // Programmatically disable tooltip or popover
823
- if (!id || this.getTargetId() === id || this.computedId === id) {
824
- // Disable all tooltips or popovers (no ID), or this specific tip (with ID)
825
- this.disable();
826
- }
827
- },
828
- /*istanbul ignore next: ignore for now */
829
- doEnable(id) /*istanbul ignore next: ignore for now */{
830
- // Programmatically enable tooltip or popover
831
- if (!id || this.getTargetId() === id || this.computedId === id) {
832
- // Enable all tooltips or popovers (no ID), or this specific tip (with ID)
833
- this.enable();
834
- }
835
- },
836
- click(event) {
837
- if (!this.$_enabled || this.dropdownOpen()) {
838
- /* istanbul ignore next */
839
- return;
840
- }
841
- // Get around a WebKit bug where `click` does not trigger focus events
842
- // On most browsers, `click` triggers a `focusin`/`focus` event first
843
- // Needed so that trigger 'click blur' works on iOS
844
- // https://github.com/bootstrap-vue/bootstrap-vue/issues/5099
845
- // We use `currentTarget` rather than `target` to trigger on the
846
- // element, not the inner content
847
- attemptFocus(event.currentTarget);
848
- this.activeTrigger.click = !this.activeTrigger.click;
849
- if (this.isWithActiveTrigger) {
850
- this.enter(null);
851
- } else {
852
- /* istanbul ignore next */
853
- this.leave(null);
854
- }
855
- },
856
- /* istanbul ignore next */
857
- toggle() {
858
- // Manual toggle handler
859
- if (!this.$_enabled || this.dropdownOpen()) {
860
- /* istanbul ignore next */
861
- return;
862
- }
863
- // Should we register as an active trigger?
864
- // this.activeTrigger.manual = !this.activeTrigger.manual
865
- if (this.localShow) {
866
- this.leave(null);
867
- } else {
868
- this.enter(null);
869
- }
870
- },
871
- enter() {
872
- let event = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
873
- // Opening trigger handler
874
- // Note: Click events are sent with event === null
875
- if (event) {
876
- this.activeTrigger[event.type === 'focusin' ? 'focus' : 'hover'] = true;
877
- }
878
- /* istanbul ignore next */
879
- if (this.localShow || this.$_hoverState === 'in') {
880
- this.$_hoverState = 'in';
881
- return;
882
- }
883
- this.clearHoverTimeout();
884
- this.$_hoverState = 'in';
885
- if (!this.computedDelay.show) {
886
- this.show();
887
- } else {
888
- // Hide any title attribute while enter delay is active
889
- this.fixTitle();
890
- this.$_hoverTimeout = setTimeout(() => {
891
- /* istanbul ignore else */
892
- if (this.$_hoverState === 'in') {
893
- this.show();
894
- } else if (!this.localShow) {
895
- this.restoreTitle();
896
- }
897
- }, this.computedDelay.show);
898
- }
899
- },
900
- leave() {
901
- let event = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
902
- // Closing trigger handler
903
- // Note: Click events are sent with event === null
904
- if (event) {
905
- this.activeTrigger[event.type === 'focusout' ? 'focus' : 'hover'] = false;
906
- /* istanbul ignore next */
907
- if (event.type === 'focusout' && arrayIncludes(this.computedTriggers, 'blur')) {
908
- // Special case for `blur`: we clear out the other triggers
909
- this.activeTrigger.click = false;
910
- this.activeTrigger.hover = false;
911
- }
912
- }
913
- /* istanbul ignore next: ignore for now */
914
- if (this.isWithActiveTrigger) {
915
- return;
916
- }
917
- this.clearHoverTimeout();
918
- this.$_hoverState = 'out';
919
- if (!this.computedDelay.hide) {
920
- this.hide();
921
- } else {
922
- this.$_hoverTimeout = setTimeout(() => {
923
- if (this.$_hoverState === 'out') {
924
- this.hide();
925
- }
926
- }, this.computedDelay.hide);
927
- }
928
- }
929
- }
930
- });
931
-
932
- export { BVTooltip };