@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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@farm-investimentos/front-mfe-components",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.1.1",
|
|
4
4
|
"author": "farm investimentos",
|
|
5
5
|
"private": false,
|
|
6
6
|
"main": "./dist/front-mfe-components.common.js",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"vuetify-dialog": "^2.0.17"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@farm-investimentos/front-mfe-libs-ts": "^1.0.
|
|
30
|
+
"@farm-investimentos/front-mfe-libs-ts": "^1.0.9",
|
|
31
31
|
"@socheatsok78/storybook-addon-vuetify": "^0.1.9",
|
|
32
32
|
"@storybook/addon-actions": "^6.5.8",
|
|
33
33
|
"@storybook/addon-essentials": "^6.5.8",
|
|
@@ -4,15 +4,11 @@
|
|
|
4
4
|
<slot></slot>
|
|
5
5
|
</farm-btn>
|
|
6
6
|
</template>
|
|
7
|
-
<script>
|
|
7
|
+
<script lang="ts">
|
|
8
8
|
import Vue from 'vue';
|
|
9
|
-
import DefaultButton from '../DefaultButton';
|
|
10
9
|
|
|
11
10
|
export default Vue.extend({
|
|
12
11
|
name: 'farm-btn-confirm',
|
|
13
|
-
components: {
|
|
14
|
-
'farm-btn': DefaultButton,
|
|
15
|
-
},
|
|
16
12
|
inheritAttrs: true,
|
|
17
13
|
props: {
|
|
18
14
|
/**
|
|
@@ -16,43 +16,32 @@ export default {
|
|
|
16
16
|
};
|
|
17
17
|
|
|
18
18
|
export const Primary = () => ({
|
|
19
|
-
|
|
20
|
-
template: '<DangerButton>Danger Button</DangerButton>',
|
|
19
|
+
template: '<farm-btn-danger>Danger Button</farm-btn-danger>',
|
|
21
20
|
});
|
|
22
21
|
|
|
23
22
|
export const HtmlMarkup = () => ({
|
|
24
|
-
|
|
25
|
-
template: '<DangerButton><em>I am italic</strong></em></DangerButton>',
|
|
23
|
+
template: '<farm-btn-danger><em>I am italic</strong></em></farm-btn-danger>',
|
|
26
24
|
});
|
|
27
25
|
|
|
28
26
|
export const Props = () => ({
|
|
29
|
-
|
|
30
|
-
template: '<DangerButton title="custom title">custom title (hover me)</DangerButton>',
|
|
27
|
+
template: '<farm-btn-danger title="custom title">custom title (hover me)</farm-btn-danger>',
|
|
31
28
|
});
|
|
32
29
|
|
|
33
30
|
export const Listener = () => ({
|
|
34
|
-
components: { DangerButton },
|
|
35
31
|
data() {
|
|
36
32
|
return {
|
|
37
33
|
x: 1,
|
|
38
34
|
};
|
|
39
35
|
},
|
|
40
36
|
template: `
|
|
41
|
-
<
|
|
37
|
+
<farm-btn-danger color="error" @click="x = 2">click me to change: {{ x }}</farm-btn-danger>
|
|
42
38
|
`,
|
|
43
39
|
});
|
|
44
40
|
|
|
45
41
|
export const Iconed = () => ({
|
|
46
|
-
components: { DangerButton },
|
|
47
42
|
template: `<div>
|
|
48
|
-
<
|
|
49
|
-
<
|
|
50
|
-
<
|
|
43
|
+
<farm-btn-danger :icon="true">default icon</farm-btn-danger>
|
|
44
|
+
<farm-btn-danger :icon="true" customIcon="information-outline">information-outline</farm-btn-danger>
|
|
45
|
+
<farm-btn-danger :icon="true" customIcon="account-search">account-search</farm-btn-danger>
|
|
51
46
|
</div>`,
|
|
52
47
|
});
|
|
53
|
-
|
|
54
|
-
Primary.storyName = 'Básico';
|
|
55
|
-
HtmlMarkup.storyName = 'Html Markup';
|
|
56
|
-
Props.storyName = 'Props';
|
|
57
|
-
Listener.storyName = 'Listener';
|
|
58
|
-
Iconed.storyName = 'Icon';
|
|
@@ -4,15 +4,11 @@
|
|
|
4
4
|
<slot></slot>
|
|
5
5
|
</farm-btn>
|
|
6
6
|
</template>
|
|
7
|
-
<script>
|
|
7
|
+
<script lang="ts">
|
|
8
8
|
import Vue from 'vue';
|
|
9
|
-
import DefaultButton from '../DefaultButton';
|
|
10
9
|
|
|
11
10
|
export default Vue.extend({
|
|
12
11
|
name: 'farm-btn-danger',
|
|
13
|
-
components: {
|
|
14
|
-
'farm-btn': DefaultButton,
|
|
15
|
-
},
|
|
16
12
|
inheritAttrs: true,
|
|
17
13
|
props: {
|
|
18
14
|
/**
|
|
@@ -31,7 +27,7 @@ export default Vue.extend({
|
|
|
31
27
|
},
|
|
32
28
|
},
|
|
33
29
|
computed: {
|
|
34
|
-
iconPath() {
|
|
30
|
+
iconPath(): string {
|
|
35
31
|
if (!this.customIcon) {
|
|
36
32
|
return 'mdi-trash-can-outline';
|
|
37
33
|
}
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
display: flex;
|
|
37
37
|
flex-direction: row;
|
|
38
38
|
align-items: center;
|
|
39
|
-
|
|
39
|
+
|
|
40
40
|
::v-deep i.mdi {
|
|
41
41
|
font-size: 1rem;
|
|
42
42
|
}
|
|
@@ -83,7 +83,6 @@
|
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
&:not(.farm-btn--plain):not(.farm-btn--disabled):active {
|
|
86
|
-
box-shadow: 0px 5px 5px -3px rgb(0 0 0 / 20%), 0px 8px 10px 1px rgb(0 0 0 / 14%), 0px 3px 14px 2px rgb(0 0 0 / 12%);
|
|
87
86
|
|
|
88
87
|
&:before {
|
|
89
88
|
opacity: 0.16;
|
|
@@ -214,6 +213,16 @@
|
|
|
214
213
|
|
|
215
214
|
}
|
|
216
215
|
|
|
216
|
+
.farm-btn--outlined.farm-btn--disabled {
|
|
217
|
+
border: 1px solid #D6D6D6;
|
|
218
|
+
color: #D6D6D6;
|
|
219
|
+
background-color: white;
|
|
220
|
+
|
|
221
|
+
i.mdi.farm-icon {
|
|
222
|
+
color: white;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
|
|
217
226
|
.farm-btn--elevated {
|
|
218
227
|
box-shadow: 0px 3px 1px -2px rgb(0 0 0 / 20%), 0px 2px 2px 0px rgb(0 0 0 / 14%), 0px 1px 5px 0px rgb(0 0 0 / 12%);
|
|
219
228
|
}
|
|
@@ -15,35 +15,35 @@ export default {
|
|
|
15
15
|
selector: <em>farm-btn</em>
|
|
16
16
|
`,
|
|
17
17
|
},
|
|
18
|
+
design: {
|
|
19
|
+
type: 'figma',
|
|
20
|
+
url: 'https://www.figma.com/file/p62YDSTfWg0Mcnf5APfdvI/%E2%9C%8D-Design-System-%7C-v2?node-id=2491%3A4486',
|
|
21
|
+
},
|
|
18
22
|
},
|
|
19
23
|
viewMode: 'docs',
|
|
20
24
|
},
|
|
21
25
|
};
|
|
22
26
|
|
|
23
27
|
export const Primary = () => ({
|
|
24
|
-
|
|
25
|
-
template: '<DefaultButton title="Pass text as slot">Pass text as slot</DefaultButton>',
|
|
28
|
+
template: '<farm-btn title="Pass text as slot">Pass text as slot</farm-btn>',
|
|
26
29
|
});
|
|
27
30
|
|
|
28
31
|
export const HtmlMarkup = () => ({
|
|
29
|
-
|
|
30
|
-
template: '<DefaultButton><em>I am italic</strong></em></DefaultButton>',
|
|
32
|
+
template: '<farm-btn><em>I am italic</strong></em></farm-btn>',
|
|
31
33
|
});
|
|
32
34
|
|
|
33
35
|
export const Props = () => ({
|
|
34
|
-
components: { 'farm-btn': DefaultButton },
|
|
35
36
|
template: '<farm-btn color="secondary" outlined>props</farm-btn>',
|
|
36
37
|
});
|
|
37
38
|
|
|
38
39
|
export const Listener = () => ({
|
|
39
|
-
components: { DefaultButton },
|
|
40
40
|
data() {
|
|
41
41
|
return {
|
|
42
42
|
x: 1,
|
|
43
43
|
};
|
|
44
44
|
},
|
|
45
45
|
template: `
|
|
46
|
-
<
|
|
46
|
+
<farm-btn color="error" @click="x = 2">click me to change: {{ x }}</farm-btn>
|
|
47
47
|
`,
|
|
48
48
|
});
|
|
49
49
|
|
|
@@ -228,3 +228,7 @@ export const Sizes = () => ({
|
|
|
228
228
|
</div>
|
|
229
229
|
</div>`,
|
|
230
230
|
});
|
|
231
|
+
|
|
232
|
+
export const Elevated = () => ({
|
|
233
|
+
template: '<farm-btn :elevated="true">Elevated</farm-btn>',
|
|
234
|
+
});
|
|
@@ -48,10 +48,23 @@ export default Vue.extend({
|
|
|
48
48
|
* Outlined
|
|
49
49
|
*/
|
|
50
50
|
outlined: { type: Boolean, default: false },
|
|
51
|
+
/**
|
|
52
|
+
* Is plain
|
|
53
|
+
*/
|
|
51
54
|
plain: { type: Boolean, default: false },
|
|
55
|
+
/**
|
|
56
|
+
* Is disabled
|
|
57
|
+
*/
|
|
52
58
|
disabled: { type: Boolean, default: false },
|
|
59
|
+
/**
|
|
60
|
+
* Is rounded
|
|
61
|
+
*/
|
|
53
62
|
rounded: { type: Boolean, default: false },
|
|
54
63
|
icon: { type: Boolean, default: false },
|
|
64
|
+
/**
|
|
65
|
+
* Has elevation
|
|
66
|
+
*/
|
|
67
|
+
elevated: { type: Boolean, default: false },
|
|
55
68
|
type: {
|
|
56
69
|
type: String,
|
|
57
70
|
default: 'button',
|
|
@@ -61,9 +74,7 @@ export default Vue.extend({
|
|
|
61
74
|
default: null,
|
|
62
75
|
},
|
|
63
76
|
size: {
|
|
64
|
-
type: String as PropType<
|
|
65
|
-
'xs' | 'sm' | 'md' | 'lg' | 'xl'
|
|
66
|
-
>,
|
|
77
|
+
type: String as PropType<'xs' | 'sm' | 'md' | 'lg' | 'xl'>,
|
|
67
78
|
default: 'default',
|
|
68
79
|
},
|
|
69
80
|
},
|
|
@@ -78,7 +89,7 @@ export default Vue.extend({
|
|
|
78
89
|
});
|
|
79
90
|
return {
|
|
80
91
|
'farm-btn': true,
|
|
81
|
-
'farm-btn--elevated': this.
|
|
92
|
+
'farm-btn--elevated': this.elevated,
|
|
82
93
|
'farm-btn--round': this.isRound,
|
|
83
94
|
'farm-btn--rounded': this.rounded,
|
|
84
95
|
'farm-btn--icon': this.icon,
|
|
@@ -89,17 +100,6 @@ export default Vue.extend({
|
|
|
89
100
|
isRound(): boolean {
|
|
90
101
|
return Boolean(this.icon || this.fab);
|
|
91
102
|
},
|
|
92
|
-
isElevated(): boolean {
|
|
93
|
-
return Boolean(
|
|
94
|
-
!this.icon &&
|
|
95
|
-
!this.text &&
|
|
96
|
-
!this.outlined &&
|
|
97
|
-
!this.depressed &&
|
|
98
|
-
!this.disabled &&
|
|
99
|
-
!this.plain &&
|
|
100
|
-
(this.elevation == null || Number(this.elevation) > 0)
|
|
101
|
-
);
|
|
102
|
-
},
|
|
103
103
|
},
|
|
104
104
|
});
|
|
105
105
|
</script>
|
|
@@ -24,10 +24,6 @@ describe('DefaultButton component', () => {
|
|
|
24
24
|
expect(component.isRound).toBeTruthy();
|
|
25
25
|
});
|
|
26
26
|
|
|
27
|
-
it('get isElevated false', () => {
|
|
28
|
-
expect(component.isElevated).toBeTruthy();
|
|
29
|
-
});
|
|
30
|
-
|
|
31
27
|
it('get classes', () => {
|
|
32
28
|
expect(component.classes).toBeDefined();
|
|
33
29
|
});
|
|
@@ -6,18 +6,15 @@ export default {
|
|
|
6
6
|
};
|
|
7
7
|
|
|
8
8
|
export const Primary = () => ({
|
|
9
|
-
|
|
10
|
-
template: '<ExportButton />',
|
|
9
|
+
template: '<farm-btn-export />',
|
|
11
10
|
});
|
|
12
11
|
|
|
13
12
|
export const Disabled = () => ({
|
|
14
|
-
|
|
15
|
-
template: '<ExportButton :disabled="true" />',
|
|
13
|
+
template: '<farm-btn-export :disabled="true" />',
|
|
16
14
|
});
|
|
17
15
|
|
|
18
16
|
export const List = () => ({
|
|
19
|
-
|
|
20
|
-
template: `<ExportButton :optionsList="[{ key: 1, label: 'XLS teste'}, { key: 2, label: 'CSV teste novo'}]" />`,
|
|
17
|
+
template: `<farm-btn-export :optionsList="[{ key: 1, label: 'XLS teste'}, { key: 2, label: 'CSV teste novo'}]" />`,
|
|
21
18
|
});
|
|
22
19
|
|
|
23
20
|
Primary.storyName = 'Básico';
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
:class="{
|
|
35
35
|
'ml-2': true,
|
|
36
36
|
'mr-0': true,
|
|
37
|
-
|
|
37
|
+
mdi: true,
|
|
38
38
|
'mdi-chevron-up': togglePopover,
|
|
39
39
|
'mdi-chevron-down': !togglePopover,
|
|
40
40
|
}"
|
|
@@ -64,7 +64,6 @@ import VList from 'vuetify/lib/components/VList/VList';
|
|
|
64
64
|
import VMenu from 'vuetify/lib/components/VMenu';
|
|
65
65
|
import VListItem from 'vuetify/lib/components/VList/VListItem';
|
|
66
66
|
import { VListItemContent, VListItemTitle } from 'vuetify/lib';
|
|
67
|
-
import DefaultButton from '../DefaultButton';
|
|
68
67
|
|
|
69
68
|
/**
|
|
70
69
|
* Botão de Exportação, com opção de gerar menu dropdown
|
|
@@ -99,7 +98,6 @@ export default Vue.extend({
|
|
|
99
98
|
VMenu,
|
|
100
99
|
VListItemContent,
|
|
101
100
|
VListItemTitle,
|
|
102
|
-
'farm-btn': DefaultButton,
|
|
103
101
|
},
|
|
104
102
|
methods: {
|
|
105
103
|
onClick(key) {
|
|
@@ -109,10 +107,6 @@ export default Vue.extend({
|
|
|
109
107
|
});
|
|
110
108
|
</script>
|
|
111
109
|
<style scoped lang="scss">
|
|
112
|
-
.v-btn {
|
|
113
|
-
color: var(--v-extra-lighten2);
|
|
114
|
-
background: white;
|
|
115
|
-
}
|
|
116
110
|
.v-list-item {
|
|
117
111
|
border-bottom: 1px solid var(--v-gray-lighten2);
|
|
118
112
|
&:last-child {
|
|
@@ -1,19 +1,15 @@
|
|
|
1
1
|
import ImportButton from './ImportButton.vue';
|
|
2
2
|
|
|
3
3
|
export default {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
title: 'Buttons/Import',
|
|
5
|
+
component: ImportButton,
|
|
6
6
|
};
|
|
7
7
|
|
|
8
8
|
export const Primary = () => ({
|
|
9
|
-
|
|
10
|
-
template: '<ImportButton />',
|
|
9
|
+
template: '<farm-btn-import />',
|
|
11
10
|
});
|
|
12
11
|
|
|
13
12
|
export const CustomLabel = () => ({
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
components: { ImportButton },
|
|
14
|
+
template: '<farm-btn-import label="Label custom" />',
|
|
16
15
|
});
|
|
17
|
-
|
|
18
|
-
Primary.storyName = 'Básico';
|
|
19
|
-
CustomLabel.storyName = 'Label customizado';
|
|
@@ -1,18 +1,14 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<farm-btn
|
|
3
|
-
<
|
|
2
|
+
<farm-btn class="farm-btn--responsive farm-btn--import" title="Importar" @click="onClick">
|
|
3
|
+
<farm-icon>upload</farm-icon>
|
|
4
4
|
{{ label }}
|
|
5
5
|
</farm-btn>
|
|
6
6
|
</template>
|
|
7
|
-
<script>
|
|
7
|
+
<script lang="ts">
|
|
8
8
|
import Vue from 'vue';
|
|
9
|
-
import DefaultButton from '../DefaultButton';
|
|
10
9
|
|
|
11
10
|
export default Vue.extend({
|
|
12
11
|
name: 'farm-btn-import',
|
|
13
|
-
components: {
|
|
14
|
-
'farm-btn': DefaultButton,
|
|
15
|
-
},
|
|
16
12
|
props: {
|
|
17
13
|
/**
|
|
18
14
|
* Label do botão
|
|
@@ -30,12 +26,5 @@ export default Vue.extend({
|
|
|
30
26
|
});
|
|
31
27
|
</script>
|
|
32
28
|
<style scoped lang="scss">
|
|
33
|
-
|
|
34
|
-
background: var(--v-extra-lighten2);
|
|
35
|
-
color: var(--v-gray-lighten5);
|
|
36
|
-
.farm-btn__content i.mdi {
|
|
37
|
-
color: white;
|
|
38
|
-
margin-right: 1rem;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
29
|
+
@import 'ImportButton';
|
|
41
30
|
</style>
|
|
@@ -6,14 +6,11 @@ export default {
|
|
|
6
6
|
};
|
|
7
7
|
|
|
8
8
|
export const Primary = () => ({
|
|
9
|
-
|
|
10
|
-
template: '<MultiImport />',
|
|
9
|
+
template: '<farm-btn-multipleimport />',
|
|
11
10
|
});
|
|
12
11
|
|
|
13
12
|
export const List = () => ({
|
|
14
|
-
|
|
15
|
-
template: `<MultiImport :optionsList="[{ listenerKey: 1, title: 'XLS teste'}, { listenerKey: 2, title: 'CSV teste novo'}]" />`,
|
|
13
|
+
template: `<farm-btn-multipleimport :optionsList="[{ listenerKey: 1, title: 'XLS teste'}, { listenerKey: 2, title: 'CSV teste novo'}]" />`,
|
|
16
14
|
});
|
|
17
15
|
|
|
18
|
-
Primary.storyName = 'Básico';
|
|
19
16
|
List.storyName = 'Lista';
|
|
@@ -45,7 +45,6 @@ import VList from 'vuetify/lib/components/VList/VList';
|
|
|
45
45
|
import VMenu from 'vuetify/lib/components/VMenu';
|
|
46
46
|
import VListItem from 'vuetify/lib/components/VList/VListItem';
|
|
47
47
|
import { VListItemContent, VListItemTitle } from 'vuetify/lib';
|
|
48
|
-
import DefaultButton from '../DefaultButton';
|
|
49
48
|
|
|
50
49
|
export default Vue.extend({
|
|
51
50
|
name: 'farm-btn-multipleimport',
|
|
@@ -55,7 +54,6 @@ export default Vue.extend({
|
|
|
55
54
|
VMenu,
|
|
56
55
|
VListItemContent,
|
|
57
56
|
VListItemTitle,
|
|
58
|
-
'farm-btn': DefaultButton,
|
|
59
57
|
},
|
|
60
58
|
props: {
|
|
61
59
|
/**
|
|
@@ -6,13 +6,11 @@ export default {
|
|
|
6
6
|
};
|
|
7
7
|
|
|
8
8
|
export const Primary = () => ({
|
|
9
|
-
|
|
10
|
-
template: '<RemoveButton />',
|
|
9
|
+
template: '<farm-btn-remove />',
|
|
11
10
|
});
|
|
12
11
|
|
|
13
12
|
export const Secondary = () => ({
|
|
14
|
-
|
|
15
|
-
template: '<RemoveButton label="Custom label" />',
|
|
13
|
+
template: '<farm-btn-remove label="Custom label" />',
|
|
16
14
|
});
|
|
17
15
|
|
|
18
16
|
Primary.storyName = 'Básico';
|
|
@@ -7,14 +7,12 @@
|
|
|
7
7
|
:disabled="disabled"
|
|
8
8
|
@click="onClick"
|
|
9
9
|
>
|
|
10
|
-
<
|
|
10
|
+
<farm-icon>trash-can-outline</farm-icon>
|
|
11
11
|
{{ label }}
|
|
12
12
|
</farm-btn>
|
|
13
13
|
</template>
|
|
14
14
|
<script>
|
|
15
15
|
import Vue from 'vue';
|
|
16
|
-
import VIcon from 'vuetify/lib/components/VIcon';
|
|
17
|
-
import DefaultButton from '../DefaultButton';
|
|
18
16
|
|
|
19
17
|
export default Vue.extend({
|
|
20
18
|
name: 'farm-btn-remove',
|
|
@@ -34,10 +32,6 @@ export default Vue.extend({
|
|
|
34
32
|
default: false,
|
|
35
33
|
},
|
|
36
34
|
},
|
|
37
|
-
components: {
|
|
38
|
-
VIcon,
|
|
39
|
-
'farm-btn': DefaultButton,
|
|
40
|
-
},
|
|
41
35
|
methods: {
|
|
42
36
|
onClick() {
|
|
43
37
|
this.$emit('onClick');
|
|
@@ -46,9 +40,5 @@ export default Vue.extend({
|
|
|
46
40
|
});
|
|
47
41
|
</script>
|
|
48
42
|
<style scoped lang="scss">
|
|
49
|
-
|
|
50
|
-
.v-icon {
|
|
51
|
-
margin-right: 1rem;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
43
|
+
@import './RemoveButton';
|
|
54
44
|
</style>
|
|
@@ -1,25 +1,18 @@
|
|
|
1
1
|
import ToggleButton from './ToggleButton.vue';
|
|
2
2
|
|
|
3
3
|
export default {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
title: 'Buttons/ToggleButton',
|
|
5
|
+
component: ToggleButton,
|
|
6
6
|
};
|
|
7
7
|
|
|
8
8
|
export const Primary = () => ({
|
|
9
|
-
|
|
10
|
-
template: '<ToggleButton label="Botão" />',
|
|
9
|
+
template: '<farm-btn-toggle label="Botão" />',
|
|
11
10
|
});
|
|
12
11
|
|
|
13
12
|
export const Secondary = () => ({
|
|
14
|
-
|
|
15
|
-
template: '<ToggleButton label="Botão" position="right" />',
|
|
13
|
+
template: '<farm-btn-toggle label="Botão" position="right" />',
|
|
16
14
|
});
|
|
17
15
|
|
|
18
16
|
export const Opened = () => ({
|
|
19
|
-
|
|
20
|
-
template: '<ToggleButton label="Botão" :pressed="true" />',
|
|
17
|
+
template: '<farm-btn-toggle label="Botão" :pressed="true" />',
|
|
21
18
|
});
|
|
22
|
-
|
|
23
|
-
Primary.storyName = 'Básico';
|
|
24
|
-
Secondary.storyName = 'Ícone na direita';
|
|
25
|
-
Opened.storyName = 'Aberto';
|
|
@@ -11,25 +11,19 @@
|
|
|
11
11
|
:outlined="!open"
|
|
12
12
|
:title="label"
|
|
13
13
|
>
|
|
14
|
-
<
|
|
14
|
+
<farm-icon v-if="prepend" class="mr-3 ml-0">{{ `chevron-${open ? 'up' : 'down'}` }}</farm-icon>
|
|
15
15
|
{{ label }}
|
|
16
|
-
<
|
|
16
|
+
<farm-icon v-if="!prepend" class="ml-3 mr-0">{{ `chevron-${open ? 'up' : 'down'}` }}</farm-icon>
|
|
17
17
|
</farm-btn>
|
|
18
18
|
</template>
|
|
19
|
-
<script>
|
|
19
|
+
<script lang="ts">
|
|
20
20
|
import Vue from 'vue';
|
|
21
|
-
import VIcon from 'vuetify/lib/components/VIcon';
|
|
22
|
-
import DefaultButton from '../DefaultButton';
|
|
23
21
|
|
|
24
22
|
/**
|
|
25
23
|
* Botão de Toggle, emitindo e guardando status
|
|
26
24
|
*/
|
|
27
25
|
export default Vue.extend({
|
|
28
26
|
name: 'farm-btn-toggle',
|
|
29
|
-
components: {
|
|
30
|
-
VIcon,
|
|
31
|
-
'farm-btn': DefaultButton,
|
|
32
|
-
},
|
|
33
27
|
data: () => ({
|
|
34
28
|
open: false,
|
|
35
29
|
}),
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { withDesign } from 'storybook-addon-designs';
|
|
2
|
-
import
|
|
3
|
-
import gutters from '../configurations/gutters';
|
|
2
|
+
import gutters from '../../configurations/gutters';
|
|
4
3
|
|
|
5
4
|
export default {
|
|
6
|
-
title: '
|
|
5
|
+
title: 'Surfaces/Card/Molecules',
|
|
7
6
|
decorators: [withDesign],
|
|
8
7
|
parameters: {
|
|
9
8
|
viewMode: 'docs',
|
|
@@ -15,25 +14,7 @@ export default {
|
|
|
15
14
|
},
|
|
16
15
|
};
|
|
17
16
|
|
|
18
|
-
export const Primary = () => ({
|
|
19
|
-
components: {
|
|
20
|
-
'farm-card': Card,
|
|
21
|
-
'farm-card-content': CardContent,
|
|
22
|
-
},
|
|
23
|
-
template: `<div style="width: 480px;">
|
|
24
|
-
<farm-card>
|
|
25
|
-
<farm-card-content>
|
|
26
|
-
Content!
|
|
27
|
-
</farm-card-content>
|
|
28
|
-
</farm-card>
|
|
29
|
-
</div>`,
|
|
30
|
-
});
|
|
31
|
-
|
|
32
17
|
export const MultipleContents = () => ({
|
|
33
|
-
components: {
|
|
34
|
-
'farm-card': Card,
|
|
35
|
-
'farm-card-content': CardContent,
|
|
36
|
-
},
|
|
37
18
|
template: `<div style="width: 480px;">
|
|
38
19
|
<farm-card>
|
|
39
20
|
<farm-card-content>
|
|
@@ -50,10 +31,6 @@ export const MultipleContents = () => ({
|
|
|
50
31
|
});
|
|
51
32
|
|
|
52
33
|
export const Gutters = () => ({
|
|
53
|
-
components: {
|
|
54
|
-
'farm-card': Card,
|
|
55
|
-
'farm-card-content': CardContent,
|
|
56
|
-
},
|
|
57
34
|
data() {
|
|
58
35
|
return { gutters };
|
|
59
36
|
},
|
|
@@ -67,10 +44,6 @@ export const Gutters = () => ({
|
|
|
67
44
|
});
|
|
68
45
|
|
|
69
46
|
export const Shadow = () => ({
|
|
70
|
-
components: {
|
|
71
|
-
'farm-card': Card,
|
|
72
|
-
'farm-card-content': CardContent,
|
|
73
|
-
},
|
|
74
47
|
template: `<div style="width: 480px;">
|
|
75
48
|
<farm-card shadow>
|
|
76
49
|
<farm-card-content>
|