@homefile/components-v2 2.51.2 → 2.51.4

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 (23) hide show
  1. package/dist/assets/locales/en/index.json +5 -1
  2. package/dist/assets/locales/pt/index.json +10 -0
  3. package/dist/components/partner/wizardSteps/PartnerWizardStepBrand.d.ts +2 -6
  4. package/dist/components/partner/wizardSteps/PartnerWizardStepBrand.js +41 -12
  5. package/dist/components/partner/wizardSteps/PartnerWizardStepCta.d.ts +2 -1
  6. package/dist/components/partner/wizardSteps/PartnerWizardStepCta.js +15 -6
  7. package/dist/components/partner/wizardSteps/PartnerWizardStepServiceZones.d.ts +2 -1
  8. package/dist/components/partner/wizardSteps/PartnerWizardStepServiceZones.js +9 -3
  9. package/dist/components/partner/wizardSteps/PartnerWizardStepSocial.d.ts +2 -1
  10. package/dist/components/partner/wizardSteps/PartnerWizardStepSocial.js +26 -14
  11. package/dist/interfaces/partner/PartnerWizardStepBrand.interface.d.ts +24 -0
  12. package/dist/interfaces/partner/PartnerWizardStepBrand.interface.js +1 -0
  13. package/dist/interfaces/partner/PartnerWizardStepCta.interface.d.ts +15 -0
  14. package/dist/interfaces/partner/PartnerWizardStepCta.interface.js +1 -0
  15. package/dist/interfaces/partner/PartnerWizardStepServiceZones.interface.d.ts +6 -0
  16. package/dist/interfaces/partner/PartnerWizardStepServiceZones.interface.js +1 -0
  17. package/dist/interfaces/partner/PartnerWizardStepSocial.interface.d.ts +14 -0
  18. package/dist/interfaces/partner/PartnerWizardStepSocial.interface.js +1 -0
  19. package/dist/interfaces/partner/index.d.ts +4 -0
  20. package/dist/interfaces/partner/index.js +4 -0
  21. package/dist/stories/partner/wizardSteps/PartnerWizardStepBrand.stories.d.ts +10 -0
  22. package/dist/stories/partner/wizardSteps/PartnerWizardStepBrand.stories.js +6 -0
  23. package/package.json +1 -1
@@ -786,7 +786,11 @@
786
786
  "logoTitle": "Upload your company logo",
787
787
  "logoHelper": "Upload your logo as a high-resolution .eps file for best quality. If that's not available, .png will work as well, but not preferred.",
788
788
  "uploadMessage": "Drag & Drop your Files or",
789
- "uploadMessageAction": "Choose Files to Upload."
789
+ "uploadMessageAction": "Choose Files to Upload.",
790
+ "uploadMessagePreparing": "Preparing upload...",
791
+ "uploadMessageUploading": "Uploading logo...",
792
+ "uploadMessageFinalizing": "Finalizing logo...",
793
+ "logoPreviewAlt": "Brand logo preview"
790
794
  },
791
795
  "services": {
792
796
  "title": "2. Add Your Services",
@@ -16,5 +16,15 @@
16
16
  "signupBt": "Criar conta",
17
17
  "signin": "Já possui uma conta Homefile?",
18
18
  "signinBt": "Log in"
19
+ },
20
+ "partner": {
21
+ "wizardSteps": {
22
+ "brand": {
23
+ "uploadMessagePreparing": "Preparando upload...",
24
+ "uploadMessageUploading": "Enviando logo...",
25
+ "uploadMessageFinalizing": "Finalizando logo...",
26
+ "logoPreviewAlt": "Prévia da logo da marca"
27
+ }
28
+ }
19
29
  }
20
30
  }
@@ -1,6 +1,2 @@
1
- interface PartnerWizardStepBrandI {
2
- logoUploading?: boolean;
3
- onLogoUpload?: (file: File) => void;
4
- }
5
- export declare const PartnerWizardStepBrand: ({ logoUploading, onLogoUpload, }: PartnerWizardStepBrandI) => import("react/jsx-runtime").JSX.Element;
6
- export {};
1
+ import { PartnerWizardStepBrandI } from '../../../interfaces';
2
+ export declare const PartnerWizardStepBrand: ({ value, onChange, errors, disabled, readOnly, logoUploading, logoUploadState, logoAccept, logoMaxFiles, onLogoUpload, }: PartnerWizardStepBrandI) => import("react/jsx-runtime").JSX.Element;
@@ -1,26 +1,55 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useState } from 'react';
2
+ import { useMemo, useState } from 'react';
3
3
  import { t } from 'i18next';
