@homefile/components-v2 2.3.0 → 2.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 (147) hide show
  1. package/dist/assets/images/animations/index.d.ts +7 -0
  2. package/dist/assets/images/animations/index.js +7 -0
  3. package/dist/assets/images/animations/index.ts +15 -0
  4. package/dist/assets/images/animations/trees-cloudy.png +0 -0
  5. package/dist/assets/images/animations/trees-day-fall.png +0 -0
  6. package/dist/assets/images/animations/trees-day-summer.png +0 -0
  7. package/dist/assets/images/animations/trees-day-winter.png +0 -0
  8. package/dist/assets/images/animations/trees-evening.png +0 -0
  9. package/dist/assets/images/animations/trees-morning.png +0 -0
  10. package/dist/assets/images/animations/trees-night.png +0 -0
  11. package/dist/assets/images/chat-bubble.svg +8 -0
  12. package/dist/assets/images/document2.svg +14 -0
  13. package/dist/assets/images/index.d.ts +4 -1
  14. package/dist/assets/images/index.js +4 -1
  15. package/dist/assets/images/index.ts +5 -0
  16. package/dist/assets/locales/en/index.json +11 -10
  17. package/dist/components/animations/CloudsAnimation.js +19 -3
  18. package/dist/components/animations/WeatherTrees.d.ts +6 -0
  19. package/dist/components/animations/WeatherTrees.js +36 -0
  20. package/dist/components/animations/index.d.ts +1 -0
  21. package/dist/components/animations/index.js +1 -0
  22. package/dist/components/badge/TextBadge.js +1 -1
  23. package/dist/components/folderPanel/folderDetails/FilesCounter.js +3 -5
  24. package/dist/components/footers/FooterButtons.d.ts +1 -1
  25. package/dist/components/footers/FooterButtons.js +2 -2
  26. package/dist/components/forms/BaseCounter.d.ts +2 -0
  27. package/dist/components/forms/BaseCounter.js +8 -0
  28. package/dist/components/forms/index.d.ts +1 -0
  29. package/dist/components/forms/index.js +1 -0
  30. package/dist/components/homeAssistant/HomeAssistantWrapper.d.ts +1 -1
  31. package/dist/components/homeAssistant/HomeAssistantWrapper.js +20 -6
  32. package/dist/components/inboxTile/InboxForwardBanner.js +2 -2
  33. package/dist/components/inboxTile/index.d.ts +1 -0
  34. package/dist/components/inboxTile/index.js +1 -0
  35. package/dist/components/inboxTile/panel/MessageCard.d.ts +2 -0
  36. package/dist/components/inboxTile/panel/MessageCard.js +14 -0
  37. package/dist/components/inboxTile/panel/MessageChatPanel.d.ts +4 -0
  38. package/dist/components/inboxTile/panel/MessageChatPanel.js +38 -0
  39. package/dist/components/inboxTile/panel/MessagePanel.d.ts +2 -0
  40. package/dist/components/inboxTile/panel/MessagePanel.js +12 -0
  41. package/dist/components/inboxTile/panel/index.d.ts +3 -0
  42. package/dist/components/inboxTile/panel/index.js +3 -0
  43. package/dist/components/myHomes/WrapperWithShadow.js +1 -1
  44. package/dist/components/myHomes/steps/MyHomeDetails.d.ts +1 -0
  45. package/dist/components/myHomes/steps/MyHomeDetails.js +1 -1
  46. package/dist/components/notifications/NotificationCard.d.ts +1 -1
  47. package/dist/components/notifications/NotificationCard.js +2 -47
  48. package/dist/components/rooms/VideosCounter.js +3 -5
  49. package/dist/hooks/inbox/index.d.ts +1 -0
  50. package/dist/hooks/inbox/index.js +1 -0
  51. package/dist/hooks/inbox/useMessagePanel.d.ts +7 -0
  52. package/dist/hooks/inbox/useMessagePanel.js +17 -0
  53. package/dist/hooks/index.d.ts +1 -0
  54. package/dist/hooks/index.js +1 -0
  55. package/dist/hooks/notifications/useNotificationsPanel.js +0 -5
  56. package/dist/index.d.ts +1 -1
  57. package/dist/index.js +1 -1
  58. package/dist/interfaces/appBar/UserProfile.interface.d.ts +2 -2
  59. package/dist/interfaces/footers/FooterButtons.interface.d.ts +1 -0
  60. package/dist/interfaces/forms/BaseCounter.interface.d.ts +5 -0
  61. package/dist/interfaces/forms/BaseCounter.interface.js +1 -0
  62. package/dist/interfaces/forms/index.d.ts +1 -0
  63. package/dist/interfaces/forms/index.js +1 -0
  64. package/dist/interfaces/inboxTile/MessageCard.interface.d.ts +16 -0
  65. package/dist/interfaces/inboxTile/MessageCard.interface.js +1 -0
  66. package/dist/interfaces/inboxTile/MessageChatPanel.interface.d.ts +12 -0
  67. package/dist/interfaces/inboxTile/MessageChatPanel.interface.js +1 -0
  68. package/dist/interfaces/inboxTile/MessagePanel.interface.d.ts +6 -0
  69. package/dist/interfaces/inboxTile/MessagePanel.interface.js +1 -0
  70. package/dist/interfaces/inboxTile/index.d.ts +3 -0
  71. package/dist/interfaces/inboxTile/index.js +3 -0
  72. package/dist/interfaces/notifications/NotificationsPanel.interface.d.ts +3 -2
  73. package/dist/mocks/inbox/index.d.ts +1 -0
  74. package/dist/mocks/inbox/index.js +1 -0
  75. package/dist/mocks/inbox/messages.d.ts +2 -0
  76. package/dist/mocks/inbox/messages.js +138 -0
  77. package/dist/mocks/index.d.ts +1 -0
  78. package/dist/mocks/index.js +1 -0
  79. package/dist/mocks/notifications/notifications.mock.js +4 -4
  80. package/dist/stories/assets/Illustrations.stories.js +2 -2
  81. package/dist/stories/inboxTile/MessagePanel.stories.d.ts +5 -0
  82. package/dist/stories/inboxTile/MessagePanel.stories.js +24 -0
  83. package/dist/theme/colors.d.ts +4 -1
  84. package/dist/theme/colors.js +4 -1
  85. package/dist/utils/Animations.utils.d.ts +6 -0
  86. package/dist/utils/Animations.utils.js +31 -0
  87. package/dist/utils/Avatars.utils.d.ts +1 -1
  88. package/dist/utils/Avatars.utils.js +1 -1
  89. package/dist/utils/index.d.ts +1 -0
  90. package/dist/utils/index.js +1 -0
  91. package/package.json +1 -1
  92. package/src/assets/images/animations/index.ts +15 -0
  93. package/src/assets/images/animations/trees-cloudy.png +0 -0
  94. package/src/assets/images/animations/trees-day-fall.png +0 -0
  95. package/src/assets/images/animations/trees-day-summer.png +0 -0
  96. package/src/assets/images/animations/trees-day-winter.png +0 -0
  97. package/src/assets/images/animations/trees-evening.png +0 -0
  98. package/src/assets/images/animations/trees-morning.png +0 -0
  99. package/src/assets/images/animations/trees-night.png +0 -0
  100. package/src/assets/images/chat-bubble.svg +8 -0
  101. package/src/assets/images/document2.svg +14 -0
  102. package/src/assets/images/index.ts +5 -0
  103. package/src/assets/locales/en/index.json +11 -10
  104. package/src/components/animations/CloudsAnimation.tsx +34 -17
  105. package/src/components/animations/WeatherTrees.tsx +37 -0
  106. package/src/components/animations/index.ts +1 -0
  107. package/src/components/badge/TextBadge.tsx +1 -1
  108. package/src/components/folderPanel/folderDetails/FilesCounter.tsx +6 -21
  109. package/src/components/footers/FooterButtons.tsx +2 -1
  110. package/src/components/forms/BaseCounter.tsx +30 -0
  111. package/src/components/forms/index.ts +1 -0
  112. package/src/components/homeAssistant/HomeAssistantWrapper.tsx +31 -18
  113. package/src/components/inboxTile/InboxForwardBanner.tsx +5 -4
  114. package/src/components/inboxTile/index.ts +1 -0
  115. package/src/components/inboxTile/panel/MessageCard.tsx +112 -0
  116. package/src/components/inboxTile/panel/MessageChatPanel.tsx +105 -0
  117. package/src/components/inboxTile/panel/MessagePanel.tsx +64 -0
  118. package/src/components/inboxTile/panel/index.ts +3 -0
  119. package/src/components/myHomes/WrapperWithShadow.tsx +1 -0
  120. package/src/components/myHomes/steps/MyHomeDetails.tsx +1 -1
  121. package/src/components/notifications/NotificationCard.tsx +2 -106
  122. package/src/components/onboarding/pages/SignIn.tsx +1 -0
  123. package/src/components/rooms/VideosCounter.tsx +2 -18
  124. package/src/hooks/inbox/index.ts +1 -0
  125. package/src/hooks/inbox/useMessagePanel.ts +23 -0
  126. package/src/hooks/index.ts +1 -0
  127. package/src/hooks/notifications/useNotificationsPanel.ts +0 -5
  128. package/src/index.ts +2 -0
  129. package/src/interfaces/appBar/UserProfile.interface.ts +2 -2
  130. package/src/interfaces/footers/FooterButtons.interface.ts +2 -1
  131. package/src/interfaces/forms/BaseCounter.interface.ts +5 -0
  132. package/src/interfaces/forms/index.ts +1 -0
  133. package/src/interfaces/inboxTile/MessageCard.interface.ts +18 -0
  134. package/src/interfaces/inboxTile/MessageChatPanel.interface.ts +13 -0
  135. package/src/interfaces/inboxTile/MessagePanel.interface.ts +7 -0
  136. package/src/interfaces/inboxTile/index.ts +3 -0
  137. package/src/interfaces/notifications/NotificationsPanel.interface.ts +3 -9
  138. package/src/mocks/inbox/index.ts +1 -0
  139. package/src/mocks/inbox/messages.ts +141 -0
  140. package/src/mocks/index.ts +1 -0
  141. package/src/mocks/notifications/notifications.mock.ts +4 -4
  142. package/src/stories/assets/Illustrations.stories.tsx +2 -0
  143. package/src/stories/inboxTile/MessagePanel.stories.tsx +47 -0
  144. package/src/theme/colors.ts +4 -1
  145. package/src/utils/Animations.utils.ts +39 -0
  146. package/src/utils/Avatars.utils.ts +2 -2
  147. package/src/utils/index.ts +1 -0
