@gitlab/ui 111.3.0 → 111.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/CHANGELOG.md +7 -0
- package/dist/components/base/badge/badge.js +6 -5
- package/dist/components/base/link/link.js +5 -2
- package/dist/components/base/token_selector/token_selector.js +1 -1
- package/dist/utils/constants.js +11 -5
- package/package.json +2 -2
- package/src/components/base/badge/badge.vue +9 -5
- package/src/components/base/link/link.vue +11 -2
- package/src/components/base/token_selector/token_selector.vue +0 -1
- package/src/utils/constants.js +11 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [111.3.1](https://gitlab.com/gitlab-org/gitlab-ui/compare/v111.3.0...v111.3.1) (2025-03-18)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **GlTokenSelector:** Remove text intput `aria-label` attr ([85d1e7e](https://gitlab.com/gitlab-org/gitlab-ui/commit/85d1e7e4f5ed0393d498096962c671a05669122d))
|
|
7
|
+
|
|
1
8
|
# [111.3.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v111.2.0...v111.3.0) (2025-03-17)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { badgeVariantOptions, badgeIconSizeOptions } from '../../../utils/constants';
|
|
1
|
+
import GlLink from '../link/link';
|
|
2
|
+
import { badgeVariantOptions, badgeIconSizeOptions, linkVariantUnstyled } from '../../../utils/constants';
|
|
3
3
|
import GlIcon from '../icon/icon';
|
|
4
4
|
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
5
5
|
|
|
@@ -16,7 +16,7 @@ const variantClass = {
|
|
|
16
16
|
var script = {
|
|
17
17
|
name: 'GlBadge',
|
|
18
18
|
components: {
|
|
19
|
-
|
|
19
|
+
GlLink,
|
|
20
20
|
GlIcon
|
|
21
21
|
},
|
|
22
22
|
props: {
|
|
@@ -129,7 +129,7 @@ var script = {
|
|
|
129
129
|
return Boolean(this.href);
|
|
130
130
|
},
|
|
131
131
|
computedTag() {
|
|
132
|
-
return this.isLink ?
|
|
132
|
+
return this.isLink ? GlLink : this.tag;
|
|
133
133
|
},
|
|
134
134
|
computedProps() {
|
|
135
135
|
if (!this.isLink) return {};
|
|
@@ -145,7 +145,8 @@ var script = {
|
|
|
145
145
|
rel,
|
|
146
146
|
target,
|
|
147
147
|
active,
|
|
148
|
-
disabled
|
|
148
|
+
disabled,
|
|
149
|
+
variant: linkVariantUnstyled
|
|
149
150
|
};
|
|
150
151
|
},
|
|
151
152
|
classes() {
|
|
@@ -10,7 +10,7 @@ import { isEvent } from '../../../vendor/bootstrap-vue/src/utils/inspect';
|
|
|
10
10
|
import { stringifyQueryObj } from '../../../vendor/bootstrap-vue/src/utils/router';
|
|
11
11
|
import { safeVueInstance } from '../../../vendor/bootstrap-vue/src/utils/safe-vue-instance';
|
|
12
12
|
import { attemptFocus, attemptBlur } from '../../../vendor/bootstrap-vue/src/utils/dom';
|
|
13
|
-
import { linkVariantOptions, isVue3 } from '../../../utils/constants';
|
|
13
|
+
import { linkVariantOptions, isVue3, linkVariantInline, linkVariantUnstyled } from '../../../utils/constants';
|
|
14
14
|
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
15
15
|
|
|
16
16
|
//
|
|
@@ -161,7 +161,7 @@ var script = {
|
|
|
161
161
|
return this.tag === VUE_ROUTER_LINK_TAG && isVue3;
|
|
162
162
|
},
|
|
163
163
|
isInlineAndHasExternalIcon() {
|
|
164
|
-
return this.showExternalIcon && this.variant ===
|
|
164
|
+
return this.showExternalIcon && this.variant === linkVariantInline && this.href && isExternalURL(this.target, this.href);
|
|
165
165
|
},
|
|
166
166
|
computedHref() {
|
|
167
167
|
const fallback = '#';
|
|
@@ -219,6 +219,9 @@ var script = {
|
|
|
219
219
|
return listenersWithoutClick;
|
|
220
220
|
},
|
|
221
221
|
computedClass() {
|
|
222
|
+
if (this.variant === linkVariantUnstyled) {
|
|
223
|
+
return [];
|
|
224
|
+
}
|
|
222
225
|
return ['gl-link', linkVariantOptions[this.variant], {
|
|
223
226
|
disabled: this.disabled,
|
|
224
227
|
active: this.active,
|
|
@@ -380,7 +380,7 @@ var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=
|
|
|
380
380
|
_vm.containerClass,
|
|
381
381
|
_vm.stateClass ],on:{"click":_vm.handleContainerClick}},[(_vm.showEmptyPlaceholder)?_vm._t("empty-placeholder"):_vm._e(),_vm._v(" "),_c('gl-token-container',{attrs:{"tokens":_vm.selectedTokens,"state":_vm.state,"register-focus-on-token":_vm.registerFocusOnToken,"view-only":_vm.viewOnly,"show-clear-all-button":_vm.showClearAllButton},on:{"token-remove":_vm.removeToken,"cancel-focus":_vm.cancelTokenFocus,"clear-all":_vm.clearAll},scopedSlots:_vm._u([{key:"token-content",fn:function(ref){
|
|
382
382
|
var token = ref.token;
|
|
383
|
-
return [_vm._t("token-content",null,{"token":token})]}},{key:"text-input",fn:function(){return [_c('input',_vm._b({ref:"textInput",staticClass:"gl-token-selector-input gl-h-auto gl-w-4/10 gl-grow gl-border-none gl-bg-transparent gl-px-1 gl-font-regular gl-text-base gl-leading-normal gl-text-default gl-outline-none",attrs:{"type":"text","
|
|
383
|
+
return [_vm._t("token-content",null,{"token":token})]}},{key:"text-input",fn:function(){return [_c('input',_vm._b({ref:"textInput",staticClass:"gl-token-selector-input gl-h-auto gl-w-4/10 gl-grow gl-border-none gl-bg-transparent gl-px-1 gl-font-regular gl-text-base gl-leading-normal gl-text-default gl-outline-none",attrs:{"type":"text","autocomplete":_vm.autocomplete,"aria-labelledby":_vm.ariaLabelledby,"placeholder":_vm.placeholder,"disabled":_vm.viewOnly},domProps:{"value":_vm.inputText},on:{"input":function($event){_vm.inputText = $event.target.value;},"focus":_vm.handleFocus,"blur":_vm.handleBlur,"keydown":[function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"enter",13,$event.key,"Enter")){ return null; }return _vm.handleEnter.apply(null, arguments)},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"esc",27,$event.key,["Esc","Escape"])){ return null; }return _vm.handleEscape.apply(null, arguments)},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"delete",[8,46],$event.key,["Backspace","Delete","Del"])){ return null; }return _vm.handleBackspace.apply(null, arguments)},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"up",38,$event.key,["Up","ArrowUp"])){ return null; }$event.preventDefault();return _vm.dropdownEventHandlers.handleUpArrow.apply(null, arguments)},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"down",40,$event.key,["Down","ArrowDown"])){ return null; }$event.preventDefault();return _vm.dropdownEventHandlers.handleDownArrow.apply(null, arguments)},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"home",undefined,$event.key,undefined)){ return null; }return _vm.dropdownEventHandlers.handleHomeKey.apply(null, arguments)},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"end",undefined,$event.key,undefined)){ return null; }return _vm.dropdownEventHandlers.handleEndKey.apply(null, arguments)},function($event){$event.stopPropagation();return _vm.$emit('keydown', $event)}],"click":_vm.handleInputClick}},'input',_vm.textInputAttrs,false))]},proxy:true}],null,true)})],2),_vm._v(" "),_c('gl-token-selector-dropdown',{attrs:{"menu-class":_vm.menuClass,"show":_vm.dropdownIsOpen,"loading":_vm.loading,"dropdown-items":_vm.filteredDropdownItems,"selected-tokens":_vm.selectedTokens,"input-text":_vm.inputText,"user-defined-token-can-be-added":_vm.userDefinedTokenCanBeAdded,"component-id":_vm.$options.componentId,"register-dropdown-event-handlers":_vm.registerDropdownEventHandlers,"register-reset-focused-dropdown-item":_vm.registerResetFocusedDropdownItem},on:{"dropdown-item-click":_vm.addToken,"show":_vm.openDropdown},scopedSlots:_vm._u([{key:"loading-content",fn:function(){return [_vm._t("loading-content")]},proxy:true},{key:"user-defined-token-content",fn:function(){return [_vm._t("user-defined-token-content",null,{"inputText":_vm.inputText})]},proxy:true},{key:"no-results-content",fn:function(){return [_vm._t("no-results-content")]},proxy:true},{key:"dropdown-item-content",fn:function(ref){
|
|
384
384
|
var dropdownItem = ref.dropdownItem;
|
|
385
385
|
return [_vm._t("dropdown-item-content",null,{"dropdownItem":dropdownItem})]}},{key:"dropdown-footer",fn:function(){return [_vm._t("dropdown-footer")]},proxy:true}],null,true),model:{value:(_vm.focusedDropdownItem),callback:function ($$v) {_vm.focusedDropdownItem=$$v;},expression:"focusedDropdownItem"}})],1)};
|
|
386
386
|
var __vue_staticRenderFns__ = [];
|
package/dist/utils/constants.js
CHANGED
|
@@ -172,11 +172,17 @@ const animatedIconVariantOptions = {
|
|
|
172
172
|
danger: 'gl-animated-icon-danger',
|
|
173
173
|
success: 'gl-animated-icon-success'
|
|
174
174
|
};
|
|
175
|
+
const linkVariantInline = 'inline';
|
|
176
|
+
const linkVariantMeta = 'meta';
|
|
177
|
+
const linkVariantMention = 'mention';
|
|
178
|
+
const linkVariantMentionCurrent = 'mentionCurrent';
|
|
179
|
+
const linkVariantUnstyled = 'unstyled';
|
|
175
180
|
const linkVariantOptions = {
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
181
|
+
[linkVariantInline]: 'gl-link-inline',
|
|
182
|
+
[linkVariantMeta]: 'gl-link-meta',
|
|
183
|
+
[linkVariantMention]: 'gl-link-mention',
|
|
184
|
+
[linkVariantMentionCurrent]: 'gl-link-mention-current',
|
|
185
|
+
[linkVariantUnstyled]: ''
|
|
180
186
|
};
|
|
181
187
|
const triggerVariantOptions = {
|
|
182
188
|
click: 'click',
|
|
@@ -319,4 +325,4 @@ const loadingIconVariants = {
|
|
|
319
325
|
};
|
|
320
326
|
const isVue3 = Boolean(Vue.Fragment);
|
|
321
327
|
|
|
322
|
-
export { COMMA, CONTRAST_LEVELS, HEX_REGEX, LEFT_MOUSE_BUTTON, alertVariantIconMap, alertVariantOptions, alignOptions, animatedIconVariantOptions, avatarShapeOptions, avatarSizeOptions, avatarsInlineSizeOptions, badgeForButtonOptions, badgeIconSizeOptions, badgeSizeOptions, badgeVariantOptions, bannerVariants, breadCrumbSizeOptions, buttonCategoryOptions, buttonSizeOptions, buttonVariantOptions, colorThemes, columnOptions, datepickerWidthOptionsMap, defaultDateFormat, drawerVariants, dropdownAllowedAutoPlacements, dropdownItemVariantOptions, dropdownPlacements, dropdownVariantOptions, focusableTags, formInputWidths, formStateOptions, iconSizeOptions, iconVariantOptions, isVue3, keyboard, labelColorOptions, linkVariantOptions, loadingIconSizes, loadingIconVariants, maxZIndex, modalButtonDefaults, modalSizeOptions, popoverPlacements, progressBarVariantOptions, resizeDebounceTime, tabsButtonDefaults, targetOptions, toggleLabelPosition, tokenVariants, tooltipActionEvents, tooltipDelay, tooltipPlacements, triggerVariantOptions, truncateOptions, variantCssColorMap, viewModeOptions };
|
|
328
|
+
export { COMMA, CONTRAST_LEVELS, HEX_REGEX, LEFT_MOUSE_BUTTON, alertVariantIconMap, alertVariantOptions, alignOptions, animatedIconVariantOptions, avatarShapeOptions, avatarSizeOptions, avatarsInlineSizeOptions, badgeForButtonOptions, badgeIconSizeOptions, badgeSizeOptions, badgeVariantOptions, bannerVariants, breadCrumbSizeOptions, buttonCategoryOptions, buttonSizeOptions, buttonVariantOptions, colorThemes, columnOptions, datepickerWidthOptionsMap, defaultDateFormat, drawerVariants, dropdownAllowedAutoPlacements, dropdownItemVariantOptions, dropdownPlacements, dropdownVariantOptions, focusableTags, formInputWidths, formStateOptions, iconSizeOptions, iconVariantOptions, isVue3, keyboard, labelColorOptions, linkVariantInline, linkVariantMention, linkVariantMentionCurrent, linkVariantMeta, linkVariantOptions, linkVariantUnstyled, loadingIconSizes, loadingIconVariants, maxZIndex, modalButtonDefaults, modalSizeOptions, popoverPlacements, progressBarVariantOptions, resizeDebounceTime, tabsButtonDefaults, targetOptions, toggleLabelPosition, tokenVariants, tooltipActionEvents, tooltipDelay, tooltipPlacements, triggerVariantOptions, truncateOptions, variantCssColorMap, viewModeOptions };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitlab/ui",
|
|
3
|
-
"version": "111.3.
|
|
3
|
+
"version": "111.3.1",
|
|
4
4
|
"description": "GitLab UI Components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -142,7 +142,7 @@
|
|
|
142
142
|
"axe-playwright": "^2.1.0",
|
|
143
143
|
"babel-jest": "29.0.1",
|
|
144
144
|
"babel-loader": "^8.0.5",
|
|
145
|
-
"cypress": "14.
|
|
145
|
+
"cypress": "14.2.0",
|
|
146
146
|
"cypress-real-events": "^1.11.0",
|
|
147
147
|
"dompurify": "^3.1.2",
|
|
148
148
|
"emoji-regex": "^10.0.0",
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
<!-- eslint-disable vue/multi-word-component-names -->
|
|
2
2
|
<script>
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
3
|
+
import GlLink from '../link/link.vue';
|
|
4
|
+
import {
|
|
5
|
+
badgeVariantOptions,
|
|
6
|
+
badgeIconSizeOptions,
|
|
7
|
+
linkVariantUnstyled,
|
|
8
|
+
} from '../../../utils/constants';
|
|
5
9
|
import GlIcon from '../icon/icon.vue';
|
|
6
10
|
|
|
7
11
|
const variantClass = {
|
|
@@ -17,7 +21,7 @@ const variantClass = {
|
|
|
17
21
|
export default {
|
|
18
22
|
name: 'GlBadge',
|
|
19
23
|
components: {
|
|
20
|
-
|
|
24
|
+
GlLink,
|
|
21
25
|
GlIcon,
|
|
22
26
|
},
|
|
23
27
|
props: {
|
|
@@ -131,13 +135,13 @@ export default {
|
|
|
131
135
|
return Boolean(this.href);
|
|
132
136
|
},
|
|
133
137
|
computedTag() {
|
|
134
|
-
return this.isLink ?
|
|
138
|
+
return this.isLink ? GlLink : this.tag;
|
|
135
139
|
},
|
|
136
140
|
computedProps() {
|
|
137
141
|
if (!this.isLink) return {};
|
|
138
142
|
|
|
139
143
|
const { href, rel, target, active, disabled } = this;
|
|
140
|
-
return { href, rel, target, active, disabled };
|
|
144
|
+
return { href, rel, target, active, disabled, variant: linkVariantUnstyled };
|
|
141
145
|
},
|
|
142
146
|
classes() {
|
|
143
147
|
return [
|
|
@@ -12,7 +12,12 @@ import { isEvent } from '../../../vendor/bootstrap-vue/src/utils/inspect';
|
|
|
12
12
|
import { stringifyQueryObj } from '../../../vendor/bootstrap-vue/src/utils/router';
|
|
13
13
|
import { safeVueInstance } from '../../../vendor/bootstrap-vue/src/utils/safe-vue-instance';
|
|
14
14
|
import { attemptFocus, attemptBlur } from '../../../vendor/bootstrap-vue/src/utils/dom';
|
|
15
|
-
import {
|
|
15
|
+
import {
|
|
16
|
+
linkVariantOptions,
|
|
17
|
+
linkVariantInline,
|
|
18
|
+
linkVariantUnstyled,
|
|
19
|
+
isVue3,
|
|
20
|
+
} from '../../../utils/constants';
|
|
16
21
|
|
|
17
22
|
const ANCHOR_TAG = 'a';
|
|
18
23
|
const NUXT_LINK_TAG = 'nuxt-link';
|
|
@@ -166,7 +171,7 @@ export default {
|
|
|
166
171
|
isInlineAndHasExternalIcon() {
|
|
167
172
|
return (
|
|
168
173
|
this.showExternalIcon &&
|
|
169
|
-
this.variant ===
|
|
174
|
+
this.variant === linkVariantInline &&
|
|
170
175
|
this.href &&
|
|
171
176
|
isExternalURL(this.target, this.href)
|
|
172
177
|
);
|
|
@@ -221,6 +226,10 @@ export default {
|
|
|
221
226
|
return listenersWithoutClick;
|
|
222
227
|
},
|
|
223
228
|
computedClass() {
|
|
229
|
+
if (this.variant === linkVariantUnstyled) {
|
|
230
|
+
return [];
|
|
231
|
+
}
|
|
232
|
+
|
|
224
233
|
return [
|
|
225
234
|
'gl-link',
|
|
226
235
|
linkVariantOptions[this.variant],
|
|
@@ -427,7 +427,6 @@ export default {
|
|
|
427
427
|
<input
|
|
428
428
|
ref="textInput"
|
|
429
429
|
type="text"
|
|
430
|
-
aria-label="token selector"
|
|
431
430
|
class="gl-token-selector-input gl-h-auto gl-w-4/10 gl-grow gl-border-none gl-bg-transparent gl-px-1 gl-font-regular gl-text-base gl-leading-normal gl-text-default gl-outline-none"
|
|
432
431
|
:value="inputText"
|
|
433
432
|
:autocomplete="autocomplete"
|
package/src/utils/constants.js
CHANGED
|
@@ -204,11 +204,18 @@ export const animatedIconVariantOptions = {
|
|
|
204
204
|
success: 'gl-animated-icon-success',
|
|
205
205
|
};
|
|
206
206
|
|
|
207
|
+
export const linkVariantInline = 'inline';
|
|
208
|
+
export const linkVariantMeta = 'meta';
|
|
209
|
+
export const linkVariantMention = 'mention';
|
|
210
|
+
export const linkVariantMentionCurrent = 'mentionCurrent';
|
|
211
|
+
export const linkVariantUnstyled = 'unstyled';
|
|
212
|
+
|
|
207
213
|
export const linkVariantOptions = {
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
214
|
+
[linkVariantInline]: 'gl-link-inline',
|
|
215
|
+
[linkVariantMeta]: 'gl-link-meta',
|
|
216
|
+
[linkVariantMention]: 'gl-link-mention',
|
|
217
|
+
[linkVariantMentionCurrent]: 'gl-link-mention-current',
|
|
218
|
+
[linkVariantUnstyled]: '',
|
|
212
219
|
};
|
|
213
220
|
|
|
214
221
|
export const triggerVariantOptions = {
|