@ea-lab/reactive-json-docs 0.8.0 → 1.0.0-alpha.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.
Files changed (66) hide show
  1. package/package.json +7 -5
  2. package/public/rjbuild/docs/advanced-concepts/plugins/plugin-system.md +47 -1
  3. package/public/rjbuild/docs/advanced-concepts/plugins/plugin-system.yaml +53 -1
  4. package/public/rjbuild/docs/core/dataMapping/simpleMapping.yaml +14 -4
  5. package/public/rjbuild/docs/core/element/form/Input.md +307 -0
  6. package/public/rjbuild/docs/core/element/form/Input.yaml +572 -0
  7. package/public/rjbuild/docs/core/element/special/Count.yaml +99 -31
  8. package/public/rjbuild/docs/core/element/special/DataFilter.yaml +118 -38
  9. package/public/rjbuild/docs/core/element/special/ReactiveJsonSubroot.yaml +154 -34
  10. package/public/rjbuild/docs/core/element/special/Switch.md +5 -5
  11. package/public/rjbuild/docs/core/element/special/Switch.yaml +9 -18
  12. package/public/rjbuild/docs/core/example/html.md +2 -2
  13. package/public/rjbuild/docs/core/example/html.yaml +2 -3
  14. package/public/rjbuild/docs/core/example/native-html-forms.md +245 -0
  15. package/public/rjbuild/docs/core/example/native-html-forms.yaml +393 -0
  16. package/public/rjbuild/docs/core/reaction/addData.md +17 -3
  17. package/public/rjbuild/docs/core/reaction/addData.yaml +53 -9
  18. package/public/rjbuild/docs/core/reaction/fetchData.yaml +44 -8
  19. package/public/rjbuild/docs/core/reaction/setData.md +18 -4
  20. package/public/rjbuild/docs/core/reaction/setData.yaml +18 -4
  21. package/public/rjbuild/docs/docs-components/Mermaid.md +254 -0
  22. package/public/rjbuild/docs/docs-components/Mermaid.yaml +339 -0
  23. package/public/rjbuild/docs/docs-components/index.yaml +1 -0
  24. package/public/rjbuild/docs/getting-started/actions.md +1 -1
  25. package/public/rjbuild/docs/index.yaml +2 -1
  26. package/public/rjbuild/docs/install.md +2 -5
  27. package/public/rjbuild/docs/install.yaml +4 -10
  28. package/public/rjbuild/docs/{core → integration/bootstrap}/action/Popover.md +1 -1
  29. package/public/rjbuild/docs/{core → integration/bootstrap}/action/Tooltip.md +1 -1
  30. package/public/rjbuild/docs/integration/bootstrap/element/html/AccordionItem.md +69 -0
  31. package/public/rjbuild/docs/integration/bootstrap/element/html/Modal.md +127 -0
  32. package/public/rjbuild/docs/integration/bootstrap/element/html/Tabs.md +150 -0
  33. package/public/rjbuild/docs/integration/bootstrap/element/html/index.md +13 -0
  34. package/public/rjbuild/docs/integration/bootstrap/element/special/index.md +19 -0
  35. package/public/rjbuild/docs/integration/bootstrap/example/website.md +41 -0
  36. package/public/rjbuild/docs/integration/bootstrap/overview.md +69 -0
  37. package/public/rjbuild/docs/integration/bootstrap/overview.yaml +87 -0
  38. /package/public/rjbuild/docs/{core → integration/bootstrap}/action/Popover.yaml +0 -0
  39. /package/public/rjbuild/docs/{core → integration/bootstrap}/action/Tooltip.yaml +0 -0
  40. /package/public/rjbuild/docs/{core → integration/bootstrap}/element/form/CheckBoxField.md +0 -0
  41. /package/public/rjbuild/docs/{core → integration/bootstrap}/element/form/CheckBoxField.yaml +0 -0
  42. /package/public/rjbuild/docs/{core → integration/bootstrap}/element/form/DateField.md +0 -0
  43. /package/public/rjbuild/docs/{core → integration/bootstrap}/element/form/DateField.yaml +0 -0
  44. /package/public/rjbuild/docs/{core → integration/bootstrap}/element/form/NumberField.md +0 -0
  45. /package/public/rjbuild/docs/{core → integration/bootstrap}/element/form/NumberField.yaml +0 -0
  46. /package/public/rjbuild/docs/{core → integration/bootstrap}/element/form/SelectField.md +0 -0
  47. /package/public/rjbuild/docs/{core → integration/bootstrap}/element/form/SelectField.yaml +0 -0
  48. /package/public/rjbuild/docs/{core → integration/bootstrap}/element/form/TextAreaField.md +0 -0
  49. /package/public/rjbuild/docs/{core → integration/bootstrap}/element/form/TextAreaField.yaml +0 -0
  50. /package/public/rjbuild/docs/{core → integration/bootstrap}/element/form/TextField.md +0 -0
  51. /package/public/rjbuild/docs/{core → integration/bootstrap}/element/form/TextField.yaml +0 -0
  52. /package/public/rjbuild/docs/{core → integration/bootstrap}/element/form/formElementsCommon.md +0 -0
  53. /package/public/rjbuild/docs/{core → integration/bootstrap}/element/form/index.md +0 -0
  54. /package/public/rjbuild/docs/{core → integration/bootstrap}/element/form/index.yaml +0 -0
  55. /package/public/rjbuild/docs/{core → integration/bootstrap}/element/html/AccordionItem.yaml +0 -0
  56. /package/public/rjbuild/docs/{core → integration/bootstrap}/element/html/Modal.yaml +0 -0
  57. /package/public/rjbuild/docs/{core → integration/bootstrap}/element/html/Tabs.yaml +0 -0
  58. /package/public/rjbuild/docs/{core → integration/bootstrap}/element/special/BootstrapElement.md +0 -0
  59. /package/public/rjbuild/docs/{core → integration/bootstrap}/element/special/BootstrapElement.yaml +0 -0
  60. /package/public/rjbuild/docs/{core → integration/bootstrap}/example/accordion.md +0 -0
  61. /package/public/rjbuild/docs/{core → integration/bootstrap}/example/accordion.yaml +0 -0
  62. /package/public/rjbuild/docs/{core → integration/bootstrap}/example/dynamic-content.md +0 -0
  63. /package/public/rjbuild/docs/{core → integration/bootstrap}/example/dynamic-content.yaml +0 -0
  64. /package/public/rjbuild/docs/{core → integration/bootstrap}/example/website.yaml +0 -0
  65. /package/public/rjbuild/docs/{chartjs → integration/chartjs}/components.yaml +0 -0
  66. /package/public/rjbuild/docs/{chartjs → integration/chartjs}/overview.yaml +0 -0
