@adia-ai/web-components 0.8.39 → 0.8.41

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 (424) hide show
  1. package/CHANGELOG.md +59 -0
  2. package/MIGRATION.md +1269 -3
  3. package/README.md +25 -30
  4. package/USAGE.md +26 -0
  5. package/bin/audit-template-children.mjs +556 -0
  6. package/components/accordion/accordion-item.a2ui.json +4 -0
  7. package/components/accordion/accordion-item.yaml +2 -0
  8. package/components/accordion/accordion.a2ui.json +4 -0
  9. package/components/accordion/accordion.yaml +2 -0
  10. package/components/action-list/action-item.a2ui.json +24 -2
  11. package/components/action-list/action-item.yaml +28 -3
  12. package/components/action-list/action-list.a2ui.json +6 -1
  13. package/components/action-list/action-list.class.js +52 -11
  14. package/components/action-list/action-list.css +43 -3
  15. package/components/action-list/action-list.d.ts +4 -2
  16. package/components/action-list/action-list.yaml +5 -0
  17. package/components/adia-mark/adia-mark.a2ui.json +1 -0
  18. package/components/adia-wordmark/adia-wordmark.a2ui.json +1 -0
  19. package/components/agent-artifact/agent-artifact.a2ui.json +1 -0
  20. package/components/agent-artifact/agent-artifact.css +1 -1
  21. package/components/agent-feedback-bar/agent-feedback-bar.a2ui.json +6 -5
  22. package/components/agent-feedback-bar/agent-feedback-bar.yaml +6 -2
  23. package/components/agent-questions/agent-questions.a2ui.json +1 -0
  24. package/components/agent-reasoning/agent-reasoning.a2ui.json +6 -5
  25. package/components/agent-reasoning/agent-reasoning.css +2 -2
  26. package/components/agent-reasoning/agent-reasoning.yaml +6 -2
  27. package/components/agent-suggestions/agent-suggestions.a2ui.json +11 -2
  28. package/components/agent-suggestions/agent-suggestions.class.js +2 -1
  29. package/components/agent-suggestions/agent-suggestions.d.ts +4 -4
  30. package/components/agent-suggestions/agent-suggestions.yaml +4 -2
  31. package/components/agent-trace/agent-trace.a2ui.json +6 -5
  32. package/components/agent-trace/agent-trace.css +3 -3
  33. package/components/agent-trace/agent-trace.yaml +6 -2
  34. package/components/alert/alert.a2ui.json +1 -0
  35. package/components/alert/alert.css +2 -2
  36. package/components/anchor-bar/anchor-bar.a2ui.json +1 -0
  37. package/components/aside/aside.a2ui.json +1 -0
  38. package/components/avatar/avatar-group.a2ui.json +7 -1
  39. package/components/avatar/avatar-group.yaml +1 -0
  40. package/components/avatar/avatar.a2ui.json +12 -11
  41. package/components/avatar/avatar.css +1 -1
  42. package/components/avatar/avatar.d.ts +1 -1
  43. package/components/avatar/avatar.yaml +4 -4
  44. package/components/badge/badge.a2ui.json +1 -0
  45. package/components/badge/badge.css +1 -1
  46. package/components/block/block.a2ui.json +1 -0
  47. package/components/blockquote/blockquote.a2ui.json +1 -0
  48. package/components/breadcrumb/breadcrumb.a2ui.json +1 -0
  49. package/components/button/button.a2ui.json +1 -3
  50. package/components/button/button.css +6 -5
  51. package/components/button/button.yaml +1 -3
  52. package/components/calendar-grid/calendar-grid.a2ui.json +1 -0
  53. package/components/calendar-grid/calendar-grid.class.js +2 -1
  54. package/components/calendar-picker/calendar-picker.a2ui.json +143 -24
  55. package/components/calendar-picker/calendar-picker.class.js +490 -197
  56. package/components/calendar-picker/calendar-picker.css +121 -172
  57. package/components/calendar-picker/calendar-picker.yaml +225 -47
  58. package/components/canvas/canvas.a2ui.json +6 -5
  59. package/components/canvas/canvas.d.ts +37 -0
  60. package/components/canvas/canvas.js +72 -3
  61. package/components/canvas/canvas.yaml +6 -2
  62. package/components/card/card.a2ui.json +25 -2
  63. package/components/card/card.class.js +3 -0
  64. package/components/card/card.css +34 -4
  65. package/components/card/card.d.ts +2 -2
  66. package/components/card/card.examples.md +3 -3
  67. package/components/card/card.yaml +28 -4
  68. package/components/chart/chart.a2ui.json +13 -8
  69. package/components/chart/chart.class.js +10 -10
  70. package/components/chart/chart.css +12 -10
  71. package/components/chart/chart.d.ts +2 -2
  72. package/components/chart/chart.yaml +8 -5
  73. package/components/chart-legend/chart-legend.a2ui.json +1 -0
  74. package/components/chat-thread/chat-input.a2ui.json +1 -0
  75. package/components/chat-thread/chat-thread.a2ui.json +10 -9
  76. package/components/chat-thread/chat-thread.css +1 -1
  77. package/components/chat-thread/chat-thread.yaml +13 -20
  78. package/components/check/check.a2ui.json +10 -9
  79. package/components/check/check.yaml +4 -4
  80. package/components/code/code.a2ui.json +1 -0
  81. package/components/code/code.css +6 -6
  82. package/components/col/col.a2ui.json +1 -0
  83. package/components/color-input/color-input.a2ui.json +1 -0
  84. package/components/color-picker/color-picker.a2ui.json +1 -0
  85. package/components/combobox/combobox.a2ui.json +3 -2
  86. package/components/combobox/combobox.css +2 -2
  87. package/components/combobox/combobox.yaml +2 -2
  88. package/components/command/command.a2ui.json +12 -10
  89. package/components/command/command.class.js +3 -2
  90. package/components/command/command.css +3 -3
  91. package/components/command/command.yaml +17 -4
  92. package/components/context-menu/context-menu.a2ui.json +1 -0
  93. package/components/date-range-picker/date-range-picker.a2ui.json +2 -1
  94. package/components/date-range-picker/date-range-picker.css +1 -1
  95. package/components/date-range-picker/date-range-picker.yaml +1 -1
  96. package/components/datetime-picker/datetime-picker.a2ui.json +15 -108
  97. package/components/datetime-picker/datetime-picker.class.js +37 -690
  98. package/components/datetime-picker/datetime-picker.css +11 -183
  99. package/components/datetime-picker/datetime-picker.d.ts +4 -5
  100. package/components/datetime-picker/datetime-picker.yaml +44 -135
  101. package/components/demo-toggle/demo-toggle.a2ui.json +1 -0
  102. package/components/demo-toggle/demo-toggle.css +1 -1
  103. package/components/description-list/description-list.a2ui.json +1 -0
  104. package/components/description-list/description-list.css +2 -2
  105. package/components/display-field/display-field.a2ui.json +1 -0
  106. package/components/display-field/display-field.css +3 -3
  107. package/components/divider/divider.a2ui.json +1 -0
  108. package/components/divider/divider.css +1 -1
  109. package/components/drawer/drawer.a2ui.json +1 -3
  110. package/components/drawer/drawer.css +3 -3
  111. package/components/drawer/drawer.yaml +0 -2
  112. package/components/drilldown/drilldown.a2ui.json +22 -20
  113. package/components/drilldown/drilldown.class.js +4 -3
  114. package/components/drilldown/drilldown.css +8 -8
  115. package/components/drilldown/drilldown.yaml +40 -9
  116. package/components/embed/embed.a2ui.json +6 -5
  117. package/components/embed/embed.yaml +2 -2
  118. package/components/empty-state/empty-state.a2ui.json +1 -0
  119. package/components/empty-state/empty-state.css +2 -2
  120. package/components/feed/feed-item.a2ui.json +25 -5
  121. package/components/feed/feed-item.yaml +28 -7
  122. package/components/feed/feed.a2ui.json +9 -2
  123. package/components/feed/feed.class.js +19 -12
  124. package/components/feed/feed.css +8 -8
  125. package/components/feed/feed.yaml +14 -1
  126. package/components/field/field.a2ui.json +1 -0
  127. package/components/field/field.css +1 -1
  128. package/components/field/field.examples.md +1 -1
  129. package/components/fields/fields.a2ui.json +1 -0
  130. package/components/fields/fields.examples.md +1 -1
  131. package/components/footer/footer.a2ui.json +1 -0
  132. package/components/frame/frame.a2ui.json +1 -0
  133. package/components/grid/grid.a2ui.json +1 -0
  134. package/components/header/header.a2ui.json +3 -2
  135. package/components/header/header.yaml +3 -3
  136. package/components/heatmap/heatmap.a2ui.json +2 -1
  137. package/components/heatmap/heatmap.class.js +1 -1
  138. package/components/heatmap/heatmap.css +6 -6
  139. package/components/heatmap/heatmap.yaml +1 -1
  140. package/components/icon/icon.a2ui.json +1 -0
  141. package/components/image/image.a2ui.json +28 -14
  142. package/components/image/image.class.js +38 -23
  143. package/components/image/image.css +18 -8
  144. package/components/image/image.d.ts +2 -2
  145. package/components/image/image.examples.md +3 -3
  146. package/components/image/image.yaml +23 -7
  147. package/components/inline-edit/inline-edit.a2ui.json +1 -0
  148. package/components/inline-message/inline-message.a2ui.json +3 -1
  149. package/components/inline-message/inline-message.class.js +3 -1
  150. package/components/inline-message/inline-message.css +1 -1
  151. package/components/inline-message/inline-message.d.ts +2 -2
  152. package/components/inline-message/inline-message.yaml +2 -1
  153. package/components/input/input.a2ui.json +66 -16
  154. package/components/input/input.class.js +64 -7
  155. package/components/input/input.css +19 -18
  156. package/components/input/input.d.ts +9 -4
  157. package/components/input/input.yaml +83 -10
  158. package/components/inspector/inspector.a2ui.json +1 -0
  159. package/components/integration-card/integration-card.a2ui.json +1 -0
  160. package/components/integration-card/integration-card.css +4 -4
  161. package/components/kbd/kbd.a2ui.json +1 -0
  162. package/components/kbd/kbd.css +1 -1
  163. package/components/link/link.a2ui.json +2 -1
  164. package/components/link/link.yaml +1 -1
  165. package/components/list/list-item.a2ui.json +9 -0
  166. package/components/list/list-item.yaml +12 -0
  167. package/components/list/list.a2ui.json +9 -3
  168. package/components/list/list.class.js +14 -1
  169. package/components/list/list.css +14 -3
  170. package/components/list/list.d.ts +7 -5
  171. package/components/list/list.yaml +16 -6
  172. package/components/list-window/list-window.a2ui.json +1 -0
  173. package/components/list-window/list-window.class.js +2 -1
  174. package/components/loading-overlay/loading-overlay.a2ui.json +1 -0
  175. package/components/mark/mark.a2ui.json +2 -1
  176. package/components/mark/mark.yaml +1 -1
  177. package/components/menu/menu-divider.a2ui.json +1 -0
  178. package/components/menu/menu-item.a2ui.json +3 -1
  179. package/components/menu/menu-item.yaml +6 -0
  180. package/components/menu/menu-label.a2ui.json +1 -0
  181. package/components/menu/menu.a2ui.json +3 -2
  182. package/components/menu/menu.class.js +2 -2
  183. package/components/menu/menu.d.ts +2 -2
  184. package/components/menu/menu.yaml +3 -3
  185. package/components/modal/modal.a2ui.json +1 -0
  186. package/components/nav/nav.a2ui.json +1 -0
  187. package/components/nav/nav.class.js +14 -3
  188. package/components/nav/nav.css +2 -2
  189. package/components/nav-group/nav-group.a2ui.json +1 -0
  190. package/components/nav-group/nav-group.class.js +3 -1
  191. package/components/nav-group/nav-group.css +3 -3
  192. package/components/nav-item/nav-item.a2ui.json +1 -0
  193. package/components/nav-item/nav-item.css +2 -2
  194. package/components/noodles/noodles.a2ui.json +1 -0
  195. package/components/noodles/noodles.class.js +5 -1
  196. package/components/number-format/number-format.a2ui.json +1 -0
  197. package/components/option-card/option-card.a2ui.json +1 -0
  198. package/components/option-card/option-card.css +1 -1
  199. package/components/otp-input/otp-input.a2ui.json +3 -2
  200. package/components/otp-input/otp-input.css +1 -1
  201. package/components/otp-input/otp-input.yaml +9 -2
  202. package/components/page/page.a2ui.json +13 -0
  203. package/components/page/page.css +2 -2
  204. package/components/page/page.d.ts +1 -1
  205. package/components/page/page.yaml +1 -0
  206. package/components/pagination/pagination.a2ui.json +1 -0
  207. package/components/pagination/pagination.class.js +3 -2
  208. package/components/pagination/pagination.css +1 -1
  209. package/components/pane/pane.a2ui.json +6 -0
  210. package/components/pane/pane.class.js +3 -3
  211. package/components/pane/pane.css +3 -3
  212. package/components/pane/pane.yaml +3 -0
  213. package/components/password-strength/password-strength.a2ui.json +1 -0
  214. package/components/pipeline-status/pipeline-status.a2ui.json +1 -0
  215. package/components/popover/popover.a2ui.json +7 -6
  216. package/components/popover/popover.class.js +2 -2
  217. package/components/popover/popover.d.ts +2 -2
  218. package/components/popover/popover.yaml +4 -4
  219. package/components/preview/preview.a2ui.json +1 -0
  220. package/components/preview/preview.class.js +5 -1
  221. package/components/progress/progress.a2ui.json +47 -24
  222. package/components/progress/progress.class.js +66 -11
  223. package/components/progress/progress.css +44 -26
  224. package/components/progress/progress.d.ts +7 -5
  225. package/components/progress/progress.examples.md +2 -2
  226. package/components/progress/progress.yaml +235 -53
  227. package/components/progress-row/progress-row.a2ui.json +16 -12
  228. package/components/progress-row/progress-row.css +2 -2
  229. package/components/progress-row/progress-row.d.ts +2 -2
  230. package/components/progress-row/progress-row.examples.md +2 -14
  231. package/components/progress-row/progress-row.yaml +28 -36
  232. package/components/qr-code/qr-code.a2ui.json +13 -12
  233. package/components/qr-code/qr-code.class.js +7 -7
  234. package/components/qr-code/qr-code.css +1 -1
  235. package/components/qr-code/qr-code.d.ts +10 -7
  236. package/components/qr-code/qr-code.yaml +18 -12
  237. package/components/radio/radio.a2ui.json +8 -7
  238. package/components/radio/radio.class.js +8 -0
  239. package/components/radio/radio.yaml +3 -3
  240. package/components/radio-group/radio-group.a2ui.json +5 -3
  241. package/components/radio-group/radio-group.class.js +11 -0
  242. package/components/radio-group/radio-group.yaml +7 -1
  243. package/components/range/range.a2ui.json +6 -0
  244. package/components/range/range.class.js +2 -2
  245. package/components/range/range.css +3 -3
  246. package/components/range/range.yaml +3 -0
  247. package/components/rating/rating.a2ui.json +1 -0
  248. package/components/rating/rating.css +1 -1
  249. package/components/relative-time/relative-time.a2ui.json +1 -0
  250. package/components/richtext/richtext.a2ui.json +2 -1
  251. package/components/richtext/richtext.css +3 -3
  252. package/components/richtext/richtext.yaml +1 -1
  253. package/components/row/row.a2ui.json +1 -0
  254. package/components/search/search.a2ui.json +1 -0
  255. package/components/search/search.class.js +4 -1
  256. package/components/section/section.a2ui.json +1 -0
  257. package/components/segment/segment.a2ui.json +21 -10
  258. package/components/segment/segment.css +20 -4
  259. package/components/segment/segment.d.ts +2 -1
  260. package/components/segment/segment.yaml +20 -13
  261. package/components/segmented/segmented.a2ui.json +36 -7
  262. package/components/segmented/segmented.class.js +113 -22
  263. package/components/segmented/segmented.css +3 -0
  264. package/components/segmented/segmented.d.ts +3 -1
  265. package/components/segmented/segmented.yaml +80 -8
  266. package/components/select/select.a2ui.json +18 -13
  267. package/components/select/select.class.js +61 -37
  268. package/components/select/select.css +18 -16
  269. package/components/select/select.yaml +18 -7
  270. package/components/skeleton/skeleton.a2ui.json +8 -7
  271. package/components/skeleton/skeleton.class.js +8 -7
  272. package/components/skeleton/skeleton.css +21 -6
  273. package/components/skeleton/skeleton.d.ts +2 -2
  274. package/components/skeleton/skeleton.examples.md +2 -2
  275. package/components/skeleton/skeleton.yaml +3 -2
  276. package/components/skip-nav/skip-nav.a2ui.json +1 -0
  277. package/components/slider/slider.a2ui.json +6 -0
  278. package/components/slider/slider.class.js +20 -3
  279. package/components/slider/slider.css +2 -2
  280. package/components/slider/slider.yaml +3 -0
  281. package/components/spinner/spinner.a2ui.json +1 -0
  282. package/components/spinner/spinner.css +1 -1
  283. package/components/stack/stack.a2ui.json +1 -0
  284. package/components/stat/stat.a2ui.json +1 -0
  285. package/components/stat/stat.css +3 -3
  286. package/components/stat/stat.js +2 -2
  287. package/components/step-progress/step-progress.a2ui.json +1 -0
  288. package/components/step-progress/step-progress.css +1 -1
  289. package/components/step-progress/step-progress.yaml +1 -1
  290. package/components/stepper/stepper-item.a2ui.json +7 -3
  291. package/components/stepper/stepper-item.yaml +15 -5
  292. package/components/stepper/stepper.a2ui.json +5 -1
  293. package/components/stepper/stepper.class.js +31 -16
  294. package/components/stepper/stepper.css +2 -2
  295. package/components/stepper/stepper.d.ts +1 -1
  296. package/components/stepper/stepper.yaml +4 -2
  297. package/components/stream/stream.a2ui.json +1 -0
  298. package/components/swatch/swatch.a2ui.json +1 -0
  299. package/components/swatch/swatch.css +2 -2
  300. package/components/swiper/swiper.a2ui.json +1 -0
  301. package/components/swiper/swiper.class.js +5 -1
  302. package/components/switch/switch.a2ui.json +12 -11
  303. package/components/switch/switch.css +1 -1
  304. package/components/switch/switch.yaml +6 -6
  305. package/components/table/table.a2ui.json +1 -10
  306. package/components/table/table.class.js +18 -16
  307. package/components/table/table.css +17 -18
  308. package/components/table/table.d.ts +0 -2
  309. package/components/table/table.yaml +0 -9
  310. package/components/table-toolbar/table-toolbar.a2ui.json +1 -0
  311. package/components/table-toolbar/table-toolbar.class.js +38 -19
  312. package/components/table-toolbar/table-toolbar.css +2 -2
  313. package/components/tabs/tab.a2ui.json +9 -0
  314. package/components/tabs/tab.js +4 -0
  315. package/components/tabs/tab.yaml +15 -0
  316. package/components/tabs/tabs.a2ui.json +9 -4
  317. package/components/tabs/tabs.class.js +13 -1
  318. package/components/tabs/tabs.css +9 -1
  319. package/components/tabs/tabs.d.ts +2 -0
  320. package/components/tabs/tabs.yaml +9 -2
  321. package/components/tag/tag.a2ui.json +1 -0
  322. package/components/tag/tag.css +2 -2
  323. package/components/tags-input/tags-input.a2ui.json +22 -17
  324. package/components/tags-input/tags-input.class.js +13 -11
  325. package/components/tags-input/tags-input.css +11 -7
  326. package/components/tags-input/tags-input.d.ts +16 -7
  327. package/components/tags-input/tags-input.examples.md +2 -2
  328. package/components/tags-input/tags-input.yaml +25 -8
  329. package/components/text/text.a2ui.json +6 -5
  330. package/components/text/text.css +10 -5
  331. package/components/text/text.d.ts +2 -2
  332. package/components/text/text.yaml +9 -4
  333. package/components/textarea/textarea.a2ui.json +2 -1
  334. package/components/textarea/textarea.css +1 -1
  335. package/components/textarea/textarea.yaml +1 -1
  336. package/components/theme-provider/theme-provider.a2ui.json +2 -1
  337. package/components/theme-provider/theme-provider.d.ts +5 -3
  338. package/components/theme-provider/theme-provider.yaml +5 -3
  339. package/components/time-picker/time-picker.a2ui.json +1 -0
  340. package/components/time-picker/time-picker.class.js +4 -2
  341. package/components/time-picker/time-picker.css +1 -1
  342. package/components/timeline/timeline-item.a2ui.json +26 -3
  343. package/components/timeline/timeline-item.yaml +22 -7
  344. package/components/timeline/timeline.a2ui.json +4 -0
  345. package/components/timeline/timeline.class.js +29 -18
  346. package/components/timeline/timeline.css +4 -4
  347. package/components/timeline/timeline.d.ts +3 -3
  348. package/components/timeline/timeline.yaml +2 -0
  349. package/components/toast/toast.a2ui.json +10 -3
  350. package/components/toast/toast.yaml +20 -13
  351. package/components/toc/toc.a2ui.json +1 -0
  352. package/components/toc/toc.css +1 -1
  353. package/components/toggle-group/toggle-group.a2ui.json +7 -3
  354. package/components/toggle-group/toggle-group.class.js +43 -12
  355. package/components/toggle-group/toggle-group.css +7 -4
  356. package/components/toggle-group/toggle-group.d.ts +3 -4
  357. package/components/toggle-group/toggle-group.yaml +22 -16
  358. package/components/toggle-group/toggle-option.a2ui.json +8 -4
  359. package/components/toggle-group/toggle-option.yaml +15 -13
  360. package/components/toggle-scheme/toggle-scheme.a2ui.json +2 -1
  361. package/components/toggle-scheme/toggle-scheme.yaml +1 -1
  362. package/components/toolbar/toolbar-group.a2ui.json +1 -0
  363. package/components/toolbar/toolbar.a2ui.json +1 -0
  364. package/components/toolbar/toolbar.class.js +3 -0
  365. package/components/tooltip/tooltip.a2ui.json +1 -0
  366. package/components/tooltip/tooltip.css +1 -1
  367. package/components/tour/tour-step.a2ui.json +4 -0
  368. package/components/tour/tour-step.yaml +2 -0
  369. package/components/tour/tour.a2ui.json +4 -0
  370. package/components/tour/tour.css +2 -2
  371. package/components/tour/tour.yaml +2 -0
  372. package/components/tree/tree-item.a2ui.json +5 -0
  373. package/components/tree/tree-item.yaml +3 -0
  374. package/components/tree/tree.a2ui.json +4 -0
  375. package/components/tree/tree.class.js +2 -1
  376. package/components/tree/tree.css +1 -1
  377. package/components/tree/tree.yaml +2 -0
  378. package/components/upload/upload.a2ui.json +8 -1
  379. package/components/upload/upload.class.js +35 -5
  380. package/components/upload/upload.css +28 -0
  381. package/components/upload/upload.d.ts +16 -0
  382. package/components/upload/upload.yaml +27 -7
  383. package/components/visually-hidden/visually-hidden.a2ui.json +1 -0
  384. package/core/dom.d.ts +11 -0
  385. package/core/dom.js +34 -0
  386. package/core/form.js +7 -0
  387. package/core/index.d.ts +1 -0
  388. package/core/index.js +1 -0
  389. package/core/responsive.js +16 -4
  390. package/core/template.js +2 -1
  391. package/custom-elements.json +442 -502
  392. package/dist/host.min.css +1 -1
  393. package/dist/host.sheet.js +1 -1
  394. package/dist/theme-provider.min.js +5 -5
  395. package/dist/web-components.min.css +1 -1
  396. package/dist/web-components.min.js +91 -104
  397. package/dist/web-components.sheet.js +1 -1
  398. package/package.json +4 -2
  399. package/patterns/conversion-funnel/conversion-funnel.examples.html +15 -15
  400. package/patterns/inline-dialog/inline-dialog.examples.html +2 -2
  401. package/patterns/inline-dialog/inline-dialog.html +4 -0
  402. package/patterns/timezone-selector/timezone-selector.examples.html +1 -1
  403. package/patterns/timezone-selector/timezone-selector.html +2 -2
  404. package/styles/api/text.css +7 -0
  405. package/styles/type/scale.css +6 -7
  406. package/traits/_catalog.json +129 -41
  407. package/traits/anchor-positioning/anchor-positioning.js +1 -0
  408. package/traits/announcer/announcer.js +1 -0
  409. package/traits/arrow-grid-nav/arrow-grid-nav.js +1 -0
  410. package/traits/attention-pulse/attention-pulse.js +1 -0
  411. package/traits/count-up/count-up.js +1 -0
  412. package/traits/define.js +78 -0
  413. package/traits/focus-restore/focus-restore.js +2 -1
  414. package/traits/haptic-feedback/haptic-feedback.js +1 -0
  415. package/traits/input-mask/input-mask.js +1 -0
  416. package/traits/intersection-observer/intersection-observer.js +1 -0
  417. package/traits/layout-animation/layout-animation.js +1 -0
  418. package/traits/noise-texture/noise-texture.js +1 -0
  419. package/traits/resize-observer/resize-observer.js +1 -0
  420. package/traits/scroll-progress/scroll-progress.js +1 -0
  421. package/traits/snap-to-grid/snap-to-grid.js +1 -0
  422. package/traits/sound-feedback/sound-feedback.js +1 -0
  423. package/traits/spring-animate/spring-animate.js +1 -0
  424. package/traits/validation/validation.js +1 -0
