@homefile/components-v2 2.8.33 → 2.8.35
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/components/rooms/GroupsContainer.js +1 -1
- package/dist/components/rooms/GroupsHeader.js +1 -1
- package/dist/components/rooms/RoomHeader.js +1 -1
- package/dist/components/rooms/RoomsMenu.js +1 -1
- package/package.json +1 -1
- package/src/components/rooms/GroupsContainer.tsx +1 -0
- package/src/components/rooms/GroupsHeader.tsx +1 -1
- package/src/components/rooms/RoomHeader.tsx +1 -1
- package/src/components/rooms/RoomsMenu.tsx +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Stack } from '@chakra-ui/react';
|
|
3
3
|
export const GroupsContainer = ({ children }) => {
|
|
4
|
-
return (_jsx(Stack, { spacing: "10", bgGradient: "linear(to-b, lightBlue.6, transparent)", py: "2", px: "base", children: children }));
|
|
4
|
+
return (_jsx(Stack, { spacing: "10", bgGradient: "linear(to-b, lightBlue.6, transparent)", py: "2", px: "base", "data-testid": "groups-container", children: children }));
|
|
5
5
|
};
|
|
@@ -5,5 +5,5 @@ import { GroupContent, LeftButton, RightPanel } from '..';
|
|
|
5
5
|
import { useGroupsHeader } from '../../hooks';
|
|
6
6
|
export const GroupsHeader = ({ groupList, onClick, showingTour = false, disabled, }) => {
|
|
7
7
|
const { handleClick, isOpen, onOpen, onClose } = useGroupsHeader(onClick);
|
|
8
|
-
return (_jsxs(Box, { w: "10rem", ml: "auto", children: [_jsx(LeftButton, { onClick: onOpen, height: "2rem", label: t('addRoomGroup.addBtn'), position: "absolute", right: "0", disabled: disabled, id: "addItemToGroup", w: "fit-content" }), _jsx(RightPanel, { children: _jsx(GroupContent, { groupList: groupList, onClick: handleClick, onClose: onClose }), isOpen: showingTour || isOpen, onClose: onClose, size: "xs", overlay: !showingTour })] }));
|
|
8
|
+
return (_jsxs(Box, { w: "10rem", ml: "auto", "data-testid": "groups-header", children: [_jsx(LeftButton, { onClick: onOpen, height: "2rem", label: t('addRoomGroup.addBtn'), position: "absolute", right: "0", disabled: disabled, id: "addItemToGroup", w: "fit-content" }), _jsx(RightPanel, { children: _jsx(GroupContent, { groupList: groupList, onClick: handleClick, onClose: onClose }), isOpen: showingTour || isOpen, onClose: onClose, size: "xs", overlay: !showingTour })] }));
|
|
9
9
|
};
|
|
@@ -6,7 +6,7 @@ import { roomIcons } from '../../helpers';
|
|
|
6
6
|
import { useRoomHeader } from '../../hooks';
|
|
7
7
|
export const RoomHeader = ({ isDeleteDisabled, onClickDelete, onSubmit, room, roomAmount, disabled, }) => {
|
|
8
8
|
const { formattedAmount, handleChange, handleClick, inputValue, isEditing } = useRoomHeader({ onSubmit, room, roomAmount });
|
|
9
|
-
return (_jsx(Box, { w: "full", bg: "lightBlue.4", py: "2", px: "base", children: _jsxs(Flex, { justify: "space-between", align: "center", children: [_jsxs(Flex, { w: "fit-content", children: [_jsx(Center, { h: "2.3rem", minW: "2.6rem", mr: "2", children: _jsx(Image, { alt: room.name, maxH: "2rem", src: roomIcons[room.type], w: "auto" }) }), _jsx(TextInput, { fontWeight: isEditing ? 'regular' : 'medium', fontSize: "1.25rem", fontFamily: "primary", handleChange: handleChange, height: "full", id: room.name, isDisabled: !isEditing || disabled, placeholder: "", value: isEditing && !disabled
|
|
9
|
+
return (_jsx(Box, { w: "full", bg: "lightBlue.4", py: "2", px: "base", "data-testid": "room-header", children: _jsxs(Flex, { justify: "space-between", align: "center", children: [_jsxs(Flex, { w: "fit-content", children: [_jsx(Center, { h: "2.3rem", minW: "2.6rem", mr: "2", children: _jsx(Image, { alt: room.name, maxH: "2rem", src: roomIcons[room.type], w: "auto" }) }), _jsx(TextInput, { fontWeight: isEditing ? 'regular' : 'medium', fontSize: "1.25rem", fontFamily: "primary", handleChange: handleChange, height: "full", id: room.name, isDisabled: !isEditing || disabled, placeholder: "", value: isEditing && !disabled
|
|
10
10
|
? inputValue || ''
|
|
11
11
|
: (inputValue === null || inputValue === void 0 ? void 0 : inputValue.toUpperCase()) || '' }), isEditing && !disabled ? (_jsx(Button, { variant: "tertiary", onClick: handleClick, ml: "2", children: t('roomHeader.saveBtn') })) : (_jsx(IconButton, { "aria-label": t('ariaLabels.edit'), icon: _jsx(Edit, {}), maxW: "fit-content", onClick: handleClick, px: "2", variant: "menuIconWithShadow", id: "customizeRoomName" }))] }), _jsxs(Flex, { align: "center", gap: "6", children: [_jsxs(Flex, { align: "center", gap: "6", id: "trackRoomValue", bg: "lightBlue.4", children: [_jsx(Show, { breakpoint: "(min-width: 600px)", children: _jsx(Text, { fontWeight: "medium", variant: "caption", children: t('roomHeader.roomValue').toUpperCase() }) }), _jsx(Text, { variant: "titleBolder", children: formattedAmount }), _jsx(Show, { breakpoint: "(min-width: 600px)", children: _jsx(Box, { h: "5", w: "1px", bg: "lightBlue.6" }) })] }), _jsx(IconButton, { "aria-label": t('ariaLabels.delete'), icon: _jsx(TrashIcon, {}), maxW: "fit-content", onClick: () => onClickDelete(room._id), disabled: isDeleteDisabled, px: "1", variant: "menuIconWithShadow" })] })] }) }));
|
|
12
12
|
};
|
|
@@ -7,7 +7,7 @@ import { House } from '../../assets/images';
|
|
|
7
7
|
export const RoomsMenu = ({ activeRoom, rooms, roomsToAdd, onClick, onHomeClick, onAddRoom, disabled, }) => {
|
|
8
8
|
const { handleDragStart, handleDrop, newRooms } = useRoomList(rooms);
|
|
9
9
|
const { isOpen, onOpen, onClose } = useDisclosure();
|
|
10
|
-
return (_jsx(Show, { breakpoint: "(min-width:
|
|
10
|
+
return (_jsx(Show, { breakpoint: "(min-width: 591px)", children: _jsxs(Box, { bg: "neutral.white", minW: "fit-content", "data-testid": "rooms-menu", children: [_jsxs(Box, { w: "container.roomIcon", minW: "container.roomIcon", transition: "all 0.2s ease-in-out", bg: "lightBlue.4", children: [_jsx(Box, { overflow: "hidden", children: _jsx(Tooltip, { hasArrow: true, isDisabled: false, label: t('addRoom.addBtn'), placement: "right", children: _jsx(Box, { as: "button", w: "full", h: "container.masthead", onClick: onOpen, transition: "all 0.2s ease-in-out", bg: "blue.2", disabled: disabled, overflow: "hidden", _hover: { backgroundColor: 'blue.3' }, _disabled: {
|
|
11
11
|
filter: 'grayscale(100%)',
|
|
12
12
|
pointerEvents: 'none',
|
|
13
13
|
}, children: _jsx(Center, { minW: "container.roomIcon", children: _jsx(Plus, {}) }) }) }) }), _jsx(Tooltip, { hasArrow: true, isDisabled: activeRoom === 'homeboard', label: t('rooms.homeboard'), placement: "right", children: _jsx(Box, { w: "full", as: "button", h: "3.2rem", bg: activeRoom === 'homeboard' ? 'lightGreen.3' : 'neutral.white', onClick: onHomeClick, children: _jsx(Center, { minW: "container.roomIcon", children: _jsx(Image, { src: House, alt: t('ariaLabels.returnHomeBoard'), w: "1.5rem", h: "auto" }) }) }) }), _jsx(Box, { children: newRooms.map((room, i) => {
|
package/package.json
CHANGED
|
@@ -13,7 +13,7 @@ export const GroupsHeader = ({
|
|
|
13
13
|
const { handleClick, isOpen, onOpen, onClose } = useGroupsHeader(onClick)
|
|
14
14
|
|
|
15
15
|
return (
|
|
16
|
-
<Box w="10rem" ml="auto">
|
|
16
|
+
<Box w="10rem" ml="auto" data-testid="groups-header">
|
|
17
17
|
<LeftButton
|
|
18
18
|
onClick={onOpen}
|
|
19
19
|
height="2rem"
|
|
@@ -26,7 +26,7 @@ export const RoomHeader = ({
|
|
|
26
26
|
useRoomHeader({ onSubmit, room, roomAmount })
|
|
27
27
|
|
|
28
28
|
return (
|
|
29
|
-
<Box w="full" bg="lightBlue.4" py="2" px="base">
|
|
29
|
+
<Box w="full" bg="lightBlue.4" py="2" px="base" data-testid="room-header">
|
|
30
30
|
<Flex justify="space-between" align="center">
|
|
31
31
|
<Flex w="fit-content">
|
|
32
32
|
<Center h="2.3rem" minW="2.6rem" mr="2">
|
|
@@ -25,7 +25,7 @@ export const RoomsMenu = ({
|
|
|
25
25
|
const { isOpen, onOpen, onClose } = useDisclosure()
|
|
26
26
|
|
|
27
27
|
return (
|
|
28
|
-
<Show breakpoint="(min-width:
|
|
28
|
+
<Show breakpoint="(min-width: 591px)">
|
|
29
29
|
<Box bg="neutral.white" minW="fit-content" data-testid="rooms-menu">
|
|
30
30
|
<Box
|
|
31
31
|
w="container.roomIcon"
|