slint-ui-system 0.5.0

Neon Design System — Slint UI components for Rust desktop apps. 35+ components, dark/light theme, neon accents.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
# Neon Design System — Component API Reference

> Documentación oficial de todas las propiedades y callbacks de los componentes del sistema.

---

## Buttons (`ui/components/button.slint`)

### NeonButton
```slint
NeonButton {
    text: "Click me";
    enabled: true;
    has-focus: false;
    clicked => { /* action */ }
}
```

| Propiedad | Tipo | Default | Descripción |
|-----------|------|---------|-------------|
| text | string | "" | Etiqueta del botón |
| enabled | bool | true | Estado interactivo |
| has-focus | bool | false | Focus ring activo |

| Callback | Args | Descripción |
|----------|------|-------------|
| clicked | - | Se dispara al hacer clic |

### PrimaryNeonButton
Mismas propiedades que NeonButton. Fondo cyan relleno.

### GhostNeonButton
Mismas propiedades. Sin borde, solo glow en hover.

### DangerNeonButton
Mismas propiedades. Borde rojo para acciones destructivas.

### IconNeonButton
Mismas propiedades. Tamaño fijo 36×36px para iconos.

### ButtonGroup
Contenedor sin propiedades — solo `@children`.

---

## Inputs (`ui/components/input.slint`)

### NeonInput
```slint
NeonInput {
    text: "value";
    placeholder: "Enter name";
    label: "Project";
    hint: "Required";
    enabled: true;
    has-focus: false;
    has-error: false;
}
```

| Propiedad | Tipo | Default | Descripción |
|-----------|------|---------|-------------|
| text | string | "" | Valor del campo |
| placeholder | string | "" | Texto de placeholder |
| label | string | "" | Etiqueta superior |
| hint | string | "" | Texto de ayuda inferior |
| enabled | bool | true | Estado interactivo |
| has-focus | bool | false | Focus ring |
| has-error | bool | false | Borde rojo de error |

### NeonSearchInput
Igual que NeonInput. Placeholder por defecto "Search…".

### NeonTextArea
Igual que NeonInput pero con TextEdit multi-línea (min-height 80px).

---

## Cards (`ui/components/card.slint`)

### NeonCard
```slint
NeonCard {
    title: "Info";
    @children
}
```

| Propiedad | Tipo | Default |
|-----------|------|---------|
| title | string | "" |

### NeonSection
```slint
NeonSection {
    title: "Components";
    collapsible: false;
    expanded: true;
    @children
}
```

| Propiedad | Tipo | Default |
|-----------|------|---------|
| title | string | "" |
| collapsible | bool | false |
| expanded | bool | true |

### InfoCard
```slint
InfoCard {
    icon-text: "◈";
    label: "Models";
    value: "1,247";
    accent-color: Theme.neon-cyan;
}
```

---

## Modals (`ui/components/modal.slint`)

### NeonModal
```slint
NeonModal {
    open: true;
    title: "New Project";
    modal-width: 480px;
    closable: true;
    closed => { /* action */ }
    @children
}
```

| Propiedad | Tipo | Default |
|-----------|------|---------|
| open | bool | false |
| title | string | "" |
| modal-width | length | 480px |
| closable | bool | true |

| Callback | Descripción |
|----------|-------------|
| closed | Al cerrar (click × o backdrop) |

### NeonDrawer
```slint
NeonDrawer {
    open: true;
    title: "Notifications";
    side: "right";  // "left" o "right"
    closed => { /* action */ }
    @children
}
```

### NeonConfirmDialog
```slint
NeonConfirmDialog {
    open: true;
    title: "Delete";
    message: "Are you sure?";
    confirm-danger: true;
    confirmed => { /* yes */ }
    cancelled => { /* no */ }
}
```

---

## Toggles (`ui/components/toggle.slint`)

### NeonToggle
```slint
NeonToggle {
    label: "Auto-sync";
    checked: false;
    enabled: true;
    has-focus: false;
    toggled => { /* action */ }
}
```

