@gitlab/ui 137.0.3 → 137.1.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/form/form_password_input/form_password_input.js +11 -1
- 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 +1 -1
- package/src/components/base/form/form_password_input/form_password_input.vue +11 -0
- package/src/components/base/link/link.scss +1 -1
- package/src/components/base/link/link.vue +7 -0
- package/src/components/base/sorting/sorting.vue +3 -1
- package/translations.js +1 -0
|
@@ -60,6 +60,16 @@ var script = {
|
|
|
60
60
|
type: Boolean,
|
|
61
61
|
required: false,
|
|
62
62
|
default: false
|
|
63
|
+
},
|
|
64
|
+
/**
|
|
65
|
+
* CSS class(es) applied to the inner input element, not the wrapper.
|
|
66
|
+
* Use it for hooks or styles that must target the input itself, since a
|
|
67
|
+
* `class` passed to this component lands on the wrapper under Vue 2.
|
|
68
|
+
*/
|
|
69
|
+
inputClass: {
|
|
70
|
+
type: [String, Array, Object],
|
|
71
|
+
required: false,
|
|
72
|
+
default: ''
|
|
63
73
|
}
|
|
64
74
|
},
|
|
65
75
|
data() {
|
|
@@ -96,7 +106,7 @@ var script = {
|
|
|
96
106
|
const __vue_script__ = script;
|
|
97
107
|
|
|
98
108
|
/* template */
|
|
99
|
-
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"gl-form-password-input"},[_c('gl-form-input',_vm._g(_vm._b({staticClass:"gl-form-password-input-field",attrs:{"value":_vm.value,"type":_vm.type,"disabled":_vm.disabled}},'gl-form-input',_vm.$attrs,false),_vm.$listeners)),_vm._v(" "),_c('gl-button',{directives:[{name:"gl-tooltip",rawName:"v-gl-tooltip",value:(_vm.toggleLabel),expression:"toggleLabel"}],staticClass:"gl-form-password-input-toggle",attrs:{"category":"tertiary","size":"small","aria-label":_vm.toggleLabel,"icon":_vm.toggleIcon,"disabled":_vm.disabled},on:{"click":_vm.toggleVisibility}})],1)};
|
|
109
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"gl-form-password-input"},[_c('gl-form-input',_vm._g(_vm._b({staticClass:"gl-form-password-input-field",class:_vm.inputClass,attrs:{"value":_vm.value,"type":_vm.type,"disabled":_vm.disabled}},'gl-form-input',_vm.$attrs,false),_vm.$listeners)),_vm._v(" "),_c('gl-button',{directives:[{name:"gl-tooltip",rawName:"v-gl-tooltip",value:(_vm.toggleLabel),expression:"toggleLabel"}],staticClass:"gl-form-password-input-toggle",attrs:{"category":"tertiary","size":"small","aria-label":_vm.toggleLabel,"icon":_vm.toggleIcon,"disabled":_vm.disabled},on:{"click":_vm.toggleVisibility}})],1)};
|
|
100
110
|
var __vue_staticRenderFns__ = [];
|
|
101
111
|
|
|
102
112
|
/* style */
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { isString, isObject, toString, isBoolean, concat, isFunction } from 'lodash-es';
|
|
2
2
|
import { SafeLinkDirective, isExternalURL } from '../../../directives/safe_link/safe_link';
|
|
3
|
+
import { translate } from '../../../utils/i18n';
|
|
3
4
|
import { stopEvent } from '../../../utils/utils';
|
|
4
5
|
import { buildQueryString } from '../../../utils/url_utils';
|
|
5
6
|
import { safeVueInstance, isVue3 } from '../../../utils/vue_utils';
|
|
@@ -175,6 +176,9 @@ var script = {
|
|
|
175
176
|
isVue3RouterLink() {
|
|
176
177
|
return this.tag === VUE_ROUTER_LINK_TAG && isVue3(this);
|
|
177
178
|
},
|
|
179
|
+
externalLinkLabel() {
|
|
180
|
+
return translate('GlLink.externalLink', '(external link)');
|
|
181
|
+
},
|
|
178
182
|
shouldShowExternalIcon() {
|
|
179
183
|
const allowedVariants = [linkVariantInline, linkVariantMeta, null]; // null represents default/UI variant
|
|
180
184
|
return this.showExternalIcon && allowedVariants.includes(this.variant) && this.href && isExternalURL(this.target, this.href);
|
|
@@ -314,7 +318,7 @@ var _obj;
|
|
|
314
318
|
var routerLinkHref = ref.href;
|
|
315
319
|
var isActive = ref.isActive;
|
|
316
320
|
var isExactActive = ref.isExactActive;
|
|
317
|
-
var navigate = ref.navigate;return [_c('a',_vm._g(_vm._b({directives:[{name:"safe-link",rawName:"v-safe-link:[safeLinkConfig]",arg:_vm.safeLinkConfig}],class:[_vm.computedClass, ( _obj = {}, _obj[_vm.activeClass] = isActive, _obj[_vm.exactActiveClass] = isExactActive, _obj )],attrs:{"href":routerLinkHref},on:{"click":function($event){return _vm.onClick($event, navigate)}}},'a',_vm.$attrs,false),_vm.computedListeners),[_vm._t("default")],2)]}}],null,true)},'component',_vm.computedProps,false)):(_vm.isRouterLink)?_c(_vm.tag,_vm._g(_vm._b({directives:[{name:"safe-link",rawName:"v-safe-link:[safeLinkConfig]",arg:_vm.safeLinkConfig}],tag:"component",class:_vm.computedClass,nativeOn:{"click":function($event){return _vm.onClick.apply(null, arguments)}}},'component',_vm.computedProps,false),_vm.computedListeners),[_vm._t("default")],2):_c(_vm.tag,_vm._g(_vm._b({directives:[{name:"safe-link",rawName:"v-safe-link:[safeLinkConfig]",arg:_vm.safeLinkConfig}],tag:"component",class:_vm.computedClass,on:{"click":_vm.onClick}},'component',_vm.computedProps,false),_vm.computedListeners),[_vm._t("default")],2)};
|
|
321
|
+
var navigate = ref.navigate;return [_c('a',_vm._g(_vm._b({directives:[{name:"safe-link",rawName:"v-safe-link:[safeLinkConfig]",arg:_vm.safeLinkConfig}],class:[_vm.computedClass, ( _obj = {}, _obj[_vm.activeClass] = isActive, _obj[_vm.exactActiveClass] = isExactActive, _obj )],attrs:{"href":routerLinkHref,"data-alt":_vm.externalLinkLabel},on:{"click":function($event){return _vm.onClick($event, navigate)}}},'a',_vm.$attrs,false),_vm.computedListeners),[_vm._t("default")],2)]}}],null,true)},'component',_vm.computedProps,false)):(_vm.isRouterLink)?_c(_vm.tag,_vm._g(_vm._b({directives:[{name:"safe-link",rawName:"v-safe-link:[safeLinkConfig]",arg:_vm.safeLinkConfig}],tag:"component",class:_vm.computedClass,attrs:{"data-alt":_vm.externalLinkLabel},nativeOn:{"click":function($event){return _vm.onClick.apply(null, arguments)}}},'component',_vm.computedProps,false),_vm.computedListeners),[_vm._t("default")],2):_c(_vm.tag,_vm._g(_vm._b({directives:[{name:"safe-link",rawName:"v-safe-link:[safeLinkConfig]",arg:_vm.safeLinkConfig}],tag:"component",class:_vm.computedClass,attrs:{"data-alt":_vm.externalLinkLabel},on:{"click":_vm.onClick}},'component',_vm.computedProps,false),_vm.computedListeners),[_vm._t("default")],2)};
|
|
318
322
|
var __vue_staticRenderFns__ = [];
|
|
319
323
|
|
|
320
324
|
/* style */
|
|
@@ -101,7 +101,8 @@ var script = {
|
|
|
101
101
|
},
|
|
102
102
|
data() {
|
|
103
103
|
return {
|
|
104
|
-
sortingListboxId: uniqueId('sorting-listbox-')
|
|
104
|
+
sortingListboxId: uniqueId('sorting-listbox-'),
|
|
105
|
+
toggleId: uniqueId('sorting-toggle-')
|
|
105
106
|
};
|
|
106
107
|
},
|
|
107
108
|
computed: {
|
|
@@ -166,7 +167,7 @@ var script = {
|
|
|
166
167
|
const __vue_script__ = script;
|
|
167
168
|
|
|
168
169
|
/* template */
|
|
169
|
-
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('gl-button-group',{staticClass:"gl-sorting gl-flex"},[_c('gl-collapsible-listbox',{staticClass:"gl-w-full",class:_vm.dropdownClass,attrs:{"toggle-text":_vm.text,"items":_vm.sortOptions,"selected":_vm.sortBy,"toggle-class":_vm.dropdownToggleClass,"placement":"bottom-end","block":_vm.block,"toggle-aria-labelled-by":_vm.sortingListboxId},on:{"select":_vm.onSortByChanged}}),_vm._v(" "),_c('span',{staticClass:"gl-sr-only",attrs:{"id":_vm.sortingListboxId}},[_vm._v(_vm._s(_vm.sortingListboxLabel))]),_vm._v(" "),_c('gl-button',{directives:[{name:"gl-tooltip",rawName:"v-gl-tooltip"}],class:['sorting-direction-button', _vm.sortDirectionToggleClass],attrs:{"title":_vm.sortDirectionText,"icon":_vm.localSortDirection,"aria-label":_vm.sortDirectionText,"disabled":_vm.isDirectionToggleDisabled,"accessible-disabled":_vm.isDirectionToggleDisabled},on:{"click":_vm.toggleSortDirection}})],1)};
|
|
170
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('gl-button-group',{staticClass:"gl-sorting gl-flex"},[_c('gl-collapsible-listbox',{staticClass:"gl-w-full",class:_vm.dropdownClass,attrs:{"toggle-text":_vm.text,"items":_vm.sortOptions,"selected":_vm.sortBy,"toggle-class":_vm.dropdownToggleClass,"placement":"bottom-end","block":_vm.block,"toggle-id":_vm.toggleId,"toggle-aria-labelled-by":(_vm.sortingListboxId + " " + _vm.toggleId)},on:{"select":_vm.onSortByChanged}}),_vm._v(" "),_c('span',{staticClass:"gl-sr-only",attrs:{"id":_vm.sortingListboxId}},[_vm._v(_vm._s(_vm.sortingListboxLabel))]),_vm._v(" "),_c('gl-button',{directives:[{name:"gl-tooltip",rawName:"v-gl-tooltip"}],class:['sorting-direction-button', _vm.sortDirectionToggleClass],attrs:{"title":_vm.sortDirectionText,"icon":_vm.localSortDirection,"aria-label":_vm.sortDirectionText,"disabled":_vm.isDirectionToggleDisabled,"accessible-disabled":_vm.isDirectionToggleDisabled},on:{"click":_vm.toggleSortDirection}})],1)};
|
|
170
171
|
var __vue_staticRenderFns__ = [];
|
|
171
172
|
|
|
172
173
|
/* style */
|