@@ -0,0 +1,24 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { MessageChatPanel, MessagePanel, RightPanel } from '../../components';
3
+ import { action } from '@storybook/addon-actions';
4
+ import { messagesMock } from '../../mocks';
5
+ import { Fragment, useState } from 'react';
6
+ export default {
7
+ title: 'Components/Inbox',
8
+ component: MessagePanel,
9
+ args: {
10
+ messages: messagesMock,
11
+ },
12
+ decorators: [
13
+ (Story) => (_jsx(RightPanel, { isOpen: true, onClose: action('onClose'), children: _jsx(Story, {}) })),
14
+ ],
15
+ };
16
+ export const MessagePanelComponent = (args) => {
17
+ const [showMessageChat, setShowMessageChat] = useState(false);
18
+ const [selectedMessage, setSelectedMessage] = useState(undefined);
19
+ const handleMessageChatToggle = () => setShowMessageChat(!showMessageChat);
20
+ return (_jsxs(Fragment, { children: [_jsx(MessagePanel, Object.assign({}, args, { onClick: (message) => {
21
+ setSelectedMessage(message);
22
+ handleMessageChatToggle();
23
+ } })), _jsx(RightPanel, { isOpen: showMessageChat, onClose: handleMessageChatToggle, children: _jsx(MessageChatPanel, { message: selectedMessage, onReply: action('onReply'), onClose: action('onCloseChatPanel'), onBack: handleMessageChatToggle }) })] }));
24
+ };
@@ -113,7 +113,10 @@ export declare const colors: {
113
113
  1: string;
114
114
  2: string;
115
115
  };
