@draftbit/core 47.0.1-ad0ed2.2 → 47.0.1-b3708e.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.
Files changed (86) hide show
  1. package/lib/commonjs/components/AvatarEdit.js +15 -4
  2. package/lib/commonjs/components/Button.js +3 -3
  3. package/lib/commonjs/components/Checkbox/Checkbox.js +3 -1
  4. package/lib/commonjs/components/Checkbox/CheckboxGroupRow.js +2 -1
  5. package/lib/commonjs/components/Checkbox/CheckboxRow.js +2 -1
  6. package/lib/commonjs/components/DeprecatedButton.js +27 -3
  7. package/lib/commonjs/components/DeprecatedFAB.js +2 -1
  8. package/lib/commonjs/components/Swiper/Swiper.js +2 -0
  9. package/lib/commonjs/components/Touchable.js +3 -8
  10. package/lib/commonjs/mappings/Button.js +9 -27
  11. package/lib/commonjs/mappings/FlashList.js +45 -2
  12. package/lib/commonjs/mappings/FlatList.js +12 -0
  13. package/lib/commonjs/mappings/Swiper.js +2 -0
  14. package/lib/commonjs/mappings/Touchable.js +7 -39
  15. package/lib/module/components/AnimatedCircularProgress.js +13 -1
  16. package/lib/module/components/Button.js +3 -3
  17. package/lib/module/components/Checkbox/Checkbox.js +3 -2
  18. package/lib/module/components/Checkbox/CheckboxGroupRow.js +3 -2
  19. package/lib/module/components/Checkbox/CheckboxRow.js +3 -2
  20. package/lib/module/components/DeprecatedButton.js +28 -4
  21. package/lib/module/components/DeprecatedFAB.js +3 -2
  22. package/lib/module/components/Picker/PickerComponent.web.js +21 -3
  23. package/lib/module/components/Portal/PortalManager.js +33 -7
  24. package/lib/module/components/Swiper/Swiper.js +2 -0
  25. package/lib/module/components/Touchable.js +3 -8
  26. package/lib/module/mappings/Button.js +10 -28
  27. package/lib/module/mappings/FlashList.js +46 -3
  28. package/lib/module/mappings/FlatList.js +13 -1
  29. package/lib/module/mappings/Swiper.js +3 -1
  30. package/lib/module/mappings/Touchable.js +9 -41
  31. package/lib/typescript/src/components/Button.d.ts.map +1 -1
  32. package/lib/typescript/src/components/Checkbox/Checkbox.d.ts +2 -2
  33. package/lib/typescript/src/components/Checkbox/Checkbox.d.ts.map +1 -1
  34. package/lib/typescript/src/components/Checkbox/CheckboxGroupRow.d.ts.map +1 -1
  35. package/lib/typescript/src/components/Checkbox/CheckboxRow.d.ts.map +1 -1
  36. package/lib/typescript/src/components/DeprecatedButton.d.ts +2 -2
  37. package/lib/typescript/src/components/DeprecatedButton.d.ts.map +1 -1
  38. package/lib/typescript/src/components/DeprecatedFAB.d.ts +2 -2
  39. package/lib/typescript/src/components/DeprecatedFAB.d.ts.map +1 -1
  40. package/lib/typescript/src/components/Swiper/Swiper.d.ts +2 -1
  41. package/lib/typescript/src/components/Swiper/Swiper.d.ts.map +1 -1
  42. package/lib/typescript/src/components/Touchable.d.ts +2 -7
  43. package/lib/typescript/src/components/Touchable.d.ts.map +1 -1
  44. package/lib/typescript/src/mappings/Button.d.ts +4 -93
  45. package/lib/typescript/src/mappings/Button.d.ts.map +1 -1
  46. package/lib/typescript/src/mappings/FlashList.d.ts +112 -2
  47. package/lib/typescript/src/mappings/FlashList.d.ts.map +1 -1
  48. package/lib/typescript/src/mappings/FlatList.d.ts +42 -0
  49. package/lib/typescript/src/mappings/FlatList.d.ts.map +1 -1
  50. package/lib/typescript/src/mappings/Swiper.d.ts +11 -0
  51. package/lib/typescript/src/mappings/Swiper.d.ts.map +1 -1
  52. package/lib/typescript/src/mappings/Touchable.d.ts +5 -59
  53. package/lib/typescript/src/mappings/Touchable.d.ts.map +1 -1
  54. package/package.json +3 -3
  55. package/src/components/Button.js +3 -3
  56. package/src/components/Button.tsx +4 -14
  57. package/src/components/Checkbox/Checkbox.js +3 -2
  58. package/src/components/Checkbox/Checkbox.tsx +7 -5
  59. package/src/components/Checkbox/CheckboxGroupRow.js +3 -2
  60. package/src/components/Checkbox/CheckboxGroupRow.tsx +3 -3
  61. package/src/components/Checkbox/CheckboxRow.js +3 -2
  62. package/src/components/Checkbox/CheckboxRow.tsx +3 -3
  63. package/src/components/DeprecatedButton.js +16 -4
  64. package/src/components/DeprecatedButton.tsx +31 -7
  65. package/src/components/DeprecatedFAB.js +3 -2
  66. package/src/components/DeprecatedFAB.tsx +5 -5
  67. package/src/components/Swiper/Swiper.js +2 -2
  68. package/src/components/Swiper/Swiper.tsx +3 -0
  69. package/src/components/Touchable.js +3 -3
  70. package/src/components/Touchable.tsx +4 -14
  71. package/src/mappings/Button.js +9 -27
  72. package/src/mappings/Button.ts +9 -29
  73. package/src/mappings/FlashList.js +77 -31
  74. package/src/mappings/FlashList.ts +82 -30
  75. package/src/mappings/FlatList.js +13 -1
  76. package/src/mappings/FlatList.ts +16 -0
  77. package/src/mappings/Swiper.js +3 -1
  78. package/src/mappings/Swiper.ts +4 -0
  79. package/src/mappings/Touchable.js +7 -42
  80. package/src/mappings/Touchable.ts +6 -46
  81. package/lib/commonjs/components/Pressable.js +0 -37
  82. package/lib/module/components/Pressable.js +0 -30
  83. package/lib/typescript/src/components/Pressable.d.ts +0 -16
  84. package/lib/typescript/src/components/Pressable.d.ts.map +0 -1
  85. package/src/components/Pressable.js +0 -12
  86. package/src/components/Pressable.tsx +0 -50
