@adia-ai/web-components 0.6.34 → 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 +42 -0
- package/color/index.js +1 -1
- package/components/accordion/accordion-item.yaml +2 -2
- package/components/accordion/accordion.js +1 -1
- package/components/action-list/action-item.yaml +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.js +1 -1
- package/components/agent-feedback-bar/agent-feedback-bar.js +1 -1
- package/components/agent-questions/agent-questions.js +1 -1
- package/components/agent-reasoning/agent-reasoning.js +1 -1
- package/components/agent-suggestions/agent-suggestions.js +1 -1
- package/components/alert/alert.a2ui.json +64 -1
- package/components/alert/{class.js → alert.class.js} +189 -2
- package/components/alert/alert.css +78 -0
- 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.js +1 -1
- package/components/badge/badge.js +1 -1
- package/components/block/block.js +1 -1
- package/components/breadcrumb/breadcrumb.js +1 -1
- package/components/button/button.js +1 -1
- package/components/calendar-grid/calendar-grid.a2ui.json +10 -0
- package/components/calendar-grid/{class.js → calendar-grid.class.js} +30 -4
- package/components/calendar-grid/calendar-grid.css +20 -0
- package/components/calendar-grid/calendar-grid.d.ts +4 -0
- package/components/calendar-grid/calendar-grid.js +1 -1
- package/components/calendar-grid/calendar-grid.yaml +20 -0
- package/components/calendar-picker/calendar-picker.js +1 -1
- package/components/card/card.js +1 -1
- package/components/chart/chart.js +1 -1
- 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.js +1 -1
- package/components/code/code.js +1 -1
- package/components/col/col.js +1 -1
- package/components/color-input/color-input.js +1 -1
- package/components/color-picker/color-picker.js +1 -1
- package/components/combobox/combobox.js +1 -1
- package/components/command/command.js +1 -1
- package/components/date-range-picker/{class.js → date-range-picker.class.js} +18 -2
- package/components/date-range-picker/date-range-picker.css +51 -5
- package/components/date-range-picker/date-range-picker.js +1 -1
- package/components/datetime-picker/{class.js → datetime-picker.class.js} +1 -1
- package/components/datetime-picker/datetime-picker.js +1 -1
- package/components/demo-toggle/demo-toggle.js +1 -1
- package/components/description-list/description-list.js +1 -1
- package/components/divider/divider.js +1 -1
- package/components/drawer/drawer.js +1 -1
- package/components/embed/embed.js +1 -1
- package/components/empty-state/empty-state.js +1 -1
- package/components/feed/feed.js +1 -1
- package/components/field/field.js +1 -1
- package/components/field/field.test.js +1 -1
- package/components/fields/fields.js +1 -1
- package/components/grid/grid.js +1 -1
- package/components/heatmap/heatmap.js +1 -1
- package/components/icon/icon.js +1 -1
- package/components/image/image.js +1 -1
- package/components/index.js +3 -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 +1 -1
- package/components/input/input.js +1 -1
- package/components/input/input.yaml +5 -4
- package/components/inspector/inspector.js +1 -1
- package/components/integration-card/integration-card.js +1 -1
- package/components/kbd/kbd.js +1 -1
- package/components/link/link.js +1 -1
- package/components/list/list-item.yaml +2 -2
- package/components/list/list.js +1 -1
- package/components/list-window/list-window.js +1 -1
- 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.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 +11 -1
- package/components/modal/modal.js +1 -1
- package/components/nav/nav.js +1 -1
- package/components/nav-group/nav-group.js +1 -1
- package/components/nav-item/nav-item.js +1 -1
- package/components/noodles/noodles.js +1 -1
- package/components/option-card/option-card.js +1 -1
- package/components/otp-input/otp-input.js +1 -1
- package/components/page/page.js +1 -1
- package/components/pagination/pagination.js +1 -1
- package/components/pane/pane.js +1 -1
- package/components/pipeline-status/pipeline-status.js +1 -1
- package/components/popover/popover.a2ui.json +8 -1
- package/components/popover/popover.js +1 -1
- package/components/popover/popover.yaml +14 -1
- package/components/progress/progress.js +1 -1
- package/components/progress-row/progress-row.js +1 -1
- package/components/radio/radio.js +1 -1
- package/components/range/range.js +1 -1
- package/components/rating/rating.js +1 -1
- package/components/richtext/richtext.js +1 -1
- package/components/row/row.js +1 -1
- package/components/search/search.js +1 -1
- package/components/segment/segment.js +1 -1
- 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 +158 -0
- 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.js +1 -1
- package/components/slider/slider.js +1 -1
- package/components/spinner/spinner.a2ui.json +3 -2
- package/components/spinner/{class.js → spinner.class.js} +33 -3
- package/components/spinner/spinner.css +91 -35
- package/components/spinner/spinner.d.ts +2 -2
- package/components/spinner/spinner.js +1 -1
- package/components/spinner/spinner.test.js +49 -11
- package/components/spinner/spinner.yaml +9 -1
- package/components/stack/stack.js +1 -1
- package/components/step-progress/step-progress.js +1 -1
- package/components/stepper/stepper-item.yaml +1 -1
- package/components/stepper/stepper.js +1 -1
- package/components/stream/stream.js +1 -1
- package/components/swatch/swatch.js +1 -1
- package/components/swiper/swiper.js +1 -1
- package/components/switch/switch.js +1 -1
- package/components/table/table.css +1 -1
- 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.js +1 -1
- package/components/tabs/tab.yaml +2 -2
- package/components/tabs/tabs.js +1 -1
- 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.js +1 -1
- package/components/textarea/textarea.a2ui.json +1 -1
- package/components/textarea/textarea.js +1 -1
- package/components/textarea/textarea.yaml +11 -8
- package/components/time-picker/time-picker.js +1 -1
- package/components/timeline/timeline-item.yaml +2 -2
- package/components/timeline/{class.js → timeline.class.js} +1 -1
- package/components/timeline/timeline.js +1 -1
- package/components/toast/toast.js +1 -1
- package/components/toggle-group/toggle-group.js +1 -1
- package/components/toggle-group/toggle-option.yaml +1 -1
- package/components/toggle-scheme/toggle-scheme.js +1 -1
- package/components/toolbar/toolbar-group.yaml +1 -1
- package/components/toolbar/toolbar.js +1 -1
- package/components/tooltip/tooltip.js +1 -1
- package/components/tree/tree-item.yaml +1 -1
- package/components/tree/tree.js +1 -1
- package/components/upload/upload.js +1 -1
- package/dist/web-components.min.css +1 -1
- package/dist/web-components.min.js +111 -90
- package/package.json +3 -3
- package/styles/components.css +3 -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/combobox/{class.js → combobox.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/integration-card/{class.js → integration-card.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/list-window/{class.js → list-window.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/time-picker/{class.js → time-picker.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
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"composes": [],
|
|
63
63
|
"events": {
|
|
64
64
|
"submit": {
|
|
65
|
-
"description": "Fires when the user presses Enter (without Shift) in the textarea OR clicks the built-in send button. The composer suppresses submission while `[loading]` is set.",
|
|
65
|
+
"description": "Fires when the user presses Enter (without Shift) in the textarea OR clicks the built-in send button. Unconditional — there is no [submit-on-enter] opt-in or opt-out attribute; Enter→submit is delegated from the inner <textarea-ui> which always emits a `submit` event on Enter without Shift. The composer suppresses submission while `[loading]` is set.",
|
|
66
66
|
"detail": {
|
|
67
67
|
"model": {
|
|
68
68
|
"description": "Currently selected model value (empty if no model picker).",
|
|
@@ -29,7 +29,12 @@ import { UIElement } from '../../core/element.js';
|
|
|
29
29
|
* can draft a follow-up while the model is still responding.
|
|
30
30
|
*
|
|
31
31
|
* Events:
|
|
32
|
-
* submit — user pressed Enter
|
|
32
|
+
* submit — user pressed Enter (without Shift) in the textarea or
|
|
33
|
+
* clicked the built-in send button (detail: { text, model,
|
|
34
|
+
* attachments }). Unconditional — Enter→submit is delegated
|
|
35
|
+
* from the inner <textarea-ui> which always emits a
|
|
36
|
+
* `submit` event on Enter without Shift. There is no
|
|
37
|
+
* [submit-on-enter] opt-in/opt-out attribute.
|
|
33
38
|
*
|
|
34
39
|
* Note:
|
|
35
40
|
* Composite wrapper, not a form field itself. The inner textarea-ui is
|
|
@@ -101,7 +101,10 @@ events:
|
|
|
101
101
|
submit:
|
|
102
102
|
description: >-
|
|
103
103
|
Fires when the user presses Enter (without Shift) in the textarea
|
|
104
|
-
OR clicks the built-in send button.
|
|
104
|
+
OR clicks the built-in send button. Unconditional — there is no
|
|
105
|
+
[submit-on-enter] opt-in or opt-out attribute; Enter→submit is
|
|
106
|
+
delegated from the inner <textarea-ui> which always emits a
|
|
107
|
+
`submit` event on Enter without Shift. The composer suppresses
|
|
105
108
|
submission while `[loading]` is set.
|
|
106
109
|
detail:
|
|
107
110
|
text:
|
package/components/code/code.js
CHANGED
package/components/col/col.js
CHANGED
|
@@ -338,7 +338,7 @@ export class UIDateRangePicker extends UIFormElement {
|
|
|
338
338
|
this.#triggerRef.addEventListener('click', this.#onTriggerClick);
|
|
339
339
|
// Register keydown in CAPTURE phase so we set the keyboard-origin
|
|
340
340
|
// flag BEFORE <button-ui>'s own keydown handler synthesizes a
|
|
341
|
-
// click via `this.click()` (see button/class.js:148).
|
|
341
|
+
// click via `this.click()` (see button/button.class.js:148).
|
|
342
342
|
this.#triggerRef.addEventListener('keydown', this.#onTriggerKey, true);
|
|
343
343
|
this.#popoverRef.addEventListener('click', this.#onPopoverClick);
|
|
344
344
|
this.#popoverRef.addEventListener('keydown', this.#onPopoverKey);
|
|
@@ -433,15 +433,31 @@ export class UIDateRangePicker extends UIFormElement {
|
|
|
433
433
|
// Cascade min/max + selection state into the calendar panes.
|
|
434
434
|
const range = parseRange(this.value);
|
|
435
435
|
const pending = this.#pending;
|
|
436
|
+
// Effective endpoints — pending (mid-click) takes precedence over
|
|
437
|
+
// value. Push the SAME from/to onto BOTH grids so each independently
|
|
438
|
+
// lights up its in-range cells via `[data-in-range]`. Without this,
|
|
439
|
+
// only the two endpoint cells got `[data-selected]` and the days
|
|
440
|
+
// between them rendered as plain background — the "fill the cells
|
|
441
|
+
// between start and end dates" trap.
|
|
442
|
+
const effFrom = pending?.from || range?.from || '';
|
|
443
|
+
const effTo = pending?.to || range?.to || '';
|
|
444
|
+
const setRangeAttrs = (cal) => {
|
|
445
|
+
if (effFrom) cal.setAttribute('range-start', effFrom);
|
|
446
|
+
else cal.removeAttribute('range-start');
|
|
447
|
+
if (effTo) cal.setAttribute('range-end', effTo);
|
|
448
|
+
else cal.removeAttribute('range-end');
|
|
449
|
+
};
|
|
436
450
|
if (this.#calFromRef) {
|
|
437
451
|
if (this.min) this.#calFromRef.setAttribute('min', this.min);
|
|
438
452
|
if (this.max) this.#calFromRef.setAttribute('max', this.max);
|
|
439
453
|
this.#calFromRef.value = pending?.from || range?.from || '';
|
|
454
|
+
setRangeAttrs(this.#calFromRef);
|
|
440
455
|
}
|
|
441
456
|
if (this.#calToRef) {
|
|
442
457
|
if (this.min) this.#calToRef.setAttribute('min', this.min);
|
|
443
458
|
if (this.max) this.#calToRef.setAttribute('max', this.max);
|
|
444
459
|
this.#calToRef.value = pending?.to || range?.to || '';
|
|
460
|
+
setRangeAttrs(this.#calToRef);
|
|
445
461
|
}
|
|
446
462
|
|
|
447
463
|
// Render the preset rail (unless overridden by [slot="presets"] or
|
|
@@ -544,7 +560,7 @@ export class UIDateRangePicker extends UIFormElement {
|
|
|
544
560
|
|
|
545
561
|
// Flag set by #onTriggerKey to mark the *next* click as keyboard-originated.
|
|
546
562
|
// <button-ui> calls `this.click()` from its own Enter/Space keydown handler
|
|
547
|
-
// (see button/class.js:148), so the click that follows a keyboard press is
|
|
563
|
+
// (see button/button.class.js:148), so the click that follows a keyboard press is
|
|
548
564
|
// synthetic. We use this flag to disambiguate the `trigger:` field on the
|
|
549
565
|
// `open` event.
|
|
550
566
|
#keyboardOpen = false;
|
|
@@ -33,10 +33,26 @@
|
|
|
33
33
|
--date-range-picker-selected-fg-default: var(--a-accent-fg);
|
|
34
34
|
--date-range-picker-preview-bg-default: var(--a-accent-muted);
|
|
35
35
|
|
|
36
|
-
/* Trigger
|
|
36
|
+
/* Trigger — mirrors the canonical trigger surface used by
|
|
37
|
+
<select-ui> and <calendar-picker-ui> so consumers see a
|
|
38
|
+
consistent open-picker chrome across the input/picker family.
|
|
39
|
+
The values are deliberately the same tokens select/calendar
|
|
40
|
+
cascade onto their own `--*-trigger-*` aliases. */
|
|
37
41
|
--date-range-picker-trigger-min-width-default: 14em;
|
|
38
|
-
|
|
39
|
-
|
|
42
|
+
--date-range-picker-trigger-height-default: var(--a-size);
|
|
43
|
+
--date-range-picker-trigger-px-default: var(--a-ui-px);
|
|
44
|
+
--date-range-picker-trigger-gap-default: var(--a-space-1);
|
|
45
|
+
--date-range-picker-trigger-radius-default: var(--a-radius);
|
|
46
|
+
--date-range-picker-trigger-bg-default: var(--a-ui-bg);
|
|
47
|
+
--date-range-picker-trigger-bg-hover-default: var(--a-ui-bg-hover);
|
|
48
|
+
--date-range-picker-trigger-fg-default: var(--a-ui-text-subtle);
|
|
49
|
+
--date-range-picker-trigger-border-default: var(--a-ui-border);
|
|
50
|
+
--date-range-picker-trigger-border-hover-default: var(--a-ui-border-hover);
|
|
51
|
+
--date-range-picker-trigger-focus-ring-default: var(--a-focus-ring);
|
|
52
|
+
|
|
53
|
+
/* Popover-internal padding (NOT the trigger — kept distinct from
|
|
54
|
+
--date-range-picker-trigger-px to avoid the historical conflation
|
|
55
|
+
that made the trigger render with --a-space-3 vertical inflation). */
|
|
40
56
|
--date-range-picker-px-default: var(--a-space-3);
|
|
41
57
|
--date-range-picker-py-default: var(--a-space-2);
|
|
42
58
|
|
|
@@ -55,10 +71,40 @@
|
|
|
55
71
|
font-size: var(--a-ui-size);
|
|
56
72
|
}
|
|
57
73
|
|
|
58
|
-
/*
|
|
59
|
-
|
|
74
|
+
/* ── Trigger ──
|
|
75
|
+
Canonical trigger surface matching <select-ui> + <calendar-picker-ui>:
|
|
76
|
+
flex row, --a-size min-height, --a-ui-px padding, --a-radius corner,
|
|
77
|
+
--a-ui-border outline. The trigger is a <button-ui slot="trigger">
|
|
78
|
+
stamped by date-range-picker.class.js — these rules override button-ui's defaults at
|
|
79
|
+
equal specificity so the picker trigger reads as part of the
|
|
80
|
+
input/picker family rather than a generic button. */
|
|
60
81
|
:scope > [slot="trigger"] {
|
|
61
82
|
min-width: var(--date-range-picker-trigger-min-width, var(--date-range-picker-trigger-min-width-default));
|
|
83
|
+
min-height: var(--date-range-picker-trigger-height, var(--date-range-picker-trigger-height-default));
|
|
84
|
+
padding: 0 var(--date-range-picker-trigger-px, var(--date-range-picker-trigger-px-default));
|
|
85
|
+
gap: var(--date-range-picker-trigger-gap, var(--date-range-picker-trigger-gap-default));
|
|
86
|
+
border-radius: var(--date-range-picker-trigger-radius, var(--date-range-picker-trigger-radius-default));
|
|
87
|
+
border: 1px solid var(--date-range-picker-trigger-border, var(--date-range-picker-trigger-border-default));
|
|
88
|
+
background: var(--date-range-picker-trigger-bg, var(--date-range-picker-trigger-bg-default));
|
|
89
|
+
color: var(--date-range-picker-trigger-fg, var(--date-range-picker-trigger-fg-default));
|
|
90
|
+
/* Justify content so leading icon + label sit at start, trailing
|
|
91
|
+
caret at end — same shape select-ui's trigger uses via
|
|
92
|
+
`justify-content: space-between` on a [leading|display|caret]
|
|
93
|
+
slot triplet. button-ui's natural alignment is `center`; our
|
|
94
|
+
leading+text+trailing layout reads better as space-between. */
|
|
95
|
+
justify-content: space-between;
|
|
96
|
+
line-height: 1;
|
|
97
|
+
transition:
|
|
98
|
+
border-color var(--date-range-picker-duration, var(--date-range-picker-duration-default)) var(--date-range-picker-easing, var(--date-range-picker-easing-default)),
|
|
99
|
+
background var(--date-range-picker-duration, var(--date-range-picker-duration-default)) var(--date-range-picker-easing, var(--date-range-picker-easing-default));
|
|
100
|
+
}
|
|
101
|
+
:scope > [slot="trigger"]:hover {
|
|
102
|
+
border-color: var(--date-range-picker-trigger-border-hover, var(--date-range-picker-trigger-border-hover-default));
|
|
103
|
+
background: var(--date-range-picker-trigger-bg-hover, var(--date-range-picker-trigger-bg-hover-default));
|
|
104
|
+
}
|
|
105
|
+
:scope:focus-visible { outline: none; }
|
|
106
|
+
:scope:focus-visible > [slot="trigger"] {
|
|
107
|
+
box-shadow: var(--date-range-picker-trigger-focus-ring, var(--date-range-picker-trigger-focus-ring-default));
|
|
62
108
|
}
|
|
63
109
|
|
|
64
110
|
/* States */
|
|
@@ -293,7 +293,7 @@ export class UIDatetimePicker extends UIFormElement {
|
|
|
293
293
|
this.#ensureParts();
|
|
294
294
|
this.#triggerRef.addEventListener('click', this.#onTriggerClick);
|
|
295
295
|
// Capture-phase so we flag keyboard-origin BEFORE <button-ui>'s
|
|
296
|
-
// own keydown synthesizes the click (button/class.js:148).
|
|
296
|
+
// own keydown synthesizes the click (button/button.class.js:148).
|
|
297
297
|
this.#triggerRef.addEventListener('keydown', this.#onTriggerKey, true);
|
|
298
298
|
this.#popoverRef.addEventListener('click', this.#onPopoverClick);
|
|
299
299
|
this.#popoverRef.addEventListener('keydown', this.#onPopoverKey);
|
package/components/feed/feed.js
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
12
|
import { defineIfFree } from '../../core/register.js';
|
|
13
|
-
import { UIFeedContainer, UIFeedItem, UIFeed } from './class.js';
|
|
13
|
+
import { UIFeedContainer, UIFeedItem, UIFeed } from './feed.class.js';
|
|
14
14
|
|
|
15
15
|
defineIfFree('feed-ui', UIFeedContainer);
|
|
16
16
|
defineIfFree('feed-item-ui', UIFeedItem);
|
|
@@ -201,7 +201,7 @@ describe('field-ui', () => {
|
|
|
201
201
|
// The CSS rule must be present in the source; this test documents intent
|
|
202
202
|
// rather than measuring computed style (which requires a real browser for @scope).
|
|
203
203
|
const fieldCssSource = document.head.innerHTML + document.body.innerHTML;
|
|
204
|
-
// Accept if either the stylesheet is found OR the class.js property is declared.
|
|
204
|
+
// Accept if either the stylesheet is found OR the field.class.js property is declared.
|
|
205
205
|
const hasAlignProp = f => f.align !== undefined;
|
|
206
206
|
const f = mount('<field-ui label="X"><input /></field-ui>');
|
|
207
207
|
expect(hasAlignProp(f)).toBe(true);
|
package/components/grid/grid.js
CHANGED
package/components/icon/icon.js
CHANGED
package/components/index.js
CHANGED
|
@@ -62,7 +62,9 @@ export { UIProgress } from './progress/progress.js';
|
|
|
62
62
|
export { UIStepProgress } from './step-progress/step-progress.js';
|
|
63
63
|
export { UISkeleton } from './skeleton/skeleton.js';
|
|
64
64
|
export { UISpinner } from './spinner/spinner.js';
|
|
65
|
+
export { UILoadingOverlay } from './loading-overlay/loading-overlay.js';
|
|
65
66
|
export { UIAlert } from './alert/alert.js';
|
|
67
|
+
export { UIInlineMessage } from './inline-message/inline-message.js';
|
|
66
68
|
export { UIKbd } from './kbd/kbd.js';
|
|
67
69
|
export { UITag } from './tag/tag.js';
|
|
68
70
|
export { UISwatch } from './swatch/swatch.js';
|
|
@@ -90,6 +92,7 @@ export { UIOtpInput } from './otp-input/otp-input.js';
|
|
|
90
92
|
export { UIImage } from './image/image.js';
|
|
91
93
|
export { UISearch } from './search/search.js';
|
|
92
94
|
export { UICombobox } from './combobox/combobox.js';
|
|
95
|
+
export { UITagsInput } from './tags-input/tags-input.js';
|
|
93
96
|
export { UIStat } from './stat/stat.js';
|
|
94
97
|
export { UIProgressRow } from './progress-row/progress-row.js';
|
|
95
98
|
export { UIActionList, UIActionItem } from './action-list/action-list.js';
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://adiaui.dev/a2ui/v0_9/components/InlineMessage.json",
|
|
4
|
+
"title": "InlineMessage",
|
|
5
|
+
"description": "In-flow message glyph + text used in form-field rows for validation\nfeedback, hint copy, and inline confirmations. Distinguished from\n<alert-ui> (banner / surface-bearing notice) by carrying no surface\nfill, no border, no padding box — severity is foreground color +\nicon only. Variants map to severity (info / success / warning /\ndanger). Nests inside <field-ui>, <col-ui>, <row-ui> without\nbreaking field rhythm. Non-interactive annotation only.\n",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"allOf": [
|
|
8
|
+
{
|
|
9
|
+
"$ref": "common_types.json#/$defs/ComponentCommon"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"$ref": "common_types.json#/$defs/CatalogComponentCommon"
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"properties": {
|
|
16
|
+
"component": {
|
|
17
|
+
"const": "InlineMessage"
|
|
18
|
+
},
|
|
19
|
+
"icon": {
|
|
20
|
+
"description": "Phosphor glyph override; each [variant] ships a sensible default (info / check-circle / warning / x-circle).",
|
|
21
|
+
"$ref": "common_types.json#/$defs/DynamicString"
|
|
22
|
+
},
|
|
23
|
+
"live": {
|
|
24
|
+
"description": "Sets `aria-live` on the host for dynamic message updates. Empty = no live region (static annotation).",
|
|
25
|
+
"type": "string",
|
|
26
|
+
"enum": [
|
|
27
|
+
"",
|
|
28
|
+
"polite",
|
|
29
|
+
"assertive"
|
|
30
|
+
],
|
|
31
|
+
"default": ""
|
|
32
|
+
},
|
|
33
|
+
"text": {
|
|
34
|
+
"description": "Single-line message text. Default-slot content wins when present.",
|
|
35
|
+
"$ref": "common_types.json#/$defs/DynamicString"
|
|
36
|
+
},
|
|
37
|
+
"variant": {
|
|
38
|
+
"description": "Semantic severity tone — drives icon + foreground color. Default carries no leading icon (pure hint copy).",
|
|
39
|
+
"$ref": "common_types.json#/$defs/DynamicString"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"required": [
|
|
43
|
+
"component"
|
|
44
|
+
],
|
|
45
|
+
"unevaluatedProperties": false,
|
|
46
|
+
"x-adiaui": {
|
|
47
|
+
"anti_patterns": [],
|
|
48
|
+
"category": "feedback",
|
|
49
|
+
"composes": [
|
|
50
|
+
"icon-ui"
|
|
51
|
+
],
|
|
52
|
+
"events": {},
|
|
53
|
+
"examples": [
|
|
54
|
+
{
|
|
55
|
+
"description": "Email field with a danger inline-message under the input.",
|
|
56
|
+
"a2ui": "[\n {\n \"id\": \"root\",\n \"component\": \"Field\",\n \"label\": \"Email\",\n \"children\": [\n \"input\",\n \"msg\"\n ]\n },\n {\n \"id\": \"input\",\n \"component\": \"Input\",\n \"type\": \"email\"\n },\n {\n \"id\": \"msg\",\n \"component\": \"InlineMessage\",\n \"variant\": \"danger\",\n \"text\": \"Email address is required\"\n }\n]",
|
|
57
|
+
"name": "field-validation"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"description": "Password field with a muted hint (default variant, no icon).",
|
|
61
|
+
"a2ui": "[\n {\n \"id\": \"root\",\n \"component\": \"Field\",\n \"label\": \"Password\",\n \"children\": [\n \"input\",\n \"hint\"\n ]\n },\n {\n \"id\": \"input\",\n \"component\": \"Input\",\n \"type\": \"password\"\n },\n {\n \"id\": \"hint\",\n \"component\": \"InlineMessage\",\n \"text\": \"At least 8 characters\"\n }\n]",
|
|
62
|
+
"name": "password-hint"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"description": "Username field with a polite live-region success confirmation.",
|
|
66
|
+
"a2ui": "[\n {\n \"id\": \"root\",\n \"component\": \"Field\",\n \"label\": \"Username\",\n \"children\": [\n \"input\",\n \"msg\"\n ]\n },\n {\n \"id\": \"input\",\n \"component\": \"Input\"\n },\n {\n \"id\": \"msg\",\n \"component\": \"InlineMessage\",\n \"variant\": \"success\",\n \"live\": \"polite\",\n \"text\": \"Username is available\"\n }\n]",
|
|
67
|
+
"name": "username-success"
|
|
68
|
+
}
|
|
69
|
+
],
|
|
70
|
+
"keywords": [
|
|
71
|
+
"inline",
|
|
72
|
+
"message",
|
|
73
|
+
"hint",
|
|
74
|
+
"helper",
|
|
75
|
+
"validation",
|
|
76
|
+
"error",
|
|
77
|
+
"field-error",
|
|
78
|
+
"helper-text",
|
|
79
|
+
"error-text",
|
|
80
|
+
"form-feedback",
|
|
81
|
+
"status",
|
|
82
|
+
"notice"
|
|
83
|
+
],
|
|
84
|
+
"name": "UIInlineMessage",
|
|
85
|
+
"related": [
|
|
86
|
+
"alert",
|
|
87
|
+
"field",
|
|
88
|
+
"input",
|
|
89
|
+
"text"
|
|
90
|
+
],
|
|
91
|
+
"slots": {
|
|
92
|
+
"default": {
|
|
93
|
+
"description": "Message body — text or inline DOM (e.g. <link-ui>, <kbd-ui>). Wins over the [text] attribute when present. Stays inline so the message reads as one annotation line under the field."
|
|
94
|
+
},
|
|
95
|
+
"leading": {
|
|
96
|
+
"description": "Leading icon slot. Stamped automatically from [icon] or the variant's default glyph. Consumer-provided <icon-ui slot=\"leading\"> is preserved across [variant] changes (never overwritten)."
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
"states": [
|
|
100
|
+
{
|
|
101
|
+
"description": "Default, ready for screen-reader pickup.",
|
|
102
|
+
"name": "idle"
|
|
103
|
+
}
|
|
104
|
+
],
|
|
105
|
+
"status": "stable",
|
|
106
|
+
"synonyms": {
|
|
107
|
+
"error": [
|
|
108
|
+
"error",
|
|
109
|
+
"alert",
|
|
110
|
+
"validation"
|
|
111
|
+
],
|
|
112
|
+
"helper": [
|
|
113
|
+
"hint",
|
|
114
|
+
"help",
|
|
115
|
+
"tooltip"
|
|
116
|
+
],
|
|
117
|
+
"hint": [
|
|
118
|
+
"hint",
|
|
119
|
+
"tooltip",
|
|
120
|
+
"help"
|
|
121
|
+
],
|
|
122
|
+
"message": [
|
|
123
|
+
"alert",
|
|
124
|
+
"notification",
|
|
125
|
+
"hint"
|
|
126
|
+
],
|
|
127
|
+
"notice": [
|
|
128
|
+
"alert",
|
|
129
|
+
"banner",
|
|
130
|
+
"hint"
|
|
131
|
+
],
|
|
132
|
+
"validation": [
|
|
133
|
+
"validation",
|
|
134
|
+
"error",
|
|
135
|
+
"alert"
|
|
136
|
+
]
|
|
137
|
+
},
|
|
138
|
+
"tag": "inline-message-ui",
|
|
139
|
+
"tokens": {},
|
|
140
|
+
"traits": [],
|
|
141
|
+
"version": 1
|
|
142
|
+
}
|
|
143
|
+
}
|