@xds/a2ui-react 0.0.0-stage → 1.0.0-rc.1
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/LICENSE +21 -0
- package/README.md +16 -2
- package/dist/basic.d.ts +75 -0
- package/dist/basic.js +203 -0
- package/dist/cases.d.ts +70 -0
- package/dist/cases.js +958 -0
- package/dist/generated/catalogs.d.ts +365 -0
- package/dist/generated/catalogs.js +1886 -0
- package/dist/implementations.d.ts +22 -0
- package/dist/implementations.js +108 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.js +18 -0
- package/dist/preview.d.ts +23 -0
- package/dist/preview.js +41 -0
- package/package.json +47 -4
- package/styles.css +150 -0
|
@@ -0,0 +1,1886 @@
|
|
|
1
|
+
export const CORE_CATALOG = {
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://xds.studiocyf.app/a2ui/v1/catalog.json",
|
|
4
|
+
"protocolVersion": "1.0",
|
|
5
|
+
"title": "xds",
|
|
6
|
+
"description": "The components of the xds design system that every client has, drawn in the app's own theme.",
|
|
7
|
+
"catalogId": "https://xds.studiocyf.app/a2ui/v1/catalog.json",
|
|
8
|
+
"instructions": "These are the components of the xds design system that every client has. The app draws them in its own theme, in light and dark mode, so a component takes no colors, fonts or sizes: choose among its variants, sizes and tones instead.\n\nLay them out with Row, Column and List from A2UI's basic catalog, which has no xds counterpart. A surface mixes catalogs: create it with this catalog as its default, give Row, Column and List `\"@catalogId\": \"https://a2ui.org/specification/v1_0/catalogs/basic/catalog.json\"`, and give a function call, such as `required` in a check or `formatString`, `\"catalogId\": \"https://a2ui.org/specification/v1_0/catalogs/basic/catalog.json\"`. Leave out a component's options to take the app's defaults.\n\nA component that a person changes (a field, a switch, a select) reads its value from a path in the data model and writes it back there: bind `value`, or `checked`, `selected`, `open` or `expanded`, with `{\"@path\": ...}`. An action, such as a Button's `onPress`, sends an event to the agent; put the paths it needs in the event's `context`. A field shows the message of a failing check in `@checks` as its error, and a Button with checks is disabled while one fails.\n\n## Accessibility\n\n- Button: The label is the accessible name. A loading button keeps its label and ignores presses. A button given `selected` reports whether it is pressed.\n- TextField: The label is always visible and tied to the input. An error replaces the description and is announced; clear it when the value changes.\n- Text: Pick the element or heading flag for the document outline, and the variant for the look.\n- Badge: Never relies on color alone: it always has a text label.\n- CountBadge: `label` says what is counted, such as \"3 unread notifications\". Without it assistive technology reads the number.\n- Banner: Each tone has its own mark. `warning` and `danger` interrupt a screen reader; `info` and `success` wait their turn. The dismiss control has a name of its own.\n- Card: The title is a heading. A pressable card is one button: put no other control inside it. A selected card is outlined, not only tinted.\n- Divider: Decorative.\n- Spinner: Announced only when it has a label. With reduced motion on the web it pulses instead of spinning.\n- Switch: Has the switch role. Without a visible label it needs an accessible label.\n- Checkbox: Without a visible label it needs an accessible label.\n- SegmentedControl: A radio group: it needs a label that says what is being chosen. The selected segment is outlined as well as filled.\n- Avatar: Assistive technology gets the full name, with or without a picture.\n- AvatarStack: One image whose name is every person's name, or `label`. The avatars inside are hidden from assistive technology.\n- ProgressBar: The label says what is progressing; it is read with the percentage.\n- Icon: Decoration unless it has a label, which names it for assistive technology. An arrow or a chevron can mirror in a right-to-left layout.\n- ListRow: With an action the whole row is a button, so do not put another control in `trailing`.\n- IconButton: `label` is required: it is the accessible name, since there is no visible text. The pressable area is at least the minimum target even when the square is smaller.\n- Chip: A toggle button that reports whether it is selected.\n- ChipBar: A group named by `label`. It holds no state: the app decides which chips are selected.\n- Tabs: A tab list with a selected tab. The component is only the row: the app shows the matching view.\n- Menu: A menu with menu items. The trigger says that it opens a menu and whether it is open; Escape or Back closes it and focus returns to the trigger.\n- Dialog: A modal dialog named by its title. Focus moves into it, stays inside it, and returns on close. Escape, Back and the scrim close it unless `dismissible` is off.\n- SearchField: `label` is required and not shown: it names the field. The clear control has a name of its own.\n- RadioGroup: A radio group named by its visible legend. The whole row of an option is pressable, and the chosen one has a dot, not only a color.\n- Select: The field says that it opens a list and whether it is open. The list is a listbox, and the chosen option is marked with a check.\n- DatePicker: The field is a button named by the chosen day and the label; it says that it opens a dialog and whether it is open, and the error describes it. The calendar is a grid of days, each named in full; the chosen day is selected and today is the current date. The arrow keys move a day or a week, Page Up and Page Down a month (with Shift a year), Home and End to the first and last day of the month, never past min or max. Enter or Space chooses and closes; Escape or Back closes without choosing. Focus returns to the field.\n- DateRangePicker: The field is a button named by the chosen range and the label; it says that it opens a dialog and whether it is open, and the error describes it. The calendar is a grid of days for each month shown, named by its month and allowing more than one selected day; each day is named in full, the two ends after startLabel and endLabel, and every day of the range is selected. The keys are DatePicker's. Enter or Space on a day sets the start and moves to the next day, and the moves after it preview the range; Enter or Space again sets the end. A day before the start starts again from there. Days the length does not allow as the end cannot be chosen. Escape or Back closes and drops an unfinished range. Focus returns to the field.\n- Slider: A slider named by its label, with its value, minimum and maximum. Each key press moves it one step.\n- Thumbnail: `alt` describes the picture; an empty `alt` makes it decoration.\n- MediaCard: A pressable card is one button named by its title and details. Its action is a control of its own.\n- SectionHeader: The title is a heading, at the level given for the document outline.\n- EmptyState: The icon is decoration; the title says what is missing.\n- Accordion: Each title row is a button that says whether its body is expanded.",
|
|
9
|
+
"components": {
|
|
10
|
+
"Button": {
|
|
11
|
+
"type": "object",
|
|
12
|
+
"description": "An action. Use `primary` once per view, `secondary` for other actions, `ghost` for actions that stay out of the way, and `danger` for ones that destroy. With `selected` it is a toggle that stays pressed.",
|
|
13
|
+
"allOf": [
|
|
14
|
+
{
|
|
15
|
+
"$ref": "common_types.json#/$defs/Checkable"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"type": "object",
|
|
19
|
+
"properties": {
|
|
20
|
+
"component": {
|
|
21
|
+
"const": "Button"
|
|
22
|
+
},
|
|
23
|
+
"label": {
|
|
24
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
25
|
+
"description": "The text on the button. Say what pressing it does."
|
|
26
|
+
},
|
|
27
|
+
"iconStart": {
|
|
28
|
+
"$ref": "#/$defs/IconName"
|
|
29
|
+
},
|
|
30
|
+
"iconEnd": {
|
|
31
|
+
"$ref": "#/$defs/IconName"
|
|
32
|
+
},
|
|
33
|
+
"onPress": {
|
|
34
|
+
"$ref": "common_types.json#/$defs/Action",
|
|
35
|
+
"description": "Sent when the button is pressed. Leave it out of the trigger of a Menu, whose press opens the menu instead."
|
|
36
|
+
},
|
|
37
|
+
"variant": {
|
|
38
|
+
"type": "string",
|
|
39
|
+
"enum": [
|
|
40
|
+
"primary",
|
|
41
|
+
"secondary",
|
|
42
|
+
"ghost",
|
|
43
|
+
"danger"
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
"size": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"enum": [
|
|
49
|
+
"sm",
|
|
50
|
+
"md",
|
|
51
|
+
"lg"
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
"disabled": {
|
|
55
|
+
"$ref": "common_types.json#/$defs/DynamicBoolean"
|
|
56
|
+
},
|
|
57
|
+
"loading": {
|
|
58
|
+
"$ref": "common_types.json#/$defs/DynamicBoolean"
|
|
59
|
+
},
|
|
60
|
+
"fullWidth": {
|
|
61
|
+
"$ref": "common_types.json#/$defs/DynamicBoolean"
|
|
62
|
+
},
|
|
63
|
+
"selected": {
|
|
64
|
+
"$ref": "common_types.json#/$defs/DynamicBoolean",
|
|
65
|
+
"description": "Bind it to a path, which the component writes."
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"required": [
|
|
69
|
+
"component",
|
|
70
|
+
"label"
|
|
71
|
+
]
|
|
72
|
+
}
|
|
73
|
+
]
|
|
74
|
+
},
|
|
75
|
+
"TextField": {
|
|
76
|
+
"type": "object",
|
|
77
|
+
"description": "A labelled text field with an optional description and error message. One line, or several with `multiline`.",
|
|
78
|
+
"allOf": [
|
|
79
|
+
{
|
|
80
|
+
"$ref": "common_types.json#/$defs/Checkable"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"type": "object",
|
|
84
|
+
"properties": {
|
|
85
|
+
"component": {
|
|
86
|
+
"const": "TextField"
|
|
87
|
+
},
|
|
88
|
+
"label": {
|
|
89
|
+
"$ref": "common_types.json#/$defs/DynamicString"
|
|
90
|
+
},
|
|
91
|
+
"value": {
|
|
92
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
93
|
+
"description": "The text in the field. Bind it to a path, which the field writes as the person types."
|
|
94
|
+
},
|
|
95
|
+
"description": {
|
|
96
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
97
|
+
"description": "A line under the label that says what to enter."
|
|
98
|
+
},
|
|
99
|
+
"error": {
|
|
100
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
101
|
+
"description": "Says what is wrong with the value. A failing check shows its message here instead."
|
|
102
|
+
},
|
|
103
|
+
"placeholder": {
|
|
104
|
+
"$ref": "common_types.json#/$defs/DynamicString"
|
|
105
|
+
},
|
|
106
|
+
"leading": {
|
|
107
|
+
"$ref": "common_types.json#/$defs/Child",
|
|
108
|
+
"description": "Inside the box, in front of the text: an icon or a unit."
|
|
109
|
+
},
|
|
110
|
+
"trailing": {
|
|
111
|
+
"$ref": "common_types.json#/$defs/Child",
|
|
112
|
+
"description": "Inside the box, after the text: an icon, a unit or a small button."
|
|
113
|
+
},
|
|
114
|
+
"rows": {
|
|
115
|
+
"$ref": "common_types.json#/$defs/DynamicNumber",
|
|
116
|
+
"description": "The height of a multiline field, in lines."
|
|
117
|
+
},
|
|
118
|
+
"maxLength": {
|
|
119
|
+
"$ref": "common_types.json#/$defs/DynamicNumber"
|
|
120
|
+
},
|
|
121
|
+
"disabled": {
|
|
122
|
+
"$ref": "common_types.json#/$defs/DynamicBoolean"
|
|
123
|
+
},
|
|
124
|
+
"multiline": {
|
|
125
|
+
"$ref": "common_types.json#/$defs/DynamicBoolean"
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"required": [
|
|
129
|
+
"component",
|
|
130
|
+
"label",
|
|
131
|
+
"value"
|
|
132
|
+
]
|
|
133
|
+
}
|
|
134
|
+
]
|
|
135
|
+
},
|
|
136
|
+
"Text": {
|
|
137
|
+
"type": "object",
|
|
138
|
+
"properties": {
|
|
139
|
+
"component": {
|
|
140
|
+
"const": "Text"
|
|
141
|
+
},
|
|
142
|
+
"text": {
|
|
143
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
144
|
+
"description": "The text to show."
|
|
145
|
+
},
|
|
146
|
+
"variant": {
|
|
147
|
+
"type": "string",
|
|
148
|
+
"enum": [
|
|
149
|
+
"display",
|
|
150
|
+
"title",
|
|
151
|
+
"heading",
|
|
152
|
+
"body",
|
|
153
|
+
"body-strong",
|
|
154
|
+
"label",
|
|
155
|
+
"detail",
|
|
156
|
+
"footnote"
|
|
157
|
+
]
|
|
158
|
+
},
|
|
159
|
+
"tone": {
|
|
160
|
+
"type": "string",
|
|
161
|
+
"enum": [
|
|
162
|
+
"primary",
|
|
163
|
+
"secondary",
|
|
164
|
+
"accent",
|
|
165
|
+
"danger",
|
|
166
|
+
"success",
|
|
167
|
+
"warning",
|
|
168
|
+
"inherit"
|
|
169
|
+
]
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
"required": [
|
|
173
|
+
"component",
|
|
174
|
+
"text"
|
|
175
|
+
],
|
|
176
|
+
"description": "Text in one of the type roles."
|
|
177
|
+
},
|
|
178
|
+
"Badge": {
|
|
179
|
+
"type": "object",
|
|
180
|
+
"properties": {
|
|
181
|
+
"component": {
|
|
182
|
+
"const": "Badge"
|
|
183
|
+
},
|
|
184
|
+
"label": {
|
|
185
|
+
"$ref": "common_types.json#/$defs/DynamicString"
|
|
186
|
+
},
|
|
187
|
+
"icon": {
|
|
188
|
+
"$ref": "#/$defs/IconName"
|
|
189
|
+
},
|
|
190
|
+
"tone": {
|
|
191
|
+
"type": "string",
|
|
192
|
+
"enum": [
|
|
193
|
+
"neutral",
|
|
194
|
+
"accent",
|
|
195
|
+
"success",
|
|
196
|
+
"warning",
|
|
197
|
+
"danger",
|
|
198
|
+
"overlay"
|
|
199
|
+
]
|
|
200
|
+
},
|
|
201
|
+
"dot": {
|
|
202
|
+
"$ref": "common_types.json#/$defs/DynamicBoolean"
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
"required": [
|
|
206
|
+
"component",
|
|
207
|
+
"label"
|
|
208
|
+
],
|
|
209
|
+
"description": "A short status or category. The words carry the meaning; the color reinforces it."
|
|
210
|
+
},
|
|
211
|
+
"CountBadge": {
|
|
212
|
+
"type": "object",
|
|
213
|
+
"properties": {
|
|
214
|
+
"component": {
|
|
215
|
+
"const": "CountBadge"
|
|
216
|
+
},
|
|
217
|
+
"count": {
|
|
218
|
+
"$ref": "common_types.json#/$defs/DynamicNumber"
|
|
219
|
+
},
|
|
220
|
+
"max": {
|
|
221
|
+
"$ref": "common_types.json#/$defs/DynamicNumber",
|
|
222
|
+
"description": "Above it the badge shows the maximum and a plus sign."
|
|
223
|
+
},
|
|
224
|
+
"label": {
|
|
225
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
226
|
+
"description": "Says what is counted, for assistive technology, such as \"unread messages\"."
|
|
227
|
+
},
|
|
228
|
+
"children": {
|
|
229
|
+
"$ref": "common_types.json#/$defs/Child",
|
|
230
|
+
"description": "The component the count belongs to, such as an IconButton. Without it the badge stands alone."
|
|
231
|
+
}
|
|
232
|
+
},
|
|
233
|
+
"required": [
|
|
234
|
+
"component",
|
|
235
|
+
"count"
|
|
236
|
+
],
|
|
237
|
+
"description": "A count on an icon, an avatar or a button: unread messages, items in a cart. A count of zero draws nothing."
|
|
238
|
+
},
|
|
239
|
+
"Banner": {
|
|
240
|
+
"type": "object",
|
|
241
|
+
"properties": {
|
|
242
|
+
"component": {
|
|
243
|
+
"const": "Banner"
|
|
244
|
+
},
|
|
245
|
+
"message": {
|
|
246
|
+
"$ref": "common_types.json#/$defs/DynamicString"
|
|
247
|
+
},
|
|
248
|
+
"title": {
|
|
249
|
+
"$ref": "common_types.json#/$defs/DynamicString"
|
|
250
|
+
},
|
|
251
|
+
"action": {
|
|
252
|
+
"type": "object",
|
|
253
|
+
"properties": {
|
|
254
|
+
"label": {
|
|
255
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
256
|
+
"description": "The text of the button."
|
|
257
|
+
},
|
|
258
|
+
"onPress": {
|
|
259
|
+
"$ref": "common_types.json#/$defs/Action",
|
|
260
|
+
"description": "Sent when the button is pressed."
|
|
261
|
+
}
|
|
262
|
+
},
|
|
263
|
+
"required": [
|
|
264
|
+
"label",
|
|
265
|
+
"onPress"
|
|
266
|
+
],
|
|
267
|
+
"additionalProperties": false,
|
|
268
|
+
"description": "A button in the banner."
|
|
269
|
+
},
|
|
270
|
+
"onDismiss": {
|
|
271
|
+
"$ref": "common_types.json#/$defs/Action",
|
|
272
|
+
"description": "Sent when the banner's dismiss button is pressed. Without it there is no dismiss button."
|
|
273
|
+
},
|
|
274
|
+
"dismissLabel": {
|
|
275
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
276
|
+
"description": "Names the dismiss button for assistive technology."
|
|
277
|
+
},
|
|
278
|
+
"tone": {
|
|
279
|
+
"type": "string",
|
|
280
|
+
"enum": [
|
|
281
|
+
"info",
|
|
282
|
+
"success",
|
|
283
|
+
"warning",
|
|
284
|
+
"danger"
|
|
285
|
+
]
|
|
286
|
+
}
|
|
287
|
+
},
|
|
288
|
+
"required": [
|
|
289
|
+
"component",
|
|
290
|
+
"message"
|
|
291
|
+
],
|
|
292
|
+
"description": "A message about the whole view or a section of it."
|
|
293
|
+
},
|
|
294
|
+
"Card": {
|
|
295
|
+
"type": "object",
|
|
296
|
+
"properties": {
|
|
297
|
+
"component": {
|
|
298
|
+
"const": "Card"
|
|
299
|
+
},
|
|
300
|
+
"title": {
|
|
301
|
+
"$ref": "common_types.json#/$defs/DynamicString"
|
|
302
|
+
},
|
|
303
|
+
"description": {
|
|
304
|
+
"$ref": "common_types.json#/$defs/DynamicString"
|
|
305
|
+
},
|
|
306
|
+
"actions": {
|
|
307
|
+
"$ref": "common_types.json#/$defs/ChildList",
|
|
308
|
+
"description": "Buttons in the card's header. Left out of a card that has onPress."
|
|
309
|
+
},
|
|
310
|
+
"media": {
|
|
311
|
+
"$ref": "common_types.json#/$defs/Child",
|
|
312
|
+
"description": "A picture at the top of the card, such as a Thumbnail."
|
|
313
|
+
},
|
|
314
|
+
"onPress": {
|
|
315
|
+
"$ref": "common_types.json#/$defs/Action",
|
|
316
|
+
"description": "Makes the whole card a button."
|
|
317
|
+
},
|
|
318
|
+
"children": {
|
|
319
|
+
"$ref": "common_types.json#/$defs/ChildList",
|
|
320
|
+
"description": "What the card holds, under its header."
|
|
321
|
+
},
|
|
322
|
+
"flush": {
|
|
323
|
+
"$ref": "common_types.json#/$defs/DynamicBoolean"
|
|
324
|
+
},
|
|
325
|
+
"selected": {
|
|
326
|
+
"$ref": "common_types.json#/$defs/DynamicBoolean"
|
|
327
|
+
}
|
|
328
|
+
},
|
|
329
|
+
"required": [
|
|
330
|
+
"component"
|
|
331
|
+
],
|
|
332
|
+
"description": "A surface that groups related content, with an optional picture, title, description and actions. With `onPress` the whole card is one button."
|
|
333
|
+
},
|
|
334
|
+
"Divider": {
|
|
335
|
+
"type": "object",
|
|
336
|
+
"properties": {
|
|
337
|
+
"component": {
|
|
338
|
+
"const": "Divider"
|
|
339
|
+
}
|
|
340
|
+
},
|
|
341
|
+
"required": [
|
|
342
|
+
"component"
|
|
343
|
+
],
|
|
344
|
+
"description": "A hairline between rows or sections."
|
|
345
|
+
},
|
|
346
|
+
"Spinner": {
|
|
347
|
+
"type": "object",
|
|
348
|
+
"properties": {
|
|
349
|
+
"component": {
|
|
350
|
+
"const": "Spinner"
|
|
351
|
+
},
|
|
352
|
+
"label": {
|
|
353
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
354
|
+
"description": "Says what is loading, for assistive technology."
|
|
355
|
+
},
|
|
356
|
+
"size": {
|
|
357
|
+
"type": "string",
|
|
358
|
+
"enum": [
|
|
359
|
+
"sm",
|
|
360
|
+
"md",
|
|
361
|
+
"lg"
|
|
362
|
+
]
|
|
363
|
+
}
|
|
364
|
+
},
|
|
365
|
+
"required": [
|
|
366
|
+
"component"
|
|
367
|
+
],
|
|
368
|
+
"description": "Says that something is in progress and how long is unknown."
|
|
369
|
+
},
|
|
370
|
+
"Switch": {
|
|
371
|
+
"type": "object",
|
|
372
|
+
"properties": {
|
|
373
|
+
"component": {
|
|
374
|
+
"const": "Switch"
|
|
375
|
+
},
|
|
376
|
+
"label": {
|
|
377
|
+
"$ref": "common_types.json#/$defs/DynamicString"
|
|
378
|
+
},
|
|
379
|
+
"checked": {
|
|
380
|
+
"$ref": "common_types.json#/$defs/DynamicBoolean",
|
|
381
|
+
"description": "Bind it to a path, which the component writes."
|
|
382
|
+
},
|
|
383
|
+
"disabled": {
|
|
384
|
+
"$ref": "common_types.json#/$defs/DynamicBoolean"
|
|
385
|
+
}
|
|
386
|
+
},
|
|
387
|
+
"required": [
|
|
388
|
+
"component",
|
|
389
|
+
"label"
|
|
390
|
+
],
|
|
391
|
+
"description": "Turns a setting on or off, taking effect at once."
|
|
392
|
+
},
|
|
393
|
+
"Checkbox": {
|
|
394
|
+
"type": "object",
|
|
395
|
+
"properties": {
|
|
396
|
+
"component": {
|
|
397
|
+
"const": "Checkbox"
|
|
398
|
+
},
|
|
399
|
+
"label": {
|
|
400
|
+
"$ref": "common_types.json#/$defs/DynamicString"
|
|
401
|
+
},
|
|
402
|
+
"checked": {
|
|
403
|
+
"$ref": "common_types.json#/$defs/DynamicBoolean",
|
|
404
|
+
"description": "Bind it to a path, which the component writes."
|
|
405
|
+
},
|
|
406
|
+
"disabled": {
|
|
407
|
+
"$ref": "common_types.json#/$defs/DynamicBoolean"
|
|
408
|
+
}
|
|
409
|
+
},
|
|
410
|
+
"required": [
|
|
411
|
+
"component",
|
|
412
|
+
"label"
|
|
413
|
+
],
|
|
414
|
+
"description": "A choice that is applied later, with the form it belongs to."
|
|
415
|
+
},
|
|
416
|
+
"SegmentedControl": {
|
|
417
|
+
"type": "object",
|
|
418
|
+
"properties": {
|
|
419
|
+
"component": {
|
|
420
|
+
"const": "SegmentedControl"
|
|
421
|
+
},
|
|
422
|
+
"options": {
|
|
423
|
+
"type": "array",
|
|
424
|
+
"description": "Two to five choices.",
|
|
425
|
+
"items": {
|
|
426
|
+
"type": "object",
|
|
427
|
+
"properties": {
|
|
428
|
+
"value": {
|
|
429
|
+
"type": "string",
|
|
430
|
+
"description": "What the option stands for: the value that is bound when it is chosen."
|
|
431
|
+
},
|
|
432
|
+
"label": {
|
|
433
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
434
|
+
"description": "The text of the option."
|
|
435
|
+
}
|
|
436
|
+
},
|
|
437
|
+
"required": [
|
|
438
|
+
"value",
|
|
439
|
+
"label"
|
|
440
|
+
],
|
|
441
|
+
"additionalProperties": false
|
|
442
|
+
}
|
|
443
|
+
},
|
|
444
|
+
"value": {
|
|
445
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
446
|
+
"description": "The value of the chosen option."
|
|
447
|
+
},
|
|
448
|
+
"label": {
|
|
449
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
450
|
+
"description": "Names the control for assistive technology."
|
|
451
|
+
},
|
|
452
|
+
"fullWidth": {
|
|
453
|
+
"$ref": "common_types.json#/$defs/DynamicBoolean"
|
|
454
|
+
}
|
|
455
|
+
},
|
|
456
|
+
"required": [
|
|
457
|
+
"component",
|
|
458
|
+
"options",
|
|
459
|
+
"value",
|
|
460
|
+
"label"
|
|
461
|
+
],
|
|
462
|
+
"description": "A choice between a few views or modes, all visible at once."
|
|
463
|
+
},
|
|
464
|
+
"Avatar": {
|
|
465
|
+
"type": "object",
|
|
466
|
+
"properties": {
|
|
467
|
+
"component": {
|
|
468
|
+
"const": "Avatar"
|
|
469
|
+
},
|
|
470
|
+
"name": {
|
|
471
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
472
|
+
"description": "Whose picture it is. Without a picture the avatar shows the name's initials."
|
|
473
|
+
},
|
|
474
|
+
"src": {
|
|
475
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
476
|
+
"description": "The address of the picture."
|
|
477
|
+
},
|
|
478
|
+
"size": {
|
|
479
|
+
"type": "string",
|
|
480
|
+
"enum": [
|
|
481
|
+
"sm",
|
|
482
|
+
"md",
|
|
483
|
+
"lg",
|
|
484
|
+
"xl"
|
|
485
|
+
]
|
|
486
|
+
}
|
|
487
|
+
},
|
|
488
|
+
"required": [
|
|
489
|
+
"component",
|
|
490
|
+
"name"
|
|
491
|
+
],
|
|
492
|
+
"description": "Stands for a person or a team by a picture, or by their initials when there is none."
|
|
493
|
+
},
|
|
494
|
+
"AvatarStack": {
|
|
495
|
+
"type": "object",
|
|
496
|
+
"properties": {
|
|
497
|
+
"component": {
|
|
498
|
+
"const": "AvatarStack"
|
|
499
|
+
},
|
|
500
|
+
"people": {
|
|
501
|
+
"type": "array",
|
|
502
|
+
"items": {
|
|
503
|
+
"type": "object",
|
|
504
|
+
"properties": {
|
|
505
|
+
"name": {
|
|
506
|
+
"$ref": "common_types.json#/$defs/DynamicString"
|
|
507
|
+
},
|
|
508
|
+
"src": {
|
|
509
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
510
|
+
"description": "The address of the picture."
|
|
511
|
+
}
|
|
512
|
+
},
|
|
513
|
+
"required": [
|
|
514
|
+
"name"
|
|
515
|
+
],
|
|
516
|
+
"additionalProperties": false
|
|
517
|
+
}
|
|
518
|
+
},
|
|
519
|
+
"max": {
|
|
520
|
+
"$ref": "common_types.json#/$defs/DynamicNumber",
|
|
521
|
+
"description": "How many avatars to show before a count of the rest."
|
|
522
|
+
},
|
|
523
|
+
"label": {
|
|
524
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
525
|
+
"description": "Names the group for assistive technology."
|
|
526
|
+
},
|
|
527
|
+
"size": {
|
|
528
|
+
"type": "string",
|
|
529
|
+
"enum": [
|
|
530
|
+
"sm",
|
|
531
|
+
"md",
|
|
532
|
+
"lg",
|
|
533
|
+
"xl"
|
|
534
|
+
]
|
|
535
|
+
}
|
|
536
|
+
},
|
|
537
|
+
"required": [
|
|
538
|
+
"component",
|
|
539
|
+
"people"
|
|
540
|
+
],
|
|
541
|
+
"description": "Several people in the room of one: overlapping avatars, and a count of those that did not fit."
|
|
542
|
+
},
|
|
543
|
+
"ProgressBar": {
|
|
544
|
+
"type": "object",
|
|
545
|
+
"properties": {
|
|
546
|
+
"component": {
|
|
547
|
+
"const": "ProgressBar"
|
|
548
|
+
},
|
|
549
|
+
"value": {
|
|
550
|
+
"$ref": "common_types.json#/$defs/DynamicNumber",
|
|
551
|
+
"description": "From 0 to 1."
|
|
552
|
+
},
|
|
553
|
+
"label": {
|
|
554
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
555
|
+
"description": "Says what is progressing."
|
|
556
|
+
}
|
|
557
|
+
},
|
|
558
|
+
"required": [
|
|
559
|
+
"component",
|
|
560
|
+
"value",
|
|
561
|
+
"label"
|
|
562
|
+
],
|
|
563
|
+
"description": "How far along something is, from 0 to 1."
|
|
564
|
+
},
|
|
565
|
+
"Icon": {
|
|
566
|
+
"type": "object",
|
|
567
|
+
"properties": {
|
|
568
|
+
"component": {
|
|
569
|
+
"const": "Icon"
|
|
570
|
+
},
|
|
571
|
+
"name": {
|
|
572
|
+
"$ref": "#/$defs/IconName"
|
|
573
|
+
},
|
|
574
|
+
"label": {
|
|
575
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
576
|
+
"description": "Names the icon for assistive technology. Leave it out of an icon that only decorates."
|
|
577
|
+
},
|
|
578
|
+
"size": {
|
|
579
|
+
"type": "string",
|
|
580
|
+
"enum": [
|
|
581
|
+
"xs",
|
|
582
|
+
"sm",
|
|
583
|
+
"md",
|
|
584
|
+
"lg",
|
|
585
|
+
"xl"
|
|
586
|
+
]
|
|
587
|
+
},
|
|
588
|
+
"filled": {
|
|
589
|
+
"$ref": "common_types.json#/$defs/DynamicBoolean"
|
|
590
|
+
}
|
|
591
|
+
},
|
|
592
|
+
"required": [
|
|
593
|
+
"component",
|
|
594
|
+
"name"
|
|
595
|
+
],
|
|
596
|
+
"description": "A drawing from design/icons, in the color of the text around it. `filled` marks a selected state on an icon made of closed shapes."
|
|
597
|
+
},
|
|
598
|
+
"ListRow": {
|
|
599
|
+
"type": "object",
|
|
600
|
+
"properties": {
|
|
601
|
+
"component": {
|
|
602
|
+
"const": "ListRow"
|
|
603
|
+
},
|
|
604
|
+
"title": {
|
|
605
|
+
"$ref": "common_types.json#/$defs/DynamicString"
|
|
606
|
+
},
|
|
607
|
+
"description": {
|
|
608
|
+
"$ref": "common_types.json#/$defs/DynamicString"
|
|
609
|
+
},
|
|
610
|
+
"leading": {
|
|
611
|
+
"$ref": "common_types.json#/$defs/Child",
|
|
612
|
+
"description": "In front of the text, such as an Avatar or an Icon."
|
|
613
|
+
},
|
|
614
|
+
"trailing": {
|
|
615
|
+
"$ref": "common_types.json#/$defs/Child",
|
|
616
|
+
"description": "After the text, such as a Badge or a Switch."
|
|
617
|
+
},
|
|
618
|
+
"onPress": {
|
|
619
|
+
"$ref": "common_types.json#/$defs/Action",
|
|
620
|
+
"description": "Makes the row a button."
|
|
621
|
+
},
|
|
622
|
+
"chevron": {
|
|
623
|
+
"$ref": "common_types.json#/$defs/DynamicBoolean"
|
|
624
|
+
},
|
|
625
|
+
"disabled": {
|
|
626
|
+
"$ref": "common_types.json#/$defs/DynamicBoolean"
|
|
627
|
+
},
|
|
628
|
+
"selected": {
|
|
629
|
+
"$ref": "common_types.json#/$defs/DynamicBoolean"
|
|
630
|
+
},
|
|
631
|
+
"compact": {
|
|
632
|
+
"$ref": "common_types.json#/$defs/DynamicBoolean"
|
|
633
|
+
}
|
|
634
|
+
},
|
|
635
|
+
"required": [
|
|
636
|
+
"component",
|
|
637
|
+
"title"
|
|
638
|
+
],
|
|
639
|
+
"description": "One line of a list or a settings screen."
|
|
640
|
+
},
|
|
641
|
+
"IconButton": {
|
|
642
|
+
"type": "object",
|
|
643
|
+
"description": "A button that holds only an icon, in Button's variants, sizes and states. Use it where the icon is familiar and room is short.",
|
|
644
|
+
"allOf": [
|
|
645
|
+
{
|
|
646
|
+
"$ref": "common_types.json#/$defs/Checkable"
|
|
647
|
+
},
|
|
648
|
+
{
|
|
649
|
+
"type": "object",
|
|
650
|
+
"properties": {
|
|
651
|
+
"component": {
|
|
652
|
+
"const": "IconButton"
|
|
653
|
+
},
|
|
654
|
+
"icon": {
|
|
655
|
+
"$ref": "#/$defs/IconName"
|
|
656
|
+
},
|
|
657
|
+
"label": {
|
|
658
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
659
|
+
"description": "Names the button: it has no visible text. Say what pressing it does."
|
|
660
|
+
},
|
|
661
|
+
"onPress": {
|
|
662
|
+
"$ref": "common_types.json#/$defs/Action",
|
|
663
|
+
"description": "Sent when the button is pressed. Leave it out of the trigger of a Menu, whose press opens the menu instead."
|
|
664
|
+
},
|
|
665
|
+
"variant": {
|
|
666
|
+
"type": "string",
|
|
667
|
+
"enum": [
|
|
668
|
+
"primary",
|
|
669
|
+
"secondary",
|
|
670
|
+
"ghost",
|
|
671
|
+
"danger"
|
|
672
|
+
]
|
|
673
|
+
},
|
|
674
|
+
"size": {
|
|
675
|
+
"type": "string",
|
|
676
|
+
"enum": [
|
|
677
|
+
"sm",
|
|
678
|
+
"md",
|
|
679
|
+
"lg"
|
|
680
|
+
]
|
|
681
|
+
},
|
|
682
|
+
"selected": {
|
|
683
|
+
"$ref": "common_types.json#/$defs/DynamicBoolean",
|
|
684
|
+
"description": "Bind it to a path, which the component writes."
|
|
685
|
+
},
|
|
686
|
+
"disabled": {
|
|
687
|
+
"$ref": "common_types.json#/$defs/DynamicBoolean"
|
|
688
|
+
},
|
|
689
|
+
"loading": {
|
|
690
|
+
"$ref": "common_types.json#/$defs/DynamicBoolean"
|
|
691
|
+
}
|
|
692
|
+
},
|
|
693
|
+
"required": [
|
|
694
|
+
"component",
|
|
695
|
+
"icon",
|
|
696
|
+
"label"
|
|
697
|
+
]
|
|
698
|
+
}
|
|
699
|
+
]
|
|
700
|
+
},
|
|
701
|
+
"Chip": {
|
|
702
|
+
"type": "object",
|
|
703
|
+
"properties": {
|
|
704
|
+
"component": {
|
|
705
|
+
"const": "Chip"
|
|
706
|
+
},
|
|
707
|
+
"label": {
|
|
708
|
+
"$ref": "common_types.json#/$defs/DynamicString"
|
|
709
|
+
},
|
|
710
|
+
"iconStart": {
|
|
711
|
+
"$ref": "#/$defs/IconName"
|
|
712
|
+
},
|
|
713
|
+
"onPress": {
|
|
714
|
+
"$ref": "common_types.json#/$defs/Action",
|
|
715
|
+
"description": "Sent when the chip is pressed, after a bound `selected` has changed."
|
|
716
|
+
},
|
|
717
|
+
"selected": {
|
|
718
|
+
"$ref": "common_types.json#/$defs/DynamicBoolean",
|
|
719
|
+
"description": "Bind it to a path, which the component writes."
|
|
720
|
+
},
|
|
721
|
+
"disabled": {
|
|
722
|
+
"$ref": "common_types.json#/$defs/DynamicBoolean"
|
|
723
|
+
}
|
|
724
|
+
},
|
|
725
|
+
"required": [
|
|
726
|
+
"component",
|
|
727
|
+
"label"
|
|
728
|
+
],
|
|
729
|
+
"description": "A choice that filters what is shown. Unlike a Badge it is pressed; a selected chip is tinted, outlined and marked with a check."
|
|
730
|
+
},
|
|
731
|
+
"ChipBar": {
|
|
732
|
+
"type": "object",
|
|
733
|
+
"properties": {
|
|
734
|
+
"component": {
|
|
735
|
+
"const": "ChipBar"
|
|
736
|
+
},
|
|
737
|
+
"label": {
|
|
738
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
739
|
+
"description": "Names the group of chips for assistive technology."
|
|
740
|
+
},
|
|
741
|
+
"children": {
|
|
742
|
+
"$ref": "common_types.json#/$defs/ChildList",
|
|
743
|
+
"description": "The Chips."
|
|
744
|
+
}
|
|
745
|
+
},
|
|
746
|
+
"required": [
|
|
747
|
+
"component",
|
|
748
|
+
"label",
|
|
749
|
+
"children"
|
|
750
|
+
],
|
|
751
|
+
"description": "A row of chips that scrolls sideways when it does not fit, and never wraps."
|
|
752
|
+
},
|
|
753
|
+
"Tabs": {
|
|
754
|
+
"type": "object",
|
|
755
|
+
"properties": {
|
|
756
|
+
"component": {
|
|
757
|
+
"const": "Tabs"
|
|
758
|
+
},
|
|
759
|
+
"items": {
|
|
760
|
+
"type": "array",
|
|
761
|
+
"items": {
|
|
762
|
+
"type": "object",
|
|
763
|
+
"properties": {
|
|
764
|
+
"value": {
|
|
765
|
+
"type": "string",
|
|
766
|
+
"description": "What the option stands for: the value that is bound when it is chosen."
|
|
767
|
+
},
|
|
768
|
+
"label": {
|
|
769
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
770
|
+
"description": "The text of the option."
|
|
771
|
+
},
|
|
772
|
+
"icon": {
|
|
773
|
+
"$ref": "#/$defs/IconName"
|
|
774
|
+
}
|
|
775
|
+
},
|
|
776
|
+
"required": [
|
|
777
|
+
"value",
|
|
778
|
+
"label"
|
|
779
|
+
],
|
|
780
|
+
"additionalProperties": false
|
|
781
|
+
}
|
|
782
|
+
},
|
|
783
|
+
"value": {
|
|
784
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
785
|
+
"description": "The value of the selected tab."
|
|
786
|
+
},
|
|
787
|
+
"label": {
|
|
788
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
789
|
+
"description": "Names the tab list for assistive technology."
|
|
790
|
+
},
|
|
791
|
+
"fullWidth": {
|
|
792
|
+
"$ref": "common_types.json#/$defs/DynamicBoolean"
|
|
793
|
+
}
|
|
794
|
+
},
|
|
795
|
+
"required": [
|
|
796
|
+
"component",
|
|
797
|
+
"items",
|
|
798
|
+
"value",
|
|
799
|
+
"label"
|
|
800
|
+
],
|
|
801
|
+
"description": "Switches between views inside one screen. For two to four short modes a SegmentedControl is lighter; Tabs is for more items, longer labels, or a row that may scroll."
|
|
802
|
+
},
|
|
803
|
+
"Menu": {
|
|
804
|
+
"type": "object",
|
|
805
|
+
"properties": {
|
|
806
|
+
"component": {
|
|
807
|
+
"const": "Menu"
|
|
808
|
+
},
|
|
809
|
+
"trigger": {
|
|
810
|
+
"$ref": "common_types.json#/$defs/Child",
|
|
811
|
+
"description": "The Button or IconButton that opens the menu, with no onPress of its own."
|
|
812
|
+
},
|
|
813
|
+
"items": {
|
|
814
|
+
"type": "array",
|
|
815
|
+
"description": "The items in order. An item is either an action, with a label and onSelect, or `{\"separator\": true}`, a line between groups.",
|
|
816
|
+
"items": {
|
|
817
|
+
"type": "object",
|
|
818
|
+
"properties": {
|
|
819
|
+
"separator": {
|
|
820
|
+
"type": "boolean",
|
|
821
|
+
"enum": [
|
|
822
|
+
true
|
|
823
|
+
],
|
|
824
|
+
"description": "Makes the item a line between groups. It then takes nothing else."
|
|
825
|
+
},
|
|
826
|
+
"label": {
|
|
827
|
+
"$ref": "common_types.json#/$defs/DynamicString"
|
|
828
|
+
},
|
|
829
|
+
"icon": {
|
|
830
|
+
"$ref": "#/$defs/IconName"
|
|
831
|
+
},
|
|
832
|
+
"onSelect": {
|
|
833
|
+
"$ref": "common_types.json#/$defs/Action",
|
|
834
|
+
"description": "Sent when the item is chosen."
|
|
835
|
+
},
|
|
836
|
+
"danger": {
|
|
837
|
+
"$ref": "common_types.json#/$defs/DynamicBoolean",
|
|
838
|
+
"description": "For an action that destroys."
|
|
839
|
+
},
|
|
840
|
+
"disabled": {
|
|
841
|
+
"$ref": "common_types.json#/$defs/DynamicBoolean"
|
|
842
|
+
},
|
|
843
|
+
"selected": {
|
|
844
|
+
"$ref": "common_types.json#/$defs/DynamicBoolean",
|
|
845
|
+
"description": "Shows a check mark beside the item."
|
|
846
|
+
}
|
|
847
|
+
},
|
|
848
|
+
"additionalProperties": false
|
|
849
|
+
}
|
|
850
|
+
},
|
|
851
|
+
"label": {
|
|
852
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
853
|
+
"description": "Names the menu for assistive technology."
|
|
854
|
+
},
|
|
855
|
+
"align": {
|
|
856
|
+
"type": "string",
|
|
857
|
+
"enum": [
|
|
858
|
+
"start",
|
|
859
|
+
"end"
|
|
860
|
+
],
|
|
861
|
+
"description": "Which edge of the trigger the menu lines up with."
|
|
862
|
+
}
|
|
863
|
+
},
|
|
864
|
+
"required": [
|
|
865
|
+
"component",
|
|
866
|
+
"trigger",
|
|
867
|
+
"items",
|
|
868
|
+
"label"
|
|
869
|
+
],
|
|
870
|
+
"description": "A list of actions that opens from a control: a popup where a pointer is used, a bottom sheet where fingers are."
|
|
871
|
+
},
|
|
872
|
+
"Dialog": {
|
|
873
|
+
"type": "object",
|
|
874
|
+
"properties": {
|
|
875
|
+
"component": {
|
|
876
|
+
"const": "Dialog"
|
|
877
|
+
},
|
|
878
|
+
"title": {
|
|
879
|
+
"$ref": "common_types.json#/$defs/DynamicString"
|
|
880
|
+
},
|
|
881
|
+
"description": {
|
|
882
|
+
"$ref": "common_types.json#/$defs/DynamicString"
|
|
883
|
+
},
|
|
884
|
+
"children": {
|
|
885
|
+
"$ref": "common_types.json#/$defs/ChildList",
|
|
886
|
+
"description": "What the dialog holds, under its description."
|
|
887
|
+
},
|
|
888
|
+
"actions": {
|
|
889
|
+
"$ref": "common_types.json#/$defs/ChildList",
|
|
890
|
+
"description": "The dialog's buttons, at its foot."
|
|
891
|
+
},
|
|
892
|
+
"onClose": {
|
|
893
|
+
"$ref": "common_types.json#/$defs/Action",
|
|
894
|
+
"description": "Sent when the dialog closes, after a bound `open` has become false."
|
|
895
|
+
},
|
|
896
|
+
"open": {
|
|
897
|
+
"$ref": "common_types.json#/$defs/DynamicBoolean",
|
|
898
|
+
"description": "Bind it to a path, which the component writes."
|
|
899
|
+
},
|
|
900
|
+
"dismissible": {
|
|
901
|
+
"$ref": "common_types.json#/$defs/DynamicBoolean"
|
|
902
|
+
}
|
|
903
|
+
},
|
|
904
|
+
"required": [
|
|
905
|
+
"component",
|
|
906
|
+
"title"
|
|
907
|
+
],
|
|
908
|
+
"description": "A window that interrupts the screen for a confirmation or a short task."
|
|
909
|
+
},
|
|
910
|
+
"SearchField": {
|
|
911
|
+
"type": "object",
|
|
912
|
+
"properties": {
|
|
913
|
+
"component": {
|
|
914
|
+
"const": "SearchField"
|
|
915
|
+
},
|
|
916
|
+
"label": {
|
|
917
|
+
"$ref": "common_types.json#/$defs/DynamicString"
|
|
918
|
+
},
|
|
919
|
+
"value": {
|
|
920
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
921
|
+
"description": "The query. Bind it to a path, which the field writes as the person types."
|
|
922
|
+
},
|
|
923
|
+
"placeholder": {
|
|
924
|
+
"$ref": "common_types.json#/$defs/DynamicString"
|
|
925
|
+
},
|
|
926
|
+
"onSubmit": {
|
|
927
|
+
"$ref": "common_types.json#/$defs/Action",
|
|
928
|
+
"description": "Sent when the person submits the query with Enter."
|
|
929
|
+
},
|
|
930
|
+
"clearLabel": {
|
|
931
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
932
|
+
"description": "Names the clear button for assistive technology."
|
|
933
|
+
},
|
|
934
|
+
"disabled": {
|
|
935
|
+
"$ref": "common_types.json#/$defs/DynamicBoolean"
|
|
936
|
+
}
|
|
937
|
+
},
|
|
938
|
+
"required": [
|
|
939
|
+
"component",
|
|
940
|
+
"label",
|
|
941
|
+
"value"
|
|
942
|
+
],
|
|
943
|
+
"description": "A text field for a query, with a search mark and a control that clears it."
|
|
944
|
+
},
|
|
945
|
+
"RadioGroup": {
|
|
946
|
+
"type": "object",
|
|
947
|
+
"description": "One choice among a few, applied later with the form it belongs to. For a choice that takes effect at once, a SegmentedControl is the usual pick.",
|
|
948
|
+
"allOf": [
|
|
949
|
+
{
|
|
950
|
+
"$ref": "common_types.json#/$defs/Checkable"
|
|
951
|
+
},
|
|
952
|
+
{
|
|
953
|
+
"type": "object",
|
|
954
|
+
"properties": {
|
|
955
|
+
"component": {
|
|
956
|
+
"const": "RadioGroup"
|
|
957
|
+
},
|
|
958
|
+
"label": {
|
|
959
|
+
"$ref": "common_types.json#/$defs/DynamicString"
|
|
960
|
+
},
|
|
961
|
+
"options": {
|
|
962
|
+
"type": "array",
|
|
963
|
+
"items": {
|
|
964
|
+
"type": "object",
|
|
965
|
+
"properties": {
|
|
966
|
+
"value": {
|
|
967
|
+
"type": "string",
|
|
968
|
+
"description": "What the option stands for: the value that is bound when it is chosen."
|
|
969
|
+
},
|
|
970
|
+
"label": {
|
|
971
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
972
|
+
"description": "The text of the option."
|
|
973
|
+
},
|
|
974
|
+
"description": {
|
|
975
|
+
"$ref": "common_types.json#/$defs/DynamicString"
|
|
976
|
+
}
|
|
977
|
+
},
|
|
978
|
+
"required": [
|
|
979
|
+
"value",
|
|
980
|
+
"label"
|
|
981
|
+
],
|
|
982
|
+
"additionalProperties": false
|
|
983
|
+
}
|
|
984
|
+
},
|
|
985
|
+
"value": {
|
|
986
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
987
|
+
"description": "The value of the chosen option. Bind it to a path, which the group writes."
|
|
988
|
+
},
|
|
989
|
+
"error": {
|
|
990
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
991
|
+
"description": "Says what is wrong with the choice. A failing check shows its message here instead."
|
|
992
|
+
},
|
|
993
|
+
"disabled": {
|
|
994
|
+
"$ref": "common_types.json#/$defs/DynamicBoolean"
|
|
995
|
+
}
|
|
996
|
+
},
|
|
997
|
+
"required": [
|
|
998
|
+
"component",
|
|
999
|
+
"label",
|
|
1000
|
+
"options",
|
|
1001
|
+
"value"
|
|
1002
|
+
]
|
|
1003
|
+
}
|
|
1004
|
+
]
|
|
1005
|
+
},
|
|
1006
|
+
"Select": {
|
|
1007
|
+
"type": "object",
|
|
1008
|
+
"description": "A field for choosing one option from a list too long to show at once. The list opens as a popup where a pointer is used and as a bottom sheet where fingers are.",
|
|
1009
|
+
"allOf": [
|
|
1010
|
+
{
|
|
1011
|
+
"$ref": "common_types.json#/$defs/Checkable"
|
|
1012
|
+
},
|
|
1013
|
+
{
|
|
1014
|
+
"type": "object",
|
|
1015
|
+
"properties": {
|
|
1016
|
+
"component": {
|
|
1017
|
+
"const": "Select"
|
|
1018
|
+
},
|
|
1019
|
+
"label": {
|
|
1020
|
+
"$ref": "common_types.json#/$defs/DynamicString"
|
|
1021
|
+
},
|
|
1022
|
+
"options": {
|
|
1023
|
+
"type": "array",
|
|
1024
|
+
"items": {
|
|
1025
|
+
"type": "object",
|
|
1026
|
+
"properties": {
|
|
1027
|
+
"value": {
|
|
1028
|
+
"type": "string",
|
|
1029
|
+
"description": "What the option stands for: the value that is bound when it is chosen."
|
|
1030
|
+
},
|
|
1031
|
+
"label": {
|
|
1032
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
1033
|
+
"description": "The text of the option."
|
|
1034
|
+
},
|
|
1035
|
+
"description": {
|
|
1036
|
+
"$ref": "common_types.json#/$defs/DynamicString"
|
|
1037
|
+
}
|
|
1038
|
+
},
|
|
1039
|
+
"required": [
|
|
1040
|
+
"value",
|
|
1041
|
+
"label"
|
|
1042
|
+
],
|
|
1043
|
+
"additionalProperties": false
|
|
1044
|
+
}
|
|
1045
|
+
},
|
|
1046
|
+
"value": {
|
|
1047
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
1048
|
+
"description": "The value of the chosen option. Bind it to a path, which the select writes."
|
|
1049
|
+
},
|
|
1050
|
+
"placeholder": {
|
|
1051
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
1052
|
+
"description": "Shown while nothing is chosen."
|
|
1053
|
+
},
|
|
1054
|
+
"description": {
|
|
1055
|
+
"$ref": "common_types.json#/$defs/DynamicString"
|
|
1056
|
+
},
|
|
1057
|
+
"error": {
|
|
1058
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
1059
|
+
"description": "Says what is wrong with the choice. A failing check shows its message here instead."
|
|
1060
|
+
},
|
|
1061
|
+
"disabled": {
|
|
1062
|
+
"$ref": "common_types.json#/$defs/DynamicBoolean"
|
|
1063
|
+
}
|
|
1064
|
+
},
|
|
1065
|
+
"required": [
|
|
1066
|
+
"component",
|
|
1067
|
+
"label",
|
|
1068
|
+
"options",
|
|
1069
|
+
"value"
|
|
1070
|
+
]
|
|
1071
|
+
}
|
|
1072
|
+
]
|
|
1073
|
+
},
|
|
1074
|
+
"DatePicker": {
|
|
1075
|
+
"type": "object",
|
|
1076
|
+
"description": "A field for choosing one day. Closed, it looks like a Select. Pressed, it opens a calendar of one month: a popup where a pointer is used, a bottom sheet where fingers are.",
|
|
1077
|
+
"allOf": [
|
|
1078
|
+
{
|
|
1079
|
+
"$ref": "common_types.json#/$defs/Checkable"
|
|
1080
|
+
},
|
|
1081
|
+
{
|
|
1082
|
+
"type": "object",
|
|
1083
|
+
"properties": {
|
|
1084
|
+
"component": {
|
|
1085
|
+
"const": "DatePicker"
|
|
1086
|
+
},
|
|
1087
|
+
"label": {
|
|
1088
|
+
"$ref": "common_types.json#/$defs/DynamicString"
|
|
1089
|
+
},
|
|
1090
|
+
"value": {
|
|
1091
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
1092
|
+
"description": "A day, written YYYY-MM-DD. The chosen day. Bind it to a path, which the picker writes."
|
|
1093
|
+
},
|
|
1094
|
+
"min": {
|
|
1095
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
1096
|
+
"description": "A day, written YYYY-MM-DD. The first day that can be chosen."
|
|
1097
|
+
},
|
|
1098
|
+
"max": {
|
|
1099
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
1100
|
+
"description": "A day, written YYYY-MM-DD. The last day that can be chosen."
|
|
1101
|
+
},
|
|
1102
|
+
"placeholder": {
|
|
1103
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
1104
|
+
"description": "Shown while no day is chosen."
|
|
1105
|
+
},
|
|
1106
|
+
"description": {
|
|
1107
|
+
"$ref": "common_types.json#/$defs/DynamicString"
|
|
1108
|
+
},
|
|
1109
|
+
"error": {
|
|
1110
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
1111
|
+
"description": "Says what is wrong with the day. A failing check shows its message here instead."
|
|
1112
|
+
},
|
|
1113
|
+
"previousLabel": {
|
|
1114
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
1115
|
+
"description": "Names the button that shows the previous month."
|
|
1116
|
+
},
|
|
1117
|
+
"nextLabel": {
|
|
1118
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
1119
|
+
"description": "Names the button that shows the next month."
|
|
1120
|
+
},
|
|
1121
|
+
"disabled": {
|
|
1122
|
+
"$ref": "common_types.json#/$defs/DynamicBoolean"
|
|
1123
|
+
}
|
|
1124
|
+
},
|
|
1125
|
+
"required": [
|
|
1126
|
+
"component",
|
|
1127
|
+
"label",
|
|
1128
|
+
"value"
|
|
1129
|
+
]
|
|
1130
|
+
}
|
|
1131
|
+
]
|
|
1132
|
+
},
|
|
1133
|
+
"DateRangePicker": {
|
|
1134
|
+
"type": "object",
|
|
1135
|
+
"description": "A field for choosing a range of days, a start and an end, as for a stay or a trip. Closed, it looks like a DatePicker and shows both days. Pressed, it opens a calendar where the first day pressed starts the range and the second ends it: a popup of two months side by side where a pointer is used, a tall bottom sheet of months scrolling down where fingers are.",
|
|
1136
|
+
"allOf": [
|
|
1137
|
+
{
|
|
1138
|
+
"$ref": "common_types.json#/$defs/Checkable"
|
|
1139
|
+
},
|
|
1140
|
+
{
|
|
1141
|
+
"type": "object",
|
|
1142
|
+
"properties": {
|
|
1143
|
+
"component": {
|
|
1144
|
+
"const": "DateRangePicker"
|
|
1145
|
+
},
|
|
1146
|
+
"label": {
|
|
1147
|
+
"$ref": "common_types.json#/$defs/DynamicString"
|
|
1148
|
+
},
|
|
1149
|
+
"value": {
|
|
1150
|
+
"oneOf": [
|
|
1151
|
+
{
|
|
1152
|
+
"$ref": "#/$defs/DateRange"
|
|
1153
|
+
},
|
|
1154
|
+
{
|
|
1155
|
+
"$ref": "common_types.json#/$defs/DataBinding"
|
|
1156
|
+
}
|
|
1157
|
+
],
|
|
1158
|
+
"description": "The chosen days. Bind it to a path, which the picker writes."
|
|
1159
|
+
},
|
|
1160
|
+
"min": {
|
|
1161
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
1162
|
+
"description": "A day, written YYYY-MM-DD. The first day that can be chosen."
|
|
1163
|
+
},
|
|
1164
|
+
"max": {
|
|
1165
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
1166
|
+
"description": "A day, written YYYY-MM-DD. The last day that can be chosen."
|
|
1167
|
+
},
|
|
1168
|
+
"minLength": {
|
|
1169
|
+
"$ref": "common_types.json#/$defs/DynamicNumber",
|
|
1170
|
+
"description": "The fewest days a range may have."
|
|
1171
|
+
},
|
|
1172
|
+
"maxLength": {
|
|
1173
|
+
"$ref": "common_types.json#/$defs/DynamicNumber",
|
|
1174
|
+
"description": "The most days a range may have."
|
|
1175
|
+
},
|
|
1176
|
+
"placeholder": {
|
|
1177
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
1178
|
+
"description": "Shown while no range is chosen."
|
|
1179
|
+
},
|
|
1180
|
+
"description": {
|
|
1181
|
+
"$ref": "common_types.json#/$defs/DynamicString"
|
|
1182
|
+
},
|
|
1183
|
+
"error": {
|
|
1184
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
1185
|
+
"description": "Says what is wrong with the range. A failing check shows its message here instead."
|
|
1186
|
+
},
|
|
1187
|
+
"startLabel": {
|
|
1188
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
1189
|
+
"description": "Names the first day of the range."
|
|
1190
|
+
},
|
|
1191
|
+
"endLabel": {
|
|
1192
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
1193
|
+
"description": "Names the last day of the range."
|
|
1194
|
+
},
|
|
1195
|
+
"previousLabel": {
|
|
1196
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
1197
|
+
"description": "Names the button that shows the previous month."
|
|
1198
|
+
},
|
|
1199
|
+
"nextLabel": {
|
|
1200
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
1201
|
+
"description": "Names the button that shows the next month."
|
|
1202
|
+
},
|
|
1203
|
+
"doneLabel": {
|
|
1204
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
1205
|
+
"description": "Names the button that closes the calendar. Only some clients use it: Names the button at the bottom of the touch sheet that closes it; `Done` unless it is given. The popup has no such button."
|
|
1206
|
+
},
|
|
1207
|
+
"disabled": {
|
|
1208
|
+
"$ref": "common_types.json#/$defs/DynamicBoolean"
|
|
1209
|
+
}
|
|
1210
|
+
},
|
|
1211
|
+
"required": [
|
|
1212
|
+
"component",
|
|
1213
|
+
"label",
|
|
1214
|
+
"value"
|
|
1215
|
+
]
|
|
1216
|
+
}
|
|
1217
|
+
]
|
|
1218
|
+
},
|
|
1219
|
+
"Slider": {
|
|
1220
|
+
"type": "object",
|
|
1221
|
+
"properties": {
|
|
1222
|
+
"component": {
|
|
1223
|
+
"const": "Slider"
|
|
1224
|
+
},
|
|
1225
|
+
"label": {
|
|
1226
|
+
"$ref": "common_types.json#/$defs/DynamicString"
|
|
1227
|
+
},
|
|
1228
|
+
"value": {
|
|
1229
|
+
"$ref": "common_types.json#/$defs/DynamicNumber",
|
|
1230
|
+
"description": "Bind it to a path, which the slider writes."
|
|
1231
|
+
},
|
|
1232
|
+
"min": {
|
|
1233
|
+
"$ref": "common_types.json#/$defs/DynamicNumber",
|
|
1234
|
+
"description": "0 unless given."
|
|
1235
|
+
},
|
|
1236
|
+
"max": {
|
|
1237
|
+
"$ref": "common_types.json#/$defs/DynamicNumber",
|
|
1238
|
+
"description": "100 unless given."
|
|
1239
|
+
},
|
|
1240
|
+
"step": {
|
|
1241
|
+
"$ref": "common_types.json#/$defs/DynamicNumber",
|
|
1242
|
+
"description": "1 unless given."
|
|
1243
|
+
},
|
|
1244
|
+
"disabled": {
|
|
1245
|
+
"$ref": "common_types.json#/$defs/DynamicBoolean"
|
|
1246
|
+
},
|
|
1247
|
+
"showValue": {
|
|
1248
|
+
"$ref": "common_types.json#/$defs/DynamicBoolean"
|
|
1249
|
+
}
|
|
1250
|
+
},
|
|
1251
|
+
"required": [
|
|
1252
|
+
"component",
|
|
1253
|
+
"label",
|
|
1254
|
+
"value"
|
|
1255
|
+
],
|
|
1256
|
+
"description": "Picks a number in a range by dragging, or with the arrow keys."
|
|
1257
|
+
},
|
|
1258
|
+
"Thumbnail": {
|
|
1259
|
+
"type": "object",
|
|
1260
|
+
"properties": {
|
|
1261
|
+
"component": {
|
|
1262
|
+
"const": "Thumbnail"
|
|
1263
|
+
},
|
|
1264
|
+
"src": {
|
|
1265
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
1266
|
+
"description": "The address of the picture."
|
|
1267
|
+
},
|
|
1268
|
+
"alt": {
|
|
1269
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
1270
|
+
"description": "Describes the picture for assistive technology."
|
|
1271
|
+
},
|
|
1272
|
+
"badge": {
|
|
1273
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
1274
|
+
"description": "A short text over the corner, such as a duration."
|
|
1275
|
+
},
|
|
1276
|
+
"progress": {
|
|
1277
|
+
"$ref": "common_types.json#/$defs/DynamicNumber",
|
|
1278
|
+
"description": "How much has been watched, from 0 to 1, as a bar along the bottom."
|
|
1279
|
+
},
|
|
1280
|
+
"ratio": {
|
|
1281
|
+
"type": "string",
|
|
1282
|
+
"enum": [
|
|
1283
|
+
"16:9",
|
|
1284
|
+
"1:1",
|
|
1285
|
+
"4:3",
|
|
1286
|
+
"9:16"
|
|
1287
|
+
]
|
|
1288
|
+
}
|
|
1289
|
+
},
|
|
1290
|
+
"required": [
|
|
1291
|
+
"component",
|
|
1292
|
+
"alt"
|
|
1293
|
+
],
|
|
1294
|
+
"description": "A picture in a fixed shape, for a video, an article or a product, with an optional badge and a bar for how much was watched."
|
|
1295
|
+
},
|
|
1296
|
+
"MediaCard": {
|
|
1297
|
+
"type": "object",
|
|
1298
|
+
"properties": {
|
|
1299
|
+
"component": {
|
|
1300
|
+
"const": "MediaCard"
|
|
1301
|
+
},
|
|
1302
|
+
"src": {
|
|
1303
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
1304
|
+
"description": "The address of the picture."
|
|
1305
|
+
},
|
|
1306
|
+
"alt": {
|
|
1307
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
1308
|
+
"description": "Describes the picture for assistive technology."
|
|
1309
|
+
},
|
|
1310
|
+
"ratio": {
|
|
1311
|
+
"type": "string",
|
|
1312
|
+
"enum": [
|
|
1313
|
+
"16:9",
|
|
1314
|
+
"1:1",
|
|
1315
|
+
"4:3",
|
|
1316
|
+
"9:16"
|
|
1317
|
+
]
|
|
1318
|
+
},
|
|
1319
|
+
"badge": {
|
|
1320
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
1321
|
+
"description": "A short text over the picture's corner, such as a duration."
|
|
1322
|
+
},
|
|
1323
|
+
"progress": {
|
|
1324
|
+
"$ref": "common_types.json#/$defs/DynamicNumber",
|
|
1325
|
+
"description": "How much has been watched, from 0 to 1."
|
|
1326
|
+
},
|
|
1327
|
+
"title": {
|
|
1328
|
+
"$ref": "common_types.json#/$defs/DynamicString"
|
|
1329
|
+
},
|
|
1330
|
+
"meta": {
|
|
1331
|
+
"$ref": "common_types.json#/$defs/DynamicStringList",
|
|
1332
|
+
"description": "Short facts under the title, such as a channel and a date."
|
|
1333
|
+
},
|
|
1334
|
+
"leading": {
|
|
1335
|
+
"$ref": "common_types.json#/$defs/Child",
|
|
1336
|
+
"description": "In front of the text, such as an Avatar."
|
|
1337
|
+
},
|
|
1338
|
+
"action": {
|
|
1339
|
+
"$ref": "common_types.json#/$defs/Child",
|
|
1340
|
+
"description": "A control beside the text, such as an IconButton that opens a Menu."
|
|
1341
|
+
},
|
|
1342
|
+
"onPress": {
|
|
1343
|
+
"$ref": "common_types.json#/$defs/Action",
|
|
1344
|
+
"description": "Makes the card a button."
|
|
1345
|
+
},
|
|
1346
|
+
"layout": {
|
|
1347
|
+
"type": "string",
|
|
1348
|
+
"enum": [
|
|
1349
|
+
"vertical",
|
|
1350
|
+
"horizontal"
|
|
1351
|
+
]
|
|
1352
|
+
}
|
|
1353
|
+
},
|
|
1354
|
+
"required": [
|
|
1355
|
+
"component",
|
|
1356
|
+
"title"
|
|
1357
|
+
],
|
|
1358
|
+
"description": "A thumbnail with its title and details: a video in a feed, an article in a list. Vertical, or horizontal with the picture at the start."
|
|
1359
|
+
},
|
|
1360
|
+
"SectionHeader": {
|
|
1361
|
+
"type": "object",
|
|
1362
|
+
"properties": {
|
|
1363
|
+
"component": {
|
|
1364
|
+
"const": "SectionHeader"
|
|
1365
|
+
},
|
|
1366
|
+
"title": {
|
|
1367
|
+
"$ref": "common_types.json#/$defs/DynamicString"
|
|
1368
|
+
},
|
|
1369
|
+
"description": {
|
|
1370
|
+
"$ref": "common_types.json#/$defs/DynamicString"
|
|
1371
|
+
},
|
|
1372
|
+
"icon": {
|
|
1373
|
+
"$ref": "#/$defs/IconName"
|
|
1374
|
+
},
|
|
1375
|
+
"action": {
|
|
1376
|
+
"type": "object",
|
|
1377
|
+
"properties": {
|
|
1378
|
+
"label": {
|
|
1379
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
1380
|
+
"description": "The text of the button."
|
|
1381
|
+
},
|
|
1382
|
+
"onPress": {
|
|
1383
|
+
"$ref": "common_types.json#/$defs/Action",
|
|
1384
|
+
"description": "Sent when the button is pressed."
|
|
1385
|
+
}
|
|
1386
|
+
},
|
|
1387
|
+
"required": [
|
|
1388
|
+
"label",
|
|
1389
|
+
"onPress"
|
|
1390
|
+
],
|
|
1391
|
+
"additionalProperties": false,
|
|
1392
|
+
"description": "A button at the end of the header, such as \"See all\"."
|
|
1393
|
+
},
|
|
1394
|
+
"level": {
|
|
1395
|
+
"type": "number",
|
|
1396
|
+
"enum": [
|
|
1397
|
+
1,
|
|
1398
|
+
2,
|
|
1399
|
+
3,
|
|
1400
|
+
4,
|
|
1401
|
+
5,
|
|
1402
|
+
6
|
|
1403
|
+
],
|
|
1404
|
+
"description": "The heading level, 2 unless given."
|
|
1405
|
+
}
|
|
1406
|
+
},
|
|
1407
|
+
"required": [
|
|
1408
|
+
"component",
|
|
1409
|
+
"title"
|
|
1410
|
+
],
|
|
1411
|
+
"description": "The title row of a group of content, with an optional description and an action such as \"See all\"."
|
|
1412
|
+
},
|
|
1413
|
+
"EmptyState": {
|
|
1414
|
+
"type": "object",
|
|
1415
|
+
"properties": {
|
|
1416
|
+
"component": {
|
|
1417
|
+
"const": "EmptyState"
|
|
1418
|
+
},
|
|
1419
|
+
"icon": {
|
|
1420
|
+
"$ref": "#/$defs/IconName"
|
|
1421
|
+
},
|
|
1422
|
+
"title": {
|
|
1423
|
+
"$ref": "common_types.json#/$defs/DynamicString"
|
|
1424
|
+
},
|
|
1425
|
+
"description": {
|
|
1426
|
+
"$ref": "common_types.json#/$defs/DynamicString"
|
|
1427
|
+
},
|
|
1428
|
+
"action": {
|
|
1429
|
+
"$ref": "common_types.json#/$defs/Child",
|
|
1430
|
+
"description": "A button that gets the person started."
|
|
1431
|
+
}
|
|
1432
|
+
},
|
|
1433
|
+
"required": [
|
|
1434
|
+
"component",
|
|
1435
|
+
"icon",
|
|
1436
|
+
"title"
|
|
1437
|
+
],
|
|
1438
|
+
"description": "What a screen says when it has nothing to show, and the one thing to do about it."
|
|
1439
|
+
},
|
|
1440
|
+
"Accordion": {
|
|
1441
|
+
"type": "object",
|
|
1442
|
+
"properties": {
|
|
1443
|
+
"component": {
|
|
1444
|
+
"const": "Accordion"
|
|
1445
|
+
},
|
|
1446
|
+
"items": {
|
|
1447
|
+
"type": "array",
|
|
1448
|
+
"items": {
|
|
1449
|
+
"type": "object",
|
|
1450
|
+
"properties": {
|
|
1451
|
+
"value": {
|
|
1452
|
+
"type": "string",
|
|
1453
|
+
"description": "Names the item in `expanded`."
|
|
1454
|
+
},
|
|
1455
|
+
"title": {
|
|
1456
|
+
"$ref": "common_types.json#/$defs/DynamicString"
|
|
1457
|
+
},
|
|
1458
|
+
"description": {
|
|
1459
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
1460
|
+
"description": "A line under the title, shown whether the item is open or not."
|
|
1461
|
+
},
|
|
1462
|
+
"content": {
|
|
1463
|
+
"$ref": "common_types.json#/$defs/Child",
|
|
1464
|
+
"description": "What the item shows while it is open."
|
|
1465
|
+
}
|
|
1466
|
+
},
|
|
1467
|
+
"required": [
|
|
1468
|
+
"value",
|
|
1469
|
+
"title",
|
|
1470
|
+
"content"
|
|
1471
|
+
],
|
|
1472
|
+
"additionalProperties": false
|
|
1473
|
+
}
|
|
1474
|
+
},
|
|
1475
|
+
"expanded": {
|
|
1476
|
+
"$ref": "common_types.json#/$defs/DynamicStringList",
|
|
1477
|
+
"description": "The values of the open items. Bind it to a path, which the accordion writes."
|
|
1478
|
+
},
|
|
1479
|
+
"multiple": {
|
|
1480
|
+
"$ref": "common_types.json#/$defs/DynamicBoolean"
|
|
1481
|
+
}
|
|
1482
|
+
},
|
|
1483
|
+
"required": [
|
|
1484
|
+
"component",
|
|
1485
|
+
"items",
|
|
1486
|
+
"expanded"
|
|
1487
|
+
],
|
|
1488
|
+
"description": "Items whose bodies open and close under their titles. One at a time, or several with `multiple`."
|
|
1489
|
+
}
|
|
1490
|
+
},
|
|
1491
|
+
"$defs": {
|
|
1492
|
+
"anyComponent": {
|
|
1493
|
+
"oneOf": [
|
|
1494
|
+
{
|
|
1495
|
+
"$ref": "#/components/Button"
|
|
1496
|
+
},
|
|
1497
|
+
{
|
|
1498
|
+
"$ref": "#/components/TextField"
|
|
1499
|
+
},
|
|
1500
|
+
{
|
|
1501
|
+
"$ref": "#/components/Text"
|
|
1502
|
+
},
|
|
1503
|
+
{
|
|
1504
|
+
"$ref": "#/components/Badge"
|
|
1505
|
+
},
|
|
1506
|
+
{
|
|
1507
|
+
"$ref": "#/components/CountBadge"
|
|
1508
|
+
},
|
|
1509
|
+
{
|
|
1510
|
+
"$ref": "#/components/Banner"
|
|
1511
|
+
},
|
|
1512
|
+
{
|
|
1513
|
+
"$ref": "#/components/Card"
|
|
1514
|
+
},
|
|
1515
|
+
{
|
|
1516
|
+
"$ref": "#/components/Divider"
|
|
1517
|
+
},
|
|
1518
|
+
{
|
|
1519
|
+
"$ref": "#/components/Spinner"
|
|
1520
|
+
},
|
|
1521
|
+
{
|
|
1522
|
+
"$ref": "#/components/Switch"
|
|
1523
|
+
},
|
|
1524
|
+
{
|
|
1525
|
+
"$ref": "#/components/Checkbox"
|
|
1526
|
+
},
|
|
1527
|
+
{
|
|
1528
|
+
"$ref": "#/components/SegmentedControl"
|
|
1529
|
+
},
|
|
1530
|
+
{
|
|
1531
|
+
"$ref": "#/components/Avatar"
|
|
1532
|
+
},
|
|
1533
|
+
{
|
|
1534
|
+
"$ref": "#/components/AvatarStack"
|
|
1535
|
+
},
|
|
1536
|
+
{
|
|
1537
|
+
"$ref": "#/components/ProgressBar"
|
|
1538
|
+
},
|
|
1539
|
+
{
|
|
1540
|
+
"$ref": "#/components/Icon"
|
|
1541
|
+
},
|
|
1542
|
+
{
|
|
1543
|
+
"$ref": "#/components/ListRow"
|
|
1544
|
+
},
|
|
1545
|
+
{
|
|
1546
|
+
"$ref": "#/components/IconButton"
|
|
1547
|
+
},
|
|
1548
|
+
{
|
|
1549
|
+
"$ref": "#/components/Chip"
|
|
1550
|
+
},
|
|
1551
|
+
{
|
|
1552
|
+
"$ref": "#/components/ChipBar"
|
|
1553
|
+
},
|
|
1554
|
+
{
|
|
1555
|
+
"$ref": "#/components/Tabs"
|
|
1556
|
+
},
|
|
1557
|
+
{
|
|
1558
|
+
"$ref": "#/components/Menu"
|
|
1559
|
+
},
|
|
1560
|
+
{
|
|
1561
|
+
"$ref": "#/components/Dialog"
|
|
1562
|
+
},
|
|
1563
|
+
{
|
|
1564
|
+
"$ref": "#/components/SearchField"
|
|
1565
|
+
},
|
|
1566
|
+
{
|
|
1567
|
+
"$ref": "#/components/RadioGroup"
|
|
1568
|
+
},
|
|
1569
|
+
{
|
|
1570
|
+
"$ref": "#/components/Select"
|
|
1571
|
+
},
|
|
1572
|
+
{
|
|
1573
|
+
"$ref": "#/components/DatePicker"
|
|
1574
|
+
},
|
|
1575
|
+
{
|
|
1576
|
+
"$ref": "#/components/DateRangePicker"
|
|
1577
|
+
},
|
|
1578
|
+
{
|
|
1579
|
+
"$ref": "#/components/Slider"
|
|
1580
|
+
},
|
|
1581
|
+
{
|
|
1582
|
+
"$ref": "#/components/Thumbnail"
|
|
1583
|
+
},
|
|
1584
|
+
{
|
|
1585
|
+
"$ref": "#/components/MediaCard"
|
|
1586
|
+
},
|
|
1587
|
+
{
|
|
1588
|
+
"$ref": "#/components/SectionHeader"
|
|
1589
|
+
},
|
|
1590
|
+
{
|
|
1591
|
+
"$ref": "#/components/EmptyState"
|
|
1592
|
+
},
|
|
1593
|
+
{
|
|
1594
|
+
"$ref": "#/components/Accordion"
|
|
1595
|
+
}
|
|
1596
|
+
],
|
|
1597
|
+
"discriminator": {
|
|
1598
|
+
"propertyName": "component"
|
|
1599
|
+
}
|
|
1600
|
+
},
|
|
1601
|
+
"anyFunction": {
|
|
1602
|
+
"not": {}
|
|
1603
|
+
},
|
|
1604
|
+
"IconName": {
|
|
1605
|
+
"type": "string",
|
|
1606
|
+
"enum": [
|
|
1607
|
+
"arrow-down",
|
|
1608
|
+
"arrow-left",
|
|
1609
|
+
"arrow-right",
|
|
1610
|
+
"arrow-up",
|
|
1611
|
+
"arrow-up-down",
|
|
1612
|
+
"ban",
|
|
1613
|
+
"bell",
|
|
1614
|
+
"bell-off",
|
|
1615
|
+
"bell-ring",
|
|
1616
|
+
"bookmark",
|
|
1617
|
+
"bug",
|
|
1618
|
+
"calendar",
|
|
1619
|
+
"camera",
|
|
1620
|
+
"captions",
|
|
1621
|
+
"cast",
|
|
1622
|
+
"chart-column",
|
|
1623
|
+
"check",
|
|
1624
|
+
"check-check",
|
|
1625
|
+
"chevron-down",
|
|
1626
|
+
"chevron-first",
|
|
1627
|
+
"chevron-last",
|
|
1628
|
+
"chevron-left",
|
|
1629
|
+
"chevron-right",
|
|
1630
|
+
"chevron-up",
|
|
1631
|
+
"chevrons-up-down",
|
|
1632
|
+
"circle-alert",
|
|
1633
|
+
"circle-check",
|
|
1634
|
+
"circle-help",
|
|
1635
|
+
"circle-minus",
|
|
1636
|
+
"circle-plus",
|
|
1637
|
+
"circle-user",
|
|
1638
|
+
"circle-x",
|
|
1639
|
+
"clapperboard",
|
|
1640
|
+
"clock",
|
|
1641
|
+
"cloud-upload",
|
|
1642
|
+
"compass",
|
|
1643
|
+
"copy",
|
|
1644
|
+
"credit-card",
|
|
1645
|
+
"download",
|
|
1646
|
+
"ellipsis",
|
|
1647
|
+
"ellipsis-vertical",
|
|
1648
|
+
"external-link",
|
|
1649
|
+
"eye",
|
|
1650
|
+
"eye-off",
|
|
1651
|
+
"fast-forward",
|
|
1652
|
+
"file-text",
|
|
1653
|
+
"flag",
|
|
1654
|
+
"folder",
|
|
1655
|
+
"gamepad-2",
|
|
1656
|
+
"globe",
|
|
1657
|
+
"graduation-cap",
|
|
1658
|
+
"grip-vertical",
|
|
1659
|
+
"heart",
|
|
1660
|
+
"heart-off",
|
|
1661
|
+
"history",
|
|
1662
|
+
"house",
|
|
1663
|
+
"image",
|
|
1664
|
+
"info",
|
|
1665
|
+
"keyboard",
|
|
1666
|
+
"laptop",
|
|
1667
|
+
"layout-grid",
|
|
1668
|
+
"lightbulb",
|
|
1669
|
+
"link",
|
|
1670
|
+
"list",
|
|
1671
|
+
"list-filter",
|
|
1672
|
+
"list-plus",
|
|
1673
|
+
"list-video",
|
|
1674
|
+
"list-x",
|
|
1675
|
+
"lock",
|
|
1676
|
+
"lock-open",
|
|
1677
|
+
"log-out",
|
|
1678
|
+
"mail",
|
|
1679
|
+
"map-pin",
|
|
1680
|
+
"maximize",
|
|
1681
|
+
"megaphone",
|
|
1682
|
+
"menu",
|
|
1683
|
+
"message-square",
|
|
1684
|
+
"mic",
|
|
1685
|
+
"minus",
|
|
1686
|
+
"music",
|
|
1687
|
+
"newspaper",
|
|
1688
|
+
"palette",
|
|
1689
|
+
"paperclip",
|
|
1690
|
+
"pause",
|
|
1691
|
+
"pencil",
|
|
1692
|
+
"phone",
|
|
1693
|
+
"picture-in-picture-2",
|
|
1694
|
+
"pin",
|
|
1695
|
+
"play",
|
|
1696
|
+
"plus",
|
|
1697
|
+
"podcast",
|
|
1698
|
+
"printer",
|
|
1699
|
+
"qr-code",
|
|
1700
|
+
"radio",
|
|
1701
|
+
"repeat",
|
|
1702
|
+
"repeat-1",
|
|
1703
|
+
"rewind",
|
|
1704
|
+
"rotate-ccw",
|
|
1705
|
+
"rotate-cw",
|
|
1706
|
+
"scissors",
|
|
1707
|
+
"search",
|
|
1708
|
+
"send",
|
|
1709
|
+
"settings",
|
|
1710
|
+
"share-2",
|
|
1711
|
+
"shield",
|
|
1712
|
+
"shirt",
|
|
1713
|
+
"shopping-bag",
|
|
1714
|
+
"shopping-cart",
|
|
1715
|
+
"shuffle",
|
|
1716
|
+
"skip-back",
|
|
1717
|
+
"skip-forward",
|
|
1718
|
+
"sliders-horizontal",
|
|
1719
|
+
"smartphone",
|
|
1720
|
+
"smile",
|
|
1721
|
+
"sparkles",
|
|
1722
|
+
"square",
|
|
1723
|
+
"square-check",
|
|
1724
|
+
"star",
|
|
1725
|
+
"star-half",
|
|
1726
|
+
"star-off",
|
|
1727
|
+
"sun-moon",
|
|
1728
|
+
"tag",
|
|
1729
|
+
"thumbs-down",
|
|
1730
|
+
"thumbs-up",
|
|
1731
|
+
"timer",
|
|
1732
|
+
"trash",
|
|
1733
|
+
"trending-up",
|
|
1734
|
+
"triangle-alert",
|
|
1735
|
+
"trophy",
|
|
1736
|
+
"tv",
|
|
1737
|
+
"undo-2",
|
|
1738
|
+
"upload",
|
|
1739
|
+
"user",
|
|
1740
|
+
"user-check",
|
|
1741
|
+
"user-plus",
|
|
1742
|
+
"user-x",
|
|
1743
|
+
"users",
|
|
1744
|
+
"video",
|
|
1745
|
+
"volume",
|
|
1746
|
+
"volume-1",
|
|
1747
|
+
"volume-2",
|
|
1748
|
+
"volume-x",
|
|
1749
|
+
"x"
|
|
1750
|
+
],
|
|
1751
|
+
"description": "The name of an icon of the design system."
|
|
1752
|
+
},
|
|
1753
|
+
"DateRange": {
|
|
1754
|
+
"type": "object",
|
|
1755
|
+
"description": "Two days, written YYYY-MM-DD: the first and the last of a range.",
|
|
1756
|
+
"properties": {
|
|
1757
|
+
"start": {
|
|
1758
|
+
"type": "string"
|
|
1759
|
+
},
|
|
1760
|
+
"end": {
|
|
1761
|
+
"type": "string"
|
|
1762
|
+
}
|
|
1763
|
+
},
|
|
1764
|
+
"required": [
|
|
1765
|
+
"start",
|
|
1766
|
+
"end"
|
|
1767
|
+
],
|
|
1768
|
+
"additionalProperties": false
|
|
1769
|
+
}
|
|
1770
|
+
}
|
|
1771
|
+
};
|
|
1772
|
+
export const POINTER_CATALOG = {
|
|
1773
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
1774
|
+
"$id": "https://xds.studiocyf.app/a2ui/v1/pointer.json",
|
|
1775
|
+
"protocolVersion": "1.0",
|
|
1776
|
+
"title": "xds for a pointer",
|
|
1777
|
+
"description": "The xds components that only clients with a mouse or a trackpad have: the web and the desktop.",
|
|
1778
|
+
"catalogId": "https://xds.studiocyf.app/a2ui/v1/pointer.json",
|
|
1779
|
+
"instructions": "These are the xds components that only clients with a pointer have, beside those of the xds catalog. The app draws them in its own theme, in light and dark mode, so a component takes no colors, fonts or sizes: choose among its variants, sizes and tones instead.\n\nLay them out with Row, Column and List from A2UI's basic catalog, which has no xds counterpart. A surface mixes catalogs: create it with the xds catalog (https://xds.studiocyf.app/a2ui/v1/catalog.json) as its default, give Row, Column and List `\"@catalogId\": \"https://a2ui.org/specification/v1_0/catalogs/basic/catalog.json\"`, and give a function call, such as `required` in a check or `formatString`, `\"catalogId\": \"https://a2ui.org/specification/v1_0/catalogs/basic/catalog.json\"`. Give each component of this catalog `\"@catalogId\": \"https://xds.studiocyf.app/a2ui/v1/pointer.json\"`. Leave out a component's options to take the app's defaults.\n\nA component that a person changes (a field, a switch, a select) reads its value from a path in the data model and writes it back there: bind `value`, or `checked`, `selected`, `open` or `expanded`, with `{\"@path\": ...}`. An action, such as a Button's `onPress`, sends an event to the agent; put the paths it needs in the event's `context`. A field shows the message of a failing check in `@checks` as its error, and a Button with checks is disabled while one fails.\n\n## Accessibility\n\n- Tooltip: Describes the control; it is not the control's name, which the control still needs.",
|
|
1780
|
+
"components": {
|
|
1781
|
+
"Tooltip": {
|
|
1782
|
+
"type": "object",
|
|
1783
|
+
"properties": {
|
|
1784
|
+
"component": {
|
|
1785
|
+
"const": "Tooltip"
|
|
1786
|
+
},
|
|
1787
|
+
"label": {
|
|
1788
|
+
"$ref": "common_types.json#/$defs/DynamicString"
|
|
1789
|
+
},
|
|
1790
|
+
"shortcut": {
|
|
1791
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
1792
|
+
"description": "A keyboard shortcut shown after the label, such as \"⌘K\"."
|
|
1793
|
+
},
|
|
1794
|
+
"placement": {
|
|
1795
|
+
"type": "string",
|
|
1796
|
+
"enum": [
|
|
1797
|
+
"top",
|
|
1798
|
+
"bottom"
|
|
1799
|
+
]
|
|
1800
|
+
},
|
|
1801
|
+
"children": {
|
|
1802
|
+
"$ref": "common_types.json#/$defs/Child",
|
|
1803
|
+
"description": "The component the tooltip describes, such as an IconButton."
|
|
1804
|
+
}
|
|
1805
|
+
},
|
|
1806
|
+
"required": [
|
|
1807
|
+
"component",
|
|
1808
|
+
"label",
|
|
1809
|
+
"children"
|
|
1810
|
+
],
|
|
1811
|
+
"description": "Names a control when the pointer rests on it or the keyboard focuses it. Pointer clients only: there is no hover on a touch screen."
|
|
1812
|
+
}
|
|
1813
|
+
},
|
|
1814
|
+
"$defs": {
|
|
1815
|
+
"anyComponent": {
|
|
1816
|
+
"oneOf": [
|
|
1817
|
+
{
|
|
1818
|
+
"$ref": "#/components/Tooltip"
|
|
1819
|
+
}
|
|
1820
|
+
],
|
|
1821
|
+
"discriminator": {
|
|
1822
|
+
"propertyName": "component"
|
|
1823
|
+
}
|
|
1824
|
+
},
|
|
1825
|
+
"anyFunction": {
|
|
1826
|
+
"not": {}
|
|
1827
|
+
}
|
|
1828
|
+
}
|
|
1829
|
+
};
|
|
1830
|
+
export const TOUCH_CATALOG = {
|
|
1831
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
1832
|
+
"$id": "https://xds.studiocyf.app/a2ui/v1/touch.json",
|
|
1833
|
+
"protocolVersion": "1.0",
|
|
1834
|
+
"title": "xds for touch",
|
|
1835
|
+
"description": "The xds components that only clients for a touch screen have: React Native, Compose and Flutter.",
|
|
1836
|
+
"catalogId": "https://xds.studiocyf.app/a2ui/v1/touch.json",
|
|
1837
|
+
"instructions": "These are the xds components that only clients for touch have, beside those of the xds catalog. The app draws them in its own theme, in light and dark mode, so a component takes no colors, fonts or sizes: choose among its variants, sizes and tones instead.\n\nLay them out with Row, Column and List from A2UI's basic catalog, which has no xds counterpart. A surface mixes catalogs: create it with the xds catalog (https://xds.studiocyf.app/a2ui/v1/catalog.json) as its default, give Row, Column and List `\"@catalogId\": \"https://a2ui.org/specification/v1_0/catalogs/basic/catalog.json\"`, and give a function call, such as `required` in a check or `formatString`, `\"catalogId\": \"https://a2ui.org/specification/v1_0/catalogs/basic/catalog.json\"`. Give each component of this catalog `\"@catalogId\": \"https://xds.studiocyf.app/a2ui/v1/touch.json\"`. Leave out a component's options to take the app's defaults.\n\nA component that a person changes (a field, a switch, a select) reads its value from a path in the data model and writes it back there: bind `value`, or `checked`, `selected`, `open` or `expanded`, with `{\"@path\": ...}`. An action, such as a Button's `onPress`, sends an event to the agent; put the paths it needs in the event's `context`. A field shows the message of a failing check in `@checks` as its error, and a Button with checks is disabled while one fails.\n\n## Accessibility\n\n- BottomSheet: Modal. Closes on a tap outside, a drag down, or the back button.",
|
|
1838
|
+
"components": {
|
|
1839
|
+
"BottomSheet": {
|
|
1840
|
+
"type": "object",
|
|
1841
|
+
"properties": {
|
|
1842
|
+
"component": {
|
|
1843
|
+
"const": "BottomSheet"
|
|
1844
|
+
},
|
|
1845
|
+
"title": {
|
|
1846
|
+
"$ref": "common_types.json#/$defs/DynamicString"
|
|
1847
|
+
},
|
|
1848
|
+
"content": {
|
|
1849
|
+
"$ref": "common_types.json#/$defs/ChildList",
|
|
1850
|
+
"description": "What the sheet holds."
|
|
1851
|
+
},
|
|
1852
|
+
"surface": {
|
|
1853
|
+
"type": "string",
|
|
1854
|
+
"enum": [
|
|
1855
|
+
"solid",
|
|
1856
|
+
"glass"
|
|
1857
|
+
]
|
|
1858
|
+
},
|
|
1859
|
+
"open": {
|
|
1860
|
+
"$ref": "common_types.json#/$defs/DynamicBoolean",
|
|
1861
|
+
"description": "Bind it to a path, which the component writes."
|
|
1862
|
+
}
|
|
1863
|
+
},
|
|
1864
|
+
"required": [
|
|
1865
|
+
"component",
|
|
1866
|
+
"content"
|
|
1867
|
+
],
|
|
1868
|
+
"description": "A panel that slides up over the screen for a short task or a set of choices."
|
|
1869
|
+
}
|
|
1870
|
+
},
|
|
1871
|
+
"$defs": {
|
|
1872
|
+
"anyComponent": {
|
|
1873
|
+
"oneOf": [
|
|
1874
|
+
{
|
|
1875
|
+
"$ref": "#/components/BottomSheet"
|
|
1876
|
+
}
|
|
1877
|
+
],
|
|
1878
|
+
"discriminator": {
|
|
1879
|
+
"propertyName": "component"
|
|
1880
|
+
}
|
|
1881
|
+
},
|
|
1882
|
+
"anyFunction": {
|
|
1883
|
+
"not": {}
|
|
1884
|
+
}
|
|
1885
|
+
}
|
|
1886
|
+
};
|