@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
|
@@ -34,8 +34,14 @@
|
|
|
34
34
|
"default": false
|
|
35
35
|
},
|
|
36
36
|
"status": {
|
|
37
|
-
"description": "Lifecycle state (idle | active | completed | error). Pairs with `spinner` on \"active\" for an in-progress step.",
|
|
37
|
+
"description": "Lifecycle state (idle | active | completed | error) — the values timeline.css currently styles. Pairs with `spinner` on \"active\" for an in-progress step.",
|
|
38
38
|
"type": "string",
|
|
39
|
+
"enum": [
|
|
40
|
+
"idle",
|
|
41
|
+
"active",
|
|
42
|
+
"completed",
|
|
43
|
+
"error"
|
|
44
|
+
],
|
|
39
45
|
"default": "idle"
|
|
40
46
|
},
|
|
41
47
|
"text": {
|
|
@@ -49,6 +55,13 @@
|
|
|
49
55
|
"variant": {
|
|
50
56
|
"description": "Visual variant (default | accent | success | warning | danger).",
|
|
51
57
|
"type": "string",
|
|
58
|
+
"enum": [
|
|
59
|
+
"default",
|
|
60
|
+
"accent",
|
|
61
|
+
"success",
|
|
62
|
+
"warning",
|
|
63
|
+
"danger"
|
|
64
|
+
],
|
|
52
65
|
"default": "default"
|
|
53
66
|
}
|
|
54
67
|
},
|
|
@@ -57,6 +70,9 @@
|
|
|
57
70
|
],
|
|
58
71
|
"unevaluatedProperties": false,
|
|
59
72
|
"x-adiaui": {
|
|
73
|
+
"allowedParents": [
|
|
74
|
+
"Timeline"
|
|
75
|
+
],
|
|
60
76
|
"anti_patterns": [],
|
|
61
77
|
"category": "feedback",
|
|
62
78
|
"composes": [],
|
|
@@ -70,6 +86,7 @@
|
|
|
70
86
|
"history-row"
|
|
71
87
|
],
|
|
72
88
|
"name": "UITimelineItem",
|
|
89
|
+
"parts": {},
|
|
73
90
|
"related": [
|
|
74
91
|
"Timeline",
|
|
75
92
|
"FeedItem",
|
|
@@ -77,10 +94,16 @@
|
|
|
77
94
|
],
|
|
78
95
|
"slots": {
|
|
79
96
|
"description": {
|
|
80
|
-
"description": "
|
|
97
|
+
"description": "Custom secondary-line content; falls through to [description] prop if not slotted. render() only writes into the component-stamped fallback span (gh#1462 adopt-or-stamp guard)."
|
|
81
98
|
},
|
|
82
99
|
"icon": {
|
|
83
|
-
"description": "Override the [icon] glyph with a custom slotted element
|
|
100
|
+
"description": "Override the [icon] glyph with a custom slotted element (custom icon-ui, image, avatar). Mutually exclusive with the [icon] attribute — a consumer-authored slot child wins and is never renamed or removed by render() (gh#1462 adopt-or-stamp guard)."
|
|
101
|
+
},
|
|
102
|
+
"label": {
|
|
103
|
+
"description": "Custom primary-line content; falls through to the [text] prop if not slotted. render() only writes into the component-stamped fallback span (gh#1462 adopt-or-stamp guard)."
|
|
104
|
+
},
|
|
105
|
+
"time": {
|
|
106
|
+
"description": "Custom timestamp/duration content; falls through to the [duration] or [time] prop if not slotted. render() only writes into the component-stamped fallback span (gh#1462 adopt-or-stamp guard)."
|
|
84
107
|
}
|
|
85
108
|
},
|
|
86
109
|
"states": [],
|
|
@@ -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
|
|
@@ -309,7 +309,7 @@ agent-reasoning-ui timeline-ui:not([orientation="horizontal"]),
|
|
|
309
309
|
font-weight: var(--timeline-item-label-weight);
|
|
310
310
|
font-size: var(--timeline-item-label-size);
|
|
311
311
|
color: var(--timeline-item-label-fg);
|
|
312
|
-
line-height:
|
|
312
|
+
line-height: var(--a-font-leading-normal);
|
|
313
313
|
overflow-wrap: break-word;
|
|
314
314
|
min-width: 0;
|
|
315
315
|
}
|
|
@@ -323,7 +323,7 @@ agent-reasoning-ui timeline-ui:not([orientation="horizontal"]),
|
|
|
323
323
|
grid-row: 2;
|
|
324
324
|
color: var(--timeline-item-desc-fg);
|
|
325
325
|
font-size: var(--timeline-item-desc-size);
|
|
326
|
-
line-height:
|
|
326
|
+
line-height: var(--a-font-leading-relaxed);
|
|
327
327
|
margin-top: var(--a-space-0-5);
|
|
328
328
|
}
|
|
329
329
|
|
|
@@ -333,7 +333,7 @@ agent-reasoning-ui timeline-ui:not([orientation="horizontal"]),
|
|
|
333
333
|
color: var(--timeline-item-time-fg);
|
|
334
334
|
font-size: var(--timeline-item-time-size);
|
|
335
335
|
font-variant-numeric: tabular-nums;
|
|
336
|
-
line-height:
|
|
336
|
+
line-height: var(--a-font-leading-normal);
|
|
337
337
|
white-space: nowrap;
|
|
338
338
|
justify-self: end;
|
|
339
339
|
}
|
|
@@ -356,7 +356,7 @@ agent-reasoning-ui timeline-ui:not([orientation="horizontal"]),
|
|
|
356
356
|
gap: var(--a-space-0-5);
|
|
357
357
|
color: var(--timeline-item-outcome-fg);
|
|
358
358
|
font-size: var(--timeline-item-desc-size);
|
|
359
|
-
line-height:
|
|
359
|
+
line-height: var(--a-font-leading-relaxed);
|
|
360
360
|
animation: tl-fade var(--timeline-item-duration) var(--timeline-item-easing);
|
|
361
361
|
}
|
|
362
362
|
|
|
@@ -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:
|
package/components/toc/toc.css
CHANGED
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
padding-inline: var(--toc-padding-inline);
|
|
60
60
|
text-decoration: none;
|
|
61
61
|
color: inherit;
|
|
62
|
-
line-height:
|
|
62
|
+
line-height: var(--a-font-leading-normal);
|
|
63
63
|
border-inline-start: 2px solid var(--toc-rule-inactive);
|
|
64
64
|
transition:
|
|
65
65
|
color var(--a-duration-fast) var(--a-easing),
|
|
@@ -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
|
|
@@ -34,11 +38,8 @@ import { UIElement } from '../../core/element.js';
|
|
|
34
38
|
// truth. ADR-0056 (gh#1303): the child's current-state surface is the
|
|
35
39
|
// declared, reflected `selected` prop below, converging onto <segment-ui>'s
|
|
36
40
|
// mechanism (yaml → catalog → generative grammar) instead of a private
|
|
37
|
-
// stamp. `
|
|
38
|
-
//
|
|
39
|
-
// CSS may already target it as an undocumented hook; its removal rides the
|
|
40
|
-
// 0.9.0 breaking wave. Don't set `selected` directly on an option; drive
|
|
41
|
-
// the group's `value` instead.
|
|
41
|
+
// stamp. Don't set `selected` directly on an option; drive the group's
|
|
42
|
+
// `value` instead.
|
|
42
43
|
|
|
43
44
|
export class UIToggleOption extends UIElement {
|
|
44
45
|
static properties = {
|
|
@@ -53,7 +54,22 @@ export class UIToggleOption extends UIElement {
|
|
|
53
54
|
|
|
54
55
|
#stamped = false;
|
|
55
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
|
+
|
|
56
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
|
+
}
|
|
57
73
|
this.setAttribute('role', 'button');
|
|
58
74
|
this.setAttribute('tabindex', '0');
|
|
59
75
|
}
|
|
@@ -90,11 +106,31 @@ export class UIToggleGroup extends UIElement {
|
|
|
90
106
|
|
|
91
107
|
#bound = false;
|
|
92
108
|
|
|
109
|
+
// gh#1369 (#1363 C1): DEPRECATED — use <segmented-ui multiple> instead.
|
|
110
|
+
static #deprecationWarned = false;
|
|
111
|
+
|
|
93
112
|
get #valueSet() {
|
|
94
113
|
return new Set(this.value ? this.value.split(',').map(v => v.trim()).filter(Boolean) : []);
|
|
95
114
|
}
|
|
96
115
|
|
|
97
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
|
+
}
|
|
98
134
|
if (!this.#bound) {
|
|
99
135
|
this.#bound = true;
|
|
100
136
|
this.addEventListener('click', this.#onClick);
|
|
@@ -110,13 +146,8 @@ export class UIToggleGroup extends UIElement {
|
|
|
110
146
|
const isSelected = selected.has(optVal);
|
|
111
147
|
// ADR-0056 (gh#1303): `selected` is the declared, reflected mechanism —
|
|
112
148
|
// converges onto <segment-ui>'s convention (opt's own render() stamps
|
|
113
|
-
// aria-pressed from it).
|
|
114
|
-
// as a DEPRECATED parallel hook for pre-existing external CSS; it no
|
|
115
|
-
// longer drives styling (toggle-group.css) and its removal rides the
|
|
116
|
-
// 0.9.0 breaking wave.
|
|
149
|
+
// aria-pressed from it).
|
|
117
150
|
opt.selected = isSelected;
|
|
118
|
-
if (isSelected) opt.setAttribute('data-selected', '');
|
|
119
|
-
else opt.removeAttribute('data-selected');
|
|
120
151
|
}
|
|
121
152
|
}
|
|
122
153
|
|
|
@@ -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
|
|
@@ -10,9 +15,7 @@ toggle-option-ui:not([disabled]):hover {
|
|
|
10
15
|
}
|
|
11
16
|
|
|
12
17
|
/* ADR-0056 (gh#1303): converged onto <segment-ui>'s declared, reflected
|
|
13
|
-
[selected] prop, set by <toggle-group-ui> (toggle-group.class.js).
|
|
14
|
-
parent also stamps the legacy `data-selected` attribute in parallel —
|
|
15
|
-
DEPRECATED, no longer styled here; removal rides the 0.9.0 breaking wave. */
|
|
18
|
+
[selected] prop, set by <toggle-group-ui> (toggle-group.class.js). */
|
|
16
19
|
toggle-option-ui[selected] {
|
|
17
20
|
--toggle-option-bg: var(--toggle-option-selected-bg);
|
|
18
21
|
--toggle-option-fg: var(--toggle-option-selected-fg);
|
|
@@ -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;
|
|
@@ -41,8 +41,7 @@ export class UIToggleOption extends UIElement {
|
|
|
41
41
|
/** Whether this option is currently selected. Managed by the parent
|
|
42
42
|
<toggle-group-ui> container (ADR-0056) — don't set directly; the group's
|
|
43
43
|
`value` is the single source of truth. Converges onto <segment-ui>'s
|
|
44
|
-
declared reflected-prop mechanism
|
|
45
|
-
`data-selected` stamp with no declared API surface). */
|
|
44
|
+
declared reflected-prop mechanism. */
|
|
46
45
|
selected: boolean;
|
|
47
46
|
/** Visible label text. */
|
|
48
47
|
text: string;
|