@draftbit/core 47.0.0-0362d7.2 → 47.0.0-06ea46.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/Banner.js +168 -0
- package/lib/commonjs/components/Banner.js.map +1 -0
- package/lib/commonjs/components/FormRow.js +3 -17
- package/lib/commonjs/components/FormRow.js.map +1 -1
- package/lib/commonjs/components/Picker/Picker.js +2 -2
- package/lib/commonjs/components/Picker/Picker.js.map +1 -1
- package/lib/commonjs/components/Picker/PickerComponent.ios.js +11 -30
- package/lib/commonjs/components/Picker/PickerComponent.ios.js.map +1 -1
- package/lib/commonjs/components/Portal/PortalHost.js +15 -45
- package/lib/commonjs/components/Portal/PortalHost.js.map +1 -1
- package/lib/commonjs/components/RadioButton/RadioButton.js +3 -14
- package/lib/commonjs/components/RadioButton/RadioButton.js.map +1 -1
- package/lib/commonjs/components/Surface.js +2 -13
- package/lib/commonjs/components/Surface.js.map +1 -1
- package/lib/commonjs/index.js +14 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/mappings/NativeBase/Layout/AspectRatio.js +17 -0
- package/lib/commonjs/mappings/NativeBase/Layout/AspectRatio.js.map +1 -0
- package/lib/commonjs/mappings/NativeBase/Layout/Box.js +17 -0
- package/lib/commonjs/mappings/NativeBase/Layout/Box.js.map +1 -0
- package/lib/commonjs/mappings/NativeBase/Layout/Center.js +31 -0
- package/lib/commonjs/mappings/NativeBase/Layout/Center.js.map +1 -0
- package/lib/commonjs/mappings/NativeBase/Layout/Column.js +17 -0
- package/lib/commonjs/mappings/NativeBase/Layout/Column.js.map +1 -0
- package/lib/commonjs/mappings/NativeBase/Layout/Container.js +17 -0
- package/lib/commonjs/mappings/NativeBase/Layout/Container.js.map +1 -0
- package/lib/commonjs/mappings/NativeBase/Layout/Row.js +17 -0
- package/lib/commonjs/mappings/NativeBase/Layout/Row.js.map +1 -0
- package/lib/commonjs/mappings/NativeBase/Layout/Stack.js +17 -0
- package/lib/commonjs/mappings/NativeBase/Layout/Stack.js.map +1 -0
- package/lib/commonjs/mappings/NativeBase/Layout/ZStack.js +17 -0
- package/lib/commonjs/mappings/NativeBase/Layout/ZStack.js.map +1 -0
- package/lib/commonjs/mappings/WebView.js.map +1 -1
- package/lib/module/components/Accordion/AccordionItem.js +4 -23
- package/lib/module/components/Accordion/AccordionItem.js.map +1 -1
- package/lib/module/components/Banner.js +158 -0
- package/lib/module/components/Banner.js.map +1 -0
- package/lib/module/components/Picker/Picker.js +1 -1
- package/lib/module/components/Picker/Picker.js.map +1 -1
- package/lib/module/index.js +3 -10
- package/lib/module/index.js.map +1 -1
- package/lib/module/mappings/ActionSheet.js.map +1 -1
- package/lib/module/mappings/CheckboxGroup.js.map +1 -1
- package/lib/module/mappings/MapCallout.js.map +1 -1
- package/lib/module/mappings/NativeBase/Layout/AspectRatio.js +10 -0
- package/lib/module/mappings/NativeBase/Layout/AspectRatio.js.map +1 -0
- package/lib/module/mappings/NativeBase/Layout/Box.js +10 -0
- package/lib/module/mappings/NativeBase/Layout/Box.js.map +1 -0
- package/lib/module/mappings/NativeBase/Layout/Center.js +24 -0
- package/lib/module/mappings/NativeBase/Layout/Center.js.map +1 -0
- package/lib/module/mappings/NativeBase/Layout/Column.js +10 -0
- package/lib/module/mappings/NativeBase/Layout/Column.js.map +1 -0
- package/lib/module/mappings/NativeBase/Layout/Container.js +10 -0
- package/lib/module/mappings/NativeBase/Layout/Container.js.map +1 -0
- package/lib/module/mappings/NativeBase/Layout/Row.js +10 -0
- package/lib/module/mappings/NativeBase/Layout/Row.js.map +1 -0
- package/lib/module/mappings/NativeBase/Layout/Stack.js +10 -0
- package/lib/module/mappings/NativeBase/Layout/Stack.js.map +1 -0
- package/lib/module/mappings/NativeBase/Layout/ZStack.js +10 -0
- package/lib/module/mappings/NativeBase/Layout/ZStack.js.map +1 -0
- package/lib/typescript/src/components/Banner.d.ts +23 -0
- package/lib/typescript/src/components/Banner.d.ts.map +1 -0
- package/lib/typescript/src/components/Picker/Picker.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +2 -0
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/mappings/NativeBase/Layout/AspectRatio.d.ts +9 -0
- package/lib/typescript/src/mappings/NativeBase/Layout/AspectRatio.d.ts.map +1 -0
- package/lib/typescript/src/mappings/NativeBase/Layout/Box.d.ts +9 -0
- package/lib/typescript/src/mappings/NativeBase/Layout/Box.d.ts.map +1 -0
- package/lib/typescript/src/mappings/NativeBase/Layout/Center.d.ts +9 -0
- package/lib/typescript/src/mappings/NativeBase/Layout/Center.d.ts.map +1 -0
- package/lib/typescript/src/mappings/NativeBase/Layout/Column.d.ts +9 -0
- package/lib/typescript/src/mappings/NativeBase/Layout/Column.d.ts.map +1 -0
- package/lib/typescript/src/mappings/NativeBase/Layout/Container.d.ts +9 -0
- package/lib/typescript/src/mappings/NativeBase/Layout/Container.d.ts.map +1 -0
- package/lib/typescript/src/mappings/NativeBase/Layout/Row.d.ts +9 -0
- package/lib/typescript/src/mappings/NativeBase/Layout/Row.d.ts.map +1 -0
- package/lib/typescript/src/mappings/NativeBase/Layout/Stack.d.ts +9 -0
- package/lib/typescript/src/mappings/NativeBase/Layout/Stack.d.ts.map +1 -0
- package/lib/typescript/src/mappings/NativeBase/Layout/ZStack.d.ts +9 -0
- package/lib/typescript/src/mappings/NativeBase/Layout/ZStack.d.ts.map +1 -0
- package/package.json +3 -3
- package/src/components/Banner.js +109 -0
- package/src/components/Banner.tsx +204 -0
- package/src/components/Picker/Picker.js +1 -1
- package/src/components/Picker/Picker.tsx +2 -2
- package/src/index.js +2 -0
- package/src/index.tsx +2 -0
- package/src/mappings/NativeBase/Layout/AspectRatio.js +9 -0
- package/src/mappings/NativeBase/Layout/AspectRatio.ts +11 -0
- package/src/mappings/NativeBase/Layout/Box.js +9 -0
- package/src/mappings/NativeBase/Layout/Box.ts +11 -0
- package/src/mappings/NativeBase/Layout/Center.js +27 -0
- package/src/mappings/NativeBase/Layout/Center.ts +28 -0
- package/src/mappings/NativeBase/Layout/Column.js +9 -0
- package/src/mappings/NativeBase/Layout/Column.ts +10 -0
- package/src/mappings/NativeBase/Layout/Container.js +9 -0
- package/src/mappings/NativeBase/Layout/Container.ts +11 -0
- package/src/mappings/NativeBase/Layout/Row.js +9 -0
- package/src/mappings/NativeBase/Layout/Row.ts +10 -0
- package/src/mappings/NativeBase/Layout/Stack.js +9 -0
- package/src/mappings/NativeBase/Layout/Stack.ts +11 -0
- package/src/mappings/NativeBase/Layout/ZStack.js +9 -0
- package/src/mappings/NativeBase/Layout/ZStack.ts +10 -0
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import {
|
|
3
|
+
Button,
|
|
4
|
+
Text,
|
|
5
|
+
View,
|
|
6
|
+
ViewStyle,
|
|
7
|
+
StyleSheet,
|
|
8
|
+
StyleProp,
|
|
9
|
+
Animated,
|
|
10
|
+
} from "react-native";
|
|
11
|
+
import Surface from "./Surface";
|
|
12
|
+
import type { IconSlot } from "../interfaces/Icon";
|
|
13
|
+
import shadow from "../styles/shadow";
|
|
14
|
+
import { withTheme } from "../theming";
|
|
15
|
+
import type { Theme } from "../styles/DefaultTheme";
|
|
16
|
+
|
|
17
|
+
const ELEVATION = 1;
|
|
18
|
+
const DEFAULT_MAX_WIDTH = 960;
|
|
19
|
+
|
|
20
|
+
type Props = {
|
|
21
|
+
initiallyVisible: boolean;
|
|
22
|
+
dismissable: boolean;
|
|
23
|
+
buttonColor?: string;
|
|
24
|
+
icon?: string;
|
|
25
|
+
content?: string;
|
|
26
|
+
contentStyle?: StyleProp<ViewStyle>;
|
|
27
|
+
style?: StyleProp<ViewStyle>;
|
|
28
|
+
ref?: React.RefObject<View>;
|
|
29
|
+
/**
|
|
30
|
+
* @optional
|
|
31
|
+
*/
|
|
32
|
+
theme: Theme;
|
|
33
|
+
} & IconSlot;
|
|
34
|
+
|
|
35
|
+
type NativeEvent = {
|
|
36
|
+
nativeEvent: {
|
|
37
|
+
layout: {
|
|
38
|
+
x: number;
|
|
39
|
+
y: number;
|
|
40
|
+
width: number;
|
|
41
|
+
height: number;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
const Banner: React.FC<React.PropsWithChildren<Props>> = ({
|
|
47
|
+
initiallyVisible = true,
|
|
48
|
+
dismissable = true,
|
|
49
|
+
icon,
|
|
50
|
+
buttonColor,
|
|
51
|
+
content,
|
|
52
|
+
contentStyle,
|
|
53
|
+
style,
|
|
54
|
+
theme,
|
|
55
|
+
Icon,
|
|
56
|
+
...rest
|
|
57
|
+
}) => {
|
|
58
|
+
const [visible, setVisible] = React.useState(initiallyVisible);
|
|
59
|
+
|
|
60
|
+
React.useEffect(() => {
|
|
61
|
+
if (initiallyVisible) {
|
|
62
|
+
setVisible(true);
|
|
63
|
+
}
|
|
64
|
+
}, [initiallyVisible]);
|
|
65
|
+
|
|
66
|
+
const { current: position } = React.useRef<Animated.Value>(
|
|
67
|
+
new Animated.Value(visible ? 1 : 0)
|
|
68
|
+
);
|
|
69
|
+
const [layout, setLayout] = React.useState<{
|
|
70
|
+
height: number;
|
|
71
|
+
measured: boolean;
|
|
72
|
+
}>({
|
|
73
|
+
height: 0,
|
|
74
|
+
measured: false,
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
React.useEffect(() => {
|
|
78
|
+
if (visible) {
|
|
79
|
+
// show
|
|
80
|
+
Animated.timing(position, {
|
|
81
|
+
duration: 250,
|
|
82
|
+
toValue: 1,
|
|
83
|
+
useNativeDriver: false,
|
|
84
|
+
}).start();
|
|
85
|
+
} else {
|
|
86
|
+
// hide
|
|
87
|
+
Animated.timing(position, {
|
|
88
|
+
duration: 200,
|
|
89
|
+
toValue: 0,
|
|
90
|
+
useNativeDriver: false,
|
|
91
|
+
}).start();
|
|
92
|
+
}
|
|
93
|
+
}, [visible, position]);
|
|
94
|
+
|
|
95
|
+
const handleLayout = ({ nativeEvent }: NativeEvent) => {
|
|
96
|
+
const { height } = nativeEvent.layout;
|
|
97
|
+
setLayout({ height, measured: true });
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
// The banner animation has 2 parts:
|
|
101
|
+
// 1. Blank spacer element which animates its height to move the content
|
|
102
|
+
// 2. Actual banner which animates its translateY
|
|
103
|
+
// In initial render, we position everything normally and measure the height of the banner
|
|
104
|
+
// Once we have the height, we apply the height to the spacer and switch the banner to position: absolute
|
|
105
|
+
// We need this because we need to move the content below as if banner's height was being animated
|
|
106
|
+
// However we can't animated banner's height directly as it'll also resize the content inside
|
|
107
|
+
const height = Animated.multiply(position, layout.height);
|
|
108
|
+
|
|
109
|
+
const translateY = Animated.multiply(
|
|
110
|
+
Animated.add(position, -1),
|
|
111
|
+
layout.height
|
|
112
|
+
);
|
|
113
|
+
|
|
114
|
+
return (
|
|
115
|
+
<Surface
|
|
116
|
+
{...rest}
|
|
117
|
+
style={[styles.container, shadow(ELEVATION) as ViewStyle, style]}
|
|
118
|
+
>
|
|
119
|
+
<View style={[styles.wrapper, contentStyle]}>
|
|
120
|
+
<Animated.View style={{ height }} />
|
|
121
|
+
<Animated.View
|
|
122
|
+
onLayout={handleLayout}
|
|
123
|
+
style={[
|
|
124
|
+
layout.measured || !visible
|
|
125
|
+
? // If we have measured banner's height or it's invisible,
|
|
126
|
+
// Position it absolutely, the layout will be taken care of the spacer
|
|
127
|
+
[styles.absolute, { transform: [{ translateY }] }]
|
|
128
|
+
: // Otherwise position it normally
|
|
129
|
+
null,
|
|
130
|
+
!layout.measured && !visible
|
|
131
|
+
? // If we haven't measured banner's height yet and it's invisible,
|
|
132
|
+
// hide it with opacity: 0 so user doesn't see it
|
|
133
|
+
{ opacity: 0 }
|
|
134
|
+
: null,
|
|
135
|
+
]}
|
|
136
|
+
>
|
|
137
|
+
<View
|
|
138
|
+
style={[styles.content, { marginBottom: dismissable ? 0 : 16 }]}
|
|
139
|
+
>
|
|
140
|
+
{icon ? (
|
|
141
|
+
<View style={styles.icon}>
|
|
142
|
+
<Icon name={icon} size={40} />
|
|
143
|
+
</View>
|
|
144
|
+
) : null}
|
|
145
|
+
<Text
|
|
146
|
+
style={[styles.message, { color: theme.colors.text }]}
|
|
147
|
+
accessibilityLiveRegion={visible ? "polite" : "none"}
|
|
148
|
+
accessibilityRole="alert"
|
|
149
|
+
>
|
|
150
|
+
{content}
|
|
151
|
+
</Text>
|
|
152
|
+
</View>
|
|
153
|
+
{dismissable ? (
|
|
154
|
+
<View style={styles.actions}>
|
|
155
|
+
<Button
|
|
156
|
+
color={buttonColor || theme.colors.primary}
|
|
157
|
+
title="Close"
|
|
158
|
+
onPress={() => setVisible(false)}
|
|
159
|
+
/>
|
|
160
|
+
</View>
|
|
161
|
+
) : null}
|
|
162
|
+
</Animated.View>
|
|
163
|
+
</View>
|
|
164
|
+
</Surface>
|
|
165
|
+
);
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
const styles = StyleSheet.create({
|
|
169
|
+
container: {
|
|
170
|
+
elevation: ELEVATION,
|
|
171
|
+
},
|
|
172
|
+
wrapper: {
|
|
173
|
+
overflow: "hidden",
|
|
174
|
+
alignSelf: "center",
|
|
175
|
+
width: "100%",
|
|
176
|
+
maxWidth: DEFAULT_MAX_WIDTH,
|
|
177
|
+
},
|
|
178
|
+
absolute: {
|
|
179
|
+
position: "absolute",
|
|
180
|
+
top: 0,
|
|
181
|
+
width: "100%",
|
|
182
|
+
},
|
|
183
|
+
content: {
|
|
184
|
+
flexDirection: "row",
|
|
185
|
+
justifyContent: "flex-start",
|
|
186
|
+
marginHorizontal: 8,
|
|
187
|
+
marginTop: 16,
|
|
188
|
+
marginBottom: 0,
|
|
189
|
+
},
|
|
190
|
+
icon: {
|
|
191
|
+
margin: 8,
|
|
192
|
+
},
|
|
193
|
+
message: {
|
|
194
|
+
flex: 1,
|
|
195
|
+
margin: 8,
|
|
196
|
+
},
|
|
197
|
+
actions: {
|
|
198
|
+
flexDirection: "row",
|
|
199
|
+
justifyContent: "flex-end",
|
|
200
|
+
margin: 8,
|
|
201
|
+
},
|
|
202
|
+
});
|
|
203
|
+
|
|
204
|
+
export default withTheme(Banner);
|
|
@@ -194,7 +194,6 @@ const Picker = ({ error, options = [], onValueChange, defaultValue, Icon, style,
|
|
|
194
194
|
React.createElement(NativePicker, { style: styles.iosNativePicker, selectedValue: internalValue, onValueChange: handleValueChange }, pickerOptions.map((option) => (React.createElement(NativePicker.Item, { label: option.label, value: option.value, key: option.value })))))))) : null,
|
|
195
195
|
!isIos && pickerVisible ? (React.createElement(NativePicker, { enabled: pickerVisible, selectedValue: internalValue, onValueChange: handleValueChange, style: styles.nonIosPicker, ref: androidPickerRef, onBlur: () => setPickerVisible(false) }, pickerOptions.map((option) => (React.createElement(NativePicker.Item, { label: option.label, value: option.value, key: option.value }))))) : null));
|
|
196
196
|
};
|
|
197
|
-
export default withTheme(Picker);
|
|
198
197
|
const styles = StyleSheet.create({
|
|
199
198
|
marginsContainer: {
|
|
200
199
|
alignSelf: "stretch",
|
|
@@ -265,3 +264,4 @@ const styles = StyleSheet.create({
|
|
|
265
264
|
maxHeight: deviceHeight,
|
|
266
265
|
},
|
|
267
266
|
});
|
|
267
|
+
export default withTheme(Picker);
|
|
@@ -406,8 +406,6 @@ const Picker: React.FC<PickerProps> = ({
|
|
|
406
406
|
);
|
|
407
407
|
};
|
|
408
408
|
|
|
409
|
-
export default withTheme(Picker);
|
|
410
|
-
|
|
411
409
|
const styles = StyleSheet.create({
|
|
412
410
|
marginsContainer: {
|
|
413
411
|
alignSelf: "stretch",
|
|
@@ -478,3 +476,5 @@ const styles = StyleSheet.create({
|
|
|
478
476
|
maxHeight: deviceHeight,
|
|
479
477
|
},
|
|
480
478
|
});
|
|
479
|
+
|
|
480
|
+
export default withTheme(Picker);
|
package/src/index.js
CHANGED
|
@@ -4,6 +4,7 @@ export { default as Provider } from "./Provider";
|
|
|
4
4
|
export { default as DefaultTheme } from "./styles/DefaultTheme";
|
|
5
5
|
// BASIC
|
|
6
6
|
export { default as ScreenContainer } from "./components/ScreenContainer";
|
|
7
|
+
export { default as Banner } from "./components/Banner";
|
|
7
8
|
// BUTTONS
|
|
8
9
|
export { Button } from "./components/Button";
|
|
9
10
|
export { Link } from "./components/Text";
|
|
@@ -29,5 +30,6 @@ export { Center, Circle, Square, Row, Stack, Spacer, } from "./components/Layout
|
|
|
29
30
|
export { Swiper, SwiperItem } from "./components/Swiper";
|
|
30
31
|
// CONTAINERS
|
|
31
32
|
export { AccordionGroup, AccordionItem } from "./components/Accordion";
|
|
33
|
+
export { default as Surface } from "./components/Surface";
|
|
32
34
|
// ACTIONSHEET
|
|
33
35
|
export { ActionSheet, ActionSheetItem, ActionSheetCancel, } from "./components/ActionSheet";
|
package/src/index.tsx
CHANGED
|
@@ -5,6 +5,7 @@ export { default as DefaultTheme } from "./styles/DefaultTheme";
|
|
|
5
5
|
|
|
6
6
|
// BASIC
|
|
7
7
|
export { default as ScreenContainer } from "./components/ScreenContainer";
|
|
8
|
+
export { default as Banner } from "./components/Banner";
|
|
8
9
|
|
|
9
10
|
// BUTTONS
|
|
10
11
|
export { Button } from "./components/Button";
|
|
@@ -49,6 +50,7 @@ export { Swiper, SwiperItem } from "./components/Swiper";
|
|
|
49
50
|
|
|
50
51
|
// CONTAINERS
|
|
51
52
|
export { AccordionGroup, AccordionItem } from "./components/Accordion";
|
|
53
|
+
export { default as Surface } from "./components/Surface";
|
|
52
54
|
|
|
53
55
|
// ACTIONSHEET
|
|
54
56
|
export {
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { COMPONENT_TYPES, NB_LAYOUT_STYLES_SECTIONS } from "@draftbit/types";
|
|
2
|
+
export const SEED_DATA = {
|
|
3
|
+
name: "Aspect Ratio",
|
|
4
|
+
tag: "AspectRatio",
|
|
5
|
+
description: "AspectRatio controls the size of the undefined dimension of a node or child component.",
|
|
6
|
+
category: COMPONENT_TYPES.NBLayout,
|
|
7
|
+
stylesPanelSections: NB_LAYOUT_STYLES_SECTIONS,
|
|
8
|
+
packageName: "native-base",
|
|
9
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { COMPONENT_TYPES, NB_LAYOUT_STYLES_SECTIONS } from "@draftbit/types";
|
|
2
|
+
|
|
3
|
+
export const SEED_DATA = {
|
|
4
|
+
name: "Aspect Ratio",
|
|
5
|
+
tag: "AspectRatio",
|
|
6
|
+
description:
|
|
7
|
+
"AspectRatio controls the size of the undefined dimension of a node or child component.",
|
|
8
|
+
category: COMPONENT_TYPES.NBLayout,
|
|
9
|
+
stylesPanelSections: NB_LAYOUT_STYLES_SECTIONS,
|
|
10
|
+
packageName: "native-base",
|
|
11
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { COMPONENT_TYPES, NB_LAYOUT_STYLES_SECTIONS } from "@draftbit/types";
|
|
2
|
+
export const SEED_DATA = {
|
|
3
|
+
name: "Box",
|
|
4
|
+
tag: "Box",
|
|
5
|
+
description: "This is a generic component for low level layout needs. It is similar to a div in HTML",
|
|
6
|
+
category: COMPONENT_TYPES.NBLayout,
|
|
7
|
+
stylesPanelSections: NB_LAYOUT_STYLES_SECTIONS,
|
|
8
|
+
packageName: "native-base",
|
|
9
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { COMPONENT_TYPES, NB_LAYOUT_STYLES_SECTIONS } from "@draftbit/types";
|
|
2
|
+
|
|
3
|
+
export const SEED_DATA = {
|
|
4
|
+
name: "Box",
|
|
5
|
+
tag: "Box",
|
|
6
|
+
description:
|
|
7
|
+
"This is a generic component for low level layout needs. It is similar to a div in HTML",
|
|
8
|
+
category: COMPONENT_TYPES.NBLayout,
|
|
9
|
+
stylesPanelSections: NB_LAYOUT_STYLES_SECTIONS,
|
|
10
|
+
packageName: "native-base",
|
|
11
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { COMPONENT_TYPES, NB_LAYOUT_STYLES_SECTIONS } from "@draftbit/types";
|
|
2
|
+
export const SEED_DATA = [
|
|
3
|
+
{
|
|
4
|
+
name: "Center",
|
|
5
|
+
tag: "Center",
|
|
6
|
+
description: "Centers its child",
|
|
7
|
+
category: COMPONENT_TYPES.NBLayout,
|
|
8
|
+
stylesPanelSections: NB_LAYOUT_STYLES_SECTIONS,
|
|
9
|
+
packageName: "native-base",
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
name: "Square",
|
|
13
|
+
tag: "Square",
|
|
14
|
+
description: "Centers its child inside a square",
|
|
15
|
+
category: COMPONENT_TYPES.NBLayout,
|
|
16
|
+
stylesPanelSections: NB_LAYOUT_STYLES_SECTIONS,
|
|
17
|
+
packageName: "native-base",
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
name: "Circle",
|
|
21
|
+
tag: "Circle",
|
|
22
|
+
description: "Centers its child inside a circle",
|
|
23
|
+
category: COMPONENT_TYPES.NBLayout,
|
|
24
|
+
stylesPanelSections: NB_LAYOUT_STYLES_SECTIONS,
|
|
25
|
+
packageName: "native-base",
|
|
26
|
+
},
|
|
27
|
+
];
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { COMPONENT_TYPES, NB_LAYOUT_STYLES_SECTIONS } from "@draftbit/types";
|
|
2
|
+
|
|
3
|
+
export const SEED_DATA = [
|
|
4
|
+
{
|
|
5
|
+
name: "Center",
|
|
6
|
+
tag: "Center",
|
|
7
|
+
description: "Centers its child",
|
|
8
|
+
category: COMPONENT_TYPES.NBLayout,
|
|
9
|
+
stylesPanelSections: NB_LAYOUT_STYLES_SECTIONS,
|
|
10
|
+
packageName: "native-base",
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
name: "Square",
|
|
14
|
+
tag: "Square",
|
|
15
|
+
description: "Centers its child inside a square",
|
|
16
|
+
category: COMPONENT_TYPES.NBLayout,
|
|
17
|
+
stylesPanelSections: NB_LAYOUT_STYLES_SECTIONS,
|
|
18
|
+
packageName: "native-base",
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
name: "Circle",
|
|
22
|
+
tag: "Circle",
|
|
23
|
+
description: "Centers its child inside a circle",
|
|
24
|
+
category: COMPONENT_TYPES.NBLayout,
|
|
25
|
+
stylesPanelSections: NB_LAYOUT_STYLES_SECTIONS,
|
|
26
|
+
packageName: "native-base",
|
|
27
|
+
},
|
|
28
|
+
];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { COMPONENT_TYPES, NB_LAYOUT_STYLES_SECTIONS } from "@draftbit/types";
|
|
2
|
+
export const SEED_DATA = {
|
|
3
|
+
name: "Column",
|
|
4
|
+
tag: "VStack",
|
|
5
|
+
description: "Column aligns items vertically",
|
|
6
|
+
category: COMPONENT_TYPES.NBLayout,
|
|
7
|
+
stylesPanelSections: NB_LAYOUT_STYLES_SECTIONS,
|
|
8
|
+
packageName: "native-base",
|
|
9
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { COMPONENT_TYPES, NB_LAYOUT_STYLES_SECTIONS } from "@draftbit/types";
|
|
2
|
+
|
|
3
|
+
export const SEED_DATA = {
|
|
4
|
+
name: "Column",
|
|
5
|
+
tag: "VStack",
|
|
6
|
+
description: "Column aligns items vertically",
|
|
7
|
+
category: COMPONENT_TYPES.NBLayout,
|
|
8
|
+
stylesPanelSections: NB_LAYOUT_STYLES_SECTIONS,
|
|
9
|
+
packageName: "native-base",
|
|
10
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { COMPONENT_TYPES, NB_LAYOUT_STYLES_SECTIONS } from "@draftbit/types";
|
|
2
|
+
export const SEED_DATA = {
|
|
3
|
+
name: "Container",
|
|
4
|
+
tag: "Container",
|
|
5
|
+
description: "The Container restricts a content's width according to current breakpoint, while keeping the size fluid.",
|
|
6
|
+
category: COMPONENT_TYPES.NBLayout,
|
|
7
|
+
stylesPanelSections: NB_LAYOUT_STYLES_SECTIONS,
|
|
8
|
+
packageName: "native-base",
|
|
9
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { COMPONENT_TYPES, NB_LAYOUT_STYLES_SECTIONS } from "@draftbit/types";
|
|
2
|
+
|
|
3
|
+
export const SEED_DATA = {
|
|
4
|
+
name: "Container",
|
|
5
|
+
tag: "Container",
|
|
6
|
+
description:
|
|
7
|
+
"The Container restricts a content's width according to current breakpoint, while keeping the size fluid.",
|
|
8
|
+
category: COMPONENT_TYPES.NBLayout,
|
|
9
|
+
stylesPanelSections: NB_LAYOUT_STYLES_SECTIONS,
|
|
10
|
+
packageName: "native-base",
|
|
11
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { COMPONENT_TYPES, NB_LAYOUT_STYLES_SECTIONS } from "@draftbit/types";
|
|
2
|
+
export const SEED_DATA = {
|
|
3
|
+
name: "Row",
|
|
4
|
+
tag: "HStack",
|
|
5
|
+
description: "Column aligns items horizontally",
|
|
6
|
+
category: COMPONENT_TYPES.NBLayout,
|
|
7
|
+
stylesPanelSections: NB_LAYOUT_STYLES_SECTIONS,
|
|
8
|
+
packageName: "native-base",
|
|
9
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { COMPONENT_TYPES, NB_LAYOUT_STYLES_SECTIONS } from "@draftbit/types";
|
|
2
|
+
|
|
3
|
+
export const SEED_DATA = {
|
|
4
|
+
name: "Row",
|
|
5
|
+
tag: "HStack",
|
|
6
|
+
description: "Column aligns items horizontally",
|
|
7
|
+
category: COMPONENT_TYPES.NBLayout,
|
|
8
|
+
stylesPanelSections: NB_LAYOUT_STYLES_SECTIONS,
|
|
9
|
+
packageName: "native-base",
|
|
10
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { COMPONENT_TYPES, NB_LAYOUT_STYLES_SECTIONS } from "@draftbit/types";
|
|
2
|
+
export const SEED_DATA = {
|
|
3
|
+
name: "Stack",
|
|
4
|
+
tag: "Stack",
|
|
5
|
+
description: "Stack aligns items vertically or horizontally based on the direction prop.",
|
|
6
|
+
category: COMPONENT_TYPES.NBLayout,
|
|
7
|
+
stylesPanelSections: NB_LAYOUT_STYLES_SECTIONS,
|
|
8
|
+
packageName: "native-base",
|
|
9
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { COMPONENT_TYPES, NB_LAYOUT_STYLES_SECTIONS } from "@draftbit/types";
|
|
2
|
+
|
|
3
|
+
export const SEED_DATA = {
|
|
4
|
+
name: "Stack",
|
|
5
|
+
tag: "Stack",
|
|
6
|
+
description:
|
|
7
|
+
"Stack aligns items vertically or horizontally based on the direction prop.",
|
|
8
|
+
category: COMPONENT_TYPES.NBLayout,
|
|
9
|
+
stylesPanelSections: NB_LAYOUT_STYLES_SECTIONS,
|
|
10
|
+
packageName: "native-base",
|
|
11
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { COMPONENT_TYPES, NB_LAYOUT_STYLES_SECTIONS } from "@draftbit/types";
|
|
2
|
+
export const SEED_DATA = {
|
|
3
|
+
name: "Row",
|
|
4
|
+
tag: "HStack",
|
|
5
|
+
description: "Column aligns items horizontally",
|
|
6
|
+
category: COMPONENT_TYPES.NBLayout,
|
|
7
|
+
stylesPanelSections: NB_LAYOUT_STYLES_SECTIONS,
|
|
8
|
+
packageName: "native-base",
|
|
9
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { COMPONENT_TYPES, NB_LAYOUT_STYLES_SECTIONS } from "@draftbit/types";
|
|
2
|
+
|
|
3
|
+
export const SEED_DATA = {
|
|
4
|
+
name: "Row",
|
|
5
|
+
tag: "HStack",
|
|
6
|
+
description: "Column aligns items horizontally",
|
|
7
|
+
category: COMPONENT_TYPES.NBLayout,
|
|
8
|
+
stylesPanelSections: NB_LAYOUT_STYLES_SECTIONS,
|
|
9
|
+
packageName: "native-base",
|
|
10
|
+
};
|