@gitlab/ui 138.6.0 → 138.6.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/breadcrumb/breadcrumb.js +3 -1
- package/dist/components/base/button/button.js +9 -2
- package/dist/components/charts/legend/legend.js +3 -3
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/package.json +2 -2
- package/src/components/base/breadcrumb/breadcrumb.vue +2 -1
- package/src/components/base/button/button.vue +9 -2
- package/src/components/charts/legend/legend.scss +21 -0
- package/src/components/charts/legend/legend.vue +9 -7
- package/dist/components/mixins/safe_link_mixin.js +0 -30
- package/src/components/mixins/safe_link_mixin.js +0 -28
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitlab/ui",
|
|
3
|
-
"version": "138.6.
|
|
3
|
+
"version": "138.6.1",
|
|
4
4
|
"description": "GitLab UI Components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -151,7 +151,7 @@
|
|
|
151
151
|
"pikaday": "^1.8.0",
|
|
152
152
|
"playwright": "^1.64.0",
|
|
153
153
|
"playwright-core": "^1.64.0",
|
|
154
|
-
"postcss": "8.5.
|
|
154
|
+
"postcss": "8.5.30",
|
|
155
155
|
"postcss-loader": "8.2.1",
|
|
156
156
|
"postcss-scss": "4.0.9",
|
|
157
157
|
"react": "18.3.1",
|
|
@@ -185,7 +185,8 @@ export default {
|
|
|
185
185
|
|
|
186
186
|
this.totalBreadcrumbsWidth = 0;
|
|
187
187
|
|
|
188
|
-
|
|
188
|
+
// The component can unmount, or drop the dropdown, while waiting for the DOM update.
|
|
189
|
+
if (!this.$refs.breadcrumbs || !this.$refs.dropdown) return;
|
|
189
190
|
|
|
190
191
|
this.$refs.breadcrumbs.forEach((b, index) => {
|
|
191
192
|
const width = b.$el.clientWidth;
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
} from '../../../utils/constants';
|
|
9
9
|
import { logWarning, stopEvent } from '../../../utils/utils';
|
|
10
10
|
import { isSlotEmpty } from '../../../utils/is_slot_empty';
|
|
11
|
-
import {
|
|
11
|
+
import { SafeLinkDirective } from '../../../directives/safe_link/safe_link';
|
|
12
12
|
import { glButtonConfig } from '../../../config';
|
|
13
13
|
import GlIcon from '../icon/icon.vue';
|
|
14
14
|
import GlLoadingIcon from '../loading_icon/loading_icon.vue';
|
|
@@ -20,7 +20,9 @@ export default {
|
|
|
20
20
|
GlIcon,
|
|
21
21
|
GlLoadingIcon,
|
|
22
22
|
},
|
|
23
|
-
|
|
23
|
+
directives: {
|
|
24
|
+
SafeLink: SafeLinkDirective,
|
|
25
|
+
},
|
|
24
26
|
props: {
|
|
25
27
|
/**
|
|
26
28
|
* Set the category of the button.
|
|
@@ -239,6 +241,11 @@ export default {
|
|
|
239
241
|
},
|
|
240
242
|
},
|
|
241
243
|
computed: {
|
|
244
|
+
safeLinkConfig() {
|
|
245
|
+
return {
|
|
246
|
+
skipSanitization: this.isUnsafeLink,
|
|
247
|
+
};
|
|
248
|
+
},
|
|
242
249
|
hasIcon() {
|
|
243
250
|
return this.icon !== '';
|
|
244
251
|
},
|
|
@@ -6,6 +6,16 @@ $legend-body-h: $gl-spacing-scale-13 - $gl-spacing-scale-4;
|
|
|
6
6
|
position: relative;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
+
// series rows are native buttons, so reset the browser's default button styles
|
|
10
|
+
.gl-legend-inline-series,
|
|
11
|
+
.gl-legend-tabular-row {
|
|
12
|
+
font: inherit;
|
|
13
|
+
@apply gl-border-0;
|
|
14
|
+
@apply gl-bg-transparent;
|
|
15
|
+
@apply gl-p-0;
|
|
16
|
+
@apply gl-text-left;
|
|
17
|
+
}
|
|
18
|
+
|
|
9
19
|
.gl-chart-h-auto {
|
|
10
20
|
.gl-legend-inline {
|
|
11
21
|
// match the height of gl-legend-tabular (header + body)
|
|
@@ -43,11 +53,17 @@ $legend-body-h: $gl-spacing-scale-13 - $gl-spacing-scale-4;
|
|
|
43
53
|
@apply gl-items-center;
|
|
44
54
|
@apply gl-pr-5;
|
|
45
55
|
|
|
56
|
+
@apply gl-rounded-default;
|
|
57
|
+
|
|
46
58
|
&:hover {
|
|
47
59
|
@apply gl-cursor-pointer;
|
|
48
60
|
@apply gl-underline;
|
|
49
61
|
}
|
|
50
62
|
|
|
63
|
+
&:focus-visible {
|
|
64
|
+
@include gl-focus($inset: true);
|
|
65
|
+
}
|
|
66
|
+
|
|
51
67
|
.gl-legend-inline-series-label {
|
|
52
68
|
@apply gl-mr-3;
|
|
53
69
|
}
|
|
@@ -82,10 +98,15 @@ $legend-body-h: $gl-spacing-scale-13 - $gl-spacing-scale-4;
|
|
|
82
98
|
|
|
83
99
|
.gl-legend-tabular-row {
|
|
84
100
|
@apply gl-flex;
|
|
101
|
+
@apply gl-w-full;
|
|
85
102
|
|
|
86
103
|
&:nth-child(odd) {
|
|
87
104
|
@apply gl-bg-strong;
|
|
88
105
|
}
|
|
106
|
+
|
|
107
|
+
&:focus-visible {
|
|
108
|
+
@include gl-focus($inset: true);
|
|
109
|
+
}
|
|
89
110
|
}
|
|
90
111
|
|
|
91
112
|
.gl-legend-tabular-title-cell,
|
|
@@ -218,9 +218,10 @@ export default {
|
|
|
218
218
|
class="gl-legend-inline"
|
|
219
219
|
:class="{ 'gl-legend-b-fade': shouldApplyFadeClass }"
|
|
220
220
|
>
|
|
221
|
-
<
|
|
221
|
+
<button
|
|
222
222
|
v-for="(series, key) in seriesInfo"
|
|
223
223
|
:key="key"
|
|
224
|
+
type="button"
|
|
224
225
|
:class="{
|
|
225
226
|
'gl-text-subtle': disabledSeries[key],
|
|
226
227
|
'gl-text-strong': !disabledSeries[key],
|
|
@@ -230,8 +231,8 @@ export default {
|
|
|
230
231
|
}"
|
|
231
232
|
class="gl-legend-inline-series"
|
|
232
233
|
:style="fontStyle"
|
|
234
|
+
:aria-pressed="String(!disabledSeries[key])"
|
|
233
235
|
:aria-disabled="hasOneSeriesElement || isToggleDisabled(series.name, series.disabled)"
|
|
234
|
-
role="button"
|
|
235
236
|
@click="handleClick(series, key)"
|
|
236
237
|
@mouseenter="handleMouseEnter(series.name)"
|
|
237
238
|
@mouseleave="handleMouseLeave(series.name)"
|
|
@@ -251,7 +252,7 @@ export default {
|
|
|
251
252
|
{{ averageText }}: {{ seriesAverage(series.data) }} · {{ maxText }}:
|
|
252
253
|
{{ seriesMax(series.data) }}
|
|
253
254
|
</span>
|
|
254
|
-
</
|
|
255
|
+
</button>
|
|
255
256
|
</div>
|
|
256
257
|
</template>
|
|
257
258
|
|
|
@@ -264,9 +265,10 @@ export default {
|
|
|
264
265
|
<div class="gl-legend-tabular-header-cell">{{ currentText }}</div>
|
|
265
266
|
</header>
|
|
266
267
|
<section class="gl-legend-tabular-body">
|
|
267
|
-
<
|
|
268
|
+
<button
|
|
268
269
|
v-for="(series, key) in seriesInfo"
|
|
269
270
|
:key="key"
|
|
271
|
+
type="button"
|
|
270
272
|
:class="{
|
|
271
273
|
'gl-text-subtle': disabledSeries[key],
|
|
272
274
|
'gl-text-strong': !disabledSeries[key],
|
|
@@ -275,8 +277,8 @@ export default {
|
|
|
275
277
|
}"
|
|
276
278
|
class="gl-legend-tabular-row"
|
|
277
279
|
:style="fontStyle"
|
|
278
|
-
:aria-
|
|
279
|
-
|
|
280
|
+
:aria-pressed="String(!disabledSeries[key])"
|
|
281
|
+
:aria-disabled="hasOneSeriesElement || isToggleDisabled(series.name, series.disabled)"
|
|
280
282
|
@click="handleClick(series, key)"
|
|
281
283
|
@mouseenter="handleMouseEnter(series.name)"
|
|
282
284
|
@mouseleave="handleMouseLeave(series.name)"
|
|
@@ -303,7 +305,7 @@ export default {
|
|
|
303
305
|
<div class="gl-legend-tabular-details-cell">-</div>
|
|
304
306
|
<div class="gl-legend-tabular-details-cell">-</div>
|
|
305
307
|
</template>
|
|
306
|
-
</
|
|
308
|
+
</button>
|
|
307
309
|
</section>
|
|
308
310
|
</div>
|
|
309
311
|
</template>
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { SafeLinkDirective } from '../../directives/safe_link/safe_link';
|
|
2
|
-
|
|
3
|
-
const SafeLinkMixin = {
|
|
4
|
-
directives: {
|
|
5
|
-
SafeLink: SafeLinkDirective
|
|
6
|
-
},
|
|
7
|
-
props: {
|
|
8
|
-
isUnsafeLink: {
|
|
9
|
-
type: Boolean,
|
|
10
|
-
required: false,
|
|
11
|
-
default: false
|
|
12
|
-
},
|
|
13
|
-
// This prevents bootstrap-vue from setting target="_self"
|
|
14
|
-
// when target attribute is not present
|
|
15
|
-
target: {
|
|
16
|
-
type: String,
|
|
17
|
-
required: false,
|
|
18
|
-
default: null
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
computed: {
|
|
22
|
-
safeLinkConfig() {
|
|
23
|
-
return {
|
|
24
|
-
skipSanitization: this.isUnsafeLink
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
export { SafeLinkMixin };
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { SafeLinkDirective } from '../../directives/safe_link/safe_link';
|
|
2
|
-
|
|
3
|
-
export const SafeLinkMixin = {
|
|
4
|
-
directives: {
|
|
5
|
-
SafeLink: SafeLinkDirective,
|
|
6
|
-
},
|
|
7
|
-
props: {
|
|
8
|
-
isUnsafeLink: {
|
|
9
|
-
type: Boolean,
|
|
10
|
-
required: false,
|
|
11
|
-
default: false,
|
|
12
|
-
},
|
|
13
|
-
// This prevents bootstrap-vue from setting target="_self"
|
|
14
|
-
// when target attribute is not present
|
|
15
|
-
target: {
|
|
16
|
-
type: String,
|
|
17
|
-
required: false,
|
|
18
|
-
default: null,
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
computed: {
|
|
22
|
-
safeLinkConfig() {
|
|
23
|
-
return {
|
|
24
|
-
skipSanitization: this.isUnsafeLink,
|
|
25
|
-
};
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
};
|