@adia-ai/web-components 0.6.33 → 0.6.35
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 +64 -0
- package/color/index.js +1 -1
- package/components/accordion/accordion-item.yaml +2 -2
- package/components/accordion/accordion.css +2 -2
- package/components/accordion/accordion.js +1 -1
- package/components/action-list/action-item.yaml +2 -2
- package/components/action-list/action-list.css +2 -2
- package/components/action-list/action-list.js +1 -1
- package/components/agent-artifact/{class.js → agent-artifact.class.js} +1 -1
- package/components/agent-artifact/agent-artifact.css +31 -31
- package/components/agent-artifact/agent-artifact.js +1 -1
- package/components/agent-feedback-bar/agent-feedback-bar.css +10 -10
- package/components/agent-feedback-bar/agent-feedback-bar.js +1 -1
- package/components/agent-questions/agent-questions.css +57 -57
- package/components/agent-questions/agent-questions.js +1 -1
- package/components/agent-reasoning/agent-reasoning.css +62 -62
- package/components/agent-reasoning/agent-reasoning.js +1 -1
- package/components/agent-suggestions/agent-suggestions.css +4 -4
- package/components/agent-suggestions/agent-suggestions.js +1 -1
- package/components/agent-trace/agent-trace.css +53 -53
- package/components/alert/alert.a2ui.json +64 -1
- package/components/alert/{class.js → alert.class.js} +189 -2
- package/components/alert/alert.css +119 -41
- package/components/alert/alert.d.ts +14 -0
- package/components/alert/alert.js +1 -1
- package/components/alert/alert.test.js +184 -0
- package/components/alert/alert.yaml +114 -1
- package/components/avatar/avatar-group.yaml +2 -2
- package/components/avatar/avatar.css +27 -27
- package/components/avatar/avatar.js +1 -1
- package/components/badge/badge.css +27 -27
- package/components/badge/badge.js +1 -1
- package/components/block/block.css +16 -16
- package/components/block/block.js +1 -1
- package/components/breadcrumb/breadcrumb.css +23 -23
- package/components/breadcrumb/breadcrumb.js +1 -1
- package/components/button/button.css +101 -91
- package/components/button/button.js +1 -1
- package/components/calendar-grid/calendar-grid.a2ui.json +146 -0
- package/components/calendar-grid/calendar-grid.class.js +326 -0
- package/components/calendar-grid/calendar-grid.css +246 -0
- package/components/calendar-grid/calendar-grid.d.ts +41 -0
- package/components/calendar-grid/calendar-grid.js +17 -0
- package/components/calendar-grid/calendar-grid.yaml +136 -0
- package/components/calendar-picker/calendar-picker.css +139 -139
- package/components/calendar-picker/calendar-picker.js +1 -1
- package/components/canvas/canvas.css +12 -12
- package/components/card/card.css +83 -83
- package/components/card/card.js +1 -1
- package/components/chart/chart.css +224 -224
- package/components/chart/chart.js +1 -1
- package/components/chart-legend/chart-legend.css +26 -26
- package/components/chart-legend/chart-legend.js +1 -1
- package/components/chat-thread/chat-input.a2ui.json +1 -1
- package/components/chat-thread/chat-input.js +6 -1
- package/components/chat-thread/chat-input.yaml +4 -1
- package/components/chat-thread/chat-thread.js +1 -1
- package/components/check/check.css +40 -40
- package/components/check/check.js +1 -1
- package/components/code/code.css +125 -125
- package/components/code/code.js +1 -1
- package/components/col/col.css +15 -15
- package/components/col/col.js +1 -1
- package/components/color-input/color-input.js +1 -1
- package/components/color-picker/color-picker.css +55 -55
- package/components/color-picker/color-picker.js +1 -1
- package/components/combobox/combobox.a2ui.json +363 -0
- package/components/combobox/combobox.class.js +861 -0
- package/components/combobox/combobox.css +244 -0
- package/components/combobox/combobox.d.ts +113 -0
- package/components/combobox/combobox.examples.md +59 -0
- package/components/combobox/combobox.js +17 -0
- package/components/combobox/combobox.test.js +181 -0
- package/components/combobox/combobox.yaml +369 -0
- package/components/command/command.css +90 -90
- package/components/command/command.js +1 -1
- package/components/date-range-picker/date-range-picker.a2ui.json +300 -0
- package/components/date-range-picker/date-range-picker.class.js +791 -0
- package/components/date-range-picker/date-range-picker.css +224 -0
- package/components/date-range-picker/date-range-picker.d.ts +82 -0
- package/components/date-range-picker/date-range-picker.examples.md +37 -0
- package/components/date-range-picker/date-range-picker.js +17 -0
- package/components/date-range-picker/date-range-picker.test.js +387 -0
- package/components/date-range-picker/date-range-picker.yaml +285 -0
- package/components/datetime-picker/datetime-picker.a2ui.json +334 -0
- package/components/datetime-picker/datetime-picker.class.js +706 -0
- package/components/datetime-picker/datetime-picker.css +150 -0
- package/components/datetime-picker/datetime-picker.d.ts +86 -0
- package/components/datetime-picker/datetime-picker.examples.md +46 -0
- package/components/datetime-picker/datetime-picker.js +17 -0
- package/components/datetime-picker/datetime-picker.test.js +454 -0
- package/components/datetime-picker/datetime-picker.yaml +332 -0
- package/components/demo-toggle/demo-toggle.css +27 -27
- package/components/demo-toggle/demo-toggle.js +1 -1
- package/components/description-list/description-list.css +18 -18
- package/components/description-list/description-list.js +1 -1
- package/components/divider/divider.css +24 -24
- package/components/divider/divider.js +1 -1
- package/components/drawer/drawer.js +1 -1
- package/components/embed/embed.css +6 -6
- package/components/embed/embed.js +1 -1
- package/components/empty-state/empty-state.css +27 -27
- package/components/empty-state/empty-state.js +1 -1
- package/components/feed/feed.css +12 -12
- package/components/feed/feed.js +1 -1
- package/components/field/field.css +28 -28
- package/components/field/field.js +1 -1
- package/components/field/field.test.js +1 -1
- package/components/fields/fields.css +5 -5
- package/components/fields/fields.js +1 -1
- package/components/grid/grid.css +5 -5
- package/components/grid/grid.js +1 -1
- package/components/heatmap/heatmap.css +63 -63
- package/components/heatmap/heatmap.js +1 -1
- package/components/icon/icon.css +12 -12
- package/components/icon/icon.js +1 -1
- package/components/image/image.css +14 -14
- package/components/image/image.js +1 -1
- package/components/index.js +11 -0
- package/components/inline-message/inline-message.a2ui.json +143 -0
- package/components/inline-message/inline-message.class.js +169 -0
- package/components/inline-message/inline-message.css +75 -0
- package/components/inline-message/inline-message.d.ts +31 -0
- package/components/inline-message/inline-message.examples.md +19 -0
- package/components/inline-message/inline-message.js +17 -0
- package/components/inline-message/inline-message.test.js +203 -0
- package/components/inline-message/inline-message.yaml +205 -0
- package/components/input/input.css +67 -67
- package/components/input/input.js +1 -1
- package/components/input/input.yaml +5 -4
- package/components/inspector/inspector.css +6 -6
- package/components/inspector/inspector.js +1 -1
- package/components/integration-card/integration-card.a2ui.json +268 -0
- package/components/integration-card/integration-card.class.js +410 -0
- package/components/integration-card/integration-card.css +169 -0
- package/components/integration-card/integration-card.d.ts +63 -0
- package/components/integration-card/integration-card.examples.md +41 -0
- package/components/integration-card/integration-card.js +17 -0
- package/components/integration-card/integration-card.test.js +306 -0
- package/components/integration-card/integration-card.yaml +280 -0
- package/components/kbd/kbd.css +32 -32
- package/components/kbd/kbd.js +1 -1
- package/components/link/link.css +12 -12
- package/components/link/link.js +1 -1
- package/components/list/list-item.yaml +2 -2
- package/components/list/list.css +8 -8
- package/components/list/list.js +1 -1
- package/components/list-window/list-window.a2ui.json +277 -0
- package/components/list-window/list-window.class.js +688 -0
- package/components/list-window/list-window.css +124 -0
- package/components/list-window/list-window.d.ts +84 -0
- package/components/list-window/list-window.examples.md +73 -0
- package/components/list-window/list-window.js +17 -0
- package/components/list-window/list-window.test.js +303 -0
- package/components/list-window/list-window.yaml +270 -0
- package/components/loading-overlay/loading-overlay.a2ui.json +176 -0
- package/components/loading-overlay/loading-overlay.class.js +203 -0
- package/components/loading-overlay/loading-overlay.css +81 -0
- package/components/loading-overlay/loading-overlay.d.ts +24 -0
- package/components/loading-overlay/loading-overlay.examples.md +50 -0
- package/components/loading-overlay/loading-overlay.js +17 -0
- package/components/loading-overlay/loading-overlay.test.js +257 -0
- package/components/loading-overlay/loading-overlay.yaml +260 -0
- package/components/menu/menu-divider.yaml +1 -1
- package/components/menu/menu-item.yaml +1 -1
- package/components/menu/menu.a2ui.json +3 -0
- package/components/menu/menu.css +8 -8
- package/components/menu/menu.js +1 -1
- package/components/menu/menu.yaml +7 -0
- package/components/modal/{class.js → modal.class.js} +12 -1
- package/components/modal/modal.css +54 -44
- package/components/modal/modal.js +1 -1
- package/components/nav/nav.css +40 -40
- package/components/nav/nav.js +1 -1
- package/components/nav-group/nav-group.css +52 -52
- package/components/nav-group/nav-group.js +1 -1
- package/components/nav-item/nav-item.css +44 -44
- package/components/nav-item/nav-item.js +1 -1
- package/components/noodles/noodles.css +31 -31
- package/components/noodles/noodles.js +1 -1
- package/components/option-card/option-card.css +69 -69
- package/components/option-card/option-card.js +1 -1
- package/components/otp-input/otp-input.css +30 -30
- package/components/otp-input/otp-input.js +1 -1
- package/components/page/page.css +18 -18
- package/components/page/page.js +1 -1
- package/components/pagination/pagination.css +61 -61
- package/components/pagination/pagination.js +1 -1
- package/components/pane/pane.css +57 -57
- package/components/pane/pane.js +1 -1
- package/components/pipeline-status/pipeline-status.css +65 -65
- package/components/pipeline-status/pipeline-status.js +1 -1
- package/components/popover/popover.a2ui.json +8 -1
- package/components/popover/popover.css +17 -17
- package/components/popover/popover.js +1 -1
- package/components/popover/popover.yaml +14 -1
- package/components/progress/progress.css +23 -23
- package/components/progress/progress.js +1 -1
- package/components/progress-row/progress-row.css +17 -17
- package/components/progress-row/progress-row.js +1 -1
- package/components/radio/radio.css +39 -39
- package/components/radio/radio.js +1 -1
- package/components/range/range.css +55 -55
- package/components/range/range.js +1 -1
- package/components/rating/rating.css +28 -28
- package/components/rating/rating.js +1 -1
- package/components/richtext/richtext.css +133 -133
- package/components/richtext/richtext.js +1 -1
- package/components/row/row.css +19 -19
- package/components/row/row.js +1 -1
- package/components/search/search.css +5 -5
- package/components/search/search.js +1 -1
- package/components/segment/segment.css +24 -24
- package/components/segment/segment.js +1 -1
- package/components/segmented/segmented.css +25 -25
- package/components/segmented/segmented.js +1 -1
- package/components/select/select.a2ui.json +58 -4
- package/components/select/{class.js → select.class.js} +415 -6
- package/components/select/select.css +242 -84
- package/components/select/select.d.ts +31 -1
- package/components/select/select.js +1 -1
- package/components/select/select.test.js +202 -0
- package/components/select/select.yaml +126 -5
- package/components/skeleton/skeleton.css +14 -14
- package/components/skeleton/skeleton.js +1 -1
- package/components/slider/slider.css +46 -46
- package/components/slider/slider.js +1 -1
- package/components/spinner/spinner.a2ui.json +198 -0
- package/components/spinner/spinner.class.js +99 -0
- package/components/spinner/spinner.css +221 -0
- package/components/spinner/spinner.d.ts +26 -0
- package/components/spinner/spinner.examples.md +26 -0
- package/components/spinner/spinner.js +17 -0
- package/components/spinner/spinner.test.js +272 -0
- package/components/spinner/spinner.yaml +238 -0
- package/components/stack/stack.css +11 -11
- package/components/stack/stack.js +1 -1
- package/components/stat/stat.css +25 -25
- package/components/step-progress/step-progress.css +20 -20
- package/components/step-progress/step-progress.js +1 -1
- package/components/stepper/stepper-item.yaml +1 -1
- package/components/stepper/stepper.css +29 -29
- package/components/stepper/stepper.js +1 -1
- package/components/stream/stream.css +12 -12
- package/components/stream/stream.js +1 -1
- package/components/swatch/swatch.css +68 -68
- package/components/swatch/swatch.js +1 -1
- package/components/swiper/swiper.css +57 -57
- package/components/swiper/swiper.js +1 -1
- package/components/switch/switch.css +52 -52
- package/components/switch/switch.js +1 -1
- package/components/table/table.css +163 -163
- package/components/table/table.js +1 -1
- package/components/table-toolbar/{class.js → table-toolbar.class.js} +1 -1
- package/components/table-toolbar/table-toolbar.css +32 -32
- package/components/table-toolbar/table-toolbar.js +1 -1
- package/components/tabs/tab.yaml +2 -2
- package/components/tabs/tabs.css +51 -51
- package/components/tabs/tabs.js +1 -1
- package/components/tag/tag.css +48 -48
- package/components/tag/tag.js +1 -1
- package/components/tags-input/tags-input.a2ui.json +337 -0
- package/components/tags-input/tags-input.class.js +776 -0
- package/components/tags-input/tags-input.css +201 -0
- package/components/tags-input/tags-input.d.ts +120 -0
- package/components/tags-input/tags-input.examples.md +92 -0
- package/components/tags-input/tags-input.js +17 -0
- package/components/tags-input/tags-input.test.js +368 -0
- package/components/tags-input/tags-input.yaml +367 -0
- package/components/text/text.css +44 -44
- package/components/text/text.js +1 -1
- package/components/textarea/textarea.a2ui.json +1 -1
- package/components/textarea/textarea.css +46 -46
- package/components/textarea/textarea.js +1 -1
- package/components/textarea/textarea.yaml +11 -8
- package/components/time-picker/time-picker.a2ui.json +267 -0
- package/components/time-picker/time-picker.class.js +693 -0
- package/components/time-picker/time-picker.css +122 -0
- package/components/time-picker/time-picker.d.ts +75 -0
- package/components/time-picker/time-picker.examples.md +35 -0
- package/components/time-picker/time-picker.js +17 -0
- package/components/time-picker/time-picker.test.js +287 -0
- package/components/time-picker/time-picker.yaml +256 -0
- package/components/timeline/timeline-item.yaml +2 -2
- package/components/timeline/{class.js → timeline.class.js} +1 -1
- package/components/timeline/timeline.css +50 -50
- package/components/timeline/timeline.js +1 -1
- package/components/toast/toast.css +58 -58
- package/components/toast/toast.js +1 -1
- package/components/toggle-group/toggle-group.css +6 -6
- package/components/toggle-group/toggle-group.js +1 -1
- package/components/toggle-group/toggle-option.yaml +1 -1
- package/components/toggle-scheme/toggle-scheme.css +2 -2
- package/components/toggle-scheme/toggle-scheme.js +1 -1
- package/components/toolbar/toolbar-group.yaml +1 -1
- package/components/toolbar/toolbar.css +17 -17
- package/components/toolbar/toolbar.js +1 -1
- package/components/tooltip/tooltip.css +2 -2
- package/components/tooltip/tooltip.js +1 -1
- package/components/tree/tree-item.yaml +1 -1
- package/components/tree/tree.css +37 -37
- package/components/tree/tree.js +1 -1
- package/components/upload/upload.css +49 -49
- package/components/upload/upload.js +1 -1
- package/dist/web-components.min.css +1 -1
- package/dist/web-components.min.js +146 -87
- package/package.json +3 -3
- package/styles/components.css +11 -0
- /package/components/accordion/{class.js → accordion.class.js} +0 -0
- /package/components/action-list/{class.js → action-list.class.js} +0 -0
- /package/components/agent-feedback-bar/{class.js → agent-feedback-bar.class.js} +0 -0
- /package/components/agent-questions/{class.js → agent-questions.class.js} +0 -0
- /package/components/agent-reasoning/{class.js → agent-reasoning.class.js} +0 -0
- /package/components/agent-suggestions/{class.js → agent-suggestions.class.js} +0 -0
- /package/components/avatar/{class.js → avatar.class.js} +0 -0
- /package/components/badge/{class.js → badge.class.js} +0 -0
- /package/components/block/{class.js → block.class.js} +0 -0
- /package/components/breadcrumb/{class.js → breadcrumb.class.js} +0 -0
- /package/components/button/{class.js → button.class.js} +0 -0
- /package/components/calendar-picker/{class.js → calendar-picker.class.js} +0 -0
- /package/components/card/{class.js → card.class.js} +0 -0
- /package/components/chart/{class.js → chart.class.js} +0 -0
- /package/components/chart-legend/{class.js → chart-legend.class.js} +0 -0
- /package/components/chat-thread/{class.js → chat-thread.class.js} +0 -0
- /package/components/check/{class.js → check.class.js} +0 -0
- /package/components/code/{class.js → code.class.js} +0 -0
- /package/components/col/{class.js → col.class.js} +0 -0
- /package/components/color-input/{class.js → color-input.class.js} +0 -0
- /package/components/color-picker/{class.js → color-picker.class.js} +0 -0
- /package/components/command/{class.js → command.class.js} +0 -0
- /package/components/demo-toggle/{class.js → demo-toggle.class.js} +0 -0
- /package/components/description-list/{class.js → description-list.class.js} +0 -0
- /package/components/divider/{class.js → divider.class.js} +0 -0
- /package/components/drawer/{class.js → drawer.class.js} +0 -0
- /package/components/embed/{class.js → embed.class.js} +0 -0
- /package/components/empty-state/{class.js → empty-state.class.js} +0 -0
- /package/components/feed/{class.js → feed.class.js} +0 -0
- /package/components/field/{class.js → field.class.js} +0 -0
- /package/components/fields/{class.js → fields.class.js} +0 -0
- /package/components/grid/{class.js → grid.class.js} +0 -0
- /package/components/heatmap/{class.js → heatmap.class.js} +0 -0
- /package/components/icon/{class.js → icon.class.js} +0 -0
- /package/components/image/{class.js → image.class.js} +0 -0
- /package/components/input/{class.js → input.class.js} +0 -0
- /package/components/inspector/{class.js → inspector.class.js} +0 -0
- /package/components/kbd/{class.js → kbd.class.js} +0 -0
- /package/components/link/{class.js → link.class.js} +0 -0
- /package/components/list/{class.js → list.class.js} +0 -0
- /package/components/menu/{class.js → menu.class.js} +0 -0
- /package/components/nav/{class.js → nav.class.js} +0 -0
- /package/components/nav-group/{class.js → nav-group.class.js} +0 -0
- /package/components/nav-item/{class.js → nav-item.class.js} +0 -0
- /package/components/noodles/{class.js → noodles.class.js} +0 -0
- /package/components/option-card/{class.js → option-card.class.js} +0 -0
- /package/components/otp-input/{class.js → otp-input.class.js} +0 -0
- /package/components/page/{class.js → page.class.js} +0 -0
- /package/components/pagination/{class.js → pagination.class.js} +0 -0
- /package/components/pane/{class.js → pane.class.js} +0 -0
- /package/components/pipeline-status/{class.js → pipeline-status.class.js} +0 -0
- /package/components/popover/{class.js → popover.class.js} +0 -0
- /package/components/progress/{class.js → progress.class.js} +0 -0
- /package/components/progress-row/{class.js → progress-row.class.js} +0 -0
- /package/components/radio/{class.js → radio.class.js} +0 -0
- /package/components/range/{class.js → range.class.js} +0 -0
- /package/components/rating/{class.js → rating.class.js} +0 -0
- /package/components/richtext/{class.js → richtext.class.js} +0 -0
- /package/components/row/{class.js → row.class.js} +0 -0
- /package/components/search/{class.js → search.class.js} +0 -0
- /package/components/segment/{class.js → segment.class.js} +0 -0
- /package/components/segmented/{class.js → segmented.class.js} +0 -0
- /package/components/skeleton/{class.js → skeleton.class.js} +0 -0
- /package/components/slider/{class.js → slider.class.js} +0 -0
- /package/components/stack/{class.js → stack.class.js} +0 -0
- /package/components/step-progress/{class.js → step-progress.class.js} +0 -0
- /package/components/stepper/{class.js → stepper.class.js} +0 -0
- /package/components/stream/{class.js → stream.class.js} +0 -0
- /package/components/swatch/{class.js → swatch.class.js} +0 -0
- /package/components/swiper/{class.js → swiper.class.js} +0 -0
- /package/components/switch/{class.js → switch.class.js} +0 -0
- /package/components/table/{class.js → table.class.js} +0 -0
- /package/components/tabs/{class.js → tabs.class.js} +0 -0
- /package/components/tag/{class.js → tag.class.js} +0 -0
- /package/components/text/{class.js → text.class.js} +0 -0
- /package/components/textarea/{class.js → textarea.class.js} +0 -0
- /package/components/toast/{class.js → toast.class.js} +0 -0
- /package/components/toggle-group/{class.js → toggle-group.class.js} +0 -0
- /package/components/toggle-scheme/{class.js → toggle-scheme.class.js} +0 -0
- /package/components/toolbar/{class.js → toolbar.class.js} +0 -0
- /package/components/tooltip/{class.js → tooltip.class.js} +0 -0
- /package/components/tree/{class.js → tree.class.js} +0 -0
- /package/components/upload/{class.js → upload.class.js} +0 -0
|
@@ -0,0 +1,367 @@
|
|
|
1
|
+
# Hand-authored — SPEC-042 (2026-05-24).
|
|
2
|
+
# Edit this file; run `npm run build:components` to regenerate a2ui.json.
|
|
3
|
+
$schema: ../../../../scripts/schemas/component.yaml.schema.json
|
|
4
|
+
name: UITagsInput
|
|
5
|
+
tag: tags-input-ui
|
|
6
|
+
status: experimental
|
|
7
|
+
component: TagsInput
|
|
8
|
+
category: input
|
|
9
|
+
version: 1
|
|
10
|
+
description: |
|
|
11
|
+
Free-form token input — type a value, press Enter (or the configured
|
|
12
|
+
delimiter) to commit it as a chip; Backspace from the empty inline
|
|
13
|
+
input removes the last chip. Distinct from <select-ui multiple>
|
|
14
|
+
(SPEC-040), which is constrained to a fixed option list — tags-input
|
|
15
|
+
is for OPEN sets (labels, email recipients, keyword inputs). Per
|
|
16
|
+
ADR-0025 the inline editor is a contenteditable surface (NO native
|
|
17
|
+
`<input>` wrap). Form-bearing via UIFormElement + ElementInternals:
|
|
18
|
+
the form value is a JSON-serialized string array under `[name]`.
|
|
19
|
+
Each rendered chip is a `<tag-ui removable>`; the `remove` event
|
|
20
|
+
delegates back to the host. Optional autocompletion: when
|
|
21
|
+
`.suggestions` is non-empty, a popover renders below the field and
|
|
22
|
+
the host announces as a combobox per WAI-APG.
|
|
23
|
+
# Per ADR-0027 — primitives that programmatically create other primitives
|
|
24
|
+
# do NOT auto-import them. Consumer (or demo shell) must explicitly import.
|
|
25
|
+
composes:
|
|
26
|
+
- tag-ui # rendered per committed token
|
|
27
|
+
- icon-ui # spinner glyph for async validators
|
|
28
|
+
props:
|
|
29
|
+
name:
|
|
30
|
+
description: Form field name. Serializes the token list as JSON under this key.
|
|
31
|
+
type: string
|
|
32
|
+
default: ""
|
|
33
|
+
reflect: true
|
|
34
|
+
value:
|
|
35
|
+
description: |-
|
|
36
|
+
Current token list (string array). Setting `.value = ['a','b']`
|
|
37
|
+
replaces the rendered chips. Reflection skipped — array values
|
|
38
|
+
do not round-trip through attribute strings.
|
|
39
|
+
type: array
|
|
40
|
+
default: []
|
|
41
|
+
dynamic: true
|
|
42
|
+
placeholder:
|
|
43
|
+
description: Placeholder text for the inline input when no chips are committed.
|
|
44
|
+
type: string
|
|
45
|
+
default: Add tag…
|
|
46
|
+
reflect: true
|
|
47
|
+
delimiter:
|
|
48
|
+
description: |-
|
|
49
|
+
Inline character that commits the typed value as a chip. The
|
|
50
|
+
sentinel `enter` disables in-line commit — only the Enter key
|
|
51
|
+
(or programmatic `addToken`) commits. Default is `,`.
|
|
52
|
+
type: string
|
|
53
|
+
default: ","
|
|
54
|
+
reflect: true
|
|
55
|
+
pasteSplit:
|
|
56
|
+
description: |-
|
|
57
|
+
Regex character-class fragment matched against pasted text to
|
|
58
|
+
split it into multiple tokens. Default `,\n` splits on commas
|
|
59
|
+
and newlines. Use `""` to disable paste-splitting entirely.
|
|
60
|
+
type: string
|
|
61
|
+
default: ",\n"
|
|
62
|
+
attribute: paste-split
|
|
63
|
+
reflect: true
|
|
64
|
+
max:
|
|
65
|
+
description: Maximum number of tokens. `0` (default) means unlimited.
|
|
66
|
+
type: number
|
|
67
|
+
default: 0
|
|
68
|
+
reflect: true
|
|
69
|
+
min:
|
|
70
|
+
description: Minimum required tokens for form validity.
|
|
71
|
+
type: number
|
|
72
|
+
default: 0
|
|
73
|
+
reflect: true
|
|
74
|
+
minLength:
|
|
75
|
+
description: Minimum per-token character count after `transform` is applied.
|
|
76
|
+
type: number
|
|
77
|
+
default: 1
|
|
78
|
+
attribute: min-length
|
|
79
|
+
reflect: true
|
|
80
|
+
maxLength:
|
|
81
|
+
description: Maximum per-token character count. `0` (default) means unlimited.
|
|
82
|
+
type: number
|
|
83
|
+
default: 0
|
|
84
|
+
attribute: max-length
|
|
85
|
+
reflect: true
|
|
86
|
+
unique:
|
|
87
|
+
description: Reject duplicate tokens silently (no `invalid` event for accidental dups).
|
|
88
|
+
type: boolean
|
|
89
|
+
default: true
|
|
90
|
+
reflect: true
|
|
91
|
+
transform:
|
|
92
|
+
description: |-
|
|
93
|
+
Normalize tokens on commit. `lowercase` lowercases, `trim` strips
|
|
94
|
+
leading + trailing whitespace, `strip-spaces` removes all
|
|
95
|
+
whitespace, `""` (default) preserves the typed value.
|
|
96
|
+
type: string
|
|
97
|
+
default: ""
|
|
98
|
+
enum:
|
|
99
|
+
- ""
|
|
100
|
+
- lowercase
|
|
101
|
+
- trim
|
|
102
|
+
- strip-spaces
|
|
103
|
+
reflect: true
|
|
104
|
+
suggestions:
|
|
105
|
+
description: |-
|
|
106
|
+
Optional autocomplete strings rendered in a popover below the
|
|
107
|
+
field. Suggestions are hints, not gates — the typed value still
|
|
108
|
+
wins on commit. JS property only (array reflection skipped).
|
|
109
|
+
type: array
|
|
110
|
+
default: []
|
|
111
|
+
dynamic: true
|
|
112
|
+
validateFn:
|
|
113
|
+
description: |-
|
|
114
|
+
Per-token validator. Sync `(value, index) => boolean` rejects
|
|
115
|
+
false synchronously; async `(value, index) => Promise<boolean>`
|
|
116
|
+
flips the host into `[validating]` while pending. JS property
|
|
117
|
+
only — not serializable in A2UI JSON; wire post-mount.
|
|
118
|
+
type: object
|
|
119
|
+
default: null
|
|
120
|
+
dynamic: true
|
|
121
|
+
disabled:
|
|
122
|
+
description: Block all interaction; dim the field.
|
|
123
|
+
type: boolean
|
|
124
|
+
default: false
|
|
125
|
+
reflect: true
|
|
126
|
+
readonly:
|
|
127
|
+
description: Block edits; allow inspection (chips render without remove buttons).
|
|
128
|
+
type: boolean
|
|
129
|
+
default: false
|
|
130
|
+
reflect: true
|
|
131
|
+
required:
|
|
132
|
+
description: Required for form validation. Empty array fails `:invalid`.
|
|
133
|
+
type: boolean
|
|
134
|
+
default: false
|
|
135
|
+
reflect: true
|
|
136
|
+
size:
|
|
137
|
+
description: |-
|
|
138
|
+
Sizing scale via universal `[size]` attribute system. Matches
|
|
139
|
+
Input + Combobox sizing tokens so a TagsInput rendered alongside
|
|
140
|
+
either feels coherent in a form row.
|
|
141
|
+
type: string
|
|
142
|
+
default: md
|
|
143
|
+
enum: [sm, md, lg]
|
|
144
|
+
reflect: true
|
|
145
|
+
events:
|
|
146
|
+
change:
|
|
147
|
+
description: Fired after `value` changes (token added or removed).
|
|
148
|
+
detail:
|
|
149
|
+
value:
|
|
150
|
+
type: array
|
|
151
|
+
description: Current token list (string array).
|
|
152
|
+
added:
|
|
153
|
+
type: array
|
|
154
|
+
description: Tokens added by this change (`[]` when only removals occurred).
|
|
155
|
+
removed:
|
|
156
|
+
type: array
|
|
157
|
+
description: Tokens removed by this change (`[]` when only additions occurred).
|
|
158
|
+
input:
|
|
159
|
+
description: Fired on each keystroke in the inline input (pre-commit).
|
|
160
|
+
detail:
|
|
161
|
+
query:
|
|
162
|
+
type: string
|
|
163
|
+
description: Current typed text in the inline input.
|
|
164
|
+
commit:
|
|
165
|
+
description: |-
|
|
166
|
+
Fired immediately before a token is committed. Call
|
|
167
|
+
`event.preventDefault()` to reject the candidate token.
|
|
168
|
+
detail:
|
|
169
|
+
value:
|
|
170
|
+
type: string
|
|
171
|
+
description: Candidate token text (post-transform).
|
|
172
|
+
accepted:
|
|
173
|
+
type: boolean
|
|
174
|
+
description: True unless the consumer calls `preventDefault()`.
|
|
175
|
+
invalid:
|
|
176
|
+
description: |-
|
|
177
|
+
Fired when a candidate token is rejected. Reasons cover all
|
|
178
|
+
built-in validators and the user-supplied `validateFn`.
|
|
179
|
+
detail:
|
|
180
|
+
value:
|
|
181
|
+
type: string
|
|
182
|
+
description: Rejected token text.
|
|
183
|
+
reason:
|
|
184
|
+
type: string
|
|
185
|
+
description: One of `duplicate` / `too-short` / `too-long` / `validator` / `max`.
|
|
186
|
+
slots:
|
|
187
|
+
chip:
|
|
188
|
+
description: |-
|
|
189
|
+
Custom chip template — receives `{value, index}` per token.
|
|
190
|
+
When absent, each token renders as a default
|
|
191
|
+
`<tag-ui removable text="<value>">`.
|
|
192
|
+
states:
|
|
193
|
+
- name: idle
|
|
194
|
+
description: No tokens; no typed text.
|
|
195
|
+
- name: populated
|
|
196
|
+
description: One or more tokens committed.
|
|
197
|
+
attribute: populated
|
|
198
|
+
- name: editing
|
|
199
|
+
description: User is typing into the inline input.
|
|
200
|
+
attribute: editing
|
|
201
|
+
- name: suggesting
|
|
202
|
+
description: Suggestion popover is open.
|
|
203
|
+
attribute: suggesting
|
|
204
|
+
- name: validating
|
|
205
|
+
description: Async `validateFn` is in flight.
|
|
206
|
+
attribute: validating
|
|
207
|
+
- name: disabled
|
|
208
|
+
description: Non-interactive; dimmed.
|
|
209
|
+
attribute: disabled
|
|
210
|
+
- name: readonly
|
|
211
|
+
description: Read-only; chips render without remove affordance.
|
|
212
|
+
attribute: readonly
|
|
213
|
+
traits: []
|
|
214
|
+
tokens:
|
|
215
|
+
--tags-input-bg:
|
|
216
|
+
description: Host background color.
|
|
217
|
+
--tags-input-fg:
|
|
218
|
+
description: Host foreground (typed-text color).
|
|
219
|
+
--tags-input-border:
|
|
220
|
+
description: Host border color (idle).
|
|
221
|
+
--tags-input-border-hover:
|
|
222
|
+
description: Host border color on hover.
|
|
223
|
+
--tags-input-radius:
|
|
224
|
+
description: Host border radius.
|
|
225
|
+
--tags-input-px:
|
|
226
|
+
description: Horizontal padding inside the chip-cluster wrapper.
|
|
227
|
+
--tags-input-py:
|
|
228
|
+
description: Vertical padding inside the chip-cluster wrapper.
|
|
229
|
+
--tags-input-gap:
|
|
230
|
+
description: Gap between chips and the inline input.
|
|
231
|
+
--tags-input-placeholder-fg:
|
|
232
|
+
description: Placeholder color for the empty inline input.
|
|
233
|
+
--tags-input-focus-ring:
|
|
234
|
+
description: Focus-ring box-shadow when the host is focus-within.
|
|
235
|
+
--tags-input-chip-bg-invalid:
|
|
236
|
+
description: Chip background color when a chip is marked invalid (validator rejection echo).
|
|
237
|
+
requiredIcons:
|
|
238
|
+
- circle-notch
|
|
239
|
+
a2ui:
|
|
240
|
+
rules:
|
|
241
|
+
- >-
|
|
242
|
+
Use <tags-input-ui> for OPEN-SET free-form token entry — labels,
|
|
243
|
+
keywords, email recipients, comma-separated lists. For CLOSED
|
|
244
|
+
option sets (pick N from a fixed list), use <select-ui multiple>
|
|
245
|
+
(SPEC-040) — that primitive gates the value against `options[]`.
|
|
246
|
+
- >-
|
|
247
|
+
`TagsInput.value` MUST be a string array. Pass `["a","b"]`, not
|
|
248
|
+
the comma-joined string `"a,b"`. The host parses string-form
|
|
249
|
+
`value` attributes as JSON; non-array shapes throw `invalid`.
|
|
250
|
+
- >-
|
|
251
|
+
`delimiter: "enter"` disables in-line character commits; only
|
|
252
|
+
the Enter key (or programmatic `addToken`) commits. Use this
|
|
253
|
+
when the token grammar legitimately includes the default `,`.
|
|
254
|
+
- >-
|
|
255
|
+
`unique: true` (default) silently coalesces accidental duplicate
|
|
256
|
+
adds. Do NOT emit `invalid` for those — the contract specifies
|
|
257
|
+
silent dedup for ergonomic typing.
|
|
258
|
+
- >-
|
|
259
|
+
`validateFn` is a JS property, NOT serializable in A2UI JSON.
|
|
260
|
+
Wire validators post-mount via DOM scripting; A2UI authors
|
|
261
|
+
should not expect to declare a validator in the JSON payload.
|
|
262
|
+
- >-
|
|
263
|
+
Chips are rendered automatically from `value`. Do NOT slot
|
|
264
|
+
individual <tag-ui> children manually — that decouples the
|
|
265
|
+
rendered DOM from the form value and breaks Backspace removal.
|
|
266
|
+
anti_patterns:
|
|
267
|
+
- wrong: |
|
|
268
|
+
{"component": "TagsInput", "options": [{"id": "a", "label": "A"}]}
|
|
269
|
+
why: |
|
|
270
|
+
TagsInput does NOT accept `options`. It is the OPEN-set primitive — any
|
|
271
|
+
typed string is valid. For closed option lists, use the multi-select
|
|
272
|
+
primitive with `multiple: true`.
|
|
273
|
+
fix: |
|
|
274
|
+
{"component": "Select", "multiple": true, "options": [{"id": "a", "label": "A"}]}
|
|
275
|
+
- wrong: |
|
|
276
|
+
{"component": "TagsInput", "value": "bug,high-priority"}
|
|
277
|
+
why: |
|
|
278
|
+
Comma-separated string is invalid for `value`. The contract requires
|
|
279
|
+
a string array.
|
|
280
|
+
fix: |
|
|
281
|
+
{"component": "TagsInput", "value": ["bug", "high-priority"]}
|
|
282
|
+
- wrong: |
|
|
283
|
+
{"component": "TagsInput", "children": [
|
|
284
|
+
{"component": "Tag", "text": "Tag 1"}
|
|
285
|
+
]}
|
|
286
|
+
why: |
|
|
287
|
+
Chips are rendered automatically from `value`. Slotting Tag children
|
|
288
|
+
decouples the rendered DOM from the form value and breaks Backspace
|
|
289
|
+
removal + the `change` event payload.
|
|
290
|
+
fix: |
|
|
291
|
+
{"component": "TagsInput", "value": ["Tag 1"]}
|
|
292
|
+
examples:
|
|
293
|
+
- name: canonical-labels
|
|
294
|
+
description: Label input with lowercase normalization + max 10 tags + 2 pre-committed values.
|
|
295
|
+
a2ui: >-
|
|
296
|
+
[
|
|
297
|
+
{"id": "root", "component": "Card", "children": ["sec"]},
|
|
298
|
+
{"id": "sec", "component": "Section", "children": ["field"]},
|
|
299
|
+
{
|
|
300
|
+
"id": "field",
|
|
301
|
+
"component": "Field",
|
|
302
|
+
"label": "Labels",
|
|
303
|
+
"children": ["tags"]
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
"id": "tags",
|
|
307
|
+
"component": "TagsInput",
|
|
308
|
+
"name": "labels",
|
|
309
|
+
"placeholder": "Add a label, press Enter",
|
|
310
|
+
"transform": "lowercase",
|
|
311
|
+
"max": 10,
|
|
312
|
+
"value": ["bug", "high-priority"]
|
|
313
|
+
}
|
|
314
|
+
]
|
|
315
|
+
- name: email-recipients
|
|
316
|
+
description: Recipient picker with Enter-only commit (commas are legal in display names).
|
|
317
|
+
a2ui: >-
|
|
318
|
+
[
|
|
319
|
+
{
|
|
320
|
+
"id": "to",
|
|
321
|
+
"component": "TagsInput",
|
|
322
|
+
"name": "to",
|
|
323
|
+
"placeholder": "Email…",
|
|
324
|
+
"delimiter": "enter",
|
|
325
|
+
"transform": "trim"
|
|
326
|
+
}
|
|
327
|
+
]
|
|
328
|
+
keywords:
|
|
329
|
+
- tags-input
|
|
330
|
+
- tag-input
|
|
331
|
+
- token-input
|
|
332
|
+
- chips-input
|
|
333
|
+
- chip-input
|
|
334
|
+
- labels
|
|
335
|
+
- recipients
|
|
336
|
+
- keywords
|
|
337
|
+
- tags
|
|
338
|
+
- email-input
|
|
339
|
+
- multi-value-input
|
|
340
|
+
synonyms:
|
|
341
|
+
tags-input:
|
|
342
|
+
- tag-input
|
|
343
|
+
- chip-input
|
|
344
|
+
- token-input
|
|
345
|
+
- tokenizer
|
|
346
|
+
token-input:
|
|
347
|
+
- tags-input
|
|
348
|
+
- chip-input
|
|
349
|
+
- tokenizer
|
|
350
|
+
chips-input:
|
|
351
|
+
- tags-input
|
|
352
|
+
- chip-input
|
|
353
|
+
- token-input
|
|
354
|
+
labels:
|
|
355
|
+
- tags
|
|
356
|
+
- tag-input
|
|
357
|
+
- labels-input
|
|
358
|
+
recipients:
|
|
359
|
+
- email-input
|
|
360
|
+
- tags-input
|
|
361
|
+
- to-field
|
|
362
|
+
related:
|
|
363
|
+
- tag
|
|
364
|
+
- select
|
|
365
|
+
- combobox
|
|
366
|
+
- field
|
|
367
|
+
- input
|
package/components/text/text.css
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
@scope (text-ui) {
|
|
2
2
|
:where(:scope) {
|
|
3
3
|
/* ── Tokens (body defaults) ── */
|
|
4
|
-
--text-family: var(--a-body-family);
|
|
5
|
-
--text-weight: var(--a-weight);
|
|
6
|
-
--text-weight-strong: var(--a-weight-semibold);
|
|
7
|
-
--text-size: var(--a-body-size);
|
|
8
|
-
--text-leading: var(--a-body-leading);
|
|
9
|
-
--text-tracking: var(--a-body-tracking);
|
|
10
|
-
--text-case: var(--a-body-case);
|
|
11
|
-
--text-color: var(--a-fg);
|
|
12
|
-
--text-color-strong: var(--a-fg-strong);
|
|
4
|
+
--text-family-default: var(--a-body-family);
|
|
5
|
+
--text-weight-default: var(--a-weight);
|
|
6
|
+
--text-weight-strong-default: var(--a-weight-semibold);
|
|
7
|
+
--text-size-default: var(--a-body-size);
|
|
8
|
+
--text-leading-default: var(--a-body-leading);
|
|
9
|
+
--text-tracking-default: var(--a-body-tracking);
|
|
10
|
+
--text-case-default: var(--a-body-case);
|
|
11
|
+
--text-color-default: var(--a-fg);
|
|
12
|
+
--text-color-strong-default: var(--a-fg-strong);
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
:scope {
|
|
16
16
|
box-sizing: border-box;
|
|
17
17
|
display: inline;
|
|
18
|
-
font-family: var(--text-family);
|
|
19
|
-
font-weight: var(--text-weight);
|
|
20
|
-
font-size: var(--text-size);
|
|
21
|
-
line-height: var(--text-leading);
|
|
22
|
-
letter-spacing: var(--text-tracking);
|
|
23
|
-
text-transform: var(--text-case);
|
|
24
|
-
color: var(--text-color);
|
|
18
|
+
font-family: var(--text-family, var(--text-family-default));
|
|
19
|
+
font-weight: var(--text-weight, var(--text-weight-default));
|
|
20
|
+
font-size: var(--text-size, var(--text-size-default));
|
|
21
|
+
line-height: var(--text-leading, var(--text-leading-default));
|
|
22
|
+
letter-spacing: var(--text-tracking, var(--text-tracking-default));
|
|
23
|
+
text-transform: var(--text-case, var(--text-case-default));
|
|
24
|
+
color: var(--text-color, var(--text-color-default));
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
/* Reset native heading styles inside text-ui so the variant controls the look */
|
|
@@ -33,20 +33,20 @@
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
:scope[strong], :is(strong) {
|
|
36
|
-
--text-weight: var(--text-weight-strong);
|
|
37
|
-
--text-color: var(--text-color-strong);
|
|
36
|
+
--text-weight-default: var(--text-weight-strong, var(--text-weight-strong-default));
|
|
37
|
+
--text-color-default: var(--text-color-strong, var(--text-color-strong-default));
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
/* ── Variants ── */
|
|
41
|
-
:scope[variant="body"] { --text-family: var(--a-body-family); --text-weight: var(--a-body-weight); --text-size: var(--a-body-size); --text-leading: var(--a-body-leading); --text-tracking: var(--a-body-tracking); --text-case: var(--a-body-case); --text-color: var(--a-fg); }
|
|
42
|
-
:scope[variant="display"] { --text-family: var(--a-display-family); --text-weight: var(--a-display-weight); --text-size: var(--a-display-size); --text-leading: var(--a-display-leading); --text-tracking: var(--a-display-tracking); --text-case: var(--a-display-case); --text-color: var(--a-display-color); }
|
|
43
|
-
:scope[variant="title"] { --text-family: var(--a-title-family); --text-weight: var(--a-title-weight); --text-size: var(--a-title-size); --text-leading: var(--a-title-leading); --text-tracking: var(--a-title-tracking); --text-case: var(--a-title-case); --text-color: var(--a-title-color); }
|
|
44
|
-
:scope[variant="heading"] { --text-family: var(--a-heading-family); --text-weight: var(--a-heading-weight); --text-size: var(--a-heading-size); --text-leading: var(--a-heading-leading); --text-tracking: var(--a-heading-tracking); --text-case: var(--a-heading-case); --text-color: var(--a-heading-color); }
|
|
45
|
-
:scope[variant="section"] { --text-family: var(--a-section-family); --text-weight: var(--a-section-weight); --text-size: var(--a-section-size); --text-leading: var(--a-section-leading); --text-tracking: var(--a-section-tracking); --text-case: var(--a-section-case); --text-color: var(--a-section-color); }
|
|
46
|
-
:scope[variant="caption"] { --text-family: var(--a-caption-family); --text-weight: var(--a-caption-weight); --text-size: var(--a-caption-size); --text-leading: var(--a-caption-leading); --text-tracking: var(--a-caption-tracking); --text-case: var(--a-caption-case); --text-color: var(--a-caption-color); }
|
|
47
|
-
:scope[variant="label"] { --text-family: var(--a-label-family); --text-weight: var(--a-label-weight); --text-size: var(--a-label-size); --text-leading: var(--a-label-leading); --text-tracking: var(--a-label-tracking); --text-case: var(--a-label-case); --text-color: var(--a-label-color); }
|
|
48
|
-
:scope[variant="kicker"] { --text-family: var(--a-kicker-family); --text-weight: var(--a-kicker-weight); --text-size: var(--a-kicker-size); --text-leading: var(--a-kicker-leading); --text-tracking: var(--a-kicker-tracking); --text-case: uppercase; --text-color: var(--a-kicker-color); }
|
|
49
|
-
:scope[variant="code"] { --text-family: var(--a-code-family); --text-weight: var(--a-code-weight); --text-size: var(--a-code-size); --text-leading: var(--a-code-leading); --text-tracking: var(--a-code-tracking); --text-case: var(--a-code-case); --text-color: var(--a-code-color); }
|
|
41
|
+
:scope[variant="body"] { --text-family-default: var(--a-body-family); --text-weight-default: var(--a-body-weight); --text-size-default: var(--a-body-size); --text-leading-default: var(--a-body-leading); --text-tracking-default: var(--a-body-tracking); --text-case-default: var(--a-body-case); --text-color-default: var(--a-fg); }
|
|
42
|
+
:scope[variant="display"] { --text-family-default: var(--a-display-family); --text-weight-default: var(--a-display-weight); --text-size-default: var(--a-display-size); --text-leading-default: var(--a-display-leading); --text-tracking-default: var(--a-display-tracking); --text-case-default: var(--a-display-case); --text-color-default: var(--a-display-color); }
|
|
43
|
+
:scope[variant="title"] { --text-family-default: var(--a-title-family); --text-weight-default: var(--a-title-weight); --text-size-default: var(--a-title-size); --text-leading-default: var(--a-title-leading); --text-tracking-default: var(--a-title-tracking); --text-case-default: var(--a-title-case); --text-color-default: var(--a-title-color); }
|
|
44
|
+
:scope[variant="heading"] { --text-family-default: var(--a-heading-family); --text-weight-default: var(--a-heading-weight); --text-size-default: var(--a-heading-size); --text-leading-default: var(--a-heading-leading); --text-tracking-default: var(--a-heading-tracking); --text-case-default: var(--a-heading-case); --text-color-default: var(--a-heading-color); }
|
|
45
|
+
:scope[variant="section"] { --text-family-default: var(--a-section-family); --text-weight-default: var(--a-section-weight); --text-size-default: var(--a-section-size); --text-leading-default: var(--a-section-leading); --text-tracking-default: var(--a-section-tracking); --text-case-default: var(--a-section-case); --text-color-default: var(--a-section-color); }
|
|
46
|
+
:scope[variant="caption"] { --text-family-default: var(--a-caption-family); --text-weight-default: var(--a-caption-weight); --text-size-default: var(--a-caption-size); --text-leading-default: var(--a-caption-leading); --text-tracking-default: var(--a-caption-tracking); --text-case-default: var(--a-caption-case); --text-color-default: var(--a-caption-color); }
|
|
47
|
+
:scope[variant="label"] { --text-family-default: var(--a-label-family); --text-weight-default: var(--a-label-weight); --text-size-default: var(--a-label-size); --text-leading-default: var(--a-label-leading); --text-tracking-default: var(--a-label-tracking); --text-case-default: var(--a-label-case); --text-color-default: var(--a-label-color); }
|
|
48
|
+
:scope[variant="kicker"] { --text-family-default: var(--a-kicker-family); --text-weight-default: var(--a-kicker-weight); --text-size-default: var(--a-kicker-size); --text-leading-default: var(--a-kicker-leading); --text-tracking-default: var(--a-kicker-tracking); --text-case-default: uppercase; --text-color-default: var(--a-kicker-color); }
|
|
49
|
+
:scope[variant="code"] { --text-family-default: var(--a-code-family); --text-weight-default: var(--a-code-weight); --text-size-default: var(--a-code-size); --text-leading-default: var(--a-code-leading); --text-tracking-default: var(--a-code-tracking); --text-case-default: var(--a-code-case); --text-color-default: var(--a-code-color); }
|
|
50
50
|
|
|
51
51
|
/* §210 (v0.5.7, FEEDBACK-17 §1): three token-backed variants whose
|
|
52
52
|
`--a-<role>-{family,weight,leading,tracking,case,color,size}` tokens
|
|
@@ -57,9 +57,9 @@
|
|
|
57
57
|
this batch: their tokens don't ship anywhere (verified in this same
|
|
58
58
|
arc), so the enum entries are retired from text.yaml / text.d.ts /
|
|
59
59
|
text.a2ui.json. */
|
|
60
|
-
:scope[variant="subsection"] { --text-family: var(--a-subsection-family); --text-weight: var(--a-subsection-weight); --text-size: var(--a-subsection-size); --text-leading: var(--a-subsection-leading); --text-tracking: var(--a-subsection-tracking); --text-case: var(--a-subsection-case); --text-color: var(--a-subsection-color); }
|
|
61
|
-
:scope[variant="deck"] { --text-family: var(--a-deck-family); --text-weight: var(--a-deck-weight); --text-size: var(--a-deck-size); --text-leading: var(--a-deck-leading); --text-tracking: var(--a-deck-tracking); --text-case: var(--a-deck-case); --text-color: var(--a-deck-color); }
|
|
62
|
-
:scope[variant="metric"] { --text-family: var(--a-metric-family); --text-weight: var(--a-metric-weight); --text-size: var(--a-metric-size); --text-leading: var(--a-metric-leading); --text-tracking: var(--a-metric-tracking); --text-case: var(--a-metric-case); --text-color: var(--a-metric-color); }
|
|
60
|
+
:scope[variant="subsection"] { --text-family-default: var(--a-subsection-family); --text-weight-default: var(--a-subsection-weight); --text-size-default: var(--a-subsection-size); --text-leading-default: var(--a-subsection-leading); --text-tracking-default: var(--a-subsection-tracking); --text-case-default: var(--a-subsection-case); --text-color-default: var(--a-subsection-color); }
|
|
61
|
+
:scope[variant="deck"] { --text-family-default: var(--a-deck-family); --text-weight-default: var(--a-deck-weight); --text-size-default: var(--a-deck-size); --text-leading-default: var(--a-deck-leading); --text-tracking-default: var(--a-deck-tracking); --text-case-default: var(--a-deck-case); --text-color-default: var(--a-deck-color); }
|
|
62
|
+
:scope[variant="metric"] { --text-family-default: var(--a-metric-family); --text-weight-default: var(--a-metric-weight); --text-size-default: var(--a-metric-size); --text-leading-default: var(--a-metric-leading); --text-tracking-default: var(--a-metric-tracking); --text-case-default: var(--a-metric-case); --text-color-default: var(--a-metric-color); }
|
|
63
63
|
|
|
64
64
|
/* ── v0.6.18 (FB-10) — finer-control overrides on top of `variant` ──
|
|
65
65
|
The skill always documented an overlay API (color="subtle",
|
|
@@ -72,25 +72,25 @@
|
|
|
72
72
|
with an unknown color = no-op (variant color wins). */
|
|
73
73
|
|
|
74
74
|
/* size — sm | md | lg (md is the body default ~15-16px) */
|
|
75
|
-
:scope[size="sm"] { --text-size: var(--a-body-sm); }
|
|
76
|
-
:scope[size="md"] { --text-size: var(--a-body-md); }
|
|
77
|
-
:scope[size="lg"] { --text-size: var(--a-body-lg); }
|
|
75
|
+
:scope[size="sm"] { --text-size-default: var(--a-body-sm); }
|
|
76
|
+
:scope[size="md"] { --text-size-default: var(--a-body-md); }
|
|
77
|
+
:scope[size="lg"] { --text-size-default: var(--a-body-lg); }
|
|
78
78
|
|
|
79
79
|
/* color — default | subtle | strong | accent | danger | success | warning
|
|
80
80
|
(no value = variant default; "default" is an explicit reset). */
|
|
81
|
-
:scope[color="default"] { --text-color: var(--a-fg); }
|
|
82
|
-
:scope[color="subtle"] { --text-color: var(--a-fg-muted); }
|
|
83
|
-
:scope[color="strong"] { --text-color: var(--a-fg-strong); }
|
|
84
|
-
:scope[color="accent"] { --text-color: var(--a-accent); }
|
|
85
|
-
:scope[color="danger"] { --text-color: var(--a-danger-bg); }
|
|
86
|
-
:scope[color="success"] { --text-color: var(--a-success-bg); }
|
|
87
|
-
:scope[color="warning"] { --text-color: var(--a-warning-bg); }
|
|
81
|
+
:scope[color="default"] { --text-color-default: var(--a-fg); }
|
|
82
|
+
:scope[color="subtle"] { --text-color-default: var(--a-fg-muted); }
|
|
83
|
+
:scope[color="strong"] { --text-color-default: var(--a-fg-strong); }
|
|
84
|
+
:scope[color="accent"] { --text-color-default: var(--a-accent); }
|
|
85
|
+
:scope[color="danger"] { --text-color-default: var(--a-danger-bg); }
|
|
86
|
+
:scope[color="success"] { --text-color-default: var(--a-success-bg); }
|
|
87
|
+
:scope[color="warning"] { --text-color-default: var(--a-warning-bg); }
|
|
88
88
|
|
|
89
89
|
/* weight — regular | medium | semibold | bold */
|
|
90
|
-
:scope[weight="regular"] { --text-weight: var(--a-weight); }
|
|
91
|
-
:scope[weight="medium"] { --text-weight: var(--a-weight-medium); }
|
|
92
|
-
:scope[weight="semibold"] { --text-weight: var(--a-weight-semibold); }
|
|
93
|
-
:scope[weight="bold"] { --text-weight: var(--a-weight-bold); }
|
|
90
|
+
:scope[weight="regular"] { --text-weight-default: var(--a-weight); }
|
|
91
|
+
:scope[weight="medium"] { --text-weight-default: var(--a-weight-medium); }
|
|
92
|
+
:scope[weight="semibold"] { --text-weight-default: var(--a-weight-semibold); }
|
|
93
|
+
:scope[weight="bold"] { --text-weight-default: var(--a-weight-bold); }
|
|
94
94
|
|
|
95
95
|
/* text-align — start | center | end | justify */
|
|
96
96
|
:scope[text-align="start"] { text-align: start; }
|
package/components/text/text.js
CHANGED
|
@@ -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/Textarea.json",
|
|
4
4
|
"title": "Textarea",
|
|
5
|
-
"description": "Multi-line text input primitive — the host IS the contenteditable\nsurface (per ADR-0025, no native <textarea> wrapped underneath).\nForm-bearing via UIFormElement: [name], [value], [required],\n[disabled], [readonly], fires `change` on blur and `input` per\nkeystroke. Enter inserts a newline
|
|
5
|
+
"description": "Multi-line text input primitive — the host IS the contenteditable\nsurface (per ADR-0025, no native <textarea> wrapped underneath).\nForm-bearing via UIFormElement: [name], [value], [required],\n[disabled], [readonly], fires `change` on blur and `input` per\nkeystroke. Enter (without Shift) dispatches a bubbling `submit`\nevent — Shift+Enter inserts a newline. This is unconditional;\nthere is no opt-in/opt-out attribute. For Enter-to-send composers\nuse <chat-input-ui> inside <chat-composer>. Wrap in <field-ui\nlabel=\"…\"> for the canonical labeled stack.\n",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"allOf": [
|
|
8
8
|
{
|