@aceshooting/lyra-ui 14.1.0 → 14.2.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 +24 -0
- package/custom-elements.json +1 -1
- package/design-tokens.json +1 -1
- package/dist/cli/migration-contract.json +1 -1
- package/dist/components/charts/chart/chart.class.d.ts +16 -3
- package/dist/components/charts/chart/chart.class.js +3 -3
- package/dist/components/data/heatmap/heatmap.class.d.ts +44 -6
- package/dist/components/data/heatmap/heatmap.class.js +8 -2
- package/dist/components/data/heatmap/heatmap.styles.js +1 -1
- package/dist/components/forms/checkbox/checkbox.styles.js +1 -1
- package/dist/components/forms/date-picker/date-input.class.d.ts +7 -8
- package/dist/components/forms/date-picker/date-input.styles.js +1 -1
- package/dist/components/forms/locale-picker/locale-picker.class.d.ts +12 -2
- package/dist/components/forms/locale-picker/locale-picker.class.js +7 -6
- package/dist/components/forms/locale-picker/locale-picker.styles.js +1 -1
- package/dist/components/forms/slider/slider.class.d.ts +21 -5
- package/dist/components/forms/slider/slider.class.js +6 -5
- package/dist/components/forms/slider/slider.styles.js +1 -1
- package/dist/components/media/map/map-loader.d.ts +3 -1
- package/dist/components/media/map/map.class.d.ts +57 -5
- package/dist/components/media/map/map.class.js +1 -1
- package/dist/components/media/map/map.styles.js +1 -1
- package/dist/custom-elements-jsx.d.ts +1 -1
- package/dist/events.d.ts +4 -4
- package/dist/internal/default-strings.generated.d.ts +1 -1
- package/dist/internal/default-strings.generated.js +1 -1
- package/dist/internal/localization-types.d.ts +1 -1
- package/dist/internal/localization.js +1 -1
- package/dist/internal/package-metadata.d.ts +1 -1
- package/dist/internal/package-metadata.js +1 -1
- package/dist/lyra.d.ts +1 -1
- package/dist/svelte.d.ts +1 -1
- package/dist/translations/ar.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/fa.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/he.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/pt-BR.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/zh-CN.js +1 -1
- package/dist/vue.d.ts +1 -1
- package/llms/components/lr-bar-chart.md +1 -1
- package/llms/components/lr-bubble-chart.md +1 -1
- package/llms/components/lr-chart.md +27 -1
- package/llms/components/lr-checkbox.md +3 -1
- package/llms/components/lr-date-input.md +19 -33
- package/llms/components/lr-date-picker.md +19 -33
- package/llms/components/lr-doughnut-chart.md +1 -1
- package/llms/components/lr-heatmap.md +63 -4
- package/llms/components/lr-histogram.md +1 -1
- package/llms/components/lr-line-chart.md +1 -1
- package/llms/components/lr-locale-picker.md +16 -2
- package/llms/components/lr-map.md +93 -4
- package/llms/components/lr-pie-chart.md +1 -1
- package/llms/components/lr-polar-area-chart.md +1 -1
- package/llms/components/lr-radar-chart.md +1 -1
- package/llms/components/lr-scatter-chart.md +1 -1
- package/llms/components/lr-slider.md +20 -4
- package/llms-full.txt +276 -48
- package/package.json +4 -4
- package/vscode-css-data.json +1 -1
- package/vscode-html-data.json +1 -1
- package/web-types.json +1 -1
|
@@ -25,7 +25,7 @@ Everything else is inherited verbatim from `lr-chart`; each name below has the s
|
|
|
25
25
|
and behavior there. **See `llms/components/lr-chart.md` for the details, code example, and gotchas
|
|
26
26
|
of every entry in these lists.**
|
|
27
27
|
|
|
28
|
-
**Properties:** `description`, `grid`, `indexAxis` (`index-axis`), `label`, `hiddenDatasets`, `legendPosition`
|
|
28
|
+
**Properties:** `description`, `grid`, `axes`, `compact`, `indexAxis` (`index-axis`), `label`, `hiddenDatasets`, `legendPosition`
|
|
29
29
|
(`legend-position`), `max`, `min`, `plugins`, `scaleType` (`scale-type`), `annotations`,
|
|
30
30
|
`stacked`, `withoutAnimation` (`without-animation`),
|
|
31
31
|
`withoutLegend` (`without-legend`), `withoutTooltip` (`without-tooltip`), `xLabel` (`x-label`),
|
|
@@ -25,7 +25,7 @@ Everything else is inherited verbatim from `lr-chart`; each name below has the s
|
|
|
25
25
|
and behavior there. **See `llms/components/lr-chart.md` for the details, code example, and gotchas
|
|
26
26
|
of every entry in these lists.**
|
|
27
27
|
|
|
28
|
-
**Properties:** `description`, `grid`, `indexAxis` (`index-axis`), `label`, `hiddenDatasets`, `legendPosition`
|
|
28
|
+
**Properties:** `description`, `grid`, `axes`, `compact`, `indexAxis` (`index-axis`), `label`, `hiddenDatasets`, `legendPosition`
|
|
29
29
|
(`legend-position`), `max`, `min`, `plugins`, `scaleType` (`scale-type`), `annotations`,
|
|
30
30
|
`stacked`, `withoutAnimation` (`without-animation`),
|
|
31
31
|
`withoutLegend` (`without-legend`), `withoutTooltip` (`without-tooltip`), `xLabel` (`x-label`),
|
|
@@ -26,6 +26,24 @@ an effective raw `config.options.indexAxis` override. Both formatter APIs follow
|
|
|
26
26
|
structured points retain their y-value formatting.
|
|
27
27
|
|
|
28
28
|
**Properties:**
|
|
29
|
+
- `axes: LyraChartAxes = 'both'` — `'x' | 'y' | 'both' | 'none'`, controlling complete cartesian
|
|
30
|
+
axes: labels, ticks, borders and grid lines. The `y` setting includes `y2`; invalid values use
|
|
31
|
+
`both`. Radial charts ignore this setting. Use `grid` when only grid lines should disappear.
|
|
32
|
+
- `compact: boolean = false` — hides cartesian axes and removes automatic plot padding. Combine
|
|
33
|
+
with `withoutLegend` and a short `height` (for example `64px`) for an inline histogram or
|
|
34
|
+
sparkline. Tooltips, accessible data, formatting and keyboard activation remain available.
|
|
35
|
+
`config` still wins over generated options, so explicit scale visibility or layout padding
|
|
36
|
+
can override the preset. Leaving compact mode restores `axes`. Radial charts are unaffected.
|
|
37
|
+
|
|
38
|
+
For a monthly histogram above `lr-slider`, give both controls the same inline allocation and
|
|
39
|
+
use `lr-bar-chart compact without-legend height="64px"`. Map range values to bin edges: with
|
|
40
|
+
twelve months, set the slider's `min=0`, `max=12`, `step=1` and treat its values as the half-open
|
|
41
|
+
interval `[minValue, maxValue)`. Equal edges select no months. Use `show-value`,
|
|
42
|
+
`value-display="formatted"` and `value-placement="label"` to display application-formatted month
|
|
43
|
+
names without a separate readout listener. Commit filtering on `lr-change`; `lr-input` remains
|
|
44
|
+
available for live previews. Chart categories retain their authored physical order: for an RTL
|
|
45
|
+
slider that starts at the right edge, reverse both histogram labels and counts. The Monthly
|
|
46
|
+
Range bar-chart story demonstrates both directions without scale configuration.
|
|
29
47
|
- `type: LyraChartType = 'bar'` — `LyraChartType = 'line' | 'bar' | 'scatter' | 'pie' | 'doughnut' |
|
|
30
48
|
'radar' | 'polarArea' | 'bubble'` — every named default used by a typed `lr-*-chart` is
|
|
31
49
|
already a first-class member, so `<lr-chart type="pie">` needs no subclass or cast to work;
|
|
@@ -170,6 +188,14 @@ structured points retain their y-value formatting.
|
|
|
170
188
|
explicit array replaces that generated member rather than concatenating with it. This effective
|
|
171
189
|
model drives canvas rendering, `appendData()`, export, the accessible name/summary, keyboard
|
|
172
190
|
navigation and activation events, the DOM legend, and the generated fallback table.
|
|
191
|
+
For generated **bar** series, an explicit series `width` wins. Otherwise authored bar
|
|
192
|
+
`borderWidth`/`borderRadius` defaults in `options.datasets.bar`, its nested `elements.bar`,
|
|
193
|
+
`options.elements.bar`, or root `options` are left for Chart.js to resolve, including scriptable,
|
|
194
|
+
indexable and `barBorderWidth`/`barBorderRadius` forms. Unset values retain Lyra's `--border-width`
|
|
195
|
+
and `--border-radius` defaults; removing config restores those defaults. Raw `config.data.datasets`
|
|
196
|
+
remain authoritative. Dense charts with transparent borders should set
|
|
197
|
+
`config.options.datasets.bar.borderWidth = 0` (or the public `--border-width: 0` CSS hook):
|
|
198
|
+
a one-pixel transparent stroke can consume the fill of a bar narrower than two pixels.
|
|
173
199
|
As a declarative alternative, place one `<script type="application/json">` in the default slot;
|
|
174
200
|
an explicitly assigned `config` property wins over the slotted object. Invalid/non-object JSON is
|
|
175
201
|
ignored without evaluating script or exposing prototype-pollution keys to the merge.
|
|
@@ -439,7 +465,7 @@ announced. In particular, unavailable data labels do not remove generated table
|
|
|
439
465
|
the observer, drawing starts when the peer and canvas are ready. An empty delivered callback
|
|
440
466
|
retains the visible fallback. Peer loading and accessible DOM may settle while visibility is
|
|
441
467
|
pending. Independently, `updated()` only reaches
|
|
442
|
-
Chart.js when at least one of `type`, `labels`, `datasets`, `description`, `grid`, `indexAxis`,
|
|
468
|
+
Chart.js when at least one of `type`, `labels`, `datasets`, `description`, `grid`, `axes`, `compact`, `indexAxis`,
|
|
443
469
|
`label`, `hiddenDatasets`, `legendPosition`, `min`, `max`, `plugins`, the internal resolved auto legend
|
|
444
470
|
position, `valueFormatter`, `formatter`, `area`, `height`, `xLabel`, `yLabel`, `y2Label`, `beginAtZero`,
|
|
445
471
|
`stacked`, any `without*` control, `dataLabels`, `stackTotals`, `config`, the parsed
|
|
@@ -127,7 +127,9 @@ compacts this control with it. Set it to pin the box independently of the tier.
|
|
|
127
127
|
the label text: the box plus the gap beside it. It defaults to
|
|
128
128
|
`calc(var(--lr-checkbox-box-size) + var(--lr-space-s))`, and the rendered gap is
|
|
129
129
|
_derived_ from it, so the advertised value and the real label offset cannot drift. Setting it on
|
|
130
|
-
the element (or on `lr-checkbox` in your own stylesheet) moves the label.
|
|
130
|
+
the element (or on `lr-checkbox` in your own stylesheet) moves the label. The visible box
|
|
131
|
+
aligns with the inline start of its transparent hit target, so a compact box plus gap remains
|
|
132
|
+
clear of the label in both directions even when the hit target is wider than the box.
|
|
131
133
|
|
|
132
134
|
It is published so you can align your own per-option hint text under the label without re-deriving
|
|
133
135
|
that formula by reading the shadow styles. **But custom properties inherit down, not sideways**, so
|
|
@@ -310,44 +310,30 @@ use the same normalization path as direct property writes.
|
|
|
310
310
|
`--lr-form-control-required-offset` retune or suppress it here exactly as they do on `lr-input`.
|
|
311
311
|
With no label text the part is hidden and no glyph is painted.
|
|
312
312
|
|
|
313
|
-
**Themeable custom properties:** `--lr-date-input-padding-block` (default
|
|
314
|
-
`--lr-
|
|
315
|
-
`--lr-
|
|
316
|
-
`--lr-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
313
|
+
**Themeable custom properties:** `--lr-date-input-padding-block` (default
|
|
314
|
+
`--lr-form-control-padding-block`) pads the native text input; `--lr-date-input-padding-inline`
|
|
315
|
+
(default `--lr-form-control-padding-inline`) pads the row. `--lr-date-input-font-size` defaults to
|
|
316
|
+
`--lr-form-control-font-size`. The row floor `--lr-date-input-control-min-height` defaults to
|
|
317
|
+
`--lr-form-control-height`. All four defaults follow the shared size ladder, including
|
|
318
|
+
`small`/`medium`/`large` aliases and inherited `--lr-theme-form-control-height-*` overrides.
|
|
319
|
+
Inherited or direct public values win. `pill` changes the private radius default to
|
|
320
|
+
`--lr-radius-pill`; a public `--lr-date-input-radius` still wins.
|
|
321
|
+
|
|
322
|
+
Calendar and clear actions fit inside the selected row height while retaining at least 24×24
|
|
323
|
+
CSS-pixel targets. At the default root size, rows measure 30/40/48/56px for s/m/l/xl; 2xs and xs
|
|
324
|
+
grow to 26px to accommodate the 24px action plus the row borders. Custom content or font metrics
|
|
325
|
+
can grow an unconstrained row. A theme setting the small tier to 36px produces a 36px date row.
|
|
326
|
+
`--lr-date-input-control-height` remains undeclared by default and pins an exact row height when
|
|
327
|
+
set. If it forces a row below its target size, the action overflows instead of shrinking.
|
|
328
|
+
|
|
329
|
+
The mapped `--show-duration` and `--hide-duration` hooks independently retime the popup's enter
|
|
330
|
+
and exit transitions; both default to `var(--lr-transition-fast)`. Clear and calendar action
|
|
331
|
+
state hooks are `--lr-date-input-action-hover-color`, `--lr-date-input-action-hover-bg`, and
|
|
326
332
|
`--lr-date-input-action-hover-radius` (defaults: text, transparent, and the input radius), plus
|
|
327
333
|
`--lr-date-input-action-active-color`, `--lr-date-input-action-active-bg`, and
|
|
328
334
|
`--lr-date-input-action-active-radius` for the pressed state. They inherit from theme ancestors;
|
|
329
335
|
direct values on `lr-date-input` win without retuning library-wide tokens.
|
|
330
336
|
|
|
331
|
-
`--lr-date-input-control-height` pins an **exact** `input-wrapper` height (both floors and caps it).
|
|
332
|
-
It is **undeclared by default**, so the row grows to fit its content — see "exact-height hatches"
|
|
333
|
-
under `lr-input`. Pinning it _below_ the calendar toggle's 24×24 target is safe: the toggle keeps
|
|
334
|
-
its own `--lr-icon-button-size` floor and simply overflows a short row rather than shrinking, so
|
|
335
|
-
WCAG 2.2 SC 2.5.8 is preserved either way.
|
|
336
|
-
|
|
337
|
-
**Height parity with `lr-input` is density parity, not pixel parity.** The per-`size` padding and
|
|
338
|
-
font-size scale is shared with `lr-input`, so the two look equally dense at a given `size` — but a
|
|
339
|
-
same-`size` pair does **not** end up the same height, and code that assumes it will be
|
|
340
|
-
disappointed at the small tiers. `[part='input-wrapper']` carries no intrinsic `min-block-size` of
|
|
341
|
-
its own, while `[part='expand-button']` pins `min-block-size: var(--lr-icon-button-size)` that is
|
|
342
|
-
deliberately **not** gated by `size` — the calendar toggle must keep a 24×24 touch target at every
|
|
343
|
-
tier, and `lr-input`'s own password-toggle floors identically. So the row height is pinned
|
|
344
|
-
transitively by that button: at `size="s"` an `lr-input` floors at `1.875rem`/30px, while an
|
|
345
|
-
`lr-date-input` cannot go below roughly 40px plus its padding. Every default value of
|
|
346
|
-
`--lr-date-input-control-min-height` sits below that transitive height, which means the floor is
|
|
347
|
-
inert until you raise it past the button — a lower value changes nothing. To line the two controls
|
|
348
|
-
up exactly, either raise `lr-input`'s floor to meet the date input, or lower
|
|
349
|
-
`--lr-theme-icon-button-size` on a common ancestor (never below 24px).
|
|
350
|
-
|
|
351
337
|
**Optional peer deps:** none.
|
|
352
338
|
|
|
353
339
|
```html
|
|
@@ -310,44 +310,30 @@ use the same normalization path as direct property writes.
|
|
|
310
310
|
`--lr-form-control-required-offset` retune or suppress it here exactly as they do on `lr-input`.
|
|
311
311
|
With no label text the part is hidden and no glyph is painted.
|
|
312
312
|
|
|
313
|
-
**Themeable custom properties:** `--lr-date-input-padding-block` (default
|
|
314
|
-
`--lr-
|
|
315
|
-
`--lr-
|
|
316
|
-
`--lr-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
313
|
+
**Themeable custom properties:** `--lr-date-input-padding-block` (default
|
|
314
|
+
`--lr-form-control-padding-block`) pads the native text input; `--lr-date-input-padding-inline`
|
|
315
|
+
(default `--lr-form-control-padding-inline`) pads the row. `--lr-date-input-font-size` defaults to
|
|
316
|
+
`--lr-form-control-font-size`. The row floor `--lr-date-input-control-min-height` defaults to
|
|
317
|
+
`--lr-form-control-height`. All four defaults follow the shared size ladder, including
|
|
318
|
+
`small`/`medium`/`large` aliases and inherited `--lr-theme-form-control-height-*` overrides.
|
|
319
|
+
Inherited or direct public values win. `pill` changes the private radius default to
|
|
320
|
+
`--lr-radius-pill`; a public `--lr-date-input-radius` still wins.
|
|
321
|
+
|
|
322
|
+
Calendar and clear actions fit inside the selected row height while retaining at least 24×24
|
|
323
|
+
CSS-pixel targets. At the default root size, rows measure 30/40/48/56px for s/m/l/xl; 2xs and xs
|
|
324
|
+
grow to 26px to accommodate the 24px action plus the row borders. Custom content or font metrics
|
|
325
|
+
can grow an unconstrained row. A theme setting the small tier to 36px produces a 36px date row.
|
|
326
|
+
`--lr-date-input-control-height` remains undeclared by default and pins an exact row height when
|
|
327
|
+
set. If it forces a row below its target size, the action overflows instead of shrinking.
|
|
328
|
+
|
|
329
|
+
The mapped `--show-duration` and `--hide-duration` hooks independently retime the popup's enter
|
|
330
|
+
and exit transitions; both default to `var(--lr-transition-fast)`. Clear and calendar action
|
|
331
|
+
state hooks are `--lr-date-input-action-hover-color`, `--lr-date-input-action-hover-bg`, and
|
|
326
332
|
`--lr-date-input-action-hover-radius` (defaults: text, transparent, and the input radius), plus
|
|
327
333
|
`--lr-date-input-action-active-color`, `--lr-date-input-action-active-bg`, and
|
|
328
334
|
`--lr-date-input-action-active-radius` for the pressed state. They inherit from theme ancestors;
|
|
329
335
|
direct values on `lr-date-input` win without retuning library-wide tokens.
|
|
330
336
|
|
|
331
|
-
`--lr-date-input-control-height` pins an **exact** `input-wrapper` height (both floors and caps it).
|
|
332
|
-
It is **undeclared by default**, so the row grows to fit its content — see "exact-height hatches"
|
|
333
|
-
under `lr-input`. Pinning it _below_ the calendar toggle's 24×24 target is safe: the toggle keeps
|
|
334
|
-
its own `--lr-icon-button-size` floor and simply overflows a short row rather than shrinking, so
|
|
335
|
-
WCAG 2.2 SC 2.5.8 is preserved either way.
|
|
336
|
-
|
|
337
|
-
**Height parity with `lr-input` is density parity, not pixel parity.** The per-`size` padding and
|
|
338
|
-
font-size scale is shared with `lr-input`, so the two look equally dense at a given `size` — but a
|
|
339
|
-
same-`size` pair does **not** end up the same height, and code that assumes it will be
|
|
340
|
-
disappointed at the small tiers. `[part='input-wrapper']` carries no intrinsic `min-block-size` of
|
|
341
|
-
its own, while `[part='expand-button']` pins `min-block-size: var(--lr-icon-button-size)` that is
|
|
342
|
-
deliberately **not** gated by `size` — the calendar toggle must keep a 24×24 touch target at every
|
|
343
|
-
tier, and `lr-input`'s own password-toggle floors identically. So the row height is pinned
|
|
344
|
-
transitively by that button: at `size="s"` an `lr-input` floors at `1.875rem`/30px, while an
|
|
345
|
-
`lr-date-input` cannot go below roughly 40px plus its padding. Every default value of
|
|
346
|
-
`--lr-date-input-control-min-height` sits below that transitive height, which means the floor is
|
|
347
|
-
inert until you raise it past the button — a lower value changes nothing. To line the two controls
|
|
348
|
-
up exactly, either raise `lr-input`'s floor to meet the date input, or lower
|
|
349
|
-
`--lr-theme-icon-button-size` on a common ancestor (never below 24px).
|
|
350
|
-
|
|
351
337
|
**Optional peer deps:** none.
|
|
352
338
|
|
|
353
339
|
```html
|
|
@@ -25,7 +25,7 @@ Everything else is inherited verbatim from `lr-chart`; each name below has the s
|
|
|
25
25
|
and behavior there. **See `llms/components/lr-chart.md` for the details, code example, and gotchas
|
|
26
26
|
of every entry in these lists.**
|
|
27
27
|
|
|
28
|
-
**Properties:** `description`, `grid`, `indexAxis` (`index-axis`), `label`, `hiddenDatasets`, `legendPosition`
|
|
28
|
+
**Properties:** `description`, `grid`, `axes`, `compact`, `indexAxis` (`index-axis`), `label`, `hiddenDatasets`, `legendPosition`
|
|
29
29
|
(`legend-position`), `max`, `min`, `plugins`, `scaleType` (`scale-type`), `annotations`,
|
|
30
30
|
`stacked`, `withoutAnimation` (`without-animation`),
|
|
31
31
|
`withoutLegend` (`without-legend`), `withoutTooltip` (`without-tooltip`), `xLabel` (`x-label`),
|
|
@@ -83,6 +83,20 @@ weekdayLabelWidth?: number|'auto'; weekdayLabelText?: (jsWeekday:number)=>string
|
|
|
83
83
|
- `cellSize: number = 22` (attribute `cell-size` — default `22` in matrix mode, `11` in calendar
|
|
84
84
|
mode when left unset; explicitly setting it now governs both modes' per-cell size alike, and it's
|
|
85
85
|
ignored in either mode when `fitToWidth` is set)
|
|
86
|
+
- `cellGapX: number = 1` / `cellGapY: number = 1` (attributes `cell-gap-x` / `cell-gap-y`) —
|
|
87
|
+
matrix-only trailing horizontal/vertical gaps in CSS pixels, subtracted from the square
|
|
88
|
+
`cellSize` pitch. Negative values clamp to zero, non-finite values use `1`, and oversized gaps
|
|
89
|
+
leave at least one painted pixel. Custom geometry with `accessibleCells` grows the minimum pitch
|
|
90
|
+
and caps gaps to preserve the `--lr-icon-button-size` target floor. Calendar spacing is unchanged.
|
|
91
|
+
- `cellRadius: number = 0` (attribute `cell-radius`) — matrix-only painted corner radius in CSS
|
|
92
|
+
pixels, clamped from zero to half the smaller painted side; non-finite values use zero. Custom
|
|
93
|
+
cell fills, focus/selection/annotation rings, semantic overlays, and PNG canvas output share the
|
|
94
|
+
same bounds. Custom gaps are excluded from canvas pointer hits; rounded cells retain rectangular
|
|
95
|
+
interaction bounds. The default one-pixel separator retains its existing hit area.
|
|
96
|
+
- `colLabelInterval: number = 1` (attribute `col-label-interval`) — paint every Nth matrix column
|
|
97
|
+
label starting at column zero, including frozen labels and rotated label measurement. Truncated
|
|
98
|
+
to an integer of at least one; non-finite values use `1`. Every original `data.colLabels` value
|
|
99
|
+
remains available to tooltips, keyboard announcements, semantic cells, and `cellText`.
|
|
86
100
|
- `fitToWidth: boolean = false` (attribute `fit-to-width` — derives `cellSize` from the host's
|
|
87
101
|
measured `clientWidth` on every draw/resize instead of the fixed `cell-size`, so the grid actually
|
|
88
102
|
fills the available width; now applies to calendar mode as well as matrix mode — see gotchas for
|
|
@@ -197,6 +211,44 @@ row?: number; col?: number; date?: string }`, matched the same way as `annotatio
|
|
|
197
211
|
announcement when the focused cell is the selection. Purely a controlled property — mirrors
|
|
198
212
|
`<lr-lite-chart>`'s `selectedIndices`, this component never mutates it itself. Unset (the default,
|
|
199
213
|
`null`) reproduces today's exact output.
|
|
214
|
+
- `multiple: boolean = false` — opts into controlled multi-cell selection through `selectedCells`.
|
|
215
|
+
The existing `selectedCell` is ignored while enabled and resumes when disabled. Single-cell
|
|
216
|
+
behavior is unchanged when omitted.
|
|
217
|
+
- `selectedCells: readonly HeatmapSelectedCell[] = []` (attribute: false) — clone-owned selection
|
|
218
|
+
input, inspected up to `MAX_HEATMAP_CELLS` (10,000) entries. Duplicates, non-integer/out-of-grid
|
|
219
|
+
coordinates and non-interactive cells are ignored. Matrix records use `{ row, col }`; calendar
|
|
220
|
+
records use `{ date }`, including interactive calendar gaps. The component never assigns this
|
|
221
|
+
property in response to user input. It draws selected rings and, with `accessibleCells`, exposes
|
|
222
|
+
per-cell `aria-selected` plus grid `aria-multiselectable="true"`. The localized accessible summary
|
|
223
|
+
reports the selected count through `heatmapSelectedCount`.
|
|
224
|
+
|
|
225
|
+
`lr-selection-change` is a non-cancelable proposal: frozen `HeatmapSelectionChangeDetail {
|
|
226
|
+
selectedCells: readonly Readonly<HeatmapSelectedCell>[]; source: HeatmapSelectionSource }`, with
|
|
227
|
+
source `'pointer' | 'keyboard' | 'row' | 'column'`. Assign the event's array back to `selectedCells`
|
|
228
|
+
to accept it; property assignments are silent. Output is deduplicated in row/column order. Click
|
|
229
|
+
or Enter/Space toggles one cell and retains `lr-cell-click`. Pointer dragging paints or erases
|
|
230
|
+
according to the starting cell, previews transient selection, and proposes once on release;
|
|
231
|
+
pointer cancellation, Escape, disconnect, data/mode changes discard the gesture. A drag does
|
|
232
|
+
not emit a cell click. Shift+arrows extends/contracts a rectangle from the anchor while retaining
|
|
233
|
+
unrelated pre-range selection. Directions remain physical under RTL, matching the canvas.
|
|
234
|
+
|
|
235
|
+
`toggleRowSelection(row: number): void` and `toggleColumnSelection(col: number): void` propose
|
|
236
|
+
whole-axis toggles for application-owned controls: remove an entirely selected axis, otherwise
|
|
237
|
+
add its interactive cells. Shift+Space and Ctrl/Meta+Space invoke those actions for the focused
|
|
238
|
+
row/column. Calendar rows are weekday rows 0–6 and columns are zero-based weeks. Invalid indices
|
|
239
|
+
and calls outside `multiple` mode are no-ops. For a narrow day/hour matrix, use `accessibleCells`
|
|
240
|
+
and `stickyLabels="both"` to retain usable targets within the component's own scrollport.
|
|
241
|
+
|
|
242
|
+
```js
|
|
243
|
+
import '@aceshooting/lyra-ui/components/lr-heatmap.js';
|
|
244
|
+
const heatmap = document.querySelector('lr-heatmap');
|
|
245
|
+
heatmap.multiple = true;
|
|
246
|
+
heatmap.accessibleCells = true;
|
|
247
|
+
heatmap.addEventListener('lr-selection-change', event => {
|
|
248
|
+
heatmap.selectedCells = event.detail.selectedCells;
|
|
249
|
+
// Derive filter state from the accepted row/column coordinates.
|
|
250
|
+
});
|
|
251
|
+
```
|
|
200
252
|
- `accessibleCells: boolean = false` (attribute `accessible-cells`) — renders `[part="cells"]` with
|
|
201
253
|
at most 400 `[part="cell"]` native buttons around the active cell. The semantic grid exposes the
|
|
202
254
|
full row/column counts, buttons expose localized `aria-label`s and explicit `aria-selected`, and
|
|
@@ -288,16 +340,23 @@ color?: string; label?: string; partOfRamp?: boolean }`: a discrete legend key r
|
|
|
288
340
|
|
|
289
341
|
**Getters/methods:** `refreshTheme()` — redraws canvas content after an upstream design-token or
|
|
290
342
|
color-scheme change; called automatically on theme changes, exposed for a consumer that needs to
|
|
291
|
-
force a redraw manually. `matrixGeometry: Readonly<
|
|
292
|
-
number }> | undefined` — the gutter/cell geometry the last matrix-mode draw actually painted with,
|
|
343
|
+
force a redraw manually. `matrixGeometry: Readonly<LyraHeatmapMatrixGeometryChangeDetail> | undefined` — the gutter/cell geometry the last matrix-mode draw actually painted with,
|
|
293
344
|
in CSS pixels; `undefined` in calendar mode. Lets a light-DOM consumer line up with the canvas
|
|
294
345
|
without hardcoding the same numbers `row-label-width`/`col-label-height`'s `"auto"` resolution would
|
|
295
346
|
otherwise keep private. For the case that motivated it — a frozen header or gutter on a tall or wide
|
|
296
347
|
matrix — prefer `stickyLabels`, which freezes the band inside the component and needs no mirror at
|
|
297
348
|
all; the getter remains the way to align a *separate* element (a sibling chart, a custom overlay)
|
|
298
|
-
with the grid.
|
|
349
|
+
with the grid. `LyraHeatmapMatrixGeometryChangeDetail` contains `padLeft`, `padTop`, and `cellSize`
|
|
350
|
+
(the square pitch), plus optional `cellWidth`, `cellHeight`, and `cellRadius` for custom matrix
|
|
351
|
+
presentation. When those optional fields are absent, painted width/height are `cellSize - 1` and
|
|
352
|
+
radius is zero. The getter and geometry-change event always share one frozen snapshot, including
|
|
353
|
+
changes to the resolved gaps/radius.
|
|
354
|
+
|
|
355
|
+
For a fluid day/hour matrix, keep all 24 hour strings in `data.colLabels` and use
|
|
356
|
+
`fit-to-width cell-gap-x="1" cell-gap-y="2" cell-radius="2" col-label-interval="3"`.
|
|
357
|
+
For a single fluid square cell, use `fit-to-width` with equal horizontal and vertical gaps.
|
|
299
358
|
|
|
300
|
-
**Events:** `lr-cell-click` (fired on click, or Enter/Space on the keyboard-focused cell —
|
|
359
|
+
**Events:** `lr-selection-change` (not cancelable; frozen readonly `HeatmapSelectionChangeDetail { selectedCells, source }` proposal in multiple mode, with `source: 'pointer' | 'keyboard' | 'row' | 'column'`; accept it by assigning `selectedCells`). `lr-cell-click` (fired on click, or Enter/Space on the keyboard-focused cell —
|
|
301
360
|
`detail: { row, col, value }` in matrix mode, `detail: { date, value }` in calendar mode),
|
|
302
361
|
`lr-matrix-geometry-change` (fired after a matrix-mode draw whose resolved `matrixGeometry` differs
|
|
303
362
|
from the previous draw — e.g. after `row-label-width="auto"`/`col-label-height="auto"` resolves
|
|
@@ -33,7 +33,7 @@ Bins `values` into `bins` equal-width buckets and renders as a bar chart (extend
|
|
|
33
33
|
`values`/`bins` (memoized per instance, keyed by reference equality on `values` plus the
|
|
34
34
|
normalized `bins`), and `type` always reads back `'bar'` regardless of any assignment. This
|
|
35
35
|
specialist owns its controller because a non-bar type would contradict the derived distribution.
|
|
36
|
-
- All other `LyraChart` properties are inherited and usable: `description`, `grid`, `indexAxis`
|
|
36
|
+
- All other `LyraChart` properties are inherited and usable: `description`, `grid`, `axes`, `compact`, `indexAxis`
|
|
37
37
|
(`index-axis`), `hiddenDatasets`, `legendPosition` (`legend-position`), `max`, `min`, `plugins`,
|
|
38
38
|
`withoutAnimation` (`without-animation`), `withoutLegend` (`without-legend`), `withoutTooltip`
|
|
39
39
|
(`without-tooltip`), `valueFormatter`, `formatter`, `area`, `zoom`, `config`, `height`, `xLabel` (`x-label`),
|
|
@@ -25,7 +25,7 @@ Everything else is inherited verbatim from `lr-chart`; each name below has the s
|
|
|
25
25
|
and behavior there. **See `llms/components/lr-chart.md` for the details, code example, and gotchas
|
|
26
26
|
of every entry in these lists.**
|
|
27
27
|
|
|
28
|
-
**Properties:** `description`, `grid`, `indexAxis` (`index-axis`), `label`, `hiddenDatasets`, `legendPosition`
|
|
28
|
+
**Properties:** `description`, `grid`, `axes`, `compact`, `indexAxis` (`index-axis`), `label`, `hiddenDatasets`, `legendPosition`
|
|
29
29
|
(`legend-position`), `max`, `min`, `plugins`, `scaleType` (`scale-type`), `annotations`,
|
|
30
30
|
`stacked`, `withoutAnimation` (`without-animation`),
|
|
31
31
|
`withoutLegend` (`without-legend`), `withoutTooltip` (`without-tooltip`), `xLabel` (`x-label`),
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
- **Release history** [CHANGELOG.md](../../CHANGELOG.md); family-wide breaking-change summaries: [llms-full.txt](../../llms-full.txt)
|
|
10
10
|
- **Deprecations** none
|
|
11
11
|
- **Optional peers** none
|
|
12
|
-
- **Themeable via**
|
|
12
|
+
- **Themeable via** 13 parts, 16 custom properties — see this component's own `@csspart`/`@cssprop` list below
|
|
13
13
|
- **Library-wide behavior** (events, form association, `locale`/`strings`, tokens, TS types): `llms/shared.md`
|
|
14
14
|
|
|
15
15
|
---
|
|
@@ -49,6 +49,14 @@ readonly LyraLocaleEntry[]`, `LyraLocaleEntry { tag: string; label?: string; cou
|
|
|
49
49
|
- `showFlags: boolean = true` — each row's leading `<lr-flag language={tag} variant="compact">`
|
|
50
50
|
(or `<lr-flag country={country} variant="compact">` when the entry sets `country`); `false`
|
|
51
51
|
omits the flag element entirely (not just visually).
|
|
52
|
+
- `triggerDisplay: LyraLocaleTriggerDisplay = 'flag-label'` (attribute `trigger-display`) —
|
|
53
|
+
`'flag' | 'label' | 'flag-label'`. The default keeps the flag, label and chevron. `label`
|
|
54
|
+
omits only the trigger flag; the menu keeps its flags and endonyms. `flag` centers the flag in
|
|
55
|
+
a square and hides the visible label and chevron. The `trigger-label` remains available to
|
|
56
|
+
assistive technology and describes the trigger's current language; its accessible name still
|
|
57
|
+
follows `label`/the host `aria-label`. The square uses the shared/scoped trigger height with a
|
|
58
|
+
24px floor. `showFlags=false` retains visible text in every mode. Selection, keyboard navigation,
|
|
59
|
+
form values and the uncommitted effective-locale preview keep their usual behavior.
|
|
52
60
|
- `value: string = ''` — the **committed** selection (form value, drives `lr-change`). While `''`
|
|
53
61
|
and untouched, the trigger _displays_ `effectiveLocale` as a preview label, but
|
|
54
62
|
`checkValidity()`/`required` are governed by the real `value`, which stays `''` until a real
|
|
@@ -112,7 +120,8 @@ priority until cleared.
|
|
|
112
120
|
|
|
113
121
|
**CSS parts:** `form-control`, `form-control-label`, `trigger`,
|
|
114
122
|
`trigger-flag` (the trigger's leading `<lr-flag>` for the current value, present only while
|
|
115
|
-
`showFlags` is on
|
|
123
|
+
`showFlags` is on and `triggerDisplay` is not `label`), `trigger-label` (the current language,
|
|
124
|
+
visually hidden in flag-only mode), `listbox`, `option`, `option-flag` (present only while `showFlags` is on),
|
|
116
125
|
`option-label`, `option-tag` (the row's secondary line — the raw BCP-47 tag), `expand-icon`,
|
|
117
126
|
`hint`, `error`.
|
|
118
127
|
|
|
@@ -137,6 +146,11 @@ quiet-brand, and semibold semantic tokens.
|
|
|
137
146
|
peer warning duplication; `lr-flag` itself already logs one) when the optional
|
|
138
147
|
`@aceshooting/lyra-flags` package isn't installed and `showFlags` is left on.
|
|
139
148
|
|
|
149
|
+
A compact header can set `trigger-display="flag"` and
|
|
150
|
+
`--lr-locale-picker-trigger-height: 2.25rem` for a 36px square at the usual 16px root size.
|
|
151
|
+
Import `@aceshooting/lyra-ui/components/media/flag/flag-peer.js` to register the optional flag
|
|
152
|
+
resolver. Menu labels stay visible; a per-entry `country` override also reaches the compact trigger.
|
|
153
|
+
|
|
140
154
|
```html
|
|
141
155
|
<lr-locale-picker label="Language"></lr-locale-picker>
|
|
142
156
|
<script type="module">
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
- **Release history** [CHANGELOG.md](../../CHANGELOG.md); family-wide breaking-change summaries: [llms-full.txt](../../llms-full.txt)
|
|
10
10
|
- **Deprecations** none
|
|
11
11
|
- **Optional peers** `maplibre-gl` — see `llms/peers.md`
|
|
12
|
-
- **Themeable via**
|
|
12
|
+
- **Themeable via** 20 parts, 6 custom properties — see this component's own `@csspart`/`@cssprop` list below
|
|
13
13
|
- **Library-wide behavior** (events, form association, `locale`/`strings`, tokens, TS types): `llms/shared.md`
|
|
14
14
|
|
|
15
15
|
---
|
|
@@ -127,7 +127,8 @@ string; geojson: GeoJSON.FeatureCollection; field: string; stops: [number, strin
|
|
|
127
127
|
- `dataLayers: LyraMapGeoJsonDataLayer[] = []` (attribute: false) —
|
|
128
128
|
`LyraMapGeoJsonDataLayer { sourceId: string; geojson: GeoJSON.Feature |
|
|
129
129
|
GeoJSON.FeatureCollection; tone?: 'accent' | 'success' | 'warning' |
|
|
130
|
-
'danger' | 'neutral'; color?: string; strokeColor?: string;
|
|
130
|
+
'danger' | 'neutral'; color?: string; strokeColor?: string; line?: LyraMapLineOptions;
|
|
131
|
+
point?: LyraMapPointOptions; kind?: LyraMapDataLayerKind;
|
|
131
132
|
heatmap?: LyraMapHeatmapOptions; cluster?: LyraMapClusterOptions }`. `sourceId` is trimmed and must be nonempty; the first layer for a
|
|
132
133
|
`sourceId` that is successfully admitted wins; blank, malformed, and later duplicate records are
|
|
133
134
|
ignored without reserving an identity for a valid later sibling. Each retained entry adds one
|
|
@@ -212,6 +213,81 @@ intensity?: LyraMapHeatmapZoomValue; opacity?: number }`, where `LyraMapHeatmapZ
|
|
|
212
213
|
peer's default untouched on construction, and dropping a previously-authored value restores 1.
|
|
213
214
|
`cluster` is ignored on a heatmap entry: a heatmap already aggregates density, and clustering its
|
|
214
215
|
input would feed it one point per cluster instead of the real distribution.
|
|
216
|
+
`line?: LyraMapLineOptions { field?: string; stops?: readonly (readonly [number, string])[];
|
|
217
|
+
width?: number; opacity?: number }` configures line/outline paint for an ordinary `dataLayers`
|
|
218
|
+
entry. `field` names a numeric feature property; two usable `[value, color]` stops produce a
|
|
219
|
+
continuous linear ramp. Missing, null, and non-numeric feature values use `strokeColor`, then
|
|
220
|
+
`color`, then `tone`. Stops inspect the first 64 entries, discard non-finite values and invalid
|
|
221
|
+
CSS colors, sort ascending, and retain the first duplicate threshold. Fewer than two stops or
|
|
222
|
+
an absent field preserves flat color. Values beyond the endpoints clamp to their endpoint color.
|
|
223
|
+
CSS variables resolve on the host during reconciliation and retheming. `width` defaults to 2 CSS
|
|
224
|
+
pixels and clamps to `[0, 200]`; `opacity` defaults to 1 and clamps to `[0, 1]`. Non-finite values
|
|
225
|
+
restore those defaults, as does dropping a previously-authored option. Point colors and polygon
|
|
226
|
+
fills are unaffected; cluster and heatmap entries ignore `line`.
|
|
227
|
+
|
|
228
|
+
`point?: LyraMapPointOptions` styles individual points on ordinary and clustered auto entries.
|
|
229
|
+
It is ignored for heatmaps. `field` names a **string** feature property; `colors` maps exact
|
|
230
|
+
`[category, CSS color]` pairs. Missing, unknown and non-string categories use the existing
|
|
231
|
+
`strokeColor`/`color`/`tone` fallback. The first 32 pairs are inspected and valid duplicates are
|
|
232
|
+
first-wins. CSS variables resolve on the host and follow ancestor theme changes. `radius`
|
|
233
|
+
defaults to 5 CSS pixels and `strokeWidth` to 0; both clamp to `[0, 200]`. `strokeColor` overrides
|
|
234
|
+
the outline only, with the layer's flat color as fallback. Dropping options restores defaults.
|
|
235
|
+
|
|
236
|
+
`point.icons` maps exact category values to `LyraMapPointIcon { value: string; path: string;
|
|
237
|
+
viewBox?: readonly [number, number, number, number] }`. `iconField` defaults to `field`.
|
|
238
|
+
Each icon is a **filled SVG path string**, not SVG markup or a URL. Copy an icon's path data,
|
|
239
|
+
combine filled subpaths in that string, and supply its `[minX, minY, width, height]` viewBox
|
|
240
|
+
(default `[0, 0, 24, 24]`). Stroke-only drawings must first be converted to filled outlines.
|
|
241
|
+
The first 32 entries are inspected, valid duplicates are first-wins, path data is capped at
|
|
242
|
+
8192 characters, and viewBox coordinates must be finite within ±10000 with dimensions at least
|
|
243
|
+
0.001. Invalid paths are ignored; markup, external references and event handlers cannot execute.
|
|
244
|
+
Rasterization is synchronous and local, with no fetch or HTML/SVG document insertion.
|
|
245
|
+
`iconColor` accepts CSS variables and defaults to the tone's contrasting foreground; `iconSize`
|
|
246
|
+
is the displayed bounding square in CSS pixels (default 16, clamped to `[1, 200]`). The fixed
|
|
247
|
+
64px raster preserves the viewBox aspect ratio. Unknown categories, invalid icons and partial
|
|
248
|
+
peers lacking image-atlas methods retain their colored circles. No sprite or glyph URL is needed.
|
|
249
|
+
|
|
250
|
+
All categories use the **same GeoJSON source** and cluster across categories. Cluster circles
|
|
251
|
+
keep the existing count-based styling; only unclustered points get category colors/icons.
|
|
252
|
+
An optional symbol layer and at most 32 images are allocated per configured source, with no
|
|
253
|
+
per-feature DOM markers. Data changes reuse the source, retheming updates paint/icon pixels,
|
|
254
|
+
and style reloads restore the owned resources. Removing the entry or icons releases its images.
|
|
255
|
+
`lr-map-click` on either a point's circle or icon returns `origin: 'data-layer'`, the public
|
|
256
|
+
`sourceId`, and the rendered feature. For clustered GeoJSON, use numeric feature IDs and keep
|
|
257
|
+
string business IDs in feature properties, as MapLibre's cluster tiling uses numeric IDs. Canvas export includes both; supply an accessible textual
|
|
258
|
+
legend/list for category interpretation and individual keyboard actions.
|
|
259
|
+
|
|
260
|
+
```js
|
|
261
|
+
import '@aceshooting/lyra-ui/components/lr-map.js';
|
|
262
|
+
map.dataLayers = [{
|
|
263
|
+
sourceId: 'places', geojson: locations, cluster: {},
|
|
264
|
+
point: {
|
|
265
|
+
field: 'category', radius: 12, strokeWidth: 1,
|
|
266
|
+
colors: [['home', 'var(--lr-color-brand)'], ['work', 'var(--lr-color-success)']],
|
|
267
|
+
icons: [
|
|
268
|
+
{ value: 'home', path: 'M2 12L12 2L22 12V22H2Z' },
|
|
269
|
+
{ value: 'work', path: 'M8 2H16V6H22V22H2V6H8Z' },
|
|
270
|
+
],
|
|
271
|
+
iconSize: 14,
|
|
272
|
+
},
|
|
273
|
+
}];
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
Share the same stops with `legendGradient` and set its endpoint labels for units. A gradient
|
|
277
|
+
matching a line ramp remains linear even alongside a logarithmic choropleth. Changing metric,
|
|
278
|
+
filtered GeoJSON, width or opacity reconciles existing resources; style reloads restore the layer.
|
|
279
|
+
Lines remain in MapLibre's canvas and can be captured with the map's normal render-event PNG
|
|
280
|
+
export flow.
|
|
281
|
+
|
|
282
|
+
```js
|
|
283
|
+
mapElement.dataLayers = [{
|
|
284
|
+
sourceId: 'routes', geojson: routes,
|
|
285
|
+
line: { field: 'kmh', stops: speedStops, width: 4, opacity: 0.9 }
|
|
286
|
+
}];
|
|
287
|
+
mapElement.legendGradient = speedStops;
|
|
288
|
+
mapElement.legendGradientLoLabel = '0 km/h';
|
|
289
|
+
mapElement.legendGradientHiLabel = '100 km/h';
|
|
290
|
+
```
|
|
215
291
|
- `maxBounds: LyraMapBounds | null = null` (attribute: false) — box the map may not pan outside,
|
|
216
292
|
`[[west, south], [east, north]]`. Prefer it over calling `map.setMaxBounds()` through the `.map`
|
|
217
293
|
escape hatch: constraining the camera can wedge maplibre-gl at a sub-1 fractional zoom in a wide
|
|
@@ -254,7 +330,7 @@ payload beside the map.
|
|
|
254
330
|
|
|
255
331
|
**Authoring types:** `LyraMapLegendEntry`, `LyraMapLegendPattern`, `LyraMapLegendProjection`, `LyraMapChoroplethLayer`,
|
|
256
332
|
`LyraMapGeoJsonDataLayer`, `LyraMapDataLayerKind`, `LyraMapClusterOptions`, `LyraMapHeatmapOptions`,
|
|
257
|
-
`LyraMapHeatmapZoomValue`, `LyraMapMarker`, `LyraMapMarkerActivationDetail`,
|
|
333
|
+
`LyraMapHeatmapZoomValue`, `LyraMapLineOptions`, `LyraMapPointOptions`, `LyraMapPointIcon`, `LyraMapMarker`, `LyraMapMarkerActivationDetail`,
|
|
258
334
|
`LyraMapMarkerActivationSource`, `LyraMapStyleSpecification`, and `LyraMapInstance`.
|
|
259
335
|
The former `LegendEntry`, `ChoroplethLayer`, `GeoJsonDataLayer`, and `MapMarker` names are removed
|
|
260
336
|
in v9 rather than retained as aliases.
|
|
@@ -297,7 +373,8 @@ when `legend` and `legendGradient` are both empty.
|
|
|
297
373
|
|
|
298
374
|
**CSS parts:** `base`, `container`, `legend`, `legend-swatch`, `legend-gradient`, `legend-lo`,
|
|
299
375
|
`legend-hi`, `legend-limit`, `marker`, `popup`,
|
|
300
|
-
`popup-content`, `popup-close-button`, `attribution`, `attribution-toggle`, `
|
|
376
|
+
`popup-content`, `popup-close-button`, `attribution`, `attribution-toggle`, `navigation`,
|
|
377
|
+
`zoom-in`, `zoom-out`, `compass`, `scale`, `error`.
|
|
301
378
|
`legend` is a localized `role="group"` containing a real list associated to the map canvas with
|
|
302
379
|
`aria-describedby`; each entry is a `listitem`, decorative swatches are inert/accessibility-hidden,
|
|
303
380
|
and the overlay is bounded to the map allocation with scrolling and long-label wrapping.
|
|
@@ -310,6 +387,18 @@ peer unavailable, owner-realm WebGL2 unavailable, or initialization failed. A po
|
|
|
310
387
|
appended to the document's pre-mounted `[data-lr-live-region="assertive"]` sink rather than making
|
|
311
388
|
shadow chrome live; raw caught errors are never exposed.
|
|
312
389
|
|
|
390
|
+
**Standard peer controls:** after `lr-map-load`, narrow `.map` to the installed MapLibre peer
|
|
391
|
+
and use `addControl(new NavigationControl(), 'bottom-right')` and
|
|
392
|
+
`addControl(new ScaleControl({ unit: 'metric' }), 'bottom-left')`. No document-level peer CSS or
|
|
393
|
+
shadow-root modification is needed: navigation buttons, compass glyph, scale bar and control
|
|
394
|
+
corners are styled with Lyra tokens. The corners follow inline start/end under RTL. The legend
|
|
395
|
+
reserves vertical room for these controls and attribution, including after resize or removal.
|
|
396
|
+
Navigation exposes `navigation`, `zoom-in`, `zoom-out`, and `compass` parts; the scale exposes `scale`.
|
|
397
|
+
Button names update through `zoomIn`, `zoomOut`, and `mapResetNorth` locale strings. MapLibre retains
|
|
398
|
+
keyboard activation, compass rotation, zoom limits, scale units and viewport updates. No controls
|
|
399
|
+
are created until the application explicitly adds them. This is a supported imperative peer-control
|
|
400
|
+
integration; there is no declarative controls property.
|
|
401
|
+
|
|
313
402
|
**Themeable custom properties:**
|
|
314
403
|
|
|
315
404
|
- `--lr-map-height` (default `var(--lr-size-24rem)`) — host block size, shared with the optional
|
|
@@ -25,7 +25,7 @@ Everything else is inherited verbatim from `lr-chart`; each name below has the s
|
|
|
25
25
|
and behavior there. **See `llms/components/lr-chart.md` for the details, code example, and gotchas
|
|
26
26
|
of every entry in these lists.**
|
|
27
27
|
|
|
28
|
-
**Properties:** `description`, `grid`, `indexAxis` (`index-axis`), `label`, `hiddenDatasets`, `legendPosition`
|
|
28
|
+
**Properties:** `description`, `grid`, `axes`, `compact`, `indexAxis` (`index-axis`), `label`, `hiddenDatasets`, `legendPosition`
|
|
29
29
|
(`legend-position`), `max`, `min`, `plugins`, `scaleType` (`scale-type`), `annotations`,
|
|
30
30
|
`stacked`, `withoutAnimation` (`without-animation`),
|
|
31
31
|
`withoutLegend` (`without-legend`), `withoutTooltip` (`without-tooltip`), `xLabel` (`x-label`),
|
|
@@ -25,7 +25,7 @@ Everything else is inherited verbatim from `lr-chart`; each name below has the s
|
|
|
25
25
|
and behavior there. **See `llms/components/lr-chart.md` for the details, code example, and gotchas
|
|
26
26
|
of every entry in these lists.**
|
|
27
27
|
|
|
28
|
-
**Properties:** `description`, `grid`, `indexAxis` (`index-axis`), `label`, `hiddenDatasets`, `legendPosition`
|
|
28
|
+
**Properties:** `description`, `grid`, `axes`, `compact`, `indexAxis` (`index-axis`), `label`, `hiddenDatasets`, `legendPosition`
|
|
29
29
|
(`legend-position`), `max`, `min`, `plugins`, `scaleType` (`scale-type`), `annotations`,
|
|
30
30
|
`stacked`, `withoutAnimation` (`without-animation`),
|
|
31
31
|
`withoutLegend` (`without-legend`), `withoutTooltip` (`without-tooltip`), `xLabel` (`x-label`),
|
|
@@ -25,7 +25,7 @@ Everything else is inherited verbatim from `lr-chart`; each name below has the s
|
|
|
25
25
|
and behavior there. **See `llms/components/lr-chart.md` for the details, code example, and gotchas
|
|
26
26
|
of every entry in these lists.**
|
|
27
27
|
|
|
28
|
-
**Properties:** `description`, `grid`, `indexAxis` (`index-axis`), `label`, `hiddenDatasets`, `legendPosition`
|
|
28
|
+
**Properties:** `description`, `grid`, `axes`, `compact`, `indexAxis` (`index-axis`), `label`, `hiddenDatasets`, `legendPosition`
|
|
29
29
|
(`legend-position`), `max`, `min`, `plugins`, `scaleType` (`scale-type`), `annotations`,
|
|
30
30
|
`stacked`, `withoutAnimation` (`without-animation`),
|
|
31
31
|
`withoutLegend` (`without-legend`), `withoutTooltip` (`without-tooltip`), `xLabel` (`x-label`),
|
|
@@ -25,7 +25,7 @@ Everything else is inherited verbatim from `lr-chart`; each name below has the s
|
|
|
25
25
|
and behavior there. **See `llms/components/lr-chart.md` for the details, code example, and gotchas
|
|
26
26
|
of every entry in these lists.**
|
|
27
27
|
|
|
28
|
-
**Properties:** `description`, `grid`, `indexAxis` (`index-axis`), `label`, `hiddenDatasets`, `legendPosition`
|
|
28
|
+
**Properties:** `description`, `grid`, `axes`, `compact`, `indexAxis` (`index-axis`), `label`, `hiddenDatasets`, `legendPosition`
|
|
29
29
|
(`legend-position`), `max`, `min`, `plugins`, `scaleType` (`scale-type`), `annotations`,
|
|
30
30
|
`stacked`, `withoutAnimation` (`without-animation`),
|
|
31
31
|
`withoutLegend` (`without-legend`), `withoutTooltip` (`without-tooltip`), `xLabel` (`x-label`),
|