@homefile/components-v2 2.2.4 → 2.3.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.
- package/dist/assets/images/index.d.ts +2 -1
- package/dist/assets/images/index.js +2 -1
- package/dist/assets/images/index.ts +2 -0
- package/dist/assets/images/speaker.svg +17 -0
- package/dist/assets/locales/en/index.json +35 -7
- package/dist/components/appBar/ContactList.d.ts +2 -2
- package/dist/components/appBar/NotificationsReminder.d.ts +2 -0
- package/dist/components/appBar/NotificationsReminder.js +24 -0
- package/dist/components/appBar/PeopleConnected.d.ts +2 -2
- package/dist/components/appBar/Trash.d.ts +2 -2
- package/dist/components/appBar/index.d.ts +1 -0
- package/dist/components/appBar/index.js +1 -0
- package/dist/components/badge/NumberBadge.d.ts +1 -1
- package/dist/components/badge/NumberBadge.js +14 -2
- package/dist/components/forms/dynamicForm/DynamicForm.d.ts +1 -1
- package/dist/components/forms/dynamicForm/DynamicForm.js +2 -2
- package/dist/components/forms/dynamicForm/fields/FileField.d.ts +1 -1
- package/dist/components/forms/dynamicForm/fields/FileField.js +9 -5
- package/dist/components/forms/readOnly/ReadOnlyDynamicForm.d.ts +2 -2
- package/dist/components/forms/readOnly/ReadOnlyDynamicForm.js +5 -2
- package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyAppliances.d.ts +2 -0
- package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyAppliances.js +23 -0
- package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyAppliances.tsx +74 -0
- package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyHomeItemImages.d.ts +2 -0
- package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyHomeItemImages.js +10 -0
- package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyHomeItemImages.tsx +28 -0
- package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyHomeItemRating.d.ts +2 -0
- package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyHomeItemRating.js +14 -0
- package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyHomeItemRating.tsx +22 -0
- package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyHomeItemText.d.ts +2 -0
- package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyHomeItemText.js +10 -0
- package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyHomeItemText.tsx +22 -0
- package/dist/components/forms/readOnly/fields/homeItem/index.d.ts +4 -0
- package/dist/components/forms/readOnly/fields/homeItem/index.js +4 -0
- package/dist/components/forms/readOnly/fields/homeItem/index.ts +4 -0
- package/dist/components/forms/readOnly/fields/index.d.ts +1 -0
- package/dist/components/forms/readOnly/fields/index.js +1 -0
- package/dist/components/headers/TabsHeader.d.ts +1 -1
- package/dist/components/headers/TabsHeader.js +9 -6
- package/dist/components/homeAssistant/HomeAssistant.d.ts +1 -1
- package/dist/components/homeAssistant/HomeAssistant.js +3 -2
- package/dist/components/homeAssistant/HomeAssistantWrapper.d.ts +2 -1
- package/dist/components/homeAssistant/HomeAssistantWrapper.js +4 -4
- package/dist/components/homeAssistant/HomeMonitor.d.ts +3 -1
- package/dist/components/homeAssistant/HomeMonitor.js +2 -2
- package/dist/components/homeAssistant/monitorAlerts/Notifications.js +2 -2
- package/dist/components/homeBoard/HomeBoard.d.ts +2 -1
- package/dist/components/homeBoard/HomeBoard.js +8 -7
- package/dist/components/homeItems/ViewingHomeItemPanel.d.ts +2 -0
- package/dist/components/homeItems/ViewingHomeItemPanel.js +24 -0
- package/dist/components/homeItems/index.d.ts +1 -0
- package/dist/components/homeItems/index.js +1 -0
- package/dist/components/inboxTile/InboxCard.d.ts +2 -0
- package/dist/components/inboxTile/InboxCard.js +10 -0
- package/dist/components/inboxTile/InboxForwardBanner.d.ts +1 -0
- package/dist/components/inboxTile/InboxForwardBanner.js +7 -0
- package/dist/components/inboxTile/InboxTile.d.ts +2 -0
- package/dist/components/inboxTile/InboxTile.js +9 -0
- package/dist/components/{partner/adminTiles/inboxTile → inboxTile}/index.d.ts +1 -0
- package/dist/components/{partner/adminTiles/inboxTile → inboxTile}/index.js +1 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.js +3 -0
- package/dist/components/notifications/NotificationCard.d.ts +2 -0
- package/dist/components/notifications/NotificationCard.js +64 -0
- package/dist/components/notifications/NotificationsPanel.d.ts +2 -0
- package/dist/components/notifications/NotificationsPanel.js +14 -0
- package/dist/components/notifications/index.d.ts +2 -0
- package/dist/components/notifications/index.js +2 -0
- package/dist/components/partner/adminTiles/index.d.ts +0 -1
- package/dist/components/partner/adminTiles/index.js +0 -1
- package/dist/components/tour/Bubble.js +1 -1
- package/dist/components/tour/HomeBoardTour.js +16 -16
- package/dist/components/valueMonitor/ValueCard.js +1 -1
- package/dist/hooks/display/useMediaPreview.js +4 -7
- package/dist/hooks/folderPanel/useFilesUploader.d.ts +3 -1
- package/dist/hooks/folderPanel/useFilesUploader.js +12 -2
- package/dist/hooks/homeBoard/useHomeBoard.d.ts +1 -0
- package/dist/hooks/homeBoard/useHomeBoard.js +5 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.js +1 -0
- package/dist/hooks/notifications/index.d.ts +1 -0
- package/dist/hooks/notifications/index.js +1 -0
- package/dist/hooks/notifications/useNotificationsPanel.d.ts +7 -0
- package/dist/hooks/notifications/useNotificationsPanel.js +32 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/interfaces/appBar/AppBar.interface.d.ts +6 -2
- package/dist/interfaces/appBar/index.d.ts +0 -1
- package/dist/interfaces/appBar/index.js +0 -1
- package/dist/interfaces/badge/NumberBadge.interface.d.ts +2 -3
- package/dist/interfaces/forms/dynamicForm/DynamicForm.interface.d.ts +7 -1
- package/dist/interfaces/forms/dynamicForm/fields/FileField.interface.d.ts +2 -0
- package/dist/interfaces/forms/readOnly/homeItem/ReadOnlyAppliances.interface.d.ts +4 -0
- package/dist/interfaces/forms/readOnly/homeItem/index.d.ts +1 -0
- package/dist/interfaces/forms/readOnly/homeItem/index.js +1 -0
- package/dist/interfaces/forms/readOnly/index.d.ts +1 -0
- package/dist/interfaces/forms/readOnly/index.js +1 -0
- package/dist/interfaces/headers/TabsHeader.interface.d.ts +1 -0
- package/dist/interfaces/homeAssistant/HomeAssistantSteps.interface.d.ts +1 -0
- package/dist/interfaces/homeItems/ViewingHomeItemPanel.interface.d.ts +6 -0
- package/dist/interfaces/homeItems/index.d.ts +1 -0
- package/dist/interfaces/homeItems/index.js +1 -0
- package/dist/interfaces/inboxTile/InboxCard.interface.d.ts +10 -0
- package/dist/interfaces/inboxTile/InboxTile.interface.d.ts +8 -0
- package/dist/interfaces/inboxTile/InboxTile.interface.js +1 -0
- package/dist/interfaces/index.d.ts +3 -0
- package/dist/interfaces/index.js +3 -0
- package/dist/interfaces/notifications/NotificationsPanel.interface.d.ts +16 -0
- package/dist/interfaces/notifications/NotificationsPanel.interface.js +1 -0
- package/dist/interfaces/notifications/index.d.ts +1 -0
- package/dist/interfaces/notifications/index.js +1 -0
- package/dist/interfaces/partner/adminTiles/index.d.ts +0 -1
- package/dist/interfaces/partner/adminTiles/index.js +0 -1
- package/dist/interfaces/tour/Step.interface.d.ts +2 -0
- package/dist/interfaces/valueMonitor/ValueCard.interface.d.ts +1 -1
- package/dist/mocks/forms/dynamicForm.mock.d.ts +1 -0
- package/dist/mocks/forms/dynamicForm.mock.js +72 -12
- package/dist/mocks/index.d.ts +1 -0
- package/dist/mocks/index.js +1 -0
- package/dist/mocks/notifications/index.d.ts +1 -0
- package/dist/mocks/notifications/index.js +1 -0
- package/dist/mocks/notifications/notifications.mock.d.ts +2 -0
- package/dist/mocks/notifications/notifications.mock.js +35 -0
- package/dist/stories/appBar/ContactList.stories.d.ts +3 -3
- package/dist/stories/appBar/PeopleConnected.stories.d.ts +3 -3
- package/dist/stories/appBar/Trash.stories.d.ts +3 -3
- package/dist/stories/assets/Illustrations.stories.js +2 -2
- package/dist/stories/forms/dynamicForm/DynamicForm.stories.js +13 -0
- package/dist/stories/homeItems/ViewingHomeItem.stories.d.ts +5 -0
- package/dist/stories/homeItems/ViewingHomeItem.stories.js +16 -0
- package/dist/stories/{partner/adminTiles/InboxTile.stories.d.ts → inboxTile/inboxTile.stories.d.ts} +1 -1
- package/dist/stories/inboxTile/inboxTile.stories.js +29 -0
- package/dist/stories/notifications/NotificationsPanel.stories.d.ts +5 -0
- package/dist/stories/notifications/NotificationsPanel.stories.js +17 -0
- package/dist/stories/valueMonitor/ValueMonitor.stories.d.ts +0 -1
- package/dist/stories/valueMonitor/ValueMonitor.stories.js +1 -1
- package/dist/theme/colors.d.ts +1 -0
- package/dist/theme/colors.js +1 -0
- package/package.json +1 -1
- package/src/assets/images/index.ts +2 -0
- package/src/assets/images/speaker.svg +17 -0
- package/src/assets/locales/en/index.json +35 -7
- package/src/components/appBar/ContactList.tsx +2 -2
- package/src/components/appBar/NotificationsReminder.tsx +49 -0
- package/src/components/appBar/PeopleConnected.tsx +2 -2
- package/src/components/appBar/Trash.tsx +2 -2
- package/src/components/appBar/index.ts +2 -1
- package/src/components/badge/NumberBadge.tsx +2 -0
- package/src/components/customToast/CustomToast.tsx +1 -1
- package/src/components/forms/dynamicForm/DynamicForm.tsx +4 -0
- package/src/components/forms/dynamicForm/fields/FileField.tsx +52 -6
- package/src/components/forms/readOnly/ReadOnlyDynamicForm.tsx +7 -3
- package/src/components/forms/readOnly/fields/homeItem/ReadOnlyAppliances.tsx +74 -0
- package/src/components/forms/readOnly/fields/homeItem/ReadOnlyHomeItemImages.tsx +28 -0
- package/src/components/forms/readOnly/fields/homeItem/ReadOnlyHomeItemRating.tsx +22 -0
- package/src/components/forms/readOnly/fields/homeItem/ReadOnlyHomeItemText.tsx +22 -0
- package/src/components/forms/readOnly/fields/homeItem/index.ts +4 -0
- package/src/components/forms/readOnly/fields/index.ts +1 -0
- package/src/components/headers/TabsHeader.tsx +36 -23
- package/src/components/homeAssistant/HomeAssistant.tsx +12 -7
- package/src/components/homeAssistant/HomeAssistantWrapper.tsx +5 -3
- package/src/components/homeAssistant/HomeMonitor.tsx +2 -2
- package/src/components/homeAssistant/monitorAlerts/Notifications.tsx +3 -3
- package/src/components/homeBoard/HomeBoard.tsx +30 -3
- package/src/components/homeItems/ViewingHomeItemPanel.tsx +44 -0
- package/src/components/homeItems/index.ts +1 -0
- package/src/components/inboxTile/InboxCard.tsx +38 -0
- package/src/components/inboxTile/InboxForwardBanner.tsx +26 -0
- package/src/components/inboxTile/InboxTile.tsx +36 -0
- package/src/components/{partner/adminTiles/inboxTile → inboxTile}/index.ts +1 -0
- package/src/components/index.ts +3 -0
- package/src/components/notifications/NotificationCard.tsx +162 -0
- package/src/components/notifications/NotificationsPanel.tsx +52 -0
- package/src/components/notifications/index.ts +2 -0
- package/src/components/partner/adminTiles/index.ts +0 -1
- package/src/components/tour/Bubble.tsx +2 -0
- package/src/components/tour/HomeBoardTour.tsx +4 -7
- package/src/components/valueMonitor/ValueCard.tsx +17 -13
- package/src/hooks/display/useMediaPreview.ts +3 -5
- package/src/hooks/folderPanel/useFilesUploader.ts +16 -3
- package/src/hooks/homeBoard/useHomeBoard.ts +6 -0
- package/src/hooks/index.ts +1 -0
- package/src/hooks/notifications/index.ts +1 -0
- package/src/hooks/notifications/useNotificationsPanel.ts +46 -0
- package/src/index.ts +4 -0
- package/src/interfaces/appBar/AppBar.interface.ts +7 -2
- package/src/interfaces/appBar/index.ts +1 -2
- package/src/interfaces/badge/NumberBadge.interface.ts +3 -3
- package/src/interfaces/forms/dynamicForm/DynamicForm.interface.ts +9 -0
- package/src/interfaces/forms/dynamicForm/fields/FileField.interface.ts +2 -0
- package/src/interfaces/forms/readOnly/homeItem/ReadOnlyAppliances.interface.ts +5 -0
- package/src/interfaces/forms/readOnly/homeItem/index.ts +1 -0
- package/src/interfaces/forms/readOnly/index.ts +1 -0
- package/src/interfaces/headers/TabsHeader.interface.ts +4 -3
- package/src/interfaces/homeAssistant/HomeAssistantSteps.interface.ts +1 -0
- package/src/interfaces/homeItems/ViewingHomeItemPanel.interface.ts +7 -0
- package/src/interfaces/homeItems/index.ts +1 -0
- package/src/interfaces/inboxTile/InboxCard.interface.ts +11 -0
- package/src/interfaces/inboxTile/InboxTile.interface.ts +9 -0
- package/src/interfaces/index.ts +3 -0
- package/src/interfaces/notifications/NotificationsPanel.interface.ts +24 -0
- package/src/interfaces/notifications/index.ts +1 -0
- package/src/interfaces/partner/adminTiles/index.ts +0 -1
- package/src/interfaces/tour/Step.interface.ts +2 -0
- package/src/interfaces/valueMonitor/ValueCard.interface.ts +1 -1
- package/src/mocks/forms/dynamicForm.mock.ts +74 -12
- package/src/mocks/index.ts +1 -0
- package/src/mocks/notifications/index.ts +1 -0
- package/src/mocks/notifications/notifications.mock.ts +37 -0
- package/src/stories/appBar/AppBar.stories.tsx +0 -1
- package/src/stories/appBar/ContactList.stories.tsx +4 -5
- package/src/stories/appBar/PeopleConnected.stories.tsx +4 -5
- package/src/stories/appBar/Trash.stories.tsx +4 -6
- package/src/stories/assets/Illustrations.stories.tsx +2 -0
- package/src/stories/forms/dynamicForm/DynamicForm.stories.tsx +13 -0
- package/src/stories/homeItems/ViewingHomeItem.stories.tsx +25 -0
- package/src/stories/inboxTile/inboxTile.stories.tsx +36 -0
- package/src/stories/notifications/NotificationsPanel.stories.tsx +26 -0
- package/src/stories/valueMonitor/ValueMonitor.stories.tsx +1 -1
- package/src/theme/colors.ts +1 -0
- package/dist/components/partner/adminTiles/inboxTile/InboxCard.d.ts +0 -2
- package/dist/components/partner/adminTiles/inboxTile/InboxCard.js +0 -8
- package/dist/components/partner/adminTiles/inboxTile/InboxTile.d.ts +0 -2
- package/dist/components/partner/adminTiles/inboxTile/InboxTile.js +0 -8
- package/dist/interfaces/appBar/PeopleConnected.interface.d.ts +0 -4
- package/dist/interfaces/partner/adminTiles/inboxTile/InboxCard.interface.d.ts +0 -6
- package/dist/interfaces/partner/adminTiles/inboxTile/InboxTile.interface.d.ts +0 -5
- package/dist/stories/partner/adminTiles/InboxTile.stories.js +0 -35
- package/src/components/partner/adminTiles/inboxTile/InboxCard.tsx +0 -35
- package/src/components/partner/adminTiles/inboxTile/InboxTile.tsx +0 -21
- package/src/interfaces/appBar/PeopleConnected.interface.ts +0 -4
- package/src/interfaces/partner/adminTiles/inboxTile/InboxCard.interface.ts +0 -6
- package/src/interfaces/partner/adminTiles/inboxTile/InboxTile.interface.ts +0 -6
- package/src/stories/partner/adminTiles/InboxTile.stories.tsx +0 -42
- /package/dist/interfaces/{appBar/PeopleConnected.interface.js → forms/readOnly/homeItem/ReadOnlyAppliances.interface.js} +0 -0
- /package/dist/interfaces/{partner/adminTiles/inboxTile/InboxCard.interface.js → homeItems/ViewingHomeItemPanel.interface.js} +0 -0
- /package/dist/interfaces/{partner/adminTiles/inboxTile/InboxTile.interface.js → inboxTile/InboxCard.interface.js} +0 -0
- /package/dist/interfaces/{partner/adminTiles/inboxTile → inboxTile}/index.d.ts +0 -0
- /package/dist/interfaces/{partner/adminTiles/inboxTile → inboxTile}/index.js +0 -0
- /package/src/interfaces/{partner/adminTiles/inboxTile → inboxTile}/index.ts +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './NotificationsPanel.interface'
|
|
@@ -166,16 +166,7 @@ export const formFieldsMock: ReportI[] = [
|
|
|
166
166
|
name: 'Images',
|
|
167
167
|
description: faker.lorem.sentence(),
|
|
168
168
|
comments: faker.lorem.sentence(),
|
|
169
|
-
value:
|
|
170
|
-
faker.image.urlPicsumPhotos(),
|
|
171
|
-
faker.image.urlPicsumPhotos(),
|
|
172
|
-
faker.image.urlPicsumPhotos(),
|
|
173
|
-
faker.image.urlPicsumPhotos(),
|
|
174
|
-
faker.image.urlPicsumPhotos(),
|
|
175
|
-
faker.image.urlPicsumPhotos(),
|
|
176
|
-
faker.image.urlPicsumPhotos(),
|
|
177
|
-
faker.image.urlPicsumPhotos(),
|
|
178
|
-
],
|
|
169
|
+
value: '',
|
|
179
170
|
type: 'file',
|
|
180
171
|
icon: 'image',
|
|
181
172
|
},
|
|
@@ -243,7 +234,16 @@ export const formFieldsMock: ReportI[] = [
|
|
|
243
234
|
id: faker.database.mongodbObjectId(),
|
|
244
235
|
name: 'Image',
|
|
245
236
|
comments: faker.lorem.sentence(),
|
|
246
|
-
value:
|
|
237
|
+
value: [
|
|
238
|
+
faker.image.urlPicsumPhotos(),
|
|
239
|
+
faker.image.urlPicsumPhotos(),
|
|
240
|
+
faker.image.urlPicsumPhotos(),
|
|
241
|
+
faker.image.urlPicsumPhotos(),
|
|
242
|
+
faker.image.urlPicsumPhotos(),
|
|
243
|
+
faker.image.urlPicsumPhotos(),
|
|
244
|
+
faker.image.urlPicsumPhotos(),
|
|
245
|
+
faker.image.urlPicsumPhotos(),
|
|
246
|
+
],
|
|
247
247
|
type: 'file',
|
|
248
248
|
visible: false,
|
|
249
249
|
icon: 'image',
|
|
@@ -410,7 +410,16 @@ export const contactFieldsMock: ReportI[] = [
|
|
|
410
410
|
{
|
|
411
411
|
id: faker.database.mongodbObjectId(),
|
|
412
412
|
name: 'Images',
|
|
413
|
-
value: [
|
|
413
|
+
value: [
|
|
414
|
+
faker.image.urlPicsumPhotos(),
|
|
415
|
+
faker.image.urlPicsumPhotos(),
|
|
416
|
+
faker.image.urlPicsumPhotos(),
|
|
417
|
+
faker.image.urlPicsumPhotos(),
|
|
418
|
+
faker.image.urlPicsumPhotos(),
|
|
419
|
+
faker.image.urlPicsumPhotos(),
|
|
420
|
+
faker.image.urlPicsumPhotos(),
|
|
421
|
+
faker.image.urlPicsumPhotos(),
|
|
422
|
+
],
|
|
414
423
|
type: 'file',
|
|
415
424
|
icon: 'image',
|
|
416
425
|
},
|
|
@@ -585,3 +594,56 @@ export const tileUIMock: ReportI[] = [
|
|
|
585
594
|
],
|
|
586
595
|
},
|
|
587
596
|
]
|
|
597
|
+
|
|
598
|
+
export const viewingHomeItemMock: ReportI[] = [
|
|
599
|
+
{
|
|
600
|
+
id: faker.database.mongodbObjectId(),
|
|
601
|
+
name: 'Appliances',
|
|
602
|
+
description:
|
|
603
|
+
'KitchenAid Counter-depth 20-cu ft French Door Refrigerator with Ice Maker and Water dispenser (Stainless Steel) ENERGY STAR',
|
|
604
|
+
comments: faker.lorem.sentence(),
|
|
605
|
+
value: 'Refrigerator',
|
|
606
|
+
type: 'appliances',
|
|
607
|
+
visible: true,
|
|
608
|
+
options: [],
|
|
609
|
+
children: [
|
|
610
|
+
{
|
|
611
|
+
id: faker.database.mongodbObjectId(),
|
|
612
|
+
name: '',
|
|
613
|
+
description: '',
|
|
614
|
+
comments: '',
|
|
615
|
+
value: [
|
|
616
|
+
faker.image.urlLoremFlickr(),
|
|
617
|
+
faker.image.urlLoremFlickr(),
|
|
618
|
+
faker.image.urlLoremFlickr(),
|
|
619
|
+
faker.image.urlLoremFlickr(),
|
|
620
|
+
],
|
|
621
|
+
type: 'images',
|
|
622
|
+
},
|
|
623
|
+
{
|
|
624
|
+
id: faker.database.mongodbObjectId(),
|
|
625
|
+
name: '',
|
|
626
|
+
description: '',
|
|
627
|
+
comments: '',
|
|
628
|
+
value: 4,
|
|
629
|
+
type: 'rating',
|
|
630
|
+
},
|
|
631
|
+
{
|
|
632
|
+
id: faker.database.mongodbObjectId(),
|
|
633
|
+
name: 'Brand',
|
|
634
|
+
description: '',
|
|
635
|
+
comments: '',
|
|
636
|
+
value: 'Kitchen Aid',
|
|
637
|
+
type: 'text',
|
|
638
|
+
},
|
|
639
|
+
{
|
|
640
|
+
id: faker.database.mongodbObjectId(),
|
|
641
|
+
name: 'Model#',
|
|
642
|
+
description: '',
|
|
643
|
+
comments: '',
|
|
644
|
+
value: 'KRFC300ESS',
|
|
645
|
+
type: 'text',
|
|
646
|
+
},
|
|
647
|
+
],
|
|
648
|
+
},
|
|
649
|
+
]
|
package/src/mocks/index.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './notifications.mock'
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { NotificationCardI } from '@/interfaces'
|
|
2
|
+
import { faker } from '@faker-js/faker'
|
|
3
|
+
|
|
4
|
+
export const notificationsMock: NotificationCardI[] = [
|
|
5
|
+
{
|
|
6
|
+
active: true,
|
|
7
|
+
_id: '1',
|
|
8
|
+
createdAt: new Date(),
|
|
9
|
+
message: faker.lorem.sentence(),
|
|
10
|
+
status: 'added',
|
|
11
|
+
type: 'contact',
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
active: true,
|
|
15
|
+
_id: '2',
|
|
16
|
+
createdAt: new Date(),
|
|
17
|
+
message: faker.lorem.sentence(),
|
|
18
|
+
status: 'removed',
|
|
19
|
+
type: 'file',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
active: true,
|
|
23
|
+
_id: '3',
|
|
24
|
+
createdAt: new Date(),
|
|
25
|
+
message: faker.lorem.sentence(),
|
|
26
|
+
status: 'shared',
|
|
27
|
+
type: 'folder',
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
active: true,
|
|
31
|
+
_id: '4',
|
|
32
|
+
createdAt: new Date(),
|
|
33
|
+
message: faker.lorem.sentence(),
|
|
34
|
+
status: 'updated',
|
|
35
|
+
type: 'payment',
|
|
36
|
+
},
|
|
37
|
+
]
|
|
@@ -14,7 +14,6 @@ import {
|
|
|
14
14
|
} from '@/components'
|
|
15
15
|
import { useState } from 'react'
|
|
16
16
|
import { Tutorials } from '@/helpers'
|
|
17
|
-
import { Flex } from '@chakra-ui/react'
|
|
18
17
|
import { AppBarI } from '@/interfaces'
|
|
19
18
|
import { useWindowDimensions } from '@/hooks'
|
|
20
19
|
import { MOBILE_WIDTH } from '@/utils'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Meta
|
|
1
|
+
import { Meta } from '@storybook/react'
|
|
2
2
|
import { ContactList } from '@/components'
|
|
3
3
|
import { Box } from '@chakra-ui/react'
|
|
4
|
-
import {
|
|
4
|
+
import { AppBarIconI } from '@/interfaces'
|
|
5
5
|
|
|
6
6
|
export default {
|
|
7
7
|
title: 'Components/AppBar',
|
|
@@ -9,11 +9,10 @@ export default {
|
|
|
9
9
|
args: {
|
|
10
10
|
total: 2,
|
|
11
11
|
},
|
|
12
|
-
} as Meta<
|
|
12
|
+
} as Meta<AppBarIconI>
|
|
13
13
|
|
|
14
|
-
export const ContactListComponent = (args:
|
|
14
|
+
export const ContactListComponent = (args: AppBarIconI) => (
|
|
15
15
|
<Box p="base" bg="white" w="fit-content">
|
|
16
16
|
<ContactList {...args} />
|
|
17
17
|
</Box>
|
|
18
18
|
)
|
|
19
|
-
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Meta
|
|
1
|
+
import { Meta } from '@storybook/react'
|
|
2
2
|
import { PeopleConnected } from '@/components'
|
|
3
3
|
import { Box } from '@chakra-ui/react'
|
|
4
|
-
import {
|
|
4
|
+
import { AppBarIconI } from '@/interfaces'
|
|
5
5
|
|
|
6
6
|
export default {
|
|
7
7
|
title: 'Components/AppBar',
|
|
@@ -9,11 +9,10 @@ export default {
|
|
|
9
9
|
args: {
|
|
10
10
|
total: 12,
|
|
11
11
|
},
|
|
12
|
-
} as Meta<
|
|
12
|
+
} as Meta<AppBarIconI>
|
|
13
13
|
|
|
14
|
-
export const PeopleConnectedComponent = (args:
|
|
14
|
+
export const PeopleConnectedComponent = (args: AppBarIconI) => (
|
|
15
15
|
<Box p="base" bg="white" w="fit-content">
|
|
16
16
|
<PeopleConnected {...args} />
|
|
17
17
|
</Box>
|
|
18
18
|
)
|
|
19
|
-
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Meta
|
|
1
|
+
import { Meta } from '@storybook/react'
|
|
2
2
|
import { Trash } from '@/components'
|
|
3
3
|
import { Box } from '@chakra-ui/react'
|
|
4
|
-
import {
|
|
4
|
+
import { AppBarIconI } from '@/interfaces'
|
|
5
5
|
|
|
6
6
|
export default {
|
|
7
7
|
title: 'Components/AppBar',
|
|
@@ -9,12 +9,10 @@ export default {
|
|
|
9
9
|
args: {
|
|
10
10
|
total: 2,
|
|
11
11
|
},
|
|
12
|
-
} as Meta<
|
|
12
|
+
} as Meta<AppBarIconI>
|
|
13
13
|
|
|
14
|
-
export const TrashComponent = (args:
|
|
14
|
+
export const TrashComponent = (args: AppBarIconI) => (
|
|
15
15
|
<Box p="base" bg="white" w="fit-content">
|
|
16
16
|
<Trash {...args} />
|
|
17
17
|
</Box>
|
|
18
18
|
)
|
|
19
|
-
|
|
20
|
-
|
|
@@ -151,6 +151,7 @@ import {
|
|
|
151
151
|
Social,
|
|
152
152
|
SmallAppliances,
|
|
153
153
|
SolarPanel,
|
|
154
|
+
Speaker,
|
|
154
155
|
Sprinkler,
|
|
155
156
|
Steps,
|
|
156
157
|
Structure,
|
|
@@ -386,6 +387,7 @@ export const Illustrations = () => {
|
|
|
386
387
|
<IconWrapper icon={SMS} name="SMS" />
|
|
387
388
|
<IconWrapper icon={Social} name="Social" />
|
|
388
389
|
<IconWrapper icon={SolarPanel} name="SolarPanel" />
|
|
390
|
+
<IconWrapper icon={Speaker} name="Speaker" />
|
|
389
391
|
<IconWrapper icon={Sprinkler} name="Sprinkler" />
|
|
390
392
|
<IconWrapper icon={Structure} name="Structure" />
|
|
391
393
|
<IconWrapper icon={Subscription} name="Subscription" />
|
|
@@ -4,11 +4,24 @@ import { Box } from '@chakra-ui/react'
|
|
|
4
4
|
import { DynamicForm } from '@/components'
|
|
5
5
|
import { formFieldsMock, menuMock, socialLinksMock, tileUIMock } from '@/mocks'
|
|
6
6
|
import { DynamicFormI } from '@/interfaces'
|
|
7
|
+
import { faker } from '@faker-js/faker'
|
|
7
8
|
|
|
8
9
|
export default {
|
|
9
10
|
title: 'Components/Forms/DynamicForm',
|
|
10
11
|
component: DynamicForm,
|
|
11
12
|
args: {
|
|
13
|
+
callback: action('callback'),
|
|
14
|
+
displayImages: [
|
|
15
|
+
faker.image.urlPicsumPhotos(),
|
|
16
|
+
faker.image.urlPicsumPhotos(),
|
|
17
|
+
faker.image.urlPicsumPhotos(),
|
|
18
|
+
faker.image.urlPicsumPhotos(),
|
|
19
|
+
faker.image.urlPicsumPhotos(),
|
|
20
|
+
faker.image.urlPicsumPhotos(),
|
|
21
|
+
faker.image.urlPicsumPhotos(),
|
|
22
|
+
faker.image.urlPicsumPhotos(),
|
|
23
|
+
],
|
|
24
|
+
onUpload: action('onUpload'),
|
|
12
25
|
menuItems: menuMock,
|
|
13
26
|
socialLinks: socialLinksMock,
|
|
14
27
|
websiteUrl: 'http://www.audreyscheckdesign.com',
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Meta } from '@storybook/react'
|
|
2
|
+
import { RightPanel, ViewingHomeItemPanel } from '@/components'
|
|
3
|
+
import { action } from '@storybook/addon-actions'
|
|
4
|
+
import { ViewingHomeItemPanelI } from '@/interfaces'
|
|
5
|
+
import { viewingHomeItemMock } from '@/mocks'
|
|
6
|
+
|
|
7
|
+
export default {
|
|
8
|
+
title: 'Components/HomeItems',
|
|
9
|
+
component: ViewingHomeItemPanel,
|
|
10
|
+
args: {
|
|
11
|
+
form: viewingHomeItemMock,
|
|
12
|
+
onEdit: action('onEdit'),
|
|
13
|
+
},
|
|
14
|
+
decorators: [
|
|
15
|
+
(Story) => (
|
|
16
|
+
<RightPanel isOpen onClose={action('onClose')}>
|
|
17
|
+
<Story />
|
|
18
|
+
</RightPanel>
|
|
19
|
+
),
|
|
20
|
+
],
|
|
21
|
+
} as Meta<ViewingHomeItemPanelI>
|
|
22
|
+
|
|
23
|
+
export const ViewingHomeItemPanelComponent = (args: ViewingHomeItemPanelI) => (
|
|
24
|
+
<ViewingHomeItemPanel {...args} />
|
|
25
|
+
)
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Meta } from '@storybook/react'
|
|
2
|
+
import { Box } from '@chakra-ui/react'
|
|
3
|
+
import { InboxForwardBanner, InboxTile } from '@/components'
|
|
4
|
+
import { InboxTileI } from '@/interfaces'
|
|
5
|
+
import { Message, Register } from '@/assets/images'
|
|
6
|
+
import { menuMock } from '@/mocks'
|
|
7
|
+
|
|
8
|
+
export default {
|
|
9
|
+
title: 'Components/Inbox',
|
|
10
|
+
component: InboxTile,
|
|
11
|
+
args: {
|
|
12
|
+
banner: <InboxForwardBanner />,
|
|
13
|
+
boxes: [
|
|
14
|
+
{
|
|
15
|
+
image: Register,
|
|
16
|
+
name: 'Receipts',
|
|
17
|
+
newMessages: 1,
|
|
18
|
+
totalMessages: 37,
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
image: Message,
|
|
22
|
+
name: 'Messages',
|
|
23
|
+
totalMessages: 2,
|
|
24
|
+
},
|
|
25
|
+
],
|
|
26
|
+
menuItems: menuMock,
|
|
27
|
+
},
|
|
28
|
+
} as Meta
|
|
29
|
+
|
|
30
|
+
export const InboxTileComponent = (args: InboxTileI) => {
|
|
31
|
+
return (
|
|
32
|
+
<Box p="base" w={['full', '350px']} h="400px">
|
|
33
|
+
<InboxTile {...args} />
|
|
34
|
+
</Box>
|
|
35
|
+
)
|
|
36
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Meta } from '@storybook/react'
|
|
2
|
+
import { RightPanel, NotificationsPanel } from '@/components'
|
|
3
|
+
import { action } from '@storybook/addon-actions'
|
|
4
|
+
import { NotificationsPanelI } from '@/interfaces'
|
|
5
|
+
import { notificationsMock } from '@/mocks'
|
|
6
|
+
|
|
7
|
+
export default {
|
|
8
|
+
title: 'Components/Notifications',
|
|
9
|
+
component: NotificationsPanel,
|
|
10
|
+
args: {
|
|
11
|
+
notifications: notificationsMock,
|
|
12
|
+
onClose: action('onClose'),
|
|
13
|
+
onDismiss: action('onDismiss'),
|
|
14
|
+
},
|
|
15
|
+
decorators: [
|
|
16
|
+
(Story) => (
|
|
17
|
+
<RightPanel isOpen onClose={action('onClose')} size="sm">
|
|
18
|
+
<Story />
|
|
19
|
+
</RightPanel>
|
|
20
|
+
),
|
|
21
|
+
],
|
|
22
|
+
} as Meta<NotificationsPanelI>
|
|
23
|
+
|
|
24
|
+
export const NotificationsPanelComponent = (args: NotificationsPanelI) => (
|
|
25
|
+
<NotificationsPanel {...args} />
|
|
26
|
+
)
|
package/src/theme/colors.ts
CHANGED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { t } from 'i18next';
|
|
3
|
-
import { Flex, Image, Text } from '@chakra-ui/react';
|
|
4
|
-
import { TextBadge } from '../../..';
|
|
5
|
-
export const InboxCard = ({ image, name, newMessages = 0, totalMessages, }) => {
|
|
6
|
-
const message = `${newMessages} ${t('badges.new')}`;
|
|
7
|
-
return (_jsxs(Flex, { align: "center", justify: "space-between", px: "base", py: "6", bg: "neutral.white", borderTop: "1px solid", borderColor: "lightBlue.5", children: [_jsxs(Flex, { align: "center", gap: "base", children: [_jsx(Image, { src: image, alt: name }), _jsx(Text, { children: name })] }), _jsxs(Flex, { align: "center", gap: "6", children: [_jsx(TextBadge, { text: message, showAnimation: false, bgColor: "violet.1" }), _jsx(Text, { fontSize: "30px", fontWeight: "medium", color: "blue.2", children: totalMessages })] })] }));
|
|
8
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { t } from 'i18next';
|
|
3
|
-
import { Container } from '@chakra-ui/react';
|
|
4
|
-
import { ContainerHeader, InboxCard, MoreHorizontal } from '../../..';
|
|
5
|
-
import { Inbox } from '../../../../assets/images';
|
|
6
|
-
export const InboxTile = ({ boxes, menuItems }) => {
|
|
7
|
-
return (_jsxs(Container, { variant: "launchpad", maxW: "358px", bg: "neutral.white", children: [_jsx(ContainerHeader, { menuItems: menuItems, title: t('partner.tiles.inbox'), icon: _jsx(MoreHorizontal, { size: 38 }), titleIcon: Inbox }), boxes.map((box) => (_jsx(InboxCard, Object.assign({}, box), box.name)))] }));
|
|
8
|
-
};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Box } from '@chakra-ui/react';
|
|
3
|
-
import { InboxTile } from '../../../components';
|
|
4
|
-
import { Document } from '../../../assets/images';
|
|
5
|
-
import { menuMock } from '../../../mocks';
|
|
6
|
-
export default {
|
|
7
|
-
title: 'Components/Partner/Admin Tiles/Inbox',
|
|
8
|
-
component: InboxTile,
|
|
9
|
-
args: {
|
|
10
|
-
boxes: [
|
|
11
|
-
{
|
|
12
|
-
image: Document,
|
|
13
|
-
name: 'Inbox',
|
|
14
|
-
newMessages: 10,
|
|
15
|
-
totalMessages: 32,
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
image: Document,
|
|
19
|
-
name: 'Inbox2',
|
|
20
|
-
newMessages: 10,
|
|
21
|
-
totalMessages: 32,
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
image: Document,
|
|
25
|
-
name: 'Inbox3',
|
|
26
|
-
newMessages: 10,
|
|
27
|
-
totalMessages: 32,
|
|
28
|
-
},
|
|
29
|
-
],
|
|
30
|
-
menuItems: menuMock,
|
|
31
|
-
},
|
|
32
|
-
};
|
|
33
|
-
export const InboxTileComponent = (args) => {
|
|
34
|
-
return (_jsx(Box, { p: "base", w: ['full', '400px'], children: _jsx(InboxTile, Object.assign({}, args)) }));
|
|
35
|
-
};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { t } from 'i18next'
|
|
2
|
-
import { Flex, Image, Text } from '@chakra-ui/react'
|
|
3
|
-
import { TextBadge } from '@/components'
|
|
4
|
-
import { InboxCardI } from '@/interfaces'
|
|
5
|
-
|
|
6
|
-
export const InboxCard = ({
|
|
7
|
-
image,
|
|
8
|
-
name,
|
|
9
|
-
newMessages = 0,
|
|
10
|
-
totalMessages,
|
|
11
|
-
}: InboxCardI) => {
|
|
12
|
-
const message = `${newMessages} ${t('badges.new')}`
|
|
13
|
-
return (
|
|
14
|
-
<Flex
|
|
15
|
-
align="center"
|
|
16
|
-
justify="space-between"
|
|
17
|
-
px="base"
|
|
18
|
-
py="6"
|
|
19
|
-
bg="neutral.white"
|
|
20
|
-
borderTop="1px solid"
|
|
21
|
-
borderColor="lightBlue.5"
|
|
22
|
-
>
|
|
23
|
-
<Flex align="center" gap="base">
|
|
24
|
-
<Image src={image} alt={name} />
|
|
25
|
-
<Text>{name}</Text>
|
|
26
|
-
</Flex>
|
|
27
|
-
<Flex align="center" gap="6">
|
|
28
|
-
<TextBadge text={message} showAnimation={false} bgColor="violet.1" />
|
|
29
|
-
<Text fontSize="30px" fontWeight="medium" color="blue.2">
|
|
30
|
-
{totalMessages}
|
|
31
|
-
</Text>
|
|
32
|
-
</Flex>
|
|
33
|
-
</Flex>
|
|
34
|
-
)
|
|
35
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { t } from 'i18next'
|
|
2
|
-
import { Container } from '@chakra-ui/react'
|
|
3
|
-
import { ContainerHeader, InboxCard, MoreHorizontal } from '@/components'
|
|
4
|
-
import { Inbox } from '@/assets/images'
|
|
5
|
-
import { InboxTileI } from '@/interfaces'
|
|
6
|
-
|
|
7
|
-
export const InboxTile = ({ boxes, menuItems }: InboxTileI) => {
|
|
8
|
-
return (
|
|
9
|
-
<Container variant="launchpad" maxW="358px" bg="neutral.white">
|
|
10
|
-
<ContainerHeader
|
|
11
|
-
menuItems={menuItems}
|
|
12
|
-
title={t('partner.tiles.inbox')}
|
|
13
|
-
icon={<MoreHorizontal size={38} />}
|
|
14
|
-
titleIcon={Inbox}
|
|
15
|
-
/>
|
|
16
|
-
{boxes.map((box) => (
|
|
17
|
-
<InboxCard key={box.name} {...box} />
|
|
18
|
-
))}
|
|
19
|
-
</Container>
|
|
20
|
-
)
|
|
21
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { Meta } from '@storybook/react'
|
|
2
|
-
import { Box } from '@chakra-ui/react'
|
|
3
|
-
import { InboxTile } from '@/components'
|
|
4
|
-
import { InboxTileI } from '@/interfaces'
|
|
5
|
-
import { Document } from '@/assets/images'
|
|
6
|
-
import { menuMock } from '@/mocks'
|
|
7
|
-
|
|
8
|
-
export default {
|
|
9
|
-
title: 'Components/Partner/Admin Tiles/Inbox',
|
|
10
|
-
component: InboxTile,
|
|
11
|
-
args: {
|
|
12
|
-
boxes: [
|
|
13
|
-
{
|
|
14
|
-
image: Document,
|
|
15
|
-
name: 'Inbox',
|
|
16
|
-
newMessages: 10,
|
|
17
|
-
totalMessages: 32,
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
image: Document,
|
|
21
|
-
name: 'Inbox2',
|
|
22
|
-
newMessages: 10,
|
|
23
|
-
totalMessages: 32,
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
image: Document,
|
|
27
|
-
name: 'Inbox3',
|
|
28
|
-
newMessages: 10,
|
|
29
|
-
totalMessages: 32,
|
|
30
|
-
},
|
|
31
|
-
],
|
|
32
|
-
menuItems: menuMock,
|
|
33
|
-
},
|
|
34
|
-
} as Meta
|
|
35
|
-
|
|
36
|
-
export const InboxTileComponent = (args: InboxTileI) => {
|
|
37
|
-
return (
|
|
38
|
-
<Box p="base" w={['full', '400px']}>
|
|
39
|
-
<InboxTile {...args} />
|
|
40
|
-
</Box>
|
|
41
|
-
)
|
|
42
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|