@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,133 @@
|
|
|
1
|
+
@scope (tree-ui) {
|
|
2
|
+
:where(:scope) {
|
|
3
|
+
/* ── Layout ── */
|
|
4
|
+
--tree-row-height: var(--a-size);
|
|
5
|
+
--tree-row-radius: var(--a-radius-sm);
|
|
6
|
+
--tree-row-px: var(--a-space-1);
|
|
7
|
+
--tree-row-gap: var(--a-space-1);
|
|
8
|
+
--tree-actions-gap: var(--a-space-0-5);
|
|
9
|
+
--tree-indent: var(--a-space-4);
|
|
10
|
+
--tree-chevron-size: var(--a-space-2);
|
|
11
|
+
--tree-icon-size: var(--a-space-3);
|
|
12
|
+
|
|
13
|
+
/* ── Typography ── */
|
|
14
|
+
--tree-font-size: var(--a-ui-size);
|
|
15
|
+
|
|
16
|
+
/* ── Colors ── */
|
|
17
|
+
--tree-fg: var(--a-fg);
|
|
18
|
+
--tree-fg-muted: var(--a-fg-muted);
|
|
19
|
+
--tree-bg-hover: var(--a-bg-muted);
|
|
20
|
+
--tree-bg-selected: var(--a-bg-hover);
|
|
21
|
+
|
|
22
|
+
/* ── Transition ── */
|
|
23
|
+
--tree-duration: var(--a-duration-fast);
|
|
24
|
+
--tree-easing: var(--a-easing);
|
|
25
|
+
|
|
26
|
+
/* ── State ── */
|
|
27
|
+
--tree-focus-ring: var(--a-focus-ring);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
:scope {
|
|
31
|
+
/* ── Base ── */
|
|
32
|
+
box-sizing: border-box;
|
|
33
|
+
display: flex;
|
|
34
|
+
flex-direction: column;
|
|
35
|
+
font-size: var(--tree-font-size);
|
|
36
|
+
color: var(--tree-fg);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@scope (tree-item-ui) {
|
|
41
|
+
:scope {
|
|
42
|
+
box-sizing: border-box;
|
|
43
|
+
display: flex;
|
|
44
|
+
flex-direction: column;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* ── Row ── */
|
|
48
|
+
[slot="row"] {
|
|
49
|
+
display: flex;
|
|
50
|
+
align-items: center;
|
|
51
|
+
gap: var(--tree-row-gap);
|
|
52
|
+
height: var(--tree-row-height);
|
|
53
|
+
padding-inline-end: var(--tree-row-px);
|
|
54
|
+
border-radius: var(--tree-row-radius);
|
|
55
|
+
cursor: pointer;
|
|
56
|
+
user-select: none;
|
|
57
|
+
white-space: nowrap;
|
|
58
|
+
transition:
|
|
59
|
+
background var(--tree-duration) var(--tree-easing),
|
|
60
|
+
color var(--tree-duration) var(--tree-easing);
|
|
61
|
+
outline: none;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
[slot="row"]:hover {
|
|
65
|
+
background: var(--tree-bg-hover);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
[slot="row"]:focus-visible {
|
|
69
|
+
box-shadow: var(--tree-focus-ring);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
:scope[selected] > [slot="row"] {
|
|
73
|
+
background: var(--tree-bg-selected);
|
|
74
|
+
color: var(--tree-fg);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/* ── Chevron ── */
|
|
78
|
+
[slot="chevron"] {
|
|
79
|
+
--a-icon-size: var(--tree-chevron-size);
|
|
80
|
+
flex-shrink: 0;
|
|
81
|
+
color: var(--tree-fg-muted);
|
|
82
|
+
transition: transform var(--tree-duration) var(--tree-easing);
|
|
83
|
+
transform: rotate(90deg);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
:scope:not([open]) > [slot="row"] > [slot="chevron"] {
|
|
87
|
+
transform: rotate(0deg);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/* Hide chevron for leaf nodes */
|
|
91
|
+
:scope:not(:has(> tree-item-ui)) > [slot="row"] > [slot="chevron"] {
|
|
92
|
+
visibility: hidden;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/* ── Icon ── */
|
|
96
|
+
[slot="icon"] {
|
|
97
|
+
--a-icon-size: var(--tree-icon-size);
|
|
98
|
+
color: var(--tree-fg-muted);
|
|
99
|
+
flex-shrink: 0;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
:scope[selected] > [slot="row"] [slot="icon"] {
|
|
103
|
+
color: var(--tree-fg);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/* ── Text ── */
|
|
107
|
+
[slot="text"] {
|
|
108
|
+
flex: 1;
|
|
109
|
+
min-width: 0;
|
|
110
|
+
overflow: hidden;
|
|
111
|
+
text-overflow: ellipsis;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/* ── Actions (right side) ── */
|
|
115
|
+
[slot="actions"] {
|
|
116
|
+
display: flex;
|
|
117
|
+
align-items: center;
|
|
118
|
+
gap: var(--tree-actions-gap);
|
|
119
|
+
margin-inline-start: auto;
|
|
120
|
+
opacity: 0;
|
|
121
|
+
transition: opacity var(--tree-duration) var(--tree-easing);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
[slot="row"]:hover [slot="actions"],
|
|
125
|
+
:scope[selected] > [slot="row"] [slot="actions"] {
|
|
126
|
+
opacity: 1;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/* ── Children — collapsed state ── */
|
|
130
|
+
:scope:not([open]) > tree-item-ui {
|
|
131
|
+
display: none;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* <tree-ui> — Collapsible tree with nested items.
|
|
3
|
+
*
|
|
4
|
+
* Structure:
|
|
5
|
+
* <tree-ui>
|
|
6
|
+
* <tree-item-ui text="Page" icon="file">
|
|
7
|
+
* <tree-item-ui text="Header" icon="layout"></tree-item-ui>
|
|
8
|
+
* <tree-item-ui text="Hero" icon="image">
|
|
9
|
+
* <tree-item-ui text="Title" icon="text-aa"></tree-item-ui>
|
|
10
|
+
* <tree-item-ui text="CTA" icon="cursor-click"></tree-item-ui>
|
|
11
|
+
* </tree-item-ui>
|
|
12
|
+
* <tree-item-ui text="Footer" icon="layout"></tree-item-ui>
|
|
13
|
+
* </tree-item-ui>
|
|
14
|
+
* </tree-ui>
|
|
15
|
+
*
|
|
16
|
+
* tree-ui is the root container. tree-item-ui handles nesting, collapse, selection.
|
|
17
|
+
*
|
|
18
|
+
* Events:
|
|
19
|
+
* tree-select — fired on tree-ui when an item is selected (detail: { item, text, value })
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
import { AdiaElement } from '@core/element.js';
|
|
23
|
+
|
|
24
|
+
class AdiaTree extends AdiaElement {
|
|
25
|
+
static template = () => null;
|
|
26
|
+
|
|
27
|
+
connected() {
|
|
28
|
+
this.setAttribute('role', 'tree');
|
|
29
|
+
this.addEventListener('click', this.#onClick);
|
|
30
|
+
this.addEventListener('keydown', this.#onKey);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
get selectedItem() {
|
|
34
|
+
return this.querySelector('tree-item-ui[selected]');
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
select(item) {
|
|
38
|
+
const prev = this.selectedItem;
|
|
39
|
+
if (prev && prev !== item) prev.removeAttribute('selected');
|
|
40
|
+
item.setAttribute('selected', '');
|
|
41
|
+
this.dispatchEvent(new CustomEvent('tree-select', {
|
|
42
|
+
bubbles: true,
|
|
43
|
+
detail: { item, text: item.text, value: item.value },
|
|
44
|
+
}));
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
#onClick = (e) => {
|
|
48
|
+
const item = e.target.closest('tree-item-ui');
|
|
49
|
+
if (!item || !this.contains(item)) return;
|
|
50
|
+
|
|
51
|
+
// Ignore clicks on action buttons inside the row
|
|
52
|
+
if (e.target.closest('[slot="actions"] *')) return;
|
|
53
|
+
|
|
54
|
+
const row = item.querySelector(':scope > [slot="row"]');
|
|
55
|
+
if (!row || !(e.target === row || row.contains(e.target))) return;
|
|
56
|
+
|
|
57
|
+
// Single click: select + toggle if has children
|
|
58
|
+
this.select(item);
|
|
59
|
+
if (item.hasChildren) {
|
|
60
|
+
item.open = !item.open;
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
#onKey = (e) => {
|
|
65
|
+
const item = e.target.closest('tree-item-ui');
|
|
66
|
+
if (!item) return;
|
|
67
|
+
|
|
68
|
+
switch (e.key) {
|
|
69
|
+
case 'ArrowRight':
|
|
70
|
+
e.preventDefault();
|
|
71
|
+
if (item.hasChildren && !item.open) {
|
|
72
|
+
item.open = true;
|
|
73
|
+
} else {
|
|
74
|
+
const first = item.querySelector(':scope > tree-item-ui');
|
|
75
|
+
if (first) first.querySelector('[slot="row"]')?.focus();
|
|
76
|
+
}
|
|
77
|
+
break;
|
|
78
|
+
|
|
79
|
+
case 'ArrowLeft':
|
|
80
|
+
e.preventDefault();
|
|
81
|
+
if (item.hasChildren && item.open) {
|
|
82
|
+
item.open = false;
|
|
83
|
+
} else {
|
|
84
|
+
const parent = item.parentElement?.closest('tree-item-ui');
|
|
85
|
+
if (parent) parent.querySelector(':scope > [slot="row"]')?.focus();
|
|
86
|
+
}
|
|
87
|
+
break;
|
|
88
|
+
|
|
89
|
+
case 'ArrowDown': {
|
|
90
|
+
e.preventDefault();
|
|
91
|
+
const next = this.#nextVisible(item);
|
|
92
|
+
if (next) next.querySelector(':scope > [slot="row"]')?.focus();
|
|
93
|
+
break;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
case 'ArrowUp': {
|
|
97
|
+
e.preventDefault();
|
|
98
|
+
const prev = this.#prevVisible(item);
|
|
99
|
+
if (prev) prev.querySelector(':scope > [slot="row"]')?.focus();
|
|
100
|
+
break;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
case 'Enter':
|
|
104
|
+
case ' ':
|
|
105
|
+
e.preventDefault();
|
|
106
|
+
this.select(item);
|
|
107
|
+
break;
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
#nextVisible(item) {
|
|
112
|
+
// If has visible children, go into first child
|
|
113
|
+
if (item.open && item.hasChildren) {
|
|
114
|
+
return item.querySelector(':scope > tree-item-ui');
|
|
115
|
+
}
|
|
116
|
+
// Otherwise find next sibling or parent's next sibling
|
|
117
|
+
let current = item;
|
|
118
|
+
while (current) {
|
|
119
|
+
const next = current.nextElementSibling;
|
|
120
|
+
if (next && next.matches('tree-item-ui')) return next;
|
|
121
|
+
current = current.parentElement?.closest('tree-item-ui');
|
|
122
|
+
}
|
|
123
|
+
return null;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
#prevVisible(item) {
|
|
127
|
+
const prev = item.previousElementSibling;
|
|
128
|
+
if (prev && prev.matches('tree-item-ui')) {
|
|
129
|
+
// Go to last visible descendant of previous sibling
|
|
130
|
+
let last = prev;
|
|
131
|
+
while (last.open && last.hasChildren) {
|
|
132
|
+
const children = last.querySelectorAll(':scope > tree-item-ui');
|
|
133
|
+
last = children[children.length - 1];
|
|
134
|
+
}
|
|
135
|
+
return last;
|
|
136
|
+
}
|
|
137
|
+
// Go to parent
|
|
138
|
+
const parent = item.parentElement?.closest('tree-item-ui');
|
|
139
|
+
return parent || null;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
disconnected() {
|
|
143
|
+
this.removeEventListener('click', this.#onClick);
|
|
144
|
+
this.removeEventListener('keydown', this.#onKey);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
customElements.define('tree-ui', AdiaTree);
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* <tree-item-ui> — A single node in the tree.
|
|
152
|
+
*
|
|
153
|
+
* Attributes:
|
|
154
|
+
* text — display label
|
|
155
|
+
* icon — icon name (optional, rendered via icon-ui)
|
|
156
|
+
* value — value for selection events
|
|
157
|
+
* open — boolean, expanded state (has children only)
|
|
158
|
+
* selected — boolean, selected state
|
|
159
|
+
*
|
|
160
|
+
* Slots:
|
|
161
|
+
* row — the clickable row [chevron][icon][text][actions]
|
|
162
|
+
* chevron — collapse toggle indicator
|
|
163
|
+
* actions — right-aligned action icons (eye, lock, etc.)
|
|
164
|
+
* children — nested tree-item-ns (auto-detected)
|
|
165
|
+
*/
|
|
166
|
+
class AdiaTreeItem extends AdiaElement {
|
|
167
|
+
static properties = {
|
|
168
|
+
text: { type: String, default: '', reflect: true },
|
|
169
|
+
icon: { type: String, default: '', reflect: true },
|
|
170
|
+
value: { type: String, default: '', reflect: true },
|
|
171
|
+
open: { type: Boolean, default: false, reflect: true },
|
|
172
|
+
selected: { type: Boolean, default: false, reflect: true },
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
static template = () => null;
|
|
176
|
+
|
|
177
|
+
get hasChildren() {
|
|
178
|
+
return this.querySelector(':scope > tree-item-ui') !== null;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
get depth() {
|
|
182
|
+
let d = 0;
|
|
183
|
+
let el = this.parentElement;
|
|
184
|
+
while (el) {
|
|
185
|
+
if (el.matches('tree-item-ui')) d++;
|
|
186
|
+
el = el.parentElement;
|
|
187
|
+
}
|
|
188
|
+
return d;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
connected() {
|
|
192
|
+
this.setAttribute('role', 'treeitem');
|
|
193
|
+
|
|
194
|
+
if (!this.querySelector(':scope > [slot="row"]')) {
|
|
195
|
+
this.#stamp();
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
#stamp() {
|
|
200
|
+
const row = document.createElement('div');
|
|
201
|
+
row.setAttribute('slot', 'row');
|
|
202
|
+
row.setAttribute('tabindex', '0');
|
|
203
|
+
|
|
204
|
+
// Chevron
|
|
205
|
+
const chevron = document.createElement('icon-ui');
|
|
206
|
+
chevron.setAttribute('slot', 'chevron');
|
|
207
|
+
chevron.setAttribute('name', 'caret-right');
|
|
208
|
+
row.appendChild(chevron);
|
|
209
|
+
|
|
210
|
+
// Icon
|
|
211
|
+
if (this.icon) {
|
|
212
|
+
const iconEl = document.createElement('icon-ui');
|
|
213
|
+
iconEl.setAttribute('name', this.icon);
|
|
214
|
+
iconEl.setAttribute('slot', 'icon');
|
|
215
|
+
row.appendChild(iconEl);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
// Text
|
|
219
|
+
const textEl = document.createElement('span');
|
|
220
|
+
textEl.setAttribute('slot', 'text');
|
|
221
|
+
textEl.textContent = this.text;
|
|
222
|
+
row.appendChild(textEl);
|
|
223
|
+
|
|
224
|
+
// Actions slot placeholder
|
|
225
|
+
const actions = document.createElement('span');
|
|
226
|
+
actions.setAttribute('slot', 'actions');
|
|
227
|
+
row.appendChild(actions);
|
|
228
|
+
|
|
229
|
+
this.prepend(row);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
render() {
|
|
233
|
+
const row = this.querySelector(':scope > [slot="row"]');
|
|
234
|
+
if (!row) return;
|
|
235
|
+
|
|
236
|
+
// Update depth-based indent
|
|
237
|
+
row.style.paddingInlineStart = `${this.depth * 16 + 4}px`;
|
|
238
|
+
|
|
239
|
+
// Update aria
|
|
240
|
+
if (this.hasChildren) {
|
|
241
|
+
this.setAttribute('aria-expanded', String(this.open));
|
|
242
|
+
} else {
|
|
243
|
+
this.removeAttribute('aria-expanded');
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
// Update text
|
|
247
|
+
const textEl = row.querySelector('[slot="text"]');
|
|
248
|
+
if (textEl && this.text) textEl.textContent = this.text;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
customElements.define('tree-item-ui', AdiaTreeItem);
|
|
252
|
+
|
|
253
|
+
export { AdiaTree, AdiaTreeItem };
|
|
@@ -0,0 +1,92 @@
|
|
|
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: AdiaTree
|
|
5
|
+
tag: tree-ui
|
|
6
|
+
component: Tree
|
|
7
|
+
category: data
|
|
8
|
+
version: 1
|
|
9
|
+
description: Collapsible tree container with keyboard navigation (arrow keys, Enter/Space). Manages
|
|
10
|
+
selection across nested tree-item-ns.
|
|
11
|
+
props: {}
|
|
12
|
+
events:
|
|
13
|
+
tree-select:
|
|
14
|
+
description: "Fired when an item is selected. detail: { item, text, value }"
|
|
15
|
+
slots:
|
|
16
|
+
default (tree-item-ui children):
|
|
17
|
+
description: "Child content region for the `default (tree-item-ui children)` slot."
|
|
18
|
+
states:
|
|
19
|
+
- name: idle
|
|
20
|
+
description: Default, ready for interaction.
|
|
21
|
+
traits: []
|
|
22
|
+
tokens:
|
|
23
|
+
--tree-actions-gap:
|
|
24
|
+
description: Gap between action icons
|
|
25
|
+
--tree-bg-hover:
|
|
26
|
+
description: Background color on hover
|
|
27
|
+
--tree-bg-selected:
|
|
28
|
+
description: Background color when selected
|
|
29
|
+
--tree-chevron-size:
|
|
30
|
+
description: Size of the collapse chevron icon
|
|
31
|
+
--tree-duration:
|
|
32
|
+
description: Transition duration
|
|
33
|
+
--tree-easing:
|
|
34
|
+
description: Transition easing function
|
|
35
|
+
--tree-fg:
|
|
36
|
+
description: Primary text color
|
|
37
|
+
--tree-fg-muted:
|
|
38
|
+
description: Muted text color (icons, chevrons)
|
|
39
|
+
--tree-focus-ring:
|
|
40
|
+
description: Focus ring box-shadow
|
|
41
|
+
--tree-font-size:
|
|
42
|
+
description: Font size for tree items
|
|
43
|
+
--tree-icon-size:
|
|
44
|
+
description: Size of the item icon
|
|
45
|
+
--tree-indent:
|
|
46
|
+
description: Indentation per nesting level
|
|
47
|
+
--tree-row-gap:
|
|
48
|
+
description: Gap between elements within a row
|
|
49
|
+
--tree-row-height:
|
|
50
|
+
description: Height of each tree item row
|
|
51
|
+
--tree-row-px:
|
|
52
|
+
description: Inline-end padding of each row
|
|
53
|
+
--tree-row-radius:
|
|
54
|
+
description: Border radius of each row
|
|
55
|
+
a2ui:
|
|
56
|
+
rules: []
|
|
57
|
+
anti_patterns: []
|
|
58
|
+
examples:
|
|
59
|
+
- name: basic-tree
|
|
60
|
+
description: Basic Tree usage
|
|
61
|
+
a2ui: >-
|
|
62
|
+
[
|
|
63
|
+
{
|
|
64
|
+
"id": "root",
|
|
65
|
+
"component": "Card",
|
|
66
|
+
"children": [
|
|
67
|
+
"sec"
|
|
68
|
+
]
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"id": "sec",
|
|
72
|
+
"component": "Section",
|
|
73
|
+
"children": [
|
|
74
|
+
"comp"
|
|
75
|
+
]
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"id": "comp",
|
|
79
|
+
"component": "Tree"
|
|
80
|
+
}
|
|
81
|
+
]
|
|
82
|
+
keywords:
|
|
83
|
+
- tree
|
|
84
|
+
- folder
|
|
85
|
+
synonyms:
|
|
86
|
+
folder:
|
|
87
|
+
- inbox
|
|
88
|
+
- email
|
|
89
|
+
- sidebar
|
|
90
|
+
- nav
|
|
91
|
+
- tree
|
|
92
|
+
related: []
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://adiaui.dev/a2ui/v0_9/components/Upload.json",
|
|
4
|
+
"title": "Upload",
|
|
5
|
+
"description": "File upload with drag-and-drop. Uses showOpenFilePicker with input[type=file] fallback. Form-associated.",
|
|
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
|
+
"required": {
|
|
17
|
+
"description": "Marks as required",
|
|
18
|
+
"type": "boolean",
|
|
19
|
+
"default": false
|
|
20
|
+
},
|
|
21
|
+
"accept": {
|
|
22
|
+
"description": "Accepted file types (e.g. image/*,.pdf)",
|
|
23
|
+
"type": "string",
|
|
24
|
+
"default": ""
|
|
25
|
+
},
|
|
26
|
+
"component": {
|
|
27
|
+
"const": "Upload"
|
|
28
|
+
},
|
|
29
|
+
"disabled": {
|
|
30
|
+
"description": "Disables interaction",
|
|
31
|
+
"type": "boolean",
|
|
32
|
+
"default": false
|
|
33
|
+
},
|
|
34
|
+
"hint": {
|
|
35
|
+
"description": "Help text below the dropzone",
|
|
36
|
+
"type": "string",
|
|
37
|
+
"default": ""
|
|
38
|
+
},
|
|
39
|
+
"label": {
|
|
40
|
+
"description": "Label text above the dropzone",
|
|
41
|
+
"type": "string",
|
|
42
|
+
"default": ""
|
|
43
|
+
},
|
|
44
|
+
"multiple": {
|
|
45
|
+
"description": "Allows selecting multiple files",
|
|
46
|
+
"type": "boolean",
|
|
47
|
+
"default": false
|
|
48
|
+
},
|
|
49
|
+
"name": {
|
|
50
|
+
"description": "Form field name",
|
|
51
|
+
"type": "string",
|
|
52
|
+
"default": ""
|
|
53
|
+
},
|
|
54
|
+
"value": {
|
|
55
|
+
"description": "Current value",
|
|
56
|
+
"type": "string",
|
|
57
|
+
"default": ""
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"required": [
|
|
61
|
+
"component"
|
|
62
|
+
],
|
|
63
|
+
"unevaluatedProperties": false,
|
|
64
|
+
"x-adiaui": {
|
|
65
|
+
"anti_patterns": [],
|
|
66
|
+
"category": "input",
|
|
67
|
+
"events": {
|
|
68
|
+
"change": {
|
|
69
|
+
"description": "Fired when files are selected via click or drag-and-drop"
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"examples": [
|
|
73
|
+
{
|
|
74
|
+
"description": "Data import wizard with file upload, progress tracking, and action buttons.",
|
|
75
|
+
"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 \"textContent\": \"Import Data\"\n },\n {\n \"id\": \"sec\",\n \"component\": \"Section\",\n \"children\": [\n \"col\"\n ]\n },\n {\n \"id\": \"col\",\n \"component\": \"Column\",\n \"children\": [\n \"upload\",\n \"prog\",\n \"actions\"\n ],\n \"gap\": \"4\"\n },\n {\n \"id\": \"upload\",\n \"component\": \"Upload\",\n \"accept\": \".csv,.xlsx\",\n \"label\": \"Drop files here\"\n },\n {\n \"id\": \"prog\",\n \"component\": \"Progress\",\n \"value\": 0,\n \"max\": 100\n },\n {\n \"id\": \"actions\",\n \"component\": \"Row\",\n \"children\": [\n \"cancel\",\n \"start\"\n ],\n \"gap\": \"2\"\n },\n {\n \"id\": \"cancel\",\n \"component\": \"Button\",\n \"text\": \"Cancel\",\n \"variant\": \"outline\"\n },\n {\n \"id\": \"start\",\n \"component\": \"Button\",\n \"text\": \"Import\",\n \"variant\": \"primary\"\n }\n]",
|
|
76
|
+
"name": "data-import"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"description": "Card with upload component, file list area, and submit button.",
|
|
80
|
+
"a2ui": "[\n {\n \"id\": \"root\",\n \"component\": \"Card\",\n \"children\": [\n \"hdr\",\n \"sec\",\n \"ftr\"\n ]\n },\n {\n \"id\": \"hdr\",\n \"component\": \"Header\",\n \"children\": [\n \"title\",\n \"desc\"\n ]\n },\n {\n \"id\": \"title\",\n \"component\": \"Text\",\n \"slot\": \"heading\",\n \"textContent\": \"Upload Files\",\n \"variant\": \"section\"\n },\n {\n \"id\": \"desc\",\n \"component\": \"Text\",\n \"slot\": \"description\",\n \"variant\": \"caption\",\n \"textContent\": \"Drag and drop or browse to upload\"\n },\n {\n \"id\": \"sec\",\n \"component\": \"Section\",\n \"children\": [\n \"content\"\n ]\n },\n {\n \"id\": \"content\",\n \"component\": \"Column\",\n \"children\": [\n \"uploader\",\n \"file-list\"\n ],\n \"gap\": \"4\"\n },\n {\n \"id\": \"uploader\",\n \"component\": \"Upload\",\n \"accept\": \"*/*\",\n \"multiple\": true\n },\n {\n \"id\": \"file-list\",\n \"component\": \"Column\",\n \"children\": [\n \"file-list-label\"\n ],\n \"gap\": \"2\"\n },\n {\n \"id\": \"file-list-label\",\n \"component\": \"Text\",\n \"variant\": \"caption\",\n \"textContent\": \"No files selected\"\n },\n {\n \"id\": \"ftr\",\n \"component\": \"Footer\",\n \"children\": [\n \"ftr-actions\"\n ]\n },\n {\n \"id\": \"ftr-actions\",\n \"component\": \"Row\",\n \"children\": [\n \"cancel-btn\",\n \"submit-btn\"\n ]\n },\n {\n \"id\": \"cancel-btn\",\n \"component\": \"Button\",\n \"text\": \"Cancel\",\n \"variant\": \"ghost\"\n },\n {\n \"id\": \"submit-btn\",\n \"component\": \"Button\",\n \"text\": \"Upload\",\n \"variant\": \"primary\"\n }\n]",
|
|
81
|
+
"name": "file-upload-form"
|
|
82
|
+
}
|
|
83
|
+
],
|
|
84
|
+
"keywords": [
|
|
85
|
+
"upload",
|
|
86
|
+
"attach",
|
|
87
|
+
"dropzone",
|
|
88
|
+
"drag",
|
|
89
|
+
"import",
|
|
90
|
+
"transfer",
|
|
91
|
+
"file-manager",
|
|
92
|
+
"files"
|
|
93
|
+
],
|
|
94
|
+
"name": "AdiaUpload",
|
|
95
|
+
"related": [
|
|
96
|
+
"progress",
|
|
97
|
+
"button",
|
|
98
|
+
"grid",
|
|
99
|
+
"image",
|
|
100
|
+
"input"
|
|
101
|
+
],
|
|
102
|
+
"slots": {
|
|
103
|
+
"dropzone": {
|
|
104
|
+
"description": "Click/drop target area"
|
|
105
|
+
},
|
|
106
|
+
"filelist": {
|
|
107
|
+
"description": "List of selected file names"
|
|
108
|
+
},
|
|
109
|
+
"hint": {
|
|
110
|
+
"description": "Help text below the dropzone"
|
|
111
|
+
},
|
|
112
|
+
"input": {
|
|
113
|
+
"description": "Hidden native file input"
|
|
114
|
+
},
|
|
115
|
+
"label": {
|
|
116
|
+
"description": "Label element above the dropzone"
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
"states": [
|
|
120
|
+
{
|
|
121
|
+
"description": "Default, ready for interaction.",
|
|
122
|
+
"name": "idle"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"description": "Non-interactive; dimmed.",
|
|
126
|
+
"attribute": "disabled",
|
|
127
|
+
"name": "disabled"
|
|
128
|
+
}
|
|
129
|
+
],
|
|
130
|
+
"synonyms": {
|
|
131
|
+
"attach": [
|
|
132
|
+
"file",
|
|
133
|
+
"upload",
|
|
134
|
+
"image"
|
|
135
|
+
],
|
|
136
|
+
"drag": [
|
|
137
|
+
"file",
|
|
138
|
+
"upload",
|
|
139
|
+
"import",
|
|
140
|
+
"kanban"
|
|
141
|
+
],
|
|
142
|
+
"dropzone": [
|
|
143
|
+
"file",
|
|
144
|
+
"upload",
|
|
145
|
+
"image",
|
|
146
|
+
"import"
|
|
147
|
+
],
|
|
148
|
+
"file-manager": [
|
|
149
|
+
"data",
|
|
150
|
+
"table",
|
|
151
|
+
"file",
|
|
152
|
+
"upload"
|
|
153
|
+
],
|
|
154
|
+
"files": [
|
|
155
|
+
"data",
|
|
156
|
+
"table",
|
|
157
|
+
"file",
|
|
158
|
+
"upload"
|
|
159
|
+
],
|
|
160
|
+
"import": [
|
|
161
|
+
"data",
|
|
162
|
+
"import",
|
|
163
|
+
"file",
|
|
164
|
+
"upload",
|
|
165
|
+
"table"
|
|
166
|
+
],
|
|
167
|
+
"transfer": [
|
|
168
|
+
"data",
|
|
169
|
+
"import",
|
|
170
|
+
"upload"
|
|
171
|
+
],
|
|
172
|
+
"upload": [
|
|
173
|
+
"file",
|
|
174
|
+
"upload",
|
|
175
|
+
"image",
|
|
176
|
+
"import",
|
|
177
|
+
"data"
|
|
178
|
+
]
|
|
179
|
+
},
|
|
180
|
+
"tag": "upload-ui",
|
|
181
|
+
"tokens": {},
|
|
182
|
+
"traits": [],
|
|
183
|
+
"version": 1
|
|
184
|
+
}
|
|
185
|
+
}
|