@draftbit/core 46.9.1-0f1b60.2 → 46.9.1-1f5cbe.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 (40) hide show
  1. package/lib/commonjs/components/BottomSheet/BottomSheet.js +88 -0
  2. package/lib/commonjs/components/BottomSheet/BottomSheetComponent.js +480 -0
  3. package/lib/commonjs/components/BottomSheet/index.js +13 -0
  4. package/lib/commonjs/components/CircleImage.js +15 -1
  5. package/lib/commonjs/components/Container.js +4 -15
  6. package/lib/commonjs/constants.js +1 -1
  7. package/lib/commonjs/hooks.js +2 -1
  8. package/lib/commonjs/index.js +7 -0
  9. package/lib/commonjs/mappings/BottomSheet.js +74 -0
  10. package/lib/module/components/BottomSheet/BottomSheet.js +80 -0
  11. package/lib/module/components/BottomSheet/BottomSheetComponent.js +470 -0
  12. package/lib/module/components/BottomSheet/index.js +1 -0
  13. package/lib/module/index.js +1 -0
  14. package/lib/module/mappings/BottomSheet.js +67 -0
  15. package/lib/typescript/src/components/BottomSheet/BottomSheet.d.ts +20 -0
  16. package/lib/typescript/src/components/BottomSheet/BottomSheet.d.ts.map +1 -0
  17. package/lib/typescript/src/components/BottomSheet/BottomSheetComponent.d.ts +170 -0
  18. package/lib/typescript/src/components/BottomSheet/BottomSheetComponent.d.ts.map +1 -0
  19. package/lib/typescript/src/components/BottomSheet/index.d.ts +2 -0
  20. package/lib/typescript/src/components/BottomSheet/index.d.ts.map +1 -0
  21. package/lib/typescript/src/index.d.ts +1 -0
  22. package/lib/typescript/src/index.d.ts.map +1 -1
  23. package/lib/typescript/src/mappings/{HtmlElements.d.ts → BottomSheet.d.ts} +61 -51
  24. package/lib/typescript/src/mappings/BottomSheet.d.ts.map +1 -0
  25. package/package.json +5 -4
  26. package/src/components/BottomSheet/BottomSheet.js +56 -0
  27. package/src/components/BottomSheet/BottomSheet.tsx +120 -0
  28. package/src/components/BottomSheet/BottomSheetComponent.js +437 -0
  29. package/src/components/BottomSheet/BottomSheetComponent.tsx +895 -0
  30. package/src/components/BottomSheet/index.js +1 -0
  31. package/src/components/BottomSheet/index.ts +1 -0
  32. package/src/index.js +1 -0
  33. package/src/index.tsx +2 -0
  34. package/src/mappings/BottomSheet.js +64 -0
  35. package/src/mappings/BottomSheet.ts +78 -0
  36. package/lib/commonjs/mappings/HtmlElements.js +0 -160
  37. package/lib/module/mappings/HtmlElements.js +0 -153
  38. package/lib/typescript/src/mappings/HtmlElements.d.ts.map +0 -1
  39. package/src/mappings/HtmlElements.js +0 -180
  40. package/src/mappings/HtmlElements.ts +0 -194