4
4
  import { useDropzone } from 'react-dropzone';
5
5
  import { Box, Flex, Stack, Text } from '@chakra-ui/react';
6
6
  import { DragDropArea, TextInput } from '../../../components';
7
7
  import { PartnerWizardStepLayout } from './PartnerWizardStepLayout';
8
- export const PartnerWizardStepBrand = ({ logoUploading = false, onLogoUpload, }) => {
9
- const [tagline, setTagline] = useState('');
10
- const [websiteUrl, setWebsiteUrl] = useState('');
8
+ const buildDefaultValue = () => ({
9
+ marketingTagline: '',
10
+ websiteUrl: '',
11
+ logoUrl: '',
12
+ });
13
+ export const PartnerWizardStepBrand = ({ value, onChange, errors, disabled = false, readOnly = false, logoUploading = false, logoUploadState, logoAccept = {
14
+ 'image/gif': ['.gif'],
15
+ 'image/jpeg': ['.jpeg', '.jpg'],
16
+ 'image/png': ['.png'],
17
+ 'image/webp': ['.webp'],
18
+ }, logoMaxFiles = 1, onLogoUpload, }) => {
19
+ const [internalValue, setInternalValue] = useState(buildDefaultValue);
20
+ const currentValue = value !== null && value !== void 0 ? value : internalValue;
21
+ const isDisabled = disabled || readOnly;
22
+ const isLogoUploading = logoUploading ||
23
+ logoUploadState === 'requesting_signed_url' ||
24
+ logoUploadState === 'uploading_to_storage' ||
25
+ logoUploadState === 'finalizing';
26
+ const handleValueChange = (next) => {
27
+ var _a;
28
+ if (!value)
29
+ setInternalValue(Object.assign(Object.assign({}, next), { logoUrl: (_a = next.logoUrl) !== null && _a !== void 0 ? _a : '' }));
30
+ onChange === null || onChange === void 0 ? void 0 : onChange(next);
31
+ };
11
32
  const { getInputProps, getRootProps } = useDropzone({
12
- accept: {
13
- 'application/postscript': ['.eps'],
14
- 'image/jpeg': ['.jpeg', '.jpg'],
15
- 'image/png': ['.png'],
16
- },
17
- disabled: logoUploading,
18
- maxFiles: 1,
33
+ accept: logoAccept,
34
+ disabled: isLogoUploading || isDisabled,
35
+ maxFiles: logoMaxFiles,
19
36
  multiple: false,
20
37
  onDrop: (acceptedFiles) => {
21
38
  const selectedFile = acceptedFiles[0];
22
39
  selectedFile && (onLogoUpload === null || onLogoUpload === void 0 ? void 0 : onLogoUpload(selectedFile));
23
40
  },
24
41
  });
25
- return (_jsxs(PartnerWizardStepLayout, { title: t('partner.wizardSteps.brand.title'), subtitle: t('partner.wizardSteps.brand.subtitle'), children: [_jsxs(Flex, { gap: "base", direction: { base: 'column', md: 'row' }, children: [_jsx(Box, { flex: "7", children: _jsx(TextInput, { id: "partnerWizardTagline", placeholder: t('partner.wizardSteps.brand.taglinePlaceholder'), value: tagline, handleChange: (event) => setTagline(event.target.value), hint: t('partner.wizardSteps.brand.taglineHelper') }) }), _jsx(Box, { flex: "5", children: _jsx(TextInput, { id: "partnerWizardWebsite", placeholder: t('partner.wizardSteps.brand.websitePlaceholder'), value: websiteUrl, handleChange: (event) => setWebsiteUrl(event.target.value), hint: t('partner.wizardSteps.brand.websiteHelper') }) })] }), _jsx(Box, { bg: "lightBlue.12", p: "base", borderRadius: "sm", children: _jsxs(Stack, { spacing: "base", children: [_jsx(Text, { children: t('partner.wizardSteps.brand.logoTitle') }), _jsx(Text, { fontFamily: "secondary", fontSize: "sm", children: t('partner.wizardSteps.brand.logoHelper') }), _jsx(DragDropArea, { height: "130px", getInputProps: getInputProps, getRootProps: getRootProps, message: t('partner.wizardSteps.brand.uploadMessage'), message2: t('partner.wizardSteps.brand.uploadMessageAction'), disabled: logoUploading, bg: "transparent" })] }) })] }));
42
+ const uploadMessage = useMemo(() => {
43
+ if (logoUploadState === 'requesting_signed_url') {
44
+ return t('partner.wizardSteps.brand.uploadMessagePreparing');
45
+ }
46
+ if (logoUploadState === 'uploading_to_storage') {
47
+ return t('partner.wizardSteps.brand.uploadMessageUploading');
48
+ }
49
+ if (logoUploadState === 'finalizing') {
50
+ return t('partner.wizardSteps.brand.uploadMessageFinalizing');
51
+ }
52
+ return t('partner.wizardSteps.brand.uploadMessage');
53
+ }, [logoUploadState]);
54
+ return (_jsxs(PartnerWizardStepLayout, { title: t('partner.wizardSteps.brand.title'), subtitle: t('partner.wizardSteps.brand.subtitle'), children: [_jsxs(Flex, { gap: "base", direction: { base: 'column', md: 'row' }, children: [_jsx(Box, { flex: "7", children: _jsx(TextInput, { id: "partnerWizardTagline", placeholder: t('partner.wizardSteps.brand.taglinePlaceholder'), value: currentValue.marketingTagline, handleChange: (event) => handleValueChange(Object.assign(Object.assign({}, currentValue), { marketingTagline: event.target.value })), hint: (errors === null || errors === void 0 ? void 0 : errors.marketingTagline) || t('partner.wizardSteps.brand.taglineHelper'), isDisabled: isDisabled }) }), _jsx(Box, { flex: "5", children: _jsx(TextInput, { id: "partnerWizardWebsite", placeholder: t('partner.wizardSteps.brand.websitePlaceholder'), value: currentValue.websiteUrl, handleChange: (event) => handleValueChange(Object.assign(Object.assign({}, currentValue), { websiteUrl: event.target.value })), hint: (errors === null || errors === void 0 ? void 0 : errors.websiteUrl) || t('partner.wizardSteps.brand.websiteHelper'), isDisabled: isDisabled }) })] }), _jsx(Box, { bg: "lightBlue.12", p: "base", borderRadius: "sm", children: _jsxs(Stack, { spacing: "base", children: [_jsx(Text, { children: t('partner.wizardSteps.brand.logoTitle') }), _jsx(Text, { fontFamily: "secondary", fontSize: "sm", children: (errors === null || errors === void 0 ? void 0 : errors.logo) || t('partner.wizardSteps.brand.logoHelper') }), _jsx(DragDropArea, { height: "130px", getInputProps: getInputProps, getRootProps: getRootProps, message: uploadMessage, message2: t('partner.wizardSteps.brand.uploadMessageAction'), disabled: isLogoUploading || isDisabled, bg: "transparent" }), currentValue.logoUrl ? (_jsx(Box, { children: _jsx("img", { src: currentValue.logoUrl, alt: t('partner.wizardSteps.brand.logoPreviewAlt'), style: { maxHeight: '64px' } }) })) : null] }) })] }));
26
55
  };
@@ -1 +1,2 @@
1
- export declare const PartnerWizardStepCta: () => import("react/jsx-runtime").JSX.Element;
1
+ import { PartnerWizardStepCtaI } from '../../../interfaces';
2
+ export declare const PartnerWizardStepCta: ({ value, onChange, errors, isDisabled, }: PartnerWizardStepCtaI) => import("react/jsx-runtime").JSX.Element;
@@ -6,12 +6,21 @@ import { Box, Flex, Text } from '@chakra-ui/react';
6
6
  import { TextInput } from '../../../components';
7
7
  import { PartnerWizardStepLayout } from './PartnerWizardStepLayout';
8
8
  const STEP_KEY = 'partner.wizardSteps.cta';
9
- export const PartnerWizardStepCta = () => {
10
- const [primaryAction, setPrimaryAction] = useState('');
11
- const [secondaryAction, setSecondaryAction] = useState('');
12
- const [leadEmail, setLeadEmail] = useState('');
13
- const [crmName, setCrmName] = useState('');
9
+ const buildDefaultValue = () => ({
10
+ primaryActionButton: '',
11
+ secondaryActionButton: '',
12
+ leadSubmissionEmail: '',
13
+ crmName: '',
14
+ });
15
+ export const PartnerWizardStepCta = ({ value, onChange, errors, isDisabled = false, }) => {
16
+ const [internalValue, setInternalValue] = useState(buildDefaultValue);
17
+ const currentValue = value !== null && value !== void 0 ? value : internalValue;
18
+ const handleChange = (next) => {
19
+ if (!value)
20
+ setInternalValue(next);
21
+ onChange === null || onChange === void 0 ? void 0 : onChange(next);
22
+ };
14
23
  return (_jsxs(PartnerWizardStepLayout, { title: t(`${STEP_KEY}.title`), contentFullWidth: true, subtitle: _jsx(Trans, { i18nKey: `${STEP_KEY}.subtitle`, components: {
15
24
  bold: _jsx(Text, { as: "span", fontWeight: "bold" }),
16
- } }), children: [_jsxs(Flex, { gap: "base", direction: { base: 'column', md: 'row' }, children: [_jsxs(Box, { flex: "1", children: [_jsx(Text, { fontSize: "xs", mb: "1", textTransform: "uppercase", children: t(`${STEP_KEY}.primaryActionLabel`) }), _jsx(TextInput, { showLabel: false, id: "partnerWizardPrimaryAction", placeholder: t(`${STEP_KEY}.primaryActionPlaceholder`), value: primaryAction, handleChange: (event) => setPrimaryAction(event.target.value) })] }), _jsxs(Box, { flex: "1", children: [_jsx(Text, { fontSize: "xs", mb: "1", textTransform: "uppercase", children: t(`${STEP_KEY}.secondaryActionLabel`) }), _jsx(TextInput, { showLabel: false, id: "partnerWizardSecondaryAction", placeholder: t(`${STEP_KEY}.secondaryActionPlaceholder`), value: secondaryAction, handleChange: (event) => setSecondaryAction(event.target.value) })] })] }), _jsxs(Box, { bg: "lightBlue.12", p: "base", borderRadius: "sm", children: [_jsx(Text, { mb: "1", children: t(`${STEP_KEY}.leadSubmissionTitle`) }), _jsx(Text, { fontFamily: "secondary", fontSize: "sm", mb: "2", children: t(`${STEP_KEY}.leadEmailLabel`) }), _jsx(TextInput, { id: "partnerWizardLeadEmail", placeholder: t(`${STEP_KEY}.leadEmailPlaceholder`), value: leadEmail, handleChange: (event) => setLeadEmail(event.target.value) }), _jsx(Text, { fontFamily: "secondary", fontSize: "sm", mt: "3", mb: "2", children: t(`${STEP_KEY}.crmLabel`) }), _jsx(TextInput, { id: "partnerWizardCrmName", placeholder: t(`${STEP_KEY}.crmPlaceholder`), value: crmName, handleChange: (event) => setCrmName(event.target.value) })] })] }));
25
+ } }), children: [_jsxs(Flex, { gap: "base", direction: { base: 'column', md: 'row' }, children: [_jsxs(Box, { flex: "1", children: [_jsx(Text, { fontSize: "xs", mb: "1", textTransform: "uppercase", children: t(`${STEP_KEY}.primaryActionLabel`) }), _jsx(TextInput, { showLabel: false, id: "partnerWizardPrimaryAction", placeholder: t(`${STEP_KEY}.primaryActionPlaceholder`), value: currentValue.primaryActionButton, handleChange: (event) => handleChange(Object.assign(Object.assign({}, currentValue), { primaryActionButton: event.target.value })), errorMessage: errors === null || errors === void 0 ? void 0 : errors.primaryActionButton, isDisabled: isDisabled })] }), _jsxs(Box, { flex: "1", children: [_jsx(Text, { fontSize: "xs", mb: "1", textTransform: "uppercase", children: t(`${STEP_KEY}.secondaryActionLabel`) }), _jsx(TextInput, { showLabel: false, id: "partnerWizardSecondaryAction", placeholder: t(`${STEP_KEY}.secondaryActionPlaceholder`), value: currentValue.secondaryActionButton, handleChange: (event) => handleChange(Object.assign(Object.assign({}, currentValue), { secondaryActionButton: event.target.value })), isDisabled: isDisabled })] })] }), _jsxs(Box, { bg: "lightBlue.12", p: "base", borderRadius: "sm", children: [_jsx(Text, { mb: "1", children: t(`${STEP_KEY}.leadSubmissionTitle`) }), _jsx(Text, { fontFamily: "secondary", fontSize: "sm", mb: "2", children: t(`${STEP_KEY}.leadEmailLabel`) }), _jsx(TextInput, { id: "partnerWizardLeadEmail", placeholder: t(`${STEP_KEY}.leadEmailPlaceholder`), value: currentValue.leadSubmissionEmail, handleChange: (event) => handleChange(Object.assign(Object.assign({}, currentValue), { leadSubmissionEmail: event.target.value })), errorMessage: errors === null || errors === void 0 ? void 0 : errors.leadSubmissionEmail, isDisabled: isDisabled }), _jsx(Text, { fontFamily: "secondary", fontSize: "sm", mt: "3", mb: "2", children: t(`${STEP_KEY}.crmLabel`) }), _jsx(TextInput, { id: "partnerWizardCrmName", placeholder: t(`${STEP_KEY}.crmPlaceholder`), value: currentValue.crmName, handleChange: (event) => handleChange(Object.assign(Object.assign({}, currentValue), { crmName: event.target.value })), isDisabled: isDisabled })] })] }));
17
26
  };
