@ponchia/ui 0.4.1 → 0.5.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 +230 -8
- package/MIGRATIONS.json +92 -0
- package/README.md +9 -6
- package/annotations/index.d.ts +280 -0
- package/annotations/index.js +522 -0
- package/behaviors/carousel.js +197 -0
- package/behaviors/combobox.js +195 -0
- package/behaviors/command.js +187 -0
- package/behaviors/connectors.js +96 -0
- package/behaviors/crosshair.js +58 -0
- package/behaviors/dialog.js +73 -0
- package/behaviors/disclosure.js +25 -0
- package/behaviors/dismissible.js +24 -0
- package/behaviors/forms.js +158 -0
- package/behaviors/glyph.js +109 -0
- package/behaviors/index.d.ts +79 -0
- package/behaviors/index.js +18 -1409
- package/behaviors/internal.js +50 -0
- package/behaviors/legend.js +46 -0
- package/behaviors/menu.js +46 -0
- package/behaviors/popover.js +108 -0
- package/behaviors/spotlight.js +53 -0
- package/behaviors/table.js +109 -0
- package/behaviors/tabs.js +103 -0
- package/behaviors/theme.js +82 -0
- package/behaviors/toast.js +152 -0
- package/classes/index.d.ts +280 -2
- package/classes/index.js +313 -2
- package/connectors/index.d.ts +71 -0
- package/connectors/index.js +179 -0
- package/css/analytical.css +21 -0
- package/css/annotations.css +292 -0
- package/css/command.css +97 -0
- package/css/connectors.css +93 -0
- package/css/crosshair.css +100 -0
- package/css/feedback.css +51 -0
- package/css/fonts.css +11 -7
- package/css/generated.css +117 -0
- package/css/legend.css +268 -0
- package/css/marks.css +144 -0
- package/css/primitives.css +18 -0
- package/css/report.css +12 -31
- package/css/selection.css +46 -0
- package/css/sources.css +179 -0
- package/css/spotlight.css +104 -0
- package/css/state.css +121 -0
- package/css/tokens.css +25 -37
- package/css/workbench.css +83 -0
- package/dist/bronto.css +1 -1
- package/dist/css/analytical.css +1 -0
- package/dist/css/annotations.css +1 -0
- package/dist/css/command.css +1 -0
- package/dist/css/connectors.css +1 -0
- package/dist/css/crosshair.css +1 -0
- package/dist/css/feedback.css +1 -1
- package/dist/css/fonts.css +1 -1
- package/dist/css/generated.css +1 -0
- package/dist/css/legend.css +1 -0
- package/dist/css/marks.css +1 -0
- package/dist/css/primitives.css +1 -1
- package/dist/css/report.css +1 -1
- package/dist/css/selection.css +1 -0
- package/dist/css/sources.css +1 -0
- package/dist/css/spotlight.css +1 -0
- package/dist/css/state.css +1 -0
- package/dist/css/workbench.css +1 -0
- package/docs/adr/0003-theme-model.md +7 -4
- package/docs/annotations.md +345 -0
- package/docs/architecture.md +202 -0
- package/docs/command.md +95 -0
- package/docs/connectors.md +91 -0
- package/docs/crosshair.md +63 -0
- package/docs/generated.md +91 -0
- package/docs/legends.md +168 -0
- package/docs/marks.md +86 -0
- package/docs/reference.md +309 -3
- package/docs/reporting.md +49 -14
- package/docs/selection.md +40 -0
- package/docs/sources.md +110 -0
- package/docs/spotlight.md +78 -0
- package/docs/stability.md +16 -1
- package/docs/state.md +85 -0
- package/docs/usage.md +22 -0
- package/docs/workbench.md +72 -0
- package/fonts/doto-400.woff2 +0 -0
- package/fonts/doto-500.woff2 +0 -0
- package/fonts/doto-600.woff2 +0 -0
- package/fonts/doto-700.woff2 +0 -0
- package/fonts/doto-800.woff2 +0 -0
- package/fonts/doto-900.woff2 +0 -0
- package/llms.txt +229 -6
- package/package.json +69 -4
- package/qwik/index.d.ts +5 -0
- package/qwik/index.js +20 -0
- package/react/index.d.ts +5 -0
- package/react/index.js +10 -0
- package/solid/index.d.ts +5 -0
- package/solid/index.js +10 -0
- package/tokens/index.js +9 -5
- package/fonts/doto-400.ttf +0 -0
- package/fonts/doto-500.ttf +0 -0
- package/fonts/doto-600.ttf +0 -0
- package/fonts/doto-700.ttf +0 -0
- package/fonts/doto-800.ttf +0 -0
- package/fonts/doto-900.ttf +0 -0
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/* ==========================================================================
|
|
2
|
+
generated — opt-in trust surfaces for AI / system-generated content.
|
|
3
|
+
|
|
4
|
+
AI interfaces are becoming common, but most UI systems ship chat bubbles or
|
|
5
|
+
nothing. Bronto is not a chat framework — it owns the *trust* surfaces around
|
|
6
|
+
generated content: a marked region, an origin label, and quiet collapsible
|
|
7
|
+
reasoning / tool-call logs. Pairs with the source/citation layer
|
|
8
|
+
(css/sources.css). The host owns model metadata, reasoning-visibility policy,
|
|
9
|
+
tool execution, traces, redaction, and safety. Not imported by core.css.
|
|
10
|
+
========================================================================== */
|
|
11
|
+
|
|
12
|
+
/* --- Generated region — a marked wrapper for machine-authored content. --- */
|
|
13
|
+
.ui-generated {
|
|
14
|
+
background: color-mix(in srgb, var(--accent) 4%, transparent);
|
|
15
|
+
border: 1px solid var(--line);
|
|
16
|
+
border-inline-start: 2px solid var(--accent);
|
|
17
|
+
border-radius: var(--radius-md);
|
|
18
|
+
display: grid;
|
|
19
|
+
gap: var(--space-xs);
|
|
20
|
+
padding: 0.85rem 1rem;
|
|
21
|
+
print-color-adjust: exact;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.ui-generated__label {
|
|
25
|
+
align-items: center;
|
|
26
|
+
color: var(--text-dim);
|
|
27
|
+
display: inline-flex;
|
|
28
|
+
font-family: var(--mono);
|
|
29
|
+
font-size: var(--text-2xs);
|
|
30
|
+
gap: 0.4rem;
|
|
31
|
+
letter-spacing: var(--tracking-wide);
|
|
32
|
+
text-transform: uppercase;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/* --- Origin label — "AI assisted" / "model output" / "human reviewed". --- */
|
|
36
|
+
.ui-origin-label {
|
|
37
|
+
align-items: center;
|
|
38
|
+
border: 1px solid var(--line);
|
|
39
|
+
border-radius: var(--radius-pill);
|
|
40
|
+
color: var(--text-soft);
|
|
41
|
+
display: inline-flex;
|
|
42
|
+
font-family: var(--mono);
|
|
43
|
+
font-size: var(--text-2xs);
|
|
44
|
+
gap: 0.35rem;
|
|
45
|
+
letter-spacing: var(--tracking-wide);
|
|
46
|
+
padding: 0.08rem 0.55rem;
|
|
47
|
+
text-transform: uppercase;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.ui-origin-label--ai {
|
|
51
|
+
border-color: var(--accent);
|
|
52
|
+
color: var(--accent-text);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/* --- Reasoning — a quiet, collapsible "how this was produced" block. --- */
|
|
56
|
+
.ui-reasoning {
|
|
57
|
+
color: var(--text-dim);
|
|
58
|
+
font-size: var(--text-sm);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.ui-reasoning > summary {
|
|
62
|
+
color: var(--text-soft);
|
|
63
|
+
cursor: pointer;
|
|
64
|
+
font-family: var(--mono);
|
|
65
|
+
font-size: var(--text-2xs);
|
|
66
|
+
letter-spacing: var(--tracking-wide);
|
|
67
|
+
text-transform: uppercase;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.ui-reasoning__body {
|
|
71
|
+
margin-block-start: var(--space-xs);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/* --- Tool log — a quiet, document-grade record of tool invocations. --- */
|
|
75
|
+
.ui-tool-log {
|
|
76
|
+
display: grid;
|
|
77
|
+
gap: var(--space-2xs);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.ui-tool-call {
|
|
81
|
+
border: 1px solid var(--line);
|
|
82
|
+
border-radius: var(--radius-sm);
|
|
83
|
+
font-family: var(--mono);
|
|
84
|
+
font-size: var(--text-2xs);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.ui-tool-call > summary {
|
|
88
|
+
align-items: center;
|
|
89
|
+
cursor: pointer;
|
|
90
|
+
display: flex;
|
|
91
|
+
gap: 0.5rem;
|
|
92
|
+
padding: 0.4rem 0.6rem;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.ui-tool-call__name {
|
|
96
|
+
color: var(--text);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.ui-tool-call__status {
|
|
100
|
+
color: var(--text-dim);
|
|
101
|
+
margin-inline-start: auto;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.ui-tool-call__body {
|
|
105
|
+
border-block-start: 1px solid var(--line);
|
|
106
|
+
color: var(--text-soft);
|
|
107
|
+
margin: 0;
|
|
108
|
+
overflow-x: auto;
|
|
109
|
+
padding: 0.5rem 0.6rem;
|
|
110
|
+
white-space: pre-wrap;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
@media (forced-colors: active) {
|
|
114
|
+
.ui-generated {
|
|
115
|
+
border-inline-start-color: CanvasText;
|
|
116
|
+
}
|
|
117
|
+
}
|
package/css/legend.css
ADDED
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
/* ==========================================================================
|
|
2
|
+
legend — opt-in data keys for charts, reports, and analytical figures.
|
|
3
|
+
|
|
4
|
+
A standalone, portable successor to the report kit's inline chart legend:
|
|
5
|
+
`.ui-legend` reads the Tier-4 `--chart-*` tokens and pairs with any chart
|
|
6
|
+
(Bronto's own `.ui-chart` bars, an SVG/canvas figure, or an external chart
|
|
7
|
+
engine). Not imported by core.css — import it beside css/dataviz.css.
|
|
8
|
+
|
|
9
|
+
Bronto paints and positions; it owns no scales, data mapping, or series
|
|
10
|
+
state. Colour is never the sole channel: a swatch mirrors its chart mark
|
|
11
|
+
(its colour, plus a `--chart-pattern-*` where the mark uses one) and is
|
|
12
|
+
always read out by its text label (WCAG 1.4.1). An interactive,
|
|
13
|
+
series-toggling legend is an optional behavior; the host owns what a
|
|
14
|
+
toggle hides and announces.
|
|
15
|
+
========================================================================== */
|
|
16
|
+
|
|
17
|
+
.ui-legend {
|
|
18
|
+
color: var(--text-soft);
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-wrap: wrap;
|
|
21
|
+
font-family: var(--mono);
|
|
22
|
+
font-size: var(--text-xs);
|
|
23
|
+
gap: var(--space-2xs) var(--space-md);
|
|
24
|
+
list-style: none;
|
|
25
|
+
margin: 0;
|
|
26
|
+
padding: 0;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.ui-legend--vertical {
|
|
30
|
+
flex-direction: column;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.ui-legend--compact {
|
|
34
|
+
font-size: var(--text-2xs);
|
|
35
|
+
gap: var(--space-2xs) var(--space-sm);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.ui-legend__title {
|
|
39
|
+
color: var(--text-dim);
|
|
40
|
+
font-size: var(--text-2xs);
|
|
41
|
+
letter-spacing: 0;
|
|
42
|
+
margin: 0;
|
|
43
|
+
text-transform: uppercase;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.ui-legend__item {
|
|
47
|
+
align-items: center;
|
|
48
|
+
color: inherit;
|
|
49
|
+
display: inline-flex;
|
|
50
|
+
gap: 0.45rem;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.ui-legend__label {
|
|
54
|
+
color: inherit;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.ui-legend__value {
|
|
58
|
+
color: var(--text-dim);
|
|
59
|
+
font-variant-numeric: tabular-nums;
|
|
60
|
+
margin-inline-start: auto;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.ui-legend__caption {
|
|
64
|
+
color: var(--text-dim);
|
|
65
|
+
font-size: var(--text-2xs);
|
|
66
|
+
letter-spacing: 0;
|
|
67
|
+
text-transform: uppercase;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/* Swatch — same token contract as the chart fill: set `--chart-color` (and,
|
|
71
|
+
where the mark is patterned, `--chart-pattern`) inline, or use a `--N` index
|
|
72
|
+
helper for the categorical palette. */
|
|
73
|
+
.ui-legend__swatch {
|
|
74
|
+
background: var(--chart-color, var(--chart-1, var(--accent)));
|
|
75
|
+
background-image: var(--chart-pattern, none);
|
|
76
|
+
background-size: var(--chart-pattern-size, 8px);
|
|
77
|
+
block-size: 0.8rem;
|
|
78
|
+
border: 1px solid var(--line-strong);
|
|
79
|
+
flex: 0 0 auto;
|
|
80
|
+
inline-size: 0.8rem;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.ui-legend__swatch--circle {
|
|
84
|
+
border-radius: 50%;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.ui-legend__swatch--line {
|
|
88
|
+
block-size: 0.2rem;
|
|
89
|
+
border: 0;
|
|
90
|
+
inline-size: 1.1rem;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/* Glyph/symbol swatch — fill an `.ui-icon` mask with the series colour. */
|
|
94
|
+
.ui-legend__symbol {
|
|
95
|
+
block-size: 0.95rem;
|
|
96
|
+
color: var(--chart-color, var(--accent));
|
|
97
|
+
flex: 0 0 auto;
|
|
98
|
+
inline-size: 0.95rem;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/* Categorical index helpers: exactly one per palette series (gated against
|
|
102
|
+
tokens/charts.js by check-legend). They set only the colour, so a swatch
|
|
103
|
+
stays a faithful key — add `--chart-pattern` (inline, or from dataviz.css)
|
|
104
|
+
only where the chart mark itself is patterned. */
|
|
105
|
+
.ui-legend__swatch--1 {
|
|
106
|
+
--chart-color: var(--chart-1);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.ui-legend__swatch--2 {
|
|
110
|
+
--chart-color: var(--chart-2);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.ui-legend__swatch--3 {
|
|
114
|
+
--chart-color: var(--chart-3);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.ui-legend__swatch--4 {
|
|
118
|
+
--chart-color: var(--chart-4);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.ui-legend__swatch--5 {
|
|
122
|
+
--chart-color: var(--chart-5);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.ui-legend__swatch--6 {
|
|
126
|
+
--chart-color: var(--chart-6);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.ui-legend__swatch--7 {
|
|
130
|
+
--chart-color: var(--chart-7);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.ui-legend__swatch--8 {
|
|
134
|
+
--chart-color: var(--chart-8);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/* Continuous colour ramp. Author supplies the min/mid/max tick *text*; the
|
|
138
|
+
track interpolates the sequential ramp in OKLCH (a single perceptual hue,
|
|
139
|
+
so no banding and no muddy midpoint). `--diverging` swaps in the 7-stop
|
|
140
|
+
diverging ramp around its neutral centre. */
|
|
141
|
+
.ui-legend--gradient {
|
|
142
|
+
display: grid;
|
|
143
|
+
gap: var(--space-2xs);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.ui-legend__track {
|
|
147
|
+
background: linear-gradient(
|
|
148
|
+
90deg in oklch,
|
|
149
|
+
var(--chart-seq-1),
|
|
150
|
+
var(--chart-seq-2),
|
|
151
|
+
var(--chart-seq-3),
|
|
152
|
+
var(--chart-seq-4),
|
|
153
|
+
var(--chart-seq-5),
|
|
154
|
+
var(--chart-seq-6)
|
|
155
|
+
);
|
|
156
|
+
block-size: 0.7rem;
|
|
157
|
+
border: 1px solid var(--line);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.ui-legend--diverging .ui-legend__track {
|
|
161
|
+
background: linear-gradient(
|
|
162
|
+
90deg in oklch,
|
|
163
|
+
var(--chart-div-1),
|
|
164
|
+
var(--chart-div-2),
|
|
165
|
+
var(--chart-div-3),
|
|
166
|
+
var(--chart-div-4),
|
|
167
|
+
var(--chart-div-5),
|
|
168
|
+
var(--chart-div-6),
|
|
169
|
+
var(--chart-div-7)
|
|
170
|
+
);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.ui-legend__ticks {
|
|
174
|
+
color: var(--text-dim);
|
|
175
|
+
display: flex;
|
|
176
|
+
font-size: var(--text-2xs);
|
|
177
|
+
justify-content: space-between;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.ui-legend__tick {
|
|
181
|
+
font-variant-numeric: tabular-nums;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/* Threshold / binned key — a `swatch | range-label` grid. Author the swatch
|
|
185
|
+
and label as direct children (no `__item` wrapper) so the columns align. */
|
|
186
|
+
.ui-legend--threshold {
|
|
187
|
+
align-items: center;
|
|
188
|
+
display: grid;
|
|
189
|
+
gap: 0.35rem var(--space-sm);
|
|
190
|
+
grid-template-columns: auto 1fr;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/* With-values — align swatch | label | value columns across every row. */
|
|
194
|
+
.ui-legend--with-values {
|
|
195
|
+
display: grid;
|
|
196
|
+
gap: 0.35rem var(--space-md);
|
|
197
|
+
grid-template-columns: auto 1fr auto;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.ui-legend--with-values .ui-legend__item {
|
|
201
|
+
display: grid;
|
|
202
|
+
grid-column: 1 / -1;
|
|
203
|
+
grid-template-columns: subgrid;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.ui-legend--with-values .ui-legend__value {
|
|
207
|
+
margin-inline-start: 0;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/* Interactive entries are real <button aria-pressed> controls. Bronto styles
|
|
211
|
+
the control + the inactive state; behaviors/legend.js (optional) flips
|
|
212
|
+
aria-pressed and emits an event. The host hides the series and announces it. */
|
|
213
|
+
.ui-legend--interactive .ui-legend__item {
|
|
214
|
+
background: none;
|
|
215
|
+
border: 0;
|
|
216
|
+
border-radius: var(--radius-sm);
|
|
217
|
+
color: inherit;
|
|
218
|
+
cursor: pointer;
|
|
219
|
+
font: inherit;
|
|
220
|
+
padding-block: 0.15rem;
|
|
221
|
+
padding-inline: 0.3rem;
|
|
222
|
+
text-align: start;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.ui-legend--interactive .ui-legend__item:focus-visible {
|
|
226
|
+
outline: 2px solid var(--accent);
|
|
227
|
+
outline-offset: 2px;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.ui-legend__item.is-inactive,
|
|
231
|
+
.ui-legend__item[aria-pressed='false'] {
|
|
232
|
+
opacity: 0.45;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.ui-legend__item.is-inactive .ui-legend__label,
|
|
236
|
+
.ui-legend__item[aria-pressed='false'] .ui-legend__label {
|
|
237
|
+
text-decoration: line-through;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
/* Forced colours: keep the real swatch hue (it mirrors the chart mark) behind
|
|
241
|
+
a system-coloured border so it survives, and drop the opacity dim (it does
|
|
242
|
+
not read) — the line-through still marks an inactive series. */
|
|
243
|
+
@media (forced-colors: active) {
|
|
244
|
+
.ui-legend__swatch {
|
|
245
|
+
border: 1px solid CanvasText;
|
|
246
|
+
forced-color-adjust: none;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
/* Keep the ramp's hues instead of collapsing to one system colour (the tick
|
|
250
|
+
labels still carry the scale either way). */
|
|
251
|
+
.ui-legend__track {
|
|
252
|
+
forced-color-adjust: none;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.ui-legend__item.is-inactive,
|
|
256
|
+
.ui-legend__item[aria-pressed='false'] {
|
|
257
|
+
opacity: 1;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
/* Print: meaning-carrying colour must survive the "economy" default. */
|
|
262
|
+
@media print {
|
|
263
|
+
.ui-legend__swatch,
|
|
264
|
+
.ui-legend__track {
|
|
265
|
+
-webkit-print-color-adjust: exact;
|
|
266
|
+
print-color-adjust: exact;
|
|
267
|
+
}
|
|
268
|
+
}
|
package/css/marks.css
ADDED
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
/* ==========================================================================
|
|
2
|
+
marks — opt-in evidence/emphasis marks for running text.
|
|
3
|
+
|
|
4
|
+
The prose counterpart to the SVG annotations layer: annotations call out a
|
|
5
|
+
figure, marks call out a sentence. Sober, report-grade highlights for docs,
|
|
6
|
+
audits, and generated (LLM) reports — not a hand-drawn Rough-Notation look.
|
|
7
|
+
Not imported by core.css.
|
|
8
|
+
|
|
9
|
+
`.ui-mark` is an inline highlight (put it on a `<mark>`); `.ui-bracket-note`
|
|
10
|
+
brackets a whole passage. Monochrome by default — the rationed accent is
|
|
11
|
+
opt-in via `--accent`; status tones are only for status-bearing emphasis.
|
|
12
|
+
========================================================================== */
|
|
13
|
+
|
|
14
|
+
.ui-mark {
|
|
15
|
+
--mark-color: var(--line-strong);
|
|
16
|
+
|
|
17
|
+
background-image: linear-gradient(
|
|
18
|
+
90deg,
|
|
19
|
+
color-mix(in srgb, var(--mark-color) 30%, transparent),
|
|
20
|
+
color-mix(in srgb, var(--mark-color) 30%, transparent)
|
|
21
|
+
);
|
|
22
|
+
background-repeat: no-repeat;
|
|
23
|
+
background-size: 100% 100%;
|
|
24
|
+
border-radius: 0.12em;
|
|
25
|
+
box-decoration-break: clone;
|
|
26
|
+
color: inherit;
|
|
27
|
+
padding-block: 0.05em;
|
|
28
|
+
padding-inline: 0.18em;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/* Tones set the mark colour. Default is neutral ink; `--accent` is the
|
|
32
|
+
rationed accent; status tones only for status-bearing emphasis. */
|
|
33
|
+
.ui-mark--accent {
|
|
34
|
+
--mark-color: var(--accent);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.ui-mark--success {
|
|
38
|
+
--mark-color: var(--success);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.ui-mark--warning {
|
|
42
|
+
--mark-color: var(--warning);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.ui-mark--danger {
|
|
46
|
+
--mark-color: var(--danger);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.ui-mark--info {
|
|
50
|
+
--mark-color: var(--info);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.ui-mark--muted {
|
|
54
|
+
--mark-color: var(--text-dim);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/* Styles change how the mark is drawn (no highlight fill). They wrap across
|
|
58
|
+
lines natively (text-decoration) or with the cloned box (border). */
|
|
59
|
+
.ui-mark--underline {
|
|
60
|
+
background: none;
|
|
61
|
+
padding: 0;
|
|
62
|
+
text-decoration-color: var(--mark-color);
|
|
63
|
+
text-decoration-line: underline;
|
|
64
|
+
text-decoration-thickness: 0.12em;
|
|
65
|
+
text-underline-offset: 0.18em;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.ui-mark--box {
|
|
69
|
+
background: none;
|
|
70
|
+
border: 1px solid var(--mark-color);
|
|
71
|
+
border-radius: var(--radius-sm);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.ui-mark--strike {
|
|
75
|
+
background: none;
|
|
76
|
+
padding: 0;
|
|
77
|
+
text-decoration-color: var(--mark-color);
|
|
78
|
+
text-decoration-line: line-through;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/* Draw-on highlight sweep. Only the highlight fill animates, and only when
|
|
82
|
+
motion is welcome — reduced-motion keeps the resting full highlight. */
|
|
83
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
84
|
+
.ui-mark--draw {
|
|
85
|
+
animation: ui-mark-draw 0.6s var(--ease, ease) both;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
@keyframes ui-mark-draw {
|
|
90
|
+
from {
|
|
91
|
+
background-size: 0% 100%;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
to {
|
|
95
|
+
background-size: 100% 100%;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/* A passage bracket: a tick down the inline-start with an optional label.
|
|
100
|
+
The prose analogue of `ui-annotation--bracket`. */
|
|
101
|
+
.ui-bracket-note {
|
|
102
|
+
--mark-color: var(--line-strong);
|
|
103
|
+
|
|
104
|
+
border-inline-start: 2px solid var(--mark-color);
|
|
105
|
+
display: block;
|
|
106
|
+
padding-inline-start: var(--space-md);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.ui-bracket-note__label {
|
|
110
|
+
color: var(--mark-color);
|
|
111
|
+
display: block;
|
|
112
|
+
font-family: var(--mono);
|
|
113
|
+
font-size: var(--text-2xs);
|
|
114
|
+
letter-spacing: 0;
|
|
115
|
+
margin-block-end: var(--space-2xs);
|
|
116
|
+
text-transform: uppercase;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.ui-bracket-note--accent {
|
|
120
|
+
--mark-color: var(--accent);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.ui-bracket-note--warning {
|
|
124
|
+
--mark-color: var(--warning);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.ui-bracket-note--danger {
|
|
128
|
+
--mark-color: var(--danger);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.ui-bracket-note--info {
|
|
132
|
+
--mark-color: var(--info);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/* Forced colours: only the highlight `background` is dropped, so add an
|
|
136
|
+
underline to the plain highlight mark to keep it visible. The styled marks
|
|
137
|
+
already carry a surviving channel — `--underline`/`--strike` use
|
|
138
|
+
text-decoration and `--box` a border — so they're excluded (otherwise the
|
|
139
|
+
underline would overwrite `--strike`'s line-through and lose its meaning). */
|
|
140
|
+
@media (forced-colors: active) {
|
|
141
|
+
.ui-mark:not(.ui-mark--underline, .ui-mark--box, .ui-mark--strike) {
|
|
142
|
+
text-decoration-line: underline;
|
|
143
|
+
}
|
|
144
|
+
}
|
package/css/primitives.css
CHANGED
|
@@ -649,6 +649,24 @@
|
|
|
649
649
|
padding: 0.18rem 0.4rem;
|
|
650
650
|
}
|
|
651
651
|
|
|
652
|
+
/* --- Shortcut hint — one or more .ui-kbd keys as a chord or sequence, with a
|
|
653
|
+
connective __sep ("+" for a chord, "then" for a sequence). The reusable
|
|
654
|
+
keyboard-hint primitive (menu items, buttons, tooltips, command lists). --- */
|
|
655
|
+
|
|
656
|
+
.ui-shortcut {
|
|
657
|
+
align-items: center;
|
|
658
|
+
display: inline-flex;
|
|
659
|
+
gap: 0.25rem;
|
|
660
|
+
vertical-align: middle;
|
|
661
|
+
white-space: nowrap;
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
.ui-shortcut__sep {
|
|
665
|
+
color: var(--text-dim);
|
|
666
|
+
font-family: var(--mono);
|
|
667
|
+
font-size: var(--text-2xs);
|
|
668
|
+
}
|
|
669
|
+
|
|
652
670
|
/* --- Timeline — vertical event list on a hairline spine. Use an <ol>;
|
|
653
671
|
each <li> is a __item with an optional __time label. aria-current marks
|
|
654
672
|
the live/most-recent event (accent marker). --- */
|
package/css/report.css
CHANGED
|
@@ -224,34 +224,9 @@
|
|
|
224
224
|
padding: var(--space-md);
|
|
225
225
|
}
|
|
226
226
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
gap: var(--space-xs);
|
|
231
|
-
list-style: none;
|
|
232
|
-
margin: 0;
|
|
233
|
-
padding: 0;
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
.ui-chart__legend > * {
|
|
237
|
-
align-items: center;
|
|
238
|
-
color: var(--text-soft);
|
|
239
|
-
display: inline-flex;
|
|
240
|
-
font-family: var(--mono);
|
|
241
|
-
font-size: var(--text-xs);
|
|
242
|
-
gap: 0.45rem;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
.ui-chart__swatch {
|
|
246
|
-
background: var(--chart-color, var(--chart-1, var(--accent)));
|
|
247
|
-
background-image: var(--chart-pattern, var(--chart-pattern-1, none));
|
|
248
|
-
background-size: var(--chart-pattern-size, 8px);
|
|
249
|
-
border: 1px solid var(--line-strong);
|
|
250
|
-
block-size: 0.8rem;
|
|
251
|
-
flex: 0 0 auto;
|
|
252
|
-
inline-size: 0.8rem;
|
|
253
|
-
}
|
|
254
|
-
|
|
227
|
+
/* The chart's data key lives in the standalone, portable `.ui-legend`
|
|
228
|
+
(css/legend.css), not here — import it beside this kit when a chart needs
|
|
229
|
+
a legend. The chart owns only its plot + bars + fallback below. */
|
|
255
230
|
.ui-chart__plot {
|
|
256
231
|
display: grid;
|
|
257
232
|
gap: var(--space-xs);
|
|
@@ -264,6 +239,13 @@
|
|
|
264
239
|
gap: 0.35rem;
|
|
265
240
|
}
|
|
266
241
|
|
|
242
|
+
/* An author `display` outranks the UA `[hidden]` rule, so re-assert it: a host
|
|
243
|
+
toggling a series (e.g. from a `bronto:legend:toggle` event) expects
|
|
244
|
+
`bar.hidden = true` to actually hide the bar. */
|
|
245
|
+
.ui-chart__bar[hidden] {
|
|
246
|
+
display: none;
|
|
247
|
+
}
|
|
248
|
+
|
|
267
249
|
.ui-chart__label {
|
|
268
250
|
align-items: center;
|
|
269
251
|
color: var(--text-soft);
|
|
@@ -334,9 +316,8 @@
|
|
|
334
316
|
/* Meaning-carrying chart fills must survive the print "economy" default
|
|
335
317
|
(which drops backgrounds) without relying on a `.ui-print-exact`
|
|
336
318
|
ancestor. The accent on `.ui-report__summary` is a border, so it already
|
|
337
|
-
prints. */
|
|
338
|
-
.ui-chart__fill
|
|
339
|
-
.ui-chart__swatch {
|
|
319
|
+
prints. (Legend swatches print-protect themselves in css/legend.css.) */
|
|
320
|
+
.ui-chart__fill {
|
|
340
321
|
-webkit-print-color-adjust: exact;
|
|
341
322
|
print-color-adjust: exact;
|
|
342
323
|
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/* ==========================================================================
|
|
2
|
+
selection — opt-in, cross-cutting selection-emphasis vocabulary.
|
|
3
|
+
|
|
4
|
+
The carve-out from "brush/lasso": Bronto does NOT do region selection or
|
|
5
|
+
hit-testing (that needs the host's scales/geometry). It ships only the
|
|
6
|
+
*states* an item can be in once the host has decided — reusable on a chart
|
|
7
|
+
mark, a table row, a list item, a map region. The host adds/removes these
|
|
8
|
+
classes from its own brush/filter logic. Not imported by core.css.
|
|
9
|
+
|
|
10
|
+
in the selection → .ui-sel--on · excluded → .ui-sel--off
|
|
11
|
+
would-be-selected (live brush) → .ui-sel--maybe
|
|
12
|
+
========================================================================== */
|
|
13
|
+
|
|
14
|
+
.ui-sel {
|
|
15
|
+
transition:
|
|
16
|
+
opacity 0.12s ease,
|
|
17
|
+
outline-color 0.12s ease;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
@media (prefers-reduced-motion: reduce) {
|
|
21
|
+
.ui-sel {
|
|
22
|
+
transition: none;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.ui-sel--on {
|
|
27
|
+
outline: 2px solid var(--accent);
|
|
28
|
+
outline-offset: 1px;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.ui-sel--off {
|
|
32
|
+
/* opacity survives forced-colors, so an excluded item stays dimmer than the
|
|
33
|
+
selected/candidate items (which carry a solid/dashed outline). */
|
|
34
|
+
opacity: 0.35;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.ui-sel--maybe {
|
|
38
|
+
outline: 1px dashed var(--accent);
|
|
39
|
+
outline-offset: 1px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@media (forced-colors: active) {
|
|
43
|
+
.ui-sel--on {
|
|
44
|
+
outline-color: Highlight;
|
|
45
|
+
}
|
|
46
|
+
}
|