@gitlab/ui 115.6.1 → 115.7.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/new_dropdowns/disclosure/disclosure_dropdown_item.js +1 -1
- package/dist/components/base/new_dropdowns/disclosure/mock_data.js +8 -0
- package/package.json +3 -3
- package/src/components/base/new_dropdowns/disclosure/disclosure_dropdown.md +5 -3
- package/src/components/base/new_dropdowns/disclosure/disclosure_dropdown_item.vue +1 -1
- package/src/components/base/new_dropdowns/disclosure/mock_data.js +4 -0
|
@@ -35,7 +35,7 @@ var script = {
|
|
|
35
35
|
computed: {
|
|
36
36
|
isLink() {
|
|
37
37
|
var _this$item, _this$item2;
|
|
38
|
-
return typeof ((_this$item = this.item) === null || _this$item === void 0 ? void 0 : _this$item.href) === 'string' || typeof ((_this$item2 = this.item) === null || _this$item2 === void 0 ? void 0 : _this$item2.to)
|
|
38
|
+
return typeof ((_this$item = this.item) === null || _this$item === void 0 ? void 0 : _this$item.href) === 'string' || typeof ((_this$item2 = this.item) === null || _this$item2 === void 0 ? void 0 : _this$item2.to) !== 'undefined';
|
|
39
39
|
},
|
|
40
40
|
isCustomContent() {
|
|
41
41
|
return Boolean(this.$scopedSlots.default);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitlab/ui",
|
|
3
|
-
"version": "115.
|
|
3
|
+
"version": "115.7.0",
|
|
4
4
|
"description": "GitLab UI Components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
"@babel/preset-react": "^7.27.1",
|
|
103
103
|
"@cypress/grep": "^4.1.0",
|
|
104
104
|
"@gitlab/fonts": "^1.3.0",
|
|
105
|
-
"@gitlab/svgs": "3.
|
|
105
|
+
"@gitlab/svgs": "3.141.0",
|
|
106
106
|
"@jest/test-sequencer": "30.0.4",
|
|
107
107
|
"@rollup/plugin-commonjs": "^28.0.6",
|
|
108
108
|
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
@@ -134,7 +134,7 @@
|
|
|
134
134
|
"autoprefixer": "10.4.21",
|
|
135
135
|
"axe-playwright": "^2.1.0",
|
|
136
136
|
"babel-loader": "^9.2.1",
|
|
137
|
-
"cypress": "14.5.
|
|
137
|
+
"cypress": "14.5.2",
|
|
138
138
|
"cypress-real-events": "^1.14.0",
|
|
139
139
|
"dompurify": "^3.1.2",
|
|
140
140
|
"emoji-regex": "^10.4.0",
|
|
@@ -67,7 +67,7 @@ It's possible to close the disclosure dropdown programmatically by calling the `
|
|
|
67
67
|
`close` methods on the disclosure dropdown via a template ref. For example:
|
|
68
68
|
|
|
69
69
|
```js
|
|
70
|
-
this.$refs.disclosureDropdown.closeAndFocus()
|
|
70
|
+
this.$refs.disclosureDropdown.closeAndFocus();
|
|
71
71
|
```
|
|
72
72
|
|
|
73
73
|
The `closeAndFocus` method is preferred in most cases, especially when triggering it from some action
|
|
@@ -79,7 +79,8 @@ some other element. For example, closing the disclosure dropdown to focus a newl
|
|
|
79
79
|
## Setting disclosure dropdown items
|
|
80
80
|
|
|
81
81
|
Use the `items` prop to provide actions/links to the disclosure dropdown. Each
|
|
82
|
-
item can be either an item or a group. For `Item`s, provide an `href` or `to` string
|
|
82
|
+
item can be either an item or a group. For `Item`s, provide an `href` or `to` string or
|
|
83
|
+
[`to` location descriptor object](https://v3.router.vuejs.org/api/#to) to
|
|
83
84
|
make them render as links. Otherwise, they will be buttons. Provide an `action`
|
|
84
85
|
function to items to be called when they are pressed, or, listen for the
|
|
85
86
|
`action` event on the top-level component. Both will receive the given item as
|
|
@@ -96,7 +97,8 @@ type Item = {
|
|
|
96
97
|
// href link
|
|
97
98
|
href?: string;
|
|
98
99
|
// or, a Vue router link with `to`
|
|
99
|
-
|
|
100
|
+
// See https://github.com/vuejs/vue-router/blob/v3.6.5/types/router.d.ts#L400-L408 for Location definition
|
|
101
|
+
to?: string | Location;
|
|
100
102
|
// Item action
|
|
101
103
|
action?: (item: Item) => void;
|
|
102
104
|
// Set of extra attributes applied directly to the element
|
|
@@ -33,7 +33,7 @@ export default {
|
|
|
33
33
|
},
|
|
34
34
|
computed: {
|
|
35
35
|
isLink() {
|
|
36
|
-
return typeof this.item?.href === 'string' || typeof this.item?.to
|
|
36
|
+
return typeof this.item?.href === 'string' || typeof this.item?.to !== 'undefined';
|
|
37
37
|
},
|
|
38
38
|
isCustomContent() {
|
|
39
39
|
return Boolean(this.$scopedSlots.default);
|