@@ -4,11 +4,11 @@ export declare const SEED_DATA: ({
4
4
  category: string;
5
5
  stylesPanelSections: string[];
6
6
  layout: {
7
- borderRadius: number;
8
- fontFamily: string;
9
7
  backgroundColor: string;
10
8
  borderWidth: number;
11
9
  textAlign: string;
10
+ borderRadius: number;
11
+ fontFamily: string;
12
12
  };
13
13
  triggers: string[];
14
14
  props: {
@@ -53,50 +53,6 @@ export declare const SEED_DATA: ({
53
53
  propType: string;
54
54
  defaultValue: null;
55
55
  };
56
- activeOpacity: {
57
- label: string;
58
- description: string;
59
- formType: string;
60
- propType: string;
61
- group: string;
62
- defaultValue: null;
63
- editable: boolean;
64
- required: boolean;
65
- step: number;
66
- };
67
- disabledOpacity: {
68
- label: string;
69
- description: string;
70
- formType: string;
71
- propType: string;
72
- group: string;
73
- defaultValue: null;
74
- editable: boolean;
75
- required: boolean;
76
- step: number;
77
- };
78
- delayLongPress: {
79
- label: string;
80
- description: string;
81
- formType: string;
82
- propType: string;
83
- group: string;
84
- defaultValue: null;
85
- editable: boolean;
86
- required: boolean;
87
- step: number;
88
- };
89
- hitSlop: {
90
- label: string;
91
- description: string;
92
- formType: string;
93
- propType: string;
94
- group: string;
95
- defaultValue: null;
96
- editable: boolean;
97
- required: boolean;
98
- step: number;
99
- };
100
56
  };
101
57
  } | {
102
58
  name: string;
@@ -104,11 +60,10 @@ export declare const SEED_DATA: ({
104
60
  category: string;
105
61
  stylesPanelSections: string[];
106
62
  layout: {
107
- borderRadius: number;
108
- fontFamily: string;
109
63
  backgroundColor: string;
110
64
  textAlign: string;
111
- borderWidth?: undefined;
65
+ borderRadius: number;
66
+ fontFamily: string;
112
67
  };
113
68
  triggers: string[];
114
69
  props: {
@@ -153,50 +108,6 @@ export declare const SEED_DATA: ({
153
108
  propType: string;
154
109
  defaultValue: null;
155
110
  };
156
- activeOpacity: {
157
- label: string;
158
- description: string;
159
- formType: string;
160
- propType: string;
161
- group: string;
162
- defaultValue: null;
163
- editable: boolean;
164
- required: boolean;
165
- step: number;
166
- };
167
- disabledOpacity: {
168
- label: string;
169
- description: string;
170
- formType: string;
171
- propType: string;
172
- group: string;
173
- defaultValue: null;
174
- editable: boolean;
175
- required: boolean;
176
- step: number;
177
- };
178
- delayLongPress: {
179
- label: string;
180
- description: string;
181
- formType: string;
182
- propType: string;
183
- group: string;
184
- defaultValue: null;
185
- editable: boolean;
186
- required: boolean;
187
- step: number;
188
- };
189
- hitSlop: {
190
- label: string;
191
- description: string;
192
- formType: string;
193
- propType: string;
194
- group: string;
195
- defaultValue: null;
196
- editable: boolean;
197
- required: boolean;
198
- step: number;
199
- };
200
111
  };
201
112
  })[];
202
113
  //# sourceMappingURL=Button.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/mappings/Button.ts"],"names":[],"mappings":"AAkDA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAoErB,CAAC"}
1
+ {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/mappings/Button.ts"],"names":[],"mappings":"AAiCA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAiErB,CAAC"}
@@ -1,4 +1,4 @@
1
- export declare const SEED_DATA: {
1
+ export declare const SEED_DATA: ({
2
2
  name: string;
3
3
  tag: string;
4
4
  description: string;
@@ -8,7 +8,105 @@ export declare const SEED_DATA: {
8
8
  layout: {
9
9
  flex: number;
10
10
  };
11
+ triggers: string[];
11
12
  props: {
13
+ onRefresh: {
14
+ label: string;
15
+ description: string;
16
+ editable: boolean;
17
+ required: boolean;
18
+ formType: string;
19
+ propType: string;
20
+ defaultValue: null;
21
+ group: string;
22
+ };
23
+ onEndReached: {
24
+ label: string;
25
+ description: string;
26
+ editable: boolean;
27
+ required: boolean;
28
+ formType: string;
29
+ propType: string;
30
+ defaultValue: null;
31
+ group: string;
32
+ };
33
+ numColumns: {
34
+ label: string;
35
+ description: string;
36
+ group: string;
37
+ formType: string;
38
+ propType: string;
39
+ defaultValue: number;
40
+ editable: boolean;
41
+ required: boolean;
42
+ };
43
+ estimatedItemSize: {
44
+ label: string;
45
+ description: string;
46
+ formType: string;
47
+ propType: string;
48
+ group: string;
49
+ defaultValue: null;
50
+ editable: boolean;
51
+ required: boolean;
52
+ step: number;
53
+ };
54
+ optimizeItemArrangement: {
55
+ label: string;
56
+ description: string;
57
+ formType: string;
58
+ propType: string;
59
+ defaultValue: boolean;
60
+ editable: boolean;
61
+ required: boolean;
62
+ group: string;
63
+ };
64
+ onEndReachedThreshold: {
65
+ label: string;
66
+ description: string;
67
+ formType: string;
68
+ propType: string;
69
+ group: string;
70
+ defaultValue: null;
71
+ editable: boolean;
72
+ required: boolean;
73
+ step: number;
74
+ };
75
+ horizontal?: undefined;
76
+ inverted?: undefined;
77
+ };
78
+ } | {
79
+ name: string;
80
+ tag: string;
81
+ description: string;
82
+ packageName: string;
83
+ category: string;
84
+ stylesPanelSections: string[];
85
+ layout: {
86
+ flex: number;
87
+ };
88
+ triggers: string[];
89
+ props: {
90
+ onRefresh: {
91
+ label: string;
92
+ description: string;
93
+ editable: boolean;
94
+ required: boolean;
95
+ formType: string;
96
+ propType: string;
97
+ defaultValue: null;
98
+ group: string;
99
+ };
100
+ onEndReached: {
101
+ label: string;
102
+ description: string;
103
+ editable: boolean;
104
+ required: boolean;
105
+ formType: string;
106
+ propType: string;
107
+ defaultValue: null;
108
+ group: string;
109
+ };
12
110
  estimatedItemSize: {
13
111
  label: string;
14
112
  description: string;
@@ -50,6 +148,18 @@ export declare const SEED_DATA: {
50
148
  editable: boolean;
51
149
  required: boolean;
52
150
  };
151
+ onEndReachedThreshold: {
152
+ label: string;
153
+ description: string;
154
+ formType: string;
155
+ propType: string;
156
+ group: string;
157
+ defaultValue: null;
158
+ editable: boolean;
159
+ required: boolean;
160
+ step: number;
161
+ };
162
+ optimizeItemArrangement?: undefined;
53
163
  };
54
- };
164
+ })[];
55
165
  //# sourceMappingURL=FlashList.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FlashList.d.ts","sourceRoot":"","sources":["../../../../src/mappings/FlashList.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BrB,CAAC"}
1
+ {"version":3,"file":"FlashList.d.ts","sourceRoot":"","sources":["../../../../src/mappings/FlashList.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAgFrB,CAAC"}
@@ -7,7 +7,28 @@ export declare const SEED_DATA: {
7
7
  layout: {
8
8
  flex: number;
9
9
  };
10
+ triggers: string[];
10
11
  props: {
12
+ onRefresh: {
13
+ label: string;
14
+ description: string;
15
+ editable: boolean;
16
+ required: boolean;
17
+ formType: string;
18
+ propType: string;
19
+ defaultValue: null;
20
+ group: string;
21
+ };
22
+ onEndReached: {
23
+ label: string;
24
+ description: string;
25
+ editable: boolean;
26
+ required: boolean;
27
+ formType: string;
28
+ propType: string;
29
+ defaultValue: null;
30
+ group: string;
31
+ };
11
32
  horizontal: {
12
33
  label: string;
13
34
  description: string;
@@ -38,6 +59,27 @@ export declare const SEED_DATA: {
38
59
  editable: boolean;
39
60
  required: boolean;
40
61
  };
62
+ initialNumToRender: {
63
+ label: string;
64
+ description: string;
65
+ formType: string;
66
+ propType: string;
67
+ defaultValue: boolean;
68
+ editable: boolean;
69
+ required: boolean;
70
+ group: string;
71
+ };
72
+ onEndReachedThreshold: {
73
+ label: string;
74
+ description: string;
75
+ formType: string;
76
+ propType: string;
77
+ group: string;
78
+ defaultValue: null;
79
+ editable: boolean;
80
+ required: boolean;
81
+ step: number;
82
+ };
41
83
  };
42
84
  };
43
85
  //# sourceMappingURL=FlatList.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FlatList.d.ts","sourceRoot":"","sources":["../../../../src/mappings/FlatList.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsBrB,CAAC"}
1
+ {"version":3,"file":"FlatList.d.ts","sourceRoot":"","sources":["../../../../src/mappings/FlatList.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmCrB,CAAC"}
@@ -7,7 +7,18 @@ export declare const SEED_DATA: {
7
7
  height: number;
8
8
  width: string;
9
9
  };
10
+ triggers: string[];
10
11
  props: {
12
+ onIndexChanged: {
13
+ label: string;
14
+ description: string;
15
+ editable: boolean;
16
+ required: boolean;
17
+ formType: string;
18
+ propType: string;
19
+ defaultValue: null;
20
+ group: string;
21
+ };
11
22
  from: {
12
23
  label: string;
13
24
  description: string;
@@ -1 +1 @@
1
- {"version":3,"file":"Swiper.d.ts","sourceRoot":"","sources":["../../../../src/mappings/Swiper.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0DrB,CAAC"}
1
+ {"version":3,"file":"Swiper.d.ts","sourceRoot":"","sources":["../../../../src/mappings/Swiper.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4DrB,CAAC"}
@@ -1,4 +1,8 @@
1
1
  export declare const SEED_DATA: {
2
+ name: string;
3
+ tag: string;
4
+ description: string;
5
+ category: string;
2
6
  stylesPanelSections: string[];
3
7
  layout: {};
4
8
  triggers: string[];
@@ -13,64 +17,6 @@ export declare const SEED_DATA: {
13
17
  defaultValue: null;
14
18
  group: string;
15
19
  };
16
- onLongPress: {
17
- label: string;
18
- description: string;
19
- editable: boolean;
20
- required: boolean;
21
- formType: string;
22
- propType: string;
23
- defaultValue: null;
24
- group: string;
25
- };
26
- activeOpacity: {
27
- label: string;
28
- description: string;
29
- formType: string;
30
- propType: string;
31
- group: string;
32
- defaultValue: null;
33
- editable: boolean;
34
- required: boolean;
35
- step: number;
36
- };
37
- disabledOpacity: {
38
- label: string;
39
- description: string;
40
- formType: string;
41
- propType: string;
42
- group: string;
43
- defaultValue: null;
44
- editable: boolean;
45
- required: boolean;
46
- step: number;
47
- };
48
- delayLongPress: {
49
- label: string;
50
- description: string;
51
- formType: string;
52
- propType: string;
53
- group: string;
54
- defaultValue: null;
55
- editable: boolean;
56
- required: boolean;
57
- step: number;
58
- };
59
- hitSlop: {
60
- label: string;
61
- description: string;
62
- formType: string;
63
- propType: string;
64
- group: string;
65
- defaultValue: null;
66
- editable: boolean;
67
- required: boolean;
68
- step: number;
69
- };
70
20
  };
71
- name: string;
72
- tag: string;
73
- description: string;
74
- category: string;
75
- }[];
21
+ };
76
22
  //# sourceMappingURL=Touchable.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Touchable.d.ts","sourceRoot":"","sources":["../../../../src/mappings/Touchable.ts"],"names":[],"mappings":"AA+CA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAerB,CAAC"}
1
+ {"version":3,"file":"Touchable.d.ts","sourceRoot":"","sources":["../../../../src/mappings/Touchable.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;CAerB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@draftbit/core",
3
- "version": "47.0.1-ad0ed2.2+ad0ed2c",
3
+ "version": "47.0.1-b3708e.2+b3708e6",
4
4
  "description": "Core (non-native) Components",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",
@@ -41,7 +41,7 @@
41
41
  "dependencies": {
42
42
  "@date-io/date-fns": "^1.3.13",
43
43
  "@draftbit/react-theme-provider": "^2.1.1",
44
- "@draftbit/types": "^47.0.1-ad0ed2.2+ad0ed2c",
44
+ "@draftbit/types": "^47.0.1-b3708e.2+b3708e6",
45
45
  "@material-ui/core": "^4.11.0",
46
46
  "@material-ui/pickers": "^3.2.10",
47
47
  "@react-native-community/slider": "4.2.4",
@@ -91,5 +91,5 @@
91
91
  ]
92
92
  ]
93
93
  },
94
- "gitHead": "ad0ed2cfe004a524b2c1dba7e6e4a3f66551fcfc"
94
+ "gitHead": "b3708e6d174a2b710a950f327f8703bf485b90c6"
95
95
  }
@@ -7,7 +7,7 @@ const CONSTANTS = {
7
7
  padding: 8,
8
8
  icon: 24,
9
9
  };
10
- function Base({ Icon, icon, title, loading, disabled, style, activeOpacity, disabledOpacity, ...props }) {
10
+ function Base({ Icon, icon, title, onPress, loading, disabled, style, ...props }) {
11
11
  const { color, fontFamily, fontWeight, fontSize, lineHeight, letterSpacing, textTransform, textAlign, textDecorationLine, textDecorationColor, textDecorationStyle, ...buttonStyles } = StyleSheet.flatten(style || {});
12
12
  const titleStyles = {
13
13
  color,
@@ -28,11 +28,11 @@ function Base({ Icon, icon, title, loading, disabled, style, activeOpacity, disa
28
28
  if (textAlign === "right") {
29
29
  buttonStyles.justifyContent = "flex-end";
30
30
  }
31
- return (React.createElement(Pressable, { disabled: disabled || loading, style: ({ pressed }) => {
31
+ return (React.createElement(Pressable, { onPress: onPress, disabled: disabled || loading, style: ({ pressed }) => {
32
32
  return [
33
33
  styles.base,
34
34
  {
35
- opacity: pressed ? activeOpacity : disabled ? disabledOpacity : 1,
35
+ opacity: pressed || disabled ? 0.75 : 1,
36
36
  },
37
37
  buttonStyles,
38
38
  ];
@@ -2,10 +2,10 @@ import * as React from "react";
2
2
  import {
3
3
  Text,
4
4
  Pressable,
5
- PressableProps,
6
5
  Platform,
7
6
  StyleSheet,
8
7
  TextStyle,
8
+ PressableProps,
9
9
  ActivityIndicator,
10
10
  } from "react-native";
11
11
 
@@ -27,11 +27,6 @@ type BaseProps = {
27
27
  loading: boolean;
28
28
  style?: TextStyle;
29
29
  onPress: () => void;
30
- onLongPress?: () => void;
31
- activeOpacity?: number;
32
- disabledOpacity?: number;
33
- delayLongPress?: number;
34
- hitSlop?: number;
35
30
  icon?: string;
36
31
  } & PressableProps &
37
32
  IconSlot;
@@ -42,11 +37,6 @@ type Props = {
42
37
  loading: boolean;
43
38
  style?: TextStyle;
44
39
  onPress: () => void;
45
- onLongPress?: () => void;
46
- activeOpacity?: number;
47
- disabledOpacity?: number;
48
- delayLongPress?: number;
49
- hitSlop?: number;
50
40
  icon?: string;
51
41
  theme: Theme;
52
42
  } & PressableProps &
@@ -56,11 +46,10 @@ function Base({
56
46
  Icon,
57
47
  icon,
58
48
  title,
49
+ onPress,
59
50
  loading,
60
51
  disabled,
61
52
  style,
62
- activeOpacity,
63
- disabledOpacity,
64
53
  ...props
65
54
  }: BaseProps): JSX.Element {
66
55
  const {
@@ -102,12 +91,13 @@ function Base({
102
91
 
103
92
  return (
104
93
  <Pressable
94
+ onPress={onPress}
105
95
  disabled={disabled || loading}
106
96
  style={({ pressed }) => {
107
97
  return [
108
98
  styles.base,
109
99
  {
110
- opacity: pressed ? activeOpacity : disabled ? disabledOpacity : 1,
100
+ opacity: pressed || disabled ? 0.75 : 1,
111
101
  },
112
102
  buttonStyles,
113
103
  ];
@@ -1,6 +1,7 @@
1
1
  import * as React from "react";
2
- import { View, StyleSheet, Pressable, } from "react-native";
2
+ import { View, StyleSheet, } from "react-native";
3
3
  import { useTheme } from "../../theming";
4
+ import Touchable from "../Touchable";
4
5
  import { usePrevious } from "../../hooks";
5
6
  const Checkbox = ({ Icon, status, disabled = false, onPress, onCheck, onUncheck, color, uncheckedColor, defaultValue, checkedIcon = "MaterialCommunityIcons/checkbox-marked", uncheckedIcon = "MaterialCommunityIcons/checkbox-blank-outline", size = 24, style, ...rest }) => {
6
7
  const [internalValue, setInternalValue] = React.useState(status || defaultValue || false);
@@ -32,7 +33,7 @@ const Checkbox = ({ Icon, status, disabled = false, onPress, onCheck, onUncheck,
32
33
  onUncheck === null || onUncheck === void 0 ? void 0 : onUncheck();
33
34
  }
34
35
  };
35
- return (React.createElement(Pressable, { ...rest, onPress: handlePress, disabled: disabled, accessibilityState: { disabled }, accessibilityRole: "button", accessibilityLiveRegion: "polite", style: [styles.container, style, { width: size, height: size }] },
36
+ return (React.createElement(Touchable, { ...rest, onPress: handlePress, disabled: disabled, accessibilityState: { disabled }, accessibilityRole: "button", accessibilityLiveRegion: "polite", style: [styles.container, style, { width: size, height: size }] },
36
37
  React.createElement(Icon, { style: styles.icon, name: internalValue ? checkedIcon : uncheckedIcon, size: size, color: checkboxColor }),
37
38
  React.createElement(View, { style: [StyleSheet.absoluteFill, styles.fillContainer] },
38
39
  React.createElement(View, { style: [
@@ -2,14 +2,14 @@ import * as React from "react";
2
2
  import {
3
3
  View,
4
4
  StyleSheet,
5
- Pressable,
6
- PressableProps,
5
+ TouchableHighlightProps,
7
6
  StyleProp,
8
7
  ViewStyle,
9
8
  } from "react-native";
10
9
  import { useTheme } from "../../theming";
11
10
  import type { IconSlot } from "../../interfaces/Icon";
12
11
 
12
+ import Touchable from "../Touchable";
13
13
  import { usePrevious } from "../../hooks";
14
14
 
15
15
  export interface CheckboxProps {
@@ -27,7 +27,9 @@ export interface CheckboxProps {
27
27
  style?: StyleProp<ViewStyle>;
28
28
  }
29
29
 
30
- const Checkbox: React.FC<CheckboxProps & PressableProps & IconSlot> = ({
30
+ const Checkbox: React.FC<
31
+ CheckboxProps & TouchableHighlightProps & IconSlot
32
+ > = ({
31
33
  Icon,
32
34
  status,
33
35
  disabled = false,
@@ -85,7 +87,7 @@ const Checkbox: React.FC<CheckboxProps & PressableProps & IconSlot> = ({
85
87
  };
86
88
 
87
89
  return (
88
- <Pressable
90
+ <Touchable
89
91
  {...rest}
90
92
  onPress={handlePress}
91
93
  disabled={disabled}
@@ -109,7 +111,7 @@ const Checkbox: React.FC<CheckboxProps & PressableProps & IconSlot> = ({
109
111
  ]}
110
112
  />
111
113
  </View>
112
- </Pressable>
114
+ </Touchable>
113
115
  );
114
116
  };
115
117
 
@@ -1,9 +1,10 @@
1
1
  import * as React from "react";
2
- import { StyleSheet, View, Platform, Pressable, } from "react-native";
2
+ import { StyleSheet, View, Platform, } from "react-native";
3
3
  import Checkbox from "./Checkbox";
4
4
  import Text from "../Text";
5
5
  import { useCheckboxGroupContext } from "./context";
6
6
  import { Direction as GroupDirection } from "./context";
7
+ import Touchable from "../Touchable";
7
8
  import { extractStyles } from "../../utilities";
8
9
  export var Direction;
9
10
  (function (Direction) {
@@ -40,7 +41,7 @@ const CheckboxGroupRow = ({ Icon, label = "Label", status, value, onPress, label
40
41
  }
41
42
  };
42
43
  const { textStyles, viewStyles } = extractStyles(style);
43
- return (React.createElement(Pressable, { onPress: handlePress, style: [styles.mainParent, { flexDirection: direction }, viewStyles], disabled: disabled, ...rest },
44
+ return (React.createElement(Touchable, { onPress: handlePress, style: [styles.mainParent, { flexDirection: direction }, viewStyles], disabled: disabled, ...rest },
44
45
  React.createElement(View, { style: [
45
46
  styles.label,
46
47
  {
@@ -6,13 +6,13 @@ import {
6
6
  TextStyle,
7
7
  View,
8
8
  Platform,
9
- Pressable,
10
9
  } from "react-native";
11
10
  import Checkbox, { CheckboxProps } from "./Checkbox";
12
11
  import Text from "../Text";
13
12
  import { useCheckboxGroupContext } from "./context";
14
13
  import type { IconSlot } from "../../interfaces/Icon";
15
14
  import { Direction as GroupDirection } from "./context";
15
+ import Touchable from "../Touchable";
16
16
  import { extractStyles } from "../../utilities";
17
17
 
18
18
  export enum Direction {
@@ -92,7 +92,7 @@ const CheckboxGroupRow: React.FC<CheckboxGroupRowProps & IconSlot> = ({
92
92
  const { textStyles, viewStyles } = extractStyles(style);
93
93
 
94
94
  return (
95
- <Pressable
95
+ <Touchable
96
96
  onPress={handlePress}
97
97
  style={[styles.mainParent, { flexDirection: direction }, viewStyles]}
98
98
  disabled={disabled}
@@ -125,7 +125,7 @@ const CheckboxGroupRow: React.FC<CheckboxGroupRowProps & IconSlot> = ({
125
125
  uncheckedColor={uncheckedColor}
126
126
  />
127
127
  </View>
128
- </Pressable>
128
+ </Touchable>
129
129
  );
130
130
  };
131
131
 
@@ -1,9 +1,10 @@
1
1
  import * as React from "react";
2
- import { StyleSheet, View, Platform, Pressable, } from "react-native";
2
+ import { StyleSheet, View, Platform, } from "react-native";
3
3
  import { isString } from "lodash";
4
4
  import { extractStyles } from "../../utilities";
5
5
  import { usePrevious } from "../../hooks";
6
6
  import Text from "../Text";
7
+ import Touchable from "../Touchable";
7
8
  import Checkbox from "./Checkbox";
8
9
  export var Direction;
9
10
  (function (Direction) {
@@ -45,7 +46,7 @@ const CheckboxRow = ({ label = "Label", labelStyle, labelContainerStyle, checkbo
45
46
  }
46
47
  };
47
48
  const { textStyles, viewStyles } = extractStyles(style);
48
- return (React.createElement(Pressable, { onPress: handlePress, style: [viewStyles, styles.mainParent, { flexDirection: direction }], disabled: disabled, ...rest },
49
+ return (React.createElement(Touchable, { onPress: handlePress, style: [viewStyles, styles.mainParent, { flexDirection: direction }], disabled: disabled, ...rest },
49
50
  React.createElement(View, { style: [
50
51
  styles.label,
51
52
  {