@ponchia/ui 0.6.7 → 0.6.9

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 (111) hide show
  1. package/CHANGELOG.md +129 -4
  2. package/README.md +4 -4
  3. package/annotations/index.d.ts.map +1 -1
  4. package/annotations/index.js +26 -9
  5. package/behaviors/carousel.d.ts.map +1 -1
  6. package/behaviors/carousel.js +145 -49
  7. package/behaviors/combobox.d.ts.map +1 -1
  8. package/behaviors/combobox.js +220 -92
  9. package/behaviors/command.d.ts.map +1 -1
  10. package/behaviors/command.js +74 -14
  11. package/behaviors/connectors.d.ts.map +1 -1
  12. package/behaviors/connectors.js +131 -32
  13. package/behaviors/crosshair.d.ts.map +1 -1
  14. package/behaviors/crosshair.js +47 -1
  15. package/behaviors/dialog.d.ts.map +1 -1
  16. package/behaviors/dialog.js +24 -9
  17. package/behaviors/disclosure.d.ts.map +1 -1
  18. package/behaviors/disclosure.js +33 -3
  19. package/behaviors/dismissible.d.ts.map +1 -1
  20. package/behaviors/dismissible.js +3 -2
  21. package/behaviors/forms.d.ts.map +1 -1
  22. package/behaviors/forms.js +211 -140
  23. package/behaviors/glyph.d.ts.map +1 -1
  24. package/behaviors/glyph.js +172 -132
  25. package/behaviors/inert.d.ts +1 -1
  26. package/behaviors/inert.d.ts.map +1 -1
  27. package/behaviors/inert.js +4 -3
  28. package/behaviors/internal.d.ts.map +1 -1
  29. package/behaviors/internal.js +4 -3
  30. package/behaviors/legend.d.ts +0 -5
  31. package/behaviors/legend.d.ts.map +1 -1
  32. package/behaviors/legend.js +45 -13
  33. package/behaviors/menu.d.ts.map +1 -1
  34. package/behaviors/menu.js +13 -8
  35. package/behaviors/modal.d.ts.map +1 -1
  36. package/behaviors/modal.js +77 -19
  37. package/behaviors/popover.d.ts +4 -3
  38. package/behaviors/popover.d.ts.map +1 -1
  39. package/behaviors/popover.js +94 -14
  40. package/behaviors/sources.d.ts.map +1 -1
  41. package/behaviors/sources.js +14 -2
  42. package/behaviors/splitter.d.ts.map +1 -1
  43. package/behaviors/splitter.js +149 -110
  44. package/behaviors/spotlight.d.ts.map +1 -1
  45. package/behaviors/spotlight.js +28 -2
  46. package/behaviors/table.d.ts +1 -1
  47. package/behaviors/table.d.ts.map +1 -1
  48. package/behaviors/table.js +108 -17
  49. package/behaviors/tabs.d.ts.map +1 -1
  50. package/behaviors/tabs.js +84 -20
  51. package/behaviors/theme.d.ts.map +1 -1
  52. package/behaviors/theme.js +25 -5
  53. package/behaviors/toast.js +5 -5
  54. package/classes/index.d.ts +15 -2
  55. package/classes/index.js +48 -35
  56. package/connectors/index.d.ts +41 -8
  57. package/connectors/index.d.ts.map +1 -1
  58. package/connectors/index.js +74 -19
  59. package/css/annotations.css +12 -0
  60. package/css/app.css +3 -4
  61. package/css/base.css +1 -1
  62. package/css/content.css +3 -3
  63. package/css/crosshair.css +27 -2
  64. package/css/disclosure.css +3 -3
  65. package/css/dots.css +4 -4
  66. package/css/feedback.css +8 -37
  67. package/css/forms.css +9 -12
  68. package/css/legend.css +1 -1
  69. package/css/marks.css +1 -1
  70. package/css/motion.css +6 -6
  71. package/css/navigation.css +12 -0
  72. package/css/overlay.css +5 -7
  73. package/css/primitives.css +14 -16
  74. package/css/sidenote.css +2 -2
  75. package/css/table.css +2 -2
  76. package/css/tokens.css +16 -0
  77. package/dist/bronto.css +1 -1
  78. package/dist/css/analytical.css +1 -1
  79. package/dist/css/annotations.css +1 -1
  80. package/dist/css/crosshair.css +1 -1
  81. package/dist/css/feedback.css +1 -1
  82. package/dist/css/navigation.css +1 -1
  83. package/dist/css/report-kit.css +1 -1
  84. package/dist/css/tokens.css +1 -1
  85. package/docs/adr/0001-color-system.md +3 -2
  86. package/docs/annotations.md +21 -1
  87. package/docs/architecture.md +74 -13
  88. package/docs/command.md +4 -1
  89. package/docs/connectors.md +16 -0
  90. package/docs/crosshair.md +1 -1
  91. package/docs/dots.md +4 -1
  92. package/docs/glyphs.md +11 -0
  93. package/docs/interop/react-flow.md +89 -0
  94. package/docs/migrations/0.2-to-0.3.md +1 -1
  95. package/docs/package-contract.md +7 -5
  96. package/docs/reporting.md +23 -12
  97. package/docs/stability.md +85 -9
  98. package/docs/theming.md +2 -2
  99. package/docs/usage.md +16 -2
  100. package/docs/vega.md +4 -4
  101. package/glyphs/glyphs.js +43 -33
  102. package/llms.txt +19 -8
  103. package/package.json +23 -4
  104. package/schemas/report-claims.v1.schema.json +1 -1
  105. package/svelte/index.d.ts +71 -45
  106. package/svelte/index.d.ts.map +1 -1
  107. package/svelte/index.js +29 -2
  108. package/tokens/index.js +2 -2
  109. package/vue/index.d.ts +42 -5
  110. package/vue/index.d.ts.map +1 -1
  111. package/vue/index.js +32 -1