@@ -1 +1,2 @@
1
- export declare const PartnerWizardStepServiceZones: () => import("react/jsx-runtime").JSX.Element;
1
+ import { PartnerWizardStepServiceZonesI } from '../../../interfaces';
2
+ export declare const PartnerWizardStepServiceZones: ({ value, onChange, errorMessage, isDisabled, }: PartnerWizardStepServiceZonesI) => import("react/jsx-runtime").JSX.Element;
@@ -3,7 +3,13 @@ import { useState } from 'react';
3
3
  import { t } from 'i18next';
4
4
  import { TextAreaInput } from '../../../components';
5
5
  import { PartnerWizardStepLayout } from './PartnerWizardStepLayout';
6
- export const PartnerWizardStepServiceZones = () => {
7
- const [serviceZones, setServiceZones] = useState('');
8
- return (_jsx(PartnerWizardStepLayout, { title: t('partner.wizardSteps.serviceZones.title'), subtitle: t('partner.wizardSteps.serviceZones.subtitle'), contentFullWidth: true, children: _jsx(TextAreaInput, { id: "partnerWizardServiceZones", placeholder: t('partner.wizardSteps.serviceZones.placeholder'), value: serviceZones, onChange: (event) => setServiceZones(event.target.value), minH: "260px", resize: "none" }) }));
6
+ export const PartnerWizardStepServiceZones = ({ value, onChange, errorMessage, isDisabled = false, }) => {
7
+ const [internalValue, setInternalValue] = useState('');
8
+ const currentValue = value !== null && value !== void 0 ? value : internalValue;
9
+ const handleChange = (next) => {
10
+ if (value === undefined)
11
+ setInternalValue(next);
12
+ onChange === null || onChange === void 0 ? void 0 : onChange(next);
13
+ };
14
+ return (_jsx(PartnerWizardStepLayout, { title: t('partner.wizardSteps.serviceZones.title'), subtitle: t('partner.wizardSteps.serviceZones.subtitle'), contentFullWidth: true, children: _jsx(TextAreaInput, { id: "partnerWizardServiceZones", placeholder: t('partner.wizardSteps.serviceZones.placeholder'), value: currentValue, onChange: (event) => handleChange(event.target.value), errorMessage: errorMessage, isDisabled: isDisabled, minH: "260px", resize: "none" }) }));
9
15
  };
@@ -1 +1,2 @@
1
- export declare const PartnerWizardStepSocial: () => import("react/jsx-runtime").JSX.Element;
1
+ import { PartnerWizardStepSocialI } from '../../../interfaces';
2
+ export declare const PartnerWizardStepSocial: ({ value, onChange, errorMessage, isDisabled, }: PartnerWizardStepSocialI) => import("react/jsx-runtime").JSX.Element;
@@ -1,21 +1,33 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useState } from 'react';
3
3
  import { t } from 'i18next';
