@ponchia/ui 0.6.6 → 0.6.7

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 (108) hide show
  1. package/CHANGELOG.md +105 -6
  2. package/README.md +36 -23
  3. package/behaviors/carousel.d.ts.map +1 -1
  4. package/behaviors/carousel.js +3 -0
  5. package/behaviors/dialog.d.ts.map +1 -1
  6. package/behaviors/dialog.js +14 -8
  7. package/behaviors/forms.d.ts.map +1 -1
  8. package/behaviors/forms.js +11 -5
  9. package/behaviors/index.d.ts +2 -0
  10. package/behaviors/index.d.ts.map +1 -1
  11. package/behaviors/index.js +2 -0
  12. package/behaviors/internal.d.ts +2 -1
  13. package/behaviors/internal.d.ts.map +1 -1
  14. package/behaviors/internal.js +23 -3
  15. package/behaviors/legend.d.ts.map +1 -1
  16. package/behaviors/legend.js +41 -9
  17. package/behaviors/splitter.d.ts +26 -0
  18. package/behaviors/splitter.d.ts.map +1 -0
  19. package/behaviors/splitter.js +200 -0
  20. package/behaviors/table.js +3 -3
  21. package/behaviors/theme.js +2 -2
  22. package/classes/classes.json +230 -4
  23. package/classes/index.d.ts +49 -1
  24. package/classes/index.js +56 -1
  25. package/classes/vscode.css-custom-data.json +1 -1
  26. package/css/analytical.css +3 -1
  27. package/css/app.css +4 -4
  28. package/css/clamp.css +92 -0
  29. package/css/figure.css +102 -0
  30. package/css/highlights.css +50 -0
  31. package/css/interval.css +90 -0
  32. package/css/primitives.css +2 -3
  33. package/css/report-kit.css +38 -0
  34. package/css/report.css +23 -4
  35. package/css/sidenote.css +12 -2
  36. package/css/site.css +2 -1
  37. package/css/sources.css +5 -0
  38. package/css/state.css +120 -1
  39. package/css/table.css +4 -0
  40. package/css/tokens.css +9 -9
  41. package/css/workbench.css +101 -8
  42. package/dist/bronto.css +1 -1
  43. package/dist/css/analytical.css +1 -1
  44. package/dist/css/app.css +1 -1
  45. package/dist/css/clamp.css +1 -0
  46. package/dist/css/figure.css +1 -0
  47. package/dist/css/highlights.css +1 -0
  48. package/dist/css/interval.css +1 -0
  49. package/dist/css/primitives.css +1 -1
  50. package/dist/css/report-kit.css +1 -0
  51. package/dist/css/report.css +1 -1
  52. package/dist/css/sidenote.css +1 -1
  53. package/dist/css/site.css +1 -1
  54. package/dist/css/sources.css +1 -1
  55. package/dist/css/state.css +1 -1
  56. package/dist/css/table.css +1 -1
  57. package/dist/css/tokens.css +1 -1
  58. package/dist/css/workbench.css +1 -1
  59. package/docs/adr/0002-scope-and-2026-baseline.md +1 -1
  60. package/docs/architecture.md +67 -43
  61. package/docs/clamp.md +49 -0
  62. package/docs/contrast.md +34 -24
  63. package/docs/d2.md +37 -0
  64. package/docs/figure.md +71 -0
  65. package/docs/frontier-primitives.md +25 -24
  66. package/docs/highlights.md +52 -0
  67. package/docs/interop/tailwind.md +148 -0
  68. package/docs/interval.md +55 -0
  69. package/docs/legends.md +3 -2
  70. package/docs/mermaid.md +6 -0
  71. package/docs/migrations/0.2-to-0.3.md +80 -0
  72. package/docs/migrations/0.3-to-0.4.md +48 -0
  73. package/docs/migrations/0.4-to-0.5.md +96 -0
  74. package/docs/migrations/0.5-to-0.6.md +82 -0
  75. package/docs/package-contract.md +40 -2
  76. package/docs/reference.md +78 -5
  77. package/docs/reporting.md +113 -58
  78. package/docs/sidenote.md +7 -1
  79. package/docs/sources.md +1 -1
  80. package/docs/stability.md +5 -3
  81. package/docs/state.md +67 -10
  82. package/docs/theming.md +10 -2
  83. package/docs/usage.md +31 -11
  84. package/docs/workbench.md +59 -18
  85. package/llms.txt +80 -12
  86. package/package.json +66 -6
  87. package/qwik/index.d.ts +1 -0
  88. package/qwik/index.d.ts.map +1 -1
  89. package/qwik/index.js +26 -21
  90. package/react/index.d.ts +1 -0
  91. package/react/index.d.ts.map +1 -1
  92. package/react/index.js +4 -1
  93. package/schemas/report-claims.v1.schema.json +137 -0
  94. package/solid/index.d.ts +2 -0
  95. package/solid/index.d.ts.map +1 -1
  96. package/solid/index.js +3 -0
  97. package/svelte/index.d.ts +88 -0
  98. package/svelte/index.d.ts.map +1 -0
  99. package/svelte/index.js +166 -0
  100. package/tailwind.css +87 -0
  101. package/tokens/figma.variables.json +2241 -0
  102. package/tokens/index.js +1 -1
  103. package/tokens/index.json +2 -2
  104. package/tokens/resolved.json +3 -3
  105. package/tokens/tokens.dtcg.json +1 -1
  106. package/vue/index.d.ts +79 -0
  107. package/vue/index.d.ts.map +1 -0
  108. package/vue/index.js +197 -0
