@gitlab/ui 78.19.0 → 79.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 +30 -0
- package/dist/components/base/new_dropdowns/base_dropdown/base_dropdown.js +4 -3
- package/dist/components/base/new_dropdowns/constants.js +2 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/tokens/css/tokens.css +1 -1
- package/dist/tokens/css/tokens.dark.css +1 -1
- package/dist/tokens/js/tokens.dark.js +1 -1
- package/dist/tokens/js/tokens.js +1 -1
- package/dist/tokens/scss/_tokens.dark.scss +1 -1
- package/dist/tokens/scss/_tokens.scss +1 -1
- package/dist/utils/story_decorators/container.js +10 -7
- package/package.json +1 -1
- package/src/components/base/filtered_search/filtered_search_suggestion.scss +1 -0
- package/src/components/base/filtered_search/filtered_search_suggestion_list.scss +18 -0
- package/src/components/base/form/form_group/form_group.stories.js +28 -19
- package/src/components/base/new_dropdowns/base_dropdown/base_dropdown.spec.js +52 -12
- package/src/components/base/new_dropdowns/base_dropdown/base_dropdown.vue +4 -1
- package/src/components/base/new_dropdowns/constants.js +1 -0
- package/src/components/base/new_dropdowns/disclosure/disclosure_dropdown.stories.js +28 -0
- package/src/utils/story_decorators/container.js +7 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,33 @@
|
|
|
1
|
+
# [79.1.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v79.0.0...v79.1.0) (2024-04-24)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **GlFilteredSearch:** Improve dropdown styles ([ac13b05](https://gitlab.com/gitlab-org/gitlab-ui/commit/ac13b05b092e78e4c61bfd601d7b595c2bf8a04d))
|
|
7
|
+
* **GlFilteredSearch:** Improve dropdown styles ([47ae89a](https://gitlab.com/gitlab-org/gitlab-ui/commit/47ae89a019cd33ae4582d61c08c6b48a677cc4f1))
|
|
8
|
+
|
|
9
|
+
# [79.0.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v78.19.0...v79.0.0) (2024-04-22)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
* **BaseDropdown:** Use a "main" element boundary when available ([ee0cd82](https://gitlab.com/gitlab-org/gitlab-ui/commit/ee0cd82b8b2ae6986052877250884ce9cd43df21))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### BREAKING CHANGES
|
|
18
|
+
|
|
19
|
+
* **BaseDropdown:** This change slightly alters the default positioning
|
|
20
|
+
of GlDisclosureDropdown and GlListbox.
|
|
21
|
+
|
|
22
|
+
If the dropdown is placed inside a <main> element: The disclosure
|
|
23
|
+
will use main as a boundary to not overflow it. This change aims
|
|
24
|
+
to smartly reduce the need to use custom "placement" ('right'
|
|
25
|
+
and 'bottom-end') options, especially when the dropdown is placed
|
|
26
|
+
on the right side, such as in contextual menus.
|
|
27
|
+
|
|
28
|
+
If the dropdown is not placed in a <main> element, behavior does
|
|
29
|
+
change.
|
|
30
|
+
|
|
1
31
|
# [78.19.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v78.18.0...v78.19.0) (2024-04-22)
|
|
2
32
|
|
|
3
33
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import uniqueId from 'lodash/uniqueId';
|
|
2
|
-
import { offset, autoPlacement, size, autoUpdate, computePosition } from '@floating-ui/dom';
|
|
2
|
+
import { offset, autoPlacement, shift, size, autoUpdate, computePosition } from '@floating-ui/dom';
|
|
3
3
|
import { buttonCategoryOptions, dropdownVariantOptions, buttonSizeOptions, dropdownPlacements, dropdownAllowedAutoPlacements } from '../../../../utils/constants';
|
|
4
|
-
import { POSITION_ABSOLUTE, POSITION_FIXED, GL_DROPDOWN_CONTENTS_CLASS, GL_DROPDOWN_BEFORE_CLOSE, GL_DROPDOWN_SHOWN, GL_DROPDOWN_HIDDEN, ENTER, SPACE, ARROW_DOWN, GL_DROPDOWN_FOCUS_CONTENT } from '../constants';
|
|
4
|
+
import { POSITION_ABSOLUTE, POSITION_FIXED, GL_DROPDOWN_BOUNDARY_SELECTOR, GL_DROPDOWN_CONTENTS_CLASS, GL_DROPDOWN_BEFORE_CLOSE, GL_DROPDOWN_SHOWN, GL_DROPDOWN_HIDDEN, ENTER, SPACE, ARROW_DOWN, GL_DROPDOWN_FOCUS_CONTENT } from '../constants';
|
|
5
5
|
import { logWarning, isElementFocusable, isElementTabbable } from '../../../../utils/utils';
|
|
6
6
|
import GlButton from '../../button/button';
|
|
7
7
|
import GlIcon from '../../icon/icon';
|
|
@@ -252,8 +252,9 @@ var script = {
|
|
|
252
252
|
strategy: this.positioningStrategy,
|
|
253
253
|
middleware: [offset(this.offset), autoPlacement({
|
|
254
254
|
alignment,
|
|
255
|
+
boundary: this.$el.closest(GL_DROPDOWN_BOUNDARY_SELECTOR) || 'clippingAncestors',
|
|
255
256
|
allowedPlacements: dropdownAllowedAutoPlacements[this.placement]
|
|
256
|
-
}), size({
|
|
257
|
+
}), shift(), size({
|
|
257
258
|
apply: _ref => {
|
|
258
259
|
var _this$nonScrollableCo;
|
|
259
260
|
let {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// base dropdown events
|
|
2
|
+
const GL_DROPDOWN_BOUNDARY_SELECTOR = 'main';
|
|
2
3
|
const GL_DROPDOWN_SHOWN = 'shown';
|
|
3
4
|
const GL_DROPDOWN_HIDDEN = 'hidden';
|
|
4
5
|
const GL_DROPDOWN_BEFORE_CLOSE = 'beforeClose';
|
|
@@ -18,4 +19,4 @@ const POSITION_ABSOLUTE = 'absolute';
|
|
|
18
19
|
const POSITION_FIXED = 'fixed';
|
|
19
20
|
const GL_DROPDOWN_CONTENTS_CLASS = 'gl-new-dropdown-contents';
|
|
20
21
|
|
|
21
|
-
export { ARROW_DOWN, ARROW_UP, END, ENTER, GL_DROPDOWN_BEFORE_CLOSE, GL_DROPDOWN_CONTENTS_CLASS, GL_DROPDOWN_FOCUS_CONTENT, GL_DROPDOWN_HIDDEN, GL_DROPDOWN_SHOWN, HOME, POSITION_ABSOLUTE, POSITION_FIXED, SPACE };
|
|
22
|
+
export { ARROW_DOWN, ARROW_UP, END, ENTER, GL_DROPDOWN_BEFORE_CLOSE, GL_DROPDOWN_BOUNDARY_SELECTOR, GL_DROPDOWN_CONTENTS_CLASS, GL_DROPDOWN_FOCUS_CONTENT, GL_DROPDOWN_HIDDEN, GL_DROPDOWN_SHOWN, HOME, POSITION_ABSOLUTE, POSITION_FIXED, SPACE };
|