@homefile/components-v2 2.25.7 → 2.26.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/locales/en/index.json +2 -1
- package/dist/components/forms/dynamicForm/HiddenField.d.ts +1 -1
- package/dist/components/forms/dynamicForm/HiddenField.js +14 -12
- package/dist/components/homeBoard/AddToHomefile.js +5 -3
- package/dist/components/homeBoard/HomeBoard.js +2 -2
- package/dist/components/inboxTile/InboxForwardBanner.js +1 -1
- package/dist/interfaces/forms/dynamicForm/HiddenField.interface.d.ts +2 -0
- package/dist/mocks/homeboard/documentList.mock.d.ts +6 -0
- package/dist/mocks/homeboard/documentList.mock.js +21 -0
- package/dist/mocks/index.d.ts +1 -0
- package/dist/mocks/index.js +1 -0
- package/dist/stories/homeBoard/AddToHomefile.stories.js +2 -1
- package/package.json +1 -1
- package/src/assets/locales/en/index.json +2 -1
- package/src/components/forms/dynamicForm/HiddenField.tsx +50 -39
- package/src/components/homeBoard/AddToHomefile.tsx +29 -7
- package/src/components/homeBoard/HomeBoard.tsx +5 -1
- package/src/components/inboxTile/InboxForwardBanner.tsx +9 -2
- package/src/interfaces/forms/dynamicForm/HiddenField.interface.ts +2 -0
- package/src/mocks/homeboard/documentList.mock.ts +22 -0
- package/src/mocks/index.ts +1 -0
- package/src/stories/homeBoard/AddToHomefile.stories.tsx +2 -1
|
@@ -482,7 +482,8 @@
|
|
|
482
482
|
"inbox": {
|
|
483
483
|
"createReply": "Create Reply",
|
|
484
484
|
"enterContent": "Enter content",
|
|
485
|
-
"forwardTo": "
|
|
485
|
+
"forwardTo": "You can forward a receipt to ",
|
|
486
|
+
"forwardTo2": " or add a receipt image below.",
|
|
486
487
|
"from": "From: ",
|
|
487
488
|
"message": "Message"
|
|
488
489
|
},
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { HiddenFieldI } from '../../../interfaces';
|
|
2
|
-
export declare const HiddenField: ({ disabled, icon, id, isActive, name, onClick, }: HiddenFieldI) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const HiddenField: ({ disabled, h, icon, id, isActive, name, onClick, showPlusIcon, }: HiddenFieldI) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Center, Image, Text } from '@chakra-ui/react';
|
|
3
|
-
|
|
2
|
+
import { Box, Center, Image, Text } from '@chakra-ui/react';
|
|
3
|
+
import { Plus } from '../..';
|
|
4
|
+
import { colors } from '../../../theme/colors';
|
|
5
|
+
export const HiddenField = ({ disabled, h = '80px', icon, id, isActive, name, onClick, showPlusIcon = false, }) => {
|
|
4
6
|
const handleClick = () => onClick(id);
|
|
5
|
-
return (_jsxs(Center, { as: "button", disabled: disabled, bg: "neutral.white", borderRadius: "md", w: "
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
7
|
+
return (_jsxs(Box, { position: "relative", children: [_jsxs(Center, { as: "button", disabled: disabled, bg: "neutral.white", borderRadius: "md", w: "100%", h: h, boxShadow: "md", flexDirection: "column", onClick: handleClick, gap: "1", transition: "all .2s ease-in-out", border: "1px solid", borderColor: isActive ? 'blue.1' : 'transparent', _hover: {
|
|
8
|
+
borderColor: 'blue.1',
|
|
9
|
+
}, _disabled: {
|
|
10
|
+
opacity: 0.5,
|
|
11
|
+
_hover: {
|
|
12
|
+
borderColor: 'transparent',
|
|
13
|
+
},
|
|
14
|
+
}, _active: {
|
|
15
|
+
boxShadow: 'md',
|
|
16
|
+
}, children: [_jsx(Image, { h: "24px", w: "auto", maxW: "35px", src: icon }), _jsx(Text, { textTransform: "uppercase", fontSize: "xs", noOfLines: 2, overflow: "hidden", lineHeight: "1", width: "100%", children: name })] }), showPlusIcon && (_jsx(Box, { position: "absolute", top: "1", left: "4", children: _jsx(Plus, { size: 14, stroke: colors.blue[3] }) }))] }));
|
|
15
17
|
};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { t } from 'i18next';
|
|
3
|
-
import { Button, Circle, Container, Flex, Stack } from '@chakra-ui/react';
|
|
4
|
-
import { ChevronRight, ContainerHeader,
|
|
3
|
+
import { Button, Circle, Container, Flex, Grid, Stack, } from '@chakra-ui/react';
|
|
4
|
+
import { ChevronRight, ContainerHeader, HiddenField, IconAndText, MoreHorizontal, Plus, TileTooltip, } from '..';
|
|
5
5
|
import { GuestBedroom } from '../../assets/images';
|
|
6
6
|
import { colors } from '../../theme/colors';
|
|
7
7
|
export const AddToHomefile = ({ documentList, onItemClick, headerList, isDisabled = false, }) => {
|
|
8
|
-
return (_jsx(TileTooltip, { label: "addToHomefile", children: _jsxs(Container, { variant: "launchpad", h: "full", minW: ['full', '20rem'], children: [_jsx(ContainerHeader, { title: t('addToHomefile.title'), titleIcon: GuestBedroom, menuItems: headerList, icon: _jsx(MoreHorizontal, { size: 38 }) }), _jsxs(Stack, { spacing: "base", w: "full", p: "4", children: [_jsx(Button, { onClick: onItemClick, disabled: isDisabled, children: _jsxs(Flex, { w: "full", alignItems: "center", justifyContent: "space-between", px: "4", children: [_jsx(IconAndText, { title: t('addHomeItem.btnLabel'), icon: _jsx(Plus, {}) }), _jsx(Circle, { size: "40px", bg: "blue.1", color: "neutral.white", transition: "all 0.2s ease-in-out", children: _jsx(ChevronRight, { size: 26, stroke: colors.neutral.white }) })] }) }), _jsx(
|
|
8
|
+
return (_jsx(TileTooltip, { label: "addToHomefile", children: _jsxs(Container, { variant: "launchpad", h: "full", minW: ['full', '20rem'], children: [_jsx(ContainerHeader, { title: t('addToHomefile.title'), titleIcon: GuestBedroom, menuItems: headerList, icon: _jsx(MoreHorizontal, { size: 38 }) }), _jsxs(Stack, { spacing: "base", w: "full", p: "4", children: [_jsx(Button, { onClick: onItemClick, disabled: isDisabled, children: _jsxs(Flex, { w: "full", alignItems: "center", justifyContent: "space-between", px: "4", children: [_jsx(IconAndText, { title: t('addHomeItem.btnLabel'), icon: _jsx(Plus, {}) }), _jsx(Circle, { size: "40px", bg: "blue.1", color: "neutral.white", transition: "all 0.2s ease-in-out", children: _jsx(ChevronRight, { size: 26, stroke: colors.neutral.white }) })] }) }), _jsx(Grid, { templateColumns: "repeat(auto-fill, minmax(70px, 1fr))", gap: "base", children: documentList.map((item) => {
|
|
9
|
+
return (_jsx(HiddenField, { h: "58px", id: item.label, name: item.label, icon: item.icon, disabled: isDisabled, onClick: item.onClick, showPlusIcon: true }, item.label));
|
|
10
|
+
}) })] })] }) }));
|
|
9
11
|
};
|
|
@@ -11,7 +11,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
11
11
|
import { Box, DrawerBody, DrawerContent, DrawerHeader, Flex, Stack, } from '@chakra-ui/react';
|
|
12
12
|
import { HomeHeader, HomeCardWithRecipent, AddFolder, EditAccountType, FolderSharing, RightPanel, HomeBoardTour, RoomsMenu, ContactsContent, AppBar, BarDivider, ContactList, PeopleConnected, StorageUsed, TourButton, Trash, TutorialsButton, FolderTypeSelection, DisplayFiles, DisplayOptions, FilesUploader, FolderDetailBody, FolderDetailContent, FolderDetailFooter, FolderDetailHeader, FolderInfo, SharedAccounts, ReceiptAutofiler, HomeBoardGrid, ShortPartnerTile, ValueMonitor, TrendingValue, ReceiptsFiled, PropertyTaxes, PartnerCatalogPanel, DynamicForm, PanelHeader, EditHomePanel, HomeCard, EditHomeFooter, HomeAssistant, HomeAssistantPanel, HomeMonitor, HomefileMonitoring, HomeMonitorSteps, NotificationsReminder, NotificationsPanel, AddToHomefile, WeatherWidget, } from '..';
|
|
13
13
|
import { HomeCards, recipientsDb, FoldersDB, selectOptions, RoomsList, RoomsToAdd, } from '../../helpers';
|
|
14
|
-
import { ContactsMock, DisplayFilesMock, formFieldsMock, homeBoardRecorsMock, lineChartData, menuMock, partnerCatalogMock, sharedAccountsMock, socialLinksMock2, taxesMock, userMock, videoMock, homeAssitantStep1FormMock, homeAssitantStep2FormMock, homeAssitantStep3FormMock, homeAssitantStep4FormMock, homeAssitantStep5FormMock, homeAssitantStep6FormMock, tileUIMock, socialLinksMock, notificationsMock, weatherDataMock, } from '../../mocks';
|
|
14
|
+
import { ContactsMock, DisplayFilesMock, formFieldsMock, homeBoardRecorsMock, lineChartData, menuMock, partnerCatalogMock, sharedAccountsMock, socialLinksMock2, taxesMock, userMock, videoMock, homeAssitantStep1FormMock, homeAssitantStep2FormMock, homeAssitantStep3FormMock, homeAssitantStep4FormMock, homeAssitantStep5FormMock, homeAssitantStep6FormMock, tileUIMock, socialLinksMock, notificationsMock, weatherDataMock, documentListMock, } from '../../mocks';
|
|
15
15
|
import { useHomeBoard, useWindowDimensions } from '../../hooks';
|
|
16
16
|
import { Painting } from '../../assets/images';
|
|
17
17
|
import { mapForecastToWidget } from '../../utils';
|
|
@@ -58,7 +58,7 @@ export const HomeBoard = () => {
|
|
|
58
58
|
label: 'Details',
|
|
59
59
|
handleClick: handleHomeAssistantClick,
|
|
60
60
|
},
|
|
61
|
-
], onStepClick: () => null })] }) }), _jsx(DynamicForm, { form: tileUIMock, menuItems: menuMock, socialLinks: socialLinksMock, showTitle: false, websiteUrl: "http://www.audreyscheckdesign.com" }), _jsxs(Stack, { spacing: "base", children: [_jsx(ReceiptAutofiler, { onClick: () => null, totalReceipts: 36, totalTitle: "Receipts Received", forwardTo: "reciepts@homefile.cloud", onFilter: () => null, children: _jsx(ReceiptsFiled, { incidentalItemsNumber: 0, incidentalSpent: 0, inventoryItemsNumber: 0, inventorySpent: 0, total: 0 }) }), _jsx(ValueMonitor, { menuItems: menuMock, balance: "+3%", totalValue: 323421, year: "2023", yearValue: 5684 })] }), _jsx(PropertyTaxes, { estimatedTaxValue: 1000, menuItems: menuMock, taxes: taxesMock, title: "Travis County Property Taxes" }), _jsx(ShortPartnerTile, { _id: "1", buttonText: "Contact Audrey Scheck", description: "Full-service design firm focusing on residential remodels, furnishing, and styling.", onClick: () => null, socialLinks: socialLinksMock2, logo: "https://static.wixstatic.com/media/258105_8e04439070694f278e4787a310ea9f4b~mv2.png", partnerName: "Audrey Scheck", websiteUrl: "" }), _jsx(TrendingValue, { chartData: lineChartData, marketValue: 894000, menuItems: menuMock, mortgageBalance: 220532, purchasePrice: 220532, roi: "+234%" }), _jsx(ShortPartnerTile, { _id: "2", buttonText: "Contact Audrey Scheck", description: "Full-service design firm focusing on residential remodels, furnishing, and styling.", onClick: () => null, socialLinks: socialLinksMock2, logo: "https://static.wixstatic.com/media/258105_8e04439070694f278e4787a310ea9f4b~mv2.png", partnerName: "Audrey Scheck", websiteUrl: "" }), _jsx(FolderSharing, { folders: FoldersDB, handleAddNewFolder: handleNewFolder, handleFolderClick: handleFolderClick, handleSelect: () => null, initialSelectItem: selectOptions[0], menuItems: menuMock, selectItems: selectOptions }), _jsx(AddToHomefile, { documentList:
|
|
61
|
+
], onStepClick: () => null })] }) }), _jsx(DynamicForm, { form: tileUIMock, menuItems: menuMock, socialLinks: socialLinksMock, showTitle: false, websiteUrl: "http://www.audreyscheckdesign.com" }), _jsxs(Stack, { spacing: "base", children: [_jsx(ReceiptAutofiler, { onClick: () => null, totalReceipts: 36, totalTitle: "Receipts Received", forwardTo: "reciepts@homefile.cloud", onFilter: () => null, children: _jsx(ReceiptsFiled, { incidentalItemsNumber: 0, incidentalSpent: 0, inventoryItemsNumber: 0, inventorySpent: 0, total: 0 }) }), _jsx(ValueMonitor, { menuItems: menuMock, balance: "+3%", totalValue: 323421, year: "2023", yearValue: 5684 })] }), _jsx(PropertyTaxes, { estimatedTaxValue: 1000, menuItems: menuMock, taxes: taxesMock, title: "Travis County Property Taxes" }), _jsx(ShortPartnerTile, { _id: "1", buttonText: "Contact Audrey Scheck", description: "Full-service design firm focusing on residential remodels, furnishing, and styling.", onClick: () => null, socialLinks: socialLinksMock2, logo: "https://static.wixstatic.com/media/258105_8e04439070694f278e4787a310ea9f4b~mv2.png", partnerName: "Audrey Scheck", websiteUrl: "" }), _jsx(TrendingValue, { chartData: lineChartData, marketValue: 894000, menuItems: menuMock, mortgageBalance: 220532, purchasePrice: 220532, roi: "+234%" }), _jsx(ShortPartnerTile, { _id: "2", buttonText: "Contact Audrey Scheck", description: "Full-service design firm focusing on residential remodels, furnishing, and styling.", onClick: () => null, socialLinks: socialLinksMock2, logo: "https://static.wixstatic.com/media/258105_8e04439070694f278e4787a310ea9f4b~mv2.png", partnerName: "Audrey Scheck", websiteUrl: "" }), _jsx(FolderSharing, { folders: FoldersDB, handleAddNewFolder: handleNewFolder, handleFolderClick: handleFolderClick, handleSelect: () => null, initialSelectItem: selectOptions[0], menuItems: menuMock, selectItems: selectOptions }), _jsx(AddToHomefile, { documentList: documentListMock, onItemClick: () => null }), _jsx(ShortPartnerTile, { _id: "3", buttonText: "Contact Audrey Scheck", description: "Full-service design firm focusing on residential remodels, furnishing, and styling.", onClick: () => null, socialLinks: socialLinksMock2, logo: "https://static.wixstatic.com/media/258105_8e04439070694f278e4787a310ea9f4b~mv2.png", partnerName: "Audrey Scheck", websiteUrl: "" })] })] })] })] }), _jsx(HomeBoardTour, { currentStep: currentStep, handleClose: handleClose, handleStep: handleStep, meetStepUrl: videoMock, isActive: activeTour })] }));
|
|
62
62
|
};
|
|
63
63
|
export const AppBarComponent = ({ setActiveTour = (value) => { }, onClick = (panel) => { }, }) => {
|
|
64
64
|
const handleTour = () => {
|
|
@@ -3,5 +3,5 @@ import { t } from 'i18next';
|
|
|
3
3
|
import { AspectRatio, Flex, Text, Image, chakra } from '@chakra-ui/react';
|
|
4
4
|
import { IA } from '../../assets/images';
|
|
5
5
|
export const InboxForwardBanner = () => {
|
|
6
|
-
return (_jsxs(Flex, { p: "base", gap: "base", align: "center", bg: "lightBlue.2", id:
|
|
6
|
+
return (_jsxs(Flex, { p: "base", gap: "base", align: "center", bg: "lightBlue.2", id: "forwardReceipts", children: [_jsx(AspectRatio, { ratio: 1, minW: "35px", h: "auto", children: _jsx(Image, { src: IA, alt: "IA" }) }), _jsxs(Text, { variant: "home", lineHeight: "1.2", children: [t('inbox.forwardTo'), _jsx(chakra.span, { fontFamily: "secondary", fontSize: "sm", lineHeight: "1", color: "neutral.black", fontWeight: "bold", display: "inline", children: "homefileit@homefile.com" }), t('inbox.forwardTo2')] })] }));
|
|
7
7
|
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Register } from '../../assets/images';
|
|
2
|
+
export const documentListMock = [
|
|
3
|
+
{
|
|
4
|
+
icon: "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='33.439'%20height='26.432'%20viewBox='0%200%2033.439%2026.432'%3e%3cg%20id='Grupo_14045'%20data-name='Grupo%2014045'%20transform='translate(-3080.373%201964.161)'%3e%3cpath%20id='Caminho_10681'%20data-name='Caminho%2010681'%20d='M3099.543-1912.748h-.029a3,3,0,0,0,1.153-2.367v-.047c0-.035,0-.073,0-.109a3.01,3.01,0,0,0-3.01-2.93,3.007,3.007,0,0,0-3.007,2.93c0,.035,0,.073,0,.109v.047a3,3,0,0,0,1.153,2.367h-.032a3.061,3.061,0,0,0-3.06,2.977c0,.053,0,.106,0,.158v.868h9.9v-.868c0-.053,0-.106,0-.158A3.058,3.058,0,0,0,3099.543-1912.748Z'%20transform='translate(-8.713%20-32.478)'%20fill='%231e393d'/%3e%3cpath%20id='Caminho_10682'%20data-name='Caminho%2010682'%20d='M3112.933-1943.991h-31.68a.883.883,0,0,0-.88.88v3.983h33.439v-3.983A.882.882,0,0,0,3112.933-1943.991Zm-12.408,3.147h-6.862a.716.716,0,0,1-.715-.716.716.716,0,0,1,.715-.716h6.862a.715.715,0,0,1,.713.716A.715.715,0,0,1,3100.525-1940.844Z'%20transform='translate(0%20-14.254)'%20fill='%2328b5a8'/%3e%3cpath%20id='Caminho_10683'%20data-name='Caminho%2010683'%20d='M3080.373-1927.411v14.772a.883.883,0,0,0,.88.88h31.68a.882.882,0,0,0,.88-.88v-14.772Z'%20transform='translate(0%20-25.97)'%20fill='%23d2edef'/%3e%3cpath%20id='Caminho_10684'%20data-name='Caminho%2010684'%20d='M3133.216-1958.152v2.059h-5.9v-8.067h5.9Zm-1.9-2.943a1.055,1.055,0,0,0-1.054-1.054,1.054,1.054,0,0,0-1.052,1.054,1.053,1.053,0,0,0,1.052,1.051A1.054,1.054,0,0,0,3131.319-1961.095Z'%20transform='translate(-33.172%200)'%20fill='%23d4334b'/%3e%3cpath%20id='Caminho_10685'%20data-name='Caminho%2010685'%20d='M3102.393-1909.955a3.205,3.205,0,0,0-2.927-3.032l.1-.085h-.1a3.162,3.162,0,0,0,.993-2.267l0-.116a3.159,3.159,0,0,0-3.156-3,3.159,3.159,0,0,0-3.153,3l0,.11a3.166,3.166,0,0,0,.992,2.266h-.1l.1.085a3.205,3.205,0,0,0-2.931,3.031c0,.055,0,.111,0,.166v.942H3102.4v-.942C3102.4-1909.845,3102.4-1909.9,3102.393-1909.955Z'%20transform='translate(-8.36%20-32.302)'%20fill='%23324459'/%3e%3crect%20id='Retângulo_15310'%20data-name='Retângulo%2015310'%20width='6.057'%20height='0.88'%20transform='translate(3097.436%20-1950.724)'%20fill='%23324459'/%3e%3crect%20id='Retângulo_15311'%20data-name='Retângulo%2015311'%20width='13.053'%20height='0.88'%20transform='translate(3097.436%20-1947.06)'%20fill='%23324459'/%3e%3crect%20id='Retângulo_15312'%20data-name='Retângulo%2015312'%20width='13.053'%20height='0.88'%20transform='translate(3097.436%20-1944.693)'%20fill='%23324459'/%3e%3crect%20id='Retângulo_15313'%20data-name='Retângulo%2015313'%20width='9.66'%20height='0.88'%20transform='translate(3097.436%20-1942.323)'%20fill='%23324459'/%3e%3c/g%3e%3c/svg%3e",
|
|
5
|
+
active: true,
|
|
6
|
+
label: 'Contact',
|
|
7
|
+
onClick: () => null,
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
icon: "data:image/svg+xml,%3csvg%20id='Group_16074'%20data-name='Group%2016074'%20xmlns='http://www.w3.org/2000/svg'%20width='24.959'%20height='21.661'%20viewBox='0%200%2024.959%2021.661'%3e%3cpath%20id='Path_10977'%20data-name='Path%2010977'%20d='M92.02,60.28v3.867l3.867-3.867Z'%20transform='translate(-70.928%20-46.463)'%20fill='%2300c0b7'/%3e%3cpath%20id='Path_10978'%20data-name='Path%2010978'%20d='M0,17.36V35.041H17.681V31.065H7.277V17.36Z'%20transform='translate(0%20-13.381)'%20fill='%2340566b'/%3e%3cpath%20id='Path_10979'%20data-name='Path%2010979'%20d='M31.75,0V17.684H45.565V13.817h3.867V0Z'%20transform='translate(-24.473)'%20fill='%23f6cf76'/%3e%3crect%20id='Rectangle_15756'%20data-name='Rectangle%2015756'%20width='5.561'%20height='0.688'%20transform='translate(10.557%202.998)'%20fill='%2340566b'/%3e%3crect%20id='Rectangle_15757'%20data-name='Rectangle%2015757'%20width='11.032'%20height='0.688'%20transform='translate(10.601%206.523)'%20fill='%2340566b'/%3e%3crect%20id='Rectangle_15758'%20data-name='Rectangle%2015758'%20width='11.032'%20height='0.688'%20transform='translate(10.601%209.173)'%20fill='%2340566b'/%3e%3c/svg%3e",
|
|
11
|
+
active: true,
|
|
12
|
+
label: 'Note',
|
|
13
|
+
onClick: () => null,
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
icon: Register,
|
|
17
|
+
active: true,
|
|
18
|
+
label: 'Receipt',
|
|
19
|
+
onClick: () => null,
|
|
20
|
+
},
|
|
21
|
+
];
|
package/dist/mocks/index.d.ts
CHANGED
package/dist/mocks/index.js
CHANGED
|
@@ -2,12 +2,13 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { Box } from '@chakra-ui/react';
|
|
3
3
|
import { AddToHomefile } from '../../components';
|
|
4
4
|
import { action } from '@storybook/addon-actions';
|
|
5
|
+
import { documentListMock } from '../../mocks';
|
|
5
6
|
export default {
|
|
6
7
|
title: 'Components/HomeBoard',
|
|
7
8
|
component: AddToHomefile,
|
|
8
9
|
args: {
|
|
9
10
|
onItemClick: action('onItemClick'),
|
|
10
|
-
documentList:
|
|
11
|
+
documentList: documentListMock,
|
|
11
12
|
},
|
|
12
13
|
};
|
|
13
14
|
export const AddToHomefileComponent = (args) => {
|
package/package.json
CHANGED
|
@@ -482,7 +482,8 @@
|
|
|
482
482
|
"inbox": {
|
|
483
483
|
"createReply": "Create Reply",
|
|
484
484
|
"enterContent": "Enter content",
|
|
485
|
-
"forwardTo": "
|
|
485
|
+
"forwardTo": "You can forward a receipt to ",
|
|
486
|
+
"forwardTo2": " or add a receipt image below.",
|
|
486
487
|
"from": "From: ",
|
|
487
488
|
"message": "Message"
|
|
488
489
|
},
|
|
@@ -1,54 +1,65 @@
|
|
|
1
|
-
import { Center, Image, Text } from '@chakra-ui/react'
|
|
1
|
+
import { Box, Center, Image, Text } from '@chakra-ui/react'
|
|
2
2
|
import { HiddenFieldI } from '@/interfaces'
|
|
3
|
+
import { Plus } from '@/components'
|
|
4
|
+
import { colors } from '@/theme/colors'
|
|
3
5
|
|
|
4
6
|
export const HiddenField = ({
|
|
5
7
|
disabled,
|
|
8
|
+
h = '80px',
|
|
6
9
|
icon,
|
|
7
10
|
id,
|
|
8
11
|
isActive,
|
|
9
12
|
name,
|
|
10
13
|
onClick,
|
|
14
|
+
showPlusIcon = false,
|
|
11
15
|
}: HiddenFieldI) => {
|
|
12
16
|
const handleClick = () => onClick(id)
|
|
13
17
|
return (
|
|
14
|
-
<
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
<Image h="24px" w="auto" maxW="35px" src={icon} />
|
|
42
|
-
<Text
|
|
43
|
-
textTransform="uppercase"
|
|
44
|
-
fontSize="xs"
|
|
45
|
-
noOfLines={2}
|
|
46
|
-
overflow="hidden"
|
|
47
|
-
lineHeight="1"
|
|
48
|
-
width="100%"
|
|
18
|
+
<Box position="relative">
|
|
19
|
+
<Center
|
|
20
|
+
as="button"
|
|
21
|
+
disabled={disabled}
|
|
22
|
+
bg="neutral.white"
|
|
23
|
+
borderRadius="md"
|
|
24
|
+
w="100%"
|
|
25
|
+
h={h}
|
|
26
|
+
boxShadow="md"
|
|
27
|
+
flexDirection="column"
|
|
28
|
+
onClick={handleClick}
|
|
29
|
+
gap="1"
|
|
30
|
+
transition="all .2s ease-in-out"
|
|
31
|
+
border="1px solid"
|
|
32
|
+
borderColor={isActive ? 'blue.1' : 'transparent'}
|
|
33
|
+
_hover={{
|
|
34
|
+
borderColor: 'blue.1',
|
|
35
|
+
}}
|
|
36
|
+
_disabled={{
|
|
37
|
+
opacity: 0.5,
|
|
38
|
+
_hover: {
|
|
39
|
+
borderColor: 'transparent',
|
|
40
|
+
},
|
|
41
|
+
}}
|
|
42
|
+
_active={{
|
|
43
|
+
boxShadow: 'md',
|
|
44
|
+
}}
|
|
49
45
|
>
|
|
50
|
-
{
|
|
51
|
-
|
|
52
|
-
|
|
46
|
+
<Image h="24px" w="auto" maxW="35px" src={icon} />
|
|
47
|
+
<Text
|
|
48
|
+
textTransform="uppercase"
|
|
49
|
+
fontSize="xs"
|
|
50
|
+
noOfLines={2}
|
|
51
|
+
overflow="hidden"
|
|
52
|
+
lineHeight="1"
|
|
53
|
+
width="100%"
|
|
54
|
+
>
|
|
55
|
+
{name}
|
|
56
|
+
</Text>
|
|
57
|
+
</Center>
|
|
58
|
+
{showPlusIcon && (
|
|
59
|
+
<Box position="absolute" top="1" left="4">
|
|
60
|
+
<Plus size={14} stroke={colors.blue[3]} />
|
|
61
|
+
</Box>
|
|
62
|
+
)}
|
|
63
|
+
</Box>
|
|
53
64
|
)
|
|
54
65
|
}
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
import { t } from 'i18next'
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
Box,
|
|
4
|
+
Button,
|
|
5
|
+
Circle,
|
|
6
|
+
Container,
|
|
7
|
+
Flex,
|
|
8
|
+
Grid,
|
|
9
|
+
Stack,
|
|
10
|
+
} from '@chakra-ui/react'
|
|
3
11
|
import {
|
|
4
12
|
ChevronRight,
|
|
5
13
|
ContainerHeader,
|
|
6
|
-
|
|
14
|
+
HiddenField,
|
|
7
15
|
IconAndText,
|
|
8
16
|
MoreHorizontal,
|
|
9
17
|
Plus,
|
|
@@ -47,11 +55,25 @@ export const AddToHomefile = ({
|
|
|
47
55
|
</Circle>
|
|
48
56
|
</Flex>
|
|
49
57
|
</Button>
|
|
50
|
-
<
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
58
|
+
<Grid
|
|
59
|
+
templateColumns="repeat(auto-fill, minmax(70px, 1fr))"
|
|
60
|
+
gap="base"
|
|
61
|
+
>
|
|
62
|
+
{documentList.map((item) => {
|
|
63
|
+
return (
|
|
64
|
+
<HiddenField
|
|
65
|
+
key={item.label}
|
|
66
|
+
h="58px"
|
|
67
|
+
id={item.label}
|
|
68
|
+
name={item.label}
|
|
69
|
+
icon={item.icon}
|
|
70
|
+
disabled={isDisabled}
|
|
71
|
+
onClick={item.onClick}
|
|
72
|
+
showPlusIcon
|
|
73
|
+
/>
|
|
74
|
+
)
|
|
75
|
+
})}
|
|
76
|
+
</Grid>
|
|
55
77
|
</Stack>
|
|
56
78
|
</Container>
|
|
57
79
|
</TileTooltip>
|
|
@@ -92,6 +92,7 @@ import {
|
|
|
92
92
|
socialLinksMock,
|
|
93
93
|
notificationsMock,
|
|
94
94
|
weatherDataMock,
|
|
95
|
+
documentListMock,
|
|
95
96
|
} from '@/mocks'
|
|
96
97
|
import { useHomeBoard, useWindowDimensions } from '@/hooks'
|
|
97
98
|
import { Painting } from '@/assets/images'
|
|
@@ -465,7 +466,10 @@ export const HomeBoard = () => {
|
|
|
465
466
|
selectItems={selectOptions}
|
|
466
467
|
/>
|
|
467
468
|
|
|
468
|
-
<AddToHomefile
|
|
469
|
+
<AddToHomefile
|
|
470
|
+
documentList={documentListMock}
|
|
471
|
+
onItemClick={() => null}
|
|
472
|
+
/>
|
|
469
473
|
|
|
470
474
|
<ShortPartnerTile
|
|
471
475
|
_id="3"
|
|
@@ -4,7 +4,13 @@ import { IA } from '@/assets/images'
|
|
|
4
4
|
|
|
5
5
|
export const InboxForwardBanner = () => {
|
|
6
6
|
return (
|
|
7
|
-
<Flex
|
|
7
|
+
<Flex
|
|
8
|
+
p="base"
|
|
9
|
+
gap="base"
|
|
10
|
+
align="center"
|
|
11
|
+
bg="lightBlue.2"
|
|
12
|
+
id="forwardReceipts"
|
|
13
|
+
>
|
|
8
14
|
<AspectRatio ratio={1} minW="35px" h="auto">
|
|
9
15
|
<Image src={IA} alt="IA" />
|
|
10
16
|
</AspectRatio>
|
|
@@ -19,8 +25,9 @@ export const InboxForwardBanner = () => {
|
|
|
19
25
|
fontWeight="bold"
|
|
20
26
|
display="inline"
|
|
21
27
|
>
|
|
22
|
-
homefileit@homefile.com
|
|
28
|
+
homefileit@homefile.com
|
|
23
29
|
</chakra.span>
|
|
30
|
+
{t('inbox.forwardTo2')}
|
|
24
31
|
</Text>
|
|
25
32
|
</Flex>
|
|
26
33
|
)
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Register } from '@/assets/images'
|
|
2
|
+
|
|
3
|
+
export const documentListMock = [
|
|
4
|
+
{
|
|
5
|
+
icon: "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='33.439'%20height='26.432'%20viewBox='0%200%2033.439%2026.432'%3e%3cg%20id='Grupo_14045'%20data-name='Grupo%2014045'%20transform='translate(-3080.373%201964.161)'%3e%3cpath%20id='Caminho_10681'%20data-name='Caminho%2010681'%20d='M3099.543-1912.748h-.029a3,3,0,0,0,1.153-2.367v-.047c0-.035,0-.073,0-.109a3.01,3.01,0,0,0-3.01-2.93,3.007,3.007,0,0,0-3.007,2.93c0,.035,0,.073,0,.109v.047a3,3,0,0,0,1.153,2.367h-.032a3.061,3.061,0,0,0-3.06,2.977c0,.053,0,.106,0,.158v.868h9.9v-.868c0-.053,0-.106,0-.158A3.058,3.058,0,0,0,3099.543-1912.748Z'%20transform='translate(-8.713%20-32.478)'%20fill='%231e393d'/%3e%3cpath%20id='Caminho_10682'%20data-name='Caminho%2010682'%20d='M3112.933-1943.991h-31.68a.883.883,0,0,0-.88.88v3.983h33.439v-3.983A.882.882,0,0,0,3112.933-1943.991Zm-12.408,3.147h-6.862a.716.716,0,0,1-.715-.716.716.716,0,0,1,.715-.716h6.862a.715.715,0,0,1,.713.716A.715.715,0,0,1,3100.525-1940.844Z'%20transform='translate(0%20-14.254)'%20fill='%2328b5a8'/%3e%3cpath%20id='Caminho_10683'%20data-name='Caminho%2010683'%20d='M3080.373-1927.411v14.772a.883.883,0,0,0,.88.88h31.68a.882.882,0,0,0,.88-.88v-14.772Z'%20transform='translate(0%20-25.97)'%20fill='%23d2edef'/%3e%3cpath%20id='Caminho_10684'%20data-name='Caminho%2010684'%20d='M3133.216-1958.152v2.059h-5.9v-8.067h5.9Zm-1.9-2.943a1.055,1.055,0,0,0-1.054-1.054,1.054,1.054,0,0,0-1.052,1.054,1.053,1.053,0,0,0,1.052,1.051A1.054,1.054,0,0,0,3131.319-1961.095Z'%20transform='translate(-33.172%200)'%20fill='%23d4334b'/%3e%3cpath%20id='Caminho_10685'%20data-name='Caminho%2010685'%20d='M3102.393-1909.955a3.205,3.205,0,0,0-2.927-3.032l.1-.085h-.1a3.162,3.162,0,0,0,.993-2.267l0-.116a3.159,3.159,0,0,0-3.156-3,3.159,3.159,0,0,0-3.153,3l0,.11a3.166,3.166,0,0,0,.992,2.266h-.1l.1.085a3.205,3.205,0,0,0-2.931,3.031c0,.055,0,.111,0,.166v.942H3102.4v-.942C3102.4-1909.845,3102.4-1909.9,3102.393-1909.955Z'%20transform='translate(-8.36%20-32.302)'%20fill='%23324459'/%3e%3crect%20id='Retângulo_15310'%20data-name='Retângulo%2015310'%20width='6.057'%20height='0.88'%20transform='translate(3097.436%20-1950.724)'%20fill='%23324459'/%3e%3crect%20id='Retângulo_15311'%20data-name='Retângulo%2015311'%20width='13.053'%20height='0.88'%20transform='translate(3097.436%20-1947.06)'%20fill='%23324459'/%3e%3crect%20id='Retângulo_15312'%20data-name='Retângulo%2015312'%20width='13.053'%20height='0.88'%20transform='translate(3097.436%20-1944.693)'%20fill='%23324459'/%3e%3crect%20id='Retângulo_15313'%20data-name='Retângulo%2015313'%20width='9.66'%20height='0.88'%20transform='translate(3097.436%20-1942.323)'%20fill='%23324459'/%3e%3c/g%3e%3c/svg%3e",
|
|
6
|
+
active: true,
|
|
7
|
+
label: 'Contact',
|
|
8
|
+
onClick: () => null,
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
icon: "data:image/svg+xml,%3csvg%20id='Group_16074'%20data-name='Group%2016074'%20xmlns='http://www.w3.org/2000/svg'%20width='24.959'%20height='21.661'%20viewBox='0%200%2024.959%2021.661'%3e%3cpath%20id='Path_10977'%20data-name='Path%2010977'%20d='M92.02,60.28v3.867l3.867-3.867Z'%20transform='translate(-70.928%20-46.463)'%20fill='%2300c0b7'/%3e%3cpath%20id='Path_10978'%20data-name='Path%2010978'%20d='M0,17.36V35.041H17.681V31.065H7.277V17.36Z'%20transform='translate(0%20-13.381)'%20fill='%2340566b'/%3e%3cpath%20id='Path_10979'%20data-name='Path%2010979'%20d='M31.75,0V17.684H45.565V13.817h3.867V0Z'%20transform='translate(-24.473)'%20fill='%23f6cf76'/%3e%3crect%20id='Rectangle_15756'%20data-name='Rectangle%2015756'%20width='5.561'%20height='0.688'%20transform='translate(10.557%202.998)'%20fill='%2340566b'/%3e%3crect%20id='Rectangle_15757'%20data-name='Rectangle%2015757'%20width='11.032'%20height='0.688'%20transform='translate(10.601%206.523)'%20fill='%2340566b'/%3e%3crect%20id='Rectangle_15758'%20data-name='Rectangle%2015758'%20width='11.032'%20height='0.688'%20transform='translate(10.601%209.173)'%20fill='%2340566b'/%3e%3c/svg%3e",
|
|
12
|
+
active: true,
|
|
13
|
+
label: 'Note',
|
|
14
|
+
onClick: () => null,
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
icon: Register,
|
|
18
|
+
active: true,
|
|
19
|
+
label: 'Receipt',
|
|
20
|
+
onClick: () => null,
|
|
21
|
+
},
|
|
22
|
+
]
|
package/src/mocks/index.ts
CHANGED
|
@@ -3,13 +3,14 @@ import { Box } from '@chakra-ui/react'
|
|
|
3
3
|
import { AddToHomefile } from '@/components'
|
|
4
4
|
import { AddToHomefileI } from '@/interfaces'
|
|
5
5
|
import { action } from '@storybook/addon-actions'
|
|
6
|
+
import { documentListMock } from '@/mocks'
|
|
6
7
|
|
|
7
8
|
export default {
|
|
8
9
|
title: 'Components/HomeBoard',
|
|
9
10
|
component: AddToHomefile,
|
|
10
11
|
args: {
|
|
11
12
|
onItemClick: action('onItemClick'),
|
|
12
|
-
documentList:
|
|
13
|
+
documentList: documentListMock,
|
|
13
14
|
},
|
|
14
15
|
} as Meta<AddToHomefileI>
|
|
15
16
|
|