@fusion.dev/helix-headless 0.145.0 → 0.147.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 +12286 -4281
- package/dist/accordion/item/accordion-item.d.ts +51 -18
- package/dist/accordion/item/accordion-item.js +45 -13
- package/dist/accordion/root/accordion-root.d.ts +16 -7
- package/dist/accordion/root/accordion-root.js +3 -3
- package/dist/announcement/root/announcement-root.d.ts +16 -6
- package/dist/announcement/root/announcement-root.js +37 -7
- package/dist/app-header/root/app-header-root.d.ts +7 -2
- package/dist/app-header/root/app-header-root.js +9 -1
- package/dist/app-header/sectioning.d.ts +3 -1
- package/dist/app-header/sectioning.js +3 -2
- package/dist/area-chart/root/area-chart-root.d.ts +18 -1
- package/dist/area-chart/root/area-chart-root.js +11 -3
- package/dist/avatar/group/avatar-group.d.ts +20 -14
- package/dist/avatar/group/avatar-group.js +17 -19
- package/dist/avatar/root/avatar-root.d.ts +31 -1
- package/dist/avatar/root/avatar-root.js +11 -1
- package/dist/badge/root/badge-root.d.ts +60 -7
- package/dist/badge/root/badge-root.js +89 -6
- package/dist/bar-chart/root/bar-chart-root.d.ts +18 -1
- package/dist/bar-chart/root/bar-chart-root.js +48 -20
- package/dist/bar-chart/stack.d.ts +25 -0
- package/dist/bar-chart/stack.js +27 -0
- package/dist/breadcrumbs/breadcrumb/breadcrumb.d.ts +14 -0
- package/dist/breadcrumbs/breadcrumb/breadcrumb.js +12 -2
- package/dist/breadcrumbs/root/breadcrumbs-root.d.ts +25 -0
- package/dist/breadcrumbs/root/breadcrumbs-root.js +51 -4
- package/dist/button/root/button-root.d.ts +50 -38
- package/dist/button/root/button-root.js +42 -53
- package/dist/button/submitter.d.ts +27 -0
- package/dist/button/submitter.js +25 -0
- package/dist/button-group/root/button-group-root.d.ts +2 -1
- package/dist/button-group/root/button-group-root.js +5 -1
- package/dist/canvas/node/canvas-node.d.ts +4 -3
- package/dist/canvas/node/canvas-node.js +3 -2
- package/dist/canvas/root/canvas-root.js +2 -2
- package/dist/card/root/card-root.d.ts +36 -4
- package/dist/card/root/card-root.js +29 -10
- package/dist/carousel/root/carousel-root.d.ts +43 -4
- package/dist/carousel/root/carousel-root.js +40 -12
- package/dist/carousel/stops.d.ts +20 -0
- package/dist/carousel/stops.js +30 -0
- package/dist/chat/message/chat-message.js +5 -4
- package/dist/chat/naming.d.ts +5 -1
- package/dist/chat/naming.js +4 -2
- package/dist/chat/root/chat-root.d.ts +40 -4
- package/dist/chat/root/chat-root.js +32 -6
- package/dist/checkbox/root/checkbox-root.d.ts +20 -0
- package/dist/checkbox/root/checkbox-root.js +18 -7
- package/dist/checkbox-group/root/checkbox-group-root.d.ts +8 -2
- package/dist/checkbox-group/root/checkbox-group-root.js +14 -11
- package/dist/checkbox-group/select-all.d.ts +21 -0
- package/dist/checkbox-group/select-all.js +7 -0
- package/dist/code-block/highlight.d.ts +15 -0
- package/dist/code-block/highlight.js +4 -0
- package/dist/code-block/root/code-block-root.d.ts +79 -10
- package/dist/code-block/root/code-block-root.js +74 -5
- package/dist/color-input/root/color-input-root.d.ts +14 -0
- package/dist/color-input/root/color-input-root.js +17 -7
- package/dist/color-picker/channels.js +1 -2
- package/dist/color-picker/root/color-picker-root.d.ts +53 -16
- package/dist/color-picker/root/color-picker-root.js +155 -46
- package/dist/color-picker/wheel.d.ts +17 -0
- package/dist/color-picker/wheel.js +6 -0
- package/dist/combobox/root/combobox-root.d.ts +56 -0
- package/dist/combobox/root/combobox-root.js +92 -15
- package/dist/command/root/command-root.d.ts +19 -2
- package/dist/command/root/command-root.js +24 -23
- package/dist/copy-button/root/copy-button-root.d.ts +21 -1
- package/dist/copy-button/root/copy-button-root.js +16 -4
- package/dist/data-table/index.d.ts +1 -1
- package/dist/data-table/index.js +1 -1
- package/dist/data-table/keys.d.ts +6 -0
- package/dist/data-table/keys.js +14 -0
- package/dist/data-table/root/data-table-root.d.ts +27 -18
- package/dist/data-table/root/data-table-root.js +31 -57
- package/dist/data-table/tree.d.ts +16 -1
- package/dist/data-table/tree.js +2 -3
- package/dist/date-input/root/date-input-root.d.ts +11 -2
- package/dist/date-input/root/date-input-root.js +26 -12
- package/dist/date-picker/root/date-picker-root.d.ts +14 -9
- package/dist/date-picker/root/date-picker-root.js +33 -22
- package/dist/description-list/item/description-list-item.d.ts +18 -4
- package/dist/description-list/item/description-list-item.js +8 -4
- package/dist/dialog/description.js +15 -1
- package/dist/dialog/root/dialog-root.d.ts +8 -2
- package/dist/dialog/root/dialog-root.js +16 -1
- package/dist/divider/root/divider-root.d.ts +3 -0
- package/dist/divider/root/divider-root.js +2 -1
- package/dist/donut-chart/root/donut-chart-root.d.ts +31 -0
- package/dist/donut-chart/root/donut-chart-root.js +55 -1
- package/dist/donut-chart/slice-label.d.ts +35 -0
- package/dist/donut-chart/slice-label.js +11 -0
- package/dist/drawer/reveal.d.ts +8 -0
- package/dist/drawer/reveal.js +1 -0
- package/dist/drawer/root/drawer-root.d.ts +63 -2
- package/dist/drawer/root/drawer-root.js +75 -4
- package/dist/drilldown/item/drilldown-item.d.ts +21 -1
- package/dist/drilldown/item/drilldown-item.js +40 -5
- package/dist/drilldown/root/drilldown-root.d.ts +21 -3
- package/dist/drilldown/root/drilldown-root.js +22 -3
- package/dist/element-events.generated.js +35 -6
- package/dist/empty/root/empty-root.d.ts +34 -2
- package/dist/empty/root/empty-root.js +26 -4
- package/dist/file-input/root/file-input-root.d.ts +99 -8
- package/dist/file-input/root/file-input-root.js +120 -22
- package/dist/file-input/screen.d.ts +2 -1
- package/dist/file-input/status.d.ts +24 -0
- package/dist/file-input/status.js +10 -0
- package/dist/filter-input/chip/filter-chip.d.ts +23 -0
- package/dist/filter-input/chip/filter-chip.js +11 -2
- package/dist/filter-input/menu/filter-menu.d.ts +2 -0
- package/dist/filter-input/menu/filter-menu.js +12 -4
- package/dist/filter-input/root/filter-input-root.d.ts +38 -6
- package/dist/filter-input/root/filter-input-root.js +18 -28
- package/dist/filter-input/suggest.d.ts +28 -3
- package/dist/filter-input/suggest.js +18 -8
- package/dist/format-date/options.d.ts +3 -4
- package/dist/format-date/options.js +2 -2
- package/dist/format-date/root/format-date-root.d.ts +27 -17
- package/dist/format-date/root/format-date-root.js +27 -48
- package/dist/heatmap/root/buckets.d.ts +21 -0
- package/dist/heatmap/root/buckets.js +34 -0
- package/dist/heatmap/root/heatmap-root.d.ts +83 -11
- package/dist/heatmap/root/heatmap-root.js +104 -12
- package/dist/icon/index.d.ts +1 -1
- package/dist/icon/index.js +1 -1
- package/dist/icon/registry.d.ts +26 -1
- package/dist/icon/registry.js +12 -1
- package/dist/icon/root/icon-root.d.ts +25 -1
- package/dist/icon/root/icon-root.js +44 -12
- package/dist/icon/root/index.d.ts +1 -1
- package/dist/icon/root/index.js +1 -1
- package/dist/icon/settle.d.ts +7 -0
- package/dist/icon/settle.js +10 -0
- package/dist/icon-button/root/icon-button-root.d.ts +2 -0
- package/dist/image/root/image-root.d.ts +14 -1
- package/dist/image/root/image-root.js +7 -2
- package/dist/input/root/input-root.d.ts +34 -3
- package/dist/input/root/input-root.js +17 -4
- package/dist/kbd/keys.d.ts +29 -0
- package/dist/kbd/keys.js +52 -0
- package/dist/kbd/root/kbd-root.d.ts +52 -1
- package/dist/kbd/root/kbd-root.js +40 -47
- package/dist/legend/hidden-series.d.ts +10 -2
- package/dist/legend/hidden-series.js +5 -2
- package/dist/legend/root/legend-root.d.ts +77 -12
- package/dist/legend/root/legend-root.js +71 -17
- package/dist/lightbox/root/lightbox-root.d.ts +98 -10
- package/dist/lightbox/root/lightbox-root.js +153 -18
- package/dist/lightbox/zoom-controller.d.ts +59 -0
- package/dist/lightbox/zoom-controller.js +128 -0
- package/dist/lightbox/zoom.d.ts +24 -0
- package/dist/lightbox/zoom.js +18 -0
- package/dist/line-chart/root/line-chart-root.d.ts +38 -1
- package/dist/line-chart/root/line-chart-root.js +31 -3
- package/dist/list/item/list-item.d.ts +2 -0
- package/dist/list/item/list-item.js +11 -2
- package/dist/list/root/list-root.d.ts +70 -13
- package/dist/list/root/list-root.js +91 -13
- package/dist/list/selection.d.ts +54 -7
- package/dist/list/selection.js +32 -7
- package/dist/listbox/root/listbox-root.d.ts +44 -4
- package/dist/listbox/root/listbox-root.js +72 -34
- package/dist/loader/busy.d.ts +10 -0
- package/dist/loader/busy.js +11 -0
- package/dist/loader/root/loader-root.d.ts +9 -2
- package/dist/loader/root/loader-root.js +23 -3
- package/dist/megamenu/hand-over.d.ts +75 -0
- package/dist/megamenu/hand-over.js +67 -0
- package/dist/megamenu/root/megamenu-root.d.ts +80 -15
- package/dist/megamenu/root/megamenu-root.js +76 -19
- package/dist/menu/item/menu-item.d.ts +51 -2
- package/dist/menu/item/menu-item.js +50 -26
- package/dist/menu/root/menu-root.d.ts +17 -0
- package/dist/menu/root/menu-root.js +2 -2
- package/dist/meter/root/meter-root.d.ts +62 -1
- package/dist/meter/root/meter-root.js +38 -16
- package/dist/navigation/root/navigation-root.d.ts +2 -1
- package/dist/navigation/root/navigation-root.js +2 -2
- package/dist/notifications/root/notifications-root.d.ts +20 -4
- package/dist/notifications/root/notifications-root.js +30 -8
- package/dist/number-input/grain.d.ts +28 -0
- package/dist/number-input/grain.js +14 -0
- package/dist/number-input/root/number-input-root.d.ts +34 -9
- package/dist/number-input/root/number-input-root.js +31 -25
- package/dist/object-inspector/root/object-inspector-root.d.ts +88 -33
- package/dist/object-inspector/root/object-inspector-root.js +134 -92
- package/dist/object-inspector/rows.d.ts +18 -0
- package/dist/object-inspector/rows.js +33 -0
- package/dist/option/index.d.ts +1 -0
- package/dist/option/index.js +1 -0
- package/dist/option/root/option-root.d.ts +5 -3
- package/dist/option/separator/option-separator.d.ts +30 -0
- package/dist/option/separator/option-separator.js +21 -0
- package/dist/outline/root/outline-root.d.ts +30 -0
- package/dist/outline/root/outline-root.js +17 -13
- package/dist/pagination/size/pagination-size.d.ts +6 -0
- package/dist/pagination/size/pagination-size.js +5 -3
- package/dist/pin-input/code.d.ts +37 -0
- package/dist/pin-input/code.js +25 -0
- package/dist/pin-input/root/pin-input-root.d.ts +116 -115
- package/dist/pin-input/root/pin-input-root.js +163 -155
- package/dist/popover/hide-outside.d.ts +14 -0
- package/dist/popover/hide-outside.js +34 -0
- package/dist/popover/root/popover-root.d.ts +64 -8
- package/dist/popover/root/popover-root.js +67 -4
- package/dist/progress/root/progress-root.d.ts +47 -0
- package/dist/progress/root/progress-root.js +34 -16
- package/dist/qr-code/export.d.ts +45 -1
- package/dist/qr-code/export.js +28 -0
- package/dist/qr-code/name.d.ts +11 -0
- package/dist/qr-code/name.js +7 -0
- package/dist/qr-code/root/qr-code-root.d.ts +36 -11
- package/dist/qr-code/root/qr-code-root.js +58 -11
- package/dist/quote/marks.d.ts +8 -0
- package/dist/quote/marks.js +5 -0
- package/dist/quote/root/quote-root.d.ts +14 -2
- package/dist/quote/root/quote-root.js +23 -1
- package/dist/radio/group/radio-group.d.ts +15 -0
- package/dist/radio/root/radio-root.d.ts +6 -2
- package/dist/radio/root/radio-root.js +7 -2
- package/dist/rating/root/rating-root.d.ts +30 -12
- package/dist/rating/root/rating-root.js +27 -27
- package/dist/scatter-chart/fit.d.ts +15 -0
- package/dist/scatter-chart/fit.js +35 -0
- package/dist/scatter-chart/root/scatter-chart-root.d.ts +51 -1
- package/dist/scatter-chart/root/scatter-chart-root.js +64 -24
- package/dist/scroll-area/root/scroll-area-root.d.ts +22 -51
- package/dist/scroll-area/root/scroll-area-root.js +57 -173
- package/dist/scroll-area/scrollbar-controller.d.ts +111 -0
- package/dist/scroll-area/scrollbar-controller.js +172 -0
- package/dist/scroll-area/scrollbar.d.ts +27 -8
- package/dist/scroll-area/scrollbar.js +10 -1
- package/dist/select/align.d.ts +47 -0
- package/dist/select/align.js +7 -0
- package/dist/select/root/select-root.d.ts +71 -0
- package/dist/select/root/select-root.js +78 -6
- package/dist/skeleton/root/skeleton-root.d.ts +3 -0
- package/dist/skeleton/root/skeleton-root.js +4 -2
- package/dist/skip-link/root/skip-link-root.js +2 -2
- package/dist/slider/root/slider-root.d.ts +59 -5
- package/dist/slider/root/slider-root.js +45 -3
- package/dist/sparkline/readings.d.ts +36 -0
- package/dist/sparkline/readings.js +36 -0
- package/dist/sparkline/root/sparkline-root.d.ts +121 -7
- package/dist/sparkline/root/sparkline-root.js +160 -26
- package/dist/speed-dial/item/speed-dial-item.d.ts +1 -1
- package/dist/speed-dial/item/speed-dial-item.js +2 -2
- package/dist/speed-dial/root/speed-dial-root.d.ts +6 -0
- package/dist/speed-dial/root/speed-dial-root.js +11 -3
- package/dist/splitter/root/splitter-root.d.ts +10 -12
- package/dist/splitter/root/splitter-root.js +211 -204
- package/dist/stat/root/stat-root.d.ts +14 -5
- package/dist/stat/root/stat-root.js +21 -5
- package/dist/steps/reach.d.ts +5 -0
- package/dist/steps/reach.js +3 -0
- package/dist/steps/root/steps-root.d.ts +56 -3
- package/dist/steps/root/steps-root.js +50 -6
- package/dist/steps/step/step.d.ts +8 -0
- package/dist/steps/step/step.js +8 -3
- package/dist/switch/root/switch-root.d.ts +10 -0
- package/dist/table/column/table-column.d.ts +6 -10
- package/dist/table/column/table-column.js +8 -20
- package/dist/table/root/table-root.d.ts +31 -10
- package/dist/table/root/table-root.js +14 -18
- package/dist/table/row/table-row.d.ts +24 -0
- package/dist/table/row/table-row.js +37 -1
- package/dist/tabs/panel/tab-panel.d.ts +16 -3
- package/dist/tabs/panel/tab-panel.js +34 -5
- package/dist/tabs/root/tabs-root.d.ts +17 -3
- package/dist/tabs/root/tabs-root.js +1 -1
- package/dist/tabs/tab/tab.d.ts +5 -0
- package/dist/tabs/tab/tab.js +5 -2
- package/dist/tag/group/tag-group.d.ts +44 -5
- package/dist/tag/group/tag-group.js +60 -9
- package/dist/tag/root/tag-root.js +9 -2
- package/dist/textarea/root/textarea-root.d.ts +41 -2
- package/dist/textarea/root/textarea-root.js +39 -1
- package/dist/time-input/root/time-input-root.d.ts +10 -2
- package/dist/time-input/root/time-input-root.js +24 -13
- package/dist/time-picker/root/time-picker-root.d.ts +28 -17
- package/dist/time-picker/root/time-picker-root.js +18 -29
- package/dist/time-picker/wheel-name.d.ts +9 -0
- package/dist/time-picker/wheel-name.js +15 -0
- package/dist/timeline/group/timeline-group.js +2 -2
- package/dist/toast/item/toast-item.d.ts +16 -3
- package/dist/toast/item/toast-item.js +22 -6
- package/dist/toast/root/toast-root.d.ts +34 -4
- package/dist/toast/root/toast-root.js +74 -13
- package/dist/toast/words.d.ts +12 -0
- package/dist/toast/words.js +25 -0
- package/dist/toggle/group/toggle-group.d.ts +52 -7
- package/dist/toggle/group/toggle-group.js +58 -44
- package/dist/toggle/root/toggle-root.js +2 -4
- package/dist/toolbar/root/toolbar-root.d.ts +21 -5
- package/dist/toolbar/root/toolbar-root.js +52 -8
- package/dist/tooltip/root/tooltip-root.d.ts +20 -3
- package/dist/tooltip/root/tooltip-root.js +18 -1
- package/dist/tour/back.d.ts +10 -0
- package/dist/tour/back.js +8 -0
- package/dist/tour/root/tour-root.d.ts +45 -2
- package/dist/tour/root/tour-root.js +53 -8
- package/dist/tour/stop/tour-stop.d.ts +3 -0
- package/dist/tour/stop/tour-stop.js +3 -3
- package/dist/tree/item/tree-item.d.ts +7 -3
- package/dist/tree/item/tree-item.js +3 -0
- package/dist/tree/root/tree-root.d.ts +24 -3
- package/dist/tree/root/tree-root.js +32 -13
- package/dist/tree/selection.js +2 -15
- package/dist/trend/figure.d.ts +16 -0
- package/dist/trend/figure.js +8 -0
- package/dist/trend/root/trend-root.d.ts +83 -19
- package/dist/trend/root/trend-root.js +59 -8
- package/dist/video/media-events.d.ts +13 -18
- package/dist/video/media-events.js +1 -5
- package/dist/video/root/extra-controls.d.ts +12 -0
- package/dist/video/root/extra-controls.js +6 -2
- package/dist/video/root/video-root.d.ts +23 -6
- package/dist/video/root/video-root.js +19 -10
- package/dist/video-playlist/menu/video-playlist-menu.d.ts +2 -0
- package/dist/video-playlist/menu/video-playlist-menu.js +2 -1
- package/dist/video-playlist/root/video-playlist-root.d.ts +17 -1
- package/dist/video-playlist/root/video-playlist-root.js +3 -0
- package/dist/virtual-list/fill.d.ts +11 -8
- package/dist/virtual-list/fill.js +10 -17
- package/dist/virtual-list/keys.d.ts +16 -7
- package/dist/virtual-list/keys.js +17 -6
- package/dist/virtual-list/plan.d.ts +65 -0
- package/dist/virtual-list/plan.js +27 -0
- package/dist/virtual-list/root/virtual-list-root.d.ts +136 -13
- package/dist/virtual-list/root/virtual-list-root.js +218 -51
- package/lint.json +1 -1
- package/package.json +8 -8
- package/types/jsx.d.ts +7441 -1458
- package/types/svelte.d.ts +1 -0
- package/types/vue.d.ts +1501 -326
- package/dist/chat/relative-clock.d.ts +0 -39
- package/dist/chat/relative-clock.js +0 -31
- package/dist/data-table/root/order.d.ts +0 -141
- package/dist/data-table/root/order.js +0 -76
- package/dist/tag/selection.d.ts +0 -10
- package/dist/tag/selection.js +0 -12
|
@@ -4,9 +4,10 @@ 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, drawStatus, elementById, HelixFallbackCommandEvent, HelixFormElement, StatusController, supportsInvokers, } from '@fusion.dev/helix-core';
|
|
7
|
+
import { AriaForwardController, customElement, defaultButton, drawStatus, elementById, HelixFallbackCommandEvent, HelixFormElement, HelixPressEvent, pressType, StatusController, submitsOnEnter, supportsInvokers, } from '@fusion.dev/helix-core';
|
|
8
8
|
import { html, nothing } from 'lit';
|
|
9
9
|
import { property } from 'lit/decorators.js';
|
|
10
|
+
import { submitAs } from '../submitter.js';
|
|
10
11
|
let HelixHeadlessButton = class HelixHeadlessButton extends HelixFormElement {
|
|
11
12
|
constructor() {
|
|
12
13
|
super(...arguments);
|
|
@@ -27,27 +28,23 @@ let HelixHeadlessButton = class HelixHeadlessButton extends HelixFormElement {
|
|
|
27
28
|
this.pending = false;
|
|
28
29
|
this.pendingLabel = 'Loading';
|
|
29
30
|
this.status = new StatusController(this);
|
|
31
|
+
this.recent = {};
|
|
32
|
+
this.notePress = (event) => {
|
|
33
|
+
if (event.type === 'pointerdown') {
|
|
34
|
+
this.recent = { pointer: event.pointerType };
|
|
35
|
+
}
|
|
36
|
+
else if (event.key === 'Enter' || event.key === ' ') {
|
|
37
|
+
this.recent = { key: true };
|
|
38
|
+
}
|
|
39
|
+
};
|
|
30
40
|
this.handleClick = (event) => {
|
|
31
41
|
if (this.pending) {
|
|
32
42
|
event.preventDefault();
|
|
33
43
|
event.stopImmediatePropagation();
|
|
34
44
|
return;
|
|
35
45
|
}
|
|
36
|
-
this.
|
|
37
|
-
this.
|
|
38
|
-
if (this.type === 'button') {
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
|
-
const { form } = this;
|
|
42
|
-
if (!form) {
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
if (this.type === 'submit') {
|
|
46
|
-
this.submit(form);
|
|
47
|
-
}
|
|
48
|
-
else {
|
|
49
|
-
form.reset();
|
|
50
|
-
}
|
|
46
|
+
this.act();
|
|
47
|
+
this.announcePress(event);
|
|
51
48
|
};
|
|
52
49
|
this.type = 'button';
|
|
53
50
|
this.value = '';
|
|
@@ -57,8 +54,8 @@ let HelixHeadlessButton = class HelixHeadlessButton extends HelixFormElement {
|
|
|
57
54
|
if (event.key !== 'Enter' ||
|
|
58
55
|
event.defaultPrevented ||
|
|
59
56
|
!form ||
|
|
60
|
-
!
|
|
61
|
-
|
|
57
|
+
!submitsOnEnter(event.composedPath()[0], form) ||
|
|
58
|
+
defaultButton(form) !== this) {
|
|
62
59
|
return;
|
|
63
60
|
}
|
|
64
61
|
event.preventDefault();
|
|
@@ -84,44 +81,31 @@ let HelixHeadlessButton = class HelixHeadlessButton extends HelixFormElement {
|
|
|
84
81
|
...HelixFormElement.shadowRootOptions,
|
|
85
82
|
delegatesFocus: true,
|
|
86
83
|
}; }
|
|
87
|
-
|
|
88
|
-
const
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
form.removeAttribute(attribute);
|
|
98
|
-
}
|
|
99
|
-
else {
|
|
100
|
-
form.setAttribute(attribute, had);
|
|
101
|
-
}
|
|
102
|
-
});
|
|
103
|
-
};
|
|
104
|
-
override('action', this.formAction || null);
|
|
105
|
-
override('enctype', this.formEnctype || null);
|
|
106
|
-
override('method', this.formMethod || null);
|
|
107
|
-
override('novalidate', this.formNoValidate ? '' : null);
|
|
108
|
-
override('target', this.formTarget || null);
|
|
109
|
-
const reports = this.name !== '';
|
|
110
|
-
if (reports) {
|
|
111
|
-
this.internals.setFormValue(this.value);
|
|
84
|
+
announcePress(click) {
|
|
85
|
+
const pointerType = pressType(click, this.recent);
|
|
86
|
+
this.recent = {};
|
|
87
|
+
this.dispatchEvent(new HelixPressEvent({ pointerType }));
|
|
88
|
+
}
|
|
89
|
+
act() {
|
|
90
|
+
this.linkCommand();
|
|
91
|
+
this.sendCommand();
|
|
92
|
+
if (this.type === 'button') {
|
|
93
|
+
return;
|
|
112
94
|
}
|
|
113
|
-
|
|
114
|
-
|
|
95
|
+
const { form } = this;
|
|
96
|
+
if (!form) {
|
|
97
|
+
return;
|
|
115
98
|
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
this.internals.setFormValue(null);
|
|
122
|
-
}
|
|
99
|
+
if (this.type === 'submit') {
|
|
100
|
+
this.submit(form);
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
form.reset();
|
|
123
104
|
}
|
|
124
105
|
}
|
|
106
|
+
submit(form) {
|
|
107
|
+
submitAs(form, this);
|
|
108
|
+
}
|
|
125
109
|
get commandForElement() {
|
|
126
110
|
const button = this.renderRoot?.querySelector('button');
|
|
127
111
|
return button?.commandForElement ?? this.commandTarget();
|
|
@@ -201,10 +185,15 @@ let HelixHeadlessButton = class HelixHeadlessButton extends HelixFormElement {
|
|
|
201
185
|
tabindex=${stop}
|
|
202
186
|
?disabled=${this.isDisabled}
|
|
203
187
|
@click=${this.handleClick}
|
|
188
|
+
@keydown=${this.notePress}
|
|
189
|
+
@pointerdown=${this.notePress}
|
|
204
190
|
>
|
|
205
|
-
${label}
|
|
191
|
+
${label}${this.renderSpinner()}
|
|
206
192
|
</button>${this.renderLive()}`;
|
|
207
193
|
}
|
|
194
|
+
renderSpinner() {
|
|
195
|
+
return this.pending ? html `<span part="spinner" aria-hidden="true"></span>` : nothing;
|
|
196
|
+
}
|
|
208
197
|
};
|
|
209
198
|
__decorate([
|
|
210
199
|
property()
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Submitting a form through a native submit button that stands in for one in a
|
|
3
|
+
* shadow root.
|
|
4
|
+
*
|
|
5
|
+
* `requestSubmit(submitter)` takes only a native submit button whose form is
|
|
6
|
+
* the form, and a button inside a shadow root is neither. A hidden native
|
|
7
|
+
* `<button type="submit">` carrying the same name, value and `form*`
|
|
8
|
+
* overrides is put into the form for the one synchronous call, as Shoelace and
|
|
9
|
+
* Web Awesome do, so the platform does the rest: `event.submitter` is a
|
|
10
|
+
* button with the name and value, `new FormData(form, event.submitter)`
|
|
11
|
+
* includes them, and the overrides apply to that submission alone.
|
|
12
|
+
*/
|
|
13
|
+
/** What a submit button carries into the submission it starts. */
|
|
14
|
+
export interface Carried {
|
|
15
|
+
formAction: string;
|
|
16
|
+
formEnctype: string;
|
|
17
|
+
formMethod: string;
|
|
18
|
+
formNoValidate: boolean;
|
|
19
|
+
formTarget: string;
|
|
20
|
+
name: string;
|
|
21
|
+
value: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Submits `form` as a native submit button carrying `carried` would, and takes
|
|
25
|
+
* that button out again whether or not a listener refused the submission.
|
|
26
|
+
*/
|
|
27
|
+
export declare const submitAs: (form: HTMLFormElement, carried: Carried) => void;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export const submitAs = (form, carried) => {
|
|
2
|
+
const stand = form.ownerDocument.createElement('button');
|
|
3
|
+
stand.type = 'submit';
|
|
4
|
+
stand.hidden = true;
|
|
5
|
+
for (const [attribute, value] of [
|
|
6
|
+
['formaction', carried.formAction],
|
|
7
|
+
['formenctype', carried.formEnctype],
|
|
8
|
+
['formmethod', carried.formMethod],
|
|
9
|
+
['formtarget', carried.formTarget],
|
|
10
|
+
['name', carried.name],
|
|
11
|
+
]) {
|
|
12
|
+
if (value !== '') {
|
|
13
|
+
stand.setAttribute(attribute, value);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
stand.value = carried.value;
|
|
17
|
+
stand.formNoValidate = carried.formNoValidate;
|
|
18
|
+
form.append(stand);
|
|
19
|
+
try {
|
|
20
|
+
form.requestSubmit(stand);
|
|
21
|
+
}
|
|
22
|
+
finally {
|
|
23
|
+
stand.remove();
|
|
24
|
+
}
|
|
25
|
+
};
|
|
@@ -6,7 +6,7 @@ import { type PropertyValues, type TemplateResult } from 'lit';
|
|
|
6
6
|
* @description
|
|
7
7
|
* Sets `role="group"` on the host through internals, and `label` names the
|
|
8
8
|
* group. Without a name, a screen reader announces the buttons as separate
|
|
9
|
-
* controls
|
|
9
|
+
* controls, and a development build warns once with the kind `missing-name`.
|
|
10
10
|
*
|
|
11
11
|
* The group does not manage focus, so each button keeps its own tab stop. For
|
|
12
12
|
* one tab stop with arrow keys between the buttons, the APG toolbar pattern,
|
|
@@ -52,6 +52,7 @@ export declare class HelixHeadlessButtonGroup extends HelixElement {
|
|
|
52
52
|
*/
|
|
53
53
|
orientation?: 'horizontal' | 'vertical';
|
|
54
54
|
protected willUpdate(changed: PropertyValues): void;
|
|
55
|
+
protected firstUpdated(changed: PropertyValues): void;
|
|
55
56
|
protected render(): TemplateResult;
|
|
56
57
|
}
|
|
57
58
|
declare global {
|
|
@@ -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, hostAria } from '@fusion.dev/helix-core';
|
|
7
|
+
import { auditName, customElement, HelixElement, hostAria } from '@fusion.dev/helix-core';
|
|
8
8
|
import { html } from 'lit';
|
|
9
9
|
import { property } from 'lit/decorators.js';
|
|
10
10
|
let HelixHeadlessButtonGroup = class HelixHeadlessButtonGroup extends HelixElement {
|
|
@@ -16,6 +16,10 @@ let HelixHeadlessButtonGroup = class HelixHeadlessButtonGroup extends HelixEleme
|
|
|
16
16
|
super.willUpdate(changed);
|
|
17
17
|
hostAria(this.internals, { label: this.label, role: 'group' });
|
|
18
18
|
}
|
|
19
|
+
firstUpdated(changed) {
|
|
20
|
+
super.firstUpdated(changed);
|
|
21
|
+
auditName(this, () => null, 'Give it a `label`, or an `aria-label` that says what the buttons are for.', () => this.label !== '');
|
|
22
|
+
}
|
|
19
23
|
render() {
|
|
20
24
|
return html `<slot></slot>`;
|
|
21
25
|
}
|
|
@@ -93,9 +93,10 @@ export declare class HelixHeadlessCanvasNode extends HelixElement {
|
|
|
93
93
|
* The card's name as text. A group shows it, and another card's connections
|
|
94
94
|
* read it out.
|
|
95
95
|
*
|
|
96
|
-
* A group needs one because it has no text of its own
|
|
97
|
-
*
|
|
98
|
-
*
|
|
96
|
+
* A group needs one because it has no text of its own. A card is named by
|
|
97
|
+
* it where it is set, and by its content where it is not, so a screen reader
|
|
98
|
+
* moving between cards hears each one's name. Set it on a card holding a
|
|
99
|
+
* picture or a figure, which has no words short enough to name it.
|
|
99
100
|
*/
|
|
100
101
|
label: string;
|
|
101
102
|
/** Where the card was placed, kept in its own shadow root. */
|
|
@@ -73,12 +73,13 @@ let HelixHeadlessCanvasNode = class HelixHeadlessCanvasNode extends HelixElement
|
|
|
73
73
|
: nothing}<div
|
|
74
74
|
part="node"
|
|
75
75
|
aria-describedby=${this.meaning || this.links ? 'about' : nothing}
|
|
76
|
-
aria-label=${this.
|
|
76
|
+
aria-label=${this.label || nothing}
|
|
77
|
+
aria-labelledby=${this.label || this.group ? nothing : 'content'}
|
|
77
78
|
aria-keyshortcuts=${this.connectable ? 'Enter F2 Space Shift+ArrowRight Shift+ArrowDown Alt+ArrowRight Alt+ArrowDown C Delete' : nothing}
|
|
78
79
|
role=${this.group ? 'group' : 'article'}
|
|
79
80
|
tabindex=${this.current ? '0' : '-1'}
|
|
80
81
|
>
|
|
81
|
-
<slot></slot>
|
|
82
|
+
<slot id="content"></slot>
|
|
82
83
|
<slot name="description"></slot>
|
|
83
84
|
<span id="about" hidden>${[this.meaning, this.links].filter(Boolean).join(', ')}</span>
|
|
84
85
|
</div>
|
|
@@ -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 { capturePointer, customElement, fillTemplate, HelixBeforeMoveEvent, HelixBeforeReconnectEvent, HelixBeforeRelabelEvent, HelixCanvasEditEvent, HelixCanvasPanEvent, HelixCanvasViewEvent, HelixCanvasZoomEvent, HelixConnectEvent, HelixElement, HelixMoveEvent, HelixReconnectEvent, HelixRelabelEvent, HelixRemoveEvent, HelixSelectEvent, hostAria, inlineStep, isRtl, MixinViewport, } from '@fusion.dev/helix-core';
|
|
7
|
+
import { capturePointer, customElement, fillTemplate, HelixBeforeMoveEvent, HelixBeforeReconnectEvent, HelixBeforeRelabelEvent, HelixCanvasEditEvent, HelixCanvasPanEvent, HelixCanvasViewEvent, HelixCanvasZoomEvent, HelixConnectEvent, HelixElement, HelixMoveEvent, HelixReconnectEvent, HelixRelabelEvent, HelixRemoveEvent, HelixSelectEvent, hostAria, inlineStep, isRtl, MixinViewport, wordsConverter, } from '@fusion.dev/helix-core';
|
|
8
8
|
import { html, nothing, svg } from 'lit';
|
|
9
9
|
import { property, state } from 'lit/decorators.js';
|
|
10
10
|
import { HelixHeadlessCanvasEdge } from '../edge/canvas-edge.js';
|
|
@@ -2043,7 +2043,7 @@ __decorate([
|
|
|
2043
2043
|
property({ attribute: 'stopped-label' })
|
|
2044
2044
|
], HelixHeadlessCanvas.prototype, "stoppedLabel", void 0);
|
|
2045
2045
|
__decorate([
|
|
2046
|
-
property({ attribute: 'tone-labels',
|
|
2046
|
+
property({ attribute: 'tone-labels', converter: wordsConverter })
|
|
2047
2047
|
], HelixHeadlessCanvas.prototype, "toneLabels", void 0);
|
|
2048
2048
|
__decorate([
|
|
2049
2049
|
state()
|
|
@@ -12,18 +12,31 @@ import { type PropertyValues, type TemplateResult } from 'lit';
|
|
|
12
12
|
* the grid, so you style `Card` directly and there is no wrapper part to reach
|
|
13
13
|
* through with `::part`.
|
|
14
14
|
*
|
|
15
|
-
* Name the card with `
|
|
16
|
-
*
|
|
17
|
-
*
|
|
15
|
+
* Name the card with `label`, as a Stat Group is named, or with `aria-label`
|
|
16
|
+
* or `aria-labelledby`. These are the only names that work with server
|
|
17
|
+
* rendering, because reading a title from the light DOM needs a DOM, and the
|
|
18
|
+
* server has none. `label` is set through `ElementInternals`, so it writes no
|
|
19
|
+
* attribute onto the card. **A named card is a group**, so a
|
|
18
20
|
* reader entering it hears its name; an unnamed one has no role, since a group
|
|
19
21
|
* with no name only adds "group" to what a reader says.
|
|
20
22
|
*
|
|
23
|
+
* Each region's slot is a part of the same name, `body` for the main content,
|
|
24
|
+
* as Web Awesome's card names its regions. A slot draws no box, so a part
|
|
25
|
+
* passes inherited properties to what is slotted, and a page wanting a box
|
|
26
|
+
* there gives it one with `display`.
|
|
27
|
+
*
|
|
21
28
|
* `header-actions` and `footer-actions` hold controls at the end of the
|
|
22
29
|
* header's and the footer's line, as Web Awesome's card does. While one holds
|
|
23
30
|
* something, its line is a `header-row` or `footer-row` part; otherwise there
|
|
24
31
|
* is no wrapper and every region is a bare slot. A server cannot see slotted
|
|
25
32
|
* content, so served actions sit on their own line until the script runs.
|
|
26
33
|
*
|
|
34
|
+
* **The card says which regions it holds**, as `:state(has-media)`,
|
|
35
|
+
* `:state(has-header)` and `:state(has-footer)`, so a sheet can draw a card
|
|
36
|
+
* with a header differently, as Web Awesome's `with-header` does, with no
|
|
37
|
+
* attribute written onto the card. Read in the browser, so a served card
|
|
38
|
+
* carries none until the script runs.
|
|
39
|
+
*
|
|
27
40
|
* @since 0.1.0
|
|
28
41
|
* @status stable
|
|
29
42
|
* @category layout
|
|
@@ -37,10 +50,28 @@ import { type PropertyValues, type TemplateResult } from 'lit';
|
|
|
37
50
|
* @slot header-actions - Controls for the whole card at the end of the header's line, such as a menu.
|
|
38
51
|
* @slot media - Image, video, or chart that runs edge to edge, outside the inset.
|
|
39
52
|
*
|
|
53
|
+
* @csspart body - The slot the main content arrives through. A slot draws no box, so it passes inherited properties, such as color and font, to the content; `display: block` gives it one.
|
|
54
|
+
* @csspart footer - The slot the footer arrives through, drawing no box, as `body` does.
|
|
55
|
+
* @csspart footer-actions - The slot the footer's controls arrive through, drawing no box, as `body` does.
|
|
40
56
|
* @csspart footer-row - The line holding `footer` and `footer-actions`, drawn only while `footer-actions` holds something.
|
|
57
|
+
* @csspart header - The slot the header arrives through, drawing no box, as `body` does.
|
|
58
|
+
* @csspart header-actions - The slot the header's controls arrive through, drawing no box, as `body` does.
|
|
41
59
|
* @csspart header-row - The line holding `header` and `header-actions`, drawn only while `header-actions` holds something.
|
|
60
|
+
* @csspart media - The slot the media arrives through, drawing no box, as `body` does.
|
|
61
|
+
*
|
|
62
|
+
* @cssstate has-footer - Something is slotted into `footer` or `footer-actions`.
|
|
63
|
+
* @cssstate has-header - Something is slotted into `header` or `header-actions`.
|
|
64
|
+
* @cssstate has-media - Something is slotted into `media`.
|
|
42
65
|
*/
|
|
43
66
|
export declare class HelixHeadlessCard extends HelixElement {
|
|
67
|
+
/**
|
|
68
|
+
* The card's accessible name, which makes it a named group.
|
|
69
|
+
*
|
|
70
|
+
* The name `Stat.Group` and the other named regions take, set through
|
|
71
|
+
* `ElementInternals`. `aria-label` and `aria-labelledby` written on the card
|
|
72
|
+
* name it too, and win over this, as an author's attribute does.
|
|
73
|
+
*/
|
|
74
|
+
label: string;
|
|
44
75
|
/**
|
|
45
76
|
* Places the media after the content. By default it comes before.
|
|
46
77
|
*
|
|
@@ -71,7 +102,8 @@ export declare class HelixHeadlessCard extends HelixElement {
|
|
|
71
102
|
private headerActions;
|
|
72
103
|
protected willUpdate(changed: PropertyValues): void;
|
|
73
104
|
protected updated(changed: PropertyValues): void;
|
|
74
|
-
|
|
105
|
+
protected firstUpdated(changed: PropertyValues): void;
|
|
106
|
+
private readonly readRegions;
|
|
75
107
|
protected render(): TemplateResult;
|
|
76
108
|
}
|
|
77
109
|
declare global {
|
|
@@ -10,38 +10,57 @@ import { property, state } from 'lit/decorators.js';
|
|
|
10
10
|
let HelixHeadlessCard = class HelixHeadlessCard extends HelixElement {
|
|
11
11
|
constructor() {
|
|
12
12
|
super(...arguments);
|
|
13
|
+
this.label = '';
|
|
13
14
|
this.labelledBy = null;
|
|
14
15
|
this.namedBy = null;
|
|
15
16
|
this.footerActions = false;
|
|
16
17
|
this.headerActions = false;
|
|
17
|
-
this.
|
|
18
|
+
this.readRegions = () => {
|
|
18
19
|
const filled = (name) => slotFilled(this.renderRoot?.querySelector(`slot[name="${name}"]`));
|
|
19
20
|
this.headerActions = filled('header-actions');
|
|
20
21
|
this.footerActions = filled('footer-actions');
|
|
22
|
+
this.toggleState('has-media', filled('media'));
|
|
23
|
+
this.toggleState('has-header', this.headerActions || filled('header'));
|
|
24
|
+
this.toggleState('has-footer', this.footerActions || filled('footer'));
|
|
21
25
|
};
|
|
22
26
|
}
|
|
23
27
|
willUpdate(changed) {
|
|
24
28
|
super.willUpdate(changed);
|
|
25
|
-
const named = Boolean(this.namedBy?.trim() || this.labelledBy?.trim());
|
|
26
|
-
hostAria(this.internals, { role: named ? 'group' : '' });
|
|
29
|
+
const named = Boolean(this.label.trim() || this.namedBy?.trim() || this.labelledBy?.trim());
|
|
30
|
+
hostAria(this.internals, { label: this.label, role: named ? 'group' : '' });
|
|
27
31
|
}
|
|
28
32
|
updated(changed) {
|
|
29
33
|
super.updated(changed);
|
|
30
|
-
this.
|
|
34
|
+
this.readRegions();
|
|
35
|
+
}
|
|
36
|
+
firstUpdated(changed) {
|
|
37
|
+
super.firstUpdated(changed);
|
|
38
|
+
this.renderRoot.addEventListener('slotchange', this.readRegions);
|
|
31
39
|
}
|
|
32
40
|
render() {
|
|
33
|
-
const header = html `<slot name="header"></slot
|
|
34
|
-
><slot
|
|
35
|
-
|
|
36
|
-
|
|
41
|
+
const header = html `<slot name="header" part="header"></slot
|
|
42
|
+
><slot
|
|
43
|
+
name="header-actions"
|
|
44
|
+
part="header-actions"
|
|
45
|
+
@slotchange=${this.readRegions}
|
|
46
|
+
></slot>`;
|
|
47
|
+
const footer = html `<slot name="footer" part="footer"></slot
|
|
48
|
+
><slot
|
|
49
|
+
name="footer-actions"
|
|
50
|
+
part="footer-actions"
|
|
51
|
+
@slotchange=${this.readRegions}
|
|
52
|
+
></slot>`;
|
|
37
53
|
return html `
|
|
38
|
-
<slot name="media"></slot>
|
|
54
|
+
<slot name="media" part="media"></slot>
|
|
39
55
|
${this.headerActions ? html `<div part="header-row">${header}</div>` : header}
|
|
40
|
-
<slot></slot>
|
|
56
|
+
<slot part="body"></slot>
|
|
41
57
|
${this.footerActions ? html `<div part="footer-row">${footer}</div>` : footer}
|
|
42
58
|
`;
|
|
43
59
|
}
|
|
44
60
|
};
|
|
61
|
+
__decorate([
|
|
62
|
+
property()
|
|
63
|
+
], HelixHeadlessCard.prototype, "label", void 0);
|
|
45
64
|
__decorate([
|
|
46
65
|
property({ attribute: 'media-placement', reflect: true })
|
|
47
66
|
], HelixHeadlessCard.prototype, "mediaPlacement", void 0);
|
|
@@ -24,10 +24,30 @@ import { type PropertyValues, type TemplateResult } from 'lit';
|
|
|
24
24
|
* polite live region. While the carousel rotates the region is off, so a
|
|
25
25
|
* screen reader is not interrupted every few seconds.
|
|
26
26
|
*
|
|
27
|
-
* The indicators are one tab stop.
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
27
|
+
* **Keyboard.** The indicators are one tab stop.
|
|
28
|
+
*
|
|
29
|
+
* | Key | What it does |
|
|
30
|
+
* |---|---|
|
|
31
|
+
* | Tab | Moves through the rotation control, Previous, Next, the slides' own links and buttons, and the indicators, in that order. |
|
|
32
|
+
* | Enter, Space | Presses the control or the indicator that has focus. |
|
|
33
|
+
* | Right, Left | On an indicator, moves to the next or the previous slide and its indicator. Left moves on, on a right-to-left page. |
|
|
34
|
+
* | Down, Up | The same, on a vertical carousel. |
|
|
35
|
+
* | Home, End | On an indicator, moves to the first or the last slide. |
|
|
36
|
+
*
|
|
37
|
+
* Without `loop`, Previous on the first slide and Next on the last are marked
|
|
38
|
+
* `aria-disabled`, and keep focus.
|
|
39
|
+
*
|
|
40
|
+
* **What a screen reader hears.** The carousel is a group named by `label`,
|
|
41
|
+
* announced as `role-label` ("carousel"). Each slide is a group announced as
|
|
42
|
+
* `slide-role-label` ("slide") and named by `slide-label` ("2 of 5"). After a
|
|
43
|
+
* move by a control, an indicator, a key, or a drag, the `live` part says the
|
|
44
|
+
* slide's name politely. While the carousel rotates the region is off.
|
|
45
|
+
*
|
|
46
|
+
* **`slides-per-move` moves several slides at a time.** With `per-view="3"`
|
|
47
|
+
* and `slides-per-move="3"`, Next shows the next three, there is one
|
|
48
|
+
* indicator for each stop, and the track snaps only at the stops. The last
|
|
49
|
+
* stop is always the end of the run, so a run that does not divide evenly
|
|
50
|
+
* ends on its last slides. Unset moves one slide.
|
|
31
51
|
*
|
|
32
52
|
* **`mouse-drag` lets a mouse drag the track**, which otherwise only a touch
|
|
33
53
|
* screen, a trackpad, or the scroll wheel moves. The drag follows the pointer
|
|
@@ -282,6 +302,12 @@ export declare class HelixHeadlessCarousel extends HelixElement {
|
|
|
282
302
|
* `aria-roledescription`. Translate it with the rest of your text.
|
|
283
303
|
*/
|
|
284
304
|
slideRoleLabel: string;
|
|
305
|
+
/**
|
|
306
|
+
* How many slides Previous, Next, the indicators, rotation, and a drag move
|
|
307
|
+
* at a time. Unset moves one. The track stops at every `slides-per-move`th
|
|
308
|
+
* position from the first, and at the last.
|
|
309
|
+
*/
|
|
310
|
+
slidesPerMove?: number;
|
|
285
311
|
/**
|
|
286
312
|
* The name of the rotation control while rotation is stopped.
|
|
287
313
|
*/
|
|
@@ -350,6 +376,8 @@ export declare class HelixHeadlessCarousel extends HelixElement {
|
|
|
350
376
|
* withheld rather than counted from it. See `across`.
|
|
351
377
|
*/
|
|
352
378
|
get positions(): number;
|
|
379
|
+
/** The positions the track stops at, `slides-per-move` apart, and the last. See `stopsOf`. */
|
|
380
|
+
private get stops();
|
|
353
381
|
/**
|
|
354
382
|
* How many slides the box turned out to hold, from the pane it laid out.
|
|
355
383
|
*
|
|
@@ -494,6 +522,11 @@ export declare class HelixHeadlessCarousel extends HelixElement {
|
|
|
494
522
|
* sends neither, being a correction rather than a move anybody asked for.
|
|
495
523
|
*/
|
|
496
524
|
private applyIndex;
|
|
525
|
+
/**
|
|
526
|
+
* The position one stop forward or back lands on, wrapping where `loop`
|
|
527
|
+
* says so.
|
|
528
|
+
*/
|
|
529
|
+
private move;
|
|
497
530
|
/** Moves to a slide. It wraps past either end only when `loop` is set. */
|
|
498
531
|
goTo(index: number): void;
|
|
499
532
|
/**
|
|
@@ -795,6 +828,12 @@ export declare class HelixHeadlessCarousel extends HelixElement {
|
|
|
795
828
|
* is slotted. A tier above overrides this to draw its own caret.
|
|
796
829
|
*/
|
|
797
830
|
protected renderNextMark(): TemplateResult;
|
|
831
|
+
/**
|
|
832
|
+
* A pane's own declarations: the last pane's `runEnd`, and no snap point on
|
|
833
|
+
* a pane the track does not stop at under `slides-per-move`, so a swipe
|
|
834
|
+
* settles on a stop as the controls do.
|
|
835
|
+
*/
|
|
836
|
+
private paneStyle;
|
|
798
837
|
protected render(): TemplateResult;
|
|
799
838
|
}
|
|
800
839
|
declare global {
|