@gitlab/ui 131.3.0 → 131.3.1

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 (383) 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/tailwind.defaults.js +10 -1
  5. package/dist/charts.js +0 -13
  6. package/dist/components/base/accordion/accordion.js +0 -69
  7. package/dist/components/base/accordion/accordion_item.js +0 -160
  8. package/dist/components/base/accordion/constants.js +0 -3
  9. package/dist/components/base/alert/alert.js +0 -263
  10. package/dist/components/base/animated_icon/animated_chevron_down_up_icon.js +0 -45
  11. package/dist/components/base/animated_icon/animated_chevron_lg_down_up_icon.js +0 -45
  12. package/dist/components/base/animated_icon/animated_chevron_lg_right_down_icon.js +0 -45
  13. package/dist/components/base/animated_icon/animated_chevron_right_down_icon.js +0 -45
  14. package/dist/components/base/animated_icon/animated_duo_chat_icon.js +0 -45
  15. package/dist/components/base/animated_icon/animated_loader_icon.js +0 -45
  16. package/dist/components/base/animated_icon/animated_notifications_icon.js +0 -45
  17. package/dist/components/base/animated_icon/animated_sidebar_icon.js +0 -45
  18. package/dist/components/base/animated_icon/animated_smile_icon.js +0 -45
  19. package/dist/components/base/animated_icon/animated_sort_icon.js +0 -45
  20. package/dist/components/base/animated_icon/animated_star_icon.js +0 -45
  21. package/dist/components/base/animated_icon/animated_todo_icon.js +0 -45
  22. package/dist/components/base/animated_icon/animated_upload_icon.js +0 -45
  23. package/dist/components/base/animated_icon/base_animated_icon.js +0 -77
  24. package/dist/components/base/attribute_list/attribute_list.js +0 -100
  25. package/dist/components/base/avatar/avatar.js +0 -175
  26. package/dist/components/base/avatar/utils.js +0 -17
  27. package/dist/components/base/avatar_labeled/avatar_labeled.js +0 -198
  28. package/dist/components/base/avatar_link/avatar_link.js +0 -47
  29. package/dist/components/base/avatars_inline/avatars_inline.js +0 -139
  30. package/dist/components/base/badge/badge.js +0 -197
  31. package/dist/components/base/banner/banner.js +0 -149
  32. package/dist/components/base/breadcrumb/breadcrumb.js +0 -282
  33. package/dist/components/base/breadcrumb/breadcrumb_item.js +0 -96
  34. package/dist/components/base/broadcast_message/broadcast_message.js +0 -113
  35. package/dist/components/base/broadcast_message/constants.js +0 -5
  36. package/dist/components/base/button/button.js +0 -419
  37. package/dist/components/base/button_group/button_group.js +0 -53
  38. package/dist/components/base/card/card.js +0 -69
  39. package/dist/components/base/collapse/collapse.js +0 -163
  40. package/dist/components/base/color_mode_toggle/color_mode_toggle.js +0 -92
  41. package/dist/components/base/datepicker/datepicker.js +0 -475
  42. package/dist/components/base/daterange_picker/daterange_picker.js +0 -394
  43. package/dist/components/base/drawer/drawer.js +0 -156
  44. package/dist/components/base/dropdown/dropdown.js +0 -330
  45. package/dist/components/base/dropdown/dropdown_divider.js +0 -48
  46. package/dist/components/base/dropdown/dropdown_form.js +0 -48
  47. package/dist/components/base/dropdown/dropdown_item.js +0 -175
  48. package/dist/components/base/dropdown/dropdown_section_header.js +0 -48
  49. package/dist/components/base/dropdown/dropdown_text.js +0 -48
  50. package/dist/components/base/filtered_search/common_story_options.js +0 -14
  51. package/dist/components/base/filtered_search/filtered_search.js +0 -428
  52. package/dist/components/base/filtered_search/filtered_search_suggestion.js +0 -95
  53. package/dist/components/base/filtered_search/filtered_search_suggestion_list.js +0 -139
  54. package/dist/components/base/filtered_search/filtered_search_term.js +0 -217
  55. package/dist/components/base/filtered_search/filtered_search_token.js +0 -383
  56. package/dist/components/base/filtered_search/filtered_search_token_segment.js +0 -444
  57. package/dist/components/base/filtered_search/filtered_search_utils.js +0 -241
  58. package/dist/components/base/form/form.js +0 -43
  59. package/dist/components/base/form/form_character_count/form_character_count.js +0 -107
  60. package/dist/components/base/form/form_checkbox/form_checkbox.js +0 -342
  61. package/dist/components/base/form/form_checkbox/form_checkbox_group.js +0 -186
  62. package/dist/components/base/form/form_combobox/constants.js +0 -55
  63. package/dist/components/base/form/form_combobox/form_combobox.js +0 -239
  64. package/dist/components/base/form/form_date/form_date.js +0 -143
  65. package/dist/components/base/form/form_fields/form_field_validator.js +0 -93
  66. package/dist/components/base/form/form_fields/form_fields.js +0 -289
  67. package/dist/components/base/form/form_fields/form_fields_loop.js +0 -75
  68. package/dist/components/base/form/form_fields/mappers.js +0 -13
  69. package/dist/components/base/form/form_fields/validators.js +0 -48
  70. package/dist/components/base/form/form_group/form_group.js +0 -119
  71. package/dist/components/base/form/form_input/form_input.js +0 -695
  72. package/dist/components/base/form/form_input_group/form_input_group.js +0 -120
  73. package/dist/components/base/form/form_input_group/form_input_group_mixin.js +0 -41
  74. package/dist/components/base/form/form_radio/form_radio.js +0 -259
  75. package/dist/components/base/form/form_radio_group/form_radio_group.js +0 -187
  76. package/dist/components/base/form/form_select/constants.js +0 -12
  77. package/dist/components/base/form/form_select/form_select.js +0 -96
  78. package/dist/components/base/form/form_textarea/form_textarea.js +0 -166
  79. package/dist/components/base/form/input_group_text/input_group_text.js +0 -43
  80. package/dist/components/base/icon/icon.js +0 -113
  81. package/dist/components/base/illustration/illustration.js +0 -80
  82. package/dist/components/base/infinite_scroll/infinite_scroll.js +0 -196
  83. package/dist/components/base/keyset_pagination/keyset_pagination.js +0 -152
  84. package/dist/components/base/label/label.js +0 -174
  85. package/dist/components/base/link/link.js +0 -332
  86. package/dist/components/base/loading_icon/loading_icon.js +0 -120
  87. package/dist/components/base/markdown/markdown.js +0 -50
  88. package/dist/components/base/modal/modal.js +0 -259
  89. package/dist/components/base/new_dropdowns/base_dropdown/base_dropdown.js +0 -716
  90. package/dist/components/base/new_dropdowns/base_dropdown/constants.js +0 -5
  91. package/dist/components/base/new_dropdowns/base_dropdown/dropdown_container.js +0 -32
  92. package/dist/components/base/new_dropdowns/constants.js +0 -24
  93. package/dist/components/base/new_dropdowns/disclosure/constants.js +0 -8
  94. package/dist/components/base/new_dropdowns/disclosure/disclosure_dropdown.js +0 -400
  95. package/dist/components/base/new_dropdowns/disclosure/disclosure_dropdown_group.js +0 -112
  96. package/dist/components/base/new_dropdowns/disclosure/disclosure_dropdown_item.js +0 -196
  97. package/dist/components/base/new_dropdowns/disclosure/mock_data.js +0 -168
  98. package/dist/components/base/new_dropdowns/disclosure/utils.js +0 -84
  99. package/dist/components/base/new_dropdowns/listbox/listbox.js +0 -997
  100. package/dist/components/base/new_dropdowns/listbox/listbox_group.js +0 -58
  101. package/dist/components/base/new_dropdowns/listbox/listbox_item.js +0 -112
  102. package/dist/components/base/new_dropdowns/listbox/listbox_search_input.js +0 -94
  103. package/dist/components/base/new_dropdowns/listbox/mock_data.js +0 -131
  104. package/dist/components/base/new_dropdowns/listbox/utils.js +0 -33
  105. package/dist/components/base/pagination/pagination.js +0 -397
  106. package/dist/components/base/path/data.js +0 -34
  107. package/dist/components/base/path/path.js +0 -177
  108. package/dist/components/base/popover/popover.js +0 -142
  109. package/dist/components/base/progress_bar/progress_bar.js +0 -117
  110. package/dist/components/base/search_box_by_click/search_box_by_click.js +0 -245
  111. package/dist/components/base/search_box_by_type/search_box_by_type.js +0 -187
  112. package/dist/components/base/segmented_control/segmented_control.js +0 -73
  113. package/dist/components/base/skeleton_loader/skeleton_loader.js +0 -232
  114. package/dist/components/base/sorting/sorting.js +0 -180
  115. package/dist/components/base/table/constants.js +0 -5
  116. package/dist/components/base/table/table.js +0 -187
  117. package/dist/components/base/table_lite/table_lite.js +0 -80
  118. package/dist/components/base/tabs/constants.js +0 -3
  119. package/dist/components/base/tabs/tab/tab.js +0 -113
  120. package/dist/components/base/tabs/tabs/scrollable_tabs.js +0 -162
  121. package/dist/components/base/tabs/tabs/tabs.js +0 -223
  122. package/dist/components/base/toast/index.js +0 -66
  123. package/dist/components/base/toast/toast.js +0 -125
  124. package/dist/components/base/toast/toaster.js +0 -87
  125. package/dist/components/base/toggle/toggle.js +0 -178
  126. package/dist/components/base/token/token.js +0 -97
  127. package/dist/components/base/token_selector/helpers.js +0 -5
  128. package/dist/components/base/token_selector/token_container.js +0 -160
  129. package/dist/components/base/token_selector/token_selector.js +0 -454
  130. package/dist/components/base/token_selector/token_selector_dropdown.js +0 -223
  131. package/dist/components/base/tooltip/tooltip.js +0 -54
  132. package/dist/components/charts/area/area.js +0 -329
  133. package/dist/components/charts/bar/bar.js +0 -207
  134. package/dist/components/charts/chart/chart.js +0 -215
  135. package/dist/components/charts/column/column.js +0 -221
  136. package/dist/components/charts/discrete_scatter/discrete_scatter.js +0 -199
  137. package/dist/components/charts/gauge/gauge.js +0 -205
  138. package/dist/components/charts/heatmap/heatmap.js +0 -299
  139. package/dist/components/charts/heatmap/index.js +0 -2
  140. package/dist/components/charts/legend/legend.js +0 -245
  141. package/dist/components/charts/line/line.js +0 -340
  142. package/dist/components/charts/series_label/series_label.js +0 -101
  143. package/dist/components/charts/shared/tooltip/tooltip.js +0 -369
  144. package/dist/components/charts/shared/tooltip/tooltip_default_format/tooltip_default_format.js +0 -53
  145. package/dist/components/charts/single_stat/single_stat.js +0 -164
  146. package/dist/components/charts/sparkline/sparkline.js +0 -299
  147. package/dist/components/charts/stacked_column/stacked_column.js +0 -380
  148. package/dist/components/dashboards/dashboard_layout/dashboard_layout.js +0 -125
  149. package/dist/components/dashboards/dashboard_layout/grid_layout/grid_layout.js +0 -326
  150. package/dist/components/dashboards/dashboard_layout/validators.js +0 -14
  151. package/dist/components/dashboards/dashboard_panel/dashboard_panel.js +0 -236
  152. package/dist/components/dashboards/mock_data.js +0 -49
  153. package/dist/components/experimental/experiment_badge/constants.js +0 -4
  154. package/dist/components/experimental/experiment_badge/experiment_badge.js +0 -102
  155. package/dist/components/extended/multi_step_form_template/multi_step_form_template.js +0 -87
  156. package/dist/components/index.js +0 -107
  157. package/dist/components/mixins/button_mixin.js +0 -11
  158. package/dist/components/mixins/safe_link_mixin.js +0 -30
  159. package/dist/components/mixins/tooltip_mixin.js +0 -21
  160. package/dist/components/regions/dashboard_skeleton/dashboard_skeleton.js +0 -53
  161. package/dist/components/regions/empty_state/empty_state.js +0 -181
  162. package/dist/components/shared_components/clear_icon_button/clear_icon_button.js +0 -64
  163. package/dist/components/shared_components/clipboard_button/clipboard_button.js +0 -100
  164. package/dist/components/shared_components/close_button/close_button.js +0 -55
  165. package/dist/components/utilities/animated_number/animated_number.js +0 -131
  166. package/dist/components/utilities/friendly_wrap/friendly_wrap.js +0 -75
  167. package/dist/components/utilities/intersection_observer/intersection_observer.js +0 -88
  168. package/dist/components/utilities/intersperse/intersperse.js +0 -104
  169. package/dist/components/utilities/sprintf/sprintf.js +0 -171
  170. package/dist/components/utilities/truncate/constants.js +0 -8
  171. package/dist/components/utilities/truncate/truncate.js +0 -154
  172. package/dist/components/utilities/truncate_text/constants.js +0 -7
  173. package/dist/components/utilities/truncate_text/truncate_text.js +0 -146
  174. package/dist/config.js +0 -53
  175. package/dist/directives/hover_load/hover_load.js +0 -45
  176. package/dist/directives/index.js +0 -8
  177. package/dist/directives/modal.js +0 -1
  178. package/dist/directives/outside/outside.js +0 -149
  179. package/dist/directives/resize_observer/resize_observer.js +0 -58
  180. package/dist/directives/safe_html/constants.js +0 -6
  181. package/dist/directives/safe_html/safe_html.js +0 -39
  182. package/dist/directives/safe_link/mock_data.js +0 -10
  183. package/dist/directives/safe_link/safe_link.js +0 -67
  184. package/dist/directives/tooltip/container.js +0 -7
  185. package/dist/directives/tooltip/tooltip.js +0 -18
  186. package/dist/index.css +0 -7
  187. package/dist/index.css.map +0 -1
  188. package/dist/index.js +0 -2
  189. package/dist/tailwind.css +0 -2
  190. package/dist/tailwind.css.map +0 -1
  191. package/dist/tokens/build/js/tokens.dark.js +0 -1410
  192. package/dist/tokens/build/js/tokens.js +0 -1410
  193. package/dist/tokens/common_story_options.js +0 -29
  194. package/dist/tokens/tokens_story.js +0 -76
  195. package/dist/utils/breakpoints.js +0 -20
  196. package/dist/utils/charts/config.js +0 -616
  197. package/dist/utils/charts/constants.js +0 -69
  198. package/dist/utils/charts/mock_data.js +0 -191
  199. package/dist/utils/charts/story_config.js +0 -24
  200. package/dist/utils/charts/theme.js +0 -200
  201. package/dist/utils/charts/utils.js +0 -54
  202. package/dist/utils/constants.js +0 -333
  203. package/dist/utils/data_utils.js +0 -19
  204. package/dist/utils/datetime_utility.js +0 -61
  205. package/dist/utils/equality_utils.js +0 -84
  206. package/dist/utils/i18n.js +0 -65
  207. package/dist/utils/is_slot_empty.js +0 -34
  208. package/dist/utils/number_utils.js +0 -132
  209. package/dist/utils/play_utils.js +0 -11
  210. package/dist/utils/set_utils.js +0 -25
  211. package/dist/utils/stories_constants.js +0 -29
  212. package/dist/utils/stories_utils.js +0 -62
  213. package/dist/utils/story_decorators/container.js +0 -19
  214. package/dist/utils/string_utils.js +0 -69
  215. package/dist/utils/svgs/svg_paths.js +0 -7
  216. package/dist/utils/test_utils.js +0 -33
  217. package/dist/utils/use_fake_date.js +0 -29
  218. package/dist/utils/use_mock_intersection_observer.js +0 -105
  219. package/dist/utils/utils.js +0 -205
  220. package/dist/utils.js +0 -5
  221. package/dist/vendor/bootstrap-vue/src/bv-config.js +0 -8
  222. package/dist/vendor/bootstrap-vue/src/components/button/button-close.js +0 -81
  223. package/dist/vendor/bootstrap-vue/src/components/button/button.js +0 -204
  224. package/dist/vendor/bootstrap-vue/src/components/button/index.js +0 -2
  225. package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-divider.js +0 -41
  226. package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-form.js +0 -52
  227. package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-group.js +0 -75
  228. package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-header.js +0 -52
  229. package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-item-button.js +0 -85
  230. package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-item.js +0 -97
  231. package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-text.js +0 -60
  232. package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown.js +0 -271
  233. package/dist/vendor/bootstrap-vue/src/components/dropdown/index.js +0 -8
  234. package/dist/vendor/bootstrap-vue/src/components/form/form-invalid-feedback.js +0 -53
  235. package/dist/vendor/bootstrap-vue/src/components/form/form-text.js +0 -55
  236. package/dist/vendor/bootstrap-vue/src/components/form/form-valid-feedback.js +0 -53
  237. package/dist/vendor/bootstrap-vue/src/components/form/form.js +0 -56
  238. package/dist/vendor/bootstrap-vue/src/components/form/index.js +0 -4
  239. package/dist/vendor/bootstrap-vue/src/components/form-group/form-group.js +0 -348
  240. package/dist/vendor/bootstrap-vue/src/components/form-group/index.js +0 -1
  241. package/dist/vendor/bootstrap-vue/src/components/form-select/form-select-option-group.js +0 -54
  242. package/dist/vendor/bootstrap-vue/src/components/form-select/form-select-option.js +0 -41
  243. package/dist/vendor/bootstrap-vue/src/components/form-select/form-select.js +0 -143
  244. package/dist/vendor/bootstrap-vue/src/components/form-select/helpers/mixin-options.js +0 -56
  245. package/dist/vendor/bootstrap-vue/src/components/form-select/index.js +0 -3
  246. package/dist/vendor/bootstrap-vue/src/components/form-textarea/form-textarea.js +0 -217
  247. package/dist/vendor/bootstrap-vue/src/components/form-textarea/index.js +0 -1
  248. package/dist/vendor/bootstrap-vue/src/components/layout/col.js +0 -156
  249. package/dist/vendor/bootstrap-vue/src/components/layout/form-row.js +0 -34
  250. package/dist/vendor/bootstrap-vue/src/components/layout/index.js +0 -2
  251. package/dist/vendor/bootstrap-vue/src/components/link/index.js +0 -1
  252. package/dist/vendor/bootstrap-vue/src/components/link/link.js +0 -283
  253. package/dist/vendor/bootstrap-vue/src/components/modal/helpers/bv-modal-event.class.js +0 -21
  254. package/dist/vendor/bootstrap-vue/src/components/modal/helpers/modal-manager.js +0 -212
  255. package/dist/vendor/bootstrap-vue/src/components/modal/index.js +0 -1
  256. package/dist/vendor/bootstrap-vue/src/components/modal/modal.js +0 -887
  257. package/dist/vendor/bootstrap-vue/src/components/popover/helpers/bv-popover-template.js +0 -55
  258. package/dist/vendor/bootstrap-vue/src/components/popover/helpers/bv-popover.js +0 -31
  259. package/dist/vendor/bootstrap-vue/src/components/popover/index.js +0 -1
  260. package/dist/vendor/bootstrap-vue/src/components/popover/popover.js +0 -49
  261. package/dist/vendor/bootstrap-vue/src/components/table/helpers/constants.js +0 -22
  262. package/dist/vendor/bootstrap-vue/src/components/table/helpers/default-sort-compare.js +0 -64
  263. package/dist/vendor/bootstrap-vue/src/components/table/helpers/filter-event.js +0 -40
  264. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-bottom-row.js +0 -43
  265. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-busy.js +0 -83
  266. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-caption.js +0 -50
  267. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-colgroup.js +0 -32
  268. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-empty.js +0 -82
  269. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-filtering.js +0 -274
  270. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-items.js +0 -154
  271. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-pagination.js +0 -44
  272. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-provider.js +0 -191
  273. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-selectable.js +0 -213
  274. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-sorting.js +0 -275
  275. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-stacked.js +0 -39
  276. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-table-renderer.js +0 -186
  277. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-tbody-row.js +0 -338
  278. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-tbody.js +0 -243
  279. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-tfoot.js +0 -50
  280. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-thead.js +0 -218
  281. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-top-row.js +0 -42
  282. package/dist/vendor/bootstrap-vue/src/components/table/helpers/normalize-fields.js +0 -86
  283. package/dist/vendor/bootstrap-vue/src/components/table/helpers/sanitize-row.js +0 -32
  284. package/dist/vendor/bootstrap-vue/src/components/table/helpers/stringify-record-values.js +0 -11
  285. package/dist/vendor/bootstrap-vue/src/components/table/helpers/text-selection-active.js +0 -14
  286. package/dist/vendor/bootstrap-vue/src/components/table/index.js +0 -9
  287. package/dist/vendor/bootstrap-vue/src/components/table/table-lite.js +0 -51
  288. package/dist/vendor/bootstrap-vue/src/components/table/table-simple.js +0 -44
  289. package/dist/vendor/bootstrap-vue/src/components/table/table.js +0 -67
  290. package/dist/vendor/bootstrap-vue/src/components/table/tbody.js +0 -116
  291. package/dist/vendor/bootstrap-vue/src/components/table/td.js +0 -204
  292. package/dist/vendor/bootstrap-vue/src/components/table/tfoot.js +0 -96
  293. package/dist/vendor/bootstrap-vue/src/components/table/th.js +0 -26
  294. package/dist/vendor/bootstrap-vue/src/components/table/thead.js +0 -99
  295. package/dist/vendor/bootstrap-vue/src/components/table/tr.js +0 -121
  296. package/dist/vendor/bootstrap-vue/src/components/tabs/index.js +0 -2
  297. package/dist/vendor/bootstrap-vue/src/components/tabs/tab.js +0 -238
  298. package/dist/vendor/bootstrap-vue/src/components/tabs/tabs.js +0 -601
  299. package/dist/vendor/bootstrap-vue/src/components/tooltip/helpers/bv-popper.js +0 -251
  300. package/dist/vendor/bootstrap-vue/src/components/tooltip/helpers/bv-tooltip-template.js +0 -118
  301. package/dist/vendor/bootstrap-vue/src/components/tooltip/helpers/bv-tooltip.js +0 -932
  302. package/dist/vendor/bootstrap-vue/src/components/tooltip/index.js +0 -1
  303. package/dist/vendor/bootstrap-vue/src/components/tooltip/tooltip.js +0 -269
  304. package/dist/vendor/bootstrap-vue/src/components/transition/bv-transition.js +0 -103
  305. package/dist/vendor/bootstrap-vue/src/components/transporter/transporter.js +0 -205
  306. package/dist/vendor/bootstrap-vue/src/constants/components.js +0 -55
  307. package/dist/vendor/bootstrap-vue/src/constants/config.js +0 -11
  308. package/dist/vendor/bootstrap-vue/src/constants/env.js +0 -36
  309. package/dist/vendor/bootstrap-vue/src/constants/events.js +0 -56
  310. package/dist/vendor/bootstrap-vue/src/constants/key-codes.js +0 -11
  311. package/dist/vendor/bootstrap-vue/src/constants/popper.js +0 -10
  312. package/dist/vendor/bootstrap-vue/src/constants/props.js +0 -24
  313. package/dist/vendor/bootstrap-vue/src/constants/regex.js +0 -35
  314. package/dist/vendor/bootstrap-vue/src/constants/safe-types.js +0 -15
  315. package/dist/vendor/bootstrap-vue/src/constants/slots.js +0 -36
  316. package/dist/vendor/bootstrap-vue/src/directives/modal/index.js +0 -1
  317. package/dist/vendor/bootstrap-vue/src/directives/modal/modal.js +0 -112
  318. package/dist/vendor/bootstrap-vue/src/directives/tooltip/index.js +0 -1
  319. package/dist/vendor/bootstrap-vue/src/directives/tooltip/tooltip.js +0 -265
  320. package/dist/vendor/bootstrap-vue/src/directives/visible/index.js +0 -1
  321. package/dist/vendor/bootstrap-vue/src/directives/visible/visible.js +0 -187
  322. package/dist/vendor/bootstrap-vue/src/mixins/attrs.js +0 -5
  323. package/dist/vendor/bootstrap-vue/src/mixins/click-out.js +0 -54
  324. package/dist/vendor/bootstrap-vue/src/mixins/dropdown.js +0 -470
  325. package/dist/vendor/bootstrap-vue/src/mixins/focus-in.js +0 -46
  326. package/dist/vendor/bootstrap-vue/src/mixins/form-control.js +0 -73
  327. package/dist/vendor/bootstrap-vue/src/mixins/form-custom.js +0 -26
  328. package/dist/vendor/bootstrap-vue/src/mixins/form-options.js +0 -91
  329. package/dist/vendor/bootstrap-vue/src/mixins/form-selection.js +0 -62
  330. package/dist/vendor/bootstrap-vue/src/mixins/form-size.js +0 -26
  331. package/dist/vendor/bootstrap-vue/src/mixins/form-state.js +0 -50
  332. package/dist/vendor/bootstrap-vue/src/mixins/form-text.js +0 -293
  333. package/dist/vendor/bootstrap-vue/src/mixins/form-validity.js +0 -50
  334. package/dist/vendor/bootstrap-vue/src/mixins/has-listener.js +0 -29
  335. package/dist/vendor/bootstrap-vue/src/mixins/id.js +0 -57
  336. package/dist/vendor/bootstrap-vue/src/mixins/listen-on-document.js +0 -63
  337. package/dist/vendor/bootstrap-vue/src/mixins/listen-on-root.js +0 -121
  338. package/dist/vendor/bootstrap-vue/src/mixins/listen-on-window.js +0 -63
  339. package/dist/vendor/bootstrap-vue/src/mixins/listeners.js +0 -25
  340. package/dist/vendor/bootstrap-vue/src/mixins/model.js +0 -10
  341. package/dist/vendor/bootstrap-vue/src/mixins/normalize-slot.js +0 -30
  342. package/dist/vendor/bootstrap-vue/src/mixins/scoped-style.js +0 -18
  343. package/dist/vendor/bootstrap-vue/src/mixins/use-parent.js +0 -14
  344. package/dist/vendor/bootstrap-vue/src/utils/array.js +0 -28
  345. package/dist/vendor/bootstrap-vue/src/utils/bv-event.class.js +0 -60
  346. package/dist/vendor/bootstrap-vue/src/utils/cache.js +0 -60
  347. package/dist/vendor/bootstrap-vue/src/utils/clone-deep.js +0 -18
  348. package/dist/vendor/bootstrap-vue/src/utils/config-set.js +0 -86
  349. package/dist/vendor/bootstrap-vue/src/utils/config.js +0 -71
  350. package/dist/vendor/bootstrap-vue/src/utils/create-new-child-component.js +0 -133
  351. package/dist/vendor/bootstrap-vue/src/utils/css-escape.js +0 -70
  352. package/dist/vendor/bootstrap-vue/src/utils/dom.js +0 -298
  353. package/dist/vendor/bootstrap-vue/src/utils/element-to-vue-instance-registry.js +0 -28
  354. package/dist/vendor/bootstrap-vue/src/utils/env.js +0 -16
  355. package/dist/vendor/bootstrap-vue/src/utils/events.js +0 -78
  356. package/dist/vendor/bootstrap-vue/src/utils/get-event-root.js +0 -5
  357. package/dist/vendor/bootstrap-vue/src/utils/get-instance-from-directive.js +0 -3
  358. package/dist/vendor/bootstrap-vue/src/utils/get-scope-id.js +0 -9
  359. package/dist/vendor/bootstrap-vue/src/utils/get.js +0 -63
  360. package/dist/vendor/bootstrap-vue/src/utils/html.js +0 -16
  361. package/dist/vendor/bootstrap-vue/src/utils/identity.js +0 -3
  362. package/dist/vendor/bootstrap-vue/src/utils/inspect.js +0 -35
  363. package/dist/vendor/bootstrap-vue/src/utils/locale.js +0 -19
  364. package/dist/vendor/bootstrap-vue/src/utils/loose-equal.js +0 -59
  365. package/dist/vendor/bootstrap-vue/src/utils/loose-index-of.js +0 -13
  366. package/dist/vendor/bootstrap-vue/src/utils/math.js +0 -9
  367. package/dist/vendor/bootstrap-vue/src/utils/memoize.js +0 -14
  368. package/dist/vendor/bootstrap-vue/src/utils/model.js +0 -33
  369. package/dist/vendor/bootstrap-vue/src/utils/noop.js +0 -3
  370. package/dist/vendor/bootstrap-vue/src/utils/normalize-slot.js +0 -51
  371. package/dist/vendor/bootstrap-vue/src/utils/number.js +0 -23
  372. package/dist/vendor/bootstrap-vue/src/utils/object.js +0 -72
  373. package/dist/vendor/bootstrap-vue/src/utils/observe-dom.js +0 -76
  374. package/dist/vendor/bootstrap-vue/src/utils/on-instance-destroy.js +0 -22
  375. package/dist/vendor/bootstrap-vue/src/utils/plugins.js +0 -124
  376. package/dist/vendor/bootstrap-vue/src/utils/props.js +0 -67
  377. package/dist/vendor/bootstrap-vue/src/utils/router.js +0 -150
  378. package/dist/vendor/bootstrap-vue/src/utils/safe-vue-instance.js +0 -14
  379. package/dist/vendor/bootstrap-vue/src/utils/stable-sort.js +0 -28
  380. package/dist/vendor/bootstrap-vue/src/utils/string.js +0 -47
  381. package/dist/vendor/bootstrap-vue/src/utils/stringify-object-values.js +0 -31
  382. package/dist/vendor/bootstrap-vue/src/utils/warn.js +0 -45
  383. package/dist/vendor/bootstrap-vue/src/vue.js +0 -55
