@gitlab/ui 113.3.0 → 113.3.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/CHANGELOG.md +14 -0
- package/dist/components/base/filtered_search/filtered_search_term.js +4 -1
- package/dist/components/base/filtered_search/filtered_search_token_segment.js +1 -1
- package/dist/components/base/new_dropdowns/disclosure/disclosure_dropdown_item.js +4 -3
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/tailwind.css +1 -1
- package/dist/tailwind.css.map +1 -1
- package/dist/utils/stories_utils.js +35 -1
- package/package.json +5 -5
- package/src/components/base/filtered_search/filtered_search_term.vue +5 -1
- package/src/components/base/filtered_search/filtered_search_token_segment.scss +4 -0
- package/src/components/base/filtered_search/filtered_search_token_segment.vue +2 -1
- package/src/components/base/new_dropdowns/disclosure/disclosure_dropdown_item.vue +4 -3
- package/src/utils/stories_utils.js +34 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [113.3.2](https://gitlab.com/gitlab-org/gitlab-ui/compare/v113.3.1...v113.3.2) (2025-05-05)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **deps:** update dependency @floating-ui/dom to v1.7.0 ([00baf76](https://gitlab.com/gitlab-org/gitlab-ui/commit/00baf767c521a2f523b5fb9ef50b539bbe83f204))
|
|
7
|
+
|
|
8
|
+
## [113.3.1](https://gitlab.com/gitlab-org/gitlab-ui/compare/v113.3.0...v113.3.1) (2025-05-05)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **FilteredSearchTerm:** Fix view-only logic and remove unused deprecated class ([3a142b7](https://gitlab.com/gitlab-org/gitlab-ui/commit/3a142b76e40567007a2280263ec993ca9bceb163))
|
|
14
|
+
|
|
1
15
|
# [113.3.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v113.2.4...v113.3.0) (2025-05-02)
|
|
2
16
|
|
|
3
17
|
|
|
@@ -95,6 +95,9 @@ var script = {
|
|
|
95
95
|
return this.termsAsTokens() && Boolean(this.value.data);
|
|
96
96
|
},
|
|
97
97
|
suggestedTokens() {
|
|
98
|
+
if (this.viewOnly) {
|
|
99
|
+
return [];
|
|
100
|
+
}
|
|
98
101
|
const tokens = this.availableTokens.filter(token => match(token.title, this.value.data));
|
|
99
102
|
if (this.termsAsTokens() && this.value.data) {
|
|
100
103
|
tokens.push({
|
|
@@ -170,7 +173,7 @@ const __vue_script__ = script;
|
|
|
170
173
|
/* template */
|
|
171
174
|
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"gl-filtered-search-term gl-h-auto",attrs:{"data-testid":"filtered-search-term"}},[_c('gl-filtered-search-token-segment',{ref:"segment",staticClass:"gl-filtered-search-term-token",attrs:{"is-term":"","active":_vm.active,"cursor-position":_vm.cursorPosition,"search-input-attributes":_vm.searchInputAttributes,"is-last-token":_vm.isLastToken,"current-value":_vm.currentValue,"view-only":_vm.viewOnly,"options":_vm.suggestedTokens},on:{"activate":function($event){return _vm.$emit('activate')},"deactivate":function($event){return _vm.$emit('deactivate')},"complete":_vm.onComplete,"backspace":_vm.onBackspace,"submit":function($event){return _vm.$emit('submit')},"split":function($event){return _vm.$emit('split', $event)},"previous":function($event){return _vm.$emit('previous')},"next":function($event){return _vm.$emit('next')}},scopedSlots:_vm._u([{key:"view",fn:function(ref){
|
|
172
175
|
var label = ref.label;
|
|
173
|
-
return [(_vm.showToken)?_c('gl-token',_vm._g({class:{ 'gl-cursor-pointer': !_vm.viewOnly },attrs:{"view-only":_vm.viewOnly}},_vm.eventListeners),[_vm._v(_vm._s(_vm.value.data))]):(_vm.showInput)?_c('input',_vm._b({staticClass:"gl-filtered-search-term-input",
|
|
176
|
+
return [(_vm.showToken)?_c('gl-token',_vm._g({class:{ 'gl-cursor-pointer': !_vm.viewOnly },attrs:{"view-only":_vm.viewOnly}},_vm.eventListeners),[_vm._v(_vm._s(_vm.value.data))]):(_vm.showInput)?_c('input',_vm._b({staticClass:"gl-filtered-search-term-input",attrs:{"placeholder":_vm.placeholder,"aria-label":label,"readonly":_vm.viewOnly,"disabled":_vm.viewOnly,"data-testid":"filtered-search-term-input"},on:{"focusin":function($event){return _vm.$emit('activate')},"focusout":function($event){return _vm.$emit('deactivate')}}},'input',_vm.searchInputAttributes,false)):[_vm._v(_vm._s(_vm.value.data))]]}}]),model:{value:(_vm.internalValue),callback:function ($$v) {_vm.internalValue=$$v;},expression:"internalValue"}})],1)};
|
|
174
177
|
var __vue_staticRenderFns__ = [];
|
|
175
178
|
|
|
176
179
|
/* style */
|
|
@@ -397,7 +397,7 @@ const __vue_script__ = script;
|
|
|
397
397
|
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',_vm._g(_vm._b({staticClass:"gl-filtered-search-token-segment",class:{
|
|
398
398
|
'gl-filtered-search-token-segment-active': _vm.active,
|
|
399
399
|
'!gl-cursor-text': _vm.viewOnly,
|
|
400
|
-
},attrs:{"data-testid":"filtered-search-token-segment"}},'div',_vm.containerAttributes,false),_vm.viewOnly ? {} : { mousedown: _vm.emitIfInactive }),[(_vm.active)?[_vm._t("before-input",null,null,{ submitValue: _vm.applySuggestion }),_vm._v(" "),(((_vm.searchInputAttributes).type)==='checkbox')?_c('input',_vm._b({directives:[{name:"model",rawName:"v-model",value:(_vm.inputValue),expression:"inputValue"}],ref:"input",staticClass:"gl-filtered-search-token-segment-input",attrs:{"data-testid":"filtered-search-token-segment-input","aria-label":_vm.label,"
|
|
400
|
+
},attrs:{"data-testid":"filtered-search-token-segment"}},'div',_vm.containerAttributes,false),_vm.viewOnly ? {} : { mousedown: _vm.emitIfInactive }),[(_vm.active)?[_vm._t("before-input",null,null,{ submitValue: _vm.applySuggestion }),_vm._v(" "),(((_vm.searchInputAttributes).type)==='checkbox')?_c('input',_vm._b({directives:[{name:"model",rawName:"v-model",value:(_vm.inputValue),expression:"inputValue"}],ref:"input",staticClass:"gl-filtered-search-token-segment-input",class:{ 'gl-filtered-search-token-segment-input-disabled': _vm.viewOnly },attrs:{"data-testid":"filtered-search-token-segment-input","aria-label":_vm.label,"disabled":_vm.viewOnly,"type":"checkbox"},domProps:{"checked":Array.isArray(_vm.inputValue)?_vm._i(_vm.inputValue,null)>-1:(_vm.inputValue)},on:{"keydown":_vm.handleInputKeydown,"blur":_vm.handleBlur,"change":function($event){var $$a=_vm.inputValue,$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=null,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.inputValue=$$a.concat([$$v]));}else {$$i>-1&&(_vm.inputValue=$$a.slice(0,$$i).concat($$a.slice($$i+1)));}}else {_vm.inputValue=$$c;}}}},'input',_vm.searchInputAttributes,false)):(((_vm.searchInputAttributes).type)==='radio')?_c('input',_vm._b({directives:[{name:"model",rawName:"v-model",value:(_vm.inputValue),expression:"inputValue"}],ref:"input",staticClass:"gl-filtered-search-token-segment-input",class:{ 'gl-filtered-search-token-segment-input-disabled': _vm.viewOnly },attrs:{"data-testid":"filtered-search-token-segment-input","aria-label":_vm.label,"disabled":_vm.viewOnly,"type":"radio"},domProps:{"checked":_vm._q(_vm.inputValue,null)},on:{"keydown":_vm.handleInputKeydown,"blur":_vm.handleBlur,"change":function($event){_vm.inputValue=null;}}},'input',_vm.searchInputAttributes,false)):_c('input',_vm._b({directives:[{name:"model",rawName:"v-model",value:(_vm.inputValue),expression:"inputValue"}],ref:"input",staticClass:"gl-filtered-search-token-segment-input",class:{ 'gl-filtered-search-token-segment-input-disabled': _vm.viewOnly },attrs:{"data-testid":"filtered-search-token-segment-input","aria-label":_vm.label,"disabled":_vm.viewOnly,"type":(_vm.searchInputAttributes).type},domProps:{"value":(_vm.inputValue)},on:{"keydown":_vm.handleInputKeydown,"blur":_vm.handleBlur,"input":function($event){if($event.target.composing){ return; }_vm.inputValue=$event.target.value;}}},'input',_vm.searchInputAttributes,false)),_vm._v(" "),_c('portal',{key:("operator-" + _vm._uid),attrs:{"to":_vm.portalName}},[(_vm.hasOptionsOrSuggestions)?_c('gl-filtered-search-suggestion-list',{key:("operator-" + _vm._uid),ref:"suggestions",attrs:{"initial-value":_vm.defaultSuggestedValue},on:{"suggestion":_vm.applySuggestion}},[(_vm.options)?_vm._l((_vm.options),function(option,idx){return _c('gl-filtered-search-suggestion',{key:((option.value) + "-" + idx),attrs:{"value":option.value,"icon-name":option.icon}},[_vm._t("option",function(){return [(option.component)?[_c(option.component,{tag:"component",attrs:{"option":option}})]:[_vm._v("\n "+_vm._s(option[_vm.optionTextField])+"\n ")]]},null,{ option: option })],2)}):_vm._t("suggestions")],2):_vm._e()],1)]:_vm._t("view",function(){return [_vm._v(_vm._s(_vm.inputValue))]},null,{ label: _vm.label, inputValue: _vm.inputValue })],2)};
|
|
401
401
|
var __vue_staticRenderFns__ = [];
|
|
402
402
|
|
|
403
403
|
/* style */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import GlLink from '../../link/link';
|
|
2
2
|
import { ENTER, SPACE } from '../constants';
|
|
3
3
|
import { stopEvent } from '../../../../utils/utils';
|
|
4
4
|
import { dropdownItemVariantOptions } from '../../../../utils/constants';
|
|
@@ -11,7 +11,7 @@ var script = {
|
|
|
11
11
|
name: DISCLOSURE_DROPDOWN_ITEM_NAME,
|
|
12
12
|
ITEM_CLASS,
|
|
13
13
|
components: {
|
|
14
|
-
|
|
14
|
+
GlLink
|
|
15
15
|
},
|
|
16
16
|
props: {
|
|
17
17
|
item: {
|
|
@@ -45,10 +45,11 @@ var script = {
|
|
|
45
45
|
item
|
|
46
46
|
} = this;
|
|
47
47
|
if (this.isLink) return {
|
|
48
|
-
is:
|
|
48
|
+
is: GlLink,
|
|
49
49
|
attrs: {
|
|
50
50
|
href: item.href,
|
|
51
51
|
to: item.to,
|
|
52
|
+
variant: 'unstyled',
|
|
52
53
|
...item.extraAttrs
|
|
53
54
|
},
|
|
54
55
|
listeners: {
|