@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
package/components/card/card.css
CHANGED
|
@@ -120,6 +120,36 @@
|
|
|
120
120
|
:scope[elevation="2"] { --card-shadow: var(--card-shadow-2); }
|
|
121
121
|
:scope[elevation="3"] { --card-shadow: var(--card-shadow-3); }
|
|
122
122
|
|
|
123
|
+
/* ═══════ Padding — token override (gh#1416) ═══════
|
|
124
|
+
Overrides --card-inset (the header/section/footer inset token) for
|
|
125
|
+
the whole card. Named scale mirrors block-ui's own [padding] contract
|
|
126
|
+
+ the global [padding] attribute API (api/sizing.css) — same
|
|
127
|
+
--a-padding-{xs..xl} tokens, so <card-ui padding="md"> == [padding="md"].
|
|
128
|
+
Literal rungs are the same k-independent --a-space-N set as the
|
|
129
|
+
universal [gap]/[padding] attribute (api/sizing.css). Unset (empty)
|
|
130
|
+
keeps the ambient --card-inset (context/[size]-driven) — this section
|
|
131
|
+
only fires when an author writes the attribute explicitly, so the many
|
|
132
|
+
existing cards that never set [padding] are unaffected. */
|
|
133
|
+
:scope[padding="none"] { --card-inset: 0; }
|
|
134
|
+
:scope[padding="xs"] { --card-inset: var(--a-padding-xs); }
|
|
135
|
+
:scope[padding="sm"] { --card-inset: var(--a-padding-sm); }
|
|
136
|
+
:scope[padding="md"] { --card-inset: var(--a-padding-md); }
|
|
137
|
+
:scope[padding="lg"] { --card-inset: var(--a-padding-lg); }
|
|
138
|
+
:scope[padding="xl"] { --card-inset: var(--a-padding-xl); }
|
|
139
|
+
:scope[padding="0"] { --card-inset: 0; }
|
|
140
|
+
:scope[padding="1"] { --card-inset: var(--a-space-1); }
|
|
141
|
+
:scope[padding="2"] { --card-inset: var(--a-space-2); }
|
|
142
|
+
:scope[padding="3"] { --card-inset: var(--a-space-3); }
|
|
143
|
+
:scope[padding="4"] { --card-inset: var(--a-space-4); }
|
|
144
|
+
:scope[padding="5"] { --card-inset: var(--a-space-5); }
|
|
145
|
+
:scope[padding="6"] { --card-inset: var(--a-space-6); }
|
|
146
|
+
:scope[padding="7"] { --card-inset: var(--a-space-7); }
|
|
147
|
+
:scope[padding="8"] { --card-inset: var(--a-space-8); }
|
|
148
|
+
:scope[padding="9"] { --card-inset: var(--a-space-9); }
|
|
149
|
+
:scope[padding="10"] { --card-inset: var(--a-space-10); }
|
|
150
|
+
:scope[padding="12"] { --card-inset: var(--a-space-12); }
|
|
151
|
+
:scope[padding="16"] { --card-inset: var(--a-space-16); }
|
|
152
|
+
|
|
123
153
|
/* ═══════ Loading ═══════ */
|
|
124
154
|
|
|
125
155
|
:scope[loading] {
|
|
@@ -194,7 +224,7 @@
|
|
|
194
224
|
align-items: center;
|
|
195
225
|
}
|
|
196
226
|
|
|
197
|
-
& > header[
|
|
227
|
+
& > header[padded] {
|
|
198
228
|
margin: 0;
|
|
199
229
|
padding: var(--card-inset);
|
|
200
230
|
background: var(--card-bg-padded);
|
|
@@ -271,7 +301,7 @@
|
|
|
271
301
|
& > header > :is(text-ui[variant="display"], text-ui[variant="title"], text-ui[variant="heading"], text-ui[variant="subsection"]):not([slot]),
|
|
272
302
|
& > header > [slot="heading"] :is(h1, h2, h3, h4, h5, h6) {
|
|
273
303
|
grid-row: 1;
|
|
274
|
-
line-height:
|
|
304
|
+
line-height: var(--a-font-leading-normal);
|
|
275
305
|
margin: 0;
|
|
276
306
|
}
|
|
277
307
|
/* Heading slot is a flex container — can hold title + inline badges/metadata.
|
|
@@ -304,7 +334,7 @@
|
|
|
304
334
|
& > header > :is(text-ui[variant="body"], text-ui[variant="caption"]):not([slot]) {
|
|
305
335
|
grid-row: 2;
|
|
306
336
|
grid-column: 1 / -1;
|
|
307
|
-
line-height:
|
|
337
|
+
line-height: var(--a-font-leading-relaxed);
|
|
308
338
|
margin: 0;
|
|
309
339
|
}
|
|
310
340
|
& > header:has(> [slot="icon"]) > :is([slot="description"], p, small) { grid-column: 2 / -1; }
|
|
@@ -489,7 +519,7 @@
|
|
|
489
519
|
font-size: var(--card-font-size);
|
|
490
520
|
font-weight: var(--a-weight-medium);
|
|
491
521
|
color: var(--card-heading-fg);
|
|
492
|
-
line-height:
|
|
522
|
+
line-height: var(--a-font-leading-normal);
|
|
493
523
|
margin: 0;
|
|
494
524
|
flex: 0 0 auto;
|
|
495
525
|
}
|
|
@@ -17,8 +17,8 @@ export class UICard extends UIElement {
|
|
|
17
17
|
draggable: boolean;
|
|
18
18
|
/** Shadow depth 0-3 */
|
|
19
19
|
elevation: 0 | 1 | 2 | 3;
|
|
20
|
-
/** Interior padding scale
|
|
21
|
-
padding:
|
|
20
|
+
/** Interior padding scale — overrides --card-inset (the header/section/footer inset token) for the whole card. Accepts the named scale (none/xs/sm/md/lg/xl — the parametric --a-padding-* tokens, same vocabulary as block-ui's [padding]) or a literal space rung ("0"/"1"…"10"/"12"/"16", mapped to --a-space-N). Empty (default) defers to the ambient --card-inset (context/[size]-driven) — unchanged behavior for the many existing cards that never set this attribute. */
|
|
21
|
+
padding: '' | 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '12' | '16';
|
|
22
22
|
/** Strips background, border, and shadow. Parent owns the surface. Content structure still applies. */
|
|
23
23
|
raw: boolean;
|
|
24
24
|
/** Card scale. Controls inset, radius, gap, and font sizes. Default (empty) = md. */
|
|
@@ -12,11 +12,35 @@ description: Bordered container with header, body, and footer sections. The nest
|
|
|
12
12
|
a [slot="description"] + [slot="action"] space-between pattern; multiple <section> siblings stack as the body.
|
|
13
13
|
props:
|
|
14
14
|
padding:
|
|
15
|
-
description: Interior padding scale
|
|
16
|
-
|
|
15
|
+
description: Interior padding scale — overrides --card-inset (the header/section/footer inset token) for the whole
|
|
16
|
+
card. Accepts the named scale (none/xs/sm/md/lg/xl — the parametric --a-padding-* tokens, same vocabulary as
|
|
17
|
+
block-ui's [padding]) or a literal space rung ("0"/"1"…"10"/"12"/"16", mapped to --a-space-N). Empty (default)
|
|
18
|
+
defers to the ambient --card-inset (context/[size]-driven) — unchanged behavior for the many existing cards
|
|
19
|
+
that never set this attribute.
|
|
17
20
|
type: string
|
|
18
|
-
default:
|
|
19
|
-
|
|
21
|
+
default: ''
|
|
22
|
+
enum:
|
|
23
|
+
- ''
|
|
24
|
+
- none
|
|
25
|
+
- xs
|
|
26
|
+
- sm
|
|
27
|
+
- md
|
|
28
|
+
- lg
|
|
29
|
+
- xl
|
|
30
|
+
- '0'
|
|
31
|
+
- '1'
|
|
32
|
+
- '2'
|
|
33
|
+
- '3'
|
|
34
|
+
- '4'
|
|
35
|
+
- '5'
|
|
36
|
+
- '6'
|
|
37
|
+
- '7'
|
|
38
|
+
- '8'
|
|
39
|
+
- '9'
|
|
40
|
+
- '10'
|
|
41
|
+
- '12'
|
|
42
|
+
- '16'
|
|
43
|
+
reflect: true
|
|
20
44
|
draggable:
|
|
21
45
|
description: Enables drag handle + cursor:grab. Wires the draggable trait; dispatches drag-end.
|
|
22
46
|
type: boolean
|
|
@@ -53,6 +53,14 @@
|
|
|
53
53
|
"component": {
|
|
54
54
|
"const": "Chart"
|
|
55
55
|
},
|
|
56
|
+
"cornerRadius": {
|
|
57
|
+
"description": "Bar corner radius in px (null = let CSS tokens decide)",
|
|
58
|
+
"type": [
|
|
59
|
+
"number",
|
|
60
|
+
"null"
|
|
61
|
+
],
|
|
62
|
+
"default": null
|
|
63
|
+
},
|
|
56
64
|
"data": {
|
|
57
65
|
"description": "JS property (set programmatically — `el.data = [...]`). An array of plain objects; each object's keys are named by the `x` and `y` attributes — e.g. `<chart-ui x=\"month\" y=\"revenue\">` consumes `[{month:'Jan', revenue:3200}, {month:'Feb', revenue:4100}]`. The Chart.js `{labels, datasets}` envelope is NOT chart-ui's API — passing it (or any non-array value) renders an empty chart. May also be supplied declaratively as a JSON-array `data=\"[…]\"` attribute, hydrated once at connect. Custom accessor on the element class, not a reflected attribute.",
|
|
58
66
|
"$ref": "common_types.json#/$defs/DynamicObjectList"
|
|
@@ -99,11 +107,6 @@
|
|
|
99
107
|
"type": "boolean",
|
|
100
108
|
"default": false
|
|
101
109
|
},
|
|
102
|
-
"radius": {
|
|
103
|
-
"description": "Bar corner radius (null = let CSS tokens decide)",
|
|
104
|
-
"type": "number",
|
|
105
|
-
"default": null
|
|
106
|
-
},
|
|
107
110
|
"seriesEmphasis": {
|
|
108
111
|
"description": "Multi-line only. Names one series key (matching a `y` key) to render at full strength — area fill + full-opacity line. Every other series drops its area fill and renders line-only at --chart-deemphasized-opacity. Empty (default) applies full treatment to every series, unchanged from pre-gh#561 behavior.",
|
|
109
112
|
"type": "string",
|
|
@@ -191,6 +194,7 @@
|
|
|
191
194
|
"poll"
|
|
192
195
|
],
|
|
193
196
|
"name": "UIChart",
|
|
197
|
+
"parts": {},
|
|
194
198
|
"related": [
|
|
195
199
|
"button",
|
|
196
200
|
"grid",
|
|
@@ -204,7 +208,7 @@
|
|
|
204
208
|
"description": "Chart rendering area"
|
|
205
209
|
},
|
|
206
210
|
"empty": {
|
|
207
|
-
"description": "Shown in place of the SVG when `.data` is empty or missing. Typically an `<empty-state-ui>` with icon + heading + description + optional action. Visibility is CSS-toggled via `[
|
|
211
|
+
"description": "Shown in place of the SVG when `.data` is empty or missing. Typically an `<empty-state-ui>` with icon + heading + description + optional action. Visibility is CSS-toggled via `[has-data]` on the host — authors don't need to manage it imperatively."
|
|
208
212
|
}
|
|
209
213
|
},
|
|
210
214
|
"states": [
|
|
@@ -213,8 +217,9 @@
|
|
|
213
217
|
"name": "idle"
|
|
214
218
|
},
|
|
215
219
|
{
|
|
216
|
-
"description": "No data — the empty slot (if provided) is rendered; otherwise the chart area renders nothing. Host carries [
|
|
217
|
-
"name": "empty"
|
|
220
|
+
"description": "No data — the empty slot (if provided) is rendered; otherwise the chart area renders nothing. Host carries [has-data] only when data is present (gh#1332 Category A — converged off the private [data-has-data] mirror).",
|
|
221
|
+
"name": "empty",
|
|
222
|
+
"selector": ":not([has-data])"
|
|
218
223
|
}
|
|
219
224
|
],
|
|
220
225
|
"status": "stable",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
* color — accent/success/warning/danger/info
|
|
26
26
|
* hide-grid — hide gridlines
|
|
27
27
|
* hide-values — hide value labels
|
|
28
|
-
* radius
|
|
28
|
+
* corner-radius — bar corner radius in px (default: null, falls back to --a-radius)
|
|
29
29
|
* dots — line/multi-line marker visibility: all|none|hover|last (default: all)
|
|
30
30
|
* series-emphasis — multi-line: series key that keeps full area+line treatment; others render line-only, dimmed
|
|
31
31
|
*
|
|
@@ -219,7 +219,7 @@ export class UIChart extends UIElement {
|
|
|
219
219
|
color: { type: String, default: '', reflect: true },
|
|
220
220
|
hideGrid: { type: Boolean, default: false, reflect: true, attribute: 'hide-grid' },
|
|
221
221
|
hideValues: { type: Boolean, default: false, reflect: true, attribute: 'hide-values' },
|
|
222
|
-
|
|
222
|
+
cornerRadius: { type: Number, default: null, reflect: true, attribute: 'corner-radius' },
|
|
223
223
|
smooth: { type: Number, default: 0.4, reflect: true },
|
|
224
224
|
size: { type: String, default: '', reflect: true },
|
|
225
225
|
format: { type: String, default: 'abbr', reflect: true },
|
|
@@ -255,11 +255,11 @@ export class UIChart extends UIElement {
|
|
|
255
255
|
re-render without a full DOM query. */
|
|
256
256
|
#activeDotEl = null;
|
|
257
257
|
|
|
258
|
-
/** Resolves the corner radius: the `
|
|
258
|
+
/** Resolves the corner radius: the `cornerRadius` prop if explicitly set,
|
|
259
259
|
* otherwise `--a-radius` from the host's computed style. Falls back
|
|
260
260
|
* to 6 if the token is unset (should not happen in practice). */
|
|
261
261
|
#resolveRadius() {
|
|
262
|
-
if (this.
|
|
262
|
+
if (this.cornerRadius != null) return this.cornerRadius;
|
|
263
263
|
const val = getComputedStyle(this).getPropertyValue('--a-radius').trim();
|
|
264
264
|
const parsed = parseFloat(val);
|
|
265
265
|
return Number.isFinite(parsed) && parsed > 0 ? parsed : 6;
|
|
@@ -467,7 +467,7 @@ export class UIChart extends UIElement {
|
|
|
467
467
|
author-provided <* slot="empty"> into a template; subsequent renders
|
|
468
468
|
restore it so data-empty → data-present → data-empty transitions
|
|
469
469
|
don't lose the slotted empty-state-ui. Visibility is CSS-toggled via
|
|
470
|
-
[
|
|
470
|
+
[has-data] on the host. */
|
|
471
471
|
const existingEmpty = this.querySelector(':scope > [slot="empty"]');
|
|
472
472
|
if (existingEmpty && !this.#emptySlotTemplate) {
|
|
473
473
|
this.#emptySlotTemplate = existingEmpty.cloneNode(true);
|
|
@@ -477,10 +477,10 @@ export class UIChart extends UIElement {
|
|
|
477
477
|
if (this.#emptySlotTemplate) this.appendChild(this.#emptySlotTemplate.cloneNode(true));
|
|
478
478
|
|
|
479
479
|
if (!this.#data.length) {
|
|
480
|
-
this.removeAttribute('
|
|
480
|
+
this.removeAttribute('has-data');
|
|
481
481
|
return;
|
|
482
482
|
}
|
|
483
|
-
this.setAttribute('
|
|
483
|
+
this.setAttribute('has-data', '');
|
|
484
484
|
|
|
485
485
|
/* gh#561 — the DOM this pointed at is about to be wiped; drop the
|
|
486
486
|
reference so a stale node isn't held onto (its data-dot-active
|
|
@@ -1044,7 +1044,7 @@ export class UIChart extends UIElement {
|
|
|
1044
1044
|
const safeRange = tickRange || 1; // Prevent division by zero
|
|
1045
1045
|
for (const t of displayTicks) {
|
|
1046
1046
|
const gy = p.top + (height - p.top - p.bottom) * (1 - (t - ticks[0]) / safeRange);
|
|
1047
|
-
s += `<line data-grid x1="${p.left}" y1="${gy}" x2="${width - p.right}" y2="${gy}"/>`;
|
|
1047
|
+
s += `<line data-chart-grid x1="${p.left}" y1="${gy}" x2="${width - p.right}" y2="${gy}"/>`;
|
|
1048
1048
|
}
|
|
1049
1049
|
|
|
1050
1050
|
/* Y-axis labels */
|
|
@@ -1315,7 +1315,7 @@ export class UIChart extends UIElement {
|
|
|
1315
1315
|
ring += (i === 0 ? 'M' : 'L') + ` ${px} ${py}`;
|
|
1316
1316
|
}
|
|
1317
1317
|
ring += ' Z';
|
|
1318
|
-
svg += `<path data-grid d="${ring}"/>`;
|
|
1318
|
+
svg += `<path data-chart-grid d="${ring}"/>`;
|
|
1319
1319
|
}
|
|
1320
1320
|
|
|
1321
1321
|
/* Axis lines */
|
|
@@ -1323,7 +1323,7 @@ export class UIChart extends UIElement {
|
|
|
1323
1323
|
const a = -Math.PI / 2 + angleStep * i;
|
|
1324
1324
|
const px = cx + r * Math.cos(a);
|
|
1325
1325
|
const py = cy + r * Math.sin(a);
|
|
1326
|
-
svg += `<line data-grid x1="${cx}" y1="${cy}" x2="${px}" y2="${py}"/>`;
|
|
1326
|
+
svg += `<line data-chart-grid x1="${cx}" y1="${cy}" x2="${px}" y2="${py}"/>`;
|
|
1327
1327
|
}
|
|
1328
1328
|
|
|
1329
1329
|
/* Data polygon + per-vertex hit targets */
|
|
@@ -108,10 +108,12 @@
|
|
|
108
108
|
[data-legend] { flex: 0 0 auto; }
|
|
109
109
|
|
|
110
110
|
/* Empty-state slot — author places <empty-state-ui slot="empty"> inside
|
|
111
|
-
chart-ui. CSS toggles visibility on [
|
|
112
|
-
when .data is non-empty
|
|
111
|
+
chart-ui. CSS toggles visibility on [has-data] (set by chart.class.js
|
|
112
|
+
when .data is non-empty; gh#1332 Category A — converged off the
|
|
113
|
+
private [data-has-data] mirror). No data ⇒ empty-state visible;
|
|
114
|
+
data ⇒ hidden. */
|
|
113
115
|
& > [slot="empty"] { display: none; }
|
|
114
|
-
:scope:not([
|
|
116
|
+
:scope:not([has-data]) > [slot="empty"] {
|
|
115
117
|
display: flex;
|
|
116
118
|
flex: 1 1 auto;
|
|
117
119
|
align-items: center;
|
|
@@ -150,7 +152,7 @@
|
|
|
150
152
|
|
|
151
153
|
/* ── Grid lines ── */
|
|
152
154
|
|
|
153
|
-
[data-grid] {
|
|
155
|
+
[data-chart-grid] {
|
|
154
156
|
stroke: var(--chart-grid);
|
|
155
157
|
stroke-width: 1;
|
|
156
158
|
fill: none;
|
|
@@ -176,7 +178,7 @@
|
|
|
176
178
|
|
|
177
179
|
[data-value] {
|
|
178
180
|
font-size: var(--chart-font-size);
|
|
179
|
-
font-weight:
|
|
181
|
+
font-weight: var(--a-weight-semibold);
|
|
180
182
|
fill: var(--chart-value);
|
|
181
183
|
font-family: var(--chart-font);
|
|
182
184
|
}
|
|
@@ -265,7 +267,7 @@
|
|
|
265
267
|
[data-avg-label] {
|
|
266
268
|
fill: var(--chart-avg);
|
|
267
269
|
font-family: var(--chart-font);
|
|
268
|
-
font-weight:
|
|
270
|
+
font-weight: var(--a-weight-semibold);
|
|
269
271
|
}
|
|
270
272
|
|
|
271
273
|
/* ── Radar ── */
|
|
@@ -388,7 +390,7 @@
|
|
|
388
390
|
/* ── Donut center text ── */
|
|
389
391
|
|
|
390
392
|
[data-donut-total] {
|
|
391
|
-
font-weight:
|
|
393
|
+
font-weight: var(--a-weight-bold);
|
|
392
394
|
fill: var(--chart-fg);
|
|
393
395
|
font-family: var(--chart-font);
|
|
394
396
|
/* font-size set by JS on the element — scales with donut radius */
|
|
@@ -719,7 +721,7 @@
|
|
|
719
721
|
color: var(--chart-tooltip-fg);
|
|
720
722
|
font-family: var(--a-font-family);
|
|
721
723
|
font-size: var(--a-ui-sm);
|
|
722
|
-
line-height:
|
|
724
|
+
line-height: var(--a-font-leading-normal);
|
|
723
725
|
border: none;
|
|
724
726
|
border-radius: var(--chart-tooltip-radius);
|
|
725
727
|
box-shadow: var(--chart-tooltip-shadow);
|
|
@@ -741,11 +743,11 @@
|
|
|
741
743
|
font-size: var(--a-ui-tiny);
|
|
742
744
|
opacity: 0.75;
|
|
743
745
|
text-transform: uppercase;
|
|
744
|
-
letter-spacing:
|
|
746
|
+
letter-spacing: var(--a-font-tracking-wide);
|
|
745
747
|
}
|
|
746
748
|
|
|
747
749
|
.chart-tooltip-popup [data-tip-role="label"] {
|
|
748
|
-
font-weight:
|
|
750
|
+
font-weight: var(--a-weight-medium);
|
|
749
751
|
}
|
|
750
752
|
|
|
751
753
|
.chart-tooltip-popup [data-tip-role="value"] {
|
|
@@ -22,6 +22,8 @@ export class UIChart extends UIElement {
|
|
|
22
22
|
type: 'bar' | 'line' | 'pie' | 'donut' | 'radar' | 'sparkline' | 'segments' | 'area' | 'scatter' | 'radial-bar' | 'gauge' | 'stacked-bar' | 'grouped-bar' | 'multi-line' | 'funnel' | 'treemap' | 'sankey' | 'composed';
|
|
23
23
|
/** Color scheme */
|
|
24
24
|
color: 'accent' | 'success' | 'warning' | 'danger' | 'info';
|
|
25
|
+
/** Bar corner radius in px (null = let CSS tokens decide) */
|
|
26
|
+
cornerRadius: number | null;
|
|
25
27
|
/** JS property (set programmatically — `el.data = [...]`). An array of plain objects; each object's keys are named by the `x` and `y` attributes — e.g. `<chart-ui x="month" y="revenue">` consumes `[{month:'Jan', revenue:3200}, {month:'Feb', revenue:4100}]`. The Chart.js `{labels, datasets}` envelope is NOT chart-ui's API — passing it (or any non-array value) renders an empty chart. May also be supplied declaratively as a JSON-array `data="[…]"` attribute, hydrated once at connect. Custom accessor on the element class, not a reflected attribute. */
|
|
26
28
|
data: string;
|
|
27
29
|
/** Marker (dot) visibility for line and multi-line series. `all` draws a circle[data-dot] on every datum (default — matches pre-gh#561 behavior). `none` hides all dots so a dense series reads as a clean line. `hover` shows only the currently-hovered datum's dot. `last` shows only the terminal point per series (sparkline convention). Tooltip hit targets ([data-hit]) are a separate always-rendered layer — every mode keeps hover/click working along the whole line. */
|
|
@@ -36,8 +38,6 @@ export class UIChart extends UIElement {
|
|
|
36
38
|
hideValues: boolean;
|
|
37
39
|
/** Show a skeleton placeholder instead of the chart body. Set to true while data is being fetched; clear once data arrives. Preserves the element's aspect-ratio dimensions so the skeleton occupies the same space the chart will fill. Parity with stat-ui[loading] and table-ui[loading] (§FB-12, v0.6.27). */
|
|
38
40
|
loading: boolean;
|
|
39
|
-
/** Bar corner radius (null = let CSS tokens decide) */
|
|
40
|
-
radius: number;
|
|
41
41
|
/** Multi-line only. Names one series key (matching a `y` key) to render at full strength — area fill + full-opacity line. Every other series drops its area fill and renders line-only at --chart-deemphasized-opacity. Empty (default) applies full treatment to every series, unchanged from pre-gh#561 behavior. */
|
|
42
42
|
seriesEmphasis: string;
|
|
43
43
|
/** Chart size */
|
|
@@ -76,10 +76,11 @@ props:
|
|
|
76
76
|
type: boolean
|
|
77
77
|
default: false
|
|
78
78
|
attribute: hide-values
|
|
79
|
-
|
|
80
|
-
description: Bar corner radius (null = let CSS tokens decide)
|
|
79
|
+
cornerRadius:
|
|
80
|
+
description: Bar corner radius in px (null = let CSS tokens decide)
|
|
81
81
|
type: number
|
|
82
82
|
default: null
|
|
83
|
+
attribute: corner-radius
|
|
83
84
|
size:
|
|
84
85
|
description: Chart size
|
|
85
86
|
type: string
|
|
@@ -178,7 +179,7 @@ slots:
|
|
|
178
179
|
description: >-
|
|
179
180
|
Shown in place of the SVG when `.data` is empty or missing. Typically an
|
|
180
181
|
`<empty-state-ui>` with icon + heading + description + optional action.
|
|
181
|
-
Visibility is CSS-toggled via `[
|
|
182
|
+
Visibility is CSS-toggled via `[has-data]` on the host — authors
|
|
182
183
|
don't need to manage it imperatively.
|
|
183
184
|
states:
|
|
184
185
|
- name: idle
|
|
@@ -186,8 +187,10 @@ states:
|
|
|
186
187
|
- name: empty
|
|
187
188
|
description: >-
|
|
188
189
|
No data — the empty slot (if provided) is rendered; otherwise the chart
|
|
189
|
-
area renders nothing. Host carries [
|
|
190
|
-
is present
|
|
190
|
+
area renders nothing. Host carries [has-data] only when data
|
|
191
|
+
is present (gh#1332 Category A — converged off the private
|
|
192
|
+
[data-has-data] mirror).
|
|
193
|
+
selector: ":not([has-data])"
|
|
191
194
|
traits: []
|
|
192
195
|
tokens: {}
|
|
193
196
|
a2ui:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://adiaui.dev/a2ui/v0_9/components/
|
|
4
|
-
"title": "
|
|
3
|
+
"$id": "https://adiaui.dev/a2ui/v0_9/components/UIChatThread.json",
|
|
4
|
+
"title": "UIChatThread",
|
|
5
5
|
"description": "Primitive chat message thread surface — a minimal scroll container\nfor ad-hoc message rendering. Distinct from the bespoke shell\nchild <chat-thread> (module-tier, lives inside <chat-shell>, owns\nscroll-to-bottom + [streaming] + [empty] reflected state). Use\nchat-thread-ui when embedding chat-like rows OUTSIDE a chat-shell\n(e.g. a comment thread inside <card-ui>); use <chat-thread> when\nauthoring a chat-shell.\n",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"allOf": [
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
],
|
|
15
15
|
"properties": {
|
|
16
16
|
"component": {
|
|
17
|
-
"const": "
|
|
17
|
+
"const": "UIChatThread"
|
|
18
18
|
},
|
|
19
19
|
"streaming": {
|
|
20
20
|
"description": "Component property: streaming.",
|
|
@@ -48,22 +48,22 @@
|
|
|
48
48
|
"examples": [
|
|
49
49
|
{
|
|
50
50
|
"description": "Basic Chat usage",
|
|
51
|
-
"a2ui": "[\n {\n \"id\": \"root\",\n \"component\": \"Card\",\n \"children\": [\n \"sec\"\n ]\n },\n {\n \"id\": \"sec\",\n \"component\": \"Section\",\n \"children\": [\n \"comp\"\n ]\n },\n {\n \"id\": \"comp\",\n \"component\": \"
|
|
51
|
+
"a2ui": "[\n {\n \"id\": \"root\",\n \"component\": \"Card\",\n \"children\": [\n \"sec\"\n ]\n },\n {\n \"id\": \"sec\",\n \"component\": \"Section\",\n \"children\": [\n \"comp\"\n ]\n },\n {\n \"id\": \"comp\",\n \"component\": \"UIChatThread\"\n }\n]",
|
|
52
52
|
"name": "basic-chat"
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
|
-
"description": "Chat transcript with user and assistant messages;
|
|
56
|
-
"a2ui": "[\n {\n \"id\": \"root\",\n \"component\": \"
|
|
55
|
+
"description": "Chat transcript with user and assistant messages; textContent prefixes the speaker (Text has no role/streaming prop).",
|
|
56
|
+
"a2ui": "[\n {\n \"id\": \"root\",\n \"component\": \"UIChatThread\",\n \"children\": [\n \"m1\",\n \"m2\"\n ]\n },\n {\n \"id\": \"m1\",\n \"component\": \"Text\",\n \"textContent\": \"User: What's the capital of France?\"\n },\n {\n \"id\": \"m2\",\n \"component\": \"Text\",\n \"textContent\": \"Assistant: The capital of France is Paris.\"\n }\n]",
|
|
57
57
|
"name": "basic"
|
|
58
58
|
},
|
|
59
59
|
{
|
|
60
|
-
"description": "Chat with streaming
|
|
61
|
-
"a2ui": "[\n {\n \"id\": \"root\",\n \"component\": \"
|
|
60
|
+
"description": "Chat with the container's own streaming indicator on while an assistant message is in progress (streaming is a UIChatThread prop, not a Text prop).",
|
|
61
|
+
"a2ui": "[\n {\n \"id\": \"root\",\n \"component\": \"UIChatThread\",\n \"streaming\": true,\n \"children\": [\n \"m1\",\n \"m2\"\n ]\n },\n {\n \"id\": \"m1\",\n \"component\": \"Text\",\n \"textContent\": \"User: Explain black holes briefly.\"\n },\n {\n \"id\": \"m2\",\n \"component\": \"Text\",\n \"textContent\": \"Assistant: A black hole is a region of spacetime where gravity is so strong that\"\n }\n]",
|
|
62
62
|
"name": "streaming"
|
|
63
63
|
},
|
|
64
64
|
{
|
|
65
65
|
"description": "Chat transcript composed with ChatInput for a full conversation surface.",
|
|
66
|
-
"a2ui": "[\n {\n \"id\": \"root\",\n \"component\": \"Column\",\n \"gap\": \"2\",\n \"children\": [\n \"chat\",\n \"input\"\n ]\n },\n {\n \"id\": \"chat\",\n \"component\": \"
|
|
66
|
+
"a2ui": "[\n {\n \"id\": \"root\",\n \"component\": \"Column\",\n \"gap\": \"2\",\n \"children\": [\n \"chat\",\n \"input\"\n ]\n },\n {\n \"id\": \"chat\",\n \"component\": \"UIChatThread\",\n \"children\": [\n \"m1\",\n \"m2\"\n ]\n },\n {\n \"id\": \"m1\",\n \"component\": \"Text\",\n \"textContent\": \"User: Give me a short haiku about the ocean.\"\n },\n {\n \"id\": \"m2\",\n \"component\": \"Text\",\n \"textContent\": \"Assistant: Waves whisper secrets — the tide retreats then returns, carrying the moon.\"\n },\n {\n \"id\": \"input\",\n \"component\": \"ChatInput\",\n \"placeholder\": \"Type a message...\"\n }\n]",
|
|
67
67
|
"name": "with-input"
|
|
68
68
|
}
|
|
69
69
|
],
|
|
@@ -87,6 +87,7 @@
|
|
|
87
87
|
"support"
|
|
88
88
|
],
|
|
89
89
|
"name": "UIChatThread",
|
|
90
|
+
"parts": {},
|
|
90
91
|
"related": [
|
|
91
92
|
"ChatThread",
|
|
92
93
|
"List",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
--chat-msg-avatar-size-font: var(--a-ui-sm);
|
|
51
51
|
--chat-msg-avatar-weight: var(--a-weight-semibold);
|
|
52
52
|
--chat-bubble-font-size: var(--a-body-size);
|
|
53
|
-
--chat-bubble-line-height: var(--a-leading-
|
|
53
|
+
--chat-bubble-line-height: var(--a-font-leading-relaxed);
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
:scope {
|
|
@@ -4,7 +4,7 @@ $schema: ../../../../scripts/schemas/component.yaml.schema.json
|
|
|
4
4
|
name: UIChatThread
|
|
5
5
|
tag: chat-thread-ui
|
|
6
6
|
status: stable
|
|
7
|
-
component:
|
|
7
|
+
component: UIChatThread
|
|
8
8
|
category: agent
|
|
9
9
|
version: 1
|
|
10
10
|
description: |
|
|
@@ -70,16 +70,16 @@ examples:
|
|
|
70
70
|
},
|
|
71
71
|
{
|
|
72
72
|
"id": "comp",
|
|
73
|
-
"component": "
|
|
73
|
+
"component": "UIChatThread"
|
|
74
74
|
}
|
|
75
75
|
]
|
|
76
76
|
- name: basic
|
|
77
|
-
description: Chat transcript with user and assistant messages;
|
|
77
|
+
description: Chat transcript with user and assistant messages; textContent prefixes the speaker (Text has no role/streaming prop).
|
|
78
78
|
a2ui: >-
|
|
79
79
|
[
|
|
80
80
|
{
|
|
81
81
|
"id": "root",
|
|
82
|
-
"component": "
|
|
82
|
+
"component": "UIChatThread",
|
|
83
83
|
"children": [
|
|
84
84
|
"m1",
|
|
85
85
|
"m2"
|
|
@@ -88,23 +88,21 @@ examples:
|
|
|
88
88
|
{
|
|
89
89
|
"id": "m1",
|
|
90
90
|
"component": "Text",
|
|
91
|
-
"
|
|
92
|
-
"textContent": "What's the capital of France?"
|
|
91
|
+
"textContent": "User: What's the capital of France?"
|
|
93
92
|
},
|
|
94
93
|
{
|
|
95
94
|
"id": "m2",
|
|
96
95
|
"component": "Text",
|
|
97
|
-
"
|
|
98
|
-
"textContent": "The capital of France is Paris."
|
|
96
|
+
"textContent": "Assistant: The capital of France is Paris."
|
|
99
97
|
}
|
|
100
98
|
]
|
|
101
99
|
- name: streaming
|
|
102
|
-
description: Chat with streaming
|
|
100
|
+
description: Chat with the container's own streaming indicator on while an assistant message is in progress (streaming is a UIChatThread prop, not a Text prop).
|
|
103
101
|
a2ui: >-
|
|
104
102
|
[
|
|
105
103
|
{
|
|
106
104
|
"id": "root",
|
|
107
|
-
"component": "
|
|
105
|
+
"component": "UIChatThread",
|
|
108
106
|
"streaming": true,
|
|
109
107
|
"children": [
|
|
110
108
|
"m1",
|
|
@@ -114,15 +112,12 @@ examples:
|
|
|
114
112
|
{
|
|
115
113
|
"id": "m1",
|
|
116
114
|
"component": "Text",
|
|
117
|
-
"
|
|
118
|
-
"textContent": "Explain black holes briefly."
|
|
115
|
+
"textContent": "User: Explain black holes briefly."
|
|
119
116
|
},
|
|
120
117
|
{
|
|
121
118
|
"id": "m2",
|
|
122
119
|
"component": "Text",
|
|
123
|
-
"
|
|
124
|
-
"streaming": true,
|
|
125
|
-
"textContent": "A black hole is a region of spacetime where gravity is so strong that"
|
|
120
|
+
"textContent": "Assistant: A black hole is a region of spacetime where gravity is so strong that"
|
|
126
121
|
}
|
|
127
122
|
]
|
|
128
123
|
- name: with-input
|
|
@@ -140,7 +135,7 @@ examples:
|
|
|
140
135
|
},
|
|
141
136
|
{
|
|
142
137
|
"id": "chat",
|
|
143
|
-
"component": "
|
|
138
|
+
"component": "UIChatThread",
|
|
144
139
|
"children": [
|
|
145
140
|
"m1",
|
|
146
141
|
"m2"
|
|
@@ -149,14 +144,12 @@ examples:
|
|
|
149
144
|
{
|
|
150
145
|
"id": "m1",
|
|
151
146
|
"component": "Text",
|
|
152
|
-
"
|
|
153
|
-
"textContent": "Give me a short haiku about the ocean."
|
|
147
|
+
"textContent": "User: Give me a short haiku about the ocean."
|
|
154
148
|
},
|
|
155
149
|
{
|
|
156
150
|
"id": "m2",
|
|
157
151
|
"component": "Text",
|
|
158
|
-
"
|
|
159
|
-
"textContent": "Waves whisper secrets — the tide retreats then returns, carrying the moon."
|
|
152
|
+
"textContent": "Assistant: Waves whisper secrets — the tide retreats then returns, carrying the moon."
|
|
160
153
|
},
|
|
161
154
|
{
|
|
162
155
|
"id": "input",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"wrong": "<field-ui inline label=\"Agree\">\n <check-ui></check-ui>\n</field-ui>\n"
|
|
77
77
|
}
|
|
78
78
|
],
|
|
79
|
-
"category": "
|
|
79
|
+
"category": "input",
|
|
80
80
|
"composes": [],
|
|
81
81
|
"events": {
|
|
82
82
|
"change": {
|
|
@@ -94,19 +94,20 @@
|
|
|
94
94
|
"check"
|
|
95
95
|
],
|
|
96
96
|
"name": "UICheck",
|
|
97
|
-
"
|
|
98
|
-
"Switch",
|
|
99
|
-
"Radio",
|
|
100
|
-
"Field"
|
|
101
|
-
],
|
|
102
|
-
"slots": {
|
|
97
|
+
"parts": {
|
|
103
98
|
"box": {
|
|
104
|
-
"description": "Visual checkbox indicator"
|
|
99
|
+
"description": "Visual checkbox indicator — template-owned anatomy part, not a light-DOM insertion point"
|
|
105
100
|
},
|
|
106
101
|
"label": {
|
|
107
|
-
"description": "Label text beside the checkbox"
|
|
102
|
+
"description": "Label text beside the checkbox — set via the `label` attribute (rendered by CSS `attr(label)` on `::after`, exposed as `aria-label`); template-owned, not a light-DOM insertion point (gh#1435, gh#1447)"
|
|
108
103
|
}
|
|
109
104
|
},
|
|
105
|
+
"related": [
|
|
106
|
+
"Switch",
|
|
107
|
+
"Radio",
|
|
108
|
+
"Field"
|
|
109
|
+
],
|
|
110
|
+
"slots": {},
|
|
110
111
|
"states": [
|
|
111
112
|
{
|
|
112
113
|
"description": "Default, ready for interaction.",
|