@lowdefy/blocks-basic 0.0.0-experimental-20260720072521 → 0.0.0-experimental-20260720135014

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 (33) hide show
  1. package/dist/blocks.js +0 -1
  2. package/dist/e2e.js +0 -1
  3. package/dist/metas.js +0 -1
  4. package/package.json +10 -10
  5. package/dist/blocks/Anchor/gallery.yaml +0 -316
  6. package/dist/blocks/Anchor/tests/Anchor.e2e.yaml +0 -78
  7. package/dist/blocks/Anchor/tests.yaml +0 -109
  8. package/dist/blocks/Box/gallery.yaml +0 -1369
  9. package/dist/blocks/Box/tests/Box.e2e.yaml +0 -78
  10. package/dist/blocks/Box/tests.yaml +0 -43
  11. package/dist/blocks/DangerousHtml/gallery.yaml +0 -182
  12. package/dist/blocks/DangerousHtml/tests/DangerousHtml.e2e.yaml +0 -33
  13. package/dist/blocks/DangerousHtml/tests.yaml +0 -83
  14. package/dist/blocks/Dynamic/Dynamic.js +0 -35
  15. package/dist/blocks/Dynamic/e2e.js +0 -16
  16. package/dist/blocks/Dynamic/meta.js +0 -76
  17. package/dist/blocks/Html/gallery.yaml +0 -239
  18. package/dist/blocks/Html/tests/Html.e2e.yaml +0 -56
  19. package/dist/blocks/Html/tests.yaml +0 -75
  20. package/dist/blocks/Icon/gallery.yaml +0 -702
  21. package/dist/blocks/Icon/tests/Icon.e2e.yaml +0 -43
  22. package/dist/blocks/Icon/tests.yaml +0 -54
  23. package/dist/blocks/Img/gallery.yaml +0 -446
  24. package/dist/blocks/Img/tests/Img.e2e.yaml +0 -61
  25. package/dist/blocks/Img/tests.yaml +0 -74
  26. package/dist/blocks/List/gallery.yaml +0 -523
  27. package/dist/blocks/List/tests/List.e2e.yaml +0 -199
  28. package/dist/blocks/List/tests.yaml +0 -471
  29. package/dist/blocks/Span/gallery.yaml +0 -664
  30. package/dist/blocks/Span/tests/Span.e2e.yaml +0 -59
  31. package/dist/blocks/Span/tests.yaml +0 -43
  32. package/dist/blocks/Throw/gallery.yaml +0 -40
  33. package/dist/blocks/Throw/tests.yaml +0 -20
