@tactics/toddle-styleguide 5.3.1 → 5.3.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 (178) hide show
  1. package/App.tsx +0 -19
  2. package/app.json +8 -4
  3. package/index.tsx +0 -4
  4. package/package.json +55 -27
  5. package/src/components/atoms/calendar/calendar.component.tsx +10 -6
  6. package/src/components/atoms/calendar/calendar.preview.tsx +4 -3
  7. package/src/components/molecules/amount/amount.component.tsx +5 -4
  8. package/src/components/molecules/calendar-select/calendar-select.component.d.ts +4 -4
  9. package/src/components/molecules/calendar-select/calendar-select.component.tsx +17 -16
  10. package/src/components/molecules/calendar-select/calendar-select.preview.tsx +16 -5
  11. package/src/components/molecules/date-input/date-input.component.d.ts +2 -2
  12. package/src/components/molecules/date-input/date-input.component.tsx +3 -3
  13. package/src/components/molecules/date-input/date-input.preview.tsx +5 -5
  14. package/src/components/molecules/day/day.component.d.ts +3 -3
  15. package/src/components/molecules/day/day.component.tsx +22 -17
  16. package/src/components/molecules/selectable-list-item/selectable-list-item.component.tsx +12 -7
  17. package/src/components/molecules/timestamp/timestamp.component.d.ts +2 -2
  18. package/src/components/molecules/timestamp/timestamp.component.tsx +12 -5
  19. package/src/components/organisms/journal-entry/components/journal-entry-type/journal-entry-type.component.d.ts +2 -2
  20. package/src/components/organisms/journal-entry/components/journal-entry-type/journal-entry-type.component.tsx +5 -5
  21. package/src/components/organisms/journal-entry/journal-entry.component.d.ts +3 -3
  22. package/src/components/organisms/journal-entry/journal-entry.component.tsx +7 -3
  23. package/src/components/organisms/journal-entry/journal-entry.preview.tsx +7 -3
  24. package/src/components/organisms/text-bubble/text-bubble.component.d.ts +2 -2
  25. package/src/components/organisms/text-bubble/text-bubble.component.tsx +6 -3
  26. package/src/components/organisms/text-bubble/text-bubble.preview.tsx +19 -7
  27. package/src/components/templates/popover-action/popover-action.component.tsx +9 -8
  28. package/src/icons/solid/cloud-download/cloud-download.icon.tsx +1 -1
  29. package/src/icons/solid/refresh/refresh-solid.icon.tsx +2 -2
  30. package/src/utilities/datetime/clock.class.tsx +14 -0
  31. package/src/utilities/datetime/dateonly.class.tsx +287 -0
  32. package/src/utilities/datetime/datetime.class.tsx +288 -0
  33. package/src/utilities/datetime/day.class.tsx +48 -0
  34. package/src/utilities/datetime/dayjs-config.ts +96 -0
  35. package/src/utilities/datetime/dayoftheweek.class.tsx +242 -0
  36. package/src/utilities/datetime/hour.class.tsx +60 -0
  37. package/src/utilities/datetime/locale.tsx +6 -0
  38. package/src/utilities/datetime/millisecond.class.tsx +48 -0
  39. package/src/utilities/datetime/minute.class.tsx +55 -0
  40. package/src/utilities/datetime/month.class.tsx +74 -0
  41. package/src/utilities/datetime/second.class.tsx +52 -0
  42. package/src/utilities/datetime/time.class.tsx +190 -0
  43. package/src/utilities/datetime/timezone.class.tsx +36 -0
  44. package/src/utilities/datetime/year.class.tsx +78 -0
  45. package/src/utilities/datetime/yearandmonth.class.tsx +80 -0
  46. package/src/components/atoms/background-gradient/__snapshots__/background-gradient.test.js.snap +0 -40
  47. package/src/components/atoms/background-gradient/background-gradient.test.js +0 -10
  48. package/src/components/atoms/calendar/__snapshots__/calendar.test.js.snap +0 -6817
  49. package/src/components/atoms/calendar/calendar.test.js +0 -35
  50. package/src/components/atoms/check-switch/__snapshots__/check-switch.test.js.snap +0 -84
  51. package/src/components/atoms/check-switch/check-switch.test.js +0 -13
  52. package/src/components/atoms/heading-components/all-caps-heading/__snapshots__/all-caps-heading.test.js.snap +0 -113
  53. package/src/components/atoms/heading-components/all-caps-heading/all-caps-heading.test.js +0 -44
  54. package/src/components/atoms/heading-components/heading1/__snapshots__/heading1.test.js.snap +0 -121
  55. package/src/components/atoms/heading-components/heading1/heading1.test.js +0 -51
  56. package/src/components/atoms/heading-components/heading2/__snapshots__/heading2.test.js.snap +0 -121
  57. package/src/components/atoms/heading-components/heading2/heading2.test.js +0 -51
  58. package/src/components/atoms/heading-components/heading3/__snapshots__/heading3.test.js.snap +0 -121
  59. package/src/components/atoms/heading-components/heading3/heading3.test.js +0 -51
  60. package/src/components/atoms/heading-components/heading4/__snapshots__/heading4.test.js.snap +0 -121
  61. package/src/components/atoms/heading-components/heading4/heading4.test.js +0 -51
  62. package/src/components/atoms/image-bubble/__snapshots__/image-bubble.test.js.snap +0 -67
  63. package/src/components/atoms/image-bubble/image-bubble.test.js +0 -20
  64. package/src/components/atoms/increment-input/__snapshots__/increment-input.test.js.snap +0 -269
  65. package/src/components/atoms/increment-input/increment-input.test.js +0 -14
  66. package/src/components/atoms/logo/__snapshots__/logo.test.js.snap +0 -113
  67. package/src/components/atoms/logo/logo.test.js +0 -16
  68. package/src/components/atoms/paragraph-components/paragraph/__snapshots__/paragraph.test.js.snap +0 -121
  69. package/src/components/atoms/paragraph-components/paragraph/paragraph.test.js +0 -76
  70. package/src/components/atoms/paragraph-components/small-text/__snapshots__/small-text.test.js.snap +0 -121
  71. package/src/components/atoms/paragraph-components/small-text/small-text.test.js +0 -76
  72. package/src/components/atoms/paragraph-components/tiny-text/__snapshots__/tiny-text.test.js.snap +0 -121
  73. package/src/components/atoms/paragraph-components/tiny-text/tiny-text.test.js +0 -76
  74. package/src/components/atoms/quick-message/__snapshots__/quick-message.test.js.snap +0 -143
  75. package/src/components/atoms/quick-message/quick-message.test.js +0 -58
  76. package/src/components/atoms/split-container/__snapshots__/split-container.test.js.snap +0 -333
  77. package/src/components/atoms/split-container/split-container.test.js +0 -45
  78. package/src/components/atoms/text-input/__snapshots__/text-input.test.js.snap +0 -123
  79. package/src/components/atoms/text-input/text-input.test.js +0 -59
  80. package/src/components/molecules/avatar/__snapshots__/avatar.test.js.snap +0 -97
  81. package/src/components/molecules/avatar/avatar.test.js +0 -22
  82. package/src/components/molecules/blocked-message/__snapshots__/blocked-message.test.js.snap +0 -107
  83. package/src/components/molecules/blocked-message/blocked-message.test.js +0 -12
  84. package/src/components/molecules/button/__snapshots__/button.test.js.snap +0 -652
  85. package/src/components/molecules/button/button.test.js +0 -56
  86. package/src/components/molecules/calendar-select/__snapshots__/calendar-select.test.js.snap +0 -343
  87. package/src/components/molecules/calendar-select/calendar-select.test.js +0 -20
  88. package/src/components/molecules/cancel-link/__snapshots__/cancel-link.test.js.snap +0 -139
  89. package/src/components/molecules/cancel-link/cancel-link.test.js +0 -28
  90. package/src/components/molecules/checkbox/__snapshots__/checkbox.test.js.snap +0 -176
  91. package/src/components/molecules/checkbox/checkbox.test.js +0 -30
  92. package/src/components/molecules/contact-address/__snapshots__/contact-address.test.js.snap +0 -113
  93. package/src/components/molecules/contact-address/contact-address.test.js +0 -18
  94. package/src/components/molecules/contact-role/__snapshots__/contact-role.test.js.snap +0 -113
  95. package/src/components/molecules/contact-role/contact-role.test.js +0 -18
  96. package/src/components/molecules/date-input/__snapshots__/date-input.test.js.snap +0 -140
  97. package/src/components/molecules/date-input/date-input.test.js +0 -23
  98. package/src/components/molecules/day/__snapshots__/day.test.js.snap +0 -263
  99. package/src/components/molecules/day/day.test.js +0 -37
  100. package/src/components/molecules/default-select/__snapshots__/default-select.test.js.snap +0 -140
  101. package/src/components/molecules/default-select/default-select.test.js +0 -17
  102. package/src/components/molecules/department_logo/__snapshots__/department-logo.test.js.snap +0 -27
  103. package/src/components/molecules/department_logo/department-logo.test.js +0 -12
  104. package/src/components/molecules/failed-to-send/__snapshots__/failed-bubble.test.js.snap +0 -386
  105. package/src/components/molecules/failed-to-send/failed-bubble.test.js +0 -75
  106. package/src/components/molecules/filter-range/__snapshots__/filter-range.test.js.snap +0 -208
  107. package/src/components/molecules/filter-range/filter-range.test.js +0 -20
  108. package/src/components/molecules/filter-tab/__snapshots__/filter-tab.test.js.snap +0 -536
  109. package/src/components/molecules/filter-tab/filter-tab.test.js +0 -42
  110. package/src/components/molecules/info/__snapshots__/info.test.js.snap +0 -64
  111. package/src/components/molecules/info/info.test.js +0 -18
  112. package/src/components/molecules/language-button/__snapshots__/language-button.test.js.snap +0 -129
  113. package/src/components/molecules/language-button/language-button.test.js +0 -29
  114. package/src/components/molecules/message-input/__snapshots__/message-input.test.js.snap +0 -611
  115. package/src/components/molecules/message-input/message-input.test.js +0 -63
  116. package/src/components/molecules/more-info-button/__snapshots__/more-info-button.test.js.snap +0 -133
  117. package/src/components/molecules/more-info-button/more-info-button.test.js +0 -29
  118. package/src/components/molecules/password-input/__snapshots__/password-input.test.js.snap +0 -504
  119. package/src/components/molecules/password-input/password-input.test.js +0 -46
  120. package/src/components/molecules/pill/__snapshots__/pill.test.js.snap +0 -226
  121. package/src/components/molecules/pill/pill.test.js +0 -42
  122. package/src/components/molecules/pressable-icon/__snapshots__/pressable-icon.test.js.snap +0 -460
  123. package/src/components/molecules/pressable-icon/pressable-icon.test.js +0 -51
  124. package/src/components/molecules/quick-filter/__snapshots__/quick-filter.test.js.snap +0 -557
  125. package/src/components/molecules/quick-filter/quick-filter.test.js +0 -134
  126. package/src/components/molecules/search-input/__snapshots__/search.test.js.snap +0 -145
  127. package/src/components/molecules/search-input/search.test.js +0 -22
  128. package/src/components/molecules/select-link/__snapshots__/select-link.test.js.snap +0 -70
  129. package/src/components/molecules/select-link/select-link.test.js +0 -17
  130. package/src/components/molecules/select-list-item/__snapshots__/select-list-item.test.js.snap +0 -762
  131. package/src/components/molecules/select-list-item/select-list-item.test.js +0 -38
  132. package/src/components/molecules/select-picker/__snapshots__/select-picker.test.js.snap +0 -407
  133. package/src/components/molecules/select-picker/select-picker.test.js +0 -31
  134. package/src/components/molecules/send-bubble/__snapshots__/send-text-bubble.test.js.snap +0 -1979
  135. package/src/components/molecules/send-bubble/send-text-bubble.test.js +0 -156
  136. package/src/components/molecules/snackbar/__snapshots__/snackbar.test.js.snap +0 -557
  137. package/src/components/molecules/snackbar/snackbar.test.js +0 -35
  138. package/src/components/molecules/swipe/__snapshots__/swipe.test.js.snap +0 -340
  139. package/src/components/molecules/swipe/swipe.test.js +0 -46
  140. package/src/components/molecules/tag/__snapshots__/tag.test.js.snap +0 -139
  141. package/src/components/molecules/tag/tag.test.js +0 -34
  142. package/src/components/molecules/time-picker/__snapshots__/time-picker.test.js.snap +0 -2221
  143. package/src/components/molecules/time-picker/time-picker.test.js +0 -18
  144. package/src/components/molecules/time-tracker/__snapshots__/time-tracker.test.js.snap +0 -266
  145. package/src/components/molecules/time-tracker/time-tracker.test.js +0 -36
  146. package/src/components/molecules/timeline/__snapshots__/timeline.test.js.snap +0 -257
  147. package/src/components/molecules/timeline/timeline.test.js +0 -18
  148. package/src/components/molecules/timestamp/__snapshots__/timestamp.test.js.snap +0 -28
  149. package/src/components/molecules/timestamp/timestamp.test.js +0 -16
  150. package/src/components/molecules/wave-background/__snapshots__/wave.test.js.snap +0 -173
  151. package/src/components/molecules/wave-background/wave.test.js +0 -25
  152. package/src/components/molecules/wide-button/__snapshots__/wide-button.test.js.snap +0 -269
  153. package/src/components/molecules/wide-button/wide-button.test.js +0 -30
  154. package/src/components/organisms/child-list-item/__snapshots__/child-list-item.test.js.snap +0 -1040
  155. package/src/components/organisms/child-list-item/child-list-item.test.js +0 -75
  156. package/src/components/organisms/contact-item/__snapshots__/contact-item.test.js.snap +0 -404
  157. package/src/components/organisms/contact-item/contact-item.test.js +0 -22
  158. package/src/components/organisms/loading-indicator/__snapshots__/loading-indicator.test.js.snap +0 -474
  159. package/src/components/organisms/loading-indicator/loading-indicator.test.js +0 -41
  160. package/src/components/organisms/my-child-list-item/__snapshots__/my-child-list-item.test.js.snap +0 -293
  161. package/src/components/organisms/my-child-list-item/my-child-list-item.test.js +0 -23
  162. package/src/components/organisms/person-info-card/__snapshots__/person-info-card.test.js.snap +0 -709
  163. package/src/components/organisms/person-info-card/person-info-card.test.js +0 -85
  164. package/src/components/organisms/text-bubble/__snapshots__/text-bubble.test.js.snap +0 -3046
  165. package/src/components/organisms/text-bubble/text-bubble.test.js +0 -144
  166. package/src/utilities/toddle-datetime/interfaces/duration.interface.d.ts +0 -22
  167. package/src/utilities/toddle-datetime/interfaces/duration.interface.tsx +0 -23
  168. package/src/utilities/toddle-datetime/interfaces/toddle-datetime.interface.d.ts +0 -22
  169. package/src/utilities/toddle-datetime/interfaces/toddle-datetime.interface.tsx +0 -25
  170. package/src/utilities/toddle-datetime/toddle-datetime.class.d.ts +0 -50
  171. package/src/utilities/toddle-datetime/toddle-datetime.class.tsx +0 -206
  172. package/src/utilities/toddle-datetime/toddle-datetime.preview.d.ts +0 -2
  173. package/src/utilities/toddle-datetime/toddle-datetime.preview.tsx +0 -160
  174. package/src/utilities/toddle-datetime/toddle-datetime.test.js +0 -127
  175. package/src/utilities/toddle-datetime/types/duration.type.d.ts +0 -4
  176. package/src/utilities/toddle-datetime/types/duration.type.tsx +0 -6
  177. package/src/utilities/toddle-datetime/types/toddle-datetime.type.d.ts +0 -5
  178. package/src/utilities/toddle-datetime/types/toddle-datetime.type.tsx +0 -23
