@adia-ai/web-components 0.0.1 → 0.0.2
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/agent-reasoning/agent-reasoning.a2ui.json +14 -8
- package/components/agent-reasoning/agent-reasoning.css +1 -1
- package/components/agent-reasoning/agent-reasoning.js +8 -8
- package/components/agent-reasoning/agent-reasoning.yaml +9 -6
- package/components/avatar/avatar.a2ui.json +0 -10
- package/components/avatar/avatar.css +1 -1
- package/components/avatar/avatar.yaml +0 -8
- package/components/badge/badge.a2ui.json +6 -6
- package/components/badge/badge.js +21 -0
- package/components/badge/badge.yaml +8 -5
- package/components/button/button.a2ui.json +0 -11
- package/components/button/button.css +1 -1
- package/components/button/button.js +1 -1
- package/components/button/button.yaml +0 -11
- package/components/calendar-picker/calendar-picker.js +23 -17
- package/components/canvas/canvas.js +1 -1
- package/components/card/card.a2ui.json +0 -21
- package/components/card/card.yaml +0 -14
- package/components/chart/chart.a2ui.json +9 -8
- package/components/chart/chart.yaml +7 -5
- package/components/check/check.css +1 -1
- package/components/code/code.a2ui.json +0 -5
- package/components/code/code.yaml +0 -4
- package/components/col/col.a2ui.json +0 -20
- package/components/col/col.yaml +0 -20
- package/components/color-picker/color-picker.a2ui.json +1 -1
- package/components/color-picker/color-picker.js +4 -1
- package/components/color-picker/color-picker.yaml +1 -1
- package/components/command/command.js +21 -10
- package/components/divider/divider.a2ui.json +0 -19
- 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 +1 -1
- package/components/drawer/drawer.yaml +3 -3
- package/components/empty-state/empty-state.a2ui.json +0 -13
- 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.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 +3 -3
- package/components/heatmap/heatmap.yaml +4 -4
- package/components/icon/icon.a2ui.json +13 -0
- package/components/icon/icon.yaml +6 -0
- package/components/image/image.a2ui.json +10 -21
- package/components/image/image.yaml +8 -16
- package/components/input/input.a2ui.json +0 -15
- package/components/input/input.yaml +0 -12
- package/components/inspector/inspector.a2ui.json +0 -5
- package/components/inspector/inspector.yaml +0 -4
- package/components/list/list.a2ui.json +0 -33
- package/components/list/list.yaml +0 -27
- package/components/menu/menu.a2ui.json +0 -10
- package/components/menu/menu.js +7 -1
- package/components/menu/menu.yaml +0 -8
- package/components/modal/modal.a2ui.json +1 -25
- package/components/modal/modal.yaml +1 -22
- package/components/noodles/noodles.a2ui.json +0 -5
- package/components/noodles/noodles.yaml +0 -5
- package/components/otp-input/otp-input.a2ui.json +0 -5
- 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.yaml +5 -14
- package/components/pane/pane.a2ui.json +0 -10
- package/components/pane/pane.yaml +0 -9
- package/components/popover/popover.a2ui.json +0 -14
- package/components/popover/popover.js +7 -1
- package/components/popover/popover.yaml +0 -11
- package/components/progress/progress.a2ui.json +2 -12
- package/components/progress/progress.yaml +2 -11
- package/components/progress-row/progress-row.a2ui.json +3 -13
- package/components/progress-row/progress-row.yaml +3 -11
- package/components/radio/radio.css +1 -1
- package/components/row/row.a2ui.json +0 -5
- package/components/row/row.yaml +0 -4
- package/components/search/search.a2ui.json +0 -5
- package/components/search/search.yaml +0 -4
- package/components/section/section.a2ui.json +1 -1
- package/components/section/section.yaml +1 -1
- package/components/segmented/segmented.css +1 -1
- package/components/select/select.a2ui.json +5 -0
- package/components/select/select.js +11 -1
- package/components/select/select.yaml +5 -0
- package/components/skeleton/skeleton.a2ui.json +0 -11
- package/components/skeleton/skeleton.yaml +0 -5
- package/components/slider/slider.a2ui.json +0 -5
- package/components/slider/slider.yaml +0 -5
- package/components/swiper/swiper.a2ui.json +7 -7
- package/components/swiper/swiper.js +1 -1
- package/components/swiper/swiper.yaml +8 -6
- package/components/switch/switch.css +1 -1
- package/components/tag/tag.a2ui.json +0 -5
- 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.yaml +5 -0
- package/components/timeline/timeline.a2ui.json +8 -13
- package/components/timeline/timeline.yaml +6 -11
- package/components/toast/toast.a2ui.json +0 -15
- package/components/toast/toast.yaml +0 -13
- package/components/toolbar/toolbar.a2ui.json +0 -23
- package/components/toolbar/toolbar.js +11 -1
- package/components/toolbar/toolbar.yaml +0 -19
- package/components/tooltip/tooltip.a2ui.json +0 -10
- package/components/tooltip/tooltip.yaml +0 -8
- package/package.json +1 -1
- package/patterns/adia-chat/css/adia-chat.streaming.css +2 -2
- package/patterns/gen-ui/gen-ui.css +3 -3
|
@@ -13,11 +13,6 @@
|
|
|
13
13
|
}
|
|
14
14
|
],
|
|
15
15
|
"properties": {
|
|
16
|
-
"autocollapse": {
|
|
17
|
-
"description": "Auto-collapse after finish().",
|
|
18
|
-
"type": "boolean",
|
|
19
|
-
"default": true
|
|
20
|
-
},
|
|
21
16
|
"collapsed": {
|
|
22
17
|
"description": "Start collapsed.",
|
|
23
18
|
"type": "boolean",
|
|
@@ -31,10 +26,21 @@
|
|
|
31
26
|
"type": "string",
|
|
32
27
|
"default": ""
|
|
33
28
|
},
|
|
34
|
-
"
|
|
35
|
-
"description": "
|
|
29
|
+
"noAutocollapse": {
|
|
30
|
+
"description": "Disable auto-collapse after finish().",
|
|
31
|
+
"type": "boolean",
|
|
32
|
+
"default": false
|
|
33
|
+
},
|
|
34
|
+
"status": {
|
|
35
|
+
"description": "Drives the status icon — idle, active (spinner), done (check), error (warning).",
|
|
36
36
|
"type": "string",
|
|
37
|
-
"
|
|
37
|
+
"enum": [
|
|
38
|
+
"idle",
|
|
39
|
+
"active",
|
|
40
|
+
"done",
|
|
41
|
+
"error"
|
|
42
|
+
],
|
|
43
|
+
"default": "active"
|
|
38
44
|
}
|
|
39
45
|
},
|
|
40
46
|
"required": [
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
* r.finish('2 iterations · 94/100 · 7s');
|
|
34
34
|
*
|
|
35
35
|
* Attributes:
|
|
36
|
-
* collapsed
|
|
37
|
-
* autocollapse
|
|
38
|
-
* heading
|
|
36
|
+
* collapsed — start collapsed
|
|
37
|
+
* no-autocollapse — disable auto-collapse 1.2s after finish (default: false — auto-collapse on)
|
|
38
|
+
* heading — fallback summary label while active
|
|
39
39
|
* status — 'idle' | 'active' | 'done' | 'error' (default: 'active')
|
|
40
40
|
* Drives the status icon: spinner / check-circle / warning-circle
|
|
41
41
|
*
|
|
@@ -56,10 +56,10 @@ const REASONING_STATUSES = new Set(['idle', 'active', 'done', 'error']);
|
|
|
56
56
|
|
|
57
57
|
class AdiaAgentReasoning extends AdiaElement {
|
|
58
58
|
static properties = {
|
|
59
|
-
collapsed:
|
|
60
|
-
|
|
61
|
-
heading:
|
|
62
|
-
status:
|
|
59
|
+
collapsed: { type: Boolean, default: false, reflect: true },
|
|
60
|
+
noAutocollapse: { type: Boolean, default: false, reflect: true, attribute: 'no-autocollapse' },
|
|
61
|
+
heading: { type: String, default: '', reflect: true },
|
|
62
|
+
status: { type: String, default: 'active', reflect: true },
|
|
63
63
|
};
|
|
64
64
|
|
|
65
65
|
static template = () => null;
|
|
@@ -202,7 +202,7 @@ class AdiaAgentReasoning extends AdiaElement {
|
|
|
202
202
|
}));
|
|
203
203
|
|
|
204
204
|
if (this.#finishTimer != null) clearTimeout(this.#finishTimer);
|
|
205
|
-
if (this.
|
|
205
|
+
if (!this.noAutocollapse && !isError) {
|
|
206
206
|
this.#finishTimer = setTimeout(() => {
|
|
207
207
|
this.#finishTimer = null;
|
|
208
208
|
this.collapsed = true;
|
|
@@ -8,10 +8,11 @@ category: agent
|
|
|
8
8
|
version: 1
|
|
9
9
|
description: Agent inner monologue + pipeline viewer with steps, thoughts, plans, and iterations.
|
|
10
10
|
props:
|
|
11
|
-
|
|
12
|
-
description:
|
|
11
|
+
noAutocollapse:
|
|
12
|
+
description: Disable auto-collapse after finish().
|
|
13
13
|
type: boolean
|
|
14
|
-
default:
|
|
14
|
+
default: false
|
|
15
|
+
attribute: no-autocollapse
|
|
15
16
|
collapsed:
|
|
16
17
|
description: Start collapsed.
|
|
17
18
|
type: boolean
|
|
@@ -20,10 +21,12 @@ props:
|
|
|
20
21
|
description: Fallback summary label.
|
|
21
22
|
type: string
|
|
22
23
|
default: ""
|
|
23
|
-
|
|
24
|
-
description:
|
|
24
|
+
status:
|
|
25
|
+
description: Drives the status icon — idle, active (spinner), done (check), error (warning).
|
|
25
26
|
type: string
|
|
26
|
-
default:
|
|
27
|
+
default: active
|
|
28
|
+
reflect: true
|
|
29
|
+
enum: [idle, active, done, error]
|
|
27
30
|
events:
|
|
28
31
|
reasoning-finish:
|
|
29
32
|
description: "Fired on reasoning-finish."
|
|
@@ -21,11 +21,6 @@
|
|
|
21
21
|
"type": "string",
|
|
22
22
|
"default": ""
|
|
23
23
|
},
|
|
24
|
-
"initials": {
|
|
25
|
-
"description": "Explicit initials override. When set, takes precedence over `name`.",
|
|
26
|
-
"type": "string",
|
|
27
|
-
"default": ""
|
|
28
|
-
},
|
|
29
24
|
"name": {
|
|
30
25
|
"description": "User name for initials (first letter of each word, max 2).",
|
|
31
26
|
"type": "string",
|
|
@@ -65,11 +60,6 @@
|
|
|
65
60
|
"description": "Display name (for initials)",
|
|
66
61
|
"type": "string",
|
|
67
62
|
"default": ""
|
|
68
|
-
},
|
|
69
|
-
"variant": {
|
|
70
|
-
"description": "Color/emphasis variant for the placeholder background + initials foreground.",
|
|
71
|
-
"type": "string",
|
|
72
|
-
"default": "default"
|
|
73
63
|
}
|
|
74
64
|
},
|
|
75
65
|
"required": [
|
|
@@ -12,10 +12,6 @@ props:
|
|
|
12
12
|
description: User name for initials (first letter of each word, max 2).
|
|
13
13
|
type: string
|
|
14
14
|
default: ""
|
|
15
|
-
initials:
|
|
16
|
-
description: Explicit initials override. When set, takes precedence over `name`.
|
|
17
|
-
type: string
|
|
18
|
-
default: ""
|
|
19
15
|
icon:
|
|
20
16
|
description: Phosphor icon name shown instead of initials when `src`/`name` are empty.
|
|
21
17
|
type: string
|
|
@@ -27,10 +23,6 @@ props:
|
|
|
27
23
|
enum:
|
|
28
24
|
- circle
|
|
29
25
|
- square
|
|
30
|
-
variant:
|
|
31
|
-
description: Color/emphasis variant for the placeholder background + initials foreground.
|
|
32
|
-
type: string
|
|
33
|
-
default: default
|
|
34
26
|
size:
|
|
35
27
|
description: >-
|
|
36
28
|
Avatar size. Canonical scale (xs/sm/md/lg/xl); long-form aliases
|
|
@@ -34,14 +34,14 @@
|
|
|
34
34
|
"default": "md"
|
|
35
35
|
},
|
|
36
36
|
"status": {
|
|
37
|
-
"description": "Semantic status shorthand. Auto-maps to variant and sets text.",
|
|
37
|
+
"description": "Semantic status shorthand. Auto-maps to variant and sets text. `new` → success \"New\"; `updated` → info \"Updated\"; `deprecated` → warning \"Deprecated\"; `removed` → danger \"Removed\"; `beta` → accent \"Beta\". Use `variant` + `text` directly for custom chips.",
|
|
38
38
|
"type": "string",
|
|
39
39
|
"enum": [
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
40
|
+
"new",
|
|
41
|
+
"updated",
|
|
42
|
+
"deprecated",
|
|
43
|
+
"removed",
|
|
44
|
+
"beta"
|
|
45
45
|
],
|
|
46
46
|
"default": ""
|
|
47
47
|
},
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* <badge-ui text="New" variant="accent"></badge-ui>
|
|
3
3
|
* <badge-ui text="3" variant="danger" size="sm"></badge-ui>
|
|
4
4
|
* <badge-ui text="Organic" variant="accent" icon="dot"></badge-ui> ← chart legend chip
|
|
5
|
+
* <badge-ui status="beta"></badge-ui> ← status shorthand
|
|
5
6
|
*
|
|
6
7
|
* Inline badge / tag. Pill-shaped, text rendered via CSS attr().
|
|
7
8
|
*
|
|
@@ -10,16 +11,26 @@
|
|
|
10
11
|
* Icon: optional leading icon (any registered icon name; "dot" for legend
|
|
11
12
|
* markers). Inherits the variant's foreground color so legend chips
|
|
12
13
|
* read as a single visual unit instead of icon + label collage.
|
|
14
|
+
* Status: semantic shorthand that auto-maps variant + text.
|
|
13
15
|
*/
|
|
14
16
|
|
|
15
17
|
import { AdiaElement } from '@core/element.js';
|
|
16
18
|
|
|
19
|
+
const STATUS_MAP = {
|
|
20
|
+
new: { variant: 'success', text: 'New' },
|
|
21
|
+
updated: { variant: 'info', text: 'Updated' },
|
|
22
|
+
deprecated: { variant: 'warning', text: 'Deprecated' },
|
|
23
|
+
removed: { variant: 'danger', text: 'Removed' },
|
|
24
|
+
beta: { variant: 'accent', text: 'Beta' },
|
|
25
|
+
};
|
|
26
|
+
|
|
17
27
|
class AdiaBadge extends AdiaElement {
|
|
18
28
|
static properties = {
|
|
19
29
|
text: { type: String, default: '', reflect: true },
|
|
20
30
|
variant: { type: String, default: 'default', reflect: true },
|
|
21
31
|
size: { type: String, default: 'md', reflect: true },
|
|
22
32
|
icon: { type: String, default: '', reflect: true },
|
|
33
|
+
status: { type: String, default: '', reflect: true },
|
|
23
34
|
};
|
|
24
35
|
|
|
25
36
|
static template = () => null;
|
|
@@ -29,6 +40,16 @@ class AdiaBadge extends AdiaElement {
|
|
|
29
40
|
}
|
|
30
41
|
|
|
31
42
|
render() {
|
|
43
|
+
// Status shorthand wins over explicit variant/text while it's set —
|
|
44
|
+
// mixing is unsupported. Converges in one extra render pass.
|
|
45
|
+
if (this.status) {
|
|
46
|
+
const entry = STATUS_MAP[this.status];
|
|
47
|
+
if (entry) {
|
|
48
|
+
if (this.variant !== entry.variant) this.variant = entry.variant;
|
|
49
|
+
if (this.text !== entry.text) this.text = entry.text;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
32
53
|
if (this.text) this.setAttribute('aria-label', this.text);
|
|
33
54
|
|
|
34
55
|
// Stamp / update the leading icon. Pattern mirrors button-ui so the same
|
|
@@ -25,14 +25,17 @@ props:
|
|
|
25
25
|
- xl
|
|
26
26
|
status:
|
|
27
27
|
description: Semantic status shorthand. Auto-maps to variant and sets text.
|
|
28
|
+
`new` → success "New"; `updated` → info "Updated"; `deprecated` → warning
|
|
29
|
+
"Deprecated"; `removed` → danger "Removed"; `beta` → accent "Beta".
|
|
30
|
+
Use `variant` + `text` directly for custom chips.
|
|
28
31
|
type: string
|
|
29
32
|
default: ""
|
|
30
33
|
enum:
|
|
31
|
-
-
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
-
|
|
35
|
-
-
|
|
34
|
+
- new
|
|
35
|
+
- updated
|
|
36
|
+
- deprecated
|
|
37
|
+
- removed
|
|
38
|
+
- beta
|
|
36
39
|
text:
|
|
37
40
|
description: Badge text content. Falls back to existing textContent.
|
|
38
41
|
type: string
|
|
@@ -18,11 +18,6 @@
|
|
|
18
18
|
"type": "string",
|
|
19
19
|
"default": "button"
|
|
20
20
|
},
|
|
21
|
-
"active": {
|
|
22
|
-
"description": "Indicates an active/pressed toggle state (for group-buttons and segmented controls).",
|
|
23
|
-
"type": "boolean",
|
|
24
|
-
"default": false
|
|
25
|
-
},
|
|
26
21
|
"component": {
|
|
27
22
|
"const": "Button"
|
|
28
23
|
},
|
|
@@ -36,11 +31,6 @@
|
|
|
36
31
|
"type": "string",
|
|
37
32
|
"default": ""
|
|
38
33
|
},
|
|
39
|
-
"iconRight": {
|
|
40
|
-
"description": "Trailing Phosphor icon name (rendered after text).",
|
|
41
|
-
"type": "string",
|
|
42
|
-
"default": ""
|
|
43
|
-
},
|
|
44
34
|
"size": {
|
|
45
35
|
"description": "Sizing scale (xs/sm/md/lg/xl).",
|
|
46
36
|
"type": "string",
|
|
@@ -70,7 +60,6 @@
|
|
|
70
60
|
"default",
|
|
71
61
|
"solid",
|
|
72
62
|
"outline",
|
|
73
|
-
"outlined",
|
|
74
63
|
"ghost",
|
|
75
64
|
"danger",
|
|
76
65
|
"primary",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
--button-fg-hover: var(--a-ui-text-hover);
|
|
14
14
|
--button-border-hover: transparent;
|
|
15
15
|
--button-bg-primary: var(--a-primary);
|
|
16
|
-
--button-fg-primary:
|
|
16
|
+
--button-fg-primary: var(--a-chrome-light);
|
|
17
17
|
--button-bg-outline: transparent;
|
|
18
18
|
--button-fg-outline: var(--a-fg);
|
|
19
19
|
--button-border-outline: var(--a-ui-border);
|
|
@@ -37,7 +37,7 @@ class AdiaButton extends AdiaElement {
|
|
|
37
37
|
#onClick = (e) => {
|
|
38
38
|
if (this.disabled) { e.stopPropagation(); return; }
|
|
39
39
|
if (this.type === 'submit') {
|
|
40
|
-
const form = this.closest('form
|
|
40
|
+
const form = this.closest('form');
|
|
41
41
|
if (form?.requestSubmit) form.requestSubmit();
|
|
42
42
|
}
|
|
43
43
|
this.dispatchEvent(new Event('press', { bubbles: true }));
|
|
@@ -12,11 +12,6 @@ props:
|
|
|
12
12
|
description: HTML button type (button, submit, reset)
|
|
13
13
|
type: string
|
|
14
14
|
default: button
|
|
15
|
-
active:
|
|
16
|
-
description: Indicates an active/pressed toggle state (for group-buttons and segmented controls).
|
|
17
|
-
type: boolean
|
|
18
|
-
default: false
|
|
19
|
-
reflect: true
|
|
20
15
|
stretch:
|
|
21
16
|
description: "Makes the button stretch to fill the parent's width"
|
|
22
17
|
type: boolean
|
|
@@ -31,11 +26,6 @@ props:
|
|
|
31
26
|
description: Leading Phosphor icon name (rendered before text).
|
|
32
27
|
type: string
|
|
33
28
|
default: ""
|
|
34
|
-
iconRight:
|
|
35
|
-
description: Trailing Phosphor icon name (rendered after text).
|
|
36
|
-
type: string
|
|
37
|
-
default: ""
|
|
38
|
-
attribute: icon-right
|
|
39
29
|
size:
|
|
40
30
|
description: "Sizing scale (xs/sm/md/lg/xl)."
|
|
41
31
|
type: string
|
|
@@ -58,7 +48,6 @@ props:
|
|
|
58
48
|
- default
|
|
59
49
|
- solid
|
|
60
50
|
- outline
|
|
61
|
-
- outlined
|
|
62
51
|
- ghost
|
|
63
52
|
- danger
|
|
64
53
|
- primary
|
|
@@ -58,6 +58,18 @@ class AdiaCalendarPicker extends AdiaFormElement {
|
|
|
58
58
|
#viewYear = new Date().getFullYear();
|
|
59
59
|
#viewMonth = new Date().getMonth();
|
|
60
60
|
#focusedDay = null;
|
|
61
|
+
#popoverClickBound = false;
|
|
62
|
+
|
|
63
|
+
#onPopoverClick = (e) => {
|
|
64
|
+
const target = e.target instanceof Element ? e.target : null;
|
|
65
|
+
if (!target) return;
|
|
66
|
+
const prev = target.closest('[data-cal-prev]');
|
|
67
|
+
if (prev) { e.stopPropagation(); this.#navigate(-1); return; }
|
|
68
|
+
const next = target.closest('[data-cal-next]');
|
|
69
|
+
if (next) { e.stopPropagation(); this.#navigate(1); return; }
|
|
70
|
+
const day = target.closest('[data-cal-day][data-date]:not([disabled])');
|
|
71
|
+
if (day) { e.stopPropagation(); this.#selectDate(day.dataset.date); }
|
|
72
|
+
};
|
|
61
73
|
|
|
62
74
|
connected() {
|
|
63
75
|
super.connected();
|
|
@@ -88,6 +100,8 @@ class AdiaCalendarPicker extends AdiaFormElement {
|
|
|
88
100
|
this.#popover.setAttribute('slot', 'popover');
|
|
89
101
|
this.#popover.setAttribute('popover', 'manual');
|
|
90
102
|
this.appendChild(this.#popover);
|
|
103
|
+
this.#popover.addEventListener('click', this.#onPopoverClick);
|
|
104
|
+
this.#popoverClickBound = true;
|
|
91
105
|
} else {
|
|
92
106
|
const display = this.querySelector('[slot="display"]');
|
|
93
107
|
if (display) display.textContent = this.#displayText();
|
|
@@ -95,6 +109,10 @@ class AdiaCalendarPicker extends AdiaFormElement {
|
|
|
95
109
|
|
|
96
110
|
if (!this.#popover) this.#popover = this.querySelector('[slot="popover"]');
|
|
97
111
|
if (!this.#trigger) this.#trigger = this.querySelector('[slot="trigger"]');
|
|
112
|
+
if (this.#popover && !this.#popoverClickBound) {
|
|
113
|
+
this.#popover.addEventListener('click', this.#onPopoverClick);
|
|
114
|
+
this.#popoverClickBound = true;
|
|
115
|
+
}
|
|
98
116
|
|
|
99
117
|
// Toggle popover
|
|
100
118
|
if (this.open) {
|
|
@@ -195,23 +213,7 @@ class AdiaCalendarPicker extends AdiaFormElement {
|
|
|
195
213
|
h += '</div>';
|
|
196
214
|
|
|
197
215
|
this.#popover.innerHTML = h;
|
|
198
|
-
|
|
199
|
-
// Wire events
|
|
200
|
-
this.#popover.querySelector('[data-cal-prev]')?.addEventListener('click', (e) => {
|
|
201
|
-
e.stopPropagation();
|
|
202
|
-
this.#navigate(-1);
|
|
203
|
-
});
|
|
204
|
-
this.#popover.querySelector('[data-cal-next]')?.addEventListener('click', (e) => {
|
|
205
|
-
e.stopPropagation();
|
|
206
|
-
this.#navigate(1);
|
|
207
|
-
});
|
|
208
|
-
|
|
209
|
-
for (const btn of this.#popover.querySelectorAll('[data-cal-day][data-date]:not([disabled])')) {
|
|
210
|
-
btn.addEventListener('click', (e) => {
|
|
211
|
-
e.stopPropagation();
|
|
212
|
-
this.#selectDate(btn.dataset.date);
|
|
213
|
-
});
|
|
214
|
-
}
|
|
216
|
+
// Events are delegated on #popover (see #onPopoverClick) — no per-element wiring.
|
|
215
217
|
}
|
|
216
218
|
|
|
217
219
|
#navigate(delta) {
|
|
@@ -312,6 +314,10 @@ class AdiaCalendarPicker extends AdiaFormElement {
|
|
|
312
314
|
this.removeEventListener('click', this.#onClick);
|
|
313
315
|
this.removeEventListener('keydown', this.#onKey);
|
|
314
316
|
document.removeEventListener('pointerdown', this.#onOutside);
|
|
317
|
+
if (this.#popover && this.#popoverClickBound) {
|
|
318
|
+
this.#popover.removeEventListener('click', this.#onPopoverClick);
|
|
319
|
+
}
|
|
320
|
+
this.#popoverClickBound = false;
|
|
315
321
|
this.#anchorCleanup?.();
|
|
316
322
|
this.#anchorCleanup = null;
|
|
317
323
|
this.#popover?.hidePopover?.();
|
|
@@ -89,7 +89,7 @@ export class AdiaCanvas extends AdiaElement {
|
|
|
89
89
|
this.#rootEl = document.createElement('a2ui-root');
|
|
90
90
|
|
|
91
91
|
if (this.theme) {
|
|
92
|
-
const themeEl = document.createElement('theme-
|
|
92
|
+
const themeEl = document.createElement('theme-ui');
|
|
93
93
|
themeEl.setAttribute('preset', this.theme);
|
|
94
94
|
themeEl.appendChild(this.#rootEl);
|
|
95
95
|
this.#rootContainer.appendChild(themeEl);
|
|
@@ -16,17 +16,6 @@
|
|
|
16
16
|
"component": {
|
|
17
17
|
"const": "Card"
|
|
18
18
|
},
|
|
19
|
-
"density": {
|
|
20
|
-
"description": "Interior density — compact/comfortable/spacious. Tightens or loosens padding + gap.",
|
|
21
|
-
"type": "string",
|
|
22
|
-
"enum": [
|
|
23
|
-
"",
|
|
24
|
-
"compact",
|
|
25
|
-
"comfortable",
|
|
26
|
-
"spacious"
|
|
27
|
-
],
|
|
28
|
-
"default": ""
|
|
29
|
-
},
|
|
30
19
|
"draggable": {
|
|
31
20
|
"description": "Enables drag handle + cursor:grab. Wires the draggable trait; dispatches drag-end.",
|
|
32
21
|
"type": "boolean",
|
|
@@ -43,21 +32,11 @@
|
|
|
43
32
|
],
|
|
44
33
|
"default": 1
|
|
45
34
|
},
|
|
46
|
-
"interactive": {
|
|
47
|
-
"description": "Marks the card as clickable — enables hover elevation, pointer cursor, and focus ring.",
|
|
48
|
-
"type": "boolean",
|
|
49
|
-
"default": false
|
|
50
|
-
},
|
|
51
35
|
"padding": {
|
|
52
36
|
"description": "Interior padding scale (overrides --card-padding). Accepts the named scale (none/xs/sm/md/lg/xl) or a numeric rung (\"1\"…\"16\").",
|
|
53
37
|
"type": "string",
|
|
54
38
|
"default": "md"
|
|
55
39
|
},
|
|
56
|
-
"radius": {
|
|
57
|
-
"description": "Border radius preset (overrides --card-radius). Named (none/sm/md/lg/round) or numeric.",
|
|
58
|
-
"type": "string",
|
|
59
|
-
"default": ""
|
|
60
|
-
},
|
|
61
40
|
"raw": {
|
|
62
41
|
"description": "Strips background, border, and shadow. Parent owns the surface. Content structure still applies.",
|
|
63
42
|
"type": "boolean",
|
|
@@ -22,20 +22,6 @@ props:
|
|
|
22
22
|
scale (none/xs/sm/md/lg/xl) or a numeric rung ("1"…"16").
|
|
23
23
|
type: string
|
|
24
24
|
default: md
|
|
25
|
-
interactive:
|
|
26
|
-
description: Marks the card as clickable — enables hover elevation, pointer cursor, and focus ring.
|
|
27
|
-
type: boolean
|
|
28
|
-
default: false
|
|
29
|
-
reflect: true
|
|
30
|
-
radius:
|
|
31
|
-
description: Border radius preset (overrides --card-radius). Named (none/sm/md/lg/round) or numeric.
|
|
32
|
-
type: string
|
|
33
|
-
default: ""
|
|
34
|
-
density:
|
|
35
|
-
description: Interior density — compact/comfortable/spacious. Tightens or loosens padding + gap.
|
|
36
|
-
type: string
|
|
37
|
-
default: ""
|
|
38
|
-
enum: ["", compact, comfortable, spacious]
|
|
39
25
|
draggable:
|
|
40
26
|
description: Enables drag handle + cursor:grab. Wires the draggable trait; dispatches drag-end.
|
|
41
27
|
type: boolean
|
|
@@ -13,11 +13,6 @@
|
|
|
13
13
|
}
|
|
14
14
|
],
|
|
15
15
|
"properties": {
|
|
16
|
-
"title": {
|
|
17
|
-
"description": "Chart title above the canvas",
|
|
18
|
-
"type": "string",
|
|
19
|
-
"default": ""
|
|
20
|
-
},
|
|
21
16
|
"type": {
|
|
22
17
|
"description": "Chart type. Only 'bar' is built-in.",
|
|
23
18
|
"type": "string",
|
|
@@ -38,11 +33,12 @@
|
|
|
38
33
|
"description": "Aspect ratio",
|
|
39
34
|
"type": "string",
|
|
40
35
|
"enum": [
|
|
36
|
+
"std",
|
|
41
37
|
"wide",
|
|
42
38
|
"square",
|
|
43
39
|
"tall"
|
|
44
40
|
],
|
|
45
|
-
"default": "
|
|
41
|
+
"default": "std"
|
|
46
42
|
},
|
|
47
43
|
"color": {
|
|
48
44
|
"description": "Color scheme",
|
|
@@ -59,6 +55,11 @@
|
|
|
59
55
|
"component": {
|
|
60
56
|
"const": "Chart"
|
|
61
57
|
},
|
|
58
|
+
"heading": {
|
|
59
|
+
"description": "Chart heading text rendered above the canvas.",
|
|
60
|
+
"type": "string",
|
|
61
|
+
"default": ""
|
|
62
|
+
},
|
|
62
63
|
"hideAverage": {
|
|
63
64
|
"description": "When true, suppress the overlaid average line",
|
|
64
65
|
"type": "boolean",
|
|
@@ -75,9 +76,9 @@
|
|
|
75
76
|
"default": false
|
|
76
77
|
},
|
|
77
78
|
"radius": {
|
|
78
|
-
"description": "Bar corner radius",
|
|
79
|
+
"description": "Bar corner radius (null = let CSS tokens decide)",
|
|
79
80
|
"type": "number",
|
|
80
|
-
"default":
|
|
81
|
+
"default": null
|
|
81
82
|
},
|
|
82
83
|
"size": {
|
|
83
84
|
"description": "Chart size",
|
|
@@ -26,8 +26,9 @@ props:
|
|
|
26
26
|
aspect:
|
|
27
27
|
description: Aspect ratio
|
|
28
28
|
type: string
|
|
29
|
-
default:
|
|
29
|
+
default: std
|
|
30
30
|
enum:
|
|
31
|
+
- std
|
|
31
32
|
- wide
|
|
32
33
|
- square
|
|
33
34
|
- tall
|
|
@@ -57,9 +58,9 @@ props:
|
|
|
57
58
|
default: false
|
|
58
59
|
attribute: hide-values
|
|
59
60
|
radius:
|
|
60
|
-
description: Bar corner radius
|
|
61
|
+
description: Bar corner radius (null = let CSS tokens decide)
|
|
61
62
|
type: number
|
|
62
|
-
default:
|
|
63
|
+
default: null
|
|
63
64
|
size:
|
|
64
65
|
description: Chart size
|
|
65
66
|
type: string
|
|
@@ -72,10 +73,11 @@ props:
|
|
|
72
73
|
description: Line smoothing factor
|
|
73
74
|
type: number
|
|
74
75
|
default: 0.4
|
|
75
|
-
|
|
76
|
-
description: Chart
|
|
76
|
+
heading:
|
|
77
|
+
description: Chart heading text rendered above the canvas.
|
|
77
78
|
type: string
|
|
78
79
|
default: ""
|
|
80
|
+
reflect: true
|
|
79
81
|
x:
|
|
80
82
|
description: Data key for x-axis (category) values
|
|
81
83
|
type: string
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
/* ── State: checked ── */
|
|
25
25
|
--check-bg-checked: var(--a-primary);
|
|
26
26
|
--check-border-checked: var(--a-primary);
|
|
27
|
-
--check-fg-checked:
|
|
27
|
+
--check-fg-checked: var(--a-chrome-light);
|
|
28
28
|
--check-bg-checked-hover: var(--a-primary-hover);
|
|
29
29
|
|
|
30
30
|
/* ── State: disabled ── */
|
|
@@ -13,21 +13,11 @@
|
|
|
13
13
|
}
|
|
14
14
|
],
|
|
15
15
|
"properties": {
|
|
16
|
-
"active": {
|
|
17
|
-
"description": "Marks this column as the active one in a tab-panel layout.",
|
|
18
|
-
"type": "boolean",
|
|
19
|
-
"default": false
|
|
20
|
-
},
|
|
21
16
|
"align": {
|
|
22
17
|
"description": "Align items",
|
|
23
18
|
"type": "string",
|
|
24
19
|
"default": "stretch"
|
|
25
20
|
},
|
|
26
|
-
"basis": {
|
|
27
|
-
"description": "Flex basis override (CSS length or keyword like \"auto\"/\"content\").",
|
|
28
|
-
"type": "string",
|
|
29
|
-
"default": ""
|
|
30
|
-
},
|
|
31
21
|
"component": {
|
|
32
22
|
"const": "Column"
|
|
33
23
|
},
|
|
@@ -40,16 +30,6 @@
|
|
|
40
30
|
"description": "Justify content",
|
|
41
31
|
"type": "string",
|
|
42
32
|
"default": "start"
|
|
43
|
-
},
|
|
44
|
-
"span": {
|
|
45
|
-
"description": "Column span — consumed by a parent Grid to make this column wrap multiple grid tracks. Accepts a numeric rung (\"1\"..\"6\") or \"full\".",
|
|
46
|
-
"type": "string",
|
|
47
|
-
"default": ""
|
|
48
|
-
},
|
|
49
|
-
"wrap": {
|
|
50
|
-
"description": "Allow children to wrap onto multiple lines (default is flex nowrap).",
|
|
51
|
-
"type": "boolean",
|
|
52
|
-
"default": false
|
|
53
33
|
}
|
|
54
34
|
},
|
|
55
35
|
"required": [
|