@fusion.dev/helix-headless 0.228.0 → 0.229.1
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/api.json +1 -1
- package/custom-elements.json +1 -1
- package/dist/announcement/root/announcement-root.d.ts +0 -23
- package/dist/announcement/root/announcement-root.js +0 -3
- package/dist/button-group/root/button-group-root.d.ts +2 -3
- package/dist/canvas/edge/canvas-edge.d.ts +9 -9
- package/dist/canvas/edge/canvas-edge.js +3 -3
- package/dist/canvas/node/canvas-node.d.ts +1 -1
- package/dist/canvas/node/canvas-node.js +1 -1
- package/dist/canvas/root/canvas-root.js +1 -1
- package/dist/code-block/root/code-block-root.d.ts +9 -9
- package/dist/code-block/root/code-block-root.js +4 -4
- package/dist/color-input/root/color-input-root.d.ts +7 -7
- package/dist/color-input/root/color-input-root.js +9 -9
- package/dist/filter-input/chip/filter-chip.js +1 -1
- package/dist/image/root/image-root.d.ts +3 -0
- package/dist/image/root/image-root.js +9 -6
- package/dist/list/root/list-root.d.ts +1 -1
- package/dist/list/root/list-root.js +2 -1
- package/dist/map/marker/map-marker.d.ts +1 -1
- package/dist/map/marker/map-marker.js +1 -1
- package/dist/megamenu/root/megamenu-root.d.ts +24 -24
- package/dist/megamenu/root/megamenu-root.js +4 -4
- package/dist/meter/segment/meter-segment.d.ts +0 -5
- package/dist/meter/segment/meter-segment.js +0 -3
- package/dist/navigation/root/navigation-root.d.ts +7 -7
- package/dist/navigation/root/navigation-root.js +2 -2
- package/dist/option/root/option-root.d.ts +1 -1
- package/dist/option/root/option-root.js +3 -3
- package/dist/outline/root/outline-root.d.ts +21 -21
- package/dist/outline/root/outline-root.js +6 -6
- package/dist/radio/root/radio-root.d.ts +1 -1
- package/dist/select/root/select-root.js +1 -1
- package/dist/spatial-bar-chart/root/spatial-bar-chart-root.d.ts +33 -33
- package/dist/spatial-bar-chart/root/spatial-bar-chart-root.js +5 -5
- package/dist/steps/root/steps-root.d.ts +17 -17
- package/dist/steps/root/steps-root.js +3 -3
- package/dist/switch/root/switch-root.d.ts +1 -0
- package/dist/switch/root/switch-root.js +4 -0
- package/dist/tabs/root/tabs-root.d.ts +13 -13
- package/dist/tabs/root/tabs-root.js +3 -3
- package/dist/time-input/root/time-input-root.d.ts +26 -26
- package/dist/time-input/root/time-input-root.js +10 -10
- package/dist/time-picker/root/time-picker-root.d.ts +40 -40
- package/dist/time-picker/root/time-picker-root.js +10 -10
- package/examples.json +1 -1
- package/lint.json +1 -1
- package/package.json +5 -5
- package/types/jsx.d.ts +207 -237
- package/types/vue.d.ts +159 -184
- package/types/words.d.ts +8 -1
|
@@ -116,29 +116,6 @@ export declare class HelixHeadlessAnnouncement extends HelixHeadlessAnnouncement
|
|
|
116
116
|
* Off by default, so every announcement on a page shows at once.
|
|
117
117
|
*/
|
|
118
118
|
queued: boolean;
|
|
119
|
-
/**
|
|
120
|
-
* The band's color.
|
|
121
|
-
*
|
|
122
|
-
* Paint only: unlike `Callout`, no value here draws a mark, changes the label,
|
|
123
|
-
* or moves the live region off polite. `neutral` is the resting value, said
|
|
124
|
-
* out loud so a consumer can put a band back to it from markup.
|
|
125
|
-
*
|
|
126
|
-
* **The set is `Tag`'s and `Badge`'s, and now actually is.** This doc claimed
|
|
127
|
-
* to match `Tag` while differing from it in both directions: it carried
|
|
128
|
-
* `surface`, which `Tag` does not, and lacked `accent`, which `Tag` has. Three
|
|
129
|
-
* components saying what a thing means, in three vocabularies, one of which
|
|
130
|
-
* described itself as a fourth.
|
|
131
|
-
*
|
|
132
|
-
* `accent` is the second emphasis, the second color a theme names, and the
|
|
133
|
-
* brand itself until one is named. `primary` is the brand.
|
|
134
|
-
*
|
|
135
|
-
* **`surface` was never a color and has moved to `separation`**, which is the
|
|
136
|
-
* axis that owns where a box sits relative to the page. It said the band rode
|
|
137
|
-
* the surface step instead of the sunken one, which is an elevation, and a
|
|
138
|
-
* band can be `info` and elevated at once: two values true together are two
|
|
139
|
-
* axes, which is the test the registry answers to.
|
|
140
|
-
*/
|
|
141
|
-
tone?: 'accent' | 'danger' | 'info' | 'neutral' | 'primary' | 'success' | 'warning';
|
|
142
119
|
/** Whether a queued announcement before this one is still there. */
|
|
143
120
|
private waiting;
|
|
144
121
|
/** Watches the parent for the announcements before this one leaving. */
|
|
@@ -213,9 +213,6 @@ __decorate([
|
|
|
213
213
|
__decorate([
|
|
214
214
|
property({ reflect: true, type: Boolean })
|
|
215
215
|
], HelixHeadlessAnnouncement.prototype, "queued", void 0);
|
|
216
|
-
__decorate([
|
|
217
|
-
property({ reflect: true })
|
|
218
|
-
], HelixHeadlessAnnouncement.prototype, "tone", void 0);
|
|
219
216
|
__decorate([
|
|
220
217
|
state()
|
|
221
218
|
], HelixHeadlessAnnouncement.prototype, "waiting", void 0);
|
|
@@ -103,9 +103,8 @@ export declare class HelixHeadlessButtonGroup extends HelixElement {
|
|
|
103
103
|
* Unset is a row and stays unset, so a reflected default cannot appear on a
|
|
104
104
|
* host whose server output never had it.
|
|
105
105
|
*
|
|
106
|
-
* **A property and not an `auto`, which the splitter and
|
|
107
|
-
*
|
|
108
|
-
* arrow keys, how many slides a page holds. A group of buttons turning is
|
|
106
|
+
* **A property and not an `auto`, which the splitter earned and this has not.**
|
|
107
|
+
* Turning a splitter changes what it *does*: a drag axis and arrow keys. A group of buttons turning is
|
|
109
108
|
* paint, so there is no state to resolve and nothing to observe; what it needs
|
|
110
109
|
* is for a consumer who knows the column is narrow to be able to say so.
|
|
111
110
|
*
|
|
@@ -64,6 +64,15 @@ export declare class HelixHeadlessCanvasEdge extends HelixElement {
|
|
|
64
64
|
* the board can draw.
|
|
65
65
|
*/
|
|
66
66
|
readOnly: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* How the line is drawn: `dashed` or `dotted`. Unset is solid.
|
|
69
|
+
*
|
|
70
|
+
* **A stroke rather than an axis**, which is what the registry keeps it for:
|
|
71
|
+
* no other family draws a line whose stroke says something, and a dashed
|
|
72
|
+
* connection is the ordinary way to draw a weaker or an optional one. On the
|
|
73
|
+
* headless tier because the board that draws the line is.
|
|
74
|
+
*/
|
|
75
|
+
stroke?: 'dashed' | 'dotted';
|
|
67
76
|
/** The name of the card the connection ends at. */
|
|
68
77
|
to: string;
|
|
69
78
|
/** The marker at the end of the connection. Unset is an arrow, as JSON Canvas specifies. */
|
|
@@ -79,15 +88,6 @@ export declare class HelixHeadlessCanvasEdge extends HelixElement {
|
|
|
79
88
|
tone?: 'accent' | 'danger' | 'info' | 'neutral' | 'primary' | 'success' | 'warning';
|
|
80
89
|
/** The side of the `to` card the connection arrives at, when the document sets one. */
|
|
81
90
|
toSide?: CanvasSide | undefined;
|
|
82
|
-
/**
|
|
83
|
-
* How the line is drawn: `dashed` or `dotted`. Unset is solid.
|
|
84
|
-
*
|
|
85
|
-
* **A variant rather than an axis**, which is what the registry keeps it for:
|
|
86
|
-
* no other family draws a line whose stroke says something, and a dashed
|
|
87
|
-
* connection is the ordinary way to draw a weaker or an optional one. On the
|
|
88
|
-
* headless tier because the board that draws the line is.
|
|
89
|
-
*/
|
|
90
|
-
variant?: 'dashed' | 'dotted';
|
|
91
91
|
/**
|
|
92
92
|
* Tells the board the connector changed, since the board is what draws it.
|
|
93
93
|
*
|
|
@@ -40,6 +40,9 @@ __decorate([
|
|
|
40
40
|
__decorate([
|
|
41
41
|
property({ attribute: 'readonly', reflect: true, type: Boolean })
|
|
42
42
|
], HelixHeadlessCanvasEdge.prototype, "readOnly", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
property({ reflect: true })
|
|
45
|
+
], HelixHeadlessCanvasEdge.prototype, "stroke", void 0);
|
|
43
46
|
__decorate([
|
|
44
47
|
property()
|
|
45
48
|
], HelixHeadlessCanvasEdge.prototype, "to", void 0);
|
|
@@ -52,9 +55,6 @@ __decorate([
|
|
|
52
55
|
__decorate([
|
|
53
56
|
property({ attribute: 'to-side' })
|
|
54
57
|
], HelixHeadlessCanvasEdge.prototype, "toSide", void 0);
|
|
55
|
-
__decorate([
|
|
56
|
-
property({ reflect: true })
|
|
57
|
-
], HelixHeadlessCanvasEdge.prototype, "variant", void 0);
|
|
58
58
|
HelixHeadlessCanvasEdge = __decorate([
|
|
59
59
|
customElement('helix-headless-canvas-edge')
|
|
60
60
|
], HelixHeadlessCanvasEdge);
|
|
@@ -55,8 +55,8 @@ import { type PropertyValues, type TemplateResult } from 'lit';
|
|
|
55
55
|
* @csspart node - The box the content sits in.
|
|
56
56
|
* @csspart outline - The drawn outline of a `diamond` card, a shape a box cannot draw.
|
|
57
57
|
*
|
|
58
|
+
* @cssstate active - The card that receives focus when you tab into the board.
|
|
58
59
|
* @cssstate candidate - While a connection is being drawn and this card is somewhere it could arrive.
|
|
59
|
-
* @cssstate current - The card that receives focus when you tab into the board.
|
|
60
60
|
* @cssstate placed - Placed on the board.
|
|
61
61
|
* @cssstate selected - The card is selected.
|
|
62
62
|
* @cssstate target - A connection being drawn would end here if you released it.
|
|
@@ -48,7 +48,7 @@ let HelixHeadlessCanvasNode = class HelixHeadlessCanvasNode extends HelixElement
|
|
|
48
48
|
willUpdate(changed) {
|
|
49
49
|
super.willUpdate(changed);
|
|
50
50
|
this.toggleState('candidate', this.candidate);
|
|
51
|
-
this.toggleState('
|
|
51
|
+
this.toggleState('active', this.current);
|
|
52
52
|
this.toggleState('selected', this.selected);
|
|
53
53
|
this.toggleState('target', this.target);
|
|
54
54
|
}
|
|
@@ -2277,7 +2277,7 @@ let HelixHeadlessCanvas = class HelixHeadlessCanvas extends MixinViewport(HelixE
|
|
|
2277
2277
|
d=${drawn.d}
|
|
2278
2278
|
data-selected=${pickedKeys.has(key) ? '' : nothing}
|
|
2279
2279
|
data-tone=${element?.tone ?? nothing}
|
|
2280
|
-
data-
|
|
2280
|
+
data-stroke=${element?.stroke ?? nothing}
|
|
2281
2281
|
fill="none"
|
|
2282
2282
|
marker-end=${ends.end ? `url(#${ARROW})` : nothing}
|
|
2283
2283
|
marker-start=${ends.start ? `url(#${ARROW})` : nothing}
|
|
@@ -72,7 +72,7 @@ import { HighlighterController } from '../highlighter.js';
|
|
|
72
72
|
* depend on color. Where a removed line is paired with the added line that
|
|
73
73
|
* replaced it, the words each does not share with the other are the `changed`
|
|
74
74
|
* part, so the eye goes to what changed within the line. Each file in the patch is its own block under its own name,
|
|
75
|
-
* and its copy button copies the new version of the file. `
|
|
75
|
+
* and its copy button copies the new version of the file. `layout="split"`
|
|
76
76
|
* shows the old version beside the new, each removal opposite its replacement.
|
|
77
77
|
* `context-lines` folds each long run of unchanged lines, keeping that many
|
|
78
78
|
* beside each change, behind a button that shows them and hides them again,
|
|
@@ -311,6 +311,14 @@ export declare class HelixHeadlessCodeBlock extends HelixElement {
|
|
|
311
311
|
* `highlight` an empty string and names nothing.
|
|
312
312
|
*/
|
|
313
313
|
language: string;
|
|
314
|
+
/**
|
|
315
|
+
* How a diff's two versions are arranged. It has no effect without `diff`.
|
|
316
|
+
*
|
|
317
|
+
* Absent is unified, each removal above its replacement, which fits any
|
|
318
|
+
* width. `split` sets the old version beside the new one. Optional rather
|
|
319
|
+
* than defaulted, so the host carries no attribute the consumer did not write.
|
|
320
|
+
*/
|
|
321
|
+
layout?: 'split';
|
|
314
322
|
/**
|
|
315
323
|
* Whether the lines are numbered in a gutter beside the code.
|
|
316
324
|
*
|
|
@@ -358,14 +366,6 @@ export declare class HelixHeadlessCodeBlock extends HelixElement {
|
|
|
358
366
|
* diff with `context-lines`. `{count}` is how many.
|
|
359
367
|
*/
|
|
360
368
|
showUnchangedLabel: string;
|
|
361
|
-
/**
|
|
362
|
-
* How a diff's two versions are arranged. It has no effect without `diff`.
|
|
363
|
-
*
|
|
364
|
-
* Absent is unified, each removal above its replacement, which fits any
|
|
365
|
-
* width. `split` sets the old version beside the new one. Optional rather
|
|
366
|
-
* than defaulted, so the host carries no attribute the consumer did not write.
|
|
367
|
-
*/
|
|
368
|
-
variant?: 'split';
|
|
369
369
|
/**
|
|
370
370
|
* Whether long lines wrap. Without it they scroll.
|
|
371
371
|
*
|
|
@@ -504,7 +504,7 @@ let HelixHeadlessCodeBlock = class HelixHeadlessCodeBlock extends HelixElement {
|
|
|
504
504
|
return html `<div part="file">
|
|
505
505
|
${this.renderHeader(name, now)}
|
|
506
506
|
<div part="frame">
|
|
507
|
-
${this.
|
|
507
|
+
${this.layout === 'split'
|
|
508
508
|
? this.renderSplit(file, width, at)
|
|
509
509
|
: html `<pre part="block" translate="no"><code part="code">${file.hunks.map((hunk, h) => html `${this.renderHunk(hunk)}${this.runsOf(hunk).map((run) => run.folded
|
|
510
510
|
? this.renderFold(run, `${at}:${h}:${run.start}`, (line) => this.renderLine(line, width))
|
|
@@ -575,6 +575,9 @@ __decorate([
|
|
|
575
575
|
__decorate([
|
|
576
576
|
property()
|
|
577
577
|
], HelixHeadlessCodeBlock.prototype, "language", void 0);
|
|
578
|
+
__decorate([
|
|
579
|
+
property({ reflect: true })
|
|
580
|
+
], HelixHeadlessCodeBlock.prototype, "layout", void 0);
|
|
578
581
|
__decorate([
|
|
579
582
|
property({ attribute: 'line-numbers', reflect: true, type: Boolean })
|
|
580
583
|
], HelixHeadlessCodeBlock.prototype, "lineNumbers", void 0);
|
|
@@ -591,9 +594,6 @@ __decorate([
|
|
|
591
594
|
words,
|
|
592
595
|
property({ attribute: 'show-unchanged-label' })
|
|
593
596
|
], HelixHeadlessCodeBlock.prototype, "showUnchangedLabel", void 0);
|
|
594
|
-
__decorate([
|
|
595
|
-
property({ reflect: true })
|
|
596
|
-
], HelixHeadlessCodeBlock.prototype, "variant", void 0);
|
|
597
597
|
__decorate([
|
|
598
598
|
property({ reflect: true, type: Boolean })
|
|
599
599
|
], HelixHeadlessCodeBlock.prototype, "wrap", void 0);
|
|
@@ -60,7 +60,7 @@ declare const HelixHeadlessColorInput_base: (new (...args: any[]) => import("@fu
|
|
|
60
60
|
* @event {Event} input - Fired as the value changes.
|
|
61
61
|
* @event {ToggleEvent} toggle - The panel opened or closed. The event carries `newState` and `oldState`.
|
|
62
62
|
*
|
|
63
|
-
* @csspart control - The text input that holds the value. Absent in the `swatch`
|
|
63
|
+
* @csspart control - The text input that holds the value. Absent in the `swatch` trigger.
|
|
64
64
|
* @csspart feedback - The message that says what is wrong with the value.
|
|
65
65
|
* @csspart field - The box holding the text and the trigger.
|
|
66
66
|
* @csspart hint - Help text under the field, shown while there is no feedback.
|
|
@@ -194,15 +194,11 @@ export declare class HelixHeadlessColorInput extends HelixHeadlessColorInput_bas
|
|
|
194
194
|
*/
|
|
195
195
|
swatches: string;
|
|
196
196
|
/**
|
|
197
|
-
* What the swatch says in `
|
|
197
|
+
* What the swatch says in `trigger="swatch"`, after the field's label, once
|
|
198
198
|
* there is a color. `{name}` is the color's name, such as "vibrant red", and
|
|
199
199
|
* `{value}` the value as written.
|
|
200
200
|
*/
|
|
201
201
|
swatchLabel: string;
|
|
202
|
-
/**
|
|
203
|
-
* Accessible name for the control that opens the panel.
|
|
204
|
-
*/
|
|
205
|
-
triggerLabel: string;
|
|
206
202
|
/**
|
|
207
203
|
* Whether the field is a text box with a swatch on it, or only the swatch.
|
|
208
204
|
*
|
|
@@ -220,7 +216,11 @@ export declare class HelixHeadlessColorInput extends HelixHeadlessColorInput_bas
|
|
|
220
216
|
* be read or pasted into without opening the panel, which is worse for a form
|
|
221
217
|
* where the color is the answer rather than a setting.
|
|
222
218
|
*/
|
|
223
|
-
|
|
219
|
+
trigger?: 'swatch';
|
|
220
|
+
/**
|
|
221
|
+
* Accessible name for the control that opens the panel.
|
|
222
|
+
*/
|
|
223
|
+
triggerLabel: string;
|
|
224
224
|
/**
|
|
225
225
|
* Draws the panel's hue as a wheel around the square, in place of the hue
|
|
226
226
|
* ramp. See Color Picker's `wheel`.
|
|
@@ -68,7 +68,7 @@ let HelixHeadlessColorInput = class HelixHeadlessColorInput extends MixinPickerF
|
|
|
68
68
|
return this.control ?? this.partNamed('trigger');
|
|
69
69
|
}
|
|
70
70
|
renderSwatchValue() {
|
|
71
|
-
return this.
|
|
71
|
+
return this.trigger === 'swatch'
|
|
72
72
|
? html `<span id="swatch-value" hidden>${this.swatchWords}</span>`
|
|
73
73
|
: nothing;
|
|
74
74
|
}
|
|
@@ -139,7 +139,7 @@ let HelixHeadlessColorInput = class HelixHeadlessColorInput extends MixinPickerF
|
|
|
139
139
|
?wheel=${this.wheel}
|
|
140
140
|
?channel-fields=${this.channelFields}
|
|
141
141
|
?no-format=${this.noFormat}
|
|
142
|
-
?no-value=${this.
|
|
142
|
+
?no-value=${this.trigger !== 'swatch'}
|
|
143
143
|
.colorWords=${this.colorWords}
|
|
144
144
|
.format=${this.format ?? 'hex'}
|
|
145
145
|
.value=${this.picked}
|
|
@@ -163,7 +163,7 @@ let HelixHeadlessColorInput = class HelixHeadlessColorInput extends MixinPickerF
|
|
|
163
163
|
comment: it is inside a tagged template, so one would end the
|
|
164
164
|
literal and the error lands on a line further down. -->
|
|
165
165
|
<slot name="start"></slot>
|
|
166
|
-
${this.
|
|
166
|
+
${this.trigger === 'swatch'
|
|
167
167
|
? nothing
|
|
168
168
|
: html `<input
|
|
169
169
|
part="control"
|
|
@@ -186,14 +186,14 @@ let HelixHeadlessColorInput = class HelixHeadlessColorInput extends MixinPickerF
|
|
|
186
186
|
<slot name="end"></slot>
|
|
187
187
|
<button
|
|
188
188
|
part="trigger"
|
|
189
|
-
id=${this.
|
|
189
|
+
id=${this.trigger === 'swatch' ? 'control' : nothing}
|
|
190
190
|
type="button"
|
|
191
191
|
aria-controls="surface"
|
|
192
192
|
aria-disabled=${this.readOnly ? 'true' : nothing}
|
|
193
193
|
aria-expanded=${this.open ? 'true' : 'false'}
|
|
194
194
|
aria-haspopup="dialog"
|
|
195
|
-
aria-label=${this.
|
|
196
|
-
aria-labelledby=${this.
|
|
195
|
+
aria-label=${this.trigger === 'swatch' ? nothing : this.triggerLabel}
|
|
196
|
+
aria-labelledby=${this.trigger === 'swatch'
|
|
197
197
|
? this.labeled
|
|
198
198
|
? `${this.labelId} swatch-value`
|
|
199
199
|
: 'swatch-value'
|
|
@@ -257,13 +257,13 @@ __decorate([
|
|
|
257
257
|
words,
|
|
258
258
|
property({ attribute: 'swatch-label' })
|
|
259
259
|
], HelixHeadlessColorInput.prototype, "swatchLabel", void 0);
|
|
260
|
+
__decorate([
|
|
261
|
+
property({ reflect: true })
|
|
262
|
+
], HelixHeadlessColorInput.prototype, "trigger", void 0);
|
|
260
263
|
__decorate([
|
|
261
264
|
words,
|
|
262
265
|
property({ attribute: 'trigger-label' })
|
|
263
266
|
], HelixHeadlessColorInput.prototype, "triggerLabel", void 0);
|
|
264
|
-
__decorate([
|
|
265
|
-
property({ reflect: true })
|
|
266
|
-
], HelixHeadlessColorInput.prototype, "variant", void 0);
|
|
267
267
|
__decorate([
|
|
268
268
|
property({ reflect: true, type: Boolean })
|
|
269
269
|
], HelixHeadlessColorInput.prototype, "wheel", void 0);
|
|
@@ -33,7 +33,7 @@ let HelixHeadlessFilterChip = class HelixHeadlessFilterChip extends MixinDismiss
|
|
|
33
33
|
${operator
|
|
34
34
|
? html `<span part="operator"><slot name="operator">${this.operatorLabel}</slot></span>`
|
|
35
35
|
: nothing}
|
|
36
|
-
|
|
36
|
+
<span part="values" ?hidden=${!values}><slot></slot></span>
|
|
37
37
|
${this.dismissible
|
|
38
38
|
? html `<button
|
|
39
39
|
part="dismiss"
|
|
@@ -40,6 +40,7 @@ import { type PropertyValues, type TemplateResult } from 'lit';
|
|
|
40
40
|
* @event {Event} load - The image loaded. Relayed from the inner image, whose own event stays inside the shadow root.
|
|
41
41
|
*
|
|
42
42
|
* @csspart fallback - The fallback, shown when the image fails to load.
|
|
43
|
+
* @csspart fallback-mark - The mark drawn where a failed image has no `fallback` slot.
|
|
43
44
|
* @csspart image - The image itself.
|
|
44
45
|
* @csspart placeholder - The placeholder, shown until the image loads.
|
|
45
46
|
*
|
|
@@ -239,6 +240,8 @@ export declare class HelixHeadlessImage extends HelixElement {
|
|
|
239
240
|
get naturalHeight(): number;
|
|
240
241
|
/** The image's intrinsic width in pixels. Zero until the image loads. */
|
|
241
242
|
get naturalWidth(): number;
|
|
243
|
+
/** What a failed image shows, a mark where the `fallback` slot is empty. */
|
|
244
|
+
protected renderFallback(): TemplateResult;
|
|
242
245
|
protected render(): TemplateResult;
|
|
243
246
|
}
|
|
244
247
|
declare global {
|
|
@@ -124,6 +124,14 @@ let HelixHeadlessImage = class HelixHeadlessImage extends HelixElement {
|
|
|
124
124
|
get naturalWidth() {
|
|
125
125
|
return this.image?.naturalWidth ?? 0;
|
|
126
126
|
}
|
|
127
|
+
renderFallback() {
|
|
128
|
+
return html `<span
|
|
129
|
+
part="fallback"
|
|
130
|
+
aria-hidden=${this.status === 'error' ? nothing : 'true'}
|
|
131
|
+
?hidden=${this.status !== 'error'}
|
|
132
|
+
><slot name="fallback"><span part="fallback-mark"></span></slot
|
|
133
|
+
></span>`;
|
|
134
|
+
}
|
|
127
135
|
render() {
|
|
128
136
|
return html `<img
|
|
129
137
|
part="image"
|
|
@@ -145,12 +153,7 @@ let HelixHeadlessImage = class HelixHeadlessImage extends HelixElement {
|
|
|
145
153
|
?hidden=${this.status !== 'loading' || this.waiting}
|
|
146
154
|
><slot name="placeholder"></slot
|
|
147
155
|
></span>
|
|
148
|
-
|
|
149
|
-
part="fallback"
|
|
150
|
-
aria-hidden=${this.status === 'error' ? nothing : 'true'}
|
|
151
|
-
?hidden=${this.status !== 'error'}
|
|
152
|
-
><slot name="fallback"></slot
|
|
153
|
-
></span>`;
|
|
156
|
+
${this.renderFallback()}`;
|
|
154
157
|
}
|
|
155
158
|
};
|
|
156
159
|
__decorate([
|
|
@@ -146,7 +146,7 @@ export declare class HelixHeadlessList extends HelixElement {
|
|
|
146
146
|
emptyLabel?: string;
|
|
147
147
|
/**
|
|
148
148
|
* The text of the row shown while the list has no rows, where the `empty`
|
|
149
|
-
* slot is empty.
|
|
149
|
+
* slot is empty. An empty string shows no row.
|
|
150
150
|
*/
|
|
151
151
|
emptyText: string;
|
|
152
152
|
/**
|
|
@@ -11,7 +11,7 @@ let HelixHeadlessList = class HelixHeadlessList extends HelixElement {
|
|
|
11
11
|
super(...arguments);
|
|
12
12
|
this.canceledLabel = 'Canceled';
|
|
13
13
|
this.droppedLabel = 'Dropped';
|
|
14
|
-
this.emptyText = '';
|
|
14
|
+
this.emptyText = 'No items';
|
|
15
15
|
this.label = '';
|
|
16
16
|
this.loading = false;
|
|
17
17
|
this.loadingText = 'Loading more';
|
|
@@ -461,6 +461,7 @@ __decorate([
|
|
|
461
461
|
property({ attribute: 'empty-label' })
|
|
462
462
|
], HelixHeadlessList.prototype, "emptyLabel", void 0);
|
|
463
463
|
__decorate([
|
|
464
|
+
words,
|
|
464
465
|
property({ attribute: 'empty-text' })
|
|
465
466
|
], HelixHeadlessList.prototype, "emptyText", void 0);
|
|
466
467
|
__decorate([
|
|
@@ -30,10 +30,10 @@ import { type PropertyValues, type TemplateResult } from 'lit';
|
|
|
30
30
|
* @csspart marker - The button, holding the point and the name.
|
|
31
31
|
* @csspart point - The dot on the place, holding the icon if there is one.
|
|
32
32
|
*
|
|
33
|
+
* @cssstate active - Holds the map's tab stop.
|
|
33
34
|
* @cssstate behind - On the far side of a globe, out of sight until the globe turns it into view.
|
|
34
35
|
* @cssstate cluster - Shows several markers as one count.
|
|
35
36
|
* @cssstate clustered - Hidden inside another marker's cluster.
|
|
36
|
-
* @cssstate current - Holds the map's tab stop.
|
|
37
37
|
* @cssstate fanned - Spread out from a location it shares with other markers, after their cluster was pressed.
|
|
38
38
|
* @cssstate icon - Has content in the icon slot.
|
|
39
39
|
* @cssstate passed - Marked as passed.
|
|
@@ -44,7 +44,7 @@ let HelixHeadlessMapMarker = class HelixHeadlessMapMarker extends HelixElement {
|
|
|
44
44
|
this.toggleState('behind', this.behind);
|
|
45
45
|
this.toggleState('cluster', this.gathered.length > 1);
|
|
46
46
|
this.toggleState('clustered', this.gatheredBy !== undefined);
|
|
47
|
-
this.toggleState('
|
|
47
|
+
this.toggleState('active', this.current);
|
|
48
48
|
this.toggleState('fanned', this.fanned);
|
|
49
49
|
this.toggleState('passed', this.passed);
|
|
50
50
|
this.toggleState('start', this.side === 'start');
|
|
@@ -94,7 +94,7 @@ declare const HelixHeadlessMegamenu_base: (new (...args: any[]) => import("@fusi
|
|
|
94
94
|
* @cssstate current - A link in the panel carries `aria-current="page"`, so the trigger can show the section you are in.
|
|
95
95
|
* @cssstate from-end - The panel opened in place of one earlier in the bar, so it can enter from the end side.
|
|
96
96
|
* @cssstate from-start - The panel opened in place of one later in the bar, so it can enter from the start side.
|
|
97
|
-
* @cssstate narrow - The page is narrower than `band-below`, so the panel is shown as a band whatever its
|
|
97
|
+
* @cssstate narrow - The page is narrower than `band-below`, so the panel is shown as a band whatever its layout.
|
|
98
98
|
* @cssstate open - The panel is open, and the trigger is shown as current.
|
|
99
99
|
* @cssstate to-end - The panel closed because one earlier in the bar opened, so it can leave toward the end.
|
|
100
100
|
* @cssstate to-start - The panel closed because one later in the bar opened, so it can leave toward the start.
|
|
@@ -139,6 +139,29 @@ export declare class HelixHeadlessMegamenu extends HelixHeadlessMegamenu_base {
|
|
|
139
139
|
* The section's name, used for the default trigger and the panel.
|
|
140
140
|
*/
|
|
141
141
|
label: string;
|
|
142
|
+
/**
|
|
143
|
+
* Whether the panel is a card under the trigger or a band across the page.
|
|
144
|
+
*
|
|
145
|
+
* The resting one is the card, hanging off the trigger and as wide as it
|
|
146
|
+
* needs to be. `band` is the other shape navigations use: a run from edge to
|
|
147
|
+
* edge under the header, with its contents held to the page's own measure, so
|
|
148
|
+
* a set of destinations too wide to sit under one word gets the whole width
|
|
149
|
+
* to lay out in.
|
|
150
|
+
*
|
|
151
|
+
* **A band and not a width, which is why the word is not `full`.** It changes
|
|
152
|
+
* where the panel goes as well as how wide it is, which is why this tier
|
|
153
|
+
* knows about it at all: a band spans the viewport, so there is nothing to
|
|
154
|
+
* measure it against and nothing to flip or shift to, and the placing pass is
|
|
155
|
+
* told not to run. Everything else the popover gives, the top layer and the
|
|
156
|
+
* dismissal, is exactly what such a band needs. `full` is the registry's word
|
|
157
|
+
* for a width, and `Button` and `Dialog` are the two families answering that
|
|
158
|
+
* question; borrowing it here would put a third meaning on it.
|
|
159
|
+
*
|
|
160
|
+
* `layout` and not an axis, for the reason the registry gives: a card under
|
|
161
|
+
* a word and a band under a header are two arrangements this family has, and
|
|
162
|
+
* no other family is being asked the same question.
|
|
163
|
+
*/
|
|
164
|
+
layout?: 'band';
|
|
142
165
|
/**
|
|
143
166
|
* How long a pointer rests on the trigger before the panel opens, in
|
|
144
167
|
* milliseconds, under `open-on="hover"`. A pointer crossing the bar on its
|
|
@@ -162,29 +185,6 @@ export declare class HelixHeadlessMegamenu extends HelixHeadlessMegamenu_base {
|
|
|
162
185
|
* page under its bar.
|
|
163
186
|
*/
|
|
164
187
|
placement: Placement;
|
|
165
|
-
/**
|
|
166
|
-
* Whether the panel is a card under the trigger or a band across the page.
|
|
167
|
-
*
|
|
168
|
-
* The resting one is the card, hanging off the trigger and as wide as it
|
|
169
|
-
* needs to be. `band` is the other shape navigations use: a run from edge to
|
|
170
|
-
* edge under the header, with its contents held to the page's own measure, so
|
|
171
|
-
* a set of destinations too wide to sit under one word gets the whole width
|
|
172
|
-
* to lay out in.
|
|
173
|
-
*
|
|
174
|
-
* **A band and not a width, which is why the word is not `full`.** It changes
|
|
175
|
-
* where the panel goes as well as how wide it is, which is why this tier
|
|
176
|
-
* knows about it at all: a band spans the viewport, so there is nothing to
|
|
177
|
-
* measure it against and nothing to flip or shift to, and the placing pass is
|
|
178
|
-
* told not to run. Everything else the popover gives, the top layer and the
|
|
179
|
-
* dismissal, is exactly what such a band needs. `full` is the registry's word
|
|
180
|
-
* for a width, and `Button` and `Dialog` are the two families answering that
|
|
181
|
-
* question; borrowing it here would put a third meaning on it.
|
|
182
|
-
*
|
|
183
|
-
* `variant` and not an axis, for the reason the registry gives: a card under
|
|
184
|
-
* a word and a band under a header are two arrangements this family has, and
|
|
185
|
-
* no other family is being asked the same question.
|
|
186
|
-
*/
|
|
187
|
-
variant?: 'band';
|
|
188
188
|
private narrow;
|
|
189
189
|
private query;
|
|
190
190
|
/** A band, whether because it was asked for or because there is no room. */
|
|
@@ -133,7 +133,7 @@ let HelixHeadlessMegamenu = class HelixHeadlessMegamenu extends MixinControllerO
|
|
|
133
133
|
static { HelixHeadlessMegamenu_1 = this; }
|
|
134
134
|
static { this.bar = new HandOver((megamenu, to) => megamenu.motion(to)); }
|
|
135
135
|
get banded() {
|
|
136
|
-
return this.
|
|
136
|
+
return this.layout === 'band' || this.narrow;
|
|
137
137
|
}
|
|
138
138
|
watchWidth() {
|
|
139
139
|
this.query?.removeEventListener('change', this.handleWidth);
|
|
@@ -336,6 +336,9 @@ __decorate([
|
|
|
336
336
|
__decorate([
|
|
337
337
|
property()
|
|
338
338
|
], HelixHeadlessMegamenu.prototype, "label", void 0);
|
|
339
|
+
__decorate([
|
|
340
|
+
property({ reflect: true })
|
|
341
|
+
], HelixHeadlessMegamenu.prototype, "layout", void 0);
|
|
339
342
|
__decorate([
|
|
340
343
|
property({ attribute: 'open-delay', converter: timeConverter('open-delay', 120) })
|
|
341
344
|
], HelixHeadlessMegamenu.prototype, "openDelay", void 0);
|
|
@@ -345,9 +348,6 @@ __decorate([
|
|
|
345
348
|
__decorate([
|
|
346
349
|
property()
|
|
347
350
|
], HelixHeadlessMegamenu.prototype, "placement", void 0);
|
|
348
|
-
__decorate([
|
|
349
|
-
property({ reflect: true })
|
|
350
|
-
], HelixHeadlessMegamenu.prototype, "variant", void 0);
|
|
351
351
|
__decorate([
|
|
352
352
|
state()
|
|
353
353
|
], HelixHeadlessMegamenu.prototype, "narrow", void 0);
|
|
@@ -40,11 +40,6 @@ export declare class HelixHeadlessMeterSegment extends HelixElement {
|
|
|
40
40
|
* Not announced: see the note on a meter's children above.
|
|
41
41
|
*/
|
|
42
42
|
label: string;
|
|
43
|
-
/**
|
|
44
|
-
* What the segment means, as it does on a callout. Takes the tone's color in
|
|
45
|
-
* place of the next color in the series.
|
|
46
|
-
*/
|
|
47
|
-
tone?: 'accent' | 'danger' | 'info' | 'neutral' | 'primary' | 'success' | 'warning';
|
|
48
43
|
/**
|
|
49
44
|
* How much of the meter's range the segment takes, in the units of the meter's
|
|
50
45
|
* `min` and `max`.
|
|
@@ -35,9 +35,6 @@ let HelixHeadlessMeterSegment = class HelixHeadlessMeterSegment extends HelixEle
|
|
|
35
35
|
__decorate([
|
|
36
36
|
property()
|
|
37
37
|
], HelixHeadlessMeterSegment.prototype, "label", void 0);
|
|
38
|
-
__decorate([
|
|
39
|
-
property({ reflect: true })
|
|
40
|
-
], HelixHeadlessMeterSegment.prototype, "tone", void 0);
|
|
41
38
|
__decorate([
|
|
42
39
|
property({ converter: numberConverter('value', 0) })
|
|
43
40
|
], HelixHeadlessMeterSegment.prototype, "value", void 0);
|
|
@@ -88,12 +88,6 @@ export declare class HelixHeadlessNavigation extends HelixElement {
|
|
|
88
88
|
protected readonly keys: KeyboardNavigationController;
|
|
89
89
|
/** Carries a host `aria-label` and `aria-labelledby` to the `<nav>`. */
|
|
90
90
|
protected readonly aria: AriaForwardController;
|
|
91
|
-
/**
|
|
92
|
-
* Stacks the destinations in a column, for a sidebar, where unset is a row
|
|
93
|
-
* for a header or a footer. The marker follows the current destination down
|
|
94
|
-
* the column as it does along the row.
|
|
95
|
-
*/
|
|
96
|
-
orientation?: 'vertical';
|
|
97
91
|
/**
|
|
98
92
|
* How the destinations are drawn, with `Tabs`' three values and for the same
|
|
99
93
|
* reasons.
|
|
@@ -115,7 +109,13 @@ export declare class HelixHeadlessNavigation extends HelixElement {
|
|
|
115
109
|
* Reflected and left unset by default, so the host carries nothing a
|
|
116
110
|
* consumer's server markup does not already have.
|
|
117
111
|
*/
|
|
118
|
-
|
|
112
|
+
marker?: 'segmented' | 'underlined';
|
|
113
|
+
/**
|
|
114
|
+
* Stacks the destinations in a column, for a sidebar, where unset is a row
|
|
115
|
+
* for a header or a footer. The marker follows the current destination down
|
|
116
|
+
* the column as it does along the row.
|
|
117
|
+
*/
|
|
118
|
+
orientation?: 'vertical';
|
|
119
119
|
private current;
|
|
120
120
|
/** The disclosures among the destinations that are open. */
|
|
121
121
|
private readonly opened;
|
|
@@ -153,10 +153,10 @@ __decorate([
|
|
|
153
153
|
], HelixHeadlessNavigation.prototype, "label", void 0);
|
|
154
154
|
__decorate([
|
|
155
155
|
property({ reflect: true })
|
|
156
|
-
], HelixHeadlessNavigation.prototype, "
|
|
156
|
+
], HelixHeadlessNavigation.prototype, "marker", void 0);
|
|
157
157
|
__decorate([
|
|
158
158
|
property({ reflect: true })
|
|
159
|
-
], HelixHeadlessNavigation.prototype, "
|
|
159
|
+
], HelixHeadlessNavigation.prototype, "orientation", void 0);
|
|
160
160
|
HelixHeadlessNavigation = __decorate([
|
|
161
161
|
customElement('helix-headless-navigation')
|
|
162
162
|
], HelixHeadlessNavigation);
|
|
@@ -52,7 +52,7 @@ export { isOption, optionsAmong } from '../among.js';
|
|
|
52
52
|
* @cssstate disabled - While the option cannot be chosen.
|
|
53
53
|
* @cssstate has-indicator - An icon is slotted into `indicator`.
|
|
54
54
|
* @cssstate hovered - While a mouse or a pen is over the option. A touch sets no hover, as React Aria's `data-hovered` does not.
|
|
55
|
-
* @cssstate
|
|
55
|
+
* @cssstate pressing - While a pointer presses the option, from the press to the release.
|
|
56
56
|
* @cssstate selected - While the option is chosen.
|
|
57
57
|
*/
|
|
58
58
|
export declare class HelixHeadlessOption extends HelixElement {
|
|
@@ -25,13 +25,13 @@ let HelixHeadlessOption = class HelixHeadlessOption extends HelixElement {
|
|
|
25
25
|
};
|
|
26
26
|
this.handlePointerLeave = () => {
|
|
27
27
|
this.toggleState('hovered', false);
|
|
28
|
-
this.toggleState('
|
|
28
|
+
this.toggleState('pressing', false);
|
|
29
29
|
};
|
|
30
30
|
this.handlePointerDown = (event) => {
|
|
31
|
-
this.toggleState('
|
|
31
|
+
this.toggleState('pressing', event.button === 0 && !this.disabled);
|
|
32
32
|
};
|
|
33
33
|
this.handlePointerUp = () => {
|
|
34
|
-
this.toggleState('
|
|
34
|
+
this.toggleState('pressing', false);
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
37
|
get defaultSelected() {
|