### NeonCheckbox
Mismas propiedades que NeonToggle. Checkbox cuadrado 16×16px.

### NeonRadioGroup
```slint
NeonRadioGroup {
    items: ["A", "B", "C"];
    selected-index: 0;
    enabled: true;
    index-changed(idx) => { /* selected index */ }
}
```

---

## Sliders (`ui/components/slider.slint`)

### NeonSlider
```slint
NeonSlider {
    label: "Zoom";
    min: 0.0;
    max: 100.0;
    value: 50.0;
    enabled: true;
    changed => { /* new value */ }
}
```

### NeonProgressBar
```slint
NeonProgressBar {
    value: 0.65;
    color: Theme.neon-cyan;
    show-label: true;
}
```

### NeonSpinner
Sin propiedades. Loader animado de 24×24px.

---

## Badges (`ui/components/badge.slint`)

### NeonBadge, NeonTag, CountBadge, StatusDot
Ver archivo fuente para API detallada.

---

## Lists (`ui/components/list.slint`)

### NeonListGroup, NeonDataTable
Ver archivo fuente para API detallada.

---

## Navigation (`ui/components/nav.slint`)

### NeonSidebar, NeonTopBar
Ver archivo fuente para API detallada.

---

## Icons (`ui/components/icons.slint`)

57 componentes icon: `IconHome`, `IconSettings`, `IconBell`, `IconSearch`, `IconLayers`, etc.

```slint
IconHome {
    color: Theme.neon-cyan;
    size: 24px;
}
```

---

## Charts (`ui/components/chart.slint`)

### NeonBarChart, NeonLineChart
Ver archivo fuente para API detallada.

---

## Form (`ui/components/form.slint`)

### NeonSelect
```slint
NeonSelect {
    label: "Structure";
    options: [{ label: "A", value: "a", disabled: false }];
    selected-index: -1;
    enabled: true;
    has-focus: false;
    selected => { /* option selected */ }
}
```

### NeonDatePicker
```slint
NeonDatePicker {
    label: "Inspection";
    year: 2026;
    month: 5;
    selected-day: -1;
    enabled: true;
    day-selected => { /* day picked */ }
}
```

---

## Tree (`ui/components/tree.slint`)

### NeonTreeView
```slint
NeonTreeView {
    items: [{ label: "File", depth: 0, expanded: true, has-children: true, icon: "📁", selected: false }];
    selected-index: -1;
    item-clicked(idx) => { /* clicked item index */ }
}
```

---

## Color Picker (`ui/components/color-picker.slint`)

### NeonColorPicker
Picker HSV completo con slider de 48 segmentos de hue y campo 2D Sat×Val de 10×10 strips.

---

## Tooltip (`ui/components/tooltip.slint`)

### NeonTooltip
```slint
NeonTooltip {
    text: "Help text";
    shown: false;
    offset-x: 0px;
    offset-y: -28px;
}
```

---

## Pagination (`ui/components/pagination.slint`)

### NeonPagination
```slint
NeonPagination {
    total-pages: 12;
    current-page: 1;
    enabled: true;
    page-changed(p) => { /* new page number */ }
}
```

### NeonBreadcrumbs
```slint
NeonBreadcrumbs {
    items: ["Home", "Projects", "Models"];
    enabled: true;
    navigated(idx) => { /* clicked item index */ }
}
```

---

## SplitView (`ui/components/splitview.slint`)

### NeonSplitView
```slint
NeonSplitView {
    split-position: 200px;
    min-left: 100px;
    min-right: 100px;
    @children  // left panel content
}
```

---

## Notification (`ui/components/notification.slint`)

### NeonNotification
```slint
NeonNotification {
    message: "Export complete!";
    accent: Theme.neon-cyan;
    shown: false;
    dismissed => { /* toast closed */ }
}
```

---

## Dropdown (`ui/components/dropdown.slint`)

