@ponchia/ui 0.6.0 → 0.6.4

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 (162) hide show
  1. package/CHANGELOG.md +82 -4
  2. package/README.md +1 -1
  3. package/annotations/index.d.ts.map +1 -1
  4. package/annotations/index.js +36 -33
  5. package/behaviors/carousel.d.ts +28 -0
  6. package/behaviors/carousel.d.ts.map +1 -0
  7. package/behaviors/carousel.js +3 -0
  8. package/behaviors/combobox.d.ts +40 -0
  9. package/behaviors/combobox.d.ts.map +1 -0
  10. package/behaviors/combobox.js +71 -20
  11. package/behaviors/command.d.ts +41 -0
  12. package/behaviors/command.d.ts.map +1 -0
  13. package/behaviors/command.js +9 -0
  14. package/behaviors/connectors.d.ts +17 -0
  15. package/behaviors/connectors.d.ts.map +1 -0
  16. package/behaviors/connectors.js +3 -0
  17. package/behaviors/crosshair.d.ts +42 -0
  18. package/behaviors/crosshair.d.ts.map +1 -0
  19. package/behaviors/crosshair.js +19 -1
  20. package/behaviors/dialog.d.ts +20 -0
  21. package/behaviors/dialog.d.ts.map +1 -0
  22. package/behaviors/dialog.js +3 -0
  23. package/behaviors/disclosure.d.ts +10 -0
  24. package/behaviors/disclosure.d.ts.map +1 -0
  25. package/behaviors/disclosure.js +3 -0
  26. package/behaviors/dismissible.d.ts +10 -0
  27. package/behaviors/dismissible.d.ts.map +1 -0
  28. package/behaviors/dismissible.js +3 -0
  29. package/behaviors/forms.d.ts +27 -0
  30. package/behaviors/forms.d.ts.map +1 -0
  31. package/behaviors/forms.js +18 -5
  32. package/behaviors/glyph.d.ts +21 -0
  33. package/behaviors/glyph.d.ts.map +1 -0
  34. package/behaviors/glyph.js +82 -4
  35. package/behaviors/index.d.ts +31 -237
  36. package/behaviors/index.d.ts.map +1 -0
  37. package/behaviors/index.js +17 -0
  38. package/behaviors/inert.d.ts +20 -0
  39. package/behaviors/inert.d.ts.map +1 -0
  40. package/behaviors/inert.js +46 -0
  41. package/behaviors/internal.d.ts +25 -0
  42. package/behaviors/internal.d.ts.map +1 -0
  43. package/behaviors/internal.js +30 -1
  44. package/behaviors/legend.d.ts +35 -0
  45. package/behaviors/legend.d.ts.map +1 -0
  46. package/behaviors/legend.js +9 -0
  47. package/behaviors/menu.d.ts +16 -0
  48. package/behaviors/menu.d.ts.map +1 -0
  49. package/behaviors/menu.js +3 -0
  50. package/behaviors/modal.d.ts +41 -0
  51. package/behaviors/modal.d.ts.map +1 -0
  52. package/behaviors/modal.js +124 -0
  53. package/behaviors/popover.d.ts +28 -0
  54. package/behaviors/popover.d.ts.map +1 -0
  55. package/behaviors/popover.js +17 -17
  56. package/behaviors/spotlight.d.ts +17 -0
  57. package/behaviors/spotlight.d.ts.map +1 -0
  58. package/behaviors/spotlight.js +3 -0
  59. package/behaviors/table.d.ts +36 -0
  60. package/behaviors/table.d.ts.map +1 -0
  61. package/behaviors/table.js +48 -8
  62. package/behaviors/tabs.d.ts +20 -0
  63. package/behaviors/tabs.d.ts.map +1 -0
  64. package/behaviors/tabs.js +3 -0
  65. package/behaviors/theme.d.ts +54 -0
  66. package/behaviors/theme.d.ts.map +1 -0
  67. package/behaviors/theme.js +17 -0
  68. package/behaviors/toast.d.ts +49 -0
  69. package/behaviors/toast.d.ts.map +1 -0
  70. package/behaviors/toast.js +34 -2
  71. package/classes/classes.json +747 -15
  72. package/classes/index.d.ts +118 -3
  73. package/classes/index.js +264 -66
  74. package/connectors/index.d.ts +12 -0
  75. package/connectors/index.d.ts.map +1 -1
  76. package/connectors/index.js +23 -2
  77. package/css/app.css +26 -0
  78. package/css/bullet.css +108 -0
  79. package/css/code.css +98 -0
  80. package/css/content.css +15 -2
  81. package/css/crosshair.css +7 -7
  82. package/css/diff.css +153 -0
  83. package/css/disclosure.css +18 -4
  84. package/css/dots.css +246 -9
  85. package/css/feedback.css +39 -7
  86. package/css/forms.css +71 -3
  87. package/css/legend.css +5 -2
  88. package/css/motion.css +79 -14
  89. package/css/overlay.css +59 -2
  90. package/css/primitives.css +67 -8
  91. package/css/report.css +43 -4
  92. package/css/sidenote.css +67 -0
  93. package/css/skins.css +9 -0
  94. package/css/spark.css +76 -0
  95. package/css/table.css +16 -3
  96. package/css/term.css +110 -0
  97. package/css/textref.css +63 -0
  98. package/css/toc.css +91 -0
  99. package/css/tokens.css +14 -1
  100. package/css/tree.css +134 -0
  101. package/dist/bronto.css +1 -1
  102. package/dist/css/analytical.css +1 -1
  103. package/dist/css/app.css +1 -1
  104. package/dist/css/bullet.css +1 -0
  105. package/dist/css/code.css +1 -0
  106. package/dist/css/content.css +1 -1
  107. package/dist/css/crosshair.css +1 -1
  108. package/dist/css/diff.css +1 -0
  109. package/dist/css/disclosure.css +1 -1
  110. package/dist/css/dots.css +1 -1
  111. package/dist/css/feedback.css +1 -1
  112. package/dist/css/forms.css +1 -1
  113. package/dist/css/legend.css +1 -1
  114. package/dist/css/motion.css +1 -1
  115. package/dist/css/overlay.css +1 -1
  116. package/dist/css/primitives.css +1 -1
  117. package/dist/css/report.css +1 -1
  118. package/dist/css/sidenote.css +1 -0
  119. package/dist/css/skins.css +1 -1
  120. package/dist/css/spark.css +1 -0
  121. package/dist/css/table.css +1 -1
  122. package/dist/css/term.css +1 -0
  123. package/dist/css/textref.css +1 -0
  124. package/dist/css/toc.css +1 -0
  125. package/dist/css/tokens.css +1 -1
  126. package/dist/css/tree.css +1 -0
  127. package/docs/annotations.md +39 -0
  128. package/docs/architecture.md +2 -3
  129. package/docs/bullet.md +78 -0
  130. package/docs/code.md +76 -0
  131. package/docs/d2.md +4 -3
  132. package/docs/diff.md +146 -0
  133. package/docs/dots.md +146 -0
  134. package/docs/glyphs.md +114 -0
  135. package/docs/legends.md +8 -4
  136. package/docs/mermaid.md +21 -4
  137. package/docs/reference.md +168 -8
  138. package/docs/reporting.md +49 -17
  139. package/docs/sidenote.md +64 -0
  140. package/docs/spark.md +78 -0
  141. package/docs/stability.md +1 -0
  142. package/docs/term.md +81 -0
  143. package/docs/textref.md +78 -0
  144. package/docs/theming.md +44 -5
  145. package/docs/toc.md +83 -0
  146. package/docs/tree.md +74 -0
  147. package/docs/usage.md +264 -23
  148. package/docs/vega.md +22 -3
  149. package/glyphs/glyphs.d.ts +61 -0
  150. package/glyphs/glyphs.js +600 -31
  151. package/llms.txt +169 -15
  152. package/package.json +51 -7
  153. package/qwik/index.d.ts +4 -2
  154. package/qwik/index.d.ts.map +1 -1
  155. package/qwik/index.js +10 -0
  156. package/react/index.d.ts +4 -2
  157. package/react/index.d.ts.map +1 -1
  158. package/react/index.js +6 -0
  159. package/solid/index.d.ts +6 -2
  160. package/solid/index.d.ts.map +1 -1
  161. package/solid/index.js +6 -0
  162. package/tokens/skins.js +22 -9
