@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
|
@@ -56,7 +56,7 @@ import { type Branch } from '../levels.js';
|
|
|
56
56
|
* marked, so `a[aria-current]` and `a[data-depth="2"]` are the hooks for a
|
|
57
57
|
* rule of yours.
|
|
58
58
|
*
|
|
59
|
-
* **The rail.** `
|
|
59
|
+
* **The rail.** `marker="rail"` draws a slim column of ticks at the edge of a
|
|
60
60
|
* long scroll, one per link, with the section in view drawn longer and a deeper
|
|
61
61
|
* level shorter. Hovering or focusing the rail opens a surface holding the
|
|
62
62
|
* links, each on one line, and Escape closes it. A tap opens it too, and it stays
|
|
@@ -82,9 +82,9 @@ import { type Branch } from '../levels.js';
|
|
|
82
82
|
* `--indicator-block-size`, and `data-placed` once it has been placed, for a mark you draw
|
|
83
83
|
* and animate yourself.
|
|
84
84
|
* @csspart nav - The navigation landmark.
|
|
85
|
-
* @csspart surface - The box holding the heading and the navigation under `
|
|
85
|
+
* @csspart surface - The box holding the heading and the navigation under `marker="rail"`, which opens over the ticks.
|
|
86
86
|
* @csspart tick - One tick of the rail, for one link, with `data-current` while its section is in view. It carries the link's depth as `--outline-depth`.
|
|
87
|
-
* @csspart ticks - The column of ticks under `
|
|
87
|
+
* @csspart ticks - The column of ticks under `marker="rail"`, hidden from assistive technology.
|
|
88
88
|
*
|
|
89
89
|
* @cssproperty --outline-depth - The depth of the link a tick stands for, from one, set on each tick.
|
|
90
90
|
*
|
|
@@ -144,22 +144,23 @@ export declare class HelixHeadlessOutline extends HelixElement {
|
|
|
144
144
|
* Empty by default, which leaves the name to `fallbackLabel`.
|
|
145
145
|
*/
|
|
146
146
|
label: string;
|
|
147
|
+
/**
|
|
148
|
+
* The rail form: a slim column of ticks, one per link, that opens on hover,
|
|
149
|
+
* focus, or a tap into a surface holding the links.
|
|
150
|
+
*
|
|
151
|
+
* A marker because no registered axis (emphasis, material, nesting,
|
|
152
|
+
* orientation, separation, shape, size, tone, width) has a value for it, and
|
|
153
|
+
* a rail is an arrangement of this family alone, as Megamenu's
|
|
154
|
+
* `marker="band"` is. It has no default: the outline without it is the list
|
|
155
|
+
* of links.
|
|
156
|
+
*/
|
|
157
|
+
marker?: 'rail';
|
|
147
158
|
/**
|
|
148
159
|
* Which links are marked. `reading` marks the one section being read, the
|
|
149
160
|
* last whose heading has passed the reading line. `visible` marks every
|
|
150
161
|
* section with part of it on screen, and the mark runs across their links.
|
|
151
162
|
*/
|
|
152
163
|
marks: 'reading' | 'visible';
|
|
153
|
-
/**
|
|
154
|
-
* How far below the top of the scroll container a heading counts as reached,
|
|
155
|
-
* in pixels. The scroll container is the window or the panel the sections
|
|
156
|
-
* scroll in.
|
|
157
|
-
*
|
|
158
|
-
* The reading line. A page with a sticky masthead sets this to its height, or
|
|
159
|
-
* a little more: without it the current section changes as a heading slides
|
|
160
|
-
* under the chrome rather than as it reaches the top of what can be seen.
|
|
161
|
-
*/
|
|
162
|
-
offset: number;
|
|
163
164
|
/**
|
|
164
165
|
* The id of the section in view, or empty before anything is measured.
|
|
165
166
|
*
|
|
@@ -180,16 +181,15 @@ export declare class HelixHeadlessOutline extends HelixElement {
|
|
|
180
181
|
/** What `marked` reports, which only `markTo` writes. */
|
|
181
182
|
private markedIds;
|
|
182
183
|
/**
|
|
183
|
-
*
|
|
184
|
-
*
|
|
184
|
+
* How far below the top of the scroll container a heading counts as reached,
|
|
185
|
+
* in pixels. The scroll container is the window or the panel the sections
|
|
186
|
+
* scroll in.
|
|
185
187
|
*
|
|
186
|
-
* A
|
|
187
|
-
*
|
|
188
|
-
*
|
|
189
|
-
* `variant="band"` is. It has no default: the outline without it is the list
|
|
190
|
-
* of links.
|
|
188
|
+
* The reading line. A page with a sticky masthead sets this to its height, or
|
|
189
|
+
* a little more: without it the current section changes as a heading slides
|
|
190
|
+
* under the chrome rather than as it reaches the top of what can be seen.
|
|
191
191
|
*/
|
|
192
|
-
|
|
192
|
+
offset: number;
|
|
193
193
|
/**
|
|
194
194
|
* What `current` reports, which only `mark` writes.
|
|
195
195
|
*
|
|
@@ -19,8 +19,8 @@ let HelixHeadlessOutline = class HelixHeadlessOutline extends HelixElement {
|
|
|
19
19
|
this.follow = false;
|
|
20
20
|
this.label = '';
|
|
21
21
|
this.marks = 'reading';
|
|
22
|
-
this.offset = 0;
|
|
23
22
|
this.markedIds = [];
|
|
23
|
+
this.offset = 0;
|
|
24
24
|
this.reading = '';
|
|
25
25
|
this.frame = 0;
|
|
26
26
|
this.handleScroll = () => {
|
|
@@ -319,7 +319,7 @@ let HelixHeadlessOutline = class HelixHeadlessOutline extends HelixElement {
|
|
|
319
319
|
}
|
|
320
320
|
}
|
|
321
321
|
get rail() {
|
|
322
|
-
return this.
|
|
322
|
+
return this.marker === 'rail';
|
|
323
323
|
}
|
|
324
324
|
setOpen(on) {
|
|
325
325
|
if (!on) {
|
|
@@ -418,7 +418,7 @@ let HelixHeadlessOutline = class HelixHeadlessOutline extends HelixElement {
|
|
|
418
418
|
}
|
|
419
419
|
updated(changed) {
|
|
420
420
|
super.updated(changed);
|
|
421
|
-
if (changed.has('
|
|
421
|
+
if (changed.has('marker') && !this.rail) {
|
|
422
422
|
this.setOpen(false);
|
|
423
423
|
}
|
|
424
424
|
this.assign();
|
|
@@ -469,15 +469,15 @@ __decorate([
|
|
|
469
469
|
__decorate([
|
|
470
470
|
property()
|
|
471
471
|
], HelixHeadlessOutline.prototype, "label", void 0);
|
|
472
|
+
__decorate([
|
|
473
|
+
property({ reflect: true })
|
|
474
|
+
], HelixHeadlessOutline.prototype, "marker", void 0);
|
|
472
475
|
__decorate([
|
|
473
476
|
property()
|
|
474
477
|
], HelixHeadlessOutline.prototype, "marks", void 0);
|
|
475
478
|
__decorate([
|
|
476
479
|
property({ converter: numberConverter('offset', 0, 'pixels') })
|
|
477
480
|
], HelixHeadlessOutline.prototype, "offset", void 0);
|
|
478
|
-
__decorate([
|
|
479
|
-
property({ reflect: true })
|
|
480
|
-
], HelixHeadlessOutline.prototype, "variant", void 0);
|
|
481
481
|
HelixHeadlessOutline = __decorate([
|
|
482
482
|
customElement('helix-headless-outline')
|
|
483
483
|
], HelixHeadlessOutline);
|
|
@@ -25,7 +25,7 @@ declare const HelixHeadlessRadio_base: (new (...args: any[]) => import("@fusion.
|
|
|
25
25
|
* @documentation https://fusion.dev/helix/components/radio
|
|
26
26
|
*
|
|
27
27
|
* @slot - The radio's label.
|
|
28
|
-
* @slot icon - An icon shown beside the label. With `
|
|
28
|
+
* @slot icon - An icon shown beside the label. With `chip`, the icon
|
|
29
29
|
* replaces the visible label, and the label becomes the name read by screen
|
|
30
30
|
* readers. The icon has its own slot so the chip can hide the label and show
|
|
31
31
|
* the icon.
|
|
@@ -374,7 +374,7 @@ let HelixHeadlessSelect = class HelixHeadlessSelect extends MixinControllerOpen(
|
|
|
374
374
|
@keydown=${this.handleTriggerKeydown}
|
|
375
375
|
>
|
|
376
376
|
<slot name="start"></slot>
|
|
377
|
-
<span part="value" id="value">${this.renderValue()}</span>
|
|
377
|
+
<span part="value" id="value" ?data-placeholder=${this.chosen.length === 0}>${this.renderValue()}</span>
|
|
378
378
|
<slot name="end"></slot>
|
|
379
379
|
${this.renderIndicator()}
|
|
380
380
|
</button>
|
|
@@ -159,38 +159,6 @@ export declare class HelixHeadlessSpatialBarChart extends HelixHeadlessSpatialBa
|
|
|
159
159
|
* height.
|
|
160
160
|
*/
|
|
161
161
|
growAgain: boolean;
|
|
162
|
-
/**
|
|
163
|
-
* Draws no box: no edges, grid, numbers, or names, and in a `row` no
|
|
164
|
-
* floor, so the readings stand alone and fill the plot, as a picture on a
|
|
165
|
-
* product's own page does. The
|
|
166
|
-
* table, the summary, the tooltip, and the keys still carry every value,
|
|
167
|
-
* and a renderer draws no box either.
|
|
168
|
-
*/
|
|
169
|
-
noBox: boolean;
|
|
170
|
-
/**
|
|
171
|
-
* What the readout says for a place with no value. `{category}` and
|
|
172
|
-
* `{series}` name the place.
|
|
173
|
-
*/
|
|
174
|
-
openLabel: string;
|
|
175
|
-
/** The plot's name where the chart has none: no `aria-label`, `label`, or table caption. */
|
|
176
|
-
plotLabel: string;
|
|
177
|
-
/**
|
|
178
|
-
* Stacks a category's series into one column, each block standing on the
|
|
179
|
-
* ones before it, so the column is as tall as the category's total, as a
|
|
180
|
-
* flat `Bar Chart` stacks them.
|
|
181
|
-
*
|
|
182
|
-
* Absent stands the series one behind another in depth. Stacked, every
|
|
183
|
-
* series stands in the front row, so none hides another, and the parts of
|
|
184
|
-
* one total read together. A negative reading hangs below zero on the
|
|
185
|
-
* negatives before it. The scale fits the stacks.
|
|
186
|
-
*/
|
|
187
|
-
stacked: boolean;
|
|
188
|
-
/**
|
|
189
|
-
* The `summary` part's sentence. `{count}`, `{series}`, and `{categories}`
|
|
190
|
-
* are the number of bars, series, and categories, written in the locale,
|
|
191
|
-
* and `{low}` and `{high}` the lowest and the highest value.
|
|
192
|
-
*/
|
|
193
|
-
summaryLabel: string;
|
|
194
162
|
/**
|
|
195
163
|
* How the bars stand.
|
|
196
164
|
*
|
|
@@ -224,7 +192,39 @@ export declare class HelixHeadlessSpatialBarChart extends HelixHeadlessSpatialBa
|
|
|
224
192
|
* can give it the latest of a longer table. It is read when the plot's
|
|
225
193
|
* size changes.
|
|
226
194
|
*/
|
|
227
|
-
|
|
195
|
+
layout?: 'diagonal' | 'row';
|
|
196
|
+
/**
|
|
197
|
+
* Draws no box: no edges, grid, numbers, or names, and in a `row` no
|
|
198
|
+
* floor, so the readings stand alone and fill the plot, as a picture on a
|
|
199
|
+
* product's own page does. The
|
|
200
|
+
* table, the summary, the tooltip, and the keys still carry every value,
|
|
201
|
+
* and a renderer draws no box either.
|
|
202
|
+
*/
|
|
203
|
+
noBox: boolean;
|
|
204
|
+
/**
|
|
205
|
+
* What the readout says for a place with no value. `{category}` and
|
|
206
|
+
* `{series}` name the place.
|
|
207
|
+
*/
|
|
208
|
+
openLabel: string;
|
|
209
|
+
/** The plot's name where the chart has none: no `aria-label`, `label`, or table caption. */
|
|
210
|
+
plotLabel: string;
|
|
211
|
+
/**
|
|
212
|
+
* Stacks a category's series into one column, each block standing on the
|
|
213
|
+
* ones before it, so the column is as tall as the category's total, as a
|
|
214
|
+
* flat `Bar Chart` stacks them.
|
|
215
|
+
*
|
|
216
|
+
* Absent stands the series one behind another in depth. Stacked, every
|
|
217
|
+
* series stands in the front row, so none hides another, and the parts of
|
|
218
|
+
* one total read together. A negative reading hangs below zero on the
|
|
219
|
+
* negatives before it. The scale fits the stacks.
|
|
220
|
+
*/
|
|
221
|
+
stacked: boolean;
|
|
222
|
+
/**
|
|
223
|
+
* The `summary` part's sentence. `{count}`, `{series}`, and `{categories}`
|
|
224
|
+
* are the number of bars, series, and categories, written in the locale,
|
|
225
|
+
* and `{low}` and `{high}` the lowest and the highest value.
|
|
226
|
+
*/
|
|
227
|
+
summaryLabel: string;
|
|
228
228
|
/** Whether a renderer has drawn the bars, which hides the chart's own drawing. */
|
|
229
229
|
private rendered;
|
|
230
230
|
/** Where the chart's own drawing is seen from, which a drag or Shift with an arrow turns. */
|
|
@@ -197,7 +197,7 @@ let HelixHeadlessSpatialBarChart = class HelixHeadlessSpatialBarChart extends Mi
|
|
|
197
197
|
}
|
|
198
198
|
get fits() {
|
|
199
199
|
const box = this.partNamed('fallback');
|
|
200
|
-
if (!box || !this.
|
|
200
|
+
if (!box || !this.layout || typeof getComputedStyle !== 'function') {
|
|
201
201
|
return undefined;
|
|
202
202
|
}
|
|
203
203
|
const style = getComputedStyle(box);
|
|
@@ -331,7 +331,7 @@ let HelixHeadlessSpatialBarChart = class HelixHeadlessSpatialBarChart extends Mi
|
|
|
331
331
|
${readable ? this.renderSummary(field) : this.renderStatus()}${this.renderSonify()}${this.renderTable()}`;
|
|
332
332
|
}
|
|
333
333
|
renderFallback(read, at) {
|
|
334
|
-
const layout = this.
|
|
334
|
+
const layout = this.layout ?? 'grid';
|
|
335
335
|
const lined = layout === 'grid' ? undefined : layout;
|
|
336
336
|
const bare = this.noBox || lined !== undefined;
|
|
337
337
|
const view = boxView(read.axes, this.camera, [], bare);
|
|
@@ -489,6 +489,9 @@ __decorate([
|
|
|
489
489
|
__decorate([
|
|
490
490
|
property({ attribute: 'grow-again', reflect: true, type: Boolean })
|
|
491
491
|
], HelixHeadlessSpatialBarChart.prototype, "growAgain", void 0);
|
|
492
|
+
__decorate([
|
|
493
|
+
property({ reflect: true })
|
|
494
|
+
], HelixHeadlessSpatialBarChart.prototype, "layout", void 0);
|
|
492
495
|
__decorate([
|
|
493
496
|
property({ attribute: 'no-box', reflect: true, type: Boolean })
|
|
494
497
|
], HelixHeadlessSpatialBarChart.prototype, "noBox", void 0);
|
|
@@ -507,9 +510,6 @@ __decorate([
|
|
|
507
510
|
words,
|
|
508
511
|
property({ attribute: 'summary-label' })
|
|
509
512
|
], HelixHeadlessSpatialBarChart.prototype, "summaryLabel", void 0);
|
|
510
|
-
__decorate([
|
|
511
|
-
property({ reflect: true })
|
|
512
|
-
], HelixHeadlessSpatialBarChart.prototype, "variant", void 0);
|
|
513
513
|
__decorate([
|
|
514
514
|
state()
|
|
515
515
|
], HelixHeadlessSpatialBarChart.prototype, "rendered", void 0);
|
|
@@ -118,6 +118,19 @@ export declare class HelixHeadlessSteps extends HelixHeadlessSteps_base {
|
|
|
118
118
|
* before going on to the next.
|
|
119
119
|
*/
|
|
120
120
|
linear: boolean;
|
|
121
|
+
/**
|
|
122
|
+
* What each step is marked with.
|
|
123
|
+
*
|
|
124
|
+
* Absent is the state itself: a check where a stage is done, a target where
|
|
125
|
+
* the reader is, an empty ring ahead of them. Three marks that need no
|
|
126
|
+
* legend, which a number does: "3" says where a stage sits in the order and
|
|
127
|
+
* nothing about whether it is finished.
|
|
128
|
+
*
|
|
129
|
+
* `numeric` is the older convention and is still the right one where the
|
|
130
|
+
* order is the point, a form that says "step 3 of 5" beside it, or a sequence
|
|
131
|
+
* a reader is told to come back to by number.
|
|
132
|
+
*/
|
|
133
|
+
marker?: 'numeric';
|
|
121
134
|
/**
|
|
122
135
|
* Which way the steps run.
|
|
123
136
|
*
|
|
@@ -139,30 +152,17 @@ export declare class HelixHeadlessSteps extends HelixHeadlessSteps_base {
|
|
|
139
152
|
* number, for a sentence that places the sign itself.
|
|
140
153
|
*/
|
|
141
154
|
progressLabel: string;
|
|
142
|
-
/**
|
|
143
|
-
* A function that answers whether a stage is valid, asked about the stage a
|
|
144
|
-
* reader is on before they move forward from it. Return `false` to keep them
|
|
145
|
-
* there. Not asked of an `optional` stage, nor for a move back.
|
|
146
|
-
*/
|
|
147
|
-
validate?: (step: HelixHeadlessStep) => boolean;
|
|
148
155
|
/**
|
|
149
156
|
* How far through the sequence is, from 0 to 100: the share of its stages
|
|
150
157
|
* that are `complete`, rounded to a whole number.
|
|
151
158
|
*/
|
|
152
159
|
get progress(): number;
|
|
153
160
|
/**
|
|
154
|
-
*
|
|
155
|
-
*
|
|
156
|
-
*
|
|
157
|
-
* the reader is, an empty ring ahead of them. Three marks that need no
|
|
158
|
-
* legend, which a number does: "3" says where a stage sits in the order and
|
|
159
|
-
* nothing about whether it is finished.
|
|
160
|
-
*
|
|
161
|
-
* `numeric` is the older convention and is still the right one where the
|
|
162
|
-
* order is the point, a form that says "step 3 of 5" beside it, or a sequence
|
|
163
|
-
* a reader is told to come back to by number.
|
|
161
|
+
* A function that answers whether a stage is valid, asked about the stage a
|
|
162
|
+
* reader is on before they move forward from it. Return `false` to keep them
|
|
163
|
+
* there. Not asked of an `optional` stage, nor for a move back.
|
|
164
164
|
*/
|
|
165
|
-
|
|
165
|
+
validate?: (step: HelixHeadlessStep) => boolean;
|
|
166
166
|
protected readonly keys: KeyboardNavigationController;
|
|
167
167
|
protected readonly commands: CommandController;
|
|
168
168
|
/** The steps, in the order the consumer wrote them. */
|
|
@@ -272,6 +272,9 @@ __decorate([
|
|
|
272
272
|
__decorate([
|
|
273
273
|
property({ reflect: true, type: Boolean })
|
|
274
274
|
], HelixHeadlessSteps.prototype, "linear", void 0);
|
|
275
|
+
__decorate([
|
|
276
|
+
property({ reflect: true })
|
|
277
|
+
], HelixHeadlessSteps.prototype, "marker", void 0);
|
|
275
278
|
__decorate([
|
|
276
279
|
property({ reflect: true })
|
|
277
280
|
], HelixHeadlessSteps.prototype, "orientation", void 0);
|
|
@@ -282,9 +285,6 @@ __decorate([
|
|
|
282
285
|
__decorate([
|
|
283
286
|
property({ attribute: false })
|
|
284
287
|
], HelixHeadlessSteps.prototype, "validate", void 0);
|
|
285
|
-
__decorate([
|
|
286
|
-
property({ reflect: true })
|
|
287
|
-
], HelixHeadlessSteps.prototype, "variant", void 0);
|
|
288
288
|
HelixHeadlessSteps = __decorate([
|
|
289
289
|
customElement('helix-headless-steps')
|
|
290
290
|
], HelixHeadlessSteps);
|
|
@@ -83,6 +83,7 @@ export declare class HelixHeadlessSwitch extends HelixHeadlessSwitch_base {
|
|
|
83
83
|
private sync;
|
|
84
84
|
/** Returns the switch to the state its markup declared. */
|
|
85
85
|
formResetCallback(): void;
|
|
86
|
+
protected firstUpdated(changed: PropertyValues): void;
|
|
86
87
|
protected updated(changed: PropertyValues): void;
|
|
87
88
|
/**
|
|
88
89
|
* Says on the `label` region whether anything is in it.
|
|
@@ -33,6 +33,10 @@ let HelixHeadlessSwitch = class HelixHeadlessSwitch extends MixinControllerCheck
|
|
|
33
33
|
super.formResetCallback();
|
|
34
34
|
this.resetChecked();
|
|
35
35
|
}
|
|
36
|
+
firstUpdated(changed) {
|
|
37
|
+
super.firstUpdated(changed);
|
|
38
|
+
this.renderRoot.addEventListener('slotchange', () => this.markEmpty());
|
|
39
|
+
}
|
|
36
40
|
updated(changed) {
|
|
37
41
|
super.updated(changed);
|
|
38
42
|
this.markEmpty();
|
|
@@ -126,18 +126,6 @@ export declare class HelixHeadlessTabs extends HelixHeadlessTabs_base {
|
|
|
126
126
|
* panels on the way.
|
|
127
127
|
*/
|
|
128
128
|
manual: boolean;
|
|
129
|
-
/**
|
|
130
|
-
* The direction the tabs run. `vertical` sets them in a column beside the
|
|
131
|
-
* panels and tells a screen reader the list is vertical.
|
|
132
|
-
*
|
|
133
|
-
* Optional, so the resting row writes no attribute onto the host.
|
|
134
|
-
*/
|
|
135
|
-
orientation?: 'horizontal' | 'vertical';
|
|
136
|
-
/**
|
|
137
|
-
* Whether a strip with more tabs than fit shows a button at each end it can
|
|
138
|
-
* scroll toward.
|
|
139
|
-
*/
|
|
140
|
-
scrollControls: boolean;
|
|
141
129
|
/**
|
|
142
130
|
* How the row of tabs is drawn.
|
|
143
131
|
*
|
|
@@ -162,7 +150,19 @@ export declare class HelixHeadlessTabs extends HelixHeadlessTabs_base {
|
|
|
162
150
|
* Reflected and left unset by default, so the host carries nothing a
|
|
163
151
|
* consumer's server markup does not already have.
|
|
164
152
|
*/
|
|
165
|
-
|
|
153
|
+
marker?: 'segmented' | 'underlined';
|
|
154
|
+
/**
|
|
155
|
+
* The direction the tabs run. `vertical` sets them in a column beside the
|
|
156
|
+
* panels and tells a screen reader the list is vertical.
|
|
157
|
+
*
|
|
158
|
+
* Optional, so the resting row writes no attribute onto the host.
|
|
159
|
+
*/
|
|
160
|
+
orientation?: 'horizontal' | 'vertical';
|
|
161
|
+
/**
|
|
162
|
+
* Whether a strip with more tabs than fit shows a button at each end it can
|
|
163
|
+
* scroll toward.
|
|
164
|
+
*/
|
|
165
|
+
scrollControls: boolean;
|
|
166
166
|
private get tabs();
|
|
167
167
|
/** Whether any tab is a link, so arriving on one chooses nothing. */
|
|
168
168
|
private get linked();
|
|
@@ -248,15 +248,15 @@ __decorate([
|
|
|
248
248
|
__decorate([
|
|
249
249
|
property({ reflect: true, type: Boolean })
|
|
250
250
|
], HelixHeadlessTabs.prototype, "manual", void 0);
|
|
251
|
+
__decorate([
|
|
252
|
+
property({ reflect: true })
|
|
253
|
+
], HelixHeadlessTabs.prototype, "marker", void 0);
|
|
251
254
|
__decorate([
|
|
252
255
|
property({ reflect: true })
|
|
253
256
|
], HelixHeadlessTabs.prototype, "orientation", void 0);
|
|
254
257
|
__decorate([
|
|
255
258
|
property({ attribute: 'scroll-controls', reflect: true, type: Boolean })
|
|
256
259
|
], HelixHeadlessTabs.prototype, "scrollControls", void 0);
|
|
257
|
-
__decorate([
|
|
258
|
-
property({ reflect: true })
|
|
259
|
-
], HelixHeadlessTabs.prototype, "variant", void 0);
|
|
260
260
|
__decorate([
|
|
261
261
|
state()
|
|
262
262
|
], HelixHeadlessTabs.prototype, "more", void 0);
|
|
@@ -30,7 +30,7 @@ declare const HelixHeadlessTimeInput_base: (new (...args: any[]) => import("@fus
|
|
|
30
30
|
* with `aria-haspopup="dialog"`, `aria-expanded`, and `aria-controls`, since
|
|
31
31
|
* Down opens the list from it. In the list, the arrow keys, typed digits and PageUp and PageDown
|
|
32
32
|
* move through the times, and Enter, Space or a click chooses one and closes
|
|
33
|
-
* the panel. With `
|
|
33
|
+
* the panel. With `picker="wheels"` each wheel moves the time as you turn it,
|
|
34
34
|
* the panel stays open, and Enter or Escape closes it.
|
|
35
35
|
*
|
|
36
36
|
* With `segmented`, the field is a row of segments in place of the text: an
|
|
@@ -232,6 +232,23 @@ export declare class HelixHeadlessTimeInput extends HelixHeadlessTimeInput_base
|
|
|
232
232
|
* `show-now`.
|
|
233
233
|
*/
|
|
234
234
|
nowLabel: string;
|
|
235
|
+
/**
|
|
236
|
+
* Whether the panel shows one list of times or a column for each part of the
|
|
237
|
+
* time.
|
|
238
|
+
*
|
|
239
|
+
* `list` offers whole times, which is what a product with slots or opening
|
|
240
|
+
* hours has. `wheels` splits them into an hour, a minute and a meridiem where
|
|
241
|
+
* the locale uses one, which is the only way to reach `23:45` without
|
|
242
|
+
* scrolling most of a day. `TimePicker` carries the longer note on the trade.
|
|
243
|
+
*
|
|
244
|
+
* **Optional rather than defaulted, which is not a style preference.** A
|
|
245
|
+
* reflecting property with a default writes its attribute onto every host the
|
|
246
|
+
* moment the element upgrades, including the ones a consumer rendered and did
|
|
247
|
+
* not touch, and React reads that as a hydration mismatch. The absent
|
|
248
|
+
* attribute *is* the list, which the stylesheet reads as the base rule, so
|
|
249
|
+
* only the departure has to be named.
|
|
250
|
+
*/
|
|
251
|
+
picker?: 'list' | 'wheels';
|
|
235
252
|
/**
|
|
236
253
|
* Placeholder text shown before a time is entered.
|
|
237
254
|
*/
|
|
@@ -296,17 +313,6 @@ export declare class HelixHeadlessTimeInput extends HelixHeadlessTimeInput_base
|
|
|
296
313
|
* The message shown when `disable-times` bars a time.
|
|
297
314
|
*/
|
|
298
315
|
unavailableMessage: string;
|
|
299
|
-
/**
|
|
300
|
-
* The message for text that is no time, where `bad-input-message` is not
|
|
301
|
-
* set. `{mode}` is `single`, `range`, or `multiple`, `{example}` is a time
|
|
302
|
-
* written as the field writes one, `2:30 PM` in `en-US` and `14:30` in
|
|
303
|
-
* `de-DE`, and `{shape}` is `HH:mm`, or `HH:mm:ss` with `seconds`.
|
|
304
|
-
*
|
|
305
|
-
* **The default names a time the field reads back.** It said "Enter a time
|
|
306
|
-
* as HH:mm." to a reader whose field showed `2:30 PM`, and a pattern token
|
|
307
|
-
* is words for a developer.
|
|
308
|
-
*/
|
|
309
|
-
unreadableMessage: string;
|
|
310
316
|
/** Every time in the value, which may hold more than one. */
|
|
311
317
|
private get held();
|
|
312
318
|
/**
|
|
@@ -385,22 +391,16 @@ export declare class HelixHeadlessTimeInput extends HelixHeadlessTimeInput_base
|
|
|
385
391
|
/** What is wrong with the times, which the text input cannot say. */
|
|
386
392
|
protected validate(): string | readonly [keyof ValidityStateFlags, string];
|
|
387
393
|
/**
|
|
388
|
-
*
|
|
389
|
-
* time
|
|
390
|
-
*
|
|
391
|
-
* `
|
|
392
|
-
* hours has. `wheels` splits them into an hour, a minute and a meridiem where
|
|
393
|
-
* the locale uses one, which is the only way to reach `23:45` without
|
|
394
|
-
* scrolling most of a day. `TimePicker` carries the longer note on the trade.
|
|
394
|
+
* The message for text that is no time, where `bad-input-message` is not
|
|
395
|
+
* set. `{mode}` is `single`, `range`, or `multiple`, `{example}` is a time
|
|
396
|
+
* written as the field writes one, `2:30 PM` in `en-US` and `14:30` in
|
|
397
|
+
* `de-DE`, and `{shape}` is `HH:mm`, or `HH:mm:ss` with `seconds`.
|
|
395
398
|
*
|
|
396
|
-
* **
|
|
397
|
-
*
|
|
398
|
-
*
|
|
399
|
-
* not touch, and React reads that as a hydration mismatch. The absent
|
|
400
|
-
* attribute *is* the list, which the stylesheet reads as the base rule, so
|
|
401
|
-
* only the departure has to be named.
|
|
399
|
+
* **The default names a time the field reads back.** It said "Enter a time
|
|
400
|
+
* as HH:mm." to a reader whose field showed `2:30 PM`, and a pattern token
|
|
401
|
+
* is words for a developer.
|
|
402
402
|
*/
|
|
403
|
-
|
|
403
|
+
unreadableMessage: string;
|
|
404
404
|
protected updated(changed: PropertyValues): void;
|
|
405
405
|
/**
|
|
406
406
|
* The clock the field opens, behind a seam the styled tier can move.
|
|
@@ -33,7 +33,6 @@ let HelixHeadlessTimeInput = class HelixHeadlessTimeInput extends MixinSegmented
|
|
|
33
33
|
this.timeStyle = 'local';
|
|
34
34
|
this.triggerLabel = 'Choose a time';
|
|
35
35
|
this.unavailableMessage = 'Choose a time that is available.';
|
|
36
|
-
this.unreadableMessage = '{mode, select, single {Enter a time such as {example}.} other {Enter times such as {example}, separated by commas.}}';
|
|
37
36
|
this.draft = '';
|
|
38
37
|
this.handleTextCommit = (event) => {
|
|
39
38
|
if (this.mode !== 'multiple') {
|
|
@@ -90,18 +89,19 @@ let HelixHeadlessTimeInput = class HelixHeadlessTimeInput extends MixinSegmented
|
|
|
90
89
|
return;
|
|
91
90
|
}
|
|
92
91
|
this.restore();
|
|
93
|
-
if (this.mode === undefined && this.
|
|
92
|
+
if (this.mode === undefined && this.picker !== 'wheels') {
|
|
94
93
|
this.requestOpen(false);
|
|
95
94
|
this.updateComplete.then(() => this.returnFocus());
|
|
96
95
|
}
|
|
97
96
|
};
|
|
98
97
|
this.handleWheelEnter = (event) => {
|
|
99
|
-
if (event.key === 'Enter' && this.
|
|
98
|
+
if (event.key === 'Enter' && this.picker === 'wheels' && this.open) {
|
|
100
99
|
event.preventDefault();
|
|
101
100
|
this.requestOpen(false);
|
|
102
101
|
this.returnFocus();
|
|
103
102
|
}
|
|
104
103
|
};
|
|
104
|
+
this.unreadableMessage = '{mode, select, single {Enter a time such as {example}.} other {Enter times such as {example}, separated by commas.}}';
|
|
105
105
|
this.handleClear = () => {
|
|
106
106
|
if (this.value !== '' && this.requestValue('')) {
|
|
107
107
|
this.announceChange();
|
|
@@ -242,7 +242,7 @@ let HelixHeadlessTimeInput = class HelixHeadlessTimeInput extends MixinSegmented
|
|
|
242
242
|
option-label: picker-option-label, option-text: picker-option-text"
|
|
243
243
|
?invalid=${this.resolvedFeedback !== ''}
|
|
244
244
|
mode=${this.mode ?? nothing}
|
|
245
|
-
|
|
245
|
+
picker=${this.picker ?? nothing}
|
|
246
246
|
disable-times=${this.disableTimes || nothing}
|
|
247
247
|
manual
|
|
248
248
|
label=${hostWords(this, slottedWords(this, ['label']) || this.label) || 'Time'}
|
|
@@ -410,6 +410,9 @@ __decorate([
|
|
|
410
410
|
words,
|
|
411
411
|
property({ attribute: 'now-label' })
|
|
412
412
|
], HelixHeadlessTimeInput.prototype, "nowLabel", void 0);
|
|
413
|
+
__decorate([
|
|
414
|
+
property({ reflect: true })
|
|
415
|
+
], HelixHeadlessTimeInput.prototype, "picker", void 0);
|
|
413
416
|
__decorate([
|
|
414
417
|
words,
|
|
415
418
|
property()
|
|
@@ -450,16 +453,13 @@ __decorate([
|
|
|
450
453
|
words,
|
|
451
454
|
property({ attribute: 'unavailable-message' })
|
|
452
455
|
], HelixHeadlessTimeInput.prototype, "unavailableMessage", void 0);
|
|
453
|
-
__decorate([
|
|
454
|
-
words,
|
|
455
|
-
property({ attribute: 'unreadable-message' })
|
|
456
|
-
], HelixHeadlessTimeInput.prototype, "unreadableMessage", void 0);
|
|
457
456
|
__decorate([
|
|
458
457
|
state()
|
|
459
458
|
], HelixHeadlessTimeInput.prototype, "draft", void 0);
|
|
460
459
|
__decorate([
|
|
461
|
-
|
|
462
|
-
|
|
460
|
+
words,
|
|
461
|
+
property({ attribute: 'unreadable-message' })
|
|
462
|
+
], HelixHeadlessTimeInput.prototype, "unreadableMessage", void 0);
|
|
463
463
|
HelixHeadlessTimeInput = __decorate([
|
|
464
464
|
customElement('helix-headless-time-input')
|
|
465
465
|
], HelixHeadlessTimeInput);
|