@farm-investimentos/front-mfe-components 11.0.1 → 11.0.3
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/dist/front-mfe-components.common.js +224 -197
- package/dist/front-mfe-components.common.js.map +1 -1
- package/dist/front-mfe-components.css +1 -1
- package/dist/front-mfe-components.umd.js +224 -197
- package/dist/front-mfe-components.umd.js.map +1 -1
- package/dist/front-mfe-components.umd.min.js +1 -1
- package/dist/front-mfe-components.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Chip/Chip.scss +27 -10
- package/src/components/Chip/Chip.stories.js +2 -4
- package/src/components/Chip/Chip.stories.scss +12 -0
- package/src/components/Chip/Chip.vue +1 -1
- package/src/components/DataTablePaginator/DataTablePaginator.scss +5 -4
- package/src/components/DataTablePaginator/DataTablePaginator.stories.js +5 -5
- package/src/components/DialogHeader/DialogHeader.scss +6 -3
- package/src/components/DialogHeader/DialogHeader.vue +2 -2
- package/src/components/Modal/Modal.scss +13 -4
- package/src/components/Modal/Modal.stories.js +60 -9
- package/src/components/Modal/Modal.vue +8 -2
- package/src/components/TableContextMenu/TableContextMenu.scss +1 -1
- package/src/components/Typography/Typography.scss +15 -5
- package/src/components/Typography/Typography.stories.js +7 -14
- package/src/components/Typography/Typography.vue +20 -3
package/package.json
CHANGED
|
@@ -34,7 +34,10 @@
|
|
|
34
34
|
&.farm-chip--lighten {
|
|
35
35
|
background-color: themeColor($color, 'lighten');
|
|
36
36
|
border-color: themeColor($color, 'lighten');
|
|
37
|
-
|
|
37
|
+
|
|
38
|
+
span {
|
|
39
|
+
color: themeColor($color, 'darken');
|
|
40
|
+
}
|
|
38
41
|
}
|
|
39
42
|
|
|
40
43
|
&.farm-chip--darken {
|
|
@@ -45,18 +48,21 @@
|
|
|
45
48
|
}
|
|
46
49
|
|
|
47
50
|
&[color='neutral'] {
|
|
48
|
-
|
|
51
|
+
span {
|
|
52
|
+
color: themeColor('secondary');
|
|
53
|
+
}
|
|
49
54
|
|
|
50
|
-
&.farm-chip--lighten {
|
|
55
|
+
&.farm-chip--lighten span {
|
|
51
56
|
color: themeColor('secondary');
|
|
52
57
|
}
|
|
53
|
-
|
|
58
|
+
|
|
59
|
+
&.farm-chip--darken span {
|
|
54
60
|
color: white;
|
|
55
61
|
}
|
|
56
62
|
}
|
|
57
63
|
|
|
58
64
|
&[color='secondary'] {
|
|
59
|
-
&.farm-chip--lighten {
|
|
65
|
+
&.farm-chip--lighten span {
|
|
60
66
|
color: white;
|
|
61
67
|
}
|
|
62
68
|
}
|
|
@@ -65,26 +71,37 @@
|
|
|
65
71
|
@each $color in $theme-colors-list {
|
|
66
72
|
&#{'[color=' + $color + ']'} {
|
|
67
73
|
background-color: transparent;
|
|
68
|
-
|
|
74
|
+
|
|
75
|
+
span {
|
|
76
|
+
color: themeColor($color);
|
|
77
|
+
}
|
|
69
78
|
|
|
70
79
|
&.farm-chip--lighten {
|
|
71
80
|
background-color: transparent;
|
|
72
81
|
border-color: themeColor($color, 'lighten');
|
|
73
|
-
|
|
82
|
+
|
|
83
|
+
span {
|
|
84
|
+
color: themeColor($color);
|
|
85
|
+
}
|
|
74
86
|
}
|
|
75
87
|
|
|
76
88
|
&.farm-chip--darken {
|
|
77
89
|
background-color: transparent;
|
|
78
90
|
border-color: themeColor($color, 'darken');
|
|
79
|
-
|
|
91
|
+
|
|
92
|
+
span {
|
|
93
|
+
color: themeColor($color, 'darken');
|
|
94
|
+
}
|
|
80
95
|
}
|
|
81
96
|
}
|
|
82
97
|
}
|
|
83
98
|
|
|
84
99
|
&[color='neutral'] {
|
|
85
|
-
|
|
100
|
+
span {
|
|
101
|
+
color: themeColor('secondary');
|
|
102
|
+
}
|
|
86
103
|
|
|
87
|
-
&.farm-chip--lighten {
|
|
104
|
+
&.farm-chip--lighten span {
|
|
88
105
|
color: themeColor('secondary');
|
|
89
106
|
}
|
|
90
107
|
}
|
|
@@ -42,8 +42,7 @@ export const Colors = () => ({
|
|
|
42
42
|
};
|
|
43
43
|
},
|
|
44
44
|
template: `
|
|
45
|
-
<div>
|
|
46
|
-
<h3>Colors & variations</h3>
|
|
45
|
+
<div class="grid">
|
|
47
46
|
<div class="chips-container" v-for="color in colors">
|
|
48
47
|
<h4>{{ color }}</h4>
|
|
49
48
|
<farm-chip
|
|
@@ -66,8 +65,7 @@ export const ColorsOutlined = () => ({
|
|
|
66
65
|
};
|
|
67
66
|
},
|
|
68
67
|
template: `
|
|
69
|
-
<div>
|
|
70
|
-
<h3>Outlined</h3>
|
|
68
|
+
<div class="grid">
|
|
71
69
|
<div class="chips-container" v-for="color in colors">
|
|
72
70
|
<h4>{{ color }}</h4>
|
|
73
71
|
<farm-chip
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
'farm-chip--darken': variation === 'darken',
|
|
9
9
|
}"
|
|
10
10
|
>
|
|
11
|
-
<farm-typography tag="span" size="sm"> <slot></slot> </farm-typography>
|
|
11
|
+
<farm-typography tag="span" size="sm" color="white"> <slot></slot> </farm-typography>
|
|
12
12
|
</span>
|
|
13
13
|
</template>
|
|
14
14
|
<script lang="ts">
|
|
@@ -13,10 +13,11 @@ ul.farm-paginator {
|
|
|
13
13
|
display: flex;
|
|
14
14
|
|
|
15
15
|
button {
|
|
16
|
-
border: 1px solid var(--
|
|
16
|
+
border: 1px solid var(--farm-stroke-base);
|
|
17
17
|
border-right: 0;
|
|
18
18
|
height: 36px;
|
|
19
|
-
width: 36px;
|
|
19
|
+
min-width: 36px;
|
|
20
|
+
padding-inline: 4px;
|
|
20
21
|
display: inline-flex;
|
|
21
22
|
justify-content: center;
|
|
22
23
|
align-items: center;
|
|
@@ -30,7 +31,7 @@ ul.farm-paginator {
|
|
|
30
31
|
}
|
|
31
32
|
|
|
32
33
|
&:last-child button {
|
|
33
|
-
border-right: 1px solid var(--
|
|
34
|
+
border-right: 1px solid var(--farm-stroke-base);
|
|
34
35
|
border-radius: 0 4px 4px 0;
|
|
35
36
|
}
|
|
36
37
|
|
|
@@ -63,5 +64,5 @@ ul.farm-paginator {
|
|
|
63
64
|
}
|
|
64
65
|
|
|
65
66
|
.farm-paginator--gutter {
|
|
66
|
-
margin:
|
|
67
|
+
margin: 16px 24px 0;
|
|
67
68
|
}
|
|
@@ -28,23 +28,23 @@ export const Primary = () => ({
|
|
|
28
28
|
totalPages: 8,
|
|
29
29
|
};
|
|
30
30
|
},
|
|
31
|
-
template: '<
|
|
31
|
+
template: '<farm-datatable-paginator :totalPages="totalPages" :page="1" />',
|
|
32
32
|
mounted() {
|
|
33
33
|
setTimeout(() => {
|
|
34
|
-
this.totalPages =
|
|
34
|
+
this.totalPages = 2;
|
|
35
35
|
}, 1000);
|
|
36
36
|
},
|
|
37
37
|
});
|
|
38
38
|
|
|
39
39
|
export const Secondary = () => ({
|
|
40
|
-
template: '<
|
|
40
|
+
template: '<farm-datatable-paginator :hidePerPageOptions="true" :totalPages="190000" :page="1" />',
|
|
41
41
|
});
|
|
42
42
|
|
|
43
43
|
export const Disabled = () => ({
|
|
44
|
-
template: '<
|
|
44
|
+
template: '<farm-datatable-paginator :disabled="true":totalPages="19" :page="1" />',
|
|
45
45
|
});
|
|
46
46
|
|
|
47
47
|
export const CustomPerPage = () => ({
|
|
48
48
|
template:
|
|
49
|
-
'<
|
|
49
|
+
'<farm-datatable-paginator :perPageOptions="[1, 2, 4, 12, 27]" :totalPages="19" :page="1" />',
|
|
50
50
|
});
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
.farm-dialog-header__close {
|
|
2
2
|
position: absolute;
|
|
3
|
-
right:
|
|
4
|
-
margin-top:
|
|
5
|
-
font-size:
|
|
3
|
+
right: 16px;
|
|
4
|
+
margin-top: 0;
|
|
5
|
+
font-size: 16px;
|
|
6
|
+
|
|
7
|
+
transition: all 0.4s;
|
|
6
8
|
|
|
7
9
|
&:hover {
|
|
8
10
|
opacity: 0.8;
|
|
@@ -18,4 +20,5 @@ header {
|
|
|
18
20
|
border-bottom: 1px solid var(--farm-stroke-divider);
|
|
19
21
|
display: flex;
|
|
20
22
|
justify-content: flex-start;
|
|
23
|
+
align-items: center;
|
|
21
24
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<header>
|
|
3
|
-
<farm-icon v-if="iconTitle" size="16px" color="
|
|
4
|
-
<farm-caption v-if="title" variation="regular" bold>
|
|
3
|
+
<farm-icon v-if="iconTitle" size="16px" color="primary">{{ iconTitle }}</farm-icon>
|
|
4
|
+
<farm-caption v-if="title" variation="regular" color="primary" bold>
|
|
5
5
|
{{ title }}
|
|
6
6
|
</farm-caption>
|
|
7
7
|
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
&--container {
|
|
27
27
|
background-color: white;
|
|
28
28
|
border-radius: 8px;
|
|
29
|
-
max-height: calc(100vh -
|
|
29
|
+
max-height: calc(100vh - 48px);
|
|
30
30
|
position: relative;
|
|
31
31
|
overflow: hidden;
|
|
32
32
|
z-index: 102;
|
|
@@ -34,12 +34,21 @@
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
&--content {
|
|
37
|
-
max-height: calc(100vh -
|
|
38
|
-
overflow-y: auto;
|
|
37
|
+
max-height: calc(100vh - 48px);
|
|
38
|
+
//overflow-y: auto;
|
|
39
39
|
width: 100%;
|
|
40
|
-
padding: 0
|
|
40
|
+
padding: 0;
|
|
41
|
+
|
|
42
|
+
>div {
|
|
43
|
+
//max-height: calc(100vh - 176px);
|
|
44
|
+
//max-height: calc(100vh - 64px);
|
|
45
|
+
overflow-y: auto;
|
|
46
|
+
padding: 0 16px;
|
|
47
|
+
}
|
|
41
48
|
}
|
|
42
49
|
|
|
50
|
+
|
|
51
|
+
|
|
43
52
|
&--header {
|
|
44
53
|
position: absolute;
|
|
45
54
|
top: 0;
|
|
@@ -24,7 +24,7 @@ export const Primary = () => ({
|
|
|
24
24
|
};
|
|
25
25
|
},
|
|
26
26
|
template: `<div>
|
|
27
|
-
<farm-btn
|
|
27
|
+
<farm-btn @click="value = true">abrir</farm-btn>
|
|
28
28
|
<farm-modal v-model="value">
|
|
29
29
|
<template v-slot:content>
|
|
30
30
|
<div v-html="text" />
|
|
@@ -33,6 +33,22 @@ export const Primary = () => ({
|
|
|
33
33
|
</div>`,
|
|
34
34
|
});
|
|
35
35
|
|
|
36
|
+
export const SmallContent = () => ({
|
|
37
|
+
data() {
|
|
38
|
+
return {
|
|
39
|
+
value: false,
|
|
40
|
+
};
|
|
41
|
+
},
|
|
42
|
+
template: `<div>
|
|
43
|
+
<farm-btn @click="value = true">abrir</farm-btn>
|
|
44
|
+
<farm-modal v-model="value">
|
|
45
|
+
<template v-slot:content>
|
|
46
|
+
small content
|
|
47
|
+
</template>
|
|
48
|
+
</farm-modal>
|
|
49
|
+
</div>`,
|
|
50
|
+
});
|
|
51
|
+
|
|
36
52
|
export const HeaderAndBottomFromDS = () => ({
|
|
37
53
|
data() {
|
|
38
54
|
return {
|
|
@@ -41,7 +57,7 @@ export const HeaderAndBottomFromDS = () => ({
|
|
|
41
57
|
};
|
|
42
58
|
},
|
|
43
59
|
template: `<div>
|
|
44
|
-
<farm-btn
|
|
60
|
+
<farm-btn @click="value = true">abrir</farm-btn>
|
|
45
61
|
<farm-modal v-model="value" :offsetTop="48" :offsetBottom="68">
|
|
46
62
|
<template v-slot:header>
|
|
47
63
|
<farm-dialog-header title="Título" @onClose="() => value = false" />
|
|
@@ -65,7 +81,7 @@ export const SizeMD = () => ({
|
|
|
65
81
|
};
|
|
66
82
|
},
|
|
67
83
|
template: `<div>
|
|
68
|
-
<farm-btn
|
|
84
|
+
<farm-btn @click="value = true">abrir</farm-btn>
|
|
69
85
|
<farm-modal v-model="value" size="md">
|
|
70
86
|
<template v-slot:content>
|
|
71
87
|
<div v-html="text" />
|
|
@@ -82,7 +98,7 @@ export const SizeSmall = () => ({
|
|
|
82
98
|
};
|
|
83
99
|
},
|
|
84
100
|
template: `<div>
|
|
85
|
-
<farm-btn
|
|
101
|
+
<farm-btn @click="value = true">abrir</farm-btn>
|
|
86
102
|
<farm-modal v-model="value" size="sm">
|
|
87
103
|
<template v-slot:content>
|
|
88
104
|
<div v-html="text" />
|
|
@@ -99,7 +115,7 @@ export const SizeXs = () => ({
|
|
|
99
115
|
};
|
|
100
116
|
},
|
|
101
117
|
template: `<div>
|
|
102
|
-
<farm-btn
|
|
118
|
+
<farm-btn @click="value = true">abrir</farm-btn>
|
|
103
119
|
<farm-modal v-model="value" size="xs">
|
|
104
120
|
<template v-slot:content>
|
|
105
121
|
<div v-html="text" />
|
|
@@ -116,7 +132,7 @@ export const HeaderAndBottom = () => ({
|
|
|
116
132
|
};
|
|
117
133
|
},
|
|
118
134
|
template: `<div>
|
|
119
|
-
<farm-btn
|
|
135
|
+
<farm-btn @click="value = true">abrir</farm-btn>
|
|
120
136
|
<farm-modal v-model="value" :offsetTop="24" :offsetBottom="68">
|
|
121
137
|
<template v-slot:header>
|
|
122
138
|
Header
|
|
@@ -139,7 +155,7 @@ export const HorizontalScroll = () => ({
|
|
|
139
155
|
};
|
|
140
156
|
},
|
|
141
157
|
template: `<div>
|
|
142
|
-
<farm-btn
|
|
158
|
+
<farm-btn @click="value = true">abrir</farm-btn>
|
|
143
159
|
<farm-modal v-model="value" size="md" :offsetBottom="68">
|
|
144
160
|
<template v-slot:content>
|
|
145
161
|
<div style="width: 800px;">
|
|
@@ -161,7 +177,7 @@ export const CustomHeader = () => ({
|
|
|
161
177
|
};
|
|
162
178
|
},
|
|
163
179
|
template: `<div>
|
|
164
|
-
<farm-btn
|
|
180
|
+
<farm-btn @click="value = true">abrir</farm-btn>
|
|
165
181
|
<farm-modal v-model="value" :offsetTop="24" :offsetBottom="68">
|
|
166
182
|
<template v-slot:header>
|
|
167
183
|
<farm-dialog-header>
|
|
@@ -187,7 +203,7 @@ export const Persistent = () => ({
|
|
|
187
203
|
};
|
|
188
204
|
},
|
|
189
205
|
template: `<div>
|
|
190
|
-
<farm-btn
|
|
206
|
+
<farm-btn @click="value = true">abrir</farm-btn>
|
|
191
207
|
<farm-modal v-model="value" :offsetTop="48" :offsetBottom="64" :persistent="true">
|
|
192
208
|
<template v-slot:header>
|
|
193
209
|
<farm-dialog-header title="Título" @onClose="() => value = false" />
|
|
@@ -245,4 +261,39 @@ teste!<br />
|
|
|
245
261
|
teste!<br />
|
|
246
262
|
teste!<br />
|
|
247
263
|
teste!<br />
|
|
264
|
+
teste!<br />
|
|
265
|
+
teste!<br />
|
|
266
|
+
teste!<br />
|
|
267
|
+
teste!<br />
|
|
268
|
+
teste!<br />
|
|
269
|
+
teste 1!<br />
|
|
270
|
+
teste!<br />
|
|
271
|
+
teste!<br />
|
|
272
|
+
teste!<br />
|
|
273
|
+
teste!<br />
|
|
274
|
+
teste!<br />
|
|
275
|
+
teste!<br />
|
|
276
|
+
teste!<br />
|
|
277
|
+
teste!<br />
|
|
278
|
+
teste!<br />
|
|
279
|
+
teste!<br />
|
|
280
|
+
teste!<br />
|
|
281
|
+
teste!<br />
|
|
282
|
+
teste!<br />
|
|
283
|
+
teste!<br />
|
|
284
|
+
teste!<br />
|
|
285
|
+
teste!<br />
|
|
286
|
+
teste!<br />
|
|
287
|
+
teste 2!<br />
|
|
288
|
+
teste!<br />
|
|
289
|
+
teste!<br />
|
|
290
|
+
teste!<br />
|
|
291
|
+
teste!<br />
|
|
292
|
+
teste!<br />
|
|
293
|
+
teste!<br />
|
|
294
|
+
teste!<br />
|
|
295
|
+
teste!<br />
|
|
296
|
+
teste!<br />
|
|
297
|
+
teste!<br />
|
|
298
|
+
teste!<br />
|
|
248
299
|
teste 3!`;
|
|
@@ -3,12 +3,17 @@
|
|
|
3
3
|
<div :class="{ 'farm-modal': true, ['farm-modal--size-' + size]: true }" v-if="inputValue">
|
|
4
4
|
<div class="farm-modal--container">
|
|
5
5
|
<div class="farm-modal--header">
|
|
6
|
+
<!-- @slot header -->
|
|
6
7
|
<slot name="header"></slot>
|
|
7
8
|
</div>
|
|
8
|
-
<div class="farm-modal--content"
|
|
9
|
-
<
|
|
9
|
+
<div class="farm-modal--content">
|
|
10
|
+
<div :style="styles">
|
|
11
|
+
<!-- @slot main content -->
|
|
12
|
+
<slot name="content"></slot>
|
|
13
|
+
</div>
|
|
10
14
|
</div>
|
|
11
15
|
<div class="farm-modal--footer">
|
|
16
|
+
<!-- @slot footer -->
|
|
12
17
|
<slot name="footer"></slot>
|
|
13
18
|
</div>
|
|
14
19
|
</div>
|
|
@@ -55,6 +60,7 @@ export default Vue.extend({
|
|
|
55
60
|
const styles = {
|
|
56
61
|
marginTop: offsetTop.value + 'px',
|
|
57
62
|
marginBottom: offsetBottom.value + 'px',
|
|
63
|
+
maxHeight: `calc(100vh - ${offsetTop.value + offsetBottom.value + 48}px)`,
|
|
58
64
|
};
|
|
59
65
|
|
|
60
66
|
const close = () => {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
@import '../../configurations/variables';
|
|
2
2
|
@import '../../configurations/mixins';
|
|
3
|
+
@import '../../configurations/theme-colors';
|
|
3
4
|
|
|
4
5
|
.farm-typography {
|
|
5
6
|
font-size: 16px;
|
|
@@ -24,13 +25,20 @@
|
|
|
24
25
|
margin-bottom: auto;
|
|
25
26
|
}
|
|
26
27
|
|
|
27
|
-
|
|
28
|
+
color: var(--farm-text-primary);
|
|
29
|
+
|
|
30
|
+
@each $k in $theme-colors-list {
|
|
28
31
|
&#{'[color=' + $k + ']'} {
|
|
29
|
-
color: var(--
|
|
32
|
+
color: var(--farm-#{$k}-base);
|
|
30
33
|
}
|
|
31
34
|
}
|
|
32
35
|
|
|
33
|
-
|
|
36
|
+
&[color=white] {
|
|
37
|
+
color: white;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@each $s,
|
|
41
|
+
$val in $fontSizes {
|
|
34
42
|
&--#{$s} {
|
|
35
43
|
font-size: $val;
|
|
36
44
|
}
|
|
@@ -44,9 +52,11 @@
|
|
|
44
52
|
}
|
|
45
53
|
|
|
46
54
|
@include upToSm {
|
|
47
|
-
|
|
55
|
+
|
|
56
|
+
@each $s,
|
|
57
|
+
$val in $fontSizes {
|
|
48
58
|
.farm-typography--#{$s} {
|
|
49
59
|
font-size: calc(#{$val} - 2px);
|
|
50
60
|
}
|
|
51
61
|
}
|
|
52
|
-
}
|
|
62
|
+
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import Typography from './Typography';
|
|
2
2
|
import sizes from '../../configurations/sizes';
|
|
3
|
-
import
|
|
3
|
+
import baseThemeColors from '../../configurations/_theme-colors-base.scss';
|
|
4
|
+
|
|
5
|
+
const colors = Object.keys(baseThemeColors);
|
|
4
6
|
|
|
5
7
|
export default {
|
|
6
8
|
title: 'Typography/Atom',
|
|
@@ -8,7 +10,9 @@ export default {
|
|
|
8
10
|
parameters: {
|
|
9
11
|
docs: {
|
|
10
12
|
description: {
|
|
11
|
-
component: `Typography<br />
|
|
13
|
+
component: `Typography<br />
|
|
14
|
+
selector: <em>farm-typography</em><br />
|
|
15
|
+
<span style="color: var(--farm-primary-base);">ready for use</span>`,
|
|
12
16
|
},
|
|
13
17
|
},
|
|
14
18
|
|
|
@@ -17,32 +21,26 @@ export default {
|
|
|
17
21
|
};
|
|
18
22
|
|
|
19
23
|
export const Primary = () => ({
|
|
20
|
-
components: { 'farm-typography': Typography },
|
|
21
24
|
template: '<farm-typography type="legenda">Typography</farm-typography>',
|
|
22
25
|
});
|
|
23
26
|
|
|
24
27
|
export const Bold = () => ({
|
|
25
|
-
components: { 'farm-typography': Typography },
|
|
26
28
|
template: '<farm-typography bold>Typography</farm-typography>',
|
|
27
29
|
});
|
|
28
30
|
|
|
29
31
|
export const Italic = () => ({
|
|
30
|
-
components: { 'farm-typography': Typography },
|
|
31
32
|
template: '<farm-typography italic>Typography</farm-typography>',
|
|
32
33
|
});
|
|
33
34
|
|
|
34
35
|
export const Underline = () => ({
|
|
35
|
-
components: { 'farm-typography': Typography },
|
|
36
36
|
template: '<farm-typography underline>Typography</farm-typography>',
|
|
37
37
|
});
|
|
38
38
|
|
|
39
39
|
export const LineThrough = () => ({
|
|
40
|
-
components: { 'farm-typography': Typography },
|
|
41
40
|
template: '<farm-typography line-through>Typography</farm-typography>',
|
|
42
41
|
});
|
|
43
42
|
|
|
44
43
|
export const Weight = () => ({
|
|
45
|
-
components: { 'farm-typography': Typography },
|
|
46
44
|
data() {
|
|
47
45
|
return {
|
|
48
46
|
weights: [100, 200, 300, 400, 500, 600, 700],
|
|
@@ -57,7 +55,6 @@ const newSizes = [...sizes];
|
|
|
57
55
|
newSizes.splice(3, 0, 'default');
|
|
58
56
|
|
|
59
57
|
export const Sizes = () => ({
|
|
60
|
-
components: { 'farm-typography': Typography },
|
|
61
58
|
data() {
|
|
62
59
|
return {
|
|
63
60
|
sizes: newSizes,
|
|
@@ -75,7 +72,6 @@ export const Sizes = () => ({
|
|
|
75
72
|
});
|
|
76
73
|
|
|
77
74
|
export const CustomSizes = () => ({
|
|
78
|
-
components: { 'farm-typography': Typography },
|
|
79
75
|
data() {
|
|
80
76
|
return {
|
|
81
77
|
sizes: ['11px', '1.12876rem', '48px'],
|
|
@@ -93,10 +89,9 @@ export const CustomSizes = () => ({
|
|
|
93
89
|
});
|
|
94
90
|
|
|
95
91
|
export const Colors = () => ({
|
|
96
|
-
components: { 'farm-typography': Typography },
|
|
97
92
|
data() {
|
|
98
93
|
return {
|
|
99
|
-
colors,
|
|
94
|
+
colors: ['default', ...colors, 'white'],
|
|
100
95
|
};
|
|
101
96
|
},
|
|
102
97
|
template: `<div>
|
|
@@ -111,7 +106,6 @@ export const Colors = () => ({
|
|
|
111
106
|
});
|
|
112
107
|
|
|
113
108
|
export const Tags = () => ({
|
|
114
|
-
components: { 'farm-typography': Typography },
|
|
115
109
|
data() {
|
|
116
110
|
return {
|
|
117
111
|
tags: ['p', 'span', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'legend', 'label', 'li'],
|
|
@@ -129,7 +123,6 @@ export const Tags = () => ({
|
|
|
129
123
|
});
|
|
130
124
|
|
|
131
125
|
export const LineHeight = () => ({
|
|
132
|
-
components: { 'farm-typography': Typography },
|
|
133
126
|
data() {
|
|
134
127
|
return {
|
|
135
128
|
heights: ['12px', '16px', '20px', '24px', '32px', '40px'],
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
['farm-typography--weight-' + weight]: weight !== undefined,
|
|
8
8
|
}"
|
|
9
9
|
:style="style"
|
|
10
|
+
:color="color"
|
|
10
11
|
>
|
|
11
12
|
<slot></slot>
|
|
12
13
|
</component>
|
|
@@ -33,9 +34,25 @@ export default Vue.extend({
|
|
|
33
34
|
type: String,
|
|
34
35
|
},
|
|
35
36
|
weight: {
|
|
36
|
-
type: Number as PropType<
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
type: Number as PropType<100 | 200 | 300 | 400 | 500 | 600 | 700>,
|
|
38
|
+
},
|
|
39
|
+
/**
|
|
40
|
+
* Color
|
|
41
|
+
*/
|
|
42
|
+
color: {
|
|
43
|
+
type: String as PropType<
|
|
44
|
+
| 'primary'
|
|
45
|
+
| 'secondary'
|
|
46
|
+
| 'neutral'
|
|
47
|
+
| 'info'
|
|
48
|
+
| 'success'
|
|
49
|
+
| 'error'
|
|
50
|
+
| 'warning'
|
|
51
|
+
| 'success'
|
|
52
|
+
| 'extra-1'
|
|
53
|
+
| 'extra-2'
|
|
54
|
+
>,
|
|
55
|
+
default: 'default',
|
|
39
56
|
},
|
|
40
57
|
},
|
|
41
58
|
setup(props) {
|