@gitlab/ui 36.3.0 → 36.4.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/charts/single_stat/single_stat.documentation.js +1 -4
- package/dist/components/regions/empty_state/empty_state.js +3 -2
- package/documentation/documented_stories.js +1 -0
- package/package.json +1 -1
- package/src/components/charts/single_stat/single_stat.documentation.js +0 -2
- package/src/components/charts/single_stat/single_stat.md +0 -2
- package/src/components/charts/single_stat/single_stat.stories.js +73 -80
- package/src/components/regions/empty_state/empty_state.spec.js +49 -0
- package/src/components/regions/empty_state/empty_state.vue +11 -8
- package/dist/components/charts/single_stat/examples/index.js +0 -32
- package/dist/components/charts/single_stat/examples/single_stat.badge.example.js +0 -38
- package/dist/components/charts/single_stat/examples/single_stat.hover.example.js +0 -38
- package/dist/components/charts/single_stat/examples/single_stat.meta_icon.example.js +0 -38
- package/dist/components/charts/single_stat/examples/single_stat.simple.example.js +0 -38
- package/dist/components/charts/single_stat/examples/single_stat.title_icon.example.js +0 -38
- package/src/components/charts/single_stat/examples/index.js +0 -38
- package/src/components/charts/single_stat/examples/single_stat.badge.example.vue +0 -31
- package/src/components/charts/single_stat/examples/single_stat.hover.example.vue +0 -7
- package/src/components/charts/single_stat/examples/single_stat.meta_icon.example.vue +0 -10
- package/src/components/charts/single_stat/examples/single_stat.simple.example.vue +0 -7
- package/src/components/charts/single_stat/examples/single_stat.title_icon.example.vue +0 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [36.4.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v36.3.0...v36.4.0) (2022-02-09)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **GlEmptyState:** make title into a slot ([45bacac](https://gitlab.com/gitlab-org/gitlab-ui/commit/45bacac972a7c4748e1fc96e1605615f816cb8ed))
|
|
7
|
+
|
|
1
8
|
# [36.3.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v36.2.0...v36.3.0) (2022-02-08)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var description = "### Single Stat\n\nThe single stat component is used to show a single value. The color of the meta icon / badge is\ndetermined by the **variant** prop, which can be one of \"success\", \"warning\", \"danger\", \"info\",\n\"neutral\" or \"muted\" (default).\n\n#### Hover state\n\nYou can make the component focusable by adding a `tabindex=0` attribute to it. This will also apply\na hover state to the component.\n";
|
|
1
|
+
var description = "The single stat component is used to show a single value. The color of the meta icon / badge is\ndetermined by the **variant** prop, which can be one of \"success\", \"warning\", \"danger\", \"info\",\n\"neutral\" or \"muted\" (default).\n\n#### Hover state\n\nYou can make the component focusable by adding a `tabindex=0` attribute to it. This will also apply\na hover state to the component.\n";
|
|
4
2
|
|
|
5
3
|
var single_stat_documentation = {
|
|
6
|
-
examples,
|
|
7
4
|
description
|
|
8
5
|
};
|
|
9
6
|
|
|
@@ -11,7 +11,8 @@ var script = {
|
|
|
11
11
|
*/
|
|
12
12
|
title: {
|
|
13
13
|
type: String,
|
|
14
|
-
required:
|
|
14
|
+
required: false,
|
|
15
|
+
default: null
|
|
15
16
|
},
|
|
16
17
|
|
|
17
18
|
/**
|
|
@@ -113,7 +114,7 @@ const __vue_script__ = script;
|
|
|
113
114
|
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('section',{staticClass:"gl-display-flex",class:{
|
|
114
115
|
'empty-state gl-text-center gl-flex-direction-column': !_vm.compact,
|
|
115
116
|
'gl-flex-direction-row': _vm.compact,
|
|
116
|
-
}},[_c('div',{class:{ 'gl-display-none gl-sm-display-block gl-px-4': _vm.compact, 'gl-max-w-full': !_vm.compact }},[(_vm.svgPath)?_c('div',{staticClass:"svg-250",class:{ 'svg-content': !_vm.compact }},[_c('img',{staticClass:"gl-max-w-full",attrs:{"src":_vm.svgPath,"alt":"","role":"img","height":_vm.height}})]):_vm._e()]),_vm._v(" "),_c('div',{class:_vm.compact ? 'gl-flex-grow-1 gl-flex-basis-0 gl-px-4' : 'gl-max-w-full gl-m-auto'},[_c('div',{staticClass:"gl-mx-auto gl-my-0",class:{ 'gl-p-5': !_vm.compact }},[_c('h1',{
|
|
117
|
+
}},[_c('div',{class:{ 'gl-display-none gl-sm-display-block gl-px-4': _vm.compact, 'gl-max-w-full': !_vm.compact }},[(_vm.svgPath)?_c('div',{staticClass:"svg-250",class:{ 'svg-content': !_vm.compact }},[_c('img',{staticClass:"gl-max-w-full",attrs:{"src":_vm.svgPath,"alt":"","role":"img","height":_vm.height}})]):_vm._e()]),_vm._v(" "),_c('div',{class:_vm.compact ? 'gl-flex-grow-1 gl-flex-basis-0 gl-px-4' : 'gl-max-w-full gl-m-auto'},[_c('div',{staticClass:"gl-mx-auto gl-my-0",class:{ 'gl-p-5': !_vm.compact }},[_vm._t("title",[_c('h1',{staticClass:"gl-font-size-h-display gl-line-height-36",class:_vm.compact ? 'h5' : 'h4'},[_vm._v("\n "+_vm._s(_vm.title)+"\n ")])]),_vm._v(" "),(_vm.description || _vm.$scopedSlots.description)?_c('p',{ref:"description",staticClass:"gl-mt-3"},[_vm._t("description",[_vm._v("\n "+_vm._s(_vm.description)+"\n ")])],2):_vm._e(),_vm._v(" "),_c('div',{staticClass:"gl-display-flex gl-flex-wrap",class:{ 'gl-justify-content-center': !_vm.compact }},[_vm._t("actions",[(_vm.shouldRenderPrimaryButton)?_c('gl-button',{staticClass:"gl-mb-3",class:_vm.compact ? 'gl-mr-3' : 'gl-mx-2',attrs:{"variant":"confirm","href":_vm.primaryButtonLink}},[_vm._v(_vm._s(_vm.primaryButtonText))]):_vm._e(),_vm._v(" "),(_vm.shouldRenderSecondaryButton)?_c('gl-button',{staticClass:"gl-mb-3 gl-mr-3",class:{ 'gl-mx-2!': !_vm.compact },attrs:{"href":_vm.secondaryButtonLink}},[_vm._v(_vm._s(_vm.secondaryButtonText)+"\n ")]):_vm._e()])],2)],2)])])};
|
|
117
118
|
var __vue_staticRenderFns__ = [];
|
|
118
119
|
|
|
119
120
|
/* style */
|
package/package.json
CHANGED
|
@@ -1,100 +1,93 @@
|
|
|
1
1
|
import iconSpriteInfo from '@gitlab/svgs/dist/icons.json';
|
|
2
|
-
import { withKnobs, text, select, boolean, number } from '@storybook/addon-knobs';
|
|
3
2
|
import { GlSingleStat } from '../../../charts';
|
|
4
|
-
import { documentedStoriesOf } from '../../../../documentation/documented_stories';
|
|
5
3
|
import { badgeVariantOptions } from '../../../utils/constants';
|
|
6
4
|
import readme from './single_stat.md';
|
|
7
5
|
|
|
8
|
-
const components = {
|
|
9
|
-
GlSingleStat,
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
const template = `
|
|
13
|
-
<gl-single-stat
|
|
14
|
-
:title="title"
|
|
15
|
-
:value="value"
|
|
16
|
-
:unit="unit"
|
|
17
|
-
:variant="variant"
|
|
18
|
-
:meta-text="metaText"
|
|
19
|
-
:meta-icon="metaIcon"
|
|
20
|
-
:title-icon="titleIcon"
|
|
21
|
-
:should-animate="shouldAnimate"
|
|
22
|
-
:animation-decimal-places="animationDecimalPlaces"
|
|
23
|
-
/>
|
|
24
|
-
`;
|
|
25
|
-
|
|
26
6
|
const generateProps = ({
|
|
27
7
|
variant = GlSingleStat.props.variant.default,
|
|
28
8
|
title = 'Single stat',
|
|
29
9
|
value = '100',
|
|
30
|
-
unit =
|
|
31
|
-
metaText =
|
|
10
|
+
unit = '',
|
|
11
|
+
metaText = '',
|
|
32
12
|
metaIcon = null,
|
|
33
13
|
titleIcon = null,
|
|
34
14
|
shouldAnimate = false,
|
|
35
15
|
animationDecimalPlaces = 0,
|
|
36
16
|
} = {}) => ({
|
|
37
|
-
variant
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
type: String,
|
|
47
|
-
default: text('value', value),
|
|
48
|
-
},
|
|
49
|
-
unit: {
|
|
50
|
-
type: [String, Number],
|
|
51
|
-
default: text('unit', unit),
|
|
52
|
-
},
|
|
53
|
-
metaText: {
|
|
54
|
-
type: String,
|
|
55
|
-
default: text('metaText', metaText),
|
|
56
|
-
},
|
|
57
|
-
metaIcon: {
|
|
58
|
-
type: String,
|
|
59
|
-
default: select('metaIcon', ['', ...iconSpriteInfo.icons], metaIcon),
|
|
60
|
-
},
|
|
61
|
-
titleIcon: {
|
|
62
|
-
type: String,
|
|
63
|
-
default: select('titleIcon', ['', ...iconSpriteInfo.icons], titleIcon),
|
|
64
|
-
},
|
|
65
|
-
shouldAnimate: {
|
|
66
|
-
type: Boolean,
|
|
67
|
-
default: boolean('shouldAnimate', shouldAnimate),
|
|
68
|
-
},
|
|
69
|
-
animationDecimalPlaces: {
|
|
70
|
-
type: Number,
|
|
71
|
-
default: number('animationDecimalPlaces', animationDecimalPlaces),
|
|
72
|
-
},
|
|
17
|
+
variant,
|
|
18
|
+
title,
|
|
19
|
+
value,
|
|
20
|
+
unit,
|
|
21
|
+
metaText,
|
|
22
|
+
metaIcon,
|
|
23
|
+
titleIcon,
|
|
24
|
+
shouldAnimate,
|
|
25
|
+
animationDecimalPlaces,
|
|
73
26
|
});
|
|
74
27
|
|
|
75
28
|
const metaText = 'Super fast';
|
|
76
29
|
const metaIcon = 'check-circle';
|
|
77
30
|
const titleIcon = 'hourglass';
|
|
78
31
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
32
|
+
const Template = (args, { argTypes }) => ({
|
|
33
|
+
components: {
|
|
34
|
+
GlSingleStat,
|
|
35
|
+
},
|
|
36
|
+
props: Object.keys(argTypes),
|
|
37
|
+
template: `
|
|
38
|
+
<gl-single-stat
|
|
39
|
+
:title="title"
|
|
40
|
+
:value="value"
|
|
41
|
+
:unit="unit"
|
|
42
|
+
:variant="variant"
|
|
43
|
+
:meta-text="metaText"
|
|
44
|
+
:meta-icon="metaIcon"
|
|
45
|
+
:title-icon="titleIcon"
|
|
46
|
+
:should-animate="shouldAnimate"
|
|
47
|
+
:animation-decimal-places="animationDecimalPlaces"
|
|
48
|
+
/>`,
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
export const Default = Template.bind({});
|
|
52
|
+
Default.args = generateProps();
|
|
53
|
+
|
|
54
|
+
export const WithBadge = Template.bind({});
|
|
55
|
+
WithBadge.args = generateProps({ metaText, metaIcon });
|
|
56
|
+
|
|
57
|
+
export const WithMetaIcon = Template.bind({});
|
|
58
|
+
WithMetaIcon.args = generateProps({ metaIcon });
|
|
59
|
+
|
|
60
|
+
export const WithTitleIcon = Template.bind({});
|
|
61
|
+
WithTitleIcon.args = generateProps({ titleIcon });
|
|
62
|
+
|
|
63
|
+
export default {
|
|
64
|
+
title: 'charts/single-stat',
|
|
65
|
+
component: GlSingleStat,
|
|
66
|
+
parameters: {
|
|
67
|
+
knobs: { disable: true },
|
|
68
|
+
docs: {
|
|
69
|
+
description: {
|
|
70
|
+
component: readme,
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
argTypes: {
|
|
75
|
+
variant: {
|
|
76
|
+
options: Object.values(badgeVariantOptions),
|
|
77
|
+
control: {
|
|
78
|
+
type: 'select',
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
metaIcon: {
|
|
82
|
+
options: iconSpriteInfo.icons,
|
|
83
|
+
control: 'select',
|
|
84
|
+
},
|
|
85
|
+
titleIcon: {
|
|
86
|
+
options: iconSpriteInfo.icons,
|
|
87
|
+
control: 'select',
|
|
88
|
+
},
|
|
89
|
+
unit: {
|
|
90
|
+
control: 'text',
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
};
|
|
@@ -148,6 +148,55 @@ describe('empty state component', () => {
|
|
|
148
148
|
});
|
|
149
149
|
});
|
|
150
150
|
|
|
151
|
+
describe('with different titles', () => {
|
|
152
|
+
it('should render title from prop', () => {
|
|
153
|
+
component = shallowMount(EmptyState, {
|
|
154
|
+
propsData: {
|
|
155
|
+
...props,
|
|
156
|
+
},
|
|
157
|
+
});
|
|
158
|
+
|
|
159
|
+
const title = component.find('h1');
|
|
160
|
+
expect(title.text()).toBe(props.title);
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
it('should render title from slot', () => {
|
|
164
|
+
const slotTitle = 'Slotted title';
|
|
165
|
+
|
|
166
|
+
component = shallowMount(EmptyState, {
|
|
167
|
+
propsData: {
|
|
168
|
+
...props,
|
|
169
|
+
title: null,
|
|
170
|
+
},
|
|
171
|
+
slots: {
|
|
172
|
+
title: `<strong id="slotted">${slotTitle}</strong>`,
|
|
173
|
+
},
|
|
174
|
+
});
|
|
175
|
+
|
|
176
|
+
const title = component.find('#slotted');
|
|
177
|
+
expect(title.text()).toBe(slotTitle);
|
|
178
|
+
});
|
|
179
|
+
|
|
180
|
+
it('should render a slotted title over a props title', () => {
|
|
181
|
+
const slotTitle = 'Slotted title';
|
|
182
|
+
|
|
183
|
+
component = shallowMount(EmptyState, {
|
|
184
|
+
propsData: {
|
|
185
|
+
...props,
|
|
186
|
+
},
|
|
187
|
+
slots: {
|
|
188
|
+
title: `<strong id="slotted">${slotTitle}</strong>`,
|
|
189
|
+
},
|
|
190
|
+
});
|
|
191
|
+
|
|
192
|
+
const title = component.find('#slotted');
|
|
193
|
+
const propTitle = component.find('h1');
|
|
194
|
+
|
|
195
|
+
expect(title.text()).toBe(slotTitle);
|
|
196
|
+
expect(propTitle.exists()).toBe(false);
|
|
197
|
+
});
|
|
198
|
+
});
|
|
199
|
+
|
|
151
200
|
describe('with different descriptions', () => {
|
|
152
201
|
it('should render description from prop', () => {
|
|
153
202
|
component = shallowMount(EmptyState, {
|
|
@@ -11,7 +11,8 @@ export default {
|
|
|
11
11
|
*/
|
|
12
12
|
title: {
|
|
13
13
|
type: String,
|
|
14
|
-
required:
|
|
14
|
+
required: false,
|
|
15
|
+
default: null,
|
|
15
16
|
},
|
|
16
17
|
/**
|
|
17
18
|
* The illustration's URL.
|
|
@@ -112,13 +113,15 @@ export default {
|
|
|
112
113
|
</div>
|
|
113
114
|
<div :class="compact ? 'gl-flex-grow-1 gl-flex-basis-0 gl-px-4' : 'gl-max-w-full gl-m-auto'">
|
|
114
115
|
<div class="gl-mx-auto gl-my-0" :class="{ 'gl-p-5': !compact }">
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
>
|
|
120
|
-
|
|
121
|
-
|
|
116
|
+
<!--
|
|
117
|
+
@slot Use this slot to customize the empty state's title area.
|
|
118
|
+
Overrides the `title` prop.
|
|
119
|
+
-->
|
|
120
|
+
<slot ref="title" name="title">
|
|
121
|
+
<h1 class="gl-font-size-h-display gl-line-height-36" :class="compact ? 'h5' : 'h4'">
|
|
122
|
+
{{ title }}
|
|
123
|
+
</h1>
|
|
124
|
+
</slot>
|
|
122
125
|
<p v-if="description || $scopedSlots.description" ref="description" class="gl-mt-3">
|
|
123
126
|
<!--
|
|
124
127
|
@slot Use this slot to customize the empty state's description
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import SingleStatBadgeExample from './single_stat.badge.example';
|
|
2
|
-
import SingleStatHoverExample from './single_stat.hover.example';
|
|
3
|
-
import SingleStatIconExample from './single_stat.meta_icon.example';
|
|
4
|
-
import SingleStatSimpleExample from './single_stat.simple.example';
|
|
5
|
-
import SingleStatTitleIconExample from './single_stat.title_icon.example';
|
|
6
|
-
|
|
7
|
-
var index = [{
|
|
8
|
-
name: 'Basic',
|
|
9
|
-
items: [{
|
|
10
|
-
id: 'simple',
|
|
11
|
-
name: 'Simple',
|
|
12
|
-
component: SingleStatSimpleExample
|
|
13
|
-
}, {
|
|
14
|
-
id: 'metaIcon',
|
|
15
|
-
name: 'Meta Icon',
|
|
16
|
-
component: SingleStatIconExample
|
|
17
|
-
}, {
|
|
18
|
-
id: 'badge',
|
|
19
|
-
name: 'Badge',
|
|
20
|
-
component: SingleStatBadgeExample
|
|
21
|
-
}, {
|
|
22
|
-
id: 'titleIcon',
|
|
23
|
-
name: 'Title Icon',
|
|
24
|
-
component: SingleStatTitleIconExample
|
|
25
|
-
}, {
|
|
26
|
-
id: 'hover',
|
|
27
|
-
name: 'Hover',
|
|
28
|
-
component: SingleStatHoverExample
|
|
29
|
-
}]
|
|
30
|
-
}];
|
|
31
|
-
|
|
32
|
-
export default index;
|
|
@@ -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('div',{staticClass:"row"},[_c('div',{staticClass:"col-sm-4"},[_c('gl-single-stat',{attrs:{"title":"Success stat","value":"100","variant":"success","meta-text":"passed","meta-icon":"status_success_solid"}})],1),_vm._v(" "),_c('div',{staticClass:"col-sm-4"},[_c('gl-single-stat',{attrs:{"title":"Warning stat","value":"1000","variant":"warning","meta-text":"warning","meta-icon":"status-alert"}})],1),_vm._v(" "),_c('div',{staticClass:"col-sm-4"},[_c('gl-single-stat',{attrs:{"title":"Danger stat","value":"100000","variant":"danger","meta-text":"failed","meta-icon":"status-failed"}})],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,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('div',{staticClass:"row"},[_c('div',{staticClass:"col-sm-4"},[_c('gl-single-stat',{attrs:{"title":"Single stat","value":"100","tabindex":"0"}})],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,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('div',{staticClass:"row"},[_c('div',{staticClass:"col-sm-4"},[_c('gl-single-stat',{attrs:{"title":"Trend up","value":"100","variant":"success","meta-icon":"trend-up"}})],1),_vm._v(" "),_c('div',{staticClass:"col-sm-4"},[_c('gl-single-stat',{attrs:{"title":"Trend down","value":"100000","variant":"danger","meta-icon":"trend-down"}})],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,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('div',{staticClass:"row"},[_c('div',{staticClass:"col-sm-4"},[_c('gl-single-stat',{attrs:{"title":"Single stat","value":"100"}})],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,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('div',{staticClass:"row"},[_c('div',{staticClass:"col-sm-4"},[_c('gl-single-stat',{attrs:{"title":"Likes","value":"100,000","title-icon":"heart"}})],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,38 +0,0 @@
|
|
|
1
|
-
import SingleStatBadgeExample from './single_stat.badge.example.vue';
|
|
2
|
-
import SingleStatHoverExample from './single_stat.hover.example.vue';
|
|
3
|
-
import SingleStatIconExample from './single_stat.meta_icon.example.vue';
|
|
4
|
-
import SingleStatSimpleExample from './single_stat.simple.example.vue';
|
|
5
|
-
import SingleStatTitleIconExample from './single_stat.title_icon.example.vue';
|
|
6
|
-
|
|
7
|
-
export default [
|
|
8
|
-
{
|
|
9
|
-
name: 'Basic',
|
|
10
|
-
items: [
|
|
11
|
-
{
|
|
12
|
-
id: 'simple',
|
|
13
|
-
name: 'Simple',
|
|
14
|
-
component: SingleStatSimpleExample,
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
id: 'metaIcon',
|
|
18
|
-
name: 'Meta Icon',
|
|
19
|
-
component: SingleStatIconExample,
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
id: 'badge',
|
|
23
|
-
name: 'Badge',
|
|
24
|
-
component: SingleStatBadgeExample,
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
id: 'titleIcon',
|
|
28
|
-
name: 'Title Icon',
|
|
29
|
-
component: SingleStatTitleIconExample,
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
id: 'hover',
|
|
33
|
-
name: 'Hover',
|
|
34
|
-
component: SingleStatHoverExample,
|
|
35
|
-
},
|
|
36
|
-
],
|
|
37
|
-
},
|
|
38
|
-
];
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="row">
|
|
3
|
-
<div class="col-sm-4">
|
|
4
|
-
<gl-single-stat
|
|
5
|
-
title="Success stat"
|
|
6
|
-
value="100"
|
|
7
|
-
variant="success"
|
|
8
|
-
meta-text="passed"
|
|
9
|
-
meta-icon="status_success_solid"
|
|
10
|
-
/>
|
|
11
|
-
</div>
|
|
12
|
-
<div class="col-sm-4">
|
|
13
|
-
<gl-single-stat
|
|
14
|
-
title="Warning stat"
|
|
15
|
-
value="1000"
|
|
16
|
-
variant="warning"
|
|
17
|
-
meta-text="warning"
|
|
18
|
-
meta-icon="status-alert"
|
|
19
|
-
/>
|
|
20
|
-
</div>
|
|
21
|
-
<div class="col-sm-4">
|
|
22
|
-
<gl-single-stat
|
|
23
|
-
title="Danger stat"
|
|
24
|
-
value="100000"
|
|
25
|
-
variant="danger"
|
|
26
|
-
meta-text="failed"
|
|
27
|
-
meta-icon="status-failed"
|
|
28
|
-
/>
|
|
29
|
-
</div>
|
|
30
|
-
</div>
|
|
31
|
-
</template>
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="row">
|
|
3
|
-
<div class="col-sm-4">
|
|
4
|
-
<gl-single-stat title="Trend up" value="100" variant="success" meta-icon="trend-up" />
|
|
5
|
-
</div>
|
|
6
|
-
<div class="col-sm-4">
|
|
7
|
-
<gl-single-stat title="Trend down" value="100000" variant="danger" meta-icon="trend-down" />
|
|
8
|
-
</div>
|
|
9
|
-
</div>
|
|
10
|
-
</template>
|