@draftbit/core 46.10.3-93b2ea.2 → 46.10.3-ccc53a.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 (88) hide show
  1. package/lib/commonjs/components/Checkbox/CheckboxRow.js +6 -23
  2. package/lib/commonjs/components/Checkbox/context.js +1 -1
  3. package/lib/commonjs/index.js +0 -47
  4. package/lib/commonjs/mappings/NativeBase/Layout.js +108 -0
  5. package/lib/module/constants.js +1 -0
  6. package/lib/module/index.js +0 -5
  7. package/lib/module/mappings/NativeBase/Layout.js +101 -0
  8. package/lib/typescript/src/index.d.ts +0 -5
  9. package/lib/typescript/src/index.d.ts.map +1 -1
  10. package/lib/typescript/src/mappings/NativeBase/Layout.d.ts +133 -0
  11. package/lib/typescript/src/mappings/NativeBase/Layout.d.ts.map +1 -0
  12. package/package.json +3 -3
  13. package/src/index.js +0 -5
  14. package/src/index.tsx +0 -6
  15. package/src/mappings/NativeBase/Layout.js +124 -0
  16. package/src/mappings/NativeBase/Layout.ts +145 -0
  17. package/lib/commonjs/components/Container.js +0 -93
  18. package/lib/commonjs/components/Row.js +0 -73
  19. package/lib/commonjs/components/RowBodyIcon.js +0 -45
  20. package/lib/commonjs/components/RowHeadlineImageCaption.js +0 -45
  21. package/lib/commonjs/components/RowHeadlineImageIcon.js +0 -51
  22. package/lib/commonjs/components/Table/Table.js +0 -123
  23. package/lib/commonjs/components/Table/TableCell.js +0 -49
  24. package/lib/commonjs/components/Table/TableCommon.js +0 -30
  25. package/lib/commonjs/components/Table/TableRow.js +0 -61
  26. package/lib/commonjs/components/Table/index.js +0 -27
  27. package/lib/commonjs/mappings/Container.js +0 -37
  28. package/lib/commonjs/mappings/Table.js +0 -140
  29. package/lib/module/components/Container.js +0 -83
  30. package/lib/module/components/Row.js +0 -63
  31. package/lib/module/components/RowBodyIcon.js +0 -35
  32. package/lib/module/components/RowHeadlineImageCaption.js +0 -35
  33. package/lib/module/components/RowHeadlineImageIcon.js +0 -41
  34. package/lib/module/components/Table/Table.js +0 -114
  35. package/lib/module/components/Table/TableCell.js +0 -41
  36. package/lib/module/components/Table/TableCommon.js +0 -21
  37. package/lib/module/components/Table/TableRow.js +0 -53
  38. package/lib/module/components/Table/index.js +0 -3
  39. package/lib/module/mappings/Container.js +0 -30
  40. package/lib/module/mappings/Table.js +0 -133
  41. package/lib/typescript/src/components/Container.d.ts +0 -21
  42. package/lib/typescript/src/components/Container.d.ts.map +0 -1
  43. package/lib/typescript/src/components/Row.d.ts +0 -21
  44. package/lib/typescript/src/components/Row.d.ts.map +0 -1
  45. package/lib/typescript/src/components/RowBodyIcon.d.ts +0 -16
  46. package/lib/typescript/src/components/RowBodyIcon.d.ts.map +0 -1
  47. package/lib/typescript/src/components/RowHeadlineImageCaption.d.ts +0 -16
  48. package/lib/typescript/src/components/RowHeadlineImageCaption.d.ts.map +0 -1
  49. package/lib/typescript/src/components/RowHeadlineImageIcon.d.ts +0 -18
  50. package/lib/typescript/src/components/RowHeadlineImageIcon.d.ts.map +0 -1
  51. package/lib/typescript/src/components/Table/Table.d.ts +0 -19
  52. package/lib/typescript/src/components/Table/Table.d.ts.map +0 -1
  53. package/lib/typescript/src/components/Table/TableCell.d.ts +0 -9
  54. package/lib/typescript/src/components/Table/TableCell.d.ts.map +0 -1
  55. package/lib/typescript/src/components/Table/TableCommon.d.ts +0 -20
  56. package/lib/typescript/src/components/Table/TableCommon.d.ts.map +0 -1
  57. package/lib/typescript/src/components/Table/TableRow.d.ts +0 -14
  58. package/lib/typescript/src/components/Table/TableRow.d.ts.map +0 -1
  59. package/lib/typescript/src/components/Table/index.d.ts +0 -4
  60. package/lib/typescript/src/components/Table/index.d.ts.map +0 -1
  61. package/lib/typescript/src/mappings/Container.d.ts +0 -55
  62. package/lib/typescript/src/mappings/Container.d.ts.map +0 -1
  63. package/lib/typescript/src/mappings/Table.d.ts +0 -337
  64. package/lib/typescript/src/mappings/Table.d.ts.map +0 -1
  65. package/src/components/Container.js +0 -43
  66. package/src/components/Container.tsx +0 -116
  67. package/src/components/Row.js +0 -48
  68. package/src/components/Row.tsx +0 -108
  69. package/src/components/RowBodyIcon.js +0 -8
  70. package/src/components/RowBodyIcon.tsx +0 -47
  71. package/src/components/RowHeadlineImageCaption.js +0 -12
  72. package/src/components/RowHeadlineImageCaption.tsx +0 -49
  73. package/src/components/RowHeadlineImageIcon.js +0 -14
  74. package/src/components/RowHeadlineImageIcon.tsx +0 -61
  75. package/src/components/Table/Table.js +0 -93
  76. package/src/components/Table/Table.tsx +0 -176
  77. package/src/components/Table/TableCell.js +0 -31
  78. package/src/components/Table/TableCell.tsx +0 -63
  79. package/src/components/Table/TableCommon.js +0 -12
  80. package/src/components/Table/TableCommon.ts +0 -40
  81. package/src/components/Table/TableRow.js +0 -37
  82. package/src/components/Table/TableRow.tsx +0 -77
  83. package/src/components/Table/index.js +0 -3
  84. package/src/components/Table/index.tsx +0 -3
  85. package/src/mappings/Container.js +0 -30
  86. package/src/mappings/Container.ts +0 -41
  87. package/src/mappings/Table.js +0 -150
  88. package/src/mappings/Table.ts +0 -170
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Table/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC"}
@@ -1,55 +0,0 @@
1
- export declare const SEED_DATA: {
2
- name: string;
3
- tag: string;
4
- description: string;
5
- category: string;
6
- stylesPanelSections: string[];
7
- layout: {
8
- height: number;
9
- };
10
- props: {
11
- useThemeGutterPadding: {
12
- group: string;
13
- label: string;
14
- description: string;
15
- formType: string;
16
- propType: string;
17
- defaultValue: boolean;
18
- editable: boolean;
19
- required: boolean;
20
- };
21
- backgroundImage: {
22
- label: string;
23
- description: string;
24
- group: string;
25
- formType: string;
26
- propType: string;
27
- defaultValue: string;
28
- editable: boolean;
29
- required: boolean;
30
- };
31
- backgroundImageResizeMode: {
32
- group: string;
33
- label: string;
34
- description: string;
35
- editable: boolean;
36
- required: boolean;
37
- defaultValue: string;
38
- formType: string;
39
- propType: string;
40
- options: string[];
41
- };
42
- elevation: {
43
- defaultValue: any;
44
- label: string;
45
- description: string;
46
- formType: string;
47
- propType: string;
48
- options: number[];
49
- editable: boolean;
50
- required: boolean;
51
- group: string;
52
- };
53
- };
54
- };
55
- //# sourceMappingURL=Container.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Container.d.ts","sourceRoot":"","sources":["../../../../src/mappings/Container.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BrB,CAAC"}
@@ -1,337 +0,0 @@
1
- export declare const SEED_DATA: ({
2
- name: string;
3
- tag: string;
4
- description: string;
5
- category: string;
6
- stylesPanelSections: string[];
7
- layout: {
8
- flex: number;
9
- flexDirection?: undefined;
10
- };
11
- props: {
12
- borderWidth: {
13
- defaultValue: number;
14
- label: string;
15
- description: string;
16
- formType: string;
17
- propType: string;
18
- group: string;
19
- editable: boolean;
20
- required: boolean;
21
- step: number;
22
- };
23
- borderColor: {
24
- defaultValue: string;
25
- group: string;
26
- label: string;
27
- description: string;
28
- editable: boolean;
29
- required: boolean;
30
- formType: string;
31
- propType: string;
32
- };
33
- borderStyle: {
34
- defaultValue: string;
35
- group: string;
36
- label: string;
37
- description: string;
38
- editable: boolean;
39
- required: boolean;
40
- formType: string;
41
- propType: string;
42
- options: never[];
43
- };
44
- drawTopBorder: {
45
- defaultValue: boolean;
46
- label: string;
47
- description: string;
48
- formType: string;
49
- propType: string;
50
- editable: boolean;
51
- required: boolean;
52
- group: string;
53
- };
54
- cellVerticalPadding: {
55
- defaultValue: number;
56
- label: string;
57
- description: string;
58
- formType: string;
59
- propType: string;
60
- group: string;
61
- editable: boolean;
62
- required: boolean;
63
- step: number;
64
- };
65
- cellHorizontalPadding: {
66
- defaultValue: number;
67
- label: string;
68
- description: string;
69
- formType: string;
70
- propType: string;
71
- group: string;
72
- editable: boolean;
73
- required: boolean;
74
- step: number;
75
- };
76
- showsVerticalScrollIndicator: {
77
- label: string;
78
- description: string;
79
- formType: string;
80
- propType: string;
81
- defaultValue: boolean;
82
- editable: boolean;
83
- required: boolean;
84
- group: string;
85
- };
86
- drawBottomBorder: {
87
- label: string;
88
- description: string;
89
- formType: string;
90
- propType: string;
91
- defaultValue: boolean;
92
- editable: boolean;
93
- required: boolean;
94
- group: string;
95
- };
96
- drawStartBorder: {
97
- label: string;
98
- description: string;
99
- formType: string;
100
- propType: string;
101
- defaultValue: boolean;
102
- editable: boolean;
103
- required: boolean;
104
- group: string;
105
- };
106
- drawEndBorder: {
107
- label: string;
108
- description: string;
109
- formType: string;
110
- propType: string;
111
- defaultValue: boolean;
112
- editable: boolean;
113
- required: boolean;
114
- group: string;
115
- };
116
- };
117
- } | {
118
- name: string;
119
- tag: string;
120
- description: string;
121
- category: string;
122
- stylesPanelSections: string[];
123
- props: {
124
- drawStartBorder: {
125
- defaultValue: boolean;
126
- label: string;
127
- description: string;
128
- formType: string;
129
- propType: string;
130
- editable: boolean;
131
- required: boolean;
132
- group: string;
133
- };
134
- drawBottomBorder: {
135
- defaultValue: boolean;
136
- label: string;
137
- description: string;
138
- formType: string;
139
- propType: string;
140
- editable: boolean;
141
- required: boolean;
142
- group: string;
143
- };
144
- isTableHeader: {
145
- label: string;
146
- description: string;
147
- formType: string;
148
- propType: string;
149
- defaultValue: boolean;
150
- editable: boolean;
151
- required: boolean;
152
- group: string;
153
- };
154
- borderWidth: {
155
- label: string;
156
- description: string;
157
- formType: string;
158
- propType: string;
159
- group: string;
160
- defaultValue: null;
161
- editable: boolean;
162
- required: boolean;
163
- step: number;
164
- };
165
- borderColor: {
166
- group: string;
167
- label: string;
168
- description: string;
169
- editable: boolean;
170
- required: boolean;
171
- defaultValue: null;
172
- formType: string;
173
- propType: string;
174
- };
175
- borderStyle: {
176
- group: string;
177
- label: string;
178
- description: string;
179
- editable: boolean;
180
- required: boolean;
181
- formType: string;
182
- propType: string;
183
- defaultValue: null;
184
- options: never[];
185
- };
186
- drawTopBorder: {
187
- label: string;
188
- description: string;
189
- formType: string;
190
- propType: string;
191
- defaultValue: boolean;
192
- editable: boolean;
193
- required: boolean;
194
- group: string;
195
- };
196
- drawEndBorder: {
197
- label: string;
198
- description: string;
199
- formType: string;
200
- propType: string;
201
- defaultValue: boolean;
202
- editable: boolean;
203
- required: boolean;
204
- group: string;
205
- };
206
- cellVerticalPadding: {
207
- label: string;
208
- description: string;
209
- formType: string;
210
- propType: string;
211
- group: string;
212
- defaultValue: null;
213
- editable: boolean;
214
- required: boolean;
215
- step: number;
216
- };
217
- cellHorizontalPadding: {
218
- label: string;
219
- description: string;
220
- formType: string;
221
- propType: string;
222
- group: string;
223
- defaultValue: null;
224
- editable: boolean;
225
- required: boolean;
226
- step: number;
227
- };
228
- };
229
- layout?: undefined;
230
- } | {
231
- name: string;
232
- tag: string;
233
- description: string;
234
- category: string;
235
- stylesPanelSections: string[];
236
- layout: {
237
- flex: number;
238
- flexDirection: string;
239
- };
240
- props: {
241
- drawEndBorder: {
242
- defaultValue: boolean;
243
- label: string;
244
- description: string;
245
- formType: string;
246
- propType: string;
247
- editable: boolean;
248
- required: boolean;
249
- group: string;
250
- };
251
- borderWidth: {
252
- label: string;
253
- description: string;
254
- formType: string;
255
- propType: string;
256
- group: string;
257
- defaultValue: null;
258
- editable: boolean;
259
- required: boolean;
260
- step: number;
261
- };
262
- borderColor: {
263
- group: string;
264
- label: string;
265
- description: string;
266
- editable: boolean;
267
- required: boolean;
268
- defaultValue: null;
269
- formType: string;
270
- propType: string;
271
- };
272
- borderStyle: {
273
- group: string;
274
- label: string;
275
- description: string;
276
- editable: boolean;
277
- required: boolean;
278
- formType: string;
279
- propType: string;
280
- defaultValue: null;
281
- options: never[];
282
- };
283
- drawTopBorder: {
284
- label: string;
285
- description: string;
286
- formType: string;
287
- propType: string;
288
- defaultValue: boolean;
289
- editable: boolean;
290
- required: boolean;
291
- group: string;
292
- };
293
- drawBottomBorder: {
294
- label: string;
295
- description: string;
296
- formType: string;
297
- propType: string;
298
- defaultValue: boolean;
299
- editable: boolean;
300
- required: boolean;
301
- group: string;
302
- };
303
- drawStartBorder: {
304
- label: string;
305
- description: string;
306
- formType: string;
307
- propType: string;
308
- defaultValue: boolean;
309
- editable: boolean;
310
- required: boolean;
311
- group: string;
312
- };
313
- cellVerticalPadding: {
314
- label: string;
315
- description: string;
316
- formType: string;
317
- propType: string;
318
- group: string;
319
- defaultValue: null;
320
- editable: boolean;
321
- required: boolean;
322
- step: number;
323
- };
324
- cellHorizontalPadding: {
325
- label: string;
326
- description: string;
327
- formType: string;
328
- propType: string;
329
- group: string;
330
- defaultValue: null;
331
- editable: boolean;
332
- required: boolean;
333
- step: number;
334
- };
335
- };
336
- })[];
337
- //# sourceMappingURL=Table.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../../src/mappings/Table.ts"],"names":[],"mappings":"AAsEA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAmGrB,CAAC"}
@@ -1,43 +0,0 @@
1
- import * as React from "react";
2
- import { View, ImageBackground, StyleSheet, } from "react-native";
3
- import { withTheme } from "../theming";
4
- import Elevation from "./Elevation";
5
- const Container = ({ useThemeGutterPadding, borderColor, borderWidth, backgroundColor, backgroundImage, backgroundImageResizeMode, elevation, style, children, theme, // eslint-disable-line @typescript-eslint/no-unused-vars
6
- ...rest }) => {
7
- const { flex, flexGrow, flexWrap, flexBasis, flexShrink, flexDirection, alignContent, justifyContent, alignItems, padding, paddingTop, paddingBottom, paddingLeft, paddingRight, paddingVertical, paddingHorizontal, ...styleProp } = StyleSheet.flatten(style) || {};
8
- const containerStyle = {
9
- backgroundColor,
10
- borderColor,
11
- borderWidth,
12
- width: "100%",
13
- ...styleProp,
14
- };
15
- const innerStyle = {
16
- flex,
17
- flexGrow,
18
- flexWrap,
19
- flexBasis,
20
- flexShrink,
21
- flexDirection,
22
- alignContent,
23
- justifyContent,
24
- alignItems,
25
- padding,
26
- paddingTop,
27
- paddingBottom,
28
- paddingLeft,
29
- paddingRight,
30
- paddingVertical,
31
- paddingHorizontal: paddingHorizontal || useThemeGutterPadding ? 16 : 0,
32
- };
33
- const Wrap = elevation ? Elevation : View;
34
- if (elevation)
35
- containerStyle.elevation = elevation;
36
- return (React.createElement(Wrap, { style: [containerStyle, style], ...rest }, backgroundImage ? (React.createElement(ImageBackground, { source: typeof backgroundImage === "string"
37
- ? { uri: backgroundImage }
38
- : backgroundImage, resizeMode: backgroundImageResizeMode, style: {
39
- flex: 1,
40
- } },
41
- React.createElement(View, { style: innerStyle }, children))) : (React.createElement(View, { style: innerStyle }, children))));
42
- };
43
- export default withTheme(Container);
@@ -1,116 +0,0 @@
1
- import * as React from "react";
2
- import {
3
- View,
4
- ImageBackground,
5
- ImageSourcePropType,
6
- StyleProp,
7
- StyleSheet,
8
- ViewStyle,
9
- } from "react-native";
10
- import { withTheme } from "../theming";
11
-
12
- import Elevation from "./Elevation";
13
- import type { Theme } from "../styles/DefaultTheme";
14
- import { ResizeModeType } from "./ResizeMode";
15
-
16
- type Props = {
17
- theme: Theme;
18
- useThemeGutterPadding: boolean;
19
- borderColor: string;
20
- borderWidth: number;
21
- backgroundColor: string;
22
- backgroundImage?: string | ImageSourcePropType;
23
- backgroundImageResizeMode?: ResizeModeType;
24
- elevation?: number;
25
- style?: StyleProp<ViewStyle>;
26
- children?: React.ReactNode;
27
- };
28
-
29
- const Container: React.FC<React.PropsWithChildren<Props>> = ({
30
- useThemeGutterPadding,
31
- borderColor,
32
- borderWidth,
33
- backgroundColor,
34
- backgroundImage,
35
- backgroundImageResizeMode,
36
- elevation,
37
- style,
38
- children,
39
- theme, // eslint-disable-line @typescript-eslint/no-unused-vars
40
- ...rest
41
- }) => {
42
- const {
43
- flex,
44
- flexGrow,
45
- flexWrap,
46
- flexBasis,
47
- flexShrink,
48
- flexDirection,
49
- alignContent,
50
- justifyContent,
51
- alignItems,
52
- padding,
53
- paddingTop,
54
- paddingBottom,
55
- paddingLeft,
56
- paddingRight,
57
- paddingVertical,
58
- paddingHorizontal,
59
- ...styleProp
60
- } = StyleSheet.flatten(style) || {};
61
-
62
- const containerStyle: StyleProp<ViewStyle> = {
63
- backgroundColor,
64
- borderColor,
65
- borderWidth,
66
- width: "100%",
67
- ...styleProp,
68
- };
69
-
70
- const innerStyle: StyleProp<ViewStyle> = {
71
- flex,
72
- flexGrow,
73
- flexWrap,
74
- flexBasis,
75
- flexShrink,
76
- flexDirection,
77
- alignContent,
78
- justifyContent,
79
- alignItems,
80
- padding,
81
- paddingTop,
82
- paddingBottom,
83
- paddingLeft,
84
- paddingRight,
85
- paddingVertical,
86
- paddingHorizontal: paddingHorizontal || useThemeGutterPadding ? 16 : 0,
87
- };
88
-
89
- const Wrap = elevation ? Elevation : View;
90
-
91
- if (elevation) containerStyle.elevation = elevation;
92
-
93
- return (
94
- <Wrap style={[containerStyle, style]} {...rest}>
95
- {backgroundImage ? (
96
- <ImageBackground
97
- source={
98
- typeof backgroundImage === "string"
99
- ? { uri: backgroundImage }
100
- : backgroundImage
101
- }
102
- resizeMode={backgroundImageResizeMode}
103
- style={{
104
- flex: 1,
105
- }}
106
- >
107
- <View style={innerStyle}>{children}</View>
108
- </ImageBackground>
109
- ) : (
110
- <View style={innerStyle}>{children}</View>
111
- )}
112
- </Wrap>
113
- );
114
- };
115
-
116
- export default withTheme(Container);
@@ -1,48 +0,0 @@
1
- import * as React from "react";
2
- import { View, Text, Image, StyleSheet, } from "react-native";
3
- import { withTheme } from "../theming";
4
- import Config from "./Config";
5
- const Row = ({ titleTypeStyle, titleColor, subtitleTypeStyle, subtitleColor, title, subtitle, multilineSubtitle, image, right, style, }) => {
6
- return (React.createElement(View, { style: [styles.container, { padding: 16 }, style] },
7
- React.createElement(View, { style: styles.leftContainer },
8
- image && (React.createElement(Image, { source: typeof image === "string" ? { uri: image } : image, style: {
9
- marginRight: 12,
10
- width: subtitle
11
- ? Config.rowMultiLineImageSize
12
- : Config.rowSingleLineImageSize,
13
- height: subtitle
14
- ? Config.rowMultiLineImageSize
15
- : Config.rowSingleLineImageSize,
16
- } })),
17
- React.createElement(View, { style: styles.textContainer },
18
- React.createElement(Text, { style: [
19
- titleTypeStyle,
20
- {
21
- color: titleColor,
22
- },
23
- ], numberOfLines: 1 }, title),
24
- subtitle ? (React.createElement(Text, { style: [
25
- subtitleTypeStyle,
26
- {
27
- color: subtitleColor,
28
- marginTop: 4,
29
- },
30
- ], numberOfLines: multilineSubtitle ? undefined : 1 }, subtitle)) : null)),
31
- right && right()));
32
- };
33
- const styles = StyleSheet.create({
34
- leftContainer: {
35
- flexDirection: "row",
36
- flex: 1,
37
- },
38
- container: {
39
- flexDirection: "row",
40
- justifyContent: "space-between",
41
- alignItems: "center",
42
- },
43
- textContainer: {
44
- flex: 1,
45
- justifyContent: "center",
46
- },
47
- });
48
- export default withTheme(Row);