@adia-ai/web-components 0.8.40 → 0.8.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +50 -3
- package/MIGRATION.md +1042 -16
- package/README.md +25 -30
- package/USAGE.md +26 -0
- package/bin/audit-template-children.mjs +556 -0
- package/components/accordion/accordion-item.a2ui.json +4 -0
- package/components/accordion/accordion-item.yaml +2 -0
- package/components/accordion/accordion.a2ui.json +4 -0
- package/components/accordion/accordion.yaml +2 -0
- package/components/action-list/action-item.a2ui.json +24 -2
- package/components/action-list/action-item.yaml +28 -3
- package/components/action-list/action-list.a2ui.json +6 -1
- package/components/action-list/action-list.class.js +52 -11
- package/components/action-list/action-list.css +43 -3
- package/components/action-list/action-list.d.ts +4 -2
- package/components/action-list/action-list.yaml +5 -0
- package/components/adia-mark/adia-mark.a2ui.json +1 -0
- package/components/adia-wordmark/adia-wordmark.a2ui.json +1 -0
- package/components/agent-artifact/agent-artifact.a2ui.json +1 -0
- package/components/agent-feedback-bar/agent-feedback-bar.a2ui.json +6 -5
- package/components/agent-feedback-bar/agent-feedback-bar.yaml +6 -2
- package/components/agent-questions/agent-questions.a2ui.json +1 -0
- package/components/agent-reasoning/agent-reasoning.a2ui.json +6 -5
- package/components/agent-reasoning/agent-reasoning.yaml +6 -2
- package/components/agent-suggestions/agent-suggestions.a2ui.json +11 -2
- package/components/agent-suggestions/agent-suggestions.class.js +2 -1
- package/components/agent-suggestions/agent-suggestions.d.ts +4 -4
- package/components/agent-suggestions/agent-suggestions.yaml +4 -2
- package/components/agent-trace/agent-trace.a2ui.json +6 -5
- package/components/agent-trace/agent-trace.yaml +6 -2
- package/components/alert/alert.a2ui.json +1 -0
- package/components/alert/alert.css +1 -1
- package/components/anchor-bar/anchor-bar.a2ui.json +1 -0
- package/components/aside/aside.a2ui.json +1 -0
- package/components/avatar/avatar-group.a2ui.json +7 -1
- package/components/avatar/avatar-group.yaml +1 -0
- package/components/avatar/avatar.a2ui.json +12 -11
- package/components/avatar/avatar.d.ts +1 -1
- package/components/avatar/avatar.yaml +4 -4
- package/components/badge/badge.a2ui.json +1 -0
- package/components/block/block.a2ui.json +1 -0
- package/components/blockquote/blockquote.a2ui.json +1 -0
- package/components/breadcrumb/breadcrumb.a2ui.json +1 -0
- package/components/button/button.a2ui.json +1 -3
- package/components/button/button.yaml +1 -3
- package/components/calendar-grid/calendar-grid.a2ui.json +1 -0
- package/components/calendar-grid/calendar-grid.class.js +2 -1
- package/components/calendar-picker/calendar-picker.a2ui.json +143 -24
- package/components/calendar-picker/calendar-picker.class.js +490 -197
- package/components/calendar-picker/calendar-picker.css +120 -171
- package/components/calendar-picker/calendar-picker.yaml +225 -47
- package/components/canvas/canvas.a2ui.json +6 -5
- package/components/canvas/canvas.d.ts +37 -0
- package/components/canvas/canvas.js +72 -3
- package/components/canvas/canvas.yaml +6 -2
- package/components/card/card.a2ui.json +25 -2
- package/components/card/card.class.js +3 -0
- package/components/card/card.css +31 -1
- package/components/card/card.d.ts +2 -2
- package/components/card/card.examples.md +3 -3
- package/components/card/card.yaml +28 -4
- package/components/chart/chart.a2ui.json +9 -4
- package/components/chart/chart.class.js +6 -6
- package/components/chart/chart.css +6 -4
- package/components/chart/chart.d.ts +1 -1
- package/components/chart/chart.yaml +5 -3
- package/components/chart-legend/chart-legend.a2ui.json +1 -0
- package/components/chat-thread/chat-input.a2ui.json +1 -0
- package/components/chat-thread/chat-thread.a2ui.json +10 -9
- package/components/chat-thread/chat-thread.yaml +13 -20
- package/components/check/check.a2ui.json +10 -9
- package/components/check/check.yaml +4 -4
- package/components/code/code.a2ui.json +1 -0
- package/components/col/col.a2ui.json +1 -0
- package/components/color-input/color-input.a2ui.json +1 -0
- package/components/color-picker/color-picker.a2ui.json +1 -0
- package/components/combobox/combobox.a2ui.json +3 -2
- package/components/combobox/combobox.yaml +2 -2
- package/components/command/command.a2ui.json +12 -10
- package/components/command/command.class.js +3 -2
- package/components/command/command.yaml +17 -4
- package/components/context-menu/context-menu.a2ui.json +1 -0
- package/components/date-range-picker/date-range-picker.a2ui.json +2 -1
- package/components/date-range-picker/date-range-picker.yaml +1 -1
- package/components/datetime-picker/datetime-picker.a2ui.json +15 -108
- package/components/datetime-picker/datetime-picker.class.js +37 -690
- package/components/datetime-picker/datetime-picker.css +11 -183
- package/components/datetime-picker/datetime-picker.d.ts +4 -5
- package/components/datetime-picker/datetime-picker.yaml +44 -135
- package/components/demo-toggle/demo-toggle.a2ui.json +1 -0
- package/components/demo-toggle/demo-toggle.css +1 -1
- package/components/description-list/description-list.a2ui.json +1 -0
- package/components/display-field/display-field.a2ui.json +1 -0
- package/components/divider/divider.a2ui.json +1 -0
- package/components/drawer/drawer.a2ui.json +1 -3
- package/components/drawer/drawer.css +1 -1
- package/components/drawer/drawer.yaml +0 -2
- package/components/drilldown/drilldown.a2ui.json +22 -20
- package/components/drilldown/drilldown.class.js +4 -3
- package/components/drilldown/drilldown.css +6 -6
- package/components/drilldown/drilldown.yaml +40 -9
- package/components/embed/embed.a2ui.json +6 -5
- package/components/embed/embed.yaml +2 -2
- package/components/empty-state/empty-state.a2ui.json +1 -0
- package/components/feed/feed-item.a2ui.json +25 -5
- package/components/feed/feed-item.yaml +28 -7
- package/components/feed/feed.a2ui.json +9 -2
- package/components/feed/feed.class.js +19 -12
- package/components/feed/feed.css +8 -8
- package/components/feed/feed.yaml +14 -1
- package/components/field/field.a2ui.json +1 -0
- package/components/field/field.examples.md +1 -1
- package/components/fields/fields.a2ui.json +1 -0
- package/components/fields/fields.examples.md +1 -1
- package/components/footer/footer.a2ui.json +1 -0
- package/components/frame/frame.a2ui.json +1 -0
- package/components/grid/grid.a2ui.json +1 -0
- package/components/header/header.a2ui.json +3 -2
- package/components/header/header.yaml +3 -3
- package/components/heatmap/heatmap.a2ui.json +2 -1
- package/components/heatmap/heatmap.class.js +1 -1
- package/components/heatmap/heatmap.css +4 -4
- package/components/heatmap/heatmap.yaml +1 -1
- package/components/icon/icon.a2ui.json +1 -0
- package/components/image/image.a2ui.json +28 -14
- package/components/image/image.class.js +38 -23
- package/components/image/image.css +18 -8
- package/components/image/image.d.ts +2 -2
- package/components/image/image.examples.md +3 -3
- package/components/image/image.yaml +23 -7
- package/components/inline-edit/inline-edit.a2ui.json +1 -0
- package/components/inline-message/inline-message.a2ui.json +3 -1
- package/components/inline-message/inline-message.class.js +3 -1
- package/components/inline-message/inline-message.d.ts +2 -2
- package/components/inline-message/inline-message.yaml +2 -1
- package/components/input/input.a2ui.json +66 -16
- package/components/input/input.class.js +64 -7
- package/components/input/input.css +14 -14
- package/components/input/input.d.ts +9 -4
- package/components/input/input.yaml +83 -10
- package/components/inspector/inspector.a2ui.json +1 -0
- package/components/integration-card/integration-card.a2ui.json +1 -0
- package/components/kbd/kbd.a2ui.json +1 -0
- package/components/link/link.a2ui.json +2 -1
- package/components/link/link.yaml +1 -1
- package/components/list/list-item.a2ui.json +9 -0
- package/components/list/list-item.yaml +12 -0
- package/components/list/list.a2ui.json +9 -3
- package/components/list/list.class.js +14 -1
- package/components/list/list.css +12 -1
- package/components/list/list.d.ts +7 -5
- package/components/list/list.yaml +16 -6
- package/components/list-window/list-window.a2ui.json +1 -0
- package/components/list-window/list-window.class.js +2 -1
- package/components/loading-overlay/loading-overlay.a2ui.json +1 -0
- package/components/mark/mark.a2ui.json +2 -1
- package/components/mark/mark.yaml +1 -1
- package/components/menu/menu-divider.a2ui.json +1 -0
- package/components/menu/menu-item.a2ui.json +3 -1
- package/components/menu/menu-item.yaml +6 -0
- package/components/menu/menu-label.a2ui.json +1 -0
- package/components/menu/menu.a2ui.json +3 -2
- package/components/menu/menu.class.js +2 -2
- package/components/menu/menu.d.ts +2 -2
- package/components/menu/menu.yaml +3 -3
- package/components/modal/modal.a2ui.json +1 -0
- package/components/nav/nav.a2ui.json +1 -0
- package/components/nav/nav.class.js +14 -3
- package/components/nav-group/nav-group.a2ui.json +1 -0
- package/components/nav-group/nav-group.class.js +3 -1
- package/components/nav-item/nav-item.a2ui.json +1 -0
- package/components/noodles/noodles.a2ui.json +1 -0
- package/components/noodles/noodles.class.js +5 -1
- package/components/number-format/number-format.a2ui.json +1 -0
- package/components/option-card/option-card.a2ui.json +1 -0
- package/components/otp-input/otp-input.a2ui.json +3 -2
- package/components/otp-input/otp-input.yaml +9 -2
- package/components/page/page.a2ui.json +13 -0
- package/components/page/page.d.ts +1 -1
- package/components/page/page.yaml +1 -0
- package/components/pagination/pagination.a2ui.json +1 -0
- package/components/pagination/pagination.class.js +3 -2
- package/components/pane/pane.a2ui.json +6 -0
- package/components/pane/pane.class.js +3 -3
- package/components/pane/pane.css +2 -2
- package/components/pane/pane.yaml +3 -0
- package/components/password-strength/password-strength.a2ui.json +1 -0
- package/components/pipeline-status/pipeline-status.a2ui.json +1 -0
- package/components/popover/popover.a2ui.json +7 -6
- package/components/popover/popover.class.js +2 -2
- package/components/popover/popover.d.ts +2 -2
- package/components/popover/popover.yaml +4 -4
- package/components/preview/preview.a2ui.json +1 -0
- package/components/preview/preview.class.js +5 -1
- package/components/progress/progress.a2ui.json +47 -24
- package/components/progress/progress.class.js +66 -11
- package/components/progress/progress.css +44 -26
- package/components/progress/progress.d.ts +7 -5
- package/components/progress/progress.examples.md +2 -2
- package/components/progress/progress.yaml +235 -53
- package/components/progress-row/progress-row.a2ui.json +16 -12
- package/components/progress-row/progress-row.d.ts +2 -2
- package/components/progress-row/progress-row.examples.md +2 -14
- package/components/progress-row/progress-row.yaml +28 -36
- package/components/qr-code/qr-code.a2ui.json +3 -2
- package/components/qr-code/qr-code.class.js +4 -4
- package/components/qr-code/qr-code.css +1 -1
- package/components/qr-code/qr-code.yaml +5 -3
- package/components/radio/radio.a2ui.json +8 -7
- package/components/radio/radio.class.js +8 -0
- package/components/radio/radio.yaml +3 -3
- package/components/radio-group/radio-group.a2ui.json +5 -3
- package/components/radio-group/radio-group.class.js +11 -0
- package/components/radio-group/radio-group.yaml +7 -1
- package/components/range/range.a2ui.json +6 -0
- package/components/range/range.class.js +2 -2
- package/components/range/range.css +2 -2
- package/components/range/range.yaml +3 -0
- package/components/rating/rating.a2ui.json +1 -0
- package/components/relative-time/relative-time.a2ui.json +1 -0
- package/components/richtext/richtext.a2ui.json +2 -1
- package/components/richtext/richtext.yaml +1 -1
- package/components/row/row.a2ui.json +1 -0
- package/components/search/search.a2ui.json +1 -0
- package/components/search/search.class.js +4 -1
- package/components/section/section.a2ui.json +1 -0
- package/components/segment/segment.a2ui.json +21 -10
- package/components/segment/segment.css +15 -0
- package/components/segment/segment.d.ts +2 -1
- package/components/segment/segment.yaml +20 -13
- package/components/segmented/segmented.a2ui.json +36 -7
- package/components/segmented/segmented.class.js +113 -22
- package/components/segmented/segmented.css +3 -0
- package/components/segmented/segmented.d.ts +3 -1
- package/components/segmented/segmented.yaml +80 -8
- package/components/select/select.a2ui.json +18 -13
- package/components/select/select.class.js +61 -37
- package/components/select/select.css +15 -13
- package/components/select/select.yaml +18 -7
- package/components/skeleton/skeleton.a2ui.json +8 -7
- package/components/skeleton/skeleton.class.js +8 -7
- package/components/skeleton/skeleton.css +21 -6
- package/components/skeleton/skeleton.d.ts +2 -2
- package/components/skeleton/skeleton.examples.md +2 -2
- package/components/skeleton/skeleton.yaml +3 -2
- package/components/skip-nav/skip-nav.a2ui.json +1 -0
- package/components/slider/slider.a2ui.json +6 -0
- package/components/slider/slider.class.js +20 -3
- package/components/slider/slider.css +2 -2
- package/components/slider/slider.yaml +3 -0
- package/components/spinner/spinner.a2ui.json +1 -0
- package/components/stack/stack.a2ui.json +1 -0
- package/components/stat/stat.a2ui.json +1 -0
- package/components/stat/stat.js +2 -2
- package/components/step-progress/step-progress.a2ui.json +1 -0
- package/components/step-progress/step-progress.yaml +1 -1
- package/components/stepper/stepper-item.a2ui.json +7 -3
- package/components/stepper/stepper-item.yaml +15 -5
- package/components/stepper/stepper.a2ui.json +5 -1
- package/components/stepper/stepper.class.js +31 -16
- package/components/stepper/stepper.d.ts +1 -1
- package/components/stepper/stepper.yaml +4 -2
- package/components/stream/stream.a2ui.json +1 -0
- package/components/swatch/swatch.a2ui.json +1 -0
- package/components/swiper/swiper.a2ui.json +1 -0
- package/components/swiper/swiper.class.js +5 -1
- package/components/switch/switch.a2ui.json +12 -11
- package/components/switch/switch.css +1 -1
- package/components/switch/switch.yaml +6 -6
- package/components/table/table.a2ui.json +1 -0
- package/components/table/table.class.js +14 -12
- package/components/table/table.css +11 -9
- package/components/table-toolbar/table-toolbar.a2ui.json +1 -0
- package/components/table-toolbar/table-toolbar.class.js +38 -19
- package/components/table-toolbar/table-toolbar.css +1 -1
- package/components/tabs/tab.a2ui.json +9 -0
- package/components/tabs/tab.js +4 -0
- package/components/tabs/tab.yaml +15 -0
- package/components/tabs/tabs.a2ui.json +9 -4
- package/components/tabs/tabs.class.js +13 -1
- package/components/tabs/tabs.css +8 -0
- package/components/tabs/tabs.d.ts +2 -0
- package/components/tabs/tabs.yaml +9 -2
- package/components/tag/tag.a2ui.json +1 -0
- package/components/tags-input/tags-input.a2ui.json +22 -17
- package/components/tags-input/tags-input.class.js +13 -11
- package/components/tags-input/tags-input.css +10 -6
- package/components/tags-input/tags-input.d.ts +16 -7
- package/components/tags-input/tags-input.examples.md +2 -2
- package/components/tags-input/tags-input.yaml +25 -8
- package/components/text/text.a2ui.json +6 -5
- package/components/text/text.css +10 -5
- package/components/text/text.d.ts +2 -2
- package/components/text/text.yaml +9 -4
- package/components/textarea/textarea.a2ui.json +2 -1
- package/components/textarea/textarea.yaml +1 -1
- package/components/theme-provider/theme-provider.a2ui.json +2 -1
- package/components/theme-provider/theme-provider.d.ts +5 -3
- package/components/theme-provider/theme-provider.yaml +5 -3
- package/components/time-picker/time-picker.a2ui.json +1 -0
- package/components/time-picker/time-picker.class.js +4 -2
- package/components/timeline/timeline-item.a2ui.json +26 -3
- package/components/timeline/timeline-item.yaml +22 -7
- package/components/timeline/timeline.a2ui.json +4 -0
- package/components/timeline/timeline.class.js +29 -18
- package/components/timeline/timeline.d.ts +3 -3
- package/components/timeline/timeline.yaml +2 -0
- package/components/toast/toast.a2ui.json +10 -3
- package/components/toast/toast.yaml +20 -13
- package/components/toc/toc.a2ui.json +1 -0
- package/components/toggle-group/toggle-group.a2ui.json +7 -3
- package/components/toggle-group/toggle-group.class.js +40 -1
- package/components/toggle-group/toggle-group.css +6 -1
- package/components/toggle-group/toggle-group.d.ts +2 -2
- package/components/toggle-group/toggle-group.yaml +21 -12
- package/components/toggle-group/toggle-option.a2ui.json +7 -3
- package/components/toggle-group/toggle-option.yaml +13 -7
- package/components/toggle-scheme/toggle-scheme.a2ui.json +2 -1
- package/components/toggle-scheme/toggle-scheme.yaml +1 -1
- package/components/toolbar/toolbar-group.a2ui.json +1 -0
- package/components/toolbar/toolbar.a2ui.json +1 -0
- package/components/toolbar/toolbar.class.js +3 -0
- package/components/tooltip/tooltip.a2ui.json +1 -0
- package/components/tour/tour-step.a2ui.json +4 -0
- package/components/tour/tour-step.yaml +2 -0
- package/components/tour/tour.a2ui.json +4 -0
- package/components/tour/tour.yaml +2 -0
- package/components/tree/tree-item.a2ui.json +5 -0
- package/components/tree/tree-item.yaml +3 -0
- package/components/tree/tree.a2ui.json +4 -0
- package/components/tree/tree.class.js +2 -1
- package/components/tree/tree.yaml +2 -0
- package/components/upload/upload.a2ui.json +8 -1
- package/components/upload/upload.class.js +35 -5
- package/components/upload/upload.css +28 -0
- package/components/upload/upload.d.ts +16 -0
- package/components/upload/upload.yaml +27 -7
- package/components/visually-hidden/visually-hidden.a2ui.json +1 -0
- package/core/dom.d.ts +11 -0
- package/core/dom.js +34 -0
- package/core/form.js +7 -0
- package/core/index.d.ts +1 -0
- package/core/index.js +1 -0
- package/core/responsive.js +16 -4
- package/core/template.js +2 -1
- package/custom-elements.json +437 -489
- package/dist/host.min.css +1 -1
- package/dist/host.sheet.js +1 -1
- package/dist/theme-provider.min.js +5 -5
- package/dist/web-components.min.css +1 -1
- package/dist/web-components.min.js +91 -104
- package/dist/web-components.sheet.js +1 -1
- package/package.json +4 -2
- package/patterns/conversion-funnel/conversion-funnel.examples.html +15 -15
- package/patterns/inline-dialog/inline-dialog.examples.html +2 -2
- package/patterns/inline-dialog/inline-dialog.html +4 -0
- package/patterns/timezone-selector/timezone-selector.examples.html +1 -1
- package/patterns/timezone-selector/timezone-selector.html +2 -2
- package/styles/api/text.css +7 -0
- package/traits/_catalog.json +129 -41
- package/traits/anchor-positioning/anchor-positioning.js +1 -0
- package/traits/announcer/announcer.js +1 -0
- package/traits/arrow-grid-nav/arrow-grid-nav.js +1 -0
- package/traits/attention-pulse/attention-pulse.js +1 -0
- package/traits/count-up/count-up.js +1 -0
- package/traits/define.js +78 -0
- package/traits/focus-restore/focus-restore.js +2 -1
- package/traits/haptic-feedback/haptic-feedback.js +1 -0
- package/traits/input-mask/input-mask.js +1 -0
- package/traits/intersection-observer/intersection-observer.js +1 -0
- package/traits/layout-animation/layout-animation.js +1 -0
- package/traits/noise-texture/noise-texture.js +1 -0
- package/traits/resize-observer/resize-observer.js +1 -0
- package/traits/scroll-progress/scroll-progress.js +1 -0
- package/traits/snap-to-grid/snap-to-grid.js +1 -0
- package/traits/sound-feedback/sound-feedback.js +1 -0
- package/traits/spring-animate/spring-animate.js +1 -0
- package/traits/validation/validation.js +1 -0
|
@@ -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
|
|
@@ -55,7 +55,10 @@
|
|
|
55
55
|
},
|
|
56
56
|
"cornerRadius": {
|
|
57
57
|
"description": "Bar corner radius in px (null = let CSS tokens decide)",
|
|
58
|
-
"type":
|
|
58
|
+
"type": [
|
|
59
|
+
"number",
|
|
60
|
+
"null"
|
|
61
|
+
],
|
|
59
62
|
"default": null
|
|
60
63
|
},
|
|
61
64
|
"data": {
|
|
@@ -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",
|
|
@@ -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;
|
|
@@ -23,7 +23,7 @@ export class UIChart extends UIElement {
|
|
|
23
23
|
/** Color scheme */
|
|
24
24
|
color: 'accent' | 'success' | 'warning' | 'danger' | 'info';
|
|
25
25
|
/** Bar corner radius in px (null = let CSS tokens decide) */
|
|
26
|
-
cornerRadius: number;
|
|
26
|
+
cornerRadius: number | null;
|
|
27
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. */
|
|
28
28
|
data: string;
|
|
29
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. */
|
|
@@ -179,7 +179,7 @@ slots:
|
|
|
179
179
|
description: >-
|
|
180
180
|
Shown in place of the SVG when `.data` is empty or missing. Typically an
|
|
181
181
|
`<empty-state-ui>` with icon + heading + description + optional action.
|
|
182
|
-
Visibility is CSS-toggled via `[
|
|
182
|
+
Visibility is CSS-toggled via `[has-data]` on the host — authors
|
|
183
183
|
don't need to manage it imperatively.
|
|
184
184
|
states:
|
|
185
185
|
- name: idle
|
|
@@ -187,8 +187,10 @@ states:
|
|
|
187
187
|
- name: empty
|
|
188
188
|
description: >-
|
|
189
189
|
No data — the empty slot (if provided) is rendered; otherwise the chart
|
|
190
|
-
area renders nothing. Host carries [
|
|
191
|
-
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])"
|
|
192
194
|
traits: []
|
|
193
195
|
tokens: {}
|
|
194
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",
|
|
@@ -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.",
|
|
@@ -5,7 +5,7 @@ name: UICheck
|
|
|
5
5
|
tag: check-ui
|
|
6
6
|
status: stable
|
|
7
7
|
component: Check
|
|
8
|
-
category:
|
|
8
|
+
category: input
|
|
9
9
|
version: 1
|
|
10
10
|
description: |
|
|
11
11
|
Checkbox primitive — the host IS the control (per ADR-0025, no
|
|
@@ -66,11 +66,11 @@ props:
|
|
|
66
66
|
events:
|
|
67
67
|
change:
|
|
68
68
|
description: Fired when checked state changes
|
|
69
|
-
|
|
69
|
+
parts:
|
|
70
70
|
box:
|
|
71
|
-
description: Visual checkbox indicator
|
|
71
|
+
description: Visual checkbox indicator — template-owned anatomy part, not a light-DOM insertion point
|
|
72
72
|
label:
|
|
73
|
-
description: Label text beside the checkbox
|
|
73
|
+
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)
|
|
74
74
|
states:
|
|
75
75
|
- name: idle
|
|
76
76
|
description: Default, ready for interaction.
|
|
@@ -138,8 +138,8 @@
|
|
|
138
138
|
"wrong": "{\"component\": \"Combobox\", \"value\": \"xx\", \"options\": [{\"value\": \"us\", \"label\": \"United States\"}]}\n"
|
|
139
139
|
},
|
|
140
140
|
{
|
|
141
|
-
"fix": "{\"component\": \"
|
|
142
|
-
"why": "Only 2 options. Combobox is overkill — use
|
|
141
|
+
"fix": "{\"component\": \"Segmented\", \"children\": [{\"component\": \"Segment\", \"value\": \"a\", \"text\": \"A\"}, {\"component\": \"Segment\", \"value\": \"b\", \"text\": \"B\"}]}\n",
|
|
142
|
+
"why": "Only 2 options. Combobox is overkill — use Segmented or Radio.\n",
|
|
143
143
|
"wrong": "{\"component\": \"Combobox\", \"options\": [{\"value\": \"a\", \"label\": \"A\"}, {\"value\": \"b\", \"label\": \"B\"}]}\n"
|
|
144
144
|
},
|
|
145
145
|
{
|
|
@@ -246,6 +246,7 @@
|
|
|
246
246
|
"member-picker"
|
|
247
247
|
],
|
|
248
248
|
"name": "UICombobox",
|
|
249
|
+
"parts": {},
|
|
249
250
|
"related": [
|
|
250
251
|
"select",
|
|
251
252
|
"search",
|
|
@@ -297,9 +297,9 @@ anti_patterns:
|
|
|
297
297
|
- wrong: |
|
|
298
298
|
{"component": "Combobox", "options": [{"value": "a", "label": "A"}, {"value": "b", "label": "B"}]}
|
|
299
299
|
why: |
|
|
300
|
-
Only 2 options. Combobox is overkill — use
|
|
300
|
+
Only 2 options. Combobox is overkill — use Segmented or Radio.
|
|
301
301
|
fix: |
|
|
302
|
-
{"component": "
|
|
302
|
+
{"component": "Segmented", "children": [{"component": "Segment", "value": "a", "text": "A"}, {"component": "Segment", "value": "b", "text": "B"}]}
|
|
303
303
|
- wrong: |
|
|
304
304
|
{"component": "Combobox", "multiple": true, "options": [...]}
|
|
305
305
|
why: |
|
|
@@ -92,6 +92,17 @@
|
|
|
92
92
|
"keybinding"
|
|
93
93
|
],
|
|
94
94
|
"name": "UICommand",
|
|
95
|
+
"parts": {
|
|
96
|
+
"footer": {
|
|
97
|
+
"description": "Keyboard hint bar — template-owned anatomy part, not a light-DOM insertion point (gh#1454). render() unconditionally stamps a fixed `<footer>` with hard-coded kbd hints; no consumer override path exists in source."
|
|
98
|
+
},
|
|
99
|
+
"input": {
|
|
100
|
+
"description": "The auto-stamped search field — a contenteditable=\"plaintext-only\" span carrying role=\"combobox\" (per ADR-0025/ADR-0055; no native <input>). Internal only; not consumer-slottable — template-owned anatomy part, not a light-DOM insertion point (gh#1454)."
|
|
101
|
+
},
|
|
102
|
+
"list": {
|
|
103
|
+
"description": "Container for command items and groups — template-owned anatomy part, not a light-DOM insertion point (gh#1454). render() always populates it wholesale from `.options`/parsed `<option>` children; any pre-existing content is discarded, not adopted."
|
|
104
|
+
}
|
|
105
|
+
},
|
|
95
106
|
"related": [
|
|
96
107
|
"AdminCommand",
|
|
97
108
|
"Menu",
|
|
@@ -100,16 +111,7 @@
|
|
|
100
111
|
],
|
|
101
112
|
"slots": {
|
|
102
113
|
"empty": {
|
|
103
|
-
"description": "Empty state shown when no items match"
|
|
104
|
-
},
|
|
105
|
-
"footer": {
|
|
106
|
-
"description": "Keyboard hint bar"
|
|
107
|
-
},
|
|
108
|
-
"input": {
|
|
109
|
-
"description": "The auto-stamped search field — a contenteditable=\"plaintext-only\" span carrying role=\"combobox\" (per ADR-0025/ADR-0055; no native <input>). Internal only; not consumer-slottable."
|
|
110
|
-
},
|
|
111
|
-
"list": {
|
|
112
|
-
"description": "Container for command items and groups"
|
|
114
|
+
"description": "Empty state shown when no items match. Consumer-supplied [slot=\"empty\"] content is captured before the internal shell renders and re-inserted — a genuine light-DOM insertion point."
|
|
113
115
|
}
|
|
114
116
|
},
|
|
115
117
|
"states": [
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
import { UIElement } from '../../core/element.js';
|
|
15
15
|
import { logicalSlotted } from '../../core/logical-children.js';
|
|
16
|
+
import { isElement } from '../../core/dom.js';
|
|
16
17
|
|
|
17
18
|
function escapeHTML(s) {
|
|
18
19
|
return String(s).replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');
|
|
@@ -69,14 +70,14 @@ export class UICommand extends UIElement {
|
|
|
69
70
|
static #RECENTS_MAX = 3;
|
|
70
71
|
|
|
71
72
|
#onListClick = (e) => {
|
|
72
|
-
const el = e.target
|
|
73
|
+
const el = isElement(e.target) ? e.target.closest('[role="option"]:not([aria-disabled])') : null;
|
|
73
74
|
if (!el) return;
|
|
74
75
|
const item = this.#itemByEl.get(el);
|
|
75
76
|
if (item) this.#select(item);
|
|
76
77
|
};
|
|
77
78
|
|
|
78
79
|
#onListPointerOver = (e) => {
|
|
79
|
-
const el = e.target
|
|
80
|
+
const el = isElement(e.target) ? e.target.closest('[role="option"]:not([aria-disabled])') : null;
|
|
80
81
|
if (!el) return;
|
|
81
82
|
const idx = parseInt(el.dataset.idx);
|
|
82
83
|
if (Number.isFinite(idx) && idx !== this.#activeIdx) this.#activate(idx);
|
|
@@ -64,16 +64,29 @@ events:
|
|
|
64
64
|
description: Parent optgroup label (empty string when item has no group).
|
|
65
65
|
slots:
|
|
66
66
|
empty:
|
|
67
|
-
description:
|
|
67
|
+
description: >-
|
|
68
|
+
Empty state shown when no items match. Consumer-supplied [slot="empty"]
|
|
69
|
+
content is captured before the internal shell renders and re-inserted —
|
|
70
|
+
a genuine light-DOM insertion point.
|
|
71
|
+
parts:
|
|
68
72
|
footer:
|
|
69
|
-
description:
|
|
73
|
+
description: >-
|
|
74
|
+
Keyboard hint bar — template-owned anatomy part, not a light-DOM
|
|
75
|
+
insertion point (gh#1454). render() unconditionally stamps a fixed
|
|
76
|
+
`<footer>` with hard-coded kbd hints; no consumer override path exists
|
|
77
|
+
in source.
|
|
70
78
|
input:
|
|
71
79
|
description: >-
|
|
72
80
|
The auto-stamped search field — a contenteditable="plaintext-only"
|
|
73
81
|
span carrying role="combobox" (per ADR-0025/ADR-0055; no native
|
|
74
|
-
<input>). Internal only; not consumer-slottable
|
|
82
|
+
<input>). Internal only; not consumer-slottable — template-owned
|
|
83
|
+
anatomy part, not a light-DOM insertion point (gh#1454).
|
|
75
84
|
list:
|
|
76
|
-
description:
|
|
85
|
+
description: >-
|
|
86
|
+
Container for command items and groups — template-owned anatomy part,
|
|
87
|
+
not a light-DOM insertion point (gh#1454). render() always populates it
|
|
88
|
+
wholesale from `.options`/parsed `<option>` children; any pre-existing
|
|
89
|
+
content is discarded, not adopted.
|
|
77
90
|
states:
|
|
78
91
|
- name: idle
|
|
79
92
|
description: Default, ready for interaction.
|
|
@@ -192,6 +192,7 @@
|
|
|
192
192
|
"reporting-period"
|
|
193
193
|
],
|
|
194
194
|
"name": "UIDateRangePicker",
|
|
195
|
+
"parts": {},
|
|
195
196
|
"related": [
|
|
196
197
|
"calendar-picker",
|
|
197
198
|
"popover",
|
|
@@ -301,7 +302,7 @@
|
|
|
301
302
|
"default": "var(--a-space-2)"
|
|
302
303
|
},
|
|
303
304
|
"--date-range-picker-selected-bg": {
|
|
304
|
-
"description": "Selected day-cell background (cascaded into the inner calendar via --calendar-
|
|
305
|
+
"description": "Selected day-cell background (cascaded into the inner calendar via --calendar-grid-day-bg-selected).",
|
|
305
306
|
"default": "var(--md-sys-color-primary)"
|
|
306
307
|
},
|
|
307
308
|
"--date-range-picker-selected-fg": {
|