@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
|
@@ -3,10 +3,15 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.useStyles = void 0;
|
|
7
7
|
var _reactNative = require("react-native");
|
|
8
|
-
var
|
|
9
|
-
const
|
|
8
|
+
var _config = require("../../config");
|
|
9
|
+
const useStyles = exports.useStyles = (0, _config.makeStyles)((themes, props) => {
|
|
10
|
+
const {
|
|
11
|
+
colors,
|
|
12
|
+
Radius,
|
|
13
|
+
Spacing
|
|
14
|
+
} = themes;
|
|
10
15
|
const {
|
|
11
16
|
editable = true,
|
|
12
17
|
disabled = false,
|
|
@@ -14,11 +19,11 @@ const getStyle = props => {
|
|
|
14
19
|
errorMessage
|
|
15
20
|
} = props;
|
|
16
21
|
const stateColor = isError || errorMessage ? {
|
|
17
|
-
text:
|
|
18
|
-
border:
|
|
22
|
+
text: colors['text-danger'],
|
|
23
|
+
border: colors['border-danger']
|
|
19
24
|
} : {
|
|
20
|
-
text:
|
|
21
|
-
border:
|
|
25
|
+
text: colors['text-primary'],
|
|
26
|
+
border: colors['border-disable']
|
|
22
27
|
};
|
|
23
28
|
const computedStyle = {};
|
|
24
29
|
computedStyle.fieldWrapper = {
|
|
@@ -35,26 +40,26 @@ const getStyle = props => {
|
|
|
35
40
|
};
|
|
36
41
|
computedStyle.label = {
|
|
37
42
|
color: stateColor.text,
|
|
38
|
-
backgroundColor: !editable || disabled ?
|
|
39
|
-
paddingHorizontal:
|
|
40
|
-
borderRadius:
|
|
41
|
-
marginLeft:
|
|
43
|
+
backgroundColor: !editable || disabled ? colors['fill-disable-secondary'] : colors['fill-inverse'],
|
|
44
|
+
paddingHorizontal: Spacing[4],
|
|
45
|
+
borderRadius: Radius[4],
|
|
46
|
+
marginLeft: Spacing[8]
|
|
42
47
|
};
|
|
43
48
|
computedStyle.inputWrapper = {
|
|
44
49
|
height: 48,
|
|
45
50
|
flexDirection: 'row',
|
|
46
51
|
justifyContent: 'space-between',
|
|
47
52
|
alignItems: 'center',
|
|
48
|
-
borderWidth:
|
|
53
|
+
borderWidth: Radius.border,
|
|
49
54
|
borderColor: stateColor.border,
|
|
50
|
-
backgroundColor: !editable || disabled ?
|
|
51
|
-
borderRadius:
|
|
52
|
-
padding:
|
|
55
|
+
backgroundColor: !editable || disabled ? colors['fill-disable-secondary'] : colors['fill-inverse'],
|
|
56
|
+
borderRadius: Radius[8],
|
|
57
|
+
padding: Spacing[8],
|
|
53
58
|
width: '100%'
|
|
54
59
|
};
|
|
55
60
|
computedStyle.textField = {
|
|
56
61
|
flex: 1,
|
|
57
|
-
color:
|
|
62
|
+
color: colors['text-primary'],
|
|
58
63
|
padding: 0,
|
|
59
64
|
margin: 0,
|
|
60
65
|
overflow: 'visible',
|
|
@@ -64,24 +69,29 @@ const getStyle = props => {
|
|
|
64
69
|
};
|
|
65
70
|
computedStyle.messageHelper = {
|
|
66
71
|
alignSelf: 'flex-start',
|
|
67
|
-
marginTop:
|
|
72
|
+
marginTop: Spacing[4],
|
|
68
73
|
color: stateColor.text
|
|
69
74
|
};
|
|
70
75
|
computedStyle.counter = {
|
|
71
|
-
marginLeft:
|
|
72
|
-
color:
|
|
76
|
+
marginLeft: Spacing[4],
|
|
77
|
+
color: colors['text-disable']
|
|
73
78
|
};
|
|
74
79
|
computedStyle.inputIconWrapper = {
|
|
75
|
-
marginLeft:
|
|
80
|
+
marginLeft: Spacing[4]
|
|
76
81
|
};
|
|
77
82
|
computedStyle.radioItemWrapper = {
|
|
78
|
-
paddingVertical:
|
|
79
|
-
borderRadius:
|
|
83
|
+
paddingVertical: Spacing[16],
|
|
84
|
+
borderRadius: Radius[8],
|
|
80
85
|
flexDirection: 'row',
|
|
81
86
|
alignItems: 'center',
|
|
82
87
|
justifyContent: 'space-between'
|
|
83
88
|
};
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
89
|
+
computedStyle.sheetListContentContainer = {
|
|
90
|
+
paddingHorizontal: Spacing[16]
|
|
91
|
+
};
|
|
92
|
+
computedStyle.sheetBottomContaienr = {
|
|
93
|
+
padding: Spacing[16]
|
|
94
|
+
};
|
|
95
|
+
return computedStyle;
|
|
96
|
+
});
|
|
87
97
|
//# sourceMappingURL=RadioInput.style.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_config","useStyles","exports","makeStyles","themes","props","colors","Radius","Spacing","editable","disabled","isError","errorMessage","stateColor","text","border","computedStyle","fieldWrapper","width","fieldContainer","alignItems","justifyContent","labelContainer","zIndex","position","label","color","backgroundColor","paddingHorizontal","borderRadius","marginLeft","inputWrapper","height","flexDirection","borderWidth","borderColor","padding","textField","flex","margin","overflow","fontSize","lineHeight","Platform","OS","fontFamily","messageHelper","alignSelf","marginTop","counter","inputIconWrapper","radioItemWrapper","paddingVertical","sheetListContentContainer","sheetBottomContaienr"],"sourceRoot":"../../../../src","sources":["components/RadioInput/RadioInput.style.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAGA,IAAAC,OAAA,GAAAD,OAAA;AAiBO,MAAME,SAAS,GAAAC,OAAA,CAAAD,SAAA,GAAG,IAAAE,kBAAU,EAAC,CAACC,MAAM,EAAEC,KAAsB,KAAK;EACtE,MAAM;IAAEC,MAAM;IAAEC,MAAM;IAAEC;EAAQ,CAAC,GAAGJ,MAAM;EAC1C,MAAM;IAAEK,QAAQ,GAAG,IAAI;IAAEC,QAAQ,GAAG,KAAK;IAAEC,OAAO;IAAEC;EAAa,CAAC,GAAGP,KAAK;EAE1E,MAAMQ,UAAU,GACdF,OAAO,IAAIC,YAAY,GACnB;IAAEE,IAAI,EAAER,MAAM,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|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.StickyBar = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _reactNativeLinearGradient = _interopRequireDefault(require("react-native-linear-gradient"));
|
|
10
|
+
var _typography = require("../typography/typography.component");
|
|
11
|
+
var _themes = require("src/themes");
|
|
12
|
+
var _icons = require("src/icons");
|
|
13
|
+
var _StickyBar = require("./StickyBar.style");
|
|
14
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
|
+
const StickyBar = ({
|
|
16
|
+
show,
|
|
17
|
+
text,
|
|
18
|
+
onClose,
|
|
19
|
+
iconComponent,
|
|
20
|
+
buttonComponent,
|
|
21
|
+
testID
|
|
22
|
+
}) => {
|
|
23
|
+
const computedStyle = (0, _StickyBar.getStyle)({
|
|
24
|
+
show,
|
|
25
|
+
text,
|
|
26
|
+
iconComponent,
|
|
27
|
+
buttonComponent,
|
|
28
|
+
onClose
|
|
29
|
+
});
|
|
30
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
31
|
+
style: [computedStyle.container]
|
|
32
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNativeLinearGradient.default, {
|
|
33
|
+
colors: [_themes.Palettes.yellow[600], '#FFFFFF'],
|
|
34
|
+
start: {
|
|
35
|
+
x: 0.5,
|
|
36
|
+
y: 0
|
|
37
|
+
},
|
|
38
|
+
end: {
|
|
39
|
+
x: 1,
|
|
40
|
+
y: 0.1
|
|
41
|
+
},
|
|
42
|
+
useAngle: true,
|
|
43
|
+
angle: 45,
|
|
44
|
+
style: [computedStyle.linearGradient]
|
|
45
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
46
|
+
style: [computedStyle.rowContainer]
|
|
47
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
48
|
+
style: [computedStyle.contentWrapper, computedStyle.imageWrapper]
|
|
49
|
+
}, iconComponent), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
50
|
+
style: [computedStyle.contentWrapper, computedStyle.textWrapper]
|
|
51
|
+
}, /*#__PURE__*/_react.default.createElement(_typography.Typography, {
|
|
52
|
+
variant: "overline-small",
|
|
53
|
+
testID: testID,
|
|
54
|
+
accessibilityLabel: testID
|
|
55
|
+
}, text)), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
56
|
+
style: [computedStyle.contentWrapper]
|
|
57
|
+
}, buttonComponent), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
58
|
+
style: [computedStyle.closeButtonWrapper]
|
|
59
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
|
|
60
|
+
onPress: onClose
|
|
61
|
+
}, /*#__PURE__*/_react.default.createElement(_icons.IconClose, {
|
|
62
|
+
height: _themes.Spacing[12],
|
|
63
|
+
width: _themes.Spacing[12]
|
|
64
|
+
}))))));
|
|
65
|
+
};
|
|
66
|
+
exports.StickyBar = StickyBar;
|
|
67
|
+
//# sourceMappingURL=StickyBar.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_reactNativeLinearGradient","_typography","_themes","_icons","_StickyBar","e","__esModule","default","StickyBar","show","text","onClose","iconComponent","buttonComponent","testID","computedStyle","getStyle","createElement","View","style","container","colors","Palettes","yellow","start","x","y","end","useAngle","angle","linearGradient","rowContainer","contentWrapper","imageWrapper","textWrapper","Typography","variant","accessibilityLabel","closeButtonWrapper","TouchableOpacity","onPress","IconClose","height","Spacing","width","exports"],"sourceRoot":"../../../../src","sources":["components/StickyBar/StickyBar.component.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,0BAAA,GAAAH,sBAAA,CAAAC,OAAA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B,cAAc,EAAEjB,aAAa,CAACkB,YAAY;EAAE,GAEjErB,aACG,CAAC,eAGPhB,MAAA,CAAAW,OAAA,CAAAU,aAAA,CAAClB,YAAA,CAAAmB,IAAI;IACHC,KAAK,EAAE,CAACJ,aAAa,CAACiB,cAAc,EAAEjB,aAAa,CAACmB,WAAW;EAAE,gBAEjEtC,MAAA,CAAAW,OAAA,CAAAU,aAAA,CAAChB,WAAA,CAAAkC,UAAU;IACTC,OAAO,EAAC,gBAAgB;IACxBtB,MAAM,EAAEA,MAAO;IACfuB,kBAAkB,EAAEvB;EAAO,GAE1BJ,IACS,CACR,CAAC,eAGPd,MAAA,CAAAW,OAAA,CAAAU,aAAA,CAAClB,YAAA,CAAAmB,IAAI;IAACC,KAAK,EAAE,CAACJ,aAAa,CAACiB,cAAc;EAAE,GAAEnB,eAAsB,CAAC,eAGrEjB,MAAA,CAAAW,OAAA,CAAAU,aAAA,CAAClB,YAAA,CAAAmB,IAAI;IAACC,KAAK,EAAE,CAACJ,aAAa,CAACuB,kBAAkB;EAAE,gBAC9C1C,MAAA,CAAAW,OAAA,CAAAU,aAAA,CAAClB,YAAA,CAAAwC,gBAAgB;IAACC,OAAO,EAAE7B;EAAQ,gBACjCf,MAAA,CAAAW,OAAA,CAAAU,aAAA,CAACd,MAAA,CAAAsC,SAAS;IAACC,MAAM,EAAEC,eAAO,CAAC,EAAE,CAAE;IAACC,KAAK,EAAED,eAAO,CAAC,EAAE;EAAE,CAAE,CACrC,CACd,CACF,CACQ,CACZ,CAAC;AAEX,CAAC;AAACE,OAAA,CAAArC,SAAA,GAAAA,SAAA","ignoreList":[]}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getStyle = void 0;
|
|
7
|
+
var _reactNative = require("react-native");
|
|
8
|
+
var _themes = require("src/themes");
|
|
9
|
+
const getStyle = props => {
|
|
10
|
+
const {
|
|
11
|
+
show,
|
|
12
|
+
onClose,
|
|
13
|
+
iconComponent: IconComponent,
|
|
14
|
+
buttonComponent
|
|
15
|
+
} = props;
|
|
16
|
+
const computedStyle = {};
|
|
17
|
+
computedStyle.container = {
|
|
18
|
+
flex: 1,
|
|
19
|
+
minWidth: 400,
|
|
20
|
+
display: show ? 'flex' : 'none'
|
|
21
|
+
};
|
|
22
|
+
computedStyle.rowContainer = {
|
|
23
|
+
flexDirection: 'row',
|
|
24
|
+
justifyContent: 'center',
|
|
25
|
+
alignItems: 'center'
|
|
26
|
+
};
|
|
27
|
+
computedStyle.linearGradient = {
|
|
28
|
+
paddingVertical: _themes.Spacing[8],
|
|
29
|
+
paddingHorizontal: _themes.Spacing[16],
|
|
30
|
+
borderTopRightRadius: _themes.Spacing[16],
|
|
31
|
+
borderTopLeftRadius: _themes.Spacing[16],
|
|
32
|
+
position: 'absolute',
|
|
33
|
+
zIndex: 2
|
|
34
|
+
};
|
|
35
|
+
computedStyle.contentWrapper = {
|
|
36
|
+
marginRight: _themes.Spacing[8]
|
|
37
|
+
};
|
|
38
|
+
computedStyle.imageWrapper = {
|
|
39
|
+
display: IconComponent ? 'flex' : 'none',
|
|
40
|
+
alignSelf: 'center',
|
|
41
|
+
justifyContent: 'center',
|
|
42
|
+
backgroundColor: 'white',
|
|
43
|
+
borderRadius: _themes.Spacing[32],
|
|
44
|
+
padding: 6
|
|
45
|
+
};
|
|
46
|
+
computedStyle.textWrapper = {
|
|
47
|
+
flex: 1,
|
|
48
|
+
flexWrap: 'wrap'
|
|
49
|
+
};
|
|
50
|
+
computedStyle.buttonWrapper = {
|
|
51
|
+
display: buttonComponent ? 'flex' : 'none'
|
|
52
|
+
};
|
|
53
|
+
computedStyle.closeButtonWrapper = {
|
|
54
|
+
display: onClose ? 'flex' : 'none',
|
|
55
|
+
borderWidth: 2,
|
|
56
|
+
borderRadius: 12,
|
|
57
|
+
borderColor: _themes.Palettes.black[900],
|
|
58
|
+
borderStyle: 'solid',
|
|
59
|
+
padding: 2
|
|
60
|
+
};
|
|
61
|
+
return _reactNative.StyleSheet.create(computedStyle);
|
|
62
|
+
};
|
|
63
|
+
exports.getStyle = getStyle;
|
|
64
|
+
//# sourceMappingURL=StickyBar.style.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_themes","getStyle","props","show","onClose","iconComponent","IconComponent","buttonComponent","computedStyle","container","flex","minWidth","display","rowContainer","flexDirection","justifyContent","alignItems","linearGradient","paddingVertical","Spacing","paddingHorizontal","borderTopRightRadius","borderTopLeftRadius","position","zIndex","contentWrapper","marginRight","imageWrapper","alignSelf","backgroundColor","borderRadius","padding","textWrapper","flexWrap","buttonWrapper","closeButtonWrapper","borderWidth","borderColor","Palettes","black","borderStyle","StyleSheet","create","exports"],"sourceRoot":"../../../../src","sources":["components/StickyBar/StickyBar.style.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEA,IAAAC,OAAA,GAAAD,OAAA;AAaO,MAAME,QAAQ,GAAIC,KAAqB,IAAK;EACjD,MAAM;IACJC,IAAI;IACJC,OAAO;IACPC,aAAa,EAAEC,aAAa;IAC5BC;EACF,CAAC,GAAGL,KAAK;EAET,MAAMM,aAAiC,GAAG,CAAC,CAAC;EAE5CA,aAAa,CAACC,SAAS,GAAG;IACxBC,IAAI,EAAE,CAAC;IACPC,QAAQ,EAAE,GAAG;IACbC,OAAO,EAAET,IAAI,GAAG,MAAM,GAAG;EAC3B,CAAC;EAEDK,aAAa,CAACK,YAAY,GAAG;IAC3BC,aAAa,EAAE,KAAK;IACpBC,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE;EACd,CAAC;EAEDR,aAAa,CAACS,cAAc,GAAG;IAC7BC,eAAe,EAAEC,eAAO,CAAC,CAAC,CAAC;IAC3BC,iBAAiB,EAAED,eAAO,CAAC,EAAE,CAAC;IAC9BE,oBAAoB,EAAEF,eAAO,CAAC,EAAE,CAAC;IACjCG,mBAAmB,EAAEH,eAAO,CAAC,EAAE,CAAC;IAChCI,QAAQ,EAAE,UAAU;IACpBC,MAAM,EAAE;EACV,CAAC;EAEDhB,aAAa,CAACiB,cAAc,GAAG;IAC7BC,WAAW,EAAEP,eAAO,CAAC,CAAC;EACxB,CAAC;EAEDX,aAAa,CAACmB,YAAY,GAAG;IAC3Bf,OAAO,EAAEN,aAAa,GAAG,MAAM,GAAG,MAAM;IACxCsB,SAAS,EAAE,QAAQ;IACnBb,cAAc,EAAE,QAAQ;IACxBc,eAAe,EAAE,OAAO;IACxBC,YAAY,EAAEX,eAAO,CAAC,EAAE,CAAC;IACzBY,OAAO,EAAE;EACX,CAAC;EAEDvB,aAAa,CAACwB,WAAW,GAAG;IAC1BtB,IAAI,EAAE,CAAC;IACPuB,QAAQ,EAAE;EACZ,CAAC;EAEDzB,aAAa,CAAC0B,aAAa,GAAG;IAC5BtB,OAAO,EAAEL,eAAe,GAAG,MAAM,GAAG;EACtC,CAAC;EAEDC,aAAa,CAAC2B,kBAAkB,GAAG;IACjCvB,OAAO,EAAER,OAAO,GAAG,MAAM,GAAG,MAAM;IAClCgC,WAAW,EAAE,CAAC;IACdN,YAAY,EAAE,EAAE;IAChBO,WAAW,EAAEC,gBAAQ,CAACC,KAAK,CAAC,GAAG,CAAC;IAChCC,WAAW,EAAE,OAAO;IACpBT,OAAO,EAAE;EACX,CAAC;EAED,OAAOU,uBAAU,CAACC,MAAM,CAAClC,aAAa,CAAC;AACzC,CAAC;AAACmC,OAAA,CAAA1C,QAAA,GAAAA,QAAA","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["components/StickyBar/StickyBar.type.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -8,9 +8,9 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
9
|
var _reactNativeMaskInput = _interopRequireDefault(require("react-native-mask-input"));
|
|
10
10
|
var _TextInput = require("./TextInput.style");
|
|
11
|
+
var _config = require("../../config");
|
|
11
12
|
var _typography = require("../typography/typography.component");
|
|
12
13
|
var _calendars = require("../calendars/calendars.component");
|
|
13
|
-
var _themes = require("../../themes");
|
|
14
14
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
15
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
16
16
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
@@ -35,12 +35,18 @@ const TextInput = props => {
|
|
|
35
35
|
onChangeDate,
|
|
36
36
|
...rest
|
|
37
37
|
} = props;
|
|
38
|
+
const {
|
|
39
|
+
colors
|
|
40
|
+
} = (0, _config.useAppTheme)();
|
|
38
41
|
const [labelWidth, setLabelWidth] = React.useState(0);
|
|
39
42
|
const [focused, setFocused] = React.useState(false);
|
|
40
43
|
|
|
41
44
|
// for date input
|
|
42
45
|
const [isModalDateVisible, setIsModalDateVisible] = React.useState(false);
|
|
43
|
-
const computedStyle = (0, _TextInput.
|
|
46
|
+
const computedStyle = (0, _TextInput.useStyles)({
|
|
47
|
+
...props,
|
|
48
|
+
focused
|
|
49
|
+
});
|
|
44
50
|
const animation = React.useRef(new _reactNative.Animated.Value(0));
|
|
45
51
|
const scale = animation.current.interpolate({
|
|
46
52
|
inputRange: [0, 1],
|
|
@@ -142,7 +148,7 @@ const TextInput = props => {
|
|
|
142
148
|
style: [computedStyle.textField],
|
|
143
149
|
onFocus: handleOnFocus,
|
|
144
150
|
onBlur: handleOnBlur,
|
|
145
|
-
placeholderTextColor: focused ?
|
|
151
|
+
placeholderTextColor: focused || !label ? colors['text-disable'] : 'transparent',
|
|
146
152
|
showSoftInputOnFocus: inputType === 'date' ? false : showSoftInputOnFocus,
|
|
147
153
|
onTouchStart: handleOnTouchStart,
|
|
148
154
|
onChangeText: handleOnchangeText
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","_interopRequireWildcard","require","_reactNative","_reactNativeMaskInput","_interopRequireDefault","_TextInput","
|
|
1
|
+
{"version":3,"names":["React","_interopRequireWildcard","require","_reactNative","_reactNativeMaskInput","_interopRequireDefault","_TextInput","_config","_typography","_calendars","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_extends","assign","bind","arguments","length","apply","TextInput","props","value","label","onBlur","onFocus","errorMessage","helperMessage","helperMessageProps","isError","counter","inputIcon","onTouchStart","showSoftInputOnFocus","inputType","calendarProps","onChangeText","onChangeDate","rest","colors","useAppTheme","labelWidth","setLabelWidth","useState","focused","setFocused","isModalDateVisible","setIsModalDateVisible","computedStyle","useStyles","animation","useRef","Animated","Value","scale","current","interpolate","inputRange","outputRange","translateY","translateX","animate","toValue","spring","useNativeDriver","start","useEffect","handleOnFocus","event","handleOnBlur","getLabelWidth","width","nativeEvent","layout","computedValue","useMemo","options","weekday","day","month","year","formattedDate","Intl","DateTimeFormat","format","replace","letter","toUpperCase","handleOnTouchStart","handleOnchangeText","masked","unmasked","obfuscated","maskedDateObj","Date","isNaN","getTime","undefined","createElement","Fragment","View","style","fieldWrapper","fieldContainer","labelContainer","transform","onLayout","pointerEvents","Typography","variant","inputWrapper","textField","placeholderTextColor","messageHelper","Calendars","isVisible","onDateSave","date","onDismiss","exports"],"sourceR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AACzG,UAAA,CAAAyH,SAAS,EAAApG,QAAA;IACRqG,SAAS,EAAErE,kBAAmB;IAC9BsE,UAAU,EAAGC,IAAI,IAAKhF,YAAY,aAAZA,YAAY,uBAAZA,YAAY,CAAGgF,IAAI,CAAE;IAC3CC,SAAS,EAAEA,CAAA,KAAMvE,qBAAqB,CAAC,KAAK;EAAE,GAC1CZ,aAAa,CAClB,CAEH,CAAC;AAEP,CAAC;AAACoF,OAAA,CAAAnG,SAAA,GAAAA,SAAA","ignoreList":[]}
|
|
@@ -3,21 +3,27 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.useStyles = void 0;
|
|
7
7
|
var _reactNative = require("react-native");
|
|
8
|
-
var
|
|
9
|
-
const
|
|
8
|
+
var _config = require("../../config");
|
|
9
|
+
const useStyles = exports.useStyles = (0, _config.makeStyles)((themes, props) => {
|
|
10
|
+
const {
|
|
11
|
+
colors,
|
|
12
|
+
Spacing,
|
|
13
|
+
Radius
|
|
14
|
+
} = themes;
|
|
10
15
|
const {
|
|
11
16
|
editable = true,
|
|
12
17
|
isError,
|
|
13
|
-
errorMessage
|
|
18
|
+
errorMessage,
|
|
19
|
+
focused: isFocused
|
|
14
20
|
} = props;
|
|
15
21
|
const stateColor = isError || errorMessage ? {
|
|
16
|
-
text:
|
|
17
|
-
border:
|
|
22
|
+
text: colors['text-danger'],
|
|
23
|
+
border: colors['border-danger']
|
|
18
24
|
} : {
|
|
19
|
-
text:
|
|
20
|
-
border: isFocused ?
|
|
25
|
+
text: editable ? colors['text-primary'] : colors['text-disable'],
|
|
26
|
+
border: isFocused ? colors['border-primary'] : colors['border-default']
|
|
21
27
|
};
|
|
22
28
|
const computedStyle = {};
|
|
23
29
|
computedStyle.fieldWrapper = {
|
|
@@ -33,27 +39,27 @@ const getStyle = (props, isFocused) => {
|
|
|
33
39
|
position: 'absolute'
|
|
34
40
|
};
|
|
35
41
|
computedStyle.label = {
|
|
36
|
-
color: editable ?
|
|
37
|
-
backgroundColor:
|
|
38
|
-
paddingHorizontal:
|
|
39
|
-
borderRadius:
|
|
40
|
-
marginLeft:
|
|
42
|
+
color: editable ? colors['text-primary'] : colors['text-disable'],
|
|
43
|
+
backgroundColor: editable ? colors['fill-inverse'] : colors['fill-disable-secondary'],
|
|
44
|
+
paddingHorizontal: Spacing[4],
|
|
45
|
+
borderRadius: Radius[4],
|
|
46
|
+
marginLeft: Spacing[8]
|
|
41
47
|
};
|
|
42
48
|
computedStyle.inputWrapper = {
|
|
43
49
|
height: 48,
|
|
44
50
|
flexDirection: 'row',
|
|
45
51
|
justifyContent: 'space-between',
|
|
46
52
|
alignItems: 'center',
|
|
47
|
-
borderWidth:
|
|
53
|
+
borderWidth: Radius.border,
|
|
48
54
|
borderColor: stateColor.border,
|
|
49
|
-
backgroundColor:
|
|
50
|
-
borderRadius:
|
|
51
|
-
padding:
|
|
55
|
+
backgroundColor: editable ? colors['fill-inverse'] : colors['fill-disable-secondary'],
|
|
56
|
+
borderRadius: Radius[8],
|
|
57
|
+
padding: Spacing[8],
|
|
52
58
|
width: '100%'
|
|
53
59
|
};
|
|
54
60
|
computedStyle.textField = {
|
|
55
61
|
flex: 1,
|
|
56
|
-
color: editable ?
|
|
62
|
+
color: editable ? colors['text-primary'] : colors['text-disable'],
|
|
57
63
|
padding: 0,
|
|
58
64
|
margin: 0,
|
|
59
65
|
overflow: 'visible',
|
|
@@ -63,17 +69,16 @@ const getStyle = (props, isFocused) => {
|
|
|
63
69
|
};
|
|
64
70
|
computedStyle.messageHelper = {
|
|
65
71
|
alignSelf: 'flex-start',
|
|
66
|
-
marginTop:
|
|
72
|
+
marginTop: Spacing[4],
|
|
67
73
|
color: stateColor.text
|
|
68
74
|
};
|
|
69
75
|
computedStyle.counter = {
|
|
70
|
-
marginLeft:
|
|
71
|
-
color: isFocused ?
|
|
76
|
+
marginLeft: Spacing[4],
|
|
77
|
+
color: isFocused ? colors['text-primary'] : colors['text-disable']
|
|
72
78
|
};
|
|
73
79
|
computedStyle.inputIconWrapper = {
|
|
74
|
-
marginLeft:
|
|
80
|
+
marginLeft: Spacing[4]
|
|
75
81
|
};
|
|
76
|
-
return
|
|
77
|
-
};
|
|
78
|
-
exports.getStyle = getStyle;
|
|
82
|
+
return computedStyle;
|
|
83
|
+
});
|
|
79
84
|
//# sourceMappingURL=TextInput.style.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_config","useStyles","exports","makeStyles","themes","props","colors","Spacing","Radius","editable","isError","errorMessage","focused","isFocused","stateColor","text","border","computedStyle","fieldWrapper","width","fieldContainer","alignItems","justifyContent","labelContainer","zIndex","position","label","color","backgroundColor","paddingHorizontal","borderRadius","marginLeft","inputWrapper","height","flexDirection","borderWidth","borderColor","padding","textField","flex","margin","overflow","fontSize","lineHeight","Platform","OS","fontFamily","messageHelper","alignSelf","marginTop","counter","inputIconWrapper"],"sourceRoot":"../../../../src","sources":["components/TextInput/TextInput.style.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAGA,IAAAC,OAAA,GAAAD,OAAA;AAiBO,MAAME,SAAS,GAAAC,OAAA,CAAAD,SAAA,GAAG,IAAAE,kBAAU,EACjC,CAACC,MAAM,EAAEC,KAAgC,KAAK;EAC5C,MAAM;IAAEC,MAAM;IAAEC,OAAO;IAAEC;EAAO,CAAC,GAAGJ,MAAM;EAC1C,MAAM;IACJK,QAAQ,GAAG,IAAI;IACfC,OAAO;IACPC,YAAY;IACZC,OAAO,EAAEC;EACX,CAAC,GAAGR,KAAK;EAET,MAAMS,UAAU,GACdJ,OAAO,IAAIC,YAAY,GACnB;IAAEI,IAAI,EAAET,MAAM,CAAC,aAAa,CAAC;IAAEU,MAAM,EAAEV,MAAM,CAAC,eAAe;EAAE,CAAC,GAChE;IACES,IAAI,EAAEN,QAAQ,GA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,CAAC;IACnBY,KAAK,EAAE;EACT,CAAC;EAEDF,aAAa,CAACqB,SAAS,GAAG;IACxBC,IAAI,EAAE,CAAC;IACPZ,KAAK,EAAElB,QAAQ,GAAGH,MAAM,CAAC,cAAc,CAAC,GAAGA,MAAM,CAAC,cAAc,CAAC;IACjE+B,OAAO,EAAE,CAAC;IACVG,MAAM,EAAE,CAAC;IACTC,QAAQ,EAAE,SAAS;IACnBC,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAEC,qBAAQ,CAACC,EAAE,KAAK,KAAK,GAAG,CAAC,GAAG,EAAE;IAC1CC,UAAU,EAAE;EACd,CAAC;EAED7B,aAAa,CAAC8B,aAAa,GAAG;IAC5BC,SAAS,EAAE,YAAY;IACvBC,SAAS,EAAE1C,OAAO,CAAC,CAAC,CAAC;IACrBoB,KAAK,EAAEb,UAAU,CAACC;EACpB,CAAC;EAEDE,aAAa,CAACiC,OAAO,GAAG;IACtBnB,UAAU,EAAExB,OAAO,CAAC,CAAC,CAAC;IACtBoB,KAAK,EAAEd,SAAS,GAAGP,MAAM,CAAC,cAAc,CAAC,GAAGA,MAAM,CAAC,cAAc;EACnE,CAAC;EAEDW,aAAa,CAACkC,gBAAgB,GAAG;IAC/BpB,UAAU,EAAExB,OAAO,CAAC,CAAC;EACvB,CAAC;EAED,OAAOU,aAAa;AACtB,CACF,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.View = View;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _config = require("../../config");
|
|
10
|
+
var _themes = require("../../themes");
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
13
|
+
function View(props) {
|
|
14
|
+
const {
|
|
15
|
+
style,
|
|
16
|
+
children,
|
|
17
|
+
...rest
|
|
18
|
+
} = props;
|
|
19
|
+
const styles = useStyles(props);
|
|
20
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.View, _extends({
|
|
21
|
+
style: [styles.base, style]
|
|
22
|
+
}, rest), children);
|
|
23
|
+
}
|
|
24
|
+
const useStyles = (0, _config.makeStyles)((theme, props) => {
|
|
25
|
+
let {
|
|
26
|
+
shadow = 'none',
|
|
27
|
+
radius
|
|
28
|
+
} = props;
|
|
29
|
+
if (!_themes.Shadow[shadow]) {
|
|
30
|
+
shadow = 'none';
|
|
31
|
+
}
|
|
32
|
+
return {
|
|
33
|
+
base: {
|
|
34
|
+
backgroundColor: props.backgrounColor && theme.colors[props.backgrounColor] ? theme.colors[props.backgrounColor] : 'transparent',
|
|
35
|
+
borderColor: props.borderColor && theme.colors[props.borderColor] ? theme.colors[props.borderColor] : 'transparent',
|
|
36
|
+
borderWidth: props.borderColor && theme.colors[props.borderColor] ? 1 : 0,
|
|
37
|
+
borderRadius: radius && _themes.Radius[radius] ? _themes.Radius[radius] : 0,
|
|
38
|
+
..._themes.Shadow[shadow]
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
});
|
|
42
|
+
//# sourceMappingURL=View.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_config","_themes","e","__esModule","default","_extends","Object","assign","bind","n","arguments","length","t","r","hasOwnProperty","call","apply","View","props","style","children","rest","styles","useStyles","createElement","base","makeStyles","theme","shadow","radius","Shadow","backgroundColor","backgrounColor","colors","borderColor","borderWidth","borderRadius","Radius"],"sourceRoot":"../../../../src","sources":["components/View/View.component.tsx"],"mappings":";;;;;;AAA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MAAM;EACjB;EAEA,OAAO;IACLH,IAAI,EAAE;MACJM,eAAe,EACbb,KAAK,CAACc,cAAc,IAAIL,KAAK,CAACM,MAAM,CAACf,KAAK,CAACc,cAAc,CAAC,GACtDL,KAAK,CAACM,MAAM,CAACf,KAAK,CAACc,cAAc,CAAC,GAClC,aAAa;MACnBE,WAAW,EACThB,KAAK,CAACgB,WAAW,IAAIP,KAAK,CAACM,MAAM,CAACf,KAAK,CAACgB,WAAW,CAAC,GAChDP,KAAK,CAACM,MAAM,CAACf,KAAK,CAACgB,WAAW,CAAC,GAC/B,aAAa;MACnBC,WAAW,EAAEjB,KAAK,CAACgB,WAAW,IAAIP,KAAK,CAACM,MAAM,CAACf,KAAK,CAACgB,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC;MACzEE,YAAY,EAAEP,MAAM,IAAIQ,cAAM,CAACR,MAAM,CAAC,GAAGQ,cAAM,CAACR,MAAM,CAAC,GAAG,CAAC;MAC3D,GAAGC,cAAM,CAACF,MAAM;IAClB;EACF,CAAC;AACH,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["components/View/View.type.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -6,9 +6,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.Button = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
|
-
var _themes = require("../../themes");
|
|
10
|
-
var _typography = require("../typography/typography.component");
|
|
11
9
|
var _button = require("./button.styles");
|
|
10
|
+
var _config = require("../../config");
|
|
11
|
+
var _typography = require("../typography/typography.component");
|
|
12
12
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
13
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
14
14
|
const Button = props => {
|
|
@@ -23,7 +23,10 @@ const Button = props => {
|
|
|
23
23
|
disabled = false,
|
|
24
24
|
...rest
|
|
25
25
|
} = props;
|
|
26
|
-
const
|
|
26
|
+
const {
|
|
27
|
+
colors
|
|
28
|
+
} = (0, _config.useAppTheme)();
|
|
29
|
+
const computedStyle = (0, _button.useStyles)({
|
|
27
30
|
...props,
|
|
28
31
|
variant,
|
|
29
32
|
label,
|
|
@@ -32,7 +35,7 @@ const Button = props => {
|
|
|
32
35
|
return /*#__PURE__*/_react.default.createElement(_reactNative.TouchableHighlight, _extends({
|
|
33
36
|
onPress: onPress,
|
|
34
37
|
style: [computedStyle.container, containerStyles],
|
|
35
|
-
underlayColor: variant !== 'primary' ?
|
|
38
|
+
underlayColor: variant !== 'primary' ? colors['fill-info-secondary'] : colors['button-primary'],
|
|
36
39
|
disabled: !enablePressWhenDisabled && disabled
|
|
37
40
|
}, rest), /*#__PURE__*/_react.default.createElement(_typography.Typography, {
|
|
38
41
|
variant: size === 'large' ? 'button' : 'button-small',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_button","_config","_typography","e","__esModule","default","_extends","Object","assign","bind","n","arguments","length","t","r","hasOwnProperty","call","apply","Button","props","onPress","variant","label","size","containerStyles","textStyles","enablePressWhenDisabled","disabled","rest","colors","useAppTheme","computedStyle","useStyles","createElement","TouchableHighlight","style","container","underlayColor","Typography","exports"],"sourceRoot":"../../../../src","sources":["components/button/button.component.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,OAAA,GAAAF,OAAA;AAEA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAA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