package/docs/reference.md CHANGED
@@ -9,7 +9,7 @@ rendering of every class is the kitchen-sink demo:
9
9
  **<https://ponchia.github.io/bronto-ui/>**. Theming knobs and the token
10
10
  contract: [docs/theming.md](theming.md).
11
11
 
12
- - 477 classes across 149 component groups
12
+ - 540 classes across 167 component groups
13
13
  - Import the typed registry: `import { cls, ui, cx } from '@ponchia/ui/classes'`
14
14
  - Validate markup as data (no JS/TS): `@ponchia/ui/classes.json` — the same
15
15
  vocabulary as language-neutral JSON (`groups`, `classes`, `states`,
@@ -31,13 +31,19 @@ each one matches a real selector in the stylesheet.
31
31
  | `cls.accordionItem` | `ui-accordion__item` | part |
32
32
  | `cls.accordionSummary` | `ui-accordion__summary` | part |
33
33
 
34
+ ### `.ui-activity`
35
+
36
+ | Registry key | Class | Kind |
37
+ | --- | --- | --- |
38
+ | `cls.activity` | `ui-activity` | base |
39
+
34
40
  ### `.ui-alert`
35
41
 
36
42
  | Registry key | Class | Kind |
37
43
  | --- | --- | --- |
38
44
  | `cls.alert` | `ui-alert` | base |
39
45
  | `cls.alertBody` | `ui-alert__body` | part |
40
- | `cls.alertDismiss` | `ui-alert__dismiss` | part |
46
+ | `cls.alertClose` | `ui-alert__close` | part |
41
47
  | `cls.alertTitle` | `ui-alert__title` | part |
42
48
  | `cls.alertAccent` | `ui-alert--accent` | modifier |
43
49
  | `cls.alertDanger` | `ui-alert--danger` | modifier |
@@ -245,6 +251,18 @@ each one matches a real selector in the stylesheet.
245
251
  | --- | --- | --- |
246
252
  | `cls.breakBefore` | `ui-break-before` | base |
247
253
 
254
+ ### `.ui-bullet`
255
+
256
+ | Registry key | Class | Kind |
257
+ | --- | --- | --- |
258
+ | `cls.bullet` | `ui-bullet` | base |
259
+ | `cls.bulletLabel` | `ui-bullet__label` | part |
260
+ | `cls.bulletMeasure` | `ui-bullet__measure` | part |
261
+ | `cls.bulletMeasureAccent` | `ui-bullet__measure--accent` | modifier |
262
+ | `cls.bulletMeasureNeg` | `ui-bullet__measure--neg` | modifier |
263
+ | `cls.bulletMeasurePos` | `ui-bullet__measure--pos` | modifier |
264
+ | `cls.bulletTarget` | `ui-bullet__target` | part |
265
+
248
266
  ### `.ui-button`
249
267
 
250
268
  | Registry key | Class | Kind |
@@ -319,6 +337,19 @@ each one matches a real selector in the stylesheet.
319
337
  | `cls.cluster` | `ui-cluster` | base |
320
338
  | `cls.clusterBetween` | `ui-cluster--between` | modifier |
321
339
 
340
+ ### `.ui-code`
341
+
342
+ | Registry key | Class | Kind |
343
+ | --- | --- | --- |
344
+ | `cls.code` | `ui-code` | base |
345
+ | `cls.codeBody` | `ui-code__body` | part |
346
+ | `cls.codeHead` | `ui-code__head` | part |
347
+ | `cls.codeLine` | `ui-code__line` | part |
348
+ | `cls.codeLineAdd` | `ui-code__line--add` | modifier |
349
+ | `cls.codeLineHl` | `ui-code__line--hl` | modifier |
350
+ | `cls.codeLineRemove` | `ui-code__line--remove` | modifier |
351
+ | `cls.codeNumbered` | `ui-code--numbered` | modifier |
352
+
322
353
  ### `.ui-combobox`
323
354
 
324
355
  | Registry key | Class | Kind |
@@ -392,6 +423,12 @@ each one matches a real selector in the stylesheet.
392
423
  | `cls.crosshairLineY` | `ui-crosshair__line--y` | modifier |
393
424
  | `cls.crosshairMuted` | `ui-crosshair--muted` | modifier |
394
425
 
426
+ ### `.ui-def`
427
+
428
+ | Registry key | Class | Kind |
429
+ | --- | --- | --- |
430
+ | `cls.def` | `ui-def` | base |
431
+
395
432
  ### `.ui-delta`
396
433
 
397
434
  | Registry key | Class | Kind |
@@ -402,6 +439,22 @@ each one matches a real selector in the stylesheet.
402
439
  | `cls.deltaInvert` | `ui-delta--invert` | modifier |
403
440
  | `cls.deltaUp` | `ui-delta--up` | modifier |
404
441
 
442
+ ### `.ui-diff`
443
+
444
+ | Registry key | Class | Kind |
445
+ | --- | --- | --- |
446
+ | `cls.diff` | `ui-diff` | base |
447
+ | `cls.diffCode` | `ui-diff__code` | part |
448
+ | `cls.diffHead` | `ui-diff__head` | part |
449
+ | `cls.diffHunk` | `ui-diff__hunk` | part |
450
+ | `cls.diffLn` | `ui-diff__ln` | part |
451
+ | `cls.diffPane` | `ui-diff__pane` | part |
452
+ | `cls.diffRow` | `ui-diff__row` | part |
453
+ | `cls.diffRowAdd` | `ui-diff__row--add` | modifier |
454
+ | `cls.diffRowContext` | `ui-diff__row--context` | modifier |
455
+ | `cls.diffRowRemove` | `ui-diff__row--remove` | modifier |
456
+ | `cls.diffSplit` | `ui-diff--split` | modifier |
457
+
405
458
  ### `.ui-display`
406
459
 
407
460
  | Registry key | Class | Kind |
@@ -439,6 +492,18 @@ each one matches a real selector in the stylesheet.
439
492
  | --- | --- | --- |
440
493
  | `cls.dotfield` | `ui-dotfield` | base |
441
494
 
495
+ ### `.ui-dotfit`
496
+
497
+ | Registry key | Class | Kind |
498
+ | --- | --- | --- |
499
+ | `cls.dotfit` | `ui-dotfit` | base |
500
+
501
+ ### `.ui-dotgauge`
502
+
503
+ | Registry key | Class | Kind |
504
+ | --- | --- | --- |
505
+ | `cls.dotgauge` | `ui-dotgauge` | base |
506
+
442
507
  ### `.ui-dotgrid`
443
508
 
444
509
  | Registry key | Class | Kind |
@@ -519,12 +584,26 @@ each one matches a real selector in the stylesheet.
519
584
  | `cls.generated` | `ui-generated` | base |
520
585
  | `cls.generatedLabel` | `ui-generated__label` | part |
521
586
 
587
+ ### `.ui-glossary`
588
+
589
+ | Registry key | Class | Kind |
590
+ | --- | --- | --- |
591
+ | `cls.glossary` | `ui-glossary` | base |
592
+ | `cls.glossaryDef` | `ui-glossary__def` | part |
593
+ | `cls.glossaryTerm` | `ui-glossary__term` | part |
594
+
522
595
  ### `.ui-grid`
523
596
 
524
597
  | Registry key | Class | Kind |
525
598
  | --- | --- | --- |
526
599
  | `cls.grid` | `ui-grid` | base |
527
600
 
601
+ ### `.ui-halftone`
602
+
603
+ | Registry key | Class | Kind |
604
+ | --- | --- | --- |
605
+ | `cls.halftone` | `ui-halftone` | base |
606
+
528
607
  ### `.ui-hint`
529
608
 
530
609
  | Registry key | Class | Kind |
@@ -624,6 +703,14 @@ each one matches a real selector in the stylesheet.
624
703
  | `cls.legendVertical` | `ui-legend--vertical` | modifier |
625
704
  | `cls.legendWithValues` | `ui-legend--with-values` | modifier |
626
705
 
706
+ ### `.ui-level`
707
+
708
+ | Registry key | Class | Kind |
709
+ | --- | --- | --- |
710
+ | `cls.level` | `ui-level` | base |
711
+ | `cls.levelDanger` | `ui-level--danger` | modifier |
712
+ | `cls.levelWarn` | `ui-level--warn` | modifier |
713
+
627
714
  ### `.ui-lightbox`
628
715
 
629
716
  | Registry key | Class | Kind |
@@ -639,6 +726,12 @@ each one matches a real selector in the stylesheet.
639
726
  | `cls.linkArrow` | `ui-link--arrow` | modifier |
640
727
  | `cls.linkCta` | `ui-link--cta` | modifier |
641
728
 
729
+ ### `.ui-marginnote`
730
+
731
+ | Registry key | Class | Kind |
732
+ | --- | --- | --- |
733
+ | `cls.marginnote` | `ui-marginnote` | base |
734
+
642
735
  ### `.ui-mark`
643
736
 
644
737
  | Registry key | Class | Kind |
@@ -689,6 +782,9 @@ each one matches a real selector in the stylesheet.
689
782
  | --- | --- | --- |
690
783
  | `cls.meter` | `ui-meter` | base |
691
784
  | `cls.meterFill` | `ui-meter__fill` | part |
785
+ | `cls.meterLabel` | `ui-meter__label` | part |
786
+ | `cls.meterRow` | `ui-meter__row` | part |
787
+ | `cls.meterValue` | `ui-meter__value` | part |
692
788
  | `cls.meterAccent` | `ui-meter--accent` | modifier |
693
789
  | `cls.meterDanger` | `ui-meter--danger` | modifier |
694
790
  | `cls.meterInfo` | `ui-meter--info` | modifier |
@@ -829,6 +925,7 @@ each one matches a real selector in the stylesheet.
829
925
  | Registry key | Class | Kind |
830
926
  | --- | --- | --- |
831
927
  | `cls.readout` | `ui-readout` | base |
928
+ | `cls.readoutSpacer` | `ui-readout__spacer` | part |
832
929
 
833
930
  ### `.ui-reasoning`
834
931
 
@@ -936,6 +1033,13 @@ each one matches a real selector in the stylesheet.
936
1033
  | --- | --- | --- |
937
1034
  | `cls.sidebar` | `ui-sidebar` | base |
938
1035
 
1036
+ ### `.ui-sidenote`
1037
+
1038
+ | Registry key | Class | Kind |
1039
+ | --- | --- | --- |
1040
+ | `cls.sidenote` | `ui-sidenote` | base |
1041
+ | `cls.sidenoteRef` | `ui-sidenote__ref` | part |
1042
+
939
1043
  ### `.ui-sitefooter`
940
1044
 
941
1045
  | Registry key | Class | Kind |
@@ -995,6 +1099,17 @@ each one matches a real selector in the stylesheet.
995
1099
  | `cls.sourceList` | `ui-source-list` | base |
996
1100
  | `cls.sourceListItem` | `ui-source-list__item` | part |
997
1101
 
1102
+ ### `.ui-spark`
1103
+
1104
+ | Registry key | Class | Kind |
1105
+ | --- | --- | --- |
1106
+ | `cls.spark` | `ui-spark` | base |
1107
+ | `cls.sparkBar` | `ui-spark__bar` | part |
1108
+ | `cls.sparkBarAccent` | `ui-spark__bar--accent` | modifier |
1109
+ | `cls.sparkBarNeg` | `ui-spark__bar--neg` | modifier |
1110
+ | `cls.sparkBarPos` | `ui-spark__bar--pos` | modifier |
1111
+ | `cls.sparkDots` | `ui-spark--dots` | modifier |
1112
+
998
1113
  ### `.ui-spinner`
999
1114
 
1000
1115
  | Registry key | Class | Kind |
@@ -1123,10 +1238,10 @@ each one matches a real selector in the stylesheet.
1123
1238
  | `cls.tableSelect` | `ui-table__select` | part |
1124
1239
  | `cls.tableSort` | `ui-table__sort` | part |
1125
1240
  | `cls.tableToolbar` | `ui-table__toolbar` | part |
1241
+ | `cls.tableBreakAnywhere` | `ui-table--break-anywhere` | modifier |
1126
1242
  | `cls.tableComfortable` | `ui-table--comfortable` | modifier |
1127
1243
  | `cls.tableDense` | `ui-table--dense` | modifier |
1128
1244
  | `cls.tableLined` | `ui-table--lined` | modifier |
1129
- | `cls.tableLoading` | `ui-table--loading` | modifier |
1130
1245
  | `cls.tableSelectable` | `ui-table--selectable` | modifier |
1131
1246
 
1132
1247
  ### `.ui-table-wrap`
@@ -1134,6 +1249,7 @@ each one matches a real selector in the stylesheet.
1134
1249
  | Registry key | Class | Kind |
1135
1250
  | --- | --- | --- |
1136
1251
  | `cls.tableWrap` | `ui-table-wrap` | base |
1252
+ | `cls.tableLoading` | `ui-table-wrap--loading` | modifier |
1137
1253
 
1138
1254
  ### `.ui-tabs`
1139
1255
 
@@ -1156,12 +1272,24 @@ each one matches a real selector in the stylesheet.
1156
1272
  | --- | --- | --- |
1157
1273
  | `cls.tags` | `ui-tags` | base |
1158
1274
 
1275
+ ### `.ui-term`
1276
+
1277
+ | Registry key | Class | Kind |
1278
+ | --- | --- | --- |
1279
+ | `cls.term` | `ui-term` | base |
1280
+
1159
1281
  ### `.ui-textarea`
1160
1282
 
1161
1283
  | Registry key | Class | Kind |
1162
1284
  | --- | --- | --- |
1163
1285
  | `cls.textarea` | `ui-textarea` | base |
1164
1286
 
1287
+ ### `.ui-textref`
1288
+
1289
+ | Registry key | Class | Kind |
1290
+ | --- | --- | --- |
1291
+ | `cls.textref` | `ui-textref` | base |
1292
+
1165
1293
  ### `.ui-themetoggle`
1166
1294
 
1167
1295
  | Registry key | Class | Kind |
@@ -1200,6 +1328,15 @@ each one matches a real selector in the stylesheet.
1200
1328
  | `cls.toastStack` | `ui-toast-stack` | base |
1201
1329
  | `cls.toastStackAssertive` | `ui-toast-stack--assertive` | modifier |
1202
1330
 
1331
+ ### `.ui-toc`
1332
+
1333
+ | Registry key | Class | Kind |
1334
+ | --- | --- | --- |
1335
+ | `cls.toc` | `ui-toc` | base |
1336
+ | `cls.tocLink` | `ui-toc__link` | part |
1337
+ | `cls.tocList` | `ui-toc__list` | part |
1338
+ | `cls.tocTitle` | `ui-toc__title` | part |
1339
+
1203
1340
  ### `.ui-tool-call`
1204
1341
 
1205
1342
  | Registry key | Class | Kind |
@@ -1232,6 +1369,16 @@ each one matches a real selector in the stylesheet.
1232
1369
  | `cls.tourNoteStep` | `ui-tour-note__step` | part |
1233
1370
  | `cls.tourNoteTitle` | `ui-tour-note__title` | part |
1234
1371
 
1372
+ ### `.ui-tree`
1373
+
1374
+ | Registry key | Class | Kind |
1375
+ | --- | --- | --- |
1376
+ | `cls.tree` | `ui-tree` | base |
1377
+ | `cls.treeBranch` | `ui-tree__branch` | part |
1378
+ | `cls.treeLabel` | `ui-tree__label` | part |
1379
+ | `cls.treeLeaf` | `ui-tree__leaf` | part |
1380
+ | `cls.treeSummary` | `ui-tree__summary` | part |
1381
+
1235
1382
  ### `.ui-visually-hidden`
1236
1383
 
1237
1384
  | Registry key | Class | Kind |
@@ -1244,6 +1391,12 @@ each one matches a real selector in the stylesheet.
1244
1391
  | --- | --- | --- |
1245
1392
  | `cls.vt` | `ui-vt` | base |
1246
1393
 
1394
+ ### `.ui-waffle`
1395
+
1396
+ | Registry key | Class | Kind |
1397
+ | --- | --- | --- |
1398
+ | `cls.waffle` | `ui-waffle` | base |
1399
+
1247
1400
  ## Table-local state classes
1248
1401
 
1249
1402
  Not in `cls` by design — these are plain `is-*` state hooks scoped to
@@ -1283,8 +1436,11 @@ works in any framework without a binding layer:
1283
1436
  - **Button loading** — set `aria-busy="true"` (and `disabled`) on
1284
1437
  `ui-button`; the leading spinner is injected by CSS with no extra
1285
1438
  markup or class. `ui-button--sm`/`--lg` size it.
1286
- - **Badge tone** — `ui.badge({ tone })` emits the framework tone
1287
- (`accent|success|warning|danger|info|muted`). Mapping an app's own variant
1439
+ - **Badge tone** — `ui.badge({ tone })` emits the badge tone
1440
+ (`accent|success|warning|danger|info|muted`). The set is badge-specific, not a
1441
+ universal vocabulary — `muted` is a badge/neutral tone, absent from the status
1442
+ families (`ui-alert`/`ui-toast`/`ui-meter`/`ui-dot`); the builders warn on an
1443
+ out-of-set tone (see usage.md). Mapping an app's own variant
1288
1444
  vocabulary onto a tone is application logic, not a framework class.
1289
1445
  - **Modal** — native `<dialog>` gets backdrop + top-layer + focus-trap
1290
1446
  free. For a controlled/portal modal, add `is-open`
@@ -1302,7 +1458,9 @@ works in any framework without a binding layer:
1302
1458
  back to the field's `.ui-hint`, restoring the help text when valid again); a
1303
1459
  `[data-bronto-error-summary]` (`.ui-error-summary`) block. The combobox
1304
1460
  reads `[data-bronto-combobox]` + per-option `data-value` and emits
1305
- `bronto:change` (`{ detail: { value } }`) on selection; the interactive
1461
+ `bronto:change` (`{ detail: { value, label } }`) on selection — `label` is the
1462
+ chosen option's text, so a live region can announce it without re-reading the DOM;
1463
+ the interactive
1306
1464
  legend emits `bronto:legend:toggle` (`{ detail: { series, active } }`).
1307
1465
  - **Status indicator** — `ui-status` carries no dot of its own: compose it with
1308
1466
  a `.ui-dot` child + a text label, e.g.
@@ -1321,8 +1479,10 @@ works in any framework without a binding layer:
1321
1479
  lights a segment with `<i class="is-on">`. A childless
1322
1480
  `<span class="ui-dotspinner">` renders nothing.
1323
1481
  - **`ui-caret` is a typing cursor**, not a dropdown chevron — a blinking block
1324
- caret (driven by `initDotGlyph`/`uiBlink`). For a disclosure/affordance
1325
- arrow use `ui-link--arrow` (`ui.link({ arrow: true })`).
1482
+ caret. It is **pure CSS** (a `uiBlink` keyframe on `::after`); it needs no
1483
+ behavior do NOT call `initDotGlyph` to animate it — and it is decorative, so
1484
+ keep it out of the a11y tree (`aria-hidden`). For a disclosure/affordance arrow
1485
+ use `ui-link--arrow` (`ui.link({ arrow: true })`).
1326
1486
 
1327
1487
  ## Tokens
1328
1488
 
package/docs/reporting.md CHANGED
@@ -37,11 +37,11 @@ No install? Link the same files from a CDN. Pin the version — pre-1.0, breakin
37
37
  changes ship in the minor (see [stability.md](./stability.md)):
38
38
 
39
39
  ```html
40
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.6.0/dist/bronto.css" />
41
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.6.0/dist/css/report.css" />
42
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.6.0/dist/css/dataviz.css" />
43
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.6.0/dist/css/annotations.css" />
44
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.6.0/dist/css/legend.css" />
40
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.6.4/dist/bronto.css" />
41
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.6.4/dist/css/report.css" />
42
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.6.4/dist/css/dataviz.css" />
43
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.6.4/dist/css/annotations.css" />
44
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.6.4/dist/css/legend.css" />
45
45
  ```
46
46
 
47
47
  The CDN serves the package's own `fonts/` next to the CSS, so font URLs resolve
@@ -150,6 +150,10 @@ they are all safe in the static, PDF-first report path.
150
150
  `ui-alert` for persistent notices, `ui-table` for structured evidence,
151
151
  `ui-timeline` for events, `ui-meter` for measured values, and `ui-num` for
152
152
  non-table numeric values.
153
+ - In alerts, put the readable message in `<p class="ui-alert__body">…</p>`
154
+ and use `ui-alert__title` only for a separate title line. `ui-alert` is a
155
+ grid with a leading status dot; raw text or loose inline children such as
156
+ `<strong>` / `<code>` become separate grid items and can fragment in print.
153
157
  - Give `ui-report__finding` blocks an accessible name so the visual grouping is
154
158
  also programmatic: point `aria-labelledby` at the block's `ui-eyebrow` label
155
159
  (give it an `id`), or lead with a real heading. Do the same for a
@@ -167,6 +171,10 @@ they are all safe in the static, PDF-first report path.
167
171
  inside `ui-prose`; use `.ui-table` for curated evidence tables. If a
168
172
  `ui-report__evidence` block contains only a `ui-table-wrap`, the report layer
169
173
  removes the inner frame so evidence tables do not look double-boxed.
174
+ Report tables preserve words by default so identifiers and headings do not
175
+ split into unreadable fragments in PDF. Add `ui-table--break-anywhere` only
176
+ for machine-token tables where avoiding horizontal overflow matters more than
177
+ preserving words.
170
178
  - Every `<figure>` should include a `figcaption` using `ui-report__caption`.
171
179
  - Do not use raw color values. Theme with `--accent`; use status tones for
172
180
  status; use chart tokens only in chart figures.
@@ -218,13 +226,17 @@ Direction tone follows the common case (up = good, green; down = bad, red). When
218
226
 
219
227
  The arrow is visual; always include the number and unit in the text.
220
228
 
221
- A stat card's own `ui-stat__delta is-pos` / `is-neg` carries **tone only** (good
222
- vs bad, as colour). That is fine on screen, but tone is a single channel: in a
223
- greyscale PDF or for a colour-blind reader a positive and a negative delta look
224
- identical, and the tone is deliberately decoupled from direction (a *dropped*
225
- latency is `is-pos`). When the change must read without colour — most printed
226
- reports prefer `ui-delta` for the card's delta line, because its `--up`/`--down`
227
- arrow is a real non-colour channel:
229
+ A stat card's own `ui-stat__delta is-pos` / `is-neg` carries **tone** (good vs
230
+ bad, as colour) and auto-prepends a `▲`/`▼` glyph but that glyph follows the
231
+ **tone**, not the real direction: `is-pos` always renders `▲` and `is-neg`
232
+ always `▼`, regardless of whether the number went up or down. The tone is
233
+ deliberately decoupled from direction (a *dropped* latency is good, so `is-pos`),
234
+ so the auto-arrow can contradict the words: write `is-pos` on a "−48 ms" and it
235
+ prints `▲ −48 ms`. Do **not** add your own direction word/arrow on top, or you
236
+ double it. When the change must read by direction — most printed reports —
237
+ prefer `ui-delta` for the card's delta line, because its `--up`/`--down` arrow is
238
+ a real (author-controlled) non-colour channel; reach for the arrow-free `ui-num`
239
+ if you want neither tone nor glyph:
228
240
 
