@adia-ai/web-components 0.6.21 → 0.6.22

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 (247) hide show
  1. package/CHANGELOG.md +58 -0
  2. package/components/accordion/accordion-item.a2ui.json +20 -3
  3. package/components/accordion/accordion-item.yaml +24 -0
  4. package/components/accordion/accordion.a2ui.json +1 -1
  5. package/components/accordion/accordion.d.ts +8 -1
  6. package/components/accordion/accordion.yaml +15 -2
  7. package/components/action-list/action-item.a2ui.json +19 -3
  8. package/components/action-list/action-item.yaml +24 -0
  9. package/components/action-list/action-list.a2ui.json +12 -2
  10. package/components/action-list/action-list.yaml +13 -3
  11. package/components/agent-artifact/agent-artifact.a2ui.json +9 -2
  12. package/components/agent-artifact/agent-artifact.d.ts +1 -1
  13. package/components/agent-artifact/agent-artifact.yaml +17 -3
  14. package/components/agent-feedback-bar/agent-feedback-bar.a2ui.json +9 -2
  15. package/components/agent-feedback-bar/agent-feedback-bar.d.ts +8 -1
  16. package/components/agent-feedback-bar/agent-feedback-bar.yaml +19 -3
  17. package/components/agent-questions/agent-questions.a2ui.json +8 -2
  18. package/components/agent-questions/agent-questions.d.ts +8 -1
  19. package/components/agent-questions/agent-questions.yaml +19 -3
  20. package/components/agent-reasoning/agent-reasoning.yaml +9 -1
  21. package/components/agent-suggestions/agent-suggestions.a2ui.json +9 -2
  22. package/components/agent-suggestions/agent-suggestions.d.ts +7 -1
  23. package/components/agent-suggestions/agent-suggestions.yaml +18 -3
  24. package/components/agent-trace/agent-trace.a2ui.json +9 -2
  25. package/components/agent-trace/agent-trace.d.ts +1 -1
  26. package/components/agent-trace/agent-trace.yaml +16 -3
  27. package/components/alert/alert.a2ui.json +1 -1
  28. package/components/alert/alert.css +8 -0
  29. package/components/alert/alert.d.ts +9 -1
  30. package/components/alert/alert.yaml +16 -2
  31. package/components/aside/aside.a2ui.json +7 -1
  32. package/components/aside/aside.yaml +33 -2
  33. package/components/avatar/avatar-group.a2ui.json +20 -3
  34. package/components/avatar/avatar-group.yaml +24 -0
  35. package/components/avatar/avatar.a2ui.json +1 -1
  36. package/components/avatar/avatar.d.ts +7 -1
  37. package/components/avatar/avatar.yaml +14 -2
  38. package/components/badge/badge.a2ui.json +1 -1
  39. package/components/badge/badge.d.ts +7 -1
  40. package/components/badge/badge.yaml +14 -2
  41. package/components/block/block.a2ui.json +9 -4
  42. package/components/block/block.d.ts +9 -3
  43. package/components/block/block.yaml +25 -5
  44. package/components/block/class.js +23 -0
  45. package/components/breadcrumb/breadcrumb.a2ui.json +5 -1
  46. package/components/breadcrumb/breadcrumb.yaml +33 -2
  47. package/components/button/button.a2ui.json +22 -2
  48. package/components/button/button.yaml +21 -3
  49. package/components/calendar-picker/calendar-picker.a2ui.json +1 -1
  50. package/components/calendar-picker/calendar-picker.yaml +13 -2
  51. package/components/canvas/canvas.a2ui.json +6 -2
  52. package/components/canvas/canvas.yaml +20 -3
  53. package/components/card/card.css +23 -2
  54. package/components/card/card.yaml +12 -0
  55. package/components/chart/chart.css +4 -2
  56. package/components/chart/chart.yaml +9 -1
  57. package/components/chart-legend/chart-legend.yaml +7 -1
  58. package/components/chat-thread/chat-thread.a2ui.json +6 -2
  59. package/components/chat-thread/chat-thread.d.ts +8 -1
  60. package/components/chat-thread/chat-thread.yaml +21 -3
  61. package/components/check/check.a2ui.json +13 -3
  62. package/components/check/check.yaml +18 -3
  63. package/components/code/code.a2ui.json +1 -1
  64. package/components/code/code.yaml +13 -2
  65. package/components/col/class.js +39 -0
  66. package/components/col/col.a2ui.json +12 -5
  67. package/components/col/col.d.ts +12 -4
  68. package/components/col/col.yaml +27 -7
  69. package/components/color-input/color-input.yaml +27 -1
  70. package/components/color-picker/color-picker.a2ui.json +8 -2
  71. package/components/color-picker/color-picker.yaml +15 -3
  72. package/components/command/command.a2ui.json +7 -2
  73. package/components/command/command.d.ts +9 -1
  74. package/components/command/command.yaml +39 -3
  75. package/components/demo-toggle/demo-toggle.yaml +7 -1
  76. package/components/description-list/description-list.a2ui.json +5 -1
  77. package/components/description-list/description-list.yaml +11 -2
  78. package/components/divider/divider.a2ui.json +1 -1
  79. package/components/divider/divider.d.ts +8 -1
  80. package/components/divider/divider.yaml +15 -2
  81. package/components/drawer/drawer.yaml +32 -1
  82. package/components/embed/embed.a2ui.json +1 -1
  83. package/components/embed/embed.d.ts +8 -1
  84. package/components/embed/embed.yaml +17 -2
  85. package/components/empty-state/empty-state.a2ui.json +19 -2
  86. package/components/empty-state/empty-state.css +14 -0
  87. package/components/empty-state/empty-state.d.ts +3 -1
  88. package/components/empty-state/empty-state.yaml +50 -3
  89. package/components/feed/feed-item.a2ui.json +21 -3
  90. package/components/feed/feed-item.yaml +25 -0
  91. package/components/feed/feed.a2ui.json +23 -3
  92. package/components/feed/feed.yaml +26 -0
  93. package/components/fields/fields.yaml +7 -1
  94. package/components/footer/footer.a2ui.json +7 -1
  95. package/components/footer/footer.yaml +27 -2
  96. package/components/grid/class.js +57 -0
  97. package/components/grid/grid.a2ui.json +3 -3
  98. package/components/grid/grid.d.ts +3 -3
  99. package/components/grid/grid.yaml +22 -8
  100. package/components/header/header.a2ui.json +8 -1
  101. package/components/header/header.yaml +30 -2
  102. package/components/heatmap/heatmap.yaml +7 -1
  103. package/components/icon/icon.a2ui.json +9 -2
  104. package/components/icon/icon.d.ts +1 -1
  105. package/components/icon/icon.yaml +32 -3
  106. package/components/image/image.yaml +7 -1
  107. package/components/input/input.yaml +29 -1
  108. package/components/inspector/inspector.a2ui.json +7 -2
  109. package/components/inspector/inspector.d.ts +9 -1
  110. package/components/inspector/inspector.yaml +23 -3
  111. package/components/kbd/kbd.a2ui.json +1 -1
  112. package/components/kbd/kbd.d.ts +1 -1
  113. package/components/kbd/kbd.yaml +11 -2
  114. package/components/list/list-item.a2ui.json +21 -3
  115. package/components/list/list-item.yaml +25 -0
  116. package/components/list/list.a2ui.json +7 -2
  117. package/components/list/list.d.ts +9 -1
  118. package/components/list/list.yaml +21 -3
  119. package/components/menu/menu-divider.a2ui.json +17 -3
  120. package/components/menu/menu-divider.yaml +35 -0
  121. package/components/menu/menu-item.a2ui.json +19 -3
  122. package/components/menu/menu-item.yaml +42 -0
  123. package/components/menu/menu.a2ui.json +7 -1
  124. package/components/menu/menu.yaml +33 -2
  125. package/components/modal/modal.a2ui.json +7 -2
  126. package/components/modal/modal.d.ts +10 -1
  127. package/components/modal/modal.yaml +48 -3
  128. package/components/nav/nav.a2ui.json +16 -2
  129. package/components/nav/nav.yaml +40 -3
  130. package/components/nav-group/nav-group.a2ui.json +12 -2
  131. package/components/nav-group/nav-group.yaml +37 -3
  132. package/components/nav-item/nav-item.a2ui.json +13 -2
  133. package/components/nav-item/nav-item.yaml +40 -3
  134. package/components/noodles/noodles.a2ui.json +12 -2
  135. package/components/noodles/noodles.yaml +14 -3
  136. package/components/option-card/option-card.yaml +27 -1
  137. package/components/otp-input/otp-input.yaml +24 -1
  138. package/components/page/page.a2ui.json +7 -1
  139. package/components/page/page.yaml +9 -2
  140. package/components/pagination/pagination.a2ui.json +1 -1
  141. package/components/pagination/pagination.d.ts +1 -1
  142. package/components/pagination/pagination.yaml +13 -2
  143. package/components/pane/pane.a2ui.json +1 -1
  144. package/components/pane/pane.d.ts +7 -1
  145. package/components/pane/pane.yaml +33 -2
  146. package/components/pipeline-status/pipeline-status.a2ui.json +6 -2
  147. package/components/pipeline-status/pipeline-status.d.ts +1 -1
  148. package/components/pipeline-status/pipeline-status.yaml +18 -3
  149. package/components/popover/popover.yaml +30 -1
  150. package/components/progress/progress.a2ui.json +1 -1
  151. package/components/progress/progress.d.ts +1 -1
  152. package/components/progress/progress.yaml +13 -2
  153. package/components/progress-row/progress-row.a2ui.json +12 -2
  154. package/components/progress-row/progress-row.yaml +13 -3
  155. package/components/radio/radio.a2ui.json +1 -1
  156. package/components/radio/radio.yaml +9 -1
  157. package/components/range/range.yaml +7 -1
  158. package/components/rating/rating.a2ui.json +4 -1
  159. package/components/rating/rating.yaml +10 -2
  160. package/components/richtext/richtext.a2ui.json +6 -2
  161. package/components/richtext/richtext.d.ts +9 -1
  162. package/components/richtext/richtext.yaml +20 -3
  163. package/components/row/class.js +34 -0
  164. package/components/row/row.a2ui.json +11 -5
  165. package/components/row/row.d.ts +11 -4
  166. package/components/row/row.yaml +25 -7
  167. package/components/search/search.a2ui.json +5 -1
  168. package/components/search/search.yaml +11 -2
  169. package/components/section/section.a2ui.json +7 -1
  170. package/components/section/section.yaml +36 -2
  171. package/components/segment/segment.a2ui.json +8 -2
  172. package/components/segment/segment.d.ts +7 -1
  173. package/components/segment/segment.yaml +16 -3
  174. package/components/segmented/segmented.a2ui.json +6 -1
  175. package/components/segmented/segmented.css +5 -0
  176. package/components/segmented/segmented.yaml +12 -2
  177. package/components/select/select.a2ui.json +1 -1
  178. package/components/select/select.yaml +34 -2
  179. package/components/skeleton/skeleton.a2ui.json +7 -2
  180. package/components/skeleton/skeleton.d.ts +1 -1
  181. package/components/skeleton/skeleton.yaml +17 -3
  182. package/components/slider/slider.yaml +7 -1
  183. package/components/stack/stack.a2ui.json +14 -3
  184. package/components/stack/stack.d.ts +9 -1
  185. package/components/stack/stack.yaml +22 -4
  186. package/components/stat/stat.a2ui.json +6 -2
  187. package/components/stat/stat.css +5 -2
  188. package/components/stat/stat.d.ts +1 -1
  189. package/components/stat/stat.yaml +16 -3
  190. package/components/step-progress/step-progress.yaml +7 -1
  191. package/components/stepper/stepper-item.a2ui.json +20 -3
  192. package/components/stepper/stepper-item.yaml +24 -0
  193. package/components/stepper/stepper.a2ui.json +1 -1
  194. package/components/stepper/stepper.d.ts +1 -1
  195. package/components/stepper/stepper.yaml +13 -2
  196. package/components/stream/stream.a2ui.json +12 -2
  197. package/components/stream/stream.yaml +15 -3
  198. package/components/swatch/swatch.yaml +7 -1
  199. package/components/swiper/swiper.yaml +7 -1
  200. package/components/switch/switch.a2ui.json +6 -2
  201. package/components/switch/switch.yaml +16 -2
  202. package/components/table/cell-types.js +23 -10
  203. package/components/table/class.js +6 -2
  204. package/components/table/table.css +49 -1
  205. package/components/table/table.yaml +27 -1
  206. package/components/table-toolbar/table-toolbar.yaml +27 -1
  207. package/components/tabs/tab.a2ui.json +17 -3
  208. package/components/tabs/tab.yaml +39 -0
  209. package/components/tabs/tabs.a2ui.json +1 -1
  210. package/components/tabs/tabs.d.ts +1 -1
  211. package/components/tabs/tabs.yaml +36 -2
  212. package/components/tag/tag.a2ui.json +6 -2
  213. package/components/tag/tag.d.ts +9 -1
  214. package/components/tag/tag.yaml +38 -3
  215. package/components/text/class.js +13 -0
  216. package/components/text/text.a2ui.json +9 -2
  217. package/components/text/text.d.ts +1 -1
  218. package/components/text/text.yaml +12 -5
  219. package/components/textarea/textarea.a2ui.json +15 -3
  220. package/components/textarea/textarea.yaml +41 -4
  221. package/components/timeline/timeline-item.a2ui.json +20 -3
  222. package/components/timeline/timeline-item.yaml +24 -0
  223. package/components/timeline/timeline.a2ui.json +8 -1
  224. package/components/timeline/timeline.yaml +9 -2
  225. package/components/toast/toast.a2ui.json +6 -2
  226. package/components/toast/toast.yaml +19 -3
  227. package/components/toggle-group/toggle-group.a2ui.json +13 -3
  228. package/components/toggle-group/toggle-group.d.ts +1 -1
  229. package/components/toggle-group/toggle-group.yaml +19 -4
  230. package/components/toggle-group/toggle-option.a2ui.json +18 -3
  231. package/components/toggle-group/toggle-option.yaml +23 -0
  232. package/components/toggle-scheme/toggle-scheme.yaml +4 -0
  233. package/components/toolbar/toolbar-group.a2ui.json +18 -3
  234. package/components/toolbar/toolbar-group.yaml +23 -0
  235. package/components/toolbar/toolbar.yaml +7 -1
  236. package/components/tooltip/tooltip.yaml +24 -1
  237. package/components/tree/tree-item.a2ui.json +19 -3
  238. package/components/tree/tree-item.yaml +42 -0
  239. package/components/tree/tree.a2ui.json +6 -1
  240. package/components/tree/tree.yaml +31 -2
  241. package/components/upload/upload.yaml +7 -1
  242. package/core/index.js +1 -0
  243. package/core/responsive.d.ts +29 -0
  244. package/core/responsive.js +120 -0
  245. package/core/responsive.test.js +121 -0
  246. package/package.json +1 -1
  247. package/styles/tokens.css +6 -6
