@tactics/toddle-styleguide 2.0.4 → 3.0.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 (238) hide show
  1. package/App.tsx +0 -12
  2. package/app.json +1 -0
  3. package/babel.config.js +14 -1
  4. package/index.d.ts +1 -5
  5. package/index.tsx +0 -8
  6. package/metro.config.js +11 -0
  7. package/package.json +1 -1
  8. package/src/components/atoms/backdrop/backdrop.component.d.ts +4 -7
  9. package/src/components/atoms/calendar/calendar.component.d.ts +6 -11
  10. package/src/components/atoms/check-switch/check-switch.component.d.ts +3 -6
  11. package/src/components/atoms/count/count.component.d.ts +3 -6
  12. package/src/components/atoms/footer/footer.component.d.ts +3 -9
  13. package/src/components/atoms/footer/footer.component.tsx +5 -7
  14. package/src/components/atoms/footer/footer.preview.tsx +0 -17
  15. package/src/components/atoms/heading-components/all-caps-heading/all-caps-heading.component.d.ts +2 -10
  16. package/src/components/atoms/heading-components/heading1/heading1.component.d.ts +2 -10
  17. package/src/components/atoms/heading-components/heading2/heading2.component.d.ts +2 -10
  18. package/src/components/atoms/heading-components/heading3/heading3.component.d.ts +2 -10
  19. package/src/components/atoms/heading-components/heading4/heading4.component.d.ts +2 -10
  20. package/src/components/atoms/heading-components/index.d.ts +6 -6
  21. package/src/components/atoms/image-bubble/image-bubble.component.d.ts +6 -9
  22. package/src/components/atoms/increment-input/increment-input.component.d.ts +4 -8
  23. package/src/components/atoms/line/line.component.d.ts +4 -8
  24. package/src/components/atoms/logo/logo.component.d.ts +4 -4
  25. package/src/components/atoms/paragraph-components/index.d.ts +4 -4
  26. package/src/components/atoms/paragraph-components/paragraph/paragraph.component.d.ts +2 -10
  27. package/src/components/atoms/paragraph-components/small-text/small-text.component.d.ts +2 -10
  28. package/src/components/atoms/paragraph-components/tiny-text/tiny-text.component.d.ts +2 -10
  29. package/src/components/atoms/quick-message/quick-message.component.d.ts +5 -10
  30. package/src/components/atoms/split-container/split-container.component.d.ts +4 -7
  31. package/src/components/atoms/static-wave/static-wave.component.d.ts +6 -11
  32. package/src/components/atoms/text-input/text-input.component.d.ts +6 -10
  33. package/src/components/atoms/text-input/text-input.preview.d.ts +1 -1
  34. package/src/components/molecules/amount/amount.component.d.ts +8 -15
  35. package/src/components/molecules/avatar/avatar.component.d.ts +12 -20
  36. package/src/components/molecules/bare-time-picker/bare-time-picker.component.d.ts +5 -10
  37. package/src/components/molecules/bare-time-picker/bare-time-picker.component.native.tsx +78 -0
  38. package/src/components/molecules/bare-time-picker/bare-time-picker.component.tsx +16 -42
  39. package/src/components/molecules/bare-time-picker/bare-time-picker.styles.d.ts +12 -6
  40. package/src/components/molecules/bare-time-picker/bare-time-picker.styles.js +6 -0
  41. package/src/components/molecules/blocked-message/blocked-message.component.d.ts +2 -4
  42. package/src/components/molecules/button/button.component.d.ts +11 -20
  43. package/src/components/molecules/calendar-select/calendar-select.component.d.ts +7 -12
  44. package/src/components/molecules/cancel-link/cancel-link.component.d.ts +4 -7
  45. package/src/components/molecules/checkbox/checkbox.component.d.ts +5 -9
  46. package/src/components/molecules/contact-role/contact-role.component.d.ts +3 -6
  47. package/src/components/molecules/context-label/context-label.component.d.ts +4 -7
  48. package/src/components/molecules/date-input/date-input.component.d.ts +4 -7
  49. package/src/components/molecules/default-select/default-select.component.d.ts +3 -6
  50. package/src/components/molecules/department_logo/department-logo.component.d.ts +3 -5
  51. package/src/components/molecules/failed-to-send/failed-bubble.component.d.ts +6 -11
  52. package/src/components/molecules/filter-range/filter-range.component.d.ts +7 -14
  53. package/src/components/molecules/filter-tab/filter-tab.component.d.ts +7 -11
  54. package/src/components/molecules/info/info.component.d.ts +5 -9
  55. package/src/components/molecules/inline-error/inline-error.component.d.ts +3 -3
  56. package/src/components/molecules/inline-notice/inline-notice.component.d.ts +3 -3
  57. package/src/components/molecules/language-button/language-button.component.d.ts +4 -8
  58. package/src/components/molecules/message-input/message-input.component.d.ts +6 -10
  59. package/src/components/molecules/more-info-button/more-info-button.component.d.ts +4 -8
  60. package/src/components/molecules/password-input/password-input.component.d.ts +5 -9
  61. package/src/components/molecules/pill/pill.component.d.ts +5 -5
  62. package/src/components/molecules/pressable-icon/pressable-icon.component.d.ts +5 -10
  63. package/src/components/molecules/quick-filter/quick-filter.component.d.ts +9 -16
  64. package/src/components/molecules/search-input/search.component.d.ts +7 -12
  65. package/src/components/molecules/search-input/search.preview.d.ts +1 -1
  66. package/src/components/molecules/select-link/select-link.component.d.ts +4 -7
  67. package/src/components/molecules/select-list-item/select-list-item.component.d.ts +9 -16
  68. package/src/components/molecules/select-picker/select-picker.component.d.ts +8 -13
  69. package/src/components/molecules/selectable-list-item/selectable-list-item.component.d.ts +8 -15
  70. package/src/components/molecules/send-bubble/send-text-bubble.component.d.ts +7 -13
  71. package/src/components/molecules/snackbar/snackbar.component.d.ts +5 -8
  72. package/src/components/molecules/swipe/swipe.component.d.ts +5 -8
  73. package/src/components/molecules/swipe/swipe.component.native.tsx +78 -0
  74. package/src/components/molecules/swipe/swipe.component.tsx +5 -63
  75. package/src/components/molecules/tag/tag.component.d.ts +6 -11
  76. package/src/components/molecules/time-picker/time-picker.component.d.ts +5 -10
  77. package/src/components/molecules/time-tracker/time-tracker.component.d.ts +6 -10
  78. package/src/components/molecules/timeline/timeline.component.d.ts +3 -6
  79. package/src/components/molecules/timestamp/timestamp.component.d.ts +4 -7
  80. package/src/components/molecules/wave-background/wave.component.d.ts +2 -7
  81. package/src/components/molecules/wide-button/wide-button.component.d.ts +6 -11
  82. package/src/components/organisms/child-list-item/child-list-item.component.d.ts +20 -38
  83. package/src/components/organisms/child-list-item/components/child-list-tag.component.d.ts +3 -6
  84. package/src/components/organisms/contact-item/contact-item.component.d.ts +6 -11
  85. package/src/components/organisms/journal-entry/components/entry-type-indicator/entry-type-indicator.component.d.ts +3 -6
  86. package/src/components/organisms/journal-entry/components/journal-entry-type/journal-entry-type.component.d.ts +7 -13
  87. package/src/components/organisms/journal-entry/journal-entry.component.d.ts +16 -30
  88. package/src/components/organisms/loading-indicator/animation-style.animate.d.ts +3 -13
  89. package/src/components/organisms/loading-indicator/dot.component.d.ts +3 -3
  90. package/src/components/organisms/loading-indicator/loading-indicator.component.d.ts +2 -9
  91. package/src/components/organisms/my-child-list-item/my-child-list-item.component.d.ts +9 -16
  92. package/src/components/organisms/person-info-card/person-info-card.component.d.ts +10 -18
  93. package/src/components/organisms/text-bubble/text-bubble.component.d.ts +12 -21
  94. package/src/components/organisms/timetable-edit/timetable-edit.component.d.ts +13 -25
  95. package/src/components/organisms/timetable-editor/components/timetable-edit-wrapper.d.ts +8 -14
  96. package/src/components/organisms/timetable-editor/timetable-editor-staff.component.d.ts +4 -7
  97. package/src/components/organisms/timetable-editor/timetable-editor.component.d.ts +4 -7
  98. package/src/components/templates/modal/components/fade-panel.component.d.ts +7 -14
  99. package/src/components/templates/modal/modal.component.d.ts +6 -12
  100. package/src/components/templates/popover/components/foreground/foreground.component.d.ts +4 -6
  101. package/src/components/templates/popover/components/modal/close/close.component.d.ts +4 -4
  102. package/src/components/templates/popover/components/modal/heading/heading.component.d.ts +4 -7
  103. package/src/components/templates/popover/components/modal/modal.component.d.ts +9 -17
  104. package/src/components/templates/popover/components/modal/scroll-content/scroll-content.component.d.ts +3 -5
  105. package/src/components/templates/popover/popover.component.d.ts +8 -15
  106. package/src/components/templates/popover-action/popover-action.component.tsx +1 -0
  107. package/src/context/loading-dots.context.d.ts +6 -9
  108. package/src/context/theme.context.d.ts +65 -65
  109. package/src/gradients/main/main.gradient.d.ts +2 -4
  110. package/src/icons/index.d.ts +2 -7
  111. package/src/icons/outline/calendar/calendar.icon.d.ts +2 -5
  112. package/src/icons/outline/chat/chat.icon.d.ts +2 -5
  113. package/src/icons/outline/chat-alt/chat-alt.icon.d.ts +2 -5
  114. package/src/icons/outline/check-circle/check-circle.icon.d.ts +2 -5
  115. package/src/icons/outline/chevron-left/chevron-left.icon.d.ts +2 -5
  116. package/src/icons/outline/chevron-right/chevron-right.icon.d.ts +2 -5
  117. package/src/icons/outline/clock/clock.icon.d.ts +2 -5
  118. package/src/icons/outline/cloud-download/cloud-download.icon.d.ts +2 -5
  119. package/src/icons/outline/currency-euro/currency-euro.icon.d.ts +2 -5
  120. package/src/icons/outline/document-text/document-text.icon.d.ts +2 -5
  121. package/src/icons/outline/exclamation/exclamation.icon.d.ts +2 -5
  122. package/src/icons/outline/exclamation-circle/exclamation-circle.icon.d.ts +2 -5
  123. package/src/icons/outline/eye/eye.icon.d.ts +2 -5
  124. package/src/icons/outline/eye-off/eye-off.icon.d.ts +2 -5
  125. package/src/icons/outline/filter/filter.icon.d.ts +2 -5
  126. package/src/icons/outline/information-circle/information-circle.icon.d.ts +2 -5
  127. package/src/icons/outline/logout/logout.icon.d.ts +2 -5
  128. package/src/icons/outline/mail/mail.icon.d.ts +2 -5
  129. package/src/icons/outline/mail-open/mail-open.icon.d.ts +2 -5
  130. package/src/icons/outline/menu/menu.icon.d.ts +2 -5
  131. package/src/icons/outline/minus-sm/minus-sm.icon.d.ts +2 -5
  132. package/src/icons/outline/office-building/office-building.icon.d.ts +2 -5
  133. package/src/icons/outline/outline.d.ts +2 -6
  134. package/src/icons/outline/paper-airplane/paper-airplane.icon.d.ts +2 -5
  135. package/src/icons/outline/paperclip/paperclip.icon.d.ts +2 -5
  136. package/src/icons/outline/pencil/pencil.icon.d.ts +2 -5
  137. package/src/icons/outline/phone/phone.icon.d.ts +2 -5
  138. package/src/icons/outline/photograph/photograph.icon.d.ts +2 -5
  139. package/src/icons/outline/plus/plus.icon.d.ts +2 -5
  140. package/src/icons/outline/plus-sm/plus-sm.icon.d.ts +2 -5
  141. package/src/icons/outline/qrcode/qrcode.icon.d.ts +2 -5
  142. package/src/icons/outline/refresh/refresh.icon.d.ts +2 -5
  143. package/src/icons/outline/search/search.icon.d.ts +2 -5
  144. package/src/icons/outline/selector/selector.icon.d.ts +2 -5
  145. package/src/icons/outline/share/share.icon.d.ts +2 -5
  146. package/src/icons/outline/sm-view-grid-add/sm-view-grid-add.icon.d.ts +2 -5
  147. package/src/icons/outline/status-online/status-online.icon.d.ts +2 -5
  148. package/src/icons/outline/thumb-up/thumb-up.icon.d.ts +2 -5
  149. package/src/icons/outline/trash/trash.icon.d.ts +2 -5
  150. package/src/icons/outline/user/user.icon.d.ts +2 -5
  151. package/src/icons/outline/user-group/user-group.icon.d.ts +2 -5
  152. package/src/icons/outline/users/users.icon.d.ts +2 -5
  153. package/src/icons/outline/xmark/xmark.icon.d.ts +2 -5
  154. package/src/icons/solid/calendar/calendar.icon.d.ts +2 -5
  155. package/src/icons/solid/chat/chat.icon.d.ts +2 -5
  156. package/src/icons/solid/chat-alt/chat-alt-solid.icon.d.ts +2 -5
  157. package/src/icons/solid/check-circle/check-circle.icon.d.ts +2 -5
  158. package/src/icons/solid/chevron-left/chevron-left.icon.d.ts +2 -5
  159. package/src/icons/solid/chevron-right/chevron-right.icon.d.ts +2 -5
  160. package/src/icons/solid/clock/clock-solid.icon.d.ts +2 -5
  161. package/src/icons/solid/cloud-download/cloud-download.icon.d.ts +2 -5
  162. package/src/icons/solid/currency-euro/currency-euro.icon.d.ts +2 -5
  163. package/src/icons/solid/document-text/document-text-solid.icon.d.ts +2 -5
  164. package/src/icons/solid/exclamation/exclamation.icon.d.ts +2 -5
  165. package/src/icons/solid/exclamation-circle/exclamation-circle.icon.d.ts +2 -5
  166. package/src/icons/solid/eye/eye.icon.d.ts +2 -5
  167. package/src/icons/solid/eye-off/eye-off.icon.d.ts +2 -5
  168. package/src/icons/solid/filter/filter.icon.d.ts +2 -5
  169. package/src/icons/solid/information-circle/information-circle-solid.icon.d.ts +2 -5
  170. package/src/icons/solid/logout/logout.icon.d.ts +2 -5
  171. package/src/icons/solid/mail/mail.icon.d.ts +2 -5
  172. package/src/icons/solid/mail-open/mail-open.icon.d.ts +2 -5
  173. package/src/icons/solid/menu/menu.icon.d.ts +2 -5
  174. package/src/icons/solid/minus-sm/minus-sm.icon.d.ts +2 -5
  175. package/src/icons/solid/office-building/office-building.icon.d.ts +2 -5
  176. package/src/icons/solid/paper-airplane/paper-airplane.icon.d.ts +2 -5
  177. package/src/icons/solid/paperclip/paperclip.icon.d.ts +2 -5
  178. package/src/icons/solid/pencil/pencil-solid.icon.d.ts +2 -5
  179. package/src/icons/solid/phone/phone-solid.icon.d.ts +2 -5
  180. package/src/icons/solid/photograph/photograph-solid.icon.d.ts +2 -5
  181. package/src/icons/solid/plus/plus.icon.d.ts +2 -5
  182. package/src/icons/solid/plus-sm/plus-sm.icon.d.ts +2 -5
  183. package/src/icons/solid/qrcode/qrcode.icon.d.ts +2 -5
  184. package/src/icons/solid/refresh/refresh-solid.icon.d.ts +2 -5
  185. package/src/icons/solid/search/search.icon.d.ts +2 -5
  186. package/src/icons/solid/selector/selector.icon.d.ts +2 -5
  187. package/src/icons/solid/share/share.icon.d.ts +2 -5
  188. package/src/icons/solid/sm-view-grid-add/sm-view-grid-add.icon.d.ts +2 -5
  189. package/src/icons/solid/solid.d.ts +2 -6
  190. package/src/icons/solid/status-online/status-online-solid.icon.d.ts +2 -5
  191. package/src/icons/solid/thumb-up/thumb-up.icon.d.ts +2 -5
  192. package/src/icons/solid/trash/trash-solid.icon.d.ts +2 -5
  193. package/src/icons/solid/user/user.icon.d.ts +2 -5
  194. package/src/icons/solid/user-group/user-group.icon.d.ts +2 -5
  195. package/src/icons/solid/users/users-solid.icon.d.ts +2 -5
  196. package/src/icons/solid/xmark/xmark.icon.d.ts +2 -5
  197. package/src/interfaces/icon.interface.d.ts +5 -5
  198. package/src/models/hex-color.model.d.ts +4 -4
  199. package/src/models/initials.model.d.ts +5 -5
  200. package/src/models/time-slot-record.d.ts +11 -11
  201. package/src/models/time-slot-sequence.d.ts +13 -15
  202. package/src/theme/font/font.d.ts +70 -70
  203. package/src/theme/font/index.d.ts +3 -3
  204. package/src/theme/provider/index.d.ts +3 -3
  205. package/src/theme/provider/parent.theme.d.ts +63 -63
  206. package/src/theme/provider/staff-member.theme.d.ts +63 -63
  207. package/src/theme/responsive/index.d.ts +2 -5
  208. package/src/theme/scale/index.d.ts +10 -10
  209. package/src/types/bubble-alignment.enum.d.ts +2 -2
  210. package/src/types/icontype.type.d.ts +1 -43
  211. package/src/types/keyboard-types.enum.d.ts +7 -7
  212. package/src/types/loading-dots.type.d.ts +6 -6
  213. package/src/types/size.enum.d.ts +3 -3
  214. package/src/types/state.enum.d.ts +4 -4
  215. package/src/types/text-properties.type.d.ts +8 -8
  216. package/src/types/timetable-edit.enum.d.ts +3 -3
  217. package/src/types/visual-state.enum.d.ts +5 -5
  218. package/src/utilities/color-handler/color-handler.d.ts +4 -12
  219. package/src/utilities/toddle-datetime/interfaces/duration.interface.d.ts +18 -18
  220. package/src/utilities/toddle-datetime/interfaces/toddle-datetime.interface.d.ts +16 -16
  221. package/src/utilities/toddle-datetime/toddle-datetime.class.d.ts +46 -103
  222. package/src/utilities/toddle-datetime/types/duration.type.d.ts +1 -1
  223. package/src/utilities/toddle-datetime/types/toddle-datetime.type.d.ts +2 -11
  224. package/tsconfig.json +2 -1
  225. package/src/components/organisms/day-select/day-select.component.d.ts +0 -13
  226. package/src/components/organisms/day-select/day-select.component.tsx +0 -122
  227. package/src/components/organisms/day-select/day-select.preview.d.ts +0 -2
  228. package/src/components/organisms/day-select/day-select.preview.tsx +0 -23
  229. package/src/components/organisms/day-select/day-select.styles.d.ts +0 -18
  230. package/src/components/organisms/day-select/day-select.styles.js +0 -22
  231. package/src/components/organisms/tab-view/__snapshots__/tab-view.test.js.snap +0 -421
  232. package/src/components/organisms/tab-view/tab-view.component.d.ts +0 -16
  233. package/src/components/organisms/tab-view/tab-view.component.tsx +0 -49
  234. package/src/components/organisms/tab-view/tab-view.preview.d.ts +0 -2
  235. package/src/components/organisms/tab-view/tab-view.preview.tsx +0 -37
  236. package/src/components/organisms/tab-view/tab-view.styles.d.ts +0 -10
  237. package/src/components/organisms/tab-view/tab-view.styles.js +0 -14
  238. package/src/components/organisms/tab-view/tab-view.test.js +0 -37
