@adia-ai/web-components 0.4.7 → 0.4.8
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/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 +3 -0
- package/components/action-list/action-list.d.ts +12 -2
- package/components/action-list/action-list.yaml +4 -0
- package/components/agent-artifact/agent-artifact.a2ui.json +4 -0
- package/components/agent-artifact/agent-artifact.d.ts +12 -2
- package/components/agent-artifact/agent-artifact.yaml +5 -0
- package/components/agent-feedback-bar/agent-feedback-bar.a2ui.json +3 -0
- package/components/agent-feedback-bar/agent-feedback-bar.d.ts +14 -2
- package/components/agent-feedback-bar/agent-feedback-bar.yaml +4 -0
- package/components/agent-questions/agent-questions.a2ui.json +3 -0
- package/components/agent-questions/agent-questions.d.ts +12 -2
- package/components/agent-questions/agent-questions.yaml +4 -0
- package/components/agent-reasoning/agent-reasoning.a2ui.json +4 -0
- package/components/agent-reasoning/agent-reasoning.d.ts +16 -2
- package/components/agent-reasoning/agent-reasoning.yaml +5 -0
- package/components/agent-suggestions/agent-suggestions.a2ui.json +3 -0
- package/components/agent-suggestions/agent-suggestions.d.ts +12 -2
- package/components/agent-suggestions/agent-suggestions.yaml +4 -0
- package/components/agent-trace/agent-trace.a2ui.json +1 -0
- package/components/agent-trace/agent-trace.d.ts +12 -2
- 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 +10 -0
- package/components/card/card.a2ui.json +1 -0
- package/components/card/card.d.ts +12 -2
- package/components/chart/chart.a2ui.json +1 -0
- package/components/chart/chart.d.ts +16 -2
- package/components/chart-legend/chart-legend.a2ui.json +4 -0
- package/components/chart-legend/chart-legend.d.ts +12 -2
- package/components/chart-legend/chart-legend.yaml +5 -0
- package/components/chat-thread/chat-thread.a2ui.json +1 -0
- package/components/chat-thread/chat-thread.d.ts +12 -2
- package/components/check/check.a2ui.json +1 -0
- package/components/code/code.a2ui.json +1 -0
- package/components/col/col.a2ui.json +1 -0
- package/components/col/col.d.ts +3 -2
- package/components/color-picker/color-picker.a2ui.json +3 -0
- package/components/color-picker/color-picker.yaml +4 -0
- package/components/command/command.a2ui.json +1 -0
- package/components/command/command.d.ts +14 -2
- package/components/demo-toggle/demo-toggle.a2ui.json +1 -0
- package/components/demo-toggle/demo-toggle.d.ts +12 -2
- 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 +1 -0
- package/components/heatmap/heatmap.d.ts +14 -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 +1 -0
- package/components/link/link.d.ts +12 -2
- package/components/list/list.a2ui.json +3 -0
- package/components/list/list.d.ts +12 -2
- package/components/list/list.yaml +4 -0
- package/components/menu/menu.a2ui.json +3 -0
- package/components/menu/menu.d.ts +12 -2
- package/components/menu/menu.yaml +4 -0
- package/components/modal/modal.a2ui.json +1 -0
- package/components/modal/modal.d.ts +12 -2
- package/components/nav/nav.a2ui.json +1 -0
- package/components/nav/nav.d.ts +12 -2
- package/components/nav-group/nav-group.a2ui.json +1 -0
- package/components/nav-group/nav-group.d.ts +12 -2
- package/components/nav-item/nav-item.a2ui.json +1 -0
- package/components/nav-item/nav-item.d.ts +12 -2
- package/components/noodles/noodles.a2ui.json +1 -0
- package/components/noodles/noodles.d.ts +16 -2
- 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 +1 -0
- package/components/page/page.a2ui.json +1 -0
- package/components/page/page.d.ts +3 -2
- package/components/pagination/pagination.a2ui.json +1 -0
- package/components/pagination/pagination.d.ts +12 -2
- 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 +1 -0
- package/components/stream/stream.d.ts +16 -2
- package/components/swatch/swatch.a2ui.json +1 -0
- package/components/swatch/swatch.d.ts +3 -2
- package/components/swiper/swiper.a2ui.json +3 -0
- package/components/swiper/swiper.d.ts +16 -2
- package/components/swiper/swiper.yaml +4 -0
- package/components/switch/switch.a2ui.json +1 -0
- package/components/table/table.a2ui.json +7 -0
- package/components/table/table.d.ts +20 -2
- package/components/table/table.yaml +8 -0
- 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 +3 -0
- package/components/tabs/tabs.d.ts +12 -2
- package/components/tabs/tabs.yaml +4 -0
- package/components/tag/tag.a2ui.json +1 -0
- package/components/tag/tag.d.ts +12 -2
- 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 +18 -1
- package/components/timeline/timeline.d.ts +19 -2
- package/components/timeline/timeline.yaml +14 -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 +1 -0
- package/components/toggle-group/toggle-group.d.ts +12 -2
- package/components/toggle-scheme/toggle-scheme.a2ui.json +3 -0
- package/components/toggle-scheme/toggle-scheme.d.ts +12 -2
- package/components/toggle-scheme/toggle-scheme.yaml +4 -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 +3 -0
- package/components/tree/tree.d.ts +12 -2
- package/components/tree/tree.yaml +4 -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 +78 -77
- package/index.js +7 -0
- package/package.json +3 -2
|
@@ -11,6 +11,11 @@ description: >-
|
|
|
11
11
|
(SPEC-FEED-CHANNEL-001). Per-position singletons mounted lazily into
|
|
12
12
|
document.body via Popover API; consumers post via the static API
|
|
13
13
|
(`UIFeed.post()`) or the global 'feed' CustomEvent.
|
|
14
|
+
# Per ADR-0027 — primitives that programmatically create other primitives
|
|
15
|
+
# do NOT auto-import them. Consumer (or demo shell) must explicitly import.
|
|
16
|
+
composes:
|
|
17
|
+
- button-ui
|
|
18
|
+
- feed-item-ui
|
|
14
19
|
props:
|
|
15
20
|
position:
|
|
16
21
|
description: Lane the feed renders into
|
|
@@ -28,6 +33,8 @@ props:
|
|
|
28
33
|
description: Cap on simultaneously visible items per lane
|
|
29
34
|
type: number
|
|
30
35
|
default: 5
|
|
31
|
-
events:
|
|
36
|
+
events:
|
|
37
|
+
close:
|
|
38
|
+
description: Fired on per-item dismissal (manual close, swipe, or auto-timeout). Bubbles.
|
|
32
39
|
slots: {}
|
|
33
40
|
states: {}
|
|
@@ -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';
|
|
@@ -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,12 +5,16 @@
|
|
|
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
|
+
|
|
14
18
|
export class UIHeatmap extends UIElement {
|
|
15
19
|
/** Heatmap type */
|
|
16
20
|
type: 'day-grid' | 'matrix' | 'density';
|
|
@@ -28,4 +32,12 @@ export class UIHeatmap extends UIElement {
|
|
|
28
32
|
scale: 'linear' | 'log' | 'quantile';
|
|
29
33
|
/** ISO start date; labels months in day-grid mode */
|
|
30
34
|
startDate: string;
|
|
35
|
+
|
|
36
|
+
addEventListener<K extends keyof HTMLElementEventMap>(
|
|
37
|
+
type: K,
|
|
38
|
+
listener: (this: UIHeatmap, ev: HTMLElementEventMap[K]) => unknown,
|
|
39
|
+
options?: boolean | AddEventListenerOptions,
|
|
40
|
+
): void;
|
|
41
|
+
addEventListener(type: 'cell-click', listener: (ev: HeatmapCellClickEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
42
|
+
addEventListener(type: 'cell-hover', listener: (ev: HeatmapCellHoverEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
31
43
|
}
|
|
@@ -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,6 +80,7 @@
|
|
|
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
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."
|
|
@@ -29,12 +29,15 @@ 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 type LinkPressEvent = CustomEvent<unknown>;
|
|
40
|
+
|
|
38
41
|
export class UILink extends UIElement {
|
|
39
42
|
/** Stretches the link to fill its container; useful for standalone link rows. */
|
|
40
43
|
block: boolean;
|
|
@@ -52,4 +55,11 @@ export class UILink extends UIElement {
|
|
|
52
55
|
text: string;
|
|
53
56
|
/** 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
57
|
variant: 'default' | 'subtle' | 'quiet';
|
|
58
|
+
|
|
59
|
+
addEventListener<K extends keyof HTMLElementEventMap>(
|
|
60
|
+
type: K,
|
|
61
|
+
listener: (this: UILink, ev: HTMLElementEventMap[K]) => unknown,
|
|
62
|
+
options?: boolean | AddEventListenerOptions,
|
|
63
|
+
): void;
|
|
64
|
+
addEventListener(type: 'press', listener: (ev: LinkPressEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
55
65
|
}
|
|
@@ -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 ListSelectionChangeEvent = CustomEvent<unknown>;
|
|
16
|
+
|
|
14
17
|
export class UIList extends UIElement {
|
|
15
18
|
/** Show dividers between items */
|
|
16
19
|
divider: boolean;
|
|
@@ -20,4 +23,11 @@ export class UIList extends UIElement {
|
|
|
20
23
|
selectedKey: string;
|
|
21
24
|
/** Item spacing */
|
|
22
25
|
spacing: string;
|
|
26
|
+
|
|
27
|
+
addEventListener<K extends keyof HTMLElementEventMap>(
|
|
28
|
+
type: K,
|
|
29
|
+
listener: (this: UIList, ev: HTMLElementEventMap[K]) => unknown,
|
|
30
|
+
options?: boolean | AddEventListenerOptions,
|
|
31
|
+
): void;
|
|
32
|
+
addEventListener(type: 'selection-change', listener: (ev: ListSelectionChangeEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
23
33
|
}
|
|
@@ -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
|
|
@@ -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 MenuActionEvent = CustomEvent<unknown>;
|
|
16
|
+
|
|
14
17
|
export class UIMenu extends UIElement {
|
|
15
18
|
/** Gap in px */
|
|
16
19
|
gap: number;
|
|
@@ -18,4 +21,11 @@ export class UIMenu extends UIElement {
|
|
|
18
21
|
open: boolean;
|
|
19
22
|
/** Preferred position relative to the anchor element */
|
|
20
23
|
placement: 'bottom-start' | 'bottom-end' | 'top-start' | 'top-end';
|
|
24
|
+
|
|
25
|
+
addEventListener<K extends keyof HTMLElementEventMap>(
|
|
26
|
+
type: K,
|
|
27
|
+
listener: (this: UIMenu, ev: HTMLElementEventMap[K]) => unknown,
|
|
28
|
+
options?: boolean | AddEventListenerOptions,
|
|
29
|
+
): void;
|
|
30
|
+
addEventListener(type: 'action', listener: (ev: MenuActionEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
21
31
|
}
|
|
@@ -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
|
|
@@ -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
|
}
|
package/components/nav/nav.d.ts
CHANGED
|
@@ -13,12 +13,15 @@ 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 type NavSelectEvent = CustomEvent<unknown>;
|
|
24
|
+
|
|
22
25
|
export class UINav extends UIElement {
|
|
23
26
|
/** Primary-variant only. Force icon-only collapse regardless of viewport width. */
|
|
24
27
|
collapsed: boolean;
|
|
@@ -28,4 +31,11 @@ export class UINav extends UIElement {
|
|
|
28
31
|
heading: string;
|
|
29
32
|
/** Visual treatment. primary = app sidebar; section = subnav rail. */
|
|
30
33
|
variant: 'primary' | 'section';
|
|
34
|
+
|
|
35
|
+
addEventListener<K extends keyof HTMLElementEventMap>(
|
|
36
|
+
type: K,
|
|
37
|
+
listener: (this: UINav, ev: HTMLElementEventMap[K]) => unknown,
|
|
38
|
+
options?: boolean | AddEventListenerOptions,
|
|
39
|
+
): void;
|
|
40
|
+
addEventListener(type: 'nav-select', listener: (ev: NavSelectEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
31
41
|
}
|
|
@@ -13,12 +13,15 @@ when [collapsible] (default true).
|
|
|
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 type NavGroupGroupToggleEvent = CustomEvent<unknown>;
|
|
24
|
+
|
|
22
25
|
export class UINavGroup extends UIElement {
|
|
23
26
|
/** Optional trailing badge (count, label). */
|
|
24
27
|
badge: string;
|
|
@@ -32,4 +35,11 @@ export class UINavGroup extends UIElement {
|
|
|
32
35
|
text: string;
|
|
33
36
|
/** Visual treatment. Default ('') renders as a primary-rail group (icon row, caret, collapsible). 'section' renders the header as a static kicker label with always-visible children. When the parent <nav-ui> carries variant="section", this group inherits it via CSS cascade unless an explicit variant is set on the group. */
|
|
34
37
|
variant: '' | 'section';
|
|
38
|
+
|
|
39
|
+
addEventListener<K extends keyof HTMLElementEventMap>(
|
|
40
|
+
type: K,
|
|
41
|
+
listener: (this: UINavGroup, ev: HTMLElementEventMap[K]) => unknown,
|
|
42
|
+
options?: boolean | AddEventListenerOptions,
|
|
43
|
+
): void;
|
|
44
|
+
addEventListener(type: 'group-toggle', listener: (ev: NavGroupGroupToggleEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
35
45
|
}
|
|
@@ -13,12 +13,15 @@ bubbles a `nav-select` event.
|
|
|
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 type NavItemNavSelectEvent = CustomEvent<unknown>;
|
|
24
|
+
|
|
22
25
|
export class UINavItem extends UIElement {
|
|
23
26
|
/** Optional trailing badge. */
|
|
24
27
|
badge: string;
|
|
@@ -34,4 +37,11 @@ export class UINavItem extends UIElement {
|
|
|
34
37
|
value: string;
|
|
35
38
|
/** Visual treatment. Default ('') renders as a primary-rail item (reserved icon space, in-icon selected accent). 'section' renders flat — no icon space when absent, left-edge accent bar for selected. When the parent <nav-ui> carries variant="section", this item inherits it via CSS cascade unless an explicit variant is set. */
|
|
36
39
|
variant: '' | 'section';
|
|
40
|
+
|
|
41
|
+
addEventListener<K extends keyof HTMLElementEventMap>(
|
|
42
|
+
type: K,
|
|
43
|
+
listener: (this: UINavItem, ev: HTMLElementEventMap[K]) => unknown,
|
|
44
|
+
options?: boolean | AddEventListenerOptions,
|
|
45
|
+
): void;
|
|
46
|
+
addEventListener(type: 'nav-select', listener: (ev: NavItemNavSelectEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
37
47
|
}
|