@adia-ai/web-components 0.8.34 → 0.8.35

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.
Files changed (89) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/components/agent-questions/agent-questions.class.js +0 -1
  3. package/components/badge/badge.css +27 -3
  4. package/components/badge/badge.examples.md +4 -4
  5. package/components/card/card.css +44 -1
  6. package/components/check/check.a2ui.json +25 -11
  7. package/components/check/check.class.js +5 -0
  8. package/components/check/check.css +21 -0
  9. package/components/check/check.d.ts +2 -0
  10. package/components/check/check.examples.md +4 -4
  11. package/components/check/check.yaml +26 -7
  12. package/components/demo-toggle/demo-toggle.css +4 -0
  13. package/components/demo-toggle/demo-toggle.examples.md +4 -4
  14. package/components/feed/feed-item.a2ui.json +3 -2
  15. package/components/feed/feed-item.yaml +7 -1
  16. package/components/feed/feed.css +28 -5
  17. package/components/field/field.examples.md +4 -4
  18. package/components/image/image.class.js +8 -0
  19. package/components/nav-group/nav-group.css +12 -1
  20. package/components/option-card/option-card.a2ui.json +10 -10
  21. package/components/option-card/option-card.css +32 -16
  22. package/components/option-card/option-card.yaml +19 -15
  23. package/components/radio/radio.examples.md +4 -4
  24. package/components/range/range.css +8 -4
  25. package/components/slider/slider.a2ui.json +6 -3
  26. package/components/slider/slider.css +28 -12
  27. package/components/slider/slider.yaml +11 -3
  28. package/components/stat/stat.examples.md +4 -4
  29. package/components/swatch/swatch.css +14 -6
  30. package/components/switch/switch.examples.md +4 -4
  31. package/components/table-toolbar/table-toolbar.css +10 -1
  32. package/components/tabs/tabs.css +10 -4
  33. package/components/tag/tag.class.js +14 -1
  34. package/components/tag/tag.css +63 -5
  35. package/components/text/text.examples.md +4 -4
  36. package/components/timeline/timeline-item.a2ui.json +2 -2
  37. package/components/timeline/timeline-item.yaml +2 -2
  38. package/components/timeline/timeline.css +33 -5
  39. package/components/timeline/timeline.d.ts +2 -2
  40. package/components/toast/toast.css +28 -5
  41. package/custom-elements.json +469 -46
  42. package/dist/theme-provider.min.js +1 -1
  43. package/dist/web-components.min.css +1 -1
  44. package/dist/web-components.min.js +4 -4
  45. package/dist/web-components.sheet.js +1 -1
  46. package/package.json +1 -1
  47. package/patterns/access-requests/access-requests.examples.html +3 -3
  48. package/patterns/admin-keys-and-export/admin-keys-and-export.examples.html +3 -3
  49. package/patterns/admin-shell/admin-shell.examples.html +3 -4
  50. package/patterns/agent-cost/agent-cost.examples.html +3 -3
  51. package/patterns/agent-memory/agent-memory.examples.html +3 -3
  52. package/patterns/agent-prompt-library/agent-prompt-library.examples.html +3 -3
  53. package/patterns/agent-tool-call/agent-tool-call.examples.html +3 -3
  54. package/patterns/alert-dialog/alert-dialog.examples.html +3 -3
  55. package/patterns/app-nav/app-nav.examples.html +4 -4
  56. package/patterns/approvals/approvals.examples.html +3 -3
  57. package/patterns/audit-log/audit-log.examples.html +3 -3
  58. package/patterns/bulk-action-toolbar/bulk-action-toolbar.examples.html +19 -9
  59. package/patterns/bulk-action-toolbar/bulk-action-toolbar.examples.js +2 -2
  60. package/patterns/changelog-feed/changelog-feed.examples.html +3 -3
  61. package/patterns/chart-in-card/chart-in-card.examples.html +37 -3
  62. package/patterns/chart-in-card/chart-in-card.examples.js +12 -0
  63. package/patterns/chart-in-card/chart-in-card.html +6 -0
  64. package/patterns/chat-shell/chat-shell.examples.html +3 -4
  65. package/patterns/comments-and-collaboration/comments-and-collaboration.examples.html +3 -3
  66. package/patterns/conversion-funnel/conversion-funnel.examples.html +3 -3
  67. package/patterns/data-tables-inline-edit-and-tree/data-tables-inline-edit-and-tree.examples.html +3 -3
  68. package/patterns/diff-review/diff-review.examples.html +3 -3
  69. package/patterns/editor-shell/editor-shell.examples.html +3 -4
  70. package/patterns/export-flow/export-flow.examples.html +3 -3
  71. package/patterns/filter-bar/filter-bar.examples.html +3 -3
  72. package/patterns/form-drawer/form-drawer.examples.html +3 -3
  73. package/patterns/forms-conditional-and-autocomplete/forms-conditional-and-autocomplete.examples.html +3 -3
  74. package/patterns/inline-dialog/inline-dialog.examples.html +3 -3
  75. package/patterns/kanban-board/kanban-board.examples.html +3 -3
  76. package/patterns/layout/layout.examples.html +4 -7
  77. package/patterns/marketing-engagement/marketing-engagement.examples.html +3 -3
  78. package/patterns/notifications-bell-and-digest/notifications-bell-and-digest.examples.html +3 -3
  79. package/patterns/permissions-matrix/permissions-matrix.examples.html +3 -3
  80. package/patterns/permissions-role-picker/permissions-role-picker.examples.html +3 -3
  81. package/patterns/permissions-sharing/permissions-sharing.examples.html +3 -3
  82. package/patterns/profile-public-and-verification/profile-public-and-verification.examples.html +3 -3
  83. package/patterns/record-detail-drawer/record-detail-drawer.examples.html +3 -3
  84. package/patterns/responsive-shell-sidebar/responsive-shell-sidebar.examples.html +3 -3
  85. package/patterns/retention-cohort/retention-cohort.examples.html +3 -3
  86. package/patterns/search-discovery/search-discovery.examples.html +3 -3
  87. package/patterns/system-banners/system-banners.examples.html +3 -3
  88. package/patterns/timezone-selector/timezone-selector.examples.html +3 -3
  89. package/patterns/wizard-drawer/wizard-drawer.examples.html +3 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adia-ai/web-components",
