@adia-ai/web-components 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +195 -0
- package/a2ui/dockables/action.js +152 -0
- package/a2ui/dockables/base.js +30 -0
- package/a2ui/dockables/controller.js +97 -0
- package/a2ui/dockables/data-source.js +103 -0
- package/a2ui/dockables/index.js +6 -0
- package/a2ui/dockables/lifecycle.js +84 -0
- package/a2ui/dockables/provider.js +59 -0
- package/a2ui/index.js +19 -0
- package/a2ui/manifest-runtime.js +226 -0
- package/a2ui/registry.js +200 -0
- package/a2ui/renderer.js +361 -0
- package/a2ui/root.js +152 -0
- package/a2ui/stream.js +243 -0
- package/a2ui/surface-manifest.js +294 -0
- package/a2ui/surface.js +222 -0
- package/a2ui/wire-factory.js +134 -0
- package/a2ui/wiring-engine.js +209 -0
- package/a2ui/wiring-registry.js +342 -0
- package/components/accordion/accordion.a2ui.json +129 -0
- package/components/accordion/accordion.css +133 -0
- package/components/accordion/accordion.js +125 -0
- package/components/accordion/accordion.yaml +527 -0
- package/components/action-list/action-list.a2ui.json +64 -0
- package/components/action-list/action-list.css +115 -0
- package/components/action-list/action-list.js +149 -0
- package/components/action-list/action-list.yaml +56 -0
- package/components/agent-artifact/agent-artifact.a2ui.json +99 -0
- package/components/agent-artifact/agent-artifact.css +94 -0
- package/components/agent-artifact/agent-artifact.js +169 -0
- package/components/agent-artifact/agent-artifact.yaml +71 -0
- package/components/agent-feedback-bar/agent-feedback-bar.a2ui.json +91 -0
- package/components/agent-feedback-bar/agent-feedback-bar.css +33 -0
- package/components/agent-feedback-bar/agent-feedback-bar.js +152 -0
- package/components/agent-feedback-bar/agent-feedback-bar.yaml +65 -0
- package/components/agent-questions/agent-questions.a2ui.json +89 -0
- package/components/agent-questions/agent-questions.css +146 -0
- package/components/agent-questions/agent-questions.js +189 -0
- package/components/agent-questions/agent-questions.yaml +63 -0
- package/components/agent-reasoning/agent-reasoning.a2ui.json +100 -0
- package/components/agent-reasoning/agent-reasoning.css +273 -0
- package/components/agent-reasoning/agent-reasoning.js +469 -0
- package/components/agent-reasoning/agent-reasoning.yaml +70 -0
- package/components/agent-suggestions/agent-suggestions.a2ui.json +87 -0
- package/components/agent-suggestions/agent-suggestions.css +18 -0
- package/components/agent-suggestions/agent-suggestions.js +87 -0
- package/components/agent-suggestions/agent-suggestions.yaml +59 -0
- package/components/agent-trace/agent-trace.a2ui.json +78 -0
- package/components/agent-trace/agent-trace.css +275 -0
- package/components/agent-trace/agent-trace.js +216 -0
- package/components/agent-trace/agent-trace.yaml +53 -0
- package/components/alert/alert.a2ui.json +211 -0
- package/components/alert/alert.css +88 -0
- package/components/alert/alert.js +96 -0
- package/components/alert/alert.yaml +205 -0
- package/components/avatar/avatar.a2ui.json +215 -0
- package/components/avatar/avatar.css +159 -0
- package/components/avatar/avatar.js +157 -0
- package/components/avatar/avatar.yaml +559 -0
- package/components/badge/badge.a2ui.json +169 -0
- package/components/badge/badge.css +78 -0
- package/components/badge/badge.js +53 -0
- package/components/badge/badge.yaml +612 -0
- package/components/block/block.a2ui.json +135 -0
- package/components/block/block.css +29 -0
- package/components/block/block.js +23 -0
- package/components/block/block.yaml +115 -0
- package/components/breadcrumb/breadcrumb.a2ui.json +86 -0
- package/components/breadcrumb/breadcrumb.css +78 -0
- package/components/breadcrumb/breadcrumb.js +44 -0
- package/components/breadcrumb/breadcrumb.yaml +84 -0
- package/components/button/button.a2ui.json +172 -0
- package/components/button/button.css +168 -0
- package/components/button/button.js +60 -0
- package/components/button/button.yaml +120 -0
- package/components/calendar-picker/calendar-picker.a2ui.json +139 -0
- package/components/calendar-picker/calendar-picker.css +321 -0
- package/components/calendar-picker/calendar-picker.js +324 -0
- package/components/calendar-picker/calendar-picker.yaml +243 -0
- package/components/canvas/canvas.a2ui.json +75 -0
- package/components/canvas/canvas.css +52 -0
- package/components/canvas/canvas.js +179 -0
- package/components/canvas/canvas.yaml +62 -0
- package/components/card/card.a2ui.json +276 -0
- package/components/card/card.css +362 -0
- package/components/card/card.js +58 -0
- package/components/card/card.yaml +527 -0
- package/components/chart/chart.a2ui.json +298 -0
- package/components/chart/chart.css +512 -0
- package/components/chart/chart.js +1075 -0
- package/components/chart/chart.yaml +540 -0
- package/components/chat/chat-input.css +141 -0
- package/components/chat/chat-input.js +242 -0
- package/components/chat/chat.a2ui.json +181 -0
- package/components/chat/chat.css +193 -0
- package/components/chat/chat.js +155 -0
- package/components/chat/chat.yaml +230 -0
- package/components/check/check.a2ui.json +134 -0
- package/components/check/check.css +126 -0
- package/components/check/check.js +58 -0
- package/components/check/check.yaml +109 -0
- package/components/code/code.a2ui.json +153 -0
- package/components/code/code.css +133 -0
- package/components/code/code.js +114 -0
- package/components/code/code.yaml +163 -0
- package/components/col/col.a2ui.json +104 -0
- package/components/col/col.css +36 -0
- package/components/col/col.js +19 -0
- package/components/col/col.yaml +364 -0
- package/components/color-picker/color-picker.a2ui.json +100 -0
- package/components/color-picker/color-picker.css +182 -0
- package/components/color-picker/color-picker.js +537 -0
- package/components/color-picker/color-picker.yaml +105 -0
- package/components/command/command.a2ui.json +221 -0
- package/components/command/command.css +251 -0
- package/components/command/command.js +284 -0
- package/components/command/command.yaml +186 -0
- package/components/description-list/description-list.a2ui.json +89 -0
- package/components/description-list/description-list.css +70 -0
- package/components/description-list/description-list.js +75 -0
- package/components/description-list/description-list.yaml +59 -0
- package/components/divider/divider.a2ui.json +126 -0
- package/components/divider/divider.css +102 -0
- package/components/divider/divider.js +47 -0
- package/components/divider/divider.yaml +366 -0
- package/components/drawer/drawer.a2ui.json +199 -0
- package/components/drawer/drawer.css +342 -0
- package/components/drawer/drawer.js +263 -0
- package/components/drawer/drawer.yaml +366 -0
- package/components/embed/embed.a2ui.json +150 -0
- package/components/embed/embed.css +28 -0
- package/components/embed/embed.js +63 -0
- package/components/embed/embed.yaml +224 -0
- package/components/empty-state/empty-state.a2ui.json +133 -0
- package/components/empty-state/empty-state.css +58 -0
- package/components/empty-state/empty-state.js +87 -0
- package/components/empty-state/empty-state.yaml +314 -0
- package/components/footer/footer.a2ui.json +79 -0
- package/components/footer/footer.yaml +239 -0
- package/components/grid/grid.a2ui.json +171 -0
- package/components/grid/grid.css +37 -0
- package/components/grid/grid.js +21 -0
- package/components/grid/grid.yaml +577 -0
- package/components/header/header.a2ui.json +76 -0
- package/components/header/header.yaml +336 -0
- package/components/heatmap/heatmap.a2ui.json +150 -0
- package/components/heatmap/heatmap.css +146 -0
- package/components/heatmap/heatmap.js +246 -0
- package/components/heatmap/heatmap.yaml +131 -0
- package/components/icon/icon.a2ui.json +79 -0
- package/components/icon/icon.css +20 -0
- package/components/icon/icon.js +26 -0
- package/components/icon/icon.yaml +233 -0
- package/components/image/image.a2ui.json +261 -0
- package/components/image/image.css +76 -0
- package/components/image/image.js +102 -0
- package/components/image/image.yaml +477 -0
- package/components/index.js +85 -0
- package/components/input/input.a2ui.json +284 -0
- package/components/input/input.css +162 -0
- package/components/input/input.js +148 -0
- package/components/input/input.yaml +496 -0
- package/components/inspector/inspector.a2ui.json +67 -0
- package/components/inspector/inspector.css +31 -0
- package/components/inspector/inspector.js +133 -0
- package/components/inspector/inspector.yaml +58 -0
- package/components/kbd/kbd.a2ui.json +96 -0
- package/components/kbd/kbd.css +62 -0
- package/components/kbd/kbd.js +24 -0
- package/components/kbd/kbd.yaml +213 -0
- package/components/list/list.a2ui.json +145 -0
- package/components/list/list.css +103 -0
- package/components/list/list.js +236 -0
- package/components/list/list.yaml +122 -0
- package/components/menu/menu.a2ui.json +146 -0
- package/components/menu/menu.css +146 -0
- package/components/menu/menu.js +296 -0
- package/components/menu/menu.yaml +123 -0
- package/components/modal/modal.a2ui.json +136 -0
- package/components/modal/modal.css +153 -0
- package/components/modal/modal.js +181 -0
- package/components/modal/modal.yaml +114 -0
- package/components/noodles/noodles.a2ui.json +145 -0
- package/components/noodles/noodles.css +118 -0
- package/components/noodles/noodles.js +470 -0
- package/components/noodles/noodles.yaml +123 -0
- package/components/otp-input/otp-input.a2ui.json +104 -0
- package/components/otp-input/otp-input.css +78 -0
- package/components/otp-input/otp-input.js +170 -0
- package/components/otp-input/otp-input.yaml +218 -0
- package/components/pagination/pagination.a2ui.json +122 -0
- package/components/pagination/pagination.css +162 -0
- package/components/pagination/pagination.js +185 -0
- package/components/pagination/pagination.yaml +165 -0
- package/components/pane/pane.a2ui.json +94 -0
- package/components/pane/pane.css +166 -0
- package/components/pane/pane.js +140 -0
- package/components/pane/pane.yaml +197 -0
- package/components/pipeline-status/pipeline-status.a2ui.json +90 -0
- package/components/pipeline-status/pipeline-status.css +162 -0
- package/components/pipeline-status/pipeline-status.js +176 -0
- package/components/pipeline-status/pipeline-status.yaml +99 -0
- package/components/popover/popover.a2ui.json +181 -0
- package/components/popover/popover.css +57 -0
- package/components/popover/popover.js +170 -0
- package/components/popover/popover.yaml +257 -0
- package/components/progress/progress.a2ui.json +199 -0
- package/components/progress/progress.css +88 -0
- package/components/progress/progress.js +64 -0
- package/components/progress/progress.yaml +342 -0
- package/components/progress-row/progress-row.a2ui.json +100 -0
- package/components/progress-row/progress-row.css +57 -0
- package/components/progress-row/progress-row.js +92 -0
- package/components/progress-row/progress-row.yaml +87 -0
- package/components/radio/radio.a2ui.json +232 -0
- package/components/radio/radio.css +102 -0
- package/components/radio/radio.js +73 -0
- package/components/radio/radio.yaml +248 -0
- package/components/range/range.a2ui.json +151 -0
- package/components/range/range.css +148 -0
- package/components/range/range.js +177 -0
- package/components/range/range.yaml +188 -0
- package/components/rating/rating.a2ui.json +105 -0
- package/components/rating/rating.css +92 -0
- package/components/rating/rating.js +138 -0
- package/components/rating/rating.yaml +74 -0
- package/components/richtext/richtext.a2ui.json +82 -0
- package/components/richtext/richtext.css +225 -0
- package/components/richtext/richtext.js +74 -0
- package/components/richtext/richtext.yaml +89 -0
- package/components/row/row.a2ui.json +102 -0
- package/components/row/row.css +51 -0
- package/components/row/row.js +39 -0
- package/components/row/row.yaml +358 -0
- package/components/search/search.a2ui.json +186 -0
- package/components/search/search.css +28 -0
- package/components/search/search.js +124 -0
- package/components/search/search.yaml +154 -0
- package/components/section/section.a2ui.json +78 -0
- package/components/section/section.yaml +338 -0
- package/components/segment/segment.a2ui.json +100 -0
- package/components/segment/segment.css +81 -0
- package/components/segment/segment.js +32 -0
- package/components/segment/segment.yaml +216 -0
- package/components/segmented/segmented.a2ui.json +106 -0
- package/components/segmented/segmented.css +67 -0
- package/components/segmented/segmented.js +149 -0
- package/components/segmented/segmented.yaml +91 -0
- package/components/select/select.a2ui.json +203 -0
- package/components/select/select.css +277 -0
- package/components/select/select.js +388 -0
- package/components/select/select.yaml +375 -0
- package/components/skeleton/skeleton.a2ui.json +120 -0
- package/components/skeleton/skeleton.css +47 -0
- package/components/skeleton/skeleton.js +43 -0
- package/components/skeleton/skeleton.yaml +153 -0
- package/components/slider/slider.a2ui.json +162 -0
- package/components/slider/slider.css +137 -0
- package/components/slider/slider.js +162 -0
- package/components/slider/slider.yaml +299 -0
- package/components/stack/stack.a2ui.json +62 -0
- package/components/stack/stack.css +28 -0
- package/components/stack/stack.js +18 -0
- package/components/stack/stack.yaml +54 -0
- package/components/stat/stat.a2ui.json +246 -0
- package/components/stat/stat.css +101 -0
- package/components/stat/stat.js +91 -0
- package/components/stat/stat.yaml +206 -0
- package/components/stepper/stepper.a2ui.json +77 -0
- package/components/stepper/stepper.css +243 -0
- package/components/stepper/stepper.js +118 -0
- package/components/stepper/stepper.yaml +73 -0
- package/components/stream/stream.a2ui.json +98 -0
- package/components/stream/stream.css +37 -0
- package/components/stream/stream.js +99 -0
- package/components/stream/stream.yaml +87 -0
- package/components/swiper/swiper.a2ui.json +140 -0
- package/components/swiper/swiper.css +267 -0
- package/components/swiper/swiper.js +285 -0
- package/components/swiper/swiper.yaml +268 -0
- package/components/switch/switch.a2ui.json +134 -0
- package/components/switch/switch.css +104 -0
- package/components/switch/switch.js +53 -0
- package/components/switch/switch.yaml +322 -0
- package/components/table/cell-types.js +296 -0
- package/components/table/table.a2ui.json +458 -0
- package/components/table/table.css +531 -0
- package/components/table/table.js +1392 -0
- package/components/table/table.yaml +528 -0
- package/components/tabs/tab.js +34 -0
- package/components/tabs/tabs.a2ui.json +174 -0
- package/components/tabs/tabs.css +162 -0
- package/components/tabs/tabs.js +226 -0
- package/components/tabs/tabs.yaml +255 -0
- package/components/tag/tag.a2ui.json +148 -0
- package/components/tag/tag.css +118 -0
- package/components/tag/tag.js +88 -0
- package/components/tag/tag.yaml +125 -0
- package/components/text/text.a2ui.json +99 -0
- package/components/text/text.css +65 -0
- package/components/text/text.js +35 -0
- package/components/text/text.yaml +360 -0
- package/components/textarea/textarea.a2ui.json +91 -0
- package/components/textarea/textarea.css +93 -0
- package/components/textarea/textarea.js +114 -0
- package/components/textarea/textarea.yaml +79 -0
- package/components/timeline/timeline.a2ui.json +82 -0
- package/components/timeline/timeline.css +389 -0
- package/components/timeline/timeline.js +171 -0
- package/components/timeline/timeline.yaml +185 -0
- package/components/toast/toast.a2ui.json +199 -0
- package/components/toast/toast.css +211 -0
- package/components/toast/toast.js +146 -0
- package/components/toast/toast.yaml +184 -0
- package/components/toggle-group/toggle-group.a2ui.json +126 -0
- package/components/toggle-group/toggle-group.css +102 -0
- package/components/toggle-group/toggle-group.js +147 -0
- package/components/toggle-group/toggle-group.yaml +98 -0
- package/components/toolbar/toolbar.a2ui.json +131 -0
- package/components/toolbar/toolbar.css +132 -0
- package/components/toolbar/toolbar.js +366 -0
- package/components/toolbar/toolbar.yaml +238 -0
- package/components/tooltip/tooltip.a2ui.json +148 -0
- package/components/tooltip/tooltip.css +39 -0
- package/components/tooltip/tooltip.js +96 -0
- package/components/tooltip/tooltip.yaml +201 -0
- package/components/tree/tree.a2ui.json +119 -0
- package/components/tree/tree.css +133 -0
- package/components/tree/tree.js +253 -0
- package/components/tree/tree.yaml +92 -0
- package/components/upload/upload.a2ui.json +185 -0
- package/components/upload/upload.css +115 -0
- package/components/upload/upload.js +189 -0
- package/components/upload/upload.yaml +302 -0
- package/core/anchor.js +187 -0
- package/core/controller.js +182 -0
- package/core/element.js +257 -0
- package/core/form.js +217 -0
- package/core/icons.js +180 -0
- package/core/markdown.js +95 -0
- package/core/polyfills.js +23 -0
- package/core/provider.js +262 -0
- package/core/signals.js +113 -0
- package/core/template.js +226 -0
- package/core/transport.js +77 -0
- package/package.json +38 -0
- package/patterns/adia-chat/adia-chat.a2ui.json +149 -0
- package/patterns/adia-chat/adia-chat.css +10 -0
- package/patterns/adia-chat/adia-chat.js +297 -0
- package/patterns/adia-chat/adia-chat.yaml +118 -0
- package/patterns/adia-chat/css/adia-chat.empty.css +12 -0
- package/patterns/adia-chat/css/adia-chat.layout.css +60 -0
- package/patterns/adia-chat/css/adia-chat.markdown.css +74 -0
- package/patterns/adia-chat/css/adia-chat.messages.css +87 -0
- package/patterns/adia-chat/css/adia-chat.streaming.css +30 -0
- package/patterns/adia-chat/css/adia-chat.tokens.css +95 -0
- package/patterns/adia-chat/index.html +93 -0
- package/patterns/adia-editor/adia-editor.a2ui.json +58 -0
- package/patterns/adia-editor/adia-editor.css +6 -0
- package/patterns/adia-editor/adia-editor.js +56 -0
- package/patterns/adia-editor/adia-editor.yaml +36 -0
- package/patterns/adia-editor/css/adia-editor.layout.css +86 -0
- package/patterns/adia-editor/css/adia-editor.tokens.css +28 -0
- package/patterns/adia-editor/index.html +179 -0
- package/patterns/app-nav/app-nav.a2ui.json +89 -0
- package/patterns/app-nav/app-nav.css +92 -0
- package/patterns/app-nav/app-nav.js +99 -0
- package/patterns/app-nav/app-nav.yaml +54 -0
- package/patterns/app-nav-group/app-nav-group.a2ui.json +82 -0
- package/patterns/app-nav-group/app-nav-group.css +261 -0
- package/patterns/app-nav-group/app-nav-group.js +116 -0
- package/patterns/app-nav-group/app-nav-group.yaml +59 -0
- package/patterns/app-nav-item/app-nav-item.a2ui.json +83 -0
- package/patterns/app-nav-item/app-nav-item.css +156 -0
- package/patterns/app-nav-item/app-nav-item.js +42 -0
- package/patterns/app-nav-item/app-nav-item.yaml +62 -0
- package/patterns/app-shell/app-shell.a2ui.json +114 -0
- package/patterns/app-shell/app-shell.css +14 -0
- package/patterns/app-shell/app-shell.js +251 -0
- package/patterns/app-shell/app-shell.yaml +66 -0
- package/patterns/app-shell/css/app-shell.collapsed.css +86 -0
- package/patterns/app-shell/css/app-shell.helpers.css +42 -0
- package/patterns/app-shell/css/app-shell.main.css +58 -0
- package/patterns/app-shell/css/app-shell.shell.css +44 -0
- package/patterns/app-shell/css/app-shell.sidebar.css +116 -0
- package/patterns/app-shell/css/app-shell.templates.css +214 -0
- package/patterns/app-shell/css/app-shell.tokens.css +116 -0
- package/patterns/app-shell/index.html +112 -0
- package/patterns/gen-ui/gen-ui.a2ui.json +72 -0
- package/patterns/gen-ui/gen-ui.css +83 -0
- package/patterns/gen-ui/gen-ui.js +136 -0
- package/patterns/gen-ui/gen-ui.yaml +43 -0
- package/patterns/index.js +10 -0
- package/patterns/section-nav/section-nav.a2ui.json +91 -0
- package/patterns/section-nav/section-nav.css +59 -0
- package/patterns/section-nav/section-nav.js +42 -0
- package/patterns/section-nav/section-nav.yaml +58 -0
- package/patterns/section-nav-group/section-nav-group.a2ui.json +95 -0
- package/patterns/section-nav-group/section-nav-group.css +74 -0
- package/patterns/section-nav-group/section-nav-group.js +84 -0
- package/patterns/section-nav-group/section-nav-group.yaml +66 -0
- package/patterns/section-nav-item/section-nav-item.a2ui.json +97 -0
- package/patterns/section-nav-item/section-nav-item.css +96 -0
- package/patterns/section-nav-item/section-nav-item.js +66 -0
- package/patterns/section-nav-item/section-nav-item.yaml +70 -0
- package/styles/colors/index.css +6 -0
- package/styles/colors/parameters.css +52 -0
- package/styles/colors/primitives-accent.css +89 -0
- package/styles/colors/primitives-brand.css +89 -0
- package/styles/colors/primitives-danger.css +89 -0
- package/styles/colors/primitives-info.css +89 -0
- package/styles/colors/primitives-neutral.css +91 -0
- package/styles/colors/primitives-shared.css +57 -0
- package/styles/colors/primitives-success.css +89 -0
- package/styles/colors/primitives-warning.css +89 -0
- package/styles/colors/primitives.css +17 -0
- package/styles/colors/scrims.css +182 -0
- package/styles/colors/semantics.css +595 -0
- package/styles/colors/surfaces.css +43 -0
- package/styles/fonts.css +99 -0
- package/styles/layouts/admin.css +7 -0
- package/styles/prose.css +186 -0
- package/styles/styles.css +193 -0
- package/styles/themes.css +155 -0
- package/styles/tokens.css +304 -0
- package/styles/typography.css +853 -0
- package/traits/active-state.js +24 -0
- package/traits/anchor-positioning.js +66 -0
- package/traits/attention-pulse.js +30 -0
- package/traits/confetti-burst.js +65 -0
- package/traits/confetti.js +57 -0
- package/traits/count-up.js +42 -0
- package/traits/define.js +76 -0
- package/traits/dirty-state.js +38 -0
- package/traits/drag-ghost.js +38 -0
- package/traits/draggable.js +73 -0
- package/traits/fade-presence.js +52 -0
- package/traits/focus-trap.js +63 -0
- package/traits/focusable.js +38 -0
- package/traits/glow-focus.js +33 -0
- package/traits/gradient-shift.js +32 -0
- package/traits/haptic-feedback.js +28 -0
- package/traits/hotkey.js +62 -0
- package/traits/hoverable.js +26 -0
- package/traits/index.js +55 -0
- package/traits/inertia-drag.js +133 -0
- package/traits/intersection-observer.js +33 -0
- package/traits/keyboard-nav.js +36 -0
- package/traits/magnetic-hover.js +37 -0
- package/traits/noise-texture.js +30 -0
- package/traits/parallax.js +42 -0
- package/traits/portal.js +27 -0
- package/traits/pressable.js +75 -0
- package/traits/resizable.js +100 -0
- package/traits/resize-observer.js +31 -0
- package/traits/ripple.js +53 -0
- package/traits/roving-tabindex.js +67 -0
- package/traits/scale-press.js +43 -0
- package/traits/scroll-lock.js +27 -0
- package/traits/shimmer-loading.js +44 -0
- package/traits/snap-to-grid.js +28 -0
- package/traits/sound-feedback.js +30 -0
- package/traits/spring-animate.js +56 -0
- package/traits/tilt-hover.js +37 -0
- package/traits/tossable.js +178 -0
- package/traits/typeahead.js +63 -0
- package/traits/typewriter.js +35 -0
- package/traits/validation.js +118 -0
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://adiaui.dev/a2ui/v0_9/components/GenUI.json",
|
|
4
|
+
"title": "GenUI",
|
|
5
|
+
"description": "Composition shell for chat + canvas generative UI. Manages layout modes\n(chat-only / split / canvas-only) and delegates a unified API across\nchild chat-ui, canvas-ui, and inspector-ui elements.\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": "GenUI"
|
|
18
|
+
},
|
|
19
|
+
"inspector": {
|
|
20
|
+
"description": "Show the inspector pane (for debugging generated A2UI).",
|
|
21
|
+
"type": "boolean",
|
|
22
|
+
"default": false
|
|
23
|
+
},
|
|
24
|
+
"mode": {
|
|
25
|
+
"description": "Layout mode — chat-only, 50/50 split, or canvas-only.",
|
|
26
|
+
"type": "string",
|
|
27
|
+
"enum": [
|
|
28
|
+
"chat",
|
|
29
|
+
"split",
|
|
30
|
+
"canvas"
|
|
31
|
+
],
|
|
32
|
+
"default": "chat"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"required": [
|
|
36
|
+
"component"
|
|
37
|
+
],
|
|
38
|
+
"unevaluatedProperties": false,
|
|
39
|
+
"x-adiaui": {
|
|
40
|
+
"anti_patterns": [],
|
|
41
|
+
"category": "layout",
|
|
42
|
+
"events": {},
|
|
43
|
+
"examples": [],
|
|
44
|
+
"keywords": [
|
|
45
|
+
"gen-ui",
|
|
46
|
+
"generative-ui",
|
|
47
|
+
"chat-canvas",
|
|
48
|
+
"agent-shell"
|
|
49
|
+
],
|
|
50
|
+
"name": "AdiaGenUI",
|
|
51
|
+
"related": [
|
|
52
|
+
"AppShell",
|
|
53
|
+
"Chat"
|
|
54
|
+
],
|
|
55
|
+
"slots": {
|
|
56
|
+
"default": {
|
|
57
|
+
"description": "Author supplies chat-ui, canvas-ui, and optional inspector-ui children."
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"states": [
|
|
61
|
+
{
|
|
62
|
+
"description": "Default mode=chat.",
|
|
63
|
+
"name": "idle"
|
|
64
|
+
}
|
|
65
|
+
],
|
|
66
|
+
"synonyms": {},
|
|
67
|
+
"tag": "gen-ui-ui",
|
|
68
|
+
"tokens": {},
|
|
69
|
+
"traits": [],
|
|
70
|
+
"version": 1
|
|
71
|
+
}
|
|
72
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
@scope (gen-ui-ui) {
|
|
2
|
+
|
|
3
|
+
/* ═══════════════════════════════════════════════════════
|
|
4
|
+
SHELL HOST — full bleed, no card chrome
|
|
5
|
+
═══════════════════════════════════════════════════════ */
|
|
6
|
+
|
|
7
|
+
:scope {
|
|
8
|
+
box-sizing: border-box;
|
|
9
|
+
display: grid;
|
|
10
|
+
height: 100%;
|
|
11
|
+
min-height: 0;
|
|
12
|
+
background: var(--chat-bg, var(--a-canvas-0));
|
|
13
|
+
font-family: var(--a-font-family);
|
|
14
|
+
overflow: hidden;
|
|
15
|
+
|
|
16
|
+
/* Default: chat mode — single column */
|
|
17
|
+
grid-template-columns: 1fr;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/* ═══════════════════════════════════════════════════════
|
|
21
|
+
MODE: CHAT (initial screen — thread only, full width)
|
|
22
|
+
═══════════════════════════════════════════════════════ */
|
|
23
|
+
|
|
24
|
+
:scope[mode="chat"] {
|
|
25
|
+
grid-template-columns: 1fr;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
:scope[mode="chat"] > canvas-ui {
|
|
29
|
+
display: none;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/* ═══════════════════════════════════════════════════════
|
|
33
|
+
MODE: SPLIT (dialog left + canvas right)
|
|
34
|
+
═══════════════════════════════════════════════════════ */
|
|
35
|
+
|
|
36
|
+
:scope[mode="split"] {
|
|
37
|
+
grid-template-columns: minmax(320px, 1fr) 1.5fr;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
:scope[mode="split"] > thread-n {
|
|
41
|
+
border-right: var(--a-border-thin) solid var(--a-canvas-border-subtle);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/* ═══════════════════════════════════════════════════════
|
|
45
|
+
MODE: CANVAS (canvas only)
|
|
46
|
+
═══════════════════════════════════════════════════════ */
|
|
47
|
+
|
|
48
|
+
:scope[mode="canvas"] {
|
|
49
|
+
grid-template-columns: 1fr;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
:scope[mode="canvas"] > thread-n {
|
|
53
|
+
display: none;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/* ═══════════════════════════════════════════════════════
|
|
57
|
+
INSPECTOR
|
|
58
|
+
═══════════════════════════════════════════════════════ */
|
|
59
|
+
|
|
60
|
+
:scope > inspector-ui {
|
|
61
|
+
display: none;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
:scope[inspector] > inspector-ui {
|
|
65
|
+
display: flex;
|
|
66
|
+
border-left: var(--a-border-thin) solid var(--a-canvas-border-subtle);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
:scope[mode="split"][inspector] {
|
|
70
|
+
grid-template-columns: minmax(320px, 1fr) 1.5fr 1fr;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/* ═══════════════════════════════════════════════════════
|
|
74
|
+
CHILDREN — fill grid cells
|
|
75
|
+
═══════════════════════════════════════════════════════ */
|
|
76
|
+
|
|
77
|
+
:scope > thread-n,
|
|
78
|
+
:scope > canvas-ui,
|
|
79
|
+
:scope > inspector-ui {
|
|
80
|
+
min-height: 0;
|
|
81
|
+
min-width: 0;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { AdiaElement } from '@core/element.js';
|
|
2
|
+
import '../../components/chat/chat.js';
|
|
3
|
+
import '../../components/canvas/canvas.js';
|
|
4
|
+
import '../../components/inspector/inspector.js';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* <gen-ui-ui> — Composition shell for chat + canvas generative UI.
|
|
8
|
+
*
|
|
9
|
+
* Modes:
|
|
10
|
+
* chat — thread only, full width
|
|
11
|
+
* split — thread left + canvas right (50/50)
|
|
12
|
+
* canvas — canvas only, thread hidden
|
|
13
|
+
*
|
|
14
|
+
* Consumer-owns-LLM: forwards all events from children, never calls fetch.
|
|
15
|
+
*
|
|
16
|
+
* Events (forwarded):
|
|
17
|
+
* chat-submit — from thread
|
|
18
|
+
* suggestion-select — from thread
|
|
19
|
+
* canvas-interaction — from canvas
|
|
20
|
+
*/
|
|
21
|
+
export class AdiaGenUI extends AdiaElement {
|
|
22
|
+
static properties = {
|
|
23
|
+
mode: { type: String, default: 'chat', reflect: true },
|
|
24
|
+
inspector: { type: Boolean, default: false, reflect: true },
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
static template = () => null;
|
|
28
|
+
|
|
29
|
+
#bound = false;
|
|
30
|
+
#threadEl = null;
|
|
31
|
+
#canvasEl = null;
|
|
32
|
+
#inspectorEl = null;
|
|
33
|
+
|
|
34
|
+
connected() {
|
|
35
|
+
// Forward events from children — they bubble, so just re-dispatch isn't needed.
|
|
36
|
+
// Events already bubble from thread/canvas through this host.
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
render() {
|
|
40
|
+
if (this.#bound) return;
|
|
41
|
+
this.#bound = true;
|
|
42
|
+
|
|
43
|
+
this.#threadEl = document.createElement('chat-ui');
|
|
44
|
+
this.#canvasEl = document.createElement('canvas-ui');
|
|
45
|
+
|
|
46
|
+
this.appendChild(this.#threadEl);
|
|
47
|
+
this.appendChild(this.#canvasEl);
|
|
48
|
+
|
|
49
|
+
if (this.inspector) {
|
|
50
|
+
this.#inspectorEl = document.createElement('inspector-ui');
|
|
51
|
+
this.appendChild(this.#inspectorEl);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// ── Public API ──
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Append a chat message. Delegates to thread.
|
|
59
|
+
* @param {{ role: string, content: string, avatar?: string }} msg
|
|
60
|
+
*/
|
|
61
|
+
appendMessage(msg) {
|
|
62
|
+
this.#threadEl?.appendMessage(msg);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Append chain-of-thought. Delegates to thread.
|
|
67
|
+
* @param {{ text: string }} msg
|
|
68
|
+
*/
|
|
69
|
+
appendCoT(msg) {
|
|
70
|
+
this.#threadEl?.appendCoT(msg);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Push an artifact to the canvas. Auto-switches to split mode if in chat mode.
|
|
75
|
+
* @param {object[]} messages — A2UI messages
|
|
76
|
+
*/
|
|
77
|
+
pushArtifact(messages) {
|
|
78
|
+
if (this.mode === 'chat') {
|
|
79
|
+
this.mode = 'split';
|
|
80
|
+
}
|
|
81
|
+
this.#canvasEl?.processAll(messages);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Set suggestion buttons. Delegates to thread.
|
|
86
|
+
* @param {{ label: string, prompt: string }[]} items
|
|
87
|
+
*/
|
|
88
|
+
setSuggestions(items) {
|
|
89
|
+
this.#threadEl?.setSuggestions(items);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/** Append a result message with action buttons. Delegates to thread. */
|
|
93
|
+
appendResultMessage(opts) { this.#threadEl?.appendResultMessage(opts); }
|
|
94
|
+
|
|
95
|
+
/** Show save-pattern bar. Delegates to thread. */
|
|
96
|
+
showSavePatternBar(opts) { this.#threadEl?.showSavePatternBar(opts); }
|
|
97
|
+
|
|
98
|
+
/** Show feedback widget. Delegates to thread. */
|
|
99
|
+
showFeedbackWidget(opts) { this.#threadEl?.showFeedbackWidget(opts); }
|
|
100
|
+
|
|
101
|
+
/** Show typing indicator. Delegates to thread. */
|
|
102
|
+
showTyping() { this.#threadEl?.showTyping(); }
|
|
103
|
+
|
|
104
|
+
/** Hide typing indicator. Delegates to thread. */
|
|
105
|
+
hideTyping() { this.#threadEl?.hideTyping(); }
|
|
106
|
+
|
|
107
|
+
/** Append an error message. Delegates to thread. */
|
|
108
|
+
appendError(content) { this.#threadEl?.appendError(content); }
|
|
109
|
+
|
|
110
|
+
/** Start a pipeline status indicator. Delegates to thread. */
|
|
111
|
+
startPipelineStatus() { return this.#threadEl?.startPipelineStatus(); }
|
|
112
|
+
|
|
113
|
+
/** Update the active pipeline status. Delegates to thread. */
|
|
114
|
+
updatePipelineStatus(opts) { this.#threadEl?.updatePipelineStatus(opts); }
|
|
115
|
+
|
|
116
|
+
/** Mark the active pipeline status as complete. Delegates to thread. */
|
|
117
|
+
completePipelineStatus() { this.#threadEl?.completePipelineStatus(); }
|
|
118
|
+
|
|
119
|
+
/** Reset both thread and canvas. */
|
|
120
|
+
reset() {
|
|
121
|
+
this.#threadEl?.clear();
|
|
122
|
+
this.#canvasEl?.reset();
|
|
123
|
+
this.mode = 'chat';
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/** Access the thread element. */
|
|
127
|
+
get thread() { return this.#threadEl; }
|
|
128
|
+
|
|
129
|
+
/** Access the canvas element. */
|
|
130
|
+
get canvas() { return this.#canvasEl; }
|
|
131
|
+
|
|
132
|
+
/** Access the inspector element (null if inspector not enabled). */
|
|
133
|
+
get inspect() { return this.#inspectorEl; }
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
customElements.define('gen-ui-ui', AdiaGenUI);
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
$schema: ../../../../scripts/schemas/component.yaml.schema.json
|
|
2
|
+
name: AdiaGenUI
|
|
3
|
+
tag: gen-ui-ui
|
|
4
|
+
component: GenUI
|
|
5
|
+
category: layout
|
|
6
|
+
version: 1
|
|
7
|
+
description: |
|
|
8
|
+
Composition shell for chat + canvas generative UI. Manages layout modes
|
|
9
|
+
(chat-only / split / canvas-only) and delegates a unified API across
|
|
10
|
+
child chat-ui, canvas-ui, and inspector-ui elements.
|
|
11
|
+
|
|
12
|
+
props:
|
|
13
|
+
mode:
|
|
14
|
+
type: string
|
|
15
|
+
default: chat
|
|
16
|
+
enum: [chat, split, canvas]
|
|
17
|
+
reflect: true
|
|
18
|
+
description: Layout mode — chat-only, 50/50 split, or canvas-only.
|
|
19
|
+
|
|
20
|
+
inspector:
|
|
21
|
+
type: boolean
|
|
22
|
+
default: false
|
|
23
|
+
reflect: true
|
|
24
|
+
description: Show the inspector pane (for debugging generated A2UI).
|
|
25
|
+
|
|
26
|
+
events: {}
|
|
27
|
+
|
|
28
|
+
slots:
|
|
29
|
+
default:
|
|
30
|
+
description: Author supplies chat-ui, canvas-ui, and optional inspector-ui children.
|
|
31
|
+
|
|
32
|
+
states:
|
|
33
|
+
- name: idle
|
|
34
|
+
description: Default mode=chat.
|
|
35
|
+
|
|
36
|
+
traits: []
|
|
37
|
+
|
|
38
|
+
a2ui:
|
|
39
|
+
rules:
|
|
40
|
+
- gen-ui-ui is an integration shell. Prefer app-shell-ui for admin UIs; use gen-ui-ui only for chat+canvas tooling.
|
|
41
|
+
|
|
42
|
+
keywords: [gen-ui, generative-ui, chat-canvas, agent-shell]
|
|
43
|
+
related: [AppShell, Chat]
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { AdiaAppShell } from './app-shell/app-shell.js';
|
|
2
|
+
export { AdiaAppNav } from './app-nav/app-nav.js';
|
|
3
|
+
export { AdiaAppNavGroup } from './app-nav-group/app-nav-group.js';
|
|
4
|
+
export { AdiaAppNavItem } from './app-nav-item/app-nav-item.js';
|
|
5
|
+
export { AdiaSectionNav } from './section-nav/section-nav.js';
|
|
6
|
+
export { AdiaSectionNavGroup } from './section-nav-group/section-nav-group.js';
|
|
7
|
+
export { AdiaSectionNavItem } from './section-nav-item/section-nav-item.js';
|
|
8
|
+
export { AdiaGenUI } from './gen-ui/gen-ui.js';
|
|
9
|
+
export { AdiaChatElement } from './adia-chat/adia-chat.js';
|
|
10
|
+
export { AdiaEditorElement } from './adia-editor/adia-editor.js';
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://adiaui.dev/a2ui/v0_9/components/SectionNav.json",
|
|
4
|
+
"title": "SectionNav",
|
|
5
|
+
"description": "Sub-navigation rail container. Sits beside an article when a page lives\ninside an app-shell section that has its own child pages. Can optionally\nrender a heading label above the rail.\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": "SectionNav"
|
|
18
|
+
},
|
|
19
|
+
"divider": {
|
|
20
|
+
"description": "Render auto-dividers between groups.",
|
|
21
|
+
"type": "boolean",
|
|
22
|
+
"default": false
|
|
23
|
+
},
|
|
24
|
+
"heading": {
|
|
25
|
+
"description": "Optional section label (also sets aria-label).",
|
|
26
|
+
"type": "string",
|
|
27
|
+
"default": ""
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"required": [
|
|
31
|
+
"component"
|
|
32
|
+
],
|
|
33
|
+
"unevaluatedProperties": false,
|
|
34
|
+
"x-adiaui": {
|
|
35
|
+
"anti_patterns": [],
|
|
36
|
+
"category": "nav",
|
|
37
|
+
"events": {
|
|
38
|
+
"group-toggle": {
|
|
39
|
+
"description": "Bubbles from a child section-nav-group-ui[collapsible] on header click.",
|
|
40
|
+
"detail": {
|
|
41
|
+
"open": "boolean",
|
|
42
|
+
"text": "string"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"nav-select": {
|
|
46
|
+
"description": "Bubbles from a child section-nav-item-ui on selection.",
|
|
47
|
+
"detail": {
|
|
48
|
+
"item": "HTMLElement",
|
|
49
|
+
"text": "string",
|
|
50
|
+
"value": "string"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"examples": [],
|
|
55
|
+
"keywords": [
|
|
56
|
+
"section-nav",
|
|
57
|
+
"sub-nav",
|
|
58
|
+
"rail",
|
|
59
|
+
"side-nav",
|
|
60
|
+
"docs-nav"
|
|
61
|
+
],
|
|
62
|
+
"name": "AdiaSectionNav",
|
|
63
|
+
"related": [
|
|
64
|
+
"AppShell",
|
|
65
|
+
"SectionNavGroup",
|
|
66
|
+
"SectionNavItem"
|
|
67
|
+
],
|
|
68
|
+
"slots": {
|
|
69
|
+
"default": {
|
|
70
|
+
"description": "section-nav-group-ui and section-nav-item-ui children."
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"states": [
|
|
74
|
+
{
|
|
75
|
+
"description": "Default.",
|
|
76
|
+
"name": "idle"
|
|
77
|
+
}
|
|
78
|
+
],
|
|
79
|
+
"synonyms": {
|
|
80
|
+
"rail": [
|
|
81
|
+
"section-nav",
|
|
82
|
+
"sub-nav",
|
|
83
|
+
"side-nav"
|
|
84
|
+
]
|
|
85
|
+
},
|
|
86
|
+
"tag": "section-nav-ui",
|
|
87
|
+
"tokens": {},
|
|
88
|
+
"traits": [],
|
|
89
|
+
"version": 1
|
|
90
|
+
}
|
|
91
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/* ═══════════════════════════════════════════
|
|
2
|
+
SECTION-NAV — container
|
|
3
|
+
Mirrors app-nav's rhythm: tight gaps, ui-size font,
|
|
4
|
+
--a-size row heights, --a-ui-px horizontal padding.
|
|
5
|
+
═══════════════════════════════════════════ */
|
|
6
|
+
|
|
7
|
+
@scope (section-nav-ui) {
|
|
8
|
+
:where(:scope) {
|
|
9
|
+
--section-nav-gap: var(--a-space-1);
|
|
10
|
+
--section-nav-px: 0;
|
|
11
|
+
--section-nav-py: 0;
|
|
12
|
+
--section-nav-font-size: var(--a-ui-size);
|
|
13
|
+
|
|
14
|
+
--section-nav-heading-fg: var(--a-fg-muted);
|
|
15
|
+
--section-nav-heading-size: var(--a-ui-tiny);
|
|
16
|
+
--section-nav-heading-weight: var(--a-weight-medium);
|
|
17
|
+
--section-nav-heading-pad-x: var(--a-space-2);
|
|
18
|
+
--section-nav-heading-pad-y: 0;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
:scope {
|
|
22
|
+
box-sizing: border-box;
|
|
23
|
+
display: flex;
|
|
24
|
+
flex-direction: column;
|
|
25
|
+
gap: var(--section-nav-gap);
|
|
26
|
+
padding: var(--section-nav-py) var(--section-nav-px);
|
|
27
|
+
font-size: var(--section-nav-font-size);
|
|
28
|
+
min-width: 0;
|
|
29
|
+
overflow-y: auto;
|
|
30
|
+
overflow-x: hidden;
|
|
31
|
+
scrollbar-width: none;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
:scope::-webkit-scrollbar { display: none; }
|
|
35
|
+
|
|
36
|
+
/* Auto-dividers between groups when <section-nav-ui divider>. */
|
|
37
|
+
:scope[divider] > section-nav-group-ui + section-nav-group-ui,
|
|
38
|
+
:scope[divider] > section-nav-item-ui + section-nav-group-ui,
|
|
39
|
+
:scope[divider] > section-nav-group-ui + section-nav-item-ui {
|
|
40
|
+
border-top: 1px solid var(--a-border-subtle);
|
|
41
|
+
margin-top: var(--a-space-1);
|
|
42
|
+
padding-top: var(--a-space-1);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/* Heading rendered from [heading] attribute.
|
|
46
|
+
No block margin — the flex container's gap handles separation. */
|
|
47
|
+
:scope[heading]:not([heading=""])::before {
|
|
48
|
+
content: attr(heading);
|
|
49
|
+
display: block;
|
|
50
|
+
padding: var(--section-nav-heading-pad-y) var(--section-nav-heading-pad-x);
|
|
51
|
+
font-size: var(--section-nav-heading-size);
|
|
52
|
+
font-weight: var(--section-nav-heading-weight);
|
|
53
|
+
color: var(--section-nav-heading-fg);
|
|
54
|
+
text-transform: uppercase;
|
|
55
|
+
letter-spacing: 0.06em;
|
|
56
|
+
white-space: nowrap;
|
|
57
|
+
overflow: hidden;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* <section-nav-ui> — Container for a section's sub-navigation rail.
|
|
3
|
+
* Used beside the main article when a page lives inside an app-shell
|
|
4
|
+
* section that has its own child pages.
|
|
5
|
+
*
|
|
6
|
+
* Children: section-nav-group-ui and section-nav-item-ui.
|
|
7
|
+
* Event: nav-select (bubbles from items). detail: { item, text, value }
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { AdiaElement } from '@core/element.js';
|
|
11
|
+
|
|
12
|
+
class AdiaSectionNav extends AdiaElement {
|
|
13
|
+
static properties = {
|
|
14
|
+
heading: { type: String, default: '', reflect: true },
|
|
15
|
+
divider: { type: Boolean, default: false, reflect: true },
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
static template = () => null;
|
|
19
|
+
|
|
20
|
+
connected() {
|
|
21
|
+
this.setAttribute('role', 'navigation');
|
|
22
|
+
if (this.heading) this.setAttribute('aria-label', this.heading);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
render() {
|
|
26
|
+
if (this.heading) this.setAttribute('aria-label', this.heading);
|
|
27
|
+
else this.removeAttribute('aria-label');
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
get selectedItem() {
|
|
31
|
+
return this.querySelector('section-nav-item-ui[selected]');
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
select(item) {
|
|
35
|
+
const prev = this.selectedItem;
|
|
36
|
+
if (prev && prev !== item) prev.removeAttribute('selected');
|
|
37
|
+
if (item) item.setAttribute('selected', '');
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
customElements.define('section-nav-ui', AdiaSectionNav);
|
|
41
|
+
|
|
42
|
+
export { AdiaSectionNav };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
$schema: ../../../../scripts/schemas/component.yaml.schema.json
|
|
2
|
+
name: AdiaSectionNav
|
|
3
|
+
tag: section-nav-ui
|
|
4
|
+
component: SectionNav
|
|
5
|
+
category: nav
|
|
6
|
+
version: 1
|
|
7
|
+
description: |
|
|
8
|
+
Sub-navigation rail container. Sits beside an article when a page lives
|
|
9
|
+
inside an app-shell section that has its own child pages. Can optionally
|
|
10
|
+
render a heading label above the rail.
|
|
11
|
+
|
|
12
|
+
props:
|
|
13
|
+
heading:
|
|
14
|
+
type: string
|
|
15
|
+
default: ""
|
|
16
|
+
reflect: true
|
|
17
|
+
description: Optional section label (also sets aria-label).
|
|
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: Bubbles from a child section-nav-item-ui on selection.
|
|
28
|
+
detail:
|
|
29
|
+
item: HTMLElement
|
|
30
|
+
text: string
|
|
31
|
+
value: string
|
|
32
|
+
|
|
33
|
+
group-toggle:
|
|
34
|
+
description: Bubbles from a child section-nav-group-ui[collapsible] on header click.
|
|
35
|
+
detail:
|
|
36
|
+
text: string
|
|
37
|
+
open: boolean
|
|
38
|
+
|
|
39
|
+
slots:
|
|
40
|
+
default:
|
|
41
|
+
description: section-nav-group-ui and section-nav-item-ui children.
|
|
42
|
+
|
|
43
|
+
states:
|
|
44
|
+
- name: idle
|
|
45
|
+
description: Default.
|
|
46
|
+
|
|
47
|
+
traits: []
|
|
48
|
+
|
|
49
|
+
a2ui:
|
|
50
|
+
rules:
|
|
51
|
+
- section-nav-ui is the only valid parent of section-nav-group-ui.
|
|
52
|
+
- section-nav-item-ui may be a direct child of section-nav-ui OR nested inside section-nav-group-ui.
|
|
53
|
+
- Use section-nav-ui beside an article inside an app-shell section; don't nest app-nav inside it.
|
|
54
|
+
|
|
55
|
+
keywords: [section-nav, sub-nav, rail, side-nav, docs-nav]
|
|
56
|
+
synonyms:
|
|
57
|
+
rail: [section-nav, sub-nav, side-nav]
|
|
58
|
+
related: [AppShell, SectionNavGroup, SectionNavItem]
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://adiaui.dev/a2ui/v0_9/components/SectionNavGroup.json",
|
|
4
|
+
"title": "SectionNavGroup",
|
|
5
|
+
"description": "Optional labeled group inside section-nav-ui. Auto-generates a header row\nwith label and optional leading icon. When [collapsible], the header row\nis a keyboard-activatable toggle that emits `group-toggle`.\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
|
+
"collapsible": {
|
|
17
|
+
"description": "When true, the header becomes a click/keyboard toggle that expands and collapses the group.",
|
|
18
|
+
"type": "boolean",
|
|
19
|
+
"default": false
|
|
20
|
+
},
|
|
21
|
+
"component": {
|
|
22
|
+
"const": "SectionNavGroup"
|
|
23
|
+
},
|
|
24
|
+
"icon": {
|
|
25
|
+
"description": "Optional Phosphor icon name (leading).",
|
|
26
|
+
"type": "string",
|
|
27
|
+
"default": ""
|
|
28
|
+
},
|
|
29
|
+
"open": {
|
|
30
|
+
"description": "Expanded state. Only meaningful when collapsible=true.",
|
|
31
|
+
"type": "boolean",
|
|
32
|
+
"default": false
|
|
33
|
+
},
|
|
34
|
+
"text": {
|
|
35
|
+
"description": "Group label rendered in the header row.",
|
|
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
|
+
"group-toggle": {
|
|
49
|
+
"description": "Fired when the group is toggled via header click or keyboard (Enter/Space).",
|
|
50
|
+
"detail": {
|
|
51
|
+
"open": "boolean",
|
|
52
|
+
"text": "string"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"examples": [],
|
|
57
|
+
"keywords": [
|
|
58
|
+
"section-nav-group",
|
|
59
|
+
"sub-nav-group",
|
|
60
|
+
"nav-section",
|
|
61
|
+
"rail-group"
|
|
62
|
+
],
|
|
63
|
+
"name": "AdiaSectionNavGroup",
|
|
64
|
+
"related": [
|
|
65
|
+
"SectionNav",
|
|
66
|
+
"SectionNavItem"
|
|
67
|
+
],
|
|
68
|
+
"slots": {
|
|
69
|
+
"default": {
|
|
70
|
+
"description": "section-nav-item-ui children rendered under the header."
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"states": [
|
|
74
|
+
{
|
|
75
|
+
"description": "Default.",
|
|
76
|
+
"name": "idle"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"description": "Header is interactive.",
|
|
80
|
+
"attribute": "collapsible",
|
|
81
|
+
"name": "collapsible"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"description": "Children visible.",
|
|
85
|
+
"attribute": "open",
|
|
86
|
+
"name": "open"
|
|
87
|
+
}
|
|
88
|
+
],
|
|
89
|
+
"synonyms": {},
|
|
90
|
+
"tag": "section-nav-group-ui",
|
|
91
|
+
"tokens": {},
|
|
92
|
+
"traits": [],
|
|
93
|
+
"version": 1
|
|
94
|
+
}
|
|
95
|
+
}
|