@tactics/toddle-styleguide 2.0.3 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/App.tsx +0 -12
- package/app.json +1 -0
- package/babel.config.js +14 -1
- package/index.d.ts +2 -5
- package/index.tsx +0 -8
- package/metro.config.js +11 -0
- package/package.json +1 -1
- package/src/components/atoms/animated-wave/animated-wave.styles.d.ts +19 -19
- package/src/components/atoms/backdrop/backdrop.styles.d.ts +9 -9
- package/src/components/atoms/background-gradient/background-gradient.styles.d.ts +6 -6
- package/src/components/atoms/count/count.component.d.ts +1 -1
- package/src/components/atoms/count/count.component.tsx +12 -13
- package/src/components/atoms/count/count.preview.tsx +5 -5
- package/src/components/atoms/count/count.styles.d.ts +23 -20
- package/src/components/atoms/count/count.styles.js +25 -17
- package/src/components/atoms/footer/footer.component.d.ts +1 -4
- package/src/components/atoms/footer/footer.component.tsx +9 -13
- package/src/components/atoms/footer/footer.preview.tsx +0 -17
- package/src/components/atoms/footer/footer.styles.d.ts +16 -13
- package/src/components/atoms/footer/footer.styles.js +1 -1
- package/src/components/atoms/increment-input/increment-input.styles.d.ts +33 -33
- package/src/components/atoms/quick-message/quick-message.styles.d.ts +16 -13
- package/src/components/atoms/split-container/split-container.styles.d.ts +12 -12
- package/src/components/molecules/amount/amount.component.d.ts +3 -3
- package/src/components/molecules/amount/amount.component.tsx +125 -100
- package/src/components/molecules/amount/amount.preview.tsx +59 -11
- package/src/components/molecules/amount/amount.styles.d.ts +34 -34
- package/src/components/molecules/amount/amount.styles.js +7 -7
- package/src/components/molecules/avatar/avatar.component.d.ts +1 -1
- package/src/components/molecules/avatar/avatar.component.tsx +8 -6
- package/src/components/molecules/avatar/avatar.styles.d.ts +96 -78
- package/src/components/molecules/avatar/avatar.styles.js +18 -16
- package/src/components/molecules/bare-time-picker/bare-time-picker.component.d.ts +1 -1
- package/src/components/molecules/bare-time-picker/bare-time-picker.component.native.tsx +78 -0
- package/src/components/molecules/bare-time-picker/bare-time-picker.component.tsx +39 -67
- package/src/components/molecules/bare-time-picker/bare-time-picker.preview.tsx +1 -1
- package/src/components/molecules/bare-time-picker/bare-time-picker.styles.d.ts +6 -0
- package/src/components/molecules/bare-time-picker/bare-time-picker.styles.js +14 -8
- package/src/components/molecules/calendar-select/calendar-select.component.d.ts +2 -1
- package/src/components/molecules/calendar-select/calendar-select.component.tsx +76 -73
- package/src/components/molecules/calendar-select/calendar-select.styles.d.ts +31 -31
- package/src/components/molecules/calendar-select/calendar-select.styles.js +33 -33
- package/src/components/molecules/context-label/context-label.component.tsx +21 -23
- package/src/components/molecules/context-label/context-label.preview.tsx +45 -30
- package/src/components/molecules/context-label/context-label.styles.d.ts +7 -5
- package/src/components/molecules/date-input/date-input.styles.d.ts +16 -16
- package/src/components/molecules/day/day.component.d.ts +10 -6
- package/src/components/molecules/default-select/default-select.styles.d.ts +11 -11
- package/src/components/molecules/filter-range/filter-range.styles.d.ts +20 -20
- package/src/components/molecules/filter-tab/filter-tab.styles.d.ts +58 -53
- package/src/components/molecules/info/info.component.tsx +13 -5
- package/src/components/molecules/info/info.preview.tsx +4 -5
- package/src/components/molecules/info/info.styles.d.ts +14 -14
- package/src/components/molecules/inline-error/inline-error.component.tsx +10 -3
- package/src/components/molecules/inline-error/inline-error.preview.tsx +4 -2
- package/src/components/molecules/inline-error/inline-error.styles.d.ts +16 -16
- package/src/components/molecules/inline-error/inline-error.styles.js +2 -2
- package/src/components/molecules/inline-notice/inline-notice.component.tsx +16 -12
- package/src/components/molecules/inline-notice/inline-notice.preview.tsx +4 -2
- package/src/components/molecules/inline-notice/inline-notice.styles.d.ts +16 -16
- package/src/components/molecules/inline-notice/inline-notice.styles.js +18 -18
- package/src/components/molecules/message-input/message-input.styles.d.ts +31 -31
- package/src/components/molecules/password-input/password-input.component.tsx +1 -1
- package/src/components/molecules/password-input/password-input.styles.d.ts +27 -27
- package/src/components/molecules/quick-filter/quick-filter.component.tsx +1 -1
- package/src/components/molecules/quick-filter/quick-filter.preview.tsx +1 -1
- package/src/components/molecules/quick-filter/quick-filter.styles.js +1 -1
- package/src/components/molecules/search-input/search.styles.d.ts +31 -31
- package/src/components/molecules/select-list-item/select-list-item.component.d.ts +1 -1
- package/src/components/molecules/select-list-item/select-list-item.component.tsx +13 -9
- package/src/components/molecules/select-list-item/select-list-item.styles.d.ts +27 -22
- package/src/components/molecules/select-picker/select-picker.styles.d.ts +30 -30
- package/src/components/molecules/selectable-list-item/selectable-list-item-preview.tsx +1 -1
- package/src/components/molecules/selectable-list-item/selectable-list-item.component.d.ts +1 -1
- package/src/components/molecules/selectable-list-item/selectable-list-item.component.tsx +17 -5
- package/src/components/molecules/selectable-list-item/selectable-list-item.styles.d.ts +31 -27
- package/src/components/molecules/swipe/swipe.component.native.tsx +78 -0
- package/src/components/molecules/swipe/swipe.component.tsx +5 -63
- package/src/components/molecules/time-picker/time-picker.component.tsx +8 -2
- package/src/components/molecules/time-picker/time-picker.styles.d.ts +25 -25
- package/src/components/molecules/wide-button/wide-button.styles.d.ts +14 -10
- package/src/components/organisms/child-list-item/child-list-item.component.d.ts +1 -1
- package/src/components/organisms/child-list-item/child-list-item.component.tsx +29 -26
- package/src/components/organisms/child-list-item/child-list-item.styles.d.ts +56 -53
- package/src/components/organisms/child-list-item/child-list-item.styles.js +5 -5
- package/src/components/organisms/contact-item/contact-item.styles.d.ts +13 -13
- package/src/components/organisms/journal-entry/components/journal-entry-type/journal-entry-type.component.d.ts +1 -1
- package/src/components/organisms/journal-entry/components/journal-entry-type/journal-entry-type.component.tsx +5 -4
- package/src/components/organisms/journal-entry/journal-entry.component.d.ts +1 -1
- package/src/components/organisms/journal-entry/journal-entry.styles.d.ts +25 -22
- package/src/components/organisms/my-child-list-item/my-child-list-item.styles.d.ts +31 -31
- package/src/components/organisms/text-bubble/text-bubble.styles.d.ts +14 -14
- package/src/components/organisms/timetable-edit/timetable-edit.component.d.ts +1 -1
- package/src/components/organisms/timetable-edit/timetable-edit.component.tsx +58 -56
- package/src/components/organisms/timetable-edit/timetable-edit.preview.tsx +20 -18
- package/src/components/organisms/timetable-edit/timetable-edit.styles.d.ts +19 -19
- package/src/components/organisms/timetable-edit/timetable-edit.styles.js +21 -21
- package/src/components/organisms/timetable-editor/components/timetable-edit-wrapper.d.ts +4 -4
- package/src/components/organisms/timetable-editor/components/timetable-edit-wrapper.tsx +65 -58
- package/src/components/organisms/timetable-editor/timetable-editor-staff.component.d.ts +8 -0
- package/src/components/organisms/timetable-editor/timetable-editor-staff.component.tsx +66 -47
- package/src/components/organisms/timetable-editor/timetable-editor.component.d.ts +2 -2
- package/src/components/organisms/timetable-editor/timetable-editor.component.tsx +76 -53
- package/src/components/organisms/timetable-editor/timetable-editor.preview.tsx +7 -7
- package/src/components/organisms/timetable-editor/timetable-editor.styles.d.ts +6 -6
- package/src/components/organisms/timetable-editor/timetable-editor.styles.js +8 -8
- package/src/components/templates/modal/components/fade-panel.styles.d.ts +17 -13
- package/src/components/templates/modal/modal.styles.d.ts +21 -21
- package/src/components/templates/popover/components/foreground/foreground.styles.d.ts +10 -10
- package/src/components/templates/popover/components/modal/heading/heading.styles.d.ts +12 -12
- package/src/components/templates/popover/components/modal/modal.styles.d.ts +17 -17
- package/src/components/templates/popover/popover.styles.d.ts +9 -9
- package/src/components/templates/popover-action/popover-action.component.d.ts +8 -4
- package/src/components/templates/popover-action/popover-action.component.tsx +7 -4
- package/src/components/templates/popover-action/popover-action.styles.d.ts +26 -26
- package/src/context/theme.context.ts +4 -4
- package/src/hooks/use-debounce.ts +8 -8
- package/src/icons/crown.icon.tsx +18 -5
- package/src/icons/outline/outline-default.preview.tsx +2 -2
- package/src/icons/outline/outline.tsx +4 -4
- package/src/icons/outline/photograph/photograph.icon.tsx +3 -6
- package/src/icons/solid/photograph/photograph-solid.icon.tsx +4 -4
- package/src/icons/solid/share/share.icon.tsx +1 -3
- package/src/icons/solid/solid.tsx +4 -4
- package/src/models/time-slot-sequence.ts +13 -9
- package/src/theme/provider/parent.theme.ts +4 -4
- package/src/theme/provider/staff-member.theme.ts +4 -4
- package/src/types/state.enum.ts +5 -5
- package/src/utilities/color-handler/color-handler.ts +2 -3
- package/tsconfig.json +2 -1
- package/src/components/organisms/day-select/day-select.component.d.ts +0 -9
- package/src/components/organisms/day-select/day-select.component.tsx +0 -108
- package/src/components/organisms/day-select/day-select.preview.d.ts +0 -2
- package/src/components/organisms/day-select/day-select.preview.tsx +0 -23
- package/src/components/organisms/day-select/day-select.styles.d.ts +0 -18
- package/src/components/organisms/day-select/day-select.styles.js +0 -22
- package/src/components/organisms/tab-view/__snapshots__/tab-view.test.js.snap +0 -421
- package/src/components/organisms/tab-view/tab-view.component.d.ts +0 -12
- package/src/components/organisms/tab-view/tab-view.component.tsx +0 -49
- package/src/components/organisms/tab-view/tab-view.preview.d.ts +0 -2
- package/src/components/organisms/tab-view/tab-view.preview.tsx +0 -37
- package/src/components/organisms/tab-view/tab-view.styles.d.ts +0 -10
- package/src/components/organisms/tab-view/tab-view.styles.js +0 -14
- package/src/components/organisms/tab-view/tab-view.test.js +0 -37
|
@@ -5,7 +5,7 @@ import {ThemeCtx} from '../../../context/theme.context';
|
|
|
5
5
|
import {View} from 'react-native';
|
|
6
6
|
import {Stylesheet} from './inline-error.styles';
|
|
7
7
|
import {SmallText} from '../../atoms/paragraph-components';
|
|
8
|
-
import {
|
|
8
|
+
import {Icon} from '../../../icons';
|
|
9
9
|
|
|
10
10
|
type InlineErrorProps = {
|
|
11
11
|
label: string;
|
|
@@ -17,8 +17,15 @@ const InlineError = ({label}: InlineErrorProps) => {
|
|
|
17
17
|
|
|
18
18
|
return (
|
|
19
19
|
<View style={styles.container}>
|
|
20
|
-
<Icon
|
|
21
|
-
|
|
20
|
+
<Icon
|
|
21
|
+
name="exclamation-circle"
|
|
22
|
+
style="regular"
|
|
23
|
+
color={context.colors.ui.error.dark}
|
|
24
|
+
/>
|
|
25
|
+
<SmallText
|
|
26
|
+
addStyle={styles.label}
|
|
27
|
+
textColor={context.colors.ui.error.dark}
|
|
28
|
+
>
|
|
22
29
|
{label}
|
|
23
30
|
</SmallText>
|
|
24
31
|
</View>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import {InlineError} from './inline-error.component';
|
|
3
3
|
const {View} = require('react-native');
|
|
4
4
|
|
|
5
5
|
export const InlineErrorPreview = ({}: {}) => {
|
|
@@ -13,7 +13,9 @@ export const InlineErrorPreview = ({}: {}) => {
|
|
|
13
13
|
}}
|
|
14
14
|
>
|
|
15
15
|
<InlineError
|
|
16
|
-
label={
|
|
16
|
+
label={
|
|
17
|
+
'Deze dag is reeds gefactureerd. U kan deze enkel nog aanpassen in de beheerssoftware.'
|
|
18
|
+
}
|
|
17
19
|
/>
|
|
18
20
|
</View>
|
|
19
21
|
);
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
export function Stylesheet(context: any): {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
2
|
+
container: {
|
|
3
|
+
flexDirection: 'row';
|
|
4
|
+
gap: number;
|
|
5
|
+
width: '100%';
|
|
6
|
+
backgroundColor: any;
|
|
7
|
+
borderRadius: number;
|
|
8
|
+
alignItems: 'center';
|
|
9
|
+
justifyContent: 'flex-start';
|
|
10
|
+
paddingLeft: number;
|
|
11
|
+
paddingTop: number;
|
|
12
|
+
paddingRight: number;
|
|
13
|
+
paddingBottom: number;
|
|
14
|
+
};
|
|
15
|
+
label: {
|
|
16
|
+
flex: number;
|
|
17
|
+
};
|
|
18
18
|
};
|
|
@@ -5,23 +5,27 @@ import {ThemeCtx} from '../../../context/theme.context';
|
|
|
5
5
|
import {View} from 'react-native';
|
|
6
6
|
import {Stylesheet} from './inline-notice.styles';
|
|
7
7
|
import {SmallText} from '../../atoms/paragraph-components';
|
|
8
|
-
import {
|
|
8
|
+
import {Icon} from '../../../icons';
|
|
9
9
|
|
|
10
10
|
type InlineNoticeProps = {
|
|
11
|
-
|
|
11
|
+
label: string;
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
const InlineNotice = ({label}: InlineNoticeProps) => {
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
const context = useContext(ThemeCtx);
|
|
16
|
+
const styles = Stylesheet(context);
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
18
|
+
return (
|
|
19
|
+
<View style={styles.container}>
|
|
20
|
+
<Icon
|
|
21
|
+
name="exclamation-circle"
|
|
22
|
+
style="regular"
|
|
23
|
+
color={context.colors.main[0]}
|
|
24
|
+
/>
|
|
25
|
+
<SmallText addStyle={styles.label} textColor={context.colors.main[0]}>
|
|
26
|
+
{label}
|
|
27
|
+
</SmallText>
|
|
28
|
+
</View>
|
|
29
|
+
);
|
|
26
30
|
};
|
|
27
31
|
export {InlineNotice as InlineNotice};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import {InlineNotice} from './inline-notice.component';
|
|
3
3
|
const {View} = require('react-native');
|
|
4
4
|
|
|
5
5
|
export const InlineNoticePreview = ({}: {}) => {
|
|
@@ -13,7 +13,9 @@ export const InlineNoticePreview = ({}: {}) => {
|
|
|
13
13
|
}}
|
|
14
14
|
>
|
|
15
15
|
<InlineNotice
|
|
16
|
-
label={
|
|
16
|
+
label={
|
|
17
|
+
'Deze dag is reeds gefactureerd. U kan deze enkel nog aanpassen in de beheerssoftware.'
|
|
18
|
+
}
|
|
17
19
|
/>
|
|
18
20
|
</View>
|
|
19
21
|
);
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
export function Stylesheet(context: any): {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
2
|
+
container: {
|
|
3
|
+
flexDirection: 'row';
|
|
4
|
+
gap: number;
|
|
5
|
+
width: '100%';
|
|
6
|
+
backgroundColor: any;
|
|
7
|
+
borderRadius: number;
|
|
8
|
+
alignItems: 'center';
|
|
9
|
+
justifyContent: 'flex-start';
|
|
10
|
+
paddingLeft: number;
|
|
11
|
+
paddingTop: number;
|
|
12
|
+
paddingRight: number;
|
|
13
|
+
paddingBottom: number;
|
|
14
|
+
};
|
|
15
|
+
label: {
|
|
16
|
+
flex: number;
|
|
17
|
+
};
|
|
18
18
|
};
|
|
@@ -2,21 +2,21 @@ import {StyleSheet} from 'react-native';
|
|
|
2
2
|
import {Scale} from '../../../theme/scale';
|
|
3
3
|
|
|
4
4
|
export const Stylesheet = (context) =>
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
5
|
+
StyleSheet.create({
|
|
6
|
+
container: {
|
|
7
|
+
flexDirection: 'row',
|
|
8
|
+
gap: Scale.m,
|
|
9
|
+
width: '100%',
|
|
10
|
+
backgroundColor: context.colors.main[9],
|
|
11
|
+
borderRadius: Scale.s,
|
|
12
|
+
alignItems: 'center',
|
|
13
|
+
justifyContent: 'flex-start',
|
|
14
|
+
paddingLeft: Scale.m,
|
|
15
|
+
paddingTop: Scale.m,
|
|
16
|
+
paddingRight: Scale.m,
|
|
17
|
+
paddingBottom: Scale.m,
|
|
18
|
+
},
|
|
19
|
+
label: {
|
|
20
|
+
flex: 1,
|
|
21
|
+
},
|
|
22
|
+
});
|
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
export function Stylesheet(context: any): {
|
|
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
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
2
|
+
rootContainer: {
|
|
3
|
+
width: '100%';
|
|
4
|
+
flexDirection: 'row';
|
|
5
|
+
alignItems: 'flex-end';
|
|
6
|
+
backgroundColor: any;
|
|
7
|
+
borderStyle: 'solid';
|
|
8
|
+
borderWidth: number;
|
|
9
|
+
borderColor: any;
|
|
10
|
+
borderRadius: number;
|
|
11
|
+
paddingRight: number;
|
|
12
|
+
};
|
|
13
|
+
textInput: {
|
|
14
|
+
lineHeight: number;
|
|
15
|
+
color: any;
|
|
16
|
+
paddingLeft: number;
|
|
17
|
+
paddingRight: number;
|
|
18
|
+
paddingTop: number;
|
|
19
|
+
paddingBottom: number;
|
|
20
|
+
justifyContent: 'center';
|
|
21
|
+
fontFamily: string;
|
|
22
|
+
fontSize: number;
|
|
23
|
+
maxHeight: number;
|
|
24
|
+
height: '100%';
|
|
25
|
+
flex: number;
|
|
26
|
+
};
|
|
27
|
+
iconContainer: {
|
|
28
|
+
minWidth: number;
|
|
29
|
+
minHeight: number;
|
|
30
|
+
justifyContent: 'center';
|
|
31
|
+
alignItems: 'center';
|
|
32
|
+
};
|
|
33
33
|
};
|
|
@@ -29,7 +29,7 @@ export const PasswordInput = ({keyboardType, ...props}: PasswordInputProps) => {
|
|
|
29
29
|
placeholderTextColor={Context.colors.ui.grey}
|
|
30
30
|
secureTextEntry={secure}
|
|
31
31
|
keyboardType={keyboardType ? keyboardType : KeyBoardTypes.DEFAULT}
|
|
32
|
-
autoCapitalize=
|
|
32
|
+
autoCapitalize="none"
|
|
33
33
|
{...props}
|
|
34
34
|
/>
|
|
35
35
|
<Pressable
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
export function Stylesheet(Context: any): {
|
|
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
|
-
|
|
2
|
+
container: {
|
|
3
|
+
width: '100%';
|
|
4
|
+
height: number;
|
|
5
|
+
flexDirection: 'row';
|
|
6
|
+
backgroundColor: any;
|
|
7
|
+
borderRadius: number;
|
|
8
|
+
alignItems: 'center';
|
|
9
|
+
};
|
|
10
|
+
textInput: {
|
|
11
|
+
lineHeight: number;
|
|
12
|
+
color: any;
|
|
13
|
+
fontFamily: string;
|
|
14
|
+
fontSize: number;
|
|
15
|
+
flex: number;
|
|
16
|
+
height: '100%';
|
|
17
|
+
paddingLeft: number;
|
|
18
|
+
justifyContent: 'center';
|
|
19
|
+
};
|
|
20
|
+
iconContainer: {
|
|
21
|
+
height: '100%';
|
|
22
|
+
alignItems: 'center';
|
|
23
|
+
justifyContent: 'center';
|
|
24
|
+
paddingLeft: number;
|
|
25
|
+
paddingTop: number;
|
|
26
|
+
paddingRight: number;
|
|
27
|
+
paddingBottom: number;
|
|
28
|
+
};
|
|
29
29
|
};
|
|
@@ -6,7 +6,7 @@ import {ThemeCtx} from '../../../context/theme.context';
|
|
|
6
6
|
import {Stylesheet} from './quick-filter.styles';
|
|
7
7
|
import {Paragraph} from '../../atoms/paragraph-components';
|
|
8
8
|
import {StateTextColorHandler} from '../../../utilities/color-handler/color-handler';
|
|
9
|
-
import {
|
|
9
|
+
import {State} from '../../../types/state.enum';
|
|
10
10
|
|
|
11
11
|
type QuickFilterProps = {
|
|
12
12
|
id: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, {useState} from 'react';
|
|
2
2
|
import {QuickFilter} from './quick-filter.component';
|
|
3
3
|
import {View} from 'react-native';
|
|
4
|
-
import {
|
|
4
|
+
import {State} from '../../../types/state.enum';
|
|
5
5
|
|
|
6
6
|
export const QuickFilterPreview = ({}: {}) => {
|
|
7
7
|
const [defaultFilterIsSelected, setDefaultFilterIsSelected] = useState(false);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {StyleSheet} from 'react-native';
|
|
2
2
|
import {Scale} from '../../../theme/scale';
|
|
3
|
-
import {
|
|
3
|
+
import {State} from '../../../types/state.enum';
|
|
4
4
|
|
|
5
5
|
export const Stylesheet = (context, visualState, isSelected) =>
|
|
6
6
|
StyleSheet.create({
|
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
export function Stylesheet(context: any): {
|
|
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
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
2
|
+
container: {
|
|
3
|
+
width: '100%';
|
|
4
|
+
height: number;
|
|
5
|
+
flexDirection: 'row';
|
|
6
|
+
borderStyle: 'solid';
|
|
7
|
+
borderWidth: number;
|
|
8
|
+
borderColor: any;
|
|
9
|
+
borderRadius: number;
|
|
10
|
+
backgroundColor: any;
|
|
11
|
+
overflow: 'hidden';
|
|
12
|
+
alignItems: 'center';
|
|
13
|
+
paddingRight: number;
|
|
14
|
+
};
|
|
15
|
+
inputContainer: {
|
|
16
|
+
lineHeight: number;
|
|
17
|
+
color: any;
|
|
18
|
+
paddingLeft: number;
|
|
19
|
+
paddingTop: number;
|
|
20
|
+
paddingBottom: number;
|
|
21
|
+
fontFamily: string;
|
|
22
|
+
fontSize: number;
|
|
23
|
+
flex: number;
|
|
24
|
+
justifyContent: 'center';
|
|
25
|
+
height: '100%';
|
|
26
|
+
};
|
|
27
|
+
iconContainer: {
|
|
28
|
+
minWidth: number;
|
|
29
|
+
minHeight: number;
|
|
30
|
+
justifyContent: 'center';
|
|
31
|
+
alignItems: 'center';
|
|
32
|
+
};
|
|
33
33
|
};
|
|
@@ -8,5 +8,5 @@ type SelectListProps = {
|
|
|
8
8
|
inverse?: boolean;
|
|
9
9
|
image?: ImageSourcePropType;
|
|
10
10
|
};
|
|
11
|
-
declare const SelectListItem: ({ title, subtitle, icon, onPress, inverse, image }: SelectListProps) => React.JSX.Element;
|
|
11
|
+
declare const SelectListItem: ({ title, subtitle, icon, onPress, inverse, image, }: SelectListProps) => React.JSX.Element;
|
|
12
12
|
export { SelectListItem as SelectListItem };
|
|
@@ -2,7 +2,13 @@ import * as React from 'react';
|
|
|
2
2
|
import {useContext} from 'react';
|
|
3
3
|
|
|
4
4
|
import {ThemeCtx} from '../../../context/theme.context';
|
|
5
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
ImageSourcePropType,
|
|
7
|
+
ImageStyle,
|
|
8
|
+
Image,
|
|
9
|
+
Pressable,
|
|
10
|
+
View,
|
|
11
|
+
} from 'react-native';
|
|
6
12
|
import {Stylesheet} from './select-list-item.styles';
|
|
7
13
|
import {Icon} from '../../../icons/index';
|
|
8
14
|
import {Heading2} from '../../atoms/heading-components';
|
|
@@ -14,7 +20,7 @@ type SelectListProps = {
|
|
|
14
20
|
icon: React.ReactElement;
|
|
15
21
|
onPress?: () => void;
|
|
16
22
|
inverse?: boolean;
|
|
17
|
-
image?: ImageSourcePropType
|
|
23
|
+
image?: ImageSourcePropType;
|
|
18
24
|
};
|
|
19
25
|
|
|
20
26
|
const SelectListItem = ({
|
|
@@ -23,7 +29,7 @@ const SelectListItem = ({
|
|
|
23
29
|
icon,
|
|
24
30
|
onPress,
|
|
25
31
|
inverse,
|
|
26
|
-
image
|
|
32
|
+
image,
|
|
27
33
|
}: SelectListProps) => {
|
|
28
34
|
const context = useContext(ThemeCtx);
|
|
29
35
|
const styles = Stylesheet(context, inverse);
|
|
@@ -36,17 +42,15 @@ const SelectListItem = ({
|
|
|
36
42
|
|
|
37
43
|
const renderIconOrImage = () => {
|
|
38
44
|
if (image) {
|
|
39
|
-
return <Image source={image} style={styles.image as ImageStyle}
|
|
45
|
+
return <Image source={image} style={styles.image as ImageStyle} />;
|
|
40
46
|
} else {
|
|
41
|
-
return <View>{inverse ? invertedIcon : icon}</View
|
|
47
|
+
return <View>{inverse ? invertedIcon : icon}</View>;
|
|
42
48
|
}
|
|
43
|
-
}
|
|
49
|
+
};
|
|
44
50
|
|
|
45
51
|
return (
|
|
46
52
|
<Pressable onPress={onPress} style={styles.container}>
|
|
47
|
-
<View style={styles.iconCircle}>
|
|
48
|
-
{renderIconOrImage()}
|
|
49
|
-
</View>
|
|
53
|
+
<View style={styles.iconCircle}>{renderIconOrImage()}</View>
|
|
50
54
|
<View style={styles.textContainer}>
|
|
51
55
|
<View>
|
|
52
56
|
<Heading2
|
|
@@ -1,36 +1,41 @@
|
|
|
1
|
-
export function Stylesheet(
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
export function Stylesheet(
|
|
2
|
+
context: any,
|
|
3
|
+
inverse: any
|
|
4
|
+
):
|
|
5
|
+
| StyleSheet.NamedStyles<any>
|
|
6
|
+
| StyleSheet.NamedStyles<{
|
|
7
|
+
container: {
|
|
8
|
+
width: '100%';
|
|
9
|
+
flexDirection: 'row';
|
|
10
|
+
alignItems: 'center';
|
|
11
|
+
};
|
|
12
|
+
iconCircle: {
|
|
13
|
+
justifyContent: 'center';
|
|
14
|
+
alignItems: 'center';
|
|
10
15
|
backgroundColor: any;
|
|
11
16
|
width: number;
|
|
12
17
|
height: number;
|
|
13
18
|
borderRadius: number;
|
|
14
19
|
marginRight: number;
|
|
15
|
-
|
|
16
|
-
|
|
20
|
+
};
|
|
21
|
+
image: {
|
|
17
22
|
position: string;
|
|
18
23
|
width: string;
|
|
19
24
|
height: string;
|
|
20
25
|
borderRadius: number;
|
|
21
|
-
|
|
22
|
-
|
|
26
|
+
}[];
|
|
27
|
+
textContainer: {
|
|
23
28
|
flex: number;
|
|
24
|
-
flexDirection:
|
|
25
|
-
justifyContent:
|
|
29
|
+
flexDirection: 'column';
|
|
30
|
+
justifyContent: 'center';
|
|
26
31
|
paddingTop: number;
|
|
27
32
|
paddingBottom: number;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
justifyContent:
|
|
31
|
-
alignItems:
|
|
33
|
+
};
|
|
34
|
+
iconSquare: {
|
|
35
|
+
justifyContent: 'center';
|
|
36
|
+
alignItems: 'center';
|
|
32
37
|
marginLeft: number;
|
|
33
38
|
marginRight: number;
|
|
34
|
-
|
|
35
|
-
}>;
|
|
36
|
-
import {
|
|
39
|
+
};
|
|
40
|
+
}>;
|
|
41
|
+
import {StyleSheet} from 'react-native';
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
export function Stylesheet(Context: any): {
|
|
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
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
2
|
+
container: {
|
|
3
|
+
flexDirection: 'row';
|
|
4
|
+
justifyContent: 'center';
|
|
5
|
+
alignItems: 'center';
|
|
6
|
+
width: '100%';
|
|
7
|
+
height: number;
|
|
8
|
+
backgroundColor: any;
|
|
9
|
+
paddingTop: number;
|
|
10
|
+
paddingRight: number;
|
|
11
|
+
paddingBottom: number;
|
|
12
|
+
paddingLeft: number;
|
|
13
|
+
borderWidth: number;
|
|
14
|
+
borderStyle: 'solid';
|
|
15
|
+
borderColor: any;
|
|
16
|
+
borderRadius: number;
|
|
17
|
+
};
|
|
18
|
+
pickerContainer: {
|
|
19
|
+
width: '100%';
|
|
20
|
+
height: '100%';
|
|
21
|
+
justifyContent: 'center';
|
|
22
|
+
zIndex: number;
|
|
23
|
+
};
|
|
24
|
+
iconContainer: {
|
|
25
|
+
width: '10%';
|
|
26
|
+
height: '100%';
|
|
27
|
+
right: number;
|
|
28
|
+
justifyContent: 'center';
|
|
29
|
+
alignItems: 'center';
|
|
30
|
+
position: 'absolute';
|
|
31
|
+
};
|
|
32
32
|
};
|