### NeonDropdown
```slint
NeonDropdown {
    label: "Select action...";
    items: [{ label: "Open", value: "open", disabled: false }];
    selected-index: -1;
    enabled: true;
    selected(idx) => { /* item selected */ }
}
```

---

## Advanced (`ui/components/advanced.slint`)

### NeonAccordion
```slint
NeonAccordion {
    sections: [{ title: "Details", expanded: true }];
    expanded-index: -1;  // -1 = none
}
```

### NeonSteps
```slint
NeonSteps {
    steps: [{ label: "Plan", completed: true, active: false, pending: false }];
    current-step: 1;
}
```

### NeonTabs (standalone)
```slint
NeonTabs {
    tab-titles: ["Tab A", "Tab B"];
    active-tab: 0;
    tab-changed(idx) => { }
    @children  // content for the current tab
}
```

### NeonEmptyState
```slint
NeonEmptyState {
    icon-text: "📊";
    title: "No data yet";
    description: "Import a model.";
    has-action: true;
    action-label: "Import";
    action-clicked => { }
}
```

### NeonSkeleton
```slint
NeonSkeleton {
    skeleton-width: 200px;
    skeleton-height: 14px;
}
```

### NeonProgressCircular
```slint
NeonProgressCircular {
    value: 0.66;
    size: 48px;
    color: Theme.neon-cyan;
}
```

---

## Layout Helpers (`ui/layouts/neon_stack.slint`)

### NeonVStack
```slint
NeonVStack {
    spacing: Theme.sp-4;
    padding: Theme.sp-3;
    alignment: "stretch";
    NeonButton { text: "Item 1"; }
    NeonButton { text: "Item 2"; }
}
```

| Property | Type | Default | Description |
|----------|------|---------|-------------|
| spacing | length | Theme.sp-3 | Gap entre hijos |
| padding | length | 0px | Padding en todos los lados |
| alignment | string | "stretch" | "start", "center", "end", "stretch" |

### NeonHStack
| Property | Type | Default | Description |
|----------|------|---------|-------------|
| justify | string | "start" | "start", "center", "end", "space-between" |

### NeonContainer
```slint
NeonContainer { sm: true; @children }
```
sm=640px, md=768px, lg=1024px, xl=1280px. Propiedades: padding-x, padding-y.

### NeonSpacer
```slint
NeonHStack { IconHome { } NeonSpacer { } IconSettings { } }
```
Se expande como flex: 1.

### NeonDivider
| Property | Type | Default | Description |
|----------|------|---------|-------------|
| orientation | string | "horizontal" | "horizontal", "vertical" |
| thickness | length | 1px | Ancho |
| color | color | Theme.border | Color |

---

## Typography (`ui/components/typography.slint`)
```slint
NeonH1 { text: "Page Title"; }   // 28px bold
NeonH2 { text: "Section"; }       // 22px bold
NeonH3 { text: "Panel"; }         // 18px bold
NeonH4 { text: "Header"; }        // 15px semibold
NeonH5 { text: "Label"; }         // 13px semibold
NeonH6 { text: "LABEL"; }         // 11px semibold + letter-spacing
NeonBody { text: "Body"; }        // 13px regular
NeonBodySmall { text: "Small"; }  // 12px regular
NeonCaption { text: "Hint"; }     // 11px dim
NeonCode { text: "let x;"; }      // 12px mono + bg
NeonMuted { text: "idle"; }       // 12px muted
```
Todos tienen propiedad `text` (string) y `color` (color, default del tema).

---

## Vertical Sidebar with SVG Icons (`ui/components/nav.slint`)

### NeonImageSidebar
Vertical activity-bar with SVG (`@image-url`) icons. Counterpart to `NeonSidebar` for apps that need theme-aware colorization or pixel-perfect SVG rendering instead of unicode glyphs.