@@ -139,7 +139,15 @@ tokens:
139
139
  --density:
140
140
  description: Inherited multiplier for padding
141
141
  a2ui:
142
- rules: []
142
+ rules:
143
+ - rule: 'Canonical clickable affordance — text + optional icon. Variant attribute sets primary/secondary/ghost/destructive intent.'
144
+ reason: 'Most-used interactive primitive.'
145
+ - rule: 'Do not repeat the icon''s glyph in text=. Icon provides the symbol; text= carries only the words.'
146
+ reason: 'Per existing slot.discipline rule — visual redundancy guard.'
147
+ - rule: 'For navigation (route-change) use <nav-item-ui> or anchor; button-ui is for actions only.'
148
+ reason: 'Action vs navigation semantics.'
149
+ - rule: 'For toggleable on/off state use <switch-ui>; for multi-select clusters use <toggle-group-ui> + <toggle-option-ui>.'
150
+ reason: 'Stateless action vs stateful toggle.'
143
151
  anti_patterns:
144
152
  - description: >-
145
153
  Beginning text= with a symbol that icon= already renders. icon="plus"
@@ -154,6 +162,16 @@ anti_patterns:
154
162
  text= carries only the words. Applies to plus / minus / x / check /
155
163
  arrow icons.
156
164
  examples: []
