@homefile/components-v2 2.2.1 → 2.2.3

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 (71) hide show
  1. package/dist/assets/images/shine/house-washing.png +0 -0
  2. package/dist/assets/images/shine/index.d.ts +2 -1
  3. package/dist/assets/images/shine/index.js +2 -1
  4. package/dist/assets/images/shine/index.ts +2 -0
  5. package/dist/assets/locales/en/index.json +3 -2
  6. package/dist/components/forms/dynamicForm/DynamicForm.js +3 -3
  7. package/dist/components/forms/dynamicForm/fields/CheckboxGroupField.d.ts +1 -1
  8. package/dist/components/forms/dynamicForm/fields/CheckboxGroupField.js +2 -2
  9. package/dist/components/forms/dynamicForm/fields/TileBodyFields.d.ts +2 -0
  10. package/dist/components/forms/dynamicForm/fields/TileBodyFields.js +22 -0
  11. package/dist/components/forms/dynamicForm/fields/TileFooterFields.d.ts +2 -0
  12. package/dist/components/forms/dynamicForm/fields/TileFooterFields.js +23 -0
  13. package/dist/components/forms/dynamicForm/fields/TileHeaderFields.d.ts +2 -0
  14. package/dist/components/forms/dynamicForm/fields/TileHeaderFields.js +22 -0
  15. package/dist/components/forms/dynamicForm/fields/index.d.ts +3 -0
  16. package/dist/components/forms/dynamicForm/fields/index.js +3 -0
  17. package/dist/components/forms/dynamicForm/fields/uiFields/TileBody.js +2 -2
  18. package/dist/components/forms/dynamicForm/fields/uiFields/TileBody.tsx +23 -9
  19. package/dist/components/forms/dynamicForm/fields/uiFields/TileBodyLogo.js +1 -1
  20. package/dist/components/forms/dynamicForm/fields/uiFields/TileBodyLogo.tsx +8 -1
  21. package/dist/components/forms/dynamicForm/fields/uiFields/TileBodySectionGrid.tsx +1 -1
  22. package/dist/components/forms/dynamicForm/fields/uiFields/TileCta.js +1 -1
  23. package/dist/components/forms/dynamicForm/fields/uiFields/TileCta.tsx +1 -0
  24. package/dist/components/forms/dynamicForm/fields/uiFields/VerticalIcon.js +2 -2
  25. package/dist/components/forms/dynamicForm/fields/uiFields/VerticalIcon.tsx +5 -3
  26. package/dist/components/homeAssistant/HomeAssistant.d.ts +1 -1
  27. package/dist/components/homeAssistant/HomeAssistant.js +2 -2
  28. package/dist/components/homeAssistant/HomeAssistantButton.js +1 -1
  29. package/dist/components/homeAssistant/HomeMonitorButton.js +1 -1
  30. package/dist/components/homeAssistant/HomeMonitorSteps.js +2 -2
  31. package/dist/components/homeAssistant/panel/HomeAssistantPanel.d.ts +1 -1
  32. package/dist/components/homeAssistant/panel/HomeAssistantPanel.js +3 -3
  33. package/dist/components/homeBoard/HomeBoard.js +4 -4
  34. package/dist/components/launchpad/IconMenu.js +7 -7
  35. package/dist/components/partner/PartnerHeader.d.ts +1 -1
  36. package/dist/components/partner/PartnerHeader.js +2 -2
  37. package/dist/helpers/forms/dynamicForm.helper.js +3 -1
  38. package/dist/interfaces/forms/dynamicForm/DynamicForm.interface.d.ts +2 -2
  39. package/dist/interfaces/homeAssistant/HomeAssistantPanel.interface.d.ts +1 -0
  40. package/dist/interfaces/homeAssistant/HomeAssistantSteps.interface.d.ts +1 -0
  41. package/dist/interfaces/partner/PartnerHeader.interface.d.ts +2 -1
  42. package/dist/mocks/forms/dynamicForm.mock.js +75 -66
  43. package/package.json +1 -1
  44. package/src/assets/images/shine/house-washing.png +0 -0
  45. package/src/assets/images/shine/index.ts +2 -0
  46. package/src/assets/locales/en/index.json +3 -2
  47. package/src/components/forms/dynamicForm/DynamicForm.tsx +22 -12
  48. package/src/components/forms/dynamicForm/fields/CheckboxGroupField.tsx +14 -6
  49. package/src/components/forms/dynamicForm/fields/TileBodyFields.tsx +34 -0
  50. package/src/components/forms/dynamicForm/fields/TileFooterFields.tsx +49 -0
  51. package/src/components/forms/dynamicForm/fields/TileHeaderFields.tsx +40 -0
  52. package/src/components/forms/dynamicForm/fields/index.ts +3 -0
  53. package/src/components/forms/dynamicForm/fields/uiFields/TileBody.tsx +23 -9
  54. package/src/components/forms/dynamicForm/fields/uiFields/TileBodyLogo.tsx +8 -1
  55. package/src/components/forms/dynamicForm/fields/uiFields/TileBodySectionGrid.tsx +1 -1
  56. package/src/components/forms/dynamicForm/fields/uiFields/TileCta.tsx +1 -0
  57. package/src/components/forms/dynamicForm/fields/uiFields/VerticalIcon.tsx +5 -3
  58. package/src/components/homeAssistant/HomeAssistant.tsx +2 -1
  59. package/src/components/homeAssistant/HomeAssistantButton.tsx +1 -1
  60. package/src/components/homeAssistant/HomeMonitorButton.tsx +3 -3
  61. package/src/components/homeAssistant/HomeMonitorSteps.tsx +5 -5
  62. package/src/components/homeAssistant/panel/HomeAssistantPanel.tsx +3 -2
  63. package/src/components/homeBoard/HomeBoard.tsx +11 -1
  64. package/src/components/launchpad/IconMenu.tsx +37 -39
  65. package/src/components/partner/PartnerHeader.tsx +9 -1
  66. package/src/helpers/forms/dynamicForm.helper.ts +4 -0
  67. package/src/interfaces/forms/dynamicForm/DynamicForm.interface.ts +2 -0
  68. package/src/interfaces/homeAssistant/HomeAssistantPanel.interface.ts +1 -0
  69. package/src/interfaces/homeAssistant/HomeAssistantSteps.interface.ts +1 -0
  70. package/src/interfaces/partner/PartnerHeader.interface.ts +2 -1
  71. package/src/mocks/forms/dynamicForm.mock.ts +75 -66
