@adiraku/react-native-ui 1.2.9-canary-7 → 2.0.0-canary-2
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/lib/commonjs/components/ActionList/ActionList.component.js +8 -7
- package/lib/commonjs/components/ActionList/ActionList.component.js.map +1 -1
- package/lib/commonjs/components/ActionList/ActionList.styles.js +13 -10
- package/lib/commonjs/components/ActionList/ActionList.styles.js.map +1 -1
- package/lib/commonjs/components/Appbar/Appbar.component.js +5 -4
- package/lib/commonjs/components/Appbar/Appbar.component.js.map +1 -1
- package/lib/commonjs/components/Appbar/Appbar.style.js +15 -12
- package/lib/commonjs/components/Appbar/Appbar.style.js.map +1 -1
- package/lib/commonjs/components/BottomSheet/BottomSheet.component.js +1 -1
- package/lib/commonjs/components/BottomSheet/BottomSheet.component.js.map +1 -1
- package/lib/commonjs/components/BottomSheet/BottomSheet.style.js +10 -8
- package/lib/commonjs/components/BottomSheet/BottomSheet.style.js.map +1 -1
- package/lib/commonjs/components/CheckBoxInput/CheckBoxInput.component.js +16 -16
- package/lib/commonjs/components/CheckBoxInput/CheckBoxInput.component.js.map +1 -1
- package/lib/commonjs/components/CheckBoxInput/CheckBoxInput.style.js +35 -25
- package/lib/commonjs/components/CheckBoxInput/CheckBoxInput.style.js.map +1 -1
- package/lib/commonjs/components/Checkbox/Checkbox.component.js +8 -4
- package/lib/commonjs/components/Checkbox/Checkbox.component.js.map +1 -1
- package/lib/commonjs/components/Checkbox/Checkbox.style.js +16 -17
- package/lib/commonjs/components/Checkbox/Checkbox.style.js.map +1 -1
- package/lib/commonjs/components/Pagination/pagination.component.js +39 -0
- package/lib/commonjs/components/Pagination/pagination.component.js.map +1 -0
- package/lib/commonjs/components/Pagination/pagination.style.js +26 -0
- package/lib/commonjs/components/Pagination/pagination.style.js.map +1 -0
- package/lib/commonjs/components/Pagination/pagination.type.js +2 -0
- package/lib/commonjs/components/Pagination/pagination.type.js.map +1 -0
- package/lib/commonjs/components/RadioButton/RadioButton.component.js +1 -1
- package/lib/commonjs/components/RadioButton/RadioButton.component.js.map +1 -1
- package/lib/commonjs/components/RadioButton/RadioButton.style.js +15 -12
- package/lib/commonjs/components/RadioButton/RadioButton.style.js.map +1 -1
- package/lib/commonjs/components/RadioInput/RadioInput.component.js +17 -19
- package/lib/commonjs/components/RadioInput/RadioInput.component.js.map +1 -1
- package/lib/commonjs/components/RadioInput/RadioInput.style.js +35 -25
- package/lib/commonjs/components/RadioInput/RadioInput.style.js.map +1 -1
- package/lib/commonjs/components/StickyBar/StickyBar.component.js +67 -0
- package/lib/commonjs/components/StickyBar/StickyBar.component.js.map +1 -0
- package/lib/commonjs/components/StickyBar/StickyBar.style.js +64 -0
- package/lib/commonjs/components/StickyBar/StickyBar.style.js.map +1 -0
- package/lib/commonjs/components/StickyBar/StickyBar.type.js +6 -0
- package/lib/commonjs/components/StickyBar/StickyBar.type.js.map +1 -0
- package/lib/commonjs/components/TextInput/TextInput.component.js +9 -3
- package/lib/commonjs/components/TextInput/TextInput.component.js.map +1 -1
- package/lib/commonjs/components/TextInput/TextInput.style.js +30 -25
- package/lib/commonjs/components/TextInput/TextInput.style.js.map +1 -1
- package/lib/commonjs/components/View/View.component.js +42 -0
- package/lib/commonjs/components/View/View.component.js.map +1 -0
- package/lib/commonjs/components/View/View.type.js +6 -0
- package/lib/commonjs/components/View/View.type.js.map +1 -0
- package/lib/commonjs/components/button/button.component.js +7 -4
- package/lib/commonjs/components/button/button.component.js.map +1 -1
- package/lib/commonjs/components/button/button.styles.js +21 -17
- package/lib/commonjs/components/button/button.styles.js.map +1 -1
- package/lib/commonjs/components/calendars/calendars.component.js +37 -37
- package/lib/commonjs/components/calendars/calendars.component.js.map +1 -1
- package/lib/commonjs/components/calendars/calendars.service.js.map +1 -1
- package/lib/commonjs/components/calendars/calendars.style.js +73 -51
- package/lib/commonjs/components/calendars/calendars.style.js.map +1 -1
- package/lib/commonjs/components/index.js +21 -0
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/components/typography/typography.component.js +12 -2
- package/lib/commonjs/components/typography/typography.component.js.map +1 -1
- package/lib/commonjs/components/typography/typography.style.js +21 -351
- package/lib/commonjs/components/typography/typography.style.js.map +1 -1
- package/lib/commonjs/config/index.js +50 -0
- package/lib/commonjs/config/index.js.map +1 -0
- package/lib/commonjs/config/makeStyles.js +37 -0
- package/lib/commonjs/config/makeStyles.js.map +1 -0
- package/lib/commonjs/config/theme.default.js +422 -0
- package/lib/commonjs/config/theme.default.js.map +1 -0
- package/lib/commonjs/config/theme.provider.js +48 -0
- package/lib/commonjs/config/theme.provider.js.map +1 -0
- package/lib/commonjs/config/theme.type.js +6 -0
- package/lib/commonjs/config/theme.type.js.map +1 -0
- package/lib/commonjs/index.js +11 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/themes/border.js.map +1 -1
- package/lib/commonjs/themes/colors.js +1 -1
- package/lib/commonjs/themes/shadow.js +1 -0
- package/lib/commonjs/themes/shadow.js.map +1 -1
- package/lib/module/components/ActionList/ActionList.component.js +8 -7
- package/lib/module/components/ActionList/ActionList.component.js.map +1 -1
- package/lib/module/components/ActionList/ActionList.styles.js +11 -7
- package/lib/module/components/ActionList/ActionList.styles.js.map +1 -1
- package/lib/module/components/Appbar/Appbar.component.js +4 -3
- package/lib/module/components/Appbar/Appbar.component.js.map +1 -1
- package/lib/module/components/Appbar/Appbar.style.js +10 -6
- package/lib/module/components/Appbar/Appbar.style.js.map +1 -1
- package/lib/module/components/BottomSheet/BottomSheet.component.js +2 -2
- package/lib/module/components/BottomSheet/BottomSheet.component.js.map +1 -1
- package/lib/module/components/BottomSheet/BottomSheet.style.js +10 -7
- package/lib/module/components/BottomSheet/BottomSheet.style.js.map +1 -1
- package/lib/module/components/CheckBoxInput/CheckBoxInput.component.js +17 -17
- package/lib/module/components/CheckBoxInput/CheckBoxInput.component.js.map +1 -1
- package/lib/module/components/CheckBoxInput/CheckBoxInput.style.js +24 -13
- package/lib/module/components/CheckBoxInput/CheckBoxInput.style.js.map +1 -1
- package/lib/module/components/Checkbox/Checkbox.component.js +9 -5
- package/lib/module/components/Checkbox/Checkbox.component.js.map +1 -1
- package/lib/module/components/Checkbox/Checkbox.style.js +14 -14
- package/lib/module/components/Checkbox/Checkbox.style.js.map +1 -1
- package/lib/module/components/Pagination/pagination.component.js +31 -0
- package/lib/module/components/Pagination/pagination.component.js.map +1 -0
- package/lib/module/components/Pagination/pagination.style.js +20 -0
- package/lib/module/components/Pagination/pagination.style.js.map +1 -0
- package/lib/module/components/Pagination/pagination.type.js +2 -0
- package/lib/module/components/Pagination/pagination.type.js.map +1 -0
- package/lib/module/components/RadioButton/RadioButton.component.js +2 -2
- package/lib/module/components/RadioButton/RadioButton.component.js.map +1 -1
- package/lib/module/components/RadioButton/RadioButton.style.js +12 -8
- package/lib/module/components/RadioButton/RadioButton.style.js.map +1 -1
- package/lib/module/components/RadioInput/RadioInput.component.js +17 -19
- package/lib/module/components/RadioInput/RadioInput.component.js.map +1 -1
- package/lib/module/components/RadioInput/RadioInput.style.js +24 -13
- package/lib/module/components/RadioInput/RadioInput.style.js.map +1 -1
- package/lib/module/components/StickyBar/StickyBar.component.js +60 -0
- package/lib/module/components/StickyBar/StickyBar.component.js.map +1 -0
- package/lib/module/components/StickyBar/StickyBar.style.js +57 -0
- package/lib/module/components/StickyBar/StickyBar.style.js.map +1 -0
- package/lib/module/components/StickyBar/StickyBar.type.js +2 -0
- package/lib/module/components/StickyBar/StickyBar.type.js.map +1 -0
- package/lib/module/components/TextInput/TextInput.component.js +10 -4
- package/lib/module/components/TextInput/TextInput.component.js.map +1 -1
- package/lib/module/components/TextInput/TextInput.style.js +21 -15
- package/lib/module/components/TextInput/TextInput.style.js.map +1 -1
- package/lib/module/components/View/View.component.js +35 -0
- package/lib/module/components/View/View.component.js.map +1 -0
- package/lib/module/components/View/View.type.js +2 -0
- package/lib/module/components/View/View.type.js.map +1 -0
- package/lib/module/components/button/button.component.js +7 -4
- package/lib/module/components/button/button.component.js.map +1 -1
- package/lib/module/components/button/button.styles.js +14 -9
- package/lib/module/components/button/button.styles.js.map +1 -1
- package/lib/module/components/calendars/calendars.component.js +36 -36
- package/lib/module/components/calendars/calendars.component.js.map +1 -1
- package/lib/module/components/calendars/calendars.service.js.map +1 -1
- package/lib/module/components/calendars/calendars.style.js +65 -43
- package/lib/module/components/calendars/calendars.style.js.map +1 -1
- package/lib/module/components/index.js +3 -0
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/components/typography/typography.component.js +13 -3
- package/lib/module/components/typography/typography.component.js.map +1 -1
- package/lib/module/components/typography/typography.style.js +21 -350
- package/lib/module/components/typography/typography.style.js.map +1 -1
- package/lib/module/config/index.js +5 -0
- package/lib/module/config/index.js.map +1 -0
- package/lib/module/config/makeStyles.js +30 -0
- package/lib/module/config/makeStyles.js.map +1 -0
- package/lib/module/config/theme.default.js +416 -0
- package/lib/module/config/theme.default.js.map +1 -0
- package/lib/module/config/theme.provider.js +35 -0
- package/lib/module/config/theme.provider.js.map +1 -0
- package/lib/module/config/theme.type.js +2 -0
- package/lib/module/config/theme.type.js.map +1 -0
- package/lib/module/index.js +1 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/themes/border.js.map +1 -1
- package/lib/module/themes/colors.js +1 -1
- package/lib/module/themes/shadow.js +1 -0
- package/lib/module/themes/shadow.js.map +1 -1
- package/lib/typescript/components/ActionList/ActionList.component.d.ts.map +1 -1
- package/lib/typescript/components/ActionList/ActionList.styles.d.ts +3 -4
- package/lib/typescript/components/ActionList/ActionList.styles.d.ts.map +1 -1
- package/lib/typescript/components/Appbar/Appbar.component.d.ts.map +1 -1
- package/lib/typescript/components/Appbar/Appbar.style.d.ts +2 -3
- package/lib/typescript/components/Appbar/Appbar.style.d.ts.map +1 -1
- package/lib/typescript/components/BottomSheet/BottomSheet.style.d.ts +1 -1
- package/lib/typescript/components/BottomSheet/BottomSheet.style.d.ts.map +1 -1
- package/lib/typescript/components/CheckBoxInput/CheckBoxInput.component.d.ts +1 -1
- package/lib/typescript/components/CheckBoxInput/CheckBoxInput.component.d.ts.map +1 -1
- package/lib/typescript/components/CheckBoxInput/CheckBoxInput.style.d.ts +5 -4
- package/lib/typescript/components/CheckBoxInput/CheckBoxInput.style.d.ts.map +1 -1
- package/lib/typescript/components/Checkbox/Checkbox.component.d.ts.map +1 -1
- package/lib/typescript/components/Checkbox/Checkbox.style.d.ts +3 -2
- package/lib/typescript/components/Checkbox/Checkbox.style.d.ts.map +1 -1
- package/lib/typescript/components/Pagination/pagination.component.d.ts +5 -0
- package/lib/typescript/components/Pagination/pagination.component.d.ts.map +1 -0
- package/lib/typescript/components/Pagination/pagination.style.d.ts +19 -0
- package/lib/typescript/components/Pagination/pagination.style.d.ts.map +1 -0
- package/lib/typescript/components/Pagination/pagination.type.d.ts +15 -0
- package/lib/typescript/components/Pagination/pagination.type.d.ts.map +1 -0
- package/lib/typescript/components/RadioButton/RadioButton.component.d.ts +1 -1
- package/lib/typescript/components/RadioButton/RadioButton.component.d.ts.map +1 -1
- package/lib/typescript/components/RadioButton/RadioButton.style.d.ts +2 -2
- package/lib/typescript/components/RadioButton/RadioButton.style.d.ts.map +1 -1
- package/lib/typescript/components/RadioInput/RadioInput.component.d.ts.map +1 -1
- package/lib/typescript/components/RadioInput/RadioInput.style.d.ts +5 -4
- package/lib/typescript/components/RadioInput/RadioInput.style.d.ts.map +1 -1
- package/lib/typescript/components/StickyBar/StickyBar.component.d.ts +5 -0
- package/lib/typescript/components/StickyBar/StickyBar.component.d.ts.map +1 -0
- package/lib/typescript/components/StickyBar/StickyBar.style.d.ts +15 -0
- package/lib/typescript/components/StickyBar/StickyBar.style.d.ts.map +1 -0
- package/lib/typescript/components/StickyBar/StickyBar.type.d.ts +30 -0
- package/lib/typescript/components/StickyBar/StickyBar.type.d.ts.map +1 -0
- package/lib/typescript/components/TextInput/TextInput.component.d.ts.map +1 -1
- package/lib/typescript/components/TextInput/TextInput.style.d.ts +6 -4
- package/lib/typescript/components/TextInput/TextInput.style.d.ts.map +1 -1
- package/lib/typescript/components/TextInput/TextInput.type.d.ts +1 -1
- package/lib/typescript/components/TextInput/TextInput.type.d.ts.map +1 -1
- package/lib/typescript/components/View/View.component.d.ts +4 -0
- package/lib/typescript/components/View/View.component.d.ts.map +1 -0
- package/lib/typescript/components/View/View.type.d.ts +10 -0
- package/lib/typescript/components/View/View.type.d.ts.map +1 -0
- package/lib/typescript/components/button/button.component.d.ts.map +1 -1
- package/lib/typescript/components/button/button.styles.d.ts +3 -4
- package/lib/typescript/components/button/button.styles.d.ts.map +1 -1
- package/lib/typescript/components/calendars/calendars.component.d.ts.map +1 -1
- package/lib/typescript/components/calendars/calendars.service.d.ts.map +1 -1
- package/lib/typescript/components/calendars/calendars.style.d.ts +6 -4
- package/lib/typescript/components/calendars/calendars.style.d.ts.map +1 -1
- package/lib/typescript/components/index.d.ts +7 -0
- package/lib/typescript/components/index.d.ts.map +1 -1
- package/lib/typescript/components/typography/typography.component.d.ts +1 -1
- package/lib/typescript/components/typography/typography.component.d.ts.map +1 -1
- package/lib/typescript/components/typography/typography.style.d.ts +5 -60
- package/lib/typescript/components/typography/typography.style.d.ts.map +1 -1
- package/lib/typescript/components/typography/typography.type.d.ts +7 -0
- package/lib/typescript/components/typography/typography.type.d.ts.map +1 -1
- package/lib/typescript/config/index.d.ts +5 -0
- package/lib/typescript/config/index.d.ts.map +1 -0
- package/lib/typescript/config/makeStyles.d.ts +4 -0
- package/lib/typescript/config/makeStyles.d.ts.map +1 -0
- package/lib/typescript/config/theme.default.d.ts +178 -0
- package/lib/typescript/config/theme.default.d.ts.map +1 -0
- package/lib/typescript/config/theme.provider.d.ts +8 -0
- package/lib/typescript/config/theme.provider.d.ts.map +1 -0
- package/lib/typescript/config/theme.type.d.ts +12 -0
- package/lib/typescript/config/theme.type.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +1 -0
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/themes/shadow.d.ts +2 -3
- package/lib/typescript/themes/shadow.d.ts.map +1 -1
- package/package.json +5 -1
- package/src/components/ActionList/ActionList.component.tsx +20 -17
- package/src/components/ActionList/ActionList.styles.tsx +11 -11
- package/src/components/Appbar/Appbar.component.tsx +4 -3
- package/src/components/Appbar/Appbar.style.tsx +9 -9
- package/src/components/BottomSheet/BottomSheet.component.tsx +2 -2
- package/src/components/BottomSheet/BottomSheet.style.tsx +9 -7
- package/src/components/CheckBoxInput/CheckBoxInput.component.tsx +21 -20
- package/src/components/CheckBoxInput/CheckBoxInput.style.tsx +29 -15
- package/src/components/Checkbox/Checkbox.component.tsx +13 -13
- package/src/components/Checkbox/Checkbox.style.tsx +16 -17
- package/src/components/Pagination/pagination.component.tsx +29 -0
- package/src/components/Pagination/pagination.style.tsx +20 -0
- package/src/components/Pagination/pagination.type.ts +16 -0
- package/src/components/RadioButton/RadioButton.component.tsx +3 -4
- package/src/components/RadioButton/RadioButton.style.tsx +10 -10
- package/src/components/RadioInput/RadioInput.component.tsx +14 -15
- package/src/components/RadioInput/RadioInput.style.tsx +29 -15
- package/src/components/StickyBar/StickyBar.component.tsx +74 -0
- package/src/components/StickyBar/StickyBar.style.tsx +79 -0
- package/src/components/StickyBar/StickyBar.type.ts +35 -0
- package/src/components/TextInput/TextInput.component.tsx +7 -6
- package/src/components/TextInput/TextInput.style.tsx +86 -70
- package/src/components/TextInput/TextInput.type.ts +1 -1
- package/src/components/View/View.component.tsx +42 -0
- package/src/components/View/View.type.ts +14 -0
- package/src/components/button/button.component.tsx +9 -4
- package/src/components/button/button.styles.ts +15 -15
- package/src/components/calendars/calendars.component.tsx +27 -22
- package/src/components/calendars/calendars.service.ts +7 -3
- package/src/components/calendars/calendars.style.ts +77 -49
- package/src/components/index.ts +15 -0
- package/src/components/typography/typography.component.tsx +17 -4
- package/src/components/typography/typography.style.tsx +17 -472
- package/src/components/typography/typography.type.ts +9 -0
- package/src/config/index.ts +4 -0
- package/src/config/makeStyles.ts +52 -0
- package/src/config/theme.default.ts +440 -0
- package/src/config/theme.provider.tsx +53 -0
- package/src/config/theme.type.ts +17 -0
- package/src/index.tsx +1 -0
- package/src/themes/border.ts +3 -3
- package/src/themes/colors.ts +1 -1
- package/src/themes/shadow.tsx +4 -2
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { TextStyle } from 'react-native';
|
|
2
|
+
import { TypographyProps } from '../components';
|
|
3
|
+
export declare const defaultFontFamily: {
|
|
4
|
+
regular: string;
|
|
5
|
+
regularItalic: string;
|
|
6
|
+
semibold: string;
|
|
7
|
+
semiboldItalic: string;
|
|
8
|
+
bold: string;
|
|
9
|
+
boldItalic: string;
|
|
10
|
+
};
|
|
11
|
+
export declare type FontFamilyStyleType = Record<NonNullable<TypographyProps['variant']>, TextStyle & {
|
|
12
|
+
fontType?: keyof typeof defaultFontFamily;
|
|
13
|
+
}>;
|
|
14
|
+
export declare const defaultFontFamilyStyle: FontFamilyStyleType;
|
|
15
|
+
export declare const defaultTheme: {
|
|
16
|
+
colors: {
|
|
17
|
+
light: {
|
|
18
|
+
'border-primary': string;
|
|
19
|
+
'border-default': string;
|
|
20
|
+
'border-inverse': string;
|
|
21
|
+
'border-input': string;
|
|
22
|
+
'border-info': string;
|
|
23
|
+
'border-disable': string;
|
|
24
|
+
'border-warning': string;
|
|
25
|
+
'border-success': string;
|
|
26
|
+
'border-danger': string;
|
|
27
|
+
'icon-primary': string;
|
|
28
|
+
'icon-secondary': string;
|
|
29
|
+
'icon-inverse': string;
|
|
30
|
+
'icon-disable': string;
|
|
31
|
+
'icon-disable-secondary': string;
|
|
32
|
+
'icon-danger': string;
|
|
33
|
+
'icon-info': string;
|
|
34
|
+
'icon-warning': string;
|
|
35
|
+
'icon-warning-secondary': string;
|
|
36
|
+
'icon-success': string;
|
|
37
|
+
'icon-orange': string;
|
|
38
|
+
'surface-primary': string;
|
|
39
|
+
'surface-secondary': string;
|
|
40
|
+
'surface-disable': string;
|
|
41
|
+
'surface-warning': string;
|
|
42
|
+
'surface-danger': string;
|
|
43
|
+
'surface-info': string;
|
|
44
|
+
'surface-success': string;
|
|
45
|
+
'fill-primary': string;
|
|
46
|
+
'fill-secondary': string;
|
|
47
|
+
'fill-inverse': string;
|
|
48
|
+
'fill-disable': string;
|
|
49
|
+
'fill-disable-secondary': string;
|
|
50
|
+
'fill-info': string;
|
|
51
|
+
'fill-info-secondary': string;
|
|
52
|
+
'fill-danger': string;
|
|
53
|
+
'fill-danger-secondary': string;
|
|
54
|
+
'fill-warning': string;
|
|
55
|
+
'fill-warning-secondary': string;
|
|
56
|
+
'fill-success': string;
|
|
57
|
+
'fill-success-secondary': string;
|
|
58
|
+
'text-primary': string;
|
|
59
|
+
'text-secondary': string;
|
|
60
|
+
'text-inverse': string;
|
|
61
|
+
'text-disable': string;
|
|
62
|
+
'text-disable-secondary': string;
|
|
63
|
+
'text-danger': string;
|
|
64
|
+
'text-info': string;
|
|
65
|
+
'text-warning': string;
|
|
66
|
+
'text-success': string;
|
|
67
|
+
'button-primary': string;
|
|
68
|
+
'button-secondary': string;
|
|
69
|
+
'button-inverse': string;
|
|
70
|
+
'button-disable': string;
|
|
71
|
+
'button-danger': string;
|
|
72
|
+
'button-info': string;
|
|
73
|
+
'button-warning': string;
|
|
74
|
+
'button-success': string;
|
|
75
|
+
};
|
|
76
|
+
dark: {
|
|
77
|
+
'border-primary': string;
|
|
78
|
+
'border-default': string;
|
|
79
|
+
'border-inverse': string;
|
|
80
|
+
'border-input': string;
|
|
81
|
+
'border-info': string;
|
|
82
|
+
'border-disable': string;
|
|
83
|
+
'border-warning': string;
|
|
84
|
+
'border-success': string;
|
|
85
|
+
'border-danger': string;
|
|
86
|
+
'icon-primary': string;
|
|
87
|
+
'icon-secondary': string;
|
|
88
|
+
'icon-inverse': string;
|
|
89
|
+
'icon-disable': string;
|
|
90
|
+
'icon-disable-secondary': string;
|
|
91
|
+
'icon-danger': string;
|
|
92
|
+
'icon-info': string;
|
|
93
|
+
'icon-warning': string;
|
|
94
|
+
'icon-warning-secondary': string;
|
|
95
|
+
'icon-success': string;
|
|
96
|
+
'icon-orange': string;
|
|
97
|
+
'surface-primary': string;
|
|
98
|
+
'surface-secondary': string;
|
|
99
|
+
'surface-disable': string;
|
|
100
|
+
'surface-warning': string;
|
|
101
|
+
'surface-danger': string;
|
|
102
|
+
'surface-info': string;
|
|
103
|
+
'surface-success': string;
|
|
104
|
+
'fill-primary': string;
|
|
105
|
+
'fill-secondary': string;
|
|
106
|
+
'fill-inverse': string;
|
|
107
|
+
'fill-disable': string;
|
|
108
|
+
'fill-disable-secondary': string;
|
|
109
|
+
'fill-info': string;
|
|
110
|
+
'fill-info-secondary': string;
|
|
111
|
+
'fill-danger': string;
|
|
112
|
+
'fill-danger-secondary': string;
|
|
113
|
+
'fill-warning': string;
|
|
114
|
+
'fill-warning-secondary': string;
|
|
115
|
+
'fill-success': string;
|
|
116
|
+
'fill-success-secondary': string;
|
|
117
|
+
'text-primary': string;
|
|
118
|
+
'text-secondary': string;
|
|
119
|
+
'text-inverse': string;
|
|
120
|
+
'text-disable': string;
|
|
121
|
+
'text-disable-secondary': string;
|
|
122
|
+
'text-danger': string;
|
|
123
|
+
'text-info': string;
|
|
124
|
+
'text-warning': string;
|
|
125
|
+
'text-success': string;
|
|
126
|
+
'button-primary': string;
|
|
127
|
+
'button-secondary': string;
|
|
128
|
+
'button-inverse': string;
|
|
129
|
+
'button-disable': string;
|
|
130
|
+
'button-danger': string;
|
|
131
|
+
'button-info': string;
|
|
132
|
+
'button-warning': string;
|
|
133
|
+
'button-success': string;
|
|
134
|
+
};
|
|
135
|
+
};
|
|
136
|
+
Fonts: {
|
|
137
|
+
regular: string;
|
|
138
|
+
regularItalic: string;
|
|
139
|
+
semibold: string;
|
|
140
|
+
semiboldItalic: string;
|
|
141
|
+
bold: string;
|
|
142
|
+
boldItalic: string;
|
|
143
|
+
};
|
|
144
|
+
FontFamilyStyle: FontFamilyStyleType;
|
|
145
|
+
Border: {
|
|
146
|
+
1: number;
|
|
147
|
+
2: number;
|
|
148
|
+
};
|
|
149
|
+
Radius: {
|
|
150
|
+
4: number;
|
|
151
|
+
8: number;
|
|
152
|
+
12: number;
|
|
153
|
+
16: number;
|
|
154
|
+
24: number;
|
|
155
|
+
36: number;
|
|
156
|
+
full: number;
|
|
157
|
+
border: number;
|
|
158
|
+
};
|
|
159
|
+
Shadow: import("../themes").ShadowType;
|
|
160
|
+
Spacing: {
|
|
161
|
+
2: number;
|
|
162
|
+
4: number;
|
|
163
|
+
8: number;
|
|
164
|
+
12: number;
|
|
165
|
+
16: number;
|
|
166
|
+
20: number;
|
|
167
|
+
24: number;
|
|
168
|
+
28: number;
|
|
169
|
+
32: number;
|
|
170
|
+
36: number;
|
|
171
|
+
48: number;
|
|
172
|
+
64: number;
|
|
173
|
+
};
|
|
174
|
+
};
|
|
175
|
+
export declare type AppTheme = typeof defaultTheme;
|
|
176
|
+
export declare type ColorScheme = keyof typeof defaultTheme.colors;
|
|
177
|
+
export declare type ColorTokenType = typeof defaultTheme.colors.light;
|
|
178
|
+
//# sourceMappingURL=theme.default.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.default.d.ts","sourceRoot":"","sources":["../../../src/config/theme.default.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAGhD,eAAO,MAAM,iBAAiB;;;;;;;CAO7B,CAAC;AAEF,oBAAY,mBAAmB,GAAG,MAAM,CACtC,WAAW,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC,EACvC,SAAS,GAAG;IACV,QAAQ,CAAC,EAAE,MAAM,OAAO,iBAAiB,CAAC;CAC3C,CACF,CAAC;AACF,eAAO,MAAM,sBAAsB,EAAE,mBAqRpC,CAAC;AAEF,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyIxB,CAAC;AAEF,oBAAY,QAAQ,GAAG,OAAO,YAAY,CAAC;AAC3C,oBAAY,WAAW,GAAG,MAAM,OAAO,YAAY,CAAC,MAAM,CAAC;AAC3D,oBAAY,cAAc,GAAG,OAAO,YAAY,CAAC,MAAM,CAAC,KAAK,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AppTheme } from './theme.default';
|
|
3
|
+
import { ThemeProviderContext, ThemeProviderProps } from './theme.type';
|
|
4
|
+
export declare const ThemeContext: React.Context<ThemeProviderContext>;
|
|
5
|
+
export declare const createTheme: (theme: AppTheme) => AppTheme;
|
|
6
|
+
export declare function ThemeProvider(props: ThemeProviderProps): JSX.Element;
|
|
7
|
+
export declare const useAppTheme: () => ThemeProviderContext;
|
|
8
|
+
//# sourceMappingURL=theme.provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.provider.d.ts","sourceRoot":"","sources":["../../../src/config/theme.provider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAMN,MAAM,OAAO,CAAC;AAGf,OAAO,EAAE,QAAQ,EAA6B,MAAM,iBAAiB,CAAC;AACtE,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAExE,eAAO,MAAM,YAAY,qCAExB,CAAC;AAEF,eAAO,MAAM,WAAW,UAAW,QAAQ,KAAG,QAE7C,CAAC;AAEF,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,eA0BtD;AAED,eAAO,MAAM,WAAW,4BAIvB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { AppTheme, ColorScheme } from './theme.default';
|
|
3
|
+
export declare type ThemeProviderContext = {
|
|
4
|
+
colors: AppTheme['colors']['light'];
|
|
5
|
+
colorScheme: ColorScheme;
|
|
6
|
+
changeColorScheme: () => void;
|
|
7
|
+
} & Pick<AppTheme, 'Border' | 'Radius' | 'Shadow' | 'Spacing' | 'Fonts' | 'FontFamilyStyle'>;
|
|
8
|
+
export declare type ThemeProviderProps = PropsWithChildren & {
|
|
9
|
+
theme?: AppTheme;
|
|
10
|
+
};
|
|
11
|
+
export declare type AppThemeColor = Omit<ThemeProviderContext, 'changeColorScheme'>;
|
|
12
|
+
//# sourceMappingURL=theme.type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.type.d.ts","sourceRoot":"","sources":["../../../src/config/theme.type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAExD,oBAAY,oBAAoB,GAAG;IACjC,MAAM,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC;IACpC,WAAW,EAAE,WAAW,CAAC;IACzB,iBAAiB,EAAE,MAAM,IAAI,CAAC;CAC/B,GAAG,IAAI,CACN,QAAQ,EACR,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,OAAO,GAAG,iBAAiB,CACzE,CAAC;AAEF,oBAAY,kBAAkB,GAAG,iBAAiB,GAAG;IACnD,KAAK,CAAC,EAAE,QAAQ,CAAC;CAClB,CAAC;AAEF,oBAAY,aAAa,GAAG,IAAI,CAAC,oBAAoB,EAAE,mBAAmB,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { ViewStyle } from 'react-native';
|
|
2
|
-
declare type Shadows = 'shadow-elevation-1' | 'shadow-elevation-2' | 'shadow-elevation-3' | 'shadow-elevation-4';
|
|
3
|
-
declare type ShadowType = Record<Shadows, ViewStyle>;
|
|
2
|
+
export declare type Shadows = 'none' | 'shadow-elevation-1' | 'shadow-elevation-2' | 'shadow-elevation-3' | 'shadow-elevation-4';
|
|
3
|
+
export declare type ShadowType = Record<Shadows, ViewStyle>;
|
|
4
4
|
export declare const Shadow: ShadowType;
|
|
5
|
-
export {};
|
|
6
5
|
//# sourceMappingURL=shadow.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shadow.d.ts","sourceRoot":"","sources":["../../../src/themes/shadow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,
|
|
1
|
+
{"version":3,"file":"shadow.d.ts","sourceRoot":"","sources":["../../../src/themes/shadow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,oBAAY,OAAO,GACf,MAAM,GACN,oBAAoB,GACpB,oBAAoB,GACpB,oBAAoB,GACpB,oBAAoB,CAAC;AAEzB,oBAAY,UAAU,GAAG,MAAM,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;AAEpD,eAAO,MAAM,MAAM,EAAE,UAsCpB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adiraku/react-native-ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-canary-2",
|
|
4
4
|
"description": "UI library for Adiraku apps",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
@@ -71,6 +71,7 @@
|
|
|
71
71
|
"react-native-svg": "^13.9.0",
|
|
72
72
|
"react-native-svg-web": "^1.0.9",
|
|
73
73
|
"react-native-web": "^0.19.4",
|
|
74
|
+
"react-native-web-linear-gradient": "^1.1.2",
|
|
74
75
|
"release-it": "^15.0.0",
|
|
75
76
|
"typescript": "4.5.2"
|
|
76
77
|
},
|
|
@@ -133,9 +134,12 @@
|
|
|
133
134
|
]
|
|
134
135
|
},
|
|
135
136
|
"dependencies": {
|
|
137
|
+
"deepmerge": "^4.3.1",
|
|
136
138
|
"react-native-calendars": "^1.1306.0",
|
|
139
|
+
"react-native-linear-gradient": "^2.8.3",
|
|
137
140
|
"react-native-mask-input": "^1.2.3",
|
|
138
141
|
"react-native-modal": "^13.0.1",
|
|
142
|
+
"react-native-safe-area-context": "^4.11.0",
|
|
139
143
|
"react-native-toast-message": "^2.1.6"
|
|
140
144
|
}
|
|
141
145
|
}
|
|
@@ -5,9 +5,10 @@ import { Typography } from '../typography/typography.component';
|
|
|
5
5
|
import { getStyle } from './ActionList.styles';
|
|
6
6
|
|
|
7
7
|
import type { ActionListProps } from './ActionList.type';
|
|
8
|
-
import {
|
|
8
|
+
import { useAppTheme } from '../../config';
|
|
9
9
|
|
|
10
10
|
const ActionList: React.FC<ActionListProps> = (props) => {
|
|
11
|
+
const { colors } = useAppTheme();
|
|
11
12
|
const {
|
|
12
13
|
onPress = () => {},
|
|
13
14
|
title,
|
|
@@ -20,34 +21,36 @@ const ActionList: React.FC<ActionListProps> = (props) => {
|
|
|
20
21
|
...rest
|
|
21
22
|
} = props;
|
|
22
23
|
|
|
23
|
-
const computedStyle = getStyle(
|
|
24
|
-
...props,
|
|
25
|
-
});
|
|
24
|
+
const computedStyle = getStyle(props);
|
|
26
25
|
|
|
27
26
|
return (
|
|
28
27
|
<TouchableHighlight
|
|
29
28
|
onPress={onPress}
|
|
30
29
|
disabled={disabled}
|
|
31
30
|
{...rest}
|
|
32
|
-
underlayColor={
|
|
31
|
+
underlayColor={colors['fill-secondary']}
|
|
33
32
|
>
|
|
34
33
|
<View style={[computedStyle.container, containerStyle]}>
|
|
35
34
|
{leadingComponent && (
|
|
36
35
|
<View style={computedStyle.leadingWrapper}>{leadingComponent}</View>
|
|
37
36
|
)}
|
|
38
37
|
<View style={computedStyle.textContainer}>
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
38
|
+
{title && (
|
|
39
|
+
<Typography
|
|
40
|
+
variant={'subtitle2'}
|
|
41
|
+
textStyles={{ ...computedStyle.title, ...textStyles }}
|
|
42
|
+
>
|
|
43
|
+
{title}
|
|
44
|
+
</Typography>
|
|
45
|
+
)}
|
|
46
|
+
{description && (
|
|
47
|
+
<Typography
|
|
48
|
+
variant={'body2'}
|
|
49
|
+
textStyles={{ ...computedStyle.description, ...textStyles }}
|
|
50
|
+
>
|
|
51
|
+
{description}
|
|
52
|
+
</Typography>
|
|
53
|
+
)}
|
|
51
54
|
</View>
|
|
52
55
|
{trailingComponent && (
|
|
53
56
|
<View style={computedStyle.trailingWrapper}>{trailingComponent}</View>
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import type { ActionListProps } from './ActionList.type';
|
|
1
|
+
import { StyleSheet, TextStyle, ViewStyle } from 'react-native';
|
|
2
|
+
|
|
3
|
+
import { ActionListProps } from './ActionList.type';
|
|
4
|
+
import { makeStyles } from '../../config';
|
|
6
5
|
|
|
7
6
|
interface ComputedStyleProps {
|
|
8
7
|
container?: ViewStyle;
|
|
@@ -13,7 +12,8 @@ interface ComputedStyleProps {
|
|
|
13
12
|
trailingWrapper?: ViewStyle;
|
|
14
13
|
}
|
|
15
14
|
|
|
16
|
-
export const getStyle = (props: ActionListProps) => {
|
|
15
|
+
export const getStyle = makeStyles((themes, props: ActionListProps) => {
|
|
16
|
+
const { Spacing, colors } = themes;
|
|
17
17
|
const { disabled, isLast } = props;
|
|
18
18
|
|
|
19
19
|
const computedStyle: ComputedStyleProps = {};
|
|
@@ -21,9 +21,9 @@ export const getStyle = (props: ActionListProps) => {
|
|
|
21
21
|
computedStyle.container = {
|
|
22
22
|
paddingVertical: 16,
|
|
23
23
|
paddingHorizontal: disabled ? 16 : 0,
|
|
24
|
-
borderBottomColor:
|
|
24
|
+
borderBottomColor: colors['border-default'],
|
|
25
25
|
borderBottomWidth: disabled || isLast ? 0 : 0.5,
|
|
26
|
-
backgroundColor: disabled ?
|
|
26
|
+
backgroundColor: disabled ? colors['fill-disable'] : 'transparent',
|
|
27
27
|
flexDirection: 'row',
|
|
28
28
|
justifyContent: 'flex-start',
|
|
29
29
|
alignItems: 'center',
|
|
@@ -34,13 +34,13 @@ export const getStyle = (props: ActionListProps) => {
|
|
|
34
34
|
fontWeight: '600',
|
|
35
35
|
fontSize: 14,
|
|
36
36
|
lineHeight: 21,
|
|
37
|
-
color: disabled ?
|
|
37
|
+
color: disabled ? colors['text-disable'] : colors['text-primary'],
|
|
38
38
|
};
|
|
39
39
|
computedStyle.description = {
|
|
40
40
|
fontWeight: '400',
|
|
41
41
|
fontSize: 14,
|
|
42
42
|
lineHeight: 21,
|
|
43
|
-
color: disabled ?
|
|
43
|
+
color: disabled ? colors['text-disable'] : colors['text-primary'],
|
|
44
44
|
};
|
|
45
45
|
|
|
46
46
|
computedStyle.textContainer = {
|
|
@@ -61,4 +61,4 @@ export const getStyle = (props: ActionListProps) => {
|
|
|
61
61
|
};
|
|
62
62
|
|
|
63
63
|
return StyleSheet.create(computedStyle);
|
|
64
|
-
};
|
|
64
|
+
});
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { TouchableHighlight
|
|
2
|
+
import { TouchableHighlight } from 'react-native';
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import { useStyles } from './Appbar.style';
|
|
5
5
|
import { Palettes, Shadow } from '../../themes';
|
|
6
6
|
import { IconArrowLeft } from '../../icons';
|
|
7
7
|
import { Typography } from '../typography/typography.component';
|
|
8
|
+
import { View } from '../View/View.component';
|
|
8
9
|
|
|
9
10
|
import type { AppbarProps } from './Appbar.type';
|
|
10
11
|
|
|
@@ -23,7 +24,7 @@ const Appbar: React.FunctionComponent<AppbarProps> = (props) => {
|
|
|
23
24
|
titleProps = {},
|
|
24
25
|
} = props;
|
|
25
26
|
|
|
26
|
-
const computedStyle =
|
|
27
|
+
const computedStyle = useStyles(props);
|
|
27
28
|
|
|
28
29
|
return (
|
|
29
30
|
<View
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TextStyle, ViewStyle } from 'react-native';
|
|
2
2
|
|
|
3
|
-
import { Palettes, Radius, Spacing } from '../../themes';
|
|
4
3
|
import { AppbarProps } from './Appbar.type';
|
|
5
|
-
|
|
6
|
-
import type { ViewStyle } from 'react-native';
|
|
7
|
-
import { TextStyle } from 'react-native';
|
|
4
|
+
import { makeStyles } from '../../config';
|
|
8
5
|
|
|
9
6
|
interface ComputedStyleProps {
|
|
10
7
|
container?: ViewStyle;
|
|
@@ -14,8 +11,11 @@ interface ComputedStyleProps {
|
|
|
14
11
|
title?: TextStyle;
|
|
15
12
|
}
|
|
16
13
|
|
|
17
|
-
export const
|
|
18
|
-
const {
|
|
14
|
+
export const useStyles = makeStyles((themes, props: AppbarProps) => {
|
|
15
|
+
const { colors, Spacing, Radius } = themes;
|
|
16
|
+
const { statusBarHeight = 0, backgroundColor = colors['surface-primary'] } =
|
|
17
|
+
props;
|
|
18
|
+
|
|
19
19
|
const computedStyle: ComputedStyleProps = {};
|
|
20
20
|
|
|
21
21
|
computedStyle.container = {
|
|
@@ -50,5 +50,5 @@ export const getStyle = (props: AppbarProps) => {
|
|
|
50
50
|
flex: 1,
|
|
51
51
|
};
|
|
52
52
|
|
|
53
|
-
return
|
|
54
|
-
};
|
|
53
|
+
return computedStyle;
|
|
54
|
+
});
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
} from 'react-native';
|
|
9
9
|
import Modal from 'react-native-modal';
|
|
10
10
|
|
|
11
|
-
import {
|
|
11
|
+
import { useStyles } from './BottomSheet.style';
|
|
12
12
|
import { Typography } from '../typography/typography.component';
|
|
13
13
|
|
|
14
14
|
import type { BottomSheetProps } from './BottomSheet.type';
|
|
@@ -44,7 +44,7 @@ const BottomSheet = React.forwardRef<BottomSheetRefHandle, BottomSheetProps>(
|
|
|
44
44
|
...rest
|
|
45
45
|
} = props;
|
|
46
46
|
|
|
47
|
-
const computedStyle =
|
|
47
|
+
const computedStyle = useStyles();
|
|
48
48
|
|
|
49
49
|
const [visibility, setVisibility] = React.useState(false);
|
|
50
50
|
const panY = React.useRef(new Animated.Value(deviceWindow.height)).current;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ViewStyle, TextStyle } from 'react-native';
|
|
2
|
-
import { StyleSheet } from 'react-native';
|
|
3
2
|
|
|
4
|
-
import {
|
|
3
|
+
import { Radius, Spacing } from '../../themes';
|
|
4
|
+
import { makeStyles } from '../../config';
|
|
5
5
|
|
|
6
6
|
interface ComputedStyleProps {
|
|
7
7
|
overlay?: ViewStyle;
|
|
@@ -21,7 +21,9 @@ interface ComputedStyleProps {
|
|
|
21
21
|
subtitleText?: TextStyle;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
export const
|
|
24
|
+
export const useStyles = makeStyles((themes) => {
|
|
25
|
+
const { colors } = themes;
|
|
26
|
+
|
|
25
27
|
const computedStyle: ComputedStyleProps = {};
|
|
26
28
|
|
|
27
29
|
computedStyle.flex = {
|
|
@@ -34,7 +36,7 @@ export const getStyle = () => {
|
|
|
34
36
|
};
|
|
35
37
|
|
|
36
38
|
computedStyle.container = {
|
|
37
|
-
backgroundColor:
|
|
39
|
+
backgroundColor: colors['surface-primary'],
|
|
38
40
|
position: 'absolute',
|
|
39
41
|
bottom: 0,
|
|
40
42
|
width: '100%',
|
|
@@ -46,7 +48,7 @@ export const getStyle = () => {
|
|
|
46
48
|
height: 5,
|
|
47
49
|
width: 100,
|
|
48
50
|
borderRadius: Radius.full,
|
|
49
|
-
backgroundColor:
|
|
51
|
+
backgroundColor: colors['icon-disable-secondary'],
|
|
50
52
|
};
|
|
51
53
|
|
|
52
54
|
computedStyle.sheetIndicatorWrapper = {
|
|
@@ -94,5 +96,5 @@ export const getStyle = () => {
|
|
|
94
96
|
marginTop: Spacing[8],
|
|
95
97
|
};
|
|
96
98
|
|
|
97
|
-
return
|
|
98
|
-
};
|
|
99
|
+
return computedStyle;
|
|
100
|
+
});
|
|
@@ -2,30 +2,30 @@ import * as React from 'react';
|
|
|
2
2
|
import {
|
|
3
3
|
Animated,
|
|
4
4
|
FlatList,
|
|
5
|
+
LayoutChangeEvent,
|
|
5
6
|
View,
|
|
6
7
|
TouchableHighlight,
|
|
7
8
|
TouchableWithoutFeedback,
|
|
8
9
|
} from 'react-native';
|
|
9
10
|
|
|
10
|
-
import {
|
|
11
|
+
import {
|
|
12
|
+
CheckboxInputProps,
|
|
13
|
+
CheckboxItemProps,
|
|
14
|
+
CheckboxItemPropsComponent,
|
|
15
|
+
} from './CheckBoxInput.type';
|
|
16
|
+
import { useStyles } from './CheckBoxInput.style';
|
|
11
17
|
import { Typography } from '../typography/typography.component';
|
|
12
18
|
import { BottomSheet } from '../BottomSheet/BottomSheet.component';
|
|
13
19
|
import { Button } from '../button/button.component';
|
|
14
|
-
import {
|
|
20
|
+
import { useAppTheme } from '../../config';
|
|
15
21
|
import { IconChevronDown } from '../../icons';
|
|
16
22
|
import { Divider } from '../Divider/Divider.component';
|
|
17
|
-
|
|
18
|
-
import type {
|
|
19
|
-
CheckboxInputProps,
|
|
20
|
-
CheckboxItemProps,
|
|
21
|
-
CheckboxItemPropsComponent,
|
|
22
|
-
} from './CheckBoxInput.type';
|
|
23
23
|
import { Checkbox } from '../Checkbox/Checkbox.component';
|
|
24
|
-
|
|
25
|
-
import type { BottomSheetHandler } from '../BottomSheet/BottomSheet.component';
|
|
26
|
-
import type { LayoutChangeEvent } from 'react-native';
|
|
24
|
+
import { BottomSheetHandler } from '../BottomSheet/BottomSheet.component';
|
|
27
25
|
|
|
28
26
|
const CheckBoxInput: React.FunctionComponent<CheckboxInputProps> = (props) => {
|
|
27
|
+
const { colors } = useAppTheme();
|
|
28
|
+
|
|
29
29
|
const {
|
|
30
30
|
value,
|
|
31
31
|
label,
|
|
@@ -36,7 +36,7 @@ const CheckBoxInput: React.FunctionComponent<CheckboxInputProps> = (props) => {
|
|
|
36
36
|
disabled,
|
|
37
37
|
editable = true,
|
|
38
38
|
inputIcon = (
|
|
39
|
-
<IconChevronDown width={14} height={14} fill={
|
|
39
|
+
<IconChevronDown width={14} height={14} fill={colors['icon-primary']} />
|
|
40
40
|
),
|
|
41
41
|
data,
|
|
42
42
|
onSaveInput = () => {},
|
|
@@ -56,7 +56,7 @@ const CheckBoxInput: React.FunctionComponent<CheckboxInputProps> = (props) => {
|
|
|
56
56
|
CheckboxItemProps[] | undefined
|
|
57
57
|
>(value);
|
|
58
58
|
|
|
59
|
-
const computedStyle =
|
|
59
|
+
const computedStyle = useStyles(props);
|
|
60
60
|
|
|
61
61
|
const bottomSheetref = React.useRef<BottomSheetHandler>(null);
|
|
62
62
|
|
|
@@ -180,7 +180,7 @@ const CheckBoxInput: React.FunctionComponent<CheckboxInputProps> = (props) => {
|
|
|
180
180
|
computedStyle.inputWrapper,
|
|
181
181
|
!!selectedObject() &&
|
|
182
182
|
!isError &&
|
|
183
|
-
!errorMessage && { borderColor:
|
|
183
|
+
!errorMessage && { borderColor: colors['text-primary'] },
|
|
184
184
|
]}
|
|
185
185
|
>
|
|
186
186
|
<Typography
|
|
@@ -232,12 +232,10 @@ const CheckBoxInput: React.FunctionComponent<CheckboxInputProps> = (props) => {
|
|
|
232
232
|
/>
|
|
233
233
|
);
|
|
234
234
|
}}
|
|
235
|
-
|
|
236
|
-
contentContainerStyle={{ padding: 16 }}
|
|
235
|
+
contentContainerStyle={computedStyle.sheetListContentContainer}
|
|
237
236
|
ItemSeparatorComponent={() => customItemSeparator}
|
|
238
237
|
/>
|
|
239
|
-
{
|
|
240
|
-
<View style={{ padding: 16, backgroundColor: 'transparent' }}>
|
|
238
|
+
<View style={[computedStyle.sheetBottomContaienr]}>
|
|
241
239
|
<Button
|
|
242
240
|
variant="primary"
|
|
243
241
|
label={saveInputLabel}
|
|
@@ -257,14 +255,16 @@ function CheckboxItem({
|
|
|
257
255
|
testID,
|
|
258
256
|
...rest
|
|
259
257
|
}: CheckboxItemPropsComponent) {
|
|
258
|
+
const { colors } = useAppTheme();
|
|
259
|
+
|
|
260
260
|
const { item } = data;
|
|
261
261
|
const { label, value, disabled } = item;
|
|
262
|
-
const computedStyle =
|
|
262
|
+
const computedStyle = useStyles({} as CheckboxInputProps);
|
|
263
263
|
|
|
264
264
|
return (
|
|
265
265
|
<TouchableHighlight
|
|
266
266
|
onPress={() => onItemPress(item)}
|
|
267
|
-
underlayColor={
|
|
267
|
+
underlayColor={colors['fill-disable-secondary'] + 66}
|
|
268
268
|
disabled={disabled}
|
|
269
269
|
testID={testID + 'checkbox_item_touchable_' + data.index}
|
|
270
270
|
accessibilityLabel={testID + 'checkbox_item_touchable_' + data.index}
|
|
@@ -277,6 +277,7 @@ function CheckboxItem({
|
|
|
277
277
|
numberOfLines={2}
|
|
278
278
|
testID={testID + 'checkbox_item_label_' + data.index}
|
|
279
279
|
accessibilityLabel={testID + 'checkbox_item_label_' + data.index}
|
|
280
|
+
color={disabled ? 'text-disable' : 'text-primary'}
|
|
280
281
|
>
|
|
281
282
|
{label}
|
|
282
283
|
</Typography>
|