@fusion.dev/helix-headless 0.0.0-dev → 0.0.3
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 +4513 -4483
- package/dist/accordion/item/accordion-item.d.ts +13 -15
- package/dist/accordion/item/accordion-item.js +15 -17
- package/dist/announcement/root/announcement-root.d.ts +7 -25
- package/dist/announcement/root/announcement-root.js +7 -20
- package/dist/app-header/root/app-header-root.d.ts +10 -17
- package/dist/app-header/root/app-header-root.js +9 -18
- package/dist/avatar/group/avatar-group.d.ts +10 -19
- package/dist/avatar/group/avatar-group.js +12 -17
- package/dist/avatar/root/avatar-root.d.ts +8 -8
- package/dist/avatar/root/avatar-root.js +19 -20
- package/dist/badge/root/badge-root.d.ts +6 -6
- package/dist/badge/root/badge-root.js +13 -13
- package/dist/bar-chart/root/bar-chart-root.d.ts +21 -29
- package/dist/bar-chart/root/bar-chart-root.js +42 -57
- package/dist/breadcrumbs/breadcrumb/breadcrumb.d.ts +12 -18
- package/dist/breadcrumbs/breadcrumb/breadcrumb.js +13 -16
- package/dist/breadcrumbs/root/breadcrumbs-root.d.ts +9 -28
- package/dist/breadcrumbs/root/breadcrumbs-root.js +9 -28
- package/dist/button/root/button-root.d.ts +84 -94
- package/dist/button/root/button-root.js +82 -92
- package/dist/callout/root/callout-root.d.ts +4 -5
- package/dist/carousel/root/carousel-root.d.ts +59 -71
- package/dist/carousel/root/carousel-root.js +73 -101
- package/dist/chat/composer/chat-composer.d.ts +29 -33
- package/dist/chat/composer/chat-composer.js +40 -44
- package/dist/chat/message/chat-message.d.ts +25 -25
- package/dist/chat/message/chat-message.js +26 -26
- package/dist/chat/root/chat-root.d.ts +28 -41
- package/dist/chat/root/chat-root.js +27 -40
- package/dist/checkbox/root/checkbox-root.d.ts +10 -12
- package/dist/checkbox/root/checkbox-root.js +29 -35
- package/dist/checkbox-group/root/checkbox-group-root.d.ts +32 -45
- package/dist/checkbox-group/root/checkbox-group-root.js +53 -79
- package/dist/code-block/root/code-block-root.d.ts +3 -4
- package/dist/code-block/root/code-block-root.js +8 -12
- package/dist/color-input/root/color-input-root.d.ts +36 -37
- package/dist/color-input/root/color-input-root.js +29 -34
- package/dist/color-picker/color.d.ts +7 -8
- package/dist/color-picker/color.js +7 -8
- package/dist/color-picker/root/color-picker-root.d.ts +55 -57
- package/dist/color-picker/root/color-picker-root.js +60 -64
- package/dist/combobox/root/combobox-root.d.ts +53 -58
- package/dist/combobox/root/combobox-root.js +85 -94
- package/dist/command/root/command-root.d.ts +8 -8
- package/dist/command/root/command-root.js +29 -33
- package/dist/copy-button/root/copy-button-root.d.ts +21 -24
- package/dist/copy-button/root/copy-button-root.js +25 -35
- package/dist/data-table/root/data-table-root.d.ts +77 -76
- package/dist/data-table/root/data-table-root.js +95 -84
- package/dist/data-table/root/order.d.ts +2 -2
- package/dist/data-table/root/order.js +1 -3
- package/dist/date-input/root/date-input-root.d.ts +88 -93
- package/dist/date-input/root/date-input-root.js +147 -158
- package/dist/date-picker/root/date-picker-root.d.ts +75 -83
- package/dist/date-picker/root/date-picker-root.js +120 -143
- package/dist/dialog/root/dialog-root.d.ts +41 -24
- package/dist/dialog/root/dialog-root.js +47 -24
- package/dist/divider/root/divider-root.d.ts +5 -6
- package/dist/divider/root/divider-root.js +4 -5
- package/dist/donut-chart/root/donut-chart-root.d.ts +22 -25
- package/dist/donut-chart/root/donut-chart-root.js +37 -51
- package/dist/drawer/root/drawer-root.d.ts +24 -29
- package/dist/drawer/root/drawer-root.js +15 -22
- package/dist/drilldown/item/drilldown-item.d.ts +14 -14
- package/dist/drilldown/item/drilldown-item.js +24 -26
- package/dist/drilldown/root/drilldown-root.d.ts +8 -10
- package/dist/drilldown/root/drilldown-root.js +6 -7
- package/dist/element-events.generated.js +1 -1
- package/dist/file-input/root/file-input-root.d.ts +20 -24
- package/dist/file-input/root/file-input-root.js +42 -57
- package/dist/format-date/root/format-date-root.js +1 -1
- package/dist/heatmap/root/buckets.d.ts +8 -8
- package/dist/heatmap/root/buckets.js +8 -8
- package/dist/heatmap/root/heatmap-root.d.ts +57 -63
- package/dist/heatmap/root/heatmap-root.js +72 -83
- package/dist/icon/root/icon-root.d.ts +4 -4
- package/dist/icon/root/icon-root.js +9 -9
- package/dist/icon-button/root/icon-button-root.d.ts +4 -6
- package/dist/icon-button/root/icon-button-root.js +4 -6
- package/dist/image/root/image-root.d.ts +49 -59
- package/dist/image/root/image-root.js +55 -65
- package/dist/index.d.ts +5 -5
- package/dist/index.js +5 -5
- package/dist/input/root/input-root.d.ts +61 -85
- package/dist/input/root/input-root.js +79 -106
- package/dist/kbd/root/kbd-root.d.ts +8 -7
- package/dist/kbd/root/kbd-root.js +71 -11
- package/dist/legend/root/legend-root.d.ts +1 -1
- package/dist/legend/root/legend-root.js +4 -5
- package/dist/line-chart/root/line-chart-root.d.ts +26 -30
- package/dist/line-chart/root/line-chart-root.js +10 -10
- package/dist/list/item/list-item.d.ts +14 -18
- package/dist/list/item/list-item.js +18 -22
- package/dist/list/root/list-root.d.ts +4 -4
- package/dist/list/root/list-root.js +3 -3
- package/dist/listbox/root/listbox-root.d.ts +31 -58
- package/dist/listbox/root/listbox-root.js +66 -109
- package/dist/megamenu/root/megamenu-root.d.ts +34 -35
- package/dist/megamenu/root/megamenu-root.js +53 -58
- package/dist/menu/item/menu-item.d.ts +39 -53
- package/dist/menu/item/menu-item.js +50 -64
- package/dist/menu/root/menu-root.d.ts +30 -40
- package/dist/menu/root/menu-root.js +49 -82
- package/dist/meter/root/meter-root.d.ts +49 -53
- package/dist/meter/root/meter-root.js +22 -27
- package/dist/navigation/root/navigation-root.js +11 -19
- package/dist/notifications/notification/notification.d.ts +16 -22
- package/dist/notifications/notification/notification.js +21 -27
- package/dist/notifications/root/notifications-root.d.ts +31 -39
- package/dist/notifications/root/notifications-root.js +41 -52
- package/dist/number-input/root/number-input-root.d.ts +31 -33
- package/dist/number-input/root/number-input-root.js +37 -39
- package/dist/option/root/option-root.d.ts +73 -74
- package/dist/option/root/option-root.js +62 -64
- package/dist/outline/root/outline-root.d.ts +38 -44
- package/dist/outline/root/outline-root.js +66 -82
- package/dist/pagination/root/pagination-root.d.ts +87 -92
- package/dist/pagination/root/pagination-root.js +116 -123
- package/dist/pagination/size/pagination-size.d.ts +31 -50
- package/dist/pagination/size/pagination-size.js +35 -55
- package/dist/pagination/summary/pagination-summary.d.ts +12 -12
- package/dist/pagination/summary/pagination-summary.js +18 -18
- package/dist/pin-input/root/pin-input-root.d.ts +53 -70
- package/dist/pin-input/root/pin-input-root.js +74 -94
- package/dist/popover/root/popover-root.d.ts +15 -20
- package/dist/popover/root/popover-root.js +19 -36
- package/dist/progress/root/progress-root.d.ts +12 -14
- package/dist/progress/root/progress-root.js +22 -25
- package/dist/qr-code/root/qr-code-root.d.ts +11 -11
- package/dist/qr-code/root/qr-code-root.js +12 -14
- package/dist/radio/group/radio-group.js +19 -26
- package/dist/radio/root/radio-root.d.ts +12 -13
- package/dist/radio/root/radio-root.js +12 -13
- package/dist/rating/root/rating-root.d.ts +25 -30
- package/dist/rating/root/rating-root.js +43 -50
- package/dist/scroll-area/root/scroll-area-root.d.ts +11 -14
- package/dist/scroll-area/root/scroll-area-root.js +39 -33
- package/dist/select/root/select-root.d.ts +7 -12
- package/dist/select/root/select-root.js +40 -55
- package/dist/slider/root/slider-root.d.ts +53 -60
- package/dist/slider/root/slider-root.js +74 -85
- package/dist/sparkline/root/sparkline-root.d.ts +43 -47
- package/dist/sparkline/root/sparkline-root.js +23 -32
- package/dist/speed-dial/item/speed-dial-item.d.ts +6 -6
- package/dist/speed-dial/item/speed-dial-item.js +9 -9
- package/dist/speed-dial/root/speed-dial-root.d.ts +21 -25
- package/dist/speed-dial/root/speed-dial-root.js +32 -40
- package/dist/splitter/root/splitter-root.d.ts +98 -111
- package/dist/splitter/root/splitter-root.js +96 -123
- package/dist/stat/root/stat-root.d.ts +2 -7
- package/dist/stat/root/stat-root.js +0 -5
- package/dist/steps/step/step.d.ts +19 -24
- package/dist/steps/step/step.js +27 -32
- package/dist/switch/root/switch-root.js +2 -2
- package/dist/table/column/table-column.d.ts +54 -60
- package/dist/table/column/table-column.js +95 -68
- package/dist/table/root/table-root.d.ts +5 -6
- package/dist/table/root/table-root.js +7 -10
- package/dist/tabs/panel/tab-panel.d.ts +21 -25
- package/dist/tabs/panel/tab-panel.js +25 -29
- package/dist/tabs/root/tabs-root.d.ts +25 -34
- package/dist/tabs/root/tabs-root.js +22 -28
- package/dist/tabs/tab/tab.d.ts +12 -12
- package/dist/tabs/tab/tab.js +19 -20
- package/dist/textarea/root/textarea-root.d.ts +36 -36
- package/dist/textarea/root/textarea-root.js +43 -47
- package/dist/time-input/root/time-input-root.d.ts +58 -68
- package/dist/time-input/root/time-input-root.js +62 -77
- package/dist/time-picker/root/time-picker-root.d.ts +73 -79
- package/dist/time-picker/root/time-picker-root.js +72 -84
- package/dist/timeline/item/timeline-item.d.ts +8 -11
- package/dist/timeline/item/timeline-item.js +8 -11
- package/dist/timeline/root/timeline-root.d.ts +5 -7
- package/dist/timeline/root/timeline-root.js +5 -7
- package/dist/toast/item/toast-item.d.ts +9 -27
- package/dist/toast/item/toast-item.js +19 -41
- package/dist/toast/root/toast-root.d.ts +10 -14
- package/dist/toast/root/toast-root.js +4 -5
- package/dist/toggle/group/toggle-group.d.ts +6 -15
- package/dist/toggle/group/toggle-group.js +21 -36
- package/dist/toggle/root/toggle-root.d.ts +26 -27
- package/dist/toggle/root/toggle-root.js +30 -31
- package/dist/toolbar/root/toolbar-root.d.ts +7 -10
- package/dist/toolbar/root/toolbar-root.js +10 -14
- package/dist/tooltip/root/tooltip-root.d.ts +52 -59
- package/dist/tooltip/root/tooltip-root.js +98 -93
- package/dist/tour/root/tour-root.d.ts +19 -23
- package/dist/tour/root/tour-root.js +31 -41
- package/dist/tour/stop/tour-stop.d.ts +14 -15
- package/dist/tour/stop/tour-stop.js +31 -34
- package/dist/tree/item/tree-item.d.ts +30 -35
- package/dist/tree/item/tree-item.js +43 -55
- package/dist/tree/root/tree-root.d.ts +7 -10
- package/dist/tree/root/tree-root.js +33 -42
- package/dist/trend/root/trend-root.d.ts +3 -5
- package/dist/trend/root/trend-root.js +5 -9
- package/dist/video/root/video-root.d.ts +100 -124
- package/dist/video/root/video-root.js +142 -176
- package/dist/video-playlist/item/video-playlist-item.d.ts +16 -16
- package/dist/video-playlist/item/video-playlist-item.js +24 -24
- package/dist/video-playlist/menu/video-playlist-menu.d.ts +5 -8
- package/dist/video-playlist/menu/video-playlist-menu.js +20 -29
- package/dist/video-playlist/root/video-playlist-root.d.ts +16 -11
- package/dist/video-playlist/root/video-playlist-root.js +21 -25
- package/dist/virtual-list/root/virtual-list-root.d.ts +8 -12
- package/dist/virtual-list/root/virtual-list-root.js +11 -16
- package/jsx.d.ts +9797 -12561
- package/package.json +6 -6
- package/vue.d.ts +2684 -3228
|
@@ -68,9 +68,9 @@ let HelixHeadlessTour = class HelixHeadlessTour extends HelixElement {
|
|
|
68
68
|
constructor() {
|
|
69
69
|
super(...arguments);
|
|
70
70
|
/**
|
|
71
|
-
*
|
|
71
|
+
* Label for the control that goes back, handed to every stop.
|
|
72
72
|
*/
|
|
73
|
-
this.
|
|
73
|
+
this.backLabel = '';
|
|
74
74
|
/**
|
|
75
75
|
* Stop to start on, where nothing declared one.
|
|
76
76
|
*/
|
|
@@ -78,29 +78,29 @@ let HelixHeadlessTour = class HelixHeadlessTour extends HelixElement {
|
|
|
78
78
|
/** The stop being shown, whoever set it, and `undefined` until somebody has. */
|
|
79
79
|
this.indexState = undefined;
|
|
80
80
|
/**
|
|
81
|
-
*
|
|
82
|
-
*/
|
|
83
|
-
this.label = '';
|
|
84
|
-
/**
|
|
85
|
-
* Space left around the target when it is lit, in pixels.
|
|
81
|
+
* Label for the control that goes on from the last stop.
|
|
86
82
|
*/
|
|
87
|
-
this.
|
|
83
|
+
this.doneLabel = '';
|
|
88
84
|
/**
|
|
89
|
-
*
|
|
85
|
+
* Accessible name for the run, such as "Getting started".
|
|
90
86
|
*/
|
|
91
|
-
this.
|
|
87
|
+
this.label = '';
|
|
92
88
|
/**
|
|
93
89
|
* Label for the control that goes on.
|
|
94
90
|
*/
|
|
95
91
|
this.nextLabel = '';
|
|
96
92
|
/**
|
|
97
|
-
*
|
|
93
|
+
* Whether the tour is running.
|
|
98
94
|
*/
|
|
99
|
-
this.
|
|
95
|
+
this.open = false;
|
|
100
96
|
/**
|
|
101
97
|
* Label for the control that leaves the tour.
|
|
102
98
|
*/
|
|
103
99
|
this.skipLabel = '';
|
|
100
|
+
/**
|
|
101
|
+
* Space left around the target when it is lit, in pixels.
|
|
102
|
+
*/
|
|
103
|
+
this.spotlightPadding = 8;
|
|
104
104
|
this.handleAsk = (event) => {
|
|
105
105
|
const what = event.detail?.what;
|
|
106
106
|
if (what === 'next') {
|
|
@@ -128,18 +128,14 @@ let HelixHeadlessTour = class HelixHeadlessTour extends HelixElement {
|
|
|
128
128
|
/**
|
|
129
129
|
* Which stop the reader is on.
|
|
130
130
|
*
|
|
131
|
-
* **
|
|
132
|
-
*
|
|
133
|
-
*
|
|
134
|
-
*
|
|
135
|
-
* now, which announces first and applies only if nobody refused, and refusing
|
|
136
|
-
* is how a consumer takes the decision. See 294.
|
|
131
|
+
* **Moved through `requestChange`, never by assignment from `move`.** That
|
|
132
|
+
* announces first and applies only if nobody refused, and refusing is how a
|
|
133
|
+
* consumer takes the decision; writing the property and then announcing puts
|
|
134
|
+
* `preventDefault` after the move it is refusing.
|
|
137
135
|
*
|
|
138
136
|
* The shape is `Carousel`'s, which is the nearest thing in the library: a
|
|
139
137
|
* `default-index` for markup that only seeds and a held state that is
|
|
140
138
|
* `undefined` until somebody sets one.
|
|
141
|
-
*
|
|
142
|
-
*
|
|
143
139
|
*/
|
|
144
140
|
get index() {
|
|
145
141
|
return this.indexState ?? this.defaultIndex;
|
|
@@ -175,9 +171,9 @@ let HelixHeadlessTour = class HelixHeadlessTour extends HelixElement {
|
|
|
175
171
|
/**
|
|
176
172
|
* Leaves the run early, which is a close rather than a completion.
|
|
177
173
|
*
|
|
178
|
-
* Announced before it is applied, and cancelable because of it
|
|
179
|
-
*
|
|
180
|
-
* `preventDefault`
|
|
174
|
+
* Announced before it is applied, and cancelable because of it: writing
|
|
175
|
+
* `open` first and dispatching after leaves a consumer calling
|
|
176
|
+
* `preventDefault` refusing something that has already happened.
|
|
181
177
|
*/
|
|
182
178
|
skip() {
|
|
183
179
|
const event = new HelixBeforeCloseEvent();
|
|
@@ -196,10 +192,8 @@ let HelixHeadlessTour = class HelixHeadlessTour extends HelixElement {
|
|
|
196
192
|
this.dispatchEvent(new HelixCompleteEvent({ value: String(this.index) }));
|
|
197
193
|
this.open = false;
|
|
198
194
|
}
|
|
199
|
-
/* The one
|
|
200
|
-
|
|
201
|
-
and where the consumer has not taken the value over, and it audits a
|
|
202
|
-
controlled tour whose consumer never answers. */
|
|
195
|
+
/* The one path every stateful change in the library goes through: it
|
|
196
|
+
announces, then applies where nothing refused. */
|
|
203
197
|
move(to) {
|
|
204
198
|
requestChange({
|
|
205
199
|
apply: (value) => {
|
|
@@ -233,10 +227,6 @@ let HelixHeadlessTour = class HelixHeadlessTour extends HelixElement {
|
|
|
233
227
|
}
|
|
234
228
|
willUpdate(changed) {
|
|
235
229
|
super.willUpdate(changed);
|
|
236
|
-
/* Only the first time, before anything reads it. A script assigning `index`
|
|
237
|
-
to a tour nobody owns would otherwise hand it to a consumer who never
|
|
238
|
-
asked, and the tour would stop moving itself from then on. See
|
|
239
|
-
`MixinControllerOpen`, which argues the whole decide-once rule. */
|
|
240
230
|
hostAria(this.internals, { label: this.label, role: 'region' });
|
|
241
231
|
}
|
|
242
232
|
updated(changed) {
|
|
@@ -313,32 +303,32 @@ let HelixHeadlessTour = class HelixHeadlessTour extends HelixElement {
|
|
|
313
303
|
}
|
|
314
304
|
};
|
|
315
305
|
__decorate([
|
|
316
|
-
property({
|
|
317
|
-
], HelixHeadlessTour.prototype, "
|
|
306
|
+
property({ attribute: 'back-label' })
|
|
307
|
+
], HelixHeadlessTour.prototype, "backLabel", void 0);
|
|
318
308
|
__decorate([
|
|
319
309
|
property({ type: Number })
|
|
320
310
|
], HelixHeadlessTour.prototype, "index", null);
|
|
321
311
|
__decorate([
|
|
322
312
|
property({ attribute: 'default-index', type: Number })
|
|
323
313
|
], HelixHeadlessTour.prototype, "defaultIndex", void 0);
|
|
314
|
+
__decorate([
|
|
315
|
+
property({ attribute: 'done-label' })
|
|
316
|
+
], HelixHeadlessTour.prototype, "doneLabel", void 0);
|
|
324
317
|
__decorate([
|
|
325
318
|
property()
|
|
326
319
|
], HelixHeadlessTour.prototype, "label", void 0);
|
|
327
|
-
__decorate([
|
|
328
|
-
property({ attribute: 'spotlight-padding', type: Number })
|
|
329
|
-
], HelixHeadlessTour.prototype, "spotlightPadding", void 0);
|
|
330
|
-
__decorate([
|
|
331
|
-
property({ attribute: 'back-label' })
|
|
332
|
-
], HelixHeadlessTour.prototype, "backLabel", void 0);
|
|
333
320
|
__decorate([
|
|
334
321
|
property({ attribute: 'next-label' })
|
|
335
322
|
], HelixHeadlessTour.prototype, "nextLabel", void 0);
|
|
336
323
|
__decorate([
|
|
337
|
-
property({
|
|
338
|
-
], HelixHeadlessTour.prototype, "
|
|
324
|
+
property({ reflect: true, type: Boolean })
|
|
325
|
+
], HelixHeadlessTour.prototype, "open", void 0);
|
|
339
326
|
__decorate([
|
|
340
327
|
property({ attribute: 'skip-label' })
|
|
341
328
|
], HelixHeadlessTour.prototype, "skipLabel", void 0);
|
|
329
|
+
__decorate([
|
|
330
|
+
property({ attribute: 'spotlight-padding', type: Number })
|
|
331
|
+
], HelixHeadlessTour.prototype, "spotlightPadding", void 0);
|
|
342
332
|
__decorate([
|
|
343
333
|
queryAssignedElements({ flatten: true })
|
|
344
334
|
], HelixHeadlessTour.prototype, "assigned", void 0);
|
|
@@ -21,9 +21,8 @@ import '../../button/index.js';
|
|
|
21
21
|
*
|
|
22
22
|
* What it does not own is the heading, the paragraph, the picture and the
|
|
23
23
|
* layout. Slot a `helix-card`, or a heading and a line of prose, or anything
|
|
24
|
-
* else.
|
|
25
|
-
*
|
|
26
|
-
* say.
|
|
24
|
+
* else. Fixed `title` and `body` parts would be a component deciding what a
|
|
25
|
+
* tour is allowed to say.
|
|
27
26
|
*
|
|
28
27
|
* **The buttons are slot fallback, so the common case costs nothing and the
|
|
29
28
|
* uncommon one is possible.** Write nothing and get Back, Next and Skip already
|
|
@@ -58,13 +57,9 @@ import '../../button/index.js';
|
|
|
58
57
|
*/
|
|
59
58
|
export declare class HelixHeadlessTourStop extends HelixElement {
|
|
60
59
|
/**
|
|
61
|
-
*
|
|
62
|
-
*/
|
|
63
|
-
for: string;
|
|
64
|
-
/**
|
|
65
|
-
* Which side of the target the panel prefers.
|
|
60
|
+
* Label for the control that goes back.
|
|
66
61
|
*/
|
|
67
|
-
|
|
62
|
+
backLabel: string;
|
|
68
63
|
/**
|
|
69
64
|
* Whether this is the stop the reader is on.
|
|
70
65
|
*
|
|
@@ -76,25 +71,29 @@ export declare class HelixHeadlessTourStop extends HelixElement {
|
|
|
76
71
|
*/
|
|
77
72
|
current: boolean;
|
|
78
73
|
/**
|
|
79
|
-
*
|
|
74
|
+
* Label for the control that goes on from the last stop.
|
|
80
75
|
*/
|
|
81
|
-
|
|
76
|
+
doneLabel: string;
|
|
82
77
|
/**
|
|
83
78
|
* Whether this is the first stop, so there is nowhere back to.
|
|
84
79
|
*/
|
|
85
80
|
first: boolean;
|
|
86
81
|
/**
|
|
87
|
-
*
|
|
82
|
+
* The id of the element this stop is about.
|
|
88
83
|
*/
|
|
89
|
-
|
|
84
|
+
for: string;
|
|
85
|
+
/**
|
|
86
|
+
* Whether this is the last stop, so the control says Done.
|
|
87
|
+
*/
|
|
88
|
+
last: boolean;
|
|
90
89
|
/**
|
|
91
90
|
* Label for the control that goes on.
|
|
92
91
|
*/
|
|
93
92
|
nextLabel: string;
|
|
94
93
|
/**
|
|
95
|
-
*
|
|
94
|
+
* Which side of the target the panel prefers.
|
|
96
95
|
*/
|
|
97
|
-
|
|
96
|
+
placement: Placement;
|
|
98
97
|
/**
|
|
99
98
|
* Label for the control that leaves the tour.
|
|
100
99
|
*/
|
|
@@ -28,9 +28,8 @@ import '../../button/index.js';
|
|
|
28
28
|
*
|
|
29
29
|
* What it does not own is the heading, the paragraph, the picture and the
|
|
30
30
|
* layout. Slot a `helix-card`, or a heading and a line of prose, or anything
|
|
31
|
-
* else.
|
|
32
|
-
*
|
|
33
|
-
* say.
|
|
31
|
+
* else. Fixed `title` and `body` parts would be a component deciding what a
|
|
32
|
+
* tour is allowed to say.
|
|
34
33
|
*
|
|
35
34
|
* **The buttons are slot fallback, so the common case costs nothing and the
|
|
36
35
|
* uncommon one is possible.** Write nothing and get Back, Next and Skip already
|
|
@@ -67,13 +66,9 @@ let HelixHeadlessTourStop = class HelixHeadlessTourStop extends HelixElement {
|
|
|
67
66
|
constructor() {
|
|
68
67
|
super(...arguments);
|
|
69
68
|
/**
|
|
70
|
-
*
|
|
71
|
-
*/
|
|
72
|
-
this.for = '';
|
|
73
|
-
/**
|
|
74
|
-
* Which side of the target the panel prefers.
|
|
69
|
+
* Label for the control that goes back.
|
|
75
70
|
*/
|
|
76
|
-
this.
|
|
71
|
+
this.backLabel = 'Back';
|
|
77
72
|
/**
|
|
78
73
|
* Whether this is the stop the reader is on.
|
|
79
74
|
*
|
|
@@ -85,25 +80,29 @@ let HelixHeadlessTourStop = class HelixHeadlessTourStop extends HelixElement {
|
|
|
85
80
|
*/
|
|
86
81
|
this.current = false;
|
|
87
82
|
/**
|
|
88
|
-
*
|
|
83
|
+
* Label for the control that goes on from the last stop.
|
|
89
84
|
*/
|
|
90
|
-
this.
|
|
85
|
+
this.doneLabel = 'Done';
|
|
91
86
|
/**
|
|
92
87
|
* Whether this is the first stop, so there is nowhere back to.
|
|
93
88
|
*/
|
|
94
89
|
this.first = false;
|
|
95
90
|
/**
|
|
96
|
-
*
|
|
91
|
+
* The id of the element this stop is about.
|
|
97
92
|
*/
|
|
98
|
-
this.
|
|
93
|
+
this.for = '';
|
|
94
|
+
/**
|
|
95
|
+
* Whether this is the last stop, so the control says Done.
|
|
96
|
+
*/
|
|
97
|
+
this.last = false;
|
|
99
98
|
/**
|
|
100
99
|
* Label for the control that goes on.
|
|
101
100
|
*/
|
|
102
101
|
this.nextLabel = 'Next';
|
|
103
102
|
/**
|
|
104
|
-
*
|
|
103
|
+
* Which side of the target the panel prefers.
|
|
105
104
|
*/
|
|
106
|
-
this.
|
|
105
|
+
this.placement = 'bottom';
|
|
107
106
|
/**
|
|
108
107
|
* Label for the control that leaves the tour.
|
|
109
108
|
*/
|
|
@@ -189,14 +188,12 @@ let HelixHeadlessTourStop = class HelixHeadlessTourStop extends HelixElement {
|
|
|
189
188
|
render() {
|
|
190
189
|
return html `<div part="bubble" popover="manual" ?hidden=${!this.current}>
|
|
191
190
|
${
|
|
192
|
-
/* The one surface in this library that draws
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
target by collision. Fusion's own taste is to leave arrows off, which
|
|
199
|
-
is a fact about the house style rather than about the system. */
|
|
191
|
+
/* The one surface in this library that draws an arrow, and every other
|
|
192
|
+
one deliberately does not. A menu or a select hangs off its trigger
|
|
193
|
+
and adjacency says what it belongs to; a tour panel is anchored to
|
|
194
|
+
something it did not open, on a page full of other things, and
|
|
195
|
+
collision may flip it to the far side of its target. Leaving arrows
|
|
196
|
+
off elsewhere is house style rather than a fact about the system. */
|
|
200
197
|
''}
|
|
201
198
|
<div part="arrow" aria-hidden="true"></div>
|
|
202
199
|
<div part="content"><slot></slot></div>
|
|
@@ -217,29 +214,29 @@ let HelixHeadlessTourStop = class HelixHeadlessTourStop extends HelixElement {
|
|
|
217
214
|
}
|
|
218
215
|
};
|
|
219
216
|
__decorate([
|
|
220
|
-
property()
|
|
221
|
-
], HelixHeadlessTourStop.prototype, "
|
|
222
|
-
__decorate([
|
|
223
|
-
property()
|
|
224
|
-
], HelixHeadlessTourStop.prototype, "placement", void 0);
|
|
217
|
+
property({ attribute: 'back-label' })
|
|
218
|
+
], HelixHeadlessTourStop.prototype, "backLabel", void 0);
|
|
225
219
|
__decorate([
|
|
226
220
|
property({ reflect: true, type: Boolean })
|
|
227
221
|
], HelixHeadlessTourStop.prototype, "current", void 0);
|
|
228
222
|
__decorate([
|
|
229
|
-
property({
|
|
230
|
-
], HelixHeadlessTourStop.prototype, "
|
|
223
|
+
property({ attribute: 'done-label' })
|
|
224
|
+
], HelixHeadlessTourStop.prototype, "doneLabel", void 0);
|
|
231
225
|
__decorate([
|
|
232
226
|
property({ reflect: true, type: Boolean })
|
|
233
227
|
], HelixHeadlessTourStop.prototype, "first", void 0);
|
|
234
228
|
__decorate([
|
|
235
|
-
property(
|
|
236
|
-
], HelixHeadlessTourStop.prototype, "
|
|
229
|
+
property()
|
|
230
|
+
], HelixHeadlessTourStop.prototype, "for", void 0);
|
|
231
|
+
__decorate([
|
|
232
|
+
property({ reflect: true, type: Boolean })
|
|
233
|
+
], HelixHeadlessTourStop.prototype, "last", void 0);
|
|
237
234
|
__decorate([
|
|
238
235
|
property({ attribute: 'next-label' })
|
|
239
236
|
], HelixHeadlessTourStop.prototype, "nextLabel", void 0);
|
|
240
237
|
__decorate([
|
|
241
|
-
property(
|
|
242
|
-
], HelixHeadlessTourStop.prototype, "
|
|
238
|
+
property()
|
|
239
|
+
], HelixHeadlessTourStop.prototype, "placement", void 0);
|
|
243
240
|
__decorate([
|
|
244
241
|
property({ attribute: 'skip-label' })
|
|
245
242
|
], HelixHeadlessTourStop.prototype, "skipLabel", void 0);
|
|
@@ -5,14 +5,12 @@ declare const HelixHeadlessTreeItem_base: (new (...args: any[]) => import("@fusi
|
|
|
5
5
|
* @summary One node in a tree.
|
|
6
6
|
*
|
|
7
7
|
* @description
|
|
8
|
-
* **`open`, on `MixinControllerOpen`,
|
|
9
|
-
*
|
|
10
|
-
* `AccordionItem`
|
|
11
|
-
* neither
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* renders, because that is the attribute a tree uses; the property is what
|
|
15
|
-
* changed, not the semantics.
|
|
8
|
+
* **`open`, on `MixinControllerOpen`, rather than a bare boolean of its own.** A
|
|
9
|
+
* branch showing its children is the same state a disclosure holds, and
|
|
10
|
+
* `AccordionItem` is on that mixin too. A hand-written toggle announces nothing,
|
|
11
|
+
* so a consumer can neither know a branch opened nor own the state.
|
|
12
|
+
* `aria-expanded` is still what the row renders, because that is the attribute a
|
|
13
|
+
* tree uses; the property is what differs, not the semantics.
|
|
16
14
|
*
|
|
17
15
|
* An element rather than a slot because it owns state: whether it is open,
|
|
18
16
|
* whether it is selected, and whether it is the one holding focus.
|
|
@@ -71,10 +69,6 @@ declare const HelixHeadlessTreeItem_base: (new (...args: any[]) => import("@fusi
|
|
|
71
69
|
* @cssproperty --tree-level - How deep this row sits, counting from zero, for the indent.
|
|
72
70
|
*/
|
|
73
71
|
export declare class HelixHeadlessTreeItem extends HelixHeadlessTreeItem_base {
|
|
74
|
-
/**
|
|
75
|
-
* Identifies the item to the consumer, carried in `helix-select`.
|
|
76
|
-
*/
|
|
77
|
-
value: string;
|
|
78
72
|
/**
|
|
79
73
|
* Where this node goes, which makes its row a real link.
|
|
80
74
|
*
|
|
@@ -84,9 +78,14 @@ export declare class HelixHeadlessTreeItem extends HelixHeadlessTreeItem_base {
|
|
|
84
78
|
*/
|
|
85
79
|
href: string;
|
|
86
80
|
/**
|
|
87
|
-
*
|
|
81
|
+
* Depth from the root, set by the tree so indentation needs no CSS nesting.
|
|
82
|
+
*
|
|
83
|
+
* Not reflected. The tree assigns this after it upgrades, so an attribute
|
|
84
|
+
* here would be a change to markup the consumer rendered and hydration would
|
|
85
|
+
* report it. The indent it drives is written onto the row instead, inside the
|
|
86
|
+
* shadow root, which is not part of the tree React hydrates.
|
|
88
87
|
*/
|
|
89
|
-
|
|
88
|
+
level?: number;
|
|
90
89
|
/**
|
|
91
90
|
* What the link declares about where it goes.
|
|
92
91
|
*
|
|
@@ -101,25 +100,21 @@ export declare class HelixHeadlessTreeItem extends HelixHeadlessTreeItem_base {
|
|
|
101
100
|
*
|
|
102
101
|
* Not reflected, for the reason `level` below gives in full: the tree assigns
|
|
103
102
|
* this after it upgrades, so the attribute would be a change to markup the
|
|
104
|
-
* consumer rendered and hydration would report it.
|
|
105
|
-
*
|
|
103
|
+
* consumer rendered and hydration would report it. Mirroring to
|
|
104
|
+
* `data-selected` on the host instead is the same fault under another name.
|
|
106
105
|
*
|
|
107
|
-
* The stylesheet reads it from the row inside this shadow root,
|
|
108
|
-
*
|
|
109
|
-
* onto the row rather than onto the host, because the row is not part of the
|
|
110
|
-
* tree React hydrates. Mirroring to `data-selected` on the host instead was
|
|
111
|
-
* the same fault with a different name, and React said so.
|
|
106
|
+
* The stylesheet reads it from the row inside this shadow root, because the
|
|
107
|
+
* row is not part of the tree React hydrates.
|
|
112
108
|
*/
|
|
113
109
|
selected: boolean;
|
|
114
110
|
/**
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
* Not reflected. The tree assigns this after it upgrades, so an attribute
|
|
118
|
-
* here would be a change to markup the consumer rendered and hydration would
|
|
119
|
-
* report it. The indent it drives is written onto the row instead, inside the
|
|
120
|
-
* shadow root, which is not part of the tree React hydrates.
|
|
111
|
+
* Where the link opens, for the rare row that leaves the site.
|
|
121
112
|
*/
|
|
122
|
-
|
|
113
|
+
target: string;
|
|
114
|
+
/**
|
|
115
|
+
* Identifies the item to the consumer, carried in `helix-select`.
|
|
116
|
+
*/
|
|
117
|
+
value: string;
|
|
123
118
|
/**
|
|
124
119
|
* Whether this item holds the tree's single tab stop.
|
|
125
120
|
*/
|
|
@@ -152,9 +147,9 @@ export declare class HelixHeadlessTreeItem extends HelixHeadlessTreeItem_base {
|
|
|
152
147
|
*
|
|
153
148
|
* Selecting and following are two things and this is where they meet, so the
|
|
154
149
|
* pointer and the keyboard take one path to the same end. The tree calls this
|
|
155
|
-
* rather than `select` for the keyboard,
|
|
156
|
-
*
|
|
157
|
-
*
|
|
150
|
+
* rather than `select` for the keyboard, or a nav tree whose rows are links
|
|
151
|
+
* could be walked with the arrows and never entered: choosing announces a
|
|
152
|
+
* value and nothing listens for it.
|
|
158
153
|
*/
|
|
159
154
|
activate(): void;
|
|
160
155
|
/**
|
|
@@ -185,9 +180,9 @@ export declare class HelixHeadlessTreeItem extends HelixHeadlessTreeItem_base {
|
|
|
185
180
|
/**
|
|
186
181
|
* Mirrors the chosen state where a stylesheet can select on it.
|
|
187
182
|
*
|
|
188
|
-
* **A custom state
|
|
189
|
-
*
|
|
190
|
-
*
|
|
183
|
+
* **A custom state, never a reflected `selected` attribute.** The parent
|
|
184
|
+
* writes this: a listbox choosing a row, a tab strip moving the tab, a radio
|
|
185
|
+
* group answering for its set. Reflected, that puts the element's own
|
|
191
186
|
* bookkeeping onto markup a consumer wrote and a consumer's server never sent,
|
|
192
187
|
* which React reconciles and reports as a mismatch, and which a serialized
|
|
193
188
|
* element pasted back declares as a choice nobody made. `ElementInternals`
|
|
@@ -195,7 +190,7 @@ export declare class HelixHeadlessTreeItem extends HelixHeadlessTreeItem_base {
|
|
|
195
190
|
*
|
|
196
191
|
* Reading `selected` is unaffected and so is writing it: the attribute still
|
|
197
192
|
* seeds the property, which is what `<helix-tree-item selected>` in a consumer's
|
|
198
|
-
* markup means. What stops is the write back.
|
|
193
|
+
* markup means. What stops is the write back.
|
|
199
194
|
*/
|
|
200
195
|
protected willUpdate(changed: PropertyValues): void;
|
|
201
196
|
protected render(): TemplateResult;
|