package/App.tsx CHANGED
@@ -63,7 +63,6 @@ import {LanguageButtonPreview} from './src/components/molecules/language-button/
63
63
  import {ModalPreview} from './src/components/templates/modal/modal.preview';
64
64
  import {LoadingIndicatorPreview} from './src/components/organisms/loading-indicator/loading-indicator.preview';
65
65
  import {WaveBackgroundPreview} from './src/components/molecules/wave-background/wave.preview';
66
- import {ToddleDateTimePreview} from './src/utilities/toddle-datetime/toddle-datetime.preview';
67
66
  import {BackgroundGradientPreview} from './src/components/atoms/background-gradient/background-gradient.preview';
68
67
  import {PersonInfoCardPreview} from './src/components/organisms/person-info-card/person-info-card.preview';
69
68
  import {TimePickerPreview} from './src/components/molecules/time-picker/time-picker.preview';
@@ -150,10 +149,6 @@ const HomeScreen = ({navigation}: {navigation: any}) => {
150
149
  title="Date Input"
151
150
  onPress={() => navigation.push('date-input')}
152
151
  />
153
- <ReactBtn
154
- title="Day Select"
155
- onPress={() => navigation.push('day-select')}
156
- />
157
152
  <ReactBtn
158
153
  title="Default Select"
159
154
  onPress={() => navigation.push('default-select')}
@@ -245,10 +240,6 @@ const HomeScreen = ({navigation}: {navigation: any}) => {
245
240
  />
246
241
  <ReactBtn title="Pill" onPress={() => navigation.push('pill')} />
247
242
  <ReactBtn title="Popover" onPress={() => navigation.push('popover')} />
248
- <ReactBtn
249
- title="Popover Action"
250
- onPress={() => navigation.push('popover-action')}
251
- />
252
243
  <ReactBtn
253
244
  title="Pressable Icon"
254
245
  onPress={() => navigation.push('pressable-icon')}
@@ -287,7 +278,6 @@ const HomeScreen = ({navigation}: {navigation: any}) => {
287
278
  onPress={() => navigation.push('split-container')}
288
279
  />
289
280
  <ReactBtn title="Swiper" onPress={() => navigation.push('swiper')} />
290
- <ReactBtn title="Tab View" onPress={() => navigation.push('tab-view')} />
291
281
  <ReactBtn title="Tag" onPress={() => navigation.push('tag')} />
292
282
  <ReactBtn
293
283
  title="Text Bubble"
@@ -314,10 +304,6 @@ const HomeScreen = ({navigation}: {navigation: any}) => {
314
304
  onPress={() => navigation.push('timetable-editor')}
315
305
  />
316
306
  <ReactBtn title="Timeline" onPress={() => navigation.push('timeline')} />
317
- <ReactBtn
318
- title="Toddle DateTime"
319
- onPress={() => navigation.push('toddle-datetime')}
320
- />
321
307
  <ReactBtn
322
308
  title="Wave Background"
323
309
  onPress={() => navigation.push('wave')}
@@ -626,11 +612,6 @@ function App() {
626
612
  }}>
627
613
  {() => <TimeLinePreview />}
628
614
  </Stack.Screen>
629
- <Stack.Screen name="toddle-datetime" options={{
630
- freezeOnBlur: false,
631
- }}>
632
- {() => <ToddleDateTimePreview />}
633
- </Stack.Screen>
634
615
  <Stack.Screen name="wave" options={{
635
616
  freezeOnBlur: false,
636
617
  }}>
package/app.json CHANGED
@@ -11,7 +11,6 @@
11
11
  "resizeMode": "contain",
12
12
  "backgroundColor": "#ffffff"
13
13
  },
14
- "newArchEnabled": false,
15
14
  "updates": {
16
15
  "fallbackToCacheTimeout": 0
17
16
  },
@@ -19,20 +18,25 @@
19
18
  "**/*"
20
19
  ],
21
20
  "ios": {
22
- "supportsTablet": true
21
+ "supportsTablet": true,
22
+ "bundleIdentifier": "com.tactics.toddle"
23
23
  },
24
24
  "android": {
25
25
  "adaptiveIcon": {
26
26
  "foregroundImage": "./assets/adaptive-icon.png",
27
27
  "backgroundColor": "#FFFFFF"
28
- }
28
+ },
29
+ "package": "com.tactics.toddle"
29
30
  },
