@draftbit/core 46.8.2-2fe7f4.2 → 46.8.2-387722.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.
Files changed (56) hide show
  1. package/lib/commonjs/components/Accordion/AccordionItem.js +4 -23
  2. package/lib/commonjs/components/Markdown.js +30 -0
  3. package/lib/commonjs/index.js +7 -13
  4. package/lib/commonjs/mappings/FlashList.js +2 -8
  5. package/lib/commonjs/mappings/Markdown.js +27 -0
  6. package/lib/module/components/AspectRatio.js +18 -1
  7. package/lib/module/components/Markdown.js +20 -0
  8. package/lib/module/index.js +1 -1
  9. package/lib/module/mappings/FlashList.js +3 -9
  10. package/lib/module/mappings/Markdown.js +20 -0
  11. package/lib/typescript/src/components/Markdown.d.ts +8 -0
  12. package/lib/typescript/src/components/Markdown.d.ts.map +1 -0
  13. package/lib/typescript/src/index.d.ts +1 -1
  14. package/lib/typescript/src/index.d.ts.map +1 -1
  15. package/lib/typescript/src/mappings/FlashList.d.ts +0 -6
  16. package/lib/typescript/src/mappings/FlashList.d.ts.map +1 -1
  17. package/lib/typescript/src/mappings/{TabViewItem.d.ts → Markdown.d.ts} +5 -10
  18. package/lib/typescript/src/mappings/Markdown.d.ts.map +1 -0
  19. package/package.json +4 -5
  20. package/src/components/Markdown.js +10 -0
  21. package/src/components/Markdown.tsx +22 -0
  22. package/src/index.js +1 -1
  23. package/src/index.tsx +1 -1
  24. package/src/mappings/FlashList.js +9 -9
  25. package/src/mappings/FlashList.ts +9 -9
  26. package/src/mappings/Markdown.js +25 -0
  27. package/src/mappings/Markdown.ts +32 -0
  28. package/lib/commonjs/components/TabView/TabView.js +0 -132
  29. package/lib/commonjs/components/TabView/TabViewItem.js +0 -25
  30. package/lib/commonjs/components/TabView/index.js +0 -20
  31. package/lib/commonjs/mappings/TabView.js +0 -77
  32. package/lib/commonjs/mappings/TabViewItem.js +0 -37
  33. package/lib/module/components/TabView/TabView.js +0 -123
  34. package/lib/module/components/TabView/TabViewItem.js +0 -20
  35. package/lib/module/components/TabView/index.js +0 -2
  36. package/lib/module/mappings/TabView.js +0 -70
  37. package/lib/module/mappings/TabViewItem.js +0 -30
  38. package/lib/typescript/src/components/TabView/TabView.d.ts +0 -26
  39. package/lib/typescript/src/components/TabView/TabView.d.ts.map +0 -1
  40. package/lib/typescript/src/components/TabView/TabViewItem.d.ts +0 -11
  41. package/lib/typescript/src/components/TabView/TabViewItem.d.ts.map +0 -1
  42. package/lib/typescript/src/components/TabView/index.d.ts +0 -3
  43. package/lib/typescript/src/components/TabView/index.d.ts.map +0 -1
  44. package/lib/typescript/src/mappings/TabView.d.ts +0 -126
  45. package/lib/typescript/src/mappings/TabView.d.ts.map +0 -1
  46. package/lib/typescript/src/mappings/TabViewItem.d.ts.map +0 -1
  47. package/src/components/TabView/TabView.js +0 -61
  48. package/src/components/TabView/TabView.tsx +0 -161
  49. package/src/components/TabView/TabViewItem.js +0 -11
  50. package/src/components/TabView/TabViewItem.tsx +0 -25
  51. package/src/components/TabView/index.js +0 -2
  52. package/src/components/TabView/index.tsx +0 -2
  53. package/src/mappings/TabView.js +0 -76
  54. package/src/mappings/TabView.ts +0 -86
  55. package/src/mappings/TabViewItem.js +0 -30
  56. package/src/mappings/TabViewItem.ts +0 -38