@@ -0,0 +1,393 @@
1
+ renderView:
2
+ - type: Markdown
3
+ content: |
4
+ # Native HTML Forms with Reactive-JSON
5
+
6
+ This guide explains how to use native HTML form elements (`input`, `select`, `textarea`) with Reactive-JSON's reaction system to create interactive forms with proper data synchronization.
7
+
8
+ ## Core Concept: Reactions for Data Synchronization
9
+
10
+ Native HTML elements require explicit **reactions** to synchronize user input with your data. This is done using the `setData` reaction triggered by user events.
11
+
12
+ - type: SyntaxHighlighter
13
+ language: yaml
14
+ title: "Basic Structure"
15
+ content: |
16
+ - type: input
17
+ attributes:
18
+ type: "text"
19
+ value: ~.fieldName # Display current data value
20
+ actions:
21
+ - what: setData # Reaction to update data
22
+ on: input # Event that triggers the reaction
23
+ path: ~.fieldName # Data path to update
24
+ value: "<reactive-json:event-new-value>" # Value from the event
25
+
26
+ - type: Markdown
27
+ content: |
28
+ ## Event Value Patterns
29
+
30
+ ### Forward Update Pattern (Recommended)
31
+
32
+ Use `<reactive-json:event-new-value>` for automatic value detection:
33
+
34
+ - **Auto-detects the correct property**: `event.target.value` for inputs, `event.target.checked` for checkboxes
35
+ - **Simplifies configuration**: No need to specify which property to access
36
+ - **Works for all form elements**: text, number, checkbox, select, textarea, etc.
37
+
38
+ ### Alternative Explicit Syntax
39
+
40
+ For specific control, you can explicitly access event properties:
41
+
42
+ - `<reactive-json:event>.target.value` - Direct access to input value
43
+ - `<reactive-json:event>.target.checked` - Direct access to checkbox state
44
+ - `<reactive-json:event>.target.selectedIndex` - Access to select index
45
+
46
+ ## Event Types for Different Use Cases
47
+
48
+ - **`on: input`** - Real-time updates as user types (immediate feedback)
49
+ - **`on: change`** - Updates when user commits the change (varies by element type):
50
+ - Text inputs: when value changes AND field loses focus
51
+ - Checkboxes/Radio: immediately when checked/unchecked
52
+ - Select: immediately when option is selected
53
+ - **`on: blur`** - Updates when user leaves the field (regardless of value change)
54
+ - **`on: focus`** - Triggered when user enters the field
55
+
56
+ - type: RjBuildDescriber
57
+ title: "Text Input Example"
58
+ description: |
59
+ Basic text input with real-time data synchronization using the setData reaction.
60
+ toDescribe:
61
+ renderView:
62
+ - type: label
63
+ content: "Name:"
64
+ - type: input
65
+ attributes:
66
+ type: "text"
67
+ value: ~.name
68
+ placeholder: "Enter your name"
69
+ actions:
70
+ - what: setData
71
+ on: input
72
+ path: ~.name
73
+ value: "<reactive-json:event-new-value>"
74
+ - type: div
75
+ content: ["Current value: ", ~.name]
76
+ data:
77
+ name: ""
78
+
79
+ - type: RjBuildDescriber
80
+ title: "Checkbox Example"
81
+ description: |
82
+ Checkbox with data synchronization using the change event for boolean values.
83
+ toDescribe:
84
+ renderView:
85
+ - type: label
86
+ content:
87
+ - type: input
88
+ attributes:
89
+ type: "checkbox"
90
+ checked: ~.isSelected
91
+ actions:
92
+ - what: setData
93
+ on: change
94
+ path: ~.isSelected
95
+ value: "<reactive-json:event-new-value>"
96
+ - " Accept terms and conditions"
97
+ - type: div
98
+ content:
99
+ - "Status: "
100
+ - type: LabelFromValue
101
+ dataLocation: ~.isSelected
102
+ options:
103
+ - label: "Accepté"
104
+ value: true
105
+ - label: "Non accepté"
106
+ value: false
107
+ data:
108
+ isSelected: false
109
+
110
+ - type: RjBuildDescriber
111
+ title: "Select Dropdown Example"
112
+ description: |
113
+ Select dropdown with options and change event handling.
114
+ toDescribe:
115
+ renderView:
116
+ - type: label
117
+ content: "Choose option:"
118
+ - type: select
119
+ attributes:
120
+ value: ~.selectedOption
121
+ content:
122
+ - type: option
123
+ attributes:
124
+ value: ""
125
+ content: "Select an option..."
126
+ - type: option
127
+ attributes:
128
+ value: "option1"
129
+ content: "Option 1"
130
+ - type: option
131
+ attributes:
132
+ value: "option2"
133
+ content: "Option 2"
134
+ - type: option
135
+ attributes:
136
+ value: "option3"
137
+ content: "Option 3"
138
+ actions:
139
+ - what: setData
140
+ on: change
141
+ path: ~.selectedOption
142
+ value: "<reactive-json:event-new-value>"
143
+ - type: div
144
+ content: ["Selected: ", ~.selectedOption]
145
+ data:
146
+ selectedOption: ""
147
+
148
+ - type: RjBuildDescriber
149
+ title: "Textarea Example"
150
+ description: |
151
+ Multi-line text input with real-time updates.
152
+ toDescribe:
153
+ renderView:
154
+ - type: label
155
+ content: "Description:"
156
+ - type: textarea
157
+ attributes:
158
+ value: ~.description
159
+ placeholder: "Enter description..."
160
+ rows: 4
161
+ actions:
162
+ - what: setData
163
+ on: input
164
+ path: ~.description
165
+ value: "<reactive-json:event-new-value>"
166
+ - type: div
167
+ content: ["Current text: ", ~.description]
168
+ data:
169
+ description: ""
170
+
171
+ - type: RjBuildDescriber
172
+ title: "Range Input Example"
173
+ description: |
174
+ Range input with min/max constraints and validation.
175
+ toDescribe:
176
+ renderView:
177
+ - type: label
178
+ content: "Quantity (0-100):"
179
+ - type: input
180
+ attributes:
181
+ type: "range"
182
+ value: ~.quantity
183
+ min: 0
184
+ max: 100
185
+ actions:
186
+ - what: setData
187
+ on: input
188
+ path: ~.quantity
189
+ value: "<reactive-json:event-new-value>"
190
+ - type: div
191
+ content: ["Current quantity: ", ~.quantity]
192
+ data:
193
+ quantity: "20"
194
+
195
+ - type: RjBuildDescriber
196
+ title: "Radio Buttons Example"
197
+ description: |
198
+ Radio button group with exclusive selection.
199
+ toDescribe:
200
+ renderView:
201
+ - type: VariablesDebug
202
+ - type: div
203
+ content: "Choose size:"
204
+ - type: label
205
+ content:
206
+ - type: input
207
+ attributes:
208
+ type: "radio"
209
+ name: "size"
210
+ value: "small"
211
+ checked: ~.sizeState.small
212
+ actions:
213
+ - what: SetAttributeValue
214
+ name: checked
215
+ value: "checked"
216
+ when: ~.selectedSize
217
+ is: "small"
218
+ - what: setData
219
+ on: change
220
+ path: ~.selectedSize
221
+ value: "small"
222
+ - what: setData
223
+ on: change
224
+ path: ~.sizeState.small
225
+ value: true
226
+ - what: setData
227
+ on: change
228
+ path: ~.sizeState.medium
229
+ value: false
230
+ - what: setData
231
+ on: change
232
+ path: ~.sizeState.large
233
+ value: false
234
+ - " Small"
235
+ - type: label
236
+ content:
237
+ - type: input
238
+ attributes:
239
+ type: "radio"
240
+ name: "size"
241
+ value: "medium"
242
+ checked: ~.sizeState.medium
243
+ actions:
244
+ - what: SetAttributeValue
245
+ name: checked
246
+ value: "checked"
247
+ when: ~.selectedSize
248
+ is: "medium"
249
+ - what: setData
250
+ on: change
251
+ path: ~.selectedSize
252
+ value: "medium"
253
+ - what: setData
254
+ on: change
255
+ path: ~.sizeState.small
256
+ value: false
257
+ - what: setData
258
+ on: change
259
+ path: ~.sizeState.medium
260
+ value: true
261
+ - what: setData
262
+ on: change
263
+ path: ~.sizeState.large
264
+ value: false
265
+ - " Medium"
266
+ - type: label
267
+ content:
268
+ - type: input
269
+ attributes:
270
+ type: "radio"
271
+ name: "size"
272
+ value: "large"
273
+ checked: ~.sizeState.large
274
+ actions:
275
+ - what: SetAttributeValue
276
+ name: checked
277
+ value: "checked"
278
+ when: ~.selectedSize
279
+ is: "large"
280
+ - what: setData
281
+ on: change
282
+ path: ~.selectedSize
283
+ value: "large"
284
+ - what: setData
285
+ on: change
286
+ path: ~.sizeState.small
287
+ value: false
288
+ - what: setData
289
+ on: change
290
+ path: ~.sizeState.medium
291
+ value: false
292
+ - what: setData
293
+ on: change
294
+ path: ~.sizeState.large
295
+ value: true
296
+ - " Large"
297
+ - type: div
298
+ content: ["Selected size: ", ~.selectedSize]
299
+ data:
300
+ selectedSize: "medium"
301
+ sizeState:
302
+ small: false
303
+ medium: true
304
+ large: false
305
+
306
+ - type: Markdown
307
+ content: |
308
+ ## Advanced Patterns
309
+
310
+ - type: SyntaxHighlighter
311
+ language: yaml
312
+ title: "Form Validation with Conditional Actions"
313
+ content: |
314
+ - type: input
315
+ attributes:
316
+ type: "email"
317
+ value: ~.email
318
+ actions:
319
+ - what: setData
320
+ on: input
321
+ path: ~.email
322
+ value: "<reactive-json:event-new-value>"
323
+ - what: setData
324
+ on: blur
325
+ path: ~.emailValid
326
+ value: "<reactive-json:event>.target.validity.valid"
327
+
328
+ - type: SyntaxHighlighter
329
+ language: yaml
330
+ title: "Multiple Field Updates"
331
+ content: |
332
+ - type: input
333
+ attributes:
334
+ type: "text"
335
+ value: ~.firstName
336
+ actions:
337
+ - what: setData
338
+ on: input
339
+ path: ~.firstName
340
+ value: "<reactive-json:event-new-value>"
341
+ - what: setData
342
+ on: input
343
+ path: ~.fullName
344
+ value: ["<reactive-json:event-new-value>", " ", ~.lastName]
345
+
346
+ - type: Markdown
347
+ content: |
348
+ ## Simplification Alternatives
349
+
350
+ For simpler configuration and built-in styling, consider using pre-built form components:
351
+
352
+ - **Reactive-JSON Bootstrap**: `TextField`, `SelectField`, `CheckBoxField`, etc. with automatic data synchronization
353
+ - **Custom component libraries**: Create your own reusable form components with embedded reactions
354
+
355
+ - type: SyntaxHighlighter
356
+ language: yaml
357
+ title: "Comparison: Bootstrap vs Native"
358
+ content: |
359
+ # Simpler alternative using reactive-json-bootstrap
360
+ - type: TextField
361
+ label: "Username:"
362
+ dataLocation: ~.username # Automatic synchronization
363
+
364
+ # Equivalent native implementation
365
+ - type: label
366
+ content: "Username:"
367
+ - type: input
368
+ attributes:
369
+ type: "text"
370
+ value: ~.username
371
+ actions:
372
+ - what: setData
373
+ on: input
374
+ path: ~.username
375
+ value: "<reactive-json:event-new-value>"
376
+
377
+ - type: Markdown
378
+ content: |
379
+ ## Best Practices
380
+
381
+ 1. **Always include `setData` reactions** for interactive elements
382
+ 2. **Choose appropriate events**: `input` for real-time updates, `change` for committed changes
383
+ 3. **Use `<reactive-json:event-new-value>`** for automatic value detection
384
+ 4. **Consider pre-built components** for complex forms to reduce configuration
385
+ 5. **Test data flow** to ensure changes are properly synchronized
386
+
387
+ ## Key Takeaways
388
+
389
+ - Native HTML elements provide full control but require explicit reactions
390
+ - The `setData` reaction is essential for data synchronization
391
+ - Use `<reactive-json:event-new-value>` for automatic value detection
392
+ - Different events (`input`, `change`, `blur`) serve different use cases
393
+ - Pre-built components can simplify complex forms while maintaining flexibility
@@ -69,9 +69,23 @@ data:
69
69
  ### Adding with Dynamic Values