229
241
  ```html
230
242
  <span class="ui-stat__label">p95 latency</span>
@@ -343,8 +355,9 @@ raster).
343
355
  > and even then `import`/`fetch` of the config only works over an `http(s)`
344
356
  > origin. A static report **opened from disk (`file://`) cannot import the module
345
357
  > nor fetch `vega.json`** (CORS) — load Vega + Vega-Lite + vega-embed from pinned
346
- > `/build/*.min.js` CDN tags and **inline the resolved `config` object**, the
347
- > file://-safe recipe in [vega.md](./vega.md#from-a-cdn-no-bundler). For a report
358
+ > `/build/*.min.js` CDN tags and **inline the resolved `config` object**
359
+ > (generate it with `npm run emit:theme vega light`), the file://-safe recipe in
360
+ > [vega.md](./vega.md#from-a-cdn-no-bundler). For a report
348
361
  > you intend to **print/PDF**, prefer the frozen inline `<svg>` below — it has no
349
362
  > runtime, prints exactly, and sidesteps all of this.
350
363
 
@@ -478,6 +491,22 @@ it (never rely on the bar alone — WCAG 1.4.1):
478
491
  reading (e.g. 112 % of plan) shows a full bar — put the true figure in the
479
492
  written label beside it (`ui-num`), which is the data of record anyway.
480
493
 
494
+ For a block of meters — SLO burn, error budgets, capacity — lay each out as
495
+ **label | bar | value** with `ui-meter__row`; `ui-meter__label` names it and
496
+ `ui-meter__value` carries the reading (the data of record — never the bar
497
+ alone). The row collapses to a stack on a narrow screen, so you don't hand-roll
498
+ the grid:
499
+
500
+ ```html
501
+ <div class="ui-meter__row">
502
+ <span class="ui-meter__label">Write availability</span>
503
+ <div class="ui-meter ui-meter--danger" role="presentation">
504
+ <span class="ui-meter__fill" style="--value: 90"></span>
505
+ </div>
506
+ <span class="ui-meter__value ui-num">90% of budget burned</span>
507
+ </div>
508
+ ```
509
+
481
510
  A **pull-quote** lifts a source sentence out of the prose — `ui-quote` is the
482
511
  block, `ui-quote__cite` attributes it:
483
512
 
@@ -568,9 +597,10 @@ need a full automatable browser, only a Chromium-class layout+print pass.
568
597
  - **By hand:** open the report in Chrome/Edge → Print (Cmd/Ctrl+P) → "Save as
569
598
  PDF". In **More settings**, enable **Background graphics** (the dialog's
570
599
  equivalent of `printBackground` — without it chart fills and swatches drop
571
- out), and pick the paper size there. Paper size is a browser print setting,
572
- not a token; the layer only themes the page _margin_ via
573
- `--report-page-margin`.
600
+ out), and pick the paper size there. Paper size and page margins are browser
601
+ print settings; the report stylesheet uses a fixed 18mm `@page` margin because
602
+ Chromium-class print engines do not reliably resolve custom properties inside
603
+ `@page` rules.
574
604
  - **Headless, lightweight:** use **`chrome-headless-shell`** — the minimal
