@draftbit/core 46.10.3-6f5759.2 → 46.10.3-7db6c9.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 +6 -23
- package/lib/commonjs/components/Checkbox/context.js +1 -1
- package/lib/commonjs/components/TabView/TabView.js +7 -13
- package/lib/commonjs/constants.js +1 -1
- package/lib/commonjs/mappings/NativeBase/Layout.js +11 -1
- package/lib/module/mappings/NativeBase/Layout.js +12 -2
- package/lib/typescript/src/mappings/NativeBase/Layout.d.ts +39 -0
- package/lib/typescript/src/mappings/NativeBase/Layout.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/mappings/NativeBase/Layout.js +16 -2
- package/src/mappings/NativeBase/Layout.ts +16 -1
- package/lib/commonjs/mappings/Container.js +0 -37
- package/lib/module/mappings/Container.js +0 -30
- package/lib/typescript/src/mappings/Container.d.ts +0 -55
- package/lib/typescript/src/mappings/Container.d.ts.map +0 -1
- package/src/mappings/Container.js +0 -30
- package/src/mappings/Container.ts +0 -41
|
@@ -14,7 +14,8 @@ 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
|
-
var
|
|
17
|
+
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); }
|
|
18
|
+
let Direction;
|
|
18
19
|
exports.Direction = Direction;
|
|
19
20
|
(function (Direction) {
|
|
20
21
|
Direction["Row"] = "row";
|
|
@@ -57,6 +58,7 @@ const CheckboxRow = _ref => {
|
|
|
57
58
|
setInternalValue(status);
|
|
58
59
|
}
|
|
59
60
|
}, [status]);
|
|
61
|
+
|
|
60
62
|
// This special logic is to handle weird APIs like Airtable that return
|
|
61
63
|
// true or undefined for a boolean
|
|
62
64
|
const previousDefaultValue = (0, _hooks.usePrevious)(defaultValue);
|
|
@@ -80,14 +82,13 @@ const CheckboxRow = _ref => {
|
|
|
80
82
|
textStyles,
|
|
81
83
|
viewStyles
|
|
82
84
|
} = (0, _utilities.extractStyles)(style);
|
|
83
|
-
return /*#__PURE__*/React.createElement(_reactNative.Pressable, {
|
|
85
|
+
return /*#__PURE__*/React.createElement(_reactNative.Pressable, _extends({
|
|
84
86
|
onPress: handlePress,
|
|
85
87
|
style: [viewStyles, styles.mainParent, {
|
|
86
88
|
flexDirection: direction
|
|
87
89
|
}],
|
|
88
|
-
disabled: disabled
|
|
89
|
-
|
|
90
|
-
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
90
|
+
disabled: disabled
|
|
91
|
+
}, rest), /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
91
92
|
style: [styles.label, {
|
|
92
93
|
alignItems: direction === Direction.Row ? "flex-start" : "flex-end"
|
|
93
94
|
}, labelContainerStyle]
|
|
@@ -124,22 +125,4 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
124
125
|
}
|
|
125
126
|
});
|
|
126
127
|
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;
|
|
145
128
|
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
|
+
var Direction;
|
|
10
10
|
exports.Direction = Direction;
|
|
11
11
|
(function (Direction) {
|
|
12
12
|
Direction["Horizontal"] = "horizontal";
|
|
@@ -10,6 +10,7 @@ var _theming = require("../../theming");
|
|
|
10
10
|
var _utilities = require("../../utilities");
|
|
11
11
|
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); }
|
|
12
12
|
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; }
|
|
13
|
+
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); }
|
|
13
14
|
const TabViewComponent = _ref => {
|
|
14
15
|
let {
|
|
15
16
|
Icon,
|
|
@@ -35,11 +36,13 @@ const TabViewComponent = _ref => {
|
|
|
35
36
|
textStyles,
|
|
36
37
|
viewStyles
|
|
37
38
|
} = (0, _utilities.extractStyles)(style);
|
|
39
|
+
|
|
38
40
|
//Check type of child using props
|
|
39
41
|
//Regular '.type' cannot work because Draftbit strips the type in Draft view
|
|
40
42
|
const instanceOfTabViewItemProps = object => {
|
|
41
43
|
return "title" in object;
|
|
42
44
|
};
|
|
45
|
+
|
|
43
46
|
//Populate routes and scenes based on children
|
|
44
47
|
React.useEffect(() => {
|
|
45
48
|
const newRoutes = [];
|
|
@@ -65,8 +68,7 @@ const TabViewComponent = _ref => {
|
|
|
65
68
|
}
|
|
66
69
|
};
|
|
67
70
|
const renderTabBar = props => {
|
|
68
|
-
return /*#__PURE__*/React.createElement(_reactNativeTabView.TabBar, {
|
|
69
|
-
...props,
|
|
71
|
+
return /*#__PURE__*/React.createElement(_reactNativeTabView.TabBar, _extends({}, props, {
|
|
70
72
|
activeColor: activeColor || theme.colors.primary,
|
|
71
73
|
inactiveColor: inactiveColor || theme.colors.divider,
|
|
72
74
|
pressColor: pressColor || theme.colors.primary,
|
|
@@ -80,7 +82,7 @@ const TabViewComponent = _ref => {
|
|
|
80
82
|
route,
|
|
81
83
|
color
|
|
82
84
|
} = _ref2;
|
|
83
|
-
return
|
|
85
|
+
return route !== null && route !== void 0 && route.icon ? /*#__PURE__*/React.createElement(Icon, {
|
|
84
86
|
name: route.icon,
|
|
85
87
|
color: color,
|
|
86
88
|
size: 16
|
|
@@ -89,8 +91,9 @@ const TabViewComponent = _ref => {
|
|
|
89
91
|
style: {
|
|
90
92
|
backgroundColor: tabsBackgroundColor || theme.colors.background
|
|
91
93
|
}
|
|
92
|
-
});
|
|
94
|
+
}));
|
|
93
95
|
};
|
|
96
|
+
|
|
94
97
|
//Cannot render TabView without at least one tab
|
|
95
98
|
if (!routes.length) {
|
|
96
99
|
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
@@ -110,13 +113,4 @@ const TabViewComponent = _ref => {
|
|
|
110
113
|
});
|
|
111
114
|
};
|
|
112
115
|
var _default = (0, _theming.withTheme)(TabViewComponent);
|
|
113
|
-
exports.default = _default; renderScene: (0, _reactNativeTabView.SceneMap)(tabScenes),
|
|
114
|
-
renderTabBar: renderTabBar,
|
|
115
|
-
onIndexChange: indexChangeHandler,
|
|
116
|
-
tabBarPosition: tabBarPosition,
|
|
117
|
-
keyboardDismissMode: keyboardDismissMode,
|
|
118
|
-
swipeEnabled: swipeEnabled
|
|
119
|
-
});
|
|
120
|
-
};
|
|
121
|
-
var _default = (0, _theming.withTheme)(TabViewComponent);
|
|
122
116
|
exports.default = _default;
|
|
@@ -12,4 +12,4 @@ const APPROX_STATUSBAR_HEIGHT = _reactNative.Platform.select({
|
|
|
12
12
|
android: DEFAULT_STATUSBAR_HEIGHT_EXPO,
|
|
13
13
|
ios: _reactNative.Platform.Version < 11 ? DEFAULT_STATUSBAR_HEIGHT_EXPO : 0
|
|
14
14
|
});
|
|
15
|
-
exports.APPROX_STATUSBAR_HEIGHT = APPROX_STATUSBAR_HEIGHT;
|
|
15
|
+
exports.APPROX_STATUSBAR_HEIGHT = APPROX_STATUSBAR_HEIGHT;AR_HEIGHT;
|
|
@@ -44,6 +44,13 @@ const SEED_DATA = [{
|
|
|
44
44
|
name: "Container",
|
|
45
45
|
tag: "Container",
|
|
46
46
|
description: "The Container restricts a content's width according to current breakpoint, while keeping the size fluid",
|
|
47
|
+
props: {
|
|
48
|
+
centerContent: (0, _types.createStaticBoolProp)({
|
|
49
|
+
label: "Center content",
|
|
50
|
+
description: "Center child elements based on their content width",
|
|
51
|
+
defaultValue: true
|
|
52
|
+
})
|
|
53
|
+
},
|
|
47
54
|
...SHARED_SEED_DATA
|
|
48
55
|
}, {
|
|
49
56
|
name: "Column",
|
|
@@ -65,8 +72,11 @@ const SEED_DATA = [{
|
|
|
65
72
|
name: "Spacer",
|
|
66
73
|
tag: "Spacer",
|
|
67
74
|
description: "An adjustable, empty space that can be used to tune the spacing between child elements within Flex",
|
|
75
|
+
layout: {
|
|
76
|
+
flex: 1
|
|
77
|
+
},
|
|
68
78
|
...SHARED_SEED_DATA,
|
|
69
|
-
stylesPanelSections:
|
|
79
|
+
stylesPanelSections: [_types.StylesPanelSections.LayoutSelectedItem, _types.StylesPanelSections.Background, _types.StylesPanelSections.Margins]
|
|
70
80
|
}, {
|
|
71
81
|
name: "Stack",
|
|
72
82
|
tag: "Stack",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { COMPONENT_TYPES, createTextEnumProp, createBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS, createStaticNumberProp, StylesPanelSections } from "@draftbit/types";
|
|
1
|
+
import { COMPONENT_TYPES, createTextEnumProp, createBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS, createStaticNumberProp, StylesPanelSections, createStaticBoolProp } from "@draftbit/types";
|
|
2
2
|
const SHARED_SEED_DATA = {
|
|
3
3
|
category: COMPONENT_TYPES.layout,
|
|
4
4
|
packageName: "native-base",
|
|
@@ -38,6 +38,13 @@ export const SEED_DATA = [{
|
|
|
38
38
|
name: "Container",
|
|
39
39
|
tag: "Container",
|
|
40
40
|
description: "The Container restricts a content's width according to current breakpoint, while keeping the size fluid",
|
|
41
|
+
props: {
|
|
42
|
+
centerContent: createStaticBoolProp({
|
|
43
|
+
label: "Center content",
|
|
44
|
+
description: "Center child elements based on their content width",
|
|
45
|
+
defaultValue: true
|
|
46
|
+
})
|
|
47
|
+
},
|
|
41
48
|
...SHARED_SEED_DATA
|
|
42
49
|
}, {
|
|
43
50
|
name: "Column",
|
|
@@ -59,8 +66,11 @@ export const SEED_DATA = [{
|
|
|
59
66
|
name: "Spacer",
|
|
60
67
|
tag: "Spacer",
|
|
61
68
|
description: "An adjustable, empty space that can be used to tune the spacing between child elements within Flex",
|
|
69
|
+
layout: {
|
|
70
|
+
flex: 1
|
|
71
|
+
},
|
|
62
72
|
...SHARED_SEED_DATA,
|
|
63
|
-
stylesPanelSections:
|
|
73
|
+
stylesPanelSections: [StylesPanelSections.LayoutSelectedItem, StylesPanelSections.Background, StylesPanelSections.Margins]
|
|
64
74
|
}, {
|
|
65
75
|
name: "Stack",
|
|
66
76
|
tag: "Stack",
|
|
@@ -11,6 +11,7 @@ export declare const SEED_DATA: ({
|
|
|
11
11
|
required: boolean;
|
|
12
12
|
step: number;
|
|
13
13
|
};
|
|
14
|
+
centerContent?: undefined;
|
|
14
15
|
direction?: undefined;
|
|
15
16
|
reversed?: undefined;
|
|
16
17
|
isDisabled?: undefined;
|
|
@@ -29,6 +30,30 @@ export declare const SEED_DATA: ({
|
|
|
29
30
|
name: string;
|
|
30
31
|
tag: string;
|
|
31
32
|
description: string;
|
|
33
|
+
} | {
|
|
34
|
+
category: string;
|
|
35
|
+
packageName: string;
|
|
36
|
+
stylesPanelSections: string[];
|
|
37
|
+
name: string;
|
|
38
|
+
tag: string;
|
|
39
|
+
description: string;
|
|
40
|
+
props: {
|
|
41
|
+
centerContent: {
|
|
42
|
+
label: string;
|
|
43
|
+
description: string;
|
|
44
|
+
formType: string;
|
|
45
|
+
propType: string;
|
|
46
|
+
defaultValue: boolean;
|
|
47
|
+
editable: boolean;
|
|
48
|
+
required: boolean;
|
|
49
|
+
group: string;
|
|
50
|
+
};
|
|
51
|
+
ratio?: undefined;
|
|
52
|
+
direction?: undefined;
|
|
53
|
+
reversed?: undefined;
|
|
54
|
+
isDisabled?: undefined;
|
|
55
|
+
isInvalid?: undefined;
|
|
56
|
+
};
|
|
32
57
|
} | {
|
|
33
58
|
category: string;
|
|
34
59
|
packageName: string;
|
|
@@ -38,6 +63,18 @@ export declare const SEED_DATA: ({
|
|
|
38
63
|
description: string;
|
|
39
64
|
layout: {
|
|
40
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;
|
|
41
78
|
};
|
|
42
79
|
} | {
|
|
43
80
|
props: {
|
|
@@ -83,6 +120,7 @@ export declare const SEED_DATA: ({
|
|
|
83
120
|
group: string;
|
|
84
121
|
};
|
|
85
122
|
ratio?: undefined;
|
|
123
|
+
centerContent?: undefined;
|
|
86
124
|
};
|
|
87
125
|
category: string;
|
|
88
126
|
packageName: string;
|
|
@@ -103,6 +141,7 @@ export declare const SEED_DATA: ({
|
|
|
103
141
|
group: string;
|
|
104
142
|
};
|
|
105
143
|
ratio?: undefined;
|
|
144
|
+
centerContent?: undefined;
|
|
106
145
|
direction?: undefined;
|
|
107
146
|
isDisabled?: undefined;
|
|
108
147
|
isInvalid?: undefined;
|
|
@@ -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":"AAuBA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA4HrB,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-7db6c9.2+7db6c9d",
|
|
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-7db6c9.2+7db6c9d",
|
|
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": "7db6c9d0f116844884dd0ca4c4473bca550920a3"
|
|
104
104
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { COMPONENT_TYPES, createTextEnumProp, createBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS, createStaticNumberProp, StylesPanelSections, } from "@draftbit/types";
|
|
1
|
+
import { COMPONENT_TYPES, createTextEnumProp, createBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS, createStaticNumberProp, StylesPanelSections, createStaticBoolProp, } from "@draftbit/types";
|
|
2
2
|
const SHARED_SEED_DATA = {
|
|
3
3
|
category: COMPONENT_TYPES.layout,
|
|
4
4
|
packageName: "native-base",
|
|
@@ -44,6 +44,13 @@ export const SEED_DATA = [
|
|
|
44
44
|
name: "Container",
|
|
45
45
|
tag: "Container",
|
|
46
46
|
description: "The Container restricts a content's width according to current breakpoint, while keeping the size fluid",
|
|
47
|
+
props: {
|
|
48
|
+
centerContent: createStaticBoolProp({
|
|
49
|
+
label: "Center content",
|
|
50
|
+
description: "Center child elements based on their content width",
|
|
51
|
+
defaultValue: true,
|
|
52
|
+
}),
|
|
53
|
+
},
|
|
47
54
|
...SHARED_SEED_DATA,
|
|
48
55
|
},
|
|
49
56
|
{
|
|
@@ -68,8 +75,15 @@ export const SEED_DATA = [
|
|
|
68
75
|
name: "Spacer",
|
|
69
76
|
tag: "Spacer",
|
|
70
77
|
description: "An adjustable, empty space that can be used to tune the spacing between child elements within Flex",
|
|
78
|
+
layout: {
|
|
79
|
+
flex: 1,
|
|
80
|
+
},
|
|
71
81
|
...SHARED_SEED_DATA,
|
|
72
|
-
stylesPanelSections:
|
|
82
|
+
stylesPanelSections: [
|
|
83
|
+
StylesPanelSections.LayoutSelectedItem,
|
|
84
|
+
StylesPanelSections.Background,
|
|
85
|
+
StylesPanelSections.Margins,
|
|
86
|
+
],
|
|
73
87
|
},
|
|
74
88
|
{
|
|
75
89
|
name: "Stack",
|
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
CONTAINER_COMPONENT_STYLES_SECTIONS,
|
|
6
6
|
createStaticNumberProp,
|
|
7
7
|
StylesPanelSections,
|
|
8
|
+
createStaticBoolProp,
|
|
8
9
|
} from "@draftbit/types";
|
|
9
10
|
|
|
10
11
|
const SHARED_SEED_DATA = {
|
|
@@ -63,6 +64,13 @@ export const SEED_DATA = [
|
|
|
63
64
|
tag: "Container",
|
|
64
65
|
description:
|
|
65
66
|
"The Container restricts a content's width according to current breakpoint, while keeping the size fluid",
|
|
67
|
+
props: {
|
|
68
|
+
centerContent: createStaticBoolProp({
|
|
69
|
+
label: "Center content",
|
|
70
|
+
description: "Center child elements based on their content width",
|
|
71
|
+
defaultValue: true,
|
|
72
|
+
}),
|
|
73
|
+
},
|
|
66
74
|
...SHARED_SEED_DATA,
|
|
67
75
|
},
|
|
68
76
|
{
|
|
@@ -88,8 +96,15 @@ export const SEED_DATA = [
|
|
|
88
96
|
tag: "Spacer",
|
|
89
97
|
description:
|
|
90
98
|
"An adjustable, empty space that can be used to tune the spacing between child elements within Flex",
|
|
99
|
+
layout: {
|
|
100
|
+
flex: 1,
|
|
101
|
+
},
|
|
91
102
|
...SHARED_SEED_DATA,
|
|
92
|
-
stylesPanelSections:
|
|
103
|
+
stylesPanelSections: [
|
|
104
|
+
StylesPanelSections.LayoutSelectedItem,
|
|
105
|
+
StylesPanelSections.Background,
|
|
106
|
+
StylesPanelSections.Margins,
|
|
107
|
+
],
|
|
93
108
|
},
|
|
94
109
|
{
|
|
95
110
|
name: "Stack",
|
|
@@ -1,37 +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 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;
|
|
@@ -1,30 +0,0 @@
|
|
|
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,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,30 +0,0 @@
|
|
|
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,41 +0,0 @@
|
|
|
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
|
-
};
|