@adia-ai/web-components 0.0.29 → 0.0.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (295) hide show
  1. package/components/accordion/accordion.a2ui.json +1 -1
  2. package/components/accordion/accordion.js +6 -6
  3. package/components/accordion/accordion.yaml +1 -1
  4. package/components/action-list/action-list.a2ui.json +1 -1
  5. package/components/action-list/action-list.js +6 -6
  6. package/components/action-list/action-list.yaml +1 -1
  7. package/components/agent-artifact/agent-artifact.a2ui.json +1 -1
  8. package/components/agent-artifact/agent-artifact.js +4 -4
  9. package/components/agent-artifact/agent-artifact.yaml +1 -1
  10. package/components/agent-feedback-bar/agent-feedback-bar.a2ui.json +1 -1
  11. package/components/agent-feedback-bar/agent-feedback-bar.js +4 -4
  12. package/components/agent-feedback-bar/agent-feedback-bar.yaml +1 -1
  13. package/components/agent-questions/agent-questions.a2ui.json +1 -1
  14. package/components/agent-questions/agent-questions.js +4 -4
  15. package/components/agent-questions/agent-questions.yaml +1 -1
  16. package/components/agent-reasoning/agent-reasoning.a2ui.json +3 -3
  17. package/components/agent-reasoning/agent-reasoning.js +4 -4
  18. package/components/agent-reasoning/agent-reasoning.yaml +3 -3
  19. package/components/agent-suggestions/agent-suggestions.a2ui.json +1 -1
  20. package/components/agent-suggestions/agent-suggestions.js +4 -4
  21. package/components/agent-suggestions/agent-suggestions.yaml +1 -1
  22. package/components/agent-trace/agent-trace.a2ui.json +1 -1
  23. package/components/agent-trace/agent-trace.js +4 -4
  24. package/components/agent-trace/agent-trace.yaml +1 -1
  25. package/components/alert/alert.a2ui.json +1 -1
  26. package/components/alert/alert.js +4 -4
  27. package/components/alert/alert.yaml +1 -1
  28. package/components/aside/aside.a2ui.json +1 -1
  29. package/components/aside/aside.yaml +1 -1
  30. package/components/avatar/avatar.a2ui.json +1 -1
  31. package/components/avatar/avatar.js +8 -8
  32. package/components/avatar/avatar.yaml +1 -1
  33. package/components/badge/badge.a2ui.json +1 -1
  34. package/components/badge/badge.js +4 -4
  35. package/components/badge/badge.yaml +1 -1
  36. package/components/block/block.a2ui.json +1 -1
  37. package/components/block/block.js +4 -4
  38. package/components/block/block.yaml +1 -1
  39. package/components/breadcrumb/breadcrumb.a2ui.json +1 -1
  40. package/components/breadcrumb/breadcrumb.js +4 -4
  41. package/components/breadcrumb/breadcrumb.yaml +1 -1
  42. package/components/button/button.a2ui.json +1 -1
  43. package/components/button/button.js +4 -4
  44. package/components/button/button.yaml +1 -1
  45. package/components/calendar-picker/calendar-picker.a2ui.json +1 -1
  46. package/components/calendar-picker/calendar-picker.js +6 -6
  47. package/components/calendar-picker/calendar-picker.yaml +1 -1
  48. package/components/canvas/canvas.a2ui.json +1 -1
  49. package/components/canvas/canvas.js +4 -4
  50. package/components/canvas/canvas.yaml +1 -1
  51. package/components/card/card.a2ui.json +1 -1
  52. package/components/card/card.js +4 -4
  53. package/components/card/card.yaml +1 -1
  54. package/components/chart/chart.a2ui.json +1 -1
  55. package/components/chart/chart.js +5 -5
  56. package/components/chart/chart.yaml +1 -1
  57. package/components/chart-legend/chart-legend.a2ui.json +1 -1
  58. package/components/chart-legend/chart-legend.js +7 -7
  59. package/components/chart-legend/chart-legend.yaml +1 -1
  60. package/components/{chat → chat-thread}/chat-input.js +5 -5
  61. package/components/{chat/chat.a2ui.json → chat-thread/chat-thread.a2ui.json} +6 -6
  62. package/components/{chat/chat.css → chat-thread/chat-thread.css} +2 -2
  63. package/components/{chat/chat.js → chat-thread/chat-thread.js} +7 -7
  64. package/components/{chat/chat.yaml → chat-thread/chat-thread.yaml} +4 -4
  65. package/components/check/check.a2ui.json +1 -1
  66. package/components/check/check.js +5 -5
  67. package/components/check/check.yaml +1 -1
  68. package/components/code/code.a2ui.json +1 -1
  69. package/components/code/code.js +4 -4
  70. package/components/code/code.yaml +1 -1
  71. package/components/col/col.a2ui.json +1 -1
  72. package/components/col/col.js +4 -4
  73. package/components/col/col.yaml +1 -1
  74. package/components/color-picker/color-picker.a2ui.json +1 -1
  75. package/components/color-picker/color-picker.js +6 -6
  76. package/components/color-picker/color-picker.yaml +1 -1
  77. package/components/command/command.a2ui.json +1 -1
  78. package/components/command/command.js +5 -5
  79. package/components/command/command.yaml +1 -1
  80. package/components/description-list/description-list.a2ui.json +1 -1
  81. package/components/description-list/description-list.js +4 -4
  82. package/components/description-list/description-list.yaml +1 -1
  83. package/components/divider/divider.a2ui.json +1 -1
  84. package/components/divider/divider.js +4 -4
  85. package/components/divider/divider.yaml +1 -1
  86. package/components/drawer/drawer.a2ui.json +1 -1
  87. package/components/drawer/drawer.js +4 -4
  88. package/components/drawer/drawer.yaml +1 -1
  89. package/components/embed/embed.a2ui.json +1 -1
  90. package/components/embed/embed.js +4 -4
  91. package/components/embed/embed.yaml +1 -1
  92. package/components/empty-state/empty-state.a2ui.json +1 -1
  93. package/components/empty-state/empty-state.js +4 -4
  94. package/components/empty-state/empty-state.yaml +1 -1
  95. package/components/feed/feed-item.yaml +2 -2
  96. package/components/feed/feed.a2ui.json +2 -2
  97. package/components/feed/feed.css +12 -3
  98. package/components/feed/feed.js +22 -22
  99. package/components/feed/feed.yaml +2 -2
  100. package/components/field/field.a2ui.json +1 -1
  101. package/components/field/field.js +10 -10
  102. package/components/field/field.yaml +2 -2
  103. package/components/footer/footer.a2ui.json +1 -1
  104. package/components/footer/footer.yaml +1 -1
  105. package/components/grid/grid.a2ui.json +1 -1
  106. package/components/grid/grid.js +4 -4
  107. package/components/grid/grid.yaml +1 -1
  108. package/components/header/header.a2ui.json +1 -1
  109. package/components/header/header.yaml +1 -1
  110. package/components/heatmap/heatmap.a2ui.json +1 -1
  111. package/components/heatmap/heatmap.js +4 -4
  112. package/components/heatmap/heatmap.yaml +1 -1
  113. package/components/icon/icon.a2ui.json +1 -1
  114. package/components/icon/icon.js +4 -4
  115. package/components/icon/icon.yaml +1 -1
  116. package/components/image/image.a2ui.json +1 -1
  117. package/components/image/image.js +4 -4
  118. package/components/image/image.yaml +1 -1
  119. package/components/index.js +89 -85
  120. package/components/input/input.a2ui.json +1 -1
  121. package/components/input/input.js +7 -7
  122. package/components/input/input.yaml +1 -1
  123. package/components/inspector/inspector.a2ui.json +1 -1
  124. package/components/inspector/inspector.js +4 -4
  125. package/components/inspector/inspector.yaml +1 -1
  126. package/components/kbd/kbd.a2ui.json +1 -1
  127. package/components/kbd/kbd.js +4 -4
  128. package/components/kbd/kbd.yaml +1 -1
  129. package/components/list/list.a2ui.json +1 -1
  130. package/components/list/list.js +6 -6
  131. package/components/list/list.yaml +1 -1
  132. package/components/menu/menu.a2ui.json +1 -1
  133. package/components/menu/menu.js +8 -8
  134. package/components/menu/menu.yaml +1 -1
  135. package/components/modal/modal.a2ui.json +1 -1
  136. package/components/modal/modal.js +4 -4
  137. package/components/modal/modal.yaml +1 -1
  138. package/components/nav/nav.a2ui.json +98 -0
  139. package/components/nav/nav.css +133 -0
  140. package/components/nav/nav.js +140 -0
  141. package/components/nav/nav.test.js +428 -0
  142. package/components/nav/nav.yaml +114 -0
  143. package/components/nav-group/nav-group.a2ui.json +100 -0
  144. package/components/nav-group/nav-group.css +317 -0
  145. package/components/nav-group/nav-group.js +142 -0
  146. package/components/nav-group/nav-group.yaml +69 -0
  147. package/components/nav-item/nav-item.a2ui.json +106 -0
  148. package/components/nav-item/nav-item.css +194 -0
  149. package/components/nav-item/nav-item.js +76 -0
  150. package/components/nav-item/nav-item.yaml +73 -0
  151. package/components/noodles/noodles.a2ui.json +1 -1
  152. package/components/noodles/noodles.js +4 -4
  153. package/components/noodles/noodles.yaml +1 -1
  154. package/components/option-card/option-card.a2ui.json +1 -1
  155. package/components/option-card/option-card.js +6 -6
  156. package/components/option-card/option-card.yaml +1 -1
  157. package/components/otp-input/otp-input.a2ui.json +1 -1
  158. package/components/otp-input/otp-input.js +5 -5
  159. package/components/otp-input/otp-input.yaml +1 -1
  160. package/components/page/page.a2ui.json +3 -3
  161. package/components/page/page.js +4 -4
  162. package/components/page/page.yaml +3 -3
  163. package/components/pagination/pagination.a2ui.json +1 -1
  164. package/components/pagination/pagination.js +4 -4
  165. package/components/pagination/pagination.yaml +1 -1
  166. package/components/pane/pane.a2ui.json +1 -1
  167. package/components/pane/pane.js +4 -4
  168. package/components/pane/pane.yaml +1 -1
  169. package/components/pipeline-status/pipeline-status.a2ui.json +1 -1
  170. package/components/pipeline-status/pipeline-status.js +4 -4
  171. package/components/pipeline-status/pipeline-status.yaml +1 -1
  172. package/components/popover/popover.a2ui.json +1 -1
  173. package/components/popover/popover.js +4 -4
  174. package/components/popover/popover.yaml +1 -1
  175. package/components/progress/progress.a2ui.json +1 -1
  176. package/components/progress/progress.js +4 -4
  177. package/components/progress/progress.yaml +1 -1
  178. package/components/progress-row/progress-row.a2ui.json +1 -1
  179. package/components/progress-row/progress-row.js +4 -4
  180. package/components/progress-row/progress-row.yaml +1 -1
  181. package/components/radio/radio.a2ui.json +1 -1
  182. package/components/radio/radio.js +5 -5
  183. package/components/radio/radio.yaml +1 -1
  184. package/components/range/range.a2ui.json +1 -1
  185. package/components/range/range.js +7 -7
  186. package/components/range/range.yaml +1 -1
  187. package/components/rating/rating.a2ui.json +1 -1
  188. package/components/rating/rating.js +6 -6
  189. package/components/rating/rating.yaml +1 -1
  190. package/components/richtext/richtext.a2ui.json +1 -1
  191. package/components/richtext/richtext.js +4 -4
  192. package/components/richtext/richtext.yaml +1 -1
  193. package/components/row/row.a2ui.json +1 -1
  194. package/components/row/row.js +4 -4
  195. package/components/row/row.yaml +1 -1
  196. package/components/search/search.a2ui.json +1 -1
  197. package/components/search/search.js +5 -5
  198. package/components/search/search.yaml +1 -1
  199. package/components/section/section.a2ui.json +1 -1
  200. package/components/section/section.yaml +1 -1
  201. package/components/segment/segment.a2ui.json +1 -1
  202. package/components/segment/segment.js +4 -4
  203. package/components/segment/segment.yaml +1 -1
  204. package/components/segmented/segmented.a2ui.json +1 -1
  205. package/components/segmented/segmented.css +6 -0
  206. package/components/segmented/segmented.js +7 -7
  207. package/components/segmented/segmented.yaml +1 -1
  208. package/components/select/select.a2ui.json +1 -1
  209. package/components/select/select.js +5 -5
  210. package/components/select/select.yaml +1 -1
  211. package/components/skeleton/skeleton.a2ui.json +1 -1
  212. package/components/skeleton/skeleton.js +4 -4
  213. package/components/skeleton/skeleton.yaml +1 -1
  214. package/components/slider/slider.a2ui.json +1 -1
  215. package/components/slider/slider.js +7 -7
  216. package/components/slider/slider.yaml +1 -1
  217. package/components/stack/stack.a2ui.json +1 -1
  218. package/components/stack/stack.js +4 -4
  219. package/components/stack/stack.yaml +1 -1
  220. package/components/stat/stat.a2ui.json +1 -1
  221. package/components/stat/stat.js +4 -4
  222. package/components/stat/stat.yaml +1 -1
  223. package/components/step-progress/step-progress.a2ui.json +111 -0
  224. package/components/step-progress/step-progress.css +61 -0
  225. package/components/step-progress/step-progress.js +88 -0
  226. package/components/step-progress/step-progress.test.js +118 -0
  227. package/components/step-progress/step-progress.yaml +93 -0
  228. package/components/stepper/stepper.a2ui.json +1 -1
  229. package/components/stepper/stepper.js +6 -6
  230. package/components/stepper/stepper.yaml +1 -1
  231. package/components/stream/stream.a2ui.json +1 -1
  232. package/components/stream/stream.js +4 -4
  233. package/components/stream/stream.yaml +1 -1
  234. package/components/swatch/swatch.a2ui.json +1 -1
  235. package/components/swatch/swatch.js +4 -4
  236. package/components/swatch/swatch.yaml +1 -1
  237. package/components/swiper/swiper.a2ui.json +1 -1
  238. package/components/swiper/swiper.js +4 -4
  239. package/components/swiper/swiper.yaml +1 -1
  240. package/components/switch/switch.a2ui.json +1 -1
  241. package/components/switch/switch.js +5 -5
  242. package/components/switch/switch.yaml +1 -1
  243. package/components/table/table.a2ui.json +1 -1
  244. package/components/table/table.js +4 -4
  245. package/components/table/table.yaml +1 -1
  246. package/components/table-toolbar/table-toolbar.a2ui.json +1 -1
  247. package/components/table-toolbar/table-toolbar.js +4 -4
  248. package/components/table-toolbar/table-toolbar.yaml +1 -1
  249. package/components/tabs/tab.js +4 -4
  250. package/components/tabs/tabs.a2ui.json +1 -1
  251. package/components/tabs/tabs.js +5 -5
  252. package/components/tabs/tabs.yaml +1 -1
  253. package/components/tag/tag.a2ui.json +1 -1
  254. package/components/tag/tag.js +4 -4
  255. package/components/tag/tag.yaml +1 -1
  256. package/components/text/text.a2ui.json +1 -1
  257. package/components/text/text.js +4 -4
  258. package/components/text/text.yaml +1 -1
  259. package/components/textarea/textarea.a2ui.json +1 -1
  260. package/components/textarea/textarea.js +5 -5
  261. package/components/textarea/textarea.yaml +1 -1
  262. package/components/timeline/timeline.a2ui.json +1 -1
  263. package/components/timeline/timeline.js +6 -6
  264. package/components/timeline/timeline.yaml +1 -1
  265. package/components/toast/toast.a2ui.json +1 -1
  266. package/components/toast/toast.js +18 -18
  267. package/components/toast/toast.yaml +1 -1
  268. package/components/toggle-group/toggle-group.a2ui.json +1 -1
  269. package/components/toggle-group/toggle-group.js +6 -6
  270. package/components/toggle-group/toggle-group.yaml +1 -1
  271. package/components/toolbar/toolbar.a2ui.json +1 -1
  272. package/components/toolbar/toolbar.js +6 -6
  273. package/components/toolbar/toolbar.yaml +1 -1
  274. package/components/tooltip/tooltip.a2ui.json +1 -1
  275. package/components/tooltip/tooltip.js +7 -7
  276. package/components/tooltip/tooltip.yaml +1 -1
  277. package/components/tree/tree.a2ui.json +1 -1
  278. package/components/tree/tree.js +6 -6
  279. package/components/tree/tree.yaml +1 -1
  280. package/components/upload/upload.a2ui.json +1 -1
  281. package/components/upload/upload.js +6 -6
  282. package/components/upload/upload.yaml +1 -1
  283. package/core/element.js +4 -4
  284. package/core/element.test.js +18 -18
  285. package/core/form.js +9 -9
  286. package/core/index.js +2 -2
  287. package/core/provider.js +7 -7
  288. package/core/template.js +1 -1
  289. package/index.css +1 -1
  290. package/index.js +10 -8
  291. package/package.json +1 -1
  292. package/styles/components.css +11 -6
  293. package/styles/resets.css +1 -1
  294. package/traits/define.js +2 -2
  295. /package/components/{chat → chat-thread}/chat-input.css +0 -0
