@homefile/components-v2 2.39.3 → 2.39.5

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.
@@ -1,33 +1,35 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="35.971" height="26.821" viewBox="0 0 35.971 26.821">
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="28.84" height="25" viewBox="0 0 28.84 25">
2
2
  <defs>
3
3
  <clipPath id="clip-path">
4
- <rect id="Rectangle_26291" data-name="Rectangle 26291" width="35.971" height="26.821" fill="#89b541"/>
4
+ <rect id="Rectangle_27958" data-name="Rectangle 27958" width="28.84" height="25" fill="none"/>
5
5
  </clipPath>
6
6
  </defs>
7
- <g id="Group_26102" data-name="Group 26102" transform="translate(0 0)">
8
- <g id="Group_26101" data-name="Group 26101" transform="translate(0 0)" clip-path="url(#clip-path)">
9
- <path id="Path_18525" data-name="Path 18525" d="M90.489,9.3a4.653,4.653,0,0,0,1.249.173,4.817,4.817,0,0,0,4.379-2.812,4.82,4.82,0,0,0,3.984,2.79c0,.077.011.151.011.228v1.784a4.821,4.821,0,0,1-9.642,0V9.679c0-.129.008-.254.019-.38" transform="translate(-65.988 -4.858)" fill="#daf1f3"/>
10
- <path id="Path_18526" data-name="Path 18526" d="M111.76.613a4.82,4.82,0,0,1,3.56,4.427,4.82,4.82,0,0,1-3.984-2.79A4.772,4.772,0,0,0,111.76.613" transform="translate(-81.207 -0.447)" fill="#323954"/>
11
- <path id="Path_18527" data-name="Path 18527" d="M95.736.018a4.7,4.7,0,0,1,.855.147A4.766,4.766,0,0,1,96.167,1.8a4.816,4.816,0,0,1-4.379,2.812,4.653,4.653,0,0,1-1.249-.173A4.816,4.816,0,0,1,95.341,0c.133,0,.266.008.395.018" transform="translate(-66.038 0)" fill="#40566b"/>
12
- <path id="Path_18528" data-name="Path 18528" d="M83.646,38.393c0-2.134.656-3.94,2.577-4.574a4.816,4.816,0,0,0,8.186,0c1.917.638,2.573,2.44,2.573,4.574Z" transform="translate(-61.01 -24.667)" fill="#00c0b7"/>
13
- <path id="Path_18529" data-name="Path 18529" d="M99.842,22.721h-1.43a.369.369,0,1,1,0-.737h1.43a.369.369,0,1,1,0,.737" transform="translate(-71.511 -16.035)" fill="#40566b"/>
14
- <path id="Path_18530" data-name="Path 18530" d="M112.318,22.721h-1.43a.369.369,0,1,1,0-.737h1.43a.369.369,0,1,1,0,.737" transform="translate(-80.611 -16.035)" fill="#40566b"/>
15
- <path id="Path_18531" data-name="Path 18531" d="M104.6,32a2.13,2.13,0,0,1-1.092-.3.369.369,0,0,1,.379-.633,1.407,1.407,0,0,0,1.755-.275.369.369,0,0,1,.556.484,2.118,2.118,0,0,1-1.6.727" transform="translate(-75.366 -22.363)" fill="#40566b"/>
16
- <path id="Path_18532" data-name="Path 18532" d="M83.206,62.578h.812v3.3a3.083,3.083,0,0,1-3.079,3.079H73.193v-.812h7.746a2.27,2.27,0,0,0,2.267-2.267Z" transform="translate(-53.386 -45.644)" fill="#00c0b7"/>
17
- <path id="Path_18533" data-name="Path 18533" d="M83.206,62.578h.812v3.3a3.083,3.083,0,0,1-3.079,3.079H73.193v-.812h7.746a2.27,2.27,0,0,0,2.267-2.267Z" transform="translate(-53.386 -45.644)" fill="#28b5a8" stroke="#28b5a8" stroke-miterlimit="10" stroke-width="0.5"/>
18
- <path id="Path_18535" data-name="Path 18535" d="M111.6,63.145l-2.5-1.377-2.5,1.377V61.977l2.5-1.376,2.5,1.376Z" transform="translate(-78.977 -44.739)" fill="#28b5a8" stroke="#28b5a8" stroke-miterlimit="10" stroke-width="0.5"/>
19
- <path id="Path_18540" data-name="Path 18540" d="M11.214,54.179a.652.652,0,0,0,.07-.294.762.762,0,0,0-.712-.722,1.405,1.405,0,0,0-1.444-1.157,1.474,1.474,0,0,0-1.314.744l-.034,0V44.4h1.26l5.6-5.652.884-.894L22,44.4h1.262v7.954a.5.5,0,0,0-.068-.05.567.567,0,0,0-.048-.035,1.455,1.455,0,0,0-.219-.119,1.575,1.575,0,0,0-.286-.1c-.037-.01-.076-.017-.114-.024a1.761,1.761,0,0,0-.283-.023,1.535,1.535,0,0,0-1.357.744,1.413,1.413,0,0,0-.147-.01,1.017,1.017,0,0,0-1.079.936.845.845,0,0,0,.17.5H18.317V52.807h-1.16V47.642H13.845v5.164h-1.16v1.372Zm10.471-6.537H18.76v2.743h2.925Zm-4.935-5.4h-2.5v2.341h2.5Zm-4.5,5.4H9.331v2.743h2.923Z" transform="translate(-5.675 -27.609)" fill="#f6cf76"/>
20
- <path id="Path_18541" data-name="Path 18541" d="M31.534,93.114v1.372H25.9V93.114h5.632Z" transform="translate(-18.892 -67.916)" fill="#fea856"/>
21
- <path id="Path_18542" data-name="Path 18542" d="M4.7,90.9a1.474,1.474,0,0,1,1.314-.744A1.405,1.405,0,0,1,7.46,91.312a.762.762,0,0,1,.712.722.65.65,0,0,1-.07.294H3.678a.872.872,0,0,1-.164-.5A1,1,0,0,1,4.56,90.89c.037,0,.074,0,.109.006v0a.19.19,0,0,1,.034,0" transform="translate(-2.563 -65.759)" fill="#00c0b7"/>
22
- <path id="Path_18543" data-name="Path 18543" d="M52.906,90.9a1.534,1.534,0,0,1,1.357-.744,1.724,1.724,0,0,1,.282.023c.038.007.077.013.114.024a1.581,1.581,0,0,1,.286.095,1.844,1.844,0,0,1,.219.119.52.52,0,0,1,.048.035.676.676,0,0,1,.069.05,1.24,1.24,0,0,1,.474.81.774.774,0,0,1,.736.722.655.655,0,0,1-.072.294H51.85a.843.843,0,0,1-.17-.5,1.017,1.017,0,0,1,1.079-.936,1.347,1.347,0,0,1,.147.01" transform="translate(-37.695 -65.759)" fill="#00c0b7"/>
23
- <rect id="Rectangle_26286" data-name="Rectangle 26286" width="3.313" height="5.164" transform="translate(8.169 20.033)" fill="#40566b"/>
24
- <path id="Path_18544" data-name="Path 18544" d="M55.954,37.962v1.185H54.5v-2.37h1.452Z" transform="translate(-39.753 -26.825)" fill="#f6cf76"/>
25
- <path id="Path_18545" data-name="Path 18545" d="M12.549,41.156,6.956,46.808H4.922V41.156Z" transform="translate(-3.59 -30.019)" fill="#e24c5d"/>
26
- <path id="Path_18546" data-name="Path 18546" d="M47.289,41.156v5.652H45.257l-5.6-5.652h4.016v1.185H45.13V41.156Z" transform="translate(-28.928 -30.019)" fill="#e24c5d"/>
27
- <rect id="Rectangle_26287" data-name="Rectangle 26287" width="2.923" height="2.743" transform="translate(3.655 20.033)" fill="#d2edef"/>
28
- <rect id="Rectangle_26288" data-name="Rectangle 26288" width="2.925" height="2.743" transform="translate(13.084 20.033)" fill="#d2edef"/>
29
- <rect id="Rectangle_26289" data-name="Rectangle 26289" width="2.497" height="2.341" transform="translate(8.577 14.634)" fill="#d2edef"/>
30
- <rect id="Rectangle_26290" data-name="Rectangle 26290" width="19.651" height="0.501" transform="translate(0 26.319)" fill="#fea856"/>
7
+ <g id="Group_26296" data-name="Group 26296" transform="translate(-997.958 -21.107)">
8
+ <g id="Group_26295" data-name="Group 26295" transform="translate(997.958 21.107)">
9
+ <g id="Group_26294" data-name="Group 26294">
10
+ <rect id="Rectangle_27953" data-name="Rectangle 27953" width="23.693" height="7.402" transform="translate(2.471 1.18)" fill="#68a044"/>
11
+ <path id="Path_19098" data-name="Path 19098" d="M0,48.938l3.636,2.484V46.452Z" transform="translate(0 -35.473)" fill="#40566b"/>
12
+ <path id="Path_19099" data-name="Path 19099" d="M106.332,51.311l3.709-2.537-3.709-2.538Z" transform="translate(-81.201 -35.308)" fill="#40566b"/>
13
+ <rect id="Rectangle_27954" data-name="Rectangle 27954" width="15.231" height="3.701" transform="translate(6.898 19.221)" fill="#9dbebf"/>
14
+ <rect id="Rectangle_27955" data-name="Rectangle 27955" width="3.545" height="3.545" transform="translate(19.488)" fill="#89b541"/>
15
+ <path id="Path_19100" data-name="Path 19100" d="M13.714,65.466v0Z" transform="translate(-10.473 -49.945)" fill="#d2edef"/>
16
+ <path id="Path_19101" data-name="Path 19101" d="M33.758,11.984h0L24.623,4.609,23.377,5.616l-7.885,6.368H13.716v6.993L24.632,24.77l10.895-5.694V19.04l0-.707V11.984Z" transform="translate(-10.473 -3.519)" fill="#d2edef"/>
17
+ <g id="Group_26293" data-name="Group 26293">
18
+ <g id="Group_26292" data-name="Group 26292" clip-path="url(#clip-path)">
19
+ <path id="Path_19102" data-name="Path 19102" d="M46.639,66.261v1.191H34.916V66.261a3.816,3.816,0,0,1,2.619-3.622,3.822,3.822,0,0,0,6.487,0,3.77,3.77,0,0,1,1.1.579v0a3.879,3.879,0,0,1,.616.583,3.772,3.772,0,0,1,.7,1.233,3.817,3.817,0,0,1,.2,1.225" transform="translate(-26.664 -47.835)" fill="#41566b"/>
20
+ <path id="Path_19103" data-name="Path 19103" d="M46.3,25.544a4.541,4.541,0,0,1-4.518,4.181,4.555,4.555,0,0,1-1.175-.16,4.533,4.533,0,0,1,4.517-4.179c.126,0,.248.009.371.018a4.7,4.7,0,0,1,.806.14" transform="translate(-31.008 -19.386)" fill="#40566b"/>
21
+ <path id="Path_19104" data-name="Path 19104" d="M63,27.592a4.5,4.5,0,0,0,.4-1.537,4.535,4.535,0,0,1,3.348,4.162A4.534,4.534,0,0,1,63,27.592" transform="translate(-48.11 -19.897)" fill="#323954"/>
22
+ <path id="Path_19105" data-name="Path 19105" d="M45.84,32.559a4.534,4.534,0,0,0,3.749,2.625c0,.072.01.142.01.214v1.679a4.535,4.535,0,0,1-9.07,0V35.4c0-.12.009-.237.018-.355a4.505,4.505,0,0,0,5.293-2.484" transform="translate(-30.95 -24.864)" fill="#fff"/>
23
+ <path id="Path_19106" data-name="Path 19106" d="M10.816,62.647,0,68.426V56.866Z" transform="translate(0 -43.426)" fill="#fea856"/>
24
+ <path id="Path_19107" data-name="Path 19107" d="M87.066,68.42l-10.82-5.783.4-.212,10.422-5.567Z" transform="translate(-58.226 -43.42)" fill="#fea856"/>
25
+ <path id="Path_19108" data-name="Path 19108" d="M10.822,80.781l3.6,1.971,3.6-1.971,10.82,5.908H0l10.817-5.9Z" transform="translate(0 -61.689)" fill="#f6cf76"/>
26
+ <path id="Path_19109" data-name="Path 19109" d="M43.593,80.164h8.115l-4,2.117Z" transform="translate(-33.29 -61.218)" fill="#41566b"/>
27
+ <rect id="Rectangle_27956" data-name="Rectangle 27956" width="1.43" height="0.709" transform="translate(11.832 11.416)" fill="#40566b"/>
28
+ <rect id="Rectangle_27957" data-name="Rectangle 27957" width="1.43" height="0.709" transform="translate(15.214 11.416)" fill="#40566b"/>
29
+ <path id="Path_19110" data-name="Path 19110" d="M56.423,59.966a2.1,2.1,0,0,1-1.089-.3l.368-.606a1.394,1.394,0,0,0,1.775-.28l.535.466a2.108,2.108,0,0,1-1.588.724" transform="translate(-42.256 -44.885)" fill="#40566b"/>
30
+ </g>
31
+ </g>
32
+ </g>
31
33
  </g>