3
- "version": "0.8.34",
3
+ "version": "0.8.35",
4
4
  "description": "AdiaUI web components \u2014 vanilla custom elements. A2UI runtime (renderer, registry, streams, wiring) lives in @adia-ai/a2ui-runtime.",
5
5
  "type": "module",
6
6
  "types": "./index.d.ts",
@@ -1,9 +1,9 @@
1
1
  <header>
2
2
  <div>
3
3
  <h1>Access requests</h1>
4
- <div data-actions>
5
- <tag-ui size="sm">card-ui</tag-ui> <tag-ui size="sm">field-ui</tag-ui> <tag-ui size="sm">alert-ui</tag-ui> <tag-ui size="sm">tag-ui</tag-ui>
6
- </div>
4
+ </div>
5
+ <div data-tags>
6
+ <code>card-ui</code> <code>field-ui</code> <code>alert-ui</code> <code>tag-ui</code>
7
7
  </div>
8
8
  <p>The "Request access" path when a user lacks permission for a resource. Three connected surfaces: the access-denied state with a Request CTA, the request form, and the pending-status follow-up. Sub-flavor of approvals (13d) — same async-gate semantics, different entry point.</p>
9
9
  </header>
@@ -1,9 +1,9 @@
1
1
  <header>
2
2
  <div>
3
3
  <h1>API keys, webhooks &amp; data export</h1>
4
- <div data-actions>
5
- <tag-ui size="sm">card-ui</tag-ui> <tag-ui size="sm">field-ui</tag-ui> <tag-ui size="sm">input-ui</tag-ui> <tag-ui size="sm">tag-ui</tag-ui> <tag-ui size="sm">button-ui</tag-ui> <tag-ui size="sm">alert-ui</tag-ui>
6
- </div>
4
+ </div>
5
+ <div data-tags>
6
+ <code>card-ui</code> <code>field-ui</code> <code>input-ui</code> <code>tag-ui</code> <code>button-ui</code> <code>alert-ui</code>
7
7
  </div>
8
8
  <p>Two adjacent admin surfaces: API key + webhook management (04g), and data-export / account-portability (04i). Both compose existing primitives — the patterns are in the wiring, the security copy, and the destructive-action flow.</p>
9
9
  </header>
@@ -1,10 +1,9 @@
1
1
  <header>
2
2
  <div>
3
3
  <h1>Admin Shell — Composition Pattern</h1>
4
- <div data-actions>
5
- <tag-ui size="sm">admin-shell</tag-ui>
6
- <tag-ui size="sm" variant="ghost">cluster-namespaced</tag-ui>
7
- </div>
4
+ </div>
5
+ <div data-tags>
6
+ <code>admin-shell</code> <code>cluster-namespaced</code>
8
7
  </div>
9
8
  <p>
10
9
  The canonical composition pattern for an admin / SaaS / dashboard
@@ -1,9 +1,9 @@
1
1
  <header>
2
2
  <div>
3
3
  <h1>Agent Cost &amp; Usage</h1>
4
- <div data-actions>
5
- <tag-ui size="sm">tag-ui</tag-ui> <tag-ui size="sm">stat-ui</tag-ui> <tag-ui size="sm">alert-ui</tag-ui>
6
- </div>
4
+ </div>
5
+ <div data-tags>
6
+ <code>tag-ui</code> <code>stat-ui</code> <code>alert-ui</code>
7
7
  </div>
8
8
  <p>How an agent surfaces its own consumption: token usage, dollar cost, rate-limit headroom. Three shapes — an inline footer indicator, a detailed breakdown card for billing/admin pages, and a rate-limit alert for soft warnings.</p>
9
9
  </header>
@@ -1,9 +1,9 @@
1
1
  <header>
2
2
  <div>
3
3
  <h1>Agent Memory</h1>
4
- <div data-actions>
5
- <tag-ui size="sm">card-ui</tag-ui> <tag-ui size="sm">list-ui</tag-ui> <tag-ui size="sm">description-list-ui</tag-ui> <tag-ui size="sm">code-ui</tag-ui> <tag-ui size="sm">drawer-ui</tag-ui>
6
- </div>
4
+ </div>
5
+ <div data-tags>
6
+ <code>card-ui</code> <code>list-ui</code> <code>description-list-ui</code> <code>code-ui</code> <code>drawer-ui</code>
7
7
  </div>
8
8
  <p>Surfaces for inspecting and editing what the agent remembers — facts the user has set ("call me Kim"), workspace context ("we use OKLCH for tokens"), and session-scoped state. Three shapes — a memory list, a single-entry detail view, and an editor for adding or revising.</p>
9
9
  </header>
@@ -1,9 +1,9 @@
1
1
  <header>
2
2
  <div>
