@adia-ai/web-components 0.8.40 → 0.8.42
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 +71 -3
- package/MIGRATION.md +1229 -16
- package/README.md +25 -30
- package/USAGE.md +30 -4
- 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 +29 -2
- package/components/action-list/action-item.yaml +46 -3
- package/components/action-list/action-list.a2ui.json +6 -1
- package/components/action-list/action-list.class.js +114 -11
- package/components/action-list/action-list.css +43 -3
- package/components/action-list/action-list.d.ts +6 -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 +27 -7
- package/components/chart/chart.class.js +64 -22
- package/components/chart/chart.css +6 -4
- package/components/chart/chart.d.ts +10 -4
- package/components/chart/chart.yaml +40 -6
- package/components/chart-legend/chart-legend.a2ui.json +7 -1
- package/components/chart-legend/chart-legend.class.js +59 -6
- package/components/chart-legend/chart-legend.css +5 -2
- package/components/chart-legend/chart-legend.d.ts +3 -1
- package/components/chart-legend/chart-legend.yaml +15 -1
- 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-area/color-area.a2ui.json +148 -0
- package/components/color-area/color-area.class.js +657 -0
- package/components/color-area/color-area.css +188 -0
- package/components/color-area/color-area.d.ts +66 -0
- package/components/color-area/color-area.examples.md +19 -0
- package/components/color-area/color-area.js +17 -0
- package/components/color-area/color-area.yaml +183 -0
- package/components/color-input/color-input.a2ui.json +6 -5
- package/components/color-input/color-input.class.js +9 -6
- package/components/color-input/color-input.css +1 -1
- package/components/color-input/color-input.js +2 -2
- package/components/color-input/color-input.yaml +14 -12
- package/components/color-picker/color-picker.a2ui.json +16 -12
- package/components/color-picker/color-picker.class.js +24 -633
- package/components/color-picker/color-picker.css +14 -182
- package/components/color-picker/color-picker.yaml +41 -41
- 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 +2 -1
- package/components/description-list/description-list.css +1 -1
- package/components/description-list/description-list.d.ts +1 -1
- package/components/description-list/description-list.yaml +1 -1
- 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 +2 -1
- package/components/field/field.class.js +4 -1
- package/components/field/field.examples.md +1 -1
- package/components/field/field.yaml +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/index.js +1 -0
- 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/integration-card/integration-card.examples.md +2 -1
- 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 +11 -4
- package/components/menu/menu-item.yaml +30 -3
- package/components/menu/menu-label.a2ui.json +1 -0
- package/components/menu/menu.a2ui.json +3 -2
- package/components/menu/menu.class.js +36 -8
- package/components/menu/menu.d.ts +5 -3
- 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 +17 -1
- package/components/pane/pane.class.js +35 -6
- package/components/pane/pane.css +17 -12
- package/components/pane/pane.d.ts +10 -7
- package/components/pane/pane.yaml +18 -1
- 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/swatch/swatch.yaml +1 -1
- 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 +53 -22
- 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/icons.js +5 -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 +710 -587
- 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 +92 -105
- package/dist/web-components.sheet.js +1 -1
- package/index.d.ts +12 -1
- package/package.json +4 -2
- package/patterns/admin-shell/admin-shell.examples.html +2 -2
- package/patterns/conversion-funnel/conversion-funnel.examples.html +15 -15
- package/patterns/form-system/form-system.examples.html +1 -1
- 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/components.css +1 -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
|
@@ -38,26 +38,39 @@ props:
|
|
|
38
38
|
description: Visual variant (default | accent | success | warning | danger).
|
|
39
39
|
type: string
|
|
40
40
|
default: 'default'
|
|
41
|
+
enum: [default, accent, success, warning, danger]
|
|
41
42
|
status:
|
|
42
|
-
description: Lifecycle state (idle | active | completed | error). Pairs with `spinner` on "active" for an in-progress step.
|
|
43
|
+
description: Lifecycle state (idle | active | completed | error) — the values timeline.css currently styles. Pairs with `spinner` on "active" for an in-progress step.
|
|
43
44
|
type: string
|
|
44
45
|
default: 'idle'
|
|
46
|
+
enum: [idle, active, completed, error]
|
|
45
47
|
spinner:
|
|
46
48
|
description: Show a spinner instead of the dot/icon while status="active".
|
|
47
49
|
type: boolean
|
|
48
50
|
default: false
|
|
49
51
|
|
|
50
52
|
slots:
|
|
53
|
+
label:
|
|
54
|
+
description: >-
|
|
55
|
+
Custom primary-line content; falls through to the [text] prop if not
|
|
56
|
+
slotted. render() only writes into the component-stamped fallback
|
|
57
|
+
span (gh#1462 adopt-or-stamp guard).
|
|
58
|
+
time:
|
|
59
|
+
description: >-
|
|
60
|
+
Custom timestamp/duration content; falls through to the [duration]
|
|
61
|
+
or [time] prop if not slotted. render() only writes into the
|
|
62
|
+
component-stamped fallback span (gh#1462 adopt-or-stamp guard).
|
|
51
63
|
icon:
|
|
52
64
|
description: >-
|
|
53
|
-
Override the [icon] glyph with a custom slotted element
|
|
54
|
-
|
|
55
|
-
|
|
65
|
+
Override the [icon] glyph with a custom slotted element (custom
|
|
66
|
+
icon-ui, image, avatar). Mutually exclusive with the [icon]
|
|
67
|
+
attribute — a consumer-authored slot child wins and is never renamed
|
|
68
|
+
or removed by render() (gh#1462 adopt-or-stamp guard).
|
|
56
69
|
description:
|
|
57
70
|
description: >-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
71
|
+
Custom secondary-line content; falls through to [description] prop
|
|
72
|
+
if not slotted. render() only writes into the component-stamped
|
|
73
|
+
fallback span (gh#1462 adopt-or-stamp guard).
|
|
61
74
|
|
|
62
75
|
keywords:
|
|
63
76
|
- timeline-item
|
|
@@ -75,6 +88,8 @@ related:
|
|
|
75
88
|
- Stepper
|
|
76
89
|
|
|
77
90
|
a2ui:
|
|
91
|
+
allowedParents:
|
|
92
|
+
- Timeline
|
|
78
93
|
rules:
|
|
79
94
|
- rule: 'Child of <timeline-ui> — one chronological event with timestamp + content + optional icon dot.'
|
|
80
95
|
reason: 'Timeline cluster contract.'
|
|
@@ -40,6 +40,9 @@
|
|
|
40
40
|
],
|
|
41
41
|
"unevaluatedProperties": false,
|
|
42
42
|
"x-adiaui": {
|
|
43
|
+
"allowedChildren": [
|
|
44
|
+
"TimelineItem"
|
|
45
|
+
],
|
|
43
46
|
"anti_patterns": [],
|
|
44
47
|
"category": "display",
|
|
45
48
|
"composes": [
|
|
@@ -68,6 +71,7 @@
|
|
|
68
71
|
"timeline"
|
|
69
72
|
],
|
|
70
73
|
"name": "UITimeline",
|
|
74
|
+
"parts": {},
|
|
71
75
|
"related": [
|
|
72
76
|
"timeline-item"
|
|
73
77
|
],
|
|
@@ -104,14 +104,23 @@ export class UITimelineItem extends UIElement {
|
|
|
104
104
|
this.render();
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
+
// Adopt-or-stamp (gh#1462): a fallback child stamped from a prop is
|
|
108
|
+
// marked, and render() only ever writes into marked elements — a
|
|
109
|
+
// consumer-authored slot="label"/"description"/"time"/"icon" child is
|
|
110
|
+
// adopted as source of truth and never overwritten or removed. Mirrors
|
|
111
|
+
// action-item-ui/menu-item-ui's stamp-marking (PR #1429).
|
|
112
|
+
#stampMark(el) { el.dataset.timelineItemStamped = '1'; return el; }
|
|
113
|
+
#wasStamped(el) { return el?.dataset?.timelineItemStamped === '1'; }
|
|
114
|
+
|
|
107
115
|
connected() {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
116
|
+
// Each slot's adopt-or-stamp decision is independent per slot key —
|
|
117
|
+
// an authored label must not suppress the prop-driven description/time
|
|
118
|
+
// fallbacks (mirrors action-item-ui's per-part stamping, PR #1429).
|
|
119
|
+
for (const name of ['label', 'description', 'time']) {
|
|
120
|
+
if (logicalSlotted(this, name).length) continue;
|
|
121
|
+
const span = this.#stampMark(document.createElement('span'));
|
|
122
|
+
span.setAttribute('slot', name);
|
|
123
|
+
this.appendChild(span);
|
|
115
124
|
}
|
|
116
125
|
}
|
|
117
126
|
|
|
@@ -119,20 +128,22 @@ export class UITimelineItem extends UIElement {
|
|
|
119
128
|
const label = this.querySelector(':scope > [slot="label"]');
|
|
120
129
|
const desc = this.querySelector(':scope > [slot="description"]');
|
|
121
130
|
const time = this.querySelector(':scope > [slot="time"]');
|
|
122
|
-
if (label) label.textContent = this.text;
|
|
123
|
-
if (desc) desc.textContent = this.description;
|
|
124
|
-
if (time) time.textContent = this.duration || this.time;
|
|
131
|
+
if (this.#wasStamped(label)) label.textContent = this.text;
|
|
132
|
+
if (this.#wasStamped(desc)) desc.textContent = this.description;
|
|
133
|
+
if (this.#wasStamped(time)) time.textContent = this.duration || this.time;
|
|
125
134
|
|
|
135
|
+
const iconEl = this.querySelector(':scope > [slot="icon"]');
|
|
126
136
|
if (this.icon) {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
137
|
+
if (iconEl) {
|
|
138
|
+
if (this.#wasStamped(iconEl)) iconEl.setAttribute('name', this.icon);
|
|
139
|
+
} else {
|
|
140
|
+
const el = this.#stampMark(document.createElement('icon-ui'));
|
|
141
|
+
el.setAttribute('slot', 'icon');
|
|
142
|
+
el.setAttribute('name', this.icon);
|
|
143
|
+
this.prepend(el);
|
|
132
144
|
}
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
this.querySelector(':scope > [slot="icon"]')?.remove();
|
|
145
|
+
} else if (this.#wasStamped(iconEl)) {
|
|
146
|
+
iconEl.remove();
|
|
136
147
|
}
|
|
137
148
|
|
|
138
149
|
// Outcomes sub-list + toggle caret
|
|
@@ -42,12 +42,12 @@ export class UITimelineItem extends UIElement {
|
|
|
42
42
|
icon: string;
|
|
43
43
|
/** Show a spinner instead of the dot/icon while status="active". */
|
|
44
44
|
spinner: boolean;
|
|
45
|
-
/** Lifecycle state (idle | active | completed | error). Pairs with `spinner` on "active" for an in-progress step. */
|
|
46
|
-
status:
|
|
45
|
+
/** Lifecycle state (idle | active | completed | error) — the values timeline.css currently styles. Pairs with `spinner` on "active" for an in-progress step. */
|
|
46
|
+
status: 'idle' | 'active' | 'completed' | 'error';
|
|
47
47
|
/** Primary step label. */
|
|
48
48
|
text: string;
|
|
49
49
|
/** Absolute timestamp (HH:MM or ISO). */
|
|
50
50
|
time: string;
|
|
51
51
|
/** Visual variant (default | accent | success | warning | danger). */
|
|
52
|
-
variant:
|
|
52
|
+
variant: 'default' | 'accent' | 'success' | 'warning' | 'danger';
|
|
53
53
|
}
|
|
@@ -58,14 +58,20 @@
|
|
|
58
58
|
],
|
|
59
59
|
"unevaluatedProperties": false,
|
|
60
60
|
"x-adiaui": {
|
|
61
|
-
"anti_patterns": [
|
|
61
|
+
"anti_patterns": [
|
|
62
|
+
{
|
|
63
|
+
"fix": "{\"component\": \"Toast\", \"variant\": \"success\", \"text\": \"Saved successfully.\"}\n",
|
|
64
|
+
"why": "<feed-item-ui> is the underlying imperative-channel item — every\nfeed.yaml/feed-item.yaml a2ui rule says not to place it\ndeclaratively. It is meant to be created via UIFeed.post() (or a\ndeclared <toast-ui>, which forwards into it), never authored\ndirectly in generated markup.\n",
|
|
65
|
+
"wrong": "{\"component\": \"FeedItem\", \"variant\": \"success\", \"text\": \"Saved successfully.\"}\n"
|
|
66
|
+
}
|
|
67
|
+
],
|
|
62
68
|
"category": "container",
|
|
63
69
|
"composes": [],
|
|
64
70
|
"events": {},
|
|
65
71
|
"examples": [
|
|
66
72
|
{
|
|
67
|
-
"description": "Column of three toast notification components showing success, warning, and
|
|
68
|
-
"a2ui": "[\n {\n \"id\": \"root\",\n \"component\": \"Column\",\n \"gap\": \"2\",\n \"children\": [\n \"t1\",\n \"t2\",\n \"t3\"\n ]\n },\n {\n \"id\": \"t1\",\n \"component\": \"Toast\",\n \"variant\": \"success\",\n \"
|
|
73
|
+
"description": "Column of three toast notification components showing success, warning, and danger variants.",
|
|
74
|
+
"a2ui": "[\n {\n \"id\": \"root\",\n \"component\": \"Column\",\n \"gap\": \"2\",\n \"children\": [\n \"t1\",\n \"t2\",\n \"t3\"\n ]\n },\n {\n \"id\": \"t1\",\n \"component\": \"Toast\",\n \"variant\": \"success\",\n \"text\": \"Saved successfully. Your changes have been saved.\"\n },\n {\n \"id\": \"t2\",\n \"component\": \"Toast\",\n \"variant\": \"warning\",\n \"text\": \"Storage almost full — you are using 90% of your available storage.\"\n },\n {\n \"id\": \"t3\",\n \"component\": \"Toast\",\n \"variant\": \"danger\",\n \"text\": \"Upload failed. The file could not be uploaded. Please try again.\",\n \"duration\": 0\n }\n]",
|
|
69
75
|
"name": "toast-notification"
|
|
70
76
|
}
|
|
71
77
|
],
|
|
@@ -84,6 +90,7 @@
|
|
|
84
90
|
"alert"
|
|
85
91
|
],
|
|
86
92
|
"name": "UIToast",
|
|
93
|
+
"parts": {},
|
|
87
94
|
"related": [
|
|
88
95
|
"Feed",
|
|
89
96
|
"Alert",
|
|
@@ -85,12 +85,24 @@ a2ui:
|
|
|
85
85
|
reason: 'Toast pattern.'
|
|
86
86
|
- rule: 'Typically posted into <feed-ui> via UIFeed.post(...); for inline persistent alerts use <alert-ui> instead.'
|
|
87
87
|
reason: 'Posting model + surface boundary.'
|
|
88
|
-
- rule: 'Variant maps to severity (info, success,
|
|
88
|
+
- rule: 'Variant maps to severity (info, success, warning, danger); same tokens as <alert-ui>.'
|
|
89
89
|
reason: 'Visual consistency.'
|
|
90
|
-
|
|
90
|
+
- rule: 'Taught default for generated transient notifications — author `Toast` declaratively. It safely dissolves into `<feed-ui>` on connect (SPEC-FEED-CHANNEL-001 Phase 4; see toast.class.js), forwarding only `text`, `duration`, and `position` — not full parity with `UIFeed.post()`, which also accepts `heading`, `icon`, `dismissible`, and `action`, and defaults `variant` to `default` where Toast defaults to `info`. For those extra fields, call `UIFeed.post()` directly (imperative) instead of authoring `Toast`. Do not author `FeedItem` directly either way — <feed-ui>/<feed-item-ui>''s own a2ui rules say not to place it declaratively; that pair is the imperative channel Toast forwards into, not itself a generation target.'
|
|
91
|
+
reason: 'Taught-default ruling (#1363 C6 / #1375): Toast is the sanctioned declarative surface for the fields it forwards; Feed is the underlying imperative/programmatic channel and the only path to its richer fields.'
|
|
92
|
+
anti_patterns:
|
|
93
|
+
- wrong: |
|
|
94
|
+
{"component": "FeedItem", "variant": "success", "text": "Saved successfully."}
|
|
95
|
+
why: |
|
|
96
|
+
<feed-item-ui> is the underlying imperative-channel item — every
|
|
97
|
+
feed.yaml/feed-item.yaml a2ui rule says not to place it
|
|
98
|
+
declaratively. It is meant to be created via UIFeed.post() (or a
|
|
99
|
+
declared <toast-ui>, which forwards into it), never authored
|
|
100
|
+
directly in generated markup.
|
|
101
|
+
fix: |
|
|
102
|
+
{"component": "Toast", "variant": "success", "text": "Saved successfully."}
|
|
91
103
|
examples:
|
|
92
104
|
- name: toast-notification
|
|
93
|
-
description: Column of three toast notification components showing success, warning, and
|
|
105
|
+
description: Column of three toast notification components showing success, warning, and danger variants.
|
|
94
106
|
a2ui: >-
|
|
95
107
|
[
|
|
96
108
|
{
|
|
@@ -107,25 +119,20 @@ examples:
|
|
|
107
119
|
"id": "t1",
|
|
108
120
|
"component": "Toast",
|
|
109
121
|
"variant": "success",
|
|
110
|
-
"
|
|
111
|
-
"description": "Your changes have been saved.",
|
|
112
|
-
"dismissible": true
|
|
122
|
+
"text": "Saved successfully. Your changes have been saved."
|
|
113
123
|
},
|
|
114
124
|
{
|
|
115
125
|
"id": "t2",
|
|
116
126
|
"component": "Toast",
|
|
117
127
|
"variant": "warning",
|
|
118
|
-
"
|
|
119
|
-
"description": "You are using 90% of your available storage.",
|
|
120
|
-
"dismissible": true
|
|
128
|
+
"text": "Storage almost full — you are using 90% of your available storage."
|
|
121
129
|
},
|
|
122
130
|
{
|
|
123
131
|
"id": "t3",
|
|
124
132
|
"component": "Toast",
|
|
125
|
-
"variant": "
|
|
126
|
-
"
|
|
127
|
-
"
|
|
128
|
-
"dismissible": true
|
|
133
|
+
"variant": "danger",
|
|
134
|
+
"text": "Upload failed. The file could not be uploaded. Please try again.",
|
|
135
|
+
"duration": 0
|
|
129
136
|
}
|
|
130
137
|
]
|
|
131
138
|
keywords:
|
|
@@ -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/ToggleGroup.json",
|
|
4
4
|
"title": "ToggleGroup",
|
|
5
|
-
"description": "Multi-select button group (unlike <segmented-ui> which is single-select). Hosts <toggle-option-ui> children, each independently toggleable; emits change events with the active value set.
|
|
5
|
+
"description": "DEPRECATED (gh#1369) — use <segmented-ui multiple> + <segment-ui> instead. Multi-select button group (unlike <segmented-ui> which is single-select by default). Hosts <toggle-option-ui> children, each independently toggleable; emits change events with the active value set.",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"allOf": [
|
|
8
8
|
{
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"const": "ToggleGroup"
|
|
18
18
|
},
|
|
19
19
|
"single": {
|
|
20
|
-
"description": "When true, restrict to one active option (single-select).",
|
|
20
|
+
"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>.",
|
|
21
21
|
"type": "boolean",
|
|
22
22
|
"default": false
|
|
23
23
|
},
|
|
@@ -32,6 +32,9 @@
|
|
|
32
32
|
],
|
|
33
33
|
"unevaluatedProperties": false,
|
|
34
34
|
"x-adiaui": {
|
|
35
|
+
"allowedChildren": [
|
|
36
|
+
"ToggleOption"
|
|
37
|
+
],
|
|
35
38
|
"anti_patterns": [],
|
|
36
39
|
"category": "navigation",
|
|
37
40
|
"composes": [],
|
|
@@ -60,6 +63,7 @@
|
|
|
60
63
|
"group"
|
|
61
64
|
],
|
|
62
65
|
"name": "UIToggleGroup",
|
|
66
|
+
"parts": {},
|
|
63
67
|
"related": [
|
|
64
68
|
"ToggleOption",
|
|
65
69
|
"Segmented",
|
|
@@ -76,7 +80,7 @@
|
|
|
76
80
|
"name": "idle"
|
|
77
81
|
}
|
|
78
82
|
],
|
|
79
|
-
"status": "
|
|
83
|
+
"status": "deprecated",
|
|
80
84
|
"synonyms": {
|
|
81
85
|
"toggle-group": [
|
|
82
86
|
"segmented-control",
|
|
@@ -12,13 +12,17 @@
|
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
|
+
* DEPRECATED (gh#1369, #1363 C1, ADR-0057) — use <segmented-ui multiple> +
|
|
16
|
+
* <segment-ui> instead (same comma-separated value encoding). Kept working
|
|
17
|
+
* as-is for existing consumers; no behavior change.
|
|
18
|
+
*
|
|
15
19
|
* <toggle-group-ui value="bold,italic">
|
|
16
20
|
* <toggle-option-ui value="bold" icon="text-b"></toggle-option-ui>
|
|
17
21
|
* <toggle-option-ui value="italic" icon="text-italic"></toggle-option-ui>
|
|
18
22
|
* <toggle-option-ui value="underline" icon="text-underline"></toggle-option-ui>
|
|
19
23
|
* </toggle-group-ui>
|
|
20
24
|
*
|
|
21
|
-
* Multi-select button group (unlike segmented which is single-select).
|
|
25
|
+
* Multi-select button group (unlike segmented which is single-select by default).
|
|
22
26
|
*
|
|
23
27
|
* Properties:
|
|
24
28
|
* value — comma-separated selected values
|
|
@@ -50,7 +54,22 @@ export class UIToggleOption extends UIElement {
|
|
|
50
54
|
|
|
51
55
|
#stamped = false;
|
|
52
56
|
|
|
57
|
+
// gh#1369 (#1363 C1): DEPRECATED — use <segment-ui> inside
|
|
58
|
+
// <segmented-ui multiple> instead. One-time warn, same pattern as
|
|
59
|
+
// UIFormElement's #labelWarned (form.js) — informational only, behavior
|
|
60
|
+
// is unchanged.
|
|
61
|
+
static #deprecationWarned = false;
|
|
62
|
+
|
|
53
63
|
connected() {
|
|
64
|
+
if (!UIToggleOption.#deprecationWarned) {
|
|
65
|
+
UIToggleOption.#deprecationWarned = true;
|
|
66
|
+
// eslint-disable-next-line no-console
|
|
67
|
+
console.warn(
|
|
68
|
+
'[AdiaUI] <toggle-option-ui> is deprecated — use <segment-ui> ' +
|
|
69
|
+
'inside <segmented-ui multiple> instead (gh#1369, #1363 C1). ' +
|
|
70
|
+
'Kept working as-is; no behavior change.',
|
|
71
|
+
);
|
|
72
|
+
}
|
|
54
73
|
this.setAttribute('role', 'button');
|
|
55
74
|
this.setAttribute('tabindex', '0');
|
|
56
75
|
}
|
|
@@ -87,11 +106,31 @@ export class UIToggleGroup extends UIElement {
|
|
|
87
106
|
|
|
88
107
|
#bound = false;
|
|
89
108
|
|
|
109
|
+
// gh#1369 (#1363 C1): DEPRECATED — use <segmented-ui multiple> instead.
|
|
110
|
+
static #deprecationWarned = false;
|
|
111
|
+
|
|
90
112
|
get #valueSet() {
|
|
91
113
|
return new Set(this.value ? this.value.split(',').map(v => v.trim()).filter(Boolean) : []);
|
|
92
114
|
}
|
|
93
115
|
|
|
94
116
|
connected() {
|
|
117
|
+
if (!UIToggleGroup.#deprecationWarned) {
|
|
118
|
+
UIToggleGroup.#deprecationWarned = true;
|
|
119
|
+
// #deprecationWarned is a one-shot PER CLASS (not per instance,
|
|
120
|
+
// matching UIFormElement's #labelWarned pattern) — the message can't
|
|
121
|
+
// branch on THIS instance's [single] alone without misleading a page
|
|
122
|
+
// that mixes single and non-single toggle-groups, so it states both
|
|
123
|
+
// mappings instead (gh#1369 review).
|
|
124
|
+
// eslint-disable-next-line no-console
|
|
125
|
+
console.warn(
|
|
126
|
+
'[AdiaUI] <toggle-group-ui> is deprecated (gh#1369, #1363 C1) — ' +
|
|
127
|
+
'migrate to <segmented-ui multiple> + <segment-ui> (multi-select, ' +
|
|
128
|
+
'the default) or plain <segmented-ui> with no [multiple] (when ' +
|
|
129
|
+
'[single] is set — note single-select never clears on re-click, ' +
|
|
130
|
+
'unlike [single]\'s clear-on-reclick). Same comma-separated value ' +
|
|
131
|
+
'encoding either way. Kept working as-is; no behavior change.',
|
|
132
|
+
);
|
|
133
|
+
}
|
|
95
134
|
if (!this.#bound) {
|
|
96
135
|
this.#bound = true;
|
|
97
136
|
this.addEventListener('click', this.#onClick);
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
/*
|
|
1
|
+
/* DEPRECATED (gh#1369, #1363 C1, ADR-0057): <toggle-group-ui>/
|
|
2
|
+
<toggle-option-ui> are superseded by <segmented-ui multiple> +
|
|
3
|
+
<segment-ui> (segment.css owns the equivalent [multiple]-mode styling).
|
|
4
|
+
This file is kept as-is for existing consumers — no behavior change.
|
|
5
|
+
|
|
6
|
+
Safari 17.x bug: `:scope:not(...):hover` (Flavor A) and `:scope[selected]`
|
|
2
7
|
(Flavor B — attribute-removal restyle) both fail inside `@scope`.
|
|
3
8
|
Selectors moved out. The @scope is `(toggle-option-ui)` — NOT
|
|
4
9
|
`(toggle-group-ui)` — so the moved-out selectors target
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `<toggle-group-ui>` — Multi-select button group (unlike <segmented-ui> which is single-select). Hosts <toggle-option-ui> children, each independently toggleable; emits change events with the active value set.
|
|
2
|
+
* `<toggle-group-ui>` — DEPRECATED (gh#1369) — use <segmented-ui multiple> + <segment-ui> instead. Multi-select button group (unlike <segmented-ui> which is single-select by default). Hosts <toggle-option-ui> children, each independently toggleable; emits change events with the active value set.
|
|
3
3
|
*
|
|
4
4
|
* @see https://ui-kit.exe.xyz/site/components/toggle-group
|
|
5
5
|
*
|
|
@@ -20,7 +20,7 @@ export interface ToggleGroupChangeEventDetail {
|
|
|
20
20
|
export type ToggleGroupChangeEvent = CustomEvent<ToggleGroupChangeEventDetail>;
|
|
21
21
|
|
|
22
22
|
export class UIToggleGroup extends UIElement {
|
|
23
|
-
/** When true, restrict to one active option (single-select). */
|
|
23
|
+
/** 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>. */
|
|
24
24
|
single: boolean;
|
|
25
25
|
/** Comma-separated selected values */
|
|
26
26
|
value: string;
|
|
@@ -5,22 +5,29 @@
|
|
|
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
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.
|
|
8
15
|
$schema: ../../../../scripts/schemas/component.yaml.schema.json
|
|
9
16
|
name: UIToggleGroup
|
|
10
17
|
tag: toggle-group-ui
|
|
11
|
-
status:
|
|
18
|
+
status: deprecated
|
|
12
19
|
component: ToggleGroup
|
|
13
20
|
category: navigation
|
|
14
21
|
version: 1
|
|
15
22
|
description: >-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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.
|
|
21
28
|
props:
|
|
22
29
|
single:
|
|
23
|
-
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>."
|
|
24
31
|
type: boolean
|
|
25
32
|
default: false
|
|
26
33
|
reflect: false # declarative presentational attribute — CSS/author-time read, non-reactive by design
|
|
@@ -78,15 +85,17 @@ tokens:
|
|
|
78
85
|
--toggle-option-selected-fg:
|
|
79
86
|
description: Text color when selected
|
|
80
87
|
a2ui:
|
|
88
|
+
allowedChildren:
|
|
89
|
+
- ToggleOption
|
|
81
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.'
|
|
82
93
|
- rule: 'Multi-select button cluster — hosts <toggle-option-ui> children, each independently toggleable.'
|
|
83
|
-
reason: 'Multi-select cluster contract.'
|
|
84
|
-
- rule: 'Different from <segmented-ui> (single-select) — toggle-group emits a SET of active values.'
|
|
85
|
-
reason: 'Selection model distinction.'
|
|
94
|
+
reason: 'Multi-select cluster contract (legacy).'
|
|
86
95
|
- rule: 'Use for filter chips, multi-flag toggles, day-of-week pickers; for binary on/off use <switch-ui>.'
|
|
87
|
-
reason: 'Capacity guidance.'
|
|
96
|
+
reason: 'Capacity guidance (legacy).'
|
|
88
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.'
|
|
89
|
-
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).'
|
|
90
99
|
anti_patterns: []
|
|
91
100
|
examples:
|
|
92
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
|
{
|
|
@@ -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",
|
|
@@ -6,17 +6,21 @@
|
|
|
6
6
|
#
|
|
7
7
|
# ADR-0056 (gh#1303): `selected` converges onto <segment-ui>'s declared,
|
|
8
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.
|
|
9
13
|
|
|
10
14
|
# Child component of <toggle-group-ui>. Surface only inside that parent.
|
|
11
15
|
$schema: ../../../../scripts/schemas/component.yaml.schema.json
|
|
12
16
|
name: UIToggleOption
|
|
13
17
|
tag: toggle-option-ui
|
|
14
|
-
status:
|
|
18
|
+
status: deprecated
|
|
15
19
|
component: ToggleOption
|
|
16
|
-
category:
|
|
20
|
+
category: form
|
|
17
21
|
version: 1
|
|
18
22
|
description: |-
|
|
19
|
-
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.
|
|
20
24
|
|
|
21
25
|
props:
|
|
22
26
|
value:
|
|
@@ -60,10 +64,12 @@ related:
|
|
|
60
64
|
- Radio
|
|
61
65
|
|
|
62
66
|
a2ui:
|
|
67
|
+
allowedParents:
|
|
68
|
+
- ToggleGroup
|
|
63
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.'
|
|
64
72
|
- rule: 'Child of <toggle-group-ui> — one independently-toggleable button in a multi-select cluster.'
|
|
65
|
-
reason: 'Multi-select cluster contract.'
|
|
66
|
-
- rule: 'Different from <segment-ui> (which is single-select inside <segmented-ui>).'
|
|
67
|
-
reason: 'Selection model boundary.'
|
|
73
|
+
reason: 'Multi-select cluster contract (legacy).'
|
|
68
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.'
|
|
69
|
-
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;
|