@gitlab/ui 115.3.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gitlab/ui",
3
- "version": "115.3.0",
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.1",
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": "^3.6.0",
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": "1.4.2"
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": "^2.0.5",
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": "^18.3.1",
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 class="gl-drawer-body" :class="{ 'gl-drawer-body-scrim': !shouldRenderFooter }">
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 {Array<Object>} panels - Optional: The dashboard panels. The entire object is passed to the #panel slot.
24
- * @property {string} panels[].id - Each panel must have a unique ID.
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
- isStatic: {
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
- isStatic(value) {
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.isStatic,
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': !isStatic }"
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>
@@ -26,6 +26,11 @@ export default {
26
26
  required: false,
27
27
  default: '',
28
28
  },
29
+ bodyContentClass: {
30
+ type: String,
31
+ required: false,
32
+ default: '',
33
+ },
29
34
  borderColorClass: {
30
35
  type: String,
31
36
  required: false,
@@ -95,6 +100,11 @@ export default {
95
100
  containerClasses() {
96
101
  return `${this.containerClass} ${this.borderClass}`;
97
102
  },
103
+ bodyClasses() {
104
+ return this.loading
105
+ ? 'gl-flex gl-flex-wrap gl-content-center gl-text-center'
106
+ : `gl-grow gl-overflow-y-auto gl-overflow-x-hidden ${this.bodyContentClass}`;
107
+ },
98
108
  hasTitleIcon() {
99
109
  return Boolean(this.titleIcon);
100
110
  },
@@ -188,10 +198,7 @@ export default {
188
198
  </template>
189
199
  </gl-disclosure-dropdown>
190
200
  </div>
191
- <div
192
- class="gl-grow gl-overflow-y-auto gl-overflow-x-hidden"
193
- :class="{ 'gl-flex gl-flex-wrap gl-content-center gl-text-center': loading }"
194
- >
201
+ <div :class="bodyClasses">
195
202
  <template v-if="loading">
196
203
  <gl-loading-icon size="lg" class="gl-min-h-8 gl-w-full" />
197
204
  <div