@fusion.dev/helix-headless 0.235.1 → 0.237.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/api.json +1 -1
- package/custom-elements.json +1 -1
- package/dist/app-header/root/app-header-root.d.ts +9 -0
- package/dist/app-header/root/app-header-root.js +21 -0
- package/dist/area-chart/root/area-chart-root.d.ts +29 -15
- package/dist/area-chart/root/area-chart-root.js +10 -7
- package/dist/bar-chart/root/bar-chart-root.d.ts +41 -23
- package/dist/bar-chart/root/bar-chart-root.js +15 -10
- package/dist/button/root/button-root.js +1 -1
- package/dist/canvas/root/canvas-root.d.ts +10 -3
- package/dist/canvas/root/canvas-root.js +31 -14
- package/dist/color-input/root/color-input-root.d.ts +4 -2
- package/dist/color-input/root/color-input-root.js +1 -1
- package/dist/combobox/root/combobox-root.d.ts +8 -7
- package/dist/combobox/root/combobox-root.js +7 -3
- package/dist/command/root/command-root.d.ts +22 -2
- package/dist/command/root/command-root.js +39 -5
- package/dist/data-table/root/data-table-root.d.ts +15 -7
- package/dist/data-table/root/data-table-root.js +9 -2
- package/dist/date-picker/root/date-picker-root.d.ts +1 -1
- package/dist/date-picker/root/date-picker-root.js +9 -2
- package/dist/dialog/root/dialog-root.d.ts +13 -3
- package/dist/dialog/root/dialog-root.js +33 -2
- package/dist/donut-chart/root/donut-chart-root.d.ts +23 -1
- package/dist/donut-chart/root/donut-chart-root.js +41 -13
- package/dist/drawer/root/drawer-root.d.ts +10 -2
- package/dist/drawer/root/drawer-root.js +34 -1
- package/dist/filter-input/chip/filter-chip.js +2 -2
- package/dist/find/root/find-root.d.ts +11 -1
- package/dist/find/root/find-root.js +11 -0
- package/dist/heatmap/root/heatmap-root.d.ts +11 -8
- package/dist/heatmap/root/heatmap-root.js +27 -2
- package/dist/kbd/root/kbd-root.d.ts +4 -0
- package/dist/kbd/root/kbd-root.js +2 -1
- package/dist/lightbox/root/lightbox-root.js +3 -2
- package/dist/line-chart/root/line-chart-root.d.ts +36 -23
- package/dist/line-chart/root/line-chart-root.js +20 -13
- package/dist/list/item/list-item.d.ts +2 -1
- package/dist/list/item/list-item.js +4 -1
- package/dist/list/root/list-root.d.ts +33 -8
- package/dist/list/root/list-root.js +17 -3
- package/dist/listbox/root/listbox-root.d.ts +48 -15
- package/dist/listbox/root/listbox-root.js +65 -6
- package/dist/map/root/map-root.js +7 -7
- package/dist/markdown/tree.d.ts +6 -1
- package/dist/markdown/tree.js +1 -1
- package/dist/megamenu/root/megamenu-root.d.ts +19 -0
- package/dist/megamenu/root/megamenu-root.js +24 -0
- package/dist/menu/filter/menu-filter.js +3 -1
- package/dist/menu/item/menu-item.d.ts +12 -0
- package/dist/menu/item/menu-item.js +3 -0
- package/dist/menu/root/menu-root.d.ts +7 -1
- package/dist/menu/root/menu-root.js +6 -3
- package/dist/motion-toggle/root/motion-toggle-root.js +2 -2
- package/dist/notifications/notification/notification.d.ts +1 -0
- package/dist/notifications/notification/notification.js +1 -0
- package/dist/notifications/root/notifications-root.d.ts +7 -5
- package/dist/notifications/root/notifications-root.js +1 -1
- package/dist/number-input/root/number-input-root.d.ts +6 -0
- package/dist/number-input/root/number-input-root.js +14 -4
- package/dist/object-inspector/root/object-inspector-root.d.ts +6 -5
- package/dist/object-inspector/root/object-inspector-root.js +9 -3
- package/dist/option/root/option-root.d.ts +16 -2
- package/dist/option/root/option-root.js +7 -0
- package/dist/pagination/root/pagination-root.d.ts +36 -0
- package/dist/pagination/root/pagination-root.js +55 -2
- package/dist/pin-input/code.js +1 -1
- package/dist/qr-code/root/qr-code-root.d.ts +1 -0
- package/dist/qr-code/root/qr-code-root.js +1 -0
- package/dist/radio/root/radio-root.js +4 -0
- package/dist/rating/root/rating-root.d.ts +1 -0
- package/dist/rating/root/rating-root.js +1 -0
- package/dist/scatter-chart/root/scatter-chart-root.d.ts +6 -0
- package/dist/select/root/select-root.d.ts +27 -1
- package/dist/select/root/select-root.js +34 -3
- package/dist/shortcut-overlay/root/shortcut-overlay-root.d.ts +5 -0
- package/dist/shortcut-overlay/root/shortcut-overlay-root.js +15 -1
- package/dist/skeleton/root/skeleton-root.d.ts +1 -0
- package/dist/skeleton/root/skeleton-root.js +3 -0
- package/dist/sparkline/root/sparkline-root.d.ts +53 -0
- package/dist/sparkline/root/sparkline-root.js +37 -1
- package/dist/spatial-bar-chart/root/spatial-bar-chart-root.d.ts +4 -1
- package/dist/spatial-bar-chart/root/spatial-bar-chart-root.js +2 -2
- package/dist/spatial-ribbon-chart/root/spatial-ribbon-chart-root.d.ts +3 -0
- package/dist/spatial-ribbon-chart/root/spatial-ribbon-chart-root.js +2 -2
- package/dist/spatial-scatter-chart/root/spatial-scatter-chart-root.d.ts +3 -0
- package/dist/spatial-scatter-chart/root/spatial-scatter-chart-root.js +2 -2
- package/dist/spatial-scatter-chart/view.d.ts +17 -8
- package/dist/spatial-scatter-chart/view.js +7 -6
- package/dist/spatial-surface-chart/root/spatial-surface-chart-root.d.ts +3 -0
- package/dist/spatial-surface-chart/root/spatial-surface-chart-root.js +2 -2
- package/dist/spatial-treemap/root/spatial-treemap-root.d.ts +3 -0
- package/dist/spatial-treemap/root/spatial-treemap-root.js +2 -2
- package/dist/splitter/root/splitter-root.js +3 -1
- package/dist/stat/group/stat-group.d.ts +13 -0
- package/dist/stat/group/stat-group.js +22 -1
- package/dist/stat/root/stat-root.d.ts +62 -1
- package/dist/stat/root/stat-root.js +146 -4
- package/dist/table/cell/table-cell.d.ts +1 -0
- package/dist/table/cell/table-cell.js +4 -0
- package/dist/table/column/table-column.d.ts +11 -0
- package/dist/table/column/table-column.js +4 -0
- package/dist/table/root/table-root.d.ts +7 -6
- package/dist/table/root/table-root.js +1 -1
- package/dist/tabs/panel/tab-panel.d.ts +30 -0
- package/dist/tabs/panel/tab-panel.js +28 -3
- package/dist/tabs/root/tabs-root.d.ts +8 -0
- package/dist/tabs/root/tabs-root.js +8 -2
- package/dist/tabs/tab/tab.js +2 -2
- package/dist/tag/root/tag-root.js +2 -2
- package/dist/timeline/root/timeline-root.d.ts +2 -2
- package/dist/timeline/root/timeline-root.js +1 -1
- package/dist/toast/root/toast-root.d.ts +53 -6
- package/dist/toast/root/toast-root.js +158 -1
- package/dist/toggle/root/toggle-root.d.ts +1 -0
- package/dist/toggle/root/toggle-root.js +1 -1
- package/dist/video-playlist/root/video-playlist-root.d.ts +1 -0
- package/dist/video-playlist/root/video-playlist-root.js +2 -0
- package/dist/virtual-list/root/virtual-list-root.d.ts +2 -2
- package/dist/virtual-list/root/virtual-list-root.js +1 -1
- package/examples.json +1 -1
- package/lint.json +1 -1
- package/package.json +5 -5
- package/types/jsx.d.ts +693 -169
- package/types/vue.d.ts +423 -96
- package/types/words.d.ts +51 -12
|
@@ -29,6 +29,8 @@ let HelixHeadlessPagination = class HelixHeadlessPagination extends HelixElement
|
|
|
29
29
|
this.statusLabel = '{page} of {pages}';
|
|
30
30
|
this.total = 0;
|
|
31
31
|
this.announcement = '';
|
|
32
|
+
this.narrow = false;
|
|
33
|
+
this.fullWidth = 0;
|
|
32
34
|
this.announced = undefined;
|
|
33
35
|
this.pageState = undefined;
|
|
34
36
|
this.used = undefined;
|
|
@@ -59,6 +61,9 @@ let HelixHeadlessPagination = class HelixHeadlessPagination extends HelixElement
|
|
|
59
61
|
this.pageState = next;
|
|
60
62
|
this.requestUpdate('page', previous);
|
|
61
63
|
}
|
|
64
|
+
get folded() {
|
|
65
|
+
return this.compact || this.narrow;
|
|
66
|
+
}
|
|
62
67
|
get numbers() {
|
|
63
68
|
return formatNumbers(wordsLocale(this));
|
|
64
69
|
}
|
|
@@ -160,6 +165,51 @@ let HelixHeadlessPagination = class HelixHeadlessPagination extends HelixElement
|
|
|
160
165
|
updated(changed) {
|
|
161
166
|
super.updated(changed);
|
|
162
167
|
this.restoreFocus();
|
|
168
|
+
if (!this.folded) {
|
|
169
|
+
this.fullWidth = this.measureRow();
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
connectedCallback() {
|
|
173
|
+
super.connectedCallback();
|
|
174
|
+
if (typeof ResizeObserver === 'undefined' || this.widths) {
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
177
|
+
this.widths = new ResizeObserver(([entry]) => {
|
|
178
|
+
const width = entry?.borderBoxSize?.[0]?.inlineSize ?? entry?.contentRect.width ?? 0;
|
|
179
|
+
if (width > 0) {
|
|
180
|
+
if (!this.folded && this.fullWidth <= 0) {
|
|
181
|
+
this.fullWidth = this.measureRow();
|
|
182
|
+
}
|
|
183
|
+
this.fit(width);
|
|
184
|
+
}
|
|
185
|
+
});
|
|
186
|
+
this.widths.observe(this);
|
|
187
|
+
}
|
|
188
|
+
disconnectedCallback() {
|
|
189
|
+
super.disconnectedCallback();
|
|
190
|
+
this.widths?.disconnect();
|
|
191
|
+
this.widths = undefined;
|
|
192
|
+
}
|
|
193
|
+
measureRow() {
|
|
194
|
+
const parts = [...(this.shadowRoot?.children ?? [])].filter((node) => node instanceof HTMLElement && node.hasAttribute('part'));
|
|
195
|
+
const shown = parts.filter((node) => node.getAttribute('part') !== 'live' && node.offsetWidth > 0);
|
|
196
|
+
const gap = Number.parseFloat(getComputedStyle(this).columnGap) || 0;
|
|
197
|
+
return shown.reduce((sum, node) => sum + (node.getAttribute('part') === 'list' ? this.listWidth(node) : node.offsetWidth), Math.max(0, shown.length - 1) * gap);
|
|
198
|
+
}
|
|
199
|
+
listWidth(list) {
|
|
200
|
+
const style = getComputedStyle(list);
|
|
201
|
+
return (list.scrollWidth +
|
|
202
|
+
(Number.parseFloat(style.marginInlineStart) || 0) +
|
|
203
|
+
(Number.parseFloat(style.marginInlineEnd) || 0));
|
|
204
|
+
}
|
|
205
|
+
fit(width) {
|
|
206
|
+
if (this.compact || width <= 0 || this.fullWidth <= 0) {
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
209
|
+
const narrow = this.fullWidth > width + 0.5;
|
|
210
|
+
if (narrow !== this.narrow) {
|
|
211
|
+
this.narrow = narrow;
|
|
212
|
+
}
|
|
163
213
|
}
|
|
164
214
|
announce() {
|
|
165
215
|
if (this.announced === undefined) {
|
|
@@ -286,9 +336,9 @@ let HelixHeadlessPagination = class HelixHeadlessPagination extends HelixElement
|
|
|
286
336
|
</button>`;
|
|
287
337
|
}
|
|
288
338
|
render() {
|
|
289
|
-
if (this.
|
|
339
|
+
if (this.folded) {
|
|
290
340
|
return html `${this.ends ? this.renderFirst() : nothing}${this.renderPrevious()}
|
|
291
|
-
<span part="status"
|
|
341
|
+
<span part="status" dir="auto"
|
|
292
342
|
>${formatWords(this, 'statusLabel', { page: this.current, pages: this.count })}</span
|
|
293
343
|
>
|
|
294
344
|
${this.renderNext()}${this.ends ? this.renderLast() : nothing}${this.renderLive()}`;
|
|
@@ -378,6 +428,9 @@ __decorate([
|
|
|
378
428
|
__decorate([
|
|
379
429
|
state()
|
|
380
430
|
], HelixHeadlessPagination.prototype, "announcement", void 0);
|
|
431
|
+
__decorate([
|
|
432
|
+
state()
|
|
433
|
+
], HelixHeadlessPagination.prototype, "narrow", void 0);
|
|
381
434
|
HelixHeadlessPagination = __decorate([
|
|
382
435
|
customElement('helix-headless-pagination')
|
|
383
436
|
], HelixHeadlessPagination);
|
package/dist/pin-input/code.js
CHANGED
|
@@ -25,7 +25,7 @@ export const overwriteCode = (code, at, text, count) => {
|
|
|
25
25
|
};
|
|
26
26
|
export const codeVerdict = (code, count, required, messages) => {
|
|
27
27
|
if (required && code === '') {
|
|
28
|
-
return ['valueMissing', messages.missing || 'Please fill
|
|
28
|
+
return ['valueMissing', messages.missing || 'Please fill out this field.'];
|
|
29
29
|
}
|
|
30
30
|
if (code !== '' && code.length < count) {
|
|
31
31
|
return ['tooShort', messages.short(count)];
|
|
@@ -58,6 +58,7 @@ export type QrStyle = 'dots' | 'rounded' | 'square';
|
|
|
58
58
|
* @csspart logo - The box that holds the center logo.
|
|
59
59
|
* @csspart modules - Every module except the three corner squares.
|
|
60
60
|
*
|
|
61
|
+
* @cssstate empty - The value is empty, so no code is drawn.
|
|
61
62
|
* @cssstate overflow - The value is too long for a code at the correction level, so the fallback shows.
|
|
62
63
|
*/
|
|
63
64
|
export declare class HelixHeadlessQrCode extends HelixElement {
|
|
@@ -122,6 +122,7 @@ let HelixHeadlessQrCode = class HelixHeadlessQrCode extends HelixElement {
|
|
|
122
122
|
const key = `${this.level}:${this.value}`;
|
|
123
123
|
const overflow = this.value !== '' && this.encoded() === undefined;
|
|
124
124
|
this.toggleState('overflow', overflow);
|
|
125
|
+
this.toggleState('empty', this.value === '');
|
|
125
126
|
if (overflow) {
|
|
126
127
|
if (this.overflowed !== key) {
|
|
127
128
|
this.overflowed = key;
|
|
@@ -16,6 +16,10 @@ let HelixHeadlessRadio = class HelixHeadlessRadio extends MixinSelectableItem(He
|
|
|
16
16
|
firstUpdated(changed) {
|
|
17
17
|
super.firstUpdated(changed);
|
|
18
18
|
this.finishHydration();
|
|
19
|
+
const indicator = this.renderRoot.querySelector('slot[name="indicator"]');
|
|
20
|
+
if (indicator) {
|
|
21
|
+
this.toggleState('has-indicator', slotFilled(indicator));
|
|
22
|
+
}
|
|
19
23
|
}
|
|
20
24
|
click() {
|
|
21
25
|
if (!this.clicks.click()) {
|
|
@@ -68,6 +68,7 @@ declare const HelixHeadlessRating_base: (new (...args: any[]) => import("@fusion
|
|
|
68
68
|
* @cssproperty --rating-steps - The number of steps in the whole row: `max` divided by `step`.
|
|
69
69
|
*
|
|
70
70
|
* @cssstate invalid - The control has an error to show, from the browser's validation or from your `feedback`.
|
|
71
|
+
* @cssstate previewing - The marks show the score under the pointer, before it is chosen.
|
|
71
72
|
*/
|
|
72
73
|
export declare class HelixHeadlessRating extends HelixHeadlessRating_base {
|
|
73
74
|
/**
|
|
@@ -204,6 +204,7 @@ let HelixHeadlessRating = class HelixHeadlessRating extends MixinControllerValue
|
|
|
204
204
|
updated(changed) {
|
|
205
205
|
super.updated?.(changed);
|
|
206
206
|
if (changed.has('previewing')) {
|
|
207
|
+
this.toggleState('previewing', this.previewing !== undefined);
|
|
207
208
|
this.dispatchEvent(new HelixPreviewEvent({
|
|
208
209
|
value: this.previewing === undefined ? '' : String(this.previewing),
|
|
209
210
|
}));
|
|
@@ -86,6 +86,9 @@ declare const HelixHeadlessScatterChart_base: typeof HelixElement & (new (...arg
|
|
|
86
86
|
* `empty-text`, "No readings", in the plot, and `loading` shows `loading-text`
|
|
87
87
|
* there until readings arrive. The `empty` and `loading` slots take markup in
|
|
88
88
|
* their place, such as a link to add the first reading.
|
|
89
|
+
* When the readings did not load, set `error-text`, such as "The visits did
|
|
90
|
+
* not load": it stands in the plot in place of both, and the `error` slot
|
|
91
|
+
* takes a button that tries again, shown after the words.
|
|
89
92
|
*
|
|
90
93
|
* **Keyboard.** The plot is one tab stop.
|
|
91
94
|
*
|
|
@@ -106,12 +109,14 @@ declare const HelixHeadlessScatterChart_base: typeof HelixElement & (new (...arg
|
|
|
106
109
|
* @documentation https://fusion.dev/helix/components/scatter-chart
|
|
107
110
|
*
|
|
108
111
|
* @slot empty - Content shown in place of the drawing when the table has no readings, such as a link to add the first. Falls back to `empty-text`.
|
|
112
|
+
* @slot error - Content shown after `error-text` while it is set and there are no readings, such as a button that tries again.
|
|
109
113
|
* @slot loading - Content shown in place of the drawing while `loading` is set and there are no readings yet. Falls back to `loading-text`.
|
|
110
114
|
*
|
|
111
115
|
* @event {HelixReadingChangeEvent} helix-reading-change - The reading shown moved, or was put away: `index` is the row, or `-1` for none, with its `label`, the `series` the keys rest on, and the `pointerType` that moved it.
|
|
112
116
|
* @event {HelixReadingPressEvent} helix-reading-press - A reading was clicked, tapped, or pressed with Enter or Space, with the same detail as `helix-reading-change`.
|
|
113
117
|
*
|
|
114
118
|
* @csspart empty - The words in place of the drawing when the table has no readings: the `empty` slot, falling back to `empty-text`. Not drawn while the table cannot be read yet, on the server and during hydration.
|
|
119
|
+
* @csspart error - The words in place of the drawing while `error-text` is set and there are no readings, followed by the `error` slot. Announced as it appears.
|
|
115
120
|
* @csspart gridline - One line across the plot, drawn when `gridlines` is set.
|
|
116
121
|
* @csspart live - The readout: a polite live region that says the row the keys moved to. Hide it visually.
|
|
117
122
|
* @csspart loading - The words in place of the drawing while `loading` is set and there are no readings: the `loading` slot, falling back to `loading-text`.
|
|
@@ -158,6 +163,7 @@ declare const HelixHeadlessScatterChart_base: typeof HelixElement & (new (...arg
|
|
|
158
163
|
*
|
|
159
164
|
* @cssstate active - While a reading is shown, under the pointer or the keys, with its tooltip open.
|
|
160
165
|
* @cssstate empty - While the `empty` part stands in the plot.
|
|
166
|
+
* @cssstate error - While the `error` part stands in the plot.
|
|
161
167
|
* @cssstate loading - While the `loading` part stands in the plot.
|
|
162
168
|
*/
|
|
163
169
|
export declare class HelixHeadlessScatterChart extends HelixHeadlessScatterChart_base {
|
|
@@ -125,6 +125,7 @@ declare const HelixHeadlessSelect_base: (new (...args: any[]) => import("@fusion
|
|
|
125
125
|
* @cssproperty --floating-anchor-inline-size - The trigger's width, written on the panel while it is open, as in `min-inline-size: var(--floating-anchor-inline-size)`. Read it; a value set here is written over.
|
|
126
126
|
* @cssproperty --floating-available-block-size - The room between the panel and the edge of the screen it opens toward, written on the panel while it is open. Read it; a value set here is written over.
|
|
127
127
|
*
|
|
128
|
+
* @cssstate error - While `error-text` is set.
|
|
128
129
|
* @cssstate invalid - The control has an error to show, from the browser's validation or from your `feedback`.
|
|
129
130
|
* @cssstate open - While the list is open.
|
|
130
131
|
* @cssstate placed-bottom - While the open list sits below the trigger.
|
|
@@ -152,9 +153,18 @@ export declare class HelixHeadlessSelect extends HelixHeadlessSelect_base {
|
|
|
152
153
|
*/
|
|
153
154
|
autocomplete: string;
|
|
154
155
|
/**
|
|
155
|
-
* The text shown when no options
|
|
156
|
+
* The text shown when the list has no options. A filter that hides every
|
|
157
|
+
* option shows `no-results-text`.
|
|
156
158
|
*/
|
|
157
159
|
emptyText: string;
|
|
160
|
+
/**
|
|
161
|
+
* What the list says when its options could not be loaded, such as after a
|
|
162
|
+
* request to a server fails. Empty, null or no attribute is no error, so
|
|
163
|
+
* removing the attribute clears it. Passed to the list, which shows it in
|
|
164
|
+
* the danger color under any options there are and tells screen readers, as
|
|
165
|
+
* Combobox's does.
|
|
166
|
+
*/
|
|
167
|
+
errorText: string | null;
|
|
158
168
|
/**
|
|
159
169
|
* Whether the list can be narrowed by typing.
|
|
160
170
|
*
|
|
@@ -203,6 +213,10 @@ export declare class HelixHeadlessSelect extends HelixHeadlessSelect_base {
|
|
|
203
213
|
* Whether more than one option can be chosen.
|
|
204
214
|
*/
|
|
205
215
|
multiple: boolean;
|
|
216
|
+
/**
|
|
217
|
+
* The text shown when typing hides every option, under `filterable`.
|
|
218
|
+
*/
|
|
219
|
+
noResultsText: string;
|
|
206
220
|
/**
|
|
207
221
|
* Shown on the trigger while nothing is chosen.
|
|
208
222
|
*/
|
|
@@ -219,6 +233,18 @@ export declare class HelixHeadlessSelect extends HelixHeadlessSelect_base {
|
|
|
219
233
|
* the trigger rather than on it. It follows the page as it scrolls.
|
|
220
234
|
*/
|
|
221
235
|
position: 'floating' | 'item-aligned';
|
|
236
|
+
/**
|
|
237
|
+
* Whether the choice is locked. A read-only select still submits its value.
|
|
238
|
+
*
|
|
239
|
+
* The trigger can be read and focused, the list does not open, and the
|
|
240
|
+
* letters and the Left and Right keys on the closed trigger change nothing,
|
|
241
|
+
* as Combobox's `readonly` does.
|
|
242
|
+
*/
|
|
243
|
+
readOnly: boolean;
|
|
244
|
+
/** Requests a new value. While `readOnly` is set, nothing changes. */
|
|
245
|
+
requestValue(next: string): boolean;
|
|
246
|
+
/** Requests the list open or closed. While `readOnly` is set, it does not open. */
|
|
247
|
+
requestOpen(next: boolean): boolean;
|
|
222
248
|
/**
|
|
223
249
|
* What the trigger shows for the chosen options: a function given them, in
|
|
224
250
|
* the order they appear, that returns text, an element or a Lit template.
|
|
@@ -21,7 +21,8 @@ let HelixHeadlessSelect = class HelixHeadlessSelect extends MixinControllerOpen(
|
|
|
21
21
|
});
|
|
22
22
|
this.status = new StatusController(this);
|
|
23
23
|
this.autocomplete = '';
|
|
24
|
-
this.emptyText = 'No
|
|
24
|
+
this.emptyText = 'No options';
|
|
25
|
+
this.errorText = '';
|
|
25
26
|
this.filterable = false;
|
|
26
27
|
this.focusable = true;
|
|
27
28
|
this.items = undefined;
|
|
@@ -29,8 +30,10 @@ let HelixHeadlessSelect = class HelixHeadlessSelect extends MixinControllerOpen(
|
|
|
29
30
|
this.loading = false;
|
|
30
31
|
this.loadingText = 'Loading';
|
|
31
32
|
this.multiple = false;
|
|
33
|
+
this.noResultsText = 'No matches';
|
|
32
34
|
this.placeholder = 'Choose';
|
|
33
35
|
this.position = 'floating';
|
|
36
|
+
this.readOnly = false;
|
|
34
37
|
this.valueMissingMessage = 'Choose one to continue.';
|
|
35
38
|
this.upgradeWatch = new UpgradeController(this, () => {
|
|
36
39
|
this.listbox?.requestUpdate();
|
|
@@ -160,6 +163,18 @@ let HelixHeadlessSelect = class HelixHeadlessSelect extends MixinControllerOpen(
|
|
|
160
163
|
};
|
|
161
164
|
}
|
|
162
165
|
static { this.words = 'helix-select'; }
|
|
166
|
+
requestValue(next) {
|
|
167
|
+
if (this.readOnly) {
|
|
168
|
+
return false;
|
|
169
|
+
}
|
|
170
|
+
return super.requestValue(next);
|
|
171
|
+
}
|
|
172
|
+
requestOpen(next) {
|
|
173
|
+
if (next && this.readOnly) {
|
|
174
|
+
return false;
|
|
175
|
+
}
|
|
176
|
+
return super.requestOpen(next);
|
|
177
|
+
}
|
|
163
178
|
get selectedIndex() {
|
|
164
179
|
return this.listbox?.selectedIndex ?? -1;
|
|
165
180
|
}
|
|
@@ -288,12 +303,16 @@ let HelixHeadlessSelect = class HelixHeadlessSelect extends MixinControllerOpen(
|
|
|
288
303
|
}
|
|
289
304
|
firstUpdated(changed) {
|
|
290
305
|
super.firstUpdated(changed);
|
|
306
|
+
if (this.hasAttribute('autofocus')) {
|
|
307
|
+
this.focus();
|
|
308
|
+
}
|
|
291
309
|
this.finishHydration();
|
|
292
310
|
}
|
|
293
311
|
updated(changed) {
|
|
294
312
|
super.updated(changed);
|
|
295
313
|
this.sync();
|
|
296
314
|
this.linkHost();
|
|
315
|
+
this.toggleState('error', Boolean(this.errorText));
|
|
297
316
|
if (this.open) {
|
|
298
317
|
if (changed.has('open')) {
|
|
299
318
|
this.listbox?.highlight(this.opening);
|
|
@@ -317,8 +336,10 @@ let HelixHeadlessSelect = class HelixHeadlessSelect extends MixinControllerOpen(
|
|
|
317
336
|
renderListbox() {
|
|
318
337
|
return html `<${this.tag('listbox')}
|
|
319
338
|
empty-text=${this.emptyText}
|
|
339
|
+
no-results-text=${this.noResultsText}
|
|
320
340
|
loading-text=${this.loadingText}
|
|
321
341
|
?loading=${this.loading}
|
|
342
|
+
error-text=${this.errorText || nothing}
|
|
322
343
|
part="listbox"
|
|
323
344
|
exportparts="empty: listbox-empty, error: listbox-error, feedback: listbox-feedback,
|
|
324
345
|
filter-icon: listbox-filter-icon, filter-mark: listbox-filter-mark, hint: listbox-hint,
|
|
@@ -374,7 +395,7 @@ let HelixHeadlessSelect = class HelixHeadlessSelect extends MixinControllerOpen(
|
|
|
374
395
|
@keydown=${this.handleTriggerKeydown}
|
|
375
396
|
>
|
|
376
397
|
<slot name="start"></slot>
|
|
377
|
-
<span part="value" id="value" ?data-placeholder=${this.chosen.length === 0}>${this.renderValue()}</span>
|
|
398
|
+
<span part="value" id="value" dir="auto" ?data-placeholder=${this.chosen.length === 0}>${this.renderValue()}</span>
|
|
378
399
|
<slot name="end"></slot>
|
|
379
400
|
${this.renderIndicator()}
|
|
380
401
|
</button>
|
|
@@ -385,7 +406,7 @@ let HelixHeadlessSelect = class HelixHeadlessSelect extends MixinControllerOpen(
|
|
|
385
406
|
${this.renderHint()}${this.renderFeedback()}${drawStatus(this.status)}
|
|
386
407
|
${drawAutofill({
|
|
387
408
|
autocomplete: this.autocomplete,
|
|
388
|
-
disabled: this.isDisabled,
|
|
409
|
+
disabled: this.isDisabled || this.readOnly,
|
|
389
410
|
multiple: this.multiple,
|
|
390
411
|
onFill: (value) => this.requestValue(value),
|
|
391
412
|
options: this.entries,
|
|
@@ -400,6 +421,9 @@ __decorate([
|
|
|
400
421
|
words,
|
|
401
422
|
property({ attribute: 'empty-text' })
|
|
402
423
|
], HelixHeadlessSelect.prototype, "emptyText", void 0);
|
|
424
|
+
__decorate([
|
|
425
|
+
property({ attribute: 'error-text' })
|
|
426
|
+
], HelixHeadlessSelect.prototype, "errorText", void 0);
|
|
403
427
|
__decorate([
|
|
404
428
|
property({ reflect: true, type: Boolean })
|
|
405
429
|
], HelixHeadlessSelect.prototype, "filterable", void 0);
|
|
@@ -423,6 +447,10 @@ __decorate([
|
|
|
423
447
|
__decorate([
|
|
424
448
|
property({ reflect: true, type: Boolean })
|
|
425
449
|
], HelixHeadlessSelect.prototype, "multiple", void 0);
|
|
450
|
+
__decorate([
|
|
451
|
+
words,
|
|
452
|
+
property({ attribute: 'no-results-text' })
|
|
453
|
+
], HelixHeadlessSelect.prototype, "noResultsText", void 0);
|
|
426
454
|
__decorate([
|
|
427
455
|
words,
|
|
428
456
|
property()
|
|
@@ -430,6 +458,9 @@ __decorate([
|
|
|
430
458
|
__decorate([
|
|
431
459
|
property()
|
|
432
460
|
], HelixHeadlessSelect.prototype, "position", void 0);
|
|
461
|
+
__decorate([
|
|
462
|
+
property({ attribute: 'readonly', reflect: true, type: Boolean })
|
|
463
|
+
], HelixHeadlessSelect.prototype, "readOnly", void 0);
|
|
433
464
|
__decorate([
|
|
434
465
|
property({ attribute: false })
|
|
435
466
|
], HelixHeadlessSelect.prototype, "valueContent", void 0);
|
|
@@ -128,6 +128,11 @@ export declare class HelixHeadlessShortcutOverlay extends HelixElement {
|
|
|
128
128
|
* still overlaps moves down a row. Controls side by side in a toolbar are
|
|
129
129
|
* narrower than a key and a name together, and badges drawn over each other
|
|
130
130
|
* read as neither.
|
|
131
|
+
*
|
|
132
|
+
* **Both badges of a pair that would overlap drop it**, measured at full
|
|
133
|
+
* width before any is placed. Placed one at a time, the first of three
|
|
134
|
+
* toolbar buttons kept its name, the second dropped it, and the third, clear
|
|
135
|
+
* of the second's shorter badge, kept it: "⌘B Bold", "⌘I", "⌘K Link".
|
|
131
136
|
*/
|
|
132
137
|
private arrange;
|
|
133
138
|
protected render(): TemplateResult;
|
|
@@ -187,6 +187,20 @@ let HelixHeadlessShortcutOverlay = class HelixHeadlessShortcutOverlay extends He
|
|
|
187
187
|
const width = window.innerWidth;
|
|
188
188
|
const height = window.innerHeight;
|
|
189
189
|
const drawn = [...(this.renderRoot.querySelectorAll('[part~="badge"]') ?? [])];
|
|
190
|
+
const full = drawn.map((element, index) => {
|
|
191
|
+
element.toggleAttribute('data-compact', false);
|
|
192
|
+
const { height: tall, width: wide } = element.getBoundingClientRect();
|
|
193
|
+
const left = (this.badges[index]?.left ?? 0) - wide / 2;
|
|
194
|
+
const top = (this.badges[index]?.top ?? 0) + margin;
|
|
195
|
+
return { bottom: top + tall, left, right: left + wide, top };
|
|
196
|
+
});
|
|
197
|
+
const crowded = new Set(full.flatMap((one, index) => full.some((other, at) => at !== index &&
|
|
198
|
+
one.left < other.right &&
|
|
199
|
+
one.right > other.left &&
|
|
200
|
+
one.top < other.bottom &&
|
|
201
|
+
one.bottom > other.top)
|
|
202
|
+
? [index]
|
|
203
|
+
: []));
|
|
190
204
|
drawn.forEach((element, index) => {
|
|
191
205
|
const badge = this.badges[index];
|
|
192
206
|
if (!badge) {
|
|
@@ -204,7 +218,7 @@ let HelixHeadlessShortcutOverlay = class HelixHeadlessShortcutOverlay extends He
|
|
|
204
218
|
one.top < other.bottom &&
|
|
205
219
|
one.bottom > other.top);
|
|
206
220
|
const under = badge.top + margin;
|
|
207
|
-
let place = box(
|
|
221
|
+
let place = box(crowded.has(index), under);
|
|
208
222
|
if (hits(place).length > 0) {
|
|
209
223
|
place = box(true, under);
|
|
210
224
|
}
|
|
@@ -35,6 +35,7 @@ import { type PropertyValues, type TemplateResult } from 'lit';
|
|
|
35
35
|
* @csspart skeleton - The placeholder shape.
|
|
36
36
|
*
|
|
37
37
|
* @cssstate wrapping - The skeleton holds content, an element or words, and takes that content's size. Line breaks and spaces alone are not content.
|
|
38
|
+
* @cssstate wrapping-block - The content the skeleton holds is a block, which fills its line, so the skeleton fills the line with it.
|
|
38
39
|
*/
|
|
39
40
|
export declare class HelixHeadlessSkeleton extends HelixElement {
|
|
40
41
|
/**
|
|
@@ -16,6 +16,9 @@ let HelixHeadlessSkeleton = class HelixHeadlessSkeleton extends HelixElement {
|
|
|
16
16
|
super.willUpdate(changed);
|
|
17
17
|
const wraps = this.wraps;
|
|
18
18
|
this.toggleState('wrapping', wraps);
|
|
19
|
+
const first = this.firstElementChild;
|
|
20
|
+
const display = wraps && first && this.isConnected ? getComputedStyle(first).display : '';
|
|
21
|
+
this.toggleState('wrapping-block', /^(block|flex|grid|table|list-item|flow-root)$/.test(display));
|
|
19
22
|
internalsOf(this).ariaBusy = this.loading ? 'true' : null;
|
|
20
23
|
if (this.label && (this.loading || !wraps)) {
|
|
21
24
|
hostAria(internalsOf(this), { label: this.label, role: 'progressbar' });
|
|
@@ -34,6 +34,11 @@ import { nothing, type PropertyValues, type TemplateResult } from 'lit';
|
|
|
34
34
|
* such as a normal range. A blank cell in a `for` table is a gap in the line,
|
|
35
35
|
* and a reading alone between two blanks is a `lone` mark.
|
|
36
36
|
*
|
|
37
|
+
* **Nothing to draw.** With no readings it shows `empty-text`, "No readings",
|
|
38
|
+
* in place of the line, and `loading` shows `loading-text` there until
|
|
39
|
+
* readings arrive, as on every chart. The `empty` and `loading` slots take
|
|
40
|
+
* markup in place of either.
|
|
41
|
+
*
|
|
37
42
|
* Place it beside a `Stat`, because a change beside a figure is a second fact,
|
|
38
43
|
* as `Stat`'s own spec says. `Trend` is composed the same way.
|
|
39
44
|
*
|
|
@@ -59,15 +64,22 @@ import { nothing, type PropertyValues, type TemplateResult } from 'lit';
|
|
|
59
64
|
* @aliases Micro Chart, Trend Line, Inline Chart
|
|
60
65
|
* @documentation https://fusion.dev/helix/components/sparkline
|
|
61
66
|
*
|
|
67
|
+
* @slot empty - Content shown in place of the line when there are no readings. Falls back to `empty-text`.
|
|
68
|
+
* @slot error - Content shown after `error-text` while it is set and there are no readings, such as a button that tries again.
|
|
69
|
+
* @slot loading - Content shown in place of the line while `loading` is set and there are no readings yet. Falls back to `loading-text`.
|
|
70
|
+
*
|
|
62
71
|
* @event {HelixReadingChangeEvent} helix-reading-change - The reading shown moved, or was put away: `index` is the reading, or `-1` for none, with its row's `label` from a table and the `pointerType` that moved it.
|
|
63
72
|
* @event {HelixReadingPressEvent} helix-reading-press - A reading was clicked, tapped, or pressed with Enter or Space, with the same detail as `helix-reading-change`.
|
|
64
73
|
*
|
|
65
74
|
* @csspart area - The region between the line and the bottom of its range.
|
|
66
75
|
* @csspart bar - One column, drawn when `plot="bar"`.
|
|
67
76
|
* @csspart cursor - The mark on the reading a pointer or a key rests on, rendered only while there is one. Placed with `inset-inline-start` and `inset-block-start`.
|
|
77
|
+
* @csspart empty - The words in place of the line when there are no readings: the `empty` slot, falling back to `empty-text`. Not drawn while a table named by `for` cannot be read yet, on the server and during hydration.
|
|
78
|
+
* @csspart error - The words in place of the line while `error-text` is set and there are no readings, followed by the `error` slot. Announced as it appears.
|
|
68
79
|
* @csspart high - The mark on the highest reading, under `marks="high"`. Placed as `cursor` is.
|
|
69
80
|
* @csspart line - The line's path.
|
|
70
81
|
* @csspart live - A polite region that says the reading a key moved to, rendered only with a `label`. Hide it visually.
|
|
82
|
+
* @csspart loading - The words in place of the line while `loading` is set and there are no readings: the `loading` slot, falling back to `loading-text`.
|
|
71
83
|
* @csspart lone - The mark on a reading no line reaches, with a blank or an end on each side. Placed as `cursor` is.
|
|
72
84
|
* @csspart low - The mark on the lowest reading, under `marks="low"`. Placed as `cursor` is.
|
|
73
85
|
* @csspart overview - What the readings come to, in `overview-label`, which describes the drawing. Rendered `hidden` with a name, since it is read through the description and not shown.
|
|
@@ -80,6 +92,10 @@ import { nothing, type PropertyValues, type TemplateResult } from 'lit';
|
|
|
80
92
|
*
|
|
81
93
|
* @cssproperty --chart-terminus-x - Where the last point sits horizontally, as a percentage.
|
|
82
94
|
* @cssproperty --chart-terminus-y - Where the last point sits vertically, as a percentage.
|
|
95
|
+
*
|
|
96
|
+
* @cssstate empty - While the `empty` part stands in place of the line.
|
|
97
|
+
* @cssstate error - While the `error` part stands in place of the line.
|
|
98
|
+
* @cssstate loading - While the `loading` part stands in place of the line.
|
|
83
99
|
*/
|
|
84
100
|
export declare class HelixHeadlessSparkline extends HelixElement {
|
|
85
101
|
protected static markRules: string[];
|
|
@@ -117,6 +133,20 @@ export declare class HelixHeadlessSparkline extends HelixElement {
|
|
|
117
133
|
* here, which is what lets a line take the reading aid.
|
|
118
134
|
*/
|
|
119
135
|
curve?: Curve;
|
|
136
|
+
/**
|
|
137
|
+
* The words shown in place of the line when there are no readings, and the
|
|
138
|
+
* fallback of the `empty` slot.
|
|
139
|
+
*/
|
|
140
|
+
emptyText: string;
|
|
141
|
+
/**
|
|
142
|
+
* The words shown in place of the line when the readings did not load, such
|
|
143
|
+
* as "The visits did not load". Empty, the default, shows nothing.
|
|
144
|
+
*
|
|
145
|
+
* While it is set and there are no readings, the `error` line stands in place
|
|
146
|
+
* of the line, followed by your own content in the `error` slot, and the
|
|
147
|
+
* sparkline takes the `error` state. Clear it once you try again.
|
|
148
|
+
*/
|
|
149
|
+
errorText: string;
|
|
120
150
|
/**
|
|
121
151
|
* The id of a table to read the readings from, when a table holds the data.
|
|
122
152
|
*
|
|
@@ -137,6 +167,20 @@ export declare class HelixHeadlessSparkline extends HelixElement {
|
|
|
137
167
|
* than announced without a name.
|
|
138
168
|
*/
|
|
139
169
|
label: string;
|
|
170
|
+
/**
|
|
171
|
+
* Whether the readings are still on their way. The sparkline shows
|
|
172
|
+
* `loading-text` in place of an empty drawing until it has readings.
|
|
173
|
+
*
|
|
174
|
+
* Reflected, so a stylesheet can treat the sparkline while it waits. One
|
|
175
|
+
* that already has readings keeps drawing them, so a refresh does not blank
|
|
176
|
+
* it.
|
|
177
|
+
*/
|
|
178
|
+
loading: boolean;
|
|
179
|
+
/**
|
|
180
|
+
* The words shown in place of the line while `loading` is set and there are
|
|
181
|
+
* no readings yet, and the fallback of the `loading` slot.
|
|
182
|
+
*/
|
|
183
|
+
loadingText: string;
|
|
140
184
|
/**
|
|
141
185
|
* The locale the words, the readout's numbers and positions are in, such
|
|
142
186
|
* as `de` for `1.240`.
|
|
@@ -231,6 +275,8 @@ export declare class HelixHeadlessSparkline extends HelixElement {
|
|
|
231
275
|
/** The two values of `range`, lower first, or none. */
|
|
232
276
|
private get band();
|
|
233
277
|
protected willUpdate(changed: PropertyValues<this>): void;
|
|
278
|
+
/** Records what stands in place of the line as the `empty` and `loading` states. */
|
|
279
|
+
protected updated(changed: PropertyValues<this>): void;
|
|
234
280
|
/**
|
|
235
281
|
* The series to draw, and how many readings it has room for: the table's
|
|
236
282
|
* first series over the table's rows if there is one, the attribute
|
|
@@ -249,6 +295,13 @@ export declare class HelixHeadlessSparkline extends HelixElement {
|
|
|
249
295
|
*/
|
|
250
296
|
private reading;
|
|
251
297
|
protected render(): TemplateResult;
|
|
298
|
+
/**
|
|
299
|
+
* The words in place of the line while there is nothing to draw, as every
|
|
300
|
+
* chart's `MixinChartStatus` writes them: the `error` line, the `loading`
|
|
301
|
+
* line, the `empty` line, or nothing while a table named by `for` cannot be
|
|
302
|
+
* read yet.
|
|
303
|
+
*/
|
|
304
|
+
protected renderStatus(): TemplateResult | typeof nothing;
|
|
252
305
|
/**
|
|
253
306
|
* A mark on each reading with a blank on either side, which no line can
|
|
254
307
|
* reach, so a line and an area show it as `LineChart` does. Not on a bar
|
|
@@ -7,8 +7,12 @@ const STRIP_HEIGHT = 32;
|
|
|
7
7
|
let HelixHeadlessSparkline = class HelixHeadlessSparkline extends HelixElement {
|
|
8
8
|
constructor() {
|
|
9
9
|
super(...arguments);
|
|
10
|
+
this.emptyText = 'No readings';
|
|
11
|
+
this.errorText = '';
|
|
10
12
|
this.for = '';
|
|
11
13
|
this.label = '';
|
|
14
|
+
this.loading = false;
|
|
15
|
+
this.loadingText = 'Loading readings';
|
|
12
16
|
this.locale = '';
|
|
13
17
|
this.marks = '';
|
|
14
18
|
this.overviewLabel = 'From {first} to {last}, highest {high}, lowest {low}';
|
|
@@ -50,6 +54,13 @@ let HelixHeadlessSparkline = class HelixHeadlessSparkline extends HelixElement {
|
|
|
50
54
|
this.source.watch();
|
|
51
55
|
}
|
|
52
56
|
}
|
|
57
|
+
updated(changed) {
|
|
58
|
+
super.updated(changed);
|
|
59
|
+
const root = this.renderRoot;
|
|
60
|
+
this.toggleState('empty', root.querySelector('[part="empty"]') !== null);
|
|
61
|
+
this.toggleState('loading', root.querySelector('[part="loading"]') !== null);
|
|
62
|
+
this.toggleState('error', root.querySelector('[part="error"]') !== null);
|
|
63
|
+
}
|
|
53
64
|
drawn() {
|
|
54
65
|
const read = this.source.series;
|
|
55
66
|
if (read.length > 0) {
|
|
@@ -162,12 +173,23 @@ let HelixHeadlessSparkline = class HelixHeadlessSparkline extends HelixElement {
|
|
|
162
173
|
y=${bar.y}
|
|
163
174
|
/>`)}
|
|
164
175
|
</svg>
|
|
165
|
-
${points.length < 2 || this.plot === 'bar'
|
|
176
|
+
${points.length === 0 ? this.renderStatus() : nothing}${points.length < 2 || this.plot === 'bar'
|
|
166
177
|
? nothing
|
|
167
178
|
: html `<span aria-hidden="true" part="terminus" style=${end ?? nothing}></span>`}${this.renderLone(points.length < 2 ? undefined : series, at)}${this.renderMarks(slots, at)}${this.renderReading(slots, at)}${named && count > 0 ? this.renderLive(slots) : nothing}${overview === ''
|
|
168
179
|
? nothing
|
|
169
180
|
: html `<span hidden id="sparkline-overview" part="overview">${overview}</span>`}`;
|
|
170
181
|
}
|
|
182
|
+
renderStatus() {
|
|
183
|
+
if (this.errorText) {
|
|
184
|
+
return html `<p dir="auto" part="error" role="alert">${this.errorText}<slot name="error"></slot></p>`;
|
|
185
|
+
}
|
|
186
|
+
if (this.loading) {
|
|
187
|
+
return html `<p dir="auto" part="loading"><slot name="loading">${this.loadingText}</slot></p>`;
|
|
188
|
+
}
|
|
189
|
+
return this.source.known
|
|
190
|
+
? html `<p dir="auto" part="empty"><slot name="empty">${this.emptyText}</slot></p>`
|
|
191
|
+
: nothing;
|
|
192
|
+
}
|
|
171
193
|
renderLone(series, at) {
|
|
172
194
|
if (!series || this.plot === 'bar') {
|
|
173
195
|
return nothing;
|
|
@@ -212,12 +234,26 @@ let HelixHeadlessSparkline = class HelixHeadlessSparkline extends HelixElement {
|
|
|
212
234
|
__decorate([
|
|
213
235
|
property({ reflect: true })
|
|
214
236
|
], HelixHeadlessSparkline.prototype, "curve", void 0);
|
|
237
|
+
__decorate([
|
|
238
|
+
words,
|
|
239
|
+
property({ attribute: 'empty-text' })
|
|
240
|
+
], HelixHeadlessSparkline.prototype, "emptyText", void 0);
|
|
241
|
+
__decorate([
|
|
242
|
+
property({ attribute: 'error-text' })
|
|
243
|
+
], HelixHeadlessSparkline.prototype, "errorText", void 0);
|
|
215
244
|
__decorate([
|
|
216
245
|
property()
|
|
217
246
|
], HelixHeadlessSparkline.prototype, "for", void 0);
|
|
218
247
|
__decorate([
|
|
219
248
|
property()
|
|
220
249
|
], HelixHeadlessSparkline.prototype, "label", void 0);
|
|
250
|
+
__decorate([
|
|
251
|
+
property({ reflect: true, type: Boolean })
|
|
252
|
+
], HelixHeadlessSparkline.prototype, "loading", void 0);
|
|
253
|
+
__decorate([
|
|
254
|
+
words,
|
|
255
|
+
property({ attribute: 'loading-text' })
|
|
256
|
+
], HelixHeadlessSparkline.prototype, "loadingText", void 0);
|
|
221
257
|
__decorate([
|
|
222
258
|
property()
|
|
223
259
|
], HelixHeadlessSparkline.prototype, "locale", void 0);
|
|
@@ -70,6 +70,7 @@ declare const HelixHeadlessSpatialBarChart_base: typeof HelixElement & (new (...
|
|
|
70
70
|
*
|
|
71
71
|
* @slot - The renderer's box, which the 3D drawing is made in.
|
|
72
72
|
* @slot empty - Content shown when the table has no readings. Falls back to `empty-text`.
|
|
73
|
+
* @slot error - Content shown after `error-text` while it is set and there are no readings, such as a button that tries again.
|
|
73
74
|
* @slot loading - Content shown while `loading` is set and there are no readings yet. Falls back to `loading-text`.
|
|
74
75
|
*
|
|
75
76
|
* @event {HelixPlotChangeEvent} helix-plot-change - The bars or the bar the keys rest on changed, which the renderer is told. It stays on the chart.
|
|
@@ -82,6 +83,7 @@ declare const HelixHeadlessSpatialBarChart_base: typeof HelixElement & (new (...
|
|
|
82
83
|
* @csspart bar-active - The bar the pointer or the keys rest on. Set alongside `bar`.
|
|
83
84
|
* @csspart drawing - The chart's own drawing in SVG: the box, its grid and names, and the bars.
|
|
84
85
|
* @csspart empty - The words when the table has no readings: the `empty` slot, falling back to `empty-text`.
|
|
86
|
+
* @csspart error - The words while `error-text` is set and there are no readings, followed by the `error` slot. Announced as it appears.
|
|
85
87
|
* @csspart face - One face of a bar the view shows, shaded by which way it faces.
|
|
86
88
|
* @csspart fallback - The box the chart's own drawing fills, shown until a renderer has drawn and where none is connected. Hidden from screen readers.
|
|
87
89
|
* @csspart floor - One place on the floor of a `row`, under a bar or where one would stand, drawn as its outline.
|
|
@@ -116,7 +118,7 @@ declare const HelixHeadlessSpatialBarChart_base: typeof HelixElement & (new (...
|
|
|
116
118
|
* @csspart tooltip-value - A column's value inside the tooltip.
|
|
117
119
|
* @csspart value - The value of a bar whose cell names a tone, written above it in the chart's own drawing.
|
|
118
120
|
*
|
|
119
|
-
* @cssproperty --spatial-bar-chart-shade -How far a bar's face turns from the light, from 0 for its top. The component writes it on each face, and the stylesheet that shades the face reads it.
|
|
121
|
+
* @cssproperty --spatial-bar-chart-shade - How far a bar's face turns from the light, from 0 for its top. The component writes it on each face, and the stylesheet that shades the face reads it.
|
|
120
122
|
* @cssproperty --spatial-bar-chart-tone-accent - The color of a bar whose cell says `data-tone="accent"`.
|
|
121
123
|
* @cssproperty --spatial-bar-chart-tone-danger - The color of a bar whose cell says `data-tone="danger"`.
|
|
122
124
|
* @cssproperty --spatial-bar-chart-tone-info - The color of a bar whose cell says `data-tone="info"`.
|
|
@@ -128,6 +130,7 @@ declare const HelixHeadlessSpatialBarChart_base: typeof HelixElement & (new (...
|
|
|
128
130
|
* @cssstate active - While a bar is shown, under the pointer or the keys.
|
|
129
131
|
* @cssstate drawn - While a renderer has drawn the bars, and the chart's own drawing is hidden.
|
|
130
132
|
* @cssstate empty - While the `empty` part stands in place of the readings.
|
|
133
|
+
* @cssstate error - While the `error` part stands in place of the readings.
|
|
131
134
|
* @cssstate loading - While the `loading` part stands in place of the readings.
|
|
132
135
|
*/
|
|
133
136
|
export declare class HelixHeadlessSpatialBarChart extends HelixHeadlessSpatialBarChart_base {
|