@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
|
@@ -4,26 +4,30 @@
|
|
|
4
4
|
# ADR-0056 (gh#1303): <toggle-option-ui>'s current-state surface converges
|
|
5
5
|
# onto <segment-ui>'s declared, reflected `[selected]` prop (see
|
|
6
6
|
# toggle-option.yaml). This container sets that prop, keeping `value` as the
|
|
7
|
-
# single source of truth.
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
7
|
+
# single source of truth.
|
|
8
|
+
#
|
|
9
|
+
# DEPRECATED (gh#1369, #1363 C1, ADR-0057): superseded by
|
|
10
|
+
# <segmented-ui multiple> + <segment-ui> — same comma-separated value
|
|
11
|
+
# encoding, same corpus/catalog presence. Kept working as-is (no behavior
|
|
12
|
+
# change, one-time console.warn on connect); status: deprecated per the
|
|
13
|
+
# yaml deprecation contract rather than a literal JS-level delegation —
|
|
14
|
+
# see PR body "Rejected alternatives" for why.
|
|
11
15
|
$schema: ../../../../scripts/schemas/component.yaml.schema.json
|
|
12
16
|
name: UIToggleGroup
|
|
13
17
|
tag: toggle-group-ui
|
|
14
|
-
status:
|
|
18
|
+
status: deprecated
|
|
15
19
|
component: ToggleGroup
|
|
16
20
|
category: navigation
|
|
17
21
|
version: 1
|
|
18
22
|
description: >-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
DEPRECATED (gh#1369) — use <segmented-ui multiple> + <segment-ui>
|
|
24
|
+
instead. Multi-select button group (unlike <segmented-ui> which is
|
|
25
|
+
single-select by default). Hosts <toggle-option-ui> children, each
|
|
26
|
+
independently toggleable; emits change events with the active value
|
|
27
|
+
set.
|
|
24
28
|
props:
|
|
25
29
|
single:
|
|
26
|
-
description: When true, restrict to one active option (single-select).
|
|
30
|
+
description: "When true, restrict to one active option (single-select) — clicking the already-selected option again CLEARS it (empty value), unlike a native radiogroup. Migration (gh#1369): [single]=true maps to plain <segmented-ui> (no [multiple]) — note segmented-ui's single-select never clears on re-click, it's standard radiogroup semantics; the default (false, multi-select) maps to <segmented-ui multiple>."
|
|
27
31
|
type: boolean
|
|
28
32
|
default: false
|
|
29
33
|
reflect: false # declarative presentational attribute — CSS/author-time read, non-reactive by design
|
|
@@ -81,15 +85,17 @@ tokens:
|
|
|
81
85
|
--toggle-option-selected-fg:
|
|
82
86
|
description: Text color when selected
|
|
83
87
|
a2ui:
|
|
88
|
+
allowedChildren:
|
|
89
|
+
- ToggleOption
|
|
84
90
|
rules:
|
|
91
|
+
- rule: 'DEPRECATED (gh#1369, #1363 C1) — generate <segmented-ui multiple> + <segment-ui> children instead when [single] is false/absent (the default, multi-select). When [single] is true, generate plain <segmented-ui> (no [multiple]) instead — single-select toggle-group maps to segmented''s own single-select mode, not the multiple axis; note segmented-ui single-select never clears on re-click (toggle-group[single] does). Same comma-separated value encoding either way; toggle-group is kept working for existing consumers but should not appear in new generated output.'
|
|
92
|
+
reason: 'Deprecation redirect — this is the primary rule for this component now.'
|
|
85
93
|
- rule: 'Multi-select button cluster — hosts <toggle-option-ui> children, each independently toggleable.'
|
|
86
|
-
reason: 'Multi-select cluster contract.'
|
|
87
|
-
- rule: 'Different from <segmented-ui> (single-select) — toggle-group emits a SET of active values.'
|
|
88
|
-
reason: 'Selection model distinction.'
|
|
94
|
+
reason: 'Multi-select cluster contract (legacy).'
|
|
89
95
|
- rule: 'Use for filter chips, multi-flag toggles, day-of-week pickers; for binary on/off use <switch-ui>.'
|
|
90
|
-
reason: 'Capacity guidance.'
|
|
96
|
+
reason: 'Capacity guidance (legacy).'
|
|
91
97
|
- rule: 'Sets the child <toggle-option-ui>''s declared [selected] prop to reflect the group value (ADR-0056) — do not author [selected] directly in generated markup; author the group''s value instead.'
|
|
92
|
-
reason: 'Parent-managed declared state — group value stays the single source of truth.'
|
|
98
|
+
reason: 'Parent-managed declared state — group value stays the single source of truth (legacy).'
|
|
93
99
|
anti_patterns: []
|
|
94
100
|
examples:
|
|
95
101
|
- name: basic-toggle-group
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://adiaui.dev/a2ui/v0_9/components/ToggleOption.json",
|
|
4
4
|
"title": "ToggleOption",
|
|
5
|
-
"description": "Child of `<toggle-group-ui>`. One toggleable option inside a single-select or multi-select group. Pressed state mirrors `value` against the parent's selection.",
|
|
5
|
+
"description": "DEPRECATED (gh#1369) — use `<segment-ui>` inside `<segmented-ui multiple>` instead. Child of `<toggle-group-ui>`. One toggleable option inside a single-select or multi-select group. Pressed state mirrors `value` against the parent's selection.",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"allOf": [
|
|
8
8
|
{
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"default": ""
|
|
28
28
|
},
|
|
29
29
|
"selected": {
|
|
30
|
-
"description": "Whether this option is currently selected. Managed by the parent\n<toggle-group-ui> container (ADR-0056) — don't set directly; the group's\n`value` is the single source of truth. Converges onto <segment-ui>'s\ndeclared reflected-prop mechanism
|
|
30
|
+
"description": "Whether this option is currently selected. Managed by the parent\n<toggle-group-ui> container (ADR-0056) — don't set directly; the group's\n`value` is the single source of truth. Converges onto <segment-ui>'s\ndeclared reflected-prop mechanism.",
|
|
31
31
|
"type": "boolean",
|
|
32
32
|
"default": false
|
|
33
33
|
},
|
|
@@ -47,8 +47,11 @@
|
|
|
47
47
|
],
|
|
48
48
|
"unevaluatedProperties": false,
|
|
49
49
|
"x-adiaui": {
|
|
50
|
+
"allowedParents": [
|
|
51
|
+
"ToggleGroup"
|
|
52
|
+
],
|
|
50
53
|
"anti_patterns": [],
|
|
51
|
-
"category": "
|
|
54
|
+
"category": "form",
|
|
52
55
|
"composes": [],
|
|
53
56
|
"events": {},
|
|
54
57
|
"examples": [],
|
|
@@ -59,6 +62,7 @@
|
|
|
59
62
|
"segmented-option"
|
|
60
63
|
],
|
|
61
64
|
"name": "UIToggleOption",
|
|
65
|
+
"parts": {},
|
|
62
66
|
"related": [
|
|
63
67
|
"ToggleGroup",
|
|
64
68
|
"Segment",
|
|
@@ -66,7 +70,7 @@
|
|
|
66
70
|
],
|
|
67
71
|
"slots": {},
|
|
68
72
|
"states": [],
|
|
69
|
-
"status": "
|
|
73
|
+
"status": "deprecated",
|
|
70
74
|
"synonyms": {
|
|
71
75
|
"toggle-option": [
|
|
72
76
|
"toggle-segment",
|
|
@@ -5,21 +5,22 @@
|
|
|
5
5
|
# + is registered alongside UIToggleGroup.
|
|
6
6
|
#
|
|
7
7
|
# ADR-0056 (gh#1303): `selected` converges onto <segment-ui>'s declared,
|
|
8
|
-
# parent-managed, reflected-prop convention.
|
|
9
|
-
#
|
|
10
|
-
#
|
|
11
|
-
#
|
|
8
|
+
# parent-managed, reflected-prop convention.
|
|
9
|
+
#
|
|
10
|
+
# DEPRECATED (gh#1369, #1363 C1, ADR-0057): superseded by <segment-ui>
|
|
11
|
+
# (used as a child of <segmented-ui multiple>). Kept working as-is; see
|
|
12
|
+
# toggle-group.yaml's header for the deprecation rationale.
|
|
12
13
|
|
|
13
14
|
# Child component of <toggle-group-ui>. Surface only inside that parent.
|
|
14
15
|
$schema: ../../../../scripts/schemas/component.yaml.schema.json
|
|
15
16
|
name: UIToggleOption
|
|
16
17
|
tag: toggle-option-ui
|
|
17
|
-
status:
|
|
18
|
+
status: deprecated
|
|
18
19
|
component: ToggleOption
|
|
19
|
-
category:
|
|
20
|
+
category: form
|
|
20
21
|
version: 1
|
|
21
22
|
description: |-
|
|
22
|
-
Child of `<toggle-group-ui>`. One toggleable option inside a single-select or multi-select group. Pressed state mirrors `value` against the parent's selection.
|
|
23
|
+
DEPRECATED (gh#1369) — use `<segment-ui>` inside `<segmented-ui multiple>` instead. Child of `<toggle-group-ui>`. One toggleable option inside a single-select or multi-select group. Pressed state mirrors `value` against the parent's selection.
|
|
23
24
|
|
|
24
25
|
props:
|
|
25
26
|
value:
|
|
@@ -43,8 +44,7 @@ props:
|
|
|
43
44
|
Whether this option is currently selected. Managed by the parent
|
|
44
45
|
<toggle-group-ui> container (ADR-0056) — don't set directly; the group's
|
|
45
46
|
`value` is the single source of truth. Converges onto <segment-ui>'s
|
|
46
|
-
declared reflected-prop mechanism
|
|
47
|
-
`data-selected` stamp with no declared API surface).
|
|
47
|
+
declared reflected-prop mechanism.
|
|
48
48
|
type: boolean
|
|
49
49
|
default: false
|
|
50
50
|
reflect: true
|
|
@@ -64,10 +64,12 @@ related:
|
|
|
64
64
|
- Radio
|
|
65
65
|
|
|
66
66
|
a2ui:
|
|
67
|
+
allowedParents:
|
|
68
|
+
- ToggleGroup
|
|
67
69
|
rules:
|
|
70
|
+
- rule: 'DEPRECATED (gh#1369, #1363 C1) — generate <segment-ui> instead, as a child of <segmented-ui multiple> (or plain <segmented-ui>, no [multiple], if the parent toggle-group had [single] — see toggle-group.yaml). toggle-option is kept working for existing consumers but should not appear in new generated output.'
|
|
71
|
+
reason: 'Deprecation redirect — this is the primary rule for this component now.'
|
|
68
72
|
- rule: 'Child of <toggle-group-ui> — one independently-toggleable button in a multi-select cluster.'
|
|
69
|
-
reason: 'Multi-select cluster contract.'
|
|
70
|
-
- rule: 'Different from <segment-ui> (which is single-select inside <segmented-ui>).'
|
|
71
|
-
reason: 'Selection model boundary.'
|
|
73
|
+
reason: 'Multi-select cluster contract (legacy).'
|
|
72
74
|
- rule: 'Selected state exposed via its own declared [selected] reflected prop, set by the parent <toggle-group-ui> (ADR-0056) — mirrors <segment-ui>''s convention. Do not set [selected] directly; drive the group''s value instead.'
|
|
73
|
-
reason: 'Parent-managed declared state — group value stays the single source of truth.'
|
|
75
|
+
reason: 'Parent-managed declared state — group value stays the single source of truth (legacy).'
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
"unevaluatedProperties": false,
|
|
122
122
|
"x-adiaui": {
|
|
123
123
|
"anti_patterns": [],
|
|
124
|
-
"category": "
|
|
124
|
+
"category": "action",
|
|
125
125
|
"composes": [
|
|
126
126
|
"button-ui"
|
|
127
127
|
],
|
|
@@ -158,6 +158,7 @@
|
|
|
158
158
|
"sun"
|
|
159
159
|
],
|
|
160
160
|
"name": "UIToggleScheme",
|
|
161
|
+
"parts": {},
|
|
161
162
|
"related": [
|
|
162
163
|
"Button",
|
|
163
164
|
"Switch"
|
|
@@ -263,6 +263,9 @@ export class UIToolbar extends UIElement {
|
|
|
263
263
|
|
|
264
264
|
#queueReflow() {
|
|
265
265
|
if (this.#reflowQueued) return;
|
|
266
|
+
// No rAF (SSR shim — gh#1436's render sweep) → no layout to measure
|
|
267
|
+
// overflow against; every item stays inline and the client reflows.
|
|
268
|
+
if (typeof requestAnimationFrame !== 'function') return;
|
|
266
269
|
this.#reflowQueued = true;
|
|
267
270
|
this.#reflowRaf = requestAnimationFrame(() => {
|
|
268
271
|
this.#reflowRaf = null;
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
color: var(--md-sys-color-neutral-background);
|
|
31
31
|
font-family: var(--a-font-family);
|
|
32
32
|
font-size: var(--a-ui-sm);
|
|
33
|
-
line-height:
|
|
33
|
+
line-height: var(--a-font-leading-normal);
|
|
34
34
|
border: none;
|
|
35
35
|
border-radius: var(--a-radius-full);
|
|
36
36
|
box-shadow: var(--a-shadow-sm);
|
|
@@ -51,6 +51,9 @@
|
|
|
51
51
|
],
|
|
52
52
|
"unevaluatedProperties": false,
|
|
53
53
|
"x-adiaui": {
|
|
54
|
+
"allowedParents": [
|
|
55
|
+
"Tour"
|
|
56
|
+
],
|
|
54
57
|
"anti_patterns": [
|
|
55
58
|
{
|
|
56
59
|
"fix": "<tour-step target=\"#dashboard\">",
|
|
@@ -68,6 +71,7 @@
|
|
|
68
71
|
"guided-step"
|
|
69
72
|
],
|
|
70
73
|
"name": "UITourStep",
|
|
74
|
+
"parts": {},
|
|
71
75
|
"related": [
|
|
72
76
|
"tour"
|
|
73
77
|
],
|
|
@@ -42,6 +42,9 @@
|
|
|
42
42
|
],
|
|
43
43
|
"unevaluatedProperties": false,
|
|
44
44
|
"x-adiaui": {
|
|
45
|
+
"allowedChildren": [
|
|
46
|
+
"TourStep"
|
|
47
|
+
],
|
|
45
48
|
"anti_patterns": [
|
|
46
49
|
{
|
|
47
50
|
"fix": "<tour-ui><tour-step target=\"#dashboard\" title=\"Dashboard\">Tour the dashboard…</tour-step>…</tour-ui>",
|
|
@@ -90,6 +93,7 @@
|
|
|
90
93
|
"feature-introduction"
|
|
91
94
|
],
|
|
92
95
|
"name": "UITour",
|
|
96
|
+
"parts": {},
|
|
93
97
|
"related": [
|
|
94
98
|
"tooltip",
|
|
95
99
|
"popover",
|
package/components/tour/tour.css
CHANGED
|
@@ -112,14 +112,14 @@
|
|
|
112
112
|
[data-tour-popover] [data-tour-title] {
|
|
113
113
|
margin: 0;
|
|
114
114
|
font-size: var(--a-text-lg);
|
|
115
|
-
font-weight:
|
|
115
|
+
font-weight: var(--a-weight-semibold);
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
[data-tour-popover] [data-tour-body] {
|
|
119
119
|
margin: 0 0 var(--a-space-4);
|
|
120
120
|
font-size: var(--a-ui-size);
|
|
121
121
|
color: var(--md-sys-color-neutral-on-surface);
|
|
122
|
-
line-height:
|
|
122
|
+
line-height: var(--a-font-leading-relaxed);
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
[data-tour-popover] [data-tour-footer] {
|
|
@@ -110,6 +110,8 @@ tokens:
|
|
|
110
110
|
description: Maximum width of the popover.
|
|
111
111
|
default: 22rem
|
|
112
112
|
a2ui:
|
|
113
|
+
allowedChildren:
|
|
114
|
+
- TourStep
|
|
113
115
|
rules:
|
|
114
116
|
- rule: 'Use tour-ui for spotlight-driven product tours / walkthroughs — sequence of steps each targeting a CSS-selector-resolved element.'
|
|
115
117
|
reason: 'Primary use case — guided feature introduction.'
|
|
@@ -46,6 +46,10 @@
|
|
|
46
46
|
],
|
|
47
47
|
"unevaluatedProperties": false,
|
|
48
48
|
"x-adiaui": {
|
|
49
|
+
"allowedParents": [
|
|
50
|
+
"Tree",
|
|
51
|
+
"TreeItem"
|
|
52
|
+
],
|
|
49
53
|
"anti_patterns": [],
|
|
50
54
|
"category": "data",
|
|
51
55
|
"composes": [],
|
|
@@ -58,6 +62,7 @@
|
|
|
58
62
|
"hierarchy-item"
|
|
59
63
|
],
|
|
60
64
|
"name": "UITreeItem",
|
|
65
|
+
"parts": {},
|
|
61
66
|
"related": [
|
|
62
67
|
"Tree",
|
|
63
68
|
"List",
|
|
@@ -22,6 +22,9 @@
|
|
|
22
22
|
],
|
|
23
23
|
"unevaluatedProperties": false,
|
|
24
24
|
"x-adiaui": {
|
|
25
|
+
"allowedChildren": [
|
|
26
|
+
"TreeItem"
|
|
27
|
+
],
|
|
25
28
|
"anti_patterns": [],
|
|
26
29
|
"category": "data",
|
|
27
30
|
"composes": [
|
|
@@ -70,6 +73,7 @@
|
|
|
70
73
|
"folder"
|
|
71
74
|
],
|
|
72
75
|
"name": "UITree",
|
|
76
|
+
"parts": {},
|
|
73
77
|
"related": [
|
|
74
78
|
"TreeItem",
|
|
75
79
|
"Nav",
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
*/
|
|
34
34
|
|
|
35
35
|
import { UIElement } from '../../core/element.js';
|
|
36
|
+
import { isElement } from '../../core/dom.js';
|
|
36
37
|
|
|
37
38
|
export class UITree extends UIElement {
|
|
38
39
|
// §154 (v0.5.3): Phosphor icons this primitive auto-stamps (without
|
|
@@ -91,7 +92,7 @@ export class UITree extends UIElement {
|
|
|
91
92
|
*/
|
|
92
93
|
#resolveItem(arg) {
|
|
93
94
|
if (!arg) return null;
|
|
94
|
-
if (arg
|
|
95
|
+
if (isElement(arg)) {
|
|
95
96
|
return arg.matches?.('tree-item-ui') ? arg : null;
|
|
96
97
|
}
|
|
97
98
|
if (typeof arg === 'string') {
|
package/components/tree/tree.css
CHANGED
|
@@ -141,7 +141,7 @@
|
|
|
141
141
|
background: var(--tree-badge-bg, transparent);
|
|
142
142
|
padding: 0 var(--tree-badge-px, var(--a-space-1));
|
|
143
143
|
border-radius: var(--tree-badge-radius, var(--a-radius-sm));
|
|
144
|
-
line-height:
|
|
144
|
+
line-height: var(--a-font-leading-none);
|
|
145
145
|
font-variant-numeric: tabular-nums;
|
|
146
146
|
}
|
|
147
147
|
[slot="badge"]:empty {
|
|
@@ -23,6 +23,11 @@
|
|
|
23
23
|
"type": "string",
|
|
24
24
|
"default": ""
|
|
25
25
|
},
|
|
26
|
+
"compact": {
|
|
27
|
+
"description": "Icon-only trigger mode (sanctioned mode attribute, gh#1493) — collapses the dropzone to a compact icon button. The prompt text and visible label hide; [label] feeds the trigger's aria-label (\"Upload files\" when unset).",
|
|
28
|
+
"type": "boolean",
|
|
29
|
+
"default": false
|
|
30
|
+
},
|
|
26
31
|
"component": {
|
|
27
32
|
"const": "Upload"
|
|
28
33
|
},
|
|
@@ -90,9 +95,11 @@
|
|
|
90
95
|
"import",
|
|
91
96
|
"transfer",
|
|
92
97
|
"file-manager",
|
|
93
|
-
"files"
|
|
98
|
+
"files",
|
|
99
|
+
"compact"
|
|
94
100
|
],
|
|
95
101
|
"name": "UIUpload",
|
|
102
|
+
"parts": {},
|
|
96
103
|
"related": [
|
|
97
104
|
"progress",
|
|
98
105
|
"button",
|
|
@@ -21,11 +21,20 @@ import { UIFormElement } from '../../core/form.js';
|
|
|
21
21
|
|
|
22
22
|
export class UIUpload extends UIFormElement {
|
|
23
23
|
static labelDeprecated = false; // §170 (v0.5.4): label is first-class per upload.yaml
|
|
24
|
+
// Phosphor icons this primitive auto-stamps (without consumer markup).
|
|
25
|
+
// Aggregated by installIconLoadersForRegistered() across all defined
|
|
26
|
+
// elements. Audited by check-required-icons.mjs.
|
|
27
|
+
static requiredIcons = ['upload-simple'];
|
|
28
|
+
|
|
24
29
|
static properties = {
|
|
25
30
|
...UIFormElement.properties,
|
|
26
31
|
label: { type: String, default: '', reflect: true },
|
|
27
32
|
accept: { type: String, default: '', reflect: true },
|
|
28
33
|
multiple: { type: Boolean, default: false, reflect: true },
|
|
34
|
+
/* gh#1493 — sanctioned mode attribute (component-token-contract.md
|
|
35
|
+
§ Variants vs modes): icon-only trigger. Collapses the dropzone to a
|
|
36
|
+
compact icon button; [label] feeds the trigger's aria-label. */
|
|
37
|
+
compact: { type: Boolean, default: false, reflect: true },
|
|
29
38
|
};
|
|
30
39
|
|
|
31
40
|
static template = () => null;
|
|
@@ -38,7 +47,7 @@ export class UIUpload extends UIFormElement {
|
|
|
38
47
|
|
|
39
48
|
if (!this.querySelector('[data-dropzone]')) {
|
|
40
49
|
this.innerHTML = `
|
|
41
|
-
<div data-dropzone tabindex="0" role="button">Drop files here or click to browse</div>
|
|
50
|
+
<div data-dropzone tabindex="0" role="button"><icon-ui data-upload-icon name="upload-simple"></icon-ui><span data-upload-text>Drop files here or click to browse</span></div>
|
|
42
51
|
<span hint="${this.hint || ''}"></span>
|
|
43
52
|
<div data-filelist></div>
|
|
44
53
|
`;
|
|
@@ -58,6 +67,15 @@ export class UIUpload extends UIFormElement {
|
|
|
58
67
|
const filelist = this.querySelector('[data-filelist]');
|
|
59
68
|
if (!this.#dropzoneEl || !filelist) return;
|
|
60
69
|
|
|
70
|
+
// Compact trigger a11y (gh#1493) — the icon-only surface has no visible
|
|
71
|
+
// text, so it needs an accessible name. [label] feeds it; the visible
|
|
72
|
+
// ::before label is CSS-hidden in [compact], so this is a move, not a dupe.
|
|
73
|
+
if (this.compact) {
|
|
74
|
+
this.#dropzoneEl.setAttribute('aria-label', this.label || 'Upload files');
|
|
75
|
+
} else {
|
|
76
|
+
this.#dropzoneEl.removeAttribute('aria-label');
|
|
77
|
+
}
|
|
78
|
+
|
|
61
79
|
// Update hint attribute
|
|
62
80
|
const hintEl = this.querySelector('span[hint]');
|
|
63
81
|
if (hintEl && this.hint) hintEl.setAttribute('hint', this.hint);
|
|
@@ -77,16 +95,28 @@ export class UIUpload extends UIFormElement {
|
|
|
77
95
|
|
|
78
96
|
// ── File picking ──
|
|
79
97
|
|
|
80
|
-
|
|
98
|
+
/**
|
|
99
|
+
* Programmatically open the file picker — the public trigger API
|
|
100
|
+
* (gh#1493). Equivalent to activating the dropzone, without reaching
|
|
101
|
+
* into the internal `[data-dropzone]` part. No-ops when [disabled].
|
|
102
|
+
* Note: browsers gate the native picker on transient user activation,
|
|
103
|
+
* so call this from within a user-gesture handler.
|
|
104
|
+
* @returns {Promise<void>} resolves after selection commits or the
|
|
105
|
+
* user cancels.
|
|
106
|
+
*/
|
|
107
|
+
async open() {
|
|
81
108
|
if (this.disabled) return;
|
|
82
|
-
this.#pickFiles();
|
|
109
|
+
await this.#pickFiles();
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
#onClickZone = () => {
|
|
113
|
+
this.open();
|
|
83
114
|
};
|
|
84
115
|
|
|
85
116
|
#onKeyZone = (e) => {
|
|
86
|
-
if (this.disabled) return;
|
|
87
117
|
if (e.key === 'Enter' || e.key === ' ') {
|
|
88
118
|
e.preventDefault();
|
|
89
|
-
this
|
|
119
|
+
this.open();
|
|
90
120
|
}
|
|
91
121
|
};
|
|
92
122
|
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
|
|
24
24
|
/* ── Spacing ── */
|
|
25
25
|
--upload-dropzone-pad: var(--a-space-6);
|
|
26
|
+
--upload-compact-pad: var(--a-space-2);
|
|
26
27
|
|
|
27
28
|
/* ── Transitions ── */
|
|
28
29
|
--upload-duration: var(--a-duration-fast);
|
|
@@ -82,6 +83,33 @@
|
|
|
82
83
|
background: var(--upload-bg-dragover);
|
|
83
84
|
}
|
|
84
85
|
|
|
86
|
+
/* Stamped leading icon — hidden in the default (text) dropzone; it IS
|
|
87
|
+
the surface in [compact] icon-only mode. */
|
|
88
|
+
[data-upload-icon] {
|
|
89
|
+
display: none;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/* ── Mode: [compact] — icon-only trigger (gh#1493) ──
|
|
93
|
+
Sanctioned mode attribute; see component-token-contract.md
|
|
94
|
+
§ Variants vs modes. Host shrink-wraps instead of filling the row,
|
|
95
|
+
the dropzone collapses to icon padding, the prompt text and ::before
|
|
96
|
+
label hide (label feeds the trigger's aria-label from class.js). */
|
|
97
|
+
:scope[compact] {
|
|
98
|
+
display: inline-flex;
|
|
99
|
+
}
|
|
100
|
+
:scope[compact]::before {
|
|
101
|
+
display: none;
|
|
102
|
+
}
|
|
103
|
+
:scope[compact] [data-dropzone] {
|
|
104
|
+
padding: var(--upload-compact-pad);
|
|
105
|
+
}
|
|
106
|
+
:scope[compact] [data-upload-icon] {
|
|
107
|
+
display: inline-flex;
|
|
108
|
+
}
|
|
109
|
+
:scope[compact] [data-upload-text] {
|
|
110
|
+
display: none;
|
|
111
|
+
}
|
|
112
|
+
|
|
85
113
|
/* Hint via ::after on span */
|
|
86
114
|
span[hint]::after {
|
|
87
115
|
content: attr(hint);
|
|
@@ -23,6 +23,22 @@ export class UIUpload extends UIFormElement {
|
|
|
23
23
|
accept: string;
|
|
24
24
|
/** §207 (v0.5.7): allow multi-file selection. */
|
|
25
25
|
multiple: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* gh#1493: icon-only compact trigger mode (sanctioned mode attribute).
|
|
28
|
+
* Collapses the dropzone to a compact icon button; `label` feeds the
|
|
29
|
+
* trigger's `aria-label` (`"Upload files"` when unset).
|
|
30
|
+
*/
|
|
31
|
+
compact: boolean;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* gh#1493: programmatically open the file picker — the public trigger
|
|
35
|
+
* API. Equivalent to activating the dropzone, without reaching into the
|
|
36
|
+
* internal `[data-dropzone]` part. No-ops when `disabled`. Browsers gate
|
|
37
|
+
* the native picker on transient user activation, so call from within a
|
|
38
|
+
* user-gesture handler. Resolves after selection commits or the user
|
|
39
|
+
* cancels.
|
|
40
|
+
*/
|
|
41
|
+
open(): Promise<void>;
|
|
26
42
|
|
|
27
43
|
addEventListener<K extends keyof HTMLElementEventMap>(
|
|
28
44
|
type: K,
|
|
@@ -40,6 +40,15 @@ props:
|
|
|
40
40
|
description: Allows selecting multiple files
|
|
41
41
|
type: boolean
|
|
42
42
|
default: false
|
|
43
|
+
compact:
|
|
44
|
+
description: >-
|
|
45
|
+
Icon-only trigger mode (sanctioned mode attribute, gh#1493) —
|
|
46
|
+
collapses the dropzone to a compact icon button. The prompt text and
|
|
47
|
+
visible label hide; [label] feeds the trigger's aria-label
|
|
48
|
+
("Upload files" when unset).
|
|
49
|
+
type: boolean
|
|
50
|
+
default: false
|
|
51
|
+
reflect: true
|
|
43
52
|
value:
|
|
44
53
|
description: Current value
|
|
45
54
|
type: string
|
|
@@ -48,13 +57,19 @@ events:
|
|
|
48
57
|
change:
|
|
49
58
|
description: Fired when files are selected via click or drag-and-drop
|
|
50
59
|
slots: {}
|
|
51
|
-
# Authoring note (2026-05-26): the previous
|
|
52
|
-
# dropzone/filelist/hint/input/label, but class.js
|
|
53
|
-
# `<div data-dropzone>` / `<div data-filelist>` /
|
|
54
|
-
#
|
|
55
|
-
#
|
|
56
|
-
#
|
|
57
|
-
#
|
|
60
|
+
# Authoring note (2026-05-26, refreshed 2026-08-17 gh#1493): the previous
|
|
61
|
+
# slots block declared dropzone/filelist/hint/input/label, but class.js
|
|
62
|
+
# stamps these as `<div data-dropzone>` / `<div data-filelist>` /
|
|
63
|
+
# `<span hint="…">` etc. — template-owned anatomy (ADR-0067 `parts:`
|
|
64
|
+
# semantics), NOT `[slot="X"]` insertion points. `<upload-ui><div
|
|
65
|
+
# slot="dropzone">…` wouldn't render (innerHTML stamp wipes child). They
|
|
66
|
+
# stay undeclared here because they are data-attr anatomy, not slot attrs
|
|
67
|
+
# (the audit-slot-vocab-vs-css vocabulary is slot-attr based). Consumers
|
|
68
|
+
# must NOT reach into `[data-dropzone]` to trigger the picker — that is
|
|
69
|
+
# what the public `.open()` method and the [compact] trigger mode are for
|
|
70
|
+
# (gh#1493). Hint + label are declared as props above (text-only); for an
|
|
71
|
+
# avatar / icon / form-element wrapper, compose <field-ui label> around
|
|
72
|
+
# the upload.
|
|
58
73
|
states:
|
|
59
74
|
- name: idle
|
|
60
75
|
description: Default, ready for interaction.
|
|
@@ -63,12 +78,16 @@ states:
|
|
|
63
78
|
attribute: disabled
|
|
64
79
|
traits: []
|
|
65
80
|
tokens: {}
|
|
81
|
+
requiredIcons:
|
|
82
|
+
- upload-simple
|
|
66
83
|
a2ui:
|
|
67
84
|
rules:
|
|
68
85
|
- rule: 'File-upload input with drop zone + browse button. Form-associated; emits file-list change events.'
|
|
69
86
|
reason: 'File-input canonical primitive.'
|
|
70
87
|
- rule: 'Multiple attribute enables multi-file selection; accept= constrains file types.'
|
|
71
88
|
reason: 'Standard file-input knobs.'
|
|
89
|
+
- rule: 'compact renders an icon-only trigger (no drop-zone chrome) — use in toolbars/dense rows; label becomes the trigger''s aria-label. Programmatic triggering goes through the public .open() method, never the internal [data-dropzone] part.'
|
|
90
|
+
reason: 'Public trigger API (gh#1493); internal anatomy is not a contract.'
|
|
72
91
|
- rule: 'For agent chat attachments use <chat-composer-ui>''s built-in upload affordance instead.'
|
|
73
92
|
reason: 'Chat composer has its own attachment lane.'
|
|
74
93
|
anti_patterns: []
|
|
@@ -257,6 +276,7 @@ keywords:
|
|
|
257
276
|
- transfer
|
|
258
277
|
- file-manager
|
|
259
278
|
- files
|
|
279
|
+
- compact
|
|
260
280
|
synonyms:
|
|
261
281
|
attach:
|
|
262
282
|
- file
|