@@ -34,8 +34,14 @@
34
34
  "default": false
35
35
  },
36
36
  "status": {
37
- "description": "Lifecycle state (idle | active | completed | error). Pairs with `spinner` on \"active\" for an in-progress step.",
37
+ "description": "Lifecycle state (idle | active | completed | error) — the values timeline.css currently styles. Pairs with `spinner` on \"active\" for an in-progress step.",
38
38
  "type": "string",
39
+ "enum": [
40
+ "idle",
41
+ "active",
42
+ "completed",
43
+ "error"
44
+ ],
39
45
  "default": "idle"
40
46
  },
41
47
  "text": {
@@ -49,6 +55,13 @@
49
55
  "variant": {
50
56
  "description": "Visual variant (default | accent | success | warning | danger).",
51
57
  "type": "string",
58
+ "enum": [
59
+ "default",
60
+ "accent",
61
+ "success",
62
+ "warning",
63
+ "danger"
64
+ ],
52
65
  "default": "default"
53
66
  }
54
67
  },
@@ -57,6 +70,9 @@
57
70
  ],
58
71
  "unevaluatedProperties": false,
59
72
  "x-adiaui": {
73
+ "allowedParents": [
74
+ "Timeline"
75
+ ],
60
76
  "anti_patterns": [],
61
77
  "category": "feedback",
62
78
  "composes": [],
@@ -70,6 +86,7 @@
70
86
  "history-row"
71
87
  ],
