@adia-ai/web-components 0.6.21 → 0.6.22
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 +58 -0
- package/components/accordion/accordion-item.a2ui.json +20 -3
- package/components/accordion/accordion-item.yaml +24 -0
- package/components/accordion/accordion.a2ui.json +1 -1
- package/components/accordion/accordion.d.ts +8 -1
- package/components/accordion/accordion.yaml +15 -2
- package/components/action-list/action-item.a2ui.json +19 -3
- package/components/action-list/action-item.yaml +24 -0
- package/components/action-list/action-list.a2ui.json +12 -2
- package/components/action-list/action-list.yaml +13 -3
- package/components/agent-artifact/agent-artifact.a2ui.json +9 -2
- package/components/agent-artifact/agent-artifact.d.ts +1 -1
- package/components/agent-artifact/agent-artifact.yaml +17 -3
- package/components/agent-feedback-bar/agent-feedback-bar.a2ui.json +9 -2
- package/components/agent-feedback-bar/agent-feedback-bar.d.ts +8 -1
- package/components/agent-feedback-bar/agent-feedback-bar.yaml +19 -3
- package/components/agent-questions/agent-questions.a2ui.json +8 -2
- package/components/agent-questions/agent-questions.d.ts +8 -1
- package/components/agent-questions/agent-questions.yaml +19 -3
- package/components/agent-reasoning/agent-reasoning.yaml +9 -1
- package/components/agent-suggestions/agent-suggestions.a2ui.json +9 -2
- package/components/agent-suggestions/agent-suggestions.d.ts +7 -1
- package/components/agent-suggestions/agent-suggestions.yaml +18 -3
- package/components/agent-trace/agent-trace.a2ui.json +9 -2
- package/components/agent-trace/agent-trace.d.ts +1 -1
- package/components/agent-trace/agent-trace.yaml +16 -3
- package/components/alert/alert.a2ui.json +1 -1
- package/components/alert/alert.css +8 -0
- package/components/alert/alert.d.ts +9 -1
- package/components/alert/alert.yaml +16 -2
- package/components/aside/aside.a2ui.json +7 -1
- package/components/aside/aside.yaml +33 -2
- package/components/avatar/avatar-group.a2ui.json +20 -3
- package/components/avatar/avatar-group.yaml +24 -0
- package/components/avatar/avatar.a2ui.json +1 -1
- package/components/avatar/avatar.d.ts +7 -1
- package/components/avatar/avatar.yaml +14 -2
- package/components/badge/badge.a2ui.json +1 -1
- package/components/badge/badge.d.ts +7 -1
- package/components/badge/badge.yaml +14 -2
- package/components/block/block.a2ui.json +9 -4
- package/components/block/block.d.ts +9 -3
- package/components/block/block.yaml +25 -5
- package/components/block/class.js +23 -0
- package/components/breadcrumb/breadcrumb.a2ui.json +5 -1
- package/components/breadcrumb/breadcrumb.yaml +33 -2
- package/components/button/button.a2ui.json +22 -2
- package/components/button/button.yaml +21 -3
- package/components/calendar-picker/calendar-picker.a2ui.json +1 -1
- package/components/calendar-picker/calendar-picker.yaml +13 -2
- package/components/canvas/canvas.a2ui.json +6 -2
- package/components/canvas/canvas.yaml +20 -3
- package/components/card/card.css +23 -2
- package/components/card/card.yaml +12 -0
- package/components/chart/chart.css +4 -2
- package/components/chart/chart.yaml +9 -1
- package/components/chart-legend/chart-legend.yaml +7 -1
- package/components/chat-thread/chat-thread.a2ui.json +6 -2
- package/components/chat-thread/chat-thread.d.ts +8 -1
- package/components/chat-thread/chat-thread.yaml +21 -3
- package/components/check/check.a2ui.json +13 -3
- package/components/check/check.yaml +18 -3
- package/components/code/code.a2ui.json +1 -1
- package/components/code/code.yaml +13 -2
- package/components/col/class.js +39 -0
- package/components/col/col.a2ui.json +12 -5
- package/components/col/col.d.ts +12 -4
- package/components/col/col.yaml +27 -7
- package/components/color-input/color-input.yaml +27 -1
- package/components/color-picker/color-picker.a2ui.json +8 -2
- package/components/color-picker/color-picker.yaml +15 -3
- package/components/command/command.a2ui.json +7 -2
- package/components/command/command.d.ts +9 -1
- package/components/command/command.yaml +39 -3
- package/components/demo-toggle/demo-toggle.yaml +7 -1
- package/components/description-list/description-list.a2ui.json +5 -1
- package/components/description-list/description-list.yaml +11 -2
- package/components/divider/divider.a2ui.json +1 -1
- package/components/divider/divider.d.ts +8 -1
- package/components/divider/divider.yaml +15 -2
- package/components/drawer/drawer.yaml +32 -1
- package/components/embed/embed.a2ui.json +1 -1
- package/components/embed/embed.d.ts +8 -1
- package/components/embed/embed.yaml +17 -2
- package/components/empty-state/empty-state.a2ui.json +19 -2
- package/components/empty-state/empty-state.css +14 -0
- package/components/empty-state/empty-state.d.ts +3 -1
- package/components/empty-state/empty-state.yaml +50 -3
- package/components/feed/feed-item.a2ui.json +21 -3
- package/components/feed/feed-item.yaml +25 -0
- package/components/feed/feed.a2ui.json +23 -3
- package/components/feed/feed.yaml +26 -0
- package/components/fields/fields.yaml +7 -1
- package/components/footer/footer.a2ui.json +7 -1
- package/components/footer/footer.yaml +27 -2
- package/components/grid/class.js +57 -0
- package/components/grid/grid.a2ui.json +3 -3
- package/components/grid/grid.d.ts +3 -3
- package/components/grid/grid.yaml +22 -8
- package/components/header/header.a2ui.json +8 -1
- package/components/header/header.yaml +30 -2
- package/components/heatmap/heatmap.yaml +7 -1
- package/components/icon/icon.a2ui.json +9 -2
- package/components/icon/icon.d.ts +1 -1
- package/components/icon/icon.yaml +32 -3
- package/components/image/image.yaml +7 -1
- package/components/input/input.yaml +29 -1
- package/components/inspector/inspector.a2ui.json +7 -2
- package/components/inspector/inspector.d.ts +9 -1
- package/components/inspector/inspector.yaml +23 -3
- package/components/kbd/kbd.a2ui.json +1 -1
- package/components/kbd/kbd.d.ts +1 -1
- package/components/kbd/kbd.yaml +11 -2
- package/components/list/list-item.a2ui.json +21 -3
- package/components/list/list-item.yaml +25 -0
- package/components/list/list.a2ui.json +7 -2
- package/components/list/list.d.ts +9 -1
- package/components/list/list.yaml +21 -3
- package/components/menu/menu-divider.a2ui.json +17 -3
- package/components/menu/menu-divider.yaml +35 -0
- package/components/menu/menu-item.a2ui.json +19 -3
- package/components/menu/menu-item.yaml +42 -0
- package/components/menu/menu.a2ui.json +7 -1
- package/components/menu/menu.yaml +33 -2
- package/components/modal/modal.a2ui.json +7 -2
- package/components/modal/modal.d.ts +10 -1
- package/components/modal/modal.yaml +48 -3
- package/components/nav/nav.a2ui.json +16 -2
- package/components/nav/nav.yaml +40 -3
- package/components/nav-group/nav-group.a2ui.json +12 -2
- package/components/nav-group/nav-group.yaml +37 -3
- package/components/nav-item/nav-item.a2ui.json +13 -2
- package/components/nav-item/nav-item.yaml +40 -3
- package/components/noodles/noodles.a2ui.json +12 -2
- package/components/noodles/noodles.yaml +14 -3
- package/components/option-card/option-card.yaml +27 -1
- package/components/otp-input/otp-input.yaml +24 -1
- package/components/page/page.a2ui.json +7 -1
- package/components/page/page.yaml +9 -2
- package/components/pagination/pagination.a2ui.json +1 -1
- package/components/pagination/pagination.d.ts +1 -1
- package/components/pagination/pagination.yaml +13 -2
- package/components/pane/pane.a2ui.json +1 -1
- package/components/pane/pane.d.ts +7 -1
- package/components/pane/pane.yaml +33 -2
- package/components/pipeline-status/pipeline-status.a2ui.json +6 -2
- package/components/pipeline-status/pipeline-status.d.ts +1 -1
- package/components/pipeline-status/pipeline-status.yaml +18 -3
- package/components/popover/popover.yaml +30 -1
- package/components/progress/progress.a2ui.json +1 -1
- package/components/progress/progress.d.ts +1 -1
- package/components/progress/progress.yaml +13 -2
- package/components/progress-row/progress-row.a2ui.json +12 -2
- package/components/progress-row/progress-row.yaml +13 -3
- package/components/radio/radio.a2ui.json +1 -1
- package/components/radio/radio.yaml +9 -1
- package/components/range/range.yaml +7 -1
- package/components/rating/rating.a2ui.json +4 -1
- package/components/rating/rating.yaml +10 -2
- package/components/richtext/richtext.a2ui.json +6 -2
- package/components/richtext/richtext.d.ts +9 -1
- package/components/richtext/richtext.yaml +20 -3
- package/components/row/class.js +34 -0
- package/components/row/row.a2ui.json +11 -5
- package/components/row/row.d.ts +11 -4
- package/components/row/row.yaml +25 -7
- package/components/search/search.a2ui.json +5 -1
- package/components/search/search.yaml +11 -2
- package/components/section/section.a2ui.json +7 -1
- package/components/section/section.yaml +36 -2
- package/components/segment/segment.a2ui.json +8 -2
- package/components/segment/segment.d.ts +7 -1
- package/components/segment/segment.yaml +16 -3
- package/components/segmented/segmented.a2ui.json +6 -1
- package/components/segmented/segmented.css +5 -0
- package/components/segmented/segmented.yaml +12 -2
- package/components/select/select.a2ui.json +1 -1
- package/components/select/select.yaml +34 -2
- package/components/skeleton/skeleton.a2ui.json +7 -2
- package/components/skeleton/skeleton.d.ts +1 -1
- package/components/skeleton/skeleton.yaml +17 -3
- package/components/slider/slider.yaml +7 -1
- package/components/stack/stack.a2ui.json +14 -3
- package/components/stack/stack.d.ts +9 -1
- package/components/stack/stack.yaml +22 -4
- package/components/stat/stat.a2ui.json +6 -2
- package/components/stat/stat.css +5 -2
- package/components/stat/stat.d.ts +1 -1
- package/components/stat/stat.yaml +16 -3
- package/components/step-progress/step-progress.yaml +7 -1
- package/components/stepper/stepper-item.a2ui.json +20 -3
- package/components/stepper/stepper-item.yaml +24 -0
- package/components/stepper/stepper.a2ui.json +1 -1
- package/components/stepper/stepper.d.ts +1 -1
- package/components/stepper/stepper.yaml +13 -2
- package/components/stream/stream.a2ui.json +12 -2
- package/components/stream/stream.yaml +15 -3
- package/components/swatch/swatch.yaml +7 -1
- package/components/swiper/swiper.yaml +7 -1
- package/components/switch/switch.a2ui.json +6 -2
- package/components/switch/switch.yaml +16 -2
- package/components/table/cell-types.js +23 -10
- package/components/table/class.js +6 -2
- package/components/table/table.css +49 -1
- package/components/table/table.yaml +27 -1
- package/components/table-toolbar/table-toolbar.yaml +27 -1
- package/components/tabs/tab.a2ui.json +17 -3
- package/components/tabs/tab.yaml +39 -0
- package/components/tabs/tabs.a2ui.json +1 -1
- package/components/tabs/tabs.d.ts +1 -1
- package/components/tabs/tabs.yaml +36 -2
- package/components/tag/tag.a2ui.json +6 -2
- package/components/tag/tag.d.ts +9 -1
- package/components/tag/tag.yaml +38 -3
- package/components/text/class.js +13 -0
- package/components/text/text.a2ui.json +9 -2
- package/components/text/text.d.ts +1 -1
- package/components/text/text.yaml +12 -5
- package/components/textarea/textarea.a2ui.json +15 -3
- package/components/textarea/textarea.yaml +41 -4
- package/components/timeline/timeline-item.a2ui.json +20 -3
- package/components/timeline/timeline-item.yaml +24 -0
- package/components/timeline/timeline.a2ui.json +8 -1
- package/components/timeline/timeline.yaml +9 -2
- package/components/toast/toast.a2ui.json +6 -2
- package/components/toast/toast.yaml +19 -3
- package/components/toggle-group/toggle-group.a2ui.json +13 -3
- package/components/toggle-group/toggle-group.d.ts +1 -1
- package/components/toggle-group/toggle-group.yaml +19 -4
- package/components/toggle-group/toggle-option.a2ui.json +18 -3
- package/components/toggle-group/toggle-option.yaml +23 -0
- package/components/toggle-scheme/toggle-scheme.yaml +4 -0
- package/components/toolbar/toolbar-group.a2ui.json +18 -3
- package/components/toolbar/toolbar-group.yaml +23 -0
- package/components/toolbar/toolbar.yaml +7 -1
- package/components/tooltip/tooltip.yaml +24 -1
- package/components/tree/tree-item.a2ui.json +19 -3
- package/components/tree/tree-item.yaml +42 -0
- package/components/tree/tree.a2ui.json +6 -1
- package/components/tree/tree.yaml +31 -2
- package/components/upload/upload.yaml +7 -1
- package/core/index.js +1 -0
- package/core/responsive.d.ts +29 -0
- package/core/responsive.js +120 -0
- package/core/responsive.test.js +121 -0
- package/package.json +1 -1
- package/styles/tokens.css +6 -6
|
@@ -61,7 +61,13 @@ states:
|
|
|
61
61
|
traits: []
|
|
62
62
|
tokens: {}
|
|
63
63
|
a2ui:
|
|
64
|
-
rules:
|
|
64
|
+
rules:
|
|
65
|
+
- rule: 'Star/icon-based ordinal rating input. Form-associated; emits numeric value 0..max via change events.'
|
|
66
|
+
reason: 'Rating-input contract.'
|
|
67
|
+
- rule: 'For thumbs-up/down agent feedback use <agent-feedback-bar-ui> instead — different semantics + visual.'
|
|
68
|
+
reason: 'Surface boundary.'
|
|
69
|
+
- rule: 'max attribute sets the scale (default 5); allow-half attribute enables half-step granularity.'
|
|
70
|
+
reason: 'Configuration knobs.'
|
|
65
71
|
anti_patterns: []
|
|
66
72
|
examples: []
|
|
67
73
|
keywords:
|
|
@@ -79,4 +85,6 @@ synonyms:
|
|
|
79
85
|
- star rating
|
|
80
86
|
- review score
|
|
81
87
|
- feedback rating
|
|
82
|
-
related:
|
|
88
|
+
related:
|
|
89
|
+
- Field
|
|
90
|
+
- AgentFeedbackBar
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://adiaui.dev/a2ui/v0_9/components/RichText.json",
|
|
4
4
|
"title": "RichText",
|
|
5
|
-
"description": "
|
|
5
|
+
"description": "Markdown-to-HTML rendering primitive — converts the [markdown] prop\n(or fetched [src] content) into styled HTML using the canonical\nprose tokens. Used for rendering LLM responses inside chat surfaces,\narticle bodies, and documentation pages. Distinct from <code-ui>\n(syntax-highlighted code), <textarea-ui> (interactive editor), and\n<text-ui> (single-line typography). Not a Markdown editor — for\nediting use a CodeMirror-backed <code-ui language=\"markdown\"\neditable>.\n",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"allOf": [
|
|
8
8
|
{
|
|
@@ -62,7 +62,11 @@
|
|
|
62
62
|
"richtext"
|
|
63
63
|
],
|
|
64
64
|
"name": "UIRichText",
|
|
65
|
-
"related": [
|
|
65
|
+
"related": [
|
|
66
|
+
"Code",
|
|
67
|
+
"Text",
|
|
68
|
+
"Textarea"
|
|
69
|
+
],
|
|
66
70
|
"slots": {
|
|
67
71
|
"default": {
|
|
68
72
|
"description": "Default slot — primary child content."
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `<richtext-ui>` —
|
|
2
|
+
* `<richtext-ui>` — Markdown-to-HTML rendering primitive — converts the [markdown] prop
|
|
3
|
+
(or fetched [src] content) into styled HTML using the canonical
|
|
4
|
+
prose tokens. Used for rendering LLM responses inside chat surfaces,
|
|
5
|
+
article bodies, and documentation pages. Distinct from <code-ui>
|
|
6
|
+
(syntax-highlighted code), <textarea-ui> (interactive editor), and
|
|
7
|
+
<text-ui> (single-line typography). Not a Markdown editor — for
|
|
8
|
+
editing use a CodeMirror-backed <code-ui language="markdown"
|
|
9
|
+
editable>.
|
|
10
|
+
|
|
3
11
|
*
|
|
4
12
|
* @see https://ui-kit.exe.xyz/site/components/richtext
|
|
5
13
|
*
|
|
@@ -4,7 +4,15 @@ tag: richtext-ui
|
|
|
4
4
|
component: RichText
|
|
5
5
|
category: forms
|
|
6
6
|
version: 1
|
|
7
|
-
description:
|
|
7
|
+
description: |
|
|
8
|
+
Markdown-to-HTML rendering primitive — converts the [markdown] prop
|
|
9
|
+
(or fetched [src] content) into styled HTML using the canonical
|
|
10
|
+
prose tokens. Used for rendering LLM responses inside chat surfaces,
|
|
11
|
+
article bodies, and documentation pages. Distinct from <code-ui>
|
|
12
|
+
(syntax-highlighted code), <textarea-ui> (interactive editor), and
|
|
13
|
+
<text-ui> (single-line typography). Not a Markdown editor — for
|
|
14
|
+
editing use a CodeMirror-backed <code-ui language="markdown"
|
|
15
|
+
editable>.
|
|
8
16
|
props:
|
|
9
17
|
markdown:
|
|
10
18
|
description: 'Component property: markdown.'
|
|
@@ -24,7 +32,13 @@ states:
|
|
|
24
32
|
traits: []
|
|
25
33
|
tokens: {}
|
|
26
34
|
a2ui:
|
|
27
|
-
rules:
|
|
35
|
+
rules:
|
|
36
|
+
- rule: 'Rich-text display + editor primitive. Renders paragraphs, lists, headings, and inline formatting; contenteditable when editable= is set.'
|
|
37
|
+
reason: 'Per ADR-0025, no native <textarea> for rich text.'
|
|
38
|
+
- rule: 'Different from <text-ui> (single semantic block) — richtext handles multi-paragraph + inline marks.'
|
|
39
|
+
reason: 'Capacity boundary.'
|
|
40
|
+
- rule: 'For plain code use <code-ui> or richtext with code variant; for chat input use <chat-composer-ui>.'
|
|
41
|
+
reason: 'Specialized siblings.'
|
|
28
42
|
anti_patterns: []
|
|
29
43
|
examples:
|
|
30
44
|
- name: basic-richtext
|
|
@@ -51,4 +65,7 @@ synonyms:
|
|
|
51
65
|
- markdown
|
|
52
66
|
- md-render
|
|
53
67
|
- rich-text
|
|
54
|
-
related:
|
|
68
|
+
related:
|
|
69
|
+
- Code
|
|
70
|
+
- Text
|
|
71
|
+
- Textarea
|
package/components/row/class.js
CHANGED
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
|
|
21
21
|
import { UIElement } from '../../core/element.js';
|
|
22
22
|
import { draggable } from '../../traits/draggable/draggable.js';
|
|
23
|
+
import { parseResponsive, breakpoint } from '../../core/responsive.js';
|
|
23
24
|
|
|
24
25
|
export class UIRow extends UIElement {
|
|
25
26
|
static properties = {
|
|
@@ -47,4 +48,37 @@ export class UIRow extends UIElement {
|
|
|
47
48
|
this.#dragAttached = true;
|
|
48
49
|
}
|
|
49
50
|
}
|
|
51
|
+
|
|
52
|
+
render() {
|
|
53
|
+
const gap = this.gap;
|
|
54
|
+
const align = this.align;
|
|
55
|
+
const justify = this.justify;
|
|
56
|
+
const anyR = gap?.includes('@') || align?.includes('@') || justify?.includes('@');
|
|
57
|
+
const bp = anyR ? breakpoint.value : '';
|
|
58
|
+
|
|
59
|
+
if (gap?.includes('@')) {
|
|
60
|
+
this.style.setProperty('--row-gap', _gapToCss(parseResponsive(gap, bp)));
|
|
61
|
+
} else {
|
|
62
|
+
this.style.removeProperty('--row-gap');
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
if (align?.includes('@')) {
|
|
66
|
+
this.style.setProperty('--row-align', _flexAlign(parseResponsive(align, bp)));
|
|
67
|
+
} else {
|
|
68
|
+
this.style.removeProperty('--row-align');
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
if (justify?.includes('@')) {
|
|
72
|
+
this.style.setProperty('--row-justify', _flexJustify(parseResponsive(justify, bp)));
|
|
73
|
+
} else {
|
|
74
|
+
this.style.removeProperty('--row-justify');
|
|
75
|
+
}
|
|
76
|
+
}
|
|
50
77
|
}
|
|
78
|
+
|
|
79
|
+
const _ALIGN = { start: 'flex-start', end: 'flex-end', center: 'center', stretch: 'stretch', baseline: 'baseline' };
|
|
80
|
+
const _JUSTIFY = { start: 'flex-start', end: 'flex-end', center: 'center', between: 'space-between', 'space-between': 'space-between', 'space-around': 'space-around' };
|
|
81
|
+
|
|
82
|
+
function _gapToCss(v) { return (!v || v === '0') ? '0' : /^\d+$/.test(v) ? `var(--a-space-${v})` : `var(--a-gap-${v})`; }
|
|
83
|
+
function _flexAlign(v) { return _ALIGN[v] ?? v; }
|
|
84
|
+
function _flexJustify(v) { return _JUSTIFY[v] ?? v; }
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://adiaui.dev/a2ui/v0_9/components/Row.json",
|
|
4
4
|
"title": "Row",
|
|
5
|
-
"description": "Flex row layout primitive.",
|
|
5
|
+
"description": "Flex row layout primitive — horizontal stack of children with\n[gap] / [align] / [justify] / [grow] / [wrap]. The horizontal\ncounterpart to <col-ui>. Use <row-ui> for horizontal toolbars,\ninline-control clusters, button groups, table cells. For action\nclusters inside chrome containers (<header-ui> / <footer-ui>) use\nthe parent's [slot=\"action\"] convention instead — the chrome scope\nalready lays out actions correctly without wrapping in row-ui.\n",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"allOf": [
|
|
8
8
|
{
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
],
|
|
15
15
|
"properties": {
|
|
16
16
|
"align": {
|
|
17
|
-
"description": "
|
|
17
|
+
"description": "Cross-axis alignment (start/center/end/stretch/baseline). Accepts `@bp` notation: align=\"start center@sm\".",
|
|
18
18
|
"type": "string",
|
|
19
19
|
"default": "center"
|
|
20
20
|
},
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"default": false
|
|
28
28
|
},
|
|
29
29
|
"gap": {
|
|
30
|
-
"description": "Gap between children.
|
|
30
|
+
"description": "Gap between children. Named scale (xs/sm/md/lg/xl) or numeric spacing rung (\"1\"…\"16\"). Accepts `@bp` notation: gap=\"2 4@md\".",
|
|
31
31
|
"type": "string",
|
|
32
32
|
"default": "md"
|
|
33
33
|
},
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"default": false
|
|
38
38
|
},
|
|
39
39
|
"justify": {
|
|
40
|
-
"description": "
|
|
40
|
+
"description": "Main-axis justify (start/center/end/between/space-between/space-around). Accepts `@bp` notation: justify=\"start between@md\".",
|
|
41
41
|
"type": "string",
|
|
42
42
|
"default": "start"
|
|
43
43
|
},
|
|
@@ -90,7 +90,13 @@
|
|
|
90
90
|
"name": "idle"
|
|
91
91
|
}
|
|
92
92
|
],
|
|
93
|
-
"synonyms": {
|
|
93
|
+
"synonyms": {
|
|
94
|
+
"row": [
|
|
95
|
+
"hstack",
|
|
96
|
+
"horizontal-stack",
|
|
97
|
+
"hbox"
|
|
98
|
+
]
|
|
99
|
+
},
|
|
94
100
|
"tag": "row-ui",
|
|
95
101
|
"tokens": {},
|
|
96
102
|
"traits": [],
|
package/components/row/row.d.ts
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `<row-ui>` — Flex row layout primitive
|
|
2
|
+
* `<row-ui>` — Flex row layout primitive — horizontal stack of children with
|
|
3
|
+
[gap] / [align] / [justify] / [grow] / [wrap]. The horizontal
|
|
4
|
+
counterpart to <col-ui>. Use <row-ui> for horizontal toolbars,
|
|
5
|
+
inline-control clusters, button groups, table cells. For action
|
|
6
|
+
clusters inside chrome containers (<header-ui> / <footer-ui>) use
|
|
7
|
+
the parent's [slot="action"] convention instead — the chrome scope
|
|
8
|
+
already lays out actions correctly without wrapping in row-ui.
|
|
9
|
+
|
|
3
10
|
*
|
|
4
11
|
* @see https://ui-kit.exe.xyz/site/components/row
|
|
5
12
|
*
|
|
@@ -13,15 +20,15 @@
|
|
|
13
20
|
import { UIElement } from '../../core/element.js';
|
|
14
21
|
|
|
15
22
|
export class UIRow extends UIElement {
|
|
16
|
-
/**
|
|
23
|
+
/** Cross-axis alignment (start/center/end/stretch/baseline). Accepts `@bp` notation: align="start center@sm". */
|
|
17
24
|
align: string;
|
|
18
25
|
/** Enables drag handle + cursor:grab. Wires the draggable trait; dispatches drag-end. */
|
|
19
26
|
draggable: boolean;
|
|
20
|
-
/** Gap between children.
|
|
27
|
+
/** Gap between children. Named scale (xs/sm/md/lg/xl) or numeric spacing rung ("1"…"16"). Accepts `@bp` notation: gap="2 4@md". */
|
|
21
28
|
gap: string;
|
|
22
29
|
/** Fills remaining space in a flex parent. CSS-only attribute via :scope[grow] in row.css. */
|
|
23
30
|
grow: boolean;
|
|
24
|
-
/**
|
|
31
|
+
/** Main-axis justify (start/center/end/between/space-between/space-around). Accepts `@bp` notation: justify="start between@md". */
|
|
25
32
|
justify: string;
|
|
26
33
|
/** Enable flex wrap */
|
|
27
34
|
wrap: boolean;
|
package/components/row/row.yaml
CHANGED
|
@@ -6,10 +6,19 @@ tag: row-ui
|
|
|
6
6
|
component: Row
|
|
7
7
|
category: layout
|
|
8
8
|
version: 1
|
|
9
|
-
description:
|
|
9
|
+
description: |
|
|
10
|
+
Flex row layout primitive — horizontal stack of children with
|
|
11
|
+
[gap] / [align] / [justify] / [grow] / [wrap]. The horizontal
|
|
12
|
+
counterpart to <col-ui>. Use <row-ui> for horizontal toolbars,
|
|
13
|
+
inline-control clusters, button groups, table cells. For action
|
|
14
|
+
clusters inside chrome containers (<header-ui> / <footer-ui>) use
|
|
15
|
+
the parent's [slot="action"] convention instead — the chrome scope
|
|
16
|
+
already lays out actions correctly without wrapping in row-ui.
|
|
10
17
|
props:
|
|
11
18
|
align:
|
|
12
|
-
description:
|
|
19
|
+
description: >-
|
|
20
|
+
Cross-axis alignment (start/center/end/stretch/baseline). Accepts
|
|
21
|
+
`@bp` notation: align="start center@sm".
|
|
13
22
|
type: string
|
|
14
23
|
default: center
|
|
15
24
|
draggable:
|
|
@@ -19,8 +28,8 @@ props:
|
|
|
19
28
|
reflect: true
|
|
20
29
|
gap:
|
|
21
30
|
description: >-
|
|
22
|
-
Gap between children.
|
|
23
|
-
|
|
31
|
+
Gap between children. Named scale (xs/sm/md/lg/xl) or numeric spacing
|
|
32
|
+
rung ("1"…"16"). Accepts `@bp` notation: gap="2 4@md".
|
|
24
33
|
type: string
|
|
25
34
|
default: md
|
|
26
35
|
grow:
|
|
@@ -29,7 +38,9 @@ props:
|
|
|
29
38
|
default: false
|
|
30
39
|
reflect: true
|
|
31
40
|
justify:
|
|
32
|
-
description:
|
|
41
|
+
description: >-
|
|
42
|
+
Main-axis justify (start/center/end/between/space-between/space-around).
|
|
43
|
+
Accepts `@bp` notation: justify="start between@md".
|
|
33
44
|
type: string
|
|
34
45
|
default: start
|
|
35
46
|
wrap:
|
|
@@ -46,7 +57,13 @@ states:
|
|
|
46
57
|
traits: []
|
|
47
58
|
tokens: {}
|
|
48
59
|
a2ui:
|
|
49
|
-
rules:
|
|
60
|
+
rules:
|
|
61
|
+
- rule: 'Horizontal-stack flex container. Children flow left-to-right with token-driven gap.'
|
|
62
|
+
reason: 'Canonical horizontal layout.'
|
|
63
|
+
- rule: 'Pair with <col-ui> for vertical layouts; both share the same gap-token contract.'
|
|
64
|
+
reason: 'Layout symmetry.'
|
|
65
|
+
- rule: 'Wrap attribute enables flex-wrap; default is nowrap.'
|
|
66
|
+
reason: 'Single-line vs multi-line knob.'
|
|
50
67
|
anti_patterns: []
|
|
51
68
|
examples:
|
|
52
69
|
- name: chat-interface
|
|
@@ -348,7 +365,8 @@ examples:
|
|
|
348
365
|
]
|
|
349
366
|
keywords:
|
|
350
367
|
- row
|
|
351
|
-
synonyms:
|
|
368
|
+
synonyms:
|
|
369
|
+
row: [hstack, horizontal-stack, hbox]
|
|
352
370
|
related:
|
|
353
371
|
- avatar
|
|
354
372
|
- input
|
|
@@ -71,7 +71,13 @@ tokens:
|
|
|
71
71
|
--search-radius:
|
|
72
72
|
description: Input border radius
|
|
73
73
|
a2ui:
|
|
74
|
-
rules:
|
|
74
|
+
rules:
|
|
75
|
+
- rule: 'Search-input variant of <input-ui> with built-in search icon + clear affordance.'
|
|
76
|
+
reason: 'Search-input canonical primitive.'
|
|
77
|
+
- rule: 'For command-palette interactions use <command-ui> (which composes search + menu).'
|
|
78
|
+
reason: 'Specialized command surface.'
|
|
79
|
+
- rule: 'Emits input events on each keystroke; debounce in the consumer for live-search.'
|
|
80
|
+
reason: 'Standard event model.'
|
|
75
81
|
anti_patterns: []
|
|
76
82
|
examples:
|
|
77
83
|
- name: basic-search
|
|
@@ -153,4 +159,7 @@ synonyms:
|
|
|
153
159
|
- search
|
|
154
160
|
- command
|
|
155
161
|
- palette
|
|
156
|
-
related:
|
|
162
|
+
related:
|
|
163
|
+
- Input
|
|
164
|
+
- Command
|
|
165
|
+
- Select
|
|
@@ -27,7 +27,40 @@ states:
|
|
|
27
27
|
traits: []
|
|
28
28
|
tokens: {}
|
|
29
29
|
a2ui:
|
|
30
|
-
rules:
|
|
30
|
+
rules:
|
|
31
|
+
- >-
|
|
32
|
+
Use <section-ui> as the content body region inside a primitive
|
|
33
|
+
container parent (<card-ui>, <drawer-ui>, <modal-ui>, <page-ui>)
|
|
34
|
+
OR inside the body region of a bespoke shell-tier sidebar
|
|
35
|
+
(<admin-sidebar> nav body — site/index.html and the admin-shell
|
|
36
|
+
playground use this canonically). It is a CSS-only chrome stub
|
|
37
|
+
for ADR-0009 slot vocabulary; the parent's @scope handles padding
|
|
38
|
+
and borders.
|
|
39
|
+
- >-
|
|
40
|
+
`scroll` is a CONDITIONAL attribute. It makes section-ui the
|
|
41
|
+
scroll container ONLY inside <card-ui> / <drawer-ui> / <modal-ui>.
|
|
42
|
+
Inside <page-ui> and shell-tier hosts (<admin-shell>,
|
|
43
|
+
<admin-page-body>) it is a no-op — those parents own their own
|
|
44
|
+
scroll surface. Never nest <section-ui scroll> inside another
|
|
45
|
+
scroll container (nested scroll is a UX anti-pattern).
|
|
46
|
+
- >-
|
|
47
|
+
Use `bleed` to remove section padding so children reach the
|
|
48
|
+
card / drawer edges — typical for cover images, full-width charts,
|
|
49
|
+
or media galleries (apps/saas/members.contents.html uses this
|
|
50
|
+
pattern to wrap <table-ui raw>). Mix bleed and non-bleed sections
|
|
51
|
+
in the same card to alternate edge-to-edge media with padded
|
|
52
|
+
prose.
|
|
53
|
+
- >-
|
|
54
|
+
Do NOT substitute <section-ui> for bespoke shell-tier body
|
|
55
|
+
regions. Inside <admin-page> use <admin-page-body>; inside
|
|
56
|
+
<admin-content> use the bespoke children. <section-ui> is
|
|
57
|
+
reserved for the primitive container chrome triad + the
|
|
58
|
+
<admin-sidebar> nav body.
|
|
59
|
+
- >-
|
|
60
|
+
<section-ui> is the right place for layout primitives
|
|
61
|
+
(<col-ui>, <row-ui>, <grid-ui>) that organize body content. Do
|
|
62
|
+
NOT put those layout primitives inside <header-ui> or <footer-ui>
|
|
63
|
+
— the parent's chrome scope already lays those rows out.
|
|
31
64
|
anti_patterns: []
|
|
32
65
|
examples:
|
|
33
66
|
- name: chat-interface
|
|
@@ -329,7 +362,8 @@ examples:
|
|
|
329
362
|
]
|
|
330
363
|
keywords:
|
|
331
364
|
- section
|
|
332
|
-
synonyms:
|
|
365
|
+
synonyms:
|
|
366
|
+
section: [section-region, body-region, content-section]
|
|
333
367
|
related:
|
|
334
368
|
- avatar
|
|
335
369
|
- input
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://adiaui.dev/a2ui/v0_9/components/Segment.json",
|
|
4
4
|
"title": "Segment",
|
|
5
|
-
"description": "Individual segment
|
|
5
|
+
"description": "Individual segment child of <segmented-ui> — carries the [value],\n[text], optional [icon], and [selected] state for one option in\na horizontal segmented selector. Distinct from <tab-ui> (a view\nswitcher's child) and <option> (native option for <select-ui>).\nUse segment-ui only as a direct child of <segmented-ui>; never\nstandalone.\n",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"allOf": [
|
|
8
8
|
{
|
|
@@ -99,7 +99,13 @@
|
|
|
99
99
|
"name": "disabled"
|
|
100
100
|
}
|
|
101
101
|
],
|
|
102
|
-
"synonyms": {
|
|
102
|
+
"synonyms": {
|
|
103
|
+
"segment": [
|
|
104
|
+
"segment-button",
|
|
105
|
+
"segmented-option",
|
|
106
|
+
"option-button"
|
|
107
|
+
]
|
|
108
|
+
},
|
|
103
109
|
"tag": "segment-ui",
|
|
104
110
|
"tokens": {},
|
|
105
111
|
"traits": [],
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `<segment-ui>` — Individual segment
|
|
2
|
+
* `<segment-ui>` — Individual segment child of <segmented-ui> — carries the [value],
|
|
3
|
+
[text], optional [icon], and [selected] state for one option in
|
|
4
|
+
a horizontal segmented selector. Distinct from <tab-ui> (a view
|
|
5
|
+
switcher's child) and <option> (native option for <select-ui>).
|
|
6
|
+
Use segment-ui only as a direct child of <segmented-ui>; never
|
|
7
|
+
standalone.
|
|
8
|
+
|
|
3
9
|
*
|
|
4
10
|
* @see https://ui-kit.exe.xyz/site/components/segment
|
|
5
11
|
*
|
|
@@ -6,7 +6,13 @@ tag: segment-ui
|
|
|
6
6
|
component: Segment
|
|
7
7
|
category: navigation
|
|
8
8
|
version: 1
|
|
9
|
-
description:
|
|
9
|
+
description: |
|
|
10
|
+
Individual segment child of <segmented-ui> — carries the [value],
|
|
11
|
+
[text], optional [icon], and [selected] state for one option in
|
|
12
|
+
a horizontal segmented selector. Distinct from <tab-ui> (a view
|
|
13
|
+
switcher's child) and <option> (native option for <select-ui>).
|
|
14
|
+
Use segment-ui only as a direct child of <segmented-ui>; never
|
|
15
|
+
standalone.
|
|
10
16
|
# Per ADR-0027 — primitives that programmatically create other primitives
|
|
11
17
|
# do NOT auto-import them. Consumer (or demo shell) must explicitly import.
|
|
12
18
|
composes:
|
|
@@ -46,7 +52,13 @@ states:
|
|
|
46
52
|
traits: []
|
|
47
53
|
tokens: {}
|
|
48
54
|
a2ui:
|
|
49
|
-
rules:
|
|
55
|
+
rules:
|
|
56
|
+
- rule: 'Child of <segmented-ui> — one selectable option button in a single-select group.'
|
|
57
|
+
reason: 'Cluster contract.'
|
|
58
|
+
- rule: 'Different from <toggle-option-ui> (which is multi-select inside <toggle-group-ui>).'
|
|
59
|
+
reason: 'Single vs multi-select sibling distinction.'
|
|
60
|
+
- rule: 'Selected state managed by parent <segmented-ui> via active attribute; do not set selected directly on segment.'
|
|
61
|
+
reason: 'Parent owns selection state.'
|
|
50
62
|
anti_patterns: []
|
|
51
63
|
examples:
|
|
52
64
|
- name: segmented-control
|
|
@@ -220,6 +232,7 @@ examples:
|
|
|
220
232
|
]
|
|
221
233
|
keywords:
|
|
222
234
|
- segment
|
|
223
|
-
synonyms:
|
|
235
|
+
synonyms:
|
|
236
|
+
segment: [segment-button, segmented-option, option-button]
|
|
224
237
|
related:
|
|
225
238
|
- segmented-control
|
|
@@ -53,7 +53,12 @@
|
|
|
53
53
|
"button-group"
|
|
54
54
|
],
|
|
55
55
|
"name": "UISegmented",
|
|
56
|
-
"related": [
|
|
56
|
+
"related": [
|
|
57
|
+
"Segment",
|
|
58
|
+
"ToggleGroup",
|
|
59
|
+
"Tabs",
|
|
60
|
+
"Radio"
|
|
61
|
+
],
|
|
57
62
|
"slots": {
|
|
58
63
|
"default": {
|
|
59
64
|
"description": "Child segment-ui elements that form the toggle group. Children MUST be segment-ui — bare segment tags render text but are silently ignored for the sliding indicator and role/aria-checked state."
|
|
@@ -32,6 +32,11 @@
|
|
|
32
32
|
grid-auto-columns: 1fr;
|
|
33
33
|
align-items: stretch;
|
|
34
34
|
position: relative;
|
|
35
|
+
/* Allow shrinking inside flex/grid containers (e.g. card header action
|
|
36
|
+
slot). Without this, inline-grid never shrinks below its max-content
|
|
37
|
+
width and the control overflows rather than triggering the per-segment
|
|
38
|
+
::after text-overflow:ellipsis rules. */
|
|
39
|
+
min-width: 0;
|
|
35
40
|
/* Children use `position: relative; z-index: 1` (segments) so they
|
|
36
41
|
paint above the absolute indicator. Without an own stacking context
|
|
37
42
|
here, those z-indexed children escape into the parent context and
|
|
@@ -24,7 +24,13 @@ states:
|
|
|
24
24
|
traits: []
|
|
25
25
|
tokens: {}
|
|
26
26
|
a2ui:
|
|
27
|
-
rules:
|
|
27
|
+
rules:
|
|
28
|
+
- rule: 'Single-select segmented control. Hosts <segment-ui> children; exactly one selected at a time.'
|
|
29
|
+
reason: 'Single-select cluster contract.'
|
|
30
|
+
- rule: 'For multi-select use <toggle-group-ui> + <toggle-option-ui> instead.'
|
|
31
|
+
reason: 'Selection model boundary.'
|
|
32
|
+
- rule: 'Use for view-mode switches (grid/list, light/dark) or short filter sets (3-5 options); for longer sets use <tabs-ui> or <select-ui>.'
|
|
33
|
+
reason: 'Capacity guidance.'
|
|
28
34
|
anti_patterns: []
|
|
29
35
|
examples:
|
|
30
36
|
- name: basic-segmented
|
|
@@ -116,4 +122,8 @@ synonyms:
|
|
|
116
122
|
tags:
|
|
117
123
|
- SegmentedControl
|
|
118
124
|
- Segmented
|
|
119
|
-
related:
|
|
125
|
+
related:
|
|
126
|
+
- Segment
|
|
127
|
+
- ToggleGroup
|
|
128
|
+
- Tabs
|
|
129
|
+
- Radio
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://adiaui.dev/a2ui/v0_9/components/Select.json",
|
|
4
4
|
"title": "Select",
|
|
5
|
-
"description": "
|
|
5
|
+
"description": "Single-select dropdown primitive — the canonical AdiaUI select\ncontrol. Form-bearing via UIFormElement: [name], [value],\n[required], [disabled], fires `change`. Options via native\n<option> / <optgroup> children, programmatic `.options` array, or\nJSON [data-options] (hydrated by <editor-shell>'s wireSelects).\nUse for single-select with > 4 options; for ≤ 4 options use\n<segmented-ui> or <radio-ui>. Multi-select via [multiple searchable].\n",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"allOf": [
|
|
8
8
|
{
|
|
@@ -6,7 +6,14 @@ tag: select-ui
|
|
|
6
6
|
component: Select
|
|
7
7
|
category: input
|
|
8
8
|
version: 1
|
|
9
|
-
description:
|
|
9
|
+
description: |
|
|
10
|
+
Single-select dropdown primitive — the canonical AdiaUI select
|
|
11
|
+
control. Form-bearing via UIFormElement: [name], [value],
|
|
12
|
+
[required], [disabled], fires `change`. Options via native
|
|
13
|
+
<option> / <optgroup> children, programmatic `.options` array, or
|
|
14
|
+
JSON [data-options] (hydrated by <editor-shell>'s wireSelects).
|
|
15
|
+
Use for single-select with > 4 options; for ≤ 4 options use
|
|
16
|
+
<segmented-ui> or <radio-ui>. Multi-select via [multiple searchable].
|
|
10
17
|
# Per ADR-0027 — primitives that programmatically create other primitives
|
|
11
18
|
# do NOT auto-import them. Consumer (or demo shell) must explicitly import.
|
|
12
19
|
composes:
|
|
@@ -166,7 +173,32 @@ tokens: {}
|
|
|
166
173
|
requiredIcons:
|
|
167
174
|
- caret-up-down
|
|
168
175
|
a2ui:
|
|
169
|
-
rules:
|
|
176
|
+
rules:
|
|
177
|
+
- >-
|
|
178
|
+
Use <select-ui> for single-select with > 4 options or any list
|
|
179
|
+
that benefits from a popover. Prefer <segmented-ui> / <radio-ui>
|
|
180
|
+
when ≤ 4 visible options fit the row.
|
|
181
|
+
- >-
|
|
182
|
+
Compose options via native <option> / <optgroup> children — other
|
|
183
|
+
tag names are silently ignored (per §225 v0.5.9) and warned once
|
|
184
|
+
at runtime. Or set `.options` programmatically as an array of
|
|
185
|
+
`{value, label, disabled?}` (grouped form: `{label, options:[…]}`).
|
|
186
|
+
- >-
|
|
187
|
+
For dynamic option lists rendered inside <editor-shell>, set the
|
|
188
|
+
JSON via the [data-options] attribute — <editor-shell>'s
|
|
189
|
+
wireSelects() finds select-ui[data-options], JSON.parses the
|
|
190
|
+
attribute, and assigns `.options` on connect. Useful for
|
|
191
|
+
static-HTML toolbars where JS hydration would be awkward.
|
|
192
|
+
- >-
|
|
193
|
+
<select-ui> owns its own label / hint / error chrome (via
|
|
194
|
+
[label] / [hint] / [error] props). Only wrap in <field-ui> when
|
|
195
|
+
you need to share the field-chrome stack with sibling inputs in
|
|
196
|
+
the same form row group.
|
|
197
|
+
- >-
|
|
198
|
+
Enable [searchable] for > 10 options; add [free-text] only when
|
|
199
|
+
unmatched values are valid (tag entry, email-with-suggestion).
|
|
200
|
+
Use [multiple searchable] for multi-select rather than
|
|
201
|
+
authoring a separate multi-select primitive.
|
|
170
202
|
anti_patterns: []
|
|
171
203
|
examples:
|
|
172
204
|
- name: bleed-design-settings
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://adiaui.dev/a2ui/v0_9/components/Skeleton.json",
|
|
4
4
|
"title": "Skeleton",
|
|
5
|
-
"description": "Placeholder shimmer for loading states. Purely presentational.",
|
|
5
|
+
"description": "Placeholder shimmer for loading states. Purely presentational — animated pulse background with configurable shape via CSS sizing. Use as a structural placeholder while data loads; for zero-state messaging after loading completes use <empty-state-ui> instead.",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"allOf": [
|
|
8
8
|
{
|
|
@@ -68,7 +68,12 @@
|
|
|
68
68
|
"shimmer"
|
|
69
69
|
],
|
|
70
70
|
"name": "UISkeleton",
|
|
71
|
-
"related": [
|
|
71
|
+
"related": [
|
|
72
|
+
"EmptyState",
|
|
73
|
+
"Card",
|
|
74
|
+
"Table",
|
|
75
|
+
"List"
|
|
76
|
+
],
|
|
72
77
|
"slots": {},
|
|
73
78
|
"states": [
|
|
74
79
|
{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `<skeleton-ui>` — Placeholder shimmer for loading states. Purely presentational.
|
|
2
|
+
* `<skeleton-ui>` — Placeholder shimmer for loading states. Purely presentational — animated pulse background with configurable shape via CSS sizing. Use as a structural placeholder while data loads; for zero-state messaging after loading completes use <empty-state-ui> instead.
|
|
3
3
|
*
|
|
4
4
|
* @see https://ui-kit.exe.xyz/site/components/skeleton
|
|
5
5
|
*
|