@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,19 @@
|
|
|
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 HeatmapCellClickEvent = CustomEvent<unknown>;
|
|
16
|
+
export type HeatmapCellHoverEvent = CustomEvent<unknown>;
|
|
17
|
+
export type HeatmapChartHoverEvent = CustomEvent<unknown>;
|
|
18
|
+
export type HeatmapChartLeaveEvent = CustomEvent<unknown>;
|
|
19
|
+
export type HeatmapChartSelectEvent = CustomEvent<unknown>;
|
|
20
|
+
|
|
14
21
|
export class UIHeatmap extends UIElement {
|
|
15
22
|
/** Heatmap type */
|
|
16
23
|
type: 'day-grid' | 'matrix' | 'density';
|
|
@@ -28,4 +35,15 @@ export class UIHeatmap extends UIElement {
|
|
|
28
35
|
scale: 'linear' | 'log' | 'quantile';
|
|
29
36
|
/** ISO start date; labels months in day-grid mode */
|
|
30
37
|
startDate: string;
|
|
38
|
+
|
|
39
|
+
addEventListener<K extends keyof HTMLElementEventMap>(
|
|
40
|
+
type: K,
|
|
41
|
+
listener: (this: UIHeatmap, ev: HTMLElementEventMap[K]) => unknown,
|
|
42
|
+
options?: boolean | AddEventListenerOptions,
|
|
43
|
+
): void;
|
|
44
|
+
addEventListener(type: 'cell-click', listener: (ev: HeatmapCellClickEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
45
|
+
addEventListener(type: 'cell-hover', listener: (ev: HeatmapCellHoverEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
46
|
+
addEventListener(type: 'chart-hover', listener: (ev: HeatmapChartHoverEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
47
|
+
addEventListener(type: 'chart-leave', listener: (ev: HeatmapChartLeaveEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
48
|
+
addEventListener(type: 'chart-select', listener: (ev: HeatmapChartSelectEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
31
49
|
}
|
|
@@ -62,9 +62,24 @@ props:
|
|
|
62
62
|
attribute: start-date
|
|
63
63
|
events:
|
|
64
64
|
cell-click:
|
|
65
|
-
description:
|
|
65
|
+
description: Fired on cell click. detail carries the cell's row + column indices + value.
|
|
66
66
|
cell-hover:
|
|
67
|
-
description:
|
|
67
|
+
description: Fired on cell hover. detail carries the cell's row + column indices + value.
|
|
68
|
+
chart-hover:
|
|
69
|
+
description: |
|
|
70
|
+
Canonical chart-hover shape — same detail as cell-hover. Re-emitted
|
|
71
|
+
alongside cell-hover so consumers wiring a pointer-follow tooltip via
|
|
72
|
+
tooltip-ui[follows=pointer] can listen for one event-name regardless
|
|
73
|
+
of chart kind (chart-ui + heatmap-ui both emit it).
|
|
74
|
+
chart-leave:
|
|
75
|
+
description: |
|
|
76
|
+
Signal-only counterpart to chart-hover. Fires when the pointer leaves
|
|
77
|
+
the heatmap grid. Detail-free — receivers should clear their hover
|
|
78
|
+
state on receipt.
|
|
79
|
+
chart-select:
|
|
80
|
+
description: |
|
|
81
|
+
Canonical chart-select shape — same detail as cell-click. Re-emitted
|
|
82
|
+
alongside cell-click for chart-kind-agnostic listeners.
|
|
68
83
|
slots:
|
|
69
84
|
title:
|
|
70
85
|
description: "Child content region for the `title` slot."
|
|
@@ -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,10 @@ component: Image
|
|
|
7
7
|
category: display
|
|
8
8
|
version: 1
|
|
9
9
|
description: Lazy-loading image with skeleton fallback. Shows skeleton while loading, falls back on error.
|
|
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
|
+
- skeleton-ui
|
|
10
14
|
props:
|
|
11
15
|
alt:
|
|
12
16
|
description: Alt text for the image.
|
package/components/index.js
CHANGED
|
@@ -9,6 +9,14 @@
|
|
|
9
9
|
list-ui). See packages/web-components/core/data-stream.js. */
|
|
10
10
|
import '../core/data-stream.js';
|
|
11
11
|
|
|
12
|
+
/* Side-effect import — wires the full @phosphor-icons/core asset tree
|
|
13
|
+
into the icon registry (`core/icons.js`). Consumers who load the
|
|
14
|
+
components barrel are loading ~90 elements; pulling phosphor along is
|
|
15
|
+
the zero-config expectation. Apps with bundle-size SLOs should skip
|
|
16
|
+
this barrel, import primitives piecemeal, and call
|
|
17
|
+
`installIconLoaders()` with a scoped glob — see `core/icons.js` JSDoc. */
|
|
18
|
+
import '../core/icons-phosphor.js';
|
|
19
|
+
|
|
12
20
|
export { UIIcon } from './icon/icon.js';
|
|
13
21
|
export { UIButton } from './button/button.js';
|
|
14
22
|
export { UILink } from './link/link.js';
|
|
@@ -8,6 +8,12 @@ description: Text input field with contenteditable surface. Supports prefix/suff
|
|
|
8
8
|
`type="number"` mode that renders [+]/[-] stepper buttons, numeric input filtering, and ARIA spinbutton semantics — no native
|
|
9
9
|
`<input type="number">` under the hood. Password type uses a native `<input>` (only path that still wraps native, for `-webkit-text-security`
|
|
10
10
|
disc masking).
|
|
11
|
+
# Per ADR-0027 — primitives that programmatically create other primitives
|
|
12
|
+
# do NOT auto-import them. Consumer (or demo shell) must explicitly import.
|
|
13
|
+
composes:
|
|
14
|
+
- button-ui # [+]/[-] stepper buttons (created when type="number")
|
|
15
|
+
- icon-ui # caret-up/caret-down icons inside the stepper buttons
|
|
16
|
+
|
|
11
17
|
props:
|
|
12
18
|
name:
|
|
13
19
|
description: Form control name for form data submission
|
|
@@ -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,6 +5,12 @@ component: Inspector
|
|
|
5
5
|
category: agent
|
|
6
6
|
version: 1
|
|
7
7
|
description: Developer tools pane for inspecting A2UI state.
|
|
8
|
+
# Per ADR-0027 — primitives that programmatically create other primitives
|
|
9
|
+
# do NOT auto-import them. Consumer (or demo shell) must explicitly import.
|
|
10
|
+
composes:
|
|
11
|
+
- tabs-ui
|
|
12
|
+
- tab-ui
|
|
13
|
+
- code-ui
|
|
8
14
|
props:
|
|
9
15
|
value:
|
|
10
16
|
description: Active tab. One of 'catalog', 'surface', 'messages', 'code'.
|
package/components/kbd/kbd.d.ts
CHANGED
|
@@ -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';
|
|
@@ -80,9 +80,20 @@
|
|
|
80
80
|
"❌ `<link-ui>` for form submission — submission is a button concern. Use `<button-ui type=\"submit\">`."
|
|
81
81
|
],
|
|
82
82
|
"category": "content",
|
|
83
|
+
"composes": [],
|
|
83
84
|
"events": {
|
|
84
85
|
"press": {
|
|
85
|
-
"description": "Bubbles when the link is activated by click or Enter. Detail: `{ href, target }`. Fires BEFORE the browser's native navigation so handlers can `preventDefault()` and route through the A2UI action handler system. If no handler intercepts, native navigation proceeds."
|
|
86
|
+
"description": "Bubbles when the link is activated by click or Enter. Detail: `{ href, target }`. Fires BEFORE the browser's native navigation so handlers can `preventDefault()` and route through the A2UI action handler system. If no handler intercepts, native navigation proceeds.",
|
|
87
|
+
"detail": {
|
|
88
|
+
"href": {
|
|
89
|
+
"description": "Link href attribute.",
|
|
90
|
+
"type": "string"
|
|
91
|
+
},
|
|
92
|
+
"target": {
|
|
93
|
+
"description": "Link target attribute (e.g. _blank).",
|
|
94
|
+
"type": "string"
|
|
95
|
+
}
|
|
96
|
+
}
|
|
86
97
|
}
|
|
87
98
|
},
|
|
88
99
|
"examples": [
|
|
@@ -29,12 +29,22 @@ wiring. ARIA role is "link" (set automatically by `<a>` element).
|
|
|
29
29
|
*
|
|
30
30
|
* Type declarations generated by scripts/build/dts-codegen.mjs from
|
|
31
31
|
* the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
|
|
32
|
-
* run `npm run components`, then `npm run codegen:dts` to
|
|
33
|
-
* or hand-author this file fully if rich event types are
|
|
32
|
+
* run `npm run build:components`, then `npm run codegen:dts` to
|
|
33
|
+
* regenerate; or hand-author this file fully if rich event types are
|
|
34
|
+
* needed beyond what the yaml `events:` block can express.
|
|
34
35
|
*/
|
|
35
36
|
|
|
36
37
|
import { UIElement } from '../../core/element.js';
|
|
37
38
|
|
|
39
|
+
export interface LinkPressEventDetail {
|
|
40
|
+
/** Link href attribute. */
|
|
41
|
+
href: string;
|
|
42
|
+
/** Link target attribute (e.g. _blank). */
|
|
43
|
+
target: string;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export type LinkPressEvent = CustomEvent<LinkPressEventDetail>;
|
|
47
|
+
|
|
38
48
|
export class UILink extends UIElement {
|
|
39
49
|
/** Stretches the link to fill its container; useful for standalone link rows. */
|
|
40
50
|
block: boolean;
|
|
@@ -52,4 +62,11 @@ export class UILink extends UIElement {
|
|
|
52
62
|
text: string;
|
|
53
63
|
/** Visual treatment. `default` underlines on rest + hover (standard link affordance). `subtle` underlines only on hover (for tighter designs where always-underlined would be noisy). `quiet` drops the link color and matches surrounding text color (used for footer-link rows where the link affordance is implied by context, not by color). */
|
|
54
64
|
variant: 'default' | 'subtle' | 'quiet';
|
|
65
|
+
|
|
66
|
+
addEventListener<K extends keyof HTMLElementEventMap>(
|
|
67
|
+
type: K,
|
|
68
|
+
listener: (this: UILink, ev: HTMLElementEventMap[K]) => unknown,
|
|
69
|
+
options?: boolean | AddEventListenerOptions,
|
|
70
|
+
): void;
|
|
71
|
+
addEventListener(type: 'press', listener: (ev: LinkPressEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
55
72
|
}
|
|
@@ -102,6 +102,13 @@ events:
|
|
|
102
102
|
so handlers can `preventDefault()` and route through the A2UI
|
|
103
103
|
action handler system. If no handler intercepts, native
|
|
104
104
|
navigation proceeds.
|
|
105
|
+
detail:
|
|
106
|
+
href:
|
|
107
|
+
type: string
|
|
108
|
+
description: Link href attribute.
|
|
109
|
+
target:
|
|
110
|
+
type: string
|
|
111
|
+
description: Link target attribute (e.g. _blank).
|
|
105
112
|
|
|
106
113
|
slots:
|
|
107
114
|
default:
|
|
@@ -44,9 +44,22 @@
|
|
|
44
44
|
"x-adiaui": {
|
|
45
45
|
"anti_patterns": [],
|
|
46
46
|
"category": "layout",
|
|
47
|
+
"composes": [
|
|
48
|
+
"icon-ui"
|
|
49
|
+
],
|
|
47
50
|
"events": {
|
|
48
51
|
"selection-change": {
|
|
49
|
-
"description": "Fired on selection-change."
|
|
52
|
+
"description": "Fired on selection-change.",
|
|
53
|
+
"detail": {
|
|
54
|
+
"key": {
|
|
55
|
+
"description": "New selection key.",
|
|
56
|
+
"type": "string"
|
|
57
|
+
},
|
|
58
|
+
"previousKey": {
|
|
59
|
+
"description": "Previously selected key.",
|
|
60
|
+
"type": "string"
|
|
61
|
+
}
|
|
62
|
+
}
|
|
50
63
|
}
|
|
51
64
|
},
|
|
52
65
|
"examples": [
|
|
@@ -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 ListSelectionChangeEventDetail {
|
|
16
|
+
/** New selection key. */
|
|
17
|
+
key: string;
|
|
18
|
+
/** Previously selected key. */
|
|
19
|
+
previousKey: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export type ListSelectionChangeEvent = CustomEvent<ListSelectionChangeEventDetail>;
|
|
23
|
+
|
|
14
24
|
export class UIList extends UIElement {
|
|
15
25
|
/** Show dividers between items */
|
|
16
26
|
divider: boolean;
|
|
@@ -20,4 +30,11 @@ export class UIList extends UIElement {
|
|
|
20
30
|
selectedKey: string;
|
|
21
31
|
/** Item spacing */
|
|
22
32
|
spacing: string;
|
|
33
|
+
|
|
34
|
+
addEventListener<K extends keyof HTMLElementEventMap>(
|
|
35
|
+
type: K,
|
|
36
|
+
listener: (this: UIList, ev: HTMLElementEventMap[K]) => unknown,
|
|
37
|
+
options?: boolean | AddEventListenerOptions,
|
|
38
|
+
): void;
|
|
39
|
+
addEventListener(type: 'selection-change', listener: (ev: ListSelectionChangeEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
23
40
|
}
|
|
@@ -7,6 +7,10 @@ component: List
|
|
|
7
7
|
category: layout
|
|
8
8
|
version: 1
|
|
9
9
|
description: Styled list with optional icons and dividers.
|
|
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
|
divider:
|
|
12
16
|
description: Show dividers between items
|
|
@@ -28,6 +32,13 @@ props:
|
|
|
28
32
|
events:
|
|
29
33
|
selection-change:
|
|
30
34
|
description: "Fired on selection-change."
|
|
35
|
+
detail:
|
|
36
|
+
key:
|
|
37
|
+
type: string
|
|
38
|
+
description: New selection key.
|
|
39
|
+
previousKey:
|
|
40
|
+
type: string
|
|
41
|
+
description: Previously selected key.
|
|
31
42
|
slots: {}
|
|
32
43
|
states:
|
|
33
44
|
- name: idle
|
|
@@ -45,9 +45,22 @@
|
|
|
45
45
|
"x-adiaui": {
|
|
46
46
|
"anti_patterns": [],
|
|
47
47
|
"category": "container",
|
|
48
|
+
"composes": [
|
|
49
|
+
"icon-ui"
|
|
50
|
+
],
|
|
48
51
|
"events": {
|
|
49
52
|
"action": {
|
|
50
|
-
"description": "Fired when a menu item is activated. Detail contains the triggering element."
|
|
53
|
+
"description": "Fired when a menu item is activated. Detail contains the triggering element.",
|
|
54
|
+
"detail": {
|
|
55
|
+
"text": {
|
|
56
|
+
"description": "Menu item text.",
|
|
57
|
+
"type": "string"
|
|
58
|
+
},
|
|
59
|
+
"value": {
|
|
60
|
+
"description": "Menu item value.",
|
|
61
|
+
"type": "string"
|
|
62
|
+
}
|
|
63
|
+
}
|
|
51
64
|
}
|
|
52
65
|
},
|
|
53
66
|
"examples": [
|
|
@@ -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 MenuActionEventDetail {
|
|
16
|
+
/** Menu item text. */
|
|
17
|
+
text: string;
|
|
18
|
+
/** Menu item value. */
|
|
19
|
+
value: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export type MenuActionEvent = CustomEvent<MenuActionEventDetail>;
|
|
23
|
+
|
|
14
24
|
export class UIMenu extends UIElement {
|
|
15
25
|
/** Gap in px */
|
|
16
26
|
gap: number;
|
|
@@ -18,4 +28,11 @@ export class UIMenu extends UIElement {
|
|
|
18
28
|
open: boolean;
|
|
19
29
|
/** Preferred position relative to the anchor element */
|
|
20
30
|
placement: 'bottom-start' | 'bottom-end' | 'top-start' | 'top-end';
|
|
31
|
+
|
|
32
|
+
addEventListener<K extends keyof HTMLElementEventMap>(
|
|
33
|
+
type: K,
|
|
34
|
+
listener: (this: UIMenu, ev: HTMLElementEventMap[K]) => unknown,
|
|
35
|
+
options?: boolean | AddEventListenerOptions,
|
|
36
|
+
): void;
|
|
37
|
+
addEventListener(type: 'action', listener: (ev: MenuActionEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
21
38
|
}
|
|
@@ -7,6 +7,10 @@ component: Menu
|
|
|
7
7
|
category: container
|
|
8
8
|
version: 1
|
|
9
9
|
description: Dropdown action menu with roving focus and keyboard navigation. Uses Popover API.
|
|
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 # leading affordances on menu items (created in render)
|
|
10
14
|
props:
|
|
11
15
|
gap:
|
|
12
16
|
description: Gap in px
|
|
@@ -29,6 +33,13 @@ props:
|
|
|
29
33
|
events:
|
|
30
34
|
action:
|
|
31
35
|
description: Fired when a menu item is activated. Detail contains the triggering element.
|
|
36
|
+
detail:
|
|
37
|
+
value:
|
|
38
|
+
type: string
|
|
39
|
+
description: Menu item value.
|
|
40
|
+
text:
|
|
41
|
+
type: string
|
|
42
|
+
description: Menu item text.
|
|
32
43
|
slots:
|
|
33
44
|
default:
|
|
34
45
|
description: Menu items with role="menuitem" and optional <hr> dividers
|
|
@@ -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 ModalCloseEvent = CustomEvent<unknown>;
|
|
16
|
+
|
|
14
17
|
export class UIModal extends UIElement {
|
|
15
18
|
/** Controls overlay visibility. Setting to true opens the surface with entry animation. */
|
|
16
19
|
open: boolean;
|
|
@@ -20,4 +23,11 @@ export class UIModal extends UIElement {
|
|
|
20
23
|
size: 'sm' | 'md' | 'lg' | 'xl';
|
|
21
24
|
/** Aria label applied to the surface element for accessibility */
|
|
22
25
|
text: string;
|
|
26
|
+
|
|
27
|
+
addEventListener<K extends keyof HTMLElementEventMap>(
|
|
28
|
+
type: K,
|
|
29
|
+
listener: (this: UIModal, ev: HTMLElementEventMap[K]) => unknown,
|
|
30
|
+
options?: boolean | AddEventListenerOptions,
|
|
31
|
+
): void;
|
|
32
|
+
addEventListener(type: 'close', listener: (ev: ModalCloseEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
23
33
|
}
|
|
@@ -48,9 +48,24 @@
|
|
|
48
48
|
"x-adiaui": {
|
|
49
49
|
"anti_patterns": [],
|
|
50
50
|
"category": "layout",
|
|
51
|
+
"composes": [],
|
|
51
52
|
"events": {
|
|
52
53
|
"nav-select": {
|
|
53
|
-
"description": "Bubbles from <nav-item-ui> children when one is selected. Detail: { item, text, value }."
|
|
54
|
+
"description": "Bubbles from <nav-item-ui> children when one is selected. Detail: { item, text, value }.",
|
|
55
|
+
"detail": {
|
|
56
|
+
"item": {
|
|
57
|
+
"description": "Selected nav-item element.",
|
|
58
|
+
"type": "object"
|
|
59
|
+
},
|
|
60
|
+
"text": {
|
|
61
|
+
"description": "Item text content.",
|
|
62
|
+
"type": "string"
|
|
63
|
+
},
|
|
64
|
+
"value": {
|
|
65
|
+
"description": "Item value attribute.",
|
|
66
|
+
"type": "string"
|
|
67
|
+
}
|
|
68
|
+
}
|
|
54
69
|
}
|
|
55
70
|
},
|
|
56
71
|
"examples": [
|
package/components/nav/nav.d.ts
CHANGED
|
@@ -13,12 +13,24 @@ and a [heading] kicker rendered via CSS.
|
|
|
13
13
|
*
|
|
14
14
|
* Type declarations generated by scripts/build/dts-codegen.mjs from
|
|
15
15
|
* the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
|
|
16
|
-
* run `npm run components`, then `npm run codegen:dts` to
|
|
17
|
-
* or hand-author this file fully if rich event types are
|
|
16
|
+
* run `npm run build:components`, then `npm run codegen:dts` to
|
|
17
|
+
* regenerate; or hand-author this file fully if rich event types are
|
|
18
|
+
* needed beyond what the yaml `events:` block can express.
|
|
18
19
|
*/
|
|
19
20
|
|
|
20
21
|
import { UIElement } from '../../core/element.js';
|
|
21
22
|
|
|
23
|
+
export interface NavSelectEventDetail {
|
|
24
|
+
/** Selected nav-item element. */
|
|
25
|
+
item: Record<string, unknown>;
|
|
26
|
+
/** Item text content. */
|
|
27
|
+
text: string;
|
|
28
|
+
/** Item value attribute. */
|
|
29
|
+
value: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export type NavSelectEvent = CustomEvent<NavSelectEventDetail>;
|
|
33
|
+
|
|
22
34
|
export class UINav extends UIElement {
|
|
23
35
|
/** Primary-variant only. Force icon-only collapse regardless of viewport width. */
|
|
24
36
|
collapsed: boolean;
|
|
@@ -28,4 +40,11 @@ export class UINav extends UIElement {
|
|
|
28
40
|
heading: string;
|
|
29
41
|
/** Visual treatment. primary = app sidebar; section = subnav rail. */
|
|
30
42
|
variant: 'primary' | 'section';
|
|
43
|
+
|
|
44
|
+
addEventListener<K extends keyof HTMLElementEventMap>(
|
|
45
|
+
type: K,
|
|
46
|
+
listener: (this: UINav, ev: HTMLElementEventMap[K]) => unknown,
|
|
47
|
+
options?: boolean | AddEventListenerOptions,
|
|
48
|
+
): void;
|
|
49
|
+
addEventListener(type: 'nav-select', listener: (ev: NavSelectEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
31
50
|
}
|
package/components/nav/nav.yaml
CHANGED
|
@@ -36,6 +36,16 @@ props:
|
|
|
36
36
|
events:
|
|
37
37
|
nav-select:
|
|
38
38
|
description: "Bubbles from <nav-item-ui> children when one is selected. Detail: { item, text, value }."
|
|
39
|
+
detail:
|
|
40
|
+
item:
|
|
41
|
+
type: object
|
|
42
|
+
description: Selected nav-item element.
|
|
43
|
+
text:
|
|
44
|
+
type: string
|
|
45
|
+
description: Item text content.
|
|
46
|
+
value:
|
|
47
|
+
type: string
|
|
48
|
+
description: Item value attribute.
|
|
39
49
|
|
|
40
50
|
slots:
|
|
41
51
|
default:
|
|
@@ -58,9 +58,20 @@
|
|
|
58
58
|
"x-adiaui": {
|
|
59
59
|
"anti_patterns": [],
|
|
60
60
|
"category": "layout",
|
|
61
|
+
"composes": [],
|
|
61
62
|
"events": {
|
|
62
63
|
"group-toggle": {
|
|
63
|
-
"description": "Fired when the header toggles via click/keyboard. Detail: { text, open }."
|
|
64
|
+
"description": "Fired when the header toggles via click/keyboard. Detail: { text, open }.",
|
|
65
|
+
"detail": {
|
|
66
|
+
"open": {
|
|
67
|
+
"description": "Whether the group is now open.",
|
|
68
|
+
"type": "boolean"
|
|
69
|
+
},
|
|
70
|
+
"text": {
|
|
71
|
+
"description": "Group label text.",
|
|
72
|
+
"type": "string"
|
|
73
|
+
}
|
|
74
|
+
}
|
|
64
75
|
}
|
|
65
76
|
},
|
|
66
77
|
"examples": [],
|