@adia-ai/web-components 0.8.9 → 0.8.10

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 CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog — @adia-ai/web-components
2
2
 
3
+ ## [0.8.10] — 2026-07-20
4
+
5
+ ### Added
6
+ - **`<tag-ui>` gains an `accent` variant** (`components/tag/tag.{yaml,css}`; gh#372) — the brand-primary-colored option for non-semantic labels (filter chips, taxonomy tags) that shouldn't imply a success/warning/danger state, mirroring `<badge-ui>`'s existing `accent` variant token-for-token across all three `tone` values. `tag-ui`'s enum was `default | info | success | warning | danger`; `badge-ui`'s parallel enum already had `accent` — the two sibling components' variant vocabularies had drifted apart.
7
+
8
+ ### Fixed
9
+ - **`calendar-grid-ui` in-range highlight now extends across month boundaries** (`components/calendar-grid/calendar-grid.class.js`; gh#368) — a selected range spanning two months previously broke visual continuity at the boundary: the previous/next-month "filler" day loops rendered `data-outside` cells with no date comparison at all, so they could never carry `data-in-range`. Consolidated the per-day predicate logic into a shared `dayCell(date, day, outside)` closure used by all three day-loops; filler days stay exactly as unselectable as before — a pure visual-continuity fix, selection value unaffected.
10
+ - **Dialog-class backdrops (`modal-ui`, `drawer-ui`, `tour-ui`) read black at ~80% opacity, not mid-gray at 50%** (`styles/colors/semantics/{aliases,features}.css`; gh#373) — a self-documented regression from the 2026-07-14 "Material Phase 5" migration, which repointed the dialog scrim onto the shared neutral-500 static ladder (a mid-tone tint, never black; its darkest tier topped out at 60%). Added a purpose-built `--a-chrome-scrim-dialog: oklch(0 0 0 / 0.8)` token (matching the existing non-adaptive black/white CHROME-tier pattern) and repointed `--a-scrim-dialog` to it, leaving the shared ladder's other four roles (hover-wash, toast-veil, generic-overlay, heaviest-veil) untouched.
11
+ - **`<card-ui>`'s `width: stretch` no longer squashes unequal-content flex siblings to identical widths** (`components/card/card.css`; gh#380) — when several `card-ui` KPI tiles (e.g. stat-ui) sit as flex siblings without explicit sizing, `stretch` gave every card an identical flex-basis regardless of content, so `flex-shrink` divided the deficit equally — squeezing a long-title/large-value card to the same pixel width as a trivial short one, which then triggered `stat-ui`'s own (correct) ellipsis truncation. Changed to `flex: 1 1 auto`, which still lets a lone card fill its row but sizes flex-basis from content so unequal siblings shrink proportionally. No effect in block/grid contexts (this repo's canonical KPI-row pattern).
12
+ - **`table.yaml`'s `[raw]` a2ui rule no longer describes non-existent "demo seed data" behavior** (`components/table/table.yaml`; gh#385) — the rule dated to before v0.6.33 and described a data-lifecycle toggle that no longer exists; `[raw]` unconditionally short-circuits the entire data lifecycle (no header injection, no `.data`/`.columns` reconciliation, no aggregation/pagination footers), regardless of whether `.columns`/`.data` are set. Rewritten to match `render()`'s actual `if (this.raw) return;` early-return and every real consumer's usage (spreadsheet/inline-edit style patterns wrapping consumer-owned body markup).
13
+
14
+ ### Maintenance
15
+ - **`dist/` bundles rebuilt** (`web-components.{min.css,min.js,sheet.js}`, `host.{min.css,sheet.js}`, `theme-provider.min.js`) — regenerated from the source changes described above, not independent edits.
16
+
3
17
  ## [0.8.9] — 2026-07-19
4
18
 
5
19
  ### Added
@@ -181,36 +181,39 @@ export class UICalendarGrid extends UIElement {
181
181
  const daysInMonth = new Date(year, month + 1, 0).getDate();
182
182
  const daysInPrev = new Date(year, month, 0).getDate();
183
183
 
184
- h += '<div data-cal-grid>';
185
-
186
- // Previous-month trailing days (outside, disabled)
187
- for (let i = firstDay - 1; i >= 0; i--) {
188
- const day = daysInPrev - i;
189
- h += `<button-ui variant="ghost" data-cal-day data-outside disabled tabindex="-1" text="${day}"></button-ui>`;
190
- }
191
-
192
- // Current-month days
193
- for (let d = 1; d <= daysInMonth; d++) {
194
- const date = new Date(year, month, d);
195
- const iso = toISO(year, month, d);
196
- const isToday = sameDay(date, today);
197
- const isSelected = selected && sameDay(date, selected);
198
- const isDisabled = (minDate && date < minDate) || (maxDate && date > maxDate);
199
- const isFocused = this.#focusedDay === d;
184
+ // <button-ui variant="ghost" text="…"> (gh issue 276 wave 4) — the day
185
+ // number moves from element text content to the `text` attribute, which
186
+ // button-ui renders via CSS attr(text) on its ::after.
187
+ //
188
+ // Shared by all three day-loops (prev-month filler / current-month /
189
+ // next-month filler) so today/selected/in-range predicates stay
190
+ // consistent across a month boundary (gh#368) — a range spanning two
191
+ // months must show a continuous in-range band through the filler days
192
+ // representing the adjacent month, not just within each month's own
193
+ // cells. Filler days pass `outside: true`, which forces them
194
+ // disabled/unfocusable/unclickable regardless of the computed
195
+ // predicates this only affects the highlight band's visual
196
+ // continuity, never selectability.
197
+ const dayCell = (date, day, outside) => {
198
+ const iso = toISO(date.getFullYear(), date.getMonth(), date.getDate());
199
+ const isToday = sameDay(date, today);
200
+ const isSelected = !!(selected && sameDay(date, selected));
200
201
  // In-range: strictly between rangeStart and rangeEnd (endpoints
201
202
  // themselves render as `[data-selected]` via the `value` prop;
202
203
  // marking them in-range too would double-up the styling).
203
- const isInRange = !!(rangeFrom && rangeTo
204
+ const isInRange = !!(rangeFrom && rangeTo
204
205
  && date > rangeFrom && date < rangeTo);
205
206
  // Range endpoint flags — let CSS render the start/end cell with
206
- // half-pill caps so the in-range strip reads as a continuous
207
- // band when displayed next to the in-range cells.
207
+ // half-pill caps so the in-range strip reads as a continuous band
208
+ // when displayed next to the in-range cells.
208
209
  const isRangeStart = !!(rangeFrom && sameDay(date, rangeFrom));
209
210
  const isRangeEnd = !!(rangeTo && sameDay(date, rangeTo));
211
+ const isDisabled = outside || (minDate && date < minDate) || (maxDate && date > maxDate);
212
+ const isFocused = !outside && this.#focusedDay === day;
210
213
 
211
214
  const attrs = [
212
215
  'data-cal-day',
213
- `data-date="${iso}"`,
216
+ outside ? 'data-outside' : `data-date="${iso}"`,
214
217
  isToday ? 'data-today' : '',
215
218
  isSelected ? 'data-selected' : '',
216
219
  isInRange ? 'data-in-range' : '',
@@ -221,17 +224,31 @@ export class UICalendarGrid extends UIElement {
221
224
  `tabindex="${isFocused ? '0' : '-1'}"`,
222
225
  ].filter(Boolean).join(' ');
223
226
 
224
- // <button-ui variant="ghost" text=""> (gh issue 276 wave 4) — the day
225
- // number moves from element text content to the `text` attribute,
226
- // which button-ui renders via CSS attr(text) on its ::after.
227
- h += `<button-ui variant="ghost" ${attrs} text="${d}"></button-ui>`;
227
+ return `<button-ui variant="ghost" ${attrs} text="${day}"></button-ui>`;
228
+ };
229
+
230
+ h += '<div data-cal-grid>';
231
+
232
+ // Previous-month trailing days (outside, disabled)
233
+ const prevMonth = month === 0 ? 11 : month - 1;
234
+ const prevYear = month === 0 ? year - 1 : year;
235
+ for (let i = firstDay - 1; i >= 0; i--) {
236
+ const day = daysInPrev - i;
237
+ h += dayCell(new Date(prevYear, prevMonth, day), day, true);
238
+ }
239
+
240
+ // Current-month days
241
+ for (let d = 1; d <= daysInMonth; d++) {
242
+ h += dayCell(new Date(year, month, d), d, false);
228
243
  }
229
244
 
230
245
  // Next-month leading days
231
246
  const totalCells = firstDay + daysInMonth;
232
247
  const remaining = (7 - (totalCells % 7)) % 7;
248
+ const nextMonth = month === 11 ? 0 : month + 1;
249
+ const nextYear = month === 11 ? year + 1 : year;
233
250
  for (let d = 1; d <= remaining; d++) {
234
- h += `<button-ui variant="ghost" data-cal-day data-outside disabled tabindex="-1" text="${d}"></button-ui>`;
251
+ h += dayCell(new Date(nextYear, nextMonth, d), d, true);
235
252
  }
236
253
 
237
254
  h += '</div>';
@@ -61,7 +61,7 @@
61
61
  box-shadow: var(--card-shadow);
62
62
  overflow: hidden;
63
63
  corner-shape: superellipse(1.1);
64
- width: stretch;
64
+ flex: 1 1 auto;
65
65
  }
66
66
 
67
67
  /* ═══════ Variants — token-only overrides ═══════ */
@@ -269,9 +269,15 @@ a2ui:
269
269
  multiline, or per-cell with [data-wrap] on a single column /
270
270
  cell.
271
271
  - >-
272
- Use [raw] in production app consumers it disables the demo
273
- seed data so the table renders only consumer-provided rows /
274
- columns / data props.
272
+ [raw] is a visual-and-lifecycle chrome reset for consumer-owned
273
+ body markup render()'s early return (`if (this.raw) return;`)
274
+ is unconditional: no header injection, no .data/.columns
275
+ reconciliation, no empty/loading overlays, no aggregation or
276
+ pagination footers, even if .columns and .data are set. Reach
277
+ for it only when the consumer authors 100% of the body
278
+ (spreadsheet / inline-edit style patterns wrapping a native
279
+ <table>) — never to "keep the data lifecycle but skip demo
280
+ seeding."
275
281
  - >-
276
282
  Listen for the `sort` event with detail.key + detail.dir (NOT
277
283
  .column / .direction). `cell-click` detail carries {key, row,
@@ -55,10 +55,11 @@
55
55
  "default": "solid"
56
56
  },
57
57
  "variant": {
58
- "description": "Semantic variant — `default | info | success | warning | danger`.",
58
+ "description": "Semantic variant — `default | accent | info | success | warning | danger`. `accent` is brand-primary emphasis for non-semantic labels — a filter chip or taxonomy tag that shouldn't imply a success/warning/danger state. Mirrors <badge-ui>'s `accent` variant token-for-token.",
59
59
  "type": "string",
60
60
  "enum": [
61
61
  "default",
62
+ "accent",
62
63
  "info",
63
64
  "success",
64
65
  "warning",
@@ -93,6 +93,15 @@ tag-ui[removable]:not([disabled]):hover {
93
93
  text, near-white in both schemes by design). Reads as a status pill
94
94
  where the chip IS the state. Opt out per-tag via [tone="muted"] for
95
95
  metadata-chip surfaces in dense lists. */
96
+ /* `accent` is brand-primary emphasis for non-semantic labels — mirrors
97
+ <badge-ui>'s `accent` variant token-for-token (--a-primary-bg /
98
+ on-primary for the solid fill), applied to tag-ui's own solid-default
99
+ tone shape. Not a status color — no success/warning/danger implication. */
100
+ :scope[variant="accent"] {
101
+ --tag-bg: var(--a-primary-bg);
102
+ --tag-fg: var(--md-sys-color-primary-on-primary);
103
+ }
104
+
96
105
  :scope[variant="info"] {
97
106
  --tag-bg: var(--a-info-bg);
98
107
  --tag-fg: var(--md-sys-color-info-on-info);
@@ -149,11 +158,21 @@ tag-ui[removable]:not([disabled]):hover {
149
158
  --tag-bg: var(--md-sys-color-danger-container);
150
159
  --tag-fg: var(--md-sys-color-danger-on-surface);
151
160
  }
161
+ /* Mirrors <badge-ui>'s default (muted) accent pair —
162
+ --md-sys-color-primary-container / -on-surface. */
163
+ :scope[tone="muted"][variant="accent"] {
164
+ --tag-bg: var(--md-sys-color-primary-container);
165
+ --tag-fg: var(--md-sys-color-primary-on-surface);
166
+ }
152
167
 
153
168
  /* `[tone="solid"]` on the neutral default (or no variant) inverts the
154
169
  chrome — solid fg-color bg with bg-color text. High-contrast neutral
155
- stamp. Explicit opt-in; the variant-less default stays quiet chrome. */
156
- :scope[tone="solid"]:not([variant="info"]):not([variant="success"]):not([variant="warning"]):not([variant="danger"]) {
170
+ stamp. Explicit opt-in; the variant-less default stays quiet chrome.
171
+ [variant="accent"] is excluded — it already has an explicit solid
172
+ pair above (the plain [variant="accent"] rule) that this higher-
173
+ specificity fallback would otherwise clobber when tone="solid" is
174
+ set explicitly alongside it. */
175
+ :scope[tone="solid"]:not([variant="info"]):not([variant="success"]):not([variant="warning"]):not([variant="danger"]):not([variant="accent"]) {
157
176
  --tag-bg: var(--md-sys-color-neutral-on-surface);
158
177
  --tag-fg: var(--md-sys-color-neutral-background);
159
178
  }
@@ -182,8 +201,15 @@ tag-ui[removable]:not([disabled]):hover {
182
201
  --tag-fg: var(--md-sys-color-danger-on-surface);
183
202
  --tag-border: var(--md-sys-color-danger-outline);
184
203
  }
185
- /* Outline on neutral (no family) fg-muted text + subtle border. */
186
- :scope[tone="outline"]:not([variant="info"]):not([variant="success"]):not([variant="warning"]):not([variant="danger"]) {
204
+ /* Mirrors <badge-ui>'s outline accent pair
205
+ --md-sys-color-primary-on-surface / -primary-outline. */
206
+ :scope[tone="outline"][variant="accent"] {
207
+ --tag-fg: var(--md-sys-color-primary-on-surface);
208
+ --tag-border: var(--md-sys-color-primary-outline);
209
+ }
210
+ /* Outline on neutral (no family) — fg-muted text + subtle border.
211
+ [variant="accent"] excluded — see the [tone="solid"] fallback note above. */
212
+ :scope[tone="outline"]:not([variant="info"]):not([variant="success"]):not([variant="warning"]):not([variant="danger"]):not([variant="accent"]) {
187
213
  --tag-fg: var(--a-fg-muted);
188
214
  --tag-border: var(--md-sys-color-neutral-outline);
189
215
  }
@@ -54,8 +54,8 @@ tone unless `tone="solid"` is set explicitly (high-contrast neutral
54
54
  inverse), or `tone="outline"` (fg-muted text + subtle border).
55
55
  */
56
56
  tone: 'solid' | 'muted' | 'outline';
57
- /** Semantic variant — `default | info | success | warning | danger`. */
58
- variant: 'default' | 'info' | 'success' | 'warning' | 'danger';
57
+ /** Semantic variant — `default | accent | info | success | warning | danger`. `accent` is brand-primary emphasis for non-semantic labels — a filter chip or taxonomy tag that shouldn't imply a success/warning/danger state. Mirrors <badge-ui>'s `accent` variant token-for-token. */
58
+ variant: 'default' | 'accent' | 'info' | 'success' | 'warning' | 'danger';
59
59
 
60
60
  addEventListener<K extends keyof HTMLElementEventMap>(
61
61
  type: K,
@@ -45,11 +45,15 @@ props:
45
45
  type: string
46
46
  dynamic: true
47
47
  variant:
48
- description: Semantic variant — `default | info | success | warning | danger`.
48
+ description: Semantic variant — `default | accent | info | success | warning | danger`.
49
+ `accent` is brand-primary emphasis for non-semantic labels — a filter chip
50
+ or taxonomy tag that shouldn't imply a success/warning/danger state. Mirrors
51
+ <badge-ui>'s `accent` variant token-for-token.
49
52
  type: string
50
53
  default: default
51
54
  enum:
52
55
  - default
56
+ - accent
53
57
  - info
54
58
  - success
55
59
  - warning