70
70
  ```yaml
71
71
  renderView:
72
- - type: TextField
73
- label: "New Item"
74
- dataLocation: ~.new_item
72
+ - type: label
73
+ content: "New Item:"
74
+ - type: input
75
+ attributes:
76
+ type: "text"
77
+ value: ~.new_item
78
+ style:
79
+ padding: "8px"
80
+ margin: "8px 0"
81
+ border: "1px solid #ccc"
82
+ borderRadius: "4px"
83
+ width: "200px"
84
+ actions:
85
+ - what: setData
86
+ on: input
87
+ path: ~.new_item
88
+ value: "<reactive-json:event-new-value>"
75
89
  - type: button
76
90
  content: Add
77
91
  actions:
@@ -87,9 +87,23 @@ renderView:
87
87
  ### Adding with Dynamic Values
88
88
  ```yaml
89
89
  renderView:
90
- - type: TextField
91
- label: "New Item"
92
- dataLocation: ~.new_item
90
+ - type: label
91
+ content: "New Item:"
92
+ - type: input
93
+ attributes:
94
+ type: "text"
95
+ value: ~.new_item
96
+ style:
97
+ padding: "8px"
98
+ margin: "8px 0"
99
+ border: "1px solid #ccc"
100
+ borderRadius: "4px"
101
+ width: "200px"
102
+ actions:
103
+ - what: setData
104
+ on: input
105
+ path: ~.new_item
106
+ value: "<reactive-json:event-new-value>"
93
107
  - type: button
