@farm-investimentos/front-mfe-components 8.7.1 → 9.1.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 +2326 -2122
- 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 +2326 -2122
- 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/Buttons/ConfirmButton/ConfirmButton.vue +1 -5
- package/src/components/Buttons/DangerButton/DangerButton.stories.js +7 -18
- package/src/components/Buttons/DangerButton/DangerButton.vue +2 -6
- package/src/components/Buttons/DefaultButton/DefaultButton.scss +11 -2
- package/src/components/Buttons/DefaultButton/DefaultButton.stories.js +11 -7
- package/src/components/Buttons/DefaultButton/DefaultButton.vue +15 -15
- package/src/components/Buttons/DefaultButton/__tests__/DefaultButton.spec.js +0 -4
- package/src/components/Buttons/ExportButton/ExportButton.stories.js +3 -6
- package/src/components/Buttons/ExportButton/ExportButton.vue +1 -7
- package/src/components/Buttons/ImportButton/ImportButton.scss +9 -0
- package/src/components/Buttons/ImportButton/ImportButton.stories.js +5 -9
- package/src/components/Buttons/ImportButton/ImportButton.vue +4 -15
- package/src/components/Buttons/MultiImportButton/MultiImportButton.stories.js +2 -5
- package/src/components/Buttons/MultiImportButton/MultiImportButton.vue +0 -2
- package/src/components/Buttons/RemoveButton/RemoveButton.scss +5 -0
- package/src/components/Buttons/RemoveButton/RemoveButton.stories.js +2 -4
- package/src/components/Buttons/RemoveButton/RemoveButton.vue +2 -12
- package/src/components/Buttons/ToggleButton/ToggleButton.stories.js +5 -12
- package/src/components/Buttons/ToggleButton/ToggleButton.vue +3 -9
- package/src/{examples/Card.stories.ts → components/Card/CardComposition.stories.ts} +2 -29
- package/src/components/CardContext/CardContext.stories.js +14 -26
- package/src/components/CardContext/CardContext.vue +5 -5
- package/src/components/Checkbox/Checkbox.scss +29 -0
- package/src/components/Checkbox/Checkbox.stories.js +49 -0
- package/src/components/Checkbox/Checkbox.vue +48 -0
- package/src/components/Checkbox/__tests__/Checkbox.spec.js +20 -0
- package/src/components/Checkbox/index.ts +4 -0
- package/src/components/Chip/Chip.stories.js +44 -3
- package/src/{examples → components/Chip}/Chip.stories.scss +0 -0
- package/src/components/Chip/Chip.vue +4 -9
- package/src/components/ChipInviteStatus/ChipInviteStatus.stories.js +9 -12
- package/src/components/Collapsible/Collapsible.stories.js +41 -11
- package/src/components/Collapsible/Collapsible.vue +1 -10
- package/src/components/DataTableEmptyWrapper/DataTableEmptyWrapper.stories.js +5 -11
- package/src/components/DataTableHeader/DataTableHeader.stories.js +1 -2
- package/src/components/DataTablePaginator/DataTablePaginator.stories.js +4 -4
- package/src/components/DataTablePaginator/__tests__/DataTablePaginator.spec.js +1 -1
- package/src/components/DatePicker/DatePicker.vue +8 -1
- package/src/components/DialogFooter/DialogFooter.stories.js +31 -3
- package/src/components/DialogHeader/DialogHeader.stories.js +33 -7
- package/src/components/FilePicker/FilePicker.stories.js +1 -6
- package/src/components/Icon/Icon.stories.js +2 -2
- package/src/components/IconBox/IconBox.scss +17 -5
- package/src/components/IconBox/IconBox.stories.js +65 -5
- package/src/components/IconBox/IconBox.vue +18 -6
- package/src/components/IdCaption/IdCaption.scss +36 -0
- package/src/components/IdCaption/IdCaption.stories.js +116 -0
- package/src/components/IdCaption/IdCaption.vue +63 -0
- package/src/components/IdCaption/__tests__/IdCaption.spec.js +14 -0
- package/src/components/IdCaption/index.ts +3 -0
- package/src/components/Label/Label.stories.js +3 -12
- package/src/{examples → components/Loader}/Loader.stories.ts +2 -11
- package/src/components/Logger/Logger.stories.js +36 -6
- package/src/components/Logger/LoggerItem/LoggerItem.stories.js +42 -4
- package/src/components/Logger/LoggerItem/LoggerItem.vue +0 -4
- package/src/components/Logos/OriginatorLogo/OriginatorLogo.stories.js +2 -3
- package/src/components/Logos/ProductLogo/ProductLogo.stories.js +2 -3
- package/src/components/MainFilter/MainFilter.stories.js +19 -10
- package/src/components/MainFilter/MainFilter.vue +2 -12
- package/src/components/ManagersList/ManagersList.stories.js +2 -6
- package/src/components/ManagersList/ManagersList.vue +5 -3
- package/src/components/ModalPromptUser/ModalPromptUser.stories.js +22 -30
- package/src/components/ModalPromptUser/ModalPromptUser.vue +0 -4
- package/src/components/MultipleFilePicker/MultipleFilePicker.stories.js +1 -10
- package/src/components/MultipleSelectShortener/MultipleSelectShortener.stories.js +2 -7
- package/src/components/ProgressBar/ProgressBar.stories.js +16 -11
- package/src/components/PromptUserToConfirm/PromptUserToConfirm.stories.js +18 -12
- package/src/components/PromptUserToConfirm/PromptUserToConfirm.vue +5 -3
- package/src/components/ResetTableRowSelection/ResetTableRowSelection.stories.js +1 -4
- package/src/components/SelectModalOptions/SelectModalOptions.stories.js +3 -8
- package/src/components/Stepper/StepperHeader/StepperHeader.stories.js +54 -3
- package/src/components/Stepper/StepperHeader/StepperHeader.vue +0 -4
- package/src/components/TableContextMenu/TableContextMenu.stories.js +20 -40
- package/src/components/TableContextMenu/TableContextMenu.vue +0 -2
- package/src/components/Tabs/Tabs.stories.js +2 -5
- package/src/components/Tabs/Tabs.vue +4 -3
- package/src/components/TextField/TextField.stories.js +25 -10
- package/src/components/Typography/BodyText/BodyText.stories.js +34 -6
- package/src/components/Typography/BodyText/BodyText.vue +0 -3
- package/src/components/Typography/Caption/Caption.stories.js +30 -7
- package/src/components/Typography/Caption/Caption.vue +0 -2
- package/src/components/Typography/Heading/Heading.stories.js +7 -6
- package/src/components/Typography/Heading/Heading.vue +0 -2
- package/src/components/Typography/OverlayText/OverlayText.stories.js +0 -1
- package/src/components/Typography/OverlayText/OverlayText.vue +0 -2
- package/src/components/Typography/Subtitle/Subtitle.stories.js +34 -6
- package/src/components/Typography/Subtitle/Subtitle.vue +0 -2
- package/src/configurations/_theme-colors-base.scss +8 -0
- package/src/configurations/_theme-colors-variations.scss +9 -0
- package/src/examples/Colors.stories.js +28 -0
- package/src/examples/Colors.stories.scss +15 -0
- package/src/examples/ConfirmDialog.stories.js +1 -9
- package/src/examples/Container/Basic.stories.js +2 -16
- package/src/examples/Form/Full.stories.js +1 -7
- package/src/examples/Modal.stories.js +1 -55
- package/src/examples/Table.stories.js +2 -11
- package/src/examples/inputs/Password.stories.js +1 -1
- package/src/examples/inputs/Select.stories.js +1 -1
- package/src/main.ts +3 -0
- package/src/stories/Introduction.stories.mdx +1 -1
- package/src/components/Loader/Loader.stories.js +0 -13
- package/src/examples/Chip.stories.js +0 -53
- package/src/examples/Collapsible.stories.js +0 -52
- package/src/examples/Dialog/DialogFooter.stories.js +0 -42
- package/src/examples/Dialog/DialogHeader.stories.js +0 -43
- package/src/examples/Form/Label.stories.js +0 -18
- package/src/examples/Form/TextField.stories.js +0 -47
- package/src/examples/IconBox.stories.js +0 -62
- package/src/examples/Logger/Logger.stories.js +0 -59
- package/src/examples/Logger/LoggerItem.stories.js +0 -81
- package/src/examples/MainFilter.stories.js +0 -29
- package/src/examples/ProgressBar.stories.js +0 -71
- package/src/examples/Stepper/StepperHeader.stories.js +0 -99
- package/src/examples/Typography/BodyText.stories.js +0 -58
- package/src/examples/Typography/Caption.stories.js +0 -55
- package/src/examples/Typography/Heading.stories.js +0 -32
- package/src/examples/Typography/Subtitle.stories.js +0 -58
|
@@ -1,19 +1,45 @@
|
|
|
1
1
|
import DialogHeader from './DialogHeader.vue';
|
|
2
2
|
|
|
3
3
|
export default {
|
|
4
|
-
title: '
|
|
4
|
+
title: 'Display/Dialog/DialogHeader',
|
|
5
5
|
component: DialogHeader,
|
|
6
6
|
};
|
|
7
7
|
|
|
8
8
|
export const Primary = () => ({
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
template: `<div style="max-width: 480px; position: relative;">
|
|
10
|
+
<farm-dialog-header title="Título do header" />
|
|
11
|
+
</div>`,
|
|
11
12
|
});
|
|
12
13
|
|
|
13
14
|
export const Secondary = () => ({
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
template: `<div style="max-width: 480px; position: relative;">
|
|
16
|
+
<farm-dialog-header title="Título do header" iconTitle="calendar" />
|
|
17
|
+
</div>`,
|
|
16
18
|
});
|
|
17
19
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
+
|
|
21
|
+
export const CustomIcon = () => ({
|
|
22
|
+
template: `
|
|
23
|
+
<div style="max-width: 480px; position: relative;">
|
|
24
|
+
<farm-dialog-header title="Título do header" iconTitle="calendar" />
|
|
25
|
+
</div>`,
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
export const CloseHandler = () => ({
|
|
29
|
+
template: `
|
|
30
|
+
<div style="max-width: 480px; position: relative;">
|
|
31
|
+
<farm-dialog-header title="Título do header" iconTitle="calendar" @onClose="onClose" />
|
|
32
|
+
</div>`,
|
|
33
|
+
methods: {
|
|
34
|
+
onClose() {
|
|
35
|
+
alert('onClose handler');
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
export const NoCloseIcon = () => ({
|
|
41
|
+
template: `
|
|
42
|
+
<div style="max-width: 480px; position: relative;">
|
|
43
|
+
<farm-dialog-header title="Título do header" :hasCloseIcon="false" />
|
|
44
|
+
</div>`,
|
|
45
|
+
});
|
|
@@ -1,19 +1,14 @@
|
|
|
1
1
|
import FilePicker from './FilePicker.vue';
|
|
2
2
|
|
|
3
3
|
export default {
|
|
4
|
-
title: '
|
|
4
|
+
title: 'Form/FilePicker',
|
|
5
5
|
component: FilePicker,
|
|
6
6
|
};
|
|
7
7
|
|
|
8
8
|
export const Primary = () => ({
|
|
9
|
-
components: { FilePicker },
|
|
10
9
|
template: '<FilePicker />',
|
|
11
10
|
});
|
|
12
11
|
|
|
13
12
|
export const MaxFileSize = () => ({
|
|
14
|
-
components: { FilePicker },
|
|
15
13
|
template: '<FilePicker maxFileSize="0.1" />',
|
|
16
14
|
});
|
|
17
|
-
|
|
18
|
-
Primary.storyName = 'Básico';
|
|
19
|
-
MaxFileSize.storyName = 'Max File Size';
|
|
@@ -6,7 +6,7 @@ import sizes from '../../configurations/sizes';
|
|
|
6
6
|
import('./Icons.stories.scss');
|
|
7
7
|
|
|
8
8
|
export default {
|
|
9
|
-
title: '
|
|
9
|
+
title: 'Display/Icons',
|
|
10
10
|
decorators: [withDesign],
|
|
11
11
|
parameters: {
|
|
12
12
|
viewMode: 'docs',
|
|
@@ -20,7 +20,7 @@ export default {
|
|
|
20
20
|
|
|
21
21
|
export const Atom = () => ({
|
|
22
22
|
template: `<div class="icons-container">
|
|
23
|
-
<farm-icon
|
|
23
|
+
<farm-icon color="secondary">
|
|
24
24
|
book
|
|
25
25
|
</farm-icon>
|
|
26
26
|
</div>`,
|
|
@@ -9,9 +9,21 @@
|
|
|
9
9
|
align-items: center;
|
|
10
10
|
|
|
11
11
|
@each $color in $colors {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
&#{'--' + $color} {
|
|
13
|
+
background: var(--v-#{$color}-lighten5);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
17
16
|
}
|
|
17
|
+
|
|
18
|
+
.farm-icon-box--inverted.farm-icon-box {
|
|
19
|
+
@each $color in $colors {
|
|
20
|
+
&#{'--' + $color} {
|
|
21
|
+
background: var(--v-#{$color}-base);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.farm-icon.farm-icon--white {
|
|
26
|
+
color: white;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
}
|
|
@@ -1,13 +1,73 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { withDesign } from 'storybook-addon-designs';
|
|
2
|
+
import IconBox from './IconBox';
|
|
3
|
+
import colors from '../../configurations/colors';
|
|
4
|
+
import sizes from '../../configurations/sizes';
|
|
5
|
+
import('../Icon/Icons.stories.scss');
|
|
2
6
|
|
|
3
7
|
export default {
|
|
4
|
-
title: '
|
|
8
|
+
title: 'Display/IconBox',
|
|
5
9
|
component: IconBox,
|
|
10
|
+
decorators: [withDesign],
|
|
11
|
+
parameters: {
|
|
12
|
+
viewMode: 'docs',
|
|
13
|
+
docs: {
|
|
14
|
+
description: {
|
|
15
|
+
component: `IconBox`,
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
},
|
|
6
19
|
};
|
|
7
20
|
|
|
8
21
|
export const Primary = () => ({
|
|
9
|
-
|
|
10
|
-
|
|
22
|
+
template: `<div class="icons-container">
|
|
23
|
+
<farm-icon-box
|
|
24
|
+
icon="book" />
|
|
25
|
+
</div>`,
|
|
11
26
|
});
|
|
12
27
|
|
|
13
|
-
|
|
28
|
+
export const Colors = () => ({
|
|
29
|
+
data() {
|
|
30
|
+
return {
|
|
31
|
+
colors,
|
|
32
|
+
};
|
|
33
|
+
},
|
|
34
|
+
template: `<div class="icons-container">
|
|
35
|
+
<farm-icon-box
|
|
36
|
+
v-for="color of colors"
|
|
37
|
+
:key="color"
|
|
38
|
+
:color="color"
|
|
39
|
+
icon="book" />
|
|
40
|
+
</div>`,
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
export const Sizes = () => ({
|
|
44
|
+
data() {
|
|
45
|
+
return {
|
|
46
|
+
sizes,
|
|
47
|
+
};
|
|
48
|
+
},
|
|
49
|
+
template: `<div class="icons-container">
|
|
50
|
+
<div v-for="size of sizes" :key="size">
|
|
51
|
+
<farm-icon-box icon="book" :key="size" :size="size" />
|
|
52
|
+
{{ size }}
|
|
53
|
+
</div>
|
|
54
|
+
|
|
55
|
+
</div>`,
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
export const Inverted = () => ({
|
|
59
|
+
data() {
|
|
60
|
+
return {
|
|
61
|
+
colors,
|
|
62
|
+
};
|
|
63
|
+
},
|
|
64
|
+
template: `<div class="icons-container">
|
|
65
|
+
<farm-icon-box
|
|
66
|
+
v-for="color of colors"
|
|
67
|
+
:key="'inverted_' + color"
|
|
68
|
+
:color="color"
|
|
69
|
+
:inverted="true"
|
|
70
|
+
icon="book"
|
|
71
|
+
/>
|
|
72
|
+
</div>`,
|
|
73
|
+
});
|
|
@@ -1,18 +1,23 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
3
|
-
|
|
2
|
+
<div
|
|
3
|
+
:class="{
|
|
4
|
+
'farm-icon-box': true,
|
|
5
|
+
[cssColorClass]: true,
|
|
6
|
+
'farm-icon-box--inverted': inverted,
|
|
7
|
+
}"
|
|
8
|
+
:size="size"
|
|
9
|
+
>
|
|
10
|
+
<farm-icon :color="inverted ? 'white' : color" :size="size">{{
|
|
11
|
+
iconParsed
|
|
12
|
+
}}</farm-icon>
|
|
4
13
|
</div>
|
|
5
14
|
</template>
|
|
6
15
|
|
|
7
16
|
<script lang="ts">
|
|
8
17
|
import Vue, { PropType } from 'vue';
|
|
9
|
-
import Icon from '../Icon';
|
|
10
18
|
|
|
11
19
|
export default Vue.extend({
|
|
12
20
|
name: 'farm-icon-box',
|
|
13
|
-
components: {
|
|
14
|
-
'farm-icon': Icon,
|
|
15
|
-
},
|
|
16
21
|
props: {
|
|
17
22
|
/**
|
|
18
23
|
* Icon
|
|
@@ -32,6 +37,13 @@ export default Vue.extend({
|
|
|
32
37
|
type: String as PropType<'xs' | 'sm' | 'md' | 'lg' | 'xl'>,
|
|
33
38
|
default: 'md',
|
|
34
39
|
},
|
|
40
|
+
/**
|
|
41
|
+
* INverted
|
|
42
|
+
*/
|
|
43
|
+
inverted: {
|
|
44
|
+
type: Boolean,
|
|
45
|
+
default: false,
|
|
46
|
+
},
|
|
35
47
|
},
|
|
36
48
|
computed: {
|
|
37
49
|
iconParsed() {
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
.idcaption {
|
|
2
|
+
display: flex;
|
|
3
|
+
|
|
4
|
+
.farm-icon-box {
|
|
5
|
+
margin-right: 8px;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
&__body {
|
|
9
|
+
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
justify-content: space-between;
|
|
13
|
+
align-content: flex-start;
|
|
14
|
+
|
|
15
|
+
&--single {
|
|
16
|
+
justify-content: center;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.farm-typography {
|
|
20
|
+
|
|
21
|
+
margin-bottom: 0;
|
|
22
|
+
display: flex;
|
|
23
|
+
flex: none;
|
|
24
|
+
> span {
|
|
25
|
+
position: relative;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.farm-btn,
|
|
30
|
+
.farm-tooltip {
|
|
31
|
+
position: absolute;
|
|
32
|
+
right: -30px;
|
|
33
|
+
top: -8px;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { withDesign } from 'storybook-addon-designs';
|
|
2
|
+
import IdCaption from './';
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Display/IdCaption',
|
|
6
|
+
component: IdCaption,
|
|
7
|
+
decorators: [withDesign],
|
|
8
|
+
parameters: {
|
|
9
|
+
docs: {
|
|
10
|
+
description: {
|
|
11
|
+
component: `Id Caption<br />
|
|
12
|
+
selector: <em>farm-idcaption</em>
|
|
13
|
+
`,
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
design: {
|
|
17
|
+
type: 'figma',
|
|
18
|
+
url: 'https://www.figma.com/file/p62YDSTfWg0Mcnf5APfdvI/%E2%9C%8D-Design-System-%7C-v2?node-id=4087%3A6463',
|
|
19
|
+
},
|
|
20
|
+
viewMode: 'docs',
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export const Primary = () => ({
|
|
25
|
+
template: `
|
|
26
|
+
<farm-idcaption
|
|
27
|
+
icon="account-box-outline"
|
|
28
|
+
copyText="texto a copiar"
|
|
29
|
+
:link="true"
|
|
30
|
+
>
|
|
31
|
+
<template v-slot:title>
|
|
32
|
+
Upper Line Text
|
|
33
|
+
</template>
|
|
34
|
+
<template v-slot:subtitle>
|
|
35
|
+
Lower: Line Text Line Text Line Text
|
|
36
|
+
</template>
|
|
37
|
+
</farm-idcaption>
|
|
38
|
+
`,
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
export const Linkless = () => ({
|
|
42
|
+
template: `
|
|
43
|
+
<farm-idcaption
|
|
44
|
+
icon="account-box-outline"
|
|
45
|
+
copyText="texto a copiar"
|
|
46
|
+
>
|
|
47
|
+
<template v-slot:title>
|
|
48
|
+
Upper Line Text
|
|
49
|
+
</template>
|
|
50
|
+
<template v-slot:subtitle>
|
|
51
|
+
Lower:Line Text
|
|
52
|
+
</template>
|
|
53
|
+
</farm-idcaption>
|
|
54
|
+
|
|
55
|
+
`,
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
export const Iconless = () => ({
|
|
59
|
+
template: `
|
|
60
|
+
<farm-idcaption
|
|
61
|
+
copyText="texto a copiar"
|
|
62
|
+
:link="true"
|
|
63
|
+
>
|
|
64
|
+
<template v-slot:title>
|
|
65
|
+
Upper Line Text
|
|
66
|
+
</template>
|
|
67
|
+
<template v-slot:subtitle>
|
|
68
|
+
Lower:Line Text
|
|
69
|
+
</template>
|
|
70
|
+
</farm-idcaption>
|
|
71
|
+
`,
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
export const NoUpperText = () => ({
|
|
75
|
+
template: `
|
|
76
|
+
<farm-idcaption
|
|
77
|
+
icon="account-box-outline"
|
|
78
|
+
copyText="texto a copiar"
|
|
79
|
+
:link="true"
|
|
80
|
+
>
|
|
81
|
+
<template v-slot:subtitle>
|
|
82
|
+
Lower:Line Text
|
|
83
|
+
</template>
|
|
84
|
+
</farm-idcaption>
|
|
85
|
+
`,
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
export const NoBottomText = () => ({
|
|
89
|
+
template: `
|
|
90
|
+
<farm-idcaption
|
|
91
|
+
icon="account-box-outline"
|
|
92
|
+
copyText="texto a copiar"
|
|
93
|
+
:link="true"
|
|
94
|
+
>
|
|
95
|
+
<template v-slot:title>
|
|
96
|
+
Upper Line Text
|
|
97
|
+
</template>
|
|
98
|
+
</farm-idcaption>
|
|
99
|
+
`,
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
export const NoTextToClip = () => ({
|
|
103
|
+
template: `
|
|
104
|
+
<farm-idcaption
|
|
105
|
+
icon="account-box-outline"
|
|
106
|
+
:link="true"
|
|
107
|
+
>
|
|
108
|
+
<template v-slot:title>
|
|
109
|
+
Upper Line Text
|
|
110
|
+
</template>
|
|
111
|
+
<template v-slot:subtitle>
|
|
112
|
+
Lower:Line Text
|
|
113
|
+
</template>
|
|
114
|
+
</farm-idcaption>
|
|
115
|
+
`,
|
|
116
|
+
});
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="idcaption">
|
|
3
|
+
<farm-icon-box v-if="icon" :icon="icon" color="secondary" size="md" />
|
|
4
|
+
<div
|
|
5
|
+
:class="{ idcaption__body: true, 'idcaption__body--single': !hasTitle || !hasSubtitle }"
|
|
6
|
+
>
|
|
7
|
+
<farm-caption bold variation="medium" v-if="hasTitle">
|
|
8
|
+
<span>
|
|
9
|
+
{{ $slots.title ? $slots.title[0].text : null }}
|
|
10
|
+
<farm-btn icon color="gray" v-if="link" @click="$emit('onLinkClick')">
|
|
11
|
+
<farm-icon size="xs">open-in-new</farm-icon>
|
|
12
|
+
</farm-btn>
|
|
13
|
+
</span>
|
|
14
|
+
</farm-caption>
|
|
15
|
+
|
|
16
|
+
<farm-caption variation="regular" color="gray" v-if="hasSubtitle">
|
|
17
|
+
<span>
|
|
18
|
+
{{ $slots.subtitle ? $slots.subtitle[0].text : null }}
|
|
19
|
+
<farm-copytoclipboard v-if="copyText" :toCopy="copyText" />
|
|
20
|
+
</span>
|
|
21
|
+
</farm-caption>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
</template>
|
|
25
|
+
|
|
26
|
+
<script lang="ts">
|
|
27
|
+
import Vue, { computed } from 'vue';
|
|
28
|
+
export default Vue.extend({
|
|
29
|
+
name: 'farm-idcaption',
|
|
30
|
+
props: {
|
|
31
|
+
/**
|
|
32
|
+
* Icon
|
|
33
|
+
*/
|
|
34
|
+
icon: {
|
|
35
|
+
type: String,
|
|
36
|
+
},
|
|
37
|
+
/**
|
|
38
|
+
* copy to clipboard
|
|
39
|
+
*/
|
|
40
|
+
copyText: {
|
|
41
|
+
type: String,
|
|
42
|
+
},
|
|
43
|
+
/**
|
|
44
|
+
* Has link?
|
|
45
|
+
*/
|
|
46
|
+
link: {
|
|
47
|
+
type: Boolean,
|
|
48
|
+
default: false,
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
|
|
52
|
+
setup(_, { slots }) {
|
|
53
|
+
const hasTitle = computed(() => slots.title);
|
|
54
|
+
const hasSubtitle = computed(() => slots.subtitle);
|
|
55
|
+
|
|
56
|
+
return { hasSubtitle, hasTitle };
|
|
57
|
+
},
|
|
58
|
+
});
|
|
59
|
+
</script>
|
|
60
|
+
|
|
61
|
+
<style lang="scss" scoped>
|
|
62
|
+
@import './IdCaption.scss';
|
|
63
|
+
</style>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
import IdCaption from '../IdCaption.vue';
|
|
3
|
+
|
|
4
|
+
describe('FilePicker component', () => {
|
|
5
|
+
let wrapper;
|
|
6
|
+
|
|
7
|
+
beforeEach(() => {
|
|
8
|
+
wrapper = shallowMount(IdCaption);
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
test('Created hook', () => {
|
|
12
|
+
expect(wrapper).toBeDefined();
|
|
13
|
+
});
|
|
14
|
+
});
|
|
@@ -21,18 +21,9 @@ export default {
|
|
|
21
21
|
};
|
|
22
22
|
|
|
23
23
|
export const Primary = () => ({
|
|
24
|
-
components: { 'farm-label': Label },
|
|
25
24
|
template: '<farm-label>Label</farm-label>',
|
|
26
25
|
});
|
|
27
26
|
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
url: 'https://www.figma.com/file/1f84J4m1IBghWhozQvdyyt/%E2%9C%85---Design-System-%7C-v1?node-id=1503%3A227',
|
|
32
|
-
},
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
Primary.story = {
|
|
36
|
-
name: 'Basic',
|
|
37
|
-
parameters,
|
|
38
|
-
};
|
|
27
|
+
export const Required = () => ({
|
|
28
|
+
template: '<farm-label :required="true">Label</farm-label>',
|
|
29
|
+
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { withDesign } from 'storybook-addon-designs';
|
|
2
|
-
import { Loader } from '
|
|
2
|
+
import { Loader } from '../../main';
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
|
-
title: '
|
|
5
|
+
title: 'Feedback/Loader',
|
|
6
6
|
decorators: [withDesign],
|
|
7
7
|
parameters: {
|
|
8
8
|
viewMode: 'docs',
|
|
@@ -16,27 +16,18 @@ export default {
|
|
|
16
16
|
};
|
|
17
17
|
|
|
18
18
|
export const Primary = () => ({
|
|
19
|
-
components: {
|
|
20
|
-
'farm-loader': Loader,
|
|
21
|
-
},
|
|
22
19
|
template: `<div style="width: 480px;">
|
|
23
20
|
<farm-loader />
|
|
24
21
|
</div>`,
|
|
25
22
|
});
|
|
26
23
|
|
|
27
24
|
export const Small = () => ({
|
|
28
|
-
components: {
|
|
29
|
-
'farm-loader': Loader,
|
|
30
|
-
},
|
|
31
25
|
template: `<div style="width: 480px;">
|
|
32
26
|
<farm-loader size="small" />
|
|
33
27
|
</div>`,
|
|
34
28
|
});
|
|
35
29
|
|
|
36
30
|
export const Overlay = () => ({
|
|
37
|
-
components: {
|
|
38
|
-
'farm-loader': Loader,
|
|
39
|
-
},
|
|
40
31
|
data() {
|
|
41
32
|
return {
|
|
42
33
|
show: false,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Logger from './Logger.vue';
|
|
2
2
|
|
|
3
3
|
export default {
|
|
4
|
-
title: '
|
|
4
|
+
title: 'Feedback/Logger',
|
|
5
5
|
component: Logger,
|
|
6
6
|
parameters: {
|
|
7
7
|
docs: {
|
|
@@ -21,11 +21,41 @@ export default {
|
|
|
21
21
|
};
|
|
22
22
|
|
|
23
23
|
export const Primary = () => ({
|
|
24
|
-
components: { 'farm-logger': Logger },
|
|
25
24
|
data() {
|
|
26
|
-
return {
|
|
25
|
+
return {
|
|
26
|
+
items: [
|
|
27
|
+
{
|
|
28
|
+
message: 'Recusado entre as pré elegíveis',
|
|
29
|
+
userName: 'Cleyton Rasta',
|
|
30
|
+
formattedDate: '13/06/2022 20:40',
|
|
31
|
+
status: 'error',
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
message: 'Aprovado entre as pré elegíveis',
|
|
35
|
+
userName: 'Cleyton Rasta',
|
|
36
|
+
formattedDate: '13/06/2022 20:40',
|
|
37
|
+
status: 'success',
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
message: 'Aprovado entre as pré elegíveis',
|
|
41
|
+
userName: 'Cleyton Rasta',
|
|
42
|
+
formattedDate: '13/06/2022 20:40',
|
|
43
|
+
status: 'success',
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
message: 'Recusado entre as pré elegíveis',
|
|
47
|
+
userName: 'Cleyton Rasta',
|
|
48
|
+
formattedDate: '13/06/2022 20:40',
|
|
49
|
+
status: 'error',
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
message: 'Recusado entre as pré elegíveis',
|
|
53
|
+
userName: 'Cleyton Rasta',
|
|
54
|
+
formattedDate: '13/06/2022 20:40',
|
|
55
|
+
status: 'error',
|
|
56
|
+
},
|
|
57
|
+
],
|
|
58
|
+
};
|
|
27
59
|
},
|
|
28
|
-
template: `<farm-logger />`,
|
|
60
|
+
template: `<farm-logger :items="items" />`,
|
|
29
61
|
});
|
|
30
|
-
|
|
31
|
-
Primary.storyName = 'Básico';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import LoggerItem from './LoggerItem.vue';
|
|
2
2
|
|
|
3
3
|
export default {
|
|
4
|
-
title: '
|
|
4
|
+
title: 'Feedback/Logger/LoggerItem',
|
|
5
5
|
component: LoggerItem,
|
|
6
6
|
parameters: {
|
|
7
7
|
docs: {
|
|
@@ -20,11 +20,36 @@ export default {
|
|
|
20
20
|
};
|
|
21
21
|
|
|
22
22
|
export const Primary = () => ({
|
|
23
|
-
components: { 'farm-logger-item': LoggerItem },
|
|
24
23
|
data() {
|
|
25
24
|
return {
|
|
26
25
|
item: {
|
|
27
|
-
|
|
26
|
+
message: 'Recusado entre as pré elegíveis',
|
|
27
|
+
userName: 'Cleyton Rasta',
|
|
28
|
+
formattedDate: '13/06/2022 20:40',
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
},
|
|
32
|
+
template: `<farm-logger-item :item="item" />`,
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
export const Success = () => ({
|
|
36
|
+
data() {
|
|
37
|
+
return {
|
|
38
|
+
item: {
|
|
39
|
+
message: 'Recusado entre as pré elegíveis',
|
|
40
|
+
userName: 'Cleyton Rasta',
|
|
41
|
+
formattedDate: '13/06/2022 20:40',
|
|
42
|
+
status: 'success',
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
},
|
|
46
|
+
template: `<farm-logger-item :item="item" />`,
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
export const Error = () => ({
|
|
50
|
+
data() {
|
|
51
|
+
return {
|
|
52
|
+
item: {
|
|
28
53
|
message: 'Recusado entre as pré elegíveis',
|
|
29
54
|
userName: 'Cleyton Rasta',
|
|
30
55
|
formattedDate: '13/06/2022 20:40',
|
|
@@ -35,4 +60,17 @@ export const Primary = () => ({
|
|
|
35
60
|
template: `<farm-logger-item :item="item" />`,
|
|
36
61
|
});
|
|
37
62
|
|
|
38
|
-
|
|
63
|
+
export const CustomIcon = () => ({
|
|
64
|
+
data() {
|
|
65
|
+
return {
|
|
66
|
+
item: {
|
|
67
|
+
icon: 'book',
|
|
68
|
+
message: 'Recusado entre as pré elegíveis',
|
|
69
|
+
userName: 'Cleyton Rasta',
|
|
70
|
+
formattedDate: '13/06/2022 20:40',
|
|
71
|
+
status: 'success',
|
|
72
|
+
},
|
|
73
|
+
};
|
|
74
|
+
},
|
|
75
|
+
template: `<farm-logger-item :item="item" />`,
|
|
76
|
+
});
|
|
@@ -24,13 +24,9 @@
|
|
|
24
24
|
<script lang="ts">
|
|
25
25
|
import Vue, { PropType } from 'vue';
|
|
26
26
|
import ILoggerItem from './ILoggerItem';
|
|
27
|
-
import Icon from '../../Icon';
|
|
28
27
|
|
|
29
28
|
export default Vue.extend({
|
|
30
29
|
name: 'farm-logger-item',
|
|
31
|
-
components: {
|
|
32
|
-
'farm-icon': Icon,
|
|
33
|
-
},
|
|
34
30
|
props: {
|
|
35
31
|
/**
|
|
36
32
|
* Logger item
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import OriginatorLogo from './OriginatorLogo.vue';
|
|
2
2
|
|
|
3
3
|
export default {
|
|
4
|
-
title: '
|
|
4
|
+
title: 'Display/Logos/OriginatorLogo',
|
|
5
5
|
component: OriginatorLogo,
|
|
6
6
|
};
|
|
7
7
|
|
|
8
8
|
export const Primary = () => ({
|
|
9
|
-
|
|
10
|
-
template: '<OriginatorLogo alt="primary" id="88001" />',
|
|
9
|
+
template: '<farm-imglogo-originator alt="primary" id="88001" />',
|
|
11
10
|
});
|
|
12
11
|
|
|
13
12
|
Primary.storyName = 'Básico';
|