@tactics/toddle-styleguide 1.2.1 → 1.2.3

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 (236) hide show
  1. package/App.d.ts +0 -1
  2. package/App.tsx +15 -7
  3. package/index.d.ts +3 -2
  4. package/index.tsx +4 -2
  5. package/package.json +30 -26
  6. package/src/components/atoms/animated-wave/animated-wave.component.d.ts +0 -1
  7. package/src/components/atoms/backdrop/backdrop.component.d.ts +0 -1
  8. package/src/components/atoms/background-gradient/background-gradient.component.d.ts +0 -1
  9. package/src/components/atoms/background-gradient/background-gradient.preview.d.ts +0 -1
  10. package/src/components/atoms/calendar/__snapshots__/calendar.test.js.snap +234 -234
  11. package/src/components/atoms/calendar/calendar.component.d.ts +0 -1
  12. package/src/components/atoms/calendar/calendar.component.tsx +8 -6
  13. package/src/components/atoms/calendar/calendar.preview.d.ts +0 -1
  14. package/src/components/atoms/check-switch/check-switch.component.d.ts +0 -1
  15. package/src/components/atoms/check-switch/check-switch.preview.d.ts +0 -1
  16. package/src/components/atoms/footer/footer.preview.d.ts +0 -1
  17. package/src/components/atoms/footer/footer.preview.tsx +0 -3
  18. package/src/components/atoms/heading-components/all-caps-heading/all-caps-heading.component.d.ts +0 -1
  19. package/src/components/atoms/heading-components/heading1/heading1.component.d.ts +0 -1
  20. package/src/components/atoms/heading-components/heading2/heading2.component.d.ts +0 -1
  21. package/src/components/atoms/heading-components/heading3/heading3.component.d.ts +0 -1
  22. package/src/components/atoms/heading-components/heading4/heading4.component.d.ts +0 -1
  23. package/src/components/atoms/heading-components/headings.preview.d.ts +0 -1
  24. package/src/components/atoms/image-bubble/image-bubble.component.d.ts +0 -1
  25. package/src/components/atoms/image-bubble/image-bubble.preview.d.ts +0 -1
  26. package/src/components/atoms/increment-input/increment-input.component.d.ts +0 -1
  27. package/src/components/atoms/increment-input/increment-input.preview.d.ts +0 -1
  28. package/src/components/atoms/logo/logo.component.d.ts +0 -1
  29. package/src/components/atoms/logo/logo.preview.d.ts +0 -1
  30. package/src/components/atoms/paragraph-components/paragraph/paragraph.component.d.ts +0 -1
  31. package/src/components/atoms/paragraph-components/paragraph-components.preview.d.ts +0 -1
  32. package/src/components/atoms/paragraph-components/small-text/small-text.component.d.ts +0 -1
  33. package/src/components/atoms/paragraph-components/tiny-text/tiny-text.component.d.ts +0 -1
  34. package/src/components/atoms/split-container/split-container.preview.d.ts +0 -1
  35. package/src/components/atoms/static-wave/static-wave.component.d.ts +0 -1
  36. package/src/components/atoms/text-input/text-input.component.d.ts +0 -1
  37. package/src/components/atoms/text-input/text-input.preview.d.ts +0 -1
  38. package/src/components/molecules/avatar/avatar.component.d.ts +0 -1
  39. package/src/components/molecules/avatar/avatar.preview.d.ts +0 -1
  40. package/src/components/molecules/blocked-message/blocked-message.component.d.ts +0 -1
  41. package/src/components/molecules/blocked-message/blocked-message.preview.d.ts +0 -1
  42. package/src/components/molecules/button/button.component.d.ts +0 -1
  43. package/src/components/molecules/button/button.preview.d.ts +0 -1
  44. package/src/components/molecules/calendar-select/calendar-select.component.d.ts +2 -3
  45. package/src/components/molecules/calendar-select/calendar-select.component.tsx +4 -14
  46. package/src/components/molecules/calendar-select/calendar-select.preview.d.ts +0 -1
  47. package/src/components/molecules/calendar-select/calendar-select.preview.tsx +9 -22
  48. package/src/components/molecules/cancel-link/cancel-link.component.d.ts +0 -1
  49. package/src/components/molecules/cancel-link/cancel-link.preview.d.ts +0 -1
  50. package/src/components/molecules/checkbox/checkbox.component.d.ts +0 -1
  51. package/src/components/molecules/checkbox/checkbox.preview.d.ts +0 -1
  52. package/src/components/molecules/contact-role/contact-role.component.d.ts +0 -1
  53. package/src/components/molecules/contact-role/contact-role.preview.d.ts +0 -1
  54. package/src/components/molecules/date-input/date-input.component.d.ts +0 -1
  55. package/src/components/molecules/date-input/date-input.preview.d.ts +0 -1
  56. package/src/components/molecules/day/day.component.d.ts +0 -1
  57. package/src/components/molecules/default-select/default-select.component.d.ts +0 -1
  58. package/src/components/molecules/default-select/default-select.preview.d.ts +0 -1
  59. package/src/components/molecules/department_logo/department-logo.component.d.ts +0 -1
  60. package/src/components/molecules/department_logo/department-logo.preview.d.ts +0 -1
  61. package/src/components/molecules/failed-to-send/failed-bubble.component.d.ts +0 -1
  62. package/src/components/molecules/filter-range/filter-range.component.d.ts +0 -1
  63. package/src/components/molecules/filter-range/filter-range.preview.d.ts +0 -1
  64. package/src/components/molecules/filter-tab/filter-tab.component.d.ts +0 -1
  65. package/src/components/molecules/filter-tab/filter-tab.preview.d.ts +0 -1
  66. package/src/components/molecules/info/info.component.d.ts +0 -1
  67. package/src/components/molecules/info/info.preview.d.ts +0 -1
  68. package/src/components/molecules/language-button/language-button.component.d.ts +0 -1
  69. package/src/components/molecules/language-button/language-button.preview.d.ts +0 -1
  70. package/src/components/molecules/message-input/message-input.component.d.ts +0 -1
  71. package/src/components/molecules/message-input/message-input.preview.d.ts +0 -1
  72. package/src/components/molecules/more-info-button/more-info-button.component.d.ts +0 -1
  73. package/src/components/molecules/more-info-button/more-info-button.preview.d.ts +0 -1
  74. package/src/components/molecules/password-input/password-input.component.d.ts +0 -1
  75. package/src/components/molecules/password-input/password-input.preview.d.ts +0 -1
  76. package/src/components/molecules/pill/pill.component.d.ts +0 -1
  77. package/src/components/molecules/pill/pill.preview.d.ts +0 -1
  78. package/src/components/molecules/pressable-icon/pressable-icon.preview.d.ts +0 -1
  79. package/src/components/molecules/quick-filter/quick-filter.component.d.ts +0 -1
  80. package/src/components/molecules/quick-filter/quick-filter.preview.d.ts +0 -1
  81. package/src/components/molecules/search-input/search.component.d.ts +0 -1
  82. package/src/components/molecules/search-input/search.preview.d.ts +0 -1
  83. package/src/components/molecules/select-link/select-link.component.d.ts +0 -1
  84. package/src/components/molecules/select-link/select-link.preview.d.ts +0 -1
  85. package/src/components/molecules/select-list-item/select-list-item-preview.d.ts +0 -1
  86. package/src/components/molecules/select-picker/select-picker.component.d.ts +0 -1
  87. package/src/components/molecules/select-picker/select-picker.preview.d.ts +0 -1
  88. package/src/components/molecules/send-bubble/send-text-bubble.component.d.ts +0 -1
  89. package/src/components/molecules/snackbar/snackbar.component.d.ts +0 -1
  90. package/src/components/molecules/snackbar/snackbar.preview.d.ts +0 -1
  91. package/src/components/molecules/swipe/swipe.preview.d.ts +0 -1
  92. package/src/components/molecules/tag/tag.component.d.ts +0 -1
  93. package/src/components/molecules/tag/tag.preview.d.ts +0 -1
  94. package/src/components/molecules/time-picker/__snapshots__/time-picker.test.js.snap +2149 -0
  95. package/src/components/molecules/time-picker/time-picker.component.d.ts +8 -0
  96. package/src/components/molecules/time-picker/time-picker.component.tsx +65 -0
  97. package/src/components/molecules/time-picker/time-picker.preview.d.ts +1 -0
  98. package/src/components/molecules/time-picker/time-picker.preview.tsx +109 -0
  99. package/src/components/molecules/time-picker/time-picker.styles.d.ts +15 -0
  100. package/src/components/molecules/time-picker/time-picker.styles.js +19 -0
  101. package/src/components/molecules/time-picker/time-picker.test.js +18 -0
  102. package/src/components/molecules/time-tracker/time-tracker.component.d.ts +0 -1
  103. package/src/components/molecules/time-tracker/time-tracker.preview.d.ts +0 -1
  104. package/src/components/molecules/time-tracker/time-tracker.test.js +0 -1
  105. package/src/components/molecules/timeline/__snapshots__/timeline.test.js.snap +47 -39
  106. package/src/components/molecules/timeline/timeline.component.d.ts +2 -3
  107. package/src/components/molecules/timeline/timeline.component.tsx +27 -120
  108. package/src/components/molecules/timeline/timeline.preview.d.ts +0 -1
  109. package/src/components/molecules/timeline/timeline.preview.tsx +9 -20
  110. package/src/components/molecules/timeline/timeline.styles.d.ts +58 -40
  111. package/src/components/molecules/timeline/timeline.styles.js +24 -17
  112. package/src/components/molecules/timeline/timeline.test.js +3 -3
  113. package/src/components/molecules/timestamp/timestamp.component.d.ts +0 -1
  114. package/src/components/molecules/wave-background/wave.component.d.ts +0 -1
  115. package/src/components/molecules/wave-background/wave.preview.d.ts +0 -1
  116. package/src/components/molecules/wide-button/wide-button.component.d.ts +0 -1
  117. package/src/components/molecules/wide-button/wide-button.preview.d.ts +0 -1
  118. package/src/components/organisms/child-list-item/child-list-item.preview.d.ts +0 -1
  119. package/src/components/organisms/contact-item/contact-item.component.d.ts +0 -1
  120. package/src/components/organisms/contact-item/contact-item.preview.d.ts +0 -1
  121. package/src/components/organisms/day-select/day-select.component.d.ts +0 -1
  122. package/src/components/organisms/day-select/day-select.preview.d.ts +0 -1
  123. package/src/components/organisms/loading-indicator/container.component.d.ts +0 -1
  124. package/src/components/organisms/loading-indicator/dot.component.d.ts +0 -1
  125. package/src/components/organisms/loading-indicator/loading-indicator.component.d.ts +0 -1
  126. package/src/components/organisms/loading-indicator/loading-indicator.preview.d.ts +0 -1
  127. package/src/components/organisms/my-child-list-item/my-child-list-item.component.d.ts +0 -1
  128. package/src/components/organisms/my-child-list-item/my-child-list-item.preview.d.ts +0 -1
  129. package/src/components/organisms/person-info-card/person-info-card.component.d.ts +0 -1
  130. package/src/components/organisms/person-info-card/person-info-card.preview.d.ts +0 -1
  131. package/src/components/organisms/text-bubble/text-bubble.component.d.ts +0 -1
  132. package/src/components/organisms/text-bubble/text-bubble.preview.d.ts +0 -1
  133. package/src/components/templates/modal/components/fade-panel.component.d.ts +2 -1
  134. package/src/components/templates/modal/components/fade-panel.component.tsx +8 -2
  135. package/src/components/templates/modal/modal.component.d.ts +2 -1
  136. package/src/components/templates/modal/modal.component.tsx +4 -3
  137. package/src/components/templates/modal/modal.preview.d.ts +0 -1
  138. package/src/components/templates/modal/modal.styles.d.ts +3 -6
  139. package/src/components/templates/modal/modal.styles.js +3 -3
  140. package/src/components/templates/popover/components/modal/close/close.component.d.ts +0 -1
  141. package/src/components/templates/popover/components/modal/heading/heading.component.d.ts +0 -1
  142. package/src/components/templates/popover/components/modal/modal.component.tsx +0 -2
  143. package/src/components/templates/popover/popover.preview.d.ts +0 -1
  144. package/src/gradients/main/main.gradient.d.ts +0 -1
  145. package/src/icons/index.d.ts +0 -1
  146. package/src/icons/outline/calendar/calendar.icon.d.ts +0 -1
  147. package/src/icons/outline/chat/chat.icon.d.ts +0 -1
  148. package/src/icons/outline/chat-alt/chat-alt.icon.d.ts +0 -1
  149. package/src/icons/outline/check-circle/check-circle.icon.d.ts +0 -1
  150. package/src/icons/outline/chevron-left/chevron-left.icon.d.ts +0 -1
  151. package/src/icons/outline/chevron-right/chevron-right.icon.d.ts +0 -1
  152. package/src/icons/outline/clock/clock.icon.d.ts +0 -1
  153. package/src/icons/outline/cloud-download/cloud-download.icon.d.ts +0 -1
  154. package/src/icons/outline/currency-euro/currency-euro.icon.d.ts +0 -1
  155. package/src/icons/outline/document-text/document-text.icon.d.ts +0 -1
  156. package/src/icons/outline/exclamation/exclamation.icon.d.ts +0 -1
  157. package/src/icons/outline/exclamation-circle/exclamation-circle.icon.d.ts +0 -1
  158. package/src/icons/outline/eye/eye.icon.d.ts +0 -1
  159. package/src/icons/outline/eye-off/eye-off.icon.d.ts +0 -1
  160. package/src/icons/outline/filter/filter.icon.d.ts +0 -1
  161. package/src/icons/outline/information-circle/information-circle.icon.d.ts +0 -1
  162. package/src/icons/outline/logout/logout.icon.d.ts +0 -1
  163. package/src/icons/outline/mail/mail.icon.d.ts +0 -1
  164. package/src/icons/outline/mail-open/mail-open.icon.d.ts +0 -1
  165. package/src/icons/outline/menu/menu.icon.d.ts +0 -1
  166. package/src/icons/outline/minus-sm/minus-sm.icon.d.ts +0 -1
  167. package/src/icons/outline/office-building/office-building.icon.d.ts +0 -1
  168. package/src/icons/outline/outline-default.preview.d.ts +0 -1
  169. package/src/icons/outline/outline-grey.preview.d.ts +0 -1
  170. package/src/icons/outline/outline-white.preview.d.ts +0 -1
  171. package/src/icons/outline/outline.d.ts +0 -1
  172. package/src/icons/outline/paper-airplane/paper-airplane.icon.d.ts +0 -1
  173. package/src/icons/outline/paperclip/paperclip.icon.d.ts +0 -1
  174. package/src/icons/outline/pencil/pencil.icon.d.ts +0 -1
  175. package/src/icons/outline/phone/phone.icon.d.ts +0 -1
  176. package/src/icons/outline/plus/plus.icon.d.ts +0 -1
  177. package/src/icons/outline/plus-sm/plus-sm.icon.d.ts +0 -1
  178. package/src/icons/outline/qrcode/qrcode.icon.d.ts +0 -1
  179. package/src/icons/outline/refresh/refresh.icon.d.ts +0 -1
  180. package/src/icons/outline/search/search.icon.d.ts +0 -1
  181. package/src/icons/outline/selector/selector.icon.d.ts +0 -1
  182. package/src/icons/outline/sm-view-grid-add/sm-view-grid-add.icon.d.ts +0 -1
  183. package/src/icons/outline/status-online/status-online.icon.d.ts +0 -1
  184. package/src/icons/outline/thumb-up/thumb-up.icon.d.ts +0 -1
  185. package/src/icons/outline/trash/trash.icon.d.ts +0 -1
  186. package/src/icons/outline/user/user.icon.d.ts +0 -1
  187. package/src/icons/outline/user-group/user-group.icon.d.ts +0 -1
  188. package/src/icons/outline/users/users.icon.d.ts +0 -1
  189. package/src/icons/outline/xmark/xmark.icon.d.ts +0 -1
  190. package/src/icons/solid/calendar/calendar.icon.d.ts +0 -1
  191. package/src/icons/solid/chat/chat.icon.d.ts +0 -1
  192. package/src/icons/solid/chat-alt/chat-alt-solid.icon.d.ts +0 -1
  193. package/src/icons/solid/check-circle/check-circle.icon.d.ts +0 -1
  194. package/src/icons/solid/chevron-left/chevron-left.icon.d.ts +0 -1
  195. package/src/icons/solid/chevron-right/chevron-right.icon.d.ts +0 -1
  196. package/src/icons/solid/clock/clock-solid.icon.d.ts +0 -1
  197. package/src/icons/solid/cloud-download/cloud-download.icon.d.ts +0 -1
  198. package/src/icons/solid/currency-euro/currency-euro.icon.d.ts +0 -1
  199. package/src/icons/solid/document-text/document-text-solid.icon.d.ts +0 -1
  200. package/src/icons/solid/exclamation/exclamation.icon.d.ts +0 -1
  201. package/src/icons/solid/exclamation-circle/exclamation-circle.icon.d.ts +0 -1
  202. package/src/icons/solid/eye/eye.icon.d.ts +0 -1
  203. package/src/icons/solid/eye-off/eye-off.icon.d.ts +0 -1
  204. package/src/icons/solid/filter/filter.icon.d.ts +0 -1
  205. package/src/icons/solid/information-circle/information-circle-solid.icon.d.ts +0 -1
  206. package/src/icons/solid/logout/logout.icon.d.ts +0 -1
  207. package/src/icons/solid/mail/mail.icon.d.ts +0 -1
  208. package/src/icons/solid/mail-open/mail-open.icon.d.ts +0 -1
  209. package/src/icons/solid/menu/menu.icon.d.ts +0 -1
  210. package/src/icons/solid/minus-sm/minus-sm.icon.d.ts +0 -1
  211. package/src/icons/solid/office-building/office-building.icon.d.ts +0 -1
  212. package/src/icons/solid/paper-airplane/paper-airplane.icon.d.ts +0 -1
  213. package/src/icons/solid/paperclip/paperclip.icon.d.ts +0 -1
  214. package/src/icons/solid/pencil/pencil-solid.icon.d.ts +0 -1
  215. package/src/icons/solid/phone/phone-solid.icon.d.ts +0 -1
  216. package/src/icons/solid/plus/plus.icon.d.ts +0 -1
  217. package/src/icons/solid/plus-sm/plus-sm.icon.d.ts +0 -1
  218. package/src/icons/solid/qrcode/qrcode.icon.d.ts +0 -1
  219. package/src/icons/solid/refresh/refresh-solid.icon.d.ts +0 -1
  220. package/src/icons/solid/search/search.icon.d.ts +0 -1
  221. package/src/icons/solid/selector/selector.icon.d.ts +0 -1
  222. package/src/icons/solid/sm-view-grid-add/sm-view-grid-add.icon.d.ts +0 -1
  223. package/src/icons/solid/solid.d.ts +0 -1
  224. package/src/icons/solid/solid.preview.d.ts +0 -1
  225. package/src/icons/solid/status-online/status-online-solid.icon.d.ts +0 -1
  226. package/src/icons/solid/thumb-up/thumb-up.icon.d.ts +0 -1
  227. package/src/icons/solid/trash/trash-solid.icon.d.ts +0 -1
  228. package/src/icons/solid/user/user.icon.d.ts +0 -1
  229. package/src/icons/solid/user-group/user-group.icon.d.ts +0 -1
  230. package/src/icons/solid/users/users-solid.icon.d.ts +0 -1
  231. package/src/icons/solid/xmark/xmark.icon.d.ts +0 -1
  232. package/src/theme/provider/parent.theme.d.ts +4 -1
  233. package/src/theme/provider/parent.theme.ts +4 -1
  234. package/src/utilities/toddle-datetime/toddle-datetime.class.d.ts +2 -2
  235. package/src/utilities/toddle-datetime/toddle-datetime.class.tsx +2 -2
  236. package/src/utilities/toddle-datetime/toddle-datetime.preview.d.ts +0 -1
