@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
|
@@ -10,8 +10,9 @@ spacing demo pages.
|
|
|
10
10
|
*
|
|
11
11
|
* Type declarations generated by scripts/build/dts-codegen.mjs from
|
|
12
12
|
* the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
|
|
13
|
-
* run `npm run components`, then `npm run codegen:dts` to
|
|
14
|
-
* or hand-author this file fully if rich event types are
|
|
13
|
+
* run `npm run build:components`, then `npm run codegen:dts` to
|
|
14
|
+
* regenerate; or hand-author this file fully if rich event types are
|
|
15
|
+
* needed beyond what the yaml `events:` block can express.
|
|
15
16
|
*/
|
|
16
17
|
|
|
17
18
|
import { UIElement } from '../../core/element.js';
|
|
@@ -5,12 +5,17 @@
|
|
|
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 SwiperAutoplayPauseEvent = CustomEvent<unknown>;
|
|
16
|
+
export type SwiperAutoplayResumeEvent = CustomEvent<unknown>;
|
|
17
|
+
export type SwiperChangeEvent = CustomEvent<unknown>;
|
|
18
|
+
|
|
14
19
|
export class UISwiper extends UIElement {
|
|
15
20
|
/** Enable auto-advance */
|
|
16
21
|
autoplay: boolean;
|
|
@@ -28,4 +33,13 @@ export class UISwiper extends UIElement {
|
|
|
28
33
|
slidesPerView: string;
|
|
29
34
|
/** Scroll-snap alignment — start, center, end, or none. */
|
|
30
35
|
snap: 'start' | 'center' | 'end' | 'none';
|
|
36
|
+
|
|
37
|
+
addEventListener<K extends keyof HTMLElementEventMap>(
|
|
38
|
+
type: K,
|
|
39
|
+
listener: (this: UISwiper, ev: HTMLElementEventMap[K]) => unknown,
|
|
40
|
+
options?: boolean | AddEventListenerOptions,
|
|
41
|
+
): void;
|
|
42
|
+
addEventListener(type: 'autoplay-pause', listener: (ev: SwiperAutoplayPauseEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
43
|
+
addEventListener(type: 'autoplay-resume', listener: (ev: SwiperAutoplayResumeEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
44
|
+
addEventListener(type: 'change', listener: (ev: SwiperChangeEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
31
45
|
}
|
|
@@ -5,6 +5,10 @@ component: Swiper
|
|
|
5
5
|
category: layout
|
|
6
6
|
version: 1
|
|
7
7
|
description: CSS-first carousel with scroll-snap. Supports autoplay, loop, and peek; JS-stamped pagination dots and paddles.
|
|
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
|
+
- button-ui
|
|
8
12
|
props:
|
|
9
13
|
autoplay:
|
|
10
14
|
description: Enable auto-advance
|
|
@@ -84,6 +84,13 @@
|
|
|
84
84
|
"x-adiaui": {
|
|
85
85
|
"anti_patterns": [],
|
|
86
86
|
"category": "agent",
|
|
87
|
+
"composes": [
|
|
88
|
+
"check-ui",
|
|
89
|
+
"icon-ui",
|
|
90
|
+
"progress-ui",
|
|
91
|
+
"pagination-ui",
|
|
92
|
+
"badge-ui"
|
|
93
|
+
],
|
|
87
94
|
"events": {
|
|
88
95
|
"cell-click": {
|
|
89
96
|
"description": "Fired when a data cell is clicked."
|
|
@@ -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 TableCellClickEvent = CustomEvent<unknown>;
|
|
16
|
+
export type TablePageEvent = CustomEvent<unknown>;
|
|
17
|
+
export type TableResizeEvent = CustomEvent<unknown>;
|
|
18
|
+
export type TableSelectEvent = CustomEvent<unknown>;
|
|
19
|
+
export type TableSortEvent = CustomEvent<unknown>;
|
|
20
|
+
|
|
14
21
|
export class UITable extends UIElement {
|
|
15
22
|
/** Column definitions. Array of {key, label, type?, width?, minWidth?, maxWidth?, flex?, sortable?, resizable?, filterable?, pinned?, hidden?, accessor?, format?, render?, sortFn?, filterType?, meta?}. Alternative to declarative <col-def> children. */
|
|
16
23
|
columns: unknown[];
|
|
@@ -34,4 +41,15 @@ export class UITable extends UIElement {
|
|
|
34
41
|
sortable: boolean;
|
|
35
42
|
/** Alternate row background colors for visual scanning. */
|
|
36
43
|
striped: boolean;
|
|
44
|
+
|
|
45
|
+
addEventListener<K extends keyof HTMLElementEventMap>(
|
|
46
|
+
type: K,
|
|
47
|
+
listener: (this: UITable, ev: HTMLElementEventMap[K]) => unknown,
|
|
48
|
+
options?: boolean | AddEventListenerOptions,
|
|
49
|
+
): void;
|
|
50
|
+
addEventListener(type: 'cell-click', listener: (ev: TableCellClickEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
51
|
+
addEventListener(type: 'page', listener: (ev: TablePageEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
52
|
+
addEventListener(type: 'resize', listener: (ev: TableResizeEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
53
|
+
addEventListener(type: 'select', listener: (ev: TableSelectEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
54
|
+
addEventListener(type: 'sort', listener: (ev: TableSortEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
37
55
|
}
|
|
@@ -8,6 +8,14 @@ category: agent
|
|
|
8
8
|
version: 1
|
|
9
9
|
description: Data table with sorting, selection, pagination, search, column resize, keyboard nav,
|
|
10
10
|
cell types, and CSV export. CSS grid + ARIA grid roles.
|
|
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
|
+
- check-ui
|
|
15
|
+
- icon-ui
|
|
16
|
+
- progress-ui
|
|
17
|
+
- pagination-ui
|
|
18
|
+
- badge-ui
|
|
11
19
|
props:
|
|
12
20
|
columns:
|
|
13
21
|
description: Column definitions. Array of {key, label, type?, width?, minWidth?, maxWidth?, flex?, sortable?, resizable?, filterable?, pinned?, hidden?, accessor?, format?, render?, sortFn?, filterType?, meta?}. Alternative to declarative <col-def> children.
|
|
@@ -73,6 +73,18 @@
|
|
|
73
73
|
"x-adiaui": {
|
|
74
74
|
"anti_patterns": [],
|
|
75
75
|
"category": "agent",
|
|
76
|
+
"composes": [
|
|
77
|
+
"text-ui",
|
|
78
|
+
"badge-ui",
|
|
79
|
+
"search-ui",
|
|
80
|
+
"button-ui",
|
|
81
|
+
"field-ui",
|
|
82
|
+
"select-ui",
|
|
83
|
+
"input-ui",
|
|
84
|
+
"menu-item-ui",
|
|
85
|
+
"icon-ui",
|
|
86
|
+
"check-ui"
|
|
87
|
+
],
|
|
76
88
|
"events": {
|
|
77
89
|
"columns-change": {
|
|
78
90
|
"description": "Column visibility changed. Detail: { hiddenColumns }."
|
|
@@ -5,12 +5,18 @@
|
|
|
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 TableToolbarColumnsChangeEvent = CustomEvent<unknown>;
|
|
16
|
+
export type TableToolbarFilterChangeEvent = CustomEvent<unknown>;
|
|
17
|
+
export type TableToolbarSearchEvent = CustomEvent<unknown>;
|
|
18
|
+
export type TableToolbarSortChangeEvent = CustomEvent<unknown>;
|
|
19
|
+
|
|
14
20
|
export class UITableToolbar extends UIElement {
|
|
15
21
|
/** Optional count badge value shown next to the title. When unset, falls back to the row count of the bound table. */
|
|
16
22
|
count: string;
|
|
@@ -30,4 +36,14 @@ export class UITableToolbar extends UIElement {
|
|
|
30
36
|
text: string;
|
|
31
37
|
/** Toolbar visual variant. `default` renders bare on parent surface; `card` adds the same chrome as a card-ui header. */
|
|
32
38
|
variant: 'default' | 'card';
|
|
39
|
+
|
|
40
|
+
addEventListener<K extends keyof HTMLElementEventMap>(
|
|
41
|
+
type: K,
|
|
42
|
+
listener: (this: UITableToolbar, ev: HTMLElementEventMap[K]) => unknown,
|
|
43
|
+
options?: boolean | AddEventListenerOptions,
|
|
44
|
+
): void;
|
|
45
|
+
addEventListener(type: 'columns-change', listener: (ev: TableToolbarColumnsChangeEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
46
|
+
addEventListener(type: 'filter-change', listener: (ev: TableToolbarFilterChangeEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
47
|
+
addEventListener(type: 'search', listener: (ev: TableToolbarSearchEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
48
|
+
addEventListener(type: 'sort-change', listener: (ev: TableToolbarSortChangeEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
33
49
|
}
|
|
@@ -15,6 +15,19 @@ description: >-
|
|
|
15
15
|
column descriptor's `filter` field overrides the auto-detect: `'select'`
|
|
16
16
|
forces multi-select even on high-cardinality columns; `'text'` forces a
|
|
17
17
|
contains input even on small enums.
|
|
18
|
+
# Per ADR-0027 — primitives that programmatically create other primitives
|
|
19
|
+
# do NOT auto-import them. Consumer (or demo shell) must explicitly import.
|
|
20
|
+
composes:
|
|
21
|
+
- text-ui
|
|
22
|
+
- badge-ui
|
|
23
|
+
- search-ui
|
|
24
|
+
- button-ui
|
|
25
|
+
- field-ui
|
|
26
|
+
- select-ui
|
|
27
|
+
- input-ui
|
|
28
|
+
- menu-item-ui
|
|
29
|
+
- icon-ui
|
|
30
|
+
- check-ui
|
|
18
31
|
props:
|
|
19
32
|
for:
|
|
20
33
|
description: id-ref of the table-ui to control. Falls back to the first sibling table-ui within the same parent when omitted.
|
|
@@ -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 TabsChangeEvent = CustomEvent<unknown>;
|
|
16
|
+
|
|
14
17
|
export class UITabs extends UIElement {
|
|
15
18
|
/** Tab strip orientation. Set to 'vertical' for vertical layout; empty/omitted for horizontal. */
|
|
16
19
|
orientation: string;
|
|
@@ -18,4 +21,11 @@ export class UITabs extends UIElement {
|
|
|
18
21
|
value: string;
|
|
19
22
|
/** Visual variant — default underline strip, `pills` for filled pill tabs, `underline` (explicit). */
|
|
20
23
|
variant: 'default' | 'pills' | 'underline' | 'segmented' | 'bordered';
|
|
24
|
+
|
|
25
|
+
addEventListener<K extends keyof HTMLElementEventMap>(
|
|
26
|
+
type: K,
|
|
27
|
+
listener: (this: UITabs, ev: HTMLElementEventMap[K]) => unknown,
|
|
28
|
+
options?: boolean | AddEventListenerOptions,
|
|
29
|
+
): void;
|
|
30
|
+
addEventListener(type: 'change', listener: (ev: TabsChangeEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
21
31
|
}
|
|
@@ -7,6 +7,10 @@ component: Tabs
|
|
|
7
7
|
category: container
|
|
8
8
|
version: 1
|
|
9
9
|
description: Tabbed panel switcher. Renders button strip from child tab-ui elements.
|
|
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
|
orientation:
|
|
12
16
|
description: Tab strip orientation. Set to 'vertical' for vertical layout; empty/omitted for horizontal.
|
package/components/tag/tag.d.ts
CHANGED
|
@@ -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 TagRemoveEvent = CustomEvent<unknown>;
|
|
16
|
+
|
|
14
17
|
export class UITag extends UIElement {
|
|
15
18
|
/** Disables interaction and dims the tag. */
|
|
16
19
|
disabled: boolean;
|
|
@@ -24,4 +27,11 @@ export class UITag extends UIElement {
|
|
|
24
27
|
textContent: string;
|
|
25
28
|
/** Semantic variant — `default | info | success | warning | danger`. */
|
|
26
29
|
variant: 'default' | 'info' | 'success' | 'warning' | 'danger';
|
|
30
|
+
|
|
31
|
+
addEventListener<K extends keyof HTMLElementEventMap>(
|
|
32
|
+
type: K,
|
|
33
|
+
listener: (this: UITag, ev: HTMLElementEventMap[K]) => unknown,
|
|
34
|
+
options?: boolean | AddEventListenerOptions,
|
|
35
|
+
): void;
|
|
36
|
+
addEventListener(type: 'remove', listener: (ev: TagRemoveEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
27
37
|
}
|
|
@@ -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';
|
|
@@ -42,7 +42,24 @@
|
|
|
42
42
|
"x-adiaui": {
|
|
43
43
|
"anti_patterns": [],
|
|
44
44
|
"category": "display",
|
|
45
|
-
"
|
|
45
|
+
"composes": [
|
|
46
|
+
"icon-ui"
|
|
47
|
+
],
|
|
48
|
+
"events": {
|
|
49
|
+
"timeline-toggle": {
|
|
50
|
+
"description": "Fired when a collapsible timeline item is expanded or collapsed. Detail carries the toggled item's id + new open state.",
|
|
51
|
+
"detail": {
|
|
52
|
+
"id": {
|
|
53
|
+
"description": "Item id (matches the timeline-item-ui's data-id attr).",
|
|
54
|
+
"type": "string"
|
|
55
|
+
},
|
|
56
|
+
"open": {
|
|
57
|
+
"description": "New open state after the toggle.",
|
|
58
|
+
"type": "boolean"
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
},
|
|
46
63
|
"examples": [
|
|
47
64
|
{
|
|
48
65
|
"description": "Order tracking card with a timeline showing order status milestones from placed to delivered.",
|
|
@@ -5,15 +5,32 @@
|
|
|
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 TimelineToggleEventDetail {
|
|
16
|
+
/** Item id (matches the timeline-item-ui's data-id attr). */
|
|
17
|
+
id: string;
|
|
18
|
+
/** New open state after the toggle. */
|
|
19
|
+
open: boolean;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export type TimelineToggleEvent = CustomEvent<TimelineToggleEventDetail>;
|
|
23
|
+
|
|
14
24
|
export class UITimeline extends UIElement {
|
|
15
25
|
/** Layout direction */
|
|
16
26
|
orientation: 'vertical' | 'horizontal';
|
|
17
27
|
/** Rail size preset — use `sm` for agent-reasoning/pipeline views; `md` is the default. */
|
|
18
28
|
size: 'sm' | 'md';
|
|
29
|
+
|
|
30
|
+
addEventListener<K extends keyof HTMLElementEventMap>(
|
|
31
|
+
type: K,
|
|
32
|
+
listener: (this: UITimeline, ev: HTMLElementEventMap[K]) => unknown,
|
|
33
|
+
options?: boolean | AddEventListenerOptions,
|
|
34
|
+
): void;
|
|
35
|
+
addEventListener(type: 'timeline-toggle', listener: (ev: TimelineToggleEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
19
36
|
}
|
|
@@ -7,6 +7,10 @@ component: Timeline
|
|
|
7
7
|
category: display
|
|
8
8
|
version: 1
|
|
9
9
|
description: "Timeline and step wizard. Two modes: timeline (per-item state) and steps (parent-driven)."
|
|
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
|
orientation:
|
|
12
16
|
description: Layout direction
|
|
@@ -21,7 +25,16 @@ props:
|
|
|
21
25
|
default: md
|
|
22
26
|
reflect: true
|
|
23
27
|
enum: [sm, md]
|
|
24
|
-
events:
|
|
28
|
+
events:
|
|
29
|
+
timeline-toggle:
|
|
30
|
+
description: Fired when a collapsible timeline item is expanded or collapsed. Detail carries the toggled item's id + new open state.
|
|
31
|
+
detail:
|
|
32
|
+
id:
|
|
33
|
+
type: string
|
|
34
|
+
description: Item id (matches the timeline-item-ui's data-id attr).
|
|
35
|
+
open:
|
|
36
|
+
type: boolean
|
|
37
|
+
description: New open state after the toggle.
|
|
25
38
|
slots:
|
|
26
39
|
default:
|
|
27
40
|
description: Accepts <timeline-item-ui> children.
|
|
@@ -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 ToastCloseEvent = CustomEvent<unknown>;
|
|
16
|
+
|
|
14
17
|
export class UIToast extends UIElement {
|
|
15
18
|
/** Auto-dismiss time in milliseconds. 0 disables auto-dismiss. */
|
|
16
19
|
duration: number;
|
|
@@ -20,4 +23,11 @@ export class UIToast extends UIElement {
|
|
|
20
23
|
text: string;
|
|
21
24
|
/** Semantic variant — `default | info | success | warning | danger`. `primary` and `muted` are style hints; canonical "neutral but interesting" tone is `info`. */
|
|
22
25
|
variant: 'default' | 'info' | 'success' | 'warning' | 'danger' | 'primary' | 'muted' | 'neutral';
|
|
26
|
+
|
|
27
|
+
addEventListener<K extends keyof HTMLElementEventMap>(
|
|
28
|
+
type: K,
|
|
29
|
+
listener: (this: UIToast, ev: HTMLElementEventMap[K]) => unknown,
|
|
30
|
+
options?: boolean | AddEventListenerOptions,
|
|
31
|
+
): void;
|
|
32
|
+
addEventListener(type: 'close', listener: (ev: ToastCloseEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
23
33
|
}
|
|
@@ -5,15 +5,25 @@
|
|
|
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 ToggleGroupChangeEvent = CustomEvent<unknown>;
|
|
16
|
+
|
|
14
17
|
export class UIToggleGroup extends UIElement {
|
|
15
18
|
/** When true, restrict to one active option (single-select). */
|
|
16
19
|
single: boolean;
|
|
17
20
|
/** Comma-separated selected values */
|
|
18
21
|
value: string;
|
|
22
|
+
|
|
23
|
+
addEventListener<K extends keyof HTMLElementEventMap>(
|
|
24
|
+
type: K,
|
|
25
|
+
listener: (this: UIToggleGroup, ev: HTMLElementEventMap[K]) => unknown,
|
|
26
|
+
options?: boolean | AddEventListenerOptions,
|
|
27
|
+
): void;
|
|
28
|
+
addEventListener(type: 'change', listener: (ev: ToggleGroupChangeEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
19
29
|
}
|
|
@@ -124,6 +124,9 @@
|
|
|
124
124
|
"x-adiaui": {
|
|
125
125
|
"anti_patterns": [],
|
|
126
126
|
"category": "control",
|
|
127
|
+
"composes": [
|
|
128
|
+
"button-ui"
|
|
129
|
+
],
|
|
127
130
|
"events": {
|
|
128
131
|
"scheme-change": {
|
|
129
132
|
"description": "Fired when the active scheme changes. detail contains { scheme: \"light\" | \"dark\", source: \"press\" | \"media\" | \"programmatic\" }."
|
|
@@ -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 ToggleSchemeSchemeChangeEvent = CustomEvent<unknown>;
|
|
16
|
+
|
|
14
17
|
export class UIToggleScheme extends UIElement {
|
|
15
18
|
/** Resolved scheme ("light" | "dark"). Read-only; mutate via .setScheme() or .toggle(). */
|
|
16
19
|
activeScheme: '' | 'light' | 'dark';
|
|
@@ -38,4 +41,11 @@ export class UIToggleScheme extends UIElement {
|
|
|
38
41
|
target: string;
|
|
39
42
|
/** Visual style forwarded to the internal <button-ui>. Defaults to "ghost" (matches app practice). */
|
|
40
43
|
variant: 'default' | 'solid' | 'outline' | 'ghost' | 'primary' | 'secondary' | 'soft';
|
|
44
|
+
|
|
45
|
+
addEventListener<K extends keyof HTMLElementEventMap>(
|
|
46
|
+
type: K,
|
|
47
|
+
listener: (this: UIToggleScheme, ev: HTMLElementEventMap[K]) => unknown,
|
|
48
|
+
options?: boolean | AddEventListenerOptions,
|
|
49
|
+
): void;
|
|
50
|
+
addEventListener(type: 'scheme-change', listener: (ev: ToggleSchemeSchemeChangeEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
41
51
|
}
|
|
@@ -13,6 +13,10 @@ description: >-
|
|
|
13
13
|
<theme-panel>), and the moon/sun icon swap. Replaces the hand-wired
|
|
14
14
|
`<button-ui id="theme-toggle">` + `applyScheme()` pattern previously
|
|
15
15
|
duplicated across apps/genui, apps/construct-canvas, playgrounds/chat.
|
|
16
|
+
# Per ADR-0027 — primitives that programmatically create other primitives
|
|
17
|
+
# do NOT auto-import them. Consumer (or demo shell) must explicitly import.
|
|
18
|
+
composes:
|
|
19
|
+
- button-ui
|
|
16
20
|
props:
|
|
17
21
|
scheme:
|
|
18
22
|
description: Initial scheme — "auto" follows prefers-color-scheme; "light" / "dark" force.
|
|
@@ -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';
|
|
@@ -8,6 +8,10 @@ category: layout
|
|
|
8
8
|
version: 1
|
|
9
9
|
description: Horizontal action bar with automatic overflow. Items that don't fit move to a spillover
|
|
10
10
|
popover menu.
|
|
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
|
|
11
15
|
props:
|
|
12
16
|
bordered:
|
|
13
17
|
description: Adds a border around the toolbar for visual separation from surrounding content.
|
|
@@ -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';
|