32
34
  </g>
33
35
  </svg>
@@ -1,2 +1,2 @@
1
1
  import { ContactCardI } from '../../interfaces';
2
- export declare const ContactCard: ({ apiError, contact, index, menuItems, onClick, showAvatar, showHeader, }: ContactCardI) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const ContactCard: ({ apiError, contact, index, menuItems, onClick, onShare, showAvatar, showHeader, }: ContactCardI) => import("react/jsx-runtime").JSX.Element;
@@ -1,12 +1,12 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Box, Container, Flex, Stack } from '@chakra-ui/react';
3
- import { ContactCardHeader, ContactCardInfo, ContactCardAddress, IconMenu, MoreHorizontal, } from '../../components';
2
+ import { Box, Container, Flex, IconButton, Stack } from '@chakra-ui/react';
3
+ import { ContactCardHeader, ContactCardInfo, ContactCardAddress, IconMenu, MoreHorizontal, Share, } from '../../components';
4
4
  import { colors } from '../../theme/colors';
5
- export const ContactCard = ({ apiError, contact, index, menuItems, onClick, showAvatar, showHeader = true, }) => {
5
+ export const ContactCard = ({ apiError, contact, index, menuItems, onClick, onShare, showAvatar, showHeader = true, }) => {
6
6
  const hasOnClick = typeof onClick === 'function';
7
7
  return (_jsxs(Box, { position: "relative", w: "100%", children: [_jsx(Container, { maxW: "none", textAlign: "start", onClick: () => onClick === null || onClick === void 0 ? void 0 : onClick(Object.assign(Object.assign({}, contact), { index })), transition: "background-color 0.3s", _hover: {
8
8
  bg: hasOnClick ? 'lightGreen.1' : 'neutral.white',
9
- }, cursor: hasOnClick ? 'pointer' : 'default', children: _jsxs(Stack, { pb: "base", pt: "1", px: "base", spacing: "base", children: [showHeader && (_jsx(ContactCardHeader, { apiError: apiError, contact: contact })), _jsx(CardBody, { contact, index, showAvatar })] }) }), _jsx(Box, { position: "absolute", right: "1", top: "0", zIndex: "overlay", children: _jsx(IconMenu, { icon: _jsx(MoreHorizontal, { size: 32 }), itemForm: contact, menuItems: menuItems, disabled: Number(menuItems === null || menuItems === void 0 ? void 0 : menuItems.length) < 1 }) })] }));
9
+ }, cursor: hasOnClick ? 'pointer' : 'default', children: _jsxs(Stack, { pb: "base", pt: "1", px: "base", spacing: "base", children: [showHeader && (_jsx(ContactCardHeader, { apiError: apiError, contact: contact })), _jsx(CardBody, { contact, index, showAvatar })] }) }), Number(menuItems === null || menuItems === void 0 ? void 0 : menuItems.length) > 0 && (_jsx(Box, { position: "absolute", right: "1", top: "0", zIndex: "overlay", children: _jsx(IconMenu, { icon: _jsx(MoreHorizontal, { size: 32 }), itemForm: contact, menuItems: menuItems, disabled: Number(menuItems === null || menuItems === void 0 ? void 0 : menuItems.length) < 1 }) })), onShare && (_jsx(Box, { position: "absolute", right: "2", bottom: "2", children: _jsx(IconButton, { variant: "icon", icon: _jsx(Share, { size: 14 }), onClick: () => onShare(contact), "aria-label": "share-contact" }) }))] }));
10
10
  };
