@farm-investimentos/front-mfe-components 10.1.1 → 10.1.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 +201 -178
- 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 +201 -178
- 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/Card/CardContent/CardContent.vue +3 -0
- package/src/components/Form/__tests__/Form.spec.js +0 -1
- package/src/components/MainFilter/MainFilter.vue +1 -1
- package/src/components/layout/Box/Box.scss +18 -2
- package/src/components/layout/Box/Box.stories.js +12 -0
- package/src/components/layout/Box/Box.vue +11 -1
- package/src/components/layout/Box/__tests__/Box.spec.js +0 -1
- package/src/components/layout/Col/__tests__/Col.spec.js +0 -1
- package/src/components/layout/DisplayBreakpoints.stories.mdx +3 -3
- package/src/components/layout/PropsValues.stories.mdx +30 -0
- package/src/components/layout/Row/Row.scss +4 -0
- package/src/components/layout/Row/Row.stories.js +4 -0
- package/src/components/layout/Row/Row.vue +9 -1
- package/src/components/layout/Row/__tests__/Row.spec.js +0 -1
- package/src/configurations/_variables.scss +3 -2
- package/src/configurations/gutters.ts +1 -1
package/package.json
CHANGED
|
@@ -11,6 +11,9 @@ export default Vue.extend({
|
|
|
11
11
|
name: 'farm-card-content',
|
|
12
12
|
props: {
|
|
13
13
|
tag: { type: String, default: 'div' },
|
|
14
|
+
/**
|
|
15
|
+
* Add gutter
|
|
16
|
+
*/
|
|
14
17
|
gutter: {
|
|
15
18
|
type: String as PropType<'none' | 'xs' | 'sm' | 'default' | 'md' | 'lg' | 'xl'>,
|
|
16
19
|
default: 'default',
|
|
@@ -6,15 +6,31 @@
|
|
|
6
6
|
max-width: 100%;
|
|
7
7
|
transition: .2s cubic-bezier(.4, 0, .2, 1);
|
|
8
8
|
|
|
9
|
+
>div {
|
|
10
|
+
flex: 1 1 auto;
|
|
11
|
+
max-width: 100%;
|
|
12
|
+
position: relative;
|
|
13
|
+
}
|
|
14
|
+
|
|
9
15
|
@each $k in $justifications {
|
|
10
16
|
&#{'--justify-' + $k} {
|
|
11
|
-
|
|
17
|
+
>div {
|
|
18
|
+
justify-content: $k;
|
|
19
|
+
}
|
|
12
20
|
}
|
|
13
21
|
}
|
|
14
22
|
|
|
15
23
|
@each $k in $directions {
|
|
16
24
|
&#{'--direction-' + $k} {
|
|
17
|
-
|
|
25
|
+
>div {
|
|
26
|
+
flex-direction: $k;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@each $k in map-keys($gutters) {
|
|
32
|
+
&#{'[gutter=' + $k + ']'} {
|
|
33
|
+
padding: map-get($gutters, $k);
|
|
18
34
|
}
|
|
19
35
|
}
|
|
20
36
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import Box from './Box.vue';
|
|
2
2
|
import { directions, justifications } from '../../../configurations/flexVariables';
|
|
3
|
+
import gutters from '../../../configurations/gutters';
|
|
3
4
|
|
|
4
5
|
export default {
|
|
5
6
|
title: 'Layout/Box',
|
|
@@ -64,3 +65,14 @@ export const Directions = () => ({
|
|
|
64
65
|
</farm-box>
|
|
65
66
|
</div>`,
|
|
66
67
|
});
|
|
68
|
+
|
|
69
|
+
export const Gutters = () => ({
|
|
70
|
+
data() {
|
|
71
|
+
return { gutters };
|
|
72
|
+
},
|
|
73
|
+
template: `<div style="width: 480px;">
|
|
74
|
+
<farm-box v-for="gutter in gutters" :key="gutter" :gutter="gutter" style="margin-bottom: 16px">
|
|
75
|
+
box with gutter {{ gutter }}
|
|
76
|
+
</farm-box>
|
|
77
|
+
</div>`,
|
|
78
|
+
});
|
|
@@ -6,8 +6,11 @@
|
|
|
6
6
|
[`farm-box--justify-${justify}`]: justify,
|
|
7
7
|
[`farm-box--direction-${direction}`]: direction,
|
|
8
8
|
}"
|
|
9
|
+
:gutter="gutter"
|
|
9
10
|
>
|
|
10
|
-
<
|
|
11
|
+
<div>
|
|
12
|
+
<slot></slot>
|
|
13
|
+
</div>
|
|
11
14
|
</component>
|
|
12
15
|
</template>
|
|
13
16
|
<script lang="ts">
|
|
@@ -34,6 +37,13 @@ export default Vue.extend({
|
|
|
34
37
|
type: String as PropType<'start' | 'center' | 'end' | 'space-between' | 'space-around'>,
|
|
35
38
|
default: '',
|
|
36
39
|
},
|
|
40
|
+
/**
|
|
41
|
+
* Add gutter
|
|
42
|
+
*/
|
|
43
|
+
gutter: {
|
|
44
|
+
type: String as PropType<'none' | 'xs' | 'sm' | 'default' | 'md' | 'lg' | 'xl' | 'ds'>,
|
|
45
|
+
default: 'none',
|
|
46
|
+
},
|
|
37
47
|
},
|
|
38
48
|
inheritAttrs: true,
|
|
39
49
|
});
|
|
@@ -93,8 +93,8 @@ The _mixins.scss contains mixins for media query, to abstract the breakpoints an
|
|
|
93
93
|
@import '@farm-investimentos/front-mfe-components/src/configurations/_mixins.scss';
|
|
94
94
|
|
|
95
95
|
@include fromSm { // min-width: 960px <br />
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
96
|
+
 .product-limit {<br />
|
|
97
|
+
  text-align: center;<br />
|
|
98
|
+
 }<br />
|
|
99
99
|
}
|
|
100
100
|
</code>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Meta } from '@storybook/addon-docs';
|
|
2
|
+
|
|
3
|
+
<Meta title="Layout/Props Values" />
|
|
4
|
+
|
|
5
|
+
# About
|
|
6
|
+
Many components have props that accepts strings as values instead of passa a numeric values.
|
|
7
|
+
Example:
|
|
8
|
+
<code>
|
|
9
|
+
<my-component some-prop="md" /><br />
|
|
10
|
+
//"md" will be used as 12px in the CSS
|
|
11
|
+
</code>
|
|
12
|
+
<br /><br />
|
|
13
|
+
|
|
14
|
+
## Gutter
|
|
15
|
+
* none: 0
|
|
16
|
+
* xs: 4px
|
|
17
|
+
* sm: 8px
|
|
18
|
+
* vuetify: 12px
|
|
19
|
+
* md: 16px
|
|
20
|
+
* lg: 24px
|
|
21
|
+
* xl: 32px
|
|
22
|
+
* default: 24px
|
|
23
|
+
|
|
24
|
+
## Font Size
|
|
25
|
+
* xs: 8px
|
|
26
|
+
* sm: 12px
|
|
27
|
+
* md: 14px
|
|
28
|
+
* default: 16px
|
|
29
|
+
* lg: 20px
|
|
30
|
+
* xl: 24px
|
|
@@ -6,6 +6,7 @@
|
|
|
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': noGutters,
|
|
9
10
|
}"
|
|
10
11
|
>
|
|
11
12
|
<slot></slot>
|
|
@@ -44,10 +45,17 @@ export default Vue.extend({
|
|
|
44
45
|
type: String as PropType<'start' | 'center' | 'end' | 'space-between' | 'space-around'>,
|
|
45
46
|
default: '',
|
|
46
47
|
},
|
|
48
|
+
/**
|
|
49
|
+
* Remove default gutters
|
|
50
|
+
*/
|
|
51
|
+
noGutters: {
|
|
52
|
+
type: Boolean,
|
|
53
|
+
default: false,
|
|
54
|
+
},
|
|
47
55
|
},
|
|
48
56
|
inheritAttrs: true,
|
|
49
57
|
});
|
|
50
58
|
</script>
|
|
51
59
|
<style lang="scss" scoped>
|
|
52
|
-
@import 'Row
|
|
60
|
+
@import 'Row';
|
|
53
61
|
</style>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default ['none', 'xs', 'sm', 'md', 'lg', 'xl'];
|
|
1
|
+
export default ['none', 'xs', 'sm', 'vuetify', 'md', 'lg', 'xl', 'default'];
|