@adia-ai/web-components 0.8.44 → 0.8.46
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 +33 -0
- package/components/card/card.css +12 -23
- package/components/card/card.yaml +11 -0
- package/components/chart/chart.a2ui.json +16 -1
- package/components/chart/chart.class.js +611 -41
- package/components/chart/chart.css +174 -0
- package/components/chart/chart.d.ts +5 -1
- package/components/chart/chart.yaml +45 -1
- package/components/context-menu/context-menu.a2ui.json +8 -3
- package/components/context-menu/context-menu.class.js +46 -5
- package/components/context-menu/context-menu.d.ts +6 -3
- package/components/context-menu/context-menu.examples.md +2 -2
- package/components/context-menu/context-menu.yaml +22 -5
- package/components/field/field.css +24 -2
- package/components/index.js +1 -0
- package/components/input/input.css +7 -0
- package/components/nav/nav.a2ui.json +2 -2
- package/components/nav/nav.css +1 -1
- package/components/nav/nav.d.ts +1 -1
- package/components/nav/nav.yaml +14 -3
- package/components/nav-group/nav-group.css +37 -3
- package/components/pagination/pagination.class.js +52 -22
- package/components/search/search.class.js +39 -5
- package/components/select/select.a2ui.json +5 -0
- package/components/select/select.class.js +20 -0
- package/components/select/select.css +25 -0
- package/components/select/select.d.ts +2 -0
- package/components/select/select.yaml +12 -0
- package/components/table/cell-types.js +9 -0
- package/components/table/table.a2ui.json +19 -4
- package/components/table/table.class.js +410 -45
- package/components/table/table.css +7 -4
- package/components/table/table.d.ts +9 -3
- package/components/table/table.yaml +115 -9
- package/components/table-footer/table-footer.a2ui.json +150 -0
- package/components/table-footer/table-footer.class.js +391 -0
- package/components/table-footer/table-footer.css +64 -0
- package/components/table-footer/table-footer.d.ts +39 -0
- package/components/table-footer/table-footer.examples.md +46 -0
- package/components/table-footer/table-footer.js +17 -0
- package/components/table-footer/table-footer.yaml +219 -0
- package/components/table-toolbar/table-toolbar.a2ui.json +15 -0
- package/components/table-toolbar/table-toolbar.class.js +61 -17
- package/components/table-toolbar/table-toolbar.css +34 -0
- package/components/table-toolbar/table-toolbar.d.ts +10 -0
- package/components/table-toolbar/table-toolbar.yaml +58 -15
- package/core/data-stream.js +37 -2
- package/core/index.d.ts +1 -0
- package/core/index.js +1 -0
- package/core/provider.d.ts +9 -13
- package/core/provider.js +9 -113
- package/core/store.d.ts +46 -0
- package/core/store.js +89 -0
- package/custom-elements.json +192 -8
- package/dist/host.min.css +1 -1
- package/dist/host.sheet.js +1 -1
- package/dist/theme-provider.min.js +1 -1
- package/dist/web-components.min.css +1 -1
- package/dist/web-components.min.js +96 -96
- package/dist/web-components.sheet.js +1 -1
- package/package.json +1 -1
- package/patterns/chart-in-card/chart-in-card.examples.html +36 -9
- package/patterns/new-enrollments/new-enrollments.examples.html +140 -0
- package/patterns/new-enrollments/new-enrollments.html +54 -0
- package/patterns/table-in-card/table-in-card.examples.html +168 -0
- package/patterns/table-in-card/table-in-card.examples.js +139 -0
- package/patterns/table-in-card/table-in-card.html +86 -0
- package/styles/api/sizing.css +46 -0
- package/styles/components.css +1 -0
|
@@ -15,6 +15,17 @@
|
|
|
15
15
|
--chart-fg: var(--md-sys-color-neutral-on-surface);
|
|
16
16
|
--chart-bar: var(--md-sys-color-primary);
|
|
17
17
|
--chart-bar-hover: var(--a-primary-bg-hover);
|
|
18
|
+
/* REQ-F-015/016 — a provisional bar's soft fill, paired with
|
|
19
|
+
`--chart-bar`'s primary role the same way calendar-grid-ui pairs
|
|
20
|
+
`--md-sys-color-primary` with `--md-sys-color-primary-container`
|
|
21
|
+
for its own soft/tonal fill. Flat across every series/color variant
|
|
22
|
+
— a judgment call named here, not left silent: the provisional
|
|
23
|
+
state already discards per-series hue for its OUTLINE color
|
|
24
|
+
(`--chart-bar` above, not each series' own stroke), so a single
|
|
25
|
+
tonal fill costs nothing further and keeps "provisional" reading as
|
|
26
|
+
one consistent state regardless of which series or chart `color` it
|
|
27
|
+
belongs to. */
|
|
28
|
+
--chart-provisional-fill: var(--md-sys-color-primary-container);
|
|
18
29
|
--chart-line: var(--md-sys-color-primary);
|
|
19
30
|
--chart-dot: var(--md-sys-color-primary);
|
|
20
31
|
--chart-grid: var(--md-sys-color-neutral-outline-variant);
|
|
@@ -45,6 +56,70 @@
|
|
|
45
56
|
--chart-segments-gap: 2px;
|
|
46
57
|
--chart-pie-gap: 1.25px;
|
|
47
58
|
|
|
59
|
+
/* ── Charts 2.0 foundations (ADR-0081, gh#1804) ──
|
|
60
|
+
REQ-F-009/010 — chrome-layer clearance + the zero-line→chip-band
|
|
61
|
+
gap, both --a-space-*-aliased (chart.class.js's #dims() reads these
|
|
62
|
+
via getComputedStyle with a matching JS fallback for the
|
|
63
|
+
happy-dom test environment, which doesn't resolve var()/calc()). */
|
|
64
|
+
--chart-chrome-inset: var(--a-space-2);
|
|
65
|
+
--chart-band-gap: var(--a-space-1);
|
|
66
|
+
/* REQ-F-008 — today-marker color, default the primary role. */
|
|
67
|
+
--chart-today: var(--md-sys-color-primary);
|
|
68
|
+
/* REQ-F-005 — chip token contract, all six resolving through the
|
|
69
|
+
existing --a-* / --md-sys-color-* ladders (no new roles minted).
|
|
70
|
+
OPEN-5 (chip background role) — MEASURED, gh#1814 (real resolved
|
|
71
|
+
oklch → sRGB + WCAG contrast math, both schemes, both named
|
|
72
|
+
backdrops: --md-sys-color-neutral-container-low composited over
|
|
73
|
+
the page background for the full-bleed case, line 842 below; a
|
|
74
|
+
plain top-level card's own --md-sys-color-neutral-surface for the
|
|
75
|
+
other). Text legibility (chip-fg on chip-bg) clears AA with a wide
|
|
76
|
+
margin in every combination (>=11:1, gate floor 4.5:1) — this
|
|
77
|
+
repo's own verify:contrast discipline is fully satisfied regardless
|
|
78
|
+
of which of these two tokens is used, since both sit in the same
|
|
79
|
+
tight, deliberately-subtle neutral "surface elevation" band.
|
|
80
|
+
Non-text surface DISTINCTNESS is the real, disclosed limitation:
|
|
81
|
+
no existing --a-* / --md-sys-color-* neutral role reaches the
|
|
82
|
+
informal 3:1 UI-boundary heuristic against either backdrop, in
|
|
83
|
+
either scheme — swapping among them is a matter of degree, not a
|
|
84
|
+
pass/fail token pick, and minting a new role to clear 3:1 would
|
|
85
|
+
violate this SPEC's own no-new-roles non-goal. The originally
|
|
86
|
+
shipped --md-sys-color-neutral-surface-bright measured ~1.0-1.1:1
|
|
87
|
+
against both backdrops in both schemes (barely perceptible — a
|
|
88
|
+
real gap, not the "distinct pill" its own prior comment claimed
|
|
89
|
+
without having actually rendered it). --md-sys-color-neutral-
|
|
90
|
+
container-high measures ~1.24-1.40:1 instead (a real, screenshot-
|
|
91
|
+
confirmed improvement — the chip's rounded boundary reads clearly
|
|
92
|
+
in both schemes and against both backdrops) while keeping text
|
|
93
|
+
legibility comfortably >=11:1 — the better of the two available
|
|
94
|
+
options, not a 3:1-clearing fix. Full numbers + screenshots in the
|
|
95
|
+
gh#1814 Findings. */
|
|
96
|
+
--chart-chip-bg: var(--md-sys-color-neutral-container-high);
|
|
97
|
+
--chart-chip-fg: var(--md-sys-color-neutral-on-surface);
|
|
98
|
+
--chart-chip-radius: var(--a-radius-sm);
|
|
99
|
+
--chart-chip-pad-x: var(--a-space-1-5);
|
|
100
|
+
--chart-chip-pad-y: var(--a-space-1);
|
|
101
|
+
--chart-chip-font-size: var(--a-ui-tiny);
|
|
102
|
+
/* REQ-F-013/OPEN-4 — min-plot-height degradation floors (chip mode
|
|
103
|
+
only, see #dims()'s own doc comment for why `outside` mode never
|
|
104
|
+
applies these). MEASURED breakpoints, not spacing values (OPEN-4's
|
|
105
|
+
resolution posture distinguishes the two) — but expressed through
|
|
106
|
+
the SAME --a-density-scaled-rem mechanism --a-space-* itself is
|
|
107
|
+
built from (space.css), rather than a bare px literal, so a scoped
|
|
108
|
+
[density] host still rescales the floor consistently with every
|
|
109
|
+
other foundations token (REQ-F-014) even though there's no single
|
|
110
|
+
NAMED --a-space-* rung at exactly 180/120px.
|
|
111
|
+
OPEN-4 RESOLVED (gh#1814): a real-browser measurement sweep across
|
|
112
|
+
all three ratio buckets confirmed both values unchanged AND
|
|
113
|
+
confirmed the model itself — height-only, never per-bucket (the
|
|
114
|
+
chip/gridline vertical geometry these floors gate doesn't depend on
|
|
115
|
+
plot width). Full rationale in the SPEC's REQ-F-013 resolution
|
|
116
|
+
note. That same sweep found and fixed an unrelated real defect: the
|
|
117
|
+
domain-min/-max y-chip's own edge clamp could overlap its unclamped
|
|
118
|
+
neighbor at ~155-220px with 7 nice-number ticks — see
|
|
119
|
+
`#renderYChips`'s own doc comment. */
|
|
120
|
+
--chart-min-plot-height-chips: calc(var(--a-density) * 11.25rem); /* 180px at d=1 */
|
|
121
|
+
--chart-min-plot-height-grid: calc(var(--a-density) * 7.5rem); /* 120px at d=1 */
|
|
122
|
+
|
|
48
123
|
/* Transitions */
|
|
49
124
|
--chart-duration: var(--a-duration-fast);
|
|
50
125
|
--chart-easing: var(--a-easing);
|
|
@@ -211,6 +286,85 @@
|
|
|
211
286
|
font-family: var(--chart-font);
|
|
212
287
|
}
|
|
213
288
|
|
|
289
|
+
/* ── Chip labels (REQ-F-004/005/006, ADR-0081) ──
|
|
290
|
+
Rendered by #renderYChips/#renderXChips (chart.class.js) only when
|
|
291
|
+
`data-labels-resolved="chip"` — geometry (position/clamp/thin/corner
|
|
292
|
+
clearance) is computed in JS; this is styling only. `rx`/`ry` are set
|
|
293
|
+
here (not as SVG attributes) because CSS custom properties don't
|
|
294
|
+
resolve inside a bare SVG presentation-attribute string
|
|
295
|
+
(svg-authoring.md §5) — a real CSS declaration is required. */
|
|
296
|
+
|
|
297
|
+
[data-chip] {
|
|
298
|
+
fill: var(--chart-chip-bg);
|
|
299
|
+
rx: var(--chart-chip-radius);
|
|
300
|
+
ry: var(--chart-chip-radius);
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
[data-chip-label] {
|
|
304
|
+
fill: var(--chart-chip-fg);
|
|
305
|
+
font-size: var(--chart-chip-font-size);
|
|
306
|
+
font-family: var(--chart-font);
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
/* ── Today-marker (REQ-F-008, ADR-0081) ──
|
|
310
|
+
Anatomy: a baseline dot + a short band tick, never a full-height rule
|
|
311
|
+
— geometry (position, direction) is computed in
|
|
312
|
+
#todayMarkerVertical/#todayMarkerHorizontal (chart.class.js); this is
|
|
313
|
+
styling only. */
|
|
314
|
+
|
|
315
|
+
[data-today-dot] {
|
|
316
|
+
fill: var(--chart-today);
|
|
317
|
+
stroke: var(--chart-dot-stroke);
|
|
318
|
+
stroke-width: 1.5;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
[data-today-tick] {
|
|
322
|
+
stroke: var(--chart-today);
|
|
323
|
+
stroke-width: 2;
|
|
324
|
+
stroke-linecap: round;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
/* ── Provisional datum (REQ-F-015/016, ADR-0081 §3) ──
|
|
328
|
+
Per-datum `.provisional` flag — bar family renders a soft tonal fill +
|
|
329
|
+
dashed outline (never the ordinary solid fill) instead of the
|
|
330
|
+
ordinary filled bar; scatter's dot renders a hollow ring the same way
|
|
331
|
+
(no fill at all — a dot has no area to give hover feedback the way a
|
|
332
|
+
bar's own body does, so it stays hollow). Multi-series types
|
|
333
|
+
(stacked-bar/grouped-bar/composed) set their per-series color via an
|
|
334
|
+
inline `style="fill:var(--color-{key},...)"` (#seriesFill(), fill
|
|
335
|
+
only) — the flat `--chart-bar`/`--chart-provisional-fill`/`--chart-dot`
|
|
336
|
+
tokens here are this build's deliberate simplification for the
|
|
337
|
+
provisional OUTLINE/FILL color rather than re-deriving each series'
|
|
338
|
+
own color, named as a judgment call in the build's Findings rather
|
|
339
|
+
than left silent. Multi-series bars never carry `data-bar` (only
|
|
340
|
+
`data-slice` — see #seriesFill), so the selector below also targets
|
|
341
|
+
`[data-slice]` bar shapes directly; `!important` on `fill` is
|
|
342
|
+
required to beat that same inline style (expressing this any other
|
|
343
|
+
way needs the render path to skip #seriesFill for provisional rows,
|
|
344
|
+
a larger change than this selector fix warrants).
|
|
345
|
+
Giving the fill a real, visible value (rather than `none`) is
|
|
346
|
+
deliberate, not decorative: a hollow bar has nothing for a `:hover`
|
|
347
|
+
rule to darken/lighten, so hovering a provisional bar previously gave
|
|
348
|
+
no feedback at all. No separate `[data-provisional]:hover` rule is
|
|
349
|
+
needed — `path[data-slice]:hover`/`rect[data-slice]:hover`/
|
|
350
|
+
`[data-bar]:hover`'s existing `opacity: 0.92` already match these
|
|
351
|
+
same elements; they simply had nothing visible to dim before. */
|
|
352
|
+
|
|
353
|
+
[data-bar][data-provisional],
|
|
354
|
+
path[data-slice][data-provisional],
|
|
355
|
+
rect[data-slice][data-provisional] {
|
|
356
|
+
fill: var(--chart-provisional-fill) !important;
|
|
357
|
+
stroke: var(--chart-bar);
|
|
358
|
+
stroke-width: 1.5;
|
|
359
|
+
stroke-dasharray: 4 3;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
[data-dot][data-provisional] {
|
|
363
|
+
fill: none;
|
|
364
|
+
stroke: var(--chart-dot);
|
|
365
|
+
stroke-width: 1.5;
|
|
366
|
+
}
|
|
367
|
+
|
|
214
368
|
/* ── Bar ── */
|
|
215
369
|
|
|
216
370
|
[data-bar] {
|
|
@@ -232,6 +386,26 @@
|
|
|
232
386
|
stroke-linecap: round;
|
|
233
387
|
}
|
|
234
388
|
|
|
389
|
+
/* ── Line/area provisional-span overlay (REQ-F-015, ADR-0081 §3) ──
|
|
390
|
+
#lineProvisionalOverlay (chart.class.js) emits these two elements
|
|
391
|
+
only when at least one datum in the series is provisional; a fixture
|
|
392
|
+
with no provisional data never emits them at all. */
|
|
393
|
+
|
|
394
|
+
[data-line-provisional] {
|
|
395
|
+
stroke: var(--chart-line);
|
|
396
|
+
stroke-width: var(--chart-line-width);
|
|
397
|
+
fill: none;
|
|
398
|
+
stroke-linejoin: round;
|
|
399
|
+
stroke-linecap: round;
|
|
400
|
+
stroke-dasharray: 5 4;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
[data-area-provisional-fade] {
|
|
404
|
+
fill: var(--md-sys-color-neutral-surface);
|
|
405
|
+
opacity: 0.55;
|
|
406
|
+
pointer-events: none;
|
|
407
|
+
}
|
|
408
|
+
|
|
235
409
|
/* ── Area fill ──
|
|
236
410
|
Enabled by default for line / multi-line charts. Fades from the top
|
|
237
411
|
(most visible, tinted by --chart-area-opacity) to transparent at the
|
|
@@ -24,12 +24,14 @@ export class UIChart extends UIElement {
|
|
|
24
24
|
color: 'accent' | 'success' | 'warning' | 'danger' | 'info';
|
|
25
25
|
/** Bar corner radius in px (null = let CSS tokens decide) */
|
|
26
26
|
cornerRadius: number | null;
|
|
27
|
-
/** JS property (set programmatically — `el.data = [...]`). An array of plain objects; each object's keys are named by the `x` and `y` attributes — e.g. `<chart-ui x="month" y="revenue">` consumes `[{month:'Jan', revenue:3200}, {month:'Feb', revenue:4100}]`. The Chart.js `{labels, datasets}` envelope is NOT chart-ui's API — passing it (or any non-array value) renders an empty chart. May also be supplied declaratively as a JSON-array `data="[…]"` attribute, hydrated once at connect. Custom accessor on the element class, not a reflected attribute. */
|
|
27
|
+
/** JS property (set programmatically — `el.data = [...]`). An array of plain objects; each object's keys are named by the `x` and `y` attributes — e.g. `<chart-ui x="month" y="revenue">` consumes `[{month:'Jan', revenue:3200}, {month:'Feb', revenue:4100}]`. The Chart.js `{labels, datasets}` envelope is NOT chart-ui's API — passing it (or any non-array value) renders an empty chart. May also be supplied declaratively as a JSON-array `data="[…]"` attribute, hydrated once at connect. Custom accessor on the element class, not a reflected attribute. A datum object carrying a truthy `provisional` key (ADR-0081) renders that period's type-specific incomplete-period treatment (hollow/dashed bar, dashed line + faded area, hollow ring dot) on cartesian types; a no-op on radial/part-to-whole types and sparkline (gh#1690's N/A list). Provisional state is per-datum data-shape, not a chart-ui attribute — see ADR-0081 §3. */
|
|
28
28
|
data: string;
|
|
29
29
|
/** Marker (dot) visibility for line and multi-line series. `all` draws a circle[data-dot] on every datum (default — matches pre-gh#561 behavior). `none` hides all dots so a dense series reads as a clean line. `hover` shows only the currently-hovered datum's dot. `last` shows only the terminal point per series (sparkline convention). Tooltip hit targets ([data-hit]) are a separate always-rendered layer — every mode keeps hover/click working along the whole line. */
|
|
30
30
|
dots: 'all' | 'none' | 'hover' | 'last';
|
|
31
31
|
/** Number-format mode applied to axis labels + value overlays + donut total + gauge value + treemap value + funnel value + internal tooltip. `abbr` is the legacy 1.2K / 3M format; `decimal` fixes 2 decimals; `currency` prefixes via `--chart-currency-prefix` token (default "$"); `percent` multiplies × 100 and adds a % suffix. */
|
|
32
32
|
format: 'abbr' | 'decimal' | 'currency' | 'percent';
|
|
33
|
+
/** Chart 2.0 axis-label mode (ADR-0081). Unset (default, "") always resolves to `outside` — today's pre-2.0 outside-the-plot axis labels, byte-for-byte unchanged. Set explicitly to `chip` to opt into the pill-treated overlay labels inset within the plot box (never hanging outside it) — the resolved value reflects onto the host as `data-labels-resolved="chip"|"outside"`. Deliberately explicit-opt-in rather than auto-detected from full-bleed ancestry (`section[bleed]`/ `card-ui[padding="none"]`): an earlier draft auto-activated chip mode on any full-bleed composition, which silently changed the rendering of every ALREADY-SHIPPED full-bleed chart the moment it shipped — this build's own 60-fixture Charts visual-eval floor caught it (2 `comp-chart-in-card-n-*` regressions). `chart-in-card` compositions opt in explicitly once their own examples are updated (gh#1805). */
|
|
34
|
+
labels: '' | 'chip' | 'outside';
|
|
33
35
|
/** Show a skeleton placeholder instead of the chart body. Set to true while data is being fetched; clear once data arrives. Preserves the element's aspect-ratio dimensions so the skeleton occupies the same space the chart will fill. Parity with stat-ui[loading] and table-ui[loading] (§FB-12, v0.6.27). */
|
|
34
36
|
loading: boolean;
|
|
35
37
|
/** When true, suppress the overlaid average line. Canonical spelling (ADR-0063, gh#1563) — the deprecated `hideAverage` dual-read shim was cut in 0.8.43 (gh#1617). */
|
|
@@ -46,6 +48,8 @@ export class UIChart extends UIElement {
|
|
|
46
48
|
size: 'sm' | 'md' | 'lg';
|
|
47
49
|
/** Line smoothing factor */
|
|
48
50
|
smooth: number;
|
|
51
|
+
/** Names the datum whose x-axis value marks "today" (ADR-0081). Unset (default, "") renders no marker — additive. Compared against each datum's x-key value via a loose string comparison (`String(datum[x]) === String(today)`), so category axes ("month", "region") work the same as literal date strings; chart-ui never auto-derives today from the clock. Renders a baseline dot + a short band tick (REQ-F-008) on cartesian types (bar, line, area, scatter, multi-line, stacked-bar, grouped-bar, composed); a no-op on every radial/part-to-whole type and on sparkline (gh#1690's N/A list). Fallback (not the primary mechanism): a datum already carrying a truthy `today` key is treated as an equivalent marker even with this attribute unset. */
|
|
52
|
+
today: string;
|
|
49
53
|
/** Data key for x-axis (category) values */
|
|
50
54
|
x: string;
|
|
51
55
|
/** Y-axis key(s), comma-separated for multi-series */
|
|
@@ -115,6 +115,45 @@ props:
|
|
|
115
115
|
- "1:1"
|
|
116
116
|
- "2:3"
|
|
117
117
|
reflect: true
|
|
118
|
+
labels:
|
|
119
|
+
description: >-
|
|
120
|
+
Chart 2.0 axis-label mode (ADR-0081). Unset (default, "") always
|
|
121
|
+
resolves to `outside` — today's pre-2.0 outside-the-plot axis labels,
|
|
122
|
+
byte-for-byte unchanged. Set explicitly to `chip` to opt into the
|
|
123
|
+
pill-treated overlay labels inset within the plot box (never hanging
|
|
124
|
+
outside it) — the resolved value reflects onto the host as
|
|
125
|
+
`data-labels-resolved="chip"|"outside"`. Deliberately explicit-opt-in
|
|
126
|
+
rather than auto-detected from full-bleed ancestry (`section[bleed]`/
|
|
127
|
+
`card-ui[padding="none"]`): an earlier draft auto-activated chip mode
|
|
128
|
+
on any full-bleed composition, which silently changed the rendering of
|
|
129
|
+
every ALREADY-SHIPPED full-bleed chart the moment it shipped — this
|
|
130
|
+
build's own 60-fixture Charts visual-eval floor caught it
|
|
131
|
+
(2 `comp-chart-in-card-n-*` regressions). `chart-in-card` compositions
|
|
132
|
+
opt in explicitly once their own examples are updated (gh#1805).
|
|
133
|
+
type: string
|
|
134
|
+
default: ""
|
|
135
|
+
enum:
|
|
136
|
+
- ""
|
|
137
|
+
- chip
|
|
138
|
+
- outside
|
|
139
|
+
reflect: true
|
|
140
|
+
today:
|
|
141
|
+
description: >-
|
|
142
|
+
Names the datum whose x-axis value marks "today" (ADR-0081). Unset
|
|
143
|
+
(default, "") renders no marker — additive. Compared against each
|
|
144
|
+
datum's x-key value via a loose string comparison
|
|
145
|
+
(`String(datum[x]) === String(today)`), so category axes ("month",
|
|
146
|
+
"region") work the same as literal date strings; chart-ui never
|
|
147
|
+
auto-derives today from the clock. Renders a baseline dot + a short
|
|
148
|
+
band tick (REQ-F-008) on cartesian types (bar, line, area, scatter,
|
|
149
|
+
multi-line, stacked-bar, grouped-bar, composed); a no-op on every
|
|
150
|
+
radial/part-to-whole type and on sparkline (gh#1690's N/A list).
|
|
151
|
+
Fallback (not the primary mechanism): a datum already carrying a
|
|
152
|
+
truthy `today` key is treated as an equivalent marker even with this
|
|
153
|
+
attribute unset.
|
|
154
|
+
type: string
|
|
155
|
+
default: ""
|
|
156
|
+
reflect: true
|
|
118
157
|
smooth:
|
|
119
158
|
description: Line smoothing factor
|
|
120
159
|
type: number
|
|
@@ -213,7 +252,12 @@ props:
|
|
|
213
252
|
passing it (or any non-array value) renders an empty chart. May also
|
|
214
253
|
be supplied declaratively as a JSON-array `data="[…]"` attribute,
|
|
215
254
|
hydrated once at connect. Custom accessor on the element class, not a
|
|
216
|
-
reflected attribute.
|
|
255
|
+
reflected attribute. A datum object carrying a truthy `provisional`
|
|
256
|
+
key (ADR-0081) renders that period's type-specific incomplete-period
|
|
257
|
+
treatment (hollow/dashed bar, dashed line + faded area, hollow ring
|
|
258
|
+
dot) on cartesian types; a no-op on radial/part-to-whole types and
|
|
259
|
+
sparkline (gh#1690's N/A list). Provisional state is per-datum
|
|
260
|
+
data-shape, not a chart-ui attribute — see ADR-0081 §3.
|
|
217
261
|
type: array
|
|
218
262
|
items:
|
|
219
263
|
type: object
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://adiaui.dev/a2ui/v0_9/components/ContextMenu.json",
|
|
4
4
|
"title": "ContextMenu",
|
|
5
|
-
"description": "Right-click activated menu — the OS-native context-menu pattern as a\nweb component. Distinct from `menu-ui` (which is button-triggered):\nsame item shape (`menu-item-ui` children), different trigger surface\n(`contextmenu` event), and pointer-anchored positioning instead of\nelement-anchored. Pattern: WAI-APG Menu.\n\nTwo binding modes:\n **A. Wrap.** Default-slot child becomes the target:\n `<context-menu-ui><my-table>...</my-table>...items</context-menu-ui>`.\n **B. Selector.** Point at one or more existing elements via [
|
|
5
|
+
"description": "Right-click activated menu — the OS-native context-menu pattern as a\nweb component. Distinct from `menu-ui` (which is button-triggered):\nsame item shape (`menu-item-ui` children), different trigger surface\n(`contextmenu` event), and pointer-anchored positioning instead of\nelement-anchored. Pattern: WAI-APG Menu.\n\nTwo binding modes:\n **A. Wrap.** Default-slot child becomes the target:\n `<context-menu-ui><my-table>...</my-table>...items</context-menu-ui>`.\n **B. Selector.** Point at one or more existing elements via\n [target-selector]:\n `<context-menu-ui target-selector=\"#my-table\">...items</context-menu-ui>`.\n\nOn `contextmenu` event on a target: `preventDefault()`, position the\nmenu at the pointer coords, show via Popover API. Touch long-press\n(configurable via [long-press-ms]) does the same. Shift+F10 / Menu\nkey opens at the focused target's center for keyboard users.\n",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"allOf": [
|
|
8
8
|
{
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"const": "ContextMenu"
|
|
18
18
|
},
|
|
19
19
|
"for": {
|
|
20
|
-
"description": "CSS selector
|
|
20
|
+
"description": "DEPRECATED alias for [target-selector] — still a CSS selector, NOT an id-ref. Honored when [target-selector] is unset, with a one-shot console.warn pointing consumers at the replacement. New authoring should use [target-selector].",
|
|
21
21
|
"type": "string",
|
|
22
22
|
"default": ""
|
|
23
23
|
},
|
|
@@ -30,6 +30,11 @@
|
|
|
30
30
|
"description": "Programmatic open state. Set true to open at target center.",
|
|
31
31
|
"type": "boolean",
|
|
32
32
|
"default": false
|
|
33
|
+
},
|
|
34
|
+
"targetSelector": {
|
|
35
|
+
"description": "CSS selector(s) for target element(s). Empty = use default-slot child. Ratified name (gh#1764/#1780, ADR-0079) for what [for] used to carry — [for] means an id-ref everywhere else in AdiaUI (table-toolbar-ui, chart-legend-ui, tooltip-ui); context-menu-ui's own selector meaning predates that convention and was a same-name/ different-contract collision (ADR-0053's no-shadowing doctrine).",
|
|
36
|
+
"type": "string",
|
|
37
|
+
"default": ""
|
|
33
38
|
}
|
|
34
39
|
},
|
|
35
40
|
"required": [
|
|
@@ -39,7 +44,7 @@
|
|
|
39
44
|
"x-adiaui": {
|
|
40
45
|
"anti_patterns": [
|
|
41
46
|
{
|
|
42
|
-
"fix": "Wrap a target: `<context-menu-ui><my-target></my-target>...items</context-menu-ui>` OR point at one: `<context-menu-ui
|
|
47
|
+
"fix": "Wrap a target: `<context-menu-ui><my-target></my-target>...items</context-menu-ui>` OR point at one: `<context-menu-ui target-selector=\"#my-target\">...items</context-menu-ui>`.",
|
|
43
48
|
"why": "No target binding — the menu never opens.",
|
|
44
49
|
"wrong": "<context-menu-ui>...just items...</context-menu-ui>"
|
|
45
50
|
}
|
|
@@ -4,8 +4,16 @@
|
|
|
4
4
|
* Two binding shapes:
|
|
5
5
|
* A. Wrap a target — first non-menu-item-ui default-slot child becomes
|
|
6
6
|
* the contextmenu host.
|
|
7
|
-
* B. Point at targets via [
|
|
8
|
-
* / whole-canvas menus where wrapping isn't practical.
|
|
7
|
+
* B. Point at targets via [target-selector="<css-selector>"] — useful for
|
|
8
|
+
* whole-table / whole-canvas menus where wrapping isn't practical.
|
|
9
|
+
* [for] is a DEPRECATED alias for this (gh#1764/#1780, ADR-0079): `for=`
|
|
10
|
+
* means an id-ref everywhere else in AdiaUI (table-toolbar-ui,
|
|
11
|
+
* chart-legend-ui, tooltip-ui) — context-menu-ui's own pre-ruling [for]
|
|
12
|
+
* carried a CSS-selector meaning instead, the exact same-attribute-
|
|
13
|
+
* different-contract shape ADR-0053's no-shadowing doctrine forbids.
|
|
14
|
+
* [target-selector] still resolves via `document.querySelectorAll()`
|
|
15
|
+
* (multiple targets); a still-set legacy [for] is honored with a
|
|
16
|
+
* one-shot console.warn pointing at the replacement.
|
|
9
17
|
*
|
|
10
18
|
* Architecture: reuses the existing anchor pattern (core/anchor.js) by
|
|
11
19
|
* creating a virtual 1×1 anchor element at the pointer coords on each
|
|
@@ -23,8 +31,21 @@ import { anchorPopover } from '../../core/anchor.js';
|
|
|
23
31
|
|
|
24
32
|
const LONG_PRESS_DEFAULT = 500;
|
|
25
33
|
|
|
34
|
+
// DEPRECATED [for]-alias one-shot warning guard (gh#1764/#1780, ADR-0079) —
|
|
35
|
+
// module-scope, matching this file's own idiom (a plain top-level const
|
|
36
|
+
// rather than a lazily-created public static field, which stayed mutable
|
|
37
|
+
// and externally visible for no reason).
|
|
38
|
+
const warnedForDeprecated = new WeakSet();
|
|
39
|
+
|
|
26
40
|
export class UIContextMenu extends UIElement {
|
|
27
41
|
static properties = {
|
|
42
|
+
// gh#1764/#1780, ADR-0079 — the ratified replacement for the
|
|
43
|
+
// selector-flavored [for] below; a plain CSS selector, not an id-ref.
|
|
44
|
+
targetSelector: { type: String, default: '', reflect: true, attribute: 'target-selector' },
|
|
45
|
+
// DEPRECATED — kept as a back-compat alias for `targetSelector` only.
|
|
46
|
+
// Honored (with a one-shot console.warn, see #legacyForSelector())
|
|
47
|
+
// whenever [target-selector] is unset. Never given id-ref semantics;
|
|
48
|
+
// the sweep did not attempt to dual-purpose this attribute.
|
|
28
49
|
for: { type: String, default: '', reflect: true },
|
|
29
50
|
open: { type: Boolean, default: false, reflect: true },
|
|
30
51
|
longPressMs: { type: Number, default: LONG_PRESS_DEFAULT, reflect: false, attribute: 'long-press-ms' },
|
|
@@ -97,11 +118,12 @@ export class UIContextMenu extends UIElement {
|
|
|
97
118
|
}
|
|
98
119
|
|
|
99
120
|
#resolveTargets() {
|
|
100
|
-
|
|
101
|
-
|
|
121
|
+
const selector = this.targetSelector || this.#legacyForSelector();
|
|
122
|
+
if (selector) {
|
|
123
|
+
try { return [...document.querySelectorAll(selector)]; }
|
|
102
124
|
catch (e) {
|
|
103
125
|
// eslint-disable-next-line no-console
|
|
104
|
-
console.warn(`[context-menu-ui] invalid [
|
|
126
|
+
console.warn(`[context-menu-ui] invalid [target-selector] selector: ${selector}`, e);
|
|
105
127
|
return [];
|
|
106
128
|
}
|
|
107
129
|
}
|
|
@@ -113,6 +135,25 @@ export class UIContextMenu extends UIElement {
|
|
|
113
135
|
return [];
|
|
114
136
|
}
|
|
115
137
|
|
|
138
|
+
// DEPRECATED alias path (gh#1764/#1780, ADR-0079) — [for] used to carry
|
|
139
|
+
// context-menu-ui's own CSS-selector binding; [target-selector] is now
|
|
140
|
+
// the canonical name. Warn once per element, never per resolve (this
|
|
141
|
+
// runs on every #bindTargets() call, including reconnects).
|
|
142
|
+
#legacyForSelector() {
|
|
143
|
+
if (!this.for) return '';
|
|
144
|
+
if (!warnedForDeprecated.has(this)) {
|
|
145
|
+
warnedForDeprecated.add(this);
|
|
146
|
+
// eslint-disable-next-line no-console
|
|
147
|
+
console.warn(
|
|
148
|
+
`[context-menu-ui] [for="${this.for}"] is deprecated — use ` +
|
|
149
|
+
`[target-selector="${this.for}"] instead. [for] now means an ` +
|
|
150
|
+
'id-ref everywhere else in AdiaUI; context-menu-ui\'s own prior ' +
|
|
151
|
+
'[for] carried a CSS-selector meaning (ADR-0079).',
|
|
152
|
+
);
|
|
153
|
+
}
|
|
154
|
+
return this.for;
|
|
155
|
+
}
|
|
156
|
+
|
|
116
157
|
/* ── Trigger event handlers ──────────────────────────────────────── */
|
|
117
158
|
|
|
118
159
|
#onContextMenu = (e) => {
|
|
@@ -8,8 +8,9 @@ element-anchored. Pattern: WAI-APG Menu.
|
|
|
8
8
|
Two binding modes:
|
|
9
9
|
**A. Wrap.** Default-slot child becomes the target:
|
|
10
10
|
`<context-menu-ui><my-table>...</my-table>...items</context-menu-ui>`.
|
|
11
|
-
**B. Selector.** Point at one or more existing elements via
|
|
12
|
-
|
|
11
|
+
**B. Selector.** Point at one or more existing elements via
|
|
12
|
+
[target-selector]:
|
|
13
|
+
`<context-menu-ui target-selector="#my-table">...items</context-menu-ui>`.
|
|
13
14
|
|
|
14
15
|
On `contextmenu` event on a target: `preventDefault()`, position the
|
|
15
16
|
menu at the pointer coords, show via Popover API. Touch long-press
|
|
@@ -54,12 +55,14 @@ export interface ContextMenuSelectEventDetail {
|
|
|
54
55
|
export type ContextMenuSelectEvent = CustomEvent<ContextMenuSelectEventDetail>;
|
|
55
56
|
|
|
56
57
|
export class UIContextMenu extends UIElement {
|
|
57
|
-
/** CSS selector
|
|
58
|
+
/** DEPRECATED alias for [target-selector] — still a CSS selector, NOT an id-ref. Honored when [target-selector] is unset, with a one-shot console.warn pointing consumers at the replacement. New authoring should use [target-selector]. */
|
|
58
59
|
for: string;
|
|
59
60
|
/** Long-press duration (ms) on touch devices to open the menu. */
|
|
60
61
|
longPressMs: number;
|
|
61
62
|
/** Programmatic open state. Set true to open at target center. */
|
|
62
63
|
open: boolean;
|
|
64
|
+
/** CSS selector(s) for target element(s). Empty = use default-slot child. Ratified name (gh#1764/#1780, ADR-0079) for what [for] used to carry — [for] means an id-ref everywhere else in AdiaUI (table-toolbar-ui, chart-legend-ui, tooltip-ui); context-menu-ui's own selector meaning predates that convention and was a same-name/ different-contract collision (ADR-0053's no-shadowing doctrine). */
|
|
65
|
+
targetSelector: string;
|
|
63
66
|
|
|
64
67
|
addEventListener(type: 'context-menu-close', listener: (ev: ContextMenuCloseEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
65
68
|
addEventListener(type: 'context-menu-open', listener: (ev: ContextMenuOpenEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
</context-menu-ui>
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
-
## [
|
|
20
|
+
## [target-selector] mode — point at existing targets
|
|
21
21
|
|
|
22
22
|
```html
|
|
23
23
|
<div style="display: grid; gap: var(--a-space-2);">
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
<div data-row tabindex="0" style="padding: var(--a-space-3); border: 1px solid var(--md-sys-color-neutral-outline); border-radius: var(--a-radius-sm); background: var(--md-sys-color-neutral-background);">Row B — right-click</div>
|
|
26
26
|
<div data-row tabindex="0" style="padding: var(--a-space-3); border: 1px solid var(--md-sys-color-neutral-outline); border-radius: var(--a-radius-sm); background: var(--md-sys-color-neutral-background);">Row C — right-click</div>
|
|
27
27
|
</div>
|
|
28
|
-
<context-menu-ui
|
|
28
|
+
<context-menu-ui target-selector='[data-chunk="context-menu-for"] [data-row]'>
|
|
29
29
|
<menu-item-ui value="edit" text="Edit"></menu-item-ui>
|
|
30
30
|
<menu-item-ui value="duplicate" text="Duplicate"></menu-item-ui>
|
|
31
31
|
<menu-divider-ui></menu-divider-ui>
|
|
@@ -15,8 +15,9 @@ description: |
|
|
|
15
15
|
Two binding modes:
|
|
16
16
|
**A. Wrap.** Default-slot child becomes the target:
|
|
17
17
|
`<context-menu-ui><my-table>...</my-table>...items</context-menu-ui>`.
|
|
18
|
-
**B. Selector.** Point at one or more existing elements via
|
|
19
|
-
|
|
18
|
+
**B. Selector.** Point at one or more existing elements via
|
|
19
|
+
[target-selector]:
|
|
20
|
+
`<context-menu-ui target-selector="#my-table">...items</context-menu-ui>`.
|
|
20
21
|
|
|
21
22
|
On `contextmenu` event on a target: `preventDefault()`, position the
|
|
22
23
|
menu at the pointer coords, show via Popover API. Touch long-press
|
|
@@ -25,8 +26,24 @@ description: |
|
|
|
25
26
|
composes:
|
|
26
27
|
- menu-item-ui
|
|
27
28
|
props:
|
|
29
|
+
targetSelector:
|
|
30
|
+
description: >-
|
|
31
|
+
CSS selector(s) for target element(s). Empty = use default-slot
|
|
32
|
+
child. Ratified name (gh#1764/#1780, ADR-0079) for what [for] used
|
|
33
|
+
to carry — [for] means an id-ref everywhere else in AdiaUI
|
|
34
|
+
(table-toolbar-ui, chart-legend-ui, tooltip-ui); context-menu-ui's
|
|
35
|
+
own selector meaning predates that convention and was a same-name/
|
|
36
|
+
different-contract collision (ADR-0053's no-shadowing doctrine).
|
|
37
|
+
type: string
|
|
38
|
+
default: ""
|
|
39
|
+
reflect: true
|
|
40
|
+
attribute: target-selector
|
|
28
41
|
for:
|
|
29
|
-
description:
|
|
42
|
+
description: >-
|
|
43
|
+
DEPRECATED alias for [target-selector] — still a CSS selector, NOT
|
|
44
|
+
an id-ref. Honored when [target-selector] is unset, with a one-shot
|
|
45
|
+
console.warn pointing consumers at the replacement. New authoring
|
|
46
|
+
should use [target-selector].
|
|
30
47
|
type: string
|
|
31
48
|
default: ""
|
|
32
49
|
reflect: true
|
|
@@ -101,12 +118,12 @@ a2ui:
|
|
|
101
118
|
reason: 'Trigger surface boundary.'
|
|
102
119
|
- rule: 'Items are <menu-item-ui> children inside the default slot — same shape as <menu-ui> items.'
|
|
103
120
|
reason: 'Single menu vocabulary.'
|
|
104
|
-
- rule: 'Bind target via wrap (default-slot first non-menu-item-ui child) OR [
|
|
121
|
+
- rule: 'Bind target via wrap (default-slot first non-menu-item-ui child) OR [target-selector]. The selector form is useful for whole-table or whole-canvas menus where wrapping isn''t practical. [for] still works as a deprecated alias but new authoring should use [target-selector] (gh#1764/#1780, ADR-0079).'
|
|
105
122
|
reason: 'Two binding shapes.'
|
|
106
123
|
anti_patterns:
|
|
107
124
|
- wrong: '<context-menu-ui>...just items...</context-menu-ui>'
|
|
108
125
|
why: 'No target binding — the menu never opens.'
|
|
109
|
-
fix: 'Wrap a target: `<context-menu-ui><my-target></my-target>...items</context-menu-ui>` OR point at one: `<context-menu-ui
|
|
126
|
+
fix: 'Wrap a target: `<context-menu-ui><my-target></my-target>...items</context-menu-ui>` OR point at one: `<context-menu-ui target-selector="#my-target">...items</context-menu-ui>`.'
|
|
110
127
|
examples:
|
|
111
128
|
- name: file-actions
|
|
112
129
|
description: Right-click a file row for Open / Rename / Delete.
|
|
@@ -77,8 +77,30 @@
|
|
|
77
77
|
row-gap: var(--field-gap);
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
/* Stacked +
|
|
81
|
-
|
|
80
|
+
/* Stacked + trailing only (no action) — the "action" column would
|
|
81
|
+
otherwise still be sized by row 1's trailing content while row 2's
|
|
82
|
+
action cell sits empty, stealing width from `control` (gh#1836).
|
|
83
|
+
`control` spans both columns so it fills the full row instead. */
|
|
84
|
+
:scope:has(> [slot="trailing"]):not(:has(> [slot="action"])) {
|
|
85
|
+
grid-template-columns: minmax(0, 1fr) auto;
|
|
86
|
+
grid-template-areas:
|
|
87
|
+
"label trailing"
|
|
88
|
+
"control control"
|
|
89
|
+
"message message";
|
|
90
|
+
}
|
|
91
|
+
/* Stacked + action only (no trailing) — label spans the full row since
|
|
92
|
+
there's no trailing content contesting it. */
|
|
93
|
+
:scope:has(> [slot="action"]):not(:has(> [slot="trailing"])) {
|
|
94
|
+
grid-template-columns: minmax(0, 1fr) auto;
|
|
95
|
+
grid-template-areas:
|
|
96
|
+
"label label"
|
|
97
|
+
"control action"
|
|
98
|
+
"message message";
|
|
99
|
+
}
|
|
100
|
+
/* Stacked + both trailing and action — today's combined template,
|
|
101
|
+
unchanged: row 2's second column is legitimately contested only by
|
|
102
|
+
`action`, since `trailing` lives in row 1. */
|
|
103
|
+
:scope:has(> [slot="trailing"]):has(> [slot="action"]) {
|
|
82
104
|
grid-template-columns: minmax(0, 1fr) auto;
|
|
83
105
|
grid-template-areas:
|
|
84
106
|
"label trailing"
|
package/components/index.js
CHANGED
|
@@ -55,6 +55,7 @@ export { UIColorInput } from './color-input/color-input.js';
|
|
|
55
55
|
export { UINoodles } from './noodles/noodles.js';
|
|
56
56
|
export { UITable } from './table/table.js';
|
|
57
57
|
export { UITableToolbar } from './table-toolbar/table-toolbar.js';
|
|
58
|
+
export { UITableFooter } from './table-footer/table-footer.js';
|
|
58
59
|
export { UITimeline, UITimelineItem } from './timeline/timeline.js';
|
|
59
60
|
export { UIStepper, UIStepperItem } from './stepper/stepper.js';
|
|
60
61
|
export { UISwiper } from './swiper/swiper.js';
|
|
@@ -92,6 +92,13 @@ input-ui:not([disabled]) [slot="field"]:hover [slot="suffix"] {
|
|
|
92
92
|
min-width: var(--input-label-min-width);
|
|
93
93
|
color: var(--input-affix-fg);
|
|
94
94
|
font-size: var(--input-font-size);
|
|
95
|
+
/* Match [slot="field"]'s line-height (§113) — without it the label
|
|
96
|
+
falls back to the UA's normal line-height for its font/size, which
|
|
97
|
+
differs from --a-font-leading-normal. align-items: center on the
|
|
98
|
+
field centers each flex item's own line box, so a mismatched
|
|
99
|
+
line-height shifts the label's glyph baseline off the value/
|
|
100
|
+
placeholder text's baseline even though both boxes are centered. */
|
|
101
|
+
line-height: var(--a-font-leading-normal);
|
|
95
102
|
user-select: none;
|
|
96
103
|
pointer-events: none;
|
|
97
104
|
}
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"default": false
|
|
28
28
|
},
|
|
29
29
|
"heading": {
|
|
30
|
-
"description": "Optional kicker label. Section variant renders it via ::before; primary uses it as aria-label only.",
|
|
30
|
+
"description": "Optional kicker label. Section variant renders it via ::before; primary uses it as aria-label only. For a VISIBLE kicker inside a primary-variant rail — or more than one kicker per <nav-ui> — hand-place <span data-nav-label> in the default slot instead; see slots below.",
|
|
31
31
|
"type": "string",
|
|
32
32
|
"default": ""
|
|
33
33
|
},
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
],
|
|
109
109
|
"slots": {
|
|
110
110
|
"default": {
|
|
111
|
-
"description": "Primary slot — accepts <nav-group-ui> + <nav-item-ui> children, plus <hr data-nav-divider> for hand-placed dividers."
|
|
111
|
+
"description": "Primary slot — accepts <nav-group-ui> + <nav-item-ui> children, plus <hr data-nav-divider> for hand-placed dividers and <span data-nav-label> for hand-placed group-label kickers (titled runs of items/groups that aren't wrapped in a <nav-group-ui>). <span data-nav-label> renders with the same uppercase/tracking/muted kicker treatment as the [heading] ::before kicker, and is hidden alongside dividers whenever the primary-variant rail collapses ([collapsed] or ≤96px container width)."
|
|
112
112
|
}
|
|
113
113
|
},
|
|
114
114
|
"states": [
|
package/components/nav/nav.css
CHANGED
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
--nav-label-fg: var(--a-fg-muted);
|
|
33
33
|
--nav-label-font-size: var(--a-kicker-sm);
|
|
34
34
|
--nav-label-weight: var(--a-weight-medium);
|
|
35
|
-
--nav-label-px: var(--a-space-
|
|
35
|
+
--nav-label-px: var(--a-space-4);
|
|
36
36
|
--nav-label-py: var(--a-space-3) var(--a-space-1);
|
|
37
37
|
}
|
|
38
38
|
|
package/components/nav/nav.d.ts
CHANGED
|
@@ -36,7 +36,7 @@ export class UINav extends UIElement {
|
|
|
36
36
|
collapsed: boolean;
|
|
37
37
|
/** Auto-place dividers between adjacent groups + items. */
|
|
38
38
|
divider: boolean;
|
|
39
|
-
/** Optional kicker label. Section variant renders it via ::before; primary uses it as aria-label only. */
|
|
39
|
+
/** Optional kicker label. Section variant renders it via ::before; primary uses it as aria-label only. For a VISIBLE kicker inside a primary-variant rail — or more than one kicker per <nav-ui> — hand-place <span data-nav-label> in the default slot instead; see slots below. */
|
|
40
40
|
heading: string;
|
|
41
41
|
/** Opt out of the default single-expanded-group behavior. When unset, selecting a nav-item-ui collapses every nav-group-ui except the one containing the newly selected item (all, when the selection is ungrouped); manual multi-expansion still works up until the next selection. */
|
|
42
42
|
multiExpand: boolean;
|