11
11
  const CardBody = ({ contact, index, showAvatar, }) => {
12
12
  return (_jsxs(Flex, { justify: "space-between", align: "end", gap: "base", children: [_jsx(ContactCardInfo, Object.assign({}, contact, { index, showAvatar })), _jsx(Box, { borderLeft: `1px solid ${colors.lightBlue[1]}`, w: "45%", pl: "base", children: _jsx(ContactCardAddress, Object.assign({}, contact)) })] }));
@@ -1,2 +1,2 @@
1
1
  import { ContactsContentI } from '../../interfaces';
2
- export declare const ContactsContent: ({ apiError, contacts, menuItems, handleClose, children, handleAdd, disabled, onClick, onDeleteContacts, onShareContacts, showLoadMore, handleLoadMore, loadMoreDisabled }: ContactsContentI) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const ContactsContent: ({ apiError, contacts, menuItems, handleClose, children, handleAdd, disabled, onClick, onDeleteContacts, onShareContacts, showLoadMore, handleLoadMore, loadMoreDisabled, }: ContactsContentI) => import("react/jsx-runtime").JSX.Element;
@@ -1,10 +1,10 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { t } from 'i18next';
3
- import { DrawerContent, DrawerHeader, DrawerBody, Flex, Stack, Checkbox, Box, Text, DrawerFooter, Button } from '@chakra-ui/react';
3
+ import { DrawerContent, DrawerHeader, DrawerBody, Flex, Stack, Checkbox, Box, Text, DrawerFooter, Button, } from '@chakra-ui/react';
4
4
  import { Contacts } from '../../assets/images';
5
5
  import { ContactCard, FooterButtons, FooterDrawer, LeftButtonAnimated, LetterDivider, PanelHeader, SearchInput, } from '../../components';
6
6
  import { useAssignableList, useContactsContent, useWindowDimensions, } from '../../hooks';
7
- export const ContactsContent = ({ apiError, contacts, menuItems, handleClose, children, handleAdd, disabled, onClick, onDeleteContacts, onShareContacts, showLoadMore, handleLoadMore, loadMoreDisabled }) => {
7
+ export const ContactsContent = ({ apiError, contacts, menuItems, handleClose, children, handleAdd, disabled, onClick, onDeleteContacts, onShareContacts, showLoadMore, handleLoadMore, loadMoreDisabled, }) => {
8
8
  const { contactsWithoutFirstOrLastName, handleChange, search, splittedContacts, } = useContactsContent(contacts);
9
9
  const { getContactByIds, handleItemSelect, handleSelectAll, isItemSelected, itemsSelected, } = useAssignableList({
10
10
  onItemSelectedChange: () => null,
@@ -17,12 +17,12 @@ export const ContactsContent = ({ apiError, contacts, menuItems, handleClose, ch
17
17
  const showLetterDivider = idx !== 0;
18
18
  return (_jsxs(Stack, { spacing: "0", children: [showLetterDivider && _jsx(LetterDivider, { letter: letter }), _jsx(Stack, { spacing: "2px", children: splittedContacts[letter].map((contact, idx) => {
19
19
  const selected = isItemSelected(contact._id);
20
- return (_jsx(Card, { apiError: apiError, contact: contact, onClick: onClick, index: idx, menuItems: menuItems, selected: selected, onChange: handleItemSelect }, contact._id));
20
+ return (_jsx(Card, { apiError: apiError, contact: contact, onClick: onClick, index: idx, menuItems: menuItems, selected: selected, onChange: handleItemSelect, onShareContact: (contact) => onShareContacts([contact]) }, contact._id));
21
21
  }) })] }, letter));
22
22
  }) }), Number(contactsWithoutFirstOrLastName.length) > 0 && (_jsx(LetterDivider, { letter: "Others" })), _jsx(Box, { children: contactsWithoutFirstOrLastName.map((contact, idx) => {
23
23
  const selected = isItemSelected(contact._id);
24
- return (_jsx(Card, { apiError: apiError, contact: contact, onClick: onClick, index: idx, menuItems: menuItems, selected: selected, onChange: handleItemSelect }, contact._id));
25
- }) })] }), children, showLoadMore && (_jsx(Flex, { justifyContent: 'center', bg: "lightBlue.2", p: '1rem', children: _jsx(Button, { onClick: handleLoadMore, variant: "primaryFooter", disabled: loadMoreDisabled, children: t('buttons.loadMore') }) }))] }), _jsx(DrawerFooter, { p: "0", zIndex: "overlay", children: _jsx(FooterDrawer, { isOpen: !isDisabled, children: _jsx(FooterButtons, { button1: {
24
+ return (_jsx(Card, { apiError: apiError, contact: contact, onClick: onClick, index: idx, menuItems: menuItems, selected: selected, onChange: handleItemSelect, onShareContact: (contact) => onShareContacts([contact]) }, contact._id));
25
+ }) })] }), children, showLoadMore && (_jsx(Flex, { justifyContent: 'center', bg: "lightBlue.2", p: '1rem', children: _jsx(Button, { onClick: handleLoadMore, variant: 'primaryFooter', disabled: loadMoreDisabled, children: t('buttons.loadMore') }) }))] }), _jsx(DrawerFooter, { p: "0", zIndex: "overlay", children: _jsx(FooterDrawer, { isOpen: !isDisabled, children: _jsx(FooterButtons, { button1: {
26
26
  buttonStyle: 'primaryFooter',
27
27
  label: t('buttons.share'),
28
28
  onClick: () => onShareContacts(getContactByIds(itemsSelected)),
@@ -32,6 +32,6 @@ export const ContactsContent = ({ apiError, contacts, menuItems, handleClose, ch
32
32
  onClick: () => onDeleteContacts(itemsSelected),
33
33
  } }) }) })] }));
