@gitlab/ui 97.3.0 → 98.0.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.
Files changed (53) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/index.js +0 -1
  3. package/dist/vendor/bootstrap-vue/src/components/collapse/collapse.js +3 -36
  4. package/dist/vendor/bootstrap-vue/src/components/tabs/tabs.js +1 -1
  5. package/dist/vendor/bootstrap-vue/src/components/transition/bv-transition.js +12 -2
  6. package/dist/vendor/bootstrap-vue/src/constants/components.js +1 -3
  7. package/dist/vendor/bootstrap-vue/src/constants/env.js +1 -2
  8. package/dist/vendor/bootstrap-vue/src/index.js +0 -2
  9. package/dist/vendor/bootstrap-vue/src/mixins/dropdown.js +12 -39
  10. package/package.json +2 -1
  11. package/src/index.js +0 -1
  12. package/src/scss/bootstrap_vue.scss +0 -1
  13. package/src/scss/components.scss +0 -1
  14. package/src/vendor/bootstrap-vue/package.json +3 -20
  15. package/src/vendor/bootstrap-vue/src/components/collapse/MODIFICATIONS.md +14 -0
  16. package/src/vendor/bootstrap-vue/src/components/collapse/collapse.js +3 -37
  17. package/src/vendor/bootstrap-vue/src/components/collapse/collapse.spec.js +0 -132
  18. package/src/vendor/bootstrap-vue/src/components/collapse/package.json +0 -4
  19. package/src/vendor/bootstrap-vue/src/components/dropdown/README.md +1 -1
  20. package/src/vendor/bootstrap-vue/src/components/form-input/form-input.spec.js +3 -0
  21. package/src/vendor/bootstrap-vue/src/components/index.d.ts +0 -1
  22. package/src/vendor/bootstrap-vue/src/components/index.scss +0 -1
  23. package/src/vendor/bootstrap-vue/src/components/modal/MODIFICATIONS.md +8 -5
  24. package/src/vendor/bootstrap-vue/src/components/nav/package.json +1 -1
  25. package/src/vendor/bootstrap-vue/src/components/popover/popover.spec.js +0 -1
  26. package/src/vendor/bootstrap-vue/src/components/table/table-filtering.spec.js +1 -1
  27. package/src/vendor/bootstrap-vue/src/components/tabs/tabs.js +1 -1
  28. package/src/vendor/bootstrap-vue/src/components/toast/toast.spec.js +6 -18
  29. package/src/vendor/bootstrap-vue/src/components/tooltip/tooltip.spec.js +67 -356
  30. package/src/vendor/bootstrap-vue/src/components/transition/bv-transition.js +15 -2
  31. package/src/vendor/bootstrap-vue/src/constants/components.js +0 -2
  32. package/src/vendor/bootstrap-vue/src/constants/env.js +0 -3
  33. package/src/vendor/bootstrap-vue/src/directives/tooltip/tooltip.spec.js +46 -79
  34. package/src/vendor/bootstrap-vue/src/index.js +0 -4
  35. package/src/vendor/bootstrap-vue/src/mixins/dropdown.js +12 -36
  36. package/src/vendor/bootstrap-vue/src/utils/config.spec.js +20 -2
  37. package/dist/components/base/navbar/navbar.js +0 -48
  38. package/dist/vendor/bootstrap-vue/src/components/navbar/index.js +0 -2
  39. package/dist/vendor/bootstrap-vue/src/components/navbar/navbar-brand.js +0 -40
  40. package/dist/vendor/bootstrap-vue/src/components/navbar/navbar.js +0 -72
  41. package/src/components/base/navbar/navbar.md +0 -4
  42. package/src/components/base/navbar/navbar.scss +0 -0
  43. package/src/components/base/navbar/navbar.vue +0 -17
  44. package/src/vendor/bootstrap-vue/src/components/navbar/README.md +0 -332
  45. package/src/vendor/bootstrap-vue/src/components/navbar/_navbar.scss +0 -1
  46. package/src/vendor/bootstrap-vue/src/components/navbar/index.d.ts +0 -10
  47. package/src/vendor/bootstrap-vue/src/components/navbar/index.js +0 -4
  48. package/src/vendor/bootstrap-vue/src/components/navbar/index.scss +0 -1
  49. package/src/vendor/bootstrap-vue/src/components/navbar/navbar-brand.js +0 -42
  50. package/src/vendor/bootstrap-vue/src/components/navbar/navbar-brand.spec.js +0 -50
  51. package/src/vendor/bootstrap-vue/src/components/navbar/navbar.js +0 -78
  52. package/src/vendor/bootstrap-vue/src/components/navbar/navbar.spec.js +0 -130
  53. package/src/vendor/bootstrap-vue/src/components/navbar/package.json +0 -54
