@aceshooting/lyra-ui 14.1.1 → 14.3.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 +42 -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-legend-visibility.d.ts +8 -0
- package/dist/components/charts/chart/chart.class.d.ts +64 -15
- package/dist/components/charts/chart/chart.class.js +10 -10
- 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/data/table/table.class.d.ts +9 -1
- package/dist/components/data/table/table.class.js +4 -3
- package/dist/components/data/table/table.styles.js +1 -1
- package/dist/components/forms/button/button.class.d.ts +8 -2
- package/dist/components/forms/button/button.class.js +6 -2
- 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 +86 -6
- 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 +21 -5
- package/dist/internal/default-strings.generated.d.ts +1 -1
- package/dist/internal/default-strings.generated.js +1 -1
- package/dist/internal/icons.d.ts +2 -0
- package/dist/internal/icons.js +2 -2
- 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-accordion-item.md +36 -0
- package/llms/components/lr-accordion.md +36 -0
- package/llms/components/lr-bar-chart.md +5 -2
- package/llms/components/lr-bubble-chart.md +5 -2
- package/llms/components/lr-button.md +5 -0
- package/llms/components/lr-chart.md +67 -3
- 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-details.md +36 -0
- package/llms/components/lr-doughnut-chart.md +5 -2
- package/llms/components/lr-heatmap.md +63 -4
- package/llms/components/lr-histogram.md +7 -3
- package/llms/components/lr-line-chart.md +5 -2
- package/llms/components/lr-locale-picker.md +16 -2
- package/llms/components/lr-map.md +131 -4
- package/llms/components/lr-pie-chart.md +5 -2
- package/llms/components/lr-polar-area-chart.md +5 -2
- package/llms/components/lr-radar-chart.md +5 -2
- package/llms/components/lr-scatter-chart.md +5 -2
- package/llms/components/lr-slider.md +20 -4
- package/llms/components/lr-table.md +10 -4
- package/llms-full.txt +439 -56
- package/package.json +3 -3
- package/vscode-css-data.json +1 -1
- package/vscode-html-data.json +1 -1
- package/web-types.json +1 -1
|
@@ -159,6 +159,42 @@ findable `hidden="until-found"` closed-state gate.
|
|
|
159
159
|
The Details icon wrapper also carries Shoelace's `summary-icon` alias, so either part name styles
|
|
160
160
|
the same node. `header-actions` is the wrapper around the `header-actions` slot.
|
|
161
161
|
|
|
162
|
+
For rich independent actions, reserve a useful basis on `header-actions` so the complete action
|
|
163
|
+
group wraps onto another row before its checkbox label becomes too narrow. The header already
|
|
164
|
+
wraps; its summary belongs to a private native-details flex item, so setting `flex` on
|
|
165
|
+
`::part(summary)` does not control that item's allocation. This recipe uses public parts and
|
|
166
|
+
ordinary light-DOM layout:
|
|
167
|
+
|
|
168
|
+
```html
|
|
169
|
+
<style>
|
|
170
|
+
lr-details.responsive-actions::part(header-actions) {
|
|
171
|
+
flex: 1 1 12rem;
|
|
172
|
+
min-inline-size: min(100%, 12rem);
|
|
173
|
+
padding: var(--lr-space-xs);
|
|
174
|
+
box-sizing: border-box;
|
|
175
|
+
}
|
|
176
|
+
.details-action-group {
|
|
177
|
+
display: flex;
|
|
178
|
+
flex-wrap: wrap;
|
|
179
|
+
align-items: center;
|
|
180
|
+
gap: var(--lr-space-s);
|
|
181
|
+
min-inline-size: 0;
|
|
182
|
+
}
|
|
183
|
+
.details-action-group lr-checkbox { flex: 1 1 auto; min-inline-size: 0; }
|
|
184
|
+
</style>
|
|
185
|
+
<lr-details class="responsive-actions" summary="Settings">
|
|
186
|
+
<span slot="header-actions" class="details-action-group">
|
|
187
|
+
<lr-checkbox size="s">Show distribution details</lr-checkbox>
|
|
188
|
+
<lr-badge>Live</lr-badge>
|
|
189
|
+
</span>
|
|
190
|
+
Distribution settings.
|
|
191
|
+
</lr-details>
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
Import the granular details, checkbox and badge registration entries. Adjust the `12rem` basis
|
|
195
|
+
for the actual labels. Logical sizing supports RTL and narrower allocations; the checkbox remains
|
|
196
|
+
independently focusable and operable when the summary is disabled.
|
|
197
|
+
|
|
162
198
|
**Themeable custom properties:** accordion item exposes `--lr-accordion-item-spacing` (default
|
|
163
199
|
`var(--lr-form-control-padding-inline)`), `--lr-accordion-item-show-duration` and
|
|
164
200
|
`--lr-accordion-item-hide-duration` (both default `var(--lr-duration-base)`), and
|
|
@@ -159,6 +159,42 @@ findable `hidden="until-found"` closed-state gate.
|
|
|
159
159
|
The Details icon wrapper also carries Shoelace's `summary-icon` alias, so either part name styles
|
|
160
160
|
the same node. `header-actions` is the wrapper around the `header-actions` slot.
|
|
161
161
|
|
|
162
|
+
For rich independent actions, reserve a useful basis on `header-actions` so the complete action
|
|
163
|
+
group wraps onto another row before its checkbox label becomes too narrow. The header already
|
|
164
|
+
wraps; its summary belongs to a private native-details flex item, so setting `flex` on
|
|
165
|
+
`::part(summary)` does not control that item's allocation. This recipe uses public parts and
|
|
166
|
+
ordinary light-DOM layout:
|
|
167
|
+
|
|
168
|
+
```html
|
|
169
|
+
<style>
|
|
170
|
+
lr-details.responsive-actions::part(header-actions) {
|
|
171
|
+
flex: 1 1 12rem;
|
|
172
|
+
min-inline-size: min(100%, 12rem);
|
|
173
|
+
padding: var(--lr-space-xs);
|
|
174
|
+
box-sizing: border-box;
|
|
175
|
+
}
|
|
176
|
+
.details-action-group {
|
|
177
|
+
display: flex;
|
|
178
|
+
flex-wrap: wrap;
|
|
179
|
+
align-items: center;
|
|
180
|
+
gap: var(--lr-space-s);
|
|
181
|
+
min-inline-size: 0;
|
|
182
|
+
}
|
|
183
|
+
.details-action-group lr-checkbox { flex: 1 1 auto; min-inline-size: 0; }
|
|
184
|
+
</style>
|
|
185
|
+
<lr-details class="responsive-actions" summary="Settings">
|
|
186
|
+
<span slot="header-actions" class="details-action-group">
|
|
187
|
+
<lr-checkbox size="s">Show distribution details</lr-checkbox>
|
|
188
|
+
<lr-badge>Live</lr-badge>
|
|
189
|
+
</span>
|
|
190
|
+
Distribution settings.
|
|
191
|
+
</lr-details>
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
Import the granular details, checkbox and badge registration entries. Adjust the `12rem` basis
|
|
195
|
+
for the actual labels. Logical sizing supports RTL and narrower allocations; the checkbox remains
|
|
196
|
+
independently focusable and operable when the summary is disabled.
|
|
197
|
+
|
|
162
198
|
**Themeable custom properties:** accordion item exposes `--lr-accordion-item-spacing` (default
|
|
163
199
|
`var(--lr-form-control-padding-inline)`), `--lr-accordion-item-show-duration` and
|
|
164
200
|
`--lr-accordion-item-hide-duration` (both default `var(--lr-duration-base)`), and
|
|
@@ -25,8 +25,9 @@ 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`
|
|
29
|
-
(`legend-position`), `
|
|
28
|
+
**Properties:** `description`, `grid`, `axes`, `compact`, `indexAxis` (`index-axis`), `label`, `hiddenDatasets`, `legendPosition`
|
|
29
|
+
(`legend-position`), `hiddenDatums`, `legendMode` (`legend-mode`), `legendDisplay` (`legend-display`),
|
|
30
|
+
`max`, `min`, `plugins`, `scaleType` (`scale-type`), `annotations`,
|
|
30
31
|
`stacked`, `withoutAnimation` (`without-animation`),
|
|
31
32
|
`withoutLegend` (`without-legend`), `withoutTooltip` (`without-tooltip`), `xLabel` (`x-label`),
|
|
32
33
|
`yLabel` (`y-label`), plus additive `labels`, `datasets`, `valueFormatter`, `formatter`, `area`, `zoom`,
|
|
@@ -42,6 +43,8 @@ of every entry in these lists.**
|
|
|
42
43
|
index, label, value }`), `lr-before-legend-visibility-change` (cancelable), and
|
|
43
44
|
`lr-legend-visibility-change` (commit; both legend events carry `datasetIndex`, `visible`, and the
|
|
44
45
|
complete `hiddenDatasets` snapshot).
|
|
46
|
+
Radial category legends additionally emit `lr-before-datum-visibility-change` (cancelable) and
|
|
47
|
+
`lr-datum-visibility-change`, carrying `index`, `visible` and the frozen `hiddenDatums` snapshot.
|
|
45
48
|
|
|
46
49
|
**Slots:** default JSON configuration script, `data-table`, `center`.
|
|
47
50
|
|
|
@@ -25,8 +25,9 @@ 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`
|
|
29
|
-
(`legend-position`), `
|
|
28
|
+
**Properties:** `description`, `grid`, `axes`, `compact`, `indexAxis` (`index-axis`), `label`, `hiddenDatasets`, `legendPosition`
|
|
29
|
+
(`legend-position`), `hiddenDatums`, `legendMode` (`legend-mode`), `legendDisplay` (`legend-display`),
|
|
30
|
+
`max`, `min`, `plugins`, `scaleType` (`scale-type`), `annotations`,
|
|
30
31
|
`stacked`, `withoutAnimation` (`without-animation`),
|
|
31
32
|
`withoutLegend` (`without-legend`), `withoutTooltip` (`without-tooltip`), `xLabel` (`x-label`),
|
|
32
33
|
`yLabel` (`y-label`), plus additive `labels`, `datasets`, `valueFormatter`, `formatter`, `area`, `zoom`,
|
|
@@ -42,6 +43,8 @@ of every entry in these lists.**
|
|
|
42
43
|
index, label, value }`), `lr-before-legend-visibility-change` (cancelable), and
|
|
43
44
|
`lr-legend-visibility-change` (commit; both legend events carry `datasetIndex`, `visible`, and the
|
|
44
45
|
complete `hiddenDatasets` snapshot).
|
|
46
|
+
Radial category legends additionally emit `lr-before-datum-visibility-change` (cancelable) and
|
|
47
|
+
`lr-datum-visibility-change`, carrying `index`, `visible` and the frozen `hiddenDatums` snapshot.
|
|
45
48
|
|
|
46
49
|
**Slots:** default JSON configuration script, `data-table`, `center`.
|
|
47
50
|
|
|
@@ -337,6 +337,11 @@ box no matter what tier or override is in play.
|
|
|
337
337
|
are resolved onto the focused internal control through `ariaDescribedByElements`; external
|
|
338
338
|
`aria-labelledby` is not copied across the shadow boundary.
|
|
339
339
|
- Host `aria-haspopup` and `aria-expanded` values are forwarded to the internal semantic control.
|
|
340
|
+
For toggle buttons, host `aria-pressed="true|false|mixed"` reaches the focused native button.
|
|
341
|
+
Navigation can use `aria-current="page|step|location|date|time|true|false"`. Both states update
|
|
342
|
+
reactively, including native `ariaPressed`/`ariaCurrent` property assignments, attribute removal
|
|
343
|
+
and `href` changes. Empty or unsupported tokens are omitted. The native button/link role remains
|
|
344
|
+
unchanged: use pressed state for button toggles and current state for navigation links.
|
|
340
345
|
For host `aria-controls`, targets in the host's own root are resolved through the reflected
|
|
341
346
|
element-reference API so a popup relationship survives the component's shadow boundary; browsers
|
|
342
347
|
with that API expose the relationship through `ariaControlsElements` and intentionally serialize
|
|
@@ -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;
|
|
@@ -109,6 +127,28 @@ structured points retain their y-value formatting.
|
|
|
109
127
|
would clip. Its pressed state follows `hiddenDatasets` whenever that controlled snapshot is
|
|
110
128
|
defined, otherwise the effective dataset's declarative `hidden` value before Chart.js is ready
|
|
111
129
|
and across chart type/plugin rebuilds.
|
|
130
|
+
- `legendMode: LyraChartLegendMode = 'dataset'` (attribute `legend-mode`) — `dataset` preserves
|
|
131
|
+
dataset toggles. `datum` shows one category toggle per slice in pie, doughnut and polar-area
|
|
132
|
+
charts; other types retain dataset legends. Category names use source labels with localized
|
|
133
|
+
numbered fallbacks. Colors and values come from the first dataset. With multiple datasets/rings,
|
|
134
|
+
a category toggle hides that source index in every ring, matching Chart.js category visibility.
|
|
135
|
+
- `hiddenDatums: readonly number[] = []` (attribute: false) — clone-owned hidden source category
|
|
136
|
+
indexes for radial charts. `[]` restores all categories. Invalid, duplicate and out-of-range
|
|
137
|
+
indexes are ignored when applied or emitted. Programmatic changes are silent; accepted datum
|
|
138
|
+
legend toggles write the complete next snapshot. Data and type replacements, reconnection and
|
|
139
|
+
sampling retain source-index meaning. This state is independent of `hiddenDatasets`; hiding a
|
|
140
|
+
whole dataset continues to hide its ring. Accessible data and CSV export retain hidden values.
|
|
141
|
+
- `legendDisplay: LyraChartLegendDisplay = 'auto'` (attribute `legend-display`) — `auto` preserves
|
|
142
|
+
the existing label with optional legend formatting. `label` always shows labels alone, even when
|
|
143
|
+
`formatter`/`valueFormatter` supplies values for tooltips or axes. `value` appends the formatted
|
|
144
|
+
numeric value. `percentage` appends a locale-formatted share independently of these callbacks:
|
|
145
|
+
the denominator is the sum of absolute represented legend values, including hidden entries.
|
|
146
|
+
Dataset entries use sampled sums; category entries use the first dataset's represented values.
|
|
147
|
+
Zero totals give 0%. These options affect the DOM legend; tooltip/axis/table formatting is unchanged.
|
|
148
|
+
Simplified pie/doughnut datasets with magnitudes above `Number.MAX_SAFE_INTEGER` are uniformly
|
|
149
|
+
rescaled for finite canvas geometry. Lyra tooltips, data labels, legends, events and CSV retain
|
|
150
|
+
original values; direct Chart.js callbacks see the rescaled peer data. Explicit `config.data`
|
|
151
|
+
remains the unmodified full-fidelity escape hatch.
|
|
112
152
|
- `legendPosition: LyraChartLegendPosition = 'top'` (attribute `legend-position`) — accepts the
|
|
113
153
|
Chart.js `left|top|right|bottom|center|chartArea|{ [scaleId]: number }` positions plus logical
|
|
114
154
|
`start`/`end`; the additive `auto` chooses right above 480px and bottom below that allocation
|
|
@@ -170,6 +210,14 @@ structured points retain their y-value formatting.
|
|
|
170
210
|
explicit array replaces that generated member rather than concatenating with it. This effective
|
|
171
211
|
model drives canvas rendering, `appendData()`, export, the accessible name/summary, keyboard
|
|
172
212
|
navigation and activation events, the DOM legend, and the generated fallback table.
|
|
213
|
+
For generated **bar** series, an explicit series `width` wins. Otherwise authored bar
|
|
214
|
+
`borderWidth`/`borderRadius` defaults in `options.datasets.bar`, its nested `elements.bar`,
|
|
215
|
+
`options.elements.bar`, or root `options` are left for Chart.js to resolve, including scriptable,
|
|
216
|
+
indexable and `barBorderWidth`/`barBorderRadius` forms. Unset values retain Lyra's `--border-width`
|
|
217
|
+
and `--border-radius` defaults; removing config restores those defaults. Raw `config.data.datasets`
|
|
218
|
+
remain authoritative. Dense charts with transparent borders should set
|
|
219
|
+
`config.options.datasets.bar.borderWidth = 0` (or the public `--border-width: 0` CSS hook):
|
|
220
|
+
a one-pixel transparent stroke can consume the fill of a bar narrower than two pixels.
|
|
173
221
|
As a declarative alternative, place one `<script type="application/json">` in the default slot;
|
|
174
222
|
an explicitly assigned `config` property wins over the slotted object. Invalid/non-object JSON is
|
|
175
223
|
ignored without evaluating script or exposing prototype-pollution keys to the merge.
|
|
@@ -284,6 +332,22 @@ family-wide handling; `lr-point-click` remains as a compatibility event. Also
|
|
|
284
332
|
`{ datasetIndex: number, visible: boolean, hiddenDatasets: readonly number[] }`; the latter is the
|
|
285
333
|
complete, sorted, valid next snapshot. Call `preventDefault()` on the proposal to veto the toggle;
|
|
286
334
|
then no property change or commit event occurs.
|
|
335
|
+
Category toggles use a separate pair, `lr-before-datum-visibility-change` (cancelable proposal) and
|
|
336
|
+
`lr-datum-visibility-change` (accepted commit), carrying
|
|
337
|
+
`{ index: number, visible: boolean, hiddenDatums: readonly number[] }`. Both details and their
|
|
338
|
+
complete, sorted index snapshots are frozen. `index` is the source category index, including when
|
|
339
|
+
the displayed data is sampled; it applies across all rings. Programmatic assignments emit neither
|
|
340
|
+
pair. `preventDefault()` leaves both controlled state and the chart unchanged.
|
|
341
|
+
|
|
342
|
+
```html
|
|
343
|
+
<lr-doughnut-chart
|
|
344
|
+
legend-mode="datum"
|
|
345
|
+
legend-display="label"
|
|
346
|
+
.labels=${['A', 'B', 'C']}
|
|
347
|
+
.datasets=${[{ label: 'Distribution', data: [5, 3, 2] }]}
|
|
348
|
+
.hiddenDatums=${[]}
|
|
349
|
+
></lr-doughnut-chart>
|
|
350
|
+
```
|
|
287
351
|
|
|
288
352
|
**Slots:** default — one optional `<script type="application/json">` Chart.js configuration;
|
|
289
353
|
`data-table` — an optional consumer-provided complete, paginated, or virtualized accessible table
|
|
@@ -301,8 +365,8 @@ another application-owned presentation. Explicit `config.data` is the deliberate
|
|
|
301
365
|
Chart.js escape hatch and is not rewritten by the simplified-surface sampler.
|
|
302
366
|
|
|
303
367
|
**CSS parts:** `base`, `plot` (the fixed-height canvas/overlay region), `canvas`, `legend` (the
|
|
304
|
-
wrapping DOM legend), `legend-item` (a dataset
|
|
305
|
-
|
|
368
|
+
wrapping DOM legend), `legend-item` (a dataset/category visibility button), `legend-item-hidden`
|
|
369
|
+
(added while the dataset/category is hidden), `legend-swatch`,
|
|
306
370
|
`reset-zoom-button`, `description`, `notices` (wrapper for nonfatal feature warnings and
|
|
307
371
|
bounded-alternative truncation notices), `data-table`, `data-table-toggle` (the `dataTableToggle` disclosure button), `data-truncation` (the bounded-alternative
|
|
308
372
|
notice), `feature-warning` (a nonfatal missing optional-feature warning), `center` (the
|
|
@@ -439,7 +503,7 @@ announced. In particular, unavailable data labels do not remove generated table
|
|
|
439
503
|
the observer, drawing starts when the peer and canvas are ready. An empty delivered callback
|
|
440
504
|
retains the visible fallback. Peer loading and accessible DOM may settle while visibility is
|
|
441
505
|
pending. Independently, `updated()` only reaches
|
|
442
|
-
Chart.js when at least one of `type`, `labels`, `datasets`, `description`, `grid`, `indexAxis`,
|
|
506
|
+
Chart.js when at least one of `type`, `labels`, `datasets`, `description`, `grid`, `axes`, `compact`, `indexAxis`,
|
|
443
507
|
`label`, `hiddenDatasets`, `legendPosition`, `min`, `max`, `plugins`, the internal resolved auto legend
|
|
444
508
|
position, `valueFormatter`, `formatter`, `area`, `height`, `xLabel`, `yLabel`, `y2Label`, `beginAtZero`,
|
|
445
509
|
`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
|
|
@@ -159,6 +159,42 @@ findable `hidden="until-found"` closed-state gate.
|
|
|
159
159
|
The Details icon wrapper also carries Shoelace's `summary-icon` alias, so either part name styles
|
|
160
160
|
the same node. `header-actions` is the wrapper around the `header-actions` slot.
|
|
161
161
|
|
|
162
|
+
For rich independent actions, reserve a useful basis on `header-actions` so the complete action
|
|
163
|
+
group wraps onto another row before its checkbox label becomes too narrow. The header already
|
|
164
|
+
wraps; its summary belongs to a private native-details flex item, so setting `flex` on
|
|
165
|
+
`::part(summary)` does not control that item's allocation. This recipe uses public parts and
|
|
166
|
+
ordinary light-DOM layout:
|
|
167
|
+
|
|
168
|
+
```html
|
|
169
|
+
<style>
|
|
170
|
+
lr-details.responsive-actions::part(header-actions) {
|
|
171
|
+
flex: 1 1 12rem;
|
|
172
|
+
min-inline-size: min(100%, 12rem);
|
|
173
|
+
padding: var(--lr-space-xs);
|
|
174
|
+
box-sizing: border-box;
|
|
175
|
+
}
|
|
176
|
+
.details-action-group {
|
|
177
|
+
display: flex;
|
|
178
|
+
flex-wrap: wrap;
|
|
179
|
+
align-items: center;
|
|
180
|
+
gap: var(--lr-space-s);
|
|
181
|
+
min-inline-size: 0;
|
|
182
|
+
}
|
|
183
|
+
.details-action-group lr-checkbox { flex: 1 1 auto; min-inline-size: 0; }
|
|
184
|
+
</style>
|
|
185
|
+
<lr-details class="responsive-actions" summary="Settings">
|
|
186
|
+
<span slot="header-actions" class="details-action-group">
|
|
187
|
+
<lr-checkbox size="s">Show distribution details</lr-checkbox>
|
|
188
|
+
<lr-badge>Live</lr-badge>
|
|
189
|
+
</span>
|
|
190
|
+
Distribution settings.
|
|
191
|
+
</lr-details>
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
Import the granular details, checkbox and badge registration entries. Adjust the `12rem` basis
|
|
195
|
+
for the actual labels. Logical sizing supports RTL and narrower allocations; the checkbox remains
|
|
196
|
+
independently focusable and operable when the summary is disabled.
|
|
197
|
+
|
|
162
198
|
**Themeable custom properties:** accordion item exposes `--lr-accordion-item-spacing` (default
|
|
163
199
|
`var(--lr-form-control-padding-inline)`), `--lr-accordion-item-show-duration` and
|
|
164
200
|
`--lr-accordion-item-hide-duration` (both default `var(--lr-duration-base)`), and
|
|
@@ -25,8 +25,9 @@ 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`
|
|
29
|
-
(`legend-position`), `
|
|
28
|
+
**Properties:** `description`, `grid`, `axes`, `compact`, `indexAxis` (`index-axis`), `label`, `hiddenDatasets`, `legendPosition`
|
|
29
|
+
(`legend-position`), `hiddenDatums`, `legendMode` (`legend-mode`), `legendDisplay` (`legend-display`),
|
|
30
|
+
`max`, `min`, `plugins`, `scaleType` (`scale-type`), `annotations`,
|
|
30
31
|
`stacked`, `withoutAnimation` (`without-animation`),
|
|
31
32
|
`withoutLegend` (`without-legend`), `withoutTooltip` (`without-tooltip`), `xLabel` (`x-label`),
|
|
32
33
|
`yLabel` (`y-label`), plus additive `labels`, `datasets`, `valueFormatter`, `formatter`, `area`, `zoom`,
|
|
@@ -42,6 +43,8 @@ of every entry in these lists.**
|
|
|
42
43
|
index, label, value }`), `lr-before-legend-visibility-change` (cancelable), and
|
|
43
44
|
`lr-legend-visibility-change` (commit; both legend events carry `datasetIndex`, `visible`, and the
|
|
44
45
|
complete `hiddenDatasets` snapshot).
|
|
46
|
+
Radial category legends additionally emit `lr-before-datum-visibility-change` (cancelable) and
|
|
47
|
+
`lr-datum-visibility-change`, carrying `index`, `visible` and the frozen `hiddenDatums` snapshot.
|
|
45
48
|
|
|
46
49
|
**Slots:** default JSON configuration script, `data-table`, `center`.
|
|
47
50
|
|
|
@@ -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,8 +33,9 @@ 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`
|
|
37
|
-
(`index-axis`), `hiddenDatasets`, `legendPosition` (`legend-position`),
|
|
36
|
+
- All other `LyraChart` properties are inherited and usable: `description`, `grid`, `axes`, `compact`, `indexAxis`
|
|
37
|
+
(`index-axis`), `hiddenDatasets`, `hiddenDatums`, `legendPosition` (`legend-position`),
|
|
38
|
+
`legendMode` (`legend-mode`), `legendDisplay` (`legend-display`), `max`, `min`, `plugins`,
|
|
38
39
|
`withoutAnimation` (`without-animation`), `withoutLegend` (`without-legend`), `withoutTooltip`
|
|
39
40
|
(`without-tooltip`), `valueFormatter`, `formatter`, `area`, `zoom`, `config`, `height`, `xLabel` (`x-label`),
|
|
40
41
|
`yLabel` (`y-label`), `y2Label` (`y2-label`), `beginAtZero` (`begin-at-zero`),
|
|
@@ -46,9 +47,12 @@ maxSamples?)` appends finite raw samples and optionally retains only the newest
|
|
|
46
47
|
`appendData()` remains a working compatibility adapter (no longer deprecated); prefer
|
|
47
48
|
`appendSamples()` for new code.
|
|
48
49
|
|
|
49
|
-
**Events:** `lr-zoom`, `lr-datum-activate`, `lr-point-click`, `lr-before-
|
|
50
|
+
**Events:** `lr-zoom`, `lr-datum-activate`, `lr-point-click`, `lr-before-datum-visibility-change`
|
|
51
|
+
(cancelable), `lr-datum-visibility-change`, `lr-before-legend-visibility-change` (cancelable), and
|
|
50
52
|
`lr-legend-visibility-change` — inherited; `lr-point-click`'s `index` is the bucket index and
|
|
51
53
|
`label` the generated bucket range string (`"lo–hi"`, both bounds at one decimal place).
|
|
54
|
+
The inherited datum-visibility events apply only to radial controllers; the histogram keeps its
|
|
55
|
+
bar controller and dataset legend even with `legend-mode="datum"`.
|
|
52
56
|
|
|
53
57
|
**Slots:** default JSON configuration script, `data-table`, `center`.
|
|
54
58
|
|
|
@@ -25,8 +25,9 @@ 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`
|
|
29
|
-
(`legend-position`), `
|
|
28
|
+
**Properties:** `description`, `grid`, `axes`, `compact`, `indexAxis` (`index-axis`), `label`, `hiddenDatasets`, `legendPosition`
|
|
29
|
+
(`legend-position`), `hiddenDatums`, `legendMode` (`legend-mode`), `legendDisplay` (`legend-display`),
|
|
30
|
+
`max`, `min`, `plugins`, `scaleType` (`scale-type`), `annotations`,
|
|
30
31
|
`stacked`, `withoutAnimation` (`without-animation`),
|
|
31
32
|
`withoutLegend` (`without-legend`), `withoutTooltip` (`without-tooltip`), `xLabel` (`x-label`),
|
|
32
33
|
`yLabel` (`y-label`), plus additive `labels`, `datasets`, `valueFormatter`, `formatter`, `area`, `zoom`,
|
|
@@ -42,6 +43,8 @@ of every entry in these lists.**
|
|
|
42
43
|
index, label, value }`), `lr-before-legend-visibility-change` (cancelable), and
|
|
43
44
|
`lr-legend-visibility-change` (commit; both legend events carry `datasetIndex`, `visible`, and the
|
|
44
45
|
complete `hiddenDatasets` snapshot).
|
|
46
|
+
Radial category legends additionally emit `lr-before-datum-visibility-change` (cancelable) and
|
|
47
|
+
`lr-datum-visibility-change`, carrying `index`, `visible` and the frozen `hiddenDatums` snapshot.
|
|
45
48
|
|
|
46
49
|
**Slots:** default JSON configuration script, `data-table`, `center`.
|
|
47
50
|
|