@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
|
@@ -6,7 +6,11 @@ tag: skeleton-ui
|
|
|
6
6
|
component: Skeleton
|
|
7
7
|
category: display
|
|
8
8
|
version: 1
|
|
9
|
-
description:
|
|
9
|
+
description: >-
|
|
10
|
+
Placeholder shimmer for loading states. Purely presentational — animated
|
|
11
|
+
pulse background with configurable shape via CSS sizing. Use as a
|
|
12
|
+
structural placeholder while data loads; for zero-state messaging after
|
|
13
|
+
loading completes use <empty-state-ui> instead.
|
|
10
14
|
props:
|
|
11
15
|
height:
|
|
12
16
|
description: Height of the placeholder.
|
|
@@ -38,7 +42,13 @@ states:
|
|
|
38
42
|
traits: []
|
|
39
43
|
tokens: {}
|
|
40
44
|
a2ui:
|
|
41
|
-
rules:
|
|
45
|
+
rules:
|
|
46
|
+
- rule: 'Use to placeholder content during loading. Shape via CSS sizing (width/height/border-radius); shimmer is automatic.'
|
|
47
|
+
reason: 'Purely structural placeholder.'
|
|
48
|
+
- rule: 'Compose multiple <skeleton-ui> blocks to mock the actual content shape (card-skeleton, row-skeleton, etc.).'
|
|
49
|
+
reason: 'Better UX than single block — preview structure.'
|
|
50
|
+
- rule: 'For post-load empty states use <empty-state-ui> instead; skeleton is pre-load only.'
|
|
51
|
+
reason: 'Different lifecycle phase.'
|
|
42
52
|
anti_patterns: []
|
|
43
53
|
examples:
|
|
44
54
|
- name: loading-skeleton
|
|
@@ -145,4 +155,8 @@ synonyms:
|
|
|
145
155
|
- loading
|
|
146
156
|
- skeleton
|
|
147
157
|
- progress
|
|
148
|
-
related:
|
|
158
|
+
related:
|
|
159
|
+
- EmptyState
|
|
160
|
+
- Card
|
|
161
|
+
- Table
|
|
162
|
+
- List
|
|
@@ -92,7 +92,13 @@ tokens:
|
|
|
92
92
|
--slider-track-height:
|
|
93
93
|
description: Full track height (scales via universal [size] attribute)
|
|
94
94
|
a2ui:
|
|
95
|
-
rules:
|
|
95
|
+
rules:
|
|
96
|
+
- rule: 'Single-handle slider for selecting one value in a range. Form-associated; emits numeric change events.'
|
|
97
|
+
reason: 'Single-value range-input contract.'
|
|
98
|
+
- rule: 'For two-handle range selection use <range-ui> instead.'
|
|
99
|
+
reason: 'Single vs range sibling.'
|
|
100
|
+
- rule: 'Step attribute controls increments; show-value enables an inline value label.'
|
|
101
|
+
reason: 'Standard slider knobs.'
|
|
96
102
|
anti_patterns: []
|
|
97
103
|
examples:
|
|
98
104
|
- name: slider-range
|
|
@@ -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/Stack.json",
|
|
4
4
|
"title": "Stack",
|
|
5
|
-
"description": "Grid
|
|
5
|
+
"description": "Grid-overlay layout primitive — children stack on TOP of each\nother in a single grid cell (z-axis layering). Distinct from\n<col-ui> (vertical) / <row-ui> (horizontal) / <grid-ui> (2D\ngrid with cells). Use stack-ui for badge overlays on avatars,\nabsolute-positioned UI on top of charts, loading spinners over\ncontent, or any case where children must occupy the same physical\nspace. [align] controls how children align within the shared\ncell.\n",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"allOf": [
|
|
8
8
|
{
|
|
@@ -42,7 +42,11 @@
|
|
|
42
42
|
"stack"
|
|
43
43
|
],
|
|
44
44
|
"name": "UIStack",
|
|
45
|
-
"related": [
|
|
45
|
+
"related": [
|
|
46
|
+
"Col",
|
|
47
|
+
"Row",
|
|
48
|
+
"Grid"
|
|
49
|
+
],
|
|
46
50
|
"slots": {
|
|
47
51
|
"default": {
|
|
48
52
|
"description": "Default slot — primary child content."
|
|
@@ -54,7 +58,14 @@
|
|
|
54
58
|
"name": "idle"
|
|
55
59
|
}
|
|
56
60
|
],
|
|
57
|
-
"synonyms": {
|
|
61
|
+
"synonyms": {
|
|
62
|
+
"stack": [
|
|
63
|
+
"overlay-stack",
|
|
64
|
+
"z-stack",
|
|
65
|
+
"grid-overlay",
|
|
66
|
+
"layer"
|
|
67
|
+
]
|
|
68
|
+
},
|
|
58
69
|
"tag": "stack-ui",
|
|
59
70
|
"tokens": {},
|
|
60
71
|
"traits": [],
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `<stack-ui>` — Grid
|
|
2
|
+
* `<stack-ui>` — Grid-overlay layout primitive — children stack on TOP of each
|
|
3
|
+
other in a single grid cell (z-axis layering). Distinct from
|
|
4
|
+
<col-ui> (vertical) / <row-ui> (horizontal) / <grid-ui> (2D
|
|
5
|
+
grid with cells). Use stack-ui for badge overlays on avatars,
|
|
6
|
+
absolute-positioned UI on top of charts, loading spinners over
|
|
7
|
+
content, or any case where children must occupy the same physical
|
|
8
|
+
space. [align] controls how children align within the shared
|
|
9
|
+
cell.
|
|
10
|
+
|
|
3
11
|
*
|
|
4
12
|
* @see https://ui-kit.exe.xyz/site/components/stack
|
|
5
13
|
*
|
|
@@ -6,7 +6,15 @@ tag: stack-ui
|
|
|
6
6
|
component: Stack
|
|
7
7
|
category: layout
|
|
8
8
|
version: 1
|
|
9
|
-
description:
|
|
9
|
+
description: |
|
|
10
|
+
Grid-overlay layout primitive — children stack on TOP of each
|
|
11
|
+
other in a single grid cell (z-axis layering). Distinct from
|
|
12
|
+
<col-ui> (vertical) / <row-ui> (horizontal) / <grid-ui> (2D
|
|
13
|
+
grid with cells). Use stack-ui for badge overlays on avatars,
|
|
14
|
+
absolute-positioned UI on top of charts, loading spinners over
|
|
15
|
+
content, or any case where children must occupy the same physical
|
|
16
|
+
space. [align] controls how children align within the shared
|
|
17
|
+
cell.
|
|
10
18
|
props:
|
|
11
19
|
align:
|
|
12
20
|
description: Alignment of stacked items
|
|
@@ -22,7 +30,13 @@ states:
|
|
|
22
30
|
traits: []
|
|
23
31
|
tokens: {}
|
|
24
32
|
a2ui:
|
|
25
|
-
rules:
|
|
33
|
+
rules:
|
|
34
|
+
- rule: 'Overlay/layer stacking container — children occupy the same area, stacked on the z-axis.'
|
|
35
|
+
reason: 'Different from row/col which lay out side-by-side.'
|
|
36
|
+
- rule: 'Use for overlapping content (image + overlay, badge-over-avatar, drop-shadow stacks).'
|
|
37
|
+
reason: 'Z-axis composition.'
|
|
38
|
+
- rule: 'Do not use for vertical content flow — that''s <col-ui>. Stack-ui is overlap-only.'
|
|
39
|
+
reason: 'Naming pitfall (stack ≠ vstack).'
|
|
26
40
|
anti_patterns: []
|
|
27
41
|
examples:
|
|
28
42
|
- name: basic-stack
|
|
@@ -50,5 +64,9 @@ examples:
|
|
|
50
64
|
]
|
|
51
65
|
keywords:
|
|
52
66
|
- stack
|
|
53
|
-
synonyms:
|
|
54
|
-
|
|
67
|
+
synonyms:
|
|
68
|
+
stack: [overlay-stack, z-stack, grid-overlay, layer]
|
|
69
|
+
related:
|
|
70
|
+
- Col
|
|
71
|
+
- Row
|
|
72
|
+
- Grid
|
|
@@ -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/Stat.json",
|
|
4
4
|
"title": "Stat",
|
|
5
|
-
"description": "Metric/KPI display — value + label + optional change indicator and trend.",
|
|
5
|
+
"description": "Metric/KPI display — value + label + optional change indicator and trend icon. Renders as a stacked block with prominent value and small caption; supports positive/negative delta coloring. Use inside dashboard cards or summary headers; for inline percentages or progress use <progress-ui>.",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"allOf": [
|
|
8
8
|
{
|
|
@@ -87,7 +87,11 @@
|
|
|
87
87
|
"scoreboard"
|
|
88
88
|
],
|
|
89
89
|
"name": "UIStat",
|
|
90
|
-
"related": [
|
|
90
|
+
"related": [
|
|
91
|
+
"Card",
|
|
92
|
+
"Badge",
|
|
93
|
+
"Progress"
|
|
94
|
+
],
|
|
91
95
|
"slots": {
|
|
92
96
|
"change": {
|
|
93
97
|
"description": "Child content region for the `change` slot."
|
package/components/stat/stat.css
CHANGED
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
--stat-icon-fg: var(--a-fg-muted);
|
|
14
14
|
|
|
15
15
|
/* ── Spacing ── */
|
|
16
|
-
--stat-column-gap: var(--a-
|
|
17
|
-
--stat-row-gap: var(--a-
|
|
16
|
+
--stat-column-gap: var(--a-gap);
|
|
17
|
+
--stat-row-gap: var(--a-gap-sm);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
:scope {
|
|
@@ -74,6 +74,9 @@
|
|
|
74
74
|
color: var(--stat-label-fg);
|
|
75
75
|
line-height: 1.4;
|
|
76
76
|
min-width: 0;
|
|
77
|
+
overflow: hidden;
|
|
78
|
+
text-overflow: ellipsis;
|
|
79
|
+
white-space: nowrap;
|
|
77
80
|
}
|
|
78
81
|
|
|
79
82
|
/* ── Change delta (under value) ── */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `<stat-ui>` — Metric/KPI display — value + label + optional change indicator and trend.
|
|
2
|
+
* `<stat-ui>` — Metric/KPI display — value + label + optional change indicator and trend icon. Renders as a stacked block with prominent value and small caption; supports positive/negative delta coloring. Use inside dashboard cards or summary headers; for inline percentages or progress use <progress-ui>.
|
|
3
3
|
*
|
|
4
4
|
* @see https://ui-kit.exe.xyz/site/components/stat
|
|
5
5
|
*
|
|
@@ -9,7 +9,11 @@ composes:
|
|
|
9
9
|
component: Stat
|
|
10
10
|
category: display
|
|
11
11
|
version: 1
|
|
12
|
-
description:
|
|
12
|
+
description: >-
|
|
13
|
+
Metric/KPI display — value + label + optional change indicator and trend
|
|
14
|
+
icon. Renders as a stacked block with prominent value and small caption;
|
|
15
|
+
supports positive/negative delta coloring. Use inside dashboard cards or
|
|
16
|
+
summary headers; for inline percentages or progress use <progress-ui>.
|
|
13
17
|
props:
|
|
14
18
|
change:
|
|
15
19
|
description: Change indicator text (e.g. '+12%', '-3%')
|
|
@@ -86,7 +90,13 @@ tokens:
|
|
|
86
90
|
--stat-value-weight:
|
|
87
91
|
description: Font weight for the primary value
|
|
88
92
|
a2ui:
|
|
89
|
-
rules:
|
|
93
|
+
rules:
|
|
94
|
+
- rule: 'Use for prominent metric/KPI displays inside dashboard cards. Value + label + optional delta indicator.'
|
|
95
|
+
reason: 'Canonical metric primitive — dashboard surfaces compose 3-6 of these.'
|
|
96
|
+
- rule: 'For inline percent/progress displays use <progress-ui>; stat is for standalone metrics, progress for completion bars.'
|
|
97
|
+
reason: 'Different visual + semantic role.'
|
|
98
|
+
- rule: 'Delta indicator uses positive/negative semantic tokens; pass change= attribute with sign.'
|
|
99
|
+
reason: 'Built-in trend coloring; no manual styling needed.'
|
|
90
100
|
anti_patterns: []
|
|
91
101
|
examples:
|
|
92
102
|
- name: basic-stat
|
|
@@ -220,4 +230,7 @@ synonyms:
|
|
|
220
230
|
- metric
|
|
221
231
|
- chart
|
|
222
232
|
- stat
|
|
223
|
-
related:
|
|
233
|
+
related:
|
|
234
|
+
- Card
|
|
235
|
+
- Badge
|
|
236
|
+
- Progress
|
|
@@ -45,7 +45,13 @@ states:
|
|
|
45
45
|
traits: []
|
|
46
46
|
tokens: {}
|
|
47
47
|
a2ui:
|
|
48
|
-
rules:
|
|
48
|
+
rules:
|
|
49
|
+
- rule: 'Compact step indicator — N dots/segments showing current step out of total.'
|
|
50
|
+
reason: 'Minimal stepper visualization.'
|
|
51
|
+
- rule: 'Different from <stepper-ui> (labeled, expanded) — step-progress is dense and label-free.'
|
|
52
|
+
reason: 'Density boundary.'
|
|
53
|
+
- rule: 'For multi-task progress bars (multiple labeled rows) use <progress-row-ui> stack.'
|
|
54
|
+
reason: 'Different layout.'
|
|
49
55
|
anti_patterns: []
|
|
50
56
|
|
|
51
57
|
examples:
|
|
@@ -53,9 +53,19 @@
|
|
|
53
53
|
"composes": [],
|
|
54
54
|
"events": {},
|
|
55
55
|
"examples": [],
|
|
56
|
-
"keywords": [
|
|
56
|
+
"keywords": [
|
|
57
|
+
"stepper-item",
|
|
58
|
+
"step",
|
|
59
|
+
"wizard-step",
|
|
60
|
+
"progress-step",
|
|
61
|
+
"step-row"
|
|
62
|
+
],
|
|
57
63
|
"name": "UIStepperItem",
|
|
58
|
-
"related": [
|
|
64
|
+
"related": [
|
|
65
|
+
"Stepper",
|
|
66
|
+
"Timeline",
|
|
67
|
+
"StepProgress"
|
|
68
|
+
],
|
|
59
69
|
"slots": {
|
|
60
70
|
"description": {
|
|
61
71
|
"description": "Custom description content; falls through to `[description]` prop if not slotted."
|
|
@@ -65,7 +75,14 @@
|
|
|
65
75
|
}
|
|
66
76
|
},
|
|
67
77
|
"states": [],
|
|
68
|
-
"synonyms": {
|
|
78
|
+
"synonyms": {
|
|
79
|
+
"stepper-item": [
|
|
80
|
+
"step",
|
|
81
|
+
"wizard-step",
|
|
82
|
+
"progress-step",
|
|
83
|
+
"checkpoint"
|
|
84
|
+
]
|
|
85
|
+
},
|
|
69
86
|
"tag": "stepper-item-ui",
|
|
70
87
|
"tokens": {},
|
|
71
88
|
"traits": [],
|
|
@@ -43,3 +43,27 @@ slots:
|
|
|
43
43
|
description: Custom label content; falls through to `[text]` prop if not slotted.
|
|
44
44
|
description:
|
|
45
45
|
description: Custom description content; falls through to `[description]` prop if not slotted.
|
|
46
|
+
|
|
47
|
+
keywords:
|
|
48
|
+
- stepper-item
|
|
49
|
+
- step
|
|
50
|
+
- wizard-step
|
|
51
|
+
- progress-step
|
|
52
|
+
- step-row
|
|
53
|
+
|
|
54
|
+
synonyms:
|
|
55
|
+
stepper-item: [step, wizard-step, progress-step, checkpoint]
|
|
56
|
+
|
|
57
|
+
related:
|
|
58
|
+
- Stepper
|
|
59
|
+
- Timeline
|
|
60
|
+
- StepProgress
|
|
61
|
+
|
|
62
|
+
a2ui:
|
|
63
|
+
rules:
|
|
64
|
+
- rule: 'Child of <stepper-ui> — one numbered step with label + complete/current/upcoming state.'
|
|
65
|
+
reason: 'Cluster contract.'
|
|
66
|
+
- rule: 'State driven by parent''s active-index; do not set state directly on stepper-item.'
|
|
67
|
+
reason: 'Parent owns step progression.'
|
|
68
|
+
- rule: 'For chronological events (no completion semantics) use <timeline-item-ui> instead.'
|
|
69
|
+
reason: 'Stepper is process; timeline is history.'
|
|
@@ -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/Stepper.json",
|
|
4
4
|
"title": "Stepper",
|
|
5
|
-
"description": "Wizard / process stepper — parent step index drives numbered children.",
|
|
5
|
+
"description": "Wizard / process stepper — parent step index drives numbered children's complete/current/upcoming states automatically. Renders horizontally as a labeled step bar with connectors. Use for multi-step forms, onboarding, or pipelines; for read-only event history use <timeline-ui> instead.",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"allOf": [
|
|
8
8
|
{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `<stepper-ui>` — Wizard / process stepper — parent step index drives numbered children.
|
|
2
|
+
* `<stepper-ui>` — Wizard / process stepper — parent step index drives numbered children's complete/current/upcoming states automatically. Renders horizontally as a labeled step bar with connectors. Use for multi-step forms, onboarding, or pipelines; for read-only event history use <timeline-ui> instead.
|
|
3
3
|
*
|
|
4
4
|
* @see https://ui-kit.exe.xyz/site/components/stepper
|
|
5
5
|
*
|
|
@@ -6,7 +6,12 @@ tag: stepper-ui
|
|
|
6
6
|
component: Stepper
|
|
7
7
|
category: navigation
|
|
8
8
|
version: 1
|
|
9
|
-
description:
|
|
9
|
+
description: >-
|
|
10
|
+
Wizard / process stepper — parent step index drives numbered children's
|
|
11
|
+
complete/current/upcoming states automatically. Renders horizontally as
|
|
12
|
+
a labeled step bar with connectors. Use for multi-step forms,
|
|
13
|
+
onboarding, or pipelines; for read-only event history use <timeline-ui>
|
|
14
|
+
instead.
|
|
10
15
|
# Per ADR-0027 — primitives that programmatically create other primitives
|
|
11
16
|
# do NOT auto-import them. Consumer (or demo shell) must explicitly import.
|
|
12
17
|
composes:
|
|
@@ -30,7 +35,13 @@ states:
|
|
|
30
35
|
traits: []
|
|
31
36
|
tokens: {}
|
|
32
37
|
a2ui:
|
|
33
|
-
rules:
|
|
38
|
+
rules:
|
|
39
|
+
- rule: 'Hosts <stepper-item-ui> children with a parent active-index driving complete/current/upcoming states.'
|
|
40
|
+
reason: 'Process visualization cluster.'
|
|
41
|
+
- rule: 'Use for wizards, onboarding flows, multi-step forms.'
|
|
42
|
+
reason: 'Surface examples.'
|
|
43
|
+
- rule: 'For read-only event history use <timeline-ui>; stepper requires forward progress semantics.'
|
|
44
|
+
reason: 'Decision rule vs timeline.'
|
|
34
45
|
anti_patterns: []
|
|
35
46
|
examples:
|
|
36
47
|
- name: basic
|
|
@@ -68,7 +68,11 @@
|
|
|
68
68
|
"stream"
|
|
69
69
|
],
|
|
70
70
|
"name": "UIStream",
|
|
71
|
-
"related": [
|
|
71
|
+
"related": [
|
|
72
|
+
"ChatThreadUI",
|
|
73
|
+
"Text",
|
|
74
|
+
"Code"
|
|
75
|
+
],
|
|
72
76
|
"slots": {
|
|
73
77
|
"default": {
|
|
74
78
|
"description": "Default slot — primary child content."
|
|
@@ -80,7 +84,13 @@
|
|
|
80
84
|
"name": "idle"
|
|
81
85
|
}
|
|
82
86
|
],
|
|
83
|
-
"synonyms": {
|
|
87
|
+
"synonyms": {
|
|
88
|
+
"stream": [
|
|
89
|
+
"streaming-text",
|
|
90
|
+
"live-text",
|
|
91
|
+
"incremental-text"
|
|
92
|
+
]
|
|
93
|
+
},
|
|
84
94
|
"tag": "stream-ui",
|
|
85
95
|
"tokens": {
|
|
86
96
|
"--stream-color": {
|
|
@@ -50,7 +50,15 @@ tokens:
|
|
|
50
50
|
--stream-line-height:
|
|
51
51
|
description: Line height
|
|
52
52
|
a2ui:
|
|
53
|
-
rules:
|
|
53
|
+
rules:
|
|
54
|
+
- rule: 'Renders an AsyncIterable<string> as streaming text — canonical for LLM token streaming.'
|
|
55
|
+
reason: 'Streaming primitive.'
|
|
56
|
+
- rule: 'Place inside <chat-thread-ui> message bodies for LLM responses; standalone for log tailing.'
|
|
57
|
+
reason: 'Composition pattern.'
|
|
58
|
+
- rule: 'pace attribute controls typewriter-effect speed; hide-cursor disables the blinking caret.'
|
|
59
|
+
reason: 'Visual knobs.'
|
|
60
|
+
- rule: 'For static (post-stream) display use <text-ui> or <richtext-ui>; stream-ui assumes live token feed.'
|
|
61
|
+
reason: 'Live vs static.'
|
|
54
62
|
anti_patterns: []
|
|
55
63
|
examples:
|
|
56
64
|
- name: streaming-response
|
|
@@ -87,5 +95,9 @@ examples:
|
|
|
87
95
|
]
|
|
88
96
|
keywords:
|
|
89
97
|
- stream
|
|
90
|
-
synonyms:
|
|
91
|
-
|
|
98
|
+
synonyms:
|
|
99
|
+
stream: [streaming-text, live-text, incremental-text]
|
|
100
|
+
related:
|
|
101
|
+
- ChatThreadUI
|
|
102
|
+
- Text
|
|
103
|
+
- Code
|
|
@@ -150,7 +150,13 @@ tokens:
|
|
|
150
150
|
--swatch-select-ring:
|
|
151
151
|
description: Color of the focus + selected ring when [selectable] is set.
|
|
152
152
|
a2ui:
|
|
153
|
-
rules:
|
|
153
|
+
rules:
|
|
154
|
+
- rule: 'Use to display a single color sample with optional label. For interactive color picking use <color-picker-ui>.'
|
|
155
|
+
reason: 'Swatch is read-only display; picker is input.'
|
|
156
|
+
- rule: 'Inside design-token displays or palette grids; not for general decoration.'
|
|
157
|
+
reason: 'Semantic purpose: color sample.'
|
|
158
|
+
- rule: 'Color value accepts hex, rgb, hsl, or oklch; oklch preferred for AdiaUI token alignment.'
|
|
159
|
+
reason: 'Canonical color space.'
|
|
154
160
|
anti_patterns: []
|
|
155
161
|
examples:
|
|
156
162
|
- name: basic-swatch
|
|
@@ -95,7 +95,13 @@ states:
|
|
|
95
95
|
traits: []
|
|
96
96
|
tokens: {}
|
|
97
97
|
a2ui:
|
|
98
|
-
rules:
|
|
98
|
+
rules:
|
|
99
|
+
- rule: 'Horizontal slide carousel with touch + arrow nav. Hosts arbitrary children as slides.'
|
|
100
|
+
reason: 'Slide-based content discovery.'
|
|
101
|
+
- rule: 'For tab-switched peer views use <tabs-ui>; swiper is for content browsing, not panel switching.'
|
|
102
|
+
reason: 'Different interaction model.'
|
|
103
|
+
- rule: 'Set autoplay attribute for timed-rotation; otherwise user-driven only.'
|
|
104
|
+
reason: 'Affordance knob.'
|
|
99
105
|
anti_patterns: []
|
|
100
106
|
examples:
|
|
101
107
|
- name: image-carousel
|
|
@@ -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/Switch.json",
|
|
4
4
|
"title": "Switch",
|
|
5
|
-
"description": "Toggle switch
|
|
5
|
+
"description": "Toggle switch primitive — binary on/off control where the host IS\nthe control (per ADR-0025, no native <input type=\"checkbox\"> wrapped\nunderneath). Form-bearing via UIFormElement: [name], [value],\n[checked] (reflect), [required], [disabled]. Distinct from <check-ui>\n— use switch-ui for setting-style toggles (notifications on/off,\ndark mode, feature flags), check-ui for opt-in lists, terms\nacceptance, multi-select rows.\n",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"allOf": [
|
|
8
8
|
{
|
|
@@ -95,7 +95,11 @@
|
|
|
95
95
|
"switch"
|
|
96
96
|
],
|
|
97
97
|
"name": "UISwitch",
|
|
98
|
-
"related": [
|
|
98
|
+
"related": [
|
|
99
|
+
"Check",
|
|
100
|
+
"Radio",
|
|
101
|
+
"Field"
|
|
102
|
+
],
|
|
99
103
|
"slots": {
|
|
100
104
|
"hint": {
|
|
101
105
|
"description": "Help text below the label"
|
|
@@ -4,7 +4,14 @@ tag: switch-ui
|
|
|
4
4
|
component: Switch
|
|
5
5
|
category: layout
|
|
6
6
|
version: 1
|
|
7
|
-
description:
|
|
7
|
+
description: |
|
|
8
|
+
Toggle switch primitive — binary on/off control where the host IS
|
|
9
|
+
the control (per ADR-0025, no native <input type="checkbox"> wrapped
|
|
10
|
+
underneath). Form-bearing via UIFormElement: [name], [value],
|
|
11
|
+
[checked] (reflect), [required], [disabled]. Distinct from <check-ui>
|
|
12
|
+
— use switch-ui for setting-style toggles (notifications on/off,
|
|
13
|
+
dark mode, feature flags), check-ui for opt-in lists, terms
|
|
14
|
+
acceptance, multi-select rows.
|
|
8
15
|
props:
|
|
9
16
|
name:
|
|
10
17
|
description: Form field name
|
|
@@ -86,6 +93,10 @@ a2ui:
|
|
|
86
93
|
inline via CSS attr() pattern. For settings rows (label-left, switch-right), put the descriptive text in switch-ui's own
|
|
87
94
|
[label] attribute; do not introduce a field-ui wrapper. For descriptive helper text below the switch, use <text-ui variant='caption'>
|
|
88
95
|
as a sibling — not field-ui's hint slot.
|
|
96
|
+
- rule: 'Binary on/off only — no third state. For tri-state controls use <check-ui> with [indeterminate].'
|
|
97
|
+
reason: 'State-model boundary vs check-ui.'
|
|
98
|
+
- rule: 'Use for settings toggles, feature flags, mode switches; for form gates / consent / multi-select use <check-ui> instead.'
|
|
99
|
+
reason: 'Semantic role — switch = setting, check = selection/acceptance.'
|
|
89
100
|
anti_patterns:
|
|
90
101
|
- description: Wrapping a switch-ui in field-ui. The widget already self-labels.
|
|
91
102
|
wrong: "<field-ui inline label=\"Email notifications\">\n <switch-ui></switch-ui>\n</field-ui>\n"
|
|
@@ -140,4 +151,7 @@ synonyms:
|
|
|
140
151
|
tags:
|
|
141
152
|
- Toggle
|
|
142
153
|
- Switch
|
|
143
|
-
related:
|
|
154
|
+
related:
|
|
155
|
+
- Check
|
|
156
|
+
- Radio
|
|
157
|
+
- Field
|
|
@@ -6,6 +6,19 @@ function registerCellType(name, config) {
|
|
|
6
6
|
cellTypes[name] = config;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
+
// text-overflow:ellipsis on a flex container doesn't reach text nodes —
|
|
10
|
+
// they become anonymous flex items that the container can't truncate.
|
|
11
|
+
// Wrapping in a <span> gives CSS a real element to target.
|
|
12
|
+
function _t(cell, text) {
|
|
13
|
+
let s = cell.firstElementChild;
|
|
14
|
+
if (!s || s.tagName !== 'SPAN') {
|
|
15
|
+
cell.replaceChildren();
|
|
16
|
+
s = cell.appendChild(document.createElement('span'));
|
|
17
|
+
}
|
|
18
|
+
s.textContent = text;
|
|
19
|
+
cell.title = text;
|
|
20
|
+
}
|
|
21
|
+
|
|
9
22
|
// Sort functions
|
|
10
23
|
export const sortFns = {
|
|
11
24
|
basic: (a, b) => (a < b ? -1 : a > b ? 1 : 0),
|
|
@@ -22,7 +35,7 @@ export const sortFns = {
|
|
|
22
35
|
// 1. text (default)
|
|
23
36
|
registerCellType('text', {
|
|
24
37
|
render(value, row, cell) {
|
|
25
|
-
cell
|
|
38
|
+
_t(cell, String(value ?? ''));
|
|
26
39
|
},
|
|
27
40
|
format(value) {
|
|
28
41
|
return String(value ?? '');
|
|
@@ -34,8 +47,7 @@ registerCellType('text', {
|
|
|
34
47
|
// 2. number
|
|
35
48
|
registerCellType('number', {
|
|
36
49
|
render(value, row, cell) {
|
|
37
|
-
cell.
|
|
38
|
-
value != null ? new Intl.NumberFormat().format(value) : '';
|
|
50
|
+
_t(cell, value != null ? new Intl.NumberFormat().format(value) : '');
|
|
39
51
|
},
|
|
40
52
|
format(value) {
|
|
41
53
|
return String(value ?? '');
|
|
@@ -47,13 +59,13 @@ registerCellType('number', {
|
|
|
47
59
|
// 3. currency
|
|
48
60
|
registerCellType('currency', {
|
|
49
61
|
render(value, row, cell, meta) {
|
|
50
|
-
cell
|
|
62
|
+
_t(cell,
|
|
51
63
|
value != null
|
|
52
64
|
? new Intl.NumberFormat('en-US', {
|
|
53
65
|
style: 'currency',
|
|
54
66
|
currency: meta?.currency || 'USD',
|
|
55
67
|
}).format(value)
|
|
56
|
-
: '';
|
|
68
|
+
: '');
|
|
57
69
|
},
|
|
58
70
|
format(value, row, meta) {
|
|
59
71
|
return value != null
|
|
@@ -70,7 +82,7 @@ registerCellType('currency', {
|
|
|
70
82
|
// 4. percent
|
|
71
83
|
registerCellType('percent', {
|
|
72
84
|
render(value, row, cell) {
|
|
73
|
-
cell
|
|
85
|
+
_t(cell, value != null ? `${value}%` : '');
|
|
74
86
|
},
|
|
75
87
|
format(value) {
|
|
76
88
|
return value != null ? `${value}%` : '';
|
|
@@ -84,9 +96,9 @@ const dateFmtOpts = { year: 'numeric', month: 'short', day: 'numeric' };
|
|
|
84
96
|
|
|
85
97
|
registerCellType('date', {
|
|
86
98
|
render(value, row, cell) {
|
|
87
|
-
cell
|
|
99
|
+
_t(cell, value
|
|
88
100
|
? new Intl.DateTimeFormat('en-US', dateFmtOpts).format(new Date(value))
|
|
89
|
-
: '';
|
|
101
|
+
: '');
|
|
90
102
|
},
|
|
91
103
|
format(value) {
|
|
92
104
|
return value
|
|
@@ -108,11 +120,11 @@ const datetimeFmtOpts = {
|
|
|
108
120
|
|
|
109
121
|
registerCellType('datetime', {
|
|
110
122
|
render(value, row, cell) {
|
|
111
|
-
cell
|
|
123
|
+
_t(cell, value
|
|
112
124
|
? new Intl.DateTimeFormat('en-US', datetimeFmtOpts).format(
|
|
113
125
|
new Date(value)
|
|
114
126
|
)
|
|
115
|
-
: '';
|
|
127
|
+
: '');
|
|
116
128
|
},
|
|
117
129
|
format(value) {
|
|
118
130
|
return value
|
|
@@ -188,6 +200,7 @@ registerCellType('avatar', {
|
|
|
188
200
|
const span = wrapper.querySelector('span');
|
|
189
201
|
av.setAttribute('text', String(value ?? ''));
|
|
190
202
|
span.textContent = String(value ?? '');
|
|
203
|
+
cell.title = String(value ?? '');
|
|
191
204
|
},
|
|
192
205
|
format(value) {
|
|
193
206
|
return String(value ?? '');
|
|
@@ -807,13 +807,17 @@ export class UITable extends UIElement {
|
|
|
807
807
|
cell.innerHTML = result;
|
|
808
808
|
}
|
|
809
809
|
} else if (typeof col.format === 'function') {
|
|
810
|
-
|
|
810
|
+
const t = col.format(value, data);
|
|
811
|
+
cell.appendChild(Object.assign(document.createElement('span'), { textContent: t }));
|
|
812
|
+
cell.title = t;
|
|
811
813
|
} else {
|
|
812
814
|
const typeDef = cellTypes[col.type || 'text'];
|
|
813
815
|
if (typeDef?.render) {
|
|
814
816
|
typeDef.render(value, data, cell, col.meta);
|
|
815
817
|
} else {
|
|
816
|
-
|
|
818
|
+
const t = value != null ? String(value) : '';
|
|
819
|
+
cell.appendChild(Object.assign(document.createElement('span'), { textContent: t }));
|
|
820
|
+
cell.title = t;
|
|
817
821
|
}
|
|
818
822
|
}
|
|
819
823
|
|