94
108
  content: Add
95
109
  actions:
@@ -128,12 +142,42 @@ renderView:
128
142
  load: user_form
129
143
  templates:
130
144
  user_form:
131
- - type: TextField
132
- label: Name
133
- dataLocation: ~.name
134
- - type: TextField
135
- label: Email
136
- dataLocation: ~.email
145
+ type: div
146
+ content:
147
+ - type: label
148
+ content: "Name:"
149
+ - type: input
150
+ attributes:
151
+ type: "text"
152
+ value: ~.name
153
+ style:
154
+ padding: "8px"
155
+ margin: "8px 0"
156
+ border: "1px solid #ccc"
157
+ borderRadius: "4px"
158
+ width: "200px"
159
+ actions:
160
+ - what: setData
161
+ on: input
162
+ path: ~.name
163
+ value: "<reactive-json:event-new-value>"
164
+ - type: label
165
+ content: "Email:"
166
+ - type: input
167
+ attributes:
168
+ type: "email"
169
+ value: ~.email
170
+ style:
171
+ padding: "8px"
172
+ margin: "8px 0"
173
+ border: "1px solid #ccc"
174
+ borderRadius: "4px"
175
+ width: "200px"
176
+ actions:
177
+ - what: setData
178
+ on: input
179
+ path: ~.email
180
+ value: "<reactive-json:event-new-value>"
137
181
  data:
