@homefile/components-v2 1.2.2 → 1.4.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 (234) hide show
  1. package/dist/assets/images/circle-face.svg +21 -0
  2. package/dist/assets/images/company.svg +34 -0
  3. package/dist/assets/images/index.d.ts +5 -1
  4. package/dist/assets/images/index.js +5 -1
  5. package/dist/assets/images/index.ts +7 -0
  6. package/dist/assets/images/location.jpg +0 -0
  7. package/dist/assets/images/logos/index.d.ts +2 -1
  8. package/dist/assets/images/logos/index.js +2 -1
  9. package/dist/assets/images/logos/index.ts +12 -1
  10. package/dist/assets/images/logos/shine.png +0 -0
  11. package/dist/assets/images/shine/gutter-cleaning.png +0 -0
  12. package/dist/assets/images/shine/holiday-lights.png +0 -0
  13. package/dist/assets/images/shine/home-cleaning.png +0 -0
  14. package/dist/assets/images/shine/index.d.ts +7 -0
  15. package/dist/assets/images/shine/index.js +7 -0
  16. package/dist/assets/images/shine/index.ts +15 -0
  17. package/dist/assets/images/shine/pressure.png +0 -0
  18. package/dist/assets/images/shine/roof-cleaning.png +0 -0
  19. package/dist/assets/images/shine/window.png +0 -0
  20. package/dist/assets/locales/en/index.json +23 -1
  21. package/dist/components/animations/CloudsAnimation.js +1 -1
  22. package/dist/components/contacts/ContactCard.d.ts +1 -1
  23. package/dist/components/contacts/ContactCard.js +8 -3
  24. package/dist/components/contacts/ContactCardHeader.d.ts +1 -1
  25. package/dist/components/contacts/ContactCardHeader.js +5 -6
  26. package/dist/components/contacts/ContactHeaderMenu.d.ts +2 -0
  27. package/dist/components/contacts/ContactHeaderMenu.js +7 -0
  28. package/dist/components/contacts/ContactsContent.d.ts +1 -1
  29. package/dist/components/contacts/ContactsContent.js +2 -2
  30. package/dist/components/contacts/addEditPanel/AddEditContactPanel.d.ts +2 -0
  31. package/dist/components/contacts/addEditPanel/AddEditContactPanel.js +24 -0
  32. package/dist/components/contacts/addEditPanel/index.d.ts +1 -0
  33. package/dist/components/contacts/addEditPanel/index.js +1 -0
  34. package/dist/components/contacts/index.d.ts +3 -0
  35. package/dist/components/contacts/index.js +3 -0
  36. package/dist/components/contacts/viewPanel/CompanyInfoCard.d.ts +2 -0
  37. package/dist/components/contacts/viewPanel/CompanyInfoCard.js +13 -0
  38. package/dist/components/contacts/viewPanel/CompanyRating.d.ts +3 -0
  39. package/dist/components/contacts/viewPanel/CompanyRating.js +27 -0
  40. package/dist/components/contacts/viewPanel/ContactAddressCard.d.ts +2 -0
  41. package/dist/components/contacts/viewPanel/ContactAddressCard.js +12 -0
  42. package/dist/components/contacts/viewPanel/ContactNotes.d.ts +3 -0
  43. package/dist/components/contacts/viewPanel/ContactNotes.js +8 -0
  44. package/dist/components/contacts/viewPanel/PersonalInfoCard.d.ts +2 -0
  45. package/dist/components/contacts/viewPanel/PersonalInfoCard.js +8 -0
  46. package/dist/components/contacts/viewPanel/RoleTag.d.ts +2 -0
  47. package/dist/components/contacts/viewPanel/RoleTag.js +9 -0
  48. package/dist/components/contacts/viewPanel/ViewContactHeader.d.ts +2 -0
  49. package/dist/components/contacts/viewPanel/ViewContactHeader.js +11 -0
  50. package/dist/components/contacts/viewPanel/ViewContactPanel.d.ts +2 -0
  51. package/dist/components/contacts/viewPanel/ViewContactPanel.js +9 -0
  52. package/dist/components/contacts/viewPanel/index.d.ts +8 -0
  53. package/dist/components/contacts/viewPanel/index.js +8 -0
  54. package/dist/components/forms/dynamicForm/DynamicForm.d.ts +1 -1
  55. package/dist/components/forms/dynamicForm/DynamicForm.js +5 -5
  56. package/dist/components/forms/dynamicForm/SimpleDynamicForm.d.ts +2 -0
  57. package/dist/components/forms/dynamicForm/SimpleDynamicForm.js +29 -0
  58. package/dist/components/forms/dynamicForm/fields/FieldWithDelete.d.ts +1 -1
  59. package/dist/components/forms/dynamicForm/fields/FieldWithDelete.js +2 -3
  60. package/dist/components/forms/dynamicForm/fields/GroupField.d.ts +1 -1
  61. package/dist/components/forms/dynamicForm/fields/GroupField.js +2 -2
  62. package/dist/components/forms/dynamicForm/index.d.ts +1 -1
  63. package/dist/components/forms/dynamicForm/index.js +1 -1
  64. package/dist/components/homeAssistant/panel/ApplianceSteps.d.ts +1 -1
  65. package/dist/components/homeAssistant/panel/ApplianceSteps.js +2 -2
  66. package/dist/components/homeAssistant/panel/HomeAssistantPanel.d.ts +1 -1
  67. package/dist/components/homeAssistant/panel/HomeAssistantPanel.js +14 -7
  68. package/dist/components/homeBoard/HomeBoard.js +1 -1
  69. package/dist/components/homeBoard/HomeCardWithRecipent.d.ts +1 -1
  70. package/dist/components/homeBoard/HomeCardWithRecipent.js +8 -2
  71. package/dist/components/onboarding/pages/ActivateAccount.js +2 -2
  72. package/dist/components/onboarding/pages/BasePageWrapper.d.ts +2 -0
  73. package/dist/components/onboarding/pages/BasePageWrapper.js +5 -0
  74. package/dist/components/onboarding/pages/EmailValidation.js +3 -3
  75. package/dist/components/onboarding/pages/NewPassword.js +2 -2
  76. package/dist/components/onboarding/pages/ResendResetPassword.js +3 -3
  77. package/dist/components/onboarding/pages/ResetPassword.js +2 -2
  78. package/dist/components/onboarding/pages/SignIn.js +2 -2
  79. package/dist/components/onboarding/pages/SignUp.js +5 -5
  80. package/dist/components/onboarding/pages/TwoFactor.js +2 -2
  81. package/dist/components/onboarding/pages/index.d.ts +10 -9
  82. package/dist/components/onboarding/pages/index.js +10 -9
  83. package/dist/components/partner/customPartnerTiles/ShineTile.d.ts +2 -0
  84. package/dist/components/partner/customPartnerTiles/ShineTile.js +56 -0
  85. package/dist/components/partner/customPartnerTiles/index.d.ts +1 -0
  86. package/dist/components/partner/customPartnerTiles/index.js +1 -0
  87. package/dist/helpers/HomeRoles.helper.d.ts +1 -5
  88. package/dist/helpers/HomeRoles.helper.js +6 -0
  89. package/dist/helpers/forms/dynamicForm.helper.js +3 -1
  90. package/dist/hooks/forms/index.d.ts +1 -0
  91. package/dist/hooks/forms/index.js +1 -0
  92. package/dist/hooks/forms/useSimpleDynamicForm.d.ts +11 -0
  93. package/dist/hooks/forms/useSimpleDynamicForm.js +36 -0
  94. package/dist/hooks/myHomes/useMyHomeCard.d.ts +1 -3
  95. package/dist/index.d.ts +1 -1
  96. package/dist/index.js +1 -1
  97. package/dist/interfaces/contacts/AddEditContactPanel.interface.d.ts +12 -0
  98. package/dist/interfaces/contacts/ContactCard.interface.d.ts +15 -1
  99. package/dist/interfaces/contacts/ContactCardInfo.interface.d.ts +2 -1
  100. package/dist/interfaces/contacts/ContactsContent.interface.d.ts +4 -0
  101. package/dist/interfaces/contacts/ViewContactPanel.interface.d.ts +9 -0
  102. package/dist/interfaces/contacts/ViewContactPanel.interface.js +1 -0
  103. package/dist/interfaces/contacts/index.d.ts +2 -0
  104. package/dist/interfaces/contacts/index.js +2 -0
  105. package/dist/interfaces/forms/dynamicForm/DynamicForm.interface.d.ts +9 -7
  106. package/dist/interfaces/forms/dynamicForm/SimpleDynamicForm.interface.d.ts +4 -0
  107. package/dist/interfaces/forms/dynamicForm/SimpleDynamicForm.interface.js +1 -0
  108. package/dist/interfaces/forms/dynamicForm/fields/FieldWithDelete.interface.d.ts +1 -1
  109. package/dist/interfaces/forms/dynamicForm/fields/GroupField.interface.d.ts +1 -1
  110. package/dist/interfaces/forms/dynamicForm/index.d.ts +1 -1
  111. package/dist/interfaces/forms/dynamicForm/index.js +1 -1
  112. package/dist/interfaces/homeAssistant/ApplianceSteps.interface.d.ts +3 -0
  113. package/dist/interfaces/homeAssistant/HomeAssistantPanel.interface.d.ts +4 -1
  114. package/dist/interfaces/homeBoard/HomeCardWithRecipent.interface.d.ts +1 -0
  115. package/dist/mocks/contacts/contacts.mock.js +17 -5
  116. package/dist/mocks/forms/dynamicForm.mock.d.ts +1 -0
  117. package/dist/mocks/forms/dynamicForm.mock.js +155 -0
  118. package/dist/proxies/contacts/contactForm.proxy.d.ts +2 -0
  119. package/dist/proxies/contacts/contactForm.proxy.js +7 -0
  120. package/dist/proxies/contacts/index.d.ts +1 -0
  121. package/dist/proxies/contacts/index.js +1 -0
  122. package/dist/proxies/index.d.ts +1 -0
  123. package/dist/proxies/index.js +1 -0
  124. package/dist/stories/assets/Illustrations.stories.js +2 -2
  125. package/dist/stories/contacts/AddEditContactPanel.stories.d.ts +5 -0
  126. package/dist/stories/contacts/AddEditContactPanel.stories.js +22 -0
  127. package/dist/stories/contacts/ContactCardAddress.stories.d.ts +2 -0
  128. package/dist/stories/contacts/ContactCardInfo.stories.d.ts +2 -0
  129. package/dist/stories/contacts/ViewContactPanel.stories.d.ts +5 -0
  130. package/dist/stories/contacts/ViewContactPanel.stories.js +28 -0
  131. package/dist/stories/homeAssistant/panel/ApplianceSteps.stories.d.ts +1 -1
  132. package/dist/stories/homeAssistant/panel/ApplianceSteps.stories.js +1 -0
  133. package/dist/stories/homeAssistant/panel/HomeAssistantPanel.stories.js +1 -1
  134. package/dist/stories/onboarding/pages/NewPassword.stories.js +2 -3
  135. package/dist/stories/onboarding/pages/ResendResetPassword.stories.js +2 -3
  136. package/dist/stories/onboarding/pages/ResetPassword.stories.js +2 -3
  137. package/dist/stories/onboarding/pages/SignIn.stories.js +2 -3
  138. package/dist/stories/onboarding/pages/SignUp.stories.js +2 -3
  139. package/dist/stories/partner/customPartnerTiles/ShineTile.stories.d.ts +5 -0
  140. package/dist/stories/partner/customPartnerTiles/ShineTile.stories.js +19 -0
  141. package/package.json +1 -1
  142. package/src/assets/images/circle-face.svg +21 -0
  143. package/src/assets/images/company.svg +34 -0
  144. package/src/assets/images/index.ts +7 -0
  145. package/src/assets/images/location.jpg +0 -0
  146. package/src/assets/images/logos/index.ts +12 -1
  147. package/src/assets/images/logos/shine.png +0 -0
  148. package/src/assets/images/shine/gutter-cleaning.png +0 -0
  149. package/src/assets/images/shine/holiday-lights.png +0 -0
  150. package/src/assets/images/shine/home-cleaning.png +0 -0
  151. package/src/assets/images/shine/index.ts +15 -0
  152. package/src/assets/images/shine/pressure.png +0 -0
  153. package/src/assets/images/shine/roof-cleaning.png +0 -0
  154. package/src/assets/images/shine/window.png +0 -0
  155. package/src/assets/locales/en/index.json +23 -1
  156. package/src/components/animations/CloudsAnimation.tsx +8 -7
  157. package/src/components/contacts/ContactCard.tsx +28 -25
  158. package/src/components/contacts/ContactCardHeader.tsx +5 -38
  159. package/src/components/contacts/ContactHeaderMenu.tsx +42 -0
  160. package/src/components/contacts/ContactsContent.tsx +3 -1
  161. package/src/components/contacts/addEditPanel/AddEditContactPanel.tsx +63 -0
  162. package/src/components/contacts/addEditPanel/index.ts +1 -0
  163. package/src/components/contacts/index.ts +3 -0
  164. package/src/components/contacts/viewPanel/CompanyInfoCard.tsx +58 -0
  165. package/src/components/contacts/viewPanel/CompanyRating.tsx +27 -0
  166. package/src/components/contacts/viewPanel/ContactAddressCard.tsx +39 -0
  167. package/src/components/contacts/viewPanel/ContactNotes.tsx +16 -0
  168. package/src/components/contacts/viewPanel/PersonalInfoCard.tsx +41 -0
  169. package/src/components/contacts/viewPanel/RoleTag.tsx +30 -0
  170. package/src/components/contacts/viewPanel/ViewContactHeader.tsx +26 -0
  171. package/src/components/contacts/viewPanel/ViewContactPanel.tsx +70 -0
  172. package/src/components/contacts/viewPanel/index.ts +8 -0
  173. package/src/components/forms/dynamicForm/DynamicForm.tsx +9 -6
  174. package/src/components/forms/dynamicForm/SimpleDynamicForm.tsx +57 -0
  175. package/src/components/forms/dynamicForm/fields/FieldWithDelete.tsx +2 -3
  176. package/src/components/forms/dynamicForm/fields/GroupField.tsx +7 -2
  177. package/src/components/forms/dynamicForm/index.ts +1 -1
  178. package/src/components/homeAssistant/panel/ApplianceSteps.tsx +5 -2
  179. package/src/components/homeAssistant/panel/HomeAssistantPanel.tsx +20 -7
  180. package/src/components/homeBoard/HomeBoard.tsx +3 -0
  181. package/src/components/homeBoard/HomeCardWithRecipent.tsx +15 -1
  182. package/src/components/onboarding/pages/ActivateAccount.tsx +8 -3
  183. package/src/components/onboarding/pages/BasePageWrapper.tsx +10 -0
  184. package/src/components/onboarding/pages/EmailValidation.tsx +3 -3
  185. package/src/components/onboarding/pages/NewPassword.tsx +9 -3
  186. package/src/components/onboarding/pages/ResendResetPassword.tsx +3 -3
  187. package/src/components/onboarding/pages/ResetPassword.tsx +3 -2
  188. package/src/components/onboarding/pages/SignIn.tsx +3 -4
  189. package/src/components/onboarding/pages/SignUp.tsx +9 -8
  190. package/src/components/onboarding/pages/TwoFactor.tsx +9 -3
  191. package/src/components/onboarding/pages/index.ts +10 -9
  192. package/src/components/partner/customPartnerTiles/ShineTile.tsx +148 -0
  193. package/src/components/partner/customPartnerTiles/index.ts +1 -0
  194. package/src/helpers/HomeRoles.helper.ts +7 -1
  195. package/src/helpers/forms/dynamicForm.helper.ts +4 -0
  196. package/src/hooks/forms/index.ts +1 -0
  197. package/src/hooks/forms/useSimpleDynamicForm.ts +58 -0
  198. package/src/index.ts +3 -0
  199. package/src/interfaces/contacts/AddEditContactPanel.interface.ts +14 -0
  200. package/src/interfaces/contacts/ContactCard.interface.ts +20 -1
  201. package/src/interfaces/contacts/ContactCardInfo.interface.ts +3 -2
  202. package/src/interfaces/contacts/ContactsContent.interface.ts +3 -0
  203. package/src/interfaces/contacts/ViewContactPanel.interface.ts +10 -0
  204. package/src/interfaces/contacts/index.ts +2 -0
  205. package/src/interfaces/forms/dynamicForm/DynamicForm.interface.ts +10 -6
  206. package/src/interfaces/forms/dynamicForm/SimpleDynamicForm.interface.ts +5 -0
  207. package/src/interfaces/forms/dynamicForm/fields/FieldWithDelete.interface.ts +1 -1
  208. package/src/interfaces/forms/dynamicForm/fields/GroupField.interface.ts +1 -1
  209. package/src/interfaces/forms/dynamicForm/index.ts +1 -1
  210. package/src/interfaces/homeAssistant/ApplianceSteps.interface.ts +13 -2
  211. package/src/interfaces/homeAssistant/HomeAssistantPanel.interface.ts +4 -1
  212. package/src/interfaces/homeBoard/HomeCardWithRecipent.interface.ts +1 -0
  213. package/src/mocks/contacts/contacts.mock.ts +17 -5
  214. package/src/mocks/forms/dynamicForm.mock.ts +156 -0
  215. package/src/proxies/contacts/contactForm.proxy.ts +9 -0
  216. package/src/proxies/contacts/index.ts +1 -0
  217. package/src/proxies/index.ts +1 -0
  218. package/src/stories/assets/Illustrations.stories.tsx +4 -0
  219. package/src/stories/contacts/AddEditContactPanel.stories.tsx +45 -0
  220. package/src/stories/contacts/ViewContactPanel.stories.tsx +35 -0
  221. package/src/stories/homeAssistant/panel/ApplianceSteps.stories.tsx +2 -1
  222. package/src/stories/homeAssistant/panel/HomeAssistantPanel.stories.tsx +2 -0
  223. package/src/stories/onboarding/pages/NewPassword.stories.tsx +3 -4
  224. package/src/stories/onboarding/pages/ResendResetPassword.stories.tsx +3 -4
  225. package/src/stories/onboarding/pages/ResetPassword.stories.tsx +3 -4
  226. package/src/stories/onboarding/pages/SignIn.stories.tsx +3 -4
  227. package/src/stories/onboarding/pages/SignUp.stories.tsx +3 -4
  228. package/src/stories/partner/customPartnerTiles/ShineTile.stories.tsx +26 -0
  229. package/dist/components/forms/dynamicForm/DynamicFormSimple.d.ts +0 -2
  230. package/dist/components/forms/dynamicForm/DynamicFormSimple.js +0 -32
  231. package/dist/interfaces/forms/dynamicForm/DynamicFormSimple.interface.d.ts +0 -4
  232. package/src/components/forms/dynamicForm/DynamicFormSimple.tsx +0 -66
  233. package/src/interfaces/forms/dynamicForm/DynamicFormSimple.interface.ts +0 -5
  234. /package/dist/interfaces/{forms/dynamicForm/DynamicFormSimple.interface.js → contacts/AddEditContactPanel.interface.js} +0 -0
