@adia-ai/web-components 0.6.48 → 0.6.49
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 +31 -0
- package/components/calendar-grid/calendar-grid.a2ui.json +5 -0
- package/components/calendar-grid/calendar-grid.class.js +8 -1
- package/components/calendar-grid/calendar-grid.d.ts +2 -0
- package/components/calendar-grid/calendar-grid.yaml +8 -0
- package/components/date-range-picker/date-range-picker.class.js +9 -0
- package/components/field/field.test.js +7 -2
- package/dist/web-components.min.js +52 -52
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
# Changelog — @adia-ai/web-components
|
|
2
2
|
|
|
3
|
+
## [0.6.49] — 2026-05-30
|
|
4
|
+
|
|
5
|
+
### Changed — card-ui header slot sweep + `nav-group-ui` fixes (demos)
|
|
6
|
+
|
|
7
|
+
- **`patterns/*` + catalog demo HTML** — card-ui header anatomy swept to the canonical `<header>` slot grammar across admin-dashboard + 5 catalog patterns; `nav-group-ui` `label=` → `text=` + icon fixes. Demo/corpus-facing; absorbed into the chunk corpus regen.
|
|
8
|
+
- **31 module demos** — `<!-- design-plan -->` blocks retrofitted across the composite-demo-protocol campaign (Phase 1+3 artifacts embedded).
|
|
9
|
+
|
|
10
|
+
### Maintenance
|
|
11
|
+
|
|
12
|
+
- **`dist/web-components.min.js` + `dist/icons-manifest.js`** — bundle rebuild reflecting the calendar-grid `month` prop + date-range-picker class changes.
|
|
13
|
+
|
|
14
|
+
### Fixed — `<date-range-picker>` showed the same month in both panes
|
|
15
|
+
|
|
16
|
+
- **`components/calendar-grid/calendar-grid.{class.js,yaml}`** — new `month`
|
|
17
|
+
attribute (`YYYY-MM`): sets the displayed month when no `value` is selected, so
|
|
18
|
+
a consumer can show a specific month independent of selection. A selected value
|
|
19
|
+
always takes precedence.
|
|
20
|
+
- **`components/date-range-picker/date-range-picker.class.js`** — the end pane now
|
|
21
|
+
defaults to **one month after** the start pane (via the new `month` hint), so a
|
|
22
|
+
fresh range picker shows two consecutive months (e.g. May + June) instead of the
|
|
23
|
+
current month twice. A selected `to` date still drives its own pane. Propagates
|
|
24
|
+
to `<date-range-selector>` (embeds the picker).
|
|
25
|
+
|
|
26
|
+
### Fixed — `drop-target` demo card-structure violation
|
|
27
|
+
|
|
28
|
+
- **`traits/drop-target/drop-target.examples.html`** — the 4 `<card-ui>` drop
|
|
29
|
+
surfaces held `<text-ui>` / `<col-ui>` directly (bypassing the card body slot),
|
|
30
|
+
failing `check:card-structure` (a `check`-chain gate). Wrapped each in
|
|
31
|
+
`<section bleed style="display:grid;place-items:center">` — clears the gate while
|
|
32
|
+
keeping the centered drop-zone appearance. `audit:card-structure` now clean.
|
|
33
|
+
|
|
3
34
|
## [0.6.48] — 2026-05-29
|
|
4
35
|
|
|
5
36
|
### Demos — library-wide consolidation sweep (HTML-first)
|
|
@@ -31,6 +31,11 @@
|
|
|
31
31
|
"type": "string",
|
|
32
32
|
"default": ""
|
|
33
33
|
},
|
|
34
|
+
"month": {
|
|
35
|
+
"description": "Displayed month (YYYY-MM) used when no value is selected — shows a specific month independent of selection. A selected value always takes precedence. Used by date-range-picker to show its end pane one month ahead of the start.",
|
|
36
|
+
"type": "string",
|
|
37
|
+
"default": ""
|
|
38
|
+
},
|
|
34
39
|
"rangeEnd": {
|
|
35
40
|
"description": "End of a date range (ISO YYYY-MM-DD). See `rangeStart` for the full contract.",
|
|
36
41
|
"type": "string",
|
|
@@ -61,6 +61,10 @@ export class UICalendarGrid extends UIElement {
|
|
|
61
61
|
|
|
62
62
|
static properties = {
|
|
63
63
|
value: { type: String, default: '', reflect: true },
|
|
64
|
+
// Displayed month (`YYYY-MM`) when no `value` is selected — lets a consumer
|
|
65
|
+
// show a specific month independent of selection (e.g. a date-range picker
|
|
66
|
+
// showing its end pane one month ahead of the start pane). Selection wins.
|
|
67
|
+
month: { type: String, default: '', reflect: true },
|
|
64
68
|
min: { type: String, default: '', reflect: true },
|
|
65
69
|
max: { type: String, default: '', reflect: true },
|
|
66
70
|
disabled: { type: Boolean, default: false, reflect: true },
|
|
@@ -90,11 +94,14 @@ export class UICalendarGrid extends UIElement {
|
|
|
90
94
|
this.setAttribute('role', 'group');
|
|
91
95
|
if (!this.hasAttribute('aria-label')) this.setAttribute('aria-label', 'Calendar');
|
|
92
96
|
|
|
93
|
-
// Initialize view to selected date
|
|
97
|
+
// Initialize view to selected date, else the [month] hint, else today.
|
|
94
98
|
const sel = parseISO(this.value);
|
|
95
99
|
if (sel) {
|
|
96
100
|
this.#viewYear = sel.getFullYear();
|
|
97
101
|
this.#viewMonth = sel.getMonth();
|
|
102
|
+
} else {
|
|
103
|
+
const vm = /^(\d{4})-(\d{2})$/.exec(String(this.month || '').trim());
|
|
104
|
+
if (vm) { this.#viewYear = +vm[1]; this.#viewMonth = +vm[2] - 1; }
|
|
98
105
|
}
|
|
99
106
|
|
|
100
107
|
if (!this.#bound) {
|
|
@@ -22,6 +22,8 @@ export class UICalendarGrid extends UIElement {
|
|
|
22
22
|
max: string;
|
|
23
23
|
/** Minimum selectable date in ISO format (YYYY-MM-DD). */
|
|
24
24
|
min: string;
|
|
25
|
+
/** Displayed month (YYYY-MM) used when no value is selected — shows a specific month independent of selection. A selected value always takes precedence. Used by date-range-picker to show its end pane one month ahead of the start. */
|
|
26
|
+
month: string;
|
|
25
27
|
/** End of a date range (ISO YYYY-MM-DD). See `rangeStart` for the full contract. */
|
|
26
28
|
rangeEnd: string;
|
|
27
29
|
/** Start of a date range (ISO YYYY-MM-DD). When both rangeStart and rangeEnd are set + ordered, day cells strictly between the endpoints get `[data-in-range]` stamped for visual continuity. Used by `<date-range-picker-ui>` which pushes the same from/to onto both calendar panes. Endpoints themselves render via the `value` prop's `[data-selected]` state. */
|
|
@@ -22,6 +22,14 @@ props:
|
|
|
22
22
|
type: string
|
|
23
23
|
default: ''
|
|
24
24
|
reflect: true
|
|
25
|
+
month:
|
|
26
|
+
description: >-
|
|
27
|
+
Displayed month (YYYY-MM) used when no value is selected — shows a specific
|
|
28
|
+
month independent of selection. A selected value always takes precedence.
|
|
29
|
+
Used by date-range-picker to show its end pane one month ahead of the start.
|
|
30
|
+
type: string
|
|
31
|
+
default: ''
|
|
32
|
+
reflect: true
|
|
25
33
|
min:
|
|
26
34
|
description: Minimum selectable date in ISO format (YYYY-MM-DD).
|
|
27
35
|
type: string
|
|
@@ -411,6 +411,15 @@ export class UIDateRangePicker extends UIFormElement {
|
|
|
411
411
|
}
|
|
412
412
|
if (!calArea.querySelector(':scope > [data-cal-to]')) {
|
|
413
413
|
const calTo = this.constructor._pp.calTo.cloneNode(true);
|
|
414
|
+
// Default the end pane to one month after the start pane so a fresh range
|
|
415
|
+
// picker shows two consecutive months (not the same month twice). A `to`
|
|
416
|
+
// value, once selected, overrides this hint inside the grid.
|
|
417
|
+
const fromISO = parseRange(this.value)?.from;
|
|
418
|
+
let y, mo; // mo: 0-based month
|
|
419
|
+
if (fromISO) { const [yy, mm] = fromISO.split('-').map(Number); y = yy; mo = mm - 1; }
|
|
420
|
+
else { const now = new Date(); y = now.getFullYear(); mo = now.getMonth(); }
|
|
421
|
+
mo += 1; if (mo > 11) { mo = 0; y += 1; }
|
|
422
|
+
calTo.setAttribute('month', `${y}-${pad(mo + 1)}`);
|
|
414
423
|
calArea.appendChild(calTo);
|
|
415
424
|
}
|
|
416
425
|
this.#calFromRef = calArea.querySelector(':scope > [data-cal-from]');
|
|
@@ -227,9 +227,14 @@ describe('field-ui', () => {
|
|
|
227
227
|
expect(scopeBlock[0]).not.toMatch(/row-gap\s*:/);
|
|
228
228
|
});
|
|
229
229
|
|
|
230
|
-
it('CSS source contract: `:scope:has(
|
|
230
|
+
it('CSS source contract: `:scope:has([slot="hint"], [slot="error"])` declares row-gap', () => {
|
|
231
|
+
// The `>` direct-child combinator is OPTIONAL — field.css uses the
|
|
232
|
+
// descendant form `:has([slot="hint"], [slot="error"])` (v0.6.x); either
|
|
233
|
+
// satisfies the FB-54 row-gap-presence-guard contract.
|
|
231
234
|
expect(FIELD_CSS).toMatch(
|
|
232
|
-
|
|
235
|
+
// `var(--field-gap[,)]` accepts both the bare token and the override-aware
|
|
236
|
+
// `var(--field-gap, var(--field-gap-default))` chain (OD-5 token-shadowing).
|
|
237
|
+
/:scope:has\((?:>\s*)?\[slot="hint"\]\s*,\s*(?:>\s*)?\[slot="error"\]\)\s*\{[^}]*row-gap:\s*var\(--field-gap[,)]/
|
|
233
238
|
);
|
|
234
239
|
});
|
|
235
240
|
});
|