```slint
NeonImageSidebar {
    items: [
        { icon: @image-url("icons/layers.svg"), label: "Capas",   badge-count: 0, disabled: false },
        { icon: @image-url("icons/home.svg"),   label: "BIM",     badge-count: 0, disabled: false },
        { icon: @image-url("icons/info.svg"),   label: "Info",    badge-count: 3, disabled: false },
    ];
    selected-index <=> root.active-tab;
    collapsed: true;             // 60px icon-only strip
    icon-size: 18px;
    item-clicked(idx) => { /* dispatch */ }
}
```

| Propiedad | Tipo | Default | Descripción |
|-----------|------|---------|-------------|
| items | [NavItemImage] | [] | Filas del sidebar. |
| selected-index | int | -1 | `in-out` — índice activo. |
| collapsed | bool | false | true → 60px (sólo iconos); false → 240px (icono + label). |
| icon-size | length | 18px | Tamaño del Image. Tuneá según tu SVG. |
| row-height | length | 44px | Min-height por fila. |

| `NavItemImage` | Tipo | Notas |
|---|---|---|
| icon | image | `@image-url("…")` — recomendado SVG con `currentColor` para que `colorize` lo tinte por estado. |
| label | string | Visible solo cuando `collapsed: false`. |
| badge-count | int | > 0 → bubble magenta a la derecha. Cap visual a 99. |
| disabled | bool | Greyed + non-clickable. |

| Callback | Args | Descripción |
|----|----|----|
| item-clicked | int | Índice del item picked. |

**Pattern de colorize**: `Image.colorize` se aplica automáticamente — selected → `Theme.neon-cyan`, idle → `Theme.text-muted`. SVGs single-color con `currentColor` ya respetan esto. Para iconos pre-tintados que no querés que se cambien, no uses este componente — usá un `Image { colorize: transparent }` manual (Slint ignora colorize cuando es transparent).

### NeonSidebar (string-icon counterpart)
Mismo concepto pero con icono unicode/emoji. Útil para menús internos que no necesitan SVG.

```slint
NeonSidebar {
    items: [
        { icon: "🏠", label: "Home",     badge-count: 0, disabled: false },
        { icon: "📊", label: "Analytics", badge-count: 12, disabled: false },
    ];
    selected-index <=> root.tab;
    collapsed: false;
}
```

`NavItem { icon: string, label: string, badge-count: int, disabled: bool }`.

---

## Floating Panel (`ui/components/floating_panel.slint`)

### NeonFloatingPanel
Panel flotante draggable + resizable. Posición y tamaño se exponen como `in-out` para que el host los persista.

```slint
NeonFloatingPanel {
    title: "Capa";
    badge: "12";
    panel-x <=> root.my-panel-x;
    panel-y <=> root.my-panel-y;
    panel-width <=> root.my-panel-width;
    panel-height <=> root.my-panel-height;
    bound-w: root.width;
    bound-h: root.height;
    accent-color: Theme.neon-amber;
    closed => { root.my-panel-visible = false; }
    position-changed => { /* persist x/y */ }
    size-changed => { /* persist w/h */ }
    // Body content
    VerticalLayout { padding: 12px; @children }
}
```

| Propiedad | Tipo | Default | Descripción |
|-----------|------|---------|-------------|
| panel-x / panel-y | length | 80px | Posición en parent. `in-out`. |
| panel-width / panel-height | length | 480 / 360 px | Tamaño live. `in-out`. |
| title | string | "" | Texto del título. |
| badge | string | "" | Contador opcional al lado del título. |
| min-panel-width / min-panel-height | length | 240 / 160 px | Clamp inferior. |
| max-panel-width / max-panel-height | length | 4000px | Clamp superior. |
| bound-w / bound-h | length | 9999px | BBox que contiene el panel. |
| closable | bool | true | Mostrar X. |
| resizable | bool | true | Mostrar grip de resize. |
| accent-color | color | Theme.neon-cyan | Tinte del título y X hover. |

| Callback | Descripción |
|----------|-------------|
| closed | Click en X. |
| position-changed | Tras cada paso de drag. |
| size-changed | Tras cada paso de resize. |