116
- skyGradient: string;
116
+ dayGradient: string;
117
+ morningGradient: string;
118
+ eveningGradient: string;
119
+ nightGradient: string;
117
120
  overlay: string;
118
121
  overlayWhite: string;
119
122
  };
@@ -113,7 +113,10 @@ export const colors = {
113
113
  1: '#f5ddf4',
114
114
  2: '#F544DA',
115
115
  },
116
- skyGradient: 'linear(to-b, #cff1fc, #F9FEFF)',
116
+ dayGradient: 'linear(to-b, #cff1fc, #F9FEFF)',
117
+ morningGradient: 'linear(to-b, #d2abf1, #f7dcac)',
118
+ eveningGradient: 'linear(to-b, #bcc5f2, #ee91f3)',
119
+ nightGradient: 'linear(to-b, #7a7bcf, #a4b0d7)',
117
120
  overlay: '#00000040',
118
121
  overlayWhite: '#FFFFFF80',
119
122
  };
@@ -0,0 +1,6 @@
1
+ export type TimeOfDay = 'morning' | 'day' | 'evening' | 'night';
2
+ export type Season = 'spring' | 'summer' | 'fall' | 'winter';
3
+ export type TimeOfDaySeason = `${TimeOfDay}-${Season}`;
4
+ export declare const getTimeOfDay: () => TimeOfDay;
5
+ export declare const getSeason: () => Season;
6
+ export declare const getTimeOfDaySeason: () => TimeOfDaySeason;
@@ -0,0 +1,31 @@
1
+ export const getTimeOfDay = () => {
2
+ const currentHour = new Date().getHours();
3
+ switch (true) {
4
+ case currentHour >= 6 && currentHour < 12:
5
+ return 'morning';
6
+ case currentHour >= 12 && currentHour < 18:
7
+ return 'day';
8
+ case currentHour >= 18 && currentHour < 21:
9
+ return 'evening';
10
+ default:
11
+ return 'night';
12
+ }
13
+ };
14
+ export const getSeason = () => {
15
+ const currentMonth = new Date().getMonth();
16
+ switch (true) {
17
+ case currentMonth >= 2 && currentMonth < 5:
18
+ return 'spring';
19
+ case currentMonth >= 5 && currentMonth < 8:
20
+ return 'summer';
21
+ case currentMonth >= 8 && currentMonth < 11:
22
+ return 'fall';
23
+ default:
24
+ return 'winter';
25
+ }
26
+ };
27
+ export const getTimeOfDaySeason = () => {
28
+ const timeOfDay = getTimeOfDay();
29
+ const season = getSeason();
30
+ return `${timeOfDay}-${season}`;
31
+ };
@@ -1 +1 @@
1
- export declare const randomColor: (index: number) => string;
1
+ export declare const randomColor: (index?: number) => string;
@@ -33,7 +33,7 @@ const colors = [
33
33
  '#DE9E35',
34
34
  '#37323E',
35
35
  ];