@@ -1,126 +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
- flex: number;
9
- };
10
- triggers: string[];
11
- props: {
12
- onIndexChanged: {
13
- label: string;
14
- description: string;
15
- editable: boolean;
16
- required: boolean;
17
- formType: string;
18
- propType: string;
19
- defaultValue: null;
20
- group: string;
21
- };
22
- onEndReached: {
23
- label: string;
24
- description: string;
25
- editable: boolean;
26
- required: boolean;
27
- formType: string;
28
- propType: string;
29
- defaultValue: null;
30
- group: string;
31
- };
32
- tabBarPosition: {
33
- group: string;
34
- label: string;
35
- description: string;
36
- editable: boolean;
37
- required: boolean;
38
- formType: string;
39
- propType: string;
40
- defaultValue: null;
41
- options: never[];
42
- };
43
- keyboardDismissMode: {
44
- group: string;
45
- label: string;
46
- description: string;
47
- editable: boolean;
48
- required: boolean;
49
- formType: string;
50
- propType: string;
51
- defaultValue: null;
52
- options: never[];
53
- };
54
- swipeEnabled: {
55
- label: string;
56
- description: string;
57
- formType: string;
58
- propType: string;
59
- defaultValue: boolean;
60
- editable: boolean;
61
- required: boolean;
62
- group: string;
63
- };
64
- scrollEnabled: {
65
- label: string;
66
- description: string;
67
- formType: string;
68
- propType: string;
69
- defaultValue: boolean;
70
- editable: boolean;
71
- required: boolean;
72
- group: string;
73
- };
74
- activeColor: {
75
- group: string;
76
- label: string;
77
- description: string;
78
- editable: boolean;
79
- required: boolean;
80
- defaultValue: null;
81
- formType: string;
82
- propType: string;
83
- };
84
- inactiveColor: {
85
- group: string;
86
- label: string;
87
- description: string;
88
- editable: boolean;
89
- required: boolean;
90
- defaultValue: null;
91
- formType: string;
92
- propType: string;
93
- };
94
- pressColor: {
95
- group: string;
96
- label: string;
97
- description: string;
98
- editable: boolean;
99
- required: boolean;
100
- defaultValue: null;
101
- formType: string;
102
- propType: string;
103
- };
104
- indicatorColor: {
105
- group: string;
106
- label: string;
107
- description: string;
108
- editable: boolean;
109
- required: boolean;
110
- defaultValue: null;
111
- formType: string;
112
- propType: string;
113
- };
114
- tabsBackgroundColor: {
115
- group: string;
116
- label: string;
117
- description: string;
118
- editable: boolean;
119
- required: boolean;
120
- defaultValue: null;
121
- formType: string;
122
- propType: string;
123
- };
124
- };
125
- };
126
- //# sourceMappingURL=TabView.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TabView.d.ts","sourceRoot":"","sources":["../../../../src/mappings/TabView.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0ErB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"TabViewItem.d.ts","sourceRoot":"","sources":["../../../../src/mappings/TabViewItem.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;CA6BrB,CAAC"}
@@ -1,61 +0,0 @@
1
- import * as React from "react";
2
- import { StyleSheet } from "react-native";
3
- import { TabView, TabBar, SceneMap, } from "react-native-tab-view";
4
- import { withTheme } from "../../theming";
5
- import { extractStyles } from "../../utilities";
6
- const TabViewComponent = ({ Icon, onIndexChanged, onEndReached, tabBarPosition, keyboardDismissMode, swipeEnabled, scrollEnabled, activeColor, inactiveColor, pressColor, indicatorColor, tabsBackgroundColor, style, theme, children, }) => {
7
- const [index, setIndex] = React.useState(0);
8
- const [routes, setRoutes] = React.useState([]);
9
- const [tabScenes, setTabScenes] = React.useState({});
10
- const { textStyles, viewStyles } = extractStyles(style);
11
- //Check type of child using props
12
- //Regular '.type' cannot work because Draftbit strips the type in Draft view
13
- const instanceOfTabViewItemProps = (object) => {
14
- return "title" in object;
15
- };
16
- //Populate routes and scenes based on children
17
- React.useEffect(() => {
18
- const newRoutes = [];
19
- const scenes = {};
20
- React.Children.toArray(children)
21
- .filter((child) => React.isValidElement(child) && instanceOfTabViewItemProps(child.props))
22
- .forEach((item, idx) => {
23
- const child = item;
24
- newRoutes.push({
25
- key: idx.toString(),
26
- title: child.props.title,
27
- icon: child.props.icon,
28
- accessibilityLabel: child.props.accessibilityLabel,
29
- });
30
- scenes[idx] = () => child;
31
- });
32
- setRoutes(newRoutes);
33
- setTabScenes(scenes);
34
- }, [children]);
35
- const indexChangeHandler = (i) => {
36
- setIndex(i);
37
- onIndexChanged === null || onIndexChanged === void 0 ? void 0 : onIndexChanged(i);
38
- if (i === routes.length) {
39
- onEndReached === null || onEndReached === void 0 ? void 0 : onEndReached();
40
- }
41
- };
42
- const renderTabBar = (props) => {
43
- return (React.createElement(TabBar, { ...props, activeColor: activeColor || theme.colors.primary, inactiveColor: inactiveColor || theme.colors.divider, pressColor: pressColor || theme.colors.primary, scrollEnabled: scrollEnabled, indicatorStyle: {
44
- backgroundColor: indicatorColor || theme.colors.primary,
45
- }, labelStyle: textStyles, renderIcon: ({ route, color }) => (route === null || route === void 0 ? void 0 : route.icon) ? (React.createElement(Icon, { style: styles.icon, name: route.icon, color: color, size: 16 })) : null, style: {
46
- backgroundColor: tabsBackgroundColor || theme.colors.background,
47
- }, contentContainerStyle: styles.tabBarContainer }));
48
- };
49
- //Cannot render TabView without at least one tab
50
- if (!routes.length) {
51
- return React.createElement(React.Fragment, null);
52
- }
53
- return (React.createElement(TabView, { style: [styles.tabView, viewStyles], navigationState: { index, routes }, renderScene: SceneMap(tabScenes), renderTabBar: renderTabBar, onIndexChange: indexChangeHandler, tabBarPosition: tabBarPosition, keyboardDismissMode: keyboardDismissMode, swipeEnabled: swipeEnabled }));
54
- };
55
- const styles = StyleSheet.create({
56
- tabView: { flex: 1 },
57
- //Prevent height of bar from filling container
58
- tabBarContainer: { flex: undefined },
59
- icon: { width: 16, height: 16 },
60
- });
61
- export default withTheme(TabViewComponent);
@@ -1,161 +0,0 @@
1
- import * as React from "react";
2
- import { StyleProp, ViewStyle, StyleSheet } from "react-native";
3
- import {
4
- TabView,
5
- TabBar,
6
- SceneMap,
7
- SceneRendererProps,
8
- NavigationState,
9
- Route,
10
- } from "react-native-tab-view";
11
-
12
- import { TabViewItemProps } from "./TabViewItem";
13
- import type { IconSlot } from "../../interfaces/Icon";
14
- import { withTheme } from "../../theming";
15
- import type { Theme } from "../../styles/DefaultTheme";
16
- import { extractStyles } from "../../utilities";
17
-
18
- type TabBarProps = SceneRendererProps & {
19
- navigationState: NavigationState<any>;
20
- };
21
- type TabBarPosition = "top" | "bottom";
22
- type KeyboardDismissMode = "none" | "auto" | "on-drag";
23
-
24
- type TabViewProps = {
25
- onIndexChanged?: (index: number) => void;
26
- onEndReached?: () => void;
27
- tabBarPosition?: TabBarPosition;
28
- keyboardDismissMode?: KeyboardDismissMode;
29
- swipeEnabled?: boolean;
30
- scrollEnabled?: boolean;
31
- activeColor?: string;
32
- inactiveColor?: string;
33
- pressColor?: string;
34
- indicatorColor?: string;
35
- tabsBackgroundColor?: string;
36
- style?: StyleProp<ViewStyle>;
37
- theme: Theme;
38
- } & IconSlot;
39
-
40
- const TabViewComponent: React.FC<React.PropsWithChildren<TabViewProps>> = ({
41
- Icon,
42
- onIndexChanged,
43
- onEndReached,
44
- tabBarPosition,
45
- keyboardDismissMode,
46
- swipeEnabled,
47
- scrollEnabled,
48
- activeColor,
49
- inactiveColor,
50
- pressColor,
51
- indicatorColor,
52
- tabsBackgroundColor,
53
- style,
54
- theme,
55
- children,
56
- }) => {
57
- const [index, setIndex] = React.useState(0);
58
- const [routes, setRoutes] = React.useState<Route[]>([]);
59
- const [tabScenes, setTabScenes] = React.useState({});
60
-
61
- const { textStyles, viewStyles } = extractStyles(style);
62
-
63
- //Check type of child using props
64
- //Regular '.type' cannot work because Draftbit strips the type in Draft view
65
- const instanceOfTabViewItemProps = (
66
- object: any
67
- ): object is TabViewItemProps => {
68
- return "title" in object;
69
- };
70
-
71
- //Populate routes and scenes based on children
72
- React.useEffect(() => {
73
- const newRoutes: Route[] = [];
74
- const scenes: any = {};
75
-
76
- React.Children.toArray(children)
77
- .filter(
78
- (child) =>
79
- React.isValidElement(child) && instanceOfTabViewItemProps(child.props)
80
- )
81
- .forEach((item: any, idx) => {
82
- const child = item as React.ReactElement;
83
- newRoutes.push({
84
- key: idx.toString(),
85
- title: child.props.title,
86
- icon: child.props.icon,
87
- accessibilityLabel: child.props.accessibilityLabel,
88
- });
89
- scenes[idx] = () => child;
90
- });
91
-
92
- setRoutes(newRoutes);
93
- setTabScenes(scenes);
94
- }, [children]);
95
-
96
- const indexChangeHandler = (i: number) => {
97
- setIndex(i);
98
- onIndexChanged?.(i);
99
- if (i === routes.length) {
100
- onEndReached?.();
101
- }
102
- };
103
-
104
- const renderTabBar: React.FC<TabBarProps> = (props) => {
105
- return (
106
- <TabBar
107
- {...props}
108
- activeColor={activeColor || theme.colors.primary}
109
- inactiveColor={inactiveColor || theme.colors.divider}
110
- pressColor={pressColor || theme.colors.primary}
111
- scrollEnabled={scrollEnabled}
112
- indicatorStyle={{
113
- backgroundColor: indicatorColor || theme.colors.primary,
114
- }}
115
- labelStyle={textStyles}
116
- renderIcon={({ route, color }) =>
117
- route?.icon ? (
118
- <Icon
119
- style={styles.icon}
120
- name={route.icon}
121
- color={color}
122
- size={16}
123
- />
124
- ) : null
125
- }
126
- style={{
127
- backgroundColor: tabsBackgroundColor || theme.colors.background,
128
- }}
129
- contentContainerStyle={styles.tabBarContainer}
130
- />
131
- );
132
- };
133
-
134
- //Cannot render TabView without at least one tab
135
- if (!routes.length) {
136
- return <></>;
137
- }
138
-
139
- return (
140
- <TabView
141
- style={[styles.tabView, viewStyles]}
142
- navigationState={{ index, routes }}
143
- renderScene={SceneMap(tabScenes)}
144
- renderTabBar={renderTabBar}
145
- onIndexChange={indexChangeHandler}
146
- tabBarPosition={tabBarPosition}
147
- keyboardDismissMode={keyboardDismissMode}
148
- swipeEnabled={swipeEnabled}
149
- />
150
- );
151
- };
152
-
153
- const styles = StyleSheet.create({
154
- tabView: { flex: 1 },
155
-
156
- //Prevent height of bar from filling container
157
- tabBarContainer: { flex: undefined },
158
- icon: { width: 16, height: 16 },
159
- });
160
-
161
- export default withTheme(TabViewComponent);
@@ -1,11 +0,0 @@
1
- import React from "react";
2
- import { StyleSheet, View } from "react-native";
3
- const TabViewItem = ({ style, children, }) => {
4
- return React.createElement(View, { style: [styles.parentContainer, style] }, children);
5
- };
6
- const styles = StyleSheet.create({
7
- parentContainer: {
8
- flex: 1,
9
- },
10
- });
11
- export default TabViewItem;
@@ -1,25 +0,0 @@
1
- import React from "react";
2
- import { StyleProp, ViewStyle, StyleSheet, View } from "react-native";
3
-
4
- //Props used by parent (TabView) to create tabs
5
- export interface TabViewItemProps {
6
- title: string;
7
- icon?: string;
8
- accessibilityLabel?: string;
9
- style?: StyleProp<ViewStyle>;
10
- }
11
-
12
- const TabViewItem: React.FC<React.PropsWithChildren<TabViewItemProps>> = ({
13
- style,
14
- children,
15
- }) => {
16
- return <View style={[styles.parentContainer, style]}>{children}</View>;
17
- };
18
-
19
- const styles = StyleSheet.create({
20
- parentContainer: {
21
- flex: 1,
22
- },
23
- });
24
-
25
- export default TabViewItem;
@@ -1,2 +0,0 @@
1
- export { default as TabView } from "./TabView";
2
- export { default as TabViewItem } from "./TabViewItem";
@@ -1,2 +0,0 @@
1
- export { default as TabView } from "./TabView";
2
- export { default as TabViewItem } from "./TabViewItem";
@@ -1,76 +0,0 @@
1
- import { COMPONENT_TYPES, createTextEnumProp, createColorProp, StylesPanelSections, Triggers, createActionProp, createStaticBoolProp, GROUPS, } from "@draftbit/types";
2
- export const SEED_DATA = {
3
- name: "Tab View",
4
- tag: "TabView",
5
- description: "Tab view container",
6
- category: COMPONENT_TYPES.swiper,
7
- stylesPanelSections: [
8
- StylesPanelSections.Size,
9
- StylesPanelSections.MarginsAndPaddings,
10
- StylesPanelSections.Position,
11
- StylesPanelSections.Effects,
12
- StylesPanelSections.LayoutSelectedItem,
13
- StylesPanelSections.Background,
14
- StylesPanelSections.Typography,
15
- ],
16
- layout: { flex: 1 },
17
- triggers: [Triggers.OnIndexChanged, Triggers.OnEndReached],
18
- props: {
19
- onIndexChanged: createActionProp({
20
- label: "On index changed",
21
- description: "Action to execute when swipe to new index",
22
- }),
23
- onEndReached: createActionProp({
24
- label: "On end reached",
25
- description: "Action to execute when end of swiping reached",
26
- }),
27
- tabBarPosition: createTextEnumProp({
28
- label: "Tab Bar Position",
29
- description: "Position of tab bar",
30
- options: ["top", "bottom"],
31
- defaultValue: "top",
32
- }),
33
- keyboardDismissMode: createTextEnumProp({
34
- label: "Keyboard Dismiss Mode",
35
- description: "Keyboard Dismiss Mode",
36
- options: ["auto", "on-drag", "none"],
37
- defaultValue: "auto",
38
- }),
39
- swipeEnabled: createStaticBoolProp({
40
- label: "Swipe Enabled",
41
- description: "Whether swiping is enabled or not",
42
- defaultValue: true,
43
- }),
44
- scrollEnabled: createStaticBoolProp({
45
- label: "Tab Scroll Enabled",
46
- description: "Whether scrolling of tabs is enabled or not",
47
- defaultValue: false,
48
- }),
49
- activeColor: createColorProp({
50
- label: "Active Color",
51
- description: "Color of icon and text of active tab",
52
- defaultValue: "primary",
53
- }),
54
- inactiveColor: createColorProp({
55
- label: "Inactive Color",
56
- description: "Color of icon and text of inactive tab(s)",
57
- defaultValue: null,
58
- }),
59
- pressColor: createColorProp({
60
- label: "Press Color",
61
- description: "Color of ripple when pressed",
62
- defaultValue: "primary",
63
- group: GROUPS.android,
64
- }),
65
- indicatorColor: createColorProp({
66
- label: "Indicator Color",
67
- description: "Color of indicator",
68
- defaultValue: "primary",
69
- }),
70
- tabsBackgroundColor: createColorProp({
71
- label: "Tabs Background Color",
72
- description: "Background color of tabs container",
73
- defaultValue: "background",
74
- }),
75
- },
76
- };
@@ -1,86 +0,0 @@
1
- import {
2
- COMPONENT_TYPES,
3
- createTextEnumProp,
4
- createColorProp,
5
- StylesPanelSections,
6
- Triggers,
7
- createActionProp,
8
- createStaticBoolProp,
9
- GROUPS,
10
- } from "@draftbit/types";
11
-
12
- export const SEED_DATA = {
13
- name: "Tab View",
14
- tag: "TabView",
15
- description: "Tab view container",
16
- category: COMPONENT_TYPES.swiper,
17
- stylesPanelSections: [
18
- StylesPanelSections.Size,
19
- StylesPanelSections.MarginsAndPaddings,
20
- StylesPanelSections.Position,
21
- StylesPanelSections.Effects,
22
- StylesPanelSections.LayoutSelectedItem,
23
- StylesPanelSections.Background,
24
- StylesPanelSections.Typography,
25
- ],
26
- layout: { flex: 1 },
27
- triggers: [Triggers.OnIndexChanged, Triggers.OnEndReached],
28
- props: {
29
- onIndexChanged: createActionProp({
30
- label: "On index changed",
31
- description: "Action to execute when swipe to new index",
32
- }),
33
- onEndReached: createActionProp({
34
- label: "On end reached",
35
- description: "Action to execute when end of swiping reached",
36
- }),
37
- tabBarPosition: createTextEnumProp({
38
- label: "Tab Bar Position",
39
- description: "Position of tab bar",
40
- options: ["top", "bottom"],
41
- defaultValue: "top",
42
- }),
43
- keyboardDismissMode: createTextEnumProp({
44
- label: "Keyboard Dismiss Mode",
45
- description: "Keyboard Dismiss Mode",
46
- options: ["auto", "on-drag", "none"],
47
- defaultValue: "auto",
48
- }),
49
- swipeEnabled: createStaticBoolProp({
50
- label: "Swipe Enabled",
51
- description: "Whether swiping is enabled or not",
52
- defaultValue: true,
53
- }),
54
- scrollEnabled: createStaticBoolProp({
55
- label: "Tab Scroll Enabled",
56
- description: "Whether scrolling of tabs is enabled or not",
57
- defaultValue: false,
58
- }),
59
- activeColor: createColorProp({
60
- label: "Active Color",
61
- description: "Color of icon and text of active tab",
62
- defaultValue: "primary",
63
- }),
64
- inactiveColor: createColorProp({
65
- label: "Inactive Color",
66
- description: "Color of icon and text of inactive tab(s)",
67
- defaultValue: null,
68
- }),
69
- pressColor: createColorProp({
70
- label: "Press Color",
71
- description: "Color of ripple when pressed",
72
- defaultValue: "primary",
73
- group: GROUPS.android,
74
- }),
75
- indicatorColor: createColorProp({
76
- label: "Indicator Color",
77
- description: "Color of indicator",
78
- defaultValue: "primary",
79
- }),
80
- tabsBackgroundColor: createColorProp({
81
- label: "Tabs Background Color",
82
- description: "Background color of tabs container",
83
- defaultValue: "background",
84
- }),
85
- },
86
- };
@@ -1,30 +0,0 @@
1
- import { COMPONENT_TYPES, createTextProp, createIconProp, CONTAINER_COMPONENT_STYLES_SECTIONS, GROUPS, } from "@draftbit/types";
2
- export const SEED_DATA = {
3
- name: "Tab View Item",
4
- tag: "TabViewItem",
5
- description: "Single Tab View item to be used in TabView. Each item represents a single tab and its content",
6
- category: COMPONENT_TYPES.swiper,
7
- stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
8
- layout: {
9
- flex: 1,
10
- },
11
- props: {
12
- title: createTextProp({
13
- label: "Title",
14
- description: "Title of tab item",
15
- defaultValue: "Title",
16
- required: true,
17
- group: GROUPS.basic,
18
- }),
19
- icon: createIconProp({
20
- defaultValue: null,
21
- required: false,
22
- }),
23
- accessibilityLabel: createTextProp({
24
- label: "Accessibility Label",
25
- description: "Accessibility Label",
26
- defaultValue: null,
27
- group: GROUPS.accessibility,
28
- }),
29
- },
30
- };
@@ -1,38 +0,0 @@
1
- import {
2
- COMPONENT_TYPES,
3
- createTextProp,
4
- createIconProp,
5
- CONTAINER_COMPONENT_STYLES_SECTIONS,
6
- GROUPS,
7
- } from "@draftbit/types";
8
-
9
- export const SEED_DATA = {
10
- name: "Tab View Item",
11
- tag: "TabViewItem",
12
- description:
13
- "Single Tab View item to be used in TabView. Each item represents a single tab and its content",
14
- category: COMPONENT_TYPES.swiper,
15
- stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
16
- layout: {
17
- flex: 1,
18
- },
19
- props: {
20
- title: createTextProp({
21
- label: "Title",
22
- description: "Title of tab item",
23
- defaultValue: "Title",
24
- required: true,
25
- group: GROUPS.basic,
26
- }),
27
- icon: createIconProp({
28
- defaultValue: null,
29
- required: false,
30
- }),
31
- accessibilityLabel: createTextProp({
32
- label: "Accessibility Label",
33
- description: "Accessibility Label",
34
- defaultValue: null,
35
- group: GROUPS.accessibility,
36
- }),
37
- },
38
- };