@draftbit/core 46.8.2-088bf8.2 → 46.8.2-2fe7f4.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/Accordion/AccordionItem.js +23 -4
- package/lib/commonjs/components/RadioButton/context.js +1 -1
- package/lib/commonjs/components/TabView/TabView.js +132 -0
- package/lib/commonjs/components/TabView/TabViewItem.js +25 -0
- package/lib/commonjs/components/TabView/index.js +20 -0
- package/lib/commonjs/components/ToggleButton.js +2 -15
- package/lib/commonjs/hooks.js +2 -1
- package/lib/commonjs/index.js +13 -0
- package/lib/commonjs/mappings/TabView.js +77 -0
- package/lib/commonjs/mappings/TabViewItem.js +37 -0
- package/lib/module/components/Picker/PickerComponent.android.js +11 -8
- package/lib/module/components/TabView/TabView.js +123 -0
- package/lib/module/components/TabView/TabViewItem.js +20 -0
- package/lib/module/components/TabView/index.js +2 -0
- package/lib/module/index.js +1 -0
- package/lib/module/mappings/TabView.js +70 -0
- package/lib/module/mappings/TabViewItem.js +30 -0
- package/lib/typescript/src/components/TabView/TabView.d.ts +26 -0
- package/lib/typescript/src/components/TabView/TabView.d.ts.map +1 -0
- package/lib/typescript/src/components/TabView/TabViewItem.d.ts +11 -0
- package/lib/typescript/src/components/TabView/TabViewItem.d.ts.map +1 -0
- package/lib/typescript/src/components/TabView/index.d.ts +3 -0
- package/lib/typescript/src/components/TabView/index.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +1 -0
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/mappings/TabView.d.ts +126 -0
- package/lib/typescript/src/mappings/TabView.d.ts.map +1 -0
- package/lib/typescript/src/mappings/TabViewItem.d.ts +25 -0
- package/lib/typescript/src/mappings/TabViewItem.d.ts.map +1 -0
- package/package.json +5 -4
- package/src/components/TabView/TabView.js +61 -0
- package/src/components/TabView/TabView.tsx +161 -0
- package/src/components/TabView/TabViewItem.js +11 -0
- package/src/components/TabView/TabViewItem.tsx +25 -0
- package/src/components/TabView/index.js +2 -0
- package/src/components/TabView/index.tsx +2 -0
- package/src/index.js +1 -0
- package/src/index.tsx +2 -0
- package/src/mappings/TabView.js +76 -0
- package/src/mappings/TabView.ts +86 -0
- package/src/mappings/TabViewItem.js +30 -0
- package/src/mappings/TabViewItem.ts +38 -0
- package/lib/commonjs/mappings/HtmlElements.js +0 -177
- package/lib/module/mappings/HtmlElements.js +0 -170
- package/lib/typescript/src/mappings/HtmlElements.d.ts +0 -77
- package/lib/typescript/src/mappings/HtmlElements.d.ts.map +0 -1
- package/src/mappings/HtmlElements.js +0 -193
- package/src/mappings/HtmlElements.ts +0 -207
|
@@ -0,0 +1,76 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,86 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
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
|
+
};
|
|
@@ -1,177 +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_TRIGGERS = [_types.Triggers.OnValueChange];
|
|
9
|
-
const ELEMENT_SEED_DATA = {
|
|
10
|
-
doc_link: "https://www.npmjs.com/package/@expo/html-elements",
|
|
11
|
-
code_link: "https://github.com/expo/expo/tree/master/packages/html-elements",
|
|
12
|
-
packageName: "@expo/html-elements",
|
|
13
|
-
stylesPanelSections: [_types.StylesPanelSections.Typography, _types.StylesPanelSections.LayoutSelectedItem, _types.StylesPanelSections.MarginsAndPaddings, _types.StylesPanelSections.Effects],
|
|
14
|
-
layout: {
|
|
15
|
-
margin: 0
|
|
16
|
-
},
|
|
17
|
-
triggers: SEED_DATA_TRIGGERS,
|
|
18
|
-
category: _types.COMPONENT_TYPES.webelement
|
|
19
|
-
};
|
|
20
|
-
const HEADING_SEED_DATA = {
|
|
21
|
-
...ELEMENT_SEED_DATA,
|
|
22
|
-
category: _types.COMPONENT_TYPES.text,
|
|
23
|
-
props: {
|
|
24
|
-
accessibilityLabel: {
|
|
25
|
-
group: _types.GROUPS.accessibility,
|
|
26
|
-
name: "accessibilityLabel",
|
|
27
|
-
label: "accessibilityLabel",
|
|
28
|
-
description: "Overrides the text that's read by the screen reader when the user interacts with the element. By default, the label is constructed by traversing all the children and accumulating all the Text nodes separated by space.",
|
|
29
|
-
editable: true,
|
|
30
|
-
required: false,
|
|
31
|
-
formType: _types.FORM_TYPES.string,
|
|
32
|
-
propType: _types.PROP_TYPES.STRING,
|
|
33
|
-
defaultValue: null
|
|
34
|
-
},
|
|
35
|
-
selectable: {
|
|
36
|
-
group: _types.GROUPS.advanced,
|
|
37
|
-
name: "selectable",
|
|
38
|
-
label: "selectable",
|
|
39
|
-
description: "Lets the user select text, to use the native copy and paste functionality.",
|
|
40
|
-
editable: true,
|
|
41
|
-
required: false,
|
|
42
|
-
formType: _types.FORM_TYPES.boolean,
|
|
43
|
-
propType: _types.PROP_TYPES.BOOLEAN,
|
|
44
|
-
defaultValue: null
|
|
45
|
-
},
|
|
46
|
-
children: {
|
|
47
|
-
group: _types.GROUPS.data,
|
|
48
|
-
label: "Text",
|
|
49
|
-
description: "Text",
|
|
50
|
-
editable: true,
|
|
51
|
-
required: true,
|
|
52
|
-
formType: _types.FORM_TYPES.string,
|
|
53
|
-
propType: _types.PROP_TYPES.STRING,
|
|
54
|
-
defaultValue: "Your Headline Here"
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
const TEXT_SEED_DATA = {
|
|
59
|
-
...ELEMENT_SEED_DATA,
|
|
60
|
-
category: _types.COMPONENT_TYPES.text,
|
|
61
|
-
props: {
|
|
62
|
-
children: {
|
|
63
|
-
group: _types.GROUPS.data,
|
|
64
|
-
label: "Text",
|
|
65
|
-
description: "Text",
|
|
66
|
-
defaultValue: "Your Text Here",
|
|
67
|
-
editable: true,
|
|
68
|
-
required: true,
|
|
69
|
-
formType: _types.FORM_TYPES.string,
|
|
70
|
-
propType: _types.PROP_TYPES.STRING
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
|
-
const SEED_DATA = [{
|
|
75
|
-
name: "H1",
|
|
76
|
-
tag: "H1",
|
|
77
|
-
...HEADING_SEED_DATA
|
|
78
|
-
}, {
|
|
79
|
-
name: "H2",
|
|
80
|
-
tag: "H2",
|
|
81
|
-
...HEADING_SEED_DATA
|
|
82
|
-
}, {
|
|
83
|
-
name: "H3",
|
|
84
|
-
tag: "H3",
|
|
85
|
-
...HEADING_SEED_DATA
|
|
86
|
-
}, {
|
|
87
|
-
name: "H4",
|
|
88
|
-
tag: "H4",
|
|
89
|
-
...HEADING_SEED_DATA
|
|
90
|
-
}, {
|
|
91
|
-
name: "H5",
|
|
92
|
-
tag: "H5",
|
|
93
|
-
...HEADING_SEED_DATA
|
|
94
|
-
}, {
|
|
95
|
-
name: "H6",
|
|
96
|
-
tag: "H6",
|
|
97
|
-
...HEADING_SEED_DATA
|
|
98
|
-
}, {
|
|
99
|
-
name: "Anchor",
|
|
100
|
-
tag: "A",
|
|
101
|
-
...TEXT_SEED_DATA,
|
|
102
|
-
props: {
|
|
103
|
-
href: (0, _types.createTextProp)({
|
|
104
|
-
label: "href",
|
|
105
|
-
description: "Specify the URL",
|
|
106
|
-
defaultValue: ""
|
|
107
|
-
}),
|
|
108
|
-
target: {
|
|
109
|
-
group: _types.GROUPS.basic,
|
|
110
|
-
label: "target",
|
|
111
|
-
description: "decide where link should open",
|
|
112
|
-
formType: _types.FORM_TYPES.flatArray,
|
|
113
|
-
defaultValue: "_blank",
|
|
114
|
-
options: ["_blank", "_self", "_parent", "_top"]
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
}, {
|
|
118
|
-
name: "Paragraph",
|
|
119
|
-
tag: "P",
|
|
120
|
-
...TEXT_SEED_DATA,
|
|
121
|
-
props: {
|
|
122
|
-
// NOTE - Keeping the props commented until we figure out a way to use this props from draftbit side.
|
|
123
|
-
// strong: createBoolProp({
|
|
124
|
-
// label: "Strong",
|
|
125
|
-
// description: "Strong",
|
|
126
|
-
// }),
|
|
127
|
-
// strike: createBoolProp({
|
|
128
|
-
// label: "Strike",
|
|
129
|
-
// description: "Strike through",
|
|
130
|
-
// }),
|
|
131
|
-
// italic: createBoolProp({
|
|
132
|
-
// label: "Italic",
|
|
133
|
-
// description: "Italic Fonts",
|
|
134
|
-
// }),
|
|
135
|
-
// bold: createBoolProp({
|
|
136
|
-
// label: "Bold",
|
|
137
|
-
// description: "Bold",
|
|
138
|
-
// }),
|
|
139
|
-
}
|
|
140
|
-
}, {
|
|
141
|
-
name: "Code",
|
|
142
|
-
tag: "Code",
|
|
143
|
-
...TEXT_SEED_DATA
|
|
144
|
-
}, {
|
|
145
|
-
name: "Pre",
|
|
146
|
-
tag: "Pre",
|
|
147
|
-
...TEXT_SEED_DATA
|
|
148
|
-
}, {
|
|
149
|
-
name: "Mark",
|
|
150
|
-
tag: "Mark",
|
|
151
|
-
...TEXT_SEED_DATA
|
|
152
|
-
}, {
|
|
153
|
-
name: "BR",
|
|
154
|
-
tag: "BR",
|
|
155
|
-
...TEXT_SEED_DATA
|
|
156
|
-
}, {
|
|
157
|
-
name: "BlockQuote",
|
|
158
|
-
tag: "BlockQuote",
|
|
159
|
-
...TEXT_SEED_DATA
|
|
160
|
-
}, {
|
|
161
|
-
name: "HR",
|
|
162
|
-
tag: "HR",
|
|
163
|
-
...TEXT_SEED_DATA
|
|
164
|
-
}, {
|
|
165
|
-
name: "Time",
|
|
166
|
-
tag: "Time",
|
|
167
|
-
...ELEMENT_SEED_DATA
|
|
168
|
-
}, {
|
|
169
|
-
name: "UL",
|
|
170
|
-
tag: "UL",
|
|
171
|
-
...ELEMENT_SEED_DATA
|
|
172
|
-
}, {
|
|
173
|
-
name: "LI",
|
|
174
|
-
tag: "LI",
|
|
175
|
-
...ELEMENT_SEED_DATA
|
|
176
|
-
}];
|
|
177
|
-
exports.SEED_DATA = SEED_DATA;
|
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
import { COMPONENT_TYPES, createTextProp, FORM_TYPES, PROP_TYPES, GROUPS, StylesPanelSections, Triggers } from "@draftbit/types";
|
|
2
|
-
const SEED_DATA_TRIGGERS = [Triggers.OnValueChange];
|
|
3
|
-
const ELEMENT_SEED_DATA = {
|
|
4
|
-
doc_link: "https://www.npmjs.com/package/@expo/html-elements",
|
|
5
|
-
code_link: "https://github.com/expo/expo/tree/master/packages/html-elements",
|
|
6
|
-
packageName: "@expo/html-elements",
|
|
7
|
-
stylesPanelSections: [StylesPanelSections.Typography, StylesPanelSections.LayoutSelectedItem, StylesPanelSections.MarginsAndPaddings, StylesPanelSections.Effects],
|
|
8
|
-
layout: {
|
|
9
|
-
margin: 0
|
|
10
|
-
},
|
|
11
|
-
triggers: SEED_DATA_TRIGGERS,
|
|
12
|
-
category: COMPONENT_TYPES.webelement
|
|
13
|
-
};
|
|
14
|
-
const HEADING_SEED_DATA = {
|
|
15
|
-
...ELEMENT_SEED_DATA,
|
|
16
|
-
category: COMPONENT_TYPES.text,
|
|
17
|
-
props: {
|
|
18
|
-
accessibilityLabel: {
|
|
19
|
-
group: GROUPS.accessibility,
|
|
20
|
-
name: "accessibilityLabel",
|
|
21
|
-
label: "accessibilityLabel",
|
|
22
|
-
description: "Overrides the text that's read by the screen reader when the user interacts with the element. By default, the label is constructed by traversing all the children and accumulating all the Text nodes separated by space.",
|
|
23
|
-
editable: true,
|
|
24
|
-
required: false,
|
|
25
|
-
formType: FORM_TYPES.string,
|
|
26
|
-
propType: PROP_TYPES.STRING,
|
|
27
|
-
defaultValue: null
|
|
28
|
-
},
|
|
29
|
-
selectable: {
|
|
30
|
-
group: GROUPS.advanced,
|
|
31
|
-
name: "selectable",
|
|
32
|
-
label: "selectable",
|
|
33
|
-
description: "Lets the user select text, to use the native copy and paste functionality.",
|
|
34
|
-
editable: true,
|
|
35
|
-
required: false,
|
|
36
|
-
formType: FORM_TYPES.boolean,
|
|
37
|
-
propType: PROP_TYPES.BOOLEAN,
|
|
38
|
-
defaultValue: null
|
|
39
|
-
},
|
|
40
|
-
children: {
|
|
41
|
-
group: GROUPS.data,
|
|
42
|
-
label: "Text",
|
|
43
|
-
description: "Text",
|
|
44
|
-
editable: true,
|
|
45
|
-
required: true,
|
|
46
|
-
formType: FORM_TYPES.string,
|
|
47
|
-
propType: PROP_TYPES.STRING,
|
|
48
|
-
defaultValue: "Your Headline Here"
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
const TEXT_SEED_DATA = {
|
|
53
|
-
...ELEMENT_SEED_DATA,
|
|
54
|
-
category: COMPONENT_TYPES.text,
|
|
55
|
-
props: {
|
|
56
|
-
children: {
|
|
57
|
-
group: GROUPS.data,
|
|
58
|
-
label: "Text",
|
|
59
|
-
description: "Text",
|
|
60
|
-
defaultValue: "Your Text Here",
|
|
61
|
-
editable: true,
|
|
62
|
-
required: true,
|
|
63
|
-
formType: FORM_TYPES.string,
|
|
64
|
-
propType: PROP_TYPES.STRING
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
|
-
export const SEED_DATA = [{
|
|
69
|
-
name: "H1",
|
|
70
|
-
tag: "H1",
|
|
71
|
-
...HEADING_SEED_DATA
|
|
72
|
-
}, {
|
|
73
|
-
name: "H2",
|
|
74
|
-
tag: "H2",
|
|
75
|
-
...HEADING_SEED_DATA
|
|
76
|
-
}, {
|
|
77
|
-
name: "H3",
|
|
78
|
-
tag: "H3",
|
|
79
|
-
...HEADING_SEED_DATA
|
|
80
|
-
}, {
|
|
81
|
-
name: "H4",
|
|
82
|
-
tag: "H4",
|
|
83
|
-
...HEADING_SEED_DATA
|
|
84
|
-
}, {
|
|
85
|
-
name: "H5",
|
|
86
|
-
tag: "H5",
|
|
87
|
-
...HEADING_SEED_DATA
|
|
88
|
-
}, {
|
|
89
|
-
name: "H6",
|
|
90
|
-
tag: "H6",
|
|
91
|
-
...HEADING_SEED_DATA
|
|
92
|
-
}, {
|
|
93
|
-
name: "Anchor",
|
|
94
|
-
tag: "A",
|
|
95
|
-
...TEXT_SEED_DATA,
|
|
96
|
-
props: {
|
|
97
|
-
href: createTextProp({
|
|
98
|
-
label: "href",
|
|
99
|
-
description: "Specify the URL",
|
|
100
|
-
defaultValue: ""
|
|
101
|
-
}),
|
|
102
|
-
target: {
|
|
103
|
-
group: GROUPS.basic,
|
|
104
|
-
label: "target",
|
|
105
|
-
description: "decide where link should open",
|
|
106
|
-
formType: FORM_TYPES.flatArray,
|
|
107
|
-
defaultValue: "_blank",
|
|
108
|
-
options: ["_blank", "_self", "_parent", "_top"]
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
}, {
|
|
112
|
-
name: "Paragraph",
|
|
113
|
-
tag: "P",
|
|
114
|
-
...TEXT_SEED_DATA,
|
|
115
|
-
props: {
|
|
116
|
-
// NOTE - Keeping the props commented until we figure out a way to use this props from draftbit side.
|
|
117
|
-
// strong: createBoolProp({
|
|
118
|
-
// label: "Strong",
|
|
119
|
-
// description: "Strong",
|
|
120
|
-
// }),
|
|
121
|
-
// strike: createBoolProp({
|
|
122
|
-
// label: "Strike",
|
|
123
|
-
// description: "Strike through",
|
|
124
|
-
// }),
|
|
125
|
-
// italic: createBoolProp({
|
|
126
|
-
// label: "Italic",
|
|
127
|
-
// description: "Italic Fonts",
|
|
128
|
-
// }),
|
|
129
|
-
// bold: createBoolProp({
|
|
130
|
-
// label: "Bold",
|
|
131
|
-
// description: "Bold",
|
|
132
|
-
// }),
|
|
133
|
-
}
|
|
134
|
-
}, {
|
|
135
|
-
name: "Code",
|
|
136
|
-
tag: "Code",
|
|
137
|
-
...TEXT_SEED_DATA
|
|
138
|
-
}, {
|
|
139
|
-
name: "Pre",
|
|
140
|
-
tag: "Pre",
|
|
141
|
-
...TEXT_SEED_DATA
|
|
142
|
-
}, {
|
|
143
|
-
name: "Mark",
|
|
144
|
-
tag: "Mark",
|
|
145
|
-
...TEXT_SEED_DATA
|
|
146
|
-
}, {
|
|
147
|
-
name: "BR",
|
|
148
|
-
tag: "BR",
|
|
149
|
-
...TEXT_SEED_DATA
|
|
150
|
-
}, {
|
|
151
|
-
name: "BlockQuote",
|
|
152
|
-
tag: "BlockQuote",
|
|
153
|
-
...TEXT_SEED_DATA
|
|
154
|
-
}, {
|
|
155
|
-
name: "HR",
|
|
156
|
-
tag: "HR",
|
|
157
|
-
...TEXT_SEED_DATA
|
|
158
|
-
}, {
|
|
159
|
-
name: "Time",
|
|
160
|
-
tag: "Time",
|
|
161
|
-
...ELEMENT_SEED_DATA
|
|
162
|
-
}, {
|
|
163
|
-
name: "UL",
|
|
164
|
-
tag: "UL",
|
|
165
|
-
...ELEMENT_SEED_DATA
|
|
166
|
-
}, {
|
|
167
|
-
name: "LI",
|
|
168
|
-
tag: "LI",
|
|
169
|
-
...ELEMENT_SEED_DATA
|
|
170
|
-
}];
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
export declare const SEED_DATA: ({
|
|
2
|
-
props: {
|
|
3
|
-
href: any;
|
|
4
|
-
target: {
|
|
5
|
-
group: string;
|
|
6
|
-
label: string;
|
|
7
|
-
description: string;
|
|
8
|
-
formType: string;
|
|
9
|
-
defaultValue: string;
|
|
10
|
-
options: string[];
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
category: string;
|
|
14
|
-
doc_link: string;
|
|
15
|
-
code_link: string;
|
|
16
|
-
packageName: string;
|
|
17
|
-
stylesPanelSections: string[];
|
|
18
|
-
layout: {
|
|
19
|
-
margin: number;
|
|
20
|
-
};
|
|
21
|
-
triggers: string[];
|
|
22
|
-
name: string;
|
|
23
|
-
tag: string;
|
|
24
|
-
} | {
|
|
25
|
-
props: {
|
|
26
|
-
href?: undefined;
|
|
27
|
-
target?: undefined;
|
|
28
|
-
};
|
|
29
|
-
category: string;
|
|
30
|
-
doc_link: string;
|
|
31
|
-
code_link: string;
|
|
32
|
-
packageName: string;
|
|
33
|
-
stylesPanelSections: string[];
|
|
34
|
-
layout: {
|
|
35
|
-
margin: number;
|
|
36
|
-
};
|
|
37
|
-
triggers: string[];
|
|
38
|
-
name: string;
|
|
39
|
-
tag: string;
|
|
40
|
-
} | {
|
|
41
|
-
category: string;
|
|
42
|
-
props: {
|
|
43
|
-
children: {
|
|
44
|
-
group: string;
|
|
45
|
-
label: string;
|
|
46
|
-
description: string;
|
|
47
|
-
defaultValue: string;
|
|
48
|
-
editable: boolean;
|
|
49
|
-
required: boolean;
|
|
50
|
-
formType: string;
|
|
51
|
-
propType: string;
|
|
52
|
-
};
|
|
53
|
-
};
|
|
54
|
-
doc_link: string;
|
|
55
|
-
code_link: string;
|
|
56
|
-
packageName: string;
|
|
57
|
-
stylesPanelSections: string[];
|
|
58
|
-
layout: {
|
|
59
|
-
margin: number;
|
|
60
|
-
};
|
|
61
|
-
triggers: string[];
|
|
62
|
-
name: string;
|
|
63
|
-
tag: string;
|
|
64
|
-
} | {
|
|
65
|
-
doc_link: string;
|
|
66
|
-
code_link: string;
|
|
67
|
-
packageName: string;
|
|
68
|
-
stylesPanelSections: string[];
|
|
69
|
-
layout: {
|
|
70
|
-
margin: number;
|
|
71
|
-
};
|
|
72
|
-
triggers: string[];
|
|
73
|
-
category: string;
|
|
74
|
-
name: string;
|
|
75
|
-
tag: string;
|
|
76
|
-
})[];
|
|
77
|
-
//# sourceMappingURL=HtmlElements.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"HtmlElements.d.ts","sourceRoot":"","sources":["../../../../src/mappings/HtmlElements.ts"],"names":[],"mappings":"AAsFA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAwHrB,CAAC"}
|