@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
|
@@ -1,183 +1,11 @@
|
|
|
1
|
-
/*
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
/* ── Block 1 — TOKENS ── */
|
|
13
|
-
:where(:scope) {
|
|
14
|
-
--datetime-picker-bg: var(--md-sys-color-neutral-background);
|
|
15
|
-
--datetime-picker-fg: var(--md-sys-color-neutral-on-surface);
|
|
16
|
-
|
|
17
|
-
/* Popover surface */
|
|
18
|
-
--datetime-picker-popover-bg: var(--a-bg-subtle);
|
|
19
|
-
--datetime-picker-popover-border: var(--md-sys-color-neutral-outline-variant);
|
|
20
|
-
--datetime-picker-popover-radius: var(--a-radius-lg);
|
|
21
|
-
--datetime-picker-popover-shadow: var(--a-shadow-lg);
|
|
22
|
-
--datetime-picker-popover-padding: var(--a-space-3);
|
|
23
|
-
--datetime-picker-popover-gap: var(--a-space-3);
|
|
24
|
-
|
|
25
|
-
/* Pane divider */
|
|
26
|
-
--datetime-picker-divider: var(--md-sys-color-neutral-outline-variant);
|
|
27
|
-
|
|
28
|
-
/* Trigger */
|
|
29
|
-
--datetime-picker-trigger-min-width: 16em;
|
|
30
|
-
|
|
31
|
-
/* Padding */
|
|
32
|
-
--datetime-picker-px: var(--a-space-3);
|
|
33
|
-
--datetime-picker-py: var(--a-space-2);
|
|
34
|
-
|
|
35
|
-
/* Motion */
|
|
36
|
-
--datetime-picker-duration: var(--a-duration-fast);
|
|
37
|
-
--datetime-picker-easing: var(--a-easing);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
/* ── Block 2 — BASE ── */
|
|
41
|
-
/* Host is a transparent inline wrapper. Painting `background` on the host
|
|
42
|
-
used to create an off-axis rectangle behind the trigger when the host
|
|
43
|
-
sat inside a field-ui (the field-ui's value-cell expanded but the
|
|
44
|
-
inline-block host only sized to its child). Trigger button-ui paints
|
|
45
|
-
its own surface — host stays transparent.
|
|
46
|
-
2026-05-24 QA: "odd background colors and block element container for
|
|
47
|
-
inline trigger" — consumer report on /site/components/datetime-picker. */
|
|
48
|
-
:scope {
|
|
49
|
-
box-sizing: border-box;
|
|
50
|
-
position: relative;
|
|
51
|
-
display: block;
|
|
52
|
-
color: var(--datetime-picker-fg);
|
|
53
|
-
font-size: var(--a-ui-size);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
/* Display convention (ADR-0037): block-level by default; [inline] opts back to inline-level. */
|
|
57
|
-
:scope[inline] { display: inline-block; }
|
|
58
|
-
|
|
59
|
-
/* Default trigger sizing — composes button-ui's surface; just
|
|
60
|
-
stretches the min-width so "Jan 1, 2026 14:30" fits. Normalize to the
|
|
61
|
-
picker-family field shape (mirrors date-range-picker): value text
|
|
62
|
-
left-aligned with the caret pushed to the trailing edge, not centered
|
|
63
|
-
like a default button. */
|
|
64
|
-
:scope [slot="trigger"] icon-ui[name="caret-down"] {
|
|
65
|
-
/* Universal caret size (gh#1314 sweep) — mirrors select-ui's trigger
|
|
66
|
-
caret so mixed control rows read as one family instead of showing
|
|
67
|
-
the ambient (larger) icon size. */
|
|
68
|
-
--a-icon-size: var(--a-caret-size);
|
|
69
|
-
transition: rotate var(--a-duration-fast) var(--a-easing);
|
|
70
|
-
}
|
|
71
|
-
/* Clear OPEN state: the default trigger's trailing caret flips while the
|
|
72
|
-
picker popover is open (name-guarded; custom trigger glyphs untouched). */
|
|
73
|
-
:scope[open] [slot="trigger"] icon-ui[name="caret-down"] {
|
|
74
|
-
rotate: 180deg;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
:scope [slot="trigger"] {
|
|
78
|
-
min-width: var(--datetime-picker-trigger-min-width);
|
|
79
|
-
justify-content: space-between;
|
|
80
|
-
line-height: 1;
|
|
81
|
-
}
|
|
82
|
-
/* A committed value bumps to --a-ui-text (bright), matching input-ui /
|
|
83
|
-
select-ui / time-picker value color; the empty placeholder keeps
|
|
84
|
-
button-ui's muted outline fg. */
|
|
85
|
-
:scope [slot="trigger"][data-has-value] {
|
|
86
|
-
color: var(--a-ui-text);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
/* States */
|
|
90
|
-
:scope[disabled] {
|
|
91
|
-
opacity: 0.5;
|
|
92
|
-
pointer-events: none;
|
|
93
|
-
}
|
|
94
|
-
:scope[readonly] [slot="trigger"] {
|
|
95
|
-
cursor: default;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
/* ============================================================
|
|
100
|
-
Popover surface — outside @scope (lifted to top layer).
|
|
101
|
-
Custom properties inherit from the host so
|
|
102
|
-
--datetime-picker-* tokens are available here.
|
|
103
|
-
============================================================ */
|
|
104
|
-
|
|
105
|
-
/* §FB-Wave1-QA — `display: grid` MUST be guarded by `:popover-open` so the
|
|
106
|
-
popover honors the UA `popover` `display: none` while closed. */
|
|
107
|
-
datetime-picker-ui [slot="popover"] {
|
|
108
|
-
margin: 0;
|
|
109
|
-
padding: var(--datetime-picker-py) var(--datetime-picker-px);
|
|
110
|
-
border: 1px solid var(--datetime-picker-popover-border);
|
|
111
|
-
border-radius: var(--datetime-picker-popover-radius);
|
|
112
|
-
background: var(--datetime-picker-popover-bg);
|
|
113
|
-
box-shadow: var(--datetime-picker-popover-shadow);
|
|
114
|
-
color: var(--md-sys-color-neutral-on-surface);
|
|
115
|
-
/* Anchor-positioning fallback — popover.css and anchor.js handle
|
|
116
|
-
placement; layout here just sets the grid. */
|
|
117
|
-
inset: auto;
|
|
118
|
-
/* Fade + lift in on first paint via @starting-style. */
|
|
119
|
-
opacity: 1;
|
|
120
|
-
translate: 0 0;
|
|
121
|
-
transition:
|
|
122
|
-
opacity var(--datetime-picker-duration) var(--datetime-picker-easing),
|
|
123
|
-
translate var(--datetime-picker-duration) var(--datetime-picker-easing);
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
datetime-picker-ui [slot="popover"]:popover-open {
|
|
127
|
-
display: grid;
|
|
128
|
-
grid-template-columns: auto auto auto;
|
|
129
|
-
grid-template-areas: "cal divider time";
|
|
130
|
-
gap: var(--datetime-picker-popover-gap);
|
|
131
|
-
align-items: start;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
datetime-picker-ui [slot="popover"]:popover-open {
|
|
135
|
-
@starting-style {
|
|
136
|
-
opacity: 0;
|
|
137
|
-
translate: 0 -4px;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
@media (prefers-reduced-motion: reduce) {
|
|
142
|
-
datetime-picker-ui [slot="popover"] { transition: none; }
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
/* Pane areas. */
|
|
146
|
-
datetime-picker-ui [slot="popover"] > [data-cal-pane] {
|
|
147
|
-
grid-area: cal;
|
|
148
|
-
}
|
|
149
|
-
datetime-picker-ui [slot="popover"] > [data-pane-divider] {
|
|
150
|
-
grid-area: divider;
|
|
151
|
-
align-self: stretch;
|
|
152
|
-
--divider-color: var(--datetime-picker-divider);
|
|
153
|
-
}
|
|
154
|
-
datetime-picker-ui [slot="popover"] > [data-time-pane] {
|
|
155
|
-
grid-area: time;
|
|
156
|
-
align-self: start;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
/* Footer area (consumer-supplied [slot="footer"]) — spans all three
|
|
160
|
-
columns under the panes. */
|
|
161
|
-
datetime-picker-ui [slot="popover"] [slot="footer"] {
|
|
162
|
-
grid-column: 1 / -1;
|
|
163
|
-
display: flex;
|
|
164
|
-
justify-content: flex-end;
|
|
165
|
-
gap: var(--a-space-2);
|
|
166
|
-
padding-block-start: var(--a-space-2);
|
|
167
|
-
border-block-start: 1px solid var(--md-sys-color-neutral-outline-variant);
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
/* Narrow surfaces (e.g. inside a card on mobile): stack the panes
|
|
171
|
-
vertically and replace the vertical divider with a horizontal rule. */
|
|
172
|
-
@container (max-width: 32rem) {
|
|
173
|
-
datetime-picker-ui [slot="popover"]:popover-open {
|
|
174
|
-
grid-template-columns: 1fr;
|
|
175
|
-
grid-template-areas:
|
|
176
|
-
"cal"
|
|
177
|
-
"divider"
|
|
178
|
-
"time";
|
|
179
|
-
}
|
|
180
|
-
datetime-picker-ui [slot="popover"] > [data-pane-divider] {
|
|
181
|
-
align-self: auto;
|
|
182
|
-
}
|
|
183
|
-
}
|
|
1
|
+
/* `<datetime-picker-ui>` is DEPRECATED (gh#1372, #1363 C3c) — a thin
|
|
2
|
+
* `UICalendarPicker` subclass (see datetime-picker.class.js), never its own
|
|
3
|
+
* independent implementation. Its visual contract lives entirely in
|
|
4
|
+
* ../calendar-picker/calendar-picker.css, whose `@scope (calendar-picker-ui,
|
|
5
|
+
* datetime-picker-ui)` root and `:is(calendar-picker-ui, datetime-picker-ui)`
|
|
6
|
+
* popover/pane selectors already cover this tag — one styling source, not
|
|
7
|
+
* two files drifting apart. This file intentionally carries no rules of its
|
|
8
|
+
* own; `packages/web-components/index.css` still imports it so the barrel's
|
|
9
|
+
* per-component import list stays complete and mechanical (no special-cased
|
|
10
|
+
* skip for a deprecated-but-still-shipping tag).
|
|
11
|
+
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `<datetime-picker-ui>` —
|
|
2
|
+
* `<datetime-picker-ui>` — DEPRECATED (gh#1372, #1363 C3c) — folded into <calendar-picker-ui>'s widened `precision` axis. `<datetime-picker-ui>` is now a thin `UICalendarPicker` subclass (see datetime-picker.class.js) rather than an independent implementation: `precision` defaults to `"minute"` (not `"date"`) and `placeholder` defaults to `"Select date and time"`; every other prop/event/token is inherited unchanged from <calendar-picker-ui>. Existing markup keeps working, but new markup should reach for `<calendar-picker-ui precision="minute">` (or `precision="second"`) directly. See <calendar-picker-ui> for the full contract.
|
|
3
3
|
*
|
|
4
4
|
* @see https://ui-kit.exe.xyz/site/components/datetime-picker
|
|
5
5
|
*
|
|
@@ -13,7 +13,6 @@
|
|
|
13
13
|
import { UIElement } from '../../core/element.js';
|
|
14
14
|
|
|
15
15
|
export interface DatetimePickerChangeEventDetail {
|
|
16
|
-
source: string;
|
|
17
16
|
value: string;
|
|
18
17
|
}
|
|
19
18
|
|
|
@@ -62,12 +61,12 @@ document locale. `h12` forces a 12-hour cycle with an AM/PM
|
|
|
62
61
|
name: string;
|
|
63
62
|
/** Whether the popover is currently open. */
|
|
64
63
|
open: boolean;
|
|
65
|
-
/** Text shown in the trigger when the value is empty. */
|
|
64
|
+
/** Text shown in the trigger when the value is empty. Defaults to "Select date and time" HERE (vs. "Select date..." on the base `<calendar-picker-ui>`). */
|
|
66
65
|
placeholder: string;
|
|
67
66
|
/** Popover placement relative to the trigger. Default `bottom` centers the calendar+time panel under the trigger (ADR-0034 Rule 2 — ~600px panel >> trigger). */
|
|
68
67
|
placement: 'top' | 'bottom' | 'left' | 'right' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end';
|
|
69
|
-
/** Time-pane precision. `minute` (default) emits `HH:mm`; `second` exposes the seconds segment and emits `HH:mm:ss
|
|
70
|
-
precision: 'minute' | 'second';
|
|
68
|
+
/** Time-pane precision. `minute` (default HERE — `date` on the base `<calendar-picker-ui>`) emits `HH:mm`; `second` exposes the seconds segment and emits `HH:mm:ss`; `date` drops the time pane entirely (identical to the base class's own default). */
|
|
69
|
+
precision: 'date' | 'minute' | 'second';
|
|
71
70
|
/** Block edits; allow keyboard navigation for screen-reader inspection. */
|
|
72
71
|
readonly: boolean;
|
|
73
72
|
/** Per-Arrow-keypress increment in seconds for the time pane. 60 = minute precision (default), 900 = 15-minute, 1 = second precision. */
|
|
@@ -1,27 +1,39 @@
|
|
|
1
1
|
$schema: ../../../../scripts/schemas/component.yaml.schema.json
|
|
2
2
|
name: UIDatetimePicker
|
|
3
3
|
tag: datetime-picker-ui
|
|
4
|
-
status:
|
|
4
|
+
status: deprecated
|
|
5
5
|
component: DatetimePicker
|
|
6
6
|
category: input
|
|
7
|
-
version:
|
|
7
|
+
version: 2
|
|
8
8
|
description: >-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
DEPRECATED (gh#1372, #1363 C3c) — folded into <calendar-picker-ui>'s
|
|
10
|
+
widened `precision` axis. `<datetime-picker-ui>` is now a thin
|
|
11
|
+
`UICalendarPicker` subclass (see datetime-picker.class.js) rather than an
|
|
12
|
+
independent implementation: `precision` defaults to `"minute"` (not
|
|
13
|
+
`"date"`) and `placeholder` defaults to `"Select date and time"`; every
|
|
14
|
+
other prop/event/token is inherited unchanged from <calendar-picker-ui>.
|
|
15
|
+
Existing markup keeps working, but new markup should reach for
|
|
16
|
+
`<calendar-picker-ui precision="minute">` (or `precision="second"`)
|
|
17
|
+
directly. See <calendar-picker-ui> for the full contract.
|
|
15
18
|
# Per ADR-0027 — primitives that programmatically create other primitives
|
|
16
19
|
# do NOT auto-import them. Consumer (or demo shell) must explicitly import
|
|
17
|
-
# the calendar-
|
|
20
|
+
# the calendar-grid, time-picker, divider modules (same set
|
|
21
|
+
# <calendar-picker-ui precision="minute"> itself needs — this alias
|
|
22
|
+
# inherits its render(), not just its class).
|
|
18
23
|
composes:
|
|
19
|
-
- calendar-grid-ui
|
|
20
|
-
- time-picker-ui
|
|
21
|
-
-
|
|
22
|
-
- popover-ui # the floating panel
|
|
23
|
-
- divider-ui # separator between panes
|
|
24
|
+
- calendar-grid-ui # the date pane — substrate primitive (inherited from calendar-picker-ui)
|
|
25
|
+
- time-picker-ui # the time pane (SPEC-043)
|
|
26
|
+
- divider-ui # separator between panes
|
|
24
27
|
props:
|
|
28
|
+
# Every prop below is inherited VERBATIM from <calendar-picker-ui> —
|
|
29
|
+
# documented here too (not just "see the base class") because a
|
|
30
|
+
# consumer scanning THIS tag's own catalog entry, or the a2ui pipeline
|
|
31
|
+
# generating THIS tag by name, needs the full contract without a second
|
|
32
|
+
# hop. audit-static-properties-vs-yaml.mjs's component-extends-component
|
|
33
|
+
# exemption (gh#1372) resolves this against <calendar-picker-ui>'s own
|
|
34
|
+
# yaml, so re-declaring the inherited names here is documentation, not a
|
|
35
|
+
# second runtime contract. `precision` and `placeholder` are the only
|
|
36
|
+
# two whose DEFAULT actually differs from the base class.
|
|
25
37
|
name:
|
|
26
38
|
description: Form field name. The ISO 8601 datetime is submitted under this key when the picker is inside a `<form>`.
|
|
27
39
|
type: string
|
|
@@ -48,10 +60,11 @@ props:
|
|
|
48
60
|
default: 60
|
|
49
61
|
reflect: true
|
|
50
62
|
precision:
|
|
51
|
-
description: Time-pane precision. `minute` (default) emits `HH:mm`; `second` exposes the seconds segment and emits `HH:mm:ss
|
|
63
|
+
description: Time-pane precision. `minute` (default HERE — `date` on the base `<calendar-picker-ui>`) emits `HH:mm`; `second` exposes the seconds segment and emits `HH:mm:ss`; `date` drops the time pane entirely (identical to the base class's own default).
|
|
52
64
|
type: string
|
|
53
65
|
default: minute
|
|
54
66
|
enum:
|
|
67
|
+
- date
|
|
55
68
|
- minute
|
|
56
69
|
- second
|
|
57
70
|
reflect: true
|
|
@@ -89,9 +102,10 @@ props:
|
|
|
89
102
|
default: false
|
|
90
103
|
reflect: true
|
|
91
104
|
placeholder:
|
|
92
|
-
description: Text shown in the trigger when the value is empty.
|
|
105
|
+
description: Text shown in the trigger when the value is empty. Defaults to "Select date and time" HERE (vs. "Select date..." on the base `<calendar-picker-ui>`).
|
|
93
106
|
type: string
|
|
94
107
|
default: Select date and time
|
|
108
|
+
reflect: true
|
|
95
109
|
format:
|
|
96
110
|
description: 'Trigger button date format. `short`: `Jan 1, 2026 14:30`; `long`: `January 1, 2026 14:30`; `iso`: full ISO string.'
|
|
97
111
|
type: string
|
|
@@ -123,7 +137,6 @@ events:
|
|
|
123
137
|
description: Fired when the value commits (date picked + time edited, OR Apply clicked in explicit-commit mode).
|
|
124
138
|
detail:
|
|
125
139
|
value: string
|
|
126
|
-
source: string
|
|
127
140
|
input:
|
|
128
141
|
description: Fired during partial selection (date picked but time still pending, or vice versa).
|
|
129
142
|
detail:
|
|
@@ -143,20 +156,14 @@ events:
|
|
|
143
156
|
reason: string
|
|
144
157
|
slots:
|
|
145
158
|
trigger:
|
|
146
|
-
description: Custom trigger replacement. When omitted, a default `<button-ui>`
|
|
159
|
+
description: Custom trigger replacement. When omitted, a default trigger is stamped (a plain clickable span, per the base `<calendar-picker-ui>` — NOT the old standalone datetime-picker's `<button-ui>` trigger; see the Consequences note below).
|
|
147
160
|
footer:
|
|
148
161
|
description: Optional Apply / Cancel buttons for explicit-commit flows. Spans both panes below the calendar + time area.
|
|
149
162
|
states:
|
|
150
163
|
- name: idle
|
|
151
164
|
description: Closed, no pending selection.
|
|
152
|
-
- name: open
|
|
153
|
-
description: Popover open
|
|
154
|
-
attribute: open
|
|
155
|
-
- name: open-pending-time
|
|
156
|
-
description: Date picked; time pane is the next focus target.
|
|
157
|
-
attribute: open
|
|
158
|
-
- name: open-committed
|
|
159
|
-
description: Both panes set; awaiting Apply (explicit-commit mode only).
|
|
165
|
+
- name: open
|
|
166
|
+
description: Popover open.
|
|
160
167
|
attribute: open
|
|
161
168
|
- name: disabled
|
|
162
169
|
description: Non-interactive; dimmed.
|
|
@@ -164,65 +171,20 @@ states:
|
|
|
164
171
|
- name: readonly
|
|
165
172
|
description: Read-only; trigger keyboard-focusable but popover does not open.
|
|
166
173
|
attribute: readonly
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
default: var(--a-bg)
|
|
172
|
-
--datetime-picker-fg:
|
|
173
|
-
description: Host text color.
|
|
174
|
-
default: var(--a-fg)
|
|
175
|
-
--datetime-picker-popover-bg:
|
|
176
|
-
description: Popover background.
|
|
177
|
-
default: var(--a-bg-subtle)
|
|
178
|
-
--datetime-picker-popover-border:
|
|
179
|
-
description: Popover border color.
|
|
180
|
-
default: var(--a-border-subtle)
|
|
181
|
-
--datetime-picker-popover-radius:
|
|
182
|
-
description: Popover border radius.
|
|
183
|
-
default: var(--a-radius-lg)
|
|
184
|
-
--datetime-picker-popover-shadow:
|
|
185
|
-
description: Popover box shadow.
|
|
186
|
-
default: var(--a-shadow-lg)
|
|
187
|
-
--datetime-picker-popover-padding:
|
|
188
|
-
description: Popover internal padding.
|
|
189
|
-
default: var(--a-space-3)
|
|
190
|
-
--datetime-picker-popover-gap:
|
|
191
|
-
description: Gap between calendar pane and time pane.
|
|
192
|
-
default: var(--a-space-3)
|
|
193
|
-
--datetime-picker-divider:
|
|
194
|
-
description: Pane divider color.
|
|
195
|
-
default: var(--a-border-subtle)
|
|
196
|
-
--datetime-picker-trigger-min-width:
|
|
197
|
-
description: Default trigger min-width — sized so the formatted date+time fits without truncation.
|
|
198
|
-
default: 16em
|
|
199
|
-
--datetime-picker-px:
|
|
200
|
-
description: Horizontal popover padding.
|
|
201
|
-
default: var(--a-space-3)
|
|
202
|
-
--datetime-picker-py:
|
|
203
|
-
description: Vertical popover padding.
|
|
204
|
-
default: var(--a-space-2)
|
|
205
|
-
--datetime-picker-duration:
|
|
206
|
-
description: Open/close transition duration.
|
|
207
|
-
default: var(--a-duration-fast)
|
|
208
|
-
--datetime-picker-easing:
|
|
209
|
-
description: Open/close transition easing.
|
|
210
|
-
default: var(--a-easing)
|
|
174
|
+
tokens: {} # No component-owned tokens — styling flows entirely through
|
|
175
|
+
# <calendar-picker-ui>'s own --calendar-picker-* custom
|
|
176
|
+
# properties (gh#1372; the old --datetime-picker-* tokens are
|
|
177
|
+
# a genuine breaking removal — see the MIGRATION GUIDE entry).
|
|
211
178
|
requiredIcons:
|
|
212
179
|
- calendar
|
|
213
|
-
- caret-down
|
|
214
180
|
a2ui:
|
|
215
181
|
rules:
|
|
182
|
+
- rule: 'DEPRECATED — prefer `{"component": "CalendarPicker", "precision": "minute"}` (or `"second"`) over `{"component": "DatetimePicker"}`. Both render and behave identically; DatetimePicker is a thin compatibility alias.'
|
|
183
|
+
reason: 'gh#1372 (#1363 C3c) fold — steer new generation at the canonical primitive.'
|
|
216
184
|
- rule: '`DatetimePicker.value` MUST be ISO 8601 datetime (`YYYY-MM-DDTHH:mm` or `YYYY-MM-DDTHH:mm:ss`) OR empty string. Date-only or time-only strings fire `invalid`.'
|
|
217
185
|
reason: 'Datetime contract — both halves must be present (or both empty).'
|
|
218
|
-
- rule: '`precision: "second"` requires the value to include seconds when set; missing seconds are coerced to `:00` on commit.'
|
|
219
|
-
reason: 'Precision contract.'
|
|
220
186
|
- rule: '`min` and `max` MUST be parseable ISO 8601 datetimes if non-empty. If `value` falls outside, `invalid` fires and the value does not commit.'
|
|
221
187
|
reason: 'Constraint contract.'
|
|
222
|
-
- rule: '`hour-cycle` overrides the locale-derived cycle in the time pane. Set explicitly when the surface needs a specific cycle (cron editors, log queries, system surfaces).'
|
|
223
|
-
reason: 'Hour-cycle override contract.'
|
|
224
|
-
- rule: 'Use DatetimePicker for combined date+time. Do NOT compose `<calendar-picker-ui>` + a free-form `<input-ui>` manually as an alternative — that is the pattern this primitive replaces.'
|
|
225
|
-
reason: 'Adoption signal: prefer the canonical primitive over hand-rolled composition.'
|
|
226
188
|
- rule: 'Per ADR-0025 NEVER wrap a native `<input type="datetime-local">` — the calendar pane + time pane composition + ElementInternals together provide form participation.'
|
|
227
189
|
reason: 'No native form controls.'
|
|
228
190
|
anti_patterns:
|
|
@@ -234,33 +196,15 @@ anti_patterns:
|
|
|
234
196
|
fix: |
|
|
235
197
|
{"component": "DatetimePicker", "value": "2026-05-24T00:00"}
|
|
236
198
|
- wrong: |
|
|
237
|
-
{"component": "DatetimePicker", "
|
|
238
|
-
why: |
|
|
239
|
-
`value` is a time-only string — no date component. Use `<TimePicker>` for
|
|
240
|
-
time-only selection or supply the date portion.
|
|
241
|
-
fix: |
|
|
242
|
-
{"component": "DatetimePicker", "value": "2026-05-24T14:30"}
|
|
243
|
-
- wrong: |
|
|
244
|
-
{"component": "DatetimePicker", "children": [
|
|
245
|
-
{"component": "Input", "type": "datetime-local"}
|
|
246
|
-
]}
|
|
247
|
-
why: |
|
|
248
|
-
Nesting a native datetime-local input violates ADR-0025 and bypasses
|
|
249
|
-
ElementInternals form participation.
|
|
250
|
-
fix: |
|
|
251
|
-
{"component": "DatetimePicker", "name": "field-name"}
|
|
252
|
-
- wrong: |
|
|
253
|
-
<calendar-picker-ui></calendar-picker-ui>
|
|
254
|
-
<input-ui type="text" placeholder="HH:mm"></input-ui>
|
|
199
|
+
{"component": "DatetimePicker", "name": "appointment"}
|
|
255
200
|
why: |
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
a11y model, and unified form participation.
|
|
201
|
+
DatetimePicker is deprecated (gh#1372) — new generation should reach
|
|
202
|
+
for CalendarPicker's widened precision axis instead.
|
|
259
203
|
fix: |
|
|
260
|
-
|
|
204
|
+
{"component": "CalendarPicker", "precision": "minute", "name": "appointment"}
|
|
261
205
|
examples:
|
|
262
206
|
- name: canonical
|
|
263
|
-
description: Form-field-wrapped picker with min/max bounds.
|
|
207
|
+
description: Form-field-wrapped picker with min/max bounds. Prefer the CalendarPicker[precision] form for NEW markup — see calendar-picker-ui's own "datetime-picker" example.
|
|
264
208
|
a2ui: |
|
|
265
209
|
[
|
|
266
210
|
{
|
|
@@ -277,41 +221,6 @@ examples:
|
|
|
277
221
|
"max": "2026-12-31T23:59"
|
|
278
222
|
}
|
|
279
223
|
]
|
|
280
|
-
- name: second-precision
|
|
281
|
-
description: Log-cursor picker with second precision.
|
|
282
|
-
a2ui: |
|
|
283
|
-
[
|
|
284
|
-
{
|
|
285
|
-
"id": "dt",
|
|
286
|
-
"component": "DatetimePicker",
|
|
287
|
-
"name": "log-cursor",
|
|
288
|
-
"precision": "second",
|
|
289
|
-
"step": 1,
|
|
290
|
-
"value": "2026-05-24T14:30:45"
|
|
291
|
-
}
|
|
292
|
-
]
|
|
293
|
-
- name: forced-24h
|
|
294
|
-
description: Cron editor with forced 24-hour cycle.
|
|
295
|
-
a2ui: |
|
|
296
|
-
[
|
|
297
|
-
{
|
|
298
|
-
"id": "dt",
|
|
299
|
-
"component": "DatetimePicker",
|
|
300
|
-
"name": "cron",
|
|
301
|
-
"hourCycle": "h23"
|
|
302
|
-
}
|
|
303
|
-
]
|
|
304
|
-
- name: readonly
|
|
305
|
-
description: Read-only datetime for inspection only.
|
|
306
|
-
a2ui: |
|
|
307
|
-
[
|
|
308
|
-
{
|
|
309
|
-
"id": "dt",
|
|
310
|
-
"component": "DatetimePicker",
|
|
311
|
-
"readonly": true,
|
|
312
|
-
"value": "2026-05-24T14:30"
|
|
313
|
-
}
|
|
314
|
-
]
|
|
315
224
|
keywords:
|
|
316
225
|
- datetimepicker
|
|
317
226
|
- datetime-picker
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
/* ── Typography ── */
|
|
17
17
|
--demo-toggle-label-size: var(--a-ui-size);
|
|
18
|
-
--demo-toggle-label-weight: var(--a-weight-medium
|
|
18
|
+
--demo-toggle-label-weight: var(--a-weight-medium);
|
|
19
19
|
|
|
20
20
|
/* ── Transition ── */
|
|
21
21
|
--demo-toggle-duration: var(--a-duration-fast);
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
font-size: var(--description-list-term-font-size);
|
|
45
45
|
font-weight: var(--description-list-term-weight);
|
|
46
46
|
color: var(--description-list-term-fg);
|
|
47
|
-
line-height:
|
|
47
|
+
line-height: var(--a-font-leading-normal);
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
[data-dl-desc],
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
font-size: var(--description-list-desc-font-size);
|
|
54
54
|
font-weight: var(--description-list-desc-weight);
|
|
55
55
|
color: var(--description-list-desc-fg);
|
|
56
|
-
line-height:
|
|
56
|
+
line-height: var(--a-font-leading-relaxed);
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
/* Pair separator: extra margin under each non-last dd so DD→DT (between
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
color: var(--display-field-label-color);
|
|
51
51
|
font-size: var(--display-field-label-size);
|
|
52
52
|
font-weight: var(--display-field-label-weight);
|
|
53
|
-
line-height:
|
|
53
|
+
line-height: var(--a-font-leading-normal);
|
|
54
54
|
min-width: 0;
|
|
55
55
|
}
|
|
56
56
|
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
color: var(--display-field-value-color);
|
|
68
68
|
font-size: var(--display-field-value-size);
|
|
69
69
|
font-weight: var(--display-field-value-weight);
|
|
70
|
-
line-height:
|
|
70
|
+
line-height: var(--a-font-leading-normal);
|
|
71
71
|
min-width: 0;
|
|
72
72
|
}
|
|
73
73
|
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
grid-area: hint;
|
|
76
76
|
color: var(--display-field-hint-color);
|
|
77
77
|
font-size: var(--display-field-hint-size);
|
|
78
|
-
line-height:
|
|
78
|
+
line-height: var(--a-font-leading-normal);
|
|
79
79
|
min-width: 0;
|
|
80
80
|
}
|
|
81
81
|
|
|
@@ -108,6 +108,7 @@
|
|
|
108
108
|
"expand"
|
|
109
109
|
],
|
|
110
110
|
"name": "UIDrawer",
|
|
111
|
+
"parts": {},
|
|
111
112
|
"related": [
|
|
112
113
|
"button",
|
|
113
114
|
"empty-state",
|
|
@@ -125,9 +126,6 @@
|
|
|
125
126
|
"action-leading": {
|
|
126
127
|
"description": "Direct child of <footer> — leading (inline-start) action cluster. Used for dual-cluster footers where a destructive or secondary action sits on the opposite edge from the primary trailing cluster (e.g. Delete ↔ Cancel/Save, Back ↔ Cancel/Next). Replaces the legacy <span data-spacer> hack."
|
|
127
128
|
},
|
|
128
|
-
"backdrop": {
|
|
129
|
-
"description": "Scrim overlay behind the drawer (stamped by the component)."
|
|
130
|
-
},
|
|
131
129
|
"body": {
|
|
132
130
|
"description": "Scrollable content region. Accepts one or more bare <section> tags or [slot=\"body\"] elements; multi-section stacks are mounted in author order and share the panel's scroll context. [bleed] removes section padding; [padding] adds a canvas-scrim background for hero regions."
|
|
133
131
|
},
|
|
@@ -200,7 +200,7 @@ drawer-ui [slot="panel"] > [slot="header"]:has(> [slot]) {
|
|
|
200
200
|
align-items: center;
|
|
201
201
|
}
|
|
202
202
|
|
|
203
|
-
drawer-ui [slot="panel"] > [slot="header"][
|
|
203
|
+
drawer-ui [slot="panel"] > [slot="header"][padded] {
|
|
204
204
|
background: var(--md-sys-color-neutral-scrim-weakest);
|
|
205
205
|
}
|
|
206
206
|
|
|
@@ -244,7 +244,7 @@ drawer-ui [slot="panel"] > [slot="header"]:has(> :is([slot="description"], p, sm
|
|
|
244
244
|
drawer-ui [slot="panel"] > [slot="header"] > :is([slot="heading"], h1, h2, h3, h4, h5, h6),
|
|
245
245
|
drawer-ui [slot="panel"] > [slot="header"] > [slot="heading"] :is(h1, h2, h3, h4, h5, h6) {
|
|
246
246
|
grid-row: 1;
|
|
247
|
-
line-height:
|
|
247
|
+
line-height: var(--a-font-leading-normal);
|
|
248
248
|
margin: 0;
|
|
249
249
|
font-size: var(--drawer-heading-size);
|
|
250
250
|
font-weight: var(--drawer-heading-weight);
|
|
@@ -266,7 +266,7 @@ drawer-ui [slot="panel"] > [slot="header"]:not(:has(> [slot="icon"])) > :is([slo
|
|
|
266
266
|
drawer-ui [slot="panel"] > [slot="header"] > :is([slot="description"], p, small) {
|
|
267
267
|
grid-row: 2;
|
|
268
268
|
grid-column: 1 / -1;
|
|
269
|
-
line-height:
|
|
269
|
+
line-height: var(--a-font-leading-relaxed);
|
|
270
270
|
margin: 0;
|
|
271
271
|
font-size: var(--drawer-description-size);
|
|
272
272
|
color: var(--drawer-description-fg);
|
|
@@ -71,8 +71,6 @@ events:
|
|
|
71
71
|
transition completes, so a rapid close→open never fires a stale
|
|
72
72
|
`opened`. Added per FEEDBACK-27.
|
|
73
73
|
slots:
|
|
74
|
-
backdrop:
|
|
75
|
-
description: Scrim overlay behind the drawer (stamped by the component).
|
|
76
74
|
panel:
|
|
77
75
|
description: Sliding panel container (stamped by the component).
|
|
78
76
|
header:
|