@fusion.dev/helix-headless 0.144.0 → 0.146.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 +15195 -4240
- package/dist/accordion/item/accordion-item.d.ts +62 -12
- package/dist/accordion/item/accordion-item.js +41 -10
- package/dist/accordion/root/accordion-root.d.ts +14 -5
- package/dist/accordion/root/accordion-root.js +7 -1
- package/dist/announcement/root/announcement-root.d.ts +24 -3
- package/dist/announcement/root/announcement-root.js +39 -2
- package/dist/app-header/root/app-header-root.d.ts +12 -0
- package/dist/app-header/root/app-header-root.js +13 -1
- package/dist/app-header/sectioning.d.ts +9 -0
- package/dist/app-header/sectioning.js +27 -0
- package/dist/avatar/group/avatar-group.d.ts +20 -14
- package/dist/avatar/group/avatar-group.js +17 -19
- package/dist/badge/root/badge-root.d.ts +3 -1
- package/dist/badge/root/badge-root.js +2 -2
- package/dist/bar-chart/root/bar-chart-root.d.ts +18 -1
- package/dist/bar-chart/root/bar-chart-root.js +52 -15
- package/dist/bar-chart/stack.d.ts +15 -0
- package/dist/bar-chart/stack.js +19 -0
- package/dist/breadcrumbs/root/breadcrumbs-root.d.ts +57 -1
- package/dist/breadcrumbs/root/breadcrumbs-root.js +73 -3
- package/dist/button/root/button-root.d.ts +26 -0
- package/dist/button/root/button-root.js +38 -18
- 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.d.ts +38 -3
- package/dist/canvas/root/canvas-root.js +123 -42
- package/dist/card/root/card-root.d.ts +24 -3
- package/dist/card/root/card-root.js +20 -8
- package/dist/carousel/root/carousel-root.d.ts +133 -4
- package/dist/carousel/root/carousel-root.js +174 -24
- package/dist/carousel/stops.d.ts +20 -0
- package/dist/carousel/stops.js +30 -0
- package/dist/chat/composer/chat-composer.d.ts +38 -6
- package/dist/chat/composer/chat-composer.js +42 -9
- package/dist/chat/message/chat-message.d.ts +32 -1
- package/dist/chat/message/chat-message.js +27 -10
- package/dist/chat/naming.d.ts +26 -0
- package/dist/chat/naming.js +14 -0
- package/dist/chat/root/chat-root.d.ts +58 -0
- package/dist/chat/root/chat-root.js +43 -3
- package/dist/checkbox/root/checkbox-root.d.ts +20 -0
- package/dist/checkbox/root/checkbox-root.js +14 -1
- package/dist/checkbox-group/root/checkbox-group-root.d.ts +8 -2
- package/dist/checkbox-group/root/checkbox-group-root.js +12 -10
- package/dist/checkbox-group/select-all.d.ts +27 -0
- package/dist/checkbox-group/select-all.js +12 -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 +57 -2
- package/dist/code-block/root/code-block-root.js +63 -8
- package/dist/color-input/root/color-input-root.d.ts +3 -0
- package/dist/color-input/root/color-input-root.js +6 -3
- package/dist/color-picker/root/color-picker-root.d.ts +33 -4
- package/dist/color-picker/root/color-picker-root.js +80 -21
- package/dist/color-picker/swatches.d.ts +12 -0
- package/dist/color-picker/swatches.js +26 -0
- package/dist/combobox/root/combobox-root.d.ts +43 -0
- package/dist/combobox/root/combobox-root.js +79 -15
- package/dist/command/root/command-root.d.ts +16 -1
- package/dist/command/root/command-root.js +22 -4
- package/dist/copy-button/root/copy-button-root.d.ts +26 -1
- package/dist/copy-button/root/copy-button-root.js +12 -5
- package/dist/data-table/index.d.ts +1 -1
- package/dist/data-table/index.js +1 -1
- package/dist/data-table/keys.d.ts +24 -0
- package/dist/data-table/keys.js +24 -0
- package/dist/data-table/root/data-table-root.d.ts +170 -13
- package/dist/data-table/root/data-table-root.js +294 -52
- package/dist/data-table/tree.d.ts +55 -0
- package/dist/data-table/tree.js +54 -0
- package/dist/date-input/root/date-input-root.d.ts +3 -1
- package/dist/date-input/root/date-input-root.js +18 -7
- package/dist/date-picker/root/date-picker-root.js +12 -6
- package/dist/description-list/item/description-list-item.d.ts +17 -2
- package/dist/description-list/item/description-list-item.js +15 -2
- package/dist/description-list/root/description-list-root.d.ts +27 -1
- package/dist/description-list/root/description-list-root.js +26 -1
- 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 +48 -1
- package/dist/drawer/reveal.d.ts +8 -0
- package/dist/drawer/reveal.js +1 -0
- package/dist/drawer/root/drawer-root.d.ts +59 -0
- package/dist/drawer/root/drawer-root.js +63 -4
- package/dist/drilldown/item/drilldown-item.d.ts +11 -6
- package/dist/drilldown/item/drilldown-item.js +8 -5
- package/dist/drilldown/root/drilldown-root.d.ts +29 -0
- package/dist/drilldown/root/drilldown-root.js +28 -5
- package/dist/element-events.generated.js +83 -12
- package/dist/empty/root/empty-root.d.ts +3 -1
- package/dist/empty/root/empty-root.js +3 -2
- package/dist/file-input/root/file-input-root.d.ts +69 -6
- package/dist/file-input/root/file-input-root.js +82 -19
- package/dist/file-input/screen.d.ts +2 -1
- package/dist/filter-input/menu/filter-menu.d.ts +5 -0
- package/dist/filter-input/menu/filter-menu.js +16 -4
- package/dist/filter-input/root/filter-input-root.d.ts +30 -6
- package/dist/filter-input/root/filter-input-root.js +1 -1
- package/dist/filter-input/suggest.d.ts +28 -3
- package/dist/filter-input/suggest.js +18 -8
- package/dist/format-date/root/format-date-root.d.ts +9 -16
- package/dist/format-date/root/format-date-root.js +10 -27
- package/dist/heatmap/root/heatmap-root.d.ts +24 -13
- package/dist/heatmap/root/heatmap-root.js +34 -12
- package/dist/icon/root/icon-root.d.ts +12 -1
- package/dist/icon/root/icon-root.js +21 -10
- 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 +5 -1
- package/dist/image/root/image-root.js +10 -2
- package/dist/input/root/input-root.d.ts +13 -3
- package/dist/input/root/input-root.js +12 -3
- package/dist/kbd/root/kbd-root.d.ts +35 -1
- package/dist/kbd/root/kbd-root.js +23 -4
- package/dist/legend/root/legend-root.d.ts +55 -8
- package/dist/legend/root/legend-root.js +55 -13
- package/dist/lightbox/root/lightbox-root.d.ts +49 -6
- package/dist/lightbox/root/lightbox-root.js +86 -19
- package/dist/lightbox/zoom-controller.d.ts +59 -0
- package/dist/lightbox/zoom-controller.js +128 -0
- package/dist/lightbox/zoom.d.ts +22 -0
- package/dist/lightbox/zoom.js +16 -0
- package/dist/line-chart/root/line-chart-root.d.ts +22 -1
- package/dist/line-chart/root/line-chart-root.js +21 -1
- package/dist/list/item/list-item.d.ts +70 -1
- package/dist/list/item/list-item.js +77 -6
- package/dist/list/numbering.d.ts +14 -0
- package/dist/list/numbering.js +8 -0
- package/dist/list/root/list-root.d.ts +155 -9
- package/dist/list/root/list-root.js +246 -4
- package/dist/list/selection.d.ts +49 -0
- package/dist/list/selection.js +30 -0
- package/dist/listbox/root/listbox-root.d.ts +37 -1
- package/dist/listbox/root/listbox-root.js +49 -4
- 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/map/root/map-root.d.ts +6 -2
- package/dist/map/root/map-root.js +5 -2
- package/dist/megamenu/root/megamenu-root.d.ts +62 -0
- package/dist/megamenu/root/megamenu-root.js +90 -5
- package/dist/menu/index.d.ts +1 -0
- package/dist/menu/index.js +1 -0
- package/dist/menu/item/menu-item.d.ts +87 -11
- package/dist/menu/item/menu-item.js +78 -22
- package/dist/menu/root/menu-root.d.ts +39 -1
- package/dist/menu/root/menu-root.js +65 -8
- package/dist/menu/section/menu-section.d.ts +55 -0
- package/dist/menu/section/menu-section.js +60 -0
- package/dist/meter/root/meter-root.d.ts +20 -1
- package/dist/meter/root/meter-root.js +11 -15
- package/dist/navigation/root/navigation-root.d.ts +18 -2
- package/dist/navigation/root/navigation-root.js +29 -3
- package/dist/notifications/root/notifications-root.d.ts +25 -0
- package/dist/notifications/root/notifications-root.js +33 -5
- package/dist/number-input/root/number-input-root.d.ts +17 -8
- package/dist/number-input/root/number-input-root.js +2 -7
- package/dist/object-inspector/root/object-inspector-root.d.ts +161 -32
- package/dist/object-inspector/root/object-inspector-root.js +264 -123
- package/dist/object-inspector/rows.d.ts +75 -0
- package/dist/object-inspector/rows.js +119 -0
- package/dist/option/root/option-root.d.ts +5 -3
- package/dist/outline/levels.d.ts +31 -0
- package/dist/outline/levels.js +23 -0
- package/dist/outline/root/outline-root.d.ts +86 -3
- package/dist/outline/root/outline-root.js +95 -12
- package/dist/pagination/size/pagination-size.d.ts +12 -2
- package/dist/pagination/size/pagination-size.js +20 -5
- package/dist/pin-input/code.d.ts +10 -0
- package/dist/pin-input/code.js +13 -0
- package/dist/pin-input/root/pin-input-root.d.ts +25 -1
- package/dist/pin-input/root/pin-input-root.js +10 -11
- package/dist/popover/hide-outside.d.ts +14 -0
- package/dist/popover/hide-outside.js +41 -0
- package/dist/popover/root/popover-root.d.ts +57 -7
- package/dist/popover/root/popover-root.js +58 -3
- package/dist/progress/root/progress-root.d.ts +20 -0
- package/dist/progress/root/progress-root.js +15 -15
- package/dist/qr-code/export.d.ts +26 -1
- package/dist/qr-code/export.js +14 -0
- package/dist/qr-code/root/qr-code-root.d.ts +19 -5
- package/dist/qr-code/root/qr-code-root.js +58 -9
- 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 +4 -10
- package/dist/radio/group/radio-group.js +5 -10
- package/dist/radio/root/radio-root.d.ts +6 -2
- package/dist/radio/root/radio-root.js +6 -1
- package/dist/rating/root/rating-root.d.ts +10 -5
- package/dist/rating/root/rating-root.js +32 -8
- package/dist/rating/steps.d.ts +7 -0
- package/dist/rating/steps.js +9 -0
- 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 +21 -1
- package/dist/scatter-chart/root/scatter-chart-root.js +30 -17
- package/dist/scroll-area/root/scroll-area-root.d.ts +84 -0
- package/dist/scroll-area/root/scroll-area-root.js +106 -7
- 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 +92 -0
- package/dist/scroll-area/scrollbar.js +33 -0
- package/dist/select/root/select-root.d.ts +15 -0
- package/dist/select/root/select-root.js +18 -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 +41 -4
- package/dist/slider/root/slider-root.js +23 -3
- package/dist/sparkline/readings.d.ts +18 -0
- package/dist/sparkline/readings.js +19 -0
- package/dist/sparkline/root/sparkline-root.d.ts +78 -7
- package/dist/sparkline/root/sparkline-root.js +118 -23
- package/dist/speed-dial/root/speed-dial-root.js +2 -2
- package/dist/splitter/root/splitter-root.d.ts +20 -12
- package/dist/splitter/root/splitter-root.js +226 -203
- package/dist/splitter/snap.d.ts +9 -0
- package/dist/splitter/snap.js +12 -0
- 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 +20 -0
- package/dist/steps/reach.js +15 -0
- package/dist/steps/root/steps-root.d.ts +76 -0
- package/dist/steps/root/steps-root.js +93 -1
- package/dist/steps/step/step.d.ts +45 -2
- package/dist/steps/step/step.js +33 -6
- package/dist/switch/root/switch-root.d.ts +10 -0
- package/dist/table/column/table-column.d.ts +11 -10
- package/dist/table/column/table-column.js +8 -19
- package/dist/table/root/table-root.d.ts +126 -4
- package/dist/table/root/table-root.js +156 -6
- package/dist/table/row/table-row.d.ts +47 -1
- package/dist/table/row/table-row.js +39 -2
- package/dist/tabs/panel/tab-panel.d.ts +22 -5
- package/dist/tabs/panel/tab-panel.js +34 -6
- package/dist/tabs/root/tabs-root.d.ts +37 -1
- package/dist/tabs/root/tabs-root.js +22 -4
- package/dist/tabs/tab/tab.d.ts +41 -4
- package/dist/tabs/tab/tab.js +49 -3
- package/dist/tag/group/tag-group.d.ts +31 -4
- package/dist/tag/group/tag-group.js +46 -7
- package/dist/tag/root/tag-root.js +9 -2
- package/dist/textarea/root/textarea-root.d.ts +28 -1
- package/dist/textarea/root/textarea-root.js +40 -1
- package/dist/time-input/root/time-input-root.d.ts +5 -1
- package/dist/time-input/root/time-input-root.js +16 -8
- package/dist/time-picker/root/time-picker-root.d.ts +18 -4
- package/dist/time-picker/root/time-picker-root.js +7 -10
- 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.d.ts +46 -0
- package/dist/timeline/group/timeline-group.js +37 -0
- package/dist/timeline/index.d.ts +1 -0
- package/dist/timeline/index.js +1 -0
- package/dist/timeline/root/timeline-root.d.ts +10 -3
- package/dist/toast/item/toast-item.d.ts +24 -18
- package/dist/toast/item/toast-item.js +36 -40
- package/dist/toast/root/toast-root.d.ts +6 -0
- package/dist/toast/root/toast-root.js +16 -1
- package/dist/toggle/group/toggle-group.d.ts +24 -3
- package/dist/toggle/group/toggle-group.js +34 -5
- package/dist/toolbar/root/toolbar-root.d.ts +13 -0
- package/dist/toolbar/root/toolbar-root.js +15 -5
- package/dist/tooltip/root/tooltip-root.d.ts +13 -2
- package/dist/tooltip/root/tooltip-root.js +9 -1
- package/dist/tour/back.d.ts +10 -0
- package/dist/tour/back.js +8 -0
- package/dist/tour/root/tour-root.d.ts +30 -2
- package/dist/tour/root/tour-root.js +34 -8
- package/dist/tree/item/tree-item.d.ts +61 -4
- package/dist/tree/item/tree-item.js +92 -20
- package/dist/tree/root/tree-root.d.ts +58 -0
- package/dist/tree/root/tree-root.js +80 -16
- package/dist/tree/selection.d.ts +24 -0
- package/dist/tree/selection.js +13 -0
- package/dist/trend/root/trend-root.d.ts +43 -18
- package/dist/trend/root/trend-root.js +31 -6
- package/dist/video/media-events.d.ts +44 -0
- package/dist/video/media-events.js +35 -0
- package/dist/video/root/video-root.d.ts +117 -18
- package/dist/video/root/video-root.js +93 -47
- 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/order.d.ts +41 -0
- package/dist/video-playlist/order.js +34 -0
- package/dist/video-playlist/root/video-playlist-root.d.ts +77 -3
- package/dist/video-playlist/root/video-playlist-root.js +60 -16
- package/dist/virtual-list/controls.d.ts +4 -0
- package/dist/virtual-list/controls.js +30 -0
- package/dist/virtual-list/fill.d.ts +22 -0
- package/dist/virtual-list/fill.js +23 -0
- package/dist/virtual-list/keys.d.ts +15 -0
- package/dist/virtual-list/keys.js +24 -0
- package/dist/virtual-list/plan.d.ts +49 -0
- package/dist/virtual-list/plan.js +16 -0
- package/dist/virtual-list/root/virtual-list-root.d.ts +259 -26
- package/dist/virtual-list/root/virtual-list-root.js +333 -49
- package/lint.json +1 -1
- package/package.json +8 -8
- package/types/jsx.d.ts +8113 -1394
- package/types/svelte.d.ts +2 -0
- package/types/vue.d.ts +1678 -353
- package/dist/data-table/root/order.d.ts +0 -141
- package/dist/data-table/root/order.js +0 -76
- package/dist/listbox/range.d.ts +0 -17
- package/dist/listbox/range.js +0 -5
- package/dist/tag/selection.d.ts +0 -10
- package/dist/tag/selection.js +0 -12
|
@@ -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>
|
|
@@ -98,7 +98,7 @@ declare const HelixHeadlessCanvas_base: (new (...args: any[]) => import("@fusion
|
|
|
98
98
|
* @csspart edge - One connector between two cards.
|
|
99
99
|
* @csspart edge-end - An end of a selected connection. Drag it, or click it to pick it up.
|
|
100
100
|
* @csspart edge-target - A wider, invisible line over a connection, which receives focus and presses.
|
|
101
|
-
* @csspart edges -
|
|
101
|
+
* @csspart edges - A layer the connectors are drawn in: one holding the arrowhead, and one after each card holding the connections leaving it, so they are read in the order the arrows walk them. Give it `z-index: -1` to draw it under the cards.
|
|
102
102
|
* @csspart footer - The strip below the board.
|
|
103
103
|
* @csspart fullscreen - The button that makes the board fill the screen.
|
|
104
104
|
* @csspart gesture-hint - Words over the board for a moment when it lets a gesture pass to the page, such as how to zoom it.
|
|
@@ -128,6 +128,10 @@ declare const HelixHeadlessCanvas_base: (new (...args: any[]) => import("@fusion
|
|
|
128
128
|
* @cssstate using - A board with `gestures="activate"` has been pressed and has the gestures.
|
|
129
129
|
*/
|
|
130
130
|
export declare class HelixHeadlessCanvas extends HelixHeadlessCanvas_base {
|
|
131
|
+
/** The connection whose target had focus as an update began, and that target. */
|
|
132
|
+
private focusedEdge;
|
|
133
|
+
/** Each card is assigned to its own slot, in the order the arrows walk them. */
|
|
134
|
+
static shadowRootOptions: ShadowRootInit;
|
|
131
135
|
/** The text read with a card to say where its connections come from, with `{cards}`. */
|
|
132
136
|
comesFromLabel: string;
|
|
133
137
|
/** The text announced when a connection is requested, with `{from}` and `{to}`. */
|
|
@@ -951,16 +955,47 @@ export declare class HelixHeadlessCanvas extends HelixHeadlessCanvas_base {
|
|
|
951
955
|
*/
|
|
952
956
|
private renderEnds;
|
|
953
957
|
/**
|
|
954
|
-
* The
|
|
958
|
+
* The layer that holds the arrowhead and the connection being drawn.
|
|
955
959
|
*
|
|
956
960
|
* **The arrowhead is measured in the board's own units, not in multiples of
|
|
957
961
|
* the line's width.** `markerUnits="strokeWidth"` multiplies by the stroke, so
|
|
958
962
|
* an eight-unit head on a two-pixel line drew a sixteen-pixel triangle that
|
|
959
963
|
* read as a shape of its own rather than as a direction. In user space it is
|
|
960
964
|
* eight units of the document, which is what the cards are measured in, and it
|
|
961
|
-
* grows with the zoom like everything else.
|
|
965
|
+
* grows with the zoom like everything else. Each card's connections reach it
|
|
966
|
+
* by its id, which every layer in this shadow root shares.
|
|
962
967
|
*/
|
|
963
968
|
private renderEdges;
|
|
969
|
+
/**
|
|
970
|
+
* Each card, and then the connections leaving it, in the order the arrows
|
|
971
|
+
* walk them.
|
|
972
|
+
*
|
|
973
|
+
* **The order is the accessibility tree's.** The connections were one layer
|
|
974
|
+
* drawn before every card, so a screen reader's reading went through every
|
|
975
|
+
* connection and then every card, while the arrow keys went card by card
|
|
976
|
+
* with each card's connections after it. Each card now has a slot of its
|
|
977
|
+
* own, assigned by hand, with its connections' layer straight after it, so
|
|
978
|
+
* both orders are the walk. The cards are read before hydration, which
|
|
979
|
+
* knows none, from the default slot after these, as they always were.
|
|
980
|
+
*
|
|
981
|
+
* **Every layer sits under the cards by its stacking.** A layer after a card
|
|
982
|
+
* in the tree would otherwise paint over it, so the styled sheet sets
|
|
983
|
+
* `--helix-layer-beneath` on `edges`, and a headless page sets `z-index: -1`.
|
|
984
|
+
*/
|
|
985
|
+
private renderStops;
|
|
986
|
+
/** One connector: the target that takes focus and presses, and the line it paints. */
|
|
987
|
+
private renderEdge;
|
|
988
|
+
/**
|
|
989
|
+
* Sends each card to its slot, and everything else to the slot it names.
|
|
990
|
+
*
|
|
991
|
+
* A root that assigns by hand routes nothing by itself, the named slots
|
|
992
|
+
* included, so the header, the footer and the empty state are assigned here
|
|
993
|
+
* too. Paired with the walk by position, as the template was built, and a
|
|
994
|
+
* card the walk does not reach, a second one of the same name, goes to the
|
|
995
|
+
* default slot with everything else. On a root a server sent, which routes
|
|
996
|
+
* by name, each card is sent to its slot by name instead.
|
|
997
|
+
*/
|
|
998
|
+
private assign;
|
|
964
999
|
/**
|
|
965
1000
|
* The connections' labels, as text on the plane over the lines.
|
|
966
1001
|
*
|
|
@@ -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';
|
|
@@ -610,6 +610,10 @@ let HelixHeadlessCanvas = class HelixHeadlessCanvas extends MixinViewport(HelixE
|
|
|
610
610
|
this.requestUpdate();
|
|
611
611
|
};
|
|
612
612
|
}
|
|
613
|
+
static { this.shadowRootOptions = {
|
|
614
|
+
...HelixElement.shadowRootOptions,
|
|
615
|
+
slotAssignment: 'manual',
|
|
616
|
+
}; }
|
|
613
617
|
get box() {
|
|
614
618
|
const viewport = this.renderRoot?.querySelector('[part="viewport"]');
|
|
615
619
|
return {
|
|
@@ -1530,6 +1534,12 @@ let HelixHeadlessCanvas = class HelixHeadlessCanvas extends MixinViewport(HelixE
|
|
|
1530
1534
|
updated(changed) {
|
|
1531
1535
|
this.keying = undefined;
|
|
1532
1536
|
super.updated(changed);
|
|
1537
|
+
this.assign();
|
|
1538
|
+
const edge = this.focusedEdge;
|
|
1539
|
+
this.focusedEdge = undefined;
|
|
1540
|
+
if (edge && (!edge.target.isConnected || edge.target.getAttribute('data-edge') !== edge.key)) {
|
|
1541
|
+
this.focusStop(edge.key);
|
|
1542
|
+
}
|
|
1533
1543
|
if (this.holding && !this.held) {
|
|
1534
1544
|
this.letGo();
|
|
1535
1545
|
}
|
|
@@ -1661,6 +1671,11 @@ let HelixHeadlessCanvas = class HelixHeadlessCanvas extends MixinViewport(HelixE
|
|
|
1661
1671
|
willUpdate(changed) {
|
|
1662
1672
|
this.keying = this.keyAll();
|
|
1663
1673
|
super.willUpdate(changed);
|
|
1674
|
+
const focused = this.ownerDocument?.activeElement === this
|
|
1675
|
+
? this.renderRoot.activeElement
|
|
1676
|
+
: undefined;
|
|
1677
|
+
const key = focused?.getAttribute?.('data-edge');
|
|
1678
|
+
this.focusedEdge = focused && key ? { key, target: focused } : undefined;
|
|
1664
1679
|
const drawn = extent(this.nodes);
|
|
1665
1680
|
const origin = { x: drawn.x - MARGIN, y: drawn.y - MARGIN };
|
|
1666
1681
|
if (this.origin && (origin.x !== this.origin.x || origin.y !== this.origin.y)) {
|
|
@@ -1732,9 +1747,6 @@ let HelixHeadlessCanvas = class HelixHeadlessCanvas extends MixinViewport(HelixE
|
|
|
1732
1747
|
});
|
|
1733
1748
|
}
|
|
1734
1749
|
renderEdges(origin, box) {
|
|
1735
|
-
const elements = new Map(this.edgeElements.map((child) => [this.keyOfElement(child), child]));
|
|
1736
|
-
const stop = this.stop !== undefined && this.keyNamed(this.stop) === this.stop ? this.stop : undefined;
|
|
1737
|
-
const pickedKeys = new Set(this.picked);
|
|
1738
1750
|
return html `<svg
|
|
1739
1751
|
part="edges"
|
|
1740
1752
|
role="none"
|
|
@@ -1755,46 +1767,114 @@ let HelixHeadlessCanvas = class HelixHeadlessCanvas extends MixinViewport(HelixE
|
|
|
1755
1767
|
<path part="arrow" d="M0 0 L8 4 L0 8 z" />
|
|
1756
1768
|
</marker>
|
|
1757
1769
|
</defs>
|
|
1758
|
-
${this.edges.map((edge) => {
|
|
1759
|
-
const key = this.keyOf(edge);
|
|
1760
|
-
const element = elements.get(key);
|
|
1761
|
-
const drawn = this.geometryOf(edge, origin);
|
|
1762
|
-
const lifted = this.linking?.edge === key && !this.linking.pressed;
|
|
1763
|
-
if (!drawn || (lifted && this.linking?.pointer !== undefined)) {
|
|
1764
|
-
return nothing;
|
|
1765
|
-
}
|
|
1766
|
-
const { from, to } = drawn;
|
|
1767
|
-
const ends = heads(edge);
|
|
1768
|
-
return svg `<path
|
|
1769
|
-
part="edge-target"
|
|
1770
|
-
aria-description=${[element?.tone ? this.toneLabels[element.tone] : undefined, edge.label].filter(Boolean).join(', ') || nothing}
|
|
1771
|
-
aria-label=${fillTemplate(this.connectionLabel, { from: this.textOf(from), to: this.textOf(to) })}
|
|
1772
|
-
d=${drawn.d}
|
|
1773
|
-
data-edge=${key}
|
|
1774
|
-
fill="none"
|
|
1775
|
-
aria-keyshortcuts="Enter F2 C Delete"
|
|
1776
|
-
role="button"
|
|
1777
|
-
tabindex=${key === stop ? '0' : '-1'}
|
|
1778
|
-
/>
|
|
1779
|
-
${lifted
|
|
1780
|
-
? nothing
|
|
1781
|
-
: svg `<path
|
|
1782
|
-
part="edge"
|
|
1783
|
-
aria-hidden="true"
|
|
1784
|
-
d=${drawn.d}
|
|
1785
|
-
data-selected=${pickedKeys.has(key) ? '' : nothing}
|
|
1786
|
-
data-tone=${element?.tone ?? nothing}
|
|
1787
|
-
data-variant=${element?.variant ?? nothing}
|
|
1788
|
-
fill="none"
|
|
1789
|
-
marker-end=${ends.end ? `url(#${ARROW})` : nothing}
|
|
1790
|
-
marker-start=${ends.start ? `url(#${ARROW})` : nothing}
|
|
1791
|
-
style=${custom(element, '--canvas-edge-color') ? `--_canvas-edge-color: ${custom(element, '--canvas-edge-color')}` : nothing}
|
|
1792
|
-
/>`}
|
|
1793
|
-
`;
|
|
1794
|
-
})}
|
|
1795
1770
|
${this.renderDraft(origin)}
|
|
1796
1771
|
</svg>`;
|
|
1797
1772
|
}
|
|
1773
|
+
renderStops(origin, box) {
|
|
1774
|
+
const elements = new Map(this.edgeElements.map((child) => [this.keyOfElement(child), child]));
|
|
1775
|
+
const stop = this.stop !== undefined && this.keyNamed(this.stop) === this.stop ? this.stop : undefined;
|
|
1776
|
+
const picked = new Set(this.picked);
|
|
1777
|
+
const groups = [];
|
|
1778
|
+
for (const one of this.walk) {
|
|
1779
|
+
if (one.kind === 'node') {
|
|
1780
|
+
groups.push({ edges: [], key: one.key });
|
|
1781
|
+
}
|
|
1782
|
+
else {
|
|
1783
|
+
groups.at(-1)?.edges.push(one.edge);
|
|
1784
|
+
}
|
|
1785
|
+
}
|
|
1786
|
+
return groups.map(({ edges }, at) => html `<slot name=${`card-${at}`}></slot>${edges.length === 0
|
|
1787
|
+
? nothing
|
|
1788
|
+
: html `<svg
|
|
1789
|
+
part="edges"
|
|
1790
|
+
role="none"
|
|
1791
|
+
viewBox=${`0 0 ${box.width} ${box.height}`}
|
|
1792
|
+
width=${box.width}
|
|
1793
|
+
height=${box.height}
|
|
1794
|
+
>
|
|
1795
|
+
${edges.map((edge) => this.renderEdge(edge, origin, elements, stop, picked))}
|
|
1796
|
+
</svg>`}`);
|
|
1797
|
+
}
|
|
1798
|
+
renderEdge(edge, origin, elements, stop, pickedKeys) {
|
|
1799
|
+
const key = this.keyOf(edge);
|
|
1800
|
+
const element = elements.get(key);
|
|
1801
|
+
const drawn = this.geometryOf(edge, origin);
|
|
1802
|
+
const lifted = this.linking?.edge === key && !this.linking.pressed;
|
|
1803
|
+
if (!drawn || (lifted && this.linking?.pointer !== undefined)) {
|
|
1804
|
+
return nothing;
|
|
1805
|
+
}
|
|
1806
|
+
const { from, to } = drawn;
|
|
1807
|
+
const ends = heads(edge);
|
|
1808
|
+
return svg `<path
|
|
1809
|
+
part="edge-target"
|
|
1810
|
+
aria-description=${[element?.tone ? this.toneLabels[element.tone] : undefined, edge.label].filter(Boolean).join(', ') || nothing}
|
|
1811
|
+
aria-label=${fillTemplate(this.connectionLabel, { from: this.textOf(from), to: this.textOf(to) })}
|
|
1812
|
+
d=${drawn.d}
|
|
1813
|
+
data-edge=${key}
|
|
1814
|
+
fill="none"
|
|
1815
|
+
aria-keyshortcuts="Enter F2 C Delete"
|
|
1816
|
+
role="button"
|
|
1817
|
+
tabindex=${key === stop ? '0' : '-1'}
|
|
1818
|
+
/>
|
|
1819
|
+
${lifted
|
|
1820
|
+
? nothing
|
|
1821
|
+
: svg `<path
|
|
1822
|
+
part="edge"
|
|
1823
|
+
aria-hidden="true"
|
|
1824
|
+
d=${drawn.d}
|
|
1825
|
+
data-selected=${pickedKeys.has(key) ? '' : nothing}
|
|
1826
|
+
data-tone=${element?.tone ?? nothing}
|
|
1827
|
+
data-variant=${element?.variant ?? nothing}
|
|
1828
|
+
fill="none"
|
|
1829
|
+
marker-end=${ends.end ? `url(#${ARROW})` : nothing}
|
|
1830
|
+
marker-start=${ends.start ? `url(#${ARROW})` : nothing}
|
|
1831
|
+
style=${custom(element, '--canvas-edge-color') ? `--_canvas-edge-color: ${custom(element, '--canvas-edge-color')}` : nothing}
|
|
1832
|
+
/>`}
|
|
1833
|
+
`;
|
|
1834
|
+
}
|
|
1835
|
+
assign() {
|
|
1836
|
+
if (!this.childrenKnown) {
|
|
1837
|
+
return;
|
|
1838
|
+
}
|
|
1839
|
+
const cards = new Map();
|
|
1840
|
+
for (const card of this.cards) {
|
|
1841
|
+
if (!cards.has(card.name)) {
|
|
1842
|
+
cards.set(card.name, card);
|
|
1843
|
+
}
|
|
1844
|
+
}
|
|
1845
|
+
const placed = new Map();
|
|
1846
|
+
for (const [at, one] of this.walk.filter((stop) => stop.kind === 'node').entries()) {
|
|
1847
|
+
const card = cards.get(one.key);
|
|
1848
|
+
if (card) {
|
|
1849
|
+
placed.set(card, `card-${at}`);
|
|
1850
|
+
}
|
|
1851
|
+
}
|
|
1852
|
+
if (this.assignsByName) {
|
|
1853
|
+
for (const card of this.cards) {
|
|
1854
|
+
this.route(card, placed.get(card));
|
|
1855
|
+
}
|
|
1856
|
+
return;
|
|
1857
|
+
}
|
|
1858
|
+
const root = this.renderRoot;
|
|
1859
|
+
const rest = [];
|
|
1860
|
+
const named = new Map();
|
|
1861
|
+
for (const child of this.knownChildren) {
|
|
1862
|
+
const name = placed.get(child) ?? child.getAttribute('slot') ?? undefined;
|
|
1863
|
+
if (name === undefined) {
|
|
1864
|
+
rest.push(child);
|
|
1865
|
+
}
|
|
1866
|
+
else {
|
|
1867
|
+
named.set(name, [...(named.get(name) ?? []), child]);
|
|
1868
|
+
}
|
|
1869
|
+
}
|
|
1870
|
+
for (const slot of root?.querySelectorAll?.('slot') ?? []) {
|
|
1871
|
+
const wanted = slot.name === '' ? rest : (named.get(slot.name) ?? []);
|
|
1872
|
+
const had = slot.assignedNodes();
|
|
1873
|
+
if (had.length !== wanted.length || had.some((one, at) => one !== wanted[at])) {
|
|
1874
|
+
slot.assign?.(...wanted);
|
|
1875
|
+
}
|
|
1876
|
+
}
|
|
1877
|
+
}
|
|
1798
1878
|
renderLabels(origin) {
|
|
1799
1879
|
return this.edges.map((edge) => {
|
|
1800
1880
|
const lifted = this.linking?.edge === this.keyOf(edge) && !this.linking.pressed;
|
|
@@ -1903,6 +1983,7 @@ let HelixHeadlessCanvas = class HelixHeadlessCanvas extends MixinViewport(HelixE
|
|
|
1903
1983
|
@focusin=${this.handleFocusIn}
|
|
1904
1984
|
>
|
|
1905
1985
|
${this.renderEdges(origin, box)} ${this.renderLabels(origin)}
|
|
1986
|
+
${this.renderStops(origin, box)}
|
|
1906
1987
|
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
1907
1988
|
${this.renderEnds(origin)}
|
|
1908
1989
|
${this.renderEditor(origin)}
|
|
@@ -1962,7 +2043,7 @@ __decorate([
|
|
|
1962
2043
|
property({ attribute: 'stopped-label' })
|
|
1963
2044
|
], HelixHeadlessCanvas.prototype, "stoppedLabel", void 0);
|
|
1964
2045
|
__decorate([
|
|
1965
|
-
property({ attribute: 'tone-labels',
|
|
2046
|
+
property({ attribute: 'tone-labels', converter: wordsConverter })
|
|
1966
2047
|
], HelixHeadlessCanvas.prototype, "toneLabels", void 0);
|
|
1967
2048
|
__decorate([
|
|
1968
2049
|
state()
|
|
@@ -12,12 +12,19 @@ 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
|
|
@@ -37,10 +44,24 @@ import { type PropertyValues, type TemplateResult } from 'lit';
|
|
|
37
44
|
* @slot header-actions - Controls for the whole card at the end of the header's line, such as a menu.
|
|
38
45
|
* @slot media - Image, video, or chart that runs edge to edge, outside the inset.
|
|
39
46
|
*
|
|
47
|
+
* @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.
|
|
48
|
+
* @csspart footer - The slot the footer arrives through, drawing no box, as `body` does.
|
|
49
|
+
* @csspart footer-actions - The slot the footer's controls arrive through, drawing no box, as `body` does.
|
|
40
50
|
* @csspart footer-row - The line holding `footer` and `footer-actions`, drawn only while `footer-actions` holds something.
|
|
51
|
+
* @csspart header - The slot the header arrives through, drawing no box, as `body` does.
|
|
52
|
+
* @csspart header-actions - The slot the header's controls arrive through, drawing no box, as `body` does.
|
|
41
53
|
* @csspart header-row - The line holding `header` and `header-actions`, drawn only while `header-actions` holds something.
|
|
54
|
+
* @csspart media - The slot the media arrives through, drawing no box, as `body` does.
|
|
42
55
|
*/
|
|
43
56
|
export declare class HelixHeadlessCard extends HelixElement {
|
|
57
|
+
/**
|
|
58
|
+
* The card's accessible name, which makes it a named group.
|
|
59
|
+
*
|
|
60
|
+
* The name `Stat.Group` and the other named regions take, set through
|
|
61
|
+
* `ElementInternals`. `aria-label` and `aria-labelledby` written on the card
|
|
62
|
+
* name it too, and win over this, as an author's attribute does.
|
|
63
|
+
*/
|
|
64
|
+
label: string;
|
|
44
65
|
/**
|
|
45
66
|
* Places the media after the content. By default it comes before.
|
|
46
67
|
*
|
|
@@ -10,6 +10,7 @@ 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;
|
|
@@ -22,26 +23,37 @@ let HelixHeadlessCard = class HelixHeadlessCard extends HelixElement {
|
|
|
22
23
|
}
|
|
23
24
|
willUpdate(changed) {
|
|
24
25
|
super.willUpdate(changed);
|
|
25
|
-
const named = Boolean(this.namedBy?.trim() || this.labelledBy?.trim());
|
|
26
|
-
hostAria(this.internals, { role: named ? 'group' : '' });
|
|
26
|
+
const named = Boolean(this.label.trim() || this.namedBy?.trim() || this.labelledBy?.trim());
|
|
27
|
+
hostAria(this.internals, { label: this.label, role: named ? 'group' : '' });
|
|
27
28
|
}
|
|
28
29
|
updated(changed) {
|
|
29
30
|
super.updated(changed);
|
|
30
31
|
this.readActions();
|
|
31
32
|
}
|
|
32
33
|
render() {
|
|
33
|
-
const header = html `<slot name="header"></slot
|
|
34
|
-
><slot
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
const header = html `<slot name="header" part="header"></slot
|
|
35
|
+
><slot
|
|
36
|
+
name="header-actions"
|
|
37
|
+
part="header-actions"
|
|
38
|
+
@slotchange=${this.readActions}
|
|
39
|
+
></slot>`;
|
|
40
|
+
const footer = html `<slot name="footer" part="footer"></slot
|
|
41
|
+
><slot
|
|
42
|
+
name="footer-actions"
|
|
43
|
+
part="footer-actions"
|
|
44
|
+
@slotchange=${this.readActions}
|
|
45
|
+
></slot>`;
|
|
37
46
|
return html `
|
|
38
|
-
<slot name="media"></slot>
|
|
47
|
+
<slot name="media" part="media"></slot>
|
|
39
48
|
${this.headerActions ? html `<div part="header-row">${header}</div>` : header}
|
|
40
|
-
<slot></slot>
|
|
49
|
+
<slot part="body"></slot>
|
|
41
50
|
${this.footerActions ? html `<div part="footer-row">${footer}</div>` : footer}
|
|
42
51
|
`;
|
|
43
52
|
}
|
|
44
53
|
};
|
|
54
|
+
__decorate([
|
|
55
|
+
property()
|
|
56
|
+
], HelixHeadlessCard.prototype, "label", void 0);
|
|
45
57
|
__decorate([
|
|
46
58
|
property({ attribute: 'media-placement', reflect: true })
|
|
47
59
|
], HelixHeadlessCard.prototype, "mediaPlacement", void 0);
|