@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
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"default": 0
|
|
48
48
|
},
|
|
49
49
|
"minLength": {
|
|
50
|
-
"description": "Minimum per-token character count after `
|
|
50
|
+
"description": "Minimum per-token character count after `normalize` is applied.",
|
|
51
51
|
"type": "number",
|
|
52
52
|
"default": 1
|
|
53
53
|
},
|
|
@@ -56,6 +56,17 @@
|
|
|
56
56
|
"type": "string",
|
|
57
57
|
"default": ""
|
|
58
58
|
},
|
|
59
|
+
"normalize": {
|
|
60
|
+
"description": "Normalize tokens on commit, applied AFTER every candidate is\nalready trimmed of leading/trailing whitespace (unconditional,\nindependent of this attribute). `lowercase` lowercases, `trim`\nis then a no-op (the trim already happened), `strip-spaces`\nremoves all remaining interior whitespace, `\"\"` (default)\napplies no further normalization beyond that unconditional trim\n— case and interior spacing are preserved verbatim. Renamed\nfrom `[transform]` (gh#1335) — this is a value-commit\nnormalization step, a different concept from the global\nEnum·semantic `[transform]` (CSS text-transform display styling:\nuppercase/lowercase/capitalize/none), not merely a colliding\nvocabulary.",
|
|
61
|
+
"type": "string",
|
|
62
|
+
"enum": [
|
|
63
|
+
"",
|
|
64
|
+
"lowercase",
|
|
65
|
+
"trim",
|
|
66
|
+
"strip-spaces"
|
|
67
|
+
],
|
|
68
|
+
"default": ""
|
|
69
|
+
},
|
|
59
70
|
"pasteSplit": {
|
|
60
71
|
"description": "Regex character-class fragment matched against pasted text to\nsplit it into multiple tokens. Default `,\\n` splits on commas\nand newlines. Use `\"\"` to disable paste-splitting entirely.",
|
|
61
72
|
"type": "string",
|
|
@@ -85,17 +96,6 @@
|
|
|
85
96
|
"description": "Optional autocomplete strings rendered in a popover below the\nfield. Suggestions are hints, not gates — the typed value still\nwins on commit. JS property only (array reflection skipped).",
|
|
86
97
|
"$ref": "common_types.json#/$defs/DynamicStringList"
|
|
87
98
|
},
|
|
88
|
-
"transform": {
|
|
89
|
-
"description": "Normalize tokens on commit. `lowercase` lowercases, `trim` strips\nleading + trailing whitespace, `strip-spaces` removes all\nwhitespace, `\"\"` (default) preserves the typed value.",
|
|
90
|
-
"type": "string",
|
|
91
|
-
"enum": [
|
|
92
|
-
"",
|
|
93
|
-
"lowercase",
|
|
94
|
-
"trim",
|
|
95
|
-
"strip-spaces"
|
|
96
|
-
],
|
|
97
|
-
"default": ""
|
|
98
|
-
},
|
|
99
99
|
"unique": {
|
|
100
100
|
"description": "Reject duplicate tokens silently (no `invalid` event for accidental dups).",
|
|
101
101
|
"type": "boolean",
|
|
@@ -103,8 +103,12 @@
|
|
|
103
103
|
},
|
|
104
104
|
"validateFn": {
|
|
105
105
|
"description": "Per-token validator. Sync `(value, index) => boolean` rejects\nfalse synchronously; async `(value, index) => Promise<boolean>`\nflips the host into `[validating]` while pending. JS property\nonly — not serializable in A2UI JSON; wire post-mount.",
|
|
106
|
-
"type":
|
|
107
|
-
|
|
106
|
+
"type": [
|
|
107
|
+
"object",
|
|
108
|
+
"null"
|
|
109
|
+
],
|
|
110
|
+
"default": null,
|
|
111
|
+
"x-ts-type": "((value: string, index: number) => boolean | Promise<boolean>) | null"
|
|
108
112
|
},
|
|
109
113
|
"value": {
|
|
110
114
|
"description": "Current token list (string array). Setting `.value = ['a','b']`\nreplaces the rendered chips. Reflection skipped — array values\ndo not round-trip through attribute strings.",
|
|
@@ -164,7 +168,7 @@
|
|
|
164
168
|
"type": "boolean"
|
|
165
169
|
},
|
|
166
170
|
"value": {
|
|
167
|
-
"description": "Candidate token text (post-
|
|
171
|
+
"description": "Candidate token text (post-normalize).",
|
|
168
172
|
"type": "string"
|
|
169
173
|
}
|
|
170
174
|
}
|
|
@@ -195,12 +199,12 @@
|
|
|
195
199
|
"examples": [
|
|
196
200
|
{
|
|
197
201
|
"description": "Label input with lowercase normalization + max 10 tags + 2 pre-committed values.",
|
|
198
|
-
"a2ui": "[\n {\"id\": \"root\", \"component\": \"Card\", \"children\": [\"sec\"]},\n {\"id\": \"sec\", \"component\": \"Section\", \"children\": [\"field\"]},\n {\n \"id\": \"field\",\n \"component\": \"Field\",\n \"label\": \"Labels\",\n \"children\": [\"tags\"]\n },\n {\n \"id\": \"tags\",\n \"component\": \"TagsInput\",\n \"name\": \"labels\",\n \"placeholder\": \"Add a label, press Enter\",\n \"
|
|
202
|
+
"a2ui": "[\n {\"id\": \"root\", \"component\": \"Card\", \"children\": [\"sec\"]},\n {\"id\": \"sec\", \"component\": \"Section\", \"children\": [\"field\"]},\n {\n \"id\": \"field\",\n \"component\": \"Field\",\n \"label\": \"Labels\",\n \"children\": [\"tags\"]\n },\n {\n \"id\": \"tags\",\n \"component\": \"TagsInput\",\n \"name\": \"labels\",\n \"placeholder\": \"Add a label, press Enter\",\n \"normalize\": \"lowercase\",\n \"max\": 10,\n \"value\": [\"bug\", \"high-priority\"]\n }\n]",
|
|
199
203
|
"name": "canonical-labels"
|
|
200
204
|
},
|
|
201
205
|
{
|
|
202
206
|
"description": "Recipient picker with Enter-only commit (commas are legal in display names).",
|
|
203
|
-
"a2ui": "[\n {\n \"id\": \"to\",\n \"component\": \"TagsInput\",\n \"name\": \"to\",\n \"placeholder\": \"Email…\",\n \"delimiter\": \"enter\",\n \"
|
|
207
|
+
"a2ui": "[\n {\n \"id\": \"to\",\n \"component\": \"TagsInput\",\n \"name\": \"to\",\n \"placeholder\": \"Email…\",\n \"delimiter\": \"enter\",\n \"normalize\": \"trim\"\n }\n]",
|
|
204
208
|
"name": "email-recipients"
|
|
205
209
|
}
|
|
206
210
|
],
|
|
@@ -218,6 +222,7 @@
|
|
|
218
222
|
"multi-value-input"
|
|
219
223
|
],
|
|
220
224
|
"name": "UITagsInput",
|
|
225
|
+
"parts": {},
|
|
221
226
|
"related": [
|
|
222
227
|
"tag",
|
|
223
228
|
"select",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
* JSON-serialized string array under `name`.
|
|
28
28
|
*
|
|
29
29
|
* <tags-input-ui name="labels" placeholder="Add a label…"
|
|
30
|
-
*
|
|
30
|
+
* normalize="lowercase" max="10"></tags-input-ui>
|
|
31
31
|
*
|
|
32
32
|
* <tags-input-ui id="to" name="to" placeholder="Email…"></tags-input-ui>
|
|
33
33
|
* <script>
|
|
@@ -72,7 +72,7 @@ export class UITagsInput extends UIFormElement {
|
|
|
72
72
|
minLength: { type: Number, default: 1, reflect: true, attribute: 'min-length' },
|
|
73
73
|
maxLength: { type: Number, default: 0, reflect: true, attribute: 'max-length' },
|
|
74
74
|
unique: { type: Boolean, default: true, reflect: true },
|
|
75
|
-
|
|
75
|
+
normalize: { type: String, default: '', reflect: true },
|
|
76
76
|
size: { type: String, default: 'md', reflect: true },
|
|
77
77
|
};
|
|
78
78
|
}
|
|
@@ -255,8 +255,7 @@ export class UITagsInput extends UIFormElement {
|
|
|
255
255
|
spellcheck="false"
|
|
256
256
|
aria-autocomplete="list"
|
|
257
257
|
aria-controls="${suggestId}"
|
|
258
|
-
data-placeholder="${this.placeholder || ''}"
|
|
259
|
-
data-empty></span>
|
|
258
|
+
data-placeholder="${this.placeholder || ''}"></span>
|
|
260
259
|
<span data-spinner hidden aria-hidden="true">
|
|
261
260
|
<icon-ui name="circle-notch"></icon-ui>
|
|
262
261
|
</span>
|
|
@@ -431,7 +430,11 @@ export class UITagsInput extends UIFormElement {
|
|
|
431
430
|
this.toggleAttribute('populated', this.#value.length > 0);
|
|
432
431
|
if (!this.#inputEl) return;
|
|
433
432
|
const empty = !(this.#inputEl.textContent || '').length;
|
|
434
|
-
|
|
433
|
+
// No private [data-empty] mirror on #inputEl — it's the exact inverse
|
|
434
|
+
// of the already-declared host [editing] state, so CSS keys off the
|
|
435
|
+
// compound `:scope:not([editing]) [data-inline-input]` instead
|
|
436
|
+
// (gh#1332 Category A; matches select-ui's `[data-multi-chips]` drop
|
|
437
|
+
// from PR #1438's precedent — no bare successor attribute needed).
|
|
435
438
|
this.toggleAttribute('editing', !empty);
|
|
436
439
|
}
|
|
437
440
|
|
|
@@ -628,8 +631,8 @@ export class UITagsInput extends UIFormElement {
|
|
|
628
631
|
|
|
629
632
|
// ── Commit / remove ──
|
|
630
633
|
|
|
631
|
-
#
|
|
632
|
-
const t = this.
|
|
634
|
+
#applyNormalize(raw) {
|
|
635
|
+
const t = this.normalize;
|
|
633
636
|
if (t === 'lowercase') return raw.toLowerCase();
|
|
634
637
|
if (t === 'trim') return raw.trim();
|
|
635
638
|
if (t === 'strip-spaces') return raw.replace(/\s+/g, '');
|
|
@@ -638,11 +641,11 @@ export class UITagsInput extends UIFormElement {
|
|
|
638
641
|
|
|
639
642
|
#commitToken(rawInput, source) {
|
|
640
643
|
if (this.disabled || this.readonly) return false;
|
|
641
|
-
// Always strip surrounding whitespace before
|
|
644
|
+
// Always strip surrounding whitespace before normalize — typed strings
|
|
642
645
|
// from the contenteditable surface routinely carry trailing spaces.
|
|
643
|
-
let candidate = this.#
|
|
646
|
+
let candidate = this.#applyNormalize(rawInput.trim());
|
|
644
647
|
if (!candidate) {
|
|
645
|
-
// Empty after
|
|
648
|
+
// Empty after normalize — silently drop without firing invalid.
|
|
646
649
|
this.#clearInputBuffer();
|
|
647
650
|
return false;
|
|
648
651
|
}
|
|
@@ -775,7 +778,6 @@ export class UITagsInput extends UIFormElement {
|
|
|
775
778
|
this.#suppressInput = true;
|
|
776
779
|
this.#inputEl.textContent = '';
|
|
777
780
|
this.#suppressInput = false;
|
|
778
|
-
this.#inputEl.setAttribute('data-empty', '');
|
|
779
781
|
this.removeAttribute('editing');
|
|
780
782
|
this.#renderSuggestions();
|
|
781
783
|
}
|
|
@@ -109,19 +109,23 @@
|
|
|
109
109
|
color: var(--tags-input-fg);
|
|
110
110
|
font: inherit;
|
|
111
111
|
font-size: var(--tags-input-font-size);
|
|
112
|
-
line-height:
|
|
112
|
+
line-height: var(--a-font-leading-normal);
|
|
113
113
|
white-space: pre-wrap;
|
|
114
114
|
overflow-wrap: anywhere;
|
|
115
115
|
cursor: text;
|
|
116
|
-
/* Positioning context for the [
|
|
116
|
+
/* Positioning context for the :not([editing]) placeholder pseudo
|
|
117
117
|
(kept out of inline flow so the caret renders at content-start). */
|
|
118
118
|
position: relative;
|
|
119
119
|
}
|
|
120
|
-
/* Empty-state placeholder.
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
120
|
+
/* Empty-state placeholder. Keys off the host's already-declared
|
|
121
|
+
[editing] state (its exact inverse) rather than a private
|
|
122
|
+
[data-empty] mirror on this element — gh#1332 Category A, matches
|
|
123
|
+
select-ui's `[multiple]:not([summary-label])` compound precedent.
|
|
124
|
+
The pseudo is absolutely positioned (NOT inline) so an in-flow
|
|
125
|
+
pseudo box doesn't push the caret-at-position-0 to the right of the
|
|
126
|
+
placeholder text after type-then-delete. Same pattern input-ui +
|
|
127
|
+
textarea-ui + combobox-ui use. */
|
|
128
|
+
:scope:not([editing]) [data-inline-input]::before {
|
|
125
129
|
content: attr(data-placeholder);
|
|
126
130
|
color: var(--tags-input-placeholder-fg);
|
|
127
131
|
pointer-events: none;
|
|
@@ -37,7 +37,7 @@ export type TagsInputChangeEvent = CustomEvent<TagsInputChangeEventDetail>;
|
|
|
37
37
|
export interface TagsInputCommitEventDetail {
|
|
38
38
|
/** True unless the consumer calls `preventDefault()`. */
|
|
39
39
|
accepted: boolean;
|
|
40
|
-
/** Candidate token text (post-
|
|
40
|
+
/** Candidate token text (post-normalize). */
|
|
41
41
|
value: string;
|
|
42
42
|
}
|
|
43
43
|
|
|
@@ -72,10 +72,23 @@ sentinel `enter` disables in-line commit — only the Enter key
|
|
|
72
72
|
maxLength: number;
|
|
73
73
|
/** Minimum required tokens for form validity. */
|
|
74
74
|
min: number;
|
|
75
|
-
/** Minimum per-token character count after `
|
|
75
|
+
/** Minimum per-token character count after `normalize` is applied. */
|
|
76
76
|
minLength: number;
|
|
77
77
|
/** Form field name. Serializes the token list as JSON under this key. */
|
|
78
78
|
name: string;
|
|
79
|
+
/** Normalize tokens on commit, applied AFTER every candidate is
|
|
80
|
+
already trimmed of leading/trailing whitespace (unconditional,
|
|
81
|
+
independent of this attribute). `lowercase` lowercases, `trim`
|
|
82
|
+
is then a no-op (the trim already happened), `strip-spaces`
|
|
83
|
+
removes all remaining interior whitespace, `""` (default)
|
|
84
|
+
applies no further normalization beyond that unconditional trim
|
|
85
|
+
— case and interior spacing are preserved verbatim. Renamed
|
|
86
|
+
from `[transform]` (gh#1335) — this is a value-commit
|
|
87
|
+
normalization step, a different concept from the global
|
|
88
|
+
Enum·semantic `[transform]` (CSS text-transform display styling:
|
|
89
|
+
uppercase/lowercase/capitalize/none), not merely a colliding
|
|
90
|
+
vocabulary. */
|
|
91
|
+
normalize: '' | 'lowercase' | 'trim' | 'strip-spaces';
|
|
79
92
|
/** Regex character-class fragment matched against pasted text to
|
|
80
93
|
split it into multiple tokens. Default `,\n` splits on commas
|
|
81
94
|
and newlines. Use `""` to disable paste-splitting entirely. */
|
|
@@ -92,17 +105,13 @@ either feels coherent in a form row. */
|
|
|
92
105
|
field. Suggestions are hints, not gates — the typed value still
|
|
93
106
|
wins on commit. JS property only (array reflection skipped). */
|
|
94
107
|
suggestions: string;
|
|
95
|
-
/** Normalize tokens on commit. `lowercase` lowercases, `trim` strips
|
|
96
|
-
leading + trailing whitespace, `strip-spaces` removes all
|
|
97
|
-
whitespace, `""` (default) preserves the typed value. */
|
|
98
|
-
transform: '' | 'lowercase' | 'trim' | 'strip-spaces';
|
|
99
108
|
/** Reject duplicate tokens silently (no `invalid` event for accidental dups). */
|
|
100
109
|
unique: boolean;
|
|
101
110
|
/** Per-token validator. Sync `(value, index) => boolean` rejects
|
|
102
111
|
false synchronously; async `(value, index) => Promise<boolean>`
|
|
103
112
|
flips the host into `[validating]` while pending. JS property
|
|
104
113
|
only — not serializable in A2UI JSON; wire post-mount. */
|
|
105
|
-
validateFn:
|
|
114
|
+
validateFn: ((value: string, index: number) => boolean | Promise<boolean>) | null;
|
|
106
115
|
/** Current token list (string array). Setting `.value = ['a','b']`
|
|
107
116
|
replaces the rendered chips. Reflection skipped — array values
|
|
108
117
|
do not round-trip through attribute strings. */
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
</field-ui>
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## normalize="lowercase"
|
|
12
12
|
|
|
13
13
|
```html
|
|
14
14
|
<field-ui label="Labels">
|
|
15
|
-
<tags-input-ui name="labels"
|
|
15
|
+
<tags-input-ui name="labels" normalize="lowercase" placeholder="Type FOO, see foo"></tags-input-ui>
|
|
16
16
|
</field-ui>
|
|
17
17
|
```
|
|
18
18
|
|
|
@@ -72,7 +72,7 @@ props:
|
|
|
72
72
|
default: 0
|
|
73
73
|
reflect: true
|
|
74
74
|
minLength:
|
|
75
|
-
description: Minimum per-token character count after `
|
|
75
|
+
description: Minimum per-token character count after `normalize` is applied.
|
|
76
76
|
type: number
|
|
77
77
|
default: 1
|
|
78
78
|
attribute: min-length
|
|
@@ -88,11 +88,20 @@ props:
|
|
|
88
88
|
type: boolean
|
|
89
89
|
default: true
|
|
90
90
|
reflect: true
|
|
91
|
-
|
|
91
|
+
normalize:
|
|
92
92
|
description: |-
|
|
93
|
-
Normalize tokens on commit
|
|
94
|
-
|
|
95
|
-
|
|
93
|
+
Normalize tokens on commit, applied AFTER every candidate is
|
|
94
|
+
already trimmed of leading/trailing whitespace (unconditional,
|
|
95
|
+
independent of this attribute). `lowercase` lowercases, `trim`
|
|
96
|
+
is then a no-op (the trim already happened), `strip-spaces`
|
|
97
|
+
removes all remaining interior whitespace, `""` (default)
|
|
98
|
+
applies no further normalization beyond that unconditional trim
|
|
99
|
+
— case and interior spacing are preserved verbatim. Renamed
|
|
100
|
+
from `[transform]` (gh#1335) — this is a value-commit
|
|
101
|
+
normalization step, a different concept from the global
|
|
102
|
+
Enum·semantic `[transform]` (CSS text-transform display styling:
|
|
103
|
+
uppercase/lowercase/capitalize/none), not merely a colliding
|
|
104
|
+
vocabulary.
|
|
96
105
|
type: string
|
|
97
106
|
default: ""
|
|
98
107
|
enum:
|
|
@@ -115,9 +124,17 @@ props:
|
|
|
115
124
|
false synchronously; async `(value, index) => Promise<boolean>`
|
|
116
125
|
flips the host into `[validating]` while pending. JS property
|
|
117
126
|
only — not serializable in A2UI JSON; wire post-mount.
|
|
127
|
+
# gh#1329 PR #1418 review: the real shape is a callable — a JS-only,
|
|
128
|
+
# non-serializable property (per the description above) — but JSON
|
|
129
|
+
# Schema has no function type, so `type: object` is the closest the
|
|
130
|
+
# a2ui.json/catalog schema can express. `ts_type:` overrides only the
|
|
131
|
+
# generated `.d.ts` property type to the real callable signature; the
|
|
132
|
+
# setter's `typeof fn === 'function'` guard + the (candidate, index)
|
|
133
|
+
# call site are the source of truth (tags-input.class.js:200-204,684).
|
|
118
134
|
type: object
|
|
119
135
|
default: null
|
|
120
136
|
dynamic: true
|
|
137
|
+
ts_type: '((value: string, index: number) => boolean | Promise<boolean>) | null'
|
|
121
138
|
disabled:
|
|
122
139
|
description: Block all interaction; dim the field.
|
|
123
140
|
type: boolean
|
|
@@ -168,7 +185,7 @@ events:
|
|
|
168
185
|
detail:
|
|
169
186
|
value:
|
|
170
187
|
type: string
|
|
171
|
-
description: Candidate token text (post-
|
|
188
|
+
description: Candidate token text (post-normalize).
|
|
172
189
|
accepted:
|
|
173
190
|
type: boolean
|
|
174
191
|
description: True unless the consumer calls `preventDefault()`.
|
|
@@ -321,7 +338,7 @@ examples:
|
|
|
321
338
|
"component": "TagsInput",
|
|
322
339
|
"name": "labels",
|
|
323
340
|
"placeholder": "Add a label, press Enter",
|
|
324
|
-
"
|
|
341
|
+
"normalize": "lowercase",
|
|
325
342
|
"max": 10,
|
|
326
343
|
"value": ["bug", "high-priority"]
|
|
327
344
|
}
|
|
@@ -336,7 +353,7 @@ examples:
|
|
|
336
353
|
"name": "to",
|
|
337
354
|
"placeholder": "Email…",
|
|
338
355
|
"delimiter": "enter",
|
|
339
|
-
"
|
|
356
|
+
"normalize": "trim"
|
|
340
357
|
}
|
|
341
358
|
]
|
|
342
359
|
keywords:
|
|
@@ -51,12 +51,12 @@
|
|
|
51
51
|
"default": false
|
|
52
52
|
},
|
|
53
53
|
"text-align": {
|
|
54
|
-
"description": "Override text alignment. Note: text-ui defaults to display:inline, so this only takes effect when text-ui is block-like (wrapping or parent display:block/grid). Added v0.6.18 (FB-10).",
|
|
54
|
+
"description": "Override text alignment. Note: text-ui defaults to display:inline, so this only takes effect when text-ui is block-like (wrapping or parent display:block/grid). Added v0.6.18 (FB-10). Converged onto the global Enum·semantic `[text-align]` physical vocabulary (gh#1335) — `start`/`end` renamed to `left`/`right`; `justify` kept (a genuine physical alignment value, now also supported by the global grammar).",
|
|
55
55
|
"type": "string",
|
|
56
56
|
"enum": [
|
|
57
|
-
"
|
|
57
|
+
"left",
|
|
58
58
|
"center",
|
|
59
|
-
"
|
|
59
|
+
"right",
|
|
60
60
|
"justify"
|
|
61
61
|
],
|
|
62
62
|
"default": ""
|
|
@@ -104,10 +104,10 @@
|
|
|
104
104
|
}
|
|
105
105
|
},
|
|
106
106
|
"weight": {
|
|
107
|
-
"description": "Override the variant's font-weight. Maps to --a-weight / --a-weight-medium / --a-weight-semibold / --a-weight-bold. Permissive: unknown values are no-ops (variant weight wins). Added v0.6.18 (FB-10).",
|
|
107
|
+
"description": "Override the variant's font-weight. Maps to --a-weight / --a-weight-medium / --a-weight-semibold / --a-weight-bold. Permissive: unknown values are no-ops (variant weight wins). Added v0.6.18 (FB-10). `normal` (was `regular`, gh#1335 — converged onto the global Enum·semantic `[weight]` vocabulary's spelling).",
|
|
108
108
|
"type": "string",
|
|
109
109
|
"enum": [
|
|
110
|
-
"
|
|
110
|
+
"normal",
|
|
111
111
|
"medium",
|
|
112
112
|
"semibold",
|
|
113
113
|
"bold"
|
|
@@ -140,6 +140,7 @@
|
|
|
140
140
|
"text"
|
|
141
141
|
],
|
|
142
142
|
"name": "UIText",
|
|
143
|
+
"parts": {},
|
|
143
144
|
"related": [
|
|
144
145
|
"avatar",
|
|
145
146
|
"input",
|
package/components/text/text.css
CHANGED
|
@@ -86,16 +86,21 @@
|
|
|
86
86
|
:scope[color="success"] { --text-color: var(--a-success-bg); }
|
|
87
87
|
:scope[color="warning"] { --text-color: var(--a-warning-bg); }
|
|
88
88
|
|
|
89
|
-
/* weight —
|
|
90
|
-
|
|
89
|
+
/* weight — normal | medium | semibold | bold. `normal` (was `regular`,
|
|
90
|
+
gh#1335 — converged onto the global Enum·semantic [weight] spelling). */
|
|
91
|
+
:scope[weight="normal"] { --text-weight: var(--a-weight); }
|
|
91
92
|
:scope[weight="medium"] { --text-weight: var(--a-weight-medium); }
|
|
92
93
|
:scope[weight="semibold"] { --text-weight: var(--a-weight-semibold); }
|
|
93
94
|
:scope[weight="bold"] { --text-weight: var(--a-weight-bold); }
|
|
94
95
|
|
|
95
|
-
/* text-align —
|
|
96
|
-
|
|
96
|
+
/* text-align — left | center | right | justify. Converged onto the
|
|
97
|
+
global Enum·semantic [text-align] physical vocabulary (gh#1335,
|
|
98
|
+
renamed from the logical start/end pair) — matches the global
|
|
99
|
+
utility CSS (api/text.css) 1:1, kept local for @scope symmetry
|
|
100
|
+
with the rest of this file's token-driven rules. */
|
|
101
|
+
:scope[text-align="left"] { text-align: left; }
|
|
97
102
|
:scope[text-align="center"] { text-align: center; }
|
|
98
|
-
:scope[text-align="
|
|
103
|
+
:scope[text-align="right"] { text-align: right; }
|
|
99
104
|
:scope[text-align="justify"] { text-align: justify; }
|
|
100
105
|
/* Note: `<text-ui>` defaults to display:inline. text-align only takes
|
|
101
106
|
effect when text-ui itself is block-like (e.g. via wrapping or a
|
|
@@ -61,6 +61,6 @@ For semantic headings, wrap with native `<h1>`-`<h6>` OR add
|
|
|
61
61
|
labels (eyebrows, kickers, captions, deck), the presentational default
|
|
62
62
|
is correct. The §221k chooser guide in USAGE.md documents picker heuristics. */
|
|
63
63
|
variant: UITextVariant;
|
|
64
|
-
/** Override the variant's font-weight. Maps to --a-weight / --a-weight-medium / --a-weight-semibold / --a-weight-bold. Permissive: unknown values are no-ops (variant weight wins). Added v0.6.18 (FB-10). */
|
|
65
|
-
weight: '
|
|
64
|
+
/** Override the variant's font-weight. Maps to --a-weight / --a-weight-medium / --a-weight-semibold / --a-weight-bold. Permissive: unknown values are no-ops (variant weight wins). Added v0.6.18 (FB-10). `normal` (was `regular`, gh#1335 — converged onto the global Enum·semantic `[weight]` vocabulary's spelling). */
|
|
65
|
+
weight: 'normal' | 'medium' | 'semibold' | 'bold';
|
|
66
66
|
}
|
|
@@ -39,9 +39,13 @@ props:
|
|
|
39
39
|
description: >-
|
|
40
40
|
Override text alignment. Note: text-ui defaults to display:inline,
|
|
41
41
|
so this only takes effect when text-ui is block-like (wrapping or
|
|
42
|
-
parent display:block/grid). Added v0.6.18 (FB-10).
|
|
42
|
+
parent display:block/grid). Added v0.6.18 (FB-10). Converged onto
|
|
43
|
+
the global Enum·semantic `[text-align]` physical vocabulary
|
|
44
|
+
(gh#1335) — `start`/`end` renamed to `left`/`right`; `justify`
|
|
45
|
+
kept (a genuine physical alignment value, now also supported by
|
|
46
|
+
the global grammar).
|
|
43
47
|
type: string
|
|
44
|
-
enum: ["
|
|
48
|
+
enum: ["left", "center", "right", "justify"]
|
|
45
49
|
default: ""
|
|
46
50
|
reflect: true
|
|
47
51
|
truncate:
|
|
@@ -54,9 +58,10 @@ props:
|
|
|
54
58
|
Override the variant's font-weight. Maps to --a-weight /
|
|
55
59
|
--a-weight-medium / --a-weight-semibold / --a-weight-bold.
|
|
56
60
|
Permissive: unknown values are no-ops (variant weight wins). Added
|
|
57
|
-
v0.6.18 (FB-10).
|
|
61
|
+
v0.6.18 (FB-10). `normal` (was `regular`, gh#1335 — converged
|
|
62
|
+
onto the global Enum·semantic `[weight]` vocabulary's spelling).
|
|
58
63
|
type: string
|
|
59
|
-
enum: ["
|
|
64
|
+
enum: ["normal", "medium", "semibold", "bold"]
|
|
60
65
|
default: ""
|
|
61
66
|
reflect: true
|
|
62
67
|
textContent:
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
"unevaluatedProperties": false,
|
|
90
90
|
"x-adiaui": {
|
|
91
91
|
"anti_patterns": [],
|
|
92
|
-
"category": "
|
|
92
|
+
"category": "input",
|
|
93
93
|
"composes": [],
|
|
94
94
|
"events": {
|
|
95
95
|
"change": {
|
|
@@ -110,6 +110,7 @@
|
|
|
110
110
|
"textarea"
|
|
111
111
|
],
|
|
112
112
|
"name": "UITextarea",
|
|
113
|
+
"parts": {},
|
|
113
114
|
"related": [
|
|
114
115
|
"Input",
|
|
115
116
|
"Field",
|
|
@@ -75,7 +75,7 @@ textarea-ui:not([disabled]) [slot="text"]:hover {
|
|
|
75
75
|
/* font-family floor — see segment.css rationale. */
|
|
76
76
|
font-family: var(--textarea-font-family);
|
|
77
77
|
font-size: var(--textarea-font-size);
|
|
78
|
-
line-height:
|
|
78
|
+
line-height: var(--a-font-leading-relaxed);
|
|
79
79
|
white-space: pre-wrap;
|
|
80
80
|
word-break: break-word;
|
|
81
81
|
overflow-y: auto;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://adiaui.dev/a2ui/v0_9/components/ThemeProvider.json",
|
|
4
4
|
"title": "ThemeProvider",
|
|
5
|
-
"description": "Foundation-providing wrapper — adopts the AdiaUI foundation (design tokens +\nresets + page-frame + every primitive's CSS) into the document from anywhere\nin the DOM, so a surface renders fully-styled WITHOUT a hand-wired\n<link rel=\"stylesheet\"> in <head>. Layout-transparent (display: contents): the\nelement owns no box; children lay out as if it weren't there.\n\nMechanism: it imports the constructable-stylesheet twin of web-components.min.css\n(byte-identical to the CDN bundle, emitted from the same build buffer) and\nadopts it once into document.adoptedStyleSheets, deduped — adoption fires at\nmodule load, before paint. Coexists with the render-blocking <link> path; both\ndeliver the same bytes. Use a <link> (-> the CDN web-components.min.css) for\nmulti-page / top-level surfaces (cacheable across navigations, zero flash); use\n<theme-provider> for SPA roots, embedded apps, and dynamic mounts where you do\nnot control <head> (e.g. <embed-shell>, an A2UI surface, a micro-frontend).\n\nTheming: the base foundation is OS light/dark via light-dark() tokens. Two opt-in\nattributes adopt their layer on demand — theme=\"ocean|forest|slate|…\" applies a\nnamed preset (adopts the themes layer; matches the [theme] hook) and\nscale=\"
|
|
5
|
+
"description": "Foundation-providing wrapper — adopts the AdiaUI foundation (design tokens +\nresets + page-frame + every primitive's CSS) into the document from anywhere\nin the DOM, so a surface renders fully-styled WITHOUT a hand-wired\n<link rel=\"stylesheet\"> in <head>. Layout-transparent (display: contents): the\nelement owns no box; children lay out as if it weren't there.\n\nMechanism: it imports the constructable-stylesheet twin of web-components.min.css\n(byte-identical to the CDN bundle, emitted from the same build buffer) and\nadopts it once into document.adoptedStyleSheets, deduped — adoption fires at\nmodule load, before paint. Coexists with the render-blocking <link> path; both\ndeliver the same bytes. Use a <link> (-> the CDN web-components.min.css) for\nmulti-page / top-level surfaces (cacheable across navigations, zero flash); use\n<theme-provider> for SPA roots, embedded apps, and dynamic mounts where you do\nnot control <head> (e.g. <embed-shell>, an A2UI surface, a micro-frontend).\n\nTheming: the base foundation is OS light/dark via light-dark() tokens. Two opt-in\nattributes adopt their layer on demand — theme=\"ocean|forest|slate|…\" applies a\nnamed preset (adopts the themes layer; matches the [theme] hook) and\nscale=\"ui-sm|ui-md|ui-lg|content-sm|content-md|content-lg\" sets the sizing\nregister (adopts the matching register layer). Deprecated aliases \"verse\"\n(→ ui-sm) and \"prose\" (→ content-md) still map onto the legacy\n[verse]/[prose] attributes; removed at v1.0. Each layer is fetched only\nwhen its attribute is set, so a bare provider stays lean.\nOpt-in infra: NOT in the all-in-one @adia-ai/web-components barrel (it carries\nthe whole foundation); import @adia-ai/web-components/components/theme-provider\nexplicitly. Distinct from <frame-ui> (a layout skeleton, owns no CSS delivery)\nand the page shells (chrome over the same foundation).\n",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"allOf": [
|
|
8
8
|
{
|
|
@@ -66,6 +66,7 @@
|
|
|
66
66
|
"spa"
|
|
67
67
|
],
|
|
68
68
|
"name": "UIThemeProvider",
|
|
69
|
+
"parts": {},
|
|
69
70
|
"related": [
|
|
70
71
|
"Frame",
|
|
71
72
|
"Card"
|
|
@@ -17,9 +17,11 @@ not control <head> (e.g. <embed-shell>, an A2UI surface, a micro-frontend).
|
|
|
17
17
|
Theming: the base foundation is OS light/dark via light-dark() tokens. Two opt-in
|
|
18
18
|
attributes adopt their layer on demand — theme="ocean|forest|slate|…" applies a
|
|
19
19
|
named preset (adopts the themes layer; matches the [theme] hook) and
|
|
20
|
-
scale="
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
scale="ui-sm|ui-md|ui-lg|content-sm|content-md|content-lg" sets the sizing
|
|
21
|
+
register (adopts the matching register layer). Deprecated aliases "verse"
|
|
22
|
+
(→ ui-sm) and "prose" (→ content-md) still map onto the legacy
|
|
23
|
+
[verse]/[prose] attributes; removed at v1.0. Each layer is fetched only
|
|
24
|
+
when its attribute is set, so a bare provider stays lean.
|
|
23
25
|
Opt-in infra: NOT in the all-in-one @adia-ai/web-components barrel (it carries
|
|
24
26
|
the whole foundation); import @adia-ai/web-components/components/theme-provider
|
|
25
27
|
explicitly. Distinct from <frame-ui> (a layout skeleton, owns no CSS delivery)
|
|
@@ -25,9 +25,11 @@ description: |
|
|
|
25
25
|
Theming: the base foundation is OS light/dark via light-dark() tokens. Two opt-in
|
|
26
26
|
attributes adopt their layer on demand — theme="ocean|forest|slate|…" applies a
|
|
27
27
|
named preset (adopts the themes layer; matches the [theme] hook) and
|
|
28
|
-
scale="
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
scale="ui-sm|ui-md|ui-lg|content-sm|content-md|content-lg" sets the sizing
|
|
29
|
+
register (adopts the matching register layer). Deprecated aliases "verse"
|
|
30
|
+
(→ ui-sm) and "prose" (→ content-md) still map onto the legacy
|
|
31
|
+
[verse]/[prose] attributes; removed at v1.0. Each layer is fetched only
|
|
32
|
+
when its attribute is set, so a bare provider stays lean.
|
|
31
33
|
Opt-in infra: NOT in the all-in-one @adia-ai/web-components barrel (it carries
|
|
32
34
|
the whole foundation); import @adia-ai/web-components/components/theme-provider
|
|
33
35
|
explicitly. Distinct from <frame-ui> (a layout skeleton, owns no CSS delivery)
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
*/
|
|
34
34
|
|
|
35
35
|
import { UIFormElement } from '../../core/form.js';
|
|
36
|
+
import { isElement } from '../../core/dom.js';
|
|
36
37
|
|
|
37
38
|
const HOUR_MAX_24 = 23;
|
|
38
39
|
const HOUR_MAX_12 = 12;
|
|
@@ -502,7 +503,7 @@ export class UITimePicker extends UIFormElement {
|
|
|
502
503
|
// ── Event handlers ──
|
|
503
504
|
|
|
504
505
|
#segmentOf(target) {
|
|
505
|
-
if (!(target
|
|
506
|
+
if (!isElement(target)) return null;
|
|
506
507
|
const el = target.closest('[data-segment]');
|
|
507
508
|
if (!el || !this.contains(el)) return null;
|
|
508
509
|
return el.getAttribute('data-segment');
|
|
@@ -652,7 +653,8 @@ export class UITimePicker extends UIFormElement {
|
|
|
652
653
|
#onSegFocus = (e) => {
|
|
653
654
|
// Select-all so the next digit overwrites cleanly.
|
|
654
655
|
const target = e.target;
|
|
655
|
-
if (!(target
|
|
656
|
+
if (!isElement(target)) return;
|
|
657
|
+
if (typeof requestAnimationFrame !== 'function') return; // SSR shim — no frame, no selection
|
|
656
658
|
requestAnimationFrame(() => {
|
|
657
659
|
if (document.activeElement !== target) return;
|
|
658
660
|
const sel = window.getSelection?.();
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
font-family: var(--time-picker-font-family, var(--a-font-family-ui));
|
|
43
43
|
font-size: var(--time-picker-font-size);
|
|
44
44
|
font-variant-numeric: tabular-nums;
|
|
45
|
-
line-height:
|
|
45
|
+
line-height: var(--a-font-leading-normal);
|
|
46
46
|
cursor: text;
|
|
47
47
|
transition:
|
|
48
48
|
border-color var(--time-picker-duration) var(--time-picker-easing),
|