@@ -191,3 +191,159 @@ export const formFieldsMock: ReportI[] = [
191
191
  icon: 'book',
192
192
  },
193
193
  ]
194
+
195
+ export const contactFieldsMock: ReportI[] = [
196
+ {
197
+ id: faker.database.mongodbObjectId(),
198
+ name: 'basic-info',
199
+ value: '',
200
+ type: 'group',
201
+ canBeHidden: false,
202
+ children: [
203
+ {
204
+ id: faker.database.mongodbObjectId(),
205
+ name: 'name',
206
+ value: '',
207
+ type: 'grid',
208
+ children: [
209
+ {
210
+ id: faker.database.mongodbObjectId(),
211
+ name: 'First Name',
212
+ value: faker.person.firstName(),
213
+ type: 'text',
214
+ },
215
+ {
216
+ id: faker.database.mongodbObjectId(),
217
+ name: 'Last Name',
218
+ value: faker.person.lastName(),
219
+ type: 'text',
220
+ },
221
+ ],
222
+ },
223
+ {
224
+ id: faker.database.mongodbObjectId(),
225
+ name: 'Email',
226
+ value: faker.internet.email(),
227
+ type: 'text',
228
+ },
229
+ {
230
+ id: faker.database.mongodbObjectId(),
231
+ name: 'Phone',
232
+ value: faker.phone.number(),
233
+ type: 'text',
234
+ },
235
+ ],
236
+ },
237
+ {
238
+ id: faker.database.mongodbObjectId(),
239
+ name: 'Title',
240
+ value: faker.person.jobTitle(),
241
+ type: 'text',
242
+ icon: 'title',
243
+ },
244
+ {
245
+ id: faker.database.mongodbObjectId(),
246
+ name: 'Category',
247
+ value: 'Pest Control',
248
+ type: 'select',
249
+ options: [
250
+ 'Pest Control',
251
+ 'Maintenance',
252
+ 'Construction',
253
+ 'Misc',
254
+ 'Electrical',
255
+ 'Design',
256
+ 'Finance',
257
+ 'Plumbing',
258
+ ],
259
+ icon: 'book',
260
+ },
261
+ {
262
+ id: faker.database.mongodbObjectId(),
263
+ name: 'company-info',
264
+ value: '',
265
+ type: 'group',
266
+ children: [
267
+ {
268
+ id: faker.database.mongodbObjectId(),
269
+ name: 'Company Name',
270
+ value: faker.company.name(),
271
+ type: 'text',
272
+ icon: 'company',
273
+ },
274
+ {
275
+ id: faker.database.mongodbObjectId(),
276
+ name: 'Company Address',
277
+ value: faker.location.streetAddress(),
278
+ type: 'text',
279
+ },
280
+ {
281
+ id: faker.database.mongodbObjectId(),
282
+ name: 'company-location',
283
+ value: '',
284
+ type: 'grid',
285
+ children: [
286
+ {
287
+ id: faker.database.mongodbObjectId(),
288
+ name: 'Zip/Country',
289
+ value: faker.location.zipCode(),
290
+ type: 'text',
291
+ },
292
+ {
293
+ id: faker.database.mongodbObjectId(),
294
+ name: 'City',
295
+ value: faker.location.city(),
296
+ type: 'text',
297
+ },
298
+ {
299
+ id: faker.database.mongodbObjectId(),
300
+ name: 'State',
301
+ value: faker.location.state(),
302
+ type: 'text',
303
+ },
304
+ ],
305
+ },
306
+ {
307
+ id: faker.database.mongodbObjectId(),
308
+ name: 'company-contact',
309
+ value: '',
310
+ type: 'grid',
311
+ children: [
312
+ {
313
+ id: faker.database.mongodbObjectId(),
314
+ name: 'Phone',
315
+ value: faker.phone.number(),
316
+ type: 'text',
317
+ },
318
+ {
319
+ id: faker.database.mongodbObjectId(),
320
+ name: 'Website URL',
321
+ value: faker.internet.url(),
322
+ type: 'text',
323
+ },
324
+ ],
325
+ },
326
+ ],
327
+ },
328
+ {
329
+ id: faker.database.mongodbObjectId(),
330
+ name: 'Notes',
331
+ value: faker.lorem.text(),
332
+ type: 'textarea',
333
+ icon: 'notes',
334
+ },
335
+ {
336
+ id: faker.database.mongodbObjectId(),
337
+ name: 'Rating',
338
+ value: faker.number.int({ min: 1, max: 4 }),
339
+ type: 'rating',
340
+ icon: 'rating',
341
+ },
342
+ {
343
+ id: faker.database.mongodbObjectId(),
344
+ name: 'Images',
345
+ value: [],
346
+ type: 'file',
347
+ icon: 'image',
348
+ },
349
+ ]
@@ -0,0 +1,9 @@
1
+ import { proxy } from 'valtio'
2
+ import { ContactFormProxyI } from '@/interfaces'
3
+
4
+ export const contactFormProxy = proxy<ContactFormProxyI>({
5
+ fields: [],
6
+ setFields(fields = []) {
7
+ this.fields = fields
8
+ },
9
+ })
@@ -0,0 +1 @@
1
+ export * from './contactForm.proxy'
@@ -1,3 +1,4 @@
1
+ export * from './contacts'
1
2
  export * from './forms'
