@farm-investimentos/front-mfe-components 9.4.0 → 9.4.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 +94 -90
- 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 +94 -90
- 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/Checkbox/Checkbox.vue +6 -1
- package/src/components/Chip/Chip.stories.js +11 -0
- package/src/components/Form/Form.stories.js +4 -4
- package/src/components/Icon/Icon.stories.js +3 -1
- package/src/components/Modal/Modal.stories.js +2 -2
package/package.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
</div>
|
|
19
19
|
</template>
|
|
20
20
|
<script lang="ts">
|
|
21
|
-
import Vue, { onBeforeMount, PropType, ref, toRefs, watch } from 'vue';
|
|
21
|
+
import Vue, { computed, onBeforeMount, PropType, ref, toRefs, watch } from 'vue';
|
|
22
22
|
import validateFormStateBuilder from '../../composition/validateFormStateBuilder';
|
|
23
23
|
import validateFormFieldBuilder from '../../composition/validateFormFieldBuilder';
|
|
24
24
|
import validateFormMethodBuilder from '../../composition/validateFormMethodBuilder';
|
|
@@ -74,6 +74,10 @@ export default Vue.extend({
|
|
|
74
74
|
validate(innerValue.value);
|
|
75
75
|
};
|
|
76
76
|
|
|
77
|
+
const hasError = computed(() => {
|
|
78
|
+
return errorBucket.value.length > 0;
|
|
79
|
+
});
|
|
80
|
+
|
|
77
81
|
watch(
|
|
78
82
|
() => props.value,
|
|
79
83
|
() => {
|
|
@@ -113,6 +117,7 @@ export default Vue.extend({
|
|
|
113
117
|
errorBucket,
|
|
114
118
|
valid,
|
|
115
119
|
validatable,
|
|
120
|
+
hasError,
|
|
116
121
|
toggleValue,
|
|
117
122
|
reset,
|
|
118
123
|
validate,
|
|
@@ -8,6 +8,17 @@ const variations = ['', 'darken', 'lighten'];
|
|
|
8
8
|
export default {
|
|
9
9
|
title: 'Display/Chips',
|
|
10
10
|
component: Chip,
|
|
11
|
+
parameters: {
|
|
12
|
+
docs: {
|
|
13
|
+
description: {
|
|
14
|
+
component: `Chip<br />
|
|
15
|
+
selector: <em>farm-chip</em><br />
|
|
16
|
+
<span style="color: green;">ready for use</span>
|
|
17
|
+
`,
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
viewMode: 'docs',
|
|
21
|
+
},
|
|
11
22
|
};
|
|
12
23
|
|
|
13
24
|
export const Primary = () => ({
|
|
@@ -44,10 +44,10 @@ export const Primary = () => ({
|
|
|
44
44
|
},
|
|
45
45
|
template: `
|
|
46
46
|
<farm-form v-model="validForm" :style="[styles.vForm]" ref="form">
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
47
|
+
<div>
|
|
48
|
+
<farm-label :required="true">Documento</farm-label>
|
|
49
|
+
<farm-textfield v-model="form.document" :rules="[rules.required]" />
|
|
50
|
+
</div>
|
|
51
51
|
<farm-label :required="true">Nome</farm-label>
|
|
52
52
|
<farm-textfield v-model="form.name" :rules="[rules.required]" />
|
|
53
53
|
|