575
605
  headless-Chromium binary built for exactly this, a fraction of a full
576
606
  browser's weight. Drive it through Playwright/Puppeteer (or raw CDP) and
@@ -641,3 +671,5 @@ Before returning a report, an LLM should verify:
641
671
  - No raw chromatic colors appear in inline styles.
642
672
  - No remote scripts, styles, iframes, or images are required for the report.
643
673
  - Generated/untrusted body HTML was sanitized before insertion.
674
+ - Alert text is wrapped in `.ui-alert__body`; no loose text or inline-only
675
+ elements are direct children of `.ui-alert`.
@@ -0,0 +1,64 @@
1
+ # Sidenote
2
+
3
+ `@ponchia/ui/css/sidenote.css` is an opt-in **margin-note** grammar in the Tufte
4
+ tradition — the channel for evidence, caveats, and provenance asides that belong
5
+ *beside* the prose, not interrupting it. `ui-sidenote` is numbered;
6
+ `ui-marginnote` is the unnumbered variant.
7
+
8
+ ```css
9
+ @import '@ponchia/ui';
10
+ @import '@ponchia/ui/css/sidenote.css';
11
+ ```
12
+
13
+ ## How it behaves
14
+
15
+ - **Wide viewports** (≥ 60rem) float the note into the inline-end margin.
16
+ - **Narrow viewports** collapse it to an indented inline block right after its
17
+ anchor, so nothing is lost on a phone or in a narrow column.
18
+ - **Numbering** is a CSS counter — no host bookkeeping.
19
+
20
+ ## Wiring — two things the host owns
21
+
22
+ 1. **Where numbering restarts.** Put `counter-reset: ui-sidenote` on the article
23
+ (or a section) so the count starts at 1 there.
24
+ 2. **The margin gutter.** At the same breakpoint, give that container
25
+ `padding-inline-end: calc(var(--sidenote-width) + var(--sidenote-gap))` so the
26
+ floated note has room. `--sidenote-width` defaults to `12rem`.
27
+
28
+ ```html
29
+ <article style="counter-reset: ui-sidenote">
30
+ <p>
31
+ The migration cut p95 latency by 38%<label class="ui-sidenote__ref"></label>.
32
+ <span class="ui-sidenote">
33
+ Measured over the first 24h after rollout; see the incident review §4.
34
+ </span>
35
+ The error budget held<span class="ui-marginnote">No paging events fired.</span>.
36
+ </p>
37
+ </article>
38
+ ```
39
+
40
+ The `.ui-sidenote__ref` renders the superscript number and increments the
41
+ counter; place the `.ui-sidenote` immediately after it in the DOM so it reads
42
+ the same number.
43
+
44
+ ## Class reference
45
+
46
+ | Class | Role |
47
+ | --- | --- |
48
+ | `.ui-sidenote` | A numbered margin note. |
49
+ | `.ui-marginnote` | An unnumbered margin note (no `__ref`). |
50
+ | `.ui-sidenote__ref` | The inline superscript anchor; increments + prints the number. |
51
+
52
+ | Custom property | On | Meaning |
53
+ | --- | --- | --- |
54
+ | `--sidenote-width` | `.ui-sidenote` / `.ui-marginnote` | Floated width on wide viewports (default `12rem`). |
55
+ | `--sidenote-gap` | same | Gap between the text column and the note (default `2rem`). |
56
+
57
+ ## Accessibility & robustness
58
+
59
+ - The note is **real DOM in reading order**, so a screen reader encounters it
60
+ right after the anchor — no off-screen trickery.
61
+ - On narrow viewports the note is always visible (an indented block with an
62
+ inline-start rule), so there is no hidden-content trap.
63
+ - Keep the note's meaning in its text; the number is a wayfinding aid, not the
64
+ content.
package/docs/spark.md ADDED
@@ -0,0 +1,78 @@
1
+ # Spark
2
+
3
+ `@ponchia/ui/css/spark.css` is an opt-in **inline dataword** — a word-sized
4
+ microchart you drop into a sentence or a dense table cell to show a trend
5
+ in-line. It is the inline counterpart to the scalar `ui-delta` / `ui-num` /
6
+ `ui-stat`, and it fills a gap a block-level chart cannot.
7
+
8
+ ```css
9
+ @import '@ponchia/ui';
10
+ @import '@ponchia/ui/css/spark.css';
11
+ ```
12
+
13
+ ## Boundary — the host owns the numbers
14
+
15
+ Bronto paints bars; it does **not** compute scales. The host normalises each
16
+ data point to `0..1` and sets it as `--v` on a `.ui-spark__bar`. Bronto refuses
17
+ raw values and min/max — that is the same boundary that keeps the analytical
18
+ layer from owning chart state.
19
+
20
+ ## Markup
21
+
22
+ ```html
23
+ <!-- "weekly signups, trending up" — the label IS the accessible content -->
24
+ <span class="ui-spark" role="img" aria-label="weekly signups, trending up">
25
+ <span class="ui-spark__bar" style="--v: 0.2"></span>
26
+ <span class="ui-spark__bar" style="--v: 0.4"></span>
27
+ <span class="ui-spark__bar" style="--v: 0.35"></span>
28
+ <span class="ui-spark__bar" style="--v: 0.7"></span>
29
+ <span class="ui-spark__bar ui-spark__bar--accent" style="--v: 1"></span>
30
+ </span>
31
+ ```
32
+
33
+ A **win/loss** strip uses fixed-height bars with `--pos` / `--neg` tones:
34
+
35
+ ```html
36
+ <span class="ui-spark" role="img" aria-label="last 5 deploys: 4 passed, 1 failed">
37
+ <span class="ui-spark__bar ui-spark__bar--pos" style="--v: 1"></span>
38
+ <span class="ui-spark__bar ui-spark__bar--pos" style="--v: 1"></span>
39
+ <span class="ui-spark__bar ui-spark__bar--neg" style="--v: 1"></span>
40
+ <span class="ui-spark__bar ui-spark__bar--pos" style="--v: 1"></span>
41
+ <span class="ui-spark__bar ui-spark__bar--pos" style="--v: 1"></span>
42
+ </span>
43
+ ```
44
+
45
+ ## Class reference
46
+
47
+ | Class | Role |
48
+ | --- | --- |
49
+ | `.ui-spark` | The inline container (sizes to ~1em tall, `max-content` wide). |
50
+ | `.ui-spark__bar` | One bar — height from `--v` (`0..1`). Defaults to `currentColor`. |
51
+ | `.ui-spark__bar--accent` | Emphasise one bar with the rationed accent. |
52
+ | `.ui-spark__bar--pos` | Success tone (win). |
53
+ | `.ui-spark__bar--neg` | Danger tone (loss). |
54
+
55
+ | Custom property | On | Meaning |
56
+ | --- | --- | --- |
57
+ | `--v` | `.ui-spark__bar` | **Required.** Normalised height `0..1`; the host computes it. A bar with no `--v` collapses to a 1px floor. |
58
+
59
+ ## Recipes
60
+
61
+ ```js
62
+ import { ui } from '@ponchia/ui/classes';
63
+
64
+ ui.sparkBar({ tone: 'accent' }); // "ui-spark__bar ui-spark__bar--accent"
65
+ ui.sparkBar({ tone: 'pos' }); // "ui-spark__bar ui-spark__bar--pos"
66
+ ui.sparkBar(); // "ui-spark__bar"
67
+ ```
68
+
69
+ ## Accessibility & robustness
70
+
71
+ - **A bare spark is opaque.** The `.ui-spark` container **must** carry
72
+ `role="img"` and an `aria-label` that states the trend in words — colour and
73
+ shape are never the only channel (WCAG 1.4.1, 1.1.1).
74
+ - **Forced colours:** the bars repaint in the system text colour so the shape
75
+ survives (the tone distinction lives in the label).
76
+ - **Print:** bars are forced through `print-color-adjust: exact`.
77
+ - No JS, no measurement — it renders identically server-side and in a static
78
+ report.
package/docs/stability.md CHANGED
@@ -40,6 +40,7 @@ until `1.0.0` is tagged. This matrix defines what counts as public API.
40
40
  | Generated / AI-trust (`css/generated.css`, `.ui-generated*`, `.ui-origin-label*`, `.ui-reasoning*`, `.ui-tool-log`, `.ui-tool-call*`) | Stable additive | The generated-content, origin-label (incl. `--ai`), reasoning-trace and tool-log/tool-call class names and the `ui.originLabel` recipe are public. Opt-in, not in the default bundle. Not a chat kit; no confidence widget. |