34
34
  };
35
- const Card = ({ apiError, contact, onClick, index, menuItems, selected, onChange, }) => {
36
- return (_jsxs(Flex, { gap: "3", pl: "base", bg: selected ? 'lightBlue.6' : 'transparent', children: [_jsx(Checkbox, { isChecked: selected, onChange: () => onChange(contact._id) }), _jsx(ContactCard, { apiError: apiError, contact: contact, menuItems: menuItems, onClick: onClick, index: index }, contact._id)] }, contact._id));
35
+ const Card = ({ apiError, contact, onClick, index, menuItems, selected, onChange, onShareContact, }) => {
36
+ return (_jsxs(Flex, { gap: "3", pl: "base", bg: selected ? 'lightBlue.6' : 'transparent', children: [_jsx(Checkbox, { isChecked: selected, onChange: () => onChange(contact._id) }), _jsx(ContactCard, { apiError: apiError, contact: contact, menuItems: menuItems, onClick: onClick, index: index, onShare: onShareContact }, contact._id)] }, contact._id));
37
37
  };
@@ -3,5 +3,5 @@ import { t } from 'i18next';
3
3
  import { Box, Stack, Flex, IconButton, Tooltip, Text } from '@chakra-ui/react';
4
4
  import { Edit } from '../../components';
5
5
  export const HomeCardReadOnly = ({ city, edit = true, externalLink, handleEditClick, maxW, mail, name, number, phone, street, state, zip, }) => {
6
- return (_jsx(Box, { w: maxW, children: _jsxs(Stack, { px: "base", pb: "base", pt: "base", bg: "neutral.white", spacing: "1", children: [_jsxs(Flex, { justify: "space-between", align: "center", children: [_jsx(Text, { variant: "heading6", noOfLines: 1, textOverflow: "ellipsis", children: name }), edit && (_jsx(Tooltip, { label: t('tooltips.editDetails'), children: _jsx(IconButton, { variant: "menuIconWithShadow", maxW: "fit-content", "aria-label": t('ariaLabels.edit'), p: "1", icon: _jsx(Edit, {}), onClick: handleEditClick, id: "editHomeIcon" }) }))] }), _jsxs(Box, { children: [_jsxs(Flex, { justify: "space-between", align: "center", children: [_jsx(Text, { variant: "info", children: `${number} ${street}` }), mail && _jsx(Text, { variant: "email", children: mail })] }), _jsx(Text, { variant: "info", children: `${city} ${state} ${zip}` }), phone && (_jsx(Text, { variant: "info", mt: "-1.5", children: phone }))] }), externalLink && (_jsx(Text, { fontSize: "xs", fontFamily: "secondary", color: "blue.3", textOverflow: "ellipsis", noOfLines: 1, children: externalLink }))] }) }));
6
+ return (_jsx(Box, { w: maxW, children: _jsxs(Stack, { px: "base", pb: "base", pt: "0.25rem", bg: "neutral.white", spacing: "1", children: [_jsxs(Flex, { justify: "space-between", align: "center", children: [_jsx(Text, { variant: "heading6", noOfLines: 1, textOverflow: "ellipsis", children: name }), edit && (_jsx(Tooltip, { label: t('tooltips.editDetails'), children: _jsx(IconButton, { variant: "menuIconWithShadow", maxW: "fit-content", "aria-label": t('ariaLabels.edit'), p: "1", icon: _jsx(Edit, {}), onClick: handleEditClick, id: "editHomeIcon" }) }))] }), _jsxs(Box, { children: [_jsxs(Flex, { justify: "space-between", align: "center", children: [_jsx(Text, { variant: "info", lineHeight: "20px", children: `${number} ${street}` }), mail && _jsx(Text, { variant: "email", children: mail })] }), _jsx(Text, { variant: "info", lineHeight: "20px", children: `${city} ${state} ${zip}` }), phone && (_jsx(Text, { variant: "info", mt: "-1.5", children: phone }))] }), externalLink && (_jsx(Text, { fontSize: "xs", fontFamily: "secondary", color: "blue.3", textOverflow: "ellipsis", noOfLines: 1, children: externalLink }))] }) }));
7
7
  };
@@ -22,7 +22,7 @@ export const HomeCardRecords = ({ records = {}, onAddRecords, onViewDetails, })
22
22
  return (_jsx(Box, { p: "base", children: _jsxs(Container, { children: [records.lien !== undefined && (_jsx(Box, { p: "base", borderBottom: "1px solid", borderColor: "lightBlue.2", bg: records.lien ? 'error.1' : '', children: _jsxs(Flex, { align: "center", gap: "base", children: [records.lien && (_jsx(Center, { rounded: "full", boxSize: "28px", bg: "error.2", children: _jsx(Image, { src: Exclamation, h: "16px", w: "auto" }) })), _jsx(Text, { fontFamily: "secondary", fontSize: "sm", children: records.lien
23
23
  ? t('homeBoard.records.hasLien')
24
24
  : t('homeBoard.records.noLien') })] }) })), _jsx(Box, { children: _jsx(Grid, { templateColumns: "repeat(2, 1fr)", templateRows: "repeat(4, 1fr)", p: "base", columnGap: "base", borderBottom: "1px solid", borderColor: "lightBlue.2", autoFlow: "column", children: recordsMapped &&
25
- Object.entries(recordsMapped).map(([label, value = '']) => (_jsx(GridItem, { children: _jsxs(Flex, { children: [_jsx(Text, { fontFamily: "secondary", color: "gray.2", fontSize: "xs", noOfLines: 1, minW: "fit-content", lineHeight: "21px", children: label }), _jsx(Text, { fontFamily: "secondary", fontWeight: "semibold", textAlign: "right", fontSize: "xs", noOfLines: 1, flex: "auto", lineHeight: "21px", textTransform: "capitalize", children: value })] }) }, label + value))) }) }), _jsx(Center, { py: "base", children: _jsx(Button, { variant: "text", onClick: onViewDetails, children: t('homeBoard.viewDetails') }) })] }) }));
25
+ Object.entries(recordsMapped).map(([label, value = '']) => (_jsx(GridItem, { children: _jsxs(Flex, { children: [_jsx(Text, { fontFamily: "secondary", color: "gray.2", fontSize: "14px", noOfLines: 1, minW: "fit-content", lineHeight: "18px", children: label }), _jsx(Text, { fontFamily: "secondary", fontWeight: "semibold", textAlign: "right", fontSize: "14px", noOfLines: 1, flex: "auto", lineHeight: "18px", textTransform: "capitalize", children: value })] }) }, label + value))) }) }), _jsx(Center, { py: "base", children: _jsx(Button, { variant: "text", onClick: onViewDetails, children: t('homeBoard.viewDetails') }) })] }) }));
26
26
  };
