@itfin/components 1.0.17 → 1.0.21
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/package.json +1 -1
- package/src/assets/scss/_variables.scss +8 -5
- package/src/assets/scss/components/_dropdown-menu.scss +3 -5
- package/src/assets/scss/components/_dropdown-toggle.scss +8 -3
- package/src/assets/scss/components/_selected.scss +15 -0
- package/src/assets/scss/components/_spinner.scss +2 -1
- package/src/assets/scss/directives/loading.scss +5 -0
- package/src/components/button/Button.vue +8 -13
- package/src/components/checkbox/Checkbox.vue +114 -0
- package/src/components/checkbox/CheckboxGroup.vue +54 -0
- package/src/components/checkbox/index.stories.js +74 -0
- package/src/components/datepicker/DatePicker.vue +11 -9
- package/src/components/datepicker/DateRangePicker.vue +11 -9
- package/src/components/icon/Icon.vue +12 -1
- package/src/components/icon/components/department.vue +8 -0
- package/src/components/icon/icons.js +246 -246
- package/src/components/modal/Modal.vue +3 -3
- package/src/components/select/Select.vue +19 -15
- package/src/components/select/index.stories.js +8 -1
- package/src/components/tooltip/Tooltip.vue +39 -0
- package/src/components/tooltip/index.stories.js +52 -0
- package/src/components/tree/TreeView.vue +82 -0
- package/src/components/tree/index.stories.js +86 -0
- package/src/index.stories.js +0 -25
- package/src/assets/loading.css +0 -49
- package/src/components/select/Deselect.vue +0 -3
- package/src/components/select/OpenIndicator.vue +0 -3
package/package.json
CHANGED
|
@@ -24,18 +24,21 @@ $link-color: #0B314F;
|
|
|
24
24
|
$input-btn-focus-width: .125rem;
|
|
25
25
|
|
|
26
26
|
$input-bg: #f3f3f3;
|
|
27
|
-
$input-border-color: #
|
|
27
|
+
$input-border-color: rgba(#000, .08);
|
|
28
28
|
$input-border-radius: 10px;
|
|
29
29
|
$input-font-family: 'Fira Mono', monospace;
|
|
30
30
|
|
|
31
|
-
$input-focus-bg: #
|
|
32
|
-
$input-focus-border-color: #
|
|
33
|
-
|
|
34
|
-
$input-focus-box-shadow: none;
|
|
31
|
+
$input-focus-bg: #fff;
|
|
32
|
+
$input-focus-border-color: #fff;
|
|
35
33
|
|
|
36
34
|
$form-label-margin-bottom: .1rem;
|
|
37
35
|
$input-focus-border: rgb(11 49 79 / 25%);
|
|
38
36
|
|
|
37
|
+
$form-check-input-border: 1px solid rgba(#000, .08);
|
|
38
|
+
$form-switch-focus-color: tint-color($primary, 50%);
|
|
39
|
+
$dropdown-link-hover-bg: tint-color($primary, 50%);
|
|
40
|
+
$dropdown-link-active-bg: tint-color($primary, 70%);
|
|
41
|
+
|
|
39
42
|
$modal-backdrop-bg: #fff;
|
|
40
43
|
$modal-backdrop-opacity: .7;
|
|
41
44
|
$modal-content-border-radius: 0;
|
|
@@ -12,19 +12,17 @@ $min-width: $vs-dropdown-min-width;
|
|
|
12
12
|
$max-height: $vs-dropdown-max-height;
|
|
13
13
|
|
|
14
14
|
.vs__dropdown-menu {
|
|
15
|
+
overflow-x: hidden;
|
|
16
|
+
overflow-y: auto;
|
|
15
17
|
display: block;
|
|
16
18
|
box-sizing: border-box;
|
|
17
19
|
position: absolute;
|
|
18
|
-
top: calc(100%
|
|
20
|
+
top: calc(100% + #{$border-width * 2}); // -{#$border-width} here ensures the left and right borders of the dropdown appear flush with the toggle.
|
|
19
21
|
left: 0;
|
|
20
22
|
z-index: $z-index;
|
|
21
23
|
width: 100%;
|
|
22
24
|
max-height: $max-height;
|
|
23
25
|
min-width: $min-width;
|
|
24
|
-
overflow-y: auto;
|
|
25
|
-
border-top-style: none;
|
|
26
|
-
border-top-left-radius: 0;
|
|
27
|
-
border-top-right-radius: 0;
|
|
28
26
|
text-align: left;
|
|
29
27
|
list-style: none;
|
|
30
28
|
}
|
|
@@ -25,9 +25,17 @@ $border-radius: $vs-border-radius;
|
|
|
25
25
|
flex-wrap: wrap;
|
|
26
26
|
padding: 0 2px 0 0;
|
|
27
27
|
position: relative;
|
|
28
|
+
flex-shrink: 1;
|
|
29
|
+
overflow: hidden;
|
|
30
|
+
min-height: 26px;
|
|
31
|
+
|
|
32
|
+
.vs--multiple & {
|
|
33
|
+
min-height: 32px;
|
|
34
|
+
}
|
|
28
35
|
}
|
|
29
36
|
|
|
30
37
|
.vs__actions {
|
|
38
|
+
flex-shrink: 0;
|
|
31
39
|
display: flex;
|
|
32
40
|
margin-right: -9px;
|
|
33
41
|
align-items: center;
|
|
@@ -46,7 +54,4 @@ $border-radius: $vs-border-radius;
|
|
|
46
54
|
cursor: pointer;
|
|
47
55
|
}
|
|
48
56
|
.vs--open .vs__dropdown-toggle {
|
|
49
|
-
border-bottom-color: transparent;
|
|
50
|
-
border-bottom-left-radius: 0;
|
|
51
|
-
border-bottom-right-radius: 0;
|
|
52
57
|
}
|
|
@@ -17,6 +17,10 @@
|
|
|
17
17
|
color: #222;
|
|
18
18
|
background-color: #ccc;
|
|
19
19
|
|
|
20
|
+
&.badge {
|
|
21
|
+
padding: 0.1875rem 0.5rem;
|
|
22
|
+
}
|
|
23
|
+
|
|
20
24
|
@media (prefers-color-scheme: notdark) {
|
|
21
25
|
background-color: #221;
|
|
22
26
|
color: $dark-body-color;
|
|
@@ -43,6 +47,17 @@
|
|
|
43
47
|
.vs__selected {
|
|
44
48
|
background-color: transparent;
|
|
45
49
|
border-color: transparent;
|
|
50
|
+
white-space: nowrap;
|
|
51
|
+
overflow: hidden;
|
|
52
|
+
text-overflow: ellipsis;
|
|
53
|
+
}
|
|
54
|
+
.vs__search {
|
|
55
|
+
top: 0;
|
|
56
|
+
position: absolute;
|
|
57
|
+
right: 0;
|
|
58
|
+
left: 0;
|
|
59
|
+
width: 100% !important;
|
|
60
|
+
padding-left: 0 !important;
|
|
46
61
|
}
|
|
47
62
|
&.vs--open .vs__selected,
|
|
48
63
|
&.vs--loading .vs__selected {
|
|
@@ -35,8 +35,12 @@
|
|
|
35
35
|
|
|
36
36
|
.itf-loading-wrapper {
|
|
37
37
|
position: relative;
|
|
38
|
+
pointer-events: none;
|
|
39
|
+
user-select: none;
|
|
38
40
|
|
|
39
41
|
.itf-loading {
|
|
42
|
+
cursor: progress;
|
|
43
|
+
pointer-events: all;
|
|
40
44
|
position: absolute;
|
|
41
45
|
background-color: rgba(255, 255, 255, .4);
|
|
42
46
|
top: 0;
|
|
@@ -45,6 +49,7 @@
|
|
|
45
49
|
bottom: 0;
|
|
46
50
|
z-index: 10;
|
|
47
51
|
color: var(--loader-color);
|
|
52
|
+
backdrop-filter: blur(5px);
|
|
48
53
|
|
|
49
54
|
@media (prefers-color-scheme: notdark) {
|
|
50
55
|
background-color: rgba($dark-body-bg, .75);
|
|
@@ -14,21 +14,15 @@
|
|
|
14
14
|
'btn-secondary': secondary,
|
|
15
15
|
'btn-sm': small,
|
|
16
16
|
'btn-lg': large,
|
|
17
|
-
'px-3': small && !icon,
|
|
18
|
-
'px-5': large && !icon,
|
|
19
|
-
'px-4': !icon && !large && !small,
|
|
17
|
+
// 'px-3': small && !icon,
|
|
18
|
+
// 'px-5': large && !icon,
|
|
19
|
+
// 'px-4': !icon && !large && !small,
|
|
20
20
|
'btn-icon': icon,
|
|
21
21
|
'loading': loading
|
|
22
22
|
}">
|
|
23
|
-
<div>
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
<slot v-else></slot>
|
|
27
|
-
</div>
|
|
28
|
-
|
|
29
|
-
<a class="ui basic left pointing label" v-if="labeled">
|
|
30
|
-
<slot name="label"></slot>
|
|
31
|
-
</a>
|
|
23
|
+
<div class="itf-spinner" :class="{'white': primary}" v-if="loading"></div>
|
|
24
|
+
<div v-if="loading && loadingText">{{loadingText}}</div>
|
|
25
|
+
<slot v-else></slot>
|
|
32
26
|
</button>
|
|
33
27
|
|
|
34
28
|
</template>
|
|
@@ -41,6 +35,7 @@
|
|
|
41
35
|
display: flex;
|
|
42
36
|
pointer-events: none;
|
|
43
37
|
align-items: center;
|
|
38
|
+
text-align: left;
|
|
44
39
|
}
|
|
45
40
|
.itf-spinner {
|
|
46
41
|
mix-blend-mode: normal;
|
|
@@ -63,7 +58,7 @@
|
|
|
63
58
|
}
|
|
64
59
|
}
|
|
65
60
|
&.btn-basic {
|
|
66
|
-
&:hover {
|
|
61
|
+
&:hover, &.active {
|
|
67
62
|
background-color: rgba(9, 30, 66, 0.08);
|
|
68
63
|
|
|
69
64
|
@media (prefers-color-scheme: notdark) {
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
|
|
3
|
+
<div class="itf-checkbox form-check" :class="{ 'form-switch': this.switch, 'itf-checkbox__large': large, 'itf-checkbox__medium': medium }">
|
|
4
|
+
<input class="form-check-input" :id="id" slot="input" type="checkbox" name="checkbox" v-model="isChecked" :disabled="isDisabled" />
|
|
5
|
+
<label :for="id" slot="label" class="form-check-label">
|
|
6
|
+
{{label}}
|
|
7
|
+
</label>
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
</template>
|
|
11
|
+
<style lang="scss">
|
|
12
|
+
@import '../../assets/scss/variables';
|
|
13
|
+
|
|
14
|
+
.itf-checkbox {
|
|
15
|
+
.form-check-input, .form-check-label {
|
|
16
|
+
cursor: pointer;
|
|
17
|
+
}
|
|
18
|
+
&__large {
|
|
19
|
+
padding-left: $form-check-padding-start * 2;
|
|
20
|
+
min-height: 2.5rem;
|
|
21
|
+
|
|
22
|
+
.form-check-label {
|
|
23
|
+
padding-top: 0.25rem;
|
|
24
|
+
}
|
|
25
|
+
.form-check-input {
|
|
26
|
+
margin-top: 0;
|
|
27
|
+
width: $form-check-input-width * 2;
|
|
28
|
+
height: $form-check-input-width * 2;
|
|
29
|
+
margin-left: -$form-check-padding-start * 2;
|
|
30
|
+
border-radius: 0.75rem;
|
|
31
|
+
}
|
|
32
|
+
&.form-switch {
|
|
33
|
+
padding-left: $form-switch-padding-start * 2;
|
|
34
|
+
|
|
35
|
+
.form-check-input {
|
|
36
|
+
width: $form-switch-width * 2;
|
|
37
|
+
margin-left: -$form-switch-padding-start * 2;
|
|
38
|
+
border-radius: 100px;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
&__medium {
|
|
43
|
+
padding-left: $form-check-padding-start * 1.5;
|
|
44
|
+
min-height: 2rem;
|
|
45
|
+
|
|
46
|
+
.form-check-input {
|
|
47
|
+
margin-top: 0;
|
|
48
|
+
width: $form-check-input-width * 1.5;
|
|
49
|
+
height: $form-check-input-width * 1.5;
|
|
50
|
+
margin-left: -$form-check-padding-start * 1.5;
|
|
51
|
+
border-radius: 0.5rem;
|
|
52
|
+
}
|
|
53
|
+
&.form-switch {
|
|
54
|
+
padding-left: $form-switch-padding-start * 1.5;
|
|
55
|
+
|
|
56
|
+
.form-check-input {
|
|
57
|
+
width: $form-switch-width * 1.5;
|
|
58
|
+
margin-left: -$form-switch-padding-start * 1.5;
|
|
59
|
+
border-radius: 100px;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
</style>
|
|
65
|
+
<script>
|
|
66
|
+
import { Vue, Component, Prop, Model, Inject } from 'vue-property-decorator';
|
|
67
|
+
|
|
68
|
+
let globalCheckboxId = 0;
|
|
69
|
+
|
|
70
|
+
export default @Component({
|
|
71
|
+
name: 'itfCheckbox',
|
|
72
|
+
components: {
|
|
73
|
+
}
|
|
74
|
+
})
|
|
75
|
+
class itfCheckbox extends Vue {
|
|
76
|
+
@Inject({ default: null }) checkboxGroup;
|
|
77
|
+
|
|
78
|
+
@Model('input') value;
|
|
79
|
+
@Prop(String) label;
|
|
80
|
+
|
|
81
|
+
@Prop(Boolean) switch;
|
|
82
|
+
@Prop(Boolean) disabled;
|
|
83
|
+
@Prop(Boolean) medium;
|
|
84
|
+
@Prop(Boolean) large;
|
|
85
|
+
|
|
86
|
+
id = '';
|
|
87
|
+
|
|
88
|
+
created() {
|
|
89
|
+
globalCheckboxId += 1;
|
|
90
|
+
this.id = `checkbox${globalCheckboxId}`;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
get isDisabled() {
|
|
94
|
+
if (this.checkboxGroup) {
|
|
95
|
+
return this.disabled || this.checkboxGroup.isDisabled(this.value);
|
|
96
|
+
}
|
|
97
|
+
return this.disabled;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
get isChecked() {
|
|
101
|
+
if (this.checkboxGroup) {
|
|
102
|
+
return this.checkboxGroup.isChecked(this.value);
|
|
103
|
+
}
|
|
104
|
+
return this.value;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
set isChecked(val) {
|
|
108
|
+
if (this.checkboxGroup) {
|
|
109
|
+
this.checkboxGroup.onToggleOption(this.value, val);
|
|
110
|
+
}
|
|
111
|
+
this.$emit('input', val);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
</script>
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
|
|
3
|
+
<div>
|
|
4
|
+
<slot />
|
|
5
|
+
</div>
|
|
6
|
+
|
|
7
|
+
</template>
|
|
8
|
+
<style>
|
|
9
|
+
|
|
10
|
+
</style>
|
|
11
|
+
<script>
|
|
12
|
+
import { Vue, Component, Prop, Model, Provide } from 'vue-property-decorator';
|
|
13
|
+
|
|
14
|
+
export default @Component({
|
|
15
|
+
name: 'itfCheckboxGroup'
|
|
16
|
+
})
|
|
17
|
+
class itfCheckboxGroup extends Vue {
|
|
18
|
+
@Provide() checkboxGroup = this;
|
|
19
|
+
|
|
20
|
+
@Model('input', { type: Array, default: () => [] }) value;
|
|
21
|
+
|
|
22
|
+
@Prop(Boolean) disabled;
|
|
23
|
+
|
|
24
|
+
@Prop(String) itemKey;
|
|
25
|
+
|
|
26
|
+
@Prop(Number) max;
|
|
27
|
+
|
|
28
|
+
onToggleOption(value, isChecked) {
|
|
29
|
+
const index = this.getCheckedIndex(value);
|
|
30
|
+
const arr = this.value ? [ ...this.value ] : [];
|
|
31
|
+
if (index !== -1 && isChecked === false) {
|
|
32
|
+
arr.splice(index, 1);
|
|
33
|
+
} else if (isChecked === true) {
|
|
34
|
+
arr.push(value);
|
|
35
|
+
}
|
|
36
|
+
this.$emit('input', arr);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
getCheckedIndex(value) {
|
|
40
|
+
if (this.itemKey) {
|
|
41
|
+
return this.value && this.value.findIndex(item => item[this.itemKey] === value[this.itemKey]);
|
|
42
|
+
}
|
|
43
|
+
return this.value.indexOf(value);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
isChecked(value) {
|
|
47
|
+
return this.getCheckedIndex(value) !== -1;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
isDisabled(value) {
|
|
51
|
+
return this.getCheckedIndex(value) === -1 && (this.max !== 'undefined' && this.value.length >= this.max);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
</script>
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { storiesOf } from '@storybook/vue';
|
|
2
|
+
import itfCheckbox from './Checkbox';
|
|
3
|
+
import itfCheckboxGroup from './CheckboxGroup';
|
|
4
|
+
import itfForm from '../form/Form.vue';
|
|
5
|
+
import itfLabel from '../form/Label.vue';
|
|
6
|
+
import itfDatePicker from '../datepicker/DatePicker.vue';
|
|
7
|
+
import itfDateRangePicker from '../datepicker/DateRangePicker.vue';
|
|
8
|
+
import itfApp from '../app/App.vue';
|
|
9
|
+
|
|
10
|
+
storiesOf('Common', module)
|
|
11
|
+
.add('Checkbox', () => ({
|
|
12
|
+
components: {
|
|
13
|
+
itfApp,
|
|
14
|
+
itfCheckbox,
|
|
15
|
+
itfCheckboxGroup,
|
|
16
|
+
itfForm,
|
|
17
|
+
itfLabel,
|
|
18
|
+
itfDatePicker,
|
|
19
|
+
itfDateRangePicker,
|
|
20
|
+
},
|
|
21
|
+
data() {
|
|
22
|
+
return {
|
|
23
|
+
test: false,
|
|
24
|
+
group: []
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
methods: {
|
|
28
|
+
},
|
|
29
|
+
template: `<div>
|
|
30
|
+
<p>You need wrap whole application with this tag</p>
|
|
31
|
+
|
|
32
|
+
<h2>Usage</h2>
|
|
33
|
+
|
|
34
|
+
<pre>
|
|
35
|
+
|
|
36
|
+
<itf-datepicker></itf-datepicker>
|
|
37
|
+
|
|
38
|
+
<button @click="$showSuccess('Success')">Show success</button>
|
|
39
|
+
<button @click="$showError('Error')">Show error</button>
|
|
40
|
+
<button @click="$try(() => { throw new Error('Invalid function'); })">Try function with error</button>
|
|
41
|
+
</pre>
|
|
42
|
+
|
|
43
|
+
<h2>Example</h2>
|
|
44
|
+
|
|
45
|
+
<itf-form>
|
|
46
|
+
<itf-checkbox label="Test" v-model="test" />
|
|
47
|
+
|
|
48
|
+
<itf-checkbox switch label="Test" v-model="test" />
|
|
49
|
+
{{test}}
|
|
50
|
+
|
|
51
|
+
<itf-checkbox-group v-model="group">
|
|
52
|
+
<itf-checkbox label="Test1" value="1" />
|
|
53
|
+
<itf-checkbox label="Test2" value="2" />
|
|
54
|
+
</itf-checkbox-group>
|
|
55
|
+
|
|
56
|
+
{{group}}
|
|
57
|
+
|
|
58
|
+
<h3>Medium</h3>
|
|
59
|
+
<itf-checkbox medium label="Test" v-model="test" />
|
|
60
|
+
|
|
61
|
+
<itf-checkbox medium switch label="Test" v-model="test" />
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
<h3>Large</h3>
|
|
66
|
+
<itf-checkbox large label="Test" v-model="test" />
|
|
67
|
+
|
|
68
|
+
<itf-checkbox large switch label="Test" v-model="test" />
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
</itf-form>
|
|
73
|
+
</div>`,
|
|
74
|
+
}));
|
|
@@ -22,15 +22,17 @@
|
|
|
22
22
|
:lazy="!focused"
|
|
23
23
|
:placeholder="placeholder"
|
|
24
24
|
/>
|
|
25
|
-
<div
|
|
26
|
-
<itf-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
25
|
+
<div style="display: none">
|
|
26
|
+
<div ref="dropdown" class="itf-datepicker__dropdown">
|
|
27
|
+
<itf-date-picker-inline
|
|
28
|
+
:value="value"
|
|
29
|
+
:start-view="startView"
|
|
30
|
+
:only-calendar="onlyCalendar"
|
|
31
|
+
:display-format="displayFormat"
|
|
32
|
+
:value-format="valueFormat"
|
|
33
|
+
@input="selectInlineDate"
|
|
34
|
+
></itf-date-picker-inline>
|
|
35
|
+
</div>
|
|
34
36
|
</div>
|
|
35
37
|
</div>
|
|
36
38
|
</template>
|
|
@@ -43,15 +43,17 @@
|
|
|
43
43
|
:placeholder="placeholder"
|
|
44
44
|
/>
|
|
45
45
|
</div>
|
|
46
|
-
<div
|
|
47
|
-
<itf-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
46
|
+
<div style="display: none">
|
|
47
|
+
<div ref="dropdown" class="itf-daterange-picker__dropdown">
|
|
48
|
+
<itf-date-range-picker-inline
|
|
49
|
+
:value="value"
|
|
50
|
+
:start-view="startView"
|
|
51
|
+
:only-calendar="onlyCalendar"
|
|
52
|
+
:display-format="displayFormat"
|
|
53
|
+
:value-format="valueFormat"
|
|
54
|
+
@input="selectInlineDate"
|
|
55
|
+
></itf-date-range-picker-inline>
|
|
56
|
+
</div>
|
|
55
57
|
</div>
|
|
56
58
|
</div>
|
|
57
59
|
</template>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
|
|
3
|
-
<component class="itf-icon" :is="iconComponent"></component>
|
|
3
|
+
<component @click="$emit('click')" :style="style" class="itf-icon" :is="iconComponent"></component>
|
|
4
4
|
|
|
5
5
|
</template>
|
|
6
6
|
<style lang="scss" scoped>
|
|
@@ -21,6 +21,17 @@ export default @Component({
|
|
|
21
21
|
})
|
|
22
22
|
class itfIcon extends Vue {
|
|
23
23
|
@Prop({ type: String, validator: (value) => !!icons[value] }) name;
|
|
24
|
+
@Prop([Number, String]) size;
|
|
25
|
+
|
|
26
|
+
get style() {
|
|
27
|
+
if (this.size) {
|
|
28
|
+
return {
|
|
29
|
+
width: `${this.size}px`,
|
|
30
|
+
height: `${this.size}px`
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
return [];
|
|
34
|
+
}
|
|
24
35
|
|
|
25
36
|
get iconComponent() {
|
|
26
37
|
return icons[this.name];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<template><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px"
|
|
2
|
+
viewBox="0 0 160 160" style="enable-background:new 0 0 160 160;" xml:space="preserve"><g><path d="M9,106.4V80.1c0-3.7,2.6-6.9,6.1-7.6l7.1-2l4.1-1.2c0.5-0.1,0.9-0.6,0.9-1.1v-4.8L27,63.2c-2.1-1.6-3.4-4.1-3.7-6.7 c-0.1-0.9-0.1-1.6-0.2-2h-0.8c-0.8,0-1.5-0.6-1.6-1.3L20,49c-0.2-1.2,0.8-2.3,2-2.3l0.2-7.7c0-4.7,3.9-8.6,8.7-8.6h5.6 c4.8,0,8.7,3.8,8.7,8.6l0.2,7.7c1.2,0,2.2,1.1,2,2.3l-0.6,4c-0.1,0.8-0.8,1.3-1.6,1.3h-0.8c-0.1,0.4-0.1,1.2-0.2,2 c-0.2,2.6-1.6,5.1-3.7,6.7l-0.3,0.2v4.8c0,0.6,0.4,1,0.9,1.1l3.2,0.9c1.8-1.1,3.7-2,5.8-2.4l0.1,0l-6.1-1.7v-0.9 c2.1-2.1,3.4-4.7,3.8-7.5c1.4-0.8,2.5-2.3,2.7-3.9l0.6-4c0.3-1.7-0.2-3.5-1.4-4.8c-0.2-0.2-0.4-0.5-0.6-0.6L49.3,39 c0-6.9-5.7-12.5-12.7-12.5h-5.6c-7,0-12.7,5.6-12.7,12.5l-0.1,5.2c-0.2,0.2-0.4,0.4-0.7,0.7c-1.1,1.3-1.6,3.1-1.4,4.8l0.6,4 c0.3,1.7,1.3,3.1,2.7,4c0.4,2.9,1.8,5.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