@gitlab/ui 97.3.0 → 98.1.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/CHANGELOG.md +20 -0
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.js +0 -1
- package/dist/tokens/build/js/tokens.dark.js +84 -84
- package/dist/tokens/css/tokens.css +1 -1
- package/dist/tokens/css/tokens.dark.css +47 -47
- package/dist/tokens/js/tokens.dark.js +84 -84
- package/dist/tokens/json/tokens.dark.json +148 -133
- package/dist/tokens/json/tokens.json +64 -49
- package/dist/tokens/scss/_tokens.dark.scss +47 -47
- package/dist/tokens/scss/_tokens.scss +1 -1
- package/dist/vendor/bootstrap-vue/src/components/collapse/collapse.js +3 -36
- package/dist/vendor/bootstrap-vue/src/components/tabs/tabs.js +1 -1
- package/dist/vendor/bootstrap-vue/src/components/transition/bv-transition.js +12 -2
- package/dist/vendor/bootstrap-vue/src/constants/components.js +1 -3
- package/dist/vendor/bootstrap-vue/src/constants/env.js +1 -2
- package/dist/vendor/bootstrap-vue/src/index.js +0 -2
- package/dist/vendor/bootstrap-vue/src/mixins/dropdown.js +12 -39
- package/package.json +2 -1
- package/src/index.js +0 -1
- package/src/scss/bootstrap_vue.scss +0 -1
- package/src/scss/components.scss +0 -1
- package/src/tokens/action.tokens.json +21 -12
- package/src/tokens/build/css/tokens.css +1 -1
- package/src/tokens/build/css/tokens.dark.css +47 -47
- package/src/tokens/build/js/tokens.dark.js +84 -84
- package/src/tokens/build/json/tokens.dark.json +148 -133
- package/src/tokens/build/json/tokens.json +64 -49
- package/src/tokens/build/scss/_tokens.dark.scss +47 -47
- package/src/tokens/build/scss/_tokens.scss +1 -1
- package/src/tokens/contextual/button.tokens.json +43 -37
- package/src/vendor/bootstrap-vue/package.json +3 -20
- package/src/vendor/bootstrap-vue/src/components/collapse/MODIFICATIONS.md +14 -0
- package/src/vendor/bootstrap-vue/src/components/collapse/collapse.js +3 -37
- package/src/vendor/bootstrap-vue/src/components/collapse/collapse.spec.js +0 -132
- package/src/vendor/bootstrap-vue/src/components/collapse/package.json +0 -4
- package/src/vendor/bootstrap-vue/src/components/dropdown/README.md +1 -1
- package/src/vendor/bootstrap-vue/src/components/form-input/form-input.spec.js +3 -0
- package/src/vendor/bootstrap-vue/src/components/index.d.ts +0 -1
- package/src/vendor/bootstrap-vue/src/components/index.scss +0 -1
- package/src/vendor/bootstrap-vue/src/components/modal/MODIFICATIONS.md +8 -5
- package/src/vendor/bootstrap-vue/src/components/nav/package.json +1 -1
- package/src/vendor/bootstrap-vue/src/components/popover/popover.spec.js +0 -1
- package/src/vendor/bootstrap-vue/src/components/table/table-filtering.spec.js +1 -1
- package/src/vendor/bootstrap-vue/src/components/tabs/tabs.js +1 -1
- package/src/vendor/bootstrap-vue/src/components/toast/toast.spec.js +6 -18
- package/src/vendor/bootstrap-vue/src/components/tooltip/tooltip.spec.js +67 -356
- package/src/vendor/bootstrap-vue/src/components/transition/bv-transition.js +15 -2
- package/src/vendor/bootstrap-vue/src/constants/components.js +0 -2
- package/src/vendor/bootstrap-vue/src/constants/env.js +0 -3
- package/src/vendor/bootstrap-vue/src/directives/tooltip/tooltip.spec.js +46 -79
- package/src/vendor/bootstrap-vue/src/index.js +0 -4
- package/src/vendor/bootstrap-vue/src/mixins/dropdown.js +12 -36
- package/src/vendor/bootstrap-vue/src/utils/config.spec.js +20 -2
- package/dist/components/base/navbar/navbar.js +0 -48
- package/dist/vendor/bootstrap-vue/src/components/navbar/index.js +0 -2
- package/dist/vendor/bootstrap-vue/src/components/navbar/navbar-brand.js +0 -40
- package/dist/vendor/bootstrap-vue/src/components/navbar/navbar.js +0 -72
- package/src/components/base/navbar/navbar.md +0 -4
- package/src/components/base/navbar/navbar.scss +0 -0
- package/src/components/base/navbar/navbar.vue +0 -17
- package/src/vendor/bootstrap-vue/src/components/navbar/README.md +0 -332
- package/src/vendor/bootstrap-vue/src/components/navbar/_navbar.scss +0 -1
- package/src/vendor/bootstrap-vue/src/components/navbar/index.d.ts +0 -10
- package/src/vendor/bootstrap-vue/src/components/navbar/index.js +0 -4
- package/src/vendor/bootstrap-vue/src/components/navbar/index.scss +0 -1
- package/src/vendor/bootstrap-vue/src/components/navbar/navbar-brand.js +0 -42
- package/src/vendor/bootstrap-vue/src/components/navbar/navbar-brand.spec.js +0 -50
- package/src/vendor/bootstrap-vue/src/components/navbar/navbar.js +0 -78
- package/src/vendor/bootstrap-vue/src/components/navbar/navbar.spec.js +0 -130
- package/src/vendor/bootstrap-vue/src/components/navbar/package.json +0 -54
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { extend } from '../../vue';
|
|
2
2
|
import { NAME_COLLAPSE } from '../../constants/components';
|
|
3
3
|
import { CLASS_NAME_SHOW } from '../../constants/classes';
|
|
4
|
-
import {
|
|
5
|
-
import { EVENT_OPTIONS_NO_CAPTURE, EVENT_NAME_SHOW, EVENT_NAME_SHOWN, EVENT_NAME_HIDE, EVENT_NAME_HIDDEN } from '../../constants/events';
|
|
4
|
+
import { EVENT_NAME_SHOW, EVENT_NAME_SHOWN, EVENT_NAME_HIDE, EVENT_NAME_HIDDEN } from '../../constants/events';
|
|
6
5
|
import { PROP_TYPE_BOOLEAN, PROP_TYPE_STRING } from '../../constants/props';
|
|
7
6
|
import { SLOT_NAME_DEFAULT } from '../../constants/slots';
|
|
8
7
|
import { hasClass, removeClass, getCS, addClass, matches, closest } from '../../utils/dom';
|
|
9
|
-
import { getRootActionEventName, getRootEventName
|
|
8
|
+
import { getRootActionEventName, getRootEventName } from '../../utils/events';
|
|
10
9
|
import { makeModelMixin } from '../../utils/model';
|
|
11
10
|
import { sortKeys } from '../../utils/object';
|
|
12
11
|
import { makePropsConfigurable, makeProp } from '../../utils/props';
|
|
@@ -40,7 +39,6 @@ const props = makePropsConfigurable(sortKeys({
|
|
|
40
39
|
// If `true` (and `visible` is `true` on mount), animate initially visible
|
|
41
40
|
accordion: makeProp(PROP_TYPE_STRING),
|
|
42
41
|
appear: makeProp(PROP_TYPE_BOOLEAN, false),
|
|
43
|
-
isNav: makeProp(PROP_TYPE_BOOLEAN, false),
|
|
44
42
|
tag: makeProp(PROP_TYPE_STRING, 'div')
|
|
45
43
|
}), NAME_COLLAPSE);
|
|
46
44
|
|
|
@@ -63,7 +61,6 @@ const BCollapse = /*#__PURE__*/extend({
|
|
|
63
61
|
transitioning
|
|
64
62
|
} = this;
|
|
65
63
|
return {
|
|
66
|
-
'navbar-collapse': this.isNav,
|
|
67
64
|
collapse: !transitioning,
|
|
68
65
|
show: this.show && !transitioning
|
|
69
66
|
};
|
|
@@ -98,11 +95,6 @@ const BCollapse = /*#__PURE__*/extend({
|
|
|
98
95
|
this.listenOnRoot(ROOT_ACTION_EVENT_NAME_TOGGLE, this.handleToggleEvent);
|
|
99
96
|
// Listen to other collapses for accordion events
|
|
100
97
|
this.listenOnRoot(ROOT_EVENT_NAME_ACCORDION, this.handleAccordionEvent);
|
|
101
|
-
if (this.isNav) {
|
|
102
|
-
// Set up handlers
|
|
103
|
-
this.setWindowEvents(true);
|
|
104
|
-
this.handleResize();
|
|
105
|
-
}
|
|
106
98
|
this.$nextTick(() => {
|
|
107
99
|
this.emitState();
|
|
108
100
|
});
|
|
@@ -119,31 +111,11 @@ const BCollapse = /*#__PURE__*/extend({
|
|
|
119
111
|
// It is emitted regardless if the visible state changes
|
|
120
112
|
this.emitSync();
|
|
121
113
|
},
|
|
122
|
-
/* istanbul ignore next */
|
|
123
|
-
deactivated() {
|
|
124
|
-
if (this.isNav) {
|
|
125
|
-
this.setWindowEvents(false);
|
|
126
|
-
}
|
|
127
|
-
},
|
|
128
|
-
/* istanbul ignore next */
|
|
129
|
-
activated() {
|
|
130
|
-
if (this.isNav) {
|
|
131
|
-
this.setWindowEvents(true);
|
|
132
|
-
}
|
|
133
|
-
this.emitSync();
|
|
134
|
-
},
|
|
135
114
|
beforeDestroy() {
|
|
136
115
|
// Trigger state emit if needed
|
|
137
116
|
this.show = false;
|
|
138
|
-
if (this.isNav && IS_BROWSER) {
|
|
139
|
-
this.setWindowEvents(false);
|
|
140
|
-
}
|
|
141
117
|
},
|
|
142
118
|
methods: {
|
|
143
|
-
setWindowEvents(on) {
|
|
144
|
-
eventOnOff(on, window, 'resize', this.handleResize, EVENT_OPTIONS_NO_CAPTURE);
|
|
145
|
-
eventOnOff(on, window, 'orientationchange', this.handleResize, EVENT_OPTIONS_NO_CAPTURE);
|
|
146
|
-
},
|
|
147
119
|
toggle() {
|
|
148
120
|
this.show = !this.show;
|
|
149
121
|
},
|
|
@@ -205,9 +177,8 @@ const BCollapse = /*#__PURE__*/extend({
|
|
|
205
177
|
const {
|
|
206
178
|
target: el
|
|
207
179
|
} = event;
|
|
208
|
-
// If we are in a nav/navbar, close the collapse when non-disabled link clicked
|
|
209
180
|
/* istanbul ignore next: can't test `getComputedStyle()` in JSDOM */
|
|
210
|
-
if (!
|
|
181
|
+
if (!el || getCS(this.$el).display !== 'block') {
|
|
211
182
|
return;
|
|
212
183
|
}
|
|
213
184
|
// Only close the collapse if it is not forced to be `display: block !important`
|
|
@@ -234,10 +205,6 @@ const BCollapse = /*#__PURE__*/extend({
|
|
|
234
205
|
if (isThis && !show || !isThis && show) {
|
|
235
206
|
this.toggle();
|
|
236
207
|
}
|
|
237
|
-
},
|
|
238
|
-
handleResize() {
|
|
239
|
-
// Handler for orientation/resize to set collapsed state in nav/navbar
|
|
240
|
-
this.show = getCS(this.$el).display === 'block';
|
|
241
208
|
}
|
|
242
209
|
},
|
|
243
210
|
render(h) {
|
|
@@ -165,7 +165,7 @@ const BVTabButton = /*#__PURE__*/extend({
|
|
|
165
165
|
|
|
166
166
|
// --- Props ---
|
|
167
167
|
|
|
168
|
-
const navProps = omit(props$1, ['tabs', '
|
|
168
|
+
const navProps = omit(props$1, ['tabs', 'cardHeader']);
|
|
169
169
|
const props = makePropsConfigurable(sortKeys({
|
|
170
170
|
...props$2,
|
|
171
171
|
...modelProps,
|
|
@@ -36,6 +36,7 @@ const props = {
|
|
|
36
36
|
// For user supplied transitions (if needed)
|
|
37
37
|
transProps: makeProp(PROP_TYPE_OBJECT)
|
|
38
38
|
};
|
|
39
|
+
const hasAnimateSupport = Boolean(Element.prototype.animate);
|
|
39
40
|
|
|
40
41
|
// --- Main component ---
|
|
41
42
|
|
|
@@ -67,8 +68,17 @@ const BVTransition = /*#__PURE__*/extend({
|
|
|
67
68
|
transProps = {
|
|
68
69
|
mode: props.mode,
|
|
69
70
|
...transProps,
|
|
70
|
-
|
|
71
|
-
|
|
71
|
+
/*
|
|
72
|
+
bootstrap-vue says: We always need `css` true
|
|
73
|
+
@gitlab/ui says: OMG. THE FREAKING TRANSITIONS.
|
|
74
|
+
So apparently jsdom doesn't implement animations (who can blame them)
|
|
75
|
+
but a Vue Transition relies on the native animationend/transitionend
|
|
76
|
+
events in order to fire onAfterLeave. jsdom will never fire the `onAfterLeave`
|
|
77
|
+
which is relied on by e.g. the tooltip component to do it's `hidden` logic.
|
|
78
|
+
So if in specs, we set `css: false`, everything will work as expected.
|
|
79
|
+
The best way we have found is to do a feature detection on `Element.prototype.animate`
|
|
80
|
+
*/
|
|
81
|
+
css: hasAnimateSupport
|
|
72
82
|
};
|
|
73
83
|
const dataCopy = {
|
|
74
84
|
...data
|
|
@@ -39,8 +39,6 @@ const NAME_INPUT_GROUP_TEXT = 'BInputGroupText';
|
|
|
39
39
|
const NAME_LINK = 'BLink';
|
|
40
40
|
const NAME_MODAL = 'BModal';
|
|
41
41
|
const NAME_NAV = 'BNav';
|
|
42
|
-
const NAME_NAVBAR = 'BNavbar';
|
|
43
|
-
const NAME_NAVBAR_BRAND = 'BNavbarBrand';
|
|
44
42
|
const NAME_NAV_ITEM = 'BNavItem';
|
|
45
43
|
const NAME_NAV_ITEM_DROPDOWN = 'BNavItemDropdown';
|
|
46
44
|
const NAME_POPOVER = 'BPopover';
|
|
@@ -74,4 +72,4 @@ const NAME_TRANSITION = 'BVTransition';
|
|
|
74
72
|
const NAME_TRANSPORTER = 'BVTransporter';
|
|
75
73
|
const NAME_TRANSPORTER_TARGET = 'BVTransporterTarget';
|
|
76
74
|
|
|
77
|
-
export { NAME_BADGE, NAME_BREADCRUMB, NAME_BREADCRUMB_ITEM, NAME_BREADCRUMB_LINK, NAME_BUTTON, NAME_BUTTON_CLOSE, NAME_BUTTON_GROUP, NAME_COL, NAME_COLLAPSE, NAME_COLLAPSE_HELPER, 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_CHECKBOX, NAME_FORM_CHECKBOX_GROUP, NAME_FORM_GROUP, NAME_FORM_INPUT, NAME_FORM_INVALID_FEEDBACK, NAME_FORM_RADIO, NAME_FORM_RADIO_GROUP, 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_INPUT_GROUP, NAME_INPUT_GROUP_ADDON, NAME_INPUT_GROUP_APPEND, NAME_INPUT_GROUP_PREPEND, NAME_INPUT_GROUP_TEXT, NAME_LINK, NAME_MODAL, NAME_NAV,
|
|
75
|
+
export { NAME_BADGE, NAME_BREADCRUMB, NAME_BREADCRUMB_ITEM, NAME_BREADCRUMB_LINK, NAME_BUTTON, NAME_BUTTON_CLOSE, NAME_BUTTON_GROUP, NAME_COL, NAME_COLLAPSE, NAME_COLLAPSE_HELPER, 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_CHECKBOX, NAME_FORM_CHECKBOX_GROUP, NAME_FORM_GROUP, NAME_FORM_INPUT, NAME_FORM_INVALID_FEEDBACK, NAME_FORM_RADIO, NAME_FORM_RADIO_GROUP, 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_INPUT_GROUP, NAME_INPUT_GROUP_ADDON, NAME_INPUT_GROUP_APPEND, NAME_INPUT_GROUP_PREPEND, NAME_INPUT_GROUP_TEXT, NAME_LINK, NAME_MODAL, NAME_NAV, NAME_NAV_ITEM, NAME_NAV_ITEM_DROPDOWN, 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 };
|
|
@@ -33,7 +33,6 @@ const HAS_PASSIVE_EVENT_SUPPORT = (() => {
|
|
|
33
33
|
}
|
|
34
34
|
return passiveEventSupported;
|
|
35
35
|
})();
|
|
36
|
-
const HAS_TOUCH_SUPPORT = IS_BROWSER && ('ontouchstart' in DOCUMENT.documentElement || NAVIGATOR.maxTouchPoints > 0);
|
|
37
36
|
const HAS_POINTER_EVENT_SUPPORT = IS_BROWSER && Boolean(WINDOW.PointerEvent || WINDOW.MSPointerEvent);
|
|
38
37
|
|
|
39
38
|
/* istanbul ignore next: JSDOM only checks for 'IntersectionObserver' */
|
|
@@ -43,4 +42,4 @@ const HAS_INTERACTION_OBSERVER_SUPPORT = IS_BROWSER && 'IntersectionObserver' in
|
|
|
43
42
|
// 'isIntersecting' in window.IntersectionObserverEntry.prototype &&
|
|
44
43
|
'intersectionRatio' in WINDOW.IntersectionObserverEntry.prototype;
|
|
45
44
|
|
|
46
|
-
export { DOCUMENT, HAS_DOCUMENT_SUPPORT, HAS_INTERACTION_OBSERVER_SUPPORT, HAS_MUTATION_OBSERVER_SUPPORT, HAS_NAVIGATOR_SUPPORT, HAS_PASSIVE_EVENT_SUPPORT, HAS_POINTER_EVENT_SUPPORT,
|
|
45
|
+
export { DOCUMENT, HAS_DOCUMENT_SUPPORT, HAS_INTERACTION_OBSERVER_SUPPORT, HAS_MUTATION_OBSERVER_SUPPORT, HAS_NAVIGATOR_SUPPORT, HAS_PASSIVE_EVENT_SUPPORT, HAS_POINTER_EVENT_SUPPORT, HAS_WINDOW_SUPPORT, IS_BROWSER, IS_IE, IS_JSDOM, NAVIGATOR, USER_AGENT, WINDOW };
|
|
@@ -43,8 +43,6 @@ export { BModal } from './components/modal/modal';
|
|
|
43
43
|
export { BNav } from './components/nav/nav';
|
|
44
44
|
export { BNavItem } from './components/nav/nav-item';
|
|
45
45
|
export { BNavItemDropdown } from './components/nav/nav-item-dropdown';
|
|
46
|
-
export { BNavbar } from './components/navbar/navbar';
|
|
47
|
-
export { BNavbarBrand } from './components/navbar/navbar-brand';
|
|
48
46
|
export { BPopover } from './components/popover/popover';
|
|
49
47
|
export { BTable } from './components/table/table';
|
|
50
48
|
export { BTableLite } from './components/table/table-lite';
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import Popper from 'popper.js';
|
|
2
2
|
import { extend } from '../vue';
|
|
3
3
|
import { NAME_DROPDOWN } from '../constants/components';
|
|
4
|
-
import { HAS_TOUCH_SUPPORT } from '../constants/env';
|
|
5
4
|
import { EVENT_NAME_SHOWN, EVENT_NAME_HIDDEN, EVENT_NAME_TOGGLE, EVENT_NAME_CLICK, EVENT_NAME_SHOW, EVENT_NAME_HIDE } from '../constants/events';
|
|
6
5
|
import { CODE_ENTER, CODE_SPACE, CODE_DOWN, CODE_ESC, CODE_UP } from '../constants/key-codes';
|
|
7
6
|
import { PLACEMENT_TOP_END, PLACEMENT_TOP_START, PLACEMENT_BOTTOM_START, PLACEMENT_RIGHT_START, PLACEMENT_LEFT_START, PLACEMENT_BOTTOM_END } from '../constants/popper';
|
|
@@ -10,7 +9,6 @@ import { HTMLElement } from '../constants/safe-types';
|
|
|
10
9
|
import { BvEvent } from '../utils/bv-event.class';
|
|
11
10
|
import { requestAF, contains, closest, attemptFocus, selectAll, isVisible } from '../utils/dom';
|
|
12
11
|
import { getRootEventName, stopEvent } from '../utils/events';
|
|
13
|
-
import { isNull } from '../utils/inspect';
|
|
14
12
|
import { sortKeys, mergeDeep } from '../utils/object';
|
|
15
13
|
import { makePropsConfigurable, makeProp } from '../utils/props';
|
|
16
14
|
import { warn } from '../utils/warn';
|
|
@@ -68,11 +66,6 @@ const dropdownMixin = extend({
|
|
|
68
66
|
getBvDropdown: () => this
|
|
69
67
|
};
|
|
70
68
|
},
|
|
71
|
-
inject: {
|
|
72
|
-
getBvNavbar: {
|
|
73
|
-
default: () => () => null
|
|
74
|
-
}
|
|
75
|
-
},
|
|
76
69
|
props,
|
|
77
70
|
data() {
|
|
78
71
|
return {
|
|
@@ -81,12 +74,6 @@ const dropdownMixin = extend({
|
|
|
81
74
|
};
|
|
82
75
|
},
|
|
83
76
|
computed: {
|
|
84
|
-
bvNavbar() {
|
|
85
|
-
return this.getBvNavbar();
|
|
86
|
-
},
|
|
87
|
-
inNavbar() {
|
|
88
|
-
return !isNull(this.bvNavbar);
|
|
89
|
-
},
|
|
90
77
|
toggler() {
|
|
91
78
|
const {
|
|
92
79
|
toggle
|
|
@@ -107,10 +94,7 @@ const dropdownMixin = extend({
|
|
|
107
94
|
// Position `static` is needed to allow menu to "breakout" of the `scrollParent`
|
|
108
95
|
// boundaries when boundary is anything other than `scrollParent`
|
|
109
96
|
// See: https://github.com/twbs/bootstrap/issues/24251#issuecomment-341413786
|
|
110
|
-
return this.boundary !== 'scrollParent'
|
|
111
|
-
},
|
|
112
|
-
hideDelay() {
|
|
113
|
-
return this.inNavbar ? HAS_TOUCH_SUPPORT ? 300 : 50 : 0;
|
|
97
|
+
return this.boundary !== 'scrollParent' ? 'position-static' : '';
|
|
114
98
|
}
|
|
115
99
|
},
|
|
116
100
|
watch: {
|
|
@@ -154,7 +138,6 @@ const dropdownMixin = extend({
|
|
|
154
138
|
created() {
|
|
155
139
|
// Create private non-reactive props
|
|
156
140
|
this.$_popper = null;
|
|
157
|
-
this.$_hideTimeout = null;
|
|
158
141
|
},
|
|
159
142
|
/* istanbul ignore next */
|
|
160
143
|
deactivated() {
|
|
@@ -170,7 +153,6 @@ const dropdownMixin = extend({
|
|
|
170
153
|
this.visible = false;
|
|
171
154
|
this.whileOpenListen(false);
|
|
172
155
|
this.destroyPopper();
|
|
173
|
-
this.clearHideTimeout();
|
|
174
156
|
removeElementToInstance(this.$el);
|
|
175
157
|
},
|
|
176
158
|
methods: {
|
|
@@ -187,20 +169,16 @@ const dropdownMixin = extend({
|
|
|
187
169
|
/* istanbul ignore next */
|
|
188
170
|
return;
|
|
189
171
|
}
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
el = el.$el || el;
|
|
201
|
-
// Instantiate Popper.js
|
|
202
|
-
this.createPopper(el);
|
|
203
|
-
}
|
|
172
|
+
if (typeof Popper === 'undefined') {
|
|
173
|
+
/* istanbul ignore next */
|
|
174
|
+
warn('Popper.js not found. Falling back to CSS positioning', NAME_DROPDOWN);
|
|
175
|
+
} else {
|
|
176
|
+
// For dropup with alignment we use the parent element as popper container
|
|
177
|
+
let el = this.dropup && this.right || this.split ? this.$el : this.$refs.toggle;
|
|
178
|
+
// Make sure we have a reference to an element, not a component!
|
|
179
|
+
el = el.$el || el;
|
|
180
|
+
// Instantiate Popper.js
|
|
181
|
+
this.createPopper(el);
|
|
204
182
|
}
|
|
205
183
|
|
|
206
184
|
// Ensure other menus are closed
|
|
@@ -239,10 +217,6 @@ const dropdownMixin = extend({
|
|
|
239
217
|
this.$_popper.scheduleUpdate();
|
|
240
218
|
} catch {}
|
|
241
219
|
},
|
|
242
|
-
clearHideTimeout() {
|
|
243
|
-
clearTimeout(this.$_hideTimeout);
|
|
244
|
-
this.$_hideTimeout = null;
|
|
245
|
-
},
|
|
246
220
|
getPopperConfig() {
|
|
247
221
|
let placement = PLACEMENT_BOTTOM_START;
|
|
248
222
|
if (this.dropup) {
|
|
@@ -393,8 +367,7 @@ const dropdownMixin = extend({
|
|
|
393
367
|
target
|
|
394
368
|
} = event;
|
|
395
369
|
if (this.visible && !contains(this.$refs.menu, target) && !contains(this.toggler, target)) {
|
|
396
|
-
this.
|
|
397
|
-
this.$_hideTimeout = setTimeout(() => this.hide(), this.hideDelay);
|
|
370
|
+
this.hide();
|
|
398
371
|
}
|
|
399
372
|
},
|
|
400
373
|
// Document click-out listener
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitlab/ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "98.1.0",
|
|
4
4
|
"description": "GitLab UI Components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -204,6 +204,7 @@
|
|
|
204
204
|
"vue": "2.7.16",
|
|
205
205
|
"vue-loader": "^15.8.3",
|
|
206
206
|
"vue-loader-vue3": "npm:vue-loader@17",
|
|
207
|
+
"vue-router": "^3.5.1",
|
|
207
208
|
"vue-template-compiler": "2.7.16",
|
|
208
209
|
"vue-test-utils-compat": "^0.0.10",
|
|
209
210
|
"webpack": "^5.9.0",
|
package/src/index.js
CHANGED
|
@@ -18,7 +18,6 @@ export { default as GlNav } from './components/base/nav/nav.vue';
|
|
|
18
18
|
export { default as GlNavItem } from './components/base/nav/nav_item.vue';
|
|
19
19
|
export { default as GlFormCheckboxTree } from './components/base/form/form_checkbox_tree/form_checkbox_tree.vue';
|
|
20
20
|
export { default as GlMarkdown } from './components/base/markdown/markdown.vue';
|
|
21
|
-
export { default as GlNavbar } from './components/base/navbar/navbar.vue';
|
|
22
21
|
export { default as GlIntersectionObserver } from './components/utilities/intersection_observer/intersection_observer.vue';
|
|
23
22
|
export { default as GlLink, default as GlDeprecatedLink } from './components/base/link/link.vue';
|
|
24
23
|
export { default as GlIcon } from './components/base/icon/icon.vue';
|
|
@@ -16,7 +16,6 @@ $bv-enable-popover-variants: false;
|
|
|
16
16
|
@import '../vendor/bootstrap-vue/src/components/input-group/index.scss';
|
|
17
17
|
@import '../vendor/bootstrap-vue/src/components/modal/index.scss';
|
|
18
18
|
@import '../vendor/bootstrap-vue/src/components/nav/index.scss';
|
|
19
|
-
@import '../vendor/bootstrap-vue/src/components/navbar/index.scss';
|
|
20
19
|
@import '../vendor/bootstrap-vue/src/components/popover/index.scss';
|
|
21
20
|
@import '../vendor/bootstrap-vue/src/components/table/index.scss';
|
|
22
21
|
@import '../vendor/bootstrap-vue/src/components/toast/index.scss';
|
package/src/scss/components.scss
CHANGED
|
@@ -53,7 +53,6 @@
|
|
|
53
53
|
@import '../components/base/markdown/markdown';
|
|
54
54
|
@import '../components/base/modal/modal';
|
|
55
55
|
@import '../components/base/nav/nav';
|
|
56
|
-
@import '../components/base/navbar/navbar';
|
|
57
56
|
@import '../components/base/button/button';
|
|
58
57
|
@import '../components/base/pagination/pagination';
|
|
59
58
|
@import '../components/base/path/path';
|
|
@@ -210,7 +210,7 @@
|
|
|
210
210
|
"default": {
|
|
211
211
|
"$value": {
|
|
212
212
|
"default": "{color.blue.500}",
|
|
213
|
-
"dark": "{color.blue.
|
|
213
|
+
"dark": "{color.blue.200}"
|
|
214
214
|
},
|
|
215
215
|
"$type": "color",
|
|
216
216
|
"$description": "Used for the foreground of a confirm (positive) action in the default state."
|
|
@@ -218,7 +218,7 @@
|
|
|
218
218
|
"hover": {
|
|
219
219
|
"$value": {
|
|
220
220
|
"default": "{color.blue.700}",
|
|
221
|
-
"dark": "{color.blue.
|
|
221
|
+
"dark": "{color.blue.100}"
|
|
222
222
|
},
|
|
223
223
|
"$type": "color",
|
|
224
224
|
"$description": "Used for the foreground of a confirm (positive) action in the hover state."
|
|
@@ -231,7 +231,7 @@
|
|
|
231
231
|
"active": {
|
|
232
232
|
"$value": {
|
|
233
233
|
"default": "{color.blue.900}",
|
|
234
|
-
"dark": "{color.blue.
|
|
234
|
+
"dark": "{color.blue.100}"
|
|
235
235
|
},
|
|
236
236
|
"$type": "color",
|
|
237
237
|
"$description": "Used for the foreground of a confirm (positive) action in the active state."
|
|
@@ -302,7 +302,7 @@
|
|
|
302
302
|
"default": {
|
|
303
303
|
"$value": {
|
|
304
304
|
"default": "{color.red.500}",
|
|
305
|
-
"dark": "{color.red.
|
|
305
|
+
"dark": "{color.red.200}"
|
|
306
306
|
},
|
|
307
307
|
"$type": "color",
|
|
308
308
|
"$description": "Used for the foreground of a danger (destructive) action in the default state."
|
|
@@ -310,7 +310,7 @@
|
|
|
310
310
|
"hover": {
|
|
311
311
|
"$value": {
|
|
312
312
|
"default": "{color.red.700}",
|
|
313
|
-
"dark": "{color.red.
|
|
313
|
+
"dark": "{color.red.100}"
|
|
314
314
|
},
|
|
315
315
|
"$type": "color",
|
|
316
316
|
"$description": "Used for the foreground of a danger (destructive) action in the hover state."
|
|
@@ -323,7 +323,7 @@
|
|
|
323
323
|
"active": {
|
|
324
324
|
"$value": {
|
|
325
325
|
"default": "{color.red.900}",
|
|
326
|
-
"dark": "{color.red.
|
|
326
|
+
"dark": "{color.red.100}"
|
|
327
327
|
},
|
|
328
328
|
"$type": "color",
|
|
329
329
|
"$description": "Used for the foreground of a danger (destructive) action in the active state."
|
|
@@ -395,7 +395,7 @@
|
|
|
395
395
|
"default": {
|
|
396
396
|
"$value": {
|
|
397
397
|
"default": "{color.blue.500}",
|
|
398
|
-
"dark": "{color.blue.
|
|
398
|
+
"dark": "{color.blue.300}"
|
|
399
399
|
},
|
|
400
400
|
"$type": "color",
|
|
401
401
|
"$description": "Used for the background of a strong confirm action in the default state."
|
|
@@ -403,7 +403,7 @@
|
|
|
403
403
|
"hover": {
|
|
404
404
|
"$value": {
|
|
405
405
|
"default": "{color.blue.600}",
|
|
406
|
-
"dark": "{color.blue.
|
|
406
|
+
"dark": "{color.blue.200}"
|
|
407
407
|
},
|
|
408
408
|
"$type": "color",
|
|
409
409
|
"$description": "Used for the background of a strong confirm action in the hover state."
|
|
@@ -416,7 +416,7 @@
|
|
|
416
416
|
"active": {
|
|
417
417
|
"$value": {
|
|
418
418
|
"default": "{color.blue.700}",
|
|
419
|
-
"dark": "{color.blue.
|
|
419
|
+
"dark": "{color.blue.400}"
|
|
420
420
|
},
|
|
421
421
|
"$type": "color",
|
|
422
422
|
"$description": "Used for the background of a strong confirm action in the active state."
|
|
@@ -520,17 +520,26 @@
|
|
|
520
520
|
"$description": "Used for the foreground of a strong neutral action in the default state."
|
|
521
521
|
},
|
|
522
522
|
"hover": {
|
|
523
|
-
"$value":
|
|
523
|
+
"$value": {
|
|
524
|
+
"default": "{action.strong.neutral.foreground.color.default}",
|
|
525
|
+
"dark": "{color.neutral.0}"
|
|
526
|
+
},
|
|
524
527
|
"$type": "color",
|
|
525
528
|
"$description": "Used for the foreground of a strong neutral action in the hover state."
|
|
526
529
|
},
|
|
527
530
|
"focus": {
|
|
528
|
-
"$value":
|
|
531
|
+
"$value": {
|
|
532
|
+
"default": "{action.strong.neutral.foreground.color.hover}",
|
|
533
|
+
"dark": "{color.neutral.0}"
|
|
534
|
+
},
|
|
529
535
|
"$type": "color",
|
|
530
536
|
"$description": "Used for the foreground of a strong neutral action in the focus state."
|
|
531
537
|
},
|
|
532
538
|
"active": {
|
|
533
|
-
"$value":
|
|
539
|
+
"$value": {
|
|
540
|
+
"default": "{action.strong.neutral.foreground.color.focus}",
|
|
541
|
+
"dark": "{color.neutral.0}"
|
|
542
|
+
},
|
|
534
543
|
"$type": "color",
|
|
535
544
|
"$description": "Used for the foreground of a strong neutral action in the active state."
|
|
536
545
|
}
|
|
@@ -579,6 +579,7 @@
|
|
|
579
579
|
--gl-button-confirm-primary-border-color-active: var(--gl-color-blue-900); /* Used for the border of a confirm (positive) primary button in the active state. */
|
|
580
580
|
--gl-button-confirm-primary-border-color-hover: var(--gl-color-blue-800); /* Used for the border of a confirm (positive) primary button in the hover state. */
|
|
581
581
|
--gl-button-confirm-primary-border-color-default: var(--gl-color-blue-600); /* Used for the border of a confirm (positive) primary button in the default state. */
|
|
582
|
+
--gl-button-confirm-primary-foreground-color-default: var(--gl-color-neutral-0); /* Used for the foreground of a confirm (positive) primary button in the default state. */
|
|
582
583
|
--gl-button-default-tertiary-background-color-active: var(--gl-action-neutral-background-color-active); /* Used for the background of a default borderless, tertiary button in the active state. */
|
|
583
584
|
--gl-button-default-tertiary-background-color-hover: var(--gl-action-neutral-background-color-hover); /* Used for the background of a default borderless, tertiary button in the hover state. */
|
|
584
585
|
--gl-button-default-tertiary-background-color-default: var(--gl-action-neutral-background-color-default); /* Used for the background of a default borderless, tertiary button in the default state. */
|
|
@@ -835,7 +836,6 @@
|
|
|
835
836
|
--gl-button-confirm-primary-background-color-active: var(--gl-action-strong-confirm-background-color-active); /* Used for the background of a confirm (positive) primary button in the active state. */
|
|
836
837
|
--gl-button-confirm-primary-background-color-hover: var(--gl-action-strong-confirm-background-color-hover); /* Used for the background of a confirm (positive) primary button in the hover state. */
|
|
837
838
|
--gl-button-confirm-primary-background-color-default: var(--gl-action-strong-confirm-background-color-default); /* Used for the background of a confirm (positive) primary button in the default state. */
|
|
838
|
-
--gl-button-confirm-primary-foreground-color-default: var(--gl-action-strong-confirm-foreground-color-default); /* Used for the foreground of a confirm (positive) primary button in the default state. */
|
|
839
839
|
--gl-button-default-tertiary-border-color-default: var(--gl-action-neutral-border-color-default); /* Used for the border of a default borderless, tertiary button in the default state. */
|
|
840
840
|
--gl-button-default-tertiary-background-color-focus: var(--gl-action-neutral-background-color-focus); /* Used for the background of a default borderless, tertiary button in the focus state. */
|
|
841
841
|
--gl-button-default-tertiary-foreground-color-default: var(--gl-action-neutral-foreground-color-default); /* Used for the foreground of a default borderless, tertiary button in the default state. */
|