@gitlab/ui 108.0.1 → 108.2.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 +14 -0
- package/dist/components/base/breadcrumb/breadcrumb.js +18 -2
- package/dist/components/base/breadcrumb/breadcrumb_item.js +8 -1
- package/dist/index.css +2 -2
- package/dist/index.css.map +1 -1
- package/dist/utils/constants.js +5 -1
- package/package.json +3 -3
- package/src/components/base/breadcrumb/breadcrumb.md +13 -1
- package/src/components/base/breadcrumb/breadcrumb.scss +8 -1
- package/src/components/base/breadcrumb/breadcrumb.vue +21 -4
- package/src/components/base/breadcrumb/breadcrumb_item.vue +8 -1
- package/src/components/base/toast/toast.scss +1 -1
- package/src/utils/constants.js +5 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [108.2.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v108.1.0...v108.2.0) (2025-02-10)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **GlToast:** Use token for action color ([5eec4df](https://gitlab.com/gitlab-org/gitlab-ui/commit/5eec4dff2c1a91c9ff6b869d6b34b9b8856c842c))
|
|
7
|
+
|
|
8
|
+
# [108.1.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v108.0.1...v108.1.0) (2025-02-05)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* **GlBreadcrumb:** Add `size` prop ([47cf4bd](https://gitlab.com/gitlab-org/gitlab-ui/commit/47cf4bd6416ab99b918e409e9ef918a55fb9026f))
|
|
14
|
+
|
|
1
15
|
## [108.0.1](https://gitlab.com/gitlab-org/gitlab-ui/compare/v108.0.0...v108.0.1) (2025-02-04)
|
|
2
16
|
|
|
3
17
|
|
|
@@ -3,6 +3,7 @@ import { translate } from '../../../utils/i18n';
|
|
|
3
3
|
import GlAvatar from '../avatar/avatar';
|
|
4
4
|
import GlDisclosureDropdown from '../new_dropdowns/disclosure/disclosure_dropdown';
|
|
5
5
|
import { GlTooltipDirective } from '../../../directives/tooltip';
|
|
6
|
+
import { breadCrumbSizeOptions } from '../../../utils/constants';
|
|
6
7
|
import GlBreadcrumbItem from './breadcrumb_item';
|
|
7
8
|
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
8
9
|
|
|
@@ -56,6 +57,15 @@ var script = {
|
|
|
56
57
|
type: Boolean,
|
|
57
58
|
required: false,
|
|
58
59
|
default: true
|
|
60
|
+
},
|
|
61
|
+
/**
|
|
62
|
+
* Size of the breadcrumb item. Use `sm` for page breadcrumbs.
|
|
63
|
+
*/
|
|
64
|
+
size: {
|
|
65
|
+
type: String,
|
|
66
|
+
required: false,
|
|
67
|
+
default: breadCrumbSizeOptions.sm,
|
|
68
|
+
validator: value => Object.keys(breadCrumbSizeOptions).includes(value)
|
|
59
69
|
}
|
|
60
70
|
},
|
|
61
71
|
data() {
|
|
@@ -67,7 +77,7 @@ var script = {
|
|
|
67
77
|
totalBreadcrumbsWidth: 0,
|
|
68
78
|
// the total width of all breadcrumb items combined
|
|
69
79
|
widthPerItem: [],
|
|
70
|
-
// array with the
|
|
80
|
+
// array with the individual widths of each breadcrumb item
|
|
71
81
|
resizeDone: false // to apply some CSS only during/after resizing
|
|
72
82
|
};
|
|
73
83
|
},
|
|
@@ -97,6 +107,12 @@ var script = {
|
|
|
97
107
|
};
|
|
98
108
|
}
|
|
99
109
|
return {};
|
|
110
|
+
},
|
|
111
|
+
dropdownSize() {
|
|
112
|
+
return this.size === 'sm' ? 'small' : 'medium';
|
|
113
|
+
},
|
|
114
|
+
avatarSize() {
|
|
115
|
+
return this.size === 'sm' ? 16 : 24;
|
|
100
116
|
}
|
|
101
117
|
},
|
|
102
118
|
watch: {
|
|
@@ -192,7 +208,7 @@ var script = {
|
|
|
192
208
|
const __vue_script__ = script;
|
|
193
209
|
|
|
194
210
|
/* template */
|
|
195
|
-
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',{
|
|
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)])};
|
|
196
212
|
var __vue_staticRenderFns__ = [];
|
|
197
213
|
|
|
198
214
|
/* style */
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BLink } from '../../../vendor/bootstrap-vue/src/components/link/link';
|
|
2
|
+
import { breadCrumbSizeOptions } from '../../../utils/constants';
|
|
2
3
|
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
3
4
|
|
|
4
5
|
var script = {
|
|
@@ -30,6 +31,12 @@ var script = {
|
|
|
30
31
|
validator(value) {
|
|
31
32
|
return [false, 'page'].indexOf(value) !== -1;
|
|
32
33
|
}
|
|
34
|
+
},
|
|
35
|
+
size: {
|
|
36
|
+
type: String,
|
|
37
|
+
required: false,
|
|
38
|
+
default: breadCrumbSizeOptions.sm,
|
|
39
|
+
validator: value => Object.keys(breadCrumbSizeOptions).includes(value)
|
|
33
40
|
}
|
|
34
41
|
}
|
|
35
42
|
};
|
|
@@ -38,7 +45,7 @@ var script = {
|
|
|
38
45
|
const __vue_script__ = script;
|
|
39
46
|
|
|
40
47
|
/* template */
|
|
41
|
-
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('li',{
|
|
48
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('li',{class:("gl-breadcrumb-item gl-breadcrumb-item-" + _vm.size)},[_c('b-link',{attrs:{"href":_vm.href,"to":_vm.to,"aria-current":_vm.ariaCurrent}},[_vm._t("default",function(){return [_vm._v(_vm._s(_vm.text))]})],2)],1)};
|
|
42
49
|
var __vue_staticRenderFns__ = [];
|
|
43
50
|
|
|
44
51
|
/* style */
|