138
182
  users:
139
183
  - name: "John"
@@ -205,12 +205,22 @@ renderView:
205
205
  content:
206
206
  - type: div
207
207
  attributes:
208
- class: "col-md-6"
208
+ style:
209
+ width: "48%"
210
+ display: "inline-block"
211
+ verticalAlign: "top"
212
+ marginRight: "2%"
209
213
  content:
210
214
  - type: BsButton
211
215
  content: "Complete Data Replacement"
212
216
  attributes:
213
- class: "btn btn-primary mb-2 w-100"
217
+ style:
218
+ padding: "8px 16px"
219
+ margin: "8px 0"
220
+ border: "1px solid #007bff"
221
+ borderRadius: "4px"
222
+ cursor: "pointer"
223
+ width: "100%"
214
224
  actions:
215
225
  - what: fetchData
216
226
  on: click
@@ -226,12 +236,22 @@ renderView:
226
236
 
227
237
  - type: div
228
238
  attributes:
229
- class: "col-md-6"
239
+ style:
240
+ width: "48%"
241
+ display: "inline-block"
242
+ verticalAlign: "top"
243
+ marginRight: "2%"
230
244
  content:
231
245
  - type: BsButton
232
246
  content: "Targeted Data Update"
233
247
  attributes:
234
- class: "btn btn-secondary mb-2 w-100"
248
+ style:
249
+ padding: "8px 16px"
250
+ margin: "8px 0"
251
+ border: "1px solid #6c757d"
252
+ borderRadius: "4px"
253
+ cursor: "pointer"
254
+ width: "100%"
235
255
  actions:
