@adia-ai/web-components 0.8.40 → 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 +50 -3
- package/MIGRATION.md +1042 -16
- 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-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.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.yaml +6 -2
- package/components/alert/alert.a2ui.json +1 -0
- package/components/alert/alert.css +1 -1
- 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.d.ts +1 -1
- package/components/avatar/avatar.yaml +4 -4
- package/components/badge/badge.a2ui.json +1 -0
- 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.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 +120 -171
- 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 +31 -1
- 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 +9 -4
- package/components/chart/chart.class.js +6 -6
- package/components/chart/chart.css +6 -4
- package/components/chart/chart.d.ts +1 -1
- package/components/chart/chart.yaml +5 -3
- 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.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/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.yaml +2 -2
- package/components/command/command.a2ui.json +12 -10
- package/components/command/command.class.js +3 -2
- 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.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/display-field/display-field.a2ui.json +1 -0
- package/components/divider/divider.a2ui.json +1 -0
- package/components/drawer/drawer.a2ui.json +1 -3
- package/components/drawer/drawer.css +1 -1
- 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 +6 -6
- 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/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.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 +4 -4
- 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.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 +14 -14
- 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/kbd/kbd.a2ui.json +1 -0
- 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 +12 -1
- 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-group/nav-group.a2ui.json +1 -0
- package/components/nav-group/nav-group.class.js +3 -1
- package/components/nav-item/nav-item.a2ui.json +1 -0
- 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/otp-input/otp-input.a2ui.json +3 -2
- package/components/otp-input/otp-input.yaml +9 -2
- package/components/page/page.a2ui.json +13 -0
- 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/pane/pane.a2ui.json +6 -0
- package/components/pane/pane.class.js +3 -3
- package/components/pane/pane.css +2 -2
- 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.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 +3 -2
- package/components/qr-code/qr-code.class.js +4 -4
- package/components/qr-code/qr-code.css +1 -1
- package/components/qr-code/qr-code.yaml +5 -3
- 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 +2 -2
- package/components/range/range.yaml +3 -0
- package/components/rating/rating.a2ui.json +1 -0
- package/components/relative-time/relative-time.a2ui.json +1 -0
- package/components/richtext/richtext.a2ui.json +2 -1
- 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 +15 -0
- 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 +15 -13
- 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/stack/stack.a2ui.json +1 -0
- package/components/stat/stat.a2ui.json +1 -0
- package/components/stat/stat.js +2 -2
- package/components/step-progress/step-progress.a2ui.json +1 -0
- 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.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/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 -0
- package/components/table/table.class.js +14 -12
- package/components/table/table.css +11 -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 +1 -1
- 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 +8 -0
- 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/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 +10 -6
- 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.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/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.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/toggle-group/toggle-group.a2ui.json +7 -3
- package/components/toggle-group/toggle-group.class.js +40 -1
- package/components/toggle-group/toggle-group.css +6 -1
- package/components/toggle-group/toggle-group.d.ts +2 -2
- package/components/toggle-group/toggle-group.yaml +21 -12
- package/components/toggle-group/toggle-option.a2ui.json +7 -3
- package/components/toggle-group/toggle-option.yaml +13 -7
- 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/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.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.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 +437 -489
- 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/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
|
@@ -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: {}
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
],
|
|
15
15
|
"properties": {
|
|
16
16
|
"type": {
|
|
17
|
-
"description": "Input type. `password` wraps a native `<input>` for disc masking; `number` renders a contenteditable + stepper buttons (no native input).
|
|
17
|
+
"description": "Input type. `password` wraps a native `<input>` for disc masking; `number` renders a contenteditable + stepper buttons (no native input). `text`/`email`/`tel`/`url` use plain contenteditable. input-ui does NOT implement date/time/color/search affordances — those HTML5 type values render as a plain contenteditable with no calendar, clock, swatch, or search affordance (first-pass-VALID against this enum historically, but functionally broken generation output). Use the owning primitive instead — CalendarPicker for date (+ month/week, no dedicated granularity primitive exists), DatetimePicker for datetime-local, TimePicker for time, ColorInput/ColorPicker for color, Search for search. See anti_patterns.",
|
|
18
18
|
"type": "string",
|
|
19
19
|
"enum": [
|
|
20
20
|
"text",
|
|
@@ -22,14 +22,7 @@
|
|
|
22
22
|
"password",
|
|
23
23
|
"number",
|
|
24
24
|
"tel",
|
|
25
|
-
"url"
|
|
26
|
-
"search",
|
|
27
|
-
"date",
|
|
28
|
-
"datetime-local",
|
|
29
|
-
"time",
|
|
30
|
-
"month",
|
|
31
|
-
"week",
|
|
32
|
-
"color"
|
|
25
|
+
"url"
|
|
33
26
|
],
|
|
34
27
|
"default": "text"
|
|
35
28
|
},
|
|
@@ -71,22 +64,34 @@
|
|
|
71
64
|
},
|
|
72
65
|
"max": {
|
|
73
66
|
"description": "Maximum numeric value. Applies when `type=\"number\"`. Clamps + drives aria-valuemax + the [+] button's disabled state.",
|
|
74
|
-
"type":
|
|
67
|
+
"type": [
|
|
68
|
+
"number",
|
|
69
|
+
"null"
|
|
70
|
+
],
|
|
75
71
|
"default": null
|
|
76
72
|
},
|
|
77
73
|
"maxlength": {
|
|
78
74
|
"description": "Maximum character length for validation",
|
|
79
|
-
"type":
|
|
75
|
+
"type": [
|
|
76
|
+
"number",
|
|
77
|
+
"null"
|
|
78
|
+
],
|
|
80
79
|
"default": null
|
|
81
80
|
},
|
|
82
81
|
"min": {
|
|
83
82
|
"description": "Minimum numeric value. Applies when `type=\"number\"`. Clamps + drives aria-valuemin + the [-] button's disabled state.",
|
|
84
|
-
"type":
|
|
83
|
+
"type": [
|
|
84
|
+
"number",
|
|
85
|
+
"null"
|
|
86
|
+
],
|
|
85
87
|
"default": null
|
|
86
88
|
},
|
|
87
89
|
"minlength": {
|
|
88
90
|
"description": "Minimum character length for validation",
|
|
89
|
-
"type":
|
|
91
|
+
"type": [
|
|
92
|
+
"number",
|
|
93
|
+
"null"
|
|
94
|
+
],
|
|
90
95
|
"default": null
|
|
91
96
|
},
|
|
92
97
|
"name": {
|
|
@@ -106,7 +111,10 @@
|
|
|
106
111
|
},
|
|
107
112
|
"precision": {
|
|
108
113
|
"description": "Decimal places to display + clamp to, when `type=\"number\"`. Overrides the implicit decimal-count from `step` — e.g. `step=1 precision=2` formats \"10.00\".",
|
|
109
|
-
"type":
|
|
114
|
+
"type": [
|
|
115
|
+
"number",
|
|
116
|
+
"null"
|
|
117
|
+
],
|
|
110
118
|
"default": null
|
|
111
119
|
},
|
|
112
120
|
"prefix": {
|
|
@@ -150,7 +158,43 @@
|
|
|
150
158
|
],
|
|
151
159
|
"unevaluatedProperties": false,
|
|
152
160
|
"x-adiaui": {
|
|
153
|
-
"anti_patterns": [
|
|
161
|
+
"anti_patterns": [
|
|
162
|
+
{
|
|
163
|
+
"fix": "{\"component\": \"CalendarPicker\"}\n",
|
|
164
|
+
"why": "input-ui's `type` enum no longer includes \"date\" (gh#1363\nB10) — it never rendered a native date picker, just a plain\ncontenteditable surface with no calendar affordance. Use\nCalendarPicker for single-date input.\n",
|
|
165
|
+
"wrong": "{\"component\": \"Input\", \"type\": \"date\"}\n"
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"fix": "{\"component\": \"DatetimePicker\"}\n",
|
|
169
|
+
"why": "Same gap as \"date\" — no native datetime picker rendered. Use\nDatetimePicker for combined date + time input.\n",
|
|
170
|
+
"wrong": "{\"component\": \"Input\", \"type\": \"datetime-local\"}\n"
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"fix": "{\"component\": \"TimePicker\"}\n",
|
|
174
|
+
"why": "Same gap as \"date\" — no native time picker rendered. Use\nTimePicker for time-of-day input.\n",
|
|
175
|
+
"wrong": "{\"component\": \"Input\", \"type\": \"time\"}\n"
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"fix": "{\"component\": \"CalendarPicker\"}\n",
|
|
179
|
+
"why": "No native month picker rendered, and no dedicated month-granularity\nprimitive exists in the catalog. CalendarPicker (day granularity)\nis the closest routed primitive.\n",
|
|
180
|
+
"wrong": "{\"component\": \"Input\", \"type\": \"month\"}\n"
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
"fix": "{\"component\": \"CalendarPicker\"}\n",
|
|
184
|
+
"why": "No native week picker rendered, and no dedicated week-granularity\nprimitive exists in the catalog. CalendarPicker (day granularity)\nis the closest routed primitive.\n",
|
|
185
|
+
"wrong": "{\"component\": \"Input\", \"type\": \"week\"}\n"
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"fix": "{\"component\": \"ColorInput\"}\n",
|
|
189
|
+
"why": "No native color swatch/picker rendered — just a plain text\nsurface. Use ColorInput for a compact form-bearing swatch +\npopover, or ColorPicker directly for the full OKLCH picker\nsurface.\n",
|
|
190
|
+
"wrong": "{\"component\": \"Input\", \"type\": \"color\"}\n"
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"fix": "{\"component\": \"Search\"}\n",
|
|
194
|
+
"why": "No search icon or clear affordance rendered — plain\ncontenteditable, functionally identical to the default text\ntype. Use Search for the dedicated magnifying-glass + clear +\ndebounced-search-event primitive.\n",
|
|
195
|
+
"wrong": "{\"component\": \"Input\", \"type\": \"search\"}\n"
|
|
196
|
+
}
|
|
197
|
+
],
|
|
154
198
|
"category": "input",
|
|
155
199
|
"composes": [
|
|
156
200
|
"button-ui",
|
|
@@ -211,12 +255,18 @@
|
|
|
211
255
|
"tag"
|
|
212
256
|
],
|
|
213
257
|
"name": "UIInput",
|
|
258
|
+
"parts": {},
|
|
214
259
|
"related": [
|
|
215
260
|
"avatar",
|
|
216
261
|
"button",
|
|
217
262
|
"table",
|
|
218
263
|
"pagination",
|
|
219
|
-
"check-box"
|
|
264
|
+
"check-box",
|
|
265
|
+
"search",
|
|
266
|
+
"calendar-picker",
|
|
267
|
+
"datetime-picker",
|
|
268
|
+
"time-picker",
|
|
269
|
+
"color-input"
|
|
220
270
|
],
|
|
221
271
|
"slots": {
|
|
222
272
|
"leading": {
|