@@ -1,194 +0,0 @@
1
- import {
2
- COMPONENT_TYPES,
3
- createTextProp,
4
- FORM_TYPES,
5
- PROP_TYPES,
6
- GROUPS,
7
- StylesPanelSections,
8
- BLOCK_STYLES_SECTIONS,
9
- } from "@draftbit/types";
10
-
11
- const ELEMENT_SEED_DATA = {
12
- doc_link: "https://www.npmjs.com/package/@expo/html-elements",
13
- code_link: "https://github.com/expo/expo/tree/master/packages/html-elements",
14
- packageName: "@expo/html-elements",
15
- stylesPanelSections: BLOCK_STYLES_SECTIONS,
16
- category: COMPONENT_TYPES.webelement,
17
- };
18
-
19
- const TEXT_SEED_DATA = {
20
- ...ELEMENT_SEED_DATA,
21
- category: COMPONENT_TYPES.text,
22
- stylesPanelSections: [
23
- StylesPanelSections.Typography,
24
- StylesPanelSections.LayoutSelectedItem,
25
- StylesPanelSections.MarginsAndPaddings,
26
- StylesPanelSections.Effects,
27
- ],
28
- layout: {
29
- color: "strong",
30
- },
31
- props: {
32
- children: {
33
- group: GROUPS.data,
34
- label: "Text",
35
- description: "Text",
36
- defaultValue: "Double click me to edit 👀",
37
- editable: true,
38
- required: true,
39
- formType: FORM_TYPES.string,
40
- propType: PROP_TYPES.STRING,
41
- },
42
- accessibilityLabel: {
43
- group: GROUPS.accessibility,
44
- name: "accessibilityLabel",
45
- label: "accessibilityLabel",
46
- description:
47
- "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.",
48
- editable: true,
49
- required: false,
50
- formType: FORM_TYPES.string,
51
- propType: PROP_TYPES.STRING,
52
- defaultValue: null,
53
- },
54
- selectable: {
55
- group: GROUPS.advanced,
56
- name: "selectable",
57
- label: "selectable",
58
- description:
59
- "Lets the user select text, to use the native copy and paste functionality.",
60
- editable: true,
61
- required: false,
62
- formType: FORM_TYPES.boolean,
63
- propType: PROP_TYPES.BOOLEAN,
64
- defaultValue: true,
65
- },
66
- },
67
- };
68
-
69
- export const SEED_DATA = [
70
- {
71
- name: "Heading 1",
72
- tag: "H1",
73
- ...TEXT_SEED_DATA,
74
- },
75
- {
76
- name: "Heading 2",
77
- tag: "H2",
78
- ...TEXT_SEED_DATA,
79
- },
80
- {
81
- name: "Heading 3",
82
- tag: "H3",
83
- ...TEXT_SEED_DATA,
84
- },
85
- {
86
- name: "Heading 4",
87
- tag: "H4",
88
- ...TEXT_SEED_DATA,
89
- },
90
- {
91
- name: "Heading 5",
92
- tag: "H5",
93
- ...TEXT_SEED_DATA,
94
- },
95
- {
96
- name: "Heading 6",
97
- tag: "H6",
98
- ...TEXT_SEED_DATA,
99
- },
100
- {
101
- name: "Paragraph",
102
- tag: "P",
103
- ...TEXT_SEED_DATA,
104
- },
105
- {
106
- name: "Bold",
107
- tag: "B",
108
- ...TEXT_SEED_DATA,
109
- },
110
- {
111
- name: "Strikethrough",
112
- tag: "S",
113
- ...TEXT_SEED_DATA,
114
- },
115
- {
116
- name: "Italic",
117
- tag: "I",
118
- ...TEXT_SEED_DATA,
119
- },
120
- {
121
- name: "Code",
122
- tag: "Code",
123
- ...TEXT_SEED_DATA,
124
- },
125
- {
126
- name: "Preformatted",
127
- tag: "Pre",
128
- ...TEXT_SEED_DATA,
129
- },
130
- {
131
- name: "Mark",
132
- tag: "Mark",
133
- ...TEXT_SEED_DATA,
134
- },
135
- {
136
- name: "Block Quote",
137
- tag: "BlockQuote",
138
- ...TEXT_SEED_DATA,
139
- },
140
- {
141
- name: "Quoted",
142
- tag: "Q",
143
- ...TEXT_SEED_DATA,
144
- },
145
-
146
- {
147
- name: "Time",
148
- tag: "Time",
149
- ...TEXT_SEED_DATA,
150
- },
151
- {
152
- name: "Unordered List",
153
- tag: "UL",
154
- ...ELEMENT_SEED_DATA,
155
- },
156
- {
157
- name: "List Item",
158
- tag: "LI",
159
- ...TEXT_SEED_DATA,
160
- category: COMPONENT_TYPES.webelement,
161
- },
162
- {
163
- name: "Line Break",
164
- tag: "BR",
165
- ...ELEMENT_SEED_DATA,
166
- },
167
- {
168
- name: "Horizontal Rule",
169
- tag: "HR",
170
- ...ELEMENT_SEED_DATA,
171
- },
172
- {
173
- name: "Anchor",
174
- tag: "A",
175
- ...TEXT_SEED_DATA,
176
- props: {
177
- ...TEXT_SEED_DATA.props,
178
- href: createTextProp({
179
- label: "href",
180
- description: "Specify the URL",
181
- defaultValue: "",
182
- }),
183
- target: {
184
- group: GROUPS.basic,
185
- label: "target",
186
- description: "decide where link should open",
187
- formType: FORM_TYPES.flatArray,
188
- defaultValue: "_blank",
189
- options: ["_blank", "_self", "_parent", "_top"],
190
- },
191
- },
192
- category: COMPONENT_TYPES.webelement,
193
- },
194
- ];