@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,200 @@
|
|
|
1
|
+
// import { withDesign } from 'storybook-addon-designs';
|
|
2
|
+
import { VDataTable } from 'vuetify/labs/components';
|
|
3
|
+
|
|
4
|
+
const headers = [
|
|
5
|
+
{
|
|
6
|
+
title: 'ID',
|
|
7
|
+
sortable: true,
|
|
8
|
+
value: 'id',
|
|
9
|
+
width: 80,
|
|
10
|
+
align: 'left',
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
title: 'Name',
|
|
14
|
+
sortable: false,
|
|
15
|
+
value: 'id',
|
|
16
|
+
width: 160,
|
|
17
|
+
align: 'left',
|
|
18
|
+
},
|
|
19
|
+
];
|
|
20
|
+
|
|
21
|
+
export default {
|
|
22
|
+
title: 'Display/Table/Examples',
|
|
23
|
+
// decorators: [withDesign],
|
|
24
|
+
parameters: {
|
|
25
|
+
design: {
|
|
26
|
+
type: 'figma',
|
|
27
|
+
url: 'https://www.figma.com/file/1f84J4m1IBghWhozQvdyyt/%E2%9C%8D---Design-System?node-id=1505%3A372',
|
|
28
|
+
},
|
|
29
|
+
viewMode: 'docs',
|
|
30
|
+
docs: {
|
|
31
|
+
description: {
|
|
32
|
+
component: `Data Table (inherit from Vuetify)`,
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export const TableNoData = () => ({
|
|
39
|
+
components: { 'v-data-table': VDataTable },
|
|
40
|
+
data() {
|
|
41
|
+
return {
|
|
42
|
+
headers,
|
|
43
|
+
};
|
|
44
|
+
},
|
|
45
|
+
template: `
|
|
46
|
+
<v-data-table
|
|
47
|
+
id="v-data-table--default"
|
|
48
|
+
:headers="headers"
|
|
49
|
+
>
|
|
50
|
+
<template v-slot:no-data>
|
|
51
|
+
<farm-emptywrapper
|
|
52
|
+
subtitle="Tente filtrar novamente sua pesquisa"
|
|
53
|
+
/>
|
|
54
|
+
</template>
|
|
55
|
+
<template #bottom></template>
|
|
56
|
+
</v-data-table>`,
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
export const TableSampleData = () => ({
|
|
60
|
+
components: { 'v-data-table': VDataTable },
|
|
61
|
+
data() {
|
|
62
|
+
return {
|
|
63
|
+
headers,
|
|
64
|
+
items: [
|
|
65
|
+
{ id: 1, name: 'name 1' },
|
|
66
|
+
{ id: 2, name: 'name 2' },
|
|
67
|
+
{ id: 3, name: 'name 3' },
|
|
68
|
+
],
|
|
69
|
+
};
|
|
70
|
+
},
|
|
71
|
+
template: `<div>
|
|
72
|
+
<v-data-table
|
|
73
|
+
id="v-data-table--default"
|
|
74
|
+
:headers="headers"
|
|
75
|
+
:items="items"
|
|
76
|
+
>
|
|
77
|
+
<template #bottom></template>
|
|
78
|
+
</v-data-table>
|
|
79
|
+
</div>`,
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
export const TableSampleDataWithCheckbox = () => ({
|
|
83
|
+
components: { 'v-data-table': VDataTable },
|
|
84
|
+
data() {
|
|
85
|
+
return {
|
|
86
|
+
headers,
|
|
87
|
+
items: [
|
|
88
|
+
{ id: 1, name: 'name 1' },
|
|
89
|
+
{ id: 2, name: 'name 2' },
|
|
90
|
+
{ id: 3, name: 'name 3' },
|
|
91
|
+
],
|
|
92
|
+
selectedItems: [],
|
|
93
|
+
};
|
|
94
|
+
},
|
|
95
|
+
template: `<div>{{ selectedItems }}
|
|
96
|
+
<v-data-table
|
|
97
|
+
id="v-data-table--default"
|
|
98
|
+
:headers="headers"
|
|
99
|
+
:items="items"
|
|
100
|
+
show-select
|
|
101
|
+
v-model="selectedItems"
|
|
102
|
+
>
|
|
103
|
+
<template #bottom></template>
|
|
104
|
+
</v-data-table>
|
|
105
|
+
</div>`,
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
export const TableSampleLocalPagination = () => ({
|
|
109
|
+
components: { 'v-data-table': VDataTable },
|
|
110
|
+
data() {
|
|
111
|
+
return {
|
|
112
|
+
headers,
|
|
113
|
+
items: [
|
|
114
|
+
{ id: 1, name: 'name 1' },
|
|
115
|
+
{ id: 2, name: 'name 2' },
|
|
116
|
+
{ id: 3, name: 'name 3' },
|
|
117
|
+
{ id: 4, name: 'name 4' },
|
|
118
|
+
{ id: 5, name: 'name 5' },
|
|
119
|
+
{ id: 6, name: 'name 6' },
|
|
120
|
+
{ id: 7, name: 'name 7' },
|
|
121
|
+
{ id: 8, name: 'name 8' },
|
|
122
|
+
{ id: 9, name: 'name 9' },
|
|
123
|
+
{ id: 10, name: 'name 10' },
|
|
124
|
+
{ id: 11, name: 'name 11' },
|
|
125
|
+
{ id: 12, name: 'name 12' },
|
|
126
|
+
],
|
|
127
|
+
pagination: {
|
|
128
|
+
page: 1,
|
|
129
|
+
itemsPerPage: 5,
|
|
130
|
+
pages: 3,
|
|
131
|
+
},
|
|
132
|
+
};
|
|
133
|
+
},
|
|
134
|
+
methods: {
|
|
135
|
+
onChangePage(newPage) {
|
|
136
|
+
this.pagination.page = newPage;
|
|
137
|
+
},
|
|
138
|
+
},
|
|
139
|
+
template: `
|
|
140
|
+
<v-data-table
|
|
141
|
+
id="v-data-table--default"
|
|
142
|
+
:items-per-page="pagination.itemsPerPage"
|
|
143
|
+
:headers="headers"
|
|
144
|
+
:items="items"
|
|
145
|
+
:items-length="items.length"
|
|
146
|
+
:page="pagination.page"
|
|
147
|
+
>
|
|
148
|
+
<template v-slot:bottom>
|
|
149
|
+
<farm-datatable-paginator
|
|
150
|
+
class="my-6"
|
|
151
|
+
hidePerPageOptions
|
|
152
|
+
:initialLimitPerPage="pagination.itemsPerPage"
|
|
153
|
+
:page="pagination.page"
|
|
154
|
+
:totalPages="pagination.pages"
|
|
155
|
+
@onChangePage="onChangePage"
|
|
156
|
+
/>
|
|
157
|
+
</template>
|
|
158
|
+
</v-data-table>`,
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
export const TableSampleDataWithFarmCheckbox = () => ({
|
|
162
|
+
components: { 'v-data-table': VDataTable },
|
|
163
|
+
data() {
|
|
164
|
+
return {
|
|
165
|
+
headers,
|
|
166
|
+
items: [
|
|
167
|
+
{ id: 1, name: 'name 1' },
|
|
168
|
+
{ id: 2, name: 'name 2' },
|
|
169
|
+
{ id: 3, name: 'name 3' },
|
|
170
|
+
],
|
|
171
|
+
selectedItems: [],
|
|
172
|
+
};
|
|
173
|
+
},
|
|
174
|
+
methods: {
|
|
175
|
+
onSelect({ item }) {
|
|
176
|
+
if (item.id === 2)
|
|
177
|
+
this.selectedItems = [...this.selectedItems].filter(
|
|
178
|
+
innerItem => innerItem.id !== 2
|
|
179
|
+
);
|
|
180
|
+
},
|
|
181
|
+
isItemSelected(item) {
|
|
182
|
+
return this.selectedItems.some(innerItem => innerItem.id === item.id);
|
|
183
|
+
},
|
|
184
|
+
},
|
|
185
|
+
template: `<div>{{selectedItems}}
|
|
186
|
+
<v-data-table
|
|
187
|
+
hide-default-footer
|
|
188
|
+
id="v-data-table--default"
|
|
189
|
+
v-model="selectedItems"
|
|
190
|
+
show-select
|
|
191
|
+
:headers="headers"
|
|
192
|
+
:items="items"
|
|
193
|
+
@item-selected="onSelect"
|
|
194
|
+
>
|
|
195
|
+
<template v-slot:item.data-table-select="{ isSelected, select, item }">
|
|
196
|
+
<farm-checkbox :value="item.id" :checked="isItemSelected(item)" @input="select($event)"/>
|
|
197
|
+
</template>
|
|
198
|
+
</v-data-table>
|
|
199
|
+
</div>`,
|
|
200
|
+
});
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
// import { withDesign } from 'storybook-addon-designs';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Display/Dialog/Vuejs-dialog',
|
|
5
|
+
// decorators: [withDesign],
|
|
6
|
+
parameters: {
|
|
7
|
+
viewMode: 'docs',
|
|
8
|
+
docs: {
|
|
9
|
+
description: {
|
|
10
|
+
component: `Dialog created by vuejs-dialog`,
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const Primary = () => ({
|
|
17
|
+
methods: {
|
|
18
|
+
openDialog() {
|
|
19
|
+
this.$dialog
|
|
20
|
+
.confirm(
|
|
21
|
+
{
|
|
22
|
+
title: 'Dialog title',
|
|
23
|
+
body: 'Dialog content',
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
html: true,
|
|
27
|
+
okText: 'OK',
|
|
28
|
+
cancelText: 'Cancel',
|
|
29
|
+
}
|
|
30
|
+
)
|
|
31
|
+
.then(() => {
|
|
32
|
+
alert('OK Clicked');
|
|
33
|
+
})
|
|
34
|
+
.catch(() => {
|
|
35
|
+
alert('Cancel clicked');
|
|
36
|
+
});
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
template: `<div style="display: flex; flex-direction: column; max-width: 160px; width: 100%;">
|
|
40
|
+
<farm-btn @click="openDialog">
|
|
41
|
+
Open
|
|
42
|
+
</farm-btn>
|
|
43
|
+
</div>`,
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
export const ErrorColor = () => ({
|
|
47
|
+
methods: {
|
|
48
|
+
openDialog() {
|
|
49
|
+
this.$dialog
|
|
50
|
+
.alert(
|
|
51
|
+
{
|
|
52
|
+
title: 'Dialog title - Error',
|
|
53
|
+
body: 'Dialog content with error layout',
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
html: true,
|
|
57
|
+
okText: 'OK',
|
|
58
|
+
customClass: 'dg-parent-error',
|
|
59
|
+
}
|
|
60
|
+
)
|
|
61
|
+
.then(() => {
|
|
62
|
+
alert('OK Clicked');
|
|
63
|
+
})
|
|
64
|
+
.catch(() => {});
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
template: `<div style="display: flex; flex-direction: column; max-width: 160px; width: 100%;">
|
|
68
|
+
<farm-btn @click="openDialog">
|
|
69
|
+
Open
|
|
70
|
+
</farm-btn>
|
|
71
|
+
</div>`,
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
export const NoFooter = () => ({
|
|
75
|
+
methods: {
|
|
76
|
+
openDialog() {
|
|
77
|
+
this.$dialog
|
|
78
|
+
.confirm(
|
|
79
|
+
{
|
|
80
|
+
title: 'Dialog title - No footer',
|
|
81
|
+
body: 'Dialog content for notifications without footer (must be closed programmatically)',
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
html: true,
|
|
85
|
+
okText: '',
|
|
86
|
+
customClass: 'dg-parent-nofooter',
|
|
87
|
+
}
|
|
88
|
+
)
|
|
89
|
+
.then(() => {})
|
|
90
|
+
.catch(() => {});
|
|
91
|
+
|
|
92
|
+
setTimeout(() => {
|
|
93
|
+
this.$dialog.destroy();
|
|
94
|
+
}, 2000);
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
template: `<div style="display: flex; flex-direction: column; max-width: 160px; width: 100%;">
|
|
98
|
+
<farm-btn @click="openDialog">
|
|
99
|
+
Open
|
|
100
|
+
</farm-btn>
|
|
101
|
+
</div>`,
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
export const CustomHtml = () => ({
|
|
105
|
+
methods: {
|
|
106
|
+
openDialog() {
|
|
107
|
+
this.$dialog
|
|
108
|
+
.alert(
|
|
109
|
+
{
|
|
110
|
+
title: 'Dialog title',
|
|
111
|
+
body: `This is a text with <strong>html markup</strong> and<br />break line!<br />
|
|
112
|
+
Also with an <i class="mdi mdi-book"></i>book icon<br />
|
|
113
|
+
and some <span style="color: var(--farm-warning-base)">color</span>`,
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
html: true,
|
|
117
|
+
okText: 'Button with icon <i class="mdi mdi-book"></i>',
|
|
118
|
+
}
|
|
119
|
+
)
|
|
120
|
+
.then(() => {})
|
|
121
|
+
.catch(() => {});
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
template: `<div style="display: flex; flex-direction: column; max-width: 160px; width: 100%;">
|
|
125
|
+
<farm-btn @click="openDialog">
|
|
126
|
+
Open
|
|
127
|
+
</farm-btn>
|
|
128
|
+
</div>`,
|
|
129
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export default () => {
|
|
2
|
+
const all_z = [];
|
|
3
|
+
document.querySelectorAll('*').forEach(function (elem) {
|
|
4
|
+
all_z.push(elem.style.zIndex);
|
|
5
|
+
});
|
|
6
|
+
const zIndex = Math.max.apply(
|
|
7
|
+
null,
|
|
8
|
+
all_z.map(x => Number(x))
|
|
9
|
+
);
|
|
10
|
+
|
|
11
|
+
return zIndex > 5 ? zIndex : 5;
|
|
12
|
+
};
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
export const defaultFormat = (data, UTCTimeZone = true) => {
|
|
2
|
+
const options = {
|
|
3
|
+
timeZone: 'UTC',
|
|
4
|
+
};
|
|
5
|
+
return data ? new Date(data).toLocaleDateString('pt-BR', UTCTimeZone ? options : {}) : null;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export const convertDate = (data) => {
|
|
9
|
+
if(!data) {
|
|
10
|
+
return '';
|
|
11
|
+
}
|
|
12
|
+
const newdate = data.split("/").reverse().join("-");
|
|
13
|
+
return newdate;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const revertDate = (data: string): string => {
|
|
17
|
+
if(!data) {
|
|
18
|
+
return '';
|
|
19
|
+
}
|
|
20
|
+
const newdate = data.split("-").reverse().join("/");
|
|
21
|
+
return newdate;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
const checkLength = (value, length) => {
|
|
26
|
+
return parseInt(value.length, 10) === length;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
const dateFormatting = (date) => {
|
|
30
|
+
if(date.includes('/')){
|
|
31
|
+
const dateSplit = date.split('/');
|
|
32
|
+
return {
|
|
33
|
+
day: dateSplit[0],
|
|
34
|
+
month: dateSplit[1],
|
|
35
|
+
year: dateSplit[2]
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
const dateSplit = date.split('-');
|
|
39
|
+
return {
|
|
40
|
+
day: dateSplit[2],
|
|
41
|
+
month: dateSplit[1],
|
|
42
|
+
year: dateSplit[0]
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
const checkLeapYear = (year) => {
|
|
47
|
+
if (parseInt(year, 10) % 400 === 0){
|
|
48
|
+
return true;
|
|
49
|
+
}
|
|
50
|
+
if(parseInt(year, 10) % 4 === 0 && parseInt(year, 10) % 100 !== 0) {
|
|
51
|
+
return true;
|
|
52
|
+
}else{
|
|
53
|
+
return false;
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
const getTotalDays = (month, isLeapYear) => {
|
|
58
|
+
const numberMonth = parseInt(month, 10);
|
|
59
|
+
if(numberMonth === 2) {
|
|
60
|
+
return isLeapYear ? 29 : 28;
|
|
61
|
+
}
|
|
62
|
+
const monthsWith31Days = [1, 3, 5, 7, 8, 10, 12];
|
|
63
|
+
return monthsWith31Days.includes(numberMonth) ? 31 : 30;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
const checkDay = (day, totalDays) => {
|
|
67
|
+
if(parseInt(day, 10) > 0 && parseInt(day, 10) <= totalDays) {
|
|
68
|
+
return true;
|
|
69
|
+
}
|
|
70
|
+
return false;
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
const checkMonth = (month) => {
|
|
74
|
+
if(parseInt(month, 10) > 0 && parseInt(month, 10) <= 12) {
|
|
75
|
+
return true;
|
|
76
|
+
}
|
|
77
|
+
return false;
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
export const checkDateValid = (date) => {
|
|
81
|
+
if(!checkLength(date, 10)){
|
|
82
|
+
return false;
|
|
83
|
+
}
|
|
84
|
+
const {day, month, year} = dateFormatting(date);
|
|
85
|
+
if(!checkMonth(month)){
|
|
86
|
+
return false;
|
|
87
|
+
}
|
|
88
|
+
const isLeapYear = checkLeapYear(year);
|
|
89
|
+
const totalDays = getTotalDays(month, isLeapYear);
|
|
90
|
+
if(!checkDay(day, totalDays)){
|
|
91
|
+
return false;
|
|
92
|
+
}
|
|
93
|
+
return true;
|
|
94
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const monthNumberToMonthName = {
|
|
2
|
+
'01': 'Janeiro',
|
|
3
|
+
'02': 'Fevereiro',
|
|
4
|
+
'03': 'Março',
|
|
5
|
+
'04': 'Abril',
|
|
6
|
+
'05': 'Maio',
|
|
7
|
+
'06': 'Junho',
|
|
8
|
+
'07': 'Julho',
|
|
9
|
+
'08': 'Agosto',
|
|
10
|
+
'09': 'Setembro',
|
|
11
|
+
'10': 'Outubro',
|
|
12
|
+
'11': 'Novembro',
|
|
13
|
+
'12': 'Dezembro',
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export function formatDatePickerHeader(date: string): string {
|
|
17
|
+
const [year, month] = date.split('-');
|
|
18
|
+
return `${month ? monthNumberToMonthName[month] + ' ' : ''}${year}`;
|
|
19
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
function isChildOfFixedElement(element) {
|
|
2
|
+
const parent = element.parentNode;
|
|
3
|
+
|
|
4
|
+
if (!parent || !(parent instanceof Element)) {
|
|
5
|
+
return false;
|
|
6
|
+
}
|
|
7
|
+
const style = window.getComputedStyle(parent);
|
|
8
|
+
|
|
9
|
+
if (style.position === 'fixed') {
|
|
10
|
+
return true;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
return isChildOfFixedElement(parent);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export default isChildOfFixedElement;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export default (length: number) => {
|
|
2
|
+
let text = '';
|
|
3
|
+
const possible = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
|
|
4
|
+
|
|
5
|
+
for (let i = 0; i < length; i++) {
|
|
6
|
+
text += possible.charAt(Math.floor(Math.random() * possible.length));
|
|
7
|
+
}
|
|
8
|
+
return text;
|
|
9
|
+
};
|
package/src/main.ts
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
export * from './components/DataTableEmptyWrapper';
|
|
2
|
+
|
|
3
|
+
import DataTablePaginator from './components/DataTablePaginator';
|
|
4
|
+
import DataTableHeader from './components/DataTableHeader';
|
|
5
|
+
import MainFilter from './components/MainFilter';
|
|
6
|
+
import Loader from './components/Loader';
|
|
7
|
+
import MultipleFilePicker from './components/MultipleFilePicker';
|
|
8
|
+
import DialogHeader from './components/DialogHeader';
|
|
9
|
+
import DialogFooter from './components/DialogFooter';
|
|
10
|
+
import RangeDatePicker from './components/RangeDatePicker';
|
|
11
|
+
import DatePicker from './components/DatePicker';
|
|
12
|
+
import ManagersList from './components/ManagersList';
|
|
13
|
+
import PromptUserToConfirm from './components/PromptUserToConfirm';
|
|
14
|
+
import ModalPromptUser from './components/ModalPromptUser';
|
|
15
|
+
|
|
16
|
+
import TableContextMenu from './components/TableContextMenu';
|
|
17
|
+
import IconBox from './components/IconBox';
|
|
18
|
+
|
|
19
|
+
import DefaultButton from './components/Buttons/DefaultButton';
|
|
20
|
+
import Collapsible from './components/Collapsible';
|
|
21
|
+
import IdCaption from './components/IdCaption';
|
|
22
|
+
import ResourceMetaInfo from './components/ResourceMetaInfo';
|
|
23
|
+
|
|
24
|
+
export {
|
|
25
|
+
DataTablePaginator,
|
|
26
|
+
DataTableHeader,
|
|
27
|
+
MainFilter,
|
|
28
|
+
Loader,
|
|
29
|
+
MultipleFilePicker,
|
|
30
|
+
DialogHeader,
|
|
31
|
+
DialogFooter,
|
|
32
|
+
RangeDatePicker,
|
|
33
|
+
DatePicker,
|
|
34
|
+
ManagersList,
|
|
35
|
+
PromptUserToConfirm,
|
|
36
|
+
TableContextMenu,
|
|
37
|
+
ModalPromptUser,
|
|
38
|
+
DefaultButton,
|
|
39
|
+
IconBox,
|
|
40
|
+
Collapsible,
|
|
41
|
+
IdCaption,
|
|
42
|
+
ResourceMetaInfo,
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export * from './components/AlertBox';
|
|
46
|
+
export * from './components/AlertReload';
|
|
47
|
+
export * from './components/ButtonToggle';
|
|
48
|
+
export * from './components/Buttons/DefaultButton';
|
|
49
|
+
export * from './components/Buttons/DangerButton';
|
|
50
|
+
export * from './components/Buttons/ConfirmButton';
|
|
51
|
+
export * from './components/Buttons/ExportButton';
|
|
52
|
+
export * from './components/Buttons/ImportButton';
|
|
53
|
+
export * from './components/Buttons/ToggleButton';
|
|
54
|
+
export * from './components/Buttons/RemoveButton';
|
|
55
|
+
export * from './components/Buttons/MultiImportButton';
|
|
56
|
+
export * from './components/Card';
|
|
57
|
+
export * from './components/Checkbox';
|
|
58
|
+
export * from './components/Chip';
|
|
59
|
+
export * from './components/ContextMenu';
|
|
60
|
+
export * from './components/CopyToClipboard';
|
|
61
|
+
export * from './components/ResetTableRowSelection';
|
|
62
|
+
export * from './components/MultipleSelectShortener';
|
|
63
|
+
export * from './components/SelectModalOptions';
|
|
64
|
+
export * from './components/ChipInviteStatus';
|
|
65
|
+
export * from './components/Form';
|
|
66
|
+
export * from './components/Label';
|
|
67
|
+
export * from './components/List';
|
|
68
|
+
export * from './components/ListItem';
|
|
69
|
+
export * from './components/Logger';
|
|
70
|
+
export * from './components/Logger/LoggerItem';
|
|
71
|
+
export * from './components/Icon';
|
|
72
|
+
export * from './components/Modal';
|
|
73
|
+
export * from './components/ProgressBar';
|
|
74
|
+
export * from './components/Radio';
|
|
75
|
+
export * from './components/RadioGroup';
|
|
76
|
+
export * from './components/Select';
|
|
77
|
+
export * from './components/SelectAutoComplete';
|
|
78
|
+
export * from './components/Stepper';
|
|
79
|
+
export * from './components/Switcher';
|
|
80
|
+
export * from './components/Tabs';
|
|
81
|
+
export * from './components/TextArea';
|
|
82
|
+
export * from './components/TextFieldV2';
|
|
83
|
+
export * from './components/Tooltip';
|
|
84
|
+
export * from './components/Typography';
|
|
85
|
+
export * from './components/ValueCaption';
|
|
86
|
+
export * from './components/layout/Box';
|
|
87
|
+
export * from './components/layout/Col';
|
|
88
|
+
export * from './components/layout/Container';
|
|
89
|
+
export * from './components/layout/ContainerFooter';
|
|
90
|
+
export * from './components/layout/Row';
|
|
91
|
+
export * from './components/layout/Line';
|
|
92
|
+
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
$defaultLefts: 0, 4rem, 4rem;
|
|
2
|
+
|
|
3
|
+
@mixin stickytable($selector, $columns: 1, $lefts: $defaultLefts) {
|
|
4
|
+
#{$selector} {
|
|
5
|
+
tbody {
|
|
6
|
+
font-size: 12px;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
tbody tr:nth-of-type(odd) td {
|
|
10
|
+
background-color: var(--farm-background-base);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
tr td {
|
|
14
|
+
background-color: var(--farm-background-white);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
tr:not(:last-child) td,
|
|
18
|
+
tr th {
|
|
19
|
+
border-bottom: none;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.v-data-table__wrapper {
|
|
23
|
+
border-top: 1px solid var(--farm-gray-lighten);
|
|
24
|
+
border-bottom: 1px solid var(--farm-gray-lighten);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
tr td:first-child,
|
|
28
|
+
th:first-child {
|
|
29
|
+
&:after {
|
|
30
|
+
content: '';
|
|
31
|
+
position: absolute;
|
|
32
|
+
left: 0;
|
|
33
|
+
bottom: -2px;
|
|
34
|
+
width: 100%;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&.v-data-table>.v-data-table__wrapper>table {
|
|
39
|
+
|
|
40
|
+
>tbody>tr>td:first-child,
|
|
41
|
+
>thead>tr>th:first-child {
|
|
42
|
+
padding-left: 24px;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@if $columns >0 {
|
|
47
|
+
@for $i from 1 through $columns {
|
|
48
|
+
|
|
49
|
+
tr td:nth-child(#{$i}),
|
|
50
|
+
th:nth-child(#{$i}) {
|
|
51
|
+
position: sticky;
|
|
52
|
+
z-index: 4;
|
|
53
|
+
background-color: var(--farm-bw-white);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
@for $i from 1 through $columns {
|
|
58
|
+
|
|
59
|
+
tr td:nth-child(#{$i}),
|
|
60
|
+
th:nth-child(#{$i}) {
|
|
61
|
+
left: nth($lefts, $i);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
tr td:first-child,
|
|
67
|
+
tr th:first-child {
|
|
68
|
+
padding-left: 24px;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
th[role='columnheader'] {
|
|
72
|
+
color: var(--farm-secondary-green-darken);
|
|
73
|
+
font-size: 14px;
|
|
74
|
+
font-weight: 700;
|
|
75
|
+
text-transform: uppercase;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
td {
|
|
79
|
+
color: var(--farm-bw-black);
|
|
80
|
+
font-size: 14px;
|
|
81
|
+
font-weight: 400;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
thead {
|
|
85
|
+
height: 51px;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
th[role='columnheader']:has(> .v-data-table__checkbox) {
|
|
89
|
+
max-width: 71px !important;
|
|
90
|
+
padding-left: 24px;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.v-data-table-header__icon {
|
|
94
|
+
color: var(--farm-gray-base) !important;
|
|
95
|
+
font-size: 12px;
|
|
96
|
+
font-weight: 900;
|
|
97
|
+
margin-left: 8px;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.v-data-table__checkbox .mdi {
|
|
101
|
+
margin-left: 0;
|
|
102
|
+
font-size: 22px;
|
|
103
|
+
margin-left: -2px;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.v-input--selection-controls__input {
|
|
107
|
+
width: 20px;
|
|
108
|
+
height: 20px;
|
|
109
|
+
margin-right: 0 !important;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|