@gitlab/ui 58.4.0 → 58.5.0
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/filtered_search/filtered_search_token_segment.js +1 -1
- package/dist/components/base/new_dropdowns/disclosure/disclosure_dropdown_item.js +9 -1
- package/dist/components/base/new_dropdowns/listbox/listbox.js +17 -12
- package/dist/components/charts/chart/chart.js +5 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/package.json +8 -4
- package/src/components/base/alert/alert.stories.js +2 -1
- package/src/components/base/avatar/avatar.stories.js +1 -1
- package/src/components/base/avatar_labeled/avatar_labeled.stories.js +3 -1
- package/src/components/base/avatar_link/avatar_link.stories.js +3 -1
- package/src/components/base/avatars_inline/avatars_inline.stories.js +4 -1
- package/src/components/base/badge/badge.stories.js +1 -1
- package/src/components/base/banner/banner.stories.js +2 -1
- package/src/components/base/breadcrumb/breadcrumb.stories.js +1 -1
- package/src/components/base/broadcast_message/broadcast_message.stories.js +1 -1
- package/src/components/base/button/button.stories.js +7 -9
- package/src/components/base/button_group/button_group.stories.js +4 -1
- package/src/components/base/collapse/collapse.stories.js +3 -1
- package/src/components/base/datepicker/datepicker.stories.js +2 -1
- package/src/components/base/drawer/drawer.stories.js +3 -1
- package/src/components/base/dropdown/dropdown.stories.js +10 -12
- package/src/components/base/dropdown/dropdown_item.stories.js +1 -1
- package/src/components/base/filtered_search/filtered_search.stories.js +15 -13
- package/src/components/base/filtered_search/filtered_search_suggestion.stories.js +1 -1
- package/src/components/base/filtered_search/filtered_search_suggestion_list.stories.js +2 -1
- package/src/components/base/filtered_search/filtered_search_token.stories.js +1 -1
- package/src/components/base/filtered_search/filtered_search_token_segment.stories.js +1 -1
- package/src/components/base/filtered_search/filtered_search_token_segment.vue +1 -0
- package/src/components/base/form/form.stories.js +7 -9
- package/src/components/base/form/form_checkbox/form_checkbox.stories.js +2 -1
- package/src/components/base/form/form_group/form_group.stories.js +3 -1
- package/src/components/base/form/form_input/form_input.stories.js +1 -1
- package/src/components/base/form/form_input_group/form_input_group.stories.js +2 -1
- package/src/components/base/form/form_radio/form_radio.stories.js +1 -1
- package/src/components/base/form/form_radio_group/form_radio_group.stories.js +2 -1
- package/src/components/base/form/form_select/form_select.stories.js +2 -2
- package/src/components/base/form/form_textarea/form_textarea.stories.js +1 -1
- package/src/components/base/icon/icon.stories.js +1 -1
- package/src/components/base/infinite_scroll/infinite_scroll.stories.js +2 -1
- package/src/components/base/label/label.stories.js +1 -1
- package/src/components/base/link/link.stories.js +1 -1
- package/src/components/base/loading_icon/loading_icon.stories.js +1 -1
- package/src/components/base/modal/modal.stories.js +3 -1
- package/src/components/base/nav/nav.stories.js +6 -8
- package/src/components/base/navbar/navbar.stories.js +1 -1
- package/src/components/base/new_dropdowns/disclosure/disclosure_dropdown.scss +10 -0
- package/src/components/base/new_dropdowns/disclosure/disclosure_dropdown.stories.js +9 -11
- package/src/components/base/new_dropdowns/disclosure/disclosure_dropdown_item.spec.js +33 -0
- package/src/components/base/new_dropdowns/disclosure/disclosure_dropdown_item.vue +8 -2
- package/src/components/base/new_dropdowns/listbox/listbox.stories.js +7 -9
- package/src/components/base/new_dropdowns/listbox/listbox.vue +24 -21
- package/src/components/base/paginated_list/paginated_list.stories.js +2 -1
- package/src/components/base/pagination/pagination.stories.js +7 -10
- package/src/components/base/path/path.stories.js +2 -1
- package/src/components/base/popover/popover.stories.js +2 -1
- package/src/components/base/progress_bar/progress_bar.stories.js +1 -1
- package/src/components/base/search_box_by_click/search_box_by_click.stories.js +1 -1
- package/src/components/base/search_box_by_type/search_box_by_type.stories.js +1 -1
- package/src/components/base/segmented_control/segmented_control.stories.js +1 -1
- package/src/components/base/skeleton_loader/skeleton_loader.stories.js +1 -1
- package/src/components/base/skeleton_loading/skeleton_loading.stories.js +1 -1
- package/src/components/base/sorting/sorting.stories.js +2 -1
- package/src/components/base/sorting/sorting_item.stories.js +2 -1
- package/src/components/base/table/table.stories.js +2 -1
- package/src/components/base/tabs/tabs/tabs.stories.js +5 -2
- package/src/components/base/toast/toast.stories.js +2 -1
- package/src/components/base/toggle/toggle.stories.js +1 -1
- package/src/components/base/token/token.stories.js +2 -1
- package/src/components/base/tooltip/tooltip.stories.js +3 -1
- package/src/components/charts/chart/chart.stories.js +3 -2
- package/src/components/charts/chart/chart.vue +5 -1
- package/src/components/regions/dashboard_skeleton/dashboard_skeleton.stories.js +1 -1
- package/src/components/regions/empty_state/empty_state.stories.js +2 -1
- package/src/components/utilities/friendly_wrap/friendly_wrap.stories.js +1 -1
- package/src/components/utilities/intersection_observer/intersection_observer.stories.js +1 -1
- package/src/components/utilities/intersperse/intersperse.stories.js +1 -1
- package/src/components/utilities/sprintf/sprintf.stories.js +3 -1
- package/src/components/utilities/truncate/truncate.spec.js +16 -1
- package/src/components/utilities/truncate/truncate.stories.js +1 -1
- package/src/components/utilities/truncate/truncate.vue +0 -3
- package/src/directives/hover_load/hover_load.stories.js +1 -1
- package/src/directives/outside/outside.stories.js +1 -1
- package/src/directives/resize_observer/resize_observer.stories.js +1 -1
- package/src/directives/safe_html/safe_html.stories.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [58.5.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v58.4.0...v58.5.0) (2023-03-27)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **GlDisclosureDropdown:** Add disabled state ([8d3de9e](https://gitlab.com/gitlab-org/gitlab-ui/commit/8d3de9ee5216b6fd3e2f3430272d9e6ed8ff70bf))
|
|
7
|
+
|
|
1
8
|
# [58.4.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v58.3.0...v58.4.0) (2023-03-23)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -359,7 +359,7 @@ const __vue_script__ = script;
|
|
|
359
359
|
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:{
|
|
360
360
|
'gl-filtered-search-token-segment-active': _vm.active,
|
|
361
361
|
'gl-cursor-text!': _vm.viewOnly,
|
|
362
|
-
},attrs:{"data-testid":"filtered-search-token-segment"}},'div',_vm.containerAttributes,false),_vm.viewOnly ? {} : { mousedown: _vm.emitIfInactive }),[(_vm.active)?[(((_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:{"aria-label":_vm.label,"readonly":_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",attrs:{"aria-label":_vm.label,"readonly":_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",attrs:{"aria-label":_vm.label,"readonly":_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 [_vm._v(" "+_vm._s(option[_vm.optionTextField])+" ")]},null,{ option: option })],2)}):_vm._t("suggestions")],2):_vm._e()],1)]:_vm._t("view",function(){return [_vm._v(_vm._s(_vm.inputValue))]},null,{ inputValue: _vm.inputValue })],2)};
|
|
362
|
+
},attrs:{"data-testid":"filtered-search-token-segment"}},'div',_vm.containerAttributes,false),_vm.viewOnly ? {} : { mousedown: _vm.emitIfInactive }),[(_vm.active)?[(((_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,"readonly":_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",attrs:{"data-testid":"filtered-search-token-segment-input","aria-label":_vm.label,"readonly":_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",attrs:{"data-testid":"filtered-search-token-segment-input","aria-label":_vm.label,"readonly":_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 [_vm._v(" "+_vm._s(option[_vm.optionTextField])+" ")]},null,{ option: option })],2)}):_vm._t("suggestions")],2):_vm._e()],1)]:_vm._t("view",function(){return [_vm._v(_vm._s(_vm.inputValue))]},null,{ inputValue: _vm.inputValue })],2)};
|
|
363
363
|
var __vue_staticRenderFns__ = [];
|
|
364
364
|
|
|
365
365
|
/* style */
|
|
@@ -55,6 +55,14 @@ var script = {
|
|
|
55
55
|
wrapperClass: item === null || item === void 0 ? void 0 : item.wrapperClass
|
|
56
56
|
};
|
|
57
57
|
},
|
|
58
|
+
listIndex() {
|
|
59
|
+
var _this$item2, _this$item2$extraAttr;
|
|
60
|
+
return (_this$item2 = this.item) !== null && _this$item2 !== void 0 && (_this$item2$extraAttr = _this$item2.extraAttrs) !== null && _this$item2$extraAttr !== void 0 && _this$item2$extraAttr.disabled ? null : 0;
|
|
61
|
+
},
|
|
62
|
+
componentIndex() {
|
|
63
|
+
var _this$item3, _this$item3$extraAttr;
|
|
64
|
+
return (_this$item3 = this.item) !== null && _this$item3 !== void 0 && (_this$item3$extraAttr = _this$item3.extraAttrs) !== null && _this$item3$extraAttr !== void 0 && _this$item3$extraAttr.disabled ? null : -1;
|
|
65
|
+
},
|
|
58
66
|
wrapperListeners() {
|
|
59
67
|
const listeners = {
|
|
60
68
|
keydown: this.onKeydown
|
|
@@ -97,7 +105,7 @@ var script = {
|
|
|
97
105
|
const __vue_script__ = script;
|
|
98
106
|
|
|
99
107
|
/* template */
|
|
100
|
-
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('li',_vm._g({class:[_vm.$options.ITEM_CLASS, _vm.itemComponent.wrapperClass],attrs:{"tabindex":
|
|
108
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('li',_vm._g({class:[_vm.$options.ITEM_CLASS, _vm.itemComponent.wrapperClass],attrs:{"tabindex":_vm.listIndex,"data-testid":"disclosure-dropdown-item"}},_vm.wrapperListeners),[_vm._t("default",function(){return [_c(_vm.itemComponent.is,_vm._g(_vm._b({ref:"item",tag:"component",staticClass:"gl-new-dropdown-item-content",attrs:{"tabindex":_vm.componentIndex}},'component',_vm.itemComponent.attrs,false),_vm.itemComponent.listeners),[_c('span',{staticClass:"gl-new-dropdown-item-text-wrapper"},[_vm._t("list-item",function(){return [_vm._v("\n "+_vm._s(_vm.item.text)+"\n ")]})],2)])]})],2)};
|
|
101
109
|
var __vue_staticRenderFns__ = [];
|
|
102
110
|
|
|
103
111
|
/* style */
|
|
@@ -358,7 +358,7 @@ var script = {
|
|
|
358
358
|
immediate: true,
|
|
359
359
|
handler(newSelected) {
|
|
360
360
|
if (Array.isArray(newSelected)) {
|
|
361
|
-
if (!this.multiple && newSelected.length) {
|
|
361
|
+
if (process.env.NODE_ENV !== 'production' && !this.multiple && newSelected.length) {
|
|
362
362
|
throw new Error('To allow multi-selection, please, set "multiple" property to "true"');
|
|
363
363
|
}
|
|
364
364
|
this.selectedValues = [...newSelected];
|
|
@@ -367,19 +367,24 @@ var script = {
|
|
|
367
367
|
}
|
|
368
368
|
}
|
|
369
369
|
},
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
370
|
+
...(process.env.NODE_ENV !== 'production' ? {
|
|
371
|
+
resetButtonLabel: {
|
|
372
|
+
immediate: true,
|
|
373
|
+
handler(newResetButtonLabel) {
|
|
374
|
+
if (newResetButtonLabel && !this.headerText) {
|
|
375
|
+
throw new Error('The reset button cannot be rendered without a header. Either provide a header via the headerText prop, or do not provide the resetButtonLabel prop.');
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
},
|
|
379
|
+
infiniteScroll: {
|
|
380
|
+
immediate: true,
|
|
381
|
+
handler(newValue) {
|
|
382
|
+
if (newValue && this.items.some(item => !isOption(item))) {
|
|
383
|
+
throw new Error('Infinite scroll does not support groups. Please set the "infiniteScroll" prop to "false"');
|
|
384
|
+
}
|
|
375
385
|
}
|
|
376
386
|
}
|
|
377
|
-
}
|
|
378
|
-
},
|
|
379
|
-
created() {
|
|
380
|
-
if (process.env.NODE_ENV !== 'production' && this.infiniteScroll && this.items.some(item => !isOption(item))) {
|
|
381
|
-
throw new Error('Infinite scroll does not support groups. Please set the "infiniteScroll" prop to "false"');
|
|
382
|
-
}
|
|
387
|
+
} : {})
|
|
383
388
|
},
|
|
384
389
|
methods: {
|
|
385
390
|
open() {
|
|
@@ -117,11 +117,15 @@ var script = {
|
|
|
117
117
|
},
|
|
118
118
|
async mounted() {
|
|
119
119
|
await this.$nextTick();
|
|
120
|
-
|
|
120
|
+
const chart = echarts.init(this.$refs.chart, this.disableTheme ? null : themeName, {
|
|
121
121
|
renderer: this.renderer,
|
|
122
122
|
width: defaultWidth,
|
|
123
123
|
height: defaultHeight
|
|
124
124
|
});
|
|
125
|
+
// FIXME: temporary workaround to ensure compatibility with @vue/compat
|
|
126
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
127
|
+
chart.__v_skip = true;
|
|
128
|
+
this.chart = chart;
|
|
125
129
|
if (this.groupId.length) {
|
|
126
130
|
this.chart.group = this.groupId;
|
|
127
131
|
echarts.connect(this.groupId);
|