@homefile/components-v2 2.7.10 → 2.7.11

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.
@@ -4,9 +4,10 @@ import { Box, chakra, Flex, Stack, Text } from '@chakra-ui/react';
4
4
  import { LetterBadge } from '../..';
5
5
  import { homeRoles } from '../../../helpers';
6
6
  const TypeContent = ({ description, type }) => {
7
+ var _a;
7
8
  const letter = type[0];
8
- return (_jsxs(Box, { p: "base", border: "1px", borderColor: "lightBlue.6", children: [_jsxs(Flex, { gap: "base", mb: "2", align: "center", children: [_jsx(LetterBadge, { bgColor: homeRoles[type.toLowerCase()].bg, letter: letter }), _jsx(Text, { fontSize: "md", fontWeight: "semibold", children: type })] }), _jsx(Text, { fontSize: "sm", textAlign: "left", lineHeight: "1.2", children: description })] }));
9
+ return (_jsxs(Box, { p: "base", border: "1px", borderColor: "lightBlue.6", children: [_jsxs(Flex, { gap: "base", mb: "2", align: "center", children: [_jsx(LetterBadge, { bgColor: (_a = homeRoles[type.toLowerCase()]) === null || _a === void 0 ? void 0 : _a.bg, letter: letter }), _jsx(Text, { fontSize: "md", fontWeight: "semibold", children: type })] }), _jsx(Text, { fontSize: "sm", textAlign: "left", lineHeight: "1.2", children: description })] }));
9
10
  };
10
11
  export const AccountTypeRow = () => {
11
- return (_jsxs(Stack, { spacing: "base", bg: "neutral.white", children: [_jsx(TypeContent, { description: _jsxs(_Fragment, { children: [t('tour.steps.inviteRoles.member.description1'), _jsx(chakra.span, { fontWeight: "semibold", children: t('tour.steps.inviteRoles.member.description2') }), t('tour.steps.inviteRoles.member.description3')] }), type: t('tour.steps.inviteRoles.types.member') }), _jsx(TypeContent, { description: _jsxs(_Fragment, { children: [t('tour.steps.inviteRoles.contributor.description1'), _jsx(chakra.span, { fontWeight: "semibold", fontStyle: "italic", children: t('tour.steps.inviteRoles.contributor.description2') }), _jsx(chakra.span, { fontWeight: "semibold", fontStyle: "italic", children: t('tour.steps.inviteRoles.contributor.description3') }), t('tour.steps.inviteRoles.contributor.description4'), _jsx(chakra.span, { fontWeight: "semibold", fontStyle: "italic", children: t('tour.steps.inviteRoles.contributor.description5') }), t('tour.steps.inviteRoles.contributor.description6'), _jsx(chakra.span, { fontWeight: "semibold", children: t('tour.steps.inviteRoles.contributor.description7') }), t('tour.steps.inviteRoles.contributor.description8')] }), type: t('tour.steps.inviteRoles.types.contributor') }), _jsx(TypeContent, { description: _jsxs(_Fragment, { children: [t('tour.steps.inviteRoles.manager.description1'), _jsx(chakra.span, { fontWeight: "semibold", fontStyle: "italic", children: t('tour.steps.inviteRoles.manager.description2') }), t('tour.steps.inviteRoles.manager.description3'), _jsx(chakra.span, { fontWeight: "semibold", fontStyle: "italic", children: t('tour.steps.inviteRoles.manager.description4') }), t('tour.steps.inviteRoles.manager.description5')] }), type: t('tour.steps.inviteRoles.types.manager') })] }));
12
+ return (_jsxs(Stack, { spacing: "base", bg: "neutral.white", "data-testid": "account-type-row", children: [_jsx(TypeContent, { description: _jsxs(_Fragment, { children: [t('tour.steps.inviteRoles.member.description1'), _jsx(chakra.span, { fontWeight: "semibold", children: t('tour.steps.inviteRoles.member.description2') }), t('tour.steps.inviteRoles.member.description3')] }), type: t('tour.steps.inviteRoles.types.member') }), _jsx(TypeContent, { description: _jsxs(_Fragment, { children: [t('tour.steps.inviteRoles.contributor.description1'), _jsx(chakra.span, { fontWeight: "semibold", fontStyle: "italic", children: t('tour.steps.inviteRoles.contributor.description2') }), _jsx(chakra.span, { fontWeight: "semibold", fontStyle: "italic", children: t('tour.steps.inviteRoles.contributor.description3') }), t('tour.steps.inviteRoles.contributor.description4'), _jsx(chakra.span, { fontWeight: "semibold", fontStyle: "italic", children: t('tour.steps.inviteRoles.contributor.description5') }), t('tour.steps.inviteRoles.contributor.description6'), _jsx(chakra.span, { fontWeight: "semibold", children: t('tour.steps.inviteRoles.contributor.description7') }), t('tour.steps.inviteRoles.contributor.description8')] }), type: t('tour.steps.inviteRoles.types.contributor') }), _jsx(TypeContent, { description: _jsxs(_Fragment, { children: [t('tour.steps.inviteRoles.manager.description1'), _jsx(chakra.span, { fontWeight: "semibold", fontStyle: "italic", children: t('tour.steps.inviteRoles.manager.description2') }), t('tour.steps.inviteRoles.manager.description3'), _jsx(chakra.span, { fontWeight: "semibold", fontStyle: "italic", children: t('tour.steps.inviteRoles.manager.description4') }), t('tour.steps.inviteRoles.manager.description5')] }), type: t('tour.steps.inviteRoles.types.manager') })] }));
12
13
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homefile/components-v2",
3
- "version": "2.7.10",
3
+ "version": "2.7.11",
4
4
  "author": "Homefile",
5
5
  "license": "UNLICENSED",
6
6
  "typings": "dist/index.d.ts",
@@ -10,7 +10,7 @@ const TypeContent = ({ description, type }: TypeContentI) => {
10
10
  <Box p="base" border="1px" borderColor="lightBlue.6">
11
11
  <Flex gap="base" mb="2" align="center">
12
12
  <LetterBadge
13
- bgColor={homeRoles[type.toLowerCase()].bg}
13
+ bgColor={homeRoles[type.toLowerCase()]?.bg}
14
14
  letter={letter}
15
15
  />
16
16
  <Text fontSize="md" fontWeight="semibold">
@@ -26,7 +26,7 @@ const TypeContent = ({ description, type }: TypeContentI) => {
26
26
 
27
27
  export const AccountTypeRow = () => {
28
28
  return (
29
- <Stack spacing="base" bg="neutral.white">
29
+ <Stack spacing="base" bg="neutral.white" data-testid="account-type-row">
30
30
  <TypeContent
31
31
  description={
32
32
  <>