30
31
  "web": {
31
32
  "bundler": "metro",
32
33
  "favicon": "./assets/favicon.png"
33
34
  },
34
35
  "plugins": [
35
- "expo-font"
36
+ "expo-font",
37
+ "expo-background-task",
38
+ "expo-localization",
39
+ "expo-secure-store"
36
40
  ]
37
41
  }
38
42
  }
package/index.tsx CHANGED
@@ -99,9 +99,6 @@ import {Initials} from './src/models/initials.model';
99
99
  import { TimeSlotRecord } from './src/models/time-slot-record';
100
100
  import { TimeSlotSequence } from './src/models/time-slot-sequence';
101
101
 
102
- // Exports of classes
103
- import {ToddleDateTime} from './src/utilities/toddle-datetime/toddle-datetime.class';
104
-
105
102
  // Exports of context
106
103
  import {ThemeCtx} from './src/context/theme.context';
107
104
 
@@ -178,7 +175,6 @@ export {
178
175
  KeyBoardTypes,
179
176
  Size,
180
177
  ThemeCtx,
181
- ToddleDateTime,
182
178
  VisualState,
183
179
  CreateResponsiveStyle,
184
180
  Scale,
package/package.json CHANGED
@@ -1,15 +1,16 @@
1
1
  {
2
2
  "name": "@tactics/toddle-styleguide",
3
- "version": "5.3.1",
3
+ "version": "5.3.3",
4
4
  "main": "index.tsx",
5
5
  "types": "index.d.ts",
6
6
  "prepublish": "tsc",
7
7
  "scripts": {
8
- "expo": "./node_modules/.bin/tsc && ./node_modules/.bin/expo",
9
8
  "start": "./node_modules/.bin/tsc && ./node_modules/.bin/expo start",
10
9
  "test": "./node_modules/.bin/jest",
11
10
  "format": "./node_modules/.bin/prettier --write src/.",
12
- "types": "./node_modules/.bin/tsc index.tsx --declaration --allowJs --emitDeclarationOnly --esModuleInterop --jsx react-native --skipLibCheck --target es5"
11
+ "types": "./node_modules/.bin/tsc index.tsx --declaration --allowJs --emitDeclarationOnly --esModuleInterop --jsx react-native --skipLibCheck --target es5",
12
+ "android": "expo run:android",
13
+ "ios": "expo run:ios"
13
14
  },
14
15
  "engineStrict": true,
15
16
  "engines": {
@@ -19,12 +20,11 @@
19
20
  "packageManager": "yarn@3.3.1",
20
21
  "dependencies": {
21
22
  "@callstack/react-theme-provider": "^3.0.8",
22
- "@expo/config-plugins": "~9.0.0",
23
- "@expo/metro-runtime": "~4.0.0",
23
+ "@expo/metro-runtime": "~5.0.4",
24
24
  "@expo/webpack-config": "~19.0.1",
25
25
  "@lottiefiles/dotlottie-react": "^0.14.3",
26
26
  "@miblanchard/react-native-slider": "^2.3.1",
27
- "@react-native-picker/picker": "2.9.0",
27
+ "@react-native-picker/picker": "2.11.1",
28
28
  "@react-navigation/bottom-tabs": "^6.5.8",
29
29
  "@react-navigation/drawer": "^6.6.3",
30
30
  "@react-navigation/native": "^6.1.7",
@@ -34,32 +34,48 @@
34
34
  "@testing-library/react-native": "^12.1.2",
35
35
  "@types/luxon": "^3.3.0",
36
36
  "@types/xdate": "^0.8.32",
37
- "expo": "~52.0.20",
38
- "expo-font": "~13.0.2",
39
- "expo-haptics": "~14.0.0",
40
- "expo-linear-gradient": "~14.0.1",
41
- "expo-status-bar": "~2.0.0",
37
+ "dayjs": "^1.11.18",
38
+ "dayjs-plugin-utc": "^0.1.2",
39
+ "expo": "^53.0.0",
40
+ "expo-application": "~6.1.5",
41
+ "expo-background-task": "~0.2.8",
42
+ "expo-camera": "~16.1.11",
43
+ "expo-crypto": "~14.1.5",
44
+ "expo-dev-client": "~5.2.4",
45
+ "expo-device": "~7.1.4",
46
+ "expo-font": "~13.3.2",
47
+ "expo-haptics": "~14.1.4",
48
+ "expo-linear-gradient": "~14.1.5",
49
+ "expo-localization": "~16.1.6",
50
+ "expo-secure-store": "~14.2.4",
51
+ "expo-splash-screen": "~0.30.10",
52
+ "expo-status-bar": "~2.2.3",
42
53
  "intl": "^1.2.5",
43
54
  "jsc-android": "^250231.0.0",
44
- "lottie-ios": "4.2.0",
45
- "lottie-react-native": "^7.1.0",
46
- "luxon": "^3.3.0",
47
- "react": "18.3.1",
48
- "react-dom": "18.3.1",
49
- "react-native": "0.76.5",
55
+ "lottie-ios": "4.5.0",
56
+ "lottie-react-native": "7.2.2",
57
+ "react": "19.0.0",
58
+ "react-dom": "19.0.0",
59
+ "react-i18next": "^13.0.1",
60
+ "react-native": "0.79.5",
50
61
  "react-native-calendar-strip": "^2.2.6",
51
62
  "react-native-calendars": "^1.1299.0",
52
- "react-native-gesture-handler": "~2.20.2",
53
- "react-native-pager-view": "6.5.1",
63
+ "react-native-dotenv": "^3.4.9",
64
+ "react-native-gesture-handler": "~2.24.0",
65
+ "react-native-keychain": "^8.1.1",
66
+ "react-native-pager-view": "6.7.1",
54
67
  "react-native-picker-select": "^8.0.4",
55
- "react-native-reanimated": "~3.16.1",
56
- "react-native-safe-area-context": "4.12.0",
57
- "react-native-screens": "~4.4.0",
58
- "react-native-svg": "15.8.0",
68
+ "react-native-reanimated": "~3.17.4",
69
+ "react-native-safe-area-context": "5.4.0",
70
+ "react-native-screens": "~4.11.1",
71
+ "react-native-svg": "15.11.2",
59
72
  "react-native-swipe-gestures": "^1.0.5",
60
- "react-native-web": "~0.19.13",
73
+ "react-native-toast-message": "^2.1.6",
74
+ "react-native-translation": "^1.1.0",
75
+ "react-native-web": "^0.20.0",
61
76
  "react-native-wheel-picker-expo": "^0.5.4",
62
77
  "react-native-wheely": "^0.6.0",
78
+ "react-redux": "^8.1.1",
63
79
  "react-test-renderer": "^18.2.0"
64
80
  },
65
81
  "devDependencies": {
@@ -68,14 +84,26 @@
68
84
  "@types/jest": "^29.5.2",
69
85
  "@types/luxon": "^3.3.0",
70
86
  "@types/node": "^20.3.1",
71
- "@types/react": "~18.3.12",
87
+ "@types/react": "~19.0.10",
72
88
  "@types/react-dom": "~18.3.1",
73
89
  "@types/react-test-renderer": "^18.0.0",
74
90
  "jest": "~29.7.0",
75
- "jest-expo": "~52.0.2",
91
+ "jest-expo": "~53.0.10",
76
92
  "prettier": "2.8.8",
77
93
  "ts-jest": "^29.1.0",
78
94
  "ts-node": "^10.9.1",
79
- "typescript": "~5.3.3"
95
+ "typescript": "~5.8.3"
96
+ },
97
+ "expo": {
98
+ "doctor": {
99
+ "reactNativeDirectoryCheck": {
100
+ "exclude": [
101
+ "@callstack/react-theme-provider",
102
+ "react-native-calendar-strip",
103
+ "react-native-wheely"
104
+ ],
105
+ "listUnknownPackages": false
106
+ }
107
+ }
80
108
  }
81
109
  }
@@ -3,7 +3,9 @@ import {Calendar as RNCalendar, LocaleConfig} from 'react-native-calendars/src';
3
3
  import {ThemeCtx} from '../../../context/theme.context';
4
4
  import {Stylesheet} from './calendar.styles';
5
5
  import {Icon} from '../../../icons';
6
- import {ToddleDateTime} from '../../../utilities/toddle-datetime/toddle-datetime.class';
6
+ import {DateTime, DateTimeInterface} from '../../../utilities/datetime/datetime.class';
7
+ import {SystemClock} from '../../../utilities/datetime/clock.class';
8
+ import {UTCTimezone} from '../../../utilities/datetime/timezone.class';
7
9
 
8
10
  LocaleConfig.locales['nl'] = {
9
11
  monthNames: [
@@ -49,8 +51,8 @@ LocaleConfig.locales['nl'] = {
49
51
  LocaleConfig.defaultLocale = 'nl';
50
52
 
51
53
  type CalendarProps = {
52
- onDayPress: (day: ToddleDateTime) => void;
53
- selected: ToddleDateTime;
54
+ onDayPress: (day: DateTimeInterface) => void;
55
+ selected: DateTimeInterface;
54
56
  minDate?: string;
55
57
  maxDate?: string;
56
58
  };
@@ -63,9 +65,10 @@ export const Calendar = ({
63
65
  }: CalendarProps) => {
64
66
  const context = useContext(ThemeCtx);
65
67
  const styles = Stylesheet(context);
66
- const initDate = ToddleDateTime.now().toISODate() || undefined;
68
+ const clock = new SystemClock();
69
+ const initDate = clock.now().toDateOnlyIso8601() || undefined;
67
70
 
68
- const today = selected.toISODate();
71
+ const today = selected.toDateOnlyIso8601();
69
72
 
70
73
  const marked = useMemo(() => {
71
74
  if (today === null) {
@@ -84,7 +87,8 @@ export const Calendar = ({
84
87
  minDate={minDate}
85
88
  maxDate={maxDate}
86
89
  onDayPress={(day) => {
87
- onDayPress(ToddleDateTime.fromISO(day.dateString));
90
+ const sTimestamp = Math.floor(day.timestamp / 1000);
91
+ onDayPress(DateTime.fromTimestamp(sTimestamp));
88
92
  }}
89
93
  markedDates={marked}
90
94
  theme={styles.custom}
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import {Calendar} from './calendar.component';
3
3
  import {useWindowDimensions} from 'react-native';
4
- import {ToddleDateTime} from '../../../utilities/toddle-datetime/toddle-datetime.class';
4
+ import {SystemClock} from '../../../utilities/datetime/clock.class';
5
5
 
6
6
  const {View} = require('react-native');
7
7
 
@@ -9,10 +9,11 @@ export const CalendarPreview = ({}: {}) => {
9
9
  const full = useWindowDimensions();
10
10
  const width = full.width;
11
11
 
12
- const [selectedDay, setSelectedDay] = React.useState(ToddleDateTime.now());
12
+ const Clock = new SystemClock();
13
+ const [selectedDay, setSelectedDay] = React.useState(Clock.now());
13
14
 
14
15
  const calendarStartDate = '2022-09-01';
15
- const calendarEndDate = '2023-07-31';
16
+ const calendarEndDate = '2026-07-31';
16
17
 
17
18
  return (
18
19
  <View
@@ -35,7 +35,8 @@ export const Amount = ({
35
35
  const [editMode, setEditMode] = useState(false);
36
36
  const [countdown, setCountdown] = useState(0);
37
37
  const [amount, setAmount] = useState(initialAmount);
38
- const [intId, setIntId] = useState<NodeJS.Timer | null>(null);
38
+ const [intId, setIntId] = useState<number | null>(null);
39
+
39
40
  const context = useContext(ThemeCtx);
40
41
  const styles = Stylesheet(context);
41
42
 
@@ -64,13 +65,13 @@ export const Amount = ({
64
65
  if (editMode) {
65
66
  const interval = setInterval(() => {
66
67
  if (countdown > 0) {
67
- setCountdown(countdown - 1);
68
+ setCountdown((prev) => prev - 1);
68
69
  } else if (countdown === 0) {
69
- // Handle save when time is up.
70
70
  saveChargedProduct();
71
71
  }
72
72
  }, 1000);
73
- setIntId(interval);
73
+
74
+ setIntId(interval as unknown as number); // Cast here
74
75
 
75
76
  return () => clearInterval(interval);
76
77
  }
@@ -1,9 +1,9 @@
1
1
  import * as React from 'react';
2
- import { ToddleDateTime } from '../../../utilities/toddle-datetime/toddle-datetime.class';
2
+ import {DateTimeInterface} from '../../../utilities/datetime/datetime.class';
3
3
  type CalendarSelectProps = {
4
- onPressDate: (date: ToddleDateTime) => void;
5
- startDate: ToddleDateTime;
6
- onUpdateDate: (date: ToddleDateTime) => void;
4
+ onPressDate: (date: DateTimeInterface) => void;
5
+ startDate: DateTimeInterface;
6
+ onUpdateDate: (date: DateTimeInterface) => void;
7
7
  labelForToday?: string | undefined;
8
8
  };
9
9
  declare const CalendarSelect: ({ onPressDate, startDate, onUpdateDate, labelForToday, }: CalendarSelectProps) => React.JSX.Element;
@@ -1,18 +1,22 @@
1
1
  import * as React from 'react';
2
2
  import {useContext, useEffect, useState} from 'react';
3
- import {ToddleDateTime} from '../../../utilities/toddle-datetime/toddle-datetime.class';
4
3
  import {ThemeCtx} from '../../../context/theme.context';
5
4
  import {Stylesheet} from './calendar-select.styles';
6
5
  import {Pressable, View} from 'react-native';
7
6
  import {Paragraph} from '../../atoms/paragraph-components';
8
7
  import {Icon} from '../../../icons/index';
9
8
  import {useDebounce} from '../../../hooks/use-debounce';
9
+ import {DateTimeInterface, DateTimeOutputFormat} from '../../../utilities/datetime/datetime.class';
10
+ import {SystemClock} from '../../../utilities/datetime/clock.class';
11
+ import {DateOnlyLocaleAwareOutputFormat} from '../../../utilities/datetime/dateonly.class';
12
+ import {Locale} from '../../../utilities/datetime/locale';
10
13
 
11
14
  type CalendarSelectProps = {
12
- onPressDate: (date: ToddleDateTime) => void;
13
- startDate: ToddleDateTime;
14
- onUpdateDate: (date: ToddleDateTime) => void;
15
+ onPressDate: (date: DateTimeInterface) => void;
16
+ startDate: DateTimeInterface;
17
+ onUpdateDate: (date: DateTimeInterface) => void;
15
18
  labelForToday?: string | undefined;
19
+ locale: Locale;
16
20
  };
17
21
 
18
22
  const CalendarSelect = ({
@@ -20,16 +24,17 @@ const CalendarSelect = ({
20
24
  startDate,
21
25
  onUpdateDate,
22
26
  labelForToday,
27
+ locale
23
28
  }: CalendarSelectProps) => {
24
29
  const context = useContext(ThemeCtx);
25
30
  const styles = Stylesheet(context);
26
31
 
27
32
  const [visibleDate, setVisibleDate] = useState(startDate);
28
- const debouncedVisibleDate = useDebounce<ToddleDateTime>(visibleDate, 500);
33
+ const debouncedVisibleDate = useDebounce<DateTimeInterface>(visibleDate, 500);
29
34
 
30
- const today = ToddleDateTime.now();
31
- const format = 'yyyy-LL-dd';
32
- const isToday = today.toFormat(format) == visibleDate.toFormat(format);
35
+ const clock = new SystemClock();
36
+ const today = clock.now();
37
+ const isToday = today.isSameDay(visibleDate);
33
38
 
34
39
  useEffect(() => {
35
40
  setVisibleDate(startDate);
@@ -46,7 +51,7 @@ const CalendarSelect = ({
46
51
  <View style={styles.container}>
47
52
  <Pressable
48
53
  onPress={() => {
49
- setVisibleDate(visibleDate.minus({days: 1}));
54
+ setVisibleDate(visibleDate.subtract({days: 1}));
50
55
  }}
51
56
  style={styles.arrowContainer}
52
57
  >
@@ -71,18 +76,14 @@ const CalendarSelect = ({
71
76
  <Paragraph textColor={context.colors.main['9']} textAlign={'center'}>
72
77
  {isToday && labelForToday
73
78
  ? labelForToday
74
- : visibleDate.toLocaleString({
75
- weekday: 'short',
76
- day: 'numeric',
77
- month: 'short',
78
- year: 'numeric',
79
- })}
79
+ : visibleDate.formatLocale(DateOnlyLocaleAwareOutputFormat.DATEONLY_FULL, locale)
80
+ }
80
81
  </Paragraph>
81
82
  </Pressable>
82
83
 
83
84
  <Pressable
84
85
  onPress={() => {
85
- setVisibleDate(visibleDate.plus({days: 1}));
86
+ setVisibleDate(visibleDate.add({days: 1}));
86
87
  }}
87
88
  style={styles.arrowContainer}
88
89
  >
@@ -1,19 +1,30 @@
1
1
  import React, {useState} from 'react';
2
2
  import {View} from 'react-native';
3
3
  import {CalendarSelect} from './calendar-select.component';
4
- import {ToddleDateTime} from '../../../utilities/toddle-datetime/toddle-datetime.class';
4
+ import {Locale} from '../../../utilities/datetime/locale';
5
+ import {SystemClock} from '../../../utilities/datetime/clock.class';
6
+ import {TimeZone} from '../../../utilities/datetime/timezone.class';
7
+
8
+ export const CalendarSelectPreview = () => {
9
+
10
+ const clock = new SystemClock();
11
+
12
+ const startDate = clock.now().inTimezone(TimeZone.from('America/Los_Angeles'));
5
13
 
6
- export const CalendarSelectPreview = ({}: {}) => {
7
14
  const [date, setDate] = useState(
8
- ToddleDateTime.local({zone: 'America/Los_Angeles'})
15
+ startDate
9
16
  );
10
- console.log(date);
17
+
11
18
  return (
12
19
  <View style={{alignItems: 'center'}}>
13
20
  <CalendarSelect
14
21
  onPressDate={() => console.log('open modal')}
15
22
  startDate={date}
16
- onUpdateDate={setDate}
23
+ onUpdateDate={(date) => {
24
+ setDate(date);
25
+ }}
26
+ locale={Locale.nl}
27
+ labelForToday={'Today'}
17
28
  />
18
29
  </View>
19
30
  );
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
- import { ToddleDateTime } from '../../../utilities/toddle-datetime/toddle-datetime.class';
2
+ import {DateTimeInterface} from '../../../utilities/datetime/datetime.class';
3
3
  type DateInputProps = {
4
4
  onPress: () => void;
5
- value: ToddleDateTime;
5
+ value: DateTimeInterface;
6
6
  };
7
7
  export declare const DateInput: ({ onPress, value }: DateInputProps) => React.JSX.Element;
8
8
  export {};
@@ -3,12 +3,12 @@ import {Pressable, View} from 'react-native';
3
3
  import {ThemeCtx} from '../../../context/theme.context';
4
4
  import {Stylesheet} from './date-input.styles';
5
5
  import {Icon} from '../../../icons';
6
- import {ToddleDateTime} from '../../../utilities/toddle-datetime/toddle-datetime.class';
7
6
  import {Heading4} from '../../atoms/heading-components';
7
+ import {DateTimeInterface} from '../../../utilities/datetime/datetime.class';
8
8
 
9
9
  type DateInputProps = {
10
10
  onPress: () => void;
11
- value: ToddleDateTime;
11
+ value: DateTimeInterface;
12
12
  };
13
13
 
14
14
  export const DateInput = ({onPress, value}: DateInputProps) => {
@@ -19,7 +19,7 @@ export const DateInput = ({onPress, value}: DateInputProps) => {
19
19
  <Pressable onPress={onPress} style={styles.dateInputContainer}>
20
20
  <View>
21
21
  <Heading4 textColor={context.colors.ui.grey}>
22
- {value.toISODate()}
22
+ {value.toDateOnlyIso8601()}
23
23
  </Heading4>
24
24
  </View>
25
25
  <Icon
@@ -1,18 +1,18 @@
1
1
  import React, {useState} from 'react';
2
2
  import {Text} from 'react-native';
3
3
  import {DateInput} from './date-input.component';
4
- import {ToddleDateTime} from '../../../utilities/toddle-datetime/toddle-datetime.class';
5
4
  import {Info} from '../info/info.component';
6
5
  import {TextInput} from '../../atoms/text-input/text-input.component';
7
6
  import {KeyBoardTypes} from '../../../types/keyboard-types.enum';
8
7
  import {Popover} from '../../templates/popover/popover.component';
9
8
  import {Calendar} from '../../atoms/calendar/calendar.component';
10
- import {Modal} from '../../templates/modal/modal.component';
9
+ import {View} from 'react-native';
10
+ import {SystemClock} from '../../../utilities/datetime/clock.class';
11
11
 
12
- const {View} = require('react-native');
12
+ export const DateInputPreview = () => {
13
13
 
14
- export const DateInputPreview = ({}: {}) => {
15
- const [selectedDate, setSelectedDate] = useState(ToddleDateTime.now());
14
+ const clock = new SystemClock();
15
+ const [selectedDate, setSelectedDate] = useState(clock.now());
16
16
  const [popoverIsVisible, setPopoverIsVisible] = useState(false);
17
17
 
18
18
  return (
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
- import {ToddleDateTime} from '../../../utilities/toddle-datetime/toddle-datetime.class';
2
+ import {DateTimeInterface} from '../../../utilities/datetime/datetime.class';
3
3
  type DayProps = {
4
- date: ToddleDateTime;
5
- onSelect: (date: ToddleDateTime) => void;
4
+ date: DateTimeInterface;
5
+ onSelect: (date: DateTimeInterface) => void;
6
6
  isSelected?: boolean;
7
7
  };
8
8
  declare const Day: ({
@@ -2,24 +2,29 @@ import React, {useContext} from 'react';
2
2
  import {Pressable, View} from 'react-native';
3
3
  import {ThemeCtx} from '../../../context/theme.context';
4
4
  import {Stylesheet} from './day.styles';
5
- import {ToddleDateTime} from '../../../utilities/toddle-datetime/toddle-datetime.class';
6
5
  import {Heading4} from '../../atoms/heading-components';
7
6
  import {TinyText} from '../../atoms/paragraph-components';
7
+ import {DateTimeInterface} from '../../../utilities/datetime/datetime.class';
8
+ import {SystemClock} from '../../../utilities/datetime/clock.class';
9
+ import {DayOfWeekLocaleAwareOutputFormat} from '../../../utilities/datetime/dayoftheweek.class';
10
+ import {Locale} from '../../../utilities/datetime/locale';
11
+ import {DayOutputFormat} from '../../../utilities/datetime/day.class';
12
+ import {MonthLocalAwareOutputFormat} from '../../../utilities/datetime/month.class';
8
13
 
9
14
  type DayProps = {
10
- date: ToddleDateTime;
11
- onSelect: (date: ToddleDateTime) => void;
15
+ date: DateTimeInterface;
16
+ onSelect: (date: DateTimeInterface) => void;
12
17
  isSelected?: boolean;
18
+ locale: Locale
13
19
  };
14
20
 
15
- const Day = ({onSelect, date, isSelected}: DayProps) => {
21
+ const Day = ({onSelect, date, isSelected, locale}: DayProps) => {
16
22
  const context = useContext(ThemeCtx);
17
- const isToday = () => {
18
- return (
19
- date.toFormat('yyyy-MM-dd') ===
20
- ToddleDateTime.now().toFormat('yyyy-MM-dd')
21
- );
22
- };
23
+
24
+ const clock = new SystemClock();
25
+ const today = clock.now();
26
+ const isToday = today.isSameDay(date);
27
+
23
28
  const styles = Stylesheet(context, isSelected);
24
29
 
25
30
  return (
@@ -27,11 +32,11 @@ const Day = ({onSelect, date, isSelected}: DayProps) => {
27
32
  <View style={styles.dayNameContainer}>
28
33
  <Heading4
29
34
  textColor={
30
- isToday() ? context.colors.main[5] : context.colors.ui.grey
35
+ isToday ? context.colors.main[5] : context.colors.ui.grey
31
36
  }
32
- bold={isToday()}
37
+ bold={isToday}
33
38
  >
34
- {date.weekdayShort.toUpperCase().slice(0, 2)}
39
+ {date.dayOfWeek.formatLocale(DayOfWeekLocaleAwareOutputFormat.DAY_OF_WEEK_SHORT, locale)}
35
40
  </Heading4>
36
41
  </View>
37
42
  <View>
@@ -40,26 +45,26 @@ const Day = ({onSelect, date, isSelected}: DayProps) => {
40
45
  textColor={
41
46
  isSelected
42
47
  ? context.colors.main[9]
43
- : !isSelected && isToday()
48
+ : !isSelected && isToday
44
49
  ? context.colors.main[5]
45
50
  : context.colors.ui.grey
46
51
  }
47
52
  textAlign={'center'}
48
53
  >
49
- {date.day}
54
+ {date.day.format(DayOutputFormat.DAY_NUMERIC)}
50
55
  </Heading4>
51
56
 
52
57
  <TinyText
53
58
  textColor={
54
59
  isSelected
55
60
  ? context.colors.main[9]
56
- : !isSelected && isToday()
61
+ : !isSelected && isToday
57
62
  ? context.colors.main[5]
58
63
  : context.colors.ui.grey
59
64
  }
60
65
  textAlign={'center'}
61
66
  >
62
- {date.toFormat('LLL').toLocaleLowerCase()}
67
+ {date.month.formatLocale(MonthLocalAwareOutputFormat.MONTH_SHORT, locale)}
63
68
  </TinyText>
64
69
  </Pressable>
65
70
  </View>