@tactics/toddle-styleguide 5.2.2 → 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.
- package/App.tsx +11 -19
- package/app.json +8 -4
- package/index.tsx +2 -4
- package/package.json +55 -27
- package/src/components/atoms/calendar/calendar.component.tsx +10 -6
- package/src/components/atoms/calendar/calendar.preview.tsx +4 -3
- package/src/components/molecules/amount/amount.component.tsx +5 -4
- package/src/components/molecules/calendar-select/calendar-select.component.d.ts +4 -4
- package/src/components/molecules/calendar-select/calendar-select.component.tsx +17 -16
- package/src/components/molecules/calendar-select/calendar-select.preview.tsx +16 -5
- package/src/components/molecules/contact-address/contact-address.component.d.ts +8 -0
- package/src/components/molecules/contact-address/contact-address.component.tsx +20 -0
- package/src/components/molecules/contact-address/contact-address.preview.d.ts +2 -0
- package/src/components/molecules/contact-address/contact-address.preview.tsx +17 -0
- package/src/components/molecules/contact-address/contact-address.styles.d.ts +7 -0
- package/src/components/molecules/contact-address/contact-address.styles.js +10 -0
- package/src/components/molecules/date-input/date-input.component.d.ts +2 -2
- package/src/components/molecules/date-input/date-input.component.tsx +3 -3
- package/src/components/molecules/date-input/date-input.preview.tsx +5 -5
- package/src/components/molecules/day/day.component.d.ts +3 -3
- package/src/components/molecules/day/day.component.tsx +22 -17
- package/src/components/molecules/selectable-list-item/selectable-list-item.component.tsx +12 -7
- package/src/components/molecules/timestamp/timestamp.component.d.ts +2 -2
- package/src/components/molecules/timestamp/timestamp.component.tsx +12 -5
- package/src/components/organisms/journal-entry/components/journal-entry-type/journal-entry-type.component.d.ts +2 -2
- package/src/components/organisms/journal-entry/components/journal-entry-type/journal-entry-type.component.tsx +5 -5
- package/src/components/organisms/journal-entry/journal-entry.component.d.ts +3 -3
- package/src/components/organisms/journal-entry/journal-entry.component.tsx +7 -3
- package/src/components/organisms/journal-entry/journal-entry.preview.tsx +7 -3
- package/src/components/organisms/person-info-card/person-info-card.component.tsx +8 -2
- package/src/components/organisms/person-info-card/person-info-card.preview.tsx +3 -0
- package/src/components/organisms/person-info-card/person-info-card.styles.d.ts +4 -0
- package/src/components/organisms/person-info-card/person-info-card.styles.js +4 -0
- package/src/components/organisms/text-bubble/text-bubble.component.d.ts +2 -2
- package/src/components/organisms/text-bubble/text-bubble.component.tsx +6 -3
- package/src/components/organisms/text-bubble/text-bubble.preview.tsx +19 -7
- package/src/components/templates/popover-action/popover-action.component.tsx +9 -8
- package/src/icons/solid/cloud-download/cloud-download.icon.tsx +1 -1
- package/src/icons/solid/refresh/refresh-solid.icon.tsx +2 -2
- package/src/utilities/datetime/clock.class.tsx +14 -0
- package/src/utilities/datetime/dateonly.class.tsx +287 -0
- package/src/utilities/datetime/datetime.class.tsx +288 -0
- package/src/utilities/datetime/day.class.tsx +48 -0
- package/src/utilities/datetime/dayjs-config.ts +96 -0
- package/src/utilities/datetime/dayoftheweek.class.tsx +242 -0
- package/src/utilities/datetime/hour.class.tsx +60 -0
- package/src/utilities/datetime/locale.tsx +6 -0
- package/src/utilities/datetime/millisecond.class.tsx +48 -0
- package/src/utilities/datetime/minute.class.tsx +55 -0
- package/src/utilities/datetime/month.class.tsx +74 -0
- package/src/utilities/datetime/second.class.tsx +52 -0
- package/src/utilities/datetime/time.class.tsx +190 -0
- package/src/utilities/datetime/timezone.class.tsx +36 -0
- package/src/utilities/datetime/year.class.tsx +78 -0
- package/src/utilities/datetime/yearandmonth.class.tsx +80 -0
- package/src/components/atoms/background-gradient/__snapshots__/background-gradient.test.js.snap +0 -40
- package/src/components/atoms/background-gradient/background-gradient.test.js +0 -10
- package/src/components/atoms/calendar/__snapshots__/calendar.test.js.snap +0 -6817
- package/src/components/atoms/calendar/calendar.test.js +0 -35
- package/src/components/atoms/check-switch/__snapshots__/check-switch.test.js.snap +0 -84
- package/src/components/atoms/check-switch/check-switch.test.js +0 -13
- package/src/components/atoms/heading-components/all-caps-heading/__snapshots__/all-caps-heading.test.js.snap +0 -113
- package/src/components/atoms/heading-components/all-caps-heading/all-caps-heading.test.js +0 -44
- package/src/components/atoms/heading-components/heading1/__snapshots__/heading1.test.js.snap +0 -121
- package/src/components/atoms/heading-components/heading1/heading1.test.js +0 -51
- package/src/components/atoms/heading-components/heading2/__snapshots__/heading2.test.js.snap +0 -121
- package/src/components/atoms/heading-components/heading2/heading2.test.js +0 -51
- package/src/components/atoms/heading-components/heading3/__snapshots__/heading3.test.js.snap +0 -121
- package/src/components/atoms/heading-components/heading3/heading3.test.js +0 -51
- package/src/components/atoms/heading-components/heading4/__snapshots__/heading4.test.js.snap +0 -121
- package/src/components/atoms/heading-components/heading4/heading4.test.js +0 -51
- package/src/components/atoms/image-bubble/__snapshots__/image-bubble.test.js.snap +0 -67
- package/src/components/atoms/image-bubble/image-bubble.test.js +0 -20
- package/src/components/atoms/increment-input/__snapshots__/increment-input.test.js.snap +0 -269
- package/src/components/atoms/increment-input/increment-input.test.js +0 -14
- package/src/components/atoms/logo/__snapshots__/logo.test.js.snap +0 -113
- package/src/components/atoms/logo/logo.test.js +0 -16
- package/src/components/atoms/paragraph-components/paragraph/__snapshots__/paragraph.test.js.snap +0 -121
- package/src/components/atoms/paragraph-components/paragraph/paragraph.test.js +0 -76
- package/src/components/atoms/paragraph-components/small-text/__snapshots__/small-text.test.js.snap +0 -121
- package/src/components/atoms/paragraph-components/small-text/small-text.test.js +0 -76
- package/src/components/atoms/paragraph-components/tiny-text/__snapshots__/tiny-text.test.js.snap +0 -121
- package/src/components/atoms/paragraph-components/tiny-text/tiny-text.test.js +0 -76
- package/src/components/atoms/quick-message/__snapshots__/quick-message.test.js.snap +0 -143
- package/src/components/atoms/quick-message/quick-message.test.js +0 -58
- package/src/components/atoms/split-container/__snapshots__/split-container.test.js.snap +0 -333
- package/src/components/atoms/split-container/split-container.test.js +0 -45
- package/src/components/atoms/text-input/__snapshots__/text-input.test.js.snap +0 -123
- package/src/components/atoms/text-input/text-input.test.js +0 -59
- package/src/components/molecules/avatar/__snapshots__/avatar.test.js.snap +0 -97
- package/src/components/molecules/avatar/avatar.test.js +0 -22
- package/src/components/molecules/blocked-message/__snapshots__/blocked-message.test.js.snap +0 -107
- package/src/components/molecules/blocked-message/blocked-message.test.js +0 -12
- package/src/components/molecules/button/__snapshots__/button.test.js.snap +0 -652
- package/src/components/molecules/button/button.test.js +0 -56
- package/src/components/molecules/calendar-select/__snapshots__/calendar-select.test.js.snap +0 -343
- package/src/components/molecules/calendar-select/calendar-select.test.js +0 -20
- package/src/components/molecules/cancel-link/__snapshots__/cancel-link.test.js.snap +0 -139
- package/src/components/molecules/cancel-link/cancel-link.test.js +0 -28
- package/src/components/molecules/checkbox/__snapshots__/checkbox.test.js.snap +0 -176
- package/src/components/molecules/checkbox/checkbox.test.js +0 -30
- package/src/components/molecules/contact-role/__snapshots__/contact-role.test.js.snap +0 -113
- package/src/components/molecules/contact-role/contact-role.test.js +0 -18
- package/src/components/molecules/date-input/__snapshots__/date-input.test.js.snap +0 -140
- package/src/components/molecules/date-input/date-input.test.js +0 -23
- package/src/components/molecules/day/__snapshots__/day.test.js.snap +0 -263
- package/src/components/molecules/day/day.test.js +0 -37
- package/src/components/molecules/default-select/__snapshots__/default-select.test.js.snap +0 -140
- package/src/components/molecules/default-select/default-select.test.js +0 -17
- package/src/components/molecules/department_logo/__snapshots__/department-logo.test.js.snap +0 -27
- package/src/components/molecules/department_logo/department-logo.test.js +0 -12
- package/src/components/molecules/failed-to-send/__snapshots__/failed-bubble.test.js.snap +0 -386
- package/src/components/molecules/failed-to-send/failed-bubble.test.js +0 -75
- package/src/components/molecules/filter-range/__snapshots__/filter-range.test.js.snap +0 -208
- package/src/components/molecules/filter-range/filter-range.test.js +0 -20
- package/src/components/molecules/filter-tab/__snapshots__/filter-tab.test.js.snap +0 -536
- package/src/components/molecules/filter-tab/filter-tab.test.js +0 -42
- package/src/components/molecules/info/__snapshots__/info.test.js.snap +0 -64
- package/src/components/molecules/info/info.test.js +0 -18
- package/src/components/molecules/language-button/__snapshots__/language-button.test.js.snap +0 -129
- package/src/components/molecules/language-button/language-button.test.js +0 -29
- package/src/components/molecules/message-input/__snapshots__/message-input.test.js.snap +0 -611
- package/src/components/molecules/message-input/message-input.test.js +0 -63
- package/src/components/molecules/more-info-button/__snapshots__/more-info-button.test.js.snap +0 -133
- package/src/components/molecules/more-info-button/more-info-button.test.js +0 -29
- package/src/components/molecules/password-input/__snapshots__/password-input.test.js.snap +0 -504
- package/src/components/molecules/password-input/password-input.test.js +0 -46
- package/src/components/molecules/pill/__snapshots__/pill.test.js.snap +0 -226
- package/src/components/molecules/pill/pill.test.js +0 -42
- package/src/components/molecules/pressable-icon/__snapshots__/pressable-icon.test.js.snap +0 -460
- package/src/components/molecules/pressable-icon/pressable-icon.test.js +0 -51
- package/src/components/molecules/quick-filter/__snapshots__/quick-filter.test.js.snap +0 -557
- package/src/components/molecules/quick-filter/quick-filter.test.js +0 -134
- package/src/components/molecules/search-input/__snapshots__/search.test.js.snap +0 -145
- package/src/components/molecules/search-input/search.test.js +0 -22
- package/src/components/molecules/select-link/__snapshots__/select-link.test.js.snap +0 -70
- package/src/components/molecules/select-link/select-link.test.js +0 -17
- package/src/components/molecules/select-list-item/__snapshots__/select-list-item.test.js.snap +0 -762
- package/src/components/molecules/select-list-item/select-list-item.test.js +0 -38
- package/src/components/molecules/select-picker/__snapshots__/select-picker.test.js.snap +0 -407
- package/src/components/molecules/select-picker/select-picker.test.js +0 -31
- package/src/components/molecules/send-bubble/__snapshots__/send-text-bubble.test.js.snap +0 -1979
- package/src/components/molecules/send-bubble/send-text-bubble.test.js +0 -156
- package/src/components/molecules/snackbar/__snapshots__/snackbar.test.js.snap +0 -557
- package/src/components/molecules/snackbar/snackbar.test.js +0 -35
- package/src/components/molecules/swipe/__snapshots__/swipe.test.js.snap +0 -340
- package/src/components/molecules/swipe/swipe.test.js +0 -46
- package/src/components/molecules/tag/__snapshots__/tag.test.js.snap +0 -139
- package/src/components/molecules/tag/tag.test.js +0 -34
- package/src/components/molecules/time-picker/__snapshots__/time-picker.test.js.snap +0 -2221
- package/src/components/molecules/time-picker/time-picker.test.js +0 -18
- package/src/components/molecules/time-tracker/__snapshots__/time-tracker.test.js.snap +0 -266
- package/src/components/molecules/time-tracker/time-tracker.test.js +0 -36
- package/src/components/molecules/timeline/__snapshots__/timeline.test.js.snap +0 -257
- package/src/components/molecules/timeline/timeline.test.js +0 -18
- package/src/components/molecules/timestamp/__snapshots__/timestamp.test.js.snap +0 -28
- package/src/components/molecules/timestamp/timestamp.test.js +0 -16
- package/src/components/molecules/wave-background/__snapshots__/wave.test.js.snap +0 -173
- package/src/components/molecules/wave-background/wave.test.js +0 -25
- package/src/components/molecules/wide-button/__snapshots__/wide-button.test.js.snap +0 -269
- package/src/components/molecules/wide-button/wide-button.test.js +0 -30
- package/src/components/organisms/child-list-item/__snapshots__/child-list-item.test.js.snap +0 -1040
- package/src/components/organisms/child-list-item/child-list-item.test.js +0 -75
- package/src/components/organisms/contact-item/__snapshots__/contact-item.test.js.snap +0 -404
- package/src/components/organisms/contact-item/contact-item.test.js +0 -22
- package/src/components/organisms/loading-indicator/__snapshots__/loading-indicator.test.js.snap +0 -474
- package/src/components/organisms/loading-indicator/loading-indicator.test.js +0 -41
- package/src/components/organisms/my-child-list-item/__snapshots__/my-child-list-item.test.js.snap +0 -293
- package/src/components/organisms/my-child-list-item/my-child-list-item.test.js +0 -23
- package/src/components/organisms/person-info-card/__snapshots__/person-info-card.test.js.snap +0 -709
- package/src/components/organisms/person-info-card/person-info-card.test.js +0 -85
- package/src/components/organisms/text-bubble/__snapshots__/text-bubble.test.js.snap +0 -3046
- package/src/components/organisms/text-bubble/text-bubble.test.js +0 -144
- package/src/utilities/toddle-datetime/interfaces/duration.interface.d.ts +0 -22
- package/src/utilities/toddle-datetime/interfaces/duration.interface.tsx +0 -23
- package/src/utilities/toddle-datetime/interfaces/toddle-datetime.interface.d.ts +0 -22
- package/src/utilities/toddle-datetime/interfaces/toddle-datetime.interface.tsx +0 -25
- package/src/utilities/toddle-datetime/toddle-datetime.class.d.ts +0 -50
- package/src/utilities/toddle-datetime/toddle-datetime.class.tsx +0 -206
- package/src/utilities/toddle-datetime/toddle-datetime.preview.d.ts +0 -2
- package/src/utilities/toddle-datetime/toddle-datetime.preview.tsx +0 -160
- package/src/utilities/toddle-datetime/toddle-datetime.test.js +0 -127
- package/src/utilities/toddle-datetime/types/duration.type.d.ts +0 -4
- package/src/utilities/toddle-datetime/types/duration.type.tsx +0 -6
- package/src/utilities/toddle-datetime/types/toddle-datetime.type.d.ts +0 -5
- 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';
|
|
@@ -81,6 +80,8 @@ import { SelectableListItemPreview } from './src/components/molecules/selectable
|
|
|
81
80
|
import {
|
|
82
81
|
SafeAreaProvider,
|
|
83
82
|
} from 'react-native-safe-area-context';
|
|
83
|
+
import {ContactAddress} from './src/components/molecules/contact-address/contact-address.component';
|
|
84
|
+
import {ContactAddressPreview} from './src/components/molecules/contact-address/contact-address.preview';
|
|
84
85
|
|
|
85
86
|
const Stack = createNativeStackNavigator();
|
|
86
87
|
|
|
@@ -128,6 +129,10 @@ const HomeScreen = ({navigation}: {navigation: any}) => {
|
|
|
128
129
|
title="Contact Item"
|
|
129
130
|
onPress={() => navigation.push('contact-item')}
|
|
130
131
|
/>
|
|
132
|
+
<ReactBtn
|
|
133
|
+
title="Contact Address"
|
|
134
|
+
onPress={() => navigation.push('contact-address')}
|
|
135
|
+
/>
|
|
131
136
|
<ReactBtn
|
|
132
137
|
title="Contact Role"
|
|
133
138
|
onPress={() => navigation.push('contact-role')}
|
|
@@ -144,10 +149,6 @@ const HomeScreen = ({navigation}: {navigation: any}) => {
|
|
|
144
149
|
title="Date Input"
|
|
145
150
|
onPress={() => navigation.push('date-input')}
|
|
146
151
|
/>
|
|
147
|
-
<ReactBtn
|
|
148
|
-
title="Day Select"
|
|
149
|
-
onPress={() => navigation.push('day-select')}
|
|
150
|
-
/>
|
|
151
152
|
<ReactBtn
|
|
152
153
|
title="Default Select"
|
|
153
154
|
onPress={() => navigation.push('default-select')}
|
|
@@ -239,10 +240,6 @@ const HomeScreen = ({navigation}: {navigation: any}) => {
|
|
|
239
240
|
/>
|
|
240
241
|
<ReactBtn title="Pill" onPress={() => navigation.push('pill')} />
|
|
241
242
|
<ReactBtn title="Popover" onPress={() => navigation.push('popover')} />
|
|
242
|
-
<ReactBtn
|
|
243
|
-
title="Popover Action"
|
|
244
|
-
onPress={() => navigation.push('popover-action')}
|
|
245
|
-
/>
|
|
246
243
|
<ReactBtn
|
|
247
244
|
title="Pressable Icon"
|
|
248
245
|
onPress={() => navigation.push('pressable-icon')}
|
|
@@ -281,7 +278,6 @@ const HomeScreen = ({navigation}: {navigation: any}) => {
|
|
|
281
278
|
onPress={() => navigation.push('split-container')}
|
|
282
279
|
/>
|
|
283
280
|
<ReactBtn title="Swiper" onPress={() => navigation.push('swiper')} />
|
|
284
|
-
<ReactBtn title="Tab View" onPress={() => navigation.push('tab-view')} />
|
|
285
281
|
<ReactBtn title="Tag" onPress={() => navigation.push('tag')} />
|
|
286
282
|
<ReactBtn
|
|
287
283
|
title="Text Bubble"
|
|
@@ -308,10 +304,6 @@ const HomeScreen = ({navigation}: {navigation: any}) => {
|
|
|
308
304
|
onPress={() => navigation.push('timetable-editor')}
|
|
309
305
|
/>
|
|
310
306
|
<ReactBtn title="Timeline" onPress={() => navigation.push('timeline')} />
|
|
311
|
-
<ReactBtn
|
|
312
|
-
title="Toddle DateTime"
|
|
313
|
-
onPress={() => navigation.push('toddle-datetime')}
|
|
314
|
-
/>
|
|
315
307
|
<ReactBtn
|
|
316
308
|
title="Wave Background"
|
|
317
309
|
onPress={() => navigation.push('wave')}
|
|
@@ -620,11 +612,6 @@ function App() {
|
|
|
620
612
|
}}>
|
|
621
613
|
{() => <TimeLinePreview />}
|
|
622
614
|
</Stack.Screen>
|
|
623
|
-
<Stack.Screen name="toddle-datetime" options={{
|
|
624
|
-
freezeOnBlur: false,
|
|
625
|
-
}}>
|
|
626
|
-
{() => <ToddleDateTimePreview />}
|
|
627
|
-
</Stack.Screen>
|
|
628
615
|
<Stack.Screen name="wave" options={{
|
|
629
616
|
freezeOnBlur: false,
|
|
630
617
|
}}>
|
|
@@ -645,6 +632,11 @@ function App() {
|
|
|
645
632
|
}}>
|
|
646
633
|
{() => <SelectableListItemPreview />}
|
|
647
634
|
</Stack.Screen>
|
|
635
|
+
<Stack.Screen name="contact-address" options={{
|
|
636
|
+
freezeOnBlur: false,
|
|
637
|
+
}}>
|
|
638
|
+
{() => <ContactAddressPreview />}
|
|
639
|
+
</Stack.Screen>
|
|
648
640
|
</Stack.Navigator>
|
|
649
641
|
</NavigationContainer>
|
|
650
642
|
</ThemeCtx.Provider>
|
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
|
@@ -86,6 +86,7 @@ import { InlineNotice } from './src/components/molecules/inline-notice/inline-no
|
|
|
86
86
|
import { SelectableListItem } from './src/components/molecules/selectable-list-item/selectable-list-item.component';
|
|
87
87
|
import { SwipeableContainer } from './src/components/molecules/swipeable/swipeable-container.component';
|
|
88
88
|
import { SwipeableAction } from './src/components/molecules/swipeable/swipeable-action.component';
|
|
89
|
+
import { ContactAddress } from './src/components/molecules/contact-address/contact-address.component';
|
|
89
90
|
|
|
90
91
|
// Exports of enums
|
|
91
92
|
import {BubbleAlignment} from './src/types/bubble-alignment.enum';
|
|
@@ -98,9 +99,6 @@ import {Initials} from './src/models/initials.model';
|
|
|
98
99
|
import { TimeSlotRecord } from './src/models/time-slot-record';
|
|
99
100
|
import { TimeSlotSequence } from './src/models/time-slot-sequence';
|
|
100
101
|
|
|
101
|
-
// Exports of classes
|
|
102
|
-
import {ToddleDateTime} from './src/utilities/toddle-datetime/toddle-datetime.class';
|
|
103
|
-
|
|
104
102
|
// Exports of context
|
|
105
103
|
import {ThemeCtx} from './src/context/theme.context';
|
|
106
104
|
|
|
@@ -122,6 +120,7 @@ export {
|
|
|
122
120
|
Check,
|
|
123
121
|
Checkbox,
|
|
124
122
|
ChildListItem,
|
|
123
|
+
ContactAddress,
|
|
125
124
|
ContactItem,
|
|
126
125
|
ContactRole,
|
|
127
126
|
DateInput,
|
|
@@ -176,7 +175,6 @@ export {
|
|
|
176
175
|
KeyBoardTypes,
|
|
177
176
|
Size,
|
|
178
177
|
ThemeCtx,
|
|
179
|
-
ToddleDateTime,
|
|
180
178
|
VisualState,
|
|
181
179
|
CreateResponsiveStyle,
|
|
182
180
|
Scale,
|
package/package.json
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tactics/toddle-styleguide",
|
|
3
|
-
"version": "5.
|
|
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/
|
|
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.
|
|
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
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"expo
|
|
40
|
-
"expo-
|
|
41
|
-
"expo-
|
|
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.
|
|
45
|
-
"lottie-react-native": "
|
|
46
|
-
"
|
|
47
|
-
"react": "
|
|
48
|
-
"react-
|
|
49
|
-
"react-native": "0.
|
|
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-
|
|
53
|
-
"react-native-
|
|
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.
|
|
56
|
-
"react-native-safe-area-context": "4.
|
|
57
|
-
"react-native-screens": "~4.
|
|
58
|
-
"react-native-svg": "15.
|
|
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-
|
|
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": "~
|
|
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": "~
|
|
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.
|
|
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 {
|
|
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:
|
|
53
|
-
selected:
|
|
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
|
|
68
|
+
const clock = new SystemClock();
|
|
69
|
+
const initDate = clock.now().toDateOnlyIso8601() || undefined;
|
|
67
70
|
|
|
68
|
-
const today = selected.
|
|
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
|
-
|
|
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 {
|
|
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
|
|
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 = '
|
|
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<
|
|
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(
|
|
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
|
-
|
|
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 {
|
|
2
|
+
import {DateTimeInterface} from '../../../utilities/datetime/datetime.class';
|
|
3
3
|
type CalendarSelectProps = {
|
|
4
|
-
onPressDate: (date:
|
|
5
|
-
startDate:
|
|
6
|
-
onUpdateDate: (date:
|
|
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:
|
|
13
|
-
startDate:
|
|
14
|
-
onUpdateDate: (date:
|
|
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<
|
|
33
|
+
const debouncedVisibleDate = useDebounce<DateTimeInterface>(visibleDate, 500);
|
|
29
34
|
|
|
30
|
-
const
|
|
31
|
-
const
|
|
32
|
-
const isToday =
|
|
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.
|
|
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.
|
|
75
|
-
|
|
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.
|
|
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 {
|
|
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
|
-
|
|
15
|
+
startDate
|
|
9
16
|
);
|
|
10
|
-
|
|
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={
|
|
23
|
+
onUpdateDate={(date) => {
|
|
24
|
+
setDate(date);
|
|
25
|
+
}}
|
|
26
|
+
locale={Locale.nl}
|
|
27
|
+
labelForToday={'Today'}
|
|
17
28
|
/>
|
|
18
29
|
</View>
|
|
19
30
|
);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import {View} from 'react-native';
|
|
3
|
+
import {Stylesheet} from './contact-address.styles';
|
|
4
|
+
import {SmallText} from '../../atoms/paragraph-components';
|
|
5
|
+
|
|
6
|
+
type ContactAddressProps = {
|
|
7
|
+
line1: string;
|
|
8
|
+
line2?: string;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export const ContactAddress = ({line1, line2}: ContactAddressProps) => {
|
|
12
|
+
const styles = Stylesheet();
|
|
13
|
+
|
|
14
|
+
return (
|
|
15
|
+
<View style={styles.container}>
|
|
16
|
+
<SmallText textAlign={'center'}>{line1}</SmallText>
|
|
17
|
+
{line2 && <SmallText textAlign={'center'}>{line2}</SmallText>}
|
|
18
|
+
</View>
|
|
19
|
+
);
|
|
20
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {ContactAddress} from './contact-address.component';
|
|
3
|
+
const {View} = require('react-native');
|
|
4
|
+
|
|
5
|
+
export const ContactAddressPreview = ({}: {}) => {
|
|
6
|
+
return (
|
|
7
|
+
<View
|
|
8
|
+
style={{
|
|
9
|
+
flex: 1,
|
|
10
|
+
alignItems: 'center',
|
|
11
|
+
justifyContent: 'center',
|
|
12
|
+
}}
|
|
13
|
+
>
|
|
14
|
+
<ContactAddress line1={'Starrenhof 14'} line2={'2950 Kapellen'} />
|
|
15
|
+
</View>
|
|
16
|
+
);
|
|
17
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import {DateTimeInterface} from '../../../utilities/datetime/datetime.class';
|
|
3
3
|
type DateInputProps = {
|
|
4
4
|
onPress: () => void;
|
|
5
|
-
value:
|
|
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:
|
|
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.
|
|
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 {
|
|
9
|
+
import {View} from 'react-native';
|
|
10
|
+
import {SystemClock} from '../../../utilities/datetime/clock.class';
|
|
11
11
|
|
|
12
|
-
const
|
|
12
|
+
export const DateInputPreview = () => {
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
const [selectedDate, setSelectedDate] = useState(
|
|
14
|
+
const clock = new SystemClock();
|
|
15
|
+
const [selectedDate, setSelectedDate] = useState(clock.now());
|
|
16
16
|
const [popoverIsVisible, setPopoverIsVisible] = useState(false);
|
|
17
17
|
|
|
18
18
|
return (
|