@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
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
*/
|
|
45
45
|
|
|
46
46
|
import { UIElement } from '../../core/element.js';
|
|
47
|
+
import { isNode } from '../../core/dom.js';
|
|
47
48
|
|
|
48
49
|
export class UIListWindow extends UIElement {
|
|
49
50
|
static properties = {
|
|
@@ -616,7 +617,7 @@ export class UIListWindow extends UIElement {
|
|
|
616
617
|
try { content = renderFn(item, index); }
|
|
617
618
|
catch (err) { console.warn('[list-window-ui] render() threw:', err); }
|
|
618
619
|
}
|
|
619
|
-
if (content
|
|
620
|
+
if (isNode(content)) {
|
|
620
621
|
row.appendChild(content);
|
|
621
622
|
} else if (content != null) {
|
|
622
623
|
row.textContent = String(content);
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"wrong": "<mark>matched</mark>"
|
|
41
41
|
}
|
|
42
42
|
],
|
|
43
|
-
"category": "
|
|
43
|
+
"category": "display",
|
|
44
44
|
"composes": [],
|
|
45
45
|
"events": {},
|
|
46
46
|
"examples": [
|
|
@@ -57,6 +57,7 @@
|
|
|
57
57
|
"emphasis"
|
|
58
58
|
],
|
|
59
59
|
"name": "UIMark",
|
|
60
|
+
"parts": {},
|
|
60
61
|
"related": [
|
|
61
62
|
"text",
|
|
62
63
|
"tag"
|
|
@@ -79,6 +79,11 @@ a2ui:
|
|
|
79
79
|
Use slot="icon" / slot="text" only when you need custom markup
|
|
80
80
|
(e.g. <avatar-ui slot="icon">, <kbd slot="trailing"> shortcut
|
|
81
81
|
hint).
|
|
82
|
+
- >-
|
|
83
|
+
<action-item-ui> (child of <action-list-ui>) shares this row contract
|
|
84
|
+
(icon/text/subtitle/value/variant/disabled props, icon/text/subtitle/
|
|
85
|
+
trailing slot overrides) for inline, non-popover command rows — use
|
|
86
|
+
it instead when the surface isn't a <menu-ui> popover (#1363 C5).
|
|
82
87
|
|
|
83
88
|
keywords:
|
|
84
89
|
- menu-item
|
|
@@ -91,6 +96,7 @@ related:
|
|
|
91
96
|
- MenuDivider
|
|
92
97
|
- Button
|
|
93
98
|
- NavItem
|
|
99
|
+
- ActionItem
|
|
94
100
|
|
|
95
101
|
synonyms:
|
|
96
102
|
menu-item: [dropdown-item, menu-row, popover-action]
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
"component": {
|
|
17
17
|
"const": "Menu"
|
|
18
18
|
},
|
|
19
|
-
"
|
|
20
|
-
"description": "
|
|
19
|
+
"offset": {
|
|
20
|
+
"description": "Pixel offset between the anchor (trigger) and the menu popover. Renamed from `[gap]` (gh#1335) — a raw-px number can't share a name with the global Scale-grammar `[gap]` attribute (ADR-0053); matches popover-ui's own `[offset]` (same anchorPopover() helper).",
|
|
21
21
|
"type": "number",
|
|
22
22
|
"default": 4
|
|
23
23
|
},
|
|
@@ -81,6 +81,7 @@
|
|
|
81
81
|
"right-click"
|
|
82
82
|
],
|
|
83
83
|
"name": "UIMenu",
|
|
84
|
+
"parts": {},
|
|
84
85
|
"related": [
|
|
85
86
|
"MenuItem",
|
|
86
87
|
"MenuDivider",
|
|
@@ -35,7 +35,7 @@ export class UIMenu extends UIElement {
|
|
|
35
35
|
static properties = {
|
|
36
36
|
open: { type: Boolean, default: false, reflect: true },
|
|
37
37
|
placement: { type: String, default: 'bottom-start', reflect: true },
|
|
38
|
-
|
|
38
|
+
offset: { type: Number, default: 4, reflect: true },
|
|
39
39
|
};
|
|
40
40
|
|
|
41
41
|
static template = () => null;
|
|
@@ -103,7 +103,7 @@ export class UIMenu extends UIElement {
|
|
|
103
103
|
this.#anchorCleanup?.();
|
|
104
104
|
this.#anchorCleanup = anchorPopover(trigger, pop, {
|
|
105
105
|
placement: this.placement,
|
|
106
|
-
gap: this.
|
|
106
|
+
gap: this.offset,
|
|
107
107
|
});
|
|
108
108
|
|
|
109
109
|
// Focus first enabled item (only when opened via keyboard).
|
|
@@ -22,8 +22,8 @@ export interface MenuActionEventDetail {
|
|
|
22
22
|
export type MenuActionEvent = CustomEvent<MenuActionEventDetail>;
|
|
23
23
|
|
|
24
24
|
export class UIMenu extends UIElement {
|
|
25
|
-
/**
|
|
26
|
-
|
|
25
|
+
/** Pixel offset between the anchor (trigger) and the menu popover. Renamed from `[gap]` (gh#1335) — a raw-px number can't share a name with the global Scale-grammar `[gap]` attribute (ADR-0053); matches popover-ui's own `[offset]` (same anchorPopover() helper). */
|
|
26
|
+
offset: number;
|
|
27
27
|
/** Controls visibility via popover API */
|
|
28
28
|
open: boolean;
|
|
29
29
|
/** Preferred position relative to the anchor element */
|
|
@@ -13,8 +13,8 @@ description: Dropdown action menu with roving focus and keyboard navigation. Use
|
|
|
13
13
|
composes:
|
|
14
14
|
- icon-ui # leading affordances on menu items (created in render)
|
|
15
15
|
props:
|
|
16
|
-
|
|
17
|
-
description:
|
|
16
|
+
offset:
|
|
17
|
+
description: Pixel offset between the anchor (trigger) and the menu popover. Renamed from `[gap]` (gh#1335) — a raw-px number can't share a name with the global Scale-grammar `[gap]` attribute (ADR-0053); matches popover-ui's own `[offset]` (same anchorPopover() helper).
|
|
18
18
|
type: number
|
|
19
19
|
default: 4
|
|
20
20
|
open:
|
|
@@ -83,7 +83,7 @@ a2ui:
|
|
|
83
83
|
Set [placement="top-start"] or [placement="top-end"] when the
|
|
84
84
|
trigger sits near the bottom of the viewport (statusbar / footer
|
|
85
85
|
menus); default [placement="bottom-start"] otherwise. Adjust
|
|
86
|
-
[
|
|
86
|
+
[offset] (default 4px) only when chrome demands it.
|
|
87
87
|
anti_patterns: []
|
|
88
88
|
examples:
|
|
89
89
|
- name: basic-menu
|
|
@@ -78,8 +78,20 @@ export class UINav extends UIElement {
|
|
|
78
78
|
if (this.variant !== 'section') this.#updateTooltips();
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
+
/**
|
|
82
|
+
* Collapsed = explicit [collapsed], or a rail narrower than 96px.
|
|
83
|
+
* linkedom (SSR — gh#1436's render sweep) has no getBoundingClientRect
|
|
84
|
+
* at all, so only the attribute can answer there. (A ZERO rect from a
|
|
85
|
+
* real pre-layout connect is the separate, unswept shape-3 question in
|
|
86
|
+
* ssr-compatibility's failure-shapes.md — not decided here.)
|
|
87
|
+
*/
|
|
88
|
+
get #isCollapsed() {
|
|
89
|
+
return this.collapsed ||
|
|
90
|
+
(typeof this.getBoundingClientRect === 'function' && this.getBoundingClientRect().width <= 96);
|
|
91
|
+
}
|
|
92
|
+
|
|
81
93
|
#updateTooltips() {
|
|
82
|
-
const isCollapsed = this
|
|
94
|
+
const isCollapsed = this.#isCollapsed;
|
|
83
95
|
for (const group of this.querySelectorAll(':scope > nav-group-ui')) {
|
|
84
96
|
const header = group.querySelector(':scope > [slot="header"]');
|
|
85
97
|
if (header) header.title = isCollapsed ? group.text : '';
|
|
@@ -143,8 +155,7 @@ export class UINav extends UIElement {
|
|
|
143
155
|
|
|
144
156
|
const group = e.target.closest('nav-group-ui');
|
|
145
157
|
if (group && this.contains(group)) {
|
|
146
|
-
|
|
147
|
-
if (isCollapsed) {
|
|
158
|
+
if (this.#isCollapsed) {
|
|
148
159
|
// The flyout popover is appended INSIDE the group, so an option
|
|
149
160
|
// click bubbles here after the option's own handler has selected
|
|
150
161
|
// and hidePopover()'d — re-showing would instantly reopen the
|
|
@@ -99,7 +99,9 @@ export class UINavGroup extends UIElement {
|
|
|
99
99
|
// whole subtree includes this host's own [selected], which render()
|
|
100
100
|
// reads anyway; render() writes only the icon's [weight], which the
|
|
101
101
|
// attributeFilter excludes, so the observer can't feed back.
|
|
102
|
-
|
|
102
|
+
// Guarded like the other Observer sites (gh#285 §1 pattern) — SSR shims
|
|
103
|
+
// have no MutationObserver; teardown already uses `?.disconnect()`.
|
|
104
|
+
if (!this.#selectionObserver && typeof MutationObserver !== 'undefined') {
|
|
103
105
|
this.#selectionObserver = new MutationObserver(this.#onChildSelection);
|
|
104
106
|
this.#selectionObserver.observe(this, {
|
|
105
107
|
subtree: true,
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
*/
|
|
25
25
|
|
|
26
26
|
import { UIElement } from '../../core/element.js';
|
|
27
|
+
import { isElement } from '../../core/dom.js';
|
|
27
28
|
|
|
28
29
|
let nextId = 0;
|
|
29
30
|
|
|
@@ -159,6 +160,9 @@ export class UINoodles extends UIElement {
|
|
|
159
160
|
|
|
160
161
|
#scheduleUpdate() {
|
|
161
162
|
if (this.#rafId) return;
|
|
163
|
+
// No rAF (SSR shim — gh#1436's render sweep) → no frame and no layout
|
|
164
|
+
// to measure connectors against; the client redraws on hydrate.
|
|
165
|
+
if (typeof requestAnimationFrame !== 'function') return;
|
|
162
166
|
this.#rafId = requestAnimationFrame(() => {
|
|
163
167
|
this.#rafId = null;
|
|
164
168
|
this.#performUpdate();
|
|
@@ -251,7 +255,7 @@ export class UINoodles extends UIElement {
|
|
|
251
255
|
// ── Element resolution ──────────────────────────────────────
|
|
252
256
|
|
|
253
257
|
#resolveElement(ref) {
|
|
254
|
-
if (ref
|
|
258
|
+
if (isElement(ref)) return ref;
|
|
255
259
|
if (typeof ref === 'string') return this.querySelector(`#${CSS.escape(ref)}`);
|
|
256
260
|
if (typeof ref === 'number') return this.#getPortChildren()[ref] ?? null;
|
|
257
261
|
return null;
|
|
@@ -93,12 +93,13 @@
|
|
|
93
93
|
"input"
|
|
94
94
|
],
|
|
95
95
|
"name": "UIOtpInput",
|
|
96
|
+
"parts": {},
|
|
96
97
|
"related": [
|
|
97
98
|
"button"
|
|
98
99
|
],
|
|
99
100
|
"slots": {
|
|
100
|
-
"
|
|
101
|
-
"description": "
|
|
101
|
+
"digit": {
|
|
102
|
+
"description": "Each digit input box, one per [length] — the component's own real slot=\"digit\" attribute (gh#1461; renamed from the yaml's prior `field` key, which matched no DOM element otp-input-ui stamps). Rebuilt wholesale on every #stamp() (innerHTML wipe + recreate), so this is template-owned in current behavior, not an author-content insertion point; left under slots: here since reclassifying slots:/parts: is gh#1454's charter, not this ticket's."
|
|
102
103
|
}
|
|
103
104
|
},
|
|
104
105
|
"states": [
|
|
@@ -44,8 +44,15 @@ events:
|
|
|
44
44
|
type: string
|
|
45
45
|
description: Combined digits at the moment of the change.
|
|
46
46
|
slots:
|
|
47
|
-
|
|
48
|
-
description:
|
|
47
|
+
digit:
|
|
48
|
+
description: >-
|
|
49
|
+
Each digit input box, one per [length] — the component's own real
|
|
50
|
+
slot="digit" attribute (gh#1461; renamed from the yaml's prior `field`
|
|
51
|
+
key, which matched no DOM element otp-input-ui stamps). Rebuilt
|
|
52
|
+
wholesale on every #stamp() (innerHTML wipe + recreate), so this is
|
|
53
|
+
template-owned in current behavior, not an author-content insertion
|
|
54
|
+
point; left under slots: here since reclassifying slots:/parts: is
|
|
55
|
+
gh#1454's charter, not this ticket's.
|
|
49
56
|
states:
|
|
50
57
|
- name: idle
|
|
51
58
|
description: Default, ready for interaction.
|
|
@@ -31,6 +31,18 @@
|
|
|
31
31
|
"padding": {
|
|
32
32
|
"description": "Page-padding scale from the spacing system. Accepts `0`–`8`\n(mapped to `--a-space-N`). Empty (no value) applies the\n`--page-padding` token; `0` removes padding.\n",
|
|
33
33
|
"type": "string",
|
|
34
|
+
"enum": [
|
|
35
|
+
"",
|
|
36
|
+
"0",
|
|
37
|
+
"1",
|
|
38
|
+
"2",
|
|
39
|
+
"3",
|
|
40
|
+
"4",
|
|
41
|
+
"5",
|
|
42
|
+
"6",
|
|
43
|
+
"7",
|
|
44
|
+
"8"
|
|
45
|
+
],
|
|
34
46
|
"default": ""
|
|
35
47
|
},
|
|
36
48
|
"scroll": {
|
|
@@ -77,6 +89,7 @@
|
|
|
77
89
|
"dashboard-page"
|
|
78
90
|
],
|
|
79
91
|
"name": "UIPage",
|
|
92
|
+
"parts": {},
|
|
80
93
|
"related": [
|
|
81
94
|
"app-shell",
|
|
82
95
|
"card",
|
|
@@ -29,7 +29,7 @@ Centered horizontally via `margin-inline: auto`.
|
|
|
29
29
|
(mapped to `--a-space-N`). Empty (no value) applies the
|
|
30
30
|
`--page-padding` token; `0` removes padding.
|
|
31
31
|
*/
|
|
32
|
-
padding:
|
|
32
|
+
padding: '' | '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8';
|
|
33
33
|
/** Sets the page as a scroll container. `overflow-y: auto`, full
|
|
34
34
|
height, contained overscroll. Use when the page IS the scroll
|
|
35
35
|
surface (standalone pages); leave off when nested inside a parent
|
|
@@ -211,11 +211,12 @@ export class UIPagination extends UIElement {
|
|
|
211
211
|
// state comes from button-ui's primary surface matrix (the
|
|
212
212
|
// canonical token chain) \u2014 not a pagination-tier re-impl.
|
|
213
213
|
el.setAttribute('variant', 'primary');
|
|
214
|
-
|
|
214
|
+
// aria-current="page" alone carries the active-page state — no
|
|
215
|
+
// private data-active mirror (gh#1332 Category A; admin-roster's
|
|
216
|
+
// aria-checked precedent from PR #1438).
|
|
215
217
|
el.setAttribute('aria-current', 'page');
|
|
216
218
|
} else {
|
|
217
219
|
el.setAttribute('variant', this.#restVariant());
|
|
218
|
-
el.removeAttribute('data-active');
|
|
219
220
|
el.removeAttribute('aria-current');
|
|
220
221
|
}
|
|
221
222
|
}
|
|
@@ -78,6 +78,7 @@
|
|
|
78
78
|
"pane"
|
|
79
79
|
],
|
|
80
80
|
"name": "UIPane",
|
|
81
|
+
"parts": {},
|
|
81
82
|
"related": [
|
|
82
83
|
"text-area"
|
|
83
84
|
],
|
|
@@ -93,6 +94,11 @@
|
|
|
93
94
|
{
|
|
94
95
|
"description": "Default, ready for interaction.",
|
|
95
96
|
"name": "idle"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"description": "The resize handle is mid-drag (pointer down through pointerup/pointercancel).",
|
|
100
|
+
"attribute": "resizing",
|
|
101
|
+
"name": "resizing"
|
|
96
102
|
}
|
|
97
103
|
],
|
|
98
104
|
"status": "stable",
|
|
@@ -138,7 +138,7 @@ export class UIPane extends UIElement {
|
|
|
138
138
|
// it, and works under touch. Cursor is locked at the documentElement
|
|
139
139
|
// level so it stays `col-resize` across the whole viewport during drag,
|
|
140
140
|
// not just over the 4px handle. CSS bypasses any width transition while
|
|
141
|
-
// `[
|
|
141
|
+
// `[resizing]` is set, so resizes track the pointer 1:1.
|
|
142
142
|
|
|
143
143
|
#onResizeDown = (e) => {
|
|
144
144
|
if (!e.isPrimary) return;
|
|
@@ -147,7 +147,7 @@ export class UIPane extends UIElement {
|
|
|
147
147
|
this.#startX = e.clientX;
|
|
148
148
|
this.#startW = this.getBoundingClientRect().width;
|
|
149
149
|
this.#pointerId = e.pointerId;
|
|
150
|
-
this.setAttribute('
|
|
150
|
+
this.setAttribute('resizing', '');
|
|
151
151
|
|
|
152
152
|
try { this.#resizeEl.setPointerCapture(e.pointerId); } catch {}
|
|
153
153
|
this.#resizeEl.addEventListener('pointermove', this.#onResizeMove);
|
|
@@ -173,7 +173,7 @@ export class UIPane extends UIElement {
|
|
|
173
173
|
#onResizeUp = () => {
|
|
174
174
|
if (!this.#dragging) return;
|
|
175
175
|
this.#dragging = false;
|
|
176
|
-
this.removeAttribute('
|
|
176
|
+
this.removeAttribute('resizing');
|
|
177
177
|
try { this.#resizeEl?.releasePointerCapture(this.#pointerId); } catch {}
|
|
178
178
|
this.#pointerId = null;
|
|
179
179
|
this.#resizeEl?.removeEventListener('pointermove', this.#onResizeMove);
|
package/components/pane/pane.css
CHANGED
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
width updates track 1:1 instead of interpolating through a consumer-
|
|
59
59
|
declared width transition (e.g. editor-shell's collapse animation).
|
|
60
60
|
Mirrors the admin-sidebar pattern. */
|
|
61
|
-
:scope[
|
|
61
|
+
:scope[resizing] {
|
|
62
62
|
user-select: none;
|
|
63
63
|
transition: none;
|
|
64
64
|
}
|
|
@@ -211,7 +211,7 @@
|
|
|
211
211
|
background: var(--pane-resize-fg-hover);
|
|
212
212
|
}
|
|
213
213
|
|
|
214
|
-
:scope[
|
|
214
|
+
:scope[resizing] [slot="resize"] {
|
|
215
215
|
background: var(--pane-resize-fg-active);
|
|
216
216
|
}
|
|
217
217
|
}
|
|
@@ -71,6 +71,9 @@ slots:
|
|
|
71
71
|
states:
|
|
72
72
|
- name: idle
|
|
73
73
|
description: Default, ready for interaction.
|
|
74
|
+
- name: resizing
|
|
75
|
+
description: The resize handle is mid-drag (pointer down through pointerup/pointercancel).
|
|
76
|
+
attribute: resizing
|
|
74
77
|
traits: []
|
|
75
78
|
tokens: {}
|
|
76
79
|
requiredIcons:
|
|
@@ -16,16 +16,16 @@
|
|
|
16
16
|
"component": {
|
|
17
17
|
"const": "Popover"
|
|
18
18
|
},
|
|
19
|
-
"gap": {
|
|
20
|
-
"description": "Pixel offset between the anchor and the popover",
|
|
21
|
-
"type": "number",
|
|
22
|
-
"default": 4
|
|
23
|
-
},
|
|
24
19
|
"match-width": {
|
|
25
20
|
"description": "Size the content panel to the trigger's width instead of max-content. Opt-in — the default (unset) keeps every existing consumer's content-sized panel unchanged.",
|
|
26
21
|
"type": "boolean",
|
|
27
22
|
"default": false
|
|
28
23
|
},
|
|
24
|
+
"offset": {
|
|
25
|
+
"description": "Pixel offset between the anchor and the popover. Renamed from `[gap]` (gh#1335) — a raw-px number can't share a name with the global Scale-grammar `[gap]` attribute (ADR-0053).",
|
|
26
|
+
"type": "number",
|
|
27
|
+
"default": 4
|
|
28
|
+
},
|
|
29
29
|
"open": {
|
|
30
30
|
"description": "Controls visibility via showPopover()/hidePopover()",
|
|
31
31
|
"type": "boolean",
|
|
@@ -92,13 +92,14 @@
|
|
|
92
92
|
"right-click"
|
|
93
93
|
],
|
|
94
94
|
"name": "UIPopover",
|
|
95
|
+
"parts": {},
|
|
95
96
|
"related": [
|
|
96
97
|
"button",
|
|
97
98
|
"divider"
|
|
98
99
|
],
|
|
99
100
|
"slots": {
|
|
100
101
|
"content": {
|
|
101
|
-
"description": "Popover body — any interactive content. Hoisted to the top-layer via :popover-open when shown. Positioned via the Popover API + CSS Anchor Positioning per [placement] / [
|
|
102
|
+
"description": "Popover body — any interactive content. Hoisted to the top-layer via :popover-open when shown. Positioned via the Popover API + CSS Anchor Positioning per [placement] / [offset]; no manual positioning required."
|
|
102
103
|
},
|
|
103
104
|
"trigger": {
|
|
104
105
|
"description": "Focusable element that opens the popover when activated. Typically <button-ui>, but any focusable element works (button, a link with href). MUST be focusable for keyboard accessibility — bare <span> or <div> children will not respond to keyboard activation. Positioned at the anchor point per [placement]."
|
|
@@ -37,7 +37,7 @@ const HOVER_CLOSE_DELAY = 120;
|
|
|
37
37
|
export class UIPopover extends UIElement {
|
|
38
38
|
static properties = {
|
|
39
39
|
placement: { type: String, default: 'bottom', reflect: true },
|
|
40
|
-
|
|
40
|
+
offset: { type: Number, default: 4, reflect: true },
|
|
41
41
|
open: { type: Boolean, default: false, reflect: true },
|
|
42
42
|
trigger: { type: String, default: 'click', reflect: true },
|
|
43
43
|
matchWidth: { type: Boolean, default: false, reflect: true, attribute: 'match-width' },
|
|
@@ -107,7 +107,7 @@ export class UIPopover extends UIElement {
|
|
|
107
107
|
this.#anchorCleanup?.();
|
|
108
108
|
this.#anchorCleanup = anchorPopover(trigger, content, {
|
|
109
109
|
placement: this.placement,
|
|
110
|
-
gap: this.
|
|
110
|
+
gap: this.offset,
|
|
111
111
|
matchWidth: this.matchWidth,
|
|
112
112
|
});
|
|
113
113
|
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
import { UIElement } from '../../core/element.js';
|
|
14
14
|
|
|
15
15
|
export class UIPopover extends UIElement {
|
|
16
|
-
/** Pixel offset between the anchor and the popover */
|
|
17
|
-
|
|
16
|
+
/** Pixel offset between the anchor and the popover. Renamed from `[gap]` (gh#1335) — a raw-px number can't share a name with the global Scale-grammar `[gap]` attribute (ADR-0053). */
|
|
17
|
+
offset: number;
|
|
18
18
|
/** Controls visibility via showPopover()/hidePopover() */
|
|
19
19
|
open: boolean;
|
|
20
20
|
/** Popover placement */
|
|
@@ -9,8 +9,8 @@ category: container
|
|
|
9
9
|
version: 1
|
|
10
10
|
description: "Popover using Popover API + CSS Anchor Positioning. Triggers: click, hover, manual."
|
|
11
11
|
props:
|
|
12
|
-
|
|
13
|
-
description: Pixel offset between the anchor and the popover
|
|
12
|
+
offset:
|
|
13
|
+
description: Pixel offset between the anchor and the popover. Renamed from `[gap]` (gh#1335) — a raw-px number can't share a name with the global Scale-grammar `[gap]` attribute (ADR-0053).
|
|
14
14
|
type: number
|
|
15
15
|
default: 4
|
|
16
16
|
match-width:
|
|
@@ -60,7 +60,7 @@ slots:
|
|
|
60
60
|
description: >-
|
|
61
61
|
Popover body — any interactive content. Hoisted to the top-layer
|
|
62
62
|
via :popover-open when shown. Positioned via the Popover API +
|
|
63
|
-
CSS Anchor Positioning per [placement] / [
|
|
63
|
+
CSS Anchor Positioning per [placement] / [offset]; no manual
|
|
64
64
|
positioning required.
|
|
65
65
|
states:
|
|
66
66
|
- name: idle
|
|
@@ -91,7 +91,7 @@ a2ui:
|
|
|
91
91
|
width ≈ trigger width). Use `bottom-end` only when the trigger
|
|
92
92
|
sits at the right edge of a container by construction (toolbar
|
|
93
93
|
spillover). Use `top-*` when the trigger sits low in the
|
|
94
|
-
viewport (statusbar). [
|
|
94
|
+
viewport (statusbar). [offset] (default 4px) sets offset from anchor.
|
|
95
95
|
- >-
|
|
96
96
|
[trigger="hover"] is for non-essential disclosure only — never
|
|
97
97
|
use it for popovers containing inputs, destructive actions, or
|
|
@@ -171,7 +171,11 @@ export class UIPreview extends UIElement {
|
|
|
171
171
|
}
|
|
172
172
|
};
|
|
173
173
|
|
|
174
|
-
#
|
|
174
|
+
// No rAF (SSR shim — gh#1436's render sweep) → nothing to measure; the
|
|
175
|
+
// client fits on hydrate.
|
|
176
|
+
#scheduleFit = () => {
|
|
177
|
+
if (typeof requestAnimationFrame === 'function') requestAnimationFrame(this.#fit);
|
|
178
|
+
};
|
|
175
179
|
|
|
176
180
|
#observeFit() {
|
|
177
181
|
this.#scheduleFit();
|