@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,6 +1,4 @@
|
|
|
1
1
|
import { withDesign } from 'storybook-addon-designs';
|
|
2
|
-
import { DataTableEmptyWrapper } from '../main';
|
|
3
|
-
import { DataTablePaginator } from '../main';
|
|
4
2
|
|
|
5
3
|
const headers = [
|
|
6
4
|
{
|
|
@@ -20,13 +18,12 @@ const headers = [
|
|
|
20
18
|
];
|
|
21
19
|
|
|
22
20
|
export default {
|
|
23
|
-
title: '
|
|
21
|
+
title: 'Display/Table/Examples',
|
|
24
22
|
decorators: [withDesign],
|
|
25
23
|
parameters: {
|
|
26
24
|
design: {
|
|
27
25
|
type: 'figma',
|
|
28
|
-
url:
|
|
29
|
-
'https://www.figma.com/file/1f84J4m1IBghWhozQvdyyt/%E2%9C%8D---Design-System?node-id=1505%3A372',
|
|
26
|
+
url: 'https://www.figma.com/file/1f84J4m1IBghWhozQvdyyt/%E2%9C%8D---Design-System?node-id=1505%3A372',
|
|
30
27
|
},
|
|
31
28
|
viewMode: 'docs',
|
|
32
29
|
docs: {
|
|
@@ -38,9 +35,6 @@ export default {
|
|
|
38
35
|
};
|
|
39
36
|
|
|
40
37
|
export const TableNoData = () => ({
|
|
41
|
-
components: {
|
|
42
|
-
DataTableEmptyWrapper,
|
|
43
|
-
},
|
|
44
38
|
data() {
|
|
45
39
|
return {
|
|
46
40
|
headers,
|
|
@@ -63,9 +57,6 @@ export const TableNoData = () => ({
|
|
|
63
57
|
});
|
|
64
58
|
|
|
65
59
|
export const TableSampleData = () => ({
|
|
66
|
-
components: {
|
|
67
|
-
DataTableEmptyWrapper,
|
|
68
|
-
},
|
|
69
60
|
data() {
|
|
70
61
|
return {
|
|
71
62
|
headers,
|
package/src/main.ts
CHANGED
|
@@ -22,6 +22,7 @@ import CardContext from './components/CardContext';
|
|
|
22
22
|
|
|
23
23
|
import DefaultButton from './components/Buttons/DefaultButton';
|
|
24
24
|
import Collapsible from './components/Collapsible';
|
|
25
|
+
import IdCaption from './components/IdCaption';
|
|
25
26
|
|
|
26
27
|
export {
|
|
27
28
|
DataTableEmptyWrapper,
|
|
@@ -45,6 +46,7 @@ export {
|
|
|
45
46
|
IconBox,
|
|
46
47
|
CardContext,
|
|
47
48
|
Collapsible,
|
|
49
|
+
IdCaption,
|
|
48
50
|
};
|
|
49
51
|
|
|
50
52
|
export * from './components/AlertReload';
|
|
@@ -57,6 +59,7 @@ export * from './components/Buttons/ToggleButton';
|
|
|
57
59
|
export * from './components/Buttons/RemoveButton';
|
|
58
60
|
export * from './components/Buttons/MultiImportButton';
|
|
59
61
|
export * from './components/Card';
|
|
62
|
+
export * from './components/Checkbox';
|
|
60
63
|
export * from './components/Chip';
|
|
61
64
|
export * from './components/Logos/ProductLogo';
|
|
62
65
|
export * from './components/Logos/OriginatorLogo';
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { Chip } from '../main';
|
|
2
|
-
|
|
3
|
-
import('./Chip.stories.scss');
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
title: 'Examples/Chip',
|
|
7
|
-
component: Chip,
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
const colors = ['secondary', 'info', 'error'];
|
|
11
|
-
const variations = ['darken', 'lighten'];
|
|
12
|
-
|
|
13
|
-
export const Colors = () => ({
|
|
14
|
-
components: { 'farm-chip': Chip },
|
|
15
|
-
data() {
|
|
16
|
-
return {
|
|
17
|
-
colors,
|
|
18
|
-
};
|
|
19
|
-
},
|
|
20
|
-
template: `<div class="chips-container">
|
|
21
|
-
<h3>Base Colors</h3>
|
|
22
|
-
<farm-chip
|
|
23
|
-
v-for="color in colors"
|
|
24
|
-
:key="color"
|
|
25
|
-
:color="color">
|
|
26
|
-
{{ color }}
|
|
27
|
-
</farm-chip>
|
|
28
|
-
</div>`,
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
export const Variations = () => ({
|
|
32
|
-
components: { 'farm-chip': Chip },
|
|
33
|
-
data() {
|
|
34
|
-
return {
|
|
35
|
-
colors,
|
|
36
|
-
variations,
|
|
37
|
-
};
|
|
38
|
-
},
|
|
39
|
-
template: `
|
|
40
|
-
<div>
|
|
41
|
-
<h3>Variations</h3>
|
|
42
|
-
<div class="chips-container" v-for="color in colors">
|
|
43
|
-
<h4>{{ color }}</h4>
|
|
44
|
-
<farm-chip
|
|
45
|
-
v-for="variation in variations"
|
|
46
|
-
:key="color + '_' + variation"
|
|
47
|
-
:color="color"
|
|
48
|
-
:variation="variation">
|
|
49
|
-
{{ variation }}
|
|
50
|
-
</farm-chip>
|
|
51
|
-
</div>
|
|
52
|
-
</div>`,
|
|
53
|
-
});
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { Collapsible } from '../main.ts';
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
title: 'Examples/Collapsible',
|
|
5
|
-
parameters: {
|
|
6
|
-
docs: {
|
|
7
|
-
description: {
|
|
8
|
-
component: `Collapsible<br />selector: <em>farm-collapsible</em>`,
|
|
9
|
-
},
|
|
10
|
-
},
|
|
11
|
-
viewMode: 'docs',
|
|
12
|
-
},
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export const Primary = () => ({
|
|
16
|
-
components: { 'farm-collapsible': Collapsible },
|
|
17
|
-
template: '<farm-collapsible title="">collapsible content</farm-collapsible>',
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
export const Title = () => ({
|
|
21
|
-
components: { 'farm-collapsible': Collapsible },
|
|
22
|
-
template: '<farm-collapsible title="Title">collapsible content</farm-collapsible>',
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
export const Icon = () => ({
|
|
26
|
-
components: { 'farm-collapsible': Collapsible },
|
|
27
|
-
template: '<farm-collapsible icon="book" title="With Icon">collapsible content</farm-collapsible>',
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
export const Opened = () => ({
|
|
31
|
-
components: { 'farm-collapsible': Collapsible },
|
|
32
|
-
data() {
|
|
33
|
-
return {
|
|
34
|
-
isOpen: true,
|
|
35
|
-
};
|
|
36
|
-
},
|
|
37
|
-
template: `<div>
|
|
38
|
-
status: {{ isOpen }}
|
|
39
|
-
<farm-collapsible
|
|
40
|
-
title=""
|
|
41
|
-
:open="isOpen"
|
|
42
|
-
@open="value => isOpen = value"
|
|
43
|
-
>
|
|
44
|
-
collapsible content
|
|
45
|
-
</farm-collapsible>
|
|
46
|
-
</div>`,
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
Primary.storyName = 'Basic';
|
|
50
|
-
Title.storyName = 'Title';
|
|
51
|
-
Icon.storyName = 'Icon';
|
|
52
|
-
Opened.storyName = 'Opened';
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { DialogFooter } from '../../main';
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
title: 'Examples/Dialog/DialogFooter',
|
|
5
|
-
component: DialogFooter,
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
export const Primary = () => ({
|
|
9
|
-
components: { 'farm-dialog-footer': DialogFooter },
|
|
10
|
-
template: '<farm-dialog-footer />',
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
export const ExtraButton = () => ({
|
|
14
|
-
components: { 'farm-dialog-footer': DialogFooter },
|
|
15
|
-
data() {
|
|
16
|
-
return { extraButtons: [{ label: 'Random label', color: 'error', outlined: true }] };
|
|
17
|
-
},
|
|
18
|
-
template: `<farm-dialog-footer :extraButtons="extraButtons" />`,
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
export const ConfirmIcon = () => ({
|
|
22
|
-
components: { 'farm-dialog-footer': DialogFooter },
|
|
23
|
-
template: `<div>
|
|
24
|
-
<farm-dialog-footer confirmIcon="check" />
|
|
25
|
-
<farm-dialog-footer confirmIcon="check" confirmColor="yellow" />
|
|
26
|
-
<farm-dialog-footer confirmIcon="check" confirmColor="accent" />
|
|
27
|
-
</div>
|
|
28
|
-
`,
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
export const Handlers = () => ({
|
|
32
|
-
components: { 'farm-dialog-footer': DialogFooter },
|
|
33
|
-
template: '<farm-dialog-footer @onConfirm="onConfirm" @onClose="onClose" />',
|
|
34
|
-
methods: {
|
|
35
|
-
onConfirm() {
|
|
36
|
-
alert('onConfirm handler');
|
|
37
|
-
},
|
|
38
|
-
onClose() {
|
|
39
|
-
alert('onClose handler');
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
});
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { DialogHeader } from '../../main';
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
title: 'Examples/Dialog/DialogHeader',
|
|
5
|
-
component: DialogHeader,
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
export const Primary = () => ({
|
|
9
|
-
components: { 'farm-dialog-header': DialogHeader },
|
|
10
|
-
template: `
|
|
11
|
-
<div style="max-width: 480px; position: relative;">
|
|
12
|
-
<farm-dialog-header title="Título do header" />
|
|
13
|
-
</div>`,
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
export const CustomIcon = () => ({
|
|
17
|
-
components: { 'farm-dialog-header': DialogHeader },
|
|
18
|
-
template: `
|
|
19
|
-
<div style="max-width: 480px; position: relative;">
|
|
20
|
-
<farm-dialog-header title="Título do header" iconTitle="calendar" />
|
|
21
|
-
</div>`,
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
export const CloseHandler = () => ({
|
|
25
|
-
components: { 'farm-dialog-header': DialogHeader },
|
|
26
|
-
template: `
|
|
27
|
-
<div style="max-width: 480px; position: relative;">
|
|
28
|
-
<farm-dialog-header title="Título do header" iconTitle="calendar" @onClose="onClose" />
|
|
29
|
-
</div>`,
|
|
30
|
-
methods: {
|
|
31
|
-
onClose() {
|
|
32
|
-
alert('onClose handler');
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
export const NoCloseIcon = () => ({
|
|
38
|
-
components: { 'farm-dialog-header': DialogHeader },
|
|
39
|
-
template: `
|
|
40
|
-
<div style="max-width: 480px; position: relative;">
|
|
41
|
-
<farm-dialog-header title="Título do header" :hasCloseIcon="false" />
|
|
42
|
-
</div>`,
|
|
43
|
-
});
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Label } from '../../main.ts';
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
title: 'Examples/Form/Label',
|
|
5
|
-
component: Label,
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
export const Primary = () => ({
|
|
9
|
-
components: { 'farm-label': Label },
|
|
10
|
-
template: '<farm-label>Label</farm-label>',
|
|
11
|
-
});
|
|
12
|
-
export const Required = () => ({
|
|
13
|
-
components: { 'farm-label': Label },
|
|
14
|
-
template: '<farm-label :required="true">Label</farm-label>',
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
Primary.storyName = 'Basic';
|
|
18
|
-
Required.storyName = 'Required';
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { TextField } from '../../main.ts';
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
title: 'Examples/Form/TextField',
|
|
5
|
-
component: TextField,
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
export const Primary = () => ({
|
|
9
|
-
components: { 'farm-textfield': TextField },
|
|
10
|
-
template: `<div style="width: 480px">
|
|
11
|
-
<farm-textfield />
|
|
12
|
-
</div>`,
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
export const BindVar = () => ({
|
|
16
|
-
components: { 'farm-textfield': TextField },
|
|
17
|
-
data() {
|
|
18
|
-
return {
|
|
19
|
-
v: '',
|
|
20
|
-
};
|
|
21
|
-
},
|
|
22
|
-
template: `<div style="width: 480px">
|
|
23
|
-
<farm-textfield v-model="v" />
|
|
24
|
-
value: {{ v }}
|
|
25
|
-
</div>`,
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
export const Rules = () => ({
|
|
29
|
-
components: { 'farm-textfield': TextField },
|
|
30
|
-
data() {
|
|
31
|
-
return {
|
|
32
|
-
v: '',
|
|
33
|
-
rules: {
|
|
34
|
-
required: val => !!val,
|
|
35
|
-
},
|
|
36
|
-
};
|
|
37
|
-
},
|
|
38
|
-
template: `<div style="width: 480px">
|
|
39
|
-
<h4>Custom rule (required field)</h4>
|
|
40
|
-
<farm-textfield v-model="v" :rules="[rules.required]" />
|
|
41
|
-
value: {{ v }}
|
|
42
|
-
</div>`,
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
Primary.storyName = 'Basic';
|
|
46
|
-
BindVar.storyName = 'Bind variable';
|
|
47
|
-
Rules.storyName = 'Rules';
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { withDesign } from 'storybook-addon-designs';
|
|
2
|
-
import { IconBox } from '../main';
|
|
3
|
-
import colors from '../configurations/colors';
|
|
4
|
-
import sizes from '../configurations/sizes';
|
|
5
|
-
import('../components/Icon/Icons.stories.scss');
|
|
6
|
-
|
|
7
|
-
export default {
|
|
8
|
-
title: 'Examples/IconBox',
|
|
9
|
-
decorators: [withDesign],
|
|
10
|
-
parameters: {
|
|
11
|
-
viewMode: 'docs',
|
|
12
|
-
docs: {
|
|
13
|
-
description: {
|
|
14
|
-
component: `IconBox`,
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
export const IconBoxes = () => ({
|
|
21
|
-
components: {
|
|
22
|
-
'farm-icon-box': IconBox,
|
|
23
|
-
},
|
|
24
|
-
data() {
|
|
25
|
-
return {
|
|
26
|
-
colors,
|
|
27
|
-
};
|
|
28
|
-
},
|
|
29
|
-
template: `<div class="icons-container">
|
|
30
|
-
<farm-icon-box
|
|
31
|
-
v-for="color of colors"
|
|
32
|
-
:key="color"
|
|
33
|
-
:color="color"
|
|
34
|
-
icon="book" />
|
|
35
|
-
</div>`,
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
export const Sizes = () => ({
|
|
39
|
-
components: {
|
|
40
|
-
'farm-icon-box': IconBox,
|
|
41
|
-
},
|
|
42
|
-
data() {
|
|
43
|
-
return {
|
|
44
|
-
sizes,
|
|
45
|
-
};
|
|
46
|
-
},
|
|
47
|
-
template: `<div class="icons-container">
|
|
48
|
-
<div v-for="size of sizes" :key="size">
|
|
49
|
-
<farm-icon-box icon="book" :key="size" :size="size" />
|
|
50
|
-
{{ size }}
|
|
51
|
-
</div>
|
|
52
|
-
|
|
53
|
-
</div>`,
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
IconBoxes.story = {
|
|
57
|
-
name: 'Colors',
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
Sizes.story = {
|
|
61
|
-
name: 'Sizes',
|
|
62
|
-
};
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { Logger } from '../../main';
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
title: 'Examples/Logger/Logger',
|
|
5
|
-
component: Logger,
|
|
6
|
-
parameters: {
|
|
7
|
-
docs: {
|
|
8
|
-
description: {
|
|
9
|
-
component: `Logger<br />
|
|
10
|
-
selector: <em>farm-logger</em>
|
|
11
|
-
`,
|
|
12
|
-
},
|
|
13
|
-
},
|
|
14
|
-
viewMode: 'docs',
|
|
15
|
-
},
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export const Primary = () => ({
|
|
19
|
-
components: { Logger },
|
|
20
|
-
data() {
|
|
21
|
-
return {
|
|
22
|
-
items: [
|
|
23
|
-
{
|
|
24
|
-
message: 'Recusado entre as pré elegíveis',
|
|
25
|
-
userName: 'Cleyton Rasta',
|
|
26
|
-
formattedDate: '13/06/2022 20:40',
|
|
27
|
-
status: 'error',
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
message: 'Aprovado entre as pré elegíveis',
|
|
31
|
-
userName: 'Cleyton Rasta',
|
|
32
|
-
formattedDate: '13/06/2022 20:40',
|
|
33
|
-
status: 'success',
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
message: 'Aprovado entre as pré elegíveis',
|
|
37
|
-
userName: 'Cleyton Rasta',
|
|
38
|
-
formattedDate: '13/06/2022 20:40',
|
|
39
|
-
status: 'success',
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
message: 'Recusado entre as pré elegíveis',
|
|
43
|
-
userName: 'Cleyton Rasta',
|
|
44
|
-
formattedDate: '13/06/2022 20:40',
|
|
45
|
-
status: 'error',
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
message: 'Recusado entre as pré elegíveis',
|
|
49
|
-
userName: 'Cleyton Rasta',
|
|
50
|
-
formattedDate: '13/06/2022 20:40',
|
|
51
|
-
status: 'error',
|
|
52
|
-
},
|
|
53
|
-
],
|
|
54
|
-
};
|
|
55
|
-
},
|
|
56
|
-
template: `<Logger :items="items" />`,
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
Primary.storyName = 'Básico';
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { LoggerItem } from '../../main';
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
title: 'Examples/Logger/LoggerItem',
|
|
5
|
-
component: LoggerItem,
|
|
6
|
-
parameters: {
|
|
7
|
-
docs: {
|
|
8
|
-
description: {
|
|
9
|
-
component: `LoggerItem<br />
|
|
10
|
-
selector: <em>farm-logger-item</em>
|
|
11
|
-
`,
|
|
12
|
-
},
|
|
13
|
-
},
|
|
14
|
-
viewMode: 'docs',
|
|
15
|
-
},
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export const Primary = () => ({
|
|
19
|
-
components: { LoggerItem },
|
|
20
|
-
data() {
|
|
21
|
-
return {
|
|
22
|
-
item: {
|
|
23
|
-
message: 'Recusado entre as pré elegíveis',
|
|
24
|
-
userName: 'Cleyton Rasta',
|
|
25
|
-
formattedDate: '13/06/2022 20:40',
|
|
26
|
-
},
|
|
27
|
-
};
|
|
28
|
-
},
|
|
29
|
-
template: `<LoggerItem :item="item" />`,
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
export const Success = () => ({
|
|
33
|
-
components: { LoggerItem },
|
|
34
|
-
data() {
|
|
35
|
-
return {
|
|
36
|
-
item: {
|
|
37
|
-
message: 'Recusado entre as pré elegíveis',
|
|
38
|
-
userName: 'Cleyton Rasta',
|
|
39
|
-
formattedDate: '13/06/2022 20:40',
|
|
40
|
-
status: 'success',
|
|
41
|
-
},
|
|
42
|
-
};
|
|
43
|
-
},
|
|
44
|
-
template: `<LoggerItem :item="item" />`,
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
export const Error = () => ({
|
|
48
|
-
components: { LoggerItem },
|
|
49
|
-
data() {
|
|
50
|
-
return {
|
|
51
|
-
item: {
|
|
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
|
-
},
|
|
59
|
-
template: `<LoggerItem :item="item" />`,
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
export const CustomIcon = () => ({
|
|
63
|
-
components: { LoggerItem },
|
|
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: `<LoggerItem :item="item" />`,
|
|
76
|
-
});
|
|
77
|
-
|
|
78
|
-
Primary.storyName = 'Basic';
|
|
79
|
-
Success.storyName = 'Success';
|
|
80
|
-
Error.storyName = 'Error';
|
|
81
|
-
CustomIcon.storyName = 'Custom Icon';
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { withDesign } from 'storybook-addon-designs';
|
|
2
|
-
import { MainFilter } from '../main';
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
title: 'Examples/MainFilter',
|
|
6
|
-
decorators: [withDesign],
|
|
7
|
-
component: MainFilter,
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
export const MainFilters = () => ({
|
|
11
|
-
/*
|
|
12
|
-
* How to toggle filters
|
|
13
|
-
*/
|
|
14
|
-
components: {
|
|
15
|
-
MainFilter,
|
|
16
|
-
},
|
|
17
|
-
data() {
|
|
18
|
-
return {
|
|
19
|
-
showFilters: false,
|
|
20
|
-
items: [1, 2, 3, 4, 5],
|
|
21
|
-
};
|
|
22
|
-
},
|
|
23
|
-
template: `<div style="max-width: 480px">
|
|
24
|
-
<MainFilter @onClick="showFilters = !showFilters" :showFilters="showFilters" />
|
|
25
|
-
<section v-if="showFilters">
|
|
26
|
-
<v-select :items="items" />
|
|
27
|
-
</section>
|
|
28
|
-
</div>`,
|
|
29
|
-
});
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { withDesign } from 'storybook-addon-designs';
|
|
2
|
-
import ProgressBar from '../components/ProgressBar';
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
title: 'Examples/ProgressBar',
|
|
6
|
-
component: ProgressBar,
|
|
7
|
-
decorators: [withDesign],
|
|
8
|
-
parameters: {
|
|
9
|
-
viewMode: 'docs',
|
|
10
|
-
design: {
|
|
11
|
-
type: 'figma',
|
|
12
|
-
url: 'https://www.figma.com/file/1f84J4m1IBghWhozQvdyyt/%E2%9C%85---Design-System-%7C-v1?node-id=1503%3A227',
|
|
13
|
-
},
|
|
14
|
-
docs: {
|
|
15
|
-
description: {
|
|
16
|
-
component: `ProgressBar<br />
|
|
17
|
-
selector: <em>farm-progressbar</em>`,
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
export const Primary = () => ({
|
|
24
|
-
components: { 'farm-progressbar': ProgressBar },
|
|
25
|
-
data() {
|
|
26
|
-
return {
|
|
27
|
-
val: 35,
|
|
28
|
-
};
|
|
29
|
-
},
|
|
30
|
-
template: '<farm-progressbar :value="val" />',
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
export const CustomColors = () => ({
|
|
34
|
-
components: { 'farm-progressbar': ProgressBar },
|
|
35
|
-
data() {
|
|
36
|
-
return {
|
|
37
|
-
val: 35,
|
|
38
|
-
};
|
|
39
|
-
},
|
|
40
|
-
template: '<farm-progressbar :value="val" backgroundColor="accent" valueColor="secondary" />',
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
export const CustomHexaColors = () => ({
|
|
44
|
-
components: { 'farm-progressbar': ProgressBar },
|
|
45
|
-
data() {
|
|
46
|
-
return {
|
|
47
|
-
val: 35,
|
|
48
|
-
};
|
|
49
|
-
},
|
|
50
|
-
template: '<farm-progressbar :value="val" backgroundColor="#FFFF00" valueColor="#00FF00" />',
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
const parameters = {
|
|
54
|
-
design: {
|
|
55
|
-
type: 'figma',
|
|
56
|
-
url: 'https://www.figma.com/file/1f84J4m1IBghWhozQvdyyt/%E2%9C%85---Design-System-%7C-v1?node-id=1503%3A227',
|
|
57
|
-
},
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
Primary.story = {
|
|
61
|
-
name: 'Basic',
|
|
62
|
-
parameters,
|
|
63
|
-
};
|
|
64
|
-
CustomColors.story = {
|
|
65
|
-
name: 'Custom Colors',
|
|
66
|
-
parameters,
|
|
67
|
-
};
|
|
68
|
-
CustomHexaColors.story = {
|
|
69
|
-
name: 'Custom Hexadecimals Colors',
|
|
70
|
-
parameters,
|
|
71
|
-
};
|