@homefile/components-v2 2.8.35 → 2.8.37

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.
@@ -9,9 +9,9 @@ var __rest = (this && this.__rest) || function (s, e) {
9
9
  }
10
10
  return t;
11
11
  };
12
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
12
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
13
13
  import { t } from 'i18next';
14
- import { DrawerContent, DrawerHeader, DrawerBody, Stack, DrawerFooter, } from '@chakra-ui/react';
14
+ import { DrawerHeader, DrawerBody, Stack, DrawerFooter, } from '@chakra-ui/react';
15
15
  import { Contacts } from '../../../assets/images';
16
16
  import { FooterButtons, FooterDrawer, PanelHeader, SelectedContacts, ShareContactSection, } from '../..';
17
17
  import { useShareContactsContent } from '../../../hooks';
@@ -19,7 +19,7 @@ export const ShareContactsContent = (_a) => {
19
19
  var { contacts, onClose, onShare } = _a, props = __rest(_a, ["contacts", "onClose", "onShare"]);
20
20
  const { contactsSelected, recipientsToSend, handleAddRecipient, handleDeleteSelectedContact, handleShareContacts, } = useShareContactsContent({ contacts, onShare });
21
21
  const numberOfContacts = Number(contacts.length);
22
- return (_jsxs(DrawerContent, { bg: "lightBlue.1", children: [_jsx(DrawerHeader, { p: "0", children: _jsx(PanelHeader, { handleCloseButton: onClose, icon: Contacts, title: `${t('contacts.shareContact')} (${numberOfContacts})` }) }), _jsx(DrawerBody, { p: "0", overflowX: "hidden", overflowY: "scroll", bg: "lightBlue.2", children: _jsxs(Stack, { pb: "120px", spacing: "0", children: [_jsx(SelectedContacts, { contacts: contactsSelected, onDeleteSelected: handleDeleteSelectedContact }), _jsx(ShareContactSection, Object.assign({}, props, { onShare: handleAddRecipient }))] }) }), _jsx(DrawerFooter, { p: "0", children: _jsx(FooterDrawer, { isOpen: true, children: _jsx(FooterButtons, { button1: {
22
+ return (_jsxs(_Fragment, { children: [_jsx(DrawerHeader, { p: "0", children: _jsx(PanelHeader, { handleCloseButton: onClose, icon: Contacts, title: `${t('contacts.shareContact')} (${numberOfContacts})` }) }), _jsx(DrawerBody, { p: "0", overflowX: "hidden", overflowY: "scroll", bg: "lightBlue.2", children: _jsxs(Stack, { pb: "120px", spacing: "0", children: [_jsx(SelectedContacts, { contacts: contactsSelected, onDeleteSelected: handleDeleteSelectedContact }), _jsx(ShareContactSection, Object.assign({}, props, { onShare: handleAddRecipient }))] }) }), _jsx(DrawerFooter, { p: "0", children: _jsx(FooterDrawer, { isOpen: true, children: _jsx(FooterButtons, { button1: {
23
23
  buttonStyle: 'primaryFooter',
24
24
  label: t('buttons.send'),
25
25
  isDisabled: Number(recipientsToSend.length) === 0,
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { useMemo } from 'react';
3
- import { DrawerBody, DrawerHeader, DrawerContent, DrawerFooter, Box, } from '@chakra-ui/react';
3
+ import { DrawerBody, DrawerHeader, DrawerFooter, Box, } from '@chakra-ui/react';
4
4
  import { PanelHeader, FooterDrawer, ItemFormFooter, Overlay, Loading } from '../../..';
5
5
  export const ItemFormPanel = ({ children, onClose, onSubmitForm, panelIcon, panelTitle, showOverlay = false, }) => {
6
6
  const { firstChild, otherChildren } = useMemo(() => {
@@ -15,5 +15,5 @@ export const ItemFormPanel = ({ children, onClose, onSubmitForm, panelIcon, pane
15
15
  }
16
16
  return { firstChild, otherChildren };
17
17
  }, [children]);
18
- return (_jsxs(DrawerContent, { bg: "lightBlue.1", children: [_jsx(DrawerHeader, { p: "0", children: _jsx(PanelHeader, { handleCloseButton: onClose, icon: panelIcon, title: panelTitle }) }), _jsx(DrawerBody, { p: "0", overflowX: "hidden", bg: "lightBlue.1", children: firstChild ? (_jsxs(_Fragment, { children: [firstChild, _jsxs(Box, { position: "relative", mb: "200px", children: [_jsx(Overlay, { showOverlay: showOverlay, position: "absolute", w: "inherit", h: "inherit", zIndex: "9" }), otherChildren] })] })) : (_jsx(Loading, {})) }), _jsx(FooterDrawer, { isOpen: !showOverlay, children: _jsx(DrawerFooter, { w: "100%", py: "0", children: _jsx(ItemFormFooter, { onSave: onSubmitForm, onCancel: onClose }) }) })] }));
18
+ return (_jsxs(_Fragment, { children: [_jsx(DrawerHeader, { p: "0", children: _jsx(PanelHeader, { handleCloseButton: onClose, icon: panelIcon, title: panelTitle }) }), _jsx(DrawerBody, { p: "0", overflowX: "hidden", bg: "lightBlue.1", children: firstChild ? (_jsxs(_Fragment, { children: [firstChild, _jsxs(Box, { position: "relative", mb: "200px", children: [_jsx(Overlay, { showOverlay: showOverlay, position: "absolute", w: "inherit", h: "inherit", zIndex: "9" }), otherChildren] })] })) : (_jsx(Loading, {})) }), _jsx(FooterDrawer, { isOpen: !showOverlay, children: _jsx(DrawerFooter, { w: "100%", py: "0", children: _jsx(ItemFormFooter, { onSave: onSubmitForm, onCancel: onClose }) }) })] }));
19
19
  };
@@ -1,3 +1,3 @@
1
1
  import { PropsWithChildren } from 'react';
2
2
  import { HomeAssistantPanelI } from '../../../interfaces';
3
- export declare const HomeAssistantPanel: ({ children, currentForm, currentStep, onApplianceClick, onBack, onClose, onNext, onSave, backDisabled, nextDisabled, hasCompleted }: PropsWithChildren<HomeAssistantPanelI>) => import("react/jsx-runtime").JSX.Element;
3
+ export declare const HomeAssistantPanel: ({ children, currentForm, currentStep, onApplianceClick, onBack, onClose, onNext, onSave, backDisabled, nextDisabled, hasCompleted, isLoading }: PropsWithChildren<HomeAssistantPanelI>) => import("react/jsx-runtime").JSX.Element;
@@ -1,13 +1,13 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { useState, useEffect } from 'react';
3
3
  import { FormProvider } from 'react-hook-form';
4
4
  import { t } from 'i18next';
5
- import { DrawerContent, DrawerHeader, DrawerBody, Stack, Text, DrawerFooter, } from '@chakra-ui/react';
5
+ import { DrawerHeader, DrawerBody, Stack, Text, DrawerFooter, } from '@chakra-ui/react';
6
6
  import { IA } from '../../../assets/images';
7
- import { ApplianceSteps, SimpleDynamicForm, FooterButtons, HomeAssistantPanelStep, PanelHeader, } from '../..';
7
+ import { ApplianceSteps, SimpleDynamicForm, FooterButtons, HomeAssistantPanelStep, PanelHeader, Loading } from '../..';
8
8
  import { homeAssistantSteps } from '../../../helpers';
9
9
  import { useSimpleDynamicForm } from '../../../hooks';
10
- export const HomeAssistantPanel = ({ children, currentForm, currentStep, onApplianceClick, onBack, onClose, onNext, onSave, backDisabled, nextDisabled, hasCompleted }) => {
10
+ export const HomeAssistantPanel = ({ children, currentForm, currentStep, onApplianceClick, onBack, onClose, onNext, onSave, backDisabled, nextDisabled, hasCompleted, isLoading }) => {
11
11
  const [addedAppliances, updateAddedAppliances] = useState([]);
12
12
  const { title } = homeAssistantSteps[currentStep - 1];
13
13
  const text = `${t('homeAssistant.details')} ${title.toLowerCase()}:`;
@@ -26,7 +26,9 @@ export const HomeAssistantPanel = ({ children, currentForm, currentStep, onAppli
26
26
  const { form, updatedFields } = useSimpleDynamicForm({
27
27
  fields: currentForm,
28
28
  });
29
- return (_jsxs(DrawerContent, { bg: "lightBlue.1", children: [_jsx(DrawerHeader, { p: "0", children: _jsx(PanelHeader, { handleCloseButton: onClose, title: t('homeAssistant.title'), icon: IA }) }), _jsxs(DrawerBody, { p: "0", children: [_jsx(HomeAssistantPanelStep, { currentStep: currentStep }), children, isAppliances && (_jsx(ApplianceSteps, { onClick: onApplianceClick, addedAppliances: addedAppliances })), _jsxs(Stack, { spacing: "base", p: "base", children: [_jsx(Text, { fontFamily: "secondary", fontSize: "sm", children: text }), _jsx(FormProvider, Object.assign({}, form, { children: _jsx(SimpleDynamicForm, { fields: currentForm }) }))] })] }), _jsx(DrawerFooter, { px: "0", py: "6", bg: "neutral.white", children: _jsx(FooterButtons, { button1: {
29
+ if (isLoading)
30
+ return _jsx(Loading, {});
31
+ return (_jsxs(_Fragment, { children: [_jsx(DrawerHeader, { p: "0", children: _jsx(PanelHeader, { handleCloseButton: onClose, title: t('homeAssistant.title'), icon: IA }) }), _jsxs(DrawerBody, { p: "0", children: [_jsx(HomeAssistantPanelStep, { currentStep: currentStep }), children, isAppliances && (_jsx(ApplianceSteps, { onClick: onApplianceClick, addedAppliances: addedAppliances })), _jsxs(Stack, { spacing: "base", p: "base", children: [_jsx(Text, { fontFamily: "secondary", fontSize: "sm", children: text }), _jsx(FormProvider, Object.assign({}, form, { children: _jsx(SimpleDynamicForm, { fields: currentForm }) }))] })] }), _jsx(DrawerFooter, { px: "0", py: "6", bg: "neutral.white", children: _jsx(FooterButtons, { button1: {
30
32
  buttonStyle: 'secondaryFooter',
31
33
  label: t('buttons.back'),
32
34
  onClick: onBack,
@@ -48,7 +48,7 @@ export const HomeBoard = () => {
48
48
  ], onShareContacts: () => null, onDeleteContacts: () => null })),
49
49
  PartnerCatalog: (_jsx(PartnerCatalogPanel, { onClose: onRightClose, onPartnerAdd: () => null, partners: partnerCatalogMock })),
50
50
  AddHouseholdItem: (_jsxs(DrawerContent, { bg: "lightBlue.1", children: [_jsx(DrawerHeader, { p: "0", children: _jsx(PanelHeader, { handleCloseButton: handleClose, icon: Painting, title: "Add Household Item" }) }), _jsx(DrawerBody, { children: _jsx(DynamicForm, { form: formFieldsMock }) })] })),
51
- HomeAssistant: (_jsx(HomeAssistantPanel, { currentStep: homeAssistantCurrentStep, currentForm: currentHomeAssistantForm, onNext: handleHomeAssistantFormChange, onBack: handleHomeAssistantBack, onApplianceClick: () => null, onClose: onRightClose, onSave: () => { }, backDisabled: false, nextDisabled: false, hasCompleted: true })),
51
+ HomeAssistant: (_jsx(HomeAssistantPanel, { currentStep: homeAssistantCurrentStep, currentForm: currentHomeAssistantForm, onNext: handleHomeAssistantFormChange, onBack: handleHomeAssistantBack, onApplianceClick: () => null, onClose: onRightClose, onSave: () => { }, backDisabled: false, nextDisabled: false, hasCompleted: true, isLoading: false })),
52
52
  Notifications: (_jsx(NotificationsPanel, { notifications: notificationsMock, onClose: onRightClose, onDismiss: () => null })),
53
53
  };
54
54
  const panelSize = currentComponent === 'PartnerCatalog' ? 'lg' : 'md';
@@ -10,4 +10,5 @@ export interface HomeAssistantPanelI {
10
10
  backDisabled: boolean;
11
11
  nextDisabled: boolean;
12
12
  hasCompleted: boolean;
13
+ isLoading: boolean;
13
14
  }
@@ -1,4 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { DrawerContent } from '@chakra-ui/react';
2
3
  import { ContactsContent, RightPanel, ShareContactsContent } from '../../components';
3
4
  import { ContactsMock, ContactsMockCompleted, menuMock } from '../../mocks';
4
5
  import { Fragment, useState } from 'react';
@@ -44,5 +45,5 @@ export const ContactsContentComponent = (args) => {
44
45
  const handleOnRemoveContact = (email) => {
45
46
  setEmailsToShare(emailsToShare.filter((e) => e !== email));
46
47
  };
47
- return (_jsxs(Fragment, { children: [_jsx(RightPanel, { isOpen: true, onClose: () => null, children: _jsx(ContactsContent, Object.assign({}, args, { onShareContacts: handleSetContacts })) }), _jsx(RightPanel, { isOpen: sharePanel.openSharePanel, onClose: handleToggleSharePanel, children: _jsx(ShareContactsContent, { contacts: sharePanel.contacts, homefileContacts: ContactsMockCompleted, onClose: handleToggleSharePanel, onShare: action('onShare'), isLoading: loading, shareWithList: emailsToShare, onContactSearch: handleSearch, onDropdownSelect: handleShareWithList, onRemoveContact: handleOnRemoveContact }) })] }));
48
+ return (_jsxs(Fragment, { children: [_jsx(RightPanel, { isOpen: true, onClose: () => null, children: _jsx(ContactsContent, Object.assign({}, args, { onShareContacts: handleSetContacts })) }), _jsx(RightPanel, { isOpen: sharePanel.openSharePanel, onClose: handleToggleSharePanel, children: _jsx(DrawerContent, { bg: "lightBlue.1", children: _jsx(ShareContactsContent, { contacts: sharePanel.contacts, homefileContacts: ContactsMockCompleted, onClose: handleToggleSharePanel, onShare: action('onShare'), isLoading: loading, shareWithList: emailsToShare, onContactSearch: handleSearch, onDropdownSelect: handleShareWithList, onRemoveContact: handleOnRemoveContact }) }) })] }));
48
49
  };
@@ -1,4 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { DrawerContent } from '@chakra-ui/react';
2
3
  import { ItemFormPanel, ItemFormTabs, ItemNameHeader, ItemSubTypeSelect, RightPanel, } from '../../../components';
3
4
  import { Paint } from '../../../assets/images/groups';
4
5
  import { action } from '@storybook/addon-actions';
@@ -16,13 +17,13 @@ export default {
16
17
  },
17
18
  };
18
19
  export const ItemFormPanelComponent = (args) => {
19
- return (_jsx(RightPanel, { isOpen: true, onClose: () => null, children: _jsxs(ItemFormPanel, Object.assign({}, args, { children: [_jsx(ItemNameHeader, { id: "item-name-header", onSave: action('onSaveItemName') }), _jsx(ItemSubTypeSelect, { initialSubType: {
20
- _id: '1',
21
- name: 'Sub Type',
22
- }, onSelectSubType: action('onSelectSubType'), label: "Category", subTypes: [
23
- {
20
+ return (_jsx(RightPanel, { isOpen: true, onClose: () => null, children: _jsx(DrawerContent, { bg: "lightBlue.1", children: _jsxs(ItemFormPanel, Object.assign({}, args, { children: [_jsx(ItemNameHeader, { id: "item-name-header", onSave: action('onSaveItemName') }), _jsx(ItemSubTypeSelect, { initialSubType: {
24
21
  _id: '1',
25
22
  name: 'Sub Type',
26
- },
27
- ] }), _jsx(ItemFormTabs, { form: contactFieldsMock })] })) }));
23
+ }, onSelectSubType: action('onSelectSubType'), label: "Category", subTypes: [
24
+ {
25
+ _id: '1',
26
+ name: 'Sub Type',
27
+ },
28
+ ] }), _jsx(ItemFormTabs, { form: contactFieldsMock })] })) }) }));
28
29
  };
@@ -1,4 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { DrawerContent } from '@chakra-ui/react';
2
3
  import { action } from '@storybook/addon-actions';
3
4
  import { HomeAssistantPanel, RightPanel } from '../../../components';
4
5
  import { homeAssitantStep1FormMock, homeAssitantStep2FormMock, homeAssitantStep3FormMock, homeAssitantStep4FormMock, homeAssitantStep5FormMock, homeAssitantStep6FormMock, } from '../../../mocks';
@@ -36,5 +37,5 @@ export const HomeAssistantPanelComponent = (args) => {
36
37
  return prev - 1;
37
38
  });
38
39
  const currentForm = forms[currentStep];
39
- return (_jsx(HomeAssistantPanel, Object.assign({}, args, { currentStep: currentStep, currentForm: currentForm, onNext: handleFormChange, onBack: handleBack, onSave: action('onSave') })));
40
+ return (_jsx(DrawerContent, { bg: "lightBlue.1", children: _jsx(HomeAssistantPanel, Object.assign({}, args, { currentStep: currentStep, currentForm: currentForm, onNext: handleFormChange, onBack: handleBack, onSave: action('onSave'), isLoading: false })) }));
40
41
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homefile/components-v2",
3
- "version": "2.8.35",
3
+ "version": "2.8.37",
4
4
  "author": "Homefile",
5
5
  "license": "UNLICENSED",
6
6
  "typings": "dist/index.d.ts",
@@ -1,6 +1,5 @@
1
1
  import { t } from 'i18next'
2
2
  import {
3
- DrawerContent,
4
3
  DrawerHeader,
5
4
  DrawerBody,
6
5
  Stack,
@@ -34,7 +33,7 @@ export const ShareContactsContent = ({
34
33
  const numberOfContacts = Number(contacts.length)
35
34
 
36
35
  return (
37
- <DrawerContent bg="lightBlue.1">
36
+ <>
38
37
  <DrawerHeader p="0">
39
38
  <PanelHeader
40
39
  handleCloseButton={onClose}
@@ -63,6 +62,6 @@ export const ShareContactsContent = ({
63
62
  />
64
63
  </FooterDrawer>
65
64
  </DrawerFooter>
66
- </DrawerContent>
65
+ </>
67
66
  )
68
67
  }
@@ -2,7 +2,6 @@ import { PropsWithChildren, ReactNode, useMemo } from 'react'
2
2
  import {
3
3
  DrawerBody,
4
4
  DrawerHeader,
5
- DrawerContent,
6
5
  DrawerFooter,
7
6
  Box,
8
7
  } from '@chakra-ui/react'
@@ -40,7 +39,7 @@ export const ItemFormPanel = ({
40
39
  }, [children])
41
40
 
42
41
  return (
43
- <DrawerContent bg="lightBlue.1">
42
+ <>
44
43
  <DrawerHeader p="0">
45
44
  <PanelHeader
46
45
  handleCloseButton={onClose}
@@ -75,6 +74,6 @@ export const ItemFormPanel = ({
75
74
  <ItemFormFooter onSave={onSubmitForm} onCancel={onClose} />
76
75
  </DrawerFooter>
77
76
  </FooterDrawer>
78
- </DrawerContent>
77
+ </>
79
78
  )
80
79
  }
@@ -2,7 +2,6 @@ import { PropsWithChildren, useState, useEffect } from 'react'
2
2
  import { FormProvider } from 'react-hook-form'
3
3
  import { t } from 'i18next'
4
4
  import {
5
- DrawerContent,
6
5
  DrawerHeader,
7
6
  DrawerBody,
8
7
  Stack,
@@ -16,6 +15,7 @@ import {
16
15
  FooterButtons,
17
16
  HomeAssistantPanelStep,
18
17
  PanelHeader,
18
+ Loading
19
19
  } from '@/components'
20
20
  import { AppliancesType, HomeAssistantPanelI } from '@/interfaces'
21
21
  import { homeAssistantSteps } from '@/helpers'
@@ -32,7 +32,8 @@ export const HomeAssistantPanel = ({
32
32
  onSave,
33
33
  backDisabled,
34
34
  nextDisabled,
35
- hasCompleted
35
+ hasCompleted,
36
+ isLoading
36
37
  }: PropsWithChildren<HomeAssistantPanelI>) => {
37
38
  const [addedAppliances, updateAddedAppliances] = useState<AppliancesType[]>([])
38
39
  const { title } = homeAssistantSteps[currentStep - 1]
@@ -54,8 +55,10 @@ export const HomeAssistantPanel = ({
54
55
  fields: currentForm,
55
56
  })
56
57
 
58
+ if (isLoading) return <Loading />
59
+
57
60
  return (
58
- <DrawerContent bg="lightBlue.1">
61
+ <>
59
62
  <DrawerHeader p="0">
60
63
  <PanelHeader
61
64
  handleCloseButton={onClose}
@@ -102,6 +105,6 @@ export const HomeAssistantPanel = ({
102
105
  }}
103
106
  />
104
107
  </DrawerFooter>
105
- </DrawerContent>
108
+ </>
106
109
  )
107
110
  }
@@ -279,6 +279,7 @@ export const HomeBoard = () => {
279
279
  backDisabled={false}
280
280
  nextDisabled={false}
281
281
  hasCompleted={true}
282
+ isLoading={false}
282
283
  />
283
284
  ),
284
285
  Notifications: (
@@ -11,4 +11,5 @@ export interface HomeAssistantPanelI {
11
11
  backDisabled: boolean
12
12
  nextDisabled: boolean
13
13
  hasCompleted: boolean
14
+ isLoading: boolean
14
15
  }
@@ -1,4 +1,5 @@
1
1
  import { Meta } from '@storybook/react'
2
+ import { DrawerContent } from '@chakra-ui/react'
2
3
  import { ContactsContent, RightPanel, ShareContactsContent } from '@/components'
3
4
  import { ContactsMock, ContactsMockCompleted, menuMock } from '@/mocks'
4
5
  import { Fragment, useState } from 'react'
@@ -69,17 +70,19 @@ export const ContactsContentComponent = (args: ContactsContentI) => {
69
70
  isOpen={sharePanel.openSharePanel}
70
71
  onClose={handleToggleSharePanel}
71
72
  >
72
- <ShareContactsContent
73
- contacts={sharePanel.contacts}
74
- homefileContacts={ContactsMockCompleted}
75
- onClose={handleToggleSharePanel}
76
- onShare={action('onShare')}
77
- isLoading={loading}
78
- shareWithList={emailsToShare}
79
- onContactSearch={handleSearch}
80
- onDropdownSelect={handleShareWithList}
81
- onRemoveContact={handleOnRemoveContact}
82
- />
73
+ <DrawerContent bg="lightBlue.1">
74
+ <ShareContactsContent
75
+ contacts={sharePanel.contacts}
76
+ homefileContacts={ContactsMockCompleted}
77
+ onClose={handleToggleSharePanel}
78
+ onShare={action('onShare')}
79
+ isLoading={loading}
80
+ shareWithList={emailsToShare}
81
+ onContactSearch={handleSearch}
82
+ onDropdownSelect={handleShareWithList}
83
+ onRemoveContact={handleOnRemoveContact}
84
+ />
85
+ </DrawerContent>
83
86
  </RightPanel>
84
87
  </Fragment>
85
88
  )
@@ -1,4 +1,5 @@
1
1
  import { Meta } from '@storybook/react'
2
+ import { DrawerContent } from '@chakra-ui/react'
2
3
  import {
3
4
  ItemFormPanel,
4
5
  ItemFormTabs,
@@ -27,27 +28,29 @@ export default {
27
28
  export const ItemFormPanelComponent = (args: ItemFormPanelI) => {
28
29
  return (
29
30
  <RightPanel isOpen onClose={() => null}>
30
- <ItemFormPanel {...args}>
31
- <ItemNameHeader
32
- id="item-name-header"
33
- onSave={action('onSaveItemName')}
34
- />
35
- <ItemSubTypeSelect
36
- initialSubType={{
37
- _id: '1',
38
- name: 'Sub Type',
39
- }}
40
- onSelectSubType={action('onSelectSubType')}
41
- label="Category"
42
- subTypes={[
43
- {
31
+ <DrawerContent bg="lightBlue.1">
32
+ <ItemFormPanel {...args}>
33
+ <ItemNameHeader
34
+ id="item-name-header"
35
+ onSave={action('onSaveItemName')}
36
+ />
37
+ <ItemSubTypeSelect
38
+ initialSubType={{
44
39
  _id: '1',
45
40
  name: 'Sub Type',
46
- },
47
- ]}
48
- />
49
- <ItemFormTabs form={contactFieldsMock} />
50
- </ItemFormPanel>
41
+ }}
42
+ onSelectSubType={action('onSelectSubType')}
43
+ label="Category"
44
+ subTypes={[
45
+ {
46
+ _id: '1',
47
+ name: 'Sub Type',
48
+ },
49
+ ]}
50
+ />
51
+ <ItemFormTabs form={contactFieldsMock} />
52
+ </ItemFormPanel>
53
+ </DrawerContent>
51
54
  </RightPanel>
52
55
  )
53
56
  }
@@ -1,4 +1,5 @@
1
1
  import { Meta } from '@storybook/react'
2
+ import { DrawerContent } from '@chakra-ui/react'
2
3
  import { action } from '@storybook/addon-actions'
3
4
  import { HomeAssistantPanel, RightPanel } from '@/components'
4
5
  import { HomeAssistantPanelI, ReportI } from '@/interfaces'
@@ -53,13 +54,16 @@ export const HomeAssistantPanelComponent = (args: HomeAssistantPanelI) => {
53
54
 
54
55
  const currentForm = forms[currentStep]
55
56
  return (
56
- <HomeAssistantPanel
57
- {...args}
58
- currentStep={currentStep}
59
- currentForm={currentForm}
60
- onNext={handleFormChange}
61
- onBack={handleBack}
62
- onSave={action('onSave')}
63
- />
57
+ <DrawerContent bg="lightBlue.1">
58
+ <HomeAssistantPanel
59
+ {...args}
60
+ currentStep={currentStep}
61
+ currentForm={currentForm}
62
+ onNext={handleFormChange}
63
+ onBack={handleBack}
64
+ onSave={action('onSave')}
65
+ isLoading={false}
66
+ />
67
+ </DrawerContent>
64
68
  )
65
69
  }