@farm-investimentos/front-mfe-components 13.0.3 → 13.0.4

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": "13.0.3",
3
+ "version": "13.0.4",
4
4
  "author": "farm investimentos",
5
5
  "private": false,
6
6
  "main": "./dist/front-mfe-components.common.js",
@@ -14,7 +14,8 @@
14
14
  "storybook": "start-storybook -p 6006",
15
15
  "build-storybook": "build-storybook",
16
16
  "test:unit": "jest --updateSnapshot",
17
- "test:coverage": "jest --updateSnapshot --coverage"
17
+ "test:coverage": "jest --updateSnapshot --coverage",
18
+ "prepare": "husky install"
18
19
  },
19
20
  "files": [
20
21
  "dist/*",
@@ -52,7 +53,8 @@
52
53
  "text-mask-addons": "^3.8.0",
53
54
  "typescript": "~4.1.5",
54
55
  "v-mask": "2.3.0",
55
- "vue-template-compiler": "2.7.10"
56
+ "vue-template-compiler": "2.7.10",
57
+ "husky": "^8.0.0"
56
58
  },
57
59
  "browserslist": [
58
60
  "> 1%",
@@ -11,8 +11,9 @@
11
11
  variation="darken"
12
12
  size="md"
13
13
  :color="color"
14
- >{{ icon }}</farm-icon
15
14
  >
15
+ {{ icon }}
16
+ </farm-icon>
16
17
  <div
17
18
  :class="{
18
19
  'farm-alert-box__content': true,
@@ -22,9 +23,11 @@
22
23
  <farm-bodytext
23
24
  variation="regular"
24
25
  color-variation="darken"
26
+ :tag="tag"
25
27
  :type="1"
26
28
  :color="color"
27
29
  >
30
+ <!-- @slot default -->
28
31
  <slot></slot>
29
32
  </farm-bodytext>
30
33
  </div>
@@ -92,6 +95,13 @@ export default Vue.extend({
92
95
  type: Boolean,
93
96
  default: true,
94
97
  },
98
+ /**
99
+ * Html tag (will be forwarded to farm-typography)
100
+ */
101
+ tag: {
102
+ type: String,
103
+ default: 'p',
104
+ },
95
105
  },
96
106
  setup(props, { emit }) {
97
107
  const visible = ref(true);
@@ -109,8 +119,6 @@ export default Vue.extend({
109
119
  };
110
120
  },
111
121
  });
112
-
113
-
114
122
  </script>
115
123
  <style lang="scss" scoped>
116
124
  @import './AlertBox';
@@ -17,7 +17,7 @@
17
17
  }
18
18
 
19
19
  &.logger__divider--info-to-info {
20
- background: var(--farm-error-base);
20
+ background: var(--farm-info-base);
21
21
  }
22
22
 
23
23
  &.logger__divider--success-to-error {
@@ -54,7 +54,7 @@ export const Primary = () => ({
54
54
  message: 'Recusado entre as pré elegíveis',
55
55
  userName: 'Cleyton Rasta',
56
56
  formattedDate: '13/06/2022 20:40',
57
- status: 'success',
57
+ status: 'info',
58
58
  },
59
59
  {
60
60
  message: 'Info',
@@ -29,7 +29,18 @@ export default Vue.extend({
29
29
  */
30
30
  tag: {
31
31
  type: String as PropType<
32
- 'p' | 'span' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'legend' | 'label' | 'li'
32
+ | 'p'
33
+ | 'span'
34
+ | 'h1'
35
+ | 'h2'
36
+ | 'h3'
37
+ | 'h4'
38
+ | 'h5'
39
+ | 'h6'
40
+ | 'legend'
41
+ | 'label'
42
+ | 'li'
43
+ | 'div'
33
44
  >,
34
45
  default: 'p',
35
46
  },
@@ -51,7 +51,7 @@ describe('Typography component', () => {
51
51
  it('Should not allow invalid html tag', async () => {
52
52
  const wrapperTest = shallowMount(Typography, {
53
53
  propsData: {
54
- tag: 'div',
54
+ tag: 'section',
55
55
  },
56
56
  });
57
57
  expect(wrapperTest.vm.tag).toEqual('p');
@@ -1 +1 @@
1
- export default ['p', 'span', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'legend', 'label', 'li'];
1
+ export default ['p', 'span', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'legend', 'label', 'li', 'div'];