package/css/state.css CHANGED
@@ -4,7 +4,8 @@
4
4
  Serious apps spend a lot of time in states like saving, saved, queued,
5
5
  offline, stale, conflicted, locked, and reviewed — usually improvised per
6
6
  product, so even good apps feel inconsistent. This is the canonical set:
7
- a labelled state object with a rationed tone, plus a page/document sync bar.
7
+ a labelled state object with a rationed tone, a page/document sync bar, and
8
+ a persistent background-job row.
8
9
 
9
10
  The state is carried by a tone dot AND an author-written label, never colour
10
11
  alone (WCAG 1.4.1) — the label is the canonical wording (see docs/state.md).
@@ -112,10 +113,128 @@
112
113
  padding-block: var(--space-xs);
113
114
  }
114
115
 
116
+ /* Background job — persistent progress/status for asynchronous work. The host
117
+ owns polling, retries, cancellation, and partial-failure semantics; Bronto
118
+ paints the durable row so long-running work is not hidden in a toast. */
119
+ .ui-job {
120
+ --job-progress: 0%;
121
+ --job-tone: var(--text-dim);
122
+
123
+ background: var(--panel);
124
+ border: 1px solid var(--line);
125
+ border-inline-start: 2px solid var(--job-tone);
126
+ border-radius: var(--radius-md);
127
+ display: grid;
128
+ gap: var(--space-sm);
129
+ padding: var(--space-md);
130
+ }
131
+
132
+ .ui-job__head {
133
+ align-items: start;
134
+ display: flex;
135
+ flex-wrap: wrap;
136
+ gap: var(--space-xs) var(--space-md);
137
+ justify-content: space-between;
138
+ }
139
+
140
+ .ui-job__title {
141
+ color: var(--text);
142
+ font-family: var(--display);
143
+ font-size: var(--text-sm);
144
+ letter-spacing: var(--tracking-wide);
145
+ margin: 0;
146
+ text-transform: uppercase;
147
+ }
148
+
149
+ .ui-job__meta {
150
+ color: var(--text-dim);
151
+ font-family: var(--mono);
152
+ font-size: var(--text-2xs);
153
+ letter-spacing: var(--tracking-wide);
154
+ text-transform: uppercase;
155
+ }
156
+
157
+ .ui-job__body {
158
+ color: var(--text-soft);
159
+ margin: 0;
160
+ }
161
+
162
+ .ui-job__progress {
163
+ background: var(--panel-soft);
164
+ border: 1px solid var(--line);
165
+ border-radius: var(--radius-pill);
166
+ block-size: 0.5rem;
167
+ overflow: hidden;
168
+ }
169
+
170
+ .ui-job__bar {
171
+ background: var(--job-tone);
172
+ block-size: 100%;
173
+ display: block;
174
+ inline-size: clamp(0%, var(--job-progress), 100%);
175
+ min-inline-size: 1px;
176
+ print-color-adjust: exact;
177
+ transition: inline-size var(--duration-base) var(--ease-standard);
178
+ }
179
+
180
+ .ui-job__actions {
181
+ align-items: center;
182
+ display: flex;
183
+ flex-wrap: wrap;
184
+ gap: var(--space-xs);
185
+ }
186
+
187
+ .ui-job--compact {
188
+ gap: var(--space-xs);
189
+ padding: var(--space-sm);
190
+ }
191
+
192
+ .ui-job--queued {
193
+ --job-tone: var(--text-dim);
194
+ }
195
+
196
+ .ui-job--running {
197
+ --job-tone: var(--accent);
198
+ }
199
+
200
+ .ui-job--blocked {
201
+ --job-tone: var(--warning);
202
+ }
203
+
204
+ .ui-job--failed {
205
+ --job-tone: var(--danger);
206
+ }
207
+
208
+ .ui-job--complete {
209
+ --job-tone: var(--success);
210
+ }
211
+
212
+ .ui-job--running .ui-job__bar {
213
+ background-image: linear-gradient(
214
+ 90deg,
215
+ var(--job-tone),
216
+ color-mix(in srgb, var(--job-tone) 62%, var(--panel))
217
+ );
218
+ }
219
+
220
+ @media (prefers-reduced-motion: reduce) {
221
+ .ui-job__bar {
222
+ transition: none;
223
+ }
224
+ }
225
+
115
226
  /* Forced colours: the tone dot collapses to a system colour, so the
116
227
  author-written label remains the state channel (it already must be). */
