@adia-ai/web-components 0.0.1 → 0.0.3

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 (211) hide show
  1. package/a2ui/index.js +23 -17
  2. package/components/accordion/accordion.js +1 -1
  3. package/components/action-list/action-list.js +1 -1
  4. package/components/agent-artifact/agent-artifact.js +1 -1
  5. package/components/agent-feedback-bar/agent-feedback-bar.js +1 -1
  6. package/components/agent-questions/agent-questions.js +1 -1
  7. package/components/agent-reasoning/agent-reasoning.a2ui.json +14 -8
  8. package/components/agent-reasoning/agent-reasoning.css +1 -1
  9. package/components/agent-reasoning/agent-reasoning.js +9 -9
  10. package/components/agent-reasoning/agent-reasoning.yaml +9 -6
  11. package/components/agent-suggestions/agent-suggestions.js +1 -1
  12. package/components/agent-trace/agent-trace.js +1 -1
  13. package/components/alert/alert.js +1 -1
  14. package/components/avatar/avatar.a2ui.json +0 -10
  15. package/components/avatar/avatar.css +1 -1
  16. package/components/avatar/avatar.js +1 -1
  17. package/components/avatar/avatar.yaml +0 -8
  18. package/components/badge/badge.a2ui.json +6 -6
  19. package/components/badge/badge.js +22 -1
  20. package/components/badge/badge.yaml +8 -5
  21. package/components/block/block.js +1 -1
  22. package/components/breadcrumb/breadcrumb.js +1 -1
  23. package/components/button/button.a2ui.json +0 -11
  24. package/components/button/button.css +1 -1
  25. package/components/button/button.js +3 -3
  26. package/components/button/button.yaml +0 -11
  27. package/components/calendar-picker/calendar-picker.js +25 -19
  28. package/components/canvas/canvas.js +3 -3
  29. package/components/card/card.a2ui.json +0 -21
  30. package/components/card/card.js +2 -2
  31. package/components/card/card.yaml +0 -14
  32. package/components/chart/chart.a2ui.json +9 -8
  33. package/components/chart/chart.js +1 -1
  34. package/components/chart/chart.yaml +7 -5
  35. package/components/chat/chat-input.js +1 -1
  36. package/components/chat/chat.js +2 -2
  37. package/components/check/check.css +1 -1
  38. package/components/check/check.js +2 -2
  39. package/components/code/code.a2ui.json +0 -5
  40. package/components/code/code.js +1 -1
  41. package/components/code/code.yaml +0 -4
  42. package/components/col/col.a2ui.json +0 -20
  43. package/components/col/col.js +1 -1
  44. package/components/col/col.yaml +0 -20
  45. package/components/color-picker/color-picker.a2ui.json +1 -1
  46. package/components/color-picker/color-picker.js +5 -2
  47. package/components/color-picker/color-picker.yaml +1 -1
  48. package/components/command/command.js +22 -11
  49. package/components/description-list/description-list.js +1 -1
  50. package/components/divider/divider.a2ui.json +0 -19
  51. package/components/divider/divider.js +1 -1
  52. package/components/divider/divider.yaml +0 -12
  53. package/components/drawer/drawer.a2ui.json +2 -2
  54. package/components/drawer/drawer.css +1 -1
  55. package/components/drawer/drawer.js +2 -2
  56. package/components/drawer/drawer.yaml +3 -3
  57. package/components/embed/embed.js +1 -1
  58. package/components/empty-state/empty-state.a2ui.json +0 -13
  59. package/components/empty-state/empty-state.js +1 -1
  60. package/components/empty-state/empty-state.yaml +0 -5
  61. package/components/footer/footer.a2ui.json +1 -1
  62. package/components/footer/footer.yaml +1 -1
  63. package/components/grid/grid.a2ui.json +0 -5
  64. package/components/grid/grid.js +1 -1
  65. package/components/grid/grid.yaml +0 -4
  66. package/components/header/header.a2ui.json +1 -1
  67. package/components/header/header.yaml +1 -1
  68. package/components/heatmap/heatmap.a2ui.json +4 -4
  69. package/components/heatmap/heatmap.js +4 -4
  70. package/components/heatmap/heatmap.yaml +4 -4
  71. package/components/icon/icon.a2ui.json +13 -0
  72. package/components/icon/icon.js +2 -2
  73. package/components/icon/icon.yaml +6 -0
  74. package/components/image/image.a2ui.json +10 -21
  75. package/components/image/image.js +1 -1
  76. package/components/image/image.yaml +8 -16
  77. package/components/input/input.a2ui.json +0 -15
  78. package/components/input/input.js +2 -2
  79. package/components/input/input.yaml +0 -12
  80. package/components/inspector/inspector.a2ui.json +0 -5
  81. package/components/inspector/inspector.js +2 -2
  82. package/components/inspector/inspector.yaml +0 -4
  83. package/components/kbd/kbd.js +1 -1
  84. package/components/list/list.a2ui.json +0 -33
  85. package/components/list/list.js +1 -1
  86. package/components/list/list.yaml +0 -27
  87. package/components/menu/menu.a2ui.json +0 -10
  88. package/components/menu/menu.js +9 -3
  89. package/components/menu/menu.yaml +0 -8
  90. package/components/modal/modal.a2ui.json +1 -25
  91. package/components/modal/modal.js +1 -1
  92. package/components/modal/modal.yaml +1 -22
  93. package/components/noodles/noodles.a2ui.json +0 -5
  94. package/components/noodles/noodles.js +1 -1
  95. package/components/noodles/noodles.yaml +0 -5
  96. package/components/otp-input/otp-input.a2ui.json +0 -5
  97. package/components/otp-input/otp-input.js +1 -1
  98. package/components/otp-input/otp-input.yaml +0 -4
  99. package/components/pagination/pagination.a2ui.json +3 -13
  100. package/components/pagination/pagination.css +1 -1
  101. package/components/pagination/pagination.js +1 -1
  102. package/components/pagination/pagination.yaml +5 -14
  103. package/components/pane/pane.a2ui.json +0 -10
  104. package/components/pane/pane.js +1 -1
  105. package/components/pane/pane.yaml +0 -9
  106. package/components/pipeline-status/pipeline-status.js +1 -1
  107. package/components/popover/popover.a2ui.json +0 -14
  108. package/components/popover/popover.js +9 -3
  109. package/components/popover/popover.yaml +0 -11
  110. package/components/progress/progress.a2ui.json +2 -12
  111. package/components/progress/progress.js +1 -1
  112. package/components/progress/progress.yaml +2 -11
  113. package/components/progress-row/progress-row.a2ui.json +3 -13
  114. package/components/progress-row/progress-row.js +1 -1
  115. package/components/progress-row/progress-row.yaml +3 -11
  116. package/components/radio/radio.css +1 -1
  117. package/components/radio/radio.js +2 -2
  118. package/components/range/range.js +1 -1
  119. package/components/rating/rating.js +1 -1
  120. package/components/richtext/richtext.js +2 -2
  121. package/components/row/row.a2ui.json +0 -5
  122. package/components/row/row.js +2 -2
  123. package/components/row/row.yaml +0 -4
  124. package/components/search/search.a2ui.json +0 -5
  125. package/components/search/search.js +1 -1
  126. package/components/search/search.yaml +0 -4
  127. package/components/section/section.a2ui.json +1 -1
  128. package/components/section/section.yaml +1 -1
  129. package/components/segment/segment.js +1 -1
  130. package/components/segmented/segmented.css +1 -1
  131. package/components/segmented/segmented.js +1 -1
  132. package/components/select/select.a2ui.json +5 -0
  133. package/components/select/select.js +13 -3
  134. package/components/select/select.yaml +5 -0
  135. package/components/skeleton/skeleton.a2ui.json +0 -11
  136. package/components/skeleton/skeleton.js +1 -1
  137. package/components/skeleton/skeleton.yaml +0 -5
  138. package/components/slider/slider.a2ui.json +0 -5
  139. package/components/slider/slider.js +1 -1
  140. package/components/slider/slider.yaml +0 -5
  141. package/components/stack/stack.js +1 -1
  142. package/components/stat/stat.js +1 -1
  143. package/components/stepper/stepper.js +1 -1
  144. package/components/stream/stream.js +1 -1
  145. package/components/swiper/swiper.a2ui.json +7 -7
  146. package/components/swiper/swiper.js +2 -2
  147. package/components/swiper/swiper.yaml +8 -6
  148. package/components/switch/switch.css +1 -1
  149. package/components/switch/switch.js +2 -2
  150. package/components/table/table.js +1 -1
  151. package/components/tabs/tab.js +1 -1
  152. package/components/tabs/tabs.js +1 -1
  153. package/components/tag/tag.a2ui.json +0 -5
  154. package/components/tag/tag.js +1 -1
  155. package/components/tag/tag.yaml +0 -4
  156. package/components/text/text.a2ui.json +5 -0
  157. package/components/text/text.css +2 -2
  158. package/components/text/text.js +1 -1
  159. package/components/text/text.yaml +5 -0
  160. package/components/textarea/textarea.js +1 -1
  161. package/components/timeline/timeline.a2ui.json +8 -13
  162. package/components/timeline/timeline.js +1 -1
  163. package/components/timeline/timeline.yaml +6 -11
  164. package/components/toast/toast.a2ui.json +0 -15
  165. package/components/toast/toast.js +1 -1
  166. package/components/toast/toast.yaml +0 -13
  167. package/components/toggle-group/toggle-group.js +1 -1
  168. package/components/toolbar/toolbar.a2ui.json +0 -23
  169. package/components/toolbar/toolbar.js +13 -3
  170. package/components/toolbar/toolbar.yaml +0 -19
  171. package/components/tooltip/tooltip.a2ui.json +0 -10
  172. package/components/tooltip/tooltip.js +2 -2
  173. package/components/tooltip/tooltip.yaml +0 -8
  174. package/components/tree/tree.js +1 -1
  175. package/components/upload/upload.js +1 -1
  176. package/core/markdown.js +1 -1
  177. package/core/provider.js +2 -2
  178. package/package.json +7 -3
  179. package/patterns/a2ui-root/a2ui-root.a2ui.json +118 -0
  180. package/{a2ui/root.js → patterns/a2ui-root/a2ui-root.js} +9 -4
  181. package/patterns/a2ui-root/a2ui-root.yaml +76 -0
  182. package/patterns/adia-chat/adia-chat.js +3 -3
  183. package/patterns/adia-chat/css/adia-chat.streaming.css +2 -2
  184. package/patterns/adia-editor/adia-editor.js +1 -1
  185. package/patterns/app-nav/app-nav.js +1 -1
  186. package/patterns/app-nav-group/app-nav-group.js +2 -2
  187. package/patterns/app-nav-item/app-nav-item.js +1 -1
  188. package/patterns/app-shell/app-shell.js +1 -1
  189. package/patterns/gen-ui/gen-ui.css +3 -3
  190. package/patterns/gen-ui/gen-ui.js +1 -1
  191. package/patterns/index.js +1 -0
  192. package/patterns/section-nav/section-nav.js +1 -1
  193. package/patterns/section-nav-group/section-nav-group.js +1 -1
  194. package/patterns/section-nav-item/section-nav-item.js +1 -1
  195. package/traits/define.js +1 -1
  196. package/a2ui/dockables/action.js +0 -152
  197. package/a2ui/dockables/base.js +0 -30
  198. package/a2ui/dockables/controller.js +0 -97
  199. package/a2ui/dockables/data-source.js +0 -103
  200. package/a2ui/dockables/index.js +0 -6
  201. package/a2ui/dockables/lifecycle.js +0 -84
  202. package/a2ui/dockables/provider.js +0 -59
  203. package/a2ui/manifest-runtime.js +0 -226
  204. package/a2ui/registry.js +0 -200
  205. package/a2ui/renderer.js +0 -361
  206. package/a2ui/stream.js +0 -243
  207. package/a2ui/surface-manifest.js +0 -294
  208. package/a2ui/surface.js +0 -222
  209. package/a2ui/wire-factory.js +0 -134
  210. package/a2ui/wiring-engine.js +0 -209
  211. package/a2ui/wiring-registry.js +0 -342
