@draftbit/core 46.2.1-de631b.0 → 46.2.1-f4deff.4

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 (36) hide show
  1. package/lib/commonjs/components/CardContainerShortImage.js +18 -5
  2. package/lib/commonjs/components/CardContainerShortImage.js.map +1 -1
  3. package/lib/commonjs/components/Portal/PortalManager.js +19 -11
  4. package/lib/commonjs/components/Portal/PortalManager.js.map +1 -1
  5. package/lib/commonjs/hooks.js.map +1 -1
  6. package/lib/commonjs/mappings/DatePicker.js +10 -0
  7. package/lib/commonjs/mappings/DatePicker.js.map +1 -1
  8. package/lib/commonjs/mappings/FlatList.js +4 -0
  9. package/lib/commonjs/mappings/FlatList.js.map +1 -1
  10. package/lib/commonjs/mappings/SwiperItem.js.map +1 -1
  11. package/lib/commonjs/mappings/Text.js +33 -26
  12. package/lib/commonjs/mappings/Text.js.map +1 -1
  13. package/lib/commonjs/mappings/TextArea.js +11 -0
  14. package/lib/commonjs/mappings/TextArea.js.map +1 -1
  15. package/lib/commonjs/styles/shadow.js.map +1 -1
  16. package/lib/module/mappings/DatePicker.js +10 -0
  17. package/lib/module/mappings/DatePicker.js.map +1 -1
  18. package/lib/module/mappings/FlatList.js +4 -0
  19. package/lib/module/mappings/FlatList.js.map +1 -1
  20. package/lib/module/mappings/Text.js +33 -26
  21. package/lib/module/mappings/Text.js.map +1 -1
  22. package/lib/module/mappings/TextArea.js +11 -0
  23. package/lib/module/mappings/TextArea.js.map +1 -1
  24. package/lib/typescript/src/mappings/DatePicker.d.ts +10 -0
  25. package/lib/typescript/src/mappings/FlatList.d.ts +10 -0
  26. package/lib/typescript/src/mappings/Text.d.ts +24 -10
  27. package/lib/typescript/src/mappings/TextArea.d.ts +11 -0
  28. package/package.json +3 -3
  29. package/src/mappings/DatePicker.js +10 -0
  30. package/src/mappings/DatePicker.ts +10 -0
  31. package/src/mappings/FlatList.js +4 -0
  32. package/src/mappings/FlatList.ts +4 -0
  33. package/src/mappings/Text.js +33 -26
  34. package/src/mappings/Text.ts +34 -27
  35. package/src/mappings/TextArea.js +11 -0
  36. package/src/mappings/TextArea.ts +11 -0
@@ -12,6 +12,10 @@ export const SEED_DATA = {
12
12
  label: "Horizontal",
13
13
  description: "Render list horizontally",
14
14
  }),
15
+ inverted: createStaticBoolProp({
16
+ label: "Inverted",
17
+ description: "If true, reverses the direction.",
18
+ }),
15
19
  numColumns: createNumColumnsType({
16
20
  editable: true,
17
21
  }),
@@ -17,6 +17,10 @@ export const SEED_DATA = {
17
17
  label: "Horizontal",
18
18
  description: "Render list horizontally",
19
19
  }),
20
+ inverted: createStaticBoolProp({
21
+ label: "Inverted",
22
+ description: "If true, reverses the direction.",
23
+ }),
20
24
  numColumns: createNumColumnsType({
21
25
  editable: true,
22
26
  }),
