@aceshooting/lyra-ui 21.0.0 → 21.1.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 +56 -0
- package/README.md +6 -3
- package/custom-elements.json +1 -1
- package/dist/ai/runtime.js +1 -1
- package/dist/ai/types.d.ts +13 -5
- package/dist/cli/lyra-rename-ledger.mjs +1 -0
- package/dist/cli/migrate-wa.mjs +33 -13
- package/dist/cli/migration-contract.json +1 -1
- package/dist/components/agent-tools/agent-trace/agent-trace.class.d.ts +5 -3
- package/dist/components/agent-tools/agent-trace/agent-trace.class.js +3 -2
- package/dist/components/agent-tools/tool-call-block/tool-call-block.class.d.ts +15 -3
- package/dist/components/agent-tools/tool-call-block/tool-call-block.class.js +3 -3
- package/dist/components/agent-tools/tool-call-chip/tool-call-chip.class.d.ts +24 -8
- package/dist/components/agent-tools/tool-call-chip/tool-call-chip.class.js +3 -3
- package/dist/components/agent-tools/tool-param-form/tool-param-form.class.js +4 -0
- package/dist/components/agent-tools/tool-result-dialog/tool-result-dialog.class.d.ts +9 -5
- package/dist/components/agent-tools/tool-result-dialog/tool-result-dialog.class.js +2 -2
- package/dist/components/agent-tools/tool-result-dialog/tool-result-dialog.styles.js +1 -1
- package/dist/components/agent-tools/tool-status.js +2 -2
- package/dist/components/agent-tools/tool-timeline/tool-timeline.class.d.ts +8 -0
- package/dist/components/agent-tools/tool-timeline/tool-timeline.class.js +3 -2
- package/dist/components/agent-tools/tool-timeline/tool-timeline.styles.js +1 -1
- package/dist/components/agent-tools/trace-tree/span.d.ts +2 -2
- package/dist/components/charts/chart/box-plot.class.d.ts +3 -1
- package/dist/components/charts/chart/box-plot.class.js +9 -9
- package/dist/components/charts/chart/chart-bidi.d.ts +109 -0
- package/dist/components/charts/chart/chart-bidi.js +1 -0
- package/dist/components/charts/chart/chart.class.d.ts +17 -2
- package/dist/components/charts/chart/chart.class.js +10 -8
- package/dist/components/charts/chart/histogram.class.js +1 -1
- package/dist/components/charts/chart/lite-chart.class.d.ts +24 -5
- package/dist/components/charts/chart/lite-chart.class.js +9 -9
- package/dist/components/charts/chart/lite-chart.styles.js +1 -1
- package/dist/components/conversation/code-block/shiki-dark-theme.d.ts +2 -2
- package/dist/components/conversation/code-block/shiki-dark-theme.js +1 -1
- package/dist/components/conversation/conversation-item/conversation-item.class.d.ts +18 -2
- package/dist/components/conversation/conversation-item/conversation-item.class.js +3 -3
- package/dist/components/conversation/conversation-item/conversation-item.styles.js +1 -1
- package/dist/components/conversation/markdown/markdown-base.class.js +1 -1
- package/dist/components/conversation/markdown/markdown-core.class.d.ts +3 -1
- package/dist/components/conversation/markdown/markdown.class.d.ts +3 -1
- package/dist/components/conversation/message-actions/message-actions.class.d.ts +7 -2
- package/dist/components/conversation/message-actions/message-actions.class.js +2 -2
- package/dist/components/conversation/message-parts/message-parts.class.d.ts +6 -2
- package/dist/components/conversation/message-parts/message-parts.class.js +5 -3
- package/dist/components/conversation/selection-toolbar/selection-toolbar.class.d.ts +3 -2
- package/dist/components/conversation/selection-toolbar/selection-toolbar.class.js +1 -1
- package/dist/components/conversation/streaming-text/streaming-text-base.class.d.ts +1 -5
- package/dist/components/conversation/streaming-text/streaming-text-base.class.js +2 -2
- package/dist/components/conversation/streaming-text/streaming-text-core.class.d.ts +7 -1
- package/dist/components/conversation/streaming-text/streaming-text-core.class.js +3 -4
- package/dist/components/conversation/streaming-text/streaming-text.class.d.ts +7 -1
- package/dist/components/conversation/streaming-text/streaming-text.class.js +3 -4
- package/dist/components/conversation/thread-list/thread-list.class.d.ts +13 -2
- package/dist/components/conversation/thread-list/thread-list.class.js +3 -3
- package/dist/components/data/data-grid/data-grid.class.js +1 -1
- package/dist/components/data/document-library/document-library.class.js +2 -0
- package/dist/components/data/flow-canvas/flow-canvas.class.js +1 -1
- package/dist/components/data/flow-minimap/flow-minimap.class.js +1 -1
- package/dist/components/data/flow-node/flow-node.class.d.ts +6 -2
- package/dist/components/data/flow-node/flow-node.class.js +6 -2
- package/dist/components/data/flow-node/flow-node.styles.js +1 -1
- package/dist/components/data/gauge/gauge.styles.js +1 -1
- package/dist/components/data/heatmap/heatmap.class.d.ts +3 -0
- package/dist/components/data/heatmap/heatmap.class.js +2 -2
- package/dist/components/data/heatmap/heatmap.styles.js +1 -1
- package/dist/components/data/sparkline/sparkline.class.d.ts +5 -3
- package/dist/components/data/stat/stat.class.d.ts +4 -3
- package/dist/components/data/table/table.class.d.ts +32 -5
- package/dist/components/data/table/table.class.js +3 -2
- package/dist/components/forms/button/button.class.d.ts +7 -1
- package/dist/components/forms/button/button.styles.js +1 -1
- package/dist/components/forms/date-picker/date-input.styles.js +1 -1
- package/dist/components/forms/input/input.styles.js +1 -1
- package/dist/components/forms/rubric-form/rubric-form.class.js +1 -0
- package/dist/components/layout/app-rail/app-rail.class.d.ts +50 -11
- package/dist/components/layout/app-rail/app-rail.class.js +2 -2
- package/dist/components/layout/command-palette/command-palette.class.js +1 -1
- package/dist/components/layout/menu/menu.class.d.ts +6 -5
- package/dist/components/layout/split-panel/split-panel.class.d.ts +2 -1
- package/dist/components/media/flag/language-map.d.ts +8 -0
- package/dist/components/media/flag/language-map.js +1 -1
- package/dist/components/media/map/map-loader.d.ts +7 -1
- package/dist/components/media/map/map.class.d.ts +111 -5
- package/dist/components/media/map/map.class.js +3 -3
- package/dist/components/media/media-card/media-card.class.d.ts +18 -5
- package/dist/components/media/media-card/media-card.class.js +1 -1
- package/dist/components/overlays/overlay/popover.class.d.ts +20 -0
- package/dist/components/overlays/overlay/popover.class.js +2 -2
- package/dist/components/retrieval/graph/graph.class.d.ts +3 -3
- package/dist/components/retrieval/graph/graph.class.js +1 -1
- package/dist/components/retrieval/knowledge-graph-explorer/knowledge-graph-explorer.class.d.ts +5 -3
- package/dist/components/retrieval/knowledge-graph-explorer/knowledge-graph-explorer.class.js +3 -2
- package/dist/components/retrieval/mind-map/mind-map.class.d.ts +3 -3
- package/dist/components/retrieval/mind-map/mind-map.class.js +1 -1
- package/dist/components/retrieval/retrieval-results/retrieval-results.class.d.ts +4 -1
- package/dist/components/retrieval/retrieval-results/retrieval-results.class.js +5 -1
- package/dist/components/retrieval/source-picker/source-picker.class.d.ts +4 -1
- package/dist/components/retrieval/source-picker/source-picker.class.js +5 -1
- package/dist/components/utility/icon/icon.class.d.ts +9 -3
- package/dist/components/utility/icon/icon.class.js +1 -1
- package/dist/components/utility/mutation-observer/mutation-observer.class.d.ts +14 -8
- package/dist/components/utility/mutation-observer/mutation-observer.class.js +1 -1
- package/dist/components/viewers/document-viewer/document-viewer.class.d.ts +6 -1
- package/dist/components/viewers/document-viewer/document-viewer.class.js +7 -1
- package/dist/components/viewers/document-viewer/registry.d.ts +12 -3
- package/dist/components/viewers/geojson-view/geojson-view.class.d.ts +13 -5
- package/dist/components/viewers/geojson-view/geojson-view.class.js +1 -1
- package/dist/components/viewers/geojson-view/geojson-viewer.class.d.ts +3 -2
- package/dist/custom-elements-jsx.d.ts +1 -1
- package/dist/events.d.ts +644 -1242
- package/dist/internal/anchored-overlay-runtime.d.ts +2 -2
- package/dist/internal/cell-range.d.ts +0 -6
- package/dist/internal/cell-range.js +1 -1
- package/dist/internal/css-token-length.d.ts +7 -0
- package/dist/internal/css-token-length.js +1 -0
- package/dist/internal/default-strings.generated.d.ts +1 -1
- package/dist/internal/default-strings.generated.js +1 -1
- package/dist/internal/deferred-focus-return.d.ts +7 -4
- package/dist/internal/deferred-focus-return.js +1 -1
- package/dist/internal/dev-mode-attribute-warning.d.ts +35 -0
- package/dist/internal/dev-mode-attribute-warning.js +1 -1
- package/dist/internal/localization-runtime.js +1 -1
- package/dist/internal/localization-types.d.ts +1 -1
- package/dist/internal/localization.js +2 -2
- package/dist/internal/package-metadata.d.ts +1 -1
- package/dist/internal/package-metadata.js +1 -1
- package/dist/internal/papaparse-loader.d.ts +1 -1
- package/dist/internal/papaparse-loader.js +1 -1
- package/dist/internal/positioner.d.ts +10 -0
- package/dist/internal/positioner.js +1 -1
- package/dist/internal/shared-unions.d.ts +2 -1
- package/dist/internal/slotted-overlay-controller.d.ts +20 -0
- package/dist/internal/slotted-overlay-controller.js +1 -0
- package/dist/internal/text-quote.d.ts +1 -1
- package/dist/internal/text-quote.js +1 -1
- package/dist/internal/theme-observation.d.ts +4 -0
- package/dist/internal/theme-observation.js +1 -0
- package/dist/internal/theme-watcher.js +1 -1
- package/dist/localization.d.ts +6 -1
- package/dist/localization.js +1 -1
- package/dist/lyra.d.ts +1 -1
- package/dist/lyra.js +1 -1
- package/dist/svelte.d.ts +1 -1
- package/dist/testing/lyra-tag-event-map.js +1 -1
- package/dist/translations/ar/agent-tools.js +1 -1
- package/dist/translations/cs/agent-tools.js +1 -1
- package/dist/translations/da/agent-tools.js +1 -1
- package/dist/translations/de/agent-tools.js +1 -1
- package/dist/translations/de-CH/agent-tools.js +1 -1
- package/dist/translations/es/agent-tools.js +1 -1
- package/dist/translations/fa/agent-tools.js +1 -1
- package/dist/translations/fi/agent-tools.js +1 -1
- package/dist/translations/fr/agent-tools.js +1 -1
- package/dist/translations/he/agent-tools.js +1 -1
- package/dist/translations/hi/agent-tools.js +1 -1
- package/dist/translations/hr/agent-tools.js +1 -1
- package/dist/translations/hu/agent-tools.js +1 -1
- package/dist/translations/id/agent-tools.js +1 -1
- package/dist/translations/it/agent-tools.js +1 -1
- package/dist/translations/ja/agent-tools.js +1 -1
- package/dist/translations/kk/agent-tools.js +1 -1
- package/dist/translations/ko/agent-tools.js +1 -1
- package/dist/translations/nb/agent-tools.js +1 -1
- package/dist/translations/nl/agent-tools.js +1 -1
- package/dist/translations/nn/agent-tools.js +1 -1
- package/dist/translations/pl/agent-tools.js +1 -1
- package/dist/translations/pt-BR/agent-tools.js +1 -1
- package/dist/translations/pt-PT/agent-tools.js +1 -1
- package/dist/translations/pt-PT/charts.js +1 -1
- package/dist/translations/pt-PT/conversation.js +1 -1
- package/dist/translations/pt-PT/data.js +1 -1
- package/dist/translations/pt-PT/forms.js +1 -1
- package/dist/translations/pt-PT/layout.js +1 -1
- package/dist/translations/pt-PT/media.js +1 -1
- package/dist/translations/pt-PT/retrieval.js +1 -1
- package/dist/translations/pt-PT/shared.js +1 -1
- package/dist/translations/pt-PT/utility.js +1 -1
- package/dist/translations/pt-PT/viewers.js +2 -2
- package/dist/translations/ro/agent-tools.js +1 -1
- package/dist/translations/ru/agent-tools.js +1 -1
- package/dist/translations/sl/agent-tools.js +1 -1
- package/dist/translations/sv/agent-tools.js +1 -1
- package/dist/translations/tr/agent-tools.js +1 -1
- package/dist/translations/uk/agent-tools.js +1 -1
- package/dist/translations/zh-CN/agent-tools.js +1 -1
- package/dist/translations/zh-TW/agent-tools.js +1 -1
- package/dist/utilities/index.d.ts +1 -1
- package/dist/utilities/index.js +1 -1
- package/dist/utilities/localization.d.ts +28 -10
- package/dist/vue.d.ts +1 -1
- package/llms/components/lr-accordion-item.md +2 -344
- package/llms/components/lr-accordion.md +2 -344
- package/llms/components/lr-app-rail-group.md +2 -721
- package/llms/components/lr-app-rail-item.md +2 -721
- package/llms/components/lr-app-rail.md +29 -4
- package/llms/components/lr-bar-chart.md +2 -87
- package/llms/components/lr-box-plot.md +1 -1
- package/llms/components/lr-breadcrumb-item.md +2 -67
- package/llms/components/lr-bubble-chart.md +2 -87
- package/llms/components/lr-button.md +7 -0
- package/llms/components/lr-chart.md +4 -5
- package/llms/components/lr-chip-group.md +2 -272
- package/llms/components/lr-conversation-item.md +20 -2
- package/llms/components/lr-date-input.md +2 -457
- package/llms/components/lr-date-picker.md +6 -2
- package/llms/components/lr-document-library.md +3 -3
- package/llms/components/lr-document-viewer.md +14 -5
- package/llms/components/lr-doughnut-chart.md +2 -87
- package/llms/components/lr-dropdown-item.md +2 -306
- package/llms/components/lr-dropdown.md +6 -0
- package/llms/components/lr-flag.md +9 -1
- package/llms/components/lr-flow-node.md +4 -1
- package/llms/components/lr-geojson-view.md +3 -90
- package/llms/components/lr-geojson-viewer.md +13 -5
- package/llms/components/lr-icon-button.md +4 -1
- package/llms/components/lr-icon.md +14 -6
- package/llms/components/lr-input.md +9 -2
- package/llms/components/lr-lite-chart.md +17 -9
- package/llms/components/lr-map.md +87 -2
- package/llms/components/lr-markdown-core.md +5 -4
- package/llms/components/lr-markdown.md +4 -2
- package/llms/components/lr-media-card.md +10 -5
- package/llms/components/lr-menu-item.md +2 -306
- package/llms/components/lr-menu.md +9 -6
- package/llms/components/lr-menubar-item.md +2 -125
- package/llms/components/lr-message-actions.md +4 -1
- package/llms/components/lr-message-parts.md +14 -5
- package/llms/components/lr-mutation-observer.md +12 -6
- package/llms/components/lr-navigation-menu-item.md +2 -237
- package/llms/components/lr-number-input.md +4 -0
- package/llms/components/lr-option.md +2 -712
- package/llms/components/lr-pie-chart.md +2 -87
- package/llms/components/lr-polar-area-chart.md +2 -87
- package/llms/components/lr-popover.md +10 -0
- package/llms/components/lr-prompt-input.md +5 -1
- package/llms/components/lr-radar-chart.md +2 -87
- package/llms/components/lr-reorder-item.md +2 -157
- package/llms/components/lr-result-field.md +2 -117
- package/llms/components/lr-retrieval-results.md +3 -1
- package/llms/components/lr-rubric-form.md +3 -2
- package/llms/components/lr-scatter-chart.md +2 -87
- package/llms/components/lr-selection-toolbar.md +4 -2
- package/llms/components/lr-source-card.md +2 -186
- package/llms/components/lr-source-picker.md +3 -1
- package/llms/components/lr-sparkline.md +9 -4
- package/llms/components/lr-split-panel.md +5 -3
- package/llms/components/lr-stat.md +4 -3
- package/llms/components/lr-streaming-text-core.md +7 -5
- package/llms/components/lr-streaming-text.md +9 -6
- package/llms/components/lr-swatch-picker.md +130 -0
- package/llms/components/lr-tag.md +2 -177
- package/llms/components/lr-thread-list.md +27 -4
- package/llms/components/lr-timeline-item.md +2 -120
- package/llms/components/lr-toast-item.md +2 -223
- package/llms/components/lr-tool-call-block.md +12 -3
- package/llms/components/lr-tool-call-chip.md +12 -6
- package/llms/components/lr-tool-param-form.md +3 -2
- package/llms/components/lr-tool-result-dialog.md +7 -3
- package/llms/components/lr-tool-result-view.md +4 -3
- package/llms/components/lr-tool-timeline.md +12 -5
- package/llms/components/lr-tree-item.md +2 -354
- package/llms/index.md +22 -4
- package/llms/migration.md +75 -1
- package/llms/peers.md +1 -1
- package/llms/shared.md +86 -39
- package/llms-full.txt +739 -163
- package/package.json +6 -6
- package/registrations.json +1 -1
- package/vscode-css-data.json +1 -1
- package/vscode-html-data.json +1 -1
- package/web-types.json +1 -1
|
@@ -9,276 +9,6 @@
|
|
|
9
9
|
- **Release history** [CHANGELOG.md](../../CHANGELOG.md); family-wide breaking-change summaries: [llms-full.txt](../../llms-full.txt)
|
|
10
10
|
- **Deprecations** none
|
|
11
11
|
- **Optional peers** none
|
|
12
|
-
- **Themeable via** 2 parts, 3 custom properties — see
|
|
13
|
-
- **Documented with** `lr-chip
|
|
12
|
+
- **Themeable via** 2 parts, 3 custom properties — see `lr-chip.md`
|
|
13
|
+
- **Documented with** `lr-chip`: see [lr-chip.md](./lr-chip.md).
|
|
14
14
|
- **Library-wide behavior** (events, form association, `locale`/`strings`, tokens, TS types): `llms/shared.md`
|
|
15
|
-
|
|
16
|
-
---
|
|
17
|
-
|
|
18
|
-
## `lr-chip` / `lr-chip-group`
|
|
19
|
-
|
|
20
|
-
A small, content-agnostic surface for a short label: a tag, an active-filter/scope indicator, etc.
|
|
21
|
-
Distinct from `<lr-attachment-chip>` (specifically file-shaped, with a thumbnail/size/upload-
|
|
22
|
-
progress) — this pair carries no domain assumptions at all. `<lr-chip>` is a controlled component:
|
|
23
|
-
clicking its remove (×) button only fires `lr-remove` — the chip never removes itself from the DOM
|
|
24
|
-
on its own interaction, the same contract `<lr-attachment-chip>`/`<lr-conversation-item>`
|
|
25
|
-
already follow.
|
|
26
|
-
|
|
27
|
-
Collapsed groups reapply `max-visible` when assigned children are replaced or reordered at the same
|
|
28
|
-
count, preserving authored hidden/inert state and releasing departed visibility leases.
|
|
29
|
-
|
|
30
|
-
**Two breaks in 8.0.0.** `tone` is now `variant`, with no alias — one concept, one spelling,
|
|
31
|
-
library-wide. And a chip is **no longer a pill by default**: `--lr-chip-radius` used to be
|
|
32
|
-
`var(--lr-radius-pill)` unconditionally, is now `var(--lr-radius)` (a rounded rectangle), and the
|
|
33
|
-
fully-rounded treatment moved behind the new opt-in `pill` boolean. Existing markup keeps its corner
|
|
34
|
-
radius only if you add `pill`, or set `--lr-chip-radius: var(--lr-radius-pill)` once at the app
|
|
35
|
-
level. `<lr-badge>`/`<lr-tag>` made the identical shape change, with the identical `pill` opt-in.
|
|
36
|
-
|
|
37
|
-
**Two breaks in 9.0.0.** The chip's leading adornment slot and CSS part are now `start`, matching
|
|
38
|
-
the library-wide adornment vocabulary; migrate `slot="icon"` to `slot="start"` and
|
|
39
|
-
`::part(icon)` to `::part(start)`. Also, `toggleable` is now the sole toggle-mode opt-in:
|
|
40
|
-
`selected` represents only current pressed state, so add `toggleable` anywhere that previously
|
|
41
|
-
relied on `<lr-chip selected>` to create an action.
|
|
42
|
-
|
|
43
|
-
### `lr-chip`
|
|
44
|
-
|
|
45
|
-
**Properties:**
|
|
46
|
-
|
|
47
|
-
- `size: '3xs' | '2xs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'small' | 'medium' | 'large' = 'm'`
|
|
48
|
-
(reflected) — standard visual-density scale for typography, padding, gap, and icon size; `m`
|
|
49
|
-
preserves the original chip dimensions. The `small`/`medium`/`large` spellings are exact aliases
|
|
50
|
-
of `s`/`m`/`l` and round-trip unchanged. Unsupported attributes and untyped property writes
|
|
51
|
-
normalize to reflected `m`.
|
|
52
|
-
- `variant: 'neutral' | 'brand' | 'success' | 'warning' | 'danger' = 'neutral'` (reflected) —
|
|
53
|
-
**renamed from `tone` in 8.0.0, with no alias** (see above). `<lr-badge>`, `<lr-callout>` and
|
|
54
|
-
`<lr-toast-item>` all already spelled it `variant`. It tints the whole surface using the
|
|
55
|
-
loud-color-on-quiet-tint convention: background is the
|
|
56
|
-
variant's quiet fill, text/icon its loud fill, both read from the shared semantic grid. `neutral`
|
|
57
|
-
deliberately opts out of that grid and falls back to a plain bordered-surface look. Unsupported
|
|
58
|
-
attributes and untyped property writes normalize to reflected `neutral`.
|
|
59
|
-
- `removable: boolean = false` (reflected — shows the remove (×) button)
|
|
60
|
-
- `disabled: boolean = false` (reflected) — disables the active native toggle/remove control,
|
|
61
|
-
blocks focus and activation, and suppresses selection/removal requests without mutating state
|
|
62
|
-
- `pill: boolean = false` (reflected) — **new in 8.0.0.** Fully-rounded ends instead of the default
|
|
63
|
-
rounded rectangle; the same property `<lr-badge>`/`<lr-tag>` carry. Since it defaults to `false`,
|
|
64
|
-
`pill="false"` is not a way to switch it off — remove the attribute, or assign `.pill = false`.
|
|
65
|
-
- `selected: boolean = false` (reflected) — current pressed value. It does not opt into interaction
|
|
66
|
-
or selected styling by itself; set `toggleable` independently. Once toggle mode is active, a
|
|
67
|
-
separate native `[part='toggle-button']` owns focus, Enter/Space/click
|
|
68
|
-
activation, and explicit `"true"`/`"false"` `aria-pressed`; `[part='base']` remains a container
|
|
69
|
-
and the visible default-slot label is inert and aria-hidden. Activation proposes the opposite
|
|
70
|
-
value through the cancelable `lr-chip-select` event and mutates `selected` only when that event is
|
|
71
|
-
not prevented.
|
|
72
|
-
Has no toggle effect when combined with `removable`, where the remove button is the sole control.
|
|
73
|
-
- `toggleable: boolean = false` (reflected) — sole opt-in into the toggle/pressed interactive mode,
|
|
74
|
-
independent of `selected`'s current value. Pair it with `selected` for an initially pressed chip;
|
|
75
|
-
leave `selected` unset for an initially unpressed chip.
|
|
76
|
-
For a pressed-state button in control chrome (with `appearance`, the size ladder and a grouped
|
|
77
|
-
single tab stop) rather than filter-pill chrome, use `lr-toggle` / `lr-toggle-group`.
|
|
78
|
-
- `value?: string` — opaque consumer bookkeeping value, never read, validated, or rendered by this
|
|
79
|
-
component itself, only ever echoed back verbatim (including `undefined` if never set) in
|
|
80
|
-
`lr-remove`'s detail
|
|
81
|
-
- `wrap: boolean = false` (reflected) — wraps `[part='label']` onto multiple lines instead of
|
|
82
|
-
ellipsis-truncating it to one line. `false` (the default) reproduces the chip's original
|
|
83
|
-
single-line, ellipsis-truncated label exactly. Matches `<lr-suggestion-chips>`'s identical `wrap`
|
|
84
|
-
opt-in.
|
|
85
|
-
|
|
86
|
-
**Events:** `lr-remove` (`detail: { value }` — the remove (×) button was activated via click or
|
|
87
|
-
Enter/Space while focused; only rendered/reachable while `removable`), `lr-chip-select`
|
|
88
|
-
(`detail: { value, selected }` — cancelable; fired from the native toggle button on click or
|
|
89
|
-
Enter/Space with the proposed next state when toggle mode is active and `removable` is not set.
|
|
90
|
-
Calling `preventDefault()` keeps the current `selected` state unchanged)
|
|
91
|
-
|
|
92
|
-
**Methods:** `focus(options?)`, `blur()`, and `click()` forward to the active internal control
|
|
93
|
-
(toggle or remove button); a disabled control refuses focus/click, and a passive chip's `click()`
|
|
94
|
-
retains ordinary host behavior.
|
|
95
|
-
|
|
96
|
-
When `removable`, `toggleable`, or `disabled` replaces a focused control, focus follows to the
|
|
97
|
-
equivalent new chip control when one exists, otherwise to the nearest available composed action.
|
|
98
|
-
Synchronous controlled removal receives the same repair, and a newer external focus destination is
|
|
99
|
-
never overridden.
|
|
100
|
-
|
|
101
|
-
**Slots:** default (the chip's label content; its flattened subtree is inert and aria-hidden in
|
|
102
|
-
toggle mode, so move links/buttons outside a toggleable chip), `start` (optional decorative leading
|
|
103
|
-
adornment such as an icon or status dot; its flattened subtree stays visible but is always inert
|
|
104
|
-
and aria-hidden, and nothing is reserved for it — no extra gap — when left empty), `end` (optional trailing content,
|
|
105
|
-
typically an icon, placed after the label and before the toggle/remove button; nothing is reserved
|
|
106
|
-
for it — no extra gap — when left empty, mirroring `<lr-badge>`'s identical `end` slot). `end`
|
|
107
|
-
remains ordinary consumer content in passive/removable mode, but its flattened subtree becomes
|
|
108
|
-
inert and aria-hidden beneath the full-surface toggle.
|
|
109
|
-
|
|
110
|
-
Toggle/remove action names follow the default slot's live visible accessible text through nested
|
|
111
|
-
forwarding slots and assigned-node replacement; decorative `start` content never leaks into them.
|
|
112
|
-
Hidden, inert, CSS-hidden and `aria-hidden` label branches are excluded. When a host `aria-label`
|
|
113
|
-
is present—including `aria-label=""`—the host becomes the one aggregate `role="group"` owner;
|
|
114
|
-
that label is not copied onto the nested action. The toggle/remove button instead keeps its
|
|
115
|
-
purpose-specific name from visible label text or the localized `select`/`remove` fallback, so the
|
|
116
|
-
host and action never expose duplicate names.
|
|
117
|
-
|
|
118
|
-
**CSS parts:** `base` (the pill's root container), `start` (inert, aria-hidden wrapper around the
|
|
119
|
-
decorative `start` slot; hidden entirely while empty), `label` (wrapper around the default slot,
|
|
120
|
-
inert and aria-hidden in toggle mode), `end` (wrapper around the `end` slot; hidden entirely while
|
|
121
|
-
empty and inert plus aria-hidden in toggle mode, the same `end` csspart name `<lr-badge>` uses),
|
|
122
|
-
`toggle-button` (the real native toggle control, rendered over the label in toggle mode),
|
|
123
|
-
`remove-button` (the remove (×) affordance, only rendered while `removable`)
|
|
124
|
-
|
|
125
|
-
The toggle control's accessible name comes from the chip's default-slot text. A start-only
|
|
126
|
-
toggleable chip (a colour swatch standing in for a chart series, a bare status dot) falls back to
|
|
127
|
-
the localized `select` message rather than shipping an unnamed focusable button—the same generic
|
|
128
|
-
fallback the remove button makes to `remove`. A host name, when supplied, remains on the aggregate
|
|
129
|
-
group as described above.
|
|
130
|
-
|
|
131
|
-
**Themeable custom properties:** `--lr-chip-accent`, `--lr-chip-bg`, `--lr-chip-border`
|
|
132
|
-
(component-local trio whose private defaults change per `variant` rather than repeating
|
|
133
|
-
background/color/border per part per variant; default `var(--lr-color-text)` /
|
|
134
|
-
`var(--lr-color-surface)` / `var(--lr-color-border)` —
|
|
135
|
-
mirrors the same accent/bg/border vocabulary `<lr-tool-call-chip>`/`<lr-attachment-chip>` use. One
|
|
136
|
-
rule covers all four non-neutral variants, because the shared variants sheet has already re-pointed
|
|
137
|
-
`--lr-color-fill-loud`/`--lr-color-fill-quiet` at the active variant's row of the semantic grid —
|
|
138
|
-
the chip reads those generic slots and never names a variant, and sets its border `transparent`),
|
|
139
|
-
`--lr-chip-pressed-border` (border color while pressed/selected — falls back to
|
|
140
|
-
`--lr-chip-accent`), `--lr-chip-pressed-bg` (background color while pressed/selected — falls
|
|
141
|
-
back to `--lr-chip-bg`; a selected chip's hover/press wash mixes from it, an unselected toggleable
|
|
142
|
-
chip's from `--lr-chip-bg`), the density quintet `--lr-chip-font-size`, `--lr-chip-padding-block`,
|
|
143
|
-
`--lr-chip-padding-inline`, `--lr-chip-gap`, `--lr-chip-icon-size` (all five have private defaults
|
|
144
|
-
that follow each `size`, so setting one on the element or a theme ancestor remains authoritative; the
|
|
145
|
-
`m` defaults are `--lr-font-size-sm` / `--lr-size-0-25rem` / `--lr-space-s` / `--lr-space-xs` /
|
|
146
|
-
`--lr-font-size-sm`), the height pair `--lr-chip-min-height` / `--lr-chip-height` (below),
|
|
147
|
-
`--lr-chip-radius` (default `var(--lr-radius)`; `pill` changes its private default to
|
|
148
|
-
`var(--lr-radius-pill)`) — the
|
|
149
|
-
corner radius of both `[part='base']` and `[part='remove-button']`, kept in sync so retuning one
|
|
150
|
-
retunes both, retunable without a `::part()` rule, and unlike the density quintet above it does not
|
|
151
|
-
vary by `size`; the same `--lr-button-radius` pattern —
|
|
152
|
-
plus shared tokens (`--lr-space-xs`, `--lr-space-s`,
|
|
153
|
-
`--lr-color-fill-loud`/`-fill-quiet`, `--lr-color-surface`, `--lr-color-border`, `--lr-color-text`,
|
|
154
|
-
`--lr-color-mix-active`,
|
|
155
|
-
`--lr-icon-button-size`, `--lr-focus-ring-width`, `--lr-focus-ring-color`,
|
|
156
|
-
`--lr-focus-ring-offset`, `--lr-transition-fast`).
|
|
157
|
-
|
|
158
|
-
**Chip height — a floor and an exact cap:**
|
|
159
|
-
|
|
160
|
-
- `--lr-chip-min-height` (default `--lr-size-1-5rem`) controls the component-density floor for
|
|
161
|
-
**every interactive chip**—toggleable and removable alike. The final used block size is also
|
|
162
|
-
floored by the shared `--lr-icon-button-size` target in both modes, while `l`/`xl` raise the
|
|
163
|
-
density default. A passive display chip takes no floor from this at all. The interactive base is
|
|
164
|
-
likewise allocated at least the shared target width, so its absolute toggle action cannot escape
|
|
165
|
-
into an adjacent control.
|
|
166
|
-
- `--lr-chip-height` pins an **exact** height on `[part='base']` — interactive and passive chips
|
|
167
|
-
alike — so a row of chips can line up with a sibling control of a known height. It is
|
|
168
|
-
**undeclared by default**, which is what keeps the per-tier floor alive: `auto` is a valid
|
|
169
|
-
declared value that would win over the `var()` fallback arm and make `--lr-chip-min-height` dead
|
|
170
|
-
code, so never set it to `auto` — remove the declaration instead. Because the component never
|
|
171
|
-
declares it, it can be set inline, from an ancestor, or from an outer-tree rule.
|
|
172
|
-
On an interactive chip, a value below the shared target size controls only the painted density;
|
|
173
|
-
the owned action allocation still expands to the target floor and cannot overlap adjacent
|
|
174
|
-
controls.
|
|
175
|
-
|
|
176
|
-
**Optional peer deps:** none.
|
|
177
|
-
|
|
178
|
-
```html
|
|
179
|
-
<lr-chip
|
|
180
|
-
toggleable
|
|
181
|
-
selected
|
|
182
|
-
style="--lr-chip-bg: var(--lr-color-surface); --lr-chip-pressed-bg: var(--lr-color-warning-quiet)"
|
|
183
|
-
>
|
|
184
|
-
Priority filter
|
|
185
|
-
</lr-chip>
|
|
186
|
-
```
|
|
187
|
-
|
|
188
|
-
### `lr-chip-group`
|
|
189
|
-
|
|
190
|
-
A flex-wrap container for a set of `<lr-chip>` children — plain light-DOM composition, direct
|
|
191
|
-
children are the chips (the same shape `<lr-multi-split>`'s panels / `<lr-source-list>`'s cards take,
|
|
192
|
-
no `.items` array prop).
|
|
193
|
-
|
|
194
|
-
**Properties:**
|
|
195
|
-
|
|
196
|
-
- `accessibleLabel: string = ''` (attribute `aria-label`) — accessible name for the group,
|
|
197
|
-
forwarded to `[part='base']`, which carries `role='group'` whenever a name is supplied. Supply
|
|
198
|
-
one for any chip row that means something as a set (a filter row, a tag list); without it the
|
|
199
|
-
container stays roleless, because an unnamed group role adds verbosity without information.
|
|
200
|
-
A host `aria-label` does **not** reach a shadow root on its own — this property is what makes it
|
|
201
|
-
reach `[part='base']`, the element that owns the role. Mirrors how `lr-radio-group` and
|
|
202
|
-
`lr-segmented` name their own `radiogroup`.
|
|
203
|
-
- `maxVisible?: number` (attribute `max-visible`) — maximum number of assigned children shown before
|
|
204
|
-
the rest collapse behind a "+N" indicator; flattened slot-forwarded children count the same as
|
|
205
|
-
direct children. Author-hidden or inert children do not consume capacity or inflate the hidden
|
|
206
|
-
count. Unset means no limit.
|
|
207
|
-
|
|
208
|
-
**Events:** `lr-overflow-toggle` (`detail: { expanded }` — the overflow indicator was activated,
|
|
209
|
-
revealing or re-collapsing the excess children; fires only from that click, i.e. only when
|
|
210
|
-
`max-visible` is actually causing an overflow state — never as a side effect of `max-visible`/
|
|
211
|
-
children changing on their own)
|
|
212
|
-
|
|
213
|
-
When collapse, `max-visible`, or controlled child removal hides the focused chip action, focus moves
|
|
214
|
-
to the nearest enabled visible chip control, then the overflow disclosure, then the stable group
|
|
215
|
-
base. Focus already moved outside the group is preserved.
|
|
216
|
-
|
|
217
|
-
**Slots:** default (`<lr-chip>` elements, or any content, though the chip pairing is the intended
|
|
218
|
-
usage)
|
|
219
|
-
|
|
220
|
-
**CSS parts:** `base` (the flex-wrap container, holds both the slot and the overflow indicator),
|
|
221
|
-
`overflow-indicator` (the "+N" / "Show less" toggle button; only rendered while `max-visible` is
|
|
222
|
-
actively causing an overflow—a locally-styled pill, not an instantiated real `<lr-chip>`, with the
|
|
223
|
-
shared minimum hit area in both axes)
|
|
224
|
-
|
|
225
|
-
**Themeable custom properties:** `--lr-chip-group-gap` (default `var(--lr-space-xs)`) — the gap
|
|
226
|
-
between `[part='base']`'s wrapped children (chips and the overflow indicator alike); previously
|
|
227
|
-
hardcoded. `--lr-chip-group-overflow-expanded-color` (default
|
|
228
|
-
`var(--lr-color-text)`) — text color of `[part="overflow-indicator"]` while expanded
|
|
229
|
-
(`aria-expanded="true"`). `--lr-chip-group-overflow-expanded-border-style` (default `solid`) —
|
|
230
|
-
that same expanded indicator's border style; its resting border deliberately remains dashed, so a
|
|
231
|
-
theme can retune the open affordance without losing the collapsed treatment. Both are state hooks:
|
|
232
|
-
inline `var()` fallbacks at the point of use, never `:host` declarations, so they can be set on the
|
|
233
|
-
element _or on any ancestor_. They exist because
|
|
234
|
-
`::part(overflow-indicator)[aria-expanded='true']` is invalid CSS — Shadow Parts forbids an attribute
|
|
235
|
-
selector after `::part()` — so retinting or reshaping only the expanded state otherwise meant
|
|
236
|
-
re-pointing shared tokens. Left unset, rendering is unchanged. Otherwise shared tokens
|
|
237
|
-
(`--lr-space-xs`, `--lr-space-s`,
|
|
238
|
-
`--lr-color-border`, `--lr-color-surface`, `--lr-color-text-quiet`, `--lr-color-text`,
|
|
239
|
-
`--lr-color-brand`, `--lr-focus-ring-width`, `--lr-focus-ring-color`,
|
|
240
|
-
`--lr-focus-ring-offset`, `--lr-transition-fast`).
|
|
241
|
-
|
|
242
|
-
**Optional peer deps:** none.
|
|
243
|
-
|
|
244
|
-
```html
|
|
245
|
-
<lr-chip-group max-visible="3">
|
|
246
|
-
<lr-chip removable value="draft">Draft</lr-chip>
|
|
247
|
-
<lr-chip variant="success" removable value="reviewed">Reviewed</lr-chip>
|
|
248
|
-
<lr-chip variant="warning">Needs input</lr-chip>
|
|
249
|
-
<lr-chip variant="danger" pill>Blocked</lr-chip>
|
|
250
|
-
</lr-chip-group>
|
|
251
|
-
<script type="module">
|
|
252
|
-
const group = document.querySelector("lr-chip-group");
|
|
253
|
-
group.addEventListener("lr-overflow-toggle", (e) =>
|
|
254
|
-
console.log(e.detail.expanded)
|
|
255
|
-
);
|
|
256
|
-
group
|
|
257
|
-
.querySelectorAll("lr-chip")
|
|
258
|
-
.forEach((chip) =>
|
|
259
|
-
chip.addEventListener("lr-remove", (e) => console.log(e.detail.value))
|
|
260
|
-
);
|
|
261
|
-
</script>
|
|
262
|
-
```
|
|
263
|
-
|
|
264
|
-
Since CSS alone can't parameterize `:nth-child` on a runtime prop, `<lr-chip-group>` reaches
|
|
265
|
-
directly into the light DOM and sets each excess child's own `hidden` property once `max-visible` is
|
|
266
|
-
exceeded — the same approach `<lr-multi-split>` uses to set each panel's inline `flex`/`order`, rather
|
|
267
|
-
than a stylesheet-only solution. It observes live author changes to each managed child's `hidden`
|
|
268
|
-
and `inert` state, uses real `hidden` attributes for arbitrary HTML/SVG elements, and restores the
|
|
269
|
-
latest author-owned value when ownership ends or the group disconnects; reconnecting reapplies the
|
|
270
|
-
current collapsed state. Forwarded-slot reconciliation is deferred without scheduling a reactive
|
|
271
|
-
write from `firstUpdated()`.
|
|
272
|
-
|
|
273
|
-
**Known gotchas:**
|
|
274
|
-
|
|
275
|
-
- `<lr-chip>`'s accessible remove-button label ("Remove {text}") is computed only from the default
|
|
276
|
-
slot's own text content — text living inside the (decorative) `start` slot doesn't leak into it.
|
|
277
|
-
- `<lr-chip-group>` silently un-expands (`expanded` resets to `false`, with no event firing) if a
|
|
278
|
-
consumer raises `max-visible` past the current child count while already expanded — only an actual
|
|
279
|
-
click on the overflow indicator fires `lr-overflow-toggle`.
|
|
280
|
-
- `<lr-chip-group>`'s overflow indicator is its own locally-styled pill, not an instantiated
|
|
281
|
-
`<lr-chip>` in its shadow DOM — don't expect `<lr-chip>`'s CSS parts or custom properties to
|
|
282
|
-
reach it.
|
|
283
|
-
|
|
284
|
-
---
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
- **Release history** [CHANGELOG.md](../../CHANGELOG.md); family-wide breaking-change summaries: [llms-full.txt](../../llms-full.txt)
|
|
10
10
|
- **Deprecations** none
|
|
11
11
|
- **Optional peers** none
|
|
12
|
-
- **Themeable via**
|
|
12
|
+
- **Themeable via** 13 parts, 8 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
|
---
|
|
@@ -82,10 +82,28 @@ plus bubbling/composed `blur` and `focus` with `null` detail relayed from the re
|
|
|
82
82
|
|
|
83
83
|
`start`/`content`/`excerpt`/`meta` must all stay non-focusable — see the `role="button"` note below.
|
|
84
84
|
|
|
85
|
-
**CSS parts:** `base`, `
|
|
85
|
+
**CSS parts:** `base`, `base-menu-open` (state alias on `base` while a menu opened from the
|
|
86
|
+
`actions` slot is open), `active-indicator` (decorative, rendered only while `active`),
|
|
86
87
|
`select-button`, `start`, `content`, `label`, `label-input`, `rename-button`, `excerpt`, `meta`, `timestamp`,
|
|
87
88
|
`actions`
|
|
88
89
|
|
|
90
|
+
**Custom state:** `menu-open` — the host matches `:state(menu-open)` while an `lr-dropdown`,
|
|
91
|
+
`lr-popover` or `lr-context-menu` opened from the `actions` slot is open (including one composed
|
|
92
|
+
inside another component's shadow root), however it was opened; `[part="base"]` then also carries
|
|
93
|
+
`base-menu-open`, and the row keeps its hover tint (an `active` row keeps its active tint). The menu
|
|
94
|
+
sits in the browser top layer, where Chromium and WebKit stop matching `:hover` and `:focus-within`
|
|
95
|
+
on the row while the pointer or focus is inside it, so a hover- or focus-revealed actions trigger
|
|
96
|
+
must key on this state as well:
|
|
97
|
+
|
|
98
|
+
```css
|
|
99
|
+
lr-conversation-item .row-menu {
|
|
100
|
+
opacity: 0;
|
|
101
|
+
}
|
|
102
|
+
lr-conversation-item:is(:hover, :focus-within, :state(menu-open)) .row-menu {
|
|
103
|
+
opacity: 1;
|
|
104
|
+
}
|
|
105
|
+
```
|
|
106
|
+
|
|
89
107
|
**Themeable custom properties:** `--lr-conversation-item-active-bg` (default
|
|
90
108
|
`var(--lr-color-brand-quiet)`) — the row's background while `active`. `--lr-conversation-item-active-color`
|
|
91
109
|
(default `var(--lr-color-text)`) — the text color of `[part='excerpt']` and `[part='timestamp']`
|