@gitlab/ui 132.0.3 → 132.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/base/accordion/accordion_item.js +1 -3
- package/dist/components/base/avatar/avatar.js +76 -5
- package/dist/components/base/badge/badge.js +5 -7
- package/dist/components/base/button/button.js +1 -3
- package/dist/components/base/collapse/collapse.js +2 -6
- package/dist/components/base/datepicker/datepicker.js +4 -5
- package/dist/components/base/daterange_picker/daterange_picker.js +2 -4
- package/dist/components/base/dropdown/dropdown_item.js +3 -4
- package/dist/components/base/filtered_search/filtered_search.js +55 -7
- package/dist/components/base/filtered_search/filtered_search_token.js +6 -14
- package/dist/components/base/filtered_search/filtered_search_token_segment.js +39 -19
- package/dist/components/base/filtered_search/filtered_search_utils.js +57 -7
- package/dist/components/base/form/form_checkbox/form_checkbox.js +13 -26
- package/dist/components/base/form/form_checkbox/form_checkbox_group.js +1 -3
- package/dist/components/base/form/form_fields/form_fields_loop.js +57 -6
- package/dist/components/base/form/form_group/form_group.js +1 -3
- package/dist/components/base/form/form_input/form_input.js +95 -41
- package/dist/components/base/form/form_input_group/form_input_group.js +2 -4
- package/dist/components/base/form/form_radio/form_radio.js +5 -9
- package/dist/components/base/form/form_radio_group/form_radio_group.js +1 -3
- package/dist/components/base/form/form_select/form_select.js +76 -5
- package/dist/components/base/infinite_scroll/infinite_scroll.js +7 -14
- package/dist/components/base/link/link.js +26 -7
- package/dist/components/base/new_dropdowns/base_dropdown/base_dropdown.js +93 -32
- package/dist/components/base/new_dropdowns/disclosure/disclosure_dropdown.js +2 -6
- package/dist/components/base/new_dropdowns/disclosure/disclosure_dropdown_item.js +2 -6
- package/dist/components/base/new_dropdowns/listbox/listbox.js +5 -13
- package/dist/components/base/new_dropdowns/listbox/listbox_item.js +1 -3
- package/dist/components/base/new_dropdowns/listbox/mock_data.js +2 -6
- package/dist/components/base/new_dropdowns/listbox/utils.js +6 -11
- package/dist/components/base/path/path.js +1 -5
- package/dist/components/base/search_box_by_type/search_box_by_type.js +2 -6
- package/dist/components/base/skeleton_loader/skeleton_loader.js +3 -5
- package/dist/components/base/table/table.js +32 -21
- package/dist/components/base/table_lite/table_lite.js +1 -3
- package/dist/components/base/tabs/tab/tab.js +1 -3
- package/dist/components/base/tabs/tabs/scrollable_tabs.js +1 -5
- package/dist/components/base/token_selector/token_selector.js +2 -6
- package/dist/components/charts/area/area.js +6 -7
- package/dist/components/charts/column/column.js +11 -15
- package/dist/components/charts/discrete_scatter/discrete_scatter.js +57 -5
- package/dist/components/charts/gauge/gauge.js +13 -21
- package/dist/components/charts/heatmap/heatmap.js +66 -18
- package/dist/components/charts/legend/legend.js +59 -13
- package/dist/components/charts/line/line.js +6 -7
- package/dist/components/charts/shared/tooltip/tooltip.js +11 -18
- package/dist/components/charts/sparkline/sparkline.js +72 -19
- package/dist/components/charts/stacked_column/stacked_column.js +18 -31
- package/dist/components/dashboards/dashboard_layout/grid_layout/grid_layout.js +40 -24
- package/dist/components/utilities/friendly_wrap/friendly_wrap.js +3 -7
- package/dist/components/utilities/intersperse/intersperse.js +6 -11
- package/dist/components/utilities/sprintf/sprintf.js +58 -7
- package/dist/components/utilities/truncate/truncate.js +2 -4
- package/dist/components/utilities/truncate_text/truncate_text.js +1 -3
- package/dist/config.js +3 -4
- package/dist/directives/hover_load/hover_load.js +1 -3
- package/dist/directives/outside/outside.js +9 -16
- package/dist/directives/resize_observer/resize_observer.js +6 -8
- package/dist/directives/safe_html/safe_html.js +1 -3
- package/dist/directives/safe_link/safe_link.js +11 -14
- package/dist/index.css +2 -2
- package/dist/index.css.map +1 -1
- package/dist/tokens/build/js/tokens.dark.js +95 -95
- package/dist/tokens/build/js/tokens.js +74 -74
- package/dist/tokens/common_story_options.js +7 -8
- package/dist/utils/charts/config.js +122 -90
- package/dist/utils/constants.js +26 -1
- package/dist/utils/data_utils.js +28 -1
- package/dist/utils/form_options_utils.js +4 -6
- package/dist/utils/is_slot_empty.js +3 -5
- package/dist/utils/stories_utils.js +8 -8
- package/dist/utils/use_mock_intersection_observer.js +63 -12
- package/dist/utils/utils.js +76 -19
- package/dist/vendor/bootstrap-vue/src/components/button/button-close.js +8 -11
- package/dist/vendor/bootstrap-vue/src/components/button/button.js +12 -17
- package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-divider.js +3 -6
- package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-form.js +6 -9
- package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-group.js +14 -19
- package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-header.js +8 -13
- package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-item-button.js +9 -12
- package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-item.js +8 -11
- package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-text.js +9 -14
- package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown.js +34 -43
- package/dist/vendor/bootstrap-vue/src/components/form/form-invalid-feedback.js +5 -9
- package/dist/vendor/bootstrap-vue/src/components/form/form-text.js +7 -10
- package/dist/vendor/bootstrap-vue/src/components/form/form-valid-feedback.js +5 -9
- package/dist/vendor/bootstrap-vue/src/components/form/form.js +7 -10
- package/dist/vendor/bootstrap-vue/src/components/form-group/form-group.js +77 -33
- package/dist/vendor/bootstrap-vue/src/components/form-select/form-select-option-group.js +6 -11
- package/dist/vendor/bootstrap-vue/src/components/form-select/form-select-option.js +6 -12
- package/dist/vendor/bootstrap-vue/src/components/form-select/form-select.js +28 -29
- package/dist/vendor/bootstrap-vue/src/components/form-textarea/form-textarea.js +7 -10
- package/dist/vendor/bootstrap-vue/src/components/layout/col.js +7 -11
- package/dist/vendor/bootstrap-vue/src/components/layout/form-row.js +3 -5
- package/dist/vendor/bootstrap-vue/src/components/link/link.js +19 -31
- package/dist/vendor/bootstrap-vue/src/components/modal/helpers/modal-manager.js +3 -4
- package/dist/vendor/bootstrap-vue/src/components/modal/modal.js +59 -68
- package/dist/vendor/bootstrap-vue/src/components/popover/helpers/bv-popover-template.js +2 -4
- package/dist/vendor/bootstrap-vue/src/components/popover/popover.js +4 -5
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/default-sort-compare.js +11 -7
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-bottom-row.js +4 -6
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-busy.js +3 -6
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-caption.js +4 -7
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-colgroup.js +1 -3
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-empty.js +16 -20
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-filtering.js +14 -25
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-items.js +23 -35
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-pagination.js +6 -8
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-provider.js +8 -10
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-selectable.js +8 -15
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-sorting.js +33 -41
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-stacked.js +3 -8
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-table-renderer.js +38 -50
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-tbody-row.js +19 -31
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-tbody.js +13 -23
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-tfoot.js +5 -6
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-thead.js +17 -21
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-top-row.js +4 -6
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/sanitize-row.js +1 -3
- package/dist/vendor/bootstrap-vue/src/components/table/tbody.js +3 -6
- package/dist/vendor/bootstrap-vue/src/components/table/td.js +9 -14
- package/dist/vendor/bootstrap-vue/src/components/table/tfoot.js +1 -2
- package/dist/vendor/bootstrap-vue/src/components/table/thead.js +1 -2
- package/dist/vendor/bootstrap-vue/src/components/table/tr.js +2 -5
- package/dist/vendor/bootstrap-vue/src/components/tabs/tab.js +19 -36
- package/dist/vendor/bootstrap-vue/src/components/tabs/tabs.js +66 -81
- package/dist/vendor/bootstrap-vue/src/components/tooltip/helpers/bv-popper.js +2 -6
- package/dist/vendor/bootstrap-vue/src/components/tooltip/helpers/bv-tooltip-template.js +5 -11
- package/dist/vendor/bootstrap-vue/src/components/tooltip/helpers/bv-tooltip.js +8 -14
- package/dist/vendor/bootstrap-vue/src/components/tooltip/tooltip.js +19 -22
- package/dist/vendor/bootstrap-vue/src/components/transition/bv-transition.js +7 -10
- package/dist/vendor/bootstrap-vue/src/components/transporter/transporter.js +7 -14
- package/dist/vendor/bootstrap-vue/src/directives/modal/modal.js +4 -5
- package/dist/vendor/bootstrap-vue/src/directives/visible/visible.js +5 -9
- package/dist/vendor/bootstrap-vue/src/mixins/dropdown.js +17 -29
- package/dist/vendor/bootstrap-vue/src/mixins/form-control.js +6 -7
- package/dist/vendor/bootstrap-vue/src/mixins/form-custom.js +1 -2
- package/dist/vendor/bootstrap-vue/src/mixins/form-options.js +5 -6
- package/dist/vendor/bootstrap-vue/src/mixins/form-size.js +1 -2
- package/dist/vendor/bootstrap-vue/src/mixins/form-state.js +1 -2
- package/dist/vendor/bootstrap-vue/src/mixins/form-text.js +29 -43
- package/dist/vendor/bootstrap-vue/src/mixins/id.js +1 -2
- package/dist/vendor/bootstrap-vue/src/utils/create-new-child-component.js +62 -15
- package/dist/vendor/bootstrap-vue/src/utils/dom.js +3 -9
- package/dist/vendor/bootstrap-vue/src/utils/events.js +7 -5
- package/dist/vendor/bootstrap-vue/src/utils/plugins.js +4 -5
- package/dist/vendor/bootstrap-vue/src/utils/router.js +9 -13
- package/package.json +10 -8
- package/src/components/dashboards/dashboard_layout/grid_layout/grid_layout.vue +21 -19
- package/src/scss/gitlab_ui.scss +3 -0
- package/src/scss/storybook.scss +3 -0
- package/src/scss/themes.scss +84 -0
- package/src/tokens/build/css/tokens.css +142 -142
- package/src/tokens/build/css/tokens.dark.css +138 -138
- package/src/tokens/build/docs/tokens-tailwind-docs.dark.json +580 -580
- package/src/tokens/build/docs/tokens-tailwind-docs.json +495 -495
- package/src/tokens/build/figma/constants.dark.json +799 -799
- package/src/tokens/build/figma/constants.json +799 -799
- package/src/tokens/build/js/tokens.dark.js +95 -95
- package/src/tokens/build/js/tokens.js +74 -74
- package/src/tokens/build/json/tokens.dark.json +1668 -1668
- package/src/tokens/build/json/tokens.json +1647 -1647
- package/src/tokens/build/scss/_tokens.dark.scss +138 -138
- package/src/tokens/build/scss/_tokens.scss +142 -142
- package/src/tokens/build/scss/_tokens_custom_properties.scss +73 -73
- package/src/tokens/constant/color.blue.tokens.json +182 -0
- package/src/tokens/constant/color.brand.tokens.json +252 -0
- package/src/tokens/constant/color.data.tokens.json +894 -0
- package/src/tokens/constant/color.green.tokens.json +182 -0
- package/src/tokens/constant/color.neutral.tokens.json +230 -0
- package/src/tokens/constant/color.orange.tokens.json +182 -0
- package/src/tokens/constant/color.purple.tokens.json +182 -0
- package/src/tokens/constant/color.red.tokens.json +182 -0
- package/src/tokens/constant/color.theme.tokens.json +1168 -0
- package/src/tokens/deprecated/deprecated.color.tokens.json +134 -1340
- package/src/utils/constants.js +9 -0
- package/src/vendor/bootstrap-vue/src/components/button/button-close.js +4 -5
- package/src/vendor/bootstrap-vue/src/components/button/button.js +7 -8
- package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown-divider.js +1 -2
- package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown-form.js +2 -8
- package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown-group.js +6 -7
- package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown-header.js +3 -4
- package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown-item-button.js +6 -12
- package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown-item.js +2 -3
- package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown-text.js +3 -4
- package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown.js +19 -26
- package/src/vendor/bootstrap-vue/src/components/form/form-text.js +4 -6
- package/src/vendor/bootstrap-vue/src/components/form/form.js +4 -6
- package/src/vendor/bootstrap-vue/src/components/form-group/form-group.js +66 -19
- package/src/vendor/bootstrap-vue/src/components/form-select/form-select-option-group.js +1 -2
- package/src/vendor/bootstrap-vue/src/components/form-select/form-select-option.js +1 -4
- package/src/vendor/bootstrap-vue/src/components/form-select/form-select.js +13 -14
- package/src/vendor/bootstrap-vue/src/components/form-textarea/form-textarea.js +5 -6
- package/src/vendor/bootstrap-vue/src/components/modal/modal.js +53 -62
- package/src/vendor/bootstrap-vue/src/components/popover/popover.js +4 -10
- package/src/vendor/bootstrap-vue/src/components/table/helpers/mixin-busy.js +1 -2
- package/src/vendor/bootstrap-vue/src/components/table/helpers/mixin-caption.js +2 -3
- package/src/vendor/bootstrap-vue/src/components/table/helpers/mixin-empty.js +5 -6
- package/src/vendor/bootstrap-vue/src/components/table/helpers/mixin-filtering.js +5 -13
- package/src/vendor/bootstrap-vue/src/components/table/helpers/mixin-items.js +12 -21
- package/src/vendor/bootstrap-vue/src/components/table/helpers/mixin-pagination.js +2 -3
- package/src/vendor/bootstrap-vue/src/components/table/helpers/mixin-provider.js +5 -11
- package/src/vendor/bootstrap-vue/src/components/table/helpers/mixin-selectable.js +4 -5
- package/src/vendor/bootstrap-vue/src/components/table/helpers/mixin-sorting.js +14 -21
- package/src/vendor/bootstrap-vue/src/components/table/helpers/mixin-stacked.js +1 -2
- package/src/vendor/bootstrap-vue/src/components/table/helpers/mixin-table-renderer.js +14 -20
- package/src/vendor/bootstrap-vue/src/components/table/helpers/mixin-tbody-row.js +3 -9
- package/src/vendor/bootstrap-vue/src/components/table/helpers/mixin-tbody.js +1 -2
- package/src/vendor/bootstrap-vue/src/components/table/helpers/mixin-tfoot.js +5 -11
- package/src/vendor/bootstrap-vue/src/components/table/helpers/mixin-thead.js +4 -5
- package/src/vendor/bootstrap-vue/src/components/table/tbody.js +2 -3
- package/src/vendor/bootstrap-vue/src/components/table/td.js +5 -6
- package/src/vendor/bootstrap-vue/src/components/table/tfoot.js +1 -2
- package/src/vendor/bootstrap-vue/src/components/table/thead.js +1 -2
- package/src/vendor/bootstrap-vue/src/components/table/tr.js +1 -2
- package/src/vendor/bootstrap-vue/src/components/tabs/tab.js +10 -16
- package/src/vendor/bootstrap-vue/src/components/tabs/tabs.js +33 -39
- package/src/vendor/bootstrap-vue/src/components/tooltip/tooltip.js +17 -25
- package/src/vendor/bootstrap-vue/src/components/transition/bv-transition.js +4 -5
- package/src/vendor/bootstrap-vue/src/components/transporter/transporter.js +4 -10
- package/src/vendor/bootstrap-vue/src/mixins/dropdown.js +9 -15
- package/src/vendor/bootstrap-vue/src/mixins/form-control.js +6 -7
- package/src/vendor/bootstrap-vue/src/mixins/form-custom.js +1 -2
- package/src/vendor/bootstrap-vue/src/mixins/form-options.js +5 -6
- package/src/vendor/bootstrap-vue/src/mixins/form-size.js +1 -2
- package/src/vendor/bootstrap-vue/src/mixins/form-state.js +1 -2
- package/src/vendor/bootstrap-vue/src/mixins/form-text.js +21 -33
- package/src/vendor/bootstrap-vue/src/mixins/id.js +1 -2
- package/dist/vendor/bootstrap-vue/src/mixins/model.js +0 -10
- package/dist/vendor/bootstrap-vue/src/utils/model.js +0 -33
- package/src/tokens/constant/color.tokens.json +0 -3422
- package/src/vendor/bootstrap-vue/src/mixins/model.js +0 -5
- package/src/vendor/bootstrap-vue/src/utils/model.js +0 -29
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { extend, COMPONENT_UID_KEY, REF_FOR_KEY } from '../../vue';
|
|
2
2
|
import { NAME_TABS, NAME_TAB_BUTTON_HELPER } from '../../constants/components';
|
|
3
3
|
import { IS_BROWSER } from '../../constants/env';
|
|
4
|
-
import { EVENT_NAME_CHANGED, EVENT_NAME_ACTIVATE_TAB, EVENT_NAME_CLICK, EVENT_NAME_FIRST, EVENT_NAME_PREV, EVENT_NAME_NEXT, EVENT_NAME_LAST } from '../../constants/events';
|
|
4
|
+
import { EVENT_NAME_CHANGED, EVENT_NAME_ACTIVATE_TAB, EVENT_NAME_CLICK, EVENT_NAME_FIRST, EVENT_NAME_PREV, EVENT_NAME_NEXT, EVENT_NAME_LAST, EVENT_NAME_INPUT } from '../../constants/events';
|
|
5
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_ARRAY, PROP_TYPE_OBJECT, PROP_TYPE_STRING, PROP_TYPE_BOOLEAN } from '../../constants/props';
|
|
7
6
|
import { SLOT_NAME_TABS_START, SLOT_NAME_TABS_END, SLOT_NAME_TOOLBAR_START, SLOT_NAME_TOOLBAR_END, SLOT_NAME_EMPTY, SLOT_NAME_TITLE } from '../../constants/slots';
|
|
8
7
|
import { BvEvent } from '../../utils/bv-event.class';
|
|
9
8
|
import { selectAll, attemptFocus, requestAF } from '../../utils/dom';
|
|
@@ -12,7 +11,6 @@ import { identity } from '../../utils/identity';
|
|
|
12
11
|
import { isEvent } from '../../utils/inspect';
|
|
13
12
|
import { looseEqual } from '../../utils/loose-equal';
|
|
14
13
|
import { mathMax } from '../../utils/math';
|
|
15
|
-
import { makeModelMixin } from '../../utils/model';
|
|
16
14
|
import { toInteger } from '../../utils/number';
|
|
17
15
|
import { sortKeys } from '../../utils/object';
|
|
18
16
|
import { observeDom } from '../../utils/observe-dom';
|
|
@@ -23,14 +21,8 @@ import { BLink } from '../link/link';
|
|
|
23
21
|
|
|
24
22
|
// --- Constants ---
|
|
25
23
|
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
props: modelProps,
|
|
29
|
-
prop: MODEL_PROP_NAME,
|
|
30
|
-
event: MODEL_EVENT_NAME
|
|
31
|
-
} = makeModelMixin('value', {
|
|
32
|
-
type: PROP_TYPE_NUMBER
|
|
33
|
-
});
|
|
24
|
+
const MODEL_PROP_NAME = 'value';
|
|
25
|
+
const MODEL_EVENT_NAME = EVENT_NAME_INPUT;
|
|
34
26
|
|
|
35
27
|
// --- Helper methods ---
|
|
36
28
|
|
|
@@ -49,27 +41,27 @@ const BVTabButton = /*#__PURE__*/extend({
|
|
|
49
41
|
},
|
|
50
42
|
props: {
|
|
51
43
|
controls: {
|
|
52
|
-
type:
|
|
44
|
+
type: String,
|
|
53
45
|
required: false,
|
|
54
46
|
default: undefined
|
|
55
47
|
},
|
|
56
48
|
id: {
|
|
57
|
-
type:
|
|
49
|
+
type: String,
|
|
58
50
|
required: false,
|
|
59
51
|
default: undefined
|
|
60
52
|
},
|
|
61
53
|
noKeyNav: {
|
|
62
|
-
type:
|
|
54
|
+
type: Boolean,
|
|
63
55
|
required: false,
|
|
64
56
|
default: false
|
|
65
57
|
},
|
|
66
58
|
posInSet: {
|
|
67
|
-
type:
|
|
59
|
+
type: Number,
|
|
68
60
|
required: false,
|
|
69
61
|
default: undefined
|
|
70
62
|
},
|
|
71
63
|
setSize: {
|
|
72
|
-
type:
|
|
64
|
+
type: Number,
|
|
73
65
|
required: false,
|
|
74
66
|
default: undefined
|
|
75
67
|
},
|
|
@@ -79,7 +71,7 @@ const BVTabButton = /*#__PURE__*/extend({
|
|
|
79
71
|
default: undefined
|
|
80
72
|
},
|
|
81
73
|
tabIndex: {
|
|
82
|
-
type:
|
|
74
|
+
type: Number,
|
|
83
75
|
required: false,
|
|
84
76
|
default: undefined
|
|
85
77
|
}
|
|
@@ -98,11 +90,9 @@ const BVTabButton = /*#__PURE__*/extend({
|
|
|
98
90
|
if (this.tab.disabled) {
|
|
99
91
|
return;
|
|
100
92
|
}
|
|
101
|
-
const
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
shiftKey
|
|
105
|
-
} = event;
|
|
93
|
+
const type = event.type,
|
|
94
|
+
keyCode = event.keyCode,
|
|
95
|
+
shiftKey = event.shiftKey;
|
|
106
96
|
if (type === 'click') {
|
|
107
97
|
stopEvent(event);
|
|
108
98
|
this.$emit(EVENT_NAME_CLICK, event);
|
|
@@ -133,22 +123,19 @@ const BVTabButton = /*#__PURE__*/extend({
|
|
|
133
123
|
}
|
|
134
124
|
},
|
|
135
125
|
render(h) {
|
|
136
|
-
const
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
titleLinkClass,
|
|
150
|
-
titleLinkAttributes
|
|
151
|
-
} = this.tab;
|
|
126
|
+
const id = this.id,
|
|
127
|
+
tabIndex = this.tabIndex,
|
|
128
|
+
setSize = this.setSize,
|
|
129
|
+
posInSet = this.posInSet,
|
|
130
|
+
controls = this.controls,
|
|
131
|
+
handleEvent = this.handleEvent;
|
|
132
|
+
const _this$tab = this.tab,
|
|
133
|
+
title = _this$tab.title,
|
|
134
|
+
localActive = _this$tab.localActive,
|
|
135
|
+
disabled = _this$tab.disabled,
|
|
136
|
+
titleItemClass = _this$tab.titleItemClass,
|
|
137
|
+
titleLinkClass = _this$tab.titleLinkClass,
|
|
138
|
+
titleLinkAttributes = _this$tab.titleLinkAttributes;
|
|
152
139
|
const $link = h(BLink, {
|
|
153
140
|
staticClass: 'nav-link',
|
|
154
141
|
class: [{
|
|
@@ -190,92 +177,94 @@ const BVTabButton = /*#__PURE__*/extend({
|
|
|
190
177
|
// --- Props ---
|
|
191
178
|
const navProps = {
|
|
192
179
|
align: {
|
|
193
|
-
type:
|
|
180
|
+
type: String,
|
|
194
181
|
required: false,
|
|
195
182
|
default: undefined
|
|
196
183
|
},
|
|
197
184
|
fill: {
|
|
198
|
-
type:
|
|
185
|
+
type: Boolean,
|
|
199
186
|
required: false,
|
|
200
187
|
default: false
|
|
201
188
|
},
|
|
202
189
|
justified: {
|
|
203
|
-
type:
|
|
190
|
+
type: Boolean,
|
|
204
191
|
required: false,
|
|
205
192
|
default: false
|
|
206
193
|
},
|
|
207
194
|
pills: {
|
|
208
|
-
type:
|
|
195
|
+
type: Boolean,
|
|
209
196
|
required: false,
|
|
210
197
|
default: false
|
|
211
198
|
},
|
|
212
199
|
small: {
|
|
213
|
-
type:
|
|
200
|
+
type: Boolean,
|
|
214
201
|
required: false,
|
|
215
202
|
default: false
|
|
216
203
|
}
|
|
217
204
|
};
|
|
218
205
|
const props = sortKeys({
|
|
219
206
|
...props$1,
|
|
220
|
-
|
|
207
|
+
[MODEL_PROP_NAME]: {
|
|
208
|
+
type: Number
|
|
209
|
+
},
|
|
221
210
|
...navProps,
|
|
222
211
|
// Only applied to the currently active `li`
|
|
223
212
|
activeNavItemClass: {
|
|
224
|
-
type: [
|
|
213
|
+
type: [Array, Object, String],
|
|
225
214
|
required: false,
|
|
226
215
|
default: undefined
|
|
227
216
|
},
|
|
228
217
|
// Only applied to the currently active `<b-tab>`
|
|
229
218
|
// This prop is sniffed by the `<b-tab>` child
|
|
230
219
|
activeTabClass: {
|
|
231
|
-
type: [
|
|
220
|
+
type: [Array, Object, String],
|
|
232
221
|
required: false,
|
|
233
222
|
default: undefined
|
|
234
223
|
},
|
|
235
224
|
contentClass: {
|
|
236
|
-
type: [
|
|
225
|
+
type: [Array, Object, String],
|
|
237
226
|
required: false,
|
|
238
227
|
default: undefined
|
|
239
228
|
},
|
|
240
229
|
// Synonym for 'bottom'
|
|
241
230
|
end: {
|
|
242
|
-
type:
|
|
231
|
+
type: Boolean,
|
|
243
232
|
required: false,
|
|
244
233
|
default: false
|
|
245
234
|
},
|
|
246
235
|
// This prop is sniffed by the `<b-tab>` child
|
|
247
236
|
lazy: {
|
|
248
|
-
type:
|
|
237
|
+
type: Boolean,
|
|
249
238
|
required: false,
|
|
250
239
|
default: false
|
|
251
240
|
},
|
|
252
241
|
navClass: {
|
|
253
|
-
type: [
|
|
242
|
+
type: [Array, Object, String],
|
|
254
243
|
required: false,
|
|
255
244
|
default: undefined
|
|
256
245
|
},
|
|
257
246
|
navWrapperClass: {
|
|
258
|
-
type: [
|
|
247
|
+
type: [Array, Object, String],
|
|
259
248
|
required: false,
|
|
260
249
|
default: undefined
|
|
261
250
|
},
|
|
262
251
|
noFade: {
|
|
263
|
-
type:
|
|
252
|
+
type: Boolean,
|
|
264
253
|
required: false,
|
|
265
254
|
default: false
|
|
266
255
|
},
|
|
267
256
|
noKeyNav: {
|
|
268
|
-
type:
|
|
257
|
+
type: Boolean,
|
|
269
258
|
required: false,
|
|
270
259
|
default: false
|
|
271
260
|
},
|
|
272
261
|
noNavStyle: {
|
|
273
|
-
type:
|
|
262
|
+
type: Boolean,
|
|
274
263
|
required: false,
|
|
275
264
|
default: false
|
|
276
265
|
},
|
|
277
266
|
tag: {
|
|
278
|
-
type:
|
|
267
|
+
type: String,
|
|
279
268
|
required: false,
|
|
280
269
|
default: 'div'
|
|
281
270
|
}
|
|
@@ -286,7 +275,11 @@ const props = sortKeys({
|
|
|
286
275
|
// @vue/component
|
|
287
276
|
const BTabs = /*#__PURE__*/extend({
|
|
288
277
|
name: NAME_TABS,
|
|
289
|
-
mixins: [idMixin,
|
|
278
|
+
mixins: [idMixin, normalizeSlotMixin],
|
|
279
|
+
model: {
|
|
280
|
+
prop: MODEL_PROP_NAME,
|
|
281
|
+
event: MODEL_EVENT_NAME
|
|
282
|
+
},
|
|
290
283
|
provide() {
|
|
291
284
|
return {
|
|
292
285
|
getBvTabs: () => this
|
|
@@ -439,9 +432,7 @@ const BTabs = /*#__PURE__*/extend({
|
|
|
439
432
|
|
|
440
433
|
// Else try setting to `currentTab`
|
|
441
434
|
if (tabIndex < 0) {
|
|
442
|
-
const
|
|
443
|
-
currentTab
|
|
444
|
-
} = this;
|
|
435
|
+
const currentTab = this.currentTab;
|
|
445
436
|
if (currentTab >= $tabs.length) {
|
|
446
437
|
// Handle last tab being removed, so find the last non-disabled tab
|
|
447
438
|
tabIndex = $tabs.indexOf($tabs.slice().reverse().find(notDisabled));
|
|
@@ -479,10 +470,8 @@ const BTabs = /*#__PURE__*/extend({
|
|
|
479
470
|
// Activate a tab given a `<b-tab>` instance
|
|
480
471
|
// Also accessed by `<b-tab>`
|
|
481
472
|
activateTab($tab) {
|
|
482
|
-
const
|
|
483
|
-
|
|
484
|
-
tabs: $tabs
|
|
485
|
-
} = this;
|
|
473
|
+
const currentTab = this.currentTab,
|
|
474
|
+
$tabs = this.tabs;
|
|
486
475
|
let result = false;
|
|
487
476
|
if ($tab) {
|
|
488
477
|
const index = $tabs.indexOf($tab);
|
|
@@ -572,21 +561,19 @@ const BTabs = /*#__PURE__*/extend({
|
|
|
572
561
|
}
|
|
573
562
|
},
|
|
574
563
|
render(h) {
|
|
575
|
-
const
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
tabs: $tabs
|
|
589
|
-
} = this;
|
|
564
|
+
const align = this.align,
|
|
565
|
+
end = this.end,
|
|
566
|
+
fill = this.fill,
|
|
567
|
+
firstTab = this.firstTab,
|
|
568
|
+
justified = this.justified,
|
|
569
|
+
lastTab = this.lastTab,
|
|
570
|
+
nextTab = this.nextTab,
|
|
571
|
+
noKeyNav = this.noKeyNav,
|
|
572
|
+
noNavStyle = this.noNavStyle,
|
|
573
|
+
pills = this.pills,
|
|
574
|
+
previousTab = this.previousTab,
|
|
575
|
+
small = this.small,
|
|
576
|
+
$tabs = this.tabs;
|
|
590
577
|
|
|
591
578
|
// Currently active tab
|
|
592
579
|
const $activeTab = $tabs.find($tab => $tab.localActive && !$tab.disabled);
|
|
@@ -596,9 +583,7 @@ const BTabs = /*#__PURE__*/extend({
|
|
|
596
583
|
|
|
597
584
|
// For each `<b-tab>` found create the tab buttons
|
|
598
585
|
const $buttons = $tabs.map(($tab, index) => {
|
|
599
|
-
const
|
|
600
|
-
safeId
|
|
601
|
-
} = $tab;
|
|
586
|
+
const safeId = $tab.safeId;
|
|
602
587
|
|
|
603
588
|
// Ensure at least one tab button is focusable when keynav enabled (if possible)
|
|
604
589
|
let tabIndex = null;
|
|
@@ -120,9 +120,7 @@ const BVPopper = /*#__PURE__*/extend({
|
|
|
120
120
|
return 'unknown';
|
|
121
121
|
},
|
|
122
122
|
popperConfig() {
|
|
123
|
-
const
|
|
124
|
-
placement
|
|
125
|
-
} = this;
|
|
123
|
+
const placement = this.placement;
|
|
126
124
|
return {
|
|
127
125
|
placement: this.getAttachment(placement),
|
|
128
126
|
modifiers: {
|
|
@@ -246,9 +244,7 @@ const BVPopper = /*#__PURE__*/extend({
|
|
|
246
244
|
}
|
|
247
245
|
},
|
|
248
246
|
render(h) {
|
|
249
|
-
const
|
|
250
|
-
noFade
|
|
251
|
-
} = this;
|
|
247
|
+
const noFade = this.noFade;
|
|
252
248
|
|
|
253
249
|
// Note: 'show' and 'fade' classes are only appled during transition
|
|
254
250
|
return h(BVTransition, {
|
|
@@ -47,11 +47,9 @@ const BVTooltipTemplate = /*#__PURE__*/extend({
|
|
|
47
47
|
return 'tooltip';
|
|
48
48
|
},
|
|
49
49
|
templateClasses() {
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
templateType
|
|
54
|
-
} = this;
|
|
50
|
+
const variant = this.variant,
|
|
51
|
+
attachment = this.attachment,
|
|
52
|
+
templateType = this.templateType;
|
|
55
53
|
return [{
|
|
56
54
|
// Disables pointer events to hide the tooltip when the user
|
|
57
55
|
// hovers over its content
|
|
@@ -62,9 +60,7 @@ const BVTooltipTemplate = /*#__PURE__*/extend({
|
|
|
62
60
|
}, this.customClass];
|
|
63
61
|
},
|
|
64
62
|
templateAttributes() {
|
|
65
|
-
const
|
|
66
|
-
id
|
|
67
|
-
} = this;
|
|
63
|
+
const id = this.id;
|
|
68
64
|
return {
|
|
69
65
|
// Apply attributes from root tooltip component
|
|
70
66
|
...this.bvParent.bvParent.$attrs,
|
|
@@ -95,9 +91,7 @@ const BVTooltipTemplate = /*#__PURE__*/extend({
|
|
|
95
91
|
},
|
|
96
92
|
methods: {
|
|
97
93
|
renderTemplate(h) {
|
|
98
|
-
const
|
|
99
|
-
title
|
|
100
|
-
} = this;
|
|
94
|
+
const title = this.title;
|
|
101
95
|
|
|
102
96
|
// Title can be a scoped slot function
|
|
103
97
|
const $title = isFunction(title) ? title({}) : title;
|
|
@@ -151,14 +151,12 @@ const BVTooltip = /*#__PURE__*/extend({
|
|
|
151
151
|
return false;
|
|
152
152
|
},
|
|
153
153
|
computedTemplateData() {
|
|
154
|
-
const
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
interactive
|
|
161
|
-
} = this;
|
|
154
|
+
const title = this.title,
|
|
155
|
+
content = this.content,
|
|
156
|
+
variant = this.variant,
|
|
157
|
+
customClass = this.customClass,
|
|
158
|
+
noFade = this.noFade,
|
|
159
|
+
interactive = this.interactive;
|
|
162
160
|
return {
|
|
163
161
|
title,
|
|
164
162
|
content,
|
|
@@ -503,9 +501,7 @@ const BVTooltip = /*#__PURE__*/extend({
|
|
|
503
501
|
},
|
|
504
502
|
// --- Helper methods ---
|
|
505
503
|
getTarget() {
|
|
506
|
-
let
|
|
507
|
-
target
|
|
508
|
-
} = this;
|
|
504
|
+
let target = this.target;
|
|
509
505
|
if (isString(target)) {
|
|
510
506
|
target = getById(target.replace(/^#/, ''));
|
|
511
507
|
} else if (isFunction(target)) {
|
|
@@ -637,9 +633,7 @@ const BVTooltip = /*#__PURE__*/extend({
|
|
|
637
633
|
});
|
|
638
634
|
},
|
|
639
635
|
emitEvent(bvEvent) {
|
|
640
|
-
const
|
|
641
|
-
type
|
|
642
|
-
} = bvEvent;
|
|
636
|
+
const type = bvEvent.type;
|
|
643
637
|
this.emitOnRoot(getRootEventName(this.templateType, type), bvEvent);
|
|
644
638
|
this.$emit(type, bvEvent);
|
|
645
639
|
},
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { extend } from '../../vue';
|
|
2
2
|
import { NAME_TOOLTIP } from '../../constants/components';
|
|
3
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, PROP_TYPE_BOOLEAN, PROP_TYPE_ARRAY, PROP_TYPE_FUNCTION } from '../../constants/props';
|
|
5
4
|
import { HTMLElement, SVGElement } from '../../constants/safe-types';
|
|
6
5
|
import { useParentMixin } from '../../mixins/use-parent';
|
|
7
6
|
import { getScopeId } from '../../utils/get-scope-id';
|
|
@@ -26,12 +25,12 @@ const props = {
|
|
|
26
25
|
// Element: element reference
|
|
27
26
|
// Object: Vue component
|
|
28
27
|
boundary: {
|
|
29
|
-
type: [HTMLElement,
|
|
28
|
+
type: [HTMLElement, Object, String],
|
|
30
29
|
required: false,
|
|
31
30
|
default: 'scrollParent'
|
|
32
31
|
},
|
|
33
32
|
boundaryPadding: {
|
|
34
|
-
type: [
|
|
33
|
+
type: [Number, String],
|
|
35
34
|
required: false,
|
|
36
35
|
default: 5
|
|
37
36
|
},
|
|
@@ -39,61 +38,61 @@ const props = {
|
|
|
39
38
|
// HTMLElement: element reference reference
|
|
40
39
|
// Object: Vue Component
|
|
41
40
|
container: {
|
|
42
|
-
type: [HTMLElement,
|
|
41
|
+
type: [HTMLElement, Object, String],
|
|
43
42
|
required: false,
|
|
44
43
|
default: undefined
|
|
45
44
|
},
|
|
46
45
|
customClass: {
|
|
47
|
-
type:
|
|
46
|
+
type: String,
|
|
48
47
|
required: false,
|
|
49
48
|
default: 'gl-tooltip'
|
|
50
49
|
},
|
|
51
50
|
delay: {
|
|
52
|
-
type: [
|
|
51
|
+
type: [Number, Object, String],
|
|
53
52
|
required: false,
|
|
54
53
|
default: () => ({
|
|
55
54
|
...TOOLTIP_DELAY
|
|
56
55
|
})
|
|
57
56
|
},
|
|
58
57
|
[MODEL_PROP_NAME_ENABLED]: {
|
|
59
|
-
type:
|
|
58
|
+
type: Boolean,
|
|
60
59
|
required: false,
|
|
61
60
|
default: false
|
|
62
61
|
},
|
|
63
62
|
fallbackPlacement: {
|
|
64
|
-
type: [
|
|
63
|
+
type: [Array, String],
|
|
65
64
|
required: false,
|
|
66
65
|
default: 'flip'
|
|
67
66
|
},
|
|
68
67
|
// ID to use for tooltip element
|
|
69
68
|
// If not provided on will automatically be generated
|
|
70
69
|
id: {
|
|
71
|
-
type:
|
|
70
|
+
type: String,
|
|
72
71
|
required: false,
|
|
73
72
|
default: undefined
|
|
74
73
|
},
|
|
75
74
|
noFade: {
|
|
76
|
-
type:
|
|
75
|
+
type: Boolean,
|
|
77
76
|
required: false,
|
|
78
77
|
default: false
|
|
79
78
|
},
|
|
80
79
|
noninteractive: {
|
|
81
|
-
type:
|
|
80
|
+
type: Boolean,
|
|
82
81
|
required: false,
|
|
83
82
|
default: false
|
|
84
83
|
},
|
|
85
84
|
offset: {
|
|
86
|
-
type: [
|
|
85
|
+
type: [Number, String],
|
|
87
86
|
required: false,
|
|
88
87
|
default: 0
|
|
89
88
|
},
|
|
90
89
|
placement: {
|
|
91
|
-
type:
|
|
90
|
+
type: String,
|
|
92
91
|
required: false,
|
|
93
92
|
default: 'top'
|
|
94
93
|
},
|
|
95
94
|
[MODEL_PROP_NAME_SHOW]: {
|
|
96
|
-
type:
|
|
95
|
+
type: Boolean,
|
|
97
96
|
required: false,
|
|
98
97
|
default: false
|
|
99
98
|
},
|
|
@@ -101,21 +100,21 @@ const props = {
|
|
|
101
100
|
// Or function that returns one of the above
|
|
102
101
|
// Required
|
|
103
102
|
target: {
|
|
104
|
-
type: [HTMLElement, SVGElement,
|
|
103
|
+
type: [HTMLElement, SVGElement, Function, Object, String],
|
|
105
104
|
required: true
|
|
106
105
|
},
|
|
107
106
|
title: {
|
|
108
|
-
type:
|
|
107
|
+
type: String,
|
|
109
108
|
required: false,
|
|
110
109
|
default: undefined
|
|
111
110
|
},
|
|
112
111
|
triggers: {
|
|
113
|
-
type: [
|
|
112
|
+
type: [Array, String],
|
|
114
113
|
required: false,
|
|
115
114
|
default: 'hover focus'
|
|
116
115
|
},
|
|
117
116
|
variant: {
|
|
118
|
-
type:
|
|
117
|
+
type: String,
|
|
119
118
|
required: false,
|
|
120
119
|
default: undefined
|
|
121
120
|
}
|
|
@@ -149,10 +148,8 @@ const BTooltip = /*#__PURE__*/extend({
|
|
|
149
148
|
},
|
|
150
149
|
// Used to watch for changes to the title and content props
|
|
151
150
|
templateTitleContent() {
|
|
152
|
-
const
|
|
153
|
-
|
|
154
|
-
content
|
|
155
|
-
} = this;
|
|
151
|
+
const title = this.title,
|
|
152
|
+
content = this.content;
|
|
156
153
|
return {
|
|
157
154
|
title,
|
|
158
155
|
content
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { extend, mergeData } from '../../vue';
|
|
2
2
|
import { NAME_TRANSITION } from '../../constants/components';
|
|
3
|
-
import { PROP_TYPE_BOOLEAN, PROP_TYPE_STRING, PROP_TYPE_OBJECT } from '../../constants/props';
|
|
4
3
|
import { isPlainObject } from '../../utils/inspect';
|
|
5
4
|
|
|
6
5
|
// Generic Bootstrap v4 fade (no-fade) transition component
|
|
@@ -32,26 +31,26 @@ const FADE_PROPS = {
|
|
|
32
31
|
const props = {
|
|
33
32
|
// Has no effect if `trans-props` provided
|
|
34
33
|
appear: {
|
|
35
|
-
type:
|
|
34
|
+
type: Boolean,
|
|
36
35
|
required: false,
|
|
37
36
|
default: false
|
|
38
37
|
},
|
|
39
38
|
// Can be overridden by user supplied `trans-props`
|
|
40
39
|
mode: {
|
|
41
|
-
type:
|
|
40
|
+
type: String,
|
|
42
41
|
required: false,
|
|
43
42
|
default: undefined
|
|
44
43
|
},
|
|
45
44
|
// Only applicable to the built in transition
|
|
46
45
|
// Has no effect if `trans-props` provided
|
|
47
46
|
noFade: {
|
|
48
|
-
type:
|
|
47
|
+
type: Boolean,
|
|
49
48
|
required: false,
|
|
50
49
|
default: false
|
|
51
50
|
},
|
|
52
51
|
// For user supplied transitions (if needed)
|
|
53
52
|
transProps: {
|
|
54
|
-
type:
|
|
53
|
+
type: Object,
|
|
55
54
|
required: false,
|
|
56
55
|
default: undefined
|
|
57
56
|
}
|
|
@@ -66,11 +65,9 @@ const BVTransition = /*#__PURE__*/extend({
|
|
|
66
65
|
functional: true,
|
|
67
66
|
props,
|
|
68
67
|
render(h, _ref) {
|
|
69
|
-
let
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
props
|
|
73
|
-
} = _ref;
|
|
68
|
+
let children = _ref.children,
|
|
69
|
+
data = _ref.data,
|
|
70
|
+
props = _ref.props;
|
|
74
71
|
let transProps = props.transProps;
|
|
75
72
|
if (!isPlainObject(transProps)) {
|
|
76
73
|
transProps = props.noFade ? NO_FADE_PROPS : FADE_PROPS;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { extend, isVue3 } from '../../vue';
|
|
2
2
|
import { NAME_TRANSPORTER, NAME_TRANSPORTER_TARGET } from '../../constants/components';
|
|
3
3
|
import { IS_BROWSER } from '../../constants/env';
|
|
4
|
-
import { PROP_TYPE_STRING, PROP_TYPE_BOOLEAN, PROP_TYPE_ARRAY, PROP_TYPE_FUNCTION } from '../../constants/props';
|
|
5
4
|
import { HTMLElement } from '../../constants/safe-types';
|
|
6
5
|
import { concat } from '../../utils/array';
|
|
7
6
|
import { select, removeNode } from '../../utils/dom';
|
|
@@ -36,7 +35,7 @@ const BVTransporterTarget = /*#__PURE__*/extend({
|
|
|
36
35
|
// Even though we only support a single root element,
|
|
37
36
|
// VNodes are always passed as an array
|
|
38
37
|
nodes: {
|
|
39
|
-
type: [
|
|
38
|
+
type: [Array, Function],
|
|
40
39
|
required: false,
|
|
41
40
|
default: undefined
|
|
42
41
|
}
|
|
@@ -50,9 +49,7 @@ const BVTransporterTarget = /*#__PURE__*/extend({
|
|
|
50
49
|
removeNode(this.$el);
|
|
51
50
|
},
|
|
52
51
|
render(h) {
|
|
53
|
-
const
|
|
54
|
-
updatedNodes
|
|
55
|
-
} = this;
|
|
52
|
+
const updatedNodes = this.updatedNodes;
|
|
56
53
|
let $nodes = isFunction(updatedNodes) ? updatedNodes({}) : updatedNodes;
|
|
57
54
|
$nodes = concat($nodes).filter(identity);
|
|
58
55
|
if ($nodes && $nodes.length > 0 && !$nodes[0].text) {
|
|
@@ -71,18 +68,18 @@ const props = {
|
|
|
71
68
|
// HTMLElement: Element reference
|
|
72
69
|
// Mainly needed for tooltips/popovers inside modals
|
|
73
70
|
container: {
|
|
74
|
-
type: [HTMLElement,
|
|
71
|
+
type: [HTMLElement, String],
|
|
75
72
|
required: false,
|
|
76
73
|
default: 'body'
|
|
77
74
|
},
|
|
78
75
|
disabled: {
|
|
79
|
-
type:
|
|
76
|
+
type: Boolean,
|
|
80
77
|
required: false,
|
|
81
78
|
default: false
|
|
82
79
|
},
|
|
83
80
|
// This should be set to match the root element type
|
|
84
81
|
tag: {
|
|
85
|
-
type:
|
|
82
|
+
type: String,
|
|
86
83
|
required: false,
|
|
87
84
|
default: 'div'
|
|
88
85
|
}
|
|
@@ -138,9 +135,7 @@ const BVTransporter = /*#__PURE__*/extend({
|
|
|
138
135
|
getContainer() {
|
|
139
136
|
/* istanbul ignore else */
|
|
140
137
|
if (IS_BROWSER) {
|
|
141
|
-
const
|
|
142
|
-
container
|
|
143
|
-
} = this;
|
|
138
|
+
const container = this.container;
|
|
144
139
|
return isString(container) ? select(container) : container;
|
|
145
140
|
} else {
|
|
146
141
|
return null;
|
|
@@ -198,9 +193,7 @@ const BVTransporter = /*#__PURE__*/extend({
|
|
|
198
193
|
return $nodes[0];
|
|
199
194
|
}
|
|
200
195
|
}
|
|
201
|
-
const
|
|
202
|
-
Teleport
|
|
203
|
-
} = this.$.appContext.config.globalProperties.constructor;
|
|
196
|
+
const Teleport = this.$.appContext.config.globalProperties.constructor.Teleport;
|
|
204
197
|
return h(Teleport, {
|
|
205
198
|
to: this.container
|
|
206
199
|
}, this.normalizeSlot());
|