@adia-ai/web-components 0.0.27 → 0.0.29

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.
Files changed (93) hide show
  1. package/README.md +4 -8
  2. package/a2ui/index.js +1 -1
  3. package/components/agent-questions/agent-questions.css +20 -1
  4. package/components/agent-trace/agent-trace.css +17 -12
  5. package/components/badge/badge.js +9 -1
  6. package/components/breadcrumb/breadcrumb.a2ui.json +16 -1
  7. package/components/breadcrumb/breadcrumb.css +27 -0
  8. package/components/breadcrumb/breadcrumb.js +95 -17
  9. package/components/breadcrumb/breadcrumb.yaml +15 -1
  10. package/components/canvas/canvas.js +1 -1
  11. package/components/chart/chart.css +20 -13
  12. package/components/chart/chart.js +49 -17
  13. package/components/chart-legend/chart-legend.css +30 -54
  14. package/components/chart-legend/chart-legend.js +48 -30
  15. package/components/command/command.js +52 -1
  16. package/components/feed/feed-item.yaml +50 -0
  17. package/components/feed/feed.a2ui.json +59 -0
  18. package/components/feed/feed.css +150 -0
  19. package/components/feed/feed.js +385 -0
  20. package/components/feed/feed.yaml +33 -0
  21. package/components/index.js +2 -0
  22. package/components/swatch/swatch.a2ui.json +116 -0
  23. package/components/swatch/swatch.css +141 -0
  24. package/components/swatch/swatch.js +121 -0
  25. package/components/swatch/swatch.yaml +101 -0
  26. package/components/timeline/timeline.css +5 -1
  27. package/components/toast/toast.js +48 -178
  28. package/components/tooltip/tooltip.css +3 -3
  29. package/core/provider.js +1 -0
  30. package/index.css +3 -2
  31. package/index.js +15 -7
  32. package/package.json +1 -5
  33. package/styles/components.css +1 -0
  34. package/patterns/a2ui-root/a2ui-root.a2ui.json +0 -125
  35. package/patterns/a2ui-root/a2ui-root.js +0 -191
  36. package/patterns/a2ui-root/a2ui-root.yaml +0 -87
  37. package/patterns/adia-chat/adia-chat.a2ui.json +0 -149
  38. package/patterns/adia-chat/adia-chat.css +0 -10
  39. package/patterns/adia-chat/adia-chat.js +0 -297
  40. package/patterns/adia-chat/adia-chat.yaml +0 -118
  41. package/patterns/adia-chat/css/adia-chat.empty.css +0 -12
  42. package/patterns/adia-chat/css/adia-chat.layout.css +0 -60
  43. package/patterns/adia-chat/css/adia-chat.markdown.css +0 -74
  44. package/patterns/adia-chat/css/adia-chat.messages.css +0 -87
  45. package/patterns/adia-chat/css/adia-chat.streaming.css +0 -30
  46. package/patterns/adia-chat/css/adia-chat.tokens.css +0 -95
  47. package/patterns/adia-editor/adia-editor.a2ui.json +0 -73
  48. package/patterns/adia-editor/adia-editor.css +0 -6
  49. package/patterns/adia-editor/adia-editor.js +0 -56
  50. package/patterns/adia-editor/adia-editor.yaml +0 -59
  51. package/patterns/adia-editor/css/adia-editor.layout.css +0 -171
  52. package/patterns/adia-editor/css/adia-editor.tokens.css +0 -28
  53. package/patterns/app-nav/app-nav.a2ui.json +0 -89
  54. package/patterns/app-nav/app-nav.css +0 -92
  55. package/patterns/app-nav/app-nav.js +0 -112
  56. package/patterns/app-nav/app-nav.yaml +0 -54
  57. package/patterns/app-nav-group/app-nav-group.a2ui.json +0 -82
  58. package/patterns/app-nav-group/app-nav-group.css +0 -264
  59. package/patterns/app-nav-group/app-nav-group.js +0 -116
  60. package/patterns/app-nav-group/app-nav-group.yaml +0 -59
  61. package/patterns/app-nav-item/app-nav-item.a2ui.json +0 -83
  62. package/patterns/app-nav-item/app-nav-item.css +0 -162
  63. package/patterns/app-nav-item/app-nav-item.js +0 -42
  64. package/patterns/app-nav-item/app-nav-item.yaml +0 -62
  65. package/patterns/app-shell/app-shell.a2ui.json +0 -129
  66. package/patterns/app-shell/app-shell.css +0 -14
  67. package/patterns/app-shell/app-shell.js +0 -251
  68. package/patterns/app-shell/app-shell.yaml +0 -89
  69. package/patterns/app-shell/css/app-shell.collapsed.css +0 -86
  70. package/patterns/app-shell/css/app-shell.helpers.css +0 -42
  71. package/patterns/app-shell/css/app-shell.main.css +0 -172
  72. package/patterns/app-shell/css/app-shell.shell.css +0 -44
  73. package/patterns/app-shell/css/app-shell.sidebar.css +0 -161
  74. package/patterns/app-shell/css/app-shell.templates.css +0 -214
  75. package/patterns/app-shell/css/app-shell.tokens.css +0 -119
  76. package/patterns/gen-ui/gen-ui.a2ui.json +0 -72
  77. package/patterns/gen-ui/gen-ui.css +0 -83
  78. package/patterns/gen-ui/gen-ui.js +0 -136
  79. package/patterns/gen-ui/gen-ui.yaml +0 -43
  80. package/patterns/index.js +0 -11
  81. package/patterns/section-nav/section-nav.a2ui.json +0 -91
  82. package/patterns/section-nav/section-nav.css +0 -60
  83. package/patterns/section-nav/section-nav.js +0 -42
  84. package/patterns/section-nav/section-nav.yaml +0 -58
  85. package/patterns/section-nav-group/section-nav-group.a2ui.json +0 -95
  86. package/patterns/section-nav-group/section-nav-group.css +0 -74
  87. package/patterns/section-nav-group/section-nav-group.js +0 -84
  88. package/patterns/section-nav-group/section-nav-group.yaml +0 -66
  89. package/patterns/section-nav-item/section-nav-item.a2ui.json +0 -97
  90. package/patterns/section-nav-item/section-nav-item.css +0 -106
  91. package/patterns/section-nav-item/section-nav-item.js +0 -66
  92. package/patterns/section-nav-item/section-nav-item.yaml +0 -70
  93. package/styles/layouts/admin.css +0 -7
