@homefile/components-v2 2.40.30 → 2.40.32

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.
@@ -2,8 +2,5 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Stack, Text } from '@chakra-ui/react';
3
3
  import { WrapperWithShadow } from '../../../components';
4
4
  export const MyHomesStepBody = ({ animation, children, fadeDelay, subtitle, title, isWizard, }) => {
5
- if (isWizard) {
6
- return (_jsx(WrapperWithShadow, { animation: animation, fadeDelay: fadeDelay, isWizard: true, children: children }));
7
- }
8
- return (_jsx(WrapperWithShadow, { animation: animation, fadeDelay: fadeDelay, children: _jsxs(Stack, { align: "center", spacing: "4", py: "8", children: [_jsx(Text, { fontSize: "xl", textAlign: "center", w: "80%", lineHeight: "1.3", children: title }), _jsx(Text, { fontFamily: "secondary", w: "85%", textAlign: "center", children: subtitle }), children] }) }));
5
+ return (_jsx(WrapperWithShadow, { animation: animation, fadeDelay: fadeDelay, isWizard: isWizard, children: _jsxs(Stack, { align: "center", spacing: "4", py: "8", children: [title && (_jsx(Text, { fontSize: "xl", textAlign: "center", whiteSpace: "pre-line", lineHeight: "1.3", children: title })), subtitle && (_jsx(Text, { fontFamily: "secondary", whiteSpace: "pre-line", textAlign: "center", children: subtitle })), children] }) }));
9
6
  };
@@ -1,2 +1,2 @@
1
1
  import { SearchRecordsI } from '../../../interfaces';
2
- export declare const SearchRecords: ({ isFirstHome, isWizard, title, subtitle, subtitlePrefix, showAddressInSubtitle, sourcesText, }: SearchRecordsI) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const SearchRecords: ({ isFirstHome, isWizard, title, subtitle, sourcesText, }: SearchRecordsI) => import("react/jsx-runtime").JSX.Element;
@@ -17,24 +17,17 @@ const fadeAnimation = keyframes `
17
17
  to { opacity: 1 }
18
18
  `;
19
19
  const fade = `${fadeAnimation} 50ms ease-in-out backwards`;