3
3
  <h1>Agent Prompt Library</h1>
4
- <div data-actions>
5
- <tag-ui size="sm">card-ui</tag-ui> <tag-ui size="sm">grid-ui</tag-ui> <tag-ui size="sm">search-ui</tag-ui> <tag-ui size="sm">tag-ui</tag-ui> <tag-ui size="sm">menu-ui</tag-ui> <tag-ui size="sm">option-card-ui</tag-ui>
6
- </div>
4
+ </div>
5
+ <div data-tags>
6
+ <code>card-ui</code> <code>grid-ui</code> <code>search-ui</code> <code>tag-ui</code> <code>menu-ui</code> <code>option-card-ui</code>
7
7
  </div>
8
8
  <p>Saved prompts the user can recall instead of re-typing — recurring queries, formatted recipes, role-pinned starters. Three shapes — the full library page, a compact picker (popover or menu), and the prompt card itself.</p>
9
9
  </header>
@@ -1,9 +1,9 @@
1
1
  <header>
2
2
  <div>
3
3
  <h1>Agent Tool Call</h1>
4
- <div data-actions>
5
- <tag-ui size="sm">agent-artifact-ui</tag-ui> <tag-ui size="sm">code-ui</tag-ui> <tag-ui size="sm">button-ui</tag-ui>
6
- </div>
4
+ </div>
5
+ <div data-tags>
6
+ <code>agent-artifact-ui</code> <code>code-ui</code> <code>button-ui</code>
7
7
  </div>
8
8
  <p>The block an agent renders when it invokes a tool — search, calculation, API call, function. Four states cover the lifecycle: <strong>running</strong>, <strong>success</strong>, <strong>error</strong>, and the default <strong>collapsed</strong> summary. All four reuse <code>agent-artifact-ui</code> with the <code>kind="TOOL"</code> badge; tone shifts on outcome.</p>
9
9
  </header>
@@ -1,9 +1,9 @@
1
1
  <header>
2
2
  <div>
3
3
  <h1>Alert dialog</h1>
4
- <div data-actions>
5
- <tag-ui size="sm">modal-ui</tag-ui> <tag-ui size="sm">field-ui</tag-ui> <tag-ui size="sm">button-ui</tag-ui>
6
- </div>
4
+ </div>
5
+ <div data-tags>
6
+ <code>modal-ui</code> <code>field-ui</code> <code>button-ui</code>
7
7
  </div>
8
8
  <p>Demands acknowledgement before continuing (WAI-APG <a href="https://www.w3.org/WAI/ARIA/apg/patterns/alertdialog/">alertdialog</a>). modal-ui composed with destructive-confirm semantics: clear consequence prose, danger-colored primary action, Cancel as the safe default. Distinct from <code>&lt;modal-ui&gt;</code> bare (informational / form modal — role=dialog) and from <a href="/site/components/toast">toast-ui</a> with action (which is non-blocking).</p>
9
9
  </header>
@@ -43,12 +43,12 @@
43
43
  <header>
44
44
  <div>
45
45
  <h1>App Nav</h1>
46
- <div data-actions>
47
- <tag-ui size="sm">nav-ui</tag-ui>
48
- </div>
46
+ </div>
47
+ <div data-tags>
48
+ <code>nav-ui</code>
49
49
  </div>
50
50
  <p>Sidebar navigation pattern with groups, items, dividers, spacers, badges, and collapsed popover flyouts.</p>
51
- </header>
51
+ </header>
52
52
 
53
53
  <section data-section data-property="overview">
54
54
  <h2 variant="section">Overview</h2>
@@ -1,9 +1,9 @@
1
1
  <header>
2
2
  <div>
3
3
  <h1>Approvals</h1>
4
- <div data-actions>
5
- <tag-ui size="sm">card-ui</tag-ui> <tag-ui size="sm">list-ui</tag-ui> <tag-ui size="sm">button-ui</tag-ui> <tag-ui size="sm">tag-ui</tag-ui>
6
- </div>
4
+ </div>
5
+ <div data-tags>
6
+ <code>card-ui</code> <code>list-ui</code> <code>button-ui</code> <code>tag-ui</code>
7
7
  </div>
8
8
  <p>The queue + detail surface for items waiting on a human to approve, reject, or request changes — expense reports, PRs, access requests, content reviews. Always asynchronous; the approver sees a list and acts on each item independently.</p>
9
9
  </header>
@@ -1,9 +1,9 @@
1
1
  <header>
2
2
  <div>
3
3
  <h1>Audit log</h1>
4
- <div data-actions>
5
- <tag-ui size="sm">card-ui</tag-ui> <tag-ui size="sm">table-ui</tag-ui> <tag-ui size="sm">tag-ui</tag-ui> <tag-ui size="sm">select-ui</tag-ui> <tag-ui size="sm">input-ui</tag-ui>
6
- </div>
4
+ </div>
5
+ <div data-tags>
6
+ <code>card-ui</code> <code>table-ui</code> <code>tag-ui</code> <code>select-ui</code> <code>input-ui</code>
7
7
  </div>
8
8
  <p>Timestamped actor / action / resource rows for compliance, security review, and operational tracing. table-ui carries the rows; tag-ui carries the action verb's severity; the card header carries filters. Distinct from <a href="/site/components/timeline">timeline-ui</a> (single-actor chronological events) and from <a href="/site/components/feed">feed-ui</a> (notifications / posts surface).</p>
9
9
  </header>
@@ -1,9 +1,9 @@
1
1
  <header>
2
2
  <div>