package/a2ui/index.js CHANGED
@@ -1,19 +1,25 @@
1
- // Tier 1: Render
2
- export { registry, resolveTag, registerType } from './registry.js';
3
- export { A2UIRenderer } from './renderer.js';
4
- export { sseStream, wsStream, mockStream, mcpStream, jsonlStream } from './stream.js';
5
- export { AdiaA2UIRoot } from './root.js';
1
+ /**
2
+ * DEPRECATED the `@adia-ai/web-components/a2ui` subpath.
3
+ *
4
+ * The A2UI runtime was extracted into its own package `@adia-ai/a2ui-utils`
5
+ * in 0.0.3. This file is a temporary re-export shim for one release so
6
+ * existing consumers don't break on upgrade. It will be removed in 0.1.0.
7
+ *
8
+ * Migrate:
9
+ * - import { A2UIRenderer } from '@adia-ai/web-components/a2ui';
10
+ * + import { A2UIRenderer } from '@adia-ai/a2ui-utils';
11
+ *
12
+ * The declarative `<a2ui-root>` custom element also moved — it now lives
13
+ * in the patterns directory. Import it via:
14
+ * import '@adia-ai/web-components/patterns/a2ui-root/a2ui-root.js';
15
+ */
6
16
 
7
- // Tier 2: Wire
8
- export { SurfaceManifest } from './surface-manifest.js';
9
- export { ManifestRuntime } from './manifest-runtime.js';
10
- export { ContextStore } from './context-store.js';
17
+ if (typeof console !== 'undefined' && !globalThis.__a2ui_subpath_warned) {
18
+ globalThis.__a2ui_subpath_warned = true;
19
+ console.warn(
20
+ '[@adia-ai/web-components] The `/a2ui` subpath export is deprecated and will be removed in 0.1.0. ' +
21
+ 'Import from `@adia-ai/a2ui-utils` instead.'
22
+ );
23
+ }
11
24
 