> ⚠️ Nota: usa `min-panel-width` (no `min-width`) — Slint reserva `min-width`/`max-width`/`min-height`/`max-height` en `Rectangle`.

---

## Context Menu (`ui/components/context_menu.slint`)

### NeonContextMenu
Menú flotante contextual con dismiss por click-fuera + Escape.

```slint
NeonContextMenu {
    items: [
        { label: "Editar",     icon: "✎", shortcut: "Ctrl+E", disabled: false, danger: false, separator: false },
        { label: "Duplicar",   icon: "⎘", shortcut: "",       disabled: false, danger: false, separator: false },
        { label: "",           icon: "",  shortcut: "",       disabled: false, danger: false, separator: true  },
        { label: "Eliminar",   icon: "✕", shortcut: "Del",    disabled: false, danger: true,  separator: false },
    ];
    visible-flag <=> root.ctx-visible;
    anchor-x: root.click-x;
    anchor-y: root.click-y;
    bound-w: root.width;
    bound-h: root.height;
    item-selected(idx) => { /* dispatch */ }
}
```

| Propiedad | Tipo | Default | Descripción |
|-----------|------|---------|-------------|
| items | [ContextMenuItem] | [] | Filas del menú. |
| visible-flag | bool | false | Show/hide. `in-out` (lo limpia el dismiss). |
| anchor-x / anchor-y | length | 0 / 0 | Esquina superior-izquierda en parent coords. |
| menu-width | length | 220px | Ancho fijo. |
| bound-w / bound-h | length | 9999px | Para auto-flip cuando se sale. |

| ContextMenuItem | Tipo | Descripción |
|----|----|----|
| label | string | Texto. |
| icon | string | Glyph unicode. Empty oculta la columna. |
| shortcut | string | Hint a la derecha. |
| disabled | bool | Greyed + non-clickable. |
| danger | bool | Texto rojo + hover rojo. |
| separator | bool | Convierte la fila en divisor de 1px. |

| Callback | Args | Descripción |
|----------|------|-------------|
| item-selected | int | Índice del item elegido. |
| dismissed | - | Click-outside o Esc. |

---

## Toast Queue (`ui/components/notification.slint`)

### NeonToastQueue
Stack vertical de toasts; el host maneja la cola de `[ToastEntry]` y el timer de auto-dismiss.

```slint
NeonToastQueue {
    entries: [
        { id: 1, message: "Capa creada", caption: "",         kind: "success" },
        { id: 2, message: "MQTT desconectado", caption: "Reconectando…", kind: "warning" },
    ];
    position: "bottom-right";  // top-left | top-right | bottom-left | bottom-right
    toast-width: 320px;
    dismiss(id) => { /* remove from Vec */ }
}
```

| Propiedad | Tipo | Default | Descripción |
|-----------|------|---------|-------------|
| entries | [ToastEntry] | [] | Lista activa. |
| position | string | "bottom-right" | Esquina del stack. |
| toast-width | length | 320px | Ancho de cada entry. |
| stack-gap | length | 8px | Separación entre entries. |
| edge-margin | length | 16px | Margen al borde del parent. |

| ToastEntry | Tipo |
|----|----|
| id | int — clave estable para dismiss. |
| message | string — headline. |
| caption | string — segunda línea opcional. |
| kind | "info" \| "success" \| "warning" \| "danger". |

| Callback | Args | Descripción |
|----------|------|-------------|
| dismiss | int | Click en X de un toast (id). |

### NeonNotification (legacy)
Toast individual. Mantenido para compatibilidad. Para apps nuevas prefiere `NeonToastQueue`.

---

## Splitter (`ui/components/splitview.slint`)

### NeonSplitterHandle / NeonVSplitterHandle
Primitivas de divider arrastrable. El caller arma el HBox / VBox con sus paneles + un handle entre medio.