3
3
  <h1>Bulk Action Toolbar</h1>
4
- <div data-actions>
5
- <tag-ui size="sm">table-toolbar-ui</tag-ui> <tag-ui size="sm">toolbar-ui</tag-ui> <tag-ui size="sm">table-ui</tag-ui> <tag-ui size="sm">card-ui</tag-ui> <tag-ui size="sm">anchor-bar-ui</tag-ui>
6
- </div>
4
+ </div>
5
+ <div data-tags>
6
+ <code>table-toolbar-ui</code> <code>toolbar-ui</code> <code>table-ui</code> <code>card-ui</code> <code>anchor-bar-ui</code>
7
7
  </div>
8
8
  <p>When a table has row selection, surface a contextual bulk-action bar. Two variants: swap the standard <code>&lt;table-toolbar-ui&gt;</code> for a bar at the same surface position, or float a card-like elevated bar at the bottom of the table's own scroll container. Selection count anchors the left, actions flow from the right, destructive action last.</p>
9
9
  </header>
@@ -49,7 +49,17 @@
49
49
  for the same fix applied at a smaller width. -->
50
50
  <toolbar-ui id="pat-bulk-actions" data-bulk-bar role="toolbar" aria-label="Bulk actions" align="space-between" hidden>
51
51
  <toolbar-group-ui>
