@webstudio-is/sdk-components-react-remix 0.95.0 → 0.97.0
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/components.js +82 -4
- package/lib/metas.js +726 -4
- package/lib/props.js +1184 -4
- package/package.json +8 -8
- package/lib/__generated__/form.props.js +0 -569
- package/lib/__generated__/link.props.js +0 -572
- package/lib/__generated__/rich-text-link.props.js +0 -571
- package/lib/form.js +0 -40
- package/lib/form.ws.js +0 -136
- package/lib/link.js +0 -4
- package/lib/link.ws.js +0 -14
- package/lib/rich-text-link.js +0 -4
- package/lib/rich-text-link.ws.js +0 -4
- package/lib/shared/remix-link.js +0 -27
package/lib/metas.js
CHANGED
|
@@ -1,4 +1,726 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
// src/__generated__/link.props.ts
|
|
2
|
+
var props = {
|
|
3
|
+
about: { required: false, control: "text", type: "string" },
|
|
4
|
+
accessKey: {
|
|
5
|
+
required: false,
|
|
6
|
+
control: "text",
|
|
7
|
+
type: "string",
|
|
8
|
+
description: "Keyboard shortcut to activate or add focus to the element."
|
|
9
|
+
},
|
|
10
|
+
"aria-activedescendant": {
|
|
11
|
+
description: "Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.",
|
|
12
|
+
required: false,
|
|
13
|
+
control: "text",
|
|
14
|
+
type: "string"
|
|
15
|
+
},
|
|
16
|
+
"aria-atomic": {
|
|
17
|
+
description: "Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute.",
|
|
18
|
+
required: false,
|
|
19
|
+
control: "boolean",
|
|
20
|
+
type: "boolean"
|
|
21
|
+
},
|
|
22
|
+
"aria-autocomplete": {
|
|
23
|
+
description: "Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be\npresented if they are made.",
|
|
24
|
+
required: false,
|
|
25
|
+
control: "select",
|
|
26
|
+
type: "string",
|
|
27
|
+
options: ["list", "none", "inline", "both"]
|
|
28
|
+
},
|
|
29
|
+
"aria-braillelabel": {
|
|
30
|
+
description: "Defines a string value that labels the current element, which is intended to be converted into Braille.\n@see aria-label.",
|
|
31
|
+
required: false,
|
|
32
|
+
control: "text",
|
|
33
|
+
type: "string"
|
|
34
|
+
},
|
|
35
|
+
"aria-brailleroledescription": {
|
|
36
|
+
description: "Defines a human-readable, author-localized abbreviated description for the role of an element, which is intended to be converted into Braille.\n@see aria-roledescription.",
|
|
37
|
+
required: false,
|
|
38
|
+
control: "text",
|
|
39
|
+
type: "string"
|
|
40
|
+
},
|
|
41
|
+
"aria-busy": { required: false, control: "boolean", type: "boolean" },
|
|
42
|
+
"aria-checked": {
|
|
43
|
+
description: 'Indicates the current "checked" state of checkboxes, radio buttons, and other widgets.\n@see aria-pressed\n@see aria-selected.',
|
|
44
|
+
required: false,
|
|
45
|
+
control: "text",
|
|
46
|
+
type: "string"
|
|
47
|
+
},
|
|
48
|
+
"aria-colcount": {
|
|
49
|
+
description: "Defines the total number of columns in a table, grid, or treegrid.\n@see aria-colindex.",
|
|
50
|
+
required: false,
|
|
51
|
+
control: "number",
|
|
52
|
+
type: "number"
|
|
53
|
+
},
|
|
54
|
+
"aria-colindex": {
|
|
55
|
+
description: "Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.\n@see aria-colcount\n@see aria-colspan.",
|
|
56
|
+
required: false,
|
|
57
|
+
control: "number",
|
|
58
|
+
type: "number"
|
|
59
|
+
},
|
|
60
|
+
"aria-colindextext": {
|
|
61
|
+
description: "Defines a human readable text alternative of aria-colindex.\n@see aria-rowindextext.",
|
|
62
|
+
required: false,
|
|
63
|
+
control: "text",
|
|
64
|
+
type: "string"
|
|
65
|
+
},
|
|
66
|
+
"aria-colspan": {
|
|
67
|
+
description: "Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-colindex\n@see aria-rowspan.",
|
|
68
|
+
required: false,
|
|
69
|
+
control: "number",
|
|
70
|
+
type: "number"
|
|
71
|
+
},
|
|
72
|
+
"aria-controls": {
|
|
73
|
+
description: "Identifies the element (or elements) whose contents or presence are controlled by the current element.\n@see aria-owns.",
|
|
74
|
+
required: false,
|
|
75
|
+
control: "text",
|
|
76
|
+
type: "string"
|
|
77
|
+
},
|
|
78
|
+
"aria-current": {
|
|
79
|
+
description: "Indicates the element that represents the current item within a container or set of related elements.",
|
|
80
|
+
required: false,
|
|
81
|
+
control: "text",
|
|
82
|
+
type: "string"
|
|
83
|
+
},
|
|
84
|
+
"aria-describedby": {
|
|
85
|
+
description: "Identifies the element (or elements) that describes the object.\n@see aria-labelledby",
|
|
86
|
+
required: false,
|
|
87
|
+
control: "text",
|
|
88
|
+
type: "string"
|
|
89
|
+
},
|
|
90
|
+
"aria-description": {
|
|
91
|
+
description: "Defines a string value that describes or annotates the current element.\n@see related aria-describedby.",
|
|
92
|
+
required: false,
|
|
93
|
+
control: "text",
|
|
94
|
+
type: "string"
|
|
95
|
+
},
|
|
96
|
+
"aria-details": {
|
|
97
|
+
description: "Identifies the element that provides a detailed, extended description for the object.\n@see aria-describedby.",
|
|
98
|
+
required: false,
|
|
99
|
+
control: "text",
|
|
100
|
+
type: "string"
|
|
101
|
+
},
|
|
102
|
+
"aria-disabled": {
|
|
103
|
+
description: "Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.\n@see aria-hidden\n@see aria-readonly.",
|
|
104
|
+
required: false,
|
|
105
|
+
control: "boolean",
|
|
106
|
+
type: "boolean"
|
|
107
|
+
},
|
|
108
|
+
"aria-dropeffect": {
|
|
109
|
+
description: "Indicates what functions can be performed when a dragged object is released on the drop target.\n@deprecated in ARIA 1.1",
|
|
110
|
+
required: false,
|
|
111
|
+
control: "select",
|
|
112
|
+
type: "string",
|
|
113
|
+
options: ["link", "none", "copy", "execute", "move", "popup"]
|
|
114
|
+
},
|
|
115
|
+
"aria-errormessage": {
|
|
116
|
+
description: "Identifies the element that provides an error message for the object.\n@see aria-invalid\n@see aria-describedby.",
|
|
117
|
+
required: false,
|
|
118
|
+
control: "text",
|
|
119
|
+
type: "string"
|
|
120
|
+
},
|
|
121
|
+
"aria-expanded": {
|
|
122
|
+
description: "Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed.",
|
|
123
|
+
required: false,
|
|
124
|
+
control: "boolean",
|
|
125
|
+
type: "boolean"
|
|
126
|
+
},
|
|
127
|
+
"aria-flowto": {
|
|
128
|
+
description: "Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion,\nallows assistive technology to override the general default of reading in document source order.",
|
|
129
|
+
required: false,
|
|
130
|
+
control: "text",
|
|
131
|
+
type: "string"
|
|
132
|
+
},
|
|
133
|
+
"aria-grabbed": {
|
|
134
|
+
description: `Indicates an element's "grabbed" state in a drag-and-drop operation.
|
|
135
|
+
@deprecated in ARIA 1.1`,
|
|
136
|
+
required: false,
|
|
137
|
+
control: "boolean",
|
|
138
|
+
type: "boolean"
|
|
139
|
+
},
|
|
140
|
+
"aria-haspopup": {
|
|
141
|
+
description: "Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.",
|
|
142
|
+
required: false,
|
|
143
|
+
control: "text",
|
|
144
|
+
type: "string"
|
|
145
|
+
},
|
|
146
|
+
"aria-hidden": {
|
|
147
|
+
description: "Indicates whether the element is exposed to an accessibility API.\n@see aria-disabled.",
|
|
148
|
+
required: false,
|
|
149
|
+
control: "boolean",
|
|
150
|
+
type: "boolean"
|
|
151
|
+
},
|
|
152
|
+
"aria-invalid": {
|
|
153
|
+
description: "Indicates the entered value does not conform to the format expected by the application.\n@see aria-errormessage.",
|
|
154
|
+
required: false,
|
|
155
|
+
control: "text",
|
|
156
|
+
type: "string"
|
|
157
|
+
},
|
|
158
|
+
"aria-keyshortcuts": {
|
|
159
|
+
description: "Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element.",
|
|
160
|
+
required: false,
|
|
161
|
+
control: "text",
|
|
162
|
+
type: "string"
|
|
163
|
+
},
|
|
164
|
+
"aria-label": {
|
|
165
|
+
description: "Provides the accessible name that describes an interactive element if no other accessible name exists, for example in a button that contains an image with no text.",
|
|
166
|
+
required: false,
|
|
167
|
+
control: "text",
|
|
168
|
+
type: "string"
|
|
169
|
+
},
|
|
170
|
+
"aria-labelledby": {
|
|
171
|
+
description: "Identifies the element (or elements) that labels the current element.\n@see aria-describedby.",
|
|
172
|
+
required: false,
|
|
173
|
+
control: "text",
|
|
174
|
+
type: "string"
|
|
175
|
+
},
|
|
176
|
+
"aria-level": {
|
|
177
|
+
description: "Defines the hierarchical level of an element within a structure.",
|
|
178
|
+
required: false,
|
|
179
|
+
control: "number",
|
|
180
|
+
type: "number"
|
|
181
|
+
},
|
|
182
|
+
"aria-live": {
|
|
183
|
+
description: "Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region.",
|
|
184
|
+
required: false,
|
|
185
|
+
control: "radio",
|
|
186
|
+
type: "string",
|
|
187
|
+
options: ["off", "assertive", "polite"]
|
|
188
|
+
},
|
|
189
|
+
"aria-modal": {
|
|
190
|
+
description: "Indicates whether an element is modal when displayed.",
|
|
191
|
+
required: false,
|
|
192
|
+
control: "boolean",
|
|
193
|
+
type: "boolean"
|
|
194
|
+
},
|
|
195
|
+
"aria-multiline": {
|
|
196
|
+
description: "Indicates whether a text box accepts multiple lines of input or only a single line.",
|
|
197
|
+
required: false,
|
|
198
|
+
control: "boolean",
|
|
199
|
+
type: "boolean"
|
|
200
|
+
},
|
|
201
|
+
"aria-multiselectable": {
|
|
202
|
+
description: "Indicates that the user may select more than one item from the current selectable descendants.",
|
|
203
|
+
required: false,
|
|
204
|
+
control: "boolean",
|
|
205
|
+
type: "boolean"
|
|
206
|
+
},
|
|
207
|
+
"aria-orientation": {
|
|
208
|
+
description: "Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous.",
|
|
209
|
+
required: false,
|
|
210
|
+
control: "radio",
|
|
211
|
+
type: "string",
|
|
212
|
+
options: ["horizontal", "vertical"]
|
|
213
|
+
},
|
|
214
|
+
"aria-owns": {
|
|
215
|
+
description: "Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship\nbetween DOM elements where the DOM hierarchy cannot be used to represent the relationship.\n@see aria-controls.",
|
|
216
|
+
required: false,
|
|
217
|
+
control: "text",
|
|
218
|
+
type: "string"
|
|
219
|
+
},
|
|
220
|
+
"aria-placeholder": {
|
|
221
|
+
description: "Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value.\nA hint could be a sample value or a brief description of the expected format.",
|
|
222
|
+
required: false,
|
|
223
|
+
control: "text",
|
|
224
|
+
type: "string"
|
|
225
|
+
},
|
|
226
|
+
"aria-posinset": {
|
|
227
|
+
description: "Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-setsize.",
|
|
228
|
+
required: false,
|
|
229
|
+
control: "number",
|
|
230
|
+
type: "number"
|
|
231
|
+
},
|
|
232
|
+
"aria-pressed": {
|
|
233
|
+
description: 'Indicates the current "pressed" state of toggle buttons.\n@see aria-checked\n@see aria-selected.',
|
|
234
|
+
required: false,
|
|
235
|
+
control: "text",
|
|
236
|
+
type: "string"
|
|
237
|
+
},
|
|
238
|
+
"aria-readonly": {
|
|
239
|
+
description: "Indicates that the element is not editable, but is otherwise operable.\n@see aria-disabled.",
|
|
240
|
+
required: false,
|
|
241
|
+
control: "boolean",
|
|
242
|
+
type: "boolean"
|
|
243
|
+
},
|
|
244
|
+
"aria-relevant": {
|
|
245
|
+
description: "Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.\n@see aria-atomic.",
|
|
246
|
+
required: false,
|
|
247
|
+
control: "select",
|
|
248
|
+
type: "string",
|
|
249
|
+
options: [
|
|
250
|
+
"text",
|
|
251
|
+
"additions",
|
|
252
|
+
"additions removals",
|
|
253
|
+
"additions text",
|
|
254
|
+
"all",
|
|
255
|
+
"removals",
|
|
256
|
+
"removals additions",
|
|
257
|
+
"removals text",
|
|
258
|
+
"text additions",
|
|
259
|
+
"text removals"
|
|
260
|
+
]
|
|
261
|
+
},
|
|
262
|
+
"aria-required": {
|
|
263
|
+
description: "Indicates that user input is required on the element before a form may be submitted.",
|
|
264
|
+
required: false,
|
|
265
|
+
control: "boolean",
|
|
266
|
+
type: "boolean"
|
|
267
|
+
},
|
|
268
|
+
"aria-roledescription": {
|
|
269
|
+
description: "Defines a human-readable, author-localized description for the role of an element.",
|
|
270
|
+
required: false,
|
|
271
|
+
control: "text",
|
|
272
|
+
type: "string"
|
|
273
|
+
},
|
|
274
|
+
"aria-rowcount": {
|
|
275
|
+
description: "Defines the total number of rows in a table, grid, or treegrid.\n@see aria-rowindex.",
|
|
276
|
+
required: false,
|
|
277
|
+
control: "number",
|
|
278
|
+
type: "number"
|
|
279
|
+
},
|
|
280
|
+
"aria-rowindex": {
|
|
281
|
+
description: "Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.\n@see aria-rowcount\n@see aria-rowspan.",
|
|
282
|
+
required: false,
|
|
283
|
+
control: "number",
|
|
284
|
+
type: "number"
|
|
285
|
+
},
|
|
286
|
+
"aria-rowindextext": {
|
|
287
|
+
description: "Defines a human readable text alternative of aria-rowindex.\n@see aria-colindextext.",
|
|
288
|
+
required: false,
|
|
289
|
+
control: "text",
|
|
290
|
+
type: "string"
|
|
291
|
+
},
|
|
292
|
+
"aria-rowspan": {
|
|
293
|
+
description: "Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-rowindex\n@see aria-colspan.",
|
|
294
|
+
required: false,
|
|
295
|
+
control: "number",
|
|
296
|
+
type: "number"
|
|
297
|
+
},
|
|
298
|
+
"aria-selected": {
|
|
299
|
+
description: 'Indicates the current "selected" state of various widgets.\n@see aria-checked\n@see aria-pressed.',
|
|
300
|
+
required: false,
|
|
301
|
+
control: "boolean",
|
|
302
|
+
type: "boolean"
|
|
303
|
+
},
|
|
304
|
+
"aria-setsize": {
|
|
305
|
+
description: "Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-posinset.",
|
|
306
|
+
required: false,
|
|
307
|
+
control: "number",
|
|
308
|
+
type: "number"
|
|
309
|
+
},
|
|
310
|
+
"aria-sort": {
|
|
311
|
+
description: "Indicates if items in a table or grid are sorted in ascending or descending order.",
|
|
312
|
+
required: false,
|
|
313
|
+
control: "select",
|
|
314
|
+
type: "string",
|
|
315
|
+
options: ["none", "ascending", "descending", "other"]
|
|
316
|
+
},
|
|
317
|
+
"aria-valuemax": {
|
|
318
|
+
description: "Defines the maximum allowed value for a range widget.",
|
|
319
|
+
required: false,
|
|
320
|
+
control: "number",
|
|
321
|
+
type: "number"
|
|
322
|
+
},
|
|
323
|
+
"aria-valuemin": {
|
|
324
|
+
description: "Defines the minimum allowed value for a range widget.",
|
|
325
|
+
required: false,
|
|
326
|
+
control: "number",
|
|
327
|
+
type: "number"
|
|
328
|
+
},
|
|
329
|
+
"aria-valuenow": {
|
|
330
|
+
description: "Defines the current value for a range widget.\n@see aria-valuetext.",
|
|
331
|
+
required: false,
|
|
332
|
+
control: "number",
|
|
333
|
+
type: "number"
|
|
334
|
+
},
|
|
335
|
+
"aria-valuetext": {
|
|
336
|
+
description: "Defines the human readable text alternative of aria-valuenow for a range widget.",
|
|
337
|
+
required: false,
|
|
338
|
+
control: "text",
|
|
339
|
+
type: "string"
|
|
340
|
+
},
|
|
341
|
+
autoCapitalize: {
|
|
342
|
+
required: false,
|
|
343
|
+
control: "text",
|
|
344
|
+
type: "string",
|
|
345
|
+
description: "Sets whether input is automatically capitalized when entered by user."
|
|
346
|
+
},
|
|
347
|
+
autoCorrect: { required: false, control: "text", type: "string" },
|
|
348
|
+
autoFocus: {
|
|
349
|
+
required: false,
|
|
350
|
+
control: "boolean",
|
|
351
|
+
type: "boolean",
|
|
352
|
+
description: "Indicates that an element should be focused on page load, or when its parent dialog is displayed."
|
|
353
|
+
},
|
|
354
|
+
autoSave: { required: false, control: "text", type: "string" },
|
|
355
|
+
className: { required: false, control: "text", type: "string" },
|
|
356
|
+
color: {
|
|
357
|
+
required: false,
|
|
358
|
+
control: "color",
|
|
359
|
+
type: "string",
|
|
360
|
+
description: "This attribute sets the text color using either a named color or a color specified in the hexadecimal #RRGGBB format. Note: This is a legacy attribute. Please use the CSS color property instead."
|
|
361
|
+
},
|
|
362
|
+
content: {
|
|
363
|
+
required: false,
|
|
364
|
+
control: "text",
|
|
365
|
+
type: "string",
|
|
366
|
+
description: "A value associated with http-equiv orname depending on the context."
|
|
367
|
+
},
|
|
368
|
+
contextMenu: {
|
|
369
|
+
required: false,
|
|
370
|
+
control: "text",
|
|
371
|
+
type: "string",
|
|
372
|
+
description: "Defines the ID of a menu element which willserve as the element's context menu."
|
|
373
|
+
},
|
|
374
|
+
datatype: { required: false, control: "text", type: "string" },
|
|
375
|
+
defaultChecked: { required: false, control: "boolean", type: "boolean" },
|
|
376
|
+
dir: {
|
|
377
|
+
required: false,
|
|
378
|
+
control: "text",
|
|
379
|
+
type: "string",
|
|
380
|
+
description: "Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)"
|
|
381
|
+
},
|
|
382
|
+
draggable: {
|
|
383
|
+
required: false,
|
|
384
|
+
control: "boolean",
|
|
385
|
+
type: "boolean",
|
|
386
|
+
description: "Defines whether the element can be dragged."
|
|
387
|
+
},
|
|
388
|
+
hidden: {
|
|
389
|
+
required: false,
|
|
390
|
+
control: "boolean",
|
|
391
|
+
type: "boolean",
|
|
392
|
+
description: "Prevents rendering of given element, while keeping child elements, e.g. script elements, active."
|
|
393
|
+
},
|
|
394
|
+
href: {
|
|
395
|
+
required: false,
|
|
396
|
+
control: "text",
|
|
397
|
+
type: "string",
|
|
398
|
+
description: "The URL of a linked resource."
|
|
399
|
+
},
|
|
400
|
+
hrefLang: {
|
|
401
|
+
required: false,
|
|
402
|
+
control: "text",
|
|
403
|
+
type: "string",
|
|
404
|
+
description: "Specifies the language of the linked resource."
|
|
405
|
+
},
|
|
406
|
+
id: {
|
|
407
|
+
required: false,
|
|
408
|
+
control: "text",
|
|
409
|
+
type: "string",
|
|
410
|
+
description: "Often used with CSS to style a specific element. The value of this attribute must be unique."
|
|
411
|
+
},
|
|
412
|
+
inputMode: {
|
|
413
|
+
description: "Hints at the type of data that might be entered by the user while editing the element or its contents\n@see https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute",
|
|
414
|
+
required: false,
|
|
415
|
+
control: "select",
|
|
416
|
+
type: "string",
|
|
417
|
+
options: [
|
|
418
|
+
"search",
|
|
419
|
+
"text",
|
|
420
|
+
"none",
|
|
421
|
+
"tel",
|
|
422
|
+
"url",
|
|
423
|
+
"email",
|
|
424
|
+
"numeric",
|
|
425
|
+
"decimal"
|
|
426
|
+
]
|
|
427
|
+
},
|
|
428
|
+
is: {
|
|
429
|
+
description: "Specify that a standard HTML element should behave like a defined custom built-in element\n@see https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is",
|
|
430
|
+
required: false,
|
|
431
|
+
control: "text",
|
|
432
|
+
type: "string"
|
|
433
|
+
},
|
|
434
|
+
itemID: { required: false, control: "text", type: "string" },
|
|
435
|
+
itemProp: { required: false, control: "text", type: "string" },
|
|
436
|
+
itemRef: { required: false, control: "text", type: "string" },
|
|
437
|
+
itemScope: { required: false, control: "boolean", type: "boolean" },
|
|
438
|
+
itemType: { required: false, control: "text", type: "string" },
|
|
439
|
+
lang: {
|
|
440
|
+
required: false,
|
|
441
|
+
control: "text",
|
|
442
|
+
type: "string",
|
|
443
|
+
description: "Defines the language used in the element."
|
|
444
|
+
},
|
|
445
|
+
media: {
|
|
446
|
+
required: false,
|
|
447
|
+
control: "text",
|
|
448
|
+
type: "string",
|
|
449
|
+
description: "Specifies a hint of the media for which the linked resource was designed."
|
|
450
|
+
},
|
|
451
|
+
nonce: { required: false, control: "text", type: "string" },
|
|
452
|
+
ping: {
|
|
453
|
+
required: false,
|
|
454
|
+
control: "text",
|
|
455
|
+
type: "string",
|
|
456
|
+
description: "The ping attribute specifies a space-separated list of URLs to be notified if a user follows the hyperlink."
|
|
457
|
+
},
|
|
458
|
+
placeholder: {
|
|
459
|
+
required: false,
|
|
460
|
+
control: "text",
|
|
461
|
+
type: "string",
|
|
462
|
+
description: "Provides a hint to the user of what can be entered in the field."
|
|
463
|
+
},
|
|
464
|
+
prefetch: {
|
|
465
|
+
required: false,
|
|
466
|
+
control: "select",
|
|
467
|
+
type: "string",
|
|
468
|
+
options: ["none", "intent", "render", "viewport"],
|
|
469
|
+
description: "Controls when and if the link prefetches the resources that the next page needs to make loading faster. \u201CIntent\u201D will prefetch when the link is hovered or focused. \u201CRender\u201D will prefetch when the link is rendered. \u201CViewport\u201D will prefetch when the link is in the viewport. \u201CNone\u201D will not prefetch."
|
|
470
|
+
},
|
|
471
|
+
prefix: { required: false, control: "text", type: "string" },
|
|
472
|
+
preventScrollReset: { required: false, control: "boolean", type: "boolean" },
|
|
473
|
+
property: { required: false, control: "text", type: "string" },
|
|
474
|
+
radioGroup: { required: false, control: "text", type: "string" },
|
|
475
|
+
referrerPolicy: {
|
|
476
|
+
required: false,
|
|
477
|
+
control: "select",
|
|
478
|
+
type: "string",
|
|
479
|
+
options: [
|
|
480
|
+
"",
|
|
481
|
+
"no-referrer",
|
|
482
|
+
"no-referrer-when-downgrade",
|
|
483
|
+
"origin",
|
|
484
|
+
"origin-when-cross-origin",
|
|
485
|
+
"same-origin",
|
|
486
|
+
"strict-origin",
|
|
487
|
+
"strict-origin-when-cross-origin",
|
|
488
|
+
"unsafe-url"
|
|
489
|
+
],
|
|
490
|
+
description: "Specifies which referrer is sent when fetching the resource."
|
|
491
|
+
},
|
|
492
|
+
rel: {
|
|
493
|
+
required: false,
|
|
494
|
+
control: "text",
|
|
495
|
+
type: "string",
|
|
496
|
+
description: "Specifies the relationship of the target object to the link object."
|
|
497
|
+
},
|
|
498
|
+
reloadDocument: { required: false, control: "boolean", type: "boolean" },
|
|
499
|
+
replace: { required: false, control: "boolean", type: "boolean" },
|
|
500
|
+
resource: { required: false, control: "text", type: "string" },
|
|
501
|
+
results: { required: false, control: "number", type: "number" },
|
|
502
|
+
rev: { required: false, control: "text", type: "string" },
|
|
503
|
+
role: {
|
|
504
|
+
required: false,
|
|
505
|
+
control: "text",
|
|
506
|
+
type: "string",
|
|
507
|
+
description: "Defines an explicit role for an element for use by assistive technologies."
|
|
508
|
+
},
|
|
509
|
+
security: { required: false, control: "text", type: "string" },
|
|
510
|
+
slot: {
|
|
511
|
+
required: false,
|
|
512
|
+
control: "text",
|
|
513
|
+
type: "string",
|
|
514
|
+
description: "Assigns a slot in a shadow DOM shadow tree to an element."
|
|
515
|
+
},
|
|
516
|
+
spellCheck: {
|
|
517
|
+
required: false,
|
|
518
|
+
control: "boolean",
|
|
519
|
+
type: "boolean",
|
|
520
|
+
description: "Indicates whether spell checking is allowed for the element."
|
|
521
|
+
},
|
|
522
|
+
suppressContentEditableWarning: {
|
|
523
|
+
required: false,
|
|
524
|
+
control: "boolean",
|
|
525
|
+
type: "boolean"
|
|
526
|
+
},
|
|
527
|
+
suppressHydrationWarning: {
|
|
528
|
+
required: false,
|
|
529
|
+
control: "boolean",
|
|
530
|
+
type: "boolean"
|
|
531
|
+
},
|
|
532
|
+
tabIndex: {
|
|
533
|
+
required: false,
|
|
534
|
+
control: "number",
|
|
535
|
+
type: "number",
|
|
536
|
+
description: "Overrides the browser's default tab order and follows the one specified instead."
|
|
537
|
+
},
|
|
538
|
+
target: {
|
|
539
|
+
required: false,
|
|
540
|
+
control: "select",
|
|
541
|
+
type: "string",
|
|
542
|
+
options: ["_self", "_blank", "_parent", "_top"],
|
|
543
|
+
description: "Specifies where to open the linked document (in the case of an <a> element) or where to display the response received (in the case of a <form> element)"
|
|
544
|
+
},
|
|
545
|
+
title: {
|
|
546
|
+
required: false,
|
|
547
|
+
control: "text",
|
|
548
|
+
type: "string",
|
|
549
|
+
description: "Text to be displayed in a tooltip when hovering over the element."
|
|
550
|
+
},
|
|
551
|
+
translate: {
|
|
552
|
+
required: false,
|
|
553
|
+
control: "radio",
|
|
554
|
+
type: "string",
|
|
555
|
+
options: ["yes", "no"],
|
|
556
|
+
description: "Specify whether an element's attribute values and the values of its text node children are to be translated when the page is localized, or whether to leave them unchanged."
|
|
557
|
+
},
|
|
558
|
+
type: {
|
|
559
|
+
required: false,
|
|
560
|
+
control: "text",
|
|
561
|
+
type: "string",
|
|
562
|
+
description: "Defines the type of the element."
|
|
563
|
+
},
|
|
564
|
+
typeof: { required: false, control: "text", type: "string" },
|
|
565
|
+
unselectable: {
|
|
566
|
+
required: false,
|
|
567
|
+
control: "radio",
|
|
568
|
+
type: "string",
|
|
569
|
+
options: ["on", "off"]
|
|
570
|
+
},
|
|
571
|
+
vocab: { required: false, control: "text", type: "string" }
|
|
572
|
+
};
|
|
573
|
+
|
|
574
|
+
// src/link.ws.ts
|
|
575
|
+
import { Link } from "@webstudio-is/sdk-components-react/metas";
|
|
576
|
+
var propsMeta = {
|
|
577
|
+
props: {
|
|
578
|
+
...props,
|
|
579
|
+
href: {
|
|
580
|
+
type: "string",
|
|
581
|
+
control: "url",
|
|
582
|
+
required: false
|
|
583
|
+
}
|
|
584
|
+
},
|
|
585
|
+
initialProps: ["id", "href", "target", "prefetch"]
|
|
586
|
+
};
|
|
587
|
+
|
|
588
|
+
// src/rich-text-link.ws.tsx
|
|
589
|
+
import { RichTextLink } from "@webstudio-is/sdk-components-react/metas";
|
|
590
|
+
|
|
591
|
+
// src/form.ws.tsx
|
|
592
|
+
import { FormIcon } from "@webstudio-is/icons/svg";
|
|
593
|
+
import { form } from "@webstudio-is/react-sdk/css-normalize";
|
|
594
|
+
import {
|
|
595
|
+
showAttribute
|
|
596
|
+
} from "@webstudio-is/react-sdk";
|
|
597
|
+
var presetStyle = {
|
|
598
|
+
form: [
|
|
599
|
+
...form,
|
|
600
|
+
{ property: "minHeight", value: { type: "unit", unit: "px", value: 20 } }
|
|
601
|
+
]
|
|
602
|
+
};
|
|
603
|
+
var meta = {
|
|
604
|
+
category: "forms",
|
|
605
|
+
type: "container",
|
|
606
|
+
invalidAncestors: ["Form"],
|
|
607
|
+
label: "Form",
|
|
608
|
+
description: "Collect information from your users using validation rules.",
|
|
609
|
+
icon: FormIcon,
|
|
610
|
+
presetStyle,
|
|
611
|
+
order: 0,
|
|
612
|
+
states: [
|
|
613
|
+
{ selector: "[data-state=error]", label: "Error" },
|
|
614
|
+
{ selector: "[data-state=success]", label: "Success" }
|
|
615
|
+
],
|
|
616
|
+
template: [
|
|
617
|
+
{
|
|
618
|
+
type: "instance",
|
|
619
|
+
component: "Form",
|
|
620
|
+
dataSources: {
|
|
621
|
+
formState: { type: "variable", initialValue: "initial" }
|
|
622
|
+
},
|
|
623
|
+
props: [
|
|
624
|
+
{
|
|
625
|
+
type: "dataSource",
|
|
626
|
+
name: "state",
|
|
627
|
+
dataSourceName: "formState"
|
|
628
|
+
}
|
|
629
|
+
],
|
|
630
|
+
children: [
|
|
631
|
+
{
|
|
632
|
+
type: "instance",
|
|
633
|
+
label: "Form Content",
|
|
634
|
+
component: "Box",
|
|
635
|
+
dataSources: {
|
|
636
|
+
formInitial: {
|
|
637
|
+
type: "expression",
|
|
638
|
+
code: `formState === 'initial' || formState === 'error'`
|
|
639
|
+
}
|
|
640
|
+
},
|
|
641
|
+
props: [
|
|
642
|
+
{
|
|
643
|
+
type: "dataSource",
|
|
644
|
+
name: showAttribute,
|
|
645
|
+
dataSourceName: "formInitial"
|
|
646
|
+
}
|
|
647
|
+
],
|
|
648
|
+
children: [
|
|
649
|
+
{
|
|
650
|
+
type: "instance",
|
|
651
|
+
component: "Label",
|
|
652
|
+
children: [{ type: "text", value: "Name" }]
|
|
653
|
+
},
|
|
654
|
+
{
|
|
655
|
+
type: "instance",
|
|
656
|
+
component: "Input",
|
|
657
|
+
props: [{ type: "string", name: "name", value: "name" }],
|
|
658
|
+
children: []
|
|
659
|
+
},
|
|
660
|
+
{
|
|
661
|
+
type: "instance",
|
|
662
|
+
component: "Label",
|
|
663
|
+
children: [{ type: "text", value: "Email" }]
|
|
664
|
+
},
|
|
665
|
+
{
|
|
666
|
+
type: "instance",
|
|
667
|
+
component: "Input",
|
|
668
|
+
props: [{ type: "string", name: "name", value: "email" }],
|
|
669
|
+
children: []
|
|
670
|
+
},
|
|
671
|
+
{
|
|
672
|
+
type: "instance",
|
|
673
|
+
component: "Button",
|
|
674
|
+
children: [{ type: "text", value: "Submit" }]
|
|
675
|
+
}
|
|
676
|
+
]
|
|
677
|
+
},
|
|
678
|
+
{
|
|
679
|
+
type: "instance",
|
|
680
|
+
label: "Success Message",
|
|
681
|
+
component: "Box",
|
|
682
|
+
dataSources: {
|
|
683
|
+
formSuccess: {
|
|
684
|
+
type: "expression",
|
|
685
|
+
code: `formState === 'success'`
|
|
686
|
+
}
|
|
687
|
+
},
|
|
688
|
+
props: [
|
|
689
|
+
{
|
|
690
|
+
type: "dataSource",
|
|
691
|
+
name: showAttribute,
|
|
692
|
+
dataSourceName: "formSuccess"
|
|
693
|
+
}
|
|
694
|
+
],
|
|
695
|
+
children: [
|
|
696
|
+
{ type: "text", value: "Thank you for getting in touch!" }
|
|
697
|
+
]
|
|
698
|
+
},
|
|
699
|
+
{
|
|
700
|
+
type: "instance",
|
|
701
|
+
label: "Error Message",
|
|
702
|
+
component: "Box",
|
|
703
|
+
dataSources: {
|
|
704
|
+
formError: {
|
|
705
|
+
type: "expression",
|
|
706
|
+
code: `formState === 'error'`
|
|
707
|
+
}
|
|
708
|
+
},
|
|
709
|
+
props: [
|
|
710
|
+
{
|
|
711
|
+
type: "dataSource",
|
|
712
|
+
name: showAttribute,
|
|
713
|
+
dataSourceName: "formError"
|
|
714
|
+
}
|
|
715
|
+
],
|
|
716
|
+
children: [{ type: "text", value: "Sorry, something went wrong." }]
|
|
717
|
+
}
|
|
718
|
+
]
|
|
719
|
+
}
|
|
720
|
+
]
|
|
721
|
+
};
|
|
722
|
+
export {
|
|
723
|
+
meta as Form,
|
|
724
|
+
Link,
|
|
725
|
+
RichTextLink
|
|
726
|
+
};
|