@homefile/components-v2 2.22.0 → 2.22.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.
Files changed (28) hide show
  1. package/dist/components/homeAssistant/HomeMonitorSteps.d.ts +1 -1
  2. package/dist/components/homeAssistant/HomeMonitorSteps.js +4 -5
  3. package/dist/components/homeAssistant/monitorAlerts/AlertTemplate.js +1 -1
  4. package/dist/components/homeAssistant/monitorAlerts/BackendAlert.js +1 -1
  5. package/dist/components/homeAssistant/monitorAlerts/BackendAlertCard.d.ts +1 -1
  6. package/dist/components/homeAssistant/monitorAlerts/BackendAlertCard.js +2 -2
  7. package/dist/components/homeAssistant/monitorAlerts/alertDetails/PurchaseProduct.js +1 -1
  8. package/dist/components/homeBoard/HomeBoard.js +1 -1
  9. package/dist/index.d.ts +1 -1
  10. package/dist/index.js +1 -1
  11. package/dist/interfaces/homeAssistant/BackendAlertCard.interface.d.ts +1 -0
  12. package/dist/interfaces/homeAssistant/HomeMonitorSteps.interface.d.ts +0 -1
  13. package/package.json +1 -1
  14. package/src/components/homeAssistant/HomeMonitorSteps.tsx +3 -10
  15. package/src/components/homeAssistant/monitorAlerts/AlertTemplate.tsx +1 -1
  16. package/src/components/homeAssistant/monitorAlerts/BackendAlert.tsx +1 -0
  17. package/src/components/homeAssistant/monitorAlerts/BackendAlertCard.tsx +14 -11
  18. package/src/components/homeAssistant/monitorAlerts/alertDetails/PurchaseProduct.tsx +1 -1
  19. package/src/components/homeBoard/HomeBoard.tsx +0 -1
  20. package/src/index.ts +0 -1
  21. package/src/interfaces/homeAssistant/BackendAlertCard.interface.ts +1 -0
  22. package/src/interfaces/homeAssistant/HomeMonitorSteps.interface.ts +0 -1
  23. package/dist/stories/homeAssistant/monitorAlerts/BaseAlertCard.stories.d.ts +0 -5
  24. package/dist/stories/homeAssistant/monitorAlerts/BaseAlertCard.stories.js +0 -22
  25. package/dist/stories/homeAssistant/monitorAlerts/MonitorAlerts.stories.d.ts +0 -5
  26. package/dist/stories/homeAssistant/monitorAlerts/MonitorAlerts.stories.js +0 -12
  27. package/src/stories/homeAssistant/monitorAlerts/BaseAlertCard.stories.tsx +0 -30
  28. package/src/stories/homeAssistant/monitorAlerts/MonitorAlerts.stories.tsx +0 -15
@@ -1,2 +1,2 @@
1
1
  import { HomeMonitortStepsI } from '../../interfaces';
2
- export declare const HomeMonitorSteps: ({ alerts, menuItems, onStepClick, stepsWithAlerts, }: HomeMonitortStepsI) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const HomeMonitorSteps: ({ alerts, menuItems, onStepClick, }: HomeMonitortStepsI) => import("react/jsx-runtime").JSX.Element;
@@ -4,17 +4,16 @@ import { Box, Flex } from '@chakra-ui/react';
4
4
  import { HomeMonitorButton, IconMenu, MoreHorizontal } from '..';
5
5
  import { homeAssistantSteps } from '../../helpers';
6
6
  import { homeAssistantProxy } from '../../proxies';
