@farm-investimentos/front-mfe-components 11.3.1 → 11.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/dist/front-mfe-components.common.js +548 -1021
- 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 +548 -1021
- 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 +3 -3
- package/src/components/AlertBox/AlertBox.scss +0 -0
- package/src/components/AlertBox/AlertBox.stories.js +21 -0
- package/src/components/AlertBox/AlertBox.vue +16 -0
- package/src/components/AlertBox/__tests__/AlertBox.spec.js +20 -0
- package/src/components/AlertBox/index.ts +4 -0
- package/src/components/Card/Card.scss +1 -0
- package/src/components/Card/Card.stories.js +6 -4
- package/src/components/Card/CardComposition.stories.ts +10 -0
- package/src/components/Checkbox/Checkbox.scss +17 -4
- package/src/components/Checkbox/Checkbox.stories.js +12 -0
- package/src/components/Checkbox/Checkbox.vue +20 -2
- package/src/components/ContextMenu/ContextMenu.scss +1 -0
- package/src/components/ContextMenu/ContextMenu.stories.js +59 -0
- package/src/components/ContextMenu/ContextMenu.vue +19 -8
- package/src/components/DataTableHeader/DataTableHeader.vue +5 -3
- package/src/components/MultipleFilePicker/MultipleFilePicker.scss +0 -4
- package/src/components/MultipleFilePicker/MultipleFilePicker.vue +16 -16
- package/src/components/layout/Basic.stories.js +17 -9
- package/src/components/layout/Col/Col.scss +60 -3
- package/src/components/layout/Col/Col.stories.js +126 -10
- package/src/components/layout/Col/Col.vue +40 -19
- package/src/components/layout/DisplayBreakpoints.stories.mdx +2 -0
- package/src/components/layout/GridSystem.stories.js +138 -0
- package/src/components/layout/Row/Row.scss +11 -5
- package/src/components/layout/Row/Row.stories.js +8 -8
- package/src/components/layout/Row/Row.vue +10 -2
- package/src/configurations/_mixins.scss +46 -0
- package/src/configurations/_variables.scss +4 -4
- package/src/configurations/flexVariables.ts +3 -2
- package/src/main.ts +1 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import Col from './Col.vue';
|
|
2
|
+
import { aligns } from '../../../configurations/flexVariables';
|
|
2
3
|
|
|
3
4
|
export default {
|
|
4
5
|
title: 'Layout/Col',
|
|
@@ -7,36 +8,151 @@ export default {
|
|
|
7
8
|
docs: {
|
|
8
9
|
description: {
|
|
9
10
|
component: `Col<br />
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
selector: <em>farm-col</em><br />
|
|
12
|
+
<span style="color: var(--farm-primary-base);">ready for use</span>
|
|
13
|
+
`,
|
|
13
14
|
},
|
|
14
15
|
},
|
|
15
16
|
viewMode: 'docs',
|
|
16
17
|
},
|
|
17
18
|
};
|
|
18
19
|
|
|
20
|
+
const style = {
|
|
21
|
+
border: '1px solid var(--farm-extra-1-darken)',
|
|
22
|
+
backgroundColor: 'var(--farm-extra-1-lighten)',
|
|
23
|
+
};
|
|
24
|
+
|
|
19
25
|
export const Primary = () => ({
|
|
20
|
-
|
|
26
|
+
data() {
|
|
27
|
+
return {
|
|
28
|
+
style,
|
|
29
|
+
};
|
|
30
|
+
},
|
|
31
|
+
template: '<farm-col :style="style">col</farm-col>',
|
|
21
32
|
});
|
|
22
33
|
export const Xl = () => ({
|
|
23
|
-
|
|
34
|
+
data() {
|
|
35
|
+
return {
|
|
36
|
+
style,
|
|
37
|
+
};
|
|
38
|
+
},
|
|
39
|
+
template: `<farm-row>
|
|
40
|
+
<farm-col xl="4" :style="style">4</farm-col>
|
|
41
|
+
<farm-col xl="6" :style="style">6</farm-col>
|
|
42
|
+
<farm-col xl="12" :style="style">12</farm-col>
|
|
43
|
+
<farm-col xl="2" :style="style">2</farm-col>
|
|
44
|
+
</farm-row>`,
|
|
24
45
|
});
|
|
25
46
|
export const Lg = () => ({
|
|
26
|
-
|
|
47
|
+
data() {
|
|
48
|
+
return {
|
|
49
|
+
style,
|
|
50
|
+
};
|
|
51
|
+
},
|
|
52
|
+
template: `<farm-row>
|
|
53
|
+
<farm-col lg="4" :style="style">4</farm-col>
|
|
54
|
+
<farm-col lg="6" :style="style">6</farm-col>
|
|
55
|
+
<farm-col lg="12" :style="style">12</farm-col>
|
|
56
|
+
<farm-col lg="2" :style="style">2</farm-col>
|
|
57
|
+
</farm-row>`,
|
|
27
58
|
});
|
|
28
59
|
export const Md = () => ({
|
|
29
|
-
|
|
60
|
+
data() {
|
|
61
|
+
return {
|
|
62
|
+
style,
|
|
63
|
+
};
|
|
64
|
+
},
|
|
65
|
+
template: `<farm-row>
|
|
66
|
+
<farm-col md="4" :style="style">4</farm-col>
|
|
67
|
+
<farm-col md="6" :style="style">6</farm-col>
|
|
68
|
+
<farm-col md="12" :style="style">12</farm-col>
|
|
69
|
+
<farm-col md="2" :style="style">2</farm-col>
|
|
70
|
+
</farm-row>`,
|
|
30
71
|
});
|
|
72
|
+
|
|
31
73
|
export const Sm = () => ({
|
|
32
|
-
|
|
74
|
+
data() {
|
|
75
|
+
return {
|
|
76
|
+
style,
|
|
77
|
+
};
|
|
78
|
+
},
|
|
79
|
+
template: `<farm-row>
|
|
80
|
+
<farm-col sm="4" :style="style">4</farm-col>
|
|
81
|
+
<farm-col sm="6" :style="style">6</farm-col>
|
|
82
|
+
<farm-col sm="12" :style="style">12</farm-col>
|
|
83
|
+
<farm-col sm="2" :style="style">2</farm-col>
|
|
84
|
+
</farm-row>`,
|
|
33
85
|
});
|
|
86
|
+
|
|
34
87
|
export const Xs = () => ({
|
|
35
|
-
|
|
88
|
+
data() {
|
|
89
|
+
return {
|
|
90
|
+
style,
|
|
91
|
+
};
|
|
92
|
+
},
|
|
93
|
+
template: `<farm-row>
|
|
94
|
+
<farm-col xs="4" :style="style">4</farm-col>
|
|
95
|
+
<farm-col xs="6" :style="style">6</farm-col>
|
|
96
|
+
<farm-col xs="12" :style="style">12</farm-col>
|
|
97
|
+
<farm-col xs="2" :style="style">2</farm-col>
|
|
98
|
+
</farm-row>`,
|
|
36
99
|
});
|
|
100
|
+
|
|
37
101
|
export const Combination = () => ({
|
|
38
|
-
|
|
102
|
+
data() {
|
|
103
|
+
return {
|
|
104
|
+
style,
|
|
105
|
+
};
|
|
106
|
+
},
|
|
107
|
+
template: `<div>
|
|
108
|
+
<farm-col lg="5" md="4" sm="3" :style="style">lg: 5 - md: 4 - sm: 3</farm-col>
|
|
109
|
+
</div>`,
|
|
39
110
|
});
|
|
40
111
|
export const TagP = () => ({
|
|
41
112
|
template: '<farm-col tag="p">col</farm-col>',
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
export const CompareToVCol = () => ({
|
|
116
|
+
data() {
|
|
117
|
+
return {
|
|
118
|
+
style,
|
|
119
|
+
};
|
|
120
|
+
},
|
|
121
|
+
template: `<div>
|
|
122
|
+
|
|
123
|
+
<h4>LG 3</h4>
|
|
124
|
+
<farm-col lg="3" :style="style">farm</farm-col>
|
|
125
|
+
<v-col lg="3" :style="style">v-col</v-col>
|
|
126
|
+
|
|
127
|
+
<h4>MD 3</h4>
|
|
128
|
+
<farm-col md="3" :style="style">farm</farm-col>
|
|
129
|
+
<v-col md="3" :style="style">v-col</v-col>
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
<h4>SM 3</h4>
|
|
133
|
+
<farm-col sm="3" :style="style">farm</farm-col>
|
|
134
|
+
<v-col sm="3" :style="style">v-col</v-col>
|
|
135
|
+
</div>`,
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
export const NoGutters = () => ({
|
|
139
|
+
data() {
|
|
140
|
+
return {
|
|
141
|
+
style,
|
|
142
|
+
};
|
|
143
|
+
},
|
|
144
|
+
template: '<farm-col :no-gutters="true" :style="style">col</farm-col>',
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
export const AlignSelf = () => ({
|
|
148
|
+
data() {
|
|
149
|
+
return {
|
|
150
|
+
style,
|
|
151
|
+
aligns,
|
|
152
|
+
};
|
|
153
|
+
},
|
|
154
|
+
template: `
|
|
155
|
+
<farm-row style="height: 150px">
|
|
156
|
+
<farm-col :style="style" v-for="align in aligns" :key="align" :align-self="align">{{ align }}</farm-col>
|
|
157
|
+
</farm-row>`,
|
|
42
158
|
});
|
|
@@ -3,11 +3,13 @@
|
|
|
3
3
|
:is="tag"
|
|
4
4
|
:class="{
|
|
5
5
|
'farm-col': true,
|
|
6
|
+
[`farm-col--align-${alignSelf}`]: alignSelf,
|
|
6
7
|
[`farm-col--xl-${xl}`]: xl,
|
|
7
8
|
[`farm-col--lg-${lg}`]: lg,
|
|
8
9
|
[`farm-col--md-${md}`]: md,
|
|
9
10
|
[`farm-col--sm-${sm}`]: sm,
|
|
10
11
|
[`farm-col--xs-${xs}`]: xs,
|
|
12
|
+
'farm-col--no-gutters': noGutters,
|
|
11
13
|
}"
|
|
12
14
|
>
|
|
13
15
|
<slot></slot>
|
|
@@ -23,36 +25,55 @@ export default Vue.extend({
|
|
|
23
25
|
* Html tag
|
|
24
26
|
*/
|
|
25
27
|
tag: { type: String, default: 'div' },
|
|
28
|
+
/**
|
|
29
|
+
* Extra-large breakpoint
|
|
30
|
+
*/
|
|
26
31
|
xl: {
|
|
27
|
-
type: [String, Number
|
|
28
|
-
|
|
29
|
-
>,
|
|
30
|
-
default: false,
|
|
32
|
+
type: [String, Number] as PropType<1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12>,
|
|
33
|
+
default: null,
|
|
31
34
|
},
|
|
35
|
+
/**
|
|
36
|
+
* Large breakpoint
|
|
37
|
+
*/
|
|
32
38
|
lg: {
|
|
33
|
-
type: [String, Number
|
|
34
|
-
|
|
35
|
-
>,
|
|
36
|
-
default: false,
|
|
39
|
+
type: [String, Number] as PropType<1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12>,
|
|
40
|
+
default: null,
|
|
37
41
|
},
|
|
42
|
+
/**
|
|
43
|
+
* Medium breakpoint
|
|
44
|
+
*/
|
|
38
45
|
md: {
|
|
39
|
-
type: [String, Number
|
|
40
|
-
|
|
41
|
-
>,
|
|
42
|
-
default: false,
|
|
46
|
+
type: [String, Number] as PropType<1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12>,
|
|
47
|
+
default: null,
|
|
43
48
|
},
|
|
49
|
+
/**
|
|
50
|
+
* Small breakpoint
|
|
51
|
+
*/
|
|
44
52
|
sm: {
|
|
45
|
-
type: [String, Number
|
|
46
|
-
|
|
47
|
-
>,
|
|
48
|
-
default: false,
|
|
53
|
+
type: [String, Number] as PropType<1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12>,
|
|
54
|
+
default: null,
|
|
49
55
|
},
|
|
56
|
+
/**
|
|
57
|
+
* Extra-small breakpoint
|
|
58
|
+
*/
|
|
50
59
|
xs: {
|
|
51
|
-
type: [String, Number
|
|
52
|
-
|
|
53
|
-
|
|
60
|
+
type: [String, Number] as PropType<1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12>,
|
|
61
|
+
default: null,
|
|
62
|
+
},
|
|
63
|
+
/**
|
|
64
|
+
* Remove default gutters
|
|
65
|
+
*/
|
|
66
|
+
noGutters: {
|
|
67
|
+
type: Boolean,
|
|
54
68
|
default: false,
|
|
55
69
|
},
|
|
70
|
+
/**
|
|
71
|
+
* Applies the align-items css property.
|
|
72
|
+
*/
|
|
73
|
+
alignSelf: {
|
|
74
|
+
type: String as PropType<'start' | 'center' | 'end' | 'auto' | 'baseline' | 'stretch'>,
|
|
75
|
+
default: '',
|
|
76
|
+
},
|
|
56
77
|
},
|
|
57
78
|
inheritAttrs: true,
|
|
58
79
|
});
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
title: 'Layout/Grid System',
|
|
3
|
+
parameters: {
|
|
4
|
+
docs: {
|
|
5
|
+
description: {
|
|
6
|
+
component: `Grid Syste<br />
|
|
7
|
+
`,
|
|
8
|
+
},
|
|
9
|
+
},
|
|
10
|
+
viewMode: 'docs',
|
|
11
|
+
},
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const style = {
|
|
15
|
+
border: '1px solid var(--farm-extra-1-darken)',
|
|
16
|
+
backgroundColor: 'var(--farm-extra-1-lighten)',
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export const MixBreakpoints = () => ({
|
|
20
|
+
data() {
|
|
21
|
+
return {
|
|
22
|
+
style,
|
|
23
|
+
};
|
|
24
|
+
},
|
|
25
|
+
template: `<div>
|
|
26
|
+
<farm-col lg="9" md="6" sm="3" :style="style">lg: 9 - md: 6 - sm: 3</farm-col>
|
|
27
|
+
</div>`,
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
export const Xl = () => ({
|
|
31
|
+
data() {
|
|
32
|
+
return {
|
|
33
|
+
style,
|
|
34
|
+
};
|
|
35
|
+
},
|
|
36
|
+
template: `<farm-row>
|
|
37
|
+
<farm-col xl="4" :style="style">1 of 3</farm-col>
|
|
38
|
+
<farm-col xl="4" :style="style">2 of 3</farm-col>
|
|
39
|
+
<farm-col xl="4" :style="style">3 of 3</farm-col>
|
|
40
|
+
<farm-col xl="6" :style="style">1 of 2</farm-col>
|
|
41
|
+
<farm-col xl="6" :style="style">2 of 2</farm-col>
|
|
42
|
+
<farm-col xl="12" :style="style">1 of 1</farm-col>
|
|
43
|
+
<farm-col xl="2" :style="style">1 of 6</farm-col>
|
|
44
|
+
<farm-col xl="2" :style="style">2 of 6</farm-col>
|
|
45
|
+
<farm-col xl="2" :style="style">3 of 6</farm-col>
|
|
46
|
+
<farm-col xl="2" :style="style">4 of 6</farm-col>
|
|
47
|
+
<farm-col xl="2" :style="style">5 of 6</farm-col>
|
|
48
|
+
<farm-col xl="2" :style="style">6 of 6</farm-col>
|
|
49
|
+
</farm-row>`,
|
|
50
|
+
});
|
|
51
|
+
export const Lg = () => ({
|
|
52
|
+
data() {
|
|
53
|
+
return {
|
|
54
|
+
style,
|
|
55
|
+
};
|
|
56
|
+
},
|
|
57
|
+
template: `<farm-row>
|
|
58
|
+
<farm-col lg="4" :style="style">1 of 3</farm-col>
|
|
59
|
+
<farm-col lg="4" :style="style">2 of 3</farm-col>
|
|
60
|
+
<farm-col lg="4" :style="style">3 of 3</farm-col>
|
|
61
|
+
<farm-col lg="6" :style="style">1 of 2</farm-col>
|
|
62
|
+
<farm-col lg="6" :style="style">2 of 2</farm-col>
|
|
63
|
+
<farm-col lg="12" :style="style">1 of 1</farm-col>
|
|
64
|
+
<farm-col lg="2" :style="style">1 of 6</farm-col>
|
|
65
|
+
<farm-col lg="2" :style="style">2 of 6</farm-col>
|
|
66
|
+
<farm-col lg="2" :style="style">3 of 6</farm-col>
|
|
67
|
+
<farm-col lg="2" :style="style">4 of 6</farm-col>
|
|
68
|
+
<farm-col lg="2" :style="style">5 of 6</farm-col>
|
|
69
|
+
<farm-col lg="2" :style="style">6 of 6</farm-col>
|
|
70
|
+
</farm-row>`,
|
|
71
|
+
});
|
|
72
|
+
export const Md = () => ({
|
|
73
|
+
data() {
|
|
74
|
+
return {
|
|
75
|
+
style,
|
|
76
|
+
};
|
|
77
|
+
},
|
|
78
|
+
template: `<farm-row>
|
|
79
|
+
<farm-col md="4" :style="style">1 of 3</farm-col>
|
|
80
|
+
<farm-col md="4" :style="style">2 of 3</farm-col>
|
|
81
|
+
<farm-col md="4" :style="style">3 of 3</farm-col>
|
|
82
|
+
<farm-col md="6" :style="style">1 of 2</farm-col>
|
|
83
|
+
<farm-col md="6" :style="style">2 of 2</farm-col>
|
|
84
|
+
<farm-col md="12" :style="style">1 of 1</farm-col>
|
|
85
|
+
<farm-col md="2" :style="style">1 of 6</farm-col>
|
|
86
|
+
<farm-col md="2" :style="style">2 of 6</farm-col>
|
|
87
|
+
<farm-col md="2" :style="style">3 of 6</farm-col>
|
|
88
|
+
<farm-col md="2" :style="style">4 of 6</farm-col>
|
|
89
|
+
<farm-col md="2" :style="style">5 of 6</farm-col>
|
|
90
|
+
<farm-col md="2" :style="style">6 of 6</farm-col>
|
|
91
|
+
</farm-row>`,
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
export const Sm = () => ({
|
|
95
|
+
data() {
|
|
96
|
+
return {
|
|
97
|
+
style,
|
|
98
|
+
};
|
|
99
|
+
},
|
|
100
|
+
template: `<farm-row>
|
|
101
|
+
<farm-col sm="4" :style="style">1 of 3</farm-col>
|
|
102
|
+
<farm-col sm="4" :style="style">2 of 3</farm-col>
|
|
103
|
+
<farm-col sm="4" :style="style">3 of 3</farm-col>
|
|
104
|
+
<farm-col sm="6" :style="style">1 of 2</farm-col>
|
|
105
|
+
<farm-col sm="6" :style="style">2 of 2</farm-col>
|
|
106
|
+
<farm-col sm="12":style="style" >1 of 1</farm-col>
|
|
107
|
+
<farm-col sm="2" :style="style">1 of 6</farm-col>
|
|
108
|
+
<farm-col sm="2" :style="style">2 of 6</farm-col>
|
|
109
|
+
<farm-col sm="2" :style="style" >3 of 6</farm-col>
|
|
110
|
+
<farm-col sm="2" :style="style">4 of 6</farm-col>
|
|
111
|
+
<farm-col sm="2" :style="style">5 of 6</farm-col>
|
|
112
|
+
<farm-col sm="2" :style="style">6 of 6</farm-col>
|
|
113
|
+
</farm-row>`,
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
export const Xs = () => ({
|
|
117
|
+
data() {
|
|
118
|
+
return {
|
|
119
|
+
style,
|
|
120
|
+
};
|
|
121
|
+
},
|
|
122
|
+
template: `<farm-row>
|
|
123
|
+
<farm-col xs="4" :style="style">1 of 3</farm-col>
|
|
124
|
+
<farm-col xs="4" :style="style">2 of 3</farm-col>
|
|
125
|
+
<farm-col xs="4" :style="style">3 of 3</farm-col>
|
|
126
|
+
<farm-col xs="6" :style="style">1 of 2</farm-col>
|
|
127
|
+
<farm-col xs="6" :style="style">2 of 2</farm-col>
|
|
128
|
+
<farm-col xs="12":style="style" >1 of 1</farm-col>
|
|
129
|
+
<farm-col xs="2" :style="style">1 of 6</farm-col>
|
|
130
|
+
<farm-col xs="2" :style="style">2 of 6</farm-col>
|
|
131
|
+
<farm-col xs="2" :style="style">3 of 6</farm-col>
|
|
132
|
+
<farm-col xs="2" :style="style">4 of 6</farm-col>
|
|
133
|
+
<farm-col xs="2" :style="style">5 of 6</farm-col>
|
|
134
|
+
<farm-col xs="2" :style="style">6 of 6</farm-col>
|
|
135
|
+
</farm-row>`,
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
|
|
@@ -6,27 +6,33 @@
|
|
|
6
6
|
display: flex;
|
|
7
7
|
flex-wrap: wrap;
|
|
8
8
|
flex: 1 1 auto;
|
|
9
|
-
|
|
9
|
+
|
|
10
|
+
margin: 0 -#{gutter('vuetify')};
|
|
10
11
|
|
|
11
12
|
@each $k in $aligns {
|
|
12
13
|
&#{'--align-' + $k} {
|
|
13
|
-
align-items: $k
|
|
14
|
+
align-items: $k!important;
|
|
14
15
|
}
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
@each $k in $align-contents {
|
|
18
19
|
&#{'--align-content-' + $k} {
|
|
19
|
-
align-content: $k
|
|
20
|
+
align-content: $k!important;
|
|
20
21
|
}
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
@each $k in $justifications {
|
|
24
25
|
&#{'--justify-' + $k} {
|
|
25
|
-
justify-content: $k
|
|
26
|
+
justify-content: $k!important;
|
|
26
27
|
}
|
|
27
28
|
}
|
|
28
29
|
|
|
29
|
-
&--no-gutters {
|
|
30
|
+
&--no-default-gutters {
|
|
30
31
|
margin: 0;
|
|
31
32
|
}
|
|
33
|
+
|
|
34
|
+
&--extra-decrease {
|
|
35
|
+
margin: 0 -#{2 * gutter('vuetify')};
|
|
36
|
+
}
|
|
37
|
+
|
|
32
38
|
}
|
|
@@ -29,10 +29,10 @@ export const Align = () => ({
|
|
|
29
29
|
},
|
|
30
30
|
template: `<div>
|
|
31
31
|
<farm-row :align="align" v-for="align in aligns" :key="'align_' + align">
|
|
32
|
-
<
|
|
32
|
+
<farm-col md="6">
|
|
33
33
|
row align
|
|
34
34
|
{{ align }}
|
|
35
|
-
</
|
|
35
|
+
</farm-col>
|
|
36
36
|
</farm-row>
|
|
37
37
|
</div>`,
|
|
38
38
|
});
|
|
@@ -45,10 +45,10 @@ export const AlignContent = () => ({
|
|
|
45
45
|
},
|
|
46
46
|
template: `<div>
|
|
47
47
|
<farm-row :align-content="align" v-for="align in aligns" :key="'align-content-_' + align">
|
|
48
|
-
<
|
|
48
|
+
<farm-col md="6">
|
|
49
49
|
row align-content
|
|
50
50
|
{{ align }}
|
|
51
|
-
</
|
|
51
|
+
</farm-col>
|
|
52
52
|
</farm-row>
|
|
53
53
|
</div>`,
|
|
54
54
|
});
|
|
@@ -61,13 +61,13 @@ export const Justify = () => ({
|
|
|
61
61
|
},
|
|
62
62
|
template: `<div>
|
|
63
63
|
<farm-row :justify="k" v-for="k in justifications" :key="'justify-_' + k">
|
|
64
|
-
<
|
|
64
|
+
<farm-col md="6">
|
|
65
65
|
row justify {{ k }}
|
|
66
|
-
</
|
|
66
|
+
</farm-col>
|
|
67
67
|
</farm-row>
|
|
68
68
|
</div>`,
|
|
69
69
|
});
|
|
70
70
|
|
|
71
|
-
export const
|
|
72
|
-
template: '<farm-row :no-gutters="true">no gutters</farm-row>',
|
|
71
|
+
export const NoDefaultGutters = () => ({
|
|
72
|
+
template: '<farm-row :no-default-gutters="true">no gutters</farm-row>',
|
|
73
73
|
});
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
[`farm-row--align-${align}`]: align,
|
|
7
7
|
[`farm-row--align-content-${alignContent}`]: alignContent,
|
|
8
8
|
[`farm-row--justify-${justify}`]: justify,
|
|
9
|
-
'farm-row--no-gutters':
|
|
9
|
+
'farm-row--no-default-gutters': noDefaultGutters,
|
|
10
|
+
'farm-row--extra-decrease': extraDecrease,
|
|
10
11
|
}"
|
|
11
12
|
>
|
|
12
13
|
<slot></slot>
|
|
@@ -48,7 +49,14 @@ export default Vue.extend({
|
|
|
48
49
|
/**
|
|
49
50
|
* Remove default gutters
|
|
50
51
|
*/
|
|
51
|
-
|
|
52
|
+
noDefaultGutters: {
|
|
53
|
+
type: Boolean,
|
|
54
|
+
default: false,
|
|
55
|
+
},
|
|
56
|
+
/**
|
|
57
|
+
* Extra decrease margin
|
|
58
|
+
*/
|
|
59
|
+
extraDecrease: {
|
|
52
60
|
type: Boolean,
|
|
53
61
|
default: false,
|
|
54
62
|
},
|
|
@@ -16,6 +16,12 @@
|
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
+
@mixin fromXs {
|
|
20
|
+
@media (min-width: 600px) {
|
|
21
|
+
@content;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
19
25
|
@mixin fromSm {
|
|
20
26
|
@media (min-width: 960px) {
|
|
21
27
|
@content;
|
|
@@ -36,4 +42,44 @@
|
|
|
36
42
|
|
|
37
43
|
@mixin addShadow {
|
|
38
44
|
box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.16);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
@mixin buildCol($code) {
|
|
48
|
+
@for $i from 1 through 12 {
|
|
49
|
+
.farm-col--#{$code}-#{$i * 1} {
|
|
50
|
+
flex: 0 0 (100/12 * $i)+#{"%"};
|
|
51
|
+
max-width: (100/12 * $i)+#{"%"};
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@mixin rippleStyles {
|
|
57
|
+
.farm-ripple {
|
|
58
|
+
border-radius: 50%;
|
|
59
|
+
cursor: pointer;
|
|
60
|
+
position: absolute;
|
|
61
|
+
transition: all 0.4s;
|
|
62
|
+
z-index: 1;
|
|
63
|
+
|
|
64
|
+
&:before {
|
|
65
|
+
transition: all 0.2s;
|
|
66
|
+
border-radius: inherit;
|
|
67
|
+
bottom: 0;
|
|
68
|
+
content: "";
|
|
69
|
+
position: absolute;
|
|
70
|
+
opacity: 0;
|
|
71
|
+
left: 0;
|
|
72
|
+
right: 0;
|
|
73
|
+
top: 0;
|
|
74
|
+
transform-origin: center center;
|
|
75
|
+
background-color: var(--farm-stroke-base);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
@mixin activateRipple {
|
|
80
|
+
&:hover {
|
|
81
|
+
.farm-ripple:before {
|
|
82
|
+
opacity: 0.3;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
39
85
|
}
|
|
@@ -28,7 +28,7 @@ $fontSizes: (
|
|
|
28
28
|
|
|
29
29
|
$fontWeights: 100, 200, 300, 400, 500, 600, 700;
|
|
30
30
|
|
|
31
|
-
$aligns: start,
|
|
32
|
-
$align-contents: start,
|
|
33
|
-
$justifications: start,
|
|
34
|
-
$directions: row,
|
|
31
|
+
$aligns: start,center,end,auto,baseline,stretch;
|
|
32
|
+
$align-contents: start,center,end,space-between,space-around,stretch;
|
|
33
|
+
$justifications: start,center,end,space-between,space-around;
|
|
34
|
+
$directions: row,row-reverse,column,column-reverse;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
const directions = ['row', 'row-reverse', 'column', 'column-reverse'];
|
|
2
|
-
const justifications = ['start', 'center', 'end', 'space-between', 'space-around'];
|
|
2
|
+
const justifications = ['start', 'center', 'end', 'auto', 'space-between', 'space-around'];
|
|
3
|
+
const aligns = ['start', 'center', 'end', 'auto', 'baseline', 'stretch'];
|
|
3
4
|
|
|
4
|
-
export { directions, justifications };
|
|
5
|
+
export { aligns, directions, justifications };
|