@homefile/components-v2 1.6.1 → 2.1.0

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 (102) hide show
  1. package/dist/components/animations/CloudsAnimation.d.ts +5 -5
  2. package/dist/components/animations/CloudsAnimation.js +2 -1
  3. package/dist/components/animations/HomieAnimation.js +1 -1
  4. package/dist/components/customToast/CustomToast.js +1 -1
  5. package/dist/components/customToast/StatusIllustration.js +3 -3
  6. package/dist/components/forms/dynamicForm/DynamicForm.d.ts +1 -1
  7. package/dist/components/forms/dynamicForm/DynamicForm.js +16 -2
  8. package/dist/components/forms/dynamicForm/fields/SingleFields.d.ts +2 -5
  9. package/dist/components/forms/dynamicForm/fields/SingleFields.js +16 -2
  10. package/dist/components/forms/dynamicForm/fields/index.d.ts +1 -0
  11. package/dist/components/forms/dynamicForm/fields/index.js +1 -0
  12. package/dist/components/forms/dynamicForm/fields/uiFields/TileBody.d.ts +2 -0
  13. package/dist/components/forms/dynamicForm/fields/uiFields/TileBody.js +18 -0
  14. package/dist/components/forms/dynamicForm/fields/uiFields/TileBody.tsx +24 -0
  15. package/dist/components/forms/dynamicForm/fields/uiFields/TileBodyAction.d.ts +2 -0
  16. package/dist/components/forms/dynamicForm/fields/uiFields/TileBodyAction.js +6 -0
  17. package/dist/components/forms/dynamicForm/fields/uiFields/TileBodyAction.tsx +11 -0
  18. package/dist/components/forms/dynamicForm/fields/uiFields/TileBodyHeader.d.ts +3 -0
  19. package/dist/components/forms/dynamicForm/fields/uiFields/TileBodyHeader.js +5 -0
  20. package/dist/components/forms/dynamicForm/fields/uiFields/TileBodyHeader.tsx +9 -0
  21. package/dist/components/forms/dynamicForm/fields/uiFields/TileBodyLogo.d.ts +2 -0
  22. package/dist/components/forms/dynamicForm/fields/uiFields/TileBodyLogo.js +5 -0
  23. package/dist/components/forms/dynamicForm/fields/uiFields/TileBodyLogo.tsx +10 -0
  24. package/dist/components/forms/dynamicForm/fields/uiFields/TileBodySectionGrid.d.ts +2 -0
  25. package/dist/components/forms/dynamicForm/fields/uiFields/TileBodySectionGrid.js +6 -0
  26. package/dist/components/forms/dynamicForm/fields/uiFields/TileBodySectionGrid.tsx +11 -0
  27. package/dist/components/forms/dynamicForm/fields/uiFields/TileCta.d.ts +2 -0
  28. package/dist/components/forms/dynamicForm/fields/uiFields/TileCta.js +5 -0
  29. package/dist/components/forms/dynamicForm/fields/uiFields/TileCta.tsx +14 -0
  30. package/dist/components/forms/dynamicForm/fields/uiFields/VerticalIcon.d.ts +2 -0
  31. package/dist/components/forms/dynamicForm/fields/uiFields/VerticalIcon.js +5 -0
  32. package/dist/components/forms/dynamicForm/fields/uiFields/VerticalIcon.tsx +31 -0
  33. package/dist/components/forms/dynamicForm/fields/uiFields/index.d.ts +7 -0
  34. package/dist/components/forms/dynamicForm/fields/uiFields/index.js +7 -0
  35. package/dist/components/forms/dynamicForm/fields/uiFields/index.ts +7 -0
  36. package/dist/components/homeBoard/ConfirmHomeAddress.js +2 -1
  37. package/dist/components/icons/DisplayGrid.js +1 -1
  38. package/dist/components/icons/DisplayItem.js +1 -1
  39. package/dist/components/icons/DisplayList.js +1 -1
  40. package/dist/components/icons/Upload.js +1 -1
  41. package/dist/components/inputs/SelectInputWithBadge.js +3 -3
  42. package/dist/components/myHomes/steps/MyHomeDetails.js +2 -1
  43. package/dist/components/myHomes/steps/SearchRecords.js +2 -1
  44. package/dist/components/overlay/Overlay.js +2 -1
  45. package/dist/components/partner/adminTiles/satisfactionTile/SatisfactionProgress.js +2 -1
  46. package/dist/components/sendDocument/RecipientContent.js +3 -1
  47. package/dist/helpers/forms/dynamicForm.helper.js +7 -1
  48. package/dist/hooks/homeBoard/useConfirmHomeAddress.d.ts +3 -18
  49. package/dist/hooks/myHomes/useAddHomeContent.d.ts +3 -18
  50. package/dist/hooks/myProfile/useTwoFactorSetting.d.ts +3 -18
  51. package/dist/hooks/partner/preview/usePartnerTilePreview.d.ts +2 -2
  52. package/dist/interfaces/forms/dynamicForm/DynamicForm.interface.d.ts +9 -4
  53. package/dist/interfaces/forms/dynamicForm/fields/GroupField.interface.d.ts +6 -1
  54. package/dist/interfaces/forms/dynamicForm/fields/UIFields.interface.d.ts +20 -0
  55. package/dist/interfaces/forms/dynamicForm/fields/UIFields.interface.js +1 -0
  56. package/dist/interfaces/forms/dynamicForm/fields/index.d.ts +1 -0
  57. package/dist/interfaces/forms/dynamicForm/fields/index.js +1 -0
  58. package/dist/interfaces/icons/CustomIcon.interface.d.ts +2 -3
  59. package/dist/interfaces/partner/PartnerFooter.interface.d.ts +0 -1
  60. package/dist/mocks/forms/dynamicForm.mock.d.ts +1 -0
  61. package/dist/mocks/forms/dynamicForm.mock.js +159 -0
  62. package/dist/stories/forms/dynamicForm/DynamicForm.stories.d.ts +1 -0
  63. package/dist/stories/forms/dynamicForm/DynamicForm.stories.js +9 -3
  64. package/dist/stories/tour/Bubble.stories.d.ts +1 -1
  65. package/dist/stories/tour/HomeBoardTour.stories.d.ts +1 -1
  66. package/dist/stories/tour/LaunchpadTour.stories.d.ts +1 -1
  67. package/package.json +44 -43
  68. package/src/components/animations/CloudsAnimation.tsx +2 -1
  69. package/src/components/animations/HomieAnimation.tsx +1 -1
  70. package/src/components/customToast/CustomToast.tsx +4 -3
  71. package/src/components/customToast/StatusIllustration.tsx +3 -3
  72. package/src/components/forms/dynamicForm/DynamicForm.tsx +14 -0
  73. package/src/components/forms/dynamicForm/fields/SingleFields.tsx +62 -6
  74. package/src/components/forms/dynamicForm/fields/index.ts +1 -0
  75. package/src/components/forms/dynamicForm/fields/uiFields/TileBody.tsx +24 -0
  76. package/src/components/forms/dynamicForm/fields/uiFields/TileBodyAction.tsx +11 -0
  77. package/src/components/forms/dynamicForm/fields/uiFields/TileBodyHeader.tsx +9 -0
  78. package/src/components/forms/dynamicForm/fields/uiFields/TileBodyLogo.tsx +10 -0
  79. package/src/components/forms/dynamicForm/fields/uiFields/TileBodySectionGrid.tsx +11 -0
  80. package/src/components/forms/dynamicForm/fields/uiFields/TileCta.tsx +14 -0
  81. package/src/components/forms/dynamicForm/fields/uiFields/VerticalIcon.tsx +31 -0
  82. package/src/components/forms/dynamicForm/fields/uiFields/index.ts +7 -0
  83. package/src/components/homeBoard/ConfirmHomeAddress.tsx +1 -1
  84. package/src/components/icons/DisplayGrid.tsx +1 -1
  85. package/src/components/icons/DisplayItem.tsx +1 -1
  86. package/src/components/icons/DisplayList.tsx +1 -1
  87. package/src/components/icons/Upload.tsx +1 -1
  88. package/src/components/inputs/SelectInputWithBadge.tsx +6 -4
  89. package/src/components/myHomes/steps/MyHomeDetails.tsx +1 -1
  90. package/src/components/myHomes/steps/SearchRecords.tsx +1 -1
  91. package/src/components/overlay/Overlay.tsx +2 -1
  92. package/src/components/partner/adminTiles/satisfactionTile/SatisfactionProgress.tsx +2 -1
  93. package/src/components/sendDocument/RecipientContent.tsx +15 -7
  94. package/src/helpers/forms/dynamicForm.helper.ts +12 -0
  95. package/src/interfaces/forms/dynamicForm/DynamicForm.interface.ts +27 -2
  96. package/src/interfaces/forms/dynamicForm/fields/GroupField.interface.ts +7 -1
  97. package/src/interfaces/forms/dynamicForm/fields/UIFields.interface.ts +24 -0
  98. package/src/interfaces/forms/dynamicForm/fields/index.ts +1 -0
  99. package/src/interfaces/icons/CustomIcon.interface.ts +2 -3
  100. package/src/interfaces/partner/PartnerFooter.interface.ts +0 -1
  101. package/src/mocks/forms/dynamicForm.mock.ts +162 -0
  102. package/src/stories/forms/dynamicForm/DynamicForm.stories.tsx +14 -3