```slint
in-out property <length> left-w: 240px;
HorizontalLayout {
    spacing: 0px;
    Rectangle { width: root.left-w; /* left content */ }
    NeonSplitterHandle {
        position <=> root.left-w;
        bound-min: 120px;
        bound-max: parent.width - 200px;
        dragged => { /* persist */ }
    }
    Rectangle { horizontal-stretch: 1; /* right content */ }
}
```

| Propiedad | Tipo | Default | Descripción |
|-----------|------|---------|-------------|
| position | length || `in-out` — el handle muta esto en drag. |
| bound-min | length | 80px | Mínimo permitido. |
| bound-max | length | 4000px | Máximo. Pasa `parent.width - <trailing min>`. |
| thickness | length | 4px | Ancho del divider. |
| idle-color | color | Theme.border | Color en reposo. |
| active-color | color | Theme.neon-cyan | Color en hover/pressed. |

| Callback | Descripción |
|----------|-------------|
| dragged | Tras cada paso de drag exitoso. |

`NeonVSplitterHandle` tiene la misma API pero arrastra eje Y (cursor `row-resize`).

### NeonSplitView (compat)
Envoltorio legacy con un único `@children` slot (panel izquierdo). Mantenido para call-sites existentes — código nuevo debe usar las primitivas de arriba.

---

## Virtual Table (`ui/components/virtual_table.slint`)

### NeonVirtualTable
Tabla con virtualización vía `ListView`. Drop-in replacement para `NeonDataTable` cuando hay >200 filas.

```slint
NeonVirtualTable {
    columns: ["Id", "Nombre", "Tipo", "Área m²"];
    column-widths: [80px, 200px, 120px, 100px];   // opcional; vacío ⇒ stretch igual
    rows: model.rows;     // [RowEntry { cells: [string] }]
    selected-row <=> model.selected-row;
    sort-column: 0;
    sort-asc: true;
    row-height: 32px;
    header-clicked(c) => { /* re-sort */ }
    row-clicked(i)    => { /* select */ }
    row-double-clicked(i) => { /* drill-in */ }
    empty-title: "Sin features";
    empty-hint: "Importá un GeoJSON para verlos acá.";
}
```

| Propiedad | Tipo | Default | Descripción |
|-----------|------|---------|-------------|
| columns | [string] | [] | Headers. |
| column-widths | [length] | [] | Anchos explícitos. Vacío ⇒ stretch. |
| rows | [RowEntry] | [] | Datos (reusa el struct de `list.slint`). |
| selected-row | int | -1 | `in-out`. |
| sort-column / sort-asc | int / bool | -1 / true | Indicador visual; el host hace el sort. |
| row-height / header-height | length | 32 / 36 px | Altura fija (ListView las usa para scroll math). |
| empty-title / empty-hint | string | "Sin datos" / "Filtrá o cargá registros…" | Empty state. |

| Callback | Args | Descripción |
|----------|------|-------------|
| header-clicked | int | Header column index. |
| row-clicked | int | Row index. |
| row-double-clicked | int | Para inline-edit / drill-in. |

---

## Form Validation (`ui/components/form_validation.slint`)

Wrappers visuales — la lógica de validación vive en Rust (Slint no puede modelar validators).

### NeonFormField
Wrap para un input + label + error/help.
```slint
NeonFormField {
    label: "Email";
    help: "Te enviaremos confirmación.";
    error: state.email-error;   // host setea string vacío si OK
    required: true;
    touched: state.email-touched;
    NeonInput { text <=> state.email; ... }
}
```

| Propiedad | Tipo | Default |
|----|----|----|
| label | string | "" |
| help | string | "" |
| error | string | "" — empty = no error |
| required | bool | false (muestra `*` rojo) |
| touched | bool | false (errores supresos hasta primer focus-out) |

### NeonFormGroup
Sección con título + descripción + `@children`.

| Propiedad | Tipo |
|----|----|
| title | string |
| description | string |