52
- <text-ui strong><span data-bulk-count>0</span> selected</text-ui>
52
+ <!-- Whole "N selected" phrase as ONE text-ui's own textContent —
53
+ NOT a nested <span data-bulk-count> + trailing " selected"
54
+ text node (gh#1106). The site's HTML→A2UI build transpile
55
+ (packages/a2ui/compose/transpiler/transpiler.js) defaults any
56
+ <span> to a block <p> AND reorders trailing loose text ahead
57
+ of a preceding element child when both live inside a text-ui
58
+ leaf — on the site route (not this standalone demo file) that
59
+ rendered "selected" stacked above "6" instead of one line.
60
+ Update the whole string via [data-bulk-count]'s textContent
61
+ instead of touching just a child span. -->
62
+ <text-ui strong data-bulk-count>0 selected</text-ui>
53
63
  </toolbar-group-ui>
54
64
  <toolbar-group-ui>
55
65
  <button-ui text="Archive" icon="archive" variant="ghost" size="sm" data-bulk-action="archive"></button-ui>
@@ -99,7 +109,7 @@
99
109
  do the pushing keeps the reflow's width sum accurate. -->
100
110
  <toolbar-ui role="toolbar" aria-label="Bulk actions" align="space-between">
101
111
  <toolbar-group-ui>
102
- <text-ui strong aria-live="polite"><span data-bulk-float-count>0</span> selected</text-ui>
112
+ <text-ui strong aria-live="polite" data-bulk-float-count>0 selected</text-ui>
103
113
  <span data-bulk-controls></span>
104
114
  </toolbar-group-ui>
105
115
  <toolbar-group-ui>
@@ -130,7 +140,7 @@
130
140
  (not a flex-grow spacer — see Rules) pushes the action group right. --&gt;
131
141
  &lt;toolbar-ui data-bulk-bar hidden role="toolbar" aria-label="Bulk actions" align="space-between"&gt;
132
142
  &lt;toolbar-group-ui&gt;
133
- &lt;text-ui strong&gt;&lt;span data-bulk-count&gt;0&lt;/span&gt; selected&lt;/text-ui&gt;
143
+ &lt;text-ui strong data-bulk-count&gt;0 selected&lt;/text-ui&gt;
134
144
  &lt;/toolbar-group-ui&gt;
135
145
  &lt;toolbar-group-ui&gt;
136
146
  &lt;button-ui text="Archive" icon="archive" variant="ghost" size="sm"&gt;&lt;/button-ui&gt;
@@ -152,7 +162,7 @@ const countEl = bulk.querySelector('[data-bulk-count]');
152
162
 
153
163
  table.addEventListener('select', (e) =&gt; {
154
164
  const n = e.detail.selected?.length ?? 0;
155
- countEl.textContent = String(n);
165
+ countEl.textContent = `${n} selected`;
156
166
  tbar.hidden = n &gt; 0;
157
167
  bulk.hidden = n === 0;
158
168
  });</code-ui>
@@ -192,7 +202,7 @@ table.addEventListener('select', (e) =&gt; {
192
202
  keeps the width sum accurate (see Rules). --&gt;
193
203
  &lt;toolbar-ui role="toolbar" aria-label="Bulk actions" align="space-between"&gt;
194
204
  &lt;toolbar-group-ui&gt;
195
- &lt;text-ui strong aria-live="polite"&gt;&lt;span data-bulk-count&gt;0&lt;/span&gt; selected&lt;/text-ui&gt;
205
+ &lt;text-ui strong aria-live="polite" data-bulk-count&gt;0 selected&lt;/text-ui&gt;
196
206
  &lt;span data-bulk-controls&gt;&lt;/span&gt; &lt;!-- optional per-flow controls, e.g. a shared-rationale input --&gt;
197
207
  &lt;/toolbar-group-ui&gt;
198
208
  &lt;toolbar-group-ui&gt;
@@ -222,7 +232,7 @@ table.addEventListener('select', (e) =&gt; {
222
232
 
223
233
  table.addEventListener('select', (e) =&gt; {
224
234
  const n = e.detail?.selected?.length ?? 0;
225
- countEl.textContent = String(n);
235
+ countEl.textContent = `${n} selected`;
226
236
  bar.open = n &gt; 0;
227
237
  });
228
238
 
@@ -75,7 +75,7 @@ function setupSwap(router) {
75
75
 
76
76
  table.addEventListener('select', (e) => {
77
77
  const n = e.detail?.selected?.length ?? 0;
78
- if (countEl) countEl.textContent = String(n);
78
+ if (countEl) countEl.textContent = `${n} selected`;
79
79
  tbar.hidden = n > 0;
80
80
  bulk.hidden = n === 0;
81
81
  });
@@ -113,7 +113,7 @@ function setupFloating(router) {
113
113
  // scope here). No .focus() call anywhere — appearance never steals focus.
114
114
  table.addEventListener('select', (e) => {
115
115
  const n = e.detail?.selected?.length ?? 0;
116
- if (countEl) countEl.textContent = String(n);
116
+ if (countEl) countEl.textContent = `${n} selected`;
117
117
  bar.open = n > 0;
118
118
  });
119
119
 
@@ -1,9 +1,9 @@
1
1
  <header>
2
2
  <div>
3
3
  <h1>Changelog feed</h1>
4
- <div data-actions>
5
- <tag-ui size="sm">card-ui</tag-ui> <tag-ui size="sm">tag-ui</tag-ui> <tag-ui size="sm">list-ui</tag-ui> <tag-ui size="sm">heading-ui</tag-ui>
6
- </div>
4
+ </div>
5
+ <div data-tags>
6
+ <code>card-ui</code> <code>tag-ui</code> <code>list-ui</code> <code>heading-ui</code>
7
7
  </div>
8
8
  <p>"What's new" in-app surface for product updates. Each release entry carries a version + date header, Added / Changed / Fixed / Deprecated section tags following <a href="https://keepachangelog.com/en/1.1.0/">Keep-a-Changelog</a>, and the bulleted change list. Use in admin-shell sidebars (the Changelog nav item), settings pages, or a dedicated /changelog route.</p>
9
9
  </header>
@@ -1,9 +1,9 @@
1
1
  <header>
2
2
  <div>
3
3
  <h1>Chart in Card</h1>
4
- <div data-actions>
5
- <tag-ui size="sm">card-ui</tag-ui> <tag-ui size="sm">chart-ui</tag-ui> <tag-ui size="sm">stat-ui</tag-ui>
6
- </div>
4
+ </div>
5
+ <div data-tags>
6
+ <code>card-ui</code> <code>chart-ui</code> <code>stat-ui</code> <code>chart-legend-ui</code>
7
7
  </div>
8
8
  <p>Composition pattern: embed a chart inside a card so the chart reads as a dashboard tile, not as raw data. Header communicates the metric in words; chart shows the shape; footer adds context.</p>
9
9
  </header>
@@ -182,6 +182,38 @@
182
182
  </div>
183
183
  </section>
184
184
 
185
+ <section data-section data-property="full-bleed-with-legend">
186
+ <h2 variant="section">Full-bleed chart + legend band</h2>
187
+ <p data-note>
188
+ <code>bleed</code> only earns true edge-to-edge treatment for bare plotted
189
+ marks — a sparkline, or another chart type with both <code>hide-grid</code>
190
+ and <code>hide-values</code> set (gh#1095). A multi-series chart still
191
+ needs a legend, so keep <code>&lt;chart-legend-ui&gt;</code> OUT of the
192
+ bled section — wire it to the chart via <code>[for]</code> in a normal
193
+ (inset) section below instead. It reads as its own band beneath the
194
+ plot, and never collides with the card's rounded corners.
195
+ </p>
196
+ <div data-artifact-container>
197
+ <div data-artifact-item data-artifact-label="bled multi-line + legend band">
198
+ <card-ui data-chunk="chart-in-card-full-bleed-legend" data-chunk-kind="block"
199
+ data-chunk-domain="dashboard"
200
+ data-chunk-description="Full-bleed multi-series chart with legend band — Revenue/Users/Churn multi-line chart bleeding edge-to-edge inside the card, paired with a chart-legend-ui mirroring its series in a normal-inset section below."
201
+ data-chunk-keywords="chart card multi-line legend bleed edge-to-edge revenue users churn dashboard analytics series toggle" style="max-width:520px;">
202
+ <header>
203
+ <span slot="heading"><h3>Growth metrics</h3></span>
204
+ <text-ui slot="description" color="subtle">Last 6 months</text-ui>
205
+ </header>
206
+ <section bleed>
207
+ <chart-ui id="pat-bleed-legend-chart" type="multi-line" x="month" y="revenue,users,churn" hide-grid hide-values></chart-ui>
208
+ </section>
209
+ <section>
210
+ <chart-legend-ui for="pat-bleed-legend-chart" shape="line"></chart-legend-ui>
211
+ </section>
212
+ </card-ui>
213
+ </div>
214
+ </div>
215
+ </section>
216
+
185
217
  <section data-section data-property="anatomy">
186
218
  <h2 variant="section">Anatomy</h2>
187
219
  <code-ui language="html">&lt;card-ui&gt;
@@ -207,6 +239,8 @@
207
239
  <h2 variant="section">Rules</h2>
208
240
  <ul>
209
241
  <li>For sparklines, set <code>bleed</code> on the card's <code>&lt;section&gt;</code> so the line touches the edges.</li>
242
+ <li><code>bleed</code> is a bare-marks affordance, not a general "edge-to-edge chart" switch (gh#1095). It's safe for a sparkline, or for any other chart <code>type</code> that also sets both <code>hide-grid</code> and <code>hide-values</code> — i.e. nothing that renders axis ticks, gridlines, or value text. A chart that still shows guides or values needs the card's normal inset so that text doesn't collide with (and clip under) the card's rounded corners; card.css restores the inset automatically if it detects either case, so a forgotten <code>hide-grid</code>/<code>hide-values</code> fails safe rather than clipping silently.</li>
243
+ <li>Never put <code>&lt;chart-legend-ui&gt;</code> inside a <code>bleed</code> section — its badge rows need their own breathing room too. Place it in a plain <code>&lt;section&gt;</code> immediately after the chart's section, wired via <code>chart-legend-ui[for="&lt;chart id&gt;"]</code> (mirrors <code>.legendData</code>; see the "Full-bleed chart + legend band" example above and <a href="/site/components/chart-legend">chart-legend-ui</a>'s own <code>for</code> docs). card.css also restores the section's inset if a legend ends up inside a bled section anyway, so the fallback stays readable rather than edge-clipped.</li>
210
244
  <li>Put <code>hide-values</code> on bar/line charts inside cards — the stat in the header already shows the current number.</li>
211
245
  <li>Use <code>&lt;stat-ui&gt;</code> in the heading slot only when the card's primary metric is a single number; otherwise use <code>&lt;h3&gt;</code> + description.</li>
212
246
  <li>Keep breakdowns shallow — 3–4 stats max. More belongs in a full section, not inside a tile.</li>
@@ -16,6 +16,15 @@ const sessions = [
16
16
  { day: 'Sun', sessions: 360 },
17
17
  ];
18
18
 
19
+ const growthMetrics = [
20
+ { month: 'Jan', revenue: 32, users: 18, churn: 4 },
21
+ { month: 'Feb', revenue: 41, users: 24, churn: 3 },
22
+ { month: 'Mar', revenue: 38, users: 27, churn: 5 },
23
+ { month: 'Apr', revenue: 52, users: 33, churn: 3 },
24
+ { month: 'May', revenue: 58, users: 39, churn: 2 },
25
+ { month: 'Jun', revenue: 67, users: 45, churn: 3 },
26
+ ];
27
+
19
28
  const sparkline = (vals) => vals.map((v, i) => ({ d: i, v }));
20
29
 
21
30
  export default function setup(router) {
@@ -43,4 +52,7 @@ export default function setup(router) {
43
52
 
44
53
  const filterSess = router.querySelector('#pat-filter-sessions');
45
54
  if (filterSess) filterSess.data = sessions;
55
+
56
+ const bleedLegend = router.querySelector('#pat-bleed-legend-chart');
57
+ if (bleedLegend) bleedLegend.data = growthMetrics;
46
58
  }
@@ -10,28 +10,34 @@
10
10
  <link rel="stylesheet" href="../../styles/tokens.css">
11
11
 
12
12
  <!-- Component CSS — primitives this pattern composes -->
13
+ <link rel="stylesheet" href="../../components/badge/badge.css">
13
14
  <link rel="stylesheet" href="../../components/button/button.css">
14
15
  <link rel="stylesheet" href="../../components/card/card.css">
15
16
  <link rel="stylesheet" href="../../components/chart/chart.css">
17
+ <link rel="stylesheet" href="../../components/chart-legend/chart-legend.css">
16
18
  <link rel="stylesheet" href="../../components/code/code.css">
17
19
  <link rel="stylesheet" href="../../components/col/col.css">
18
20
  <link rel="stylesheet" href="../../components/grid/grid.css">
19
21
  <link rel="stylesheet" href="../../components/segment/segment.css">
20
22
  <link rel="stylesheet" href="../../components/segmented/segmented.css">
21
23
  <link rel="stylesheet" href="../../components/stat/stat.css">
24
+ <link rel="stylesheet" href="../../components/swatch/swatch.css">
22
25
  <link rel="stylesheet" href="../../components/tag/tag.css">
23
26
  <link rel="stylesheet" href="../../components/text/text.css">
24
27
 
25
28
  <!-- Component JS -->
29
+ <script type="module" src="../../components/badge/badge.js"></script>
26
30
  <script type="module" src="../../components/button/button.js"></script>
27
31
  <script type="module" src="../../components/card/card.js"></script>
28
32
  <script type="module" src="../../components/chart/chart.js"></script>
33
+ <script type="module" src="../../components/chart-legend/chart-legend.js"></script>
29
34
  <script type="module" src="../../components/code/code.js"></script>
30
35
  <script type="module" src="../../components/col/col.js"></script>
31
36
  <script type="module" src="../../components/grid/grid.js"></script>
32
37
  <script type="module" src="../../components/segment/segment.js"></script>
33
38
  <script type="module" src="../../components/segmented/segmented.js"></script>
34
39
  <script type="module" src="../../components/stat/stat.js"></script>
40
+ <script type="module" src="../../components/swatch/swatch.js"></script>
35
41
  <script type="module" src="../../components/tag/tag.js"></script>
36
42
  <script type="module" src="../../components/text/text.js"></script>
37
43
 
@@ -1,10 +1,9 @@
1
1
  <header>
2
2
  <div>
3
3
  <h1>Chat Shell — Composition Pattern</h1>
4
- <div data-actions>
5
- <tag-ui size="sm">chat-shell</tag-ui>
6
- <tag-ui size="sm" variant="ghost">cluster-namespaced</tag-ui>
7
- </div>
4
+ </div>
5
+ <div data-tags>
6
+ <code>chat-shell</code> <code>cluster-namespaced</code>
8
7
  </div>
9
8
  <p>
10
9
  The canonical composition pattern for an LLM chat surface. Built from
@@ -1,9 +1,9 @@
1
1
  <header>
2
2
  <div>
3
3
  <h1>Comments &amp; Collaboration</h1>
4
- <div data-actions>
5
- <tag-ui size="sm">card-ui</tag-ui> <tag-ui size="sm">avatar-ui</tag-ui> <tag-ui size="sm">field-ui</tag-ui> <tag-ui size="sm">menu-ui</tag-ui> <tag-ui size="sm">tag-ui</tag-ui> <tag-ui size="sm">button-ui</tag-ui>
6
- </div>
4
+ </div>
5
+ <div data-tags>
6
+ <code>card-ui</code> <code>avatar-ui</code> <code>field-ui</code> <code>menu-ui</code> <code>tag-ui</code> <code>button-ui</code>
7
7
  </div>
8
8
  <p>The substrate for comments threads, @-mentions, and emoji reactions on any first-class object — docs, tasks, designs, code reviews. Composed entirely from existing primitives; the pattern is in the wiring, not in new components.</p>
9
9
  </header>
@@ -1,9 +1,9 @@
1
1
  <header>
2
2
  <div>
3
3
  <h1>Conversion Funnel</h1>
4
- <div data-actions>
5
- <tag-ui size="sm">card-ui</tag-ui> <tag-ui size="sm">progress-row-ui</tag-ui> <tag-ui size="sm">row-ui</tag-ui> <tag-ui size="sm">col-ui</tag-ui>
6
- </div>
4
+ </div>
5
+ <div data-tags>
6
+ <code>card-ui</code> <code>progress-row-ui</code> <code>row-ui</code> <code>col-ui</code>
7
7
  </div>
8
8
  <p>Composition pattern: render a multi-step drop-off funnel without a dedicated funnel component. Uses <code>progress-row-ui</code> for each step so the bar, label, and meta text stay aligned to the card-ui content rhythm.</p>
9
9
  </header>
@@ -1,9 +1,9 @@
1
1
  <header>
2
2
  <div>
3
3
  <h1>Inline-edit grids &amp; tree tables</h1>
4
- <div data-actions>
5
- <tag-ui size="sm">table-ui</tag-ui> <tag-ui size="sm">tree-ui</tag-ui> <tag-ui size="sm">input-ui</tag-ui> <tag-ui size="sm">field-ui</tag-ui> <tag-ui size="sm">tag-ui</tag-ui>
6
- </div>
4
+ </div>
5
+ <div data-tags>
6
+ <code>table-ui</code> <code>tree-ui</code> <code>input-ui</code> <code>field-ui</code> <code>tag-ui</code>
7
7
  </div>
8
8
  <p>Two adjacent advanced data-table patterns: spreadsheet-style cells the user can edit inline (06i) and hierarchical rows with expand/collapse (06j). Both compose existing primitives — `&lt;table-ui&gt;` for the grid, `&lt;tree-ui&gt;` for the hierarchy.</p>
9
9
  </header>
@@ -1,9 +1,9 @@
1
1
  <header>
2
2
  <div>
3
3
  <h1>Diff &amp; Review</h1>
4
- <div data-actions>
5
- <tag-ui size="sm">code-ui</tag-ui> <tag-ui size="sm">card-ui</tag-ui> <tag-ui size="sm">text-ui</tag-ui> <tag-ui size="sm">tag-ui</tag-ui>
6
- </div>
4
+ </div>
5
+ <div data-tags>
6
+ <code>code-ui</code> <code>card-ui</code> <code>text-ui</code> <code>tag-ui</code>
7
7
  </div>
8
8
  <p>The before/after viewer that surfaces every change. Three shapes: code diff (side-by-side or inline), prose diff (rendered text with markup), and structured diff (field-level deltas on a record).</p>
9
9
  </header>
@@ -1,10 +1,9 @@
1
1
  <header>
2
2
  <div>
3
3
  <h1>Editor Shell — Composition Pattern</h1>
4
- <div data-actions>
5
- <tag-ui size="sm">editor-shell</tag-ui>
6
- <tag-ui size="sm" variant="ghost">cluster-namespaced</tag-ui>
7
- </div>
4
+ </div>
5
+ <div data-tags>
6
+ <code>editor-shell</code> <code>cluster-namespaced</code>
8
7
  </div>
9
8
  <p>
10
9
  The canonical composition pattern for design-tool / code-editor /
@@ -1,9 +1,9 @@
1
1
  <header>
2
2
  <div>
3
3
  <h1>Export flow</h1>
4
- <div data-actions>
5
- <tag-ui size="sm">card-ui</tag-ui> <tag-ui size="sm">field-ui</tag-ui> <tag-ui size="sm">select-ui</tag-ui> <tag-ui size="sm">radio-ui</tag-ui> <tag-ui size="sm">check-ui</tag-ui> <tag-ui size="sm">button-ui</tag-ui> <tag-ui size="sm">alert-ui</tag-ui>
6
- </div>
4
+ </div>
5
+ <div data-tags>
6
+ <code>card-ui</code> <code>field-ui</code> <code>select-ui</code> <code>radio-ui</code> <code>check-ui</code> <code>button-ui</code> <code>alert-ui</code>
7
7
  </div>
8
8
  <p>Generic export-request form. User picks scope, format, and delivery (download or email), then submits. Distilled from the data-export-request flow in <a href="/site/patterns/admin-keys-and-export">admin-keys-and-export</a> — use this when an export form lives standalone (settings panel, admin shell, in-context "Export…" affordance).</p>
9
9
  </header>
@@ -1,9 +1,9 @@
1
1
  <header>
2
2
  <div>
3
3
  <h1>Filter Bar</h1>
4
- <div data-actions>
5
- <tag-ui size="sm">tag-ui</tag-ui> <tag-ui size="sm">popover-ui</tag-ui> <tag-ui size="sm">action-list-ui</tag-ui>
6
- </div>
4
+ </div>
5
+ <div data-tags>
6
+ <code>tag-ui</code> <code>popover-ui</code> <code>action-list-ui</code>
7
7
  </div>
8
8
  <p>Row of active filters above a table or list. Each filter is a removable chip; a trailing "Add filter" button opens a popover of available facets. Distinct from full-text search, which stays in the toolbar.</p>
9
9
  </header>
@@ -1,9 +1,9 @@
1
1
  <header>
2
2
  <div>
3
3
  <h1>Form Drawer</h1>
4
- <div data-actions>
5
- <tag-ui size="sm">drawer-ui</tag-ui> <tag-ui size="sm">header</tag-ui> <tag-ui size="sm">body</tag-ui> <tag-ui size="sm">footer</tag-ui>
6
- </div>
4
+ </div>
5
+ <div data-tags>
6
+ <code>drawer-ui</code> <code>header</code> <code>body</code> <code>footer</code>
7
7
  </div>
8
8
  <p>Side-opening drawer with a sticky action row. The most common drawer shape in admin tools: header names the task, body scrolls the form, footer pins Cancel/Save so they stay reachable without scrolling.</p>
9
9
  </header>
@@ -1,9 +1,9 @@
1
1
  <header>
2
2
  <div>
3
3
  <h1>Conditional fields &amp; address autocomplete</h1>
4
- <div data-actions>
5
- <tag-ui size="sm">field-ui</tag-ui> <tag-ui size="sm">input-ui</tag-ui> <tag-ui size="sm">select-ui</tag-ui> <tag-ui size="sm">card-ui</tag-ui> <tag-ui size="sm">radio-ui</tag-ui>
6
- </div>
4
+ </div>
5
+ <div data-tags>
6
+ <code>field-ui</code> <code>input-ui</code> <code>select-ui</code> <code>card-ui</code> <code>radio-ui</code>
7
7
  </div>
8
8
  <p>Two adjacent form patterns: revealing fields based on prior answers (07i) and address-input that resolves a free-text query into structured fields (07j). Both compose existing form primitives — the pattern is in the wiring, not in new components.</p>
9
9
  </header>
@@ -1,9 +1,9 @@
1
1
  <header>
2
2
  <div>
3
3
  <h1>Inline dialog</h1>
4
- <div data-actions>
5
- <tag-ui size="sm">popover-ui</tag-ui> <tag-ui size="sm">card-ui</tag-ui> <tag-ui size="sm">field-ui</tag-ui> <tag-ui size="sm">button-ui</tag-ui>
6
- </div>
4
+ </div>
5
+ <div data-tags>
6
+ <code>popover-ui</code> <code>card-ui</code> <code>field-ui</code> <code>button-ui</code>
7
7
  </div>
8
8
  <p>Anchored, non-modal dialog — popover-ui content given dialog semantics (heading + body + actions). Atlassian-style affordance for in-context decisions that don't warrant blocking the page. Distinct from <a href="/site/components/modal">modal-ui</a> (page-blocking, focus-trapped, role=dialog) and <a href="/site/components/popover">popover-ui</a> bare (general anchored surface).</p>
9
9
  </header>
@@ -1,9 +1,9 @@
1
1
  <header>
2
2
  <div>
3
3
  <h1>Kanban board &amp; sortable lists</h1>
4
- <div data-actions>
5
- <tag-ui size="sm">card-ui</tag-ui> <tag-ui size="sm">grid-ui</tag-ui> <tag-ui size="sm">list-ui</tag-ui> <tag-ui size="sm">tag-ui</tag-ui> <tag-ui size="sm">avatar-ui</tag-ui>
6
- </div>
4
+ </div>
5
+ <div data-tags>
6
+ <code>card-ui</code> <code>grid-ui</code> <code>list-ui</code> <code>tag-ui</code> <code>avatar-ui</code>
7
7
  </div>
8
8
  <p>The drag-to-reorder + drag-between-columns surface. Two patterns share the same primitives: a single sortable list (priority queue, playlist) and a multi-column kanban (status swimlanes, sprint board, pipeline). Both compose <code>card-ui</code>s in containers with HTML5 drag-and-drop wiring.</p>
9
9
  </header>
@@ -1,15 +1,12 @@
1
1
  <header>
2
2
  <div>
3
3
  <h1>Layout</h1>
4
- <div data-actions>
5
- <tag-ui size="sm">col-ui</tag-ui>
6
- <tag-ui size="sm">row-ui</tag-ui>
7
- <tag-ui size="sm">grid-ui</tag-ui>
8
- <tag-ui size="sm">stack-ui</tag-ui>
9
- </div>
4
+ </div>
5
+ <div data-tags>
6
+ <code>col-ui</code> <code>row-ui</code> <code>grid-ui</code> <code>stack-ui</code>
10
7
  </div>
11
8
  <p>Layout primitives — flex columns, flex rows, CSS grids, and stacked overlays — each with consistent gap, alignment, and justification controls.</p>
12
- </header>
9
+ </header>
13
10
 
14
11
 
15
12
  <section data-section data-property="col">