@adia-ai/web-components 0.0.29 → 0.0.33
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/components/accordion/accordion.a2ui.json +1 -1
- package/components/accordion/accordion.js +6 -6
- package/components/accordion/accordion.yaml +1 -1
- package/components/action-list/action-list.a2ui.json +1 -1
- package/components/action-list/action-list.js +6 -6
- package/components/action-list/action-list.yaml +1 -1
- package/components/agent-artifact/agent-artifact.a2ui.json +1 -1
- package/components/agent-artifact/agent-artifact.js +4 -4
- package/components/agent-artifact/agent-artifact.yaml +1 -1
- package/components/agent-feedback-bar/agent-feedback-bar.a2ui.json +1 -1
- package/components/agent-feedback-bar/agent-feedback-bar.js +4 -4
- package/components/agent-feedback-bar/agent-feedback-bar.yaml +1 -1
- package/components/agent-questions/agent-questions.a2ui.json +1 -1
- package/components/agent-questions/agent-questions.js +4 -4
- package/components/agent-questions/agent-questions.yaml +1 -1
- package/components/agent-reasoning/agent-reasoning.a2ui.json +3 -3
- package/components/agent-reasoning/agent-reasoning.js +4 -4
- package/components/agent-reasoning/agent-reasoning.yaml +3 -3
- package/components/agent-suggestions/agent-suggestions.a2ui.json +1 -1
- package/components/agent-suggestions/agent-suggestions.js +4 -4
- package/components/agent-suggestions/agent-suggestions.yaml +1 -1
- package/components/agent-trace/agent-trace.a2ui.json +1 -1
- package/components/agent-trace/agent-trace.js +4 -4
- package/components/agent-trace/agent-trace.yaml +1 -1
- package/components/alert/alert.a2ui.json +1 -1
- package/components/alert/alert.js +4 -4
- package/components/alert/alert.yaml +1 -1
- package/components/aside/aside.a2ui.json +1 -1
- package/components/aside/aside.yaml +1 -1
- package/components/avatar/avatar.a2ui.json +1 -1
- package/components/avatar/avatar.js +8 -8
- package/components/avatar/avatar.yaml +1 -1
- package/components/badge/badge.a2ui.json +1 -1
- package/components/badge/badge.js +4 -4
- package/components/badge/badge.yaml +1 -1
- package/components/block/block.a2ui.json +1 -1
- package/components/block/block.js +4 -4
- package/components/block/block.yaml +1 -1
- package/components/breadcrumb/breadcrumb.a2ui.json +1 -1
- package/components/breadcrumb/breadcrumb.js +4 -4
- package/components/breadcrumb/breadcrumb.yaml +1 -1
- package/components/button/button.a2ui.json +1 -1
- package/components/button/button.js +4 -4
- package/components/button/button.yaml +1 -1
- package/components/calendar-picker/calendar-picker.a2ui.json +1 -1
- package/components/calendar-picker/calendar-picker.js +6 -6
- package/components/calendar-picker/calendar-picker.yaml +1 -1
- package/components/canvas/canvas.a2ui.json +1 -1
- package/components/canvas/canvas.js +4 -4
- package/components/canvas/canvas.yaml +1 -1
- package/components/card/card.a2ui.json +1 -1
- package/components/card/card.js +4 -4
- package/components/card/card.yaml +1 -1
- package/components/chart/chart.a2ui.json +1 -1
- package/components/chart/chart.js +5 -5
- package/components/chart/chart.yaml +1 -1
- package/components/chart-legend/chart-legend.a2ui.json +1 -1
- package/components/chart-legend/chart-legend.js +7 -7
- package/components/chart-legend/chart-legend.yaml +1 -1
- package/components/{chat → chat-thread}/chat-input.js +5 -5
- package/components/{chat/chat.a2ui.json → chat-thread/chat-thread.a2ui.json} +6 -6
- package/components/{chat/chat.css → chat-thread/chat-thread.css} +2 -2
- package/components/{chat/chat.js → chat-thread/chat-thread.js} +7 -7
- package/components/{chat/chat.yaml → chat-thread/chat-thread.yaml} +4 -4
- package/components/check/check.a2ui.json +1 -1
- package/components/check/check.js +5 -5
- package/components/check/check.yaml +1 -1
- package/components/code/code.a2ui.json +1 -1
- package/components/code/code.js +4 -4
- package/components/code/code.yaml +1 -1
- package/components/col/col.a2ui.json +1 -1
- package/components/col/col.js +4 -4
- package/components/col/col.yaml +1 -1
- package/components/color-picker/color-picker.a2ui.json +1 -1
- package/components/color-picker/color-picker.js +6 -6
- package/components/color-picker/color-picker.yaml +1 -1
- package/components/command/command.a2ui.json +1 -1
- package/components/command/command.js +5 -5
- package/components/command/command.yaml +1 -1
- package/components/description-list/description-list.a2ui.json +1 -1
- package/components/description-list/description-list.js +4 -4
- package/components/description-list/description-list.yaml +1 -1
- package/components/divider/divider.a2ui.json +1 -1
- package/components/divider/divider.js +4 -4
- package/components/divider/divider.yaml +1 -1
- package/components/drawer/drawer.a2ui.json +1 -1
- package/components/drawer/drawer.js +4 -4
- package/components/drawer/drawer.yaml +1 -1
- package/components/embed/embed.a2ui.json +1 -1
- package/components/embed/embed.js +4 -4
- package/components/embed/embed.yaml +1 -1
- package/components/empty-state/empty-state.a2ui.json +1 -1
- package/components/empty-state/empty-state.js +4 -4
- package/components/empty-state/empty-state.yaml +1 -1
- package/components/feed/feed-item.yaml +2 -2
- package/components/feed/feed.a2ui.json +2 -2
- package/components/feed/feed.css +12 -3
- package/components/feed/feed.js +22 -22
- package/components/feed/feed.yaml +2 -2
- package/components/field/field.a2ui.json +1 -1
- package/components/field/field.js +10 -10
- package/components/field/field.yaml +2 -2
- package/components/footer/footer.a2ui.json +1 -1
- package/components/footer/footer.yaml +1 -1
- package/components/grid/grid.a2ui.json +1 -1
- package/components/grid/grid.js +4 -4
- package/components/grid/grid.yaml +1 -1
- package/components/header/header.a2ui.json +1 -1
- package/components/header/header.yaml +1 -1
- package/components/heatmap/heatmap.a2ui.json +1 -1
- package/components/heatmap/heatmap.js +4 -4
- package/components/heatmap/heatmap.yaml +1 -1
- package/components/icon/icon.a2ui.json +1 -1
- package/components/icon/icon.js +4 -4
- package/components/icon/icon.yaml +1 -1
- package/components/image/image.a2ui.json +1 -1
- package/components/image/image.js +4 -4
- package/components/image/image.yaml +1 -1
- package/components/index.js +88 -85
- package/components/input/input.a2ui.json +1 -1
- package/components/input/input.js +7 -7
- package/components/input/input.yaml +1 -1
- package/components/inspector/inspector.a2ui.json +1 -1
- package/components/inspector/inspector.js +4 -4
- package/components/inspector/inspector.yaml +1 -1
- package/components/kbd/kbd.a2ui.json +1 -1
- package/components/kbd/kbd.js +4 -4
- package/components/kbd/kbd.yaml +1 -1
- package/components/list/list.a2ui.json +1 -1
- package/components/list/list.js +6 -6
- package/components/list/list.yaml +1 -1
- package/components/menu/menu.a2ui.json +1 -1
- package/components/menu/menu.js +8 -8
- package/components/menu/menu.yaml +1 -1
- package/components/modal/modal.a2ui.json +1 -1
- package/components/modal/modal.js +4 -4
- package/components/modal/modal.yaml +1 -1
- package/components/nav/nav.a2ui.json +98 -0
- package/components/nav/nav.css +133 -0
- package/components/nav/nav.js +140 -0
- package/components/nav/nav.test.js +428 -0
- package/components/nav/nav.yaml +114 -0
- package/components/nav-group/nav-group.a2ui.json +100 -0
- package/components/nav-group/nav-group.css +317 -0
- package/components/nav-group/nav-group.js +142 -0
- package/components/nav-group/nav-group.yaml +69 -0
- package/components/nav-item/nav-item.a2ui.json +106 -0
- package/components/nav-item/nav-item.css +194 -0
- package/components/nav-item/nav-item.js +76 -0
- package/components/nav-item/nav-item.yaml +73 -0
- package/components/noodles/noodles.a2ui.json +1 -1
- package/components/noodles/noodles.js +4 -4
- package/components/noodles/noodles.yaml +1 -1
- package/components/option-card/option-card.a2ui.json +1 -1
- package/components/option-card/option-card.js +6 -6
- package/components/option-card/option-card.yaml +1 -1
- package/components/otp-input/otp-input.a2ui.json +1 -1
- package/components/otp-input/otp-input.js +5 -5
- package/components/otp-input/otp-input.yaml +1 -1
- package/components/page/page.a2ui.json +3 -3
- package/components/page/page.js +4 -4
- package/components/page/page.yaml +3 -3
- package/components/pagination/pagination.a2ui.json +1 -1
- package/components/pagination/pagination.js +4 -4
- package/components/pagination/pagination.yaml +1 -1
- package/components/pane/pane.a2ui.json +1 -1
- package/components/pane/pane.js +4 -4
- package/components/pane/pane.yaml +1 -1
- package/components/pipeline-status/pipeline-status.a2ui.json +1 -1
- package/components/pipeline-status/pipeline-status.js +4 -4
- package/components/pipeline-status/pipeline-status.yaml +1 -1
- package/components/popover/popover.a2ui.json +1 -1
- package/components/popover/popover.js +4 -4
- package/components/popover/popover.yaml +1 -1
- package/components/progress/progress.a2ui.json +1 -1
- package/components/progress/progress.js +4 -4
- package/components/progress/progress.yaml +1 -1
- package/components/progress-row/progress-row.a2ui.json +1 -1
- package/components/progress-row/progress-row.js +4 -4
- package/components/progress-row/progress-row.yaml +1 -1
- package/components/radio/radio.a2ui.json +1 -1
- package/components/radio/radio.js +5 -5
- package/components/radio/radio.yaml +1 -1
- package/components/range/range.a2ui.json +1 -1
- package/components/range/range.js +7 -7
- package/components/range/range.yaml +1 -1
- package/components/rating/rating.a2ui.json +1 -1
- package/components/rating/rating.js +6 -6
- package/components/rating/rating.yaml +1 -1
- package/components/richtext/richtext.a2ui.json +1 -1
- package/components/richtext/richtext.js +4 -4
- package/components/richtext/richtext.yaml +1 -1
- package/components/row/row.a2ui.json +1 -1
- package/components/row/row.js +4 -4
- package/components/row/row.yaml +1 -1
- package/components/search/search.a2ui.json +1 -1
- package/components/search/search.js +5 -5
- package/components/search/search.yaml +1 -1
- package/components/section/section.a2ui.json +1 -1
- package/components/section/section.yaml +1 -1
- package/components/segment/segment.a2ui.json +1 -1
- package/components/segment/segment.js +4 -4
- package/components/segment/segment.yaml +1 -1
- package/components/segmented/segmented.a2ui.json +1 -1
- package/components/segmented/segmented.css +6 -0
- package/components/segmented/segmented.js +7 -7
- package/components/segmented/segmented.yaml +1 -1
- package/components/select/select.a2ui.json +1 -1
- package/components/select/select.js +5 -5
- package/components/select/select.yaml +1 -1
- package/components/skeleton/skeleton.a2ui.json +1 -1
- package/components/skeleton/skeleton.js +4 -4
- package/components/skeleton/skeleton.yaml +1 -1
- package/components/slider/slider.a2ui.json +1 -1
- package/components/slider/slider.js +7 -7
- package/components/slider/slider.yaml +1 -1
- package/components/stack/stack.a2ui.json +1 -1
- package/components/stack/stack.js +4 -4
- package/components/stack/stack.yaml +1 -1
- package/components/stat/stat.a2ui.json +1 -1
- package/components/stat/stat.js +4 -4
- package/components/stat/stat.yaml +1 -1
- package/components/stepper/stepper.a2ui.json +1 -1
- package/components/stepper/stepper.js +6 -6
- package/components/stepper/stepper.yaml +1 -1
- package/components/stream/stream.a2ui.json +1 -1
- package/components/stream/stream.js +4 -4
- package/components/stream/stream.yaml +1 -1
- package/components/swatch/swatch.a2ui.json +1 -1
- package/components/swatch/swatch.js +4 -4
- package/components/swatch/swatch.yaml +1 -1
- package/components/swiper/swiper.a2ui.json +1 -1
- package/components/swiper/swiper.js +4 -4
- package/components/swiper/swiper.yaml +1 -1
- package/components/switch/switch.a2ui.json +1 -1
- package/components/switch/switch.js +5 -5
- package/components/switch/switch.yaml +1 -1
- package/components/table/table.a2ui.json +1 -1
- package/components/table/table.js +4 -4
- package/components/table/table.yaml +1 -1
- package/components/table-toolbar/table-toolbar.a2ui.json +1 -1
- package/components/table-toolbar/table-toolbar.js +4 -4
- package/components/table-toolbar/table-toolbar.yaml +1 -1
- package/components/tabs/tab.js +4 -4
- package/components/tabs/tabs.a2ui.json +1 -1
- package/components/tabs/tabs.js +5 -5
- package/components/tabs/tabs.yaml +1 -1
- package/components/tag/tag.a2ui.json +1 -1
- package/components/tag/tag.js +4 -4
- package/components/tag/tag.yaml +1 -1
- package/components/text/text.a2ui.json +1 -1
- package/components/text/text.js +4 -4
- package/components/text/text.yaml +1 -1
- package/components/textarea/textarea.a2ui.json +1 -1
- package/components/textarea/textarea.js +5 -5
- package/components/textarea/textarea.yaml +1 -1
- package/components/timeline/timeline.a2ui.json +1 -1
- package/components/timeline/timeline.js +6 -6
- package/components/timeline/timeline.yaml +1 -1
- package/components/toast/toast.a2ui.json +1 -1
- package/components/toast/toast.js +18 -18
- package/components/toast/toast.yaml +1 -1
- package/components/toggle-group/toggle-group.a2ui.json +1 -1
- package/components/toggle-group/toggle-group.js +6 -6
- package/components/toggle-group/toggle-group.yaml +1 -1
- package/components/toolbar/toolbar.a2ui.json +1 -1
- package/components/toolbar/toolbar.js +6 -6
- package/components/toolbar/toolbar.yaml +1 -1
- package/components/tooltip/tooltip.a2ui.json +1 -1
- package/components/tooltip/tooltip.js +7 -7
- package/components/tooltip/tooltip.yaml +1 -1
- package/components/tree/tree.a2ui.json +1 -1
- package/components/tree/tree.js +6 -6
- package/components/tree/tree.yaml +1 -1
- package/components/upload/upload.a2ui.json +1 -1
- package/components/upload/upload.js +6 -6
- package/components/upload/upload.yaml +1 -1
- package/core/element.js +4 -4
- package/core/element.test.js +18 -18
- package/core/form.js +9 -9
- package/core/index.js +2 -2
- package/core/provider.js +7 -7
- package/core/template.js +1 -1
- package/index.css +1 -1
- package/index.js +10 -8
- package/package.json +1 -1
- package/styles/components.css +10 -6
- package/styles/resets.css +1 -1
- package/traits/define.js +2 -2
- /package/components/{chat → chat-thread}/chat-input.css +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UIElement } from '../../core/element.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* <command-ui> — Searchable command palette.
|
|
@@ -20,7 +20,7 @@ import { AdiaElement } from '../../core/element.js';
|
|
|
20
20
|
* select — { detail: { value, label } }
|
|
21
21
|
* dismiss — Escape pressed
|
|
22
22
|
*/
|
|
23
|
-
class
|
|
23
|
+
class UICommand extends UIElement {
|
|
24
24
|
static properties = {
|
|
25
25
|
placeholder: { type: String, default: 'Type a command...', reflect: true },
|
|
26
26
|
open: { type: Boolean, default: false, reflect: true },
|
|
@@ -228,7 +228,7 @@ class AdiaCommand extends AdiaElement {
|
|
|
228
228
|
#pushRecent(value) {
|
|
229
229
|
if (!value) return;
|
|
230
230
|
this.#recents = [value, ...this.#recents.filter(v => v !== value)]
|
|
231
|
-
.slice(0,
|
|
231
|
+
.slice(0, UICommand.#RECENTS_MAX);
|
|
232
232
|
}
|
|
233
233
|
|
|
234
234
|
#createItemEl(item, idx) {
|
|
@@ -350,5 +350,5 @@ class AdiaCommand extends AdiaElement {
|
|
|
350
350
|
}
|
|
351
351
|
}
|
|
352
352
|
|
|
353
|
-
customElements.define('command-ui',
|
|
354
|
-
export {
|
|
353
|
+
customElements.define('command-ui', UICommand);
|
|
354
|
+
export { UICommand };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Generated by scripts/migrate-yamls-to-v1.mjs — migrated to v1 contract.
|
|
2
2
|
# Edit this file; run `npm run build:components` to regenerate a2ui.json.
|
|
3
3
|
$schema: ../../../../scripts/schemas/component.yaml.schema.json
|
|
4
|
-
name:
|
|
4
|
+
name: UICommand
|
|
5
5
|
tag: command-ui
|
|
6
6
|
component: Command
|
|
7
7
|
category: container
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
* items — optional JSON array of {term, description} pairs
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
|
-
import {
|
|
22
|
+
import { UIElement } from '../../core/element.js';
|
|
23
23
|
|
|
24
|
-
class
|
|
24
|
+
class UIDescriptionList extends UIElement {
|
|
25
25
|
static properties = {
|
|
26
26
|
layout: { type: String, default: 'stacked', reflect: true },
|
|
27
27
|
align: { type: String, default: 'start', reflect: true },
|
|
@@ -72,5 +72,5 @@ class AdiaDescriptionList extends AdiaElement {
|
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
customElements.define('description-list-ui',
|
|
76
|
-
export {
|
|
75
|
+
customElements.define('description-list-ui', UIDescriptionList);
|
|
76
|
+
export { UIDescriptionList };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Generated by scripts/migrate-yamls-to-v1.mjs — migrated to v1 contract.
|
|
2
2
|
# Edit this file; run `npm run build:components` to regenerate a2ui.json.
|
|
3
3
|
$schema: ../../../../scripts/schemas/component.yaml.schema.json
|
|
4
|
-
name:
|
|
4
|
+
name: UIDescriptionList
|
|
5
5
|
tag: description-list-ui
|
|
6
6
|
component: DescriptionList
|
|
7
7
|
category: display
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
* Renders as a simple line, or a line broken by centered text.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import {
|
|
10
|
+
import { UIElement } from '../../core/element.js';
|
|
11
11
|
|
|
12
|
-
class
|
|
12
|
+
class UIDivider extends UIElement {
|
|
13
13
|
static properties = {
|
|
14
14
|
label: { type: String, default: '', reflect: true },
|
|
15
15
|
vertical: { type: Boolean, default: false, reflect: true },
|
|
@@ -42,6 +42,6 @@ class AdiaDivider extends AdiaElement {
|
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
|
-
customElements.define('divider-ui',
|
|
45
|
+
customElements.define('divider-ui', UIDivider);
|
|
46
46
|
|
|
47
|
-
export {
|
|
47
|
+
export { UIDivider };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Generated by scripts/migrate-yamls-to-v1.mjs — migrated to v1 contract.
|
|
2
2
|
# Edit this file; run `npm run build:components` to regenerate a2ui.json.
|
|
3
3
|
$schema: ../../../../scripts/schemas/component.yaml.schema.json
|
|
4
|
-
name:
|
|
4
|
+
name: UIDivider
|
|
5
5
|
tag: divider-ui
|
|
6
6
|
component: Divider
|
|
7
7
|
category: display
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
* close — fired after the drawer finishes closing
|
|
30
30
|
*/
|
|
31
31
|
|
|
32
|
-
import {
|
|
32
|
+
import { UIElement } from '../../core/element.js';
|
|
33
33
|
|
|
34
|
-
class
|
|
34
|
+
class UIDrawer extends UIElement {
|
|
35
35
|
#bound = false;
|
|
36
36
|
#closing = false;
|
|
37
37
|
#previousFocus = null;
|
|
@@ -291,6 +291,6 @@ class AdiaDrawer extends AdiaElement {
|
|
|
291
291
|
show() { this.open = true; }
|
|
292
292
|
hide() { this.open = false; }
|
|
293
293
|
}
|
|
294
|
-
customElements.define('drawer-ui',
|
|
294
|
+
customElements.define('drawer-ui', UIDrawer);
|
|
295
295
|
|
|
296
|
-
export {
|
|
296
|
+
export { UIDrawer };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Generated by scripts/migrate-yamls-to-v1.mjs — migrated to v1 contract.
|
|
2
2
|
# Edit this file; run `npm run build:components` to regenerate a2ui.json.
|
|
3
3
|
$schema: ../../../../scripts/schemas/component.yaml.schema.json
|
|
4
|
-
name:
|
|
4
|
+
name: UIDrawer
|
|
5
5
|
tag: drawer-ui
|
|
6
6
|
component: Drawer
|
|
7
7
|
category: container
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
* aspect — optional CSS aspect-ratio (e.g. '16/9')
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
import {
|
|
13
|
+
import { UIElement } from '../../core/element.js';
|
|
14
14
|
|
|
15
|
-
class
|
|
15
|
+
class UIEmbed extends UIElement {
|
|
16
16
|
static properties = {
|
|
17
17
|
src: { type: String, default: '', reflect: true },
|
|
18
18
|
height: { type: String, default: '400', reflect: true },
|
|
@@ -58,6 +58,6 @@ class AdiaEmbed extends AdiaElement {
|
|
|
58
58
|
this.#iframe = null;
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
|
-
customElements.define('embed-ui',
|
|
61
|
+
customElements.define('embed-ui', UIEmbed);
|
|
62
62
|
|
|
63
|
-
export {
|
|
63
|
+
export { UIEmbed };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Generated by scripts/migrate-yamls-to-v1.mjs — migrated to v1 contract.
|
|
2
2
|
# Edit this file; run `npm run build:components` to regenerate a2ui.json.
|
|
3
3
|
$schema: ../../../../scripts/schemas/component.yaml.schema.json
|
|
4
|
-
name:
|
|
4
|
+
name: UIEmbed
|
|
5
5
|
tag: embed-ui
|
|
6
6
|
component: Embed
|
|
7
7
|
category: agent
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
* Note: Uses 'heading' attribute instead of 'title' to avoid native tooltip.
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
import {
|
|
12
|
+
import { UIElement } from '../../core/element.js';
|
|
13
13
|
|
|
14
|
-
class
|
|
14
|
+
class UIEmptyState extends UIElement {
|
|
15
15
|
static properties = {
|
|
16
16
|
icon: { type: String, default: '', reflect: true },
|
|
17
17
|
heading: { type: String, default: '', reflect: true },
|
|
@@ -93,6 +93,6 @@ class AdiaEmptyState extends AdiaElement {
|
|
|
93
93
|
this.#descEl = null;
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
|
-
customElements.define('empty-state-ui',
|
|
96
|
+
customElements.define('empty-state-ui', UIEmptyState);
|
|
97
97
|
|
|
98
|
-
export {
|
|
98
|
+
export { UIEmptyState };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Generated by scripts/migrate-yamls-to-v1.mjs — migrated to v1 contract.
|
|
2
2
|
# Edit this file; run `npm run build:components` to regenerate a2ui.json.
|
|
3
3
|
$schema: ../../../../scripts/schemas/component.yaml.schema.json
|
|
4
|
-
name:
|
|
4
|
+
name: UIEmptyState
|
|
5
5
|
tag: empty-state-ui
|
|
6
6
|
component: EmptyState
|
|
7
7
|
category: display
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
$schema: ../../../../scripts/schemas/component.yaml.schema.json
|
|
2
|
-
name:
|
|
2
|
+
name: UIFeedItem
|
|
3
3
|
tag: feed-item-ui
|
|
4
4
|
component: FeedItem
|
|
5
5
|
category: feedback
|
|
@@ -9,7 +9,7 @@ description: >-
|
|
|
9
9
|
are inferred from the prop shape — auto-fade (duration > 0 + no
|
|
10
10
|
action), sticky-dismissible (duration null/0), action-required
|
|
11
11
|
(duration null/0 + action; future phase). Posted via
|
|
12
|
-
`
|
|
12
|
+
`UIFeed.post()` rather than authored directly.
|
|
13
13
|
props:
|
|
14
14
|
text:
|
|
15
15
|
description: Body copy
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://adiaui.dev/a2ui/v0_9/components/Feed.json",
|
|
4
4
|
"title": "Feed",
|
|
5
|
-
"description": "Shared top-layer feed channel. Per docs/specs/feed-channel.md (SPEC-FEED-CHANNEL-001). Per-position singletons mounted lazily into document.body via Popover API; consumers post via the static API (`
|
|
5
|
+
"description": "Shared top-layer feed channel. Per docs/specs/feed-channel.md (SPEC-FEED-CHANNEL-001). Per-position singletons mounted lazily into document.body via Popover API; consumers post via the static API (`UIFeed.post()`) or the global 'feed' CustomEvent.",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"allOf": [
|
|
8
8
|
{
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"events": {},
|
|
47
47
|
"examples": [],
|
|
48
48
|
"keywords": [],
|
|
49
|
-
"name": "
|
|
49
|
+
"name": "UIFeedContainer",
|
|
50
50
|
"related": [],
|
|
51
51
|
"slots": {},
|
|
52
52
|
"states": {},
|
package/components/feed/feed.css
CHANGED
|
@@ -41,9 +41,18 @@ feed-item-ui[data-closing] {
|
|
|
41
41
|
width: max-content;
|
|
42
42
|
max-width: var(--feed-max-width);
|
|
43
43
|
}
|
|
44
|
-
/* Reset native popover defaults
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
/* Reset native popover defaults. UA stylesheet sets `margin: auto;
|
|
45
|
+
inset: 0; border: solid; padding: 0.25em` which would center the
|
|
46
|
+
lane and paint a chrome border — both fight the fixed-corner
|
|
47
|
+
anchoring below. */
|
|
48
|
+
:scope[popover] {
|
|
49
|
+
margin: 0;
|
|
50
|
+
inset: auto;
|
|
51
|
+
border: 0;
|
|
52
|
+
padding: 0;
|
|
53
|
+
background: none;
|
|
54
|
+
color: inherit;
|
|
55
|
+
}
|
|
47
56
|
|
|
48
57
|
/* Position variants. Default = bottom-right. */
|
|
49
58
|
:scope,
|
package/components/feed/feed.js
CHANGED
|
@@ -12,12 +12,12 @@
|
|
|
12
12
|
* (no auto-dismiss when `duration` is null/0; close button
|
|
13
13
|
* surfaces when `dismissible` is set) but the action-required
|
|
14
14
|
* focus-trap is deferred.
|
|
15
|
-
* - Static API:
|
|
15
|
+
* - Static API: UIFeed.post() / .get() / .clear() / .purge()
|
|
16
16
|
* — `purge()` directly addresses the audit's L-B4 container-leak
|
|
17
17
|
* finding by giving consumers a tear-down hook.
|
|
18
18
|
* - Global event channel: window.dispatchEvent(new CustomEvent(
|
|
19
19
|
* 'feed', { detail: { text, position, ... } })) — same shape as
|
|
20
|
-
*
|
|
20
|
+
* UIFeed.post() so any code can post without importing the
|
|
21
21
|
* module directly. Idempotent listener install (HMR-safe).
|
|
22
22
|
*
|
|
23
23
|
* Toast migration (spec § 2.5) is deferred — toast-ui keeps its own
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
* surface has soaked.
|
|
26
26
|
*/
|
|
27
27
|
|
|
28
|
-
import {
|
|
28
|
+
import { UIElement, html } from '../../core/element.js';
|
|
29
29
|
|
|
30
30
|
/* ── Container — one per position, mounted into document.body ── */
|
|
31
31
|
|
|
32
|
-
class
|
|
32
|
+
class UIFeedContainer extends UIElement {
|
|
33
33
|
static properties = {
|
|
34
34
|
position: { type: String, default: 'bottom-right', reflect: true },
|
|
35
35
|
max: { type: Number, default: 5, reflect: true },
|
|
@@ -42,11 +42,11 @@ class AdiaFeedContainer extends AdiaElement {
|
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
customElements.define('feed-ui',
|
|
45
|
+
customElements.define('feed-ui', UIFeedContainer);
|
|
46
46
|
|
|
47
47
|
/* ── Item — one per posted message ── */
|
|
48
48
|
|
|
49
|
-
class
|
|
49
|
+
class UIFeedItem extends UIElement {
|
|
50
50
|
#timer = null;
|
|
51
51
|
#removing = false;
|
|
52
52
|
#closeTimer = null;
|
|
@@ -190,14 +190,14 @@ class AdiaFeedItem extends AdiaElement {
|
|
|
190
190
|
const container = this.parentElement;
|
|
191
191
|
this.dispatchEvent(new Event('close', { bubbles: true }));
|
|
192
192
|
this.remove();
|
|
193
|
-
if (container?.matches?.('feed-ui'))
|
|
193
|
+
if (container?.matches?.('feed-ui')) UIFeed.releaseContainerIfEmpty(container);
|
|
194
194
|
}, this.#getDuration());
|
|
195
195
|
}
|
|
196
196
|
|
|
197
197
|
update(patch) {
|
|
198
198
|
if (!patch || typeof patch !== 'object') return;
|
|
199
199
|
for (const k of Object.keys(patch)) {
|
|
200
|
-
if (k in
|
|
200
|
+
if (k in UIFeedItem.properties) this[k] = patch[k];
|
|
201
201
|
}
|
|
202
202
|
// Phase 2: handle is set via the FeedHandle's update(); not a
|
|
203
203
|
// reflected attribute, so it lives outside the property loop.
|
|
@@ -251,11 +251,11 @@ class AdiaFeedItem extends AdiaElement {
|
|
|
251
251
|
}
|
|
252
252
|
}
|
|
253
253
|
|
|
254
|
-
customElements.define('feed-item-ui',
|
|
254
|
+
customElements.define('feed-item-ui', UIFeedItem);
|
|
255
255
|
|
|
256
|
-
/* ── Static API —
|
|
256
|
+
/* ── Static API — UIFeed ── */
|
|
257
257
|
|
|
258
|
-
class
|
|
258
|
+
class UIFeed {
|
|
259
259
|
static #containers = new Map();
|
|
260
260
|
|
|
261
261
|
/**
|
|
@@ -266,14 +266,14 @@ class AdiaFeed {
|
|
|
266
266
|
* top-right + another in bottom-center) without collision.
|
|
267
267
|
*/
|
|
268
268
|
static get(position = 'bottom-right') {
|
|
269
|
-
let el =
|
|
269
|
+
let el = UIFeed.#containers.get(position);
|
|
270
270
|
if (el && el.isConnected) return el;
|
|
271
271
|
el = document.createElement('feed-ui');
|
|
272
272
|
el.setAttribute('position', position);
|
|
273
273
|
if ('popover' in HTMLElement.prototype) el.setAttribute('popover', 'manual');
|
|
274
274
|
document.body.appendChild(el);
|
|
275
275
|
try { el.showPopover?.(); } catch { /* graceful fallback */ }
|
|
276
|
-
|
|
276
|
+
UIFeed.#containers.set(position, el);
|
|
277
277
|
return el;
|
|
278
278
|
}
|
|
279
279
|
|
|
@@ -310,7 +310,7 @@ class AdiaFeed {
|
|
|
310
310
|
onAction,
|
|
311
311
|
} = opts;
|
|
312
312
|
const v = variant === 'error' ? 'danger' : variant; // documented alias
|
|
313
|
-
const container =
|
|
313
|
+
const container = UIFeed.get(position);
|
|
314
314
|
// Phase 2 max-queue: items above [max] queue with [data-queued] and
|
|
315
315
|
// become visible as visible items dismiss.
|
|
316
316
|
const max = parseInt(container.getAttribute('max') || '5', 10);
|
|
@@ -339,7 +339,7 @@ class AdiaFeed {
|
|
|
339
339
|
|
|
340
340
|
/** Clear all items in a single lane. */
|
|
341
341
|
static clear(position = 'bottom-right') {
|
|
342
|
-
const el =
|
|
342
|
+
const el = UIFeed.#containers.get(position);
|
|
343
343
|
if (!el) return;
|
|
344
344
|
for (const item of [...el.children]) {
|
|
345
345
|
if (item.tagName === 'FEED-ITEM-UI') item.dismiss?.();
|
|
@@ -348,11 +348,11 @@ class AdiaFeed {
|
|
|
348
348
|
|
|
349
349
|
/** Tear down ALL containers. Test cleanup; addresses audit L-B4. */
|
|
350
350
|
static purge() {
|
|
351
|
-
for (const el of
|
|
351
|
+
for (const el of UIFeed.#containers.values()) {
|
|
352
352
|
try { el.hidePopover?.(); } catch { /* noop */ }
|
|
353
353
|
el.remove();
|
|
354
354
|
}
|
|
355
|
-
|
|
355
|
+
UIFeed.#containers.clear();
|
|
356
356
|
}
|
|
357
357
|
|
|
358
358
|
/** Internal: drop a lane when its last item exits. Also rotates the
|
|
@@ -367,19 +367,19 @@ class AdiaFeed {
|
|
|
367
367
|
if (container.children.length > 0) return;
|
|
368
368
|
try { container.hidePopover?.(); } catch { /* noop */ }
|
|
369
369
|
container.remove();
|
|
370
|
-
for (const [pos, el] of
|
|
371
|
-
if (el === container)
|
|
370
|
+
for (const [pos, el] of UIFeed.#containers) {
|
|
371
|
+
if (el === container) UIFeed.#containers.delete(pos);
|
|
372
372
|
}
|
|
373
373
|
}
|
|
374
374
|
}
|
|
375
375
|
|
|
376
|
-
/* Global 'feed' CustomEvent listener — same shape as
|
|
376
|
+
/* Global 'feed' CustomEvent listener — same shape as UIFeed.post().
|
|
377
377
|
Idempotent (HMR-safe via window flag). */
|
|
378
378
|
if (typeof window !== 'undefined' && !window.__adiaFeedListenerInstalled) {
|
|
379
379
|
window.__adiaFeedListenerInstalled = true;
|
|
380
380
|
window.addEventListener('feed', (e) => {
|
|
381
|
-
if (e?.detail && typeof e.detail === 'object')
|
|
381
|
+
if (e?.detail && typeof e.detail === 'object') UIFeed.post(e.detail);
|
|
382
382
|
});
|
|
383
383
|
}
|
|
384
384
|
|
|
385
|
-
export {
|
|
385
|
+
export { UIFeedContainer, UIFeedItem, UIFeed };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Generated alongside feed.js — kept in sync by hand for now (feed
|
|
2
2
|
# is a Phase-1 skeleton; once it stabilizes, run the regen pipeline).
|
|
3
3
|
$schema: ../../../../scripts/schemas/component.yaml.schema.json
|
|
4
|
-
name:
|
|
4
|
+
name: UIFeedContainer
|
|
5
5
|
tag: feed-ui
|
|
6
6
|
component: Feed
|
|
7
7
|
category: container
|
|
@@ -10,7 +10,7 @@ description: >-
|
|
|
10
10
|
Shared top-layer feed channel. Per docs/specs/feed-channel.md
|
|
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
14
|
props:
|
|
15
15
|
position:
|
|
16
16
|
description: Lane the feed renders into
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
* MutationObserver watches childList so a swapped-in control gets its
|
|
33
33
|
* `for=` and `aria-describedby` rebound.
|
|
34
34
|
*/
|
|
35
|
-
import {
|
|
35
|
+
import { UIElement } from '../../core/element.js';
|
|
36
36
|
|
|
37
|
-
class
|
|
37
|
+
class UIField extends UIElement {
|
|
38
38
|
static properties = {
|
|
39
39
|
label: { type: String, default: '', reflect: true },
|
|
40
40
|
hint: { type: String, default: '', reflect: true },
|
|
@@ -42,7 +42,7 @@ class AdiaField extends AdiaElement {
|
|
|
42
42
|
inline: { type: Boolean, default: false, reflect: true },
|
|
43
43
|
};
|
|
44
44
|
|
|
45
|
-
// The validation message lives on the child control (
|
|
45
|
+
// The validation message lives on the child control (UIFormElement.error
|
|
46
46
|
// is the single source of truth — validity is a property of the value, not
|
|
47
47
|
// of the layout wrapper). field-ui mirrors the child's error string into
|
|
48
48
|
// its own [data-field-error] slot so the validation message renders below
|
|
@@ -184,7 +184,7 @@ class AdiaField extends AdiaElement {
|
|
|
184
184
|
const el = document.createElement('div');
|
|
185
185
|
el.setAttribute('slot', 'hint');
|
|
186
186
|
el.setAttribute('data-field-hint', '');
|
|
187
|
-
el.setAttribute('id',
|
|
187
|
+
el.setAttribute('id', UIField.#nextMsgId('hint'));
|
|
188
188
|
el.hidden = true;
|
|
189
189
|
this.appendChild(el);
|
|
190
190
|
this.#hintEl = el;
|
|
@@ -196,7 +196,7 @@ class AdiaField extends AdiaElement {
|
|
|
196
196
|
const el = document.createElement('div');
|
|
197
197
|
el.setAttribute('slot', 'error');
|
|
198
198
|
el.setAttribute('data-field-error', '');
|
|
199
|
-
el.setAttribute('id',
|
|
199
|
+
el.setAttribute('id', UIField.#nextMsgId('err'));
|
|
200
200
|
el.setAttribute('role', 'alert');
|
|
201
201
|
el.hidden = true;
|
|
202
202
|
this.appendChild(el);
|
|
@@ -210,7 +210,7 @@ class AdiaField extends AdiaElement {
|
|
|
210
210
|
this.#labelEl.removeAttribute('for');
|
|
211
211
|
return;
|
|
212
212
|
}
|
|
213
|
-
if (!control.id) control.id =
|
|
213
|
+
if (!control.id) control.id = UIField.#nextId();
|
|
214
214
|
this.#labelEl.setAttribute('for', control.id);
|
|
215
215
|
}
|
|
216
216
|
|
|
@@ -247,10 +247,10 @@ class AdiaField extends AdiaElement {
|
|
|
247
247
|
}
|
|
248
248
|
|
|
249
249
|
static #idSeq = 0;
|
|
250
|
-
static #nextId() { return `field-ctl-${++
|
|
250
|
+
static #nextId() { return `field-ctl-${++UIField.#idSeq}`; }
|
|
251
251
|
static #msgSeq = 0;
|
|
252
|
-
static #nextMsgId(kind) { return `field-${kind}-${++
|
|
252
|
+
static #nextMsgId(kind) { return `field-${kind}-${++UIField.#msgSeq}`; }
|
|
253
253
|
}
|
|
254
254
|
|
|
255
|
-
customElements.define('field-ui',
|
|
256
|
-
export {
|
|
255
|
+
customElements.define('field-ui', UIField);
|
|
256
|
+
export { UIField };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Edit this file; run `npm run build:components` to regenerate a2ui.json.
|
|
2
2
|
$schema: ../../../../scripts/schemas/component.yaml.schema.json
|
|
3
|
-
name:
|
|
3
|
+
name: UIField
|
|
4
4
|
tag: field-ui
|
|
5
5
|
component: Field
|
|
6
6
|
category: form
|
|
@@ -29,7 +29,7 @@ props:
|
|
|
29
29
|
default: ""
|
|
30
30
|
reflect: true
|
|
31
31
|
# `error` is mirrored from the slotted control's `error` property.
|
|
32
|
-
#
|
|
32
|
+
# UIFormElement.error is the source of truth; field-ui renders the
|
|
33
33
|
# message below the control in danger style, role="alert" so screen
|
|
34
34
|
# readers announce changes. There is no field-level error attribute —
|
|
35
35
|
# set the message on the control: `<field-ui><input-ui error="…"></input-ui></field-ui>`.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Generated by scripts/migrate-yamls-to-v1.mjs — migrated to v1 contract.
|
|
2
2
|
# Edit this file; run `npm run build:components` to regenerate a2ui.json.
|
|
3
3
|
$schema: ../../../../scripts/schemas/component.yaml.schema.json
|
|
4
|
-
name:
|
|
4
|
+
name: UIFooter
|
|
5
5
|
tag: footer-ui
|
|
6
6
|
component: Footer
|
|
7
7
|
category: container
|
package/components/grid/grid.js
CHANGED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* <grid-ui columns="2" column-gap="2" row-gap="4">...</grid-ui>
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import {
|
|
8
|
+
import { UIElement } from '../../core/element.js';
|
|
9
9
|
|
|
10
|
-
class
|
|
10
|
+
class UIGrid extends UIElement {
|
|
11
11
|
static properties = {
|
|
12
12
|
columns: { type: String, default: '3', reflect: true },
|
|
13
13
|
gap: { type: String, default: 'md', reflect: true },
|
|
@@ -16,6 +16,6 @@ class AdiaGrid extends AdiaElement {
|
|
|
16
16
|
};
|
|
17
17
|
static template = () => null;
|
|
18
18
|
}
|
|
19
|
-
customElements.define('grid-ui',
|
|
19
|
+
customElements.define('grid-ui', UIGrid);
|
|
20
20
|
|
|
21
|
-
export {
|
|
21
|
+
export { UIGrid };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Generated by scripts/migrate-yamls-to-v1.mjs — migrated to v1 contract.
|
|
2
2
|
# Edit this file; run `npm run build:components` to regenerate a2ui.json.
|
|
3
3
|
$schema: ../../../../scripts/schemas/component.yaml.schema.json
|
|
4
|
-
name:
|
|
4
|
+
name: UIGrid
|
|
5
5
|
tag: grid-ui
|
|
6
6
|
component: Grid
|
|
7
7
|
category: layout
|