@@ -1,43 +1,61 @@
1
1
  export function Stylesheet(
2
2
  context: any,
3
3
  startingPosition: any,
4
- width: any,
5
- checkOut: any
6
- ): {
7
- container: {
8
- width: string;
9
- };
10
- lineContainer: {
11
- height: number;
12
- borderRadius: number;
13
- backgroundColor: any;
14
- };
15
- checkInLine: {
16
- height: number;
17
- borderRadius: number;
18
- left: string;
19
- };
20
- checkInWidth: {
21
- width: string;
22
- };
23
- checkOutWidth: {
24
- width: string;
25
- };
26
- checkInOutTextContainer: {
27
- marginTop: number;
28
- marginLeft: string;
29
- fontFamily: string;
30
- fontSize: number;
31
- lineHeight: number;
32
- width: string;
33
- flexDirection: 'row';
34
- justifyContent: 'space-between';
35
- height: number;
36
- };
37
- checkInTime: {
38
- right: number;
39
- };
40
- checkOutTime: {
41
- left: number;
42
- };
43
- };
4
+ width: any
5
+ ):
6
+ | StyleSheet.NamedStyles<any>
7
+ | StyleSheet.NamedStyles<{
8
+ container: {
9
+ width: string;
10
+ marginTop: number;
11
+ marginBottom: number;
12
+ };
13
+ lineContainer: {
14
+ height: number;
15
+ borderRadius: number;
16
+ backgroundColor: any;
17
+ overflow: 'hidden';
18
+ };
19
+ checkInLine: {
20
+ height: number;
21
+ width: string;
22
+ borderRadius: number;
23
+ left: string;
24
+ };
25
+ checkInOutTextContainer: (
26
+ | {
27
+ width: string;
28
+ flexDirection: string;
29
+ height: number;
30
+ marginTop: number;
31
+ marginLeft?: undefined;
32
+ justifyContent?: undefined;
33
+ alignSelf?: undefined;
34
+ }
35
+ | {
36
+ marginLeft: string;
37
+ justifyContent: string;
38
+ width?: undefined;
39
+ flexDirection?: undefined;
40
+ height?: undefined;
41
+ marginTop?: undefined;
42
+ alignSelf?: undefined;
43
+ }
44
+ | {
45
+ alignSelf: string;
46
+ justifyContent: string;
47
+ width: string;
48
+ flexDirection?: undefined;
49
+ height?: undefined;
50
+ marginTop?: undefined;
51
+ marginLeft?: undefined;
52
+ }
53
+ )[];
54
+ checkInTime: {
55
+ right: number;
56
+ };
57
+ checkOutTime: {
58
+ left: number;
59
+ };
60
+ }>;
61
+ import {StyleSheet} from 'react-native/Libraries/StyleSheet/StyleSheet';
@@ -1,39 +1,46 @@
1
1
  import {StyleSheet} from 'react-native';
