@draftbit/core 46.10.3-7db6c9.2 → 46.10.3-877a3f.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/CheckboxRow.js +23 -6
- package/lib/commonjs/components/Checkbox/context.js +1 -1
- package/lib/commonjs/mappings/Container.js +37 -0
- package/lib/commonjs/mappings/NativeBase/Layout.js +3 -7
- package/lib/module/components/DeprecatedFAB.js +23 -3
- package/lib/module/components/Elevation.js +14 -2
- package/lib/module/mappings/Container.js +30 -0
- package/lib/module/mappings/NativeBase/Layout.js +4 -8
- package/lib/typescript/src/mappings/Container.d.ts +55 -0
- package/lib/typescript/src/mappings/Container.d.ts.map +1 -0
- package/lib/typescript/src/mappings/NativeBase/Layout.d.ts +0 -12
- package/lib/typescript/src/mappings/NativeBase/Layout.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/mappings/Container.js +30 -0
- package/src/mappings/Container.ts +41 -0
- package/src/mappings/NativeBase/Layout.js +3 -11
- package/src/mappings/NativeBase/Layout.ts +2 -11
|
@@ -14,8 +14,7 @@ var _Checkbox = _interopRequireDefault(require("./Checkbox"));
|
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
15
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
16
16
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
|
-
|
|
18
|
-
let Direction;
|
|
17
|
+
var Direction;
|
|
19
18
|
exports.Direction = Direction;
|
|
20
19
|
(function (Direction) {
|
|
21
20
|
Direction["Row"] = "row";
|
|
@@ -58,7 +57,6 @@ const CheckboxRow = _ref => {
|
|
|
58
57
|
setInternalValue(status);
|
|
59
58
|
}
|
|
60
59
|
}, [status]);
|
|
61
|
-
|
|
62
60
|
// This special logic is to handle weird APIs like Airtable that return
|
|
63
61
|
// true or undefined for a boolean
|
|
64
62
|
const previousDefaultValue = (0, _hooks.usePrevious)(defaultValue);
|
|
@@ -82,13 +80,14 @@ const CheckboxRow = _ref => {
|
|
|
82
80
|
textStyles,
|
|
83
81
|
viewStyles
|
|
84
82
|
} = (0, _utilities.extractStyles)(style);
|
|
85
|
-
return /*#__PURE__*/React.createElement(_reactNative.Pressable,
|
|
83
|
+
return /*#__PURE__*/React.createElement(_reactNative.Pressable, {
|
|
86
84
|
onPress: handlePress,
|
|
87
85
|
style: [viewStyles, styles.mainParent, {
|
|
88
86
|
flexDirection: direction
|
|
89
87
|
}],
|
|
90
|
-
disabled: disabled
|
|
91
|
-
|
|
88
|
+
disabled: disabled,
|
|
89
|
+
...rest
|
|
90
|
+
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
92
91
|
style: [styles.label, {
|
|
93
92
|
alignItems: direction === Direction.Row ? "flex-start" : "flex-end"
|
|
94
93
|
}, labelContainerStyle]
|
|
@@ -125,4 +124,22 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
125
124
|
}
|
|
126
125
|
});
|
|
127
126
|
var _default = CheckboxRow;
|
|
127
|
+
exports.default = _default;ems: "center",
|
|
128
|
+
justifyContent: "space-around",
|
|
129
|
+
paddingStart: 20,
|
|
130
|
+
minHeight: 50,
|
|
131
|
+
paddingEnd: 20,
|
|
132
|
+
display: "flex",
|
|
133
|
+
..._reactNative.Platform.select({
|
|
134
|
+
web: {
|
|
135
|
+
cursor: "pointer",
|
|
136
|
+
userSelect: "none"
|
|
137
|
+
}
|
|
138
|
+
})
|
|
139
|
+
},
|
|
140
|
+
label: {
|
|
141
|
+
flex: 3
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
var _default = CheckboxRow;
|
|
128
145
|
exports.default = _default;
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.checkboxGroupContext = exports.Direction = void 0;
|
|
7
7
|
exports.useCheckboxGroupContext = useCheckboxGroupContext;
|
|
8
8
|
var _react = require("react");
|
|
9
|
-
|
|
9
|
+
let Direction;
|
|
10
10
|
exports.Direction = Direction;
|
|
11
11
|
(function (Direction) {
|
|
12
12
|
Direction["Horizontal"] = "horizontal";
|
|
@@ -0,0 +1,37 @@
|
|
|
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 SEED_DATA = {
|
|
9
|
+
name: "Container",
|
|
10
|
+
tag: "Container",
|
|
11
|
+
description: "A container component with gutter padding",
|
|
12
|
+
category: _types.COMPONENT_TYPES.deprecated,
|
|
13
|
+
stylesPanelSections: _types.CONTAINER_COMPONENT_STYLES_SECTIONS,
|
|
14
|
+
layout: {
|
|
15
|
+
height: 250
|
|
16
|
+
},
|
|
17
|
+
props: {
|
|
18
|
+
useThemeGutterPadding: {
|
|
19
|
+
group: _types.GROUPS.basic,
|
|
20
|
+
label: "Use gutter padding",
|
|
21
|
+
description: "When true, uses the theme gutter spacing as the container's horizontal padding",
|
|
22
|
+
formType: _types.FORM_TYPES.boolean,
|
|
23
|
+
propType: _types.PROP_TYPES.BOOLEAN,
|
|
24
|
+
defaultValue: false,
|
|
25
|
+
editable: false,
|
|
26
|
+
required: true
|
|
27
|
+
},
|
|
28
|
+
backgroundImage: (0, _types.createImageProp)({
|
|
29
|
+
label: "Background Image",
|
|
30
|
+
description: "Apply a custom background image",
|
|
31
|
+
defaultValue: null
|
|
32
|
+
}),
|
|
33
|
+
backgroundImageResizeMode: (0, _types.createResizeModeProp)(),
|
|
34
|
+
elevation: (0, _types.createElevationType)(0)
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
exports.SEED_DATA = SEED_DATA;
|
|
@@ -45,10 +45,9 @@ const SEED_DATA = [{
|
|
|
45
45
|
tag: "Container",
|
|
46
46
|
description: "The Container restricts a content's width according to current breakpoint, while keeping the size fluid",
|
|
47
47
|
props: {
|
|
48
|
-
centerContent: (0, _types.
|
|
48
|
+
centerContent: (0, _types.createBoolProp)({
|
|
49
49
|
label: "Center content",
|
|
50
|
-
description: "Center child elements based on their content width"
|
|
51
|
-
defaultValue: true
|
|
50
|
+
description: "Center child elements based on their content width"
|
|
52
51
|
})
|
|
53
52
|
},
|
|
54
53
|
...SHARED_SEED_DATA
|
|
@@ -72,11 +71,8 @@ const SEED_DATA = [{
|
|
|
72
71
|
name: "Spacer",
|
|
73
72
|
tag: "Spacer",
|
|
74
73
|
description: "An adjustable, empty space that can be used to tune the spacing between child elements within Flex",
|
|
75
|
-
layout: {
|
|
76
|
-
flex: 1
|
|
77
|
-
},
|
|
78
74
|
...SHARED_SEED_DATA,
|
|
79
|
-
stylesPanelSections:
|
|
75
|
+
stylesPanelSections: CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX
|
|
80
76
|
}, {
|
|
81
77
|
name: "Stack",
|
|
82
78
|
tag: "Stack",
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
1
|
import * as React from "react";
|
|
3
2
|
import { ActivityIndicator, View, StyleSheet, Pressable } from "react-native";
|
|
4
3
|
import color from "color";
|
|
@@ -97,7 +96,8 @@ const FAB = _ref => {
|
|
|
97
96
|
style: [{
|
|
98
97
|
elevation
|
|
99
98
|
}, style]
|
|
100
|
-
}, /*#__PURE__*/React.createElement(Pressable,
|
|
99
|
+
}, /*#__PURE__*/React.createElement(Pressable, {
|
|
100
|
+
...rest,
|
|
101
101
|
onPress: onPress,
|
|
102
102
|
accessibilityState: {
|
|
103
103
|
disabled
|
|
@@ -105,7 +105,7 @@ const FAB = _ref => {
|
|
|
105
105
|
accessibilityRole: "button",
|
|
106
106
|
disabled: disabled || loading,
|
|
107
107
|
style: buttonStyles
|
|
108
|
-
}
|
|
108
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
109
109
|
style: styles.content
|
|
110
110
|
}, icon && loading !== true ? /*#__PURE__*/React.createElement(View, {
|
|
111
111
|
style: iconStyle
|
|
@@ -144,4 +144,24 @@ const styles = StyleSheet.create({
|
|
|
144
144
|
borderRadius: 0
|
|
145
145
|
}
|
|
146
146
|
});
|
|
147
|
+
export default withTheme(FAB);le: "solid"
|
|
148
|
+
},
|
|
149
|
+
content: {
|
|
150
|
+
flexDirection: "row",
|
|
151
|
+
alignItems: "center",
|
|
152
|
+
justifyContent: "center"
|
|
153
|
+
},
|
|
154
|
+
icon: {
|
|
155
|
+
alignItems: "center",
|
|
156
|
+
justifyContent: "center",
|
|
157
|
+
width: Config.buttonIconSize
|
|
158
|
+
},
|
|
159
|
+
fixed: {
|
|
160
|
+
left: 0,
|
|
161
|
+
right: 0,
|
|
162
|
+
bottom: 0,
|
|
163
|
+
height: 64,
|
|
164
|
+
borderRadius: 0
|
|
165
|
+
}
|
|
166
|
+
});
|
|
147
167
|
export default withTheme(FAB);
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
1
|
import * as React from "react";
|
|
3
2
|
import { Animated, StyleSheet, View } from "react-native";
|
|
4
3
|
import shadow from "../styles/shadow";
|
|
@@ -19,7 +18,20 @@ const Elevation = _ref => {
|
|
|
19
18
|
colors
|
|
20
19
|
} = theme;
|
|
21
20
|
const borderRadius = radius;
|
|
22
|
-
return /*#__PURE__*/React.createElement(Animated.View,
|
|
21
|
+
return /*#__PURE__*/React.createElement(Animated.View, {
|
|
22
|
+
...rest,
|
|
23
|
+
style: [{
|
|
24
|
+
borderRadius,
|
|
25
|
+
backgroundColor: colors.surface
|
|
26
|
+
}, elevation ? shadow(elevation) : null, style]
|
|
27
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
28
|
+
style: {
|
|
29
|
+
overflow: "hidden",
|
|
30
|
+
borderRadius
|
|
31
|
+
}
|
|
32
|
+
}, children));
|
|
33
|
+
};
|
|
34
|
+
export default withTheme(Elevation);React.createElement(Animated.View, _extends({}, rest, {
|
|
23
35
|
style: [{
|
|
24
36
|
borderRadius,
|
|
25
37
|
backgroundColor: colors.surface
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { GROUPS, COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, createElevationType, createImageProp, createResizeModeProp, CONTAINER_COMPONENT_STYLES_SECTIONS } from "@draftbit/types";
|
|
2
|
+
export const SEED_DATA = {
|
|
3
|
+
name: "Container",
|
|
4
|
+
tag: "Container",
|
|
5
|
+
description: "A container component with gutter padding",
|
|
6
|
+
category: COMPONENT_TYPES.deprecated,
|
|
7
|
+
stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
|
|
8
|
+
layout: {
|
|
9
|
+
height: 250
|
|
10
|
+
},
|
|
11
|
+
props: {
|
|
12
|
+
useThemeGutterPadding: {
|
|
13
|
+
group: GROUPS.basic,
|
|
14
|
+
label: "Use gutter padding",
|
|
15
|
+
description: "When true, uses the theme gutter spacing as the container's horizontal padding",
|
|
16
|
+
formType: FORM_TYPES.boolean,
|
|
17
|
+
propType: PROP_TYPES.BOOLEAN,
|
|
18
|
+
defaultValue: false,
|
|
19
|
+
editable: false,
|
|
20
|
+
required: true
|
|
21
|
+
},
|
|
22
|
+
backgroundImage: createImageProp({
|
|
23
|
+
label: "Background Image",
|
|
24
|
+
description: "Apply a custom background image",
|
|
25
|
+
defaultValue: null
|
|
26
|
+
}),
|
|
27
|
+
backgroundImageResizeMode: createResizeModeProp(),
|
|
28
|
+
elevation: createElevationType(0)
|
|
29
|
+
}
|
|
30
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { COMPONENT_TYPES, createTextEnumProp, createBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS, createStaticNumberProp, StylesPanelSections
|
|
1
|
+
import { COMPONENT_TYPES, createTextEnumProp, createBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS, createStaticNumberProp, StylesPanelSections } from "@draftbit/types";
|
|
2
2
|
const SHARED_SEED_DATA = {
|
|
3
3
|
category: COMPONENT_TYPES.layout,
|
|
4
4
|
packageName: "native-base",
|
|
@@ -39,10 +39,9 @@ export const SEED_DATA = [{
|
|
|
39
39
|
tag: "Container",
|
|
40
40
|
description: "The Container restricts a content's width according to current breakpoint, while keeping the size fluid",
|
|
41
41
|
props: {
|
|
42
|
-
centerContent:
|
|
42
|
+
centerContent: createBoolProp({
|
|
43
43
|
label: "Center content",
|
|
44
|
-
description: "Center child elements based on their content width"
|
|
45
|
-
defaultValue: true
|
|
44
|
+
description: "Center child elements based on their content width"
|
|
46
45
|
})
|
|
47
46
|
},
|
|
48
47
|
...SHARED_SEED_DATA
|
|
@@ -66,11 +65,8 @@ export const SEED_DATA = [{
|
|
|
66
65
|
name: "Spacer",
|
|
67
66
|
tag: "Spacer",
|
|
68
67
|
description: "An adjustable, empty space that can be used to tune the spacing between child elements within Flex",
|
|
69
|
-
layout: {
|
|
70
|
-
flex: 1
|
|
71
|
-
},
|
|
72
68
|
...SHARED_SEED_DATA,
|
|
73
|
-
stylesPanelSections:
|
|
69
|
+
stylesPanelSections: CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX
|
|
74
70
|
}, {
|
|
75
71
|
name: "Stack",
|
|
76
72
|
tag: "Stack",
|
|
@@ -0,0 +1,55 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Container.d.ts","sourceRoot":"","sources":["../../../../src/mappings/Container.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BrB,CAAC"}
|
|
@@ -63,18 +63,6 @@ export declare const SEED_DATA: ({
|
|
|
63
63
|
description: string;
|
|
64
64
|
layout: {
|
|
65
65
|
flexDirection: string;
|
|
66
|
-
flex?: undefined;
|
|
67
|
-
};
|
|
68
|
-
} | {
|
|
69
|
-
stylesPanelSections: string[];
|
|
70
|
-
category: string;
|
|
71
|
-
packageName: string;
|
|
72
|
-
name: string;
|
|
73
|
-
tag: string;
|
|
74
|
-
description: string;
|
|
75
|
-
layout: {
|
|
76
|
-
flex: number;
|
|
77
|
-
flexDirection?: undefined;
|
|
78
66
|
};
|
|
79
67
|
} | {
|
|
80
68
|
props: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Layout.d.ts","sourceRoot":"","sources":["../../../../../src/mappings/NativeBase/Layout.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Layout.d.ts","sourceRoot":"","sources":["../../../../../src/mappings/NativeBase/Layout.ts"],"names":[],"mappings":"AAsBA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAoHrB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@draftbit/core",
|
|
3
|
-
"version": "46.10.3-
|
|
3
|
+
"version": "46.10.3-877a3f.2+877a3fa",
|
|
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.10.3-
|
|
44
|
+
"@draftbit/types": "^46.10.3-877a3f.2+877a3fa",
|
|
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",
|
|
@@ -100,5 +100,5 @@
|
|
|
100
100
|
]
|
|
101
101
|
]
|
|
102
102
|
},
|
|
103
|
-
"gitHead": "
|
|
103
|
+
"gitHead": "877a3fa2568c2a8c87bcac685df23e35a69f883e"
|
|
104
104
|
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { GROUPS, COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, createElevationType, createImageProp, createResizeModeProp, CONTAINER_COMPONENT_STYLES_SECTIONS, } from "@draftbit/types";
|
|
2
|
+
export const SEED_DATA = {
|
|
3
|
+
name: "Container",
|
|
4
|
+
tag: "Container",
|
|
5
|
+
description: "A container component with gutter padding",
|
|
6
|
+
category: COMPONENT_TYPES.deprecated,
|
|
7
|
+
stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
|
|
8
|
+
layout: {
|
|
9
|
+
height: 250,
|
|
10
|
+
},
|
|
11
|
+
props: {
|
|
12
|
+
useThemeGutterPadding: {
|
|
13
|
+
group: GROUPS.basic,
|
|
14
|
+
label: "Use gutter padding",
|
|
15
|
+
description: "When true, uses the theme gutter spacing as the container's horizontal padding",
|
|
16
|
+
formType: FORM_TYPES.boolean,
|
|
17
|
+
propType: PROP_TYPES.BOOLEAN,
|
|
18
|
+
defaultValue: false,
|
|
19
|
+
editable: false,
|
|
20
|
+
required: true,
|
|
21
|
+
},
|
|
22
|
+
backgroundImage: createImageProp({
|
|
23
|
+
label: "Background Image",
|
|
24
|
+
description: "Apply a custom background image",
|
|
25
|
+
defaultValue: null,
|
|
26
|
+
}),
|
|
27
|
+
backgroundImageResizeMode: createResizeModeProp(),
|
|
28
|
+
elevation: createElevationType(0),
|
|
29
|
+
},
|
|
30
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import {
|
|
2
|
+
GROUPS,
|
|
3
|
+
COMPONENT_TYPES,
|
|
4
|
+
FORM_TYPES,
|
|
5
|
+
PROP_TYPES,
|
|
6
|
+
createElevationType,
|
|
7
|
+
createImageProp,
|
|
8
|
+
createResizeModeProp,
|
|
9
|
+
CONTAINER_COMPONENT_STYLES_SECTIONS,
|
|
10
|
+
} from "@draftbit/types";
|
|
11
|
+
|
|
12
|
+
export const SEED_DATA = {
|
|
13
|
+
name: "Container",
|
|
14
|
+
tag: "Container",
|
|
15
|
+
description: "A container component with gutter padding",
|
|
16
|
+
category: COMPONENT_TYPES.deprecated,
|
|
17
|
+
stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
|
|
18
|
+
layout: {
|
|
19
|
+
height: 250,
|
|
20
|
+
},
|
|
21
|
+
props: {
|
|
22
|
+
useThemeGutterPadding: {
|
|
23
|
+
group: GROUPS.basic,
|
|
24
|
+
label: "Use gutter padding",
|
|
25
|
+
description:
|
|
26
|
+
"When true, uses the theme gutter spacing as the container's horizontal padding",
|
|
27
|
+
formType: FORM_TYPES.boolean,
|
|
28
|
+
propType: PROP_TYPES.BOOLEAN,
|
|
29
|
+
defaultValue: false,
|
|
30
|
+
editable: false,
|
|
31
|
+
required: true,
|
|
32
|
+
},
|
|
33
|
+
backgroundImage: createImageProp({
|
|
34
|
+
label: "Background Image",
|
|
35
|
+
description: "Apply a custom background image",
|
|
36
|
+
defaultValue: null,
|
|
37
|
+
}),
|
|
38
|
+
backgroundImageResizeMode: createResizeModeProp(),
|
|
39
|
+
elevation: createElevationType(0),
|
|
40
|
+
},
|
|
41
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { COMPONENT_TYPES, createTextEnumProp, createBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS, createStaticNumberProp, StylesPanelSections,
|
|
1
|
+
import { COMPONENT_TYPES, createTextEnumProp, createBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS, createStaticNumberProp, StylesPanelSections, } from "@draftbit/types";
|
|
2
2
|
const SHARED_SEED_DATA = {
|
|
3
3
|
category: COMPONENT_TYPES.layout,
|
|
4
4
|
packageName: "native-base",
|
|
@@ -45,10 +45,9 @@ export const SEED_DATA = [
|
|
|
45
45
|
tag: "Container",
|
|
46
46
|
description: "The Container restricts a content's width according to current breakpoint, while keeping the size fluid",
|
|
47
47
|
props: {
|
|
48
|
-
centerContent:
|
|
48
|
+
centerContent: createBoolProp({
|
|
49
49
|
label: "Center content",
|
|
50
50
|
description: "Center child elements based on their content width",
|
|
51
|
-
defaultValue: true,
|
|
52
51
|
}),
|
|
53
52
|
},
|
|
54
53
|
...SHARED_SEED_DATA,
|
|
@@ -75,15 +74,8 @@ export const SEED_DATA = [
|
|
|
75
74
|
name: "Spacer",
|
|
76
75
|
tag: "Spacer",
|
|
77
76
|
description: "An adjustable, empty space that can be used to tune the spacing between child elements within Flex",
|
|
78
|
-
layout: {
|
|
79
|
-
flex: 1,
|
|
80
|
-
},
|
|
81
77
|
...SHARED_SEED_DATA,
|
|
82
|
-
stylesPanelSections:
|
|
83
|
-
StylesPanelSections.LayoutSelectedItem,
|
|
84
|
-
StylesPanelSections.Background,
|
|
85
|
-
StylesPanelSections.Margins,
|
|
86
|
-
],
|
|
78
|
+
stylesPanelSections: CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX,
|
|
87
79
|
},
|
|
88
80
|
{
|
|
89
81
|
name: "Stack",
|
|
@@ -5,7 +5,6 @@ import {
|
|
|
5
5
|
CONTAINER_COMPONENT_STYLES_SECTIONS,
|
|
6
6
|
createStaticNumberProp,
|
|
7
7
|
StylesPanelSections,
|
|
8
|
-
createStaticBoolProp,
|
|
9
8
|
} from "@draftbit/types";
|
|
10
9
|
|
|
11
10
|
const SHARED_SEED_DATA = {
|
|
@@ -65,10 +64,9 @@ export const SEED_DATA = [
|
|
|
65
64
|
description:
|
|
66
65
|
"The Container restricts a content's width according to current breakpoint, while keeping the size fluid",
|
|
67
66
|
props: {
|
|
68
|
-
centerContent:
|
|
67
|
+
centerContent: createBoolProp({
|
|
69
68
|
label: "Center content",
|
|
70
69
|
description: "Center child elements based on their content width",
|
|
71
|
-
defaultValue: true,
|
|
72
70
|
}),
|
|
73
71
|
},
|
|
74
72
|
...SHARED_SEED_DATA,
|
|
@@ -96,15 +94,8 @@ export const SEED_DATA = [
|
|
|
96
94
|
tag: "Spacer",
|
|
97
95
|
description:
|
|
98
96
|
"An adjustable, empty space that can be used to tune the spacing between child elements within Flex",
|
|
99
|
-
layout: {
|
|
100
|
-
flex: 1,
|
|
101
|
-
},
|
|
102
97
|
...SHARED_SEED_DATA,
|
|
103
|
-
stylesPanelSections:
|
|
104
|
-
StylesPanelSections.LayoutSelectedItem,
|
|
105
|
-
StylesPanelSections.Background,
|
|
106
|
-
StylesPanelSections.Margins,
|
|
107
|
-
],
|
|
98
|
+
stylesPanelSections: CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX,
|
|
108
99
|
},
|
|
109
100
|
{
|
|
110
101
|
name: "Stack",
|