@@ -8,22 +8,7 @@ export declare const useAddHouseContent: (values: HomeFormI | undefined, callbac
8
8
  handleSelectRecords: (event: ChangeEvent<HTMLInputElement>) => void;
9
9
  handleSubmit: () => void;
10
10
  isOwner: boolean;
11
- group: import("react").AriaAttributes & import("react").DOMAttributes<import("@chakra-ui/react-types").DOMElement> & import("@chakra-ui/react-types").DataAttributes & {
12
- id?: string;
13
- role?: React.AriaRole;
14
- tabIndex?: number;
15
- style?: React.CSSProperties;
16
- } & import("react").RefAttributes<any>;
17
- ownRadio: import("@chakra-ui/react-types").InputDOMProps & import("react").AriaAttributes & import("react").DOMAttributes<HTMLInputElement> & import("@chakra-ui/react-types").DataAttributes & {
18
- id?: string;
19
- role?: React.AriaRole;
20
- tabIndex?: number;
21
- style?: React.CSSProperties;
22
- } & import("react").RefAttributes<any>;
23
- rentRadio: import("@chakra-ui/react-types").InputDOMProps & import("react").AriaAttributes & import("react").DOMAttributes<HTMLInputElement> & import("@chakra-ui/react-types").DataAttributes & {
24
- id?: string;
25
- role?: React.AriaRole;
26
- tabIndex?: number;
27
- style?: React.CSSProperties;
28
- } & import("react").RefAttributes<any>;
11
+ group: import("@chakra-ui/utils").DOMAttributes<import("@chakra-ui/utils").DOMElement> & import("react").RefAttributes<any>;
12
+ ownRadio: import("@chakra-ui/utils").InputDOMAttributes & import("react").RefAttributes<any>;
13
+ rentRadio: import("@chakra-ui/utils").InputDOMAttributes & import("react").RefAttributes<any>;
29
14
  };