@@ -11,18 +11,18 @@
11
11
  * external label-row composition (hint, error, action slot, etc.).
12
12
  */
13
13
 
14
- import { AdiaFormElement } from '../../core/form.js';
14
+ import { UIFormElement } from '../../core/form.js';
15
15
 
16
- class AdiaSlider extends AdiaFormElement {
17
- // Opt out of AdiaFormElement's per-control `label` deprecation warning.
16
+ class UISlider extends UIFormElement {
17
+ // Opt out of UIFormElement's per-control `label` deprecation warning.
18
18
  // slider-ui's `label` is a first-class API rendering as the in-header
19
19
  // caption next to the value, with `aria-label` wired on the host for
20
20
  // a11y. Same opt-out rationale as input-ui and range-ui.
21
21
  static labelDeprecated = false;
22
22
 
23
23
  static properties = {
24
- ...AdiaFormElement.properties,
25
- /** value: Number — overrides AdiaFormElement.value (String); syncs as string on form submit. */
24
+ ...UIFormElement.properties,
25
+ /** value: Number — overrides UIFormElement.value (String); syncs as string on form submit. */
26
26
  value: { type: Number, default: 50, reflect: true },
27
27
  min: { type: Number, default: 0, reflect: true },
28
28
  max: { type: Number, default: 100, reflect: true },
@@ -169,6 +169,6 @@ class AdiaSlider extends AdiaFormElement {
169
169
  this.#thumbEl = null;
170
170
  }
171
171
  }
172
- customElements.define('slider-ui', AdiaSlider);
172
+ customElements.define('slider-ui', UISlider);
173
173
 
174
- export { AdiaSlider };
174
+ export { UISlider };
@@ -1,7 +1,7 @@
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: AdiaSlider
4
+ name: UISlider
5
5
  tag: slider-ui
6
6
  component: Slider
7
7
  category: input
@@ -40,7 +40,7 @@
40
40
  "keywords": [
41
41
  "stack"
42
42
  ],
43
- "name": "AdiaStack",
43
+ "name": "UIStack",
44
44
  "related": [],
45
45
  "slots": {
46
46
  "default": {
@@ -5,14 +5,14 @@
5
5
  * <stack-ui align="center">...</stack-ui>
6
6
  */
7
7
 
8
- import { AdiaElement } from '../../core/element.js';
8
+ import { UIElement } from '../../core/element.js';
9
9
 
10
- class AdiaStack extends AdiaElement {
10
+ class UIStack extends UIElement {
11
11
  static properties = {
12
12
  align: { type: String, default: 'center', reflect: true },
13
13
  };
14
14
  static template = () => null;
15
15
  }
16
- customElements.define('stack-ui', AdiaStack);
16
+ customElements.define('stack-ui', UIStack);
17
17
 
18
- export { AdiaStack };
18
+ export { UIStack };
@@ -1,7 +1,7 @@
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: AdiaStack
4
+ name: UIStack
5
5
  tag: stack-ui
6
6
  component: Stack
7
7
  category: layout
@@ -77,7 +77,7 @@
77
77
  "performance",
78
78
  "scoreboard"
79
79
  ],
80
- "name": "AdiaStat",
80
+ "name": "UIStat",
81
81
  "related": [],
82
82
  "slots": {
83
83
  "change": {
@@ -8,9 +8,9 @@
8
8
  * Trend: up, down, neutral (colors the change badge accordingly)
9
9
  */
10
10
 
11
- import { AdiaElement } from '../../core/element.js';
11
+ import { UIElement } from '../../core/element.js';
12
12
 
13
- class AdiaStat extends AdiaElement {
13
+ class UIStat extends UIElement {
14
14
  static properties = {
15
15
  value: { type: String, default: '', reflect: true },
16
16
  label: { type: String, default: '', reflect: true },
@@ -86,6 +86,6 @@ class AdiaStat extends AdiaElement {
86
86
  this.#iconEl = null;
87
87
  }
88
88
  }
89
- customElements.define('stat-ui', AdiaStat);
89
+ customElements.define('stat-ui', UIStat);
90
90
 
91
- export { AdiaStat };
91
+ export { UIStat };
@@ -1,7 +1,7 @@
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: AdiaStat
4
+ name: UIStat
5
5
  tag: stat-ui
6
6
  component: Stat
7
7
  category: display
@@ -0,0 +1,111 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://adiaui.dev/a2ui/v0_9/components/StepProgress.json",
4
+ "title": "StepProgress",
5
+ "description": "Discrete-dash step-progress indicator. One <span> dash per step in\n[total]; the first [value] dashes are filled with --a-accent. Used\nin multi-step flows (registration, onboarding, wizards). Replaces\nthe bespoke `[data-onb-progress]` + `[data-reg-progress]` markup\nthat lived in onboarding.css + registration.css with a single\nprimitive.\n",
6
+ "type": "object",
7
+ "allOf": [
8
+ {
9
+ "$ref": "common_types.json#/$defs/ComponentCommon"
10
+ },
11
+ {
12
+ "$ref": "common_types.json#/$defs/CatalogComponentCommon"
13
+ }
14
+ ],
15
+ "properties": {
16
+ "caption": {
17
+ "description": "Optional caption text rendered above the track (e.g. 'Step 3 of 10', 'Step 3 of 10 · Optional', 'All steps complete'). Hidden when empty.",
18
+ "type": "string",
19
+ "default": ""
20
+ },
21
+ "component": {
22
+ "const": "StepProgress"
23
+ },
24
+ "total": {
25
+ "description": "Total number of steps. The track renders this many dashes.",
26
+ "type": "number",
27
+ "default": 0
28
+ },
29
+ "value": {
30
+ "description": "Number of steps completed (1-indexed). Clamped to [0, total].",
31
+ "type": "number",
32
+ "default": 0
33
+ }
34
+ },
35
+ "required": [
36
+ "component"
37
+ ],
38
+ "unevaluatedProperties": false,
39
+ "x-adiaui": {
40
+ "anti_patterns": [],
41
+ "category": "feedback",
42
+ "events": {},
43
+ "examples": [
44
+ {
45
+ "description": "3 of 10 steps complete with caption.",
46
+ "a2ui": "[\n {\n \"id\": \"root\",\n \"component\": \"StepProgress\",\n \"value\": 3,\n \"total\": 10,\n \"caption\": \"Step 3 of 10\"\n }\n]",
47
+ "name": "in-progress"
48
+ },
49
+ {
50
+ "description": "All steps complete.",
51
+ "a2ui": "[\n {\n \"id\": \"root\",\n \"component\": \"StepProgress\",\n \"value\": 10,\n \"total\": 10,\n \"caption\": \"All steps complete\"\n }\n]",
52
+ "name": "complete"
53
+ },
54
+ {
55
+ "description": "A 9-of-10 step that's optional.",
56
+ "a2ui": "[\n {\n \"id\": \"root\",\n \"component\": \"StepProgress\",\n \"value\": 9,\n \"total\": 10,\n \"caption\": \"Step 9 of 10 · Optional\"\n }\n]",
57
+ "name": "optional-step"
58
+ }
59
+ ],
60
+ "keywords": [
61
+ "progress",
62
+ "step",
63
+ "wizard",
64
+ "onboarding",
65
+ "registration",
66
+ "multi-step",
67
+ "indicator"
68
+ ],
69
+ "name": "UIStepProgress",
70
+ "related": [
71
+ "progress-ui",
72
+ "stepper-ui"
73
+ ],
74
+ "slots": {
75
+ "caption": {
76
+ "description": "Optional override of the auto-minted caption (use for rich content like icon + text). When present, the [caption] attribute is ignored."
77
+ },
78
+ "track": {
79
+ "description": "Optional override of the auto-minted track (rare — use only when the dash structure needs to differ)."
80
+ }
81
+ },
82
+ "states": [
83
+ {
84
+ "description": "value=0; no dashes filled.",
85
+ "name": "empty"
86
+ },
87
+ {
88
+ "description": "0 < value < total; some dashes filled.",
89
+ "name": "in-progress"
90
+ },
91
+ {
92
+ "description": "value=total; all dashes filled.",
93
+ "name": "complete"
94
+ }
95
+ ],
96
+ "synonyms": {
97
+ "step": [
98
+ "stage",
99
+ "phase"
100
+ ],
101
+ "total": [
102
+ "count",
103
+ "length"
104
+ ]
105
+ },
106
+ "tag": "step-progress-ui",
107
+ "tokens": {},
108
+ "traits": [],
109
+ "version": 1
110
+ }
111
+ }
@@ -0,0 +1,61 @@
1
+ /* ═══════════════════════════════════════════
2
+ step-progress-ui — Discrete-dash step progress indicator
3
+ Replaces bespoke `[data-onb-progress]` + `[data-reg-progress]` markup.
4
+ ═══════════════════════════════════════════ */
5
+
6
+ @scope (step-progress-ui) {
7
+ :where(:scope) {
8
+ --step-progress-gap: var(--a-space-2);
9
+ --step-progress-track-gap: var(--a-space-1);
10
+ --step-progress-dash-h: 4px;
11
+ --step-progress-dash-radius: var(--a-radius-full);
12
+ --step-progress-dash-bg: var(--a-border-subtle);
13
+ --step-progress-dash-bg-active: var(--a-accent);
14
+ --step-progress-caption-fg: var(--a-fg-muted);
15
+ --step-progress-caption-size: var(--a-ui-sm);
16
+
17
+ /* Sizing — match the bespoke flex shape in registration + onboarding
18
+ (flex:0 1 18rem; min-width:10rem). Consumers can override. */
19
+ --step-progress-flex: 0 1 18rem;
20
+ --step-progress-min-width: 10rem;
21
+ }
22
+
23
+ :scope {
24
+ display: flex;
25
+ flex-direction: column;
26
+ gap: var(--step-progress-gap);
27
+ flex: var(--step-progress-flex);
28
+ min-width: var(--step-progress-min-width);
29
+ }
30
+
31
+ /* Caption row — small, muted text. Hidden when no caption provided
32
+ (the [hidden] attribute is set by the JS). */
33
+ [slot="caption"] {
34
+ color: var(--step-progress-caption-fg);
35
+ font-size: var(--step-progress-caption-size);
36
+ line-height: 1.4;
37
+ }
38
+
39
+ [slot="caption"][hidden] {
40
+ display: none;
41
+ }
42
+
43
+ /* Discrete-dash track — one <span> per step. Each dash is a flex
44
+ item so the track scales with the column width. */
45
+ [slot="track"] {
46
+ display: flex;
47
+ gap: var(--step-progress-track-gap);
48
+ }
49
+
50
+ [slot="track"] > span {
51
+ flex: 1;
52
+ height: var(--step-progress-dash-h);
53
+ border-radius: var(--step-progress-dash-radius);
54
+ background: var(--step-progress-dash-bg);
55
+ transition: background var(--a-duration-fast, 150ms) var(--a-easing, ease);
56
+ }
57
+
58
+ [slot="track"] > span[data-active] {
59
+ background: var(--step-progress-dash-bg-active);
60
+ }
61
+ }
@@ -0,0 +1,88 @@
1
+ /**
2
+ * <step-progress-ui value="3" total="10" caption="Step 3 of 10"></step-progress-ui>
3
+ * <step-progress-ui value="3" total="10"></step-progress-ui> <!-- no caption -->
4
+ * <step-progress-ui value="10" total="10" caption="All steps complete"></step-progress-ui>
5
+ *
6
+ * Discrete-dash step progress indicator. One dash per step in the
7
+ * total; the first `value` dashes carry [data-active] and paint with
8
+ * --a-accent. Used in registration + onboarding flows; replaces the
9
+ * bespoke `[data-onb-progress]` / `[data-reg-progress]` markup.
10
+ *
11
+ * Primitive shape (per ROADMAP § Done):
12
+ * `<step-progress-ui value="N" total="M" caption="...">`
13
+ *
14
+ * Caption is optional; pass via attribute. Free-form text passes
15
+ * straight through; `<text-ui>` styling can be replicated with
16
+ * default-slot HTML if needed (the auto-mint uses plain text).
17
+ */
18
+
19
+ import { UIElement } from '../../core/element.js';
20
+
21
+ class UIStepProgress extends UIElement {
22
+ static properties = {
23
+ value: { type: Number, default: 0, reflect: true },
24
+ total: { type: Number, default: 0, reflect: true },
25
+ caption: { type: String, default: '', reflect: true },
26
+ };
27
+
28
+ static template = () => null;
29
+
30
+ #captionEl = null;
31
+ #trackEl = null;
32
+
33
+ connected() {
34
+ this.setAttribute('role', 'progressbar');
35
+ this.setAttribute('aria-valuemin', '0');
36
+
37
+ // Auto-mint internal structure if the consumer didn't provide custom slots.
38
+ if (!this.querySelector(':scope > [slot="caption"]') && !this.querySelector(':scope > [slot="track"]')) {
39
+ this.#captionEl = document.createElement('span');
40
+ this.#captionEl.setAttribute('slot', 'caption');
41
+ this.appendChild(this.#captionEl);
42
+
43
+ this.#trackEl = document.createElement('div');
44
+ this.#trackEl.setAttribute('slot', 'track');
45
+ this.appendChild(this.#trackEl);
46
+ } else {
47
+ this.#captionEl = this.querySelector(':scope > [slot="caption"]');
48
+ this.#trackEl = this.querySelector(':scope > [slot="track"]');
49
+ }
50
+ }
51
+
52
+ render() {
53
+ const total = Math.max(0, this.total | 0);
54
+ const clamped = Math.max(0, Math.min(total, this.value | 0));
55
+
56
+ this.setAttribute('aria-valuemax', String(total));
57
+ this.setAttribute('aria-valuenow', String(clamped));
58
+
59
+ // Caption — text content if attribute set; cleared otherwise.
60
+ // Skip if the consumer passed in a custom caption slot (preserve their content).
61
+ if (this.#captionEl && !this.#captionEl.dataset.custom) {
62
+ this.#captionEl.textContent = this.caption || '';
63
+ this.#captionEl.toggleAttribute('hidden', !this.caption);
64
+ }
65
+
66
+ // Track — sync span count with `total`; mark first `value` as active.
67
+ if (this.#trackEl) {
68
+ const existing = this.#trackEl.children.length;
69
+ while (this.#trackEl.children.length < total) {
70
+ this.#trackEl.appendChild(document.createElement('span'));
71
+ }
72
+ while (this.#trackEl.children.length > total) {
73
+ this.#trackEl.lastElementChild.remove();
74
+ }
75
+ for (let i = 0; i < this.#trackEl.children.length; i++) {
76
+ this.#trackEl.children[i].toggleAttribute('data-active', i < clamped);
77
+ }
78
+ }
79
+ }
80
+
81
+ disconnected() {
82
+ this.#captionEl = null;
83
+ this.#trackEl = null;
84
+ }
85
+ }
86
+
87
+ customElements.define('step-progress-ui', UIStepProgress);
88
+ export { UIStepProgress };
@@ -0,0 +1,118 @@
1
+ import { describe, it, expect, beforeEach } from 'vitest';
2
+ import '../../core/element.js';
3
+ import './step-progress.js';
4
+
5
+ const tick = () => new Promise((r) => queueMicrotask(r));
6
+
7
+ function mount(html) {
8
+ const wrap = document.createElement('div');
9
+ wrap.innerHTML = html;
10
+ document.body.appendChild(wrap);
11
+ return wrap.firstElementChild;
12
+ }
13
+
14
+ describe('step-progress-ui', () => {
15
+ beforeEach(() => { document.body.innerHTML = ''; });
16
+
17
+ it('registers as a custom element', () => {
18
+ expect(customElements.get('step-progress-ui')).toBeDefined();
19
+ });
20
+
21
+ it('sets role=progressbar + aria-value{min,max,now}', () => {
22
+ const el = mount('<step-progress-ui value="3" total="10"></step-progress-ui>');
23
+ expect(el.getAttribute('role')).toBe('progressbar');
24
+ expect(el.getAttribute('aria-valuemin')).toBe('0');
25
+ expect(el.getAttribute('aria-valuemax')).toBe('10');
26
+ expect(el.getAttribute('aria-valuenow')).toBe('3');
27
+ });
28
+
29
+ it('auto-mints a caption span + track div', () => {
30
+ const el = mount('<step-progress-ui value="2" total="5" caption="Step 2 of 5"></step-progress-ui>');
31
+ expect(el.querySelector(':scope > [slot="caption"]')).not.toBeNull();
32
+ expect(el.querySelector(':scope > [slot="track"]')).not.toBeNull();
33
+ });
34
+
35
+ it('renders one <span> per step in the track', () => {
36
+ const el = mount('<step-progress-ui value="2" total="5"></step-progress-ui>');
37
+ const dashes = el.querySelectorAll(':scope > [slot="track"] > span');
38
+ expect(dashes.length).toBe(5);
39
+ });
40
+
41
+ it('marks the first `value` dashes as [data-active]', () => {
42
+ const el = mount('<step-progress-ui value="3" total="5"></step-progress-ui>');
43
+ const dashes = el.querySelectorAll(':scope > [slot="track"] > span');
44
+ expect(dashes[0].hasAttribute('data-active')).toBe(true);
45
+ expect(dashes[1].hasAttribute('data-active')).toBe(true);
46
+ expect(dashes[2].hasAttribute('data-active')).toBe(true);
47
+ expect(dashes[3].hasAttribute('data-active')).toBe(false);
48
+ expect(dashes[4].hasAttribute('data-active')).toBe(false);
49
+ });
50
+
51
+ it('renders the caption text in the caption slot', () => {
52
+ const el = mount('<step-progress-ui value="3" total="10" caption="Step 3 of 10"></step-progress-ui>');
53
+ expect(el.querySelector('[slot="caption"]').textContent).toBe('Step 3 of 10');
54
+ });
55
+
56
+ it('hides the caption span when caption is empty', () => {
57
+ const el = mount('<step-progress-ui value="2" total="5"></step-progress-ui>');
58
+ expect(el.querySelector('[slot="caption"]').hasAttribute('hidden')).toBe(true);
59
+ });
60
+
61
+ it('updates the dash + aria when value changes', async () => {
62
+ const el = mount('<step-progress-ui value="2" total="5"></step-progress-ui>');
63
+ el.value = 4;
64
+ await tick();
65
+ const dashes = el.querySelectorAll(':scope > [slot="track"] > span');
66
+ expect(el.getAttribute('aria-valuenow')).toBe('4');
67
+ expect(dashes[3].hasAttribute('data-active')).toBe(true);
68
+ expect(dashes[4].hasAttribute('data-active')).toBe(false);
69
+ });
70
+
71
+ it('grows the dash count when total increases', async () => {
72
+ const el = mount('<step-progress-ui value="2" total="5"></step-progress-ui>');
73
+ expect(el.querySelectorAll('[slot="track"] > span').length).toBe(5);
74
+ el.total = 8;
75
+ await tick();
76
+ expect(el.querySelectorAll('[slot="track"] > span').length).toBe(8);
77
+ });
78
+
79
+ it('shrinks the dash count when total decreases', async () => {
80
+ const el = mount('<step-progress-ui value="2" total="8"></step-progress-ui>');
81
+ expect(el.querySelectorAll('[slot="track"] > span').length).toBe(8);
82
+ el.total = 4;
83
+ await tick();
84
+ expect(el.querySelectorAll('[slot="track"] > span').length).toBe(4);
85
+ });
86
+
87
+ it('clamps value to [0, total]', () => {
88
+ const el = mount('<step-progress-ui value="20" total="5"></step-progress-ui>');
89
+ const dashes = el.querySelectorAll(':scope > [slot="track"] > span');
90
+ expect(el.getAttribute('aria-valuenow')).toBe('5');
91
+ for (const dash of dashes) {
92
+ expect(dash.hasAttribute('data-active')).toBe(true);
93
+ }
94
+ });
95
+
96
+ it('handles value=0 (empty state) — no dashes active', () => {
97
+ const el = mount('<step-progress-ui value="0" total="5"></step-progress-ui>');
98
+ const dashes = el.querySelectorAll(':scope > [slot="track"] > span');
99
+ expect(el.getAttribute('aria-valuenow')).toBe('0');
100
+ for (const dash of dashes) {
101
+ expect(dash.hasAttribute('data-active')).toBe(false);
102
+ }
103
+ });
104
+
105
+ it('handles value=total (complete state) — all dashes active', () => {
106
+ const el = mount('<step-progress-ui value="5" total="5" caption="All steps complete"></step-progress-ui>');
107
+ const dashes = el.querySelectorAll(':scope > [slot="track"] > span');
108
+ for (const dash of dashes) {
109
+ expect(dash.hasAttribute('data-active')).toBe(true);
110
+ }
111
+ expect(el.querySelector('[slot="caption"]').textContent).toBe('All steps complete');
112
+ });
113
+
114
+ it('survives disconnect without throwing', () => {
115
+ const el = mount('<step-progress-ui value="3" total="10"></step-progress-ui>');
116
+ expect(() => el.remove()).not.toThrow();
117
+ });
118
+ });
@@ -0,0 +1,93 @@
1
+ $schema: ../../../../scripts/schemas/component.yaml.schema.json
2
+ name: UIStepProgress
3
+ tag: step-progress-ui
4
+ component: StepProgress
5
+ category: feedback
6
+ version: 1
7
+ description: |
8
+ Discrete-dash step-progress indicator. One <span> dash per step in
9
+ [total]; the first [value] dashes are filled with --a-accent. Used
10
+ in multi-step flows (registration, onboarding, wizards). Replaces
11
+ the bespoke `[data-onb-progress]` + `[data-reg-progress]` markup
12
+ that lived in onboarding.css + registration.css with a single
13
+ primitive.
14
+
15
+ props:
16
+ value:
17
+ type: number
18
+ default: 0
19
+ description: "Number of steps completed (1-indexed). Clamped to [0, total]."
20
+ total:
21
+ type: number
22
+ default: 0
23
+ description: "Total number of steps. The track renders this many dashes."
24
+ caption:
25
+ type: string
26
+ default: ''
27
+ description: "Optional caption text rendered above the track (e.g. 'Step 3 of 10', 'Step 3 of 10 · Optional', 'All steps complete'). Hidden when empty."
28
+
29
+ events: {}
30
+
31
+ slots:
32
+ caption:
33
+ description: "Optional override of the auto-minted caption (use for rich content like icon + text). When present, the [caption] attribute is ignored."
34
+ track:
35
+ description: "Optional override of the auto-minted track (rare — use only when the dash structure needs to differ)."
36
+
37
+ states:
38
+ - name: empty
39
+ description: "value=0; no dashes filled."
40
+ - name: in-progress
41
+ description: "0 < value < total; some dashes filled."
42
+ - name: complete
43
+ description: "value=total; all dashes filled."
44
+
45
+ traits: []
46
+ tokens: {}
47
+ a2ui:
48
+ rules: []
49
+ anti_patterns: []
50
+
51
+ examples:
52
+ - name: in-progress
53
+ description: 3 of 10 steps complete with caption.
54
+ a2ui: >-
55
+ [
56
+ {
57
+ "id": "root",
58
+ "component": "StepProgress",
59
+ "value": 3,
60
+ "total": 10,
61
+ "caption": "Step 3 of 10"
62
+ }
63
+ ]
64
+ - name: complete
65
+ description: All steps complete.
66
+ a2ui: >-
67
+ [
68
+ {
69
+ "id": "root",
70
+ "component": "StepProgress",
71
+ "value": 10,
72
+ "total": 10,
73
+ "caption": "All steps complete"
74
+ }
75
+ ]
76
+ - name: optional-step
77
+ description: A 9-of-10 step that's optional.
78
+ a2ui: >-
79
+ [
80
+ {
81
+ "id": "root",
82
+ "component": "StepProgress",
83
+ "value": 9,
84
+ "total": 10,
85
+ "caption": "Step 9 of 10 · Optional"
86
+ }
87
+ ]
88
+
89
+ keywords: [progress, step, wizard, onboarding, registration, multi-step, indicator]
90
+ synonyms:
91
+ step: [stage, phase]
92
+ total: [count, length]
93
+ related: [progress-ui, stepper-ui]
@@ -50,7 +50,7 @@
50
50
  "onboarding",
51
51
  "multi-step"
52
52
  ],
53
- "name": "AdiaStepper",
53
+ "name": "UIStepper",
54
54
  "related": [
55
55
  "timeline-ui",
56
56
  "progress-ui"
@@ -20,9 +20,9 @@
20
20
  * orientation — horizontal (default) | vertical
21
21
  */
22
22
 
23
- import { AdiaElement } from '../../core/element.js';
23
+ import { UIElement } from '../../core/element.js';
24
24
 
25
- class AdiaStepper extends AdiaElement {
25
+ class UIStepper extends UIElement {
26
26
  static properties = {
27
27
  step: { type: Number, default: 0, reflect: true },
28
28
  orientation: { type: String, default: 'horizontal', reflect: true },
@@ -69,11 +69,11 @@ class AdiaStepper extends AdiaElement {
69
69
  }
70
70
  }
71
71
 
72
- customElements.define('stepper-ui', AdiaStepper);
72
+ customElements.define('stepper-ui', UIStepper);
73
73
 
74
74
  // ── Item ───────────────────────────────────────────────────────
75
75
 
76
- class AdiaStepperItem extends AdiaElement {
76
+ class UIStepperItem extends UIElement {
77
77
  static properties = {
78
78
  text: { type: String, default: '', reflect: true },
79
79
  description: { type: String, default: '', reflect: true },
@@ -116,6 +116,6 @@ class AdiaStepperItem extends AdiaElement {
116
116
  }
117
117
  }
118
118
 
119
- customElements.define('stepper-item-ui', AdiaStepperItem);
119
+ customElements.define('stepper-item-ui', UIStepperItem);
120
120
 
121
- export { AdiaStepper, AdiaStepperItem };
121
+ export { UIStepper, UIStepperItem };
@@ -1,7 +1,7 @@
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: AdiaStepper
4
+ name: UIStepper
5
5
  tag: stepper-ui
6
6
  component: Stepper
7
7
  category: navigation
@@ -60,7 +60,7 @@
60
60
  "keywords": [
61
61
  "stream"
62
62
  ],
63
- "name": "AdiaStream",
63
+ "name": "UIStream",
64
64
  "related": [],
65
65
  "slots": {
66
66
  "default": {