@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,145 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://adiaui.dev/a2ui/v0_9/components/List.json",
|
|
4
|
+
"title": "List",
|
|
5
|
+
"description": "Styled list with optional icons and dividers.",
|
|
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
|
+
"align": {
|
|
17
|
+
"description": "Alignment — values depend on container semantics.",
|
|
18
|
+
"type": "string",
|
|
19
|
+
"enum": [
|
|
20
|
+
"start",
|
|
21
|
+
"center",
|
|
22
|
+
"end",
|
|
23
|
+
"stretch"
|
|
24
|
+
],
|
|
25
|
+
"default": "stretch"
|
|
26
|
+
},
|
|
27
|
+
"component": {
|
|
28
|
+
"const": "List"
|
|
29
|
+
},
|
|
30
|
+
"direction": {
|
|
31
|
+
"description": "Component property: direction.",
|
|
32
|
+
"type": "string",
|
|
33
|
+
"enum": [
|
|
34
|
+
"vertical",
|
|
35
|
+
"horizontal"
|
|
36
|
+
],
|
|
37
|
+
"default": "vertical"
|
|
38
|
+
},
|
|
39
|
+
"divider": {
|
|
40
|
+
"description": "Show dividers between items",
|
|
41
|
+
"type": "boolean",
|
|
42
|
+
"default": false
|
|
43
|
+
},
|
|
44
|
+
"gap": {
|
|
45
|
+
"description": "Gap between children.",
|
|
46
|
+
"type": "string",
|
|
47
|
+
"enum": [
|
|
48
|
+
"none",
|
|
49
|
+
"xs",
|
|
50
|
+
"sm",
|
|
51
|
+
"md",
|
|
52
|
+
"lg",
|
|
53
|
+
"xl"
|
|
54
|
+
],
|
|
55
|
+
"default": "sm"
|
|
56
|
+
},
|
|
57
|
+
"selectable": {
|
|
58
|
+
"description": "Enable selection on child listitems (roving tabindex + aria-selected).",
|
|
59
|
+
"type": "boolean",
|
|
60
|
+
"default": false
|
|
61
|
+
},
|
|
62
|
+
"selectedKey": {
|
|
63
|
+
"description": "ID (or data-key) of the currently-selected child listitem.",
|
|
64
|
+
"type": "string",
|
|
65
|
+
"default": ""
|
|
66
|
+
},
|
|
67
|
+
"spacing": {
|
|
68
|
+
"description": "Item spacing",
|
|
69
|
+
"type": "string",
|
|
70
|
+
"default": "md"
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"required": [
|
|
74
|
+
"component"
|
|
75
|
+
],
|
|
76
|
+
"unevaluatedProperties": false,
|
|
77
|
+
"x-adiaui": {
|
|
78
|
+
"anti_patterns": [],
|
|
79
|
+
"category": "layout",
|
|
80
|
+
"events": {
|
|
81
|
+
"selection-change": {
|
|
82
|
+
"description": "Fired on selection-change."
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
"examples": [
|
|
86
|
+
{
|
|
87
|
+
"description": "Basic List usage",
|
|
88
|
+
"a2ui": "[\n {\n \"id\": \"root\",\n \"component\": \"Card\",\n \"children\": [\n \"sec\"\n ]\n },\n {\n \"id\": \"sec\",\n \"component\": \"Section\",\n \"children\": [\n \"comp\"\n ]\n },\n {\n \"id\": \"comp\",\n \"component\": \"List\"\n }\n]",
|
|
89
|
+
"name": "basic-list"
|
|
90
|
+
}
|
|
91
|
+
],
|
|
92
|
+
"keywords": [
|
|
93
|
+
"list",
|
|
94
|
+
"listing",
|
|
95
|
+
"bookmark",
|
|
96
|
+
"favorite",
|
|
97
|
+
"save",
|
|
98
|
+
"pin",
|
|
99
|
+
"star"
|
|
100
|
+
],
|
|
101
|
+
"name": "AdiaList",
|
|
102
|
+
"related": [],
|
|
103
|
+
"slots": {},
|
|
104
|
+
"states": [
|
|
105
|
+
{
|
|
106
|
+
"description": "Default, ready for interaction.",
|
|
107
|
+
"name": "idle"
|
|
108
|
+
}
|
|
109
|
+
],
|
|
110
|
+
"synonyms": {
|
|
111
|
+
"bookmark": [
|
|
112
|
+
"bookmark",
|
|
113
|
+
"list",
|
|
114
|
+
"favorite"
|
|
115
|
+
],
|
|
116
|
+
"favorite": [
|
|
117
|
+
"bookmark",
|
|
118
|
+
"list"
|
|
119
|
+
],
|
|
120
|
+
"listing": [
|
|
121
|
+
"table",
|
|
122
|
+
"data",
|
|
123
|
+
"list"
|
|
124
|
+
],
|
|
125
|
+
"pin": [
|
|
126
|
+
"bookmark",
|
|
127
|
+
"list"
|
|
128
|
+
],
|
|
129
|
+
"save": [
|
|
130
|
+
"bookmark",
|
|
131
|
+
"list",
|
|
132
|
+
"favorite"
|
|
133
|
+
],
|
|
134
|
+
"star": [
|
|
135
|
+
"bookmark",
|
|
136
|
+
"list",
|
|
137
|
+
"leaderboard"
|
|
138
|
+
]
|
|
139
|
+
},
|
|
140
|
+
"tag": "list-ui",
|
|
141
|
+
"tokens": {},
|
|
142
|
+
"traits": [],
|
|
143
|
+
"version": 1
|
|
144
|
+
}
|
|
145
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
@scope (list-ui) {
|
|
2
|
+
:where(:scope) {
|
|
3
|
+
/* ── Colors ── */
|
|
4
|
+
--list-divider-color: var(--a-border-subtle);
|
|
5
|
+
--list-selected-bg: var(--a-accent-muted);
|
|
6
|
+
--list-selected-fg: var(--a-accent-strong);
|
|
7
|
+
--list-selected-border: var(--a-accent-strong);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
:scope {
|
|
11
|
+
box-sizing: border-box;
|
|
12
|
+
display: block;
|
|
13
|
+
margin: 0;
|
|
14
|
+
padding: 0;
|
|
15
|
+
list-style: none;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/* ── Divider ── */
|
|
19
|
+
:scope[divider] list-item-ui + list-item-ui {
|
|
20
|
+
border-top: 1px solid var(--list-divider-color);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/* ── Item padding / margin (controlled by list-ui attributes) ──
|
|
24
|
+
[divider] — items get block padding only (dividers span full width)
|
|
25
|
+
[divider][contained] — items get block + inline padding (content inset on all sides)
|
|
26
|
+
[contained] (no divider) — items use margin instead of padding
|
|
27
|
+
(neither) — items are neutral, no wrapper spacing */
|
|
28
|
+
:scope[divider] > list-item-ui {
|
|
29
|
+
padding-block: var(--list-item-inset);
|
|
30
|
+
padding-inline: 0;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
:scope[divider][contained] > list-item-ui {
|
|
34
|
+
padding: var(--list-item-inset);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
:scope[contained]:not([divider]) > list-item-ui {
|
|
38
|
+
margin: var(--list-item-inset);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/* Flush the first/last items to the list edges when the list is not
|
|
42
|
+
contained — avoids extra vertical gap at the top/bottom of a list
|
|
43
|
+
that sits inside a card or bordered surface. */
|
|
44
|
+
:scope:not([contained]) > list-item-ui:first-child {
|
|
45
|
+
padding-block-start: 0;
|
|
46
|
+
margin-block-start: 0;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
:scope:not([contained]) > list-item-ui:last-child {
|
|
50
|
+
padding-block-end: 0;
|
|
51
|
+
margin-block-end: 0;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/* ── Selectable ── */
|
|
55
|
+
:scope[selectable] > [role="listitem"] {
|
|
56
|
+
cursor: pointer;
|
|
57
|
+
border-inline-start: 2px solid transparent;
|
|
58
|
+
padding-inline-start: var(--a-space-2);
|
|
59
|
+
outline: none;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
:scope[selectable] > [role="listitem"][aria-selected="true"] {
|
|
63
|
+
background: var(--list-selected-bg);
|
|
64
|
+
color: var(--list-selected-fg);
|
|
65
|
+
border-inline-start-color: var(--list-selected-border);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
:scope[selectable] > [role="listitem"]:focus-visible {
|
|
69
|
+
outline: 2px solid var(--a-accent-strong);
|
|
70
|
+
outline-offset: -2px;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/* ── Spacing variants ──
|
|
74
|
+
Modulate the item inset used by [divider] / [contained] rules. */
|
|
75
|
+
:scope[spacing="sm"] > list-item-ui {
|
|
76
|
+
--list-item-inset: var(--a-space-2);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
:scope[spacing="lg"] > list-item-ui {
|
|
80
|
+
--list-item-inset: var(--a-space-5);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
@scope (list-item-ui) {
|
|
85
|
+
:where(:scope) {
|
|
86
|
+
/* ── Layout ── */
|
|
87
|
+
--list-item-inset: var(--a-inset);
|
|
88
|
+
|
|
89
|
+
/* ── Colors ── */
|
|
90
|
+
--list-item-text-color: var(--a-fg);
|
|
91
|
+
|
|
92
|
+
/* ── Typography ── */
|
|
93
|
+
--list-item-font-size: var(--a-ui-size);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
:scope {
|
|
97
|
+
box-sizing: border-box;
|
|
98
|
+
display: block;
|
|
99
|
+
font-size: var(--list-item-font-size);
|
|
100
|
+
color: var(--list-item-text-color);
|
|
101
|
+
line-height: 1.4;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* <list-ui divider>
|
|
3
|
+
* <list-item-ui icon="check" text="Item one"></list-item-ui>
|
|
4
|
+
* <list-item-ui icon="check" text="Item two"></list-item-ui>
|
|
5
|
+
* </list-ui>
|
|
6
|
+
*
|
|
7
|
+
* Styled list with optional icons and dividers.
|
|
8
|
+
*
|
|
9
|
+
* Selection (mirrors table-ui):
|
|
10
|
+
* <list-ui selectable selected-key="row-2">
|
|
11
|
+
* <list-item-ui id="row-1" text="One"></list-item-ui>
|
|
12
|
+
* <list-item-ui id="row-2" text="Two"></list-item-ui>
|
|
13
|
+
* </list-ui>
|
|
14
|
+
*
|
|
15
|
+
* When `selectable`:
|
|
16
|
+
* - Children (role="listitem") become keyboard-focusable via roving tabindex.
|
|
17
|
+
* - Click selects the child; key is its id or data-key.
|
|
18
|
+
* - aria-selected is set on all children.
|
|
19
|
+
* - Fires `selection-change` with { key, previousKey }.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
import { AdiaElement } from '@core/element.js';
|
|
23
|
+
|
|
24
|
+
class AdiaList extends AdiaElement {
|
|
25
|
+
static properties = {
|
|
26
|
+
divider: { type: Boolean, default: false, reflect: true },
|
|
27
|
+
spacing: { type: String, default: 'md', reflect: true },
|
|
28
|
+
selectable: { type: Boolean, default: false, reflect: true },
|
|
29
|
+
selectedKey: { type: String, default: '', reflect: true, attribute: 'selected-key' },
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
static template = () => null;
|
|
33
|
+
|
|
34
|
+
#bound = false;
|
|
35
|
+
|
|
36
|
+
connected() {
|
|
37
|
+
this.setAttribute('role', 'list');
|
|
38
|
+
if (!this.#bound) {
|
|
39
|
+
this.#bound = true;
|
|
40
|
+
this.addEventListener('click', this.#onClick);
|
|
41
|
+
this.addEventListener('keydown', this.#onKeydown);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
disconnected() {
|
|
46
|
+
this.removeEventListener('click', this.#onClick);
|
|
47
|
+
this.removeEventListener('keydown', this.#onKeydown);
|
|
48
|
+
this.#bound = false;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
render() {
|
|
52
|
+
if (!this.selectable) {
|
|
53
|
+
// Clear selection chrome from children
|
|
54
|
+
for (const ch of this.#items()) {
|
|
55
|
+
ch.removeAttribute('aria-selected');
|
|
56
|
+
ch.removeAttribute('tabindex');
|
|
57
|
+
}
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
const key = this.selectedKey || '';
|
|
61
|
+
const items = this.#items();
|
|
62
|
+
let focusTarget = null;
|
|
63
|
+
for (const ch of items) {
|
|
64
|
+
const k = this.#keyOf(ch);
|
|
65
|
+
const selected = k && k === key;
|
|
66
|
+
ch.setAttribute('aria-selected', selected ? 'true' : 'false');
|
|
67
|
+
ch.setAttribute('tabindex', selected ? '0' : '-1');
|
|
68
|
+
if (selected) focusTarget = ch;
|
|
69
|
+
}
|
|
70
|
+
// Ensure at least one item is focusable (first) when nothing selected.
|
|
71
|
+
if (!focusTarget && items.length) {
|
|
72
|
+
items[0].setAttribute('tabindex', '0');
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
#items() {
|
|
77
|
+
return [...this.children].filter(
|
|
78
|
+
(el) => el.getAttribute && el.getAttribute('role') === 'listitem',
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
#keyOf(el) {
|
|
83
|
+
return el.id || el.getAttribute('data-key') || '';
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
#selectKey(newKey, { focus = false } = {}) {
|
|
87
|
+
if (!this.selectable) return;
|
|
88
|
+
if (!newKey) return;
|
|
89
|
+
const previousKey = this.selectedKey || '';
|
|
90
|
+
if (newKey === previousKey) return;
|
|
91
|
+
this.selectedKey = newKey;
|
|
92
|
+
this.dispatchEvent(new CustomEvent('selection-change', {
|
|
93
|
+
detail: { key: newKey, previousKey },
|
|
94
|
+
bubbles: true,
|
|
95
|
+
}));
|
|
96
|
+
if (focus) {
|
|
97
|
+
const el = [...this.#items()].find((i) => this.#keyOf(i) === newKey);
|
|
98
|
+
el?.focus?.();
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
#onClick = (e) => {
|
|
103
|
+
if (!this.selectable) return;
|
|
104
|
+
const item = e.target.closest?.('[role="listitem"]');
|
|
105
|
+
if (!item || item.parentElement !== this) return;
|
|
106
|
+
const key = this.#keyOf(item);
|
|
107
|
+
if (key) this.#selectKey(key);
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
#onKeydown = (e) => {
|
|
111
|
+
if (!this.selectable) return;
|
|
112
|
+
const items = this.#items();
|
|
113
|
+
if (!items.length) return;
|
|
114
|
+
const current = document.activeElement;
|
|
115
|
+
const idx = items.indexOf(current);
|
|
116
|
+
if (idx < 0) return;
|
|
117
|
+
let next = idx;
|
|
118
|
+
switch (e.key) {
|
|
119
|
+
case 'ArrowDown': next = Math.min(items.length - 1, idx + 1); break;
|
|
120
|
+
case 'ArrowUp': next = Math.max(0, idx - 1); break;
|
|
121
|
+
case 'Home': next = 0; break;
|
|
122
|
+
case 'End': next = items.length - 1; break;
|
|
123
|
+
case 'Enter':
|
|
124
|
+
case ' ': {
|
|
125
|
+
e.preventDefault();
|
|
126
|
+
const key = this.#keyOf(items[idx]);
|
|
127
|
+
if (key) this.#selectKey(key);
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
default: return;
|
|
131
|
+
}
|
|
132
|
+
if (next !== idx) {
|
|
133
|
+
e.preventDefault();
|
|
134
|
+
items[next]?.focus?.();
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
customElements.define('list-ui', AdiaList);
|
|
139
|
+
|
|
140
|
+
class AdiaListItem extends AdiaElement {
|
|
141
|
+
static properties = {
|
|
142
|
+
icon: { type: String, default: '', reflect: true },
|
|
143
|
+
text: { type: String, default: '', reflect: true },
|
|
144
|
+
description: { type: String, default: '', reflect: true },
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
static template = () => null;
|
|
148
|
+
|
|
149
|
+
connected() {
|
|
150
|
+
this.setAttribute('role', 'listitem');
|
|
151
|
+
this.#stamp();
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
// Scoped to direct children — never reach into nested custom elements,
|
|
155
|
+
// otherwise we'd accidentally remove e.g. a <span slot="icon"> inside a
|
|
156
|
+
// child <card-ui> when list-item-ui has no `icon` prop.
|
|
157
|
+
#ownChild(selector) {
|
|
158
|
+
for (const ch of this.children) {
|
|
159
|
+
if (ch.matches(selector)) return ch;
|
|
160
|
+
}
|
|
161
|
+
return null;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
#stamp() {
|
|
165
|
+
if (this.#ownChild('[slot="content"]')) return;
|
|
166
|
+
|
|
167
|
+
if (this.icon) {
|
|
168
|
+
let iconEl = this.#ownChild('[slot="icon"]') || this.#ownChild('icon-ui');
|
|
169
|
+
if (!iconEl) {
|
|
170
|
+
iconEl = document.createElement('icon-ui');
|
|
171
|
+
iconEl.setAttribute('slot', 'icon');
|
|
172
|
+
this.appendChild(iconEl);
|
|
173
|
+
}
|
|
174
|
+
iconEl.setAttribute('name', this.icon);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
if (this.text) {
|
|
178
|
+
let span = this.#ownChild('[slot="text"]');
|
|
179
|
+
if (!span) {
|
|
180
|
+
span = document.createElement('span');
|
|
181
|
+
span.setAttribute('slot', 'text');
|
|
182
|
+
this.appendChild(span);
|
|
183
|
+
}
|
|
184
|
+
span.textContent = this.text;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
if (this.description) {
|
|
188
|
+
let desc = this.#ownChild('[slot="description"]');
|
|
189
|
+
if (!desc) {
|
|
190
|
+
desc = document.createElement('span');
|
|
191
|
+
desc.setAttribute('slot', 'description');
|
|
192
|
+
this.appendChild(desc);
|
|
193
|
+
}
|
|
194
|
+
desc.textContent = this.description;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
render() {
|
|
199
|
+
// Sync icon
|
|
200
|
+
const iconEl = this.#ownChild('[slot="icon"]');
|
|
201
|
+
if (this.icon) {
|
|
202
|
+
if (iconEl) {
|
|
203
|
+
iconEl.setAttribute('name', this.icon);
|
|
204
|
+
} else {
|
|
205
|
+
const el = document.createElement('icon-ui');
|
|
206
|
+
el.setAttribute('slot', 'icon');
|
|
207
|
+
el.setAttribute('name', this.icon);
|
|
208
|
+
this.prepend(el);
|
|
209
|
+
}
|
|
210
|
+
} else if (iconEl) {
|
|
211
|
+
iconEl.remove();
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
// Sync text
|
|
215
|
+
const textEl = this.#ownChild('[slot="text"]');
|
|
216
|
+
if (textEl) textEl.textContent = this.text;
|
|
217
|
+
|
|
218
|
+
// Sync description
|
|
219
|
+
const descEl = this.#ownChild('[slot="description"]');
|
|
220
|
+
if (this.description) {
|
|
221
|
+
if (descEl) {
|
|
222
|
+
descEl.textContent = this.description;
|
|
223
|
+
} else {
|
|
224
|
+
const el = document.createElement('span');
|
|
225
|
+
el.setAttribute('slot', 'description');
|
|
226
|
+
el.textContent = this.description;
|
|
227
|
+
this.appendChild(el);
|
|
228
|
+
}
|
|
229
|
+
} else if (descEl) {
|
|
230
|
+
descEl.remove();
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
customElements.define('list-item-ui', AdiaListItem);
|
|
235
|
+
|
|
236
|
+
export { AdiaList, AdiaListItem };
|
|
@@ -0,0 +1,122 @@
|
|
|
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: AdiaList
|
|
5
|
+
tag: list-ui
|
|
6
|
+
component: List
|
|
7
|
+
category: layout
|
|
8
|
+
version: 1
|
|
9
|
+
description: Styled list with optional icons and dividers.
|
|
10
|
+
props:
|
|
11
|
+
align:
|
|
12
|
+
description: "Alignment — values depend on container semantics."
|
|
13
|
+
type: string
|
|
14
|
+
default: stretch
|
|
15
|
+
enum:
|
|
16
|
+
- start
|
|
17
|
+
- center
|
|
18
|
+
- end
|
|
19
|
+
- stretch
|
|
20
|
+
direction:
|
|
21
|
+
description: "Component property: direction."
|
|
22
|
+
type: string
|
|
23
|
+
default: vertical
|
|
24
|
+
enum:
|
|
25
|
+
- vertical
|
|
26
|
+
- horizontal
|
|
27
|
+
divider:
|
|
28
|
+
description: Show dividers between items
|
|
29
|
+
type: boolean
|
|
30
|
+
default: false
|
|
31
|
+
gap:
|
|
32
|
+
description: "Gap between children."
|
|
33
|
+
type: string
|
|
34
|
+
default: sm
|
|
35
|
+
enum:
|
|
36
|
+
- none
|
|
37
|
+
- xs
|
|
38
|
+
- sm
|
|
39
|
+
- md
|
|
40
|
+
- lg
|
|
41
|
+
- xl
|
|
42
|
+
selectable:
|
|
43
|
+
description: Enable selection on child listitems (roving tabindex + aria-selected).
|
|
44
|
+
type: boolean
|
|
45
|
+
default: false
|
|
46
|
+
selectedKey:
|
|
47
|
+
description: ID (or data-key) of the currently-selected child listitem.
|
|
48
|
+
type: string
|
|
49
|
+
default: ""
|
|
50
|
+
attribute: selected-key
|
|
51
|
+
spacing:
|
|
52
|
+
description: Item spacing
|
|
53
|
+
type: string
|
|
54
|
+
default: md
|
|
55
|
+
events:
|
|
56
|
+
selection-change:
|
|
57
|
+
description: "Fired on selection-change."
|
|
58
|
+
slots: {}
|
|
59
|
+
states:
|
|
60
|
+
- name: idle
|
|
61
|
+
description: Default, ready for interaction.
|
|
62
|
+
traits: []
|
|
63
|
+
tokens: {}
|
|
64
|
+
a2ui:
|
|
65
|
+
rules: []
|
|
66
|
+
anti_patterns: []
|
|
67
|
+
examples:
|
|
68
|
+
- name: basic-list
|
|
69
|
+
description: Basic List usage
|
|
70
|
+
a2ui: >-
|
|
71
|
+
[
|
|
72
|
+
{
|
|
73
|
+
"id": "root",
|
|
74
|
+
"component": "Card",
|
|
75
|
+
"children": [
|
|
76
|
+
"sec"
|
|
77
|
+
]
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"id": "sec",
|
|
81
|
+
"component": "Section",
|
|
82
|
+
"children": [
|
|
83
|
+
"comp"
|
|
84
|
+
]
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"id": "comp",
|
|
88
|
+
"component": "List"
|
|
89
|
+
}
|
|
90
|
+
]
|
|
91
|
+
keywords:
|
|
92
|
+
- list
|
|
93
|
+
- listing
|
|
94
|
+
- bookmark
|
|
95
|
+
- favorite
|
|
96
|
+
- save
|
|
97
|
+
- pin
|
|
98
|
+
- star
|
|
99
|
+
synonyms:
|
|
100
|
+
bookmark:
|
|
101
|
+
- bookmark
|
|
102
|
+
- list
|
|
103
|
+
- favorite
|
|
104
|
+
favorite:
|
|
105
|
+
- bookmark
|
|
106
|
+
- list
|
|
107
|
+
listing:
|
|
108
|
+
- table
|
|
109
|
+
- data
|
|
110
|
+
- list
|
|
111
|
+
pin:
|
|
112
|
+
- bookmark
|
|
113
|
+
- list
|
|
114
|
+
save:
|
|
115
|
+
- bookmark
|
|
116
|
+
- list
|
|
117
|
+
- favorite
|
|
118
|
+
star:
|
|
119
|
+
- bookmark
|
|
120
|
+
- list
|
|
121
|
+
- leaderboard
|
|
122
|
+
related: []
|