@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,118 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* <stepper-ui> — Wizard / process stepper.
|
|
3
|
+
*
|
|
4
|
+
* Split out of the old <timeline-ui mode="steps">. Where timeline-ui is for
|
|
5
|
+
* event/progress logs with per-item state, stepper-ui is a wizard: the parent
|
|
6
|
+
* `step` index drives all children (numbered circles, auto-checkmark on the
|
|
7
|
+
* ones before it, active ring on the current).
|
|
8
|
+
*
|
|
9
|
+
* Usage:
|
|
10
|
+
* <stepper-ui step="1">
|
|
11
|
+
* <stepper-item-ui text="Account"></stepper-item-ui>
|
|
12
|
+
* <stepper-item-ui text="Details"></stepper-item-ui>
|
|
13
|
+
* <stepper-item-ui text="Review"></stepper-item-ui>
|
|
14
|
+
* </stepper-ui>
|
|
15
|
+
*
|
|
16
|
+
* el.next(); el.prev(); el.goTo(2);
|
|
17
|
+
*
|
|
18
|
+
* Attributes:
|
|
19
|
+
* step — current step index (0-based)
|
|
20
|
+
* orientation — horizontal (default) | vertical
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
import { AdiaElement } from '@core/element.js';
|
|
24
|
+
|
|
25
|
+
class AdiaStepper extends AdiaElement {
|
|
26
|
+
static properties = {
|
|
27
|
+
step: { type: Number, default: 0, reflect: true },
|
|
28
|
+
orientation: { type: String, default: 'horizontal', reflect: true },
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
static template = () => null;
|
|
32
|
+
|
|
33
|
+
render() {
|
|
34
|
+
const items = [...this.querySelectorAll('stepper-item-ui')];
|
|
35
|
+
|
|
36
|
+
// Mark last item — the connector line hides on the last one
|
|
37
|
+
for (const item of items) item.removeAttribute('data-last');
|
|
38
|
+
const last = items[items.length - 1];
|
|
39
|
+
if (last) last.setAttribute('data-last', '');
|
|
40
|
+
|
|
41
|
+
// Parent drives child state via step index
|
|
42
|
+
items.forEach((item, i) => {
|
|
43
|
+
item.setAttribute('data-index', i);
|
|
44
|
+
if (i < this.step) {
|
|
45
|
+
item.setAttribute('completed', '');
|
|
46
|
+
item.removeAttribute('active');
|
|
47
|
+
} else if (i === this.step) {
|
|
48
|
+
item.removeAttribute('completed');
|
|
49
|
+
item.setAttribute('active', '');
|
|
50
|
+
} else {
|
|
51
|
+
item.removeAttribute('completed');
|
|
52
|
+
item.removeAttribute('active');
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
next() {
|
|
58
|
+
const count = this.querySelectorAll('stepper-item-ui').length;
|
|
59
|
+
if (this.step < count - 1) this.step++;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
prev() {
|
|
63
|
+
if (this.step > 0) this.step--;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
goTo(index) {
|
|
67
|
+
const max = this.querySelectorAll('stepper-item-ui').length - 1;
|
|
68
|
+
this.step = Math.max(0, Math.min(index, max));
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
customElements.define('stepper-ui', AdiaStepper);
|
|
73
|
+
|
|
74
|
+
// ── Item ───────────────────────────────────────────────────────
|
|
75
|
+
|
|
76
|
+
class AdiaStepperItem extends AdiaElement {
|
|
77
|
+
static properties = {
|
|
78
|
+
text: { type: String, default: '', reflect: true },
|
|
79
|
+
description: { type: String, default: '', reflect: true },
|
|
80
|
+
icon: { type: String, default: '', reflect: true },
|
|
81
|
+
completed: { type: Boolean, default: false, reflect: true },
|
|
82
|
+
active: { type: Boolean, default: false, reflect: true },
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
static template = () => null;
|
|
86
|
+
|
|
87
|
+
connected() {
|
|
88
|
+
if (!this.querySelector('[slot="label"]')) {
|
|
89
|
+
this.innerHTML = `
|
|
90
|
+
<span slot="label"></span>
|
|
91
|
+
<span slot="description"></span>
|
|
92
|
+
`;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
render() {
|
|
97
|
+
const label = this.querySelector('[slot="label"]');
|
|
98
|
+
const desc = this.querySelector('[slot="description"]');
|
|
99
|
+
if (label) label.textContent = this.text;
|
|
100
|
+
if (desc) desc.textContent = this.description;
|
|
101
|
+
|
|
102
|
+
if (this.icon) {
|
|
103
|
+
let iconEl = this.querySelector('[slot="icon"]');
|
|
104
|
+
if (!iconEl) {
|
|
105
|
+
iconEl = document.createElement('icon-ui');
|
|
106
|
+
iconEl.setAttribute('slot', 'icon');
|
|
107
|
+
this.prepend(iconEl);
|
|
108
|
+
}
|
|
109
|
+
iconEl.setAttribute('name', this.icon);
|
|
110
|
+
} else {
|
|
111
|
+
this.querySelector('[slot="icon"]')?.remove();
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
customElements.define('stepper-item-ui', AdiaStepperItem);
|
|
117
|
+
|
|
118
|
+
export { AdiaStepper, AdiaStepperItem };
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Generated by scripts/migrate-yamls-to-v1.mjs — migrated to v1 contract.
|
|
2
|
+
# Edit this file; run `npm run build:components` to regenerate a2ui.json.
|
|
3
|
+
$schema: ../../../../scripts/schemas/component.yaml.schema.json
|
|
4
|
+
name: AdiaStepper
|
|
5
|
+
tag: stepper-ui
|
|
6
|
+
component: Stepper
|
|
7
|
+
category: navigation
|
|
8
|
+
version: 1
|
|
9
|
+
description: Wizard / process stepper — parent step index drives numbered children.
|
|
10
|
+
props:
|
|
11
|
+
orientation:
|
|
12
|
+
description: horizontal | vertical
|
|
13
|
+
type: string
|
|
14
|
+
default: horizontal
|
|
15
|
+
step:
|
|
16
|
+
description: Current step index (0-based).
|
|
17
|
+
type: number
|
|
18
|
+
default: 0
|
|
19
|
+
events: {}
|
|
20
|
+
slots:
|
|
21
|
+
default:
|
|
22
|
+
description: "Default slot — primary child content."
|
|
23
|
+
states:
|
|
24
|
+
- name: idle
|
|
25
|
+
description: Default, ready for interaction.
|
|
26
|
+
traits: []
|
|
27
|
+
tokens: {}
|
|
28
|
+
a2ui:
|
|
29
|
+
rules: []
|
|
30
|
+
anti_patterns: []
|
|
31
|
+
examples:
|
|
32
|
+
- name: basic
|
|
33
|
+
description: Three-step wizard
|
|
34
|
+
a2ui: >-
|
|
35
|
+
[
|
|
36
|
+
{
|
|
37
|
+
"id": "root",
|
|
38
|
+
"component": "Stepper",
|
|
39
|
+
"step": 1,
|
|
40
|
+
"children": [
|
|
41
|
+
"s1",
|
|
42
|
+
"s2",
|
|
43
|
+
"s3"
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"id": "s1",
|
|
48
|
+
"component": "StepperItem",
|
|
49
|
+
"text": "Account"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"id": "s2",
|
|
53
|
+
"component": "StepperItem",
|
|
54
|
+
"text": "Details"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"id": "s3",
|
|
58
|
+
"component": "StepperItem",
|
|
59
|
+
"text": "Review"
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
keywords:
|
|
63
|
+
- stepper
|
|
64
|
+
- wizard
|
|
65
|
+
- steps
|
|
66
|
+
- process
|
|
67
|
+
- onboarding
|
|
68
|
+
- multi-step
|
|
69
|
+
synonyms:
|
|
70
|
+
timeline-ui mode=steps: stepper-ui
|
|
71
|
+
related:
|
|
72
|
+
- timeline-ui
|
|
73
|
+
- progress-ui
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://adiaui.dev/a2ui/v0_9/components/Stream.json",
|
|
4
|
+
"title": "Stream",
|
|
5
|
+
"description": "Renders an AsyncIterable<string> as streaming text. Used for LLM output and real-time logs.",
|
|
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": "Stream"
|
|
18
|
+
},
|
|
19
|
+
"hide-cursor": {
|
|
20
|
+
"description": "When true, suppress the blinking cursor during active streaming",
|
|
21
|
+
"type": "boolean",
|
|
22
|
+
"default": false
|
|
23
|
+
},
|
|
24
|
+
"pace": {
|
|
25
|
+
"description": "Milliseconds between character renders. 0 = real-time.",
|
|
26
|
+
"type": "number",
|
|
27
|
+
"default": 0
|
|
28
|
+
},
|
|
29
|
+
"streaming": {
|
|
30
|
+
"description": "Read-only reflected state, true while stream is active",
|
|
31
|
+
"type": "boolean",
|
|
32
|
+
"default": false
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"required": [
|
|
36
|
+
"component"
|
|
37
|
+
],
|
|
38
|
+
"unevaluatedProperties": false,
|
|
39
|
+
"x-adiaui": {
|
|
40
|
+
"anti_patterns": [],
|
|
41
|
+
"category": "agent",
|
|
42
|
+
"events": {
|
|
43
|
+
"stream-end": {
|
|
44
|
+
"description": "Fired when stream completes naturally"
|
|
45
|
+
},
|
|
46
|
+
"stream-error": {
|
|
47
|
+
"description": "Fired on stream error, detail: { error }"
|
|
48
|
+
},
|
|
49
|
+
"stream-start": {
|
|
50
|
+
"description": "Fired when streaming begins"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"examples": [
|
|
54
|
+
{
|
|
55
|
+
"description": "AI streaming text response in a chat card.",
|
|
56
|
+
"a2ui": "[\n {\n \"id\": \"root\",\n \"component\": \"Card\",\n \"children\": [\n \"sec\"\n ]\n },\n {\n \"id\": \"sec\",\n \"component\": \"Section\",\n \"children\": [\n \"stream\"\n ]\n },\n {\n \"id\": \"stream\",\n \"component\": \"Stream\",\n \"children\": [\n \"txt\"\n ]\n },\n {\n \"id\": \"txt\",\n \"component\": \"Text\",\n \"variant\": \"body\",\n \"textContent\": \"Generating response...\"\n }\n]",
|
|
57
|
+
"name": "streaming-response"
|
|
58
|
+
}
|
|
59
|
+
],
|
|
60
|
+
"keywords": [
|
|
61
|
+
"stream"
|
|
62
|
+
],
|
|
63
|
+
"name": "AdiaStream",
|
|
64
|
+
"related": [],
|
|
65
|
+
"slots": {
|
|
66
|
+
"default": {
|
|
67
|
+
"description": "Default slot — primary child content."
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"states": [
|
|
71
|
+
{
|
|
72
|
+
"description": "Default, ready for interaction.",
|
|
73
|
+
"name": "idle"
|
|
74
|
+
}
|
|
75
|
+
],
|
|
76
|
+
"synonyms": {},
|
|
77
|
+
"tag": "stream-ui",
|
|
78
|
+
"tokens": {
|
|
79
|
+
"--stream-color": {
|
|
80
|
+
"description": "Text color"
|
|
81
|
+
},
|
|
82
|
+
"--stream-cursor-color": {
|
|
83
|
+
"description": "Blinking cursor color"
|
|
84
|
+
},
|
|
85
|
+
"--stream-font-family": {
|
|
86
|
+
"description": "Font family"
|
|
87
|
+
},
|
|
88
|
+
"--stream-font-size": {
|
|
89
|
+
"description": "Font size"
|
|
90
|
+
},
|
|
91
|
+
"--stream-line-height": {
|
|
92
|
+
"description": "Line height"
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
"traits": [],
|
|
96
|
+
"version": 1
|
|
97
|
+
}
|
|
98
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
@scope (stream-ui) {
|
|
2
|
+
:where(:scope) {
|
|
3
|
+
--stream-fg: var(--a-fg);
|
|
4
|
+
--stream-font-size: var(--a-body-size);
|
|
5
|
+
--stream-font-family: var(--a-font-family);
|
|
6
|
+
--stream-leading: var(--a-body-leading);
|
|
7
|
+
--stream-cursor-color: var(--a-accent-bg);
|
|
8
|
+
--stream-blink-duration: 0.6s;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
:scope {
|
|
12
|
+
box-sizing: border-box;
|
|
13
|
+
display: block;
|
|
14
|
+
color: var(--stream-fg);
|
|
15
|
+
font-family: var(--stream-font-family);
|
|
16
|
+
font-size: var(--stream-font-size);
|
|
17
|
+
line-height: var(--stream-leading);
|
|
18
|
+
white-space: pre-wrap;
|
|
19
|
+
word-break: break-word;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/* Blinking cursor during stream (default; suppress with [hide-cursor]) */
|
|
23
|
+
:scope[streaming]:not([hide-cursor])::after {
|
|
24
|
+
content: '▊';
|
|
25
|
+
color: var(--stream-cursor-color);
|
|
26
|
+
animation: _stream-blink var(--stream-blink-duration) step-end infinite;
|
|
27
|
+
margin-left: 1px;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
:scope:not([streaming])::after {
|
|
31
|
+
content: none;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@keyframes _stream-blink {
|
|
36
|
+
50% { opacity: 0; }
|
|
37
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* <stream-ui></stream-ui>
|
|
3
|
+
* el.tokens = asyncIterable; // starts streaming
|
|
4
|
+
*
|
|
5
|
+
* Renders an AsyncIterable<string> as streaming text.
|
|
6
|
+
* Used for agent prose, LLM output, real-time logs.
|
|
7
|
+
*
|
|
8
|
+
* Props (attributes):
|
|
9
|
+
* pace: ms between character renders (default: 0, real-time)
|
|
10
|
+
* hide-cursor: hide the blinking cursor during stream (default: false — cursor visible)
|
|
11
|
+
*
|
|
12
|
+
* Props (JS only):
|
|
13
|
+
* .tokens: AsyncIterable<string> — the stream source
|
|
14
|
+
*
|
|
15
|
+
* Events:
|
|
16
|
+
* stream-start — streaming begins
|
|
17
|
+
* stream-end — stream completed
|
|
18
|
+
* stream-error — stream error (detail: { error })
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
import { AdiaElement } from '@core/element.js';
|
|
22
|
+
|
|
23
|
+
class AdiaStream extends AdiaElement {
|
|
24
|
+
static properties = {
|
|
25
|
+
pace: { type: Number, default: 0, reflect: true },
|
|
26
|
+
hideCursor: { type: Boolean, default: false, reflect: true, attribute: 'hide-cursor' },
|
|
27
|
+
streaming: { type: Boolean, default: false, reflect: true },
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
#tokens = null;
|
|
31
|
+
#abortCtrl = null;
|
|
32
|
+
#buffer = '';
|
|
33
|
+
|
|
34
|
+
get tokens() { return this.#tokens; }
|
|
35
|
+
set tokens(iterable) {
|
|
36
|
+
this.#tokens = iterable;
|
|
37
|
+
if (iterable) this.#startStream(iterable);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
static template = () => null;
|
|
41
|
+
|
|
42
|
+
async #startStream(iterable) {
|
|
43
|
+
this.#abortCtrl?.abort();
|
|
44
|
+
this.#abortCtrl = new AbortController();
|
|
45
|
+
const signal = this.#abortCtrl.signal;
|
|
46
|
+
|
|
47
|
+
this.#buffer = '';
|
|
48
|
+
this.textContent = '';
|
|
49
|
+
this.streaming = true;
|
|
50
|
+
this.dispatchEvent(new Event('stream-start', { bubbles: true }));
|
|
51
|
+
|
|
52
|
+
try {
|
|
53
|
+
for await (const token of iterable) {
|
|
54
|
+
if (signal.aborted) break;
|
|
55
|
+
this.#buffer += token;
|
|
56
|
+
|
|
57
|
+
if (this.pace > 0) {
|
|
58
|
+
for (const char of token) {
|
|
59
|
+
if (signal.aborted) break;
|
|
60
|
+
this.textContent += char;
|
|
61
|
+
await new Promise(r => setTimeout(r, this.pace));
|
|
62
|
+
}
|
|
63
|
+
} else {
|
|
64
|
+
this.textContent = this.#buffer;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
} catch (err) {
|
|
68
|
+
if (!signal.aborted) {
|
|
69
|
+
this.dispatchEvent(new CustomEvent('stream-error', {
|
|
70
|
+
bubbles: true,
|
|
71
|
+
detail: { error: err },
|
|
72
|
+
}));
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
if (!signal.aborted) {
|
|
77
|
+
this.streaming = false;
|
|
78
|
+
this.dispatchEvent(new Event('stream-end', { bubbles: true }));
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
stop() {
|
|
83
|
+
this.#abortCtrl?.abort();
|
|
84
|
+
this.streaming = false;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
clear() {
|
|
88
|
+
this.stop();
|
|
89
|
+
this.#buffer = '';
|
|
90
|
+
this.textContent = '';
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
disconnected() {
|
|
94
|
+
this.stop();
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
customElements.define('stream-ui', AdiaStream);
|
|
98
|
+
|
|
99
|
+
export { AdiaStream };
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# Generated by scripts/migrate-yamls-to-v1.mjs — migrated to v1 contract.
|
|
2
|
+
# Edit this file; run `npm run build:components` to regenerate a2ui.json.
|
|
3
|
+
$schema: ../../../../scripts/schemas/component.yaml.schema.json
|
|
4
|
+
name: AdiaStream
|
|
5
|
+
tag: stream-ui
|
|
6
|
+
component: Stream
|
|
7
|
+
category: agent
|
|
8
|
+
version: 1
|
|
9
|
+
description: Renders an AsyncIterable<string> as streaming text. Used for LLM output and real-time logs.
|
|
10
|
+
props:
|
|
11
|
+
hide-cursor:
|
|
12
|
+
description: When true, suppress the blinking cursor during active streaming
|
|
13
|
+
type: boolean
|
|
14
|
+
default: false
|
|
15
|
+
pace:
|
|
16
|
+
description: Milliseconds between character renders. 0 = real-time.
|
|
17
|
+
type: number
|
|
18
|
+
default: 0
|
|
19
|
+
streaming:
|
|
20
|
+
description: Read-only reflected state, true while stream is active
|
|
21
|
+
type: boolean
|
|
22
|
+
default: false
|
|
23
|
+
events:
|
|
24
|
+
stream-end:
|
|
25
|
+
description: Fired when stream completes naturally
|
|
26
|
+
stream-error:
|
|
27
|
+
description: "Fired on stream error, detail: { error }"
|
|
28
|
+
stream-start:
|
|
29
|
+
description: Fired when streaming begins
|
|
30
|
+
slots:
|
|
31
|
+
default:
|
|
32
|
+
description: "Default slot — primary child content."
|
|
33
|
+
states:
|
|
34
|
+
- name: idle
|
|
35
|
+
description: Default, ready for interaction.
|
|
36
|
+
traits: []
|
|
37
|
+
tokens:
|
|
38
|
+
--stream-color:
|
|
39
|
+
description: Text color
|
|
40
|
+
--stream-cursor-color:
|
|
41
|
+
description: Blinking cursor color
|
|
42
|
+
--stream-font-family:
|
|
43
|
+
description: Font family
|
|
44
|
+
--stream-font-size:
|
|
45
|
+
description: Font size
|
|
46
|
+
--stream-line-height:
|
|
47
|
+
description: Line height
|
|
48
|
+
a2ui:
|
|
49
|
+
rules: []
|
|
50
|
+
anti_patterns: []
|
|
51
|
+
examples:
|
|
52
|
+
- name: streaming-response
|
|
53
|
+
description: AI streaming text response in a chat card.
|
|
54
|
+
a2ui: >-
|
|
55
|
+
[
|
|
56
|
+
{
|
|
57
|
+
"id": "root",
|
|
58
|
+
"component": "Card",
|
|
59
|
+
"children": [
|
|
60
|
+
"sec"
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"id": "sec",
|
|
65
|
+
"component": "Section",
|
|
66
|
+
"children": [
|
|
67
|
+
"stream"
|
|
68
|
+
]
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"id": "stream",
|
|
72
|
+
"component": "Stream",
|
|
73
|
+
"children": [
|
|
74
|
+
"txt"
|
|
75
|
+
]
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"id": "txt",
|
|
79
|
+
"component": "Text",
|
|
80
|
+
"variant": "body",
|
|
81
|
+
"textContent": "Generating response..."
|
|
82
|
+
}
|
|
83
|
+
]
|
|
84
|
+
keywords:
|
|
85
|
+
- stream
|
|
86
|
+
synonyms: {}
|
|
87
|
+
related: []
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://adiaui.dev/a2ui/v0_9/components/Swiper.json",
|
|
4
|
+
"title": "Swiper",
|
|
5
|
+
"description": "CSS-first carousel with scroll-snap. Supports autoplay, loop, peek, and native scroll markers.",
|
|
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
|
+
"autoplay": {
|
|
17
|
+
"description": "Enable auto-advance",
|
|
18
|
+
"type": "boolean",
|
|
19
|
+
"default": false
|
|
20
|
+
},
|
|
21
|
+
"component": {
|
|
22
|
+
"const": "Swiper"
|
|
23
|
+
},
|
|
24
|
+
"gap": {
|
|
25
|
+
"description": "Gap between slides (token: sm, md, lg)",
|
|
26
|
+
"type": "string",
|
|
27
|
+
"default": ""
|
|
28
|
+
},
|
|
29
|
+
"interval": {
|
|
30
|
+
"description": "Autoplay interval in ms",
|
|
31
|
+
"type": "number",
|
|
32
|
+
"default": 5000
|
|
33
|
+
},
|
|
34
|
+
"loop": {
|
|
35
|
+
"description": "Infinite loop",
|
|
36
|
+
"type": "boolean",
|
|
37
|
+
"default": false
|
|
38
|
+
},
|
|
39
|
+
"peek": {
|
|
40
|
+
"description": "Show peek of adjacent slides",
|
|
41
|
+
"type": "boolean",
|
|
42
|
+
"default": false
|
|
43
|
+
},
|
|
44
|
+
"slides-per-view": {
|
|
45
|
+
"description": "Number of visible slides",
|
|
46
|
+
"type": "string",
|
|
47
|
+
"default": ""
|
|
48
|
+
},
|
|
49
|
+
"slidesPerView": {
|
|
50
|
+
"description": "Number of slides visible at once. Accepts \"1\", \"2\", \"3\", or \"auto\".",
|
|
51
|
+
"type": "string",
|
|
52
|
+
"default": "1"
|
|
53
|
+
},
|
|
54
|
+
"snap": {
|
|
55
|
+
"description": "Scroll-snap alignment — start, center, end, or none.",
|
|
56
|
+
"type": "string",
|
|
57
|
+
"enum": [
|
|
58
|
+
"start",
|
|
59
|
+
"center",
|
|
60
|
+
"end",
|
|
61
|
+
"none"
|
|
62
|
+
],
|
|
63
|
+
"default": "start"
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"required": [
|
|
67
|
+
"component"
|
|
68
|
+
],
|
|
69
|
+
"unevaluatedProperties": false,
|
|
70
|
+
"x-adiaui": {
|
|
71
|
+
"anti_patterns": [],
|
|
72
|
+
"category": "layout",
|
|
73
|
+
"events": {
|
|
74
|
+
"autoplay-pause": {
|
|
75
|
+
"description": "Fired on autoplay-pause."
|
|
76
|
+
},
|
|
77
|
+
"autoplay-resume": {
|
|
78
|
+
"description": "Fired on autoplay-resume."
|
|
79
|
+
},
|
|
80
|
+
"slide-change": {
|
|
81
|
+
"description": "Fired on slide-change."
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"examples": [
|
|
85
|
+
{
|
|
86
|
+
"description": "Basic image carousel with 3 slides",
|
|
87
|
+
"a2ui": "[\n {\n \"id\": \"root\",\n \"component\": \"Card\",\n \"children\": [\n \"hdr\",\n \"sec\"\n ]\n },\n {\n \"id\": \"hdr\",\n \"component\": \"Header\",\n \"children\": [\n \"title\"\n ]\n },\n {\n \"id\": \"title\",\n \"component\": \"Text\",\n \"slot\": \"heading\",\n \"variant\": \"section\",\n \"textContent\": \"Photo Gallery\"\n },\n {\n \"id\": \"sec\",\n \"component\": \"Section\",\n \"children\": [\n \"carousel\"\n ]\n },\n {\n \"id\": \"carousel\",\n \"component\": \"Swiper\",\n \"children\": [\n \"s1\",\n \"s2\",\n \"s3\"\n ],\n \"gap\": \"md\"\n },\n {\n \"id\": \"s1\",\n \"component\": \"Image\",\n \"src\": \"/images/photo-1.jpg\",\n \"alt\": \"Mountain landscape\"\n },\n {\n \"id\": \"s2\",\n \"component\": \"Image\",\n \"src\": \"/images/photo-2.jpg\",\n \"alt\": \"Ocean sunset\"\n },\n {\n \"id\": \"s3\",\n \"component\": \"Image\",\n \"src\": \"/images/photo-3.jpg\",\n \"alt\": \"Forest trail\"\n }\n]",
|
|
88
|
+
"name": "image-carousel"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"description": "Product cards in a peek carousel with autoplay",
|
|
92
|
+
"a2ui": "[\n {\n \"id\": \"root\",\n \"component\": \"Swiper\",\n \"children\": [\n \"p1\",\n \"p2\",\n \"p3\"\n ],\n \"peek\": true,\n \"slides-per-view\": \"3\",\n \"gap\": \"md\",\n \"autoplay\": true,\n \"interval\": \"5000\"\n },\n {\n \"id\": \"p1\",\n \"component\": \"Card\",\n \"children\": [\n \"p1-sec\"\n ]\n },\n {\n \"id\": \"p1-sec\",\n \"component\": \"Section\",\n \"children\": [\n \"p1-img\",\n \"p1-name\",\n \"p1-price\"\n ]\n },\n {\n \"id\": \"p1-img\",\n \"component\": \"Image\",\n \"src\": \"/images/product-1.jpg\",\n \"alt\": \"Wireless headphones\"\n },\n {\n \"id\": \"p1-name\",\n \"component\": \"Text\",\n \"variant\": \"label\",\n \"textContent\": \"Wireless Headphones\"\n },\n {\n \"id\": \"p1-price\",\n \"component\": \"Text\",\n \"variant\": \"metric\",\n \"textContent\": \"$79.99\"\n },\n {\n \"id\": \"p2\",\n \"component\": \"Card\",\n \"children\": [\n \"p2-sec\"\n ]\n },\n {\n \"id\": \"p2-sec\",\n \"component\": \"Section\",\n \"children\": [\n \"p2-img\",\n \"p2-name\",\n \"p2-price\"\n ]\n },\n {\n \"id\": \"p2-img\",\n \"component\": \"Image\",\n \"src\": \"/images/product-2.jpg\",\n \"alt\": \"Smart watch\"\n },\n {\n \"id\": \"p2-name\",\n \"component\": \"Text\",\n \"variant\": \"label\",\n \"textContent\": \"Smart Watch\"\n },\n {\n \"id\": \"p2-price\",\n \"component\": \"Text\",\n \"variant\": \"metric\",\n \"textContent\": \"$199.99\"\n },\n {\n \"id\": \"p3\",\n \"component\": \"Card\",\n \"children\": [\n \"p3-sec\"\n ]\n },\n {\n \"id\": \"p3-sec\",\n \"component\": \"Section\",\n \"children\": [\n \"p3-img\",\n \"p3-name\",\n \"p3-price\"\n ]\n },\n {\n \"id\": \"p3-img\",\n \"component\": \"Image\",\n \"src\": \"/images/product-3.jpg\",\n \"alt\": \"Bluetooth speaker\"\n },\n {\n \"id\": \"p3-name\",\n \"component\": \"Text\",\n \"variant\": \"label\",\n \"textContent\": \"Bluetooth Speaker\"\n },\n {\n \"id\": \"p3-price\",\n \"component\": \"Text\",\n \"variant\": \"metric\",\n \"textContent\": \"$49.99\"\n }\n]",
|
|
93
|
+
"name": "product-showcase"
|
|
94
|
+
}
|
|
95
|
+
],
|
|
96
|
+
"keywords": [
|
|
97
|
+
"carousel",
|
|
98
|
+
"slider",
|
|
99
|
+
"slideshow",
|
|
100
|
+
"slides",
|
|
101
|
+
"gallery",
|
|
102
|
+
"banner",
|
|
103
|
+
"swiper"
|
|
104
|
+
],
|
|
105
|
+
"name": "AdiaSwiper",
|
|
106
|
+
"related": [
|
|
107
|
+
"image-gallery",
|
|
108
|
+
"hero-section",
|
|
109
|
+
"product-card"
|
|
110
|
+
],
|
|
111
|
+
"slots": {
|
|
112
|
+
"default": {
|
|
113
|
+
"description": "Default slot — primary child content."
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
"states": [
|
|
117
|
+
{
|
|
118
|
+
"description": "Default, ready for interaction.",
|
|
119
|
+
"name": "idle"
|
|
120
|
+
}
|
|
121
|
+
],
|
|
122
|
+
"synonyms": {
|
|
123
|
+
"carousel": [
|
|
124
|
+
"swiper",
|
|
125
|
+
"slide",
|
|
126
|
+
"gallery",
|
|
127
|
+
"banner"
|
|
128
|
+
],
|
|
129
|
+
"slideshow": [
|
|
130
|
+
"swiper",
|
|
131
|
+
"carousel",
|
|
132
|
+
"slide"
|
|
133
|
+
]
|
|
134
|
+
},
|
|
135
|
+
"tag": "swiper-ui",
|
|
136
|
+
"tokens": {},
|
|
137
|
+
"traits": [],
|
|
138
|
+
"version": 1
|
|
139
|
+
}
|
|
140
|
+
}
|