236
256
  - what: fetchData
237
257
  on: click
@@ -253,7 +273,11 @@ renderView:
253
273
  - type: BsButton
254
274
  content: "🔄 Reset to Initial Data"
255
275
  attributes:
256
- class: "btn btn-secondary"
276
+ style:
277
+ padding: "8px 16px"
278
+ border: "1px solid #6c757d"
279
+ borderRadius: "4px"
280
+ cursor: "pointer"
257
281
  actions:
258
282
  - what: fetchData
259
283
  on: click
@@ -269,7 +293,11 @@ renderView:
269
293
  content:
270
294
  - type: div
271
295
  attributes:
272
- class: "col-md-4"
296
+ style:
297
+ width: "32%"
298
+ display: "inline-block"
299
+ verticalAlign: "top"
300
+ marginRight: "1%"
273
301
  content:
274
302
  - type: h6
275
303
  content: "👤 User Profile"
@@ -295,7 +323,11 @@ renderView:
295
323
 
296
324
  - type: div
297
325
  attributes:
298
- class: "col-md-4"
326
+ style:
327
+ width: "32%"
328
+ display: "inline-block"
329
+ verticalAlign: "top"
330
+ marginRight: "1%"
299
331
  content:
300
332
  - type: h6
301
333
  content: "⚙️ Settings"