@@ -5,7 +5,18 @@ const SEED_DATA_PROPS = {
5
5
  name: "accessibilityLabel",
6
6
  label: "accessibilityLabel",
7
7
  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.",
8
- editable: false,
8
+ editable: true,
9
+ required: false,
10
+ formType: FORM_TYPES.string,
11
+ propType: PROP_TYPES.STRING,
12
+ defaultValue: null,
13
+ },
14
+ accessibilityHint: {
15
+ group: GROUPS.accessibility,
16
+ name: "accessibilityHint",
17
+ label: "accessibilityHint",
18
+ description: "An accessibility hint helps users understand what will happen when they perform an action on the accessibility element when that result is not clear from the accessibility label.",
19
+ editable: true,
9
20
  required: false,
10
21
  formType: FORM_TYPES.string,
11
22
  propType: PROP_TYPES.STRING,
@@ -29,7 +40,7 @@ const SEED_DATA_PROPS = {
29
40
  "imagebutton",
30
41
  "adjustable",
31
42
  ],
32
- editable: false,
43
+ editable: true,
33
44
  required: false,
34
45
  formType: FORM_TYPES.flatArray,
35
46
  propType: PROP_TYPES.STRING,
@@ -39,8 +50,8 @@ const SEED_DATA_PROPS = {
39
50
  group: GROUPS.accessibility,
40
51
  name: "accessible",
41
52
  label: "accessible",
42
- description: "When set to true, indicates that the view is an accessibility element. The default value for a Text element is true.See the Accessibility guide for more information.",
43
- editable: false,
53
+ description: "When set to true, indicates that the view is an accessibility element. The default value for a Text element is true. See the Accessibility guide for more information.",
54
+ editable: true,
44
55
  required: false,
45
56
  formType: FORM_TYPES.boolean,
46
57
  propType: PROP_TYPES.BOOLEAN,
@@ -51,7 +62,7 @@ const SEED_DATA_PROPS = {
51
62
  name: "adjustsFontSizeToFit",
52
63
  label: "adjustsFontSizeToFit",
53
64
  description: "Specifies whether fonts should be scaled down automatically to fit given style constraints.",
54
- editable: false,
65
+ editable: true,
55
66
  required: false,
56
67
  formType: FORM_TYPES.boolean,
57
68
  propType: PROP_TYPES.BOOLEAN,
@@ -62,7 +73,7 @@ const SEED_DATA_PROPS = {
62
73
  name: "allowFontScaling",
63
74
  label: "allowFontScaling",
64
75
  description: "Specifies whether fonts should scale to respect Text Size accessibility settings. The default is true.",
65
- editable: false,
76
+ editable: true,
66
77
  required: false,
67
78
  formType: FORM_TYPES.boolean,
68
79
  propType: PROP_TYPES.BOOLEAN,
@@ -72,9 +83,9 @@ const SEED_DATA_PROPS = {
72
83
  group: GROUPS.advanced,
73
84
  name: "dataDetectorType",
74
85
  label: "dataDetectorType",
75
- description: "Determines the types of data converted to clickable URLs in the text element. By default no data types are detected.You can provide only one type.Possible values for dataDetectorType are:\n'phoneNumber'\n'link'\n'email'\n'none'\n'all'\n",
86
+ description: "Determines the types of data converted to clickable URLs in the text element. By default no data types are detected. You can provide only one type. Possible values for dataDetectorType are:\n'phoneNumber'\n'link'\n'email'\n'none'\n'all'\n",
76
87
  options: ["phoneNumber", "link", "email", "none", "all"],
77
- editable: false,
88
+ editable: true,
78
89
  required: false,
79
90
  formType: FORM_TYPES.flatArray,
80
91
  propType: PROP_TYPES.STRING,
@@ -85,7 +96,7 @@ const SEED_DATA_PROPS = {
85
96
  name: "disabled",
86
97
  label: "disabled",
87
98
  description: "Specifies the disabled state of the text view for testing purposes",
88
- editable: false,
99
+ editable: true,
89
100
  required: false,
90
101
  formType: FORM_TYPES.boolean,
91
102
  propType: PROP_TYPES.BOOLEAN,
@@ -108,25 +119,21 @@ const SEED_DATA_PROPS = {
108
119
  name: "maxFontSizeMultiplier",
109
120
  label: "maxFontSizeMultiplier",
110
121
  description: "Specifies largest possible scale a font can reach when allowFontScaling is enabled. Possible values:\nnull/undefined (default): inherit from the parent node or the global default (0)\n0: no max, ignore parent/global default\n>= 1: sets the maxFontSizeMultiplier of this node to this value\n",
111
- editable: false,
122
+ editable: true,
112
123
  required: false,
113
124
  formType: FORM_TYPES.number,
114
125
  propType: PROP_TYPES.NUMBER,
115
126
  defaultValue: null,
116
127
  },
117
- minimumFontScale: {
118
- group: GROUPS.advanced,
119
- name: "minimumFontScale",
120
- label: "minimumFontScale",
121
- description: "Specifies smallest possible scale a font can reach when adjustsFontSizeToFit is enabled. (values 0.01-1.0).",
122
- editable: false,
128
+ nativeID: {
129
+ group: GROUPS.accessibility,
130
+ name: "nativeID",
131
+ label: "nativeID",
132
+ description: "Used to locate this view from native code.",
133
+ editable: true,
123
134
  required: false,
124
- formType: FORM_TYPES.number,
125
- propType: PROP_TYPES.NUMBER,
126
- min: 0.01,
127
- step: 0.01,
128
- precision: 2,
129
- max: 1.0,
135
+ formType: FORM_TYPES.string,
136
+ propType: PROP_TYPES.STRING,
130
137
  defaultValue: null,
131
138
  },
132
139
  numberOfLines: {
@@ -147,7 +154,7 @@ const SEED_DATA_PROPS = {
147
154
  name: "selectable",
148
155
  label: "selectable",
149
156
  description: "Lets the user select text, to use the native copy and paste functionality.",
150
- editable: false,
157
+ editable: true,
151
158
  required: false,
152
159
  formType: FORM_TYPES.boolean,
153
160
  propType: PROP_TYPES.BOOLEAN,
@@ -158,7 +165,7 @@ const SEED_DATA_PROPS = {
158
165
  name: "selectionColor",
159
166
  label: "selectionColor",
160
167
  description: "The highlight color of the text.",
161
- editable: false,
168
+ editable: true,
162
169
  required: false,
163
170
  formType: FORM_TYPES.color,
164
171
  propType: PROP_TYPES.THEME,
@@ -169,7 +176,7 @@ const SEED_DATA_PROPS = {
169
176
  name: "suppressHighlighting",
170
177
  label: "suppressHighlighting",
171
178
  description: "When true, no visual change is made when text is pressed down. By default, a gray oval highlights the text on press down.",
172
- editable: false,
179
+ editable: true,
173
180
  required: false,
174
181
  formType: FORM_TYPES.boolean,
175
182
  propType: PROP_TYPES.BOOLEAN,
@@ -181,7 +188,7 @@ const SEED_DATA_PROPS = {
181
188
  label: "textBreakStrategy",
182
189
  description: "Set text break strategy on Android API Level 23+, possible values are simple, highQuality, balanced The default value is highQuality.",
183
190
  options: ["simple", "highQuality", "balanced"],
184
- editable: false,
191
+ editable: true,
185
192
  required: false,
186
193
  formType: FORM_TYPES.flatArray,
187
194
  propType: PROP_TYPES.STRING,
@@ -15,7 +15,19 @@ const SEED_DATA_PROPS = {
15
15
  label: "accessibilityLabel",
16
16
  description:
17
17
  "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.",
18
- editable: false,
18
+ editable: true,
19
+ required: false,
20
+ formType: FORM_TYPES.string,
21
+ propType: PROP_TYPES.STRING,
22
+ defaultValue: null,
23
+ },
24
+ accessibilityHint: {
25
+ group: GROUPS.accessibility,
26
+ name: "accessibilityHint",
27
+ label: "accessibilityHint",
28
+ description:
29
+ "An accessibility hint helps users understand what will happen when they perform an action on the accessibility element when that result is not clear from the accessibility label.",
30
+ editable: true,
19
31
  required: false,
20
32
  formType: FORM_TYPES.string,
21
33
  propType: PROP_TYPES.STRING,
@@ -40,7 +52,7 @@ const SEED_DATA_PROPS = {
40
52
  "imagebutton",
41
53
  "adjustable",
42
54
  ],
43
- editable: false,
55
+ editable: true,
44
56
  required: false,
45
57
  formType: FORM_TYPES.flatArray,
46
58
  propType: PROP_TYPES.STRING,
@@ -51,8 +63,8 @@ const SEED_DATA_PROPS = {
51
63
  name: "accessible",
52
64
  label: "accessible",
53
65
  description:
54
- "When set to true, indicates that the view is an accessibility element. The default value for a Text element is true.See the Accessibility guide for more information.",
55
- editable: false,
66
+ "When set to true, indicates that the view is an accessibility element. The default value for a Text element is true. See the Accessibility guide for more information.",
67
+ editable: true,
56
68
  required: false,
57
69
  formType: FORM_TYPES.boolean,
58
70
  propType: PROP_TYPES.BOOLEAN,
@@ -64,7 +76,7 @@ const SEED_DATA_PROPS = {
64
76
  label: "adjustsFontSizeToFit",
65
77
  description:
66
78
  "Specifies whether fonts should be scaled down automatically to fit given style constraints.",
67
- editable: false,
79
+ editable: true,
68
80
  required: false,
69
81
  formType: FORM_TYPES.boolean,
70
82
  propType: PROP_TYPES.BOOLEAN,
@@ -76,7 +88,7 @@ const SEED_DATA_PROPS = {
76
88
  label: "allowFontScaling",
77
89
  description:
78
90
  "Specifies whether fonts should scale to respect Text Size accessibility settings. The default is true.",
79
- editable: false,
91
+ editable: true,
80
92
  required: false,
81
93
  formType: FORM_TYPES.boolean,
82
94
  propType: PROP_TYPES.BOOLEAN,
@@ -87,9 +99,9 @@ const SEED_DATA_PROPS = {
87
99
  name: "dataDetectorType",
88
100
  label: "dataDetectorType",
89
101
  description:
90
- "Determines the types of data converted to clickable URLs in the text element. By default no data types are detected.You can provide only one type.Possible values for dataDetectorType are:\n'phoneNumber'\n'link'\n'email'\n'none'\n'all'\n",
102
+ "Determines the types of data converted to clickable URLs in the text element. By default no data types are detected. You can provide only one type. Possible values for dataDetectorType are:\n'phoneNumber'\n'link'\n'email'\n'none'\n'all'\n",
91
103
  options: ["phoneNumber", "link", "email", "none", "all"],
92
- editable: false,
104
+ editable: true,
93
105
  required: false,
94
106
  formType: FORM_TYPES.flatArray,
95
107
  propType: PROP_TYPES.STRING,
@@ -101,7 +113,7 @@ const SEED_DATA_PROPS = {
101
113
  label: "disabled",
102
114
  description:
103
115
  "Specifies the disabled state of the text view for testing purposes",
104
- editable: false,
116
+ editable: true,
105
117
  required: false,
106
118
  formType: FORM_TYPES.boolean,
107
119
  propType: PROP_TYPES.BOOLEAN,
@@ -126,26 +138,21 @@ const SEED_DATA_PROPS = {
126
138
  label: "maxFontSizeMultiplier",
127
139
  description:
128
140
  "Specifies largest possible scale a font can reach when allowFontScaling is enabled. Possible values:\nnull/undefined (default): inherit from the parent node or the global default (0)\n0: no max, ignore parent/global default\n>= 1: sets the maxFontSizeMultiplier of this node to this value\n",
129
- editable: false,
141
+ editable: true,
130
142
  required: false,
131
143
  formType: FORM_TYPES.number,
132
144
  propType: PROP_TYPES.NUMBER,
133
145
  defaultValue: null,
134
146
  },
135
- minimumFontScale: {
136
- group: GROUPS.advanced,
137
- name: "minimumFontScale",
138
- label: "minimumFontScale",
139
- description:
140
- "Specifies smallest possible scale a font can reach when adjustsFontSizeToFit is enabled. (values 0.01-1.0).",
141
- editable: false,
147
+ nativeID: {
148
+ group: GROUPS.accessibility,
149
+ name: "nativeID",
150
+ label: "nativeID",
151
+ description: "Used to locate this view from native code.",
152
+ editable: true,
142
153
  required: false,
143
- formType: FORM_TYPES.number,
144
- propType: PROP_TYPES.NUMBER,
145
- min: 0.01,
146
- step: 0.01,
147
- precision: 2,
148
- max: 1.0,
154
+ formType: FORM_TYPES.string,
155
+ propType: PROP_TYPES.STRING,
149
156
  defaultValue: null,
150
157
  },
151
158
  numberOfLines: {
@@ -168,7 +175,7 @@ const SEED_DATA_PROPS = {
168
175
  label: "selectable",
169
176
  description:
170
177
  "Lets the user select text, to use the native copy and paste functionality.",
171
- editable: false,
178
+ editable: true,
172
179
  required: false,
173
180
  formType: FORM_TYPES.boolean,
174
181
  propType: PROP_TYPES.BOOLEAN,
@@ -179,7 +186,7 @@ const SEED_DATA_PROPS = {
179
186
  name: "selectionColor",
180
187
  label: "selectionColor",
181
188
  description: "The highlight color of the text.",
182
- editable: false,
189
+ editable: true,
183
190
  required: false,
184
191
  formType: FORM_TYPES.color,
185
192
  propType: PROP_TYPES.THEME,
@@ -191,7 +198,7 @@ const SEED_DATA_PROPS = {
191
198
  label: "suppressHighlighting",
192
199
  description:
193
200
  "When true, no visual change is made when text is pressed down. By default, a gray oval highlights the text on press down.",
194
- editable: false,
201
+ editable: true,
195
202
  required: false,
196
203
  formType: FORM_TYPES.boolean,
197
204
  propType: PROP_TYPES.BOOLEAN,
@@ -204,7 +211,7 @@ const SEED_DATA_PROPS = {
204
211
  description:
205
212
  "Set text break strategy on Android API Level 23+, possible values are simple, highQuality, balanced The default value is highQuality.",
206
213
  options: ["simple", "highQuality", "balanced"],
207
- editable: false,
214
+ editable: true,
208
215
  required: false,
209
216
  formType: FORM_TYPES.flatArray,
210
217
  propType: PROP_TYPES.STRING,
@@ -205,6 +205,17 @@ const TEXT_AREA_PROPS = {
205
205
  formType: FORM_TYPES.boolean,
206
206
  propType: PROP_TYPES.BOOLEAN,
207
207
  },
208
+ textAlignVertical: {
209
+ group: GROUPS.advanced,
210
+ label: "Aligns text on the vertical axis",
211
+ description: "Move the text around in the given component.",
212
+ options: ["auto", "top", "bottom", "center"],
213
+ editable: true,
214
+ required: false,
215
+ defaultValue: "top",
216
+ formType: FORM_TYPES.flatArray,
217
+ propType: PROP_TYPES.STRING,
218
+ },
208
219
  };
209
220
  export const SEED_DATA = {
210
221
  name: "Text Area",
@@ -219,6 +219,17 @@ const TEXT_AREA_PROPS = {
219
219
  formType: FORM_TYPES.boolean,
220
220
  propType: PROP_TYPES.BOOLEAN,
221
221
  },
222
+ textAlignVertical: {
223
+ group: GROUPS.advanced,
224
+ label: "Aligns text on the vertical axis",
225
+ description: "Move the text around in the given component.",
226
+ options: ["auto", "top", "bottom", "center"],
227
+ editable: true,
228
+ required: false,
229
+ defaultValue: "top",
230
+ formType: FORM_TYPES.flatArray,
231
+ propType: PROP_TYPES.STRING,
232
+ },
222
233
  };
223
234
 
224
235
  export const SEED_DATA = {