package/CHANGELOG.md CHANGED
@@ -1,3 +1,16 @@
1
+ # [98.0.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v97.3.0...v98.0.0) (2024-10-18)
2
+
3
+
4
+ ### Features
5
+
6
+ * Remove GlNavbar, BNavbar and traces of the component ([9094341](https://gitlab.com/gitlab-org/gitlab-ui/commit/909434196bc6be755280bc2267854e6df719930f))
7
+
8
+
9
+ ### BREAKING CHANGES
10
+
11
+ * * Remove component GlNavbar
12
+ * Remove prop 'isNav' from GlCollapse
13
+
1
14
  # [97.3.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v97.2.1...v97.3.0) (2024-10-18)
2
15
 
3
16
 
package/dist/index.js CHANGED
@@ -11,7 +11,6 @@ export { default as GlNav } from './components/base/nav/nav';
11
11
  export { default as GlNavItem } from './components/base/nav/nav_item';
12
12
  export { default as GlFormCheckboxTree } from './components/base/form/form_checkbox_tree/form_checkbox_tree';
13
13
  export { default as GlMarkdown } from './components/base/markdown/markdown';
14
- export { default as GlNavbar } from './components/base/navbar/navbar';
15
14
  export { default as GlIntersectionObserver } from './components/utilities/intersection_observer/intersection_observer';
16
15
  export { default as GlDeprecatedLink, default as GlLink } from './components/base/link/link';
17
16
  export { default as GlIcon } from './components/base/icon/icon';
@@ -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 { IS_BROWSER } from '../../constants/env';
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, eventOnOff } from '../../utils/events';
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 (!this.isNav || !el || getCS(this.$el).display !== 'block') {
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', 'isNavBar', 'cardHeader']);
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
- // We always need `css` true
71
- css: true
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, NAME_NAVBAR, NAME_NAVBAR_BRAND, 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 };
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, HAS_TOUCH_SUPPORT, HAS_WINDOW_SUPPORT, IS_BROWSER, IS_IE, IS_JSDOM, NAVIGATOR, USER_AGENT, WINDOW };
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' && !this.inNavbar ? 'position-static' : '';
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
- // Only instantiate Popper.js when dropdown is not in `<b-navbar>`
192
- if (!this.inNavbar) {
193
- if (typeof Popper === 'undefined') {
194
- /* istanbul ignore next */
195
- warn('Popper.js not found. Falling back to CSS positioning', NAME_DROPDOWN);
196
- } else {
197
- // For dropup with alignment we use the parent element as popper container
198
- let el = this.dropup && this.right || this.split ? this.$el : this.$refs.toggle;
199
- // Make sure we have a reference to an element, not a component!
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.clearHideTimeout();
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": "97.3.0",
3
+ "version": "98.0.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';
@@ -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';
@@ -59,10 +59,9 @@
59
59
  "audit": "improved-yarn-audit --ignore-dev-deps --min-severity moderate -e 1488",
60
60
  "lint": "eslint --ext .js,.md,.vue ./",
61
61
  "prettify": "prettier --write '**/*.{js,json,md,scss,ts,vue}'",
62
- "test": "yarn run test:meta && yarn run test:lint && yarn run test:unit",
62
+ "test": "yarn run test:meta && yarn run test:lint",
63
63
  "test:lint": "yarn run lint",
64
- "test:meta": "scripts/check-meta.sh",
65
- "test:unit": "jest"
64
+ "test:meta": "scripts/check-meta.sh"
66
65
  },
67
66
  "dependencies": {
68
67
  "bootstrap": "^4.6.1",
@@ -71,15 +70,6 @@
71
70
  "vue-functional-data-merge": "^3.1.0"
72
71
  },
73
72
  "devDependencies": {
74
- "@babel/core": "^7.16.5",
75
- "@babel/preset-env": "^7.14.2",
76
- "@testing-library/jest-dom": "^5.12.0",
77
- "@vue/compat": "^3.2.40",
78
- "@vue/compiler-dom": "^3.2.40",
79
- "@vue/test-utils": "^1.3.0",
80
- "@vue/test-utils-vue3": "npm:@vue/test-utils@2.2.0",
81
- "babel-jest": "^26.6.3",
82
- "core-js": "^3.12.1",
83
73
  "eslint": "^7.26.0",
84
74
  "eslint-config-prettier": "^8.3.0",
85
75
  "eslint-config-standard": "^16.0.2",
@@ -92,14 +82,8 @@
92
82
  "eslint-plugin-promise": "^5.1.0",
93
83
  "eslint-plugin-vue": "^7.9.0",
94
84
  "improved-yarn-audit": "^3.0.0",
95
- "jest": "^26.6.3",
96
85
  "lodash": "^4.17.21",
97
- "prettier": "1.14.3",
98
- "vue": "^2.6.12",
99
- "vue-router": "^3.5.1",
100
- "vue-server-renderer": "^2.6.12",
101
- "vue-template-compiler": "^2.6.12",
102
- "vue-test-utils-compat": "0.0.6"
86
+ "prettier": "1.14.3"
103
87
  },
104
88
  "keywords": [
105
89
  "Bootstrap",
@@ -138,7 +122,6 @@
138
122
  "List",
139
123
  "Modal",
140
124
  "Nav",
141
- "Navbar",
142
125
  "Option",
143
126
  "Overlay",
144
127
  "Pagination",
@@ -0,0 +1,14 @@
1
+ # Modifications to Vendored Code
2
+
3
+ **Library**: BootstrapVue
4
+ **Version**: 2.23.1 **Link:** https://bootstrap-vue.org **Source:**
5
+ https://github.com/bootstrap-vue/bootstrap-vue **Copyright:** (c) 2016-2024 BootstrapVue
6
+ **License:** (c)
7
+ [2016-2024 BootstrapVue](https://github.com/bootstrap-vue/bootstrap-vue/blob/master/LICENSE)
8
+
9
+ This file documents modifications made to the original BootstrapVue component files.
10
+
11
+ ## Removed props
12
+
13
+ The property `isNav` and code executed based on this property has been removed, as we removed the
14
+ Navbar logic.
@@ -1,18 +1,16 @@
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 { IS_BROWSER } from '../../constants/env'
5
4
  import {
6
5
  EVENT_NAME_HIDDEN,
7
6
  EVENT_NAME_HIDE,
8
7
  EVENT_NAME_SHOW,
9
- EVENT_NAME_SHOWN,
10
- EVENT_OPTIONS_NO_CAPTURE
8
+ EVENT_NAME_SHOWN
11
9
  } from '../../constants/events'
12
10
  import { PROP_TYPE_BOOLEAN, PROP_TYPE_STRING } from '../../constants/props'
13
11
  import { SLOT_NAME_DEFAULT } from '../../constants/slots'
14
12
  import { addClass, hasClass, removeClass, closest, matches, getCS } from '../../utils/dom'
15
- import { getRootActionEventName, getRootEventName, eventOnOff } from '../../utils/events'
13
+ import { getRootActionEventName, getRootEventName } from '../../utils/events'
16
14
  import { makeModelMixin } from '../../utils/model'
17
15
  import { sortKeys } from '../../utils/object'
18
16
  import { makeProp, makePropsConfigurable } from '../../utils/props'
@@ -46,7 +44,6 @@ export const props = makePropsConfigurable(
46
44
  // If `true` (and `visible` is `true` on mount), animate initially visible
47
45
  accordion: makeProp(PROP_TYPE_STRING),
48
46
  appear: makeProp(PROP_TYPE_BOOLEAN, false),
49
- isNav: makeProp(PROP_TYPE_BOOLEAN, false),
50
47
  tag: makeProp(PROP_TYPE_STRING, 'div')
51
48
  }),
52
49
  NAME_COLLAPSE
@@ -70,7 +67,6 @@ export const BCollapse = /*#__PURE__*/ extend({
70
67
  const { transitioning } = this
71
68
 
72
69
  return {
73
- 'navbar-collapse': this.isNav,
74
70
  collapse: !transitioning,
75
71
  show: this.show && !transitioning
76
72
  }
@@ -105,11 +101,6 @@ export const BCollapse = /*#__PURE__*/ extend({
105
101
  this.listenOnRoot(ROOT_ACTION_EVENT_NAME_TOGGLE, this.handleToggleEvent)
106
102
  // Listen to other collapses for accordion events
107
103
  this.listenOnRoot(ROOT_EVENT_NAME_ACCORDION, this.handleAccordionEvent)
108
- if (this.isNav) {
109
- // Set up handlers
110
- this.setWindowEvents(true)
111
- this.handleResize()
112
- }
113
104
  this.$nextTick(() => {
114
105
  this.emitState()
115
106
  })
@@ -126,31 +117,11 @@ export const BCollapse = /*#__PURE__*/ extend({
126
117
  // It is emitted regardless if the visible state changes
127
118
  this.emitSync()
128
119
  },
129
- /* istanbul ignore next */
130
- deactivated() {
131
- if (this.isNav) {
132
- this.setWindowEvents(false)
133
- }
134
- },
135
- /* istanbul ignore next */
136
- activated() {
137
- if (this.isNav) {
138
- this.setWindowEvents(true)
139
- }
140
- this.emitSync()
141
- },
142
120
  beforeDestroy() {
143
121
  // Trigger state emit if needed
144
122
  this.show = false
145
- if (this.isNav && IS_BROWSER) {
146
- this.setWindowEvents(false)
147
- }
148
123
  },
149
124
  methods: {
150
- setWindowEvents(on) {
151
- eventOnOff(on, window, 'resize', this.handleResize, EVENT_OPTIONS_NO_CAPTURE)
152
- eventOnOff(on, window, 'orientationchange', this.handleResize, EVENT_OPTIONS_NO_CAPTURE)
153
- },
154
125
  toggle() {
155
126
  this.show = !this.show
156
127
  },
@@ -206,9 +177,8 @@ export const BCollapse = /*#__PURE__*/ extend({
206
177
  },
207
178
  clickHandler(event) {
208
179
  const { target: el } = event
209
- // If we are in a nav/navbar, close the collapse when non-disabled link clicked
210
180
  /* istanbul ignore next: can't test `getComputedStyle()` in JSDOM */
211
- if (!this.isNav || !el || getCS(this.$el).display !== 'block') {
181
+ if (!el || getCS(this.$el).display !== 'block') {
212
182
  return
213
183
  }
214
184
  // Only close the collapse if it is not forced to be `display: block !important`
@@ -235,10 +205,6 @@ export const BCollapse = /*#__PURE__*/ extend({
235
205
  if ((isThis && !show) || (!isThis && show)) {
236
206
  this.toggle()
237
207
  }
238
- },
239
- handleResize() {
240
- // Handler for orientation/resize to set collapsed state in nav/navbar
241
- this.show = getCS(this.$el).display === 'block'
242
208
  }
243
209
  },
244
210
  render(h) {