12
- // Tier 3: Gen-UI
13
- export { A2UIValidator } from './validator.js';
14
- export { A2UIGenerator } from './generator.js';
15
- export { savePattern, importPattern, buildPatternJSON } from './pattern-export.js';
16
- export * from './retrieval/index.js';
17
-
18
- // Learning
19
- export { feedbackStore } from './retrieval/feedback-store.js';
25
+ export * from '@adia-ai/a2ui-utils';
@@ -12,7 +12,7 @@
12
12
  * toggle — { detail: { open } }
13
13
  */
14
14
 
15
- import { AdiaElement } from '@core/element.js';
15
+ import { AdiaElement } from '../../core/element.js';
16
16
 
17
17
  // ── Accordion Container ────────────────────────────────────────
18
18
 
@@ -15,7 +15,7 @@
15
15
  * or activated via keyboard (Enter / Space). Keyboard nav: ArrowUp/Down, Home/End.
16
16
  */
17
17
 
18
- import { AdiaElement } from '@core/element.js';
18
+ import { AdiaElement } from '../../core/element.js';
19
19
 
20
20
  class AdiaActionList extends AdiaElement {
21
21
  static properties = {};
@@ -26,7 +26,7 @@
26
26
  * artifact-toggle — detail: { collapsed }
27
27
  */
28
28
 
29
- import { AdiaElement } from '@core/element.js';
29
+ import { AdiaElement } from '../../core/element.js';
30
30
 
31
31
  const TONE_TO_BADGE_VARIANT = {
32
32
  neutral: 'default',
@@ -30,7 +30,7 @@
30
30
  * .reset() clear status, re-enable buttons
31
31
  */
32
32
 
33
- import { AdiaElement } from '@core/element.js';
33
+ import { AdiaElement } from '../../core/element.js';
34
34
 
35
35
  class AdiaAgentFeedbackBar extends AdiaElement {
36
36
  static properties = {
@@ -26,7 +26,7 @@
26
26
  * questions-answer — detail: { selected: string[], option: chosen | null }
27
27
  */
28
28
 
29
- import { AdiaElement } from '@core/element.js';
29
+ import { AdiaElement } from '../../core/element.js';
30
30
 
31
31
  class AdiaAgentQuestions extends AdiaElement {
32
32
  static properties = {
@@ -13,11 +13,6 @@
13
13
  }
14
14
  ],
15
15
  "properties": {
16
- "autocollapse": {
17
- "description": "Auto-collapse after finish().",
18
- "type": "boolean",
19
- "default": true
20
- },
21
16
  "collapsed": {
22
17
  "description": "Start collapsed.",
23
18
  "type": "boolean",
@@ -31,10 +26,21 @@
31
26
  "type": "string",
32
27
  "default": ""
33
28
  },
34
- "mode": {
35
- "description": "compact | expanded",
29
+ "noAutocollapse": {
30
+ "description": "Disable auto-collapse after finish().",
31
+ "type": "boolean",
32
+ "default": false
33
+ },
34
+ "status": {
35
+ "description": "Drives the status icon — idle, active (spinner), done (check), error (warning).",
36
36
  "type": "string",
37
- "default": "compact"
37
+ "enum": [
38
+ "idle",
39
+ "active",
40
+ "done",
41
+ "error"
42
+ ],
43
+ "default": "active"
38
44
  }
39
45
  },
40
46
  "required": [
@@ -149,7 +149,7 @@
149
149
  /* ═══════ Plan — card in content+aside, marker empty ═══════ */
150
150
 
151
151
  [data-reasoning-plan] {
152
- grid-column: content / -1 !important;
152
+ grid-column: content / -1;
153
153
  display: flex;
154
154
  flex-direction: column;
155
155
  gap: var(--a-space-1);
@@ -33,9 +33,9 @@
33
33
  * r.finish('2 iterations · 94/100 · 7s');
34
34
  *
35
35
  * Attributes:
36
- * collapsed — start collapsed
37
- * autocollapse — collapse 1.2s after finish (default: true)
38
- * heading — fallback summary label while active
36
+ * collapsed — start collapsed
37
+ * no-autocollapse disable auto-collapse 1.2s after finish (default: false — auto-collapse on)
38
+ * heading — fallback summary label while active
39
39
  * status — 'idle' | 'active' | 'done' | 'error' (default: 'active')
40
40
  * Drives the status icon: spinner / check-circle / warning-circle
41
41
  *
@@ -45,7 +45,7 @@
45
45
  * reasoning-finish — .finish() was called (detail: { summary, status })
46
46
  */
47
47
 
48
- import { AdiaElement } from '@core/element.js';
48
+ import { AdiaElement } from '../../core/element.js';
49
49
 
50
50
  // Status lifecycle for the reasoning surface as a whole.
51
51
  // active — still thinking (default; renders the spinner)
@@ -56,10 +56,10 @@ const REASONING_STATUSES = new Set(['idle', 'active', 'done', 'error']);
56
56
 
57
57
  class AdiaAgentReasoning extends AdiaElement {
58
58
  static properties = {
59
- collapsed: { type: Boolean, default: false, reflect: true },
60
- autocollapse: { type: Boolean, default: true, reflect: true },
61
- heading: { type: String, default: '', reflect: true },
62
- status: { type: String, default: 'active', reflect: true },
59
+ collapsed: { type: Boolean, default: false, reflect: true },
60
+ noAutocollapse: { type: Boolean, default: false, reflect: true, attribute: 'no-autocollapse' },
61
+ heading: { type: String, default: '', reflect: true },
62
+ status: { type: String, default: 'active', reflect: true },
63
63
  };
64
64
 
65
65
  static template = () => null;
@@ -202,7 +202,7 @@ class AdiaAgentReasoning extends AdiaElement {
202
202
  }));
203
203
 
204
204
  if (this.#finishTimer != null) clearTimeout(this.#finishTimer);
205
- if (this.autocollapse && !isError) {
205
+ if (!this.noAutocollapse && !isError) {
206
206
  this.#finishTimer = setTimeout(() => {
207
207
  this.#finishTimer = null;
208
208
  this.collapsed = true;
@@ -8,10 +8,11 @@ category: agent
8
8
  version: 1
9
9
  description: Agent inner monologue + pipeline viewer with steps, thoughts, plans, and iterations.
10
10
  props:
11
- autocollapse:
12
- description: Auto-collapse after finish().
11
+ noAutocollapse:
12
+ description: Disable auto-collapse after finish().
13
13
  type: boolean
14
- default: true
14
+ default: false
15
+ attribute: no-autocollapse
15
16
  collapsed:
16
17
  description: Start collapsed.
17
18
  type: boolean
@@ -20,10 +21,12 @@ props:
20
21
  description: Fallback summary label.
21
22
  type: string
22
23
  default: ""
23
- mode:
24
- description: compact | expanded
24
+ status:
25
+ description: Drives the status icon — idle, active (spinner), done (check), error (warning).
25
26
  type: string
26
- default: compact
27
+ default: active
28
+ reflect: true
29
+ enum: [idle, active, done, error]
27
30
  events:
28
31
  reasoning-finish:
29
32
  description: "Fired on reasoning-finish."
@@ -24,7 +24,7 @@
24
24
  * suggestion-select — detail: { label, prompt, index }
25
25
  */
26
26
 
27
- import { AdiaElement } from '@core/element.js';
27
+ import { AdiaElement } from '../../core/element.js';
28
28
 
29
29
  class AdiaAgentSuggestions extends AdiaElement {
30
30
  static properties = {
@@ -34,7 +34,7 @@
34
34
  * trace-toggle — summary opened/closed
35
35
  */
36
36
 
37
- import { AdiaElement } from '@core/element.js';
37
+ import { AdiaElement } from '../../core/element.js';
38
38
 
39
39
  class AdiaAgentTrace extends AdiaElement {
40
40
  static properties = {
@@ -11,7 +11,7 @@
11
11
  * close — fired when the user dismisses the alert
12
12
  */
13
13
 
14
- import { AdiaElement } from '@core/element.js';
14
+ import { AdiaElement } from '../../core/element.js';
15
15
 
16
16
  class AdiaAlert extends AdiaElement {
17
17
  static properties = {
@@ -21,11 +21,6 @@
21
21
  "type": "string",
22
22
  "default": ""
23
23
  },
24
- "initials": {
25
- "description": "Explicit initials override. When set, takes precedence over `name`.",
26
- "type": "string",
27
- "default": ""
28
- },
29
24
  "name": {
30
25
  "description": "User name for initials (first letter of each word, max 2).",
31
26
  "type": "string",
@@ -65,11 +60,6 @@
65
60
  "description": "Display name (for initials)",
66
61
  "type": "string",
67
62
  "default": ""
68
- },
69
- "variant": {
70
- "description": "Color/emphasis variant for the placeholder background + initials foreground.",
71
- "type": "string",
72
- "default": "default"
73
63
  }
74
64
  },
75
65
  "required": [
@@ -120,7 +120,7 @@
120
120
  /* Hover: pop single avatar */
121
121
  :scope > avatar-ui:hover {
122
122
  transform: translateY(-2px) scale(1.05);
123
- z-index: 99 !important;
123
+ z-index: 99;
124
124
  }
125
125
 
126
126
  /* Group hover: spread apart */
@@ -13,7 +13,7 @@
13
13
  * Overlapping avatar stack with +N overflow counter.
14
14
  */
15
15
 
16
- import { AdiaElement } from '@core/element.js';
16
+ import { AdiaElement } from '../../core/element.js';
17
17
 
18
18
  // ── Avatar ──────────────────────────────────────────────────
19
19
 
@@ -12,10 +12,6 @@ props:
12
12
  description: User name for initials (first letter of each word, max 2).
13
13
  type: string
14
14
  default: ""
15
- initials:
16
- description: Explicit initials override. When set, takes precedence over `name`.
17
- type: string
18
- default: ""
19
15
  icon:
20
16
  description: Phosphor icon name shown instead of initials when `src`/`name` are empty.
21
17
  type: string
@@ -27,10 +23,6 @@ props:
27
23
  enum:
28
24
  - circle
29
25
  - square
30
- variant:
31
- description: Color/emphasis variant for the placeholder background + initials foreground.
32
- type: string
33
- default: default
34
26
  size:
35
27
  description: >-
36
28
  Avatar size. Canonical scale (xs/sm/md/lg/xl); long-form aliases
@@ -34,14 +34,14 @@
34
34
  "default": "md"
35
35
  },
36
36
  "status": {
37
- "description": "Semantic status shorthand. Auto-maps to variant and sets text.",
37
+ "description": "Semantic status shorthand. Auto-maps to variant and sets text. `new` → success \"New\"; `updated` → info \"Updated\"; `deprecated` → warning \"Deprecated\"; `removed` → danger \"Removed\"; `beta` → accent \"Beta\". Use `variant` + `text` directly for custom chips.",
38
38
  "type": "string",
39
39
  "enum": [
40
- "New",
41
- "Updated",
42
- "Deprecated",
43
- "Removed",
44
- "Beta"
40
+ "new",
41
+ "updated",
42
+ "deprecated",
43
+ "removed",
44
+ "beta"
45
45
  ],
46
46
  "default": ""
47
47
  },
@@ -2,6 +2,7 @@
2
2
  * <badge-ui text="New" variant="accent"></badge-ui>
3
3
  * <badge-ui text="3" variant="danger" size="sm"></badge-ui>
4
4
  * <badge-ui text="Organic" variant="accent" icon="dot"></badge-ui> ← chart legend chip
5
+ * <badge-ui status="beta"></badge-ui> ← status shorthand
5
6
  *
6
7
  * Inline badge / tag. Pill-shaped, text rendered via CSS attr().
7
8
  *
@@ -10,9 +11,18 @@
10
11
  * Icon: optional leading icon (any registered icon name; "dot" for legend
11
12
  * markers). Inherits the variant's foreground color so legend chips
12
13
  * read as a single visual unit instead of icon + label collage.
14
+ * Status: semantic shorthand that auto-maps variant + text.
13
15
  */
14
16
 
15
- import { AdiaElement } from '@core/element.js';
17
+ import { AdiaElement } from '../../core/element.js';
18
+
19
+ const STATUS_MAP = {
20
+ new: { variant: 'success', text: 'New' },
21
+ updated: { variant: 'info', text: 'Updated' },
22
+ deprecated: { variant: 'warning', text: 'Deprecated' },
23
+ removed: { variant: 'danger', text: 'Removed' },
24
+ beta: { variant: 'accent', text: 'Beta' },
25
+ };
16
26
 
17
27
  class AdiaBadge extends AdiaElement {
18
28
  static properties = {
@@ -20,6 +30,7 @@ class AdiaBadge extends AdiaElement {
20
30
  variant: { type: String, default: 'default', reflect: true },
21
31
  size: { type: String, default: 'md', reflect: true },
22
32
  icon: { type: String, default: '', reflect: true },
33
+ status: { type: String, default: '', reflect: true },
23
34
  };
24
35
 
25
36
  static template = () => null;
@@ -29,6 +40,16 @@ class AdiaBadge extends AdiaElement {
29
40
  }
30
41
 
31
42
  render() {
43
+ // Status shorthand wins over explicit variant/text while it's set —
44
+ // mixing is unsupported. Converges in one extra render pass.
45
+ if (this.status) {
46
+ const entry = STATUS_MAP[this.status];
47
+ if (entry) {
48
+ if (this.variant !== entry.variant) this.variant = entry.variant;
49
+ if (this.text !== entry.text) this.text = entry.text;
50
+ }
51
+ }
52
+
32
53
  if (this.text) this.setAttribute('aria-label', this.text);
33
54
 
34
55
  // Stamp / update the leading icon. Pattern mirrors button-ui so the same
@@ -25,14 +25,17 @@ props:
25
25
  - xl
26
26
  status:
27
27
  description: Semantic status shorthand. Auto-maps to variant and sets text.
28
+ `new` → success "New"; `updated` → info "Updated"; `deprecated` → warning
29
+ "Deprecated"; `removed` → danger "Removed"; `beta` → accent "Beta".
30
+ Use `variant` + `text` directly for custom chips.
28
31
  type: string
29
32
  default: ""
30
33
  enum:
31
- - New
32
- - Updated
33
- - Deprecated
34
- - Removed
35
- - Beta
34
+ - new
35
+ - updated
36
+ - deprecated
37
+ - removed
38
+ - beta
36
39
  text:
37
40
  description: Badge text content. Falls back to existing textContent.
38
41
  type: string
@@ -8,7 +8,7 @@
8
8
  * margin — none | xs | sm | md | lg | xl (default 'none')
9
9
  */
10
10
 
11
- import { AdiaElement } from '@core/element.js';
11
+ import { AdiaElement } from '../../core/element.js';
12
12
 
13
13
  class AdiaBlock extends AdiaElement {
14
14
  static properties = {
@@ -1,4 +1,4 @@
1
- import { AdiaElement } from '@core/element.js';
1
+ import { AdiaElement } from '../../core/element.js';
2
2
 
3
3
  class AdiaBreadcrumb extends AdiaElement {
4
4
  static properties = {
@@ -18,11 +18,6 @@
18
18
  "type": "string",
19
19
  "default": "button"
20
20
  },
21
- "active": {
22
- "description": "Indicates an active/pressed toggle state (for group-buttons and segmented controls).",
23
- "type": "boolean",
24
- "default": false
25
- },
26
21
  "component": {
27
22
  "const": "Button"
28
23
  },
@@ -36,11 +31,6 @@
36
31
  "type": "string",
37
32
  "default": ""
38
33
  },
39
- "iconRight": {
40
- "description": "Trailing Phosphor icon name (rendered after text).",
41
- "type": "string",
42
- "default": ""
43
- },
44
34
  "size": {
45
35
  "description": "Sizing scale (xs/sm/md/lg/xl).",
46
36
  "type": "string",
@@ -70,7 +60,6 @@
70
60
  "default",
71
61
  "solid",
72
62
  "outline",
73
- "outlined",
74
63
  "ghost",
75
64
  "danger",
76
65
  "primary",
@@ -13,7 +13,7 @@
13
13
  --button-fg-hover: var(--a-ui-text-hover);
14
14
  --button-border-hover: transparent;
15
15
  --button-bg-primary: var(--a-primary);
16
- --button-fg-primary: white;
16
+ --button-fg-primary: var(--a-chrome-light);
17
17
  --button-bg-outline: transparent;
18
18
  --button-fg-outline: var(--a-fg);
19
19
  --button-border-outline: var(--a-ui-border);
@@ -1,5 +1,5 @@
1
- import { AdiaElement, signal, html } from '@core/element.js';
2
- import { getIcon } from '@core/icons.js';
1
+ import { AdiaElement, signal, html } from '../../core/element.js';
2
+ import { getIcon } from '../../core/icons.js';
3
3
 
4
4
  class AdiaButton extends AdiaElement {
5
5
  static properties = {
@@ -37,7 +37,7 @@ class AdiaButton extends AdiaElement {
37
37
  #onClick = (e) => {
38
38
  if (this.disabled) { e.stopPropagation(); return; }
39
39
  if (this.type === 'submit') {
40
- const form = this.closest('form, form-container-n');
40
+ const form = this.closest('form');
41
41
  if (form?.requestSubmit) form.requestSubmit();
42
42
  }
43
43
  this.dispatchEvent(new Event('press', { bubbles: true }));
@@ -12,11 +12,6 @@ props:
12
12
  description: HTML button type (button, submit, reset)
13
13
  type: string
14
14
  default: button
15
- active:
16
- description: Indicates an active/pressed toggle state (for group-buttons and segmented controls).
17
- type: boolean
18
- default: false
19
- reflect: true
20
15
  stretch:
21
16
  description: "Makes the button stretch to fill the parent's width"
22
17
  type: boolean
@@ -31,11 +26,6 @@ props:
31
26
  description: Leading Phosphor icon name (rendered before text).
32
27
  type: string
33
28
  default: ""
34
- iconRight:
35
- description: Trailing Phosphor icon name (rendered after text).
36
- type: string
37
- default: ""
38
- attribute: icon-right
39
29
  size:
40
30
  description: "Sizing scale (xs/sm/md/lg/xl)."
41
31
  type: string
@@ -58,7 +48,6 @@ props:
58
48
  - default
59
49
  - solid
60
50
  - outline
61
- - outlined
62
51
  - ghost
63
52
  - danger
64
53
  - primary
@@ -15,8 +15,8 @@
15
15
  * Keyboard: Arrow keys navigate days, Enter selects, Escape closes.
16
16
  */
17
17
 
18
- import { AdiaFormElement } from '@core/form.js';
19
- import { anchorPopover } from '@core/anchor.js';
18
+ import { AdiaFormElement } from '../../core/form.js';
19
+ import { anchorPopover } from '../../core/anchor.js';
20
20
 
21
21
  const DAYS = ['S', 'M', 'T', 'W', 'T', 'F', 'S'];
22
22
  const MONTHS_SHORT = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
@@ -58,6 +58,18 @@ class AdiaCalendarPicker extends AdiaFormElement {
58
58
  #viewYear = new Date().getFullYear();
59
59
  #viewMonth = new Date().getMonth();
60
60
  #focusedDay = null;
61
+ #popoverClickBound = false;
62
+
63
+ #onPopoverClick = (e) => {
64
+ const target = e.target instanceof Element ? e.target : null;
65
+ if (!target) return;
66
+ const prev = target.closest('[data-cal-prev]');
67
+ if (prev) { e.stopPropagation(); this.#navigate(-1); return; }
68
+ const next = target.closest('[data-cal-next]');
69
+ if (next) { e.stopPropagation(); this.#navigate(1); return; }
70
+ const day = target.closest('[data-cal-day][data-date]:not([disabled])');
71
+ if (day) { e.stopPropagation(); this.#selectDate(day.dataset.date); }
72
+ };
61
73
 
62
74
  connected() {
63
75
  super.connected();
@@ -88,6 +100,8 @@ class AdiaCalendarPicker extends AdiaFormElement {
88
100
  this.#popover.setAttribute('slot', 'popover');
89
101
  this.#popover.setAttribute('popover', 'manual');
90
102
  this.appendChild(this.#popover);
103
+ this.#popover.addEventListener('click', this.#onPopoverClick);
104
+ this.#popoverClickBound = true;
91
105
  } else {
92
106
  const display = this.querySelector('[slot="display"]');
93
107
  if (display) display.textContent = this.#displayText();
@@ -95,6 +109,10 @@ class AdiaCalendarPicker extends AdiaFormElement {
95
109
 
96
110
  if (!this.#popover) this.#popover = this.querySelector('[slot="popover"]');
97
111
  if (!this.#trigger) this.#trigger = this.querySelector('[slot="trigger"]');
112
+ if (this.#popover && !this.#popoverClickBound) {
113
+ this.#popover.addEventListener('click', this.#onPopoverClick);
114
+ this.#popoverClickBound = true;
115
+ }
98
116
 
99
117
  // Toggle popover
100
118
  if (this.open) {
@@ -195,23 +213,7 @@ class AdiaCalendarPicker extends AdiaFormElement {
195
213
  h += '</div>';
196
214
 
197
215
  this.#popover.innerHTML = h;
198
-
199
- // Wire events
200
- this.#popover.querySelector('[data-cal-prev]')?.addEventListener('click', (e) => {
201
- e.stopPropagation();
202
- this.#navigate(-1);
203
- });
204
- this.#popover.querySelector('[data-cal-next]')?.addEventListener('click', (e) => {
205
- e.stopPropagation();
206
- this.#navigate(1);
207
- });
208
-
209
- for (const btn of this.#popover.querySelectorAll('[data-cal-day][data-date]:not([disabled])')) {
210
- btn.addEventListener('click', (e) => {
211
- e.stopPropagation();
212
- this.#selectDate(btn.dataset.date);
213
- });
214
- }
216
+ // Events are delegated on #popover (see #onPopoverClick) — no per-element wiring.
215
217
  }
216
218
 
217
219
  #navigate(delta) {
@@ -312,6 +314,10 @@ class AdiaCalendarPicker extends AdiaFormElement {
312
314
  this.removeEventListener('click', this.#onClick);
313
315
  this.removeEventListener('keydown', this.#onKey);
314
316
  document.removeEventListener('pointerdown', this.#onOutside);
317
+ if (this.#popover && this.#popoverClickBound) {
318
+ this.#popover.removeEventListener('click', this.#onPopoverClick);
319
+ }
320
+ this.#popoverClickBound = false;
315
321
  this.#anchorCleanup?.();
316
322
  this.#anchorCleanup = null;
317
323
  this.#popover?.hidePopover?.();
@@ -1,5 +1,5 @@
1
- import { AdiaElement } from '@core/element.js';
2
- import '../../a2ui/root.js';
1
+ import { AdiaElement } from '../../core/element.js';
2
+ import '../../patterns/a2ui-root/a2ui-root.js';
3
3
 
4
4
  /**
5
5
  * <canvas-ui> — A2UI rendering surface.
@@ -89,7 +89,7 @@ export class AdiaCanvas extends AdiaElement {
89
89
  this.#rootEl = document.createElement('a2ui-root');
90
90
 
91
91
  if (this.theme) {
92
- const themeEl = document.createElement('theme-n');
92
+ const themeEl = document.createElement('theme-ui');
93
93
  themeEl.setAttribute('preset', this.theme);
94
94
  themeEl.appendChild(this.#rootEl);
95
95
  this.#rootContainer.appendChild(themeEl);