@fusion.dev/helix-headless 0.148.0 → 0.149.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/custom-elements.json +6966 -1798
- package/dist/announcement/root/announcement-root.d.ts +5 -0
- package/dist/announcement/root/announcement-root.js +5 -2
- package/dist/area-chart/root/area-chart-root.d.ts +11 -0
- package/dist/area-chart/root/area-chart-root.js +20 -7
- package/dist/avatar/group/avatar-group.d.ts +10 -2
- package/dist/avatar/group/avatar-group.js +10 -5
- package/dist/badge/count.d.ts +6 -1
- package/dist/badge/count.js +3 -3
- package/dist/badge/root/badge-root.d.ts +6 -2
- package/dist/badge/root/badge-root.js +3 -3
- package/dist/bar-chart/root/bar-chart-root.d.ts +13 -1
- package/dist/bar-chart/root/bar-chart-root.js +17 -4
- package/dist/breadcrumbs/root/breadcrumbs-root.d.ts +8 -1
- package/dist/breadcrumbs/root/breadcrumbs-root.js +5 -2
- package/dist/button/root/button-root.d.ts +10 -1
- package/dist/button/root/button-root.js +3 -2
- package/dist/button-group/root/button-group-root.d.ts +3 -0
- package/dist/button-group/root/button-group-root.js +2 -2
- package/dist/callout/root/callout-root.d.ts +16 -2
- package/dist/callout/root/callout-root.js +16 -4
- package/dist/canvas/describe.d.ts +10 -0
- package/dist/canvas/describe.js +9 -0
- package/dist/canvas/neighbor.d.ts +17 -0
- package/dist/canvas/neighbor.js +1 -0
- package/dist/canvas/node/canvas-node.js +3 -2
- package/dist/canvas/root/canvas-root.d.ts +65 -8
- package/dist/canvas/root/canvas-root.js +115 -49
- package/dist/carousel/root/carousel-root.d.ts +5 -0
- package/dist/carousel/root/carousel-root.js +16 -5
- package/dist/chat/composer/chat-composer.d.ts +5 -0
- package/dist/chat/composer/chat-composer.js +4 -1
- package/dist/chat/message/chat-message.d.ts +9 -5
- package/dist/chat/message/chat-message.js +8 -4
- package/dist/chat/naming.js +2 -2
- package/dist/chat/root/chat-root.d.ts +27 -1
- package/dist/chat/root/chat-root.js +37 -9
- package/dist/checkbox/root/checkbox-root.d.ts +11 -0
- package/dist/checkbox/root/checkbox-root.js +8 -2
- package/dist/checkbox-group/root/checkbox-group-root.d.ts +11 -0
- package/dist/checkbox-group/root/checkbox-group-root.js +11 -3
- package/dist/code-block/root/code-block-root.d.ts +12 -2
- package/dist/code-block/root/code-block-root.js +12 -2
- package/dist/color-input/root/color-input-root.d.ts +13 -0
- package/dist/color-input/root/color-input-root.js +18 -5
- package/dist/color-picker/root/color-picker-root.d.ts +19 -3
- package/dist/color-picker/root/color-picker-root.js +47 -13
- package/dist/combobox/root/combobox-root.d.ts +36 -7
- package/dist/combobox/root/combobox-root.js +37 -12
- package/dist/command/root/command-root.d.ts +15 -6
- package/dist/command/root/command-root.js +9 -4
- package/dist/copy-button/root/copy-button-root.d.ts +5 -0
- package/dist/copy-button/root/copy-button-root.js +7 -2
- package/dist/data-table/root/data-table-root.d.ts +171 -29
- package/dist/data-table/root/data-table-root.js +268 -118
- package/dist/date-input/root/date-input-root.d.ts +32 -9
- package/dist/date-input/root/date-input-root.js +66 -44
- package/dist/date-picker/root/date-picker-root.d.ts +38 -15
- package/dist/date-picker/root/date-picker-root.js +52 -33
- package/dist/dialog/root/dialog-root.d.ts +12 -1
- package/dist/dialog/root/dialog-root.js +11 -4
- package/dist/donut-chart/root/donut-chart-root.d.ts +5 -0
- package/dist/donut-chart/root/donut-chart-root.js +8 -5
- package/dist/drawer/root/drawer-root.d.ts +12 -1
- package/dist/drawer/root/drawer-root.js +9 -2
- package/dist/drilldown/root/drilldown-root.d.ts +5 -0
- package/dist/drilldown/root/drilldown-root.js +4 -1
- package/dist/element-events.generated.js +25 -3
- package/dist/file-input/root/file-input-root.d.ts +18 -3
- package/dist/file-input/root/file-input-root.js +34 -17
- package/dist/filter-input/chip/filter-chip.d.ts +13 -0
- package/dist/filter-input/chip/filter-chip.js +6 -1
- package/dist/filter-input/menu/filter-menu.d.ts +5 -0
- package/dist/filter-input/menu/filter-menu.js +3 -1
- package/dist/filter-input/root/filter-input-root.d.ts +20 -3
- package/dist/filter-input/root/filter-input-root.js +8 -4
- package/dist/format-date/root/format-date-root.d.ts +20 -2
- package/dist/format-date/root/format-date-root.js +5 -2
- package/dist/graph/root/graph-model.d.ts +11 -0
- package/dist/graph/root/graph-model.js +4 -0
- package/dist/graph/root/graph-root.d.ts +78 -9
- package/dist/graph/root/graph-root.js +124 -27
- package/dist/heatmap/root/heatmap-root.d.ts +25 -4
- package/dist/heatmap/root/heatmap-root.js +27 -7
- package/dist/icon-button/root/icon-button-root.d.ts +5 -0
- package/dist/icon-button/root/icon-button-root.js +1 -0
- package/dist/input/root/input-root.d.ts +5 -0
- package/dist/input/root/input-root.js +4 -1
- package/dist/lightbox/root/lightbox-root.d.ts +14 -4
- package/dist/lightbox/root/lightbox-root.js +25 -7
- package/dist/line-chart/root/line-chart-root.d.ts +5 -0
- package/dist/line-chart/root/line-chart-root.js +4 -2
- package/dist/list/item/list-item.d.ts +32 -0
- package/dist/list/item/list-item.js +34 -7
- package/dist/list/root/list-root.d.ts +87 -0
- package/dist/list/root/list-root.js +112 -2
- package/dist/listbox/reorder/index.d.ts +1 -0
- package/dist/listbox/reorder/index.js +4 -0
- package/dist/listbox/reorder/listbox-reorder.d.ts +83 -0
- package/dist/listbox/reorder/listbox-reorder.js +151 -0
- package/dist/listbox/root/listbox-root.d.ts +68 -11
- package/dist/listbox/root/listbox-root.js +41 -9
- package/dist/loader/root/loader-root.d.ts +5 -0
- package/dist/loader/root/loader-root.js +3 -1
- package/dist/map/area/map-area.d.ts +5 -0
- package/dist/map/area/map-area.js +3 -1
- package/dist/map/buildings/map-buildings.d.ts +5 -0
- package/dist/map/buildings/map-buildings.js +3 -1
- package/dist/map/contours/map-contours.d.ts +5 -0
- package/dist/map/contours/map-contours.js +3 -1
- package/dist/map/landcover/map-landcover.d.ts +5 -0
- package/dist/map/landcover/map-landcover.js +3 -1
- package/dist/map/marker/map-marker.d.ts +16 -1
- package/dist/map/marker/map-marker.js +13 -5
- package/dist/map/points/map-points.d.ts +5 -0
- package/dist/map/points/map-points.js +6 -4
- package/dist/map/position/map-position.d.ts +5 -0
- package/dist/map/position/map-position.js +3 -1
- package/dist/map/raster/map-raster.d.ts +5 -0
- package/dist/map/raster/map-raster.js +3 -1
- package/dist/map/root/map-root.d.ts +33 -14
- package/dist/map/root/map-root.js +59 -22
- package/dist/map/route/map-route.d.ts +5 -0
- package/dist/map/route/map-route.js +3 -1
- package/dist/map/terrain/map-terrain.d.ts +5 -0
- package/dist/map/terrain/map-terrain.js +3 -1
- package/dist/menu/root/menu-root.d.ts +5 -0
- package/dist/menu/root/menu-root.js +3 -1
- package/dist/meter/root/meter-root.d.ts +16 -3
- package/dist/meter/root/meter-root.js +12 -5
- package/dist/navigation/root/navigation-root.d.ts +5 -0
- package/dist/navigation/root/navigation-root.js +3 -1
- package/dist/notifications/notification/notification.d.ts +5 -0
- package/dist/notifications/notification/notification.js +3 -1
- package/dist/notifications/root/notifications-root.d.ts +8 -0
- package/dist/notifications/root/notifications-root.js +10 -2
- package/dist/number-input/root/number-input-root.d.ts +21 -8
- package/dist/number-input/root/number-input-root.js +26 -11
- package/dist/object-inspector/root/object-inspector-root.d.ts +51 -12
- package/dist/object-inspector/root/object-inspector-root.js +21 -20
- package/dist/outline/root/outline-root.d.ts +5 -0
- package/dist/outline/root/outline-root.js +3 -1
- package/dist/pagination/root/pagination-root.d.ts +7 -1
- package/dist/pagination/root/pagination-root.js +16 -7
- package/dist/pagination/size/pagination-size.d.ts +7 -3
- package/dist/pagination/size/pagination-size.js +4 -2
- package/dist/pagination/summary/pagination-summary.d.ts +8 -6
- package/dist/pagination/summary/pagination-summary.js +4 -9
- package/dist/pin-input/code.d.ts +6 -6
- package/dist/pin-input/code.js +1 -5
- package/dist/pin-input/root/pin-input-root.d.ts +9 -3
- package/dist/pin-input/root/pin-input-root.js +6 -2
- package/dist/popover/root/popover-root.d.ts +12 -2
- package/dist/popover/root/popover-root.js +10 -4
- package/dist/progress/root/progress-root.d.ts +7 -2
- package/dist/progress/root/progress-root.js +5 -2
- package/dist/qr-code/name.d.ts +3 -2
- package/dist/qr-code/name.js +2 -2
- package/dist/qr-code/root/qr-code-root.d.ts +12 -2
- package/dist/qr-code/root/qr-code-root.js +9 -2
- package/dist/radio/group/radio-group.d.ts +11 -0
- package/dist/radio/group/radio-group.js +8 -2
- package/dist/rating/root/rating-root.d.ts +12 -1
- package/dist/rating/root/rating-root.js +10 -3
- package/dist/scatter-chart/root/scatter-chart-root.d.ts +20 -2
- package/dist/scatter-chart/root/scatter-chart-root.js +20 -5
- package/dist/select/root/select-root.d.ts +11 -0
- package/dist/select/root/select-root.js +13 -3
- package/dist/skip-link/root/skip-link-root.d.ts +5 -0
- package/dist/skip-link/root/skip-link-root.js +3 -1
- package/dist/slider/root/slider-root.d.ts +7 -2
- package/dist/slider/root/slider-root.js +11 -5
- package/dist/sparkline/readings.d.ts +15 -5
- package/dist/sparkline/readings.js +3 -3
- package/dist/sparkline/root/sparkline-root.d.ts +9 -4
- package/dist/sparkline/root/sparkline-root.js +9 -3
- package/dist/speed-dial/root/speed-dial-root.d.ts +5 -0
- package/dist/speed-dial/root/speed-dial-root.js +4 -1
- package/dist/splitter/root/splitter-root.d.ts +6 -1
- package/dist/splitter/root/splitter-root.js +9 -4
- package/dist/steps/root/steps-root.d.ts +9 -2
- package/dist/steps/root/steps-root.js +6 -3
- package/dist/steps/step/step.d.ts +12 -0
- package/dist/steps/step/step.js +11 -2
- package/dist/switch/root/switch-root.d.ts +11 -0
- package/dist/switch/root/switch-root.js +8 -2
- package/dist/table/column/table-column.d.ts +11 -4
- package/dist/table/column/table-column.js +15 -10
- package/dist/table/grid-controller.d.ts +8 -3
- package/dist/table/grid-controller.js +17 -11
- package/dist/table/root/table-root.d.ts +107 -5
- package/dist/table/root/table-root.js +122 -20
- package/dist/table/row/table-row.d.ts +42 -0
- package/dist/table/row/table-row.js +40 -1
- package/dist/tabs/root/tabs-root.d.ts +5 -0
- package/dist/tabs/root/tabs-root.js +3 -1
- package/dist/tag/group/tag-group.d.ts +5 -0
- package/dist/tag/group/tag-group.js +3 -1
- package/dist/tag/root/tag-root.d.ts +14 -1
- package/dist/tag/root/tag-root.js +11 -8
- package/dist/textarea/root/textarea-root.d.ts +5 -0
- package/dist/textarea/root/textarea-root.js +3 -1
- package/dist/time-input/root/time-input-root.d.ts +14 -7
- package/dist/time-input/root/time-input-root.js +43 -32
- package/dist/time-picker/root/time-picker-root.d.ts +15 -7
- package/dist/time-picker/root/time-picker-root.js +25 -12
- package/dist/toast/item/toast-item.d.ts +7 -0
- package/dist/toast/item/toast-item.js +1 -0
- package/dist/toast/root/toast-root.d.ts +9 -1
- package/dist/toast/root/toast-root.js +5 -4
- package/dist/toolbar/root/toolbar-root.d.ts +5 -0
- package/dist/toolbar/root/toolbar-root.js +5 -2
- package/dist/tooltip/root/tooltip-root.d.ts +27 -17
- package/dist/tour/root/tour-root.d.ts +8 -2
- package/dist/tour/root/tour-root.js +4 -2
- package/dist/tour/stop/tour-stop.d.ts +5 -0
- package/dist/tour/stop/tour-stop.js +6 -1
- package/dist/tree/grip.d.ts +5 -0
- package/dist/tree/grip.js +1 -0
- package/dist/tree/item/tree-item.d.ts +24 -0
- package/dist/tree/item/tree-item.js +27 -5
- package/dist/tree/root/tree-root.d.ts +66 -1
- package/dist/tree/root/tree-root.js +77 -5
- package/dist/trend/root/trend-root.d.ts +20 -4
- package/dist/trend/root/trend-root.js +20 -5
- package/dist/video/root/video-root.d.ts +12 -3
- package/dist/video/root/video-root.js +41 -14
- package/dist/video-playlist/menu/video-playlist-menu.d.ts +5 -0
- package/dist/video-playlist/menu/video-playlist-menu.js +3 -1
- package/dist/video-playlist/root/video-playlist-root.d.ts +5 -0
- package/dist/video-playlist/root/video-playlist-root.js +3 -1
- package/dist/virtual-list/root/virtual-list-root.d.ts +19 -3
- package/dist/virtual-list/root/virtual-list-root.js +5 -2
- package/lint.json +1 -1
- package/package.json +7 -6
- package/types/jsx.d.ts +4014 -1862
- package/types/vue.d.ts +1266 -624
- package/types/words.d.ts +3280 -0
- package/dist/toast/hotkey.d.ts +0 -22
- package/dist/toast/hotkey.js +0 -23
|
@@ -4,7 +4,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { customElement, HelixElement, HelixMapPartChangeEvent } from '@fusion.dev/helix-core';
|
|
7
|
+
import { customElement, HelixElement, HelixMapPartChangeEvent, words } from '@fusion.dev/helix-core';
|
|
8
8
|
import { nothing } from 'lit';
|
|
9
9
|
import { property } from 'lit/decorators.js';
|
|
10
10
|
export const pointsOf = (value) => (value ?? '')
|
|
@@ -24,6 +24,7 @@ let HelixHeadlessMapRoute = class HelixHeadlessMapRoute extends HelixElement {
|
|
|
24
24
|
this.layerKind = 'route';
|
|
25
25
|
this.label = 'Route';
|
|
26
26
|
}
|
|
27
|
+
static { this.words = 'helix-map-route'; }
|
|
27
28
|
updated(changed) {
|
|
28
29
|
super.updated(changed);
|
|
29
30
|
this.dispatchEvent(new HelixMapPartChangeEvent({ kind: 'layer' }));
|
|
@@ -39,6 +40,7 @@ __decorate([
|
|
|
39
40
|
property()
|
|
40
41
|
], HelixHeadlessMapRoute.prototype, "group", void 0);
|
|
41
42
|
__decorate([
|
|
43
|
+
words,
|
|
42
44
|
property()
|
|
43
45
|
], HelixHeadlessMapRoute.prototype, "label", void 0);
|
|
44
46
|
__decorate([
|
|
@@ -28,6 +28,11 @@ export type MapTerrainEncoding = 'mapbox' | 'terrarium';
|
|
|
28
28
|
* @event {HelixMapPartChangeEvent} helix-map-part-change - The tiles, how the ground is raised, or the layer's name or colors changed. Used by `connectMap`; pages do not need to listen for it.
|
|
29
29
|
*/
|
|
30
30
|
export declare class HelixHeadlessMapTerrain extends HelixElement {
|
|
31
|
+
/**
|
|
32
|
+
* The key this part's words are registered under, its styled tag:
|
|
33
|
+
* `registerWords('de', { 'helix-map-terrain': { label: 'Gelände' } })`.
|
|
34
|
+
*/
|
|
35
|
+
static words: string;
|
|
31
36
|
/** The elevation provider's credit, shown in the frame's footer. Links in it stay links. */
|
|
32
37
|
attribution?: string;
|
|
33
38
|
/** More about the terrain. Read after the label in the frame's list. */
|
|
@@ -4,7 +4,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { customElement, HelixElement, HelixMapPartChangeEvent } from '@fusion.dev/helix-core';
|
|
7
|
+
import { customElement, HelixElement, HelixMapPartChangeEvent, words } from '@fusion.dev/helix-core';
|
|
8
8
|
import { nothing } from 'lit';
|
|
9
9
|
import { property } from 'lit/decorators.js';
|
|
10
10
|
let HelixHeadlessMapTerrain = class HelixHeadlessMapTerrain extends HelixElement {
|
|
@@ -17,6 +17,7 @@ let HelixHeadlessMapTerrain = class HelixHeadlessMapTerrain extends HelixElement
|
|
|
17
17
|
this.label = 'Terrain';
|
|
18
18
|
this.raised = false;
|
|
19
19
|
}
|
|
20
|
+
static { this.words = 'helix-map-terrain'; }
|
|
20
21
|
updated(changed) {
|
|
21
22
|
super.updated(changed);
|
|
22
23
|
this.dispatchEvent(new HelixMapPartChangeEvent({ kind: 'layer' }));
|
|
@@ -41,6 +42,7 @@ __decorate([
|
|
|
41
42
|
property()
|
|
42
43
|
], HelixHeadlessMapTerrain.prototype, "group", void 0);
|
|
43
44
|
__decorate([
|
|
45
|
+
words,
|
|
44
46
|
property()
|
|
45
47
|
], HelixHeadlessMapTerrain.prototype, "label", void 0);
|
|
46
48
|
__decorate([
|
|
@@ -80,6 +80,11 @@ declare const HelixHeadlessMenu_base: (new (...args: any[]) => import("@fusion.d
|
|
|
80
80
|
* @cssstate start - A row on the current page has content in its leading column, so every row keeps that column.
|
|
81
81
|
*/
|
|
82
82
|
export declare class HelixHeadlessMenu extends HelixHeadlessMenu_base {
|
|
83
|
+
/**
|
|
84
|
+
* The key this family's words are registered under, its styled tag:
|
|
85
|
+
* `registerWords('de', { 'helix-menu': { backLabel: 'Zurück' } })`.
|
|
86
|
+
*/
|
|
87
|
+
static words: string;
|
|
83
88
|
/**
|
|
84
89
|
* The text of the row that returns from a submenu.
|
|
85
90
|
*/
|
|
@@ -4,7 +4,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { AriaForwardController, anchorElement, customElement, DrilldownController, deepActiveElement, deepContains, HelixElement, inlineStep, KeyboardNavigationController, MixinCollection, MixinControllerOpen, PopoverController, scrollItemIntoView, slottedWords, tellDisclosure, typeaheadBy, } from '@fusion.dev/helix-core';
|
|
7
|
+
import { AriaForwardController, anchorElement, customElement, DrilldownController, deepActiveElement, deepContains, HelixElement, inlineStep, KeyboardNavigationController, MixinCollection, MixinControllerOpen, PopoverController, scrollItemIntoView, slottedWords, tellDisclosure, typeaheadBy, words, } from '@fusion.dev/helix-core';
|
|
8
8
|
import { caretLeft } from '@fusion.dev/helix-icons';
|
|
9
9
|
import { html, nothing } from 'lit';
|
|
10
10
|
import { property } from 'lit/decorators.js';
|
|
@@ -132,6 +132,7 @@ let HelixHeadlessMenu = class HelixHeadlessMenu extends MixinCollection(MixinCon
|
|
|
132
132
|
}
|
|
133
133
|
};
|
|
134
134
|
}
|
|
135
|
+
static { this.words = 'helix-menu'; }
|
|
135
136
|
tellTrigger() {
|
|
136
137
|
const slot = this.renderRoot?.querySelector('slot[name="trigger"]');
|
|
137
138
|
tellDisclosure(slot?.assignedElements({ flatten: true })[0], this.open, 'menu');
|
|
@@ -302,6 +303,7 @@ let HelixHeadlessMenu = class HelixHeadlessMenu extends MixinCollection(MixinCon
|
|
|
302
303
|
}
|
|
303
304
|
};
|
|
304
305
|
__decorate([
|
|
306
|
+
words,
|
|
305
307
|
property({ attribute: 'back-label' })
|
|
306
308
|
], HelixHeadlessMenu.prototype, "backLabel", void 0);
|
|
307
309
|
__decorate([
|
|
@@ -59,6 +59,11 @@ export type MeterBand = 'fair' | 'good' | 'poor';
|
|
|
59
59
|
* @cssstate under - The value is below `min`.
|
|
60
60
|
*/
|
|
61
61
|
export declare class HelixHeadlessMeter extends HelixElement {
|
|
62
|
+
/**
|
|
63
|
+
* The key this family's words are registered under, its styled tag:
|
|
64
|
+
* `registerWords('de', { 'helix-meter': { label: 'Messwert' } })`.
|
|
65
|
+
*/
|
|
66
|
+
static words: string;
|
|
62
67
|
/**
|
|
63
68
|
* Sets the band directly, for a rule that `low`, `high`, and `optimum` cannot
|
|
64
69
|
* express.
|
|
@@ -93,7 +98,9 @@ export declare class HelixHeadlessMeter extends HelixElement {
|
|
|
93
98
|
* The words each band is said with under `live`, by its name, written as
|
|
94
99
|
* JSON in the attribute: `band-labels='{"poor":"Almost full"}'`.
|
|
95
100
|
*
|
|
96
|
-
* A band left out keeps its default: "Good", "Fair" or "Poor".
|
|
101
|
+
* A band left out keeps its default: "Good", "Fair" or "Poor". Reading the
|
|
102
|
+
* property gives every band's words, yours over the registry's over the
|
|
103
|
+
* English.
|
|
97
104
|
*/
|
|
98
105
|
bandLabels: Partial<Record<MeterBand, string>>;
|
|
99
106
|
/**
|
|
@@ -134,9 +141,15 @@ export declare class HelixHeadlessMeter extends HelixElement {
|
|
|
134
141
|
*/
|
|
135
142
|
live: boolean;
|
|
136
143
|
/**
|
|
137
|
-
*
|
|
144
|
+
* What `live` says as the reading moves into another band. `{reading}` is
|
|
145
|
+
* the reading as it is shown, and `{band}` the band's words from
|
|
146
|
+
* `band-labels`.
|
|
147
|
+
*/
|
|
148
|
+
liveLabel: string;
|
|
149
|
+
/**
|
|
150
|
+
* The locale the words and the percentage are in, such as `fr` for `72 %`.
|
|
138
151
|
*
|
|
139
|
-
* Absent
|
|
152
|
+
* Absent reads the nearest `lang`, then the runtime's own.
|
|
140
153
|
*/
|
|
141
154
|
locale: string;
|
|
142
155
|
/**
|
|
@@ -4,16 +4,16 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { customElement, drawStatus, HelixBandEvent, HelixElement, hostAria, readingText, StatusController, slottedWords, wordsConverter, } from '@fusion.dev/helix-core';
|
|
7
|
+
import { customElement, drawStatus, formatWords, HelixBandEvent, HelixElement, hostAria, readingText, StatusController, slottedWords, words, wordsConverter, wordsLocale, } from '@fusion.dev/helix-core';
|
|
8
8
|
import { html, nothing, svg } from 'lit';
|
|
9
9
|
import { property } from 'lit/decorators.js';
|
|
10
|
-
const BAND_WORDS = { fair: 'Fair', good: 'Good', poor: 'Poor' };
|
|
11
10
|
let HelixHeadlessMeter = class HelixHeadlessMeter extends HelixElement {
|
|
12
11
|
constructor() {
|
|
13
12
|
super(...arguments);
|
|
14
|
-
this.bandLabels = {};
|
|
13
|
+
this.bandLabels = { fair: 'Fair', good: 'Good', poor: 'Poor' };
|
|
15
14
|
this.label = 'Meter';
|
|
16
15
|
this.live = false;
|
|
16
|
+
this.liveLabel = '{reading}, {band}';
|
|
17
17
|
this.locale = '';
|
|
18
18
|
this.max = 100;
|
|
19
19
|
this.min = 0;
|
|
@@ -25,6 +25,7 @@ let HelixHeadlessMeter = class HelixHeadlessMeter extends HelixElement {
|
|
|
25
25
|
this.requestUpdate();
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
|
+
static { this.words = 'helix-meter'; }
|
|
28
29
|
get span() {
|
|
29
30
|
const min = Number.isFinite(this.min) ? this.min : 0;
|
|
30
31
|
const max = Number.isFinite(this.max) && this.max > min ? this.max : min + 1;
|
|
@@ -73,7 +74,7 @@ let HelixHeadlessMeter = class HelixHeadlessMeter extends HelixElement {
|
|
|
73
74
|
}
|
|
74
75
|
get text() {
|
|
75
76
|
return (this.valueText ||
|
|
76
|
-
readingText(Number.isFinite(this.value) ? this.value : this.span.min, this.ratio, this
|
|
77
|
+
readingText(Number.isFinite(this.value) ? this.value : this.span.min, this.ratio, wordsLocale(this), this.formatOptions));
|
|
77
78
|
}
|
|
78
79
|
willUpdate(changed) {
|
|
79
80
|
super.willUpdate(changed);
|
|
@@ -102,7 +103,7 @@ let HelixHeadlessMeter = class HelixHeadlessMeter extends HelixElement {
|
|
|
102
103
|
}
|
|
103
104
|
this.dispatchEvent(new HelixBandEvent({ band: band ?? '' }));
|
|
104
105
|
if (band && this.live) {
|
|
105
|
-
this.status.say(
|
|
106
|
+
this.status.say(formatWords(this, 'liveLabel', { band: this.bandLabels[band] ?? '', reading: this.text }));
|
|
106
107
|
}
|
|
107
108
|
}
|
|
108
109
|
renderRound() {
|
|
@@ -158,6 +159,7 @@ __decorate([
|
|
|
158
159
|
property()
|
|
159
160
|
], HelixHeadlessMeter.prototype, "band", void 0);
|
|
160
161
|
__decorate([
|
|
162
|
+
words,
|
|
161
163
|
property({ attribute: 'band-labels', converter: wordsConverter })
|
|
162
164
|
], HelixHeadlessMeter.prototype, "bandLabels", void 0);
|
|
163
165
|
__decorate([
|
|
@@ -167,11 +169,16 @@ __decorate([
|
|
|
167
169
|
property({ type: Number })
|
|
168
170
|
], HelixHeadlessMeter.prototype, "high", void 0);
|
|
169
171
|
__decorate([
|
|
172
|
+
words,
|
|
170
173
|
property()
|
|
171
174
|
], HelixHeadlessMeter.prototype, "label", void 0);
|
|
172
175
|
__decorate([
|
|
173
176
|
property({ type: Boolean })
|
|
174
177
|
], HelixHeadlessMeter.prototype, "live", void 0);
|
|
178
|
+
__decorate([
|
|
179
|
+
words,
|
|
180
|
+
property({ attribute: 'live-label' })
|
|
181
|
+
], HelixHeadlessMeter.prototype, "liveLabel", void 0);
|
|
175
182
|
__decorate([
|
|
176
183
|
property()
|
|
177
184
|
], HelixHeadlessMeter.prototype, "locale", void 0);
|
|
@@ -42,6 +42,11 @@ import { type PropertyValues, type TemplateResult } from 'lit';
|
|
|
42
42
|
* @csspart nav - The navigation landmark.
|
|
43
43
|
*/
|
|
44
44
|
export declare class HelixHeadlessNavigation extends HelixElement {
|
|
45
|
+
/**
|
|
46
|
+
* The key this family's words are registered under, its styled tag:
|
|
47
|
+
* `registerWords('de', { 'helix-navigation': { label: 'Hauptmenü' } })`.
|
|
48
|
+
*/
|
|
49
|
+
static words: string;
|
|
45
50
|
private readonly indicator;
|
|
46
51
|
/**
|
|
47
52
|
* Whether the arrow keys move focus between the destinations.
|
|
@@ -4,7 +4,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { AriaForwardController, customElement, focusableElements, focusItemOf, HelixElement, IndicatorController, KeyboardNavigationController, } from '@fusion.dev/helix-core';
|
|
7
|
+
import { AriaForwardController, customElement, focusableElements, focusItemOf, HelixElement, IndicatorController, KeyboardNavigationController, words, } from '@fusion.dev/helix-core';
|
|
8
8
|
import { html } from 'lit';
|
|
9
9
|
import { property } from 'lit/decorators.js';
|
|
10
10
|
const FOCUSABLE = 'a[href], button, input, select, textarea, [tabindex]:not([tabindex="-1"])';
|
|
@@ -49,6 +49,7 @@ let HelixHeadlessNavigation = class HelixHeadlessNavigation extends HelixElement
|
|
|
49
49
|
target: () => this.partNamed('nav'),
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
|
+
static { this.words = 'helix-navigation'; }
|
|
52
53
|
get items() {
|
|
53
54
|
const slot = this.renderRoot.querySelector('slot:not([name])');
|
|
54
55
|
return (slot?.assignedElements() ?? []);
|
|
@@ -86,6 +87,7 @@ __decorate([
|
|
|
86
87
|
property({ type: Boolean })
|
|
87
88
|
], HelixHeadlessNavigation.prototype, "arrows", void 0);
|
|
88
89
|
__decorate([
|
|
90
|
+
words,
|
|
89
91
|
property()
|
|
90
92
|
], HelixHeadlessNavigation.prototype, "label", void 0);
|
|
91
93
|
__decorate([
|
|
@@ -70,6 +70,11 @@ declare const HelixHeadlessNotification_base: (new (...args: any[]) => import("@
|
|
|
70
70
|
* @cssstate read - While it has been read.
|
|
71
71
|
*/
|
|
72
72
|
export declare class HelixHeadlessNotification extends HelixHeadlessNotification_base {
|
|
73
|
+
/**
|
|
74
|
+
* The key this part's words are registered under, its styled tag:
|
|
75
|
+
* `registerWords('de', { 'helix-notification': { unreadLabel: 'Ungelesen' } })`.
|
|
76
|
+
*/
|
|
77
|
+
static words: string;
|
|
73
78
|
/**
|
|
74
79
|
* When it happened, as anything `Date` parses.
|
|
75
80
|
*
|
|
@@ -4,7 +4,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { customElement, deepActiveElement, deepContains, focusableElements, HelixElement, HelixReadEvent, hostAria, MixinDismissible, requestChange, slotFilled, } from '@fusion.dev/helix-core';
|
|
7
|
+
import { customElement, deepActiveElement, deepContains, focusableElements, HelixElement, HelixReadEvent, hostAria, MixinDismissible, requestChange, slotFilled, words, } from '@fusion.dev/helix-core';
|
|
8
8
|
import { x } from '@fusion.dev/helix-icons';
|
|
9
9
|
import { nothing } from 'lit';
|
|
10
10
|
import { property } from 'lit/decorators.js';
|
|
@@ -35,6 +35,7 @@ let HelixHeadlessNotification = class HelixHeadlessNotification extends MixinDis
|
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
|
+
static { this.words = 'helix-notification'; }
|
|
38
39
|
get read() {
|
|
39
40
|
return this.readState ?? this.defaultRead;
|
|
40
41
|
}
|
|
@@ -177,6 +178,7 @@ __decorate([
|
|
|
177
178
|
property({ attribute: false })
|
|
178
179
|
], HelixHeadlessNotification.prototype, "stop", void 0);
|
|
179
180
|
__decorate([
|
|
181
|
+
words,
|
|
180
182
|
property({ attribute: 'unread-label' })
|
|
181
183
|
], HelixHeadlessNotification.prototype, "unreadLabel", void 0);
|
|
182
184
|
HelixHeadlessNotification = __decorate([
|
|
@@ -83,6 +83,14 @@ export declare class HelixHeadlessNotifications extends HelixHeadlessNotificatio
|
|
|
83
83
|
* and does not patch up.
|
|
84
84
|
*/
|
|
85
85
|
static shadowRootOptions: ShadowRootInit;
|
|
86
|
+
/**
|
|
87
|
+
* The key this family's words are registered under, its styled tag:
|
|
88
|
+
* `registerWords('de', { 'helix-notifications': { markAllLabel: 'Alle als gelesen markieren' } })`.
|
|
89
|
+
* A notification's own words are under `helix-notification`.
|
|
90
|
+
*/
|
|
91
|
+
static words: string;
|
|
92
|
+
/** The region's name where `label` is empty. */
|
|
93
|
+
fallbackLabel: string;
|
|
86
94
|
/**
|
|
87
95
|
* The feed's name, read by screen readers.
|
|
88
96
|
*/
|
|
@@ -4,13 +4,14 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { assignSlots, ChildrenController, customElement, deepContains, focusableElements, HelixElement, HelixLoadMoreEvent, HelixReadEvent, hostAria, MixinCollection, markRegion, rovingStop, whenHydrated, } from '@fusion.dev/helix-core';
|
|
7
|
+
import { assignSlots, ChildrenController, customElement, deepContains, focusableElements, HelixElement, HelixLoadMoreEvent, HelixReadEvent, hostAria, MixinCollection, markRegion, rovingStop, whenHydrated, words, } from '@fusion.dev/helix-core';
|
|
8
8
|
import { html, nothing } from 'lit';
|
|
9
9
|
import { property } from 'lit/decorators.js';
|
|
10
10
|
import { feedStep } from '../feed-keys.js';
|
|
11
11
|
let HelixHeadlessNotifications = class HelixHeadlessNotifications extends MixinCollection(HelixElement) {
|
|
12
12
|
constructor() {
|
|
13
13
|
super(...arguments);
|
|
14
|
+
this.fallbackLabel = 'Notifications';
|
|
14
15
|
this.label = '';
|
|
15
16
|
this.loadError = '';
|
|
16
17
|
this.loadMore = false;
|
|
@@ -83,6 +84,7 @@ let HelixHeadlessNotifications = class HelixHeadlessNotifications extends MixinC
|
|
|
83
84
|
...HelixElement.shadowRootOptions,
|
|
84
85
|
slotAssignment: 'manual',
|
|
85
86
|
}; }
|
|
87
|
+
static { this.words = 'helix-notifications'; }
|
|
86
88
|
get unread() {
|
|
87
89
|
return this.items.filter((item) => !item.read).length;
|
|
88
90
|
}
|
|
@@ -176,7 +178,7 @@ let HelixHeadlessNotifications = class HelixHeadlessNotifications extends MixinC
|
|
|
176
178
|
}
|
|
177
179
|
willUpdate(changed) {
|
|
178
180
|
super.willUpdate(changed);
|
|
179
|
-
hostAria(this.internals, { label: this.label ||
|
|
181
|
+
hostAria(this.internals, { label: this.label || this.fallbackLabel, role: 'region' });
|
|
180
182
|
const failed = this.failed;
|
|
181
183
|
this.toggleState('error', failed);
|
|
182
184
|
this.toggleState('loading', this.loading);
|
|
@@ -262,6 +264,10 @@ let HelixHeadlessNotifications = class HelixHeadlessNotifications extends MixinC
|
|
|
262
264
|
<div part="footer"><slot name="footer"></slot></div>`;
|
|
263
265
|
}
|
|
264
266
|
};
|
|
267
|
+
__decorate([
|
|
268
|
+
words,
|
|
269
|
+
property({ attribute: 'fallback-label' })
|
|
270
|
+
], HelixHeadlessNotifications.prototype, "fallbackLabel", void 0);
|
|
265
271
|
__decorate([
|
|
266
272
|
property()
|
|
267
273
|
], HelixHeadlessNotifications.prototype, "label", void 0);
|
|
@@ -272,12 +278,14 @@ __decorate([
|
|
|
272
278
|
property({ attribute: 'load-more', type: Boolean })
|
|
273
279
|
], HelixHeadlessNotifications.prototype, "loadMore", void 0);
|
|
274
280
|
__decorate([
|
|
281
|
+
words,
|
|
275
282
|
property({ attribute: 'load-more-label' })
|
|
276
283
|
], HelixHeadlessNotifications.prototype, "loadMoreLabel", void 0);
|
|
277
284
|
__decorate([
|
|
278
285
|
property({ attribute: 'mark-all', type: Boolean })
|
|
279
286
|
], HelixHeadlessNotifications.prototype, "markAll", void 0);
|
|
280
287
|
__decorate([
|
|
288
|
+
words,
|
|
281
289
|
property({ attribute: 'mark-all-label' })
|
|
282
290
|
], HelixHeadlessNotifications.prototype, "markAllLabel", void 0);
|
|
283
291
|
__decorate([
|
|
@@ -80,6 +80,11 @@ declare const HelixHeadlessNumberInput_base: (new (...args: any[]) => import("@f
|
|
|
80
80
|
* @cssstate scrubbing - The label is being dragged to change the value, under `scrub`, as Zag's scrubber says while it is held.
|
|
81
81
|
*/
|
|
82
82
|
export declare class HelixHeadlessNumberInput extends HelixHeadlessNumberInput_base {
|
|
83
|
+
/**
|
|
84
|
+
* The key this family's words are registered under, its styled tag:
|
|
85
|
+
* `registerWords('de', { 'helix-number-input': { incrementLabel: 'Erhöhen' } })`.
|
|
86
|
+
*/
|
|
87
|
+
static words: string;
|
|
83
88
|
protected readonly aria: AriaForwardController;
|
|
84
89
|
/** Typed or dragged, so every edit is announced. See `announcesInput`. */
|
|
85
90
|
protected readonly announcesInput = true;
|
|
@@ -99,9 +104,10 @@ export declare class HelixHeadlessNumberInput extends HelixHeadlessNumberInput_b
|
|
|
99
104
|
* **Every sentence a control raises in the browser's bubble is a property**,
|
|
100
105
|
* named for the validity flag it reports, so a form in another language
|
|
101
106
|
* speaks it: `feedback` replaces the message under the field and does not
|
|
102
|
-
* reach the bubble.
|
|
107
|
+
* reach the bubble. Unset is the sentence registered for the page's
|
|
108
|
+
* language, then the English.
|
|
103
109
|
*/
|
|
104
|
-
badInputMessage
|
|
110
|
+
badInputMessage: string;
|
|
105
111
|
/**
|
|
106
112
|
* The name of the step down button, read by screen readers.
|
|
107
113
|
*/
|
|
@@ -157,14 +163,14 @@ export declare class HelixHeadlessNumberInput extends HelixHeadlessNumberInput_b
|
|
|
157
163
|
placeholder: string;
|
|
158
164
|
/**
|
|
159
165
|
* The message the browser shows when the number is above `max`, with `{max}`
|
|
160
|
-
* filled in.
|
|
166
|
+
* filled in, written in the locale.
|
|
161
167
|
*/
|
|
162
|
-
rangeOverflowMessage
|
|
168
|
+
rangeOverflowMessage: string;
|
|
163
169
|
/**
|
|
164
170
|
* The message the browser shows when the number is below `min`, with `{min}`
|
|
165
|
-
* filled in.
|
|
171
|
+
* filled in, written in the locale.
|
|
166
172
|
*/
|
|
167
|
-
rangeUnderflowMessage
|
|
173
|
+
rangeUnderflowMessage: string;
|
|
168
174
|
/**
|
|
169
175
|
* Prevents editing. The value is still submitted with the form.
|
|
170
176
|
*/
|
|
@@ -193,9 +199,10 @@ export declare class HelixHeadlessNumberInput extends HelixHeadlessNumberInput_b
|
|
|
193
199
|
step?: number;
|
|
194
200
|
/**
|
|
195
201
|
* The message the browser shows when the number is off the step grid, with
|
|
196
|
-
* `{below}` and `{above}` filled in with the nearest valid values
|
|
202
|
+
* `{below}` and `{above}` filled in with the nearest valid values, written in
|
|
203
|
+
* the locale.
|
|
197
204
|
*/
|
|
198
|
-
stepMismatchMessage
|
|
205
|
+
stepMismatchMessage: string;
|
|
199
206
|
/**
|
|
200
207
|
* What a screen reader says for the value, with `{value}` filled in, such as
|
|
201
208
|
* `{value} kilograms`.
|
|
@@ -238,6 +245,12 @@ export declare class HelixHeadlessNumberInput extends HelixHeadlessNumberInput_b
|
|
|
238
245
|
* otherwise the smallest amount the format shows, or whole numbers.
|
|
239
246
|
*/
|
|
240
247
|
private get grid();
|
|
248
|
+
/**
|
|
249
|
+
* A number as a message writes it: in the locale the words are in, every
|
|
250
|
+
* digit kept and no grouping, which in English is the number as it was
|
|
251
|
+
* always written.
|
|
252
|
+
*/
|
|
253
|
+
private written;
|
|
241
254
|
/** Whether `value` is on the step grid, counted from `min`. */
|
|
242
255
|
private onStep;
|
|
243
256
|
/**
|
|
@@ -4,7 +4,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { AriaForwardController, appleTouch, valueAsNumber as asNumber, customElement,
|
|
7
|
+
import { AriaForwardController, appleTouch, valueAsNumber as asNumber, customElement, formatNumber, formatWords, numberAsValue as fromNumber, HelixFormElement, holdCaret, MixinControllerValue, MixinField, parseNumber, restoreValue, submitImplicitly, words, wordsLocale, } from '@fusion.dev/helix-core';
|
|
8
8
|
import { minus, plus } from '@fusion.dev/helix-icons';
|
|
9
9
|
import { html, nothing } from 'lit';
|
|
10
10
|
import { property, state } from 'lit/decorators.js';
|
|
@@ -20,12 +20,16 @@ let HelixHeadlessNumberInput = class HelixHeadlessNumberInput extends MixinContr
|
|
|
20
20
|
});
|
|
21
21
|
this.announcesInput = true;
|
|
22
22
|
this.autocomplete = '';
|
|
23
|
+
this.badInputMessage = 'Please enter a number.';
|
|
23
24
|
this.decrementLabel = 'Decrease';
|
|
24
25
|
this.incrementLabel = 'Increase';
|
|
25
26
|
this.locale = '';
|
|
26
27
|
this.placeholder = '';
|
|
28
|
+
this.rangeOverflowMessage = 'Value must be {max} or less.';
|
|
29
|
+
this.rangeUnderflowMessage = 'Value must be {min} or more.';
|
|
27
30
|
this.readOnly = false;
|
|
28
31
|
this.scrub = false;
|
|
32
|
+
this.stepMismatchMessage = 'Please enter a valid value. The two nearest valid values are {below} and {above}.';
|
|
29
33
|
this.valueText = '';
|
|
30
34
|
this.wheel = false;
|
|
31
35
|
this.editing = false;
|
|
@@ -143,6 +147,7 @@ let HelixHeadlessNumberInput = class HelixHeadlessNumberInput extends MixinContr
|
|
|
143
147
|
}
|
|
144
148
|
};
|
|
145
149
|
}
|
|
150
|
+
static { this.words = 'helix-number-input'; }
|
|
146
151
|
get shown() {
|
|
147
152
|
const parsed = this.numeric;
|
|
148
153
|
if (this.editing || this.formatOptions === undefined || parsed === null) {
|
|
@@ -177,6 +182,12 @@ let HelixHeadlessNumberInput = class HelixHeadlessNumberInput extends MixinContr
|
|
|
177
182
|
this.grainOf = [this.locale, options, fresh];
|
|
178
183
|
return fresh;
|
|
179
184
|
}
|
|
185
|
+
written(number) {
|
|
186
|
+
return formatNumber(number, wordsLocale(this), {
|
|
187
|
+
maximumFractionDigits: 20,
|
|
188
|
+
useGrouping: false,
|
|
189
|
+
});
|
|
190
|
+
}
|
|
180
191
|
onStep(value) {
|
|
181
192
|
const step = this.grid;
|
|
182
193
|
const anchor = this.min ?? 0;
|
|
@@ -259,25 +270,23 @@ let HelixHeadlessNumberInput = class HelixHeadlessNumberInput extends MixinContr
|
|
|
259
270
|
this.internals.setValidity({ valueMissing: true }, this.valueMissingMessage || 'Please fill in this field.', control);
|
|
260
271
|
}
|
|
261
272
|
else if (this.value.trim() !== '' && parsed === null) {
|
|
262
|
-
this.internals.setValidity({ badInput: true }, this.badInputMessage
|
|
273
|
+
this.internals.setValidity({ badInput: true }, this.badInputMessage, control);
|
|
263
274
|
}
|
|
264
275
|
else if (parsed !== null && this.min !== undefined && parsed < this.min) {
|
|
265
|
-
this.internals.setValidity({ rangeUnderflow: true },
|
|
266
|
-
min: this.min,
|
|
267
|
-
}), control);
|
|
276
|
+
this.internals.setValidity({ rangeUnderflow: true }, formatWords(this, 'rangeUnderflowMessage', { min: this.written(this.min) }), control);
|
|
268
277
|
}
|
|
269
278
|
else if (parsed !== null && this.max !== undefined && parsed > this.max) {
|
|
270
|
-
this.internals.setValidity({ rangeOverflow: true },
|
|
271
|
-
max: this.max,
|
|
272
|
-
}), control);
|
|
279
|
+
this.internals.setValidity({ rangeOverflow: true }, formatWords(this, 'rangeOverflowMessage', { max: this.written(this.max) }), control);
|
|
273
280
|
}
|
|
274
281
|
else if (parsed !== null && !this.onStep(parsed)) {
|
|
275
282
|
const step = this.grid;
|
|
276
283
|
const anchor = this.min ?? 0;
|
|
277
284
|
const below = this.clamp(anchor + Math.floor((parsed - anchor) / step) * step);
|
|
278
285
|
const above = this.clamp(anchor + Math.ceil((parsed - anchor) / step) * step);
|
|
279
|
-
this.internals.setValidity({ stepMismatch: true },
|
|
280
|
-
|
|
286
|
+
this.internals.setValidity({ stepMismatch: true }, formatWords(this, 'stepMismatchMessage', {
|
|
287
|
+
above: this.written(above),
|
|
288
|
+
below: this.written(below),
|
|
289
|
+
}), control);
|
|
281
290
|
}
|
|
282
291
|
else {
|
|
283
292
|
this.internals.setValidity({}, '', control);
|
|
@@ -347,7 +356,7 @@ let HelixHeadlessNumberInput = class HelixHeadlessNumberInput extends MixinContr
|
|
|
347
356
|
aria-valuetext=${parsed === null
|
|
348
357
|
? nothing
|
|
349
358
|
: this.valueText
|
|
350
|
-
?
|
|
359
|
+
? formatWords(this, 'valueText', {
|
|
351
360
|
value: this.formatOptions
|
|
352
361
|
? formatNumber(parsed, this.locale, this.formatOptions)
|
|
353
362
|
: this.value,
|
|
@@ -393,15 +402,18 @@ __decorate([
|
|
|
393
402
|
property()
|
|
394
403
|
], HelixHeadlessNumberInput.prototype, "autocomplete", void 0);
|
|
395
404
|
__decorate([
|
|
405
|
+
words,
|
|
396
406
|
property({ attribute: 'bad-input-message' })
|
|
397
407
|
], HelixHeadlessNumberInput.prototype, "badInputMessage", void 0);
|
|
398
408
|
__decorate([
|
|
409
|
+
words,
|
|
399
410
|
property({ attribute: 'decrement-label' })
|
|
400
411
|
], HelixHeadlessNumberInput.prototype, "decrementLabel", void 0);
|
|
401
412
|
__decorate([
|
|
402
413
|
property({ attribute: 'format-options', type: Object })
|
|
403
414
|
], HelixHeadlessNumberInput.prototype, "formatOptions", void 0);
|
|
404
415
|
__decorate([
|
|
416
|
+
words,
|
|
405
417
|
property({ attribute: 'increment-label' })
|
|
406
418
|
], HelixHeadlessNumberInput.prototype, "incrementLabel", void 0);
|
|
407
419
|
__decorate([
|
|
@@ -420,9 +432,11 @@ __decorate([
|
|
|
420
432
|
property()
|
|
421
433
|
], HelixHeadlessNumberInput.prototype, "placeholder", void 0);
|
|
422
434
|
__decorate([
|
|
435
|
+
words,
|
|
423
436
|
property({ attribute: 'range-overflow-message' })
|
|
424
437
|
], HelixHeadlessNumberInput.prototype, "rangeOverflowMessage", void 0);
|
|
425
438
|
__decorate([
|
|
439
|
+
words,
|
|
426
440
|
property({ attribute: 'range-underflow-message' })
|
|
427
441
|
], HelixHeadlessNumberInput.prototype, "rangeUnderflowMessage", void 0);
|
|
428
442
|
__decorate([
|
|
@@ -435,6 +449,7 @@ __decorate([
|
|
|
435
449
|
property({ type: Number })
|
|
436
450
|
], HelixHeadlessNumberInput.prototype, "step", void 0);
|
|
437
451
|
__decorate([
|
|
452
|
+
words,
|
|
438
453
|
property({ attribute: 'step-mismatch-message' })
|
|
439
454
|
], HelixHeadlessNumberInput.prototype, "stepMismatchMessage", void 0);
|
|
440
455
|
__decorate([
|