7
- export const HomeMonitorSteps = ({ alerts = [], menuItems = [], onStepClick, stepsWithAlerts = [], }) => {
7
+ export const HomeMonitorSteps = ({ alerts = [], menuItems = [], onStepClick, }) => {
8
8
  const { setSelectedId } = homeAssistantProxy;
9
9
  const isDisabled = menuItems.length === 0;
10
10
  const handleStepClick = (step) => onStepClick(step);
11
11
  return (_jsx(Flex, { gap: "base", justify: "center", children: homeAssistantSteps.map((step, index) => {
12
12
  var _a;
13
- return (_jsx(Box, { position: "relative", flex: "1", children: _jsxs(Fragment, { children: [_jsx(HomeMonitorButton, { alertCount: (_a = alerts.find((alert) => alert.step === index + 1)) === null || _a === void 0 ? void 0 : _a.count, currentStep: index + 1, onStepClick: handleStepClick, status: getStatus(index + 1, stepsWithAlerts, alerts), 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));
13
+ return (_jsx(Box, { position: "relative", flex: "1", children: _jsxs(Fragment, { children: [_jsx(HomeMonitorButton, { alertCount: (_a = alerts.find((alert) => alert.step === index + 1)) === null || _a === void 0 ? void 0 : _a.count, currentStep: index + 1, onStepClick: handleStepClick, status: getStatus(index + 1, alerts), 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));
14
14
  }) }));
15
15
  };
16
- const getStatus = (index, stepsWithAlerts, alerts) => {
17
- const hasAlert = (stepsWithAlerts === null || stepsWithAlerts === void 0 ? void 0 : stepsWithAlerts.includes(index)) ||
18
- (alerts === null || alerts === void 0 ? void 0 : alerts.some((alert) => alert.step === index));
16
+ const getStatus = (index, alerts) => {
17
+ const hasAlert = alerts === null || alerts === void 0 ? void 0 : alerts.some((alert) => alert.step === index);
19
18
  return hasAlert ? 'alert' : 'ok';
20
19
  };
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Center, Flex, Image, Stack, Text } from '@chakra-ui/react';
3
3
  export const AlertTemplate = ({ bg = 'error.1', description, icon, title, }) => {
4
- return (_jsxs(Flex, { gap: "base", px: "base", pt: "1", pb: "4", children: [_jsx(Center, { minW: "60px", h: "60px", bg: bg, borderRadius: "md", children: _jsx(Image, { src: icon, maxH: "36px", w: "auto" }) }), _jsxs(Stack, { children: [_jsx(Text, { fontWeight: "semibold", fontSize: "xl", lineHeight: "1.2", children: title }), _jsx(Text, { fontFamily: "secondary", fontSize: "sm", lineHeight: "1.2", children: description })] })] }));
4
+ return (_jsxs(Flex, { gap: "base", px: "base", pt: "1", pb: "4", children: [_jsx(Center, { minW: "60px", h: "60px", bg: bg, borderRadius: "md", children: _jsx(Image, { src: icon, maxH: "36px", w: "auto" }) }), _jsxs(Stack, { children: [_jsx(Text, { fontWeight: "600", fontSize: "xl", lineHeight: "1.2", children: title }), _jsx(Text, { fontFamily: "secondary", fontSize: "sm", lineHeight: "1.2", children: description })] })] }));
5
5
  };
@@ -15,5 +15,5 @@ export const BackendAlert = ({ id, category, form, callback, onComplete, }) => {
15
15
  component: (_jsx(AlertFields, { fields: (_a = tab.children) !== null && _a !== void 0 ? _a : [], callback: callback })),
16
16
  });
17
17
  })) !== null && _d !== void 0 ? _d : [];
18
- return (_jsxs(BackendAlertCard, { alertBg: headerBg, alertIcon: alertIcon, alertTitle: alertTitle, bg: alertIconBg, icon: (_e = alert === null || alert === void 0 ? void 0 : alert.icon) !== null && _e !== void 0 ? _e : '', title: (_f = alert === null || alert === void 0 ? void 0 : alert.label) !== null && _f !== void 0 ? _f : '', description: (_g = alert === null || alert === void 0 ? void 0 : alert.description) !== null && _g !== void 0 ? _g : '', onComplete: onComplete, id: id, children: [_jsx(Divider, {}), hasChildren && !isSingleTab && _jsx(TabsHeader, { tabList: tabs }), hasChildren && isSingleTab && (_jsx(AlertFields, { fields: (_k = (_j = (_h = alert === null || alert === void 0 ? void 0 : alert.children) === null || _h === void 0 ? void 0 : _h[0]) === null || _j === void 0 ? void 0 : _j.children) !== null && _k !== void 0 ? _k : [], callback: callback }))] }));
18
+ return (_jsxs(BackendAlertCard, { alertBg: headerBg, alertIcon: alertIcon, alertTitle: alertTitle, bg: alertIconBg, icon: (_e = alert === null || alert === void 0 ? void 0 : alert.icon) !== null && _e !== void 0 ? _e : '', title: (_f = alert === null || alert === void 0 ? void 0 : alert.label) !== null && _f !== void 0 ? _f : '', description: (_g = alert === null || alert === void 0 ? void 0 : alert.description) !== null && _g !== void 0 ? _g : '', onComplete: onComplete, showCollapse: hasChildren, id: id, children: [_jsx(Divider, {}), hasChildren && !isSingleTab && _jsx(TabsHeader, { tabList: tabs }), hasChildren && isSingleTab && (_jsx(AlertFields, { fields: (_k = (_j = (_h = alert === null || alert === void 0 ? void 0 : alert.children) === null || _h === void 0 ? void 0 : _h[0]) === null || _j === void 0 ? void 0 : _j.children) !== null && _k !== void 0 ? _k : [], callback: callback }))] }));
19
19
  };
@@ -1,3 +1,3 @@
1
1
  import { PropsWithChildren } from 'react';
2
2
  import { BackendAlertCardI } from '../../../interfaces';
3
- export declare const BackendAlertCard: ({ alertBg, alertIcon, alertTitle, children, icon, id, onComplete, ...props }: PropsWithChildren<BackendAlertCardI>) => import("react/jsx-runtime").JSX.Element;
3
+ export declare const BackendAlertCard: ({ alertBg, alertIcon, alertTitle, children, icon, id, onComplete, showCollapse, ...props }: PropsWithChildren<BackendAlertCardI>) => import("react/jsx-runtime").JSX.Element;
@@ -16,7 +16,7 @@ import { AlertHeader, AlertTemplate, AlertTitle } from '../..';
16
16
  import { Warranty } from '../../../assets/images';
17
17
  import { fieldIcons } from '../../../helpers';
18
18
  export const BackendAlertCard = (_a) => {
19
- var { alertBg = 'error.2', alertIcon = Warranty, alertTitle = t('homeAssistant.monitorAlerts.protection'), children, icon = 'warning', id, onComplete } = _a, props = __rest(_a, ["alertBg", "alertIcon", "alertTitle", "children", "icon", "id", "onComplete"]);
19
+ var { alertBg = 'error.2', alertIcon = Warranty, alertTitle = t('homeAssistant.monitorAlerts.protection'), children, icon = 'warning', id, onComplete, showCollapse = true } = _a, props = __rest(_a, ["alertBg", "alertIcon", "alertTitle", "children", "icon", "id", "onComplete", "showCollapse"]);
20
20
  const { isOpen, onToggle } = useDisclosure();
21
- return (_jsxs(Box, { display: "flex", flexDir: "column", bg: "neutral.white", boxShadow: "lg", borderRadius: "lg", overflow: "hidden", minW: "400px", children: [_jsx(AlertHeader, { bg: alertBg }), _jsx(AlertTitle, { alertIcon: alertIcon, alertTitle: alertTitle }), _jsx(AlertTemplate, Object.assign({}, props, { icon: fieldIcons[icon] })), _jsx(Collapse, { in: isOpen, animateOpacity: true, children: _jsx(Box, { bg: "lightBlue.1", children: children }) }), _jsxs(Flex, { py: "base", bg: "lightBlue.1", justify: id ? 'space-between' : 'end', gap: "4", children: [id && (_jsx(Button, { variant: "unstyled", w: "fit-content", px: "base", fontSize: "sm", color: "blue.3", onClick: () => onComplete === null || onComplete === void 0 ? void 0 : onComplete(id), transition: "color 0.2s", _hover: { color: 'blue.8' }, children: t('homeAssistant.monitorAlerts.completed') })), _jsx(Button, { variant: "leftRounded", w: "fit-content", px: "8", fontSize: "sm", fontWeight: "medium", onClick: onToggle, bg: isOpen ? 'blue.8' : 'blue.2', children: t(`homeAssistant.monitorAlerts.${isOpen ? 'collapse' : 'review'}`) })] })] }));
21
+ return (_jsxs(Box, { display: "flex", flexDir: "column", bg: "neutral.white", boxShadow: "lg", borderRadius: "lg", overflow: "hidden", minW: "400px", children: [_jsx(AlertHeader, { bg: alertBg }), _jsx(AlertTitle, { alertIcon: alertIcon, alertTitle: alertTitle }), _jsx(AlertTemplate, Object.assign({}, props, { icon: fieldIcons[icon] })), _jsx(Collapse, { in: isOpen, animateOpacity: true, children: _jsx(Box, { bg: "lightBlue.1", children: children }) }), _jsxs(Flex, { py: "base", bg: "lightBlue.1", justify: id ? 'space-between' : 'end', gap: "4", children: [id && (_jsx(Button, { variant: "unstyled", w: "fit-content", px: "base", fontSize: "sm", color: "blue.3", onClick: () => onComplete === null || onComplete === void 0 ? void 0 : onComplete(id), transition: "color 0.2s", _hover: { color: 'blue.8' }, children: t('homeAssistant.monitorAlerts.completed') })), showCollapse && (_jsx(Button, { variant: "leftRounded", w: "fit-content", px: "8", fontSize: "sm", fontWeight: "medium", onClick: onToggle, bg: isOpen ? 'blue.8' : 'blue.2', children: t(`homeAssistant.monitorAlerts.${isOpen ? 'collapse' : 'review'}`) }))] })] }));
22
22
  };
@@ -22,5 +22,5 @@ export const PurchaseProduct = (_a) => {
22
22
  good: '#5C81C7',
23
23
  };
24
24
  const bg = bgs[(_b = label === null || label === void 0 ? void 0 : label.toLowerCase()) !== null && _b !== void 0 ? _b : 'best'];
25
- return (_jsxs(Container, { p: "base", position: "relative", boxShadow: "md", children: [_jsx(CustomBadge, { label: label, bg: bg, position: "absolute", top: "2", left: "-1", zIndex: "3" }), _jsxs(Flex, { gap: "base", ml: "6", children: [_jsx(Image, { src: icon, alt: name, objectFit: "contain", w: "70px", h: "70px" }), _jsxs(Stack, { spacing: "0", children: [_jsx(Text, { fontWeight: "semibold", fontSize: "sm", noOfLines: 2, overflow: "hidden", textOverflow: "ellipsis", children: name }), _jsxs(Flex, { alignSelf: "end", gap: "base", align: "end", children: [_jsxs(Stack, { spacing: "0", align: "end", children: [_jsx(Text, { fontSize: "xs", fontFamily: "secondary", color: "red", children: comments }), _jsx(Text, { fontSize: "sm", fontWeight: "bold", lineHeight: "1.2", children: value })] }), _jsx(IconButton, { w: "2rem", h: "2rem", "aria-label": "Add product", variant: "iconOutlined", icon: _jsx(Plus, { size: 20, stroke: colors.blue['3'] }), onClick: () => callback === null || callback === void 0 ? void 0 : callback(Object.assign({ name, icon, value: String(value) }, rest)) })] })] })] })] }));
25
+ return (_jsxs(Container, { p: "base", position: "relative", boxShadow: "md", children: [_jsx(CustomBadge, { label: label, bg: bg, position: "absolute", top: "2", left: "-1", zIndex: "3" }), _jsxs(Flex, { gap: "base", ml: "6", children: [_jsx(Image, { src: icon, alt: name, objectFit: "contain", w: "70px", h: "70px" }), _jsxs(Stack, { spacing: "0", children: [_jsx(Text, { fontWeight: "semibold", fontSize: "sm", noOfLines: 2, overflow: "hidden", textOverflow: "ellipsis", children: name }), _jsxs(Flex, { alignSelf: "end", gap: "base", align: "end", children: [_jsxs(Stack, { spacing: "0", align: "end", children: [_jsx(Text, { fontSize: "xs", fontFamily: "secondary", color: "red", children: comments }), _jsx(Text, { fontSize: "sm", fontWeight: "600", lineHeight: "1.2", children: value })] }), _jsx(IconButton, { w: "2rem", h: "2rem", "aria-label": "Add product", variant: "iconOutlined", icon: _jsx(Plus, { size: 20, stroke: colors.blue['3'] }), onClick: () => callback === null || callback === void 0 ? void 0 : callback(Object.assign({ name, icon, value: String(value) }, rest)) })] })] })] })] }));
26
26
  };
@@ -57,7 +57,7 @@ export const HomeBoard = () => {
57
57
  label: 'Details',
58
58
  handleClick: handleHomeAssistantClick,
59
59
  },
60
- ], stepsWithAlerts: [], onStepClick: () => null })] }) }), _jsx(DynamicForm, { form: tileUIMock, menuItems: menuMock, socialLinks: socialLinksMock, showTitle: false, websiteUrl: "http://www.audreyscheckdesign.com" }), _jsxs(Stack, { spacing: "base", children: [_jsx(ReceiptAutofiler, { onClick: () => null, totalReceipts: 36, totalTitle: "Receipts Received", forwardTo: "reciepts@homefile.cloud", onFilter: () => null, children: _jsx(ReceiptsFiled, { incidentalItemsNumber: 0, incidentalSpent: 0, inventoryItemsNumber: 0, inventorySpent: 0, total: 0 }) }), _jsx(ValueMonitor, { menuItems: menuMock, balance: "+3%", totalValue: 323421, year: "2023", yearValue: 5684 })] }), _jsx(PropertyTaxes, { estimatedTaxValue: 1000, menuItems: menuMock, taxes: taxesMock, title: "Travis County Property Taxes" }), _jsx(ShortPartnerTile, { _id: "1", buttonText: "Contact Audrey Scheck", description: "Full-service design firm focusing on residential remodels, furnishing, and styling.", onClick: () => null, socialLinks: socialLinksMock2, logo: "https://static.wixstatic.com/media/258105_8e04439070694f278e4787a310ea9f4b~mv2.png", partnerName: "Audrey Scheck", websiteUrl: "" }), _jsx(TrendingValue, { chartData: lineChartData, marketValue: 894000, menuItems: menuMock, mortgageBalance: 220532, purchasePrice: 220532, roi: "+234%" }), _jsx(ShortPartnerTile, { _id: "2", buttonText: "Contact Audrey Scheck", description: "Full-service design firm focusing on residential remodels, furnishing, and styling.", onClick: () => null, socialLinks: socialLinksMock2, logo: "https://static.wixstatic.com/media/258105_8e04439070694f278e4787a310ea9f4b~mv2.png", partnerName: "Audrey Scheck", websiteUrl: "" }), _jsx(FolderSharing, { folders: FoldersDB, handleAddNewFolder: handleNewFolder, handleFolderClick: handleFolderClick, handleSelect: () => null, initialSelectItem: selectOptions[0], menuItems: menuMock, selectItems: selectOptions }), _jsx(AddToHomefile, { documentList: [], onItemClick: () => null }), _jsx(ShortPartnerTile, { _id: "3", buttonText: "Contact Audrey Scheck", description: "Full-service design firm focusing on residential remodels, furnishing, and styling.", onClick: () => null, socialLinks: socialLinksMock2, logo: "https://static.wixstatic.com/media/258105_8e04439070694f278e4787a310ea9f4b~mv2.png", partnerName: "Audrey Scheck", websiteUrl: "" })] })] })] })] }), _jsx(HomeBoardTour, { currentStep: currentStep, handleClose: handleClose, handleStep: handleStep, meetStepUrl: videoMock, isActive: activeTour })] }));
60
+ ], onStepClick: () => null })] }) }), _jsx(DynamicForm, { form: tileUIMock, menuItems: menuMock, socialLinks: socialLinksMock, showTitle: false, websiteUrl: "http://www.audreyscheckdesign.com" }), _jsxs(Stack, { spacing: "base", children: [_jsx(ReceiptAutofiler, { onClick: () => null, totalReceipts: 36, totalTitle: "Receipts Received", forwardTo: "reciepts@homefile.cloud", onFilter: () => null, children: _jsx(ReceiptsFiled, { incidentalItemsNumber: 0, incidentalSpent: 0, inventoryItemsNumber: 0, inventorySpent: 0, total: 0 }) }), _jsx(ValueMonitor, { menuItems: menuMock, balance: "+3%", totalValue: 323421, year: "2023", yearValue: 5684 })] }), _jsx(PropertyTaxes, { estimatedTaxValue: 1000, menuItems: menuMock, taxes: taxesMock, title: "Travis County Property Taxes" }), _jsx(ShortPartnerTile, { _id: "1", buttonText: "Contact Audrey Scheck", description: "Full-service design firm focusing on residential remodels, furnishing, and styling.", onClick: () => null, socialLinks: socialLinksMock2, logo: "https://static.wixstatic.com/media/258105_8e04439070694f278e4787a310ea9f4b~mv2.png", partnerName: "Audrey Scheck", websiteUrl: "" }), _jsx(TrendingValue, { chartData: lineChartData, marketValue: 894000, menuItems: menuMock, mortgageBalance: 220532, purchasePrice: 220532, roi: "+234%" }), _jsx(ShortPartnerTile, { _id: "2", buttonText: "Contact Audrey Scheck", description: "Full-service design firm focusing on residential remodels, furnishing, and styling.", onClick: () => null, socialLinks: socialLinksMock2, logo: "https://static.wixstatic.com/media/258105_8e04439070694f278e4787a310ea9f4b~mv2.png", partnerName: "Audrey Scheck", websiteUrl: "" }), _jsx(FolderSharing, { folders: FoldersDB, handleAddNewFolder: handleNewFolder, handleFolderClick: handleFolderClick, handleSelect: () => null, initialSelectItem: selectOptions[0], menuItems: menuMock, selectItems: selectOptions }), _jsx(AddToHomefile, { documentList: [], onItemClick: () => null }), _jsx(ShortPartnerTile, { _id: "3", buttonText: "Contact Audrey Scheck", description: "Full-service design firm focusing on residential remodels, furnishing, and styling.", onClick: () => null, socialLinks: socialLinksMock2, logo: "https://static.wixstatic.com/media/258105_8e04439070694f278e4787a310ea9f4b~mv2.png", partnerName: "Audrey Scheck", websiteUrl: "" })] })] })] })] }), _jsx(HomeBoardTour, { currentStep: currentStep, handleClose: handleClose, handleStep: handleStep, meetStepUrl: videoMock, isActive: activeTour })] }));
61
61
  };
