@homefile/components-v2 2.7.10 → 2.7.12

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.
@@ -3,7 +3,7 @@ import { MenuButton, IconButton, Menu, MenuItem, MenuList, Box, } from '@chakra-
3
3
  import { Overlay } from '..';
4
4
  import { Fragment } from 'react/jsx-runtime';
5
5
  export const IconMenu = ({ disabled = false, icon, itemForm, menuItems, onClick, variant = 'menuIcon', width = 'fit-content', zIndex = '999', }) => {
6
- return (_jsx(Box, { zIndex: zIndex, children: _jsx(Menu, { isLazy: true, children: ({ isOpen }) => (_jsxs(_Fragment, { children: [_jsx(Overlay, { bg: "overlay", showOverlay: isOpen, position: "fixed" }), _jsx(MenuButton, { as: IconButton, "aria-label": "Options", icon: _jsx(Fragment, { children: icon }), variant: variant, w: width, disabled: disabled, marginTop: "0 !important", onClick: onClick }), _jsx(MenuList, { zIndex: "5", children: menuItems === null || menuItems === void 0 ? void 0 : menuItems.map(({ handleClick, label }) => (_jsx(MenuItem, { "data-testid": label, onClick: () => handleClick(itemForm), _hover: {
6
+ return (_jsx(Box, { zIndex: zIndex, children: _jsx(Menu, { isLazy: true, children: ({ isOpen }) => (_jsxs(_Fragment, { children: [_jsx(Overlay, { bg: "overlay", showOverlay: isOpen, position: "fixed" }), _jsx(MenuButton, { as: IconButton, "aria-label": "Options", icon: _jsx(Fragment, { children: icon }), variant: variant, w: width, disabled: disabled, marginTop: "0 !important", onClick: onClick, "data-testid": "icon-menu" }), _jsx(MenuList, { zIndex: "5", children: menuItems === null || menuItems === void 0 ? void 0 : menuItems.map(({ handleClick, label }) => (_jsx(MenuItem, { "data-testid": label, onClick: () => handleClick(itemForm), _hover: {
7
7
  bg: 'lightGreen.1',
8
8
  }, _focus: {
9
9
  bg: 'lightGreen.1',
@@ -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.12",
4
4
  "author": "Homefile",
5
5
  "license": "UNLICENSED",
6
6
  "typings": "dist/index.d.ts",
@@ -35,6 +35,7 @@ export const IconMenu = <T extends unknown>({
35
35
  disabled={disabled}
36
36
  marginTop="0 !important"
37
37
  onClick={onClick}
38
+ data-testid="icon-menu"
38
39
  />
39
40
  <MenuList zIndex="5">
40
41
  {menuItems?.map(({ handleClick, label }) => (
@@ -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
  <>