@gitlab/ui 114.1.1 → 114.1.2

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": "114.1.1",
3
+ "version": "114.1.2",
4
4
  "description": "GitLab UI Components",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -33,8 +33,9 @@ $breadcrumb-max-width: $grid-size * 16;
33
33
  text-decoration-thickness: auto;
34
34
  text-decoration-style: solid;
35
35
  text-decoration-color: transparent;
36
- transition: box-shadow $gl-transition-duration-medium $gl-easing-out-cubic,
37
- text-decoration-color $gl-transition-duration-medium $gl-easing-out-cubic;
36
+ transition:
37
+ box-shadow $gl-transition-duration-medium $gl-easing-out-cubic,
38
+ text-decoration-color $gl-transition-duration-medium $gl-easing-out-cubic;
38
39
  @include gl-prefers-reduced-motion-transition;
39
40
 
40
41
  &:hover {
@@ -66,4 +67,19 @@ $breadcrumb-max-width: $grid-size * 16;
66
67
 
67
68
  .gl-breadcrumb-item-md {
68
69
  @apply gl-text-base;
70
+
71
+ /**
72
+ * If the last/only item, which is always visible, has a very long title,
73
+ * it could overflow the breadcrumb component. This CSS makes sure it
74
+ * shows an ellipsis instead.
75
+ * But this CSS cannot be active while we do the size calculation, as that
76
+ * would then not take the real unshrunk width of that item into account.
77
+ */
78
+ &.gl-breadcrumb-only-item {
79
+ @apply gl-max-w-full gl-shrink;
80
+
81
+ a {
82
+ @apply gl-max-w-full gl-overflow-hidden gl-text-ellipsis gl-text-nowrap;
83
+ }
84
+ }
69
85
  }
@@ -81,23 +81,11 @@ export default {
81
81
  breadcrumbStyle() {
82
82
  return this.resizeDone ? {} : { opacity: 0 };
83
83
  },
84
- itemStyle() {
85
- /**
86
- * If the last/only item, which is always visible, has a very long title,
87
- * it could overflow the breadcrumb component. This CSS makes sure it
88
- * shows an ellipsis instead.
89
- * But this CSS cannot be active while we do the size calculation, as that
90
- * would then not take the real unshrunk width of that item into account.
91
- */
84
+ itemClass() {
92
85
  if (this.resizeDone && this.fittingItems.length === 1) {
93
- return {
94
- 'flex-shrink': 1,
95
- 'text-overflow': 'ellipsis',
96
- 'overflow-x': 'hidden',
97
- 'text-wrap': 'nowrap',
98
- };
86
+ return 'gl-breadcrumb-only-item';
99
87
  }
100
- return {};
88
+ return '';
101
89
  },
102
90
  dropdownSize() {
103
91
  return this.size === 'sm' ? 'small' : 'medium';
@@ -231,11 +219,10 @@ export default {
231
219
  :key="index"
232
220
  :text="item.text"
233
221
  :href="item.href"
234
- :style="itemStyle"
235
222
  :to="item.to"
236
223
  :size="size"
237
224
  :aria-current="getAriaCurrentAttr(index)"
238
- :class="hideItemClass(item)"
225
+ :class="[hideItemClass(item), itemClass]"
239
226
  ><gl-avatar
240
227
  v-if="item.avatarPath"
241
228
  :src="item.avatarPath"