@@ -1,601 +0,0 @@
1
- import { extend, COMPONENT_UID_KEY, REF_FOR_KEY } from '../../vue';
2
- import { NAME_TAB_BUTTON_HELPER, NAME_TABS } from '../../constants/components';
3
- import { IS_BROWSER } from '../../constants/env';
4
- import { EVENT_NAME_CLICK, EVENT_NAME_FIRST, EVENT_NAME_PREV, EVENT_NAME_LAST, EVENT_NAME_NEXT, EVENT_NAME_CHANGED, EVENT_NAME_ACTIVATE_TAB } from '../../constants/events';
5
- import { CODE_SPACE, CODE_UP, CODE_LEFT, CODE_HOME, CODE_DOWN, CODE_RIGHT, CODE_END } from '../../constants/key-codes';
6
- import { PROP_TYPE_NUMBER, PROP_TYPE_STRING, PROP_TYPE_BOOLEAN, PROP_TYPE_ARRAY_OBJECT_STRING } from '../../constants/props';
7
- import { SLOT_NAME_TITLE, SLOT_NAME_TABS_START, SLOT_NAME_TABS_END, SLOT_NAME_TOOLBAR_START, SLOT_NAME_TOOLBAR_END, SLOT_NAME_EMPTY } from '../../constants/slots';
8
- import { arrayIncludes } from '../../utils/array';
9
- import { BvEvent } from '../../utils/bv-event.class';
10
- import { attemptFocus, selectAll, requestAF } from '../../utils/dom';
11
- import { stopEvent } from '../../utils/events';
12
- import { identity } from '../../utils/identity';
13
- import { isEvent } from '../../utils/inspect';
14
- import { looseEqual } from '../../utils/loose-equal';
15
- import { mathMax } from '../../utils/math';
16
- import { makeModelMixin } from '../../utils/model';
17
- import { toInteger } from '../../utils/number';
18
- import { sortKeys } from '../../utils/object';
19
- import { observeDom } from '../../utils/observe-dom';
20
- import { makeProp } from '../../utils/props';
21
- import { stableSort } from '../../utils/stable-sort';
22
- import { props as props$1, idMixin } from '../../mixins/id';
23
- import { normalizeSlotMixin } from '../../mixins/normalize-slot';
24
- import { BLink } from '../link/link';
25
-
26
- // --- Constants ---
27
-
28
- const {
29
- mixin: modelMixin,
30
- props: modelProps,
31
- prop: MODEL_PROP_NAME,
32
- event: MODEL_EVENT_NAME
33
- } = makeModelMixin('value', {
34
- type: PROP_TYPE_NUMBER
35
- });
36
-
37
- // --- Helper methods ---
38
-
39
- // Filter function to filter out disabled tabs
40
- const notDisabled = tab => !tab.disabled;
41
-
42
- // --- Helper components ---
43
-
44
- // @vue/component
45
- const BVTabButton = /*#__PURE__*/extend({
46
- name: NAME_TAB_BUTTON_HELPER,
47
- inject: {
48
- getBvTabs: {
49
- default: /* istanbul ignore next */() => () => ({})
50
- }
51
- },
52
- props: {
53
- controls: makeProp(PROP_TYPE_STRING),
54
- id: makeProp(PROP_TYPE_STRING),
55
- noKeyNav: makeProp(PROP_TYPE_BOOLEAN, false),
56
- posInSet: makeProp(PROP_TYPE_NUMBER),
57
- setSize: makeProp(PROP_TYPE_NUMBER),
58
- // Reference to the child <b-tab> instance
59
- tab: makeProp(),
60
- tabIndex: makeProp(PROP_TYPE_NUMBER)
61
- },
62
- computed: {
63
- bvTabs() {
64
- return this.getBvTabs();
65
- }
66
- },
67
- methods: {
68
- focus() {
69
- attemptFocus(this.$refs.link);
70
- },
71
- handleEvent(event) {
72
- /* istanbul ignore next */
73
- if (this.tab.disabled) {
74
- return;
75
- }
76
- const {
77
- type,
78
- keyCode,
79
- shiftKey
80
- } = event;
81
- if (type === 'click') {
82
- stopEvent(event);
83
- this.$emit(EVENT_NAME_CLICK, event);
84
- } else if (type === 'keydown' && keyCode === CODE_SPACE) {
85
- // For ARIA tabs the SPACE key will also trigger a click/select
86
- // Even with keyboard navigation disabled, SPACE should "click" the button
87
- // See: https://github.com/bootstrap-vue/bootstrap-vue/issues/4323
88
- stopEvent(event);
89
- this.$emit(EVENT_NAME_CLICK, event);
90
- } else if (type === 'keydown' && !this.noKeyNav) {
91
- // For keyboard navigation
92
- if ([CODE_UP, CODE_LEFT, CODE_HOME].indexOf(keyCode) !== -1) {
93
- stopEvent(event);
94
- if (shiftKey || keyCode === CODE_HOME) {
95
- this.$emit(EVENT_NAME_FIRST, event);
96
- } else {
97
- this.$emit(EVENT_NAME_PREV, event);
98
- }
99
- } else if ([CODE_DOWN, CODE_RIGHT, CODE_END].indexOf(keyCode) !== -1) {
100
- stopEvent(event);
101
- if (shiftKey || keyCode === CODE_END) {
102
- this.$emit(EVENT_NAME_LAST, event);
103
- } else {
104
- this.$emit(EVENT_NAME_NEXT, event);
105
- }
106
- }
107
- }
108
- }
109
- },
110
- render(h) {
111
- const {
112
- id,
113
- tabIndex,
114
- setSize,
115
- posInSet,
116
- controls,
117
- handleEvent
118
- } = this;
119
- const {
120
- title,
121
- localActive,
122
- disabled,
123
- titleItemClass,
124
- titleLinkClass,
125
- titleLinkAttributes
126
- } = this.tab;
127
- const $link = h(BLink, {
128
- staticClass: 'nav-link',
129
- class: [{
130
- active: localActive && !disabled,
131
- disabled
132
- }, titleLinkClass,
133
- // Apply <b-tabs> `activeNavItemClass` styles when the tab is active
134
- localActive ? this.bvTabs.activeNavItemClass : null],
135
- props: {
136
- disabled
137
- },
138
- attrs: {
139
- ...titleLinkAttributes,
140
- id,
141
- role: 'tab',
142
- // Roving tab index when keynav enabled
143
- tabindex: tabIndex,
144
- 'aria-selected': localActive && !disabled ? 'true' : 'false',
145
- 'aria-setsize': setSize,
146
- 'aria-posinset': posInSet,
147
- 'aria-controls': controls
148
- },
149
- on: {
150
- click: handleEvent,
151
- keydown: handleEvent
152
- },
153
- ref: 'link'
154
- }, [this.tab.normalizeSlot(SLOT_NAME_TITLE) || title]);
155
- return h('li', {
156
- staticClass: 'nav-item',
157
- class: [titleItemClass],
158
- attrs: {
159
- role: 'presentation'
160
- }
161
- }, [$link]);
162
- }
163
- });
164
-
165
- // --- Props ---
166
- const navProps = {
167
- align: makeProp(PROP_TYPE_STRING),
168
- fill: makeProp(PROP_TYPE_BOOLEAN, false),
169
- justified: makeProp(PROP_TYPE_BOOLEAN, false),
170
- pills: makeProp(PROP_TYPE_BOOLEAN, false),
171
- small: makeProp(PROP_TYPE_BOOLEAN, false)
172
- };
173
- const props = sortKeys({
174
- ...props$1,
175
- ...modelProps,
176
- ...navProps,
177
- // Only applied to the currently active `li`
178
- activeNavItemClass: makeProp(PROP_TYPE_ARRAY_OBJECT_STRING),
179
- // Only applied to the currently active `<b-tab>`
180
- // This prop is sniffed by the `<b-tab>` child
181
- activeTabClass: makeProp(PROP_TYPE_ARRAY_OBJECT_STRING),
182
- contentClass: makeProp(PROP_TYPE_ARRAY_OBJECT_STRING),
183
- // Synonym for 'bottom'
184
- end: makeProp(PROP_TYPE_BOOLEAN, false),
185
- // This prop is sniffed by the `<b-tab>` child
186
- lazy: makeProp(PROP_TYPE_BOOLEAN, false),
187
- navClass: makeProp(PROP_TYPE_ARRAY_OBJECT_STRING),
188
- navWrapperClass: makeProp(PROP_TYPE_ARRAY_OBJECT_STRING),
189
- noFade: makeProp(PROP_TYPE_BOOLEAN, false),
190
- noKeyNav: makeProp(PROP_TYPE_BOOLEAN, false),
191
- noNavStyle: makeProp(PROP_TYPE_BOOLEAN, false),
192
- tag: makeProp(PROP_TYPE_STRING, 'div')
193
- });
194
-
195
- // --- Main component ---
196
-
197
- // @vue/component
198
- const BTabs = /*#__PURE__*/extend({
199
- name: NAME_TABS,
200
- mixins: [idMixin, modelMixin, normalizeSlotMixin],
201
- provide() {
202
- return {
203
- getBvTabs: () => this
204
- };
205
- },
206
- props,
207
- data() {
208
- return {
209
- // Index of current tab
210
- currentTab: toInteger(this[MODEL_PROP_NAME], -1),
211
- // Array of direct child `<b-tab>` instances, in DOM order
212
- tabs: [],
213
- // Array of child instances registered (for triggering reactive updates)
214
- registeredTabs: []
215
- };
216
- },
217
- computed: {
218
- fade() {
219
- // This computed prop is sniffed by the tab child
220
- return !this.noFade;
221
- }
222
- },
223
- watch: {
224
- [MODEL_PROP_NAME](newValue, oldValue) {
225
- if (newValue !== oldValue) {
226
- newValue = toInteger(newValue, -1);
227
- oldValue = toInteger(oldValue, 0);
228
- const $tab = this.tabs[newValue];
229
- if ($tab && !$tab.disabled) {
230
- this.activateTab($tab);
231
- } else {
232
- // Try next or prev tabs
233
- if (newValue < oldValue) {
234
- this.previousTab();
235
- } else {
236
- this.nextTab();
237
- }
238
- }
239
- }
240
- },
241
- currentTab(newValue) {
242
- let index = -1;
243
-
244
- // Ensure only one tab is active at most
245
- this.tabs.forEach(($tab, i) => {
246
- if (i === newValue && !$tab.disabled) {
247
- $tab.localActive = true;
248
- index = i;
249
- } else {
250
- $tab.localActive = false;
251
- }
252
- });
253
-
254
- // Update the v-model
255
- this.$emit(MODEL_EVENT_NAME, index);
256
- },
257
- // If tabs added, removed, or re-ordered, we emit a `changed` event
258
- tabs(newValue, oldValue) {
259
- // We use `_uid` instead of `safeId()`, as the later is changed in a `$nextTick()`
260
- // if no explicit ID is provided, causing duplicate emits
261
- if (!looseEqual(newValue.map($tab => $tab[COMPONENT_UID_KEY]), oldValue.map($tab => $tab[COMPONENT_UID_KEY]))) {
262
- // In a `$nextTick()` to ensure `currentTab` has been set first
263
- this.$nextTick(() => {
264
- // We emit shallow copies of the new and old arrays of tabs,
265
- // to prevent users from potentially mutating the internal arrays
266
- this.$emit(EVENT_NAME_CHANGED, newValue.slice(), oldValue.slice());
267
- });
268
- }
269
- },
270
- // Each `<b-tab>` will register/unregister itself
271
- // We use this to detect when tabs are added/removed
272
- // to trigger the update of the tabs
273
- registeredTabs() {
274
- this.updateTabs();
275
- }
276
- },
277
- created() {
278
- // Create private non-reactive props
279
- this.$_observer = null;
280
- },
281
- mounted() {
282
- this.setObserver(true);
283
- },
284
- beforeDestroy() {
285
- this.setObserver(false);
286
- // Ensure no references to child instances exist
287
- this.tabs = [];
288
- },
289
- methods: {
290
- registerTab($tab) {
291
- if (!arrayIncludes(this.registeredTabs, $tab)) {
292
- this.registeredTabs.push($tab);
293
- }
294
- },
295
- unregisterTab($tab) {
296
- this.registeredTabs = this.registeredTabs.slice().filter($t => $t !== $tab);
297
- },
298
- // DOM observer is needed to detect changes in order of tabs
299
- setObserver() {
300
- let on = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
301
- this.$_observer && this.$_observer.disconnect();
302
- this.$_observer = null;
303
- if (on) {
304
- /* istanbul ignore next: difficult to test mutation observer in JSDOM */
305
- const handler = () => {
306
- this.$nextTick(() => {
307
- requestAF(() => {
308
- this.updateTabs();
309
- });
310
- });
311
- };
312
-
313
- // Watch for changes to `<b-tab>` sub components
314
- this.$_observer = observeDom(this.$refs.content, handler, {
315
- childList: true,
316
- subtree: false,
317
- attributes: true,
318
- attributeFilter: ['id']
319
- });
320
- }
321
- },
322
- getTabs() {
323
- const $tabs = this.registeredTabs;
324
- // Dropped intentionally
325
- // .filter(
326
- // $tab => $tab.$children.filter($t => $t && $t._isTab).length === 0
327
- // )
328
-
329
- // DOM Order of Tabs
330
- let order = [];
331
- /* istanbul ignore next: too difficult to test */
332
- if (IS_BROWSER && $tabs.length > 0) {
333
- // We rely on the DOM when mounted to get the "true" order of the `<b-tab>` children
334
- // `querySelectorAll()` always returns elements in document order, regardless of
335
- // order specified in the selector
336
- const selector = $tabs.map($tab => `#${$tab.safeId()}`).join(', ');
337
- order = selectAll(selector, this.$el).map($el => $el.id).filter(identity);
338
- }
339
-
340
- // Stable sort keeps the original order if not found in the `order` array,
341
- // which will be an empty array before mount
342
- return stableSort($tabs, (a, b) => order.indexOf(a.safeId()) - order.indexOf(b.safeId()));
343
- },
344
- updateTabs() {
345
- const $tabs = this.getTabs();
346
-
347
- // Find last active non-disabled tab in current tabs
348
- // We trust tab state over `currentTab`, in case tabs were added/removed/re-ordered
349
- let tabIndex = $tabs.indexOf($tabs.slice().reverse().find($tab => $tab.localActive && !$tab.disabled));
350
-
351
- // Else try setting to `currentTab`
352
- if (tabIndex < 0) {
353
- const {
354
- currentTab
355
- } = this;
356
- if (currentTab >= $tabs.length) {
357
- // Handle last tab being removed, so find the last non-disabled tab
358
- tabIndex = $tabs.indexOf($tabs.slice().reverse().find(notDisabled));
359
- } else if ($tabs[currentTab] && !$tabs[currentTab].disabled) {
360
- // Current tab is not disabled
361
- tabIndex = currentTab;
362
- }
363
- }
364
-
365
- // Else find first non-disabled tab in current tabs
366
- if (tabIndex < 0) {
367
- tabIndex = $tabs.indexOf($tabs.find(notDisabled));
368
- }
369
-
370
- // Ensure only one tab is active at a time
371
- $tabs.forEach(($tab, index) => {
372
- $tab.localActive = index === tabIndex;
373
- });
374
- this.tabs = $tabs;
375
- this.currentTab = tabIndex;
376
- },
377
- // Find a button that controls a tab, given the tab reference
378
- // Returns the button vm instance
379
- getButtonForTab($tab) {
380
- return (this.$refs.buttons || []).find($btn => $btn.tab === $tab);
381
- },
382
- // Force a button to re-render its content, given a `<b-tab>` instance
383
- // Called by `<b-tab>` on `update()`
384
- updateButton($tab) {
385
- const $button = this.getButtonForTab($tab);
386
- if ($button && $button.$forceUpdate) {
387
- $button.$forceUpdate();
388
- }
389
- },
390
- // Activate a tab given a `<b-tab>` instance
391
- // Also accessed by `<b-tab>`
392
- activateTab($tab) {
393
- const {
394
- currentTab,
395
- tabs: $tabs
396
- } = this;
397
- let result = false;
398
- if ($tab) {
399
- const index = $tabs.indexOf($tab);
400
- if (index !== currentTab && index > -1 && !$tab.disabled) {
401
- const tabEvent = new BvEvent(EVENT_NAME_ACTIVATE_TAB, {
402
- cancelable: true,
403
- vueTarget: this,
404
- componentId: this.safeId()
405
- });
406
- this.$emit(tabEvent.type, index, currentTab, tabEvent);
407
- if (!tabEvent.defaultPrevented) {
408
- this.currentTab = index;
409
- result = true;
410
- }
411
- }
412
- }
413
-
414
- // Couldn't set tab, so ensure v-model is up to date
415
- /* istanbul ignore next: should rarely happen */
416
- if (!result && this[MODEL_PROP_NAME] !== currentTab) {
417
- this.$emit(MODEL_EVENT_NAME, currentTab);
418
- }
419
- return result;
420
- },
421
- // Deactivate a tab given a `<b-tab>` instance
422
- // Accessed by `<b-tab>`
423
- deactivateTab($tab) {
424
- if ($tab) {
425
- // Find first non-disabled tab that isn't the one being deactivated
426
- // If no tabs are available, then don't deactivate current tab
427
- return this.activateTab(this.tabs.filter($t => $t !== $tab).find(notDisabled));
428
- }
429
- /* istanbul ignore next: should never/rarely happen */
430
- return false;
431
- },
432
- // Focus a tab button given its `<b-tab>` instance
433
- focusButton($tab) {
434
- // Wrap in `$nextTick()` to ensure DOM has completed rendering
435
- this.$nextTick(() => {
436
- attemptFocus(this.getButtonForTab($tab));
437
- });
438
- },
439
- // Emit a click event on a specified `<b-tab>` component instance
440
- emitTabClick(tab, event) {
441
- if (isEvent(event) && tab && tab.$emit && !tab.disabled) {
442
- tab.$emit(EVENT_NAME_CLICK, event);
443
- }
444
- },
445
- // Click handler
446
- clickTab($tab, event) {
447
- this.activateTab($tab);
448
- this.emitTabClick($tab, event);
449
- },
450
- // Move to first non-disabled tab
451
- firstTab(focus) {
452
- const $tab = this.tabs.find(notDisabled);
453
- if (this.activateTab($tab) && focus) {
454
- this.focusButton($tab);
455
- this.emitTabClick($tab, focus);
456
- }
457
- },
458
- // Move to previous non-disabled tab
459
- previousTab(focus) {
460
- const currentIndex = mathMax(this.currentTab, 0);
461
- const $tab = this.tabs.slice(0, currentIndex).reverse().find(notDisabled);
462
- if (this.activateTab($tab) && focus) {
463
- this.focusButton($tab);
464
- this.emitTabClick($tab, focus);
465
- }
466
- },
467
- // Move to next non-disabled tab
468
- nextTab(focus) {
469
- const currentIndex = mathMax(this.currentTab, -1);
470
- const $tab = this.tabs.slice(currentIndex + 1).find(notDisabled);
471
- if (this.activateTab($tab) && focus) {
472
- this.focusButton($tab);
473
- this.emitTabClick($tab, focus);
474
- }
475
- },
476
- // Move to last non-disabled tab
477
- lastTab(focus) {
478
- const $tab = this.tabs.slice().reverse().find(notDisabled);
479
- if (this.activateTab($tab) && focus) {
480
- this.focusButton($tab);
481
- this.emitTabClick($tab, focus);
482
- }
483
- }
484
- },
485
- render(h) {
486
- const {
487
- align,
488
- end,
489
- fill,
490
- firstTab,
491
- justified,
492
- lastTab,
493
- nextTab,
494
- noKeyNav,
495
- noNavStyle,
496
- pills,
497
- previousTab,
498
- small,
499
- tabs: $tabs
500
- } = this;
501
-
502
- // Currently active tab
503
- const $activeTab = $tabs.find($tab => $tab.localActive && !$tab.disabled);
504
-
505
- // Tab button to allow focusing when no active tab found (keynav only)
506
- const $fallbackTab = $tabs.find($tab => !$tab.disabled);
507
-
508
- // For each `<b-tab>` found create the tab buttons
509
- const $buttons = $tabs.map(($tab, index) => {
510
- const {
511
- safeId
512
- } = $tab;
513
-
514
- // Ensure at least one tab button is focusable when keynav enabled (if possible)
515
- let tabIndex = null;
516
- if (!noKeyNav) {
517
- // Buttons are not in tab index unless active, or a fallback tab
518
- tabIndex = -1;
519
- if ($tab === $activeTab || !$activeTab && $tab === $fallbackTab) {
520
- // Place tab button in tab sequence
521
- tabIndex = null;
522
- }
523
- }
524
- return h(BVTabButton, {
525
- props: {
526
- controls: safeId ? safeId() : null,
527
- id: $tab.controlledBy || (safeId ? safeId(`_BV_tab_button_`) : null),
528
- noKeyNav,
529
- posInSet: index + 1,
530
- setSize: $tabs.length,
531
- tab: $tab,
532
- tabIndex
533
- },
534
- on: {
535
- [EVENT_NAME_CLICK]: event => {
536
- this.clickTab($tab, event);
537
- },
538
- [EVENT_NAME_FIRST]: firstTab,
539
- [EVENT_NAME_PREV]: previousTab,
540
- [EVENT_NAME_NEXT]: nextTab,
541
- [EVENT_NAME_LAST]: lastTab
542
- },
543
- key: $tab[COMPONENT_UID_KEY] || index,
544
- ref: 'buttons',
545
- // Needed to make `this.$refs.buttons` an array
546
- [REF_FOR_KEY]: true
547
- });
548
- });
549
- const computeJustifyContent = value => {
550
- value = value === 'left' ? 'start' : value === 'right' ? 'end' : value;
551
- return `justify-content-${value}`;
552
- };
553
- let $nav = h('ul', {
554
- staticClass: 'nav',
555
- class: [this.navClass, {
556
- 'nav-tabs': !noNavStyle && !pills,
557
- 'nav-pills': !noNavStyle && pills,
558
- 'nav-fill': fill,
559
- 'nav-justified': justified,
560
- [computeJustifyContent(align)]: align,
561
- small
562
- }],
563
- attrs: {
564
- role: 'tablist',
565
- id: this.safeId('_BV_tab_controls_')
566
- },
567
- ref: 'nav'
568
- }, [this.normalizeSlot(SLOT_NAME_TABS_START) || h(), $buttons, this.normalizeSlot(SLOT_NAME_TABS_END) || h()]);
569
- $nav = h('div', {
570
- class: this.navWrapperClass,
571
- key: 'bv-tabs-nav'
572
- }, [this.normalizeSlot(SLOT_NAME_TOOLBAR_START) || h(), $nav, this.normalizeSlot(SLOT_NAME_TOOLBAR_END) || h()]);
573
- const $children = this.normalizeSlot() || [];
574
- let $empty = h();
575
- if ($children.length === 0) {
576
- $empty = h('div', {
577
- class: ['tab-pane', 'active'],
578
- key: 'bv-empty-tab'
579
- }, this.normalizeSlot(SLOT_NAME_EMPTY));
580
- }
581
- const $content = h('div', {
582
- staticClass: 'tab-content',
583
- class: this.contentClass,
584
- attrs: {
585
- id: this.safeId('_BV_tab_container_')
586
- },
587
- key: 'bv-content',
588
- ref: 'content'
589
- }, [$children, $empty]);
590
-
591
- // Render final output
592
- return h(this.tag, {
593
- staticClass: 'tabs',
594
- attrs: {
595
- id: this.safeId()
596
- }
597
- }, [end ? $content : h(), $nav, end ? h() : $content]);
598
- }
599
- });
600
-
601
- export { BTabs, props };