@adia-ai/web-components 0.0.28 → 0.0.33

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 (349) hide show
  1. package/README.md +4 -8
  2. package/a2ui/index.js +1 -1
  3. package/components/accordion/accordion.a2ui.json +1 -1
  4. package/components/accordion/accordion.js +6 -6
  5. package/components/accordion/accordion.yaml +1 -1
  6. package/components/action-list/action-list.a2ui.json +1 -1
  7. package/components/action-list/action-list.js +6 -6
  8. package/components/action-list/action-list.yaml +1 -1
  9. package/components/agent-artifact/agent-artifact.a2ui.json +1 -1
  10. package/components/agent-artifact/agent-artifact.js +4 -4
  11. package/components/agent-artifact/agent-artifact.yaml +1 -1
  12. package/components/agent-feedback-bar/agent-feedback-bar.a2ui.json +1 -1
  13. package/components/agent-feedback-bar/agent-feedback-bar.js +4 -4
  14. package/components/agent-feedback-bar/agent-feedback-bar.yaml +1 -1
  15. package/components/agent-questions/agent-questions.a2ui.json +1 -1
  16. package/components/agent-questions/agent-questions.js +4 -4
  17. package/components/agent-questions/agent-questions.yaml +1 -1
  18. package/components/agent-reasoning/agent-reasoning.a2ui.json +3 -3
  19. package/components/agent-reasoning/agent-reasoning.js +4 -4
  20. package/components/agent-reasoning/agent-reasoning.yaml +3 -3
  21. package/components/agent-suggestions/agent-suggestions.a2ui.json +1 -1
  22. package/components/agent-suggestions/agent-suggestions.js +4 -4
  23. package/components/agent-suggestions/agent-suggestions.yaml +1 -1
  24. package/components/agent-trace/agent-trace.a2ui.json +1 -1
  25. package/components/agent-trace/agent-trace.js +4 -4
  26. package/components/agent-trace/agent-trace.yaml +1 -1
  27. package/components/alert/alert.a2ui.json +1 -1
  28. package/components/alert/alert.js +4 -4
  29. package/components/alert/alert.yaml +1 -1
  30. package/components/aside/aside.a2ui.json +1 -1
  31. package/components/aside/aside.yaml +1 -1
  32. package/components/avatar/avatar.a2ui.json +1 -1
  33. package/components/avatar/avatar.js +8 -8
  34. package/components/avatar/avatar.yaml +1 -1
  35. package/components/badge/badge.a2ui.json +1 -1
  36. package/components/badge/badge.js +4 -4
  37. package/components/badge/badge.yaml +1 -1
  38. package/components/block/block.a2ui.json +1 -1
  39. package/components/block/block.js +4 -4
  40. package/components/block/block.yaml +1 -1
  41. package/components/breadcrumb/breadcrumb.a2ui.json +1 -1
  42. package/components/breadcrumb/breadcrumb.js +4 -4
  43. package/components/breadcrumb/breadcrumb.yaml +1 -1
  44. package/components/button/button.a2ui.json +1 -1
  45. package/components/button/button.js +4 -4
  46. package/components/button/button.yaml +1 -1
  47. package/components/calendar-picker/calendar-picker.a2ui.json +1 -1
  48. package/components/calendar-picker/calendar-picker.js +6 -6
  49. package/components/calendar-picker/calendar-picker.yaml +1 -1
  50. package/components/canvas/canvas.a2ui.json +1 -1
  51. package/components/canvas/canvas.js +5 -5
  52. package/components/canvas/canvas.yaml +1 -1
  53. package/components/card/card.a2ui.json +1 -1
  54. package/components/card/card.js +4 -4
  55. package/components/card/card.yaml +1 -1
  56. package/components/chart/chart.a2ui.json +1 -1
  57. package/components/chart/chart.js +5 -5
  58. package/components/chart/chart.yaml +1 -1
  59. package/components/chart-legend/chart-legend.a2ui.json +1 -1
  60. package/components/chart-legend/chart-legend.js +7 -7
  61. package/components/chart-legend/chart-legend.yaml +1 -1
  62. package/components/{chat → chat-thread}/chat-input.js +5 -5
  63. package/components/{chat/chat.a2ui.json → chat-thread/chat-thread.a2ui.json} +6 -6
  64. package/components/{chat/chat.css → chat-thread/chat-thread.css} +2 -2
  65. package/components/{chat/chat.js → chat-thread/chat-thread.js} +7 -7
  66. package/components/{chat/chat.yaml → chat-thread/chat-thread.yaml} +4 -4
  67. package/components/check/check.a2ui.json +1 -1
  68. package/components/check/check.js +5 -5
  69. package/components/check/check.yaml +1 -1
  70. package/components/code/code.a2ui.json +1 -1
  71. package/components/code/code.js +4 -4
  72. package/components/code/code.yaml +1 -1
  73. package/components/col/col.a2ui.json +1 -1
  74. package/components/col/col.js +4 -4
  75. package/components/col/col.yaml +1 -1
  76. package/components/color-picker/color-picker.a2ui.json +1 -1
  77. package/components/color-picker/color-picker.js +6 -6
  78. package/components/color-picker/color-picker.yaml +1 -1
  79. package/components/command/command.a2ui.json +1 -1
  80. package/components/command/command.js +5 -5
  81. package/components/command/command.yaml +1 -1
  82. package/components/description-list/description-list.a2ui.json +1 -1
  83. package/components/description-list/description-list.js +4 -4
  84. package/components/description-list/description-list.yaml +1 -1
  85. package/components/divider/divider.a2ui.json +1 -1
  86. package/components/divider/divider.js +4 -4
  87. package/components/divider/divider.yaml +1 -1
  88. package/components/drawer/drawer.a2ui.json +1 -1
  89. package/components/drawer/drawer.js +4 -4
  90. package/components/drawer/drawer.yaml +1 -1
  91. package/components/embed/embed.a2ui.json +1 -1
  92. package/components/embed/embed.js +4 -4
  93. package/components/embed/embed.yaml +1 -1
  94. package/components/empty-state/empty-state.a2ui.json +1 -1
  95. package/components/empty-state/empty-state.js +4 -4
  96. package/components/empty-state/empty-state.yaml +1 -1
  97. package/components/feed/feed-item.yaml +2 -2
  98. package/components/feed/feed.a2ui.json +2 -2
  99. package/components/feed/feed.css +21 -3
  100. package/components/feed/feed.js +140 -31
  101. package/components/feed/feed.yaml +2 -2
  102. package/components/field/field.a2ui.json +1 -1
  103. package/components/field/field.js +10 -10
  104. package/components/field/field.yaml +2 -2
  105. package/components/footer/footer.a2ui.json +1 -1
  106. package/components/footer/footer.yaml +1 -1
  107. package/components/grid/grid.a2ui.json +1 -1
  108. package/components/grid/grid.js +4 -4
  109. package/components/grid/grid.yaml +1 -1
  110. package/components/header/header.a2ui.json +1 -1
  111. package/components/header/header.yaml +1 -1
  112. package/components/heatmap/heatmap.a2ui.json +1 -1
  113. package/components/heatmap/heatmap.js +4 -4
  114. package/components/heatmap/heatmap.yaml +1 -1
  115. package/components/icon/icon.a2ui.json +1 -1
  116. package/components/icon/icon.js +4 -4
  117. package/components/icon/icon.yaml +1 -1
  118. package/components/image/image.a2ui.json +1 -1
  119. package/components/image/image.js +4 -4
  120. package/components/image/image.yaml +1 -1
  121. package/components/index.js +88 -85
  122. package/components/input/input.a2ui.json +1 -1
  123. package/components/input/input.js +7 -7
  124. package/components/input/input.yaml +1 -1
  125. package/components/inspector/inspector.a2ui.json +1 -1
  126. package/components/inspector/inspector.js +4 -4
  127. package/components/inspector/inspector.yaml +1 -1
  128. package/components/kbd/kbd.a2ui.json +1 -1
  129. package/components/kbd/kbd.js +4 -4
  130. package/components/kbd/kbd.yaml +1 -1
  131. package/components/list/list.a2ui.json +1 -1
  132. package/components/list/list.js +6 -6
  133. package/components/list/list.yaml +1 -1
  134. package/components/menu/menu.a2ui.json +1 -1
  135. package/components/menu/menu.js +8 -8
  136. package/components/menu/menu.yaml +1 -1
  137. package/components/modal/modal.a2ui.json +1 -1
  138. package/components/modal/modal.js +4 -4
  139. package/components/modal/modal.yaml +1 -1
  140. package/components/nav/nav.a2ui.json +98 -0
  141. package/components/nav/nav.css +133 -0
  142. package/components/nav/nav.js +140 -0
  143. package/components/nav/nav.test.js +428 -0
  144. package/components/nav/nav.yaml +114 -0
  145. package/components/nav-group/nav-group.a2ui.json +100 -0
  146. package/{patterns/app-nav-group/app-nav-group.css → components/nav-group/nav-group.css} +71 -18
  147. package/{patterns/app-nav-group/app-nav-group.js → components/nav-group/nav-group.js} +51 -25
  148. package/components/nav-group/nav-group.yaml +69 -0
  149. package/components/nav-item/nav-item.a2ui.json +106 -0
  150. package/{patterns/app-nav-item/app-nav-item.css → components/nav-item/nav-item.css} +42 -10
  151. package/components/nav-item/nav-item.js +76 -0
  152. package/components/nav-item/nav-item.yaml +73 -0
  153. package/components/noodles/noodles.a2ui.json +1 -1
  154. package/components/noodles/noodles.js +4 -4
  155. package/components/noodles/noodles.yaml +1 -1
  156. package/components/option-card/option-card.a2ui.json +1 -1
  157. package/components/option-card/option-card.js +6 -6
  158. package/components/option-card/option-card.yaml +1 -1
  159. package/components/otp-input/otp-input.a2ui.json +1 -1
  160. package/components/otp-input/otp-input.js +5 -5
  161. package/components/otp-input/otp-input.yaml +1 -1
  162. package/components/page/page.a2ui.json +3 -3
  163. package/components/page/page.js +4 -4
  164. package/components/page/page.yaml +3 -3
  165. package/components/pagination/pagination.a2ui.json +1 -1
  166. package/components/pagination/pagination.js +4 -4
  167. package/components/pagination/pagination.yaml +1 -1
  168. package/components/pane/pane.a2ui.json +1 -1
  169. package/components/pane/pane.js +4 -4
  170. package/components/pane/pane.yaml +1 -1
  171. package/components/pipeline-status/pipeline-status.a2ui.json +1 -1
  172. package/components/pipeline-status/pipeline-status.js +4 -4
  173. package/components/pipeline-status/pipeline-status.yaml +1 -1
  174. package/components/popover/popover.a2ui.json +1 -1
  175. package/components/popover/popover.js +4 -4
  176. package/components/popover/popover.yaml +1 -1
  177. package/components/progress/progress.a2ui.json +1 -1
  178. package/components/progress/progress.js +4 -4
  179. package/components/progress/progress.yaml +1 -1
  180. package/components/progress-row/progress-row.a2ui.json +1 -1
  181. package/components/progress-row/progress-row.js +4 -4
  182. package/components/progress-row/progress-row.yaml +1 -1
  183. package/components/radio/radio.a2ui.json +1 -1
  184. package/components/radio/radio.js +5 -5
  185. package/components/radio/radio.yaml +1 -1
  186. package/components/range/range.a2ui.json +1 -1
  187. package/components/range/range.js +7 -7
  188. package/components/range/range.yaml +1 -1
  189. package/components/rating/rating.a2ui.json +1 -1
  190. package/components/rating/rating.js +6 -6
  191. package/components/rating/rating.yaml +1 -1
  192. package/components/richtext/richtext.a2ui.json +1 -1
  193. package/components/richtext/richtext.js +4 -4
  194. package/components/richtext/richtext.yaml +1 -1
  195. package/components/row/row.a2ui.json +1 -1
  196. package/components/row/row.js +4 -4
  197. package/components/row/row.yaml +1 -1
  198. package/components/search/search.a2ui.json +1 -1
  199. package/components/search/search.js +5 -5
  200. package/components/search/search.yaml +1 -1
  201. package/components/section/section.a2ui.json +1 -1
  202. package/components/section/section.yaml +1 -1
  203. package/components/segment/segment.a2ui.json +1 -1
  204. package/components/segment/segment.js +4 -4
  205. package/components/segment/segment.yaml +1 -1
  206. package/components/segmented/segmented.a2ui.json +1 -1
  207. package/components/segmented/segmented.css +6 -0
  208. package/components/segmented/segmented.js +7 -7
  209. package/components/segmented/segmented.yaml +1 -1
  210. package/components/select/select.a2ui.json +1 -1
  211. package/components/select/select.js +5 -5
  212. package/components/select/select.yaml +1 -1
  213. package/components/skeleton/skeleton.a2ui.json +1 -1
  214. package/components/skeleton/skeleton.js +4 -4
  215. package/components/skeleton/skeleton.yaml +1 -1
  216. package/components/slider/slider.a2ui.json +1 -1
  217. package/components/slider/slider.js +7 -7
  218. package/components/slider/slider.yaml +1 -1
  219. package/components/stack/stack.a2ui.json +1 -1
  220. package/components/stack/stack.js +4 -4
  221. package/components/stack/stack.yaml +1 -1
  222. package/components/stat/stat.a2ui.json +1 -1
  223. package/components/stat/stat.js +4 -4
  224. package/components/stat/stat.yaml +1 -1
  225. package/components/stepper/stepper.a2ui.json +1 -1
  226. package/components/stepper/stepper.js +6 -6
  227. package/components/stepper/stepper.yaml +1 -1
  228. package/components/stream/stream.a2ui.json +1 -1
  229. package/components/stream/stream.js +4 -4
  230. package/components/stream/stream.yaml +1 -1
  231. package/components/swatch/swatch.a2ui.json +1 -1
  232. package/components/swatch/swatch.js +4 -4
  233. package/components/swatch/swatch.yaml +1 -1
  234. package/components/swiper/swiper.a2ui.json +1 -1
  235. package/components/swiper/swiper.js +4 -4
  236. package/components/swiper/swiper.yaml +1 -1
  237. package/components/switch/switch.a2ui.json +1 -1
  238. package/components/switch/switch.js +5 -5
  239. package/components/switch/switch.yaml +1 -1
  240. package/components/table/table.a2ui.json +1 -1
  241. package/components/table/table.js +4 -4
  242. package/components/table/table.yaml +1 -1
  243. package/components/table-toolbar/table-toolbar.a2ui.json +1 -1
  244. package/components/table-toolbar/table-toolbar.js +4 -4
  245. package/components/table-toolbar/table-toolbar.yaml +1 -1
  246. package/components/tabs/tab.js +4 -4
  247. package/components/tabs/tabs.a2ui.json +1 -1
  248. package/components/tabs/tabs.js +5 -5
  249. package/components/tabs/tabs.yaml +1 -1
  250. package/components/tag/tag.a2ui.json +1 -1
  251. package/components/tag/tag.js +4 -4
  252. package/components/tag/tag.yaml +1 -1
  253. package/components/text/text.a2ui.json +1 -1
  254. package/components/text/text.js +4 -4
  255. package/components/text/text.yaml +1 -1
  256. package/components/textarea/textarea.a2ui.json +1 -1
  257. package/components/textarea/textarea.js +5 -5
  258. package/components/textarea/textarea.yaml +1 -1
  259. package/components/timeline/timeline.a2ui.json +1 -1
  260. package/components/timeline/timeline.js +6 -6
  261. package/components/timeline/timeline.yaml +1 -1
  262. package/components/toast/toast.a2ui.json +1 -1
  263. package/components/toast/toast.js +54 -184
  264. package/components/toast/toast.yaml +1 -1
  265. package/components/toggle-group/toggle-group.a2ui.json +1 -1
  266. package/components/toggle-group/toggle-group.js +6 -6
  267. package/components/toggle-group/toggle-group.yaml +1 -1
  268. package/components/toolbar/toolbar.a2ui.json +1 -1
  269. package/components/toolbar/toolbar.js +6 -6
  270. package/components/toolbar/toolbar.yaml +1 -1
  271. package/components/tooltip/tooltip.a2ui.json +1 -1
  272. package/components/tooltip/tooltip.js +7 -7
  273. package/components/tooltip/tooltip.yaml +1 -1
  274. package/components/tree/tree.a2ui.json +1 -1
  275. package/components/tree/tree.js +6 -6
  276. package/components/tree/tree.yaml +1 -1
  277. package/components/upload/upload.a2ui.json +1 -1
  278. package/components/upload/upload.js +6 -6
  279. package/components/upload/upload.yaml +1 -1
  280. package/core/element.js +4 -4
  281. package/core/element.test.js +18 -18
  282. package/core/form.js +9 -9
  283. package/core/index.js +2 -2
  284. package/core/provider.js +7 -7
  285. package/core/template.js +1 -1
  286. package/index.css +3 -2
  287. package/index.js +17 -7
  288. package/package.json +1 -5
  289. package/styles/components.css +10 -6
  290. package/styles/resets.css +1 -1
  291. package/traits/define.js +2 -2
  292. package/patterns/a2ui-root/a2ui-root.a2ui.json +0 -125
  293. package/patterns/a2ui-root/a2ui-root.js +0 -191
  294. package/patterns/a2ui-root/a2ui-root.yaml +0 -87
  295. package/patterns/adia-chat/adia-chat.a2ui.json +0 -149
  296. package/patterns/adia-chat/adia-chat.css +0 -10
  297. package/patterns/adia-chat/adia-chat.js +0 -297
  298. package/patterns/adia-chat/adia-chat.yaml +0 -118
  299. package/patterns/adia-chat/css/adia-chat.empty.css +0 -12
  300. package/patterns/adia-chat/css/adia-chat.layout.css +0 -60
  301. package/patterns/adia-chat/css/adia-chat.markdown.css +0 -74
  302. package/patterns/adia-chat/css/adia-chat.messages.css +0 -87
  303. package/patterns/adia-chat/css/adia-chat.streaming.css +0 -30
  304. package/patterns/adia-chat/css/adia-chat.tokens.css +0 -95
  305. package/patterns/adia-editor/adia-editor.a2ui.json +0 -73
  306. package/patterns/adia-editor/adia-editor.css +0 -6
  307. package/patterns/adia-editor/adia-editor.js +0 -56
  308. package/patterns/adia-editor/adia-editor.yaml +0 -59
  309. package/patterns/adia-editor/css/adia-editor.layout.css +0 -171
  310. package/patterns/adia-editor/css/adia-editor.tokens.css +0 -28
  311. package/patterns/app-nav/app-nav.a2ui.json +0 -89
  312. package/patterns/app-nav/app-nav.css +0 -92
  313. package/patterns/app-nav/app-nav.js +0 -112
  314. package/patterns/app-nav/app-nav.yaml +0 -54
  315. package/patterns/app-nav-group/app-nav-group.a2ui.json +0 -82
  316. package/patterns/app-nav-group/app-nav-group.yaml +0 -59
  317. package/patterns/app-nav-item/app-nav-item.a2ui.json +0 -83
  318. package/patterns/app-nav-item/app-nav-item.js +0 -42
  319. package/patterns/app-nav-item/app-nav-item.yaml +0 -62
  320. package/patterns/app-shell/app-shell.a2ui.json +0 -129
  321. package/patterns/app-shell/app-shell.css +0 -14
  322. package/patterns/app-shell/app-shell.js +0 -251
  323. package/patterns/app-shell/app-shell.yaml +0 -89
  324. package/patterns/app-shell/css/app-shell.collapsed.css +0 -86
  325. package/patterns/app-shell/css/app-shell.helpers.css +0 -42
  326. package/patterns/app-shell/css/app-shell.main.css +0 -172
  327. package/patterns/app-shell/css/app-shell.shell.css +0 -44
  328. package/patterns/app-shell/css/app-shell.sidebar.css +0 -161
  329. package/patterns/app-shell/css/app-shell.templates.css +0 -214
  330. package/patterns/app-shell/css/app-shell.tokens.css +0 -119
  331. package/patterns/gen-ui/gen-ui.a2ui.json +0 -72
  332. package/patterns/gen-ui/gen-ui.css +0 -83
  333. package/patterns/gen-ui/gen-ui.js +0 -136
  334. package/patterns/gen-ui/gen-ui.yaml +0 -43
  335. package/patterns/index.js +0 -11
  336. package/patterns/section-nav/section-nav.a2ui.json +0 -91
  337. package/patterns/section-nav/section-nav.css +0 -60
  338. package/patterns/section-nav/section-nav.js +0 -42
  339. package/patterns/section-nav/section-nav.yaml +0 -58
  340. package/patterns/section-nav-group/section-nav-group.a2ui.json +0 -95
  341. package/patterns/section-nav-group/section-nav-group.css +0 -74
  342. package/patterns/section-nav-group/section-nav-group.js +0 -84
  343. package/patterns/section-nav-group/section-nav-group.yaml +0 -66
  344. package/patterns/section-nav-item/section-nav-item.a2ui.json +0 -97
  345. package/patterns/section-nav-item/section-nav-item.css +0 -106
  346. package/patterns/section-nav-item/section-nav-item.js +0 -66
  347. package/patterns/section-nav-item/section-nav-item.yaml +0 -70
  348. package/styles/layouts/admin.css +0 -7
  349. /package/components/{chat → chat-thread}/chat-input.css +0 -0
