@adia-ai/web-components 0.6.49 → 0.7.0
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/CHANGELOG.md +128 -0
- package/components/action-list/action-list.css +1 -1
- package/components/agent-artifact/agent-artifact.class.js +10 -10
- package/components/agent-artifact/agent-artifact.css +1 -1
- package/components/agent-reasoning/agent-reasoning.class.js +52 -1
- package/components/agent-reasoning/agent-reasoning.css +49 -22
- package/components/agent-trace/agent-trace.css +10 -10
- package/components/agent-trace/agent-trace.js +3 -3
- package/components/alert/alert.class.js +8 -1
- package/components/alert/alert.css +13 -1
- package/components/avatar/avatar.a2ui.json +2 -14
- package/components/avatar/avatar.class.js +3 -15
- package/components/avatar/avatar.d.ts +2 -4
- package/components/avatar/avatar.yaml +1 -18
- package/components/breadcrumb/breadcrumb.css +4 -1
- package/components/button/button.a2ui.json +3 -0
- package/components/button/button.css +14 -3
- package/components/button/button.yaml +5 -0
- package/components/calendar-grid/calendar-grid.css +1 -1
- package/components/calendar-picker/calendar-picker.css +5 -2
- package/components/chart/chart.a2ui.json +0 -18
- package/components/chart/chart.class.js +8 -50
- package/components/chart/chart.css +1 -15
- package/components/chart/chart.d.ts +0 -4
- package/components/chart/chart.yaml +0 -24
- package/components/color-input/color-input.css +4 -1
- package/components/combobox/combobox.class.js +11 -0
- package/components/combobox/combobox.css +8 -0
- package/components/date-range-picker/date-range-picker.class.js +5 -1
- package/components/date-range-picker/date-range-picker.css +12 -2
- package/components/datetime-picker/datetime-picker.class.js +3 -0
- package/components/datetime-picker/datetime-picker.css +16 -2
- package/components/empty-state/empty-state.css +11 -4
- package/components/field/field.css +17 -6
- package/components/grid/grid.a2ui.json +5 -0
- package/components/grid/grid.class.js +16 -6
- package/components/grid/grid.css +17 -3
- package/components/grid/grid.d.ts +2 -0
- package/components/grid/grid.yaml +9 -0
- package/components/heatmap/heatmap.class.js +9 -3
- package/components/heatmap/heatmap.css +19 -2
- package/components/image/image.css +4 -1
- package/components/input/input.css +1 -1
- package/components/integration-card/integration-card.class.js +31 -7
- package/components/integration-card/integration-card.test.js +12 -1
- package/components/kbd/kbd.a2ui.json +3 -2
- package/components/kbd/kbd.css +7 -4
- package/components/kbd/kbd.d.ts +2 -2
- package/components/kbd/kbd.yaml +2 -1
- package/components/list/list.class.js +8 -1
- package/components/menu/menu.css +4 -1
- package/components/modal/modal.class.js +10 -1
- package/components/modal/modal.css +9 -0
- package/components/option-card/option-card.a2ui.json +3 -0
- package/components/option-card/option-card.css +44 -19
- package/components/option-card/option-card.yaml +5 -0
- package/components/otp-input/otp-input.css +25 -10
- package/components/page/page.css +64 -11
- package/components/pagination/pagination.class.js +1 -1
- package/components/pagination/pagination.css +9 -1
- package/components/pane/pane.a2ui.json +3 -0
- package/components/pane/pane.class.js +7 -6
- package/components/pane/pane.css +5 -5
- package/components/pane/pane.yaml +6 -0
- package/components/pipeline-status/pipeline-status.css +6 -0
- package/components/popover/popover.css +12 -1
- package/components/preview/preview.css +30 -3
- package/components/progress-row/progress-row.css +3 -1
- package/components/qr-code/qr-code.css +4 -1
- package/components/segmented/segmented.css +4 -1
- package/components/select/select.a2ui.json +1 -1
- package/components/select/select.class.js +63 -7
- package/components/select/select.css +18 -0
- package/components/select/select.yaml +9 -2
- package/components/stack/stack.a2ui.json +12 -1
- package/components/stack/stack.d.ts +2 -2
- package/components/stack/stack.yaml +13 -1
- package/components/stat/stat.a2ui.json +5 -0
- package/components/stat/stat.css +55 -0
- package/components/stat/stat.d.ts +2 -0
- package/components/stat/stat.js +4 -0
- package/components/stat/stat.yaml +9 -0
- package/components/swiper/swiper.class.js +14 -6
- package/components/switch/switch.css +13 -0
- package/components/table/table.a2ui.json +2 -2
- package/components/table/table.css +13 -1
- package/components/table/table.yaml +2 -2
- package/components/time-picker/time-picker.css +4 -1
- package/components/timeline/timeline.class.js +3 -3
- package/components/timeline/timeline.css +23 -5
- package/components/toggle-group/toggle-group.css +4 -1
- package/components/toggle-scheme/toggle-scheme.css +4 -1
- package/components/tree/tree-item.a2ui.json +6 -0
- package/components/tree/tree-item.yaml +13 -1
- package/components/tree/tree.a2ui.json +3 -3
- package/components/tree/tree.class.js +24 -9
- package/components/tree/tree.css +8 -8
- package/components/tree/tree.test.js +52 -0
- package/components/tree/tree.yaml +4 -4
- package/dist/web-components.min.css +1 -1
- package/dist/web-components.min.js +84 -84
- package/package.json +3 -3
- package/styles/api/layout.css +7 -0
- package/styles/api/text.css +9 -5
- package/styles/index.css +11 -2
- package/styles/prose.css +8 -0
- package/styles/resets.css +5 -5
- package/styles/themes.css +8 -1
- package/styles/tokens.css +3 -3
- package/styles/type/elements.css +73 -0
- package/styles/type/roles.css +14 -49
- package/styles/type/scale.css +0 -5
- package/styles/typography.css +3 -3
|
@@ -101,3 +101,55 @@ describe('<tree-ui> tree-select forwards modifier keys (FB-46)', () => {
|
|
|
101
101
|
expect(received.shiftKey).toBe(false);
|
|
102
102
|
});
|
|
103
103
|
});
|
|
104
|
+
|
|
105
|
+
describe('<tree-item-ui> caret slot + actions adoption (caret convention + FB-89)', () => {
|
|
106
|
+
let host;
|
|
107
|
+
const settle = () => new Promise((r) => setTimeout(r, 30));
|
|
108
|
+
|
|
109
|
+
beforeEach(() => {
|
|
110
|
+
host = document.createElement('div');
|
|
111
|
+
document.body.appendChild(host);
|
|
112
|
+
});
|
|
113
|
+
afterEach(() => host.remove());
|
|
114
|
+
|
|
115
|
+
it('auto-stamps a slot="caret" icon (renamed from slot="chevron")', async () => {
|
|
116
|
+
const item = document.createElement('tree-item-ui');
|
|
117
|
+
item.setAttribute('text', 'Colors');
|
|
118
|
+
host.appendChild(item);
|
|
119
|
+
await settle();
|
|
120
|
+
const row = item.querySelector(':scope > [slot="row"]');
|
|
121
|
+
expect(row.querySelector('[slot="caret"]')).toBeTruthy();
|
|
122
|
+
expect(row.querySelector('[slot="chevron"]')).toBeNull();
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
it('adopts a declarative slot="actions" child into the stamped row (FB-89)', async () => {
|
|
126
|
+
const item = document.createElement('tree-item-ui');
|
|
127
|
+
item.setAttribute('text', 'Colors');
|
|
128
|
+
const btn = document.createElement('button-ui');
|
|
129
|
+
btn.setAttribute('slot', 'actions');
|
|
130
|
+
btn.setAttribute('icon', 'plus');
|
|
131
|
+
item.appendChild(btn);
|
|
132
|
+
host.appendChild(item);
|
|
133
|
+
await settle();
|
|
134
|
+
const row = item.querySelector(':scope > [slot="row"]');
|
|
135
|
+
// The action button is now INSIDE the row, not a sibling left below it.
|
|
136
|
+
expect(btn.parentElement).toBe(row);
|
|
137
|
+
expect(item.querySelector(':scope > [slot="actions"]')).toBeNull();
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
it('adopts a declarative slot="caret" child instead of stamping a default', async () => {
|
|
141
|
+
const item = document.createElement('tree-item-ui');
|
|
142
|
+
item.setAttribute('text', 'Colors');
|
|
143
|
+
const customCaret = document.createElement('icon-ui');
|
|
144
|
+
customCaret.setAttribute('slot', 'caret');
|
|
145
|
+
customCaret.setAttribute('name', 'folder');
|
|
146
|
+
item.appendChild(customCaret);
|
|
147
|
+
host.appendChild(item);
|
|
148
|
+
await settle();
|
|
149
|
+
const row = item.querySelector(':scope > [slot="row"]');
|
|
150
|
+
const carets = row.querySelectorAll('[slot="caret"]');
|
|
151
|
+
expect(carets.length).toBe(1); // no double-stamp
|
|
152
|
+
expect(carets[0]).toBe(customCaret); // consumer's caret used
|
|
153
|
+
expect(carets[0].getAttribute('name')).toBe('folder');
|
|
154
|
+
});
|
|
155
|
+
});
|
|
@@ -59,8 +59,8 @@ tokens:
|
|
|
59
59
|
description: Background color on hover
|
|
60
60
|
--tree-bg-selected:
|
|
61
61
|
description: Background color when selected
|
|
62
|
-
--tree-
|
|
63
|
-
description: Size of the collapse
|
|
62
|
+
--tree-caret-size:
|
|
63
|
+
description: Size of the collapse caret icon
|
|
64
64
|
--tree-duration:
|
|
65
65
|
description: Transition duration
|
|
66
66
|
--tree-easing:
|
|
@@ -68,7 +68,7 @@ tokens:
|
|
|
68
68
|
--tree-fg:
|
|
69
69
|
description: Primary text color
|
|
70
70
|
--tree-fg-muted:
|
|
71
|
-
description: Muted text color (icons,
|
|
71
|
+
description: Muted text color (icons, carets)
|
|
72
72
|
--tree-focus-ring:
|
|
73
73
|
description: Focus ring box-shadow
|
|
74
74
|
--tree-font-size:
|
|
@@ -121,7 +121,7 @@ a2ui:
|
|
|
121
121
|
rows — selection is managed by the parent and bubbles once.
|
|
122
122
|
Detail = {item, text, value, ctrlKey, metaKey, shiftKey}.
|
|
123
123
|
- >-
|
|
124
|
-
Per ADR-0027, <tree-ui> composes <icon-ui> (for
|
|
124
|
+
Per ADR-0027, <tree-ui> composes <icon-ui> (for carets) but
|
|
125
125
|
does NOT auto-import its children. Consumer pages must
|
|
126
126
|
explicitly import both <tree-ui> and <tree-item-ui>.
|
|
127
127
|
anti_patterns: []
|