@adia-ai/web-components 0.8.40 → 0.8.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +50 -3
- package/MIGRATION.md +1042 -16
- package/README.md +25 -30
- package/USAGE.md +26 -0
- package/bin/audit-template-children.mjs +556 -0
- package/components/accordion/accordion-item.a2ui.json +4 -0
- package/components/accordion/accordion-item.yaml +2 -0
- package/components/accordion/accordion.a2ui.json +4 -0
- package/components/accordion/accordion.yaml +2 -0
- package/components/action-list/action-item.a2ui.json +24 -2
- package/components/action-list/action-item.yaml +28 -3
- package/components/action-list/action-list.a2ui.json +6 -1
- package/components/action-list/action-list.class.js +52 -11
- package/components/action-list/action-list.css +43 -3
- package/components/action-list/action-list.d.ts +4 -2
- package/components/action-list/action-list.yaml +5 -0
- package/components/adia-mark/adia-mark.a2ui.json +1 -0
- package/components/adia-wordmark/adia-wordmark.a2ui.json +1 -0
- package/components/agent-artifact/agent-artifact.a2ui.json +1 -0
- package/components/agent-feedback-bar/agent-feedback-bar.a2ui.json +6 -5
- package/components/agent-feedback-bar/agent-feedback-bar.yaml +6 -2
- package/components/agent-questions/agent-questions.a2ui.json +1 -0
- package/components/agent-reasoning/agent-reasoning.a2ui.json +6 -5
- package/components/agent-reasoning/agent-reasoning.yaml +6 -2
- package/components/agent-suggestions/agent-suggestions.a2ui.json +11 -2
- package/components/agent-suggestions/agent-suggestions.class.js +2 -1
- package/components/agent-suggestions/agent-suggestions.d.ts +4 -4
- package/components/agent-suggestions/agent-suggestions.yaml +4 -2
- package/components/agent-trace/agent-trace.a2ui.json +6 -5
- package/components/agent-trace/agent-trace.yaml +6 -2
- package/components/alert/alert.a2ui.json +1 -0
- package/components/alert/alert.css +1 -1
- package/components/anchor-bar/anchor-bar.a2ui.json +1 -0
- package/components/aside/aside.a2ui.json +1 -0
- package/components/avatar/avatar-group.a2ui.json +7 -1
- package/components/avatar/avatar-group.yaml +1 -0
- package/components/avatar/avatar.a2ui.json +12 -11
- package/components/avatar/avatar.d.ts +1 -1
- package/components/avatar/avatar.yaml +4 -4
- package/components/badge/badge.a2ui.json +1 -0
- package/components/block/block.a2ui.json +1 -0
- package/components/blockquote/blockquote.a2ui.json +1 -0
- package/components/breadcrumb/breadcrumb.a2ui.json +1 -0
- package/components/button/button.a2ui.json +1 -3
- package/components/button/button.yaml +1 -3
- package/components/calendar-grid/calendar-grid.a2ui.json +1 -0
- package/components/calendar-grid/calendar-grid.class.js +2 -1
- package/components/calendar-picker/calendar-picker.a2ui.json +143 -24
- package/components/calendar-picker/calendar-picker.class.js +490 -197
- package/components/calendar-picker/calendar-picker.css +120 -171
- package/components/calendar-picker/calendar-picker.yaml +225 -47
- package/components/canvas/canvas.a2ui.json +6 -5
- package/components/canvas/canvas.d.ts +37 -0
- package/components/canvas/canvas.js +72 -3
- package/components/canvas/canvas.yaml +6 -2
- package/components/card/card.a2ui.json +25 -2
- package/components/card/card.class.js +3 -0
- package/components/card/card.css +31 -1
- package/components/card/card.d.ts +2 -2
- package/components/card/card.examples.md +3 -3
- package/components/card/card.yaml +28 -4
- package/components/chart/chart.a2ui.json +9 -4
- package/components/chart/chart.class.js +6 -6
- package/components/chart/chart.css +6 -4
- package/components/chart/chart.d.ts +1 -1
- package/components/chart/chart.yaml +5 -3
- package/components/chart-legend/chart-legend.a2ui.json +1 -0
- package/components/chat-thread/chat-input.a2ui.json +1 -0
- package/components/chat-thread/chat-thread.a2ui.json +10 -9
- package/components/chat-thread/chat-thread.yaml +13 -20
- package/components/check/check.a2ui.json +10 -9
- package/components/check/check.yaml +4 -4
- package/components/code/code.a2ui.json +1 -0
- package/components/col/col.a2ui.json +1 -0
- package/components/color-input/color-input.a2ui.json +1 -0
- package/components/color-picker/color-picker.a2ui.json +1 -0
- package/components/combobox/combobox.a2ui.json +3 -2
- package/components/combobox/combobox.yaml +2 -2
- package/components/command/command.a2ui.json +12 -10
- package/components/command/command.class.js +3 -2
- package/components/command/command.yaml +17 -4
- package/components/context-menu/context-menu.a2ui.json +1 -0
- package/components/date-range-picker/date-range-picker.a2ui.json +2 -1
- package/components/date-range-picker/date-range-picker.yaml +1 -1
- package/components/datetime-picker/datetime-picker.a2ui.json +15 -108
- package/components/datetime-picker/datetime-picker.class.js +37 -690
- package/components/datetime-picker/datetime-picker.css +11 -183
- package/components/datetime-picker/datetime-picker.d.ts +4 -5
- package/components/datetime-picker/datetime-picker.yaml +44 -135
- package/components/demo-toggle/demo-toggle.a2ui.json +1 -0
- package/components/demo-toggle/demo-toggle.css +1 -1
- package/components/description-list/description-list.a2ui.json +1 -0
- package/components/display-field/display-field.a2ui.json +1 -0
- package/components/divider/divider.a2ui.json +1 -0
- package/components/drawer/drawer.a2ui.json +1 -3
- package/components/drawer/drawer.css +1 -1
- package/components/drawer/drawer.yaml +0 -2
- package/components/drilldown/drilldown.a2ui.json +22 -20
- package/components/drilldown/drilldown.class.js +4 -3
- package/components/drilldown/drilldown.css +6 -6
- package/components/drilldown/drilldown.yaml +40 -9
- package/components/embed/embed.a2ui.json +6 -5
- package/components/embed/embed.yaml +2 -2
- package/components/empty-state/empty-state.a2ui.json +1 -0
- package/components/feed/feed-item.a2ui.json +25 -5
- package/components/feed/feed-item.yaml +28 -7
- package/components/feed/feed.a2ui.json +9 -2
- package/components/feed/feed.class.js +19 -12
- package/components/feed/feed.css +8 -8
- package/components/feed/feed.yaml +14 -1
- package/components/field/field.a2ui.json +1 -0
- package/components/field/field.examples.md +1 -1
- package/components/fields/fields.a2ui.json +1 -0
- package/components/fields/fields.examples.md +1 -1
- package/components/footer/footer.a2ui.json +1 -0
- package/components/frame/frame.a2ui.json +1 -0
- package/components/grid/grid.a2ui.json +1 -0
- package/components/header/header.a2ui.json +3 -2
- package/components/header/header.yaml +3 -3
- package/components/heatmap/heatmap.a2ui.json +2 -1
- package/components/heatmap/heatmap.class.js +1 -1
- package/components/heatmap/heatmap.css +4 -4
- package/components/heatmap/heatmap.yaml +1 -1
- package/components/icon/icon.a2ui.json +1 -0
- package/components/image/image.a2ui.json +28 -14
- package/components/image/image.class.js +38 -23
- package/components/image/image.css +18 -8
- package/components/image/image.d.ts +2 -2
- package/components/image/image.examples.md +3 -3
- package/components/image/image.yaml +23 -7
- package/components/inline-edit/inline-edit.a2ui.json +1 -0
- package/components/inline-message/inline-message.a2ui.json +3 -1
- package/components/inline-message/inline-message.class.js +3 -1
- package/components/inline-message/inline-message.d.ts +2 -2
- package/components/inline-message/inline-message.yaml +2 -1
- package/components/input/input.a2ui.json +66 -16
- package/components/input/input.class.js +64 -7
- package/components/input/input.css +14 -14
- package/components/input/input.d.ts +9 -4
- package/components/input/input.yaml +83 -10
- package/components/inspector/inspector.a2ui.json +1 -0
- package/components/integration-card/integration-card.a2ui.json +1 -0
- package/components/kbd/kbd.a2ui.json +1 -0
- package/components/link/link.a2ui.json +2 -1
- package/components/link/link.yaml +1 -1
- package/components/list/list-item.a2ui.json +9 -0
- package/components/list/list-item.yaml +12 -0
- package/components/list/list.a2ui.json +9 -3
- package/components/list/list.class.js +14 -1
- package/components/list/list.css +12 -1
- package/components/list/list.d.ts +7 -5
- package/components/list/list.yaml +16 -6
- package/components/list-window/list-window.a2ui.json +1 -0
- package/components/list-window/list-window.class.js +2 -1
- package/components/loading-overlay/loading-overlay.a2ui.json +1 -0
- package/components/mark/mark.a2ui.json +2 -1
- package/components/mark/mark.yaml +1 -1
- package/components/menu/menu-divider.a2ui.json +1 -0
- package/components/menu/menu-item.a2ui.json +3 -1
- package/components/menu/menu-item.yaml +6 -0
- package/components/menu/menu-label.a2ui.json +1 -0
- package/components/menu/menu.a2ui.json +3 -2
- package/components/menu/menu.class.js +2 -2
- package/components/menu/menu.d.ts +2 -2
- package/components/menu/menu.yaml +3 -3
- package/components/modal/modal.a2ui.json +1 -0
- package/components/nav/nav.a2ui.json +1 -0
- package/components/nav/nav.class.js +14 -3
- package/components/nav-group/nav-group.a2ui.json +1 -0
- package/components/nav-group/nav-group.class.js +3 -1
- package/components/nav-item/nav-item.a2ui.json +1 -0
- package/components/noodles/noodles.a2ui.json +1 -0
- package/components/noodles/noodles.class.js +5 -1
- package/components/number-format/number-format.a2ui.json +1 -0
- package/components/option-card/option-card.a2ui.json +1 -0
- package/components/otp-input/otp-input.a2ui.json +3 -2
- package/components/otp-input/otp-input.yaml +9 -2
- package/components/page/page.a2ui.json +13 -0
- package/components/page/page.d.ts +1 -1
- package/components/page/page.yaml +1 -0
- package/components/pagination/pagination.a2ui.json +1 -0
- package/components/pagination/pagination.class.js +3 -2
- package/components/pane/pane.a2ui.json +6 -0
- package/components/pane/pane.class.js +3 -3
- package/components/pane/pane.css +2 -2
- package/components/pane/pane.yaml +3 -0
- package/components/password-strength/password-strength.a2ui.json +1 -0
- package/components/pipeline-status/pipeline-status.a2ui.json +1 -0
- package/components/popover/popover.a2ui.json +7 -6
- package/components/popover/popover.class.js +2 -2
- package/components/popover/popover.d.ts +2 -2
- package/components/popover/popover.yaml +4 -4
- package/components/preview/preview.a2ui.json +1 -0
- package/components/preview/preview.class.js +5 -1
- package/components/progress/progress.a2ui.json +47 -24
- package/components/progress/progress.class.js +66 -11
- package/components/progress/progress.css +44 -26
- package/components/progress/progress.d.ts +7 -5
- package/components/progress/progress.examples.md +2 -2
- package/components/progress/progress.yaml +235 -53
- package/components/progress-row/progress-row.a2ui.json +16 -12
- package/components/progress-row/progress-row.d.ts +2 -2
- package/components/progress-row/progress-row.examples.md +2 -14
- package/components/progress-row/progress-row.yaml +28 -36
- package/components/qr-code/qr-code.a2ui.json +3 -2
- package/components/qr-code/qr-code.class.js +4 -4
- package/components/qr-code/qr-code.css +1 -1
- package/components/qr-code/qr-code.yaml +5 -3
- package/components/radio/radio.a2ui.json +8 -7
- package/components/radio/radio.class.js +8 -0
- package/components/radio/radio.yaml +3 -3
- package/components/radio-group/radio-group.a2ui.json +5 -3
- package/components/radio-group/radio-group.class.js +11 -0
- package/components/radio-group/radio-group.yaml +7 -1
- package/components/range/range.a2ui.json +6 -0
- package/components/range/range.class.js +2 -2
- package/components/range/range.css +2 -2
- package/components/range/range.yaml +3 -0
- package/components/rating/rating.a2ui.json +1 -0
- package/components/relative-time/relative-time.a2ui.json +1 -0
- package/components/richtext/richtext.a2ui.json +2 -1
- package/components/richtext/richtext.yaml +1 -1
- package/components/row/row.a2ui.json +1 -0
- package/components/search/search.a2ui.json +1 -0
- package/components/search/search.class.js +4 -1
- package/components/section/section.a2ui.json +1 -0
- package/components/segment/segment.a2ui.json +21 -10
- package/components/segment/segment.css +15 -0
- package/components/segment/segment.d.ts +2 -1
- package/components/segment/segment.yaml +20 -13
- package/components/segmented/segmented.a2ui.json +36 -7
- package/components/segmented/segmented.class.js +113 -22
- package/components/segmented/segmented.css +3 -0
- package/components/segmented/segmented.d.ts +3 -1
- package/components/segmented/segmented.yaml +80 -8
- package/components/select/select.a2ui.json +18 -13
- package/components/select/select.class.js +61 -37
- package/components/select/select.css +15 -13
- package/components/select/select.yaml +18 -7
- package/components/skeleton/skeleton.a2ui.json +8 -7
- package/components/skeleton/skeleton.class.js +8 -7
- package/components/skeleton/skeleton.css +21 -6
- package/components/skeleton/skeleton.d.ts +2 -2
- package/components/skeleton/skeleton.examples.md +2 -2
- package/components/skeleton/skeleton.yaml +3 -2
- package/components/skip-nav/skip-nav.a2ui.json +1 -0
- package/components/slider/slider.a2ui.json +6 -0
- package/components/slider/slider.class.js +20 -3
- package/components/slider/slider.css +2 -2
- package/components/slider/slider.yaml +3 -0
- package/components/spinner/spinner.a2ui.json +1 -0
- package/components/stack/stack.a2ui.json +1 -0
- package/components/stat/stat.a2ui.json +1 -0
- package/components/stat/stat.js +2 -2
- package/components/step-progress/step-progress.a2ui.json +1 -0
- package/components/step-progress/step-progress.yaml +1 -1
- package/components/stepper/stepper-item.a2ui.json +7 -3
- package/components/stepper/stepper-item.yaml +15 -5
- package/components/stepper/stepper.a2ui.json +5 -1
- package/components/stepper/stepper.class.js +31 -16
- package/components/stepper/stepper.d.ts +1 -1
- package/components/stepper/stepper.yaml +4 -2
- package/components/stream/stream.a2ui.json +1 -0
- package/components/swatch/swatch.a2ui.json +1 -0
- package/components/swiper/swiper.a2ui.json +1 -0
- package/components/swiper/swiper.class.js +5 -1
- package/components/switch/switch.a2ui.json +12 -11
- package/components/switch/switch.css +1 -1
- package/components/switch/switch.yaml +6 -6
- package/components/table/table.a2ui.json +1 -0
- package/components/table/table.class.js +14 -12
- package/components/table/table.css +11 -9
- package/components/table-toolbar/table-toolbar.a2ui.json +1 -0
- package/components/table-toolbar/table-toolbar.class.js +38 -19
- package/components/table-toolbar/table-toolbar.css +1 -1
- package/components/tabs/tab.a2ui.json +9 -0
- package/components/tabs/tab.js +4 -0
- package/components/tabs/tab.yaml +15 -0
- package/components/tabs/tabs.a2ui.json +9 -4
- package/components/tabs/tabs.class.js +13 -1
- package/components/tabs/tabs.css +8 -0
- package/components/tabs/tabs.d.ts +2 -0
- package/components/tabs/tabs.yaml +9 -2
- package/components/tag/tag.a2ui.json +1 -0
- package/components/tags-input/tags-input.a2ui.json +22 -17
- package/components/tags-input/tags-input.class.js +13 -11
- package/components/tags-input/tags-input.css +10 -6
- package/components/tags-input/tags-input.d.ts +16 -7
- package/components/tags-input/tags-input.examples.md +2 -2
- package/components/tags-input/tags-input.yaml +25 -8
- package/components/text/text.a2ui.json +6 -5
- package/components/text/text.css +10 -5
- package/components/text/text.d.ts +2 -2
- package/components/text/text.yaml +9 -4
- package/components/textarea/textarea.a2ui.json +2 -1
- package/components/textarea/textarea.yaml +1 -1
- package/components/theme-provider/theme-provider.a2ui.json +2 -1
- package/components/theme-provider/theme-provider.d.ts +5 -3
- package/components/theme-provider/theme-provider.yaml +5 -3
- package/components/time-picker/time-picker.a2ui.json +1 -0
- package/components/time-picker/time-picker.class.js +4 -2
- package/components/timeline/timeline-item.a2ui.json +26 -3
- package/components/timeline/timeline-item.yaml +22 -7
- package/components/timeline/timeline.a2ui.json +4 -0
- package/components/timeline/timeline.class.js +29 -18
- package/components/timeline/timeline.d.ts +3 -3
- package/components/timeline/timeline.yaml +2 -0
- package/components/toast/toast.a2ui.json +10 -3
- package/components/toast/toast.yaml +20 -13
- package/components/toc/toc.a2ui.json +1 -0
- package/components/toggle-group/toggle-group.a2ui.json +7 -3
- package/components/toggle-group/toggle-group.class.js +40 -1
- package/components/toggle-group/toggle-group.css +6 -1
- package/components/toggle-group/toggle-group.d.ts +2 -2
- package/components/toggle-group/toggle-group.yaml +21 -12
- package/components/toggle-group/toggle-option.a2ui.json +7 -3
- package/components/toggle-group/toggle-option.yaml +13 -7
- package/components/toggle-scheme/toggle-scheme.a2ui.json +2 -1
- package/components/toggle-scheme/toggle-scheme.yaml +1 -1
- package/components/toolbar/toolbar-group.a2ui.json +1 -0
- package/components/toolbar/toolbar.a2ui.json +1 -0
- package/components/toolbar/toolbar.class.js +3 -0
- package/components/tooltip/tooltip.a2ui.json +1 -0
- package/components/tour/tour-step.a2ui.json +4 -0
- package/components/tour/tour-step.yaml +2 -0
- package/components/tour/tour.a2ui.json +4 -0
- package/components/tour/tour.yaml +2 -0
- package/components/tree/tree-item.a2ui.json +5 -0
- package/components/tree/tree-item.yaml +3 -0
- package/components/tree/tree.a2ui.json +4 -0
- package/components/tree/tree.class.js +2 -1
- package/components/tree/tree.yaml +2 -0
- package/components/upload/upload.a2ui.json +8 -1
- package/components/upload/upload.class.js +35 -5
- package/components/upload/upload.css +28 -0
- package/components/upload/upload.d.ts +16 -0
- package/components/upload/upload.yaml +27 -7
- package/components/visually-hidden/visually-hidden.a2ui.json +1 -0
- package/core/dom.d.ts +11 -0
- package/core/dom.js +34 -0
- package/core/form.js +7 -0
- package/core/index.d.ts +1 -0
- package/core/index.js +1 -0
- package/core/responsive.js +16 -4
- package/core/template.js +2 -1
- package/custom-elements.json +437 -489
- package/dist/host.min.css +1 -1
- package/dist/host.sheet.js +1 -1
- package/dist/theme-provider.min.js +5 -5
- package/dist/web-components.min.css +1 -1
- package/dist/web-components.min.js +91 -104
- package/dist/web-components.sheet.js +1 -1
- package/package.json +4 -2
- package/patterns/conversion-funnel/conversion-funnel.examples.html +15 -15
- package/patterns/inline-dialog/inline-dialog.examples.html +2 -2
- package/patterns/inline-dialog/inline-dialog.html +4 -0
- package/patterns/timezone-selector/timezone-selector.examples.html +1 -1
- package/patterns/timezone-selector/timezone-selector.html +2 -2
- package/styles/api/text.css +7 -0
- package/traits/_catalog.json +129 -41
- package/traits/anchor-positioning/anchor-positioning.js +1 -0
- package/traits/announcer/announcer.js +1 -0
- package/traits/arrow-grid-nav/arrow-grid-nav.js +1 -0
- package/traits/attention-pulse/attention-pulse.js +1 -0
- package/traits/count-up/count-up.js +1 -0
- package/traits/define.js +78 -0
- package/traits/focus-restore/focus-restore.js +2 -1
- package/traits/haptic-feedback/haptic-feedback.js +1 -0
- package/traits/input-mask/input-mask.js +1 -0
- package/traits/intersection-observer/intersection-observer.js +1 -0
- package/traits/layout-animation/layout-animation.js +1 -0
- package/traits/noise-texture/noise-texture.js +1 -0
- package/traits/resize-observer/resize-observer.js +1 -0
- package/traits/scroll-progress/scroll-progress.js +1 -0
- package/traits/snap-to-grid/snap-to-grid.js +1 -0
- package/traits/sound-feedback/sound-feedback.js +1 -0
- package/traits/spring-animate/spring-animate.js +1 -0
- package/traits/validation/validation.js +1 -0
|
@@ -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
|
}
|
|
@@ -113,15 +113,19 @@
|
|
|
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",
|
|
@@ -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?.();
|
|
@@ -34,8 +34,14 @@
|
|
|
34
34
|
"default": false
|
|
35
35
|
},
|
|
36
36
|
"status": {
|
|
37
|
-
"description": "Lifecycle state (idle | active | completed | error). Pairs with `spinner` on \"active\" for an in-progress step.",
|
|
37
|
+
"description": "Lifecycle state (idle | active | completed | error) — the values timeline.css currently styles. Pairs with `spinner` on \"active\" for an in-progress step.",
|
|
38
38
|
"type": "string",
|
|
39
|
+
"enum": [
|
|
40
|
+
"idle",
|
|
41
|
+
"active",
|
|
42
|
+
"completed",
|
|
43
|
+
"error"
|
|
44
|
+
],
|
|
39
45
|
"default": "idle"
|
|
40
46
|
},
|
|
41
47
|
"text": {
|
|
@@ -49,6 +55,13 @@
|
|
|
49
55
|
"variant": {
|
|
50
56
|
"description": "Visual variant (default | accent | success | warning | danger).",
|
|
51
57
|
"type": "string",
|
|
58
|
+
"enum": [
|
|
59
|
+
"default",
|
|
60
|
+
"accent",
|
|
61
|
+
"success",
|
|
62
|
+
"warning",
|
|
63
|
+
"danger"
|
|
64
|
+
],
|
|
52
65
|
"default": "default"
|
|
53
66
|
}
|
|
54
67
|
},
|
|
@@ -57,6 +70,9 @@
|
|
|
57
70
|
],
|
|
58
71
|
"unevaluatedProperties": false,
|
|
59
72
|
"x-adiaui": {
|
|
73
|
+
"allowedParents": [
|
|
74
|
+
"Timeline"
|
|
75
|
+
],
|
|
60
76
|
"anti_patterns": [],
|
|
61
77
|
"category": "feedback",
|
|
62
78
|
"composes": [],
|
|
@@ -70,6 +86,7 @@
|
|
|
70
86
|
"history-row"
|
|
71
87
|
],
|
|
72
88
|
"name": "UITimelineItem",
|
|
89
|
+
"parts": {},
|
|
73
90
|
"related": [
|
|
74
91
|
"Timeline",
|
|
75
92
|
"FeedItem",
|
|
@@ -77,10 +94,16 @@
|
|
|
77
94
|
],
|
|
78
95
|
"slots": {
|
|
79
96
|
"description": {
|
|
80
|
-
"description": "
|
|
97
|
+
"description": "Custom secondary-line content; falls through to [description] prop if not slotted. render() only writes into the component-stamped fallback span (gh#1462 adopt-or-stamp guard)."
|
|
81
98
|
},
|
|
82
99
|
"icon": {
|
|
83
|
-
"description": "Override the [icon] glyph with a custom slotted element
|
|
100
|
+
"description": "Override the [icon] glyph with a custom slotted element (custom icon-ui, image, avatar). Mutually exclusive with the [icon] attribute — a consumer-authored slot child wins and is never renamed or removed by render() (gh#1462 adopt-or-stamp guard)."
|
|
101
|
+
},
|
|
102
|
+
"label": {
|
|
103
|
+
"description": "Custom primary-line content; falls through to the [text] prop if not slotted. render() only writes into the component-stamped fallback span (gh#1462 adopt-or-stamp guard)."
|
|
104
|
+
},
|
|
105
|
+
"time": {
|
|
106
|
+
"description": "Custom timestamp/duration content; falls through to the [duration] or [time] prop if not slotted. render() only writes into the component-stamped fallback span (gh#1462 adopt-or-stamp guard)."
|
|
84
107
|
}
|
|
85
108
|
},
|
|
86
109
|
"states": [],
|
|
@@ -38,26 +38,39 @@ props:
|
|
|
38
38
|
description: Visual variant (default | accent | success | warning | danger).
|
|
39
39
|
type: string
|
|
40
40
|
default: 'default'
|
|
41
|
+
enum: [default, accent, success, warning, danger]
|
|
41
42
|
status:
|
|
42
|
-
description: Lifecycle state (idle | active | completed | error). Pairs with `spinner` on "active" for an in-progress step.
|
|
43
|
+
description: Lifecycle state (idle | active | completed | error) — the values timeline.css currently styles. Pairs with `spinner` on "active" for an in-progress step.
|
|
43
44
|
type: string
|
|
44
45
|
default: 'idle'
|
|
46
|
+
enum: [idle, active, completed, error]
|
|
45
47
|
spinner:
|
|
46
48
|
description: Show a spinner instead of the dot/icon while status="active".
|
|
47
49
|
type: boolean
|
|
48
50
|
default: false
|
|
49
51
|
|
|
50
52
|
slots:
|
|
53
|
+
label:
|
|
54
|
+
description: >-
|
|
55
|
+
Custom primary-line content; falls through to the [text] prop if not
|
|
56
|
+
slotted. render() only writes into the component-stamped fallback
|
|
57
|
+
span (gh#1462 adopt-or-stamp guard).
|
|
58
|
+
time:
|
|
59
|
+
description: >-
|
|
60
|
+
Custom timestamp/duration content; falls through to the [duration]
|
|
61
|
+
or [time] prop if not slotted. render() only writes into the
|
|
62
|
+
component-stamped fallback span (gh#1462 adopt-or-stamp guard).
|
|
51
63
|
icon:
|
|
52
64
|
description: >-
|
|
53
|
-
Override the [icon] glyph with a custom slotted element
|
|
54
|
-
|
|
55
|
-
|
|
65
|
+
Override the [icon] glyph with a custom slotted element (custom
|
|
66
|
+
icon-ui, image, avatar). Mutually exclusive with the [icon]
|
|
67
|
+
attribute — a consumer-authored slot child wins and is never renamed
|
|
68
|
+
or removed by render() (gh#1462 adopt-or-stamp guard).
|
|
56
69
|
description:
|
|
57
70
|
description: >-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
71
|
+
Custom secondary-line content; falls through to [description] prop
|
|
72
|
+
if not slotted. render() only writes into the component-stamped
|
|
73
|
+
fallback span (gh#1462 adopt-or-stamp guard).
|
|
61
74
|
|
|
62
75
|
keywords:
|
|
63
76
|
- timeline-item
|
|
@@ -75,6 +88,8 @@ related:
|
|
|
75
88
|
- Stepper
|
|
76
89
|
|
|
77
90
|
a2ui:
|
|
91
|
+
allowedParents:
|
|
92
|
+
- Timeline
|
|
78
93
|
rules:
|
|
79
94
|
- rule: 'Child of <timeline-ui> — one chronological event with timestamp + content + optional icon dot.'
|
|
80
95
|
reason: 'Timeline cluster contract.'
|
|
@@ -40,6 +40,9 @@
|
|
|
40
40
|
],
|
|
41
41
|
"unevaluatedProperties": false,
|
|
42
42
|
"x-adiaui": {
|
|
43
|
+
"allowedChildren": [
|
|
44
|
+
"TimelineItem"
|
|
45
|
+
],
|
|
43
46
|
"anti_patterns": [],
|
|
44
47
|
"category": "display",
|
|
45
48
|
"composes": [
|
|
@@ -68,6 +71,7 @@
|
|
|
68
71
|
"timeline"
|
|
69
72
|
],
|
|
70
73
|
"name": "UITimeline",
|
|
74
|
+
"parts": {},
|
|
71
75
|
"related": [
|
|
72
76
|
"timeline-item"
|
|
73
77
|
],
|