117
228
  @media (forced-colors: active) {
118
229
  .ui-state::before {
119
230
  background: CanvasText;
120
231
  }
232
+
233
+ .ui-job {
234
+ border-inline-start-color: CanvasText;
235
+ }
236
+
237
+ .ui-job__bar {
238
+ background: CanvasText;
239
+ }
121
240
  }
package/css/table.css CHANGED
@@ -85,6 +85,10 @@
85
85
  overflow-wrap: anywhere;
86
86
  }
87
87
 
88
+ .ui-table--break-anywhere {
89
+ table-layout: fixed;
90
+ }
91
+
88
92
  /* Numeric / right-aligned cells. */
89
93
  .ui-table .is-num,
90
94
  .ui-table th.is-num {
package/css/tokens.css CHANGED
@@ -166,7 +166,7 @@
166
166
  --text-dim: #a0a0a0;
167
167
  --accent: #ff3b41;
168
168
  --accent-ramp-end: #000000;
169
- --accent-strong: color-mix(in srgb, var(--accent) 84%, #fff);
169
+ --accent-strong: color-mix(in srgb, var(--accent) 80%, #fff);
170
170
  --accent-text: var(--accent-strong);
171
171
  --on-accent: var(--button-text);
172
172
  --accent-soft: color-mix(in srgb, var(--accent) 14%, transparent);
@@ -205,7 +205,7 @@
205
205
  --text-dim: #a0a0a0;
206
206
  --accent: #ff3b41;
207
207
  --accent-ramp-end: #000000;
208
- --accent-strong: color-mix(in srgb, var(--accent) 84%, #fff);
208
+ --accent-strong: color-mix(in srgb, var(--accent) 80%, #fff);
209
209
  --accent-text: var(--accent-strong);
210
210
  --on-accent: var(--button-text);
211
211
  --accent-soft: color-mix(in srgb, var(--accent) 14%, transparent);
@@ -237,16 +237,16 @@
237
237
  /* --------------------------------------------------------------------------
238
238
  Theming contract — the public override surface.
239
239
 
240
- Re-brand a whole project (or a subtree) by setting ONE knob; the rest
241
- of the accent family derives from it via color-mix:
240
+ Re-brand a whole project by setting ONE knob; the rest of the accent
241
+ family derives from it via color-mix:
242
242
 
243
243
  :root { --accent: #2f6df6; } // brand it blue, everywhere
244
- .promo { --accent: #16a34a; } // or just a subtree
245
244
 
246
- --accent-strong/-soft, --bg-accent, --field-dot-accent and --focus-ring
247
- all follow. The other documented knobs: the --space-* scale (or the
248
- [data-density] presets below), --radius-*, and the font vars
249
- (--display / --mono / --sans). docs/theming.md is the full contract.
245
+ Scoped --accent overrides recolor direct accent uses in that subtree, but
246
+ the derived family is declared at :root and is a root-level skin contract.
247
+ For full rebrands, override per theme at :root as shown in docs/theming.md.
248
+ The other documented knobs: the --space-* scale (or the [data-density]
249
+ presets below), --radius-*, and the font vars (--display / --mono / --sans).
250
250
 
251
251
  Density and contrast are CSS-only presets (not part of the JS token
252
252
  model): opt in with [data-density] / [data-contrast] on any element.
package/css/workbench.css CHANGED
@@ -1,12 +1,11 @@
1
1
  /* ==========================================================================
2
- workbench — opt-in inspector / property / selection-bar primitives.
3
-
4
- Real tools need inspectors, property rows, and a bar of actions on the
5
- current selection. Generic kits stop at cards/tables/forms, so every app
6
- builds its own half-consistent workbench. This is the low-risk CSS core:
7
- layout and affordances only. Resizable split panes (a focusable ARIA
8
- window-splitter behavior) and drag handles are deliberately deferred until a
9
- consumer needs them. Not imported by core.css.
2
+ workbench — opt-in inspector / property / selection-bar / splitter primitives.
3
+
4
+ Real tools need inspectors, property rows, a bar of actions on the current
5
+ selection, and resizable panes. Generic kits stop at cards/tables/forms, so
6
+ every app builds its own half-consistent workbench. This is the low-risk
7
+ core: layout and affordances, plus a tiny optional ARIA splitter behavior.
8
+ Not imported by core.css.
10
9
  ========================================================================== */
11
10
 
12
11
  /* --- Inspector — a panel of details for the selected object. --- */
@@ -81,3 +80,97 @@
81
80
  flex-wrap: wrap;
82
81
  gap: var(--space-xs);
83
82
  }
83
+
84
+ /* --- Splitter — two panes separated by a focusable ARIA separator handle. --- */
85
+ .ui-splitter {
86
+ --splitter-pos: 50%;
87
+ --splitter-handle: 0.75rem;
88
+ --splitter-pane-min: 0px;
89
+
90
+ background: var(--panel);
91
+ border: 1px solid var(--line);
92
+ border-radius: var(--radius-md);
93
+ display: grid;
94
+ grid-template-columns:
95
+ minmax(var(--splitter-pane-min), var(--splitter-pos))
96
+ var(--splitter-handle)
97
+ minmax(0, 1fr);
98
+ min-block-size: 18rem;
99
+ overflow: hidden;
100
+ }
101
+
102
+ .ui-splitter--vertical {
103
+ grid-template-columns:
104
+ minmax(var(--splitter-pane-min), var(--splitter-pos))
105
+ var(--splitter-handle)
106
+ minmax(0, 1fr);
107
+ }
108
+
109
+ .ui-splitter--horizontal {
110
+ grid-template-columns: 1fr;
111
+ grid-template-rows:
112
+ minmax(var(--splitter-pane-min), var(--splitter-pos))
113
+ var(--splitter-handle)
114
+ minmax(0, 1fr);
115
+ }
116
+
117
+ .ui-splitter__pane {
118
+ min-block-size: 0;
119
+ min-inline-size: 0;
120
+ overflow: auto;
121
+ padding: var(--space-md);
122
+ }
123
+
124
+ .ui-splitter__handle {
125
+ align-self: stretch;
126
+ background: var(--panel-strong);
127
+ border-block: 0;
128
+ border-inline: 1px solid var(--line);
129
+ cursor: col-resize;
130
+ display: grid;
131
+ min-inline-size: var(--splitter-handle);
132
+ place-items: center;
133
+ touch-action: none;
134
+ }
135
+
136
+ .ui-splitter__handle::before {
137
+ background: var(--line-strong);
138
+ border-radius: var(--radius-pill);
139
+ block-size: 2.5rem;
140
+ content: "";
141
+ inline-size: 2px;
142
+ }
143
+
144
+ .ui-splitter__handle:hover::before,
145
+ .ui-splitter__handle.is-active::before,
146
+ .ui-splitter__handle[aria-valuenow]:focus-visible::before {
147
+ background: var(--accent);
148
+ }
149
+
150
+ .ui-splitter__handle:focus-visible {
151
+ outline: 2px solid var(--focus-ring);
152
+ outline-offset: -2px;
153
+ }
154
+
155
+ .ui-splitter--horizontal .ui-splitter__handle {
156
+ border-block: 1px solid var(--line);
157
+ border-inline: 0;
158
+ cursor: row-resize;
159
+ min-block-size: var(--splitter-handle);
160
+ min-inline-size: 0;
161
+ }
162
+
163
+ .ui-splitter--horizontal .ui-splitter__handle::before {
164
+ block-size: 2px;
165
+ inline-size: 2.5rem;
166
+ }
167
+
168
+ @media (forced-colors: active) {
169
+ .ui-splitter__handle {
170
+ border-color: CanvasText;
171
+ }
172
+
173
+ .ui-splitter__handle::before {
174
+ background: CanvasText;
175
+ }
176
+ }