@draftbit/core 47.0.1-2935a8.2 → 47.0.1-2aab54.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/CheckboxGroup.js +17 -2
- package/lib/commonjs/index.js +25 -82
- package/lib/commonjs/mappings/FlashList.js +2 -38
- package/lib/commonjs/mappings/FlatList.js +0 -9
- package/lib/commonjs/mappings/NativeBase/AlertDialog.js +93 -0
- package/lib/commonjs/mappings/NativeBase/Button.js +84 -0
- package/lib/commonjs/mappings/NativeBase/DataDisplay.js +48 -0
- package/lib/commonjs/mappings/NativeBase/Feedback.js +74 -0
- package/lib/commonjs/mappings/NativeBase/Layout.js +114 -0
- package/lib/commonjs/mappings/NativeBase/Media.js +49 -0
- package/lib/commonjs/mappings/NativeBase/Menu.js +111 -0
- package/lib/commonjs/mappings/NativeBase/Modal.js +93 -0
- package/lib/commonjs/mappings/NativeBase/Other.js +94 -0
- package/lib/commonjs/mappings/NativeBase/Popover.js +99 -0
- package/lib/module/index.js +121 -31
- package/lib/module/mappings/FlashList.js +3 -39
- package/lib/module/mappings/FlatList.js +1 -10
- package/lib/module/mappings/NativeBase/AlertDialog.js +86 -0
- package/lib/module/mappings/NativeBase/Button.js +86 -0
- package/lib/module/mappings/NativeBase/DataDisplay.js +41 -0
- package/lib/module/mappings/NativeBase/Feedback.js +67 -0
- package/lib/module/mappings/NativeBase/Layout.js +107 -0
- package/lib/module/mappings/NativeBase/Media.js +42 -0
- package/lib/module/mappings/NativeBase/Menu.js +104 -0
- package/lib/module/mappings/NativeBase/Modal.js +86 -0
- package/lib/module/mappings/NativeBase/Other.js +87 -0
- package/lib/module/mappings/NativeBase/Popover.js +92 -0
- package/lib/typescript/src/index.d.ts +102 -29
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/mappings/FlashList.d.ts +2 -130
- package/lib/typescript/src/mappings/FlashList.d.ts.map +1 -1
- package/lib/typescript/src/mappings/FlatList.d.ts +0 -51
- package/lib/typescript/src/mappings/FlatList.d.ts.map +1 -1
- package/lib/typescript/src/mappings/NativeBase/AlertDialog.d.ts +134 -0
- package/lib/typescript/src/mappings/NativeBase/AlertDialog.d.ts.map +1 -0
- package/lib/typescript/src/mappings/NativeBase/Button.d.ts +1 -0
- package/lib/typescript/src/mappings/NativeBase/Button.d.ts.map +1 -0
- package/lib/typescript/src/mappings/NativeBase/DataDisplay.d.ts +70 -0
- package/lib/typescript/src/mappings/NativeBase/DataDisplay.d.ts.map +1 -0
- package/lib/typescript/src/mappings/NativeBase/Feedback.d.ts +2 -0
- package/lib/typescript/src/mappings/NativeBase/Feedback.d.ts.map +1 -0
- package/lib/typescript/src/mappings/NativeBase/Layout.d.ts +146 -0
- package/lib/typescript/src/mappings/NativeBase/Layout.d.ts.map +1 -0
- package/lib/typescript/src/mappings/NativeBase/Media.d.ts +48 -0
- package/lib/typescript/src/mappings/NativeBase/Media.d.ts.map +1 -0
- package/lib/typescript/src/mappings/NativeBase/Menu.d.ts +227 -0
- package/lib/typescript/src/mappings/NativeBase/Menu.d.ts.map +1 -0
- package/lib/typescript/src/mappings/NativeBase/Modal.d.ts +133 -0
- package/lib/typescript/src/mappings/NativeBase/Modal.d.ts.map +1 -0
- package/lib/typescript/src/mappings/NativeBase/Other.d.ts +179 -0
- package/lib/typescript/src/mappings/NativeBase/Other.d.ts.map +1 -0
- package/lib/typescript/src/mappings/NativeBase/Popover.d.ts +136 -0
- package/lib/typescript/src/mappings/NativeBase/Popover.d.ts.map +1 -0
- package/package.json +3 -3
- package/src/index.js +112 -31
- package/src/index.tsx +123 -43
- package/src/mappings/FlashList.js +31 -75
- package/src/mappings/FlashList.ts +30 -77
- package/src/mappings/FlatList.js +1 -15
- package/src/mappings/FlatList.ts +0 -16
- package/src/mappings/NativeBase/AlertDialog.js +103 -0
- package/src/mappings/NativeBase/AlertDialog.ts +118 -0
- package/src/mappings/NativeBase/Button.js +84 -0
- package/src/mappings/NativeBase/Button.ts +83 -0
- package/src/mappings/NativeBase/DataDisplay.js +54 -0
- package/src/mappings/NativeBase/DataDisplay.ts +64 -0
- package/src/mappings/NativeBase/Feedback.js +89 -0
- package/src/mappings/NativeBase/Feedback.ts +100 -0
- package/src/mappings/NativeBase/Layout.js +140 -0
- package/src/mappings/NativeBase/Layout.ts +152 -0
- package/src/mappings/NativeBase/Media.js +56 -0
- package/src/mappings/NativeBase/Media.ts +65 -0
- package/src/mappings/NativeBase/Menu.js +134 -0
- package/src/mappings/NativeBase/Menu.ts +150 -0
- package/src/mappings/NativeBase/Modal.js +103 -0
- package/src/mappings/NativeBase/Modal.ts +118 -0
- package/src/mappings/NativeBase/Other.js +123 -0
- package/src/mappings/NativeBase/Other.ts +139 -0
- package/src/mappings/NativeBase/Popover.js +123 -0
- package/src/mappings/NativeBase/Popover.ts +136 -0
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import {
|
|
2
|
+
COMPONENT_TYPES,
|
|
3
|
+
createActionProp,
|
|
4
|
+
createBoolProp,
|
|
5
|
+
createStaticBoolProp,
|
|
6
|
+
createTextEnumProp,
|
|
7
|
+
StylesPanelSections,
|
|
8
|
+
} from "@draftbit/types";
|
|
9
|
+
|
|
10
|
+
const SHARED_SEED_DATA = {
|
|
11
|
+
category: COMPONENT_TYPES.NBPopover,
|
|
12
|
+
packageName: "native-base",
|
|
13
|
+
stylesPanelSections: [
|
|
14
|
+
StylesPanelSections.LayoutFlexItems,
|
|
15
|
+
StylesPanelSections.LayoutSelectedItem,
|
|
16
|
+
StylesPanelSections.LayoutContent,
|
|
17
|
+
StylesPanelSections.Background,
|
|
18
|
+
StylesPanelSections.Size,
|
|
19
|
+
StylesPanelSections.MarginsAndPaddings,
|
|
20
|
+
StylesPanelSections.Position,
|
|
21
|
+
StylesPanelSections.Borders,
|
|
22
|
+
StylesPanelSections.Effects,
|
|
23
|
+
],
|
|
24
|
+
layout: {},
|
|
25
|
+
triggers: {},
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export const SEED_DATA = [
|
|
29
|
+
{
|
|
30
|
+
name: "Popover",
|
|
31
|
+
tag: "Popover",
|
|
32
|
+
description:
|
|
33
|
+
"Popover floats around a trigger. It is a non-modal dialog used to provide contextual information to the user. It should be paired with a pressable trigger element.",
|
|
34
|
+
...SHARED_SEED_DATA,
|
|
35
|
+
allowChildren: true,
|
|
36
|
+
props: {
|
|
37
|
+
isOpen: createBoolProp({
|
|
38
|
+
label: "Is Open",
|
|
39
|
+
description:
|
|
40
|
+
"If true, the popover is open. Useful for controlling the open state.",
|
|
41
|
+
}),
|
|
42
|
+
defaultIsOpen: createStaticBoolProp({
|
|
43
|
+
label: "Default Is Open",
|
|
44
|
+
description: "If true, the popover will be opened by default.",
|
|
45
|
+
}),
|
|
46
|
+
trapFocus: createStaticBoolProp({
|
|
47
|
+
label: "Trap Focus",
|
|
48
|
+
description: "Whether popover should trap focus.",
|
|
49
|
+
}),
|
|
50
|
+
shouldFlip: createStaticBoolProp({
|
|
51
|
+
label: "Should Flip",
|
|
52
|
+
description:
|
|
53
|
+
"Whether popover should flip when it reaches the edge of the screen.",
|
|
54
|
+
defaultValue: true,
|
|
55
|
+
}),
|
|
56
|
+
shouldOverlapWithTrigger: createStaticBoolProp({
|
|
57
|
+
label: "Should Overlap With Trigger",
|
|
58
|
+
description: "Whether popover should overlap with trigger.",
|
|
59
|
+
defaultValue: false,
|
|
60
|
+
}),
|
|
61
|
+
isKeyboardDismissable: createStaticBoolProp({
|
|
62
|
+
label: "Is Keyboard Dismissable",
|
|
63
|
+
description:
|
|
64
|
+
"If true, the popover will close when the keyboard is dismissed.",
|
|
65
|
+
defaultValue: true,
|
|
66
|
+
}),
|
|
67
|
+
placement: createTextEnumProp({
|
|
68
|
+
label: "Placement",
|
|
69
|
+
description: "The placement of the popover",
|
|
70
|
+
options: [
|
|
71
|
+
"bottom",
|
|
72
|
+
"top",
|
|
73
|
+
"left",
|
|
74
|
+
"right",
|
|
75
|
+
"top left",
|
|
76
|
+
"top right",
|
|
77
|
+
"bottom left",
|
|
78
|
+
"bottom right",
|
|
79
|
+
"right bottom",
|
|
80
|
+
"right top",
|
|
81
|
+
"left bottom",
|
|
82
|
+
"left top",
|
|
83
|
+
],
|
|
84
|
+
defaultValue: "bottom left",
|
|
85
|
+
}),
|
|
86
|
+
useRNModal: createStaticBoolProp({
|
|
87
|
+
label: "Use RN Modal",
|
|
88
|
+
description: "If true, the popover will use the RN Modal component.",
|
|
89
|
+
}),
|
|
90
|
+
onOpen: createActionProp(),
|
|
91
|
+
onClose: createActionProp(),
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
name: "Popover Arrow",
|
|
96
|
+
tag: "Popover.Arrow",
|
|
97
|
+
description: "The popover arrow.",
|
|
98
|
+
...SHARED_SEED_DATA,
|
|
99
|
+
props: {},
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
name: "Popover Body",
|
|
103
|
+
tag: "Popover.Body",
|
|
104
|
+
description: "The body of the popover.",
|
|
105
|
+
...SHARED_SEED_DATA,
|
|
106
|
+
props: {},
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
name: "Popover Content",
|
|
110
|
+
tag: "Popover.Content",
|
|
111
|
+
description: "The popover itself.",
|
|
112
|
+
...SHARED_SEED_DATA,
|
|
113
|
+
props: {},
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
name: "Popover Close Button",
|
|
117
|
+
tag: "Popover.CloseButton",
|
|
118
|
+
description: "The button that closes the popover.",
|
|
119
|
+
...SHARED_SEED_DATA,
|
|
120
|
+
props: {},
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
name: "Popover Header",
|
|
124
|
+
tag: "Popover.Header",
|
|
125
|
+
description: "The header of the popover.",
|
|
126
|
+
...SHARED_SEED_DATA,
|
|
127
|
+
props: {},
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
name: "Popover Trigger",
|
|
131
|
+
tag: "Popover.Trigger",
|
|
132
|
+
description: "Used to wrap the reference (or trigger) element.",
|
|
133
|
+
...SHARED_SEED_DATA,
|
|
134
|
+
props: {},
|
|
135
|
+
},
|
|
136
|
+
];
|