@aceshooting/lyra-ui 30.9.0 → 31.0.0
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 +236 -339
- package/dist/ai/adapters/ag-ui.js +1 -1
- package/dist/components/agent-tools/activity-feed/activity-feed.class.js +1 -1
- package/dist/components/agent-tools/compare-panel/compare-panel.class.js +1 -1
- package/dist/components/agent-tools/eval-dataset/eval-dataset.class.js +1 -1
- package/dist/components/agent-tools/thinking-panel/thinking-panel.class.js +1 -1
- package/dist/components/agent-tools/tool-select-dialog/tool-select-dialog.class.js +1 -1
- package/dist/components/charts/chart/box-plot.class.js +2 -2
- package/dist/components/charts/chart/chart-sync.js +1 -1
- package/dist/components/charts/chart/chart.class.d.ts +1 -1
- package/dist/components/charts/chart/chart.class.js +4 -4
- package/dist/components/charts/chart/lite-chart-axis-layout.js +1 -1
- package/dist/components/charts/chart/lite-chart.class.js +1 -1
- package/dist/components/conversation/chat-composer/chat-composer.class.d.ts +9 -4
- package/dist/components/conversation/chat-composer/chat-composer.class.js +1 -1
- package/dist/components/conversation/chat-composer/chat-composer.styles.js +1 -1
- package/dist/components/conversation/chat-message/chat-message.class.d.ts +27 -3
- package/dist/components/conversation/chat-message/chat-message.class.js +14 -12
- package/dist/components/conversation/chat-message/chat-message.styles.js +1 -1
- package/dist/components/conversation/chat-viewport/chat-viewport.class.d.ts +29 -2
- package/dist/components/conversation/chat-viewport/chat-viewport.class.js +2 -2
- package/dist/components/conversation/chat-viewport/chat-viewport.styles.js +1 -1
- package/dist/components/conversation/code-block/code-block-shared.js +1 -1
- package/dist/components/conversation/markdown/markdown-base.class.d.ts +1 -1
- package/dist/components/conversation/markdown/markdown-base.class.js +1 -1
- package/dist/components/conversation/markdown/markdown-code-header.js +1 -1
- package/dist/components/conversation/markdown/markdown-core.class.d.ts +10 -0
- package/dist/components/conversation/markdown/markdown-core.class.js +1 -1
- package/dist/components/conversation/markdown/markdown-shared.d.ts +7 -2
- package/dist/components/conversation/markdown/markdown-shared.js +3 -3
- package/dist/components/conversation/markdown/markdown.class.d.ts +10 -0
- package/dist/components/conversation/markdown/markdown.class.js +1 -1
- package/dist/components/conversation/message-feedback/message-feedback.class.js +2 -2
- package/dist/components/conversation/message-parts/message-parts.class.js +1 -1
- package/dist/components/conversation/prompt-input/prompt-input.class.d.ts +2 -1
- package/dist/components/conversation/streaming-text/streaming-text-base.class.d.ts +4 -0
- package/dist/components/conversation/streaming-text/streaming-text-base.class.js +1 -1
- package/dist/components/conversation/streaming-text/streaming-text-core.class.d.ts +1 -1
- package/dist/components/conversation/streaming-text/streaming-text-core.class.js +1 -0
- package/dist/components/conversation/streaming-text/streaming-text.class.d.ts +1 -1
- package/dist/components/conversation/streaming-text/streaming-text.class.js +1 -0
- package/dist/components/conversation/suggestion-chips/suggestion-chips.class.d.ts +17 -3
- package/dist/components/conversation/suggestion-chips/suggestion-chips.class.js +3 -3
- package/dist/components/conversation/suggestion-chips/suggestion-chips.d.ts +1 -1
- package/dist/components/conversation/suggestion-chips/suggestion-chips.js +1 -1
- package/dist/components/conversation/suggestion-chips/suggestion-chips.styles.js +1 -1
- package/dist/components/conversation/thread-list/thread-list.class.js +2 -2
- package/dist/components/conversation/transcript-feed/transcript-feed.class.js +1 -1
- package/dist/components/data/data-grid/data-grid.class.d.ts +10 -10
- package/dist/components/data/data-grid/data-grid.class.js +1 -1
- package/dist/components/data/file-tree/file-tree.class.js +1 -1
- package/dist/components/data/flow-canvas/flow-canvas.class.js +1 -1
- package/dist/components/data/heatmap/heatmap.class.d.ts +1 -1
- package/dist/components/data/heatmap/heatmap.class.js +1 -1
- package/dist/components/data/pagination/pagination.class.js +1 -1
- package/dist/components/data/table/table.class.d.ts +31 -2
- package/dist/components/data/table/table.class.js +3 -3
- package/dist/components/data/table/table.styles.js +1 -1
- package/dist/components/data/timeline/timeline-cluster.js +1 -1
- package/dist/components/data/timeline/timeline-item.class.d.ts +10 -3
- package/dist/components/data/timeline/timeline-item.class.js +16 -12
- package/dist/components/data/timeline/timeline-item.styles.js +1 -1
- package/dist/components/data/timeline/timeline.class.d.ts +14 -2
- package/dist/components/data/timeline/timeline.class.js +9 -5
- package/dist/components/data/tree/tree-item.class.js +1 -1
- package/dist/components/data/tree/tree.class.d.ts +2 -0
- package/dist/components/data/tree/tree.class.js +1 -1
- package/dist/components/forms/button/button.class.d.ts +8 -6
- package/dist/components/forms/button/button.class.js +2 -2
- package/dist/components/forms/checkbox-group/checkbox-group.class.js +1 -1
- package/dist/components/forms/color-picker/color-core.js +1 -1
- package/dist/components/forms/date-picker/date-input.class.d.ts +1 -1
- package/dist/components/forms/date-picker/date-input.class.js +1 -1
- package/dist/components/forms/icon-button/icon-button.class.d.ts +4 -2
- package/dist/components/forms/icon-button/icon-button.class.js +2 -2
- package/dist/components/forms/input/input-shared.js +2 -2
- package/dist/components/forms/input/number-input-locale.js +1 -0
- package/dist/components/forms/input/number-input.class.d.ts +19 -2
- package/dist/components/forms/input/number-input.class.js +2 -2
- package/dist/components/forms/locale-picker/locale-picker.class.d.ts +3 -3
- package/dist/components/forms/locale-picker/locale-picker.class.js +1 -1
- package/dist/components/layout/app-rail-group/app-rail-group.class.js +1 -1
- package/dist/components/layout/details/accordion-item.class.js +1 -1
- package/dist/components/layout/menu/menu.class.js +1 -1
- package/dist/components/layout/multi-split/multi-split.class.js +1 -1
- package/dist/components/layout/navigation-menu-item/navigation-menu-item.class.js +1 -1
- package/dist/components/layout/tab-group/tab-group.class.d.ts +8 -1
- package/dist/components/layout/tab-group/tab-group.class.js +1 -1
- package/dist/components/layout/tab-group/tab.class.d.ts +7 -1
- package/dist/components/layout/tab-group/tab.class.js +1 -1
- package/dist/components/layout/virtual-list/virtual-list.class.d.ts +2 -2
- package/dist/components/layout/virtual-list/virtual-list.class.js +1 -1
- package/dist/components/media/animated-image/animated-image.class.js +1 -1
- package/dist/components/media/attachment-chip/attachment-chip.class.d.ts +21 -14
- package/dist/components/media/attachment-chip/attachment-chip.class.js +1 -1
- package/dist/components/media/attachment-trigger/attachment-trigger.class.d.ts +36 -12
- package/dist/components/media/attachment-trigger/attachment-trigger.class.js +3 -3
- package/dist/components/media/drop-zone/drop-zone.class.d.ts +23 -5
- package/dist/components/media/drop-zone/drop-zone.class.js +2 -2
- package/dist/components/media/drop-zone/drop-zone.styles.js +1 -1
- package/dist/components/media/file-icon/file-icon.class.js +1 -1
- package/dist/components/media/flag/flag-url-resolver.js +1 -1
- package/dist/components/media/image-viewer/image-viewer.class.d.ts +2 -2
- package/dist/components/media/image-viewer/image-viewer.class.js +1 -1
- package/dist/components/media/map/map-owned-features.js +1 -1
- package/dist/components/media/map/map-scene-elevated-lines.js +2 -2
- package/dist/components/media/map/map-scene-render-controller.js +1 -1
- package/dist/components/media/map/map.class.d.ts +5 -5
- package/dist/components/media/map/map.class.js +3 -3
- package/dist/components/media/pan-zoom/pan-zoom.class.js +1 -1
- package/dist/components/media/video/video.class.d.ts +3 -3
- package/dist/components/media/video/video.class.js +3 -1
- package/dist/components/media/video-playlist/video-playlist.class.js +1 -1
- package/dist/components/overlays/chip/chip.class.js +1 -1
- package/dist/components/overlays/overlay/dropdown.class.js +1 -1
- package/dist/components/overlays/overlay/tooltip.class.d.ts +5 -1
- package/dist/components/overlays/overlay/tooltip.class.js +3 -3
- package/dist/components/retrieval/embedding-explorer/embedding-explorer-engine.js +1 -1
- package/dist/components/retrieval/graph/graph-node-renderer.js +1 -1
- package/dist/components/retrieval/graph/graph-spatial-controller.js +1 -1
- package/dist/components/retrieval/graph/graph.class.d.ts +1 -1
- package/dist/components/retrieval/graph/graph.class.js +1 -1
- package/dist/components/retrieval/mind-map/mind-map.class.js +1 -1
- package/dist/components/retrieval/neighbor-list/neighbor-list.class.d.ts +1 -1
- package/dist/components/retrieval/neighbor-list/neighbor-list.class.js +3 -3
- package/dist/components/retrieval/retrieval-results/retrieval-results.class.js +1 -1
- package/dist/components/utility/json-viewer/json-viewer.class.d.ts +16 -1
- package/dist/components/utility/json-viewer/json-viewer.class.js +4 -4
- package/dist/components/utility/json-viewer/json-viewer.styles.js +1 -1
- package/dist/components/utility/known-date/known-date.class.js +1 -1
- package/dist/components/utility/mention-popover/mention-popover.class.js +1 -1
- package/dist/components/viewers/calendar-viewer/calendar-viewer.class.js +1 -1
- package/dist/components/viewers/contact-viewer/contact-viewer.class.js +1 -1
- package/dist/components/viewers/csv-viewer/csv-viewer.class.js +1 -1
- package/dist/components/viewers/dataset-viewer/dataset-viewer.class.js +1 -1
- package/dist/components/viewers/docx-viewer/docx-viewer.class.js +1 -1
- package/dist/components/viewers/ebook-viewer/ebook-viewer.class.js +1 -1
- package/dist/components/viewers/include/include.class.js +1 -1
- package/dist/components/viewers/model-viewer/model-viewer.class.js +1 -1
- package/dist/components/viewers/notebook-viewer/notebook-viewer.class.js +1 -1
- package/dist/components/viewers/pdf-viewer/pdf-viewer.class.d.ts +2 -2
- package/dist/components/viewers/pdf-viewer/pdf-viewer.class.js +2 -2
- package/dist/components/viewers/spreadsheet-viewer/spreadsheet-viewer.class.js +1 -1
- package/dist/components/viewers/table-viewer-shared.js +4 -4
- package/dist/framework-types.d.ts +1 -1
- package/dist/internal/anchored-overlay-runtime.js +1 -1
- package/dist/internal/catalog-picker.js +1 -1
- package/dist/internal/document-tokens.js +2 -2
- package/dist/internal/drop-session-controller.js +1 -1
- package/dist/internal/engine-3d.js +1 -1
- package/dist/internal/icon-only-content.js +1 -1
- package/dist/internal/layered-layout.js +1 -1
- package/dist/internal/map-custom-layer-controller.js +1 -1
- package/dist/internal/media-panorama.js +1 -1
- package/dist/internal/package-metadata.js +1 -1
- package/dist/internal/safe-url.js +1 -1
- package/dist/internal/scoped-definitions.generated.js +1 -1
- package/dist/internal/scroll-overflow.js +1 -1
- package/dist/internal/source-window-controller.js +1 -1
- package/dist/internal/text-quote.js +1 -1
- package/dist/internal/viewer-search.js +1 -1
- package/dist/lyra.d.ts +1 -1
- package/dist/sequence-time-binding.js +1 -1
- package/dist/simulation-clock.js +1 -1
- package/dist/styles/reservations.css +1 -1
- package/dist/styles/reservations.styles.js +1 -1
- package/dist/testing/happy-dom-shims.js +1 -1
- package/dist/theme/theme.js +1 -1
- package/llms/components/lr-attachment-chip.md +27 -12
- package/llms/components/lr-attachment-trigger.md +27 -7
- package/llms/components/lr-button.md +6 -4
- package/llms/components/lr-chat-composer.md +13 -7
- package/llms/components/lr-chat-message.md +44 -3
- package/llms/components/lr-chat-viewport.md +39 -2
- package/llms/components/lr-data-grid.md +2 -0
- package/llms/components/lr-dialog.md +10 -0
- package/llms/components/lr-drop-zone.md +26 -2
- package/llms/components/lr-icon-button.md +2 -1
- package/llms/components/lr-json-viewer.md +17 -0
- package/llms/components/lr-locale-picker.md +5 -0
- package/llms/components/lr-markdown-core.md +2 -1
- package/llms/components/lr-markdown.md +20 -4
- package/llms/components/lr-menu.md +3 -1
- package/llms/components/lr-number-input.md +28 -1
- package/llms/components/lr-prompt-input.md +1 -1
- package/llms/components/lr-streaming-text-core.md +3 -2
- package/llms/components/lr-streaming-text.md +4 -1
- package/llms/components/lr-suggestion-chips.md +28 -5
- package/llms/components/lr-tab-group.md +13 -1
- package/llms/components/lr-tab.md +5 -0
- package/llms/components/lr-table.md +25 -4
- package/llms/components/lr-timeline-item.md +1 -1
- package/llms/components/lr-timeline.md +38 -4
- package/llms/components/lr-tooltip.md +3 -1
- package/llms/components/lr-tree.md +4 -0
- package/llms/components/lr-virtual-list.md +1 -0
- package/llms/peers.md +2 -2
- package/llms/shared/forms-and-accessibility.md +21 -4
- package/llms/shared.md +21 -4
- package/package.json +21 -20
- package/registrations.json +1 -1
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
- **Release history** [CHANGELOG.md](../../CHANGELOG.md); family-wide breaking-change summaries: [conversation](https://github.com/aceshooting/lyra-ui/blob/main/packages/lyra-ui/llms/conversation.md)
|
|
10
10
|
- **Deprecations** none
|
|
11
11
|
- **Optional peers** none
|
|
12
|
-
- **Themeable via** 5 parts,
|
|
12
|
+
- **Themeable via** 5 parts, 3 custom properties — see this component's own `@csspart`/`@cssprop` list below
|
|
13
13
|
- **Library-wide behavior** (events, form association, `locale`/`strings`, tokens, TS types): `llms/shared.md`
|
|
14
14
|
|
|
15
15
|
---
|
|
@@ -41,6 +41,13 @@ Hidden, inert, `aria-hidden`, and CSS-hidden content is omitted. Existing declar
|
|
|
41
41
|
silent on mount, and appending the same text again creates another announcement. `off` acquires no
|
|
42
42
|
sink and produces no announcements.
|
|
43
43
|
|
|
44
|
+
**Host layout contract.** The host is a flex column (`display: flex; flex-direction: column`), and
|
|
45
|
+
`[part="base"]` and `[part="scroll"]` grow with `flex: 1` inside it. Do not override the host's
|
|
46
|
+
`display`, and give the viewport a bounded block size: an explicit height, a definite-height
|
|
47
|
+
flex/grid track, or a positioned container. With `display: block` (or an unbounded parent) the
|
|
48
|
+
transcript grows with its content and nothing scrolls, without any error. This applies to both
|
|
49
|
+
slotted and virtual mode.
|
|
50
|
+
|
|
44
51
|
**Properties:** `follow: boolean = true` (reflected) — component-managed stick-to-bottom state,
|
|
45
52
|
host-writable: setting `true` scrolls to the end and re-engages following, setting `false` releases
|
|
46
53
|
it. `bottomThreshold: number = 24` (attribute `bottom-threshold`) — px distance from the end still
|
|
@@ -50,7 +57,20 @@ index of the first unread item (element-child index in slotted mode, `items` ind
|
|
|
50
57
|
`null` disables both the divider and the pill's unread count. `live: 'off' | 'polite' | 'assertive' =
|
|
51
58
|
'off'` (reflected) — policy for the shared light-DOM announcement sink; the internal log itself
|
|
52
59
|
remains non-live. Keep `off` for token-by-token streaming and opt in only when complete messages are
|
|
53
|
-
appended as direct children at an announcement-safe cadence
|
|
60
|
+
appended as direct children at an announcement-safe cadence, or use `liveSettle` for streamed
|
|
61
|
+
replies. `liveSettle: number | null = null` (attribute `live-settle`) — announce-when-settled delay
|
|
62
|
+
in ms. While `null`, each appended direct child is announced once at append time. When set and
|
|
63
|
+
`live` is `polite` or `assertive`, a newly appended child is instead announced once, with its final
|
|
64
|
+
accessibility-exposed text, after that text has stayed unchanged for at least the delay and the child
|
|
65
|
+
no longer reports work in progress: `aria-busy="true"` or `status="streaming"` on the child, or an
|
|
66
|
+
`aria-busy="true"`, `status="streaming"` or `streaming` descendant (such as a streaming
|
|
67
|
+
`lr-streaming-text`). The text is sampled every delay, so text rendered in a child's own shadow
|
|
68
|
+
root is followed too; the announcement lands between one and two delays after the last change.
|
|
69
|
+
Values below `50` are raised to `50`; a non-finite value uses `1000`. A child removed before it
|
|
70
|
+
settles, or that never gains text, is not announced; switching `live` to `off`, clearing
|
|
71
|
+
`liveSettle`, or disconnecting drops pending announcements. An `lr-chat-message` moving from
|
|
72
|
+
`streaming` to `sent` still makes its own short "Message complete." announcement; the settled
|
|
73
|
+
announcement follows with the reply text.
|
|
54
74
|
`label?: string` — accessible name
|
|
55
75
|
for the log region. Omitting it localizes the default `chatViewportLabel` message; an explicit
|
|
56
76
|
empty string suppresses that default and renders no label. `accessibleLabel: string | null =
|
|
@@ -87,6 +107,23 @@ slotted-content wrapper the growth observers watch), `jump-pill` (the built-in j
|
|
|
87
107
|
absent while `follow` is engaged), `unread-divider` (the "New messages" separator, slotted mode
|
|
88
108
|
only).
|
|
89
109
|
|
|
110
|
+
**Themeable custom properties:** `--lr-chat-viewport-padding` (default `var(--lr-space-m)`) —
|
|
111
|
+
padding of `[part="scroll"]` around the transcript, slotted mode only (in virtual mode the slotted
|
|
112
|
+
list owns its spacing). `--lr-chat-viewport-gap` (default `0`) — block-direction gap between slotted
|
|
113
|
+
messages. In slotted mode `[part="content"]` is a flex column, so adjacent message margins add up
|
|
114
|
+
rather than collapse. The unread divider is centred in the space above the first unread message.
|
|
115
|
+
`--lr-chat-viewport-content-max-inline-size` (default `none`) — maximum inline size of the
|
|
116
|
+
transcript column (`[part="content"]`), centred in the scroll container when narrower.
|
|
117
|
+
|
|
118
|
+
```html
|
|
119
|
+
<lr-chat-viewport
|
|
120
|
+
style="--lr-chat-viewport-padding: 1rem; --lr-chat-viewport-gap: 0.75rem; --lr-chat-viewport-content-max-inline-size: 44rem"
|
|
121
|
+
>
|
|
122
|
+
<lr-chat-message message-role="user">A</lr-chat-message>
|
|
123
|
+
<lr-chat-message message-role="assistant">B</lr-chat-message>
|
|
124
|
+
</lr-chat-viewport>
|
|
125
|
+
```
|
|
126
|
+
|
|
90
127
|
Renders no messages and computes no unread state itself — the host supplies `unreadStartIndex`; no
|
|
91
128
|
virtualization of its own (`lr-virtual-list`); not a generic overflow surface (`lr-scroller`); no
|
|
92
129
|
message semantics (`lr-chat-message`).
|
|
@@ -200,6 +200,8 @@ are `text`, `equals`, `number-range`, `date-range`, `set`, `includes-any`, and `
|
|
|
200
200
|
query immediately aborts and supersedes the previous request, including while its replacement
|
|
201
201
|
waits for `filterDebounce`. Obsolete results and errors cannot update the grid even when a loader
|
|
202
202
|
ignores the signal. A rejected current request keeps prior rows and emits `lr-data-error`.
|
|
203
|
+
Request listeners can disconnect the grid, replace its source or query, or call `reload()`;
|
|
204
|
+
the superseded invocation stops before emitting further notifications or starting its loader.
|
|
203
205
|
Filter/search requests use `filterDebounce`; sorting and paging load immediately.
|
|
204
206
|
For event-driven loading, set `server`, listen to the mirrored `request` event, and assign `data`,
|
|
205
207
|
`total`, and `loading` yourself. The redundant Lyra-only `lr-data-request` event was removed in
|
|
@@ -226,6 +226,16 @@ to scope it) retints the dialog together with every popup opened from it. The mo
|
|
|
226
226
|
separate name from `--lr-overlay-shadow-anchored`, which anchored popups read, so raising popups
|
|
227
227
|
never raises dialogs.
|
|
228
228
|
|
|
229
|
+
**Surface treatment.** The panel follows the style system's surface axis like other floating chrome.
|
|
230
|
+
With no surface chosen anywhere — no `data-lr-surface`, no `setLyraStyle({ surface })`, and either
|
|
231
|
+
no theme stylesheet or `theme.css` — it paints the built-in profile's Glass: the fill at
|
|
232
|
+
`--lr-theme-surface-opacity` (default 60%) over a 12px backdrop blur. The blur sits on an internal
|
|
233
|
+
layer behind the panel content, so `getComputedStyle(panel).backdropFilter` reads `none` even while
|
|
234
|
+
the backdrop is blurred; translucency never appears without that blur. `theme-core.css` defaults to
|
|
235
|
+
Solid instead. For an opaque panel set `data-lr-surface="solid"` on the element, a wrapper or
|
|
236
|
+
`<html>`, or call `setLyraStyle({ surface: 'solid' })`; reduced transparency, increased contrast and
|
|
237
|
+
forced colours paint it opaque too. `<lr-drawer>` behaves the same way.
|
|
238
|
+
|
|
229
239
|
Otherwise the shared tokens the panel and its chrome read include the `--lr-size-20rem` /
|
|
230
240
|
`-24rem` / `-28rem` / `-32rem` / `-38rem` / `-48rem` width ladder behind `size`, `--lr-space-l`,
|
|
231
241
|
`--lr-space-m`, `--lr-space-s` and `--lr-space-xs` (spacing defaults), the `--lr-safe-area-*` insets
|
|
@@ -22,7 +22,8 @@ make that entire region a file-drop target: it owns the drag-session state, rend
|
|
|
22
22
|
drag-over overlay, applies `accept`/size/count limits, and emits the same `lr-files` event shape
|
|
23
23
|
`lr-file-input` does. It never renders a native file picker, a selected-file list, or any focusable
|
|
24
24
|
control of its own; wrap `lr-file-input` itself (or any other focusable content) inside it when the
|
|
25
|
-
region also needs a click-to-browse affordance.
|
|
25
|
+
region also needs a click-to-browse affordance. It can also sit beside a region that already exists
|
|
26
|
+
in the page instead of wrapping it (`for`/`target`, below). The drag-session mechanics are the exact ones
|
|
26
27
|
`lr-file-input` uses, shared through `internal/drop-session-controller.ts` rather than
|
|
27
28
|
reimplemented.
|
|
28
29
|
|
|
@@ -51,6 +52,15 @@ reimplemented.
|
|
|
51
52
|
allow/deny lists, identical to `lr-file-input`'s (denylist first); a mismatch rejects with `'type'`.
|
|
52
53
|
- `acceptedMessage` / `rejectedMessage: string` (attributes `accepted-message` / `rejected-message`) —
|
|
53
54
|
caller-owned outcome copy with `{count}`; unset uses the localized default.
|
|
55
|
+
- `for: string = ''` — id of an existing element, resolved in the zone's own root (like a label's
|
|
56
|
+
`for`), to attach to instead of the default slot. The zone then handles drags over that element,
|
|
57
|
+
lays its overlay over the element's box (a fixed box measured from the element, also correct
|
|
58
|
+
inside a transformed ancestor, following a region that scrolls mid-drag), adds no box of its own
|
|
59
|
+
(`display: contents`) and still emits `lr-files` from itself. An id matching nothing binds nothing
|
|
60
|
+
and is re-resolved when elements or ids in the root change, so a region rendered later is picked
|
|
61
|
+
up. The default slot is not a drop target while a target is bound.
|
|
62
|
+
- `target: Element | null = null` (property only) — the same, with an element reference; takes
|
|
63
|
+
precedence over `for` while it is connected.
|
|
54
64
|
- `readonly dragging: boolean` — `true` during an active drag session
|
|
55
65
|
- `size: LyraSize = 'm'` (reflected) — density tier for the overlay's padding, icon and
|
|
56
66
|
instructional text; identical contract and scale to `lr-file-input`'s own `size`, so a drop-zone
|
|
@@ -75,7 +85,8 @@ drag state and counts — announcements go through the shared light-DOM regions,
|
|
|
75
85
|
`lr-file-input`), `rejection` (a visible region listing each currently-rejected file, rendered only
|
|
76
86
|
while one exists).
|
|
77
87
|
|
|
78
|
-
**CSS custom states:** `dragging`, matching `lr-file-input`'s
|
|
88
|
+
**CSS custom states:** `dragging`, matching `lr-file-input`'s; `targeted` while `for`/`target`
|
|
89
|
+
resolves to an element the zone is attached to.
|
|
79
90
|
|
|
80
91
|
**Themeable custom properties:** `--lr-drop-zone-radius` (default `var(--lr-radius)`),
|
|
81
92
|
`--lr-drop-zone-overlay-border-color` (default `var(--lr-color-brand)`, the dashed overlay border in
|
|
@@ -120,8 +131,21 @@ shape, so check `event.target` when a zone-level listener must react to the zone
|
|
|
120
131
|
</lr-drop-zone>
|
|
121
132
|
```
|
|
122
133
|
|
|
134
|
+
Attaching to an existing, statically rendered region without wrapping it — the region keeps its own
|
|
135
|
+
layout tree, and the zone's script can load after first paint:
|
|
136
|
+
|
|
137
|
+
```html
|
|
138
|
+
<section id="chat-area"><!-- server-rendered chat --></section>
|
|
139
|
+
<lr-drop-zone for="chat-area" multiple></lr-drop-zone>
|
|
140
|
+
```
|
|
141
|
+
|
|
123
142
|
**Known gotchas:**
|
|
124
143
|
|
|
144
|
+
- In `for`/`target` mode the overlay is a fixed box at the content layer (`--lr-layer-content`)
|
|
145
|
+
painted in the zone's own place in the tree; when the region has positioned descendants with a
|
|
146
|
+
higher `z-index`, raise the overlay with `::part(overlay) { z-index: … }`. The overlay never takes
|
|
147
|
+
pointer events, so drags keep reaching the region. A visible `rejection` list renders where the
|
|
148
|
+
zone itself sits.
|
|
125
149
|
- No paste-from-clipboard handling (unlike `lr-file-input`, which accepts pasted files unless
|
|
126
150
|
`without-paste` is set) — this component is drag/drop only.
|
|
127
151
|
- Dragged folders are traversed recursively while `multiple` (not the default here), with the same
|
|
@@ -59,7 +59,8 @@ until `<lr-icon>` is registered by something else.
|
|
|
59
59
|
accessible name; wins over `label`
|
|
60
60
|
- `label: string = ''` — accessible name when `accessibleLabel` is unset
|
|
61
61
|
- `disabled: boolean = false` (reflected)
|
|
62
|
-
- `href?: string`, `target?: string`, `download?: string` — a safe `href`
|
|
62
|
+
- `href?: string`, `target?: string`, `download?: string` — a safe `href` (the same
|
|
63
|
+
`http:`/`https:`/`blob:`/`mailto:`/`tel:`/`sms:`/relative allowlist as `<lr-button>`) renders a native anchor;
|
|
63
64
|
`target` derives `rel="noopener noreferrer"`, and download presence (including `download=""`)
|
|
64
65
|
selects the stricter downloadable-URL allowlist. A disabled link keeps the anchor but removes
|
|
65
66
|
`href`
|
|
@@ -116,6 +116,23 @@ also apply. The flat source rows own logical treeitem semantics.
|
|
|
116
116
|
uses a `var(--lr-size-20rem)` height ceiling. Values that do not parse
|
|
117
117
|
as CSS `max-height`, contain declaration breaks, or contain `url()` are ignored, leaving
|
|
118
118
|
`--lr-json-viewer-max-height` in control
|
|
119
|
+
- `layout: 'auto' | 'inline' | 'stacked' = 'auto'` (type `LyraJsonViewerLayout`) — how a scalar row places
|
|
120
|
+
its key and value. `'auto'` keeps them side by side while the viewer's own inline size is at
|
|
121
|
+
least 30rem and stacks them below that, through a container query on the viewer's allocation
|
|
122
|
+
(not the viewport), so a viewer in a phone-width tool-call panel stacks without configuration.
|
|
123
|
+
`'stacked'` always puts the value on its own line under its key, aligned with the key, keeps
|
|
124
|
+
the per-node copy button on the key's line, and tightens rows: leaf rows drop the
|
|
125
|
+
icon-button-sized floor their hidden toggle spacer otherwise imposes and lines use the snug
|
|
126
|
+
line height, while real expand/collapse toggles keep their full hit area. `'inline'` keeps the
|
|
127
|
+
side-by-side row at every width. Unknown values fall back to `'auto'`. Applies to the `data`
|
|
128
|
+
tree; `treeSource` rows keep their fixed virtualized layout. In every layout a key offers line
|
|
129
|
+
breaks after `_`, `-`, `.`, `/`, `:` and `@` and between a lower-case and an upper-case letter,
|
|
130
|
+
so `monthly_contribution_amount` wraps between its words; a single overlong segment still breaks
|
|
131
|
+
anywhere as a last resort.
|
|
132
|
+
|
|
133
|
+
```html
|
|
134
|
+
<lr-json-viewer layout="stacked"></lr-json-viewer>
|
|
135
|
+
```
|
|
119
136
|
- `copyable: boolean = false` (reflected) — shows copy-to-clipboard affordances: one for the whole
|
|
120
137
|
value, plus one per node
|
|
121
138
|
- `query: string = ''` — with `treeSource` unset, case-insensitive substring match against
|
|
@@ -208,6 +208,11 @@ cross-document adoption closes it. A required, uncommitted value recomputes its
|
|
|
208
208
|
message when `.strings` or the effective locale changes; an author custom-validity message retains
|
|
209
209
|
priority until cleared.
|
|
210
210
|
|
|
211
|
+
Failed positioning closes the list with a non-cancelable `lr-hide` notification, then
|
|
212
|
+
`lr-after-hide` once it leaves layout. This includes replacement positioning after the list has
|
|
213
|
+
opened. A fresh opening retries positioning; an obsolete failure preserves newer geometry.
|
|
214
|
+
Ordinary connected closes remain cancelable.
|
|
215
|
+
|
|
211
216
|
**Slots:** `label`, `hint`, `error`.
|
|
212
217
|
|
|
213
218
|
**CSS parts:** `limit` (input-loss notice), `form-control`, `form-control-label`, `trigger`,
|
|
@@ -55,7 +55,8 @@ clamped to `[1, 32]` (`0` becomes `1`, `33` becomes `32`), and only non-finite v
|
|
|
55
55
|
instance's isolated peer-neutral configurable parser; `htmlMode: 'sanitize' | 'escape' | 'trusted' =
|
|
56
56
|
'sanitize'` (attribute `html-mode`), `withoutGfm: boolean = false` (attribute `without-gfm`),
|
|
57
57
|
`withoutImages: boolean = false` (attribute `without-images`), `linkTarget: string | null = '_blank'` (attribute
|
|
58
|
-
`link-target`), `
|
|
58
|
+
`link-target`), `linkSchemes?: string` (attribute `link-schemes`, the same narrowed link allowlist),
|
|
59
|
+
`internalLinkPrefix: string = ''` (attribute `internal-link-prefix`),
|
|
59
60
|
`headingOffset: number = 0` (attribute `heading-offset`), `streaming: boolean = false` (reflected),
|
|
60
61
|
`streamingRender: MarkdownStreamingRender = 'plain'` (attribute `streaming-render`, not reflected),
|
|
61
62
|
`codeBlockHeader: boolean = false` (attribute `code-block-header`),
|
|
@@ -101,6 +101,19 @@ uses for its own `[part="body"]`.
|
|
|
101
101
|
emitted. `'_blank'` (the default) preserves the original output; a falsy value (`null`, or the
|
|
102
102
|
empty string via `link-target=""`) omits `target`/`rel` entirely instead of always defaulting to
|
|
103
103
|
`_blank`, so rendered links open in the same tab
|
|
104
|
+
- `linkSchemes?: string` (attribute `link-schemes`) — narrows which link destinations may become
|
|
105
|
+
anchors. A space- or comma-separated list of `http`, `https`, `blob`, `mailto` and `relative`
|
|
106
|
+
(a URL with no scheme of its own: a path, query, fragment or scheme-relative `//host` URL, which
|
|
107
|
+
inherits the page's scheme). Tokens are case-insensitive and may end in `:`. Unset (the default)
|
|
108
|
+
keeps the standard allowlist below. Any other token (`data`, `javascript`, a typo) is ignored, so
|
|
109
|
+
the list can only narrow that allowlist, never widen it; a list with no recognised token,
|
|
110
|
+
including `link-schemes=""`, allows no link at all. A refused link fails closed: it renders as its
|
|
111
|
+
plain text, never as an anchor. When set, it applies in every `htmlMode`, `trusted` included, to
|
|
112
|
+
Markdown links and GFM autolinks and, after sanitization, to raw-HTML and SVG `<a>` elements
|
|
113
|
+
(unwrapped to their content) and `<area>` elements (removed). Sanitization itself is unchanged.
|
|
114
|
+
Images are governed by `withoutImages`, not by this list. Changing it re-renders.
|
|
115
|
+
`<lr-markdown link-schemes="https"></lr-markdown>` keeps only `https:` links;
|
|
116
|
+
`link-schemes="https relative"` also keeps same-site paths.
|
|
104
117
|
- `internalLinkPrefix: string = ''` (attribute `internal-link-prefix`) — when set, a rendered link
|
|
105
118
|
whose `href` _attribute_ (not the browser-resolved `.href` property) starts with this prefix is
|
|
106
119
|
intercepted on click and reported via `lr-link-activate` instead of navigating; empty (the default)
|
|
@@ -234,7 +247,8 @@ defers highlighting until completion; progressive streaming highlights settled b
|
|
|
234
247
|
light-DOM `MutationObserver` on that container can never see a property-driven update rendered
|
|
235
248
|
entirely inside this element's own shadow root. See `<lr-thinking-panel>`'s own reference at `llms/components/lr-thinking-panel.md`.
|
|
236
249
|
- `lr-copy` and `lr-copy-error` — the fulfilled and failed clipboard outcomes from the optional
|
|
237
|
-
code-block copy chrome; both bubble and are composed.
|
|
250
|
+
code-block copy chrome; both bubble and are composed. If an outcome listener disconnects the
|
|
251
|
+
element, disables the header, or starts another copy, superseded feedback is canceled.
|
|
238
252
|
**Slots:** none — content comes from the `content` property, not light-DOM children.
|
|
239
253
|
|
|
240
254
|
**CSS parts:** `content` (the wrapper around the rendered or plain-text-fallback output; respects
|
|
@@ -376,12 +390,14 @@ can cover the other. Both surfaces use `white-space: pre` and scroll horizontall
|
|
|
376
390
|
`encodeURI`-based validity guard throw, silently dropping just that anchor (the link text still
|
|
377
391
|
renders, with no `href`) — mirrors `marked`'s own default `link()` renderer's defensive behavior.
|
|
378
392
|
- every rendered link/image `href`/`src` is additionally scheme-checked against the same allowlist
|
|
379
|
-
`<lr-
|
|
380
|
-
relative URLs — plus `data:` for images only
|
|
393
|
+
`<lr-card>` uses for a navigation `href` (`http:`, `https:`, `blob:`, `mailto:`, and
|
|
394
|
+
relative URLs — plus `data:` for images only; the `tel:`/`sms:` handoffs `<lr-button>` accepts on
|
|
395
|
+
an author-written `href` are not admitted here), independently of `htmlMode` — `sanitize` and
|
|
381
396
|
`escape` both reject a disallowed scheme (e.g. `javascript:`) by dropping the anchor/image and
|
|
382
397
|
rendering only its text/alt content, exactly like the malformed-`href` case above; only
|
|
383
398
|
`html-mode="trusted"` skips this check, consistent with its documented full bypass. The allowlist
|
|
384
|
-
does not stop an allowed image URL from being fetched; set `without-images` for that.
|
|
399
|
+
does not stop an allowed image URL from being fetched; set `without-images` for that. To narrow
|
|
400
|
+
the link half of it (for example to `https:` only), set `link-schemes`.
|
|
385
401
|
- `target` is not in DOMPurify's default attribute allowlist (unlike `part`/`rel`/`class`, which
|
|
386
402
|
already are), so sanitization is called with `ADD_ATTR: ['target']` — without that, every rendered
|
|
387
403
|
link's `target` would be silently stripped by sanitization even though the anchor itself survives.
|
|
@@ -30,7 +30,7 @@ For a menu button or other anchored overlay, compose the semantic controller ins
|
|
|
30
30
|
`<lr-dropdown>`:
|
|
31
31
|
|
|
32
32
|
```html
|
|
33
|
-
<lr-dropdown label="Row actions">
|
|
33
|
+
<lr-dropdown aria-label="Row actions">
|
|
34
34
|
<button slot="trigger" aria-label="Row actions">⋮</button>
|
|
35
35
|
<lr-menu>
|
|
36
36
|
<lr-menu-item value="edit">Edit</lr-menu-item>
|
|
@@ -43,6 +43,8 @@ The dropdown shell owns trigger relationships, positioning, opening/closing, out
|
|
|
43
43
|
focus return, and lifecycle events. The contained menu remains the sole semantic owner: its
|
|
44
44
|
`header`/default/`footer` regions and named `role="menu"` list are preserved, while the outer popup
|
|
45
45
|
is neutral. This is also the composition used for direct `<lr-dropdown-item>` children.
|
|
46
|
+
The trigger's `aria-label` names its button. The dropdown's `aria-label` supplies the contained
|
|
47
|
+
menu's fallback name; a `label` or `aria-label` on the menu itself takes precedence.
|
|
46
48
|
|
|
47
49
|
### `lr-menu`
|
|
48
50
|
|
|
@@ -27,6 +27,31 @@ synchronous call, including changes made immediately beforehand. They preserve n
|
|
|
27
27
|
and bounds, update form submission silently, and remain no-ops before the native input has rendered
|
|
28
28
|
or while disabled/readonly. Native `step="any"` remains a non-steppable no-op.
|
|
29
29
|
|
|
30
|
+
**Locale-aware entry (`localized`).** `localized: boolean = false` (attribute `localized`,
|
|
31
|
+
reflected) reads and shows numbers with the grouping and decimal separators of the effective locale
|
|
32
|
+
(`lang`/`locale`): in `de` or `ro`, typing `25.000` gives twenty-five thousand and `10,24` gives ten
|
|
33
|
+
point two four. `value`, the submitted form value and `valueAsNumber` keep the native
|
|
34
|
+
`type="number"` form (`25000`, `10.24`), so the server and the `value`/`default-value` attributes
|
|
35
|
+
always use `.` and no grouping; a prefilled `value="1234567.5"` displays `1.234.567,5` in `de`.
|
|
36
|
+
Range, step and required validity come from a detached native number input given the parsed value,
|
|
37
|
+
so `min`/`max`/`step` and the browser's validation messages behave as on the default field. Grouping
|
|
38
|
+
is checked rather than ignored: text the locale would not write (`10.24` in `de`, `10,24` in `en`,
|
|
39
|
+
`1,234,567` in `en-IN`) reports `badInput` and leaves `value` empty instead of misreading the
|
|
40
|
+
entry. Any space counts as the group of a space-grouping locale (`fr`), and locale digits
|
|
41
|
+
(`ar-EG`) are accepted. Typed text stays as entered until `change` or blur, which re-format it;
|
|
42
|
+
stepping and programmatic writes re-format immediately, and a locale change re-formats the shown
|
|
43
|
+
value. The internal input becomes a text field with `role="spinbutton"`, `aria-valuenow`,
|
|
44
|
+
`aria-valuetext` and `aria-valuemin`/`aria-valuemax`, and ArrowUp/ArrowDown step the value with
|
|
45
|
+
the same `input`/`lr-input`/`change`/`lr-change` sequence as a stepper click. The default
|
|
46
|
+
`inputmode="numeric"` is unchanged; set `inputmode="decimal"` when fractions are expected so touch
|
|
47
|
+
keyboards offer the separator. Unset, the field is the native number input, unchanged.
|
|
48
|
+
|
|
49
|
+
```html
|
|
50
|
+
<lr-number-input lang="de" localized label="Betrag" name="amount" step="0.01" inputmode="decimal"
|
|
51
|
+
value="25000"></lr-number-input>
|
|
52
|
+
<!-- shows 25.000; submits amount=25000 -->
|
|
53
|
+
```
|
|
54
|
+
|
|
30
55
|
Changing own `disabled` from true to false in the same task that disables an ancestor fieldset keeps
|
|
31
56
|
the native editing control effectively disabled. The enabled first-legend exception and explicit
|
|
32
57
|
own-disabled state retain their native meaning; validity and form submission follow the effective
|
|
@@ -170,7 +195,9 @@ The exact-320px RTL story keeps long label/hint copy and both fixed-size stepper
|
|
|
170
195
|
- `clearable`/`clear-button`/`lr-clear` are inert: the clear action only renders for
|
|
171
196
|
`type="text"`/`"search"`. `password-visible`/`password-toggle` are likewise inert, since the
|
|
172
197
|
toggle only renders for `type="password"`. `minlength`/`maxlength`/`pattern` are inert too — the
|
|
173
|
-
platform ignores all three on `type="number"`; use `min`/`max`/`step` instead.
|
|
198
|
+
platform ignores all three on `type="number"`; use `min`/`max`/`step` instead. With `localized`,
|
|
199
|
+
the internal input is a text field, so `maxlength` does limit typing there; validity still ignores
|
|
200
|
+
all three.
|
|
174
201
|
- `type` is re-forced to `number` on every connect, but a later `el.type = 'text'` on a connected
|
|
175
202
|
element is not reverted — use `lr-input` when the type has to change.
|
|
176
203
|
|
|
@@ -34,7 +34,7 @@ their corresponding data can be supplied. The default entry registers all childr
|
|
|
34
34
|
`withoutEnterSubmit: boolean = false` (attribute `without-enter-submit`);
|
|
35
35
|
`submitDisabled: boolean = false` (attribute `submit-disabled`), `withoutStop: boolean = false`
|
|
36
36
|
(attribute `without-stop`), `minRows: number = 1` (attribute `min-rows`) and `maxRows: number = 8`
|
|
37
|
-
(attribute `max-rows`), `frame: 'card' | 'plain' = 'card'` and `actionsLayout: 'inline' | 'stacked' = 'inline'`
|
|
37
|
+
(attribute `max-rows`), `frame: 'card' | 'plain' = 'card'` and `actionsLayout: 'inline' | 'stacked' | 'below' = 'inline'`
|
|
38
38
|
(attribute `actions-layout`) forward to the composed `lr-chat-composer` with its semantics, and a slotted
|
|
39
39
|
`toolbar` child is forwarded to the composer's `toolbar` slot;
|
|
40
40
|
`spellcheck: boolean = true` (string-aware true-default converter), `autocapitalize: string = ''`,
|
|
@@ -20,7 +20,7 @@ A build-lean `<lr-streaming-text>` variant for a consumer whose fenced-code `lan
|
|
|
20
20
|
covers every language it will ever stream, or who never renders fenced code at all. Every
|
|
21
21
|
capability — token coalescing, `contentMode` auto-detection, the blinking cursor, the
|
|
22
22
|
`lr-content-settled` event, the `languages` property, and the full forwarded Markdown configuration
|
|
23
|
-
surface (`tabSize`, `htmlMode`, `withoutGfm`, `withoutImages`, `linkTarget`, `internalLinkPrefix`, `headingOffset`,
|
|
23
|
+
surface (`tabSize`, `htmlMode`, `withoutGfm`, `withoutImages`, `linkTarget`, `linkSchemes`, `internalLinkPrefix`, `headingOffset`,
|
|
24
24
|
`withoutSyntaxHighlighting`, `headingAnchors`, `math`, `maxHeight`) — is identical to `<lr-streaming-text>`;
|
|
25
25
|
only which Markdown element Markdown mode composes differs: this variant renders
|
|
26
26
|
`<lr-markdown-core>` (`../markdown/markdown-core.js`) instead of `<lr-markdown>`, so importing this
|
|
@@ -48,7 +48,8 @@ attribute names, and defaults described under `<lr-streaming-text>`'s own **Prop
|
|
|
48
48
|
'sanitize'` (attribute `html-mode`); `withoutGfm: boolean = false` (attribute `without-gfm`);
|
|
49
49
|
`withoutImages: boolean = false` (attribute `without-images`); `linkTarget: string | null = '_blank'`
|
|
50
50
|
(attribute `link-target`, still guarded by the composed element's own
|
|
51
|
-
`rel="noopener noreferrer"` whenever a `target` is emitted); `
|
|
51
|
+
`rel="noopener noreferrer"` whenever a `target` is emitted); `linkSchemes?: string` (attribute
|
|
52
|
+
`link-schemes`); `internalLinkPrefix: string = ''`
|
|
52
53
|
(attribute `internal-link-prefix`); `headingOffset: number = 0` (attribute `heading-offset`);
|
|
53
54
|
`streamingRender: MarkdownStreamingRender = 'plain'` (attribute `streaming-render`, not reflected);
|
|
54
55
|
`codeBlockHeader: boolean = false` (attribute `code-block-header`); `withoutSyntaxHighlighting: boolean = false` (attribute
|
|
@@ -64,6 +64,9 @@ properties existed:
|
|
|
64
64
|
`<lr-markdown>`'s own `linkTarget`; the composed element always applies its own
|
|
65
65
|
`rel="noopener noreferrer"` guard whenever a `target` is emitted, including a forwarded
|
|
66
66
|
non-default value, and never a bare `opener`.
|
|
67
|
+
- `linkSchemes?: string` (attribute `link-schemes`) — forwarded to the composed `<lr-markdown>`'s
|
|
68
|
+
own `linkSchemes`; `link-schemes="https"` keeps only `https:` links in streamed model output and
|
|
69
|
+
renders every other link as plain text.
|
|
67
70
|
- `internalLinkPrefix: string = ''` (attribute `internal-link-prefix`) — forwarded to the composed
|
|
68
71
|
`<lr-markdown>`'s own `internalLinkPrefix`.
|
|
69
72
|
- `headingOffset: number = 0` (attribute `heading-offset`) — forwarded to the composed
|
|
@@ -169,7 +172,7 @@ showing the previous stream's stale final content for the length of the window.
|
|
|
169
172
|
Rendering itself is never reimplemented here: Markdown mode composes `<lr-markdown>` directly,
|
|
170
173
|
forwarding this component's own `streaming` through as that component's `streaming` hint prop,
|
|
171
174
|
`streamingRender`, `codeBlockHeader`, `languages` verbatim, and the rest of `<lr-markdown>`'s
|
|
172
|
-
configuration surface verbatim too (`tabSize`, `htmlMode`, `withoutGfm`, `withoutImages`, `linkTarget`,
|
|
175
|
+
configuration surface verbatim too (`tabSize`, `htmlMode`, `withoutGfm`, `withoutImages`, `linkTarget`, `linkSchemes`,
|
|
173
176
|
`internalLinkPrefix`, `headingOffset`, `withoutSyntaxHighlighting`, `headingAnchors`, `math`, `maxHeight` —
|
|
174
177
|
see **Properties** above); plain-text mode
|
|
175
178
|
renders into a `white-space: pre-wrap` span instead. The
|
|
@@ -25,12 +25,17 @@ identifier disappears, focus repairs to the nearest surviving occurrence without
|
|
|
25
25
|
external focus move.
|
|
26
26
|
|
|
27
27
|
**Properties:** `suggestions: readonly LyraChatSuggestion[] = []` (attribute: false) —
|
|
28
|
-
`LyraChatSuggestion { suggestionId: string; label: string; icon?: string; detail?: string; disabled?: boolean }`
|
|
28
|
+
`LyraChatSuggestion { suggestionId: string; label: string; icon?: string; iconName?: string; iconLibrary?: string; detail?: string; disabled?: boolean }`
|
|
29
29
|
(exported here). Identifiers must be nonempty and unique; invalid/later duplicates are omitted with
|
|
30
30
|
the first valid occurrence winning. The input is clone-owned, bounded, and frozen; reassign a new
|
|
31
|
-
array after changing the sequence or a row.
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
array after changing the sequence or a row. Each chip can show one decorative icon before its
|
|
32
|
+
text, in increasing precedence: `icon`, an optional literal hint (for example, an emoji) rendered as
|
|
33
|
+
text, so SVG or other markup in it is shown verbatim and never parsed; `iconName` (with optional
|
|
34
|
+
`iconLibrary`, a registered `lr-icon` library; omitted uses the default set), rendered as an
|
|
35
|
+
`<lr-icon>`; or a light-DOM element assigned to the per-suggestion `icon-<suggestionId>` slot, such
|
|
36
|
+
as an inline `<svg>` or `<lr-icon>`. A slotted `<svg>` without its own `width` is sized to `1em`.
|
|
37
|
+
Icons are always `aria-hidden`; the chip's accessible name stays its `label`. `detail` is an
|
|
38
|
+
optional secondary line. `disabled` marks a suggestion non-actionable: its chip
|
|
34
39
|
renders a genuinely disabled `<button>` (no roving tab stop, no hover/press affordance), activating
|
|
35
40
|
it emits nothing, and arrow-key/Home/End roving navigation steps past it. Empty renders nothing at
|
|
36
41
|
all. `wrap: boolean = false`
|
|
@@ -40,9 +45,13 @@ explicit empty string intentionally leaves the group unnamed.
|
|
|
40
45
|
|
|
41
46
|
**Events:** `lr-suggestion-select` — `detail: { suggestionId, label }`.
|
|
42
47
|
|
|
48
|
+
**Slots:** `icon-<suggestionId>` — decorative icon for the suggestion with that `suggestionId`
|
|
49
|
+
(`slot="icon-a"` for `suggestionId: 'a'`); it replaces that suggestion's `iconName`/`icon`, and the
|
|
50
|
+
fallback returns when the slotted element is removed.
|
|
51
|
+
|
|
43
52
|
**CSS parts:** `base` (the labeled group), `row` (the flex container holding the chips, present in
|
|
44
53
|
both the wrapping and the scrolling layout), `chip` (each suggestion button), `chip-icon` (the
|
|
45
|
-
optional decorative literal icon), `chip-label` (the primary text), `chip-detail` (the secondary
|
|
54
|
+
optional decorative icon wrapper: literal `icon`, `iconName` icon or slotted icon), `chip-label` (the primary text), `chip-detail` (the secondary
|
|
46
55
|
line, only rendered when `detail` is set).
|
|
47
56
|
|
|
48
57
|
**Themeable custom properties:** `--lr-suggestion-chips-justify` (default `flex-start`) — main-axis
|
|
@@ -77,3 +86,17 @@ Enter/Space activate. Renders inside an internal `lr-scroller` (`orientation="ho
|
|
|
77
86
|
chips.addEventListener("lr-suggestion-select", (e) => (composer.value = e.detail.label));
|
|
78
87
|
</script>
|
|
79
88
|
```
|
|
89
|
+
|
|
90
|
+
Vector icons per chip, by name or by slot:
|
|
91
|
+
|
|
92
|
+
```html
|
|
93
|
+
<lr-suggestion-chips id="starters">
|
|
94
|
+
<svg slot="icon-chart" viewBox="0 0 8 8"><circle cx="4" cy="4" r="4"></circle></svg>
|
|
95
|
+
</lr-suggestion-chips>
|
|
96
|
+
<script type="module">
|
|
97
|
+
document.querySelector("#starters").suggestions = [
|
|
98
|
+
{ suggestionId: "search", label: "Search the docs", iconName: "search" },
|
|
99
|
+
{ suggestionId: "chart", label: "Chart last week" },
|
|
100
|
+
];
|
|
101
|
+
</script>
|
|
102
|
+
```
|
|
@@ -97,7 +97,19 @@ selection.
|
|
|
97
97
|
|
|
98
98
|
**Methods:** `show(name: string): void` activates the matching enabled tab through the same
|
|
99
99
|
`lr-tab-hide` then `lr-tab-show` sequence as pointer/keyboard selection. Unknown, disabled, and
|
|
100
|
-
already-active names are no-ops.
|
|
100
|
+
already-active names are no-ops. `focusTab(name: string, options?: FocusOptions): boolean` moves
|
|
101
|
+
keyboard focus to the real `role="tab"` button of the matching enabled, non-inert tab and moves the
|
|
102
|
+
roving `tabindex` with it — for example after `show(name)`, or when closing an overlay opened from a
|
|
103
|
+
tab. Under `activation="auto"` focus and selection move together, so focusing an unselected tab
|
|
104
|
+
also selects it exactly as `show()` does (`lr-tab-hide`/`lr-tab-show`, never `lr-activate`); under
|
|
105
|
+
`activation="manual"` only focus moves. It returns `false` and changes nothing for an unknown,
|
|
106
|
+
disabled or inert name, or for a tab added since the group last read its children (await
|
|
107
|
+
`updateComplete` first). Calling `focus()` on an `<lr-tab>` descriptor does the same for that tab.
|
|
108
|
+
|
|
109
|
+
```js
|
|
110
|
+
group.show("activity");
|
|
111
|
+
group.focusTab("activity");
|
|
112
|
+
```
|
|
101
113
|
|
|
102
114
|
**Overflow and scrolling.** The tablist is a native scroll container (`overflow-x: auto`). A
|
|
103
115
|
horizontal row that does not fit additionally gets two pointer scroll controls flanking it inside
|
|
@@ -31,6 +31,11 @@ prevents activation; `active: boolean = false` (reflected) — SSR selection hin
|
|
|
31
31
|
the owning group after hydration; `closable: boolean = false` (reflected) — shows the mapped close
|
|
32
32
|
affordance.
|
|
33
33
|
|
|
34
|
+
**Methods:** `focus(options?: FocusOptions): void` forwards to the owning group's real tab button,
|
|
35
|
+
exactly as the group's `focusTab(panel)` (under `activation="auto"` that also selects the tab); a
|
|
36
|
+
disabled or inert tab, or a descriptor outside an upgraded group, is not focusable and is left
|
|
37
|
+
alone. `blur(): void` removes focus from that button when it has it.
|
|
38
|
+
|
|
34
39
|
**Events:** `lr-close` (no detail) — the Lyra-convention mapping of Shoelace's `sl-close`, emitted
|
|
35
40
|
when the close affordance is clicked or Delete is pressed on the focused owning tab. It bubbles, is
|
|
36
41
|
composed and noncancelable. A disabled tab never emits it. The tab never removes itself or its
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
- **Release history** [CHANGELOG.md](../../CHANGELOG.md)
|
|
10
10
|
- **Deprecations** none
|
|
11
11
|
- **Optional peers** none
|
|
12
|
-
- **Themeable via**
|
|
12
|
+
- **Themeable via** 57 parts, 27 custom properties — see this component's own `@csspart`/`@cssprop` list below
|
|
13
13
|
- **Library-wide behavior** (events, form association, `locale`/`strings`, tokens, TS types): `llms/shared.md`
|
|
14
14
|
|
|
15
15
|
---
|
|
@@ -51,9 +51,28 @@ resizable?, sortable?, sortValue?, defaultSortDir?: 'asc'|'desc', align?: 'start
|
|
|
51
51
|
priority?: 'medium'|'low',
|
|
52
52
|
sticky?: 'start'|'end', editTrigger?: 'double-click'|'always', editValue?, editLabel?: (row) => string,
|
|
53
53
|
editType?: 'text'|'number'|'select',
|
|
54
|
-
editOptions?: { value: string; label: string }[], footer?, cellStyle?, heatValue?,
|
|
54
|
+
editOptions?: { value: string; label: string }[], footer?, cellStyle?, cellPart?, heatValue?,
|
|
55
55
|
cell: (row) => unknown }` — `cell` is required for every `editTrigger` except `'always'`, whose
|
|
56
|
-
persistent editor renders unconditionally so the table's render path never falls back to it
|
|
56
|
+
persistent editor renders unconditionally so the table's render path never falls back to it.
|
|
57
|
+
**`cell()` output renders inside the table's shadow root**, so class rules from the page or from
|
|
58
|
+
the component that owns the table never reach it (only inherited properties and custom
|
|
59
|
+
properties cross): ``cell: () => html`<span class="muted">…</span>` `` stays unstyled by the
|
|
60
|
+
owner's `.muted` rule. Style cell content from outside with `::part()` instead —
|
|
61
|
+
`cellPart(row) => string | undefined` wraps that column's resting content in a `display: block`
|
|
62
|
+
`[part~='cell-content']` element that also carries every whitespace-separated name returned
|
|
63
|
+
(non-string results are ignored; no wrapper renders when `cellPart` is omitted, and none inside
|
|
64
|
+
an open inline editor), and a `part` attribute written inside a `cell()` template is equally a
|
|
65
|
+
part of the table. Prefix those names (`cell-…`) so they never collide with the table's own parts:
|
|
66
|
+
|
|
67
|
+
```ts
|
|
68
|
+
columns = [{ key: 'name', label: 'Name',
|
|
69
|
+
cellPart: (row) => (row.archived ? 'cell-archived' : undefined),
|
|
70
|
+
cell: (row) => html`${row.name}<span part="cell-secondary">${row.owner}</span>` }];
|
|
71
|
+
// in the owner's stylesheet
|
|
72
|
+
// lr-table::part(cell-archived) { opacity: 0.7; }
|
|
73
|
+
// lr-table::part(cell-secondary) { display: block; color: var(--lr-color-text-quiet); }
|
|
74
|
+
```
|
|
75
|
+
—
|
|
57
76
|
`ariaLabel` overrides that column header's accessible name (applied as the `<th>`'s `aria-label`
|
|
58
77
|
whenever set) — e.g. an icon-only `headerCell` with no plain-text `label` to fall back on; when
|
|
59
78
|
`label` is blank (or whitespace-only) and `ariaLabel` is also omitted, the header's accessible
|
|
@@ -519,7 +538,9 @@ geometrically identical to real rows, so `skeleton` is the part to target for th
|
|
|
519
538
|
look: `::part(skeleton) { --lr-skeleton-h: 2em; }`), and
|
|
520
539
|
`pagination` (the pager host; re-exported as `pagination-summary`,
|
|
521
540
|
`pagination-controls`, `pagination-pages`, `pagination-page`, `pagination-page-current`,
|
|
522
|
-
`pagination-page-field`, `pagination-page-input`, `pagination-page-count`, `pagination-button`), `cell-editor`,
|
|
541
|
+
`pagination-page-field`, `pagination-page-input`, `pagination-page-count`, `pagination-button`), `cell-editor`,
|
|
542
|
+
`cell-content` (the block wrapper around a body cell's resting content, rendered only for a column
|
|
543
|
+
defining `cellPart(row)`, which also carries every name that callback returns), `group-row`, `group-cell`, and `resize-handle` (the focusable column
|
|
523
544
|
separator, with a finite explicit ARIA maximum even when no CSS `maxWidth` was supplied). The built-in empty state is addressable rather than fixed: `empty` is the `<lr-empty>`
|
|
524
545
|
host in all three empty states, and it re-exports that element's own inner parts as `empty-base`,
|
|
525
546
|
`empty-icon`, `empty-heading`, `empty-description` and `empty-actions`. Note that the no-columns and
|
|
@@ -9,6 +9,6 @@
|
|
|
9
9
|
- **Release history** [CHANGELOG.md](../../CHANGELOG.md)
|
|
10
10
|
- **Deprecations** none
|
|
11
11
|
- **Optional peers** none
|
|
12
|
-
- **Themeable via**
|
|
12
|
+
- **Themeable via** 12 parts, 9 custom properties — see `lr-timeline.md`
|
|
13
13
|
- **Documented with** `lr-timeline`: see [lr-timeline.md](./lr-timeline.md).
|
|
14
14
|
- **Library-wide behavior** (events, form association, `locale`/`strings`, tokens, TS types): `llms/shared.md`
|
|
@@ -69,6 +69,35 @@ Cluster windows are bounded from their first sorted position rather than transit
|
|
|
69
69
|
dense neighbour, so a large history becomes a useful sequence of markers rather than one axis-wide
|
|
70
70
|
cluster. An isolated item remains an ordinary timeline item. Activating a count marker is a
|
|
71
71
|
notification only; it never expands or selects items internally.
|
|
72
|
+
`ordered: boolean = false` (reflected) presents the items as an ordered sequence of steps:
|
|
73
|
+
`[part='base']` becomes a native `<ol>` (with an explicit `role="list"`, which WebKit otherwise
|
|
74
|
+
drops from an unstyled list), and each item's marker shows its step number as real, readable text
|
|
75
|
+
in `[part='marker-number']` — formatted for the item's effective locale and exposed to assistive
|
|
76
|
+
technology — instead of the decorative dot, so titles need not repeat "Step 1". The marker becomes
|
|
77
|
+
a ring (`--lr-timeline-marker-color` border, transparent fill, `--lr-timeline-marker-number-color`
|
|
78
|
+
text, default size `var(--lr-size-1-5rem)` that widens for a long number) and replaces the
|
|
79
|
+
`marker-icon` slot. Numbering follows document order, renumbers when items are added, removed or
|
|
80
|
+
reordered, clears a removed item's number, and works with every orientation and scale.
|
|
81
|
+
`start: number = 1` sets the first step number, like a native `<ol start>`; a non-finite value
|
|
82
|
+
numbers from 1 and fractions truncate. Ignored unless `ordered`.
|
|
83
|
+
|
|
84
|
+
```html
|
|
85
|
+
<lr-timeline ordered aria-label="Permit application">
|
|
86
|
+
<lr-timeline-item>Submit the form<span slot="timestamp">by 3 March</span></lr-timeline-item>
|
|
87
|
+
<lr-timeline-item>Pay the fee<span slot="description">Within ten working days.</span></lr-timeline-item>
|
|
88
|
+
<lr-timeline-item>Collect the permit</lr-timeline-item>
|
|
89
|
+
</lr-timeline>
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
**Before upgrade:** with `@aceshooting/lyra-ui/reservations.css` (or the adoptable
|
|
93
|
+
`reservationStyles`) loaded, a server-rendered vertical flow timeline already has its upgraded
|
|
94
|
+
layout before any script runs: each item reserves the marker column, paints its marker and trailing
|
|
95
|
+
rail from the timeline's own tokens (the one place that stylesheet paints color), floats a slotted
|
|
96
|
+
`timestamp` to the inline end of the title line and places a slotted `description` beneath it. An
|
|
97
|
+
`ordered` timeline numbers its markers with a CSS counter from 1; for another `start`, also set
|
|
98
|
+
`style="counter-reset: lr-timeline-step N"` where N is `start - 1`. Write the title text first, then
|
|
99
|
+
the slotted elements. The step numbers become real text, and the list semantics apply, once the
|
|
100
|
+
definitions load. Horizontal and `scale="time"` timelines are not reserved.
|
|
72
101
|
`rangeStart` / `rangeEnd` (`Date | string | number`, attribute: false) pin the axis instead of
|
|
73
102
|
deriving it from the earliest/latest item; a reversed or non-finite pair falls back to the derived
|
|
74
103
|
range. An item with no parseable `timestamp` (including one supplied only through the `timestamp`
|
|
@@ -107,11 +136,14 @@ slot falls back to a color-coded dot), `timestamp` (wins outright over the
|
|
|
107
136
|
`timestamp` property whenever it has assigned content), and `description` (its part is hidden
|
|
108
137
|
entirely when empty).
|
|
109
138
|
|
|
110
|
-
**CSS parts:** timeline `base` — the `role="list"` flex container (no separate `list` part
|
|
139
|
+
**CSS parts:** timeline `base` — the `role="list"` flex container (no separate `list` part; an
|
|
140
|
+
`<ol>` while `ordered`). Item:
|
|
111
141
|
`cluster` — the native count button rendered while that item represents a cluster, with a 40px
|
|
112
142
|
minimum action surface; `cluster-count` — its painted count pill; `base`, `track`
|
|
113
143
|
(marker + rail spine, always the opposite axis from `base`), `marker`
|
|
114
|
-
(`aria-hidden="true"`, decorative
|
|
144
|
+
(`aria-hidden="true"`, decorative — except inside an `ordered` timeline, where it is the exposed
|
|
145
|
+
ring around the number), `marker-number` (the step number text, only inside an `ordered`
|
|
146
|
+
timeline), `rail` (the connecting segment; `visibility: hidden` rather than
|
|
115
147
|
removed on the last item, so marker alignment stays consistent), `content`, `header` (flex row
|
|
116
148
|
wrapping `title` and `timestamp`; wraps at narrow widths rather than truncating), `title`,
|
|
117
149
|
`timestamp` (hidden when there's nothing to show), `description`.
|
|
@@ -127,9 +159,11 @@ scrolling. On the item: `--lr-timeline-marker-size`
|
|
|
127
159
|
(default `var(--lr-size-1-25rem)`, both dimensions so the dot stays circular),
|
|
128
160
|
`--lr-timeline-rail-width` (default `var(--lr-border-width-medium)`), `--lr-timeline-rail-color`
|
|
129
161
|
(default `var(--lr-color-border-subtle)`), `--lr-timeline-marker-color` (default
|
|
130
|
-
`var(--lr-color-text-quiet)`, with a private default that changes per `variant`),
|
|
162
|
+
`var(--lr-color-text-quiet)`, with a private default that changes per `variant`),
|
|
163
|
+
`--lr-timeline-marker-number-color` (default `var(--lr-color-text)`, the step number inside an
|
|
164
|
+
`ordered` timeline's marker ring; the marker size defaults to `var(--lr-size-1-5rem)` there), and
|
|
131
165
|
`--lr-timeline-active-ring-color`
|
|
132
|
-
(defaults to the effective marker color). All
|
|
166
|
+
(defaults to the effective marker color). All six item hooks inherit from theme
|
|
133
167
|
ancestors; setting one directly on an item wins over both the inherited value and variant default.
|
|
134
168
|
|
|
135
169
|
Version 9 removes the legacy item `icon` slot; migrate marker glyphs to `slot="marker-icon"`.
|
|
@@ -82,7 +82,9 @@ later text renders normally.
|
|
|
82
82
|
`arrowPlacement: 'anchor'|'start'|'end'|'center' = 'anchor'` (attribute `arrow-placement`) and
|
|
83
83
|
`arrowPadding: number = 0` (attribute `arrow-padding`) — the same arrow trio `<lr-popover>`
|
|
84
84
|
documents (`llms/components/lr-popover.md`).
|
|
85
|
-
- `content: string = ''` — plain-text tooltip content, used when nothing is slotted
|
|
85
|
+
- `content: string = ''` — plain-text tooltip content, used when nothing is slotted. Whitespace-only
|
|
86
|
+
text in the content slot (template indentation around a `slot="trigger"` element) counts as
|
|
87
|
+
nothing, so `content` still paints and describes the trigger.
|
|
86
88
|
- `accessibleLabel: string = ''` (attribute **`aria-label`**) — a host `aria-label` wins by
|
|
87
89
|
attribute presence, including an explicitly empty value. When the attribute is absent, an
|
|
88
90
|
actionable popup with no property label uses the localized `popover` string.
|