@farm-investimentos/front-mfe-components-vue3 0.0.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/README.md +35 -0
- package/dist/demo.html +10 -0
- package/dist/front-mfe-components.common.js +17771 -0
- package/dist/front-mfe-components.common.js.map +1 -0
- package/dist/front-mfe-components.css +1 -0
- package/dist/front-mfe-components.umd.js +17781 -0
- package/dist/front-mfe-components.umd.js.map +1 -0
- package/dist/front-mfe-components.umd.min.js +2 -0
- package/dist/front-mfe-components.umd.min.js.map +1 -0
- package/package.json +91 -0
- package/src/components/AlertBox/AlertBox.scss +52 -0
- package/src/components/AlertBox/AlertBox.stories.js +79 -0
- package/src/components/AlertBox/AlertBox.vue +127 -0
- package/src/components/AlertBox/__tests__/AlertBox.spec.js +32 -0
- package/src/components/AlertBox/__tests__/valueWatcher.spec.js +15 -0
- package/src/components/AlertBox/index.ts +4 -0
- package/src/components/AlertBox/valueWatcher.ts +10 -0
- package/src/components/AlertReload/AlertReload.scss +33 -0
- package/src/components/AlertReload/AlertReload.stories.js +34 -0
- package/src/components/AlertReload/AlertReload.vue +46 -0
- package/src/components/AlertReload/__tests__/AlertReload.spec.js +18 -0
- package/src/components/AlertReload/index.ts +4 -0
- package/src/components/ButtonToggle/ButtonToggle.scss +14 -0
- package/src/components/ButtonToggle/ButtonToggle.stories.js +50 -0
- package/src/components/ButtonToggle/ButtonToggle.vue +53 -0
- package/src/components/ButtonToggle/IButtonToggle.ts +5 -0
- package/src/components/ButtonToggle/__tests__/ButtonToggle.spec.js +35 -0
- package/src/components/ButtonToggle/index.ts +4 -0
- package/src/components/Buttons/ConfirmButton/ConfirmButton.stories.js +50 -0
- package/src/components/Buttons/ConfirmButton/ConfirmButton.vue +33 -0
- package/src/components/Buttons/ConfirmButton/__tests__/ConfirmButton.spec.js +14 -0
- package/src/components/Buttons/ConfirmButton/index.ts +4 -0
- package/src/components/Buttons/DangerButton/DangerButton.stories.js +49 -0
- package/src/components/Buttons/DangerButton/DangerButton.vue +32 -0
- package/src/components/Buttons/DangerButton/__tests__/DangerButton.spec.js +14 -0
- package/src/components/Buttons/DangerButton/index.ts +4 -0
- package/src/components/Buttons/DefaultButton/Buttons.stories.scss +10 -0
- package/src/components/Buttons/DefaultButton/DefaultButton.scss +328 -0
- package/src/components/Buttons/DefaultButton/DefaultButton.stories.js +317 -0
- package/src/components/Buttons/DefaultButton/DefaultButton.vue +128 -0
- package/src/components/Buttons/DefaultButton/__tests__/DefaultButton.spec.js +32 -0
- package/src/components/Buttons/DefaultButton/index.ts +4 -0
- package/src/components/Buttons/ExportButton/ExportButton.stories.js +40 -0
- package/src/components/Buttons/ExportButton/ExportButton.vue +82 -0
- package/src/components/Buttons/ExportButton/__tests__/ExportButton.spec.js +14 -0
- package/src/components/Buttons/ExportButton/index.ts +4 -0
- package/src/components/Buttons/ImportButton/ImportButton.scss +8 -0
- package/src/components/Buttons/ImportButton/ImportButton.stories.js +23 -0
- package/src/components/Buttons/ImportButton/ImportButton.vue +35 -0
- package/src/components/Buttons/ImportButton/__tests__/ImportButton.spec.js +23 -0
- package/src/components/Buttons/ImportButton/index.ts +4 -0
- package/src/components/Buttons/MultiImportButton/MultiImportButton.stories.js +35 -0
- package/src/components/Buttons/MultiImportButton/MultiImportButton.vue +54 -0
- package/src/components/Buttons/MultiImportButton/__tests__/MultiImportButton.spec.js +14 -0
- package/src/components/Buttons/MultiImportButton/index.ts +4 -0
- package/src/components/Buttons/RemoveButton/RemoveButton.scss +5 -0
- package/src/components/Buttons/RemoveButton/RemoveButton.stories.js +17 -0
- package/src/components/Buttons/RemoveButton/RemoveButton.vue +44 -0
- package/src/components/Buttons/RemoveButton/__tests__/RemoveButton.spec.js +23 -0
- package/src/components/Buttons/RemoveButton/index.ts +4 -0
- package/src/components/Buttons/ToggleButton/ToggleButton.stories.js +22 -0
- package/src/components/Buttons/ToggleButton/ToggleButton.vue +75 -0
- package/src/components/Buttons/ToggleButton/__tests__/ToggleButton.spec.js +21 -0
- package/src/components/Buttons/ToggleButton/index.ts +4 -0
- package/src/components/Card/Card.scss +18 -0
- package/src/components/Card/Card.stories.js +40 -0
- package/src/components/Card/Card.vue +24 -0
- package/src/components/Card/CardComposition.stories.ts +69 -0
- package/src/components/Card/CardContent/CardContent.scss +17 -0
- package/src/components/Card/CardContent/CardContent.stories.js +47 -0
- package/src/components/Card/CardContent/CardContent.vue +39 -0
- package/src/components/Card/CardContent/__tests__/CardContent.spec.js +20 -0
- package/src/components/Card/CardContent/index.ts +4 -0
- package/src/components/Card/__tests__/Card.spec.js +20 -0
- package/src/components/Card/index.ts +5 -0
- package/src/components/Checkbox/Checkbox.scss +108 -0
- package/src/components/Checkbox/Checkbox.stories.js +194 -0
- package/src/components/Checkbox/Checkbox.vue +193 -0
- package/src/components/Checkbox/__tests__/Checkbox.spec.js +34 -0
- package/src/components/Checkbox/__tests__/modelValueWatcher.spec.js +43 -0
- package/src/components/Checkbox/index.ts +4 -0
- package/src/components/Checkbox/modelValueWatcher.ts +12 -0
- package/src/components/Chip/Chip.scss +109 -0
- package/src/components/Chip/Chip.stories.js +96 -0
- package/src/components/Chip/Chip.stories.scss +13 -0
- package/src/components/Chip/Chip.vue +66 -0
- package/src/components/Chip/__tests__/Chip.spec.js +20 -0
- package/src/components/Chip/index.ts +4 -0
- package/src/components/ChipInviteStatus/ChipInviteStatus.stories.js +30 -0
- package/src/components/ChipInviteStatus/ChipInviteStatus.vue +38 -0
- package/src/components/ChipInviteStatus/__tests__/ChipInviteStatus.spec.js +22 -0
- package/src/components/ChipInviteStatus/index.ts +4 -0
- package/src/components/ChipInviteStatus/keys.ts +11 -0
- package/src/components/Collapsible/Collapsible.scss +48 -0
- package/src/components/Collapsible/Collapsible.stories.js +150 -0
- package/src/components/Collapsible/Collapsible.vue +189 -0
- package/src/components/Collapsible/__tests__/Collapsible.spec.js +38 -0
- package/src/components/Collapsible/index.ts +3 -0
- package/src/components/ContextMenu/ContextMenu.scss +33 -0
- package/src/components/ContextMenu/ContextMenu.stories.js +248 -0
- package/src/components/ContextMenu/ContextMenu.vue +250 -0
- package/src/components/ContextMenu/__tests__/ContextMenu.spec.js +29 -0
- package/src/components/ContextMenu/index.ts +5 -0
- package/src/components/CopyToClipboard/CopyToClipboard.stories.js +83 -0
- package/src/components/CopyToClipboard/CopyToClipboard.vue +133 -0
- package/src/components/CopyToClipboard/__tests__/CopyToClipboard.spec.js +24 -0
- package/src/components/CopyToClipboard/index.ts +4 -0
- package/src/components/DataTableEmptyWrapper/DataTableEmptyWrapper.scss +17 -0
- package/src/components/DataTableEmptyWrapper/DataTableEmptyWrapper.stories.js +30 -0
- package/src/components/DataTableEmptyWrapper/DataTableEmptyWrapper.vue +50 -0
- package/src/components/DataTableEmptyWrapper/__tests__/DataTableEmptyWrapper.spec.js +20 -0
- package/src/components/DataTableEmptyWrapper/index.ts +4 -0
- package/src/components/DataTableHeader/DataTableHeader.scss +65 -0
- package/src/components/DataTableHeader/DataTableHeader.stories.js +109 -0
- package/src/components/DataTableHeader/DataTableHeader.vue +197 -0
- package/src/components/DataTableHeader/__tests__/DataTableHeader.spec.js +95 -0
- package/src/components/DataTableHeader/index.ts +3 -0
- package/src/components/DataTablePaginator/DataTablePaginator.scss +90 -0
- package/src/components/DataTablePaginator/DataTablePaginator.stories.js +49 -0
- package/src/components/DataTablePaginator/DataTablePaginator.vue +218 -0
- package/src/components/DataTablePaginator/__tests__/DataTablePaginator.spec.js +32 -0
- package/src/components/DataTablePaginator/index.ts +3 -0
- package/src/components/DatePicker/DatePicker.scss +18 -0
- package/src/components/DatePicker/DatePicker.stories.js +134 -0
- package/src/components/DatePicker/DatePicker.vue +292 -0
- package/src/components/DatePicker/__tests__/DatePicker.spec.js +108 -0
- package/src/components/DatePicker/customDatePicker.scss +79 -0
- package/src/components/DatePicker/index.ts +3 -0
- package/src/components/DatePicker/vDatePicker.scss +214 -0
- package/src/components/DialogFooter/DialogFooter.scss +34 -0
- package/src/components/DialogFooter/DialogFooter.stories.js +49 -0
- package/src/components/DialogFooter/DialogFooter.vue +102 -0
- package/src/components/DialogFooter/IExtraButton.ts +9 -0
- package/src/components/DialogFooter/__tests__/DialogFooter.spec.js +20 -0
- package/src/components/DialogFooter/index.ts +3 -0
- package/src/components/DialogHeader/DialogHeader.scss +32 -0
- package/src/components/DialogHeader/DialogHeader.stories.js +69 -0
- package/src/components/DialogHeader/DialogHeader.vue +61 -0
- package/src/components/DialogHeader/__tests__/DialogHeader.spec.js +24 -0
- package/src/components/DialogHeader/index.ts +3 -0
- package/src/components/Form/Form.stories.js +390 -0
- package/src/components/Form/Form.vue +100 -0
- package/src/components/Form/__tests__/Form.spec.js +14 -0
- package/src/components/Form/index.ts +4 -0
- package/src/components/Icon/Icon.scss +61 -0
- package/src/components/Icon/Icon.stories.js +156 -0
- package/src/components/Icon/Icon.vue +100 -0
- package/src/components/Icon/Icons.stories.scss +31 -0
- package/src/components/Icon/__tests__/Icon.spec.js +34 -0
- package/src/components/Icon/icons_list.ts +2557 -0
- package/src/components/Icon/index.ts +4 -0
- package/src/components/IconBox/IconBox.scss +42 -0
- package/src/components/IconBox/IconBox.stories.js +92 -0
- package/src/components/IconBox/IconBox.vue +78 -0
- package/src/components/IconBox/__tests__/IconBox.spec.js +37 -0
- package/src/components/IconBox/index.ts +3 -0
- package/src/components/IdCaption/IdCaption.scss +51 -0
- package/src/components/IdCaption/IdCaption.stories.js +224 -0
- package/src/components/IdCaption/IdCaption.vue +168 -0
- package/src/components/IdCaption/__tests__/IdCaption.spec.js +14 -0
- package/src/components/IdCaption/index.ts +3 -0
- package/src/components/Label/Label.scss +33 -0
- package/src/components/Label/Label.stories.js +60 -0
- package/src/components/Label/Label.vue +27 -0
- package/src/components/Label/__tests__/Label.spec.js +20 -0
- package/src/components/Label/index.ts +4 -0
- package/src/components/List/List.scss +0 -0
- package/src/components/List/List.stories.js +30 -0
- package/src/components/List/List.vue +75 -0
- package/src/components/List/__tests__/List.spec.js +33 -0
- package/src/components/List/composition/index.ts +3 -0
- package/src/components/List/composition/useFocus.ts +49 -0
- package/src/components/List/index.ts +4 -0
- package/src/components/ListItem/ListItem.scss +37 -0
- package/src/components/ListItem/ListItem.stories.js +81 -0
- package/src/components/ListItem/ListItem.vue +76 -0
- package/src/components/ListItem/ListItem.vue.bkpv2 +84 -0
- package/src/components/ListItem/__tests__/ListItem.spec.js +20 -0
- package/src/components/ListItem/index.ts +4 -0
- package/src/components/Loader/Loader.scss +116 -0
- package/src/components/Loader/Loader.stories.ts +48 -0
- package/src/components/Loader/Loader.vue +83 -0
- package/src/components/Loader/__tests__/Loader.spec.js +35 -0
- package/src/components/Loader/index.ts +3 -0
- package/src/components/Logger/Logger.scss +56 -0
- package/src/components/Logger/Logger.stories.js +228 -0
- package/src/components/Logger/Logger.vue +49 -0
- package/src/components/Logger/LoggerItem/ILoggerItem.ts +11 -0
- package/src/components/Logger/LoggerItem/LoggerItem.scss +99 -0
- package/src/components/Logger/LoggerItem/LoggerItem.stories.js +144 -0
- package/src/components/Logger/LoggerItem/LoggerItem.vue +98 -0
- package/src/components/Logger/LoggerItem/__tests__/LoggerItem.spec.js +93 -0
- package/src/components/Logger/LoggerItem/index.ts +4 -0
- package/src/components/Logger/LoggerItem/mappingIconKeys.ts +5 -0
- package/src/components/Logger/__tests__/Logger.spec.js +75 -0
- package/src/components/Logger/index.ts +4 -0
- package/src/components/MainFilter/MainFilter.scss +16 -0
- package/src/components/MainFilter/MainFilter.stories.js +84 -0
- package/src/components/MainFilter/MainFilter.vue +147 -0
- package/src/components/MainFilter/__tests__/MainFilter.spec.js +45 -0
- package/src/components/MainFilter/index.ts +3 -0
- package/src/components/ManagersList/ManagersList.stories.js +10 -0
- package/src/components/ManagersList/ManagersList.vue +29 -0
- package/src/components/ManagersList/__tests__/ManagersList.spec.js +27 -0
- package/src/components/ManagersList/index.ts +3 -0
- package/src/components/Modal/Modal.scss +110 -0
- package/src/components/Modal/Modal.stories.js +299 -0
- package/src/components/Modal/Modal.vue +135 -0
- package/src/components/Modal/__tests__/Modal.spec.js +19 -0
- package/src/components/Modal/index.ts +4 -0
- package/src/components/ModalPromptUser/ModalPromptUser.scss +3 -0
- package/src/components/ModalPromptUser/ModalPromptUser.stories.js +121 -0
- package/src/components/ModalPromptUser/ModalPromptUser.vue +135 -0
- package/src/components/ModalPromptUser/__tests__/ModalPromptUser.spec.js +27 -0
- package/src/components/ModalPromptUser/index.ts +3 -0
- package/src/components/MultipleFilePicker/MultipleFilePicker.scss +168 -0
- package/src/components/MultipleFilePicker/MultipleFilePicker.stories.js +74 -0
- package/src/components/MultipleFilePicker/MultipleFilePicker.vue +261 -0
- package/src/components/MultipleFilePicker/__tests__/MultipleFilePicker.spec.js +184 -0
- package/src/components/MultipleFilePicker/index.ts +3 -0
- package/src/components/MultipleSelectShortener/MultipleSelectShortener.stories.js +32 -0
- package/src/components/MultipleSelectShortener/MultipleSelectShortener.vue +48 -0
- package/src/components/MultipleSelectShortener/__tests__/MultipleSelectShortener.spec.js +21 -0
- package/src/components/MultipleSelectShortener/index.ts +4 -0
- package/src/components/ProgressBar/ProgressBar.scss +25 -0
- package/src/components/ProgressBar/ProgressBar.stories.js +49 -0
- package/src/components/ProgressBar/ProgressBar.vue +111 -0
- package/src/components/ProgressBar/__tests__/ProgressBar.spec.js +31 -0
- package/src/components/ProgressBar/index.ts +4 -0
- package/src/components/PromptUserToConfirm/PromptUserToConfirm.stories.js +51 -0
- package/src/components/PromptUserToConfirm/PromptUserToConfirm.vue +62 -0
- package/src/components/PromptUserToConfirm/__tests__/PromptUserToConfirm.spec.js +24 -0
- package/src/components/PromptUserToConfirm/index.ts +3 -0
- package/src/components/Radio/Radio.scss +109 -0
- package/src/components/Radio/Radio.stories.js +147 -0
- package/src/components/Radio/Radio.vue +110 -0
- package/src/components/Radio/__tests__/Radio.spec.js +27 -0
- package/src/components/Radio/index.ts +4 -0
- package/src/components/RadioGroup/RadioGroup.stories.js +85 -0
- package/src/components/RadioGroup/RadioGroup.vue +95 -0
- package/src/components/RadioGroup/__tests__/RadioGroup.spec.js +24 -0
- package/src/components/RadioGroup/index.ts +4 -0
- package/src/components/RangeDatePicker/RangeDatePicker.stories.js +76 -0
- package/src/components/RangeDatePicker/RangeDatePicker.vue +201 -0
- package/src/components/RangeDatePicker/__tests__/RangeDatePicker.spec.js +107 -0
- package/src/components/RangeDatePicker/index.ts +3 -0
- package/src/components/ResetTableRowSelection/ResetTableRowSelection.stories.js +15 -0
- package/src/components/ResetTableRowSelection/ResetTableRowSelection.vue +35 -0
- package/src/components/ResetTableRowSelection/__tests__/ResetTableRowSelection.spec.js +33 -0
- package/src/components/ResetTableRowSelection/index.ts +4 -0
- package/src/components/ResourceMetaInfo/ResourceMetaInfo.scss +14 -0
- package/src/components/ResourceMetaInfo/ResourceMetaInfo.stories.js +138 -0
- package/src/components/ResourceMetaInfo/ResourceMetaInfo.vue +140 -0
- package/src/components/ResourceMetaInfo/__tests__/ResourceMetaInfo.spec.js +182 -0
- package/src/components/ResourceMetaInfo/index.ts +4 -0
- package/src/components/Select/Select.scss +49 -0
- package/src/components/Select/Select.stories.js +346 -0
- package/src/components/Select/Select.vue +439 -0
- package/src/components/Select/__tests__/Select.spec.js +174 -0
- package/src/components/Select/__tests__/composition.spec.js +27 -0
- package/src/components/Select/composition/buildData.ts +34 -0
- package/src/components/Select/composition/index.ts +3 -0
- package/src/components/Select/index.ts +4 -0
- package/src/components/SelectAutoComplete/SelectAutoComplete.scss +49 -0
- package/src/components/SelectAutoComplete/SelectAutoComplete.stories.js +328 -0
- package/src/components/SelectAutoComplete/SelectAutoComplete.vue +535 -0
- package/src/components/SelectAutoComplete/__tests__/SelectAutoComplete.spec.js +130 -0
- package/src/components/SelectAutoComplete/__tests__/useSelectAutoComplete.spec.js +28 -0
- package/src/components/SelectAutoComplete/composables/index.ts +3 -0
- package/src/components/SelectAutoComplete/composables/useSelectAutoComplete.ts +37 -0
- package/src/components/SelectAutoComplete/index.ts +4 -0
- package/src/components/SelectModalOptions/SelectModalOptions.scss +15 -0
- package/src/components/SelectModalOptions/SelectModalOptions.stories.js +46 -0
- package/src/components/SelectModalOptions/SelectModalOptions.vue +298 -0
- package/src/components/SelectModalOptions/__tests__/SelectModalOptions.spec.js +132 -0
- package/src/components/SelectModalOptions/index.ts +4 -0
- package/src/components/Stepper/StepperHeader/IStep.ts +6 -0
- package/src/components/Stepper/StepperHeader/StepperHeader.scss +127 -0
- package/src/components/Stepper/StepperHeader/StepperHeader.stories.js +89 -0
- package/src/components/Stepper/StepperHeader/StepperHeader.vue +106 -0
- package/src/components/Stepper/StepperHeader/__tests__/StepperHeader.spec.js +63 -0
- package/src/components/Stepper/StepperHeader/_mixins.scss +46 -0
- package/src/components/Stepper/StepperHeader/index.ts +4 -0
- package/src/components/Stepper/index.ts +5 -0
- package/src/components/Switcher/Switcher.scss +71 -0
- package/src/components/Switcher/Switcher.stories.js +112 -0
- package/src/components/Switcher/Switcher.vue +94 -0
- package/src/components/Switcher/__tests__/Switcher.spec.js +26 -0
- package/src/components/Switcher/index.ts +4 -0
- package/src/components/TableContextMenu/TableContextMenu.scss +9 -0
- package/src/components/TableContextMenu/TableContextMenu.stories.js +92 -0
- package/src/components/TableContextMenu/TableContextMenu.vue +89 -0
- package/src/components/TableContextMenu/__tests__/TableContextMenu.spec.js +45 -0
- package/src/components/TableContextMenu/index.ts +3 -0
- package/src/components/Tabs/Tabs.scss +72 -0
- package/src/components/Tabs/Tabs.stories.js +68 -0
- package/src/components/Tabs/Tabs.vue +130 -0
- package/src/components/Tabs/__tests__/Tabs.spec.js +59 -0
- package/src/components/Tabs/index.ts +4 -0
- package/src/components/TextArea/TextArea.scss +75 -0
- package/src/components/TextArea/TextArea.stories.js +147 -0
- package/src/components/TextArea/TextArea.vue +224 -0
- package/src/components/TextArea/__tests__/TextArea.spec.js +48 -0
- package/src/components/TextArea/index.ts +4 -0
- package/src/components/TextFieldV2/TextFieldV2.scss +99 -0
- package/src/components/TextFieldV2/TextFieldV2.stories.js +260 -0
- package/src/components/TextFieldV2/TextFieldV2.vue +276 -0
- package/src/components/TextFieldV2/__tests__/TextFieldV2.spec.js +52 -0
- package/src/components/TextFieldV2/index.ts +4 -0
- package/src/components/Tooltip/Tooltip.scss +38 -0
- package/src/components/Tooltip/Tooltip.stories.js +100 -0
- package/src/components/Tooltip/Tooltip.vue +125 -0
- package/src/components/Tooltip/__tests__/Tooltip.spec.js +20 -0
- package/src/components/Tooltip/index.ts +5 -0
- package/src/components/Typography/BodyText/BodyText.scss +8 -0
- package/src/components/Typography/BodyText/BodyText.stories.js +58 -0
- package/src/components/Typography/BodyText/BodyText.vue +51 -0
- package/src/components/Typography/BodyText/__tests__/BodyText.spec.js +31 -0
- package/src/components/Typography/BodyText/configurations.ts +10 -0
- package/src/components/Typography/Caption/Caption.scss +8 -0
- package/src/components/Typography/Caption/Caption.stories.js +54 -0
- package/src/components/Typography/Caption/Caption.vue +51 -0
- package/src/components/Typography/Caption/__tests__/Caption.spec.js +31 -0
- package/src/components/Typography/Caption/configurations.ts +7 -0
- package/src/components/Typography/Heading/Heading.scss +20 -0
- package/src/components/Typography/Heading/Heading.stories.js +32 -0
- package/src/components/Typography/Heading/Heading.vue +50 -0
- package/src/components/Typography/Heading/__tests__/Heading.spec.js +38 -0
- package/src/components/Typography/Heading/configurations.ts +10 -0
- package/src/components/Typography/OverlayText/OverlayText.scss +3 -0
- package/src/components/Typography/OverlayText/OverlayText.stories.js +25 -0
- package/src/components/Typography/OverlayText/OverlayText.vue +22 -0
- package/src/components/Typography/OverlayText/__tests__/OverlayText.spec.js +20 -0
- package/src/components/Typography/Small/Small.scss +3 -0
- package/src/components/Typography/Small/Small.stories.js +34 -0
- package/src/components/Typography/Small/Small.vue +47 -0
- package/src/components/Typography/Small/__tests__/Small.spec.js +31 -0
- package/src/components/Typography/Small/configurations.ts +7 -0
- package/src/components/Typography/Subtitle/Subtitle.scss +8 -0
- package/src/components/Typography/Subtitle/Subtitle.stories.js +57 -0
- package/src/components/Typography/Subtitle/Subtitle.vue +52 -0
- package/src/components/Typography/Subtitle/__tests__/Subtitle.spec.js +31 -0
- package/src/components/Typography/Subtitle/configurations.ts +8 -0
- package/src/components/Typography/Typography.scss +87 -0
- package/src/components/Typography/Typography.stories.js +210 -0
- package/src/components/Typography/Typography.vue +132 -0
- package/src/components/Typography/__tests__/Typography.spec.js +60 -0
- package/src/components/Typography/index.ts +11 -0
- package/src/components/ValueCaption/ValueCaption.scss +19 -0
- package/src/components/ValueCaption/ValueCaption.stories.js +58 -0
- package/src/components/ValueCaption/ValueCaption.vue +63 -0
- package/src/components/ValueCaption/__tests__/ValueCaption.spec.js +14 -0
- package/src/components/ValueCaption/index.ts +4 -0
- package/src/components/layout/Basic.stories.js +113 -0
- package/src/components/layout/Box/Box.scss +15 -0
- package/src/components/layout/Box/Box.stories.js +41 -0
- package/src/components/layout/Box/Box.vue +37 -0
- package/src/components/layout/Box/__tests__/Box.spec.js +20 -0
- package/src/components/layout/Box/index.ts +4 -0
- package/src/components/layout/Col/Col.scss +110 -0
- package/src/components/layout/Col/Col.stories.js +174 -0
- package/src/components/layout/Col/Col.vue +141 -0
- package/src/components/layout/Col/__tests__/Col.spec.js +20 -0
- package/src/components/layout/Col/index.ts +4 -0
- package/src/components/layout/Container/Container.scss +35 -0
- package/src/components/layout/Container/Container.stories.js +23 -0
- package/src/components/layout/Container/Container.vue +18 -0
- package/src/components/layout/Container/index.ts +4 -0
- package/src/components/layout/ContainerFooter/Container.stories.js +29 -0
- package/src/components/layout/ContainerFooter/ContainerFooter.scss +13 -0
- package/src/components/layout/ContainerFooter/ContainerFooter.vue +27 -0
- package/src/components/layout/ContainerFooter/index.ts +4 -0
- package/src/components/layout/DisplayBreakpoints.stories.mdx +90 -0
- package/src/components/layout/GridSystem.stories.js +138 -0
- package/src/components/layout/Line/Line.scss +25 -0
- package/src/components/layout/Line/Line.stories.js +53 -0
- package/src/components/layout/Line/Line.vue +58 -0
- package/src/components/layout/Line/__tests__/Line.spec.js +22 -0
- package/src/components/layout/Line/index.ts +4 -0
- package/src/components/layout/PropsValues.stories.mdx +30 -0
- package/src/components/layout/Row/Row.scss +42 -0
- package/src/components/layout/Row/Row.stories.js +112 -0
- package/src/components/layout/Row/Row.vue +77 -0
- package/src/components/layout/Row/__tests__/Row.spec.js +20 -0
- package/src/components/layout/Row/index.ts +4 -0
- package/src/composition/__tests__/deepEqual.spec.js +13 -0
- package/src/composition/__tests__/validateFormFieldBuilder.spec.js +34 -0
- package/src/composition/__tests__/validateFormStateBuilder.spec.js +8 -0
- package/src/composition/deepEqual.ts +24 -0
- package/src/composition/validateFormFieldBuilder.ts +18 -0
- package/src/composition/validateFormMethodBuilder.ts +9 -0
- package/src/composition/validateFormStateBuilder.ts +13 -0
- package/src/configurations/_functions.scss +9 -0
- package/src/configurations/_mixins.scss +103 -0
- package/src/configurations/_theme-colors-background.scss +10 -0
- package/src/configurations/_theme-colors-base.module.scss +8 -0
- package/src/configurations/_theme-colors-bw.module.scss +10 -0
- package/src/configurations/_theme-colors-stroke.scss +10 -0
- package/src/configurations/_theme-colors-text.scss +10 -0
- package/src/configurations/_theme-colors-variations.scss +9 -0
- package/src/configurations/_theme-colors.scss +122 -0
- package/src/configurations/_variables.scss +36 -0
- package/src/configurations/colors.ts +12 -0
- package/src/configurations/flexVariables.ts +5 -0
- package/src/configurations/gutters.ts +1 -0
- package/src/configurations/sizes.ts +1 -0
- package/src/configurations/typographyHtmlTags.ts +16 -0
- package/src/examples/Colors.stories.js +122 -0
- package/src/examples/Colors.stories.scss +21 -0
- package/src/examples/Table.stories.js +200 -0
- package/src/examples/VuetifyDialog.stories.js +129 -0
- package/src/helpers/calculateMainZindex.js +12 -0
- package/src/helpers/date.ts +94 -0
- package/src/helpers/formatDatePickerHeader.ts +19 -0
- package/src/helpers/index.ts +4 -0
- package/src/helpers/isChildOfFixedElement.js +16 -0
- package/src/helpers/randomId.ts +9 -0
- package/src/main.ts +92 -0
- package/src/scss/Sticky-table.scss +112 -0
- package/src/scss/Table.scss +2 -0
- package/src/scss/VMenuOverrides.scss +17 -0
- package/src/scss/VuejsDialog.scss +93 -0
- package/src/scss/cssVariablesGenerator.scss +25 -0
- package/src/scss/utils.scss +51 -0
- package/src/shims-libs.d.ts +4 -0
- package/src/shims-tsx.d.ts +11 -0
- package/src/shims-vue.d.ts +4 -0
- package/src/stories/Introduction.stories.mdx +118 -0
- package/src/stories/assets/code-brackets.svg +1 -0
- package/src/stories/assets/colors.svg +1 -0
- package/src/stories/assets/comments.svg +1 -0
- package/src/stories/assets/direction.svg +1 -0
- package/src/stories/assets/flow.svg +1 -0
- package/src/stories/assets/logo_farmtech.svg +21 -0
- package/src/stories/assets/plugin.svg +1 -0
- package/src/stories/assets/repo.svg +1 -0
- package/src/vue-file-import.d.ts +4 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
import ImportButton from '../ImportButton';
|
|
3
|
+
|
|
4
|
+
describe('ImportButton component', () => {
|
|
5
|
+
let wrapper;
|
|
6
|
+
let component;
|
|
7
|
+
|
|
8
|
+
beforeEach(() => {
|
|
9
|
+
wrapper = shallowMount(ImportButton);
|
|
10
|
+
component = wrapper.vm;
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
test('Created hook', () => {
|
|
14
|
+
expect(wrapper).toBeDefined();
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
describe('Methods', () => {
|
|
18
|
+
it('Should emit event', () => {
|
|
19
|
+
component.onClick();
|
|
20
|
+
expect(wrapper.emitted().onClick).toBeDefined();
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
});
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import MultiImport from './MultiImportButton.vue';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Buttons/MultiImport',
|
|
5
|
+
component: MultiImport,
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export const Primary = () => ({
|
|
9
|
+
template: '<farm-btn-multipleimport />',
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
export const List = () => ({
|
|
13
|
+
methods: {
|
|
14
|
+
listener(key) {
|
|
15
|
+
alert('Handler for item ' + key);
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
template: `<farm-btn-multipleimport
|
|
19
|
+
:optionsList="[{ listenerKey: 1, title: 'XLS teste'}, { listenerKey: 2, title: 'CSV teste novo'}]"
|
|
20
|
+
@onClick="listener"
|
|
21
|
+
/>`,
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
export const CustomColor = () => ({
|
|
25
|
+
methods: {
|
|
26
|
+
listener(key) {
|
|
27
|
+
alert('Handler for item ' + key);
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
template: `<farm-btn-multipleimport
|
|
31
|
+
color="info"
|
|
32
|
+
:optionsList="[{ listenerKey: 1, title: 'XLS teste'}, { listenerKey: 2, title: 'CSV teste novo'}]"
|
|
33
|
+
@onClick="listener"
|
|
34
|
+
/>`,
|
|
35
|
+
});
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<farm-contextmenu v-model="value" :bottom="true">
|
|
3
|
+
<template v-slot:activator="{}">
|
|
4
|
+
<farm-btn outlined title="Importar" v-bind="$attrs">
|
|
5
|
+
Importar
|
|
6
|
+
<farm-icon class="ml-2"> chevron-{{ value ? 'up' : 'down' }} </farm-icon>
|
|
7
|
+
</farm-btn>
|
|
8
|
+
</template>
|
|
9
|
+
<farm-list>
|
|
10
|
+
<farm-listitem
|
|
11
|
+
v-for="item in optionsList"
|
|
12
|
+
clickable
|
|
13
|
+
:hoverColor="$attrs.color || 'primary'"
|
|
14
|
+
hoverColorVariation="lighten"
|
|
15
|
+
:key="'importbutton_key_' + item.title"
|
|
16
|
+
:title="item.title"
|
|
17
|
+
@click="onClick(item.listenerKey)"
|
|
18
|
+
>
|
|
19
|
+
<farm-caption bold tag="span">{{ item.title }}</farm-caption>
|
|
20
|
+
</farm-listitem>
|
|
21
|
+
</farm-list>
|
|
22
|
+
</farm-contextmenu>
|
|
23
|
+
</template>
|
|
24
|
+
<script lang="ts">
|
|
25
|
+
import { PropType } from 'vue';
|
|
26
|
+
|
|
27
|
+
export interface IImportOption {
|
|
28
|
+
title: String;
|
|
29
|
+
listenerKey: String;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export default {
|
|
33
|
+
name: 'farm-btn-multipleimport',
|
|
34
|
+
props: {
|
|
35
|
+
/**
|
|
36
|
+
* Options list
|
|
37
|
+
*/
|
|
38
|
+
optionsList: {
|
|
39
|
+
type: Array as PropType<Array<IImportOption>>,
|
|
40
|
+
default: () => [],
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
data() {
|
|
44
|
+
return {
|
|
45
|
+
value: false,
|
|
46
|
+
};
|
|
47
|
+
},
|
|
48
|
+
methods: {
|
|
49
|
+
onClick(key) {
|
|
50
|
+
this.$emit('onClick', key);
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
</script>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
import MultiImportButton from '../MultiImportButton';
|
|
3
|
+
|
|
4
|
+
describe('MultiImportButton component', () => {
|
|
5
|
+
let wrapper;
|
|
6
|
+
|
|
7
|
+
beforeEach(() => {
|
|
8
|
+
wrapper = shallowMount(MultiImportButton);
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
test('Created hook', () => {
|
|
12
|
+
expect(wrapper).toBeDefined();
|
|
13
|
+
});
|
|
14
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import RemoveButton from './RemoveButton.vue';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Buttons/Remove',
|
|
5
|
+
component: RemoveButton,
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export const Primary = () => ({
|
|
9
|
+
template: '<farm-btn-remove />',
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
export const Secondary = () => ({
|
|
13
|
+
template: '<farm-btn-remove label="Custom label" />',
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
Primary.storyName = 'Básico';
|
|
17
|
+
Secondary.storyName = 'Custom label';
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<farm-btn
|
|
3
|
+
dense
|
|
4
|
+
class="farm-btn--responsive"
|
|
5
|
+
color="error"
|
|
6
|
+
:title="label"
|
|
7
|
+
:disabled="disabled"
|
|
8
|
+
@click="onClick"
|
|
9
|
+
>
|
|
10
|
+
<farm-icon>trash-can-outline</farm-icon>
|
|
11
|
+
{{ label }}
|
|
12
|
+
</farm-btn>
|
|
13
|
+
</template>
|
|
14
|
+
<script lang="ts">
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
export default {
|
|
18
|
+
name: 'farm-btn-remove',
|
|
19
|
+
props: {
|
|
20
|
+
/**
|
|
21
|
+
* Label do botão
|
|
22
|
+
*/
|
|
23
|
+
label: {
|
|
24
|
+
type: String,
|
|
25
|
+
default: 'Remover',
|
|
26
|
+
},
|
|
27
|
+
/**
|
|
28
|
+
* Desabilita o botão
|
|
29
|
+
*/
|
|
30
|
+
disabled: {
|
|
31
|
+
type: Boolean,
|
|
32
|
+
default: false,
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
methods: {
|
|
36
|
+
onClick() {
|
|
37
|
+
this.$emit('onClick');
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
</script>
|
|
42
|
+
<style scoped lang="scss">
|
|
43
|
+
@import './RemoveButton';
|
|
44
|
+
</style>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
import RemoveButton from '../RemoveButton';
|
|
3
|
+
|
|
4
|
+
describe('RemoveButton component', () => {
|
|
5
|
+
let wrapper;
|
|
6
|
+
let component;
|
|
7
|
+
|
|
8
|
+
beforeEach(() => {
|
|
9
|
+
wrapper = shallowMount(RemoveButton);
|
|
10
|
+
component = wrapper.vm;
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
test('Created hook', () => {
|
|
14
|
+
expect(wrapper).toBeDefined();
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
describe('Methods', () => {
|
|
18
|
+
it('Should emit event', () => {
|
|
19
|
+
component.onClick();
|
|
20
|
+
expect(wrapper.emitted().onClick).toBeDefined();
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import ToggleButton from './ToggleButton.vue';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Buttons/ToggleButton',
|
|
5
|
+
component: ToggleButton,
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export const Primary = () => ({
|
|
9
|
+
template: '<farm-btn-toggle label="Botão" />',
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
export const PositionRight = () => ({
|
|
13
|
+
template: '<farm-btn-toggle label="Botão" position="right" />',
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
export const Opened = () => ({
|
|
17
|
+
template: '<farm-btn-toggle label="Botão" :pressed="true" />',
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
export const CustomColor = () => ({
|
|
21
|
+
template: '<farm-btn-toggle color="info" label="Botão" />',
|
|
22
|
+
});
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<farm-btn
|
|
3
|
+
@click="onClick"
|
|
4
|
+
v-bind="$attrs"
|
|
5
|
+
class="farm-btn--responsive"
|
|
6
|
+
:class="{
|
|
7
|
+
'v-btn_icon--prepend': prepend,
|
|
8
|
+
'v-btn_icon--apppend': !prepend,
|
|
9
|
+
}"
|
|
10
|
+
:outlined="!open"
|
|
11
|
+
:title="label"
|
|
12
|
+
>
|
|
13
|
+
<farm-icon v-if="prepend" class="mr-3 ml-0">{{
|
|
14
|
+
`chevron-${open ? 'up' : 'down'}`
|
|
15
|
+
}}</farm-icon>
|
|
16
|
+
{{ label }}
|
|
17
|
+
<farm-icon v-if="!prepend" class="ml-3 mr-0">{{
|
|
18
|
+
`chevron-${open ? 'up' : 'down'}`
|
|
19
|
+
}}</farm-icon>
|
|
20
|
+
</farm-btn>
|
|
21
|
+
</template>
|
|
22
|
+
<script lang="ts">
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Botão de Toggle, emitindo e guardando status
|
|
27
|
+
*/
|
|
28
|
+
export default {
|
|
29
|
+
name: 'farm-btn-toggle',
|
|
30
|
+
data: () => ({
|
|
31
|
+
open: false,
|
|
32
|
+
}),
|
|
33
|
+
props: {
|
|
34
|
+
/**
|
|
35
|
+
* Label do botão
|
|
36
|
+
*/
|
|
37
|
+
label: {
|
|
38
|
+
type: String,
|
|
39
|
+
default: '',
|
|
40
|
+
},
|
|
41
|
+
/**
|
|
42
|
+
* Pressionado ou não
|
|
43
|
+
*/
|
|
44
|
+
pressed: {
|
|
45
|
+
type: Boolean,
|
|
46
|
+
default: false,
|
|
47
|
+
},
|
|
48
|
+
/**
|
|
49
|
+
* Posição do ícone
|
|
50
|
+
*/
|
|
51
|
+
position: {
|
|
52
|
+
type: String,
|
|
53
|
+
default: 'left',
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
methods: {
|
|
57
|
+
onClick() {
|
|
58
|
+
this.open = !this.open;
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
watch: {
|
|
62
|
+
open(value) {
|
|
63
|
+
this.$emit('onChange', value);
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
created() {
|
|
67
|
+
this.open = this.pressed;
|
|
68
|
+
},
|
|
69
|
+
computed: {
|
|
70
|
+
prepend() {
|
|
71
|
+
return this.position === 'left';
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
};
|
|
75
|
+
</script>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
import ToggleButton from '../ToggleButton';
|
|
3
|
+
|
|
4
|
+
describe('ToggleButton component', () => {
|
|
5
|
+
let wrapper;
|
|
6
|
+
|
|
7
|
+
beforeEach(() => {
|
|
8
|
+
wrapper = shallowMount(ToggleButton);
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
test('Created hook', () => {
|
|
12
|
+
expect(wrapper).toBeDefined();
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
describe('Methods', () => {
|
|
16
|
+
it('Should handle click', () => {
|
|
17
|
+
wrapper.vm.onClick();
|
|
18
|
+
expect(wrapper.vm.open).toBeTruthy();
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
@import '../../configurations/mixins';
|
|
2
|
+
|
|
3
|
+
.farm-card {
|
|
4
|
+
width: 100%;
|
|
5
|
+
background: #ffffff;
|
|
6
|
+
border: 1px solid var(--farm-gray-lighten);
|
|
7
|
+
border-radius: 5px;
|
|
8
|
+
overflow: hidden;
|
|
9
|
+
|
|
10
|
+
&[shadow] {
|
|
11
|
+
@include addShadow;
|
|
12
|
+
border: none;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
&p {
|
|
16
|
+
margin: 0;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import Card from './Card.vue';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Surfaces/Card',
|
|
5
|
+
component: Card,
|
|
6
|
+
parameters: {
|
|
7
|
+
docs: {
|
|
8
|
+
description: {
|
|
9
|
+
component: `Card<br />
|
|
10
|
+
selector: <em>farm-card</em><br />
|
|
11
|
+
<span style="color: var(--farm-primary-base);">ready for use</span>
|
|
12
|
+
`,
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
viewMode: 'docs',
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export const Primary = () => ({
|
|
20
|
+
template: `
|
|
21
|
+
<farm-card>
|
|
22
|
+
Card content
|
|
23
|
+
</farm-card>
|
|
24
|
+
`,
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export const Events = () => ({
|
|
28
|
+
methods: {
|
|
29
|
+
handleEvent(type) {
|
|
30
|
+
alert(type);
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
template: `
|
|
34
|
+
<farm-card
|
|
35
|
+
@click.stop="handleEvent('click')"
|
|
36
|
+
>
|
|
37
|
+
Card content
|
|
38
|
+
</farm-card>
|
|
39
|
+
`,
|
|
40
|
+
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<component class="farm-card" :is="tag" >
|
|
3
|
+
<slot></slot>
|
|
4
|
+
</component>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script lang="ts">
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
export default {
|
|
11
|
+
name: 'farm-card',
|
|
12
|
+
inheritAttrs: true,
|
|
13
|
+
props: {
|
|
14
|
+
/**
|
|
15
|
+
* Html tag
|
|
16
|
+
*/
|
|
17
|
+
tag: { type: String, default: 'div' },
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<style lang="scss" scoped>
|
|
23
|
+
@import './Card';
|
|
24
|
+
</style>
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
// import { withDesign } from 'storybook-addon-designs';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Surfaces/Card/Molecules',
|
|
5
|
+
// decorators: [withDesign],
|
|
6
|
+
parameters: {
|
|
7
|
+
viewMode: 'docs',
|
|
8
|
+
docs: {
|
|
9
|
+
description: {
|
|
10
|
+
component: `Card and Card Content composition`,
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const MultipleContents = () => ({
|
|
17
|
+
template: `<div style="width: 480px;">
|
|
18
|
+
<farm-card>
|
|
19
|
+
<farm-card-content>
|
|
20
|
+
Content 1!
|
|
21
|
+
</farm-card-content>
|
|
22
|
+
<farm-card-content>
|
|
23
|
+
Content 2!
|
|
24
|
+
</farm-card-content>
|
|
25
|
+
<farm-card-content>
|
|
26
|
+
Content 3!
|
|
27
|
+
</farm-card-content>
|
|
28
|
+
</farm-card>
|
|
29
|
+
</div>`,
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
export const Gutters = () => ({
|
|
33
|
+
data() {
|
|
34
|
+
return { gutters: ['none', 'xs', 'sm', 'vuetify', 'md', 'lg', 'xl'] };
|
|
35
|
+
},
|
|
36
|
+
template: `<div style="width: 480px;">
|
|
37
|
+
<farm-card v-for="gutter in gutters" :key="gutter" style="margin-bottom: 16px">
|
|
38
|
+
<farm-card-content :gutter="gutter">
|
|
39
|
+
Content with {{ gutter }} gutter
|
|
40
|
+
</farm-card-content>
|
|
41
|
+
</farm-card>
|
|
42
|
+
</div>`,
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
export const Shadow = () => ({
|
|
46
|
+
template: `<div style="width: 480px;">
|
|
47
|
+
<farm-card shadow>
|
|
48
|
+
<farm-card-content>
|
|
49
|
+
Content!
|
|
50
|
+
</farm-card-content>
|
|
51
|
+
</farm-card>
|
|
52
|
+
</div>`,
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
export const BackgroundChildren = () => ({
|
|
56
|
+
template: `<div style="width: 480px;">
|
|
57
|
+
<farm-card>
|
|
58
|
+
<farm-card-content background="lighten">
|
|
59
|
+
Lighten bg
|
|
60
|
+
</farm-card-content>
|
|
61
|
+
<farm-card-content>
|
|
62
|
+
No bg
|
|
63
|
+
</farm-card-content>
|
|
64
|
+
<farm-card-content background="base">
|
|
65
|
+
Base bg
|
|
66
|
+
</farm-card-content>
|
|
67
|
+
</farm-card>
|
|
68
|
+
</div>`,
|
|
69
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
@import '../../../configurations/variables';
|
|
2
|
+
@import '../../../configurations/functions';
|
|
3
|
+
@import '../../../configurations/_theme-colors';
|
|
4
|
+
|
|
5
|
+
.farm-card__content {
|
|
6
|
+
@each $k in map-keys($gutters) {
|
|
7
|
+
&#{'[gutter=' + $k + ']'} {
|
|
8
|
+
padding: map-get($gutters, $k);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@each $k in map-keys($background-colors) {
|
|
14
|
+
#{'.farm-card__content--' + $k} {
|
|
15
|
+
background-color: map-get($background-colors, $k);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import CardContent from './CardContent.vue';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Surfaces/Card/CardContent',
|
|
5
|
+
component: CardContent,
|
|
6
|
+
parameters: {
|
|
7
|
+
docs: {
|
|
8
|
+
description: {
|
|
9
|
+
component: `Card Content<br />
|
|
10
|
+
selector: <em>farm-card-content</em><br />
|
|
11
|
+
<span style="color: var(--farm-primary-base);">ready for use</span>
|
|
12
|
+
`,
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
viewMode: 'docs',
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export const Primary = () => ({
|
|
20
|
+
template: `
|
|
21
|
+
<farm-card-content>
|
|
22
|
+
Conteúdo do Card Content
|
|
23
|
+
</farm-card-content>
|
|
24
|
+
`,
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export const Gutters = () => ({
|
|
28
|
+
data() {
|
|
29
|
+
return { gutters: ['none', 'xs', 'sm', 'vuetify', 'md', 'lg', 'xl'] };
|
|
30
|
+
},
|
|
31
|
+
template: `<div style="width: 480px;">
|
|
32
|
+
<farm-card-content v-for="gutter in gutters" :key="gutter" style="margin-bottom: 16px" :gutter="gutter">
|
|
33
|
+
Content with {{ gutter }} gutter
|
|
34
|
+
</farm-card-content>
|
|
35
|
+
</div>`,
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
export const Background = () => ({
|
|
39
|
+
data() {
|
|
40
|
+
return { bgs: ['base', 'lighten', 'white'] };
|
|
41
|
+
},
|
|
42
|
+
template: `<div style="width: 480px;">
|
|
43
|
+
<farm-card-content v-for="bg in bgs" :key="bg" style="margin-bottom: 16px" :background="bg">
|
|
44
|
+
Content with {{ bg }} background
|
|
45
|
+
</farm-card-content>
|
|
46
|
+
</div>`,
|
|
47
|
+
});
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<component
|
|
3
|
+
:is="tag"
|
|
4
|
+
:class="{ 'farm-card__content': true, ['farm-card__content--' + background]: background }"
|
|
5
|
+
:gutter="gutter"
|
|
6
|
+
>
|
|
7
|
+
<slot></slot>
|
|
8
|
+
</component>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script lang="ts">
|
|
12
|
+
import { PropType } from 'vue';
|
|
13
|
+
|
|
14
|
+
export default {
|
|
15
|
+
name: 'farm-card-content',
|
|
16
|
+
props: {
|
|
17
|
+
/**
|
|
18
|
+
* Html tag
|
|
19
|
+
*/
|
|
20
|
+
tag: { type: String, default: 'div' },
|
|
21
|
+
/**
|
|
22
|
+
* Add gutter
|
|
23
|
+
*/
|
|
24
|
+
gutter: {
|
|
25
|
+
type: String as PropType<'none' | 'xs' | 'sm' | 'vuetify' | 'md' | 'lg' | 'xl'>,
|
|
26
|
+
default: 'md',
|
|
27
|
+
},
|
|
28
|
+
background: {
|
|
29
|
+
type: String as PropType<'base' | 'lighten' | 'darken'> | null,
|
|
30
|
+
default: null,
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
inheritAttrs: true,
|
|
34
|
+
};
|
|
35
|
+
</script>
|
|
36
|
+
|
|
37
|
+
<style lang="scss" scoped>
|
|
38
|
+
@import './CardContent';
|
|
39
|
+
</style>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
import CardContent from '../CardContent';
|
|
3
|
+
|
|
4
|
+
describe('CardContent component', () => {
|
|
5
|
+
let wrapper;
|
|
6
|
+
|
|
7
|
+
beforeEach(() => {
|
|
8
|
+
wrapper = shallowMount(CardContent);
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
test('Created hook', () => {
|
|
12
|
+
expect(wrapper).toBeDefined();
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
describe('mount component', () => {
|
|
16
|
+
it('renders correctly', () => {
|
|
17
|
+
expect(wrapper.element).toMatchSnapshot();
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
import Card from '../Card';
|
|
3
|
+
|
|
4
|
+
describe('Card component', () => {
|
|
5
|
+
let wrapper;
|
|
6
|
+
|
|
7
|
+
beforeEach(() => {
|
|
8
|
+
wrapper = shallowMount(Card);
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
test('Created hook', () => {
|
|
12
|
+
expect(wrapper).toBeDefined();
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
describe('mount component', () => {
|
|
16
|
+
it('renders correctly', () => {
|
|
17
|
+
expect(wrapper.element).toMatchSnapshot();
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
});
|