@fusion.dev/helix-headless 0.0.0-dev → 0.0.2
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
|
@@ -23,37 +23,26 @@ import '../../select/index.js';
|
|
|
23
23
|
* consumer's, and a control that can only sit at one end of one row has taken
|
|
24
24
|
* that decision for them.
|
|
25
25
|
*
|
|
26
|
-
* **`Select`, not a native `<select>`.**
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
* is the whole product here, and it wins.
|
|
26
|
+
* **`Select`, not a native `<select>`.** Two dropdowns identical closed and
|
|
27
|
+
* different open meet each other in the same footer as a table's filters. The
|
|
28
|
+
* caret is `Select`'s rather than a color literal baked into a data URI,
|
|
29
|
+
* because a background image cannot read `currentColor`, and the label is a
|
|
30
|
+
* real `<label for>` against the trigger's own id.
|
|
32
31
|
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
* `
|
|
36
|
-
* own id, which `Select` already renders and already tests.
|
|
32
|
+
* **The label sits on the row, not above it.** `Select`'s host is a column, and
|
|
33
|
+
* an outer-tree rule beats a `:host` rule, so turning it into a row needs no
|
|
34
|
+
* property on `Select` and nothing written into the consumer's markup.
|
|
37
35
|
*
|
|
38
|
-
* **
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
* and nothing written into the consumer's markup.
|
|
36
|
+
* **An empty `sizes` renders nothing**, rather than falling back to the
|
|
37
|
+
* built-in list, which would be a component overruling a consumer who said
|
|
38
|
+
* "none". Same rule as `Pagination` over a single page, and reported the same
|
|
39
|
+
* way, through `ElementInternals.states` rather than an attribute the server
|
|
40
|
+
* never wrote.
|
|
44
41
|
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
* over a single page, and reported the same way, through
|
|
50
|
-
* `ElementInternals.states` rather than an attribute the server never wrote.
|
|
51
|
-
*
|
|
52
|
-
* `value` is the controlled property and `default-value` seeds one this owns,
|
|
53
|
-
* the same contract every other stateful element here carries. Changing it
|
|
54
|
-
* announces `helix-before-change`; what a consumer does with that is re-query and move
|
|
55
|
-
* back to page one, which is theirs to decide because only they know whether
|
|
56
|
-
* the reader's position should survive it.
|
|
42
|
+
* `value` is the controlled property and `default-value` seeds one this owns.
|
|
43
|
+
* Changing it announces `helix-before-change`; re-querying and moving back to
|
|
44
|
+
* page one is the consumer's, because only they know whether the reader's
|
|
45
|
+
* position should survive it.
|
|
57
46
|
*
|
|
58
47
|
* @since 0.1.0
|
|
59
48
|
* @status experimental
|
|
@@ -70,14 +59,6 @@ import '../../select/index.js';
|
|
|
70
59
|
let HelixHeadlessPaginationSize = class HelixHeadlessPaginationSize extends HelixElement {
|
|
71
60
|
constructor() {
|
|
72
61
|
super(...arguments);
|
|
73
|
-
/**
|
|
74
|
-
* The sizes offered, comma separated.
|
|
75
|
-
*
|
|
76
|
-
* A string rather than an array, so the whole control is expressible in
|
|
77
|
-
* markup and survives a server render. Anything that is not a positive number
|
|
78
|
-
* is dropped rather than rendered as an option that cannot mean anything.
|
|
79
|
-
*/
|
|
80
|
-
this.sizes = '10,25,50,100';
|
|
81
62
|
/**
|
|
82
63
|
* Size to start on, where nothing declared one.
|
|
83
64
|
*/
|
|
@@ -92,6 +73,14 @@ let HelixHeadlessPaginationSize = class HelixHeadlessPaginationSize extends Heli
|
|
|
92
73
|
* Absent uses the runtime's own.
|
|
93
74
|
*/
|
|
94
75
|
this.locale = '';
|
|
76
|
+
/**
|
|
77
|
+
* The sizes offered, comma separated.
|
|
78
|
+
*
|
|
79
|
+
* A string rather than an array, so the whole control is expressible in
|
|
80
|
+
* markup and survives a server render. Anything that is not a positive number
|
|
81
|
+
* is dropped rather than rendered as an option that cannot mean anything.
|
|
82
|
+
*/
|
|
83
|
+
this.sizes = '10,25,50,100';
|
|
95
84
|
/** The size, whoever set it, and `undefined` until somebody has. */
|
|
96
85
|
this.valueState = undefined;
|
|
97
86
|
this.handleChange = (event) => {
|
|
@@ -136,8 +125,6 @@ let HelixHeadlessPaginationSize = class HelixHeadlessPaginationSize extends Heli
|
|
|
136
125
|
* Reading gives the real one; writing declares it the consumer's, and
|
|
137
126
|
* `default-value` seeds one this element owns. Same accessor pair as
|
|
138
127
|
* `Pagination.page` and the calendar's `month`.
|
|
139
|
-
*
|
|
140
|
-
*
|
|
141
128
|
*/
|
|
142
129
|
get value() {
|
|
143
130
|
return this.valueState ?? this.defaultValue;
|
|
@@ -166,8 +153,7 @@ let HelixHeadlessPaginationSize = class HelixHeadlessPaginationSize extends Heli
|
|
|
166
153
|
willUpdate(changed) {
|
|
167
154
|
super.willUpdate(changed);
|
|
168
155
|
/* Through `toggleState`, like `Pagination`'s: an engine without
|
|
169
|
-
`CustomStateSet` gets an empty select rather than no element
|
|
170
|
-
behavior this had before. */
|
|
156
|
+
`CustomStateSet` gets an empty select rather than no element. */
|
|
171
157
|
this.toggleState('empty', this.options.length === 0);
|
|
172
158
|
}
|
|
173
159
|
/**
|
|
@@ -177,16 +163,10 @@ let HelixHeadlessPaginationSize = class HelixHeadlessPaginationSize extends Heli
|
|
|
177
163
|
* wrap this one, pass it a property the base does not know about, or leave it
|
|
178
164
|
* out, without reimplementing the whole template to do any of them.
|
|
179
165
|
*
|
|
180
|
-
* **The tags are interpolated, so each tier renders its own.**
|
|
181
|
-
*
|
|
182
|
-
*
|
|
183
|
-
* name
|
|
184
|
-
* tier composes an element it does not ship, and the composition cannot be
|
|
185
|
-
* tested here at all, since there is no `helix-select` on this tier to test it
|
|
186
|
-
* against. `tier` resolves the name instead, and the styled subclass changes
|
|
187
|
-
* it in one line rather than reimplementing this method. A tier that renders
|
|
188
|
-
* its own elements is a tier that stands alone, which is the claim the package
|
|
189
|
-
* makes.
|
|
166
|
+
* **The tags are interpolated, so each tier renders its own.** Writing
|
|
167
|
+
* `<helix-select>` out would make this tier compose an element it does not
|
|
168
|
+
* ship and cannot test against, there being no `helix-select` here. `tier`
|
|
169
|
+
* resolves the name instead, and the styled subclass changes it in one line.
|
|
190
170
|
*/
|
|
191
171
|
renderSelect() {
|
|
192
172
|
const select = this.tag('select');
|
|
@@ -212,20 +192,20 @@ let HelixHeadlessPaginationSize = class HelixHeadlessPaginationSize extends Heli
|
|
|
212
192
|
}
|
|
213
193
|
};
|
|
214
194
|
__decorate([
|
|
215
|
-
property()
|
|
216
|
-
], HelixHeadlessPaginationSize.prototype, "
|
|
195
|
+
property({ attribute: 'default-value', type: Number })
|
|
196
|
+
], HelixHeadlessPaginationSize.prototype, "defaultValue", void 0);
|
|
217
197
|
__decorate([
|
|
218
198
|
property({ type: Number })
|
|
219
199
|
], HelixHeadlessPaginationSize.prototype, "value", null);
|
|
220
|
-
__decorate([
|
|
221
|
-
property({ attribute: 'default-value', type: Number })
|
|
222
|
-
], HelixHeadlessPaginationSize.prototype, "defaultValue", void 0);
|
|
223
200
|
__decorate([
|
|
224
201
|
property()
|
|
225
202
|
], HelixHeadlessPaginationSize.prototype, "label", void 0);
|
|
226
203
|
__decorate([
|
|
227
204
|
property()
|
|
228
205
|
], HelixHeadlessPaginationSize.prototype, "locale", void 0);
|
|
206
|
+
__decorate([
|
|
207
|
+
property()
|
|
208
|
+
], HelixHeadlessPaginationSize.prototype, "sizes", void 0);
|
|
229
209
|
HelixHeadlessPaginationSize = __decorate([
|
|
230
210
|
customElement('helix-headless-pagination-size')
|
|
231
211
|
], HelixHeadlessPaginationSize);
|
|
@@ -45,18 +45,6 @@ import { type TemplateResult } from 'lit';
|
|
|
45
45
|
* @documentation https://helix.fusion.dev/components/pagination
|
|
46
46
|
*/
|
|
47
47
|
export declare class HelixHeadlessPaginationSummary extends HelixElement {
|
|
48
|
-
/**
|
|
49
|
-
* The page on show, one-based.
|
|
50
|
-
*/
|
|
51
|
-
page: number;
|
|
52
|
-
/**
|
|
53
|
-
* How many items are on a page.
|
|
54
|
-
*/
|
|
55
|
-
pageSize: number;
|
|
56
|
-
/**
|
|
57
|
-
* How many items there are across every page.
|
|
58
|
-
*/
|
|
59
|
-
total: number;
|
|
60
48
|
/**
|
|
61
49
|
* The reading, with `{from}`, `{to}` and `{total}` filled in.
|
|
62
50
|
*
|
|
@@ -79,6 +67,18 @@ export declare class HelixHeadlessPaginationSummary extends HelixElement {
|
|
|
79
67
|
* Absent uses the runtime's own.
|
|
80
68
|
*/
|
|
81
69
|
locale: string;
|
|
70
|
+
/**
|
|
71
|
+
* The page on show, one-based.
|
|
72
|
+
*/
|
|
73
|
+
page: number;
|
|
74
|
+
/**
|
|
75
|
+
* How many items are on a page.
|
|
76
|
+
*/
|
|
77
|
+
pageSize: number;
|
|
78
|
+
/**
|
|
79
|
+
* How many items there are across every page.
|
|
80
|
+
*/
|
|
81
|
+
total: number;
|
|
82
82
|
/** Held across every component asking for the same locale. */
|
|
83
83
|
private get numbers();
|
|
84
84
|
protected render(): TemplateResult;
|
|
@@ -54,18 +54,6 @@ import { property } from 'lit/decorators.js';
|
|
|
54
54
|
let HelixHeadlessPaginationSummary = class HelixHeadlessPaginationSummary extends HelixElement {
|
|
55
55
|
constructor() {
|
|
56
56
|
super(...arguments);
|
|
57
|
-
/**
|
|
58
|
-
* The page on show, one-based.
|
|
59
|
-
*/
|
|
60
|
-
this.page = 1;
|
|
61
|
-
/**
|
|
62
|
-
* How many items are on a page.
|
|
63
|
-
*/
|
|
64
|
-
this.pageSize = 0;
|
|
65
|
-
/**
|
|
66
|
-
* How many items there are across every page.
|
|
67
|
-
*/
|
|
68
|
-
this.total = 0;
|
|
69
57
|
/**
|
|
70
58
|
* The reading, with `{from}`, `{to}` and `{total}` filled in.
|
|
71
59
|
*
|
|
@@ -88,6 +76,18 @@ let HelixHeadlessPaginationSummary = class HelixHeadlessPaginationSummary extend
|
|
|
88
76
|
* Absent uses the runtime's own.
|
|
89
77
|
*/
|
|
90
78
|
this.locale = '';
|
|
79
|
+
/**
|
|
80
|
+
* The page on show, one-based.
|
|
81
|
+
*/
|
|
82
|
+
this.page = 1;
|
|
83
|
+
/**
|
|
84
|
+
* How many items are on a page.
|
|
85
|
+
*/
|
|
86
|
+
this.pageSize = 0;
|
|
87
|
+
/**
|
|
88
|
+
* How many items there are across every page.
|
|
89
|
+
*/
|
|
90
|
+
this.total = 0;
|
|
91
91
|
}
|
|
92
92
|
/** Held across every component asking for the same locale. */
|
|
93
93
|
get numbers() {
|
|
@@ -124,6 +124,12 @@ let HelixHeadlessPaginationSummary = class HelixHeadlessPaginationSummary extend
|
|
|
124
124
|
.replaceAll('{total}', this.numbers(this.total))}`;
|
|
125
125
|
}
|
|
126
126
|
};
|
|
127
|
+
__decorate([
|
|
128
|
+
property()
|
|
129
|
+
], HelixHeadlessPaginationSummary.prototype, "format", void 0);
|
|
130
|
+
__decorate([
|
|
131
|
+
property()
|
|
132
|
+
], HelixHeadlessPaginationSummary.prototype, "locale", void 0);
|
|
127
133
|
__decorate([
|
|
128
134
|
property({ type: Number })
|
|
129
135
|
], HelixHeadlessPaginationSummary.prototype, "page", void 0);
|
|
@@ -133,12 +139,6 @@ __decorate([
|
|
|
133
139
|
__decorate([
|
|
134
140
|
property({ type: Number })
|
|
135
141
|
], HelixHeadlessPaginationSummary.prototype, "total", void 0);
|
|
136
|
-
__decorate([
|
|
137
|
-
property()
|
|
138
|
-
], HelixHeadlessPaginationSummary.prototype, "format", void 0);
|
|
139
|
-
__decorate([
|
|
140
|
-
property()
|
|
141
|
-
], HelixHeadlessPaginationSummary.prototype, "locale", void 0);
|
|
142
142
|
HelixHeadlessPaginationSummary = __decorate([
|
|
143
143
|
customElement('helix-headless-pagination-summary')
|
|
144
144
|
], HelixHeadlessPaginationSummary);
|
|
@@ -7,11 +7,10 @@ declare const HelixHeadlessPinInput_base: (new (...args: any[]) => import("@fusi
|
|
|
7
7
|
* @summary A short code, one character to a box.
|
|
8
8
|
*
|
|
9
9
|
* @description
|
|
10
|
-
* **One `<input>` per cell, rather than one input drawn as cells.**
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* the second, and then closes autofill's gap rather than living with it, below.
|
|
10
|
+
* **One `<input>` per cell, rather than one input drawn as cells.** A single
|
|
11
|
+
* field autofills perfectly and needs a drawn caret nobody can style well;
|
|
12
|
+
* separate fields give every box a real focus ring, a real caret and a real tab
|
|
13
|
+
* stop for free. Autofill's gap is closed below rather than lived with.
|
|
15
14
|
*
|
|
16
15
|
* **Anything longer than one character is treated as a paste, wherever it
|
|
17
16
|
* lands.** That covers the obvious case and two that are not: a browser
|
|
@@ -59,33 +58,13 @@ export declare class HelixHeadlessPinInput extends HelixHeadlessPinInput_base {
|
|
|
59
58
|
*/
|
|
60
59
|
autocomplete: string;
|
|
61
60
|
/**
|
|
62
|
-
*
|
|
61
|
+
* Accessible name for one box, with `{index}` and `{length}` filled in.
|
|
63
62
|
*/
|
|
64
|
-
|
|
63
|
+
cellLabel: string;
|
|
65
64
|
/**
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
* `numeric` and `alphanumeric` also refuse anything else on the way in,
|
|
69
|
-
* because a code that is digits is digits: letting a letter into a box a
|
|
70
|
-
* reader cannot submit is a mistake they have to find and undo themselves.
|
|
71
|
-
* `text` refuses nothing and only trims, so it is the mode for a code with a
|
|
72
|
-
* hyphen in it.
|
|
73
|
-
*
|
|
74
|
-
* **`alphanumeric` is ASCII letters and digits**, which is narrower than the
|
|
75
|
-
* word is in general and is the right narrowness here. A code of this kind
|
|
76
|
-
* comes off a keypad, an SMS or an authenticator, and none of them emit `é`;
|
|
77
|
-
* a filter that accepted it would let through a character the service on the
|
|
78
|
-
* other end is going to reject. A consumer whose codes really do carry
|
|
79
|
-
* marked letters wants `text`, which judges nothing.
|
|
80
|
-
*
|
|
81
|
-
* **Not reflected**, and it was until this component's own server spec caught
|
|
82
|
-
* it: nothing selects on it, so all reflection did was write `type="numeric"`
|
|
83
|
-
* onto every `<helix-pin-input>` ever rendered, an attribute no consumer's
|
|
84
|
-
* markup had. That is the fault `Input`'s own `type` had and the reason the
|
|
85
|
-
* area rules carry the sentence "reflect only what CSS selects on". The real
|
|
86
|
-
* inputs take it as a binding, which is what makes the keyboard follow.
|
|
65
|
+
* How many characters the code has.
|
|
87
66
|
*/
|
|
88
|
-
|
|
67
|
+
length: number;
|
|
89
68
|
/**
|
|
90
69
|
* Whether the characters are hidden, the way a password is.
|
|
91
70
|
*/
|
|
@@ -99,9 +78,7 @@ export declare class HelixHeadlessPinInput extends HelixHeadlessPinInput_base {
|
|
|
99
78
|
* `mask`, where the cell is a password input and a hand-drawn glyph would
|
|
100
79
|
* have to know that.
|
|
101
80
|
*
|
|
102
|
-
* Empty by default, because a row of boxes already reads as a row of boxes
|
|
103
|
-
* and a dot in each is a choice about how much the field should announce
|
|
104
|
-
* itself before anybody has touched it.
|
|
81
|
+
* Empty by default, because a row of boxes already reads as a row of boxes.
|
|
105
82
|
*/
|
|
106
83
|
placeholder: string;
|
|
107
84
|
/**
|
|
@@ -109,9 +86,28 @@ export declare class HelixHeadlessPinInput extends HelixHeadlessPinInput_base {
|
|
|
109
86
|
*/
|
|
110
87
|
readOnly: boolean;
|
|
111
88
|
/**
|
|
112
|
-
*
|
|
89
|
+
* What a box accepts, which decides the keyboard a phone offers.
|
|
90
|
+
*
|
|
91
|
+
* `numeric` and `alphanumeric` also refuse anything else on the way in,
|
|
92
|
+
* because a code that is digits is digits: letting a letter into a box a
|
|
93
|
+
* reader cannot submit is a mistake they have to find and undo themselves.
|
|
94
|
+
* `text` refuses nothing and only trims, so it is the mode for a code with a
|
|
95
|
+
* hyphen in it.
|
|
96
|
+
*
|
|
97
|
+
* **`alphanumeric` is ASCII letters and digits**, which is narrower than the
|
|
98
|
+
* word is in general and is the right narrowness here. A code of this kind
|
|
99
|
+
* comes off a keypad, an SMS or an authenticator, and none of them emit `é`;
|
|
100
|
+
* a filter that accepted it would let through a character the service on the
|
|
101
|
+
* other end is going to reject. A consumer whose codes really do carry
|
|
102
|
+
* marked letters wants `text`, which judges nothing.
|
|
103
|
+
*
|
|
104
|
+
* **Not reflected**: nothing selects on it, so reflecting only writes
|
|
105
|
+
* `type="numeric"` onto every `<helix-pin-input>` ever rendered, an attribute
|
|
106
|
+
* no consumer's markup had. The area rules carry the sentence "reflect only
|
|
107
|
+
* what CSS selects on". The real inputs take it as a binding, which is what
|
|
108
|
+
* makes the keyboard follow.
|
|
113
109
|
*/
|
|
114
|
-
|
|
110
|
+
type: PinType;
|
|
115
111
|
/** Focus is delegated, so the host is never the focus target. */
|
|
116
112
|
static shadowRootOptions: ShadowRootInit;
|
|
117
113
|
/** How many boxes there are, clamped once so every reader agrees. */
|
|
@@ -153,17 +149,9 @@ export declare class HelixHeadlessPinInput extends HelixHeadlessPinInput_base {
|
|
|
153
149
|
* The code as it stood when focus arrived, so a visit that changed nothing
|
|
154
150
|
* says nothing.
|
|
155
151
|
*
|
|
156
|
-
* **
|
|
157
|
-
*
|
|
158
|
-
*
|
|
159
|
-
* every character, so most `focus` events are ones it caused, and telling
|
|
160
|
-
* those apart rests entirely on `relatedTarget`. That is true and it is not
|
|
161
|
-
* an obstacle, because `handleFocusOut` was already doing exactly that guard
|
|
162
|
-
* one method away. The reasoning had talked itself out of a check it had
|
|
163
|
-
* already written.
|
|
164
|
-
*
|
|
165
|
-
* **What the two readings do to a real browser**, measured in Chromium
|
|
166
|
-
* against a native `<input>` with real keystrokes:
|
|
152
|
+
* **Baselined on arrival, not at the last commit**, which is the platform's
|
|
153
|
+
* reading. What the two do to a real browser, measured in Chromium against a
|
|
154
|
+
* native `<input>` with real keystrokes:
|
|
167
155
|
*
|
|
168
156
|
* | | native | last commit | on arrival |
|
|
169
157
|
* |---|---|---|---|
|
|
@@ -195,13 +183,12 @@ export declare class HelixHeadlessPinInput extends HelixHeadlessPinInput_base {
|
|
|
195
183
|
* Whether focus is currently somewhere inside the row.
|
|
196
184
|
*
|
|
197
185
|
* **The arrival is a transition, not a `relatedTarget` reading**, which is
|
|
198
|
-
* what the
|
|
199
|
-
*
|
|
200
|
-
*
|
|
201
|
-
*
|
|
202
|
-
*
|
|
203
|
-
*
|
|
204
|
-
* guard written on it is a guard that holds in production and not in the
|
|
186
|
+
* what the exit still does. `relatedTarget` does not work on the way in for
|
|
187
|
+
* two reasons and the second decides it. Every character moves focus to the
|
|
188
|
+
* next box, so an unguarded `focusin` re-baselines on each keystroke and the
|
|
189
|
+
* row can never report anything: measured, the three commit specs went silent
|
|
190
|
+
* at once. And `focusin` carries `relatedTarget` in a browser and not in
|
|
191
|
+
* happy-dom, so a guard written on it holds in production and not in the
|
|
205
192
|
* specs, which is the worse half. This flag needs neither: entering is
|
|
206
193
|
* `focusin` while it is `false`, and nothing else is.
|
|
207
194
|
*/
|
|
@@ -214,16 +201,15 @@ export declare class HelixHeadlessPinInput extends HelixHeadlessPinInput_base {
|
|
|
214
201
|
*/
|
|
215
202
|
private readonly handleFocusIn;
|
|
216
203
|
/**
|
|
217
|
-
* Commits when focus leaves the row
|
|
218
|
-
* the library has and this one did not.
|
|
204
|
+
* Commits when focus leaves the row.
|
|
219
205
|
*
|
|
220
206
|
* `change` is one of the two events `MixinField` reads as "the reader has had
|
|
221
|
-
* a go at this", so a code that was never completed
|
|
222
|
-
* its own `tooShort` message
|
|
223
|
-
* tabbed away from
|
|
224
|
-
* free by relaying its control's own `change`; here the cells each
|
|
225
|
-
* none of them means the code is entered, and neither does any
|
|
226
|
-
* them mean the reader has left.
|
|
207
|
+
* a go at this", so without this a code that was never completed is never
|
|
208
|
+
* `touched` and its own `tooShort` message cannot show: two boxes of four
|
|
209
|
+
* filled and tabbed away from is answered with nothing at all. `Input` gets
|
|
210
|
+
* this for free by relaying its control's own `change`; here the cells each
|
|
211
|
+
* fire one, none of them means the code is entered, and neither does any
|
|
212
|
+
* single one of them mean the reader has left.
|
|
227
213
|
*
|
|
228
214
|
* **Focus leaving the row, and not a cell.** Every character moves focus to
|
|
229
215
|
* the next box, so a per-cell blur would commit on every keystroke, which is
|
|
@@ -234,11 +220,9 @@ export declare class HelixHeadlessPinInput extends HelixHeadlessPinInput_base {
|
|
|
234
220
|
* Announces the code as entered, from whichever moment reached it first.
|
|
235
221
|
*
|
|
236
222
|
* **One writer, because the fact has two moments and only one meaning.** A
|
|
237
|
-
* filled code and a row being left are both "the reader is done with this"
|
|
238
|
-
*
|
|
239
|
-
*
|
|
240
|
-
* added that fires without baselining, which is the way the pair would have
|
|
241
|
-
* drifted.
|
|
223
|
+
* filled code and a row being left are both "the reader is done with this".
|
|
224
|
+
* Dispatching from either site directly is how a moment gets added that fires
|
|
225
|
+
* without baselining.
|
|
242
226
|
*
|
|
243
227
|
* Silent when nothing moved since the baseline, which is what makes it safe
|
|
244
228
|
* to call from both: completing a code that is already the committed one, or
|
|
@@ -252,11 +236,10 @@ export declare class HelixHeadlessPinInput extends HelixHeadlessPinInput_base {
|
|
|
252
236
|
* Reports the code and a verdict on it.
|
|
253
237
|
*
|
|
254
238
|
* **A half-entered code is invalid whether or not it is required, and that is
|
|
255
|
-
* the platform's answer rather than ours.**
|
|
256
|
-
*
|
|
257
|
-
*
|
|
258
|
-
*
|
|
259
|
-
* feature this is the same shape as:
|
|
239
|
+
* the platform's answer rather than ours.** `required` guards `valueMissing`
|
|
240
|
+
* and nothing guards `tooShort`, so an optional code is refused for being half
|
|
241
|
+
* filled. Measured in Chromium against a native `<input minlength="4">` with
|
|
242
|
+
* real keystrokes, which is the feature this is the same shape as:
|
|
260
243
|
*
|
|
261
244
|
* | | optional | required |
|
|
262
245
|
* |---|---|---|
|