@gitlab/ui 128.3.0 → 128.4.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": "128.
|
|
3
|
+
"version": "128.4.0",
|
|
4
4
|
"description": "GitLab UI Components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -146,8 +146,8 @@
|
|
|
146
146
|
"mockdate": "^3.0.5",
|
|
147
147
|
"module-alias": "^2.2.3",
|
|
148
148
|
"pikaday": "^1.8.0",
|
|
149
|
-
"playwright": "^1.
|
|
150
|
-
"playwright-core": "^1.
|
|
149
|
+
"playwright": "^1.58.0",
|
|
150
|
+
"playwright-core": "^1.58.0",
|
|
151
151
|
"postcss": "8.5.6",
|
|
152
152
|
"postcss-loader": "8.2.0",
|
|
153
153
|
"postcss-scss": "4.0.9",
|
|
@@ -159,7 +159,7 @@
|
|
|
159
159
|
"rollup-plugin-string": "^3.0.0",
|
|
160
160
|
"rollup-plugin-svg": "^2.0.0",
|
|
161
161
|
"rollup-plugin-vue": "^5.1.9",
|
|
162
|
-
"sass": "^1.97.
|
|
162
|
+
"sass": "^1.97.3",
|
|
163
163
|
"sass-loader": "^10.5.2",
|
|
164
164
|
"sass-true": "^9",
|
|
165
165
|
"start-server-and-test": "^2.1.3",
|
|
@@ -60,8 +60,10 @@ $breadcrumb-max-width: $grid-size * 16;
|
|
|
60
60
|
|
|
61
61
|
.gl-breadcrumb-item-md {
|
|
62
62
|
@apply gl-text-base;
|
|
63
|
+
}
|
|
63
64
|
|
|
64
|
-
|
|
65
|
+
.gl-breadcrumb-item {
|
|
66
|
+
/**
|
|
65
67
|
* If the last/only item, which is always visible, has a very long title,
|
|
66
68
|
* it could overflow the breadcrumb component. This CSS makes sure it
|
|
67
69
|
* shows an ellipsis instead.
|
|
@@ -69,7 +71,8 @@ $breadcrumb-max-width: $grid-size * 16;
|
|
|
69
71
|
* would then not take the real unshrunk width of that item into account.
|
|
70
72
|
*/
|
|
71
73
|
&.gl-breadcrumb-only-item {
|
|
72
|
-
@apply gl-
|
|
74
|
+
@apply gl-shrink;
|
|
75
|
+
max-width: var(--gl-breadcrumb-truncated-item-max-width, 100%);
|
|
73
76
|
|
|
74
77
|
a {
|
|
75
78
|
@apply gl-max-w-full gl-overflow-hidden gl-text-ellipsis gl-text-nowrap;
|
|
@@ -151,14 +151,22 @@ export default {
|
|
|
151
151
|
} else {
|
|
152
152
|
this.resizeDone = true;
|
|
153
153
|
}
|
|
154
|
-
this.
|
|
155
|
-
? this.$refs.clipboardButton.$el.clientWidth
|
|
156
|
-
: 0;
|
|
154
|
+
this.updateClipboardButtonWidth();
|
|
157
155
|
},
|
|
158
156
|
beforeDestroy() {
|
|
159
157
|
this.disableAutoResize();
|
|
160
158
|
},
|
|
161
159
|
methods: {
|
|
160
|
+
updateClipboardButtonWidth() {
|
|
161
|
+
if (!this.showClipboardButton) {
|
|
162
|
+
this.clipboardButtonWidth = 0;
|
|
163
|
+
return;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
const element = this.$refs.clipboardButton.$el;
|
|
167
|
+
const marginLeft = parseInt(getComputedStyle(element).marginLeft, 10);
|
|
168
|
+
this.clipboardButtonWidth = element.offsetWidth + marginLeft;
|
|
169
|
+
},
|
|
162
170
|
resetItems() {
|
|
163
171
|
this.fittingItems = [...this.items];
|
|
164
172
|
this.overflowingItems = [];
|
|
@@ -214,6 +222,15 @@ export default {
|
|
|
214
222
|
}
|
|
215
223
|
}
|
|
216
224
|
|
|
225
|
+
const truncatedItemMaxWidth = Math.max(
|
|
226
|
+
0,
|
|
227
|
+
containerWidth - (this.dropdownWidth + this.clipboardButtonWidth),
|
|
228
|
+
);
|
|
229
|
+
this.$el.style.setProperty(
|
|
230
|
+
'--gl-breadcrumb-truncated-item-max-width',
|
|
231
|
+
`${truncatedItemMaxWidth}px`,
|
|
232
|
+
);
|
|
233
|
+
|
|
217
234
|
this.resizeDone = true;
|
|
218
235
|
},
|
|
219
236
|
isLastItem(index) {
|