@farm-investimentos/front-mfe-components 11.6.1 → 11.7.0
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 +5949 -5820
- 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 +5949 -5820
- 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/Buttons/ConfirmButton/ConfirmButton.stories.js +4 -12
- package/src/components/Buttons/ConfirmButton/ConfirmButton.vue +5 -15
- package/src/components/Buttons/ConfirmButton/__tests__/ConfirmButton.spec.js +0 -19
- package/src/components/Buttons/DangerButton/DangerButton.stories.js +3 -1
- package/src/components/Buttons/DangerButton/DangerButton.vue +3 -9
- package/src/components/Buttons/DangerButton/__tests__/DangerButton.spec.js +0 -19
- package/src/components/CopyToClipboard/CopyToClipboard.stories.js +22 -0
- package/src/components/CopyToClipboard/CopyToClipboard.vue +9 -2
- package/src/components/MainFilter/MainFilter.scss +1 -1
- package/src/components/MainFilter/MainFilter.vue +14 -8
- package/src/components/MainFilter/__tests__/MainFilter.spec.js +4 -0
- package/src/components/ResourceMetaInfo/ResourceMetaInfo.scss +14 -0
- package/src/components/ResourceMetaInfo/ResourceMetaInfo.stories.js +119 -0
- package/src/components/ResourceMetaInfo/ResourceMetaInfo.vue +100 -0
- package/src/components/ResourceMetaInfo/__tests__/ResourceMetaInfo.spec.js +128 -0
- package/src/components/ResourceMetaInfo/index.ts +4 -0
- package/src/components/Tabs/Tabs.stories.js +11 -0
- package/src/components/TextFieldV2/TextFieldV2.scss +1 -1
- package/src/components/TextFieldV2/TextFieldV2.stories.js +25 -1
- package/src/components/TextFieldV2/TextFieldV2.vue +4 -2
- package/src/components/Tooltip/Tooltip.vue +4 -1
- package/src/components/Typography/BodyText/BodyText.stories.js +2 -2
- package/src/components/Typography/Caption/Caption.stories.js +2 -1
- package/src/components/Typography/Heading/Heading.stories.js +2 -1
- package/src/components/Typography/OverlayText/OverlayText.stories.js +2 -1
- package/src/components/Typography/Subtitle/Subtitle.stories.js +2 -3
- package/src/main.ts +2 -1
|
@@ -3,6 +3,17 @@ import Tabs from './Tabs.vue';
|
|
|
3
3
|
export default {
|
|
4
4
|
title: 'Display/Tabs',
|
|
5
5
|
component: Tabs,
|
|
6
|
+
parameters: {
|
|
7
|
+
docs: {
|
|
8
|
+
description: {
|
|
9
|
+
component: `Tabs<br />
|
|
10
|
+
selector: <em>farm-tabs</em><br />
|
|
11
|
+
<span style="color: var(--farm-primary-base);">ready for use</span>
|
|
12
|
+
`,
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
viewMode: 'docs',
|
|
16
|
+
},
|
|
6
17
|
};
|
|
7
18
|
|
|
8
19
|
export const Primary = () => ({
|
|
@@ -20,7 +20,7 @@ export default {
|
|
|
20
20
|
description: {
|
|
21
21
|
component: `Text field v2<br />
|
|
22
22
|
selector: <em>farm-texfield-v2</em><br />
|
|
23
|
-
<span style="color: var(--farm-
|
|
23
|
+
<span style="color: var(--farm-primary-base);">ready for use</span>
|
|
24
24
|
`,
|
|
25
25
|
},
|
|
26
26
|
},
|
|
@@ -229,3 +229,27 @@ export const ToggleVisibility = () => ({
|
|
|
229
229
|
<farm-textfield-v2 v-model="v" :type="visible ? 'text' : 'password'" :icon="visible ? 'eye-off' : 'eye'" @onClickIcon="toggle" />
|
|
230
230
|
</div>`,
|
|
231
231
|
});
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
export const Compare = () => ({
|
|
235
|
+
data() {
|
|
236
|
+
return {
|
|
237
|
+
v1: '',
|
|
238
|
+
rules: {
|
|
239
|
+
required: value => !!value || 'Required field',
|
|
240
|
+
email: v =>
|
|
241
|
+
!v ||
|
|
242
|
+
/^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/.test(v) ||
|
|
243
|
+
'Must be an e-mail',
|
|
244
|
+
},
|
|
245
|
+
};
|
|
246
|
+
},
|
|
247
|
+
template: `<div style="width: 480px">
|
|
248
|
+
|
|
249
|
+
<farm-label required>Required and e-mail</farm-label>
|
|
250
|
+
<farm-textfield-v2 v-model="v1" :rules="[rules.required, rules.email]" />
|
|
251
|
+
|
|
252
|
+
<farm-textfield v-model="v1" :rules="[rules.required, rules.email]" />
|
|
253
|
+
|
|
254
|
+
</div>`,
|
|
255
|
+
});
|
|
@@ -156,12 +156,14 @@ export default Vue.extend({
|
|
|
156
156
|
|
|
157
157
|
let validate = validateFormMethodBuilder(errorBucket, valid, fieldValidator);
|
|
158
158
|
|
|
159
|
-
const onKeyUp = () => {
|
|
159
|
+
const onKeyUp = (event: Event) => {
|
|
160
160
|
isTouched.value = true;
|
|
161
|
+
emit('keyup', event);
|
|
161
162
|
};
|
|
162
163
|
|
|
163
|
-
const onBlur = () => {
|
|
164
|
+
const onBlur = (event: Event) => {
|
|
164
165
|
isBlured.value = true;
|
|
166
|
+
emit('blur', event);
|
|
165
167
|
};
|
|
166
168
|
|
|
167
169
|
const reset = () => {
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
</template>
|
|
22
22
|
<script lang="ts">
|
|
23
23
|
import Vue, { PropType, ref, computed, reactive, onBeforeUnmount } from 'vue';
|
|
24
|
+
import { calculateMainZindex } from '../../helpers';
|
|
24
25
|
|
|
25
26
|
export default Vue.extend({
|
|
26
27
|
name: 'farm-tooltip',
|
|
@@ -60,6 +61,7 @@ export default Vue.extend({
|
|
|
60
61
|
const styles = reactive({
|
|
61
62
|
left: '0',
|
|
62
63
|
top: '0',
|
|
64
|
+
zIndex: 1,
|
|
63
65
|
});
|
|
64
66
|
|
|
65
67
|
const toggleComponent = computed(() => props.value);
|
|
@@ -86,7 +88,8 @@ export default Vue.extend({
|
|
|
86
88
|
window.scrollY -
|
|
87
89
|
(popupBoundingClientRect.height + 8) +
|
|
88
90
|
'px';
|
|
89
|
-
|
|
91
|
+
styles.zIndex = calculateMainZindex();
|
|
92
|
+
|
|
90
93
|
hasBeenBoostrapped = true;
|
|
91
94
|
}
|
|
92
95
|
};
|
|
@@ -7,7 +7,8 @@ export default {
|
|
|
7
7
|
docs: {
|
|
8
8
|
description: {
|
|
9
9
|
component: `BodyText<br />
|
|
10
|
-
selector: <em>farm-bodytext</em
|
|
10
|
+
selector: <em>farm-bodytext</em><br />
|
|
11
|
+
<span style="color: var(--farm-primary-base);">ready for use</span>
|
|
11
12
|
`,
|
|
12
13
|
},
|
|
13
14
|
},
|
|
@@ -37,7 +38,6 @@ export const Primary = () => ({
|
|
|
37
38
|
});
|
|
38
39
|
|
|
39
40
|
export const CustomTag = () => ({
|
|
40
|
-
components: { 'farm-bodytext': BodyText },
|
|
41
41
|
data() {
|
|
42
42
|
return {
|
|
43
43
|
tags: ['p', 'span', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'legend', 'label', 'li'],
|
|
@@ -7,7 +7,8 @@ export default {
|
|
|
7
7
|
docs: {
|
|
8
8
|
description: {
|
|
9
9
|
component: `Subtitle<br />
|
|
10
|
-
selector: <em>farm-subtitle</em
|
|
10
|
+
selector: <em>farm-subtitle</em><br />
|
|
11
|
+
<span style="color: var(--farm-primary-base);">ready for use</span>
|
|
11
12
|
`,
|
|
12
13
|
},
|
|
13
14
|
},
|
|
@@ -16,7 +17,6 @@ export default {
|
|
|
16
17
|
};
|
|
17
18
|
|
|
18
19
|
export const Primary = () => ({
|
|
19
|
-
components: { 'farm-subtitle': Subtitle },
|
|
20
20
|
data() {
|
|
21
21
|
return {
|
|
22
22
|
types: [1, 2],
|
|
@@ -37,7 +37,6 @@ export const Primary = () => ({
|
|
|
37
37
|
});
|
|
38
38
|
|
|
39
39
|
export const CustomTag = () => ({
|
|
40
|
-
components: { 'farm-subtitle': Subtitle },
|
|
41
40
|
data() {
|
|
42
41
|
return {
|
|
43
42
|
tags: ['p', 'span', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'legend', 'label', 'li'],
|
package/src/main.ts
CHANGED
|
@@ -23,6 +23,7 @@ import CardContext from './components/CardContext';
|
|
|
23
23
|
import DefaultButton from './components/Buttons/DefaultButton';
|
|
24
24
|
import Collapsible from './components/Collapsible';
|
|
25
25
|
import IdCaption from './components/IdCaption';
|
|
26
|
+
import ResourceMetaInfo from './components/ResourceMetaInfo';
|
|
26
27
|
|
|
27
28
|
export {
|
|
28
29
|
DataTableEmptyWrapper,
|
|
@@ -47,6 +48,7 @@ export {
|
|
|
47
48
|
CardContext,
|
|
48
49
|
Collapsible,
|
|
49
50
|
IdCaption,
|
|
51
|
+
ResourceMetaInfo,
|
|
50
52
|
};
|
|
51
53
|
|
|
52
54
|
export * from './components/AlertBox';
|
|
@@ -94,4 +96,3 @@ export * from './components/layout/Container';
|
|
|
94
96
|
export * from './components/layout/ContainerFooter';
|
|
95
97
|
export * from './components/layout/Row';
|
|
96
98
|
export * from './components/layout/Line';
|
|
97
|
-
|