@draftbit/core 46.11.3-32e91b.2 → 46.11.3-5be21a.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/Checkbox/CheckboxGroup.js +3 -16
- package/lib/commonjs/components/Checkbox/CheckboxGroup.js.map +1 -1
- package/lib/commonjs/components/Checkbox/CheckboxGroupRow.js +5 -22
- package/lib/commonjs/components/Checkbox/CheckboxGroupRow.js.map +1 -1
- package/lib/commonjs/components/Checkbox/CheckboxRow.js +23 -6
- package/lib/commonjs/components/Checkbox/CheckboxRow.js.map +1 -1
- package/lib/commonjs/mappings/Layout.js +4 -4
- package/lib/commonjs/mappings/Layout.js.map +1 -1
- package/lib/commonjs/mappings/MapMarker.js +10 -1
- package/lib/commonjs/mappings/MapMarker.js.map +1 -1
- package/lib/commonjs/mappings/MapView.js +5 -0
- package/lib/commonjs/mappings/MapView.js.map +1 -1
- package/lib/commonjs/mappings/Picker.js.map +1 -1
- package/lib/module/components/Accordion/index.js.map +1 -1
- package/lib/module/mappings/Layout.js +4 -4
- package/lib/module/mappings/Layout.js.map +1 -1
- package/lib/module/mappings/MapMarker.js +11 -2
- package/lib/module/mappings/MapMarker.js.map +1 -1
- package/lib/module/mappings/MapView.js +6 -1
- package/lib/module/mappings/MapView.js.map +1 -1
- package/lib/module/mappings/SwiperItem.js.map +1 -1
- package/lib/typescript/src/mappings/MapMarker.d.ts +9 -0
- package/lib/typescript/src/mappings/MapMarker.d.ts.map +1 -1
- package/lib/typescript/src/mappings/MapView.d.ts +11 -0
- package/lib/typescript/src/mappings/MapView.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/mappings/Layout.js +4 -4
- package/src/mappings/Layout.ts +4 -4
- package/src/mappings/MapMarker.js +10 -1
- package/src/mappings/MapMarker.ts +11 -0
- package/src/mappings/MapView.js +6 -1
- package/src/mappings/MapView.ts +8 -0
- package/lib/commonjs/mappings/NativeBase/Layout.js +0 -97
- package/lib/commonjs/mappings/NativeBase/Layout.js.map +0 -1
- package/lib/module/mappings/NativeBase/Layout.js +0 -90
- package/lib/module/mappings/NativeBase/Layout.js.map +0 -1
- package/lib/typescript/src/mappings/NativeBase/Layout.d.ts +0 -107
- package/lib/typescript/src/mappings/NativeBase/Layout.d.ts.map +0 -1
- package/src/mappings/NativeBase/Layout.js +0 -111
- package/src/mappings/NativeBase/Layout.ts +0 -130
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@draftbit/core",
|
|
3
|
-
"version": "46.11.3-
|
|
3
|
+
"version": "46.11.3-5be21a.2+5be21a8",
|
|
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": "^46.11.3-
|
|
44
|
+
"@draftbit/types": "^46.11.3-5be21a.2+5be21a8",
|
|
45
45
|
"@material-ui/core": "^4.11.0",
|
|
46
46
|
"@material-ui/pickers": "^3.2.10",
|
|
47
47
|
"@react-native-community/slider": "4.2.3",
|
|
@@ -93,5 +93,5 @@
|
|
|
93
93
|
"node_modules/",
|
|
94
94
|
"lib/"
|
|
95
95
|
],
|
|
96
|
-
"gitHead": "
|
|
96
|
+
"gitHead": "5be21a8be8a4d8a5a4b51dcf448069fbd027f921"
|
|
97
97
|
}
|
package/src/mappings/Layout.js
CHANGED
|
@@ -31,7 +31,7 @@ export const SEED_DATA = [
|
|
|
31
31
|
{
|
|
32
32
|
name: "Spacer",
|
|
33
33
|
tag: "Spacer",
|
|
34
|
-
category: COMPONENT_TYPES.
|
|
34
|
+
category: COMPONENT_TYPES.layout,
|
|
35
35
|
props: {
|
|
36
36
|
top: {
|
|
37
37
|
label: "Top",
|
|
@@ -106,7 +106,7 @@ export const SEED_DATA = [
|
|
|
106
106
|
{
|
|
107
107
|
name: "Center",
|
|
108
108
|
tag: "Center",
|
|
109
|
-
category: COMPONENT_TYPES.
|
|
109
|
+
category: COMPONENT_TYPES.layout,
|
|
110
110
|
stylesPanelSections: [StylesPanelSections.NoStyles],
|
|
111
111
|
props: {
|
|
112
112
|
width: {
|
|
@@ -144,7 +144,7 @@ export const SEED_DATA = [
|
|
|
144
144
|
{
|
|
145
145
|
name: "Circle",
|
|
146
146
|
tag: "Circle",
|
|
147
|
-
category: COMPONENT_TYPES.
|
|
147
|
+
category: COMPONENT_TYPES.layout,
|
|
148
148
|
stylesPanelSections: [StylesPanelSections.NoStyles],
|
|
149
149
|
props: {
|
|
150
150
|
size: {
|
|
@@ -172,7 +172,7 @@ export const SEED_DATA = [
|
|
|
172
172
|
{
|
|
173
173
|
name: "Square",
|
|
174
174
|
tag: "Square",
|
|
175
|
-
category: COMPONENT_TYPES.
|
|
175
|
+
category: COMPONENT_TYPES.layout,
|
|
176
176
|
stylesPanelSections: [StylesPanelSections.NoStyles],
|
|
177
177
|
props: {
|
|
178
178
|
size: {
|
package/src/mappings/Layout.ts
CHANGED
|
@@ -38,7 +38,7 @@ export const SEED_DATA = [
|
|
|
38
38
|
{
|
|
39
39
|
name: "Spacer",
|
|
40
40
|
tag: "Spacer",
|
|
41
|
-
category: COMPONENT_TYPES.
|
|
41
|
+
category: COMPONENT_TYPES.layout,
|
|
42
42
|
props: {
|
|
43
43
|
top: {
|
|
44
44
|
label: "Top",
|
|
@@ -113,7 +113,7 @@ export const SEED_DATA = [
|
|
|
113
113
|
{
|
|
114
114
|
name: "Center",
|
|
115
115
|
tag: "Center",
|
|
116
|
-
category: COMPONENT_TYPES.
|
|
116
|
+
category: COMPONENT_TYPES.layout,
|
|
117
117
|
stylesPanelSections: [StylesPanelSections.NoStyles],
|
|
118
118
|
props: {
|
|
119
119
|
width: {
|
|
@@ -151,7 +151,7 @@ export const SEED_DATA = [
|
|
|
151
151
|
{
|
|
152
152
|
name: "Circle",
|
|
153
153
|
tag: "Circle",
|
|
154
|
-
category: COMPONENT_TYPES.
|
|
154
|
+
category: COMPONENT_TYPES.layout,
|
|
155
155
|
stylesPanelSections: [StylesPanelSections.NoStyles],
|
|
156
156
|
props: {
|
|
157
157
|
size: {
|
|
@@ -179,7 +179,7 @@ export const SEED_DATA = [
|
|
|
179
179
|
{
|
|
180
180
|
name: "Square",
|
|
181
181
|
tag: "Square",
|
|
182
|
-
category: COMPONENT_TYPES.
|
|
182
|
+
category: COMPONENT_TYPES.layout,
|
|
183
183
|
stylesPanelSections: [StylesPanelSections.NoStyles],
|
|
184
184
|
props: {
|
|
185
185
|
size: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { COMPONENT_TYPES, createBoolProp, createColorProp, createNumberProp, createTextProp, GROUPS, StylesPanelSections, } from "@draftbit/types";
|
|
1
|
+
import { COMPONENT_TYPES, createBoolProp, createColorProp, createNumberProp, createTextProp, FORM_TYPES, GROUPS, PROP_TYPES, StylesPanelSections, } from "@draftbit/types";
|
|
2
2
|
export const SEED_DATA = {
|
|
3
3
|
name: "Map Marker",
|
|
4
4
|
tag: "MapMarker",
|
|
@@ -48,5 +48,14 @@ export const SEED_DATA = {
|
|
|
48
48
|
label: "Pin Color",
|
|
49
49
|
description: "Sets the color of the marker",
|
|
50
50
|
}),
|
|
51
|
+
pinImage: {
|
|
52
|
+
group: GROUPS.data,
|
|
53
|
+
label: "Pin image",
|
|
54
|
+
description: "Image to be used instead of the default pin",
|
|
55
|
+
editable: true,
|
|
56
|
+
required: false,
|
|
57
|
+
formType: FORM_TYPES.image,
|
|
58
|
+
propType: PROP_TYPES.ASSET,
|
|
59
|
+
},
|
|
51
60
|
},
|
|
52
61
|
};
|
|
@@ -4,7 +4,9 @@ import {
|
|
|
4
4
|
createColorProp,
|
|
5
5
|
createNumberProp,
|
|
6
6
|
createTextProp,
|
|
7
|
+
FORM_TYPES,
|
|
7
8
|
GROUPS,
|
|
9
|
+
PROP_TYPES,
|
|
8
10
|
StylesPanelSections,
|
|
9
11
|
} from "@draftbit/types";
|
|
10
12
|
|
|
@@ -58,5 +60,14 @@ export const SEED_DATA = {
|
|
|
58
60
|
label: "Pin Color",
|
|
59
61
|
description: "Sets the color of the marker",
|
|
60
62
|
}),
|
|
63
|
+
pinImage: {
|
|
64
|
+
group: GROUPS.data,
|
|
65
|
+
label: "Pin image",
|
|
66
|
+
description: "Image to be used instead of the default pin",
|
|
67
|
+
editable: true,
|
|
68
|
+
required: false,
|
|
69
|
+
formType: FORM_TYPES.image,
|
|
70
|
+
propType: PROP_TYPES.ASSET,
|
|
71
|
+
},
|
|
61
72
|
},
|
|
62
73
|
};
|
package/src/mappings/MapView.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { COMPONENT_TYPES, createBoolProp, createColorProp, createNumberProp, createTextProp, GROUPS, FORM_TYPES, PROP_TYPES, StylesPanelSections, } from "@draftbit/types";
|
|
1
|
+
import { COMPONENT_TYPES, createBoolProp, createColorProp, createNumberProp, createTextProp, GROUPS, FORM_TYPES, PROP_TYPES, StylesPanelSections, Triggers, createActionProp, } from "@draftbit/types";
|
|
2
2
|
export const SEED_DATA = {
|
|
3
3
|
name: "Map View",
|
|
4
4
|
tag: "MapView",
|
|
@@ -11,7 +11,12 @@ export const SEED_DATA = {
|
|
|
11
11
|
width: "100%",
|
|
12
12
|
height: "100%",
|
|
13
13
|
},
|
|
14
|
+
triggers: [Triggers.OnRegionChange],
|
|
14
15
|
props: {
|
|
16
|
+
onRegionChange: createActionProp({
|
|
17
|
+
label: "On region changed",
|
|
18
|
+
description: "Action to execute when map panning stops and region changes",
|
|
19
|
+
}),
|
|
15
20
|
provider: {
|
|
16
21
|
formType: FORM_TYPES.flatArray,
|
|
17
22
|
propType: PROP_TYPES.STRING,
|
package/src/mappings/MapView.ts
CHANGED
|
@@ -8,6 +8,8 @@ import {
|
|
|
8
8
|
FORM_TYPES,
|
|
9
9
|
PROP_TYPES,
|
|
10
10
|
StylesPanelSections,
|
|
11
|
+
Triggers,
|
|
12
|
+
createActionProp,
|
|
11
13
|
} from "@draftbit/types";
|
|
12
14
|
|
|
13
15
|
export const SEED_DATA = {
|
|
@@ -22,7 +24,13 @@ export const SEED_DATA = {
|
|
|
22
24
|
width: "100%",
|
|
23
25
|
height: "100%",
|
|
24
26
|
},
|
|
27
|
+
triggers: [Triggers.OnRegionChange],
|
|
25
28
|
props: {
|
|
29
|
+
onRegionChange: createActionProp({
|
|
30
|
+
label: "On region changed",
|
|
31
|
+
description:
|
|
32
|
+
"Action to execute when map panning stops and region changes",
|
|
33
|
+
}),
|
|
26
34
|
provider: {
|
|
27
35
|
formType: FORM_TYPES.flatArray,
|
|
28
36
|
propType: PROP_TYPES.STRING,
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.SEED_DATA = void 0;
|
|
7
|
-
var _types = require("@draftbit/types");
|
|
8
|
-
const SHARED_SEED_DATA = {
|
|
9
|
-
category: _types.COMPONENT_TYPES.testing /*.layout*/,
|
|
10
|
-
packageName: "native-base",
|
|
11
|
-
stylesPanelSections: _types.CONTAINER_COMPONENT_STYLES_SECTIONS
|
|
12
|
-
};
|
|
13
|
-
const CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX = _types.CONTAINER_COMPONENT_STYLES_SECTIONS.filter(item => item !== _types.StylesPanelSections.LayoutFlexItems && item !== _types.StylesPanelSections.LayoutContent);
|
|
14
|
-
const SEED_DATA = [{
|
|
15
|
-
name: "Aspect Ratio",
|
|
16
|
-
tag: "AspectRatio",
|
|
17
|
-
description: "Controls the size of the undefined dimension of a node or child component using an aspect ratio",
|
|
18
|
-
...SHARED_SEED_DATA,
|
|
19
|
-
props: {
|
|
20
|
-
ratio: (0, _types.createStaticNumberProp)({
|
|
21
|
-
label: "Ratio",
|
|
22
|
-
description: "The aspect ratio of the container in decimal format (ex: 3/4 -> 1.33)",
|
|
23
|
-
defaultValue: 1.33
|
|
24
|
-
})
|
|
25
|
-
},
|
|
26
|
-
stylesPanelSections: [_types.StylesPanelSections.Background, _types.StylesPanelSections.Size, _types.StylesPanelSections.Margins, _types.StylesPanelSections.Position, _types.StylesPanelSections.Borders, _types.StylesPanelSections.Effects]
|
|
27
|
-
}, {
|
|
28
|
-
name: "Box",
|
|
29
|
-
tag: "Box",
|
|
30
|
-
description: "This is a generic component for low level layout needs. It is similar to a div in HTML",
|
|
31
|
-
...SHARED_SEED_DATA
|
|
32
|
-
}, {
|
|
33
|
-
name: "Center",
|
|
34
|
-
tag: "Center",
|
|
35
|
-
description: "Center aligns its contents to the center within itself",
|
|
36
|
-
...SHARED_SEED_DATA,
|
|
37
|
-
stylesPanelSections: CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX
|
|
38
|
-
}, {
|
|
39
|
-
name: "Circle",
|
|
40
|
-
tag: "Circle",
|
|
41
|
-
description: "Center aligns its contents to the center within itself with a round border radius",
|
|
42
|
-
...SHARED_SEED_DATA,
|
|
43
|
-
stylesPanelSections: CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX
|
|
44
|
-
}, {
|
|
45
|
-
name: "Column",
|
|
46
|
-
tag: "Column",
|
|
47
|
-
description: "Column aligns items vertically",
|
|
48
|
-
layout: {
|
|
49
|
-
flexDirection: "column"
|
|
50
|
-
},
|
|
51
|
-
...SHARED_SEED_DATA
|
|
52
|
-
}, {
|
|
53
|
-
name: "Row",
|
|
54
|
-
tag: "Row",
|
|
55
|
-
description: "Column aligns items horizontally",
|
|
56
|
-
layout: {
|
|
57
|
-
flexDirection: "row"
|
|
58
|
-
},
|
|
59
|
-
...SHARED_SEED_DATA
|
|
60
|
-
}, {
|
|
61
|
-
name: "Spacer",
|
|
62
|
-
tag: "Spacer",
|
|
63
|
-
description: "An adjustable, empty space that can be used to tune the spacing between child elements within Flex",
|
|
64
|
-
layout: {
|
|
65
|
-
flex: 1
|
|
66
|
-
},
|
|
67
|
-
...SHARED_SEED_DATA,
|
|
68
|
-
stylesPanelSections: [_types.StylesPanelSections.LayoutSelectedItem, _types.StylesPanelSections.Background, _types.StylesPanelSections.Margins]
|
|
69
|
-
}, {
|
|
70
|
-
name: "Stack",
|
|
71
|
-
tag: "Stack",
|
|
72
|
-
description: "Stack aligns items vertically or horizontally based on the direction prop",
|
|
73
|
-
...SHARED_SEED_DATA,
|
|
74
|
-
props: {
|
|
75
|
-
isDisabled: (0, _types.createBoolProp)({
|
|
76
|
-
label: "Disabled",
|
|
77
|
-
description: "If true, the Stack will be disabled"
|
|
78
|
-
}),
|
|
79
|
-
isInvalid: (0, _types.createBoolProp)({
|
|
80
|
-
label: "Invalid",
|
|
81
|
-
description: "If true, the Stack will be invalid"
|
|
82
|
-
})
|
|
83
|
-
}
|
|
84
|
-
}, {
|
|
85
|
-
name: "ZStack",
|
|
86
|
-
tag: "ZStack",
|
|
87
|
-
description: "ZStack aligns items to the z-axis",
|
|
88
|
-
...SHARED_SEED_DATA,
|
|
89
|
-
props: {
|
|
90
|
-
reversed: (0, _types.createBoolProp)({
|
|
91
|
-
label: "Reversed",
|
|
92
|
-
description: "Determines whether to reverse the direction of items"
|
|
93
|
-
})
|
|
94
|
-
}
|
|
95
|
-
}];
|
|
96
|
-
exports.SEED_DATA = SEED_DATA;
|
|
97
|
-
//# sourceMappingURL=Layout.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["SHARED_SEED_DATA","category","COMPONENT_TYPES","testing","packageName","stylesPanelSections","CONTAINER_COMPONENT_STYLES_SECTIONS","CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX","filter","item","StylesPanelSections","LayoutFlexItems","LayoutContent","SEED_DATA","name","tag","description","props","ratio","createStaticNumberProp","label","defaultValue","Background","Size","Margins","Position","Borders","Effects","layout","flexDirection","flex","LayoutSelectedItem","isDisabled","createBoolProp","isInvalid","reversed"],"sourceRoot":"../../../../src","sources":["mappings/NativeBase/Layout.ts"],"mappings":";;;;;;AAAA;AAQA,MAAMA,gBAAgB,GAAG;EACvBC,QAAQ,EAAEC,sBAAe,CAACC,OAAO,CAAC;EAClCC,WAAW,EAAE,aAAa;EAC1BC,mBAAmB,EAAEC;AACvB,CAAC;AAED,MAAMC,uCAAuC,GAC3CD,0CAAmC,CAACE,MAAM,CACvCC,IAAI,IACHA,IAAI,KAAKC,0BAAmB,CAACC,eAAe,IAC5CF,IAAI,KAAKC,0BAAmB,CAACE,aAAa,CAC7C;AAEI,MAAMC,SAAS,GAAG,CACvB;EACEC,IAAI,EAAE,cAAc;EACpBC,GAAG,EAAE,aAAa;EAClBC,WAAW,EACT,iGAAiG;EACnG,GAAGhB,gBAAgB;EACnBiB,KAAK,EAAE;IACLC,KAAK,EAAE,IAAAC,6BAAsB,EAAC;MAC5BC,KAAK,EAAE,OAAO;MACdJ,WAAW,EACT,uEAAuE;MACzEK,YAAY,EAAE;IAChB,CAAC;EACH,CAAC;EACDhB,mBAAmB,EAAE,CACnBK,0BAAmB,CAACY,UAAU,EAC9BZ,0BAAmB,CAACa,IAAI,EACxBb,0BAAmB,CAACc,OAAO,EAC3Bd,0BAAmB,CAACe,QAAQ,EAC5Bf,0BAAmB,CAACgB,OAAO,EAC3BhB,0BAAmB,CAACiB,OAAO;AAE/B,CAAC,EACD;EACEb,IAAI,EAAE,KAAK;EACXC,GAAG,EAAE,KAAK;EACVC,WAAW,EACT,wFAAwF;EAC1F,GAAGhB;AACL,CAAC,EACD;EACEc,IAAI,EAAE,QAAQ;EACdC,GAAG,EAAE,QAAQ;EACbC,WAAW,EAAE,wDAAwD;EACrE,GAAGhB,gBAAgB;EACnBK,mBAAmB,EAAEE;AACvB,CAAC,EACD;EACEO,IAAI,EAAE,QAAQ;EACdC,GAAG,EAAE,QAAQ;EACbC,WAAW,EACT,mFAAmF;EACrF,GAAGhB,gBAAgB;EACnBK,mBAA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-
import { COMPONENT_TYPES, createBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS, createStaticNumberProp, StylesPanelSections } from "@draftbit/types";
|
|
2
|
-
const SHARED_SEED_DATA = {
|
|
3
|
-
category: COMPONENT_TYPES.testing /*.layout*/,
|
|
4
|
-
packageName: "native-base",
|
|
5
|
-
stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS
|
|
6
|
-
};
|
|
7
|
-
const CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX = CONTAINER_COMPONENT_STYLES_SECTIONS.filter(item => item !== StylesPanelSections.LayoutFlexItems && item !== StylesPanelSections.LayoutContent);
|
|
8
|
-
export const SEED_DATA = [{
|
|
9
|
-
name: "Aspect Ratio",
|
|
10
|
-
tag: "AspectRatio",
|
|
11
|
-
description: "Controls the size of the undefined dimension of a node or child component using an aspect ratio",
|
|
12
|
-
...SHARED_SEED_DATA,
|
|
13
|
-
props: {
|
|
14
|
-
ratio: createStaticNumberProp({
|
|
15
|
-
label: "Ratio",
|
|
16
|
-
description: "The aspect ratio of the container in decimal format (ex: 3/4 -> 1.33)",
|
|
17
|
-
defaultValue: 1.33
|
|
18
|
-
})
|
|
19
|
-
},
|
|
20
|
-
stylesPanelSections: [StylesPanelSections.Background, StylesPanelSections.Size, StylesPanelSections.Margins, StylesPanelSections.Position, StylesPanelSections.Borders, StylesPanelSections.Effects]
|
|
21
|
-
}, {
|
|
22
|
-
name: "Box",
|
|
23
|
-
tag: "Box",
|
|
24
|
-
description: "This is a generic component for low level layout needs. It is similar to a div in HTML",
|
|
25
|
-
...SHARED_SEED_DATA
|
|
26
|
-
}, {
|
|
27
|
-
name: "Center",
|
|
28
|
-
tag: "Center",
|
|
29
|
-
description: "Center aligns its contents to the center within itself",
|
|
30
|
-
...SHARED_SEED_DATA,
|
|
31
|
-
stylesPanelSections: CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX
|
|
32
|
-
}, {
|
|
33
|
-
name: "Circle",
|
|
34
|
-
tag: "Circle",
|
|
35
|
-
description: "Center aligns its contents to the center within itself with a round border radius",
|
|
36
|
-
...SHARED_SEED_DATA,
|
|
37
|
-
stylesPanelSections: CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX
|
|
38
|
-
}, {
|
|
39
|
-
name: "Column",
|
|
40
|
-
tag: "Column",
|
|
41
|
-
description: "Column aligns items vertically",
|
|
42
|
-
layout: {
|
|
43
|
-
flexDirection: "column"
|
|
44
|
-
},
|
|
45
|
-
...SHARED_SEED_DATA
|
|
46
|
-
}, {
|
|
47
|
-
name: "Row",
|
|
48
|
-
tag: "Row",
|
|
49
|
-
description: "Column aligns items horizontally",
|
|
50
|
-
layout: {
|
|
51
|
-
flexDirection: "row"
|
|
52
|
-
},
|
|
53
|
-
...SHARED_SEED_DATA
|
|
54
|
-
}, {
|
|
55
|
-
name: "Spacer",
|
|
56
|
-
tag: "Spacer",
|
|
57
|
-
description: "An adjustable, empty space that can be used to tune the spacing between child elements within Flex",
|
|
58
|
-
layout: {
|
|
59
|
-
flex: 1
|
|
60
|
-
},
|
|
61
|
-
...SHARED_SEED_DATA,
|
|
62
|
-
stylesPanelSections: [StylesPanelSections.LayoutSelectedItem, StylesPanelSections.Background, StylesPanelSections.Margins]
|
|
63
|
-
}, {
|
|
64
|
-
name: "Stack",
|
|
65
|
-
tag: "Stack",
|
|
66
|
-
description: "Stack aligns items vertically or horizontally based on the direction prop",
|
|
67
|
-
...SHARED_SEED_DATA,
|
|
68
|
-
props: {
|
|
69
|
-
isDisabled: createBoolProp({
|
|
70
|
-
label: "Disabled",
|
|
71
|
-
description: "If true, the Stack will be disabled"
|
|
72
|
-
}),
|
|
73
|
-
isInvalid: createBoolProp({
|
|
74
|
-
label: "Invalid",
|
|
75
|
-
description: "If true, the Stack will be invalid"
|
|
76
|
-
})
|
|
77
|
-
}
|
|
78
|
-
}, {
|
|
79
|
-
name: "ZStack",
|
|
80
|
-
tag: "ZStack",
|
|
81
|
-
description: "ZStack aligns items to the z-axis",
|
|
82
|
-
...SHARED_SEED_DATA,
|
|
83
|
-
props: {
|
|
84
|
-
reversed: createBoolProp({
|
|
85
|
-
label: "Reversed",
|
|
86
|
-
description: "Determines whether to reverse the direction of items"
|
|
87
|
-
})
|
|
88
|
-
}
|
|
89
|
-
}];
|
|
90
|
-
//# sourceMappingURL=Layout.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["COMPONENT_TYPES","createBoolProp","CONTAINER_COMPONENT_STYLES_SECTIONS","createStaticNumberProp","StylesPanelSections","SHARED_SEED_DATA","category","testing","packageName","stylesPanelSections","CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX","filter","item","LayoutFlexItems","LayoutContent","SEED_DATA","name","tag","description","props","ratio","label","defaultValue","Background","Size","Margins","Position","Borders","Effects","layout","flexDirection","flex","LayoutSelectedItem","isDisabled","isInvalid","reversed"],"sourceRoot":"../../../../src","sources":["mappings/NativeBase/Layout.ts"],"mappings":"AAAA,SACEA,eAAe,EACfC,cAAc,EACdC,mCAAmC,EACnCC,sBAAsB,EACtBC,mBAAmB,QACd,iBAAiB;AAExB,MAAMC,gBAAgB,GAAG;EACvBC,QAAQ,EAAEN,eAAe,CAACO,OAAO,CAAC;EAClCC,WAAW,EAAE,aAAa;EAC1BC,mBAAmB,EAAEP;AACvB,CAAC;AAED,MAAMQ,uCAAuC,GAC3CR,mCAAmC,CAACS,MAAM,CACvCC,IAAI,IACHA,IAAI,KAAKR,mBAAmB,CAACS,eAAe,IAC5CD,IAAI,KAAKR,mBAAmB,CAACU,aAAa,CAC7C;AAEH,OAAO,MAAMC,SAAS,GAAG,CACvB;EACEC,IAAI,EAAE,cAAc;EACpBC,GAAG,EAAE,aAAa;EAClBC,WAAW,EACT,iGAAiG;EACnG,GAAGb,gBAAgB;EACnBc,KAAK,EAAE;IACLC,KAAK,EAAEjB,sBAAsB,CAAC;MAC5BkB,KAAK,EAAE,OAAO;MACdH,WAAW,EACT,uEAAuE;MACzEI,YAAY,EAAE;IA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AAO;EACbC,GAAG,EAAE,OAAO;EACZC,WAAW,EACT,2EAA2E;EAC7E,GAAGb,gBAAgB;EACnBc,KAAK,EAAE;IACLc,UAAU,EAAEhC,cAAc,CAAC;MACzBoB,KAAK,EAAE,UAAU;MACjBH,WAAW,EAAE;IACf,CAAC,CAAC;IACFgB,SAAS,EAAEjC,cAAc,CAAC;MACxBoB,KAAK,EAAE,SAAS;MAChBH,WAAW,EAAE;IACf,CAAC;EACH;AACF,CAAC,EACD;EACEF,IAAI,EAAE,QAAQ;EACdC,GAAG,EAAE,QAAQ;EACbC,WAAW,EAAE,mCAAmC;EAChD,GAAGb,gBAAgB;EACnBc,KAAK,EAAE;IACLgB,QAAQ,EAAElC,cAAc,CAAC;MACvBoB,KAAK,EAAE,UAAU;MACjBH,WAAW,EAAE;IACf,CAAC;EACH;AACF,CAAC,CACF"}
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
export declare const SEED_DATA: ({
|
|
2
|
-
props: {
|
|
3
|
-
ratio: {
|
|
4
|
-
label: string;
|
|
5
|
-
description: string;
|
|
6
|
-
formType: string;
|
|
7
|
-
propType: string;
|
|
8
|
-
group: string;
|
|
9
|
-
defaultValue: null;
|
|
10
|
-
editable: boolean;
|
|
11
|
-
required: boolean;
|
|
12
|
-
step: number;
|
|
13
|
-
};
|
|
14
|
-
isDisabled?: undefined;
|
|
15
|
-
isInvalid?: undefined;
|
|
16
|
-
reversed?: undefined;
|
|
17
|
-
};
|
|
18
|
-
stylesPanelSections: string[];
|
|
19
|
-
category: string;
|
|
20
|
-
packageName: string;
|
|
21
|
-
name: string;
|
|
22
|
-
tag: string;
|
|
23
|
-
description: string;
|
|
24
|
-
} | {
|
|
25
|
-
category: string;
|
|
26
|
-
packageName: string;
|
|
27
|
-
stylesPanelSections: string[];
|
|
28
|
-
name: string;
|
|
29
|
-
tag: string;
|
|
30
|
-
description: string;
|
|
31
|
-
} | {
|
|
32
|
-
category: string;
|
|
33
|
-
packageName: string;
|
|
34
|
-
stylesPanelSections: string[];
|
|
35
|
-
name: string;
|
|
36
|
-
tag: string;
|
|
37
|
-
description: string;
|
|
38
|
-
layout: {
|
|
39
|
-
flexDirection: string;
|
|
40
|
-
flex?: undefined;
|
|
41
|
-
};
|
|
42
|
-
} | {
|
|
43
|
-
stylesPanelSections: string[];
|
|
44
|
-
category: string;
|
|
45
|
-
packageName: string;
|
|
46
|
-
name: string;
|
|
47
|
-
tag: string;
|
|
48
|
-
description: string;
|
|
49
|
-
layout: {
|
|
50
|
-
flex: number;
|
|
51
|
-
flexDirection?: undefined;
|
|
52
|
-
};
|
|
53
|
-
} | {
|
|
54
|
-
props: {
|
|
55
|
-
isDisabled: {
|
|
56
|
-
label: string;
|
|
57
|
-
description: string;
|
|
58
|
-
formType: string;
|
|
59
|
-
propType: string;
|
|
60
|
-
defaultValue: boolean;
|
|
61
|
-
editable: boolean;
|
|
62
|
-
required: boolean;
|
|
63
|
-
group: string;
|
|
64
|
-
};
|
|
65
|
-
isInvalid: {
|
|
66
|
-
label: string;
|
|
67
|
-
description: string;
|
|
68
|
-
formType: string;
|
|
69
|
-
propType: string;
|
|
70
|
-
defaultValue: boolean;
|
|
71
|
-
editable: boolean;
|
|
72
|
-
required: boolean;
|
|
73
|
-
group: string;
|
|
74
|
-
};
|
|
75
|
-
ratio?: undefined;
|
|
76
|
-
reversed?: undefined;
|
|
77
|
-
};
|
|
78
|
-
category: string;
|
|
79
|
-
packageName: string;
|
|
80
|
-
stylesPanelSections: string[];
|
|
81
|
-
name: string;
|
|
82
|
-
tag: string;
|
|
83
|
-
description: string;
|
|
84
|
-
} | {
|
|
85
|
-
props: {
|
|
86
|
-
reversed: {
|
|
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
|
-
ratio?: undefined;
|
|
97
|
-
isDisabled?: undefined;
|
|
98
|
-
isInvalid?: undefined;
|
|
99
|
-
};
|
|
100
|
-
category: string;
|
|
101
|
-
packageName: string;
|
|
102
|
-
stylesPanelSections: string[];
|
|
103
|
-
name: string;
|
|
104
|
-
tag: string;
|
|
105
|
-
description: string;
|
|
106
|
-
})[];
|
|
107
|
-
//# sourceMappingURL=Layout.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Layout.d.ts","sourceRoot":"","sources":["../../../../../src/mappings/NativeBase/Layout.ts"],"names":[],"mappings":"AAqBA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA4GrB,CAAC"}
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
import { COMPONENT_TYPES, createBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS, createStaticNumberProp, StylesPanelSections, } from "@draftbit/types";
|
|
2
|
-
const SHARED_SEED_DATA = {
|
|
3
|
-
category: COMPONENT_TYPES.testing /*.layout*/,
|
|
4
|
-
packageName: "native-base",
|
|
5
|
-
stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
|
|
6
|
-
};
|
|
7
|
-
const CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX = CONTAINER_COMPONENT_STYLES_SECTIONS.filter((item) => item !== StylesPanelSections.LayoutFlexItems &&
|
|
8
|
-
item !== StylesPanelSections.LayoutContent);
|
|
9
|
-
export const SEED_DATA = [
|
|
10
|
-
{
|
|
11
|
-
name: "Aspect Ratio",
|
|
12
|
-
tag: "AspectRatio",
|
|
13
|
-
description: "Controls the size of the undefined dimension of a node or child component using an aspect ratio",
|
|
14
|
-
...SHARED_SEED_DATA,
|
|
15
|
-
props: {
|
|
16
|
-
ratio: createStaticNumberProp({
|
|
17
|
-
label: "Ratio",
|
|
18
|
-
description: "The aspect ratio of the container in decimal format (ex: 3/4 -> 1.33)",
|
|
19
|
-
defaultValue: 1.33,
|
|
20
|
-
}),
|
|
21
|
-
},
|
|
22
|
-
stylesPanelSections: [
|
|
23
|
-
StylesPanelSections.Background,
|
|
24
|
-
StylesPanelSections.Size,
|
|
25
|
-
StylesPanelSections.Margins,
|
|
26
|
-
StylesPanelSections.Position,
|
|
27
|
-
StylesPanelSections.Borders,
|
|
28
|
-
StylesPanelSections.Effects,
|
|
29
|
-
],
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
name: "Box",
|
|
33
|
-
tag: "Box",
|
|
34
|
-
description: "This is a generic component for low level layout needs. It is similar to a div in HTML",
|
|
35
|
-
...SHARED_SEED_DATA,
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
name: "Center",
|
|
39
|
-
tag: "Center",
|
|
40
|
-
description: "Center aligns its contents to the center within itself",
|
|
41
|
-
...SHARED_SEED_DATA,
|
|
42
|
-
stylesPanelSections: CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX,
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
name: "Circle",
|
|
46
|
-
tag: "Circle",
|
|
47
|
-
description: "Center aligns its contents to the center within itself with a round border radius",
|
|
48
|
-
...SHARED_SEED_DATA,
|
|
49
|
-
stylesPanelSections: CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX,
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
name: "Column",
|
|
53
|
-
tag: "Column",
|
|
54
|
-
description: "Column aligns items vertically",
|
|
55
|
-
layout: {
|
|
56
|
-
flexDirection: "column",
|
|
57
|
-
},
|
|
58
|
-
...SHARED_SEED_DATA,
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
name: "Row",
|
|
62
|
-
tag: "Row",
|
|
63
|
-
description: "Column aligns items horizontally",
|
|
64
|
-
layout: {
|
|
65
|
-
flexDirection: "row",
|
|
66
|
-
},
|
|
67
|
-
...SHARED_SEED_DATA,
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
name: "Spacer",
|
|
71
|
-
tag: "Spacer",
|
|
72
|
-
description: "An adjustable, empty space that can be used to tune the spacing between child elements within Flex",
|
|
73
|
-
layout: {
|
|
74
|
-
flex: 1,
|
|
75
|
-
},
|
|
76
|
-
...SHARED_SEED_DATA,
|
|
77
|
-
stylesPanelSections: [
|
|
78
|
-
StylesPanelSections.LayoutSelectedItem,
|
|
79
|
-
StylesPanelSections.Background,
|
|
80
|
-
StylesPanelSections.Margins,
|
|
81
|
-
],
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
name: "Stack",
|
|
85
|
-
tag: "Stack",
|
|
86
|
-
description: "Stack aligns items vertically or horizontally based on the direction prop",
|
|
87
|
-
...SHARED_SEED_DATA,
|
|
88
|
-
props: {
|
|
89
|
-
isDisabled: createBoolProp({
|
|
90
|
-
label: "Disabled",
|
|
91
|
-
description: "If true, the Stack will be disabled",
|
|
92
|
-
}),
|
|
93
|
-
isInvalid: createBoolProp({
|
|
94
|
-
label: "Invalid",
|
|
95
|
-
description: "If true, the Stack will be invalid",
|
|
96
|
-
}),
|
|
97
|
-
},
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
name: "ZStack",
|
|
101
|
-
tag: "ZStack",
|
|
102
|
-
description: "ZStack aligns items to the z-axis",
|
|
103
|
-
...SHARED_SEED_DATA,
|
|
104
|
-
props: {
|
|
105
|
-
reversed: createBoolProp({
|
|
106
|
-
label: "Reversed",
|
|
107
|
-
description: "Determines whether to reverse the direction of items",
|
|
108
|
-
}),
|
|
109
|
-
},
|
|
110
|
-
},
|
|
111
|
-
];
|