@@ -1,83 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://adiaui.dev/a2ui/v0_9/components/AppNavItem.json",
4
- "title": "AppNavItem",
5
- "description": "Single navigation link in app-nav-ui, optionally nested inside\napp-nav-group-ui. Icon + label + optional badge. Selection is managed\nby the parent app-nav-ui — set via clicking or nav.select(item).\n",
6
- "type": "object",
7
- "allOf": [
8
- {
9
- "$ref": "common_types.json#/$defs/ComponentCommon"
10
- },
11
- {
12
- "$ref": "common_types.json#/$defs/CatalogComponentCommon"
13
- }
14
- ],
15
- "properties": {
16
- "badge": {
17
- "description": "Optional trailing badge text (count, \"New\", etc.).",
18
- "type": "string",
19
- "default": ""
20
- },
21
- "component": {
22
- "const": "AppNavItem"
23
- },
24
- "icon": {
25
- "description": "Phosphor icon name (leading).",
26
- "type": "string",
27
- "default": ""
28
- },
29
- "selected": {
30
- "description": "Current selection. Managed by parent app-nav-ui — don't set multiple siblings.",
31
- "type": "boolean",
32
- "default": false
33
- },
34
- "text": {
35
- "description": "Item label.",
36
- "type": "string",
37
- "default": ""
38
- },
39
- "value": {
40
- "description": "Unique identifier for selection tracking (also the route / target id).",
41
- "type": "string",
42
- "default": ""
43
- }
44
- },
45
- "required": [
46
- "component"
47
- ],
48
- "unevaluatedProperties": false,
49
- "x-adiaui": {
50
- "anti_patterns": [],
51
- "category": "nav",
52
- "events": {},
53
- "examples": [],
54
- "keywords": [
55
- "app-nav-item",
56
- "nav",
57
- "link",
58
- "menu-item"
59
- ],
60
- "name": "AdiaAppNavItem",
61
- "related": [
62
- "AppNav",
63
- "AppNavGroup"
64
- ],
65
- "slots": {},
66
- "states": [
67
- {
68
- "description": "Default.",
69
- "name": "idle"
70
- },
71
- {
72
- "description": "Currently selected nav destination.",
73
- "attribute": "selected",
74
- "name": "selected"
75
- }
76
- ],
77
- "synonyms": {},
78
- "tag": "app-nav-item-ui",
79
- "tokens": {},
80
- "traits": [],
81
- "version": 1
82
- }
83
- }
@@ -1,162 +0,0 @@
1
- /* Safari 17.x bug: `:scope:hover` (Flavor A) and `:scope[selected]`
2
- (Flavor B — attribute-removal restyle) both fail inside `@scope`.
3
- Selectors moved out — custom props from `:where(:scope)` are still set
4
- on the element via inheritance. Specificity (0,1,1 / 0,2,1) preserved.
5
- Safari < 18 is below the §1 floor (ADR-0007); fix protects opt-in
6
- consumers extending below the floor and is harmlessly redundant on
7
- engines without the bug. */
8
- app-nav-item-ui:hover {
9
- background: var(--nav-item-bg-hover);
10
- color: var(--nav-item-fg-hover);
11
- }
12
- app-nav-item-ui:hover [slot="icon"] {
13
- color: var(--nav-item-fg-hover);
14
- }
15
- app-nav-item-ui[selected] {
16
- background: var(--nav-item-bg-selected);
17
- color: var(--nav-item-fg-selected);
18
- font-weight: var(--nav-item-selected-weight);
19
- }
20
- app-nav-item-ui[selected] [slot="icon"] {
21
- color: var(--nav-item-icon-fg-selected);
22
- }
23
- app-nav-item-ui[selected] [slot="icon"]:empty::before {
24
- content: '';
25
- width: 2px;
26
- height: 1em;
27
- border-radius: 1px;
28
- background: var(--nav-item-accent);
29
- }
30
-
31
- @scope (app-nav-item-ui) {
32
- :where(:scope) {
33
- --nav-item-accent: var(--a-accent);
34
- --nav-item-row-height: var(--a-size);
35
- --nav-item-row-height-sm: var(--a-size-sm);
36
- --nav-item-row-height-lg: var(--a-size-lg);
37
- --nav-item-row-px: var(--a-ui-px);
38
- --nav-item-row-gap: var(--a-space-1);
39
- --nav-item-row-radius: var(--a-radius-md);
40
- --nav-item-font-size: var(--a-ui-size);
41
- --nav-item-font-size-sm: var(--a-ui-sm);
42
- --nav-item-font-size-lg: var(--a-ui-lg);
43
- --nav-item-fg: var(--a-ui-text-subtle);
44
- --nav-item-fg-hover: var(--a-ui-text-hover);
45
- --nav-item-fg-selected: var(--a-ui-text-selected);
46
- --nav-item-icon-fg: var(--a-ui-text-muted);
47
- --nav-item-icon-fg-selected: var(--nav-item-accent);
48
- --nav-item-bg-hover: var(--a-ui-bg-hover);
49
- --nav-item-bg-selected: var(--a-ui-bg-selected);
50
- --nav-item-icon-size: calc(var(--nav-item-row-height) - var(--a-space-2));
51
- --nav-item-badge-size: var(--a-ui-sm);
52
- }
53
-
54
- :scope {
55
- box-sizing: border-box;
56
- display: flex;
57
- align-items: center;
58
- gap: var(--nav-item-row-gap);
59
- height: var(--nav-item-row-height);
60
- padding: 0 var(--nav-item-row-px);
61
- border-radius: var(--nav-item-row-radius);
62
- font-size: var(--nav-item-font-size);
63
- color: var(--nav-item-fg);
64
- cursor: pointer;
65
- user-select: none;
66
- white-space: nowrap;
67
- transition:
68
- background var(--nav-duration-fast) var(--nav-easing),
69
- color var(--nav-duration-fast) var(--nav-easing);
70
- outline: none;
71
- }
72
-
73
- :scope:focus-visible {
74
- background: var(--nav-item-bg-hover);
75
- color: var(--nav-item-fg-hover);
76
- outline: none;
77
- }
78
-
79
- /* :scope[selected] rules moved outside @scope — see Safari 17.x bug note at top. */
80
-
81
- /* Icon slot — always present, reserves space even when empty */
82
- [slot="icon"] {
83
- width: var(--nav-item-icon-size);
84
- height: var(--nav-item-icon-size);
85
- flex-shrink: 0;
86
- display: flex;
87
- align-items: center;
88
- justify-content: center;
89
- color: var(--nav-item-icon-fg);
90
- transition: color var(--nav-duration-fast) var(--nav-easing);
91
- }
92
-
93
- [slot="icon"] icon-ui {
94
- --a-icon-size: calc(var(--nav-item-icon-font-size) + 2px);
95
- }
96
-
97
- /* Selected accent line on empty icon slot moved outside @scope — see Safari 17.x bug note at top. */
98
-
99
- [slot="text"] {
100
- flex: 1;
101
- min-width: 0;
102
- overflow: hidden;
103
- text-overflow: ellipsis;
104
- }
105
-
106
- [slot="badge"] {
107
- font-size: var(--nav-item-badge-size);
108
- color: var(--nav-item-badge-fg);
109
- background: var(--nav-item-badge-bg);
110
- padding: 1px var(--nav-item-badge-px);
111
- border-radius: var(--nav-item-badge-radius);
112
- line-height: 1.4;
113
- margin-inline-start: auto;
114
- }
115
-
116
- [slot="trailing"] {
117
- margin-inline-start: auto;
118
- font-size: var(--nav-item-trailing-font);
119
- color: var(--nav-item-trailing-fg);
120
- border: 1px solid var(--nav-item-trailing-border);
121
- border-radius: var(--nav-item-trailing-radius);
122
- padding: 0 var(--nav-item-trailing-px);
123
- line-height: 1.6;
124
- flex-shrink: 0;
125
- }
126
-
127
- /* ── Collapsed nav: hide text, badge, trailing ── */
128
- app-nav-ui[collapsed] & [slot="text"],
129
- app-nav-ui[collapsed] & [slot="badge"],
130
- app-nav-ui[collapsed] & [slot="trailing"] {
131
- display: none;
132
- }
133
-
134
- app-nav-ui[collapsed] & {
135
- justify-content: center;
136
- padding: 0;
137
- }
138
-
139
- @container sidebar (max-width: 96px) {
140
- [slot="text"], [slot="badge"], [slot="trailing"] {
141
- display: none !important;
142
- }
143
- [slot="icon"] icon-ui {
144
- --a-icon-size: 18px;
145
- }
146
- :scope {
147
- justify-content: center;
148
- padding: 0;
149
- }
150
- }
151
-
152
- /* ── Size variants ── */
153
- :scope[size="sm"] {
154
- --nav-item-row-height: var(--nav-item-row-height-sm);
155
- --nav-item-font-size: var(--nav-item-font-size-sm);
156
- }
157
-
158
- :scope[size="lg"] {
159
- --nav-item-row-height: var(--nav-item-row-height-lg);
160
- --nav-item-font-size: var(--nav-item-font-size-lg);
161
- }
162
- }
@@ -1,42 +0,0 @@
1
- /**
2
- * <app-nav-item-ui> — Single navigation link in app-nav-ui (optionally
3
- * nested under app-nav-group-ui). Supports icon, label, and optional badge.
4
- *
5
- * Selection is managed by the parent app-nav-ui; setting `selected` is
6
- * a side-effect of calling nav.select(item) or user click.
7
- */
8
-
9
- import { AdiaElement } from '../../core/element.js';
10
-
11
- class AdiaAppNavItem extends AdiaElement {
12
- static properties = {
13
- text: { type: String, default: '', reflect: true },
14
- icon: { type: String, default: '', reflect: true },
15
- value: { type: String, default: '', reflect: true },
16
- badge: { type: String, default: '', reflect: true },
17
- selected: { type: Boolean, default: false, reflect: true },
18
- };
19
-
20
- static template = () => null;
21
-
22
- connected() {
23
- this.setAttribute('role', 'link');
24
- this.setAttribute('tabindex', '0');
25
-
26
- if (!this.querySelector('[slot="text"]')) {
27
- this.innerHTML = `
28
- <span slot="icon">${this.icon ? `<icon-ui name="${this.icon}"></icon-ui>` : ''}</span>
29
- <span slot="text">${this.text}</span>
30
- ${this.badge ? `<span slot="badge">${this.badge}</span>` : ''}
31
- `;
32
- }
33
- }
34
-
35
- render() {
36
- const textEl = this.querySelector('[slot="text"]');
37
- if (textEl) textEl.textContent = this.text;
38
- }
39
- }
40
- customElements.define('app-nav-item-ui', AdiaAppNavItem);
41
-
42
- export { AdiaAppNavItem };
@@ -1,62 +0,0 @@
1
- $schema: ../../../../scripts/schemas/component.yaml.schema.json
2
- name: AdiaAppNavItem
3
- tag: app-nav-item-ui
4
- component: AppNavItem
5
- category: nav
6
- version: 1
7
- description: |
8
- Single navigation link in app-nav-ui, optionally nested inside
9
- app-nav-group-ui. Icon + label + optional badge. Selection is managed
10
- by the parent app-nav-ui — set via clicking or nav.select(item).
11
-
12
- props:
13
- text:
14
- type: string
15
- default: ""
16
- reflect: true
17
- description: Item label.
18
-
19
- icon:
20
- type: string
21
- default: ""
22
- reflect: true
23
- description: Phosphor icon name (leading).
24
-
25
- value:
26
- type: string
27
- default: ""
28
- reflect: true
29
- description: Unique identifier for selection tracking (also the route / target id).
30
-
31
- badge:
32
- type: string
33
- default: ""
34
- reflect: true
35
- description: Optional trailing badge text (count, "New", etc.).
36
-
37
- selected:
38
- type: boolean
39
- default: false
40
- reflect: true
41
- description: Current selection. Managed by parent app-nav-ui — don't set multiple siblings.
42
-
43
- events: {}
44
-
45
- slots: {}
46
-
47
- states:
48
- - name: idle
49
- description: Default.
50
- - name: selected
51
- attribute: selected
52
- description: Currently selected nav destination.
53
-
54
- traits: []
55
-
56
- a2ui:
57
- rules:
58
- - Must be a descendant of app-nav-ui (direct child or via app-nav-group-ui).
59
- - Only one sibling may have selected=true at a time; prefer calling nav.select() over setting the attribute manually.
60
-
61
- keywords: [app-nav-item, nav, link, menu-item]
62
- related: [AppNav, AppNavGroup]
@@ -1,129 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://adiaui.dev/a2ui/v0_9/components/AppShell.json",
4
- "title": "AppShell",
5
- "description": "Behavior-only application shell. Wires sidebar toggles, resize handles,\na Cmd+K command palette, and a ResizeObserver that drives responsive\nsidebar collapse. Author supplies the DOM (aside[data-sidebar], main,\ndialog[data-command]); app-shell-ui binds the interactions.\n",
6
- "type": "object",
7
- "allOf": [
8
- {
9
- "$ref": "common_types.json#/$defs/ComponentCommon"
10
- },
11
- {
12
- "$ref": "common_types.json#/$defs/CatalogComponentCommon"
13
- }
14
- ],
15
- "properties": {
16
- "component": {
17
- "const": "AppShell"
18
- },
19
- "mode": {
20
- "description": "Layout variant — default is bordered surface; rounded softens edges; borderless removes the outer chrome.",
21
- "type": "string",
22
- "enum": [
23
- "",
24
- "rounded",
25
- "borderless"
26
- ],
27
- "default": ""
28
- }
29
- },
30
- "required": [
31
- "component"
32
- ],
33
- "unevaluatedProperties": false,
34
- "x-adiaui": {
35
- "anti_patterns": [],
36
- "category": "layout",
37
- "events": {
38
- "command-select": {
39
- "description": "Forwarded from the command palette when an option is chosen.",
40
- "detail": {
41
- "value": "string"
42
- }
43
- },
44
- "sidebar-resize": {
45
- "description": "Fired as a sidebar is dragged; debounced on the trailing edge.",
46
- "detail": {
47
- "sidebar": "string",
48
- "width": "number"
49
- }
50
- },
51
- "sidebar-toggle": {
52
- "description": "Fired when a sidebar is collapsed or expanded.",
53
- "detail": {
54
- "expanded": "boolean",
55
- "sidebar": "string"
56
- }
57
- }
58
- },
59
- "examples": [],
60
- "keywords": [
61
- "app-shell",
62
- "shell",
63
- "layout",
64
- "admin",
65
- "dashboard",
66
- "sidebar",
67
- "nav"
68
- ],
69
- "name": "AdiaAppShell",
70
- "related": [
71
- "AppNav",
72
- "AppNavGroup",
73
- "AppNavItem",
74
- "Command"
75
- ],
76
- "slots": {
77
- "description": {
78
- "description": "Secondary metadata inside any chrome bar. Muted + --a-ui-sm size."
79
- },
80
- "default": {
81
- "description": "Author-supplied page DOM. Expected structure — aside[data-sidebar] for navigation, main for content, optional dialog[data-command] for Cmd+K."
82
- },
83
- "action": {
84
- "description": "Trailing control cluster inside any chrome bar. The first [slot=\"action\"] child pushes itself (and siblings) to the end; subsequent siblings flow with gap. Coexists with legacy <span data-spacer> / <div data-actions> hooks for one release — new code should prefer slots."
85
- },
86
- "action-leading": {
87
- "description": "Leading (inline-start) control cluster inside any chrome bar. Pairs with [slot=\"action\"] for dual-cluster chrome (e.g. back button + breadcrumb on the left, primary actions on the right). Replaces the legacy <span data-spacer> hack."
88
- },
89
- "heading": {
90
- "description": "Primary label inside any chrome bar. Medium-weight + strong fg."
91
- },
92
- "icon": {
93
- "description": "Leading glyph inside any chrome bar — > main > header / footer and [data-sidebar] > header / footer. Muted color, flex-align."
94
- }
95
- },
96
- "states": [
97
- {
98
- "description": "Default, interactive shell.",
99
- "name": "idle"
100
- },
101
- {
102
- "description": "Leading sidebar is collapsed; content expands.",
103
- "attribute": "data-sidebar-leading-collapsed",
104
- "name": "collapsed-leading"
105
- },
106
- {
107
- "description": "Trailing sidebar (inspector) is collapsed.",
108
- "attribute": "data-sidebar-trailing-collapsed",
109
- "name": "collapsed-trailing"
110
- }
111
- ],
112
- "synonyms": {
113
- "admin": [
114
- "dashboard",
115
- "shell",
116
- "app-shell"
117
- ],
118
- "dashboard": [
119
- "admin",
120
- "shell",
121
- "app-shell"
122
- ]
123
- },
124
- "tag": "app-shell-ui",
125
- "tokens": {},
126
- "traits": [],
127
- "version": 1
128
- }
129
- }
@@ -1,14 +0,0 @@
1
- /* ═══════════════════════════════════════════════════════════════
2
- App Shell — <app-shell-ui> pattern component CSS
3
-
4
- Split into constituent parts for maintainability.
5
- Import order matters: tokens first, then structure, then overrides.
6
- ═══════════════════════════════════════════════════════════════ */
7
-
8
- @import "./css/app-shell.tokens.css";
9
- @import "./css/app-shell.shell.css";
10
- @import "./css/app-shell.main.css";
11
- @import "./css/app-shell.sidebar.css";
12
- @import "./css/app-shell.collapsed.css";
13
- @import "./css/app-shell.templates.css";
14
- @import "./css/app-shell.helpers.css";