@gitlab/ui 137.1.0 → 137.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/dist/components/base/link/link.js +5 -1
- package/dist/components/base/sorting/sorting.js +3 -2
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/package.json +6 -6
- package/src/components/base/link/link.scss +1 -1
- package/src/components/base/link/link.vue +9 -0
- package/src/components/base/sorting/sorting.vue +3 -1
- package/translations.js +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitlab/ui",
|
|
3
|
-
"version": "137.1.
|
|
3
|
+
"version": "137.1.2",
|
|
4
4
|
"description": "GitLab UI Components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -147,10 +147,10 @@
|
|
|
147
147
|
"gitlab-api-async-iterator": "^1.3.1",
|
|
148
148
|
"glob": "11.1.0",
|
|
149
149
|
"identity-obj-proxy": "^3.0.0",
|
|
150
|
-
"jest": "30.5.
|
|
151
|
-
"jest-circus": "30.5.
|
|
152
|
-
"jest-environment-jsdom": "30.5.
|
|
153
|
-
"jest-environment-node": "30.5.
|
|
150
|
+
"jest": "30.5.1",
|
|
151
|
+
"jest-circus": "30.5.1",
|
|
152
|
+
"jest-environment-jsdom": "30.5.1",
|
|
153
|
+
"jest-environment-node": "30.5.1",
|
|
154
154
|
"jest-image-snapshot": "^6.5.2",
|
|
155
155
|
"merge-cobertura": "^1.0.9",
|
|
156
156
|
"mockdate": "^3.0.5",
|
|
@@ -169,7 +169,7 @@
|
|
|
169
169
|
"rollup-plugin-string": "^3.0.0",
|
|
170
170
|
"rollup-plugin-svg": "^2.0.0",
|
|
171
171
|
"rollup-plugin-vue": "^5.1.9",
|
|
172
|
-
"sass": "^1.
|
|
172
|
+
"sass": "^1.104.0",
|
|
173
173
|
"sass-loader": "^10.5.2",
|
|
174
174
|
"sass-true": "^9",
|
|
175
175
|
"start-server-and-test": "^2.1.5",
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import { isFunction, isString, isObject, toString, isBoolean, concat } from 'lodash-es';
|
|
3
3
|
import { SafeLinkDirective, isExternalURL } from '../../../directives/safe_link/safe_link';
|
|
4
|
+
import { translate } from '../../../utils/i18n';
|
|
4
5
|
import { stopEvent } from '../../../utils/utils';
|
|
5
6
|
import { buildQueryString } from '../../../utils/url_utils';
|
|
6
7
|
import { isVue3, safeVueInstance } from '../../../utils/vue_utils';
|
|
@@ -161,6 +162,11 @@ export default {
|
|
|
161
162
|
isVue3RouterLink() {
|
|
162
163
|
return this.tag === VUE_ROUTER_LINK_TAG && isVue3(this);
|
|
163
164
|
},
|
|
165
|
+
externalLinkLabel() {
|
|
166
|
+
return this.shouldShowExternalIcon
|
|
167
|
+
? translate('GlLink.externalLink', '(external link)')
|
|
168
|
+
: undefined;
|
|
169
|
+
},
|
|
164
170
|
shouldShowExternalIcon() {
|
|
165
171
|
const allowedVariants = [linkVariantInline, linkVariantMeta, null]; // null represents default/UI variant
|
|
166
172
|
return (
|
|
@@ -311,6 +317,7 @@ export default {
|
|
|
311
317
|
:class="[computedClass, { [activeClass]: isActive, [exactActiveClass]: isExactActive }]"
|
|
312
318
|
:href="routerLinkHref"
|
|
313
319
|
v-bind="$attrs"
|
|
320
|
+
:data-alt="externalLinkLabel"
|
|
314
321
|
v-on="computedListeners"
|
|
315
322
|
@click="onClick($event, navigate)"
|
|
316
323
|
>
|
|
@@ -323,6 +330,7 @@ export default {
|
|
|
323
330
|
v-safe-link:[safeLinkConfig]
|
|
324
331
|
v-bind="computedProps"
|
|
325
332
|
:class="computedClass"
|
|
333
|
+
:data-alt="externalLinkLabel"
|
|
326
334
|
v-on="computedListeners"
|
|
327
335
|
@click.native="onClick"
|
|
328
336
|
>
|
|
@@ -334,6 +342,7 @@ export default {
|
|
|
334
342
|
v-safe-link:[safeLinkConfig]
|
|
335
343
|
v-bind="computedProps"
|
|
336
344
|
:class="computedClass"
|
|
345
|
+
:data-alt="externalLinkLabel"
|
|
337
346
|
v-on="computedListeners"
|
|
338
347
|
@click="onClick"
|
|
339
348
|
>
|
|
@@ -102,6 +102,7 @@ export default {
|
|
|
102
102
|
data() {
|
|
103
103
|
return {
|
|
104
104
|
sortingListboxId: uniqueId('sorting-listbox-'),
|
|
105
|
+
toggleId: uniqueId('sorting-toggle-'),
|
|
105
106
|
};
|
|
106
107
|
},
|
|
107
108
|
computed: {
|
|
@@ -181,7 +182,8 @@ export default {
|
|
|
181
182
|
:class="dropdownClass"
|
|
182
183
|
placement="bottom-end"
|
|
183
184
|
:block="block"
|
|
184
|
-
:toggle-
|
|
185
|
+
:toggle-id="toggleId"
|
|
186
|
+
:toggle-aria-labelled-by="`${sortingListboxId} ${toggleId}`"
|
|
185
187
|
@select="onSortByChanged"
|
|
186
188
|
/>
|
|
187
189
|
<span :id="sortingListboxId" class="gl-sr-only">{{ sortingListboxLabel }}</span>
|
package/translations.js
CHANGED
|
@@ -27,6 +27,7 @@ export default {
|
|
|
27
27
|
'GlKeysetPagination.nextText': 'Next',
|
|
28
28
|
'GlKeysetPagination.prevText': 'Previous',
|
|
29
29
|
'GlLabel.removeButtonAriaLabel': 'Remove label - %{label}',
|
|
30
|
+
'GlLink.externalLink': '(external link)',
|
|
30
31
|
'GlModal.closeButtonTitle': 'Close',
|
|
31
32
|
'GlMultiStepFormTemplate.stepX': 'Step %{currentStep}',
|
|
32
33
|
'GlMultiStepFormTemplate.stepXofY': 'Step %{currentStep} of %{stepsTotal}',
|