2
2
  import {Scale} from '../../../theme/scale';
3
3
 
4
- export const Stylesheet = (context, startingPosition, width, checkOut) =>
4
+ export const Stylesheet = (context, startingPosition, width) =>
5
5
  StyleSheet.create({
6
6
  container: {
7
7
  width: '100%',
8
+ marginTop: Scale.xs,
9
+ marginBottom: Scale.xs,
8
10
  },
9
11
  lineContainer: {
10
12
  height: Scale.xs,
11
13
  borderRadius: 50,
12
14
  backgroundColor: context.colors.ui.lightgrey,
15
+ overflow: 'hidden',
13
16
  },
14
17
  checkInLine: {
15
18
  height: Scale.xs,
19
+ width: width.toString() + '%',
16
20
  borderRadius: 50,
17
21
  left: startingPosition.toString() + '%',
18
22
  },
19
- checkInWidth: {
20
- width: '35%',
21
- },
22
- checkOutWidth: {
23
- width: width.toString() + '%',
24
- },
25
- checkInOutTextContainer: {
26
- width: checkOut ? width.toString() + '%' : '35%',
27
- flexDirection: 'row',
28
- justifyContent: 'space-between',
29
- height: Scale.l,
30
- marginTop: Scale.xs,
31
- marginLeft: startingPosition.toString() + '%',
32
- },
23
+ checkInOutTextContainer: [
24
+ {
25
+ width: width.toString() + '%',
26
+ flexDirection: 'row',
27
+ height: Scale.l,
28
+ marginTop: Scale.xs,
29
+ },
30
+ startingPosition < 80 && {
31
+ marginLeft: startingPosition.toString() + '%',
32
+ justifyContent: 'space-between',
33
+ },
34
+ startingPosition >= 80 && {
35
+ alignSelf: 'flex-end',
36
+ justifyContent: 'space-between',
37
+ width: 'auto',
38
+ },
39
+ ],
33
40
  checkInTime: {
34
- right: 20,
41
+ right: Scale.m,
35
42
  },
36
43
  checkOutTime: {
37
- left: checkOut ? 20 : 12,
44
+ left: width === 25 ? Scale.s : Scale.m,
38
45
  },
39
46
  });
@@ -1,16 +1,16 @@
1
1
  import React from 'react';
2
2
  import renderer from 'react-test-renderer';
3
- import {Timeline} from './timeline.component';
3
+ import {TimeLine} from './timeline.component';
4
4
 
5
5
  describe('Timeline visual test', () => {
6
6
  it('renders a check-in time with no known check-out time', () => {
7
- const tree = renderer.create(<Timeline checkIn={'07:30'} />).toJSON();
7
+ const tree = renderer.create(<TimeLine checkIn={'07:30'} />).toJSON();
8
8
 
9
9
  expect(tree).toMatchSnapshot();
10
10
  });
11
11
  it('renders a check-in time and check-out time', () => {
12
12
  const tree = renderer
13
- .create(<Timeline checkIn={'07:30'} checkOut={'12:30'} />)
13
+ .create(<TimeLine checkIn={'07:30'} checkOut={'12:30'} />)
14
14
  .toJSON();
15
15
 
16
16
  expect(tree).toMatchSnapshot();
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ToddleDateTime } from '../../../utilities/toddle-datetime/toddle-datetime.class';
3
2
  type TimestampProps = {
4
3
  sent: ToddleDateTime;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import { WaveProps } from '../../atoms/static-wave/static-wave.component';
3
2
  export declare const WaveBackground: ({ customWavePath, customStyle, heightSvgContainer, positionTop, }: WaveProps) => JSX.Element;
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export declare const WaveBackgroundPreview: ({}: {}) => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  type ButtonProps = {
3
2
  text: string;
4
3
  disabled?: boolean;
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export declare const WideButtonPreview: ({}: {}) => JSX.Element;
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export declare const ChildListItemPreview: ({}: {}) => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  type ContactItemProps = {
3
2
  name: string;
4
3
  label: string;
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export declare const ContactItemPreview: ({}: {}) => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ToddleDateTime } from '../../../utilities/toddle-datetime/toddle-datetime.class';
3
2
  type DaySelectProps = {
4
3
  onSelectDate: (date: ToddleDateTime) => void;
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export declare const DaySelectPreview: ({}: {}) => JSX.Element;
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export declare const LoadingDotsContainer: () => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { Animated } from 'react-native';
3
2
  type DotProps = {
4
3
  dynamicSize: Animated.Value;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import { LoadingDotsProps } from '../../../types/loading-dots.type';
3
2
  export declare const LoadingIndicator: ({ animation, dots, color, size, spacing, delay, }: LoadingDotsProps) => JSX.Element;
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export declare const LoadingIndicatorPreview: ({}: {}) => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ImageSourcePropType } from 'react-native';
3
2
  import { Initials } from '../../../models/initials.model';
4
3
  type MyChildListItemProps = {
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export declare const MyChildListItemPreview: ({}: {}) => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ImageSourcePropType, ViewStyle } from 'react-native';
3
2
  import { Initials } from '../../../models/initials.model';
4
3
  interface IContactInfoCard {
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export declare const PersonInfoCardPreview: ({}: {}) => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { VisualState } from '../../../types/visual-state.enum';
3
2
  import { BubbleAlignment } from '../../../types/bubble-alignment.enum';
4
3
  import { ToddleDateTime } from '../../../utilities/toddle-datetime/toddle-datetime.class';
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export declare const TextBubblePreview: ({}: {}) => JSX.Element;
@@ -6,6 +6,7 @@ type FadePanelProps = {
6
6
  onClose: () => void;
7
7
  maxHeight: number;
8
8
  children: React.ReactNode;
9
+ scrollable: boolean | undefined;
9
10
  };
10
- export declare const FadePanel: ({ title, subtitle, isVisible, onClose, maxHeight, children, }: FadePanelProps) => JSX.Element;
11
+ export declare const FadePanel: ({ title, subtitle, isVisible, onClose, maxHeight, children, scrollable, }: FadePanelProps) => JSX.Element;
11
12
  export {};
@@ -1,5 +1,5 @@
1
1
  import React, {useContext, useEffect, useRef} from 'react';
2
- import {Animated, ScrollView} from 'react-native';
2
+ import {Animated, ScrollView, View} from 'react-native';
3
3
  import {ThemeCtx} from '../../../../context/theme.context';
4
4
  import {Stylesheet} from './fade-panel.styles';
5
5
  import {Heading} from '../../popover/components/modal/heading/heading.component';
@@ -12,6 +12,7 @@ type FadePanelProps = {
12
12
  onClose: () => void;
13
13
  maxHeight: number;
14
14
  children: React.ReactNode;
15
+ scrollable: boolean | undefined;
15
16
  };
16
17
 
17
18
  export const FadePanel = ({
@@ -21,6 +22,7 @@ export const FadePanel = ({
21
22
  onClose,
22
23
  maxHeight,
23
24
  children,
25
+ scrollable = true,
24
26
  }: FadePanelProps) => {
25
27
  const fadeAnimation = useRef(new Animated.Value(0)).current;
26
28
 
@@ -47,7 +49,11 @@ export const FadePanel = ({
47
49
  <Animated.View style={styles.rootContainer}>
48
50
  <Close onPress={onClose} />
49
51
  <Heading title={title} subtitle={subtitle} />
50
- <ScrollView>{children}</ScrollView>
52
+ {scrollable ? (
53
+ <ScrollView>{children}</ScrollView>
54
+ ) : (
55
+ <View>{children}</View>
56
+ )}
51
57
  </Animated.View>
52
58
  );
53
59
  };
@@ -5,6 +5,7 @@ type ModalProps = {
5
5
  isVisible: boolean;
6
6
  onClose: () => void;
7
7
  children?: React.ReactNode;
8
+ scrollable?: boolean;
8
9
  };
9
- export declare const Modal: ({ title, subtitle, isVisible, onClose, children, }: ModalProps) => JSX.Element;
10
+ export declare const Modal: ({ title, subtitle, isVisible, onClose, children, scrollable, }: ModalProps) => JSX.Element;
10
11
  export {};
@@ -11,6 +11,7 @@ type ModalProps = {
11
11
  isVisible: boolean;
12
12
  onClose: () => void;
13
13
  children?: React.ReactNode;
14
+ scrollable?: boolean;
14
15
  };
15
16
 
16
17
  const window = Dimensions.get('window');
@@ -21,21 +22,20 @@ export const Modal = ({
21
22
  isVisible,
22
23
  onClose,
23
24
  children,
25
+ scrollable,
24
26
  }: ModalProps) => {
25
27
  const [windowHeight, setWindowHeight] = useState(window.height);
26
- const [windowWidth, setWindowWidth] = useState(window.width);
27
28
 
28
29
  useEffect(() => {
29
30
  const subscription = Dimensions.addEventListener('change', ({window}) => {
30
31
  setWindowHeight(window.height);
31
- setWindowWidth(window.width);
32
32
  });
33
33
  return () => subscription?.remove();
34
34
  });
35
35
 
36
36
  const maxHeight = Math.round(windowHeight / 100) * 80;
37
37
 
38
- const styles = Stylesheet(windowWidth, windowHeight);
38
+ const styles = Stylesheet();
39
39
 
40
40
  return (
41
41
  <View style={styles.element} pointerEvents={isVisible ? 'auto' : 'none'}>
@@ -47,6 +47,7 @@ export const Modal = ({
47
47
  onClose={onClose}
48
48
  title={title}
49
49
  subtitle={subtitle}
50
+ scrollable={scrollable}
50
51
  >
51
52
  {children}
52
53
  </FadePanel>
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export declare const ModalPreview: ({}: {}) => JSX.Element;
@@ -1,10 +1,7 @@
1
- export function Stylesheet(
2
- windowWidth: any,
3
- windowHeight: any
4
- ): {
1
+ export function Stylesheet(): {
5
2
  element: {
6
- width: any;
7
- height: any;
3
+ width: string;
4
+ height: string;
8
5
  position: 'absolute';
9
6
  left: number;
10
7
  top: number;
@@ -2,11 +2,11 @@ import React from 'react';
2
2
  import {StyleSheet} from 'react-native';
3
3
  import {Scale} from '../../../theme/scale/index';
4
4
 
5
- export const Stylesheet = (windowWidth, windowHeight) =>
5
+ export const Stylesheet = () =>
6
6
  StyleSheet.create({
7
7
  element: {
8
- width: windowWidth,
9
- height: windowHeight,
8
+ width: '100%',
9
+ height: '100%',
10
10
  position: 'absolute',
11
11
  left: 0,
12
12
  top: 0,
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { GestureResponderEvent } from 'react-native';
3
2
  type ModalCloseProps = {
4
3
  onPress: (event: GestureResponderEvent) => void;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  type ModalHeadingProps = {
3
2
  title: string;
4
3
  subtitle?: string;
@@ -68,8 +68,6 @@ const Modal = ({
68
68
 
69
69
  const transform = [{translateY: translateY}];
70
70
 
71
- console.log(maxHeight);
72
-
73
71
  return (
74
72
  <Animated.View
75
73
  style={[styles.element, {maxHeight: maxHeight}, {transform: transform}]}
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export declare const PopoverPreview: ({}: {}) => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  type MainGradientProps = {
3
2
  isActive?: boolean;
4
3
  };
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import { IconInterface } from '../interfaces/icon.interface';
3
2
  export declare const Icon: ({ style, name, size, color }: IconInterface) => JSX.Element;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import { IconSVGProps } from '../../../interfaces/icon.interface';
3
2
  export declare const CalendarIcon: ({ color, size }: IconSVGProps) => JSX.Element;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import { IconSVGProps } from '../../../interfaces/icon.interface';
3
2
  export declare const ChatIcon: ({ color, size }: IconSVGProps) => JSX.Element;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import { IconSVGProps } from '../../../interfaces/icon.interface';
3
2
  export declare const ChatAltIcon: ({ color, size }: IconSVGProps) => JSX.Element;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import { IconSVGProps } from '../../../interfaces/icon.interface';
3
2
  export declare const CheckCircleIcon: ({ color, size }: IconSVGProps) => JSX.Element;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import { IconSVGProps } from '../../../interfaces/icon.interface';
3
2
  export declare const ChevronLeftIcon: ({ color, size }: IconSVGProps) => JSX.Element;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import { IconSVGProps } from '../../../interfaces/icon.interface';
3
2
  export declare const ChevronRightIcon: ({ color, size }: IconSVGProps) => JSX.Element;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import { IconSVGProps } from '../../../interfaces/icon.interface';
3
2
  export declare const ClockIcon: ({ color, size }: IconSVGProps) => JSX.Element;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import { IconSVGProps } from '../../../interfaces/icon.interface';
3
2
  export declare const CloudDownloadIcon: ({ color, size }: IconSVGProps) => JSX.Element;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import { IconSVGProps } from '../../../interfaces/icon.interface';
3
2
  export declare const CurrencyEuroIcon: ({ color, size }: IconSVGProps) => JSX.Element;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import { IconSVGProps } from '../../../interfaces/icon.interface';
3
2
  export declare const DocumentTextIcon: ({ color, size }: IconSVGProps) => JSX.Element;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import { IconSVGProps } from '../../../interfaces/icon.interface';
3
2
  export declare const ExclamationIcon: ({ color, size }: IconSVGProps) => JSX.Element;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import { IconSVGProps } from '../../../interfaces/icon.interface';
3
2
  export declare const ExclamationCircleIcon: ({ color, size, }: IconSVGProps) => JSX.Element;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import { IconSVGProps } from '../../../interfaces/icon.interface';
3
2
  export declare const EyeIcon: ({ color, size }: IconSVGProps) => JSX.Element;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import { IconSVGProps } from '../../../interfaces/icon.interface';
3
2
  export declare const EyeOffIcon: ({ color, size }: IconSVGProps) => JSX.Element;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import { IconSVGProps } from '../../../interfaces/icon.interface';
3
2
  export declare const FilterIcon: ({ color, size }: IconSVGProps) => JSX.Element;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import { IconSVGProps } from '../../../interfaces/icon.interface';
3
2
  export declare const InformationCircleIcon: ({ color, size, }: IconSVGProps) => JSX.Element;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import { IconSVGProps } from '../../../interfaces/icon.interface';
3
2
  export declare const LogoutIcon: ({ color, size }: IconSVGProps) => JSX.Element;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import { IconSVGProps } from '../../../interfaces/icon.interface';
3
2
  export declare const MailIcon: ({ color, size }: IconSVGProps) => JSX.Element;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import { IconSVGProps } from '../../../interfaces/icon.interface';
3
2
  export declare const MailOpenIcon: ({ color, size }: IconSVGProps) => JSX.Element;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import { IconSVGProps } from '../../../interfaces/icon.interface';
3
2
  export declare const MenuIcon: ({ color, size }: IconSVGProps) => JSX.Element;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import { IconSVGProps } from '../../../interfaces/icon.interface';
3
2
  export declare const MinusSmallIcon: ({ color, size }: IconSVGProps) => JSX.Element;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import { IconSVGProps } from '../../../interfaces/icon.interface';
3
2
  export declare const OfficeBuildingIcon: ({ color, size }: IconSVGProps) => JSX.Element;
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export declare const IconOutlineDefaultPreview: ({}: {}) => JSX.Element;
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export declare const IconOutlineGreyPreview: ({}: {}) => JSX.Element;
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export declare const IconOutlineWhitePreview: ({}: {}) => JSX.Element;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import { IconNameInterface } from '../../interfaces/icon.interface';
3
2
  export declare const Outline: ({ name, size, color, }: IconNameInterface) => JSX.Element;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import { IconSVGProps } from '../../../interfaces/icon.interface';
3
2
  export declare const PaperAirplaneIcon: ({ color, size }: IconSVGProps) => JSX.Element;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import { IconSVGProps } from '../../../interfaces/icon.interface';
3
2
  export declare const PaperClipIcon: ({ color, size }: IconSVGProps) => JSX.Element;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import { IconSVGProps } from '../../../interfaces/icon.interface';
3
2
  export declare const PencilIcon: ({ color, size }: IconSVGProps) => JSX.Element;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import { IconSVGProps } from '../../../interfaces/icon.interface';
3
2
  export declare const PhoneIcon: ({ color, size }: IconSVGProps) => JSX.Element;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import { IconSVGProps } from '../../../interfaces/icon.interface';
3
2
  export declare const PlusIcon: ({ color, size }: IconSVGProps) => JSX.Element;