@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 { addDays, addMonths, valueAsDate as asDate, barredBy, customElement,
|
|
7
|
+
import { addDays, addMonths, valueAsDate as asDate, barredBy, calendarLocale, customElement, formatWords, dateAsValue as fromDate, HelixFormElement, HelixNavigateEvent, handedLocale, hostAria, inlineStep, commaList as list, localToday, MixinControllerValue, MixinPickerFeedback, monthOf, monthOut, periodCells, periodKey, reportValues, requestChange, sameMonth, weekStartOf, words, wordsLocale, YEARS_SHOWN, yearOut, yearPageOf, } from '@fusion.dev/helix-core';
|
|
8
8
|
import { caretLeft, caretRight } from '@fusion.dev/helix-icons';
|
|
9
9
|
import { html, nothing } from 'lit';
|
|
10
10
|
import { property, state } from 'lit/decorators.js';
|
|
@@ -25,6 +25,7 @@ const firstOf = (year, month) => addMonths(asDate('2000-01-01'), (year - 2000) *
|
|
|
25
25
|
let HelixHeadlessDatePicker = class HelixHeadlessDatePicker extends MixinPickerFeedback(MixinControllerValue(HelixFormElement)) {
|
|
26
26
|
constructor() {
|
|
27
27
|
super(...arguments);
|
|
28
|
+
this.badInputMessage = '{mode, select, single {Enter a date as YYYY-MM-DD.} other {Enter dates as YYYY-MM-DD, separated by commas.}}';
|
|
28
29
|
this.defaultMonth = '';
|
|
29
30
|
this.disableDates = '';
|
|
30
31
|
this.disableDays = '';
|
|
@@ -41,6 +42,7 @@ let HelixHeadlessDatePicker = class HelixHeadlessDatePicker extends MixinPickerF
|
|
|
41
42
|
this.previousLabel = 'Previous month';
|
|
42
43
|
this.previousYearLabel = 'Previous year';
|
|
43
44
|
this.previousYearsLabel = 'Earlier years';
|
|
45
|
+
this.rangeOverflowMessage = 'Choose a date on or before {max}.';
|
|
44
46
|
this.focused = '';
|
|
45
47
|
this.choosing = false;
|
|
46
48
|
this.handleKeydown = (event) => {
|
|
@@ -98,14 +100,19 @@ let HelixHeadlessDatePicker = class HelixHeadlessDatePicker extends MixinPickerF
|
|
|
98
100
|
this.zoom('year');
|
|
99
101
|
}
|
|
100
102
|
};
|
|
103
|
+
this.rangeUnderflowMessage = 'Choose a date on or after {min}.';
|
|
101
104
|
this.readOnly = false;
|
|
102
105
|
this.required = false;
|
|
103
106
|
this.step = 1;
|
|
107
|
+
this.stepMismatchMessage = 'Choose one of the dates the calendar offers.';
|
|
108
|
+
this.unavailableMessage = 'Choose a date that is available.';
|
|
109
|
+
this.valueMissingMessage = 'Choose a date.';
|
|
104
110
|
this.view = 'day';
|
|
105
111
|
this.yearViewLabel = '{heading}. Choose a year';
|
|
106
112
|
}
|
|
113
|
+
static { this.words = 'helix-date-picker'; }
|
|
107
114
|
get language() {
|
|
108
|
-
return
|
|
115
|
+
return wordsLocale(this);
|
|
109
116
|
}
|
|
110
117
|
get month() {
|
|
111
118
|
return this.monthState ?? (this.defaultMonth || fromDate(this.derivedMonth).slice(0, 7));
|
|
@@ -122,8 +129,7 @@ let HelixHeadlessDatePicker = class HelixHeadlessDatePicker extends MixinPickerF
|
|
|
122
129
|
if (this.firstDayOfWeek !== undefined && Number.isFinite(this.firstDayOfWeek)) {
|
|
123
130
|
return ((Math.floor(this.firstDayOfWeek) % 7) + 7) % 7;
|
|
124
131
|
}
|
|
125
|
-
|
|
126
|
-
return language === '' ? 0 : weekStartOf(language);
|
|
132
|
+
return handedLocale(this) === '' ? 0 : weekStartOf(this.language);
|
|
127
133
|
}
|
|
128
134
|
get range() {
|
|
129
135
|
const dates = this.selected;
|
|
@@ -363,17 +369,13 @@ let HelixHeadlessDatePicker = class HelixHeadlessDatePicker extends MixinPickerF
|
|
|
363
369
|
if (this.min !== '' && iso < this.min) {
|
|
364
370
|
return [
|
|
365
371
|
'rangeUnderflow',
|
|
366
|
-
|
|
367
|
-
min: this.spoken(this.min),
|
|
368
|
-
}),
|
|
372
|
+
formatWords(this, 'rangeUnderflowMessage', { min: this.spoken(this.min) }),
|
|
369
373
|
];
|
|
370
374
|
}
|
|
371
375
|
if (this.max !== '' && iso > this.max) {
|
|
372
376
|
return [
|
|
373
377
|
'rangeOverflow',
|
|
374
|
-
|
|
375
|
-
max: this.spoken(this.max),
|
|
376
|
-
}),
|
|
378
|
+
formatWords(this, 'rangeOverflowMessage', { max: this.spoken(this.max) }),
|
|
377
379
|
];
|
|
378
380
|
}
|
|
379
381
|
const date = asDate(iso);
|
|
@@ -382,21 +384,18 @@ let HelixHeadlessDatePicker = class HelixHeadlessDatePicker extends MixinPickerF
|
|
|
382
384
|
return undefined;
|
|
383
385
|
}
|
|
384
386
|
return why === 'listed'
|
|
385
|
-
? ['badInput', this.unavailableMessage
|
|
386
|
-
: ['stepMismatch', this.stepMismatchMessage
|
|
387
|
+
? ['badInput', this.unavailableMessage]
|
|
388
|
+
: ['stepMismatch', this.stepMismatchMessage];
|
|
387
389
|
}
|
|
388
390
|
reportRequired() {
|
|
389
391
|
const anchor = this.partNamed('grid') ?? undefined;
|
|
390
392
|
if (this.required && this.value === '') {
|
|
391
|
-
this.internals.setValidity({ valueMissing: true }, this.valueMissingMessage
|
|
393
|
+
this.internals.setValidity({ valueMissing: true }, this.valueMissingMessage, anchor);
|
|
392
394
|
return;
|
|
393
395
|
}
|
|
394
396
|
const held = this.selected;
|
|
395
397
|
if (held.length > 0 && held.some((one) => asDate(one) === null)) {
|
|
396
|
-
this.internals.setValidity({ badInput: true }, this
|
|
397
|
-
(this.mode === undefined
|
|
398
|
-
? 'Enter a date as YYYY-MM-DD.'
|
|
399
|
-
: 'Enter dates as YYYY-MM-DD, separated by commas.'), anchor);
|
|
398
|
+
this.internals.setValidity({ badInput: true }, formatWords(this, 'badInputMessage', { mode: this.mode ?? 'single' }), anchor);
|
|
400
399
|
return;
|
|
401
400
|
}
|
|
402
401
|
for (const one of held) {
|
|
@@ -414,7 +413,7 @@ let HelixHeadlessDatePicker = class HelixHeadlessDatePicker extends MixinPickerF
|
|
|
414
413
|
this.focused = '';
|
|
415
414
|
}
|
|
416
415
|
this.choosing = false;
|
|
417
|
-
const outside = this.label
|
|
416
|
+
const outside = this.hasAttribute('label') ? [] : [...(this.internals.labels ?? [])];
|
|
418
417
|
hostAria(this.internals, {
|
|
419
418
|
label: this.label,
|
|
420
419
|
labelledBy: outside,
|
|
@@ -438,19 +437,20 @@ let HelixHeadlessDatePicker = class HelixHeadlessDatePicker extends MixinPickerF
|
|
|
438
437
|
return Math.max(1, Math.floor(this.months) || 1);
|
|
439
438
|
}
|
|
440
439
|
get formats() {
|
|
441
|
-
const language = this.language;
|
|
440
|
+
const language = calendarLocale(this.language, this.calendar);
|
|
442
441
|
if (this.cachedFormats?.locale === language) {
|
|
443
442
|
return this.cachedFormats;
|
|
444
443
|
}
|
|
445
|
-
const
|
|
444
|
+
const utc = (options) => new Intl.DateTimeFormat(language || undefined, { ...options, timeZone: 'UTC' });
|
|
446
445
|
const built = {
|
|
447
|
-
full:
|
|
448
|
-
heading:
|
|
446
|
+
full: utc({ dateStyle: 'full' }),
|
|
447
|
+
heading: utc({ month: 'long', year: 'numeric' }),
|
|
449
448
|
locale: language,
|
|
450
|
-
long:
|
|
451
|
-
monthName:
|
|
452
|
-
|
|
453
|
-
|
|
449
|
+
long: utc({ dateStyle: 'long' }),
|
|
450
|
+
monthName: utc({ month: 'short' }),
|
|
451
|
+
monthYear: utc({ month: 'short', year: 'numeric' }),
|
|
452
|
+
weekday: utc({ weekday: 'short' }),
|
|
453
|
+
year: utc({ year: 'numeric' }),
|
|
454
454
|
};
|
|
455
455
|
this.cachedFormats = built;
|
|
456
456
|
return built;
|
|
@@ -470,7 +470,8 @@ let HelixHeadlessDatePicker = class HelixHeadlessDatePicker extends MixinPickerF
|
|
|
470
470
|
</slot>`;
|
|
471
471
|
}
|
|
472
472
|
renderMonth(month, index) {
|
|
473
|
-
const { full, heading, weekday } = this.formats;
|
|
473
|
+
const { full, heading: named, weekday } = this.formats;
|
|
474
|
+
const heading = named.format(month);
|
|
474
475
|
const weeks = this.weeksOf(month);
|
|
475
476
|
const anchor = fromDate(this.anchor);
|
|
476
477
|
const today = localToday();
|
|
@@ -492,7 +493,7 @@ let HelixHeadlessDatePicker = class HelixHeadlessDatePicker extends MixinPickerF
|
|
|
492
493
|
: nothing}
|
|
493
494
|
${''}
|
|
494
495
|
<span part="heading" aria-live="polite"
|
|
495
|
-
>${this.renderHeadingText(heading
|
|
496
|
+
>${this.renderHeadingText(heading, 'monthViewLabel')}</span
|
|
496
497
|
>
|
|
497
498
|
${last
|
|
498
499
|
? html `<button
|
|
@@ -509,7 +510,7 @@ let HelixHeadlessDatePicker = class HelixHeadlessDatePicker extends MixinPickerF
|
|
|
509
510
|
<div
|
|
510
511
|
part="grid"
|
|
511
512
|
role="grid"
|
|
512
|
-
aria-label=${heading
|
|
513
|
+
aria-label=${heading}
|
|
513
514
|
aria-readonly=${this.readOnly ? 'true' : nothing}
|
|
514
515
|
data-unset=${this.value === '' ? '' : nothing}
|
|
515
516
|
>
|
|
@@ -561,13 +562,13 @@ let HelixHeadlessDatePicker = class HelixHeadlessDatePicker extends MixinPickerF
|
|
|
561
562
|
return html `<button
|
|
562
563
|
part="heading-button"
|
|
563
564
|
type="button"
|
|
564
|
-
aria-label=${
|
|
565
|
+
aria-label=${formatWords(this, label, { heading: text })}
|
|
565
566
|
?disabled=${this.isDisabled}
|
|
566
567
|
@click=${this.handleHeading}
|
|
567
568
|
>${text}</button>`;
|
|
568
569
|
}
|
|
569
570
|
renderPeriods() {
|
|
570
|
-
const { monthName, year: yearName } = this.formats;
|
|
571
|
+
const { monthName, monthYear, year: yearName } = this.formats;
|
|
571
572
|
const years = this.view === 'year';
|
|
572
573
|
const page = years ? yearPageOf(this.periodYear) : this.periodYear;
|
|
573
574
|
const heading = years
|
|
@@ -588,7 +589,7 @@ let HelixHeadlessDatePicker = class HelixHeadlessDatePicker extends MixinPickerF
|
|
|
588
589
|
role="gridcell"
|
|
589
590
|
aria-current=${current ? 'date' : nothing}
|
|
590
591
|
aria-disabled=${out ? 'true' : nothing}
|
|
591
|
-
aria-label=${years ? words :
|
|
592
|
+
aria-label=${years ? words : monthYear.format(first)}
|
|
592
593
|
aria-selected=${chosen ? 'true' : nothing}
|
|
593
594
|
tabindex=${at === stop && !this.isDisabled ? '0' : '-1'}
|
|
594
595
|
@click=${() => this.choosePeriod(at)}
|
|
@@ -608,7 +609,7 @@ let HelixHeadlessDatePicker = class HelixHeadlessDatePicker extends MixinPickerF
|
|
|
608
609
|
${this.renderPreviousMark()}
|
|
609
610
|
</button>
|
|
610
611
|
<span part="heading" aria-live="polite"
|
|
611
|
-
>${this.renderHeadingText(heading,
|
|
612
|
+
>${this.renderHeadingText(heading, 'yearViewLabel')}</span
|
|
612
613
|
>
|
|
613
614
|
<button
|
|
614
615
|
part="next"
|
|
@@ -650,8 +651,12 @@ let HelixHeadlessDatePicker = class HelixHeadlessDatePicker extends MixinPickerF
|
|
|
650
651
|
}
|
|
651
652
|
};
|
|
652
653
|
__decorate([
|
|
654
|
+
words,
|
|
653
655
|
property({ attribute: 'bad-input-message' })
|
|
654
656
|
], HelixHeadlessDatePicker.prototype, "badInputMessage", void 0);
|
|
657
|
+
__decorate([
|
|
658
|
+
property()
|
|
659
|
+
], HelixHeadlessDatePicker.prototype, "calendar", void 0);
|
|
655
660
|
__decorate([
|
|
656
661
|
property({ attribute: false })
|
|
657
662
|
], HelixHeadlessDatePicker.prototype, "dayContent", void 0);
|
|
@@ -671,6 +676,7 @@ __decorate([
|
|
|
671
676
|
property({ attribute: false })
|
|
672
677
|
], HelixHeadlessDatePicker.prototype, "isDateUnavailable", void 0);
|
|
673
678
|
__decorate([
|
|
679
|
+
words,
|
|
674
680
|
property()
|
|
675
681
|
], HelixHeadlessDatePicker.prototype, "label", void 0);
|
|
676
682
|
__decorate([
|
|
@@ -695,27 +701,35 @@ __decorate([
|
|
|
695
701
|
property({ type: Number })
|
|
696
702
|
], HelixHeadlessDatePicker.prototype, "months", void 0);
|
|
697
703
|
__decorate([
|
|
704
|
+
words,
|
|
698
705
|
property({ attribute: 'month-view-label' })
|
|
699
706
|
], HelixHeadlessDatePicker.prototype, "monthViewLabel", void 0);
|
|
700
707
|
__decorate([
|
|
708
|
+
words,
|
|
701
709
|
property({ attribute: 'next-label' })
|
|
702
710
|
], HelixHeadlessDatePicker.prototype, "nextLabel", void 0);
|
|
703
711
|
__decorate([
|
|
712
|
+
words,
|
|
704
713
|
property({ attribute: 'next-year-label' })
|
|
705
714
|
], HelixHeadlessDatePicker.prototype, "nextYearLabel", void 0);
|
|
706
715
|
__decorate([
|
|
716
|
+
words,
|
|
707
717
|
property({ attribute: 'next-years-label' })
|
|
708
718
|
], HelixHeadlessDatePicker.prototype, "nextYearsLabel", void 0);
|
|
709
719
|
__decorate([
|
|
720
|
+
words,
|
|
710
721
|
property({ attribute: 'previous-label' })
|
|
711
722
|
], HelixHeadlessDatePicker.prototype, "previousLabel", void 0);
|
|
712
723
|
__decorate([
|
|
724
|
+
words,
|
|
713
725
|
property({ attribute: 'previous-year-label' })
|
|
714
726
|
], HelixHeadlessDatePicker.prototype, "previousYearLabel", void 0);
|
|
715
727
|
__decorate([
|
|
728
|
+
words,
|
|
716
729
|
property({ attribute: 'previous-years-label' })
|
|
717
730
|
], HelixHeadlessDatePicker.prototype, "previousYearsLabel", void 0);
|
|
718
731
|
__decorate([
|
|
732
|
+
words,
|
|
719
733
|
property({ attribute: 'range-overflow-message' })
|
|
720
734
|
], HelixHeadlessDatePicker.prototype, "rangeOverflowMessage", void 0);
|
|
721
735
|
__decorate([
|
|
@@ -728,6 +742,7 @@ __decorate([
|
|
|
728
742
|
state()
|
|
729
743
|
], HelixHeadlessDatePicker.prototype, "periodFocus", void 0);
|
|
730
744
|
__decorate([
|
|
745
|
+
words,
|
|
731
746
|
property({ attribute: 'range-underflow-message' })
|
|
732
747
|
], HelixHeadlessDatePicker.prototype, "rangeUnderflowMessage", void 0);
|
|
733
748
|
__decorate([
|
|
@@ -740,18 +755,22 @@ __decorate([
|
|
|
740
755
|
property({ type: Number })
|
|
741
756
|
], HelixHeadlessDatePicker.prototype, "step", void 0);
|
|
742
757
|
__decorate([
|
|
758
|
+
words,
|
|
743
759
|
property({ attribute: 'step-mismatch-message' })
|
|
744
760
|
], HelixHeadlessDatePicker.prototype, "stepMismatchMessage", void 0);
|
|
745
761
|
__decorate([
|
|
762
|
+
words,
|
|
746
763
|
property({ attribute: 'unavailable-message' })
|
|
747
764
|
], HelixHeadlessDatePicker.prototype, "unavailableMessage", void 0);
|
|
748
765
|
__decorate([
|
|
766
|
+
words,
|
|
749
767
|
property({ attribute: 'value-missing-message' })
|
|
750
768
|
], HelixHeadlessDatePicker.prototype, "valueMissingMessage", void 0);
|
|
751
769
|
__decorate([
|
|
752
770
|
property()
|
|
753
771
|
], HelixHeadlessDatePicker.prototype, "view", void 0);
|
|
754
772
|
__decorate([
|
|
773
|
+
words,
|
|
755
774
|
property({ attribute: 'year-view-label' })
|
|
756
775
|
], HelixHeadlessDatePicker.prototype, "yearViewLabel", void 0);
|
|
757
776
|
HelixHeadlessDatePicker = __decorate([
|
|
@@ -24,7 +24,8 @@ declare const HelixHeadlessDialog_base: (new (...args: any[]) => import("@fusion
|
|
|
24
24
|
* says it is open, which would leave it impossible to reopen.
|
|
25
25
|
*
|
|
26
26
|
* The dialog's name is `label` when you set it. Otherwise it is the heading in
|
|
27
|
-
* the `header` slot, or the elements an `aria-labelledby` on the host names
|
|
27
|
+
* the `header` slot, or the elements an `aria-labelledby` on the host names,
|
|
28
|
+
* and `fallback-label` where nothing names it.
|
|
28
29
|
* While it is open, the page behind it does not scroll.
|
|
29
30
|
*
|
|
30
31
|
* The dialog is described by the words at the start of its body: the elements
|
|
@@ -67,6 +68,11 @@ declare const HelixHeadlessDialog_base: (new (...args: any[]) => import("@fusion
|
|
|
67
68
|
* @cssstate open - While the dialog is open.
|
|
68
69
|
*/
|
|
69
70
|
export declare class HelixHeadlessDialog extends HelixHeadlessDialog_base {
|
|
71
|
+
/**
|
|
72
|
+
* The key this family's words are registered under, its styled tag:
|
|
73
|
+
* `registerWords('de', { 'helix-dialog': { dismissLabel: 'Schließen' } })`.
|
|
74
|
+
*/
|
|
75
|
+
static words: string;
|
|
70
76
|
/**
|
|
71
77
|
* Makes the dialog an alert dialog, for a message that interrupts to ask for
|
|
72
78
|
* an answer, such as a confirmation before something is deleted.
|
|
@@ -104,6 +110,11 @@ export declare class HelixHeadlessDialog extends HelixHeadlessDialog_base {
|
|
|
104
110
|
* interface.
|
|
105
111
|
*/
|
|
106
112
|
dismissLabel: string;
|
|
113
|
+
/**
|
|
114
|
+
* The dialog's name where nothing names it: no `label`, no heading in the
|
|
115
|
+
* `header` slot, and no `aria-labelledby` on the host.
|
|
116
|
+
*/
|
|
117
|
+
fallbackLabel: string;
|
|
107
118
|
/**
|
|
108
119
|
* Accessible name for the dialog. When it is empty, the heading in the
|
|
109
120
|
* `header` slot names the dialog.
|
|
@@ -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, auditName, CommandController, customElement, drawDismiss, drawDismissGlyph, FocusScopeController, HelixElement, headingsIn, hostAria, lockScroll, MixinControllerOpen, OpenPhaseController, reflectElements, unlockScroll, } from '@fusion.dev/helix-core';
|
|
7
|
+
import { AriaForwardController, auditName, CommandController, customElement, drawDismiss, drawDismissGlyph, FocusScopeController, HelixElement, headingsIn, hostAria, lockScroll, MixinControllerOpen, OpenPhaseController, reflectElements, unlockScroll, words, } from '@fusion.dev/helix-core';
|
|
8
8
|
import { html, nothing } from 'lit';
|
|
9
9
|
import { property } from 'lit/decorators.js';
|
|
10
10
|
import { wordsIn } from '../description.js';
|
|
@@ -14,6 +14,7 @@ let HelixHeadlessDialog = class HelixHeadlessDialog extends MixinControllerOpen(
|
|
|
14
14
|
this.alert = false;
|
|
15
15
|
this.dismissible = false;
|
|
16
16
|
this.dismissLabel = 'Close';
|
|
17
|
+
this.fallbackLabel = 'Dialog';
|
|
17
18
|
this.label = '';
|
|
18
19
|
this.phases = new OpenPhaseController(this, {
|
|
19
20
|
mark: {
|
|
@@ -90,6 +91,7 @@ let HelixHeadlessDialog = class HelixHeadlessDialog extends MixinControllerOpen(
|
|
|
90
91
|
this.requestOpen(false);
|
|
91
92
|
};
|
|
92
93
|
}
|
|
94
|
+
static { this.words = 'helix-dialog'; }
|
|
93
95
|
get returnValue() {
|
|
94
96
|
return this.dialog?.returnValue ?? this.returned;
|
|
95
97
|
}
|
|
@@ -124,8 +126,8 @@ let HelixHeadlessDialog = class HelixHeadlessDialog extends MixinControllerOpen(
|
|
|
124
126
|
}
|
|
125
127
|
describeByBody() {
|
|
126
128
|
const slot = this.renderRoot.querySelector('slot:not([name])');
|
|
127
|
-
const
|
|
128
|
-
this.describedByBody = reflectElements(this.dialog, 'ariaDescribedByElements',
|
|
129
|
+
const said = this.hasAttribute('aria-describedby') ? [] : wordsIn(slot);
|
|
130
|
+
this.describedByBody = reflectElements(this.dialog, 'ariaDescribedByElements', said, this.describedByBody);
|
|
129
131
|
}
|
|
130
132
|
willUpdate(changed) {
|
|
131
133
|
super.willUpdate(changed);
|
|
@@ -204,7 +206,7 @@ let HelixHeadlessDialog = class HelixHeadlessDialog extends MixinControllerOpen(
|
|
|
204
206
|
part="dialog"
|
|
205
207
|
role=${this.alert ? 'alertdialog' : nothing}
|
|
206
208
|
closedby=${this.closedBy ?? nothing}
|
|
207
|
-
aria-label=${this.label ||
|
|
209
|
+
aria-label=${this.label || this.fallbackLabel}
|
|
208
210
|
@cancel=${this.handleCancel}
|
|
209
211
|
@click=${this.handleBackdrop}
|
|
210
212
|
@close=${this.handleClose}
|
|
@@ -233,8 +235,13 @@ __decorate([
|
|
|
233
235
|
property({ reflect: true, type: Boolean })
|
|
234
236
|
], HelixHeadlessDialog.prototype, "dismissible", void 0);
|
|
235
237
|
__decorate([
|
|
238
|
+
words,
|
|
236
239
|
property({ attribute: 'dismiss-label' })
|
|
237
240
|
], HelixHeadlessDialog.prototype, "dismissLabel", void 0);
|
|
241
|
+
__decorate([
|
|
242
|
+
words,
|
|
243
|
+
property({ attribute: 'fallback-label' })
|
|
244
|
+
], HelixHeadlessDialog.prototype, "fallbackLabel", void 0);
|
|
238
245
|
__decorate([
|
|
239
246
|
property()
|
|
240
247
|
], HelixHeadlessDialog.prototype, "label", void 0);
|
|
@@ -72,6 +72,11 @@ declare const HelixHeadlessDonutChart_base: typeof HelixElement & (new (...args:
|
|
|
72
72
|
* @cssproperty --donut-chart-stroke - How thick the ring is drawn, derived from `hole`.
|
|
73
73
|
*/
|
|
74
74
|
export declare class HelixHeadlessDonutChart extends HelixHeadlessDonutChart_base {
|
|
75
|
+
/**
|
|
76
|
+
* The key this family's words are registered under, its styled tag:
|
|
77
|
+
* `registerWords('de', { 'helix-donut-chart': { positionLabel: '{position} von {count}' } })`.
|
|
78
|
+
*/
|
|
79
|
+
static words: string;
|
|
75
80
|
/**
|
|
76
81
|
* The pointer is not mapped across this one.
|
|
77
82
|
*
|
|
@@ -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 { CHART_PLOT, customElement, drawTooltip, HelixElement, MixinChartSource, PLOT_HEIGHT, PLOT_WIDTH, seriesIndex, } from '@fusion.dev/helix-core';
|
|
7
|
+
import { CHART_PLOT, customElement, drawTooltip, HelixElement, MixinChartSource, PLOT_HEIGHT, PLOT_WIDTH, seriesIndex, wordsLocale, } from '@fusion.dev/helix-core';
|
|
8
8
|
import { html, nothing, svg } from 'lit';
|
|
9
9
|
import { property } from 'lit/decorators.js';
|
|
10
10
|
import '../../tooltip/index.js';
|
|
@@ -35,6 +35,7 @@ let HelixHeadlessDonutChart = class HelixHeadlessDonutChart extends MixinChartSo
|
|
|
35
35
|
super(...arguments);
|
|
36
36
|
this.sliceLabels = false;
|
|
37
37
|
}
|
|
38
|
+
static { this.words = 'helix-donut-chart'; }
|
|
38
39
|
connectedCallback() {
|
|
39
40
|
super.connectedCallback();
|
|
40
41
|
this.pointer.axis = 'none';
|
|
@@ -84,11 +85,13 @@ let HelixHeadlessDonutChart = class HelixHeadlessDonutChart extends MixinChartSo
|
|
|
84
85
|
}
|
|
85
86
|
renderSummary(shares) {
|
|
86
87
|
const rows = this.sourceRows;
|
|
88
|
+
const locale = wordsLocale(this);
|
|
87
89
|
const parts = shares
|
|
88
90
|
.filter((share) => this.showsSeries(rows[share.row]?.label ?? ''))
|
|
89
|
-
.map((share) => `${rows[share.row]?.label ?? ''} ${percentIn(
|
|
91
|
+
.map((share) => `${rows[share.row]?.label ?? ''} ${percentIn(locale).format(share.fraction)}`);
|
|
90
92
|
const named = this.named ? `${this.named}: ` : '';
|
|
91
|
-
|
|
93
|
+
const listed = new Intl.ListFormat(locale, { style: 'short', type: 'unit' }).format(parts);
|
|
94
|
+
return html `<p id="helix-chart-summary" part="summary">${named}${listed}.</p>`;
|
|
92
95
|
}
|
|
93
96
|
renderPlot(shares) {
|
|
94
97
|
return html `<div
|
|
@@ -134,7 +137,7 @@ let HelixHeadlessDonutChart = class HelixHeadlessDonutChart extends MixinChartSo
|
|
|
134
137
|
top: half ? CENTER - EDGE : 0,
|
|
135
138
|
width: PLOT_WIDTH,
|
|
136
139
|
};
|
|
137
|
-
const format = percentIn(this
|
|
140
|
+
const format = percentIn(wordsLocale(this));
|
|
138
141
|
return html `${shares.map((share, index) => {
|
|
139
142
|
const place = sliceLabelAt(share, ring);
|
|
140
143
|
if (!place) {
|
|
@@ -221,7 +224,7 @@ let HelixHeadlessDonutChart = class HelixHeadlessDonutChart extends MixinChartSo
|
|
|
221
224
|
const cells = [...row.cells];
|
|
222
225
|
cells[column] = {
|
|
223
226
|
...cell,
|
|
224
|
-
text: `${cell.text} (${percentIn(this
|
|
227
|
+
text: `${cell.text} (${percentIn(wordsLocale(this)).format(share.fraction)})`,
|
|
225
228
|
};
|
|
226
229
|
return rows.map((one, index) => (index === share.row ? { ...row, cells } : one));
|
|
227
230
|
}
|
|
@@ -39,7 +39,8 @@ declare const HelixHeadlessDrawer_base: (new (...args: any[]) => import("@fusion
|
|
|
39
39
|
* `dismiss-label`, as `Dialog` draws one.
|
|
40
40
|
*
|
|
41
41
|
* The panel's name is `label` when you set it. Otherwise it is the heading in
|
|
42
|
-
* the `header` slot, or the elements an `aria-labelledby` on the host names
|
|
42
|
+
* the `header` slot, or the elements an `aria-labelledby` on the host names,
|
|
43
|
+
* and `fallback-label` where nothing names it.
|
|
43
44
|
*
|
|
44
45
|
* Content stays mounted when the drawer is closed, so it is in the server
|
|
45
46
|
* markup and can animate. A closed `<dialog>` is already out of the tab order
|
|
@@ -87,6 +88,11 @@ declare const HelixHeadlessDrawer_base: (new (...args: any[]) => import("@fusion
|
|
|
87
88
|
* @cssstate snapped - While the panel rests at a snap point that shows less than the whole panel.
|
|
88
89
|
*/
|
|
89
90
|
export declare class HelixHeadlessDrawer extends HelixHeadlessDrawer_base {
|
|
91
|
+
/**
|
|
92
|
+
* The key this family's words are registered under, its styled tag:
|
|
93
|
+
* `registerWords('de', { 'helix-drawer': { dismissLabel: 'Schließen' } })`.
|
|
94
|
+
*/
|
|
95
|
+
static words: string;
|
|
90
96
|
protected readonly commands: CommandController;
|
|
91
97
|
/**
|
|
92
98
|
* Which close requests the browser handles on its own.
|
|
@@ -113,6 +119,11 @@ export declare class HelixHeadlessDrawer extends HelixHeadlessDrawer_base {
|
|
|
113
119
|
* interface.
|
|
114
120
|
*/
|
|
115
121
|
dismissLabel: string;
|
|
122
|
+
/**
|
|
123
|
+
* The panel's name where nothing names it: no `label`, no heading in the
|
|
124
|
+
* `header` slot, and no `aria-labelledby` on the host.
|
|
125
|
+
*/
|
|
126
|
+
fallbackLabel: string;
|
|
116
127
|
/**
|
|
117
128
|
* Accessible name for the panel. When it is empty, the heading in the
|
|
118
129
|
* `header` slot names the panel.
|
|
@@ -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, CommandController, customElement, drawDismiss, drawDismissGlyph, edgeOffset, FocusScopeController, HelixElement, headingsIn, isRtl, lockScroll, MixinControllerOpen, nearest, OpenPhaseController, onUnlessFalse, parseSnapPoints, reflectElements, SwipeController, settleSwipe, snapTravel, swipeAxis, swipeEdge, towardEdge, unlockScroll, } from '@fusion.dev/helix-core';
|
|
7
|
+
import { AriaForwardController, CommandController, customElement, drawDismiss, drawDismissGlyph, edgeOffset, FocusScopeController, HelixElement, headingsIn, isRtl, lockScroll, MixinControllerOpen, nearest, OpenPhaseController, onUnlessFalse, parseSnapPoints, reflectElements, SwipeController, settleSwipe, snapTravel, swipeAxis, swipeEdge, towardEdge, unlockScroll, words, } from '@fusion.dev/helix-core';
|
|
8
8
|
import { html, nothing } from 'lit';
|
|
9
9
|
import { property } from 'lit/decorators.js';
|
|
10
10
|
import { beyondWindow } from '../reveal.js';
|
|
@@ -21,6 +21,7 @@ let HelixHeadlessDrawer = class HelixHeadlessDrawer extends MixinControllerOpen(
|
|
|
21
21
|
});
|
|
22
22
|
this.dismissible = false;
|
|
23
23
|
this.dismissLabel = 'Close';
|
|
24
|
+
this.fallbackLabel = 'Drawer';
|
|
24
25
|
this.label = '';
|
|
25
26
|
this.aria = new AriaForwardController(this, { target: () => this.panel });
|
|
26
27
|
this.modal = true;
|
|
@@ -100,6 +101,7 @@ let HelixHeadlessDrawer = class HelixHeadlessDrawer extends MixinControllerOpen(
|
|
|
100
101
|
};
|
|
101
102
|
this.namedByHeader = false;
|
|
102
103
|
}
|
|
104
|
+
static { this.words = 'helix-drawer'; }
|
|
103
105
|
get returnValue() {
|
|
104
106
|
return this.panel?.returnValue ?? this.returned;
|
|
105
107
|
}
|
|
@@ -236,7 +238,7 @@ let HelixHeadlessDrawer = class HelixHeadlessDrawer extends MixinControllerOpen(
|
|
|
236
238
|
return html `<dialog
|
|
237
239
|
part="panel"
|
|
238
240
|
closedby=${closedBy ?? nothing}
|
|
239
|
-
aria-label=${this.label ||
|
|
241
|
+
aria-label=${this.label || this.fallbackLabel}
|
|
240
242
|
@cancel=${this.handleCancel}
|
|
241
243
|
@click=${this.handleBackdrop}
|
|
242
244
|
@close=${this.handleClose}
|
|
@@ -267,8 +269,13 @@ __decorate([
|
|
|
267
269
|
property({ reflect: true, type: Boolean })
|
|
268
270
|
], HelixHeadlessDrawer.prototype, "dismissible", void 0);
|
|
269
271
|
__decorate([
|
|
272
|
+
words,
|
|
270
273
|
property({ attribute: 'dismiss-label' })
|
|
271
274
|
], HelixHeadlessDrawer.prototype, "dismissLabel", void 0);
|
|
275
|
+
__decorate([
|
|
276
|
+
words,
|
|
277
|
+
property({ attribute: 'fallback-label' })
|
|
278
|
+
], HelixHeadlessDrawer.prototype, "fallbackLabel", void 0);
|
|
272
279
|
__decorate([
|
|
273
280
|
property()
|
|
274
281
|
], HelixHeadlessDrawer.prototype, "label", void 0);
|
|
@@ -62,6 +62,11 @@ declare const HelixHeadlessDrilldown_base: (new (...args: any[]) => import("@fus
|
|
|
62
62
|
* @cssstate forward - The last move went into a page.
|
|
63
63
|
*/
|
|
64
64
|
export declare class HelixHeadlessDrilldown extends HelixHeadlessDrilldown_base {
|
|
65
|
+
/**
|
|
66
|
+
* The key this family's words are registered under, its styled tag:
|
|
67
|
+
* `registerWords('de', { 'helix-drilldown': { backLabel: 'Zurück' } })`.
|
|
68
|
+
*/
|
|
69
|
+
static words: string;
|
|
65
70
|
/**
|
|
66
71
|
* The name of the top page's menu, read by screen readers. A page below it is
|
|
67
72
|
* named by its title.
|
|
@@ -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, DrilldownController, HelixElement, inlineStep, KeyboardNavigationController, keyClaimed, MixinCollection, slottedWords, typeaheadByWords, } from '@fusion.dev/helix-core';
|
|
7
|
+
import { AriaForwardController, customElement, DrilldownController, HelixElement, inlineStep, KeyboardNavigationController, keyClaimed, MixinCollection, slottedWords, typeaheadByWords, 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, state } from 'lit/decorators.js';
|
|
@@ -85,6 +85,7 @@ let HelixHeadlessDrilldown = class HelixHeadlessDrilldown extends MixinCollectio
|
|
|
85
85
|
}
|
|
86
86
|
};
|
|
87
87
|
}
|
|
88
|
+
static { this.words = 'helix-drilldown'; }
|
|
88
89
|
get items() {
|
|
89
90
|
return this.drilldown.rows;
|
|
90
91
|
}
|
|
@@ -198,9 +199,11 @@ let HelixHeadlessDrilldown = class HelixHeadlessDrilldown extends MixinCollectio
|
|
|
198
199
|
}
|
|
199
200
|
};
|
|
200
201
|
__decorate([
|
|
202
|
+
words,
|
|
201
203
|
property()
|
|
202
204
|
], HelixHeadlessDrilldown.prototype, "label", void 0);
|
|
203
205
|
__decorate([
|
|
206
|
+
words,
|
|
204
207
|
property({ attribute: 'back-label' })
|
|
205
208
|
], HelixHeadlessDrilldown.prototype, "backLabel", void 0);
|
|
206
209
|
__decorate([
|
|
@@ -66,6 +66,7 @@ registerElementEvents({
|
|
|
66
66
|
'helix-headless-copy-button': ['helix-copy', 'helix-copy-error', 'helix-press'],
|
|
67
67
|
'helix-headless-data-table': [
|
|
68
68
|
'helix-activate',
|
|
69
|
+
'helix-before-reorder',
|
|
69
70
|
'helix-expand',
|
|
70
71
|
'helix-filter',
|
|
71
72
|
'helix-filtered',
|
|
@@ -131,13 +132,21 @@ registerElementEvents({
|
|
|
131
132
|
'helix-before-open',
|
|
132
133
|
'toggle',
|
|
133
134
|
],
|
|
134
|
-
'helix-headless-list': [
|
|
135
|
+
'helix-headless-list': [
|
|
136
|
+
'change',
|
|
137
|
+
'helix-action',
|
|
138
|
+
'helix-before-change',
|
|
139
|
+
'helix-before-reorder',
|
|
140
|
+
'helix-reorder',
|
|
141
|
+
],
|
|
135
142
|
'helix-headless-list-item': ['helix-action'],
|
|
136
143
|
'helix-headless-listbox': [
|
|
137
144
|
'change',
|
|
138
145
|
'helix-before-change',
|
|
146
|
+
'helix-before-reorder',
|
|
139
147
|
'helix-filter',
|
|
140
148
|
'helix-load-more',
|
|
149
|
+
'helix-reorder',
|
|
141
150
|
'input',
|
|
142
151
|
],
|
|
143
152
|
'helix-headless-map': [
|
|
@@ -229,7 +238,14 @@ registerElementEvents({
|
|
|
229
238
|
'helix-headless-steps': ['helix-activate', 'helix-before-activate', 'helix-select'],
|
|
230
239
|
'helix-headless-switch': ['change', 'helix-before-toggle', 'input'],
|
|
231
240
|
'helix-headless-tab': ['helix-select'],
|
|
232
|
-
'helix-headless-table': [
|
|
241
|
+
'helix-headless-table': [
|
|
242
|
+
'helix-before-reorder',
|
|
243
|
+
'helix-reorder',
|
|
244
|
+
'helix-select',
|
|
245
|
+
'helix-selected',
|
|
246
|
+
'helix-sort',
|
|
247
|
+
'helix-sorted',
|
|
248
|
+
],
|
|
233
249
|
'helix-headless-table-column': ['helix-before-resize', 'helix-resized'],
|
|
234
250
|
'helix-headless-tabs': ['helix-activate', 'helix-before-activate', 'helix-select'],
|
|
235
251
|
'helix-headless-tag': ['helix-dismiss'],
|
|
@@ -260,7 +276,13 @@ registerElementEvents({
|
|
|
260
276
|
'toggle',
|
|
261
277
|
],
|
|
262
278
|
'helix-headless-tour-stop': ['helix-tour-ask'],
|
|
263
|
-
'helix-headless-tree': [
|
|
279
|
+
'helix-headless-tree': [
|
|
280
|
+
'helix-activate',
|
|
281
|
+
'helix-before-activate',
|
|
282
|
+
'helix-before-reorder',
|
|
283
|
+
'helix-reorder',
|
|
284
|
+
'helix-select',
|
|
285
|
+
],
|
|
264
286
|
'helix-headless-tree-item': [
|
|
265
287
|
'helix-before-close',
|
|
266
288
|
'helix-before-open',
|