@@ -321,7 +353,11 @@ renderView:
321
353
 
322
354
  - type: div
323
355
  attributes:
324
- class: "col-md-4"
356
+ style:
357
+ width: "32%"
358
+ display: "inline-block"
359
+ verticalAlign: "top"
360
+ marginRight: "1%"
325
361
  content:
326
362
  - type: h6
327
363
  content: "📊 Status"
@@ -52,10 +52,24 @@ This example shows how to use conditions with `setData` to only execute when cer
52
52
 
53
53
  ```yaml
54
54
  renderView:
55
- - type: TextField
56
- dataLocation: ~.username
57
- label: "Username:"
58
- placeholder: "Enter username"
55
+ - type: label
56
+ content: "Username:"
57
+ - type: input
58
+ attributes:
59
+ type: "text"
60
+ value: ~.username
61
+ placeholder: "Enter username"
62
+ style:
63
+ padding: "8px"
64
+ margin: "8px 0"
65
+ border: "1px solid #ccc"
66
+ borderRadius: "4px"
67
+ width: "200px"
68
+ actions:
69
+ - what: setData
70
+ on: input
71
+ path: ~.username
72
+ value: "<reactive-json:event-new-value>"
59
73
  - type: button
60
74
  content: "Set Welcome Message"
61
75
  actions:
@@ -73,10 +73,24 @@ renderView:
73
73
  description: "This example shows how to use conditions with `setData` to only execute when certain criteria are met."
74
74
  toDescribe:
75
75
  renderView:
76
- - type: TextField
77
- dataLocation: ~.username
78
- label: "Username:"
79
- placeholder: "Enter username"
76
+ - type: label
77
+ content: "Username:"
78
+ - type: input
79
+ attributes:
80
+ type: "text"
81
+ value: ~.username
82
+ placeholder: "Enter username"
83
+ style:
84
+ padding: "8px"
85
+ margin: "8px 0"
86
+ border: "1px solid #ccc"
87
+ borderRadius: "4px"
88
+ width: "200px"
89
+ actions:
90
+ - what: setData
91
+ on: input
92
+ path: ~.username
93
+ value: "<reactive-json:event-new-value>"
80
94
  - type: button
81
95
  content: "Set Welcome Message"
82
96
  actions: