@tactics/toddle-styleguide 1.2.8 → 1.2.9

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 (245) hide show
  1. package/package.json +1 -1
  2. package/src/components/atoms/backdrop/backdrop.component.d.ts +4 -7
  3. package/src/components/atoms/calendar/__snapshots__/calendar.test.js.snap +18 -18
  4. package/src/components/atoms/calendar/calendar.component.d.ts +6 -11
  5. package/src/components/atoms/check-switch/check-switch.component.d.ts +3 -3
  6. package/src/components/atoms/footer/footer.component.d.ts +6 -6
  7. package/src/components/atoms/heading-components/all-caps-heading/all-caps-heading.component.d.ts +2 -10
  8. package/src/components/atoms/heading-components/heading1/heading1.component.d.ts +2 -10
  9. package/src/components/atoms/heading-components/heading2/heading2.component.d.ts +2 -10
  10. package/src/components/atoms/heading-components/heading3/heading3.component.d.ts +2 -10
  11. package/src/components/atoms/heading-components/heading4/heading4.component.d.ts +2 -10
  12. package/src/components/atoms/heading-components/index.d.ts +6 -6
  13. package/src/components/atoms/image-bubble/image-bubble.component.d.ts +6 -9
  14. package/src/components/atoms/increment-input/increment-input.component.d.ts +4 -8
  15. package/src/components/atoms/logo/logo.component.d.ts +4 -4
  16. package/src/components/atoms/paragraph-components/index.d.ts +4 -4
  17. package/src/components/atoms/paragraph-components/paragraph/paragraph.component.d.ts +2 -10
  18. package/src/components/atoms/paragraph-components/small-text/small-text.component.d.ts +2 -10
  19. package/src/components/atoms/paragraph-components/tiny-text/tiny-text.component.d.ts +2 -10
  20. package/src/components/atoms/quick-message/__snapshots__/quick-message.test.js.snap +72 -1
  21. package/src/components/atoms/quick-message/quick-message.component.d.ts +5 -8
  22. package/src/components/atoms/quick-message/quick-message.component.tsx +3 -1
  23. package/src/components/atoms/quick-message/quick-message.preview.tsx +10 -1
  24. package/src/components/atoms/quick-message/quick-message.styles.d.ts +13 -13
  25. package/src/components/atoms/quick-message/quick-message.styles.js +4 -2
  26. package/src/components/atoms/quick-message/quick-message.test.js +38 -6
  27. package/src/components/atoms/split-container/split-container.component.d.ts +4 -7
  28. package/src/components/atoms/static-wave/static-wave.component.d.ts +6 -11
  29. package/src/components/atoms/text-input/text-input.component.d.ts +6 -10
  30. package/src/components/atoms/text-input/text-input.component.tsx +6 -9
  31. package/src/components/atoms/text-input/text-input.preview.d.ts +1 -1
  32. package/src/components/atoms/text-input/text-input.preview.tsx +3 -3
  33. package/src/components/atoms/text-input/text-input.styles.d.ts +20 -44
  34. package/src/components/atoms/text-input/text-input.styles.js +7 -13
  35. package/src/components/molecules/avatar/avatar.component.d.ts +11 -18
  36. package/src/components/molecules/blocked-message/blocked-message.component.d.ts +2 -4
  37. package/src/components/molecules/button/button.component.d.ts +11 -20
  38. package/src/components/molecules/calendar-select/calendar-select.component.d.ts +7 -12
  39. package/src/components/molecules/cancel-link/cancel-link.component.d.ts +4 -4
  40. package/src/components/molecules/checkbox/checkbox.component.d.ts +5 -9
  41. package/src/components/molecules/contact-role/contact-role.component.d.ts +3 -6
  42. package/src/components/molecules/date-input/date-input.component.d.ts +4 -7
  43. package/src/components/molecules/day/day.component.d.ts +6 -6
  44. package/src/components/molecules/day/day.component.tsx +17 -4
  45. package/src/components/molecules/day/day.styles.d.ts +27 -44
  46. package/src/components/molecules/day/day.styles.js +14 -17
  47. package/src/components/molecules/default-select/default-select.component.d.ts +3 -6
  48. package/src/components/molecules/department_logo/department-logo.component.d.ts +3 -5
  49. package/src/components/molecules/failed-to-send/failed-bubble.component.d.ts +6 -11
  50. package/src/components/molecules/filter-range/filter-range.component.d.ts +7 -14
  51. package/src/components/molecules/filter-tab/filter-tab.component.d.ts +7 -11
  52. package/src/components/molecules/info/info.component.d.ts +4 -4
  53. package/src/components/molecules/language-button/language-button.component.d.ts +4 -8
  54. package/src/components/molecules/message-input/message-input.component.d.ts +7 -11
  55. package/src/components/molecules/more-info-button/more-info-button.component.d.ts +4 -8
  56. package/src/components/molecules/password-input/password-input.component.d.ts +5 -9
  57. package/src/components/molecules/password-input/password-input.component.tsx +7 -9
  58. package/src/components/molecules/password-input/password-input.styles.d.ts +27 -26
  59. package/src/components/molecules/password-input/password-input.styles.js +6 -6
  60. package/src/components/molecules/pill/pill.component.d.ts +5 -5
  61. package/src/components/molecules/pressable-icon/pressable-icon.component.d.ts +5 -10
  62. package/src/components/molecules/quick-filter/quick-filter.component.d.ts +9 -16
  63. package/src/components/molecules/search-input/__snapshots__/search.test.js.snap +23 -13
  64. package/src/components/molecules/search-input/search.component.d.ts +9 -16
  65. package/src/components/molecules/search-input/search.component.tsx +19 -30
  66. package/src/components/molecules/search-input/search.preview.d.ts +1 -1
  67. package/src/components/molecules/search-input/search.preview.tsx +8 -6
  68. package/src/components/molecules/search-input/search.styles.d.ts +31 -30
  69. package/src/components/molecules/search-input/search.styles.js +14 -8
  70. package/src/components/molecules/search-input/search.test.js +3 -1
  71. package/src/components/molecules/select-link/select-link.component.d.ts +4 -4
  72. package/src/components/molecules/select-list-item/select-list-item.component.d.ts +7 -13
  73. package/src/components/molecules/select-picker/select-picker.component.d.ts +8 -13
  74. package/src/components/molecules/send-bubble/send-text-bubble.component.d.ts +10 -17
  75. package/src/components/molecules/send-bubble/send-text-bubble.component.tsx +1 -5
  76. package/src/components/molecules/send-bubble/send-text-bubble.styles.d.ts +58 -74
  77. package/src/components/molecules/send-bubble/send-text-bubble.styles.js +2 -8
  78. package/src/components/molecules/snackbar/snackbar.component.d.ts +5 -5
  79. package/src/components/molecules/swipe/swipe.component.d.ts +5 -5
  80. package/src/components/molecules/tag/tag.component.d.ts +6 -11
  81. package/src/components/molecules/time-picker/time-picker.component.d.ts +5 -10
  82. package/src/components/molecules/time-tracker/time-tracker.component.d.ts +6 -10
  83. package/src/components/molecules/timeline/timeline.component.d.ts +3 -6
  84. package/src/components/molecules/timeline/timeline.styles.d.ts +40 -50
  85. package/src/components/molecules/timeline/timeline.styles.js +2 -2
  86. package/src/components/molecules/timestamp/timestamp.component.d.ts +4 -3
  87. package/src/components/molecules/timestamp/timestamp.component.tsx +4 -7
  88. package/src/components/molecules/wave-background/wave.component.d.ts +2 -7
  89. package/src/components/molecules/wide-button/wide-button.component.d.ts +6 -11
  90. package/src/components/organisms/child-list-item/__snapshots__/child-list-item.test.js.snap +165 -10
  91. package/src/components/organisms/child-list-item/child-list-item.component.d.ts +18 -32
  92. package/src/components/organisms/child-list-item/child-list-item.component.tsx +24 -1
  93. package/src/components/organisms/child-list-item/child-list-item.preview.tsx +11 -0
  94. package/src/components/organisms/child-list-item/child-list-item.styles.d.ts +35 -41
  95. package/src/components/organisms/child-list-item/child-list-item.styles.js +2 -3
  96. package/src/components/organisms/child-list-item/child-list-item.test.js +9 -4
  97. package/src/components/organisms/child-list-item/components/child-list-tag.component.d.ts +6 -0
  98. package/src/components/organisms/child-list-item/components/child-list-tag.component.tsx +28 -0
  99. package/src/components/organisms/child-list-item/components/child-list-tag.styles.d.ts +10 -0
  100. package/src/components/organisms/child-list-item/components/child-list-tag.styles.js +16 -0
  101. package/src/components/organisms/contact-item/contact-item.component.d.ts +6 -11
  102. package/src/components/organisms/day-select/day-select.component.d.ts +6 -10
  103. package/src/components/organisms/day-select/day-select.preview.tsx +9 -5
  104. package/src/components/organisms/loading-indicator/animation-style.animate.d.ts +3 -13
  105. package/src/components/organisms/loading-indicator/dot.component.d.ts +3 -3
  106. package/src/components/organisms/loading-indicator/loading-indicator.component.d.ts +2 -9
  107. package/src/components/organisms/my-child-list-item/__snapshots__/my-child-list-item.test.js.snap +143 -399
  108. package/src/components/organisms/my-child-list-item/my-child-list-item.component.d.ts +9 -18
  109. package/src/components/organisms/my-child-list-item/my-child-list-item.component.tsx +32 -59
  110. package/src/components/organisms/my-child-list-item/my-child-list-item.preview.tsx +36 -24
  111. package/src/components/organisms/my-child-list-item/my-child-list-item.styles.d.ts +32 -28
  112. package/src/components/organisms/my-child-list-item/my-child-list-item.styles.js +16 -11
  113. package/src/components/organisms/my-child-list-item/my-child-list-item.test.js +5 -22
  114. package/src/components/organisms/person-info-card/person-info-card.component.d.ts +10 -18
  115. package/src/components/organisms/tab-view/tab-view.component.d.ts +8 -12
  116. package/src/components/organisms/text-bubble/text-bubble.component.d.ts +15 -24
  117. package/src/components/organisms/text-bubble/text-bubble.component.tsx +3 -1
  118. package/src/components/organisms/text-bubble/text-bubble.preview.tsx +8 -4
  119. package/src/components/organisms/text-bubble/text-bubble.styles.d.ts +31 -44
  120. package/src/components/organisms/text-bubble/text-bubble.styles.js +2 -0
  121. package/src/components/templates/modal/components/fade-panel.component.d.ts +8 -16
  122. package/src/components/templates/modal/components/fade-panel.component.tsx +1 -1
  123. package/src/components/templates/modal/modal.component.d.ts +7 -14
  124. package/src/components/templates/popover/components/foreground/foreground.component.d.ts +4 -4
  125. package/src/components/templates/popover/components/modal/close/close.component.d.ts +4 -4
  126. package/src/components/templates/popover/components/modal/heading/heading.component.d.ts +4 -4
  127. package/src/components/templates/popover/components/modal/modal.component.d.ts +9 -17
  128. package/src/components/templates/popover/components/modal/scroll-content/scroll-content.component.d.ts +3 -5
  129. package/src/components/templates/popover/popover.component.d.ts +8 -15
  130. package/src/components/templates/popover-action/popover-action.component.d.ts +4 -8
  131. package/src/context/loading-dots.context.d.ts +6 -9
  132. package/src/context/theme.context.d.ts +47 -47
  133. package/src/gradients/main/main.gradient.d.ts +2 -4
  134. package/src/icons/index.d.ts +2 -7
  135. package/src/icons/outline/calendar/calendar.icon.d.ts +2 -2
  136. package/src/icons/outline/chat/chat.icon.d.ts +2 -2
  137. package/src/icons/outline/chat-alt/chat-alt.icon.d.ts +2 -2
  138. package/src/icons/outline/check-circle/check-circle.icon.d.ts +2 -5
  139. package/src/icons/outline/chevron-left/chevron-left.icon.d.ts +2 -5
  140. package/src/icons/outline/chevron-right/chevron-right.icon.d.ts +2 -5
  141. package/src/icons/outline/clock/clock.icon.d.ts +2 -2
  142. package/src/icons/outline/cloud-download/cloud-download.icon.d.ts +2 -5
  143. package/src/icons/outline/currency-euro/currency-euro.icon.d.ts +2 -5
  144. package/src/icons/outline/document-text/document-text.icon.d.ts +2 -5
  145. package/src/icons/outline/exclamation/exclamation.icon.d.ts +2 -5
  146. package/src/icons/outline/exclamation-circle/exclamation-circle.icon.d.ts +2 -5
  147. package/src/icons/outline/eye/eye.icon.d.ts +2 -2
  148. package/src/icons/outline/eye-off/eye-off.icon.d.ts +2 -2
  149. package/src/icons/outline/filter/filter.icon.d.ts +2 -2
  150. package/src/icons/outline/information-circle/information-circle.icon.d.ts +2 -5
  151. package/src/icons/outline/logout/logout.icon.d.ts +2 -2
  152. package/src/icons/outline/mail/mail.icon.d.ts +2 -2
  153. package/src/icons/outline/mail-open/mail-open.icon.d.ts +2 -2
  154. package/src/icons/outline/menu/menu.icon.d.ts +2 -2
  155. package/src/icons/outline/minus-sm/minus-sm.icon.d.ts +2 -5
  156. package/src/icons/outline/office-building/office-building.icon.d.ts +2 -5
  157. package/src/icons/outline/outline.d.ts +2 -6
  158. package/src/icons/outline/paper-airplane/paper-airplane.icon.d.ts +2 -5
  159. package/src/icons/outline/paperclip/paperclip.icon.d.ts +2 -5
  160. package/src/icons/outline/pencil/pencil.icon.d.ts +2 -2
  161. package/src/icons/outline/phone/phone.icon.d.ts +2 -2
  162. package/src/icons/outline/plus/plus.icon.d.ts +2 -2
  163. package/src/icons/outline/plus-sm/plus-sm.icon.d.ts +2 -5
  164. package/src/icons/outline/qrcode/qrcode.icon.d.ts +2 -2
  165. package/src/icons/outline/refresh/refresh.icon.d.ts +2 -2
  166. package/src/icons/outline/search/search.icon.d.ts +2 -2
  167. package/src/icons/outline/selector/selector.icon.d.ts +2 -2
  168. package/src/icons/outline/sm-view-grid-add/sm-view-grid-add.icon.d.ts +2 -5
  169. package/src/icons/outline/status-online/status-online.icon.d.ts +2 -5
  170. package/src/icons/outline/thumb-up/thumb-up.icon.d.ts +2 -2
  171. package/src/icons/outline/trash/trash.icon.d.ts +2 -2
  172. package/src/icons/outline/user/user.icon.d.ts +2 -2
  173. package/src/icons/outline/user-group/user-group.icon.d.ts +2 -5
  174. package/src/icons/outline/users/users.icon.d.ts +2 -2
  175. package/src/icons/outline/xmark/xmark.icon.d.ts +2 -2
  176. package/src/icons/solid/calendar/calendar.icon.d.ts +2 -2
  177. package/src/icons/solid/chat/chat.icon.d.ts +2 -2
  178. package/src/icons/solid/chat-alt/chat-alt-solid.icon.d.ts +2 -2
  179. package/src/icons/solid/check-circle/check-circle.icon.d.ts +2 -5
  180. package/src/icons/solid/chevron-left/chevron-left.icon.d.ts +2 -5
  181. package/src/icons/solid/chevron-right/chevron-right.icon.d.ts +2 -5
  182. package/src/icons/solid/clock/clock-solid.icon.d.ts +2 -2
  183. package/src/icons/solid/cloud-download/cloud-download.icon.d.ts +2 -5
  184. package/src/icons/solid/currency-euro/currency-euro.icon.d.ts +2 -5
  185. package/src/icons/solid/document-text/document-text-solid.icon.d.ts +2 -5
  186. package/src/icons/solid/exclamation/exclamation.icon.d.ts +2 -5
  187. package/src/icons/solid/exclamation-circle/exclamation-circle.icon.d.ts +2 -5
  188. package/src/icons/solid/eye/eye.icon.d.ts +2 -2
  189. package/src/icons/solid/eye-off/eye-off.icon.d.ts +2 -2
  190. package/src/icons/solid/filter/filter.icon.d.ts +2 -2
  191. package/src/icons/solid/information-circle/information-circle-solid.icon.d.ts +2 -5
  192. package/src/icons/solid/logout/logout.icon.d.ts +2 -2
  193. package/src/icons/solid/mail/mail.icon.d.ts +2 -2
  194. package/src/icons/solid/mail-open/mail-open.icon.d.ts +2 -2
  195. package/src/icons/solid/menu/menu.icon.d.ts +2 -2
  196. package/src/icons/solid/minus-sm/minus-sm.icon.d.ts +2 -5
  197. package/src/icons/solid/office-building/office-building.icon.d.ts +2 -5
  198. package/src/icons/solid/paper-airplane/paper-airplane.icon.d.ts +2 -5
  199. package/src/icons/solid/paperclip/paperclip.icon.d.ts +2 -5
  200. package/src/icons/solid/pencil/pencil-solid.icon.d.ts +2 -2
  201. package/src/icons/solid/phone/phone-solid.icon.d.ts +2 -2
  202. package/src/icons/solid/plus/plus.icon.d.ts +2 -2
  203. package/src/icons/solid/plus-sm/plus-sm.icon.d.ts +2 -5
  204. package/src/icons/solid/qrcode/qrcode.icon.d.ts +2 -2
  205. package/src/icons/solid/refresh/refresh-solid.icon.d.ts +2 -2
  206. package/src/icons/solid/search/search.icon.d.ts +2 -2
  207. package/src/icons/solid/selector/selector.icon.d.ts +2 -2
  208. package/src/icons/solid/sm-view-grid-add/sm-view-grid-add.icon.d.ts +2 -5
  209. package/src/icons/solid/solid.d.ts +2 -6
  210. package/src/icons/solid/status-online/status-online-solid.icon.d.ts +2 -5
  211. package/src/icons/solid/thumb-up/thumb-up.icon.d.ts +2 -2
  212. package/src/icons/solid/trash/trash-solid.icon.d.ts +2 -2
  213. package/src/icons/solid/user/user.icon.d.ts +2 -2
  214. package/src/icons/solid/user-group/user-group.icon.d.ts +2 -5
  215. package/src/icons/solid/users/users-solid.icon.d.ts +2 -2
  216. package/src/icons/solid/xmark/xmark.icon.d.ts +2 -2
  217. package/src/interfaces/icon.interface.d.ts +5 -5
  218. package/src/models/hex-color.model.d.ts +4 -4
  219. package/src/models/initials.model.d.ts +5 -5
  220. package/src/theme/font/font.d.ts +70 -70
  221. package/src/theme/font/index.d.ts +3 -3
  222. package/src/theme/provider/index.d.ts +3 -3
  223. package/src/theme/provider/parent.theme.d.ts +45 -45
  224. package/src/theme/provider/staff-member.theme.d.ts +45 -45
  225. package/src/theme/responsive/index.d.ts +2 -5
  226. package/src/theme/scale/index.d.ts +10 -10
  227. package/src/types/bubble-alignment.enum.d.ts +2 -2
  228. package/src/types/icontype.type.d.ts +1 -41
  229. package/src/types/keyboard-types.enum.d.ts +7 -7
  230. package/src/types/loading-dots.type.d.ts +6 -6
  231. package/src/types/size.enum.d.ts +3 -3
  232. package/src/types/text-properties.type.d.ts +8 -8
  233. package/src/types/visual-state.enum.d.ts +5 -5
  234. package/src/utilities/color-handler/color-handler.d.ts +2 -6
  235. package/src/utilities/toddle-datetime/interfaces/duration.interface.d.ts +18 -18
  236. package/src/utilities/toddle-datetime/interfaces/toddle-datetime.interface.d.ts +18 -14
  237. package/src/utilities/toddle-datetime/interfaces/toddle-datetime.interface.tsx +6 -0
  238. package/src/utilities/toddle-datetime/toddle-datetime.class.d.ts +48 -92
  239. package/src/utilities/toddle-datetime/toddle-datetime.class.tsx +31 -2
  240. package/src/utilities/toddle-datetime/toddle-datetime.preview.tsx +114 -84
  241. package/src/utilities/toddle-datetime/types/duration.type.d.ts +4 -0
  242. package/src/utilities/toddle-datetime/types/{duration-like.type.tsx → duration.type.tsx} +3 -0
  243. package/src/utilities/toddle-datetime/types/toddle-datetime.type.d.ts +3 -11
  244. package/src/utilities/toddle-datetime/types/toddle-datetime.type.tsx +8 -1
  245. package/src/utilities/toddle-datetime/types/duration-like.type.d.ts +0 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tactics/toddle-styleguide",