36
- export const randomColor = (index) => {
36
+ export const randomColor = (index = Math.floor(Math.random() * 30)) => {
37
37
  if (index >= colors.length) {
38
38
  return colors[index % colors.length];
39
39
  }
@@ -1,4 +1,5 @@
1
1
  export * from './AddMedia.utils';
2
+ export * from './Animations.utils';
2
3
  export * from './Avatars.utils';
3
4
  export * from './BrowserDetectors.utils';
4
5
  export * from './BubblesTour.utils';
@@ -1,4 +1,5 @@
1
1
  export * from './AddMedia.utils';
2
+ export * from './Animations.utils';
2
3
  export * from './Avatars.utils';
3
4
  export * from './BrowserDetectors.utils';
4
5
  export * from './BubblesTour.utils';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homefile/components-v2",
3
- "version": "2.3.0",
3
+ "version": "2.4.0",
4
4
  "author": "Homefile",
5
5
  "license": "UNLICENSED",
6
6
  "typings": "dist/index.d.ts",
@@ -0,0 +1,15 @@
1
+ import TreesDay from './trees-day-summer.png'
2
+ import TreesDayFall from './trees-day-fall.png'
3
+ import TreesDayWinter from './trees-day-winter.png'
4
+ import TreesEvening from './trees-evening.png'
5
+ import TreesMorning from './trees-morning.png'
6
+ import TreesNight from './trees-night.png'
7
+
8
+ export {
9
+ TreesDay,
10
+ TreesDayFall,
11
+ TreesDayWinter,
12
+ TreesEvening,
13
+ TreesMorning,
14
+ TreesNight,
15
+ }
@@ -0,0 +1,8 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">
2
+ <g id="Group_21874" data-name="Group 21874" transform="translate(-1764 -254)">
3
+ <g id="Union_41" data-name="Union 41" transform="translate(1764 254)" fill="#fff">
4
+ <path d="M 6.399946212768555 19.02802085876465 L 4.829119682312012 16.40986061096191 L 4.683469772338867 16.16709899902344 L 4.400369644165039 16.16709899902344 L 2.999699831008911 16.16709899902344 C 1.621359825134277 16.16709899902344 0.4999998509883881 15.04533958435059 0.4999998509883881 13.66650009155273 L 0.4999998509883881 2.999699831008911 C 0.4999998509883881 1.621359825134277 1.621359825134277 0.4999998509883881 2.999699831008911 0.4999998509883881 L 17.00009918212891 0.4999998509883881 C 18.37843894958496 0.4999998509883881 19.49979972839355 1.621359825134277 19.49979972839355 2.999699831008911 L 19.49979972839355 13.66650009155273 C 19.49979972839355 15.04533958435059 18.37843894958496 16.16709899902344 17.00009918212891 16.16709899902344 L 8.399879455566406 16.16709899902344 L 8.116809844970703 16.16709899902344 L 7.971149921417236 16.40982055664062 L 6.399946212768555 19.02802085876465 Z" stroke="none"/>
5
+ <path d="M 6.399997234344482 18.05625152587891 L 7.833739757537842 15.66709995269775 L 17.00009918212891 15.66709995269775 C 18.10273933410645 15.66709995269775 18.99979972839355 14.76962947845459 18.99979972839355 13.66650009155273 L 18.99979972839355 2.999699831008911 C 18.99979972839355 1.897059917449951 18.10273933410645 0.9999998807907104 17.00009918212891 0.9999998807907104 L 2.999699831008911 0.9999998807907104 C 1.897059917449951 0.9999998807907104 0.9999998807907104 1.897059917449951 0.9999998807907104 2.999699831008911 L 0.9999998807907104 13.66650009155273 C 0.9999998807907104 14.76962947845459 1.897059917449951 15.66709995269775 2.999699831008911 15.66709995269775 L 4.966569900512695 15.66709995269775 L 6.399997234344482 18.05625152587891 M 6.399899959564209 19.99979972839355 L 4.400369644165039 16.66709899902344 L 2.999699831008911 16.66709899902344 C 1.34279990196228 16.66709899902344 -1.358032193365943e-07 15.32339954376221 -1.358032193365943e-07 13.66650009155273 L -1.358032193365943e-07 2.999699831008911 C -1.358032193365943e-07 1.34279990196228 1.34279990196228 -1.358032193365943e-07 2.999699831008911 -1.358032193365943e-07 L 17.00009918212891 -1.358032193365943e-07 C 18.6569995880127 -1.358032193365943e-07 19.99979972839355 1.34279990196228 19.99979972839355 2.999699831008911 L 19.99979972839355 13.66650009155273 C 19.99979972839355 15.32339954376221 18.6569995880127 16.66709899902344 17.00009918212891 16.66709899902344 L 8.399879455566406 16.66709899902344 L 6.399899959564209 19.99979972839355 Z" stroke="none" fill="#1c7ab4"/>
6
+ </g>
7
+ </g>
8
+ </svg>
@@ -0,0 +1,14 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="20.852" height="21.158" viewBox="0 0 20.852 21.158">
2
+ <g id="Group_21880" data-name="Group 21880" transform="translate(-13.43 -0.001)">
3
+ <path id="Path_17605" data-name="Path 17605" d="M13.43,0V21.158H34.281V3.591L30.028,0Z" transform="translate(0 0)" fill="#d2edef"/>
4
+ <path id="Path_17606" data-name="Path 17606" d="M77.93,0V3.389h3.481Z" transform="translate(-47.13)" fill="#324458"/>
5
+ <path id="Path_17607" data-name="Path 17607" d="M13.43,94.821Z" transform="translate(0 -73.662)" fill="#28b5a8"/>
6
+ <rect id="Rectangle_25619" data-name="Rectangle 25619" width="5.587" height="0.632" transform="translate(15.576 3.073)" fill="#324458"/>
7
+ <rect id="Rectangle_25620" data-name="Rectangle 25620" width="16.429" height="0.632" transform="translate(15.641 7.362)" fill="#324458"/>
8
+ <rect id="Rectangle_25621" data-name="Rectangle 25621" width="16.429" height="0.632" transform="translate(15.641 9.314)" fill="#324458"/>
9
+ <rect id="Rectangle_25622" data-name="Rectangle 25622" width="16.429" height="0.632" transform="translate(15.641 11.268)" fill="#324458"/>
10
+ <rect id="Rectangle_25623" data-name="Rectangle 25623" width="16.429" height="0.632" transform="translate(15.641 13.223)" fill="#324458"/>
11
+ <rect id="Rectangle_25624" data-name="Rectangle 25624" width="16.429" height="0.632" transform="translate(15.641 15.177)" fill="#324458"/>
12
+ <rect id="Rectangle_25625" data-name="Rectangle 25625" width="7.453" height="0.632" transform="translate(15.641 17.328)" fill="#324458"/>
13
+ </g>
14
+ </svg>
@@ -17,6 +17,7 @@ import Building from './building.svg'
17
17
  import Calc from './calc.svg'
18
18
  import Calendar2 from './calendar2.svg'
19
19
  import Catalog from './catalog.svg'
20
+ import ChatBubble from './chat-bubble.svg'
20
21
  import Check from './check.svg'
21
22
  import CheckInCircle from './check-in-circle.svg'
22
23
  import CheckPen from './check-pen.svg'
@@ -39,6 +40,7 @@ import Diamond from './diamond.svg'
39
40
  import DiningRoom from './dining-room.svg'
40
41
  import DocIcon from './doc-icon.svg'
41
42
  import Document from './document.svg'
43
+ import Document2 from './document2.svg'
42
44
  import Drop from './drop.svg'
43
45
  import DropCalendar from './drop-calendar.svg'
44
46
  import Electricity from './electricity.svg'
@@ -176,6 +178,7 @@ export {
176
178
  Calc,
177
179
  Calendar2,
178
180
  Catalog,
181
+ ChatBubble,
179
182
  Check,
180
183
  CheckInCircle,
181
184
  CheckPen,
@@ -198,6 +201,7 @@ export {
198
201
  DiningRoom,
199
202
  DocIcon,
200
203
  Document,
204
+ Document2,
201
205
  Drop,
202
206
  DropCalendar,
203
207
  Electricity,
@@ -317,6 +321,7 @@ export {
317
321
  }
318
322
 
319
323
  export * from './alerts'
324
+ export * from './animations'
320
325
  export * from './appliances'
321
326
  export * from './clouds-animation'
322
327
  export * from './form'
@@ -167,6 +167,10 @@
167
167
  "recipient": "recipient",
168
168
  "title": "Contacts"
169
169
  },
170
+ "counter": {
171
+ "of": "of",
172
+ "showing": "Showing"
173
+ },
170
174
  "daysOfWeek": {
171
175
  "1": "Monday",
172
176
  "2": "Tuesday",
@@ -288,6 +292,7 @@
288
292
  },
289
293
  "forms": {
290
294
  "addAll": "Add All",
295
+ "all": "All",
291
296
  "apartmentNumber": "Apartment, Suite, Unit, Building, Floor, etc.",
292
297
  "city": "City",
293
298
  "companyEmail": "Company email",
@@ -311,6 +316,7 @@
311
316
  "lastName": "Last name",
312
317
  "link": "Link",
313
318
  "message": "Message",
319
+ "new": "New",
314
320
  "moreDetails": "Add Optional Details",
315
321
  "obs": "Additional information",
316
322
  "password": "Password",
@@ -465,7 +471,11 @@
465
471
  "altImage": "image"
466
472
  },
467
473
  "inbox": {
468
- "forwardTo": "To use Receipt Autofiler, simply forward reciepts to "
474
+ "createReply": "Create Reply",
475
+ "enterContent": "Enter content",
476
+ "forwardTo": "To use Receipt Autofiler, simply forward reciepts to ",
477
+ "from": "From: ",
478
+ "message": "Message"
469
479
  },
470
480
  "launchpad": {
471
481
  "menu": {
@@ -628,15 +638,6 @@
628
638
  "shared": "Shared",
629
639
  "updated": "Updated"
630
640
  },
631
- "types": {
632
- "contact": "Contact",
633
- "file": "File",
634
- "folder": "Folder",
635
- "receipt": "Receipt",
636
- "user": "User",
637
- "tile": "Tile",
638
- "payment": "Payment"
639
- },
640
641
  "title": "Notifications"
641
642
  },
642
643
  "partner": {
@@ -1,16 +1,16 @@
1
- import {
2
- Airplane,
3
- Cloud1,
4
- Cloud2,
5
- Cloud3,
6
- TreesCrop,
7
- TreesCrop2,
8
- } from '@/assets/images'
1
+ import { Fragment, PropsWithChildren, useEffect, useState } from 'react'
2
+ import { Airplane, Cloud1, Cloud2, Cloud3 } from '@/assets/images'
9
3
  import { useWindowDimensions } from '@/hooks'
10
4
  import { colors } from '@/theme/colors'
5
+ import {
6
+ TimeOfDay,
7
+ getTimeOfDay,
8
+ TimeOfDaySeason,
9
+ getTimeOfDaySeason,
10
+ } from '@/utils'
11
11
  import { Box, Image } from '@chakra-ui/react'
12
12
  import { keyframes } from '@emotion/react'
13
- import { Fragment, PropsWithChildren } from 'react'
13
+ import { WeatherTrees } from './WeatherTrees'
14
14
 
15
15
  export const moveLeftToRightAirplane = keyframes`
16
16
  0% {
@@ -77,6 +77,22 @@ export const moveRightToLeftWithFade3 = keyframes`
77
77
  }
78
78
  `
79
79
  export const CloudsAnimation = ({ children }: PropsWithChildren<{}>) => {
80
+ const [timeOfDay, setTimeOfDay] = useState<TimeOfDay>(getTimeOfDay())
81
+ const timeOfDaySeason = getTimeOfDaySeason()
82
+ const gradients: Record<TimeOfDay, string> = {
83
+ day: colors.dayGradient,
84
+ evening: colors.eveningGradient,
85
+ morning: colors.morningGradient,
86
+ night: colors.nightGradient,
87
+ }
88
+
89
+ useEffect(() => {
90
+ const interval = setInterval(() => {
91
+ setTimeOfDay(getTimeOfDay())
92
+ }, 60000)
93
+
94
+ return () => clearInterval(interval)
95
+ }, [])
80
96
  const {
81
97
  windowDimensions: { width },
82
98
  } = useWindowDimensions()
@@ -88,7 +104,7 @@ export const CloudsAnimation = ({ children }: PropsWithChildren<{}>) => {
88
104
  minH="100vh"
89
105
  w="full"
90
106
  position="relative"
91
- bgGradient={colors.skyGradient}
107
+ bgGradient={gradients[timeOfDay]}
92
108
  overflowX="hidden"
93
109
  overflowY="scroll"
94
110
  >
@@ -156,22 +172,23 @@ export const CloudsAnimation = ({ children }: PropsWithChildren<{}>) => {
156
172
  animation={`${moveLeftToRightAirplane} 500s cubic-bezier(1, 1, 1, 500) infinite`}
157
173
  zIndex="1"
158
174
  />
159
- <Image
160
- src={TreesCrop}
175
+ <WeatherTrees
176
+ timeOfDaySeason={timeOfDaySeason}
161
177
  position="fixed"
162
178
  bottom="0"
163
- right="2"
179
+ right="0"
164
180
  w="auto"
165
- h="80px"
181
+ h="100px"
166
182
  zIndex="1"
167
183
  />
168
- <Image
169
- src={TreesCrop2}
184
+ <WeatherTrees
185
+ timeOfDaySeason={timeOfDaySeason}
170
186
  position="fixed"
171
187
  bottom="0"
172
188
  left="2"
173
189
  w="auto"
174
- h="80px"
190
+ transform="rotateY(180deg)"
191
+ h="100px"
175
192
  zIndex="1"
176
193
  />
177
194
  </Box>
@@ -0,0 +1,37 @@
1
+ import {
2
+ TreesDay,
3
+ TreesDayFall,
4
+ TreesDayWinter,
5
+ TreesEvening,
6
+ TreesMorning,
7
+ TreesNight,
8
+ } from '@/assets/images'
9
+ import { TimeOfDaySeason } from '@/utils'
10
+ import { Image, ImageProps } from '@chakra-ui/react'
11
+
12
+ export interface WeatherTreesI extends ImageProps {
13
+ timeOfDaySeason: TimeOfDaySeason
14
+ }
15
+
16
+ export const WeatherTrees = ({ timeOfDaySeason, ...props }: WeatherTreesI) => {
17
+ const images: Record<TimeOfDaySeason, string> = {
18
+ 'day-summer': TreesDay,
19
+ 'day-fall': TreesDayFall,
20
+ 'day-winter': TreesDayWinter,
21
+ 'day-spring': TreesDay,
22
+ 'evening-summer': TreesEvening,
23
+ 'evening-fall': TreesEvening,
24
+ 'evening-winter': TreesDayWinter,
25
+ 'evening-spring': TreesEvening,
26
+ 'morning-summer': TreesMorning,
27
+ 'morning-fall': TreesMorning,
28
+ 'morning-winter': TreesDayWinter,
29
+ 'morning-spring': TreesMorning,
30
+ 'night-summer': TreesNight,
31
+ 'night-fall': TreesNight,
32
+ 'night-winter': TreesDayWinter,
33
+ 'night-spring': TreesNight,
34
+ }
35
+
36
+ return <Image {...props} src={images[timeOfDaySeason]} alt="trees" />
37
+ }
@@ -1,2 +1,3 @@
1
1
  export * from './CloudsAnimation'
2
2
  export * from './HomieAnimation'
3
+ export * from './WeatherTrees'
@@ -19,7 +19,7 @@ export const TextBadge = ({
19
19
  py="0.1rem"
20
20
  px="0.5rem"
21
21
  _hover={{
22
- width,
22
+ width: showAnimation ? width : 'fit-content',
23
23
  }}
24
24
  transition="all 0.2s ease-in-out"
25
25
  >
@@ -1,9 +1,7 @@
1
1
  import { t } from 'i18next'
2
- import { Box, Flex, Text, chakra } from '@chakra-ui/react'
3
- import { BeatLoader } from 'react-spinners'
4
- import { colors } from '@/theme/colors'
5
2
  import { FilesCounterI } from '@/interfaces'
6
3
  import { pluralize } from '@/utils'
4
+ import { BaseCounter } from '@/components'
7
5
 
8
6
  export const FilesCounter = ({
9
7
  totalFiles,
@@ -22,23 +20,10 @@ export const FilesCounter = ({
22
20
  )} ${totalFiles} ${files}`
23
21
 
24
22
  return (
25
- <Box w="100%">
26
- <Flex justify="space-between" align="center">
27
- {!uploading && (
28
- <Text variant="home">{totalFiles > 1 ? moreThanOne : one}</Text>
29
- )}
30
- {uploading && (
31
- <Text variant="home">
32
- <chakra.span fontWeight="bold">
33
- {t('folderSharing.uploading')}
34
- </chakra.span>
35
- {` ${uploadingFiles} ${files}`}
36
- <chakra.span ml="2">
37
- <BeatLoader size="4px" color={colors.blue[6]} />
38
- </chakra.span>
39
- </Text>
40
- )}
41
- </Flex>
42
- </Box>
23
+ <BaseCounter
24
+ text={totalFiles > 1 ? moreThanOne : one}
25
+ uploading={uploading}
26
+ uploadingText={` ${uploadingFiles ?? ''} ${files}`}
27
+ />
43
28
  )
44
29
  }
@@ -5,9 +5,10 @@ export const FooterButtons = ({
5
5
  button1,
6
6
  button2,
7
7
  button3,
8
+ px = 'base',
8
9
  }: FooterButtonsI) => {
9
10
  return (
10
- <Flex align="center" justifyContent="space-between" w="full" px="base">
11
+ <Flex align="center" justifyContent="space-between" w="full" px={px}>
11
12
  <Flex align="center" gap="2">
12
13
  {button1 ? (
13
14
  <Button
@@ -0,0 +1,30 @@
1
+ import { t } from 'i18next'
2
+ import { Box, chakra, Flex, Text } from '@chakra-ui/react'
3
+ import { BeatLoader } from 'react-spinners'
4
+ import { colors } from '@/theme/colors'
5
+ import { BaseCounterI } from '@/interfaces'
6
+
7
+ export const BaseCounter = ({
8
+ text,
9
+ uploading,
10
+ uploadingText,
11
+ }: BaseCounterI) => {
12
+ return (
13
+ <Box w="100%">
14
+ <Flex justify="space-between" align="center">
15
+ {!uploading && <Text variant="home">{text}</Text>}
16
+ {uploading && (
17
+ <Text variant="home">
18
+ <chakra.span fontWeight="bold">
19
+ {t('folderSharing.uploading')}
20
+ </chakra.span>
21
+ {uploadingText}
22
+ <chakra.span ml="2">
23
+ <BeatLoader size="4px" color={colors.blue[6]} />
24
+ </chakra.span>
25
+ </Text>
26
+ )}
27
+ </Flex>
28
+ </Box>
29
+ )
30
+ }
@@ -2,5 +2,6 @@ export * from './dynamicForm'
2
2
  export * from './readOnly'
3
3
  export * from './Address'
4
4
  export * from './AddressStored'
5
+ export * from './BaseCounter'
5
6
  export * from './Collapsible'
6
7
  export * from './EditItemName'
@@ -1,45 +1,59 @@
1
- import { PropsWithChildren } from 'react'
2
- import { t } from 'i18next'
3
- import { Box, Center, GridItem, Image } from '@chakra-ui/react'
1
+ import { PropsWithChildren, useEffect, useState } from 'react'
2
+ import { Box, GridItem, Image } from '@chakra-ui/react'
4
3
  import {
5
4
  ContainerHeader,
6
5
  TileTooltip,
7
6
  moveRightToLeftWithFade,
8
7
  moveRightToLeft,
9
8
  moveLeftToRightAirplane,
9
+ WeatherTrees,
10
10
  } from '@/components'
11
+ import { Airplane, Cloud1, Cloud2, Cloud3, IA } from '@/assets/images'
11
12
  import {
12
- Airplane,
13
- Cloud1,
14
- Cloud2,
15
- Cloud3,
16
- IA,
17
- TreesCrop,
18
- } from '@/assets/images'
19
- import { getImageAltText } from '@/utils'
13
+ getTimeOfDay,
14
+ getTimeOfDaySeason,
15
+ TimeOfDay,
16
+ TimeOfDaySeason,
17
+ } from '@/utils'
20
18
  import { colors } from '@/theme/colors'
21
19
 
22
20
  export const HomeAssistantWrapper = ({
23
21
  children,
24
22
  showAirplane,
25
23
  title,
26
- zIndex
24
+ zIndex,
27
25
  }: PropsWithChildren<{
28
26
  showAirplane?: boolean
29
27
  title: string
30
28
  zIndex?: string
31
29
  }>) => {
32
- const treesAlt = getImageAltText(TreesCrop)
30
+ const [timeOfDay, setTimeOfDay] = useState<TimeOfDay>(getTimeOfDay())
31
+ const timeOfDaySeason = getTimeOfDaySeason()
32
+ const gradients: Record<TimeOfDay, string> = {
33
+ day: colors.dayGradient,
34
+ evening: colors.eveningGradient,
35
+ morning: colors.morningGradient,
36
+ night: colors.nightGradient,
37
+ }
38
+
39
+ useEffect(() => {
40
+ const interval = setInterval(() => {
41
+ setTimeOfDay(getTimeOfDay())
42
+ }, 60000)
43
+
44
+ return () => clearInterval(interval)
45
+ }, [])
33
46
 
34
47
  return (
35
48
  <GridItem colSpan={[1, 2]} zIndex={zIndex}>
36
49
  <TileTooltip label="homeAssistant">
37
50
  <Box
38
- bgGradient={colors.skyGradient}
51
+ bgGradient={gradients[timeOfDay]}
39
52
  boxShadow="base"
40
53
  h="full"
41
54
  position="relative"
42
55
  overflow="hidden"
56
+ transition="background 1s ease-in-out"
43
57
  >
44
58
  <ContainerHeader title={title} titleIcon={IA} />
45
59
  <>{children}</>
@@ -77,14 +91,13 @@ export const HomeAssistantWrapper = ({
77
91
  animation={`${moveLeftToRightAirplane} 500s cubic-bezier(1, 1, 1, 500) infinite`}
78
92
  />
79
93
  )}
80
- <Image
81
- src={TreesCrop}
82
- alt={treesAlt}
94
+ <WeatherTrees
95
+ timeOfDaySeason={timeOfDaySeason}
83
96
  position="absolute"
84
97
  bottom="0"
85
98
  right="2"
86
99
  w="auto"
87
- h="70px"
100
+ h="100px"
88
101
  />
89
102
  </Box>
90
103
  </TileTooltip>
@@ -1,5 +1,5 @@
1
1
  import { t } from 'i18next'
2
- import { AspectRatio, Flex, Text, Image } from '@chakra-ui/react'
2
+ import { AspectRatio, Flex, Text, Image, chakra } from '@chakra-ui/react'
3
3
  import { IA } from '@/assets/images'
4
4
 
5
5
  export const InboxForwardBanner = () => {
@@ -11,15 +11,16 @@ export const InboxForwardBanner = () => {
11
11
 
12
12
  <Text variant="home" lineHeight="1">
13
13
  {t('inbox.forwardTo')}
14
- <Text
15
- variant="home"
14
+ <chakra.span
15
+ fontFamily="secondary"
16
+ fontSize="sm"
16
17
  lineHeight="1"
17
18
  color="neutral.black"
18
19
  fontWeight="bold"
19
20
  display="inline"
20
21
  >
21
22
  homefileit@homefile.com.
22
- </Text>
23
+ </chakra.span>
23
24
  </Text>
24
25
  </Flex>
25
26
  )
@@ -1,3 +1,4 @@
1
+ export * from './panel'
1
2
  export * from './InboxCard'
2
3
  export * from './InboxForwardBanner'
3
4
  export * from './InboxTile'