2
3
  export * from './homes'
3
4
  export * from './partner'
@@ -26,9 +26,11 @@ import {
26
26
  CheckInCircle,
27
27
  CheckPen,
28
28
  Chemistry,
29
+ CircleFace,
29
30
  Cleaning,
30
31
  Closet,
31
32
  Co2,
33
+ Company,
32
34
  ComputerReport,
33
35
  Confirmation,
34
36
  Construction,
@@ -281,9 +283,11 @@ export const Illustrations = () => {
281
283
  <IconWrapper icon={CheckInCircle} name="CheckInCircle" />
282
284
  <IconWrapper icon={CheckPen} name="CheckPen" />
283
285
  <IconWrapper icon={Chemistry} name="Chemistry" />
286
+ <IconWrapper icon={CircleFace} name="CircleFace" />
284
287
  <IconWrapper icon={Cleaning} name="Cleaning" />
285
288
  <IconWrapper icon={Closet} name="Closet" />
286
289
  <IconWrapper icon={Co2} name="Co2" />
290
+ <IconWrapper icon={Company} name="Company" />
287
291
  <IconWrapper icon={ComputerReport} name="ComputerReport" />
288
292
  <IconWrapper icon={Confirmation} name="Confirmation" />
289
293
  <IconWrapper icon={Construction} name="Construction" />
@@ -0,0 +1,45 @@
1
+ import { Meta } from '@storybook/react'
2
+ import {
3
+ AddEditContactPanel,
4
+ DynamicForm,
5
+ RightPanel,
6
+ RolePermissionsTab,
7
+ } from '@/components'
8
+ import { ContactsMock, contactFieldsMock, featuresSelectedMock } from '@/mocks'
9
+ import { AddEditContactPanelI } from '@/interfaces'
10
+ import { action } from '@storybook/addon-actions'
11
+
12
+ export default {
13
+ title: 'Components/Contacts',
14
+ component: AddEditContactPanel,
15
+ args: {
16
+ detailsComponent: (
17
+ <DynamicForm
18
+ form={contactFieldsMock}
19
+ showTitle={false}
20
+ onUpload={action('onUpload')}
21
+ />
22
+ ),
23
+ permissionsComponent: (
24
+ <RolePermissionsTab
25
+ selected={featuresSelectedMock}
26
+ onSelect={action('onSelect')}
27
+ />
28
+ ),
29
+ isEditing: true,
30
+ menuItems: [
31
+ {
32
+ label: 'Edit',
33
+ handleClick: action('Edit'),
34
+ },
35
+ ],
36
+ },
37
+ } as Meta<AddEditContactPanelI>
38
+
39
+ export const AddEditContactPanelComponent = (args: AddEditContactPanelI) => {
40
+ return (
41
+ <RightPanel isOpen={true} onClose={() => null}>
42
+ <AddEditContactPanel {...args} />
43
+ </RightPanel>
44
+ )
45
+ }
@@ -0,0 +1,35 @@
1
+ import { Meta } from '@storybook/react'
2
+ import { ViewContactPanel, RightPanel } from '@/components'
3
+ import { ContactsMock } from '@/mocks'
4
+ import { ViewContactPanelI } from '@/interfaces'
5
+ import { action } from '@storybook/addon-actions'
6
+ import { homeRoleTypes } from '@/helpers'
7
+
8
+ export default {
9
+ title: 'Components/Contacts',
10
+ component: ViewContactPanel,
11
+ argTypes: {
12
+ roleType: {
13
+ options: homeRoleTypes,
14
+ control: { type: 'radio' },
15
+ },
16
+ },
17
+ args: {
18
+ contact: ContactsMock[0],
19
+ roleType: 'member',
20
+ menuItems: [
21
+ {
22
+ label: 'Edit',
23
+ handleClick: action('Edit'),
24
+ },
25
+ ],
26
+ },
27
+ } as Meta<ViewContactPanelI>
28
+
29
+ export const ViewContactPanelComponent = (args: ViewContactPanelI) => {
30
+ return (
31
+ <RightPanel isOpen={true} onClose={() => null}>
32
+ <ViewContactPanel {...args} />
33
+ </RightPanel>
34
+ )
35
+ }
@@ -9,6 +9,7 @@ export default {
9
9
  component: ApplianceSteps,
10
10
  args: {
11
11
  onclick: action('clicked'),
12
+ addedAppliances: ['fridge', 'freezer', 'range', 'hood', 'microwave'],
12
13
  },
13
14
  decorators: [
14
15
  (Story: any) => (
@@ -17,7 +18,7 @@ export default {
17
18
  </Box>
18
19
  ),
19
20
  ],
20
- } as Meta
21
+ } as Meta<ApplianceStepsI>
21
22
 
22
23
  export const ApplianceStepsComponent = (args: ApplianceStepsI) => {
23
24
  return <ApplianceSteps {...args} />
@@ -50,6 +50,7 @@ export const HomeAssistantPanelComponent = (args: HomeAssistantPanelI) => {
50
50
  if (prev === 1) return 6
51
51
  return prev - 1
52
52
  })
53
+
53
54
  const currentForm = forms[currentStep]
54
55
  return (
55
56
  <HomeAssistantPanel
@@ -58,6 +59,7 @@ export const HomeAssistantPanelComponent = (args: HomeAssistantPanelI) => {
58
59
  currentForm={currentForm}
59
60
  onNext={handleFormChange}
60
61
  onBack={handleBack}
62
+ onSave={action('onSave')}
61
63
  />
62
64
  )
63
65
  }
@@ -1,6 +1,5 @@
1
1
  import { Meta } from '@storybook/react'
2
- import { Box } from '@chakra-ui/react'
3
- import { NewPassword } from '@/components'
2
+ import { NewPassword, CloudsAnimation } from '@/components'
4
3
  import { NewPasswordI } from '@/interfaces'
5
4
 
6
5
  export default {
@@ -10,9 +9,9 @@ export default {
10
9
 
11
10
  export const NewPasswordPage = (args: NewPasswordI) => {
12
11
  return (
13
- <Box p="base">
12
+ <CloudsAnimation>
14
13
  <NewPassword {...args} />
15
- </Box>
14
+ </CloudsAnimation>
16
15
  )
17
16
  }
18
17
 
@@ -1,6 +1,5 @@
1
1
  import { Meta } from '@storybook/react'
2
- import { Box } from '@chakra-ui/react'
3
- import { ResendResetPassword } from '@/components'
2
+ import { ResendResetPassword, CloudsAnimation } from '@/components'
4
3
  import { EmailValidationI } from '@/interfaces'
5
4
 
6
5
  export default {
@@ -10,9 +9,9 @@ export default {
10
9
 
11
10
  export const ResendResetPasswordPage = (args: EmailValidationI) => {
12
11
  return (
13
- <Box p="base">
12
+ <CloudsAnimation>
14
13
  <ResendResetPassword {...args} />
15
- </Box>
14
+ </CloudsAnimation>
16
15
  )
17
16
  }
18
17
 
@@ -1,6 +1,5 @@
1
1
  import { Meta } from '@storybook/react'
2
- import { Box } from '@chakra-ui/react'
3
- import { ResetPassword } from '@/components'
2
+ import { ResetPassword, CloudsAnimation } from '@/components'
4
3
  import { ResetPasswordI } from '@/interfaces'
5
4
 
6
5
  export default {
@@ -10,9 +9,9 @@ export default {
10
9
 
11
10
  export const ResetPasswordPage = (args: ResetPasswordI) => {
12
11
  return (
13
- <Box p="base">
12
+ <CloudsAnimation>
14
13
  <ResetPassword {...args} />
15
- </Box>
14
+ </CloudsAnimation>
16
15
  )
17
16
  }
18
17
 
@@ -1,6 +1,5 @@
1
1
  import { Meta } from '@storybook/react'
2
- import { Box } from '@chakra-ui/react'
3
- import { SignIn } from '@/components'
2
+ import { SignIn, CloudsAnimation } from '@/components'
4
3
  import { SignInI } from '@/interfaces'
5
4
 
6
5
  export default {
@@ -8,9 +7,9 @@ export default {
8
7
  component: SignIn,
9
8
  decorators: [
10
9
  (Story) => (
11
- <Box p="base">
10
+ <CloudsAnimation>
12
11
  <Story />
13
- </Box>
12
+ </CloudsAnimation>
14
13
  ),
15
14
  ],
16
15
  } as Meta
@@ -1,6 +1,5 @@
1
1
  import { Meta } from '@storybook/react'
2
- import { Box } from '@chakra-ui/react'
3
- import { SignUp } from '@/components'
2
+ import { CloudsAnimation, SignUp } from '@/components'
4
3
  import { SignUpI } from '@/interfaces'
5
4
 
6
5
  export default {
@@ -10,9 +9,9 @@ export default {
10
9
 
11
10
  export const SignUpPage = (args: SignUpI) => {
12
11
  return (
13
- <Box p="base">
12
+ <CloudsAnimation>
14
13
  <SignUp {...args} />
15
- </Box>
14
+ </CloudsAnimation>
16
15
  )
17
16
  }
18
17
 
@@ -0,0 +1,26 @@
1
+ import { ShineTile } from '@/components'
2
+ import { ShortPartnerTileI } from '@/interfaces'
3
+ import { menuMock } from '@/mocks'
4
+ import { Meta } from '@storybook/react'
5
+ import { Box } from '@chakra-ui/react'
6
+
7
+ export default {
8
+ title: 'Components/Partner',
9
+ component: ShineTile,
10
+ args: {
11
+ menuItems: menuMock,
12
+ },
13
+ argTypes: {
14
+ menuItems: {
15
+ control: { disable: true },
16
+ },
17
+ },
18
+ } as Meta
19
+
20
+ export const ShineTileComponent = (args: ShortPartnerTileI) => {
21
+ return (
22
+ <Box maxW="326px">
23
+ <ShineTile {...args} />
24
+ </Box>
25
+ )
26
+ }
@@ -1,2 +0,0 @@
1
- import { DynamicFormSimpleI } from '../../../interfaces';
2
- export declare const DynamicFormSimple: ({ form: fields }: DynamicFormSimpleI) => import("react/jsx-runtime").JSX.Element;
@@ -1,32 +0,0 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { FormProvider } from 'react-hook-form';
3
- import { Divider, Stack } from '@chakra-ui/react';
4
- import { TextField, SelectField, SwitchField, NumberField, FieldDivider, } from '../..';
5
- import { useDynamicForm } from '../../../hooks';
6
- import { fieldIcons } from '../../../helpers';
7
- export const DynamicFormSimple = ({ form: fields }) => {
8
- const { form } = useDynamicForm({ fields });
9
- return (_jsx(Stack, { bg: "neutral.white", spacing: "0", h: "full", boxShadow: "md", children: _jsx(FormProvider, Object.assign({}, form, { children: _jsxs(_Fragment, { children: [_jsx(Divider, {}), fields === null || fields === void 0 ? void 0 : fields.map((field) => {
10
- const { description, icon, id, name, options, type, value } = field;
11
- const baseProps = {
12
- description,
13
- id,
14
- value,
15
- icon: icon ? fieldIcons[icon] : undefined,
16
- placeholder: name !== null && name !== void 0 ? name : description,
17
- };
18
- switch (type) {
19
- case 'number':
20
- return (_jsx(FieldDivider, { children: _jsx(NumberField, Object.assign({}, baseProps)) }, id));
21
- case 'text':
22
- case 'string':
23
- return (_jsx(FieldDivider, { children: _jsx(TextField, Object.assign({}, baseProps)) }, id));
24
- case 'select':
25
- return (_jsx(FieldDivider, { children: _jsx(SelectField, Object.assign({}, baseProps, { options: options })) }, id));
26
- case 'switch':
27
- return (_jsx(FieldDivider, { children: _jsx(SwitchField, Object.assign({}, baseProps)) }, id));
28
- default:
29
- return null;
30
- }
31
- })] }) })) }));
32
- };
@@ -1,4 +0,0 @@
1
- import { ReportI } from '../..';
2
- export interface DynamicFormSimpleI {
3
- form: ReportI[];
4
- }
@@ -1,66 +0,0 @@
1
- import { FormProvider } from 'react-hook-form'
2
- import { Divider, Stack } from '@chakra-ui/react'
3
- import { DynamicFormSimpleI, IconTypes } from '@/interfaces'
4
- import {
5
- TextField,
6
- SelectField,
7
- SwitchField,
8
- NumberField,
9
- FieldDivider,
10
- } from '@/components'
11
- import { useDynamicForm } from '@/hooks'
12
- import { fieldIcons } from '@/helpers'
13
-
14
- export const DynamicFormSimple = ({ form: fields }: DynamicFormSimpleI) => {
15
- const { form } = useDynamicForm({ fields })
16
-
17
- return (
18
- <Stack bg="neutral.white" spacing="0" h="full" boxShadow="md">
19
- <FormProvider {...form}>
20
- <>
21
- <Divider />
22
- {fields?.map((field) => {
23
- const { description, icon, id, name, options, type, value } = field
24
-
25
- const baseProps = {
26
- description,
27
- id,
28
- value,
29
- icon: icon ? (fieldIcons[icon] as IconTypes) : undefined,
30
- placeholder: name ?? description,
31
- }
32
- switch (type) {
33
- case 'number':
34
- return (
35
- <FieldDivider key={id}>
36
- <NumberField {...baseProps} />
37
- </FieldDivider>
38
- )
39
- case 'text':
40
- case 'string':
41
- return (
42
- <FieldDivider key={id}>
43
- <TextField {...baseProps} />
44
- </FieldDivider>
45
- )
46
- case 'select':
47
- return (
48
- <FieldDivider key={id}>
49
- <SelectField {...baseProps} options={options} />
50
- </FieldDivider>
51
- )
52
- case 'switch':
53
- return (
54
- <FieldDivider key={id}>
55
- <SwitchField {...baseProps} />
56
- </FieldDivider>
57
- )
58
- default:
59
- return null
60
- }
61
- })}
62
- </>
63
- </FormProvider>
64
- </Stack>
65
- )
66
- }
@@ -1,5 +0,0 @@
1
- import { ReportI } from '@/interfaces'
2
-
3
- export interface DynamicFormSimpleI {
4
- form: ReportI[]
5
- }