@adia-ai/web-components 0.4.7 → 0.4.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +39 -0
- package/USAGE.md +255 -2
- package/components/accordion/accordion.a2ui.json +3 -0
- package/components/accordion/accordion.d.ts +12 -2
- package/components/accordion/accordion.yaml +4 -0
- package/components/action-list/action-list.a2ui.json +18 -1
- package/components/action-list/action-list.d.ts +21 -2
- package/components/action-list/action-list.yaml +14 -0
- package/components/agent-artifact/agent-artifact.a2ui.json +11 -1
- package/components/agent-artifact/agent-artifact.d.ts +17 -2
- package/components/agent-artifact/agent-artifact.yaml +9 -0
- package/components/agent-feedback-bar/agent-feedback-bar.a2ui.json +10 -1
- package/components/agent-feedback-bar/agent-feedback-bar.d.ts +19 -2
- package/components/agent-feedback-bar/agent-feedback-bar.yaml +8 -0
- package/components/agent-questions/agent-questions.a2ui.json +14 -1
- package/components/agent-questions/agent-questions.d.ts +19 -2
- package/components/agent-questions/agent-questions.yaml +11 -0
- package/components/agent-reasoning/agent-reasoning.a2ui.json +29 -3
- package/components/agent-reasoning/agent-reasoning.d.ts +33 -2
- package/components/agent-reasoning/agent-reasoning.yaml +20 -0
- package/components/agent-suggestions/agent-suggestions.a2ui.json +18 -1
- package/components/agent-suggestions/agent-suggestions.d.ts +21 -2
- package/components/agent-suggestions/agent-suggestions.yaml +14 -0
- package/components/agent-trace/agent-trace.a2ui.json +8 -1
- package/components/agent-trace/agent-trace.d.ts +17 -2
- package/components/agent-trace/agent-trace.yaml +4 -0
- package/components/alert/alert.a2ui.json +1 -0
- package/components/alert/alert.d.ts +12 -2
- package/components/aside/aside.a2ui.json +1 -0
- package/components/avatar/avatar.a2ui.json +3 -0
- package/components/avatar/avatar.d.ts +3 -2
- package/components/avatar/avatar.yaml +4 -0
- package/components/badge/badge.a2ui.json +3 -0
- package/components/badge/badge.d.ts +3 -2
- package/components/badge/badge.yaml +4 -0
- package/components/block/block.a2ui.json +1 -0
- package/components/block/block.d.ts +3 -2
- package/components/breadcrumb/breadcrumb.a2ui.json +5 -0
- package/components/breadcrumb/breadcrumb.d.ts +3 -2
- package/components/breadcrumb/breadcrumb.yaml +6 -0
- package/components/button/button.a2ui.json +3 -0
- package/components/button/button.d.ts +12 -2
- package/components/button/button.yaml +5 -0
- package/components/calendar-picker/calendar-picker.a2ui.json +1 -0
- package/components/canvas/canvas.a2ui.json +1 -0
- package/components/canvas/canvas.d.ts +18 -2
- package/components/canvas/canvas.yaml +12 -0
- package/components/card/card.a2ui.json +1 -0
- package/components/card/card.d.ts +12 -2
- package/components/chart/chart.a2ui.json +4 -0
- package/components/chart/chart.d.ts +18 -2
- package/components/chart/chart.yaml +5 -0
- package/components/chart-legend/chart-legend.a2ui.json +19 -1
- package/components/chart-legend/chart-legend.d.ts +21 -2
- package/components/chart-legend/chart-legend.yaml +15 -0
- package/components/chat-thread/chat-thread.a2ui.json +12 -1
- package/components/chat-thread/chat-thread.d.ts +19 -2
- package/components/chat-thread/chat-thread.yaml +7 -0
- package/components/check/check.a2ui.json +1 -0
- package/components/code/code.a2ui.json +37 -7
- package/components/code/code.d.ts +30 -0
- package/components/code/code.yaml +29 -6
- package/components/col/col.a2ui.json +1 -0
- package/components/col/col.d.ts +3 -2
- package/components/color-picker/class.js +59 -1
- package/components/color-picker/color-picker.a2ui.json +37 -0
- package/components/color-picker/color-picker.d.ts +70 -8
- package/components/color-picker/color-picker.yaml +53 -0
- package/components/command/command.a2ui.json +12 -1
- package/components/command/command.d.ts +21 -2
- package/components/command/command.yaml +7 -0
- package/components/demo-toggle/demo-toggle.a2ui.json +8 -1
- package/components/demo-toggle/demo-toggle.d.ts +17 -2
- package/components/demo-toggle/demo-toggle.yaml +4 -0
- package/components/description-list/description-list.a2ui.json +1 -0
- package/components/description-list/description-list.d.ts +3 -2
- package/components/divider/divider.a2ui.json +1 -0
- package/components/divider/divider.d.ts +3 -2
- package/components/drawer/drawer.a2ui.json +1 -0
- package/components/drawer/drawer.d.ts +12 -2
- package/components/embed/embed.a2ui.json +1 -0
- package/components/embed/embed.d.ts +3 -2
- package/components/empty-state/empty-state.a2ui.json +3 -0
- package/components/empty-state/empty-state.d.ts +3 -2
- package/components/empty-state/empty-state.yaml +4 -0
- package/components/feed/feed.a2ui.json +9 -1
- package/components/feed/feed.d.ts +12 -2
- package/components/feed/feed.yaml +8 -1
- package/components/field/field.a2ui.json +1 -0
- package/components/field/field.d.ts +3 -2
- package/components/fields/fields.a2ui.json +1 -0
- package/components/fields/fields.d.ts +3 -2
- package/components/footer/footer.a2ui.json +1 -0
- package/components/grid/grid.a2ui.json +1 -0
- package/components/grid/grid.d.ts +3 -2
- package/components/header/header.a2ui.json +1 -0
- package/components/heatmap/heatmap.a2ui.json +12 -2
- package/components/heatmap/heatmap.d.ts +20 -2
- package/components/heatmap/heatmap.yaml +17 -2
- package/components/icon/icon.a2ui.json +1 -0
- package/components/icon/icon.d.ts +3 -2
- package/components/image/image.a2ui.json +3 -0
- package/components/image/image.d.ts +3 -2
- package/components/image/image.yaml +4 -0
- package/components/index.js +8 -0
- package/components/input/input.a2ui.json +4 -0
- package/components/input/input.yaml +6 -0
- package/components/inspector/inspector.a2ui.json +5 -0
- package/components/inspector/inspector.d.ts +3 -2
- package/components/inspector/inspector.yaml +6 -0
- package/components/kbd/kbd.a2ui.json +1 -0
- package/components/kbd/kbd.d.ts +3 -2
- package/components/link/link.a2ui.json +12 -1
- package/components/link/link.d.ts +19 -2
- package/components/link/link.yaml +7 -0
- package/components/list/list.a2ui.json +14 -1
- package/components/list/list.d.ts +19 -2
- package/components/list/list.yaml +11 -0
- package/components/menu/menu.a2ui.json +14 -1
- package/components/menu/menu.d.ts +19 -2
- package/components/menu/menu.yaml +11 -0
- package/components/modal/modal.a2ui.json +1 -0
- package/components/modal/modal.d.ts +12 -2
- package/components/nav/nav.a2ui.json +16 -1
- package/components/nav/nav.d.ts +21 -2
- package/components/nav/nav.yaml +10 -0
- package/components/nav-group/nav-group.a2ui.json +12 -1
- package/components/nav-group/nav-group.d.ts +19 -2
- package/components/nav-group/nav-group.yaml +7 -0
- package/components/nav-item/nav-item.a2ui.json +16 -1
- package/components/nav-item/nav-item.d.ts +21 -2
- package/components/nav-item/nav-item.yaml +10 -0
- package/components/noodles/noodles.a2ui.json +47 -2
- package/components/noodles/noodles.d.ts +42 -2
- package/components/noodles/noodles.yaml +32 -0
- package/components/option-card/option-card.a2ui.json +3 -0
- package/components/option-card/option-card.yaml +4 -0
- package/components/otp-input/otp-input.a2ui.json +15 -2
- package/components/otp-input/otp-input.d.ts +11 -0
- package/components/otp-input/otp-input.yaml +10 -2
- package/components/page/page.a2ui.json +1 -0
- package/components/page/page.d.ts +3 -2
- package/components/pagination/pagination.a2ui.json +8 -1
- package/components/pagination/pagination.d.ts +17 -2
- package/components/pagination/pagination.yaml +4 -0
- package/components/pane/pane.a2ui.json +8 -1
- package/components/pane/pane.d.ts +12 -2
- package/components/pane/pane.yaml +7 -1
- package/components/pipeline-status/pipeline-status.a2ui.json +1 -0
- package/components/pipeline-status/pipeline-status.d.ts +3 -2
- package/components/popover/popover.a2ui.json +1 -0
- package/components/popover/popover.d.ts +3 -2
- package/components/progress/progress.a2ui.json +1 -0
- package/components/progress/progress.d.ts +3 -2
- package/components/progress-row/progress-row.a2ui.json +3 -0
- package/components/progress-row/progress-row.d.ts +3 -2
- package/components/progress-row/progress-row.yaml +4 -0
- package/components/radio/radio.a2ui.json +1 -0
- package/components/range/range.a2ui.json +1 -0
- package/components/rating/rating.a2ui.json +1 -0
- package/components/richtext/richtext.a2ui.json +1 -0
- package/components/richtext/richtext.d.ts +3 -2
- package/components/row/row.a2ui.json +1 -0
- package/components/row/row.d.ts +12 -2
- package/components/search/search.a2ui.json +1 -0
- package/components/section/section.a2ui.json +1 -0
- package/components/segment/segment.a2ui.json +3 -0
- package/components/segment/segment.d.ts +3 -2
- package/components/segment/segment.yaml +4 -0
- package/components/segmented/segmented.a2ui.json +1 -0
- package/components/select/select.a2ui.json +3 -0
- package/components/select/select.yaml +4 -0
- package/components/skeleton/skeleton.a2ui.json +1 -0
- package/components/skeleton/skeleton.d.ts +3 -2
- package/components/slider/slider.a2ui.json +1 -0
- package/components/stack/stack.a2ui.json +1 -0
- package/components/stack/stack.d.ts +3 -2
- package/components/stat/stat.a2ui.json +1 -0
- package/components/step-progress/step-progress.a2ui.json +1 -0
- package/components/step-progress/step-progress.d.ts +3 -2
- package/components/stepper/stepper.a2ui.json +3 -0
- package/components/stepper/stepper.d.ts +3 -2
- package/components/stepper/stepper.yaml +4 -0
- package/components/stream/stream.a2ui.json +8 -1
- package/components/stream/stream.d.ts +21 -2
- package/components/stream/stream.yaml +4 -0
- package/components/swatch/class.js +362 -15
- package/components/swatch/swatch.a2ui.json +69 -1
- package/components/swatch/swatch.css +150 -0
- package/components/swatch/swatch.d.ts +46 -2
- package/components/swatch/swatch.yaml +67 -1
- package/components/swiper/swiper.a2ui.json +21 -2
- package/components/swiper/swiper.d.ts +28 -2
- package/components/swiper/swiper.yaml +15 -0
- package/components/switch/switch.a2ui.json +1 -0
- package/components/table/table.a2ui.json +87 -5
- package/components/table/table.d.ts +73 -2
- package/components/table/table.yaml +62 -2
- package/components/table-toolbar/table-toolbar.a2ui.json +12 -0
- package/components/table-toolbar/table-toolbar.d.ts +18 -2
- package/components/table-toolbar/table-toolbar.yaml +13 -0
- package/components/tabs/tabs.a2ui.json +10 -1
- package/components/tabs/tabs.d.ts +17 -2
- package/components/tabs/tabs.yaml +8 -0
- package/components/tag/tag.a2ui.json +12 -1
- package/components/tag/tag.d.ts +19 -2
- package/components/tag/tag.yaml +7 -0
- package/components/text/text.a2ui.json +1 -0
- package/components/text/text.d.ts +3 -2
- package/components/textarea/textarea.a2ui.json +1 -0
- package/components/timeline/timeline.a2ui.json +14 -1
- package/components/timeline/timeline.d.ts +17 -2
- package/components/timeline/timeline.yaml +11 -1
- package/components/toast/toast.a2ui.json +1 -0
- package/components/toast/toast.d.ts +12 -2
- package/components/toggle-group/toggle-group.a2ui.json +8 -1
- package/components/toggle-group/toggle-group.d.ts +17 -2
- package/components/toggle-group/toggle-group.yaml +4 -0
- package/components/toggle-scheme/toggle-scheme.a2ui.json +14 -1
- package/components/toggle-scheme/toggle-scheme.d.ts +19 -2
- package/components/toggle-scheme/toggle-scheme.yaml +11 -0
- package/components/toolbar/toolbar.a2ui.json +3 -0
- package/components/toolbar/toolbar.d.ts +3 -2
- package/components/toolbar/toolbar.yaml +4 -0
- package/components/tooltip/tooltip.a2ui.json +1 -0
- package/components/tooltip/tooltip.d.ts +3 -2
- package/components/tree/tree.a2ui.json +18 -1
- package/components/tree/tree.d.ts +21 -2
- package/components/tree/tree.yaml +14 -0
- package/components/upload/upload.a2ui.json +1 -0
- package/core/icons-phosphor.js +93 -0
- package/core/icons.js +92 -90
- package/core/index.js +5 -0
- package/index.d.ts +87 -79
- package/index.js +7 -0
- package/package.json +3 -2
|
@@ -5,12 +5,22 @@
|
|
|
5
5
|
*
|
|
6
6
|
* Type declarations generated by scripts/build/dts-codegen.mjs from
|
|
7
7
|
* the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
|
|
8
|
-
* run `npm run components`, then `npm run codegen:dts` to
|
|
9
|
-
* or hand-author this file fully if rich event types are
|
|
8
|
+
* run `npm run build:components`, then `npm run codegen:dts` to
|
|
9
|
+
* regenerate; or hand-author this file fully if rich event types are
|
|
10
|
+
* needed beyond what the yaml `events:` block can express.
|
|
10
11
|
*/
|
|
11
12
|
|
|
12
13
|
import { UIElement } from '../../core/element.js';
|
|
13
14
|
|
|
15
|
+
export interface AgentQuestionsQuestionsAnswerEventDetail {
|
|
16
|
+
/** The full selected option object. */
|
|
17
|
+
option: Record<string, unknown>;
|
|
18
|
+
/** Array of selected option IDs. */
|
|
19
|
+
selected: unknown[];
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export type AgentQuestionsQuestionsAnswerEvent = CustomEvent<AgentQuestionsQuestionsAnswerEventDetail>;
|
|
23
|
+
|
|
14
24
|
export class UIAgentQuestions extends UIElement {
|
|
15
25
|
/** Helper text. */
|
|
16
26
|
helper: string;
|
|
@@ -20,4 +30,11 @@ export class UIAgentQuestions extends UIElement {
|
|
|
20
30
|
question: string;
|
|
21
31
|
/** Submit button label (multi mode). */
|
|
22
32
|
submitLabel: string;
|
|
33
|
+
|
|
34
|
+
addEventListener<K extends keyof HTMLElementEventMap>(
|
|
35
|
+
type: K,
|
|
36
|
+
listener: (this: UIAgentQuestions, ev: HTMLElementEventMap[K]) => unknown,
|
|
37
|
+
options?: boolean | AddEventListenerOptions,
|
|
38
|
+
): void;
|
|
39
|
+
addEventListener(type: 'questions-answer', listener: (ev: AgentQuestionsQuestionsAnswerEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
23
40
|
}
|
|
@@ -7,6 +7,10 @@ component: AgentQuestions
|
|
|
7
7
|
category: agent
|
|
8
8
|
version: 1
|
|
9
9
|
description: Multi-choice clarifying-question cards.
|
|
10
|
+
# Per ADR-0027 — primitives that programmatically create other primitives
|
|
11
|
+
# do NOT auto-import them. Consumer (or demo shell) must explicitly import.
|
|
12
|
+
composes:
|
|
13
|
+
- button-ui
|
|
10
14
|
props:
|
|
11
15
|
helper:
|
|
12
16
|
description: Helper text.
|
|
@@ -28,6 +32,13 @@ props:
|
|
|
28
32
|
events:
|
|
29
33
|
questions-answer:
|
|
30
34
|
description: "Fired on questions-answer."
|
|
35
|
+
detail:
|
|
36
|
+
selected:
|
|
37
|
+
type: array
|
|
38
|
+
description: Array of selected option IDs.
|
|
39
|
+
option:
|
|
40
|
+
type: object
|
|
41
|
+
description: The full selected option object.
|
|
31
42
|
slots:
|
|
32
43
|
default:
|
|
33
44
|
description: "Default slot — primary child content."
|
|
@@ -50,15 +50,41 @@
|
|
|
50
50
|
"x-adiaui": {
|
|
51
51
|
"anti_patterns": [],
|
|
52
52
|
"category": "agent",
|
|
53
|
+
"composes": [
|
|
54
|
+
"timeline-ui",
|
|
55
|
+
"timeline-item-ui"
|
|
56
|
+
],
|
|
53
57
|
"events": {
|
|
54
58
|
"reasoning-finish": {
|
|
55
|
-
"description": "Fired on reasoning-finish."
|
|
59
|
+
"description": "Fired on reasoning-finish.",
|
|
60
|
+
"detail": {
|
|
61
|
+
"status": {
|
|
62
|
+
"description": "Whether reasoning was resolved.",
|
|
63
|
+
"type": "boolean"
|
|
64
|
+
},
|
|
65
|
+
"summary": {
|
|
66
|
+
"description": "Summary label text rendered after finish.",
|
|
67
|
+
"type": "string"
|
|
68
|
+
}
|
|
69
|
+
}
|
|
56
70
|
},
|
|
57
71
|
"reasoning-step-toggle": {
|
|
58
|
-
"description": "Fired on reasoning-step-toggle."
|
|
72
|
+
"description": "Fired on reasoning-step-toggle.",
|
|
73
|
+
"detail": {
|
|
74
|
+
"stepId": {
|
|
75
|
+
"description": "ID of the toggled reasoning step (matches data-step-id).",
|
|
76
|
+
"type": "string"
|
|
77
|
+
}
|
|
78
|
+
}
|
|
59
79
|
},
|
|
60
80
|
"reasoning-toggle": {
|
|
61
|
-
"description": "Fired on reasoning-toggle."
|
|
81
|
+
"description": "Fired on reasoning-toggle.",
|
|
82
|
+
"detail": {
|
|
83
|
+
"collapsed": {
|
|
84
|
+
"description": "Whether the reasoning section is now collapsed.",
|
|
85
|
+
"type": "boolean"
|
|
86
|
+
}
|
|
87
|
+
}
|
|
62
88
|
}
|
|
63
89
|
},
|
|
64
90
|
"examples": [
|
|
@@ -5,12 +5,34 @@
|
|
|
5
5
|
*
|
|
6
6
|
* Type declarations generated by scripts/build/dts-codegen.mjs from
|
|
7
7
|
* the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
|
|
8
|
-
* run `npm run components`, then `npm run codegen:dts` to
|
|
9
|
-
* or hand-author this file fully if rich event types are
|
|
8
|
+
* run `npm run build:components`, then `npm run codegen:dts` to
|
|
9
|
+
* regenerate; or hand-author this file fully if rich event types are
|
|
10
|
+
* needed beyond what the yaml `events:` block can express.
|
|
10
11
|
*/
|
|
11
12
|
|
|
12
13
|
import { UIElement } from '../../core/element.js';
|
|
13
14
|
|
|
15
|
+
export interface AgentReasoningReasoningFinishEventDetail {
|
|
16
|
+
/** Whether reasoning was resolved. */
|
|
17
|
+
status: boolean;
|
|
18
|
+
/** Summary label text rendered after finish. */
|
|
19
|
+
summary: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export type AgentReasoningReasoningFinishEvent = CustomEvent<AgentReasoningReasoningFinishEventDetail>;
|
|
23
|
+
export interface AgentReasoningReasoningStepToggleEventDetail {
|
|
24
|
+
/** ID of the toggled reasoning step (matches data-step-id). */
|
|
25
|
+
stepId: string;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export type AgentReasoningReasoningStepToggleEvent = CustomEvent<AgentReasoningReasoningStepToggleEventDetail>;
|
|
29
|
+
export interface AgentReasoningReasoningToggleEventDetail {
|
|
30
|
+
/** Whether the reasoning section is now collapsed. */
|
|
31
|
+
collapsed: boolean;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export type AgentReasoningReasoningToggleEvent = CustomEvent<AgentReasoningReasoningToggleEventDetail>;
|
|
35
|
+
|
|
14
36
|
export class UIAgentReasoning extends UIElement {
|
|
15
37
|
/** Start collapsed. */
|
|
16
38
|
collapsed: boolean;
|
|
@@ -20,4 +42,13 @@ export class UIAgentReasoning extends UIElement {
|
|
|
20
42
|
noAutocollapse: boolean;
|
|
21
43
|
/** Drives the status icon — idle, active (spinner), done (check), error (warning). */
|
|
22
44
|
status: 'idle' | 'active' | 'done' | 'error';
|
|
45
|
+
|
|
46
|
+
addEventListener<K extends keyof HTMLElementEventMap>(
|
|
47
|
+
type: K,
|
|
48
|
+
listener: (this: UIAgentReasoning, ev: HTMLElementEventMap[K]) => unknown,
|
|
49
|
+
options?: boolean | AddEventListenerOptions,
|
|
50
|
+
): void;
|
|
51
|
+
addEventListener(type: 'reasoning-finish', listener: (ev: AgentReasoningReasoningFinishEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
52
|
+
addEventListener(type: 'reasoning-step-toggle', listener: (ev: AgentReasoningReasoningStepToggleEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
53
|
+
addEventListener(type: 'reasoning-toggle', listener: (ev: AgentReasoningReasoningToggleEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
23
54
|
}
|
|
@@ -7,6 +7,11 @@ component: AgentReasoning
|
|
|
7
7
|
category: agent
|
|
8
8
|
version: 1
|
|
9
9
|
description: Agent inner monologue + pipeline viewer with steps, thoughts, plans, and iterations.
|
|
10
|
+
# Per ADR-0027 — primitives that programmatically create other primitives
|
|
11
|
+
# do NOT auto-import them. Consumer (or demo shell) must explicitly import.
|
|
12
|
+
composes:
|
|
13
|
+
- timeline-ui
|
|
14
|
+
- timeline-item-ui
|
|
10
15
|
props:
|
|
11
16
|
noAutocollapse:
|
|
12
17
|
description: Disable auto-collapse after finish().
|
|
@@ -30,10 +35,25 @@ props:
|
|
|
30
35
|
events:
|
|
31
36
|
reasoning-finish:
|
|
32
37
|
description: "Fired on reasoning-finish."
|
|
38
|
+
detail:
|
|
39
|
+
summary:
|
|
40
|
+
type: string
|
|
41
|
+
description: Summary label text rendered after finish.
|
|
42
|
+
status:
|
|
43
|
+
type: boolean
|
|
44
|
+
description: Whether reasoning was resolved.
|
|
33
45
|
reasoning-step-toggle:
|
|
34
46
|
description: "Fired on reasoning-step-toggle."
|
|
47
|
+
detail:
|
|
48
|
+
stepId:
|
|
49
|
+
type: string
|
|
50
|
+
description: ID of the toggled reasoning step (matches data-step-id).
|
|
35
51
|
reasoning-toggle:
|
|
36
52
|
description: "Fired on reasoning-toggle."
|
|
53
|
+
detail:
|
|
54
|
+
collapsed:
|
|
55
|
+
type: boolean
|
|
56
|
+
description: Whether the reasoning section is now collapsed.
|
|
37
57
|
slots:
|
|
38
58
|
default:
|
|
39
59
|
description: "Default slot — primary child content."
|
|
@@ -39,9 +39,26 @@
|
|
|
39
39
|
"x-adiaui": {
|
|
40
40
|
"anti_patterns": [],
|
|
41
41
|
"category": "agent",
|
|
42
|
+
"composes": [
|
|
43
|
+
"button-ui"
|
|
44
|
+
],
|
|
42
45
|
"events": {
|
|
43
46
|
"suggestion-select": {
|
|
44
|
-
"description": "Fired on suggestion-select."
|
|
47
|
+
"description": "Fired on suggestion-select.",
|
|
48
|
+
"detail": {
|
|
49
|
+
"index": {
|
|
50
|
+
"description": "Index of the selected suggestion.",
|
|
51
|
+
"type": "number"
|
|
52
|
+
},
|
|
53
|
+
"label": {
|
|
54
|
+
"description": "Suggestion label text.",
|
|
55
|
+
"type": "string"
|
|
56
|
+
},
|
|
57
|
+
"prompt": {
|
|
58
|
+
"description": "Suggestion prompt content.",
|
|
59
|
+
"type": "string"
|
|
60
|
+
}
|
|
61
|
+
}
|
|
45
62
|
}
|
|
46
63
|
},
|
|
47
64
|
"examples": [
|
|
@@ -5,12 +5,24 @@
|
|
|
5
5
|
*
|
|
6
6
|
* Type declarations generated by scripts/build/dts-codegen.mjs from
|
|
7
7
|
* the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
|
|
8
|
-
* run `npm run components`, then `npm run codegen:dts` to
|
|
9
|
-
* or hand-author this file fully if rich event types are
|
|
8
|
+
* run `npm run build:components`, then `npm run codegen:dts` to
|
|
9
|
+
* regenerate; or hand-author this file fully if rich event types are
|
|
10
|
+
* needed beyond what the yaml `events:` block can express.
|
|
10
11
|
*/
|
|
11
12
|
|
|
12
13
|
import { UIElement } from '../../core/element.js';
|
|
13
14
|
|
|
15
|
+
export interface AgentSuggestionsSuggestionSelectEventDetail {
|
|
16
|
+
/** Index of the selected suggestion. */
|
|
17
|
+
index: number;
|
|
18
|
+
/** Suggestion label text. */
|
|
19
|
+
label: string;
|
|
20
|
+
/** Suggestion prompt content. */
|
|
21
|
+
prompt: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export type AgentSuggestionsSuggestionSelectEvent = CustomEvent<AgentSuggestionsSuggestionSelectEventDetail>;
|
|
25
|
+
|
|
14
26
|
export class UIAgentSuggestions extends UIElement {
|
|
15
27
|
/** Disable all chips. */
|
|
16
28
|
disabled: boolean;
|
|
@@ -18,4 +30,11 @@ export class UIAgentSuggestions extends UIElement {
|
|
|
18
30
|
size: string;
|
|
19
31
|
/** outline | ghost | subtle */
|
|
20
32
|
variant: string;
|
|
33
|
+
|
|
34
|
+
addEventListener<K extends keyof HTMLElementEventMap>(
|
|
35
|
+
type: K,
|
|
36
|
+
listener: (this: UIAgentSuggestions, ev: HTMLElementEventMap[K]) => unknown,
|
|
37
|
+
options?: boolean | AddEventListenerOptions,
|
|
38
|
+
): void;
|
|
39
|
+
addEventListener(type: 'suggestion-select', listener: (ev: AgentSuggestionsSuggestionSelectEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
21
40
|
}
|
|
@@ -7,6 +7,10 @@ component: AgentSuggestions
|
|
|
7
7
|
category: agent
|
|
8
8
|
version: 1
|
|
9
9
|
description: Row of follow-up suggestion chips.
|
|
10
|
+
# Per ADR-0027 — primitives that programmatically create other primitives
|
|
11
|
+
# do NOT auto-import them. Consumer (or demo shell) must explicitly import.
|
|
12
|
+
composes:
|
|
13
|
+
- button-ui
|
|
10
14
|
props:
|
|
11
15
|
disabled:
|
|
12
16
|
description: Disable all chips.
|
|
@@ -24,6 +28,16 @@ props:
|
|
|
24
28
|
events:
|
|
25
29
|
suggestion-select:
|
|
26
30
|
description: "Fired on suggestion-select."
|
|
31
|
+
detail:
|
|
32
|
+
label:
|
|
33
|
+
type: string
|
|
34
|
+
description: Suggestion label text.
|
|
35
|
+
prompt:
|
|
36
|
+
type: string
|
|
37
|
+
description: Suggestion prompt content.
|
|
38
|
+
index:
|
|
39
|
+
type: number
|
|
40
|
+
description: Index of the selected suggestion.
|
|
27
41
|
slots:
|
|
28
42
|
default:
|
|
29
43
|
description: "Default slot — primary child content."
|
|
@@ -34,9 +34,16 @@
|
|
|
34
34
|
"x-adiaui": {
|
|
35
35
|
"anti_patterns": [],
|
|
36
36
|
"category": "agent",
|
|
37
|
+
"composes": [],
|
|
37
38
|
"events": {
|
|
38
39
|
"trace-toggle": {
|
|
39
|
-
"description": "Fired on trace-toggle."
|
|
40
|
+
"description": "Fired on trace-toggle.",
|
|
41
|
+
"detail": {
|
|
42
|
+
"collapsed": {
|
|
43
|
+
"description": "Whether the trace is now collapsed.",
|
|
44
|
+
"type": "boolean"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
40
47
|
}
|
|
41
48
|
},
|
|
42
49
|
"examples": [
|
|
@@ -5,15 +5,30 @@
|
|
|
5
5
|
*
|
|
6
6
|
* Type declarations generated by scripts/build/dts-codegen.mjs from
|
|
7
7
|
* the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
|
|
8
|
-
* run `npm run components`, then `npm run codegen:dts` to
|
|
9
|
-
* or hand-author this file fully if rich event types are
|
|
8
|
+
* run `npm run build:components`, then `npm run codegen:dts` to
|
|
9
|
+
* regenerate; or hand-author this file fully if rich event types are
|
|
10
|
+
* needed beyond what the yaml `events:` block can express.
|
|
10
11
|
*/
|
|
11
12
|
|
|
12
13
|
import { UIElement } from '../../core/element.js';
|
|
13
14
|
|
|
15
|
+
export interface AgentTraceTraceToggleEventDetail {
|
|
16
|
+
/** Whether the trace is now collapsed. */
|
|
17
|
+
collapsed: boolean;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export type AgentTraceTraceToggleEvent = CustomEvent<AgentTraceTraceToggleEventDetail>;
|
|
21
|
+
|
|
14
22
|
export class UIAgentTrace extends UIElement {
|
|
15
23
|
/** Hide the trace body. Default-visible disclosure (matches the agent-* family — agent-reasoning, agent-artifact). Set to opt out. */
|
|
16
24
|
collapsed: boolean;
|
|
17
25
|
/** Fallback summary label. */
|
|
18
26
|
label: string;
|
|
27
|
+
|
|
28
|
+
addEventListener<K extends keyof HTMLElementEventMap>(
|
|
29
|
+
type: K,
|
|
30
|
+
listener: (this: UIAgentTrace, ev: HTMLElementEventMap[K]) => unknown,
|
|
31
|
+
options?: boolean | AddEventListenerOptions,
|
|
32
|
+
): void;
|
|
33
|
+
addEventListener(type: 'trace-toggle', listener: (ev: AgentTraceTraceToggleEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
19
34
|
}
|
|
@@ -5,12 +5,15 @@
|
|
|
5
5
|
*
|
|
6
6
|
* Type declarations generated by scripts/build/dts-codegen.mjs from
|
|
7
7
|
* the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
|
|
8
|
-
* run `npm run components`, then `npm run codegen:dts` to
|
|
9
|
-
* or hand-author this file fully if rich event types are
|
|
8
|
+
* run `npm run build:components`, then `npm run codegen:dts` to
|
|
9
|
+
* regenerate; or hand-author this file fully if rich event types are
|
|
10
|
+
* needed beyond what the yaml `events:` block can express.
|
|
10
11
|
*/
|
|
11
12
|
|
|
12
13
|
import { UIElement } from '../../core/element.js';
|
|
13
14
|
|
|
15
|
+
export type AlertCloseEvent = CustomEvent<unknown>;
|
|
16
|
+
|
|
14
17
|
export class UIAlert extends UIElement {
|
|
15
18
|
/** Bold headline rendered as the first line of the alert content. Pair with [description] for the canonical "banner" pattern (headline + body). When [title] or [description] is set, the [text] prop is ignored. */
|
|
16
19
|
title: string;
|
|
@@ -26,4 +29,11 @@ export class UIAlert extends UIElement {
|
|
|
26
29
|
text: string;
|
|
27
30
|
/** Semantic color variant. */
|
|
28
31
|
variant: 'default' | 'info' | 'success' | 'warning' | 'danger' | 'muted' | 'neutral';
|
|
32
|
+
|
|
33
|
+
addEventListener<K extends keyof HTMLElementEventMap>(
|
|
34
|
+
type: K,
|
|
35
|
+
listener: (this: UIAlert, ev: HTMLElementEventMap[K]) => unknown,
|
|
36
|
+
options?: boolean | AddEventListenerOptions,
|
|
37
|
+
): void;
|
|
38
|
+
addEventListener(type: 'close', listener: (ev: AlertCloseEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
29
39
|
}
|
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
*
|
|
6
6
|
* Type declarations generated by scripts/build/dts-codegen.mjs from
|
|
7
7
|
* the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
|
|
8
|
-
* run `npm run components`, then `npm run codegen:dts` to
|
|
9
|
-
* or hand-author this file fully if rich event types are
|
|
8
|
+
* run `npm run build:components`, then `npm run codegen:dts` to
|
|
9
|
+
* regenerate; or hand-author this file fully if rich event types are
|
|
10
|
+
* needed beyond what the yaml `events:` block can express.
|
|
10
11
|
*/
|
|
11
12
|
|
|
12
13
|
import { UIElement } from '../../core/element.js';
|
|
@@ -7,6 +7,10 @@ component: Avatar
|
|
|
7
7
|
category: display
|
|
8
8
|
version: 1
|
|
9
9
|
description: Avatar with image → initials → empty fallback chain.
|
|
10
|
+
# Per ADR-0027 — primitives that programmatically create other primitives
|
|
11
|
+
# do NOT auto-import them. Consumer (or demo shell) must explicitly import.
|
|
12
|
+
composes:
|
|
13
|
+
- icon-ui
|
|
10
14
|
props:
|
|
11
15
|
text:
|
|
12
16
|
description: Display string (full name or initials). Initials derive from spaces — first letter of each word, max 2.
|
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
*
|
|
6
6
|
* Type declarations generated by scripts/build/dts-codegen.mjs from
|
|
7
7
|
* the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
|
|
8
|
-
* run `npm run components`, then `npm run codegen:dts` to
|
|
9
|
-
* or hand-author this file fully if rich event types are
|
|
8
|
+
* run `npm run build:components`, then `npm run codegen:dts` to
|
|
9
|
+
* regenerate; or hand-author this file fully if rich event types are
|
|
10
|
+
* needed beyond what the yaml `events:` block can express.
|
|
10
11
|
*/
|
|
11
12
|
|
|
12
13
|
import { UIElement } from '../../core/element.js';
|
|
@@ -7,6 +7,10 @@ component: Badge
|
|
|
7
7
|
category: display
|
|
8
8
|
version: 1
|
|
9
9
|
description: Inline pill-shaped badge/tag. Text rendered via CSS attr().
|
|
10
|
+
# Per ADR-0027 — primitives that programmatically create other primitives
|
|
11
|
+
# do NOT auto-import them. Consumer (or demo shell) must explicitly import.
|
|
12
|
+
composes:
|
|
13
|
+
- icon-ui
|
|
10
14
|
props:
|
|
11
15
|
icon:
|
|
12
16
|
description: Optional leading icon (any registered name). Use icon="dot" for chart-legend /
|
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
*
|
|
6
6
|
* Type declarations generated by scripts/build/dts-codegen.mjs from
|
|
7
7
|
* the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
|
|
8
|
-
* run `npm run components`, then `npm run codegen:dts` to
|
|
9
|
-
* or hand-author this file fully if rich event types are
|
|
8
|
+
* run `npm run build:components`, then `npm run codegen:dts` to
|
|
9
|
+
* regenerate; or hand-author this file fully if rich event types are
|
|
10
|
+
* needed beyond what the yaml `events:` block can express.
|
|
10
11
|
*/
|
|
11
12
|
|
|
12
13
|
import { UIElement } from '../../core/element.js';
|
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
*
|
|
6
6
|
* Type declarations generated by scripts/build/dts-codegen.mjs from
|
|
7
7
|
* the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
|
|
8
|
-
* run `npm run components`, then `npm run codegen:dts` to
|
|
9
|
-
* or hand-author this file fully if rich event types are
|
|
8
|
+
* run `npm run build:components`, then `npm run codegen:dts` to
|
|
9
|
+
* regenerate; or hand-author this file fully if rich event types are
|
|
10
|
+
* needed beyond what the yaml `events:` block can express.
|
|
10
11
|
*/
|
|
11
12
|
|
|
12
13
|
import { UIElement } from '../../core/element.js';
|
|
@@ -7,6 +7,12 @@ component: Breadcrumb
|
|
|
7
7
|
category: navigation
|
|
8
8
|
version: 1
|
|
9
9
|
description: Breadcrumb trail with auto-inserted separators. Supports a leading icon (first child) and an overflow popover that collapses middle crumbs into a `…` menu.
|
|
10
|
+
# Per ADR-0027 — primitives that programmatically create other primitives
|
|
11
|
+
# do NOT auto-import them. Consumer (or demo shell) must explicitly import.
|
|
12
|
+
composes:
|
|
13
|
+
- menu-ui
|
|
14
|
+
- button-ui
|
|
15
|
+
- menu-item-ui
|
|
10
16
|
props:
|
|
11
17
|
separator:
|
|
12
18
|
description: Character or string rendered between breadcrumb items via CSS ::before.
|
|
@@ -5,12 +5,15 @@
|
|
|
5
5
|
*
|
|
6
6
|
* Type declarations generated by scripts/build/dts-codegen.mjs from
|
|
7
7
|
* the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
|
|
8
|
-
* run `npm run components`, then `npm run codegen:dts` to
|
|
9
|
-
* or hand-author this file fully if rich event types are
|
|
8
|
+
* run `npm run build:components`, then `npm run codegen:dts` to
|
|
9
|
+
* regenerate; or hand-author this file fully if rich event types are
|
|
10
|
+
* needed beyond what the yaml `events:` block can express.
|
|
10
11
|
*/
|
|
11
12
|
|
|
12
13
|
import { UIElement } from '../../core/element.js';
|
|
13
14
|
|
|
15
|
+
export type ButtonPressEvent = CustomEvent<unknown>;
|
|
16
|
+
|
|
14
17
|
export class UIButton extends UIElement {
|
|
15
18
|
/** HTML button type (button, submit, reset) */
|
|
16
19
|
type: string;
|
|
@@ -31,4 +34,11 @@ export class UIButton extends UIElement {
|
|
|
31
34
|
/** Visual style — `solid` (default fill), `outline`, `ghost`. `default` / `primary` are aliases of `solid`. Style is independent of semantic intent — to express destructive / success / info / warning intent, set [color="…"] alongside.
|
|
32
35
|
For **inline navigation** (Terms of Service, Privacy Policy, footer links, "Sign in" / "Sign up" cross-page affordances) use `<link-ui>` instead — it carries proper `<a href>` semantics, keyboard handling (Enter only, no Space), middle-click open-new-tab, and screen-reader announces "link" instead of "button". Mixing navigation and action affordances under the same primitive is a category error fixed at this junction. */
|
|
33
36
|
variant: 'default' | 'solid' | 'outline' | 'ghost' | 'primary' | 'secondary' | 'soft' | 'current';
|
|
37
|
+
|
|
38
|
+
addEventListener<K extends keyof HTMLElementEventMap>(
|
|
39
|
+
type: K,
|
|
40
|
+
listener: (this: UIButton, ev: HTMLElementEventMap[K]) => unknown,
|
|
41
|
+
options?: boolean | AddEventListenerOptions,
|
|
42
|
+
): void;
|
|
43
|
+
addEventListener(type: 'press', listener: (ev: ButtonPressEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
34
44
|
}
|
|
@@ -7,6 +7,11 @@ component: Button
|
|
|
7
7
|
category: action
|
|
8
8
|
version: 1
|
|
9
9
|
description: Clickable button with text, icon, and variant support. Supports submit type for forms.
|
|
10
|
+
# Per ADR-0027 — primitives that programmatically create other primitives
|
|
11
|
+
# in their render() do NOT auto-import them. Consumer (or demo shell) must
|
|
12
|
+
# explicitly import each composed primitive.
|
|
13
|
+
composes:
|
|
14
|
+
- icon-ui # created via document.createElement('icon-ui') when [icon] is set
|
|
10
15
|
props:
|
|
11
16
|
aria-label:
|
|
12
17
|
description: Accessible label for screen readers. Auto-set from `text` when text is non-empty; meaningful override for icon-only buttons.
|
|
@@ -5,13 +5,29 @@
|
|
|
5
5
|
*
|
|
6
6
|
* Type declarations generated by scripts/build/dts-codegen.mjs from
|
|
7
7
|
* the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
|
|
8
|
-
* run `npm run components`, then `npm run codegen:dts` to
|
|
9
|
-
* or hand-author this file fully if rich event types are
|
|
8
|
+
* run `npm run build:components`, then `npm run codegen:dts` to
|
|
9
|
+
* regenerate; or hand-author this file fully if rich event types are
|
|
10
|
+
* needed beyond what the yaml `events:` block can express.
|
|
10
11
|
*/
|
|
11
12
|
|
|
12
13
|
import { UIElement } from '../../core/element.js';
|
|
13
14
|
|
|
15
|
+
export type CanvasInteractionEvent = CustomEvent<unknown>;
|
|
16
|
+
export type CanvasChangeEvent = CustomEvent<unknown>;
|
|
17
|
+
export type CanvasClickEvent = CustomEvent<unknown>;
|
|
18
|
+
export type CanvasInputEvent = CustomEvent<unknown>;
|
|
19
|
+
|
|
14
20
|
export class UICanvas extends UIElement {
|
|
15
21
|
/** Component property: theme. */
|
|
16
22
|
theme: string;
|
|
23
|
+
|
|
24
|
+
addEventListener<K extends keyof HTMLElementEventMap>(
|
|
25
|
+
type: K,
|
|
26
|
+
listener: (this: UICanvas, ev: HTMLElementEventMap[K]) => unknown,
|
|
27
|
+
options?: boolean | AddEventListenerOptions,
|
|
28
|
+
): void;
|
|
29
|
+
addEventListener(type: 'canvas-interaction', listener: (ev: CanvasInteractionEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
30
|
+
addEventListener(type: 'change', listener: (ev: CanvasChangeEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
31
|
+
addEventListener(type: 'click', listener: (ev: CanvasClickEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
32
|
+
addEventListener(type: 'input', listener: (ev: CanvasInputEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
17
33
|
}
|