157
- keywords: []
158
- synonyms: {}
165
+ keywords:
166
+ - button
167
+ - action
168
+ - cta
169
+ - submit
170
+ - click
171
+ - primary-action
172
+ - ghost-button
173
+ - icon-button
174
+ synonyms:
175
+ button: [btn, action-button, click-target, control]
176
+ submit: [form-submit, primary-action]
159
177
  related: [Link]
@@ -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 picker with trigger button and popover calendar grid. Form-associated.",
5
+ "description": "Date picker with trigger button and popover calendar grid. Form-associated input emitting ISO date string via change events; supports min/max and disabled-date masks. Use for single-date input in forms; for date ranges compose two pickers or use a dedicated range component.",
6
6
  "type": "object",
7
7
  "allOf": [
8
8
  {
@@ -4,7 +4,12 @@ tag: calendar-picker-ui
4
4
  component: CalendarPicker
5
5
  category: input
6
6
  version: 1
7
- description: Date picker with trigger button and popover calendar grid. Form-associated.
7
+ description: >-
8
+ Date picker with trigger button and popover calendar grid.
9
+ Form-associated input emitting ISO date string via change events;
10
+ supports min/max and disabled-date masks. Use for single-date input in
11
+ forms; for date ranges compose two pickers or use a dedicated range
12
+ component.
8
13
  props:
9
14
  name:
10
15
  description: Form field name
@@ -76,7 +81,13 @@ requiredIcons:
76
81
  - caret-left
77
82
  - caret-right
78
83
  a2ui:
79
- rules: []
84
+ rules:
85
+ - rule: 'Form-associated date input. Trigger button + popover calendar grid; emits ISO date string via change events.'
86
+ reason: 'Standard date-picker contract.'
87
+ - rule: 'Use for single-date input. For date ranges compose two pickers or use a dedicated range component.'
88
+ reason: 'Single-value scope.'
89
+ - rule: 'min/max attributes constrain selectable range; disabled-dates accepts a function or date list.'
90
+ reason: 'Constraint knobs.'
80
91
  anti_patterns: []
81
92
  examples:
82
93
  - name: date-picker
@@ -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/Canvas.json",
4
4
  "title": "Canvas",
5
- "description": "A2UI rendering surface.",
5
+ "description": "A2UI rendering surface — the canonical mount point that consumes a\nDocStore / A2UI document and renders the component tree from it.\nThe runtime's <a2ui-root> typically wraps a canvas-ui internally\nfor the preview pane in <editor-canvas>. Use for embedding live\nA2UI output inside a custom editor, playground, or preview surface;\nnot for generic in-page canvases (use HTML <canvas> for drawing).\n",
6
6
  "type": "object",
7
7
  "allOf": [
8
8
  {
@@ -46,7 +46,11 @@
46
46
  "canvas"
47
47
  ],
48
48
  "name": "UICanvas",
49
- "related": [],
49
+ "related": [
50
+ "A2uiRoot",
51
+ "GenRoot",
52
+ "EditorCanvas"
53
+ ],
50
54
  "slots": {
51
55
  "default": {
52
56
  "description": "Default slot — primary child content."
@@ -4,7 +4,13 @@ tag: canvas-ui
4
4
  component: Canvas
5
5
  category: agent
6
6
  version: 1
7
- description: A2UI rendering surface.
7
+ description: |
8
+ A2UI rendering surface — the canonical mount point that consumes a
9
+ DocStore / A2UI document and renders the component tree from it.
10
+ The runtime's <a2ui-root> typically wraps a canvas-ui internally
11
+ for the preview pane in <editor-canvas>. Use for embedding live
12
+ A2UI output inside a custom editor, playground, or preview surface;
13
+ not for generic in-page canvases (use HTML <canvas> for drawing).
8
14
  # Per ADR-0027 — primitives that programmatically create other primitives
9
15
  # do NOT auto-import them. Consumer (or demo shell) must explicitly import.
10
16
  # <canvas-ui> composes only cross-package primitives (a2ui-root + theme-ui);
@@ -34,7 +40,15 @@ states:
34
40
  traits: []
35
41
  tokens: {}
36
42
  a2ui:
37
- rules: []
43
+ rules:
44
+ - rule: 'A2UI rendering surface — consumes a DocStore / A2UI document and renders the component tree from it.'
45
+ reason: 'Runtime mount point.'
46
+ - rule: 'Typically wrapped by <a2ui-root> internally; for direct-mount use <canvas-ui> as the root.'
47
+ reason: 'Mount-point hierarchy.'
48
+ - rule: 'Do not place static children inside — the runtime owns the rendered DOM.'
49
+ reason: 'Reserved DOM region.'
50
+ - rule: 'theme attribute scopes the AdiaUI token theme to the canvas subtree.'
51
+ reason: 'Theme isolation knob.'
38
52
  anti_patterns: []
39
53
  examples:
40
54
  - name: basic-canvas
@@ -48,4 +62,7 @@ synonyms:
48
62
  tags:
49
63
  - render-surface
50
64
  - a2ui-host
51
- related: []
65
+ related:
66
+ - A2uiRoot
67
+ - GenRoot
68
+ - EditorCanvas
@@ -182,9 +182,13 @@
182
182
  /* Column templates — match gen-ui-kit pattern. Direct-child `:has(> …)` so
183
183
  nested [slot="icon"] inside a composite (e.g. <avatar-ui>) can't trigger
184
184
  the icon column by accident. */
185
- & > header:has(> [slot="icon"]):has(> [slot="action"]) { grid-template-columns: max-content 1fr max-content; }
185
+ /* `auto` on the action column = minmax(min-content, max-content): takes
186
+ max-content size when space allows, shrinks to min-content when the card
187
+ is narrow. This lets segmented-ui / button groups in the action slot
188
+ compress and show per-segment ellipsis rather than overflowing. */
189
+ & > header:has(> [slot="icon"]):has(> [slot="action"]) { grid-template-columns: max-content 1fr auto; }
186
190
  & > header:has(> [slot="icon"]):not(:has(> [slot="action"])) { grid-template-columns: max-content 1fr; }
187
- & > header:not(:has(> [slot="icon"])):has(> [slot="action"]) { grid-template-columns: 1fr max-content; }
191
+ & > header:not(:has(> [slot="icon"])):has(> [slot="action"]) { grid-template-columns: 1fr auto; }
188
192
  & > header:not(:has(> [slot="icon"])):not(:has(> [slot="action"])) { grid-template-columns: 1fr; }
189
193
 
190
194
  /* Unslotted children (zettel fragment injection, etc.) — each on its own row,
@@ -249,6 +253,7 @@
249
253
  display: flex;
250
254
  align-items: center;
251
255
  gap: var(--card-header-gap);
256
+ min-width: 0; /* allow flex children (segmented-ui, button) to shrink */
252
257
  }
253
258
 
254
259
  /* ═══════ Section (body) ═══════
@@ -271,6 +276,22 @@
271
276
  padding: 0;
272
277
  }
273
278
 
279
+ /* Flex-column growth for bleed chart cards (sparklines, area, line).
280
+ Switches the card to a column flex container so the bleed section
281
+ can flex-grow to fill remaining height after the header. The chart
282
+ then uses height:100% to fill the section. Only activates when a
283
+ chart-ui is a direct child of a bleed section — no effect on other
284
+ card layouts. */
285
+ :scope:has(> section[bleed] > chart-ui) {
286
+ display: flex;
287
+ flex-direction: column;
288
+ }
289
+
290
+ :scope:has(> section[bleed] > chart-ui) > section[bleed] {
291
+ flex: 1;
292
+ min-height: 0;
293
+ }
294
+
274
295
  /* ═══════ Footer ═══════
275
296
  Margin-based inset. Flex row for actions.
276
297
  [divider] adds top border.
@@ -97,6 +97,18 @@ a2ui:
97
97
  content (tables, charts); [padding] adds a canvas-scrim background for hero regions.
98
98
  - 'Footer with a [slot="description"] + [slot="action"] pair triggers justify-content: space-between — useful for a "Last
99
99
  saved …" note on the left and a Save/Cancel button group on the right.'
100
+ - >-
101
+ Do NOT substitute <card-ui> for shell/page containers. <admin-page>,
102
+ <admin-content>, and <page-ui> own routed page layout; <card-ui> is
103
+ a localized bordered surface that lives INSIDE them. For overlays
104
+ use <modal-ui> (centered) or <drawer-ui> (edge-anchored) — both
105
+ share the same 4-stub <header>/<section>/<footer> vocabulary.
106
+ - >-
107
+ Use [raw] when a parent already owns the surface chrome (e.g. an
108
+ auth screen centred on the viewport — see apps/user-flow/auth).
109
+ Use [elevation] 0–3 for shadow depth; [variant="ghost"|"flat"] to
110
+ remove shadow without removing structure. [draggable] emits a
111
+ drag-end event; only enable on cards meant to move.
100
112
  anti_patterns: []
101
113
  examples:
102
114
  - name: chat-interface
@@ -611,9 +611,11 @@
611
611
  }
612
612
 
613
613
  /* ── Sparkline container ──
614
- When host has explicit height, fill it; otherwise give a sensible
615
- default of 2rem so the sparkline still has room to breathe. */
614
+ `height: 100%` fills an explicit parent height (e.g. when the
615
+ containing section is a flex-grow item inside card-ui). Falls
616
+ back to `min-height: 2rem` when the parent has no explicit height. */
616
617
  :scope[type="sparkline"] {
618
+ height: 100%;
617
619
  min-height: 2rem;
618
620
  }
619
621
 
@@ -172,7 +172,15 @@ states:
172
172
  traits: []
173
173
  tokens: {}
174
174
  a2ui:
175
- rules: []
175
+ rules:
176
+ - rule: 'Declarative SVG chart supporting 18 types via the type attribute (bar, line, pie, donut, radar, area, ...).'
177
+ reason: 'Polymorphic chart primitive.'
178
+ - rule: 'For density-grid visualizations (calendar heatmap, etc.) use <heatmap-ui> instead.'
179
+ reason: 'Specialized sibling.'
180
+ - rule: 'Pair with <chart-legend-ui [for]=...> for keyboard-toggleable series legends; otherwise use the built-in inline legend.'
181
+ reason: 'Legend composition.'
182
+ - rule: 'title + empty slots for chart chrome; canvas slot for chart-internal overlays.'
183
+ reason: 'Slot contract.'
176
184
  anti_patterns: []
177
185
  examples:
178
186
  - name: chart-dashboard
@@ -95,7 +95,13 @@ states:
95
95
  traits: []
96
96
  tokens: {}
97
97
  a2ui:
98
- rules: []
98
+ rules:
99
+ - rule: 'Standalone legend primitive — a row of <badge-ui>+<swatch-ui> chips that are keyboard-focusable and click-toggleable.'
100
+ reason: 'Legend pattern.'
101
+ - rule: 'Pairs with <chart-ui> via [for] id-ref (auto-bidirectional series toggling) or via items= for standalone use.'
102
+ reason: 'Composition contract.'
103
+ - rule: 'position attribute (top|bottom|left|right) places legend relative to its chart; static= disables interactivity.'
104
+ reason: 'Layout + interaction knobs.'
99
105
  anti_patterns: []
100
106
  examples:
101
107
  - name: standalone-with-items
@@ -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/ChatThread.json",
4
4
  "title": "ChatThread",
5
- "description": "Minimal chat-thread container.",
5
+ "description": "Primitive chat message thread surface — a minimal scroll container\nfor ad-hoc message rendering. Distinct from the bespoke shell\nchild <chat-thread> (module-tier, lives inside <chat-shell>, owns\nscroll-to-bottom + [streaming] + [empty] reflected state). Use\nchat-thread-ui when embedding chat-like rows OUTSIDE a chat-shell\n(e.g. a comment thread inside <card-ui>); use <chat-thread> when\nauthoring a chat-shell.\n",
6
6
  "type": "object",
7
7
  "allOf": [
8
8
  {
@@ -87,7 +87,11 @@
87
87
  "support"
88
88
  ],
89
89
  "name": "UIChatThread",
90
- "related": [],
90
+ "related": [
91
+ "ChatThread",
92
+ "List",
93
+ "Feed"
94
+ ],
91
95
  "slots": {
92
96
  "default": {
93
97
  "description": "Default slot — primary child content."
@@ -1,5 +1,12 @@
1
1
  /**
2
- * `<chat-thread-ui>` — Minimal chat-thread container.
2
+ * `<chat-thread-ui>` — Primitive chat message thread surface — a minimal scroll container
3
+ for ad-hoc message rendering. Distinct from the bespoke shell
4
+ child <chat-thread> (module-tier, lives inside <chat-shell>, owns
5
+ scroll-to-bottom + [streaming] + [empty] reflected state). Use
6
+ chat-thread-ui when embedding chat-like rows OUTSIDE a chat-shell
7
+ (e.g. a comment thread inside <card-ui>); use <chat-thread> when
8
+ authoring a chat-shell.
9
+
3
10
  *
4
11
  * @see https://ui-kit.exe.xyz/site/components/chat-thread
5
12
  *
@@ -6,7 +6,14 @@ tag: chat-thread-ui
6
6
  component: ChatThread
7
7
  category: agent
8
8
  version: 1
9
- description: Minimal chat-thread container.
9
+ description: |
10
+ Primitive chat message thread surface — a minimal scroll container
11
+ for ad-hoc message rendering. Distinct from the bespoke shell
12
+ child <chat-thread> (module-tier, lives inside <chat-shell>, owns
13
+ scroll-to-bottom + [streaming] + [empty] reflected state). Use
14
+ chat-thread-ui when embedding chat-like rows OUTSIDE a chat-shell
15
+ (e.g. a comment thread inside <card-ui>); use <chat-thread> when
16
+ authoring a chat-shell.
10
17
  props:
11
18
  streaming:
12
19
  description: "Component property: streaming."
@@ -31,7 +38,15 @@ states:
31
38
  traits: []
32
39
  tokens: {}
33
40
  a2ui:
34
- rules: []
41
+ rules:
42
+ - rule: 'Primitive chat-message scroll container — ad-hoc message rendering surface.'
43
+ reason: 'Lowest-friction chat surface.'
44
+ - rule: 'Different from the bespoke <chat-thread> (module-tier, lives inside <chat-shell-ui>, owns scroll + load-more affordances).'
45
+ reason: 'Primitive vs cluster-child boundary.'
46
+ - rule: 'Hosts arbitrary children — typical content: agent + user message blocks, <agent-feedback-bar-ui>, <agent-suggestions-ui>.'
47
+ reason: 'Composition pattern.'
48
+ - rule: 'streaming attribute hints the consumer to show a streaming indicator (composes well with <stream-ui> children).'
49
+ reason: 'Streaming UX.'
35
50
  anti_patterns: []
36
51
  examples:
37
52
  - name: basic-chat
@@ -234,4 +249,7 @@ synonyms:
234
249
  - faq
235
250
  - accordion
236
251
  - chat
237
- related: []
252
+ related:
253
+ - ChatThread
254
+ - List
255
+ - Feed
@@ -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/Check.json",
4
4
  "title": "Check",
5
- "description": "Checkbox. The host IS the control.",
5
+ "description": "Checkbox primitive — the host IS the control (per ADR-0025, no\nnative <input> wrapped underneath). Form-bearing via UIFormElement:\n[name], [value], [checked] (reflect), [indeterminate], [required],\n[disabled]. Wrap in <field-ui label=\"…\" hint=\"…\"> for the canonical\nlabeled stack, or set inline [label] / [hint] props. Distinct from\n<switch-ui> (binary on/off toggle) — use check-ui for opt-in lists\nand form acknowledgements, switch-ui for setting-style toggles.\n",
6
6
  "type": "object",
7
7
  "allOf": [
8
8
  {
@@ -88,7 +88,11 @@
88
88
  "check"
89
89
  ],
90
90
  "name": "UICheck",
91
- "related": [],
91
+ "related": [
92
+ "Switch",
93
+ "Radio",
94
+ "Field"
95
+ ],
92
96
  "slots": {
93
97
  "box": {
94
98
  "description": "Visual checkbox indicator"
@@ -111,7 +115,13 @@
111
115
  "name": "disabled"
112
116
  }
113
117
  ],
114
- "synonyms": {},
118
+ "synonyms": {
119
+ "checkbox": [
120
+ "check",
121
+ "tickbox",
122
+ "boolean-input"
123
+ ]
124
+ },
115
125
  "tag": "check-ui",
116
126
  "tokens": {
117
127
  "--check-box-background": {
@@ -6,7 +6,14 @@ tag: check-ui
6
6
  component: Check
7
7
  category: layout
8
8
  version: 1
9
- description: Checkbox. The host IS the control.
9
+ description: |
10
+ Checkbox primitive — the host IS the control (per ADR-0025, no
11
+ native <input> wrapped underneath). Form-bearing via UIFormElement:
12
+ [name], [value], [checked] (reflect), [indeterminate], [required],
13
+ [disabled]. Wrap in <field-ui label="…" hint="…"> for the canonical
14
+ labeled stack, or set inline [label] / [hint] props. Distinct from
15
+ <switch-ui> (binary on/off toggle) — use check-ui for opt-in lists
16
+ and form acknowledgements, switch-ui for setting-style toggles.
10
17
  props:
11
18
  name:
12
19
  description: Form field name
@@ -78,6 +85,10 @@ tokens:
78
85
  a2ui:
79
86
  rules:
80
87
  - "Self-labeling widget — use the [label] attribute directly; do NOT wrap in <field-ui>. The widget renders its own label inline via CSS attr() pattern. Wrapping breaks the consent-row layout (see field-ui anti_patterns)."
88
+ - rule: 'Three states supported: unchecked (default), checked (via [checked]), and indeterminate (via [indeterminate]); form-associated.'
89
+ reason: 'Per ADR-0025 — host IS the control, no wrapped <input>.'
90
+ - rule: 'For binary on/off toggles where visual switch metaphor matters, use <switch-ui> instead; check-ui is for multi-select sets and form-acceptance gates.'
91
+ reason: 'Decision rule vs switch sibling.'
81
92
  anti_patterns:
82
93
  - description: Wrapping a check-ui in field-ui. The widget already self-labels.
83
94
  wrong: |
@@ -114,5 +125,9 @@ examples:
114
125
  ]
115
126
  keywords:
116
127
  - check
117
- synonyms: {}
118
- related: []
128
+ synonyms:
129
+ checkbox: [check, tickbox, boolean-input]
130
+ related:
131
+ - Switch
132
+ - Radio
133
+ - Field
@@ -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/Code.json",
4
4
  "title": "Code",
5
- "description": "Inline or block code display with optional language label and copy button.",
5
+ "description": "Inline or block code display with optional language label and copy button. Renders preformatted text with monospace font and code-block tokens; syntax highlighting is opt-in via the language attribute. Use for code snippets in documentation, chat, or artifact panes; for editable code use <richtext-ui> with a code variant.",
6
6
  "type": "object",
7
7
  "allOf": [
8
8
  {
@@ -6,7 +6,12 @@ tag: code-ui
6
6
  component: Code
7
7
  category: display
8
8
  version: 1
9
- description: Inline or block code display with optional language label and copy button.
9
+ description: >-
10
+ Inline or block code display with optional language label and copy
11
+ button. Renders preformatted text with monospace font and code-block
12
+ tokens; syntax highlighting is opt-in via the language attribute. Use
13
+ for code snippets in documentation, chat, or artifact panes; for
14
+ editable code use <richtext-ui> with a code variant.
10
15
  props:
11
16
  inline:
12
17
  description: Inline code (vs block)
@@ -112,7 +117,13 @@ states:
112
117
  traits: []
113
118
  tokens: {}
114
119
  a2ui:
115
- rules: []
120
+ rules:
121
+ - rule: 'Inline (default) for short tokens in prose; block variant (display=''block'') for multi-line snippets.'
122
+ reason: 'Tag is the same; CSS variant switches between inline-flow and block context.'
123
+ - rule: 'Do not use for editable code — use <richtext-ui> with code variant or a dedicated editor primitive.'
124
+ reason: 'Code-ui is read-only display only.'
125
+ - rule: 'Inside <agent-artifact-ui> blocks for agent-emitted code snippets; lang= sets syntax-highlighting hint.'
126
+ reason: 'Canonical artifact-pane code rendering.'
116
127
  anti_patterns: []
117
128
  examples:
118
129
  - name: code-block
@@ -18,6 +18,7 @@
18
18
  */
19
19
 
20
20
  import { UIElement } from '../../core/element.js';
21
+ import { parseResponsive, breakpoint } from '../../core/responsive.js';
21
22
 
22
23
  export class UICol extends UIElement {
23
24
  static properties = {
@@ -27,4 +28,42 @@ export class UICol extends UIElement {
27
28
  grow: { type: Boolean, default: false, reflect: true },
28
29
  };
29
30
  static template = () => null;
31
+
32
+ render() {
33
+ const gap = this.gap;
34
+ const align = this.align;
35
+ const justify = this.justify;
36
+ // Only subscribe to breakpoint when at least one prop uses @bp notation.
37
+ const anyR = gap?.includes('@') || align?.includes('@') || justify?.includes('@');
38
+ const bp = anyR ? breakpoint.value : '';
39
+
40
+ if (gap?.includes('@')) {
41
+ this.style.setProperty('--col-gap', _gapToCss(parseResponsive(gap, bp)));
42
+ } else {
43
+ this.style.removeProperty('--col-gap');
44
+ }
45
+
46
+ if (align?.includes('@')) {
47
+ const v = parseResponsive(align, bp);
48
+ this.style.setProperty('--col-align', _flexAlign(v));
49
+ this.style.textAlign = _textAlign(v);
50
+ } else {
51
+ this.style.removeProperty('--col-align');
52
+ this.style.textAlign = '';
53
+ }
54
+
55
+ if (justify?.includes('@')) {
56
+ this.style.setProperty('--col-justify', _flexJustify(parseResponsive(justify, bp)));
57
+ } else {
58
+ this.style.removeProperty('--col-justify');
59
+ }
60
+ }
30
61
  }
62
+
63
+ const _ALIGN = { start: 'flex-start', end: 'flex-end', center: 'center', stretch: 'stretch', baseline: 'baseline' };
64
+ const _JUSTIFY = { start: 'flex-start', end: 'flex-end', center: 'center', between: 'space-between', 'space-between': 'space-between', 'space-around': 'space-around' };
65
+
66
+ function _gapToCss(v) { return (!v || v === '0') ? '0' : /^\d+$/.test(v) ? `var(--a-space-${v})` : `var(--a-gap-${v})`; }
67
+ function _flexAlign(v) { return _ALIGN[v] ?? v; }
68
+ function _textAlign(v) { return { start: 'start', center: 'center', end: 'end' }[v] ?? ''; }
69
+ function _flexJustify(v) { return _JUSTIFY[v] ?? v; }
@@ -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/Col.json",
4
4
  "title": "Col",
5
- "description": "Flex column layout primitive.",
5
+ "description": "Flex column layout primitive — vertical stack of children with\n[gap] / [align] / [justify] / [grow]. The most common layout\nprimitive in the repo. Use <col-ui> for vertical stacks, <row-ui>\nfor horizontal rows, <stack-ui> for overlay (children stack on top\nof each other in a grid), <grid-ui> for 2D grids. Composes inside\n<section-ui> for in-card layout; do NOT use as a child of\n<header-ui> / <footer-ui> (the chrome scope already lays out\nslots).\n",
6
6
  "type": "object",
7
7
  "allOf": [
8
8
  {
@@ -14,7 +14,7 @@
14
14
  ],
15
15
  "properties": {
16
16
  "align": {
17
- "description": "Align items",
17
+ "description": "Cross-axis alignment (start/center/end/stretch). Accepts `@bp` notation: align=\"stretch center@sm\" applies stretch below sm, center from sm up.",
18
18
  "type": "string",
19
19
  "default": "stretch"
20
20
  },
@@ -22,7 +22,7 @@
22
22
  "const": "Col"
23
23
  },
24
24
  "gap": {
25
- "description": "Gap between children. Accepts either the named scale (xs/sm/md/lg/xl) or a numeric rung on the spacing scale (\"1\"…\"16\", mapped to --a-space-N).",
25
+ "description": "Gap between children. Named scale (xs/sm/md/lg/xl) or numeric spacing rung (\"1\"…\"16\", mapped to --a-space-N). Accepts `@bp` notation: gap=\"2 4@md\" = 2 below md, 4 from md upward.",
26
26
  "type": "string",
27
27
  "default": "md"
28
28
  },
@@ -32,7 +32,7 @@
32
32
  "default": false
33
33
  },
34
34
  "justify": {
35
- "description": "Justify content",
35
+ "description": "Main-axis justify (start/center/end/space-between/space-around). Accepts `@bp` notation: justify=\"start space-between@md\".",
36
36
  "type": "string",
37
37
  "default": "start"
38
38
  }
@@ -81,7 +81,14 @@
81
81
  "name": "idle"
82
82
  }
83
83
  ],
84
- "synonyms": {},
84
+ "synonyms": {
85
+ "column": [
86
+ "col",
87
+ "vstack",
88
+ "vertical-stack",
89
+ "vbox"
90
+ ]
91
+ },
85
92
  "tag": "col-ui",
86
93
  "tokens": {},
87
94
  "traits": [],
@@ -1,5 +1,13 @@
1
1
  /**
2
- * `<col-ui>` — Flex column layout primitive.
2
+ * `<col-ui>` — Flex column layout primitive — vertical stack of children with
3
+ [gap] / [align] / [justify] / [grow]. The most common layout
4
+ primitive in the repo. Use <col-ui> for vertical stacks, <row-ui>
5
+ for horizontal rows, <stack-ui> for overlay (children stack on top
6
+ of each other in a grid), <grid-ui> for 2D grids. Composes inside
7
+ <section-ui> for in-card layout; do NOT use as a child of
8
+ <header-ui> / <footer-ui> (the chrome scope already lays out
9
+ slots).
10
+
3
11
  *
4
12
  * @see https://ui-kit.exe.xyz/site/components/col
5
13
  *
@@ -13,12 +21,12 @@
13
21
  import { UIElement } from '../../core/element.js';
14
22
 
15
23
  export class UICol extends UIElement {
16
- /** Align items */
24
+ /** Cross-axis alignment (start/center/end/stretch). Accepts `@bp` notation: align="stretch center@sm" applies stretch below sm, center from sm up. */
17
25
  align: string;
18
- /** Gap between children. Accepts either the named scale (xs/sm/md/lg/xl) or a numeric rung on the spacing scale ("1"…"16", mapped to --a-space-N). */
26
+ /** Gap between children. Named scale (xs/sm/md/lg/xl) or numeric spacing rung ("1"…"16", mapped to --a-space-N). Accepts `@bp` notation: gap="2 4@md" = 2 below md, 4 from md upward. */
19
27
  gap: string;
20
28
  /** Fills remaining space in a flex parent (e.g. inside a Row). CSS-only attribute via :scope[grow] in col.css. */
21
29
  grow: boolean;
22
- /** Justify content */
30
+ /** Main-axis justify (start/center/end/space-between/space-around). Accepts `@bp` notation: justify="start space-between@md". */
23
31
  justify: string;
24
32
  }
@@ -6,16 +6,27 @@ tag: col-ui
6
6
  component: Col
7
7
  category: layout
8
8
  version: 1
9
- description: Flex column layout primitive.
9
+ description: |
10
+ Flex column layout primitive — vertical stack of children with
11
+ [gap] / [align] / [justify] / [grow]. The most common layout
12
+ primitive in the repo. Use <col-ui> for vertical stacks, <row-ui>
13
+ for horizontal rows, <stack-ui> for overlay (children stack on top
14
+ of each other in a grid), <grid-ui> for 2D grids. Composes inside
15
+ <section-ui> for in-card layout; do NOT use as a child of
16
+ <header-ui> / <footer-ui> (the chrome scope already lays out
17
+ slots).
10
18
  props:
11
19
  align:
12
- description: Align items
20
+ description: >-
21
+ Cross-axis alignment (start/center/end/stretch). Accepts `@bp` notation:
22
+ align="stretch center@sm" applies stretch below sm, center from sm up.
13
23
  type: string
14
24
  default: stretch
15
25
  gap:
16
26
  description: >-
17
- Gap between children. Accepts either the named scale (xs/sm/md/lg/xl)
18
- or a numeric rung on the spacing scale ("1"…"16", mapped to --a-space-N).
27
+ Gap between children. Named scale (xs/sm/md/lg/xl) or numeric spacing
28
+ rung ("1"…"16", mapped to --a-space-N). Accepts `@bp` notation:
29
+ gap="2 4@md" = 2 below md, 4 from md upward.
19
30
  type: string
20
31
  default: md
21
32
  grow:
@@ -24,7 +35,9 @@ props:
24
35
  default: false
25
36
  reflect: true
26
37
  justify:
27
- description: Justify content
38
+ description: >-
39
+ Main-axis justify (start/center/end/space-between/space-around).
40
+ Accepts `@bp` notation: justify="start space-between@md".
28
41
  type: string
29
42
  default: start
30
43
  events: {}
@@ -37,7 +50,13 @@ states:
37
50
  traits: []
38
51
  tokens: {}
39
52
  a2ui:
40
- rules: []
53
+ rules:
54
+ - rule: 'Vertical-stack flex container. Children flow top-to-bottom with token-driven gap.'
55
+ reason: 'Canonical vertical layout.'
56
+ - rule: 'Pair with <row-ui> for horizontal layouts; both share the same gap-token contract.'
57
+ reason: 'Layout symmetry.'
58
+ - rule: 'Set align/justify attributes for cross-axis / main-axis alignment; default is start/start.'
59
+ reason: 'Standard flex knobs.'
41
60
  anti_patterns: []
42
61
  examples:
43
62
  - name: chat-interface
@@ -340,7 +359,8 @@ examples:
340
359
  keywords:
341
360
  - column
342
361
  - col
343
- synonyms: {}
362
+ synonyms:
363
+ column: [col, vstack, vertical-stack, vbox]
344
364
  related:
345
365
  - avatar
346
366
  - input