@@ -1,1369 +0,0 @@
1
- # Copyright 2020-2026 Lowdefy, Inc
2
-
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
-
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
-
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
- # ──────────────────────────────────────────────
16
- # Properties
17
- # ──────────────────────────────────────────────
18
-
19
- - title: Basic Box
20
- blocks:
21
- - id: box_basic
22
- type: Box
23
- blocks:
24
- - id: box_basic_text
25
- type: Html
26
- properties:
27
- html: '<p style="margin: 0;">A basic Box renders a div and contains child blocks.</p>'
28
-
29
- - title: Content Property
30
- blocks:
31
- - id: box_content_string
32
- type: Box
33
- properties:
34
- content: A Box can render a simple string using the content property.
35
- - id: box_content_html
36
- type: Box
37
- properties:
38
- content: '<b>Bold</b> and <i>italic</i> text via the content property.'
39
- - id: box_content_override
40
- type: Box
41
- properties:
42
- content: This content property overrides the content area below.
43
- blocks:
44
- - id: box_content_override_child
45
- type: Html
46
- properties:
47
- html: '<p style="margin: 0;">This child block is hidden because the content property takes priority.</p>'
48
-
49
- # ──────────────────────────────────────────────
50
- # Events
51
- # ──────────────────────────────────────────────
52
-
53
- - title: onClick Event
54
- blocks:
55
- - id: box_onclick
56
- type: Box
57
- style:
58
- .element:
59
- background: rgba(22, 119, 255, 0.08)
60
- border: 1px solid rgba(22, 119, 255, 0.3)
61
- padding: 16
62
- borderRadius: 8
63
- cursor: pointer
64
- events:
65
- onClick:
66
- - id: box_onclick_message
67
- type: DisplayMessage
68
- params:
69
- content: Box clicked!
70
- status: info
71
- blocks:
72
- - id: box_onclick_text
73
- type: Html
74
- properties:
75
- html: '<p style="margin: 0; color: #1677ff;">Click this box to trigger a DisplayMessage action.</p>'
76
-
77
- - id: box_onclick_setstate
78
- type: Box
79
- style:
80
- .element:
81
- background: rgba(82, 196, 26, 0.08)
82
- border: 1px solid rgba(82, 196, 26, 0.3)
83
- padding: 16
84
- borderRadius: 8
85
- cursor: pointer
86
- events:
87
- onClick:
88
- - id: box_onclick_set
89
- type: SetState
90
- params:
91
- box_click_count:
92
- _sum:
93
- - _state: box_click_count
94
- - 1
95
- blocks:
96
- - id: box_onclick_counter_text
97
- type: Html
98
- properties:
99
- html: '<p style="margin: 0; color: #52c41a;">Click this box to increment a counter with SetState.</p>'
100
-
101
- - id: box_onclick_link
102
- type: Box
103
- style:
104
- .element:
105
- background: rgba(250, 140, 22, 0.08)
106
- border: 1px solid rgba(250, 140, 22, 0.3)
107
- padding: 16
108
- borderRadius: 8
109
- cursor: pointer
110
- events:
111
- onClick:
112
- - id: box_onclick_link_action
113
- type: Link
114
- params:
115
- url: /
116
- blocks:
117
- - id: box_onclick_link_text
118
- type: Html
119
- properties:
120
- html: '<p style="margin: 0; color: #fa8c16;">Click this box to navigate using the Link action.</p>'
121
-
122
- - title: onPaste Event
123
- blocks:
124
- - id: box_onpaste
125
- type: Box
126
- style:
127
- .element:
128
- background: rgba(47, 84, 235, 0.08)
129
- border: 1px dashed rgba(47, 84, 235, 0.3)
130
- padding: 16
131
- borderRadius: 8
132
- events:
133
- onPaste:
134
- - id: box_onpaste_message
135
- type: DisplayMessage
136
- params:
137
- content: Content pasted into the box!
138
- status: success
139
- blocks:
140
- - id: box_onpaste_text
141
- type: Html
142
- properties:
143
- html: '<p style="margin: 0; color: #2f54eb;">Focus this box and paste something to trigger the onPaste event.</p>'
144
-
145
- # ──────────────────────────────────────────────
146
- # Layout
147
- # ──────────────────────────────────────────────
148
-
149
- - title: Layout Gap
150
- fullWidth: true
151
- blocks:
152
- - id: box_gap_8
153
- type: Box
154
- layout:
155
- gap: 8
156
- blocks:
157
- - id: box_gap_8_a
158
- type: Button
159
- layout:
160
- flex: 0 0 auto
161
- properties:
162
- title: Gap 8
163
- color: primary
164
- variant: solid
165
- - id: box_gap_8_b
166
- type: Button
167
- layout:
168
- flex: 0 0 auto
169
- properties:
170
- title: Gap 8
171
- color: primary
172
- variant: solid
173
- - id: box_gap_8_c
174
- type: Button
175
- layout:
176
- flex: 0 0 auto
177
- properties:
178
- title: Gap 8
179
- color: primary
180
- variant: solid
181
- - id: box_gap_16
182
- type: Box
183
- layout:
184
- gap: 16
185
- blocks:
186
- - id: box_gap_16_a
187
- type: Button
188
- layout:
189
- flex: 0 0 auto
190
- properties:
191
- title: Gap 16
192
- color: primary
193
- variant: outlined
194
- - id: box_gap_16_b
195
- type: Button
196
- layout:
197
- flex: 0 0 auto
198
- properties:
199
- title: Gap 16
200
- color: primary
201
- variant: outlined
202
- - id: box_gap_16_c
203
- type: Button
204
- layout:
205
- flex: 0 0 auto
206
- properties:
207
- title: Gap 16
208
- color: primary
209
- variant: outlined
210
- - id: box_gap_32
211
- type: Box
212
- layout:
213
- gap: 32
214
- blocks:
215
- - id: box_gap_32_a
216
- type: Button
217
- layout:
218
- flex: 0 0 auto
219
- properties:
220
- title: Gap 32
221
- color: green
222
- variant: solid
223
- - id: box_gap_32_b
224
- type: Button
225
- layout:
226
- flex: 0 0 auto
227
- properties:
228
- title: Gap 32
229
- color: green
230
- variant: solid
231
- - id: box_gap_32_c
232
- type: Button
233
- layout:
234
- flex: 0 0 auto
235
- properties:
236
- title: Gap 32
237
- color: green
238
- variant: solid
239
-
240
- - title: Justify Content
241
- fullWidth: true
242
- blocks:
243
- - id: box_justify_start_label
244
- type: Markdown
245
- properties:
246
- content: '**justify: flex-start**'
247
- - id: box_justify_start
248
- type: Box
249
- layout:
250
- gap: 8
251
- justify: flex-start
252
- class: p-3 rounded-lg border border-gray-500/20
253
- blocks:
254
- - id: box_js_a
255
- type: Button
256
- layout:
257
- flex: 0 0 auto
258
- properties:
259
- title: A
260
- color: primary
261
- variant: solid
262
- - id: box_js_b
263
- type: Button
264
- layout:
265
- flex: 0 0 auto
266
- properties:
267
- title: B
268
- color: primary
269
- variant: solid
270
- - id: box_js_c
271
- type: Button
272
- layout:
273
- flex: 0 0 auto
274
- properties:
275
- title: C
276
- color: primary
277
- variant: solid
278
- - id: box_justify_center_label
279
- type: Markdown
280
- properties:
281
- content: '**justify: center**'
282
- - id: box_justify_center
283
- type: Box
284
- layout:
285
- gap: 8
286
- justify: center
287
- class: p-3 rounded-lg border border-gray-500/20
288
- blocks:
289
- - id: box_jc_a
290
- type: Button
291
- layout:
292
- flex: 0 0 auto
293
- properties:
294
- title: A
295
- color: green
296
- variant: solid
297
- - id: box_jc_b
298
- type: Button
299
- layout:
300
- flex: 0 0 auto
301
- properties:
302
- title: B
303
- color: green
304
- variant: solid
305
- - id: box_jc_c
306
- type: Button
307
- layout:
308
- flex: 0 0 auto
309
- properties:
310
- title: C
311
- color: green
312
- variant: solid
313
- - id: box_justify_end_label
314
- type: Markdown
315
- properties:
316
- content: '**justify: flex-end**'
317
- - id: box_justify_end
318
- type: Box
319
- layout:
320
- gap: 8
321
- justify: flex-end
322
- class: p-3 rounded-lg border border-gray-500/20
323
- blocks:
324
- - id: box_je_a
325
- type: Button
326
- layout:
327
- flex: 0 0 auto
328
- properties:
329
- title: A
330
- color: danger
331
- variant: solid
332
- - id: box_je_b
333
- type: Button
334
- layout:
335
- flex: 0 0 auto
336
- properties:
337
- title: B
338
- color: danger
339
- variant: solid
340
- - id: box_je_c
341
- type: Button
342
- layout:
343
- flex: 0 0 auto
344
- properties:
345
- title: C
346
- color: danger
347
- variant: solid
348
- - id: box_justify_between_label
349
- type: Markdown
350
- properties:
351
- content: '**justify: space-between**'
352
- - id: box_justify_between
353
- type: Box
354
- layout:
355
- gap: 8
356
- justify: space-between
357
- class: p-3 rounded-lg border border-gray-500/20
358
- blocks:
359
- - id: box_jb_a
360
- type: Button
361
- layout:
362
- flex: 0 0 auto
363
- properties:
364
- title: A
365
- color: purple
366
- variant: solid
367
- - id: box_jb_b
368
- type: Button
369
- layout:
370
- flex: 0 0 auto
371
- properties:
372
- title: B
373
- color: purple
374
- variant: solid
375
- - id: box_jb_c
376
- type: Button
377
- layout:
378
- flex: 0 0 auto
379
- properties:
380
- title: C
381
- color: purple
382
- variant: solid
383
- - id: box_justify_around_label
384
- type: Markdown
385
- properties:
386
- content: '**justify: space-around**'
387
- - id: box_justify_around
388
- type: Box
389
- layout:
390
- gap: 8
391
- justify: space-around
392
- class: p-3 rounded-lg border border-gray-500/20
393
- blocks:
394
- - id: box_ja_a
395
- type: Button
396
- layout:
397
- flex: 0 0 auto
398
- properties:
399
- title: A
400
- color: cyan
401
- variant: solid
402
- - id: box_ja_b
403
- type: Button
404
- layout:
405
- flex: 0 0 auto
406
- properties:
407
- title: B
408
- color: cyan
409
- variant: solid
410
- - id: box_ja_c
411
- type: Button
412
- layout:
413
- flex: 0 0 auto
414
- properties:
415
- title: C
416
- color: cyan
417
- variant: solid
418
-
419
- - title: Align Items
420
- fullWidth: true
421
- blocks:
422
- - id: box_align_start_label
423
- type: Markdown
424
- properties:
425
- content: '**align: flex-start**'
426
- - id: box_align_start
427
- type: Box
428
- layout:
429
- gap: 8
430
- align: flex-start
431
- class: p-3 rounded-lg border border-gray-500/20
432
- style:
433
- .element:
434
- minHeight: 100
435
- blocks:
436
- - id: box_as_tall
437
- type: Box
438
- layout:
439
- flex: 0 0 auto
440
- class: bg-blue-500 text-white px-4 py-2 rounded-md flex items-center
441
- style:
442
- .element:
443
- height: 80
444
- properties:
445
- content: Tall
446
- - id: box_as_short
447
- type: Box
448
- layout:
449
- flex: 0 0 auto
450
- class: bg-blue-500 text-white px-4 py-2 rounded-md
451
- properties:
452
- content: Short
453
- - id: box_align_center_label
454
- type: Markdown
455
- properties:
456
- content: '**align: center**'
457
- - id: box_align_center
458
- type: Box
459
- layout:
460
- gap: 8
461
- align: center
462
- class: p-3 rounded-lg border border-gray-500/20
463
- style:
464
- .element:
465
- minHeight: 100
466
- blocks:
467
- - id: box_ac_tall
468
- type: Box
469
- layout:
470
- flex: 0 0 auto
471
- class: bg-green-500 text-white px-4 py-2 rounded-md flex items-center
472
- style:
473
- .element:
474
- height: 80
475
- properties:
476
- content: Tall
477
- - id: box_ac_short
478
- type: Box
479
- layout:
480
- flex: 0 0 auto
481
- class: bg-green-500 text-white px-4 py-2 rounded-md
482
- properties:
483
- content: Short
484
- - id: box_align_end_label
485
- type: Markdown
486
- properties:
487
- content: '**align: flex-end**'
488
- - id: box_align_end
489
- type: Box
490
- layout:
491
- gap: 8
492
- align: flex-end
493
- class: p-3 rounded-lg border border-gray-500/20
494
- style:
495
- .element:
496
- minHeight: 100
497
- blocks:
498
- - id: box_ae_tall
499
- type: Box
500
- layout:
501
- flex: 0 0 auto
502
- class: bg-red-500 text-white px-4 py-2 rounded-md flex items-center
503
- style:
504
- .element:
505
- height: 80
506
- properties:
507
- content: Tall
508
- - id: box_ae_short
509
- type: Box
510
- layout:
511
- flex: 0 0 auto
512
- class: bg-red-500 text-white px-4 py-2 rounded-md
513
- properties:
514
- content: Short
515
-
516
- - title: Direction (Row vs Column)
517
- fullWidth: true
518
- blocks:
519
- - id: box_dir_row_label
520
- type: Markdown
521
- properties:
522
- content: '**Row direction (default):**'
523
- - id: box_dir_row
524
- type: Box
525
- layout:
526
- gap: 8
527
- class: p-3 rounded-lg border border-blue-500/20 bg-blue-500/5
528
- blocks:
529
- - id: box_dr_a
530
- type: Box
531
- layout:
532
- flex: 0 0 auto
533
- class: bg-blue-500 text-white px-4 py-2 rounded-md
534
- properties:
535
- content: Item 1
536
- - id: box_dr_b
537
- type: Box
538
- layout:
539
- flex: 0 0 auto
540
- class: bg-blue-500 text-white px-4 py-2 rounded-md
541
- properties:
542
- content: Item 2
543
- - id: box_dr_c
544
- type: Box
545
- layout:
546
- flex: 0 0 auto
547
- class: bg-blue-500 text-white px-4 py-2 rounded-md
548
- properties:
549
- content: Item 3
550
- - id: box_dir_column_label
551
- type: Markdown
552
- properties:
553
- content: '**Column direction (via style):**'
554
- - id: box_dir_column
555
- type: Box
556
- layout:
557
- gap: 8
558
- class: p-3 rounded-lg border border-green-500/20 bg-green-500/5
559
- style:
560
- .element:
561
- display: flex
562
- flexDirection: column
563
- blocks:
564
- - id: box_dc_a
565
- type: Box
566
- class: bg-green-500 text-white px-4 py-2 rounded-md
567
- properties:
568
- content: Item 1
569
- - id: box_dc_b
570
- type: Box
571
- class: bg-green-500 text-white px-4 py-2 rounded-md
572
- properties:
573
- content: Item 2
574
- - id: box_dc_c
575
- type: Box
576
- class: bg-green-500 text-white px-4 py-2 rounded-md
577
- properties:
578
- content: Item 3
579
-
580
- - title: Wrap
581
- fullWidth: true
582
- blocks:
583
- - id: box_wrap_label
584
- type: Markdown
585
- properties:
586
- content: '**Boxes wrap to the next line when they overflow:**'
587
- - id: box_wrap
588
- type: Box
589
- layout:
590
- gap: 8
591
- wrap: wrap
592
- class: p-3 rounded-lg border border-gray-500/20
593
- blocks:
594
- - id: box_w_a
595
- type: Box
596
- layout:
597
- flex: 0 0 150px
598
- class: bg-purple-600 text-white px-4 py-2 rounded-md text-center
599
- properties:
600
- content: Item 1
601
- - id: box_w_b
602
- type: Box
603
- layout:
604
- flex: 0 0 150px
605
- class: bg-purple-600 text-white px-4 py-2 rounded-md text-center
606
- properties:
607
- content: Item 2
608
- - id: box_w_c
609
- type: Box
610
- layout:
611
- flex: 0 0 150px
612
- class: bg-purple-600 text-white px-4 py-2 rounded-md text-center
613
- properties:
614
- content: Item 3
615
- - id: box_w_d
616
- type: Box
617
- layout:
618
- flex: 0 0 150px
619
- class: bg-purple-600 text-white px-4 py-2 rounded-md text-center
620
- properties:
621
- content: Item 4
622
- - id: box_w_e
623
- type: Box
624
- layout:
625
- flex: 0 0 150px
626
- class: bg-purple-600 text-white px-4 py-2 rounded-md text-center
627
- properties:
628
- content: Item 5
629
- - id: box_w_f
630
- type: Box
631
- layout:
632
- flex: 0 0 150px
633
- class: bg-purple-600 text-white px-4 py-2 rounded-md text-center
634
- properties:
635
- content: Item 6
636
-
637
- - title: Flex Grow
638
- fullWidth: true
639
- blocks:
640
- - id: box_flex_label
641
- type: Markdown
642
- properties:
643
- content: '**Children with flex: 1 grow to fill available space:**'
644
- - id: box_flex_grow
645
- type: Box
646
- layout:
647
- gap: 8
648
- class: p-3 rounded-lg border border-gray-500/20
649
- blocks:
650
- - id: box_fg_fixed
651
- type: Box
652
- layout:
653
- flex: 0 0 100px
654
- class: bg-orange-500 text-white px-4 py-2 rounded-md text-center
655
- properties:
656
- content: Fixed 100px
657
- - id: box_fg_grow
658
- type: Box
659
- layout:
660
- flex: 1
661
- class: bg-blue-500 text-white px-4 py-2 rounded-md text-center
662
- properties:
663
- content: Grows to fill
664
- - id: box_fg_fixed2
665
- type: Box
666
- layout:
667
- flex: 0 0 100px
668
- class: bg-orange-500 text-white px-4 py-2 rounded-md text-center
669
- properties:
670
- content: Fixed 100px
671
-
672
- - title: Nested Boxes
673
- fullWidth: true
674
- blocks:
675
- - id: box_nested_outer
676
- type: Box
677
- layout:
678
- gap: 12
679
- class: p-4 rounded-lg border border-blue-500/20 bg-blue-500/5
680
- blocks:
681
- - id: box_nested_left
682
- type: Box
683
- layout:
684
- flex: 1
685
- class: p-4 rounded-md border border-gray-500/20
686
- blocks:
687
- - id: box_nested_left_title
688
- type: Html
689
- properties:
690
- html: '<h4 style="margin: 0 0 8px 0;">Left Panel</h4>'
691
- - id: box_nested_left_text
692
- type: Html
693
- properties:
694
- html: '<p style="margin: 0; opacity: 0.65;">This box is nested inside the outer box with flex: 1.</p>'
695
- - id: box_nested_right
696
- type: Box
697
- layout:
698
- flex: 1
699
- class: p-4 rounded-md border border-gray-500/20
700
- blocks:
701
- - id: box_nested_right_title
702
- type: Html
703
- properties:
704
- html: '<h4 style="margin: 0 0 8px 0;">Right Panel</h4>'
705
- - id: box_nested_right_text
706
- type: Html
707
- properties:
708
- html: '<p style="margin: 0; opacity: 0.65;">Both panels share equal space via flex: 1.</p>'
709
-
710
- # ──────────────────────────────────────────────
711
- # Style / CSS
712
- # ──────────────────────────────────────────────
713
-
714
- - title: Styled with Tailwind Classes
715
- blocks:
716
- - id: box_tw_shadow
717
- type: Box
718
- layout:
719
- flex: 0 0 auto
720
- class: p-5 rounded-xl shadow-lg border border-gray-500/20
721
- blocks:
722
- - id: box_tw_shadow_text
723
- type: Html
724
- properties:
725
- html: '<p style="margin: 0;">Elevated box using Tailwind shadow and rounded classes on the element cssKey.</p>'
726
- - id: box_tw_border
727
- type: Box
728
- layout:
729
- flex: 0 0 auto
730
- class: border-2 border-dashed border-blue-500 p-4 rounded-lg
731
- blocks:
732
- - id: box_tw_border_text
733
- type: Html
734
- properties:
735
- html: '<p style="margin: 0; color: #1677ff;">Dashed blue border via Tailwind utilities.</p>'
736
- - id: box_tw_accent
737
- type: Box
738
- layout:
739
- flex: 0 0 auto
740
- class: border-l-4 border-l-orange-500 pl-4 py-2
741
- blocks:
742
- - id: box_tw_accent_text
743
- type: Html
744
- properties:
745
- html: '<p style="margin: 0; color: #fa8c16; font-weight: 500;">Left accent border using Tailwind border utilities.</p>'
746
- - id: box_tw_centered
747
- type: Box
748
- class: max-w-sm mx-auto text-center p-4 bg-blue-500/10 rounded-lg
749
- blocks:
750
- - id: box_tw_centered_text
751
- type: Html
752
- properties:
753
- html: '<p style="margin: 0; color: #1677ff; font-weight: bold;">Centered and constrained width with Tailwind.</p>'
754
-
755
- - title: Styled with CSS Key Object
756
- blocks:
757
- - id: box_csskey_gradient
758
- type: Box
759
- layout:
760
- flex: 0 0 auto
761
- class:
762
- element: bg-gradient-to-br from-indigo-500 to-purple-600 text-white p-5 rounded-xl
763
- blocks:
764
- - id: box_csskey_gradient_text
765
- type: Html
766
- properties:
767
- html: '<h4 style="margin: 0 0 8px 0; color: #fff;">Gradient Box</h4><p style="margin: 0; color: rgba(255,255,255,0.85);">Using the element cssKey with a Tailwind gradient background.</p>'
768
- - id: box_csskey_hover
769
- type: Box
770
- layout:
771
- flex: 0 0 auto
772
- class:
773
- element: p-5 rounded-lg border border-gray-500/20 hover:shadow-lg hover:border-blue-400 transition-all duration-200
774
- blocks:
775
- - id: box_csskey_hover_text
776
- type: Html
777
- properties:
778
- html: '<p style="margin: 0;">Hover over this box to see a shadow and border color transition using Tailwind hover utilities.</p>'
779
-
780
- - title: Inline Style Overrides
781
- blocks:
782
- - id: box_style_shadow
783
- type: Box
784
- layout:
785
- flex: 0 0 auto
786
- style:
787
- .element:
788
- padding: 20
789
- borderRadius: 12
790
- boxShadow: 0 4px 12px rgba(0, 0, 0, 0.1)
791
- background: rgba(255, 255, 255, 0.06)
792
- blocks:
793
- - id: box_style_shadow_text
794
- type: Html
795
- properties:
796
- html: '<p style="margin: 0;">Elevated box with box-shadow via inline style on the element cssKey.</p>'
797
- - id: box_style_dark
798
- type: Box
799
- layout:
800
- flex: 0 0 auto
801
- style:
802
- .element:
803
- background: '#1a1a2e'
804
- color: '#e0e0e0'
805
- padding: 20
806
- borderRadius: 8
807
- blocks:
808
- - id: box_style_dark_title
809
- type: Html
810
- properties:
811
- html: '<h4 style="margin: 0 0 8px 0; color: #ffffff;">Dark Box</h4>'
812
- - id: box_style_dark_text
813
- type: Html
814
- properties:
815
- html: '<p style="margin: 0; color: #a0a0a0;">Light text on dark background using inline style.</p>'
816
- - id: box_style_gradient
817
- type: Box
818
- layout:
819
- flex: 0 0 auto
820
- style:
821
- .element:
822
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%)
823
- color: '#ffffff'
824
- padding: 20
825
- borderRadius: 8
826
- blocks:
827
- - id: box_style_gradient_text
828
- type: Html
829
- properties:
830
- html: '<h4 style="margin: 0 0 8px 0; color: #fff;">Gradient Box</h4><p style="margin: 0; color: rgba(255,255,255,0.85);">A gradient background using the inline style approach.</p>'
831
-
832
- - title: Colored Status Boxes
833
- blocks:
834
- - id: box_bg_blue
835
- type: Box
836
- layout:
837
- flex: 0 0 auto
838
- class: bg-blue-500/10 border border-blue-500/30 p-4 rounded-lg
839
- blocks:
840
- - id: box_bg_blue_text
841
- type: Html
842
- properties:
843
- html: '<p style="margin: 0; color: #1677ff;">Blue info box</p>'
844
- - id: box_bg_green
845
- type: Box
846
- layout:
847
- flex: 0 0 auto
848
- class: bg-green-500/10 border border-green-500/30 p-4 rounded-lg
849
- blocks:
850
- - id: box_bg_green_text
851
- type: Html
852
- properties:
853
- html: '<p style="margin: 0; color: #52c41a;">Green success box</p>'
854
- - id: box_bg_red
855
- type: Box
856
- layout:
857
- flex: 0 0 auto
858
- class: bg-red-500/10 border border-red-500/30 p-4 rounded-lg
859
- blocks:
860
- - id: box_bg_red_text
861
- type: Html
862
- properties:
863
- html: '<p style="margin: 0; color: #ff4d4f;">Red error box</p>'
864
- - id: box_bg_yellow
865
- type: Box
866
- layout:
867
- flex: 0 0 auto
868
- class: bg-yellow-500/10 border border-yellow-500/30 p-4 rounded-lg
869
- blocks:
870
- - id: box_bg_yellow_text
871
- type: Html
872
- properties:
873
- html: '<p style="margin: 0; color: #faad14;">Yellow warning box</p>'
874
-
875
- # ──────────────────────────────────────────────
876
- # Applied Examples
877
- # ──────────────────────────────────────────────
878
-
879
- - title: Feature Highlights Grid
880
- fullWidth: true
881
- blocks:
882
- - id: box_features_row
883
- type: Box
884
- layout:
885
- gap: 16
886
- wrap: wrap
887
- blocks:
888
- - id: box_feature_a
889
- type: Box
890
- layout:
891
- flex: 1 1 200px
892
- class: p-5 rounded-xl border border-gray-500/20
893
- blocks:
894
- - id: box_feature_a_icon
895
- type: Icon
896
- layout:
897
- flex: 0 0 auto
898
- properties:
899
- name: AiOutlineRocket
900
- size: 32
901
- color: '#1677ff'
902
- - id: box_feature_a_title
903
- type: Html
904
- properties:
905
- html: '<h4 style="margin: 4px 0;">Fast</h4>'
906
- - id: box_feature_a_desc
907
- type: Html
908
- properties:
909
- html: '<p style="margin: 0; opacity: 0.65;">Optimized for performance with lazy loading and code splitting.</p>'
910
- - id: box_feature_b
911
- type: Box
912
- layout:
913
- flex: 1 1 200px
914
- class: p-5 rounded-xl border border-gray-500/20
915
- blocks:
916
- - id: box_feature_b_icon
917
- type: Icon
918
- layout:
919
- flex: 0 0 auto
920
- properties:
921
- name: AiOutlineSafety
922
- size: 32
923
- color: '#52c41a'
924
- - id: box_feature_b_title
925
- type: Html
926
- properties:
927
- html: '<h4 style="margin: 4px 0;">Secure</h4>'
928
- - id: box_feature_b_desc
929
- type: Html
930
- properties:
931
- html: '<p style="margin: 0; opacity: 0.65;">Built-in security features with role-based access control.</p>'
932
- - id: box_feature_c
933
- type: Box
934
- layout:
935
- flex: 1 1 200px
936
- class: p-5 rounded-xl border border-gray-500/20
937
- blocks:
938
- - id: box_feature_c_icon
939
- type: Icon
940
- layout:
941
- flex: 0 0 auto
942
- properties:
943
- name: AiOutlineApi
944
- size: 32
945
- color: '#722ed1'
946
- - id: box_feature_c_title
947
- type: Html
948
- properties:
949
- html: '<h4 style="margin: 4px 0;">Extensible</h4>'
950
- - id: box_feature_c_desc
951
- type: Html
952
- properties:
953
- html: '<p style="margin: 0; opacity: 0.65;">Plug in your own components and connect to any API.</p>'
954
-
955
- - title: Page Layout with Header, Body, and Footer
956
- fullWidth: true
957
- blocks:
958
- - id: box_page_layout
959
- type: Box
960
- style:
961
- .element:
962
- display: flex
963
- flexDirection: column
964
- minHeight: 300
965
- borderRadius: 8
966
- overflow: hidden
967
- border: 1px solid rgba(128, 128, 128, 0.3)
968
- blocks:
969
- - id: box_page_header
970
- type: Box
971
- layout:
972
- justify: space-between
973
- align: center
974
- class: bg-slate-900 px-5 py-3
975
- blocks:
976
- - id: box_page_logo
977
- type: Html
978
- layout:
979
- flex: 0 0 auto
980
- properties:
981
- html: '<span style="color: #ffffff; font-weight: bold; font-size: 16px;">My App</span>'
982
- - id: box_page_nav
983
- type: Box
984
- layout:
985
- flex: 0 0 auto
986
- gap: 16
987
- blocks:
988
- - id: box_page_nav_home
989
- type: Button
990
- layout:
991
- flex: 0 0 auto
992
- properties:
993
- title: Home
994
- color: default
995
- variant: link
996
- events:
997
- onClick:
998
- - id: box_page_nav_home_link
999
- type: Link
1000
- params:
1001
- url: /
1002
- - id: box_page_nav_about
1003
- type: Button
1004
- layout:
1005
- flex: 0 0 auto
1006
- properties:
1007
- title: About
1008
- color: default
1009
- variant: link
1010
- events:
1011
- onClick:
1012
- - id: box_page_nav_about_link
1013
- type: Link
1014
- params:
1015
- url: /about
1016
- - id: box_page_nav_contact
1017
- type: Button
1018
- layout:
1019
- flex: 0 0 auto
1020
- properties:
1021
- title: Contact
1022
- color: default
1023
- variant: link
1024
- events:
1025
- onClick:
1026
- - id: box_page_nav_contact_link
1027
- type: Link
1028
- params:
1029
- url: /contact
1030
- - id: box_page_body
1031
- type: Box
1032
- layout:
1033
- flex: 1
1034
- class: p-6
1035
- blocks:
1036
- - id: box_page_body_text
1037
- type: Html
1038
- properties:
1039
- html: '<p style="margin: 0; opacity: 0.65;">Main content area grows to fill available space using flex: 1. Place page content blocks here.</p>'
1040
- - id: box_page_footer
1041
- type: Box
1042
- layout:
1043
- justify: center
1044
- class: px-5 py-3 border-t border-gray-500/20
1045
- blocks:
1046
- - id: box_page_footer_text
1047
- type: Html
1048
- layout:
1049
- flex: 0 0 auto
1050
- properties:
1051
- html: '<span style="opacity: 0.5; font-size: 13px;">2026 My App. All rights reserved.</span>'
1052
-
1053
- - title: Notification Inbox
1054
- fullWidth: true
1055
- blocks:
1056
- - id: box_inbox_wrapper
1057
- type: Box
1058
- class: rounded-lg border border-gray-500/20 overflow-hidden
1059
- style:
1060
- .element:
1061
- display: flex
1062
- flexDirection: column
1063
- maxWidth: 480
1064
- blocks:
1065
- - id: box_inbox_header
1066
- type: Box
1067
- layout:
1068
- justify: space-between
1069
- align: center
1070
- class: px-4 py-3 border-b border-gray-500/20
1071
- blocks:
1072
- - id: box_inbox_title
1073
- type: Html
1074
- layout:
1075
- flex: 0 0 auto
1076
- properties:
1077
- html: '<span style="font-weight: 600; font-size: 15px;">Notifications</span>'
1078
- - id: box_inbox_mark_read
1079
- type: Button
1080
- layout:
1081
- flex: 0 0 auto
1082
- properties:
1083
- title: Mark all read
1084
- color: primary
1085
- variant: link
1086
- size: small
1087
- events:
1088
- onClick:
1089
- - id: box_inbox_mark_read_action
1090
- type: DisplayMessage
1091
- params:
1092
- content: All notifications marked as read.
1093
- status: success
1094
- - id: box_inbox_item_1
1095
- type: Box
1096
- layout:
1097
- gap: 12
1098
- align: flex-start
1099
- class: px-4 py-3 border-b border-gray-500/10 bg-blue-500/10 cursor-pointer hover:bg-blue-500/15
1100
- events:
1101
- onClick:
1102
- - id: box_inbox_item_1_click
1103
- type: DisplayMessage
1104
- params:
1105
- content: 'Opened: Deployment completed'
1106
- status: info
1107
- blocks:
1108
- - id: box_inbox_item_1_icon
1109
- type: Icon
1110
- layout:
1111
- flex: 0 0 auto
1112
- properties:
1113
- name: AiOutlineCheckCircle
1114
- size: 20
1115
- color: '#52c41a'
1116
- - id: box_inbox_item_1_body
1117
- type: Box
1118
- layout:
1119
- flex: 1
1120
- direction: column
1121
- gap: 2
1122
- blocks:
1123
- - id: box_inbox_item_1_text
1124
- type: Html
1125
- properties:
1126
- html: '<span style="font-weight: 500;">Deployment completed</span>'
1127
- - id: box_inbox_item_1_time
1128
- type: Html
1129
- properties:
1130
- html: '<span style="font-size: 12px; opacity: 0.5;">Production v2.4.1 deployed successfully - 5 minutes ago</span>'
1131
- - id: box_inbox_item_2
1132
- type: Box
1133
- layout:
1134
- gap: 12
1135
- align: flex-start
1136
- class: px-4 py-3 border-b border-gray-500/10 bg-blue-500/10 cursor-pointer hover:bg-blue-500/15
1137
- events:
1138
- onClick:
1139
- - id: box_inbox_item_2_click
1140
- type: DisplayMessage
1141
- params:
1142
- content: 'Opened: New team member'
1143
- status: info
1144
- blocks:
1145
- - id: box_inbox_item_2_icon
1146
- type: Icon
1147
- layout:
1148
- flex: 0 0 auto
1149
- properties:
1150
- name: AiOutlineUserAdd
1151
- size: 20
1152
- color: '#1677ff'
1153
- - id: box_inbox_item_2_body
1154
- type: Box
1155
- layout:
1156
- flex: 1
1157
- direction: column
1158
- gap: 2
1159
- blocks:
1160
- - id: box_inbox_item_2_text
1161
- type: Html
1162
- properties:
1163
- html: '<span style="font-weight: 500;">New team member added</span>'
1164
- - id: box_inbox_item_2_time
1165
- type: Html
1166
- properties:
1167
- html: '<span style="font-size: 12px; opacity: 0.5;">Sarah joined the Design team - 2 hours ago</span>'
1168
- - id: box_inbox_item_3
1169
- type: Box
1170
- layout:
1171
- gap: 12
1172
- align: flex-start
1173
- class: px-4 py-3 cursor-pointer hover:bg-gray-500/10
1174
- events:
1175
- onClick:
1176
- - id: box_inbox_item_3_click
1177
- type: DisplayMessage
1178
- params:
1179
- content: 'Opened: Storage warning'
1180
- status: info
1181
- blocks:
1182
- - id: box_inbox_item_3_icon
1183
- type: Icon
1184
- layout:
1185
- flex: 0 0 auto
1186
- properties:
1187
- name: AiOutlineWarning
1188
- size: 20
1189
- color: '#faad14'
1190
- - id: box_inbox_item_3_body
1191
- type: Box
1192
- layout:
1193
- flex: 1
1194
- direction: column
1195
- gap: 2
1196
- blocks:
1197
- - id: box_inbox_item_3_text
1198
- type: Html
1199
- properties:
1200
- html: '<span style="opacity: 0.65;">Storage limit approaching</span>'
1201
- - id: box_inbox_item_3_time
1202
- type: Html
1203
- properties:
1204
- html: '<span style="font-size: 12px; opacity: 0.5;">You have used 85% of your storage quota - 1 day ago</span>'
1205
-
1206
- - title: Sidebar Navigation with Content Area
1207
- fullWidth: true
1208
- blocks:
1209
- - id: box_sidebar_layout
1210
- type: Box
1211
- layout:
1212
- gap: 0
1213
- class: rounded-lg border border-gray-500/20 overflow-hidden
1214
- style:
1215
- .element:
1216
- minHeight: 320
1217
- blocks:
1218
- - id: box_sidebar_nav
1219
- type: Box
1220
- layout:
1221
- flex: 0 0 200px
1222
- class: border-r border-gray-500/20
1223
- style:
1224
- .element:
1225
- display: flex
1226
- flexDirection: column
1227
- blocks:
1228
- - id: box_sidebar_brand
1229
- type: Html
1230
- properties:
1231
- html: '<div style="padding: 16px; font-weight: 700; font-size: 15px; border-bottom: 1px solid rgba(128,128,128,0.2);">Workspace</div>'
1232
- - id: box_sidebar_item_dashboard
1233
- type: Box
1234
- layout:
1235
- gap: 8
1236
- align: center
1237
- class: px-4 py-2 bg-blue-500/10 cursor-pointer
1238
- events:
1239
- onClick:
1240
- - id: box_sidebar_dashboard_action
1241
- type: SetState
1242
- params:
1243
- sidebar_active: dashboard
1244
- blocks:
1245
- - id: box_sidebar_icon_dashboard
1246
- type: Icon
1247
- layout:
1248
- flex: 0 0 auto
1249
- properties:
1250
- name: AiOutlineDashboard
1251
- size: 16
1252
- color: '#1677ff'
1253
- - id: box_sidebar_text_dashboard
1254
- type: Html
1255
- layout:
1256
- flex: 0 0 auto
1257
- properties:
1258
- html: '<span style="color: #1677ff; font-weight: 500; font-size: 14px;">Dashboard</span>'
1259
- - id: box_sidebar_item_projects
1260
- type: Box
1261
- layout:
1262
- gap: 8
1263
- align: center
1264
- class: px-4 py-2 cursor-pointer hover:bg-gray-500/10
1265
- events:
1266
- onClick:
1267
- - id: box_sidebar_projects_action
1268
- type: SetState
1269
- params:
1270
- sidebar_active: projects
1271
- blocks:
1272
- - id: box_sidebar_icon_projects
1273
- type: Icon
1274
- layout:
1275
- flex: 0 0 auto
1276
- properties:
1277
- name: AiOutlineProject
1278
- size: 16
1279
- color: rgba(128, 128, 128, 0.7)
1280
- - id: box_sidebar_text_projects
1281
- type: Html
1282
- layout:
1283
- flex: 0 0 auto
1284
- properties:
1285
- html: '<span style="opacity: 0.65; font-size: 14px;">Projects</span>'
1286
- - id: box_sidebar_item_settings
1287
- type: Box
1288
- layout:
1289
- gap: 8
1290
- align: center
1291
- class: px-4 py-2 cursor-pointer hover:bg-gray-500/10
1292
- events:
1293
- onClick:
1294
- - id: box_sidebar_settings_action
1295
- type: SetState
1296
- params:
1297
- sidebar_active: settings
1298
- blocks:
1299
- - id: box_sidebar_icon_settings
1300
- type: Icon
1301
- layout:
1302
- flex: 0 0 auto
1303
- properties:
1304
- name: AiOutlineSetting
1305
- size: 16
1306
- color: rgba(128, 128, 128, 0.7)
1307
- - id: box_sidebar_text_settings
1308
- type: Html
1309
- layout:
1310
- flex: 0 0 auto
1311
- properties:
1312
- html: '<span style="opacity: 0.65; font-size: 14px;">Settings</span>'
1313
- - id: box_sidebar_content
1314
- type: Box
1315
- layout:
1316
- flex: 1
1317
- class: p-6
1318
- blocks:
1319
- - id: box_sidebar_content_title
1320
- type: Html
1321
- properties:
1322
- html: '<h3 style="margin: 0 0 12px 0;">Dashboard</h3>'
1323
- - id: box_sidebar_stats_row
1324
- type: Box
1325
- layout:
1326
- gap: 12
1327
- blocks:
1328
- - id: box_sidebar_stat_users
1329
- type: Box
1330
- layout:
1331
- flex: 1
1332
- class: p-4 rounded-lg border border-blue-500/20 bg-blue-500/5
1333
- blocks:
1334
- - id: box_sidebar_stat_users_label
1335
- type: Html
1336
- properties:
1337
- html: '<span style="font-size: 12px; opacity: 0.5;">Active Users</span>'
1338
- - id: box_sidebar_stat_users_value
1339
- type: Html
1340
- properties:
1341
- html: '<span style="font-size: 24px; font-weight: 700; color: #1677ff;">1,248</span>'
1342
- - id: box_sidebar_stat_revenue
1343
- type: Box
1344
- layout:
1345
- flex: 1
1346
- class: p-4 rounded-lg border border-green-500/20 bg-green-500/5
1347
- blocks:
1348
- - id: box_sidebar_stat_revenue_label
1349
- type: Html
1350
- properties:
1351
- html: '<span style="font-size: 12px; opacity: 0.5;">Revenue</span>'
1352
- - id: box_sidebar_stat_revenue_value
1353
- type: Html
1354
- properties:
1355
- html: '<span style="font-size: 24px; font-weight: 700; color: #52c41a;">$48,650</span>'
1356
- - id: box_sidebar_stat_tasks
1357
- type: Box
1358
- layout:
1359
- flex: 1
1360
- class: p-4 rounded-lg border border-orange-500/20 bg-orange-500/5
1361
- blocks:
1362
- - id: box_sidebar_stat_tasks_label
1363
- type: Html
1364
- properties:
1365
- html: '<span style="font-size: 12px; opacity: 0.5;">Open Tasks</span>'
1366
- - id: box_sidebar_stat_tasks_value
1367
- type: Html
1368
- properties:
1369
- html: '<span style="font-size: 24px; font-weight: 700; color: #fa8c16;">37</span>'