@adia-ai/web-components 0.8.42 → 0.8.44
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 +44 -0
- package/MIGRATION.md +130 -80
- package/USAGE.md +1 -1
- package/color/index.js +1 -1
- package/components/action-list/action-item.a2ui.json +3 -8
- package/components/action-list/action-item.yaml +10 -16
- package/components/action-list/action-list.class.js +5 -61
- package/components/action-list/action-list.d.ts +1 -3
- package/components/avatar/avatar.class.js +12 -1
- package/components/button/button.d.ts +4 -0
- package/components/button/button.yaml +1 -1
- package/components/calendar-picker/calendar-picker.a2ui.json +1 -1
- package/components/calendar-picker/calendar-picker.class.js +2 -3
- package/components/calendar-picker/calendar-picker.css +16 -18
- package/components/calendar-picker/calendar-picker.yaml +2 -2
- package/components/card/card.css +3 -3
- package/components/chart/chart.a2ui.json +29 -18
- package/components/chart/chart.class.js +1308 -266
- package/components/chart/chart.css +151 -1
- package/components/chart/chart.d.ts +9 -9
- package/components/chart/chart.yaml +63 -31
- package/components/chart-legend/chart-legend.a2ui.json +20 -14
- package/components/chart-legend/chart-legend.class.js +79 -58
- package/components/chart-legend/chart-legend.css +65 -1
- package/components/chart-legend/chart-legend.d.ts +5 -5
- package/components/chart-legend/chart-legend.examples.md +4 -4
- package/components/chart-legend/chart-legend.yaml +50 -20
- package/components/check/check.css +9 -0
- package/components/color-area/color-area.a2ui.json +1 -1
- package/components/color-area/color-area.class.js +2 -2
- package/components/color-area/color-area.css +4 -7
- package/components/color-area/color-area.d.ts +1 -1
- package/components/color-area/color-area.yaml +3 -3
- package/components/color-input/color-input.a2ui.json +1 -1
- package/components/color-input/color-input.class.js +1 -1
- package/components/color-input/color-input.yaml +2 -2
- package/components/combobox/combobox.a2ui.json +3 -0
- package/components/combobox/combobox.class.js +9 -8
- package/components/combobox/combobox.css +25 -4
- package/components/combobox/combobox.yaml +6 -0
- package/components/command/command.css +17 -1
- package/components/context-menu/context-menu.d.ts +2 -0
- package/components/drilldown/drilldown.a2ui.json +3 -0
- package/components/drilldown/drilldown.css +8 -1
- package/components/drilldown/drilldown.yaml +2 -0
- package/components/field/field.class.js +5 -5
- package/components/heatmap/heatmap.a2ui.json +5 -0
- package/components/heatmap/heatmap.d.ts +2 -0
- package/components/heatmap/heatmap.yaml +8 -0
- package/components/index.js +0 -4
- package/components/input/input.a2ui.json +4 -4
- package/components/input/input.class.js +20 -7
- package/components/input/input.css +6 -0
- package/components/input/input.yaml +15 -11
- package/components/integration-card/integration-card.d.ts +2 -0
- package/components/menu/menu-item.a2ui.json +3 -8
- package/components/menu/menu-item.yaml +13 -21
- package/components/menu/menu.class.js +5 -27
- package/components/menu/menu.d.ts +1 -3
- package/components/noodles/noodles.a2ui.json +0 -15
- package/components/noodles/noodles.yaml +0 -12
- package/components/number-format/number-format.class.js +10 -0
- package/components/pagination/pagination.class.js +88 -4
- package/components/pane/pane.a2ui.json +2 -12
- package/components/pane/pane.class.js +5 -30
- package/components/pane/pane.d.ts +3 -5
- package/components/pane/pane.yaml +7 -19
- package/components/popover/popover.d.ts +2 -0
- package/components/progress/progress.a2ui.json +1 -1
- package/components/progress/progress.class.js +13 -8
- package/components/progress/progress.d.ts +1 -1
- package/components/progress/progress.yaml +2 -2
- package/components/radio/radio.css +7 -0
- package/components/range/range.class.js +9 -1
- package/components/search/search.css +10 -1
- package/components/segment/segment.a2ui.json +1 -2
- package/components/segment/segment.css +10 -0
- package/components/segment/segment.yaml +1 -2
- package/components/segmented/segmented.a2ui.json +1 -3
- package/components/segmented/segmented.class.js +2 -2
- package/components/segmented/segmented.yaml +2 -4
- package/components/select/select.a2ui.json +5 -1
- package/components/select/select.class.js +14 -14
- package/components/select/select.css +20 -1
- package/components/select/select.yaml +7 -1
- package/components/step-progress/step-progress.yaml +1 -1
- package/components/stream/stream.d.ts +2 -0
- package/components/switch/switch.css +8 -0
- package/components/table/table.a2ui.json +6 -1
- package/components/table/table.class.js +18 -1
- package/components/table/table.css +31 -6
- package/components/table/table.d.ts +3 -1
- package/components/table/table.examples.md +2 -2
- package/components/table/table.yaml +9 -1
- package/components/table-toolbar/table-toolbar.a2ui.json +67 -2
- package/components/table-toolbar/table-toolbar.class.js +492 -17
- package/components/table-toolbar/table-toolbar.css +311 -0
- package/components/table-toolbar/table-toolbar.d.ts +17 -1
- package/components/table-toolbar/table-toolbar.yaml +220 -15
- package/components/tag/tag.class.js +13 -1
- package/components/text/text.a2ui.json +3 -3
- package/components/text/text.d.ts +5 -3
- package/components/text/text.yaml +3 -3
- package/components/textarea/textarea.class.js +9 -1
- package/components/textarea/textarea.css +4 -0
- package/components/time-picker/time-picker.yaml +3 -2
- package/components/tour/tour.d.ts +10 -0
- package/components/tree/tree.yaml +1 -1
- package/components/upload/upload.class.js +16 -0
- package/components/upload/upload.d.ts +7 -0
- package/components/upload/upload.yaml +7 -3
- package/core/a11y.d.ts +22 -0
- package/core/a11y.js +64 -0
- package/core/anchor.js +9 -5
- package/core/element.js +1 -1
- package/core/icons.js +2 -5
- package/custom-elements.json +142 -594
- 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 +122 -119
- package/dist/web-components.sheet.js +1 -1
- package/index.d.ts +0 -15
- package/package.json +1 -1
- package/patterns/access-requests/access-requests.examples.html +1 -1
- package/patterns/admin-keys-and-export/admin-keys-and-export.examples.html +7 -7
- package/patterns/agent-cost/agent-cost.examples.html +6 -6
- package/patterns/agent-memory/agent-memory.examples.html +3 -3
- package/patterns/agent-prompt-library/agent-prompt-library.examples.html +8 -8
- package/patterns/agent-tool-call/agent-tool-call.examples.html +1 -1
- package/patterns/approvals/approvals.examples.html +6 -6
- package/patterns/audit-log/audit-log.examples.html +1 -1
- package/patterns/bulk-action-toolbar/bulk-action-toolbar.examples.html +4 -4
- package/patterns/chart-in-card/chart-in-card.examples.html +124 -10
- package/patterns/chart-in-card/chart-in-card.examples.js +37 -0
- package/patterns/comments-and-collaboration/comments-and-collaboration.examples.html +5 -5
- package/patterns/conversion-funnel/conversion-funnel.html +2 -2
- package/patterns/data-tables-inline-edit-and-tree/data-tables-inline-edit-and-tree.examples.html +2 -2
- package/patterns/diff-review/diff-review.examples.html +6 -6
- package/patterns/editor-shell/editor-shell.examples.html +3 -3
- package/patterns/export-flow/export-flow.examples.html +2 -2
- package/patterns/filter-bar/filter-bar.examples.html +2 -2
- package/patterns/forms-conditional-and-autocomplete/forms-conditional-and-autocomplete.examples.html +2 -2
- package/patterns/inline-dialog/inline-dialog.examples.html +2 -2
- package/patterns/marketing-engagement/marketing-engagement.examples.html +4 -4
- package/patterns/notifications-bell-and-digest/notifications-bell-and-digest.examples.html +1 -1
- package/patterns/permissions-matrix/permissions-matrix.examples.html +1 -1
- package/patterns/permissions-sharing/permissions-sharing.examples.html +2 -2
- package/patterns/profile-public-and-verification/profile-public-and-verification.examples.html +4 -4
- package/patterns/search-discovery/search-discovery.examples.html +2 -2
- package/styles/colors/semantics/features.css +8 -1
- package/styles/components.css +0 -4
- package/styles/type/roles.css +29 -9
- package/traits/arrow-grid-nav/arrow-grid-nav.js +1 -1
- package/traits/resize-observer/resize-observer.js +1 -1
- package/components/color-picker/color-picker.a2ui.json +0 -148
- package/components/color-picker/color-picker.class.js +0 -46
- package/components/color-picker/color-picker.css +0 -14
- package/components/color-picker/color-picker.d.ts +0 -99
- package/components/color-picker/color-picker.examples.md +0 -19
- package/components/color-picker/color-picker.js +0 -17
- package/components/color-picker/color-picker.yaml +0 -175
- package/components/datetime-picker/datetime-picker.a2ui.json +0 -256
- package/components/datetime-picker/datetime-picker.class.js +0 -58
- package/components/datetime-picker/datetime-picker.css +0 -11
- package/components/datetime-picker/datetime-picker.d.ts +0 -87
- package/components/datetime-picker/datetime-picker.examples.md +0 -25
- package/components/datetime-picker/datetime-picker.js +0 -17
- package/components/datetime-picker/datetime-picker.yaml +0 -254
- package/components/progress-row/progress-row.a2ui.json +0 -107
- package/components/progress-row/progress-row.class.js +0 -118
- package/components/progress-row/progress-row.css +0 -60
- package/components/progress-row/progress-row.d.ts +0 -24
- package/components/progress-row/progress-row.examples.md +0 -7
- package/components/progress-row/progress-row.js +0 -17
- package/components/progress-row/progress-row.yaml +0 -85
- package/components/toggle-group/toggle-group.a2ui.json +0 -148
- package/components/toggle-group/toggle-group.class.js +0 -195
- package/components/toggle-group/toggle-group.css +0 -127
- package/components/toggle-group/toggle-group.d.ts +0 -50
- package/components/toggle-group/toggle-group.examples.md +0 -33
- package/components/toggle-group/toggle-group.js +0 -18
- package/components/toggle-group/toggle-group.yaml +0 -135
- package/components/toggle-group/toggle-option.a2ui.json +0 -86
- package/components/toggle-group/toggle-option.yaml +0 -75
|
@@ -94,13 +94,11 @@ export class UIActionItem extends UIElement {
|
|
|
94
94
|
static properties = {
|
|
95
95
|
icon: { type: String, default: '', reflect: true },
|
|
96
96
|
text: { type: String, default: '', reflect: true },
|
|
97
|
-
// ADR-0063 (gh#1571) — `
|
|
98
|
-
// corpus's remaining `subtitle` outlier once <menu-item-ui>
|
|
99
|
-
// under gh#1563);
|
|
100
|
-
//
|
|
101
|
-
// surface — see action-item.yaml) is
|
|
102
|
-
// PROP renames.
|
|
103
|
-
subtitle: { type: String, default: '', reflect: true },
|
|
97
|
+
// ADR-0063 (gh#1571) — `description` is canonical (action-item was
|
|
98
|
+
// the corpus's remaining `subtitle` outlier once <menu-item-ui>
|
|
99
|
+
// converged under gh#1563); the deprecated `subtitle` PROP dual-read
|
|
100
|
+
// shim was cut in 0.8.43 (gh#1617). The `subtitle` SLOT (a separate
|
|
101
|
+
// surface — see action-item.yaml) is unchanged.
|
|
104
102
|
description: { type: String, default: '', reflect: true },
|
|
105
103
|
value: { type: String, default: '', reflect: true },
|
|
106
104
|
variant: { type: String, default: 'default', reflect: true },
|
|
@@ -109,51 +107,6 @@ export class UIActionItem extends UIElement {
|
|
|
109
107
|
|
|
110
108
|
static template = () => null;
|
|
111
109
|
|
|
112
|
-
// ADR-0063 (gh#1571) one-shot-per-class deprecation warn for [subtitle].
|
|
113
|
-
static #warnedSubtitle = false;
|
|
114
|
-
|
|
115
|
-
// Guards + tracks the [subtitle] -> [description] compat mirror (below).
|
|
116
|
-
// action-item-ui (unlike menu-item-ui) has pre-existing tests that set
|
|
117
|
-
// [subtitle] AFTER mount and expect the rendered row to keep tracking it
|
|
118
|
-
// (gh#1374) — a resolve-once-at-connect shim (menu-item-ui's own shape)
|
|
119
|
-
// would silently stop mirroring once `description` picks up its first
|
|
120
|
-
// reflected value. `#mirroring` suppresses the authored-flag while WE
|
|
121
|
-
// write `this.description` ourselves; `#descriptionAuthored` latches
|
|
122
|
-
// true the moment a REAL (non-mirrored) `description` attribute shows
|
|
123
|
-
// up, so [description] wins permanently from that point on, even
|
|
124
|
-
// across later [subtitle] attribute churn.
|
|
125
|
-
#mirroring = false;
|
|
126
|
-
#descriptionAuthored = false;
|
|
127
|
-
|
|
128
|
-
attributeChangedCallback(name, oldVal, val) {
|
|
129
|
-
if (name === 'description' && !this.#mirroring) this.#descriptionAuthored = true;
|
|
130
|
-
super.attributeChangedCallback(name, oldVal, val);
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
// ADR-0063 (gh#1571) compat shim. New-name precedence: once [description]
|
|
134
|
-
// has ever been authored directly, it wins outright and [subtitle] is
|
|
135
|
-
// ignored from then on. Until then, [subtitle] mirrors into [description]
|
|
136
|
-
// on every resolve (initial connect AND every subsequent render), so a
|
|
137
|
-
// post-mount [subtitle] update keeps propagating exactly like it did
|
|
138
|
-
// before this shim existed.
|
|
139
|
-
#resolveSubtitleCompat() {
|
|
140
|
-
if (this.#descriptionAuthored) return;
|
|
141
|
-
const mirrored = this.hasAttribute('subtitle') ? this.subtitle : '';
|
|
142
|
-
if (this.description === mirrored) return;
|
|
143
|
-
this.#mirroring = true;
|
|
144
|
-
this.description = mirrored;
|
|
145
|
-
this.#mirroring = false;
|
|
146
|
-
if (mirrored && !UIActionItem.#warnedSubtitle) {
|
|
147
|
-
UIActionItem.#warnedSubtitle = true;
|
|
148
|
-
// eslint-disable-next-line no-console
|
|
149
|
-
console.warn(
|
|
150
|
-
'[AdiaUI] <action-item-ui [subtitle]> is deprecated — use ' +
|
|
151
|
-
'[description] instead (ADR-0063, gh#1571). Kept working as-is; ' +
|
|
152
|
-
'no behavior change.',
|
|
153
|
-
);
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
|
|
157
110
|
// Set when connected()/render() stamped this fallback child from a prop —
|
|
158
111
|
// never touch a consumer-authored slot="icon"/"text"/"subtitle" child
|
|
159
112
|
// (ADR-0010, slot content is source of truth). Mirrors menu-item-ui's
|
|
@@ -170,10 +123,6 @@ export class UIActionItem extends UIElement {
|
|
|
170
123
|
}
|
|
171
124
|
|
|
172
125
|
connected() {
|
|
173
|
-
// ADR-0063 (gh#1571) compat shim — resolve BEFORE #stamp() reads
|
|
174
|
-
// `this.description`, so there's no wrong-then-right flash.
|
|
175
|
-
this.#resolveSubtitleCompat();
|
|
176
|
-
|
|
177
126
|
// Adopt-or-stamp (gh#753): a consumer-authored role survives connect —
|
|
178
127
|
// only stamp "listitem" when the host has no author-set role at all.
|
|
179
128
|
if (!this.hasAttribute('role')) this.setAttribute('role', 'listitem');
|
|
@@ -218,11 +167,6 @@ export class UIActionItem extends UIElement {
|
|
|
218
167
|
}
|
|
219
168
|
|
|
220
169
|
render() {
|
|
221
|
-
// ADR-0063 (gh#1571) compat shim — re-resolve on every render so a
|
|
222
|
-
// post-mount [subtitle] update keeps mirroring into [description]
|
|
223
|
-
// until an author sets [description] directly (see #resolveSubtitleCompat).
|
|
224
|
-
this.#resolveSubtitleCompat();
|
|
225
|
-
|
|
226
170
|
// Sync icon — only touch elements we stamped.
|
|
227
171
|
const iconEl = this.#ownChild('[slot="icon"]');
|
|
228
172
|
if (this.icon) {
|
|
@@ -34,14 +34,12 @@ export class UIActionList extends UIElement {
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
export class UIActionItem extends UIElement {
|
|
37
|
-
/** Optional secondary description line rendered under the label. Canonical spelling (ADR-0063, gh#1571) replacing `subtitle` — converges action-item onto the same spelling <menu-item-ui> adopted under gh#1563. */
|
|
37
|
+
/** Optional secondary description line rendered under the label. Canonical spelling (ADR-0063, gh#1571) replacing `subtitle` — converges action-item onto the same spelling <menu-item-ui> adopted under gh#1563. The deprecated `subtitle` prop alias was cut in 0.8.43 (gh#1617). */
|
|
38
38
|
description: string;
|
|
39
39
|
/** Disables click + keyboard activation; aria-disabled is set. */
|
|
40
40
|
disabled: boolean;
|
|
41
41
|
/** Leading icon name (Phosphor). */
|
|
42
42
|
icon: string;
|
|
43
|
-
/** DEPRECATED (ADR-0063, gh#1571) — use `description` instead. Same type/default/rendered position; kept working as a dual-read compat shim (one-time console.warn when it's the name that resolves). Removed in 0.9.0. (The `subtitle` SLOT below is a separate surface, deliberately left unrenamed in this pass — see its own description.) */
|
|
44
|
-
subtitle: string;
|
|
45
43
|
/** Action label. */
|
|
46
44
|
text: string;
|
|
47
45
|
/** Identifier passed to the action-list change/activate handlers. */
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
*/
|
|
28
28
|
|
|
29
29
|
import { UIElement } from '../../core/element.js';
|
|
30
|
+
import { syncAutoAriaLabel } from '../../core/a11y.js';
|
|
30
31
|
|
|
31
32
|
// ── Avatar ──────────────────────────────────────────────────
|
|
32
33
|
|
|
@@ -47,6 +48,13 @@ export class UIAvatar extends UIElement {
|
|
|
47
48
|
#imgEl = null;
|
|
48
49
|
#initialsEl = null;
|
|
49
50
|
#iconEl = null;
|
|
51
|
+
// gh#1647: tracks the aria-label VALUE this element itself last derived
|
|
52
|
+
// from `text`/`icon` (undefined when none) — value-tracking guard
|
|
53
|
+
// ported from tag.class.js/select.class.js (gh#1644/#1646). Scoped to
|
|
54
|
+
// the PER-AVATAR label only — avatar-group's own "Avatar group" label
|
|
55
|
+
// (avatar.class.js's UIAvatarGroup, :125) is already guarded separately
|
|
56
|
+
// and runs once in connected(), not the render loop; out of scope here.
|
|
57
|
+
#lastAutoAriaLabel = undefined;
|
|
50
58
|
|
|
51
59
|
connected() {
|
|
52
60
|
this.setAttribute('role', 'img');
|
|
@@ -90,7 +98,10 @@ export class UIAvatar extends UIElement {
|
|
|
90
98
|
this.#showInitials();
|
|
91
99
|
}
|
|
92
100
|
|
|
93
|
-
|
|
101
|
+
// A11y (gh#1647): never clobber a consumer's own aria-label
|
|
102
|
+
// (value-tracking guard, gh#1644/#1646).
|
|
103
|
+
const ariaSource = this.displayName || this.icon || '';
|
|
104
|
+
this.#lastAutoAriaLabel = syncAutoAriaLabel(this, this.#lastAutoAriaLabel, ariaSource);
|
|
94
105
|
}
|
|
95
106
|
|
|
96
107
|
#showInitials() {
|
|
@@ -17,12 +17,16 @@ export type ButtonPressEvent = CustomEvent<unknown>;
|
|
|
17
17
|
export class UIButton extends UIElement {
|
|
18
18
|
/** HTML button type (button, submit, reset) */
|
|
19
19
|
type: string;
|
|
20
|
+
/** Accessible label for screen readers. Auto-set from `text` when text is non-empty; meaningful override for icon-only buttons. */
|
|
21
|
+
ariaLabel: string;
|
|
20
22
|
/** Semantic intent — composes with [variant]. `<button-ui variant="solid" color="danger">` = filled destructive action; `<button-ui variant="outline" color="success">` = outlined success affordance. */
|
|
21
23
|
color: 'default' | 'info' | 'success' | 'warning' | 'danger';
|
|
22
24
|
/** Disables interaction and prevents click/press events */
|
|
23
25
|
disabled: boolean;
|
|
24
26
|
/** Leading Phosphor icon name (rendered before text). */
|
|
25
27
|
icon: string;
|
|
28
|
+
/** Trailing Phosphor icon name (rendered after text). Use for forward affordances like "Next →" / wizards / pagination / product tours where the caret points away from the label. */
|
|
29
|
+
iconTrailing: string;
|
|
26
30
|
/** Sizing scale (sm/md/lg). For a denser or larger register, set [scale] on an ancestor (scale="ui-sm" … "content-lg") — scale picks the table, size picks the row. */
|
|
27
31
|
size: 'sm' | 'md' | 'lg';
|
|
28
32
|
/** Makes the button stretch to fill the parent's width */
|
|
@@ -165,7 +165,7 @@ a2ui:
|
|
|
165
165
|
reason: 'Per existing slot.discipline rule — visual redundancy guard.'
|
|
166
166
|
- rule: 'For navigation (route-change) use <nav-item-ui> or anchor; button-ui is for actions only.'
|
|
167
167
|
reason: 'Action vs navigation semantics.'
|
|
168
|
-
- rule: 'For toggleable on/off state use <switch-ui>; for multi-select clusters use <segmented-ui multiple> + <segment-ui> (
|
|
168
|
+
- rule: 'For toggleable on/off state use <switch-ui>; for multi-select clusters use <segmented-ui multiple> + <segment-ui> (<toggle-group-ui>/<toggle-option-ui> were cut in 0.8.43, gh#1617, gh#1369).'
|
|
169
169
|
reason: 'Stateless action vs stateful toggle.'
|
|
170
170
|
anti_patterns:
|
|
171
171
|
- description: >-
|
|
@@ -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/CalendarPicker.json",
|
|
4
4
|
"title": "CalendarPicker",
|
|
5
|
-
"description": "Date (and, per `[precision]`, date+time) picker with trigger button and popover panel. Form-associated input emitting an ISO date (or, when `precision` is `minute`/`second`, ISO datetime) string via change events; supports min/max and disabled-date masks. Use for single-date or single-datetime input in forms; for date ranges use <date-range-picker-ui> instead of composing two calendar-picker instances. gh#1372 (#1363 C3c) folded <datetime-picker-ui>'s surface into this widened `precision` axis —
|
|
5
|
+
"description": "Date (and, per `[precision]`, date+time) picker with trigger button and popover panel. Form-associated input emitting an ISO date (or, when `precision` is `minute`/`second`, ISO datetime) string via change events; supports min/max and disabled-date masks. Use for single-date or single-datetime input in forms; for date ranges use <date-range-picker-ui> instead of composing two calendar-picker instances. gh#1372 (#1363 C3c) folded <datetime-picker-ui>'s surface into this widened `precision` axis — that thin alias component was cut in 0.8.43 (gh#1617); this is the sole tag now.",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"allOf": [
|
|
8
8
|
{
|
|
@@ -25,9 +25,8 @@
|
|
|
25
25
|
* `"minute"`/`"second"` additionally composes `<divider-ui>` +
|
|
26
26
|
* `<time-picker-ui>` as a second pane, `value` becomes a full ISO 8601
|
|
27
27
|
* datetime string, and `hour-cycle`/`step`/`locale` become active — the same
|
|
28
|
-
* contract `<datetime-picker-ui>` shipped
|
|
29
|
-
*
|
|
30
|
-
* `precision="minute"` by default. Per ADR-0027, the consumer must
|
|
28
|
+
* contract `<datetime-picker-ui>` shipped; that thin alias subclass was cut
|
|
29
|
+
* in 0.8.43 (gh#1617) — this is the sole tag now. Per ADR-0027, the consumer must
|
|
31
30
|
* explicitly import every composed primitive (see `composes:` in
|
|
32
31
|
* calendar-picker.yaml) — this class doesn't auto-import them.
|
|
33
32
|
*
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
/* gh#1372, #1363 C3c — datetime-picker-ui
|
|
2
|
-
subclass
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
<calendar-picker-ui precision="minute">. */
|
|
6
|
-
@scope (calendar-picker-ui, datetime-picker-ui) {
|
|
1
|
+
/* gh#1372, #1363 C3c — datetime-picker-ui was a thin UICalendarPicker
|
|
2
|
+
subclass folding datetime mode into this component's widened precision
|
|
3
|
+
axis; cut in 0.8.43 (gh#1617). calendar-picker-ui is the sole tag now. */
|
|
4
|
+
@scope (calendar-picker-ui) {
|
|
7
5
|
:where(:scope) {
|
|
8
6
|
/* ── Tokens ── */
|
|
9
7
|
|
|
@@ -192,7 +190,7 @@
|
|
|
192
190
|
/* ── Calendar popover (outside @scope — popover lives in top layer) ── */
|
|
193
191
|
/* Custom properties inherit from the host, so --calendar-picker-* tokens are available here. */
|
|
194
192
|
|
|
195
|
-
|
|
193
|
+
calendar-picker-ui [slot="popover"] {
|
|
196
194
|
margin: 0;
|
|
197
195
|
padding: var(--calendar-picker-popover-padding);
|
|
198
196
|
border: 1px solid var(--calendar-picker-popover-border);
|
|
@@ -211,7 +209,7 @@
|
|
|
211
209
|
translate var(--a-duration-fast) var(--a-easing-out);
|
|
212
210
|
}
|
|
213
211
|
|
|
214
|
-
|
|
212
|
+
calendar-picker-ui [slot="popover"]:popover-open {
|
|
215
213
|
@starting-style {
|
|
216
214
|
opacity: 0;
|
|
217
215
|
translate: 0 -4px;
|
|
@@ -219,7 +217,7 @@
|
|
|
219
217
|
}
|
|
220
218
|
|
|
221
219
|
@media (prefers-reduced-motion: reduce) {
|
|
222
|
-
|
|
220
|
+
calendar-picker-ui [slot="popover"] { transition: none; }
|
|
223
221
|
}
|
|
224
222
|
|
|
225
223
|
/* ── Substrate grid (gh#1371, #1363 C3a) ──
|
|
@@ -231,7 +229,7 @@
|
|
|
231
229
|
so an existing consumer override keeps working unchanged (non-breaking —
|
|
232
230
|
ADR-0055 precedent) and mirrors date-range-picker's own
|
|
233
231
|
`date-range-picker-ui calendar-grid-ui { --calendar-grid-*: … }` pattern. */
|
|
234
|
-
|
|
232
|
+
calendar-picker-ui calendar-grid-ui {
|
|
235
233
|
--calendar-grid-header-gap: var(--calendar-picker-header-gap);
|
|
236
234
|
--calendar-grid-header-mb: var(--calendar-picker-header-mb);
|
|
237
235
|
--calendar-grid-title-fg: var(--calendar-picker-title-fg);
|
|
@@ -281,11 +279,11 @@
|
|
|
281
279
|
single-pane (date-only, default) popover keeps its original fixed-width
|
|
282
280
|
block layout unchanged. Ported near-verbatim from the former
|
|
283
281
|
datetime-picker.css. */
|
|
284
|
-
|
|
282
|
+
calendar-picker-ui [slot="popover"]:has([data-time-pane]) {
|
|
285
283
|
width: auto;
|
|
286
284
|
}
|
|
287
285
|
|
|
288
|
-
|
|
286
|
+
calendar-picker-ui [slot="popover"]:has([data-time-pane]):popover-open {
|
|
289
287
|
display: grid;
|
|
290
288
|
grid-template-columns: auto auto auto;
|
|
291
289
|
grid-template-areas: "cal divider time";
|
|
@@ -293,22 +291,22 @@
|
|
|
293
291
|
align-items: start;
|
|
294
292
|
}
|
|
295
293
|
|
|
296
|
-
|
|
294
|
+
calendar-picker-ui [slot="popover"] > calendar-grid-ui {
|
|
297
295
|
grid-area: cal;
|
|
298
296
|
}
|
|
299
|
-
|
|
297
|
+
calendar-picker-ui [slot="popover"] > [data-pane-divider] {
|
|
300
298
|
grid-area: divider;
|
|
301
299
|
align-self: stretch;
|
|
302
300
|
--divider-color: var(--calendar-picker-divider);
|
|
303
301
|
}
|
|
304
|
-
|
|
302
|
+
calendar-picker-ui [slot="popover"] > [data-time-pane] {
|
|
305
303
|
grid-area: time;
|
|
306
304
|
align-self: start;
|
|
307
305
|
}
|
|
308
306
|
|
|
309
307
|
/* Footer area (consumer-supplied [slot="footer"]) — spans all columns
|
|
310
308
|
under the pane(s), in either single- or two-pane mode. */
|
|
311
|
-
|
|
309
|
+
calendar-picker-ui [slot="popover"] [slot="footer"] {
|
|
312
310
|
grid-column: 1 / -1;
|
|
313
311
|
display: flex;
|
|
314
312
|
justify-content: flex-end;
|
|
@@ -320,14 +318,14 @@
|
|
|
320
318
|
/* Narrow surfaces (e.g. inside a card on mobile): stack the panes
|
|
321
319
|
vertically and replace the vertical divider with a horizontal rule. */
|
|
322
320
|
@container (max-width: 32rem) {
|
|
323
|
-
|
|
321
|
+
calendar-picker-ui [slot="popover"]:has([data-time-pane]):popover-open {
|
|
324
322
|
grid-template-columns: 1fr;
|
|
325
323
|
grid-template-areas:
|
|
326
324
|
"cal"
|
|
327
325
|
"divider"
|
|
328
326
|
"time";
|
|
329
327
|
}
|
|
330
|
-
|
|
328
|
+
calendar-picker-ui [slot="popover"] > [data-pane-divider] {
|
|
331
329
|
align-self: auto;
|
|
332
330
|
}
|
|
333
331
|
}
|
|
@@ -13,8 +13,8 @@ description: >-
|
|
|
13
13
|
single-datetime input in forms; for date ranges use
|
|
14
14
|
<date-range-picker-ui> instead of composing two calendar-picker
|
|
15
15
|
instances. gh#1372 (#1363 C3c) folded <datetime-picker-ui>'s surface into
|
|
16
|
-
this widened `precision` axis —
|
|
17
|
-
|
|
16
|
+
this widened `precision` axis — that thin alias component was cut in
|
|
17
|
+
0.8.43 (gh#1617); this is the sole tag now.
|
|
18
18
|
# Per ADR-0027 — primitives that programmatically create other primitives
|
|
19
19
|
# in their render() do NOT auto-import them. Consumer (or demo shell) must
|
|
20
20
|
# explicitly import each composed primitive.
|
package/components/card/card.css
CHANGED
|
@@ -431,7 +431,7 @@
|
|
|
431
431
|
only collision-free for the bare-marks case: a sparkline (its
|
|
432
432
|
renderer never emits axis ticks, gridlines, value labels, or a
|
|
433
433
|
legend — chart.class.js #renderSparkline), or any other chart-ui
|
|
434
|
-
type with BOTH [
|
|
434
|
+
type with BOTH [no-grid] and [no-values] set (the author opted
|
|
435
435
|
out of every text element). A chart that still draws guides or
|
|
436
436
|
value text — or is paired with a <chart-legend-ui> — needs
|
|
437
437
|
clearance from the card's frame, or that text collides with the
|
|
@@ -444,8 +444,8 @@
|
|
|
444
444
|
section below, wired via chart-legend-ui[for="<chart id>"], which
|
|
445
445
|
never enters this selector (see chart-in-card.examples.html's
|
|
446
446
|
"Full-bleed chart + legend band" example). */
|
|
447
|
-
& > section[bleed]:has(> chart-ui:not([type="sparkline"]):not([
|
|
448
|
-
& > section[bleed]:has(> chart-ui:not([type="sparkline"]):not([
|
|
447
|
+
& > section[bleed]:has(> chart-ui:not([type="sparkline"]):not([no-grid])),
|
|
448
|
+
& > section[bleed]:has(> chart-ui:not([type="sparkline"]):not([no-values])),
|
|
449
449
|
& > section[bleed]:has(> chart-legend-ui) {
|
|
450
450
|
margin: var(--card-inset);
|
|
451
451
|
padding: 0;
|
|
@@ -87,41 +87,36 @@
|
|
|
87
87
|
],
|
|
88
88
|
"default": "abbr"
|
|
89
89
|
},
|
|
90
|
-
"hideAverage": {
|
|
91
|
-
"description": "DEPRECATED (ADR-0063, gh#1563) — use `noAverage` instead. Same meaning, same default; kept working as a dual-read compat shim (one- time console.warn when it's the name that resolves). Removed in 0.9.0.",
|
|
92
|
-
"type": "boolean",
|
|
93
|
-
"default": false
|
|
94
|
-
},
|
|
95
|
-
"hideGrid": {
|
|
96
|
-
"description": "DEPRECATED (ADR-0063, gh#1563) — use `noGrid` instead. Same meaning, same default; kept working as a dual-read compat shim (one-time console.warn when it's the name that resolves). Removed in 0.9.0.",
|
|
97
|
-
"type": "boolean",
|
|
98
|
-
"default": false
|
|
99
|
-
},
|
|
100
|
-
"hideValues": {
|
|
101
|
-
"description": "DEPRECATED (ADR-0063, gh#1563) — use `noValues` instead. Same meaning, same default; kept working as a dual-read compat shim (one- time console.warn when it's the name that resolves). Removed in 0.9.0.",
|
|
102
|
-
"type": "boolean",
|
|
103
|
-
"default": false
|
|
104
|
-
},
|
|
105
90
|
"loading": {
|
|
106
91
|
"description": "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).",
|
|
107
92
|
"type": "boolean",
|
|
108
93
|
"default": false
|
|
109
94
|
},
|
|
110
95
|
"noAverage": {
|
|
111
|
-
"description": "When true, suppress the overlaid average line. Canonical spelling (ADR-0063, gh#1563)
|
|
96
|
+
"description": "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).",
|
|
112
97
|
"type": "boolean",
|
|
113
98
|
"default": false
|
|
114
99
|
},
|
|
115
100
|
"noGrid": {
|
|
116
|
-
"description": "Hide gridlines. Canonical spelling (ADR-0063, gh#1563)
|
|
101
|
+
"description": "Hide gridlines. Canonical spelling (ADR-0063, gh#1563) — the deprecated `hideGrid` dual-read shim was cut in 0.8.43 (gh#1617).",
|
|
117
102
|
"type": "boolean",
|
|
118
103
|
"default": false
|
|
119
104
|
},
|
|
120
105
|
"noValues": {
|
|
121
|
-
"description": "Hide value labels. Canonical spelling (ADR-0063, gh#1563)
|
|
106
|
+
"description": "Hide value labels. Canonical spelling (ADR-0063, gh#1563) — the deprecated `hideValues` dual-read shim was cut in 0.8.43 (gh#1617).",
|
|
122
107
|
"type": "boolean",
|
|
123
108
|
"default": false
|
|
124
109
|
},
|
|
110
|
+
"ratio": {
|
|
111
|
+
"description": "Chart 2.0 aspect-ratio bucket (ADR-0074). Unset (default) auto-snaps to the nearest of the three studied ratios by comparing the chart's own live box aspect against two midpoint boundaries (5:4 between 3:2/1:1, 4:5 between 1:1/2:3) — never interpolated; the resolved bucket reflects onto the host as `data-ratio-resolved`. Setting `ratio` explicitly pins that bucket regardless of the box's actual aspect, overriding the auto-snap. Orthogonal to `size` (overall scale) and `type`/`color` (ADR-0064's family axis) — this attribute lands the grammar + snap plumbing only; per-type studied renderings per bucket are later waves (gh#1624 plan steps 2-4).",
|
|
112
|
+
"type": "string",
|
|
113
|
+
"enum": [
|
|
114
|
+
"3:2",
|
|
115
|
+
"1:1",
|
|
116
|
+
"2:3"
|
|
117
|
+
],
|
|
118
|
+
"default": ""
|
|
119
|
+
},
|
|
125
120
|
"seriesEmphasis": {
|
|
126
121
|
"description": "Multi-line only. Names one series key (matching a `y` key) to render at full strength — area fill + full-opacity line. Every other series drops its area fill and renders line-only at --chart-deemphasized-opacity. Empty (default) applies full treatment to every series, unchanged from pre-gh#561 behavior.",
|
|
127
122
|
"type": "string",
|
|
@@ -151,6 +146,22 @@
|
|
|
151
146
|
"description": "Y-axis key(s), comma-separated for multi-series",
|
|
152
147
|
"type": "string",
|
|
153
148
|
"default": ""
|
|
149
|
+
},
|
|
150
|
+
"yMax": {
|
|
151
|
+
"description": "Pins the value-axis domain ceiling for cartesian types (bar, line, area, scatter, multi-line, stacked-bar, grouped-bar, composed). Unset (default, null) keeps today's auto-scale ceiling (the data max). Pairs with `yMin` to pin the full domain; either may be set alone. N/A for radial/part-to-whole types — see `yMin` (gh#1690). A datum outside the pinned domain is CLAMPED to the nearest edge for rendering (the value label/tooltip still shows the real value) rather than escaping the plot box.",
|
|
152
|
+
"type": [
|
|
153
|
+
"number",
|
|
154
|
+
"null"
|
|
155
|
+
],
|
|
156
|
+
"default": null
|
|
157
|
+
},
|
|
158
|
+
"yMin": {
|
|
159
|
+
"description": "Pins the value-axis domain floor for cartesian types (bar, line, area, scatter, multi-line, stacked-bar, grouped-bar, composed). Unset (default, null) already floors a positive series at 0 (the pre-1690 behavior, unchanged) — a migrating d3 consumer's own \"pin the floor to 0\" habit is the built-in default, not something to configure. Pin `y-min` explicitly for three OTHER cases: (1) zooming a narrow window — e.g. `y-min=\"0.9\" y-max=\"1\"` magnifies a percent series clustered near 92-95%, which reads flatter against the full auto-scaled [0,1] domain; (2) a mixed-sign series, where the unpinned floor never goes below 0 and negative values clip at the axis; (3) aligning two charts to one shared scale for a fair comparison. N/A for radial/part-to-whole types (pie, donut, radar, radial-bar, gauge, funnel, treemap, sankey, segments, sparkline) — those never read a shared linear value axis, so this prop is a no-op there (gh#1690). A datum outside the pinned domain is CLAMPED to the nearest edge for rendering (the value label/tooltip still shows the real value) rather than escaping the plot box.",
|
|
160
|
+
"type": [
|
|
161
|
+
"number",
|
|
162
|
+
"null"
|
|
163
|
+
],
|
|
164
|
+
"default": null
|
|
154
165
|
}
|
|
155
166
|
},
|
|
156
167
|
"required": [
|