@adia-ai/web-components 0.8.39 → 0.8.41
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/CHANGELOG.md +59 -0
- package/MIGRATION.md +1269 -3
- package/README.md +25 -30
- package/USAGE.md +26 -0
- package/bin/audit-template-children.mjs +556 -0
- package/components/accordion/accordion-item.a2ui.json +4 -0
- package/components/accordion/accordion-item.yaml +2 -0
- package/components/accordion/accordion.a2ui.json +4 -0
- package/components/accordion/accordion.yaml +2 -0
- package/components/action-list/action-item.a2ui.json +24 -2
- package/components/action-list/action-item.yaml +28 -3
- package/components/action-list/action-list.a2ui.json +6 -1
- package/components/action-list/action-list.class.js +52 -11
- package/components/action-list/action-list.css +43 -3
- package/components/action-list/action-list.d.ts +4 -2
- package/components/action-list/action-list.yaml +5 -0
- package/components/adia-mark/adia-mark.a2ui.json +1 -0
- package/components/adia-wordmark/adia-wordmark.a2ui.json +1 -0
- package/components/agent-artifact/agent-artifact.a2ui.json +1 -0
- package/components/agent-artifact/agent-artifact.css +1 -1
- package/components/agent-feedback-bar/agent-feedback-bar.a2ui.json +6 -5
- package/components/agent-feedback-bar/agent-feedback-bar.yaml +6 -2
- package/components/agent-questions/agent-questions.a2ui.json +1 -0
- package/components/agent-reasoning/agent-reasoning.a2ui.json +6 -5
- package/components/agent-reasoning/agent-reasoning.css +2 -2
- package/components/agent-reasoning/agent-reasoning.yaml +6 -2
- package/components/agent-suggestions/agent-suggestions.a2ui.json +11 -2
- package/components/agent-suggestions/agent-suggestions.class.js +2 -1
- package/components/agent-suggestions/agent-suggestions.d.ts +4 -4
- package/components/agent-suggestions/agent-suggestions.yaml +4 -2
- package/components/agent-trace/agent-trace.a2ui.json +6 -5
- package/components/agent-trace/agent-trace.css +3 -3
- package/components/agent-trace/agent-trace.yaml +6 -2
- package/components/alert/alert.a2ui.json +1 -0
- package/components/alert/alert.css +2 -2
- package/components/anchor-bar/anchor-bar.a2ui.json +1 -0
- package/components/aside/aside.a2ui.json +1 -0
- package/components/avatar/avatar-group.a2ui.json +7 -1
- package/components/avatar/avatar-group.yaml +1 -0
- package/components/avatar/avatar.a2ui.json +12 -11
- package/components/avatar/avatar.css +1 -1
- package/components/avatar/avatar.d.ts +1 -1
- package/components/avatar/avatar.yaml +4 -4
- package/components/badge/badge.a2ui.json +1 -0
- package/components/badge/badge.css +1 -1
- package/components/block/block.a2ui.json +1 -0
- package/components/blockquote/blockquote.a2ui.json +1 -0
- package/components/breadcrumb/breadcrumb.a2ui.json +1 -0
- package/components/button/button.a2ui.json +1 -3
- package/components/button/button.css +6 -5
- package/components/button/button.yaml +1 -3
- package/components/calendar-grid/calendar-grid.a2ui.json +1 -0
- package/components/calendar-grid/calendar-grid.class.js +2 -1
- package/components/calendar-picker/calendar-picker.a2ui.json +143 -24
- package/components/calendar-picker/calendar-picker.class.js +490 -197
- package/components/calendar-picker/calendar-picker.css +121 -172
- package/components/calendar-picker/calendar-picker.yaml +225 -47
- package/components/canvas/canvas.a2ui.json +6 -5
- package/components/canvas/canvas.d.ts +37 -0
- package/components/canvas/canvas.js +72 -3
- package/components/canvas/canvas.yaml +6 -2
- package/components/card/card.a2ui.json +25 -2
- package/components/card/card.class.js +3 -0
- package/components/card/card.css +34 -4
- package/components/card/card.d.ts +2 -2
- package/components/card/card.examples.md +3 -3
- package/components/card/card.yaml +28 -4
- package/components/chart/chart.a2ui.json +13 -8
- package/components/chart/chart.class.js +10 -10
- package/components/chart/chart.css +12 -10
- package/components/chart/chart.d.ts +2 -2
- package/components/chart/chart.yaml +8 -5
- package/components/chart-legend/chart-legend.a2ui.json +1 -0
- package/components/chat-thread/chat-input.a2ui.json +1 -0
- package/components/chat-thread/chat-thread.a2ui.json +10 -9
- package/components/chat-thread/chat-thread.css +1 -1
- package/components/chat-thread/chat-thread.yaml +13 -20
- package/components/check/check.a2ui.json +10 -9
- package/components/check/check.yaml +4 -4
- package/components/code/code.a2ui.json +1 -0
- package/components/code/code.css +6 -6
- package/components/col/col.a2ui.json +1 -0
- package/components/color-input/color-input.a2ui.json +1 -0
- package/components/color-picker/color-picker.a2ui.json +1 -0
- package/components/combobox/combobox.a2ui.json +3 -2
- package/components/combobox/combobox.css +2 -2
- package/components/combobox/combobox.yaml +2 -2
- package/components/command/command.a2ui.json +12 -10
- package/components/command/command.class.js +3 -2
- package/components/command/command.css +3 -3
- package/components/command/command.yaml +17 -4
- package/components/context-menu/context-menu.a2ui.json +1 -0
- package/components/date-range-picker/date-range-picker.a2ui.json +2 -1
- package/components/date-range-picker/date-range-picker.css +1 -1
- package/components/date-range-picker/date-range-picker.yaml +1 -1
- package/components/datetime-picker/datetime-picker.a2ui.json +15 -108
- package/components/datetime-picker/datetime-picker.class.js +37 -690
- package/components/datetime-picker/datetime-picker.css +11 -183
- package/components/datetime-picker/datetime-picker.d.ts +4 -5
- package/components/datetime-picker/datetime-picker.yaml +44 -135
- package/components/demo-toggle/demo-toggle.a2ui.json +1 -0
- package/components/demo-toggle/demo-toggle.css +1 -1
- package/components/description-list/description-list.a2ui.json +1 -0
- package/components/description-list/description-list.css +2 -2
- package/components/display-field/display-field.a2ui.json +1 -0
- package/components/display-field/display-field.css +3 -3
- package/components/divider/divider.a2ui.json +1 -0
- package/components/divider/divider.css +1 -1
- package/components/drawer/drawer.a2ui.json +1 -3
- package/components/drawer/drawer.css +3 -3
- package/components/drawer/drawer.yaml +0 -2
- package/components/drilldown/drilldown.a2ui.json +22 -20
- package/components/drilldown/drilldown.class.js +4 -3
- package/components/drilldown/drilldown.css +8 -8
- package/components/drilldown/drilldown.yaml +40 -9
- package/components/embed/embed.a2ui.json +6 -5
- package/components/embed/embed.yaml +2 -2
- package/components/empty-state/empty-state.a2ui.json +1 -0
- package/components/empty-state/empty-state.css +2 -2
- package/components/feed/feed-item.a2ui.json +25 -5
- package/components/feed/feed-item.yaml +28 -7
- package/components/feed/feed.a2ui.json +9 -2
- package/components/feed/feed.class.js +19 -12
- package/components/feed/feed.css +8 -8
- package/components/feed/feed.yaml +14 -1
- package/components/field/field.a2ui.json +1 -0
- package/components/field/field.css +1 -1
- package/components/field/field.examples.md +1 -1
- package/components/fields/fields.a2ui.json +1 -0
- package/components/fields/fields.examples.md +1 -1
- package/components/footer/footer.a2ui.json +1 -0
- package/components/frame/frame.a2ui.json +1 -0
- package/components/grid/grid.a2ui.json +1 -0
- package/components/header/header.a2ui.json +3 -2
- package/components/header/header.yaml +3 -3
- package/components/heatmap/heatmap.a2ui.json +2 -1
- package/components/heatmap/heatmap.class.js +1 -1
- package/components/heatmap/heatmap.css +6 -6
- package/components/heatmap/heatmap.yaml +1 -1
- package/components/icon/icon.a2ui.json +1 -0
- package/components/image/image.a2ui.json +28 -14
- package/components/image/image.class.js +38 -23
- package/components/image/image.css +18 -8
- package/components/image/image.d.ts +2 -2
- package/components/image/image.examples.md +3 -3
- package/components/image/image.yaml +23 -7
- package/components/inline-edit/inline-edit.a2ui.json +1 -0
- package/components/inline-message/inline-message.a2ui.json +3 -1
- package/components/inline-message/inline-message.class.js +3 -1
- package/components/inline-message/inline-message.css +1 -1
- package/components/inline-message/inline-message.d.ts +2 -2
- package/components/inline-message/inline-message.yaml +2 -1
- package/components/input/input.a2ui.json +66 -16
- package/components/input/input.class.js +64 -7
- package/components/input/input.css +19 -18
- package/components/input/input.d.ts +9 -4
- package/components/input/input.yaml +83 -10
- package/components/inspector/inspector.a2ui.json +1 -0
- package/components/integration-card/integration-card.a2ui.json +1 -0
- package/components/integration-card/integration-card.css +4 -4
- package/components/kbd/kbd.a2ui.json +1 -0
- package/components/kbd/kbd.css +1 -1
- package/components/link/link.a2ui.json +2 -1
- package/components/link/link.yaml +1 -1
- package/components/list/list-item.a2ui.json +9 -0
- package/components/list/list-item.yaml +12 -0
- package/components/list/list.a2ui.json +9 -3
- package/components/list/list.class.js +14 -1
- package/components/list/list.css +14 -3
- package/components/list/list.d.ts +7 -5
- package/components/list/list.yaml +16 -6
- package/components/list-window/list-window.a2ui.json +1 -0
- package/components/list-window/list-window.class.js +2 -1
- package/components/loading-overlay/loading-overlay.a2ui.json +1 -0
- package/components/mark/mark.a2ui.json +2 -1
- package/components/mark/mark.yaml +1 -1
- package/components/menu/menu-divider.a2ui.json +1 -0
- package/components/menu/menu-item.a2ui.json +3 -1
- package/components/menu/menu-item.yaml +6 -0
- package/components/menu/menu-label.a2ui.json +1 -0
- package/components/menu/menu.a2ui.json +3 -2
- package/components/menu/menu.class.js +2 -2
- package/components/menu/menu.d.ts +2 -2
- package/components/menu/menu.yaml +3 -3
- package/components/modal/modal.a2ui.json +1 -0
- package/components/nav/nav.a2ui.json +1 -0
- package/components/nav/nav.class.js +14 -3
- package/components/nav/nav.css +2 -2
- package/components/nav-group/nav-group.a2ui.json +1 -0
- package/components/nav-group/nav-group.class.js +3 -1
- package/components/nav-group/nav-group.css +3 -3
- package/components/nav-item/nav-item.a2ui.json +1 -0
- package/components/nav-item/nav-item.css +2 -2
- package/components/noodles/noodles.a2ui.json +1 -0
- package/components/noodles/noodles.class.js +5 -1
- package/components/number-format/number-format.a2ui.json +1 -0
- package/components/option-card/option-card.a2ui.json +1 -0
- package/components/option-card/option-card.css +1 -1
- package/components/otp-input/otp-input.a2ui.json +3 -2
- package/components/otp-input/otp-input.css +1 -1
- package/components/otp-input/otp-input.yaml +9 -2
- package/components/page/page.a2ui.json +13 -0
- package/components/page/page.css +2 -2
- package/components/page/page.d.ts +1 -1
- package/components/page/page.yaml +1 -0
- package/components/pagination/pagination.a2ui.json +1 -0
- package/components/pagination/pagination.class.js +3 -2
- package/components/pagination/pagination.css +1 -1
- package/components/pane/pane.a2ui.json +6 -0
- package/components/pane/pane.class.js +3 -3
- package/components/pane/pane.css +3 -3
- package/components/pane/pane.yaml +3 -0
- package/components/password-strength/password-strength.a2ui.json +1 -0
- package/components/pipeline-status/pipeline-status.a2ui.json +1 -0
- package/components/popover/popover.a2ui.json +7 -6
- package/components/popover/popover.class.js +2 -2
- package/components/popover/popover.d.ts +2 -2
- package/components/popover/popover.yaml +4 -4
- package/components/preview/preview.a2ui.json +1 -0
- package/components/preview/preview.class.js +5 -1
- package/components/progress/progress.a2ui.json +47 -24
- package/components/progress/progress.class.js +66 -11
- package/components/progress/progress.css +44 -26
- package/components/progress/progress.d.ts +7 -5
- package/components/progress/progress.examples.md +2 -2
- package/components/progress/progress.yaml +235 -53
- package/components/progress-row/progress-row.a2ui.json +16 -12
- package/components/progress-row/progress-row.css +2 -2
- package/components/progress-row/progress-row.d.ts +2 -2
- package/components/progress-row/progress-row.examples.md +2 -14
- package/components/progress-row/progress-row.yaml +28 -36
- package/components/qr-code/qr-code.a2ui.json +13 -12
- package/components/qr-code/qr-code.class.js +7 -7
- package/components/qr-code/qr-code.css +1 -1
- package/components/qr-code/qr-code.d.ts +10 -7
- package/components/qr-code/qr-code.yaml +18 -12
- package/components/radio/radio.a2ui.json +8 -7
- package/components/radio/radio.class.js +8 -0
- package/components/radio/radio.yaml +3 -3
- package/components/radio-group/radio-group.a2ui.json +5 -3
- package/components/radio-group/radio-group.class.js +11 -0
- package/components/radio-group/radio-group.yaml +7 -1
- package/components/range/range.a2ui.json +6 -0
- package/components/range/range.class.js +2 -2
- package/components/range/range.css +3 -3
- package/components/range/range.yaml +3 -0
- package/components/rating/rating.a2ui.json +1 -0
- package/components/rating/rating.css +1 -1
- package/components/relative-time/relative-time.a2ui.json +1 -0
- package/components/richtext/richtext.a2ui.json +2 -1
- package/components/richtext/richtext.css +3 -3
- package/components/richtext/richtext.yaml +1 -1
- package/components/row/row.a2ui.json +1 -0
- package/components/search/search.a2ui.json +1 -0
- package/components/search/search.class.js +4 -1
- package/components/section/section.a2ui.json +1 -0
- package/components/segment/segment.a2ui.json +21 -10
- package/components/segment/segment.css +20 -4
- package/components/segment/segment.d.ts +2 -1
- package/components/segment/segment.yaml +20 -13
- package/components/segmented/segmented.a2ui.json +36 -7
- package/components/segmented/segmented.class.js +113 -22
- package/components/segmented/segmented.css +3 -0
- package/components/segmented/segmented.d.ts +3 -1
- package/components/segmented/segmented.yaml +80 -8
- package/components/select/select.a2ui.json +18 -13
- package/components/select/select.class.js +61 -37
- package/components/select/select.css +18 -16
- package/components/select/select.yaml +18 -7
- package/components/skeleton/skeleton.a2ui.json +8 -7
- package/components/skeleton/skeleton.class.js +8 -7
- package/components/skeleton/skeleton.css +21 -6
- package/components/skeleton/skeleton.d.ts +2 -2
- package/components/skeleton/skeleton.examples.md +2 -2
- package/components/skeleton/skeleton.yaml +3 -2
- package/components/skip-nav/skip-nav.a2ui.json +1 -0
- package/components/slider/slider.a2ui.json +6 -0
- package/components/slider/slider.class.js +20 -3
- package/components/slider/slider.css +2 -2
- package/components/slider/slider.yaml +3 -0
- package/components/spinner/spinner.a2ui.json +1 -0
- package/components/spinner/spinner.css +1 -1
- package/components/stack/stack.a2ui.json +1 -0
- package/components/stat/stat.a2ui.json +1 -0
- package/components/stat/stat.css +3 -3
- package/components/stat/stat.js +2 -2
- package/components/step-progress/step-progress.a2ui.json +1 -0
- package/components/step-progress/step-progress.css +1 -1
- package/components/step-progress/step-progress.yaml +1 -1
- package/components/stepper/stepper-item.a2ui.json +7 -3
- package/components/stepper/stepper-item.yaml +15 -5
- package/components/stepper/stepper.a2ui.json +5 -1
- package/components/stepper/stepper.class.js +31 -16
- package/components/stepper/stepper.css +2 -2
- package/components/stepper/stepper.d.ts +1 -1
- package/components/stepper/stepper.yaml +4 -2
- package/components/stream/stream.a2ui.json +1 -0
- package/components/swatch/swatch.a2ui.json +1 -0
- package/components/swatch/swatch.css +2 -2
- package/components/swiper/swiper.a2ui.json +1 -0
- package/components/swiper/swiper.class.js +5 -1
- package/components/switch/switch.a2ui.json +12 -11
- package/components/switch/switch.css +1 -1
- package/components/switch/switch.yaml +6 -6
- package/components/table/table.a2ui.json +1 -10
- package/components/table/table.class.js +18 -16
- package/components/table/table.css +17 -18
- package/components/table/table.d.ts +0 -2
- package/components/table/table.yaml +0 -9
- package/components/table-toolbar/table-toolbar.a2ui.json +1 -0
- package/components/table-toolbar/table-toolbar.class.js +38 -19
- package/components/table-toolbar/table-toolbar.css +2 -2
- package/components/tabs/tab.a2ui.json +9 -0
- package/components/tabs/tab.js +4 -0
- package/components/tabs/tab.yaml +15 -0
- package/components/tabs/tabs.a2ui.json +9 -4
- package/components/tabs/tabs.class.js +13 -1
- package/components/tabs/tabs.css +9 -1
- package/components/tabs/tabs.d.ts +2 -0
- package/components/tabs/tabs.yaml +9 -2
- package/components/tag/tag.a2ui.json +1 -0
- package/components/tag/tag.css +2 -2
- package/components/tags-input/tags-input.a2ui.json +22 -17
- package/components/tags-input/tags-input.class.js +13 -11
- package/components/tags-input/tags-input.css +11 -7
- package/components/tags-input/tags-input.d.ts +16 -7
- package/components/tags-input/tags-input.examples.md +2 -2
- package/components/tags-input/tags-input.yaml +25 -8
- package/components/text/text.a2ui.json +6 -5
- package/components/text/text.css +10 -5
- package/components/text/text.d.ts +2 -2
- package/components/text/text.yaml +9 -4
- package/components/textarea/textarea.a2ui.json +2 -1
- package/components/textarea/textarea.css +1 -1
- package/components/textarea/textarea.yaml +1 -1
- package/components/theme-provider/theme-provider.a2ui.json +2 -1
- package/components/theme-provider/theme-provider.d.ts +5 -3
- package/components/theme-provider/theme-provider.yaml +5 -3
- package/components/time-picker/time-picker.a2ui.json +1 -0
- package/components/time-picker/time-picker.class.js +4 -2
- package/components/time-picker/time-picker.css +1 -1
- package/components/timeline/timeline-item.a2ui.json +26 -3
- package/components/timeline/timeline-item.yaml +22 -7
- package/components/timeline/timeline.a2ui.json +4 -0
- package/components/timeline/timeline.class.js +29 -18
- package/components/timeline/timeline.css +4 -4
- package/components/timeline/timeline.d.ts +3 -3
- package/components/timeline/timeline.yaml +2 -0
- package/components/toast/toast.a2ui.json +10 -3
- package/components/toast/toast.yaml +20 -13
- package/components/toc/toc.a2ui.json +1 -0
- package/components/toc/toc.css +1 -1
- package/components/toggle-group/toggle-group.a2ui.json +7 -3
- package/components/toggle-group/toggle-group.class.js +43 -12
- package/components/toggle-group/toggle-group.css +7 -4
- package/components/toggle-group/toggle-group.d.ts +3 -4
- package/components/toggle-group/toggle-group.yaml +22 -16
- package/components/toggle-group/toggle-option.a2ui.json +8 -4
- package/components/toggle-group/toggle-option.yaml +15 -13
- package/components/toggle-scheme/toggle-scheme.a2ui.json +2 -1
- package/components/toggle-scheme/toggle-scheme.yaml +1 -1
- package/components/toolbar/toolbar-group.a2ui.json +1 -0
- package/components/toolbar/toolbar.a2ui.json +1 -0
- package/components/toolbar/toolbar.class.js +3 -0
- package/components/tooltip/tooltip.a2ui.json +1 -0
- package/components/tooltip/tooltip.css +1 -1
- package/components/tour/tour-step.a2ui.json +4 -0
- package/components/tour/tour-step.yaml +2 -0
- package/components/tour/tour.a2ui.json +4 -0
- package/components/tour/tour.css +2 -2
- package/components/tour/tour.yaml +2 -0
- package/components/tree/tree-item.a2ui.json +5 -0
- package/components/tree/tree-item.yaml +3 -0
- package/components/tree/tree.a2ui.json +4 -0
- package/components/tree/tree.class.js +2 -1
- package/components/tree/tree.css +1 -1
- package/components/tree/tree.yaml +2 -0
- package/components/upload/upload.a2ui.json +8 -1
- package/components/upload/upload.class.js +35 -5
- package/components/upload/upload.css +28 -0
- package/components/upload/upload.d.ts +16 -0
- package/components/upload/upload.yaml +27 -7
- package/components/visually-hidden/visually-hidden.a2ui.json +1 -0
- package/core/dom.d.ts +11 -0
- package/core/dom.js +34 -0
- package/core/form.js +7 -0
- package/core/index.d.ts +1 -0
- package/core/index.js +1 -0
- package/core/responsive.js +16 -4
- package/core/template.js +2 -1
- package/custom-elements.json +442 -502
- package/dist/host.min.css +1 -1
- package/dist/host.sheet.js +1 -1
- package/dist/theme-provider.min.js +5 -5
- package/dist/web-components.min.css +1 -1
- package/dist/web-components.min.js +91 -104
- package/dist/web-components.sheet.js +1 -1
- package/package.json +4 -2
- package/patterns/conversion-funnel/conversion-funnel.examples.html +15 -15
- package/patterns/inline-dialog/inline-dialog.examples.html +2 -2
- package/patterns/inline-dialog/inline-dialog.html +4 -0
- package/patterns/timezone-selector/timezone-selector.examples.html +1 -1
- package/patterns/timezone-selector/timezone-selector.html +2 -2
- package/styles/api/text.css +7 -0
- package/styles/type/scale.css +6 -7
- package/traits/_catalog.json +129 -41
- package/traits/anchor-positioning/anchor-positioning.js +1 -0
- package/traits/announcer/announcer.js +1 -0
- package/traits/arrow-grid-nav/arrow-grid-nav.js +1 -0
- package/traits/attention-pulse/attention-pulse.js +1 -0
- package/traits/count-up/count-up.js +1 -0
- package/traits/define.js +78 -0
- package/traits/focus-restore/focus-restore.js +2 -1
- package/traits/haptic-feedback/haptic-feedback.js +1 -0
- package/traits/input-mask/input-mask.js +1 -0
- package/traits/intersection-observer/intersection-observer.js +1 -0
- package/traits/layout-animation/layout-animation.js +1 -0
- package/traits/noise-texture/noise-texture.js +1 -0
- package/traits/resize-observer/resize-observer.js +1 -0
- package/traits/scroll-progress/scroll-progress.js +1 -0
- package/traits/snap-to-grid/snap-to-grid.js +1 -0
- package/traits/sound-feedback/sound-feedback.js +1 -0
- package/traits/spring-animate/spring-animate.js +1 -0
- package/traits/validation/validation.js +1 -0
|
@@ -9,8 +9,8 @@ category: container
|
|
|
9
9
|
version: 1
|
|
10
10
|
description: Header — styled by closest container parent (Card / Drawer / Modal / Page / AppShell). Contains heading text and optional action slot.
|
|
11
11
|
props:
|
|
12
|
-
|
|
13
|
-
description: Bare attribute — enables default header padding. The container parent's own `padding` prop sets the scale.
|
|
12
|
+
padded:
|
|
13
|
+
description: Bare attribute — enables default header padding. The container parent's own `padding` prop sets the scale. Renamed from `[padding]` (gh#1335) — a boolean can't share a name with the global Scale-grammar `[padding]` attribute (ADR-0053).
|
|
14
14
|
type: boolean
|
|
15
15
|
default: false
|
|
16
16
|
reflect: true
|
|
@@ -79,7 +79,7 @@ a2ui:
|
|
|
79
79
|
default+icon+heading+description+action via slot vocabulary; extra
|
|
80
80
|
layout primitives fight the chrome styling.
|
|
81
81
|
- >-
|
|
82
|
-
The `
|
|
82
|
+
The `padded` attribute is a bare boolean — it enables default
|
|
83
83
|
header padding, but the *scale* is set by the container parent's
|
|
84
84
|
own `padding` prop. Do not pass numeric values.
|
|
85
85
|
anti_patterns: []
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"unevaluatedProperties": false,
|
|
86
86
|
"x-adiaui": {
|
|
87
87
|
"anti_patterns": [],
|
|
88
|
-
"category": "data
|
|
88
|
+
"category": "data",
|
|
89
89
|
"composes": [],
|
|
90
90
|
"events": {
|
|
91
91
|
"cell-click": {
|
|
@@ -123,6 +123,7 @@
|
|
|
123
123
|
"activity"
|
|
124
124
|
],
|
|
125
125
|
"name": "UIHeatmap",
|
|
126
|
+
"parts": {},
|
|
126
127
|
"related": [
|
|
127
128
|
"chart",
|
|
128
129
|
"calendar-picker"
|
|
@@ -193,7 +193,7 @@ export class UIHeatmap extends UIElement {
|
|
|
193
193
|
const isDayGrid = this.type === 'day-grid';
|
|
194
194
|
const cellTrack = isDayGrid ? 'var(--heatmap-cell-min-size, 0.75rem)' : 'minmax(0, 1fr)';
|
|
195
195
|
const grid = document.createElement('div');
|
|
196
|
-
grid.setAttribute('data-grid', '');
|
|
196
|
+
grid.setAttribute('data-heatmap-grid', '');
|
|
197
197
|
grid.style.gridTemplateColumns = `repeat(${cols}, ${cellTrack})`;
|
|
198
198
|
grid.style.gridTemplateRows = `repeat(${rows}, ${isDayGrid ? 'var(--heatmap-cell-min-size, 0.75rem)' : '1fr'})`;
|
|
199
199
|
for (let r = 0; r < rows; r++) {
|
|
@@ -46,14 +46,14 @@
|
|
|
46
46
|
/* day-grid: fixed-size cell tracks + intrinsic width so the host scrolls
|
|
47
47
|
instead of squishing. (class.js writes the fixed gridTemplateColumns
|
|
48
48
|
inline for day-grid; matrix/density keep minmax(0,1fr) to fit.) */
|
|
49
|
-
:scope[type="day-grid"] > [data-grid],
|
|
49
|
+
:scope[type="day-grid"] > [data-heatmap-grid],
|
|
50
50
|
:scope[type="day-grid"] > [data-months] {
|
|
51
51
|
width: max-content;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
/* Title slot */
|
|
55
55
|
:scope [slot="title"] {
|
|
56
|
-
font-weight:
|
|
56
|
+
font-weight: var(--a-weight-semibold);
|
|
57
57
|
margin: 0;
|
|
58
58
|
}
|
|
59
59
|
|
|
@@ -66,20 +66,20 @@
|
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
:scope [data-month-label] {
|
|
69
|
-
line-height:
|
|
69
|
+
line-height: var(--a-font-leading-none);
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
/* Grid of cells */
|
|
73
|
-
:scope > [data-grid] {
|
|
73
|
+
:scope > [data-heatmap-grid] {
|
|
74
74
|
display: grid;
|
|
75
75
|
gap: var(--heatmap-gap);
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
-
:scope[aspect="square"] > [data-grid] {
|
|
78
|
+
:scope[aspect="square"] > [data-heatmap-grid] {
|
|
79
79
|
aspect-ratio: 1 / 1;
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
:scope[aspect="wide"] > [data-grid] {
|
|
82
|
+
:scope[aspect="wide"] > [data-heatmap-grid] {
|
|
83
83
|
aspect-ratio: auto;
|
|
84
84
|
}
|
|
85
85
|
|
|
@@ -21,6 +21,17 @@
|
|
|
21
21
|
"component": {
|
|
22
22
|
"const": "Image"
|
|
23
23
|
},
|
|
24
|
+
"cornerRadius": {
|
|
25
|
+
"description": "Border radius token. Renamed from `[radius]` (gh#1335) — a preset-enum can't share a name with the global Enum·preset `[radius]` attribute (`sharp`/`rounded`/`round`), whose vocabulary is unrelated (ADR-0053); mirrors chart-ui's own `[corner-radius]` fix (ADR-0054) and skeleton-ui's matching rename (image-ui composes skeleton-ui for its loading fallback).",
|
|
26
|
+
"type": "string",
|
|
27
|
+
"enum": [
|
|
28
|
+
"sm",
|
|
29
|
+
"md",
|
|
30
|
+
"lg",
|
|
31
|
+
"full"
|
|
32
|
+
],
|
|
33
|
+
"default": ""
|
|
34
|
+
},
|
|
24
35
|
"fallback": {
|
|
25
36
|
"description": "Fallback image URL on error",
|
|
26
37
|
"type": "string",
|
|
@@ -42,17 +53,6 @@
|
|
|
42
53
|
"type": "string",
|
|
43
54
|
"default": ""
|
|
44
55
|
},
|
|
45
|
-
"radius": {
|
|
46
|
-
"description": "Border radius token",
|
|
47
|
-
"type": "string",
|
|
48
|
-
"enum": [
|
|
49
|
-
"sm",
|
|
50
|
-
"md",
|
|
51
|
-
"lg",
|
|
52
|
-
"full"
|
|
53
|
-
],
|
|
54
|
-
"default": ""
|
|
55
|
-
},
|
|
56
56
|
"raw": {
|
|
57
57
|
"description": "Strip chrome (no background, no radius) for edge-to-edge rendering.",
|
|
58
58
|
"type": "boolean",
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
},
|
|
94
94
|
{
|
|
95
95
|
"description": "Image upload card with drag-and-drop zone and a 3-column preview grid of placeholder image cards. Footer holds cancel and upload action buttons.",
|
|
96
|
-
"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 ]\n },\n {\n \"id\": \"title\",\n \"component\": \"Text\",\n \"slot\": \"heading\",\n \"variant\": \"section\",\n \"textContent\": \"Upload Images\"\n },\n {\n \"id\": \"sec\",\n \"component\": \"Section\",\n \"children\": [\n \"col\"\n ]\n },\n {\n \"id\": \"col\",\n \"component\": \"Column\",\n \"gap\": \"4\",\n \"children\": [\n \"uploader\",\n \"preview-grid\"\n ]\n },\n {\n \"id\": \"uploader\",\n \"component\": \"Upload\",\n \"accept\": \"image/*\",\n \"multiple\": true,\n \"hint\": \"Drag images here or click to browse\"\n },\n {\n \"id\": \"preview-grid\",\n \"component\": \"Grid\",\n \"columns\": \"3\",\n \"gap\": \"3\",\n \"children\": [\n \"preview-1\",\n \"preview-2\",\n \"preview-3\"\n ]\n },\n {\n \"id\": \"preview-1\",\n \"component\": \"Card\",\n \"variant\": \"outlined\",\n \"children\": [\n \"img-1\"\n ]\n },\n {\n \"id\": \"img-1\",\n \"component\": \"Image\",\n \"src\": \"\",\n \"alt\": \"Preview 1\",\n \"height\": \"120px\",\n \"fit\": \"cover\",\n \"
|
|
96
|
+
"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 ]\n },\n {\n \"id\": \"title\",\n \"component\": \"Text\",\n \"slot\": \"heading\",\n \"variant\": \"section\",\n \"textContent\": \"Upload Images\"\n },\n {\n \"id\": \"sec\",\n \"component\": \"Section\",\n \"children\": [\n \"col\"\n ]\n },\n {\n \"id\": \"col\",\n \"component\": \"Column\",\n \"gap\": \"4\",\n \"children\": [\n \"uploader\",\n \"preview-grid\"\n ]\n },\n {\n \"id\": \"uploader\",\n \"component\": \"Upload\",\n \"accept\": \"image/*\",\n \"multiple\": true,\n \"hint\": \"Drag images here or click to browse\"\n },\n {\n \"id\": \"preview-grid\",\n \"component\": \"Grid\",\n \"columns\": \"3\",\n \"gap\": \"3\",\n \"children\": [\n \"preview-1\",\n \"preview-2\",\n \"preview-3\"\n ]\n },\n {\n \"id\": \"preview-1\",\n \"component\": \"Card\",\n \"variant\": \"outlined\",\n \"children\": [\n \"img-1\"\n ]\n },\n {\n \"id\": \"img-1\",\n \"component\": \"Image\",\n \"src\": \"\",\n \"alt\": \"Preview 1\",\n \"height\": \"120px\",\n \"fit\": \"cover\",\n \"cornerRadius\": \"sm\"\n },\n {\n \"id\": \"preview-2\",\n \"component\": \"Card\",\n \"variant\": \"outlined\",\n \"children\": [\n \"img-2\"\n ]\n },\n {\n \"id\": \"img-2\",\n \"component\": \"Image\",\n \"src\": \"\",\n \"alt\": \"Preview 2\",\n \"height\": \"120px\",\n \"fit\": \"cover\",\n \"cornerRadius\": \"sm\"\n },\n {\n \"id\": \"preview-3\",\n \"component\": \"Card\",\n \"variant\": \"outlined\",\n \"children\": [\n \"img-3\"\n ]\n },\n {\n \"id\": \"img-3\",\n \"component\": \"Image\",\n \"src\": \"\",\n \"alt\": \"Preview 3\",\n \"height\": \"120px\",\n \"fit\": \"cover\",\n \"cornerRadius\": \"sm\"\n },\n {\n \"id\": \"ftr\",\n \"component\": \"Footer\",\n \"children\": [\n \"ftr-actions\"\n ]\n },\n {\n \"id\": \"ftr-actions\",\n \"component\": \"Row\",\n \"gap\": \"2\",\n \"children\": [\n \"cancel-btn\",\n \"upload-btn\"\n ]\n },\n {\n \"id\": \"cancel-btn\",\n \"component\": \"Button\",\n \"text\": \"Cancel\",\n \"variant\": \"ghost\"\n },\n {\n \"id\": \"upload-btn\",\n \"component\": \"Button\",\n \"text\": \"Upload\",\n \"variant\": \"primary\"\n }\n]",
|
|
97
97
|
"name": "file-upload-gallery"
|
|
98
98
|
}
|
|
99
99
|
],
|
|
@@ -117,6 +117,7 @@
|
|
|
117
117
|
"assets"
|
|
118
118
|
],
|
|
119
119
|
"name": "UIImage",
|
|
120
|
+
"parts": {},
|
|
120
121
|
"related": [
|
|
121
122
|
"button",
|
|
122
123
|
"select",
|
|
@@ -125,14 +126,27 @@
|
|
|
125
126
|
"upload"
|
|
126
127
|
],
|
|
127
128
|
"slots": {
|
|
128
|
-
"
|
|
129
|
-
"description": "
|
|
129
|
+
"image": {
|
|
130
|
+
"description": "The <img> element. Adopt-or-stamp (gh#1461): an author-supplied [slot=\"image\"] child is adopted as-is; otherwise a lazy-loading <img> is created. Renamed from the yaml's prior `img` key, which matched neither this real attribute value nor any DOM element image-ui stamps."
|
|
131
|
+
},
|
|
132
|
+
"skeleton": {
|
|
133
|
+
"description": "Loading-state placeholder shown until the image loads or errors. Adopt-or-stamp: an author-supplied [slot=\"skeleton\"] child is adopted; otherwise a <skeleton-ui> is created."
|
|
130
134
|
}
|
|
131
135
|
},
|
|
132
136
|
"states": [
|
|
133
137
|
{
|
|
134
138
|
"description": "Default, ready for interaction.",
|
|
135
139
|
"name": "idle"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"description": "The `[slot=\"image\"]` element's `load` event has fired (or it was already `complete` with a non-zero `naturalWidth` at connect — the gh#999 missed-load guard). Reveals the image and hides the skeleton via opacity transition.",
|
|
143
|
+
"attribute": "loaded",
|
|
144
|
+
"name": "loaded"
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"description": "The image failed to load and either no `[fallback]` was set or the fallback URL itself also failed. The skeleton stays visible (no built-in visual error affordance beyond this attribute today — consumers style `[error]` themselves).",
|
|
148
|
+
"attribute": "error",
|
|
149
|
+
"name": "error"
|
|
136
150
|
}
|
|
137
151
|
],
|
|
138
152
|
"status": "stable",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* <image-ui src="/photo.jpg" alt="Photo" width="300" height="200"></image-ui>
|
|
16
|
-
* <image-ui src="/avatar.jpg" fit="cover" radius="full"></image-ui>
|
|
16
|
+
* <image-ui src="/avatar.jpg" fit="cover" corner-radius="full"></image-ui>
|
|
17
17
|
* <image-ui src="/hero.jpg" size="full"></image-ui>
|
|
18
18
|
* <image-ui src="/pixel.png" raw></image-ui>
|
|
19
19
|
*
|
|
@@ -21,25 +21,25 @@
|
|
|
21
21
|
* Shows skeleton-ui while loading, swaps to img on load.
|
|
22
22
|
* Falls back to fallback URL or keeps skeleton on error.
|
|
23
23
|
*
|
|
24
|
-
* Size:
|
|
25
|
-
*
|
|
26
|
-
* Fit:
|
|
27
|
-
* Raw:
|
|
24
|
+
* Size: full (fills container width and height)
|
|
25
|
+
* Corner radius: sm, md, lg, full. Renamed from `[radius]` (gh#1335).
|
|
26
|
+
* Fit: cover (default), contain, fill, none
|
|
27
|
+
* Raw: strips chrome (no background, no radius) for edge-to-edge rendering
|
|
28
28
|
*/
|
|
29
29
|
|
|
30
30
|
import { UIElement } from '../../core/element.js';
|
|
31
31
|
|
|
32
32
|
export class UIImage extends UIElement {
|
|
33
33
|
static properties = {
|
|
34
|
-
src:
|
|
35
|
-
alt:
|
|
36
|
-
width:
|
|
37
|
-
height:
|
|
38
|
-
size:
|
|
39
|
-
fit:
|
|
40
|
-
|
|
41
|
-
raw:
|
|
42
|
-
fallback:
|
|
34
|
+
src: { type: String, default: '', reflect: true },
|
|
35
|
+
alt: { type: String, default: '', reflect: true },
|
|
36
|
+
width: { type: String, default: '', reflect: true },
|
|
37
|
+
height: { type: String, default: '', reflect: true },
|
|
38
|
+
size: { type: String, default: '', reflect: true },
|
|
39
|
+
fit: { type: String, default: 'cover', reflect: true },
|
|
40
|
+
cornerRadius: { type: String, default: '', reflect: true, attribute: 'corner-radius' },
|
|
41
|
+
raw: { type: Boolean, default: false, reflect: true },
|
|
42
|
+
fallback: { type: String, default: '', reflect: true },
|
|
43
43
|
};
|
|
44
44
|
|
|
45
45
|
static template = () => null;
|
|
@@ -56,6 +56,19 @@ export class UIImage extends UIElement {
|
|
|
56
56
|
this.#skeleton.setAttribute('height', '100%');
|
|
57
57
|
this.appendChild(this.#skeleton);
|
|
58
58
|
}
|
|
59
|
+
// gh#1362 — @scope proximity: skeleton-ui's own `position: relative`
|
|
60
|
+
// (its scoping root IS the element — proximity 0) always beats
|
|
61
|
+
// image-ui's `[slot="skeleton"] { position: absolute }` overlay rule
|
|
62
|
+
// (image-ui's scoping root is the PARENT — proximity 1), per CSS
|
|
63
|
+
// Cascade & Inheritance L6 — proximity is resolved before specificity
|
|
64
|
+
// or source order, so raising image-ui's specificity can't fix this.
|
|
65
|
+
// Stamp an attribute skeleton-ui's OWN `@scope` block opts into overlay
|
|
66
|
+
// mode on (skeleton.css `:scope[data-overlay]`) — that rule competes at
|
|
67
|
+
// skeleton-ui's own proximity (0), not image-ui's (1), so it wins.
|
|
68
|
+
// Set on whichever skeleton is in use (found OR just created) so an
|
|
69
|
+
// author-supplied `[slot="skeleton"]` child gets the same fix as the
|
|
70
|
+
// auto-created path.
|
|
71
|
+
this.#skeleton.setAttribute('data-overlay', '');
|
|
59
72
|
|
|
60
73
|
this.#img = this.querySelector(':scope > [slot="image"]');
|
|
61
74
|
if (!this.#img) {
|
|
@@ -69,10 +82,12 @@ export class UIImage extends UIElement {
|
|
|
69
82
|
// Missed-load guard (gh#999): an image already complete when these
|
|
70
83
|
// listeners attach — a parse-time-loaded authored [slot="image"], or a
|
|
71
84
|
// cache hit racing the upgrade — fired `load` before we were listening.
|
|
72
|
-
// Without this check [
|
|
73
|
-
//
|
|
74
|
-
//
|
|
75
|
-
//
|
|
85
|
+
// Without this check [loaded] never stamps and the reveal (skeleton →
|
|
86
|
+
// img opacity 1) never happens: the permanent blank box gh#988
|
|
87
|
+
// reported. naturalWidth guards the broken-image case, which fires
|
|
88
|
+
// `error` (still listened) rather than a false reveal. (Attribute
|
|
89
|
+
// renamed from `data-loaded`/`data-error` to bare `[loaded]`/`[error]`
|
|
90
|
+
// — gh#1464, declared host states per the #1463 convention.)
|
|
76
91
|
if (this.#img.complete && this.#img.naturalWidth > 0) this.#onLoad();
|
|
77
92
|
|
|
78
93
|
this.#applySize();
|
|
@@ -82,8 +97,8 @@ export class UIImage extends UIElement {
|
|
|
82
97
|
if (!this.#img) return;
|
|
83
98
|
|
|
84
99
|
if (this.#img.getAttribute('src') !== this.src) {
|
|
85
|
-
this.removeAttribute('
|
|
86
|
-
this.removeAttribute('
|
|
100
|
+
this.removeAttribute('loaded');
|
|
101
|
+
this.removeAttribute('error');
|
|
87
102
|
this.#img.src = this.src || '';
|
|
88
103
|
}
|
|
89
104
|
|
|
@@ -97,15 +112,15 @@ export class UIImage extends UIElement {
|
|
|
97
112
|
}
|
|
98
113
|
|
|
99
114
|
#onLoad = () => {
|
|
100
|
-
this.setAttribute('
|
|
101
|
-
this.removeAttribute('
|
|
115
|
+
this.setAttribute('loaded', '');
|
|
116
|
+
this.removeAttribute('error');
|
|
102
117
|
};
|
|
103
118
|
|
|
104
119
|
#onError = () => {
|
|
105
120
|
if (this.fallback && this.#img.src !== this.fallback) {
|
|
106
121
|
this.#img.src = this.fallback;
|
|
107
122
|
} else {
|
|
108
|
-
this.setAttribute('
|
|
123
|
+
this.setAttribute('error', '');
|
|
109
124
|
}
|
|
110
125
|
};
|
|
111
126
|
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
transition: opacity var(--image-duration) var(--image-easing);
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
:scope[
|
|
37
|
+
:scope[loaded] [slot="image"] {
|
|
38
38
|
opacity: 1;
|
|
39
39
|
}
|
|
40
40
|
|
|
@@ -44,23 +44,33 @@
|
|
|
44
44
|
:scope[fit="fill"] [slot="image"] { object-fit: fill; }
|
|
45
45
|
:scope[fit="none"] [slot="image"] { object-fit: none; }
|
|
46
46
|
|
|
47
|
-
/* ── Skeleton placeholder ──
|
|
47
|
+
/* ── Skeleton placeholder ──
|
|
48
|
+
`position: absolute` here only reaches a slotted element with NO
|
|
49
|
+
competing `@scope` of its own. A real `skeleton-ui` child carries its
|
|
50
|
+
own `@scope (skeleton-ui) { :scope { position: relative } }` at
|
|
51
|
+
proximity 0 (its scoping root IS the element) vs. this rule's
|
|
52
|
+
proximity 1 (this scope's root is the PARENT) — proximity is resolved
|
|
53
|
+
before specificity, so that inner rule always wins here regardless
|
|
54
|
+
(gh#1362). image.class.js stamps `[data-overlay]` on the skeleton it
|
|
55
|
+
wires up; skeleton.css's own `:scope[data-overlay]` rule is what
|
|
56
|
+
actually wins the overlay for a real skeleton-ui. This rule stays as
|
|
57
|
+
the fallback for a non-skeleton-ui element authored into the slot. */
|
|
48
58
|
[slot="skeleton"] {
|
|
49
59
|
position: absolute;
|
|
50
60
|
inset: 0;
|
|
51
61
|
transition: opacity var(--image-duration) var(--image-easing);
|
|
52
62
|
}
|
|
53
63
|
|
|
54
|
-
:scope[
|
|
64
|
+
:scope[loaded] [slot="skeleton"] {
|
|
55
65
|
opacity: 0;
|
|
56
66
|
pointer-events: none;
|
|
57
67
|
}
|
|
58
68
|
|
|
59
|
-
/* ──
|
|
60
|
-
:scope[radius="sm"] { --image-radius: var(--a-radius-sm); }
|
|
61
|
-
:scope[radius="md"] { --image-radius: var(--a-radius-md); }
|
|
62
|
-
:scope[radius="lg"] { --image-radius: var(--a-radius-lg); }
|
|
63
|
-
:scope[radius="full"] { --image-radius: var(--a-radius-full); }
|
|
69
|
+
/* ── Corner-radius variants (attribute renamed from [radius], gh#1335) ── */
|
|
70
|
+
:scope[corner-radius="sm"] { --image-radius: var(--a-radius-sm); }
|
|
71
|
+
:scope[corner-radius="md"] { --image-radius: var(--a-radius-md); }
|
|
72
|
+
:scope[corner-radius="lg"] { --image-radius: var(--a-radius-lg); }
|
|
73
|
+
:scope[corner-radius="full"] { --image-radius: var(--a-radius-full); }
|
|
64
74
|
|
|
65
75
|
/* ── Size mode — fills the container.
|
|
66
76
|
Layout-changing attribute; sanctioned in component-token-contract.md. */
|
|
@@ -15,14 +15,14 @@ import { UIElement } from '../../core/element.js';
|
|
|
15
15
|
export class UIImage extends UIElement {
|
|
16
16
|
/** Alt text for the image. */
|
|
17
17
|
alt: string;
|
|
18
|
+
/** Border radius token. Renamed from `[radius]` (gh#1335) — a preset-enum can't share a name with the global Enum·preset `[radius]` attribute (`sharp`/`rounded`/`round`), whose vocabulary is unrelated (ADR-0053); mirrors chart-ui's own `[corner-radius]` fix (ADR-0054) and skeleton-ui's matching rename (image-ui composes skeleton-ui for its loading fallback). */
|
|
19
|
+
cornerRadius: 'sm' | 'md' | 'lg' | 'full';
|
|
18
20
|
/** Fallback image URL on error */
|
|
19
21
|
fallback: string;
|
|
20
22
|
/** Object-fit mode */
|
|
21
23
|
fit: 'cover' | 'contain' | 'fill' | 'none';
|
|
22
24
|
/** CSS height */
|
|
23
25
|
height: string;
|
|
24
|
-
/** Border radius token */
|
|
25
|
-
radius: 'sm' | 'md' | 'lg' | 'full';
|
|
26
26
|
/** Strip chrome (no background, no radius) for edge-to-edge rendering. */
|
|
27
27
|
raw: boolean;
|
|
28
28
|
/** Size preset — e.g. 'full' fills the container width and height. */
|
|
@@ -6,14 +6,14 @@
|
|
|
6
6
|
<image-ui src="https://picsum.photos/seed/img-demo/300/200" alt="Sample landscape" width="300" height="200"></image-ui>
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
## radius
|
|
9
|
+
## corner-radius
|
|
10
10
|
|
|
11
11
|
```html
|
|
12
|
-
<image-ui src="https://picsum.photos/seed/r-sm/150/150" alt="Small radius" width="150" height="150" radius="sm"></image-ui>
|
|
12
|
+
<image-ui src="https://picsum.photos/seed/r-sm/150/150" alt="Small radius" width="150" height="150" corner-radius="sm"></image-ui>
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
## fit
|
|
16
16
|
|
|
17
17
|
```html
|
|
18
|
-
<image-ui src="https://picsum.photos/seed/fit-cover/400/200" alt="Cover" width="200" height="200" fit="cover" radius="md"></image-ui>
|
|
18
|
+
<image-ui src="https://picsum.photos/seed/fit-cover/400/200" alt="Cover" width="200" height="200" fit="cover" corner-radius="md"></image-ui>
|
|
19
19
|
```
|
|
@@ -44,10 +44,11 @@ props:
|
|
|
44
44
|
type: string
|
|
45
45
|
default: ""
|
|
46
46
|
reflect: true
|
|
47
|
-
|
|
48
|
-
description: Border radius token
|
|
47
|
+
cornerRadius:
|
|
48
|
+
description: Border radius token. Renamed from `[radius]` (gh#1335) — a preset-enum can't share a name with the global Enum·preset `[radius]` attribute (`sharp`/`rounded`/`round`), whose vocabulary is unrelated (ADR-0053); mirrors chart-ui's own `[corner-radius]` fix (ADR-0054) and skeleton-ui's matching rename (image-ui composes skeleton-ui for its loading fallback).
|
|
49
49
|
type: string
|
|
50
50
|
default: ""
|
|
51
|
+
attribute: corner-radius
|
|
51
52
|
enum:
|
|
52
53
|
- sm
|
|
53
54
|
- md
|
|
@@ -63,11 +64,26 @@ props:
|
|
|
63
64
|
default: ""
|
|
64
65
|
events: {}
|
|
65
66
|
slots:
|
|
66
|
-
|
|
67
|
-
description:
|
|
67
|
+
image:
|
|
68
|
+
description: >-
|
|
69
|
+
The <img> element. Adopt-or-stamp (gh#1461): an author-supplied
|
|
70
|
+
[slot="image"] child is adopted as-is; otherwise a lazy-loading <img>
|
|
71
|
+
is created. Renamed from the yaml's prior `img` key, which matched
|
|
72
|
+
neither this real attribute value nor any DOM element image-ui stamps.
|
|
73
|
+
skeleton:
|
|
74
|
+
description: >-
|
|
75
|
+
Loading-state placeholder shown until the image loads or errors.
|
|
76
|
+
Adopt-or-stamp: an author-supplied [slot="skeleton"] child is adopted;
|
|
77
|
+
otherwise a <skeleton-ui> is created.
|
|
68
78
|
states:
|
|
69
79
|
- name: idle
|
|
70
80
|
description: Default, ready for interaction.
|
|
81
|
+
- name: loaded
|
|
82
|
+
description: The `[slot="image"]` element's `load` event has fired (or it was already `complete` with a non-zero `naturalWidth` at connect — the gh#999 missed-load guard). Reveals the image and hides the skeleton via opacity transition.
|
|
83
|
+
attribute: loaded
|
|
84
|
+
- name: error
|
|
85
|
+
description: The image failed to load and either no `[fallback]` was set or the fallback URL itself also failed. The skeleton stays visible (no built-in visual error affordance beyond this attribute today — consumers style `[error]` themselves).
|
|
86
|
+
attribute: error
|
|
71
87
|
traits: []
|
|
72
88
|
tokens: {}
|
|
73
89
|
a2ui:
|
|
@@ -296,7 +312,7 @@ examples:
|
|
|
296
312
|
"alt": "Preview 1",
|
|
297
313
|
"height": "120px",
|
|
298
314
|
"fit": "cover",
|
|
299
|
-
"
|
|
315
|
+
"cornerRadius": "sm"
|
|
300
316
|
},
|
|
301
317
|
{
|
|
302
318
|
"id": "preview-2",
|
|
@@ -313,7 +329,7 @@ examples:
|
|
|
313
329
|
"alt": "Preview 2",
|
|
314
330
|
"height": "120px",
|
|
315
331
|
"fit": "cover",
|
|
316
|
-
"
|
|
332
|
+
"cornerRadius": "sm"
|
|
317
333
|
},
|
|
318
334
|
{
|
|
319
335
|
"id": "preview-3",
|
|
@@ -330,7 +346,7 @@ examples:
|
|
|
330
346
|
"alt": "Preview 3",
|
|
331
347
|
"height": "120px",
|
|
332
348
|
"fit": "cover",
|
|
333
|
-
"
|
|
349
|
+
"cornerRadius": "sm"
|
|
334
350
|
},
|
|
335
351
|
{
|
|
336
352
|
"id": "ftr",
|
|
@@ -21,10 +21,11 @@
|
|
|
21
21
|
"$ref": "common_types.json#/$defs/DynamicString"
|
|
22
22
|
},
|
|
23
23
|
"live": {
|
|
24
|
-
"description": "Sets `aria-live` on the host for dynamic message updates.
|
|
24
|
+
"description": "Sets `aria-live` on the host for dynamic message updates. `off` = no live region (static annotation) — the A2UI v1.0 vocabulary (off | polite | assertive, SPEC REQ-013); empty string is the legacy alias for `off`, kept for existing consumers.",
|
|
25
25
|
"type": "string",
|
|
26
26
|
"enum": [
|
|
27
27
|
"",
|
|
28
|
+
"off",
|
|
28
29
|
"polite",
|
|
29
30
|
"assertive"
|
|
30
31
|
],
|
|
@@ -82,6 +83,7 @@
|
|
|
82
83
|
"notice"
|
|
83
84
|
],
|
|
84
85
|
"name": "UIInlineMessage",
|
|
86
|
+
"parts": {},
|
|
85
87
|
"related": [
|
|
86
88
|
"alert",
|
|
87
89
|
"field",
|
|
@@ -76,7 +76,9 @@ export class UIInlineMessage extends UIElement {
|
|
|
76
76
|
|
|
77
77
|
render() {
|
|
78
78
|
// ── aria-live wiring ──
|
|
79
|
-
// [live=""] → strip aria-live. [live=polite|assertive] → reflect
|
|
79
|
+
// [live=""] → strip aria-live. [live=off|polite|assertive] → reflect
|
|
80
|
+
// (aria-live="off" is the A2UI v1.0 canonical "not a live region",
|
|
81
|
+
// SPEC REQ-013 — same semantics as the stripped legacy "" alias).
|
|
80
82
|
if (this.live) {
|
|
81
83
|
this.setAttribute('aria-live', this.live);
|
|
82
84
|
} else if (this.hasAttribute('aria-live')) {
|
|
@@ -22,8 +22,8 @@ import { UIElement } from '../../core/element.js';
|
|
|
22
22
|
export class UIInlineMessage extends UIElement {
|
|
23
23
|
/** Phosphor glyph override; each [variant] ships a sensible default (info / check-circle / warning / x-circle). */
|
|
24
24
|
icon: string;
|
|
25
|
-
/** Sets `aria-live` on the host for dynamic message updates.
|
|
26
|
-
live: '' | 'polite' | 'assertive';
|
|
25
|
+
/** Sets `aria-live` on the host for dynamic message updates. `off` = no live region (static annotation) — the A2UI v1.0 vocabulary (off | polite | assertive, SPEC REQ-013); empty string is the legacy alias for `off`, kept for existing consumers. */
|
|
26
|
+
live: '' | 'off' | 'polite' | 'assertive';
|
|
27
27
|
/** Single-line message text. Default-slot content wins when present. */
|
|
28
28
|
text: string;
|
|
29
29
|
/** Semantic severity tone — drives icon + foreground color. Default carries no leading icon (pure hint copy). */
|
|
@@ -44,12 +44,13 @@ props:
|
|
|
44
44
|
default: ""
|
|
45
45
|
dynamic: true
|
|
46
46
|
live:
|
|
47
|
-
description: Sets `aria-live` on the host for dynamic message updates.
|
|
47
|
+
description: Sets `aria-live` on the host for dynamic message updates. `off` = no live region (static annotation) — the A2UI v1.0 vocabulary (off | polite | assertive, SPEC REQ-013); empty string is the legacy alias for `off`, kept for existing consumers.
|
|
48
48
|
type: string
|
|
49
49
|
default: ""
|
|
50
50
|
reflect: true
|
|
51
51
|
enum:
|
|
52
52
|
- ""
|
|
53
|
+
- off
|
|
53
54
|
- polite
|
|
54
55
|
- assertive
|
|
55
56
|
events: {}
|