4
+ import { Text } from '@chakra-ui/react';
4
5
  import { TextInput } from '../../../components';
5
6
  import { PartnerWizardStepLayout } from './PartnerWizardStepLayout';
6
7
  const STEP_KEY = 'partner.wizardSteps.social';
7
- const SOCIAL_FIELDS = ['facebook', 'instagram', 'twitter', 'linkedin', 'tiktok'];
8
- export const PartnerWizardStepSocial = () => {
9
- const [socialLinks, setSocialLinks] = useState(Array(SOCIAL_FIELDS.length).fill(''));
10
- const handleSocialLinkChange = (index, value) => {
11
- setSocialLinks((currentSocialLinks) => {
12
- const updatedSocialLinks = [...currentSocialLinks];
13
- updatedSocialLinks[index] = value;
14
- return updatedSocialLinks;
15
- });
8
+ const SOCIAL_FIELDS = [
9
+ 'facebook',
10
+ 'instagram',
11
+ 'youtube',
12
+ 'twitter',
13
+ 'linkedin',
14
+ 'tiktok',
15
+ ];
16
+ const buildDefaultValue = () => ({
17
+ facebook: '',
18
+ instagram: '',
19
+ youtube: '',
20
+ twitter: '',
21
+ linkedin: '',
22
+ tiktok: '',
23
+ });
24
+ export const PartnerWizardStepSocial = ({ value, onChange, errorMessage, isDisabled = false, }) => {
25
+ const [internalValue, setInternalValue] = useState(buildDefaultValue);
26
+ const currentValue = value !== null && value !== void 0 ? value : internalValue;
27
+ const handleChange = (next) => {
28
+ if (!value)
29
+ setInternalValue(next);
30
+ onChange === null || onChange === void 0 ? void 0 : onChange(next);
16
31
  };
17
- return (_jsx(PartnerWizardStepLayout, { title: t(`${STEP_KEY}.title`), subtitle: t(`${STEP_KEY}.subtitle`), contentSpacing: "3", contentFullWidth: true, children: socialLinks.map((socialLink, index) => {
18
- const field = SOCIAL_FIELDS[index];
19
- return (_jsx(TextInput, { id: `partnerWizardSocial-${field}`, placeholder: t(`${STEP_KEY}.placeholder.${field}`), value: socialLink, handleChange: (event) => handleSocialLinkChange(index, event.target.value) }, `partnerWizardSocial-${field}`));
20
- }) }));
32
+ return (_jsxs(PartnerWizardStepLayout, { title: t(`${STEP_KEY}.title`), subtitle: t(`${STEP_KEY}.subtitle`), contentSpacing: "3", contentFullWidth: true, children: [SOCIAL_FIELDS.map((field) => (_jsx(TextInput, { id: `partnerWizardSocial-${field}`, placeholder: t(`${STEP_KEY}.placeholder.${field}`), value: currentValue[field], handleChange: (event) => handleChange(Object.assign(Object.assign({}, currentValue), { [field]: event.target.value })), isDisabled: isDisabled }, `partnerWizardSocial-${field}`))), errorMessage && (_jsx(Text, { variant: "error", my: "1", children: errorMessage }))] }));
21
33
  };
@@ -0,0 +1,24 @@
1
+ export type PartnerWizardStepBrandValue = {
2
+ websiteUrl: string;
3
+ marketingTagline: string;
4
+ logoUrl?: string;
5
+ };
6
+ export type PartnerWizardStepBrandErrors = {
7
+ websiteUrl?: string;
8
+ marketingTagline?: string;
9
+ logo?: string;
10
+ };
11
+ export type PartnerWizardStepBrandLogoUploadState = 'idle' | 'requesting_signed_url' | 'uploading_to_storage' | 'finalizing' | 'done' | 'error';
12
+ export type PartnerWizardStepBrandI = {
13
+ value?: PartnerWizardStepBrandValue;
14
+ onChange?: (next: PartnerWizardStepBrandValue) => void;
15
+ errors?: PartnerWizardStepBrandErrors;
16
+ disabled?: boolean;
17
+ readOnly?: boolean;
18
+ logoUploading?: boolean;
19
+ logoUploadState?: PartnerWizardStepBrandLogoUploadState;
20
+ logoAccept?: Record<string, string[]>;
21
+ logoMaxFiles?: number;
22
+ onLogoUpload?: (file: File) => void | Promise<void>;
23
+ onLogoRemove?: () => void;
24
+ };
@@ -0,0 +1,15 @@
1
+ export type PartnerWizardStepCtaValue = {
2
+ primaryActionButton: string;
3
+ secondaryActionButton: string;
4
+ leadSubmissionEmail: string;
5
+ crmName: string;
6
+ };
7
+ export interface PartnerWizardStepCtaI {
8
+ value?: PartnerWizardStepCtaValue;
9
+ onChange?: (value: PartnerWizardStepCtaValue) => void;
10
+ errors?: {
11
+ primaryActionButton?: string;
12
+ leadSubmissionEmail?: string;
13
+ };
14
+ isDisabled?: boolean;
15
+ }
@@ -0,0 +1,6 @@
1
+ export interface PartnerWizardStepServiceZonesI {
2
+ value?: string;
3
+ onChange?: (value: string) => void;
4
+ errorMessage?: string;
5
+ isDisabled?: boolean;
6
+ }
@@ -0,0 +1,14 @@
1
+ export type PartnerWizardStepSocialValue = {
2
+ facebook: string;
3
+ instagram: string;
4
+ youtube: string;
5
+ twitter: string;
6
+ linkedin: string;
7
+ tiktok: string;
8
+ };
9
+ export interface PartnerWizardStepSocialI {
10
+ value?: PartnerWizardStepSocialValue;
11
+ onChange?: (value: PartnerWizardStepSocialValue) => void;
12
+ errorMessage?: string;
13
+ isDisabled?: boolean;
14
+ }
@@ -19,3 +19,7 @@ export * from './PartnerServiceTicketsToolbar.interface';
19
19
  export * from './ShortPartnerTile.interface';
20
20
  export * from './PartnerWizardSteps.interface';
21
21
  export * from './PartnerWizardStepServicesSelect.interface';
22
+ export * from './PartnerWizardStepBrand.interface';
23
+ export * from './PartnerWizardStepServiceZones.interface';
24
+ export * from './PartnerWizardStepCta.interface';
25
+ export * from './PartnerWizardStepSocial.interface';
@@ -19,3 +19,7 @@ export * from './PartnerServiceTicketsToolbar.interface';
19
19
  export * from './ShortPartnerTile.interface';
20
20
  export * from './PartnerWizardSteps.interface';
21
21
  export * from './PartnerWizardStepServicesSelect.interface';
22
+ export * from './PartnerWizardStepBrand.interface';
23
+ export * from './PartnerWizardStepServiceZones.interface';
24
+ export * from './PartnerWizardStepCta.interface';
25
+ export * from './PartnerWizardStepSocial.interface';
@@ -4,4 +4,14 @@ export default _default;
4
4
  export declare const Brand: (args: {
5
5
  logoUploading?: boolean;
6
6
  onLogoUpload?: (file: File) => void;
7
+ value?: {
8
+ websiteUrl: string;
9
+ marketingTagline: string;
10
+ logoUrl?: string;
11
+ };
12
+ onChange?: (next: {
13
+ websiteUrl: string;
14
+ marketingTagline: string;
15
+ logoUrl?: string;
16
+ }) => void;
7
17
  }) => import("react/jsx-runtime").JSX.Element;
@@ -8,6 +8,12 @@ export default {
8
8
  args: {
9
9
  logoUploading: false,
10
10
  onLogoUpload: action('onLogoUpload'),
11
+ value: {
12
+ websiteUrl: 'https://poolie.com',
13
+ marketingTagline: 'Pool Experts',
14
+ logoUrl: '',
15
+ },
16
+ onChange: action('onChange'),
11
17
  },
12
18
  decorators: [
13
19
  (Story) => (_jsx(Box, { maxW: "960px", mx: "auto", p: "base", children: _jsx(Story, {}) })),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homefile/components-v2",
3
- "version": "2.51.2",
3
+ "version": "2.51.4",
4
4
  "author": "Homefile",
5
5
  "license": "UNLICENSED",
6
6
  "typings": "dist/index.d.ts",