3
- "version": "1.2.8",
3
+ "version": "1.2.9",
4
4
  "main": "index.tsx",
5
5
  "types": "index.d.ts",
6
6
  "prepublish": "tsc",
@@ -1,9 +1,6 @@
1
1
  type PopoverBackdropProps = {
2
- isVisible: boolean;
3
- touchBackDrop?: (value: boolean) => void;
2
+ isVisible: boolean;
3
+ touchBackDrop?: (value: boolean) => void;
4
4
  };
5
- declare const Backdrop: ({
6
- isVisible,
7
- touchBackDrop,
8
- }: PopoverBackdropProps) => JSX.Element;
9
- export {Backdrop as Backdrop};
5
+ declare const Backdrop: ({ isVisible, touchBackDrop }: PopoverBackdropProps) => JSX.Element;
6
+ export { Backdrop as Backdrop };
@@ -642,7 +642,7 @@ exports[`Test for the calendar component renders a calendar where you can select
642
642
  }
643
643
  >
644
644
  <View
645
- accessibilityLabel="today Woensdag 2 Augustus 2023 "
645
+ accessibilityLabel=" Woensdag 2 Augustus 2023 "
646
646
  accessibilityRole="button"
647
647
  accessibilityState={
648
648
  {
@@ -674,10 +674,6 @@ exports[`Test for the calendar component renders a calendar where you can select
674
674
  style={
675
675
  {
676
676
  "alignItems": "center",
677
- "borderColor": "#7B93DB",
678
- "borderRadius": 21,
679
- "borderStyle": "solid",
680
- "borderWidth": 1,
681
677
  "height": 42,
682
678
  "justifyContent": "center",
683
679
  "opacity": 1,
@@ -697,9 +693,6 @@ exports[`Test for the calendar component renders a calendar where you can select
697
693
  "lineHeight": 22.4,
698
694
  "marginTop": 4,
699
695
  },
700
- {
701
- "color": "#7B93DB",
702
- },
703
696
  ]
704
697
  }
705
698
  >
@@ -811,7 +804,7 @@ exports[`Test for the calendar component renders a calendar where you can select
811
804
  }
812
805
  >
813
806
  <View
814
- accessibilityLabel=" Vrijdag 4 Augustus 2023 "
807
+ accessibilityLabel="today Vrijdag 4 Augustus 2023 "
815
808
  accessibilityRole="button"
816
809
  accessibilityState={
817
810
  {
@@ -843,6 +836,10 @@ exports[`Test for the calendar component renders a calendar where you can select
843
836
  style={
844
837
  {
845
838
  "alignItems": "center",
839
+ "borderColor": "#7B93DB",
840
+ "borderRadius": 21,
841
+ "borderStyle": "solid",
842
+ "borderWidth": 1,
846
843
  "height": 42,
847
844
  "justifyContent": "center",
848
845
  "opacity": 1,
@@ -862,6 +859,9 @@ exports[`Test for the calendar component renders a calendar where you can select
862
859
  "lineHeight": 22.4,
863
860
  "marginTop": 4,
864
861
  },
862
+ {
863
+ "color": "#7B93DB",
864
+ },
865
865
  ]
866
866
  }
867
867
  >
@@ -4009,8 +4009,7 @@ exports[`Test for the calendar component renders a calendar where you can select
4009
4009
  }
4010
4010
  >
4011
4011
  <View
4012
- accessibilityLabel="today Woensdag 2 Augustus 2023 "
4013
- accessibilityRole="button"
4012
+ accessibilityLabel=" Woensdag 2 Augustus 2023 "
4014
4013
  accessibilityState={
4015
4014
  {
4016
4015
  "busy": undefined,
@@ -4041,10 +4040,6 @@ exports[`Test for the calendar component renders a calendar where you can select
4041
4040
  style={
4042
4041
  {
4043
4042
  "alignItems": "center",
4044
- "borderColor": "#7B93DB",
4045
- "borderRadius": 21,
4046
- "borderStyle": "solid",
4047
- "borderWidth": 1,
4048
4043
  "height": 42,
4049
4044
  "justifyContent": "center",
4050
4045
  "opacity": 1,
@@ -4065,7 +4060,7 @@ exports[`Test for the calendar component renders a calendar where you can select
4065
4060
  "marginTop": 4,
4066
4061
  },
4067
4062
  {
4068
- "color": "#7B93DB",
4063
+ "color": "#9AA5B1",
4069
4064
  },
4070
4065
  ]
4071
4066
  }
@@ -4180,7 +4175,8 @@ exports[`Test for the calendar component renders a calendar where you can select
4180
4175
  }
4181
4176
  >
4182
4177
  <View
4183
- accessibilityLabel=" Vrijdag 4 Augustus 2023 "
4178
+ accessibilityLabel="today Vrijdag 4 Augustus 2023 "
4179
+ accessibilityRole="button"
4184
4180
  accessibilityState={
4185
4181
  {
4186
4182
  "busy": undefined,
@@ -4211,6 +4207,10 @@ exports[`Test for the calendar component renders a calendar where you can select
4211
4207
  style={
4212
4208
  {
4213
4209
  "alignItems": "center",
4210
+ "borderColor": "#7B93DB",
4211
+ "borderRadius": 21,
4212
+ "borderStyle": "solid",
4213
+ "borderWidth": 1,
4214
4214
  "height": 42,
4215
4215
  "justifyContent": "center",
4216
4216
  "opacity": 1,
@@ -4231,7 +4231,7 @@ exports[`Test for the calendar component renders a calendar where you can select
4231
4231
  "marginTop": 4,
4232
4232
  },
4233
4233
  {
4234
- "color": "#9AA5B1",
4234
+ "color": "#7B93DB",
4235
4235
  },
4236
4236
  ]
4237
4237
  }
@@ -1,14 +1,9 @@
1
- import {ToddleDateTime} from '../../../utilities/toddle-datetime/toddle-datetime.class';
1
+ import { ToddleDateTime } from '../../../utilities/toddle-datetime/toddle-datetime.class';
2
2
  type CalendarProps = {
3
- onDayPress: (day: ToddleDateTime) => void;
4
- selected: ToddleDateTime;
5
- minDate?: string;
6
- maxDate?: string;
3
+ onDayPress: (day: ToddleDateTime) => void;
4
+ selected: ToddleDateTime;
5
+ minDate?: string;
6
+ maxDate?: string;
7
7
  };
8
- export declare const Calendar: ({
9
- onDayPress,
10
- selected,
11
- minDate,
12
- maxDate,
13
- }: CalendarProps) => JSX.Element;
8
+ export declare const Calendar: ({ onDayPress, selected, minDate, maxDate, }: CalendarProps) => JSX.Element;
14
9
  export {};
@@ -1,6 +1,6 @@
1
1
  type CheckProps = {
2
- value: boolean;
3
- onToggle: () => void;
2
+ value: boolean;
3
+ onToggle: () => void;
4
4
  };
5
- export declare const Check: ({value, onToggle}: CheckProps) => JSX.Element;
5
+ export declare const Check: ({ value, onToggle }: CheckProps) => JSX.Element;
6
6
  export {};
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
- import {ViewStyle} from 'react-native';
3
- import {AnimateStyle} from 'react-native-reanimated';
2
+ import { ViewStyle } from 'react-native';
3
+ import { AnimateStyle } from 'react-native-reanimated';
4
4
  type FooterProps = {
5
- children: React.ReactNode;
6
- animatedStyle?: AnimateStyle<ViewStyle>;
5
+ children: React.ReactNode;
6
+ animatedStyle?: AnimateStyle<ViewStyle>;
7
7
  };
8
- declare const Footer: ({children, animatedStyle}: FooterProps) => JSX.Element;
9
- export {Footer as Footer};
8
+ declare const Footer: ({ children, animatedStyle }: FooterProps) => JSX.Element;
9
+ export { Footer as Footer };
@@ -1,10 +1,2 @@
1
- import {TextProperties} from '../../../../types/text-properties.type';
2
- export declare const AllCapsHeading: ({
3
- bold,
4
- children,
5
- textColor,
6
- textAlign,
7
- numberOfLines,
8
- ellipsizeMode,
9
- addStyle,
10
- }: TextProperties) => JSX.Element;
1
+ import { TextProperties } from '../../../../types/text-properties.type';
2
+ export declare const AllCapsHeading: ({ bold, children, textColor, textAlign, numberOfLines, ellipsizeMode, addStyle, }: TextProperties) => JSX.Element;
@@ -1,10 +1,2 @@
1
- import {TextProperties} from '../../../../types/text-properties.type';
2
- export declare const Heading1: ({
3
- bold,
4
- children,
5
- textColor,
6
- textAlign,
7
- addStyle,
8
- ellipsizeMode,
9
- numberOfLines,
10
- }: TextProperties) => JSX.Element;
1
+ import { TextProperties } from '../../../../types/text-properties.type';
2
+ export declare const Heading1: ({ bold, children, textColor, textAlign, addStyle, ellipsizeMode, numberOfLines, }: TextProperties) => JSX.Element;
@@ -1,10 +1,2 @@
1
- import {TextProperties} from '../../../../types/text-properties.type';
2
- export declare const Heading2: ({
3
- bold,
4
- children,
5
- textColor,
6
- textAlign,
7
- numberOfLines,
8
- ellipsizeMode,
9
- addStyle,
10
- }: TextProperties) => JSX.Element;
1
+ import { TextProperties } from '../../../../types/text-properties.type';
2
+ export declare const Heading2: ({ bold, children, textColor, textAlign, numberOfLines, ellipsizeMode, addStyle, }: TextProperties) => JSX.Element;
@@ -1,10 +1,2 @@
1
- import {TextProperties} from '../../../../types/text-properties.type';
2
- export declare const Heading3: ({
3
- bold,
4
- children,
5
- textColor,
6
- textAlign,
7
- addStyle,
8
- numberOfLines,
9
- ellipsizeMode,
10
- }: TextProperties) => JSX.Element;
1
+ import { TextProperties } from '../../../../types/text-properties.type';
2
+ export declare const Heading3: ({ bold, children, textColor, textAlign, addStyle, numberOfLines, ellipsizeMode, }: TextProperties) => JSX.Element;
@@ -1,10 +1,2 @@
1
- import {TextProperties} from '../../../../types/text-properties.type';
2
- export declare const Heading4: ({
3
- bold,
4
- children,
5
- textColor,
6
- textAlign,
7
- addStyle,
8
- numberOfLines,
9
- ellipsizeMode,
10
- }: TextProperties) => JSX.Element;
1
+ import { TextProperties } from '../../../../types/text-properties.type';
2
+ export declare const Heading4: ({ bold, children, textColor, textAlign, addStyle, numberOfLines, ellipsizeMode, }: TextProperties) => JSX.Element;
@@ -1,6 +1,6 @@
1
- import {Heading1} from './heading1/heading1.component';
2
- import {Heading2} from './heading2/heading2.component';
3
- import {Heading3} from './heading3/heading3.component';
4
- import {Heading4} from './heading4/heading4.component';
5
- import {AllCapsHeading} from './all-caps-heading/all-caps-heading.component';
6
- export {AllCapsHeading, Heading1, Heading2, Heading3, Heading4};
1
+ import { Heading1 } from './heading1/heading1.component';
2
+ import { Heading2 } from './heading2/heading2.component';
3
+ import { Heading3 } from './heading3/heading3.component';
4
+ import { Heading4 } from './heading4/heading4.component';
5
+ import { AllCapsHeading } from './all-caps-heading/all-caps-heading.component';
6
+ export { AllCapsHeading, Heading1, Heading2, Heading3, Heading4 };
@@ -1,11 +1,8 @@
1
- import {ImageSourcePropType} from 'react-native';
2
- import {BubbleAlignment} from '../../../types/bubble-alignment.enum';
1
+ import { ImageSourcePropType } from 'react-native';
2
+ import { BubbleAlignment } from '../../../types/bubble-alignment.enum';
3
3
  type ImageBubbleProps = {
4
- source: ImageSourcePropType;
5
- bubbleAlignment: BubbleAlignment;
4
+ source: ImageSourcePropType;
5
+ bubbleAlignment: BubbleAlignment;
6
6
  };
7
- declare const ImageBubble: ({
8
- source,
9
- bubbleAlignment,
10
- }: ImageBubbleProps) => JSX.Element;
11
- export {ImageBubble as ImageBubble};
7
+ declare const ImageBubble: ({ source, bubbleAlignment }: ImageBubbleProps) => JSX.Element;
8
+ export { ImageBubble as ImageBubble };
@@ -1,11 +1,7 @@
1
1
  type IncrementInputProps = {
2
- value: number;
3
- maxValue?: number;
4
- onPress: (number: number) => void;
2
+ value: number;
3
+ maxValue?: number;
4
+ onPress: (number: number) => void;
5
5
  };
6
- export declare const IncrementInput: ({
7
- value,
8
- onPress,
9
- maxValue,
10
- }: IncrementInputProps) => JSX.Element;
6
+ export declare const IncrementInput: ({ value, onPress, maxValue, }: IncrementInputProps) => JSX.Element;
11
7
  export {};
@@ -1,6 +1,6 @@
1
1
  type logoProps = {
2
- colorIsWhite?: boolean;
3
- big?: boolean;
2
+ colorIsWhite?: boolean;
3
+ big?: boolean;
4
4
  };
5
- declare const Logo: ({colorIsWhite, big}: logoProps) => JSX.Element;
6
- export {Logo as Logo};
5
+ declare const Logo: ({ colorIsWhite, big }: logoProps) => JSX.Element;
6
+ export { Logo as Logo };
@@ -1,4 +1,4 @@
1
- import {Paragraph} from './paragraph/paragraph.component';
2
- import {SmallText} from './small-text/small-text.component';
3
- import {TinyText} from './tiny-text/tiny-text.component';
4
- export {Paragraph, SmallText, TinyText};
1
+ import { Paragraph } from './paragraph/paragraph.component';
2
+ import { SmallText } from './small-text/small-text.component';
3
+ import { TinyText } from './tiny-text/tiny-text.component';
4
+ export { Paragraph, SmallText, TinyText };
@@ -1,10 +1,2 @@
1
- import {TextProperties} from '../../../../types/text-properties.type';
2
- export declare const Paragraph: ({
3
- bold,
4
- children,
5
- textColor,
6
- textAlign,
7
- addStyle,
8
- numberOfLines,
9
- ellipsizeMode,
10
- }: TextProperties) => JSX.Element;
1
+ import { TextProperties } from '../../../../types/text-properties.type';
2
+ export declare const Paragraph: ({ bold, children, textColor, textAlign, addStyle, numberOfLines, ellipsizeMode, }: TextProperties) => JSX.Element;
@@ -1,10 +1,2 @@
1
- import {TextProperties} from '../../../../types/text-properties.type';
2
- export declare const SmallText: ({
3
- bold,
4
- textColor,
5
- textAlign,
6
- children,
7
- addStyle,
8
- ellipsizeMode,
9
- numberOfLines,
10
- }: TextProperties) => JSX.Element;
1
+ import { TextProperties } from '../../../../types/text-properties.type';
2
+ export declare const SmallText: ({ bold, textColor, textAlign, children, addStyle, ellipsizeMode, numberOfLines, }: TextProperties) => JSX.Element;
@@ -1,10 +1,2 @@
1
- import {TextProperties} from '../../../../types/text-properties.type';
2
- export declare const TinyText: ({
3
- bold,
4
- children,
5
- textColor,
6
- textAlign,
7
- addStyle,
8
- numberOfLines,
9
- ellipsizeMode,
10
- }: TextProperties) => JSX.Element;
1
+ import { TextProperties } from '../../../../types/text-properties.type';
2
+ export declare const TinyText: ({ bold, children, textColor, textAlign, addStyle, numberOfLines, ellipsizeMode, }: TextProperties) => JSX.Element;
@@ -1,6 +1,6 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
- exports[`QuickMessage should render correctly 1`] = `
3
+ exports[`QuickMessage should render a quick message that is not selected 1`] = `
4
4
  <View
5
5
  accessibilityState={
6
6
  {
@@ -70,3 +70,74 @@ exports[`QuickMessage should render correctly 1`] = `
70
70
  </Text>
71
71
  </View>
72
72
  `;
73
+
74
+ exports[`QuickMessage should render a quick message that is selected 1`] = `
75
+ <View
76
+ accessibilityState={
77
+ {
78
+ "busy": undefined,
79
+ "checked": undefined,
80
+ "disabled": undefined,
81
+ "expanded": undefined,
82
+ "selected": undefined,
83
+ }
84
+ }
85
+ accessibilityValue={
86
+ {
87
+ "max": undefined,
88
+ "min": undefined,
89
+ "now": undefined,
90
+ "text": undefined,
91
+ }
92
+ }
93
+ accessible={true}
94
+ collapsable={false}
95
+ focusable={true}
96
+ onBlur={[Function]}
97
+ onClick={[Function]}
98
+ onFocus={[Function]}
99
+ onResponderGrant={[Function]}
100
+ onResponderMove={[Function]}
101
+ onResponderRelease={[Function]}
102
+ onResponderTerminate={[Function]}
103
+ onResponderTerminationRequest={[Function]}
104
+ onStartShouldSetResponder={[Function]}
105
+ style={
106
+ {
107
+ "backgroundColor": "#647ACB",
108
+ "borderBottomLeftRadius": 8,
109
+ "borderBottomRightRadius": 24,
110
+ "borderTopLeftRadius": 24,
111
+ "borderTopRightRadius": 24,
112
+ "paddingBottom": 24,
113
+ "paddingLeft": 24,
114
+ "paddingRight": 24,
115
+ "paddingTop": 24,
116
+ "width": "100%",
117
+ }
118
+ }
119
+ testID="quick-message-test"
120
+ >
121
+ <Text
122
+ style={
123
+ [
124
+ [
125
+ {
126
+ "fontFamily": "Montserrat",
127
+ "fontSize": 14,
128
+ "lineHeight": 22.4,
129
+ },
130
+ ],
131
+ {
132
+ "color": "#FFFFFF",
133
+ "textAlign": "center",
134
+ "width": "100%",
135
+ },
136
+ undefined,
137
+ ]
138
+ }
139
+ >
140
+ Test message
141
+ </Text>
142
+ </View>
143
+ `;
@@ -1,11 +1,8 @@
1
- import {PressableProps} from 'react-native';
1
+ import { PressableProps } from 'react-native';
2
2
  interface QuickMessageProps extends PressableProps {
3
- message: string;
4
- setMessage: (value: string) => void;
3
+ message: string;
4
+ setMessage: (value: string) => void;
5
+ selectedMessage: boolean;
5
6
  }
6
- export declare const QuickMessage: ({
7
- message,
8
- setMessage,
9
- ...props
10
- }: QuickMessageProps) => JSX.Element;
7
+ export declare const QuickMessage: ({ message, setMessage, selectedMessage, ...props }: QuickMessageProps) => JSX.Element;
11
8
  export {};
@@ -7,15 +7,17 @@ import {Stylesheet} from './quick-message.styles';
7
7
  interface QuickMessageProps extends PressableProps {
8
8
  message: string;
9
9
  setMessage: (value: string) => void;
10
+ selectedMessage: boolean;
10
11
  }
11
12
 
12
13
  export const QuickMessage = ({
13
14
  message,
14
15
  setMessage,
16
+ selectedMessage,
15
17
  ...props
16
18
  }: QuickMessageProps) => {
17
19
  const context = useContext(ThemeCtx);
18
- const styles = Stylesheet(context);
20
+ const styles = Stylesheet(context, selectedMessage);
19
21
 
20
22
  return (
21
23
  <Pressable
@@ -15,16 +15,25 @@ export const QuickMessagePreview = () => {
15
15
  padding: 32,
16
16
  }}
17
17
  >
18
- <QuickMessage message={'Test message'} setMessage={setMessage} />
18
+ <QuickMessage
19
+ message={'Test message'}
20
+ setMessage={setMessage}
21
+ selectedMessage={message === 'Test message'}
22
+ />
19
23
  <QuickMessage
20
24
  message={'Option message number 2'}
21
25
  setMessage={setMessage}
26
+ selectedMessage={message === 'Option message number 2'}
22
27
  />
23
28
  <QuickMessage
24
29
  message={
25
30
  'Aan het spelen met mijn vriendjes en vriendinnetjes in de speelhoek'
26
31
  }
27
32
  setMessage={setMessage}
33
+ selectedMessage={
34
+ message ===
35
+ 'Aan het spelen met mijn vriendjes en vriendinnetjes in de speelhoek'
36
+ }
28
37
  />
29
38
 
30
39
  <Text style={{textAlign: 'center'}}>Pressed message: {message}</Text>
@@ -1,14 +1,14 @@
1
- export function Stylesheet(context: any): {
2
- container: {
3
- width: string;
4
- backgroundColor: any;
5
- paddingTop: number;
6
- paddingBottom: number;
7
- paddingRight: number;
8
- paddingLeft: number;
9
- borderBottomLeftRadius: number;
10
- borderTopLeftRadius: number;
11
- borderTopRightRadius: number;
12
- borderBottomRightRadius: number;
13
- };
1
+ export function Stylesheet(context: any, selectedMessage: any): {
2
+ container: {
3
+ width: string;
4
+ backgroundColor: any;
5
+ paddingTop: number;
6
+ paddingBottom: number;
7
+ paddingRight: number;
8
+ paddingLeft: number;
9
+ borderBottomLeftRadius: number;
10
+ borderTopLeftRadius: number;
11
+ borderTopRightRadius: number;
12
+ borderBottomRightRadius: number;
13
+ };
14
14
  };
@@ -1,11 +1,13 @@
1
1
  import {StyleSheet} from 'react-native';
2
2
  import {Scale} from '../../../theme/scale/index';
3
3
 
4
- export const Stylesheet = (context) =>
4
+ export const Stylesheet = (context, selectedMessage) =>
5
5
  StyleSheet.create({
6
6
  container: {
7
7
  width: '100%',
8
- backgroundColor: context.colors.ui.darkgrey,
8
+ backgroundColor: !selectedMessage
9
+ ? context.colors.ui.darkgrey
10
+ : context.colors.main['5'],
9
11
  paddingTop: Scale.l,
10
12
  paddingBottom: Scale.l,
11
13
  paddingRight: Scale.l,
@@ -3,19 +3,51 @@ import {render, fireEvent} from '@testing-library/react-native';
3
3
  import {QuickMessage} from './quick-message.component';
4
4
 
5
5
  describe('QuickMessage', () => {
6
- it('should render correctly', () => {
6
+ it('should render a quick message that is not selected', () => {
7
7
  const {toJSON} = render(
8
- <QuickMessage message="Test message" setMessage={() => {}} />
8
+ <QuickMessage
9
+ message="Test message"
10
+ setMessage={() => {}}
11
+ selectedMessage={false}
12
+ />
13
+ );
14
+ expect(toJSON()).toMatchSnapshot();
15
+ });
16
+ it('should render a quick message that is selected', () => {
17
+ const {toJSON} = render(
18
+ <QuickMessage
19
+ message="Test message"
20
+ setMessage={() => {}}
21
+ selectedMessage={true}
22
+ />
9
23
  );
10
24
  expect(toJSON()).toMatchSnapshot();
11
25
  });
12
- });
13
26
 
14
- describe('QuickMessage', () => {
15
- it('should set the message when pressed', () => {
27
+ it('calls setMessage when pressed (selected)', () => {
28
+ const setMessageMock = jest.fn();
29
+ const {getByTestId} = render(
30
+ <QuickMessage
31
+ message="Test message"
32
+ setMessage={setMessageMock}
33
+ selectedMessage={true} // Mocking selectedMessage as true
34
+ />
35
+ );
36
+
37
+ const pressable = getByTestId('quick-message-test');
38
+ fireEvent.press(pressable);
39
+
40
+ expect(setMessageMock).toHaveBeenCalledWith('Test message');
41
+ });
42
+
43
+ it('calls setMessage when pressed (not selected)', () => {
16
44
  const setMessageMock = jest.fn();
17
45
  const {getByTestId} = render(
18
- <QuickMessage message="Test message" setMessage={setMessageMock} />
46
+ <QuickMessage
47
+ message="Test message"
48
+ setMessage={setMessageMock}
49
+ selectedMessage={false} // Mocking selectedMessage as false
50
+ />
19
51
  );
20
52
 
21
53
  const pressable = getByTestId('quick-message-test');
@@ -1,10 +1,7 @@
1
1
  import * as React from 'react';
2
2
  type splitContainerProps = {
3
- element1: React.ReactNode;
4
- element2?: React.ReactNode;
3
+ element1: React.ReactNode;
4
+ element2?: React.ReactNode;
5
5
  };
6
- declare const SplitContainer: ({
7
- element1,
8
- element2,
9
- }: splitContainerProps) => JSX.Element;
10
- export {SplitContainer as SplitContainer};
6
+ declare const SplitContainer: ({ element1, element2 }: splitContainerProps) => JSX.Element;
7
+ export { SplitContainer as SplitContainer };