@gitlab/ui 126.2.0 → 126.3.1
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/dist/components/base/avatars_inline/avatars_inline.js +21 -0
- package/dist/components/base/badge/badge.js +7 -7
- package/dist/components/base/drawer/drawer.js +19 -0
- package/dist/components/base/dropdown/dropdown_item.js +34 -0
- package/dist/components/base/form/form_input_group/form_input_group.js +6 -0
- package/dist/components/base/keyset_pagination/keyset_pagination.js +1 -1
- package/dist/components/base/label/label.js +26 -6
- package/dist/components/base/pagination/pagination.js +2 -18
- package/dist/components/base/popover/popover.js +15 -0
- package/dist/components/base/progress_bar/progress_bar.js +15 -0
- package/dist/components/base/search_box_by_type/search_box_by_type.js +20 -0
- package/dist/components/base/tabs/tab/tab.js +31 -2
- package/dist/components/base/token/token.js +3 -0
- package/dist/components/dashboards/dashboard_layout/dashboard_layout.js +27 -1
- package/dist/components/dashboards/dashboard_layout/grid_layout/grid_layout.js +28 -6
- package/package.json +2 -2
- package/src/components/base/avatars_inline/avatars_inline.vue +22 -0
- package/src/components/base/badge/badge.vue +9 -8
- package/src/components/base/drawer/drawer.vue +23 -0
- package/src/components/base/dropdown/dropdown_item.vue +35 -0
- package/src/components/base/form/form_input_group/form_input_group.vue +6 -0
- package/src/components/base/keyset_pagination/keyset_pagination.vue +2 -2
- package/src/components/base/label/label.vue +26 -6
- package/src/components/base/pagination/pagination.vue +4 -22
- package/src/components/base/popover/popover.vue +20 -1
- package/src/components/base/progress_bar/progress_bar.vue +15 -0
- package/src/components/base/search_box_by_type/search_box_by_type.vue +18 -0
- package/src/components/base/tabs/tab/tab.vue +46 -2
- package/src/components/base/token/token.vue +4 -0
- package/src/components/dashboards/dashboard_layout/dashboard_layout.vue +29 -0
- package/src/components/dashboards/dashboard_layout/grid_layout/grid_layout.vue +29 -6
- package/translations.js +0 -2
|
@@ -33,6 +33,32 @@ var script = {
|
|
|
33
33
|
type: Boolean,
|
|
34
34
|
required: false,
|
|
35
35
|
default: true
|
|
36
|
+
},
|
|
37
|
+
/**
|
|
38
|
+
* Adjusts the cell height of the grid. Setting this too high can leave unwanted whitespace
|
|
39
|
+
* between grid panels. Reduce the number to allow for a more compact grid.
|
|
40
|
+
* For more information, see:
|
|
41
|
+
* https://gitlab.com/gitlab-org/gitlab-services/design.gitlab.com/-/issues/3051
|
|
42
|
+
*/
|
|
43
|
+
cellHeight: {
|
|
44
|
+
type: Number,
|
|
45
|
+
required: false,
|
|
46
|
+
/* Magic number:
|
|
47
|
+
* After allowing for padding, and the panel title row, this leaves us with minimum 48px height for the cell content.
|
|
48
|
+
* This means text/content with our spacing scale can fit up to 49px without scrolling.
|
|
49
|
+
*/
|
|
50
|
+
default: 137,
|
|
51
|
+
validator: value => value > 0
|
|
52
|
+
},
|
|
53
|
+
/**
|
|
54
|
+
* Sets a default minimum height for grid panels. This can still be overriden on a per-panel
|
|
55
|
+
* basis by setting `value.panels[].gridAttributes.minHeight`
|
|
56
|
+
*/
|
|
57
|
+
minCellHeight: {
|
|
58
|
+
type: Number,
|
|
59
|
+
required: false,
|
|
60
|
+
default: 1,
|
|
61
|
+
validator: value => value > 0
|
|
36
62
|
}
|
|
37
63
|
},
|
|
38
64
|
data() {
|
|
@@ -144,11 +170,6 @@ var script = {
|
|
|
144
170
|
margin: '8px',
|
|
145
171
|
// CSS Selector for finding the drag handle element
|
|
146
172
|
handle: '.grid-stack-item-handle',
|
|
147
|
-
/* Magic number:
|
|
148
|
-
* After allowing for padding, and the panel title row, this leaves us with minimum 48px height for the cell content.
|
|
149
|
-
* This means text/content with our spacing scale can fit up to 49px without scrolling.
|
|
150
|
-
*/
|
|
151
|
-
cellHeight: '137px',
|
|
152
173
|
// Setting 1 in minRow prevents the grid collapsing when all panels are removed
|
|
153
174
|
minRow: 1,
|
|
154
175
|
// Define the number of columns for anything below a set width, defaults to fill the available space
|
|
@@ -158,6 +179,7 @@ var script = {
|
|
|
158
179
|
c: 1
|
|
159
180
|
}]
|
|
160
181
|
},
|
|
182
|
+
cellHeight: this.cellHeight,
|
|
161
183
|
alwaysShowResizeHandle: true,
|
|
162
184
|
animate: true,
|
|
163
185
|
float: true,
|
|
@@ -206,7 +228,7 @@ var script = {
|
|
|
206
228
|
y: yPos,
|
|
207
229
|
w: width,
|
|
208
230
|
h: height,
|
|
209
|
-
minH: minHeight,
|
|
231
|
+
minH: minHeight || this.minCellHeight,
|
|
210
232
|
minW: minWidth,
|
|
211
233
|
maxH: maxHeight,
|
|
212
234
|
maxW: maxWidth,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitlab/ui",
|
|
3
|
-
"version": "126.
|
|
3
|
+
"version": "126.3.1",
|
|
4
4
|
"description": "GitLab UI Components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -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.94.
|
|
162
|
+
"sass": "^1.94.2",
|
|
163
163
|
"sass-loader": "^10.5.2",
|
|
164
164
|
"sass-true": "^9",
|
|
165
165
|
"start-server-and-test": "^2.1.3",
|
|
@@ -12,33 +12,54 @@ export default {
|
|
|
12
12
|
GlTooltip,
|
|
13
13
|
},
|
|
14
14
|
props: {
|
|
15
|
+
/**
|
|
16
|
+
* Array of avatar objects to display
|
|
17
|
+
*/
|
|
15
18
|
avatars: {
|
|
16
19
|
type: Array,
|
|
17
20
|
required: true,
|
|
18
21
|
},
|
|
22
|
+
/**
|
|
23
|
+
* Maximum number of avatars to display before collapsing
|
|
24
|
+
*/
|
|
19
25
|
maxVisible: {
|
|
20
26
|
type: Number,
|
|
21
27
|
required: true,
|
|
22
28
|
},
|
|
29
|
+
/**
|
|
30
|
+
* Size of each avatar in pixels
|
|
31
|
+
*/
|
|
23
32
|
avatarSize: {
|
|
24
33
|
type: Number,
|
|
25
34
|
required: true,
|
|
26
35
|
validator: (value) => avatarsInlineSizeOptions.includes(value),
|
|
27
36
|
},
|
|
37
|
+
/**
|
|
38
|
+
* Whether to show the avatars in collapsed state
|
|
39
|
+
*/
|
|
28
40
|
collapsed: {
|
|
29
41
|
type: Boolean,
|
|
30
42
|
required: false,
|
|
31
43
|
default: false,
|
|
32
44
|
},
|
|
45
|
+
/**
|
|
46
|
+
* Screen reader text for the collapsed avatars badge
|
|
47
|
+
*/
|
|
33
48
|
badgeSrOnlyText: {
|
|
34
49
|
type: String,
|
|
35
50
|
required: true,
|
|
36
51
|
},
|
|
52
|
+
/**
|
|
53
|
+
* Property name to extract tooltip text from each hidden avatar object
|
|
54
|
+
*/
|
|
37
55
|
badgeTooltipProp: {
|
|
38
56
|
type: String,
|
|
39
57
|
required: false,
|
|
40
58
|
default: '',
|
|
41
59
|
},
|
|
60
|
+
/**
|
|
61
|
+
* Maximum number of characters to display in the badge tooltip
|
|
62
|
+
*/
|
|
42
63
|
badgeTooltipMaxChars: {
|
|
43
64
|
type: Number,
|
|
44
65
|
required: false,
|
|
@@ -88,6 +109,7 @@ export default {
|
|
|
88
109
|
<template>
|
|
89
110
|
<div class="gl-avatars-inline" :class="`gl-avatars-inline-${badgeSize}`">
|
|
90
111
|
<div v-for="(avatar, index) in visibleAvatars" :key="index" class="gl-avatars-inline-child">
|
|
112
|
+
<!-- @slot Custom avatar rendering. Provide avatar object as slot prop. -->
|
|
91
113
|
<slot name="avatar" :avatar="avatar">
|
|
92
114
|
<gl-avatar v-bind="avatar" :size="avatarSize" />
|
|
93
115
|
</slot>
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
linkVariantUnstyled,
|
|
8
8
|
} from '../../../utils/constants';
|
|
9
9
|
import GlIcon from '../icon/icon.vue';
|
|
10
|
+
import { logWarning } from '../../../utils/utils';
|
|
10
11
|
|
|
11
12
|
const variantClass = {
|
|
12
13
|
[badgeVariantOptions.neutral]: 'badge-neutral',
|
|
@@ -120,13 +121,6 @@ export default {
|
|
|
120
121
|
role() {
|
|
121
122
|
return this.hasIconOnly ? 'img' : undefined;
|
|
122
123
|
},
|
|
123
|
-
ariaLabel() {
|
|
124
|
-
if (this.$attrs['aria-label']) {
|
|
125
|
-
return this.$attrs['aria-label'];
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
return this.role === 'img' ? this.icon : undefined;
|
|
129
|
-
},
|
|
130
124
|
iconSizeComputed() {
|
|
131
125
|
return badgeIconSizeOptions[this.iconSize];
|
|
132
126
|
},
|
|
@@ -152,6 +146,14 @@ export default {
|
|
|
152
146
|
];
|
|
153
147
|
},
|
|
154
148
|
},
|
|
149
|
+
mounted() {
|
|
150
|
+
if (this.hasIconOnly && !this.$attrs['aria-label']) {
|
|
151
|
+
logWarning(
|
|
152
|
+
'[GlBadge] Icon-only badges require an aria-label for accessibility. The label should describe the metadata (e.g., "Due date", "Open issue"), not the icon name. See https://design.gitlab.com/components/badge#using-icon-only-badges',
|
|
153
|
+
this.$el,
|
|
154
|
+
);
|
|
155
|
+
}
|
|
156
|
+
},
|
|
155
157
|
};
|
|
156
158
|
</script>
|
|
157
159
|
|
|
@@ -161,7 +163,6 @@ export default {
|
|
|
161
163
|
v-bind="computedProps"
|
|
162
164
|
:class="classes"
|
|
163
165
|
:role="role"
|
|
164
|
-
:aria-label="ariaLabel"
|
|
165
166
|
v-on="$listeners"
|
|
166
167
|
>
|
|
167
168
|
<gl-icon
|
|
@@ -10,25 +10,40 @@ export default {
|
|
|
10
10
|
GlButton,
|
|
11
11
|
},
|
|
12
12
|
props: {
|
|
13
|
+
/**
|
|
14
|
+
* Controls the visibility state of the drawer.
|
|
15
|
+
*/
|
|
13
16
|
open: {
|
|
14
17
|
type: Boolean,
|
|
15
18
|
required: true,
|
|
16
19
|
},
|
|
20
|
+
/**
|
|
21
|
+
* Height of the header element (e.g., '64px'). Used to position the drawer below a fixed header.
|
|
22
|
+
*/
|
|
17
23
|
headerHeight: {
|
|
18
24
|
type: String,
|
|
19
25
|
required: false,
|
|
20
26
|
default: '',
|
|
21
27
|
},
|
|
28
|
+
/**
|
|
29
|
+
* When true, makes the drawer header sticky so it remains visible when scrolling the drawer content.
|
|
30
|
+
*/
|
|
22
31
|
headerSticky: {
|
|
23
32
|
type: Boolean,
|
|
24
33
|
required: false,
|
|
25
34
|
default: false,
|
|
26
35
|
},
|
|
36
|
+
/**
|
|
37
|
+
* Z-index value for the drawer. Useful for controlling stacking order with other elements.
|
|
38
|
+
*/
|
|
27
39
|
zIndex: {
|
|
28
40
|
type: Number,
|
|
29
41
|
required: false,
|
|
30
42
|
default: maxZIndex,
|
|
31
43
|
},
|
|
44
|
+
/**
|
|
45
|
+
* Visual variant of the drawer.
|
|
46
|
+
*/
|
|
32
47
|
variant: {
|
|
33
48
|
type: String,
|
|
34
49
|
required: false,
|
|
@@ -93,6 +108,10 @@ export default {
|
|
|
93
108
|
const ESC = 27;
|
|
94
109
|
|
|
95
110
|
if (this.open && e.keyCode === ESC) {
|
|
111
|
+
/**
|
|
112
|
+
* Emits when drawer gets closed (by pressing ESC or clicking the close button).
|
|
113
|
+
* @event close
|
|
114
|
+
*/
|
|
96
115
|
this.$emit('close');
|
|
97
116
|
}
|
|
98
117
|
},
|
|
@@ -108,6 +127,7 @@ export default {
|
|
|
108
127
|
:class="{ 'gl-drawer-header-sticky': headerSticky }"
|
|
109
128
|
>
|
|
110
129
|
<div class="gl-drawer-title">
|
|
130
|
+
<!-- @slot Content for the drawer title area in the header. -->
|
|
111
131
|
<slot name="title"></slot>
|
|
112
132
|
<gl-button
|
|
113
133
|
category="tertiary"
|
|
@@ -118,6 +138,7 @@ export default {
|
|
|
118
138
|
@click="$emit('close')"
|
|
119
139
|
/>
|
|
120
140
|
</div>
|
|
141
|
+
<!-- @slot Additional content below the title in the header section. -->
|
|
121
142
|
<slot name="header"></slot>
|
|
122
143
|
</div>
|
|
123
144
|
<div
|
|
@@ -127,6 +148,7 @@ export default {
|
|
|
127
148
|
'gl-drawer-body-scrim': !shouldRenderFooter,
|
|
128
149
|
}"
|
|
129
150
|
>
|
|
151
|
+
<!-- @slot Main content of the drawer body. -->
|
|
130
152
|
<slot></slot>
|
|
131
153
|
</div>
|
|
132
154
|
<div
|
|
@@ -134,6 +156,7 @@ export default {
|
|
|
134
156
|
class="gl-drawer-footer gl-drawer-footer-sticky gl-drawer-body-scrim-on-footer"
|
|
135
157
|
:style="{ zIndex }"
|
|
136
158
|
>
|
|
159
|
+
<!-- @slot Content for the sticky footer at the bottom of the drawer. -->
|
|
137
160
|
<slot name="footer"></slot>
|
|
138
161
|
</div>
|
|
139
162
|
</aside>
|
|
@@ -15,51 +15,81 @@ export default {
|
|
|
15
15
|
},
|
|
16
16
|
inheritAttrs: false,
|
|
17
17
|
props: {
|
|
18
|
+
/**
|
|
19
|
+
* URL for the avatar image to display
|
|
20
|
+
*/
|
|
18
21
|
avatarUrl: {
|
|
19
22
|
type: String,
|
|
20
23
|
required: false,
|
|
21
24
|
default: '',
|
|
22
25
|
},
|
|
26
|
+
/**
|
|
27
|
+
* Color variant for the icon on the left side
|
|
28
|
+
*/
|
|
23
29
|
iconColor: {
|
|
24
30
|
type: String,
|
|
25
31
|
required: false,
|
|
26
32
|
default: '',
|
|
27
33
|
},
|
|
34
|
+
/**
|
|
35
|
+
* Name of the icon to display on the left side
|
|
36
|
+
*/
|
|
28
37
|
iconName: {
|
|
29
38
|
type: String,
|
|
30
39
|
required: false,
|
|
31
40
|
default: '',
|
|
32
41
|
},
|
|
42
|
+
/**
|
|
43
|
+
* Aria label for the right icon button
|
|
44
|
+
*/
|
|
33
45
|
iconRightAriaLabel: {
|
|
34
46
|
type: String,
|
|
35
47
|
required: false,
|
|
36
48
|
default: '',
|
|
37
49
|
},
|
|
50
|
+
/**
|
|
51
|
+
* Name of the icon to display on the right side
|
|
52
|
+
*/
|
|
38
53
|
iconRightName: {
|
|
39
54
|
type: String,
|
|
40
55
|
required: false,
|
|
41
56
|
default: '',
|
|
42
57
|
},
|
|
58
|
+
/**
|
|
59
|
+
* Whether the dropdown item is checked
|
|
60
|
+
*/
|
|
43
61
|
isChecked: {
|
|
44
62
|
type: Boolean,
|
|
45
63
|
required: false,
|
|
46
64
|
default: false,
|
|
47
65
|
},
|
|
66
|
+
/**
|
|
67
|
+
* Whether to show a check icon for this item
|
|
68
|
+
*/
|
|
48
69
|
isCheckItem: {
|
|
49
70
|
type: Boolean,
|
|
50
71
|
required: false,
|
|
51
72
|
default: false,
|
|
52
73
|
},
|
|
74
|
+
/**
|
|
75
|
+
* Whether to center the check icon vertically
|
|
76
|
+
*/
|
|
53
77
|
isCheckCentered: {
|
|
54
78
|
type: Boolean,
|
|
55
79
|
required: false,
|
|
56
80
|
default: false,
|
|
57
81
|
},
|
|
82
|
+
/**
|
|
83
|
+
* Secondary text to display below the main content
|
|
84
|
+
*/
|
|
58
85
|
secondaryText: {
|
|
59
86
|
type: String,
|
|
60
87
|
required: false,
|
|
61
88
|
default: '',
|
|
62
89
|
},
|
|
90
|
+
/**
|
|
91
|
+
* ARIA role for the dropdown item
|
|
92
|
+
*/
|
|
63
93
|
role: {
|
|
64
94
|
type: String,
|
|
65
95
|
required: false,
|
|
@@ -93,6 +123,10 @@ export default {
|
|
|
93
123
|
},
|
|
94
124
|
methods: {
|
|
95
125
|
handleClickIconRight() {
|
|
126
|
+
/**
|
|
127
|
+
* Emitted when right icon is clicked.
|
|
128
|
+
* @event handleClickIconRight
|
|
129
|
+
*/
|
|
96
130
|
this.$emit('click-icon-right');
|
|
97
131
|
},
|
|
98
132
|
},
|
|
@@ -115,6 +149,7 @@ export default {
|
|
|
115
149
|
<gl-icon v-if="iconName" :name="iconName" :class="['gl-dropdown-item-icon', iconColorCss]" />
|
|
116
150
|
<gl-avatar v-if="avatarUrl" :size="32" :src="avatarUrl" />
|
|
117
151
|
<div class="gl-dropdown-item-text-wrapper">
|
|
152
|
+
<!-- @slot Main content of the dropdown item. -->
|
|
118
153
|
<p class="gl-dropdown-item-text-primary"><slot></slot></p>
|
|
119
154
|
<p v-if="secondaryText" class="gl-dropdown-item-text-secondary">{{ secondaryText }}</p>
|
|
120
155
|
</div>
|
|
@@ -31,11 +31,17 @@ export default {
|
|
|
31
31
|
default: () => [{ value: '', name: '' }],
|
|
32
32
|
validator: (options) => options.every((opt) => Object.keys(opt).includes('name', 'value')),
|
|
33
33
|
},
|
|
34
|
+
/**
|
|
35
|
+
* Accessible label for the input field. Used for the aria-label attribute.
|
|
36
|
+
*/
|
|
34
37
|
label: {
|
|
35
38
|
type: String,
|
|
36
39
|
required: false,
|
|
37
40
|
default: undefined,
|
|
38
41
|
},
|
|
42
|
+
/**
|
|
43
|
+
* Additional CSS class(es) to apply to the input element.
|
|
44
|
+
*/
|
|
39
45
|
inputClass: {
|
|
40
46
|
type: [String, Array, Object],
|
|
41
47
|
required: false,
|
|
@@ -127,7 +127,7 @@ export default {
|
|
|
127
127
|
<!-- @slot Used to customize the appearance of the "Prev" button -->
|
|
128
128
|
<slot name="previous-button-content">
|
|
129
129
|
<div class="gl-align-center gl-flex">
|
|
130
|
-
<gl-icon name="chevron-left" />
|
|
130
|
+
<gl-icon name="chevron-lg-left" class="gl-mr-2" />
|
|
131
131
|
{{ prevText }}
|
|
132
132
|
</div>
|
|
133
133
|
</slot>
|
|
@@ -143,7 +143,7 @@ export default {
|
|
|
143
143
|
<slot name="next-button-content">
|
|
144
144
|
<div class="gl-align-center gl-flex">
|
|
145
145
|
{{ nextText }}
|
|
146
|
-
<gl-icon name="chevron-right" />
|
|
146
|
+
<gl-icon name="chevron-lg-right" class="gl-ml-2" />
|
|
147
147
|
</div>
|
|
148
148
|
</slot>
|
|
149
149
|
</gl-button>
|
|
@@ -16,41 +16,65 @@ export default {
|
|
|
16
16
|
GlTooltip,
|
|
17
17
|
},
|
|
18
18
|
props: {
|
|
19
|
+
/**
|
|
20
|
+
* Background color of the label in hex, rgb, or rgba format
|
|
21
|
+
*/
|
|
19
22
|
backgroundColor: {
|
|
20
23
|
type: String,
|
|
21
24
|
required: true,
|
|
22
25
|
validator: (value) => /^(#|rgb|rgba)/.test(value),
|
|
23
26
|
},
|
|
27
|
+
/**
|
|
28
|
+
* Title text of the label
|
|
29
|
+
*/
|
|
24
30
|
title: {
|
|
25
31
|
type: String,
|
|
26
32
|
required: true,
|
|
27
33
|
default: '',
|
|
28
34
|
},
|
|
35
|
+
/**
|
|
36
|
+
* Description text shown in tooltip
|
|
37
|
+
*/
|
|
29
38
|
description: {
|
|
30
39
|
type: String,
|
|
31
40
|
required: false,
|
|
32
41
|
default: '',
|
|
33
42
|
},
|
|
43
|
+
/**
|
|
44
|
+
* Placement of the tooltip
|
|
45
|
+
*/
|
|
34
46
|
tooltipPlacement: {
|
|
35
47
|
type: String,
|
|
36
48
|
required: false,
|
|
37
49
|
default: 'top',
|
|
38
50
|
},
|
|
51
|
+
/**
|
|
52
|
+
* Target URL for the label link
|
|
53
|
+
*/
|
|
39
54
|
target: {
|
|
40
55
|
type: String,
|
|
41
56
|
required: false,
|
|
42
57
|
default: '',
|
|
43
58
|
},
|
|
59
|
+
/**
|
|
60
|
+
* Whether the label is scoped (uses :: separator)
|
|
61
|
+
*/
|
|
44
62
|
scoped: {
|
|
45
63
|
type: Boolean,
|
|
46
64
|
required: false,
|
|
47
65
|
default: false,
|
|
48
66
|
},
|
|
67
|
+
/**
|
|
68
|
+
* Whether to show the close button
|
|
69
|
+
*/
|
|
49
70
|
showCloseButton: {
|
|
50
71
|
type: Boolean,
|
|
51
72
|
required: false,
|
|
52
73
|
default: false,
|
|
53
74
|
},
|
|
75
|
+
/**
|
|
76
|
+
* Whether the label is disabled
|
|
77
|
+
*/
|
|
54
78
|
disabled: {
|
|
55
79
|
type: Boolean,
|
|
56
80
|
required: false,
|
|
@@ -98,19 +122,15 @@ export default {
|
|
|
98
122
|
methods: {
|
|
99
123
|
onClick(e) {
|
|
100
124
|
/**
|
|
101
|
-
* Emitted when label is clicked
|
|
102
|
-
*
|
|
125
|
+
* Emitted when the label is clicked.
|
|
103
126
|
* @event click
|
|
104
|
-
* @type {object}
|
|
105
127
|
*/
|
|
106
128
|
this.$emit('click', e);
|
|
107
129
|
},
|
|
108
130
|
onClose(e) {
|
|
109
131
|
/**
|
|
110
|
-
* Emitted when
|
|
111
|
-
*
|
|
132
|
+
* Emitted when the close button is clicked.
|
|
112
133
|
* @event close
|
|
113
|
-
* @type {object}
|
|
114
134
|
*/
|
|
115
135
|
this.$emit('close', e);
|
|
116
136
|
},
|
|
@@ -81,14 +81,6 @@ export default {
|
|
|
81
81
|
required: false,
|
|
82
82
|
default: null,
|
|
83
83
|
},
|
|
84
|
-
/**
|
|
85
|
-
* Text for the previous button (overridden by "previous" slot)
|
|
86
|
-
*/
|
|
87
|
-
prevText: {
|
|
88
|
-
type: String,
|
|
89
|
-
required: false,
|
|
90
|
-
default: translate('GlPagination.prevText', 'Previous'),
|
|
91
|
-
},
|
|
92
84
|
/**
|
|
93
85
|
* When using the compact pagination, use this prop to pass the next page number
|
|
94
86
|
*/
|
|
@@ -97,14 +89,6 @@ export default {
|
|
|
97
89
|
required: false,
|
|
98
90
|
default: null,
|
|
99
91
|
},
|
|
100
|
-
/**
|
|
101
|
-
* Text for the next button (overridden by "next" slot)
|
|
102
|
-
*/
|
|
103
|
-
nextText: {
|
|
104
|
-
type: String,
|
|
105
|
-
required: false,
|
|
106
|
-
default: translate('GlPagination.nextText', 'Next'),
|
|
107
|
-
},
|
|
108
92
|
/**
|
|
109
93
|
* Text for the ellipsis (overridden by "ellipsis-left" and "ellipsis-right" slots)
|
|
110
94
|
*/
|
|
@@ -412,14 +396,13 @@ export default {
|
|
|
412
396
|
@click="!prevPageIsDisabled ? handlePrevious($event, value - 1) : null"
|
|
413
397
|
>
|
|
414
398
|
<!--
|
|
415
|
-
@slot Content for the "previous" button. Overrides the
|
|
399
|
+
@slot Content for the "previous" button. Overrides the default icon.
|
|
416
400
|
@binding {boolean} active
|
|
417
401
|
@binding {boolean} disabled
|
|
418
402
|
@binding {number} number
|
|
419
403
|
-->
|
|
420
404
|
<slot name="previous" v-bind="{ page: value - 1, disabled: prevPageIsDisabled }">
|
|
421
|
-
<gl-icon name="chevron-left" />
|
|
422
|
-
<span class="gl-hidden @sm:gl-block">{{ prevText }}</span>
|
|
405
|
+
<gl-icon name="chevron-lg-left" />
|
|
423
406
|
</slot>
|
|
424
407
|
</component>
|
|
425
408
|
</li>
|
|
@@ -477,14 +460,13 @@ export default {
|
|
|
477
460
|
@click="!nextPageIsDisabled ? handleNext($event, value + 1) : null"
|
|
478
461
|
>
|
|
479
462
|
<!--
|
|
480
|
-
@slot Content for the "next" button. Overrides the
|
|
463
|
+
@slot Content for the "next" button. Overrides the default icon.
|
|
481
464
|
@binding {boolean} active
|
|
482
465
|
@binding {boolean} disabled
|
|
483
466
|
@binding {number} number
|
|
484
467
|
-->
|
|
485
468
|
<slot name="next" v-bind="{ page: value + 1, disabled: nextPageIsDisabled }">
|
|
486
|
-
<
|
|
487
|
-
<gl-icon name="chevron-right" />
|
|
469
|
+
<gl-icon name="chevron-lg-right" />
|
|
488
470
|
</slot>
|
|
489
471
|
</component>
|
|
490
472
|
</li>
|
|
@@ -16,6 +16,9 @@ export default {
|
|
|
16
16
|
mixins: [tooltipMixin(popoverRefName)],
|
|
17
17
|
inheritAttrs: false,
|
|
18
18
|
props: {
|
|
19
|
+
/**
|
|
20
|
+
* Additional CSS class(es) to apply to the popover.
|
|
21
|
+
*/
|
|
19
22
|
cssClasses: {
|
|
20
23
|
type: [Array, String, Object],
|
|
21
24
|
required: false,
|
|
@@ -31,21 +34,33 @@ export default {
|
|
|
31
34
|
required: false,
|
|
32
35
|
default: 'hover focus',
|
|
33
36
|
},
|
|
37
|
+
/**
|
|
38
|
+
* Title text to display in the popover header.
|
|
39
|
+
*/
|
|
34
40
|
title: {
|
|
35
41
|
type: String,
|
|
36
42
|
required: false,
|
|
37
43
|
default: '',
|
|
38
44
|
},
|
|
45
|
+
/**
|
|
46
|
+
* When true, displays a close button in the popover header.
|
|
47
|
+
*/
|
|
39
48
|
showCloseButton: {
|
|
40
49
|
type: Boolean,
|
|
41
50
|
required: false,
|
|
42
51
|
default: false,
|
|
43
52
|
},
|
|
53
|
+
/**
|
|
54
|
+
* Placement of the popover relative to the target element.
|
|
55
|
+
*/
|
|
44
56
|
placement: {
|
|
45
57
|
type: String,
|
|
46
58
|
required: false,
|
|
47
59
|
default: popoverPlacements.top,
|
|
48
60
|
},
|
|
61
|
+
/**
|
|
62
|
+
* Padding (in pixels) between the popover and the viewport boundary.
|
|
63
|
+
*/
|
|
49
64
|
boundaryPadding: {
|
|
50
65
|
type: [Number, String],
|
|
51
66
|
required: false,
|
|
@@ -113,6 +128,7 @@ export default {
|
|
|
113
128
|
v-on="$listeners"
|
|
114
129
|
>
|
|
115
130
|
<template v-if="shouldShowTitle" #title>
|
|
131
|
+
<!-- @slot Custom content for the popover title -->
|
|
116
132
|
<slot name="title">
|
|
117
133
|
{{ title }}
|
|
118
134
|
</slot>
|
|
@@ -124,6 +140,9 @@ export default {
|
|
|
124
140
|
/>
|
|
125
141
|
</div>
|
|
126
142
|
</template>
|
|
127
|
-
<template v-if="$scopedSlots.default" #default
|
|
143
|
+
<template v-if="$scopedSlots.default" #default>
|
|
144
|
+
<!-- @slot Main content of the popover body-->
|
|
145
|
+
<slot></slot>
|
|
146
|
+
</template>
|
|
128
147
|
</b-popover>
|
|
129
148
|
</template>
|
|
@@ -13,27 +13,42 @@ const backgroundClasses = {
|
|
|
13
13
|
export default {
|
|
14
14
|
name: 'GlProgressBar',
|
|
15
15
|
props: {
|
|
16
|
+
/**
|
|
17
|
+
* Accessible label for the progress bar. Used for the aria-label attribute.
|
|
18
|
+
*/
|
|
16
19
|
ariaLabel: {
|
|
17
20
|
type: String,
|
|
18
21
|
required: false,
|
|
19
22
|
default: translate('GlProgressBar.ariaLabel', 'Progress bar'),
|
|
20
23
|
},
|
|
24
|
+
/**
|
|
25
|
+
* Current progress value. Should be between 0 and the max value.
|
|
26
|
+
*/
|
|
21
27
|
value: {
|
|
22
28
|
type: [Number, String],
|
|
23
29
|
required: false,
|
|
24
30
|
default: 0,
|
|
25
31
|
},
|
|
32
|
+
/**
|
|
33
|
+
* Visual variant of the progress bar.
|
|
34
|
+
*/
|
|
26
35
|
variant: {
|
|
27
36
|
type: String,
|
|
28
37
|
required: false,
|
|
29
38
|
default: 'primary',
|
|
30
39
|
validator: (value) => Object.keys(progressBarVariantOptions).includes(value),
|
|
31
40
|
},
|
|
41
|
+
/**
|
|
42
|
+
* Maximum value for the progress bar. The value prop is calculated as a percentage of this.
|
|
43
|
+
*/
|
|
32
44
|
max: {
|
|
33
45
|
type: [Number, String],
|
|
34
46
|
required: false,
|
|
35
47
|
default: 100,
|
|
36
48
|
},
|
|
49
|
+
/**
|
|
50
|
+
* Custom height for the progress bar (e.g., '8px', '1rem').
|
|
51
|
+
*/
|
|
37
52
|
height: {
|
|
38
53
|
type: String,
|
|
39
54
|
required: false,
|