@farm-investimentos/front-mfe-components 10.0.0 → 10.0.1

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@farm-investimentos/front-mfe-components",
3
- "version": "10.0.0",
3
+ "version": "10.0.1",
4
4
  "author": "farm investimentos",
5
5
  "private": false,
6
6
  "main": "./dist/front-mfe-components.common.js",
@@ -29,10 +29,10 @@
29
29
  "devDependencies": {
30
30
  "@farm-investimentos/front-mfe-libs-ts": "^1.0.9",
31
31
  "@socheatsok78/storybook-addon-vuetify": "^0.1.9",
32
- "@storybook/addon-actions": "^6.5.8",
33
- "@storybook/addon-essentials": "^6.5.8",
34
- "@storybook/addon-links": "^6.5.8",
35
- "@storybook/vue": "^6.5.8",
32
+ "@storybook/addon-actions": "6.5.8",
33
+ "@storybook/addon-essentials": "6.5.8",
34
+ "@storybook/addon-links": "6.5.8",
35
+ "@storybook/vue": "6.5.8",
36
36
  "@types/jest": "^24.9.1",
37
37
  "@typescript-eslint/eslint-plugin": "^4.18.0",
38
38
  "@typescript-eslint/parser": "^4.18.0",
@@ -8,7 +8,6 @@ import Vue from 'vue';
8
8
 
9
9
  export default Vue.extend({
10
10
  name: 'farm-list',
11
- props: {},
12
11
  setup() {},
13
12
  });
14
13
  </script>
@@ -14,7 +14,7 @@ export const Primary = () => ({
14
14
  template: '<farm-container>content</farm-container>',
15
15
  });
16
16
 
17
- export const Secondary = () => ({
17
+ export const Structure = () => ({
18
18
  template: `
19
19
  <farm-container>
20
20
  <div>
@@ -25,12 +25,18 @@ export const Secondary = () => ({
25
25
  Content<br />
26
26
  </div>
27
27
  <farm-row>
28
- <v-col md="6">
28
+ <v-col md="6" lg="3">
29
29
  coluna 1
30
30
  </v-col>
31
- <v-col md="6">
31
+ <v-col md="6" lg="3">
32
32
  coluna 2
33
33
  </v-col>
34
+ <v-col md="6" lg="3">
35
+ coluna 3
36
+ </v-col>
37
+ <v-col md="6" lg="3">
38
+ coluna 4
39
+ </v-col>
34
40
  </farm-row>
35
41
  <farm-row>
36
42
  <farm-container-footer>
@@ -3,18 +3,19 @@
3
3
 
4
4
  .farm-container {
5
5
  width: 100%;
6
- padding: 12px;
6
+ padding: 0;
7
7
  margin-right: auto;
8
8
  margin-left: auto;
9
9
  max-width: 100%;
10
10
 
11
11
  >div {
12
+ border-top: 1px solid var(--farm-stroke-base);
12
13
  background-color: white;
13
14
  border-radius: 8px;
14
- max-width: calc(100% - 24px);
15
- margin: gutter('lg') auto;
15
+ max-width: 100%;
16
+ margin: gutter('lg');
16
17
  padding: gutter('lg');
17
- @include addShadow;
18
+ box-shadow: 0px 3px 1px -2px rgb(0 0 0 / 20%), 0px 2px 2px 0px rgb(0 0 0 / 14%), 0px 1px 5px 0px rgb(0 0 0 / 12%) !important;
18
19
 
19
20
  // deprecated
20
21
  .container-main__footer-buttons-right {
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <section class="farm-container">
3
- <div class="elevation-2">
3
+ <div>
4
4
  <slot></slot>
5
5
  </div>
6
6
  </section>
@@ -7,7 +7,8 @@ export default {
7
7
  docs: {
8
8
  description: {
9
9
  component: `Container Footer<br />
10
- selector: <em>farm-container-footer</em>
10
+ selector: <em>farm-container-footer</em><br />
11
+ <span style="color: green">ready for use</span>
11
12
  `,
12
13
  },
13
14
  },
@@ -0,0 +1,100 @@
1
+ import { Meta } from '@storybook/addon-docs';
2
+
3
+ <Meta title="Layout/Display Breakpoints" />
4
+
5
+ # Display Breakpoints
6
+
7
+ <table width="100%">
8
+ <thead>
9
+ <tr>
10
+ <th>Device</th>
11
+ <th>Code</th>
12
+ <th>Type</th>
13
+ <th>Range</th>
14
+ </tr>
15
+ </thead>
16
+ <tbody>
17
+ <tr>
18
+ <td>
19
+ <span>
20
+ <i className="mdi mdi-cellphone" />
21
+ &nbsp; Extra small
22
+ </span>
23
+ </td>
24
+ <td>
25
+ <strong>xs</strong>
26
+ </td>
27
+ <td>Small to large phone</td>
28
+ <td>&lt; 600px</td>
29
+ </tr>
30
+ <tr>
31
+ <td>
32
+ <i className="mdi mdi-tablet" />
33
+ &nbsp;
34
+ <span>Small</span>
35
+ </td>
36
+ <td>
37
+ <strong>sm</strong>
38
+ </td>
39
+ <td>Small to medium tablet</td>
40
+ <td>600px &gt; &lt; 960px</td>
41
+ </tr>
42
+ <tr>
43
+ <td>
44
+ <i className="mdi mdi-laptop" />
45
+ &nbsp;
46
+ <span>Medium</span>
47
+ </td>
48
+ <td>
49
+ <strong>md</strong>
50
+ </td>
51
+ <td>Large tablet to laptop</td>
52
+ <td>960px &gt; &lt; 1264px*</td>
53
+ </tr>
54
+ <tr>
55
+ <td>
56
+ <i className="mdi mdi-monitor" />
57
+ &nbsp;
58
+ <span>Large</span>
59
+ </td>
60
+ <td>
61
+ <strong>lg</strong>
62
+ </td>
63
+ <td>Desktop</td>
64
+ <td>1264px &gt; &lt; 1904px*</td>
65
+ </tr>
66
+ <tr>
67
+ <td>
68
+ <i className="mdi mdi-television" />
69
+ &nbsp;
70
+ <span>Extra large</span>
71
+ </td>
72
+ <td>
73
+ <strong>xl</strong>
74
+ </td>
75
+ <td>4k and ultra-wide</td>
76
+ <td>&gt; 1904px*</td>
77
+ </tr>
78
+ </tbody>
79
+ <tfoot>
80
+ <tr>
81
+ <td colSpan="4">
82
+ <em> * -16px on desktop for browser scrollbar</em>
83
+ </td>
84
+ </tr>
85
+ </tfoot>
86
+ </table>
87
+
88
+ ## SCSS Helpers
89
+
90
+ The _mixins.scss contains mixins for media query, to abstract the breakpoints and create queries for different breakpoints.
91
+
92
+ <code>
93
+ @import '@farm-investimentos/front-mfe-components/src/configurations/_mixins.scss';
94
+
95
+ @include fromSm { // min-width: 960px <br />
96
+ .product-limit {<br />
97
+ text-align: center;<br />
98
+ }<br />
99
+ }
100
+ </code>
@@ -8,7 +8,7 @@ export default {
8
8
  description: {
9
9
  component: `Row<br />
10
10
  selector: <em>farm-row</em><br />
11
- <span style="color: var(--farm-extra-1-base);">development</span>
11
+ <span style="color: green">ready for use</span>
12
12
  `,
13
13
  },
14
14
  },
@@ -12,8 +12,7 @@
12
12
  </component>
13
13
  </template>
14
14
  <script lang="ts">
15
- import Vue from 'vue';
16
- import { PropType } from 'vue/types/v3-component-props';
15
+ import Vue, { PropType } from 'vue';
17
16
 
18
17
  export default Vue.extend({
19
18
  name: 'farm-row',
@@ -22,16 +21,25 @@ export default Vue.extend({
22
21
  * Html tag
23
22
  */
24
23
  tag: { type: String, default: 'div' },
24
+ /**
25
+ * Applies the align-items css property.
26
+ */
25
27
  align: {
26
28
  type: String as PropType<'start' | 'center' | 'end' | 'baseline' | 'stretch'>,
27
29
  default: '',
28
30
  },
31
+ /**
32
+ * applies the align-content css property
33
+ */
29
34
  alignContent: {
30
35
  type: String as PropType<
31
36
  'start' | 'center' | 'end' | 'space-between' | 'space-around' | 'stretch'
32
37
  >,
33
38
  default: '',
34
39
  },
40
+ /**
41
+ * Applies the justify-content css property
42
+ */
35
43
  justify: {
36
44
  type: String as PropType<'start' | 'center' | 'end' | 'space-between' | 'space-around'>,
37
45
  default: '',
@@ -28,6 +28,12 @@
28
28
  }
29
29
  }
30
30
 
31
+ @mixin fromLg {
32
+ @media (min-width: 1904px) {
33
+ @content;
34
+ }
35
+ }
36
+
31
37
  @mixin addShadow {
32
38
  box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.16);
33
39
  }