@adia-ai/web-components 0.5.8 → 0.5.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/USAGE.md +218 -0
- package/components/accordion/accordion.d.ts +22 -1
- package/components/action-list/action-list.d.ts +14 -1
- package/components/agent-artifact/agent-artifact.d.ts +1 -1
- package/components/agent-feedback-bar/agent-feedback-bar.d.ts +1 -1
- package/components/agent-questions/agent-questions.d.ts +1 -1
- package/components/agent-reasoning/agent-reasoning.d.ts +1 -1
- package/components/agent-suggestions/agent-suggestions.d.ts +1 -1
- package/components/agent-trace/agent-trace.d.ts +1 -1
- package/components/alert/alert.d.ts +1 -1
- package/components/avatar/avatar.d.ts +8 -1
- package/components/badge/badge.d.ts +1 -1
- package/components/block/block.d.ts +1 -1
- package/components/breadcrumb/breadcrumb.d.ts +1 -1
- package/components/button/button.d.ts +1 -1
- package/components/canvas/canvas.d.ts +1 -1
- package/components/card/card.d.ts +1 -1
- package/components/chart/chart.d.ts +1 -1
- package/components/chart-legend/chart-legend.d.ts +1 -1
- package/components/chat-thread/chat-thread.d.ts +40 -1
- package/components/code/code.css +1 -1
- package/components/col/col.a2ui.json +4 -4
- package/components/col/col.d.ts +2 -2
- package/components/col/col.yaml +2 -2
- package/components/command/command.d.ts +1 -1
- package/components/demo-toggle/demo-toggle.d.ts +1 -1
- package/components/description-list/description-list.d.ts +1 -1
- package/components/divider/divider.d.ts +1 -1
- package/components/drawer/drawer.d.ts +1 -1
- package/components/embed/embed.d.ts +1 -1
- package/components/empty-state/class.js +10 -4
- package/components/empty-state/empty-state.a2ui.json +5 -0
- package/components/empty-state/empty-state.css +36 -0
- package/components/empty-state/empty-state.d.ts +6 -1
- package/components/empty-state/empty-state.test.js +77 -0
- package/components/empty-state/empty-state.yaml +9 -0
- package/components/feed/feed.css +1 -1
- package/components/feed/feed.d.ts +29 -5
- package/components/field/field.d.ts +1 -1
- package/components/fields/fields.d.ts +1 -1
- package/components/grid/grid.d.ts +1 -1
- package/components/heatmap/heatmap.d.ts +1 -1
- package/components/icon/icon.d.ts +1 -1
- package/components/image/image.d.ts +1 -1
- package/components/input/class.js +2 -1
- package/components/input/input.a2ui.json +5 -0
- package/components/input/input.test.js +99 -0
- package/components/input/input.yaml +14 -0
- package/components/inspector/inspector.d.ts +1 -1
- package/components/kbd/kbd.d.ts +1 -1
- package/components/link/link.d.ts +1 -1
- package/components/list/list.d.ts +10 -1
- package/components/menu/menu-divider.a2ui.json +41 -0
- package/components/menu/menu-divider.yaml +15 -0
- package/components/menu/menu-item.a2ui.json +77 -0
- package/components/menu/menu-item.yaml +45 -0
- package/components/menu/menu.d.ts +17 -1
- package/components/modal/modal.d.ts +1 -1
- package/components/nav/nav.css +1 -1
- package/components/nav/nav.d.ts +1 -1
- package/components/nav-group/nav-group.d.ts +1 -1
- package/components/nav-item/nav-item.d.ts +1 -1
- package/components/noodles/noodles.d.ts +1 -1
- package/components/page/page.d.ts +1 -1
- package/components/pagination/pagination.d.ts +1 -1
- package/components/pane/pane.d.ts +1 -1
- package/components/pipeline-status/pipeline-status.d.ts +1 -1
- package/components/popover/popover.d.ts +1 -1
- package/components/progress/progress.d.ts +1 -1
- package/components/progress-row/progress-row.d.ts +1 -1
- package/components/range/range.css +1 -1
- package/components/richtext/richtext.a2ui.json +4 -4
- package/components/richtext/richtext.d.ts +2 -2
- package/components/richtext/richtext.yaml +2 -2
- package/components/row/row.d.ts +1 -1
- package/components/segment/segment.d.ts +1 -1
- package/components/select/class.js +28 -0
- package/components/select/select.css +1 -1
- package/components/select/select.yaml +28 -0
- package/components/skeleton/skeleton.d.ts +1 -1
- package/components/slider/class.js +20 -50
- package/components/slider/slider.css +1 -1
- package/components/stack/stack.d.ts +1 -1
- package/components/step-progress/step-progress.d.ts +1 -1
- package/components/stepper/stepper-item.a2ui.json +74 -0
- package/components/stepper/stepper-item.yaml +45 -0
- package/components/stepper/stepper.d.ts +13 -1
- package/components/stream/stream.d.ts +1 -1
- package/components/swatch/swatch.css +1 -1
- package/components/swatch/swatch.d.ts +1 -1
- package/components/swiper/swiper.d.ts +1 -1
- package/components/switch/switch.css +1 -1
- package/components/table/table.d.ts +1 -1
- package/components/table-toolbar/table-toolbar.d.ts +1 -1
- package/components/tabs/tabs.d.ts +12 -1
- package/components/tag/tag.d.ts +1 -1
- package/components/text/text.d.ts +1 -1
- package/components/textarea/class.js +7 -1
- package/components/textarea/textarea.a2ui.json +5 -0
- package/components/textarea/textarea.yaml +14 -0
- package/components/timeline/timeline.d.ts +20 -1
- package/components/toast/class.js +9 -0
- package/components/toast/toast.d.ts +9 -5
- package/components/toast/toast.yaml +16 -0
- package/components/toggle-group/toggle-group.d.ts +12 -1
- package/components/toggle-group/toggle-option.a2ui.json +61 -0
- package/components/toggle-group/toggle-option.yaml +33 -0
- package/components/toggle-scheme/toggle-scheme.d.ts +1 -1
- package/components/toolbar/toolbar-group.a2ui.json +41 -0
- package/components/toolbar/toolbar-group.yaml +16 -0
- package/components/toolbar/toolbar.d.ts +4 -1
- package/components/tooltip/tooltip.css +2 -2
- package/components/tooltip/tooltip.d.ts +1 -1
- package/components/tree/tree.css +1 -1
- package/components/tree/tree.d.ts +18 -1
- package/core/form.js +93 -0
- package/core/signals.d.ts +28 -0
- package/index.d.ts +2 -2
- package/package.json +1 -1
- package/styles/colors/semantics.css +6 -0
- package/styles/tokens.css +3 -0
- package/styles/typography.css +2 -0
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://adiaui.dev/a2ui/v0_9/components/StepperItem.json",
|
|
4
|
+
"title": "StepperItem",
|
|
5
|
+
"description": "Child of `<stepper-ui>`. One stage in a multi-step flow with status (idle | active | completed | error) + optional icon + description.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"allOf": [
|
|
8
|
+
{
|
|
9
|
+
"$ref": "common_types.json#/$defs/ComponentCommon"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"$ref": "common_types.json#/$defs/CatalogComponentCommon"
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"properties": {
|
|
16
|
+
"description": {
|
|
17
|
+
"description": "Secondary description line under the label.",
|
|
18
|
+
"type": "string",
|
|
19
|
+
"default": ""
|
|
20
|
+
},
|
|
21
|
+
"component": {
|
|
22
|
+
"const": "StepperItem"
|
|
23
|
+
},
|
|
24
|
+
"icon": {
|
|
25
|
+
"description": "Optional leading Phosphor icon name; overrides the auto-stamped numeric badge.",
|
|
26
|
+
"type": "string",
|
|
27
|
+
"default": ""
|
|
28
|
+
},
|
|
29
|
+
"status": {
|
|
30
|
+
"description": "Canonical stage-progress state. Mutually exclusive (prevents the\n`active && completed` footgun the prior multi-Boolean shape allowed).",
|
|
31
|
+
"type": "string",
|
|
32
|
+
"enum": [
|
|
33
|
+
"idle",
|
|
34
|
+
"active",
|
|
35
|
+
"completed",
|
|
36
|
+
"error"
|
|
37
|
+
],
|
|
38
|
+
"default": "idle"
|
|
39
|
+
},
|
|
40
|
+
"text": {
|
|
41
|
+
"description": "Stage label.",
|
|
42
|
+
"type": "string",
|
|
43
|
+
"default": ""
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"required": [
|
|
47
|
+
"component"
|
|
48
|
+
],
|
|
49
|
+
"unevaluatedProperties": false,
|
|
50
|
+
"x-adiaui": {
|
|
51
|
+
"anti_patterns": [],
|
|
52
|
+
"category": "navigation",
|
|
53
|
+
"composes": [],
|
|
54
|
+
"events": {},
|
|
55
|
+
"examples": [],
|
|
56
|
+
"keywords": [],
|
|
57
|
+
"name": "UIStepperItem",
|
|
58
|
+
"related": [],
|
|
59
|
+
"slots": {
|
|
60
|
+
"description": {
|
|
61
|
+
"description": "Custom description content; falls through to `[description]` prop if not slotted."
|
|
62
|
+
},
|
|
63
|
+
"label": {
|
|
64
|
+
"description": "Custom label content; falls through to `[text]` prop if not slotted."
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"states": [],
|
|
68
|
+
"synonyms": {},
|
|
69
|
+
"tag": "stepper-item-ui",
|
|
70
|
+
"tokens": {},
|
|
71
|
+
"traits": [],
|
|
72
|
+
"version": 1
|
|
73
|
+
}
|
|
74
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Edit this file; run `npm run build:components` to regenerate a2ui.json.
|
|
2
|
+
#
|
|
3
|
+
# §228 (v0.5.9): authored to close the §229 baseline class-export-undeclared
|
|
4
|
+
# drift for UIStepperItem. Ships as a sibling class in stepper/class.js
|
|
5
|
+
# + is registered alongside UIStepper.
|
|
6
|
+
|
|
7
|
+
# Child component of <stepper-ui>. Surface only inside that parent.
|
|
8
|
+
$schema: ../../../../scripts/schemas/component.yaml.schema.json
|
|
9
|
+
name: UIStepperItem
|
|
10
|
+
tag: stepper-item-ui
|
|
11
|
+
component: StepperItem
|
|
12
|
+
category: navigation
|
|
13
|
+
version: 1
|
|
14
|
+
description: |-
|
|
15
|
+
Child of `<stepper-ui>`. One stage in a multi-step flow with status (idle | active | completed | error) + optional icon + description.
|
|
16
|
+
|
|
17
|
+
props:
|
|
18
|
+
text:
|
|
19
|
+
description: Stage label.
|
|
20
|
+
type: string
|
|
21
|
+
default: ""
|
|
22
|
+
description:
|
|
23
|
+
description: Secondary description line under the label.
|
|
24
|
+
type: string
|
|
25
|
+
default: ""
|
|
26
|
+
icon:
|
|
27
|
+
description: Optional leading Phosphor icon name; overrides the auto-stamped numeric badge.
|
|
28
|
+
type: string
|
|
29
|
+
default: ""
|
|
30
|
+
status:
|
|
31
|
+
description: |-
|
|
32
|
+
Canonical stage-progress state. Mutually exclusive (prevents the
|
|
33
|
+
`active && completed` footgun the prior multi-Boolean shape allowed).
|
|
34
|
+
type: string
|
|
35
|
+
default: idle
|
|
36
|
+
enum:
|
|
37
|
+
- idle
|
|
38
|
+
- active
|
|
39
|
+
- completed
|
|
40
|
+
- error
|
|
41
|
+
slots:
|
|
42
|
+
label:
|
|
43
|
+
description: Custom label content; falls through to `[text]` prop if not slotted.
|
|
44
|
+
description:
|
|
45
|
+
description: Custom description content; falls through to `[description]` prop if not slotted.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @see https://ui-kit.exe.xyz/site/components/stepper
|
|
5
5
|
*
|
|
6
6
|
* Type declarations generated by scripts/build/dts-codegen.mjs from
|
|
7
|
-
* the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
|
|
7
|
+
* the component's `.a2ui.json` sidecar(s). Edit the source `.yaml`,
|
|
8
8
|
* run `npm run build:components`, then `npm run codegen:dts` to
|
|
9
9
|
* regenerate; or hand-author this file fully if rich event types are
|
|
10
10
|
* needed beyond what the yaml `events:` block can express.
|
|
@@ -18,3 +18,15 @@ export class UIStepper extends UIElement {
|
|
|
18
18
|
/** Current step index (0-based). */
|
|
19
19
|
step: number;
|
|
20
20
|
}
|
|
21
|
+
|
|
22
|
+
export class UIStepperItem extends UIElement {
|
|
23
|
+
/** Secondary description line under the label. */
|
|
24
|
+
description: string;
|
|
25
|
+
/** Optional leading Phosphor icon name; overrides the auto-stamped numeric badge. */
|
|
26
|
+
icon: string;
|
|
27
|
+
/** Canonical stage-progress state. Mutually exclusive (prevents the
|
|
28
|
+
`active && completed` footgun the prior multi-Boolean shape allowed). */
|
|
29
|
+
status: 'idle' | 'active' | 'completed' | 'error';
|
|
30
|
+
/** Stage label. */
|
|
31
|
+
text: string;
|
|
32
|
+
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @see https://ui-kit.exe.xyz/site/components/stream
|
|
5
5
|
*
|
|
6
6
|
* Type declarations generated by scripts/build/dts-codegen.mjs from
|
|
7
|
-
* the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
|
|
7
|
+
* the component's `.a2ui.json` sidecar(s). Edit the source `.yaml`,
|
|
8
8
|
* run `npm run build:components`, then `npm run codegen:dts` to
|
|
9
9
|
* regenerate; or hand-author this file fully if rich event types are
|
|
10
10
|
* needed beyond what the yaml `events:` block can express.
|
|
@@ -261,7 +261,7 @@
|
|
|
261
261
|
border-radius: var(--a-radius-xs);
|
|
262
262
|
transition: color 100ms ease-out, background 100ms ease-out;
|
|
263
263
|
}
|
|
264
|
-
:scope > [data-copy]:hover { color: var(--a-fg); background: var(--a-bg-
|
|
264
|
+
:scope > [data-copy]:hover { color: var(--a-fg); background: var(--a-bg-muted); }
|
|
265
265
|
:scope > [data-copy]:focus-visible {
|
|
266
266
|
outline: var(--swatch-select-ring-width) solid var(--swatch-select-ring);
|
|
267
267
|
outline-offset: 1px;
|
|
@@ -9,7 +9,7 @@ spacing demo pages.
|
|
|
9
9
|
* @see https://ui-kit.exe.xyz/site/components/swatch
|
|
10
10
|
*
|
|
11
11
|
* Type declarations generated by scripts/build/dts-codegen.mjs from
|
|
12
|
-
* the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
|
|
12
|
+
* the component's `.a2ui.json` sidecar(s). Edit the source `.yaml`,
|
|
13
13
|
* run `npm run build:components`, then `npm run codegen:dts` to
|
|
14
14
|
* regenerate; or hand-author this file fully if rich event types are
|
|
15
15
|
* needed beyond what the yaml `events:` block can express.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @see https://ui-kit.exe.xyz/site/components/swiper
|
|
5
5
|
*
|
|
6
6
|
* Type declarations generated by scripts/build/dts-codegen.mjs from
|
|
7
|
-
* the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
|
|
7
|
+
* the component's `.a2ui.json` sidecar(s). Edit the source `.yaml`,
|
|
8
8
|
* run `npm run build:components`, then `npm run codegen:dts` to
|
|
9
9
|
* regenerate; or hand-author this file fully if rich event types are
|
|
10
10
|
* needed beyond what the yaml `events:` block can express.
|
|
@@ -110,7 +110,7 @@ switch-ui[checked] [slot="thumb"] {
|
|
|
110
110
|
[slot="hint"] {
|
|
111
111
|
display: block;
|
|
112
112
|
margin-top: var(--switch-hint-mt, var(--a-space-1));
|
|
113
|
-
font-size: var(--switch-hint-size, var(--a-
|
|
113
|
+
font-size: var(--switch-hint-size, var(--a-ui-xs));
|
|
114
114
|
color: var(--switch-hint-fg, var(--a-fg-muted));
|
|
115
115
|
line-height: var(--switch-hint-lh, 1.4);
|
|
116
116
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @see https://ui-kit.exe.xyz/site/components/table
|
|
5
5
|
*
|
|
6
6
|
* Type declarations generated by scripts/build/dts-codegen.mjs from
|
|
7
|
-
* the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
|
|
7
|
+
* the component's `.a2ui.json` sidecar(s). Edit the source `.yaml`,
|
|
8
8
|
* run `npm run build:components`, then `npm run codegen:dts` to
|
|
9
9
|
* regenerate; or hand-author this file fully if rich event types are
|
|
10
10
|
* needed beyond what the yaml `events:` block can express.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @see https://ui-kit.exe.xyz/site/components/table-toolbar
|
|
5
5
|
*
|
|
6
6
|
* Type declarations generated by scripts/build/dts-codegen.mjs from
|
|
7
|
-
* the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
|
|
7
|
+
* the component's `.a2ui.json` sidecar(s). Edit the source `.yaml`,
|
|
8
8
|
* run `npm run build:components`, then `npm run codegen:dts` to
|
|
9
9
|
* regenerate; or hand-author this file fully if rich event types are
|
|
10
10
|
* needed beyond what the yaml `events:` block can express.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @see https://ui-kit.exe.xyz/site/components/tabs
|
|
5
5
|
*
|
|
6
6
|
* Type declarations generated by scripts/build/dts-codegen.mjs from
|
|
7
|
-
* the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
|
|
7
|
+
* the component's `.a2ui.json` sidecar(s). Edit the source `.yaml`,
|
|
8
8
|
* run `npm run build:components`, then `npm run codegen:dts` to
|
|
9
9
|
* regenerate; or hand-author this file fully if rich event types are
|
|
10
10
|
* needed beyond what the yaml `events:` block can express.
|
|
@@ -34,3 +34,14 @@ export class UITabs extends UIElement {
|
|
|
34
34
|
): void;
|
|
35
35
|
addEventListener(type: 'change', listener: (ev: TabsChangeEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
36
36
|
}
|
|
37
|
+
|
|
38
|
+
export class UITab extends UIElement {
|
|
39
|
+
/** Whether the tab is selectable. */
|
|
40
|
+
disabled: boolean;
|
|
41
|
+
/** Optional leading icon name (Phosphor) for the tab button. */
|
|
42
|
+
icon: string;
|
|
43
|
+
/** Tab button label (rendered by parent <tabs-ui>). */
|
|
44
|
+
text: string;
|
|
45
|
+
/** Stable id for the tab. Parent uses this to coordinate active state. */
|
|
46
|
+
value: string;
|
|
47
|
+
}
|
package/components/tag/tag.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @see https://ui-kit.exe.xyz/site/components/tag
|
|
5
5
|
*
|
|
6
6
|
* Type declarations generated by scripts/build/dts-codegen.mjs from
|
|
7
|
-
* the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
|
|
7
|
+
* the component's `.a2ui.json` sidecar(s). Edit the source `.yaml`,
|
|
8
8
|
* run `npm run build:components`, then `npm run codegen:dts` to
|
|
9
9
|
* regenerate; or hand-author this file fully if rich event types are
|
|
10
10
|
* needed beyond what the yaml `events:` block can express.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @see https://ui-kit.exe.xyz/site/components/text
|
|
5
5
|
*
|
|
6
6
|
* Type declarations generated by scripts/build/dts-codegen.mjs from
|
|
7
|
-
* the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
|
|
7
|
+
* the component's `.a2ui.json` sidecar(s). Edit the source `.yaml`,
|
|
8
8
|
* run `npm run build:components`, then `npm run codegen:dts` to
|
|
9
9
|
* regenerate; or hand-author this file fully if rich event types are
|
|
10
10
|
* needed beyond what the yaml `events:` block can express.
|
|
@@ -90,18 +90,24 @@ export class UITextarea extends UIFormElement {
|
|
|
90
90
|
this.value = text;
|
|
91
91
|
this.#textEl.toggleAttribute('data-empty', !text);
|
|
92
92
|
this.syncValue(text);
|
|
93
|
-
|
|
93
|
+
// §220 (v0.5.9, FEEDBACK-14 §3): trailing-debounce when `throttle > 0`.
|
|
94
|
+
this.scheduleThrottledInput();
|
|
94
95
|
};
|
|
95
96
|
|
|
96
97
|
#onKeydown = (e) => {
|
|
97
98
|
// Enter without shift submits; shift+enter inserts newline
|
|
98
99
|
if (e.key === 'Enter' && !e.shiftKey) {
|
|
99
100
|
e.preventDefault();
|
|
101
|
+
// §220: flush any pending throttled input before submit so listeners
|
|
102
|
+
// observe the latest value.
|
|
103
|
+
this.flushPendingInput();
|
|
100
104
|
this.dispatchEvent(new Event('submit', { bubbles: true }));
|
|
101
105
|
}
|
|
102
106
|
};
|
|
103
107
|
|
|
104
108
|
#onBlur = () => {
|
|
109
|
+
// §220: trailing `input` precedes `change`.
|
|
110
|
+
this.flushPendingInput();
|
|
105
111
|
this.dispatchEvent(new CustomEvent('change', { bubbles: true, detail: { value: this.value } }));
|
|
106
112
|
};
|
|
107
113
|
|
|
@@ -51,6 +51,11 @@
|
|
|
51
51
|
"description": "Number of visible text rows (sets min-height).",
|
|
52
52
|
"type": "number",
|
|
53
53
|
"default": 3
|
|
54
|
+
},
|
|
55
|
+
"throttle": {
|
|
56
|
+
"description": "§220 (v0.5.9, FEEDBACK-14 §3). Trailing-debounce on the `input`\nevent in milliseconds. When > 0, value mutates immediately + the UI\nstays responsive, but `input` dispatch is collapsed so only the\nfinal value in the throttle window emits. Useful for expensive\n`input`-driven computation (autosave preview, server-side\nautocomplete, large-doc reflow). `change` fires unthrottled on blur\n/ Enter; any pending `input` flushes before `change` so consumers\nsee input→input→…→input→change ordering. Default 0 preserves\nsynchronous emission.",
|
|
57
|
+
"type": "number",
|
|
58
|
+
"default": 0
|
|
54
59
|
}
|
|
55
60
|
},
|
|
56
61
|
"required": [
|
|
@@ -37,6 +37,20 @@ props:
|
|
|
37
37
|
description: Number of visible text rows (sets min-height).
|
|
38
38
|
type: number
|
|
39
39
|
default: 3
|
|
40
|
+
throttle:
|
|
41
|
+
description: |-
|
|
42
|
+
§220 (v0.5.9, FEEDBACK-14 §3). Trailing-debounce on the `input`
|
|
43
|
+
event in milliseconds. When > 0, value mutates immediately + the UI
|
|
44
|
+
stays responsive, but `input` dispatch is collapsed so only the
|
|
45
|
+
final value in the throttle window emits. Useful for expensive
|
|
46
|
+
`input`-driven computation (autosave preview, server-side
|
|
47
|
+
autocomplete, large-doc reflow). `change` fires unthrottled on blur
|
|
48
|
+
/ Enter; any pending `input` flushes before `change` so consumers
|
|
49
|
+
see input→input→…→input→change ordering. Default 0 preserves
|
|
50
|
+
synchronous emission.
|
|
51
|
+
type: number
|
|
52
|
+
default: 0
|
|
53
|
+
reflect: true
|
|
40
54
|
events:
|
|
41
55
|
change:
|
|
42
56
|
description: Fired when the textarea loses focus after a value change.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @see https://ui-kit.exe.xyz/site/components/timeline
|
|
5
5
|
*
|
|
6
6
|
* Type declarations generated by scripts/build/dts-codegen.mjs from
|
|
7
|
-
* the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
|
|
7
|
+
* the component's `.a2ui.json` sidecar(s). Edit the source `.yaml`,
|
|
8
8
|
* run `npm run build:components`, then `npm run codegen:dts` to
|
|
9
9
|
* regenerate; or hand-author this file fully if rich event types are
|
|
10
10
|
* needed beyond what the yaml `events:` block can express.
|
|
@@ -32,3 +32,22 @@ export class UITimeline extends UIElement {
|
|
|
32
32
|
): void;
|
|
33
33
|
addEventListener(type: 'timeline-toggle', listener: (ev: TimelineToggleEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
34
34
|
}
|
|
35
|
+
|
|
36
|
+
export class UITimelineItem extends UIElement {
|
|
37
|
+
/** Subtitle below the label. */
|
|
38
|
+
description: string;
|
|
39
|
+
/** Elapsed time (e.g. "1.2s", "340ms"). */
|
|
40
|
+
duration: string;
|
|
41
|
+
/** Optional leading icon name (Phosphor). */
|
|
42
|
+
icon: string;
|
|
43
|
+
/** Show a spinner instead of the icon while status=pending. */
|
|
44
|
+
spinner: boolean;
|
|
45
|
+
/** Lifecycle state (idle | pending | done | failed). */
|
|
46
|
+
status: string;
|
|
47
|
+
/** Primary step label. */
|
|
48
|
+
text: string;
|
|
49
|
+
/** Absolute timestamp (HH:MM or ISO). */
|
|
50
|
+
time: string;
|
|
51
|
+
/** Visual variant (default | accent | success | warning | danger). */
|
|
52
|
+
variant: string;
|
|
53
|
+
}
|
|
@@ -82,6 +82,15 @@ export class UIToast extends UIElement {
|
|
|
82
82
|
*/
|
|
83
83
|
static show(opts = {}) {
|
|
84
84
|
const { text, variant = 'info', duration = 4000, position = 'bottom-right' } = opts;
|
|
85
|
+
// §224 (v0.5.9, FEEDBACK-10 §2): mark the spawned feed container so
|
|
86
|
+
// DOM-query consumers (Playwright, devtools, instrumentation) can
|
|
87
|
+
// distinguish toast-spawned <feed-ui> from user-authored ones. The marker
|
|
88
|
+
// is set once at container-creation time; subsequent posts to the same
|
|
89
|
+
// container don't re-stamp (idempotent).
|
|
90
|
+
const container = UIFeed.get(position);
|
|
91
|
+
if (container && !container.hasAttribute('data-spawned-by')) {
|
|
92
|
+
container.setAttribute('data-spawned-by', 'toast');
|
|
93
|
+
}
|
|
85
94
|
return UIFeed.post({
|
|
86
95
|
text,
|
|
87
96
|
variant: variant === 'error' ? 'danger' : variant,
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @see https://ui-kit.exe.xyz/site/components/toast
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
6
|
+
* HAND-AUTHORED (not codegen'd) per §246 (v0.5.9) — the yaml
|
|
7
|
+
* `props:`/`events:` shape can't express the imperative `static show()`
|
|
8
|
+
* API the runtime ships. `dts-codegen.mjs` keeps this file in its
|
|
9
|
+
* `HAND_AUTHORED_DTS` skip list so subsequent builds preserve the
|
|
10
|
+
* static-method signature.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
import { UIElement } from '../../core/element.js';
|
|
@@ -49,6 +49,10 @@ export class UIToast extends UIElement {
|
|
|
49
49
|
* alternative to declarative `<toast-ui>`. Returns a `UIToastFeedHandle`
|
|
50
50
|
* for programmatic dismiss / update.
|
|
51
51
|
*
|
|
52
|
+
* §224 (v0.5.9): the spawned `<feed-ui>` container is stamped with
|
|
53
|
+
* `data-spawned-by="toast"` for DOM-query distinction from user-authored
|
|
54
|
+
* `<feed-ui>` containers.
|
|
55
|
+
*
|
|
52
56
|
* Legacy alias `variant: 'error'` is auto-mapped to `variant: 'danger'`.
|
|
53
57
|
*
|
|
54
58
|
* @example
|
|
@@ -44,6 +44,22 @@ props:
|
|
|
44
44
|
- muted
|
|
45
45
|
- neutral
|
|
46
46
|
events: {}
|
|
47
|
+
usage: |-
|
|
48
|
+
§224 (v0.5.9): `UIToast.show()` routes through `UIFeed.post()` — the
|
|
49
|
+
spawned DOM element is a `<feed-ui>` container with `<feed-item-ui>`
|
|
50
|
+
children. The container carries `data-spawned-by="toast"` so DOM-query
|
|
51
|
+
consumers (Playwright, devtools, instrumentation) can distinguish
|
|
52
|
+
toast-spawned feeds from user-authored ones:
|
|
53
|
+
|
|
54
|
+
```js
|
|
55
|
+
UIToast.show({ text: 'Saved.', variant: 'success' });
|
|
56
|
+
|
|
57
|
+
// Distinguish toast-spawned <feed-ui> in tests / devtools:
|
|
58
|
+
document.querySelector('feed-ui[data-spawned-by="toast"]');
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
The marker is set once at container-creation time + per-position (a
|
|
62
|
+
single `<feed-ui>` instance serves all toasts for a given position).
|
|
47
63
|
slots: {}
|
|
48
64
|
states:
|
|
49
65
|
- name: idle
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @see https://ui-kit.exe.xyz/site/components/toggle-group
|
|
5
5
|
*
|
|
6
6
|
* Type declarations generated by scripts/build/dts-codegen.mjs from
|
|
7
|
-
* the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
|
|
7
|
+
* the component's `.a2ui.json` sidecar(s). Edit the source `.yaml`,
|
|
8
8
|
* run `npm run build:components`, then `npm run codegen:dts` to
|
|
9
9
|
* regenerate; or hand-author this file fully if rich event types are
|
|
10
10
|
* needed beyond what the yaml `events:` block can express.
|
|
@@ -32,3 +32,14 @@ export class UIToggleGroup extends UIElement {
|
|
|
32
32
|
): void;
|
|
33
33
|
addEventListener(type: 'change', listener: (ev: ToggleGroupChangeEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
34
34
|
}
|
|
35
|
+
|
|
36
|
+
export class UIToggleOption extends UIElement {
|
|
37
|
+
/** Disabled state — blocks pointer + keyboard activation. */
|
|
38
|
+
disabled: boolean;
|
|
39
|
+
/** Optional Phosphor icon name; renders as a leading icon. */
|
|
40
|
+
icon: string;
|
|
41
|
+
/** Visible label text. */
|
|
42
|
+
text: string;
|
|
43
|
+
/** Stable identifier matched against the parent group's `value`. */
|
|
44
|
+
value: string;
|
|
45
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://adiaui.dev/a2ui/v0_9/components/ToggleOption.json",
|
|
4
|
+
"title": "ToggleOption",
|
|
5
|
+
"description": "Child of `<toggle-group-ui>`. One toggleable option inside a single-select or multi-select group. Pressed state mirrors `value` against the parent's selection.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"allOf": [
|
|
8
|
+
{
|
|
9
|
+
"$ref": "common_types.json#/$defs/ComponentCommon"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"$ref": "common_types.json#/$defs/CatalogComponentCommon"
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"properties": {
|
|
16
|
+
"component": {
|
|
17
|
+
"const": "ToggleOption"
|
|
18
|
+
},
|
|
19
|
+
"disabled": {
|
|
20
|
+
"description": "Disabled state — blocks pointer + keyboard activation.",
|
|
21
|
+
"type": "boolean",
|
|
22
|
+
"default": false
|
|
23
|
+
},
|
|
24
|
+
"icon": {
|
|
25
|
+
"description": "Optional Phosphor icon name; renders as a leading icon.",
|
|
26
|
+
"type": "string",
|
|
27
|
+
"default": ""
|
|
28
|
+
},
|
|
29
|
+
"text": {
|
|
30
|
+
"description": "Visible label text.",
|
|
31
|
+
"type": "string",
|
|
32
|
+
"default": ""
|
|
33
|
+
},
|
|
34
|
+
"value": {
|
|
35
|
+
"description": "Stable identifier matched against the parent group's `value`.",
|
|
36
|
+
"type": "string",
|
|
37
|
+
"default": ""
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"required": [
|
|
41
|
+
"component"
|
|
42
|
+
],
|
|
43
|
+
"unevaluatedProperties": false,
|
|
44
|
+
"x-adiaui": {
|
|
45
|
+
"anti_patterns": [],
|
|
46
|
+
"category": "forms",
|
|
47
|
+
"composes": [],
|
|
48
|
+
"events": {},
|
|
49
|
+
"examples": [],
|
|
50
|
+
"keywords": [],
|
|
51
|
+
"name": "UIToggleOption",
|
|
52
|
+
"related": [],
|
|
53
|
+
"slots": {},
|
|
54
|
+
"states": [],
|
|
55
|
+
"synonyms": {},
|
|
56
|
+
"tag": "toggle-option-ui",
|
|
57
|
+
"tokens": {},
|
|
58
|
+
"traits": [],
|
|
59
|
+
"version": 1
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Edit this file; run `npm run build:components` to regenerate a2ui.json.
|
|
2
|
+
#
|
|
3
|
+
# §228 (v0.5.9): authored to close the §229 baseline class-export-undeclared
|
|
4
|
+
# drift for UIToggleOption. Ships as a sibling class in toggle-group/class.js
|
|
5
|
+
# + is registered alongside UIToggleGroup.
|
|
6
|
+
|
|
7
|
+
# Child component of <toggle-group-ui>. Surface only inside that parent.
|
|
8
|
+
$schema: ../../../../scripts/schemas/component.yaml.schema.json
|
|
9
|
+
name: UIToggleOption
|
|
10
|
+
tag: toggle-option-ui
|
|
11
|
+
component: ToggleOption
|
|
12
|
+
category: forms
|
|
13
|
+
version: 1
|
|
14
|
+
description: |-
|
|
15
|
+
Child of `<toggle-group-ui>`. One toggleable option inside a single-select or multi-select group. Pressed state mirrors `value` against the parent's selection.
|
|
16
|
+
|
|
17
|
+
props:
|
|
18
|
+
value:
|
|
19
|
+
description: Stable identifier matched against the parent group's `value`.
|
|
20
|
+
type: string
|
|
21
|
+
default: ""
|
|
22
|
+
text:
|
|
23
|
+
description: Visible label text.
|
|
24
|
+
type: string
|
|
25
|
+
default: ""
|
|
26
|
+
icon:
|
|
27
|
+
description: Optional Phosphor icon name; renders as a leading icon.
|
|
28
|
+
type: string
|
|
29
|
+
default: ""
|
|
30
|
+
disabled:
|
|
31
|
+
description: Disabled state — blocks pointer + keyboard activation.
|
|
32
|
+
type: boolean
|
|
33
|
+
default: false
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @see https://ui-kit.exe.xyz/site/components/toggle-scheme
|
|
5
5
|
*
|
|
6
6
|
* Type declarations generated by scripts/build/dts-codegen.mjs from
|
|
7
|
-
* the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
|
|
7
|
+
* the component's `.a2ui.json` sidecar(s). Edit the source `.yaml`,
|
|
8
8
|
* run `npm run build:components`, then `npm run codegen:dts` to
|
|
9
9
|
* regenerate; or hand-author this file fully if rich event types are
|
|
10
10
|
* needed beyond what the yaml `events:` block can express.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://adiaui.dev/a2ui/v0_9/components/ToolbarGroup.json",
|
|
4
|
+
"title": "ToolbarGroup",
|
|
5
|
+
"description": "Visual cluster of related actions inside a `<toolbar-ui>`. Provides role=\"group\" for assistive-tech grouping; no own visual chrome beyond a margin-collapsing gap with sibling groups.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"allOf": [
|
|
8
|
+
{
|
|
9
|
+
"$ref": "common_types.json#/$defs/ComponentCommon"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"$ref": "common_types.json#/$defs/CatalogComponentCommon"
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"properties": {
|
|
16
|
+
"component": {
|
|
17
|
+
"const": "ToolbarGroup"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"required": [
|
|
21
|
+
"component"
|
|
22
|
+
],
|
|
23
|
+
"unevaluatedProperties": false,
|
|
24
|
+
"x-adiaui": {
|
|
25
|
+
"anti_patterns": [],
|
|
26
|
+
"category": "navigation",
|
|
27
|
+
"composes": [],
|
|
28
|
+
"events": {},
|
|
29
|
+
"examples": [],
|
|
30
|
+
"keywords": [],
|
|
31
|
+
"name": "UIToolbarGroup",
|
|
32
|
+
"related": [],
|
|
33
|
+
"slots": {},
|
|
34
|
+
"states": [],
|
|
35
|
+
"synonyms": {},
|
|
36
|
+
"tag": "toolbar-group-ui",
|
|
37
|
+
"tokens": {},
|
|
38
|
+
"traits": [],
|
|
39
|
+
"version": 1
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Edit this file; run `npm run build:components` to regenerate a2ui.json.
|
|
2
|
+
#
|
|
3
|
+
# §228 (v0.5.9): authored to close the §229 baseline class-export-undeclared
|
|
4
|
+
# drift for UIToolbarGroup. Ships as a sibling class in toolbar/class.js
|
|
5
|
+
# + is registered alongside UIToolbar.
|
|
6
|
+
|
|
7
|
+
# Child component of <toolbar-ui>. Groups a set of action buttons inside
|
|
8
|
+
# the parent's `[slot="action"]` cluster with a shared role="group".
|
|
9
|
+
$schema: ../../../../scripts/schemas/component.yaml.schema.json
|
|
10
|
+
name: UIToolbarGroup
|
|
11
|
+
tag: toolbar-group-ui
|
|
12
|
+
component: ToolbarGroup
|
|
13
|
+
category: navigation
|
|
14
|
+
version: 1
|
|
15
|
+
description: |-
|
|
16
|
+
Visual cluster of related actions inside a `<toolbar-ui>`. Provides role="group" for assistive-tech grouping; no own visual chrome beyond a margin-collapsing gap with sibling groups.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @see https://ui-kit.exe.xyz/site/components/toolbar
|
|
5
5
|
*
|
|
6
6
|
* Type declarations generated by scripts/build/dts-codegen.mjs from
|
|
7
|
-
* the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
|
|
7
|
+
* the component's `.a2ui.json` sidecar(s). Edit the source `.yaml`,
|
|
8
8
|
* run `npm run build:components`, then `npm run codegen:dts` to
|
|
9
9
|
* regenerate; or hand-author this file fully if rich event types are
|
|
10
10
|
* needed beyond what the yaml `events:` block can express.
|
|
@@ -22,3 +22,6 @@ export class UIToolbar extends UIElement {
|
|
|
22
22
|
/** Overflow behavior */
|
|
23
23
|
overflow: 'menu' | 'none';
|
|
24
24
|
}
|
|
25
|
+
|
|
26
|
+
export class UIToolbarGroup extends UIElement {
|
|
27
|
+
}
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
|
|
122
122
|
.tooltip-popup[data-follows="pointer"] [data-tip-role="name"] {
|
|
123
123
|
color: var(--a-fg-subtle);
|
|
124
|
-
font-weight: var(--a-weight-
|
|
124
|
+
font-weight: var(--a-weight-normal);
|
|
125
125
|
}
|
|
126
126
|
|
|
127
127
|
.tooltip-popup[data-follows="pointer"] [data-tip-role="value"] {
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
|
|
132
132
|
.tooltip-popup[data-follows="pointer"] [data-tip-role="pct"] {
|
|
133
133
|
color: var(--a-fg-subtle);
|
|
134
|
-
font-weight: var(--a-weight-
|
|
134
|
+
font-weight: var(--a-weight-normal);
|
|
135
135
|
}
|
|
136
136
|
|
|
137
137
|
/* Indicator variants — dot / line / dashed */
|