20
- export const SearchRecords = ({ isFirstHome, isWizard = false, title, subtitle, subtitlePrefix, showAddressInSubtitle = true, sourcesText, }) => {
20
+ export const SearchRecords = ({ isFirstHome, isWizard = false, title, subtitle, sourcesText, }) => {
21
21
  const { fields: { street, city, state }, } = useSnapshot(addressProxy, { sync: true });
22
22
  const [progressValue, setProgressValue] = useState(0);
23
23
  const address = `${street}, ${city} ${state}`;
24
24
  const size = '90px';
25
- const defaultTitle = t('myHomes.search.title');
26
- const defaultSubtitlePrefix = t('myHomes.search.subtitle');
27
25
  const defaultSources = [
28
26
  t('myHomes.search.msl'),
29
27
  t('myHomes.search.tax'),
30
28
  t('myHomes.search.google'),
31
29
  t('myHomes.search.leins'),
32
30
  ];
33
- const resolvedTitle = title !== null && title !== void 0 ? title : defaultTitle;
34
- const resolvedSubtitlePrefix = subtitlePrefix !== null && subtitlePrefix !== void 0 ? subtitlePrefix : defaultSubtitlePrefix;
35
- const resolvedSubtitle = subtitle !== null && subtitle !== void 0 ? subtitle : (showAddressInSubtitle
36
- ? `${resolvedSubtitlePrefix} ${address}`
37
- : resolvedSubtitlePrefix);
38
31
  const resolvedSources = sourcesText !== null && sourcesText !== void 0 ? sourcesText : defaultSources;
39
32
  useEffect(() => {
40
33
  const interval = setInterval(() => {
@@ -47,5 +40,5 @@ export const SearchRecords = ({ isFirstHome, isWizard = false, title, subtitle,
47
40
  return undefined;
48
41
  return `${1 + index * 0.5}s`;
49
42
  };
50
- return (_jsx(MyHomesStepWrapper, { isFirstHome: isFirstHome, isWizard: isWizard, children: _jsx(MyHomesStepBody, { isWizard: isWizard, animation: up, title: resolvedTitle, subtitle: resolvedSubtitle, children: _jsxs(Stack, { align: "center", bg: isWizard ? 'transparent' : 'lightViolet.1', borderRadius: "sm", w: "100%", py: "6", children: [_jsxs(Box, { position: "relative", children: [_jsx(CircularProgress, { value: progressValue, isIndeterminate: progressValue === 100, color: "violet.1", thickness: "4px", size: size, zIndex: "1" }), _jsx(Center, { position: "absolute", top: "0", left: "0", h: size, w: size, children: _jsx(Center, { bg: "neutral.white", h: "70px", w: "70px", borderRadius: "50%", children: _jsx(Image, { src: MagnifyingGlassReport, alt: "records", h: "40px", w: "auto" }) }) })] }), _jsx(Flex, { direction: "column", alignItems: "center", children: resolvedSources.map((text, index) => (_jsx(AnimatedText, { animation: fade, animationDelay: getAnimationDelay(index), children: text }, `${text}-${index}`))) })] }) }) }));
43
+ return (_jsx(MyHomesStepWrapper, { isFirstHome: isFirstHome, isWizard: isWizard, children: _jsx(MyHomesStepBody, { isWizard: isWizard, animation: up, title: title, subtitle: subtitle, children: _jsxs(Stack, { align: "center", bg: isWizard ? 'transparent' : 'lightViolet.1', borderRadius: "sm", w: "100%", py: "6", children: [_jsxs(Box, { position: "relative", children: [_jsx(CircularProgress, { value: progressValue, isIndeterminate: progressValue === 100, color: "violet.1", thickness: "4px", size: size, zIndex: "1" }), _jsx(Center, { position: "absolute", top: "0", left: "0", h: size, w: size, children: _jsx(Center, { bg: "neutral.white", h: "70px", w: "70px", borderRadius: "50%", children: _jsx(Image, { src: MagnifyingGlassReport, alt: "records", h: "40px", w: "auto" }) }) })] }), _jsx(Flex, { direction: "column", alignItems: "center", children: resolvedSources.map((text, index) => (_jsx(AnimatedText, { animation: fade, animationDelay: getAnimationDelay(index), children: text }, `${text}-${index}`))) })] }) }) }));
51
44
  };
@@ -1,4 +1,4 @@
1
1
  import { ControlledWizardI } from '../../interfaces';
2
2
  import { PropsWithChildren } from 'react';
3
- export declare function ControlledWizard({ bodyWidth, steps, height, headerBlink, footerBlink, ...props }: ControlledWizardI): import("react/jsx-runtime").JSX.Element | null;
3
+ export declare function ControlledWizard<Key extends string = string>({ bodyWidth, steps, height, headerBlink, footerBlink, ...props }: ControlledWizardI<Key>): import("react/jsx-runtime").JSX.Element | null;
4
4
  export declare const WizardBodyPadding: ({ children }: PropsWithChildren) => import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import { WrapperWithShadowI } from '../../interfaces';
2
2
  export interface MyHomesStepBodyI extends WrapperWithShadowI {
3
- subtitle: string;
4
- title: string;
3
+ subtitle?: string;
4
+ title?: string;
5
5
  }
@@ -1,9 +1,9 @@
1
- export interface ControlledWizardStepI {
2
- key?: string;
1
+ export interface ControlledWizardStepI<Key extends string = string> {
2
+ key?: Key;
3
3
  header: React.ReactNode;
4
4
  body: (args?: {
5
5
  setStep: (n: number) => void;
6
- setStepKey?: (key: string) => void;
6
+ setStepKey?: (key: Key) => void;
7
7
  }) => React.ReactNode;
8
8
  footer?: React.ReactNode;
9
9
  }
@@ -13,17 +13,17 @@ type ControlledWizardLegacyProps = {
13
13
  stepKey?: never;
14
14
  setStepKey?: never;
15
15
  };
16
- type ControlledWizardKeyedProps = {
16
+ type ControlledWizardKeyedProps<Key extends string = string> = {
17
17
  step?: never;
18
18
  setStep?: never;
19
- stepKey: string;
20
- setStepKey: (key: string) => void;
19
+ stepKey: Key;
20
+ setStepKey: (key: Key) => void;
21
21
  };
22
- export type ControlledWizardI = {
22
+ export type ControlledWizardI<Key extends string = string> = {
23
23
  bodyWidth?: string;
24
- steps: ControlledWizardStepI[];
24
+ steps: ControlledWizardStepI<Key>[];
25
25
  height?: string;
26
26
  headerBlink?: boolean;
27
27
  footerBlink?: boolean;
28
- } & (ControlledWizardLegacyProps | ControlledWizardKeyedProps);
28
+ } & (ControlledWizardLegacyProps | ControlledWizardKeyedProps<Key>);
29
29
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homefile/components-v2",
3
- "version": "2.40.30",
3
+ "version": "2.40.32",
4
4
  "author": "Homefile",
5
5
  "license": "UNLICENSED",
6
6
  "typings": "dist/index.d.ts",