@@ -4,4 +4,5 @@ export interface HomeAssistantStepsI {
4
4
  showTutorial?: boolean;
5
5
  currentPanel?: number;
6
6
  tutorialUrl?: string;
7
+ onStart?: () => void;
7
8
  }
@@ -1,5 +1,6 @@
1
- import { MenuItemI } from "..";
1
+ import { MenuItemI } from '..';
2
2
  export interface PartnerHeaderI {
3
+ borderColor?: string;
3
4
  logo: string;
4
5
  menuItems?: MenuItemI[];
5
6
  partnerName: string;
@@ -1,6 +1,72 @@
1
1
  import { Shine } from '../../assets/images';
2
2
  import { faker } from '@faker-js/faker';
3
3
  export const formFieldsMock = [
4
+ {
5
+ id: faker.database.mongodbObjectId(),
6
+ name: 'Services',
7
+ description: faker.lorem.sentence(),
8
+ comments: faker.lorem.sentence(),
9
+ value: 'Select the services you are requesting support for?',
10
+ type: 'checkbox-group',
11
+ visible: true,
12
+ icon: 'pressure-washer',
13
+ children: [
14
+ {
15
+ id: faker.database.mongodbObjectId(),
16
+ name: 'Pressure Washing',
17
+ description: faker.lorem.sentence(),
18
+ comments: faker.lorem.sentence(),
19
+ value: true,
20
+ type: 'checkbox',
21
+ visible: true,
22
+ },
23
+ {
24
+ id: faker.database.mongodbObjectId(),
25
+ name: 'Window Cleaning',
26
+ description: faker.lorem.sentence(),
27
+ comments: faker.lorem.sentence(),
28
+ value: false,
29
+ type: 'checkbox',
30
+ visible: true,
31
+ },
32
+ {
33
+ id: faker.database.mongodbObjectId(),
34
+ name: 'Roof Cleaning',
35
+ description: faker.lorem.sentence(),
36
+ comments: faker.lorem.sentence(),
37
+ value: false,
38
+ type: 'checkbox',
39
+ visible: true,
40
+ },
41
+ {
42
+ id: faker.database.mongodbObjectId(),
43
+ name: 'Holiday Lights',
44
+ description: faker.lorem.sentence(),
45
+ comments: faker.lorem.sentence(),
46
+ value: true,
47
+ type: 'checkbox',
48
+ visible: true,
49
+ },
50
+ {
51
+ id: faker.database.mongodbObjectId(),
52
+ name: 'Gutter Cleaning',
53
+ description: faker.lorem.sentence(),
54
+ comments: faker.lorem.sentence(),
55
+ value: true,
56
+ type: 'checkbox',
57
+ visible: true,
58
+ },
59
+ {
60
+ id: faker.database.mongodbObjectId(),
61
+ name: 'Exterior Cleaning',
62
+ description: faker.lorem.sentence(),
63
+ comments: faker.lorem.sentence(),
64
+ value: true,
65
+ type: 'checkbox',
66
+ visible: false,
67
+ },
68
+ ],
69
+ },
4
70
  {
5
71
  id: faker.database.mongodbObjectId(),
6
72
  name: 'Serial #',
@@ -189,72 +255,6 @@ export const formFieldsMock = [
189
255
  visible: false,
190
256
  icon: 'book',
191
257
  },
192
- {
193
- id: faker.database.mongodbObjectId(),
194
- name: 'Services',
195
- description: faker.lorem.sentence(),
196
- comments: faker.lorem.sentence(),
197
- value: 'Select the services you are requesting support for?',
198
- type: 'checkbox-group',
199
- visible: true,
200
- icon: 'pressure-washer',
201
- children: [
202
- {
203
- id: faker.database.mongodbObjectId(),
204
- name: 'Pressure Washing',
205
- description: faker.lorem.sentence(),
206
- comments: faker.lorem.sentence(),
207
- value: true,
208
- type: 'checkbox',
209
- visible: true,
210
- },
211
- {
212
- id: faker.database.mongodbObjectId(),
213
- name: 'Window Cleaning',
214
- description: faker.lorem.sentence(),
215
- comments: faker.lorem.sentence(),
216
- value: false,
217
- type: 'checkbox',
218
- visible: true,
219
- },
220
- {
221
- id: faker.database.mongodbObjectId(),
222
- name: 'Roof Cleaning',
223
- description: faker.lorem.sentence(),
224
- comments: faker.lorem.sentence(),
225
- value: false,
226
- type: 'checkbox',
227
- visible: true,
228
- },
229
- {
230
- id: faker.database.mongodbObjectId(),
231
- name: 'Holiday Lights',
232
- description: faker.lorem.sentence(),
233
- comments: faker.lorem.sentence(),
234
- value: true,
235
- type: 'checkbox',
236
- visible: true,
237
- },
238
- {
239
- id: faker.database.mongodbObjectId(),
240
- name: 'Gutter Cleaning',
241
- description: faker.lorem.sentence(),
242
- comments: faker.lorem.sentence(),
243
- value: true,
244
- type: 'checkbox',
245
- visible: true,
246
- },
247
- {
248
- id: faker.database.mongodbObjectId(),
249
- name: 'Exterior Cleaning',
250
- description: faker.lorem.sentence(),
251
- comments: faker.lorem.sentence(),
252
- value: true,
253
- type: 'checkbox',
254
- visible: false,
255
- },
256
- ],
257
- },
258
258
  ];
259
259
  export const contactFieldsMock = [
260
260
  {
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homefile/components-v2",
3
- "version": "2.2.1",
3
+ "version": "2.2.3",
4
4
  "author": "Homefile",
5
5
  "license": "UNLICENSED",
6
6
  "typings": "dist/index.d.ts",
@@ -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,
@@ -112,7 +112,8 @@
112
112
  "send": "Send",
113
113
  "share": "Share",
114
114
  "skip": "Skip for now",
115
- "saveStep": "Save Step"
115
+ "saveStep": "Save Step",
116
+ "finish": "Finish"
116
117
  },
117
118
  "createDocument": {
118
119
  "tabs": {
@@ -400,7 +401,7 @@
400
401
  },
401
402
  "details": "Provide details about your home’s",
402
403
  "homeMonitor": "Homie",
403
- "homeMonitoring": "Homie is monitoring your home.",
404
+ "homeMonitoring": "Homie is learning about your home.",
404
405
  "monitorAlerts": {
405
406
  "collapse": "Collapse Alert",
406
407
  "homeAction": "Home Action",
@@ -1,6 +1,6 @@
1
1
  import { FormProvider } from 'react-hook-form'
2
2
  import { t } from 'i18next'
3
- import { Stack, Text } from '@chakra-ui/react'
3
+ import { Box, Stack, Text } from '@chakra-ui/react'
4
4
  import { DynamicFormI, IconTypes } from '@/interfaces'
5
5
  import {
6
6
  HiddenFieldSection,
@@ -43,11 +43,19 @@ export const DynamicForm = ({
43
43
  } = useDynamicForm({ fields, onUpload })
44
44
 
45
45
  return (
46
- <Stack bg="lightBlue.1" spacing="0" h="full">
46
+ <Stack bg="lightBlue.1" spacing="0" h="full" overflowX="hidden">
47
47
  {showTitle && (
48
- <Text fontFamily="secondary" px="base" pt="4" pb="2">
49
- {title ? title : t('forms.itemDetails')}
50
- </Text>
48
+ <Box
49
+ px="base"
50
+ pt="4"
51
+ pb="2"
52
+ borderBottom="1px dashed"
53
+ borderColor="lightBlue.6"
54
+ >
55
+ <Text fontFamily="secondary">
56
+ {title ? title : t('forms.itemDetails')}
57
+ </Text>
58
+ </Box>
51
59
  )}
52
60
  <FormProvider {...form}>
53
61
  <>
@@ -167,13 +175,15 @@ export const DynamicForm = ({
167
175
  )
168
176
  case 'checkbox-group':
169
177
  return (
170
- <CheckboxGroupField
171
- key={id}
172
- id={id}
173
- children={children}
174
- value={value}
175
- icon={baseProps.icon}
176
- />
178
+ <FieldWithDelete {...fieldWithDeleteBaseProps}>
179
+ <CheckboxGroupField
180
+ key={id}
181
+ id={id}
182
+ children={children}
183
+ description={description}
184
+ icon={baseProps.icon}
185
+ />
186
+ </FieldWithDelete>
177
187
  )
178
188
  case 'tile-body':
179
189
  return (
@@ -14,8 +14,8 @@ export const CheckboxGroupField = ({
14
14
  children,
15
15
  icon,
16
16
  id,
17
- value,
18
- }: Pick<ReportI, 'children' | 'icon' | 'id' | 'value'>) => {
17
+ description,
18
+ }: Pick<ReportI, 'children' | 'icon' | 'id' | 'description'>) => {
19
19
  const { control } = useFormContext()
20
20
  const defaultValues = children
21
21
  ?.map((child) => {
@@ -26,13 +26,21 @@ export const CheckboxGroupField = ({
26
26
  .filter((value) => value) as string[]
27
27
 
28
28
  return (
29
- <Box>
30
- <Box p="base" borderBottom="1px dashed" borderColor="lightBlue.6">
29
+ <Box flex="auto" position="relative">
30
+ <Box pb="base">
31
31
  <Text fontFamily="secondary" fontSize="sm">
32
- {value}
32
+ {description}
33
33
  </Text>
34
34
  </Box>
35
- <Flex p="base" gap="base">
35
+ <Box
36
+ position="absolute"
37
+ borderBottom="1px dashed"
38
+ borderColor="lightBlue.6"
39
+ h="1px"
40
+ left="-13px"
41
+ right="-52px"
42
+ />
43
+ <Flex py="base" gap="base">
36
44
  <FormIcon icon={icon} />
37
45
  <Controller
38
46
  control={control}
@@ -0,0 +1,34 @@
1
+ import { fieldIcons } from '@/helpers'
2
+ import { FieldTypesI } from '@/interfaces'
3
+ import { VerticalIcon, TileBodySectionGrid } from '@/components'
4
+
5
+ export const TileBodyFields = ({ fields }: FieldTypesI) => {
6
+ return (
7
+ <>
8
+ {fields?.map(({ children, id, name, type, value, icon }) => {
9
+ const baseProps = {
10
+ key: id,
11
+ id,
12
+ icon: icon ? fieldIcons[icon] : undefined,
13
+ placeholder: name,
14
+ value,
15
+ }
16
+ switch (type) {
17
+ case 'tile-body-section-grid':
18
+ return <TileBodySectionGrid key={id} fields={children} />
19
+ case 'vertical-icon':
20
+ return (
21
+ <VerticalIcon
22
+ key={id}
23
+ icon={baseProps.icon}
24
+ value={String(baseProps.value)}
25
+ />
26
+ )
27
+
28
+ default:
29
+ return null
30
+ }
31
+ })}
32
+ </>
33
+ )
34
+ }
@@ -0,0 +1,49 @@
1
+ import { fieldIcons } from '@/helpers'
2
+ import { FieldTypesI } from '@/interfaces'
3
+ import { TileBodyAction, TileCta } from '@/components'
4
+
5
+ export const TileFooterFields = ({ callback, fields }: FieldTypesI) => {
6
+ return (
7
+ <>
8
+ {fields?.map(
9
+ ({ children, description, id, name, type, value, icon, link }) => {
10
+ const baseProps = {
11
+ key: id,
12
+ id,
13
+ icon: icon ? fieldIcons[icon] : undefined,
14
+ placeholder: name,
15
+ value,
16
+ }
17
+ switch (type) {
18
+ case 'tile-body-action':
19
+ return (
20
+ <TileBodyAction
21
+ key={id}
22
+ fields={children}
23
+ callback={callback}
24
+ />
25
+ )
26
+ case 'primary-cta':
27
+ case 'secondary-cta':
28
+ return (
29
+ <TileCta
30
+ key={id}
31
+ callback={callback}
32
+ description={description}
33
+ icon={icon}
34
+ id={id}
35
+ name={name}
36
+ type={type}
37
+ link={link}
38
+ value={String(baseProps.value)}
39
+ />
40
+ )
41
+
42
+ default:
43
+ return null
44
+ }
45
+ }
46
+ )}
47
+ </>
48
+ )
49
+ }
@@ -0,0 +1,40 @@
1
+ import { fieldIcons } from '@/helpers'
2
+ import { FieldTypesI } from '@/interfaces'
3
+ import { TileBodyHeader, TileBodyLogo } from '@/components'
4
+
5
+ export const TileHeaderFields = ({ fields, menuItems }: FieldTypesI) => {
6
+ return (
7
+ <>
8
+ {fields?.map(({ id, name, type, value, icon }) => {
9
+ const baseProps = {
10
+ key: id,
11
+ id,
12
+ icon: icon ? fieldIcons[icon] : undefined,
13
+ placeholder: name,
14
+ value,
15
+ }
16
+ switch (type) {
17
+ case 'tile-body-header':
18
+ return (
19
+ <TileBodyHeader
20
+ key={baseProps.key}
21
+ value={String(baseProps.value)}
22
+ />
23
+ )
24
+ case 'tile-body-logo':
25
+ return (
26
+ <TileBodyLogo
27
+ key={baseProps.key}
28
+ name={name}
29
+ value={String(baseProps.value)}
30
+ menuItems={menuItems}
31
+ />
32
+ )
33
+
34
+ default:
35
+ return null
36
+ }
37
+ })}
38
+ </>
39
+ )
40
+ }
@@ -14,4 +14,7 @@ export * from './SelectField'
14
14
  export * from './SingleFields'
15
15
  export * from './TextAreaField'
16
16
  export * from './TextField'
17
+ export * from './TileBodyFields'
18
+ export * from './TileFooterFields'
19
+ export * from './TileHeaderFields'
17
20
  export * from './uiFields'
@@ -1,6 +1,12 @@
1
1
  import { Box, Stack } from '@chakra-ui/react'
2
2
  import { TileBodyI } from '@/interfaces'
3
- import { PartnerFooter, SingleFields } from '@/components'
3
+ import {
4
+ PartnerFooter,
5
+ SingleFields,
6
+ TileBodyFields,
7
+ TileFooterFields,
8
+ TileHeaderFields,
9
+ } from '@/components'
4
10
 
5
11
  export const TileBody = ({
6
12
  callback,
@@ -10,14 +16,22 @@ export const TileBody = ({
10
16
  ...props
11
17
  }: TileBodyI) => {
12
18
  return (
13
- <Box display="flex" flexDir="column" bg="neutral.white" boxShadow="lg">
14
- <Stack spacing="0" flex="1">
15
- <SingleFields
16
- callback={callback}
17
- fields={fields}
18
- menuItems={menuItems}
19
- />
20
- <PartnerFooter {...props} websiteUrl={websiteUrl} />
19
+ <Box
20
+ display="flex"
21
+ flexGrow={1}
22
+ flexDir="column"
23
+ bg="neutral.white"
24
+ boxShadow="lg"
25
+ >
26
+ <Stack spacing="0" flex="1" justify="space-between">
27
+ <Box>
28
+ <TileHeaderFields fields={fields} menuItems={menuItems} />
29
+ </Box>
30
+ <TileBodyFields fields={fields} />
31
+ <Stack spacing="0" bg="lightBlue.1" pt="base">
32
+ <TileFooterFields callback={callback} fields={fields} />
33
+ <PartnerFooter {...props} websiteUrl={websiteUrl} />
34
+ </Stack>
21
35
  </Stack>
22
36
  </Box>
23
37
  )
@@ -6,5 +6,12 @@ export const TileBodyLogo = ({
6
6
  name = '',
7
7
  value,
8
8
  }: TileBodyLogoI) => {
9
- return <PartnerHeader logo={value} partnerName={name} menuItems={menuItems} />
9
+ return (
10
+ <PartnerHeader
11
+ borderColor="lightBlue.6"
12
+ logo={value}
13
+ partnerName={name}
14
+ menuItems={menuItems}
15
+ />
16
+ )
10
17
  }
@@ -1,4 +1,4 @@
1
- import { SimpleGrid } from '@chakra-ui/react'
1
+ import { Center, SimpleGrid } from '@chakra-ui/react'
2
2
  import { SingleFields } from '@/components'
3
3
  import { TileBodyI } from '@/interfaces'
4
4
 
@@ -8,6 +8,7 @@ export const TileCta = ({ callback, ...props }: TileCtaI) => {
8
8
  onClick={() => callback?.({ ...props })}
9
9
  variant={type === 'primary-cta' ? 'tertiaryFooter' : 'secondaryFooter'}
10
10
  fontSize="sm"
11
+ maxW="full"
11
12
  >
12
13
  {value}
13
14
  </Button>
@@ -1,4 +1,4 @@
1
- import { Box, Image, Text } from '@chakra-ui/react'
1
+ import { Box, Center, Image, Text } from '@chakra-ui/react'
2
2
  import { VerticalIconI } from '@/interfaces'
3
3
 
4
4
  export const VerticalIcon = ({ icon, value }: VerticalIconI) => {
@@ -12,20 +12,22 @@ export const VerticalIcon = ({ icon, value }: VerticalIconI) => {
12
12
  flexDirection="column"
13
13
  alignItems="center"
14
14
  justifyContent="center"
15
+ minH="110px"
15
16
  >
16
17
  <Box h="46px" display="flex" alignItems="center">
17
18
  <Image src={icon} alt={value} w="auto" h="80%" />
18
19
  </Box>
19
- <Box pb="2">
20
+ <Center pb="2">
20
21
  <Text
21
22
  fontWeight="semibold"
22
23
  textAlign="center"
23
24
  fontSize="13px"
24
25
  lineHeight="14px"
26
+ w="70%"
25
27
  >
26
28
  {value}
27
29
  </Text>
28
- </Box>
30
+ </Center>
29
31
  </Box>
30
32
  )
31
33
  }
@@ -10,6 +10,7 @@ import { HomeAssistantStepsI } from '@/interfaces'
10
10
  export const HomeAssistant = ({
11
11
  showTutorial = false,
12
12
  tutorialUrl = '',
13
+ onStart,
13
14
  ...props
14
15
  }: HomeAssistantStepsI) => {
15
16
  const [startSetup, setStartSetup] = useState(false)
@@ -21,7 +22,7 @@ export const HomeAssistant = ({
21
22
  >
22
23
  {!startSetup && showTutorial && (
23
24
  <HomeAssistantTutorial
24
- onStart={() => setStartSetup(true)}
25
+ onStart={onStart ? onStart : () => setStartSetup(true)}
25
26
  videoUrl={tutorialUrl}
26
27
  />
27
28
  )}
@@ -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
- py="base"
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
- <Box flex="auto">
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
- </Box>
47
+ </Fragment>
48
48
  </Box>
49
49
  ))}
50
50
  </Flex>
@@ -32,6 +32,7 @@ export const HomeAssistantPanel = ({
32
32
  onSave,
33
33
  backDisabled,
34
34
  nextDisabled,
35
+ hasCompleted
35
36
  }: PropsWithChildren<HomeAssistantPanelI>) => {
36
37
  const [addedAppliances, updateAddedAppliances] = useState<AppliancesType[]>([])
37
38
  const { title } = homeAssistantSteps[currentStep - 1]
@@ -90,10 +91,10 @@ export const HomeAssistantPanel = ({
90
91
  }}
91
92
  button2={{
92
93
  buttonStyle: 'primaryFooter',
93
- label: t('buttons.saveStep'),
94
+ label: !hasCompleted && currentStep === 6 ? t('buttons.finish') : t('buttons.saveStep'),
94
95
  onClick: () => onSave(updatedFields),
95
96
  }}
96
- button3={{
97
+ button3={(!hasCompleted && currentStep === 6) ? undefined : {
97
98
  buttonStyle: 'primaryFooter',
98
99
  label: t('buttons.next'),
99
100
  onClick: onNext,