@homefile/components-v2 2.2.1 → 2.2.2
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/assets/images/shine/house-washing.png +0 -0
- package/dist/assets/images/shine/index.d.ts +2 -1
- package/dist/assets/images/shine/index.js +2 -1
- package/dist/assets/images/shine/index.ts +2 -0
- package/dist/components/forms/dynamicForm/DynamicForm.js +1 -1
- package/dist/components/forms/dynamicForm/fields/CheckboxGroupField.d.ts +1 -1
- package/dist/components/forms/dynamicForm/fields/CheckboxGroupField.js +2 -2
- package/dist/components/forms/dynamicForm/fields/uiFields/TileBody.js +1 -1
- package/dist/components/forms/dynamicForm/fields/uiFields/TileBody.tsx +1 -1
- package/dist/components/forms/dynamicForm/fields/uiFields/TileBodyAction.js +1 -1
- package/dist/components/forms/dynamicForm/fields/uiFields/TileBodyAction.tsx +1 -1
- package/dist/components/forms/dynamicForm/fields/uiFields/TileBodyHeader.js +1 -1
- package/dist/components/forms/dynamicForm/fields/uiFields/TileBodyHeader.tsx +1 -1
- package/dist/components/forms/dynamicForm/fields/uiFields/TileBodySectionGrid.js +1 -1
- package/dist/components/forms/dynamicForm/fields/uiFields/TileBodySectionGrid.tsx +1 -1
- package/dist/components/homeAssistant/HomeAssistantButton.js +1 -1
- package/dist/components/homeAssistant/HomeMonitorButton.js +1 -1
- package/dist/components/homeAssistant/HomeMonitorSteps.js +2 -2
- package/dist/components/homeBoard/HomeBoard.js +1 -1
- package/dist/components/launchpad/IconMenu.js +7 -7
- package/dist/components/partner/PartnerFooter.js +1 -1
- package/dist/helpers/forms/dynamicForm.helper.js +2 -1
- package/dist/interfaces/forms/dynamicForm/DynamicForm.interface.d.ts +1 -1
- package/dist/mocks/forms/dynamicForm.mock.js +9 -0
- package/package.json +1 -1
- package/src/assets/images/shine/house-washing.png +0 -0
- package/src/assets/images/shine/index.ts +2 -0
- package/src/components/forms/dynamicForm/DynamicForm.tsx +1 -0
- package/src/components/forms/dynamicForm/fields/CheckboxGroupField.tsx +3 -2
- package/src/components/forms/dynamicForm/fields/uiFields/TileBody.tsx +1 -1
- package/src/components/forms/dynamicForm/fields/uiFields/TileBodyAction.tsx +1 -1
- package/src/components/forms/dynamicForm/fields/uiFields/TileBodyHeader.tsx +1 -1
- package/src/components/forms/dynamicForm/fields/uiFields/TileBodySectionGrid.tsx +1 -1
- package/src/components/homeAssistant/HomeAssistantButton.tsx +1 -1
- package/src/components/homeAssistant/HomeMonitorButton.tsx +3 -3
- package/src/components/homeAssistant/HomeMonitorSteps.tsx +5 -5
- package/src/components/homeBoard/HomeBoard.tsx +1 -1
- package/src/components/launchpad/IconMenu.tsx +37 -39
- package/src/components/partner/PartnerFooter.tsx +1 -1
- package/src/helpers/forms/dynamicForm.helper.ts +2 -0
- package/src/interfaces/forms/dynamicForm/DynamicForm.interface.ts +1 -0
- package/src/mocks/forms/dynamicForm.mock.ts +9 -0
|
Binary file
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import GutterCleaning from './gutter-cleaning.png';
|
|
2
2
|
import HomeCleaning from './home-cleaning.png';
|
|
3
|
+
import HouseWashing from './house-washing.png';
|
|
3
4
|
import HolidayLights from './holiday-lights.png';
|
|
4
5
|
import Pressure from './pressure.png';
|
|
5
6
|
import RoofCleaning from './roof-cleaning.png';
|
|
6
7
|
import WindowCleaning from './window.png';
|
|
7
|
-
export { GutterCleaning, HomeCleaning, HolidayLights, Pressure, RoofCleaning, WindowCleaning, };
|
|
8
|
+
export { GutterCleaning, HomeCleaning, HouseWashing, HolidayLights, Pressure, RoofCleaning, WindowCleaning, };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import GutterCleaning from './gutter-cleaning.png';
|
|
2
2
|
import HomeCleaning from './home-cleaning.png';
|
|
3
|
+
import HouseWashing from './house-washing.png';
|
|
3
4
|
import HolidayLights from './holiday-lights.png';
|
|
4
5
|
import Pressure from './pressure.png';
|
|
5
6
|
import RoofCleaning from './roof-cleaning.png';
|
|
6
7
|
import WindowCleaning from './window.png';
|
|
7
|
-
export { GutterCleaning, HomeCleaning, HolidayLights, Pressure, RoofCleaning, WindowCleaning, };
|
|
8
|
+
export { GutterCleaning, HomeCleaning, HouseWashing, HolidayLights, Pressure, RoofCleaning, WindowCleaning, };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import GutterCleaning from './gutter-cleaning.png'
|
|
2
2
|
import HomeCleaning from './home-cleaning.png'
|
|
3
|
+
import HouseWashing from './house-washing.png'
|
|
3
4
|
import HolidayLights from './holiday-lights.png'
|
|
4
5
|
import Pressure from './pressure.png'
|
|
5
6
|
import RoofCleaning from './roof-cleaning.png'
|
|
@@ -8,6 +9,7 @@ import WindowCleaning from './window.png'
|
|
|
8
9
|
export {
|
|
9
10
|
GutterCleaning,
|
|
10
11
|
HomeCleaning,
|
|
12
|
+
HouseWashing,
|
|
11
13
|
HolidayLights,
|
|
12
14
|
Pressure,
|
|
13
15
|
RoofCleaning,
|
|
@@ -63,7 +63,7 @@ export const DynamicForm = (_a) => {
|
|
|
63
63
|
case 'group':
|
|
64
64
|
return (_jsx(GroupField, { id: id, fields: children, onRemove: handleRemove, canBeHidden: canBeHidden }, id));
|
|
65
65
|
case 'checkbox-group':
|
|
66
|
-
return (_jsx(CheckboxGroupField, { id: id, children: children, value: value, icon: baseProps.icon }, id));
|
|
66
|
+
return (_jsx(CheckboxGroupField, { id: id, children: children, value: value, description: description, icon: baseProps.icon }, id));
|
|
67
67
|
case 'tile-body':
|
|
68
68
|
return (_createElement(TileBody, Object.assign({}, props, { key: id, callback: callback, fields: children, menuItems: menuItems })));
|
|
69
69
|
default:
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ReportI } from '../../../../interfaces';
|
|
2
|
-
export declare const CheckboxGroupField: ({ children, icon, id, value, }: Pick<ReportI, "children" | "icon" | "id" | "value">) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const CheckboxGroupField: ({ children, icon, id, value, description }: Pick<ReportI, "children" | "icon" | "id" | "value" | "description">) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,14 +2,14 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { Box, Checkbox, CheckboxGroup, Flex, SimpleGrid, Text, } from '@chakra-ui/react';
|
|
3
3
|
import { FormIcon } from '../../..';
|
|
4
4
|
import { Controller, useFormContext } from 'react-hook-form';
|
|
5
|
-
export const CheckboxGroupField = ({ children, icon, id, value, }) => {
|
|
5
|
+
export const CheckboxGroupField = ({ children, icon, id, value, description }) => {
|
|
6
6
|
const { control } = useFormContext();
|
|
7
7
|
const defaultValues = children === null || children === void 0 ? void 0 : children.map((child) => {
|
|
8
8
|
if (child.value) {
|
|
9
9
|
return child.name;
|
|
10
10
|
}
|
|
11
11
|
}).filter((value) => value);
|
|
12
|
-
return (_jsxs(Box, { children: [_jsx(Box, { p: "base", borderBottom: "1px dashed", borderColor: "lightBlue.6", children: _jsx(Text, { fontFamily: "secondary", fontSize: "sm", children:
|
|
12
|
+
return (_jsxs(Box, { children: [_jsx(Box, { p: "base", borderBottom: "1px dashed", borderColor: "lightBlue.6", children: _jsx(Text, { fontFamily: "secondary", fontSize: "sm", children: description }) }), _jsxs(Flex, { p: "base", gap: "base", children: [_jsx(FormIcon, { icon: icon }), _jsx(Controller, { control: control, name: id, defaultValue: defaultValues, render: ({ field: { onChange } }) => {
|
|
13
13
|
return (_jsx(CheckboxGroup, { defaultValue: defaultValues, onChange: onChange, children: _jsx(SimpleGrid, { columns: 2, spacing: "base", w: "full", children: children === null || children === void 0 ? void 0 : children.map((child) => {
|
|
14
14
|
const { id, name, value } = child;
|
|
15
15
|
return (_jsx(Checkbox, { value: String(name), isChecked: Boolean(value), children: _jsx(Text, { fontSize: "sm", children: name }) }, id));
|
|
@@ -14,5 +14,5 @@ import { Box, Stack } from '@chakra-ui/react';
|
|
|
14
14
|
import { PartnerFooter, SingleFields } from '../../../..';
|
|
15
15
|
export const TileBody = (_a) => {
|
|
16
16
|
var { callback, fields, websiteUrl = '', menuItems } = _a, props = __rest(_a, ["callback", "fields", "websiteUrl", "menuItems"]);
|
|
17
|
-
return (_jsx(Box, { display: "flex", flexDir: "column", bg: "
|
|
17
|
+
return (_jsx(Box, { display: "flex", flexGrow: 1, flexDir: "column", bg: "#f6f8f9", boxShadow: "lg", children: _jsxs(Stack, { spacing: "0", flex: "1", children: [_jsx(SingleFields, { callback: callback, fields: fields, menuItems: menuItems }), _jsx(PartnerFooter, Object.assign({}, props, { websiteUrl: websiteUrl }))] }) }));
|
|
18
18
|
};
|
|
@@ -10,7 +10,7 @@ export const TileBody = ({
|
|
|
10
10
|
...props
|
|
11
11
|
}: TileBodyI) => {
|
|
12
12
|
return (
|
|
13
|
-
<Box display="flex" flexDir="column" bg="
|
|
13
|
+
<Box display="flex" flexGrow={1} flexDir="column" bg="#f6f8f9" boxShadow="lg">
|
|
14
14
|
<Stack spacing="0" flex="1">
|
|
15
15
|
<SingleFields
|
|
16
16
|
callback={callback}
|
|
@@ -2,5 +2,5 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { Flex } from '@chakra-ui/react';
|
|
3
3
|
import { SingleFields } from '../../../..';
|
|
4
4
|
export const TileBodyAction = ({ callback, fields }) => {
|
|
5
|
-
return (_jsx(Flex, { p: "base", align: "center", gap: "base", children: _jsx(SingleFields, { fields: fields, callback: callback }) }));
|
|
5
|
+
return (_jsx(Flex, { p: "base", align: "center", gap: "base", background: "#f6f8f9", children: _jsx(SingleFields, { fields: fields, callback: callback }) }));
|
|
6
6
|
};
|
|
@@ -4,7 +4,7 @@ import { TileBodyI } from '@/interfaces'
|
|
|
4
4
|
|
|
5
5
|
export const TileBodyAction = ({ callback, fields }: TileBodyI) => {
|
|
6
6
|
return (
|
|
7
|
-
<Flex p="base" align="center" gap="base">
|
|
7
|
+
<Flex p="base" align="center" gap="base" background={"#f6f8f9"}>
|
|
8
8
|
<SingleFields fields={fields} callback={callback} />
|
|
9
9
|
</Flex>
|
|
10
10
|
)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Box, Text } from '@chakra-ui/react';
|
|
3
3
|
export const TileBodyHeader = ({ value = '' }) => {
|
|
4
|
-
return (_jsx(Box, { p: "base", children: _jsx(Text, { fontWeight: "semibold", children: value }) }));
|
|
4
|
+
return (_jsx(Box, { borderTop: "1px solid #dbdbdb", p: "base", background: "#ffffff", children: _jsx(Text, { fontWeight: "semibold", children: value }) }));
|
|
5
5
|
};
|
|
@@ -2,5 +2,5 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { SimpleGrid } from '@chakra-ui/react';
|
|
3
3
|
import { SingleFields } from '../../../..';
|
|
4
4
|
export const TileBodySectionGrid = ({ fields }) => {
|
|
5
|
-
return (_jsx(SimpleGrid, { columns: 3, spacing: "base", p: "base", children: _jsx(SingleFields, { fields: fields }) }));
|
|
5
|
+
return (_jsx(SimpleGrid, { columns: 3, spacing: "base", p: "base", background: "#ffffff", children: _jsx(SingleFields, { fields: fields }) }));
|
|
6
6
|
};
|
|
@@ -4,7 +4,7 @@ import { TileBodyI } from '@/interfaces'
|
|
|
4
4
|
|
|
5
5
|
export const TileBodySectionGrid = ({ fields }: TileBodyI) => {
|
|
6
6
|
return (
|
|
7
|
-
<SimpleGrid columns={3} spacing="base" p="base">
|
|
7
|
+
<SimpleGrid columns={3} spacing="base" p="base" background={"#ffffff"}>
|
|
8
8
|
<SingleFields fields={fields} />
|
|
9
9
|
</SimpleGrid>
|
|
10
10
|
)
|
|
@@ -11,7 +11,7 @@ export const HomeAssistantButton = ({ currentStep, onStepClick, status, step, })
|
|
|
11
11
|
onStepClick(currentStep);
|
|
12
12
|
};
|
|
13
13
|
const buttonId = `homeAssistantButton-${currentStep}`;
|
|
14
|
-
return (_jsxs(Box, { position: "relative", id: buttonId, children: [isCompleted && (_jsx(Image, { src: CheckInCircle, alt: "check", w: "22px", h: "auto", position: "absolute", top: "-4px", left: "-2px", boxShadow: "lg", borderRadius: "full" })), _jsxs(Stack, Object.assign({ as: "button", spacing: "2", borderRadius: "lg", boxShadow: "lg", border: "1px solid transparent", w: "116px", align: "center", h: "106px", py: "base", onClick: handleClick }, setStyles(status), { children: [_jsx(Center, { h: "60%", children: _jsx(Image, { src: step.icon, alt: iconAltText, w: "auto", h: "38px" }) }), _jsx(Center, { h: "40%", children: _jsx(Text, { fontSize: "sm", textTransform: "uppercase", textAlign: "center", lineHeight: "14px", children: step.title }) })] }))] }));
|
|
14
|
+
return (_jsxs(Box, { position: "relative", id: buttonId, zIndex: "2", children: [isCompleted && (_jsx(Image, { src: CheckInCircle, alt: "check", w: "22px", h: "auto", position: "absolute", top: "-4px", left: "-2px", boxShadow: "lg", borderRadius: "full" })), _jsxs(Stack, Object.assign({ as: "button", spacing: "2", borderRadius: "lg", boxShadow: "lg", border: "1px solid transparent", w: "116px", align: "center", h: "106px", py: "base", onClick: handleClick }, setStyles(status), { children: [_jsx(Center, { h: "60%", children: _jsx(Image, { src: step.icon, alt: iconAltText, w: "auto", h: "38px" }) }), _jsx(Center, { h: "40%", children: _jsx(Text, { fontSize: "sm", textTransform: "uppercase", textAlign: "center", lineHeight: "14px", children: step.title }) })] }))] }));
|
|
15
15
|
};
|
|
16
16
|
const setStyles = (status) => {
|
|
17
17
|
switch (status) {
|
|
@@ -4,7 +4,7 @@ import { getIconAltText } from '../../utils';
|
|
|
4
4
|
export const HomeMonitorButton = ({ currentStep, onStepClick, status = 'ok', step, }) => {
|
|
5
5
|
const buttonId = `homeMonitorButton-${currentStep}`;
|
|
6
6
|
const iconAltText = getIconAltText(step.icon);
|
|
7
|
-
return (_jsx(Box, { position: "relative", id: buttonId, children: _jsxs(Box, { position: "relative", bg: "neutral.white", borderRadius: "lg", boxShadow: "lg", zIndex: "2", children: [_jsx(Box, { bg: status === 'alert' ? 'error.2' : 'green.1', boxSize: "10px", borderRadius: "full", position: "absolute", top: "6px", left: "6px", zIndex: "8" }), _jsxs(Stack, Object.assign({ position: "relative", zIndex: "2", as: "button", spacing: "2", border: "1px solid transparent",
|
|
7
|
+
return (_jsx(Box, { position: "relative", id: buttonId, zIndex: "2", children: _jsxs(Box, { position: "relative", bg: "neutral.white", borderRadius: "lg", boxShadow: "lg", zIndex: "2", children: [_jsx(Box, { bg: status === 'alert' ? 'error.2' : 'green.1', boxSize: "10px", borderRadius: "full", position: "absolute", top: "6px", left: "6px", zIndex: "8" }), _jsxs(Stack, Object.assign({ position: "relative", zIndex: "2", as: "button", spacing: "2", border: "1px solid transparent", align: "center", h: "96px", w: "100%", p: "base" }, setStyles(status), { onClick: () => onStepClick(currentStep), children: [_jsx(Center, { h: "60%", marginTop: "2", children: _jsx(Image, { src: step.icon, alt: iconAltText, w: "auto", h: "28px" }) }), _jsx(Center, { h: "40%", children: _jsx(Text, { fontSize: "xs", textTransform: "uppercase", textAlign: "center", lineHeight: "14px", children: step.title }) })] }))] }) }));
|
|
8
8
|
};
|
|
9
9
|
const setStyles = (status) => {
|
|
10
10
|
switch (status) {
|
|
@@ -3,7 +3,7 @@ import { Box, Flex } from '@chakra-ui/react';
|
|
|
3
3
|
import { HomeMonitorButton, IconMenu, MoreHorizontal } from '..';
|
|
4
4
|
import { homeAssistantSteps } from '../../helpers';
|
|
5
5
|
import { useComponentStyles } from '../../hooks';
|
|
6
|
-
import { useState } from 'react';
|
|
6
|
+
import { Fragment, useState } from 'react';
|
|
7
7
|
export const HomeMonitorSteps = ({ menuItems = [], onStepClick, stepsWithAlerts, }) => {
|
|
8
8
|
const ids = [
|
|
9
9
|
'homeMonitorButton-1',
|
|
@@ -17,7 +17,7 @@ export const HomeMonitorSteps = ({ menuItems = [], onStepClick, stepsWithAlerts,
|
|
|
17
17
|
const isDisabled = menuItems.length === 0;
|
|
18
18
|
useComponentStyles({ ids, selectedId, zIndex: '2' });
|
|
19
19
|
const handleStepClick = (step) => onStepClick(step);
|
|
20
|
-
return (_jsx(Flex, { gap: "base", children: homeAssistantSteps.map((step, index) => (_jsx(Box, { position: "relative", children: _jsxs(
|
|
20
|
+
return (_jsx(Flex, { gap: "base", justify: "center", children: homeAssistantSteps.map((step, index) => (_jsx(Box, { position: "relative", flex: "1", children: _jsxs(Fragment, { children: [_jsx(HomeMonitorButton, { currentStep: index + 1, onStepClick: handleStepClick, status: getStatus(index + 1, stepsWithAlerts), step: step }), _jsx(Box, { position: "absolute", top: "-2px", right: "4px", zIndex: "1400", children: _jsx(IconMenu, { zIndex: "2", icon: _jsx(MoreHorizontal, { size: 26 }), itemForm: index + 1, menuItems: menuItems, disabled: isDisabled, onClick: () => setSelectedId(`homeMonitorButton-${index + 1}`) }) })] }) }, step === null || step === void 0 ? void 0 : step.title))) }));
|
|
21
21
|
};
|
|
22
22
|
const getStatus = (index, stepsWithAlerts) => {
|
|
23
23
|
const hasAlert = stepsWithAlerts.includes(index);
|
|
@@ -51,7 +51,7 @@ export const HomeBoard = () => {
|
|
|
51
51
|
HomeAssistant: (_jsx(HomeAssistantPanel, { currentStep: homeAssistantCurrentStep, currentForm: currentHomeAssistantForm, onNext: handleHomeAssistantFormChange, onBack: handleHomeAssistantBack, onApplianceClick: () => null, onClose: onRightClose, onSave: () => { }, backDisabled: false, nextDisabled: false })),
|
|
52
52
|
};
|
|
53
53
|
const panelSize = currentComponent === 'PartnerCatalog' ? 'lg' : 'md';
|
|
54
|
-
return (_jsxs(Box, { overflowX: "hidden", children: [_jsx(RightPanel, { overlay: showOverlay, isOpen: isRightOpen, onClose: onRightClose, size: panelSize, children: rightPanelComponents[currentComponent] }), _jsxs(Flex, { w: "full", minH: "100dvh", children: [_jsx(RoomsMenu, { activeRoom: "homeboard", handleAddRoom: (id) => __awaiter(void 0, void 0, void 0, function* () { return console.log(id); }), handleClick: () => null, handleHomeClick: () => null, rooms: RoomsList, roomsToAdd: RoomsToAdd }), _jsxs(Box, { w: "full", children: [_jsx(AppBarComponent, { setActiveTour: setActiveTour }), _jsxs(Stack, { spacing: "base", p: "base", children: [_jsx(HomeHeader, { buttonLabel: "Partner catalog", onBack: () => null, homeName: homeName, onAdd: () => null }), _jsxs(HomeBoardGrid, { children: [_jsx(HomeCardWithRecipent, { address: HomeCards[0].address, handleEdit: handleEditHomeClick, handleDeleteAccountType: (email) => email, handleSubmitAccountType: (form) => form, _id: HomeCards[0]._id, image: HomeCards[0].image, loading: false, name: HomeCards[0].name, menu: menuMock, addImage: () => null, recipients: recipientsDb, records: homeBoardRecorsMock }), _jsx(HomeAssistant, { currentPanel: homeAssistantCurrentStep, currentStep: 6, onStepClick: handleHomeAssistantClick }), _jsx(PropertyTaxes, { estimatedTaxValue: 1000, menuItems: menuMock, taxes: taxesMock, title: "Travis County Property Taxes" }), _jsx(HomeMonitor, { children: _jsxs(Stack, { spacing: "base", children: [_jsxs(Flex, { gap: "base", children: [_jsx(HomefileMonitoring, {}), _jsx(Notifications, { date: "10-10-24", local: "TX - Houston" })] }), _jsx(HomeMonitorSteps, { menuItems: [
|
|
54
|
+
return (_jsxs(Box, { overflowX: "hidden", children: [_jsx(RightPanel, { overlay: showOverlay, isOpen: isRightOpen, onClose: onRightClose, size: panelSize, children: rightPanelComponents[currentComponent] }), _jsxs(Flex, { w: "full", minH: "100dvh", children: [_jsx(RoomsMenu, { activeRoom: "homeboard", handleAddRoom: (id) => __awaiter(void 0, void 0, void 0, function* () { return console.log(id); }), handleClick: () => null, handleHomeClick: () => null, rooms: RoomsList, roomsToAdd: RoomsToAdd }), _jsxs(Box, { w: "full", children: [_jsx(AppBarComponent, { setActiveTour: setActiveTour }), _jsxs(Stack, { spacing: "base", p: "base", children: [_jsx(HomeHeader, { buttonLabel: "Partner catalog", onBack: () => null, homeName: homeName, onAdd: () => null }), _jsxs(HomeBoardGrid, { children: [_jsx(HomeCardWithRecipent, { address: HomeCards[0].address, handleEdit: handleEditHomeClick, handleDeleteAccountType: (email) => email, handleSubmitAccountType: (form) => form, _id: HomeCards[0]._id, image: HomeCards[0].image, loading: false, name: HomeCards[0].name, menu: menuMock, addImage: () => null, recipients: recipientsDb, records: homeBoardRecorsMock }), _jsx(HomeAssistant, { currentPanel: homeAssistantCurrentStep, currentStep: 6, onStepClick: handleHomeAssistantClick }), _jsx(PropertyTaxes, { estimatedTaxValue: 1000, menuItems: menuMock, taxes: taxesMock, title: "Travis County Property Taxes" }), _jsx(HomeMonitor, { children: _jsxs(Stack, { spacing: "base", w: "full", px: "base", children: [_jsxs(Flex, { gap: "base", children: [_jsx(HomefileMonitoring, {}), _jsx(Notifications, { date: "10-10-24", local: "TX - Houston" })] }), _jsx(HomeMonitorSteps, { menuItems: [
|
|
55
55
|
{
|
|
56
56
|
label: 'Details',
|
|
57
57
|
handleClick: handleHomeAssistantClick,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { MenuButton, IconButton, Menu, MenuItem, MenuList, } from '@chakra-ui/react';
|
|
2
|
+
import { MenuButton, IconButton, Menu, MenuItem, MenuList, Box, } from '@chakra-ui/react';
|
|
3
3
|
import { Overlay } from '..';
|
|
4
|
-
export const IconMenu = ({ disabled = false, icon, itemForm, menuItems, onClick, variant = 'menuIcon', width = 'fit-content', zIndex, }) => {
|
|
5
|
-
return (_jsx(Menu, { isLazy: true, children: ({ isOpen }) => (_jsxs(_Fragment, { children: [_jsx(Overlay, { bg: "overlay", showOverlay: isOpen, position: "fixed"
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
export const IconMenu = ({ disabled = false, icon, itemForm, menuItems, onClick, variant = 'menuIcon', width = 'fit-content', zIndex = '999', }) => {
|
|
5
|
+
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: 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, { onClick: () => handleClick(itemForm), _hover: {
|
|
6
|
+
bg: 'lightGreen.1',
|
|
7
|
+
}, _focus: {
|
|
8
|
+
bg: 'lightGreen.1',
|
|
9
|
+
}, children: label }, label))) })] })) }) }));
|
|
10
10
|
};
|
|
@@ -10,5 +10,5 @@ export const PartnerFooter = ({ socialLinks = [], websiteUrl, urlText, }) => {
|
|
|
10
10
|
return;
|
|
11
11
|
window.open(url, '_blank');
|
|
12
12
|
};
|
|
13
|
-
return (_jsxs(Flex, { align: "center", justify: "space-between", p: "base", children: [_jsx(Link, { href: websiteUrl, isExternal: true, children: _jsx(Text, { fontSize: "xs", color: "blue.3", children: urlText !== null && urlText !== void 0 ? urlText : cleanedWebsiteUrl }) }), hasSocialLinks && (_jsx(Flex, { align: "center", gap: "1", children: socialLinks === null || socialLinks === void 0 ? void 0 : socialLinks.map(({ name, link }) => (_jsx(IconButton, { variant: "unstyled", w: "fit-content", "aria-label": "Instagram", icon: SocialIcons({ size: 20, name }), onClick: () => handleSocialClick(link) }, name))) }))] }));
|
|
13
|
+
return (_jsxs(Flex, { background: "#f6f8f9", align: "center", justify: "space-between", p: "base", children: [_jsx(Link, { href: websiteUrl, isExternal: true, children: _jsx(Text, { fontSize: "xs", color: "blue.3", children: urlText !== null && urlText !== void 0 ? urlText : cleanedWebsiteUrl }) }), hasSocialLinks && (_jsx(Flex, { align: "center", gap: "1", children: socialLinks === null || socialLinks === void 0 ? void 0 : socialLinks.map(({ name, link }) => (_jsx(IconButton, { variant: "unstyled", w: "fit-content", "aria-label": "Instagram", icon: SocialIcons({ size: 20, name }), onClick: () => handleSocialClick(link) }, name))) }))] }));
|
|
14
14
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Paint, Receipt, Barcode, GoldenBars, Heart, Rating, Notes, Book, ImgIcon, Registry, ShareWith, Calendar, Tools2, Billing, Calc, CheckPen, GenericField, Price, Battery2, Co2, Detector, Electricity, Sprinkler, SixtyEight, DropCalendar, MobileDrop, SolarPanel, Calendar2, Drop, Wind, Foundation, Heater, Light, Plate, Pool2, Closet, Structure, GlassWater, Roof2, Target, CircleFace, Company, Pressure, WindowCleaning, RoofCleaning, HolidayLights, GutterCleaning, HomeCleaning, PressureWasher, } from '../../assets/images';
|
|
1
|
+
import { Paint, Receipt, Barcode, GoldenBars, Heart, Rating, Notes, Book, ImgIcon, Registry, ShareWith, Calendar, Tools2, Billing, Calc, CheckPen, GenericField, Price, Battery2, Co2, Detector, Electricity, Sprinkler, SixtyEight, DropCalendar, MobileDrop, SolarPanel, Calendar2, Drop, Wind, Foundation, Heater, Light, Plate, Pool2, Closet, Structure, GlassWater, Roof2, Target, CircleFace, Company, Pressure, WindowCleaning, RoofCleaning, HolidayLights, GutterCleaning, HomeCleaning, HouseWashing, PressureWasher, } from '../../assets/images';
|
|
2
2
|
export const fieldIcons = {
|
|
3
3
|
barcode: Barcode,
|
|
4
4
|
billing: Billing,
|
|
@@ -46,6 +46,7 @@ export const fieldIcons = {
|
|
|
46
46
|
company: Company,
|
|
47
47
|
'sh-gutter': GutterCleaning,
|
|
48
48
|
'sh-home': HomeCleaning,
|
|
49
|
+
'sh-house': HouseWashing,
|
|
49
50
|
'sh-lights': HolidayLights,
|
|
50
51
|
'sh-pressure': Pressure,
|
|
51
52
|
'sh-roof': RoofCleaning,
|
|
@@ -2,7 +2,7 @@ import { FolderFileI, MenuItemI, PartnerFooterI, TileCtaI } from '../..';
|
|
|
2
2
|
type KindTypes = 'checkbox' | 'checkbox-group' | 'currency' | 'date' | 'email' | 'file' | 'grid' | 'group' | 'hidden' | 'number' | 'radio' | 'rating' | 'select' | 'string' | 'switch' | 'telephone' | 'text' | 'textarea' | 'default' | UIKindTypes;
|
|
3
3
|
type UIKindTypes = 'tile-body' | 'tile-body-logo' | 'tile-body-header' | 'tile-body-section' | 'tile-body-section-grid' | 'tile-form' | 'tile-body-action' | 'vertical-icon' | 'primary-cta' | 'secondary-cta';
|
|
4
4
|
export type IconTypes = 'barcode' | 'battery' | 'billing' | 'book' | 'calc' | 'calendar' | 'check' | 'co2' | 'date' | 'default' | 'detector' | 'electricity' | 'goldbars' | 'heart' | 'image' | 'notes' | 'palette' | 'people' | 'price' | 'rating' | 'receipt' | 'registry' | 'sprinkler' | 'tools' | 'wind' | '68' | 'calendar2' | 'water' | 'calendar-drop' | 'umbrella' | 'heater' | 'roof' | 'foundation' | 'solar-panel' | 'pool' | 'drop' | 'mobile-drop' | 'light' | 'plate' | 'pressure-washer' | 'house' | 'target' | 'title' | 'company' | UIIconTypes;
|
|
5
|
-
export type UIIconTypes = 'sh-pressure' | 'sh-window' | 'sh-roof' | 'sh-lights' | 'sh-gutter' | 'sh-home';
|
|
5
|
+
export type UIIconTypes = 'sh-pressure' | 'sh-window' | 'sh-roof' | 'sh-lights' | 'sh-gutter' | 'sh-home' | 'sh-house';
|
|
6
6
|
export type ValueTypes = string | string[] | number | boolean;
|
|
7
7
|
export type OptionsTypes = string[] | number[] | null;
|
|
8
8
|
export interface ReportI {
|
|
@@ -491,6 +491,15 @@ export const tileUIMock = [
|
|
|
491
491
|
type: 'vertical-icon',
|
|
492
492
|
icon: 'sh-gutter',
|
|
493
493
|
},
|
|
494
|
+
{
|
|
495
|
+
id: faker.database.mongodbObjectId(),
|
|
496
|
+
name: '',
|
|
497
|
+
description: '',
|
|
498
|
+
comments: '',
|
|
499
|
+
value: 'House Washing',
|
|
500
|
+
type: 'vertical-icon',
|
|
501
|
+
icon: 'sh-house',
|
|
502
|
+
},
|
|
494
503
|
],
|
|
495
504
|
},
|
|
496
505
|
{
|
package/package.json
CHANGED
|
Binary file
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import GutterCleaning from './gutter-cleaning.png'
|
|
2
2
|
import HomeCleaning from './home-cleaning.png'
|
|
3
|
+
import HouseWashing from './house-washing.png'
|
|
3
4
|
import HolidayLights from './holiday-lights.png'
|
|
4
5
|
import Pressure from './pressure.png'
|
|
5
6
|
import RoofCleaning from './roof-cleaning.png'
|
|
@@ -8,6 +9,7 @@ import WindowCleaning from './window.png'
|
|
|
8
9
|
export {
|
|
9
10
|
GutterCleaning,
|
|
10
11
|
HomeCleaning,
|
|
12
|
+
HouseWashing,
|
|
11
13
|
HolidayLights,
|
|
12
14
|
Pressure,
|
|
13
15
|
RoofCleaning,
|
|
@@ -15,7 +15,8 @@ export const CheckboxGroupField = ({
|
|
|
15
15
|
icon,
|
|
16
16
|
id,
|
|
17
17
|
value,
|
|
18
|
-
|
|
18
|
+
description
|
|
19
|
+
}: Pick<ReportI, 'children' | 'icon' | 'id' | 'value' | 'description'>) => {
|
|
19
20
|
const { control } = useFormContext()
|
|
20
21
|
const defaultValues = children
|
|
21
22
|
?.map((child) => {
|
|
@@ -29,7 +30,7 @@ export const CheckboxGroupField = ({
|
|
|
29
30
|
<Box>
|
|
30
31
|
<Box p="base" borderBottom="1px dashed" borderColor="lightBlue.6">
|
|
31
32
|
<Text fontFamily="secondary" fontSize="sm">
|
|
32
|
-
{
|
|
33
|
+
{description}
|
|
33
34
|
</Text>
|
|
34
35
|
</Box>
|
|
35
36
|
<Flex p="base" gap="base">
|
|
@@ -10,7 +10,7 @@ export const TileBody = ({
|
|
|
10
10
|
...props
|
|
11
11
|
}: TileBodyI) => {
|
|
12
12
|
return (
|
|
13
|
-
<Box display="flex" flexDir="column" bg="
|
|
13
|
+
<Box display="flex" flexGrow={1} flexDir="column" bg="#f6f8f9" boxShadow="lg">
|
|
14
14
|
<Stack spacing="0" flex="1">
|
|
15
15
|
<SingleFields
|
|
16
16
|
callback={callback}
|
|
@@ -4,7 +4,7 @@ import { TileBodyI } from '@/interfaces'
|
|
|
4
4
|
|
|
5
5
|
export const TileBodyAction = ({ callback, fields }: TileBodyI) => {
|
|
6
6
|
return (
|
|
7
|
-
<Flex p="base" align="center" gap="base">
|
|
7
|
+
<Flex p="base" align="center" gap="base" background={"#f6f8f9"}>
|
|
8
8
|
<SingleFields fields={fields} callback={callback} />
|
|
9
9
|
</Flex>
|
|
10
10
|
)
|
|
@@ -4,7 +4,7 @@ import { TileBodyI } from '@/interfaces'
|
|
|
4
4
|
|
|
5
5
|
export const TileBodySectionGrid = ({ fields }: TileBodyI) => {
|
|
6
6
|
return (
|
|
7
|
-
<SimpleGrid columns={3} spacing="base" p="base">
|
|
7
|
+
<SimpleGrid columns={3} spacing="base" p="base" background={"#ffffff"}>
|
|
8
8
|
<SingleFields fields={fields} />
|
|
9
9
|
</SimpleGrid>
|
|
10
10
|
)
|
|
@@ -17,7 +17,7 @@ export const HomeAssistantButton = ({
|
|
|
17
17
|
}
|
|
18
18
|
const buttonId = `homeAssistantButton-${currentStep}`
|
|
19
19
|
return (
|
|
20
|
-
<Box position="relative" id={buttonId}>
|
|
20
|
+
<Box position="relative" id={buttonId} zIndex="2">
|
|
21
21
|
{isCompleted && (
|
|
22
22
|
<Image
|
|
23
23
|
src={CheckInCircle}
|
|
@@ -12,7 +12,7 @@ export const HomeMonitorButton = ({
|
|
|
12
12
|
const iconAltText = getIconAltText(step.icon)
|
|
13
13
|
|
|
14
14
|
return (
|
|
15
|
-
<Box position="relative" id={buttonId}>
|
|
15
|
+
<Box position="relative" id={buttonId} zIndex="2">
|
|
16
16
|
<Box
|
|
17
17
|
position="relative"
|
|
18
18
|
bg="neutral.white"
|
|
@@ -36,10 +36,10 @@ export const HomeMonitorButton = ({
|
|
|
36
36
|
as="button"
|
|
37
37
|
spacing="2"
|
|
38
38
|
border="1px solid transparent"
|
|
39
|
-
w="90px"
|
|
40
39
|
align="center"
|
|
41
40
|
h="96px"
|
|
42
|
-
|
|
41
|
+
w="100%"
|
|
42
|
+
p="base"
|
|
43
43
|
{...setStyles(status)}
|
|
44
44
|
onClick={() => onStepClick(currentStep)}
|
|
45
45
|
>
|
|
@@ -3,7 +3,7 @@ import { HomeMonitortStepsI } from '@/interfaces'
|
|
|
3
3
|
import { HomeMonitorButton, IconMenu, MoreHorizontal } from '@/components'
|
|
4
4
|
import { homeAssistantSteps } from '@/helpers'
|
|
5
5
|
import { useComponentStyles } from '@/hooks'
|
|
6
|
-
import { useState } from 'react'
|
|
6
|
+
import { Fragment, useState } from 'react'
|
|
7
7
|
|
|
8
8
|
export const HomeMonitorSteps = ({
|
|
9
9
|
menuItems = [],
|
|
@@ -24,10 +24,10 @@ export const HomeMonitorSteps = ({
|
|
|
24
24
|
useComponentStyles({ ids, selectedId, zIndex: '2' })
|
|
25
25
|
const handleStepClick = (step: number) => onStepClick(step)
|
|
26
26
|
return (
|
|
27
|
-
<Flex gap="base">
|
|
27
|
+
<Flex gap="base" justify="center">
|
|
28
28
|
{homeAssistantSteps.map((step, index) => (
|
|
29
|
-
<Box key={step?.title} position="relative">
|
|
30
|
-
<
|
|
29
|
+
<Box key={step?.title} position="relative" flex="1">
|
|
30
|
+
<Fragment>
|
|
31
31
|
<HomeMonitorButton
|
|
32
32
|
currentStep={index + 1}
|
|
33
33
|
onStepClick={handleStepClick}
|
|
@@ -44,7 +44,7 @@ export const HomeMonitorSteps = ({
|
|
|
44
44
|
onClick={() => setSelectedId(`homeMonitorButton-${index + 1}`)}
|
|
45
45
|
/>
|
|
46
46
|
</Box>
|
|
47
|
-
</
|
|
47
|
+
</Fragment>
|
|
48
48
|
</Box>
|
|
49
49
|
))}
|
|
50
50
|
</Flex>
|
|
@@ -334,7 +334,7 @@ export const HomeBoard = () => {
|
|
|
334
334
|
title="Travis County Property Taxes"
|
|
335
335
|
/>
|
|
336
336
|
<HomeMonitor>
|
|
337
|
-
<Stack spacing="base">
|
|
337
|
+
<Stack spacing="base" w="full" px="base">
|
|
338
338
|
<Flex gap="base">
|
|
339
339
|
<HomefileMonitoring />
|
|
340
340
|
<Notifications date="10-10-24" local="TX - Houston" />
|
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
Menu,
|
|
5
5
|
MenuItem,
|
|
6
6
|
MenuList,
|
|
7
|
+
Box,
|
|
7
8
|
} from '@chakra-ui/react'
|
|
8
9
|
import { IconMenuI } from '@/interfaces'
|
|
9
10
|
import { Overlay } from '@/components'
|
|
@@ -16,46 +17,43 @@ export const IconMenu = <T extends unknown>({
|
|
|
16
17
|
onClick,
|
|
17
18
|
variant = 'menuIcon',
|
|
18
19
|
width = 'fit-content',
|
|
19
|
-
zIndex,
|
|
20
|
+
zIndex = '999',
|
|
20
21
|
}: IconMenuI<T>) => {
|
|
21
22
|
return (
|
|
22
|
-
<
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
bg="overlay"
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
</>
|
|
58
|
-
)}
|
|
59
|
-
</Menu>
|
|
23
|
+
<Box zIndex={zIndex}>
|
|
24
|
+
<Menu isLazy>
|
|
25
|
+
{({ isOpen }) => (
|
|
26
|
+
<>
|
|
27
|
+
<Overlay bg="overlay" showOverlay={isOpen} position="fixed" />
|
|
28
|
+
<MenuButton
|
|
29
|
+
as={IconButton}
|
|
30
|
+
aria-label="Options"
|
|
31
|
+
icon={icon}
|
|
32
|
+
variant={variant}
|
|
33
|
+
w={width}
|
|
34
|
+
disabled={disabled}
|
|
35
|
+
marginTop="0 !important"
|
|
36
|
+
onClick={onClick}
|
|
37
|
+
/>
|
|
38
|
+
<MenuList zIndex="5">
|
|
39
|
+
{menuItems?.map(({ handleClick, label }) => (
|
|
40
|
+
<MenuItem
|
|
41
|
+
key={label}
|
|
42
|
+
onClick={() => handleClick(itemForm)}
|
|
43
|
+
_hover={{
|
|
44
|
+
bg: 'lightGreen.1',
|
|
45
|
+
}}
|
|
46
|
+
_focus={{
|
|
47
|
+
bg: 'lightGreen.1',
|
|
48
|
+
}}
|
|
49
|
+
>
|
|
50
|
+
{label}
|
|
51
|
+
</MenuItem>
|
|
52
|
+
))}
|
|
53
|
+
</MenuList>
|
|
54
|
+
</>
|
|
55
|
+
)}
|
|
56
|
+
</Menu>
|
|
57
|
+
</Box>
|
|
60
58
|
)
|
|
61
59
|
}
|
|
@@ -18,7 +18,7 @@ export const PartnerFooter = ({
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
return (
|
|
21
|
-
<Flex align="center" justify="space-between" p="base">
|
|
21
|
+
<Flex background={"#f6f8f9"} align="center" justify="space-between" p="base">
|
|
22
22
|
<Link href={websiteUrl} isExternal>
|
|
23
23
|
<Text fontSize="xs" color="blue.3">
|
|
24
24
|
{urlText ?? cleanedWebsiteUrl}
|
|
@@ -47,6 +47,7 @@ import {
|
|
|
47
47
|
HolidayLights,
|
|
48
48
|
GutterCleaning,
|
|
49
49
|
HomeCleaning,
|
|
50
|
+
HouseWashing,
|
|
50
51
|
PressureWasher,
|
|
51
52
|
} from '@/assets/images'
|
|
52
53
|
import { IconTypes } from '@/interfaces'
|
|
@@ -98,6 +99,7 @@ export const fieldIcons: Record<IconTypes, string> = {
|
|
|
98
99
|
company: Company,
|
|
99
100
|
'sh-gutter': GutterCleaning,
|
|
100
101
|
'sh-home': HomeCleaning,
|
|
102
|
+
'sh-house': HouseWashing,
|
|
101
103
|
'sh-lights': HolidayLights,
|
|
102
104
|
'sh-pressure': Pressure,
|
|
103
105
|
'sh-roof': RoofCleaning,
|
|
@@ -496,6 +496,15 @@ export const tileUIMock: ReportI[] = [
|
|
|
496
496
|
type: 'vertical-icon',
|
|
497
497
|
icon: 'sh-gutter',
|
|
498
498
|
},
|
|
499
|
+
{
|
|
500
|
+
id: faker.database.mongodbObjectId(),
|
|
501
|
+
name: '',
|
|
502
|
+
description: '',
|
|
503
|
+
comments: '',
|
|
504
|
+
value: 'House Washing',
|
|
505
|
+
type: 'vertical-icon',
|
|
506
|
+
icon: 'sh-house',
|
|
507
|
+
},
|
|
499
508
|
],
|
|
500
509
|
},
|
|
501
510
|
|