@draftbit/core 46.10.3-0bad1e.2 → 46.10.3-1ab4b6.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 +17 -2
- package/lib/commonjs/components/Checkbox/CheckboxRow.js +6 -23
- package/lib/commonjs/components/FAB.js +4 -18
- package/lib/commonjs/components/Shadow.js +15 -2
- package/lib/commonjs/components/Table/Table.js +123 -0
- package/lib/commonjs/components/Table/TableCell.js +49 -0
- package/lib/commonjs/components/Table/TableCommon.js +30 -0
- package/lib/commonjs/components/Table/TableRow.js +61 -0
- package/lib/commonjs/components/Table/index.js +27 -0
- package/lib/commonjs/index.js +19 -7
- package/lib/commonjs/mappings/Layout.js +85 -177
- package/lib/commonjs/mappings/Table.js +140 -0
- package/lib/module/components/Table/Table.js +114 -0
- package/lib/module/components/Table/TableCell.js +41 -0
- package/lib/module/components/Table/TableCommon.js +21 -0
- package/lib/module/components/Table/TableRow.js +53 -0
- package/lib/module/components/Table/index.js +3 -0
- package/lib/module/index.js +1 -1
- package/lib/module/mappings/Layout.js +86 -178
- package/lib/module/mappings/Table.js +133 -0
- package/lib/typescript/src/components/Table/Table.d.ts +19 -0
- package/lib/typescript/src/components/Table/Table.d.ts.map +1 -0
- package/lib/typescript/src/components/Table/TableCell.d.ts +9 -0
- package/lib/typescript/src/components/Table/TableCell.d.ts.map +1 -0
- package/lib/typescript/src/components/Table/TableCommon.d.ts +20 -0
- package/lib/typescript/src/components/Table/TableCommon.d.ts.map +1 -0
- package/lib/typescript/src/components/{DeprecatedCardWrapper.d.ts → Table/TableRow.d.ts} +7 -8
- package/lib/typescript/src/components/Table/TableRow.d.ts.map +1 -0
- package/lib/typescript/src/components/Table/index.d.ts +4 -0
- package/lib/typescript/src/components/Table/index.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +1 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/mappings/Layout.d.ts +72 -108
- package/lib/typescript/src/mappings/Layout.d.ts.map +1 -1
- package/lib/typescript/src/mappings/{CardBlock.d.ts → Table.d.ts} +129 -81
- package/lib/typescript/src/mappings/Table.d.ts.map +1 -0
- package/package.json +3 -3
- package/src/components/Table/Table.js +93 -0
- package/src/components/Table/Table.tsx +176 -0
- package/src/components/Table/TableCell.js +31 -0
- package/src/components/Table/TableCell.tsx +63 -0
- package/src/components/Table/TableCommon.js +12 -0
- package/src/components/Table/TableCommon.ts +40 -0
- package/src/components/Table/TableRow.js +37 -0
- package/src/components/Table/TableRow.tsx +77 -0
- package/src/components/Table/index.js +3 -0
- package/src/components/Table/index.tsx +3 -0
- package/src/index.js +1 -1
- package/src/index.tsx +2 -1
- package/src/mappings/Layout.js +100 -176
- package/src/mappings/Layout.ts +116 -178
- package/src/mappings/Table.js +150 -0
- package/src/mappings/Table.ts +170 -0
- package/lib/commonjs/components/Container.js +0 -93
- package/lib/commonjs/components/DeprecatedCardWrapper.js +0 -40
- package/lib/commonjs/components/DeprecatedFAB.js +0 -157
- package/lib/commonjs/components/ProgressIndicator.js +0 -55
- package/lib/commonjs/components/ResizeMode.js +0 -5
- package/lib/commonjs/mappings/CardBlock.js +0 -126
- package/lib/commonjs/mappings/CardContainer.js +0 -108
- package/lib/commonjs/mappings/CardContainerRating.js +0 -130
- package/lib/commonjs/mappings/CardContainerShortImage.js +0 -124
- package/lib/commonjs/mappings/CardInline.js +0 -59
- package/lib/commonjs/mappings/Container.js +0 -37
- package/lib/commonjs/mappings/NativeBase/Layout.js +0 -97
- package/lib/commonjs/mappings/ProgressIndicator.js +0 -188
- package/lib/module/components/Container.js +0 -83
- package/lib/module/components/DeprecatedCardWrapper.js +0 -32
- package/lib/module/components/DeprecatedFAB.js +0 -147
- package/lib/module/components/ProgressIndicator.js +0 -45
- package/lib/module/components/ResizeMode.js +0 -1
- package/lib/module/mappings/CardBlock.js +0 -119
- package/lib/module/mappings/CardContainer.js +0 -101
- package/lib/module/mappings/CardContainerRating.js +0 -123
- package/lib/module/mappings/CardContainerShortImage.js +0 -117
- package/lib/module/mappings/CardInline.js +0 -52
- package/lib/module/mappings/Container.js +0 -30
- package/lib/module/mappings/NativeBase/Layout.js +0 -90
- package/lib/module/mappings/ProgressIndicator.js +0 -181
- package/lib/typescript/src/components/Container.d.ts +0 -21
- package/lib/typescript/src/components/Container.d.ts.map +0 -1
- package/lib/typescript/src/components/DeprecatedCardWrapper.d.ts.map +0 -1
- package/lib/typescript/src/components/DeprecatedFAB.d.ts +0 -56
- package/lib/typescript/src/components/DeprecatedFAB.d.ts.map +0 -1
- package/lib/typescript/src/components/ProgressIndicator.d.ts +0 -24
- package/lib/typescript/src/components/ProgressIndicator.d.ts.map +0 -1
- package/lib/typescript/src/components/ResizeMode.d.ts +0 -2
- package/lib/typescript/src/components/ResizeMode.d.ts.map +0 -1
- package/lib/typescript/src/mappings/CardBlock.d.ts.map +0 -1
- package/lib/typescript/src/mappings/CardContainer.d.ts +0 -102
- package/lib/typescript/src/mappings/CardContainer.d.ts.map +0 -1
- package/lib/typescript/src/mappings/CardContainerRating.d.ts +0 -108
- package/lib/typescript/src/mappings/CardContainerRating.d.ts.map +0 -1
- package/lib/typescript/src/mappings/CardContainerShortImage.d.ts +0 -139
- package/lib/typescript/src/mappings/CardContainerShortImage.d.ts.map +0 -1
- package/lib/typescript/src/mappings/CardInline.d.ts +0 -62
- package/lib/typescript/src/mappings/CardInline.d.ts.map +0 -1
- package/lib/typescript/src/mappings/Container.d.ts +0 -55
- package/lib/typescript/src/mappings/Container.d.ts.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/lib/typescript/src/mappings/ProgressIndicator.d.ts +0 -181
- package/lib/typescript/src/mappings/ProgressIndicator.d.ts.map +0 -1
- package/src/components/Container.js +0 -43
- package/src/components/Container.tsx +0 -116
- package/src/components/DeprecatedCardWrapper.js +0 -18
- package/src/components/DeprecatedCardWrapper.tsx +0 -46
- package/src/components/DeprecatedFAB.js +0 -114
- package/src/components/DeprecatedFAB.tsx +0 -231
- package/src/components/ProgressIndicator.js +0 -27
- package/src/components/ProgressIndicator.tsx +0 -71
- package/src/components/ResizeMode.js +0 -1
- package/src/components/ResizeMode.ts +0 -7
- package/src/mappings/CardBlock.js +0 -123
- package/src/mappings/CardBlock.ts +0 -136
- package/src/mappings/CardContainer.js +0 -104
- package/src/mappings/CardContainer.ts +0 -116
- package/src/mappings/CardContainerRating.js +0 -126
- package/src/mappings/CardContainerRating.ts +0 -137
- package/src/mappings/CardContainerShortImage.js +0 -120
- package/src/mappings/CardContainerShortImage.ts +0 -130
- package/src/mappings/CardInline.js +0 -52
- package/src/mappings/CardInline.ts +0 -61
- package/src/mappings/Container.js +0 -30
- package/src/mappings/Container.ts +0 -41
- package/src/mappings/NativeBase/Layout.js +0 -101
- package/src/mappings/NativeBase/Layout.ts +0 -116
- package/src/mappings/ProgressIndicator.js +0 -181
- package/src/mappings/ProgressIndicator.ts +0 -190
package/src/mappings/Layout.js
CHANGED
|
@@ -1,200 +1,124 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { COMPONENT_TYPES, createBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS, createStaticNumberProp, StylesPanelSections, createStaticBoolProp, } from "@draftbit/types";
|
|
2
|
+
const SHARED_SEED_DATA = {
|
|
3
|
+
category: COMPONENT_TYPES.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);
|
|
2
9
|
export const SEED_DATA = [
|
|
3
10
|
{
|
|
4
|
-
name: "
|
|
5
|
-
tag: "
|
|
6
|
-
|
|
7
|
-
|
|
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,
|
|
8
15
|
props: {
|
|
9
|
-
|
|
10
|
-
label: "
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
propType: PROP_TYPES.STRING,
|
|
15
|
-
defaultValue: "flex-start",
|
|
16
|
-
editable: true,
|
|
17
|
-
required: false,
|
|
18
|
-
},
|
|
19
|
-
alignItems: {
|
|
20
|
-
label: "Align Vertically",
|
|
21
|
-
group: GROUPS.style,
|
|
22
|
-
description: "Align Items Vertically (on the Y Axis)",
|
|
23
|
-
formType: FORM_TYPES.string,
|
|
24
|
-
propType: PROP_TYPES.STRING,
|
|
25
|
-
defaultValue: "flex-start",
|
|
26
|
-
editable: true,
|
|
27
|
-
required: false,
|
|
28
|
-
},
|
|
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
|
+
}),
|
|
29
21
|
},
|
|
22
|
+
stylesPanelSections: [
|
|
23
|
+
StylesPanelSections.Background,
|
|
24
|
+
StylesPanelSections.Size,
|
|
25
|
+
StylesPanelSections.Margins,
|
|
26
|
+
StylesPanelSections.Position,
|
|
27
|
+
StylesPanelSections.Borders,
|
|
28
|
+
StylesPanelSections.Effects,
|
|
29
|
+
],
|
|
30
30
|
},
|
|
31
31
|
{
|
|
32
|
-
name: "
|
|
33
|
-
tag: "
|
|
34
|
-
|
|
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: "Container",
|
|
53
|
+
tag: "Container",
|
|
54
|
+
description: "The Container restricts a content's width according to current breakpoint, while keeping the size fluid",
|
|
35
55
|
props: {
|
|
36
|
-
|
|
37
|
-
label: "
|
|
38
|
-
description: "
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
group: GROUPS.style,
|
|
42
|
-
defaultValue: 8,
|
|
43
|
-
editable: true,
|
|
44
|
-
required: false,
|
|
45
|
-
},
|
|
46
|
-
right: {
|
|
47
|
-
label: "Right",
|
|
48
|
-
description: "Right",
|
|
49
|
-
formType: FORM_TYPES.number,
|
|
50
|
-
propType: PROP_TYPES.NUMBER,
|
|
51
|
-
group: GROUPS.style,
|
|
52
|
-
defaultValue: 8,
|
|
53
|
-
editable: true,
|
|
54
|
-
required: false,
|
|
55
|
-
},
|
|
56
|
-
bottom: {
|
|
57
|
-
label: "Bottom",
|
|
58
|
-
description: "Bottom",
|
|
59
|
-
formType: FORM_TYPES.number,
|
|
60
|
-
propType: PROP_TYPES.NUMBER,
|
|
61
|
-
group: GROUPS.style,
|
|
62
|
-
defaultValue: 8,
|
|
63
|
-
editable: true,
|
|
64
|
-
required: false,
|
|
65
|
-
},
|
|
66
|
-
left: {
|
|
67
|
-
label: "Left",
|
|
68
|
-
description: "Left",
|
|
69
|
-
formType: FORM_TYPES.number,
|
|
70
|
-
propType: PROP_TYPES.NUMBER,
|
|
71
|
-
group: GROUPS.style,
|
|
72
|
-
defaultValue: 8,
|
|
73
|
-
editable: true,
|
|
74
|
-
required: false,
|
|
75
|
-
},
|
|
56
|
+
centerContent: createStaticBoolProp({
|
|
57
|
+
label: "Center content",
|
|
58
|
+
description: "Center child elements based on their content width",
|
|
59
|
+
defaultValue: true,
|
|
60
|
+
}),
|
|
76
61
|
},
|
|
62
|
+
...SHARED_SEED_DATA,
|
|
77
63
|
},
|
|
78
64
|
{
|
|
79
|
-
name: "
|
|
80
|
-
tag: "
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
justifyContent: {
|
|
85
|
-
group: GROUPS.style,
|
|
86
|
-
label: "Justify",
|
|
87
|
-
description: "Justify horizontally",
|
|
88
|
-
formType: FORM_TYPES.string,
|
|
89
|
-
propType: PROP_TYPES.STRING,
|
|
90
|
-
defaultValue: "flex-start",
|
|
91
|
-
editable: true,
|
|
92
|
-
required: false,
|
|
93
|
-
},
|
|
94
|
-
alignItems: {
|
|
95
|
-
group: GROUPS.style,
|
|
96
|
-
label: "Align",
|
|
97
|
-
description: "Vertical align",
|
|
98
|
-
formType: FORM_TYPES.string,
|
|
99
|
-
propType: PROP_TYPES.STRING,
|
|
100
|
-
defaultValue: "flex-start",
|
|
101
|
-
editable: true,
|
|
102
|
-
required: false,
|
|
103
|
-
},
|
|
65
|
+
name: "Column",
|
|
66
|
+
tag: "Column",
|
|
67
|
+
description: "Column aligns items vertically",
|
|
68
|
+
layout: {
|
|
69
|
+
flexDirection: "column",
|
|
104
70
|
},
|
|
71
|
+
...SHARED_SEED_DATA,
|
|
105
72
|
},
|
|
106
73
|
{
|
|
107
|
-
name: "
|
|
108
|
-
tag: "
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
width: {
|
|
113
|
-
label: "Width",
|
|
114
|
-
description: "Width",
|
|
115
|
-
formType: FORM_TYPES.number,
|
|
116
|
-
propType: PROP_TYPES.NUMBER,
|
|
117
|
-
group: GROUPS.style,
|
|
118
|
-
defaultValue: 240,
|
|
119
|
-
editable: true,
|
|
120
|
-
required: false,
|
|
121
|
-
},
|
|
122
|
-
height: {
|
|
123
|
-
label: "Height",
|
|
124
|
-
description: "Height",
|
|
125
|
-
formType: FORM_TYPES.number,
|
|
126
|
-
propType: PROP_TYPES.NUMBER,
|
|
127
|
-
group: GROUPS.style,
|
|
128
|
-
defaultValue: 200,
|
|
129
|
-
editable: true,
|
|
130
|
-
required: false,
|
|
131
|
-
},
|
|
132
|
-
bgColor: {
|
|
133
|
-
label: "Background Color",
|
|
134
|
-
description: "Background color",
|
|
135
|
-
formType: FORM_TYPES.color,
|
|
136
|
-
propType: PROP_TYPES.THEME,
|
|
137
|
-
editable: true,
|
|
138
|
-
required: false,
|
|
139
|
-
defaultValue: "light",
|
|
140
|
-
group: GROUPS.style,
|
|
141
|
-
},
|
|
74
|
+
name: "Row",
|
|
75
|
+
tag: "Row",
|
|
76
|
+
description: "Column aligns items horizontally",
|
|
77
|
+
layout: {
|
|
78
|
+
flexDirection: "row",
|
|
142
79
|
},
|
|
80
|
+
...SHARED_SEED_DATA,
|
|
143
81
|
},
|
|
144
82
|
{
|
|
145
|
-
name: "
|
|
146
|
-
tag: "
|
|
147
|
-
|
|
148
|
-
|
|
83
|
+
name: "Spacer",
|
|
84
|
+
tag: "Spacer",
|
|
85
|
+
description: "An adjustable, empty space that can be used to tune the spacing between child elements within Flex",
|
|
86
|
+
layout: {
|
|
87
|
+
flex: 1,
|
|
88
|
+
},
|
|
89
|
+
...SHARED_SEED_DATA,
|
|
90
|
+
stylesPanelSections: [
|
|
91
|
+
StylesPanelSections.LayoutSelectedItem,
|
|
92
|
+
StylesPanelSections.Background,
|
|
93
|
+
StylesPanelSections.Margins,
|
|
94
|
+
],
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
name: "Stack",
|
|
98
|
+
tag: "Stack",
|
|
99
|
+
description: "Stack aligns items vertically or horizontally based on the direction prop",
|
|
100
|
+
...SHARED_SEED_DATA,
|
|
149
101
|
props: {
|
|
150
|
-
|
|
151
|
-
label: "
|
|
152
|
-
description: "
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
required: false,
|
|
159
|
-
},
|
|
160
|
-
bgColor: {
|
|
161
|
-
label: "Background Color",
|
|
162
|
-
description: "Background color",
|
|
163
|
-
formType: FORM_TYPES.color,
|
|
164
|
-
propType: PROP_TYPES.THEME,
|
|
165
|
-
editable: true,
|
|
166
|
-
required: false,
|
|
167
|
-
defaultValue: "light",
|
|
168
|
-
group: GROUPS.style,
|
|
169
|
-
},
|
|
102
|
+
isDisabled: createBoolProp({
|
|
103
|
+
label: "Disabled",
|
|
104
|
+
description: "If true, the Stack will be disabled",
|
|
105
|
+
}),
|
|
106
|
+
isInvalid: createBoolProp({
|
|
107
|
+
label: "Invalid",
|
|
108
|
+
description: "If true, the Stack will be invalid",
|
|
109
|
+
}),
|
|
170
110
|
},
|
|
171
111
|
},
|
|
172
112
|
{
|
|
173
|
-
name: "
|
|
174
|
-
tag: "
|
|
175
|
-
|
|
176
|
-
|
|
113
|
+
name: "ZStack",
|
|
114
|
+
tag: "ZStack",
|
|
115
|
+
description: "ZStack aligns items to the z-axis",
|
|
116
|
+
...SHARED_SEED_DATA,
|
|
177
117
|
props: {
|
|
178
|
-
|
|
179
|
-
label: "
|
|
180
|
-
description: "
|
|
181
|
-
|
|
182
|
-
propType: PROP_TYPES.NUMBER,
|
|
183
|
-
group: GROUPS.style,
|
|
184
|
-
defaultValue: 50,
|
|
185
|
-
editable: true,
|
|
186
|
-
required: false,
|
|
187
|
-
},
|
|
188
|
-
bgColor: {
|
|
189
|
-
label: "Background Color",
|
|
190
|
-
description: "Background color",
|
|
191
|
-
formType: FORM_TYPES.color,
|
|
192
|
-
propType: PROP_TYPES.THEME,
|
|
193
|
-
editable: true,
|
|
194
|
-
required: false,
|
|
195
|
-
defaultValue: "light",
|
|
196
|
-
group: GROUPS.style,
|
|
197
|
-
},
|
|
118
|
+
reversed: createBoolProp({
|
|
119
|
+
label: "Reversed",
|
|
120
|
+
description: "Determines whether to reverse the direction of items",
|
|
121
|
+
}),
|
|
198
122
|
},
|
|
199
123
|
},
|
|
200
124
|
];
|
package/src/mappings/Layout.ts
CHANGED
|
@@ -1,207 +1,145 @@
|
|
|
1
1
|
import {
|
|
2
|
-
GROUPS,
|
|
3
|
-
FORM_TYPES,
|
|
4
|
-
PROP_TYPES,
|
|
5
2
|
COMPONENT_TYPES,
|
|
3
|
+
createBoolProp,
|
|
4
|
+
CONTAINER_COMPONENT_STYLES_SECTIONS,
|
|
5
|
+
createStaticNumberProp,
|
|
6
6
|
StylesPanelSections,
|
|
7
|
+
createStaticBoolProp,
|
|
7
8
|
} from "@draftbit/types";
|
|
8
9
|
|
|
10
|
+
const SHARED_SEED_DATA = {
|
|
11
|
+
category: COMPONENT_TYPES.layout,
|
|
12
|
+
packageName: "native-base",
|
|
13
|
+
stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX =
|
|
17
|
+
CONTAINER_COMPONENT_STYLES_SECTIONS.filter(
|
|
18
|
+
(item) =>
|
|
19
|
+
item !== StylesPanelSections.LayoutFlexItems &&
|
|
20
|
+
item !== StylesPanelSections.LayoutContent
|
|
21
|
+
);
|
|
22
|
+
|
|
9
23
|
export const SEED_DATA = [
|
|
10
24
|
{
|
|
11
|
-
name: "
|
|
12
|
-
tag: "
|
|
13
|
-
|
|
14
|
-
|
|
25
|
+
name: "Aspect Ratio",
|
|
26
|
+
tag: "AspectRatio",
|
|
27
|
+
description:
|
|
28
|
+
"Controls the size of the undefined dimension of a node or child component using an aspect ratio",
|
|
29
|
+
...SHARED_SEED_DATA,
|
|
15
30
|
props: {
|
|
16
|
-
|
|
17
|
-
label: "
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
defaultValue: "flex-start",
|
|
23
|
-
editable: true,
|
|
24
|
-
required: false,
|
|
25
|
-
},
|
|
26
|
-
alignItems: {
|
|
27
|
-
label: "Align Vertically",
|
|
28
|
-
group: GROUPS.style,
|
|
29
|
-
description: "Align Items Vertically (on the Y Axis)",
|
|
30
|
-
formType: FORM_TYPES.string,
|
|
31
|
-
propType: PROP_TYPES.STRING,
|
|
32
|
-
defaultValue: "flex-start",
|
|
33
|
-
editable: true,
|
|
34
|
-
required: false,
|
|
35
|
-
},
|
|
31
|
+
ratio: createStaticNumberProp({
|
|
32
|
+
label: "Ratio",
|
|
33
|
+
description:
|
|
34
|
+
"The aspect ratio of the container in decimal format (ex: 3/4 -> 1.33)",
|
|
35
|
+
defaultValue: 1.33,
|
|
36
|
+
}),
|
|
36
37
|
},
|
|
38
|
+
stylesPanelSections: [
|
|
39
|
+
StylesPanelSections.Background,
|
|
40
|
+
StylesPanelSections.Size,
|
|
41
|
+
StylesPanelSections.Margins,
|
|
42
|
+
StylesPanelSections.Position,
|
|
43
|
+
StylesPanelSections.Borders,
|
|
44
|
+
StylesPanelSections.Effects,
|
|
45
|
+
],
|
|
37
46
|
},
|
|
38
47
|
{
|
|
39
|
-
name: "
|
|
40
|
-
tag: "
|
|
41
|
-
|
|
48
|
+
name: "Box",
|
|
49
|
+
tag: "Box",
|
|
50
|
+
description:
|
|
51
|
+
"This is a generic component for low level layout needs. It is similar to a div in HTML",
|
|
52
|
+
...SHARED_SEED_DATA,
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: "Center",
|
|
56
|
+
tag: "Center",
|
|
57
|
+
description: "Center aligns its contents to the center within itself",
|
|
58
|
+
...SHARED_SEED_DATA,
|
|
59
|
+
stylesPanelSections: CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX,
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
name: "Circle",
|
|
63
|
+
tag: "Circle",
|
|
64
|
+
description:
|
|
65
|
+
"Center aligns its contents to the center within itself with a round border radius",
|
|
66
|
+
...SHARED_SEED_DATA,
|
|
67
|
+
stylesPanelSections: CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX,
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
name: "Container",
|
|
71
|
+
tag: "Container",
|
|
72
|
+
description:
|
|
73
|
+
"The Container restricts a content's width according to current breakpoint, while keeping the size fluid",
|
|
42
74
|
props: {
|
|
43
|
-
|
|
44
|
-
label: "
|
|
45
|
-
description: "
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
group: GROUPS.style,
|
|
49
|
-
defaultValue: 8,
|
|
50
|
-
editable: true,
|
|
51
|
-
required: false,
|
|
52
|
-
},
|
|
53
|
-
right: {
|
|
54
|
-
label: "Right",
|
|
55
|
-
description: "Right",
|
|
56
|
-
formType: FORM_TYPES.number,
|
|
57
|
-
propType: PROP_TYPES.NUMBER,
|
|
58
|
-
group: GROUPS.style,
|
|
59
|
-
defaultValue: 8,
|
|
60
|
-
editable: true,
|
|
61
|
-
required: false,
|
|
62
|
-
},
|
|
63
|
-
bottom: {
|
|
64
|
-
label: "Bottom",
|
|
65
|
-
description: "Bottom",
|
|
66
|
-
formType: FORM_TYPES.number,
|
|
67
|
-
propType: PROP_TYPES.NUMBER,
|
|
68
|
-
group: GROUPS.style,
|
|
69
|
-
defaultValue: 8,
|
|
70
|
-
editable: true,
|
|
71
|
-
required: false,
|
|
72
|
-
},
|
|
73
|
-
left: {
|
|
74
|
-
label: "Left",
|
|
75
|
-
description: "Left",
|
|
76
|
-
formType: FORM_TYPES.number,
|
|
77
|
-
propType: PROP_TYPES.NUMBER,
|
|
78
|
-
group: GROUPS.style,
|
|
79
|
-
defaultValue: 8,
|
|
80
|
-
editable: true,
|
|
81
|
-
required: false,
|
|
82
|
-
},
|
|
75
|
+
centerContent: createStaticBoolProp({
|
|
76
|
+
label: "Center content",
|
|
77
|
+
description: "Center child elements based on their content width",
|
|
78
|
+
defaultValue: true,
|
|
79
|
+
}),
|
|
83
80
|
},
|
|
81
|
+
...SHARED_SEED_DATA,
|
|
84
82
|
},
|
|
85
83
|
{
|
|
86
|
-
name: "
|
|
87
|
-
tag: "
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
justifyContent: {
|
|
92
|
-
group: GROUPS.style,
|
|
93
|
-
label: "Justify",
|
|
94
|
-
description: "Justify horizontally",
|
|
95
|
-
formType: FORM_TYPES.string,
|
|
96
|
-
propType: PROP_TYPES.STRING,
|
|
97
|
-
defaultValue: "flex-start",
|
|
98
|
-
editable: true,
|
|
99
|
-
required: false,
|
|
100
|
-
},
|
|
101
|
-
alignItems: {
|
|
102
|
-
group: GROUPS.style,
|
|
103
|
-
label: "Align",
|
|
104
|
-
description: "Vertical align",
|
|
105
|
-
formType: FORM_TYPES.string,
|
|
106
|
-
propType: PROP_TYPES.STRING,
|
|
107
|
-
defaultValue: "flex-start",
|
|
108
|
-
editable: true,
|
|
109
|
-
required: false,
|
|
110
|
-
},
|
|
84
|
+
name: "Column",
|
|
85
|
+
tag: "Column",
|
|
86
|
+
description: "Column aligns items vertically",
|
|
87
|
+
layout: {
|
|
88
|
+
flexDirection: "column",
|
|
111
89
|
},
|
|
90
|
+
...SHARED_SEED_DATA,
|
|
112
91
|
},
|
|
113
92
|
{
|
|
114
|
-
name: "
|
|
115
|
-
tag: "
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
width: {
|
|
120
|
-
label: "Width",
|
|
121
|
-
description: "Width",
|
|
122
|
-
formType: FORM_TYPES.number,
|
|
123
|
-
propType: PROP_TYPES.NUMBER,
|
|
124
|
-
group: GROUPS.style,
|
|
125
|
-
defaultValue: 240,
|
|
126
|
-
editable: true,
|
|
127
|
-
required: false,
|
|
128
|
-
},
|
|
129
|
-
height: {
|
|
130
|
-
label: "Height",
|
|
131
|
-
description: "Height",
|
|
132
|
-
formType: FORM_TYPES.number,
|
|
133
|
-
propType: PROP_TYPES.NUMBER,
|
|
134
|
-
group: GROUPS.style,
|
|
135
|
-
defaultValue: 200,
|
|
136
|
-
editable: true,
|
|
137
|
-
required: false,
|
|
138
|
-
},
|
|
139
|
-
bgColor: {
|
|
140
|
-
label: "Background Color",
|
|
141
|
-
description: "Background color",
|
|
142
|
-
formType: FORM_TYPES.color,
|
|
143
|
-
propType: PROP_TYPES.THEME,
|
|
144
|
-
editable: true,
|
|
145
|
-
required: false,
|
|
146
|
-
defaultValue: "light",
|
|
147
|
-
group: GROUPS.style,
|
|
148
|
-
},
|
|
93
|
+
name: "Row",
|
|
94
|
+
tag: "Row",
|
|
95
|
+
description: "Column aligns items horizontally",
|
|
96
|
+
layout: {
|
|
97
|
+
flexDirection: "row",
|
|
149
98
|
},
|
|
99
|
+
...SHARED_SEED_DATA,
|
|
150
100
|
},
|
|
151
101
|
{
|
|
152
|
-
name: "
|
|
153
|
-
tag: "
|
|
154
|
-
|
|
155
|
-
|
|
102
|
+
name: "Spacer",
|
|
103
|
+
tag: "Spacer",
|
|
104
|
+
description:
|
|
105
|
+
"An adjustable, empty space that can be used to tune the spacing between child elements within Flex",
|
|
106
|
+
layout: {
|
|
107
|
+
flex: 1,
|
|
108
|
+
},
|
|
109
|
+
...SHARED_SEED_DATA,
|
|
110
|
+
stylesPanelSections: [
|
|
111
|
+
StylesPanelSections.LayoutSelectedItem,
|
|
112
|
+
StylesPanelSections.Background,
|
|
113
|
+
StylesPanelSections.Margins,
|
|
114
|
+
],
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
name: "Stack",
|
|
118
|
+
tag: "Stack",
|
|
119
|
+
description:
|
|
120
|
+
"Stack aligns items vertically or horizontally based on the direction prop",
|
|
121
|
+
...SHARED_SEED_DATA,
|
|
156
122
|
props: {
|
|
157
|
-
|
|
158
|
-
label: "
|
|
159
|
-
description: "
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
required: false,
|
|
166
|
-
},
|
|
167
|
-
bgColor: {
|
|
168
|
-
label: "Background Color",
|
|
169
|
-
description: "Background color",
|
|
170
|
-
formType: FORM_TYPES.color,
|
|
171
|
-
propType: PROP_TYPES.THEME,
|
|
172
|
-
editable: true,
|
|
173
|
-
required: false,
|
|
174
|
-
defaultValue: "light",
|
|
175
|
-
group: GROUPS.style,
|
|
176
|
-
},
|
|
123
|
+
isDisabled: createBoolProp({
|
|
124
|
+
label: "Disabled",
|
|
125
|
+
description: "If true, the Stack will be disabled",
|
|
126
|
+
}),
|
|
127
|
+
isInvalid: createBoolProp({
|
|
128
|
+
label: "Invalid",
|
|
129
|
+
description: "If true, the Stack will be invalid",
|
|
130
|
+
}),
|
|
177
131
|
},
|
|
178
132
|
},
|
|
179
133
|
{
|
|
180
|
-
name: "
|
|
181
|
-
tag: "
|
|
182
|
-
|
|
183
|
-
|
|
134
|
+
name: "ZStack",
|
|
135
|
+
tag: "ZStack",
|
|
136
|
+
description: "ZStack aligns items to the z-axis",
|
|
137
|
+
...SHARED_SEED_DATA,
|
|
184
138
|
props: {
|
|
185
|
-
|
|
186
|
-
label: "
|
|
187
|
-
description: "
|
|
188
|
-
|
|
189
|
-
propType: PROP_TYPES.NUMBER,
|
|
190
|
-
group: GROUPS.style,
|
|
191
|
-
defaultValue: 50,
|
|
192
|
-
editable: true,
|
|
193
|
-
required: false,
|
|
194
|
-
},
|
|
195
|
-
bgColor: {
|
|
196
|
-
label: "Background Color",
|
|
197
|
-
description: "Background color",
|
|
198
|
-
formType: FORM_TYPES.color,
|
|
199
|
-
propType: PROP_TYPES.THEME,
|
|
200
|
-
editable: true,
|
|
201
|
-
required: false,
|
|
202
|
-
defaultValue: "light",
|
|
203
|
-
group: GROUPS.style,
|
|
204
|
-
},
|
|
139
|
+
reversed: createBoolProp({
|
|
140
|
+
label: "Reversed",
|
|
141
|
+
description: "Determines whether to reverse the direction of items",
|
|
142
|
+
}),
|
|
205
143
|
},
|
|
206
144
|
},
|
|
207
145
|
];
|