@homefile/components-v2 2.40.24 → 2.40.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/myHomes/steps/ConfirmPropertyRecords.js +5 -0
- package/dist/components/wizard/WizardTextHeader.d.ts +1 -1
- package/dist/components/wizard/WizardTextHeader.js +2 -2
- package/dist/interfaces/wizard/WizardTextHeader.interface.d.ts +1 -0
- package/dist/stories/wizard/ControlledWizard.stories.js +19 -3
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect } from 'react';
|
|
2
3
|
import { Stack, Text, useRadioGroup } from '@chakra-ui/react';
|
|
3
4
|
import { RadioCard } from '../../../components';
|
|
4
5
|
export function ConfirmPropertyRecords({ onChange, title, subtitle, options, }) {
|
|
@@ -10,6 +11,10 @@ export function ConfirmPropertyRecords({ onChange, title, subtitle, options, })
|
|
|
10
11
|
onChange: (value) => onChange(value),
|
|
11
12
|
});
|
|
12
13
|
const group = getRootProps();
|
|
14
|
+
useEffect(() => {
|
|
15
|
+
if (defaultValue)
|
|
16
|
+
onChange(defaultValue);
|
|
17
|
+
}, [defaultValue, onChange]);
|
|
13
18
|
return (_jsxs(Stack, { spacing: "10", align: "center", children: [_jsxs(Stack, { spacing: "4", align: "center", children: [_jsx(Text, { fontSize: "lg", textAlign: "center", children: title }), _jsx(Text, { fontFamily: "secondary", textAlign: "center", children: subtitle })] }), _jsx(Stack, Object.assign({}, group, { spacing: "1", w: "full", children: options.map(({ id, label }) => {
|
|
14
19
|
const radio = getRadioProps({ value: id });
|
|
15
20
|
return (_jsx(RadioCard, Object.assign({ variant: "bg-violet" }, radio, { children: _jsx(Text, { fontFamily: "secondary", children: label }) }), id));
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { WizardTextHeaderI } from '../../interfaces';
|
|
2
|
-
export declare const WizardTextHeader: ({ title, subtitle, width, }: WizardTextHeaderI) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const WizardTextHeader: ({ bg, title, subtitle, width, }: WizardTextHeaderI) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Center, Show, Stack, Text, Box } from '@chakra-ui/react';
|
|
3
3
|
import { Logo } from '../../components';
|
|
4
|
-
export const WizardTextHeader = ({ title, subtitle, width = '80%', }) => {
|
|
5
|
-
return (_jsx(Center, { w: "full", bg:
|
|
4
|
+
export const WizardTextHeader = ({ bg = 'lightGreen.1', title, subtitle, width = '80%', }) => {
|
|
5
|
+
return (_jsx(Center, { w: "full", bg: bg, minH: "176px", children: _jsxs(Stack, { w: "full", spacing: "0", align: "center", children: [_jsx(Show, { below: "md", children: _jsx(Logo, {}) }), _jsxs(Stack, { spacing: "6", w: width, children: [_jsx(Text, { fontSize: { base: '22px', md: '26px' }, lineHeight: { base: '26px', md: '30px' }, textAlign: "center", whiteSpace: "pre-wrap", children: title }), subtitle && (_jsx(Text, { fontFamily: "secondary", textAlign: "center", whiteSpace: "pre-wrap", children: subtitle })), _jsx(Show, { below: "md", children: _jsx(Box, { h: "6" }) })] })] }) }));
|
|
6
6
|
};
|
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
};
|
|
10
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
11
|
import { useState } from 'react';
|
|
12
|
-
import { ControlledWizard, DynamicForm, FooterButtons, HomeAssistantTutorial, HomeAssistantWizardSteps, SearchRecords, WizardTextHeader, WizardSuccessHeader, NewHomeDetails, ConfirmHomeDetails, ConfirmPropertyBody, ConfirmPropertyFooter, WizardValueSummaryBody, WizardValueSummaryFooter, WizardBodyPadding, } from '../../components';
|
|
12
|
+
import { ControlledWizard, DynamicForm, FooterButtons, HomeAssistantTutorial, HomeAssistantWizardSteps, SearchRecords, WizardTextHeader, WizardSuccessHeader, NewHomeDetails, ConfirmHomeDetails, ConfirmPropertyBody, ConfirmPropertyFooter, WizardValueSummaryBody, WizardValueSummaryFooter, WizardBodyPadding, ConfirmPropertyRecords, } from '../../components';
|
|
13
13
|
import { Box, Center, Flex } from '@chakra-ui/react';
|
|
14
14
|
import { action } from '@storybook/addon-actions';
|
|
15
15
|
import { assessedValueMock, homeWizardForm, propertiesMock, purchasePriceMock, } from '../../mocks';
|
|
@@ -48,17 +48,33 @@ export const ControlledWizardComponent = () => {
|
|
|
48
48
|
label: 'Next',
|
|
49
49
|
} }) }) })),
|
|
50
50
|
}));
|
|
51
|
-
return (_jsx(ControlledWizard, { height: "
|
|
51
|
+
return (_jsx(ControlledWizard, { height: "710px", step: step, setStep: setStep, steps: [
|
|
52
52
|
{
|
|
53
53
|
header: (_jsx(WizardTextHeader, { title: "Welcome to Homefile John.", subtitle: "We\u2019re about to make owning your home dramatically easier. Answer a few quick questions and we\u2019ll handle everything that usually slips through the cracks." })),
|
|
54
54
|
body: () => (_jsx(WizardBodyPadding, { children: _jsx(NewHomeDetails, { values: formValues }) })),
|
|
55
55
|
footer: (_jsx(ConfirmHomeDetails, { handleCreateHomeClick: (values) => __awaiter(void 0, void 0, void 0, function* () {
|
|
56
56
|
setStep(1);
|
|
57
57
|
yield fakeLookup();
|
|
58
|
-
setStep(
|
|
58
|
+
setStep(3);
|
|
59
59
|
action('Create Home Click')(values);
|
|
60
60
|
}) })),
|
|
61
61
|
},
|
|
62
|
+
{
|
|
63
|
+
header: (_jsx(WizardTextHeader, { bg: "lightViolet.1", title: `We can’t build your home’s care plan \n without your property records.`, subtitle: "Without them, we can\u2019t establish the baseline required to prioritize care accurately. Connecting public records lets Homefile do the heavy lifting and reduce what I need to ask you for later." })),
|
|
64
|
+
body: () => (_jsx(WizardBodyPadding, { children: _jsx(ConfirmPropertyRecords, { title: "How we use public property records?", subtitle: "We use it to verify your property details, surface insights tied to taxes and value, and personalize recommendations and keep your home profile accurate with no extra work for you.", options: [
|
|
65
|
+
{
|
|
66
|
+
id: 'add',
|
|
67
|
+
label: 'Add public property records to your home.',
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
id: 'skip',
|
|
71
|
+
label: 'Skip for now',
|
|
72
|
+
},
|
|
73
|
+
], onChange: (id) => {
|
|
74
|
+
action('ConfirmPropertyRecords onChange')(id);
|
|
75
|
+
} }) })),
|
|
76
|
+
footer: (_jsx(ConfirmPropertyFooter, { isWizard: true, onContinue: confirmModel.handleContinue, isLoading: false, label: "Continue" })),
|
|
77
|
+
},
|
|
62
78
|
{
|
|
63
79
|
header: (_jsx(WizardTextHeader, { title: "One moment while we search public records\u2026" })),
|
|
64
80
|
body: () => _jsx(SearchRecords, { isWizard: true }),
|