@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,129 +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, 2 custom properties — see
|
|
13
|
-
- **Documented with** `lr-menubar
|
|
12
|
+
- **Themeable via** 2 parts, 2 custom properties — see `lr-menubar.md`
|
|
13
|
+
- **Documented with** `lr-menubar`: see [lr-menubar.md](./lr-menubar.md).
|
|
14
14
|
- **Library-wide behavior** (events, form association, `locale`/`strings`, tokens, TS types): `llms/shared.md`
|
|
15
|
-
|
|
16
|
-
---
|
|
17
|
-
|
|
18
|
-
## `lr-menubar` / `lr-menubar-item`
|
|
19
|
-
|
|
20
|
-
A horizontal application menubar following the APG menubar pattern. Import
|
|
21
|
-
`@aceshooting/lyra-ui/components/lr-menubar.js`; it registers the item and menu dependencies.
|
|
22
|
-
Use only `lr-menubar-item` elements in the default slot. A title's `menu` slot takes exactly one
|
|
23
|
-
`lr-menu`; without it the title is a plain action that dispatches native `click`.
|
|
24
|
-
|
|
25
|
-
```html
|
|
26
|
-
<lr-menubar label="Application">
|
|
27
|
-
<lr-menubar-item>
|
|
28
|
-
File
|
|
29
|
-
<lr-menu slot="menu">
|
|
30
|
-
<lr-menu-item value="new-tab" aria-keyshortcuts="Control+T Meta+T">
|
|
31
|
-
New tab <lr-kbd slot="details" keys="mod+t"></lr-kbd>
|
|
32
|
-
</lr-menu-item>
|
|
33
|
-
<lr-menu-item>Share<lr-menu slot="submenu"><lr-menu-item>Email link</lr-menu-item></lr-menu></lr-menu-item>
|
|
34
|
-
<hr />
|
|
35
|
-
<lr-menu-item value="print">Print…</lr-menu-item>
|
|
36
|
-
</lr-menu>
|
|
37
|
-
</lr-menubar-item>
|
|
38
|
-
<lr-menubar-item>Edit<lr-menu slot="menu"><lr-menu-item>Undo</lr-menu-item></lr-menu></lr-menubar-item>
|
|
39
|
-
<lr-menubar-item>Help</lr-menubar-item>
|
|
40
|
-
</lr-menubar>
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
Import `@aceshooting/lyra-ui/components/lr-kbd.js` separately for shortcut chips. Displaying a
|
|
44
|
-
shortcut does not bind it. `Control+T Meta+T` describes a handler accepting either `ctrlKey` or
|
|
45
|
-
`metaKey`. If the app binds only its platform modifier, keep the ARIA value aligned with the chip:
|
|
46
|
-
`item.setAttribute('aria-keyshortcuts', kbd.effectivePlatform === 'mac' ? 'Meta+T' : 'Control+T')`.
|
|
47
|
-
The chip's decorative `details` subtree is hidden from assistive technology.
|
|
48
|
-
|
|
49
|
-
### `lr-menubar`
|
|
50
|
-
|
|
51
|
-
**Properties:**
|
|
52
|
-
|
|
53
|
-
- `label?: string` — accessible name of the menubar. The host `aria-label` wins, including `""`;
|
|
54
|
-
an explicit `label=""` stays empty. When both are absent, no name attribute is rendered.
|
|
55
|
-
- `size: LyraSize = 'm'` — shared control ladder, inherited by the titles.
|
|
56
|
-
- `frame: LyraFrame = 'card'` — surface, subtle border and shadow; `'plain'` makes the same
|
|
57
|
-
geometry transparent. Other values use the card appearance.
|
|
58
|
-
|
|
59
|
-
**Events:** `lr-select`, cancelable `CustomEvent<MenuItemSelectDetail>`, bubbles once from the
|
|
60
|
-
owning menu with `detail.item`. Prevent default to keep the menu open. Checkbox/radio
|
|
61
|
-
`lr-menu-item-change` also bubbles from its item. There are no menubar lifecycle events or public
|
|
62
|
-
open/close methods.
|
|
63
|
-
|
|
64
|
-
**Slots:** default, containing only `lr-menubar-item` elements. **CSS parts:** `base`.
|
|
65
|
-
The menu width hooks `--lr-menu-min-inline-size` and `--lr-menu-max-inline-size` inherit from the
|
|
66
|
-
menubar or an ancestor and apply to every slotted menu.
|
|
67
|
-
|
|
68
|
-
### `lr-menubar-item`
|
|
69
|
-
|
|
70
|
-
**Properties:** `disabled: boolean = false` — removes the title from traversal, closes its menu,
|
|
71
|
-
and suppresses mouse, touch, keyboard and programmatic activation. Disabled `mousedown` does not
|
|
72
|
-
move focus. Consumer capture listeners on a further ancestor can still observe a dispatched
|
|
73
|
-
click, but listeners on the item and bubbling ancestor listeners do not receive it.
|
|
74
|
-
|
|
75
|
-
**Slots:** default, the visual label; `menu`, exactly one `lr-menu` (the first assigned menu wins;
|
|
76
|
-
other elements are ignored). **CSS parts:** `base`, `label`. No own custom events. Native `click`
|
|
77
|
-
is the action contract for a title without a menu. **Methods:** `click(): void` does nothing while
|
|
78
|
-
disabled, otherwise dispatches a native host click.
|
|
79
|
-
|
|
80
|
-
The host owns `role="menuitem"`, literal `aria-disabled`, and, only with a menu,
|
|
81
|
-
`aria-haspopup="menu"` plus literal `aria-expanded`. Its accessible name comes from the default
|
|
82
|
-
slot, so open menu contents never leak into it; author `aria-label` or `aria-labelledby` wins.
|
|
83
|
-
Menus inherit the title's name unless given their own `aria-label` or `label`. An empty title
|
|
84
|
-
leaves the menu's localized `menuLabel` fallback intact.
|
|
85
|
-
|
|
86
|
-
**Themeable custom properties:**
|
|
87
|
-
|
|
88
|
-
- `--lr-menubar-item-hover-bg` (default `var(--lr-color-brand-quiet)`) paints hover, focus-visible
|
|
89
|
-
and the open title.
|
|
90
|
-
- `--lr-menubar-item-active-bg` (default
|
|
91
|
-
`color-mix(in oklab, var(--lr-menubar-item-hover-bg, var(--lr-color-brand-quiet)), var(--lr-color-mix-partner) var(--lr-color-mix-active))`)
|
|
92
|
-
paints the pressed title, including when already open.
|
|
93
|
-
|
|
94
|
-
Both hooks inherit from the item, menubar or any ancestor. Open titles receive an outline in
|
|
95
|
-
forced colors. Reduced motion removes menu transitions and minimizes title transitions.
|
|
96
|
-
|
|
97
|
-
### Keyboard and pointer behavior
|
|
98
|
-
|
|
99
|
-
| Focus | Key | Result |
|
|
100
|
-
|---|---|---|
|
|
101
|
-
| Title | Left/Right | Previous/next enabled title, wrapping; directions reverse in RTL |
|
|
102
|
-
| Title | Home/End | First/last enabled title |
|
|
103
|
-
| Title | Down, Enter, Space | Open and focus first menu item; Enter/Space click a plain action |
|
|
104
|
-
| Title | Up | Open and focus last menu item; unhandled on plain actions |
|
|
105
|
-
| Title | Printable character | Case-insensitive typeahead with a 500ms buffer |
|
|
106
|
-
| Expanded title | Traversal or matching typeahead | Carry the open menu along; focus stays on the title |
|
|
107
|
-
| Menu leaf | Inline forward/back arrow | Carry to next/previous title; nested back closes only that submenu |
|
|
108
|
-
| Menu | Up/Down, Home/End, Enter/Space | Existing menu navigation and activation |
|
|
109
|
-
| Open menu/title | Escape | Close the innermost menu; menu focus returns to its title |
|
|
110
|
-
| Open menu/title | Tab | Close and continue native traversal; Shift+Tab from the menu returns to its title |
|
|
111
|
-
|
|
112
|
-
Handled keys prevent page scrolling. Escape/Tab while collapsed and unmatched typeahead remain
|
|
113
|
-
unhandled. Header/footer inputs retain their own arrow behavior. Disabled, hidden, aria-hidden and
|
|
114
|
-
inert titles are skipped. Moving onto a plain action collapses an open menu.
|
|
115
|
-
|
|
116
|
-
Clicking a menu title toggles its menu and keeps focus on the title. While one menu is open,
|
|
117
|
-
hovering another enabled menu title carries the menu immediately; hovering while collapsed,
|
|
118
|
-
hovering plain actions, and touch pointer-over events do nothing. Clicking a title that hover just
|
|
119
|
-
opened closes it. Outside pointers, focus leaving the menubar, removal or disablement close the
|
|
120
|
-
menu. Selection closes and focuses its title unless canceled. Reconnecting resumes collapsed.
|
|
121
|
-
Closing preserves the current focus even with another overlay beneath; if nothing remains focused
|
|
122
|
-
because the menubar was removed, the shared overlay stack may focus its previous entry.
|
|
123
|
-
|
|
124
|
-
### Sizing and narrow allocations
|
|
125
|
-
|
|
126
|
-
Titles wrap, with no horizontal scrollbar or automatic overflow menu. The keyboard order stays
|
|
127
|
-
linear. Long titles ellipsize while retaining their full accessible name. A single row measures
|
|
128
|
-
`max(H, 24px + 2P + 2B)`, where H is `--lr-form-control-height`, P is
|
|
129
|
-
`--lr-form-control-padding-block`, and B is `--lr-border-width-thin`. With default tokens this is
|
|
130
|
-
26px at `xs`, 30px at `s`, 40px at `m`, and 48px at `l`; each title is at least 24px in both axes.
|
|
131
|
-
Font, inline padding and radius follow the shared size ladder. Coarse-pointer size floors still
|
|
132
|
-
apply. The shadcn theme gives 32px at `s` and 36px at `m`. Additional wrapped rows add their title
|
|
133
|
-
height plus the shared gap. No container containment is imposed, so intrinsic sizing in a centered
|
|
134
|
-
grid or shrink-to-fit header remains content-based. Both tags render and hydrate on the server;
|
|
135
|
-
menu wrappers begin hidden and inert until connected client behavior attaches their menus.
|
|
136
|
-
|
|
137
|
-
---
|
|
@@ -47,7 +47,10 @@ MessageFeedbackValue = null` (attribute `feedback-rating`) — forwarded to the
|
|
|
47
47
|
opens). `feedbackPending: boolean` (read-only, nonreflecting) — true only while the current built-in
|
|
48
48
|
feedback control awaits settlement; it has no `feedback-pending` attribute or change event.
|
|
49
49
|
`revealOnInteraction: boolean = false` (reflected, attribute `reveal-on-interaction`) — hides
|
|
50
|
-
the bar until the closest `lr-chat-message` ancestor is hovered, or the toolbar contains focus.
|
|
50
|
+
the bar until the closest `lr-chat-message` ancestor is hovered, or the toolbar contains focus. It
|
|
51
|
+
also stays revealed while an `lr-dropdown`, `lr-popover` or `lr-context-menu` opened from a slotted
|
|
52
|
+
control is open, since that menu sits in the browser top layer, where focus inside it does not
|
|
53
|
+
count as focus within the toolbar in Chromium and WebKit.
|
|
51
54
|
`label?: string` — accessible name override for the toolbar. Omitting it localizes the default
|
|
52
55
|
`messageActionsLabel` message; an explicit empty string suppresses that default and renders no
|
|
53
56
|
label. `accessibleLabel: string | null =
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
- **Family** `components/conversation/` — see `llms/index.md` for its siblings
|
|
8
8
|
- **Status** `stable` since `7.0.0` — see the maturity and deprecation policy in `llms/shared.md`
|
|
9
9
|
- **Release history** [CHANGELOG.md](../../CHANGELOG.md); family-wide breaking-change summaries: [llms-full.txt](../../llms-full.txt)
|
|
10
|
-
- **
|
|
10
|
+
- **Deprecated property** `codeBlockChrome` / `code-block-chrome` since `21.1.0`; use property `code-block-header`; removal not before `23.0.0` — code-block-chrome is a second spelling of code-block-header with identical behavior: either one enables the code-block headers of the built-in text and reasoning Markdown parts, which now always receive code-block-header. One name per concept removes a choice with no difference. It keeps enabling the headers through the 22.x line, and setting it logs a one-time development warning.
|
|
11
11
|
- **Optional peers** `dompurify`, `katex`, `marked`, `shiki` — see `llms/peers.md`
|
|
12
12
|
- **Themeable via** 21 parts, 5 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`
|
|
@@ -37,7 +37,9 @@ and `codeBlockHeader: boolean = false` (attribute `code-block-header`) — forwa
|
|
|
37
37
|
and reasoning Markdown parts while `contentMode="markdown"`. Progressive mode renders settled
|
|
38
38
|
blocks during a streaming part and preserves the `plain` fallback by default; the header adds the
|
|
39
39
|
source language label and localized copy action to built-in code blocks.
|
|
40
|
-
`codeBlockChrome: boolean = false` (attribute `code-block-chrome`) is
|
|
40
|
+
`codeBlockChrome: boolean = false` (attribute `code-block-chrome`) is a deprecated equivalent
|
|
41
|
+
enabling alias (removal not before 23.0.0; setting it logs a one-time development warning), and the
|
|
42
|
+
parts' Markdown elements receive either option as `codeBlockHeader`. These settings do not replace
|
|
41
43
|
the `MessagePart.state` lifecycle or affect `contentMode="plain"`.
|
|
42
44
|
`maxRenderedParts: number = 0` (attribute `max-rendered-parts`) — `0` (the default) renders every
|
|
43
45
|
part, unbounded, matching every prior release; a positive value windows rendering to the newest N
|
|
@@ -75,17 +77,24 @@ duration; expanding shows arguments, error and result in place) and pairs it wit
|
|
|
75
77
|
- Everything else renders as in chip display: unpaired results, a result whose call is outside the
|
|
76
78
|
rendered window, duplicate results after the first, and custom-rendered calls or results. A
|
|
77
79
|
second call part with the same invocation id renders its own unpaired block.
|
|
78
|
-
- The block binds `name`, `callId` and `args` from the invocation, and `redactedFields` from the
|
|
80
|
+
- The block binds `name`, `displayName`, `callId` and `args` from the invocation, and `redactedFields` from the
|
|
79
81
|
invocation-level paths described under redaction below; `result` from
|
|
80
82
|
the paired part (else `invocation.result`); `error` from the paired part when it carries one (else
|
|
81
83
|
`invocation.error`); and `durationMs = endedAt - startedAt` when both are set (else no duration).
|
|
82
84
|
`expanded` is never bound, so a user-expanded block stays open across `parts` updates.
|
|
83
|
-
- Block status, first match wins: invocation `denied` → `denied`; invocation `
|
|
84
|
-
|
|
85
|
+
- Block status, first match wins: invocation `denied` → `denied`; invocation `incomplete` (a call
|
|
86
|
+
that ended without a result, 21.1.0) → `incomplete`, whatever result part is paired; invocation
|
|
87
|
+
`error` or a paired error result → `error`; a paired result still `streaming` → `running`; any paired result →
|
|
85
88
|
`success`; otherwise the invocation's own status (an unknown value → `pending`), so a call still
|
|
86
89
|
waiting on its result keeps showing `pending`/`running`.
|
|
87
90
|
- The tool-call wrapper stretches to the message width in block display.
|
|
88
91
|
|
|
92
|
+
**Display name in both displays** (21.1.0). An invocation's `displayName` (the application's own,
|
|
93
|
+
already-translated tool label) is bound to the chip's or the block's `displayName`, so the visible
|
|
94
|
+
and announced tool name is the translated one while `name` still selects the result renderer and
|
|
95
|
+
is still what `lr-tool-call-chip-select` and `lr-render-error` report. A non-string value is not
|
|
96
|
+
forwarded.
|
|
97
|
+
|
|
89
98
|
**Redaction in both displays.** An invocation's `redactedFields` (dotted paths rooted at
|
|
90
99
|
`args`/`result`/`error`, see `<lr-tool-call-block>`) masks every built-in rendering of its payload
|
|
91
100
|
with the localized `Value hidden`: in block display the block's details; in chip display, and for
|
|
@@ -7,7 +7,8 @@
|
|
|
7
7
|
- **Family** `components/utility/` — see `llms/index.md` for its siblings
|
|
8
8
|
- **Status** `stable` since `4.0.0` — see the maturity and deprecation policy in `llms/shared.md`
|
|
9
9
|
- **Release history** [CHANGELOG.md](../../CHANGELOG.md); family-wide breaking-change summaries: [llms-full.txt](../../llms-full.txt)
|
|
10
|
-
- **
|
|
10
|
+
- **Deprecated property** `characterData` / `character-data` since `21.1.0`; use property `char-data`; removal not before `23.0.0` — character-data is a Lyra-only spelling of the mirrored char-data attribute (the Web Awesome and Shoelace name) with identical behavior. It keeps reflecting and enabling character-data observation through the 22.x line, and setting it logs a one-time development warning.
|
|
11
|
+
- **Deprecated property** `observeAttributes` / `attributes` since `21.1.0`; use property `attr="*" (or just remove it where attr, attr-old-value or a non-empty attributeFilter is also set)`; removal not before `23.0.0` — attributes is a Lyra-only boolean spelling of the mirrored attr="*" (observe every attribute). Where attr, attr-old-value or a non-empty attributeFilter is also set, attribute observation is already on, so remove attributes instead: adding attr="*" would replace an attributeFilter. It keeps reflecting and enabling attribute observation through the 22.x line, and setting it logs a one-time development warning.
|
|
11
12
|
- **Optional peers** none
|
|
12
13
|
- **Themeable via** 1 part, 0 custom properties — see this component's own `@csspart`/`@cssprop` list below
|
|
13
14
|
- **Library-wide behavior** (events, form association, `locale`/`strings`, tokens, TS types): `llms/shared.md`
|
|
@@ -25,11 +26,16 @@ adds no layout.
|
|
|
25
26
|
needed; reflected), `attr: string | null = null` (reflected; `*` observes every attribute; otherwise a
|
|
26
27
|
space-separated filter), `attrOldValue: boolean = false` (`attr-old-value`), `charData: boolean =
|
|
27
28
|
false` (`char-data`), and `charDataOldValue: boolean = false` (`char-data-old-value`); all four
|
|
28
|
-
mapped attributes reflect.
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
mapped attributes reflect. Plus `subtree: boolean = true`, and programmatic
|
|
30
|
+
`attributeFilter: string[] = []` (neither reflects).
|
|
31
|
+
|
|
32
|
+
**Deprecated aliases** (still functional and still reflecting until their removal, no earlier than
|
|
33
|
+
23.0.0; setting either logs a one-time development warning): `observeAttributes` (`attributes`)
|
|
34
|
+
turns on attribute observation, and `characterData` (`character-data`) is identical to `charData`.
|
|
35
|
+
Replace `character-data` with `char-data`. Replace `attributes` with `attr="*"` only when `attr`,
|
|
36
|
+
`attr-old-value` and `attributeFilter` are all unset; otherwise just remove it. Those already turn
|
|
37
|
+
attribute observation on, and a non-null `attr` ignores `attributeFilter`, so adding `attr="*"` next
|
|
38
|
+
to a filter would widen the observer to every attribute.
|
|
33
39
|
|
|
34
40
|
The browser capability is optional. A missing or throwing owner-window lookup, or an unavailable or
|
|
35
41
|
throwing constructor, leaves that rebuild inert rather than leaking an exception. Individual
|
|
@@ -9,241 +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** 8 parts, 22 custom properties — see
|
|
13
|
-
- **Documented with** `lr-navigation-menu
|
|
12
|
+
- **Themeable via** 8 parts, 22 custom properties — see `lr-navigation-menu.md`
|
|
13
|
+
- **Documented with** `lr-navigation-menu`: see [lr-navigation-menu.md](./lr-navigation-menu.md).
|
|
14
14
|
- **Library-wide behavior** (events, form association, `locale`/`strings`, tokens, TS types): `llms/shared.md`
|
|
15
|
-
|
|
16
|
-
---
|
|
17
|
-
|
|
18
|
-
## `lr-navigation-menu`
|
|
19
|
-
|
|
20
|
-
Site-header navigation following the WAI-ARIA **disclosure navigation** pattern (first-party, no
|
|
21
|
-
`wa-*`/`sl-*` counterpart): a `nav` landmark holding a `role="list"` row of
|
|
22
|
-
`<lr-navigation-menu-item>` links and disclosure buttons. A disclosure's flyout panel opens in one
|
|
23
|
-
shared region below the bar. It never uses `menu`/`menubar` roles — application menus belong to
|
|
24
|
-
`lr-menu`, and no arrow key ever opens or closes a panel.
|
|
25
|
-
|
|
26
|
-
- **Opening.** Hovering a trigger opens its panel after `showDelay` (mouse only; touch and pen never
|
|
27
|
-
open on hover). While a panel is open, hovering another trigger switches immediately and the
|
|
28
|
-
shared region resizes to the new content. A click, Enter or Space opens a panel too. A click on a
|
|
29
|
-
hover-opened trigger *pins* it, so leaving no longer closes it; the next click closes it.
|
|
30
|
-
Opening one panel closes the other (`lr-toggle` with `source: 'peer'`).
|
|
31
|
-
- **Hover grace.** A hover that arrives within `skipDelay` ms of a panel closing opens immediately.
|
|
32
|
-
- **Closing.** Escape (focus returns to the trigger only when focus was inside the item), a press
|
|
33
|
-
outside the open item or on a non-trigger item, focus leaving the item, a hover-opened panel losing
|
|
34
|
-
the pointer after `hideDelay`, and activating a link — a plain primary click on an `a[href]` inside
|
|
35
|
-
a panel or on a link item, even when a router calls `preventDefault()`. Ctrl, Meta, Shift and
|
|
36
|
-
middle clicks close nothing. A panel that holds focus never switches away on hover.
|
|
37
|
-
- **Focus repair.** Whenever a close or collapse would hide the focused element, focus first moves
|
|
38
|
-
to that item's trigger, or to the toggle when the collapsed list hides.
|
|
39
|
-
- **Keyboard (bar layout).** Every top-level link or button stays in the Tab order and Tab from an
|
|
40
|
-
open trigger enters its panel. ArrowRight/ArrowLeft move to the next/previous item without
|
|
41
|
-
wrapping (swapped under right-to-left text); Home/End jump to the first/last. Hidden, `inert`
|
|
42
|
-
and `aria-hidden` items are skipped. ArrowDown on an *open* trigger focuses the first control in
|
|
43
|
-
its panel; on a closed trigger, a link or a plain button it does nothing. Inside a panel,
|
|
44
|
-
ArrowDown/ArrowUp/Home/End move between its links and buttons (text fields and composite widgets
|
|
45
|
-
keep their own keys). Keys with Alt, Ctrl or Meta are never handled.
|
|
46
|
-
|
|
47
|
-
**Properties:**
|
|
48
|
-
|
|
49
|
-
- `accessibleLabel?: string` (attribute `aria-label`) — names the `nav` landmark by attribute
|
|
50
|
-
presence; an explicitly empty `aria-label=""` leaves it unnamed. Unset, the landmark is named with
|
|
51
|
-
the localized `navigation` string ("Navigation"). Several menus on one page (for example a header
|
|
52
|
-
and a footer) need distinct labels, or axe reports `landmark-unique`.
|
|
53
|
-
- `mobileBreakpoint?: string` (attribute `mobile-breakpoint`) — a bare number or a `px`, `rem` or
|
|
54
|
-
`em` length. The menu collapses while its own content-box inline size is at or below it (the same
|
|
55
|
-
`<=` comparison and name as `lr-page`). Unlike `lr-page` and `lr-app-rail` there is no default:
|
|
56
|
-
unset or unresolvable means the menu never collapses and its row wraps instead.
|
|
57
|
-
- `expanded: boolean = false` (reflected) — whether the list shows in the collapsed layout. Kept
|
|
58
|
-
while the bar layout is active and applied at the next collapse; reset to `false` (with
|
|
59
|
-
`lr-expanded-change`, source `programmatic`) when the menu leaves the collapsed layout.
|
|
60
|
-
- `indicator: boolean = false` (reflected) — shows a decorative notch under the trigger whose panel
|
|
61
|
-
is open.
|
|
62
|
-
- `panelAnchor: LyraNavigationMenuPanelAnchor = 'menu'` (attribute `panel-anchor`, reflected) —
|
|
63
|
-
`menu` aligns every panel with the start edge of the item row, so switching panels resizes one
|
|
64
|
-
region in place; `item` aligns each panel with its own trigger (no resize animation). Unsupported
|
|
65
|
-
values, including untyped property writes, normalize to `menu` and repair the attribute.
|
|
66
|
-
- `showDelay: number = 200` (attribute `show-delay`) — hover-open delay in ms.
|
|
67
|
-
- `hideDelay: number = 150` (attribute `hide-delay`) — delay before a hover-opened panel closes once
|
|
68
|
-
the pointer leaves the item.
|
|
69
|
-
- `skipDelay: number = 300` (attribute `skip-delay`) — the hover grace window; `0` disables it.
|
|
70
|
-
- `distance: number = 6` — gap in px between the anchor and a floating panel.
|
|
71
|
-
- `collapsed` (read-only boolean getter) — whether the collapsed layout is active; `false` on the
|
|
72
|
-
server and until the first measurement. Mirrored to the `collapsed` custom state.
|
|
73
|
-
|
|
74
|
-
The three delays are JavaScript timer inputs, not CSS custom properties, and use the same
|
|
75
|
-
`show-delay`/`hide-delay` vocabulary as `lr-tooltip`/`lr-popover`. Non-finite values fall back to
|
|
76
|
-
the defaults and negative values clamp to `0` (a `0` show delay opens in the same turn).
|
|
77
|
-
|
|
78
|
-
**Methods:** `close(): void` closes the open panel and collapses an expanded list (both announced
|
|
79
|
-
with source `programmatic`), for single-page route changes. Focus moves only when the close would
|
|
80
|
-
hide the focused element; a router's own later `focus()` still wins.
|
|
81
|
-
|
|
82
|
-
**Events:** `lr-expanded-change` — `detail: LyraNavigationMenuExpandedChangeDetail`
|
|
83
|
-
(`{ expanded, source: 'user' | 'programmatic' }`), not cancelable, fired after a change to
|
|
84
|
-
`expanded` renders. `user` covers the toggle, Escape in the collapsed list, and a link or
|
|
85
|
-
plain-button activation that collapses it. The menu never emits `lr-toggle` itself.
|
|
86
|
-
|
|
87
|
-
**Slots:** default — `lr-navigation-menu-item` children only; `toggle-icon` — replaces the hamburger
|
|
88
|
-
glyph (inert, `aria-hidden`). Every default-slot child renders inside the `role="list"`, so a
|
|
89
|
-
non-item child fails axe and draws a one-time development warning: keep header chrome such as a
|
|
90
|
-
logo, search or actions *outside* the menu.
|
|
91
|
-
|
|
92
|
-
**CSS parts:** `base` (the `nav`), `list`, `toggle` (collapsed layout only), `toggle-icon`,
|
|
93
|
-
`toggle-label`, `indicator` (with `indicator`, bar layout only) and `indicator-arrow`.
|
|
94
|
-
|
|
95
|
-
**Custom state:** `collapsed`.
|
|
96
|
-
|
|
97
|
-
**Custom properties:** `--lr-navigation-menu-gap` (default `var(--lr-space-xs)`, both layouts),
|
|
98
|
-
`--lr-navigation-menu-indicator-size` (default `var(--lr-size-0-375rem)`),
|
|
99
|
-
`--lr-navigation-menu-indicator-color` (default
|
|
100
|
-
`var(--lr-overlay-border, var(--lr-color-border-subtle))`, matching the panel edge), and
|
|
101
|
-
`--lr-navigation-menu-toggle-active-color` (default `var(--lr-color-text)`), and
|
|
102
|
-
`--lr-positioning-strategy` (read by the items when positioning their panels). All are read through
|
|
103
|
-
inline fallbacks, so they can be set on the menu or any ancestor.
|
|
104
|
-
|
|
105
|
-
**Collapsed layout.** A "Menu" toggle (`aria-expanded`/`aria-controls` pointing at the list; the
|
|
106
|
-
visible text is the localized `menuLabel`) shows and hides the items as a column. Items stretch to
|
|
107
|
-
the full width and each panel opens in flow below its trigger, indented with a decorative subtle
|
|
108
|
-
rule. Hover and arrow keys are off; Escape first closes an open panel (focus to its trigger), then
|
|
109
|
-
collapses the list (focus to the toggle). The same nodes serve both layouts; nothing moves between
|
|
110
|
-
containers, so the collapse never drops focus. Crossing the breakpoint closes the open panel
|
|
111
|
-
(source `programmatic`) and repairs focus. For a drawer, place the menu inside `lr-drawer` or
|
|
112
|
-
`lr-page`'s `navigation` slot.
|
|
113
|
-
|
|
114
|
-
**Host allocation.** The host defaults to `display: block; flex: 1 1 0%; min-inline-size: 0`. In a
|
|
115
|
-
flex-row header (including `lr-page`'s header) the menu therefore takes the remaining space rather
|
|
116
|
-
than its content size; a content-sized collapsed menu could otherwise shrink to its toggle and never
|
|
117
|
-
measure wide enough to leave the collapsed layout. Outside a flex parent the declaration is inert.
|
|
118
|
-
In a column flex parent (for example `lr-page`'s navigation region) the host grows in the block axis
|
|
119
|
-
instead — set `flex: none` there. Shrink-to-fit contexts (an `auto` grid track, inline-flex, floats,
|
|
120
|
-
absolute positioning) can still latch collapsed: give the menu a definite inline size there.
|
|
121
|
-
|
|
122
|
-
**Motion.** Panels open and close through the `navigation-menu.show` and `navigation-menu.hide`
|
|
123
|
-
registry animations; a switch between panels resizes the shared region (timed by
|
|
124
|
-
`--lr-navigation-menu-switch-duration`) while the new content slides in through
|
|
125
|
-
`navigation-menu.enter-from-start` or `navigation-menu.enter-from-end`. The menu is the registry host
|
|
126
|
-
for every owned item, so `setAnimation(menu, 'navigation-menu.show', null)` applies to all of them.
|
|
127
|
-
Reduced motion flattens every transition and skips the resize.
|
|
128
|
-
|
|
129
|
-
**SSR and hydration.** The server renders the bar layout with the landmark named. Every link item is
|
|
130
|
-
an `<a>`; every other item renders as a trigger (caret visible, `aria-expanded="false"`) because slot
|
|
131
|
-
content cannot be inspected on the server, and every panel renders hidden, even for `open` markup.
|
|
132
|
-
The first browser update drops the caret and ARIA from plain buttons, sets `role="listitem"` on the
|
|
133
|
-
item hosts, keeps only the first `open` item, and reveals and positions its panel.
|
|
134
|
-
|
|
135
|
-
```html
|
|
136
|
-
<script type="module">
|
|
137
|
-
import '@aceshooting/lyra-ui/components/layout/navigation-menu/navigation-menu.js';
|
|
138
|
-
</script>
|
|
139
|
-
|
|
140
|
-
<header style="display: flex; align-items: center; justify-content: space-between">
|
|
141
|
-
<a href="/">Acme</a>
|
|
142
|
-
<lr-navigation-menu aria-label="Main" mobile-breakpoint="40rem">
|
|
143
|
-
<lr-navigation-menu-item>
|
|
144
|
-
Products
|
|
145
|
-
<ul slot="panel">
|
|
146
|
-
<li><a href="/analytics">Analytics</a></li>
|
|
147
|
-
<li><a href="/billing">Billing</a></li>
|
|
148
|
-
</ul>
|
|
149
|
-
</lr-navigation-menu-item>
|
|
150
|
-
<lr-navigation-menu-item href="/docs" current>Docs</lr-navigation-menu-item>
|
|
151
|
-
<lr-navigation-menu-item href="/pricing">Pricing</lr-navigation-menu-item>
|
|
152
|
-
</lr-navigation-menu>
|
|
153
|
-
<a href="/sign-in">Sign in</a>
|
|
154
|
-
</header>
|
|
155
|
-
```
|
|
156
|
-
|
|
157
|
-
The registration module also registers `lr-navigation-menu-item`.
|
|
158
|
-
|
|
159
|
-
### `lr-navigation-menu-item`
|
|
160
|
-
|
|
161
|
-
One entry of the bar. The kind follows from the markup:
|
|
162
|
-
|
|
163
|
-
1. A safe `href` makes a **link item**: a native `<a>` with `aria-current="page"` while `current`
|
|
164
|
-
(otherwise `"false"`). Its `panel` slot is never displayed. This is decided from attributes alone,
|
|
165
|
-
so it is stable without JavaScript. An unsafe scheme such as `javascript:` renders a button.
|
|
166
|
-
2. Otherwise the item is a native `<button type="button">`: a **disclosure trigger** when the `panel`
|
|
167
|
-
slot has content (it gains `aria-expanded` in both states, `aria-controls` pointing at the panel
|
|
168
|
-
in the same shadow root, and the caret), or a **plain button** with no disclosure state when it
|
|
169
|
-
does not — useful for single-page routers. Activating a plain button closes the open panel (and
|
|
170
|
-
collapses the collapsed list).
|
|
171
|
-
|
|
172
|
-
The panel has no role and no name; the lists and links inside own the semantics. Outside an
|
|
173
|
-
`lr-navigation-menu` the item works as a plain in-flow disclosure: no positioning, no overlay, no
|
|
174
|
-
hover opening.
|
|
175
|
-
|
|
176
|
-
**Properties:**
|
|
177
|
-
|
|
178
|
-
- `accessibleLabel?: string` (attribute `aria-label`) — forwarded by presence to the link or button,
|
|
179
|
-
including an explicitly empty value.
|
|
180
|
-
- `href: string = ''` — link URL, sanitized; a safe value makes a link item.
|
|
181
|
-
- `target: string = ''` — native link target. Any non-empty value forces `noopener noreferrer`.
|
|
182
|
-
- `rel: string = ''` — author tokens are kept, `opener` is dropped in any letter case, duplicates
|
|
183
|
-
collapse, and `noopener noreferrer` is added whenever `target` is set; nothing left omits the
|
|
184
|
-
attribute.
|
|
185
|
-
- `current: boolean = false` (reflected) — on a link, `aria-current="page"`; on a trigger or plain
|
|
186
|
-
button, only the `base-current` part (a disclosure is not the page — mark the current link inside
|
|
187
|
-
the panel instead).
|
|
188
|
-
- `open: boolean = false` (reflected) — whether the panel is shown. A write is refused silently only
|
|
189
|
-
when the item cannot disclose: it is a link item, or its `panel` slot is empty once slot content can
|
|
190
|
-
be inspected. Within one menu only one item is open at a time.
|
|
191
|
-
|
|
192
|
-
**Methods:** `focus(options?)` and `click()` forward to the link or button.
|
|
193
|
-
|
|
194
|
-
**Events:** `lr-toggle` — `detail: LyraNavigationMenuToggleDetail` (`{ open, source }`, where
|
|
195
|
-
`source` is `'user' | 'programmatic' | 'peer'`, the same vocabulary as `lr-details`), not cancelable,
|
|
196
|
-
fired after an accepted change renders and never for initial markup. `user` covers click, Enter,
|
|
197
|
-
Space, hover, Escape, light dismiss, focus leaving and link activation; `programmatic` covers `open`
|
|
198
|
-
writes, the menu's `close()`, a layout change and losing the panel content; `peer` means a sibling
|
|
199
|
-
opened. Panel content such as `lr-details` also bubbles `lr-toggle`, so a delegated listener filters
|
|
200
|
-
on `event.target.localName`.
|
|
201
|
-
|
|
202
|
-
**Slots:** default — the label; `start`/`end` — adornments inside the link or button; `panel` —
|
|
203
|
-
flyout content; `expand-icon` — replaces the caret (inert, `aria-hidden`).
|
|
204
|
-
|
|
205
|
-
**CSS parts:** `base` (the `<a>` or `<button>`, also carrying `base-current` while `current` and
|
|
206
|
-
`base-open` while its panel is open — state lives in the part name because only pseudo-classes may
|
|
207
|
-
follow `::part()`), `base-current`, `base-open`, `start`, `label`, `end`, `expand-icon` and `panel`.
|
|
208
|
-
|
|
209
|
-
**Custom properties:** `--lr-navigation-menu-item-padding-inline` (default `var(--lr-space-l)`),
|
|
210
|
-
`--lr-navigation-menu-item-min-block-size` (default
|
|
211
|
-
`var(--lr-form-control-height-m, var(--lr-theme-form-control-height-m, var(--lr-size-2-5rem)))`,
|
|
212
|
-
never below `--lr-icon-button-size`), `--lr-navigation-menu-item-font-size` (default
|
|
213
|
-
`var(--lr-font-size-m)`), `--lr-navigation-menu-item-font-weight` (default
|
|
214
|
-
`var(--lr-font-weight-medium)`), `--lr-navigation-menu-item-hover-bg` (default
|
|
215
|
-
`var(--lr-color-brand-quiet)`), `--lr-navigation-menu-item-hover-color` (default
|
|
216
|
-
`var(--lr-color-brand)`), `--lr-navigation-menu-item-active-bg` (default a `color-mix()` of
|
|
217
|
-
`--lr-color-brand-quiet` toward `--lr-color-mix-partner`), `--lr-navigation-menu-item-open-bg`
|
|
218
|
-
(default `var(--lr-color-brand-quiet)`), `--lr-navigation-menu-item-active-color` (default
|
|
219
|
-
`var(--lr-color-text)`), `--lr-navigation-menu-item-current-color` (default
|
|
220
|
-
`var(--lr-color-brand)`), `--lr-navigation-menu-item-current-font-weight` (default
|
|
221
|
-
`var(--lr-font-weight-semibold)`), `--lr-navigation-menu-panel-padding` (default `var(--lr-space-s)`),
|
|
222
|
-
`--lr-navigation-menu-panel-max-inline-size` (default `var(--lr-size-48rem)`, also capped by the
|
|
223
|
-
space the viewport leaves), `--lr-navigation-menu-panel-indent` (default `var(--lr-space-l)`,
|
|
224
|
-
collapsed layout), `--lr-navigation-menu-show-duration` and `--lr-navigation-menu-hide-duration`
|
|
225
|
-
(default `var(--lr-duration-fast)`), `--lr-navigation-menu-switch-duration` (default
|
|
226
|
-
`var(--lr-duration-base)`), the shared floating-surface family `--lr-overlay-surface`,
|
|
227
|
-
`--lr-overlay-border` (panels take the subtle edge tier), `--lr-overlay-radius` and
|
|
228
|
-
`--lr-overlay-shadow-anchored`, and `--lr-positioning-strategy` (the floating panel is `fixed` by
|
|
229
|
-
default). All are inline fallbacks, so they can be set on the item, on the menu or on any ancestor.
|
|
230
|
-
The item does not take the `size` ladder.
|
|
231
|
-
|
|
232
|
-
```html
|
|
233
|
-
<script type="module">
|
|
234
|
-
import '@aceshooting/lyra-ui/components/layout/navigation-menu-item/navigation-menu-item.js';
|
|
235
|
-
</script>
|
|
236
|
-
|
|
237
|
-
<lr-navigation-menu-item>
|
|
238
|
-
Products
|
|
239
|
-
<ul slot="panel">
|
|
240
|
-
<li><a href="/analytics">Analytics</a></li>
|
|
241
|
-
</ul>
|
|
242
|
-
</lr-navigation-menu-item>
|
|
243
|
-
<lr-navigation-menu-item href="https://example.com/" target="_blank" rel="external">Example</lr-navigation-menu-item>
|
|
244
|
-
```
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
- **`components-layout-menubar-contracts`** — Typed pass-through menu selection.
|
|
248
|
-
Import: `@aceshooting/lyra-ui/components/layout/menubar/menubar.class.js`.
|
|
249
|
-
`LyraMenubarEventMap { 'lr-select': CustomEvent<MenuItemSelectDetail>; }`
|
|
@@ -34,6 +34,10 @@ disabled state.
|
|
|
34
34
|
|
|
35
35
|
The inherited `--lr-input-*` theme inputs keep `lr-input`'s ancestor-theme precedence; the number
|
|
36
36
|
subclass does not redeclare them on its host.
|
|
37
|
+
Beside the stepper pair it keeps `lr-input`'s constrained-row allocation: the number field gives up
|
|
38
|
+
its spare width first, down to a four-character floor while a unit is shown, so a short `end` unit
|
|
39
|
+
stays whole (the `Narrow Measurement Unit` story). A stepper row with a unit therefore needs room
|
|
40
|
+
for the steppers plus that floor; without a unit the field still yields entirely to the steppers.
|
|
37
41
|
It also installs the shared six-tier size sheet: stepper-bearing rows follow the same rendered
|
|
38
42
|
action-height ladder as `lr-input` instead of remaining at the default tier for every `size`.
|
|
39
43
|
|