@ponchia/ui 0.7.0 → 0.8.0
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.
- package/CHANGELOG.md +133 -0
- package/README.md +3 -3
- package/classes/classes.json +79 -7
- package/classes/index.d.ts +53 -1
- package/classes/index.js +60 -0
- package/classes/vscode.css-custom-data.json +24 -0
- package/css/app.css +14 -3
- package/css/disclosure.css +7 -7
- package/css/feedback.css +11 -8
- package/css/forms.css +3 -3
- package/css/navigation.css +1 -1
- package/css/overlay.css +19 -5
- package/css/primitives.css +101 -6
- package/css/site.css +11 -5
- package/css/skins.css +97 -3
- package/css/state.css +161 -0
- package/css/table.css +1 -1
- package/css/tokens.css +6 -0
- package/css/workbench.css +151 -0
- package/dist/bronto.css +1 -1
- package/dist/css/app.css +1 -1
- package/dist/css/disclosure.css +1 -1
- package/dist/css/feedback.css +1 -1
- package/dist/css/forms.css +1 -1
- package/dist/css/navigation.css +1 -1
- package/dist/css/overlay.css +1 -1
- package/dist/css/primitives.css +1 -1
- package/dist/css/report-kit.css +1 -1
- package/dist/css/site.css +1 -1
- package/dist/css/skins.css +1 -1
- package/dist/css/state.css +1 -1
- package/dist/css/table.css +1 -1
- package/dist/css/tokens.css +1 -1
- package/dist/css/workbench.css +1 -1
- package/docs/adr/0001-color-system.md +32 -3
- package/docs/contrast.md +102 -18
- package/docs/reference.md +52 -1
- package/docs/reporting.md +8 -8
- package/docs/stability.md +31 -2
- package/docs/state.md +51 -1
- package/docs/theming.md +18 -0
- package/docs/usage.md +62 -2
- package/docs/workbench.md +83 -4
- package/llms.txt +1 -1
- package/package.json +1 -1
- package/tokens/figma.variables.json +84 -0
- package/tokens/index.d.ts +2 -2
- package/tokens/index.js +23 -0
- package/tokens/index.json +12 -0
- package/tokens/resolved.json +6 -0
- package/tokens/skins.js +117 -7
- package/tokens/tokens.dtcg.json +7 -1
package/css/table.css
CHANGED
package/css/tokens.css
CHANGED
|
@@ -25,6 +25,12 @@
|
|
|
25
25
|
--space-lg: 1.35rem;
|
|
26
26
|
--space-xl: 1.75rem;
|
|
27
27
|
--space-2xl: 2.5rem;
|
|
28
|
+
--tap-target: max(44px, 2.9rem);
|
|
29
|
+
--tap-target-min: max(24px, 1.6rem);
|
|
30
|
+
--safe-area-top: env(safe-area-inset-top, 0px);
|
|
31
|
+
--safe-area-right: env(safe-area-inset-right, 0px);
|
|
32
|
+
--safe-area-bottom: env(safe-area-inset-bottom, 0px);
|
|
33
|
+
--safe-area-left: env(safe-area-inset-left, 0px);
|
|
28
34
|
|
|
29
35
|
/* Type — Doto is the dot-matrix display face; body stays mono-grotesque. */
|
|
30
36
|
--mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'SF Mono', ui-monospace, monospace;
|
package/css/workbench.css
CHANGED
|
@@ -56,6 +56,36 @@
|
|
|
56
56
|
padding: 0.25rem;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
+
/* Pane-scale — a control bar belonging to ONE pane rather than to the app. The
|
|
60
|
+
difference from `--compact` is not density but framing: this bar is a row
|
|
61
|
+
inside a surface that already has a border, so it drops its own frame and
|
|
62
|
+
corners and rules off from the content below instead. It also refuses to
|
|
63
|
+
wrap: a pane bar sits directly above content that may be a live terminal or
|
|
64
|
+
an editor, and a second row would resize that content on every state change.
|
|
65
|
+
The row scrolls instead — see `__fill` for what gives up the space. */
|
|
66
|
+
.ui-toolstrip--pane {
|
|
67
|
+
background: none;
|
|
68
|
+
border: 0;
|
|
69
|
+
border-block-end: 1px solid var(--line);
|
|
70
|
+
border-radius: 0;
|
|
71
|
+
flex-wrap: nowrap;
|
|
72
|
+
gap: var(--space-2xs);
|
|
73
|
+
overflow-x: auto;
|
|
74
|
+
padding: 0.3rem var(--space-xs);
|
|
75
|
+
scrollbar-width: thin;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/* The element that absorbs slack and gives it back first — a title, a path, a
|
|
79
|
+
filter input. Everything else in the bar keeps its size, so the control that
|
|
80
|
+
would otherwise be pushed past the clipped edge stays reachable. */
|
|
81
|
+
.ui-toolstrip__fill {
|
|
82
|
+
flex: 1 1 auto;
|
|
83
|
+
min-inline-size: 0;
|
|
84
|
+
overflow: hidden;
|
|
85
|
+
text-overflow: ellipsis;
|
|
86
|
+
white-space: nowrap;
|
|
87
|
+
}
|
|
88
|
+
|
|
59
89
|
.ui-toolstrip__brand {
|
|
60
90
|
align-items: baseline;
|
|
61
91
|
display: inline-flex;
|
|
@@ -168,6 +198,96 @@
|
|
|
168
198
|
min-inline-size: 0;
|
|
169
199
|
}
|
|
170
200
|
|
|
201
|
+
/* --- Pane — a movable, renameable surface with a grab header.
|
|
202
|
+
|
|
203
|
+
`.ui-panel` is a padded card and `.ui-inspector` is head-plus-body; neither
|
|
204
|
+
is a window. A pane is what a canvas node, a floating tool window, or a
|
|
205
|
+
dockable panel needs: a header you can drag, a title that renames in place,
|
|
206
|
+
an actions slot that survives a narrow pane, and a body that owns the rest.
|
|
207
|
+
|
|
208
|
+
Bronto paints the frame only. The host owns dragging, z-order, focus policy,
|
|
209
|
+
persistence, and what the actions do — this leaf has no behavior. --- */
|
|
210
|
+
.ui-pane {
|
|
211
|
+
background: var(--panel);
|
|
212
|
+
border: 1px solid var(--line);
|
|
213
|
+
border-radius: var(--radius-md);
|
|
214
|
+
display: flex;
|
|
215
|
+
flex-direction: column;
|
|
216
|
+
min-block-size: 0;
|
|
217
|
+
min-inline-size: 0;
|
|
218
|
+
overflow: hidden;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
/* `cursor: grab` states the affordance; the host wires the gesture. */
|
|
222
|
+
.ui-pane__head {
|
|
223
|
+
align-items: center;
|
|
224
|
+
background: var(--bg-elevated);
|
|
225
|
+
border-block-end: 1px solid var(--line);
|
|
226
|
+
cursor: grab;
|
|
227
|
+
display: flex;
|
|
228
|
+
flex: none;
|
|
229
|
+
gap: var(--space-2xs);
|
|
230
|
+
min-block-size: var(--pane-head, 2.5rem);
|
|
231
|
+
padding: var(--space-2xs) var(--space-xs);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.ui-pane__head:active {
|
|
235
|
+
cursor: grabbing;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
/* The title gives up space FIRST — it is the one thing in the header that can
|
|
239
|
+
be truncated without losing a function. */
|
|
240
|
+
.ui-pane__title {
|
|
241
|
+
flex: 1 1 auto;
|
|
242
|
+
font-size: var(--text-xs);
|
|
243
|
+
min-inline-size: 0;
|
|
244
|
+
overflow: hidden;
|
|
245
|
+
text-overflow: ellipsis;
|
|
246
|
+
white-space: nowrap;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
/* Rename in place. It inherits the type it replaces so the swap from label to
|
|
250
|
+
input does not move a single pixel of layout; only the accent border says
|
|
251
|
+
"you are typing a name now". Pair with `.ui-pane__title` on the input too. */
|
|
252
|
+
.ui-pane__title-input {
|
|
253
|
+
background: var(--bg-elevated);
|
|
254
|
+
border: 1px solid var(--accent);
|
|
255
|
+
border-radius: var(--radius-sm);
|
|
256
|
+
color: inherit;
|
|
257
|
+
font: inherit;
|
|
258
|
+
letter-spacing: inherit;
|
|
259
|
+
margin-block: -1px;
|
|
260
|
+
max-inline-size: 100%;
|
|
261
|
+
min-inline-size: 0;
|
|
262
|
+
padding: 0 0.25rem;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
/* Shrinks only AFTER the title is gone, and then scrolls rather than pushing
|
|
266
|
+
its last control past the pane's clipped edge — the failure that hides a
|
|
267
|
+
control the user needs (close, focus, disconnect) with no way to reach it. */
|
|
268
|
+
.ui-pane__actions {
|
|
269
|
+
display: flex;
|
|
270
|
+
flex: 0 1 auto;
|
|
271
|
+
flex-wrap: nowrap;
|
|
272
|
+
gap: var(--space-2xs);
|
|
273
|
+
min-inline-size: 0;
|
|
274
|
+
overflow-x: auto;
|
|
275
|
+
scrollbar-width: thin;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
.ui-pane__actions:empty {
|
|
279
|
+
display: none;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
.ui-pane__body {
|
|
283
|
+
display: flex;
|
|
284
|
+
flex: 1;
|
|
285
|
+
flex-direction: column;
|
|
286
|
+
min-block-size: 0;
|
|
287
|
+
min-inline-size: 0;
|
|
288
|
+
overflow: auto;
|
|
289
|
+
}
|
|
290
|
+
|
|
171
291
|
/* --- Selection bar — actions on the current selection ("3 selected"). --- */
|
|
172
292
|
.ui-selectionbar {
|
|
173
293
|
align-items: center;
|
|
@@ -194,6 +314,37 @@
|
|
|
194
314
|
gap: var(--space-xs);
|
|
195
315
|
}
|
|
196
316
|
|
|
317
|
+
/* Anchor a floating bar to a viewport edge, clear of any display cutout or
|
|
318
|
+
gesture area. Both `--floating` bars above are shadowed but position-less,
|
|
319
|
+
so every consumer re-derives this — including the `max(offset, inset)` shape,
|
|
320
|
+
which is the part people get wrong by writing a bare offset that a phone then
|
|
321
|
+
swallows. `--anchor-block-end` is the default because a bar the thumb must
|
|
322
|
+
reach belongs at the bottom; `--anchor-block-start` is for the bar that must
|
|
323
|
+
not be under the thumb (a destructive-action or recovery bar).
|
|
324
|
+
|
|
325
|
+
The host still owns z-index — it knows what else is on the canvas. */
|
|
326
|
+
.ui-selectionbar--anchored,
|
|
327
|
+
.ui-toolstrip--anchored {
|
|
328
|
+
--anchor-offset: var(--space-sm);
|
|
329
|
+
|
|
330
|
+
inset-inline-start: 50%;
|
|
331
|
+
max-inline-size: calc(100% - 2 * var(--space-md));
|
|
332
|
+
position: absolute;
|
|
333
|
+
transform: translateX(-50%);
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
.ui-selectionbar--anchored,
|
|
337
|
+
.ui-toolstrip--anchored,
|
|
338
|
+
.ui-selectionbar--anchor-block-end,
|
|
339
|
+
.ui-toolstrip--anchor-block-end {
|
|
340
|
+
inset-block: auto max(var(--anchor-offset), var(--safe-area-bottom));
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
.ui-selectionbar--anchor-block-start,
|
|
344
|
+
.ui-toolstrip--anchor-block-start {
|
|
345
|
+
inset-block: max(var(--anchor-offset), var(--safe-area-top)) auto;
|
|
346
|
+
}
|
|
347
|
+
|
|
197
348
|
@media (hover: hover) {
|
|
198
349
|
.ui-segmented-buttons__button:hover:not(:disabled, [aria-disabled='true'], [aria-pressed='true'], .is-active) {
|
|
199
350
|
background: var(--panel);
|