27
27
  const AddHomeRecords = ({ onAddRecords, }) => {
28
28
  return (_jsxs(Stack, { px: "base", py: "6", spacing: "base", children: [_jsx(Text, { variant: "home", textAlign: "center", children: t('homeBoard.publicRecords') }), _jsxs(Button, { variant: "secondary", textTransform: "capitalize", onClick: onAddRecords, gap: "base", bg: "neutral.white", children: [_jsx(Plus, { stroke: colors.blue['2'] }), t('homeBoard.addRecords')] })] }));
@@ -0,0 +1,4 @@
1
+ export declare const Share: ({ stroke, size }: {
2
+ stroke?: string | undefined;
3
+ size?: number | undefined;
4
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { colors } from '../../theme/colors';
3
+ export const Share = ({ stroke = colors.blue[3], size = 24 }) => {
4
+ return (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 16.256 17.896", children: _jsxs("g", { id: "Icon_feather-share-2", "data-name": "Icon feather-share-2", transform: "translate(-3.75 -2.25)", children: [_jsx("path", { id: "Caminho_18690", "data-name": "Caminho 18690", d: "M27.419,5.459A2.459,2.459,0,1,1,24.959,3,2.459,2.459,0,0,1,27.419,5.459Z", transform: "translate(-8.163 0)", fill: "none", stroke: stroke, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5" }), _jsx("path", { id: "Caminho_18691", "data-name": "Caminho 18691", d: "M9.419,15.959A2.459,2.459,0,1,1,6.959,13.5,2.459,2.459,0,0,1,9.419,15.959Z", transform: "translate(0 -4.761)", fill: "none", stroke: stroke, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5" }), _jsx("path", { id: "Caminho_18692", "data-name": "Caminho 18692", d: "M27.419,26.459A2.459,2.459,0,1,1,24.959,24,2.459,2.459,0,0,1,27.419,26.459Z", transform: "translate(-8.163 -9.523)", fill: "none", stroke: stroke, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5" }), _jsx("path", { id: "Caminho_18693", "data-name": "Caminho 18693", d: "M12.885,20.265l5.6,3.263", transform: "translate(-3.802 -7.829)", fill: "none", stroke: stroke, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5" }), _jsx("path", { id: "Caminho_18694", "data-name": "Caminho 18694", d: "M18.476,9.765l-5.591,3.263", transform: "translate(-3.802 -3.068)", fill: "none", stroke: stroke, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5" })] }) }));
5
+ };
@@ -25,6 +25,7 @@ export * from './MoreHorizontal';
25
25
  export * from './OpenVideo';
