@adia-ai/web-components 0.0.1 → 0.0.3
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/a2ui/index.js +23 -17
- package/components/accordion/accordion.js +1 -1
- package/components/action-list/action-list.js +1 -1
- package/components/agent-artifact/agent-artifact.js +1 -1
- package/components/agent-feedback-bar/agent-feedback-bar.js +1 -1
- package/components/agent-questions/agent-questions.js +1 -1
- package/components/agent-reasoning/agent-reasoning.a2ui.json +14 -8
- package/components/agent-reasoning/agent-reasoning.css +1 -1
- package/components/agent-reasoning/agent-reasoning.js +9 -9
- package/components/agent-reasoning/agent-reasoning.yaml +9 -6
- package/components/agent-suggestions/agent-suggestions.js +1 -1
- package/components/agent-trace/agent-trace.js +1 -1
- package/components/alert/alert.js +1 -1
- package/components/avatar/avatar.a2ui.json +0 -10
- package/components/avatar/avatar.css +1 -1
- package/components/avatar/avatar.js +1 -1
- package/components/avatar/avatar.yaml +0 -8
- package/components/badge/badge.a2ui.json +6 -6
- package/components/badge/badge.js +22 -1
- package/components/badge/badge.yaml +8 -5
- package/components/block/block.js +1 -1
- package/components/breadcrumb/breadcrumb.js +1 -1
- package/components/button/button.a2ui.json +0 -11
- package/components/button/button.css +1 -1
- package/components/button/button.js +3 -3
- package/components/button/button.yaml +0 -11
- package/components/calendar-picker/calendar-picker.js +25 -19
- package/components/canvas/canvas.js +3 -3
- package/components/card/card.a2ui.json +0 -21
- package/components/card/card.js +2 -2
- package/components/card/card.yaml +0 -14
- package/components/chart/chart.a2ui.json +9 -8
- package/components/chart/chart.js +1 -1
- package/components/chart/chart.yaml +7 -5
- package/components/chat/chat-input.js +1 -1
- package/components/chat/chat.js +2 -2
- package/components/check/check.css +1 -1
- package/components/check/check.js +2 -2
- package/components/code/code.a2ui.json +0 -5
- package/components/code/code.js +1 -1
- package/components/code/code.yaml +0 -4
- package/components/col/col.a2ui.json +0 -20
- package/components/col/col.js +1 -1
- package/components/col/col.yaml +0 -20
- package/components/color-picker/color-picker.a2ui.json +1 -1
- package/components/color-picker/color-picker.js +5 -2
- package/components/color-picker/color-picker.yaml +1 -1
- package/components/command/command.js +22 -11
- package/components/description-list/description-list.js +1 -1
- package/components/divider/divider.a2ui.json +0 -19
- package/components/divider/divider.js +1 -1
- package/components/divider/divider.yaml +0 -12
- package/components/drawer/drawer.a2ui.json +2 -2
- package/components/drawer/drawer.css +1 -1
- package/components/drawer/drawer.js +2 -2
- package/components/drawer/drawer.yaml +3 -3
- package/components/embed/embed.js +1 -1
- package/components/empty-state/empty-state.a2ui.json +0 -13
- package/components/empty-state/empty-state.js +1 -1
- package/components/empty-state/empty-state.yaml +0 -5
- package/components/footer/footer.a2ui.json +1 -1
- package/components/footer/footer.yaml +1 -1
- package/components/grid/grid.a2ui.json +0 -5
- package/components/grid/grid.js +1 -1
- package/components/grid/grid.yaml +0 -4
- package/components/header/header.a2ui.json +1 -1
- package/components/header/header.yaml +1 -1
- package/components/heatmap/heatmap.a2ui.json +4 -4
- package/components/heatmap/heatmap.js +4 -4
- package/components/heatmap/heatmap.yaml +4 -4
- package/components/icon/icon.a2ui.json +13 -0
- package/components/icon/icon.js +2 -2
- package/components/icon/icon.yaml +6 -0
- package/components/image/image.a2ui.json +10 -21
- package/components/image/image.js +1 -1
- package/components/image/image.yaml +8 -16
- package/components/input/input.a2ui.json +0 -15
- package/components/input/input.js +2 -2
- package/components/input/input.yaml +0 -12
- package/components/inspector/inspector.a2ui.json +0 -5
- package/components/inspector/inspector.js +2 -2
- package/components/inspector/inspector.yaml +0 -4
- package/components/kbd/kbd.js +1 -1
- package/components/list/list.a2ui.json +0 -33
- package/components/list/list.js +1 -1
- package/components/list/list.yaml +0 -27
- package/components/menu/menu.a2ui.json +0 -10
- package/components/menu/menu.js +9 -3
- package/components/menu/menu.yaml +0 -8
- package/components/modal/modal.a2ui.json +1 -25
- package/components/modal/modal.js +1 -1
- package/components/modal/modal.yaml +1 -22
- package/components/noodles/noodles.a2ui.json +0 -5
- package/components/noodles/noodles.js +1 -1
- package/components/noodles/noodles.yaml +0 -5
- package/components/otp-input/otp-input.a2ui.json +0 -5
- package/components/otp-input/otp-input.js +1 -1
- package/components/otp-input/otp-input.yaml +0 -4
- package/components/pagination/pagination.a2ui.json +3 -13
- package/components/pagination/pagination.css +1 -1
- package/components/pagination/pagination.js +1 -1
- package/components/pagination/pagination.yaml +5 -14
- package/components/pane/pane.a2ui.json +0 -10
- package/components/pane/pane.js +1 -1
- package/components/pane/pane.yaml +0 -9
- package/components/pipeline-status/pipeline-status.js +1 -1
- package/components/popover/popover.a2ui.json +0 -14
- package/components/popover/popover.js +9 -3
- package/components/popover/popover.yaml +0 -11
- package/components/progress/progress.a2ui.json +2 -12
- package/components/progress/progress.js +1 -1
- package/components/progress/progress.yaml +2 -11
- package/components/progress-row/progress-row.a2ui.json +3 -13
- package/components/progress-row/progress-row.js +1 -1
- package/components/progress-row/progress-row.yaml +3 -11
- package/components/radio/radio.css +1 -1
- package/components/radio/radio.js +2 -2
- package/components/range/range.js +1 -1
- package/components/rating/rating.js +1 -1
- package/components/richtext/richtext.js +2 -2
- package/components/row/row.a2ui.json +0 -5
- package/components/row/row.js +2 -2
- package/components/row/row.yaml +0 -4
- package/components/search/search.a2ui.json +0 -5
- package/components/search/search.js +1 -1
- package/components/search/search.yaml +0 -4
- package/components/section/section.a2ui.json +1 -1
- package/components/section/section.yaml +1 -1
- package/components/segment/segment.js +1 -1
- package/components/segmented/segmented.css +1 -1
- package/components/segmented/segmented.js +1 -1
- package/components/select/select.a2ui.json +5 -0
- package/components/select/select.js +13 -3
- package/components/select/select.yaml +5 -0
- package/components/skeleton/skeleton.a2ui.json +0 -11
- package/components/skeleton/skeleton.js +1 -1
- package/components/skeleton/skeleton.yaml +0 -5
- package/components/slider/slider.a2ui.json +0 -5
- package/components/slider/slider.js +1 -1
- package/components/slider/slider.yaml +0 -5
- package/components/stack/stack.js +1 -1
- package/components/stat/stat.js +1 -1
- package/components/stepper/stepper.js +1 -1
- package/components/stream/stream.js +1 -1
- package/components/swiper/swiper.a2ui.json +7 -7
- package/components/swiper/swiper.js +2 -2
- package/components/swiper/swiper.yaml +8 -6
- package/components/switch/switch.css +1 -1
- package/components/switch/switch.js +2 -2
- package/components/table/table.js +1 -1
- package/components/tabs/tab.js +1 -1
- package/components/tabs/tabs.js +1 -1
- package/components/tag/tag.a2ui.json +0 -5
- package/components/tag/tag.js +1 -1
- package/components/tag/tag.yaml +0 -4
- package/components/text/text.a2ui.json +5 -0
- package/components/text/text.css +2 -2
- package/components/text/text.js +1 -1
- package/components/text/text.yaml +5 -0
- package/components/textarea/textarea.js +1 -1
- package/components/timeline/timeline.a2ui.json +8 -13
- package/components/timeline/timeline.js +1 -1
- package/components/timeline/timeline.yaml +6 -11
- package/components/toast/toast.a2ui.json +0 -15
- package/components/toast/toast.js +1 -1
- package/components/toast/toast.yaml +0 -13
- package/components/toggle-group/toggle-group.js +1 -1
- package/components/toolbar/toolbar.a2ui.json +0 -23
- package/components/toolbar/toolbar.js +13 -3
- package/components/toolbar/toolbar.yaml +0 -19
- package/components/tooltip/tooltip.a2ui.json +0 -10
- package/components/tooltip/tooltip.js +2 -2
- package/components/tooltip/tooltip.yaml +0 -8
- package/components/tree/tree.js +1 -1
- package/components/upload/upload.js +1 -1
- package/core/markdown.js +1 -1
- package/core/provider.js +2 -2
- package/package.json +7 -3
- package/patterns/a2ui-root/a2ui-root.a2ui.json +118 -0
- package/{a2ui/root.js → patterns/a2ui-root/a2ui-root.js} +9 -4
- package/patterns/a2ui-root/a2ui-root.yaml +76 -0
- package/patterns/adia-chat/adia-chat.js +3 -3
- package/patterns/adia-chat/css/adia-chat.streaming.css +2 -2
- package/patterns/adia-editor/adia-editor.js +1 -1
- package/patterns/app-nav/app-nav.js +1 -1
- package/patterns/app-nav-group/app-nav-group.js +2 -2
- package/patterns/app-nav-item/app-nav-item.js +1 -1
- package/patterns/app-shell/app-shell.js +1 -1
- package/patterns/gen-ui/gen-ui.css +3 -3
- package/patterns/gen-ui/gen-ui.js +1 -1
- package/patterns/index.js +1 -0
- package/patterns/section-nav/section-nav.js +1 -1
- package/patterns/section-nav-group/section-nav-group.js +1 -1
- package/patterns/section-nav-item/section-nav-item.js +1 -1
- package/traits/define.js +1 -1
- package/a2ui/dockables/action.js +0 -152
- package/a2ui/dockables/base.js +0 -30
- package/a2ui/dockables/controller.js +0 -97
- package/a2ui/dockables/data-source.js +0 -103
- package/a2ui/dockables/index.js +0 -6
- package/a2ui/dockables/lifecycle.js +0 -84
- package/a2ui/dockables/provider.js +0 -59
- package/a2ui/manifest-runtime.js +0 -226
- package/a2ui/registry.js +0 -200
- package/a2ui/renderer.js +0 -361
- package/a2ui/stream.js +0 -243
- package/a2ui/surface-manifest.js +0 -294
- package/a2ui/surface.js +0 -222
- package/a2ui/wire-factory.js +0 -134
- package/a2ui/wiring-engine.js +0 -209
- package/a2ui/wiring-registry.js +0 -342
package/components/grid/grid.js
CHANGED
|
@@ -51,10 +51,10 @@
|
|
|
51
51
|
"component": {
|
|
52
52
|
"const": "Heatmap"
|
|
53
53
|
},
|
|
54
|
-
"
|
|
55
|
-
"description": "
|
|
54
|
+
"noLegend": {
|
|
55
|
+
"description": "Hide the Less/More legend strip",
|
|
56
56
|
"type": "boolean",
|
|
57
|
-
"default":
|
|
57
|
+
"default": false
|
|
58
58
|
},
|
|
59
59
|
"rows": {
|
|
60
60
|
"description": "Row count",
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
"examples": [
|
|
96
96
|
{
|
|
97
97
|
"description": "Basic 7x12 matrix heatmap with random data.",
|
|
98
|
-
"a2ui": "[\n {\n \"id\": \"root\",\n \"component\": \"Card\",\n \"children\": [\n \"sec\"\n ]\n },\n {\n \"id\": \"sec\",\n \"component\": \"Section\",\n \"children\": [\n \"hm\"\n ]\n },\n {\n \"id\": \"hm\",\n \"component\": \"Heatmap\",\n \"type\": \"matrix\",\n \"rows\": 7,\n \"cols\": 12,\n \"
|
|
98
|
+
"a2ui": "[\n {\n \"id\": \"root\",\n \"component\": \"Card\",\n \"children\": [\n \"sec\"\n ]\n },\n {\n \"id\": \"sec\",\n \"component\": \"Section\",\n \"children\": [\n \"hm\"\n ]\n },\n {\n \"id\": \"hm\",\n \"component\": \"Heatmap\",\n \"type\": \"matrix\",\n \"rows\": 7,\n \"cols\": 12,\n \"colorScheme\": \"data-ramp\"\n }\n]",
|
|
99
99
|
"name": "basic-heatmap"
|
|
100
100
|
}
|
|
101
101
|
],
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* cols — Number (default 12)
|
|
8
8
|
* scale — 'linear' | 'log' | 'quantile' (default 'linear')
|
|
9
9
|
* data — JSON string OR .data property [{ r, c, v, label? }]
|
|
10
|
-
* legend
|
|
10
|
+
* no-legend — Boolean (default false — legend shown)
|
|
11
11
|
* color-scheme — 'accent' | 'success' | 'warning' | 'data-ramp' (default 'data-ramp')
|
|
12
12
|
* start-date — ISO date (for day-grid to label months)
|
|
13
13
|
* aspect — 'square' | 'wide' (default 'wide')
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
* title — optional header title
|
|
21
21
|
*/
|
|
22
22
|
|
|
23
|
-
import { AdiaElement } from '
|
|
23
|
+
import { AdiaElement } from '../../core/element.js';
|
|
24
24
|
|
|
25
25
|
const MONTHS = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'];
|
|
26
26
|
|
|
@@ -30,7 +30,7 @@ class AdiaHeatmap extends AdiaElement {
|
|
|
30
30
|
rows: { type: Number, default: 7, reflect: true },
|
|
31
31
|
cols: { type: Number, default: 12, reflect: true },
|
|
32
32
|
scale: { type: String, default: 'linear', reflect: true },
|
|
33
|
-
|
|
33
|
+
noLegend: { type: Boolean, default: false, reflect: true, attribute: 'no-legend' },
|
|
34
34
|
colorScheme: { type: String, default: 'data-ramp', reflect: true, attribute: 'color-scheme' },
|
|
35
35
|
startDate: { type: String, default: '', reflect: true, attribute: 'start-date' },
|
|
36
36
|
aspect: { type: String, default: 'wide', reflect: true },
|
|
@@ -192,7 +192,7 @@ class AdiaHeatmap extends AdiaElement {
|
|
|
192
192
|
this.appendChild(grid);
|
|
193
193
|
|
|
194
194
|
// ── Legend ──
|
|
195
|
-
if (this.
|
|
195
|
+
if (!this.noLegend) {
|
|
196
196
|
const legend = document.createElement('div');
|
|
197
197
|
legend.setAttribute('data-legend', '');
|
|
198
198
|
const less = document.createElement('span');
|
|
@@ -38,10 +38,11 @@ props:
|
|
|
38
38
|
description: Column count
|
|
39
39
|
type: number
|
|
40
40
|
default: 12
|
|
41
|
-
|
|
42
|
-
description:
|
|
41
|
+
noLegend:
|
|
42
|
+
description: Hide the Less/More legend strip
|
|
43
43
|
type: boolean
|
|
44
|
-
default:
|
|
44
|
+
default: false
|
|
45
|
+
attribute: no-legend
|
|
45
46
|
rows:
|
|
46
47
|
description: Row count
|
|
47
48
|
type: number
|
|
@@ -100,7 +101,6 @@ examples:
|
|
|
100
101
|
"type": "matrix",
|
|
101
102
|
"rows": 7,
|
|
102
103
|
"cols": 12,
|
|
103
|
-
"legend": true,
|
|
104
104
|
"colorScheme": "data-ramp"
|
|
105
105
|
}
|
|
106
106
|
]
|
|
@@ -30,6 +30,19 @@
|
|
|
30
30
|
"description": "Icon size. Accepts the named scale (xs/sm/md/lg/xl) or a pixel value as a string (\"12\", \"16\", \"24\", \"32\", \"48\"). Overrides --a-icon-size.",
|
|
31
31
|
"type": "string",
|
|
32
32
|
"default": ""
|
|
33
|
+
},
|
|
34
|
+
"weight": {
|
|
35
|
+
"description": "Icon weight — selects the Phosphor weight variant (thin/light/regular/bold/fill/duotone).",
|
|
36
|
+
"type": "string",
|
|
37
|
+
"enum": [
|
|
38
|
+
"thin",
|
|
39
|
+
"light",
|
|
40
|
+
"regular",
|
|
41
|
+
"bold",
|
|
42
|
+
"fill",
|
|
43
|
+
"duotone"
|
|
44
|
+
],
|
|
45
|
+
"default": "regular"
|
|
33
46
|
}
|
|
34
47
|
},
|
|
35
48
|
"required": [
|
package/components/icon/icon.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AdiaElement, signal, html } from '
|
|
2
|
-
import { getIcon } from '
|
|
1
|
+
import { AdiaElement, signal, html } from '../../core/element.js';
|
|
2
|
+
import { getIcon } from '../../core/icons.js';
|
|
3
3
|
|
|
4
4
|
class AdiaIcon extends AdiaElement {
|
|
5
5
|
static properties = {
|
|
@@ -22,6 +22,12 @@ props:
|
|
|
22
22
|
as a string ("12", "16", "24", "32", "48"). Overrides --a-icon-size.
|
|
23
23
|
type: string
|
|
24
24
|
default: ""
|
|
25
|
+
weight:
|
|
26
|
+
description: Icon weight — selects the Phosphor weight variant (thin/light/regular/bold/fill/duotone).
|
|
27
|
+
type: string
|
|
28
|
+
default: regular
|
|
29
|
+
reflect: true
|
|
30
|
+
enum: [thin, light, regular, bold, fill, duotone]
|
|
25
31
|
events: {}
|
|
26
32
|
slots: {}
|
|
27
33
|
states:
|
|
@@ -18,22 +18,6 @@
|
|
|
18
18
|
"type": "string",
|
|
19
19
|
"default": ""
|
|
20
20
|
},
|
|
21
|
-
"aspect": {
|
|
22
|
-
"description": "Aspect ratio preset — sets the intrinsic aspect-ratio CSS property.",
|
|
23
|
-
"type": "string",
|
|
24
|
-
"enum": [
|
|
25
|
-
"",
|
|
26
|
-
"1/1",
|
|
27
|
-
"3/2",
|
|
28
|
-
"4/3",
|
|
29
|
-
"16/9",
|
|
30
|
-
"21/9",
|
|
31
|
-
"2/3",
|
|
32
|
-
"3/4",
|
|
33
|
-
"9/16"
|
|
34
|
-
],
|
|
35
|
-
"default": ""
|
|
36
|
-
},
|
|
37
21
|
"component": {
|
|
38
22
|
"const": "Image"
|
|
39
23
|
},
|
|
@@ -58,11 +42,6 @@
|
|
|
58
42
|
"type": "string",
|
|
59
43
|
"default": ""
|
|
60
44
|
},
|
|
61
|
-
"lazy": {
|
|
62
|
-
"description": "Enables native lazy loading.",
|
|
63
|
-
"type": "boolean",
|
|
64
|
-
"default": false
|
|
65
|
-
},
|
|
66
45
|
"radius": {
|
|
67
46
|
"description": "Border radius token",
|
|
68
47
|
"type": "string",
|
|
@@ -74,6 +53,16 @@
|
|
|
74
53
|
],
|
|
75
54
|
"default": ""
|
|
76
55
|
},
|
|
56
|
+
"raw": {
|
|
57
|
+
"description": "Strip chrome (no background, no radius) for edge-to-edge rendering.",
|
|
58
|
+
"type": "boolean",
|
|
59
|
+
"default": false
|
|
60
|
+
},
|
|
61
|
+
"size": {
|
|
62
|
+
"description": "Size preset — e.g. 'full' fills the container width and height.",
|
|
63
|
+
"type": "string",
|
|
64
|
+
"default": ""
|
|
65
|
+
},
|
|
77
66
|
"src": {
|
|
78
67
|
"description": "Image source URL.",
|
|
79
68
|
"type": "string",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* Raw: strips chrome (no background, no radius) for edge-to-edge rendering
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import { AdiaElement } from '
|
|
17
|
+
import { AdiaElement } from '../../core/element.js';
|
|
18
18
|
|
|
19
19
|
class AdiaImage extends AdiaElement {
|
|
20
20
|
static properties = {
|
|
@@ -12,20 +12,6 @@ props:
|
|
|
12
12
|
description: Alt text for the image.
|
|
13
13
|
type: string
|
|
14
14
|
default: ""
|
|
15
|
-
aspect:
|
|
16
|
-
description: Aspect ratio preset — sets the intrinsic aspect-ratio CSS property.
|
|
17
|
-
type: string
|
|
18
|
-
default: ""
|
|
19
|
-
enum:
|
|
20
|
-
- ""
|
|
21
|
-
- 1/1
|
|
22
|
-
- 3/2
|
|
23
|
-
- 4/3
|
|
24
|
-
- 16/9
|
|
25
|
-
- 21/9
|
|
26
|
-
- 2/3
|
|
27
|
-
- 3/4
|
|
28
|
-
- 9/16
|
|
29
15
|
fallback:
|
|
30
16
|
description: Fallback image URL on error
|
|
31
17
|
type: string
|
|
@@ -43,10 +29,16 @@ props:
|
|
|
43
29
|
description: CSS height
|
|
44
30
|
type: string
|
|
45
31
|
default: ""
|
|
46
|
-
|
|
47
|
-
description:
|
|
32
|
+
raw:
|
|
33
|
+
description: Strip chrome (no background, no radius) for edge-to-edge rendering.
|
|
48
34
|
type: boolean
|
|
49
35
|
default: false
|
|
36
|
+
reflect: true
|
|
37
|
+
size:
|
|
38
|
+
description: Size preset — e.g. 'full' fills the container width and height.
|
|
39
|
+
type: string
|
|
40
|
+
default: ""
|
|
41
|
+
reflect: true
|
|
50
42
|
radius:
|
|
51
43
|
description: Border radius token
|
|
52
44
|
type: string
|
|
@@ -51,11 +51,6 @@
|
|
|
51
51
|
"type": "string",
|
|
52
52
|
"default": ""
|
|
53
53
|
},
|
|
54
|
-
"icon": {
|
|
55
|
-
"description": "Leading Phosphor icon name (shortcut for setting `prefix` to an icon tag).",
|
|
56
|
-
"type": "string",
|
|
57
|
-
"default": ""
|
|
58
|
-
},
|
|
59
54
|
"label": {
|
|
60
55
|
"description": "Label text rendered above the input field",
|
|
61
56
|
"type": "string",
|
|
@@ -71,11 +66,6 @@
|
|
|
71
66
|
"type": "number",
|
|
72
67
|
"default": null
|
|
73
68
|
},
|
|
74
|
-
"multiline": {
|
|
75
|
-
"description": "Render a multiline textarea-like surface. Prefer TextArea; kept for back-compat.",
|
|
76
|
-
"type": "boolean",
|
|
77
|
-
"default": false
|
|
78
|
-
},
|
|
79
69
|
"name": {
|
|
80
70
|
"description": "Form control name for form data submission",
|
|
81
71
|
"type": "string",
|
|
@@ -106,11 +96,6 @@
|
|
|
106
96
|
"type": "boolean",
|
|
107
97
|
"default": false
|
|
108
98
|
},
|
|
109
|
-
"rows": {
|
|
110
|
-
"description": "Visible row count when multiline is true. Ignored otherwise.",
|
|
111
|
-
"type": "number",
|
|
112
|
-
"default": 3
|
|
113
|
-
},
|
|
114
99
|
"suffix": {
|
|
115
100
|
"description": "Suffix text rendered after the text surface (e.g., unit like 'kg')",
|
|
116
101
|
"type": "string",
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
* <input-ui placeholder="Search" prefix="search"></input-ui>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import { AdiaFormElement } from '
|
|
11
|
-
import { isIconName } from '
|
|
10
|
+
import { AdiaFormElement } from '../../core/form.js';
|
|
11
|
+
import { isIconName } from '../../core/icons.js';
|
|
12
12
|
|
|
13
13
|
const renderAffix = (v) => isIconName(v)
|
|
14
14
|
? `<icon-ui name="${v}"></icon-ui>`
|
|
@@ -13,18 +13,6 @@ props:
|
|
|
13
13
|
description: Form control name for form data submission
|
|
14
14
|
type: string
|
|
15
15
|
default: ""
|
|
16
|
-
icon:
|
|
17
|
-
description: Leading Phosphor icon name (shortcut for setting `prefix` to an icon tag).
|
|
18
|
-
type: string
|
|
19
|
-
default: ""
|
|
20
|
-
multiline:
|
|
21
|
-
description: Render a multiline textarea-like surface. Prefer TextArea; kept for back-compat.
|
|
22
|
-
type: boolean
|
|
23
|
-
default: false
|
|
24
|
-
rows:
|
|
25
|
-
description: Visible row count when multiline is true. Ignored otherwise.
|
|
26
|
-
type: number
|
|
27
|
-
default: 3
|
|
28
16
|
type:
|
|
29
17
|
description: Input type hint. Password type applies disc masking via -webkit-text-security.
|
|
30
18
|
type: string
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AdiaElement } from '
|
|
2
|
-
import { registry } from '
|
|
1
|
+
import { AdiaElement } from '../../core/element.js';
|
|
2
|
+
import { registry } from '@adia-ai/a2ui-utils';
|
|
3
3
|
import '../tabs/tabs.js';
|
|
4
4
|
import '../tabs/tab.js';
|
|
5
5
|
import '../code/code.js';
|
|
@@ -12,10 +12,6 @@ props:
|
|
|
12
12
|
description: Active tab. One of 'catalog', 'surface', 'messages', 'code'.
|
|
13
13
|
type: string
|
|
14
14
|
default: surface
|
|
15
|
-
active:
|
|
16
|
-
description: Active tab (alias for `value`, accepts same enum).
|
|
17
|
-
type: string
|
|
18
|
-
default: ""
|
|
19
15
|
events: {}
|
|
20
16
|
slots:
|
|
21
17
|
default:
|
package/components/kbd/kbd.js
CHANGED
|
@@ -13,47 +13,14 @@
|
|
|
13
13
|
}
|
|
14
14
|
],
|
|
15
15
|
"properties": {
|
|
16
|
-
"align": {
|
|
17
|
-
"description": "Alignment — values depend on container semantics.",
|
|
18
|
-
"type": "string",
|
|
19
|
-
"enum": [
|
|
20
|
-
"start",
|
|
21
|
-
"center",
|
|
22
|
-
"end",
|
|
23
|
-
"stretch"
|
|
24
|
-
],
|
|
25
|
-
"default": "stretch"
|
|
26
|
-
},
|
|
27
16
|
"component": {
|
|
28
17
|
"const": "List"
|
|
29
18
|
},
|
|
30
|
-
"direction": {
|
|
31
|
-
"description": "Component property: direction.",
|
|
32
|
-
"type": "string",
|
|
33
|
-
"enum": [
|
|
34
|
-
"vertical",
|
|
35
|
-
"horizontal"
|
|
36
|
-
],
|
|
37
|
-
"default": "vertical"
|
|
38
|
-
},
|
|
39
19
|
"divider": {
|
|
40
20
|
"description": "Show dividers between items",
|
|
41
21
|
"type": "boolean",
|
|
42
22
|
"default": false
|
|
43
23
|
},
|
|
44
|
-
"gap": {
|
|
45
|
-
"description": "Gap between children.",
|
|
46
|
-
"type": "string",
|
|
47
|
-
"enum": [
|
|
48
|
-
"none",
|
|
49
|
-
"xs",
|
|
50
|
-
"sm",
|
|
51
|
-
"md",
|
|
52
|
-
"lg",
|
|
53
|
-
"xl"
|
|
54
|
-
],
|
|
55
|
-
"default": "sm"
|
|
56
|
-
},
|
|
57
24
|
"selectable": {
|
|
58
25
|
"description": "Enable selection on child listitems (roving tabindex + aria-selected).",
|
|
59
26
|
"type": "boolean",
|
package/components/list/list.js
CHANGED
|
@@ -8,37 +8,10 @@ category: layout
|
|
|
8
8
|
version: 1
|
|
9
9
|
description: Styled list with optional icons and dividers.
|
|
10
10
|
props:
|
|
11
|
-
align:
|
|
12
|
-
description: "Alignment — values depend on container semantics."
|
|
13
|
-
type: string
|
|
14
|
-
default: stretch
|
|
15
|
-
enum:
|
|
16
|
-
- start
|
|
17
|
-
- center
|
|
18
|
-
- end
|
|
19
|
-
- stretch
|
|
20
|
-
direction:
|
|
21
|
-
description: "Component property: direction."
|
|
22
|
-
type: string
|
|
23
|
-
default: vertical
|
|
24
|
-
enum:
|
|
25
|
-
- vertical
|
|
26
|
-
- horizontal
|
|
27
11
|
divider:
|
|
28
12
|
description: Show dividers between items
|
|
29
13
|
type: boolean
|
|
30
14
|
default: false
|
|
31
|
-
gap:
|
|
32
|
-
description: "Gap between children."
|
|
33
|
-
type: string
|
|
34
|
-
default: sm
|
|
35
|
-
enum:
|
|
36
|
-
- none
|
|
37
|
-
- xs
|
|
38
|
-
- sm
|
|
39
|
-
- md
|
|
40
|
-
- lg
|
|
41
|
-
- xl
|
|
42
15
|
selectable:
|
|
43
16
|
description: Enable selection on child listitems (roving tabindex + aria-selected).
|
|
44
17
|
type: boolean
|
|
@@ -13,11 +13,6 @@
|
|
|
13
13
|
}
|
|
14
14
|
],
|
|
15
15
|
"properties": {
|
|
16
|
-
"anchor": {
|
|
17
|
-
"description": "ID of the anchor element the menu positions relative to",
|
|
18
|
-
"type": "string",
|
|
19
|
-
"default": ""
|
|
20
|
-
},
|
|
21
16
|
"component": {
|
|
22
17
|
"const": "Menu"
|
|
23
18
|
},
|
|
@@ -41,11 +36,6 @@
|
|
|
41
36
|
"top-end"
|
|
42
37
|
],
|
|
43
38
|
"default": "bottom-start"
|
|
44
|
-
},
|
|
45
|
-
"trigger": {
|
|
46
|
-
"description": "ID of the element that opens this menu (click handler + aria-controls).",
|
|
47
|
-
"type": "string",
|
|
48
|
-
"default": ""
|
|
49
39
|
}
|
|
50
40
|
},
|
|
51
41
|
"required": [
|
package/components/menu/menu.js
CHANGED
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
* • Roving focus + arrow/Home/End/Enter/Escape keyboard nav.
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
import { AdiaElement } from '
|
|
19
|
-
import { anchorPopover } from '
|
|
18
|
+
import { AdiaElement } from '../../core/element.js';
|
|
19
|
+
import { anchorPopover } from '../../core/anchor.js';
|
|
20
20
|
|
|
21
21
|
class AdiaMenu extends AdiaElement {
|
|
22
22
|
static properties = {
|
|
@@ -30,6 +30,7 @@ class AdiaMenu extends AdiaElement {
|
|
|
30
30
|
#anchorCleanup = null;
|
|
31
31
|
#popover = null;
|
|
32
32
|
#bound = false;
|
|
33
|
+
#rafId = null;
|
|
33
34
|
|
|
34
35
|
connected() {
|
|
35
36
|
if (!this.#bound) {
|
|
@@ -88,7 +89,8 @@ class AdiaMenu extends AdiaElement {
|
|
|
88
89
|
requestAnimationFrame(() => this.#focusItem(0));
|
|
89
90
|
}
|
|
90
91
|
|
|
91
|
-
requestAnimationFrame(() => {
|
|
92
|
+
this.#rafId = requestAnimationFrame(() => {
|
|
93
|
+
this.#rafId = null;
|
|
92
94
|
document.addEventListener('pointerdown', this.#onOutside);
|
|
93
95
|
document.addEventListener('keydown', this.#onDocKey, true);
|
|
94
96
|
});
|
|
@@ -106,6 +108,10 @@ class AdiaMenu extends AdiaElement {
|
|
|
106
108
|
for (const item of items) this.insertBefore(item, pop);
|
|
107
109
|
}
|
|
108
110
|
|
|
111
|
+
if (this.#rafId != null) {
|
|
112
|
+
cancelAnimationFrame(this.#rafId);
|
|
113
|
+
this.#rafId = null;
|
|
114
|
+
}
|
|
109
115
|
document.removeEventListener('pointerdown', this.#onOutside);
|
|
110
116
|
document.removeEventListener('keydown', this.#onDocKey, true);
|
|
111
117
|
}
|
|
@@ -8,14 +8,6 @@ category: container
|
|
|
8
8
|
version: 1
|
|
9
9
|
description: Dropdown action menu with roving focus and keyboard navigation. Uses Popover API.
|
|
10
10
|
props:
|
|
11
|
-
anchor:
|
|
12
|
-
description: ID of the anchor element the menu positions relative to
|
|
13
|
-
type: string
|
|
14
|
-
default: ""
|
|
15
|
-
trigger:
|
|
16
|
-
description: ID of the element that opens this menu (click handler + aria-controls).
|
|
17
|
-
type: string
|
|
18
|
-
default: ""
|
|
19
11
|
gap:
|
|
20
12
|
description: Gap in px
|
|
21
13
|
type: number
|
|
@@ -13,25 +13,11 @@
|
|
|
13
13
|
}
|
|
14
14
|
],
|
|
15
15
|
"properties": {
|
|
16
|
-
"anchor": {
|
|
17
|
-
"description": "ID of the element to anchor to (popover mode only). Positions the surface below the anchor element.",
|
|
18
|
-
"type": "string",
|
|
19
|
-
"default": ""
|
|
20
|
-
},
|
|
21
16
|
"component": {
|
|
22
17
|
"const": "Modal"
|
|
23
18
|
},
|
|
24
|
-
"mode": {
|
|
25
|
-
"description": "Surface type. Dialog uses showModal() with backdrop and focus trap. Popover uses the Popover API with light dismiss and optional anchor positioning.",
|
|
26
|
-
"type": "string",
|
|
27
|
-
"enum": [
|
|
28
|
-
"dialog",
|
|
29
|
-
"popover"
|
|
30
|
-
],
|
|
31
|
-
"default": "dialog"
|
|
32
|
-
},
|
|
33
19
|
"open": {
|
|
34
|
-
"description": "
|
|
20
|
+
"description": "Controls overlay visibility. Setting to true opens the surface with entry animation.",
|
|
35
21
|
"type": "boolean",
|
|
36
22
|
"default": false
|
|
37
23
|
},
|
|
@@ -40,11 +26,6 @@
|
|
|
40
26
|
"type": "boolean",
|
|
41
27
|
"default": false
|
|
42
28
|
},
|
|
43
|
-
"show": {
|
|
44
|
-
"description": "Controls overlay visibility. Setting to true opens the surface with entry animation.",
|
|
45
|
-
"type": "boolean",
|
|
46
|
-
"default": false
|
|
47
|
-
},
|
|
48
29
|
"size": {
|
|
49
30
|
"description": "Width preset. sm=24rem, md=32rem, lg=48rem, full=95vw.",
|
|
50
31
|
"type": "string",
|
|
@@ -60,11 +41,6 @@
|
|
|
60
41
|
"description": "Aria label applied to the surface element for accessibility",
|
|
61
42
|
"type": "string",
|
|
62
43
|
"default": ""
|
|
63
|
-
},
|
|
64
|
-
"trigger": {
|
|
65
|
-
"description": "ID of the element that opens this modal (sets aria-controls + click handler).",
|
|
66
|
-
"type": "string",
|
|
67
|
-
"default": ""
|
|
68
44
|
}
|
|
69
45
|
},
|
|
70
46
|
"required": [
|