72
88
  "name": "UITimelineItem",
89
+ "parts": {},
73
90
  "related": [
74
91
  "Timeline",
75
92
  "FeedItem",
@@ -77,10 +94,16 @@
77
94
  ],
78
95
  "slots": {
79
96
  "description": {
80
- "description": "Override slot for rich description markup (inline links, code spans, embedded badges). Renders beneath the primary text at body-subtle typography."
97
+ "description": "Custom secondary-line content; falls through to [description] prop if not slotted. render() only writes into the component-stamped fallback span (gh#1462 adopt-or-stamp guard)."
81
98
  },
82
99
  "icon": {
83
- "description": "Override the [icon] glyph with a custom slotted element. Use for branded icons, avatars, or non-Phosphor sources. Mutually exclusive with the [icon] attribute."
100
+ "description": "Override the [icon] glyph with a custom slotted element (custom icon-ui, image, avatar). Mutually exclusive with the [icon] attribute — a consumer-authored slot child wins and is never renamed or removed by render() (gh#1462 adopt-or-stamp guard)."
101
+ },
102
+ "label": {
103
+ "description": "Custom primary-line content; falls through to the [text] prop if not slotted. render() only writes into the component-stamped fallback span (gh#1462 adopt-or-stamp guard)."
104
+ },
105
+ "time": {
106
+ "description": "Custom timestamp/duration content; falls through to the [duration] or [time] prop if not slotted. render() only writes into the component-stamped fallback span (gh#1462 adopt-or-stamp guard)."
84
107
  }
85
108
  },
