@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,375 @@
|
|
|
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: AdiaSelect
|
|
5
|
+
tag: select-ui
|
|
6
|
+
component: Select
|
|
7
|
+
category: input
|
|
8
|
+
version: 1
|
|
9
|
+
description: Alias for ChoicePicker. Dropdown select with options.
|
|
10
|
+
props:
|
|
11
|
+
name:
|
|
12
|
+
description: Form control name for form data submission
|
|
13
|
+
type: string
|
|
14
|
+
default: ""
|
|
15
|
+
variant:
|
|
16
|
+
description: Visual variant — default chrome, `outline` for bordered, `ghost` for inline.
|
|
17
|
+
type: string
|
|
18
|
+
default: default
|
|
19
|
+
enum: [default, outline, ghost, soft]
|
|
20
|
+
required:
|
|
21
|
+
description: Marks the field as required for form validation
|
|
22
|
+
type: boolean
|
|
23
|
+
default: false
|
|
24
|
+
reflect: true
|
|
25
|
+
avatar:
|
|
26
|
+
description: URL for leading avatar image (takes precedence over icon)
|
|
27
|
+
type: string
|
|
28
|
+
default: ""
|
|
29
|
+
disabled:
|
|
30
|
+
description: Disables interaction and dims the control
|
|
31
|
+
type: boolean
|
|
32
|
+
default: false
|
|
33
|
+
reflect: true
|
|
34
|
+
error:
|
|
35
|
+
description: Validation error message
|
|
36
|
+
type: string
|
|
37
|
+
default: ""
|
|
38
|
+
free-text:
|
|
39
|
+
description: "With searchable: commit the typed query on Enter when no option matches (unconstrained
|
|
40
|
+
autocomplete)"
|
|
41
|
+
type: boolean
|
|
42
|
+
default: false
|
|
43
|
+
icon:
|
|
44
|
+
description: Leading icon name rendered inside the trigger
|
|
45
|
+
type: string
|
|
46
|
+
default: ""
|
|
47
|
+
label:
|
|
48
|
+
description: Label text above the trigger
|
|
49
|
+
type: string
|
|
50
|
+
default: ""
|
|
51
|
+
maxlength:
|
|
52
|
+
description: Maximum character length for validation
|
|
53
|
+
type: number
|
|
54
|
+
default: null
|
|
55
|
+
minlength:
|
|
56
|
+
description: Minimum character length for validation
|
|
57
|
+
type: number
|
|
58
|
+
default: null
|
|
59
|
+
multiple:
|
|
60
|
+
description: Enables multi-select (comma-separated values)
|
|
61
|
+
type: boolean
|
|
62
|
+
default: false
|
|
63
|
+
open:
|
|
64
|
+
description: Whether the listbox is open
|
|
65
|
+
type: boolean
|
|
66
|
+
default: false
|
|
67
|
+
reflect: true
|
|
68
|
+
pattern:
|
|
69
|
+
description: Regex pattern for validation
|
|
70
|
+
type: string
|
|
71
|
+
default: ""
|
|
72
|
+
placeholder:
|
|
73
|
+
description: Placeholder when no option is selected
|
|
74
|
+
type: string
|
|
75
|
+
default: Select...
|
|
76
|
+
readonly:
|
|
77
|
+
description: Prevents selection changes while keeping the field focusable
|
|
78
|
+
type: boolean
|
|
79
|
+
default: false
|
|
80
|
+
reflect: true
|
|
81
|
+
searchable:
|
|
82
|
+
description: Enables a search/filter input inside the listbox
|
|
83
|
+
type: boolean
|
|
84
|
+
default: false
|
|
85
|
+
value:
|
|
86
|
+
description: Currently selected option value
|
|
87
|
+
type: string
|
|
88
|
+
default: ""
|
|
89
|
+
events:
|
|
90
|
+
change:
|
|
91
|
+
description: Fired when selected value changes
|
|
92
|
+
slots:
|
|
93
|
+
label:
|
|
94
|
+
description: Label element above the trigger
|
|
95
|
+
listbox:
|
|
96
|
+
description: Popover container for options (role=listbox)
|
|
97
|
+
trigger:
|
|
98
|
+
description: Button that opens the listbox
|
|
99
|
+
states:
|
|
100
|
+
- name: idle
|
|
101
|
+
description: Default, ready for interaction.
|
|
102
|
+
- name: disabled
|
|
103
|
+
description: Non-interactive; dimmed.
|
|
104
|
+
attribute: disabled
|
|
105
|
+
traits: []
|
|
106
|
+
tokens: {}
|
|
107
|
+
a2ui:
|
|
108
|
+
rules: []
|
|
109
|
+
anti_patterns: []
|
|
110
|
+
examples:
|
|
111
|
+
- name: bleed-design-settings
|
|
112
|
+
description: Design system settings page with brand header, photo upload section, bleed/margin
|
|
113
|
+
controls, and approval workflow.
|
|
114
|
+
a2ui: >-
|
|
115
|
+
[
|
|
116
|
+
{
|
|
117
|
+
"id": "root",
|
|
118
|
+
"component": "Card",
|
|
119
|
+
"children": [
|
|
120
|
+
"hdr",
|
|
121
|
+
"photo-sec",
|
|
122
|
+
"settings-sec",
|
|
123
|
+
"ftr"
|
|
124
|
+
]
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"id": "hdr",
|
|
128
|
+
"component": "Header",
|
|
129
|
+
"children": [
|
|
130
|
+
"hdr-title",
|
|
131
|
+
"hdr-desc"
|
|
132
|
+
]
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"id": "hdr-title",
|
|
136
|
+
"component": "Text",
|
|
137
|
+
"slot": "heading",
|
|
138
|
+
"textContent": "Bleed Design Settings",
|
|
139
|
+
"variant": "section"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"id": "hdr-desc",
|
|
143
|
+
"component": "Text",
|
|
144
|
+
"slot": "description",
|
|
145
|
+
"textContent": "Configure bleed margins, upload artwork, and preview before approval.",
|
|
146
|
+
"variant": "body"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"id": "photo-sec",
|
|
150
|
+
"component": "Section",
|
|
151
|
+
"children": [
|
|
152
|
+
"photo-col"
|
|
153
|
+
]
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"id": "photo-col",
|
|
157
|
+
"component": "Column",
|
|
158
|
+
"children": [
|
|
159
|
+
"photo-label",
|
|
160
|
+
"photo-img",
|
|
161
|
+
"photo-btn"
|
|
162
|
+
],
|
|
163
|
+
"gap": "3"
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"id": "photo-label",
|
|
167
|
+
"component": "Text",
|
|
168
|
+
"textContent": "Artwork Upload",
|
|
169
|
+
"variant": "label"
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"id": "photo-img",
|
|
173
|
+
"component": "Image",
|
|
174
|
+
"src": "https://picsum.photos/400/200",
|
|
175
|
+
"aspect": "2/1"
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"id": "photo-btn",
|
|
179
|
+
"component": "Button",
|
|
180
|
+
"text": "Upload Photo",
|
|
181
|
+
"variant": "secondary"
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"id": "settings-sec",
|
|
185
|
+
"component": "Section",
|
|
186
|
+
"children": [
|
|
187
|
+
"settings-col"
|
|
188
|
+
]
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"id": "settings-col",
|
|
192
|
+
"component": "Column",
|
|
193
|
+
"children": [
|
|
194
|
+
"bleed-mode",
|
|
195
|
+
"bleed-margin",
|
|
196
|
+
"bleed-unit",
|
|
197
|
+
"approved"
|
|
198
|
+
],
|
|
199
|
+
"gap": "4"
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"id": "bleed-mode",
|
|
203
|
+
"component": "Select",
|
|
204
|
+
"label": "Bleed Mode",
|
|
205
|
+
"name": "bleed-mode",
|
|
206
|
+
"placeholder": "Select mode..."
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
"id": "bleed-margin",
|
|
210
|
+
"component": "Input",
|
|
211
|
+
"label": "Bleed Margin",
|
|
212
|
+
"name": "bleed-margin",
|
|
213
|
+
"type": "number",
|
|
214
|
+
"placeholder": "e.g. 3"
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
"id": "bleed-unit",
|
|
218
|
+
"component": "Select",
|
|
219
|
+
"label": "Unit",
|
|
220
|
+
"name": "bleed-unit",
|
|
221
|
+
"placeholder": "mm"
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
"id": "approved",
|
|
225
|
+
"component": "CheckBox",
|
|
226
|
+
"label": "Approved for production",
|
|
227
|
+
"name": "approved"
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
"id": "ftr",
|
|
231
|
+
"component": "Footer",
|
|
232
|
+
"children": [
|
|
233
|
+
"preview-btn",
|
|
234
|
+
"apply-btn"
|
|
235
|
+
]
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
"id": "preview-btn",
|
|
239
|
+
"component": "Button",
|
|
240
|
+
"text": "Preview",
|
|
241
|
+
"variant": "secondary"
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
"id": "apply-btn",
|
|
245
|
+
"component": "Button",
|
|
246
|
+
"text": "Apply",
|
|
247
|
+
"variant": "primary"
|
|
248
|
+
}
|
|
249
|
+
]
|
|
250
|
+
- name: create-form
|
|
251
|
+
description: Simple account creation form with text fields, select, and action buttons.
|
|
252
|
+
a2ui: >-
|
|
253
|
+
[
|
|
254
|
+
{
|
|
255
|
+
"id": "root",
|
|
256
|
+
"component": "Card",
|
|
257
|
+
"children": [
|
|
258
|
+
"hdr",
|
|
259
|
+
"sec",
|
|
260
|
+
"ftr"
|
|
261
|
+
]
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
"id": "hdr",
|
|
265
|
+
"component": "Header",
|
|
266
|
+
"children": [
|
|
267
|
+
"title",
|
|
268
|
+
"desc"
|
|
269
|
+
]
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
"id": "title",
|
|
273
|
+
"component": "Text",
|
|
274
|
+
"slot": "heading",
|
|
275
|
+
"textContent": "Create Account",
|
|
276
|
+
"variant": "section"
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
"id": "desc",
|
|
280
|
+
"component": "Text",
|
|
281
|
+
"slot": "description",
|
|
282
|
+
"variant": "caption",
|
|
283
|
+
"textContent": "Fill in your details"
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
"id": "sec",
|
|
287
|
+
"component": "Section",
|
|
288
|
+
"children": [
|
|
289
|
+
"form"
|
|
290
|
+
]
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
"id": "form",
|
|
294
|
+
"component": "Column",
|
|
295
|
+
"children": [
|
|
296
|
+
"name",
|
|
297
|
+
"email",
|
|
298
|
+
"role"
|
|
299
|
+
],
|
|
300
|
+
"gap": "4"
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
"id": "name",
|
|
304
|
+
"component": "Input",
|
|
305
|
+
"label": "Full Name",
|
|
306
|
+
"placeholder": "Kim Granlund",
|
|
307
|
+
"name": "name",
|
|
308
|
+
"required": true
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
"id": "email",
|
|
312
|
+
"component": "Input",
|
|
313
|
+
"label": "Email",
|
|
314
|
+
"type": "email",
|
|
315
|
+
"placeholder": "kim@adia.health",
|
|
316
|
+
"name": "email",
|
|
317
|
+
"required": true
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
"id": "role",
|
|
321
|
+
"component": "Select",
|
|
322
|
+
"label": "Role",
|
|
323
|
+
"placeholder": "Choose role...",
|
|
324
|
+
"name": "role"
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
"id": "ftr",
|
|
328
|
+
"component": "Footer",
|
|
329
|
+
"children": [
|
|
330
|
+
"cancel",
|
|
331
|
+
"submit"
|
|
332
|
+
]
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
"id": "cancel",
|
|
336
|
+
"component": "Button",
|
|
337
|
+
"text": "Cancel",
|
|
338
|
+
"variant": "ghost"
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
"id": "submit",
|
|
342
|
+
"component": "Button",
|
|
343
|
+
"text": "Create",
|
|
344
|
+
"variant": "primary"
|
|
345
|
+
}
|
|
346
|
+
]
|
|
347
|
+
keywords:
|
|
348
|
+
- select
|
|
349
|
+
- dropdown
|
|
350
|
+
- combobox
|
|
351
|
+
- autocomplete
|
|
352
|
+
synonyms:
|
|
353
|
+
autocomplete:
|
|
354
|
+
- combobox
|
|
355
|
+
- typeahead
|
|
356
|
+
- suggest
|
|
357
|
+
- free-text
|
|
358
|
+
combobox:
|
|
359
|
+
- search
|
|
360
|
+
- command
|
|
361
|
+
- select
|
|
362
|
+
- autocomplete
|
|
363
|
+
- typeahead
|
|
364
|
+
- filter
|
|
365
|
+
dropdown:
|
|
366
|
+
- popover
|
|
367
|
+
- menu
|
|
368
|
+
- select
|
|
369
|
+
- form
|
|
370
|
+
related:
|
|
371
|
+
- image
|
|
372
|
+
- button
|
|
373
|
+
- input
|
|
374
|
+
- check-box
|
|
375
|
+
- upload
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://adiaui.dev/a2ui/v0_9/components/Skeleton.json",
|
|
4
|
+
"title": "Skeleton",
|
|
5
|
+
"description": "Placeholder shimmer for loading states. Purely presentational.",
|
|
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": "Skeleton"
|
|
18
|
+
},
|
|
19
|
+
"height": {
|
|
20
|
+
"description": "Height of the placeholder.",
|
|
21
|
+
"type": "string",
|
|
22
|
+
"default": "1.2em"
|
|
23
|
+
},
|
|
24
|
+
"radius": {
|
|
25
|
+
"description": "Border radius",
|
|
26
|
+
"type": "string",
|
|
27
|
+
"enum": [
|
|
28
|
+
"none",
|
|
29
|
+
"sm",
|
|
30
|
+
"md",
|
|
31
|
+
"lg",
|
|
32
|
+
"full"
|
|
33
|
+
],
|
|
34
|
+
"default": "sm"
|
|
35
|
+
},
|
|
36
|
+
"static": {
|
|
37
|
+
"description": "When true, suppress the shimmer animation.",
|
|
38
|
+
"type": "boolean",
|
|
39
|
+
"default": false
|
|
40
|
+
},
|
|
41
|
+
"variant": {
|
|
42
|
+
"description": "Visual preset — text-line, circle (avatar), rect (card), image (aspect box).",
|
|
43
|
+
"type": "string",
|
|
44
|
+
"enum": [
|
|
45
|
+
"text",
|
|
46
|
+
"circle",
|
|
47
|
+
"rect",
|
|
48
|
+
"image"
|
|
49
|
+
],
|
|
50
|
+
"default": "rect"
|
|
51
|
+
},
|
|
52
|
+
"width": {
|
|
53
|
+
"description": "Width of the placeholder.",
|
|
54
|
+
"type": "string",
|
|
55
|
+
"default": "100%"
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"required": [
|
|
59
|
+
"component"
|
|
60
|
+
],
|
|
61
|
+
"unevaluatedProperties": false,
|
|
62
|
+
"x-adiaui": {
|
|
63
|
+
"anti_patterns": [],
|
|
64
|
+
"category": "display",
|
|
65
|
+
"events": {},
|
|
66
|
+
"examples": [
|
|
67
|
+
{
|
|
68
|
+
"description": "Column of skeleton components mimicking a card layout for loading states.",
|
|
69
|
+
"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 \"sk-avatar\",\n \"sk-title\"\n ]\n },\n {\n \"id\": \"sk-avatar\",\n \"component\": \"Skeleton\",\n \"slot\": \"icon\",\n \"variant\": \"circle\",\n \"width\": \"40px\",\n \"height\": \"40px\"\n },\n {\n \"id\": \"sk-title\",\n \"component\": \"Skeleton\",\n \"slot\": \"heading\",\n \"variant\": \"text\",\n \"width\": \"60%\"\n },\n {\n \"id\": \"sec\",\n \"component\": \"Section\",\n \"children\": [\n \"body\"\n ]\n },\n {\n \"id\": \"body\",\n \"component\": \"Column\",\n \"gap\": \"2\",\n \"children\": [\n \"sk1\",\n \"sk2\",\n \"sk3\",\n \"sk4\"\n ]\n },\n {\n \"id\": \"sk1\",\n \"component\": \"Skeleton\",\n \"variant\": \"text\",\n \"width\": \"100%\"\n },\n {\n \"id\": \"sk2\",\n \"component\": \"Skeleton\",\n \"variant\": \"text\",\n \"width\": \"90%\"\n },\n {\n \"id\": \"sk3\",\n \"component\": \"Skeleton\",\n \"variant\": \"text\",\n \"width\": \"95%\"\n },\n {\n \"id\": \"sk4\",\n \"component\": \"Skeleton\",\n \"variant\": \"text\",\n \"width\": \"70%\"\n }\n]",
|
|
70
|
+
"name": "loading-skeleton"
|
|
71
|
+
}
|
|
72
|
+
],
|
|
73
|
+
"keywords": [
|
|
74
|
+
"skeleton",
|
|
75
|
+
"loading",
|
|
76
|
+
"spinner",
|
|
77
|
+
"placeholder",
|
|
78
|
+
"shimmer"
|
|
79
|
+
],
|
|
80
|
+
"name": "AdiaSkeleton",
|
|
81
|
+
"related": [],
|
|
82
|
+
"slots": {},
|
|
83
|
+
"states": [
|
|
84
|
+
{
|
|
85
|
+
"description": "Default, ready for interaction.",
|
|
86
|
+
"name": "idle"
|
|
87
|
+
}
|
|
88
|
+
],
|
|
89
|
+
"synonyms": {
|
|
90
|
+
"loading": [
|
|
91
|
+
"loading",
|
|
92
|
+
"skeleton",
|
|
93
|
+
"progress",
|
|
94
|
+
"bar"
|
|
95
|
+
],
|
|
96
|
+
"placeholder": [
|
|
97
|
+
"loading",
|
|
98
|
+
"skeleton",
|
|
99
|
+
"empty"
|
|
100
|
+
],
|
|
101
|
+
"shimmer": [
|
|
102
|
+
"loading",
|
|
103
|
+
"skeleton"
|
|
104
|
+
],
|
|
105
|
+
"skeleton": [
|
|
106
|
+
"loading",
|
|
107
|
+
"skeleton"
|
|
108
|
+
],
|
|
109
|
+
"spinner": [
|
|
110
|
+
"loading",
|
|
111
|
+
"skeleton",
|
|
112
|
+
"progress"
|
|
113
|
+
]
|
|
114
|
+
},
|
|
115
|
+
"tag": "skeleton-ui",
|
|
116
|
+
"tokens": {},
|
|
117
|
+
"traits": [],
|
|
118
|
+
"version": 1
|
|
119
|
+
}
|
|
120
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
@scope (skeleton-ui) {
|
|
2
|
+
:where(:scope) {
|
|
3
|
+
/* ── Tokens ── */
|
|
4
|
+
--skeleton-bg: var(--a-bg-muted);
|
|
5
|
+
--skeleton-highlight: var(--a-bg-subtle);
|
|
6
|
+
--skeleton-radius: var(--a-radius-sm);
|
|
7
|
+
--skeleton-duration: 1.5s;
|
|
8
|
+
--skeleton-easing: var(--a-easing);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
:scope {
|
|
12
|
+
/* ── Base ── */
|
|
13
|
+
box-sizing: border-box;
|
|
14
|
+
display: block;
|
|
15
|
+
position: relative;
|
|
16
|
+
overflow: hidden;
|
|
17
|
+
background: var(--skeleton-bg);
|
|
18
|
+
border-radius: var(--skeleton-radius);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/* ── Radius variants ── */
|
|
22
|
+
:scope[radius="none"] { --skeleton-radius: 0; }
|
|
23
|
+
:scope[radius="sm"] { --skeleton-radius: var(--a-radius-sm); }
|
|
24
|
+
:scope[radius="md"] { --skeleton-radius: var(--a-radius-md); }
|
|
25
|
+
:scope[radius="lg"] { --skeleton-radius: var(--a-radius-lg); }
|
|
26
|
+
:scope[radius="full"] { --skeleton-radius: var(--a-radius-full); }
|
|
27
|
+
|
|
28
|
+
/* ── Shimmer animation (default; suppress with [static]) ── */
|
|
29
|
+
:scope:not([static])::after {
|
|
30
|
+
content: '';
|
|
31
|
+
position: absolute;
|
|
32
|
+
inset: 0;
|
|
33
|
+
background: linear-gradient(
|
|
34
|
+
90deg,
|
|
35
|
+
transparent 25%,
|
|
36
|
+
var(--skeleton-highlight) 50%,
|
|
37
|
+
transparent 75%
|
|
38
|
+
);
|
|
39
|
+
background-size: 200% 100%;
|
|
40
|
+
animation: skeleton-shimmer var(--skeleton-duration) var(--skeleton-easing) infinite;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
@keyframes skeleton-shimmer {
|
|
44
|
+
from { background-position: 200% 0; }
|
|
45
|
+
to { background-position: -200% 0; }
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* <skeleton-ui width="200px" height="1.2em" radius="sm"></skeleton-ui>
|
|
3
|
+
* <skeleton-ui width="100%" height="3rem" radius="md" static></skeleton-ui>
|
|
4
|
+
*
|
|
5
|
+
* Placeholder shimmer for loading states.
|
|
6
|
+
* Purely presentational — no DOM stamping needed.
|
|
7
|
+
*
|
|
8
|
+
* Props (attributes):
|
|
9
|
+
* static — suppress the shimmer animation (default: false — shimmer on)
|
|
10
|
+
*
|
|
11
|
+
* Radius: none, sm (default), md, lg, full
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import { AdiaElement } from '@core/element.js';
|
|
15
|
+
|
|
16
|
+
class AdiaSkeleton extends AdiaElement {
|
|
17
|
+
static properties = {
|
|
18
|
+
width: { type: String, default: '100%', reflect: true },
|
|
19
|
+
height: { type: String, default: '1.2em', reflect: true },
|
|
20
|
+
radius: { type: String, default: 'sm', reflect: true },
|
|
21
|
+
static: { type: Boolean, default: false, reflect: true },
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
static template = () => null;
|
|
25
|
+
|
|
26
|
+
connected() {
|
|
27
|
+
this.setAttribute('aria-hidden', 'true');
|
|
28
|
+
this.#applySize();
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
render() {
|
|
32
|
+
this.#applySize();
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
#applySize() {
|
|
36
|
+
this.style.width = this.width;
|
|
37
|
+
this.style.height = this.height;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
customElements.define('skeleton-ui', AdiaSkeleton);
|
|
42
|
+
|
|
43
|
+
export { AdiaSkeleton };
|