@gitlab/ui 115.4.0 → 115.5.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/drawer/drawer.js +4 -1
- package/dist/components/dashboards/dashboard_layout/dashboard_layout.js +3 -9
- package/dist/components/dashboards/dashboard_layout/grid_layout/grid_layout.js +22 -4
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/package.json +6 -7
- package/src/components/base/drawer/drawer.scss +4 -1
- package/src/components/base/drawer/drawer.vue +8 -3
- package/src/components/dashboards/dashboard_layout/dashboard_layout.vue +3 -9
- package/src/components/dashboards/dashboard_layout/grid_layout/grid_layout.vue +22 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitlab/ui",
|
|
3
|
-
"version": "115.
|
|
3
|
+
"version": "115.5.0",
|
|
4
4
|
"description": "GitLab UI Components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"dependencies": {
|
|
71
71
|
"@floating-ui/dom": "1.7.2",
|
|
72
72
|
"echarts": "^5.6.0",
|
|
73
|
-
"gridstack": "^12.2.
|
|
73
|
+
"gridstack": "^12.2.2",
|
|
74
74
|
"iframe-resizer": "^4.4.5",
|
|
75
75
|
"lodash": "^4.17.21",
|
|
76
76
|
"popper.js": "^1.16.1",
|
|
@@ -87,12 +87,12 @@
|
|
|
87
87
|
"vue": "^2.7.16"
|
|
88
88
|
},
|
|
89
89
|
"resolutions": {
|
|
90
|
-
"chokidar": "^
|
|
90
|
+
"chokidar": "^4.0.3",
|
|
91
91
|
"sane": "^5.0.1",
|
|
92
92
|
"jackspeak": "2.1.1",
|
|
93
93
|
"postcss": "8.5.6",
|
|
94
94
|
"json5": "2.2.3",
|
|
95
|
-
"rollup-plugin-vue/@vue/component-compiler/postcss-modules-sync/generic-names/loader-utils": "
|
|
95
|
+
"rollup-plugin-vue/@vue/component-compiler/postcss-modules-sync/generic-names/loader-utils": "3.3.1"
|
|
96
96
|
},
|
|
97
97
|
"devDependencies": {
|
|
98
98
|
"@babel/core": "^7.28.0",
|
|
@@ -138,7 +138,6 @@
|
|
|
138
138
|
"cypress-real-events": "^1.14.0",
|
|
139
139
|
"dompurify": "^3.1.2",
|
|
140
140
|
"emoji-regex": "^10.4.0",
|
|
141
|
-
"entities": "^5.0.0",
|
|
142
141
|
"esbuild": "^0.18.0",
|
|
143
142
|
"fuse.js": "^7.1.0",
|
|
144
143
|
"gitlab-api-async-iterator": "^1.3.1",
|
|
@@ -150,7 +149,7 @@
|
|
|
150
149
|
"jest-environment-jsdom": "30.0.2",
|
|
151
150
|
"jest-image-snapshot": "^6.5.1",
|
|
152
151
|
"merge-cobertura": "^1.0.4",
|
|
153
|
-
"mockdate": "^
|
|
152
|
+
"mockdate": "^3.0.5",
|
|
154
153
|
"module-alias": "^2.2.3",
|
|
155
154
|
"npm-run-all": "^4.1.5",
|
|
156
155
|
"pikaday": "^1.8.0",
|
|
@@ -160,7 +159,7 @@
|
|
|
160
159
|
"postcss-loader": "8.1.1",
|
|
161
160
|
"postcss-scss": "4.0.9",
|
|
162
161
|
"react": "^18.3.1",
|
|
163
|
-
"react-dom": "^
|
|
162
|
+
"react-dom": "^19.1.0",
|
|
164
163
|
"rollup": "^2.79.2",
|
|
165
164
|
"rollup-plugin-babel": "^4.4.0",
|
|
166
165
|
"rollup-plugin-postcss": "4.0.2",
|
|
@@ -112,13 +112,16 @@ $gl-drawer-scrim-gradient: linear-gradient(
|
|
|
112
112
|
|
|
113
113
|
.gl-drawer-body {
|
|
114
114
|
@apply gl-grow;
|
|
115
|
-
min-height: 0;
|
|
116
115
|
// prevent safari bug where box shadow is visible
|
|
117
116
|
// above the drawer when hovering interactive elements
|
|
118
117
|
// see https://gitlab.com/gitlab-org/gitlab/-/issues/366558
|
|
119
118
|
background-color: inherit;
|
|
120
119
|
}
|
|
121
120
|
|
|
121
|
+
.gl-drawer-body-shrink {
|
|
122
|
+
overflow-y: auto;
|
|
123
|
+
}
|
|
124
|
+
|
|
122
125
|
.gl-drawer-body-scrim {
|
|
123
126
|
&::after {
|
|
124
127
|
background: $gl-drawer-scrim-gradient;
|
|
@@ -120,13 +120,18 @@ export default {
|
|
|
120
120
|
</div>
|
|
121
121
|
<slot name="header"></slot>
|
|
122
122
|
</div>
|
|
123
|
-
<div
|
|
123
|
+
<div
|
|
124
|
+
class="gl-drawer-body"
|
|
125
|
+
:class="{
|
|
126
|
+
'gl-drawer-body-shrink': headerSticky,
|
|
127
|
+
'gl-drawer-body-scrim': !shouldRenderFooter,
|
|
128
|
+
}"
|
|
129
|
+
>
|
|
124
130
|
<slot></slot>
|
|
125
131
|
</div>
|
|
126
132
|
<div
|
|
127
133
|
v-if="shouldRenderFooter"
|
|
128
|
-
class="gl-drawer-footer gl-drawer-footer-sticky"
|
|
129
|
-
:class="{ 'gl-drawer-body-scrim-on-footer': shouldRenderFooter }"
|
|
134
|
+
class="gl-drawer-footer gl-drawer-footer-sticky gl-drawer-body-scrim-on-footer"
|
|
130
135
|
:style="{ zIndex }"
|
|
131
136
|
>
|
|
132
137
|
<slot name="footer"></slot>
|
|
@@ -20,14 +20,8 @@ export default {
|
|
|
20
20
|
* @typedef {Object} Dashboard
|
|
21
21
|
* @property {string} title - The dashboard title to render. Expected if no #title or #header slot is provided.
|
|
22
22
|
* @property {string} description - Optional: The dashboard description to render.
|
|
23
|
-
* @property {
|
|
24
|
-
* @
|
|
25
|
-
* @property {string} panels[].title - The panel title to render.
|
|
26
|
-
* @property {Object} panels[].gridAttributes - Layout settings for the panel.
|
|
27
|
-
* @property {number} panels[].gridAttributes.width - Width of the panel in grid units.
|
|
28
|
-
* @property {number} panels[].gridAttributes.height - Height of the panel in grid units.
|
|
29
|
-
* @property {number} panels[].gridAttributes.xPos - X position of the panel in the grid, expressed in grid units, starts from 0.
|
|
30
|
-
* @property {number} panels[].gridAttributes.yPos - Y position of the panel in the grid, expressed in grid units, starts from 0.
|
|
23
|
+
* @property {DashboardGrid} panels - Optional: The grid configuration.
|
|
24
|
+
* @see GridLayout.vue
|
|
31
25
|
*
|
|
32
26
|
* @type {Dashboard}
|
|
33
27
|
*/
|
|
@@ -112,7 +106,7 @@ export default {
|
|
|
112
106
|
<grid-layout
|
|
113
107
|
v-if="dashboardHasPanels"
|
|
114
108
|
:value="config"
|
|
115
|
-
:is-static="isStaticGrid"
|
|
109
|
+
:is-static-grid="isStaticGrid"
|
|
116
110
|
class="-gl-mx-3"
|
|
117
111
|
@input="emitChanges"
|
|
118
112
|
>
|
|
@@ -8,11 +8,29 @@ const CURSOR_GRABBING_CLASS = '!gl-cursor-grabbing';
|
|
|
8
8
|
export default {
|
|
9
9
|
name: 'GlGridLayout',
|
|
10
10
|
props: {
|
|
11
|
+
/**
|
|
12
|
+
* The grid configuration object.
|
|
13
|
+
*
|
|
14
|
+
* @typedef {Object} DashboardGrid
|
|
15
|
+
* @property {Array<Object>} panels - The dashboard panels. If empty, it will render an empty grid
|
|
16
|
+
* @property {string} panels[].id - Each panel must have a unique ID.
|
|
17
|
+
* @property {string} panels[].title - The panel title to render.
|
|
18
|
+
* @property {Object} panels[].gridAttributes - Layout settings for the panel.
|
|
19
|
+
* @property {number} panels[].gridAttributes.width - Width of the panel in grid units.
|
|
20
|
+
* @property {number} panels[].gridAttributes.height - Height of the panel in grid units.
|
|
21
|
+
* @property {number} panels[].gridAttributes.xPos - X position of the panel in the grid, expressed in grid units, starts from 0.
|
|
22
|
+
* @property {number} panels[].gridAttributes.yPos - Y position of the panel in the grid, expressed in grid units, starts from 0.
|
|
23
|
+
*
|
|
24
|
+
* @type {DashboardGrid}
|
|
25
|
+
*/
|
|
11
26
|
value: {
|
|
12
27
|
type: Object,
|
|
13
28
|
required: true,
|
|
14
29
|
},
|
|
15
|
-
|
|
30
|
+
/**
|
|
31
|
+
* Set to `false` to enable user-driven modification of the grid layout.
|
|
32
|
+
*/
|
|
33
|
+
isStaticGrid: {
|
|
16
34
|
type: Boolean,
|
|
17
35
|
required: false,
|
|
18
36
|
default: true,
|
|
@@ -37,7 +55,7 @@ export default {
|
|
|
37
55
|
},
|
|
38
56
|
},
|
|
39
57
|
watch: {
|
|
40
|
-
|
|
58
|
+
isStaticGrid(value) {
|
|
41
59
|
this.grid?.setStatic(value);
|
|
42
60
|
},
|
|
43
61
|
gridConfig: {
|
|
@@ -138,7 +156,7 @@ export default {
|
|
|
138
156
|
animate: true,
|
|
139
157
|
float: true,
|
|
140
158
|
// Toggles user-customization of grid layout
|
|
141
|
-
staticGrid: this.
|
|
159
|
+
staticGrid: this.isStaticGrid,
|
|
142
160
|
},
|
|
143
161
|
this.$refs.grid,
|
|
144
162
|
).load(this.gridConfig);
|
|
@@ -238,7 +256,7 @@ export default {
|
|
|
238
256
|
ref="panelWrappers"
|
|
239
257
|
:key="panel.id"
|
|
240
258
|
class="gl-h-full"
|
|
241
|
-
:class="{ 'gl-cursor-grab': !
|
|
259
|
+
:class="{ 'gl-cursor-grab': !isStaticGrid }"
|
|
242
260
|
data-testid="gridstack-panel"
|
|
243
261
|
>
|
|
244
262
|
<slot name="panel" v-bind="{ panel: panel.props }"></slot>
|