@adia-ai/web-components 0.5.8 → 0.5.10
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/USAGE.md +253 -0
- package/components/accordion/accordion.d.ts +22 -1
- package/components/action-list/action-list.d.ts +14 -1
- package/components/agent-artifact/agent-artifact.d.ts +1 -1
- package/components/agent-feedback-bar/agent-feedback-bar.d.ts +1 -1
- package/components/agent-questions/agent-questions.d.ts +1 -1
- package/components/agent-reasoning/agent-reasoning.d.ts +1 -1
- package/components/agent-suggestions/agent-suggestions.d.ts +1 -1
- package/components/agent-trace/agent-trace.d.ts +1 -1
- package/components/alert/alert.d.ts +1 -1
- package/components/avatar/avatar.d.ts +8 -1
- package/components/badge/badge.d.ts +1 -1
- package/components/block/block.d.ts +1 -1
- package/components/breadcrumb/breadcrumb.d.ts +1 -1
- package/components/button/button.d.ts +1 -1
- package/components/canvas/canvas.d.ts +1 -1
- package/components/card/card.d.ts +1 -1
- package/components/chart/chart.d.ts +1 -1
- package/components/chart-legend/chart-legend.d.ts +1 -1
- package/components/chat-thread/chat-thread.d.ts +40 -1
- package/components/code/code.css +1 -1
- package/components/col/col.a2ui.json +4 -4
- package/components/col/col.d.ts +2 -2
- package/components/col/col.yaml +2 -2
- package/components/command/command.d.ts +1 -1
- package/components/demo-toggle/demo-toggle.d.ts +1 -1
- package/components/description-list/description-list.d.ts +1 -1
- package/components/divider/divider.d.ts +1 -1
- package/components/drawer/drawer.d.ts +1 -1
- package/components/embed/embed.d.ts +1 -1
- package/components/empty-state/class.js +10 -4
- package/components/empty-state/empty-state.a2ui.json +5 -0
- package/components/empty-state/empty-state.css +36 -0
- package/components/empty-state/empty-state.d.ts +6 -1
- package/components/empty-state/empty-state.test.js +77 -0
- package/components/empty-state/empty-state.yaml +9 -0
- package/components/feed/feed.css +1 -1
- package/components/feed/feed.d.ts +106 -13
- package/components/field/field.d.ts +1 -1
- package/components/fields/fields.d.ts +1 -1
- package/components/grid/grid.d.ts +1 -1
- package/components/heatmap/heatmap.d.ts +1 -1
- package/components/icon/icon.d.ts +1 -1
- package/components/image/image.d.ts +1 -1
- package/components/input/class.js +2 -1
- package/components/input/input.a2ui.json +5 -0
- package/components/input/input.d.ts +14 -0
- package/components/input/input.test.js +99 -0
- package/components/input/input.yaml +14 -0
- package/components/inspector/inspector.d.ts +1 -1
- package/components/kbd/kbd.d.ts +1 -1
- package/components/link/link.d.ts +1 -1
- package/components/list/list.d.ts +10 -1
- package/components/menu/menu-divider.a2ui.json +41 -0
- package/components/menu/menu-divider.yaml +15 -0
- package/components/menu/menu-item.a2ui.json +77 -0
- package/components/menu/menu-item.yaml +45 -0
- package/components/menu/menu.d.ts +17 -1
- package/components/modal/modal.d.ts +1 -1
- package/components/nav/nav.css +1 -1
- package/components/nav/nav.d.ts +1 -1
- package/components/nav-group/nav-group.d.ts +1 -1
- package/components/nav-item/nav-item.d.ts +1 -1
- package/components/noodles/noodles.d.ts +1 -1
- package/components/page/page.d.ts +1 -1
- package/components/pagination/pagination.d.ts +1 -1
- package/components/pane/pane.d.ts +1 -1
- package/components/pipeline-status/pipeline-status.d.ts +1 -1
- package/components/popover/popover.d.ts +1 -1
- package/components/progress/progress.d.ts +1 -1
- package/components/progress-row/progress-row.d.ts +1 -1
- package/components/range/range.css +1 -1
- package/components/rating/rating.d.ts +8 -0
- package/components/richtext/richtext.a2ui.json +4 -4
- package/components/richtext/richtext.d.ts +2 -2
- package/components/richtext/richtext.yaml +2 -2
- package/components/row/row.d.ts +1 -1
- package/components/segment/segment.d.ts +1 -1
- package/components/select/class.js +28 -0
- package/components/select/select.css +1 -1
- package/components/select/select.d.ts +14 -0
- package/components/select/select.yaml +28 -0
- package/components/skeleton/skeleton.d.ts +1 -1
- package/components/slider/class.js +20 -50
- package/components/slider/slider.css +1 -1
- package/components/stack/stack.d.ts +1 -1
- package/components/step-progress/step-progress.d.ts +1 -1
- package/components/stepper/stepper-item.a2ui.json +74 -0
- package/components/stepper/stepper-item.yaml +45 -0
- package/components/stepper/stepper.d.ts +13 -1
- package/components/stream/stream.d.ts +1 -1
- package/components/swatch/swatch.css +1 -1
- package/components/swatch/swatch.d.ts +1 -1
- package/components/swiper/swiper.d.ts +1 -1
- package/components/switch/switch.css +1 -1
- package/components/table/table.d.ts +1 -1
- package/components/table-toolbar/table-toolbar.d.ts +1 -1
- package/components/tabs/tabs.d.ts +12 -1
- package/components/tag/tag.d.ts +1 -1
- package/components/text/text.d.ts +64 -13
- package/components/text/text.test.js +8 -2
- package/components/textarea/class.js +7 -1
- package/components/textarea/textarea.a2ui.json +5 -0
- package/components/textarea/textarea.yaml +14 -0
- package/components/timeline/timeline.d.ts +20 -1
- package/components/toast/class.js +9 -0
- package/components/toast/toast.d.ts +9 -5
- package/components/toast/toast.yaml +16 -0
- package/components/toggle-group/toggle-group.d.ts +12 -1
- package/components/toggle-group/toggle-option.a2ui.json +61 -0
- package/components/toggle-group/toggle-option.yaml +33 -0
- package/components/toggle-scheme/toggle-scheme.d.ts +1 -1
- package/components/toolbar/toolbar-group.a2ui.json +41 -0
- package/components/toolbar/toolbar-group.yaml +16 -0
- package/components/toolbar/toolbar.d.ts +4 -1
- package/components/tooltip/tooltip.css +2 -2
- package/components/tooltip/tooltip.d.ts +1 -1
- package/components/tree/tree.css +1 -1
- package/components/tree/tree.d.ts +18 -1
- package/core/form.d.ts +35 -0
- package/core/form.js +93 -0
- package/core/signals.d.ts +28 -0
- package/index.d.ts +2 -2
- package/package.json +1 -1
- package/styles/colors/semantics.css +6 -0
- package/styles/tokens.css +3 -0
- package/styles/typography.css +2 -0
package/USAGE.md
CHANGED
|
@@ -887,6 +887,259 @@ The function re-runs on every dependency mutation. Same pattern works for derive
|
|
|
887
887
|
|
|
888
888
|
---
|
|
889
889
|
|
|
890
|
+
## v0.5.9 — Consumer-feedback discoverability sweep
|
|
891
|
+
|
|
892
|
+
This section collects 11 docs items (§221a–§221k) that emerged from rounds R9, R10, R13, R15, R16, and R20. They document existing behavior that consumers reasonably misread — no behavior changes, only docs gaps closed.
|
|
893
|
+
|
|
894
|
+
### §221a — Universal `[size]` prop family
|
|
895
|
+
|
|
896
|
+
Every interactive primitive accepts `[size]` with `xs | sm | md | lg | xl` (some additionally accept `2xs` / `2xl`). The token wiring is in `themes.css`:
|
|
897
|
+
|
|
898
|
+
```css
|
|
899
|
+
[size="xs"] { --a-size: 24px; } /* compact toolbar / inline densities */
|
|
900
|
+
[size="sm"] { --a-size: 28px; }
|
|
901
|
+
[size="md"] { --a-size: 32px; } /* canonical default */
|
|
902
|
+
[size="lg"] { --a-size: 40px; }
|
|
903
|
+
[size="xl"] { --a-size: 48px; } /* hero CTAs, top-level brand */
|
|
904
|
+
```
|
|
905
|
+
|
|
906
|
+
Authoring: `<button-ui size="lg" text="Continue">`. The element inherits `--a-size` from the closest `[size]` ancestor when the prop is unset, so a `<row-ui size="sm">` containing 5 controls makes them all small without per-element repeat.
|
|
907
|
+
|
|
908
|
+
When in doubt about whether a primitive supports `[size]`: every form-bearing primitive does (input / textarea / select / switch / check / radio / button / range / slider / search). Display primitives that participate in size cascades also do (avatar / badge / tag / icon / chip / card).
|
|
909
|
+
|
|
910
|
+
### §221b — `<input-ui>` migration from native `<input>`
|
|
911
|
+
|
|
912
|
+
Common gotchas during native-`<input>` → `<input-ui>` migration:
|
|
913
|
+
|
|
914
|
+
| Native pattern | `<input-ui>` equivalent |
|
|
915
|
+
|---|---|
|
|
916
|
+
| `<input type="text">` | `<input-ui>` (no `type` needed) |
|
|
917
|
+
| `<input type="email" required>` | `<input-ui type="email" required>` |
|
|
918
|
+
| `<input type="password">` | `<input-ui type="password">` (wraps a native `<input>` for `-webkit-text-security` disc masking — only path that still uses a native input) |
|
|
919
|
+
| `<input type="number" min="0" max="100" step="0.1">` | `<input-ui type="number" min="0" max="100" step="0.1">` (renders contenteditable + stepper buttons; no native `<input type="number">` underneath) |
|
|
920
|
+
| `<input placeholder="…" value="…">` | `<input-ui placeholder="…" value="…">` |
|
|
921
|
+
| `<input oninput="…">` | `el.addEventListener('input', e => e.detail.value)` (CustomEvent payload, not native InputEvent) |
|
|
922
|
+
| Native form serialization | Works — ElementInternals form participation via `name=` |
|
|
923
|
+
| `el.value` reads/writes | Same; programmatic `.value = "…"` is round-tripped |
|
|
924
|
+
|
|
925
|
+
The biggest authoring shift: events carry their payload in `e.detail`, not on the host element. Read `e.detail.value`, not `e.target.value`. (Same applies to every form-bearing primitive.)
|
|
926
|
+
|
|
927
|
+
### §221c — `<switch-ui>` vs `<check-ui>` vs `<segmented-ui>` — the "named binary state" trap
|
|
928
|
+
|
|
929
|
+
Three primitives can render "is X on or off?" but they signal different semantics:
|
|
930
|
+
|
|
931
|
+
- **`<switch-ui>`** — for **mutable system state** the user toggles immediately. Use for "Dark mode", "Notifications", "Show grid". Action commits on flip; no submit needed.
|
|
932
|
+
- **`<check-ui>`** — for **decisions the user is committing to a form**. Use for "I agree to the terms", "Subscribe me to updates", multi-select lists.
|
|
933
|
+
- **`<segmented-ui>`** — for **explicit choice between named options** (two or more). Use for "Light / Dark / System", "Day / Week / Month". Even with two options, segmented signals "I'm picking which one" rather than "I'm flipping a switch".
|
|
934
|
+
|
|
935
|
+
The trap: authoring a `<switch-ui>` for "Confidentiality: Public / Private" reads as "click to toggle confidentiality" — but a `<segmented-ui options="Public,Private">` better signals an explicit named choice.
|
|
936
|
+
|
|
937
|
+
### §221d — `<select-ui>` native `<option>` children
|
|
938
|
+
|
|
939
|
+
`<select-ui>` consumes native HTML `<option>` and `<optgroup>`, NOT a sibling custom element. Authoring:
|
|
940
|
+
|
|
941
|
+
```html
|
|
942
|
+
<select-ui name="theme" value="dark">
|
|
943
|
+
<option value="light">Light</option>
|
|
944
|
+
<option value="dark">Dark</option>
|
|
945
|
+
<option value="system">System</option>
|
|
946
|
+
</select-ui>
|
|
947
|
+
```
|
|
948
|
+
|
|
949
|
+
Or programmatically:
|
|
950
|
+
|
|
951
|
+
```js
|
|
952
|
+
el.options = [
|
|
953
|
+
{ value: 'light', label: 'Light' },
|
|
954
|
+
{ value: 'dark', label: 'Dark' },
|
|
955
|
+
{ value: 'system', label: 'System' },
|
|
956
|
+
];
|
|
957
|
+
```
|
|
958
|
+
|
|
959
|
+
§225 (v0.5.9) added a once-per-element `console.warn` when unrecognized child elements appear (e.g. `<select-option>`) — they're silently ignored, so the warn surfaces the authoring drift.
|
|
960
|
+
|
|
961
|
+
### §221e — `<accordion-item-ui>` action buttons in custom headers
|
|
962
|
+
|
|
963
|
+
When a custom `[slot="header"]` carries action buttons (Copy / Download / Edit), the click would normally bubble to the header's toggle handler and open/close the panel. Mark action elements `[data-no-toggle]` or place them at `[slot="action"]` (or `[slot="actions"]`):
|
|
964
|
+
|
|
965
|
+
```html
|
|
966
|
+
<accordion-item-ui>
|
|
967
|
+
<div slot="header">
|
|
968
|
+
<span>Section title</span>
|
|
969
|
+
<button-ui slot="action" icon="copy" text="" data-no-toggle></button-ui>
|
|
970
|
+
</div>
|
|
971
|
+
<div>Body content</div>
|
|
972
|
+
</accordion-item-ui>
|
|
973
|
+
```
|
|
974
|
+
|
|
975
|
+
§206 (v0.5.7) added the `[slot="action"]` / `[slot="actions"]` / `[data-no-toggle]` exclusion list to the toggle-cascade.
|
|
976
|
+
|
|
977
|
+
### §221f — `<color-picker-ui>` inline pattern
|
|
978
|
+
|
|
979
|
+
For a compact swatch-and-popover authoring shape:
|
|
980
|
+
|
|
981
|
+
```html
|
|
982
|
+
<popover-ui trigger="click" placement="bottom-start">
|
|
983
|
+
<button-ui slot="trigger" text="" icon="palette" aria-label="Pick a color"></button-ui>
|
|
984
|
+
<color-picker-ui slot="content" value="oklch(0.7 0.15 220)" alpha="off"></color-picker-ui>
|
|
985
|
+
</popover-ui>
|
|
986
|
+
```
|
|
987
|
+
|
|
988
|
+
The popover handles focus management + click-outside dismiss; the button-ui exposes the right ARIA semantics. `<color-picker-ui>` fires `change` events that bubble through the popover — listen on the popover host.
|
|
989
|
+
|
|
990
|
+
### §221g — `[data-scheme]` ancestor opt-in for color scheme
|
|
991
|
+
|
|
992
|
+
The light/dark color scheme follows `[data-scheme="light"]` or `[data-scheme="dark"]` on any ancestor, falling back to `prefers-color-scheme`. Common patterns:
|
|
993
|
+
|
|
994
|
+
```html
|
|
995
|
+
<!-- Whole-app explicit scheme (e.g. user preference saved) -->
|
|
996
|
+
<html data-scheme="dark"> … </html>
|
|
997
|
+
|
|
998
|
+
<!-- Per-section override (e.g. dark hero on light page) -->
|
|
999
|
+
<section data-scheme="dark"> … </section>
|
|
1000
|
+
|
|
1001
|
+
<!-- Dynamic toggle via <toggle-scheme-ui> writes to <html data-scheme> -->
|
|
1002
|
+
<toggle-scheme-ui persist></toggle-scheme-ui>
|
|
1003
|
+
```
|
|
1004
|
+
|
|
1005
|
+
The `themes.css` token cascade reads `[data-scheme]` first, then `@media (prefers-color-scheme: dark)`, then defaults. Setting `[data-scheme]` empty (`data-scheme=""`) is **not** the same as removing the attribute — empty resolves to no-match and falls through to the media query, while a missing attribute does the same. Don't bother setting `data-scheme=""` — just remove the attribute.
|
|
1006
|
+
|
|
1007
|
+
### §221h — Effect-dispatch timing (signals)
|
|
1008
|
+
|
|
1009
|
+
`effect(fn)` runs `fn` synchronously on creation, then re-runs on every signal change. Re-runs are scheduled via `queueMicrotask` to batch multiple signal mutations in the same tick into one effect run. This means:
|
|
1010
|
+
|
|
1011
|
+
```js
|
|
1012
|
+
const count = signal(0);
|
|
1013
|
+
const log = signal('');
|
|
1014
|
+
|
|
1015
|
+
effect(() => log.value = `Count is ${count.value}`);
|
|
1016
|
+
|
|
1017
|
+
count.value = 1; // schedules microtask
|
|
1018
|
+
count.value = 2; // microtask is already scheduled, no re-schedule
|
|
1019
|
+
count.value = 3;
|
|
1020
|
+
// log.value is still '' here (effect hasn't run yet)
|
|
1021
|
+
|
|
1022
|
+
await new Promise(r => queueMicrotask(r));
|
|
1023
|
+
// log.value is now 'Count is 3' (effect ran once for the batch)
|
|
1024
|
+
```
|
|
1025
|
+
|
|
1026
|
+
For test isolation where you need the effect to flush before assertions, await **two** queueMicrotasks — one for the effect to run, one for any downstream effects it triggers:
|
|
1027
|
+
|
|
1028
|
+
```js
|
|
1029
|
+
const tick = () => new Promise(r => queueMicrotask(r));
|
|
1030
|
+
count.value = 5;
|
|
1031
|
+
await tick(); // first microtask — effect runs, may schedule another
|
|
1032
|
+
await tick(); // second microtask — any downstream effects flush
|
|
1033
|
+
expect(log.value).toBe('Count is 5');
|
|
1034
|
+
```
|
|
1035
|
+
|
|
1036
|
+
The double-`queueMicrotask` pattern is what `core/element.js`'s render scheduler uses internally — same semantics propagate to consumer effects.
|
|
1037
|
+
|
|
1038
|
+
### §221i — Backticks inside HTML comments inside `html\`…\`` templates
|
|
1039
|
+
|
|
1040
|
+
JS-spec footgun: the first backtick inside an HTML comment **closes** the outer template literal. The TS / parser error reads as "Unterminated template literal" or "TS1005" at the backtick column:
|
|
1041
|
+
|
|
1042
|
+
```js
|
|
1043
|
+
// ❌ TS1005 at the backtick column
|
|
1044
|
+
const tpl = html`
|
|
1045
|
+
<div>
|
|
1046
|
+
<!-- Use `data-scheme="dark"` for dark mode -->
|
|
1047
|
+
</div>
|
|
1048
|
+
`;
|
|
1049
|
+
|
|
1050
|
+
// ✅ Use single-quoted strings or HTML entities inside HTML comments
|
|
1051
|
+
const tpl = html`
|
|
1052
|
+
<div>
|
|
1053
|
+
<!-- Use [data-scheme="dark"] for dark mode -->
|
|
1054
|
+
</div>
|
|
1055
|
+
`;
|
|
1056
|
+
```
|
|
1057
|
+
|
|
1058
|
+
Same rule applies to nested `<style>` and `<script>` blocks inside `html\`...\`` — anything that contains a literal backtick must be escaped (`\\\``) or rephrased.
|
|
1059
|
+
|
|
1060
|
+
### §221j — Typography token cheatsheet
|
|
1061
|
+
|
|
1062
|
+
Quick-reference for component-CSS authoring. Cross-reference [`styles/typography.css`](./styles/typography.css):
|
|
1063
|
+
|
|
1064
|
+
| Layer | Token family | Examples | When to use |
|
|
1065
|
+
|---|---|---|---|
|
|
1066
|
+
| L0 — raw sizes | `--a-ui-{tiny,xs,sm,md,lg}` | `10px / 12px / 13px / 14px / 15px` | Inline UI text in component CSS (badge labels, kbd text) |
|
|
1067
|
+
| L0 — raw weights | `--a-weight-{normal,medium,semibold,bold,extrabold}` | `400 / 500 / 600 / 700 / 800` | font-weight in component CSS |
|
|
1068
|
+
| L0 — body roles | `--a-{body,heading,title,display,section,subsection,caption,label,kicker,deck,metric,code}-{family,weight,size,leading,tracking,case,color}` | `--a-heading-weight` | Inside `<text-ui variant="heading">` styles |
|
|
1069
|
+
| L1 — UI scale | `--a-ui-{size,leading,line-height,weight,family,tracking,case,color,px,py}` | `--a-ui-size` (= 14px default) | Buttons / inputs / labels / control-row densities |
|
|
1070
|
+
| L1 — focus / ring | `--a-focus-ring{,-invalid}` | `0 0 0 2px var(--a-accent)` | `:focus-visible` shadow recipes |
|
|
1071
|
+
|
|
1072
|
+
Common misreads:
|
|
1073
|
+
|
|
1074
|
+
- `--a-font-semibold` → **doesn't exist**. Use `--a-weight-semibold`.
|
|
1075
|
+
- `--a-text-sm` → **doesn't exist**. Use `--a-label-size` (semantic) or `--a-ui-sm` (raw size).
|
|
1076
|
+
- `--a-font-weight-normal` → **doesn't exist (removed in v0.5.0)**. Use `--a-weight-normal`.
|
|
1077
|
+
|
|
1078
|
+
§231 (v0.5.8) graduated a mechanical audit (`scripts/release/check-component-css-vs-styles-tokens.mjs`) that catches references to undefined `--a-…` tokens at release time.
|
|
1079
|
+
|
|
1080
|
+
### §221k — `<text-ui variant>` chooser guide
|
|
1081
|
+
|
|
1082
|
+
The 12 canonical variants ship with distinct typographic roles. Pick by intent, not by visual size:
|
|
1083
|
+
|
|
1084
|
+
| Variant | Role | Looks like | Choose when |
|
|
1085
|
+
|---|---|---|---|
|
|
1086
|
+
| `display` | Top-level brand / hero | Tallest possible | Page-level hero one-liner |
|
|
1087
|
+
| `title` | Section landmark | Large H1-ish | Top of an authoritative page / dialog |
|
|
1088
|
+
| `heading` | Sub-landmark | H2-ish | Major sub-section divider |
|
|
1089
|
+
| `subsection` | Lesser landmark | H3-ish | Card title within a section |
|
|
1090
|
+
| `section` | Inline section | Smaller heading | Form group label, navlist heading |
|
|
1091
|
+
| `body` (default) | Running prose | Body copy | Paragraph text, descriptions |
|
|
1092
|
+
| `caption` | Annotation | Slightly smaller, muted | Image captions, footnotes |
|
|
1093
|
+
| `label` | Form control label | UI-sized, medium-weight | Field labels above inputs |
|
|
1094
|
+
| `kicker` | Eyebrow text above a title | UPPERCASE, small | Optional micro-heading above a `title` |
|
|
1095
|
+
| `deck` | Sub-title under a title | Slightly larger than body | One-line lead after a `title` |
|
|
1096
|
+
| `metric` | Numeric KPI | Large bold figure | Big-number stats |
|
|
1097
|
+
| `code` | Inline code | Monospace | Inline code references |
|
|
1098
|
+
|
|
1099
|
+
Two heuristics consumers ask about repeatedly:
|
|
1100
|
+
|
|
1101
|
+
1. **"Should I use `kicker` or `label`?"** — `kicker` for content (eyebrow above a section title); `label` for form-control bindings (above an `<input-ui>` / `<select-ui>` etc.).
|
|
1102
|
+
2. **"`subsection` or `section`?"** — `subsection` is for visible-rank H3-ish headings; `section` is for inline form-group labels or small-cap navlist headings. Visual rank: `display > title > heading > subsection > section`.
|
|
1103
|
+
|
|
1104
|
+
§210 (v0.5.7) closed the variant-vs-CSS-rule drift; §232 (v0.5.9) graduates a mechanical audit that catches future enum-vs-rule drift across all primitives with enum props.
|
|
1105
|
+
|
|
1106
|
+
**§247 (v0.5.10) ARIA-role clarification (FB-23 §2):** `<text-ui variant="heading">` (and `title` / `display` / `subsection` / `section`) is **presentational-only** — it does NOT set `role="heading"` + `aria-level` on the host. Document-outline assistive technology will treat the element as `role="generic"`. For **semantic** headings (screen-reader heading-navigation, document outline), one of:
|
|
1107
|
+
|
|
1108
|
+
```html
|
|
1109
|
+
<!-- ✅ Native semantic — wrap with <h1>-<h6> -->
|
|
1110
|
+
<h2><text-ui variant="heading">Section title</text-ui></h2>
|
|
1111
|
+
|
|
1112
|
+
<!-- ✅ ARIA-only — add role + aria-level to the host directly -->
|
|
1113
|
+
<text-ui variant="heading" role="heading" aria-level="2">Section title</text-ui>
|
|
1114
|
+
|
|
1115
|
+
<!-- ⚠️ Presentational-only — fine for visual eyebrows / kickers / captions; do NOT use for document-outline-significant headings -->
|
|
1116
|
+
<text-ui variant="kicker">Eyebrow text</text-ui>
|
|
1117
|
+
```
|
|
1118
|
+
|
|
1119
|
+
The `<text-ui>` API stayed presentational-only by design — the typography role tokens are decoupled from ARIA. v0.6.0 may add a `level=` (or `as=`) attribute to opt-in to semantic-heading rendering; v0.5.x consumers wire ARIA on the host explicitly.
|
|
1120
|
+
|
|
1121
|
+
---
|
|
1122
|
+
|
|
1123
|
+
## §247 (v0.5.10) — `<swatch-ui shape="block">` label-position
|
|
1124
|
+
|
|
1125
|
+
For `<swatch-ui shape="block">`, the label renders **BELOW the tile** (flex-column stack). The label-on-tile use case (key inside the colored tile, with `data-on-light` / `data-on-dark` chrome contrast) is **NOT supported** in v0.5.x — the existing auto-contrast classes are designed for a future overlay mode, not currently consumed by any rendered layout.
|
|
1126
|
+
|
|
1127
|
+
```html
|
|
1128
|
+
<!-- ✅ Default block layout — label below tile -->
|
|
1129
|
+
<swatch-ui shape="block" color="oklch(0.7 0.15 220)">
|
|
1130
|
+
<span slot="label">Accent 600</span>
|
|
1131
|
+
</swatch-ui>
|
|
1132
|
+
|
|
1133
|
+
<!-- ❌ NOT a label-on-tile API in v0.5.x — label still renders below -->
|
|
1134
|
+
<swatch-ui shape="block" color="oklch(0.7 0.15 220)" data-label-position="overlay">
|
|
1135
|
+
<span slot="label">Accent 600</span>
|
|
1136
|
+
</swatch-ui>
|
|
1137
|
+
```
|
|
1138
|
+
|
|
1139
|
+
If your design needs label-on-tile (e.g. Tokens Studio's C1.3 hand-rolled `<div class="dts-swatch">` pattern), file a v0.6.0 feature request. The leading API shape is `<swatch-ui label-position="overlay">`; alternatives include `<swatch-ui shape="block-overlay">` or a sibling `<swatch-tile-ui>` primitive with slot composition.
|
|
1140
|
+
|
|
1141
|
+
---
|
|
1142
|
+
|
|
890
1143
|
## More
|
|
891
1144
|
|
|
892
1145
|
- [`README.md`](./README.md) — package overview + authoring guide
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @see https://ui-kit.exe.xyz/site/components/accordion
|
|
5
5
|
*
|
|
6
6
|
* Type declarations generated by scripts/build/dts-codegen.mjs from
|
|
7
|
-
* the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
|
|
7
|
+
* the component's `.a2ui.json` sidecar(s). Edit the source `.yaml`,
|
|
8
8
|
* run `npm run build:components`, then `npm run codegen:dts` to
|
|
9
9
|
* regenerate; or hand-author this file fully if rich event types are
|
|
10
10
|
* needed beyond what the yaml `events:` block can express.
|
|
@@ -30,3 +30,24 @@ export class UIAccordion extends UIElement {
|
|
|
30
30
|
): void;
|
|
31
31
|
addEventListener(type: 'toggle', listener: (ev: AccordionToggleEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
32
32
|
}
|
|
33
|
+
|
|
34
|
+
export interface AccordionItemToggleEventDetail {
|
|
35
|
+
/** New open state. */
|
|
36
|
+
open: boolean;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export type AccordionItemToggleEvent = CustomEvent<AccordionItemToggleEventDetail>;
|
|
40
|
+
|
|
41
|
+
export class UIAccordionItem extends UIElement {
|
|
42
|
+
/** Whether the section is expanded. */
|
|
43
|
+
open: boolean;
|
|
44
|
+
/** Header text — the clickable label that toggles the section. */
|
|
45
|
+
text: string;
|
|
46
|
+
|
|
47
|
+
addEventListener<K extends keyof HTMLElementEventMap>(
|
|
48
|
+
type: K,
|
|
49
|
+
listener: (this: UIAccordionItem, ev: HTMLElementEventMap[K]) => unknown,
|
|
50
|
+
options?: boolean | AddEventListenerOptions,
|
|
51
|
+
): void;
|
|
52
|
+
addEventListener(type: 'toggle', listener: (ev: AccordionItemToggleEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
53
|
+
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @see https://ui-kit.exe.xyz/site/components/action-list
|
|
5
5
|
*
|
|
6
6
|
* Type declarations generated by scripts/build/dts-codegen.mjs from
|
|
7
|
-
* the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
|
|
7
|
+
* the component's `.a2ui.json` sidecar(s). Edit the source `.yaml`,
|
|
8
8
|
* run `npm run build:components`, then `npm run codegen:dts` to
|
|
9
9
|
* regenerate; or hand-author this file fully if rich event types are
|
|
10
10
|
* needed beyond what the yaml `events:` block can express.
|
|
@@ -32,3 +32,16 @@ export class UIActionList extends UIElement {
|
|
|
32
32
|
): void;
|
|
33
33
|
addEventListener(type: 'action', listener: (ev: ActionListActionEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
34
34
|
}
|
|
35
|
+
|
|
36
|
+
export class UIActionItem extends UIElement {
|
|
37
|
+
/** Disables click + keyboard activation; aria-disabled is set. */
|
|
38
|
+
disabled: boolean;
|
|
39
|
+
/** Leading icon name (Phosphor). */
|
|
40
|
+
icon: string;
|
|
41
|
+
/** Action label. */
|
|
42
|
+
text: string;
|
|
43
|
+
/** Identifier passed to the action-list change/activate handlers. */
|
|
44
|
+
value: string;
|
|
45
|
+
/** Visual variant (default | accent | danger). */
|
|
46
|
+
variant: string;
|
|
47
|
+
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @see https://ui-kit.exe.xyz/site/components/agent-artifact
|
|
5
5
|
*
|
|
6
6
|
* Type declarations generated by scripts/build/dts-codegen.mjs from
|
|
7
|
-
* the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
|
|
7
|
+
* the component's `.a2ui.json` sidecar(s). Edit the source `.yaml`,
|
|
8
8
|
* run `npm run build:components`, then `npm run codegen:dts` to
|
|
9
9
|
* regenerate; or hand-author this file fully if rich event types are
|
|
10
10
|
* needed beyond what the yaml `events:` block can express.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @see https://ui-kit.exe.xyz/site/components/agent-feedback-bar
|
|
5
5
|
*
|
|
6
6
|
* Type declarations generated by scripts/build/dts-codegen.mjs from
|
|
7
|
-
* the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
|
|
7
|
+
* the component's `.a2ui.json` sidecar(s). Edit the source `.yaml`,
|
|
8
8
|
* run `npm run build:components`, then `npm run codegen:dts` to
|
|
9
9
|
* regenerate; or hand-author this file fully if rich event types are
|
|
10
10
|
* needed beyond what the yaml `events:` block can express.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @see https://ui-kit.exe.xyz/site/components/agent-questions
|
|
5
5
|
*
|
|
6
6
|
* Type declarations generated by scripts/build/dts-codegen.mjs from
|
|
7
|
-
* the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
|
|
7
|
+
* the component's `.a2ui.json` sidecar(s). Edit the source `.yaml`,
|
|
8
8
|
* run `npm run build:components`, then `npm run codegen:dts` to
|
|
9
9
|
* regenerate; or hand-author this file fully if rich event types are
|
|
10
10
|
* needed beyond what the yaml `events:` block can express.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @see https://ui-kit.exe.xyz/site/components/agent-reasoning
|
|
5
5
|
*
|
|
6
6
|
* Type declarations generated by scripts/build/dts-codegen.mjs from
|
|
7
|
-
* the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
|
|
7
|
+
* the component's `.a2ui.json` sidecar(s). Edit the source `.yaml`,
|
|
8
8
|
* run `npm run build:components`, then `npm run codegen:dts` to
|
|
9
9
|
* regenerate; or hand-author this file fully if rich event types are
|
|
10
10
|
* needed beyond what the yaml `events:` block can express.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @see https://ui-kit.exe.xyz/site/components/agent-suggestions
|
|
5
5
|
*
|
|
6
6
|
* Type declarations generated by scripts/build/dts-codegen.mjs from
|
|
7
|
-
* the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
|
|
7
|
+
* the component's `.a2ui.json` sidecar(s). Edit the source `.yaml`,
|
|
8
8
|
* run `npm run build:components`, then `npm run codegen:dts` to
|
|
9
9
|
* regenerate; or hand-author this file fully if rich event types are
|
|
10
10
|
* needed beyond what the yaml `events:` block can express.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @see https://ui-kit.exe.xyz/site/components/agent-trace
|
|
5
5
|
*
|
|
6
6
|
* Type declarations generated by scripts/build/dts-codegen.mjs from
|
|
7
|
-
* the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
|
|
7
|
+
* the component's `.a2ui.json` sidecar(s). Edit the source `.yaml`,
|
|
8
8
|
* run `npm run build:components`, then `npm run codegen:dts` to
|
|
9
9
|
* regenerate; or hand-author this file fully if rich event types are
|
|
10
10
|
* needed beyond what the yaml `events:` block can express.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @see https://ui-kit.exe.xyz/site/components/alert
|
|
5
5
|
*
|
|
6
6
|
* Type declarations generated by scripts/build/dts-codegen.mjs from
|
|
7
|
-
* the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
|
|
7
|
+
* the component's `.a2ui.json` sidecar(s). Edit the source `.yaml`,
|
|
8
8
|
* run `npm run build:components`, then `npm run codegen:dts` to
|
|
9
9
|
* regenerate; or hand-author this file fully if rich event types are
|
|
10
10
|
* needed beyond what the yaml `events:` block can express.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @see https://ui-kit.exe.xyz/site/components/avatar
|
|
5
5
|
*
|
|
6
6
|
* Type declarations generated by scripts/build/dts-codegen.mjs from
|
|
7
|
-
* the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
|
|
7
|
+
* the component's `.a2ui.json` sidecar(s). Edit the source `.yaml`,
|
|
8
8
|
* run `npm run build:components`, then `npm run codegen:dts` to
|
|
9
9
|
* regenerate; or hand-author this file fully if rich event types are
|
|
10
10
|
* needed beyond what the yaml `events:` block can express.
|
|
@@ -26,3 +26,10 @@ export class UIAvatar extends UIElement {
|
|
|
26
26
|
/** Display string (full name or initials). Initials derive from spaces — first letter of each word, max 2. */
|
|
27
27
|
text: string;
|
|
28
28
|
}
|
|
29
|
+
|
|
30
|
+
export class UIAvatarGroup extends UIElement {
|
|
31
|
+
/** Maximum avatars to show before the +N overflow indicator. */
|
|
32
|
+
max: number;
|
|
33
|
+
/** Forwards to each child <avatar-ui> (xs|sm|md|lg|xl). Empty uses the per-avatar size. */
|
|
34
|
+
size: string;
|
|
35
|
+
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @see https://ui-kit.exe.xyz/site/components/badge
|
|
5
5
|
*
|
|
6
6
|
* Type declarations generated by scripts/build/dts-codegen.mjs from
|
|
7
|
-
* the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
|
|
7
|
+
* the component's `.a2ui.json` sidecar(s). Edit the source `.yaml`,
|
|
8
8
|
* run `npm run build:components`, then `npm run codegen:dts` to
|
|
9
9
|
* regenerate; or hand-author this file fully if rich event types are
|
|
10
10
|
* needed beyond what the yaml `events:` block can express.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @see https://ui-kit.exe.xyz/site/components/block
|
|
5
5
|
*
|
|
6
6
|
* Type declarations generated by scripts/build/dts-codegen.mjs from
|
|
7
|
-
* the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
|
|
7
|
+
* the component's `.a2ui.json` sidecar(s). Edit the source `.yaml`,
|
|
8
8
|
* run `npm run build:components`, then `npm run codegen:dts` to
|
|
9
9
|
* regenerate; or hand-author this file fully if rich event types are
|
|
10
10
|
* needed beyond what the yaml `events:` block can express.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @see https://ui-kit.exe.xyz/site/components/breadcrumb
|
|
5
5
|
*
|
|
6
6
|
* Type declarations generated by scripts/build/dts-codegen.mjs from
|
|
7
|
-
* the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
|
|
7
|
+
* the component's `.a2ui.json` sidecar(s). Edit the source `.yaml`,
|
|
8
8
|
* run `npm run build:components`, then `npm run codegen:dts` to
|
|
9
9
|
* regenerate; or hand-author this file fully if rich event types are
|
|
10
10
|
* needed beyond what the yaml `events:` block can express.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @see https://ui-kit.exe.xyz/site/components/button
|
|
5
5
|
*
|
|
6
6
|
* Type declarations generated by scripts/build/dts-codegen.mjs from
|
|
7
|
-
* the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
|
|
7
|
+
* the component's `.a2ui.json` sidecar(s). Edit the source `.yaml`,
|
|
8
8
|
* run `npm run build:components`, then `npm run codegen:dts` to
|
|
9
9
|
* regenerate; or hand-author this file fully if rich event types are
|
|
10
10
|
* needed beyond what the yaml `events:` block can express.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @see https://ui-kit.exe.xyz/site/components/canvas
|
|
5
5
|
*
|
|
6
6
|
* Type declarations generated by scripts/build/dts-codegen.mjs from
|
|
7
|
-
* the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
|
|
7
|
+
* the component's `.a2ui.json` sidecar(s). Edit the source `.yaml`,
|
|
8
8
|
* run `npm run build:components`, then `npm run codegen:dts` to
|
|
9
9
|
* regenerate; or hand-author this file fully if rich event types are
|
|
10
10
|
* needed beyond what the yaml `events:` block can express.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @see https://ui-kit.exe.xyz/site/components/card
|
|
5
5
|
*
|
|
6
6
|
* Type declarations generated by scripts/build/dts-codegen.mjs from
|
|
7
|
-
* the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
|
|
7
|
+
* the component's `.a2ui.json` sidecar(s). Edit the source `.yaml`,
|
|
8
8
|
* run `npm run build:components`, then `npm run codegen:dts` to
|
|
9
9
|
* regenerate; or hand-author this file fully if rich event types are
|
|
10
10
|
* needed beyond what the yaml `events:` block can express.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @see https://ui-kit.exe.xyz/site/components/chart
|
|
5
5
|
*
|
|
6
6
|
* Type declarations generated by scripts/build/dts-codegen.mjs from
|
|
7
|
-
* the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
|
|
7
|
+
* the component's `.a2ui.json` sidecar(s). Edit the source `.yaml`,
|
|
8
8
|
* run `npm run build:components`, then `npm run codegen:dts` to
|
|
9
9
|
* regenerate; or hand-author this file fully if rich event types are
|
|
10
10
|
* needed beyond what the yaml `events:` block can express.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @see https://ui-kit.exe.xyz/site/components/chart-legend
|
|
5
5
|
*
|
|
6
6
|
* Type declarations generated by scripts/build/dts-codegen.mjs from
|
|
7
|
-
* the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
|
|
7
|
+
* the component's `.a2ui.json` sidecar(s). Edit the source `.yaml`,
|
|
8
8
|
* run `npm run build:components`, then `npm run codegen:dts` to
|
|
9
9
|
* regenerate; or hand-author this file fully if rich event types are
|
|
10
10
|
* needed beyond what the yaml `events:` block can express.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @see https://ui-kit.exe.xyz/site/components/chat-thread
|
|
5
5
|
*
|
|
6
6
|
* Type declarations generated by scripts/build/dts-codegen.mjs from
|
|
7
|
-
* the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
|
|
7
|
+
* the component's `.a2ui.json` sidecar(s). Edit the source `.yaml`,
|
|
8
8
|
* run `npm run build:components`, then `npm run codegen:dts` to
|
|
9
9
|
* regenerate; or hand-author this file fully if rich event types are
|
|
10
10
|
* needed beyond what the yaml `events:` block can express.
|
|
@@ -32,3 +32,42 @@ export class UIChatThread extends UIElement {
|
|
|
32
32
|
): void;
|
|
33
33
|
addEventListener(type: 'submit', listener: (ev: ChatThreadSubmitEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
34
34
|
}
|
|
35
|
+
|
|
36
|
+
export interface ChatInputSubmitEventDetail {
|
|
37
|
+
/** Currently selected model value (empty if no model picker). */
|
|
38
|
+
model: string;
|
|
39
|
+
/** Submitted message text from the inner textarea. */
|
|
40
|
+
text: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export type ChatInputSubmitEvent = CustomEvent<ChatInputSubmitEventDetail>;
|
|
44
|
+
|
|
45
|
+
export class UIChatInput extends UIElement {
|
|
46
|
+
/** Disable the entire input. Textarea becomes contenteditable=false;
|
|
47
|
+
send button disabled.
|
|
48
|
+
*/
|
|
49
|
+
disabled: boolean;
|
|
50
|
+
/** In-flight / streaming state. Send button disabled, submit events
|
|
51
|
+
suppressed, but textarea stays editable so the user can draft a
|
|
52
|
+
follow-up while the model is still responding.
|
|
53
|
+
*/
|
|
54
|
+
loading: boolean;
|
|
55
|
+
/** Currently selected model value (reflected, two-way with inner
|
|
56
|
+
`<select-ui slot="model">`). Empty when no model picker is shown.
|
|
57
|
+
*/
|
|
58
|
+
model: string;
|
|
59
|
+
/** JSON array of model options for the inner model picker —
|
|
60
|
+
[{value, label}] or [{label, options: [...]}] groups. Empty array
|
|
61
|
+
hides the model picker.
|
|
62
|
+
*/
|
|
63
|
+
models: unknown[];
|
|
64
|
+
/** Textarea placeholder. Defaults to "Type a message...". */
|
|
65
|
+
placeholder: string;
|
|
66
|
+
|
|
67
|
+
addEventListener<K extends keyof HTMLElementEventMap>(
|
|
68
|
+
type: K,
|
|
69
|
+
listener: (this: UIChatInput, ev: HTMLElementEventMap[K]) => unknown,
|
|
70
|
+
options?: boolean | AddEventListenerOptions,
|
|
71
|
+
): void;
|
|
72
|
+
addEventListener(type: 'submit', listener: (ev: ChatInputSubmitEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
73
|
+
}
|
package/components/code/code.css
CHANGED
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
--code-lint-error: var(--a-danger-strong);
|
|
72
72
|
--code-lint-warning: var(--a-warning-strong);
|
|
73
73
|
--code-lint-info: var(--a-info-strong);
|
|
74
|
-
--code-lint-tooltip-bg: var(--a-surface-floating
|
|
74
|
+
--code-lint-tooltip-bg: var(--a-bg-strong); /* §230-bundle (v0.5.9): elevated panel surface. Was orphaned --a-surface-floating. */
|
|
75
75
|
--code-lint-tooltip-fg: var(--a-fg);
|
|
76
76
|
--code-lint-tooltip-border: var(--a-border-subtle);
|
|
77
77
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://adiaui.dev/a2ui/v0_9/components/
|
|
4
|
-
"title": "
|
|
3
|
+
"$id": "https://adiaui.dev/a2ui/v0_9/components/Col.json",
|
|
4
|
+
"title": "Col",
|
|
5
5
|
"description": "Flex column layout primitive.",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"allOf": [
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"default": "stretch"
|
|
20
20
|
},
|
|
21
21
|
"component": {
|
|
22
|
-
"const": "
|
|
22
|
+
"const": "Col"
|
|
23
23
|
},
|
|
24
24
|
"gap": {
|
|
25
25
|
"description": "Gap between children. Accepts either the named scale (xs/sm/md/lg/xl) or a numeric rung on the spacing scale (\"1\"…\"16\", mapped to --a-space-N).",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"column",
|
|
63
63
|
"col"
|
|
64
64
|
],
|
|
65
|
-
"name": "
|
|
65
|
+
"name": "UICol",
|
|
66
66
|
"related": [
|
|
67
67
|
"avatar",
|
|
68
68
|
"input",
|
package/components/col/col.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @see https://ui-kit.exe.xyz/site/components/col
|
|
5
5
|
*
|
|
6
6
|
* Type declarations generated by scripts/build/dts-codegen.mjs from
|
|
7
|
-
* the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
|
|
7
|
+
* the component's `.a2ui.json` sidecar(s). Edit the source `.yaml`,
|
|
8
8
|
* run `npm run build:components`, then `npm run codegen:dts` to
|
|
9
9
|
* regenerate; or hand-author this file fully if rich event types are
|
|
10
10
|
* needed beyond what the yaml `events:` block can express.
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
import { UIElement } from '../../core/element.js';
|
|
14
14
|
|
|
15
|
-
export class
|
|
15
|
+
export class UICol extends UIElement {
|
|
16
16
|
/** Align items */
|
|
17
17
|
align: string;
|
|
18
18
|
/** Gap between children. Accepts either the named scale (xs/sm/md/lg/xl) or a numeric rung on the spacing scale ("1"…"16", mapped to --a-space-N). */
|
package/components/col/col.yaml
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
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: UICol
|
|
5
5
|
tag: col-ui
|
|
6
|
-
component:
|
|
6
|
+
component: Col
|
|
7
7
|
category: layout
|
|
8
8
|
version: 1
|
|
9
9
|
description: Flex column layout primitive.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @see https://ui-kit.exe.xyz/site/components/command
|
|
5
5
|
*
|
|
6
6
|
* Type declarations generated by scripts/build/dts-codegen.mjs from
|
|
7
|
-
* the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
|
|
7
|
+
* the component's `.a2ui.json` sidecar(s). Edit the source `.yaml`,
|
|
8
8
|
* run `npm run build:components`, then `npm run codegen:dts` to
|
|
9
9
|
* regenerate; or hand-author this file fully if rich event types are
|
|
10
10
|
* needed beyond what the yaml `events:` block can express.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @see https://ui-kit.exe.xyz/site/components/demo-toggle
|
|
5
5
|
*
|
|
6
6
|
* Type declarations generated by scripts/build/dts-codegen.mjs from
|
|
7
|
-
* the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
|
|
7
|
+
* the component's `.a2ui.json` sidecar(s). Edit the source `.yaml`,
|
|
8
8
|
* run `npm run build:components`, then `npm run codegen:dts` to
|
|
9
9
|
* regenerate; or hand-author this file fully if rich event types are
|
|
10
10
|
* needed beyond what the yaml `events:` block can express.
|