### NeonFormSummary
Banner rojo con bullets. Visible solo cuando `errors.length > 0`.
```slint
NeonFormSummary {
    intro: "Revisá los siguientes campos antes de continuar:";
    errors: [
        { field: "Email",    message: "Formato inválido" },
        { field: "Password", message: "Mínimo 8 caracteres" },
    ];
}
```
`FormErrorRow { field: string, message: string }`.

### NeonFormSubmit
Botón gateado por `is-valid` + busy spinner.

| Propiedad | Tipo | Default | Descripción |
|----|----|----|----|
| label | string | "Guardar" | Texto idle. |
| busy-label | string | "Guardando…" | Texto durante el async. |
| is-valid | bool | true | Habilitación. |
| busy | bool | false | Spinner overlay + disabled. |
| variant | string | "primary" | "primary" \| "danger" \| "success". |

Callback `submitted` — se dispara solo cuando `is-valid && !busy`.

---

## Color Picker (`ui/components/color-picker.slint`)

### NeonColorPicker — outputs ahora legibles desde Rust
HSV interno + outputs de RGB/hex que el host puede leer directamente.

```slint
NeonColorPicker {
    hue:  state.h; sat: state.s; val: state.v;  // in-out
    changed   => { state.live = self.hex; }
    committed => { /* persist on pointer-up */ }
}
// Rust:
let rgb = (picker.get_red(), picker.get_green(), picker.get_blue());
let hex = picker.get_hex();
```

| Propiedad | Tipo | Default | Descripción |
|----|----|----|----|
| hue | float | 180.0 | 0..360 (HSV). |
| sat / val | float | 0.6 / 0.7 | 0..1. |
| **out** actual-color | color || Valor live. |
| **out** red / green / blue | int || 0..255 redondeado. |
| **out** hex | string || "#rrggbb" lowercase. |
| apply-rgb | bool | false | Caller flip → reverse-computa HSV. |
| set-from-rgb-r / g / b | float | 0..1 | Inputs para reverse-RGB. |

| Callback | Descripción |
|----|----|
| changed | Cada step del drag. |
| committed | Pointer-up — usa este para persistir. |

---

## Charts Extra (`ui/components/charts_extra.slint`)

### NeonSparkline
Línea inline sin ejes (KPI cards / status bar).
```slint
NeonSparkline {
    values: [12, 18, 25, 22, 30, 28, 35];
    max-val: 50;
    line-color: Theme.neon-cyan;
    show-last-dot: true;
}
```

### NeonAreaChart
Línea + fill con grid.
```slint
NeonAreaChart {
    values: [...]; labels: [...];
    line-color: Theme.neon-purple;
    fill-color: Theme.glow-purple;
    chart-height: 160px;
    max-val: 100;
}
```

### NeonScatterChart
Dots x/y descorrelacionados.
```slint
NeonScatterChart {
    points: [{ x: 25.0, y: 80.0, accent: Theme.neon-cyan }, ...];
    max-x: 100; max-y: 100;
    chart-height: 200px;
    show-grid: true;
}
```
`ScatterPoint { x: float, y: float, accent: color }`. `accent.alpha == 0` ⇒ usa `dot-color`.

### NeonPieChart
Slices via `Path`. Caller pre-computa `start-fraction` / `end-fraction` (Slint no puede sumar dentro de `for`).
```slint
NeonPieChart {
    slices: [
        { start-fraction: 0.0, end-fraction: 0.4, accent: Theme.neon-cyan,    label: "A" },
        { start-fraction: 0.4, end-fraction: 0.7, accent: Theme.neon-magenta, label: "B" },
        { start-fraction: 0.7, end-fraction: 1.0, accent: Theme.neon-green,   label: "C" },
    ];
    chart-size: 200px;
    donut-fraction: 0.0;    // 0 = pie sólido; 0.5 = donut; 0.7 = anillo fino
}
```
`PieSlice { start-fraction: float, end-fraction: float, accent: color, label: string }`.

