@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
|
@@ -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": [
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
color: var(--otp-input-fg);
|
|
57
57
|
font-family: var(--otp-input-font);
|
|
58
58
|
font-size: var(--otp-input-font-size);
|
|
59
|
-
line-height:
|
|
59
|
+
line-height: var(--a-font-leading-none);
|
|
60
60
|
outline: none;
|
|
61
61
|
transition: border-color var(--otp-input-duration) var(--otp-input-easing);
|
|
62
62
|
/* Hide number spinner */
|
|
@@ -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",
|
package/components/page/page.css
CHANGED
|
@@ -183,7 +183,7 @@
|
|
|
183
183
|
:scope > :where(header, header-ui) > :is(text-ui[variant="display"], text-ui[variant="title"], text-ui[variant="heading"], text-ui[variant="subsection"]):not([slot]),
|
|
184
184
|
:scope > :where(header, header-ui) > [slot="heading"] :is(h1, h2, h3, h4, h5, h6) {
|
|
185
185
|
grid-row: 1;
|
|
186
|
-
line-height:
|
|
186
|
+
line-height: var(--a-font-leading-normal);
|
|
187
187
|
margin: 0;
|
|
188
188
|
}
|
|
189
189
|
|
|
@@ -210,7 +210,7 @@
|
|
|
210
210
|
:scope > :where(header, header-ui) > :is(text-ui[variant="body"], text-ui[variant="caption"]):not([slot]) {
|
|
211
211
|
grid-row: 2;
|
|
212
212
|
grid-column: 1 / -1;
|
|
213
|
-
line-height:
|
|
213
|
+
line-height: var(--a-font-leading-relaxed);
|
|
214
214
|
margin: 0;
|
|
215
215
|
}
|
|
216
216
|
:scope > :where(header, header-ui):has(> [slot="icon"]) > :is([slot="description"], p:not([slot]), small:not([slot])) { grid-column: 2 / -1; }
|
|
@@ -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
|
}
|
|
@@ -141,7 +141,7 @@
|
|
|
141
141
|
color: var(--pane-section-header-fg);
|
|
142
142
|
padding-bottom: var(--pane-col-gap);
|
|
143
143
|
text-transform: uppercase;
|
|
144
|
-
letter-spacing:
|
|
144
|
+
letter-spacing: var(--a-font-tracking-wider);
|
|
145
145
|
font-weight: var(--pane-section-header-weight);
|
|
146
146
|
}
|
|
147
147
|
|
|
@@ -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();
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://adiaui.dev/a2ui/v0_9/components/Progress.json",
|
|
4
4
|
"title": "Progress",
|
|
5
|
-
"description": "
|
|
5
|
+
"description": "Linear progress bar indicator. Value < 0 marks indeterminate state showing animated activity instead of a fill. Bar-only — for circular loading indicators use <spinner-ui> instead (the former `variant=\"spinner\"` render mode was retired; spinner-ui owns circular). Set `label` for a labeled task-list row (label + bar + optional `meta` text in one row, e.g. storage quotas, capacity breakdowns) — absorbed <progress-row-ui>'s row layout directly; that component is now a deprecated alias. Omit `label` for a standalone bar (global loading indicators); for percent-complete inline displays use <stat-ui> instead.",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"allOf": [
|
|
8
8
|
{
|
|
@@ -16,19 +16,23 @@
|
|
|
16
16
|
"component": {
|
|
17
17
|
"const": "Progress"
|
|
18
18
|
},
|
|
19
|
-
"
|
|
20
|
-
"description": "
|
|
21
|
-
"type": "
|
|
22
|
-
"default":
|
|
19
|
+
"label": {
|
|
20
|
+
"description": "Left-hand label text. Presence (non-empty) switches to the labeled row layout — label + bar + optional `meta` in one row; absent = plain bar. Sanctioned Mode Attribute (component-token-contract.md).",
|
|
21
|
+
"type": "string",
|
|
22
|
+
"default": ""
|
|
23
23
|
},
|
|
24
|
-
"
|
|
25
|
-
"description": "
|
|
24
|
+
"meta": {
|
|
25
|
+
"description": "Right-hand meta text shown in row layout (e.g. '32 GB', '4.2k / 10k'). No visible effect without `label`.",
|
|
26
26
|
"type": "string",
|
|
27
|
-
"
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
"default": ""
|
|
28
|
+
},
|
|
29
|
+
"value": {
|
|
30
|
+
"description": "Current progress, 0-100 (clamped). null = indeterminate (legacy -1 accepted for back-compat).",
|
|
31
|
+
"type": [
|
|
32
|
+
"number",
|
|
33
|
+
"null"
|
|
30
34
|
],
|
|
31
|
-
"default":
|
|
35
|
+
"default": null
|
|
32
36
|
}
|
|
33
37
|
},
|
|
34
38
|
"required": [
|
|
@@ -36,19 +40,30 @@
|
|
|
36
40
|
],
|
|
37
41
|
"unevaluatedProperties": false,
|
|
38
42
|
"x-adiaui": {
|
|
39
|
-
"anti_patterns": [
|
|
40
|
-
|
|
43
|
+
"anti_patterns": [
|
|
44
|
+
{
|
|
45
|
+
"fix": "{\"component\": \"Spinner\"}\n",
|
|
46
|
+
"why": "Progress no longer has a `variant` prop — the spinner render mode\nwas retired. Progress is bar-only now.\n",
|
|
47
|
+
"wrong": "{\"component\": \"Progress\", \"variant\": \"spinner\"}\n"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"fix": "{\"component\": \"Progress\", \"label\": \"CPU\", \"value\": 92}\n",
|
|
51
|
+
"why": "ProgressRow is deprecated — its label+row layout was\nabsorbed into Progress directly.\n",
|
|
52
|
+
"wrong": "{\"component\": \"ProgressRow\", \"label\": \"CPU\", \"value\": 92}\n"
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
"category": "feedback",
|
|
41
56
|
"composes": [],
|
|
42
57
|
"events": {},
|
|
43
58
|
"examples": [
|
|
44
59
|
{
|
|
45
60
|
"description": "Two-column dashboard with quick actions (buttons) and system status (progress bars).",
|
|
46
|
-
"a2ui": "[\n {\n \"id\": \"root\",\n \"component\": \"Grid\",\n \"children\": [\n \"c1\",\n \"c2\"\n ],\n \"columns\": \"2\"\n },\n {\n \"id\": \"c1\",\n \"component\": \"Card\",\n \"children\": [\n \"c1h\",\n \"c1s\"\n ]\n },\n {\n \"id\": \"c1h\",\n \"component\": \"Header\",\n \"children\": [\n \"c1t\"\n ]\n },\n {\n \"id\": \"c1t\",\n \"component\": \"Text\",\n \"slot\": \"heading\",\n \"textContent\": \"Quick Actions\",\n \"variant\": \"section\"\n },\n {\n \"id\": \"c1s\",\n \"component\": \"Section\",\n \"children\": [\n \"c1col\"\n ]\n },\n {\n \"id\": \"c1col\",\n \"component\": \"Column\",\n \"children\": [\n \"b1\",\n \"b2\",\n \"b3\"\n ]\n },\n {\n \"id\": \"b1\",\n \"component\": \"Button\",\n \"text\": \"New Project\",\n \"variant\": \"solid\",\n \"
|
|
61
|
+
"a2ui": "[\n {\n \"id\": \"root\",\n \"component\": \"Grid\",\n \"children\": [\n \"c1\",\n \"c2\"\n ],\n \"columns\": \"2\"\n },\n {\n \"id\": \"c1\",\n \"component\": \"Card\",\n \"children\": [\n \"c1h\",\n \"c1s\"\n ]\n },\n {\n \"id\": \"c1h\",\n \"component\": \"Header\",\n \"children\": [\n \"c1t\"\n ]\n },\n {\n \"id\": \"c1t\",\n \"component\": \"Text\",\n \"slot\": \"heading\",\n \"textContent\": \"Quick Actions\",\n \"variant\": \"section\"\n },\n {\n \"id\": \"c1s\",\n \"component\": \"Section\",\n \"children\": [\n \"c1col\"\n ]\n },\n {\n \"id\": \"c1col\",\n \"component\": \"Column\",\n \"children\": [\n \"b1\",\n \"b2\",\n \"b3\"\n ]\n },\n {\n \"id\": \"b1\",\n \"component\": \"Button\",\n \"text\": \"New Project\",\n \"variant\": \"solid\",\n \"icon\": \"plus\"\n },\n {\n \"id\": \"b2\",\n \"component\": \"Button\",\n \"text\": \"Invite Member\",\n \"variant\": \"outline\",\n \"icon\": \"users\"\n },\n {\n \"id\": \"b3\",\n \"component\": \"Button\",\n \"text\": \"View Reports\",\n \"variant\": \"ghost\",\n \"icon\": \"chart\"\n },\n {\n \"id\": \"c2\",\n \"component\": \"Card\",\n \"children\": [\n \"c2h\",\n \"c2s\"\n ]\n },\n {\n \"id\": \"c2h\",\n \"component\": \"Header\",\n \"children\": [\n \"c2t\"\n ]\n },\n {\n \"id\": \"c2t\",\n \"component\": \"Text\",\n \"slot\": \"heading\",\n \"textContent\": \"System Status\",\n \"variant\": \"section\"\n },\n {\n \"id\": \"c2s\",\n \"component\": \"Section\",\n \"children\": [\n \"c2col\"\n ]\n },\n {\n \"id\": \"c2col\",\n \"component\": \"Column\",\n \"children\": [\n \"p1\",\n \"p2\",\n \"p3\"\n ]\n },\n {\n \"id\": \"p1\",\n \"component\": \"Progress\",\n \"value\": 92,\n \"label\": \"CPU\"\n },\n {\n \"id\": \"p2\",\n \"component\": \"Progress\",\n \"value\": 67,\n \"label\": \"Memory\"\n },\n {\n \"id\": \"p3\",\n \"component\": \"Progress\",\n \"value\": 34,\n \"label\": \"Disk\"\n }\n]",
|
|
47
62
|
"name": "dashboard"
|
|
48
63
|
},
|
|
49
64
|
{
|
|
50
65
|
"description": "User onboarding checklist with progress and checkbox items.",
|
|
51
|
-
"a2ui": "[\n {\n \"id\": \"root\",\n \"component\": \"Card\",\n \"children\": [\n \"hdr\",\n \"sec\"\n ]\n },\n {\n \"id\": \"hdr\",\n \"component\": \"Header\",\n \"children\": [\n \"title\"\n ]\n },\n {\n \"id\": \"title\",\n \"component\": \"Text\",\n \"slot\": \"heading\",\n \"textContent\": \"Getting Started\"\n },\n {\n \"id\": \"sec\",\n \"component\": \"Section\",\n \"children\": [\n \"col\"\n ]\n },\n {\n \"id\": \"col\",\n \"component\": \"Column\",\n \"children\": [\n \"prog\",\n \"c1\",\n \"c2\",\n \"c3\"\n ],\n \"gap\": \"3\"\n },\n {\n \"id\": \"prog\",\n \"component\": \"Progress\",\n \"value\": 33
|
|
66
|
+
"a2ui": "[\n {\n \"id\": \"root\",\n \"component\": \"Card\",\n \"children\": [\n \"hdr\",\n \"sec\"\n ]\n },\n {\n \"id\": \"hdr\",\n \"component\": \"Header\",\n \"children\": [\n \"title\"\n ]\n },\n {\n \"id\": \"title\",\n \"component\": \"Text\",\n \"slot\": \"heading\",\n \"textContent\": \"Getting Started\"\n },\n {\n \"id\": \"sec\",\n \"component\": \"Section\",\n \"children\": [\n \"col\"\n ]\n },\n {\n \"id\": \"col\",\n \"component\": \"Column\",\n \"children\": [\n \"prog\",\n \"c1\",\n \"c2\",\n \"c3\"\n ],\n \"gap\": \"3\"\n },\n {\n \"id\": \"prog\",\n \"component\": \"Progress\",\n \"value\": 33\n },\n {\n \"id\": \"c1\",\n \"component\": \"CheckBox\",\n \"label\": \"Complete your profile\",\n \"checked\": true\n },\n {\n \"id\": \"c2\",\n \"component\": \"CheckBox\",\n \"label\": \"Invite team members\"\n },\n {\n \"id\": \"c3\",\n \"component\": \"CheckBox\",\n \"label\": \"Create your first project\"\n }\n]",
|
|
52
67
|
"name": "onboarding-checklist"
|
|
53
68
|
}
|
|
54
69
|
],
|
|
@@ -69,20 +84,28 @@
|
|
|
69
84
|
"gamification"
|
|
70
85
|
],
|
|
71
86
|
"name": "UIProgress",
|
|
72
|
-
"
|
|
73
|
-
"grid",
|
|
74
|
-
"button",
|
|
75
|
-
"check-box",
|
|
76
|
-
"upload"
|
|
77
|
-
],
|
|
78
|
-
"slots": {
|
|
87
|
+
"parts": {
|
|
79
88
|
"fill": {
|
|
80
|
-
"description": "Bar fill element inside track"
|
|
89
|
+
"description": "Bar fill element inside track — template-owned anatomy part, not a light-DOM insertion point (gh#1447)"
|
|
90
|
+
},
|
|
91
|
+
"label": {
|
|
92
|
+
"description": "Label region — row-layout left-hand text (active when `label` is set)."
|
|
93
|
+
},
|
|
94
|
+
"meta": {
|
|
95
|
+
"description": "Meta region — row-layout right-hand text (active when `label` is set)."
|
|
81
96
|
},
|
|
82
97
|
"track": {
|
|
83
|
-
"description": "Bar track container"
|
|
98
|
+
"description": "Bar track container — template-owned anatomy part, not a light-DOM insertion point (gh#1447)"
|
|
84
99
|
}
|
|
85
100
|
},
|
|
101
|
+
"related": [
|
|
102
|
+
"grid",
|
|
103
|
+
"button",
|
|
104
|
+
"check-box",
|
|
105
|
+
"upload",
|
|
106
|
+
"spinner"
|
|
107
|
+
],
|
|
108
|
+
"slots": {},
|
|
86
109
|
"states": [
|
|
87
110
|
{
|
|
88
111
|
"description": "Default, ready for interaction.",
|
|
@@ -13,40 +13,61 @@
|
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* <progress-ui value="60"></progress-ui>
|
|
16
|
-
* <progress-ui variant="spinner"></progress-ui>
|
|
17
16
|
* <progress-ui></progress-ui> <!-- indeterminate bar -->
|
|
17
|
+
* <progress-ui value="42" label="CPU" meta="4.2 / 10 GHz"></progress-ui> <!-- labeled row -->
|
|
18
18
|
*
|
|
19
|
-
*
|
|
19
|
+
* Linear progress bar indicator. Bar-only — for circular loading
|
|
20
|
+
* indicators use <spinner-ui> instead (the former
|
|
21
|
+
* variant="spinner" render mode was retired; spinner-ui owns circular).
|
|
20
22
|
* value null (absent) = indeterminate, 0-100 = determinate.
|
|
21
23
|
* (Legacy `value="-1"` is still treated as indeterminate for back-compat.)
|
|
24
|
+
*
|
|
25
|
+
* `label` (non-empty) activates the labeled row layout — label + bar +
|
|
26
|
+
* optional `meta` text in one row (absorbed from the now-deprecated
|
|
27
|
+
* <progress-row-ui>, gh#1363 C4). Omit `label` for a plain standalone bar.
|
|
22
28
|
*/
|
|
23
29
|
|
|
24
30
|
import { UIElement } from '../../core/element.js';
|
|
25
31
|
|
|
26
32
|
export class UIProgress extends UIElement {
|
|
27
33
|
static properties = {
|
|
28
|
-
value:
|
|
29
|
-
|
|
34
|
+
value: { type: Number, default: null, reflect: true },
|
|
35
|
+
label: { type: String, default: '', reflect: true },
|
|
36
|
+
meta: { type: String, default: '', reflect: true },
|
|
30
37
|
};
|
|
31
38
|
|
|
32
39
|
static template = () => null;
|
|
33
40
|
|
|
34
41
|
#track = null;
|
|
35
42
|
#fill = null;
|
|
43
|
+
#labelEl = null;
|
|
44
|
+
#metaEl = null;
|
|
36
45
|
|
|
37
46
|
connected() {
|
|
38
47
|
this.setAttribute('role', 'progressbar');
|
|
39
48
|
this.setAttribute('aria-valuemin', '0');
|
|
40
49
|
this.setAttribute('aria-valuemax', '100');
|
|
41
50
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
this.#
|
|
45
|
-
this.#
|
|
46
|
-
this
|
|
47
|
-
|
|
48
|
-
|
|
51
|
+
this.#labelEl = this.querySelector(':scope > [slot="label"]');
|
|
52
|
+
if (!this.#labelEl) {
|
|
53
|
+
this.#labelEl = document.createElement('span');
|
|
54
|
+
this.#labelEl.setAttribute('slot', 'label');
|
|
55
|
+
this.appendChild(this.#labelEl);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
this.#metaEl = this.querySelector(':scope > [slot="meta"]');
|
|
59
|
+
if (!this.#metaEl) {
|
|
60
|
+
this.#metaEl = document.createElement('span');
|
|
61
|
+
this.#metaEl.setAttribute('slot', 'meta');
|
|
62
|
+
this.appendChild(this.#metaEl);
|
|
49
63
|
}
|
|
64
|
+
|
|
65
|
+
this.#track = document.createElement('div');
|
|
66
|
+
this.#track.setAttribute('slot', 'track');
|
|
67
|
+
this.#fill = document.createElement('div');
|
|
68
|
+
this.#fill.setAttribute('slot', 'fill');
|
|
69
|
+
this.#track.appendChild(this.#fill);
|
|
70
|
+
this.appendChild(this.#track);
|
|
50
71
|
}
|
|
51
72
|
|
|
52
73
|
render() {
|
|
@@ -64,11 +85,45 @@ export class UIProgress extends UIElement {
|
|
|
64
85
|
if (this.#fill) {
|
|
65
86
|
this.#fill.style.width = indeterminate ? '100%' : `${clamped}%`;
|
|
66
87
|
}
|
|
88
|
+
|
|
89
|
+
// Row layout — label present (CSS keys off the reflected [label] attr).
|
|
90
|
+
if (this.#labelEl) {
|
|
91
|
+
this.#labelEl.textContent = this.label;
|
|
92
|
+
this.#labelEl.hidden = !this.label;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// meta has no visible effect without label — the row layout (and
|
|
96
|
+
// meta's grid-area placement within it) only activates when label is
|
|
97
|
+
// set; without it there's no grid to place meta INTO, so it would
|
|
98
|
+
// otherwise render as a stray block below the bar (gh#1426 CodeRabbit
|
|
99
|
+
// sweep). When label IS set, the [meta] ATTR owns the text; when
|
|
100
|
+
// absent, authored [slot="meta"] content is left intact instead of
|
|
101
|
+
// being wiped + hidden (progress-row-ui's own gh#502 fix, carried
|
|
102
|
+
// over) — only a genuinely empty meta element hides.
|
|
103
|
+
if (this.#metaEl) {
|
|
104
|
+
if (!this.label) {
|
|
105
|
+
this.#metaEl.hidden = true;
|
|
106
|
+
} else if (this.meta) {
|
|
107
|
+
this.#metaEl.textContent = this.meta;
|
|
108
|
+
this.#metaEl.hidden = false;
|
|
109
|
+
} else {
|
|
110
|
+
this.#metaEl.hidden = !this.#metaEl.hasChildNodes();
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
// ARIA: label the control so screen readers announce "CPU, 42 percent".
|
|
115
|
+
if (this.label) {
|
|
116
|
+
this.setAttribute('aria-label', this.meta ? `${this.label}, ${this.meta}` : this.label);
|
|
117
|
+
} else {
|
|
118
|
+
this.removeAttribute('aria-label');
|
|
119
|
+
}
|
|
67
120
|
}
|
|
68
121
|
|
|
69
122
|
disconnected() {
|
|
70
123
|
this.#track?.remove();
|
|
71
124
|
this.#track = null;
|
|
72
125
|
this.#fill = null;
|
|
126
|
+
this.#labelEl = null;
|
|
127
|
+
this.#metaEl = null;
|
|
73
128
|
}
|
|
74
129
|
}
|