@gitlab/ui 32.38.0 → 32.39.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/carousel/carousel.documentation.js +1 -4
- package/dist/components/base/filtered_search/filtered_search.js +1 -1
- package/dist/components/base/filtered_search/filtered_search_token_segment.js +5 -2
- package/dist/components/base/search_box_by_click/search_box_by_click.js +1 -1
- package/dist/components/charts/bar/bar.js +1 -1
- package/dist/components/charts/sparkline/sparkline.js +1 -1
- package/dist/components/charts/stacked_column/stacked_column.js +1 -1
- package/documentation/documented_stories.js +1 -0
- package/package.json +1 -1
- package/src/components/base/carousel/carousel.documentation.js +0 -2
- package/src/components/base/carousel/carousel.md +0 -2
- package/src/components/base/carousel/carousel.stories.js +24 -11
- package/src/components/base/filtered_search/filtered_search.vue +1 -0
- package/src/components/base/filtered_search/filtered_search_token_segment.vue +4 -1
- package/src/components/base/search_box_by_click/search_box_by_click.vue +1 -0
- package/src/components/charts/bar/bar.spec.js +0 -15
- package/src/components/charts/bar/bar.vue +3 -2
- package/src/components/charts/sparkline/sparkline.spec.js +21 -27
- package/src/components/charts/sparkline/sparkline.vue +24 -12
- package/src/components/charts/stacked_column/stacked_column.spec.js +11 -1
- package/src/components/charts/stacked_column/stacked_column.vue +5 -8
- package/dist/components/base/carousel/examples/carousel.basic.example.js +0 -38
- package/dist/components/base/carousel/examples/index.js +0 -13
- package/src/components/base/carousel/examples/carousel.basic.example.vue +0 -26
- package/src/components/base/carousel/examples/index.js +0 -15
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [32.39.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v32.38.0...v32.39.0) (2021-11-19)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **GlFilteredSearch:** Fix typing Colon ([1541d19](https://gitlab.com/gitlab-org/gitlab-ui/commit/1541d191db4acc5aa07385acbd19b2ad5d657a17))
|
|
7
|
+
|
|
1
8
|
# [32.38.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v32.37.0...v32.38.0) (2021-11-17)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var description = "## Carousel\n\nThe carousel is a slideshow for cycling through a series of content, built with CSS 3D\ntransforms. It works with a series of images, text, or custom markup. It also includes support\nfor previous/next controls and indicators.\n";
|
|
1
|
+
var description = "The carousel is a slideshow for cycling through a series of content, built with CSS 3D\ntransforms. It works with a series of images, text, or custom markup. It also includes support\nfor previous/next controls and indicators.\n";
|
|
4
2
|
|
|
5
3
|
var carousel_documentation = {
|
|
6
4
|
description,
|
|
7
|
-
examples,
|
|
8
5
|
bootstrapComponent: 'b-carousel'
|
|
9
6
|
};
|
|
10
7
|
|
|
@@ -266,7 +266,7 @@ var script = {
|
|
|
266
266
|
const __vue_script__ = script;
|
|
267
267
|
|
|
268
268
|
/* template */
|
|
269
|
-
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('gl-search-box-by-click',_vm._b({attrs:{"value":_vm.tokens,"history-items":_vm.historyItems,"clearable":_vm.hasValue},on:{"submit":_vm.submit,"input":_vm.applyNewValue,"history-item-selected":function($event){return _vm.$emit('history-item-selected', $event)},"clear":function($event){return _vm.$emit('clear')},"clear-history":function($event){return _vm.$emit('clear-history')}},scopedSlots:_vm._u([{key:"history-item",fn:function(slotScope){return [_vm._t("history-item",null,null,slotScope)]}},{key:"input",fn:function(){return [_c('div',{staticClass:"gl-filtered-search-scrollable"},[_vm._l((_vm.tokens),function(token,idx){return [_c(_vm.getTokenComponent(token.type),{key:((token.type) + "-" + idx),ref:"tokens",refInFor:true,tag:"component",staticClass:"gl-filtered-search-item",class:{
|
|
269
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('gl-search-box-by-click',_vm._b({attrs:{"value":_vm.tokens,"history-items":_vm.historyItems,"clearable":_vm.hasValue,"data-testid":"filtered-search-input"},on:{"submit":_vm.submit,"input":_vm.applyNewValue,"history-item-selected":function($event){return _vm.$emit('history-item-selected', $event)},"clear":function($event){return _vm.$emit('clear')},"clear-history":function($event){return _vm.$emit('clear-history')}},scopedSlots:_vm._u([{key:"history-item",fn:function(slotScope){return [_vm._t("history-item",null,null,slotScope)]}},{key:"input",fn:function(){return [_c('div',{staticClass:"gl-filtered-search-scrollable"},[_vm._l((_vm.tokens),function(token,idx){return [_c(_vm.getTokenComponent(token.type),{key:((token.type) + "-" + idx),ref:"tokens",refInFor:true,tag:"component",staticClass:"gl-filtered-search-item",class:{
|
|
270
270
|
'gl-filtered-search-last-item': _vm.isLastToken(idx),
|
|
271
271
|
},attrs:{"config":_vm.getTokenEntry(token.type),"active":_vm.activeTokenIdx === idx,"available-tokens":_vm.currentAvailableTokens,"current-value":_vm.tokens,"index":idx,"placeholder":_vm.termPlaceholder,"show-friendly-text":_vm.showFriendlyText},on:{"activate":function($event){return _vm.activate(idx)},"deactivate":function($event){return _vm.deactivate(token)},"destroy":function($event){return _vm.destroyToken(idx)},"replace":function($event){return _vm.replaceToken(idx, $event)},"complete":_vm.completeToken,"submit":_vm.submit,"split":function($event){return _vm.createTokens(idx, $event)}},model:{value:(token.value),callback:function ($$v) {_vm.$set(token, "value", $$v);},expression:"token.value"}})]})],2),_vm._v(" "),_c('portal-target',{key:_vm.activeTokenIdx,ref:"menu",style:(_vm.suggestionsStyle),attrs:{"name":_vm.portalName,"slim":""}})]},proxy:true}],null,true)},'gl-search-box-by-click',_vm.$attrs,false))};
|
|
272
272
|
var __vue_staticRenderFns__ = [];
|
|
@@ -216,6 +216,8 @@ var script = {
|
|
|
216
216
|
|
|
217
217
|
const handlers = {
|
|
218
218
|
Enter: () => {
|
|
219
|
+
e.preventDefault();
|
|
220
|
+
|
|
219
221
|
if (suggestedValue != null) {
|
|
220
222
|
this.applySuggestion(suggestedValue);
|
|
221
223
|
} else {
|
|
@@ -224,10 +226,12 @@ var script = {
|
|
|
224
226
|
},
|
|
225
227
|
':': () => {
|
|
226
228
|
if (suggestedValue != null) {
|
|
229
|
+
e.preventDefault();
|
|
227
230
|
this.applySuggestion(suggestedValue);
|
|
228
231
|
}
|
|
229
232
|
},
|
|
230
233
|
Escape: () => {
|
|
234
|
+
e.preventDefault();
|
|
231
235
|
this.$emit('complete');
|
|
232
236
|
}
|
|
233
237
|
};
|
|
@@ -243,7 +247,6 @@ var script = {
|
|
|
243
247
|
}
|
|
244
248
|
|
|
245
249
|
if (Object.keys(handlers).includes(key)) {
|
|
246
|
-
e.preventDefault();
|
|
247
250
|
handlers[key]();
|
|
248
251
|
return;
|
|
249
252
|
}
|
|
@@ -270,7 +273,7 @@ var script = {
|
|
|
270
273
|
const __vue_script__ = script;
|
|
271
274
|
|
|
272
275
|
/* template */
|
|
273
|
-
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"gl-filtered-search-token-segment",class:{ 'gl-filtered-search-token-segment-active': _vm.active },on:{"mousedown":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"left",37,$event.key,["Left","ArrowLeft"])){ return null; }if('button' in $event && $event.button !== 0){ return null; }return _vm.emitIfInactive($event)}}},[(_vm.active)?[_c('input',{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},domProps:{"value":(_vm.inputValue)},on:{"keydown":_vm.handleInputKeydown,"blur":_vm.handleBlur,"input":function($event){if($event.target.composing){ return; }_vm.inputValue=$event.target.value;}}}),_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",[_vm._v("\n "+_vm._s(option[_vm.optionTextField])+"\n ")],null,{ option: option })],2)}):_vm._t("suggestions")],2):_vm._e()],1)]:_vm._t("view",[_vm._v(_vm._s(_vm.inputValue))],null,{ inputValue: _vm.inputValue })],2)};
|
|
276
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"gl-filtered-search-token-segment",class:{ 'gl-filtered-search-token-segment-active': _vm.active },attrs:{"data-testid":"filtered-search-token-segment"},on:{"mousedown":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"left",37,$event.key,["Left","ArrowLeft"])){ return null; }if('button' in $event && $event.button !== 0){ return null; }return _vm.emitIfInactive($event)}}},[(_vm.active)?[_c('input',{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},domProps:{"value":(_vm.inputValue)},on:{"keydown":_vm.handleInputKeydown,"blur":_vm.handleBlur,"input":function($event){if($event.target.composing){ return; }_vm.inputValue=$event.target.value;}}}),_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",[_vm._v("\n "+_vm._s(option[_vm.optionTextField])+"\n ")],null,{ option: option })],2)}):_vm._t("suggestions")],2):_vm._e()],1)]:_vm._t("view",[_vm._v(_vm._s(_vm.inputValue))],null,{ inputValue: _vm.inputValue })],2)};
|
|
274
277
|
var __vue_staticRenderFns__ = [];
|
|
275
278
|
|
|
276
279
|
/* style */
|
|
@@ -158,7 +158,7 @@ var script = {
|
|
|
158
158
|
const __vue_script__ = script;
|
|
159
159
|
|
|
160
160
|
/* template */
|
|
161
|
-
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('gl-form-input-group',{staticClass:"gl-search-box-by-click",scopedSlots:_vm._u([(_vm.historyItems)?{key:"prepend",fn:function(){return [_c('gl-dropdown',{ref:"historyDropdown",staticClass:"gl-search-box-by-click-history",attrs:{"menu-class":"gl-search-box-by-click-menu","category":"secondary","disabled":_vm.disabled},scopedSlots:_vm._u([{key:"button-content",fn:function(){return [_c('gl-icon',{staticClass:"gl-search-box-by-click-history-icon",attrs:{"name":"history"}}),_vm._v(" "),_c('gl-icon',{staticClass:"gl-search-box-by-click-history-icon-chevron",attrs:{"name":"chevron-down"}}),_vm._v(" "),_c('span',{staticClass:"gl-sr-only"},[_vm._v("Toggle history")])]},proxy:true}],null,false,2220989388)},[_vm._v(" "),_c('gl-dropdown-text',{staticClass:"gl-search-box-by-click-history-header"},[_vm._v("\n "+_vm._s(_vm.recentSearchesHeader)+"\n "),_c('gl-button',{directives:[{name:"gl-tooltip",rawName:"v-gl-tooltip.hover",value:({ container: _vm.tooltipContainer }),expression:"{ container: tooltipContainer }",modifiers:{"hover":true}}],ref:"closeHistory",staticClass:"gl-search-box-by-click-close-history-button",attrs:{"title":_vm.closeButtonTitle,"aria-label":_vm.closeButtonTitle,"category":"tertiary","name":"close","icon":"close"},on:{"click":_vm.closeHistoryDropdown}})],1),_vm._v(" "),_c('gl-dropdown-divider'),_vm._v(" "),(_vm.historyItems.length)?[_vm._l((_vm.historyItems),function(item,idx){return _c('gl-dropdown-item',{key:idx,staticClass:"gl-search-box-by-click-history-item",on:{"click":function($event){return _vm.selectHistoryItem(item)}}},[_vm._t("history-item",[_vm._v(_vm._s(item))],{"historyItem":item})],2)}),_vm._v(" "),_c('gl-dropdown-divider'),_vm._v(" "),_c('gl-dropdown-item',{ref:"clearHistory",on:{"click":function($event){return _vm.$emit('clear-history')}}},[_vm._v(_vm._s(_vm.clearRecentSearchesText))])]:_c('gl-dropdown-text',{staticClass:"gl-search-box-by-click-history-no-searches"},[_vm._v(_vm._s(_vm.noRecentSearchesText))])],2)]},proxy:true}:null,{key:"append",fn:function(){return [_c('gl-button',{ref:"searchButton",staticClass:"gl-search-box-by-click-search-button",attrs:{"icon":"search","disabled":_vm.disabled,"aria-label":"Search"},on:{"click":function($event){return _vm.search(_vm.currentValue)}}})]},proxy:true}],null,true)},[_vm._v(" "),_vm._t("input",[_c('gl-form-input',_vm._b({ref:"input",staticClass:"gl-search-box-by-click-input",attrs:{"disabled":_vm.disabled},on:{"focus":function($event){_vm.isFocused = true;},"blur":function($event){_vm.isFocused = false;},"keydown":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"enter",13,$event.key,"Enter")){ return null; }return _vm.search(_vm.currentValue)}},model:{value:(_vm.currentValue),callback:function ($$v) {_vm.currentValue=$$v;},expression:"currentValue"}},'gl-form-input',_vm.inputAttributes,false))]),_vm._v(" "),(_vm.clearable && _vm.hasValue && !_vm.disabled)?_c('gl-clear-icon-button',{staticClass:"gl-search-box-by-click-icon-button gl-search-box-by-click-clear-button gl-clear-icon-button",attrs:{"title":_vm.clearButtonTitle,"tooltip-container":_vm.tooltipContainer},on:{"click":_vm.clearInput}}):_vm._e()],2)};
|
|
161
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('gl-form-input-group',{staticClass:"gl-search-box-by-click",scopedSlots:_vm._u([(_vm.historyItems)?{key:"prepend",fn:function(){return [_c('gl-dropdown',{ref:"historyDropdown",staticClass:"gl-search-box-by-click-history",attrs:{"menu-class":"gl-search-box-by-click-menu","category":"secondary","disabled":_vm.disabled},scopedSlots:_vm._u([{key:"button-content",fn:function(){return [_c('gl-icon',{staticClass:"gl-search-box-by-click-history-icon",attrs:{"name":"history"}}),_vm._v(" "),_c('gl-icon',{staticClass:"gl-search-box-by-click-history-icon-chevron",attrs:{"name":"chevron-down"}}),_vm._v(" "),_c('span',{staticClass:"gl-sr-only"},[_vm._v("Toggle history")])]},proxy:true}],null,false,2220989388)},[_vm._v(" "),_c('gl-dropdown-text',{staticClass:"gl-search-box-by-click-history-header"},[_vm._v("\n "+_vm._s(_vm.recentSearchesHeader)+"\n "),_c('gl-button',{directives:[{name:"gl-tooltip",rawName:"v-gl-tooltip.hover",value:({ container: _vm.tooltipContainer }),expression:"{ container: tooltipContainer }",modifiers:{"hover":true}}],ref:"closeHistory",staticClass:"gl-search-box-by-click-close-history-button",attrs:{"title":_vm.closeButtonTitle,"aria-label":_vm.closeButtonTitle,"category":"tertiary","name":"close","icon":"close"},on:{"click":_vm.closeHistoryDropdown}})],1),_vm._v(" "),_c('gl-dropdown-divider'),_vm._v(" "),(_vm.historyItems.length)?[_vm._l((_vm.historyItems),function(item,idx){return _c('gl-dropdown-item',{key:idx,staticClass:"gl-search-box-by-click-history-item",on:{"click":function($event){return _vm.selectHistoryItem(item)}}},[_vm._t("history-item",[_vm._v(_vm._s(item))],{"historyItem":item})],2)}),_vm._v(" "),_c('gl-dropdown-divider'),_vm._v(" "),_c('gl-dropdown-item',{ref:"clearHistory",on:{"click":function($event){return _vm.$emit('clear-history')}}},[_vm._v(_vm._s(_vm.clearRecentSearchesText))])]:_c('gl-dropdown-text',{staticClass:"gl-search-box-by-click-history-no-searches"},[_vm._v(_vm._s(_vm.noRecentSearchesText))])],2)]},proxy:true}:null,{key:"append",fn:function(){return [_c('gl-button',{ref:"searchButton",staticClass:"gl-search-box-by-click-search-button",attrs:{"icon":"search","disabled":_vm.disabled,"aria-label":"Search"},on:{"click":function($event){return _vm.search(_vm.currentValue)}}})]},proxy:true}],null,true)},[_vm._v(" "),_vm._t("input",[_c('gl-form-input',_vm._b({ref:"input",staticClass:"gl-search-box-by-click-input",attrs:{"disabled":_vm.disabled},on:{"focus":function($event){_vm.isFocused = true;},"blur":function($event){_vm.isFocused = false;},"keydown":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"enter",13,$event.key,"Enter")){ return null; }return _vm.search(_vm.currentValue)}},model:{value:(_vm.currentValue),callback:function ($$v) {_vm.currentValue=$$v;},expression:"currentValue"}},'gl-form-input',_vm.inputAttributes,false))]),_vm._v(" "),(_vm.clearable && _vm.hasValue && !_vm.disabled)?_c('gl-clear-icon-button',{staticClass:"gl-search-box-by-click-icon-button gl-search-box-by-click-clear-button gl-clear-icon-button",attrs:{"title":_vm.clearButtonTitle,"tooltip-container":_vm.tooltipContainer,"data-testid":"filtered-search-clear-button"},on:{"click":_vm.clearInput}}):_vm._e()],2)};
|
|
162
162
|
var __vue_staticRenderFns__ = [];
|
|
163
163
|
|
|
164
164
|
/* style */
|
|
@@ -237,7 +237,7 @@ var script = {
|
|
|
237
237
|
const __vue_script__ = script;
|
|
238
238
|
|
|
239
239
|
/* template */
|
|
240
|
-
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"position-relative"},[_c('chart',_vm._g(_vm._b({attrs:{"options":_vm.options},on:{"created":_vm.onCreated}},'chart',_vm.$attrs,false),_vm.$listeners)),_vm._v(" "),(_vm.chart)?_c('chart-tooltip',{attrs:{"show":_vm.showTooltip,"chart":_vm.chart,"top":_vm.tooltipPosition.top,"left":_vm.tooltipPosition.left}
|
|
240
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"position-relative"},[_c('chart',_vm._g(_vm._b({attrs:{"options":_vm.options},on:{"created":_vm.onCreated}},'chart',_vm.$attrs,false),_vm.$listeners)),_vm._v(" "),(_vm.chart)?_c('chart-tooltip',{attrs:{"show":_vm.showTooltip,"chart":_vm.chart,"top":_vm.tooltipPosition.top,"left":_vm.tooltipPosition.left},scopedSlots:_vm._u([{key:"title",fn:function(){return [_c('div',[_vm._v(_vm._s(_vm.tooltipTitle)+" ("+_vm._s(_vm.yAxisTitle)+")")])]},proxy:true}],null,false,1644826356)},[_vm._v(" "),_c('tooltip-default-format',{attrs:{"tooltip-content":_vm.tooltipContent}})],1):_vm._e()],1)};
|
|
241
241
|
var __vue_staticRenderFns__ = [];
|
|
242
242
|
|
|
243
243
|
/* style */
|
|
@@ -192,7 +192,7 @@ var script = {
|
|
|
192
192
|
const __vue_script__ = script;
|
|
193
193
|
|
|
194
194
|
/* template */
|
|
195
|
-
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{directives:[{name:"resize-observer",rawName:"v-resize-observer",value:(_vm.handleResize),expression:"handleResize"}],staticClass:"
|
|
195
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{directives:[{name:"resize-observer",rawName:"v-resize-observer",value:(_vm.handleResize),expression:"handleResize"}],staticClass:"gl-display-flex gl-align-items-center",on:{"mouseleave":_vm.hideTooltip}},[_vm._t("default"),_vm._v(" "),_c('div',{staticClass:"gl-flex-grow-1 gl-relative"},[_c('chart',{attrs:{"height":_vm.height,"options":_vm.options},on:{"created":_vm.onChartCreated}}),_vm._v(" "),(_vm.chartInstance)?_c('chart-tooltip',{style:({ pointerEvents: 'none' }),attrs:{"show":_vm.tooltip.show,"chart":_vm.chartInstance,"top":_vm.tooltip.position.top,"left":_vm.tooltip.position.left,"placement":"top"},scopedSlots:_vm._u([{key:"title",fn:function(){return [_c('div',{staticClass:"gl-white-space-nowrap",attrs:{"data-testid":"tooltip-title"}},[_vm._v("\n "+_vm._s(_vm.tooltip.title)+"\n ")])]},proxy:true},{key:"default",fn:function(){return [_c('div',{staticClass:"gl-display-flex",attrs:{"data-testid":"tooltip-content"}},[(_vm.tooltipLabel)?_c('span',{staticClass:"gl-pr-6 gl-mr-auto"},[_vm._v(_vm._s(_vm.tooltipLabel))]):_vm._e(),_vm._v(" "),_c('strong',[_vm._v(_vm._s(_vm.tooltip.content))])])]},proxy:true}],null,false,2830367259)}):_vm._e()],1),_vm._v(" "),(_vm.showLastYValue)?_c('span',{staticClass:"gl-display-inline-flex gl-justify-content-center gl-ml-5",attrs:{"data-testid":"last-y-value"}},[_vm._v("\n "+_vm._s(_vm.lastYValue)+"\n ")]):_vm._e()],2)};
|
|
196
196
|
var __vue_staticRenderFns__ = [];
|
|
197
197
|
|
|
198
198
|
/* style */
|
|
@@ -322,7 +322,7 @@ var script = {
|
|
|
322
322
|
const __vue_script__ = script;
|
|
323
323
|
|
|
324
324
|
/* template */
|
|
325
|
-
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"position-relative"},[_c('chart',_vm._g(_vm._b({attrs:{"options":_vm.options},on:{"created":_vm.onCreated}},'chart',_vm.$attrs,false),_vm.$listeners)),_vm._v(" "),(_vm.chart)?_c('chart-tooltip',{attrs:{"show":_vm.showTooltip,"chart":_vm.chart,"top":_vm.tooltipPosition.top,"left":_vm.tooltipPosition.left}
|
|
325
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"position-relative"},[_c('chart',_vm._g(_vm._b({attrs:{"options":_vm.options},on:{"created":_vm.onCreated}},'chart',_vm.$attrs,false),_vm.$listeners)),_vm._v(" "),(_vm.chart)?_c('chart-tooltip',{attrs:{"show":_vm.showTooltip,"chart":_vm.chart,"top":_vm.tooltipPosition.top,"left":_vm.tooltipPosition.left},scopedSlots:_vm._u([{key:"title",fn:function(){return [_vm._t("tooltip-title",[_vm._v(_vm._s(_vm.tooltipTitle)+" ("+_vm._s(_vm.xAxisTitle)+")")])]},proxy:true}],null,true)},[_vm._v(" "),_vm._t("tooltip-content",[_c('tooltip-default-format',{attrs:{"tooltip-content":_vm.tooltipContent}})])],2):_vm._e(),_vm._v(" "),(_vm.compiledOptions)?_c('chart-legend',{style:(_vm.legendStyle),attrs:{"chart":_vm.chart,"series-info":_vm.seriesInfo,"text-style":_vm.compiledOptions.textStyle,"min-text":_vm.legendMinText,"max-text":_vm.legendMaxText,"average-text":_vm.legendAverageText,"current-text":_vm.legendCurrentText,"layout":_vm.legendLayout}}):_vm._e()],1)};
|
|
326
326
|
var __vue_staticRenderFns__ = [];
|
|
327
327
|
|
|
328
328
|
/* style */
|
package/package.json
CHANGED
|
@@ -1,16 +1,8 @@
|
|
|
1
|
-
import { documentedStoriesOf } from '../../../../documentation/documented_stories';
|
|
2
1
|
import readme from './carousel.md';
|
|
3
2
|
import GlCarousel from './carousel.vue';
|
|
4
3
|
import GlCarouselSlide from './carousel_slide.vue';
|
|
5
4
|
|
|
6
|
-
const
|
|
7
|
-
GlCarousel,
|
|
8
|
-
GlCarouselSlide,
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
documentedStoriesOf('base/carousel', readme).add('default carousel', () => ({
|
|
12
|
-
components,
|
|
13
|
-
template: `
|
|
5
|
+
const template = `
|
|
14
6
|
<gl-carousel
|
|
15
7
|
:interval="0"
|
|
16
8
|
controls
|
|
@@ -34,5 +26,26 @@ documentedStoriesOf('base/carousel', readme).add('default carousel', () => ({
|
|
|
34
26
|
|
|
35
27
|
<!-- Slides with image only -->
|
|
36
28
|
<gl-carousel-slide img-src="./img/carousel_slide3.jpg"/>
|
|
37
|
-
</gl-carousel
|
|
38
|
-
|
|
29
|
+
</gl-carousel>
|
|
30
|
+
`;
|
|
31
|
+
|
|
32
|
+
const Template = () => ({
|
|
33
|
+
components: { GlCarousel, GlCarouselSlide },
|
|
34
|
+
template,
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
export const Default = Template.bind({});
|
|
38
|
+
|
|
39
|
+
export default {
|
|
40
|
+
title: 'base/carousel',
|
|
41
|
+
component: GlCarousel,
|
|
42
|
+
parameters: {
|
|
43
|
+
bootstrapComponent: 'b-carousel',
|
|
44
|
+
knobs: { disable: true },
|
|
45
|
+
docs: {
|
|
46
|
+
description: {
|
|
47
|
+
component: readme,
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
};
|
|
@@ -189,6 +189,7 @@ export default {
|
|
|
189
189
|
|
|
190
190
|
const handlers = {
|
|
191
191
|
Enter: () => {
|
|
192
|
+
e.preventDefault();
|
|
192
193
|
if (suggestedValue != null) {
|
|
193
194
|
this.applySuggestion(suggestedValue);
|
|
194
195
|
} else {
|
|
@@ -197,10 +198,12 @@ export default {
|
|
|
197
198
|
},
|
|
198
199
|
':': () => {
|
|
199
200
|
if (suggestedValue != null) {
|
|
201
|
+
e.preventDefault();
|
|
200
202
|
this.applySuggestion(suggestedValue);
|
|
201
203
|
}
|
|
202
204
|
},
|
|
203
205
|
Escape: () => {
|
|
206
|
+
e.preventDefault();
|
|
204
207
|
this.$emit('complete');
|
|
205
208
|
},
|
|
206
209
|
};
|
|
@@ -217,7 +220,6 @@ export default {
|
|
|
217
220
|
}
|
|
218
221
|
|
|
219
222
|
if (Object.keys(handlers).includes(key)) {
|
|
220
|
-
e.preventDefault();
|
|
221
223
|
handlers[key]();
|
|
222
224
|
return;
|
|
223
225
|
}
|
|
@@ -244,6 +246,7 @@ export default {
|
|
|
244
246
|
<div
|
|
245
247
|
class="gl-filtered-search-token-segment"
|
|
246
248
|
:class="{ 'gl-filtered-search-token-segment-active': active }"
|
|
249
|
+
data-testid="filtered-search-token-segment"
|
|
247
250
|
@mousedown.left="emitIfInactive"
|
|
248
251
|
>
|
|
249
252
|
<template v-if="active">
|
|
@@ -210,6 +210,7 @@ export default {
|
|
|
210
210
|
:title="clearButtonTitle"
|
|
211
211
|
:tooltip-container="tooltipContainer"
|
|
212
212
|
class="gl-search-box-by-click-icon-button gl-search-box-by-click-clear-button gl-clear-icon-button"
|
|
213
|
+
data-testid="filtered-search-clear-button"
|
|
213
214
|
@click="clearInput"
|
|
214
215
|
/>
|
|
215
216
|
<template #append class="gl-search-box-by-click-input-group-control">
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils';
|
|
2
2
|
import Chart from '../chart/chart.vue';
|
|
3
3
|
import BarChart from './bar.vue';
|
|
4
|
-
import ChartTooltip from '~/components/charts/tooltip/tooltip.vue';
|
|
5
4
|
import TooltipDefaultFormat from '~/components/shared_components/charts/tooltip_default_format.vue';
|
|
6
5
|
|
|
7
6
|
const mockChartInstance = {
|
|
@@ -34,7 +33,6 @@ describe('Bar chart component', () => {
|
|
|
34
33
|
let wrapper;
|
|
35
34
|
|
|
36
35
|
const findChart = () => wrapper.findComponent(Chart);
|
|
37
|
-
const findChartTooltip = () => wrapper.findComponent(ChartTooltip);
|
|
38
36
|
const getOptions = () => findChart().props('options');
|
|
39
37
|
const emitChartCreated = () => findChart().vm.$emit('created', mockChartInstance);
|
|
40
38
|
|
|
@@ -123,19 +121,6 @@ describe('Bar chart component', () => {
|
|
|
123
121
|
);
|
|
124
122
|
});
|
|
125
123
|
});
|
|
126
|
-
|
|
127
|
-
it('render accurate tooltip title and content', () => {
|
|
128
|
-
const expectedTooltipTitle = `${labelParams.value} (${defaultChartProps.yAxisTitle})`;
|
|
129
|
-
|
|
130
|
-
getOptions().yAxis.axisPointer.label.formatter(labelParams);
|
|
131
|
-
return wrapper.vm.$nextTick(() => {
|
|
132
|
-
const tooltipTextContent = findChartTooltip().element.textContent;
|
|
133
|
-
|
|
134
|
-
expect(tooltipTextContent).toContain(expectedTooltipTitle);
|
|
135
|
-
expect(tooltipTextContent).toContain(defaultChartProps.xAxisTitle);
|
|
136
|
-
expect(tooltipTextContent).toContain(labelParams.seriesData[0].data[0]);
|
|
137
|
-
});
|
|
138
|
-
});
|
|
139
124
|
});
|
|
140
125
|
});
|
|
141
126
|
});
|
|
@@ -238,8 +238,9 @@ export default {
|
|
|
238
238
|
:top="tooltipPosition.top"
|
|
239
239
|
:left="tooltipPosition.left"
|
|
240
240
|
>
|
|
241
|
-
|
|
242
|
-
|
|
241
|
+
<template #title>
|
|
242
|
+
<div>{{ tooltipTitle }} ({{ yAxisTitle }})</div>
|
|
243
|
+
</template>
|
|
243
244
|
<tooltip-default-format :tooltip-content="tooltipContent" />
|
|
244
245
|
</chart-tooltip>
|
|
245
246
|
</div>
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { shallowMount, createLocalVue } from '@vue/test-utils';
|
|
2
2
|
import Chart from '../chart/chart.vue';
|
|
3
|
-
import ChartTooltip from '../tooltip/tooltip.vue';
|
|
4
3
|
import SparklineChart from './sparkline.vue';
|
|
5
4
|
import { waitForAnimationFrame } from '~/utils/test_utils';
|
|
6
5
|
|
|
@@ -12,18 +11,6 @@ const mockChartInstance = {
|
|
|
12
11
|
resize: mockResize,
|
|
13
12
|
};
|
|
14
13
|
|
|
15
|
-
// echarts need to be mocked to prevent prop-validation in chart-tooltips to fail
|
|
16
|
-
jest.mock('echarts', () => ({
|
|
17
|
-
getInstanceByDom: () => mockChartInstance,
|
|
18
|
-
}));
|
|
19
|
-
|
|
20
|
-
jest.mock('~/utils/charts/theme', () => ({
|
|
21
|
-
sparkline: {
|
|
22
|
-
variants: { foo: 'foo', bar: 'bar' },
|
|
23
|
-
defaultVariant: 'foo',
|
|
24
|
-
},
|
|
25
|
-
}));
|
|
26
|
-
|
|
27
14
|
let triggerResize = () => {};
|
|
28
15
|
jest.mock('~/directives/resize_observer/resize_observer', () => ({
|
|
29
16
|
GlResizeObserverDirective: {
|
|
@@ -35,6 +22,11 @@ jest.mock('~/directives/resize_observer/resize_observer', () => ({
|
|
|
35
22
|
|
|
36
23
|
const localVue = createLocalVue();
|
|
37
24
|
|
|
25
|
+
const ChartToolTipStub = {
|
|
26
|
+
name: 'chart-tooltip-stub',
|
|
27
|
+
template: '<div><slot name="default"></slot><slot name="title"></slot></div>',
|
|
28
|
+
};
|
|
29
|
+
|
|
38
30
|
describe('sparkline chart component', () => {
|
|
39
31
|
let wrapper;
|
|
40
32
|
let componentOptions;
|
|
@@ -46,19 +38,23 @@ describe('sparkline chart component', () => {
|
|
|
46
38
|
variant: null,
|
|
47
39
|
},
|
|
48
40
|
scopedSlots: { latestSeriesEntry: jest.fn() },
|
|
41
|
+
stubs: {
|
|
42
|
+
'chart-tooltip': ChartToolTipStub,
|
|
43
|
+
},
|
|
49
44
|
};
|
|
50
45
|
|
|
51
46
|
wrapper = shallowMount(SparklineChart, componentOptions);
|
|
52
47
|
};
|
|
53
48
|
|
|
54
49
|
// helpers
|
|
50
|
+
const getByTestId = (id) => wrapper.find(`[data-testid="${id}"]`);
|
|
55
51
|
const getChart = () => wrapper.findComponent(Chart);
|
|
56
52
|
|
|
57
|
-
const getTooltip = () => wrapper.findComponent(
|
|
58
|
-
const getTooltipTitle = () =>
|
|
59
|
-
const getTooltipContent = () =>
|
|
53
|
+
const getTooltip = () => wrapper.findComponent(ChartToolTipStub);
|
|
54
|
+
const getTooltipTitle = () => getByTestId('tooltip-title');
|
|
55
|
+
const getTooltipContent = () => getByTestId('tooltip-content');
|
|
60
56
|
|
|
61
|
-
const getLastYValue = () =>
|
|
57
|
+
const getLastYValue = () => getByTestId('last-y-value');
|
|
62
58
|
|
|
63
59
|
const getChartOptions = () => getChart().props('options');
|
|
64
60
|
const getXAxisLabelFormatter = () => {
|
|
@@ -87,7 +83,7 @@ describe('sparkline chart component', () => {
|
|
|
87
83
|
});
|
|
88
84
|
|
|
89
85
|
it('emits `chartCreated`, which passes on the chart instance', () => {
|
|
90
|
-
expect(wrapper.emitted('chartCreated')
|
|
86
|
+
expect(wrapper.emitted('chartCreated')).toHaveLength(1);
|
|
91
87
|
expect(wrapper.emitted('chartCreated')[0][0]).toBe(mockChartInstance);
|
|
92
88
|
});
|
|
93
89
|
|
|
@@ -153,7 +149,7 @@ describe('sparkline chart component', () => {
|
|
|
153
149
|
expect(getTooltip().attributes('show')).toBeFalsy();
|
|
154
150
|
});
|
|
155
151
|
|
|
156
|
-
it('adds the right content to the tooltip', () => {
|
|
152
|
+
it('adds the right content to the tooltip', async () => {
|
|
157
153
|
const xValue = 'foo';
|
|
158
154
|
const yValue = 'bar';
|
|
159
155
|
const mockData = { seriesData: [{ data: [xValue, yValue] }] };
|
|
@@ -163,10 +159,9 @@ describe('sparkline chart component', () => {
|
|
|
163
159
|
expect(getTooltipTitle().text()).toBe('');
|
|
164
160
|
expect(getTooltipContent().text()).toBe('');
|
|
165
161
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
});
|
|
162
|
+
await waitForAnimationFrame();
|
|
163
|
+
expect(getTooltipTitle().text()).toBe(xValue);
|
|
164
|
+
expect(getTooltipContent().text()).toBe(yValue);
|
|
170
165
|
});
|
|
171
166
|
|
|
172
167
|
it(`shows the last entry's y-value per default`, async () => {
|
|
@@ -182,13 +177,12 @@ describe('sparkline chart component', () => {
|
|
|
182
177
|
expect(getLastYValue().text()).toBe(latestEntryYValue);
|
|
183
178
|
});
|
|
184
179
|
|
|
185
|
-
it(`does not show the last entry's y-value if 'showLastYValue' is false`, () => {
|
|
180
|
+
it(`does not show the last entry's y-value if 'showLastYValue' is false`, async () => {
|
|
186
181
|
expect(getLastYValue().exists()).toBe(true);
|
|
187
182
|
|
|
188
183
|
wrapper.setProps({ showLastYValue: false });
|
|
189
184
|
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
});
|
|
185
|
+
await wrapper.vm.$nextTick();
|
|
186
|
+
expect(getLastYValue().exists()).toBe(false);
|
|
193
187
|
});
|
|
194
188
|
});
|
|
@@ -174,9 +174,13 @@ export default {
|
|
|
174
174
|
</script>
|
|
175
175
|
|
|
176
176
|
<template>
|
|
177
|
-
<div
|
|
177
|
+
<div
|
|
178
|
+
v-resize-observer="handleResize"
|
|
179
|
+
class="gl-display-flex gl-align-items-center"
|
|
180
|
+
@mouseleave="hideTooltip"
|
|
181
|
+
>
|
|
178
182
|
<slot name="default"></slot>
|
|
179
|
-
<div class="flex-grow-1
|
|
183
|
+
<div class="gl-flex-grow-1 gl-relative">
|
|
180
184
|
<chart :height="height" :options="options" @created="onChartCreated" />
|
|
181
185
|
<chart-tooltip
|
|
182
186
|
v-if="chartInstance"
|
|
@@ -187,17 +191,25 @@ export default {
|
|
|
187
191
|
:style="{ pointerEvents: 'none' }"
|
|
188
192
|
placement="top"
|
|
189
193
|
>
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
194
|
+
<template #title>
|
|
195
|
+
<div data-testid="tooltip-title" class="gl-white-space-nowrap">
|
|
196
|
+
{{ tooltip.title }}
|
|
197
|
+
</div>
|
|
198
|
+
</template>
|
|
199
|
+
<template #default>
|
|
200
|
+
<div class="gl-display-flex" data-testid="tooltip-content">
|
|
201
|
+
<span v-if="tooltipLabel" class="gl-pr-6 gl-mr-auto">{{ tooltipLabel }}</span>
|
|
202
|
+
<strong>{{ tooltip.content }}</strong>
|
|
203
|
+
</div>
|
|
204
|
+
</template>
|
|
197
205
|
</chart-tooltip>
|
|
198
206
|
</div>
|
|
199
|
-
<span
|
|
200
|
-
|
|
201
|
-
|
|
207
|
+
<span
|
|
208
|
+
v-if="showLastYValue"
|
|
209
|
+
class="gl-display-inline-flex gl-justify-content-center gl-ml-5"
|
|
210
|
+
data-testid="last-y-value"
|
|
211
|
+
>
|
|
212
|
+
{{ lastYValue }}
|
|
213
|
+
</span>
|
|
202
214
|
</div>
|
|
203
215
|
</template>
|
|
@@ -29,6 +29,15 @@ const defaultChartProps = {
|
|
|
29
29
|
yAxisTitle: 'Commits',
|
|
30
30
|
};
|
|
31
31
|
|
|
32
|
+
const ChartTooltipStub = {
|
|
33
|
+
props: ChartTooltip.props,
|
|
34
|
+
template: `
|
|
35
|
+
<div>
|
|
36
|
+
<slot name="title" />
|
|
37
|
+
<slot />
|
|
38
|
+
</div>`,
|
|
39
|
+
};
|
|
40
|
+
|
|
32
41
|
describe('stacked column chart component', () => {
|
|
33
42
|
let wrapper;
|
|
34
43
|
let options;
|
|
@@ -36,7 +45,7 @@ describe('stacked column chart component', () => {
|
|
|
36
45
|
const findChart = () => wrapper.findComponent(Chart);
|
|
37
46
|
const findLegend = () => wrapper.findComponent(ChartLegend);
|
|
38
47
|
const getOptions = () => findChart().props('options');
|
|
39
|
-
const findDataTooltip = () => wrapper.findComponent(
|
|
48
|
+
const findDataTooltip = () => wrapper.findComponent(ChartTooltipStub);
|
|
40
49
|
|
|
41
50
|
const emitChartCreated = () => findChart().vm.$emit('created', mockChartInstance);
|
|
42
51
|
|
|
@@ -45,6 +54,7 @@ describe('stacked column chart component', () => {
|
|
|
45
54
|
propsData: { ...defaultChartProps, ...props },
|
|
46
55
|
stubs: {
|
|
47
56
|
'tooltip-default-format': TooltipDefaultFormat,
|
|
57
|
+
ChartTooltip: ChartTooltipStub,
|
|
48
58
|
},
|
|
49
59
|
slots,
|
|
50
60
|
});
|
|
@@ -308,16 +308,13 @@ export default {
|
|
|
308
308
|
:top="tooltipPosition.top"
|
|
309
309
|
:left="tooltipPosition.left"
|
|
310
310
|
>
|
|
311
|
-
<template
|
|
312
|
-
|
|
313
|
-
<slot slot="title" name="tooltip-title"></slot>
|
|
314
|
-
<slot name="tooltip-content"></slot>
|
|
311
|
+
<template #title>
|
|
312
|
+
<slot name="tooltip-title">{{ tooltipTitle }} ({{ xAxisTitle }})</slot>
|
|
315
313
|
</template>
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
<div slot="title">{{ tooltipTitle }} ({{ xAxisTitle }})</div>
|
|
314
|
+
|
|
315
|
+
<slot name="tooltip-content">
|
|
319
316
|
<tooltip-default-format :tooltip-content="tooltipContent" />
|
|
320
|
-
</
|
|
317
|
+
</slot>
|
|
321
318
|
</chart-tooltip>
|
|
322
319
|
<chart-legend
|
|
323
320
|
v-if="compiledOptions"
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
2
|
-
|
|
3
|
-
/* script */
|
|
4
|
-
|
|
5
|
-
/* template */
|
|
6
|
-
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('gl-carousel',{staticStyle:{"text-shadow":"1px 1px 2px #333"},attrs:{"interval":4000,"controls":"","indicators":"","background":"#ababab","img-width":"1024","img-height":"480"}},[_c('gl-carousel-slide',{attrs:{"caption":"First slide","text":"Nulla vitae elit libero, a pharetra augue mollis interdum.","img-src":"https://picsum.photos/1024/480/?image=52"}}),_vm._v(" "),_c('gl-carousel-slide',{attrs:{"img-src":"https://picsum.photos/1024/480/?image=54"}},[_c('h1',[_vm._v("Hello world!")])]),_vm._v(" "),_c('gl-carousel-slide',{attrs:{"img-src":"https://picsum.photos/1024/480/?image=58"}})],1)};
|
|
7
|
-
var __vue_staticRenderFns__ = [];
|
|
8
|
-
|
|
9
|
-
/* style */
|
|
10
|
-
const __vue_inject_styles__ = undefined;
|
|
11
|
-
/* scoped */
|
|
12
|
-
const __vue_scope_id__ = undefined;
|
|
13
|
-
/* module identifier */
|
|
14
|
-
const __vue_module_identifier__ = undefined;
|
|
15
|
-
/* functional template */
|
|
16
|
-
const __vue_is_functional_template__ = false;
|
|
17
|
-
/* style inject */
|
|
18
|
-
|
|
19
|
-
/* style inject SSR */
|
|
20
|
-
|
|
21
|
-
/* style inject shadow dom */
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
const __vue_component__ = __vue_normalize__(
|
|
26
|
-
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
|
|
27
|
-
__vue_inject_styles__,
|
|
28
|
-
{},
|
|
29
|
-
__vue_scope_id__,
|
|
30
|
-
__vue_is_functional_template__,
|
|
31
|
-
__vue_module_identifier__,
|
|
32
|
-
false,
|
|
33
|
-
undefined,
|
|
34
|
-
undefined,
|
|
35
|
-
undefined
|
|
36
|
-
);
|
|
37
|
-
|
|
38
|
-
export default __vue_component__;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import CarouselBasicExample from './carousel.basic.example';
|
|
2
|
-
|
|
3
|
-
var index = [{
|
|
4
|
-
name: 'Basic',
|
|
5
|
-
items: [{
|
|
6
|
-
id: 'carousel-basic',
|
|
7
|
-
name: 'Basic',
|
|
8
|
-
description: 'Basic Carousel',
|
|
9
|
-
component: CarouselBasicExample
|
|
10
|
-
}]
|
|
11
|
-
}];
|
|
12
|
-
|
|
13
|
-
export default index;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<gl-carousel
|
|
3
|
-
:interval="4000"
|
|
4
|
-
controls
|
|
5
|
-
indicators
|
|
6
|
-
background="#ababab"
|
|
7
|
-
img-width="1024"
|
|
8
|
-
img-height="480"
|
|
9
|
-
style="text-shadow: 1px 1px 2px #333"
|
|
10
|
-
>
|
|
11
|
-
<!-- Text slides with image -->
|
|
12
|
-
<gl-carousel-slide
|
|
13
|
-
caption="First slide"
|
|
14
|
-
text="Nulla vitae elit libero, a pharetra augue mollis interdum."
|
|
15
|
-
img-src="https://picsum.photos/1024/480/?image=52"
|
|
16
|
-
/>
|
|
17
|
-
|
|
18
|
-
<!-- Slides with custom text -->
|
|
19
|
-
<gl-carousel-slide img-src="https://picsum.photos/1024/480/?image=54">
|
|
20
|
-
<h1>Hello world!</h1>
|
|
21
|
-
</gl-carousel-slide>
|
|
22
|
-
|
|
23
|
-
<!-- Slides with image only -->
|
|
24
|
-
<gl-carousel-slide img-src="https://picsum.photos/1024/480/?image=58" />
|
|
25
|
-
</gl-carousel>
|
|
26
|
-
</template>
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import CarouselBasicExample from './carousel.basic.example.vue';
|
|
2
|
-
|
|
3
|
-
export default [
|
|
4
|
-
{
|
|
5
|
-
name: 'Basic',
|
|
6
|
-
items: [
|
|
7
|
-
{
|
|
8
|
-
id: 'carousel-basic',
|
|
9
|
-
name: 'Basic',
|
|
10
|
-
description: 'Basic Carousel',
|
|
11
|
-
component: CarouselBasicExample,
|
|
12
|
-
},
|
|
13
|
-
],
|
|
14
|
-
},
|
|
15
|
-
];
|