@gitlab/ui 108.4.0 → 108.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/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [108.5.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v108.4.1...v108.5.0) (2025-02-26)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **GlTable:** Update empty state to use text.subtle ([10b8cda](https://gitlab.com/gitlab-org/gitlab-ui/commit/10b8cdac7ea2ce923e8ae3801ca4dacfede73f16))
|
|
7
|
+
|
|
8
|
+
## [108.4.1](https://gitlab.com/gitlab-org/gitlab-ui/compare/v108.4.0...v108.4.1) (2025-02-21)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **GlBreadcrumb:** Hide breadcrumb item if it has no text ([d9badd5](https://gitlab.com/gitlab-org/gitlab-ui/commit/d9badd5613402e0fcf5d93d3ae6e3e4d414a3cda))
|
|
14
|
+
|
|
1
15
|
# [108.4.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v108.3.1...v108.4.0) (2025-02-21)
|
|
2
16
|
|
|
3
17
|
|
|
@@ -200,6 +200,12 @@ var script = {
|
|
|
200
200
|
this.resizeObserver = null;
|
|
201
201
|
}
|
|
202
202
|
this.resetItems();
|
|
203
|
+
},
|
|
204
|
+
hideItemClass(item) {
|
|
205
|
+
// TODO once https://gitlab.com/gitlab-org/gitlab/-/issues/520089 is addressed:
|
|
206
|
+
// - Remove this hiding of empty breadcrumbs.
|
|
207
|
+
// - Tighten `items` validator to require non-empty `text`.
|
|
208
|
+
return !item.text ? 'gl-hidden' : '';
|
|
203
209
|
}
|
|
204
210
|
}
|
|
205
211
|
};
|
|
@@ -208,7 +214,7 @@ var script = {
|
|
|
208
214
|
const __vue_script__ = script;
|
|
209
215
|
|
|
210
216
|
/* template */
|
|
211
|
-
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('nav',{staticClass:"gl-breadcrumbs",style:(_vm.breadcrumbStyle),attrs:{"aria-label":_vm.ariaLabel}},[_c('ol',_vm._g(_vm._b({staticClass:"gl-breadcrumb-list breadcrumb"},'ol',_vm.$attrs,false),_vm.$listeners),[(_vm.hasCollapsible)?_c('li',{class:("gl-breadcrumb-item gl-breadcrumb-item-" + _vm.size)},[_c('gl-disclosure-dropdown',{attrs:{"items":_vm.overflowingItems,"toggle-text":_vm.showMoreLabel,"fluid-width":"","text-sr-only":"","no-caret":"","icon":"ellipsis_h","size":_vm.dropdownSize}})],1):_vm._e(),_vm._v(" "),_vm._l((_vm.fittingItems),function(item,index){return _c('gl-breadcrumb-item',{key:index,ref:"breadcrumbs",refInFor:true,style:(_vm.itemStyle),attrs:{"text":item.text,"href":item.href,"to":item.to,"size":_vm.size,"aria-current":_vm.getAriaCurrentAttr(index)}},[(item.avatarPath)?_c('gl-avatar',{staticClass:"gl-breadcrumb-avatar-tile gl-border gl-mr-2 !gl-rounded-base",attrs:{"src":item.avatarPath,"size":_vm.avatarSize,"aria-hidden":"true","shape":"rect","data-testid":"avatar"}}):_vm._e(),_c('span',{staticClass:"gl-align-middle"},[_vm._v(_vm._s(item.text))])],1)})],2)])};
|
|
217
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('nav',{staticClass:"gl-breadcrumbs",style:(_vm.breadcrumbStyle),attrs:{"aria-label":_vm.ariaLabel}},[_c('ol',_vm._g(_vm._b({staticClass:"gl-breadcrumb-list breadcrumb"},'ol',_vm.$attrs,false),_vm.$listeners),[(_vm.hasCollapsible)?_c('li',{class:("gl-breadcrumb-item gl-breadcrumb-item-" + _vm.size)},[_c('gl-disclosure-dropdown',{attrs:{"items":_vm.overflowingItems,"toggle-text":_vm.showMoreLabel,"fluid-width":"","text-sr-only":"","no-caret":"","icon":"ellipsis_h","size":_vm.dropdownSize}})],1):_vm._e(),_vm._v(" "),_vm._l((_vm.fittingItems),function(item,index){return _c('gl-breadcrumb-item',{key:index,ref:"breadcrumbs",refInFor:true,class:_vm.hideItemClass(item),style:(_vm.itemStyle),attrs:{"text":item.text,"href":item.href,"to":item.to,"size":_vm.size,"aria-current":_vm.getAriaCurrentAttr(index)}},[(item.avatarPath)?_c('gl-avatar',{staticClass:"gl-breadcrumb-avatar-tile gl-border gl-mr-2 !gl-rounded-base",attrs:{"src":item.avatarPath,"size":_vm.avatarSize,"aria-hidden":"true","shape":"rect","data-testid":"avatar"}}):_vm._e(),_c('span',{staticClass:"gl-align-middle"},[_vm._v(_vm._s(item.text))])],1)})],2)])};
|
|
212
218
|
var __vue_staticRenderFns__ = [];
|
|
213
219
|
|
|
214
220
|
/* style */
|
|
@@ -125,7 +125,7 @@ var script = {
|
|
|
125
125
|
const __vue_script__ = script;
|
|
126
126
|
|
|
127
127
|
/* template */
|
|
128
|
-
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-table',_vm._g(_vm._b({attrs:{"table-class":_vm.localTableClass,"fields":_vm.computedFields,"sort-by":_vm.localSortBy,"sort-desc":_vm.localSortDesc,"no-sort-reset":""},on:{"update:sortBy":function($event){_vm.localSortBy=$event;},"update:sort-by":function($event){_vm.localSortBy=$event;},"update:sortDesc":function($event){_vm.localSortDesc=$event;},"update:sort-desc":function($event){_vm.localSortDesc=$event;}},scopedSlots:_vm._u([_vm._l((Object.keys(_vm.$scopedSlots)),function(slotName){return {key:slotName,fn:function(scope){return [_vm._t(slotName,null,null,scope)]}}}),_vm._l((_vm.headSlots),function(headSlotName){return {key:headSlotName,fn:function(scope){return [_c('div',{key:headSlotName,staticClass:"gl-flex"},[_vm._t(headSlotName,function(){return [_c('span',[_vm._v(_vm._s(scope.label))])]},null,scope),(_vm.isSortable(scope))?[_c('div',{staticClass:"gl-table-th-sort-icon-wrapper gl-flex gl-w-5 gl-justify-center"},[_c('span',{class:{ 'gl-hidden': !_vm.activeSortingColumn(scope) },attrs:{"name":"sort-icon","data-testid":"sort-icon"}},[_vm._v("\n "+_vm._s(_vm.getSortingIcon(scope))+"\n ")])])]:_vm._e()],2)]}}})],null,true)},'b-table',_vm.$attrs,false),_vm.$listeners))};
|
|
128
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-table',_vm._g(_vm._b({attrs:{"table-class":_vm.localTableClass,"fields":_vm.computedFields,"sort-by":_vm.localSortBy,"sort-desc":_vm.localSortDesc,"no-sort-reset":""},on:{"update:sortBy":function($event){_vm.localSortBy=$event;},"update:sort-by":function($event){_vm.localSortBy=$event;},"update:sortDesc":function($event){_vm.localSortDesc=$event;},"update:sort-desc":function($event){_vm.localSortDesc=$event;}},scopedSlots:_vm._u([_vm._l((Object.keys(_vm.$scopedSlots)),function(slotName){return {key:slotName,fn:function(scope){return [_vm._t(slotName,null,null,scope)]}}}),_vm._l((_vm.headSlots),function(headSlotName){return {key:headSlotName,fn:function(scope){return [_c('div',{key:headSlotName,staticClass:"gl-flex"},[_vm._t(headSlotName,function(){return [_c('span',[_vm._v(_vm._s(scope.label))])]},null,scope),(_vm.isSortable(scope))?[_c('div',{staticClass:"gl-table-th-sort-icon-wrapper gl-flex gl-w-5 gl-justify-center"},[_c('span',{class:{ 'gl-hidden': !_vm.activeSortingColumn(scope) },attrs:{"name":"sort-icon","data-testid":"sort-icon"}},[_vm._v("\n "+_vm._s(_vm.getSortingIcon(scope))+"\n ")])])]:_vm._e()],2)]}}}),{key:"empty",fn:function(scope){return [_vm._t("empty",function(){return [_c('p',{staticClass:"gl-mb-0 gl-py-2 gl-text-subtle"},[_vm._v(_vm._s(scope.emptyText))])]},null,scope)]}}],null,true)},'b-table',_vm.$attrs,false),_vm.$listeners))};
|
|
129
129
|
var __vue_staticRenderFns__ = [];
|
|
130
130
|
|
|
131
131
|
/* style */
|
package/package.json
CHANGED
|
@@ -201,6 +201,12 @@ export default {
|
|
|
201
201
|
}
|
|
202
202
|
this.resetItems();
|
|
203
203
|
},
|
|
204
|
+
hideItemClass(item) {
|
|
205
|
+
// TODO once https://gitlab.com/gitlab-org/gitlab/-/issues/520089 is addressed:
|
|
206
|
+
// - Remove this hiding of empty breadcrumbs.
|
|
207
|
+
// - Tighten `items` validator to require non-empty `text`.
|
|
208
|
+
return !item.text ? 'gl-hidden' : '';
|
|
209
|
+
},
|
|
204
210
|
},
|
|
205
211
|
};
|
|
206
212
|
</script>
|
|
@@ -229,6 +235,7 @@ export default {
|
|
|
229
235
|
:to="item.to"
|
|
230
236
|
:size="size"
|
|
231
237
|
:aria-current="getAriaCurrentAttr(index)"
|
|
238
|
+
:class="hideItemClass(item)"
|
|
232
239
|
><gl-avatar
|
|
233
240
|
v-if="item.avatarPath"
|
|
234
241
|
:src="item.avatarPath"
|
|
@@ -140,5 +140,10 @@ export default {
|
|
|
140
140
|
</template>
|
|
141
141
|
</div>
|
|
142
142
|
</template>
|
|
143
|
+
<template #empty="scope">
|
|
144
|
+
<slot name="empty" v-bind="scope">
|
|
145
|
+
<p class="gl-mb-0 gl-py-2 gl-text-subtle">{{ scope.emptyText }}</p>
|
|
146
|
+
</slot>
|
|
147
|
+
</template>
|
|
143
148
|
</b-table>
|
|
144
149
|
</template>
|