@@ -1,421 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`TabView should render correctly 1`] = `
4
- <View
5
- style={
6
- {
7
- "gap": 24,
8
- "height": "100%",
9
- "width": "100%",
10
- }
11
- }
12
- >
13
- <View
14
- style={
15
- {
16
- "backgroundColor": "#E5E8EB",
17
- "borderRadius": 16,
18
- "display": "flex",
19
- "paddingBottom": 4,
20
- "paddingLeft": 8,
21
- "paddingRight": 8,
22
- "paddingTop": 4,
23
- "width": "100%",
24
- }
25
- }
26
- >
27
- <View
28
- onLayout={[Function]}
29
- style={
30
- {
31
- "display": "flex",
32
- "width": "100%",
33
- }
34
- }
35
- >
36
- <View
37
- style={
38
- {
39
- "alignItems": "stretch",
40
- "display": "flex",
41
- "flexDirection": "column",
42
- "position": "relative",
43
- "width": "100%",
44
- }
45
- }
46
- >
47
- <View
48
- accessibilityState={
49
- {
50
- "busy": undefined,
51
- "checked": undefined,
52
- "disabled": undefined,
53
- "expanded": undefined,
54
- "selected": undefined,
55
- }
56
- }
57
- accessibilityValue={
58
- {
59
- "max": undefined,
60
- "min": undefined,
61
- "now": undefined,
62
- "text": undefined,
63
- }
64
- }
65
- accessible={true}
66
- collapsable={false}
67
- focusable={true}
68
- onBlur={[Function]}
69
- onClick={[Function]}
70
- onFocus={[Function]}
71
- onResponderGrant={[Function]}
72
- onResponderMove={[Function]}
73
- onResponderRelease={[Function]}
74
- onResponderTerminate={[Function]}
75
- onResponderTerminationRequest={[Function]}
76
- onStartShouldSetResponder={[Function]}
77
- style={
78
- {
79
- "alignItems": "center",
80
- "backgroundColor": "transparent",
81
- "borderRadius": 16,
82
- "paddingBottom": 8,
83
- "paddingLeft": 16,
84
- "paddingRight": 16,
85
- "paddingTop": 8,
86
- "width": 0,
87
- }
88
- }
89
- >
90
- <Text
91
- style={
92
- [
93
- [
94
- {
95
- "fontFamily": "SourceSansPro",
96
- "fontSize": 16,
97
- "lineHeight": 22.4,
98
- },
99
- ],
100
- {
101
- "color": "#FFFFFF",
102
- "textAlign": "center",
103
- "width": "100%",
104
- },
105
- {
106
- "maxHeight": 32,
107
- "overflow": "hidden",
108
- "width": "100%",
109
- },
110
- ]
111
- }
112
- >
113
- Tab1
114
- </Text>
115
- </View>
116
- <View
117
- accessibilityState={
118
- {
119
- "busy": undefined,
120
- "checked": undefined,
121
- "disabled": undefined,
122
- "expanded": undefined,
123
- "selected": undefined,
124
- }
125
- }
126
- accessibilityValue={
127
- {
128
- "max": undefined,
129
- "min": undefined,
130
- "now": undefined,
131
- "text": undefined,
132
- }
133
- }
134
- accessible={true}
135
- collapsable={false}
136
- focusable={true}
137
- onBlur={[Function]}
138
- onClick={[Function]}
139
- onFocus={[Function]}
140
- onResponderGrant={[Function]}
141
- onResponderMove={[Function]}
142
- onResponderRelease={[Function]}
143
- onResponderTerminate={[Function]}
144
- onResponderTerminationRequest={[Function]}
145
- onStartShouldSetResponder={[Function]}
146
- style={
147
- {
148
- "alignItems": "center",
149
- "backgroundColor": "transparent",
150
- "borderRadius": 16,
151
- "paddingBottom": 8,
152
- "paddingLeft": 16,
153
- "paddingRight": 16,
154
- "paddingTop": 8,
155
- "width": 0,
156
- }
157
- }
158
- >
159
- <Text
160
- style={
161
- [
162
- [
163
- {
164
- "fontFamily": "SourceSansPro",
165
- "fontSize": 16,
166
- "lineHeight": 22.4,
167
- },
168
- ],
169
- {
170
- "color": "#19216C",
171
- "textAlign": "center",
172
- "width": "100%",
173
- },
174
- {
175
- "maxHeight": 32,
176
- "overflow": "hidden",
177
- "width": "100%",
178
- },
179
- ]
180
- }
181
- >
182
- Tab2
183
- </Text>
184
- </View>
185
- <View
186
- accessibilityState={
187
- {
188
- "busy": undefined,
189
- "checked": undefined,
190
- "disabled": undefined,
191
- "expanded": undefined,
192
- "selected": undefined,
193
- }
194
- }
195
- accessibilityValue={
196
- {
197
- "max": undefined,
198
- "min": undefined,
199
- "now": undefined,
200
- "text": undefined,
201
- }
202
- }
203
- accessible={true}
204
- collapsable={false}
205
- focusable={true}
206
- onBlur={[Function]}
207
- onClick={[Function]}
208
- onFocus={[Function]}
209
- onResponderGrant={[Function]}
210
- onResponderMove={[Function]}
211
- onResponderRelease={[Function]}
212
- onResponderTerminate={[Function]}
213
- onResponderTerminationRequest={[Function]}
214
- onStartShouldSetResponder={[Function]}
215
- style={
216
- {
217
- "alignItems": "center",
218
- "backgroundColor": "transparent",
219
- "borderRadius": 16,
220
- "paddingBottom": 8,
221
- "paddingLeft": 16,
222
- "paddingRight": 16,
223
- "paddingTop": 8,
224
- "width": 0,
225
- }
226
- }
227
- >
228
- <Text
229
- style={
230
- [
231
- [
232
- {
233
- "fontFamily": "SourceSansPro",
234
- "fontSize": 16,
235
- "lineHeight": 22.4,
236
- },
237
- ],
238
- {
239
- "color": "#19216C",
240
- "textAlign": "center",
241
- "width": "100%",
242
- },
243
- {
244
- "maxHeight": 32,
245
- "overflow": "hidden",
246
- "width": "100%",
247
- },
248
- ]
249
- }
250
- >
251
- Tab3
252
- </Text>
253
- </View>
254
- <View
255
- collapsable={false}
256
- style={
257
- {
258
- "alignItems": "center",
259
- "backgroundColor": "#647ACB",
260
- "borderRadius": 12,
261
- "marginTop": 3,
262
- "maxHeight": 32,
263
- "paddingBottom": 8,
264
- "paddingLeft": 16,
265
- "paddingRight": 16,
266
- "paddingTop": 8,
267
- "position": "absolute",
268
- "transform": [
269
- {
270
- "translateY": 0,
271
- },
272
- ],
273
- "width": 0,
274
- "zIndex": -1,
275
- }
276
- }
277
- >
278
- <Text
279
- style={
280
- [
281
- [
282
- {
283
- "fontFamily": "SourceSansPro",
284
- "fontSize": 16,
285
- "lineHeight": 22.4,
286
- },
287
- ],
288
- {
289
- "color": "#19216C",
290
- "textAlign": undefined,
291
- "width": "100%",
292
- },
293
- [
294
- {
295
- "maxHeight": 32,
296
- "overflow": "hidden",
297
- "width": "100%",
298
- },
299
- {
300
- "opacity": 0,
301
- },
302
- ],
303
- ]
304
- }
305
- >
306
- Hidden
307
- </Text>
308
- </View>
309
- </View>
310
- </View>
311
- </View>
312
- <RNCViewPager
313
- collapsable={false}
314
- layoutDirection="ltr"
315
- onMoveShouldSetResponderCapture={[Function]}
316
- onPageScroll={[Function]}
317
- onPageScrollStateChanged={[Function]}
318
- onPageSelected={[Function]}
319
- scrollEnabled={false}
320
- style={
321
- {
322
- "flex": 1,
323
- }
324
- }
325
- >
326
- <View
327
- collapsable={false}
328
- style={
329
- {
330
- "bottom": 0,
331
- "left": 0,
332
- "position": "absolute",
333
- "right": 0,
334
- "top": 0,
335
- }
336
- }
337
- >
338
- <View
339
- style={
340
- [
341
- undefined,
342
- {
343
- "bottom": 0,
344
- "left": 0,
345
- "position": "absolute",
346
- "right": 0,
347
- "top": 0,
348
- },
349
- ]
350
- }
351
- >
352
- <Text>
353
- Tab1
354
- </Text>
355
- </View>
356
- </View>
357
- <View
358
- collapsable={false}
359
- style={
360
- {
361
- "bottom": 0,
362
- "left": 0,
363
- "position": "absolute",
364
- "right": 0,
365
- "top": 0,
366
- }
367
- }
368
- >
369
- <View
370
- style={
371
- [
372
- undefined,
373
- {
374
- "bottom": 0,
375
- "left": 0,
376
- "position": "absolute",
377
- "right": 0,
378
- "top": 0,
379
- },
380
- ]
381
- }
382
- >
383
- <Text>
384
- Tab2
385
- </Text>
386
- </View>
387
- </View>
388
- <View
389
- collapsable={false}
390
- style={
391
- {
392
- "bottom": 0,
393
- "left": 0,
394
- "position": "absolute",
395
- "right": 0,
396
- "top": 0,
397
- }
398
- }
399
- >
400
- <View
401
- style={
402
- [
403
- undefined,
404
- {
405
- "bottom": 0,
406
- "left": 0,
407
- "position": "absolute",
408
- "right": 0,
409
- "top": 0,
410
- },
411
- ]
412
- }
413
- >
414
- <Text>
415
- Tab3
416
- </Text>
417
- </View>
418
- </View>
419
- </RNCViewPager>
420
- </View>
421
- `;
@@ -1,16 +0,0 @@
1
- import {ReactNode} from 'react';
2
- import React from 'react';
3
- interface TabViewProps {
4
- tabItem: {
5
- value: string;
6
- label: string;
7
- }[];
8
- children: ReactNode;
9
- setTabValue: (value: string) => void;
10
- }
11
- export declare const TabView: ({
12
- tabItem,
13
- setTabValue,
14
- children,
15
- }: TabViewProps) => React.JSX.Element;
16
- export {};
@@ -1,49 +0,0 @@
1
- import {FilterTab} from '../../molecules/filter-tab/filter-tab.component';
2
- import {View} from 'react-native';
3
- import PagerView, {PagerViewOnPageSelectedEvent} from 'react-native-pager-view';
4
- import {ReactNode, useEffect, useRef, useState} from 'react';
5
- import {Stylesheet} from './tab-view.styles';
6
- import React from 'react';
7
-
8
- interface TabViewProps {
9
- tabItem: {
10
- value: string;
11
- label: string;
12
- }[];
13
- children: ReactNode;
14
- setTabValue: (value: string) => void;
15
- }
16
-
17
- export const TabView = ({tabItem, setTabValue, children}: TabViewProps) => {
18
- const styles = Stylesheet();
19
- const viewPagerRef = useRef<PagerView>(null);
20
- const [activePage, setActivePage] = useState(0);
21
-
22
- useEffect(() => {
23
- viewPagerRef.current?.setPage(activePage);
24
- }, [activePage, tabItem]);
25
-
26
- const handleActivePage = (event: PagerViewOnPageSelectedEvent) => {
27
- const currentIndex = event.nativeEvent.position;
28
- setActivePage(currentIndex);
29
- };
30
-
31
- return (
32
- <View style={styles.rootContainer}>
33
- <FilterTab
34
- tabItem={tabItem}
35
- setFilterValue={setTabValue}
36
- setActivePage={setActivePage}
37
- />
38
- <PagerView
39
- ref={viewPagerRef}
40
- scrollEnabled={false}
41
- style={styles.swipeContainer}
42
- collapsable={false}
43
- onPageSelected={handleActivePage}
44
- >
45
- {children}
46
- </PagerView>
47
- </View>
48
- );
49
- };
@@ -1,2 +0,0 @@
1
- import React from 'react';
2
- export declare const TabViewPreview: () => React.JSX.Element;
@@ -1,37 +0,0 @@
1
- import {Text, View} from 'react-native';
2
- import {TabView} from './tab-view.component';
3
- import {useState} from 'react';
4
- import React from 'react';
5
-
6
- export const TabViewPreview = () => {
7
- const tabs = [
8
- {value: 'Registration', label: 'Registration'},
9
- {value: 'Products', label: 'Products'},
10
- ];
11
-
12
- const [tabValue, setTabValue] = useState<string>(tabs[0].value);
13
-
14
- console.log('Active tab: ', tabValue);
15
-
16
- return (
17
- <View
18
- style={{
19
- flex: 1,
20
- flexDirection: 'row',
21
- alignItems: 'center',
22
- justifyContent: 'center',
23
- backgroundColor: 'white',
24
- padding: 32,
25
- }}
26
- >
27
- <TabView tabItem={tabs} setTabValue={setTabValue}>
28
- <View style={{height: 500, alignItems: 'center'}}>
29
- <Text>Tab 1</Text>
30
- </View>
31
- <View style={{height: 500, alignItems: 'center'}}>
32
- <Text>Tab 2</Text>
33
- </View>
34
- </TabView>
35
- </View>
36
- );
37
- };
@@ -1,10 +0,0 @@
1
- export function Stylesheet(): {
2
- rootContainer: {
3
- width: '100%';
4
- height: '100%';
5
- gap: number;
6
- };
7
- swipeContainer: {
8
- flex: number;
9
- };
10
- };
@@ -1,14 +0,0 @@
1
- import {StyleSheet} from 'react-native';
2
- import {Scale} from '../../../theme/scale/index';
3
-
4
- export const Stylesheet = () =>
5
- StyleSheet.create({
6
- rootContainer: {
7
- width: '100%',
8
- height: '100%',
9
- gap: Scale.l,
10
- },
11
- swipeContainer: {
12
- flex: 1,
13
- },
14
- });
@@ -1,37 +0,0 @@
1
- import {render} from '@testing-library/react-native';
2
- import {TabView} from './tab-view.component';
3
- import {View, Text} from 'react-native';
4
-
5
- describe('TabView', () => {
6
- it('should render correctly', () => {
7
- const tabs = [
8
- {
9
- value: 'Tab1',
10
- label: 'Tab1',
11
- },
12
- {
13
- value: 'Tab2',
14
- label: 'Tab2',
15
- },
16
- {
17
- value: 'Tab3',
18
- label: 'Tab3',
19
- },
20
- ];
21
-
22
- const {toJSON} = render(
23
- <TabView tabItem={tabs} setTabValue={() => 'Tab2'}>
24
- <View>
25
- <Text>Tab1</Text>
26
- </View>
27
- <View>
28
- <Text>Tab2</Text>
29
- </View>
30
- <View>
31
- <Text>Tab3</Text>
32
- </View>
33
- </TabView>
34
- );
35
- expect(toJSON()).toMatchSnapshot();
36
- });
37
- });