86
109
  "states": [],
@@ -38,26 +38,39 @@ props:
38
38
  description: Visual variant (default | accent | success | warning | danger).
39
39
  type: string
40
40
  default: 'default'
41
+ enum: [default, accent, success, warning, danger]
41
42
  status:
42
- description: Lifecycle state (idle | active | completed | error). Pairs with `spinner` on "active" for an in-progress step.
43
+ description: Lifecycle state (idle | active | completed | error) — the values timeline.css currently styles. Pairs with `spinner` on "active" for an in-progress step.
43
44
  type: string
44
45
  default: 'idle'
46
+ enum: [idle, active, completed, error]
45
47
  spinner:
46
48
  description: Show a spinner instead of the dot/icon while status="active".
47
49
  type: boolean
48
50
  default: false
49
51
 
50
52
  slots:
53
+ label:
54
+ description: >-
55
+ Custom primary-line content; falls through to the [text] prop if not
56
+ slotted. render() only writes into the component-stamped fallback
57
+ span (gh#1462 adopt-or-stamp guard).
58
+ time:
59
+ description: >-
60
+ Custom timestamp/duration content; falls through to the [duration]
61
+ or [time] prop if not slotted. render() only writes into the
62
+ component-stamped fallback span (gh#1462 adopt-or-stamp guard).
51
63
  icon:
52
64
  description: >-
53
- Override the [icon] glyph with a custom slotted element. Use for
54
- branded icons, avatars, or non-Phosphor sources. Mutually exclusive
55
- with the [icon] attribute.
65
+ Override the [icon] glyph with a custom slotted element (custom
66
+ icon-ui, image, avatar). Mutually exclusive with the [icon]
67
+ attribute a consumer-authored slot child wins and is never renamed
68
+ or removed by render() (gh#1462 adopt-or-stamp guard).
56
69
  description:
57
70
  description: >-
58
- Override slot for rich description markup (inline links, code spans,
59
- embedded badges). Renders beneath the primary text at body-subtle
60
- typography.
71
+ Custom secondary-line content; falls through to [description] prop
72
+ if not slotted. render() only writes into the component-stamped
73
+ fallback span (gh#1462 adopt-or-stamp guard).
61
74
 
62
75
  keywords:
63
76
  - timeline-item
@@ -75,6 +88,8 @@ related:
75
88
  - Stepper
76
89
 
77
90
  a2ui:
91
+ allowedParents:
92
+ - Timeline
78
93
  rules:
79
94
  - rule: 'Child of <timeline-ui> — one chronological event with timestamp + content + optional icon dot.'
80
95
  reason: 'Timeline cluster contract.'
@@ -40,6 +40,9 @@
40
40
  ],
41
41
  "unevaluatedProperties": false,
42
42
  "x-adiaui": {
43
+ "allowedChildren": [
44
+ "TimelineItem"
45
+ ],
43
46
  "anti_patterns": [],
44
47
  "category": "display",
45
48
  "composes": [
@@ -68,6 +71,7 @@
68
71
  "timeline"
69
72
  ],
70
73
  "name": "UITimeline",
74
+ "parts": {},
71
75
  "related": [
72
76
  "timeline-item"
73
77
  ],
@@ -104,14 +104,23 @@ export class UITimelineItem extends UIElement {
104
104
  this.render();
105
105
  }
106
106
 
107
+ // Adopt-or-stamp (gh#1462): a fallback child stamped from a prop is
108
+ // marked, and render() only ever writes into marked elements — a
109
+ // consumer-authored slot="label"/"description"/"time"/"icon" child is
110
+ // adopted as source of truth and never overwritten or removed. Mirrors
111
+ // action-item-ui/menu-item-ui's stamp-marking (PR #1429).
112
+ #stampMark(el) { el.dataset.timelineItemStamped = '1'; return el; }
113
+ #wasStamped(el) { return el?.dataset?.timelineItemStamped === '1'; }
114
+
107
115
  connected() {
108
- if (!logicalSlotted(this, 'label').length) {
109
- // Author provided just text/time stamp the default slot structure
110
- this.innerHTML = `
111
- <span slot="label"></span>
112
- <span slot="description"></span>
113
- <span slot="time"></span>
114
- `;
116
+ // Each slot's adopt-or-stamp decision is independent per slot key —
117
+ // an authored label must not suppress the prop-driven description/time
118
+ // fallbacks (mirrors action-item-ui's per-part stamping, PR #1429).
119
+ for (const name of ['label', 'description', 'time']) {
120
+ if (logicalSlotted(this, name).length) continue;
121
+ const span = this.#stampMark(document.createElement('span'));
122
+ span.setAttribute('slot', name);
123
+ this.appendChild(span);
115
124
  }
116
125
  }
117
126
 
@@ -119,20 +128,22 @@ export class UITimelineItem extends UIElement {
119
128
  const label = this.querySelector(':scope > [slot="label"]');
120
129
  const desc = this.querySelector(':scope > [slot="description"]');
121
130
  const time = this.querySelector(':scope > [slot="time"]');
122
- if (label) label.textContent = this.text;
123
- if (desc) desc.textContent = this.description;
124
- if (time) time.textContent = this.duration || this.time;
131
+ if (this.#wasStamped(label)) label.textContent = this.text;
132
+ if (this.#wasStamped(desc)) desc.textContent = this.description;
133
+ if (this.#wasStamped(time)) time.textContent = this.duration || this.time;
125
134
 
135
+ const iconEl = this.querySelector(':scope > [slot="icon"]');
126
136
  if (this.icon) {
127
- let iconEl = this.querySelector(':scope > [slot="icon"]');
128
- if (!iconEl) {
129
- iconEl = document.createElement('icon-ui');
130
- iconEl.setAttribute('slot', 'icon');
131
- this.prepend(iconEl);
137
+ if (iconEl) {
138
+ if (this.#wasStamped(iconEl)) iconEl.setAttribute('name', this.icon);
139
+ } else {
140
+ const el = this.#stampMark(document.createElement('icon-ui'));
141
+ el.setAttribute('slot', 'icon');
142
+ el.setAttribute('name', this.icon);
143
+ this.prepend(el);
132
144
  }
133
- iconEl.setAttribute('name', this.icon);
134
- } else {
135
- this.querySelector(':scope > [slot="icon"]')?.remove();
145
+ } else if (this.#wasStamped(iconEl)) {
146
+ iconEl.remove();
136
147
  }
137
148
 
138
149
  // Outcomes sub-list + toggle caret
@@ -309,7 +309,7 @@ agent-reasoning-ui timeline-ui:not([orientation="horizontal"]),
309
309
  font-weight: var(--timeline-item-label-weight);
310
310
  font-size: var(--timeline-item-label-size);
311
311
  color: var(--timeline-item-label-fg);
312
- line-height: 1.4;
312
+ line-height: var(--a-font-leading-normal);
313
313
  overflow-wrap: break-word;
314
314
  min-width: 0;
315
315
  }
@@ -323,7 +323,7 @@ agent-reasoning-ui timeline-ui:not([orientation="horizontal"]),
323
323
  grid-row: 2;
324
324
  color: var(--timeline-item-desc-fg);
325
325
  font-size: var(--timeline-item-desc-size);
326
- line-height: 1.5;
326
+ line-height: var(--a-font-leading-relaxed);
327
327
  margin-top: var(--a-space-0-5);
328
328
  }
329
329
 
@@ -333,7 +333,7 @@ agent-reasoning-ui timeline-ui:not([orientation="horizontal"]),
333
333
  color: var(--timeline-item-time-fg);
334
334
  font-size: var(--timeline-item-time-size);
335
335
  font-variant-numeric: tabular-nums;
336
- line-height: 1.4;
336
+ line-height: var(--a-font-leading-normal);
337
337
  white-space: nowrap;
338
338
  justify-self: end;
339
339
  }
@@ -356,7 +356,7 @@ agent-reasoning-ui timeline-ui:not([orientation="horizontal"]),
356
356
  gap: var(--a-space-0-5);
357
357
  color: var(--timeline-item-outcome-fg);
358
358
  font-size: var(--timeline-item-desc-size);
359
- line-height: 1.4;
359
+ line-height: var(--a-font-leading-relaxed);
360
360
  animation: tl-fade var(--timeline-item-duration) var(--timeline-item-easing);
361
361
  }
362
362
 
@@ -42,12 +42,12 @@ export class UITimelineItem extends UIElement {
42
42
  icon: string;
43
43
  /** Show a spinner instead of the dot/icon while status="active". */
44
44
  spinner: boolean;
45
- /** Lifecycle state (idle | active | completed | error). Pairs with `spinner` on "active" for an in-progress step. */
46
- status: string;
45
+ /** Lifecycle state (idle | active | completed | error) — the values timeline.css currently styles. Pairs with `spinner` on "active" for an in-progress step. */
46
+ status: 'idle' | 'active' | 'completed' | 'error';
47
47
  /** Primary step label. */
48
48
  text: string;
49
49
  /** Absolute timestamp (HH:MM or ISO). */
50
50
  time: string;
51
51
  /** Visual variant (default | accent | success | warning | danger). */
52
- variant: string;
52
+ variant: 'default' | 'accent' | 'success' | 'warning' | 'danger';
53
53
  }
@@ -46,6 +46,8 @@ requiredIcons:
46
46
  - caret-down
47
47
  - caret-right
48
48
  a2ui:
49
+ allowedChildren:
50
+ - TimelineItem
49
51
  rules:
50
52
  - rule: 'Use for chronological event lists (audit log, activity feed, version history).'
51
53
  reason: 'Visual rhythm: line + dot + content per row.'
@@ -58,14 +58,20 @@
58
58
  ],
59
59
  "unevaluatedProperties": false,
60
60
  "x-adiaui": {
61
- "anti_patterns": [],
61
+ "anti_patterns": [
62
+ {
63
+ "fix": "{\"component\": \"Toast\", \"variant\": \"success\", \"text\": \"Saved successfully.\"}\n",
64
+ "why": "<feed-item-ui> is the underlying imperative-channel item — every\nfeed.yaml/feed-item.yaml a2ui rule says not to place it\ndeclaratively. It is meant to be created via UIFeed.post() (or a\ndeclared <toast-ui>, which forwards into it), never authored\ndirectly in generated markup.\n",
65
+ "wrong": "{\"component\": \"FeedItem\", \"variant\": \"success\", \"text\": \"Saved successfully.\"}\n"
66
+ }
67
+ ],
62
68
  "category": "container",
63
69
  "composes": [],
64
70
  "events": {},
65
71
  "examples": [
66
72
  {
67
- "description": "Column of three toast notification components showing success, warning, and error variants.",
68
- "a2ui": "[\n {\n \"id\": \"root\",\n \"component\": \"Column\",\n \"gap\": \"2\",\n \"children\": [\n \"t1\",\n \"t2\",\n \"t3\"\n ]\n },\n {\n \"id\": \"t1\",\n \"component\": \"Toast\",\n \"variant\": \"success\",\n \"title\": \"Saved successfully\",\n \"description\": \"Your changes have been saved.\",\n \"dismissible\": true\n },\n {\n \"id\": \"t2\",\n \"component\": \"Toast\",\n \"variant\": \"warning\",\n \"title\": \"Storage almost full\",\n \"description\": \"You are using 90% of your available storage.\",\n \"dismissible\": true\n },\n {\n \"id\": \"t3\",\n \"component\": \"Toast\",\n \"variant\": \"error\",\n \"title\": \"Upload failed\",\n \"description\": \"The file could not be uploaded. Please try again.\",\n \"dismissible\": true\n }\n]",
73
+ "description": "Column of three toast notification components showing success, warning, and danger variants.",
74
+ "a2ui": "[\n {\n \"id\": \"root\",\n \"component\": \"Column\",\n \"gap\": \"2\",\n \"children\": [\n \"t1\",\n \"t2\",\n \"t3\"\n ]\n },\n {\n \"id\": \"t1\",\n \"component\": \"Toast\",\n \"variant\": \"success\",\n \"text\": \"Saved successfully. Your changes have been saved.\"\n },\n {\n \"id\": \"t2\",\n \"component\": \"Toast\",\n \"variant\": \"warning\",\n \"text\": \"Storage almost full you are using 90% of your available storage.\"\n },\n {\n \"id\": \"t3\",\n \"component\": \"Toast\",\n \"variant\": \"danger\",\n \"text\": \"Upload failed. The file could not be uploaded. Please try again.\",\n \"duration\": 0\n }\n]",
69
75
  "name": "toast-notification"
70
76
  }
71
77
  ],
@@ -84,6 +90,7 @@
84
90
  "alert"
85
91
  ],
86
92
  "name": "UIToast",
93
+ "parts": {},
87
94
  "related": [
88
95
  "Feed",
89
96
  "Alert",
@@ -85,12 +85,24 @@ a2ui:
85
85
  reason: 'Toast pattern.'
86
86
  - rule: 'Typically posted into <feed-ui> via UIFeed.post(...); for inline persistent alerts use <alert-ui> instead.'
87
87
  reason: 'Posting model + surface boundary.'
88
- - rule: 'Variant maps to severity (info, success, warn, error); same tokens as <alert-ui>.'
88
+ - rule: 'Variant maps to severity (info, success, warning, danger); same tokens as <alert-ui>.'
89
89
  reason: 'Visual consistency.'
90
- anti_patterns: []
90
+ - rule: 'Taught default for generated transient notifications — author `Toast` declaratively. It safely dissolves into `<feed-ui>` on connect (SPEC-FEED-CHANNEL-001 Phase 4; see toast.class.js), forwarding only `text`, `duration`, and `position` — not full parity with `UIFeed.post()`, which also accepts `heading`, `icon`, `dismissible`, and `action`, and defaults `variant` to `default` where Toast defaults to `info`. For those extra fields, call `UIFeed.post()` directly (imperative) instead of authoring `Toast`. Do not author `FeedItem` directly either way — <feed-ui>/<feed-item-ui>''s own a2ui rules say not to place it declaratively; that pair is the imperative channel Toast forwards into, not itself a generation target.'
91
+ reason: 'Taught-default ruling (#1363 C6 / #1375): Toast is the sanctioned declarative surface for the fields it forwards; Feed is the underlying imperative/programmatic channel and the only path to its richer fields.'
92
+ anti_patterns:
93
+ - wrong: |
94
+ {"component": "FeedItem", "variant": "success", "text": "Saved successfully."}
95
+ why: |
96
+ <feed-item-ui> is the underlying imperative-channel item — every
97
+ feed.yaml/feed-item.yaml a2ui rule says not to place it
98
+ declaratively. It is meant to be created via UIFeed.post() (or a
99
+ declared <toast-ui>, which forwards into it), never authored
100
+ directly in generated markup.
101
+ fix: |
102
+ {"component": "Toast", "variant": "success", "text": "Saved successfully."}
91
103
  examples:
92
104
  - name: toast-notification
93
- description: Column of three toast notification components showing success, warning, and error variants.
105
+ description: Column of three toast notification components showing success, warning, and danger variants.
94
106
  a2ui: >-
95
107
  [
96
108
  {
@@ -107,25 +119,20 @@ examples:
107
119
  "id": "t1",
108
120
  "component": "Toast",
109
121
  "variant": "success",
110
- "title": "Saved successfully",
111
- "description": "Your changes have been saved.",
112
- "dismissible": true
122
+ "text": "Saved successfully. Your changes have been saved."
113
123
  },
114
124
  {
115
125
  "id": "t2",
116
126
  "component": "Toast",
117
127
  "variant": "warning",
118
- "title": "Storage almost full",
119
- "description": "You are using 90% of your available storage.",
120
- "dismissible": true
128
+ "text": "Storage almost full — you are using 90% of your available storage."
121
129
  },
122
130
  {
123
131
  "id": "t3",
124
132
  "component": "Toast",
125
- "variant": "error",
126
- "title": "Upload failed",
127
- "description": "The file could not be uploaded. Please try again.",
128
- "dismissible": true
133
+ "variant": "danger",
134
+ "text": "Upload failed. The file could not be uploaded. Please try again.",
135
+ "duration": 0
129
136
  }
130
137
  ]
131
138
  keywords:
@@ -81,6 +81,7 @@
81
81
  "heading-nav"
82
82
  ],
83
83
  "name": "UITableOfContents",
84
+ "parts": {},
84
85
  "related": [
85
86
  "aside",
86
87
  "nav",
@@ -59,7 +59,7 @@
59
59
  padding-inline: var(--toc-padding-inline);
60
60
  text-decoration: none;
61
61
  color: inherit;
62
- line-height: 1.4;
62
+ line-height: var(--a-font-leading-normal);
63
63
  border-inline-start: 2px solid var(--toc-rule-inactive);
64
64
  transition:
65
65
  color var(--a-duration-fast) var(--a-easing),
@@ -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/ToggleGroup.json",
4
4
  "title": "ToggleGroup",
5
- "description": "Multi-select button group (unlike <segmented-ui> which is single-select). Hosts <toggle-option-ui> children, each independently toggleable; emits change events with the active value set. Use for filter chips or feature flag clusters; for single-select option groups use <segmented-ui> instead.",
5
+ "description": "DEPRECATED (gh#1369) — use <segmented-ui multiple> + <segment-ui> instead. Multi-select button group (unlike <segmented-ui> which is single-select by default). Hosts <toggle-option-ui> children, each independently toggleable; emits change events with the active value set.",
6
6
  "type": "object",
7
7
  "allOf": [
8
8
  {
@@ -17,7 +17,7 @@
17
17
  "const": "ToggleGroup"
18
18
  },
19
19
  "single": {
20
- "description": "When true, restrict to one active option (single-select).",
20
+ "description": "When true, restrict to one active option (single-select) — clicking the already-selected option again CLEARS it (empty value), unlike a native radiogroup. Migration (gh#1369): [single]=true maps to plain <segmented-ui> (no [multiple]) — note segmented-ui's single-select never clears on re-click, it's standard radiogroup semantics; the default (false, multi-select) maps to <segmented-ui multiple>.",
21
21
  "type": "boolean",
22
22
  "default": false
23
23
  },
@@ -32,6 +32,9 @@
32
32
  ],
33
33
  "unevaluatedProperties": false,
34
34
  "x-adiaui": {
35
+ "allowedChildren": [
36
+ "ToggleOption"
37
+ ],
35
38
  "anti_patterns": [],
36
39
  "category": "navigation",
37
40
  "composes": [],
@@ -60,6 +63,7 @@
60
63
  "group"
61
64
  ],
62
65
  "name": "UIToggleGroup",
66
+ "parts": {},
63
67
  "related": [
64
68
  "ToggleOption",
65
69
  "Segmented",
@@ -76,7 +80,7 @@
76
80
  "name": "idle"
77
81
  }
78
82
  ],
79
- "status": "stable",
83
+ "status": "deprecated",
80
84
  "synonyms": {
81
85
  "toggle-group": [
82
86
  "segmented-control",
@@ -12,13 +12,17 @@
12
12
  */
13
13
 
14
14
  /**
15
+ * DEPRECATED (gh#1369, #1363 C1, ADR-0057) — use <segmented-ui multiple> +
16
+ * <segment-ui> instead (same comma-separated value encoding). Kept working
17
+ * as-is for existing consumers; no behavior change.
18
+ *
15
19
  * <toggle-group-ui value="bold,italic">
16
20
  * <toggle-option-ui value="bold" icon="text-b"></toggle-option-ui>
17
21
  * <toggle-option-ui value="italic" icon="text-italic"></toggle-option-ui>
18
22
  * <toggle-option-ui value="underline" icon="text-underline"></toggle-option-ui>
19
23
  * </toggle-group-ui>
20
24
  *
21
- * Multi-select button group (unlike segmented which is single-select).
25
+ * Multi-select button group (unlike segmented which is single-select by default).
22
26
  *
23
27
  * Properties:
24
28
  * value — comma-separated selected values
@@ -34,11 +38,8 @@ import { UIElement } from '../../core/element.js';
34
38
  // truth. ADR-0056 (gh#1303): the child's current-state surface is the
35
39
  // declared, reflected `selected` prop below, converging onto <segment-ui>'s
36
40
  // mechanism (yaml → catalog → generative grammar) instead of a private
37
- // stamp. `toggle-group-ui` also stamps the legacy `data-selected` attribute
38
- // on the same element in parallel — DEPRECATED, kept only because external
39
- // CSS may already target it as an undocumented hook; its removal rides the
40
- // 0.9.0 breaking wave. Don't set `selected` directly on an option; drive
41
- // the group's `value` instead.
41
+ // stamp. Don't set `selected` directly on an option; drive the group's
42
+ // `value` instead.
42
43
 
43
44
  export class UIToggleOption extends UIElement {
44
45
  static properties = {
@@ -53,7 +54,22 @@ export class UIToggleOption extends UIElement {
53
54
 
54
55
  #stamped = false;
55
56
 
57
+ // gh#1369 (#1363 C1): DEPRECATED — use <segment-ui> inside
58
+ // <segmented-ui multiple> instead. One-time warn, same pattern as
59
+ // UIFormElement's #labelWarned (form.js) — informational only, behavior
60
+ // is unchanged.
61
+ static #deprecationWarned = false;
62
+
56
63
  connected() {
64
+ if (!UIToggleOption.#deprecationWarned) {
65
+ UIToggleOption.#deprecationWarned = true;
66
+ // eslint-disable-next-line no-console
67
+ console.warn(
68
+ '[AdiaUI] <toggle-option-ui> is deprecated — use <segment-ui> ' +
69
+ 'inside <segmented-ui multiple> instead (gh#1369, #1363 C1). ' +
70
+ 'Kept working as-is; no behavior change.',
71
+ );
72
+ }
57
73
  this.setAttribute('role', 'button');
58
74
  this.setAttribute('tabindex', '0');
59
75
  }
@@ -90,11 +106,31 @@ export class UIToggleGroup extends UIElement {
90
106
 
91
107
  #bound = false;
92
108
 
109
+ // gh#1369 (#1363 C1): DEPRECATED — use <segmented-ui multiple> instead.
110
+ static #deprecationWarned = false;
111
+
93
112
  get #valueSet() {
94
113
  return new Set(this.value ? this.value.split(',').map(v => v.trim()).filter(Boolean) : []);
95
114
  }
96
115
 
97
116
  connected() {
117
+ if (!UIToggleGroup.#deprecationWarned) {
118
+ UIToggleGroup.#deprecationWarned = true;
119
+ // #deprecationWarned is a one-shot PER CLASS (not per instance,
120
+ // matching UIFormElement's #labelWarned pattern) — the message can't
121
+ // branch on THIS instance's [single] alone without misleading a page
122
+ // that mixes single and non-single toggle-groups, so it states both
123
+ // mappings instead (gh#1369 review).
124
+ // eslint-disable-next-line no-console
125
+ console.warn(
126
+ '[AdiaUI] <toggle-group-ui> is deprecated (gh#1369, #1363 C1) — ' +
127
+ 'migrate to <segmented-ui multiple> + <segment-ui> (multi-select, ' +
128
+ 'the default) or plain <segmented-ui> with no [multiple] (when ' +
129
+ '[single] is set — note single-select never clears on re-click, ' +
130
+ 'unlike [single]\'s clear-on-reclick). Same comma-separated value ' +
131
+ 'encoding either way. Kept working as-is; no behavior change.',
132
+ );
133
+ }
98
134
  if (!this.#bound) {
99
135
  this.#bound = true;
100
136
  this.addEventListener('click', this.#onClick);
@@ -110,13 +146,8 @@ export class UIToggleGroup extends UIElement {
110
146
  const isSelected = selected.has(optVal);
111
147
  // ADR-0056 (gh#1303): `selected` is the declared, reflected mechanism —
112
148
  // converges onto <segment-ui>'s convention (opt's own render() stamps
113
- // aria-pressed from it). `data-selected` is stamped alongside it only
114
- // as a DEPRECATED parallel hook for pre-existing external CSS; it no
115
- // longer drives styling (toggle-group.css) and its removal rides the
116
- // 0.9.0 breaking wave.
149
+ // aria-pressed from it).
117
150
  opt.selected = isSelected;
118
- if (isSelected) opt.setAttribute('data-selected', '');
119
- else opt.removeAttribute('data-selected');
120
151
  }
121
152
  }
122
153
 
@@ -1,4 +1,9 @@
1
- /* Safari 17.x bug: `:scope:not(...):hover` (Flavor A) and `:scope[selected]`
1
+ /* DEPRECATED (gh#1369, #1363 C1, ADR-0057): <toggle-group-ui>/
2
+ <toggle-option-ui> are superseded by <segmented-ui multiple> +
3
+ <segment-ui> (segment.css owns the equivalent [multiple]-mode styling).
4
+ This file is kept as-is for existing consumers — no behavior change.
5
+
6
+ Safari 17.x bug: `:scope:not(...):hover` (Flavor A) and `:scope[selected]`
2
7
  (Flavor B — attribute-removal restyle) both fail inside `@scope`.
3
8
  Selectors moved out. The @scope is `(toggle-option-ui)` — NOT
4
9
  `(toggle-group-ui)` — so the moved-out selectors target
@@ -10,9 +15,7 @@ toggle-option-ui:not([disabled]):hover {
10
15
  }
11
16
 
12
17
  /* ADR-0056 (gh#1303): converged onto <segment-ui>'s declared, reflected
13
- [selected] prop, set by <toggle-group-ui> (toggle-group.class.js). The
14
- parent also stamps the legacy `data-selected` attribute in parallel —
15
- DEPRECATED, no longer styled here; removal rides the 0.9.0 breaking wave. */
18
+ [selected] prop, set by <toggle-group-ui> (toggle-group.class.js). */
16
19
  toggle-option-ui[selected] {
17
20
  --toggle-option-bg: var(--toggle-option-selected-bg);
18
21
  --toggle-option-fg: var(--toggle-option-selected-fg);
@@ -1,5 +1,5 @@
1
1
  /**
2
- * `<toggle-group-ui>` — Multi-select button group (unlike <segmented-ui> which is single-select). Hosts <toggle-option-ui> children, each independently toggleable; emits change events with the active value set. Use for filter chips or feature flag clusters; for single-select option groups use <segmented-ui> instead.
2
+ * `<toggle-group-ui>` — DEPRECATED (gh#1369) — use <segmented-ui multiple> + <segment-ui> instead. Multi-select button group (unlike <segmented-ui> which is single-select by default). Hosts <toggle-option-ui> children, each independently toggleable; emits change events with the active value set.
3
3
  *
4
4
  * @see https://ui-kit.exe.xyz/site/components/toggle-group
5
5
  *
@@ -20,7 +20,7 @@ export interface ToggleGroupChangeEventDetail {
20
20
  export type ToggleGroupChangeEvent = CustomEvent<ToggleGroupChangeEventDetail>;
21
21
 
22
22
  export class UIToggleGroup extends UIElement {
23
- /** When true, restrict to one active option (single-select). */
23
+ /** When true, restrict to one active option (single-select) — clicking the already-selected option again CLEARS it (empty value), unlike a native radiogroup. Migration (gh#1369): [single]=true maps to plain <segmented-ui> (no [multiple]) — note segmented-ui's single-select never clears on re-click, it's standard radiogroup semantics; the default (false, multi-select) maps to <segmented-ui multiple>. */
24
24
  single: boolean;
25
25
  /** Comma-separated selected values */
26
26
  value: string;
@@ -41,8 +41,7 @@ export class UIToggleOption extends UIElement {
41
41
  /** Whether this option is currently selected. Managed by the parent
42
42
  <toggle-group-ui> container (ADR-0056) — don't set directly; the group's
43
43
  `value` is the single source of truth. Converges onto <segment-ui>'s
44
- declared reflected-prop mechanism (was previously a private
45
- `data-selected` stamp with no declared API surface). */
44
+ declared reflected-prop mechanism. */
46
45
  selected: boolean;
47
46
  /** Visible label text. */
48
47
  text: string;