@@ -1,112 +0,0 @@
1
- /**
2
- * <app-nav-ui> — Collapsible navigation sidebar.
3
- *
4
- * Structure:
5
- * <app-nav-ui>
6
- * <app-nav-group-ui icon="gear" text="Settings" badge="3">
7
- * <app-nav-item-ui text="General" value="/settings/general"></app-nav-item-ui>
8
- * </app-nav-group-ui>
9
- * <app-nav-item-ui icon="user" text="Profile" value="/profile"></app-nav-item-ui>
10
- * </app-nav-ui>
11
- *
12
- * When [collapsed], labels and badges hide; groups open a popover with their
13
- * children instead of expanding inline.
14
- *
15
- * Event: nav-select (detail: { item, text, value })
16
- */
17
-
18
- import { AdiaElement } from '../../core/element.js';
19
-
20
- class AdiaAppNav extends AdiaElement {
21
- static properties = {
22
- collapsed: { type: Boolean, default: false, reflect: true },
23
- divider: { type: Boolean, default: false, reflect: true },
24
- };
25
-
26
- static template = () => null;
27
-
28
- #ro = null;
29
-
30
- connected() {
31
- this.setAttribute('role', 'navigation');
32
- this.addEventListener('click', this.#onClick);
33
- this.#ro = new ResizeObserver(() => this.#updateTooltips());
34
- this.#ro.observe(this);
35
- }
36
-
37
- render() {
38
- this.#updateTooltips();
39
- }
40
-
41
- #updateTooltips() {
42
- const isCollapsed = this.collapsed || this.getBoundingClientRect().width <= 96;
43
- for (const group of this.querySelectorAll(':scope > app-nav-group-ui')) {
44
- const header = group.querySelector(':scope > [slot="header"]');
45
- if (header) header.title = isCollapsed ? group.text : '';
46
- }
47
- for (const item of this.querySelectorAll(':scope > app-nav-item-ui')) {
48
- item.title = isCollapsed ? item.text : '';
49
- }
50
- }
51
-
52
- get selectedItem() {
53
- return this.querySelector('app-nav-item-ui[selected]');
54
- }
55
-
56
- select(item) {
57
- const prev = this.selectedItem;
58
- if (prev && prev !== item) prev.removeAttribute('selected');
59
- item.setAttribute('selected', '');
60
- this.dispatchEvent(new CustomEvent('nav-select', {
61
- bubbles: true,
62
- detail: { item, text: item.text, value: item.value },
63
- }));
64
- }
65
-
66
- toggle() {
67
- this.collapsed = !this.collapsed;
68
- }
69
-
70
- #onClick = (e) => {
71
- const item = e.target.closest('app-nav-item-ui');
72
- if (item && this.contains(item)) {
73
- this.select(item);
74
- this.#flushHoverState();
75
- return;
76
- }
77
-
78
- const group = e.target.closest('app-nav-group-ui');
79
- if (group && this.contains(group)) {
80
- const isCollapsed = this.collapsed || this.getBoundingClientRect().width <= 96;
81
- if (isCollapsed) {
82
- group.showPopover();
83
- } else {
84
- const header = group.querySelector(':scope > [slot="header"]');
85
- if (header && (e.target === header || header.contains(e.target))) {
86
- group.open = !group.open;
87
- }
88
- }
89
- }
90
- };
91
-
92
- // Safari macOS leaves `:hover` stuck on items the cursor passed through
93
- // when the DOM mutates during click+route navigation (no `mouseleave`
94
- // fires). Toggling pointer-events on the container forces Safari to
95
- // re-evaluate hover state on next paint without flickering layout.
96
- // Documented in docs/BROWSER-COMPAT.md §3a.
97
- #flushHoverState() {
98
- this.style.pointerEvents = 'none';
99
- requestAnimationFrame(() => {
100
- this.style.pointerEvents = '';
101
- });
102
- }
103
-
104
- disconnected() {
105
- this.removeEventListener('click', this.#onClick);
106
- this.#ro?.disconnect();
107
- this.#ro = null;
108
- }
109
- }
110
- customElements.define('app-nav-ui', AdiaAppNav);
111
-
112
- export { AdiaAppNav };
@@ -1,54 +0,0 @@
1
- $schema: ../../../../scripts/schemas/component.yaml.schema.json
2
- name: AdiaAppNav
3
- tag: app-nav-ui
4
- component: AppNav
5
- category: nav
6
- version: 1
7
- description: |
8
- Collapsible navigation sidebar. Manages selection state across
9
- app-nav-item-ui children and opens popover menus for app-nav-group-ui
10
- children when collapsed.
11
-
12
- props:
13
- collapsed:
14
- type: boolean
15
- default: false
16
- reflect: true
17
- description: When true, labels and badges hide; only icons show. Groups use popovers instead of inline expansion.
18
-
19
- divider:
20
- type: boolean
21
- default: false
22
- reflect: true
23
- description: Render auto-dividers between groups.
24
-
25
- events:
26
- nav-select:
27
- description: Fired when a child app-nav-item-ui is selected (via click or the .select() method).
28
- detail:
29
- item: HTMLElement
30
- text: string
31
- value: string
32
-
33
- slots:
34
- default:
35
- description: app-nav-group-ui and app-nav-item-ui children.
36
-
37
- states:
38
- - name: idle
39
- description: Default, interactive.
40
- - name: collapsed
41
- attribute: collapsed
42
- description: Narrow-width mode; groups open popovers instead of expanding.
43
-
44
- traits: []
45
-
46
- a2ui:
47
- rules:
48
- - app-nav-ui is the only valid parent of app-nav-group-ui.
49
- - app-nav-item-ui may be a direct child of app-nav-ui OR nested inside app-nav-group-ui.
50
-
51
- keywords: [app-nav, sidebar, navigation, nav, menu]
52
- synonyms:
53
- sidebar: [app-nav, nav, navigation]
54
- related: [AppShell, AppNavGroup, AppNavItem]
@@ -1,82 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://adiaui.dev/a2ui/v0_9/components/AppNavGroup.json",
4
- "title": "AppNavGroup",
5
- "description": "Collapsible group inside app-nav-ui. Has icon, label, optional badge, and\na caret indicating open/closed. When the parent app-nav-ui is collapsed,\nclicking the group opens a popover with its children instead of toggling\ninline expansion.\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
- "badge": {
17
- "description": "Optional badge text (e.g. unread count).",
18
- "type": "string",
19
- "default": ""
20
- },
21
- "component": {
22
- "const": "AppNavGroup"
23
- },
24
- "icon": {
25
- "description": "Phosphor icon name rendered in the group header.",
26
- "type": "string",
27
- "default": ""
28
- },
29
- "open": {
30
- "description": "Expanded state. Toggled by header click; ignored when parent nav is collapsed (popover used instead).",
31
- "type": "boolean",
32
- "default": false
33
- },
34
- "text": {
35
- "description": "Group label text.",
36
- "type": "string",
37
- "default": ""
38
- }
39
- },
40
- "required": [
41
- "component"
42
- ],
43
- "unevaluatedProperties": false,
44
- "x-adiaui": {
45
- "anti_patterns": [],
46
- "category": "nav",
47
- "events": {},
48
- "examples": [],
49
- "keywords": [
50
- "app-nav-group",
51
- "nav",
52
- "group",
53
- "menu-section"
54
- ],
55
- "name": "AdiaAppNavGroup",
56
- "related": [
57
- "AppNav",
58
- "AppNavItem"
59
- ],
60
- "slots": {
61
- "default": {
62
- "description": "app-nav-item-ui children rendered beneath the group header."
63
- }
64
- },
65
- "states": [
66
- {
67
- "description": "Default, collapsed or open based on [open].",
68
- "name": "idle"
69
- },
70
- {
71
- "description": "Group is expanded; children visible.",
72
- "attribute": "open",
73
- "name": "open"
74
- }
75
- ],
76
- "synonyms": {},
77
- "tag": "app-nav-group-ui",
78
- "tokens": {},
79
- "traits": [],
80
- "version": 1
81
- }
82
- }
@@ -1,59 +0,0 @@
1
- $schema: ../../../../scripts/schemas/component.yaml.schema.json
2
- name: AdiaAppNavGroup
3
- tag: app-nav-group-ui
4
- component: AppNavGroup
5
- category: nav
6
- version: 1
7
- description: |
8
- Collapsible group inside app-nav-ui. Has icon, label, optional badge, and
9
- a caret indicating open/closed. When the parent app-nav-ui is collapsed,
10
- clicking the group opens a popover with its children instead of toggling
11
- inline expansion.
12
-
13
- props:
14
- text:
15
- type: string
16
- default: ""
17
- reflect: true
18
- description: Group label text.
19
-
20
- icon:
21
- type: string
22
- default: ""
23
- reflect: true
24
- description: Phosphor icon name rendered in the group header.
25
-
26
- badge:
27
- type: string
28
- default: ""
29
- reflect: true
30
- description: Optional badge text (e.g. unread count).
31
-
32
- open:
33
- type: boolean
34
- default: false
35
- reflect: true
36
- description: Expanded state. Toggled by header click; ignored when parent nav is collapsed (popover used instead).
37
-
38
- events: {}
39
-
40
- slots:
41
- default:
42
- description: app-nav-item-ui children rendered beneath the group header.
43
-
44
- states:
45
- - name: idle
46
- description: Default, collapsed or open based on [open].
47
- - name: open
48
- attribute: open
49
- description: Group is expanded; children visible.
50
-
51
- traits: []
52
-
53
- a2ui:
54
- rules:
55
- - Must be a direct child of app-nav-ui.
56
- - Children must be app-nav-item-ui, not arbitrary components.
57
-
58
- keywords: [app-nav-group, nav, group, menu-section]
59
- related: [AppNav, AppNavItem]
@@ -1,83 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://adiaui.dev/a2ui/v0_9/components/AppNavItem.json",
4
- "title": "AppNavItem",
5
- "description": "Single navigation link in app-nav-ui, optionally nested inside\napp-nav-group-ui. Icon + label + optional badge. Selection is managed\nby the parent app-nav-ui — set via clicking or nav.select(item).\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
- "badge": {
17
- "description": "Optional trailing badge text (count, \"New\", etc.).",
18
- "type": "string",
19
- "default": ""
20
- },
21
- "component": {
22
- "const": "AppNavItem"
23
- },
24
- "icon": {
25
- "description": "Phosphor icon name (leading).",
26
- "type": "string",
27
- "default": ""
28
- },
29
- "selected": {
30
- "description": "Current selection. Managed by parent app-nav-ui — don't set multiple siblings.",
31
- "type": "boolean",
32
- "default": false
33
- },
34
- "text": {
35
- "description": "Item label.",
36
- "type": "string",
37
- "default": ""
38
- },
39
- "value": {
40
- "description": "Unique identifier for selection tracking (also the route / target id).",
41
- "type": "string",
42
- "default": ""
43
- }
44
- },
45
- "required": [
46
- "component"
47
- ],
48
- "unevaluatedProperties": false,
49
- "x-adiaui": {
50
- "anti_patterns": [],
51
- "category": "nav",
52
- "events": {},
53
- "examples": [],
54
- "keywords": [
55
- "app-nav-item",
56
- "nav",
57
- "link",
58
- "menu-item"
59
- ],
60
- "name": "AdiaAppNavItem",
61
- "related": [
62
- "AppNav",
63
- "AppNavGroup"
64
- ],
65
- "slots": {},
66
- "states": [
67
- {
68
- "description": "Default.",
69
- "name": "idle"
70
- },
71
- {
72
- "description": "Currently selected nav destination.",
73
- "attribute": "selected",
74
- "name": "selected"
75
- }
76
- ],
77
- "synonyms": {},
78
- "tag": "app-nav-item-ui",
79
- "tokens": {},
80
- "traits": [],
81
- "version": 1
82
- }
83
- }
@@ -1,42 +0,0 @@
1
- /**
2
- * <app-nav-item-ui> — Single navigation link in app-nav-ui (optionally
3
- * nested under app-nav-group-ui). Supports icon, label, and optional badge.
4
- *
5
- * Selection is managed by the parent app-nav-ui; setting `selected` is
6
- * a side-effect of calling nav.select(item) or user click.
7
- */
8
-
9
- import { AdiaElement } from '../../core/element.js';
10
-
11
- class AdiaAppNavItem extends AdiaElement {
12
- static properties = {
13
- text: { type: String, default: '', reflect: true },
14
- icon: { type: String, default: '', reflect: true },
15
- value: { type: String, default: '', reflect: true },
16
- badge: { type: String, default: '', reflect: true },
17
- selected: { type: Boolean, default: false, reflect: true },
18
- };
19
-
20
- static template = () => null;
21
-
22
- connected() {
23
- this.setAttribute('role', 'link');
24
- this.setAttribute('tabindex', '0');
25
-
26
- if (!this.querySelector('[slot="text"]')) {
27
- this.innerHTML = `
28
- <span slot="icon">${this.icon ? `<icon-ui name="${this.icon}"></icon-ui>` : ''}</span>
29
- <span slot="text">${this.text}</span>
30
- ${this.badge ? `<span slot="badge">${this.badge}</span>` : ''}
31
- `;
32
- }
33
- }
34
-
35
- render() {
36
- const textEl = this.querySelector('[slot="text"]');
37
- if (textEl) textEl.textContent = this.text;
38
- }
39
- }
40
- customElements.define('app-nav-item-ui', AdiaAppNavItem);
41
-
42
- export { AdiaAppNavItem };
@@ -1,62 +0,0 @@
1
- $schema: ../../../../scripts/schemas/component.yaml.schema.json
2
- name: AdiaAppNavItem
3
- tag: app-nav-item-ui
4
- component: AppNavItem
5
- category: nav
6
- version: 1
7
- description: |
8
- Single navigation link in app-nav-ui, optionally nested inside
9
- app-nav-group-ui. Icon + label + optional badge. Selection is managed
10
- by the parent app-nav-ui — set via clicking or nav.select(item).
11
-
12
- props:
13
- text:
14
- type: string
15
- default: ""
16
- reflect: true
17
- description: Item label.
18
-
19
- icon:
20
- type: string
21
- default: ""
22
- reflect: true
23
- description: Phosphor icon name (leading).
24
-
25
- value:
26
- type: string
27
- default: ""
28
- reflect: true
29
- description: Unique identifier for selection tracking (also the route / target id).
30
-
31
- badge:
32
- type: string
33
- default: ""
34
- reflect: true
35
- description: Optional trailing badge text (count, "New", etc.).
36
-
37
- selected:
38
- type: boolean
39
- default: false
40
- reflect: true
41
- description: Current selection. Managed by parent app-nav-ui — don't set multiple siblings.
42
-
43
- events: {}
44
-
45
- slots: {}
46
-
47
- states:
48
- - name: idle
49
- description: Default.
50
- - name: selected
51
- attribute: selected
52
- description: Currently selected nav destination.
53
-
54
- traits: []
55
-
56
- a2ui:
57
- rules:
58
- - Must be a descendant of app-nav-ui (direct child or via app-nav-group-ui).
59
- - Only one sibling may have selected=true at a time; prefer calling nav.select() over setting the attribute manually.
60
-
61
- keywords: [app-nav-item, nav, link, menu-item]
62
- related: [AppNav, AppNavGroup]
@@ -1,129 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://adiaui.dev/a2ui/v0_9/components/AppShell.json",
4
- "title": "AppShell",
5
- "description": "Behavior-only application shell. Wires sidebar toggles, resize handles,\na Cmd+K command palette, and a ResizeObserver that drives responsive\nsidebar collapse. Author supplies the DOM (aside[data-sidebar], main,\ndialog[data-command]); app-shell-ui binds the interactions.\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
- "component": {
17
- "const": "AppShell"
18
- },
19
- "mode": {
20
- "description": "Layout variant — default is bordered surface; rounded softens edges; borderless removes the outer chrome.",
21
- "type": "string",
22
- "enum": [
23
- "",
24
- "rounded",
25
- "borderless"
26
- ],
27
- "default": ""
28
- }
29
- },
30
- "required": [
31
- "component"
32
- ],
33
- "unevaluatedProperties": false,
34
- "x-adiaui": {
35
- "anti_patterns": [],
36
- "category": "layout",
37
- "events": {
38
- "command-select": {
39
- "description": "Forwarded from the command palette when an option is chosen.",
40
- "detail": {
41
- "value": "string"
42
- }
43
- },
44
- "sidebar-resize": {
45
- "description": "Fired as a sidebar is dragged; debounced on the trailing edge.",
46
- "detail": {
47
- "sidebar": "string",
48
- "width": "number"
49
- }
50
- },
51
- "sidebar-toggle": {
52
- "description": "Fired when a sidebar is collapsed or expanded.",
53
- "detail": {
54
- "expanded": "boolean",
55
- "sidebar": "string"
56
- }
57
- }
58
- },
59
- "examples": [],
60
- "keywords": [
61
- "app-shell",
62
- "shell",
63
- "layout",
64
- "admin",
65
- "dashboard",
66
- "sidebar",
67
- "nav"
68
- ],
69
- "name": "AdiaAppShell",
70
- "related": [
71
- "AppNav",
72
- "AppNavGroup",
73
- "AppNavItem",
74
- "Command"
75
- ],
76
- "slots": {
77
- "description": {
78
- "description": "Secondary metadata inside any chrome bar. Muted + --a-ui-sm size."
79
- },
80
- "default": {
81
- "description": "Author-supplied page DOM. Expected structure — aside[data-sidebar] for navigation, main for content, optional dialog[data-command] for Cmd+K."
82
- },
83
- "action": {
84
- "description": "Trailing control cluster inside any chrome bar. The first [slot=\"action\"] child pushes itself (and siblings) to the end; subsequent siblings flow with gap. Coexists with legacy <span data-spacer> / <div data-actions> hooks for one release — new code should prefer slots."
85
- },
86
- "action-leading": {
87
- "description": "Leading (inline-start) control cluster inside any chrome bar. Pairs with [slot=\"action\"] for dual-cluster chrome (e.g. back button + breadcrumb on the left, primary actions on the right). Replaces the legacy <span data-spacer> hack."
88
- },
89
- "heading": {
90
- "description": "Primary label inside any chrome bar. Medium-weight + strong fg."
91
- },
92
- "icon": {
93
- "description": "Leading glyph inside any chrome bar — > main > header / footer and [data-sidebar] > header / footer. Muted color, flex-align."
94
- }
95
- },
96
- "states": [
97
- {
98
- "description": "Default, interactive shell.",
99
- "name": "idle"
100
- },
101
- {
102
- "description": "Leading sidebar is collapsed; content expands.",
103
- "attribute": "data-sidebar-leading-collapsed",
104
- "name": "collapsed-leading"
105
- },
106
- {
107
- "description": "Trailing sidebar (inspector) is collapsed.",
108
- "attribute": "data-sidebar-trailing-collapsed",
109
- "name": "collapsed-trailing"
110
- }
111
- ],
112
- "synonyms": {
113
- "admin": [
114
- "dashboard",
115
- "shell",
116
- "app-shell"
117
- ],
118
- "dashboard": [
119
- "admin",
120
- "shell",
121
- "app-shell"
122
- ]
123
- },
124
- "tag": "app-shell-ui",
125
- "tokens": {},
126
- "traits": [],
127
- "version": 1
128
- }
129
- }
@@ -1,14 +0,0 @@
1
- /* ═══════════════════════════════════════════════════════════════
2
- App Shell — <app-shell-ui> pattern component CSS
3
-
4
- Split into constituent parts for maintainability.
5
- Import order matters: tokens first, then structure, then overrides.
6
- ═══════════════════════════════════════════════════════════════ */
7
-
8
- @import "./css/app-shell.tokens.css";
9
- @import "./css/app-shell.shell.css";
10
- @import "./css/app-shell.main.css";
11
- @import "./css/app-shell.sidebar.css";
12
- @import "./css/app-shell.collapsed.css";
13
- @import "./css/app-shell.templates.css";
14
- @import "./css/app-shell.helpers.css";