26
26
  export * from './Plus';
27
27
  export * from './SearchIcon';
28
+ export * from './Share';
28
29
  export * from './ShareIcon';
29
30
  export * from './Star';
30
31
  export * from './TikTok';
@@ -25,6 +25,7 @@ export * from './MoreHorizontal';
25
25
  export * from './OpenVideo';
26
26
  export * from './Plus';
27
27
  export * from './SearchIcon';
28
+ export * from './Share';
28
29
  export * from './ShareIcon';
29
30
  export * from './Star';
30
31
  export * from './TikTok';
@@ -32,6 +32,7 @@ export interface ContactCardI {
32
32
  index: number;
33
33
  menuItems?: MenuItemI[];
34
34
  onClick?: (contact: ContactAndIndexForm) => void;
35
+ onShare?: (contact: InfoContactCardI) => void;
35
36
  showAvatar?: boolean;
36
37
  showHeader?: boolean;
37
38
  }
@@ -26,4 +26,5 @@ export interface CardOnContactListI {
26
26
  menuItems: ContactsContentI['menuItems'];
27
27
  selected: boolean;
28
28
  onChange: (id: string) => void;
29
+ onShareContact: (contact: InfoContactCardI) => void;
29
30
  }
@@ -0,0 +1,5 @@
1
+ import { Meta } from '@storybook/react';
2
+ import { Share } from '../../components';
3
+ declare const _default: Meta<typeof Share>;
4
+ export default _default;
5
+ export declare const ShareComponent: typeof Share;
@@ -0,0 +1,11 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Center } from '@chakra-ui/react';
3
+ import { Share } from '../../components';
4
+ import { colors } from '../../theme/colors';
5
+ export default {
6
+ title: 'Components/Icons',
7
+ component: Share,
8
+ };
9
+ export const ShareComponent = (args) => {
10
+ return (_jsx(Center, { width: "10rem", p: "base", bg: "white", children: _jsx(Share, Object.assign({}, args, { stroke: colors.blue[1] })) }));
11
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homefile/components-v2",
3
- "version": "2.39.3",
3
+ "version": "2.39.5",
4
4
  "author": "Homefile",
5
5
  "license": "UNLICENSED",
6
6
  "typings": "dist/index.d.ts",