@draftbit/core 47.0.1-0e56b5.2 → 47.0.1-1d6a5b.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/Button.js +22 -31
- package/lib/commonjs/components/Checkbox/Checkbox.js +3 -1
- package/lib/commonjs/components/DeprecatedButton.js +151 -0
- package/lib/commonjs/components/DeprecatedCardWrapper.js +2 -2
- package/lib/commonjs/components/DeprecatedFAB.js +2 -1
- package/lib/commonjs/components/Picker/Picker.js +4 -3
- package/lib/commonjs/components/Picker/PickerComponent.ios.js +2 -2
- package/lib/commonjs/components/Touchable.js +11 -27
- package/lib/commonjs/components/Touchable.web.js +9 -0
- package/lib/commonjs/mappings/Button.js +10 -29
- package/lib/commonjs/mappings/FlashList.js +45 -2
- package/lib/commonjs/mappings/FlatList.js +12 -0
- package/lib/commonjs/mappings/Touchable.js +20 -0
- package/lib/module/components/Button.js +16 -25
- package/lib/module/components/Checkbox/Checkbox.js +3 -2
- package/lib/module/components/DeprecatedButton.js +141 -0
- package/lib/module/components/DeprecatedCardWrapper.js +2 -2
- package/lib/module/components/DeprecatedFAB.js +3 -2
- package/lib/module/components/Picker/Picker.js +4 -3
- package/lib/module/components/Picker/PickerComponent.ios.js +1 -1
- package/lib/module/components/Touchable.js +10 -25
- package/lib/module/components/Touchable.web.js +2 -0
- package/lib/module/mappings/Button.js +11 -30
- package/lib/module/mappings/FlashList.js +46 -3
- package/lib/module/mappings/FlatList.js +13 -1
- package/lib/module/mappings/Touchable.js +13 -0
- package/lib/typescript/src/components/Button.d.ts +0 -2
- package/lib/typescript/src/components/Button.d.ts.map +1 -1
- package/lib/typescript/src/components/Checkbox/Checkbox.d.ts +2 -2
- package/lib/typescript/src/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/lib/typescript/src/components/DeprecatedButton.d.ts +54 -0
- package/lib/typescript/src/components/DeprecatedButton.d.ts.map +1 -0
- package/lib/typescript/src/components/DeprecatedCardWrapper.d.ts.map +1 -1
- package/lib/typescript/src/components/DeprecatedFAB.d.ts +2 -2
- package/lib/typescript/src/components/DeprecatedFAB.d.ts.map +1 -1
- package/lib/typescript/src/components/Picker/Picker.d.ts.map +1 -1
- package/lib/typescript/src/components/Touchable.d.ts +2 -9
- package/lib/typescript/src/components/Touchable.d.ts.map +1 -1
- package/lib/typescript/src/components/Touchable.web.d.ts +3 -0
- package/lib/typescript/src/components/Touchable.web.d.ts.map +1 -0
- package/lib/typescript/src/mappings/Button.d.ts +4 -113
- package/lib/typescript/src/mappings/Button.d.ts.map +1 -1
- package/lib/typescript/src/mappings/FlashList.d.ts +112 -2
- package/lib/typescript/src/mappings/FlashList.d.ts.map +1 -1
- package/lib/typescript/src/mappings/FlatList.d.ts +42 -0
- package/lib/typescript/src/mappings/FlatList.d.ts.map +1 -1
- package/lib/typescript/src/mappings/Touchable.d.ts +22 -0
- package/lib/typescript/src/mappings/Touchable.d.ts.map +1 -0
- package/package.json +3 -3
- package/src/components/Button.js +18 -22
- package/src/components/Button.tsx +18 -49
- package/src/components/Checkbox/Checkbox.js +3 -2
- package/src/components/Checkbox/Checkbox.tsx +7 -5
- package/src/components/DeprecatedButton.js +95 -0
- package/src/components/DeprecatedButton.tsx +214 -0
- package/src/components/DeprecatedCardWrapper.js +2 -2
- package/src/components/DeprecatedCardWrapper.tsx +4 -3
- package/src/components/DeprecatedFAB.js +3 -2
- package/src/components/DeprecatedFAB.tsx +5 -5
- package/src/components/Picker/Picker.js +4 -3
- package/src/components/Picker/Picker.tsx +4 -4
- package/src/components/Picker/PickerComponent.ios.js +1 -1
- package/src/components/Picker/PickerComponent.ios.tsx +1 -1
- package/src/components/Touchable.js +11 -16
- package/src/components/Touchable.tsx +11 -42
- package/src/components/Touchable.web.js +2 -0
- package/src/components/Touchable.web.tsx +3 -0
- package/src/mappings/Button.js +10 -29
- package/src/mappings/Button.ts +10 -31
- package/src/mappings/FlashList.js +77 -31
- package/src/mappings/FlashList.ts +82 -30
- package/src/mappings/FlatList.js +13 -1
- package/src/mappings/FlatList.ts +16 -0
- package/src/mappings/Touchable.js +17 -0
- package/src/mappings/Touchable.ts +23 -0
- package/lib/commonjs/components/Pressable.js +0 -48
- package/lib/commonjs/mappings/Pressable.js +0 -52
- package/lib/module/components/Pressable.js +0 -40
- package/lib/module/mappings/Pressable.js +0 -45
- package/lib/typescript/src/components/Pressable.d.ts +0 -18
- package/lib/typescript/src/components/Pressable.d.ts.map +0 -1
- package/lib/typescript/src/mappings/Pressable.d.ts +0 -76
- package/lib/typescript/src/mappings/Pressable.d.ts.map +0 -1
- package/src/components/Pressable.js +0 -17
- package/src/components/Pressable.tsx +0 -67
- package/src/mappings/Pressable.js +0 -52
- package/src/mappings/Pressable.ts +0 -63
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { StyleProp, ViewStyle
|
|
2
|
+
import { TouchableHighlightProps, StyleProp, ViewStyle } from "react-native";
|
|
3
3
|
import type { Theme } from "../styles/DefaultTheme";
|
|
4
4
|
import type { IconSlot } from "../interfaces/Icon";
|
|
5
5
|
/**
|
|
@@ -48,7 +48,7 @@ declare type Props = {
|
|
|
48
48
|
elevation?: number;
|
|
49
49
|
theme: Theme;
|
|
50
50
|
style?: StyleProp<ViewStyle>;
|
|
51
|
-
} &
|
|
51
|
+
} & TouchableHighlightProps & IconSlot;
|
|
52
52
|
declare const _default: React.ComponentType<import("@draftbit/react-theme-provider").$Without<React.PropsWithChildren<Props>, "theme"> & {
|
|
53
53
|
theme?: import("@draftbit/react-theme-provider").$DeepPartial<any> | undefined;
|
|
54
54
|
}> & import("@draftbit/react-theme-provider/typings/hoist-non-react-statics").NonReactStatics<React.ComponentType<React.PropsWithChildren<Props>> & React.FC<React.PropsWithChildren<Props>>, {}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeprecatedFAB.d.ts","sourceRoot":"","sources":["../../../../src/components/DeprecatedFAB.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAIL,SAAS,EACT,SAAS,
|
|
1
|
+
{"version":3,"file":"DeprecatedFAB.d.ts","sourceRoot":"","sources":["../../../../src/components/DeprecatedFAB.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAIL,uBAAuB,EACvB,SAAS,EACT,SAAS,EAEV,MAAM,cAAc,CAAC;AAQtB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEnD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,aAAK,KAAK,GAAG;IACX,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,GAAG,UAAU,GAAG,SAAS,GAAG,OAAO,GAAG,UAAU,CAAC;IAC/D,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,KAAK,CAAC;IACb,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B,GAAG,uBAAuB,GACzB,QAAQ,CAAC;;;;AAkKX,wBAA8B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Picker.d.ts","sourceRoot":"","sources":["../../../../../src/components/Picker/Picker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAKL,SAAS,EACT,SAAS,
|
|
1
|
+
{"version":3,"file":"Picker.d.ts","sourceRoot":"","sources":["../../../../../src/components/Picker/Picker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAKL,SAAS,EACT,SAAS,EAEV,MAAM,cAAc,CAAC;AAStB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAQtD,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED,oBAAY,WAAW,GAAG;IACxB,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,GAAG;QAAE,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACnD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,YAAY,EAAE,GAAG,MAAM,EAAE,CAAC;IACnC,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACtD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAClC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,IAAI,CAAC,EAAE,OAAO,GAAG,WAAW,CAAC;IAC7B,KAAK,EAAE,KAAK,CAAC;IACb,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;CACxB,CAAC;;;;AA2aF,wBAAiC"}
|
|
@@ -1,18 +1,11 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { ViewStyle, PressableProps } from "react-native";
|
|
3
3
|
declare type Props = {
|
|
4
4
|
disabled?: boolean;
|
|
5
5
|
children: React.ReactNode;
|
|
6
6
|
style?: ViewStyle;
|
|
7
7
|
onPress?: () => void;
|
|
8
|
-
onLongPress?: () => void;
|
|
9
|
-
delayLongPress?: number;
|
|
10
|
-
hitSlop?: number;
|
|
11
|
-
pressRetentionOffset?: number;
|
|
12
|
-
activeOpacity?: number;
|
|
13
|
-
disabledOpacity?: number;
|
|
14
8
|
} & PressableProps;
|
|
15
|
-
export
|
|
16
|
-
export default function Touchable({ children, disabled, onPress, onLongPress, hitSlop, delayLongPress, activeOpacity, disabledOpacity, style, ...props }: Props): JSX.Element;
|
|
9
|
+
export default function Touchable({ children, disabled, onPress, style, ...props }: Props): JSX.Element;
|
|
17
10
|
export {};
|
|
18
11
|
//# sourceMappingURL=Touchable.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Touchable.d.ts","sourceRoot":"","sources":["../../../../src/components/Touchable.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Touchable.d.ts","sourceRoot":"","sources":["../../../../src/components/Touchable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAa,SAAS,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEpE,aAAK,KAAK,GAAG;IACX,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB,GAAG,cAAc,CAAC;AAEnB,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAChC,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,KAAK,EACL,GAAG,KAAK,EACT,EAAE,KAAK,eAmBP"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Touchable.web.d.ts","sourceRoot":"","sources":["../../../../src/components/Touchable.web.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEhD,eAAe,gBAAgB,CAAC"}
|
|
@@ -5,10 +5,10 @@ export declare const SEED_DATA: ({
|
|
|
5
5
|
stylesPanelSections: string[];
|
|
6
6
|
layout: {
|
|
7
7
|
backgroundColor: string;
|
|
8
|
-
borderRadius: number;
|
|
9
|
-
fontFamily: string;
|
|
10
8
|
borderWidth: number;
|
|
11
9
|
textAlign: string;
|
|
10
|
+
borderRadius: number;
|
|
11
|
+
fontFamily: string;
|
|
12
12
|
};
|
|
13
13
|
triggers: string[];
|
|
14
14
|
props: {
|
|
@@ -22,16 +22,6 @@ export declare const SEED_DATA: ({
|
|
|
22
22
|
defaultValue: null;
|
|
23
23
|
group: string;
|
|
24
24
|
};
|
|
25
|
-
onLongPress: {
|
|
26
|
-
label: string;
|
|
27
|
-
description: string;
|
|
28
|
-
editable: boolean;
|
|
29
|
-
required: boolean;
|
|
30
|
-
formType: string;
|
|
31
|
-
propType: string;
|
|
32
|
-
defaultValue: null;
|
|
33
|
-
group: string;
|
|
34
|
-
};
|
|
35
25
|
icon: {
|
|
36
26
|
label: string;
|
|
37
27
|
description: string;
|
|
@@ -63,50 +53,6 @@ export declare const SEED_DATA: ({
|
|
|
63
53
|
propType: string;
|
|
64
54
|
defaultValue: null;
|
|
65
55
|
};
|
|
66
|
-
activeOpacity: {
|
|
67
|
-
label: string;
|
|
68
|
-
description: string;
|
|
69
|
-
formType: string;
|
|
70
|
-
propType: string;
|
|
71
|
-
group: string;
|
|
72
|
-
defaultValue: null;
|
|
73
|
-
editable: boolean;
|
|
74
|
-
required: boolean;
|
|
75
|
-
step: number;
|
|
76
|
-
};
|
|
77
|
-
disabledOpacity: {
|
|
78
|
-
label: string;
|
|
79
|
-
description: string;
|
|
80
|
-
formType: string;
|
|
81
|
-
propType: string;
|
|
82
|
-
group: string;
|
|
83
|
-
defaultValue: null;
|
|
84
|
-
editable: boolean;
|
|
85
|
-
required: boolean;
|
|
86
|
-
step: number;
|
|
87
|
-
};
|
|
88
|
-
delayLongPress: {
|
|
89
|
-
label: string;
|
|
90
|
-
description: string;
|
|
91
|
-
formType: string;
|
|
92
|
-
propType: string;
|
|
93
|
-
group: string;
|
|
94
|
-
defaultValue: null;
|
|
95
|
-
editable: boolean;
|
|
96
|
-
required: boolean;
|
|
97
|
-
step: number;
|
|
98
|
-
};
|
|
99
|
-
hitSlop: {
|
|
100
|
-
label: string;
|
|
101
|
-
description: string;
|
|
102
|
-
formType: string;
|
|
103
|
-
propType: string;
|
|
104
|
-
group: string;
|
|
105
|
-
defaultValue: null;
|
|
106
|
-
editable: boolean;
|
|
107
|
-
required: boolean;
|
|
108
|
-
step: number;
|
|
109
|
-
};
|
|
110
56
|
};
|
|
111
57
|
} | {
|
|
112
58
|
name: string;
|
|
@@ -114,11 +60,10 @@ export declare const SEED_DATA: ({
|
|
|
114
60
|
category: string;
|
|
115
61
|
stylesPanelSections: string[];
|
|
116
62
|
layout: {
|
|
117
|
-
borderRadius: number;
|
|
118
|
-
fontFamily: string;
|
|
119
63
|
backgroundColor: string;
|
|
120
64
|
textAlign: string;
|
|
121
|
-
|
|
65
|
+
borderRadius: number;
|
|
66
|
+
fontFamily: string;
|
|
122
67
|
};
|
|
123
68
|
triggers: string[];
|
|
124
69
|
props: {
|
|
@@ -132,16 +77,6 @@ export declare const SEED_DATA: ({
|
|
|
132
77
|
defaultValue: null;
|
|
133
78
|
group: string;
|
|
134
79
|
};
|
|
135
|
-
onLongPress: {
|
|
136
|
-
label: string;
|
|
137
|
-
description: string;
|
|
138
|
-
editable: boolean;
|
|
139
|
-
required: boolean;
|
|
140
|
-
formType: string;
|
|
141
|
-
propType: string;
|
|
142
|
-
defaultValue: null;
|
|
143
|
-
group: string;
|
|
144
|
-
};
|
|
145
80
|
icon: {
|
|
146
81
|
label: string;
|
|
147
82
|
description: string;
|
|
@@ -173,50 +108,6 @@ export declare const SEED_DATA: ({
|
|
|
173
108
|
propType: string;
|
|
174
109
|
defaultValue: null;
|
|
175
110
|
};
|
|
176
|
-
activeOpacity: {
|
|
177
|
-
label: string;
|
|
178
|
-
description: string;
|
|
179
|
-
formType: string;
|
|
180
|
-
propType: string;
|
|
181
|
-
group: string;
|
|
182
|
-
defaultValue: null;
|
|
183
|
-
editable: boolean;
|
|
184
|
-
required: boolean;
|
|
185
|
-
step: number;
|
|
186
|
-
};
|
|
187
|
-
disabledOpacity: {
|
|
188
|
-
label: string;
|
|
189
|
-
description: string;
|
|
190
|
-
formType: string;
|
|
191
|
-
propType: string;
|
|
192
|
-
group: string;
|
|
193
|
-
defaultValue: null;
|
|
194
|
-
editable: boolean;
|
|
195
|
-
required: boolean;
|
|
196
|
-
step: number;
|
|
197
|
-
};
|
|
198
|
-
delayLongPress: {
|
|
199
|
-
label: string;
|
|
200
|
-
description: string;
|
|
201
|
-
formType: string;
|
|
202
|
-
propType: string;
|
|
203
|
-
group: string;
|
|
204
|
-
defaultValue: null;
|
|
205
|
-
editable: boolean;
|
|
206
|
-
required: boolean;
|
|
207
|
-
step: number;
|
|
208
|
-
};
|
|
209
|
-
hitSlop: {
|
|
210
|
-
label: string;
|
|
211
|
-
description: string;
|
|
212
|
-
formType: string;
|
|
213
|
-
propType: string;
|
|
214
|
-
group: string;
|
|
215
|
-
defaultValue: null;
|
|
216
|
-
editable: boolean;
|
|
217
|
-
required: boolean;
|
|
218
|
-
step: number;
|
|
219
|
-
};
|
|
220
111
|
};
|
|
221
112
|
})[];
|
|
222
113
|
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/mappings/Button.ts"],"names":[],"mappings":"
|
|
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":"
|
|
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":"
|
|
1
|
+
{"version":3,"file":"FlatList.d.ts","sourceRoot":"","sources":["../../../../src/mappings/FlatList.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmCrB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare const SEED_DATA: {
|
|
2
|
+
name: string;
|
|
3
|
+
tag: string;
|
|
4
|
+
description: string;
|
|
5
|
+
category: string;
|
|
6
|
+
stylesPanelSections: string[];
|
|
7
|
+
layout: {};
|
|
8
|
+
triggers: string[];
|
|
9
|
+
props: {
|
|
10
|
+
onPress: {
|
|
11
|
+
label: string;
|
|
12
|
+
description: string;
|
|
13
|
+
editable: boolean;
|
|
14
|
+
required: boolean;
|
|
15
|
+
formType: string;
|
|
16
|
+
propType: string;
|
|
17
|
+
defaultValue: null;
|
|
18
|
+
group: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=Touchable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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-
|
|
3
|
+
"version": "47.0.1-1d6a5b.2+1d6a5b5",
|
|
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-
|
|
44
|
+
"@draftbit/types": "^47.0.1-1d6a5b.2+1d6a5b5",
|
|
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": "
|
|
94
|
+
"gitHead": "1d6a5b5d19ce3dfcb00265650efd216928efb0b3"
|
|
95
95
|
}
|
package/src/components/Button.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
import { Text, Pressable, Platform, StyleSheet, ActivityIndicator, } from "react-native";
|
|
3
3
|
import { withTheme } from "../theming";
|
|
4
4
|
const CONSTANTS = {
|
|
@@ -7,7 +7,7 @@ const CONSTANTS = {
|
|
|
7
7
|
padding: 8,
|
|
8
8
|
icon: 24,
|
|
9
9
|
};
|
|
10
|
-
function Base({ Icon, icon, title, onPress,
|
|
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,22 +28,15 @@ function Base({ Icon, icon, title, onPress, onLongPress, activeOpacity, disabled
|
|
|
28
28
|
if (textAlign === "right") {
|
|
29
29
|
buttonStyles.justifyContent = "flex-end";
|
|
30
30
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
}, [activeOpacity, disabled, disabledOpacity]);
|
|
42
|
-
const _style = useCallback(({ pressed }) => [
|
|
43
|
-
buttonStyles,
|
|
44
|
-
{ opacity: getOpacity(pressed) },
|
|
45
|
-
], [getOpacity, buttonStyles]);
|
|
46
|
-
return (React.createElement(Pressable, { onPress: onPress, onLongPress: onLongPress, disabled: disabled || loading, style: (styles.base, _style), ...props },
|
|
31
|
+
return (React.createElement(Pressable, { onPress: onPress, disabled: disabled || loading, style: ({ pressed }) => {
|
|
32
|
+
return [
|
|
33
|
+
styles.base,
|
|
34
|
+
{
|
|
35
|
+
opacity: pressed || disabled ? 0.75 : 1,
|
|
36
|
+
},
|
|
37
|
+
buttonStyles,
|
|
38
|
+
];
|
|
39
|
+
}, ...props },
|
|
47
40
|
loading ? (React.createElement(ActivityIndicator, { size: "small", color: color, style: styles.loading })) : null,
|
|
48
41
|
icon && !loading ? (React.createElement(Icon, { name: icon, color: color, style: styles.icon, size: CONSTANTS.icon })) : null,
|
|
49
42
|
React.createElement(Text, { style: titleStyles }, title)));
|
|
@@ -81,10 +74,8 @@ const styles = StyleSheet.create({
|
|
|
81
74
|
flexDirection: "row",
|
|
82
75
|
alignItems: "center",
|
|
83
76
|
justifyContent: "center",
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
paddingRight: CONSTANTS.padding,
|
|
87
|
-
paddingBottom: CONSTANTS.padding,
|
|
77
|
+
minHeight: CONSTANTS.baseHeight,
|
|
78
|
+
paddingHorizontal: 12,
|
|
88
79
|
fontFamily: "System",
|
|
89
80
|
fontWeight: "700",
|
|
90
81
|
...Platform.select({
|
|
@@ -98,6 +89,11 @@ const styles = StyleSheet.create({
|
|
|
98
89
|
backgroundColor: "transparent",
|
|
99
90
|
borderWidth: 1,
|
|
100
91
|
},
|
|
92
|
+
bare: {
|
|
93
|
+
backgroundColor: "transparent",
|
|
94
|
+
padding: 0,
|
|
95
|
+
minHeight: undefined,
|
|
96
|
+
},
|
|
101
97
|
loading: {
|
|
102
98
|
marginRight: 6,
|
|
103
99
|
},
|
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
import {
|
|
3
3
|
Text,
|
|
4
4
|
Pressable,
|
|
5
|
-
PressableProps,
|
|
6
|
-
PressableStateCallbackType,
|
|
7
5
|
Platform,
|
|
8
6
|
StyleSheet,
|
|
9
|
-
StyleProp,
|
|
10
7
|
TextStyle,
|
|
11
|
-
|
|
8
|
+
PressableProps,
|
|
12
9
|
ActivityIndicator,
|
|
13
10
|
} from "react-native";
|
|
14
11
|
|
|
@@ -30,12 +27,6 @@ type BaseProps = {
|
|
|
30
27
|
loading: boolean;
|
|
31
28
|
style?: TextStyle;
|
|
32
29
|
onPress: () => void;
|
|
33
|
-
onLongPress?: () => void;
|
|
34
|
-
activeOpacity?: number;
|
|
35
|
-
disabledOpacity?: number;
|
|
36
|
-
delayLongPress?: number;
|
|
37
|
-
hitSlop?: number;
|
|
38
|
-
pressRetentionOffset?: number;
|
|
39
30
|
icon?: string;
|
|
40
31
|
} & PressableProps &
|
|
41
32
|
IconSlot;
|
|
@@ -46,29 +37,16 @@ type Props = {
|
|
|
46
37
|
loading: boolean;
|
|
47
38
|
style?: TextStyle;
|
|
48
39
|
onPress: () => void;
|
|
49
|
-
onLongPress?: () => void;
|
|
50
|
-
activeOpacity?: number;
|
|
51
|
-
disabledOpacity?: number;
|
|
52
|
-
delayLongPress?: number;
|
|
53
|
-
hitSlop?: number;
|
|
54
|
-
pressRetentionOffset?: number;
|
|
55
40
|
icon?: string;
|
|
56
41
|
theme: Theme;
|
|
57
42
|
} & PressableProps &
|
|
58
43
|
IconSlot;
|
|
59
44
|
|
|
60
|
-
export type StyleType = (
|
|
61
|
-
state: PressableStateCallbackType
|
|
62
|
-
) => StyleProp<ViewStyle>;
|
|
63
|
-
|
|
64
45
|
function Base({
|
|
65
46
|
Icon,
|
|
66
47
|
icon,
|
|
67
48
|
title,
|
|
68
49
|
onPress,
|
|
69
|
-
onLongPress,
|
|
70
|
-
activeOpacity,
|
|
71
|
-
disabledOpacity,
|
|
72
50
|
loading,
|
|
73
51
|
disabled,
|
|
74
52
|
style,
|
|
@@ -111,31 +89,19 @@ function Base({
|
|
|
111
89
|
buttonStyles.justifyContent = "flex-end";
|
|
112
90
|
}
|
|
113
91
|
|
|
114
|
-
const getOpacity = useCallback(
|
|
115
|
-
(pressed: boolean) => {
|
|
116
|
-
if (disabled) {
|
|
117
|
-
return disabledOpacity;
|
|
118
|
-
} else {
|
|
119
|
-
if (pressed) return activeOpacity;
|
|
120
|
-
else return 1;
|
|
121
|
-
}
|
|
122
|
-
},
|
|
123
|
-
[activeOpacity, disabled, disabledOpacity]
|
|
124
|
-
);
|
|
125
|
-
const _style = useCallback<StyleType>(
|
|
126
|
-
({ pressed }) => [
|
|
127
|
-
buttonStyles as ViewStyle,
|
|
128
|
-
{ opacity: getOpacity(pressed) },
|
|
129
|
-
],
|
|
130
|
-
[getOpacity, buttonStyles]
|
|
131
|
-
);
|
|
132
|
-
|
|
133
92
|
return (
|
|
134
93
|
<Pressable
|
|
135
94
|
onPress={onPress}
|
|
136
|
-
onLongPress={onLongPress}
|
|
137
95
|
disabled={disabled || loading}
|
|
138
|
-
style={(
|
|
96
|
+
style={({ pressed }) => {
|
|
97
|
+
return [
|
|
98
|
+
styles.base,
|
|
99
|
+
{
|
|
100
|
+
opacity: pressed || disabled ? 0.75 : 1,
|
|
101
|
+
},
|
|
102
|
+
buttonStyles,
|
|
103
|
+
];
|
|
104
|
+
}}
|
|
139
105
|
{...props}
|
|
140
106
|
>
|
|
141
107
|
{loading ? (
|
|
@@ -202,10 +168,8 @@ const styles = StyleSheet.create({
|
|
|
202
168
|
flexDirection: "row",
|
|
203
169
|
alignItems: "center",
|
|
204
170
|
justifyContent: "center",
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
paddingRight: CONSTANTS.padding,
|
|
208
|
-
paddingBottom: CONSTANTS.padding,
|
|
171
|
+
minHeight: CONSTANTS.baseHeight,
|
|
172
|
+
paddingHorizontal: 12,
|
|
209
173
|
fontFamily: "System",
|
|
210
174
|
fontWeight: "700",
|
|
211
175
|
...Platform.select({
|
|
@@ -219,6 +183,11 @@ const styles = StyleSheet.create({
|
|
|
219
183
|
backgroundColor: "transparent",
|
|
220
184
|
borderWidth: 1,
|
|
221
185
|
},
|
|
186
|
+
bare: {
|
|
187
|
+
backgroundColor: "transparent",
|
|
188
|
+
padding: 0,
|
|
189
|
+
minHeight: undefined,
|
|
190
|
+
},
|
|
222
191
|
loading: {
|
|
223
192
|
marginRight: 6,
|
|
224
193
|
},
|