package/css/overlay.css CHANGED
@@ -91,7 +91,7 @@ dialog.ui-modal[open]::backdrop {
91
91
  /* Background scroll-lock. A native <dialog> top layer does NOT stop the page
92
92
  behind it scrolling, and the no-JS native path can't lock it in script — so
93
93
  lock it in CSS, for both the native [open] dialog and the controlled .is-open
94
- overlay (incl. the drawer modifier, same base). (component audit C13.) */
94
+ overlay (incl. the drawer modifier, same base). */
95
95
  html:has(dialog.ui-modal[open]),
96
96
  html:has(.ui-modal.is-open) {
97
97
  overflow: hidden;
@@ -164,8 +164,7 @@ html:has(.ui-modal.is-open) {
164
164
  /* Comfortable hit target on coarse pointers — this bespoke close button measured
165
165
  ~26px on touch, below the 2.9rem floor the rest of the button family meets
166
166
  (WCAG 2.5.8). Scoped to coarse so the fine-pointer (mouse) rendering, which
167
- already clears 24×24, is unchanged; centre the glyph in the enlarged box.
168
- (audit C3.) */
167
+ already clears 24×24, is unchanged; centre the glyph in the enlarged box. */
169
168
  @media (pointer: coarse) {
170
169
  .ui-modal__close {
171
170
  align-items: center;
@@ -313,7 +312,7 @@ html:has(.ui-modal.is-open) {
313
312
  /* Menu hover/focus paints var(--bg-accent), which HCM strips, so the hovered row
314
313
  is indistinguishable from its siblings (focus keeps the UA ring; hover has no
315
314
  such fallback). Re-assert a system Highlight like the combobox/command rows,
316
- for parity with those sibling surfaces. (component audit C22.) */
315
+ for parity with those sibling surfaces. */
317
316
  @media (forced-colors: active) {
318
317
  .ui-menu__item:hover,
319
318
  .ui-menu__item:focus-visible {
@@ -384,7 +383,7 @@ html:has(.ui-modal.is-open) {
384
383
 
385
384
  /* The active option is tracked by aria-activedescendant — it is NEVER DOM-focused,
386
385
  so it gets no UA focus ring under HCM, and its only cue (--bg-accent) is stripped.
387
- Re-assert a system Highlight like the command palette does. (audit C2.) */
386
+ Re-assert a system Highlight like the command palette does. */
388
387
  @media (forced-colors: active) {
389
388
  .ui-combobox__option.is-active,
390
389
  .ui-combobox__option[aria-selected='true'] {
@@ -454,8 +453,7 @@ html:has(.ui-modal.is-open) {
454
453
  /* Forced-colors drops both `backdrop-filter: blur()` and the `color-mix()`
455
454
  scrim, so the dialog/lightbox would float over an undimmed page with no
456
455
  separation. Re-assert a translucent scrim with `forced-color-adjust: none`
457
- so the layering reads in High Contrast, matching the meter/dot precedent
458
- (C28). */
456
+ so the layering reads in High Contrast, matching the meter/dot precedent. */
459
457
  @media (forced-colors: active) {
460
458
  .ui-modal::backdrop,
461
459
  .ui-lightbox::backdrop {
@@ -74,7 +74,7 @@
74
74
  /* Intrinsic aspect-ratio box; the media child fills it. The contract is ONE
75
75
  child (a single <img>/<video>/<iframe>). Scope the fill to :first-child rather
76
76
  than every child: a second child would otherwise be forced to 100%/100% +
77
- object-fit and stack on top, silently breaking the ratio. (audit C34.) */
77
+ object-fit and stack on top, silently breaking the ratio. */
78
78
  .ui-ratio {
79
79
  aspect-ratio: var(--ratio, 16 / 9);
80
80
  }
@@ -100,7 +100,7 @@
100
100
  /* Logical `max-inline-size`, not physical `max-width`: the container is typed
101
101
  `inline-size`, so the inline axis is the one actually tracked — the logical
102
102
  query matches it in any writing mode (a physical `width` query silently
103
- misses in a vertical WM). (component audit C34.) */
103
+ misses in a vertical writing mode). */
104
104
  @container bronto (max-inline-size: 34rem) {
105
105
  .ui-grid {
106
106
  --grid-min: 100%;
@@ -193,7 +193,7 @@
193
193
  /* These tiles hold IDs / hashes / big numbers — the unbreakable-token case is
194
194
  the common one. A grid item defaults to min-inline-size:auto, so a long
195
195
  value pushes the whole statgrid track wider; allow the tile to shrink so the
196
- value can wrap instead (paired with overflow-wrap on __value). (audit C5.) */
196
+ value can wrap instead (paired with overflow-wrap on __value). */
197
197
  min-inline-size: 0;
198
198
  padding: var(--space-md);
199
199
  }
@@ -216,7 +216,7 @@
216
216
  font-weight: var(--display-weight-strong);
217
217
  letter-spacing: 0.02em;
218
218
  line-height: 1.05;
219
- overflow-wrap: anywhere; /* break an unspaced ID/hash rather than overflow (audit C5) */
219
+ overflow-wrap: anywhere; /* break an unspaced ID/hash rather than overflow */
220
220
  }
221
221
 
222
222
  .ui-stat__delta,
@@ -237,7 +237,7 @@
237
237
 
238
238
  /* A direction arrow is the non-colour channel — colour alone (success/danger)
239
239
  fails WCAG 1.4.1, so the tile carries the same ▲/▼ glyph as `.ui-delta`
240
- (C13). Marked aria-hidden-equivalent by being generated content; the sign is
240
+ as a second signal. Marked aria-hidden-equivalent by being generated content; the sign is
241
241
  still in the author's text ("+12%"). */
242
242
  .ui-stat__delta.is-pos::before,
243
243
  .ui-app-metric__delta.is-pos::before {
@@ -259,7 +259,7 @@
259
259
  .ui-num {
260
260
  /* inline-block so `text-align: end` actually applies: on a bare inline element
261
261
  it computes but never paints (the box is shrink-wrapped), so an author who
262
- followed the docs to right-align an inline figure saw no effect. (audit C17.) */
262
+ followed the docs to right-align an inline figure saw no effect. */
263
263
  display: inline-block;
264
264
  font-variant-numeric: tabular-nums;
265
265
  text-align: end;
@@ -436,8 +436,8 @@
436
436
  this looks-dead state is NOT keyboard-inert: for that, prefer native
437
437
  `<button disabled>`, run `initDisabledGuard()` (it intercepts Enter/Space on
438
438
  aria-disabled controls), or add `tabindex="-1"` (and drop `href` on a link).
439
- See docs/usage.md "Disabled vs aria-disabled". (a11y review C3 / audit C4;
440
- native :disabled already inert.) */
439
+ See docs/usage.md "Disabled vs aria-disabled"; native :disabled is already
440
+ inert. */
441
441
  .ui-button[aria-disabled='true'],
442
442
  .ui-link[aria-disabled='true'] {
443
443
  pointer-events: none;
@@ -445,7 +445,7 @@
445
445
 
446
446
  /* The button family dims + shows not-allowed via its `:disabled` rule above, but
447
447
  a disabled LINK got only pointer-events:none — it looked fully live. Give it
448
- the same visual disabled cue. (component audit C30.) */
448
+ the same visual disabled cue. */
449
449
  .ui-link[aria-disabled='true'] {
450
450
  cursor: not-allowed;
451
451
  opacity: 0.45;
@@ -480,7 +480,7 @@
480
480
  !important `animation-duration`, so the old non-important `1.4s` slow-spin
481
481
  here was dead code AND left a broken, transparent-topped ring looking like a
482
482
  rendering bug. Drop the dead rule; show a STATIC complete ring instead — a
483
- still busy cue with no implied motion. (component audit C15.) */
483
+ still busy cue with no implied motion. */
484
484
  .ui-button[aria-busy='true']::before {
485
485
  border-block-start-color: currentcolor;
486
486
  }
@@ -530,8 +530,7 @@
530
530
 
531
531
  /* RTL: the logical borders flip sides, but a fixed `rotate(45deg)` then points
532
532
  the chevron UP rather than toward the inline-end (the reading-forward way).
533
- Mirror the rotation so the resting affordance points forward in RTL too.
534
- (component audit C14.) */
533
+ Mirror the rotation so the resting affordance points forward in RTL too. */
535
534
  [dir='rtl'] .ui-link--arrow::after,
536
535
  [dir='rtl'] .ui-link--cta::after {
537
536
  transform: rotate(-45deg);
@@ -540,8 +539,7 @@
540
539
  /* Standalone CTA links are tap targets, not inline prose links: on a coarse
541
540
  pointer float them to the WCAG 2.5.8 AA 24px floor (the 2.5.8 inline-link
542
541
  exception doesn't cover a block-level call-to-action, which is what these
543
- are). Buttons already auto-grow to ~44px on coarse pointers. (component
544
- audit C14.) */
542
+ are). Buttons already auto-grow to ~44px on coarse pointers. */
545
543
  @media (pointer: coarse) {
546
544
  .ui-link--arrow,
547
545
  .ui-link--cta {
@@ -600,7 +598,7 @@
600
598
 
601
599
  /* Accent mixes 45% (vs 40% for the status tones below) on purpose: the brand
602
600
  hue is lower-chroma here than the status hues, so it needs a touch more to
603
- read at the same border weight. Intentional, not a copy-paste slip. (Q15.) */
601
+ read at the same border weight. Intentional, not a copy-paste slip. */
604
602
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
605
603
  }
606
604
 
@@ -694,7 +692,7 @@
694
692
  font-family: var(--mono);
695
693
  margin: 0;
696
694
  min-inline-size: 0;
697
- overflow-wrap: anywhere; /* IDs/hashes/paths are the common value — break, don't overflow (audit C5) */
695
+ overflow-wrap: anywhere; /* IDs/hashes/paths are the common value — break, don't overflow */
698
696
  }
699
697
 
700
698
  /* --- Hover (pointer only) --- */
package/css/sidenote.css CHANGED
@@ -41,7 +41,7 @@
41
41
  /* The inline superscript that anchors a numbered sidenote. Use --accent-text,
42
42
  not raw --accent: this is readable text and must clear WCAG AA 4.5:1 even
43
43
  after a one-knob re-brand to a paler --accent (raw --accent drops to ~1.5:1).
44
- Same accent-as-text contract as .ui-eyebrow / .ui-link--cta. (audit C6.) */
44
+ Same accent-as-text contract as .ui-eyebrow / .ui-link--cta. */
45
45
  .ui-sidenote__ref {
46
46
  color: var(--accent-text);
47
47
  counter-increment: ui-sidenote;
@@ -54,7 +54,7 @@
54
54
  }
55
55
 
56
56
  /* The note repeats its number (display only — the ref already incremented).
57
- --accent-text for the same WCAG-AA reason as the ref above. (audit C6.) */
57
+ --accent-text for the same WCAG-AA reason as the ref above. */
58
58
  .ui-sidenote::before {
59
59
  color: var(--accent-text);
60
60
  content: counter(ui-sidenote) '. ';
package/css/table.css CHANGED
@@ -39,7 +39,7 @@
39
39
 
40
40
  /* Keep the sticky header above body cells — cheap insurance for the
41
41
  sticky-header + pinned/positioned-column combo, where an un-z-indexed th
42
- scrolls under a positioned cell. (audit C30.) */
42
+ scrolls under a positioned cell. */
43
43
  z-index: 1;
44
44
  }
45
45
 
@@ -171,7 +171,7 @@
171
171
 
172
172
  /* --- Loading state: set aria-busy + .ui-table-wrap--loading on the wrap. The
173
173
  modifier is named for the element it goes ON (the wrap), not `.ui-table`, so
174
- the BEM host matches the documented placement. (component audit C19.) --- */
174
+ the BEM host matches the documented placement. --- */
175
175
  .ui-table-wrap--loading {
176
176
  opacity: 0.6;
177
177
  pointer-events: none;
package/css/tokens.css CHANGED
@@ -360,9 +360,25 @@
360
360
  --line: #d9d9d9;
361
361
  --line-strong: #b3b3b3;
362
362
  --success: #2f7d4f;
363
+ --success-soft: rgb(47, 125, 79, 0.12);
363
364
  --danger: #c01622;
365
+ --danger-soft: rgb(192, 22, 34, 0.1);
364
366
  --warning: #806414;
367
+ --warning-soft: rgb(128, 100, 20, 0.13);
365
368
  --info: #1f63c4;
369
+ --info-soft: rgb(31, 99, 196, 0.12);
366
370
  --accent: #d71921;
371
+ --bg-accent: color-mix(in srgb, var(--accent) 6%, transparent);
372
+ --accent-ramp-end: #ffffff;
373
+ --accent-strong: color-mix(in srgb, var(--accent) 83%, #000);
374
+ --accent-text: var(--accent-strong);
375
+ --accent-soft: color-mix(in srgb, var(--accent) 10%, transparent);
376
+ --button-text: #ffffff;
377
+ --on-accent: var(--button-text);
378
+ --field-dot: rgb(17, 17, 17, 0.16);
379
+ --field-dot-hot: rgb(17, 17, 17, 0.4);
380
+ --field-dot-accent: color-mix(in srgb, var(--accent) 78%, transparent);
381
+ --focus-ring: var(--accent);
382
+ --code-bg: rgb(17, 17, 17, 0.05);
367
383
  }
368
384
  }