@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.
- package/package.json +4 -4
- package/src/components/utilities/truncate/truncate.scss +3 -1
- package/src/scss/mixins.scss +3 -1
- package/src/vendor/bootstrap-vue/src/components/tooltip/tooltip.js +86 -25
- package/tailwind.defaults.js +10 -1
- package/dist/charts.js +0 -13
- package/dist/components/base/accordion/accordion.js +0 -69
- package/dist/components/base/accordion/accordion_item.js +0 -160
- package/dist/components/base/accordion/constants.js +0 -3
- package/dist/components/base/alert/alert.js +0 -263
- package/dist/components/base/animated_icon/animated_chevron_down_up_icon.js +0 -45
- package/dist/components/base/animated_icon/animated_chevron_lg_down_up_icon.js +0 -45
- package/dist/components/base/animated_icon/animated_chevron_lg_right_down_icon.js +0 -45
- package/dist/components/base/animated_icon/animated_chevron_right_down_icon.js +0 -45
- package/dist/components/base/animated_icon/animated_duo_chat_icon.js +0 -45
- package/dist/components/base/animated_icon/animated_loader_icon.js +0 -45
- package/dist/components/base/animated_icon/animated_notifications_icon.js +0 -45
- package/dist/components/base/animated_icon/animated_sidebar_icon.js +0 -45
- package/dist/components/base/animated_icon/animated_smile_icon.js +0 -45
- package/dist/components/base/animated_icon/animated_sort_icon.js +0 -45
- package/dist/components/base/animated_icon/animated_star_icon.js +0 -45
- package/dist/components/base/animated_icon/animated_todo_icon.js +0 -45
- package/dist/components/base/animated_icon/animated_upload_icon.js +0 -45
- package/dist/components/base/animated_icon/base_animated_icon.js +0 -77
- package/dist/components/base/attribute_list/attribute_list.js +0 -100
- package/dist/components/base/avatar/avatar.js +0 -175
- package/dist/components/base/avatar/utils.js +0 -17
- package/dist/components/base/avatar_labeled/avatar_labeled.js +0 -198
- package/dist/components/base/avatar_link/avatar_link.js +0 -47
- package/dist/components/base/avatars_inline/avatars_inline.js +0 -139
- package/dist/components/base/badge/badge.js +0 -197
- package/dist/components/base/banner/banner.js +0 -149
- package/dist/components/base/breadcrumb/breadcrumb.js +0 -282
- package/dist/components/base/breadcrumb/breadcrumb_item.js +0 -96
- package/dist/components/base/broadcast_message/broadcast_message.js +0 -113
- package/dist/components/base/broadcast_message/constants.js +0 -5
- package/dist/components/base/button/button.js +0 -419
- package/dist/components/base/button_group/button_group.js +0 -53
- package/dist/components/base/card/card.js +0 -69
- package/dist/components/base/collapse/collapse.js +0 -163
- package/dist/components/base/color_mode_toggle/color_mode_toggle.js +0 -92
- package/dist/components/base/datepicker/datepicker.js +0 -475
- package/dist/components/base/daterange_picker/daterange_picker.js +0 -394
- package/dist/components/base/drawer/drawer.js +0 -156
- package/dist/components/base/dropdown/dropdown.js +0 -330
- package/dist/components/base/dropdown/dropdown_divider.js +0 -48
- package/dist/components/base/dropdown/dropdown_form.js +0 -48
- package/dist/components/base/dropdown/dropdown_item.js +0 -175
- package/dist/components/base/dropdown/dropdown_section_header.js +0 -48
- package/dist/components/base/dropdown/dropdown_text.js +0 -48
- package/dist/components/base/filtered_search/common_story_options.js +0 -14
- package/dist/components/base/filtered_search/filtered_search.js +0 -428
- package/dist/components/base/filtered_search/filtered_search_suggestion.js +0 -95
- package/dist/components/base/filtered_search/filtered_search_suggestion_list.js +0 -139
- package/dist/components/base/filtered_search/filtered_search_term.js +0 -217
- package/dist/components/base/filtered_search/filtered_search_token.js +0 -383
- package/dist/components/base/filtered_search/filtered_search_token_segment.js +0 -444
- package/dist/components/base/filtered_search/filtered_search_utils.js +0 -241
- package/dist/components/base/form/form.js +0 -43
- package/dist/components/base/form/form_character_count/form_character_count.js +0 -107
- package/dist/components/base/form/form_checkbox/form_checkbox.js +0 -342
- package/dist/components/base/form/form_checkbox/form_checkbox_group.js +0 -186
- package/dist/components/base/form/form_combobox/constants.js +0 -55
- package/dist/components/base/form/form_combobox/form_combobox.js +0 -239
- package/dist/components/base/form/form_date/form_date.js +0 -143
- package/dist/components/base/form/form_fields/form_field_validator.js +0 -93
- package/dist/components/base/form/form_fields/form_fields.js +0 -289
- package/dist/components/base/form/form_fields/form_fields_loop.js +0 -75
- package/dist/components/base/form/form_fields/mappers.js +0 -13
- package/dist/components/base/form/form_fields/validators.js +0 -48
- package/dist/components/base/form/form_group/form_group.js +0 -119
- package/dist/components/base/form/form_input/form_input.js +0 -695
- package/dist/components/base/form/form_input_group/form_input_group.js +0 -120
- package/dist/components/base/form/form_input_group/form_input_group_mixin.js +0 -41
- package/dist/components/base/form/form_radio/form_radio.js +0 -259
- package/dist/components/base/form/form_radio_group/form_radio_group.js +0 -187
- package/dist/components/base/form/form_select/constants.js +0 -12
- package/dist/components/base/form/form_select/form_select.js +0 -96
- package/dist/components/base/form/form_textarea/form_textarea.js +0 -166
- package/dist/components/base/form/input_group_text/input_group_text.js +0 -43
- package/dist/components/base/icon/icon.js +0 -113
- package/dist/components/base/illustration/illustration.js +0 -80
- package/dist/components/base/infinite_scroll/infinite_scroll.js +0 -196
- package/dist/components/base/keyset_pagination/keyset_pagination.js +0 -152
- package/dist/components/base/label/label.js +0 -174
- package/dist/components/base/link/link.js +0 -332
- package/dist/components/base/loading_icon/loading_icon.js +0 -120
- package/dist/components/base/markdown/markdown.js +0 -50
- package/dist/components/base/modal/modal.js +0 -259
- package/dist/components/base/new_dropdowns/base_dropdown/base_dropdown.js +0 -716
- package/dist/components/base/new_dropdowns/base_dropdown/constants.js +0 -5
- package/dist/components/base/new_dropdowns/base_dropdown/dropdown_container.js +0 -32
- package/dist/components/base/new_dropdowns/constants.js +0 -24
- package/dist/components/base/new_dropdowns/disclosure/constants.js +0 -8
- package/dist/components/base/new_dropdowns/disclosure/disclosure_dropdown.js +0 -400
- package/dist/components/base/new_dropdowns/disclosure/disclosure_dropdown_group.js +0 -112
- package/dist/components/base/new_dropdowns/disclosure/disclosure_dropdown_item.js +0 -196
- package/dist/components/base/new_dropdowns/disclosure/mock_data.js +0 -168
- package/dist/components/base/new_dropdowns/disclosure/utils.js +0 -84
- package/dist/components/base/new_dropdowns/listbox/listbox.js +0 -997
- package/dist/components/base/new_dropdowns/listbox/listbox_group.js +0 -58
- package/dist/components/base/new_dropdowns/listbox/listbox_item.js +0 -112
- package/dist/components/base/new_dropdowns/listbox/listbox_search_input.js +0 -94
- package/dist/components/base/new_dropdowns/listbox/mock_data.js +0 -131
- package/dist/components/base/new_dropdowns/listbox/utils.js +0 -33
- package/dist/components/base/pagination/pagination.js +0 -397
- package/dist/components/base/path/data.js +0 -34
- package/dist/components/base/path/path.js +0 -177
- package/dist/components/base/popover/popover.js +0 -142
- package/dist/components/base/progress_bar/progress_bar.js +0 -117
- package/dist/components/base/search_box_by_click/search_box_by_click.js +0 -245
- package/dist/components/base/search_box_by_type/search_box_by_type.js +0 -187
- package/dist/components/base/segmented_control/segmented_control.js +0 -73
- package/dist/components/base/skeleton_loader/skeleton_loader.js +0 -232
- package/dist/components/base/sorting/sorting.js +0 -180
- package/dist/components/base/table/constants.js +0 -5
- package/dist/components/base/table/table.js +0 -187
- package/dist/components/base/table_lite/table_lite.js +0 -80
- package/dist/components/base/tabs/constants.js +0 -3
- package/dist/components/base/tabs/tab/tab.js +0 -113
- package/dist/components/base/tabs/tabs/scrollable_tabs.js +0 -162
- package/dist/components/base/tabs/tabs/tabs.js +0 -223
- package/dist/components/base/toast/index.js +0 -66
- package/dist/components/base/toast/toast.js +0 -125
- package/dist/components/base/toast/toaster.js +0 -87
- package/dist/components/base/toggle/toggle.js +0 -178
- package/dist/components/base/token/token.js +0 -97
- package/dist/components/base/token_selector/helpers.js +0 -5
- package/dist/components/base/token_selector/token_container.js +0 -160
- package/dist/components/base/token_selector/token_selector.js +0 -454
- package/dist/components/base/token_selector/token_selector_dropdown.js +0 -223
- package/dist/components/base/tooltip/tooltip.js +0 -54
- package/dist/components/charts/area/area.js +0 -329
- package/dist/components/charts/bar/bar.js +0 -207
- package/dist/components/charts/chart/chart.js +0 -215
- package/dist/components/charts/column/column.js +0 -221
- package/dist/components/charts/discrete_scatter/discrete_scatter.js +0 -199
- package/dist/components/charts/gauge/gauge.js +0 -205
- package/dist/components/charts/heatmap/heatmap.js +0 -299
- package/dist/components/charts/heatmap/index.js +0 -2
- package/dist/components/charts/legend/legend.js +0 -245
- package/dist/components/charts/line/line.js +0 -340
- package/dist/components/charts/series_label/series_label.js +0 -101
- package/dist/components/charts/shared/tooltip/tooltip.js +0 -369
- package/dist/components/charts/shared/tooltip/tooltip_default_format/tooltip_default_format.js +0 -53
- package/dist/components/charts/single_stat/single_stat.js +0 -164
- package/dist/components/charts/sparkline/sparkline.js +0 -299
- package/dist/components/charts/stacked_column/stacked_column.js +0 -380
- package/dist/components/dashboards/dashboard_layout/dashboard_layout.js +0 -125
- package/dist/components/dashboards/dashboard_layout/grid_layout/grid_layout.js +0 -326
- package/dist/components/dashboards/dashboard_layout/validators.js +0 -14
- package/dist/components/dashboards/dashboard_panel/dashboard_panel.js +0 -236
- package/dist/components/dashboards/mock_data.js +0 -49
- package/dist/components/experimental/experiment_badge/constants.js +0 -4
- package/dist/components/experimental/experiment_badge/experiment_badge.js +0 -102
- package/dist/components/extended/multi_step_form_template/multi_step_form_template.js +0 -87
- package/dist/components/index.js +0 -107
- package/dist/components/mixins/button_mixin.js +0 -11
- package/dist/components/mixins/safe_link_mixin.js +0 -30
- package/dist/components/mixins/tooltip_mixin.js +0 -21
- package/dist/components/regions/dashboard_skeleton/dashboard_skeleton.js +0 -53
- package/dist/components/regions/empty_state/empty_state.js +0 -181
- package/dist/components/shared_components/clear_icon_button/clear_icon_button.js +0 -64
- package/dist/components/shared_components/clipboard_button/clipboard_button.js +0 -100
- package/dist/components/shared_components/close_button/close_button.js +0 -55
- package/dist/components/utilities/animated_number/animated_number.js +0 -131
- package/dist/components/utilities/friendly_wrap/friendly_wrap.js +0 -75
- package/dist/components/utilities/intersection_observer/intersection_observer.js +0 -88
- package/dist/components/utilities/intersperse/intersperse.js +0 -104
- package/dist/components/utilities/sprintf/sprintf.js +0 -171
- package/dist/components/utilities/truncate/constants.js +0 -8
- package/dist/components/utilities/truncate/truncate.js +0 -154
- package/dist/components/utilities/truncate_text/constants.js +0 -7
- package/dist/components/utilities/truncate_text/truncate_text.js +0 -146
- package/dist/config.js +0 -53
- package/dist/directives/hover_load/hover_load.js +0 -45
- package/dist/directives/index.js +0 -8
- package/dist/directives/modal.js +0 -1
- package/dist/directives/outside/outside.js +0 -149
- package/dist/directives/resize_observer/resize_observer.js +0 -58
- package/dist/directives/safe_html/constants.js +0 -6
- package/dist/directives/safe_html/safe_html.js +0 -39
- package/dist/directives/safe_link/mock_data.js +0 -10
- package/dist/directives/safe_link/safe_link.js +0 -67
- package/dist/directives/tooltip/container.js +0 -7
- package/dist/directives/tooltip/tooltip.js +0 -18
- package/dist/index.css +0 -7
- package/dist/index.css.map +0 -1
- package/dist/index.js +0 -2
- package/dist/tailwind.css +0 -2
- package/dist/tailwind.css.map +0 -1
- package/dist/tokens/build/js/tokens.dark.js +0 -1410
- package/dist/tokens/build/js/tokens.js +0 -1410
- package/dist/tokens/common_story_options.js +0 -29
- package/dist/tokens/tokens_story.js +0 -76
- package/dist/utils/breakpoints.js +0 -20
- package/dist/utils/charts/config.js +0 -616
- package/dist/utils/charts/constants.js +0 -69
- package/dist/utils/charts/mock_data.js +0 -191
- package/dist/utils/charts/story_config.js +0 -24
- package/dist/utils/charts/theme.js +0 -200
- package/dist/utils/charts/utils.js +0 -54
- package/dist/utils/constants.js +0 -333
- package/dist/utils/data_utils.js +0 -19
- package/dist/utils/datetime_utility.js +0 -61
- package/dist/utils/equality_utils.js +0 -84
- package/dist/utils/i18n.js +0 -65
- package/dist/utils/is_slot_empty.js +0 -34
- package/dist/utils/number_utils.js +0 -132
- package/dist/utils/play_utils.js +0 -11
- package/dist/utils/set_utils.js +0 -25
- package/dist/utils/stories_constants.js +0 -29
- package/dist/utils/stories_utils.js +0 -62
- package/dist/utils/story_decorators/container.js +0 -19
- package/dist/utils/string_utils.js +0 -69
- package/dist/utils/svgs/svg_paths.js +0 -7
- package/dist/utils/test_utils.js +0 -33
- package/dist/utils/use_fake_date.js +0 -29
- package/dist/utils/use_mock_intersection_observer.js +0 -105
- package/dist/utils/utils.js +0 -205
- package/dist/utils.js +0 -5
- package/dist/vendor/bootstrap-vue/src/bv-config.js +0 -8
- package/dist/vendor/bootstrap-vue/src/components/button/button-close.js +0 -81
- package/dist/vendor/bootstrap-vue/src/components/button/button.js +0 -204
- package/dist/vendor/bootstrap-vue/src/components/button/index.js +0 -2
- package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-divider.js +0 -41
- package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-form.js +0 -52
- package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-group.js +0 -75
- package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-header.js +0 -52
- package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-item-button.js +0 -85
- package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-item.js +0 -97
- package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-text.js +0 -60
- package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown.js +0 -271
- package/dist/vendor/bootstrap-vue/src/components/dropdown/index.js +0 -8
- package/dist/vendor/bootstrap-vue/src/components/form/form-invalid-feedback.js +0 -53
- package/dist/vendor/bootstrap-vue/src/components/form/form-text.js +0 -55
- package/dist/vendor/bootstrap-vue/src/components/form/form-valid-feedback.js +0 -53
- package/dist/vendor/bootstrap-vue/src/components/form/form.js +0 -56
- package/dist/vendor/bootstrap-vue/src/components/form/index.js +0 -4
- package/dist/vendor/bootstrap-vue/src/components/form-group/form-group.js +0 -348
- package/dist/vendor/bootstrap-vue/src/components/form-group/index.js +0 -1
- package/dist/vendor/bootstrap-vue/src/components/form-select/form-select-option-group.js +0 -54
- package/dist/vendor/bootstrap-vue/src/components/form-select/form-select-option.js +0 -41
- package/dist/vendor/bootstrap-vue/src/components/form-select/form-select.js +0 -143
- package/dist/vendor/bootstrap-vue/src/components/form-select/helpers/mixin-options.js +0 -56
- package/dist/vendor/bootstrap-vue/src/components/form-select/index.js +0 -3
- package/dist/vendor/bootstrap-vue/src/components/form-textarea/form-textarea.js +0 -217
- package/dist/vendor/bootstrap-vue/src/components/form-textarea/index.js +0 -1
- package/dist/vendor/bootstrap-vue/src/components/layout/col.js +0 -156
- package/dist/vendor/bootstrap-vue/src/components/layout/form-row.js +0 -34
- package/dist/vendor/bootstrap-vue/src/components/layout/index.js +0 -2
- package/dist/vendor/bootstrap-vue/src/components/link/index.js +0 -1
- package/dist/vendor/bootstrap-vue/src/components/link/link.js +0 -283
- package/dist/vendor/bootstrap-vue/src/components/modal/helpers/bv-modal-event.class.js +0 -21
- package/dist/vendor/bootstrap-vue/src/components/modal/helpers/modal-manager.js +0 -212
- package/dist/vendor/bootstrap-vue/src/components/modal/index.js +0 -1
- package/dist/vendor/bootstrap-vue/src/components/modal/modal.js +0 -887
- package/dist/vendor/bootstrap-vue/src/components/popover/helpers/bv-popover-template.js +0 -55
- package/dist/vendor/bootstrap-vue/src/components/popover/helpers/bv-popover.js +0 -31
- package/dist/vendor/bootstrap-vue/src/components/popover/index.js +0 -1
- package/dist/vendor/bootstrap-vue/src/components/popover/popover.js +0 -49
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/constants.js +0 -22
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/default-sort-compare.js +0 -64
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/filter-event.js +0 -40
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-bottom-row.js +0 -43
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-busy.js +0 -83
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-caption.js +0 -50
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-colgroup.js +0 -32
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-empty.js +0 -82
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-filtering.js +0 -274
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-items.js +0 -154
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-pagination.js +0 -44
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-provider.js +0 -191
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-selectable.js +0 -213
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-sorting.js +0 -275
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-stacked.js +0 -39
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-table-renderer.js +0 -186
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-tbody-row.js +0 -338
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-tbody.js +0 -243
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-tfoot.js +0 -50
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-thead.js +0 -218
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-top-row.js +0 -42
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/normalize-fields.js +0 -86
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/sanitize-row.js +0 -32
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/stringify-record-values.js +0 -11
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/text-selection-active.js +0 -14
- package/dist/vendor/bootstrap-vue/src/components/table/index.js +0 -9
- package/dist/vendor/bootstrap-vue/src/components/table/table-lite.js +0 -51
- package/dist/vendor/bootstrap-vue/src/components/table/table-simple.js +0 -44
- package/dist/vendor/bootstrap-vue/src/components/table/table.js +0 -67
- package/dist/vendor/bootstrap-vue/src/components/table/tbody.js +0 -116
- package/dist/vendor/bootstrap-vue/src/components/table/td.js +0 -204
- package/dist/vendor/bootstrap-vue/src/components/table/tfoot.js +0 -96
- package/dist/vendor/bootstrap-vue/src/components/table/th.js +0 -26
- package/dist/vendor/bootstrap-vue/src/components/table/thead.js +0 -99
- package/dist/vendor/bootstrap-vue/src/components/table/tr.js +0 -121
- package/dist/vendor/bootstrap-vue/src/components/tabs/index.js +0 -2
- package/dist/vendor/bootstrap-vue/src/components/tabs/tab.js +0 -238
- package/dist/vendor/bootstrap-vue/src/components/tabs/tabs.js +0 -601
- package/dist/vendor/bootstrap-vue/src/components/tooltip/helpers/bv-popper.js +0 -251
- package/dist/vendor/bootstrap-vue/src/components/tooltip/helpers/bv-tooltip-template.js +0 -118
- package/dist/vendor/bootstrap-vue/src/components/tooltip/helpers/bv-tooltip.js +0 -932
- package/dist/vendor/bootstrap-vue/src/components/tooltip/index.js +0 -1
- package/dist/vendor/bootstrap-vue/src/components/tooltip/tooltip.js +0 -269
- package/dist/vendor/bootstrap-vue/src/components/transition/bv-transition.js +0 -103
- package/dist/vendor/bootstrap-vue/src/components/transporter/transporter.js +0 -205
- package/dist/vendor/bootstrap-vue/src/constants/components.js +0 -55
- package/dist/vendor/bootstrap-vue/src/constants/config.js +0 -11
- package/dist/vendor/bootstrap-vue/src/constants/env.js +0 -36
- package/dist/vendor/bootstrap-vue/src/constants/events.js +0 -56
- package/dist/vendor/bootstrap-vue/src/constants/key-codes.js +0 -11
- package/dist/vendor/bootstrap-vue/src/constants/popper.js +0 -10
- package/dist/vendor/bootstrap-vue/src/constants/props.js +0 -24
- package/dist/vendor/bootstrap-vue/src/constants/regex.js +0 -35
- package/dist/vendor/bootstrap-vue/src/constants/safe-types.js +0 -15
- package/dist/vendor/bootstrap-vue/src/constants/slots.js +0 -36
- package/dist/vendor/bootstrap-vue/src/directives/modal/index.js +0 -1
- package/dist/vendor/bootstrap-vue/src/directives/modal/modal.js +0 -112
- package/dist/vendor/bootstrap-vue/src/directives/tooltip/index.js +0 -1
- package/dist/vendor/bootstrap-vue/src/directives/tooltip/tooltip.js +0 -265
- package/dist/vendor/bootstrap-vue/src/directives/visible/index.js +0 -1
- package/dist/vendor/bootstrap-vue/src/directives/visible/visible.js +0 -187
- package/dist/vendor/bootstrap-vue/src/mixins/attrs.js +0 -5
- package/dist/vendor/bootstrap-vue/src/mixins/click-out.js +0 -54
- package/dist/vendor/bootstrap-vue/src/mixins/dropdown.js +0 -470
- package/dist/vendor/bootstrap-vue/src/mixins/focus-in.js +0 -46
- package/dist/vendor/bootstrap-vue/src/mixins/form-control.js +0 -73
- package/dist/vendor/bootstrap-vue/src/mixins/form-custom.js +0 -26
- package/dist/vendor/bootstrap-vue/src/mixins/form-options.js +0 -91
- package/dist/vendor/bootstrap-vue/src/mixins/form-selection.js +0 -62
- package/dist/vendor/bootstrap-vue/src/mixins/form-size.js +0 -26
- package/dist/vendor/bootstrap-vue/src/mixins/form-state.js +0 -50
- package/dist/vendor/bootstrap-vue/src/mixins/form-text.js +0 -293
- package/dist/vendor/bootstrap-vue/src/mixins/form-validity.js +0 -50
- package/dist/vendor/bootstrap-vue/src/mixins/has-listener.js +0 -29
- package/dist/vendor/bootstrap-vue/src/mixins/id.js +0 -57
- package/dist/vendor/bootstrap-vue/src/mixins/listen-on-document.js +0 -63
- package/dist/vendor/bootstrap-vue/src/mixins/listen-on-root.js +0 -121
- package/dist/vendor/bootstrap-vue/src/mixins/listen-on-window.js +0 -63
- package/dist/vendor/bootstrap-vue/src/mixins/listeners.js +0 -25
- package/dist/vendor/bootstrap-vue/src/mixins/model.js +0 -10
- package/dist/vendor/bootstrap-vue/src/mixins/normalize-slot.js +0 -30
- package/dist/vendor/bootstrap-vue/src/mixins/scoped-style.js +0 -18
- package/dist/vendor/bootstrap-vue/src/mixins/use-parent.js +0 -14
- package/dist/vendor/bootstrap-vue/src/utils/array.js +0 -28
- package/dist/vendor/bootstrap-vue/src/utils/bv-event.class.js +0 -60
- package/dist/vendor/bootstrap-vue/src/utils/cache.js +0 -60
- package/dist/vendor/bootstrap-vue/src/utils/clone-deep.js +0 -18
- package/dist/vendor/bootstrap-vue/src/utils/config-set.js +0 -86
- package/dist/vendor/bootstrap-vue/src/utils/config.js +0 -71
- package/dist/vendor/bootstrap-vue/src/utils/create-new-child-component.js +0 -133
- package/dist/vendor/bootstrap-vue/src/utils/css-escape.js +0 -70
- package/dist/vendor/bootstrap-vue/src/utils/dom.js +0 -298
- package/dist/vendor/bootstrap-vue/src/utils/element-to-vue-instance-registry.js +0 -28
- package/dist/vendor/bootstrap-vue/src/utils/env.js +0 -16
- package/dist/vendor/bootstrap-vue/src/utils/events.js +0 -78
- package/dist/vendor/bootstrap-vue/src/utils/get-event-root.js +0 -5
- package/dist/vendor/bootstrap-vue/src/utils/get-instance-from-directive.js +0 -3
- package/dist/vendor/bootstrap-vue/src/utils/get-scope-id.js +0 -9
- package/dist/vendor/bootstrap-vue/src/utils/get.js +0 -63
- package/dist/vendor/bootstrap-vue/src/utils/html.js +0 -16
- package/dist/vendor/bootstrap-vue/src/utils/identity.js +0 -3
- package/dist/vendor/bootstrap-vue/src/utils/inspect.js +0 -35
- package/dist/vendor/bootstrap-vue/src/utils/locale.js +0 -19
- package/dist/vendor/bootstrap-vue/src/utils/loose-equal.js +0 -59
- package/dist/vendor/bootstrap-vue/src/utils/loose-index-of.js +0 -13
- package/dist/vendor/bootstrap-vue/src/utils/math.js +0 -9
- package/dist/vendor/bootstrap-vue/src/utils/memoize.js +0 -14
- package/dist/vendor/bootstrap-vue/src/utils/model.js +0 -33
- package/dist/vendor/bootstrap-vue/src/utils/noop.js +0 -3
- package/dist/vendor/bootstrap-vue/src/utils/normalize-slot.js +0 -51
- package/dist/vendor/bootstrap-vue/src/utils/number.js +0 -23
- package/dist/vendor/bootstrap-vue/src/utils/object.js +0 -72
- package/dist/vendor/bootstrap-vue/src/utils/observe-dom.js +0 -76
- package/dist/vendor/bootstrap-vue/src/utils/on-instance-destroy.js +0 -22
- package/dist/vendor/bootstrap-vue/src/utils/plugins.js +0 -124
- package/dist/vendor/bootstrap-vue/src/utils/props.js +0 -67
- package/dist/vendor/bootstrap-vue/src/utils/router.js +0 -150
- package/dist/vendor/bootstrap-vue/src/utils/safe-vue-instance.js +0 -14
- package/dist/vendor/bootstrap-vue/src/utils/stable-sort.js +0 -28
- package/dist/vendor/bootstrap-vue/src/utils/string.js +0 -47
- package/dist/vendor/bootstrap-vue/src/utils/stringify-object-values.js +0 -31
- package/dist/vendor/bootstrap-vue/src/utils/warn.js +0 -45
- package/dist/vendor/bootstrap-vue/src/vue.js +0 -55
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { BTooltip } from './tooltip';
|
|
@@ -1,269 +0,0 @@
|
|
|
1
|
-
import { extend } from '../../vue';
|
|
2
|
-
import { NAME_TOOLTIP } from '../../constants/components';
|
|
3
|
-
import { EVENT_NAME_DISABLE, EVENT_NAME_ENABLE, EVENT_NAME_SHOW, EVENT_NAME_SHOWN, EVENT_NAME_HIDE, EVENT_NAME_HIDDEN, EVENT_NAME_DISABLED, EVENT_NAME_ENABLED, EVENT_NAME_OPEN, EVENT_NAME_CLOSE, MODEL_EVENT_NAME_PREFIX } from '../../constants/events';
|
|
4
|
-
import { PROP_TYPE_OBJECT, PROP_TYPE_STRING, PROP_TYPE_NUMBER_STRING, PROP_TYPE_NUMBER_OBJECT_STRING, PROP_TYPE_BOOLEAN, PROP_TYPE_ARRAY_STRING, PROP_TYPE_FUNCTION } from '../../constants/props';
|
|
5
|
-
import { HTMLElement, SVGElement } from '../../constants/safe-types';
|
|
6
|
-
import { useParentMixin } from '../../mixins/use-parent';
|
|
7
|
-
import { getScopeId } from '../../utils/get-scope-id';
|
|
8
|
-
import { isUndefinedOrNull } from '../../utils/inspect';
|
|
9
|
-
import { pick } from '../../utils/object';
|
|
10
|
-
import { TOOLTIP_DELAY } from '../../constants/config';
|
|
11
|
-
import { makeProp } from '../../utils/props';
|
|
12
|
-
import { createNewChildComponent, eventProp } from '../../utils/create-new-child-component';
|
|
13
|
-
import { normalizeSlotMixin } from '../../mixins/normalize-slot';
|
|
14
|
-
import { BVTooltip } from './helpers/bv-tooltip';
|
|
15
|
-
|
|
16
|
-
// --- Constants ---
|
|
17
|
-
|
|
18
|
-
const MODEL_PROP_NAME_ENABLED = 'disabled';
|
|
19
|
-
const MODEL_EVENT_NAME_ENABLED = MODEL_EVENT_NAME_PREFIX + MODEL_PROP_NAME_ENABLED;
|
|
20
|
-
const MODEL_PROP_NAME_SHOW = 'show';
|
|
21
|
-
const MODEL_EVENT_NAME_SHOW = MODEL_EVENT_NAME_PREFIX + MODEL_PROP_NAME_SHOW;
|
|
22
|
-
|
|
23
|
-
// --- Props ---
|
|
24
|
-
|
|
25
|
-
const props = {
|
|
26
|
-
// String: scrollParent, window, or viewport
|
|
27
|
-
// Element: element reference
|
|
28
|
-
// Object: Vue component
|
|
29
|
-
boundary: makeProp([HTMLElement, PROP_TYPE_OBJECT, PROP_TYPE_STRING], 'scrollParent'),
|
|
30
|
-
boundaryPadding: makeProp(PROP_TYPE_NUMBER_STRING, 5),
|
|
31
|
-
// String: HTML ID of container, if null body is used (default)
|
|
32
|
-
// HTMLElement: element reference reference
|
|
33
|
-
// Object: Vue Component
|
|
34
|
-
container: makeProp([HTMLElement, PROP_TYPE_OBJECT, PROP_TYPE_STRING]),
|
|
35
|
-
customClass: makeProp(PROP_TYPE_STRING, 'gl-tooltip'),
|
|
36
|
-
delay: makeProp(PROP_TYPE_NUMBER_OBJECT_STRING, TOOLTIP_DELAY),
|
|
37
|
-
[MODEL_PROP_NAME_ENABLED]: makeProp(PROP_TYPE_BOOLEAN, false),
|
|
38
|
-
fallbackPlacement: makeProp(PROP_TYPE_ARRAY_STRING, 'flip'),
|
|
39
|
-
// ID to use for tooltip element
|
|
40
|
-
// If not provided on will automatically be generated
|
|
41
|
-
id: makeProp(PROP_TYPE_STRING),
|
|
42
|
-
noFade: makeProp(PROP_TYPE_BOOLEAN, false),
|
|
43
|
-
noninteractive: makeProp(PROP_TYPE_BOOLEAN, false),
|
|
44
|
-
offset: makeProp(PROP_TYPE_NUMBER_STRING, 0),
|
|
45
|
-
placement: makeProp(PROP_TYPE_STRING, 'top'),
|
|
46
|
-
[MODEL_PROP_NAME_SHOW]: makeProp(PROP_TYPE_BOOLEAN, false),
|
|
47
|
-
// String ID of element, or element/component reference
|
|
48
|
-
// Or function that returns one of the above
|
|
49
|
-
// Required
|
|
50
|
-
target: makeProp([HTMLElement, SVGElement, PROP_TYPE_FUNCTION, PROP_TYPE_OBJECT, PROP_TYPE_STRING], undefined, true),
|
|
51
|
-
title: makeProp(PROP_TYPE_STRING),
|
|
52
|
-
triggers: makeProp(PROP_TYPE_ARRAY_STRING, 'hover focus'),
|
|
53
|
-
variant: makeProp(PROP_TYPE_STRING)
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
// --- Main component ---
|
|
57
|
-
|
|
58
|
-
// @vue/component
|
|
59
|
-
const BTooltip = /*#__PURE__*/extend({
|
|
60
|
-
name: NAME_TOOLTIP,
|
|
61
|
-
mixins: [normalizeSlotMixin, useParentMixin],
|
|
62
|
-
inheritAttrs: false,
|
|
63
|
-
props,
|
|
64
|
-
data() {
|
|
65
|
-
return {
|
|
66
|
-
localShow: this[MODEL_PROP_NAME_SHOW],
|
|
67
|
-
localTitle: '',
|
|
68
|
-
localContent: ''
|
|
69
|
-
};
|
|
70
|
-
},
|
|
71
|
-
computed: {
|
|
72
|
-
// Data that will be passed to the template and popper
|
|
73
|
-
templateData() {
|
|
74
|
-
return {
|
|
75
|
-
title: this.localTitle,
|
|
76
|
-
content: this.localContent,
|
|
77
|
-
interactive: !this.noninteractive,
|
|
78
|
-
// Pass these props as is
|
|
79
|
-
...pick(this.$props, ['boundary', 'boundaryPadding', 'container', 'customClass', 'delay', 'fallbackPlacement', 'id', 'noFade', 'offset', 'placement', 'target', 'target', 'triggers', 'variant', MODEL_PROP_NAME_ENABLED])
|
|
80
|
-
};
|
|
81
|
-
},
|
|
82
|
-
// Used to watch for changes to the title and content props
|
|
83
|
-
templateTitleContent() {
|
|
84
|
-
const {
|
|
85
|
-
title,
|
|
86
|
-
content
|
|
87
|
-
} = this;
|
|
88
|
-
return {
|
|
89
|
-
title,
|
|
90
|
-
content
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
|
-
},
|
|
94
|
-
watch: {
|
|
95
|
-
[MODEL_PROP_NAME_SHOW](newValue, oldValue) {
|
|
96
|
-
if (newValue !== oldValue && newValue !== this.localShow && this.$_toolpop) {
|
|
97
|
-
if (newValue) {
|
|
98
|
-
this.$_toolpop.show();
|
|
99
|
-
} else {
|
|
100
|
-
// We use `forceHide()` to override any active triggers
|
|
101
|
-
this.$_toolpop.forceHide();
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
},
|
|
105
|
-
[MODEL_PROP_NAME_ENABLED](newValue) {
|
|
106
|
-
if (newValue) {
|
|
107
|
-
this[EVENT_NAME_DISABLE]();
|
|
108
|
-
} else {
|
|
109
|
-
this[EVENT_NAME_ENABLE]();
|
|
110
|
-
}
|
|
111
|
-
},
|
|
112
|
-
localShow(newValue) {
|
|
113
|
-
// TODO: May need to be done in a `$nextTick()`
|
|
114
|
-
this.$emit(MODEL_EVENT_NAME_SHOW, newValue);
|
|
115
|
-
},
|
|
116
|
-
templateData() {
|
|
117
|
-
this.$nextTick(() => {
|
|
118
|
-
if (this.$_toolpop) {
|
|
119
|
-
this.$_toolpop.updateData(this.templateData);
|
|
120
|
-
}
|
|
121
|
-
});
|
|
122
|
-
},
|
|
123
|
-
// Watchers for title/content props (prop changes do not trigger the `updated()` hook)
|
|
124
|
-
templateTitleContent() {
|
|
125
|
-
this.$nextTick(this.updateContent);
|
|
126
|
-
}
|
|
127
|
-
},
|
|
128
|
-
created() {
|
|
129
|
-
// Create private non-reactive props
|
|
130
|
-
this.$_toolpop = null;
|
|
131
|
-
},
|
|
132
|
-
updated() {
|
|
133
|
-
// Update the `propData` object
|
|
134
|
-
// Done in a `$nextTick()` to ensure slot(s) have updated
|
|
135
|
-
this.$nextTick(this.updateContent);
|
|
136
|
-
},
|
|
137
|
-
beforeDestroy() {
|
|
138
|
-
// Destroy the tip instance
|
|
139
|
-
if (this.$_toolpop) {
|
|
140
|
-
this.$_toolpop.$destroy();
|
|
141
|
-
this.$_toolpop = null;
|
|
142
|
-
}
|
|
143
|
-
},
|
|
144
|
-
mounted() {
|
|
145
|
-
// Instantiate a new BVTooltip instance
|
|
146
|
-
// Done in a `$nextTick()` to ensure DOM has completed rendering
|
|
147
|
-
// so that target can be found
|
|
148
|
-
this.$nextTick(() => {
|
|
149
|
-
// Load the on demand child instance
|
|
150
|
-
const Component = this.getComponent();
|
|
151
|
-
// Ensure we have initial content
|
|
152
|
-
this.updateContent();
|
|
153
|
-
// Pass down the scoped style attribute if available
|
|
154
|
-
const scopeId = getScopeId(this) || getScopeId(this.bvParent);
|
|
155
|
-
// Create the instance
|
|
156
|
-
const $toolpop = this.$_toolpop = createNewChildComponent(this, Component, {
|
|
157
|
-
// Pass down the scoped style ID
|
|
158
|
-
_scopeId: scopeId || undefined,
|
|
159
|
-
propsData: {
|
|
160
|
-
[eventProp(EVENT_NAME_SHOW)]: this.onShow,
|
|
161
|
-
[eventProp(EVENT_NAME_SHOWN)]: this.onShown,
|
|
162
|
-
[eventProp(EVENT_NAME_HIDE)]: this.onHide,
|
|
163
|
-
[eventProp(EVENT_NAME_HIDDEN)]: this.onHidden,
|
|
164
|
-
[eventProp(EVENT_NAME_DISABLED)]: this.onDisabled,
|
|
165
|
-
[eventProp(EVENT_NAME_ENABLED)]: this.onEnabled
|
|
166
|
-
}
|
|
167
|
-
});
|
|
168
|
-
// Set the initial data
|
|
169
|
-
$toolpop.updateData(this.templateData);
|
|
170
|
-
// Initially disabled?
|
|
171
|
-
if (this[MODEL_PROP_NAME_ENABLED]) {
|
|
172
|
-
// Initially disabled
|
|
173
|
-
this[EVENT_NAME_DISABLE]();
|
|
174
|
-
}
|
|
175
|
-
// Initially show tooltip?
|
|
176
|
-
if (this.localShow) {
|
|
177
|
-
$toolpop.show();
|
|
178
|
-
}
|
|
179
|
-
});
|
|
180
|
-
},
|
|
181
|
-
methods: {
|
|
182
|
-
getComponent() {
|
|
183
|
-
// Overridden by BPopover
|
|
184
|
-
return BVTooltip;
|
|
185
|
-
},
|
|
186
|
-
updateContent() {
|
|
187
|
-
// Overridden by BPopover
|
|
188
|
-
// Tooltip: Default slot is `title`
|
|
189
|
-
// Popover: Default slot is `content`, `title` slot is title
|
|
190
|
-
// We pass a scoped slot function reference by default (Vue v2.6x)
|
|
191
|
-
// And pass the title prop as a fallback
|
|
192
|
-
this.setTitle(this.normalizeSlot() || this.title);
|
|
193
|
-
},
|
|
194
|
-
// Helper methods for `updateContent()`
|
|
195
|
-
setTitle(value) {
|
|
196
|
-
value = isUndefinedOrNull(value) ? '' : value;
|
|
197
|
-
// We only update the value if it has changed
|
|
198
|
-
if (this.localTitle !== value) {
|
|
199
|
-
this.localTitle = value;
|
|
200
|
-
}
|
|
201
|
-
},
|
|
202
|
-
setContent(value) {
|
|
203
|
-
value = isUndefinedOrNull(value) ? '' : value;
|
|
204
|
-
// We only update the value if it has changed
|
|
205
|
-
if (this.localContent !== value) {
|
|
206
|
-
this.localContent = value;
|
|
207
|
-
}
|
|
208
|
-
},
|
|
209
|
-
// --- Template event handlers ---
|
|
210
|
-
onShow(bvEvent) {
|
|
211
|
-
// Placeholder
|
|
212
|
-
this.$emit(EVENT_NAME_SHOW, bvEvent);
|
|
213
|
-
if (bvEvent) {
|
|
214
|
-
this.localShow = !bvEvent.defaultPrevented;
|
|
215
|
-
}
|
|
216
|
-
},
|
|
217
|
-
onShown(bvEvent) {
|
|
218
|
-
// Tip is now showing
|
|
219
|
-
this.localShow = true;
|
|
220
|
-
this.$emit(EVENT_NAME_SHOWN, bvEvent);
|
|
221
|
-
},
|
|
222
|
-
onHide(bvEvent) {
|
|
223
|
-
this.$emit(EVENT_NAME_HIDE, bvEvent);
|
|
224
|
-
},
|
|
225
|
-
onHidden(bvEvent) {
|
|
226
|
-
// Tip is no longer showing
|
|
227
|
-
this.$emit(EVENT_NAME_HIDDEN, bvEvent);
|
|
228
|
-
this.localShow = false;
|
|
229
|
-
},
|
|
230
|
-
onDisabled(bvEvent) {
|
|
231
|
-
// Prevent possible endless loop if user mistakenly
|
|
232
|
-
// fires `disabled` instead of `disable`
|
|
233
|
-
if (bvEvent && bvEvent.type === EVENT_NAME_DISABLED) {
|
|
234
|
-
this.$emit(MODEL_EVENT_NAME_ENABLED, true);
|
|
235
|
-
this.$emit(EVENT_NAME_DISABLED, bvEvent);
|
|
236
|
-
}
|
|
237
|
-
},
|
|
238
|
-
onEnabled(bvEvent) {
|
|
239
|
-
// Prevent possible endless loop if user mistakenly
|
|
240
|
-
// fires `enabled` instead of `enable`
|
|
241
|
-
if (bvEvent && bvEvent.type === EVENT_NAME_ENABLED) {
|
|
242
|
-
this.$emit(MODEL_EVENT_NAME_ENABLED, false);
|
|
243
|
-
this.$emit(EVENT_NAME_ENABLED, bvEvent);
|
|
244
|
-
}
|
|
245
|
-
},
|
|
246
|
-
// --- Public methods for programmatic control ---
|
|
247
|
-
[EVENT_NAME_OPEN]() {
|
|
248
|
-
!this.localShow && this.$_toolpop && this.$_toolpop.show();
|
|
249
|
-
},
|
|
250
|
-
[EVENT_NAME_CLOSE]() {
|
|
251
|
-
this.localShow && this.$_toolpop && this.$_toolpop.hide();
|
|
252
|
-
},
|
|
253
|
-
[EVENT_NAME_DISABLE]() {
|
|
254
|
-
this.$_toolpop && this.$_toolpop.disable();
|
|
255
|
-
},
|
|
256
|
-
[EVENT_NAME_ENABLE]() {
|
|
257
|
-
this.$_toolpop && this.$_toolpop.enable();
|
|
258
|
-
}
|
|
259
|
-
},
|
|
260
|
-
render(h) {
|
|
261
|
-
// Always renders a comment node
|
|
262
|
-
// TODO:
|
|
263
|
-
// Future: Possibly render a target slot (single root element)
|
|
264
|
-
// which we can apply the listeners to (pass `this.$el` to BVTooltip)
|
|
265
|
-
return h();
|
|
266
|
-
}
|
|
267
|
-
});
|
|
268
|
-
|
|
269
|
-
export { BTooltip, props };
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import { extend, mergeData } from '../../vue';
|
|
2
|
-
import { NAME_TRANSITION } from '../../constants/components';
|
|
3
|
-
import { PROP_TYPE_BOOLEAN, PROP_TYPE_STRING, PROP_TYPE_OBJECT } from '../../constants/props';
|
|
4
|
-
import { isPlainObject } from '../../utils/inspect';
|
|
5
|
-
import { makeProp } from '../../utils/props';
|
|
6
|
-
|
|
7
|
-
// Generic Bootstrap v4 fade (no-fade) transition component
|
|
8
|
-
//
|
|
9
|
-
// Assumes that `show` class is not required when
|
|
10
|
-
// the transition has finished the enter transition
|
|
11
|
-
// (show and fade classes are only applied during transition)
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
// --- Constants ---
|
|
15
|
-
|
|
16
|
-
const NO_FADE_PROPS = {
|
|
17
|
-
name: '',
|
|
18
|
-
enterClass: '',
|
|
19
|
-
enterActiveClass: '',
|
|
20
|
-
enterToClass: 'show',
|
|
21
|
-
leaveClass: 'show',
|
|
22
|
-
leaveActiveClass: '',
|
|
23
|
-
leaveToClass: ''
|
|
24
|
-
};
|
|
25
|
-
const FADE_PROPS = {
|
|
26
|
-
...NO_FADE_PROPS,
|
|
27
|
-
enterActiveClass: 'fade',
|
|
28
|
-
leaveActiveClass: 'fade'
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
// --- Props ---
|
|
32
|
-
|
|
33
|
-
const props = {
|
|
34
|
-
// Has no effect if `trans-props` provided
|
|
35
|
-
appear: makeProp(PROP_TYPE_BOOLEAN, false),
|
|
36
|
-
// Can be overridden by user supplied `trans-props`
|
|
37
|
-
mode: makeProp(PROP_TYPE_STRING),
|
|
38
|
-
// Only applicable to the built in transition
|
|
39
|
-
// Has no effect if `trans-props` provided
|
|
40
|
-
noFade: makeProp(PROP_TYPE_BOOLEAN, false),
|
|
41
|
-
// For user supplied transitions (if needed)
|
|
42
|
-
transProps: makeProp(PROP_TYPE_OBJECT)
|
|
43
|
-
};
|
|
44
|
-
const hasAnimateSupport = typeof Element !== 'undefined' && Boolean(Element.prototype.animate);
|
|
45
|
-
|
|
46
|
-
// --- Main component ---
|
|
47
|
-
|
|
48
|
-
// @vue/component
|
|
49
|
-
const BVTransition = /*#__PURE__*/extend({
|
|
50
|
-
name: NAME_TRANSITION,
|
|
51
|
-
functional: true,
|
|
52
|
-
props,
|
|
53
|
-
render(h, _ref) {
|
|
54
|
-
let {
|
|
55
|
-
children,
|
|
56
|
-
data,
|
|
57
|
-
props
|
|
58
|
-
} = _ref;
|
|
59
|
-
let transProps = props.transProps;
|
|
60
|
-
if (!isPlainObject(transProps)) {
|
|
61
|
-
transProps = props.noFade ? NO_FADE_PROPS : FADE_PROPS;
|
|
62
|
-
if (props.appear) {
|
|
63
|
-
// Default the appear classes to equal the enter classes
|
|
64
|
-
transProps = {
|
|
65
|
-
...transProps,
|
|
66
|
-
appear: true,
|
|
67
|
-
appearClass: transProps.enterClass,
|
|
68
|
-
appearActiveClass: transProps.enterActiveClass,
|
|
69
|
-
appearToClass: transProps.enterToClass
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
transProps = {
|
|
74
|
-
mode: props.mode,
|
|
75
|
-
...transProps,
|
|
76
|
-
/*
|
|
77
|
-
bootstrap-vue says: We always need `css` true
|
|
78
|
-
@gitlab/ui says: OMG. THE FREAKING TRANSITIONS.
|
|
79
|
-
So apparently jsdom doesn't implement animations (who can blame them)
|
|
80
|
-
but a Vue Transition relies on the native animationend/transitionend
|
|
81
|
-
events in order to fire onAfterLeave. jsdom will never fire the `onAfterLeave`
|
|
82
|
-
which is relied on by e.g. the tooltip component to do it's `hidden` logic.
|
|
83
|
-
So if in specs, we set `css: false`, everything will work as expected.
|
|
84
|
-
The best way we have found is to do a feature detection on `Element.prototype.animate`
|
|
85
|
-
*/
|
|
86
|
-
css: hasAnimateSupport
|
|
87
|
-
};
|
|
88
|
-
const dataCopy = {
|
|
89
|
-
...data
|
|
90
|
-
};
|
|
91
|
-
delete dataCopy.props;
|
|
92
|
-
Object.keys(props).forEach(key => {
|
|
93
|
-
delete dataCopy[key];
|
|
94
|
-
});
|
|
95
|
-
return h('transition',
|
|
96
|
-
// Any transition event listeners will get merged here
|
|
97
|
-
mergeData(dataCopy, {
|
|
98
|
-
props: transProps
|
|
99
|
-
}), children);
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
|
|
103
|
-
export { BVTransition, props };
|
|
@@ -1,205 +0,0 @@
|
|
|
1
|
-
import { extend, isVue3 } from '../../vue';
|
|
2
|
-
import { NAME_TRANSPORTER_TARGET, NAME_TRANSPORTER } from '../../constants/components';
|
|
3
|
-
import { IS_BROWSER } from '../../constants/env';
|
|
4
|
-
import { PROP_TYPE_ARRAY_FUNCTION, PROP_TYPE_STRING, PROP_TYPE_BOOLEAN } from '../../constants/props';
|
|
5
|
-
import { HTMLElement } from '../../constants/safe-types';
|
|
6
|
-
import { concat } from '../../utils/array';
|
|
7
|
-
import { removeNode, select } from '../../utils/dom';
|
|
8
|
-
import { identity } from '../../utils/identity';
|
|
9
|
-
import { isFunction, isString } from '../../utils/inspect';
|
|
10
|
-
import { normalizeSlotMixin } from '../../mixins/normalize-slot';
|
|
11
|
-
import { makeProp } from '../../utils/props';
|
|
12
|
-
import { createNewChildComponent } from '../../utils/create-new-child-component';
|
|
13
|
-
|
|
14
|
-
// --- Helper components ---
|
|
15
|
-
|
|
16
|
-
// BVTransporter/BVTransporterTarget:
|
|
17
|
-
//
|
|
18
|
-
// Single root node portaling of content, which retains parent/child hierarchy
|
|
19
|
-
// Unlike Portal-Vue where portaled content is no longer a descendent of its
|
|
20
|
-
// intended parent components
|
|
21
|
-
//
|
|
22
|
-
// Private components for use by Tooltips, Popovers and Modals
|
|
23
|
-
//
|
|
24
|
-
// Based on vue-simple-portal
|
|
25
|
-
// https://github.com/LinusBorg/vue-simple-portal
|
|
26
|
-
|
|
27
|
-
// Transporter target used by BVTransporter
|
|
28
|
-
// Supports only a single root element
|
|
29
|
-
// @vue/component
|
|
30
|
-
const BVTransporterTarget = /*#__PURE__*/extend({
|
|
31
|
-
// As an abstract component, it doesn't appear in the $parent chain of
|
|
32
|
-
// components, which means the next parent of any component rendered inside
|
|
33
|
-
// of this one will be the parent from which is was portal'd
|
|
34
|
-
abstract: true,
|
|
35
|
-
name: NAME_TRANSPORTER_TARGET,
|
|
36
|
-
props: {
|
|
37
|
-
// Even though we only support a single root element,
|
|
38
|
-
// VNodes are always passed as an array
|
|
39
|
-
nodes: makeProp(PROP_TYPE_ARRAY_FUNCTION)
|
|
40
|
-
},
|
|
41
|
-
data: vm => {
|
|
42
|
-
return {
|
|
43
|
-
updatedNodes: vm.nodes
|
|
44
|
-
};
|
|
45
|
-
},
|
|
46
|
-
destroyed() {
|
|
47
|
-
removeNode(this.$el);
|
|
48
|
-
},
|
|
49
|
-
render(h) {
|
|
50
|
-
const {
|
|
51
|
-
updatedNodes
|
|
52
|
-
} = this;
|
|
53
|
-
let $nodes = isFunction(updatedNodes) ? updatedNodes({}) : updatedNodes;
|
|
54
|
-
$nodes = concat($nodes).filter(identity);
|
|
55
|
-
if ($nodes && $nodes.length > 0 && !$nodes[0].text) {
|
|
56
|
-
return $nodes[0];
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
/* istanbul ignore next */
|
|
60
|
-
return h();
|
|
61
|
-
}
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
// --- Props ---
|
|
65
|
-
|
|
66
|
-
const props = {
|
|
67
|
-
// String: CSS selector,
|
|
68
|
-
// HTMLElement: Element reference
|
|
69
|
-
// Mainly needed for tooltips/popovers inside modals
|
|
70
|
-
container: makeProp([HTMLElement, PROP_TYPE_STRING], 'body'),
|
|
71
|
-
disabled: makeProp(PROP_TYPE_BOOLEAN, false),
|
|
72
|
-
// This should be set to match the root element type
|
|
73
|
-
tag: makeProp(PROP_TYPE_STRING, 'div')
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
// --- Main component ---
|
|
77
|
-
|
|
78
|
-
// @vue/component
|
|
79
|
-
const BVTransporter = /*#__PURE__*/extend({
|
|
80
|
-
name: NAME_TRANSPORTER,
|
|
81
|
-
mixins: [normalizeSlotMixin],
|
|
82
|
-
props,
|
|
83
|
-
watch: {
|
|
84
|
-
disabled: {
|
|
85
|
-
immediate: true,
|
|
86
|
-
handler(disabled) {
|
|
87
|
-
// Vue 2 only: manage manual portaling
|
|
88
|
-
if (isVue3(this)) return;
|
|
89
|
-
disabled ? this.unmountTarget() : this.$nextTick(this.mountTarget);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
},
|
|
93
|
-
created() {
|
|
94
|
-
// Vue 2 only: create private non-reactive props
|
|
95
|
-
if (isVue3(this)) return;
|
|
96
|
-
this.$_defaultFn = null;
|
|
97
|
-
this.$_target = null;
|
|
98
|
-
},
|
|
99
|
-
beforeMount() {
|
|
100
|
-
// Vue 2 only
|
|
101
|
-
if (isVue3(this)) return;
|
|
102
|
-
this.mountTarget();
|
|
103
|
-
},
|
|
104
|
-
updated() {
|
|
105
|
-
// Vue 2 only
|
|
106
|
-
// We need to make sure that all children have completed updating
|
|
107
|
-
// before rendering in the target
|
|
108
|
-
// `vue-simple-portal` has the this in a `$nextTick()`,
|
|
109
|
-
// while `portal-vue` doesn't
|
|
110
|
-
// Just trying to see if the `$nextTick()` delay is required or not
|
|
111
|
-
// Since all slots in Vue 2.6.x are always functions
|
|
112
|
-
if (isVue3(this)) return;
|
|
113
|
-
this.updateTarget();
|
|
114
|
-
},
|
|
115
|
-
beforeDestroy() {
|
|
116
|
-
// Vue 2 only
|
|
117
|
-
if (isVue3(this)) return;
|
|
118
|
-
this.unmountTarget();
|
|
119
|
-
this.$_defaultFn = null;
|
|
120
|
-
},
|
|
121
|
-
methods: {
|
|
122
|
-
// Get the element which the target should be appended to
|
|
123
|
-
getContainer() {
|
|
124
|
-
/* istanbul ignore else */
|
|
125
|
-
if (IS_BROWSER) {
|
|
126
|
-
const {
|
|
127
|
-
container
|
|
128
|
-
} = this;
|
|
129
|
-
return isString(container) ? select(container) : container;
|
|
130
|
-
} else {
|
|
131
|
-
return null;
|
|
132
|
-
}
|
|
133
|
-
},
|
|
134
|
-
// Mount the target
|
|
135
|
-
mountTarget() {
|
|
136
|
-
if (!this.$_target) {
|
|
137
|
-
const $container = this.getContainer();
|
|
138
|
-
if ($container) {
|
|
139
|
-
const $el = document.createElement('div');
|
|
140
|
-
$container.appendChild($el);
|
|
141
|
-
this.$_target = createNewChildComponent(this, BVTransporterTarget, {
|
|
142
|
-
el: $el,
|
|
143
|
-
propsData: {
|
|
144
|
-
// Initial nodes to be rendered
|
|
145
|
-
nodes: concat(this.normalizeSlot())
|
|
146
|
-
}
|
|
147
|
-
});
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
},
|
|
151
|
-
// Update the content of the target
|
|
152
|
-
updateTarget() {
|
|
153
|
-
if (IS_BROWSER && this.$_target) {
|
|
154
|
-
const defaultFn = this.$scopedSlots.default;
|
|
155
|
-
if (!this.disabled) {
|
|
156
|
-
/* istanbul ignore else: only applicable in Vue 2.5.x */
|
|
157
|
-
if (defaultFn && this.$_defaultFn !== defaultFn) {
|
|
158
|
-
// We only update the target component if the scoped slot
|
|
159
|
-
// function is a fresh one. The new slot syntax (since Vue 2.6)
|
|
160
|
-
// can cache unchanged slot functions and we want to respect that here
|
|
161
|
-
this.$_target.updatedNodes = defaultFn;
|
|
162
|
-
} else if (!defaultFn) {
|
|
163
|
-
// We also need to be back compatible with non-scoped default slot (i.e. 2.5.x)
|
|
164
|
-
this.$_target.updatedNodes = this.$slots.default;
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
// Update the scoped slot function cache
|
|
168
|
-
this.$_defaultFn = defaultFn;
|
|
169
|
-
}
|
|
170
|
-
},
|
|
171
|
-
// Unmount the target
|
|
172
|
-
unmountTarget() {
|
|
173
|
-
this.$_target && this.$_target.$destroy();
|
|
174
|
-
this.$_target = null;
|
|
175
|
-
}
|
|
176
|
-
},
|
|
177
|
-
render(h) {
|
|
178
|
-
if (isVue3(this)) {
|
|
179
|
-
// Vue 3: use native Teleport
|
|
180
|
-
if (this.disabled) {
|
|
181
|
-
const $nodes = concat(this.normalizeSlot()).filter(identity);
|
|
182
|
-
if ($nodes.length > 0) {
|
|
183
|
-
return $nodes[0];
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
const {
|
|
187
|
-
Teleport
|
|
188
|
-
} = this.$.appContext.config.globalProperties.constructor;
|
|
189
|
-
return h(Teleport, {
|
|
190
|
-
to: this.container
|
|
191
|
-
}, this.normalizeSlot());
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
// Vue 2: this component has no root element, so only a single VNode is allowed
|
|
195
|
-
if (this.disabled) {
|
|
196
|
-
const $nodes = concat(this.normalizeSlot()).filter(identity);
|
|
197
|
-
if ($nodes.length > 0 && !$nodes[0].text) {
|
|
198
|
-
return $nodes[0];
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
return h();
|
|
202
|
-
}
|
|
203
|
-
});
|
|
204
|
-
|
|
205
|
-
export { BVTransporter, props };
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
// Component names
|
|
2
|
-
const NAME_BUTTON = 'BButton';
|
|
3
|
-
const NAME_BUTTON_CLOSE = 'BButtonClose';
|
|
4
|
-
const NAME_COL = 'BCol';
|
|
5
|
-
const NAME_DROPDOWN = 'BDropdown';
|
|
6
|
-
const NAME_DROPDOWN_DIVIDER = 'BDropdownDivider';
|
|
7
|
-
const NAME_DROPDOWN_FORM = 'BDropdownForm';
|
|
8
|
-
const NAME_DROPDOWN_GROUP = 'BDropdownGroup';
|
|
9
|
-
const NAME_DROPDOWN_HEADER = 'BDropdownHeader';
|
|
10
|
-
const NAME_DROPDOWN_ITEM = 'BDropdownItem';
|
|
11
|
-
const NAME_DROPDOWN_ITEM_BUTTON = 'BDropdownItemButton';
|
|
12
|
-
const NAME_DROPDOWN_TEXT = 'BDropdownText';
|
|
13
|
-
const NAME_FORM = 'BForm';
|
|
14
|
-
const NAME_FORM_GROUP = 'BFormGroup';
|
|
15
|
-
const NAME_FORM_INVALID_FEEDBACK = 'BFormInvalidFeedback';
|
|
16
|
-
const NAME_FORM_ROW = 'BFormRow';
|
|
17
|
-
const NAME_FORM_SELECT = 'BFormSelect';
|
|
18
|
-
const NAME_FORM_SELECT_OPTION = 'BFormSelectOption';
|
|
19
|
-
const NAME_FORM_SELECT_OPTION_GROUP = 'BFormSelectOptionGroup';
|
|
20
|
-
const NAME_FORM_TEXT = 'BFormText';
|
|
21
|
-
const NAME_FORM_TEXTAREA = 'BFormTextarea';
|
|
22
|
-
const NAME_FORM_VALID_FEEDBACK = 'BFormValidFeedback';
|
|
23
|
-
const NAME_LINK = 'BLink';
|
|
24
|
-
const NAME_MODAL = 'BModal';
|
|
25
|
-
const NAME_POPOVER = 'BPopover';
|
|
26
|
-
const NAME_TAB = 'BTab';
|
|
27
|
-
const NAME_TABLE = 'BTable';
|
|
28
|
-
const NAME_TABLE_CELL = 'BTableCell';
|
|
29
|
-
const NAME_TABLE_LITE = 'BTableLite';
|
|
30
|
-
const NAME_TABLE_SIMPLE = 'BTableSimple';
|
|
31
|
-
const NAME_TABS = 'BTabs';
|
|
32
|
-
const NAME_TBODY = 'BTbody';
|
|
33
|
-
const NAME_TFOOT = 'BTfoot';
|
|
34
|
-
const NAME_TH = 'BTh';
|
|
35
|
-
const NAME_THEAD = 'BThead';
|
|
36
|
-
const NAME_TOAST = 'BToast';
|
|
37
|
-
const NAME_TOASTER = 'BToaster';
|
|
38
|
-
const NAME_TOOLTIP = 'BTooltip';
|
|
39
|
-
const NAME_TR = 'BTr';
|
|
40
|
-
|
|
41
|
-
// Helper component names
|
|
42
|
-
const NAME_FORM_BUTTON_LABEL_CONTROL = 'BVFormBtnLabelControl';
|
|
43
|
-
const NAME_FORM_RATING_STAR = 'BVFormRatingStar';
|
|
44
|
-
const NAME_POPOVER_HELPER = 'BVPopover';
|
|
45
|
-
const NAME_POPOVER_TEMPLATE = 'BVPopoverTemplate';
|
|
46
|
-
const NAME_POPPER = 'BVPopper';
|
|
47
|
-
const NAME_TAB_BUTTON_HELPER = 'BVTabButton';
|
|
48
|
-
const NAME_TOAST_POP = 'BVToastPop';
|
|
49
|
-
const NAME_TOOLTIP_HELPER = 'BVTooltip';
|
|
50
|
-
const NAME_TOOLTIP_TEMPLATE = 'BVTooltipTemplate';
|
|
51
|
-
const NAME_TRANSITION = 'BVTransition';
|
|
52
|
-
const NAME_TRANSPORTER = 'BVTransporter';
|
|
53
|
-
const NAME_TRANSPORTER_TARGET = 'BVTransporterTarget';
|
|
54
|
-
|
|
55
|
-
export { NAME_BUTTON, NAME_BUTTON_CLOSE, NAME_COL, NAME_DROPDOWN, NAME_DROPDOWN_DIVIDER, NAME_DROPDOWN_FORM, NAME_DROPDOWN_GROUP, NAME_DROPDOWN_HEADER, NAME_DROPDOWN_ITEM, NAME_DROPDOWN_ITEM_BUTTON, NAME_DROPDOWN_TEXT, NAME_FORM, NAME_FORM_BUTTON_LABEL_CONTROL, NAME_FORM_GROUP, NAME_FORM_INVALID_FEEDBACK, NAME_FORM_RATING_STAR, NAME_FORM_ROW, NAME_FORM_SELECT, NAME_FORM_SELECT_OPTION, NAME_FORM_SELECT_OPTION_GROUP, NAME_FORM_TEXT, NAME_FORM_TEXTAREA, NAME_FORM_VALID_FEEDBACK, NAME_LINK, NAME_MODAL, NAME_POPOVER, NAME_POPOVER_HELPER, NAME_POPOVER_TEMPLATE, NAME_POPPER, NAME_TAB, NAME_TABLE, NAME_TABLE_CELL, NAME_TABLE_LITE, NAME_TABLE_SIMPLE, NAME_TABS, NAME_TAB_BUTTON_HELPER, NAME_TBODY, NAME_TFOOT, NAME_TH, NAME_THEAD, NAME_TOAST, NAME_TOASTER, NAME_TOAST_POP, NAME_TOOLTIP, NAME_TOOLTIP_HELPER, NAME_TOOLTIP_TEMPLATE, NAME_TR, NAME_TRANSITION, NAME_TRANSPORTER, NAME_TRANSPORTER_TARGET };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
const NAME = 'BvConfig';
|
|
2
|
-
const PROP_NAME = '$bvConfig';
|
|
3
|
-
const DEFAULT_BREAKPOINT = ['xs', 'sm', 'md', 'lg', 'xl'];
|
|
4
|
-
|
|
5
|
-
// in milliseconds
|
|
6
|
-
const TOOLTIP_DELAY = {
|
|
7
|
-
show: 500,
|
|
8
|
-
hide: 0
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export { DEFAULT_BREAKPOINT, NAME, PROP_NAME, TOOLTIP_DELAY };
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
const HAS_WINDOW_SUPPORT = typeof window !== 'undefined';
|
|
2
|
-
const HAS_DOCUMENT_SUPPORT = typeof document !== 'undefined';
|
|
3
|
-
const HAS_NAVIGATOR_SUPPORT = typeof navigator !== 'undefined';
|
|
4
|
-
/* istanbul ignore next: JSDOM always returns false */
|
|
5
|
-
const HAS_MUTATION_OBSERVER_SUPPORT = typeof MutationObserver !== 'undefined' || typeof WebKitMutationObserver !== 'undefined' || typeof MozMutationObserver !== 'undefined';
|
|
6
|
-
const IS_BROWSER = HAS_WINDOW_SUPPORT && HAS_DOCUMENT_SUPPORT && HAS_NAVIGATOR_SUPPORT;
|
|
7
|
-
const WINDOW = HAS_WINDOW_SUPPORT ? window : {};
|
|
8
|
-
const DOCUMENT = HAS_DOCUMENT_SUPPORT ? document : {};
|
|
9
|
-
const NAVIGATOR = HAS_NAVIGATOR_SUPPORT ? navigator : {};
|
|
10
|
-
const USER_AGENT = (NAVIGATOR.userAgent || '').toLowerCase();
|
|
11
|
-
const IS_JSDOM = USER_AGENT.indexOf('jsdom') > 0;
|
|
12
|
-
|
|
13
|
-
// Determine if the browser supports the option passive for events
|
|
14
|
-
const HAS_PASSIVE_EVENT_SUPPORT = (() => {
|
|
15
|
-
let passiveEventSupported = false;
|
|
16
|
-
if (IS_BROWSER) {
|
|
17
|
-
try {
|
|
18
|
-
const options = {
|
|
19
|
-
// This function will be called when the browser
|
|
20
|
-
// attempts to access the passive property
|
|
21
|
-
get passive() {
|
|
22
|
-
/* istanbul ignore next: will never be called in JSDOM */
|
|
23
|
-
passiveEventSupported = true;
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
WINDOW.addEventListener('test', options, options);
|
|
27
|
-
WINDOW.removeEventListener('test', options, options);
|
|
28
|
-
} catch {
|
|
29
|
-
/* istanbul ignore next: will never be called in JSDOM */
|
|
30
|
-
passiveEventSupported = false;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
return passiveEventSupported;
|
|
34
|
-
})();
|
|
35
|
-
|
|
36
|
-
export { DOCUMENT, HAS_DOCUMENT_SUPPORT, HAS_MUTATION_OBSERVER_SUPPORT, HAS_NAVIGATOR_SUPPORT, HAS_PASSIVE_EVENT_SUPPORT, HAS_WINDOW_SUPPORT, IS_BROWSER, IS_JSDOM, NAVIGATOR, USER_AGENT, WINDOW };
|