### NeonStackedBar
"Pie linear" — barra horizontal con segmentos. Mismo input que NeonPieChart.
```slint
NeonStackedBar {
    slices: [...];
    bar-height: 20px;
    radius: 10px;
    show-legend: true;
}
```

---

## Combobox (`ui/components/combobox.slint`)

### NeonCombobox
Select con filtro inline (case-insensitive `contains`).
```slint
NeonCombobox {
    label: "Tipo IFC";
    placeholder: "Seleccionar…";
    options: [
        { label: "IfcWall", value: "wall", disabled: false },
        { label: "IfcSlab", value: "slab", disabled: false },
        ...
    ];
    selected-index <=> state.selected;
    allow-clear: true;
    selected(idx) => { /* idx en el array original, no el filtrado */ }
}
```

| Propiedad | Tipo | Default | Descripción |
|----|----|----|----|
| label | string | "" | Etiqueta superior. |
| placeholder | string | "Buscar…" | Display cuando no hay selección. |
| options | [SelectOption] | [] | Reusa el struct de `form.slint`. |
| selected-index | int | -1 | Índice en el array ORIGINAL. `in-out`. |
| filter-text | string | "" | Texto del filtro live. `in-out`. |
| is-open | bool | false | Estado del popup. `in-out`. |
| max-popup-height | length | 240px | Altura tope; el contenido scrollea adentro. |
| allow-clear | bool | true | Mostrar "⊘ Limpiar selección" cuando hay valor. |

| Callback | Args | Descripción |
|----|----|----|
| selected | int | Índice original. -1 cuando se hace clear. |
| opened / dismissed | - | Lifecycle del popup. |

---

## Date Range Picker (`ui/components/date_range_picker.slint`)

### NeonDateRangePicker
Calendar grid 6×7 con range highlight. Click 1 = start, click 2 = end. Clic 3 = reinicia.

```slint
NeonDateRangePicker {
    label: "Período";
    view-year:  2026; view-month:  5;  // mes mostrado (in-out)
    start-year: -1;   start-month: -1; start-day: -1;  // -1 = unset
    end-year:   -1;   end-month:   -1; end-day:   -1;
    range-changed => { if (self.is-valid) { /* persist */ } }
}
```

| Propiedad | Tipo | Default | Descripción |
|----|----|----|----|
| view-year / view-month | int | 2026 / 5 | Mes mostrado (`in-out`, navegable con ← →). |
| start-year / start-month / start-day | int | -1 | Output (-1 = unset). |
| end-year / end-month / end-day | int | -1 | Output. |
| label | string | "" | Etiqueta superior. |
| enabled | bool | true | Estado interactivo. |
| **out** is-valid | bool || true cuando ambos extremos seteados y start ≤ end. |

`range-changed` se dispara tras cada click que muta el rango.

---

## Skeleton (`ui/components/skeleton.slint`)

### NeonSkeleton
Bloque shimmer animado. Variants: `rect` / `line` / `circle`.

```slint
NeonSkeleton {
    variant: "rect";        // "rect" | "line" | "circle"
    skeleton-width: 200px;
    skeleton-height: 16px;
    circle-size: 40px;       // ignorado salvo en variant="circle"
    animated: true;
}
```

### NeonSkeletonText
Stack de N líneas con la última al 75 % de ancho (mimicker de paragraph).
```slint
NeonSkeletonText { lines: 3; line-width: 280px; line-spacing: 8px; }
```

### NeonSkeletonGate
Wrapper conectado a estado: muestra placeholder mientras `loading`, sino renderea `@children`.
```slint
NeonSkeletonGate {
    loading: state.loading;
    placeholder-kind: "card";   // "card" | "list" | "metric" | (otro = paragraph)
    placeholder-width: 320px;
    // Real content
    NeonCard { title: "Resumen"; ... }
}
```

> Nota: `@children` está siempre montado con `visible: !loading` para que no pierda estado (focus, scroll) en cada flip de `loading`.

---