@@ -6,18 +6,8 @@ export declare const useTwoFactorSetting: ({ defaultValue, email, onChange, sms,
6
6
  sms: string | undefined;
7
7
  '2fa': boolean;
8
8
  }, any>;
9
- emailRadio: import("@chakra-ui/react-types").InputDOMProps & import("react").AriaAttributes & import("react").DOMAttributes<HTMLInputElement> & import("@chakra-ui/react-types").DataAttributes & {
10
- id?: string;
11
- role?: React.AriaRole;
12
- tabIndex?: number;
13
- style?: React.CSSProperties;
14
- } & import("react").RefAttributes<any>;
15
- group: import("react").AriaAttributes & import("react").DOMAttributes<import("@chakra-ui/react-types").DOMElement> & import("@chakra-ui/react-types").DataAttributes & {
16
- id?: string;
17
- role?: React.AriaRole;
18
- tabIndex?: number;
19
- style?: React.CSSProperties;
20
- } & import("react").RefAttributes<any>;
9
+ emailRadio: import("@chakra-ui/utils").InputDOMAttributes & import("react").RefAttributes<any>;
10
+ group: import("@chakra-ui/utils").DOMAttributes<import("@chakra-ui/utils").DOMElement> & import("react").RefAttributes<any>;
21
11
  handleEmailValidation: (value?: string) => boolean;
22
12
  handlePhoneValidation: (value?: string) => boolean;
23
13
  handleSubmit: import("react-hook-form").UseFormHandleSubmit<{
@@ -28,10 +18,5 @@ export declare const useTwoFactorSetting: ({ defaultValue, email, onChange, sms,
28
18
  is2faEnabled: boolean;
29
19
  radioValue: string | number;
30
20
  showButtons: boolean;
31
- smsRadio: import("@chakra-ui/react-types").InputDOMProps & import("react").AriaAttributes & import("react").DOMAttributes<HTMLInputElement> & import("@chakra-ui/react-types").DataAttributes & {
32
- id?: string;
33
- role?: React.AriaRole;
34
- tabIndex?: number;
35
- style?: React.CSSProperties;
36
- } & import("react").RefAttributes<any>;
21
+ smsRadio: import("@chakra-ui/utils").InputDOMAttributes & import("react").RefAttributes<any>;
37
22
  };
@@ -6,9 +6,9 @@ export declare const usePartnerTilePreview: () => {
6
6
  };
7
7
  company: {
8
8
  readonly address: {
9
- readonly apartmentNumber?: string;
9
+ readonly apartmentNumber?: string | undefined;
10
10
  readonly city: string;
11
- readonly obs?: string;
11
+ readonly obs?: string | undefined;
12
12
  readonly state: string;
13
13
  readonly street: string;
14
14
  readonly number: string;
@@ -1,6 +1,8 @@
1
- import { FolderFileI } from '../..';
2
- type KindTypes = 'checkbox' | 'currency' | 'date' | 'email' | 'file' | 'grid' | 'group' | 'number' | 'radio' | 'rating' | 'select' | 'string' | 'switch' | 'telephone' | 'text' | 'textarea' | 'default';
3
- export type IconTypes = 'barcode' | 'battery' | 'billing' | 'book' | 'calc' | 'calendar' | 'check' | 'co2' | 'date' | 'default' | 'detector' | 'electricity' | 'goldbars' | 'heart' | 'image' | 'notes' | 'palette' | 'people' | 'price' | 'rating' | 'receipt' | 'registry' | 'sprinkler' | 'tools' | 'wind' | '68' | 'calendar2' | 'water' | 'calendar-drop' | 'umbrella' | 'heater' | 'roof' | 'foundation' | 'solar-panel' | 'pool' | 'drop' | 'mobile-drop' | 'light' | 'plate' | 'house' | 'target' | 'title' | 'company';
1
+ import { FolderFileI, MenuItemI, PartnerFooterI, TileCtaI } from '../..';
2
+ type KindTypes = 'checkbox' | 'currency' | 'date' | 'email' | 'file' | 'grid' | 'group' | 'number' | 'radio' | 'rating' | 'select' | 'string' | 'switch' | 'telephone' | 'text' | 'textarea' | 'default' | UIKindTypes;
3
+ type UIKindTypes = 'tile-body' | 'tile-body-logo' | 'tile-body-header' | 'tile-body-section' | 'tile-body-section-grid' | 'tile-form' | 'tile-body-action' | 'vertical-icon' | 'primary-cta' | 'secondary-cta';
4
+ export type IconTypes = 'barcode' | 'battery' | 'billing' | 'book' | 'calc' | 'calendar' | 'check' | 'co2' | 'date' | 'default' | 'detector' | 'electricity' | 'goldbars' | 'heart' | 'image' | 'notes' | 'palette' | 'people' | 'price' | 'rating' | 'receipt' | 'registry' | 'sprinkler' | 'tools' | 'wind' | '68' | 'calendar2' | 'water' | 'calendar-drop' | 'umbrella' | 'heater' | 'roof' | 'foundation' | 'solar-panel' | 'pool' | 'drop' | 'mobile-drop' | 'light' | 'plate' | 'house' | 'target' | 'title' | 'company' | UIIconTypes;
5
+ export type UIIconTypes = 'sh-pressure' | 'sh-window' | 'sh-roof' | 'sh-lights' | 'sh-gutter' | 'sh-home';
4
6
  export type ValueTypes = string | string[] | number | boolean;
5
7
  export type OptionsTypes = string[] | number[] | null;
6
8
  export interface ReportI {
@@ -10,14 +12,17 @@ export interface ReportI {
10
12
  description?: string;
11
13
  icon?: IconTypes;
12
14
  id: string;
15
+ link?: string;
13
16
  name?: string;
14
17
  options?: OptionsTypes;
15
18
  type: KindTypes;
16
19
  value: ValueTypes;
17
20
  visible?: boolean;
18
21
  }
19
- export interface DynamicFormI {
22
+ export interface DynamicFormI extends Partial<PartnerFooterI> {
23
+ callback?: TileCtaI['callback'];
20
24
  form: ReportI[];
25
+ menuItems?: MenuItemI[];
21
26
  onUpload?: (filesByFieldId: Record<string, FolderFileI[]>) => void;
22
27
  showTitle?: boolean;
23
28
  uploadingFieldId?: string;
@@ -1,7 +1,12 @@
1
- import { DynamicFormI } from '../../..';
1
+ import { DynamicFormI, MenuItemI, TileCtaI } from '../../..';
2
2
  export interface GroupFieldI {
3
3
  id: string;
4
4
  canBeHidden?: boolean;
5
5
  fields?: DynamicFormI['form'];
6
6
  onRemove: (id: string) => void;
7
7
  }
8
+ export interface FieldTypesI {
9
+ callback?: TileCtaI['callback'];
10
+ fields?: DynamicFormI['form'];
11
+ menuItems?: MenuItemI[];
12
+ }
@@ -0,0 +1,20 @@
1
+ import { DynamicFormI, MenuItemI, PartnerFooterI } from '../../..';
2
+ export interface TileBodyLogoI {
3
+ menuItems?: MenuItemI[];
4
+ name?: string;
5
+ value: string;
6
+ }
7
+ export interface TileBodyI extends Partial<PartnerFooterI> {
8
+ callback?: TileCtaI['callback'];
9
+ fields?: DynamicFormI['form'];
10
+ menuItems?: MenuItemI[];
11
+ }
12
+ export interface VerticalIconI {
13
+ icon?: string;
14
+ value: string;
15
+ }
16
+ export interface TileCtaI {
17
+ callback?: (value: string) => void;
18
+ type: 'primary-cta' | 'secondary-cta';
19
+ value: string;
20
+ }
@@ -8,3 +8,4 @@ export * from './SelectField.interface';
8
8
  export * from './SwitchField.interface';
9
9
  export * from './TextAreaField.interface';
10
10
  export * from './TextField.interface';
11
+ export * from './UIFields.interface';
@@ -8,3 +8,4 @@ export * from './SelectField.interface';
8
8
  export * from './SwitchField.interface';
9
9
  export * from './TextAreaField.interface';
10
10
  export * from './TextField.interface';
11
+ export * from './UIFields.interface';
@@ -1,8 +1,7 @@
1
- import { As } from '@chakra-ui/react';
2
- import { CSSProperties } from 'react';
1
+ import { CSSProperties, ElementType } from 'react';
3
2
  export interface IconsI {
4
3
  color?: string;
5
4
  size?: number | string;
6
5
  style?: CSSProperties;
7
- type: As | undefined;
6
+ type?: ElementType;
8
7
  }
@@ -4,7 +4,6 @@ export interface SocialLinkI {
4
4
  link: string;
5
5
  }
6
6
  export interface PartnerFooterI {
7
- iconSize?: number;
8
7
  socialLinks?: SocialLinkI[];
9
8
  websiteUrl: string;
10
9
  urlText?: string;
@@ -1,3 +1,4 @@
1
1
  import { ReportI } from '../../interfaces';
2
2
  export declare const formFieldsMock: ReportI[];
3
3
  export declare const contactFieldsMock: ReportI[];
4
+ export declare const tileUIMock: ReportI[];
@@ -1,3 +1,4 @@
1
+ import { Shine } from '../../assets/images';
1
2
  import { faker } from '@faker-js/faker';
2
3
  export const formFieldsMock = [
3
4
  {
@@ -344,3 +345,161 @@ export const contactFieldsMock = [
344
345
  icon: 'image',
345
346
  },
346
347
  ];
348
+ export const tileUIMock = [
349
+ {
350
+ id: faker.database.mongodbObjectId(),
351
+ name: faker.lorem.word(),
352
+ description: faker.lorem.sentence(),
353
+ comments: faker.lorem.sentence(),
354
+ value: '',
355
+ type: 'tile-body',
356
+ visible: true,
357
+ options: [],
358
+ children: [
359
+ {
360
+ id: faker.database.mongodbObjectId(),
361
+ name: 'Shine',
362
+ description: '',
363
+ comments: '',
364
+ value: Shine,
365
+ type: 'tile-body-logo',
366
+ },
367
+ {
368
+ id: faker.database.mongodbObjectId(),
369
+ name: '',
370
+ description: '',
371
+ comments: '',
372
+ value: 'We do windows and so much more!',
373
+ type: 'tile-body-header',
374
+ },
375
+ {
376
+ id: faker.database.mongodbObjectId(),
377
+ name: '',
378
+ description: '',
379
+ comments: '',
380
+ value: '',
381
+ type: 'tile-body-section-grid',
382
+ children: [
383
+ {
384
+ id: faker.database.mongodbObjectId(),
385
+ name: '',
386
+ description: '',
387
+ comments: '',
388
+ value: 'Pressure Washing',
389
+ type: 'vertical-icon',
390
+ icon: 'sh-pressure',
391
+ },
392
+ {
393
+ id: faker.database.mongodbObjectId(),
394
+ name: '',
395
+ description: '',
396
+ comments: '',
397
+ value: 'Widow Cleaning',
398
+ type: 'vertical-icon',
399
+ icon: 'sh-window',
400
+ },
401
+ {
402
+ id: faker.database.mongodbObjectId(),
403
+ name: '',
404
+ description: '',
405
+ comments: '',
406
+ value: 'Roof Cleaning',
407
+ type: 'vertical-icon',
408
+ icon: 'sh-roof',
409
+ },
410
+ {
411
+ id: faker.database.mongodbObjectId(),
412
+ name: '',
413
+ description: '',
414
+ comments: '',
415
+ value: 'Holiday Lights',
416
+ type: 'vertical-icon',
417
+ icon: 'sh-lights',
418
+ },
419
+ {
420
+ id: faker.database.mongodbObjectId(),
421
+ name: '',
422
+ description: '',
423
+ comments: '',
424
+ value: 'Gutter Cleaning',
425
+ type: 'vertical-icon',
426
+ icon: 'sh-gutter',
427
+ },
428
+ ],
429
+ },
430
+ {
431
+ id: faker.database.mongodbObjectId(),
432
+ name: '',
433
+ description: '',
434
+ comments: '',
435
+ value: '',
436
+ type: 'tile-body-action',
437
+ children: [
438
+ {
439
+ id: faker.database.mongodbObjectId(),
440
+ name: '',
441
+ description: '',
442
+ comments: '',
443
+ value: 'Schedule Service',
444
+ type: 'primary-cta',
445
+ link: 'www.shine.com',
446
+ },
447
+ {
448
+ id: faker.database.mongodbObjectId(),
449
+ name: '',
450
+ description: '',
451
+ comments: '',
452
+ value: 'Request Support',
453
+ type: 'secondary-cta',
454
+ link: 'open-drawer',
455
+ },
456
+ ],
457
+ },
458
+ ],
459
+ },
460
+ {
461
+ id: faker.database.mongodbObjectId(),
462
+ name: '',
463
+ description: '',
464
+ comments: '',
465
+ value: '',
466
+ type: 'tile-form',
467
+ visible: true,
468
+ children: [
469
+ {
470
+ id: faker.database.mongodbObjectId(),
471
+ name: '',
472
+ description: 'We are here to resolve any issues you may be having with our products and services. Please send us a brief description of the issue you are having and we will respond within 24 hours.',
473
+ comments: '',
474
+ value: '',
475
+ type: 'textarea',
476
+ },
477
+ {
478
+ id: faker.database.mongodbObjectId(),
479
+ name: '',
480
+ description: '',
481
+ comments: '',
482
+ value: '',
483
+ type: 'grid',
484
+ children: [
485
+ {
486
+ id: faker.database.mongodbObjectId(),
487
+ name: '',
488
+ description: 'Contact Phone',
489
+ comments: '',
490
+ value: '',
491
+ type: 'telephone',
492
+ },
493
+ {
494
+ id: faker.database.mongodbObjectId(),
495
+ name: '',
496
+ description: 'Contact Email',
497
+ comments: '',
498
+ value: '',
499
+ type: 'email',
500
+ },
501
+ ],
502
+ },
503
+ ],
504
+ },
505
+ ];
@@ -3,3 +3,4 @@ import { DynamicFormI } from '../../../interfaces';
3
3
  declare const _default: Meta;
4
4
  export default _default;
5
5
  export declare const DynamicFormComponent: (args: DynamicFormI) => import("react/jsx-runtime").JSX.Element;
6
+ export declare const DynamicUIFormComponent: (args: DynamicFormI) => import("react/jsx-runtime").JSX.Element;
@@ -2,15 +2,21 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { action } from '@storybook/addon-actions';
3
3
  import { Box } from '@chakra-ui/react';
4
4
  import { DynamicForm } from '../../../components';
5
- import { formFieldsMock } from '../../../mocks';
5
+ import { formFieldsMock, menuMock, socialLinksMock, tileUIMock } from '../../../mocks';
6
6
  export default {
7
7
  title: 'Components/Forms/DynamicForm',
8
8
  component: DynamicForm,
9
9
  args: {
10
- form: formFieldsMock,
10
+ callback: action('callback'),
11
11
  onUpload: action('onUpload'),
12
+ menuItems: menuMock,
13
+ socialLinks: socialLinksMock,
14
+ websiteUrl: 'http://www.audreyscheckdesign.com',
12
15
  },
13
16
  };
14
17
  export const DynamicFormComponent = (args) => {
15
- return (_jsx(Box, { p: "base", bg: "neutral.white", w: ['full', '500px'], children: _jsx(DynamicForm, Object.assign({}, args)) }));
18
+ return (_jsx(Box, { p: "base", bg: "neutral.white", w: ['full', '500px'], children: _jsx(DynamicForm, Object.assign({}, args, { form: formFieldsMock })) }));
19
+ };
20
+ export const DynamicUIFormComponent = (args) => {
21
+ return (_jsx(Box, { m: "base", w: ['full', '320px'], children: _jsx(DynamicForm, Object.assign({}, args, { form: tileUIMock, showTitle: false })) }));
16
22
  };
@@ -5,7 +5,7 @@ export default _default;
5
5
  export declare const BubbleComponent: {
6
6
  (args: BubbleI): import("react/jsx-runtime").JSX.Element;
7
7
  args: {
8
- handleStep: import("@vitest/spy").Mock<any, any>;
8
+ handleStep: import("@vitest/spy").Mock<(...args: any[]) => any>;
9
9
  steps: {
10
10
  homeboard: {
11
11
  topRef: number;
@@ -6,6 +6,6 @@ export declare const HomeBoardTourComponent: {
6
6
  (args: TourI): import("react/jsx-runtime").JSX.Element;
7
7
  args: {
8
8
  isActive: boolean;
9
- handleStep: import("@vitest/spy").Mock<any, any>;
9
+ handleStep: import("@vitest/spy").Mock<(...args: any[]) => any>;
10
10
  };
11
11
  };
@@ -6,6 +6,6 @@ export declare const LaunchpadTourComponent: {
6
6
  (args: TourI): import("react/jsx-runtime").JSX.Element;
7
7
  args: {
8
8
  isActive: boolean;
9
- handleStep: import("@vitest/spy").Mock<any, any>;
9
+ handleStep: import("@vitest/spy").Mock<(...args: any[]) => any>;
10
10
  };
11
11
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homefile/components-v2",
3
- "version": "1.6.1",
3
+ "version": "2.1.0",
4
4
  "author": "Homefile",
5
5
  "license": "UNLICENSED",
6
6
  "typings": "dist/index.d.ts",
@@ -22,66 +22,67 @@
22
22
  "src"
23
23
  ],
24
24
  "devDependencies": {
25
- "@chakra-ui/storybook-addon": "^5.1.0",
26
- "@chromatic-com/storybook": "^1.6.1",
27
- "@faker-js/faker": "^8.1.0",
28
- "@storybook/addon-a11y": "^8.2.4",
29
- "@storybook/addon-essentials": "^8.2.4",
30
- "@storybook/addon-interactions": "^8.2.4",
31
- "@storybook/addon-links": "^8.2.4",
32
- "@storybook/addon-onboarding": "^8.2.4",
33
- "@storybook/addon-viewport": "^8.2.4",
34
- "@storybook/blocks": "^8.2.4",
35
- "@storybook/builder-vite": "^8.2.4",
25
+ "@chakra-ui/storybook-addon": "^5.2.5",
26
+ "@chromatic-com/storybook": "^2.0.2",
27
+ "@faker-js/faker": "^9.0.3",
28
+ "@storybook/addon-a11y": "^8.3.5",
29
+ "@storybook/addon-essentials": "^8.3.5",
30
+ "@storybook/addon-interactions": "^8.3.5",
31
+ "@storybook/addon-links": "^8.3.5",
32
+ "@storybook/addon-onboarding": "^8.3.5",
33
+ "@storybook/addon-viewport": "^8.3.5",
34
+ "@storybook/blocks": "^8.3.5",
35
+ "@storybook/builder-vite": "^8.3.5",
36
36
  "@storybook/jest": "^0.2.3",
37
- "@storybook/react": "^8.2.4",
38
- "@storybook/react-vite": "^8.2.4",
39
- "@storybook/test": "^8.2.4",
40
- "@types/node": "^20.14.11",
41
- "@types/react": "^18.3.3",
42
- "@types/react-dom": "^18.3.0",
43
- "@vitejs/plugin-react": "^4.0.4",
44
- "axe-playwright": "^2.0.1",
37
+ "@storybook/react": "^8.3.5",
38
+ "@storybook/react-vite": "^8.3.5",
39
+ "@storybook/test": "^8.3.5",
40
+ "@types/node": "^22.7.6",
41
+ "@types/react": "^18.3.11",
42
+ "@types/react-dom": "^18.3.1",
43
+ "@vitejs/plugin-react": "^4.3.2",
44
+ "axe-playwright": "^2.0.3",
45
45
  "copyfiles": "^2.4.1",
46
46
  "git-commit-msg-linter": "^5.0.4",
47
- "husky": "^9.1.0",
47
+ "husky": "^9.1.6",
48
48
  "jest": "^29.7.0",
49
49
  "json-loader": "^0.5.7",
50
- "rimraf": "^5.0.1",
51
- "semantic-release": "^24.0.0",
52
- "storybook": "^8.2.4",
53
- "storybook-react-i18next": "^3.1.1",
50
+ "rimraf": "^6.0.1",
51
+ "semantic-release": "^24.1.2",
52
+ "storybook": "^8.3.5",
53
+ "storybook-react-i18next": "^3.1.7",
54
54
  "tsconfig-replace-paths": "^0.0.14",
55
55
  "tscpaths": "^0.0.9",
56
- "typescript": "^5.5.3",
57
- "vite": "^5.3.4"
56
+ "typescript": "^5.6.3",
57
+ "vite": "^5.4.9"
58
58
  },
59
59
  "dependencies": {
60
- "@chakra-ui/react": "^2.8.1",
61
- "@emotion/react": "^11.11.1",
62
- "@emotion/styled": "^11.11.0",
63
- "@fontsource/assistant": "^5.0.18",
64
- "@fontsource/poppins": "^5.0.14",
60
+ "@chakra-ui/icons": "^2.2.4",
61
+ "@chakra-ui/react": "^2.10.3",
62
+ "@emotion/react": "^11.13.3",
63
+ "@emotion/styled": "^11.13.0",
64
+ "@fontsource/assistant": "^5.1.0",
65
+ "@fontsource/poppins": "^5.1.0",
65
66
  "@hassanmojab/react-modern-calendar-datepicker": "^3.1.7",
66
67
  "@hookform/resolvers": "^3.3.1",
67
68
  "@rive-app/react-canvas": "^4.14.5",
68
- "axios": "^1.7.2",
69
- "date-fns": "^3.6.0",
70
- "framer-motion": "^11.3.6",
71
- "i18next": "^23.12.1",
69
+ "axios": "^1.7.7",
70
+ "date-fns": "^4.1.0",
71
+ "framer-motion": "^11.11.9",
72
+ "i18next": "^23.16.0",
72
73
  "i18next-browser-languagedetector": "^8.0.0",
73
- "i18next-http-backend": "^2.2.2",
74
+ "i18next-http-backend": "^2.6.2",
74
75
  "react": "^18.2.0",
75
76
  "react-dom": "^18.2.0",
76
- "react-dropzone": "^14.2.3",
77
- "react-hook-form": "^7.46.2",
78
- "react-i18next": "^15.0.0",
79
- "react-icons": "^5.2.1",
77
+ "react-dropzone": "^14.2.9",
78
+ "react-hook-form": "^7.53.0",
79
+ "react-i18next": "^15.0.3",
80
+ "react-icons": "^5.3.0",
80
81
  "react-modern-calendar-datepicker": "^3.1.6",
81
82
  "react-quill": "^2.0.0",
82
83
  "react-spinners": "^0.14.1",
83
- "recharts": "^2.10.1",
84
- "valtio": "^1.11.2",
84
+ "recharts": "^2.13.0",
85
+ "valtio": "^2.1.0",
85
86
  "yup": "^1.2.0"
86
87
  },
87
88
  "scripts": {
@@ -8,7 +8,8 @@ import {
8
8
  } from '@/assets/images'
9
9
  import { useWindowDimensions } from '@/hooks'
10
10
  import { colors } from '@/theme/colors'
11
- import { Box, keyframes, Image } from '@chakra-ui/react'
11
+ import { Box, Image } from '@chakra-ui/react'
12
+ import { keyframes } from '@emotion/react'
12
13
  import { Fragment, PropsWithChildren } from 'react'
13
14
 
14
15
  export const moveLeftToRightAirplane = keyframes`
@@ -1,5 +1,5 @@
1
1
  import { useRive } from '@rive-app/react-canvas'
2
- const url = process.env.REACT_APP_RIVE_ASSETS
2
+ const url = import.meta.env.VITE_RIVE_ASSETS
3
3
 
4
4
  export const HomieAnimation = () => {
5
5
  const { RiveComponent } = useRive({
@@ -16,17 +16,18 @@ export const CustomToast = ({
16
16
  }
17
17
  return (
18
18
  <Box
19
+ paddingTop={0}
20
+ paddingBottom={0}
19
21
  bg={bgColors[status]}
20
22
  borderRadius="lg"
21
23
  boxShadow="lg"
22
24
  position="relative"
23
- py="base"
24
25
  >
25
- <Flex gap="base" p="base" align="center">
26
+ <Flex gap="base" p="base" align="center" position="relative" left="-26px">
26
27
  <StatusIllustration status={status} />
27
28
  <Box>
28
29
  <Text
29
- fontSize="25px"
30
+ fontSize="22px"
30
31
  fontWeight="medium"
31
32
  color="neutral.white"
32
33
  lineHeight="1.1"
@@ -14,18 +14,18 @@ export const StatusIllustration = ({
14
14
  src: Check,
15
15
  alt: t('ariaLabels.success'),
16
16
  bg: '#28B5A8',
17
- height: '26px',
17
+ height: '21px',
18
18
  },
19
19
  error: {
20
20
  src: Exclamation,
21
21
  alt: t('ariaLabels.error'),
22
22
  bg: '#991365',
23
- height: '33px',
23
+ height: '28px',
24
24
  },
25
25
  }
26
26
  const { alt, bg, height, src } = props[status]
27
27
  return (
28
- <Center borderRadius="full" bg={bg} boxShadow="xl" w="60px" h="60px">
28
+ <Center borderRadius="full" bg={bg} boxShadow="xl" w="43px" h="43px">
29
29
  <Image src={src} alt={alt} h={height} w="auto" />
30
30
  </Center>
31
31
  )
@@ -16,15 +16,19 @@ import {
16
16
  DateField,
17
17
  NumberField,
18
18
  CurrencyField,
19
+ TileBody,
19
20
  } from '@/components'
20
21
  import { useDynamicForm } from '@/hooks'
21
22
  import { fieldIcons } from '@/helpers'
22
23
 
23
24
  export const DynamicForm = ({
25
+ callback,
24
26
  form: fields,
27
+ menuItems,
25
28
  onUpload,
26
29
  showTitle = true,
27
30
  uploadingFieldId,
31
+ ...props
28
32
  }: DynamicFormI) => {
29
33
  const {
30
34
  form,
@@ -159,6 +163,16 @@ export const DynamicForm = ({
159
163
  canBeHidden={canBeHidden}
160
164
  />
161
165
  )
166
+ case 'tile-body':
167
+ return (
168
+ <TileBody
169
+ key={id}
170
+ callback={callback}
171
+ fields={children}
172
+ menuItems={menuItems}
173
+ {...props}
174
+ />
175
+ )
162
176
  default:
163
177
  return null
164
178
  }