@homefile/components-v2 2.37.3 → 2.37.4

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.
@@ -9,5 +9,5 @@ export const ContactCard = ({ apiError, contact, index, menuItems, onClick, show
9
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 }) })] }));
10
10
  };
11
11
  const CardBody = ({ contact, index, showAvatar, }) => {
12
- return (_jsxs(Flex, { justify: "space-between", align: "stretch", 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)) })] }));
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)) })] }));
13
13
  };
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Stack, Text } from '@chakra-ui/react';
3
3
  export const ContactCardAddress = ({ address, city, company, state, zip, }) => {
4
- return (_jsxs(Stack, { spacing: "-1", minH: "full", children: [_jsx(Text, { variant: "address", children: company === null || company === void 0 ? void 0 : company.toUpperCase() }), _jsx(Text, { variant: "address", children: address }), _jsxs(Text, { variant: "address", children: [city, ", ", state, " ", zip] })] }));
4
+ return (_jsxs(Stack, { spacing: "0", minH: "full", children: [_jsx(Text, { variant: "address", children: company }), _jsx(Text, { variant: "address", children: address }), _jsxs(Text, { variant: "address", children: [city, ", ", state, " ", zip] })] }));
5
5
  };
@@ -3,5 +3,5 @@ import { Avatar, Box, Flex, Stack, Text } from '@chakra-ui/react';
3
3
  import { randomColor } from '../../utils';
4
4
  export const ContactCardInfo = ({ company, email, firstName, index, lastName, phone, showAvatar = true, }) => {
5
5
  const name = `${firstName} ${lastName}`.trim() || company;
6
- return (_jsxs(Flex, { gap: "base", minH: "50px", align: "center", children: [showAvatar && (_jsx(Avatar, { w: "40px", h: "40px", bg: randomColor(index), fontWeight: "bold", color: "neutral.white", name: name })), _jsxs(Stack, { w: "full", spacing: "0.5", children: [_jsx(Text, { fontWeight: "bold", children: name }), _jsxs(Box, { children: [_jsx(Text, { fontSize: "xs", children: phone }), _jsx(Text, { variant: "email", lineHeight: "0.8", children: email })] })] })] }));
6
+ return (_jsxs(Flex, { gap: "5", minH: "50px", align: "center", children: [showAvatar && (_jsx(Avatar, { w: "40px", h: "40px", bg: randomColor(index), fontWeight: "bold", color: "neutral.white", name: name })), _jsxs(Stack, { w: "full", spacing: "0.5", children: [_jsx(Text, { fontWeight: "medium", lineHeight: "16px", children: name }), _jsxs(Box, { children: [_jsx(Text, { fontSize: "12px", fontFamily: "secondary", lineHeight: "15px", children: phone }), _jsx(Text, { variant: "email", fontSize: "12px", fontFamily: "secondary", lineHeight: "15px", children: email })] })] })] }));
7
7
  };
@@ -2,9 +2,13 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { ContactCard } from '../../components';
3
3
  import { ContactsMock } from '../../mocks';
4
4
  import { action } from '@storybook/addon-actions';
5
+ import { Box } from '@chakra-ui/react';
5
6
  export default {
6
7
  title: 'Components/Contacts',
7
8
  component: ContactCard,
9
+ decorators: [
10
+ (Story) => (_jsx(Box, { maxW: "440px", children: _jsx(Story, {}) })),
11
+ ],
8
12
  };
9
13
  export const ContactCardComponent = (args) => {
10
14
  return _jsx(ContactCard, Object.assign({}, args));
@@ -85,8 +85,7 @@ export declare const Text: {
85
85
  address: {
86
86
  fontSize: string;
87
87
  fontFamily: string;
88
- diplay: string;
89
- marginTop: string;
88
+ lineHeight: string;
90
89
  };
91
90
  receipt: {
92
91
  fontSize: string;
@@ -83,10 +83,9 @@ export const Text = {
83
83
  fontWeight: 'regular',
84
84
  },
85
85
  address: {
86
- fontSize: 'xs',
86
+ fontSize: '12px',
87
87
  fontFamily: 'secondary',
88
- diplay: 'block-inline',
89
- marginTop: 'auto',
88
+ lineHeight: '16px',
90
89
  },
91
90
  receipt: {
92
91
  fontSize: 'xs',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homefile/components-v2",
3
- "version": "2.37.3",
3
+ "version": "2.37.4",
4
4
  "author": "Homefile",
5
5
  "license": "UNLICENSED",
6
6
  "typings": "dist/index.d.ts",