62
62
  export const AppBarComponent = ({ setActiveTour = (value) => { }, onClick = (panel) => { }, }) => {
63
63
  const handleTour = () => {
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { ActivateAccount, ActiveSubscription, AddCardBanner, AddEditContactPanel, AddFolder, AddHomeContent, AddHomeItem, AddHomeItemHeader, AddMedia, AddPropertyRecords, Address, AddPopup, AddTile, AddToHomefile, AlertBanner, AphwTile, AppBar, AssignableReceipts, BackHeader, BackendAlert, BarDivider, CancelAccount, CatalogPopup, CloudsAnimation, ContactList, ContactsContent, ContainerHeader, CreateDocumentHeader, CreateHouseholdItemHeader, CreditCardContainer, CreditCardError, CustomerTile, DeleteBanner, Dialog, DisplayFiles, DisplayFilesDetail, DisplayOptions, DisplayReceipts, DocumentMenu, DocumentNameHeader, DocumentPreview, DynamicForm, EditAccountType, EditHomeBody, EditHomeFooter, EditHomeHeader, EditHomePanel, EmailPermissions, EmailValidation, Feedback, FileDetail, FilesUploader, FlowStep, FolderDetail, FolderDetailBody, FolderDetailContent, FolderDetailFooter, FolderDetailHeader, FolderInfo, FolderSharing, FolderTypeSelection, FooterButtons, FooterDrawer, GenericBackHeader, GroupCard, GroupsContainer, GroupsHeader, Header, HelpContent, HomeAssistant, HomeAssistantPanel, HomeBoardGrid, HomeBoardTour, HomeCard, HomeCardWithRecipent, HomeDetailsContent, HomefileMonitoring, HomeHeader, HomeMonitor, HomeMonitorPanel, HomeMonitorSteps, HomeSharedWith, InboxForwardBanner, InboxTile, ItemFormPanel, ItemFormTabs, ItemNameHeader, ItemsReviewBanner, ItemSubTypeSelect, Launchpad, LaunchpadAutofilerBanner, LaunchpadReceiptAutofiler, LaunchpadReceiptPanel, LaunchpadTour, LeftPanel, Loading, MediaDetailsStep, MessagePanel, MessageChatPanel, MonitorAlerts, MonthlyCharge, MortgageInfo, MoveModal, MyHomes, MyProfileBody, MyProfileContent, MyProfileFooter, MyProfileHeader, MyProfilePanel, NewCreditCard, NewCreditCardHeader, NewPassword, NotBeChargedBanner, Notifications, NotificationsReminder, NotificationsPanel, NotificationCard, Overlay, PanelHeader, PartnerActiveSubscription, PartnerCatalogPanel, PartnerContent, PartnerCustomerCode, PartnerDetails, PartnerImages, PartnerPanel, PasswordInput, PaymentReceipts, PdfButton, PeopleConnected, ProfileDetailsTab, ProfilePaymentTab, ProjectList, PropertyRecords, PropertyTaxes, ReadOnlyDynamicForm, ReadOnlyImage, ReadOnlyToggle, ReceiptAutofiler, ReceiptBody, ReceiptContent, ReceiptDetails, ReceiptFilters, ReceiptFooter, ReceiptHeader, ReceiptInfos, ReceiptItem, ReceiptItems, ReceiptPDF, ReceiptsDisplayOptions, ReceiptsFiled, ReceiptsHeader, ReceiptsInfo, ReceiptsReceivedContent, RecipientForm, RecipientsToShare, RecipientTab, RecordsInputs, ResendResetPassword, ResetPassword, ReviewBanner, RightPanel, RolePermissionsTab, RoomHeader, RoomsBoardTour, RoomsMenu, RoomsMenuMobile, RoomStep, RoomVideo, SalesTax, SatisfactionTile, SectionHeader, SendCommunication, ShareContactsContent, SharedAccounts, SharedHomeContent, SharedHomeHeader, ShareHome, ShareHomeConnections, ShareHomeForm, ShineTile, ShortPartnerTile, SignIn, SignUp, SkeletonBox, StepHeader, StorageUsed, Subscription, SubscriptionCard, SubscriptionTable, Summary, TabsHeader, TextInput, ToBeDeletedBody, ToBeDeletedContent, ToBeDeletedFooter, ToBeDeletedHeader, TourButton, Trash, TrendingValue, TrialBanner, TutorialsButton, TwoFactor, TwoFactorSetting, UpdateList, UserDetails, ValueMonitor, ViewContactPanel, VideoPlayer, VideoPlayerModal, WeatherWidget, WellDone, YtdTile, } from './components';
1
+ export { ActivateAccount, ActiveSubscription, AddCardBanner, AddEditContactPanel, AddFolder, AddHomeContent, AddHomeItem, AddHomeItemHeader, AddMedia, AddPropertyRecords, Address, AddPopup, AddTile, AddToHomefile, AlertBanner, AphwTile, AppBar, AssignableReceipts, BackHeader, BackendAlert, BarDivider, CancelAccount, CatalogPopup, CloudsAnimation, ContactList, ContactsContent, ContainerHeader, CreateDocumentHeader, CreateHouseholdItemHeader, CreditCardContainer, CreditCardError, CustomerTile, DeleteBanner, Dialog, DisplayFiles, DisplayFilesDetail, DisplayOptions, DisplayReceipts, DocumentMenu, DocumentNameHeader, DocumentPreview, DynamicForm, EditAccountType, EditHomeBody, EditHomeFooter, EditHomeHeader, EditHomePanel, EmailPermissions, EmailValidation, Feedback, FileDetail, FilesUploader, FlowStep, FolderDetail, FolderDetailBody, FolderDetailContent, FolderDetailFooter, FolderDetailHeader, FolderInfo, FolderSharing, FolderTypeSelection, FooterButtons, FooterDrawer, GenericBackHeader, GroupCard, GroupsContainer, GroupsHeader, Header, HelpContent, HomeAssistant, HomeAssistantPanel, HomeBoardGrid, HomeBoardTour, HomeCard, HomeCardWithRecipent, HomeDetailsContent, HomefileMonitoring, HomeHeader, HomeMonitor, HomeMonitorPanel, HomeMonitorSteps, HomeSharedWith, InboxForwardBanner, InboxTile, ItemFormPanel, ItemFormTabs, ItemNameHeader, ItemsReviewBanner, ItemSubTypeSelect, Launchpad, LaunchpadAutofilerBanner, LaunchpadReceiptAutofiler, LaunchpadReceiptPanel, LaunchpadTour, LeftPanel, Loading, MediaDetailsStep, MessagePanel, MessageChatPanel, MonthlyCharge, MortgageInfo, MoveModal, MyHomes, MyProfileBody, MyProfileContent, MyProfileFooter, MyProfileHeader, MyProfilePanel, NewCreditCard, NewCreditCardHeader, NewPassword, NotBeChargedBanner, Notifications, NotificationsReminder, NotificationsPanel, NotificationCard, Overlay, PanelHeader, PartnerActiveSubscription, PartnerCatalogPanel, PartnerContent, PartnerCustomerCode, PartnerDetails, PartnerImages, PartnerPanel, PasswordInput, PaymentReceipts, PdfButton, PeopleConnected, ProfileDetailsTab, ProfilePaymentTab, ProjectList, PropertyRecords, PropertyTaxes, ReadOnlyDynamicForm, ReadOnlyImage, ReadOnlyToggle, ReceiptAutofiler, ReceiptBody, ReceiptContent, ReceiptDetails, ReceiptFilters, ReceiptFooter, ReceiptHeader, ReceiptInfos, ReceiptItem, ReceiptItems, ReceiptPDF, ReceiptsDisplayOptions, ReceiptsFiled, ReceiptsHeader, ReceiptsInfo, ReceiptsReceivedContent, RecipientForm, RecipientsToShare, RecipientTab, RecordsInputs, ResendResetPassword, ResetPassword, ReviewBanner, RightPanel, RolePermissionsTab, RoomHeader, RoomsBoardTour, RoomsMenu, RoomsMenuMobile, RoomStep, RoomVideo, SalesTax, SatisfactionTile, SectionHeader, SendCommunication, ShareContactsContent, SharedAccounts, SharedHomeContent, SharedHomeHeader, ShareHome, ShareHomeConnections, ShareHomeForm, ShineTile, ShortPartnerTile, SignIn, SignUp, SkeletonBox, StepHeader, StorageUsed, Subscription, SubscriptionCard, SubscriptionTable, Summary, TabsHeader, TextInput, ToBeDeletedBody, ToBeDeletedContent, ToBeDeletedFooter, ToBeDeletedHeader, TourButton, Trash, TrendingValue, TrialBanner, TutorialsButton, TwoFactor, TwoFactorSetting, UpdateList, UserDetails, ValueMonitor, ViewContactPanel, VideoPlayer, VideoPlayerModal, WeatherWidget, WellDone, YtdTile, } from './components';
2
2
  export { useCustomToast } from './hooks';
3
3
  export { randomColor, mapApiObjectToFormFields, mapForecastToWidget, } from './utils';
4
4
  export { Contacts, MagnifyingGlassReport, Message, Register, Receipts, Price, BlueFolderShared, Calendar, Create, Notes, } from './assets/images';
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export { ActivateAccount, ActiveSubscription, AddCardBanner, AddEditContactPanel, AddFolder, AddHomeContent, AddHomeItem, AddHomeItemHeader, AddMedia, AddPropertyRecords, Address, AddPopup, AddTile, AddToHomefile, AlertBanner, AphwTile, AppBar, AssignableReceipts, BackHeader, BackendAlert, BarDivider, CancelAccount, CatalogPopup, CloudsAnimation, ContactList, ContactsContent, ContainerHeader, CreateDocumentHeader, CreateHouseholdItemHeader, CreditCardContainer, CreditCardError, CustomerTile, DeleteBanner, Dialog, DisplayFiles, DisplayFilesDetail, DisplayOptions, DisplayReceipts, DocumentMenu, DocumentNameHeader, DocumentPreview, DynamicForm, EditAccountType, EditHomeBody, EditHomeFooter, EditHomeHeader, EditHomePanel, EmailPermissions, EmailValidation, Feedback, FileDetail, FilesUploader, FlowStep, FolderDetail, FolderDetailBody, FolderDetailContent, FolderDetailFooter, FolderDetailHeader, FolderInfo, FolderSharing, FolderTypeSelection, FooterButtons, FooterDrawer, GenericBackHeader, GroupCard, GroupsContainer, GroupsHeader, Header, HelpContent, HomeAssistant, HomeAssistantPanel, HomeBoardGrid, HomeBoardTour, HomeCard, HomeCardWithRecipent, HomeDetailsContent, HomefileMonitoring, HomeHeader, HomeMonitor, HomeMonitorPanel, HomeMonitorSteps, HomeSharedWith, InboxForwardBanner, InboxTile, ItemFormPanel, ItemFormTabs, ItemNameHeader, ItemsReviewBanner, ItemSubTypeSelect, Launchpad, LaunchpadAutofilerBanner, LaunchpadReceiptAutofiler, LaunchpadReceiptPanel, LaunchpadTour, LeftPanel, Loading, MediaDetailsStep, MessagePanel, MessageChatPanel, MonitorAlerts, MonthlyCharge, MortgageInfo, MoveModal, MyHomes, MyProfileBody, MyProfileContent, MyProfileFooter, MyProfileHeader, MyProfilePanel, NewCreditCard, NewCreditCardHeader, NewPassword, NotBeChargedBanner, Notifications, NotificationsReminder, NotificationsPanel, NotificationCard, Overlay, PanelHeader, PartnerActiveSubscription, PartnerCatalogPanel, PartnerContent, PartnerCustomerCode, PartnerDetails, PartnerImages, PartnerPanel, PasswordInput, PaymentReceipts, PdfButton, PeopleConnected, ProfileDetailsTab, ProfilePaymentTab, ProjectList, PropertyRecords, PropertyTaxes, ReadOnlyDynamicForm, ReadOnlyImage, ReadOnlyToggle, ReceiptAutofiler, ReceiptBody, ReceiptContent, ReceiptDetails, ReceiptFilters, ReceiptFooter, ReceiptHeader, ReceiptInfos, ReceiptItem, ReceiptItems, ReceiptPDF, ReceiptsDisplayOptions, ReceiptsFiled, ReceiptsHeader, ReceiptsInfo, ReceiptsReceivedContent, RecipientForm, RecipientsToShare, RecipientTab, RecordsInputs, ResendResetPassword, ResetPassword, ReviewBanner, RightPanel, RolePermissionsTab, RoomHeader, RoomsBoardTour, RoomsMenu, RoomsMenuMobile, RoomStep, RoomVideo, SalesTax, SatisfactionTile, SectionHeader, SendCommunication, ShareContactsContent, SharedAccounts, SharedHomeContent, SharedHomeHeader, ShareHome, ShareHomeConnections, ShareHomeForm, ShineTile, ShortPartnerTile, SignIn, SignUp, SkeletonBox, StepHeader, StorageUsed, Subscription, SubscriptionCard, SubscriptionTable, Summary, TabsHeader, TextInput, ToBeDeletedBody, ToBeDeletedContent, ToBeDeletedFooter, ToBeDeletedHeader, TourButton, Trash, TrendingValue, TrialBanner, TutorialsButton, TwoFactor, TwoFactorSetting, UpdateList, UserDetails, ValueMonitor, ViewContactPanel, VideoPlayer, VideoPlayerModal, WeatherWidget, WellDone, YtdTile, } from './components';
1
+ export { ActivateAccount, ActiveSubscription, AddCardBanner, AddEditContactPanel, AddFolder, AddHomeContent, AddHomeItem, AddHomeItemHeader, AddMedia, AddPropertyRecords, Address, AddPopup, AddTile, AddToHomefile, AlertBanner, AphwTile, AppBar, AssignableReceipts, BackHeader, BackendAlert, BarDivider, CancelAccount, CatalogPopup, CloudsAnimation, ContactList, ContactsContent, ContainerHeader, CreateDocumentHeader, CreateHouseholdItemHeader, CreditCardContainer, CreditCardError, CustomerTile, DeleteBanner, Dialog, DisplayFiles, DisplayFilesDetail, DisplayOptions, DisplayReceipts, DocumentMenu, DocumentNameHeader, DocumentPreview, DynamicForm, EditAccountType, EditHomeBody, EditHomeFooter, EditHomeHeader, EditHomePanel, EmailPermissions, EmailValidation, Feedback, FileDetail, FilesUploader, FlowStep, FolderDetail, FolderDetailBody, FolderDetailContent, FolderDetailFooter, FolderDetailHeader, FolderInfo, FolderSharing, FolderTypeSelection, FooterButtons, FooterDrawer, GenericBackHeader, GroupCard, GroupsContainer, GroupsHeader, Header, HelpContent, HomeAssistant, HomeAssistantPanel, HomeBoardGrid, HomeBoardTour, HomeCard, HomeCardWithRecipent, HomeDetailsContent, HomefileMonitoring, HomeHeader, HomeMonitor, HomeMonitorPanel, HomeMonitorSteps, HomeSharedWith, InboxForwardBanner, InboxTile, ItemFormPanel, ItemFormTabs, ItemNameHeader, ItemsReviewBanner, ItemSubTypeSelect, Launchpad, LaunchpadAutofilerBanner, LaunchpadReceiptAutofiler, LaunchpadReceiptPanel, LaunchpadTour, LeftPanel, Loading, MediaDetailsStep, MessagePanel, MessageChatPanel, MonthlyCharge, MortgageInfo, MoveModal, MyHomes, MyProfileBody, MyProfileContent, MyProfileFooter, MyProfileHeader, MyProfilePanel, NewCreditCard, NewCreditCardHeader, NewPassword, NotBeChargedBanner, Notifications, NotificationsReminder, NotificationsPanel, NotificationCard, Overlay, PanelHeader, PartnerActiveSubscription, PartnerCatalogPanel, PartnerContent, PartnerCustomerCode, PartnerDetails, PartnerImages, PartnerPanel, PasswordInput, PaymentReceipts, PdfButton, PeopleConnected, ProfileDetailsTab, ProfilePaymentTab, ProjectList, PropertyRecords, PropertyTaxes, ReadOnlyDynamicForm, ReadOnlyImage, ReadOnlyToggle, ReceiptAutofiler, ReceiptBody, ReceiptContent, ReceiptDetails, ReceiptFilters, ReceiptFooter, ReceiptHeader, ReceiptInfos, ReceiptItem, ReceiptItems, ReceiptPDF, ReceiptsDisplayOptions, ReceiptsFiled, ReceiptsHeader, ReceiptsInfo, ReceiptsReceivedContent, RecipientForm, RecipientsToShare, RecipientTab, RecordsInputs, ResendResetPassword, ResetPassword, ReviewBanner, RightPanel, RolePermissionsTab, RoomHeader, RoomsBoardTour, RoomsMenu, RoomsMenuMobile, RoomStep, RoomVideo, SalesTax, SatisfactionTile, SectionHeader, SendCommunication, ShareContactsContent, SharedAccounts, SharedHomeContent, SharedHomeHeader, ShareHome, ShareHomeConnections, ShareHomeForm, ShineTile, ShortPartnerTile, SignIn, SignUp, SkeletonBox, StepHeader, StorageUsed, Subscription, SubscriptionCard, SubscriptionTable, Summary, TabsHeader, TextInput, ToBeDeletedBody, ToBeDeletedContent, ToBeDeletedFooter, ToBeDeletedHeader, TourButton, Trash, TrendingValue, TrialBanner, TutorialsButton, TwoFactor, TwoFactorSetting, UpdateList, UserDetails, ValueMonitor, ViewContactPanel, VideoPlayer, VideoPlayerModal, WeatherWidget, WellDone, YtdTile, } from './components';
2
2
  export { useCustomToast } from './hooks';
3
3
  export { randomColor, mapApiObjectToFormFields, mapForecastToWidget, } from './utils';
4
4
  export { Contacts, MagnifyingGlassReport, Message, Register, Receipts, Price, BlueFolderShared, Calendar, Create, Notes, } from './assets/images';
@@ -8,4 +8,5 @@ export interface BackendAlertCardI {
8
8
  title: string;
9
9
  description: string;
10
10
  onComplete?: (id?: string) => void;
11
+ showCollapse?: boolean;
11
12
  }
@@ -6,7 +6,6 @@ interface AlertI {
6
6
  export interface HomeMonitortStepsI {
7
7
  alerts?: AlertI[];
8
8
  menuItems: MenuItemI[];
9
- stepsWithAlerts?: number[];
10
9
  onStepClick: (step: number) => void;
11
10
  }
12
11
  export interface HomeMonitorButtonI {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homefile/components-v2",
3
- "version": "2.22.0",
3
+ "version": "2.22.2",
4
4
  "author": "Homefile",
5
5
  "license": "UNLICENSED",
6
6
  "typings": "dist/index.d.ts",
@@ -9,7 +9,6 @@ export const HomeMonitorSteps = ({
9
9
  alerts = [],
10
10
  menuItems = [],
11
11
  onStepClick,
12
- stepsWithAlerts = [],
13
12
  }: HomeMonitortStepsI) => {
14
13
  const { setSelectedId } = homeAssistantProxy
15
14
 
@@ -27,7 +26,7 @@ export const HomeMonitorSteps = ({
27
26
  }
28
27
  currentStep={index + 1}
29
28
  onStepClick={handleStepClick}
30
- status={getStatus(index + 1, stepsWithAlerts, alerts)}
29
+ status={getStatus(index + 1, alerts)}
31
30
  step={step}
32
31
  />
33
32
  <Box position="absolute" top="-2px" right="4px" zIndex="1400">
@@ -47,13 +46,7 @@ export const HomeMonitorSteps = ({
47
46
  )
48
47
  }
49
48
 
50
- const getStatus = (
51
- index: number,
52
- stepsWithAlerts: number[],
53
- alerts: HomeMonitortStepsI['alerts']
54
- ) => {
55
- const hasAlert =
56
- stepsWithAlerts?.includes(index) ||
57
- alerts?.some((alert) => alert.step === index)
49
+ const getStatus = (index: number, alerts: HomeMonitortStepsI['alerts']) => {
50
+ const hasAlert = alerts?.some((alert) => alert.step === index)
58
51
  return hasAlert ? 'alert' : 'ok'
59
52
  }
@@ -13,7 +13,7 @@ export const AlertTemplate = ({
13
13
  <Image src={icon} maxH="36px" w="auto" />
14
14
  </Center>
15
15
  <Stack>
16
- <Text fontWeight="semibold" fontSize="xl" lineHeight="1.2">
16
+ <Text fontWeight="600" fontSize="xl" lineHeight="1.2">
17
17
  {title}
18
18
  </Text>
19
19
  <Text fontFamily="secondary" fontSize="sm" lineHeight="1.2">
@@ -37,6 +37,7 @@ export const BackendAlert = ({
37
37
  title={alert?.label ?? ''}
38
38
  description={alert?.description ?? ''}
39
39
  onComplete={onComplete}
40
+ showCollapse={hasChildren}
40
41
  id={id}
41
42
  >
42
43
  <Divider />
@@ -14,6 +14,7 @@ export const BackendAlertCard = ({
14
14
  icon = 'warning',
15
15
  id,
16
16
  onComplete,
17
+ showCollapse = true,
17
18
  ...props
18
19
  }: PropsWithChildren<BackendAlertCardI>) => {
19
20
  const { isOpen, onToggle } = useDisclosure()
@@ -53,17 +54,19 @@ export const BackendAlertCard = ({
53
54
  {t('homeAssistant.monitorAlerts.completed')}
54
55
  </Button>
55
56
  )}
56
- <Button
57
- variant="leftRounded"
58
- w="fit-content"
59
- px="8"
60
- fontSize="sm"
61
- fontWeight="medium"
62
- onClick={onToggle}
63
- bg={isOpen ? 'blue.8' : 'blue.2'}
64
- >
65
- {t(`homeAssistant.monitorAlerts.${isOpen ? 'collapse' : 'review'}`)}
66
- </Button>
57
+ {showCollapse && (
58
+ <Button
59
+ variant="leftRounded"
60
+ w="fit-content"
61
+ px="8"
62
+ fontSize="sm"
63
+ fontWeight="medium"
64
+ onClick={onToggle}
65
+ bg={isOpen ? 'blue.8' : 'blue.2'}
66
+ >
67
+ {t(`homeAssistant.monitorAlerts.${isOpen ? 'collapse' : 'review'}`)}
68
+ </Button>
69
+ )}
67
70
  </Flex>
68
71
  </Box>
69
72
  )
@@ -53,7 +53,7 @@ export const PurchaseProduct = ({
53
53
  <Text fontSize="xs" fontFamily="secondary" color="red">
54
54
  {comments}
55
55
  </Text>
56
- <Text fontSize="sm" fontWeight="bold" lineHeight="1.2">
56
+ <Text fontSize="sm" fontWeight="600" lineHeight="1.2">
57
57
  {value}
58
58
  </Text>
59
59
  </Stack>
@@ -370,7 +370,6 @@ export const HomeBoard = () => {
370
370
  handleClick: handleHomeAssistantClick,
371
371
  },
372
372
  ]}
373
- stepsWithAlerts={[]}
374
373
  onStepClick={() => null}
375
374
  />
376
375
  </Stack>
package/src/index.ts CHANGED
@@ -98,7 +98,6 @@ export {
98
98
  MediaDetailsStep,
99
99
  MessagePanel,
100
100
  MessageChatPanel,
101
- MonitorAlerts,
102
101
  MonthlyCharge,
103
102
  MortgageInfo,
104
103
  MoveModal,
@@ -8,4 +8,5 @@ export interface BackendAlertCardI {
8
8
  title: string
9
9
  description: string
10
10
  onComplete?: (id?: string) => void
11
+ showCollapse?: boolean
11
12
  }
@@ -8,7 +8,6 @@ interface AlertI {
8
8
  export interface HomeMonitortStepsI {
9
9
  alerts?: AlertI[]
10
10
  menuItems: MenuItemI[]
11
- stepsWithAlerts?: number[]
12
11
  onStepClick: (step: number) => void
13
12
  }
14
13
 
@@ -1,5 +0,0 @@
1
- import { Meta } from '@storybook/react';
2
- import { BaseAlertCardI } from '../../../interfaces';
3
- declare const _default: Meta<BaseAlertCardI>;
4
- export default _default;
5
- export declare const BaseAlertCardComponent: (args: BaseAlertCardI) => import("react/jsx-runtime").JSX.Element;
@@ -1,22 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { BaseAlertCard, SmokeDetectorBattery } from '../../../components';
3
- import { Box } from '@chakra-ui/react';
4
- import { action } from '@storybook/addon-actions';
5
- import { Battery } from '../../../assets/images';
6
- export default {
7
- title: 'Components/HomeAssistant/MonitorAlerts',
8
- component: BaseAlertCard,
9
- args: {
10
- onClose: action('onClose'),
11
- description: 'Checking your smoke detector batteries monthly ensures they function properly and keep your home safe from fire hazards.',
12
- icon: Battery,
13
- title: 'Check the batteries in your Smoke detectors.',
14
- children: _jsx(SmokeDetectorBattery, {}),
15
- },
16
- decorators: [
17
- (Story) => (_jsx(Box, { p: "base", w: ['full', '440px'], h: "477px", children: _jsx(Story, {}) })),
18
- ],
19
- };
20
- export const BaseAlertCardComponent = (args) => {
21
- return _jsx(BaseAlertCard, Object.assign({}, args));
22
- };
@@ -1,5 +0,0 @@
1
- import { Meta } from '@storybook/react';
2
- import { MonitorAlertsI } from '../../../interfaces';
3
- declare const _default: Meta<MonitorAlertsI>;
4
- export default _default;
5
- export declare const MonitorAlertsComponent: (args: MonitorAlertsI) => import("react/jsx-runtime").JSX.Element;
@@ -1,12 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { MonitorAlerts } from '../../../components';
3
- export default {
4
- title: 'Components/HomeAssistant/MonitorAlerts',
5
- component: MonitorAlerts,
6
- args: {
7
- alertId: 'change-air-filter',
8
- },
9
- };
10
- export const MonitorAlertsComponent = (args) => {
11
- return _jsx(MonitorAlerts, Object.assign({}, args));
12
- };
@@ -1,30 +0,0 @@
1
- import { Meta } from '@storybook/react'
2
- import { BaseAlertCard, SmokeDetectorBattery } from '@/components'
3
- import { Box } from '@chakra-ui/react'
4
- import { BaseAlertCardI } from '@/interfaces'
5
- import { action } from '@storybook/addon-actions'
6
- import { Battery } from '@/assets/images'
7
-
8
- export default {
9
- title: 'Components/HomeAssistant/MonitorAlerts',
10
- component: BaseAlertCard,
11
- args: {
12
- onClose: action('onClose'),
13
- description:
14
- 'Checking your smoke detector batteries monthly ensures they function properly and keep your home safe from fire hazards.',
15
- icon: Battery,
16
- title: 'Check the batteries in your Smoke detectors.',
17
- children: <SmokeDetectorBattery />,
18
- },
19
- decorators: [
20
- (Story: any) => (
21
- <Box p="base" w={['full', '440px']} h="477px">
22
- <Story />
23
- </Box>
24
- ),
25
- ],
26
- } as Meta<BaseAlertCardI>
27
-
28
- export const BaseAlertCardComponent = (args: BaseAlertCardI) => {
29
- return <BaseAlertCard {...args} />
30
- }
@@ -1,15 +0,0 @@
1
- import { Meta } from '@storybook/react'
2
- import { MonitorAlerts } from '@/components'
3
- import { MonitorAlertsI } from '@/interfaces'
4
-
5
- export default {
6
- title: 'Components/HomeAssistant/MonitorAlerts',
7
- component: MonitorAlerts,
8
- args: {
9
- alertId: 'change-air-filter',
10
- },
11
- } as Meta<MonitorAlertsI>
12
-
13
- export const MonitorAlertsComponent = (args: MonitorAlertsI) => {
14
- return <MonitorAlerts {...args} />
15
- }