@tactics/toddle-styleguide 1.2.8 → 1.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/components/atoms/backdrop/backdrop.component.d.ts +4 -7
- package/src/components/atoms/calendar/__snapshots__/calendar.test.js.snap +18 -18
- package/src/components/atoms/calendar/calendar.component.d.ts +6 -11
- package/src/components/atoms/check-switch/check-switch.component.d.ts +3 -3
- package/src/components/atoms/footer/footer.component.d.ts +6 -6
- package/src/components/atoms/heading-components/all-caps-heading/all-caps-heading.component.d.ts +2 -10
- package/src/components/atoms/heading-components/heading1/heading1.component.d.ts +2 -10
- package/src/components/atoms/heading-components/heading2/heading2.component.d.ts +2 -10
- package/src/components/atoms/heading-components/heading3/heading3.component.d.ts +2 -10
- package/src/components/atoms/heading-components/heading4/heading4.component.d.ts +2 -10
- package/src/components/atoms/heading-components/index.d.ts +6 -6
- package/src/components/atoms/image-bubble/image-bubble.component.d.ts +6 -9
- package/src/components/atoms/increment-input/increment-input.component.d.ts +4 -8
- package/src/components/atoms/logo/logo.component.d.ts +4 -4
- package/src/components/atoms/paragraph-components/index.d.ts +4 -4
- package/src/components/atoms/paragraph-components/paragraph/paragraph.component.d.ts +2 -10
- package/src/components/atoms/paragraph-components/small-text/small-text.component.d.ts +2 -10
- package/src/components/atoms/paragraph-components/tiny-text/tiny-text.component.d.ts +2 -10
- package/src/components/atoms/quick-message/__snapshots__/quick-message.test.js.snap +72 -1
- package/src/components/atoms/quick-message/quick-message.component.d.ts +5 -8
- package/src/components/atoms/quick-message/quick-message.component.tsx +3 -1
- package/src/components/atoms/quick-message/quick-message.preview.tsx +10 -1
- package/src/components/atoms/quick-message/quick-message.styles.d.ts +13 -13
- package/src/components/atoms/quick-message/quick-message.styles.js +4 -2
- package/src/components/atoms/quick-message/quick-message.test.js +38 -6
- package/src/components/atoms/split-container/split-container.component.d.ts +4 -7
- package/src/components/atoms/static-wave/static-wave.component.d.ts +6 -11
- package/src/components/atoms/text-input/text-input.component.d.ts +6 -10
- package/src/components/atoms/text-input/text-input.component.tsx +6 -9
- package/src/components/atoms/text-input/text-input.preview.d.ts +1 -1
- package/src/components/atoms/text-input/text-input.preview.tsx +3 -3
- package/src/components/atoms/text-input/text-input.styles.d.ts +20 -44
- package/src/components/atoms/text-input/text-input.styles.js +7 -13
- package/src/components/molecules/avatar/avatar.component.d.ts +11 -18
- package/src/components/molecules/blocked-message/blocked-message.component.d.ts +2 -4
- package/src/components/molecules/button/button.component.d.ts +11 -20
- package/src/components/molecules/calendar-select/calendar-select.component.d.ts +7 -12
- package/src/components/molecules/cancel-link/cancel-link.component.d.ts +4 -4
- package/src/components/molecules/checkbox/checkbox.component.d.ts +5 -9
- package/src/components/molecules/contact-role/contact-role.component.d.ts +3 -6
- package/src/components/molecules/date-input/date-input.component.d.ts +4 -7
- package/src/components/molecules/day/day.component.d.ts +6 -6
- package/src/components/molecules/day/day.component.tsx +17 -4
- package/src/components/molecules/day/day.styles.d.ts +27 -44
- package/src/components/molecules/day/day.styles.js +14 -17
- package/src/components/molecules/default-select/default-select.component.d.ts +3 -6
- package/src/components/molecules/department_logo/department-logo.component.d.ts +3 -5
- package/src/components/molecules/failed-to-send/failed-bubble.component.d.ts +6 -11
- package/src/components/molecules/filter-range/filter-range.component.d.ts +7 -14
- package/src/components/molecules/filter-tab/filter-tab.component.d.ts +7 -11
- package/src/components/molecules/info/info.component.d.ts +4 -4
- package/src/components/molecules/language-button/language-button.component.d.ts +4 -8
- package/src/components/molecules/message-input/message-input.component.d.ts +7 -11
- package/src/components/molecules/more-info-button/more-info-button.component.d.ts +4 -8
- package/src/components/molecules/password-input/password-input.component.d.ts +5 -9
- package/src/components/molecules/password-input/password-input.component.tsx +7 -9
- package/src/components/molecules/password-input/password-input.styles.d.ts +27 -26
- package/src/components/molecules/password-input/password-input.styles.js +6 -6
- package/src/components/molecules/pill/pill.component.d.ts +5 -5
- package/src/components/molecules/pressable-icon/pressable-icon.component.d.ts +5 -10
- package/src/components/molecules/quick-filter/quick-filter.component.d.ts +9 -16
- package/src/components/molecules/search-input/__snapshots__/search.test.js.snap +23 -13
- package/src/components/molecules/search-input/search.component.d.ts +9 -16
- package/src/components/molecules/search-input/search.component.tsx +19 -30
- package/src/components/molecules/search-input/search.preview.d.ts +1 -1
- package/src/components/molecules/search-input/search.preview.tsx +8 -6
- package/src/components/molecules/search-input/search.styles.d.ts +31 -30
- package/src/components/molecules/search-input/search.styles.js +14 -8
- package/src/components/molecules/search-input/search.test.js +3 -1
- package/src/components/molecules/select-link/select-link.component.d.ts +4 -4
- package/src/components/molecules/select-list-item/select-list-item.component.d.ts +7 -13
- package/src/components/molecules/select-picker/select-picker.component.d.ts +8 -13
- package/src/components/molecules/send-bubble/send-text-bubble.component.d.ts +10 -17
- package/src/components/molecules/send-bubble/send-text-bubble.component.tsx +1 -5
- package/src/components/molecules/send-bubble/send-text-bubble.styles.d.ts +58 -74
- package/src/components/molecules/send-bubble/send-text-bubble.styles.js +2 -8
- package/src/components/molecules/snackbar/snackbar.component.d.ts +5 -5
- package/src/components/molecules/swipe/swipe.component.d.ts +5 -5
- package/src/components/molecules/tag/tag.component.d.ts +6 -11
- package/src/components/molecules/time-picker/time-picker.component.d.ts +5 -10
- package/src/components/molecules/time-tracker/time-tracker.component.d.ts +6 -10
- package/src/components/molecules/timeline/timeline.component.d.ts +3 -6
- package/src/components/molecules/timeline/timeline.styles.d.ts +40 -50
- package/src/components/molecules/timeline/timeline.styles.js +2 -2
- package/src/components/molecules/timestamp/timestamp.component.d.ts +4 -3
- package/src/components/molecules/timestamp/timestamp.component.tsx +4 -7
- package/src/components/molecules/wave-background/wave.component.d.ts +2 -7
- package/src/components/molecules/wide-button/wide-button.component.d.ts +6 -11
- package/src/components/organisms/child-list-item/__snapshots__/child-list-item.test.js.snap +165 -10
- package/src/components/organisms/child-list-item/child-list-item.component.d.ts +18 -32
- package/src/components/organisms/child-list-item/child-list-item.component.tsx +24 -1
- package/src/components/organisms/child-list-item/child-list-item.preview.tsx +11 -0
- package/src/components/organisms/child-list-item/child-list-item.styles.d.ts +35 -41
- package/src/components/organisms/child-list-item/child-list-item.styles.js +2 -3
- package/src/components/organisms/child-list-item/child-list-item.test.js +9 -4
- package/src/components/organisms/child-list-item/components/child-list-tag.component.d.ts +6 -0
- package/src/components/organisms/child-list-item/components/child-list-tag.component.tsx +28 -0
- package/src/components/organisms/child-list-item/components/child-list-tag.styles.d.ts +10 -0
- package/src/components/organisms/child-list-item/components/child-list-tag.styles.js +16 -0
- package/src/components/organisms/contact-item/contact-item.component.d.ts +6 -11
- package/src/components/organisms/day-select/day-select.component.d.ts +6 -10
- package/src/components/organisms/day-select/day-select.preview.tsx +9 -5
- package/src/components/organisms/loading-indicator/animation-style.animate.d.ts +3 -13
- package/src/components/organisms/loading-indicator/dot.component.d.ts +3 -3
- package/src/components/organisms/loading-indicator/loading-indicator.component.d.ts +2 -9
- package/src/components/organisms/my-child-list-item/__snapshots__/my-child-list-item.test.js.snap +143 -399
- package/src/components/organisms/my-child-list-item/my-child-list-item.component.d.ts +9 -18
- package/src/components/organisms/my-child-list-item/my-child-list-item.component.tsx +32 -59
- package/src/components/organisms/my-child-list-item/my-child-list-item.preview.tsx +36 -24
- package/src/components/organisms/my-child-list-item/my-child-list-item.styles.d.ts +32 -28
- package/src/components/organisms/my-child-list-item/my-child-list-item.styles.js +16 -11
- package/src/components/organisms/my-child-list-item/my-child-list-item.test.js +5 -22
- package/src/components/organisms/person-info-card/person-info-card.component.d.ts +10 -18
- package/src/components/organisms/tab-view/tab-view.component.d.ts +8 -12
- package/src/components/organisms/text-bubble/text-bubble.component.d.ts +15 -24
- package/src/components/organisms/text-bubble/text-bubble.component.tsx +3 -1
- package/src/components/organisms/text-bubble/text-bubble.preview.tsx +8 -4
- package/src/components/organisms/text-bubble/text-bubble.styles.d.ts +31 -44
- package/src/components/organisms/text-bubble/text-bubble.styles.js +2 -0
- package/src/components/templates/modal/components/fade-panel.component.d.ts +8 -16
- package/src/components/templates/modal/components/fade-panel.component.tsx +1 -1
- package/src/components/templates/modal/modal.component.d.ts +7 -14
- package/src/components/templates/popover/components/foreground/foreground.component.d.ts +4 -4
- package/src/components/templates/popover/components/modal/close/close.component.d.ts +4 -4
- package/src/components/templates/popover/components/modal/heading/heading.component.d.ts +4 -4
- package/src/components/templates/popover/components/modal/modal.component.d.ts +9 -17
- package/src/components/templates/popover/components/modal/scroll-content/scroll-content.component.d.ts +3 -5
- package/src/components/templates/popover/popover.component.d.ts +8 -15
- package/src/components/templates/popover-action/popover-action.component.d.ts +4 -8
- package/src/context/loading-dots.context.d.ts +6 -9
- package/src/context/theme.context.d.ts +47 -47
- package/src/gradients/main/main.gradient.d.ts +2 -4
- package/src/icons/index.d.ts +2 -7
- package/src/icons/outline/calendar/calendar.icon.d.ts +2 -2
- package/src/icons/outline/chat/chat.icon.d.ts +2 -2
- package/src/icons/outline/chat-alt/chat-alt.icon.d.ts +2 -2
- package/src/icons/outline/check-circle/check-circle.icon.d.ts +2 -5
- package/src/icons/outline/chevron-left/chevron-left.icon.d.ts +2 -5
- package/src/icons/outline/chevron-right/chevron-right.icon.d.ts +2 -5
- package/src/icons/outline/clock/clock.icon.d.ts +2 -2
- package/src/icons/outline/cloud-download/cloud-download.icon.d.ts +2 -5
- package/src/icons/outline/currency-euro/currency-euro.icon.d.ts +2 -5
- package/src/icons/outline/document-text/document-text.icon.d.ts +2 -5
- package/src/icons/outline/exclamation/exclamation.icon.d.ts +2 -5
- package/src/icons/outline/exclamation-circle/exclamation-circle.icon.d.ts +2 -5
- package/src/icons/outline/eye/eye.icon.d.ts +2 -2
- package/src/icons/outline/eye-off/eye-off.icon.d.ts +2 -2
- package/src/icons/outline/filter/filter.icon.d.ts +2 -2
- package/src/icons/outline/information-circle/information-circle.icon.d.ts +2 -5
- package/src/icons/outline/logout/logout.icon.d.ts +2 -2
- package/src/icons/outline/mail/mail.icon.d.ts +2 -2
- package/src/icons/outline/mail-open/mail-open.icon.d.ts +2 -2
- package/src/icons/outline/menu/menu.icon.d.ts +2 -2
- package/src/icons/outline/minus-sm/minus-sm.icon.d.ts +2 -5
- package/src/icons/outline/office-building/office-building.icon.d.ts +2 -5
- package/src/icons/outline/outline.d.ts +2 -6
- package/src/icons/outline/paper-airplane/paper-airplane.icon.d.ts +2 -5
- package/src/icons/outline/paperclip/paperclip.icon.d.ts +2 -5
- package/src/icons/outline/pencil/pencil.icon.d.ts +2 -2
- package/src/icons/outline/phone/phone.icon.d.ts +2 -2
- package/src/icons/outline/plus/plus.icon.d.ts +2 -2
- package/src/icons/outline/plus-sm/plus-sm.icon.d.ts +2 -5
- package/src/icons/outline/qrcode/qrcode.icon.d.ts +2 -2
- package/src/icons/outline/refresh/refresh.icon.d.ts +2 -2
- package/src/icons/outline/search/search.icon.d.ts +2 -2
- package/src/icons/outline/selector/selector.icon.d.ts +2 -2
- package/src/icons/outline/sm-view-grid-add/sm-view-grid-add.icon.d.ts +2 -5
- package/src/icons/outline/status-online/status-online.icon.d.ts +2 -5
- package/src/icons/outline/thumb-up/thumb-up.icon.d.ts +2 -2
- package/src/icons/outline/trash/trash.icon.d.ts +2 -2
- package/src/icons/outline/user/user.icon.d.ts +2 -2
- package/src/icons/outline/user-group/user-group.icon.d.ts +2 -5
- package/src/icons/outline/users/users.icon.d.ts +2 -2
- package/src/icons/outline/xmark/xmark.icon.d.ts +2 -2
- package/src/icons/solid/calendar/calendar.icon.d.ts +2 -2
- package/src/icons/solid/chat/chat.icon.d.ts +2 -2
- package/src/icons/solid/chat-alt/chat-alt-solid.icon.d.ts +2 -2
- package/src/icons/solid/check-circle/check-circle.icon.d.ts +2 -5
- package/src/icons/solid/chevron-left/chevron-left.icon.d.ts +2 -5
- package/src/icons/solid/chevron-right/chevron-right.icon.d.ts +2 -5
- package/src/icons/solid/clock/clock-solid.icon.d.ts +2 -2
- package/src/icons/solid/cloud-download/cloud-download.icon.d.ts +2 -5
- package/src/icons/solid/currency-euro/currency-euro.icon.d.ts +2 -5
- package/src/icons/solid/document-text/document-text-solid.icon.d.ts +2 -5
- package/src/icons/solid/exclamation/exclamation.icon.d.ts +2 -5
- package/src/icons/solid/exclamation-circle/exclamation-circle.icon.d.ts +2 -5
- package/src/icons/solid/eye/eye.icon.d.ts +2 -2
- package/src/icons/solid/eye-off/eye-off.icon.d.ts +2 -2
- package/src/icons/solid/filter/filter.icon.d.ts +2 -2
- package/src/icons/solid/information-circle/information-circle-solid.icon.d.ts +2 -5
- package/src/icons/solid/logout/logout.icon.d.ts +2 -2
- package/src/icons/solid/mail/mail.icon.d.ts +2 -2
- package/src/icons/solid/mail-open/mail-open.icon.d.ts +2 -2
- package/src/icons/solid/menu/menu.icon.d.ts +2 -2
- package/src/icons/solid/minus-sm/minus-sm.icon.d.ts +2 -5
- package/src/icons/solid/office-building/office-building.icon.d.ts +2 -5
- package/src/icons/solid/paper-airplane/paper-airplane.icon.d.ts +2 -5
- package/src/icons/solid/paperclip/paperclip.icon.d.ts +2 -5
- package/src/icons/solid/pencil/pencil-solid.icon.d.ts +2 -2
- package/src/icons/solid/phone/phone-solid.icon.d.ts +2 -2
- package/src/icons/solid/plus/plus.icon.d.ts +2 -2
- package/src/icons/solid/plus-sm/plus-sm.icon.d.ts +2 -5
- package/src/icons/solid/qrcode/qrcode.icon.d.ts +2 -2
- package/src/icons/solid/refresh/refresh-solid.icon.d.ts +2 -2
- package/src/icons/solid/search/search.icon.d.ts +2 -2
- package/src/icons/solid/selector/selector.icon.d.ts +2 -2
- package/src/icons/solid/sm-view-grid-add/sm-view-grid-add.icon.d.ts +2 -5
- package/src/icons/solid/solid.d.ts +2 -6
- package/src/icons/solid/status-online/status-online-solid.icon.d.ts +2 -5
- package/src/icons/solid/thumb-up/thumb-up.icon.d.ts +2 -2
- package/src/icons/solid/trash/trash-solid.icon.d.ts +2 -2
- package/src/icons/solid/user/user.icon.d.ts +2 -2
- package/src/icons/solid/user-group/user-group.icon.d.ts +2 -5
- package/src/icons/solid/users/users-solid.icon.d.ts +2 -2
- package/src/icons/solid/xmark/xmark.icon.d.ts +2 -2
- package/src/interfaces/icon.interface.d.ts +5 -5
- package/src/models/hex-color.model.d.ts +4 -4
- package/src/models/initials.model.d.ts +5 -5
- package/src/theme/font/font.d.ts +70 -70
- package/src/theme/font/index.d.ts +3 -3
- package/src/theme/provider/index.d.ts +3 -3
- package/src/theme/provider/parent.theme.d.ts +45 -45
- package/src/theme/provider/staff-member.theme.d.ts +45 -45
- package/src/theme/responsive/index.d.ts +2 -5
- package/src/theme/scale/index.d.ts +10 -10
- package/src/types/bubble-alignment.enum.d.ts +2 -2
- package/src/types/icontype.type.d.ts +1 -41
- package/src/types/keyboard-types.enum.d.ts +7 -7
- package/src/types/loading-dots.type.d.ts +6 -6
- package/src/types/size.enum.d.ts +3 -3
- package/src/types/text-properties.type.d.ts +8 -8
- package/src/types/visual-state.enum.d.ts +5 -5
- package/src/utilities/color-handler/color-handler.d.ts +2 -6
- package/src/utilities/toddle-datetime/interfaces/duration.interface.d.ts +18 -18
- package/src/utilities/toddle-datetime/interfaces/toddle-datetime.interface.d.ts +18 -14
- package/src/utilities/toddle-datetime/interfaces/toddle-datetime.interface.tsx +6 -0
- package/src/utilities/toddle-datetime/toddle-datetime.class.d.ts +48 -92
- package/src/utilities/toddle-datetime/toddle-datetime.class.tsx +31 -2
- package/src/utilities/toddle-datetime/toddle-datetime.preview.tsx +114 -84
- package/src/utilities/toddle-datetime/types/duration.type.d.ts +4 -0
- package/src/utilities/toddle-datetime/types/{duration-like.type.tsx → duration.type.tsx} +3 -0
- package/src/utilities/toddle-datetime/types/toddle-datetime.type.d.ts +3 -11
- package/src/utilities/toddle-datetime/types/toddle-datetime.type.tsx +8 -1
- package/src/utilities/toddle-datetime/types/duration-like.type.d.ts +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, {useContext} from 'react';
|
|
1
|
+
import React, {useCallback, useContext} from 'react';
|
|
2
2
|
import {ThemeCtx} from '../../../context/theme.context';
|
|
3
3
|
import {ImageSourcePropType, Pressable, View} from 'react-native';
|
|
4
4
|
import {Initials} from '../../../models/initials.model';
|
|
@@ -8,82 +8,55 @@ import {Stylesheet} from './my-child-list-item.styles';
|
|
|
8
8
|
import {Icon} from '../../../icons/index';
|
|
9
9
|
import {SmallText, TinyText} from '../../atoms/paragraph-components';
|
|
10
10
|
import {Heading2} from '../../atoms/heading-components';
|
|
11
|
-
import {
|
|
12
|
-
import {VisualState} from '../../../types/visual-state.enum';
|
|
11
|
+
import {ToddleDateTime} from '../../../utilities/toddle-datetime/toddle-datetime.class';
|
|
13
12
|
|
|
14
13
|
type MyChildListItemProps = {
|
|
15
14
|
id: string;
|
|
16
15
|
name: string;
|
|
17
|
-
|
|
18
|
-
age: number;
|
|
16
|
+
age: string;
|
|
19
17
|
sourceAvatar: ImageSourcePropType | Initials;
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
onPressChild: (id: string) => void;
|
|
19
|
+
onPressArrow: (id: string) => void;
|
|
22
20
|
};
|
|
23
21
|
export const MyChildListItem = ({
|
|
24
22
|
id,
|
|
25
23
|
name,
|
|
26
|
-
department,
|
|
27
24
|
age,
|
|
28
25
|
sourceAvatar,
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
onPressChild,
|
|
27
|
+
onPressArrow,
|
|
31
28
|
}: MyChildListItemProps) => {
|
|
32
|
-
const
|
|
33
|
-
const styles = Stylesheet(
|
|
29
|
+
const context = useContext(ThemeCtx);
|
|
30
|
+
const styles = Stylesheet(context);
|
|
34
31
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
name={'chevron-right'}
|
|
54
|
-
size={20}
|
|
55
|
-
color={Context.colors.ui.black}
|
|
56
|
-
/>
|
|
57
|
-
</View>
|
|
58
|
-
</Pressable>
|
|
59
|
-
) : (
|
|
60
|
-
<Pressable style={styles.container} onPress={() => onPress(id)}>
|
|
61
|
-
<Avatar source={sourceAvatar} size={Size.MEDIUM} isActive={false} />
|
|
62
|
-
<View style={styles.childTextContainer}>
|
|
63
|
-
<TinyText textAlign={'left'}>{age} jaar</TinyText>
|
|
64
|
-
<Heading2
|
|
65
|
-
bold={true}
|
|
66
|
-
textAlign={'left'}
|
|
67
|
-
numberOfLines={1}
|
|
68
|
-
ellipsizeMode={'tail'}
|
|
69
|
-
>
|
|
70
|
-
{name}
|
|
71
|
-
</Heading2>
|
|
72
|
-
<View style={styles.pillContainer}>
|
|
73
|
-
<Pill
|
|
74
|
-
label={'Geen actieve inschrijving'}
|
|
75
|
-
visualState={VisualState.INACTIVE}
|
|
76
|
-
/>
|
|
32
|
+
const onPressArrowCallback = useCallback(() => {
|
|
33
|
+
onPressArrow(id);
|
|
34
|
+
}, [id, onPressArrow]);
|
|
35
|
+
|
|
36
|
+
return (
|
|
37
|
+
<View style={styles.container}>
|
|
38
|
+
<Pressable style={styles.innerContainer} onPress={() => onPressChild(id)}>
|
|
39
|
+
<Avatar source={sourceAvatar} size={Size.MEDIUM} />
|
|
40
|
+
<View style={styles.childTextContainer}>
|
|
41
|
+
<TinyText textAlign={'left'}>{age}</TinyText>
|
|
42
|
+
<Heading2
|
|
43
|
+
bold={true}
|
|
44
|
+
textAlign={'left'}
|
|
45
|
+
numberOfLines={1}
|
|
46
|
+
ellipsizeMode={'tail'}
|
|
47
|
+
>
|
|
48
|
+
{name}
|
|
49
|
+
</Heading2>
|
|
77
50
|
</View>
|
|
78
|
-
</
|
|
79
|
-
<
|
|
51
|
+
</Pressable>
|
|
52
|
+
<Pressable onPress={onPressArrowCallback} style={styles.iconContainer}>
|
|
80
53
|
<Icon
|
|
81
54
|
style={'regular'}
|
|
82
55
|
name={'chevron-right'}
|
|
83
56
|
size={20}
|
|
84
|
-
color={
|
|
57
|
+
color={context.colors.ui.black}
|
|
85
58
|
/>
|
|
86
|
-
</
|
|
87
|
-
</
|
|
59
|
+
</Pressable>
|
|
60
|
+
</View>
|
|
88
61
|
);
|
|
89
62
|
};
|
|
@@ -1,39 +1,51 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import {MyChildListItem} from './my-child-list-item.component';
|
|
3
|
-
import {View} from 'react-native';
|
|
3
|
+
import {FlatList, View} from 'react-native';
|
|
4
|
+
|
|
5
|
+
interface IData {
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
age: number;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const data: IData[] = [];
|
|
12
|
+
for (let i = 0; i < 6; i++) {
|
|
13
|
+
data.push({
|
|
14
|
+
id: 'child' + i,
|
|
15
|
+
name: 'Children with very long names because in 2023 we give our kids special name',
|
|
16
|
+
age: Math.floor(Math.random() * (6 - 2 + 1) + 2),
|
|
17
|
+
});
|
|
18
|
+
}
|
|
4
19
|
|
|
5
20
|
export const MyChildListItemPreview = ({}: {}) => {
|
|
21
|
+
const renderMyChildList = ({item}: any) => {
|
|
22
|
+
return (
|
|
23
|
+
<MyChildListItem
|
|
24
|
+
id={item.id}
|
|
25
|
+
name={item.name}
|
|
26
|
+
age={item.age}
|
|
27
|
+
sourceAvatar={require('../../../../assets/components/avatar/baby.png')}
|
|
28
|
+
onPressChild={(id) => console.log('Pressed ', id)}
|
|
29
|
+
onPressArrow={(id) => console.log('Pressed arrow ', id)}
|
|
30
|
+
/>
|
|
31
|
+
);
|
|
32
|
+
};
|
|
33
|
+
|
|
6
34
|
return (
|
|
7
35
|
<View
|
|
8
36
|
style={{
|
|
9
37
|
flex: 1,
|
|
10
|
-
justifyContent: 'center',
|
|
11
38
|
padding: 16,
|
|
39
|
+
justifyContent: 'center',
|
|
12
40
|
backgroundColor: 'white',
|
|
13
41
|
}}
|
|
14
42
|
>
|
|
15
|
-
<
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
sourceAvatar={require('../../../../assets/components/avatar/baby.png')}
|
|
22
|
-
onPress={() => console.log('Pressed')}
|
|
23
|
-
isActive={true}
|
|
24
|
-
/>
|
|
25
|
-
</View>
|
|
26
|
-
<View style={{marginBottom: 24}}>
|
|
27
|
-
<MyChildListItem
|
|
28
|
-
id={'child2'}
|
|
29
|
-
name={'Luca JannsensJannsensJannsensJannsensJannsens'}
|
|
30
|
-
department={'De Teddybeertjes'}
|
|
31
|
-
age={2}
|
|
32
|
-
sourceAvatar={require('../../../../assets/components/avatar/baby.png')}
|
|
33
|
-
onPress={() => console.log('Pressed')}
|
|
34
|
-
isActive={false}
|
|
35
|
-
/>
|
|
36
|
-
</View>
|
|
43
|
+
<FlatList
|
|
44
|
+
style={{flex: 1}}
|
|
45
|
+
data={data}
|
|
46
|
+
renderItem={renderMyChildList}
|
|
47
|
+
keyExtractor={(item) => item.id}
|
|
48
|
+
/>
|
|
37
49
|
</View>
|
|
38
50
|
);
|
|
39
51
|
};
|
|
@@ -1,29 +1,33 @@
|
|
|
1
|
-
export function Stylesheet(
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
1
|
+
export function Stylesheet(context: any): {
|
|
2
|
+
container: {
|
|
3
|
+
width: string;
|
|
4
|
+
borderTopRightRadius: number;
|
|
5
|
+
borderBottomRightRadius: number;
|
|
6
|
+
borderTopLeftRadius: number;
|
|
7
|
+
borderBottomLeftRadius: number;
|
|
8
|
+
flexDirection: "row";
|
|
9
|
+
backgroundColor: any;
|
|
10
|
+
};
|
|
11
|
+
innerContainer: {
|
|
12
|
+
flex: number;
|
|
13
|
+
padding: number;
|
|
14
|
+
flexDirection: "row";
|
|
15
|
+
alignItems: "center";
|
|
16
|
+
borderTopRightRadius: number;
|
|
17
|
+
borderBottomRightRadius: number;
|
|
18
|
+
borderTopLeftRadius: number;
|
|
19
|
+
borderBottomLeftRadius: number;
|
|
20
|
+
};
|
|
21
|
+
childTextContainer: {
|
|
22
|
+
flex: number;
|
|
23
|
+
marginLeft: number;
|
|
24
|
+
};
|
|
25
|
+
iconContainer: {
|
|
26
|
+
alignItems: "flex-end";
|
|
27
|
+
justifyContent: "center";
|
|
28
|
+
paddingRight: number;
|
|
29
|
+
width: number;
|
|
30
|
+
borderTopRightRadius: number;
|
|
31
|
+
borderBottomRightRadius: number;
|
|
32
|
+
};
|
|
29
33
|
};
|
|
@@ -1,32 +1,37 @@
|
|
|
1
1
|
import {StyleSheet} from 'react-native';
|
|
2
2
|
import {Scale} from '../../../theme/scale/index';
|
|
3
3
|
|
|
4
|
-
export const Stylesheet = (
|
|
4
|
+
export const Stylesheet = (context) =>
|
|
5
5
|
StyleSheet.create({
|
|
6
6
|
container: {
|
|
7
7
|
width: '100%',
|
|
8
|
+
borderTopRightRadius: Scale.l,
|
|
9
|
+
borderBottomRightRadius: Scale.l,
|
|
10
|
+
borderTopLeftRadius: Scale.xxl,
|
|
11
|
+
borderBottomLeftRadius: Scale.xxl,
|
|
8
12
|
flexDirection: 'row',
|
|
9
|
-
|
|
13
|
+
backgroundColor: context.colors.ui.white,
|
|
14
|
+
},
|
|
15
|
+
innerContainer: {
|
|
16
|
+
flex: 1,
|
|
10
17
|
padding: Scale.xs,
|
|
11
|
-
|
|
18
|
+
flexDirection: 'row',
|
|
19
|
+
alignItems: 'center',
|
|
12
20
|
borderTopRightRadius: Scale.l,
|
|
13
21
|
borderBottomRightRadius: Scale.l,
|
|
22
|
+
borderTopLeftRadius: Scale.xxl,
|
|
14
23
|
borderBottomLeftRadius: Scale.xxl,
|
|
15
|
-
backgroundColor: Context.colors.ui.white,
|
|
16
24
|
},
|
|
17
25
|
childTextContainer: {
|
|
18
26
|
flex: 1,
|
|
19
|
-
alignItems: 'flex-start',
|
|
20
|
-
justifyContent: 'center',
|
|
21
27
|
marginLeft: Scale.l,
|
|
22
28
|
},
|
|
23
29
|
iconContainer: {
|
|
24
30
|
alignItems: 'flex-end',
|
|
25
31
|
justifyContent: 'center',
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
marginTop: Scale.xxxs,
|
|
32
|
+
paddingRight: Scale.xs,
|
|
33
|
+
width: Scale.m * 3,
|
|
34
|
+
borderTopRightRadius: Scale.l,
|
|
35
|
+
borderBottomRightRadius: Scale.l,
|
|
31
36
|
},
|
|
32
37
|
});
|
|
@@ -3,34 +3,17 @@ import renderer from 'react-test-renderer';
|
|
|
3
3
|
import {MyChildListItem} from './my-child-list-item.component';
|
|
4
4
|
|
|
5
5
|
describe('My child list item component test', () => {
|
|
6
|
-
it('Should render your child
|
|
6
|
+
it('Should render your child', () => {
|
|
7
7
|
const tree = renderer
|
|
8
8
|
.create(
|
|
9
9
|
<MyChildListItem
|
|
10
|
-
id={
|
|
10
|
+
id={'kind1'}
|
|
11
11
|
name={'Luca Jannsens'}
|
|
12
12
|
department={'De Teddybeertjes'}
|
|
13
|
-
age={
|
|
13
|
+
age={'leeftijd'}
|
|
14
14
|
sourceAvatar={require('./../../../../assets/components/avatar/baby.png')}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
/>
|
|
18
|
-
)
|
|
19
|
-
.toJSON();
|
|
20
|
-
|
|
21
|
-
expect(tree).toMatchSnapshot();
|
|
22
|
-
});
|
|
23
|
-
it('Should render your child but with an inactive subscription', () => {
|
|
24
|
-
const tree = renderer
|
|
25
|
-
.create(
|
|
26
|
-
<MyChildListItem
|
|
27
|
-
id={1}
|
|
28
|
-
name={'Luca Jannsens'}
|
|
29
|
-
department={'De Teddybeertjes'}
|
|
30
|
-
age={2}
|
|
31
|
-
sourceAvatar={require('./../../../../assets/components/avatar/baby.png')}
|
|
32
|
-
onPress={() => console.log('pressed Child')}
|
|
33
|
-
isActive={false}
|
|
15
|
+
onPressChild={() => console.log('pressed Child')}
|
|
16
|
+
onPressArrow={() => console.log('pressed arrow')}
|
|
34
17
|
/>
|
|
35
18
|
)
|
|
36
19
|
.toJSON();
|
|
@@ -1,21 +1,13 @@
|
|
|
1
|
-
import {ImageSourcePropType, ViewStyle} from 'react-native';
|
|
2
|
-
import {Initials} from '../../../models/initials.model';
|
|
1
|
+
import { ImageSourcePropType, ViewStyle } from 'react-native';
|
|
2
|
+
import { Initials } from '../../../models/initials.model';
|
|
3
3
|
interface IContactInfoCard {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
4
|
+
source: ImageSourcePropType | Initials;
|
|
5
|
+
name: string;
|
|
6
|
+
label?: string;
|
|
7
|
+
isBlocked?: boolean;
|
|
8
|
+
isActive?: boolean;
|
|
9
|
+
style?: ViewStyle;
|
|
10
|
+
isLoading?: boolean;
|
|
11
11
|
}
|
|
12
|
-
export declare const PersonInfoCard: ({
|
|
13
|
-
source,
|
|
14
|
-
isBlocked,
|
|
15
|
-
isActive,
|
|
16
|
-
name,
|
|
17
|
-
label,
|
|
18
|
-
style,
|
|
19
|
-
isLoading,
|
|
20
|
-
}: IContactInfoCard) => JSX.Element;
|
|
12
|
+
export declare const PersonInfoCard: ({ source, isBlocked, isActive, name, label, style, isLoading, }: IContactInfoCard) => JSX.Element;
|
|
21
13
|
export {};
|
|
@@ -1,15 +1,11 @@
|
|
|
1
|
-
import {ReactNode} from 'react';
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
2
|
interface TabViewProps {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
tabItem: {
|
|
4
|
+
value: string;
|
|
5
|
+
label: string;
|
|
6
|
+
}[];
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
setTabValue: (value: string) => void;
|
|
9
9
|
}
|
|
10
|
-
export declare const TabView: ({
|
|
11
|
-
tabItem,
|
|
12
|
-
setTabValue,
|
|
13
|
-
children,
|
|
14
|
-
}: TabViewProps) => JSX.Element;
|
|
10
|
+
export declare const TabView: ({ tabItem, setTabValue, children }: TabViewProps) => JSX.Element;
|
|
15
11
|
export {};
|
|
@@ -1,26 +1,17 @@
|
|
|
1
|
-
import {VisualState} from '../../../types/visual-state.enum';
|
|
2
|
-
import {BubbleAlignment} from '../../../types/bubble-alignment.enum';
|
|
3
|
-
import {ToddleDateTime} from '../../../utilities/toddle-datetime/toddle-datetime.class';
|
|
1
|
+
import { VisualState } from '../../../types/visual-state.enum';
|
|
2
|
+
import { BubbleAlignment } from '../../../types/bubble-alignment.enum';
|
|
3
|
+
import { ToddleDateTime } from '../../../utilities/toddle-datetime/toddle-datetime.class';
|
|
4
4
|
type TextBubbleProps = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
5
|
+
id: string;
|
|
6
|
+
text: string;
|
|
7
|
+
visualState: VisualState;
|
|
8
|
+
bubbleAlignment: BubbleAlignment;
|
|
9
|
+
timestamp: ToddleDateTime;
|
|
10
|
+
timestampLabel?: string;
|
|
11
|
+
send: boolean;
|
|
12
|
+
onFail: (id: string) => void;
|
|
13
|
+
onEdit: (id: string) => void;
|
|
14
|
+
onDelete: (id: string) => void;
|
|
14
15
|
};
|
|
15
|
-
declare const TextBubble: ({
|
|
16
|
-
|
|
17
|
-
text,
|
|
18
|
-
visualState,
|
|
19
|
-
bubbleAlignment,
|
|
20
|
-
timestamp,
|
|
21
|
-
send,
|
|
22
|
-
onFail,
|
|
23
|
-
onEdit,
|
|
24
|
-
onDelete,
|
|
25
|
-
}: TextBubbleProps) => JSX.Element;
|
|
26
|
-
export {TextBubble as TextBubble};
|
|
16
|
+
declare const TextBubble: ({ id, text, visualState, bubbleAlignment, timestamp, timestampLabel, send, onFail, onEdit, onDelete, }: TextBubbleProps) => JSX.Element;
|
|
17
|
+
export { TextBubble as TextBubble };
|
|
@@ -18,6 +18,7 @@ type TextBubbleProps = {
|
|
|
18
18
|
visualState: VisualState;
|
|
19
19
|
bubbleAlignment: BubbleAlignment;
|
|
20
20
|
timestamp: ToddleDateTime;
|
|
21
|
+
timestampLabel?: string;
|
|
21
22
|
send: boolean;
|
|
22
23
|
onFail: (id: string) => void;
|
|
23
24
|
onEdit: (id: string) => void;
|
|
@@ -30,6 +31,7 @@ const TextBubble = ({
|
|
|
30
31
|
visualState,
|
|
31
32
|
bubbleAlignment,
|
|
32
33
|
timestamp,
|
|
34
|
+
timestampLabel,
|
|
33
35
|
send,
|
|
34
36
|
onFail,
|
|
35
37
|
onEdit,
|
|
@@ -68,7 +70,7 @@ const TextBubble = ({
|
|
|
68
70
|
</View>
|
|
69
71
|
)}
|
|
70
72
|
<View style={styles.timestampContainer}>
|
|
71
|
-
<Timestamp sent={timestamp} />
|
|
73
|
+
<Timestamp sent={timestamp} label={timestampLabel} />
|
|
72
74
|
</View>
|
|
73
75
|
</View>
|
|
74
76
|
);
|
|
@@ -9,6 +9,9 @@ const {View} = require('react-native');
|
|
|
9
9
|
export const TextBubblePreview = ({}: {}) => {
|
|
10
10
|
const [sentTimeMessage, setSentTimeMessage] = useState(ToddleDateTime.now());
|
|
11
11
|
|
|
12
|
+
const dateTimeString = '2023-11-28T09:12:00';
|
|
13
|
+
const alternativeDateTime = ToddleDateTime.fromISO(dateTimeString);
|
|
14
|
+
|
|
12
15
|
return (
|
|
13
16
|
<View
|
|
14
17
|
style={{
|
|
@@ -22,7 +25,8 @@ export const TextBubblePreview = ({}: {}) => {
|
|
|
22
25
|
text="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam suscipit velit in nibh varius, quis accumsan tellus maximus."
|
|
23
26
|
bubbleAlignment={BubbleAlignment.SENT}
|
|
24
27
|
visualState={VisualState.DEFAULT}
|
|
25
|
-
timestamp={
|
|
28
|
+
timestamp={alternativeDateTime}
|
|
29
|
+
timestampLabel={'ingevuld op'}
|
|
26
30
|
send={true}
|
|
27
31
|
onFail={() => alert('Try to resend')}
|
|
28
32
|
onEdit={() => alert('Edit the message')}
|
|
@@ -54,7 +58,7 @@ export const TextBubblePreview = ({}: {}) => {
|
|
|
54
58
|
id={'4'}
|
|
55
59
|
text="Error!"
|
|
56
60
|
bubbleAlignment={BubbleAlignment.SENT}
|
|
57
|
-
visualState={VisualState.
|
|
61
|
+
visualState={VisualState.WARNING}
|
|
58
62
|
timestamp={sentTimeMessage}
|
|
59
63
|
send={false}
|
|
60
64
|
onFail={() => alert('Try to resend')}
|
|
@@ -65,7 +69,7 @@ export const TextBubblePreview = ({}: {}) => {
|
|
|
65
69
|
id={'5'}
|
|
66
70
|
text="Niet verzonden! Probeer het opnieuw aub! Swipe en refresh!"
|
|
67
71
|
bubbleAlignment={BubbleAlignment.SENT}
|
|
68
|
-
visualState={VisualState.
|
|
72
|
+
visualState={VisualState.WARNING}
|
|
69
73
|
timestamp={sentTimeMessage}
|
|
70
74
|
send={false}
|
|
71
75
|
onFail={() => alert('Try to resend')}
|
|
@@ -76,7 +80,7 @@ export const TextBubblePreview = ({}: {}) => {
|
|
|
76
80
|
id={'6'}
|
|
77
81
|
text="We hebben uw betaling van vorige maand nog niet ontvangen!"
|
|
78
82
|
bubbleAlignment={BubbleAlignment.RECEIVE}
|
|
79
|
-
visualState={VisualState.
|
|
83
|
+
visualState={VisualState.WARNING}
|
|
80
84
|
timestamp={sentTimeMessage}
|
|
81
85
|
send={true}
|
|
82
86
|
onFail={() => alert('Try to resend')}
|
|
@@ -1,45 +1,32 @@
|
|
|
1
|
-
export function Stylesheet(
|
|
2
|
-
|
|
3
|
-
bubbleAlignment: any
|
|
4
|
-
):
|
|
5
|
-
| StyleSheet.NamedStyles<any>
|
|
6
|
-
| StyleSheet.NamedStyles<{
|
|
7
|
-
rootContainer: {
|
|
1
|
+
export function Stylesheet(context: any, bubbleAlignment: any): StyleSheet.NamedStyles<any> | StyleSheet.NamedStyles<{
|
|
2
|
+
rootContainer: {
|
|
8
3
|
width: string;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
| {
|
|
40
|
-
alignSelf: string;
|
|
41
|
-
maxWidth?: undefined;
|
|
42
|
-
}
|
|
43
|
-
)[];
|
|
44
|
-
}>;
|
|
45
|
-
import {StyleSheet} from 'react-native/Libraries/StyleSheet/StyleSheet';
|
|
4
|
+
gap: number;
|
|
5
|
+
}[];
|
|
6
|
+
textBubbleRootContainer: ({
|
|
7
|
+
maxWidth: string;
|
|
8
|
+
minWidth: string;
|
|
9
|
+
alignSelf?: undefined;
|
|
10
|
+
} | {
|
|
11
|
+
alignSelf: string;
|
|
12
|
+
maxWidth?: undefined;
|
|
13
|
+
minWidth?: undefined;
|
|
14
|
+
})[];
|
|
15
|
+
failedBubbleRootContainer: ({
|
|
16
|
+
maxWidth: string;
|
|
17
|
+
minWidth: string;
|
|
18
|
+
alignSelf?: undefined;
|
|
19
|
+
} | {
|
|
20
|
+
alignSelf: string;
|
|
21
|
+
maxWidth?: undefined;
|
|
22
|
+
minWidth?: undefined;
|
|
23
|
+
})[];
|
|
24
|
+
timestampContainer: ({
|
|
25
|
+
maxWidth: string;
|
|
26
|
+
alignSelf?: undefined;
|
|
27
|
+
} | {
|
|
28
|
+
alignSelf: string;
|
|
29
|
+
maxWidth?: undefined;
|
|
30
|
+
})[];
|
|
31
|
+
}>;
|
|
32
|
+
import { StyleSheet } from "react-native/Libraries/StyleSheet/StyleSheet";
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import {StyleSheet} from 'react-native';
|
|
2
2
|
import {BubbleAlignment} from '../../../types/bubble-alignment.enum';
|
|
3
|
+
import {Scale} from '../../../theme/scale/index';
|
|
3
4
|
|
|
4
5
|
export const Stylesheet = (context, bubbleAlignment) =>
|
|
5
6
|
StyleSheet.create({
|
|
6
7
|
rootContainer: [
|
|
7
8
|
{
|
|
8
9
|
width: '100%',
|
|
10
|
+
gap: Scale.xxs,
|
|
9
11
|
},
|
|
10
12
|
],
|
|
11
13
|
textBubbleRootContainer: [
|
|
@@ -1,20 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
type FadePanelProps = {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
title: string;
|
|
4
|
+
subtitle?: string;
|
|
5
|
+
isVisible: boolean;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
maxHeight: number;
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
scrollable: boolean | undefined;
|
|
10
10
|
};
|
|
11
|
-
export declare const FadePanel: ({
|
|
12
|
-
title,
|
|
13
|
-
subtitle,
|
|
14
|
-
isVisible,
|
|
15
|
-
onClose,
|
|
16
|
-
maxHeight,
|
|
17
|
-
children,
|
|
18
|
-
scrollable,
|
|
19
|
-
}: FadePanelProps) => JSX.Element;
|
|
11
|
+
export declare const FadePanel: ({ title, subtitle, isVisible, onClose, maxHeight, children, scrollable, }: FadePanelProps) => JSX.Element;
|
|
20
12
|
export {};
|