@farm-investimentos/front-mfe-components 12.2.0 → 12.2.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/dist/front-mfe-components.common.js +187 -159
- 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 +187 -159
- 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 +2 -2
- package/src/components/Select/Select.vue +8 -0
- package/src/components/TextArea/TextArea.scss +4 -0
- package/src/components/TextArea/TextArea.vue +21 -12
- package/src/components/TextFieldV2/TextFieldV2.scss +4 -0
- package/src/components/TextFieldV2/TextFieldV2.vue +21 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@farm-investimentos/front-mfe-components",
|
|
3
|
-
"version": "12.2.
|
|
3
|
+
"version": "12.2.1",
|
|
4
4
|
"author": "farm investimentos",
|
|
5
5
|
"private": false,
|
|
6
6
|
"main": "./dist/front-mfe-components.common.js",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"serve": "vue-cli-service serve",
|
|
11
11
|
"build": "npm run build:components",
|
|
12
12
|
"build:components": "vue-cli-service build --target lib --name front-mfe-components src/main.ts",
|
|
13
|
-
"lint": "vue-cli-service lint",
|
|
13
|
+
"lint": "vue-cli-service lint --fix",
|
|
14
14
|
"storybook": "start-storybook -p 6006",
|
|
15
15
|
"build-storybook": "build-storybook",
|
|
16
16
|
"test:unit": "jest --updateSnapshot",
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
'farm-textfield--blured': isBlured,
|
|
9
9
|
'farm-textfield--error': hasError,
|
|
10
10
|
'farm-textfield--disabled': disabled,
|
|
11
|
+
'farm-textfield--hiddendetails': hideDetails,
|
|
11
12
|
}"
|
|
12
13
|
v-if="!readonly && !disabled"
|
|
13
14
|
>
|
|
@@ -144,6 +145,13 @@ export default Vue.extend({
|
|
|
144
145
|
type: Boolean,
|
|
145
146
|
default: false,
|
|
146
147
|
},
|
|
148
|
+
/**
|
|
149
|
+
* Hides hint and validation errors
|
|
150
|
+
*/
|
|
151
|
+
hideDetails: {
|
|
152
|
+
type: Boolean,
|
|
153
|
+
default: false,
|
|
154
|
+
},
|
|
147
155
|
},
|
|
148
156
|
setup(props, { emit }) {
|
|
149
157
|
const { rules, items, itemText, itemValue, disabled, multiple } = toRefs(props);
|
|
@@ -8,16 +8,18 @@
|
|
|
8
8
|
'farm-textarea--blured': isBlured,
|
|
9
9
|
'farm-textarea--error': hasError,
|
|
10
10
|
'farm-textarea--disabled': disabled,
|
|
11
|
+
'farm-textarea--hiddendetails': hideDetails,
|
|
11
12
|
}"
|
|
12
13
|
>
|
|
13
|
-
<div
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
<div
|
|
15
|
+
:class="{
|
|
16
|
+
'farm-textarea--textarea': true,
|
|
17
|
+
}"
|
|
18
|
+
>
|
|
17
19
|
<textarea
|
|
18
20
|
v-bind="$attrs"
|
|
19
21
|
v-model="innerValue"
|
|
20
|
-
|
|
22
|
+
:rows="$props.rows"
|
|
21
23
|
:disabled="disabled"
|
|
22
24
|
:readonly="readonly"
|
|
23
25
|
@click="$emit('click')"
|
|
@@ -79,13 +81,20 @@ export default Vue.extend({
|
|
|
79
81
|
type: Array as PropType<Array<Function>>,
|
|
80
82
|
default: () => [],
|
|
81
83
|
},
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
84
|
+
/**
|
|
85
|
+
* Textarea rows
|
|
86
|
+
*/
|
|
87
|
+
rows: {
|
|
88
|
+
default: 5,
|
|
89
|
+
type: [String, Number],
|
|
90
|
+
},
|
|
91
|
+
/**
|
|
92
|
+
* Hides hint and validation errors
|
|
93
|
+
*/
|
|
94
|
+
hideDetails: {
|
|
95
|
+
type: Boolean,
|
|
96
|
+
default: false,
|
|
97
|
+
},
|
|
89
98
|
},
|
|
90
99
|
setup(props, { emit }) {
|
|
91
100
|
const { rules } = toRefs(props);
|
|
@@ -8,12 +8,15 @@
|
|
|
8
8
|
'farm-textfield--blured': isBlured,
|
|
9
9
|
'farm-textfield--error': hasError,
|
|
10
10
|
'farm-textfield--disabled': disabled,
|
|
11
|
+
'farm-textfield--hiddendetails': hideDetails,
|
|
11
12
|
}"
|
|
12
13
|
>
|
|
13
|
-
<div
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
<div
|
|
15
|
+
:class="{
|
|
16
|
+
'farm-textfield--input': true,
|
|
17
|
+
'farm-textfield--input--iconed': icon,
|
|
18
|
+
}"
|
|
19
|
+
>
|
|
17
20
|
<button
|
|
18
21
|
type="button"
|
|
19
22
|
v-if="icon && iconPosition === 'left'"
|
|
@@ -24,7 +27,7 @@
|
|
|
24
27
|
<input
|
|
25
28
|
v-bind="$attrs"
|
|
26
29
|
v-model="innerValue"
|
|
27
|
-
v-mask="mask"
|
|
30
|
+
v-mask="mask"
|
|
28
31
|
:disabled="disabled"
|
|
29
32
|
:readonly="readonly"
|
|
30
33
|
@click="$emit('click')"
|
|
@@ -39,10 +42,14 @@
|
|
|
39
42
|
<farm-icon color="gray" size="20px">{{ icon }}</farm-icon>
|
|
40
43
|
</button>
|
|
41
44
|
</div>
|
|
42
|
-
<farm-caption v-if="showErrorText" color="error" variation="regular">
|
|
45
|
+
<farm-caption v-if="!hideDetails && showErrorText" color="error" variation="regular">
|
|
43
46
|
{{ errorBucket[0] }}
|
|
44
47
|
</farm-caption>
|
|
45
|
-
<farm-caption
|
|
48
|
+
<farm-caption
|
|
49
|
+
v-if="!hideDetails && hint && !showErrorText"
|
|
50
|
+
color="gray"
|
|
51
|
+
variation="regular"
|
|
52
|
+
>
|
|
46
53
|
{{ hint }}
|
|
47
54
|
</farm-caption>
|
|
48
55
|
</div>
|
|
@@ -111,6 +118,13 @@ export default Vue.extend({
|
|
|
111
118
|
default: '',
|
|
112
119
|
type: [String, Function],
|
|
113
120
|
},
|
|
121
|
+
/**
|
|
122
|
+
* Hides hint and validation errors
|
|
123
|
+
*/
|
|
124
|
+
hideDetails: {
|
|
125
|
+
type: Boolean,
|
|
126
|
+
default: false,
|
|
127
|
+
},
|
|
114
128
|
},
|
|
115
129
|
setup(props, { emit }) {
|
|
116
130
|
const { rules } = toRefs(props);
|