@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
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
],
|
|
15
15
|
"properties": {
|
|
16
16
|
"type": {
|
|
17
|
-
"description": "Input type. `password` wraps a native `<input>` for disc masking; `number` renders a contenteditable + stepper buttons (no native input).
|
|
17
|
+
"description": "Input type. `password` wraps a native `<input>` for disc masking; `number` renders a contenteditable + stepper buttons (no native input). `text`/`email`/`tel`/`url` use plain contenteditable. input-ui does NOT implement date/time/color/search affordances — those HTML5 type values render as a plain contenteditable with no calendar, clock, swatch, or search affordance (first-pass-VALID against this enum historically, but functionally broken generation output). Use the owning primitive instead — CalendarPicker for date (+ month/week, no dedicated granularity primitive exists), DatetimePicker for datetime-local, TimePicker for time, ColorInput/ColorPicker for color, Search for search. See anti_patterns.",
|
|
18
18
|
"type": "string",
|
|
19
19
|
"enum": [
|
|
20
20
|
"text",
|
|
@@ -22,14 +22,7 @@
|
|
|
22
22
|
"password",
|
|
23
23
|
"number",
|
|
24
24
|
"tel",
|
|
25
|
-
"url"
|
|
26
|
-
"search",
|
|
27
|
-
"date",
|
|
28
|
-
"datetime-local",
|
|
29
|
-
"time",
|
|
30
|
-
"month",
|
|
31
|
-
"week",
|
|
32
|
-
"color"
|
|
25
|
+
"url"
|
|
33
26
|
],
|
|
34
27
|
"default": "text"
|
|
35
28
|
},
|
|
@@ -71,22 +64,34 @@
|
|
|
71
64
|
},
|
|
72
65
|
"max": {
|
|
73
66
|
"description": "Maximum numeric value. Applies when `type=\"number\"`. Clamps + drives aria-valuemax + the [+] button's disabled state.",
|
|
74
|
-
"type":
|
|
67
|
+
"type": [
|
|
68
|
+
"number",
|
|
69
|
+
"null"
|
|
70
|
+
],
|
|
75
71
|
"default": null
|
|
76
72
|
},
|
|
77
73
|
"maxlength": {
|
|
78
74
|
"description": "Maximum character length for validation",
|
|
79
|
-
"type":
|
|
75
|
+
"type": [
|
|
76
|
+
"number",
|
|
77
|
+
"null"
|
|
78
|
+
],
|
|
80
79
|
"default": null
|
|
81
80
|
},
|
|
82
81
|
"min": {
|
|
83
82
|
"description": "Minimum numeric value. Applies when `type=\"number\"`. Clamps + drives aria-valuemin + the [-] button's disabled state.",
|
|
84
|
-
"type":
|
|
83
|
+
"type": [
|
|
84
|
+
"number",
|
|
85
|
+
"null"
|
|
86
|
+
],
|
|
85
87
|
"default": null
|
|
86
88
|
},
|
|
87
89
|
"minlength": {
|
|
88
90
|
"description": "Minimum character length for validation",
|
|
89
|
-
"type":
|
|
91
|
+
"type": [
|
|
92
|
+
"number",
|
|
93
|
+
"null"
|
|
94
|
+
],
|
|
90
95
|
"default": null
|
|
91
96
|
},
|
|
92
97
|
"name": {
|
|
@@ -106,7 +111,10 @@
|
|
|
106
111
|
},
|
|
107
112
|
"precision": {
|
|
108
113
|
"description": "Decimal places to display + clamp to, when `type=\"number\"`. Overrides the implicit decimal-count from `step` — e.g. `step=1 precision=2` formats \"10.00\".",
|
|
109
|
-
"type":
|
|
114
|
+
"type": [
|
|
115
|
+
"number",
|
|
116
|
+
"null"
|
|
117
|
+
],
|
|
110
118
|
"default": null
|
|
111
119
|
},
|
|
112
120
|
"prefix": {
|
|
@@ -150,7 +158,43 @@
|
|
|
150
158
|
],
|
|
151
159
|
"unevaluatedProperties": false,
|
|
152
160
|
"x-adiaui": {
|
|
153
|
-
"anti_patterns": [
|
|
161
|
+
"anti_patterns": [
|
|
162
|
+
{
|
|
163
|
+
"fix": "{\"component\": \"CalendarPicker\"}\n",
|
|
164
|
+
"why": "input-ui's `type` enum no longer includes \"date\" (gh#1363\nB10) — it never rendered a native date picker, just a plain\ncontenteditable surface with no calendar affordance. Use\nCalendarPicker for single-date input.\n",
|
|
165
|
+
"wrong": "{\"component\": \"Input\", \"type\": \"date\"}\n"
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"fix": "{\"component\": \"DatetimePicker\"}\n",
|
|
169
|
+
"why": "Same gap as \"date\" — no native datetime picker rendered. Use\nDatetimePicker for combined date + time input.\n",
|
|
170
|
+
"wrong": "{\"component\": \"Input\", \"type\": \"datetime-local\"}\n"
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"fix": "{\"component\": \"TimePicker\"}\n",
|
|
174
|
+
"why": "Same gap as \"date\" — no native time picker rendered. Use\nTimePicker for time-of-day input.\n",
|
|
175
|
+
"wrong": "{\"component\": \"Input\", \"type\": \"time\"}\n"
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"fix": "{\"component\": \"CalendarPicker\"}\n",
|
|
179
|
+
"why": "No native month picker rendered, and no dedicated month-granularity\nprimitive exists in the catalog. CalendarPicker (day granularity)\nis the closest routed primitive.\n",
|
|
180
|
+
"wrong": "{\"component\": \"Input\", \"type\": \"month\"}\n"
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
"fix": "{\"component\": \"CalendarPicker\"}\n",
|
|
184
|
+
"why": "No native week picker rendered, and no dedicated week-granularity\nprimitive exists in the catalog. CalendarPicker (day granularity)\nis the closest routed primitive.\n",
|
|
185
|
+
"wrong": "{\"component\": \"Input\", \"type\": \"week\"}\n"
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"fix": "{\"component\": \"ColorInput\"}\n",
|
|
189
|
+
"why": "No native color swatch/picker rendered — just a plain text\nsurface. Use ColorInput for a compact form-bearing swatch +\npopover, or ColorPicker directly for the full OKLCH picker\nsurface.\n",
|
|
190
|
+
"wrong": "{\"component\": \"Input\", \"type\": \"color\"}\n"
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"fix": "{\"component\": \"Search\"}\n",
|
|
194
|
+
"why": "No search icon or clear affordance rendered — plain\ncontenteditable, functionally identical to the default text\ntype. Use Search for the dedicated magnifying-glass + clear +\ndebounced-search-event primitive.\n",
|
|
195
|
+
"wrong": "{\"component\": \"Input\", \"type\": \"search\"}\n"
|
|
196
|
+
}
|
|
197
|
+
],
|
|
154
198
|
"category": "input",
|
|
155
199
|
"composes": [
|
|
156
200
|
"button-ui",
|
|
@@ -211,12 +255,18 @@
|
|
|
211
255
|
"tag"
|
|
212
256
|
],
|
|
213
257
|
"name": "UIInput",
|
|
258
|
+
"parts": {},
|
|
214
259
|
"related": [
|
|
215
260
|
"avatar",
|
|
216
261
|
"button",
|
|
217
262
|
"table",
|
|
218
263
|
"pagination",
|
|
219
|
-
"check-box"
|
|
264
|
+
"check-box",
|
|
265
|
+
"search",
|
|
266
|
+
"calendar-picker",
|
|
267
|
+
"datetime-picker",
|
|
268
|
+
"time-picker",
|
|
269
|
+
"color-input"
|
|
220
270
|
],
|
|
221
271
|
"slots": {
|
|
222
272
|
"leading": {
|
|
@@ -148,12 +148,7 @@ export class UIInput extends UIFormElement {
|
|
|
148
148
|
const trailingNodes = logicalSlotted(this, 'trailing');
|
|
149
149
|
|
|
150
150
|
if (!this.querySelector('[slot="text"]')) {
|
|
151
|
-
|
|
152
|
-
this.innerHTML = this.#shellHTML(labelId);
|
|
153
|
-
// innerHTML wiped the consumer-supplied leading/trailing nodes; re-attach
|
|
154
|
-
// them into the field at the right positions. Order matches the JSDoc:
|
|
155
|
-
// prefix → leading → label → text → suffix → trailing → controls
|
|
156
|
-
this.#installAffordances(leadingNodes, trailingNodes);
|
|
151
|
+
this.#buildShell(leadingNodes, trailingNodes);
|
|
157
152
|
}
|
|
158
153
|
|
|
159
154
|
this.#textEl = this.querySelector('[slot="text"]');
|
|
@@ -200,6 +195,64 @@ export class UIInput extends UIFormElement {
|
|
|
200
195
|
}
|
|
201
196
|
}
|
|
202
197
|
|
|
198
|
+
#buildShell(leadingNodes, trailingNodes) {
|
|
199
|
+
const labelId = this.label ? `input-label-${++UIInput.#labelSeq}` : '';
|
|
200
|
+
this.innerHTML = this.#shellHTML(labelId);
|
|
201
|
+
// innerHTML wiped the consumer-supplied leading/trailing nodes; re-attach
|
|
202
|
+
// them into the field at the right positions. Order matches the JSDoc:
|
|
203
|
+
// prefix → leading → label → text → suffix → trailing → controls
|
|
204
|
+
this.#installAffordances(leadingNodes, trailingNodes);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* Post-connect `type` reconciliation (gh#1332 review follow-up). The shell
|
|
209
|
+
* is built once at connect, but `type` is reactive and reflected — since
|
|
210
|
+
* number-mode CSS now keys off the host's [type="number"] directly, a
|
|
211
|
+
* text↔number flip after connect would restyle without restructuring
|
|
212
|
+
* (role, inputmode, stepper controls, beforeinput filter all stale).
|
|
213
|
+
* Rebuild the shell + listeners when the built mode disagrees with the
|
|
214
|
+
* live property. No-op on every render where the modes already agree.
|
|
215
|
+
*/
|
|
216
|
+
#reconcileTypeMode() {
|
|
217
|
+
if (this.#isNativePassword || !this.#textEl) return;
|
|
218
|
+
const builtNumberMode = !!this.querySelector(':scope > [slot="field"] [data-controls]');
|
|
219
|
+
if (builtNumberMode === this.#isNumberMode) return;
|
|
220
|
+
|
|
221
|
+
// Unwire the old surface, capture consumer affordances from inside the
|
|
222
|
+
// live field (logicalSlotted won't re-match nodes already moved there).
|
|
223
|
+
this.#textEl.removeEventListener('input', this.#onInput);
|
|
224
|
+
this.#textEl.removeEventListener('keydown', this.#onKeydown);
|
|
225
|
+
this.#textEl.removeEventListener('blur', this.#onBlur);
|
|
226
|
+
this.#textEl.removeEventListener('focus', this.#onFocus);
|
|
227
|
+
this.#textEl.removeEventListener('paste', this.#onPaste);
|
|
228
|
+
this.#textEl.removeEventListener('beforeinput', this.#onBeforeInput);
|
|
229
|
+
const field = this.querySelector(':scope > [slot="field"]');
|
|
230
|
+
const leadingNodes = field ? [...field.querySelectorAll(':scope > [slot="leading"]')] : [];
|
|
231
|
+
const trailingNodes = field ? [...field.querySelectorAll(':scope > [slot="trailing"]')] : [];
|
|
232
|
+
|
|
233
|
+
this.#buildShell(leadingNodes, trailingNodes);
|
|
234
|
+
this.setAttribute('role', this.#isNumberMode ? 'spinbutton' : 'textbox');
|
|
235
|
+
this.#textEl = this.querySelector('[slot="text"]');
|
|
236
|
+
this.#labelEl = this.querySelector('[slot="label"]');
|
|
237
|
+
this.#upBtn = this.querySelector('[data-step="up"]');
|
|
238
|
+
this.#downBtn = this.querySelector('[data-step="down"]');
|
|
239
|
+
if (this.#textEl) {
|
|
240
|
+
this.#textEl.addEventListener('input', this.#onInput);
|
|
241
|
+
this.#textEl.addEventListener('keydown', this.#onKeydown);
|
|
242
|
+
this.#textEl.addEventListener('blur', this.#onBlur);
|
|
243
|
+
this.#textEl.addEventListener('focus', this.#onFocus);
|
|
244
|
+
this.#textEl.addEventListener('paste', this.#onPaste);
|
|
245
|
+
if (this.#isNumberMode) {
|
|
246
|
+
this.#textEl.addEventListener('beforeinput', this.#onBeforeInput);
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
this.#upBtn?.addEventListener('pointerdown', this.#onStepperUpDown);
|
|
250
|
+
this.#downBtn?.addEventListener('pointerdown', this.#onStepperDownDown);
|
|
251
|
+
if (this.prefix || this.suffix) {
|
|
252
|
+
whenIconRegistryReady.then(() => this.#promoteAffixes());
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
|
|
203
256
|
#shellHTML(labelId) {
|
|
204
257
|
const prefix = this.prefix ? `<span slot="prefix">${renderAffix(this.prefix)}</span>` : '';
|
|
205
258
|
const label = this.label ? `<span slot="label" id="${labelId}">${this.label}</span>` : '';
|
|
@@ -234,8 +287,11 @@ export class UIInput extends UIFormElement {
|
|
|
234
287
|
icon="caret-down" data-step="down" aria-label="Decrease"></button-ui>
|
|
235
288
|
</span>` : '';
|
|
236
289
|
|
|
290
|
+
// No private data-number mirror on the field div — number-mode CSS keys
|
|
291
|
+
// off the declared, reflected host [type="number"] directly (gh#1332
|
|
292
|
+
// Category A; select-ui data-multi-chips precedent).
|
|
237
293
|
return `
|
|
238
|
-
<div slot="field"
|
|
294
|
+
<div slot="field">
|
|
239
295
|
${prefix}${label}${editable}${suffix}${controls}
|
|
240
296
|
</div>
|
|
241
297
|
`;
|
|
@@ -372,6 +428,7 @@ export class UIInput extends UIFormElement {
|
|
|
372
428
|
|
|
373
429
|
render() {
|
|
374
430
|
if (!this.#textEl) return;
|
|
431
|
+
this.#reconcileTypeMode();
|
|
375
432
|
|
|
376
433
|
const text = this.value ?? '';
|
|
377
434
|
|
|
@@ -106,13 +106,14 @@ input-ui:not([disabled]) [slot="field"]:hover [slot="suffix"] {
|
|
|
106
106
|
/* font-family floor — see segment.css rationale. */
|
|
107
107
|
font-family: var(--input-font-family);
|
|
108
108
|
font-size: var(--input-font-size);
|
|
109
|
-
/* line-height: 1.
|
|
110
|
-
have room inside [slot="text"]'s line box. With
|
|
109
|
+
/* line-height: normal (1.35, not 1) so descender-bearing glyphs
|
|
110
|
+
(g, j, p, q, y) have room inside [slot="text"]'s line box. With
|
|
111
|
+
line-height: 1 the
|
|
111
112
|
line box equals the em-square and descenders extend below it; the
|
|
112
113
|
overflow: hidden on [slot="text"] then clips them. The min-height
|
|
113
114
|
still controls overall chrome height — align-items: center keeps the
|
|
114
115
|
baseline centered regardless of line-height. */
|
|
115
|
-
line-height:
|
|
116
|
+
line-height: var(--a-font-leading-normal);
|
|
116
117
|
cursor: text;
|
|
117
118
|
/* Cover every property the hover / focus / invalid states change so
|
|
118
119
|
the field doesn't half-snap (border slides, but bg/colour/ring snap). */
|
|
@@ -190,10 +191,10 @@ input-ui:not([disabled]) [slot="field"]:hover [slot="suffix"] {
|
|
|
190
191
|
absolutely against the field's inline-end edge so it NEVER affects
|
|
191
192
|
the field's flex-sized height — number-mode inputs share the same
|
|
192
193
|
24/30/36px (sm/md/lg) baseline as text/email/password/etc. */
|
|
193
|
-
[
|
|
194
|
+
:scope[type="number"] [slot="field"] [slot="text"] {
|
|
194
195
|
text-align: end;
|
|
195
196
|
font-variant-numeric: tabular-nums;
|
|
196
|
-
font-weight: var(--a-weight-medium
|
|
197
|
+
font-weight: var(--a-weight-medium);
|
|
197
198
|
/* Reserve space for the absolutely-positioned controls column so the
|
|
198
199
|
value never collides with the stepper buttons. */
|
|
199
200
|
padding-inline-end: var(--input-controls-width, calc(var(--input-height) * 0.7));
|
|
@@ -201,7 +202,7 @@ input-ui:not([disabled]) [slot="field"]:hover [slot="suffix"] {
|
|
|
201
202
|
|
|
202
203
|
/* Suffix sits flush after the value in number mode (no auto margin so
|
|
203
204
|
the value+suffix pair stays right-aligned together). */
|
|
204
|
-
[
|
|
205
|
+
:scope[type="number"] [slot="field"] [slot="suffix"] {
|
|
205
206
|
margin-inline-start: 0;
|
|
206
207
|
/* Reserve space for the absolutely-positioned controls column so the
|
|
207
208
|
suffix never collides with the stepper buttons. The padding moves
|
|
@@ -209,11 +210,11 @@ input-ui:not([disabled]) [slot="field"]:hover [slot="suffix"] {
|
|
|
209
210
|
— only one element needs the reservation since they're adjacent. */
|
|
210
211
|
margin-inline-end: var(--input-controls-width, calc(var(--input-height) * 0.7));
|
|
211
212
|
}
|
|
212
|
-
[
|
|
213
|
+
:scope[type="number"] [slot="field"]:has([slot="suffix"]) [slot="text"] {
|
|
213
214
|
padding-inline-end: 0;
|
|
214
215
|
}
|
|
215
216
|
|
|
216
|
-
[
|
|
217
|
+
:scope[type="number"] [slot="field"] {
|
|
217
218
|
position: relative;
|
|
218
219
|
}
|
|
219
220
|
|
|
@@ -229,7 +230,7 @@ input-ui:not([disabled]) [slot="field"]:hover [slot="suffix"] {
|
|
|
229
230
|
overflow: hidden;
|
|
230
231
|
}
|
|
231
232
|
|
|
232
|
-
[
|
|
233
|
+
:scope[type="number"] [slot="field"] [slot="controls"] button-ui {
|
|
233
234
|
/* Defeat button-ui's intrinsic min-height (driven by --button-height) so
|
|
234
235
|
its content can't push past half the column height. Padding + border
|
|
235
236
|
are zeroed; the divider between the two buttons comes from the
|
|
@@ -255,14 +256,14 @@ input-ui:not([disabled]) [slot="field"]:hover [slot="suffix"] {
|
|
|
255
256
|
because its own `:where(:scope)` declaration of --icon-size wins over
|
|
256
257
|
any value inherited from its parent button-ui. Tying it to
|
|
257
258
|
--input-height keeps the caret proportional across sm/md/lg. */
|
|
258
|
-
[
|
|
259
|
+
:scope[type="number"] [slot="field"] [slot="controls"] icon-ui {
|
|
259
260
|
--icon-size: calc(var(--input-height) * 0.4);
|
|
260
261
|
}
|
|
261
|
-
[
|
|
262
|
+
:scope[type="number"] [slot="field"] [slot="controls"] button-ui:hover {
|
|
262
263
|
--button-bg: var(--a-ui-bg-hover);
|
|
263
264
|
--button-fg: var(--a-ui-text);
|
|
264
265
|
}
|
|
265
|
-
[
|
|
266
|
+
:scope[type="number"] [slot="field"] [slot="controls"] button-ui[disabled] {
|
|
266
267
|
--button-fg: var(--a-ui-text-disabled);
|
|
267
268
|
pointer-events: none;
|
|
268
269
|
}
|
|
@@ -272,11 +273,11 @@ input-ui:not([disabled]) [slot="field"]:hover [slot="suffix"] {
|
|
|
272
273
|
field radius cleanly. The divider between the two buttons is the
|
|
273
274
|
inline-start border on the column + the bottom-border on the upper
|
|
274
275
|
button. */
|
|
275
|
-
[
|
|
276
|
+
:scope[type="number"] [slot="field"] [slot="controls"] button-ui:first-child {
|
|
276
277
|
border-bottom: 1px solid var(--input-border);
|
|
277
278
|
border-start-end-radius: calc(var(--input-radius) - 1px);
|
|
278
279
|
}
|
|
279
|
-
[
|
|
280
|
+
:scope[type="number"] [slot="field"] [slot="controls"] button-ui:last-child {
|
|
280
281
|
border-end-end-radius: calc(var(--input-radius) - 1px);
|
|
281
282
|
}
|
|
282
283
|
|
|
@@ -286,8 +287,8 @@ input-ui:not([disabled]) [slot="field"]:hover [slot="suffix"] {
|
|
|
286
287
|
margin-inline-end: 0;
|
|
287
288
|
border-inline-start: none;
|
|
288
289
|
}
|
|
289
|
-
:scope[raw]
|
|
290
|
-
:scope[raw]
|
|
290
|
+
:scope[raw][type="number"] [slot="field"] [slot="controls"] button-ui:first-child,
|
|
291
|
+
:scope[raw][type="number"] [slot="field"] [slot="controls"] button-ui:last-child {
|
|
291
292
|
border-bottom: none;
|
|
292
293
|
border-radius: 0;
|
|
293
294
|
}
|
|
@@ -306,7 +307,7 @@ input-ui:not([disabled]) [slot="field"]:hover [slot="suffix"] {
|
|
|
306
307
|
flex-shrink: 0;
|
|
307
308
|
color: var(--input-affix-fg);
|
|
308
309
|
font-size: var(--input-font-size);
|
|
309
|
-
line-height:
|
|
310
|
+
line-height: var(--a-font-leading-none);
|
|
310
311
|
user-select: none;
|
|
311
312
|
pointer-events: none;
|
|
312
313
|
}
|
|
@@ -372,7 +373,7 @@ input-ui:not([disabled]) [slot="field"]:hover [slot="suffix"] {
|
|
|
372
373
|
for the stepper column so it doesn't overlap. (controls is
|
|
373
374
|
absolutely positioned at inset-inline-end: 0; trailing sits in the
|
|
374
375
|
flex flow.) Same pattern as [slot="suffix"] in number mode. */
|
|
375
|
-
[
|
|
376
|
+
:scope[type="number"] [slot="field"]:has(> [slot="trailing"]) > [slot="trailing"] {
|
|
376
377
|
margin-inline-end: var(--input-controls-width, calc(var(--input-height) * 0.7));
|
|
377
378
|
}
|
|
378
379
|
|
|
@@ -1,20 +1,25 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `<input-ui>` — Text + email + password + number + tel + url
|
|
2
|
+
* `<input-ui>` — Text + email + password + number + tel + url input.
|
|
3
3
|
*
|
|
4
4
|
* @see https://ui-kit.exe.xyz/site/components/input
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import { UIFormElement } from '../../core/form.js';
|
|
8
8
|
|
|
9
|
-
/**
|
|
9
|
+
/**
|
|
10
|
+
* Native HTML input types this primitive actually implements. Does NOT
|
|
11
|
+
* cover date/datetime-local/time/month/week/color/search — those never
|
|
12
|
+
* rendered a native affordance on this primitive (v0.9.0, gh#1363 B10);
|
|
13
|
+
* route to CalendarPicker/DatetimePicker/TimePicker/ColorInput/Search
|
|
14
|
+
* instead.
|
|
15
|
+
*/
|
|
10
16
|
export type UIInputType =
|
|
11
17
|
| 'text'
|
|
12
18
|
| 'email'
|
|
13
19
|
| 'password'
|
|
14
20
|
| 'number'
|
|
15
21
|
| 'tel'
|
|
16
|
-
| 'url'
|
|
17
|
-
| 'search';
|
|
22
|
+
| 'url';
|
|
18
23
|
|
|
19
24
|
export interface InputChangeEventDetail {
|
|
20
25
|
value: string;
|
|
@@ -23,8 +23,19 @@ props:
|
|
|
23
23
|
type: string
|
|
24
24
|
default: ''
|
|
25
25
|
type:
|
|
26
|
-
description:
|
|
27
|
-
|
|
26
|
+
description: >-
|
|
27
|
+
Input type. `password` wraps a native `<input>` for disc masking;
|
|
28
|
+
`number` renders a contenteditable + stepper buttons (no native
|
|
29
|
+
input). `text`/`email`/`tel`/`url` use plain contenteditable.
|
|
30
|
+
input-ui does NOT implement date/time/color/search affordances —
|
|
31
|
+
those HTML5 type values render as a plain contenteditable with no
|
|
32
|
+
calendar, clock, swatch, or search affordance (first-pass-VALID
|
|
33
|
+
against this enum historically, but functionally broken generation
|
|
34
|
+
output). Use the owning primitive instead — CalendarPicker for date
|
|
35
|
+
(+ month/week, no dedicated granularity primitive exists),
|
|
36
|
+
DatetimePicker for datetime-local, TimePicker for time,
|
|
37
|
+
ColorInput/ColorPicker for color, Search for search. See
|
|
38
|
+
anti_patterns.
|
|
28
39
|
type: string
|
|
29
40
|
default: text
|
|
30
41
|
enum:
|
|
@@ -34,13 +45,6 @@ props:
|
|
|
34
45
|
- number
|
|
35
46
|
- tel
|
|
36
47
|
- url
|
|
37
|
-
- search
|
|
38
|
-
- date
|
|
39
|
-
- datetime-local
|
|
40
|
-
- time
|
|
41
|
-
- month
|
|
42
|
-
- week
|
|
43
|
-
- color
|
|
44
48
|
required:
|
|
45
49
|
description: Marks the field as required for form validation. Sets aria-required.
|
|
46
50
|
type: boolean
|
|
@@ -282,7 +286,71 @@ a2ui:
|
|
|
282
286
|
primitive ALSO fires a bubbling `submit` event on Enter
|
|
283
287
|
(unconditional, no opt-in attribute); <chat-input-ui> simply
|
|
284
288
|
builds on that semantic.
|
|
285
|
-
|
|
289
|
+
- >-
|
|
290
|
+
input-ui's `type` enum covers only the modes it actually implements
|
|
291
|
+
— text/email/password/number/tel/url (gh#1363 B10). Never
|
|
292
|
+
set [type] to an HTML5 value input-ui doesn't render — route
|
|
293
|
+
date/time/color/search intents to the owning primitive instead:
|
|
294
|
+
CalendarPicker, DatetimePicker, TimePicker, ColorInput (or
|
|
295
|
+
ColorPicker directly), Search. See anti_patterns.
|
|
296
|
+
anti_patterns:
|
|
297
|
+
- wrong: |
|
|
298
|
+
{"component": "Input", "type": "date"}
|
|
299
|
+
why: |
|
|
300
|
+
input-ui's `type` enum no longer includes "date" (gh#1363
|
|
301
|
+
B10) — it never rendered a native date picker, just a plain
|
|
302
|
+
contenteditable surface with no calendar affordance. Use
|
|
303
|
+
CalendarPicker for single-date input.
|
|
304
|
+
fix: |
|
|
305
|
+
{"component": "CalendarPicker"}
|
|
306
|
+
- wrong: |
|
|
307
|
+
{"component": "Input", "type": "datetime-local"}
|
|
308
|
+
why: |
|
|
309
|
+
Same gap as "date" — no native datetime picker rendered. Use
|
|
310
|
+
DatetimePicker for combined date + time input.
|
|
311
|
+
fix: |
|
|
312
|
+
{"component": "DatetimePicker"}
|
|
313
|
+
- wrong: |
|
|
314
|
+
{"component": "Input", "type": "time"}
|
|
315
|
+
why: |
|
|
316
|
+
Same gap as "date" — no native time picker rendered. Use
|
|
317
|
+
TimePicker for time-of-day input.
|
|
318
|
+
fix: |
|
|
319
|
+
{"component": "TimePicker"}
|
|
320
|
+
- wrong: |
|
|
321
|
+
{"component": "Input", "type": "month"}
|
|
322
|
+
why: |
|
|
323
|
+
No native month picker rendered, and no dedicated month-granularity
|
|
324
|
+
primitive exists in the catalog. CalendarPicker (day granularity)
|
|
325
|
+
is the closest routed primitive.
|
|
326
|
+
fix: |
|
|
327
|
+
{"component": "CalendarPicker"}
|
|
328
|
+
- wrong: |
|
|
329
|
+
{"component": "Input", "type": "week"}
|
|
330
|
+
why: |
|
|
331
|
+
No native week picker rendered, and no dedicated week-granularity
|
|
332
|
+
primitive exists in the catalog. CalendarPicker (day granularity)
|
|
333
|
+
is the closest routed primitive.
|
|
334
|
+
fix: |
|
|
335
|
+
{"component": "CalendarPicker"}
|
|
336
|
+
- wrong: |
|
|
337
|
+
{"component": "Input", "type": "color"}
|
|
338
|
+
why: |
|
|
339
|
+
No native color swatch/picker rendered — just a plain text
|
|
340
|
+
surface. Use ColorInput for a compact form-bearing swatch +
|
|
341
|
+
popover, or ColorPicker directly for the full OKLCH picker
|
|
342
|
+
surface.
|
|
343
|
+
fix: |
|
|
344
|
+
{"component": "ColorInput"}
|
|
345
|
+
- wrong: |
|
|
346
|
+
{"component": "Input", "type": "search"}
|
|
347
|
+
why: |
|
|
348
|
+
No search icon or clear affordance rendered — plain
|
|
349
|
+
contenteditable, functionally identical to the default text
|
|
350
|
+
type. Use Search for the dedicated magnifying-glass + clear +
|
|
351
|
+
debounced-search-event primitive.
|
|
352
|
+
fix: |
|
|
353
|
+
{"component": "Search"}
|
|
286
354
|
examples:
|
|
287
355
|
- name: quantity-stepper
|
|
288
356
|
description: Number input with [+]/[-] stepper buttons, min/max bounds, and a quantity label. Use for product quantity,
|
|
@@ -391,3 +459,8 @@ related:
|
|
|
391
459
|
- table
|
|
392
460
|
- pagination
|
|
393
461
|
- check-box
|
|
462
|
+
- search
|
|
463
|
+
- calendar-picker
|
|
464
|
+
- datetime-picker
|
|
465
|
+
- time-picker
|
|
466
|
+
- color-input
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
color: var(--integration-card-heading-fg);
|
|
98
98
|
font-size: var(--integration-card-heading-size);
|
|
99
99
|
font-weight: var(--integration-card-heading-weight);
|
|
100
|
-
line-height:
|
|
100
|
+
line-height: var(--a-font-leading-normal);
|
|
101
101
|
min-width: 0;
|
|
102
102
|
overflow: hidden;
|
|
103
103
|
text-overflow: ellipsis;
|
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
margin: 0;
|
|
119
119
|
color: var(--integration-card-description-fg);
|
|
120
120
|
font-size: var(--integration-card-description-size);
|
|
121
|
-
line-height:
|
|
121
|
+
line-height: var(--a-font-leading-relaxed);
|
|
122
122
|
}
|
|
123
123
|
:scope > [data-integration-card-description][hidden] {
|
|
124
124
|
display: none;
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
margin: 0;
|
|
132
132
|
color: var(--integration-card-description-fg);
|
|
133
133
|
font-size: var(--integration-card-description-size);
|
|
134
|
-
line-height:
|
|
134
|
+
line-height: var(--a-font-leading-relaxed);
|
|
135
135
|
}
|
|
136
136
|
|
|
137
137
|
/* ── Error message ── */
|
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
margin: 0;
|
|
140
140
|
color: var(--integration-card-error-fg);
|
|
141
141
|
font-size: var(--integration-card-error-size);
|
|
142
|
-
line-height:
|
|
142
|
+
line-height: var(--a-font-leading-relaxed);
|
|
143
143
|
}
|
|
144
144
|
:scope > [data-integration-card-error][hidden] {
|
|
145
145
|
display: none;
|
package/components/kbd/kbd.css
CHANGED
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
font-family: var(--kbd-font);
|
|
44
44
|
font-size: var(--kbd-font-size);
|
|
45
45
|
font-weight: var(--kbd-weight);
|
|
46
|
-
line-height:
|
|
46
|
+
line-height: var(--a-font-leading-none);
|
|
47
47
|
color: var(--kbd-fg);
|
|
48
48
|
background: var(--kbd-bg);
|
|
49
49
|
border: 1px solid var(--kbd-border);
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"❌ `<link-ui>` with no `href` AND no `press` handler — a link to nowhere is a bug. Either set `href` or wire a navigate action handler.",
|
|
80
80
|
"❌ `<link-ui>` for form submission — submission is a button concern. Use `<button-ui type=\"submit\">`."
|
|
81
81
|
],
|
|
82
|
-
"category": "
|
|
82
|
+
"category": "display",
|
|
83
83
|
"composes": [],
|
|
84
84
|
"events": {
|
|
85
85
|
"press": {
|
|
@@ -121,6 +121,7 @@
|
|
|
121
121
|
"url"
|
|
122
122
|
],
|
|
123
123
|
"name": "UILink",
|
|
124
|
+
"parts": {},
|
|
124
125
|
"related": [
|
|
125
126
|
"Button",
|
|
126
127
|
"NavItem",
|
|
@@ -24,6 +24,11 @@
|
|
|
24
24
|
"description": "Optional leading icon name (Phosphor).",
|
|
25
25
|
"type": "string"
|
|
26
26
|
},
|
|
27
|
+
"selected": {
|
|
28
|
+
"description": "Whether this row is the current selection. Managed by the parent <list-ui>[selectable] — don't set directly; the parent's [selectedKey] is the single source of truth (ADR-0056).",
|
|
29
|
+
"type": "boolean",
|
|
30
|
+
"default": false
|
|
31
|
+
},
|
|
27
32
|
"text": {
|
|
28
33
|
"description": "Primary text. Renders as semibold inline body.",
|
|
29
34
|
"type": "string"
|
|
@@ -34,6 +39,9 @@
|
|
|
34
39
|
],
|
|
35
40
|
"unevaluatedProperties": false,
|
|
36
41
|
"x-adiaui": {
|
|
42
|
+
"allowedParents": [
|
|
43
|
+
"List"
|
|
44
|
+
],
|
|
37
45
|
"anti_patterns": [],
|
|
38
46
|
"category": "layout",
|
|
39
47
|
"composes": [],
|
|
@@ -47,6 +55,7 @@
|
|
|
47
55
|
"row"
|
|
48
56
|
],
|
|
49
57
|
"name": "UIListItem",
|
|
58
|
+
"parts": {},
|
|
50
59
|
"related": [
|
|
51
60
|
"List",
|
|
52
61
|
"NavItem",
|