mlola-ui 1.9.2 → 1.10.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/README.md +38 -1
- package/package.json +11 -2
- package/registry/agents.md +1 -0
- package/registry/contract.json +6 -0
- package/registry/examples.json +21 -0
- package/registry/index.json +133 -50
- package/registry/render-app.html +8480 -0
- package/registry/render-catalog.json +1650 -0
- package/registry/render-rules.json +1356 -0
- package/registry/render.d.ts +106 -0
- package/registry/render.js +989 -0
- package/registry/source/packages/components/render-surface/render-surface.tsx +488 -0
- package/registry/source-manifest.json +1 -0
- package/src/cli.js +21 -0
- package/src/knowledge.js +15 -0
- package/src/mcp.js +92 -9
- package/src/render-rules.d.ts +5 -0
|
@@ -0,0 +1,1356 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$comment": "Generated by scripts/build-render-catalog.mjs from packages/registry/render/definition.json. Do not edit.",
|
|
3
|
+
"version": "1.10.0",
|
|
4
|
+
"catalogId": "https://ui.mlola.com/a2ui/catalog/v1",
|
|
5
|
+
"title": "Mlola Render catalog",
|
|
6
|
+
"description": "Mlola UI components for interfaces an agent composes at runtime. Every component is accessible by construction and follows the surface's theme; an agent picks named values (tone, variant, size) and never writes a color, size or class.",
|
|
7
|
+
"protocolVersions": [
|
|
8
|
+
"v0.9",
|
|
9
|
+
"v0.9.1"
|
|
10
|
+
],
|
|
11
|
+
"themes": [
|
|
12
|
+
"graphite",
|
|
13
|
+
"atelier",
|
|
14
|
+
"machined",
|
|
15
|
+
"aerogel",
|
|
16
|
+
"nordic"
|
|
17
|
+
],
|
|
18
|
+
"defaultTheme": "graphite",
|
|
19
|
+
"modes": [
|
|
20
|
+
"light",
|
|
21
|
+
"dark",
|
|
22
|
+
"system"
|
|
23
|
+
],
|
|
24
|
+
"groups": {
|
|
25
|
+
"layout": "Layout",
|
|
26
|
+
"text": "Text",
|
|
27
|
+
"container": "Containers",
|
|
28
|
+
"form": "Forms",
|
|
29
|
+
"action": "Actions",
|
|
30
|
+
"data": "Data"
|
|
31
|
+
},
|
|
32
|
+
"limits": {
|
|
33
|
+
"messages": 200,
|
|
34
|
+
"surfaces": 20,
|
|
35
|
+
"components": 300,
|
|
36
|
+
"depth": 24,
|
|
37
|
+
"idLength": 128,
|
|
38
|
+
"textLength": 4000,
|
|
39
|
+
"labelLength": 120,
|
|
40
|
+
"options": 100,
|
|
41
|
+
"columns": 12,
|
|
42
|
+
"rows": 500,
|
|
43
|
+
"contextKeys": 32,
|
|
44
|
+
"pathLength": 512,
|
|
45
|
+
"dataBytes": 262144,
|
|
46
|
+
"inputBytes": 1048576
|
|
47
|
+
},
|
|
48
|
+
"components": {
|
|
49
|
+
"Stack": {
|
|
50
|
+
"group": "layout",
|
|
51
|
+
"description": "Places its children in a column with the theme's spacing. Use it as the root of most surfaces.",
|
|
52
|
+
"mlola": {
|
|
53
|
+
"class": "ml-stack"
|
|
54
|
+
},
|
|
55
|
+
"props": {
|
|
56
|
+
"children": {
|
|
57
|
+
"kind": "children",
|
|
58
|
+
"required": true,
|
|
59
|
+
"description": "The components inside, top to bottom."
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"Row": {
|
|
64
|
+
"group": "layout",
|
|
65
|
+
"description": "Places its children side by side and wraps them on a narrow screen. Use it for a row of buttons or badges.",
|
|
66
|
+
"mlola": {
|
|
67
|
+
"class": "ml-cluster"
|
|
68
|
+
},
|
|
69
|
+
"props": {
|
|
70
|
+
"children": {
|
|
71
|
+
"kind": "children",
|
|
72
|
+
"required": true,
|
|
73
|
+
"description": "The components inside, start to end."
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"Grid": {
|
|
78
|
+
"group": "layout",
|
|
79
|
+
"description": "Places its children in equal columns that collapse to one column on a phone.",
|
|
80
|
+
"mlola": {
|
|
81
|
+
"class": "ml-grid"
|
|
82
|
+
},
|
|
83
|
+
"props": {
|
|
84
|
+
"children": {
|
|
85
|
+
"kind": "children",
|
|
86
|
+
"required": true,
|
|
87
|
+
"description": "The components inside, in reading order."
|
|
88
|
+
},
|
|
89
|
+
"columns": {
|
|
90
|
+
"kind": "enum",
|
|
91
|
+
"description": "How many columns on a wide screen. Leave it out to fit as many as the width allows.",
|
|
92
|
+
"values": [
|
|
93
|
+
"1",
|
|
94
|
+
"2",
|
|
95
|
+
"3",
|
|
96
|
+
"4",
|
|
97
|
+
"6"
|
|
98
|
+
]
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"Heading": {
|
|
103
|
+
"group": "text",
|
|
104
|
+
"description": "A heading. Levels follow the page outline: never skip a level going deeper.",
|
|
105
|
+
"mlola": {
|
|
106
|
+
"element": "h1-h6"
|
|
107
|
+
},
|
|
108
|
+
"props": {
|
|
109
|
+
"text": {
|
|
110
|
+
"kind": "text",
|
|
111
|
+
"required": true,
|
|
112
|
+
"description": "The heading's words.",
|
|
113
|
+
"maxLength": 120
|
|
114
|
+
},
|
|
115
|
+
"level": {
|
|
116
|
+
"kind": "integer",
|
|
117
|
+
"description": "The outline level, 1 to 6. Inside a chat a surface usually starts at 2.",
|
|
118
|
+
"minimum": 1,
|
|
119
|
+
"maximum": 6,
|
|
120
|
+
"default": 2
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
"Text": {
|
|
125
|
+
"group": "text",
|
|
126
|
+
"description": "A paragraph of plain text.",
|
|
127
|
+
"mlola": {
|
|
128
|
+
"element": "p"
|
|
129
|
+
},
|
|
130
|
+
"props": {
|
|
131
|
+
"text": {
|
|
132
|
+
"kind": "text",
|
|
133
|
+
"required": true,
|
|
134
|
+
"description": "The words. Line breaks are kept; markup is shown as text."
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"Card": {
|
|
139
|
+
"group": "container",
|
|
140
|
+
"description": "Groups related content on a surface of its own.",
|
|
141
|
+
"mlola": {
|
|
142
|
+
"item": "card",
|
|
143
|
+
"export": "Card"
|
|
144
|
+
},
|
|
145
|
+
"props": {
|
|
146
|
+
"children": {
|
|
147
|
+
"kind": "children",
|
|
148
|
+
"required": true,
|
|
149
|
+
"description": "The card's content."
|
|
150
|
+
},
|
|
151
|
+
"variant": {
|
|
152
|
+
"kind": "enum",
|
|
153
|
+
"description": "How the card stands off the page.",
|
|
154
|
+
"values": [
|
|
155
|
+
"default",
|
|
156
|
+
"elevated",
|
|
157
|
+
"glass",
|
|
158
|
+
"specular"
|
|
159
|
+
],
|
|
160
|
+
"default": "default"
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
"Alert": {
|
|
165
|
+
"group": "container",
|
|
166
|
+
"description": "A message about the surface: a confirmation, a warning or an error. Warnings and errors interrupt a screen reader; calmer tones are announced politely.",
|
|
167
|
+
"mlola": {
|
|
168
|
+
"item": "alert",
|
|
169
|
+
"export": "Alert"
|
|
170
|
+
},
|
|
171
|
+
"props": {
|
|
172
|
+
"title": {
|
|
173
|
+
"kind": "text",
|
|
174
|
+
"description": "A short summary, read first.",
|
|
175
|
+
"maxLength": 120
|
|
176
|
+
},
|
|
177
|
+
"text": {
|
|
178
|
+
"kind": "text",
|
|
179
|
+
"required": true,
|
|
180
|
+
"description": "What happened and what to do about it."
|
|
181
|
+
},
|
|
182
|
+
"tone": {
|
|
183
|
+
"kind": "enum",
|
|
184
|
+
"description": "What the message means.",
|
|
185
|
+
"values": [
|
|
186
|
+
"neutral",
|
|
187
|
+
"info",
|
|
188
|
+
"success",
|
|
189
|
+
"warning",
|
|
190
|
+
"danger"
|
|
191
|
+
],
|
|
192
|
+
"default": "neutral"
|
|
193
|
+
},
|
|
194
|
+
"variant": {
|
|
195
|
+
"kind": "enum",
|
|
196
|
+
"description": "A card, or a tinted band across the surface.",
|
|
197
|
+
"values": [
|
|
198
|
+
"card",
|
|
199
|
+
"soft"
|
|
200
|
+
],
|
|
201
|
+
"default": "card"
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
"EmptyState": {
|
|
206
|
+
"group": "container",
|
|
207
|
+
"description": "Says that there is nothing here yet and what to do next.",
|
|
208
|
+
"mlola": {
|
|
209
|
+
"item": "empty-state",
|
|
210
|
+
"export": "EmptyState"
|
|
211
|
+
},
|
|
212
|
+
"props": {
|
|
213
|
+
"title": {
|
|
214
|
+
"kind": "text",
|
|
215
|
+
"required": true,
|
|
216
|
+
"description": "What is empty, in a few words.",
|
|
217
|
+
"maxLength": 120
|
|
218
|
+
},
|
|
219
|
+
"description": {
|
|
220
|
+
"kind": "text",
|
|
221
|
+
"description": "What to do next."
|
|
222
|
+
},
|
|
223
|
+
"children": {
|
|
224
|
+
"kind": "children",
|
|
225
|
+
"description": "Actions, usually one or two Buttons."
|
|
226
|
+
},
|
|
227
|
+
"size": {
|
|
228
|
+
"kind": "enum",
|
|
229
|
+
"description": "inline inside a surface, page when it fills one.",
|
|
230
|
+
"values": [
|
|
231
|
+
"inline",
|
|
232
|
+
"page"
|
|
233
|
+
],
|
|
234
|
+
"default": "inline"
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
},
|
|
238
|
+
"Tabs": {
|
|
239
|
+
"group": "container",
|
|
240
|
+
"description": "Shows one panel at a time, chosen from a row of tabs. Its children are Tab components.",
|
|
241
|
+
"accepts": [
|
|
242
|
+
"Tab"
|
|
243
|
+
],
|
|
244
|
+
"mlola": {
|
|
245
|
+
"item": "tabs",
|
|
246
|
+
"export": "Tabs"
|
|
247
|
+
},
|
|
248
|
+
"props": {
|
|
249
|
+
"label": {
|
|
250
|
+
"kind": "text",
|
|
251
|
+
"required": true,
|
|
252
|
+
"description": "What the tabs choose between, for a screen reader.",
|
|
253
|
+
"maxLength": 120
|
|
254
|
+
},
|
|
255
|
+
"children": {
|
|
256
|
+
"kind": "children",
|
|
257
|
+
"required": true,
|
|
258
|
+
"description": "The Tab components, in order.",
|
|
259
|
+
"minItems": 1
|
|
260
|
+
},
|
|
261
|
+
"variant": {
|
|
262
|
+
"kind": "enum",
|
|
263
|
+
"description": "The look of the tab row.",
|
|
264
|
+
"values": [
|
|
265
|
+
"default",
|
|
266
|
+
"pills",
|
|
267
|
+
"enclosed"
|
|
268
|
+
],
|
|
269
|
+
"default": "default"
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
},
|
|
273
|
+
"Tab": {
|
|
274
|
+
"group": "container",
|
|
275
|
+
"description": "One tab of a Tabs: its name and its panel.",
|
|
276
|
+
"parents": [
|
|
277
|
+
"Tabs"
|
|
278
|
+
],
|
|
279
|
+
"mlola": {
|
|
280
|
+
"item": "tabs",
|
|
281
|
+
"export": "TabsTrigger"
|
|
282
|
+
},
|
|
283
|
+
"props": {
|
|
284
|
+
"label": {
|
|
285
|
+
"kind": "text",
|
|
286
|
+
"required": true,
|
|
287
|
+
"description": "The tab's name.",
|
|
288
|
+
"maxLength": 120
|
|
289
|
+
},
|
|
290
|
+
"children": {
|
|
291
|
+
"kind": "children",
|
|
292
|
+
"required": true,
|
|
293
|
+
"description": "What the panel shows."
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
},
|
|
297
|
+
"Accordion": {
|
|
298
|
+
"group": "container",
|
|
299
|
+
"description": "A list of sections that open and close. Its children are AccordionItem components.",
|
|
300
|
+
"accepts": [
|
|
301
|
+
"AccordionItem"
|
|
302
|
+
],
|
|
303
|
+
"mlola": {
|
|
304
|
+
"item": "accordion",
|
|
305
|
+
"export": "Accordion"
|
|
306
|
+
},
|
|
307
|
+
"props": {
|
|
308
|
+
"children": {
|
|
309
|
+
"kind": "children",
|
|
310
|
+
"required": true,
|
|
311
|
+
"description": "The AccordionItem components, in order.",
|
|
312
|
+
"minItems": 1
|
|
313
|
+
},
|
|
314
|
+
"type": {
|
|
315
|
+
"kind": "enum",
|
|
316
|
+
"description": "single keeps one section open at a time; multiple lets several stay open.",
|
|
317
|
+
"values": [
|
|
318
|
+
"single",
|
|
319
|
+
"multiple"
|
|
320
|
+
],
|
|
321
|
+
"default": "single"
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
},
|
|
325
|
+
"AccordionItem": {
|
|
326
|
+
"group": "container",
|
|
327
|
+
"description": "One section of an Accordion: its title and its content.",
|
|
328
|
+
"parents": [
|
|
329
|
+
"Accordion"
|
|
330
|
+
],
|
|
331
|
+
"mlola": {
|
|
332
|
+
"item": "accordion",
|
|
333
|
+
"export": "AccordionItem"
|
|
334
|
+
},
|
|
335
|
+
"props": {
|
|
336
|
+
"title": {
|
|
337
|
+
"kind": "text",
|
|
338
|
+
"required": true,
|
|
339
|
+
"description": "The section's title, which opens and closes it.",
|
|
340
|
+
"maxLength": 120
|
|
341
|
+
},
|
|
342
|
+
"children": {
|
|
343
|
+
"kind": "children",
|
|
344
|
+
"required": true,
|
|
345
|
+
"description": "The section's content."
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
},
|
|
349
|
+
"Input": {
|
|
350
|
+
"group": "form",
|
|
351
|
+
"description": "A one-line text field with its label.",
|
|
352
|
+
"mlola": {
|
|
353
|
+
"item": "input",
|
|
354
|
+
"export": "Input"
|
|
355
|
+
},
|
|
356
|
+
"props": {
|
|
357
|
+
"label": {
|
|
358
|
+
"kind": "text",
|
|
359
|
+
"required": true,
|
|
360
|
+
"description": "The field's name, shown above it and read by a screen reader.",
|
|
361
|
+
"maxLength": 120
|
|
362
|
+
},
|
|
363
|
+
"value": {
|
|
364
|
+
"kind": "text",
|
|
365
|
+
"description": "Bind it to the data model ({\"path\": \"/form/email\"}) so the value comes back with the action."
|
|
366
|
+
},
|
|
367
|
+
"type": {
|
|
368
|
+
"kind": "enum",
|
|
369
|
+
"description": "The kind of text, which picks the phone keyboard and the browser's checks.",
|
|
370
|
+
"values": [
|
|
371
|
+
"text",
|
|
372
|
+
"email",
|
|
373
|
+
"password",
|
|
374
|
+
"url",
|
|
375
|
+
"tel",
|
|
376
|
+
"search"
|
|
377
|
+
],
|
|
378
|
+
"default": "text"
|
|
379
|
+
},
|
|
380
|
+
"placeholder": {
|
|
381
|
+
"kind": "text",
|
|
382
|
+
"description": "An example of what to type. Never a replacement for the label.",
|
|
383
|
+
"maxLength": 120
|
|
384
|
+
},
|
|
385
|
+
"hint": {
|
|
386
|
+
"kind": "text",
|
|
387
|
+
"description": "Help shown under the field.",
|
|
388
|
+
"maxLength": 120
|
|
389
|
+
},
|
|
390
|
+
"required": {
|
|
391
|
+
"kind": "boolean",
|
|
392
|
+
"description": "The form cannot be sent without it."
|
|
393
|
+
},
|
|
394
|
+
"disabled": {
|
|
395
|
+
"kind": "boolean",
|
|
396
|
+
"description": "Shows the control but does not let it change."
|
|
397
|
+
},
|
|
398
|
+
"size": {
|
|
399
|
+
"kind": "enum",
|
|
400
|
+
"description": "The control size from the density scale.",
|
|
401
|
+
"values": [
|
|
402
|
+
"sm",
|
|
403
|
+
"md",
|
|
404
|
+
"lg"
|
|
405
|
+
],
|
|
406
|
+
"default": "md"
|
|
407
|
+
},
|
|
408
|
+
"variant": {
|
|
409
|
+
"kind": "enum",
|
|
410
|
+
"description": "How the field sits on its surface.",
|
|
411
|
+
"values": [
|
|
412
|
+
"default",
|
|
413
|
+
"filled",
|
|
414
|
+
"subtle"
|
|
415
|
+
],
|
|
416
|
+
"default": "default"
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
},
|
|
420
|
+
"Textarea": {
|
|
421
|
+
"group": "form",
|
|
422
|
+
"description": "A text field for several lines, with its label.",
|
|
423
|
+
"mlola": {
|
|
424
|
+
"item": "textarea",
|
|
425
|
+
"export": "Textarea"
|
|
426
|
+
},
|
|
427
|
+
"props": {
|
|
428
|
+
"label": {
|
|
429
|
+
"kind": "text",
|
|
430
|
+
"required": true,
|
|
431
|
+
"description": "The field's name.",
|
|
432
|
+
"maxLength": 120
|
|
433
|
+
},
|
|
434
|
+
"value": {
|
|
435
|
+
"kind": "text",
|
|
436
|
+
"description": "Bind it to the data model so the value comes back with the action."
|
|
437
|
+
},
|
|
438
|
+
"placeholder": {
|
|
439
|
+
"kind": "text",
|
|
440
|
+
"description": "An example of what to type. Never the only label.",
|
|
441
|
+
"maxLength": 120
|
|
442
|
+
},
|
|
443
|
+
"hint": {
|
|
444
|
+
"kind": "text",
|
|
445
|
+
"description": "A short help line under the field.",
|
|
446
|
+
"maxLength": 120
|
|
447
|
+
},
|
|
448
|
+
"rows": {
|
|
449
|
+
"kind": "integer",
|
|
450
|
+
"description": "How many lines show before it scrolls.",
|
|
451
|
+
"minimum": 2,
|
|
452
|
+
"maximum": 12,
|
|
453
|
+
"default": 4
|
|
454
|
+
},
|
|
455
|
+
"required": {
|
|
456
|
+
"kind": "boolean",
|
|
457
|
+
"description": "The person must fill it in before the action is sent; a screen reader says so."
|
|
458
|
+
},
|
|
459
|
+
"disabled": {
|
|
460
|
+
"kind": "boolean",
|
|
461
|
+
"description": "Shows the control but does not let it change."
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
},
|
|
465
|
+
"Select": {
|
|
466
|
+
"group": "form",
|
|
467
|
+
"description": "Picks one value from a list that opens on demand. Use RadioGroup when there are only two to five options and room to show them.",
|
|
468
|
+
"mlola": {
|
|
469
|
+
"item": "select",
|
|
470
|
+
"export": "Select"
|
|
471
|
+
},
|
|
472
|
+
"props": {
|
|
473
|
+
"label": {
|
|
474
|
+
"kind": "text",
|
|
475
|
+
"required": true,
|
|
476
|
+
"description": "The field's name.",
|
|
477
|
+
"maxLength": 120
|
|
478
|
+
},
|
|
479
|
+
"options": {
|
|
480
|
+
"kind": "options",
|
|
481
|
+
"required": true,
|
|
482
|
+
"description": "The choices, each {\"label\", \"value\"}.",
|
|
483
|
+
"minItems": 1
|
|
484
|
+
},
|
|
485
|
+
"value": {
|
|
486
|
+
"kind": "text",
|
|
487
|
+
"description": "The chosen option's value. Bind it to the data model."
|
|
488
|
+
},
|
|
489
|
+
"placeholder": {
|
|
490
|
+
"kind": "text",
|
|
491
|
+
"description": "Shown while nothing is chosen.",
|
|
492
|
+
"maxLength": 120
|
|
493
|
+
},
|
|
494
|
+
"required": {
|
|
495
|
+
"kind": "boolean",
|
|
496
|
+
"description": "The person must fill it in before the action is sent; a screen reader says so."
|
|
497
|
+
},
|
|
498
|
+
"disabled": {
|
|
499
|
+
"kind": "boolean",
|
|
500
|
+
"description": "Shows the control but does not let it change."
|
|
501
|
+
},
|
|
502
|
+
"size": {
|
|
503
|
+
"kind": "enum",
|
|
504
|
+
"description": "The control size from the density scale.",
|
|
505
|
+
"values": [
|
|
506
|
+
"sm",
|
|
507
|
+
"md",
|
|
508
|
+
"lg"
|
|
509
|
+
],
|
|
510
|
+
"default": "md"
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
},
|
|
514
|
+
"RadioGroup": {
|
|
515
|
+
"group": "form",
|
|
516
|
+
"description": "Picks one value from options that are all visible.",
|
|
517
|
+
"mlola": {
|
|
518
|
+
"item": "radio-group",
|
|
519
|
+
"export": "RadioGroup"
|
|
520
|
+
},
|
|
521
|
+
"props": {
|
|
522
|
+
"label": {
|
|
523
|
+
"kind": "text",
|
|
524
|
+
"required": true,
|
|
525
|
+
"description": "The question the options answer.",
|
|
526
|
+
"maxLength": 120
|
|
527
|
+
},
|
|
528
|
+
"options": {
|
|
529
|
+
"kind": "options",
|
|
530
|
+
"required": true,
|
|
531
|
+
"description": "The choices, each {\"label\", \"value\"}.",
|
|
532
|
+
"minItems": 2
|
|
533
|
+
},
|
|
534
|
+
"value": {
|
|
535
|
+
"kind": "text",
|
|
536
|
+
"description": "The chosen option's value. Bind it to the data model."
|
|
537
|
+
},
|
|
538
|
+
"orientation": {
|
|
539
|
+
"kind": "enum",
|
|
540
|
+
"description": "Options stacked or in a row.",
|
|
541
|
+
"values": [
|
|
542
|
+
"horizontal",
|
|
543
|
+
"vertical"
|
|
544
|
+
],
|
|
545
|
+
"default": "vertical"
|
|
546
|
+
},
|
|
547
|
+
"required": {
|
|
548
|
+
"kind": "boolean",
|
|
549
|
+
"description": "The person must fill it in before the action is sent; a screen reader says so."
|
|
550
|
+
},
|
|
551
|
+
"disabled": {
|
|
552
|
+
"kind": "boolean",
|
|
553
|
+
"description": "Shows the control but does not let it change."
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
},
|
|
557
|
+
"Checkbox": {
|
|
558
|
+
"group": "form",
|
|
559
|
+
"description": "A yes or no choice with its label.",
|
|
560
|
+
"mlola": {
|
|
561
|
+
"item": "checkbox",
|
|
562
|
+
"export": "Checkbox"
|
|
563
|
+
},
|
|
564
|
+
"props": {
|
|
565
|
+
"label": {
|
|
566
|
+
"kind": "text",
|
|
567
|
+
"required": true,
|
|
568
|
+
"description": "What checking it means.",
|
|
569
|
+
"maxLength": 120
|
|
570
|
+
},
|
|
571
|
+
"checked": {
|
|
572
|
+
"kind": "boolean",
|
|
573
|
+
"description": "Bind it to the data model so the choice comes back with the action."
|
|
574
|
+
},
|
|
575
|
+
"description": {
|
|
576
|
+
"kind": "text",
|
|
577
|
+
"description": "More about the choice, under the label.",
|
|
578
|
+
"maxLength": 120
|
|
579
|
+
},
|
|
580
|
+
"required": {
|
|
581
|
+
"kind": "boolean",
|
|
582
|
+
"description": "The person must fill it in before the action is sent; a screen reader says so."
|
|
583
|
+
},
|
|
584
|
+
"disabled": {
|
|
585
|
+
"kind": "boolean",
|
|
586
|
+
"description": "Shows the control but does not let it change."
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
},
|
|
590
|
+
"Switch": {
|
|
591
|
+
"group": "form",
|
|
592
|
+
"description": "Turns a setting on or off right away.",
|
|
593
|
+
"mlola": {
|
|
594
|
+
"item": "toggle",
|
|
595
|
+
"export": "Switch"
|
|
596
|
+
},
|
|
597
|
+
"props": {
|
|
598
|
+
"label": {
|
|
599
|
+
"kind": "text",
|
|
600
|
+
"required": true,
|
|
601
|
+
"description": "The setting it turns on.",
|
|
602
|
+
"maxLength": 120
|
|
603
|
+
},
|
|
604
|
+
"checked": {
|
|
605
|
+
"kind": "boolean",
|
|
606
|
+
"description": "Bind it to the data model."
|
|
607
|
+
},
|
|
608
|
+
"disabled": {
|
|
609
|
+
"kind": "boolean",
|
|
610
|
+
"description": "Shows the control but does not let it change."
|
|
611
|
+
},
|
|
612
|
+
"size": {
|
|
613
|
+
"kind": "enum",
|
|
614
|
+
"description": "The control size from the density scale.",
|
|
615
|
+
"values": [
|
|
616
|
+
"sm",
|
|
617
|
+
"md",
|
|
618
|
+
"lg"
|
|
619
|
+
],
|
|
620
|
+
"default": "md"
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
},
|
|
624
|
+
"Slider": {
|
|
625
|
+
"group": "form",
|
|
626
|
+
"description": "Picks a number in a range by dragging or with the arrow keys.",
|
|
627
|
+
"mlola": {
|
|
628
|
+
"item": "slider",
|
|
629
|
+
"export": "Slider"
|
|
630
|
+
},
|
|
631
|
+
"props": {
|
|
632
|
+
"label": {
|
|
633
|
+
"kind": "text",
|
|
634
|
+
"required": true,
|
|
635
|
+
"description": "What the number is.",
|
|
636
|
+
"maxLength": 120
|
|
637
|
+
},
|
|
638
|
+
"value": {
|
|
639
|
+
"kind": "number",
|
|
640
|
+
"description": "Bind it to the data model."
|
|
641
|
+
},
|
|
642
|
+
"min": {
|
|
643
|
+
"kind": "number",
|
|
644
|
+
"description": "The lowest value.",
|
|
645
|
+
"literal": true,
|
|
646
|
+
"default": 0
|
|
647
|
+
},
|
|
648
|
+
"max": {
|
|
649
|
+
"kind": "number",
|
|
650
|
+
"description": "The highest value.",
|
|
651
|
+
"literal": true,
|
|
652
|
+
"default": 100
|
|
653
|
+
},
|
|
654
|
+
"step": {
|
|
655
|
+
"kind": "number",
|
|
656
|
+
"description": "How far one arrow press moves it.",
|
|
657
|
+
"literal": true,
|
|
658
|
+
"default": 1
|
|
659
|
+
},
|
|
660
|
+
"disabled": {
|
|
661
|
+
"kind": "boolean",
|
|
662
|
+
"description": "Shows the control but does not let it change."
|
|
663
|
+
},
|
|
664
|
+
"size": {
|
|
665
|
+
"kind": "enum",
|
|
666
|
+
"description": "The control size from the density scale.",
|
|
667
|
+
"values": [
|
|
668
|
+
"sm",
|
|
669
|
+
"md"
|
|
670
|
+
],
|
|
671
|
+
"default": "md"
|
|
672
|
+
}
|
|
673
|
+
}
|
|
674
|
+
},
|
|
675
|
+
"DatePicker": {
|
|
676
|
+
"group": "form",
|
|
677
|
+
"description": "A date field that opens a calendar and picks one day. The reader sees the date in their own format; the value is an ISO date.",
|
|
678
|
+
"mlola": {
|
|
679
|
+
"item": "date-picker",
|
|
680
|
+
"export": "DatePicker"
|
|
681
|
+
},
|
|
682
|
+
"props": {
|
|
683
|
+
"label": {
|
|
684
|
+
"kind": "text",
|
|
685
|
+
"required": true,
|
|
686
|
+
"description": "The field's name.",
|
|
687
|
+
"maxLength": 120
|
|
688
|
+
},
|
|
689
|
+
"value": {
|
|
690
|
+
"kind": "date",
|
|
691
|
+
"description": "The chosen day as an ISO date, like \"2026-10-12\". Bind it to the data model so it comes back with the action."
|
|
692
|
+
},
|
|
693
|
+
"min": {
|
|
694
|
+
"kind": "date",
|
|
695
|
+
"description": "The earliest day that can be picked.",
|
|
696
|
+
"literal": true
|
|
697
|
+
},
|
|
698
|
+
"max": {
|
|
699
|
+
"kind": "date",
|
|
700
|
+
"description": "The latest day that can be picked.",
|
|
701
|
+
"literal": true
|
|
702
|
+
},
|
|
703
|
+
"hint": {
|
|
704
|
+
"kind": "text",
|
|
705
|
+
"description": "Help shown under the field.",
|
|
706
|
+
"maxLength": 120
|
|
707
|
+
},
|
|
708
|
+
"required": {
|
|
709
|
+
"kind": "boolean",
|
|
710
|
+
"description": "The form cannot be sent without it."
|
|
711
|
+
},
|
|
712
|
+
"disabled": {
|
|
713
|
+
"kind": "boolean",
|
|
714
|
+
"description": "Shows the control but does not let it change."
|
|
715
|
+
}
|
|
716
|
+
}
|
|
717
|
+
},
|
|
718
|
+
"Button": {
|
|
719
|
+
"group": "action",
|
|
720
|
+
"description": "Sends an action back to the agent. Its text says what happens (\"Create workspace\", not \"Submit\").",
|
|
721
|
+
"mlola": {
|
|
722
|
+
"item": "button",
|
|
723
|
+
"export": "Button"
|
|
724
|
+
},
|
|
725
|
+
"props": {
|
|
726
|
+
"text": {
|
|
727
|
+
"kind": "text",
|
|
728
|
+
"required": true,
|
|
729
|
+
"description": "What pressing it does.",
|
|
730
|
+
"maxLength": 120
|
|
731
|
+
},
|
|
732
|
+
"action": {
|
|
733
|
+
"kind": "action",
|
|
734
|
+
"required": true,
|
|
735
|
+
"description": "The event sent when it is pressed."
|
|
736
|
+
},
|
|
737
|
+
"variant": {
|
|
738
|
+
"kind": "enum",
|
|
739
|
+
"description": "primary for the main action of a surface, one at most.",
|
|
740
|
+
"values": [
|
|
741
|
+
"primary",
|
|
742
|
+
"secondary",
|
|
743
|
+
"subtle",
|
|
744
|
+
"danger",
|
|
745
|
+
"outline",
|
|
746
|
+
"link"
|
|
747
|
+
],
|
|
748
|
+
"default": "primary"
|
|
749
|
+
},
|
|
750
|
+
"size": {
|
|
751
|
+
"kind": "enum",
|
|
752
|
+
"description": "Icon-only buttons are not in the catalog: every button has words.",
|
|
753
|
+
"values": [
|
|
754
|
+
"sm",
|
|
755
|
+
"md",
|
|
756
|
+
"lg"
|
|
757
|
+
],
|
|
758
|
+
"excluded": [
|
|
759
|
+
"icon"
|
|
760
|
+
],
|
|
761
|
+
"default": "md"
|
|
762
|
+
},
|
|
763
|
+
"width": {
|
|
764
|
+
"kind": "enum",
|
|
765
|
+
"description": "auto fits the words, full fills the container.",
|
|
766
|
+
"values": [
|
|
767
|
+
"auto",
|
|
768
|
+
"full"
|
|
769
|
+
],
|
|
770
|
+
"default": "auto"
|
|
771
|
+
},
|
|
772
|
+
"disabled": {
|
|
773
|
+
"kind": "boolean",
|
|
774
|
+
"description": "Shows the control but does not let it change."
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
},
|
|
778
|
+
"Badge": {
|
|
779
|
+
"group": "data",
|
|
780
|
+
"description": "A short label for a status or a count.",
|
|
781
|
+
"mlola": {
|
|
782
|
+
"item": "badge",
|
|
783
|
+
"export": "Badge"
|
|
784
|
+
},
|
|
785
|
+
"props": {
|
|
786
|
+
"text": {
|
|
787
|
+
"kind": "text",
|
|
788
|
+
"required": true,
|
|
789
|
+
"description": "The badge's words, a few at most.",
|
|
790
|
+
"maxLength": 120
|
|
791
|
+
},
|
|
792
|
+
"tone": {
|
|
793
|
+
"kind": "enum",
|
|
794
|
+
"description": "What the status means.",
|
|
795
|
+
"values": [
|
|
796
|
+
"neutral",
|
|
797
|
+
"primary",
|
|
798
|
+
"info",
|
|
799
|
+
"success",
|
|
800
|
+
"warning",
|
|
801
|
+
"danger"
|
|
802
|
+
],
|
|
803
|
+
"default": "neutral"
|
|
804
|
+
},
|
|
805
|
+
"variant": {
|
|
806
|
+
"kind": "enum",
|
|
807
|
+
"description": "How strongly the badge stands out.",
|
|
808
|
+
"values": [
|
|
809
|
+
"soft",
|
|
810
|
+
"solid",
|
|
811
|
+
"outline"
|
|
812
|
+
],
|
|
813
|
+
"default": "soft"
|
|
814
|
+
},
|
|
815
|
+
"size": {
|
|
816
|
+
"kind": "enum",
|
|
817
|
+
"description": "The control size from the density scale.",
|
|
818
|
+
"values": [
|
|
819
|
+
"sm",
|
|
820
|
+
"md",
|
|
821
|
+
"lg"
|
|
822
|
+
],
|
|
823
|
+
"default": "md"
|
|
824
|
+
}
|
|
825
|
+
}
|
|
826
|
+
},
|
|
827
|
+
"Progress": {
|
|
828
|
+
"group": "data",
|
|
829
|
+
"description": "Shows how far along something is.",
|
|
830
|
+
"mlola": {
|
|
831
|
+
"item": "progress",
|
|
832
|
+
"export": "Progress"
|
|
833
|
+
},
|
|
834
|
+
"props": {
|
|
835
|
+
"label": {
|
|
836
|
+
"kind": "text",
|
|
837
|
+
"required": true,
|
|
838
|
+
"description": "What is in progress, for a screen reader.",
|
|
839
|
+
"maxLength": 120
|
|
840
|
+
},
|
|
841
|
+
"value": {
|
|
842
|
+
"kind": "number",
|
|
843
|
+
"description": "How far along, from 0 to max."
|
|
844
|
+
},
|
|
845
|
+
"max": {
|
|
846
|
+
"kind": "number",
|
|
847
|
+
"description": "The value that means complete.",
|
|
848
|
+
"literal": true,
|
|
849
|
+
"default": 100
|
|
850
|
+
},
|
|
851
|
+
"showLabel": {
|
|
852
|
+
"kind": "boolean",
|
|
853
|
+
"description": "Shows the percentage beside the bar."
|
|
854
|
+
},
|
|
855
|
+
"tone": {
|
|
856
|
+
"kind": "enum",
|
|
857
|
+
"description": "What the progress means.",
|
|
858
|
+
"values": [
|
|
859
|
+
"primary",
|
|
860
|
+
"info",
|
|
861
|
+
"success",
|
|
862
|
+
"warning",
|
|
863
|
+
"danger"
|
|
864
|
+
],
|
|
865
|
+
"default": "primary"
|
|
866
|
+
},
|
|
867
|
+
"size": {
|
|
868
|
+
"kind": "enum",
|
|
869
|
+
"description": "The control size from the density scale.",
|
|
870
|
+
"values": [
|
|
871
|
+
"sm",
|
|
872
|
+
"md",
|
|
873
|
+
"lg"
|
|
874
|
+
],
|
|
875
|
+
"default": "md"
|
|
876
|
+
}
|
|
877
|
+
}
|
|
878
|
+
},
|
|
879
|
+
"Avatar": {
|
|
880
|
+
"group": "data",
|
|
881
|
+
"description": "A person or a team shown by their initials.",
|
|
882
|
+
"mlola": {
|
|
883
|
+
"item": "avatar",
|
|
884
|
+
"export": "Avatar"
|
|
885
|
+
},
|
|
886
|
+
"props": {
|
|
887
|
+
"name": {
|
|
888
|
+
"kind": "text",
|
|
889
|
+
"required": true,
|
|
890
|
+
"description": "The full name: the initials come from it and a screen reader reads it.",
|
|
891
|
+
"maxLength": 120
|
|
892
|
+
},
|
|
893
|
+
"size": {
|
|
894
|
+
"kind": "enum",
|
|
895
|
+
"description": "The avatar's size.",
|
|
896
|
+
"values": [
|
|
897
|
+
"xs",
|
|
898
|
+
"sm",
|
|
899
|
+
"md",
|
|
900
|
+
"lg",
|
|
901
|
+
"xl"
|
|
902
|
+
],
|
|
903
|
+
"default": "md"
|
|
904
|
+
},
|
|
905
|
+
"status": {
|
|
906
|
+
"kind": "enum",
|
|
907
|
+
"description": "A presence dot, announced with the name.",
|
|
908
|
+
"values": [
|
|
909
|
+
"online",
|
|
910
|
+
"offline",
|
|
911
|
+
"away",
|
|
912
|
+
"busy"
|
|
913
|
+
]
|
|
914
|
+
}
|
|
915
|
+
}
|
|
916
|
+
},
|
|
917
|
+
"Table": {
|
|
918
|
+
"group": "data",
|
|
919
|
+
"description": "Rows of data under named columns. Cells hold text and numbers.",
|
|
920
|
+
"mlola": {
|
|
921
|
+
"item": "table",
|
|
922
|
+
"export": "Table"
|
|
923
|
+
},
|
|
924
|
+
"props": {
|
|
925
|
+
"caption": {
|
|
926
|
+
"kind": "text",
|
|
927
|
+
"required": true,
|
|
928
|
+
"description": "What the table shows, read first by a screen reader.",
|
|
929
|
+
"maxLength": 120
|
|
930
|
+
},
|
|
931
|
+
"columns": {
|
|
932
|
+
"kind": "columns",
|
|
933
|
+
"required": true,
|
|
934
|
+
"description": "Each {\"key\", \"label\", \"align\"?}: key names the row field the column shows.",
|
|
935
|
+
"minItems": 1,
|
|
936
|
+
"align": {
|
|
937
|
+
"values": [
|
|
938
|
+
"left",
|
|
939
|
+
"center",
|
|
940
|
+
"right"
|
|
941
|
+
]
|
|
942
|
+
}
|
|
943
|
+
},
|
|
944
|
+
"rows": {
|
|
945
|
+
"kind": "rows",
|
|
946
|
+
"required": true,
|
|
947
|
+
"description": "An array of objects keyed by column key, or a path to one in the data model."
|
|
948
|
+
},
|
|
949
|
+
"size": {
|
|
950
|
+
"kind": "enum",
|
|
951
|
+
"description": "Row density.",
|
|
952
|
+
"values": [
|
|
953
|
+
"sm",
|
|
954
|
+
"md"
|
|
955
|
+
],
|
|
956
|
+
"default": "md"
|
|
957
|
+
}
|
|
958
|
+
}
|
|
959
|
+
}
|
|
960
|
+
},
|
|
961
|
+
"aliases": {
|
|
962
|
+
"Column": "Stack",
|
|
963
|
+
"List": "Stack",
|
|
964
|
+
"TextField": "Input",
|
|
965
|
+
"CheckBox": "Checkbox",
|
|
966
|
+
"ChoicePicker": "Select",
|
|
967
|
+
"Toggle": "Switch",
|
|
968
|
+
"Label": "Text",
|
|
969
|
+
"Paragraph": "Text",
|
|
970
|
+
"Title": "Heading",
|
|
971
|
+
"Callout": "Alert",
|
|
972
|
+
"Banner": "Alert",
|
|
973
|
+
"Chip": "Badge",
|
|
974
|
+
"Tag": "Badge",
|
|
975
|
+
"ProgressBar": "Progress",
|
|
976
|
+
"DataTable": "Table",
|
|
977
|
+
"DataGrid": "Table",
|
|
978
|
+
"DateTimeInput": "DatePicker",
|
|
979
|
+
"DateInput": "DatePicker",
|
|
980
|
+
"Calendar": "DatePicker"
|
|
981
|
+
},
|
|
982
|
+
"borrowed": {
|
|
983
|
+
"components": {
|
|
984
|
+
"Image": "Say what matters in Text, or leave the image out.",
|
|
985
|
+
"Icon": "Every control has words: put the meaning in the text, or in a Badge.",
|
|
986
|
+
"Video": "Describe it in Text, or leave it out.",
|
|
987
|
+
"AudioPlayer": "Describe it in Text, or leave it out.",
|
|
988
|
+
"Modal": "A surface shows inline, with no dialog. Put the content on the surface, or in a Tab or an AccordionItem to keep it out of the way.",
|
|
989
|
+
"Divider": "Spacing comes from Stack, and a Card or a Heading separates groups. Leave the divider out."
|
|
990
|
+
},
|
|
991
|
+
"props": {
|
|
992
|
+
"weight": "Children share space by the theme's layout. For equal columns use a Grid.",
|
|
993
|
+
"justify": "A Row or a Stack places its children by the theme's layout. For equal columns use a Grid.",
|
|
994
|
+
"align": "A Row or a Stack places its children by the theme's layout. For equal columns use a Grid.",
|
|
995
|
+
"Stack.direction": "A Stack is a column. For side by side use a Row.",
|
|
996
|
+
"Text.variant": "Text is one style of paragraph. For a heading use a Heading with \"level\".",
|
|
997
|
+
"Button.child": "A Button holds its words in \"text\", not in a child component.",
|
|
998
|
+
"Tabs.tabs": "A Tabs' \"children\" are Tab components, each with a \"label\" and \"children\".",
|
|
999
|
+
"Checkbox.value": "A Checkbox's state is \"checked\": true, false or {\"path\": \"/…\"}.",
|
|
1000
|
+
"Switch.value": "A Switch's state is \"checked\": true, false or {\"path\": \"/…\"}.",
|
|
1001
|
+
"Input.validationRegexp": "Client-side checks are not in the Mlola catalog yet. Mark the field \"required\", and check the value when the action arrives.",
|
|
1002
|
+
"Select.variant": "A Select picks one value. For several choices, use a Checkbox for each.",
|
|
1003
|
+
"Select.displayStyle": "A Select always opens a list. For options that are all visible use a RadioGroup.",
|
|
1004
|
+
"Select.filterable": "A Select lists its options as they are. Keep to the ones that matter, at most 100.",
|
|
1005
|
+
"Input.variant=longText": "For several lines use a Textarea.",
|
|
1006
|
+
"Input.variant=obscured": "For a password use \"type\": \"password\".",
|
|
1007
|
+
"Input.variant=number": "Numbers are not a field type yet. Use a Slider for a number in a range, or an Input with a hint.",
|
|
1008
|
+
"Input.variant=shortText": "An Input is one line already, so leave \"variant\" out.",
|
|
1009
|
+
"Button.variant=default": "For a button beside the main one use \"secondary\".",
|
|
1010
|
+
"Button.variant=borderless": "For a quiet button use \"subtle\" or \"link\".",
|
|
1011
|
+
"DatePicker.enableDate": "A DatePicker always picks a day, so leave \"enableDate\" out.",
|
|
1012
|
+
"DatePicker.enableTime": "Times are not in the Mlola catalog yet: a DatePicker picks a day. Ask for the time in an Input with a hint."
|
|
1013
|
+
}
|
|
1014
|
+
},
|
|
1015
|
+
"examples": [
|
|
1016
|
+
{
|
|
1017
|
+
"name": "workspace-signup",
|
|
1018
|
+
"title": "A sign-up form",
|
|
1019
|
+
"description": "A form whose values are bound to the data model and come back with the button's action.",
|
|
1020
|
+
"messages": [
|
|
1021
|
+
{
|
|
1022
|
+
"version": "v0.9.1",
|
|
1023
|
+
"createSurface": {
|
|
1024
|
+
"surfaceId": "signup",
|
|
1025
|
+
"catalogId": "https://ui.mlola.com/a2ui/catalog/v1",
|
|
1026
|
+
"theme": {
|
|
1027
|
+
"name": "graphite",
|
|
1028
|
+
"mode": "system"
|
|
1029
|
+
}
|
|
1030
|
+
}
|
|
1031
|
+
},
|
|
1032
|
+
{
|
|
1033
|
+
"version": "v0.9.1",
|
|
1034
|
+
"updateComponents": {
|
|
1035
|
+
"surfaceId": "signup",
|
|
1036
|
+
"components": [
|
|
1037
|
+
{
|
|
1038
|
+
"id": "root",
|
|
1039
|
+
"component": "Card",
|
|
1040
|
+
"children": [
|
|
1041
|
+
"title",
|
|
1042
|
+
"form"
|
|
1043
|
+
]
|
|
1044
|
+
},
|
|
1045
|
+
{
|
|
1046
|
+
"id": "title",
|
|
1047
|
+
"component": "Heading",
|
|
1048
|
+
"level": 2,
|
|
1049
|
+
"text": "Create your workspace"
|
|
1050
|
+
},
|
|
1051
|
+
{
|
|
1052
|
+
"id": "form",
|
|
1053
|
+
"component": "Stack",
|
|
1054
|
+
"children": [
|
|
1055
|
+
"name",
|
|
1056
|
+
"email",
|
|
1057
|
+
"plan",
|
|
1058
|
+
"actions"
|
|
1059
|
+
]
|
|
1060
|
+
},
|
|
1061
|
+
{
|
|
1062
|
+
"id": "name",
|
|
1063
|
+
"component": "Input",
|
|
1064
|
+
"label": "Workspace name",
|
|
1065
|
+
"value": {
|
|
1066
|
+
"path": "/form/name"
|
|
1067
|
+
},
|
|
1068
|
+
"required": true
|
|
1069
|
+
},
|
|
1070
|
+
{
|
|
1071
|
+
"id": "email",
|
|
1072
|
+
"component": "Input",
|
|
1073
|
+
"type": "email",
|
|
1074
|
+
"label": "Work email",
|
|
1075
|
+
"value": {
|
|
1076
|
+
"path": "/form/email"
|
|
1077
|
+
},
|
|
1078
|
+
"required": true
|
|
1079
|
+
},
|
|
1080
|
+
{
|
|
1081
|
+
"id": "plan",
|
|
1082
|
+
"component": "RadioGroup",
|
|
1083
|
+
"label": "Plan",
|
|
1084
|
+
"options": [
|
|
1085
|
+
{
|
|
1086
|
+
"label": "Free",
|
|
1087
|
+
"value": "free"
|
|
1088
|
+
},
|
|
1089
|
+
{
|
|
1090
|
+
"label": "Team",
|
|
1091
|
+
"value": "team"
|
|
1092
|
+
}
|
|
1093
|
+
],
|
|
1094
|
+
"value": {
|
|
1095
|
+
"path": "/form/plan"
|
|
1096
|
+
}
|
|
1097
|
+
},
|
|
1098
|
+
{
|
|
1099
|
+
"id": "actions",
|
|
1100
|
+
"component": "Row",
|
|
1101
|
+
"children": [
|
|
1102
|
+
"submit"
|
|
1103
|
+
]
|
|
1104
|
+
},
|
|
1105
|
+
{
|
|
1106
|
+
"id": "submit",
|
|
1107
|
+
"component": "Button",
|
|
1108
|
+
"variant": "primary",
|
|
1109
|
+
"text": "Create workspace",
|
|
1110
|
+
"action": {
|
|
1111
|
+
"event": {
|
|
1112
|
+
"name": "create_workspace",
|
|
1113
|
+
"context": {
|
|
1114
|
+
"form": {
|
|
1115
|
+
"path": "/form"
|
|
1116
|
+
}
|
|
1117
|
+
}
|
|
1118
|
+
}
|
|
1119
|
+
}
|
|
1120
|
+
}
|
|
1121
|
+
]
|
|
1122
|
+
}
|
|
1123
|
+
},
|
|
1124
|
+
{
|
|
1125
|
+
"version": "v0.9.1",
|
|
1126
|
+
"updateDataModel": {
|
|
1127
|
+
"surfaceId": "signup",
|
|
1128
|
+
"path": "/form",
|
|
1129
|
+
"value": {
|
|
1130
|
+
"name": "",
|
|
1131
|
+
"email": "",
|
|
1132
|
+
"plan": "free"
|
|
1133
|
+
}
|
|
1134
|
+
}
|
|
1135
|
+
}
|
|
1136
|
+
]
|
|
1137
|
+
},
|
|
1138
|
+
{
|
|
1139
|
+
"name": "order-status",
|
|
1140
|
+
"title": "A status summary with a table",
|
|
1141
|
+
"description": "Read-only data: badges, a progress bar and a table whose rows come from the data model.",
|
|
1142
|
+
"messages": [
|
|
1143
|
+
{
|
|
1144
|
+
"version": "v0.9.1",
|
|
1145
|
+
"createSurface": {
|
|
1146
|
+
"surfaceId": "orders",
|
|
1147
|
+
"catalogId": "https://ui.mlola.com/a2ui/catalog/v1"
|
|
1148
|
+
}
|
|
1149
|
+
},
|
|
1150
|
+
{
|
|
1151
|
+
"version": "v0.9.1",
|
|
1152
|
+
"updateComponents": {
|
|
1153
|
+
"surfaceId": "orders",
|
|
1154
|
+
"components": [
|
|
1155
|
+
{
|
|
1156
|
+
"id": "root",
|
|
1157
|
+
"component": "Stack",
|
|
1158
|
+
"children": [
|
|
1159
|
+
"heading",
|
|
1160
|
+
"status",
|
|
1161
|
+
"progress",
|
|
1162
|
+
"table"
|
|
1163
|
+
]
|
|
1164
|
+
},
|
|
1165
|
+
{
|
|
1166
|
+
"id": "heading",
|
|
1167
|
+
"component": "Heading",
|
|
1168
|
+
"level": 2,
|
|
1169
|
+
"text": "This week's orders"
|
|
1170
|
+
},
|
|
1171
|
+
{
|
|
1172
|
+
"id": "status",
|
|
1173
|
+
"component": "Row",
|
|
1174
|
+
"children": [
|
|
1175
|
+
"shipped",
|
|
1176
|
+
"waiting"
|
|
1177
|
+
]
|
|
1178
|
+
},
|
|
1179
|
+
{
|
|
1180
|
+
"id": "shipped",
|
|
1181
|
+
"component": "Badge",
|
|
1182
|
+
"tone": "success",
|
|
1183
|
+
"text": "42 shipped"
|
|
1184
|
+
},
|
|
1185
|
+
{
|
|
1186
|
+
"id": "waiting",
|
|
1187
|
+
"component": "Badge",
|
|
1188
|
+
"tone": "warning",
|
|
1189
|
+
"text": "3 waiting"
|
|
1190
|
+
},
|
|
1191
|
+
{
|
|
1192
|
+
"id": "progress",
|
|
1193
|
+
"component": "Progress",
|
|
1194
|
+
"label": "Orders shipped",
|
|
1195
|
+
"value": 42,
|
|
1196
|
+
"max": 45,
|
|
1197
|
+
"showLabel": true
|
|
1198
|
+
},
|
|
1199
|
+
{
|
|
1200
|
+
"id": "table",
|
|
1201
|
+
"component": "Table",
|
|
1202
|
+
"caption": "Orders waiting to ship",
|
|
1203
|
+
"columns": [
|
|
1204
|
+
{
|
|
1205
|
+
"key": "order",
|
|
1206
|
+
"label": "Order"
|
|
1207
|
+
},
|
|
1208
|
+
{
|
|
1209
|
+
"key": "city",
|
|
1210
|
+
"label": "City"
|
|
1211
|
+
},
|
|
1212
|
+
{
|
|
1213
|
+
"key": "items",
|
|
1214
|
+
"label": "Items",
|
|
1215
|
+
"align": "right"
|
|
1216
|
+
}
|
|
1217
|
+
],
|
|
1218
|
+
"rows": {
|
|
1219
|
+
"path": "/waiting"
|
|
1220
|
+
}
|
|
1221
|
+
}
|
|
1222
|
+
]
|
|
1223
|
+
}
|
|
1224
|
+
},
|
|
1225
|
+
{
|
|
1226
|
+
"version": "v0.9.1",
|
|
1227
|
+
"updateDataModel": {
|
|
1228
|
+
"surfaceId": "orders",
|
|
1229
|
+
"path": "/waiting",
|
|
1230
|
+
"value": [
|
|
1231
|
+
{
|
|
1232
|
+
"order": "#1041",
|
|
1233
|
+
"city": "Surabaya",
|
|
1234
|
+
"items": 2
|
|
1235
|
+
},
|
|
1236
|
+
{
|
|
1237
|
+
"order": "#1042",
|
|
1238
|
+
"city": "Bandung",
|
|
1239
|
+
"items": 1
|
|
1240
|
+
},
|
|
1241
|
+
{
|
|
1242
|
+
"order": "#1045",
|
|
1243
|
+
"city": "Medan",
|
|
1244
|
+
"items": 4
|
|
1245
|
+
}
|
|
1246
|
+
]
|
|
1247
|
+
}
|
|
1248
|
+
}
|
|
1249
|
+
]
|
|
1250
|
+
},
|
|
1251
|
+
{
|
|
1252
|
+
"name": "task-list",
|
|
1253
|
+
"title": "A list from the data model",
|
|
1254
|
+
"description": "A template repeats one component for each item of an array in the data model; inside it, relative paths read the item.",
|
|
1255
|
+
"messages": [
|
|
1256
|
+
{
|
|
1257
|
+
"version": "v0.9.1",
|
|
1258
|
+
"createSurface": {
|
|
1259
|
+
"surfaceId": "tasks",
|
|
1260
|
+
"catalogId": "https://ui.mlola.com/a2ui/catalog/v1",
|
|
1261
|
+
"theme": {
|
|
1262
|
+
"name": "nordic",
|
|
1263
|
+
"mode": "system"
|
|
1264
|
+
}
|
|
1265
|
+
}
|
|
1266
|
+
},
|
|
1267
|
+
{
|
|
1268
|
+
"version": "v0.9.1",
|
|
1269
|
+
"updateComponents": {
|
|
1270
|
+
"surfaceId": "tasks",
|
|
1271
|
+
"components": [
|
|
1272
|
+
{
|
|
1273
|
+
"id": "root",
|
|
1274
|
+
"component": "Stack",
|
|
1275
|
+
"children": [
|
|
1276
|
+
"heading",
|
|
1277
|
+
"list",
|
|
1278
|
+
"add"
|
|
1279
|
+
]
|
|
1280
|
+
},
|
|
1281
|
+
{
|
|
1282
|
+
"id": "heading",
|
|
1283
|
+
"component": "Heading",
|
|
1284
|
+
"level": 2,
|
|
1285
|
+
"text": "Due today"
|
|
1286
|
+
},
|
|
1287
|
+
{
|
|
1288
|
+
"id": "list",
|
|
1289
|
+
"component": "Stack",
|
|
1290
|
+
"children": {
|
|
1291
|
+
"componentId": "task",
|
|
1292
|
+
"path": "/tasks"
|
|
1293
|
+
}
|
|
1294
|
+
},
|
|
1295
|
+
{
|
|
1296
|
+
"id": "task",
|
|
1297
|
+
"component": "Row",
|
|
1298
|
+
"children": [
|
|
1299
|
+
"done",
|
|
1300
|
+
"due"
|
|
1301
|
+
]
|
|
1302
|
+
},
|
|
1303
|
+
{
|
|
1304
|
+
"id": "done",
|
|
1305
|
+
"component": "Checkbox",
|
|
1306
|
+
"label": {
|
|
1307
|
+
"path": "title"
|
|
1308
|
+
},
|
|
1309
|
+
"checked": {
|
|
1310
|
+
"path": "done"
|
|
1311
|
+
}
|
|
1312
|
+
},
|
|
1313
|
+
{
|
|
1314
|
+
"id": "due",
|
|
1315
|
+
"component": "Badge",
|
|
1316
|
+
"tone": "warning",
|
|
1317
|
+
"text": {
|
|
1318
|
+
"path": "due"
|
|
1319
|
+
}
|
|
1320
|
+
},
|
|
1321
|
+
{
|
|
1322
|
+
"id": "add",
|
|
1323
|
+
"component": "Button",
|
|
1324
|
+
"text": "Add a task",
|
|
1325
|
+
"action": {
|
|
1326
|
+
"event": {
|
|
1327
|
+
"name": "add_task"
|
|
1328
|
+
}
|
|
1329
|
+
}
|
|
1330
|
+
}
|
|
1331
|
+
]
|
|
1332
|
+
}
|
|
1333
|
+
},
|
|
1334
|
+
{
|
|
1335
|
+
"version": "v0.9.1",
|
|
1336
|
+
"updateDataModel": {
|
|
1337
|
+
"surfaceId": "tasks",
|
|
1338
|
+
"path": "/tasks",
|
|
1339
|
+
"value": [
|
|
1340
|
+
{
|
|
1341
|
+
"title": "Send the March invoice",
|
|
1342
|
+
"done": false,
|
|
1343
|
+
"due": "By 5 pm"
|
|
1344
|
+
},
|
|
1345
|
+
{
|
|
1346
|
+
"title": "Confirm the venue",
|
|
1347
|
+
"done": true,
|
|
1348
|
+
"due": "Noon"
|
|
1349
|
+
}
|
|
1350
|
+
]
|
|
1351
|
+
}
|
|
1352
|
+
}
|
|
1353
|
+
]
|
|
1354
|
+
}
|
|
1355
|
+
]
|
|
1356
|
+
}
|