41
41
  | Workbench (`css/workbench.css`, `.ui-inspector*`, `.ui-property*`, `.ui-selectionbar*`) | Stable additive | Inspector, property-row and selection-bar class + BEM part names are public (class-only — no recipe). Opt-in, not in the default bundle. Splitters/drag handles are out of scope. |
42
42
  | Command palette (`css/command.css`, `.ui-command*`, `initCommand`, `useCommand`) | Stable additive | Command class/part names, the `data-bronto-command` attribute, and the event contract — `bronto:command:select` (`detail: { value, label }`) and `bronto:command:close` — are public, plus the `useCommand` binding hook. Bronto filters + navigates (APG combobox/listbox); the host owns the action registry/execution. Opt-in, not in the default bundle, no global hotkey. |
43
+ | Controlled-modal focus trap (`initModal`, `useModal`, `data-bronto-modal`) | Stable additive | For the `.ui-modal.is-open` (non-`<dialog>`) path: the `data-bronto-modal` opt-in marker, the `inert`-based focus trap + focus-return, and the cancelable `bronto:modal:close` (`detail: { reason }`) event are public. The consumer still owns the `is-open` class; the behavior never changes visibility. The native `<dialog>` path (`initDialog`) is the default and gets the trap for free. |
43
44
  | Keyboard-shortcut hint (`.ui-shortcut`, `.ui-shortcut__sep`) | Stable additive | Class names for the chord/sequence hint over `.ui-kbd` are public. Ships in the core layer (class-only, no recipe). |
44
45
  | Generated docs shipped in npm | Stable paths | `llms.txt` and exported docs paths stay shipped and resolvable within a compatible minor. Markdown/text assets are for reading unless your runtime has a loader. Generated content may change with the source contract. |
45
46
  | Demo, examples, tests, scripts | Internal | Useful for learning and verification, but not shipped runtime API unless a path is explicitly exported in `package.json`. |