@gitlab/ui 137.2.6 → 137.3.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/alert/alert.js +1 -1
- package/dist/components/base/filtered_search/filtered_search_token_segment.js +2 -2
- package/dist/components/base/new_dropdowns/base_dropdown/base_dropdown.js +3 -3
- package/dist/components/dashboards/dashboard_layout/dashboard_layout.js +9 -1
- package/package.json +2 -2
- package/src/components/base/alert/alert.vue +1 -1
- package/src/components/base/filtered_search/filtered_search_token_segment.vue +1 -1
- package/src/components/base/new_dropdowns/base_dropdown/base_dropdown.vue +3 -3
- package/src/components/dashboards/dashboard_layout/dashboard_layout.vue +9 -0
|
@@ -12,7 +12,6 @@ var script = {
|
|
|
12
12
|
CloseButton,
|
|
13
13
|
GlButton
|
|
14
14
|
},
|
|
15
|
-
expose: ['focus'],
|
|
16
15
|
props: {
|
|
17
16
|
/**
|
|
18
17
|
* The title text to display in the alert header.
|
|
@@ -117,6 +116,7 @@ var script = {
|
|
|
117
116
|
}
|
|
118
117
|
}
|
|
119
118
|
},
|
|
119
|
+
expose: ['focus'],
|
|
120
120
|
data() {
|
|
121
121
|
return {
|
|
122
122
|
hasProgrammaticFocus: false
|
|
@@ -428,10 +428,10 @@ var script = {
|
|
|
428
428
|
});
|
|
429
429
|
},
|
|
430
430
|
handleBlur(e) {
|
|
431
|
-
var _e$relatedTarget;
|
|
431
|
+
var _e$relatedTarget, _e$relatedTarget$clas;
|
|
432
432
|
// Keep focus on input when blur event is on same element
|
|
433
433
|
// (e.g. scrollbar in filtered search suggestions list)
|
|
434
|
-
if ((_e$relatedTarget = e.relatedTarget) !== null && _e$relatedTarget !== void 0 && _e$relatedTarget.classList.contains(FILTERED_SEARCH_SUGGESTIONS_CLASS)) {
|
|
434
|
+
if ((_e$relatedTarget = e.relatedTarget) !== null && _e$relatedTarget !== void 0 && (_e$relatedTarget$clas = _e$relatedTarget.classList) !== null && _e$relatedTarget$clas !== void 0 && _e$relatedTarget$clas.contains(FILTERED_SEARCH_SUGGESTIONS_CLASS)) {
|
|
435
435
|
var _this$$refs$input;
|
|
436
436
|
(_this$$refs$input = this.$refs.input) === null || _this$$refs$input === void 0 ? void 0 : _this$$refs$input.focus();
|
|
437
437
|
return;
|
|
@@ -84,9 +84,6 @@ const BASE_DROPDOWN_CLASS = 'gl-new-dropdown';
|
|
|
84
84
|
const DROPDOWN_CONTAINER_CLASS = 'gl-new-dropdown-container';
|
|
85
85
|
var script = {
|
|
86
86
|
name: 'BaseDropdown',
|
|
87
|
-
expose: ['open', 'close', 'closeAndFocus', 'containsElement'],
|
|
88
|
-
BASE_DROPDOWN_CLASS,
|
|
89
|
-
DROPDOWN_CONTAINER_CLASS,
|
|
90
87
|
components: {
|
|
91
88
|
DropdownContainer,
|
|
92
89
|
GlButton,
|
|
@@ -331,6 +328,9 @@ var script = {
|
|
|
331
328
|
validator: strategy => [POSITION_ABSOLUTE, POSITION_FIXED].includes(strategy)
|
|
332
329
|
}
|
|
333
330
|
},
|
|
331
|
+
expose: ['open', 'close', 'closeAndFocus', 'containsElement'],
|
|
332
|
+
BASE_DROPDOWN_CLASS,
|
|
333
|
+
DROPDOWN_CONTAINER_CLASS,
|
|
334
334
|
data() {
|
|
335
335
|
return {
|
|
336
336
|
openedYet: false,
|
|
@@ -60,6 +60,14 @@ var script = {
|
|
|
60
60
|
required: false,
|
|
61
61
|
default: 1,
|
|
62
62
|
validator: value => value > 0
|
|
63
|
+
},
|
|
64
|
+
/**
|
|
65
|
+
* Additional CSS classes to apply to the `#filters` slot container.
|
|
66
|
+
*/
|
|
67
|
+
filtersClass: {
|
|
68
|
+
type: String,
|
|
69
|
+
required: false,
|
|
70
|
+
default: ''
|
|
63
71
|
}
|
|
64
72
|
},
|
|
65
73
|
computed: {
|
|
@@ -88,7 +96,7 @@ var script = {
|
|
|
88
96
|
const __vue_script__ = script;
|
|
89
97
|
|
|
90
98
|
/* template */
|
|
91
|
-
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[(_vm.dashboardHasHeader)?_c('section',{staticClass:"gl-my-4 gl-flex gl-items-center",attrs:{"data-testid":"header-container"}},[_vm._t("header",function(){return [_c('div',{staticClass:"gl-flex gl-w-full gl-flex-col"},[(_vm.dashboardHasTitle)?_c('div',{staticClass:"gl-flex gl-items-center"},[_vm._t("title",function(){return [_c('h2',{staticClass:"gl-my-0",attrs:{"data-testid":"title"}},[_vm._v(_vm._s(_vm.config.title))])]})],2):_vm._e(),_vm._v(" "),(_vm.dashboardHasDescription)?_c('div',{staticClass:"gl-mt-3 gl-flex"},[_vm._t("description",function(){return [_c('p',{staticClass:"gl-mb-0",attrs:{"data-testid":"description"}},[_vm._v("\n "+_vm._s(_vm.config.description)+"\n ")])]})],2):_vm._e()])]}),_vm._v(" "),(_vm.$scopedSlots.actions)?_c('div',{attrs:{"data-testid":"actions-container"}},[_vm._t("actions")],2):_vm._e()],2):_vm._e(),_vm._v(" "),_c('div',{staticClass:"gl-flex"},[_c('div',{staticClass:"gl-flex gl-min-w-0 gl-grow gl-flex-col"},[_vm._t("alert"),_vm._v(" "),(_vm.$scopedSlots.filters)?_c('section',{staticClass:"gl-flex gl-flex-row gl-flex-wrap gl-gap-5 gl-pb-3 gl-pt-4",attrs:{"data-testid":"filters-container"}},[_vm._t("filters")],2):_vm._e(),_vm._v(" "),(_vm.dashboardHasPanels)?_c('grid-layout',{staticClass:"-gl-mx-3",attrs:{"value":_vm.config,"is-static-grid":_vm.isStaticGrid,"cell-height":_vm.cellHeight,"min-cell-height":_vm.minCellHeight},on:{"input":_vm.emitChanges},scopedSlots:_vm._u([{key:"panel",fn:function(ref){
|
|
99
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[(_vm.dashboardHasHeader)?_c('section',{staticClass:"gl-my-4 gl-flex gl-items-center",attrs:{"data-testid":"header-container"}},[_vm._t("header",function(){return [_c('div',{staticClass:"gl-flex gl-w-full gl-flex-col"},[(_vm.dashboardHasTitle)?_c('div',{staticClass:"gl-flex gl-items-center"},[_vm._t("title",function(){return [_c('h2',{staticClass:"gl-my-0",attrs:{"data-testid":"title"}},[_vm._v(_vm._s(_vm.config.title))])]})],2):_vm._e(),_vm._v(" "),(_vm.dashboardHasDescription)?_c('div',{staticClass:"gl-mt-3 gl-flex"},[_vm._t("description",function(){return [_c('p',{staticClass:"gl-mb-0",attrs:{"data-testid":"description"}},[_vm._v("\n "+_vm._s(_vm.config.description)+"\n ")])]})],2):_vm._e()])]}),_vm._v(" "),(_vm.$scopedSlots.actions)?_c('div',{attrs:{"data-testid":"actions-container"}},[_vm._t("actions")],2):_vm._e()],2):_vm._e(),_vm._v(" "),_c('div',{staticClass:"gl-flex"},[_c('div',{staticClass:"gl-flex gl-min-w-0 gl-grow gl-flex-col"},[_vm._t("alert"),_vm._v(" "),(_vm.$scopedSlots.filters)?_c('section',{staticClass:"gl-flex gl-flex-row gl-flex-wrap gl-gap-5 gl-pb-3 gl-pt-4",class:_vm.filtersClass,attrs:{"data-testid":"filters-container"}},[_vm._t("filters")],2):_vm._e(),_vm._v(" "),(_vm.dashboardHasPanels)?_c('grid-layout',{staticClass:"-gl-mx-3",attrs:{"value":_vm.config,"is-static-grid":_vm.isStaticGrid,"cell-height":_vm.cellHeight,"min-cell-height":_vm.minCellHeight},on:{"input":_vm.emitChanges},scopedSlots:_vm._u([{key:"panel",fn:function(ref){
|
|
92
100
|
var panel = ref.panel;
|
|
93
101
|
return [_vm._t("panel",null,null,{ panel: panel })]}}],null,true)}):_vm._t("empty-state")],2)]),_vm._v(" "),_vm._t("footer")],2)};
|
|
94
102
|
var __vue_staticRenderFns__ = [];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitlab/ui",
|
|
3
|
-
"version": "137.
|
|
3
|
+
"version": "137.3.0",
|
|
4
4
|
"description": "GitLab UI Components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -175,7 +175,7 @@
|
|
|
175
175
|
"start-server-and-test": "^2.1.5",
|
|
176
176
|
"storybook": "^7.6.24",
|
|
177
177
|
"storybook-dark-mode": "4.0.2",
|
|
178
|
-
"style-dictionary": "^5.5.
|
|
178
|
+
"style-dictionary": "^5.5.5",
|
|
179
179
|
"style-loader": "^4",
|
|
180
180
|
"tailwindcss": "3.4.19",
|
|
181
181
|
"vue": "2.7.16",
|
|
@@ -16,7 +16,6 @@ export default {
|
|
|
16
16
|
CloseButton,
|
|
17
17
|
GlButton,
|
|
18
18
|
},
|
|
19
|
-
expose: ['focus'],
|
|
20
19
|
props: {
|
|
21
20
|
/**
|
|
22
21
|
* The title text to display in the alert header.
|
|
@@ -121,6 +120,7 @@ export default {
|
|
|
121
120
|
},
|
|
122
121
|
},
|
|
123
122
|
},
|
|
123
|
+
expose: ['focus'],
|
|
124
124
|
data() {
|
|
125
125
|
return {
|
|
126
126
|
hasProgrammaticFocus: false,
|
|
@@ -445,7 +445,7 @@ export default {
|
|
|
445
445
|
handleBlur(e) {
|
|
446
446
|
// Keep focus on input when blur event is on same element
|
|
447
447
|
// (e.g. scrollbar in filtered search suggestions list)
|
|
448
|
-
if (e.relatedTarget?.classList
|
|
448
|
+
if (e.relatedTarget?.classList?.contains(FILTERED_SEARCH_SUGGESTIONS_CLASS)) {
|
|
449
449
|
this.$refs.input?.focus();
|
|
450
450
|
return;
|
|
451
451
|
}
|
|
@@ -46,9 +46,6 @@ const DROPDOWN_CONTAINER_CLASS = 'gl-new-dropdown-container';
|
|
|
46
46
|
|
|
47
47
|
export default {
|
|
48
48
|
name: 'BaseDropdown',
|
|
49
|
-
expose: ['open', 'close', 'closeAndFocus', 'containsElement'],
|
|
50
|
-
BASE_DROPDOWN_CLASS,
|
|
51
|
-
DROPDOWN_CONTAINER_CLASS,
|
|
52
49
|
components: {
|
|
53
50
|
DropdownContainer,
|
|
54
51
|
GlButton,
|
|
@@ -291,6 +288,9 @@ export default {
|
|
|
291
288
|
validator: (strategy) => [POSITION_ABSOLUTE, POSITION_FIXED].includes(strategy),
|
|
292
289
|
},
|
|
293
290
|
},
|
|
291
|
+
expose: ['open', 'close', 'closeAndFocus', 'containsElement'],
|
|
292
|
+
BASE_DROPDOWN_CLASS,
|
|
293
|
+
DROPDOWN_CONTAINER_CLASS,
|
|
294
294
|
data() {
|
|
295
295
|
return {
|
|
296
296
|
openedYet: false,
|
|
@@ -62,6 +62,14 @@ export default {
|
|
|
62
62
|
default: 1,
|
|
63
63
|
validator: (value) => value > 0,
|
|
64
64
|
},
|
|
65
|
+
/**
|
|
66
|
+
* Additional CSS classes to apply to the `#filters` slot container.
|
|
67
|
+
*/
|
|
68
|
+
filtersClass: {
|
|
69
|
+
type: String,
|
|
70
|
+
required: false,
|
|
71
|
+
default: '',
|
|
72
|
+
},
|
|
65
73
|
},
|
|
66
74
|
computed: {
|
|
67
75
|
dashboardHasPanels() {
|
|
@@ -131,6 +139,7 @@ export default {
|
|
|
131
139
|
<section
|
|
132
140
|
v-if="$scopedSlots.filters"
|
|
133
141
|
class="gl-flex gl-flex-row gl-flex-wrap gl-gap-5 gl-pb-3 gl-pt-4"
|
|
142
|
+
:class="filtersClass"
|
|
134
143
|
data-testid="filters-container"
|
|
135
144
|
>
|
|
136
145
|
<!-- @slot Place dashboard filters inside this slot. -->
|