@aceshooting/lyra-ui 10.0.1 → 11.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 +271 -0
- package/custom-elements.json +1 -1
- package/design-tokens.json +13 -0
- package/dist/cli/migrate-wa.mjs +164 -1
- package/dist/cli/migration-contract.json +1 -1
- package/dist/components/charts/chart/box-plot.class.d.ts +27 -0
- package/dist/components/charts/chart/box-plot.class.js +14 -4
- package/dist/components/charts/chart/box-plot.styles.js +28 -0
- package/dist/components/charts/chart/chart.class.d.ts +27 -0
- package/dist/components/charts/chart/chart.class.js +15 -5
- package/dist/components/charts/chart/chart.styles.js +28 -0
- package/dist/components/charts/chart/lite-chart.class.d.ts +32 -0
- package/dist/components/charts/chart/lite-chart.class.js +17 -4
- package/dist/components/charts/chart/lite-chart.styles.js +29 -0
- package/dist/components/data/heatmap/heatmap.class.d.ts +35 -2
- package/dist/components/data/heatmap/heatmap.class.js +2 -2
- package/dist/components/data/table/table.class.d.ts +19 -0
- package/dist/components/data/table/table.class.js +3 -3
- package/dist/components/forms/combobox/combobox.class.d.ts +71 -3
- package/dist/components/forms/combobox/combobox.class.js +4 -2
- package/dist/components/forms/combobox/combobox.styles.js +9 -0
- package/dist/components/forms/date-picker/date-input.class.d.ts +12 -1
- package/dist/components/forms/date-picker/date-input.class.js +4 -2
- package/dist/components/forms/date-picker/date-picker.class.d.ts +72 -0
- package/dist/components/forms/date-picker/date-picker.class.js +15 -3
- package/dist/components/forms/date-picker/date-picker.styles.js +46 -0
- package/dist/components/media/flag/flag.class.d.ts +3 -1
- package/dist/components/media/flag/flag.class.js +1 -1
- package/dist/components/media/map/map.class.d.ts +39 -2
- package/dist/components/media/map/map.class.js +1 -1
- package/dist/components/overlays/dialog/dialog.class.d.ts +20 -0
- package/dist/components/overlays/overlay/popover.class.d.ts +19 -3
- package/dist/components/overlays/overlay/popover.class.js +1 -1
- package/dist/components/viewers/pdf-viewer/pdf-viewer.class.js +1 -1
- package/dist/custom-elements-jsx.d.ts +31 -16
- package/dist/internal/canvas.js +1 -1
- package/dist/internal/package-metadata.d.ts +1 -1
- package/dist/internal/package-metadata.js +1 -1
- package/dist/internal/tokens.styles.js +1 -0
- package/dist/lyra.d.ts +1 -1
- package/dist/svelte.d.ts +31 -16
- package/dist/theme.css +32 -0
- package/dist/vue.d.ts +31 -16
- package/llms/components/lr-agent-eval-dashboard.md +1 -1
- package/llms/components/lr-agent-workspace.md +1 -1
- package/llms/components/lr-bar-chart.md +4 -3
- package/llms/components/lr-box-plot.md +15 -4
- package/llms/components/lr-bubble-chart.md +4 -3
- package/llms/components/lr-chart.md +13 -3
- package/llms/components/lr-chunk-inspector.md +1 -1
- package/llms/components/lr-combobox.md +42 -6
- package/llms/components/lr-date-input.md +40 -4
- package/llms/components/lr-date-picker.md +40 -4
- package/llms/components/lr-dialog.md +2 -1
- package/llms/components/lr-doughnut-chart.md +4 -3
- package/llms/components/lr-entity-dossier.md +1 -1
- package/llms/components/lr-eval-run.md +1 -1
- package/llms/components/lr-flag.md +10 -3
- package/llms/components/lr-grounding-summary.md +1 -1
- package/llms/components/lr-heatmap.md +20 -2
- package/llms/components/lr-histogram.md +4 -3
- package/llms/components/lr-line-chart.md +4 -3
- package/llms/components/lr-lite-chart.md +19 -3
- package/llms/components/lr-map.md +21 -4
- package/llms/components/lr-memory-panel.md +1 -1
- package/llms/components/lr-option.md +41 -5
- package/llms/components/lr-pie-chart.md +4 -3
- package/llms/components/lr-polar-area-chart.md +4 -3
- package/llms/components/lr-popover.md +20 -1
- package/llms/components/lr-provenance-panel.md +1 -1
- package/llms/components/lr-radar-chart.md +4 -3
- package/llms/components/lr-rag-answer.md +1 -1
- package/llms/components/lr-rag-eval-dashboard.md +1 -1
- package/llms/components/lr-retrieval-results.md +1 -1
- package/llms/components/lr-retrieval-trace.md +1 -1
- package/llms/components/lr-scatter-chart.md +4 -3
- package/llms/peers.md +8 -8
- package/llms/tokens.md +27 -1
- package/llms-full.txt +231 -28
- package/package.json +1 -1
- package/vscode-css-data.json +70 -0
- package/vscode-html-data.json +131 -20
- package/web-types.json +190 -23
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
- **Status** `experimental` since `4.0.0` — see the maturity and deprecation policy in `llms/shared.md`
|
|
9
9
|
- **Deprecations** none
|
|
10
10
|
- **Optional peers** none
|
|
11
|
-
- **Themeable via**
|
|
11
|
+
- **Themeable via** 22 parts, 20 custom properties — see this component's own `@csspart`/`@cssprop` list below
|
|
12
12
|
- **Documented with** `lr-date-picker` (same section below)
|
|
13
13
|
- **Library-wide behavior** (events, form association, `locale`/`strings`, tokens, TS types): `llms/shared.md`
|
|
14
14
|
|
|
@@ -31,9 +31,36 @@ Arabic/Persian display round-trips to the same ISO value.
|
|
|
31
31
|
Inline month-grid calendar, not form-associated (used standalone or embedded inside
|
|
32
32
|
`lr-date-input`'s popover).
|
|
33
33
|
|
|
34
|
-
**Properties (
|
|
34
|
+
**Properties (28):**
|
|
35
35
|
|
|
36
36
|
- `dayContent` (JS only): `LyraDatePickerDayContent | undefined`
|
|
37
|
+
- `presets: LyraDateRangePreset[] = []` (JS only, new in 11.0.0) —
|
|
38
|
+
`LyraDateRangePreset { label: string; start?: string; end?: string }`, where `start`/`end` are ISO
|
|
39
|
+
`YYYY-MM-DD`. **Either bound may be omitted (new in 11.1.0)** to mean an OPEN bound, resolving to
|
|
40
|
+
the picker's `min` / `max` respectively — that is how an "All time" preset is expressed. When the
|
|
41
|
+
corresponding `min`/`max` is unset there is nothing to resolve to (a `value` of
|
|
42
|
+
`YYYY-MM-DD/YYYY-MM-DD` has no unbounded spelling), so that preset's button renders **disabled**
|
|
43
|
+
rather than looking live and doing nothing when pressed. Renders a `[part="presets"]` quick-range button row above the calendar, for the
|
|
44
|
+
dashboard time-filter shape (Today / Last 7 days / Last 30 days / This month / All time).
|
|
45
|
+
**Range mode only** — a preset names two dates, so it is ignored for a single-date picker rather
|
|
46
|
+
than rendering a row that cannot do anything; unset renders nothing at all. Applying one commits
|
|
47
|
+
through the same path a two-click selection uses, so the ISO serialization, the `min`/`max`
|
|
48
|
+
clamping and the `input`-then-`change` pair are identical and a consumer's change handler cannot
|
|
49
|
+
tell them apart. A reversed preset normalizes; a malformed one is ignored rather than clearing the
|
|
50
|
+
current value, so a bad entry in a config-driven list never reads as "the user picked nothing".
|
|
51
|
+
The active button carries `aria-pressed="true"` and `data-active`. Deliberately the same
|
|
52
|
+
`label`/`start`/`end` shape as `<lr-time-range>`'s `TimeRangePreset`, so the library has one
|
|
53
|
+
preset vocabulary rather than two — the only difference is the unit (ISO dates, not numbers)
|
|
54
|
+
- `appliedPreset: LyraDateRangePreset | undefined` (read-only, new in 11.1.0) — the preset whose
|
|
55
|
+
button produced the current `value`, or `undefined` when the range was picked by hand. Read it
|
|
56
|
+
inside your own `change`/`input` handler. It exists because a dashboard filter has to persist
|
|
57
|
+
*which* preset is active rather than the pair it froze to: "Last 7 days" must still mean the last
|
|
58
|
+
7 days after tomorrow's reload. That fact is not recoverable from `value` — re-deriving it by
|
|
59
|
+
string-matching is the mapping table `presets` exists to delete, and it is ambiguous anyway
|
|
60
|
+
(Today and This month coincide on the 1st of a month, and a hand-picked range can equal a
|
|
61
|
+
preset's pair by construction). A property rather than an event detail because `input`/`change`
|
|
62
|
+
here are **native** events, deliberately indistinguishable from a manual selection so existing
|
|
63
|
+
handlers need no special case, and a native `Event` cannot carry a detail without changing type
|
|
37
64
|
- `disabled: boolean = false` (reflected)
|
|
38
65
|
- `disabledDates: string | string[] | Date[] = ''` (attribute `disabled-dates`)
|
|
39
66
|
- `disabledDaysOfWeek: string = ''` (attribute `disabled-days-of-week`)
|
|
@@ -85,11 +112,13 @@ values. `lr-focus-day` carries `{ date: Date }`, and `lr-view-change` carries `{
|
|
|
85
112
|
|
|
86
113
|
**Custom states:** `disabled`, `range`, and `readonly`.
|
|
87
114
|
|
|
88
|
-
**CSS parts (
|
|
115
|
+
**CSS parts (37):** `date-picker` / permanent compatibility name `base` (tokens on the same
|
|
89
116
|
visible shell; both names remain supported), `day`, `day-disabled`, `day-label`, `day-outside`,
|
|
90
117
|
`day-placeholder`, `day-range-end`, `day-range-inner`, `day-range-preview`, `day-range-start`,
|
|
91
118
|
`day-selected`, `day-today`, `day-weekend`, `footer`, `grid`, `header`, `month`, `month-label`,
|
|
92
119
|
`months`, `nav`, `next`, `previous`, `title`, `view-cell`, `view-grid`, `view-item`,
|
|
120
|
+
`presets` (the quick-range row), `preset-button` (one quick-range button; carries `data-active`
|
|
121
|
+
while its range is the current value),
|
|
93
122
|
`view-item-disabled`, `view-item-selected`, `view-item-today`, `view-row`, `weekday`, `weekdays`,
|
|
94
123
|
`weeknumber`, and `weeknumbers`. Lyra additionally retains the existing `week` part.
|
|
95
124
|
|
|
@@ -199,7 +228,9 @@ capped at 40% and ellipsize unbroken content. Clear and calendar actions retain
|
|
|
199
228
|
**Custom states:** `blank`, `disabled`, `open`, and `range`; the shared form-associated mixin also
|
|
200
229
|
exposes its validity states.
|
|
201
230
|
|
|
202
|
-
**CSS parts (
|
|
231
|
+
**CSS parts (21):** `clear-button`, `date-input`, `date-picker`, `presets` and `preset-button`
|
|
232
|
+
(forwarded from the nested `lr-date-picker` via `exportparts`, so the quick-range row is styleable
|
|
233
|
+
from outside — new in 11.1.0), `end`, `expand-button`,
|
|
203
234
|
`expand-icon`, `form-control`, `form-control-input`, `form-control-label`, `hint`, `input`,
|
|
204
235
|
`input-wrapper`, `popup`, `range-separator`, `segment`, `segment-literal`, `start`, permanent
|
|
205
236
|
compatibility name `base` (a nested wrapper inside `date-input`), and permanent compatibility name
|
|
@@ -331,6 +362,11 @@ and `dateTimeFormat(locale, options)`.
|
|
|
331
362
|
`::part(previous):hover` still wins without `!important`.
|
|
332
363
|
- `--lr-date-picker-nav-active-bg` — Pressed navigation background; defaults to the hover color
|
|
333
364
|
mixed by `--lr-color-mix-active`.
|
|
365
|
+
- `--lr-date-picker-preset-hover-bg`, `--lr-date-picker-preset-active-bg`, and
|
|
366
|
+
`--lr-date-picker-preset-selected-bg` (new in 11.0.0) — hover, pressed, and
|
|
367
|
+
currently-selected paint for a `presets` quick-range button. Defaults are
|
|
368
|
+
`var(--lr-color-brand-quiet)`, that hover colour mixed by `--lr-color-mix-active`, and
|
|
369
|
+
`var(--lr-color-brand)` respectively.
|
|
334
370
|
- `--lr-date-picker-title-hover-color`, `--lr-date-picker-title-active-color`,
|
|
335
371
|
`--lr-date-picker-title-active-bg`, and `--lr-date-picker-title-active-radius` — Month-title
|
|
336
372
|
hover/press paint and pressed shape; defaults to brand, brand, brand-quiet, and
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
- **Status** `experimental` since `4.0.0` — see the maturity and deprecation policy in `llms/shared.md`
|
|
9
9
|
- **Deprecations** none
|
|
10
10
|
- **Optional peers** none
|
|
11
|
-
- **Themeable via**
|
|
11
|
+
- **Themeable via** 38 parts, 30 custom properties — see this component's own `@csspart`/`@cssprop` list below
|
|
12
12
|
- **Documented with** `lr-date-input` (same section below)
|
|
13
13
|
- **Library-wide behavior** (events, form association, `locale`/`strings`, tokens, TS types): `llms/shared.md`
|
|
14
14
|
|
|
@@ -31,9 +31,36 @@ Arabic/Persian display round-trips to the same ISO value.
|
|
|
31
31
|
Inline month-grid calendar, not form-associated (used standalone or embedded inside
|
|
32
32
|
`lr-date-input`'s popover).
|
|
33
33
|
|
|
34
|
-
**Properties (
|
|
34
|
+
**Properties (28):**
|
|
35
35
|
|
|
36
36
|
- `dayContent` (JS only): `LyraDatePickerDayContent | undefined`
|
|
37
|
+
- `presets: LyraDateRangePreset[] = []` (JS only, new in 11.0.0) —
|
|
38
|
+
`LyraDateRangePreset { label: string; start?: string; end?: string }`, where `start`/`end` are ISO
|
|
39
|
+
`YYYY-MM-DD`. **Either bound may be omitted (new in 11.1.0)** to mean an OPEN bound, resolving to
|
|
40
|
+
the picker's `min` / `max` respectively — that is how an "All time" preset is expressed. When the
|
|
41
|
+
corresponding `min`/`max` is unset there is nothing to resolve to (a `value` of
|
|
42
|
+
`YYYY-MM-DD/YYYY-MM-DD` has no unbounded spelling), so that preset's button renders **disabled**
|
|
43
|
+
rather than looking live and doing nothing when pressed. Renders a `[part="presets"]` quick-range button row above the calendar, for the
|
|
44
|
+
dashboard time-filter shape (Today / Last 7 days / Last 30 days / This month / All time).
|
|
45
|
+
**Range mode only** — a preset names two dates, so it is ignored for a single-date picker rather
|
|
46
|
+
than rendering a row that cannot do anything; unset renders nothing at all. Applying one commits
|
|
47
|
+
through the same path a two-click selection uses, so the ISO serialization, the `min`/`max`
|
|
48
|
+
clamping and the `input`-then-`change` pair are identical and a consumer's change handler cannot
|
|
49
|
+
tell them apart. A reversed preset normalizes; a malformed one is ignored rather than clearing the
|
|
50
|
+
current value, so a bad entry in a config-driven list never reads as "the user picked nothing".
|
|
51
|
+
The active button carries `aria-pressed="true"` and `data-active`. Deliberately the same
|
|
52
|
+
`label`/`start`/`end` shape as `<lr-time-range>`'s `TimeRangePreset`, so the library has one
|
|
53
|
+
preset vocabulary rather than two — the only difference is the unit (ISO dates, not numbers)
|
|
54
|
+
- `appliedPreset: LyraDateRangePreset | undefined` (read-only, new in 11.1.0) — the preset whose
|
|
55
|
+
button produced the current `value`, or `undefined` when the range was picked by hand. Read it
|
|
56
|
+
inside your own `change`/`input` handler. It exists because a dashboard filter has to persist
|
|
57
|
+
*which* preset is active rather than the pair it froze to: "Last 7 days" must still mean the last
|
|
58
|
+
7 days after tomorrow's reload. That fact is not recoverable from `value` — re-deriving it by
|
|
59
|
+
string-matching is the mapping table `presets` exists to delete, and it is ambiguous anyway
|
|
60
|
+
(Today and This month coincide on the 1st of a month, and a hand-picked range can equal a
|
|
61
|
+
preset's pair by construction). A property rather than an event detail because `input`/`change`
|
|
62
|
+
here are **native** events, deliberately indistinguishable from a manual selection so existing
|
|
63
|
+
handlers need no special case, and a native `Event` cannot carry a detail without changing type
|
|
37
64
|
- `disabled: boolean = false` (reflected)
|
|
38
65
|
- `disabledDates: string | string[] | Date[] = ''` (attribute `disabled-dates`)
|
|
39
66
|
- `disabledDaysOfWeek: string = ''` (attribute `disabled-days-of-week`)
|
|
@@ -85,11 +112,13 @@ values. `lr-focus-day` carries `{ date: Date }`, and `lr-view-change` carries `{
|
|
|
85
112
|
|
|
86
113
|
**Custom states:** `disabled`, `range`, and `readonly`.
|
|
87
114
|
|
|
88
|
-
**CSS parts (
|
|
115
|
+
**CSS parts (37):** `date-picker` / permanent compatibility name `base` (tokens on the same
|
|
89
116
|
visible shell; both names remain supported), `day`, `day-disabled`, `day-label`, `day-outside`,
|
|
90
117
|
`day-placeholder`, `day-range-end`, `day-range-inner`, `day-range-preview`, `day-range-start`,
|
|
91
118
|
`day-selected`, `day-today`, `day-weekend`, `footer`, `grid`, `header`, `month`, `month-label`,
|
|
92
119
|
`months`, `nav`, `next`, `previous`, `title`, `view-cell`, `view-grid`, `view-item`,
|
|
120
|
+
`presets` (the quick-range row), `preset-button` (one quick-range button; carries `data-active`
|
|
121
|
+
while its range is the current value),
|
|
93
122
|
`view-item-disabled`, `view-item-selected`, `view-item-today`, `view-row`, `weekday`, `weekdays`,
|
|
94
123
|
`weeknumber`, and `weeknumbers`. Lyra additionally retains the existing `week` part.
|
|
95
124
|
|
|
@@ -199,7 +228,9 @@ capped at 40% and ellipsize unbroken content. Clear and calendar actions retain
|
|
|
199
228
|
**Custom states:** `blank`, `disabled`, `open`, and `range`; the shared form-associated mixin also
|
|
200
229
|
exposes its validity states.
|
|
201
230
|
|
|
202
|
-
**CSS parts (
|
|
231
|
+
**CSS parts (21):** `clear-button`, `date-input`, `date-picker`, `presets` and `preset-button`
|
|
232
|
+
(forwarded from the nested `lr-date-picker` via `exportparts`, so the quick-range row is styleable
|
|
233
|
+
from outside — new in 11.1.0), `end`, `expand-button`,
|
|
203
234
|
`expand-icon`, `form-control`, `form-control-input`, `form-control-label`, `hint`, `input`,
|
|
204
235
|
`input-wrapper`, `popup`, `range-separator`, `segment`, `segment-literal`, `start`, permanent
|
|
205
236
|
compatibility name `base` (a nested wrapper inside `date-input`), and permanent compatibility name
|
|
@@ -331,6 +362,11 @@ and `dateTimeFormat(locale, options)`.
|
|
|
331
362
|
`::part(previous):hover` still wins without `!important`.
|
|
332
363
|
- `--lr-date-picker-nav-active-bg` — Pressed navigation background; defaults to the hover color
|
|
333
364
|
mixed by `--lr-color-mix-active`.
|
|
365
|
+
- `--lr-date-picker-preset-hover-bg`, `--lr-date-picker-preset-active-bg`, and
|
|
366
|
+
`--lr-date-picker-preset-selected-bg` (new in 11.0.0) — hover, pressed, and
|
|
367
|
+
currently-selected paint for a `presets` quick-range button. Defaults are
|
|
368
|
+
`var(--lr-color-brand-quiet)`, that hover colour mixed by `--lr-color-mix-active`, and
|
|
369
|
+
`var(--lr-color-brand)` respectively.
|
|
334
370
|
- `--lr-date-picker-title-hover-color`, `--lr-date-picker-title-active-color`,
|
|
335
371
|
`--lr-date-picker-title-active-bg`, and `--lr-date-picker-title-active-radius` — Month-title
|
|
336
372
|
hover/press paint and pressed shape; defaults to brand, brand, brand-quiet, and
|
|
@@ -98,7 +98,8 @@ chrome remains visible. The fallback order appears below.
|
|
|
98
98
|
`<lr-tool-approval-dialog>`, whose own docs describe an identical detail shape, so one listener
|
|
99
99
|
covers all of them. A listener calling `preventDefault()` vetoes the close. Also fired (with
|
|
100
100
|
reason `'unmount'`, non-cancelable there) when the dialog is removed from the DOM while still
|
|
101
|
-
open.
|
|
101
|
+
open. **But the name is not dialog-scoped** — see the target-filtering note above; nine
|
|
102
|
+
components emit `lr-close`, and several are routinely nested inside a dialog.
|
|
102
103
|
|
|
103
104
|
The two `lr-after-*` events are never cancelable.
|
|
104
105
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
- **Status** `stable` since `4.0.0` — see the maturity and deprecation policy in `llms/shared.md`
|
|
9
9
|
- **Deprecations** none
|
|
10
10
|
- **Optional peers** `chart.js`, `chartjs-plugin-annotation`, `chartjs-plugin-datalabels`, `chartjs-plugin-zoom` — see `llms/peers.md`
|
|
11
|
-
- **Themeable via**
|
|
11
|
+
- **Themeable via** 16 parts, 35 custom properties — see this component's own `@csspart`/`@cssprop` list below
|
|
12
12
|
- **Documented with** `lr-line-chart`, `lr-bar-chart`, `lr-pie-chart`, `lr-radar-chart`, `lr-polar-area-chart`, `lr-bubble-chart`, `lr-scatter-chart` (same section below)
|
|
13
13
|
- **Library-wide behavior** (events, form association, `locale`/`strings`, tokens, TS types): `llms/shared.md`
|
|
14
14
|
|
|
@@ -44,7 +44,7 @@ complete `hiddenDatasets` snapshot).
|
|
|
44
44
|
**Slots:** default JSON configuration script, `data-table`, `center`.
|
|
45
45
|
|
|
46
46
|
**CSS parts:** `base`, `plot`, `canvas`, `legend`, `legend-item`, `legend-item-hidden`, `legend-swatch`,
|
|
47
|
-
`reset-zoom-button`, `description`, `notices`, `data-table`, `data-truncation`, `feature-warning`, `center`, `error` (neutral visible message
|
|
47
|
+
`reset-zoom-button`, `description`, `notices`, `data-table`, `data-table-toggle`, `data-truncation`, `feature-warning`, `center`, `error` (neutral visible message
|
|
48
48
|
rendered in place of `canvas` when the optional `chart.js` peer dependency fails to load; the
|
|
49
49
|
failure transition is announced through the shared document-level light-DOM assertive sink — see
|
|
50
50
|
`llms/components/lr-chart.md`).
|
|
@@ -53,7 +53,8 @@ failure transition is announced through the shared document-level light-DOM asse
|
|
|
53
53
|
`--lr-chart-tick-color`, `--lr-chart-legend-color`, `--lr-chart-tooltip-bg`,
|
|
54
54
|
`--lr-chart-tooltip-text`, `--lr-chart-legend-item-hover-bg`,
|
|
55
55
|
`--lr-chart-legend-item-active-bg`, `--lr-chart-data-table-button-hover-bg`,
|
|
56
|
-
`--lr-chart-data-table-button-active-bg`, `--lr-chart-
|
|
56
|
+
`--lr-chart-data-table-button-active-bg`, `--lr-chart-data-table-toggle-hover-bg`,
|
|
57
|
+
`--lr-chart-data-table-toggle-active-bg`, `--lr-chart-reset-zoom-button-hover-bg`,
|
|
57
58
|
`--lr-chart-reset-zoom-button-active-bg`, `--lr-chart-canvas-hover-outline-width`, and
|
|
58
59
|
`--lr-chart-pattern-step`, plus `--lr-chart-legend-side-max` — all inherited from `LyraChart`, identical in meaning and default (see
|
|
59
60
|
`lr-chart` above); each of the eight variants below reads the same set, so one rule retunes them
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
- **Family** `components/retrieval/` — see `llms/index.md` for its siblings
|
|
8
8
|
- **Status** `stable` since `4.1.0` — see the maturity and deprecation policy in `llms/shared.md`
|
|
9
9
|
- **Deprecations** none
|
|
10
|
-
- **Optional peers**
|
|
10
|
+
- **Optional peers** none
|
|
11
11
|
- **Themeable via** 9 parts, 0 custom properties — see this component's own `@csspart`/`@cssprop` list below
|
|
12
12
|
- **Library-wide behavior** (events, form association, `locale`/`strings`, tokens, TS types): `llms/shared.md`
|
|
13
13
|
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
- **Family** `components/agent-tools/` — see `llms/index.md` for its siblings
|
|
8
8
|
- **Status** `stable` since `9.0.0` — see the maturity and deprecation policy in `llms/shared.md`
|
|
9
9
|
- **Deprecations** none
|
|
10
|
-
- **Optional peers** `
|
|
10
|
+
- **Optional peers** `dompurify`, `katex`, `marked`, `shiki` — see `llms/peers.md`
|
|
11
11
|
- **Themeable via** 24 parts, 0 custom properties — see this component's own `@csspart`/`@cssprop` list below
|
|
12
12
|
- **Library-wide behavior** (events, form association, `locale`/`strings`, tokens, TS types): `llms/shared.md`
|
|
13
13
|
|
|
@@ -74,8 +74,10 @@ rectangular corner radius), `--lr-flag-aspect-ratio` (default `4 / 3`), and
|
|
|
74
74
|
image when `country` or `language` is used. Import
|
|
75
75
|
`@aceshooting/lyra-ui/components/media/flag/flag-peer.js` once to opt into
|
|
76
76
|
that resolver; a pre-resolved `src` works without the peer registration entry. If the peer is not
|
|
77
|
-
installed
|
|
78
|
-
|
|
77
|
+
installed — or if `flag-peer.js` was simply never imported, which looks identical from the page —
|
|
78
|
+
the component fails closed with localized visible `[part="error"]` text, a shared light-DOM
|
|
79
|
+
assertive announcement, and a one-time `console.warn` naming the unresolved code and this import
|
|
80
|
+
(see gotchas).
|
|
79
81
|
|
|
80
82
|
Also exported from the package root:
|
|
81
83
|
`languageToCountry(language: string): string | undefined` and the `LANGUAGE_TO_COUNTRY` lookup
|
|
@@ -161,7 +163,12 @@ import "@aceshooting/lyra-ui/components/media/flag/flag-peer.js";
|
|
|
161
163
|
`[data-lr-live-region="assertive"]` sink, so the shadow chrome itself is not live and identical
|
|
162
164
|
retries remain separate additions. The failure also produces a one-time `console.warn`
|
|
163
165
|
once the resolver rejects (lazy `import()`, cached module-wide so the warning fires only once per
|
|
164
|
-
page even with many `<lr-flag>` instances).
|
|
166
|
+
page even with many `<lr-flag>` instances). A **separate** one-time `console.warn` covers the
|
|
167
|
+
commonest setup mistake — `country`/`language` set while no resolver was ever registered, i.e.
|
|
168
|
+
`flag-peer.js` was not imported. It names the offending code and that import path, because the
|
|
169
|
+
visible `[part="error"]` state alone is indistinguishable from missing flag data. It is armed
|
|
170
|
+
once per resolver-registration generation, so a table of many flags warns once.
|
|
171
|
+
An _empty_ template is a different, non-error outcome:
|
|
165
172
|
the peer resolved fine but returned no URL for that code (e.g. `country="zz"`) — no `[part="error"]`,
|
|
166
173
|
no `<img>`, no warning.
|
|
167
174
|
- Rendering is async even when the peer _is_ installed: `src` resolves after an `import()` +
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
- **Family** `components/retrieval/` — see `llms/index.md` for its siblings
|
|
8
8
|
- **Status** `stable` since `4.1.0` — see the maturity and deprecation policy in `llms/shared.md`
|
|
9
9
|
- **Deprecations** none
|
|
10
|
-
- **Optional peers**
|
|
10
|
+
- **Optional peers** none
|
|
11
11
|
- **Themeable via** 16 parts, 0 custom properties — see this component's own `@csspart`/`@cssprop` list below
|
|
12
12
|
- **Library-wide behavior** (events, form association, `locale`/`strings`, tokens, TS types): `llms/shared.md`
|
|
13
13
|
|
|
@@ -78,8 +78,26 @@ weekdayLabelText?: (jsWeekday:number)=>string|undefined; monthLabelText?:
|
|
|
78
78
|
more here". `cellText` still carries the full label to the tooltip and the keyboard announcement.
|
|
79
79
|
A malformed value is ignored rather than collapsing the gutter. Calendar mode is unaffected; it
|
|
80
80
|
has its own fixed weekday gutter
|
|
81
|
-
- `colLabelHeight?: number` (attribute `col-label-height
|
|
82
|
-
column-label band
|
|
81
|
+
- `colLabelHeight?: number | 'auto'` (attribute `col-label-height`, not reflected, `'auto'` new in
|
|
82
|
+
11.0.0) — height, in CSS px, of the matrix column-label band, or `'auto'` to measure the labels
|
|
83
|
+
and size the band to fit them. Under a non-zero `colLabelRotation` the measurement projects each
|
|
84
|
+
label's width through the rotation, which is what makes a rotated axis usable without hand-tuning
|
|
85
|
+
a magic number. Never below the built-in `20`, and bounded above by a sanity ceiling so a
|
|
86
|
+
pathological label cannot produce an absurd canvas. Note this deliberately does **not** use
|
|
87
|
+
`rowLabelWidth`'s "40% of the host" rule: the row gutter steals width from the cells and so must
|
|
88
|
+
be bounded relative to them, whereas the canvas simply grows taller for this band and the cells
|
|
89
|
+
keep their size. Unset keeps the built-in `20`, so no existing chart reflows. A malformed value is
|
|
90
|
+
ignored
|
|
91
|
+
- `colLabelRotation?: number` (attribute `col-label-rotation`, new in 11.0.0) — rotation, in
|
|
92
|
+
degrees, applied to matrix column labels. Unset or `0` paints them horizontally exactly as before.
|
|
93
|
+
In a dense matrix the per-column width is far narrower than a typical label, so horizontal labels
|
|
94
|
+
collide with their neighbours; `45` or `90` is the standard remedy. Each label rotates about an
|
|
95
|
+
anchor at its own column's centre with the label's *end* at that anchor, so it leans back over the
|
|
96
|
+
columns to its left and the last column's label cannot overflow the canvas. Values outside
|
|
97
|
+
`[0, 90]` clamp into that range and non-finite values normalize to `0`. Pair with
|
|
98
|
+
`colLabelHeight="auto"` to have the band size itself to the rotated extent. **Not mirrored under
|
|
99
|
+
`dir="rtl"`** — both grid modes deliberately retain physical LTR geometry, so leaning one axis'
|
|
100
|
+
labels the other way would be incoherent
|
|
83
101
|
- `maxCellSize?: number` (attribute `max-cell-size`) — ceiling, in CSS px, on the cell size
|
|
84
102
|
`fitToWidth` derives from the host width, in **both** modes. Exists because `fitToWidth` divides
|
|
85
103
|
the _whole_ host width across the grid, so a 5-week calendar or a 3-column matrix in a wide pane
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
- **Status** `stable` since `4.0.0` — see the maturity and deprecation policy in `llms/shared.md`
|
|
9
9
|
- **Deprecations** none
|
|
10
10
|
- **Optional peers** `chart.js`, `chartjs-plugin-annotation`, `chartjs-plugin-datalabels`, `chartjs-plugin-zoom` — see `llms/peers.md`
|
|
11
|
-
- **Themeable via**
|
|
11
|
+
- **Themeable via** 16 parts, 35 custom properties — see this component's own `@csspart`/`@cssprop` list below
|
|
12
12
|
- **Library-wide behavior** (events, form association, `locale`/`strings`, tokens, TS types): `llms/shared.md`
|
|
13
13
|
|
|
14
14
|
---
|
|
@@ -52,7 +52,7 @@ maxSamples?)` appends finite raw samples and optionally retains only the newest
|
|
|
52
52
|
**Slots:** default JSON configuration script, `data-table`, `center`.
|
|
53
53
|
|
|
54
54
|
**CSS parts:** `base`, `plot`, `canvas`, `legend`, `legend-item`, `legend-item-hidden`, `legend-swatch`,
|
|
55
|
-
`reset-zoom-button`, `description`, `notices`, `data-table`, `data-truncation`, `feature-warning`, `center`, `error` (neutral visible message
|
|
55
|
+
`reset-zoom-button`, `description`, `notices`, `data-table`, `data-table-toggle`, `data-truncation`, `feature-warning`, `center`, `error` (neutral visible message
|
|
56
56
|
rendered in place of `canvas` when the optional `chart.js` peer dependency fails to load; the
|
|
57
57
|
failure transition is announced through the shared document-level light-DOM assertive sink —
|
|
58
58
|
inherited from `LyraChart`, unaffected by the binning logic).
|
|
@@ -61,7 +61,8 @@ inherited from `LyraChart`, unaffected by the binning logic).
|
|
|
61
61
|
`--lr-chart-tick-color`, `--lr-chart-legend-color`, `--lr-chart-tooltip-bg`,
|
|
62
62
|
`--lr-chart-tooltip-text`, `--lr-chart-legend-item-hover-bg`,
|
|
63
63
|
`--lr-chart-legend-item-active-bg`, `--lr-chart-data-table-button-hover-bg`,
|
|
64
|
-
`--lr-chart-data-table-button-active-bg`, `--lr-chart-
|
|
64
|
+
`--lr-chart-data-table-button-active-bg`, `--lr-chart-data-table-toggle-hover-bg`,
|
|
65
|
+
`--lr-chart-data-table-toggle-active-bg`, `--lr-chart-reset-zoom-button-hover-bg`,
|
|
65
66
|
`--lr-chart-reset-zoom-button-active-bg`, `--lr-chart-canvas-hover-outline-width`, and
|
|
66
67
|
`--lr-chart-pattern-step`, plus `--lr-chart-legend-side-max` — inherited from `LyraChart`, identical in meaning, together with the
|
|
67
68
|
mirrored `--border-color-1`,
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
- **Status** `stable` since `4.0.0` — see the maturity and deprecation policy in `llms/shared.md`
|
|
9
9
|
- **Deprecations** none
|
|
10
10
|
- **Optional peers** `chart.js`, `chartjs-plugin-annotation`, `chartjs-plugin-datalabels`, `chartjs-plugin-zoom` — see `llms/peers.md`
|
|
11
|
-
- **Themeable via**
|
|
11
|
+
- **Themeable via** 16 parts, 35 custom properties — see this component's own `@csspart`/`@cssprop` list below
|
|
12
12
|
- **Documented with** `lr-bar-chart`, `lr-pie-chart`, `lr-doughnut-chart`, `lr-radar-chart`, `lr-polar-area-chart`, `lr-bubble-chart`, `lr-scatter-chart` (same section below)
|
|
13
13
|
- **Library-wide behavior** (events, form association, `locale`/`strings`, tokens, TS types): `llms/shared.md`
|
|
14
14
|
|
|
@@ -44,7 +44,7 @@ complete `hiddenDatasets` snapshot).
|
|
|
44
44
|
**Slots:** default JSON configuration script, `data-table`, `center`.
|
|
45
45
|
|
|
46
46
|
**CSS parts:** `base`, `plot`, `canvas`, `legend`, `legend-item`, `legend-item-hidden`, `legend-swatch`,
|
|
47
|
-
`reset-zoom-button`, `description`, `notices`, `data-table`, `data-truncation`, `feature-warning`, `center`, `error` (neutral visible message
|
|
47
|
+
`reset-zoom-button`, `description`, `notices`, `data-table`, `data-table-toggle`, `data-truncation`, `feature-warning`, `center`, `error` (neutral visible message
|
|
48
48
|
rendered in place of `canvas` when the optional `chart.js` peer dependency fails to load; the
|
|
49
49
|
failure transition is announced through the shared document-level light-DOM assertive sink — see
|
|
50
50
|
`llms/components/lr-chart.md`).
|
|
@@ -53,7 +53,8 @@ failure transition is announced through the shared document-level light-DOM asse
|
|
|
53
53
|
`--lr-chart-tick-color`, `--lr-chart-legend-color`, `--lr-chart-tooltip-bg`,
|
|
54
54
|
`--lr-chart-tooltip-text`, `--lr-chart-legend-item-hover-bg`,
|
|
55
55
|
`--lr-chart-legend-item-active-bg`, `--lr-chart-data-table-button-hover-bg`,
|
|
56
|
-
`--lr-chart-data-table-button-active-bg`, `--lr-chart-
|
|
56
|
+
`--lr-chart-data-table-button-active-bg`, `--lr-chart-data-table-toggle-hover-bg`,
|
|
57
|
+
`--lr-chart-data-table-toggle-active-bg`, `--lr-chart-reset-zoom-button-hover-bg`,
|
|
57
58
|
`--lr-chart-reset-zoom-button-active-bg`, `--lr-chart-canvas-hover-outline-width`, and
|
|
58
59
|
`--lr-chart-pattern-step`, plus `--lr-chart-legend-side-max` — all inherited from `LyraChart`, identical in meaning and default (see
|
|
59
60
|
`lr-chart` above); each of the eight variants below reads the same set, so one rule retunes them
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
- **Family** `components/charts/` — 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
|
- **Deprecations** none
|
|
10
|
-
- **Optional peers**
|
|
11
|
-
- **Themeable via**
|
|
10
|
+
- **Optional peers** none
|
|
11
|
+
- **Themeable via** 18 parts, 18 custom properties — see this component's own `@csspart`/`@cssprop` list below
|
|
12
12
|
- **Library-wide behavior** (events, form association, `locale`/`strings`, tokens, TS types): `llms/shared.md`
|
|
13
13
|
|
|
14
14
|
---
|
|
@@ -62,6 +62,21 @@ passthrough). Not a subclass of `LyraChart`.
|
|
|
62
62
|
- `tableTotals: boolean = false` (attribute `table-totals`) — adds a localized total column to the
|
|
63
63
|
multi-series accessible table when `type="bar"` and `stacked` are both active. Ignored for
|
|
64
64
|
grouped bars, line charts, and the single-series `data-list`.
|
|
65
|
+
- `showDataTable: boolean = false` (attribute `show-data-table`, new in 11.1.0) — makes the
|
|
66
|
+
generated accessible table visible rather than screen-reader-only. Same meaning as `lr-chart`'s
|
|
67
|
+
property of the same name.
|
|
68
|
+
- `dataTableToggle: boolean = false` (attribute `data-table-toggle`, new in 11.1.0) — renders a
|
|
69
|
+
localized disclosure button (`part="data-table-toggle"`, with `aria-expanded` and
|
|
70
|
+
`aria-controls`) above the table, so a *sighted* reader can reveal the numbers on demand;
|
|
71
|
+
`showDataTable` then becomes the disclosure's **initial** state rather than its whole behavior.
|
|
72
|
+
The table stays in the DOM in both states, so assistive technology never loses it. This matters
|
|
73
|
+
more here than on `lr-chart`: this component exists to avoid the Chart.js peers, so without it an
|
|
74
|
+
app that chose it for exactly that reason had to either hand-roll a `<details>` around a
|
|
75
|
+
duplicated table or adopt `lr-chart` and pull in Chart.js for a button — the cheap component
|
|
76
|
+
stuck with the expensive workaround. Unset, nothing renders and behavior is unchanged.
|
|
77
|
+
Themeable via `--lr-lite-chart-data-table-toggle-hover-bg` (default
|
|
78
|
+
`var(--lr-color-brand-quiet)`) and `--lr-lite-chart-data-table-toggle-active-bg` (default: that
|
|
79
|
+
hover colour mixed by `--lr-color-mix-active`).
|
|
65
80
|
- `layout: 'fit' | 'scroll' = 'fit'` (reflected) — `'fit'` (default) is the original squeeze-the-
|
|
66
81
|
whole-plot-to-host-width behavior, unchanged. `'scroll'` gives bars a fixed `barWidth` instead: plot
|
|
67
82
|
content width becomes `categoryCount * barWidth` (can exceed the host's measured width), and
|
|
@@ -168,7 +183,8 @@ data alternative.
|
|
|
168
183
|
mark), `line`, `legend`, `legend-item`, `legend-swatch`, `legend-text` (extra per-item text after
|
|
169
184
|
the series label, rendered only when `legendText` is set), `live-region` (the current mark
|
|
170
185
|
announcement for keyboard users), `data-list` (a visually hidden sampled list of plotted data
|
|
171
|
-
points — single-series only), `data-table` (the generated/slotted alternative container),
|
|
186
|
+
points — single-series only), `data-table` (the generated/slotted alternative container),
|
|
187
|
+
`data-table-toggle` (the `dataTableToggle` disclosure button — new in 11.1.0), `table`
|
|
172
188
|
(the generated semantic category×series table rendered when there is more than one dataset), and
|
|
173
189
|
`data-truncation` (the
|
|
174
190
|
visible/announced sampling notice).
|
|
@@ -59,7 +59,7 @@ omittedCount, truncatedLabelCount, truncated }` result for the latest assignment
|
|
|
59
59
|
the bounded rows are complete.
|
|
60
60
|
- `choropleth?: LyraMapChoroplethLayer` (attribute: false) — `LyraMapChoroplethLayer { sourceId:
|
|
61
61
|
string; geojson: GeoJSON.FeatureCollection; field: string; stops: [number, string][]; interpolation?:
|
|
62
|
-
'linear' | 'logarithmic' }` (interpolated
|
|
62
|
+
'linear' | 'logarithmic' | 'step'; stepBaseColor?: string }` (interpolated
|
|
63
63
|
fill-color expression from `field`'s value against `stops`; `stops` must contain at least one
|
|
64
64
|
`[value, color]` pair — an empty array is ignored, leaving whatever fill layer already exists, if
|
|
65
65
|
any, untouched, rather than being applied).
|
|
@@ -71,7 +71,14 @@ string; geojson: GeoJSON.FeatureCollection; field: string; stops: [number, strin
|
|
|
71
71
|
rather than adding one (maplibre has no `['log']` interpolation type; a sub-1 exponential base is
|
|
72
72
|
the documented way to weight a ramp toward the low end). **`stops` stay in the data's own units
|
|
73
73
|
under either mode**, so the legend keeps reading in real values instead of log units — no
|
|
74
|
-
pre-transforming to log10 and hand-relabelling the legend back
|
|
74
|
+
pre-transforming to log10 and hand-relabelling the legend back.
|
|
75
|
+
`'step'` (new in 11.0.0) emits maplibre's `['step', …]` instead of `['interpolate', …]`, giving
|
|
76
|
+
**discrete bands rather than a continuous ramp**. Use it whenever the legend advertises a fixed
|
|
77
|
+
set of ranges with one swatch each: a ramp would put colours on the map that appear nowhere in the
|
|
78
|
+
legend, and would render two regions in the same advertised band as visibly different colours
|
|
79
|
+
(`legendGradient` covers the opposite case, a gradient legend). `stepBaseColor` is the colour for
|
|
80
|
+
values below the first threshold, which `['step', …]` requires; it defaults to the first stop's own
|
|
81
|
+
colour, so a legend whose first band starts at the data minimum needs no extra configuration
|
|
75
82
|
- `markers: LyraMapMarker[] = []` (attribute: false) — `LyraMapMarker { id?: string; lngLat:
|
|
76
83
|
[number, number]; color?: string; label?: string; unsafeHtml?: string }`; an explicit `id` is
|
|
77
84
|
trimmed and must be nonempty, and the first marker for an explicit ID wins. Markers are reconciled
|
|
@@ -93,11 +100,21 @@ string; geojson: GeoJSON.FeatureCollection; field: string; stops: [number, strin
|
|
|
93
100
|
- `dataLayers: LyraMapGeoJsonDataLayer[] = []` (attribute: false) —
|
|
94
101
|
`LyraMapGeoJsonDataLayer { sourceId: string; geojson: GeoJSON.Feature |
|
|
95
102
|
GeoJSON.FeatureCollection; tone?: 'accent' | 'success' | 'warning' |
|
|
96
|
-
'danger' | 'neutral' }`. `sourceId` is trimmed and must be nonempty; the first layer for a
|
|
103
|
+
'danger' | 'neutral'; color?: string; strokeColor?: string }`. `sourceId` is trimmed and must be nonempty; the first layer for a
|
|
97
104
|
`sourceId` wins and blank or later duplicate records are ignored. Each retained entry adds one
|
|
98
105
|
GeoJSON source plus three geometry-filtered layers
|
|
99
106
|
(fill, line, and circle, so a mixed `FeatureCollection` renders correctly), colored from the
|
|
100
|
-
matching `--lr-color-*` token (`tone` defaults to `'accent'` → `--lr-color-brand`).
|
|
107
|
+
matching `--lr-color-*` token (`tone` defaults to `'accent'` → `--lr-color-brand`).
|
|
108
|
+
`color` and `strokeColor` (both new in 11.0.0) override that per surface — `color` paints the
|
|
109
|
+
polygon fill, `strokeColor` the line and circle layers, falling back to `color` and then to `tone`.
|
|
110
|
+
They are separable because a fill and its outline want opposite things on a
|
|
111
|
+
choropleth-plus-overlay map, and the difference is measurable rather than aesthetic: the fill
|
|
112
|
+
competes for area with the choropleth beside it and has to sit quiet, while the 1px outline
|
|
113
|
+
competes with nothing and is the only thing keeping a no-data region's shape readable once the
|
|
114
|
+
fill is that faint. Deriving one from the other measured 1.41:1 against a light basemap — under
|
|
115
|
+
WCAG 1.4.11's 3:1 floor for graphical objects. A `var(--lr-…)` reference is resolved against the
|
|
116
|
+
host before it reaches MapLibre, which paints to a WebGL canvas and never sees the CSS cascade.
|
|
117
|
+
The component
|
|
101
118
|
assigns collision-free private MapLibre ids for those resources: `sourceId` is the stable
|
|
102
119
|
declarative reconciliation key, **not** an id to retrieve from `map`. This prevents a data layer
|
|
103
120
|
from overwriting or removing a same-named source supplied by `mapStyle`. Independent of
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
- **Family** `components/retrieval/` — see `llms/index.md` for its siblings
|
|
8
8
|
- **Status** `stable` since `4.1.0` — see the maturity and deprecation policy in `llms/shared.md`
|
|
9
9
|
- **Deprecations** none
|
|
10
|
-
- **Optional peers**
|
|
10
|
+
- **Optional peers** none
|
|
11
11
|
- **Themeable via** 18 parts, 3 custom properties — see this component's own `@csspart`/`@cssprop` list below
|
|
12
12
|
- **Library-wide behavior** (events, form association, `locale`/`strings`, tokens, TS types): `llms/shared.md`
|
|
13
13
|
|
|
@@ -24,6 +24,24 @@ An `lr-option` row remains bounded by its owning listbox: the default label elli
|
|
|
24
24
|
`start`/`end` (or `prefix`/`suffix`) adornment is capped at 40% of the row. Unbroken metadata
|
|
25
25
|
therefore cannot widen a 320px LTR or RTL picker.
|
|
26
26
|
|
|
27
|
+
**Adornments in the popup (fixed in 11.0.0).** Before 11.0.0 this paragraph described behavior the
|
|
28
|
+
code did not have: `lr-combobox` builds its popup from normalized row *data* rather than from the
|
|
29
|
+
light-DOM nodes, so a slotted `start`/`end`/`prefix`/`suffix` adornment had nowhere to land and
|
|
30
|
+
simply never rendered — the documented slots and their documented parts were both dead inside the
|
|
31
|
+
one component `lr-option` exists to feed. They now render. The nodes are **cloned** into the row
|
|
32
|
+
(`option-start` / `option-end` parts, inert and `aria-hidden`, so they never join the option's
|
|
33
|
+
accessible name), which means the author's own `<lr-option>` subtree is left exactly where they put
|
|
34
|
+
it rather than being moved into a shadow root as a side effect of opening a dropdown:
|
|
35
|
+
|
|
36
|
+
```html
|
|
37
|
+
<lr-combobox label="Country">
|
|
38
|
+
<lr-option value="fr"><lr-flag slot="start" country="fr"></lr-flag>France</lr-option>
|
|
39
|
+
<lr-option value="mt"><lr-flag slot="start" country="mt"></lr-flag>Malta</lr-option>
|
|
40
|
+
</lr-combobox>
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
An async `source` row can carry the same two fields (`start`, `end`) alongside its existing `icon`.
|
|
44
|
+
|
|
27
45
|
### `lr-combobox`
|
|
28
46
|
|
|
29
47
|
**Properties:**
|
|
@@ -90,8 +108,21 @@ therefore cannot widen a 320px LTR or RTL picker.
|
|
|
90
108
|
mapped IDLs `inputmode` and `enterkeyhint` delegate to the corresponding camel-case native
|
|
91
109
|
properties
|
|
92
110
|
- `inputValue: string` — the live filter input text; programmatic writes are event-silent
|
|
93
|
-
- `maxOptionsVisible: number = 3` (attribute `max-options-visible` — caps how many selected tags
|
|
94
|
-
show before collapsing to `+N
|
|
111
|
+
- `maxOptionsVisible: number = 3` (attribute `max-options-visible` — caps how many selected **tags**
|
|
112
|
+
show before collapsing to `+N`; nothing to do with the suggestion list, see the three-caps note
|
|
113
|
+
below)
|
|
114
|
+
- `visibleOptions?: number` (attribute `visible-options`, new in 11.0.0) — bounds the popup to about
|
|
115
|
+
this many suggestion rows, leaving the rest reachable by scrolling. Purely presentational: every
|
|
116
|
+
row is still rendered. Measured from where row N actually starts rather than computed from a
|
|
117
|
+
token, because a row's height varies with `sub` lines, adornments and group labels. Unset imposes
|
|
118
|
+
no bound of its own and the listbox keeps exactly its previous max-height behavior; zero,
|
|
119
|
+
negative, and non-finite values normalize to unset rather than collapsing the popup
|
|
120
|
+
|
|
121
|
+
**The three caps, which are easy to confuse.** `visibleOptions` caps how many suggestion rows are
|
|
122
|
+
*visible* (presentation; the rest scroll). `maxRender` caps how many suggestion rows are *rendered
|
|
123
|
+
at all* (performance; the rest do not exist and are summarized by `option-overflow`).
|
|
124
|
+
`maxOptionsVisible` caps how many *selected tags* show in multi-select and never touches the
|
|
125
|
+
suggestion list.
|
|
95
126
|
- `emptyText?: string` (attribute `empty-text`) — omission displays localized `noMatches` (`"No
|
|
96
127
|
matches"` in the built-in English locale); any supplied string, including `''`, renders verbatim
|
|
97
128
|
- `loadingText?: string` (attribute `loading-text`) — shown while a `source` fetch is in flight;
|
|
@@ -154,9 +185,12 @@ every selection change and a `form.reset()` — like a native control, only anot
|
|
|
154
185
|
**8.0 migration:** the former camel-case string property `autoCorrect` is not retained as a public
|
|
155
186
|
alias. Set the boolean `autocorrect` IDL, or use `autocorrect="on"` / `autocorrect="off"` in markup.
|
|
156
187
|
|
|
157
|
-
`ComboboxSourceRow = { readonly value: string; readonly label: string; readonly sub?: string; readonly icon?: unknown; readonly
|
|
188
|
+
`ComboboxSourceRow = { readonly value: string; readonly label: string; readonly sub?: string; readonly icon?: unknown; readonly start?: unknown;
|
|
189
|
+
readonly end?: unknown; readonly badge?: string |
|
|
158
190
|
number; accessibleLabel?: string; data?: unknown; dotColor?: string; group?: string; disabled?:
|
|
159
|
-
boolean }` — the row shape used by the async `source` path. `
|
|
191
|
+
boolean }` — the row shape used by the async `source` path. `start` and `end` (new in 11.0.0) are
|
|
192
|
+
the async counterparts of `<lr-option>`'s `start`/`end` adornment slots and render as the
|
|
193
|
+
`option-start` / `option-end` parts, inert and aria-hidden exactly like `icon`. `icon` renders as a decorative leading
|
|
160
194
|
visual whose rendered subtree stays visible but is inert and hidden from assistive technology;
|
|
161
195
|
put independent actions outside it. `badge` renders as trailing metadata, `accessibleLabel` can
|
|
162
196
|
provide richer spoken text than the visible label, and `data` is retained without being rendered
|
|
@@ -264,7 +298,9 @@ adornment-slot wrappers, each `hidden` while nothing is slotted into it), `tags`
|
|
|
264
298
|
`lr-emoji-picker` so one rule styles every grouped list; it labels the `role="group"` wrapper here),
|
|
265
299
|
`option`,
|
|
266
300
|
`option-dot` (the leading status dot, when a row's `dotColor` is set), `option-icon` (the inert,
|
|
267
|
-
aria-hidden decorative leading visual for an async row), `option-
|
|
301
|
+
aria-hidden decorative leading visual for an async row), `option-start` and `option-end` (the inert,
|
|
302
|
+
aria-hidden adornments cloned from the source option's `start`/`prefix` and `end`/`suffix` slots, or
|
|
303
|
+
from an async row's `start`/`end`), `option-label`, `option-sub` (a row's
|
|
268
304
|
secondary line, when `sub` is set), `option-badge` (an async row's trailing metadata),
|
|
269
305
|
`option-overflow` (the "+N more" indicator from `maxRender`), `error`, `hint`
|
|
270
306
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
- **Status** `stable` since `4.0.0` — see the maturity and deprecation policy in `llms/shared.md`
|
|
9
9
|
- **Deprecations** none
|
|
10
10
|
- **Optional peers** `chart.js`, `chartjs-plugin-annotation`, `chartjs-plugin-datalabels`, `chartjs-plugin-zoom` — see `llms/peers.md`
|
|
11
|
-
- **Themeable via**
|
|
11
|
+
- **Themeable via** 16 parts, 35 custom properties — see this component's own `@csspart`/`@cssprop` list below
|
|
12
12
|
- **Documented with** `lr-line-chart`, `lr-bar-chart`, `lr-doughnut-chart`, `lr-radar-chart`, `lr-polar-area-chart`, `lr-bubble-chart`, `lr-scatter-chart` (same section below)
|
|
13
13
|
- **Library-wide behavior** (events, form association, `locale`/`strings`, tokens, TS types): `llms/shared.md`
|
|
14
14
|
|
|
@@ -44,7 +44,7 @@ complete `hiddenDatasets` snapshot).
|
|
|
44
44
|
**Slots:** default JSON configuration script, `data-table`, `center`.
|
|
45
45
|
|
|
46
46
|
**CSS parts:** `base`, `plot`, `canvas`, `legend`, `legend-item`, `legend-item-hidden`, `legend-swatch`,
|
|
47
|
-
`reset-zoom-button`, `description`, `notices`, `data-table`, `data-truncation`, `feature-warning`, `center`, `error` (neutral visible message
|
|
47
|
+
`reset-zoom-button`, `description`, `notices`, `data-table`, `data-table-toggle`, `data-truncation`, `feature-warning`, `center`, `error` (neutral visible message
|
|
48
48
|
rendered in place of `canvas` when the optional `chart.js` peer dependency fails to load; the
|
|
49
49
|
failure transition is announced through the shared document-level light-DOM assertive sink — see
|
|
50
50
|
`llms/components/lr-chart.md`).
|
|
@@ -53,7 +53,8 @@ failure transition is announced through the shared document-level light-DOM asse
|
|
|
53
53
|
`--lr-chart-tick-color`, `--lr-chart-legend-color`, `--lr-chart-tooltip-bg`,
|
|
54
54
|
`--lr-chart-tooltip-text`, `--lr-chart-legend-item-hover-bg`,
|
|
55
55
|
`--lr-chart-legend-item-active-bg`, `--lr-chart-data-table-button-hover-bg`,
|
|
56
|
-
`--lr-chart-data-table-button-active-bg`, `--lr-chart-
|
|
56
|
+
`--lr-chart-data-table-button-active-bg`, `--lr-chart-data-table-toggle-hover-bg`,
|
|
57
|
+
`--lr-chart-data-table-toggle-active-bg`, `--lr-chart-reset-zoom-button-hover-bg`,
|
|
57
58
|
`--lr-chart-reset-zoom-button-active-bg`, `--lr-chart-canvas-hover-outline-width`, and
|
|
58
59
|
`--lr-chart-pattern-step`, plus `--lr-chart-legend-side-max` — all inherited from `LyraChart`, identical in meaning and default (see
|
|
59
60
|
`lr-chart` above); each of the eight variants below reads the same set, so one rule retunes them
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
- **Status** `stable` since `4.0.0` — see the maturity and deprecation policy in `llms/shared.md`
|
|
9
9
|
- **Deprecations** none
|
|
10
10
|
- **Optional peers** `chart.js`, `chartjs-plugin-annotation`, `chartjs-plugin-datalabels`, `chartjs-plugin-zoom` — see `llms/peers.md`
|
|
11
|
-
- **Themeable via**
|
|
11
|
+
- **Themeable via** 16 parts, 35 custom properties — see this component's own `@csspart`/`@cssprop` list below
|
|
12
12
|
- **Documented with** `lr-line-chart`, `lr-bar-chart`, `lr-pie-chart`, `lr-doughnut-chart`, `lr-radar-chart`, `lr-bubble-chart`, `lr-scatter-chart` (same section below)
|
|
13
13
|
- **Library-wide behavior** (events, form association, `locale`/`strings`, tokens, TS types): `llms/shared.md`
|
|
14
14
|
|
|
@@ -44,7 +44,7 @@ complete `hiddenDatasets` snapshot).
|
|
|
44
44
|
**Slots:** default JSON configuration script, `data-table`, `center`.
|
|
45
45
|
|
|
46
46
|
**CSS parts:** `base`, `plot`, `canvas`, `legend`, `legend-item`, `legend-item-hidden`, `legend-swatch`,
|
|
47
|
-
`reset-zoom-button`, `description`, `notices`, `data-table`, `data-truncation`, `feature-warning`, `center`, `error` (neutral visible message
|
|
47
|
+
`reset-zoom-button`, `description`, `notices`, `data-table`, `data-table-toggle`, `data-truncation`, `feature-warning`, `center`, `error` (neutral visible message
|
|
48
48
|
rendered in place of `canvas` when the optional `chart.js` peer dependency fails to load; the
|
|
49
49
|
failure transition is announced through the shared document-level light-DOM assertive sink — see
|
|
50
50
|
`llms/components/lr-chart.md`).
|
|
@@ -53,7 +53,8 @@ failure transition is announced through the shared document-level light-DOM asse
|
|
|
53
53
|
`--lr-chart-tick-color`, `--lr-chart-legend-color`, `--lr-chart-tooltip-bg`,
|
|
54
54
|
`--lr-chart-tooltip-text`, `--lr-chart-legend-item-hover-bg`,
|
|
55
55
|
`--lr-chart-legend-item-active-bg`, `--lr-chart-data-table-button-hover-bg`,
|
|
56
|
-
`--lr-chart-data-table-button-active-bg`, `--lr-chart-
|
|
56
|
+
`--lr-chart-data-table-button-active-bg`, `--lr-chart-data-table-toggle-hover-bg`,
|
|
57
|
+
`--lr-chart-data-table-toggle-active-bg`, `--lr-chart-reset-zoom-button-hover-bg`,
|
|
57
58
|
`--lr-chart-reset-zoom-button-active-bg`, `--lr-chart-canvas-hover-outline-width`, and
|
|
58
59
|
`--lr-chart-pattern-step`, plus `--lr-chart-legend-side-max` — all inherited from `LyraChart`, identical in meaning and default (see
|
|
59
60
|
`lr-chart` above); each of the eight variants below reads the same set, so one rule retunes them
|