@fusion.dev/helix-headless 0.31.0 → 0.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +55 -19
- package/dist/carousel/root/carousel-root.js +6 -4
- package/dist/drilldown/item/drilldown-item.d.ts +36 -1
- package/dist/drilldown/item/drilldown-item.js +30 -3
- package/dist/table/column/table-column.d.ts +13 -2
- package/dist/table/column/table-column.js +1 -2
- package/dist/tour/stop/tour-stop.d.ts +5 -0
- package/dist/tour/stop/tour-stop.js +7 -0
- package/package.json +5 -5
- package/types/jsx.d.ts +68 -4
- package/types/vue.d.ts +13 -2
package/custom-elements.json
CHANGED
|
@@ -33998,7 +33998,7 @@
|
|
|
33998
33998
|
"declarations": [
|
|
33999
33999
|
{
|
|
34000
34000
|
"kind": "class",
|
|
34001
|
-
"description": "A row that opens a page *contains* that page: its rows are this row's own\nchildren, assigned to the `page` slot. The tree is the structure, so there\nare no ids to wire and a consumer who moves a row has moved its page with it.\n\n**It renders one of three things**, and which one is the stack's business\nrather than its own. On the page showing, it is a row. Showing its own page,\nit contributes that page's rows and nothing else, because its row belongs to\nthe page above. On neither, it renders nothing at all: the rows are in the\nlight DOM and come back untouched, so there is no state to keep and nothing\nto hide with an attribute this element would have to write onto itself.\n\nChoosing is announced, never applied. The row dispatches and the stack\ndecides whether that means drilling in or choosing a command.",
|
|
34001
|
+
"description": "A row that opens a page *contains* that page: its rows are this row's own\nchildren, assigned to the `page` slot. The tree is the structure, so there\nare no ids to wire and a consumer who moves a row has moved its page with it.\n\n**It renders one of three things**, and which one is the stack's business\nrather than its own. On the page showing, it is a row. Showing its own page,\nit contributes that page's rows and nothing else, because its row belongs to\nthe page above. On neither, it renders nothing at all: the rows are in the\nlight DOM and come back untouched, so there is no state to keep and nothing\nto hide with an attribute this element would have to write onto itself.\n\nChoosing is announced, never applied. The row dispatches and the stack\ndecides whether that means drilling in or choosing a command.\n\n**A row that opens a page says so**, with a caret after its words and\n`aria-haspopup`, the way `Menu` marks a row with a submenu: a row that goes\nsomewhere and a row that does something otherwise look the same until one is\npressed. Not on the server, which cannot see the children and so cannot know.",
|
|
34002
34002
|
"name": "HelixHeadlessDrilldownItem",
|
|
34003
34003
|
"cssParts": [
|
|
34004
34004
|
{
|
|
@@ -34008,6 +34008,10 @@
|
|
|
34008
34008
|
{
|
|
34009
34009
|
"description": "The words.",
|
|
34010
34010
|
"name": "label"
|
|
34011
|
+
},
|
|
34012
|
+
{
|
|
34013
|
+
"description": "The caret at the end of a row that opens a page, after the `end` slot. A caret points, so a sheet mirrors it in a right-to-left document.",
|
|
34014
|
+
"name": "mark"
|
|
34011
34015
|
}
|
|
34012
34016
|
],
|
|
34013
34017
|
"slots": [
|
|
@@ -34077,6 +34081,23 @@
|
|
|
34077
34081
|
"description": "Identifies the row to whatever is listening.",
|
|
34078
34082
|
"attribute": "value"
|
|
34079
34083
|
},
|
|
34084
|
+
{
|
|
34085
|
+
"kind": "field",
|
|
34086
|
+
"name": "page",
|
|
34087
|
+
"type": {
|
|
34088
|
+
"text": "boolean"
|
|
34089
|
+
},
|
|
34090
|
+
"privacy": "private",
|
|
34091
|
+
"default": "false",
|
|
34092
|
+
"description": "Whether anything is slotted into `page`.\n\nState rather than a getter over `children`, for the reason `Menu.Item`\nbacks `hasSubmenu` the same way: a getter is read during `render()` with\nnothing to re-read it, so a page a framework fills after the row's first\nrender would open with no caret on the row that leads to it."
|
|
34093
|
+
},
|
|
34094
|
+
{
|
|
34095
|
+
"kind": "field",
|
|
34096
|
+
"name": "readPage",
|
|
34097
|
+
"privacy": "private",
|
|
34098
|
+
"readonly": true,
|
|
34099
|
+
"description": "Re-reads whether a page is slotted, from whichever `page` slot is current.\n\nBound in the template, on both of them. The row and the page it opens each\nrender a `slot[name=\"page\"]`, and moving between them makes Lit build a new\nslot and throw the old one away, which fires on its way out with nothing\nassigned: a listener on the discarded one would clear the caret on every row\nthat has been drilled into and back out of. `Menu.Item.readSubmenu` carries\nthe same note."
|
|
34100
|
+
},
|
|
34080
34101
|
{
|
|
34081
34102
|
"kind": "method",
|
|
34082
34103
|
"name": "focusItem",
|
|
@@ -84698,11 +84719,11 @@
|
|
|
84698
84719
|
"kind": "field",
|
|
84699
84720
|
"name": "align",
|
|
84700
84721
|
"type": {
|
|
84701
|
-
"text": "'center' | 'end' | 'start' |
|
|
84722
|
+
"text": "'center' | 'end' | 'start' | undefined"
|
|
84702
84723
|
},
|
|
84703
|
-
"
|
|
84704
|
-
"
|
|
84705
|
-
"
|
|
84724
|
+
"description": "Which edge the values line up against.\n\n`end` is what a column of numbers wants, so digits of the same magnitude sit\nabove each other. Left unset the cell inherits the table's own alignment,\nwhich is `start` for text in either writing direction. `helix-data-table`\naligns the cells it draws; a `helix-table`'s cells are markup the consumer\nwrote, and align as the consumer styles them. The heading is this element's\nown, and `@fusion.dev/helix` sets it to the same edge in either table.\n\n**Reflected, because the heading is drawn by a stylesheet and has no other\nway to learn it.** Set as a property, which is how React sets it, an\nunreflected `align` left no attribute to select on, so the heading stayed at\nthe start over a column of digits set to the end. It is the author's\ndeclaration and nothing moves it afterwards, so an attribute cannot come to\ndisagree with the element, which is the reason `open` records a custom\nstate instead. No default, so an unset column writes nothing onto its host.",
|
|
84725
|
+
"attribute": "align",
|
|
84726
|
+
"reflects": true
|
|
84706
84727
|
},
|
|
84707
84728
|
{
|
|
84708
84729
|
"kind": "field",
|
|
@@ -85285,10 +85306,9 @@
|
|
|
85285
85306
|
{
|
|
85286
85307
|
"name": "align",
|
|
85287
85308
|
"type": {
|
|
85288
|
-
"text": "'center' | 'end' | 'start' |
|
|
85309
|
+
"text": "'center' | 'end' | 'start' | undefined"
|
|
85289
85310
|
},
|
|
85290
|
-
"
|
|
85291
|
-
"description": "Which edge the values line up against.\n\n`end` is what a column of numbers wants, so digits of the same magnitude sit\nabove each other. Left unset the cell inherits the table's own alignment,\nwhich is `start` for text in either writing direction.",
|
|
85311
|
+
"description": "Which edge the values line up against.\n\n`end` is what a column of numbers wants, so digits of the same magnitude sit\nabove each other. Left unset the cell inherits the table's own alignment,\nwhich is `start` for text in either writing direction. `helix-data-table`\naligns the cells it draws; a `helix-table`'s cells are markup the consumer\nwrote, and align as the consumer styles them. The heading is this element's\nown, and `@fusion.dev/helix` sets it to the same edge in either table.\n\n**Reflected, because the heading is drawn by a stylesheet and has no other\nway to learn it.** Set as a property, which is how React sets it, an\nunreflected `align` left no attribute to select on, so the heading stayed at\nthe start over a column of digits set to the end. It is the author's\ndeclaration and nothing moves it afterwards, so an attribute cannot come to\ndisagree with the element, which is the reason `open` records a custom\nstate instead. No default, so an unset column writes nothing onto its host.",
|
|
85292
85312
|
"fieldName": "align"
|
|
85293
85313
|
},
|
|
85294
85314
|
{
|
|
@@ -100457,7 +100477,7 @@
|
|
|
100457
100477
|
"name": "floating",
|
|
100458
100478
|
"privacy": "private",
|
|
100459
100479
|
"readonly": true,
|
|
100460
|
-
"default": "new PopoverController(this, { anchor: () => this.target, arrow: () => this.partNamed('arrow'), /* Clear of the light, measured to the point of the arrow. The tour lights `spotlight-padding` around the target and the arrow reaches `n / sqrt(2)` past the panel's edge, and with no offset the panel sat on the target itself, over the lit margin, with its point 5.7px into what it pointed at. `offsetWidth` rather than a rect, which reports the rotated box. */ offset: () => { const tour = this.parentElement as (HTMLElement & { spotlightPadding?: number }) | null return ( (tour?.spotlightPadding ?? 0) + (this.partNamed('arrow')?.offsetWidth ?? 0) / Math.SQRT2 ) }, /* A press outside does not end a tour, and this is the decision rather than a stub. Everywhere else a surface closes on an outside press because pressing elsewhere means the reader is finished with it. Here elsewhere is the thing being pointed at: the scrim lets the pointer through on purpose, so the first press a reader makes on the button the tour is describing would be the press that ends the tour. Leaving is the skip control and `Escape`, both of which say so. */ onDismiss: () => {}, placement: () => this.placement, surface: () => this.partNamed('bubble'), })"
|
|
100480
|
+
"default": "new PopoverController(this, { anchor: () => this.target, arrow: () => this.partNamed('arrow'), /* Clear of the light, measured to the point of the arrow. The tour lights `spotlight-padding` around the target and the arrow reaches `n / sqrt(2)` past the panel's edge, and with no offset the panel sat on the target itself, over the lit margin, with its point 5.7px into what it pointed at. `offsetWidth` rather than a rect, which reports the rotated box. */ offset: () => { const tour = this.parentElement as (HTMLElement & { spotlightPadding?: number }) | null return ( (tour?.spotlightPadding ?? 0) + (this.partNamed('arrow')?.offsetWidth ?? 0) / Math.SQRT2 ) }, /* A press outside does not end a tour, and this is the decision rather than a stub. Everywhere else a surface closes on an outside press because pressing elsewhere means the reader is finished with it. Here elsewhere is the thing being pointed at: the scrim lets the pointer through on purpose, so the first press a reader makes on the button the tour is describing would be the press that ends the tour. Leaving is the skip control and `Escape`, both of which say so. */ onDismiss: () => {}, /* The side the panel landed on, which is not always `placement`: a stop with no room on the side it asked for is moved. The styled tier points its arrow from `data-placement` on the panel, inside this shadow root; a stylesheet outside cannot follow `::part(arrow)` with an attribute, and reading the stop's own `placement` instead pointed the arrow from the side that was asked for, or from below wherever React had set it as a property and there was no attribute to read. */ onPlace: (placement) => { const side = placement.split('-')[0] this.toggleState('placed-bottom', side === 'bottom') this.toggleState('placed-left', side === 'left') this.toggleState('placed-right', side === 'right') this.toggleState('placed-top', side === 'top') }, placement: () => this.placement, surface: () => this.partNamed('bubble'), })"
|
|
100461
100481
|
},
|
|
100462
100482
|
{
|
|
100463
100483
|
"kind": "method",
|
|
@@ -100907,6 +100927,32 @@
|
|
|
100907
100927
|
"fieldName": "skipLabel"
|
|
100908
100928
|
}
|
|
100909
100929
|
],
|
|
100930
|
+
"cssStates": [
|
|
100931
|
+
{
|
|
100932
|
+
"description": "While the panel sits below its target.",
|
|
100933
|
+
"name": "placed-bottom"
|
|
100934
|
+
},
|
|
100935
|
+
{
|
|
100936
|
+
"description": "While the panel sits to the left of its target.",
|
|
100937
|
+
"name": "placed-left"
|
|
100938
|
+
},
|
|
100939
|
+
{
|
|
100940
|
+
"description": "While the panel sits to the right of its target.",
|
|
100941
|
+
"name": "placed-right"
|
|
100942
|
+
},
|
|
100943
|
+
{
|
|
100944
|
+
"description": "While the panel sits above its target.",
|
|
100945
|
+
"name": "placed-top"
|
|
100946
|
+
},
|
|
100947
|
+
{
|
|
100948
|
+
"description": "Set a frame after the first render. Transitions are held off until it is, so an element never animates its own arrival.",
|
|
100949
|
+
"name": "settled",
|
|
100950
|
+
"inheritedFrom": {
|
|
100951
|
+
"name": "HelixElement",
|
|
100952
|
+
"module": "src/helix-element/helix-element.ts"
|
|
100953
|
+
}
|
|
100954
|
+
}
|
|
100955
|
+
],
|
|
100910
100956
|
"superclass": {
|
|
100911
100957
|
"name": "HelixElement",
|
|
100912
100958
|
"package": "@fusion.dev/helix-core"
|
|
@@ -100923,16 +100969,6 @@
|
|
|
100923
100969
|
},
|
|
100924
100970
|
"tagName": "helix-headless-tour-stop",
|
|
100925
100971
|
"customElement": true,
|
|
100926
|
-
"cssStates": [
|
|
100927
|
-
{
|
|
100928
|
-
"description": "Set a frame after the first render. Transitions are held off until it is, so an element never animates its own arrival.",
|
|
100929
|
-
"name": "settled",
|
|
100930
|
-
"inheritedFrom": {
|
|
100931
|
-
"name": "HelixElement",
|
|
100932
|
-
"module": "src/helix-element/helix-element.ts"
|
|
100933
|
-
}
|
|
100934
|
-
}
|
|
100935
|
-
],
|
|
100936
100972
|
"modulePath": "src/tour/stop/tour-stop.ts",
|
|
100937
100973
|
"definitionPath": "src/tour/stop/tour-stop.ts"
|
|
100938
100974
|
}
|
|
@@ -133,15 +133,17 @@ let HelixHeadlessCarousel = class HelixHeadlessCarousel extends HelixElement {
|
|
|
133
133
|
}
|
|
134
134
|
const vertical = this.orientation === 'vertical';
|
|
135
135
|
const target = this.edgeOf(slide, track, this.bleed(track));
|
|
136
|
+
const at = vertical ? { top: target } : { left: target };
|
|
136
137
|
if (Math.abs(target - (vertical ? track.scrollTop : track.scrollLeft)) < 1) {
|
|
138
|
+
if (this.settling) {
|
|
139
|
+
track.scrollTo({ behavior: 'instant', ...at });
|
|
140
|
+
this.settling = false;
|
|
141
|
+
}
|
|
137
142
|
return;
|
|
138
143
|
}
|
|
139
144
|
const still = globalThis.matchMedia?.('(prefers-reduced-motion: reduce)').matches ?? false;
|
|
140
145
|
this.settling = true;
|
|
141
|
-
track.scrollTo({
|
|
142
|
-
behavior: still ? 'instant' : 'smooth',
|
|
143
|
-
...(vertical ? { top: target } : { left: target }),
|
|
144
|
-
});
|
|
146
|
+
track.scrollTo({ behavior: still ? 'instant' : 'smooth', ...at });
|
|
145
147
|
}
|
|
146
148
|
stop() {
|
|
147
149
|
this.stopped = true;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HelixElement } from '@fusion.dev/helix-core';
|
|
2
|
-
import { nothing, type TemplateResult } from 'lit';
|
|
2
|
+
import { nothing, type PropertyValues, type TemplateResult } from 'lit';
|
|
3
3
|
/**
|
|
4
4
|
* @summary One row of a drill-down, which may hold a page of its own.
|
|
5
5
|
*
|
|
@@ -18,6 +18,11 @@ import { nothing, type TemplateResult } from 'lit';
|
|
|
18
18
|
* Choosing is announced, never applied. The row dispatches and the stack
|
|
19
19
|
* decides whether that means drilling in or choosing a command.
|
|
20
20
|
*
|
|
21
|
+
* **A row that opens a page says so**, with a caret after its words and
|
|
22
|
+
* `aria-haspopup`, the way `Menu` marks a row with a submenu: a row that goes
|
|
23
|
+
* somewhere and a row that does something otherwise look the same until one is
|
|
24
|
+
* pressed. Not on the server, which cannot see the children and so cannot know.
|
|
25
|
+
*
|
|
21
26
|
* @since 0.1.0
|
|
22
27
|
* @status experimental
|
|
23
28
|
* @aliases Panel item, Drill row
|
|
@@ -32,6 +37,7 @@ import { nothing, type TemplateResult } from 'lit';
|
|
|
32
37
|
*
|
|
33
38
|
* @csspart item - The row itself.
|
|
34
39
|
* @csspart label - The words.
|
|
40
|
+
* @csspart mark - The caret at the end of a row that opens a page, after the `end` slot. A caret points, so a sheet mirrors it in a right-to-left document.
|
|
35
41
|
*/
|
|
36
42
|
export declare class HelixHeadlessDrilldownItem extends HelixElement {
|
|
37
43
|
/**
|
|
@@ -74,6 +80,35 @@ export declare class HelixHeadlessDrilldownItem extends HelixElement {
|
|
|
74
80
|
* Identifies the row to whatever is listening.
|
|
75
81
|
*/
|
|
76
82
|
value: string;
|
|
83
|
+
/**
|
|
84
|
+
* Whether anything is slotted into `page`.
|
|
85
|
+
*
|
|
86
|
+
* State rather than a getter over `children`, for the reason `Menu.Item`
|
|
87
|
+
* backs `hasSubmenu` the same way: a getter is read during `render()` with
|
|
88
|
+
* nothing to re-read it, so a page a framework fills after the row's first
|
|
89
|
+
* render would open with no caret on the row that leads to it.
|
|
90
|
+
*/
|
|
91
|
+
private page;
|
|
92
|
+
/**
|
|
93
|
+
* Reads the children before each render, where they can be known.
|
|
94
|
+
*
|
|
95
|
+
* Not on the server, where there are none to read, nor while hydrating what
|
|
96
|
+
* one sent, whose row carried no caret. `finishHydration` asks for the read
|
|
97
|
+
* that skipped.
|
|
98
|
+
*/
|
|
99
|
+
protected willUpdate(changed: PropertyValues): void;
|
|
100
|
+
protected firstUpdated(changed: PropertyValues): void;
|
|
101
|
+
/**
|
|
102
|
+
* Re-reads whether a page is slotted, from whichever `page` slot is current.
|
|
103
|
+
*
|
|
104
|
+
* Bound in the template, on both of them. The row and the page it opens each
|
|
105
|
+
* render a `slot[name="page"]`, and moving between them makes Lit build a new
|
|
106
|
+
* slot and throw the old one away, which fires on its way out with nothing
|
|
107
|
+
* assigned: a listener on the discarded one would clear the caret on every row
|
|
108
|
+
* that has been drilled into and back out of. `Menu.Item.readSubmenu` carries
|
|
109
|
+
* the same note.
|
|
110
|
+
*/
|
|
111
|
+
private readonly readPage;
|
|
77
112
|
/** Moves focus onto the row itself. */
|
|
78
113
|
focusItem(): void;
|
|
79
114
|
/** Announces that this row was chosen. */
|
|
@@ -5,8 +5,10 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
7
|
import { customElement, HelixElement, HelixSelectEvent } from '@fusion.dev/helix-core';
|
|
8
|
+
import { caretRight } from '@fusion.dev/helix-icons';
|
|
8
9
|
import { html, nothing } from 'lit';
|
|
9
|
-
import { property } from 'lit/decorators.js';
|
|
10
|
+
import { property, state } from 'lit/decorators.js';
|
|
11
|
+
import { unsafeSVG } from 'lit/directives/unsafe-svg.js';
|
|
10
12
|
let HelixHeadlessDrilldownItem = class HelixHeadlessDrilldownItem extends HelixElement {
|
|
11
13
|
constructor() {
|
|
12
14
|
super(...arguments);
|
|
@@ -16,6 +18,21 @@ let HelixHeadlessDrilldownItem = class HelixHeadlessDrilldownItem extends HelixE
|
|
|
16
18
|
this.onPage = true;
|
|
17
19
|
this.showingPage = false;
|
|
18
20
|
this.value = '';
|
|
21
|
+
this.page = false;
|
|
22
|
+
this.readPage = () => {
|
|
23
|
+
const slot = this.renderRoot.querySelector('slot[name="page"]');
|
|
24
|
+
this.page = (slot?.assignedElements().length ?? 0) > 0;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
willUpdate(changed) {
|
|
28
|
+
super.willUpdate(changed);
|
|
29
|
+
if (this.childrenKnown) {
|
|
30
|
+
this.page = this.knownChildren.some((child) => child.slot === 'page');
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
firstUpdated(changed) {
|
|
34
|
+
super.firstUpdated(changed);
|
|
35
|
+
this.finishHydration();
|
|
19
36
|
}
|
|
20
37
|
focusItem() {
|
|
21
38
|
this.partNamed('item')?.focus();
|
|
@@ -28,7 +45,7 @@ let HelixHeadlessDrilldownItem = class HelixHeadlessDrilldownItem extends HelixE
|
|
|
28
45
|
}
|
|
29
46
|
render() {
|
|
30
47
|
if (this.showingPage) {
|
|
31
|
-
return html `<slot name="page"></slot>`;
|
|
48
|
+
return html `<slot name="page" @slotchange=${this.readPage}></slot>`;
|
|
32
49
|
}
|
|
33
50
|
if (!this.onPage) {
|
|
34
51
|
return nothing;
|
|
@@ -38,13 +55,20 @@ let HelixHeadlessDrilldownItem = class HelixHeadlessDrilldownItem extends HelixE
|
|
|
38
55
|
type="button"
|
|
39
56
|
role="menuitem"
|
|
40
57
|
aria-disabled=${this.disabled ? 'true' : nothing}
|
|
58
|
+
aria-haspopup=${this.page ? 'menu' : nothing}
|
|
41
59
|
tabindex=${this.focusable ? '0' : '-1'}
|
|
42
60
|
@click=${() => this.select()}
|
|
43
61
|
>
|
|
44
62
|
<slot name="start"></slot>
|
|
45
63
|
<span part="label"><slot></slot></span>
|
|
46
64
|
<slot name="end"></slot>
|
|
47
|
-
|
|
65
|
+
${this.page
|
|
66
|
+
? html `<svg part="mark" fill="currentColor" viewBox=${caretRight.viewBox} aria-hidden="true">
|
|
67
|
+
${unsafeSVG(caretRight.content)}
|
|
68
|
+
</svg>`
|
|
69
|
+
: nothing}
|
|
70
|
+
</button>
|
|
71
|
+
<div hidden><slot name="page" @slotchange=${this.readPage}></slot></div>`;
|
|
48
72
|
}
|
|
49
73
|
};
|
|
50
74
|
__decorate([
|
|
@@ -62,6 +86,9 @@ __decorate([
|
|
|
62
86
|
__decorate([
|
|
63
87
|
property()
|
|
64
88
|
], HelixHeadlessDrilldownItem.prototype, "value", void 0);
|
|
89
|
+
__decorate([
|
|
90
|
+
state()
|
|
91
|
+
], HelixHeadlessDrilldownItem.prototype, "page", void 0);
|
|
65
92
|
HelixHeadlessDrilldownItem = __decorate([
|
|
66
93
|
customElement('helix-headless-drilldown-item')
|
|
67
94
|
], HelixHeadlessDrilldownItem);
|
|
@@ -79,9 +79,20 @@ export declare class HelixHeadlessTableColumn extends HelixElement {
|
|
|
79
79
|
*
|
|
80
80
|
* `end` is what a column of numbers wants, so digits of the same magnitude sit
|
|
81
81
|
* above each other. Left unset the cell inherits the table's own alignment,
|
|
82
|
-
* which is `start` for text in either writing direction.
|
|
82
|
+
* which is `start` for text in either writing direction. `helix-data-table`
|
|
83
|
+
* aligns the cells it draws; a `helix-table`'s cells are markup the consumer
|
|
84
|
+
* wrote, and align as the consumer styles them. The heading is this element's
|
|
85
|
+
* own, and `@fusion.dev/helix` sets it to the same edge in either table.
|
|
86
|
+
*
|
|
87
|
+
* **Reflected, because the heading is drawn by a stylesheet and has no other
|
|
88
|
+
* way to learn it.** Set as a property, which is how React sets it, an
|
|
89
|
+
* unreflected `align` left no attribute to select on, so the heading stayed at
|
|
90
|
+
* the start over a column of digits set to the end. It is the author's
|
|
91
|
+
* declaration and nothing moves it afterwards, so an attribute cannot come to
|
|
92
|
+
* disagree with the element, which is the reason `open` records a custom
|
|
93
|
+
* state instead. No default, so an unset column writes nothing onto its host.
|
|
83
94
|
*/
|
|
84
|
-
align
|
|
95
|
+
align?: 'center' | 'end' | 'start';
|
|
85
96
|
/**
|
|
86
97
|
* How to read the cell, where the field alone will not do.
|
|
87
98
|
*
|
|
@@ -29,7 +29,6 @@ export const at = (row, path) => {
|
|
|
29
29
|
let HelixHeadlessTableColumn = class HelixHeadlessTableColumn extends HelixElement {
|
|
30
30
|
constructor() {
|
|
31
31
|
super(...arguments);
|
|
32
|
-
this.align = '';
|
|
33
32
|
this.cell = undefined;
|
|
34
33
|
this.compare = undefined;
|
|
35
34
|
this.field = '';
|
|
@@ -172,7 +171,7 @@ let HelixHeadlessTableColumn = class HelixHeadlessTableColumn extends HelixEleme
|
|
|
172
171
|
}
|
|
173
172
|
};
|
|
174
173
|
__decorate([
|
|
175
|
-
property()
|
|
174
|
+
property({ reflect: true })
|
|
176
175
|
], HelixHeadlessTableColumn.prototype, "align", void 0);
|
|
177
176
|
__decorate([
|
|
178
177
|
property({ attribute: false })
|
|
@@ -54,6 +54,11 @@ import '../../button/index.js';
|
|
|
54
54
|
* @csspart next-button - The inner control.
|
|
55
55
|
* @csspart skip - The control that leaves the tour.
|
|
56
56
|
* @csspart skip-button - The inner control.
|
|
57
|
+
*
|
|
58
|
+
* @cssstate placed-bottom - While the panel sits below its target.
|
|
59
|
+
* @cssstate placed-left - While the panel sits to the left of its target.
|
|
60
|
+
* @cssstate placed-right - While the panel sits to the right of its target.
|
|
61
|
+
* @cssstate placed-top - While the panel sits above its target.
|
|
57
62
|
*/
|
|
58
63
|
export declare class HelixHeadlessTourStop extends HelixElement {
|
|
59
64
|
/**
|
|
@@ -28,6 +28,13 @@ let HelixHeadlessTourStop = class HelixHeadlessTourStop extends HelixElement {
|
|
|
28
28
|
return ((tour?.spotlightPadding ?? 0) + (this.partNamed('arrow')?.offsetWidth ?? 0) / Math.SQRT2);
|
|
29
29
|
},
|
|
30
30
|
onDismiss: () => { },
|
|
31
|
+
onPlace: (placement) => {
|
|
32
|
+
const side = placement.split('-')[0];
|
|
33
|
+
this.toggleState('placed-bottom', side === 'bottom');
|
|
34
|
+
this.toggleState('placed-left', side === 'left');
|
|
35
|
+
this.toggleState('placed-right', side === 'right');
|
|
36
|
+
this.toggleState('placed-top', side === 'top');
|
|
37
|
+
},
|
|
31
38
|
placement: () => this.placement,
|
|
32
39
|
surface: () => this.partNamed('bubble'),
|
|
33
40
|
});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fusion.dev/helix-headless",
|
|
3
3
|
"description": "Headless component tier. Structure, accessibility, state, and form participation. No styling.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.32.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Ross Sheppard <ross.sheppard@fusion.dev>",
|
|
7
7
|
"repository": {
|
|
@@ -46,14 +46,14 @@
|
|
|
46
46
|
},
|
|
47
47
|
"bugs": "https://github.com/project-fusion/fusion/issues",
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@fusion.dev/helix-core": "0.
|
|
50
|
-
"@fusion.dev/helix-icons": "0.
|
|
49
|
+
"@fusion.dev/helix-core": "0.32.0",
|
|
50
|
+
"@fusion.dev/helix-icons": "0.32.0",
|
|
51
51
|
"uqr": "^0.1.3"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@custom-elements-manifest/analyzer": "^0.11.0",
|
|
55
|
-
"@fusion.dev/helix-cem": "0.
|
|
56
|
-
"@fusion.dev/helix-testing": "0.
|
|
55
|
+
"@fusion.dev/helix-cem": "0.32.0",
|
|
56
|
+
"@fusion.dev/helix-testing": "0.32.0",
|
|
57
57
|
"@fusion.dev/scripts": "0.0.0-dev",
|
|
58
58
|
"@happy-dom/global-registrator": "^20.0.0",
|
|
59
59
|
"@lit-labs/ssr": "^4.1.0",
|
package/types/jsx.d.ts
CHANGED
|
@@ -13321,7 +13321,18 @@ export type HelixHeadlessTableColumnProps = {
|
|
|
13321
13321
|
|
|
13322
13322
|
`end` is what a column of numbers wants, so digits of the same magnitude sit
|
|
13323
13323
|
above each other. Left unset the cell inherits the table's own alignment,
|
|
13324
|
-
which is `start` for text in either writing direction.
|
|
13324
|
+
which is `start` for text in either writing direction. `helix-data-table`
|
|
13325
|
+
aligns the cells it draws; a `helix-table`'s cells are markup the consumer
|
|
13326
|
+
wrote, and align as the consumer styles them. The heading is this element's
|
|
13327
|
+
own, and `@fusion.dev/helix` sets it to the same edge in either table.
|
|
13328
|
+
|
|
13329
|
+
**Reflected, because the heading is drawn by a stylesheet and has no other
|
|
13330
|
+
way to learn it.** Set as a property, which is how React sets it, an
|
|
13331
|
+
unreflected `align` left no attribute to select on, so the heading stayed at
|
|
13332
|
+
the start over a column of digits set to the end. It is the author's
|
|
13333
|
+
declaration and nothing moves it afterwards, so an attribute cannot come to
|
|
13334
|
+
disagree with the element, which is the reason `open` records a custom
|
|
13335
|
+
state instead. No default, so an unset column writes nothing onto its host. */
|
|
13325
13336
|
align?: (HelixHeadlessTableColumn["align"]) | undefined;
|
|
13326
13337
|
/** The key this column reads out of a row.
|
|
13327
13338
|
|
|
@@ -13399,7 +13410,18 @@ export type HelixHeadlessTableColumnSolidJsProps = {
|
|
|
13399
13410
|
|
|
13400
13411
|
`end` is what a column of numbers wants, so digits of the same magnitude sit
|
|
13401
13412
|
above each other. Left unset the cell inherits the table's own alignment,
|
|
13402
|
-
which is `start` for text in either writing direction.
|
|
13413
|
+
which is `start` for text in either writing direction. `helix-data-table`
|
|
13414
|
+
aligns the cells it draws; a `helix-table`'s cells are markup the consumer
|
|
13415
|
+
wrote, and align as the consumer styles them. The heading is this element's
|
|
13416
|
+
own, and `@fusion.dev/helix` sets it to the same edge in either table.
|
|
13417
|
+
|
|
13418
|
+
**Reflected, because the heading is drawn by a stylesheet and has no other
|
|
13419
|
+
way to learn it.** Set as a property, which is how React sets it, an
|
|
13420
|
+
unreflected `align` left no attribute to select on, so the heading stayed at
|
|
13421
|
+
the start over a column of digits set to the end. It is the author's
|
|
13422
|
+
declaration and nothing moves it afterwards, so an attribute cannot come to
|
|
13423
|
+
disagree with the element, which is the reason `open` records a custom
|
|
13424
|
+
state instead. No default, so an unset column writes nothing onto its host. */
|
|
13403
13425
|
"prop:align"?: (HelixHeadlessTableColumn["align"]) | undefined;
|
|
13404
13426
|
/** The key this column reads out of a row.
|
|
13405
13427
|
|
|
@@ -22219,6 +22241,11 @@ export type CustomElements = {
|
|
|
22219
22241
|
* Choosing is announced, never applied. The row dispatches and the stack
|
|
22220
22242
|
* decides whether that means drilling in or choosing a command.
|
|
22221
22243
|
*
|
|
22244
|
+
* **A row that opens a page says so**, with a caret after its words and
|
|
22245
|
+
* `aria-haspopup`, the way `Menu` marks a row with a submenu: a row that goes
|
|
22246
|
+
* somewhere and a row that does something otherwise look the same until one is
|
|
22247
|
+
* pressed. Not on the server, which cannot see the children and so cannot know.
|
|
22248
|
+
*
|
|
22222
22249
|
* ## Attributes & Properties
|
|
22223
22250
|
*
|
|
22224
22251
|
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
@@ -22289,6 +22316,7 @@ export type CustomElements = {
|
|
|
22289
22316
|
*
|
|
22290
22317
|
* - `item`: The row itself.
|
|
22291
22318
|
* - `label`: The words.
|
|
22319
|
+
* - `mark`: The caret at the end of a row that opens a page, after the `end` slot. A caret points, so a sheet mirrors it in a right-to-left document.
|
|
22292
22320
|
*
|
|
22293
22321
|
* ## CSS States
|
|
22294
22322
|
*
|
|
@@ -30329,7 +30357,18 @@ export type CustomElements = {
|
|
|
30329
30357
|
*
|
|
30330
30358
|
* `end` is what a column of numbers wants, so digits of the same magnitude sit
|
|
30331
30359
|
* above each other. Left unset the cell inherits the table's own alignment,
|
|
30332
|
-
* which is `start` for text in either writing direction.
|
|
30360
|
+
* which is `start` for text in either writing direction. `helix-data-table`
|
|
30361
|
+
* aligns the cells it draws; a `helix-table`'s cells are markup the consumer
|
|
30362
|
+
* wrote, and align as the consumer styles them. The heading is this element's
|
|
30363
|
+
* own, and `@fusion.dev/helix` sets it to the same edge in either table.
|
|
30364
|
+
*
|
|
30365
|
+
* **Reflected, because the heading is drawn by a stylesheet and has no other
|
|
30366
|
+
* way to learn it.** Set as a property, which is how React sets it, an
|
|
30367
|
+
* unreflected `align` left no attribute to select on, so the heading stayed at
|
|
30368
|
+
* the start over a column of digits set to the end. It is the author's
|
|
30369
|
+
* declaration and nothing moves it afterwards, so an attribute cannot come to
|
|
30370
|
+
* disagree with the element, which is the reason `open` records a custom
|
|
30371
|
+
* state instead. No default, so an unset column writes nothing onto its host.
|
|
30333
30372
|
* - `field`: The key this column reads out of a row.
|
|
30334
30373
|
*
|
|
30335
30374
|
* Dot paths resolve, so `field="owner.name"` reads a nested value: a result
|
|
@@ -32789,6 +32828,10 @@ export type CustomElements = {
|
|
|
32789
32828
|
*
|
|
32790
32829
|
* These can be used to apply styling when a component is in a given state.
|
|
32791
32830
|
*
|
|
32831
|
+
* - `placed-bottom`: While the panel sits below its target.
|
|
32832
|
+
* - `placed-left`: While the panel sits to the left of its target.
|
|
32833
|
+
* - `placed-right`: While the panel sits to the right of its target.
|
|
32834
|
+
* - `placed-top`: While the panel sits above its target.
|
|
32792
32835
|
* - `settled`: Set a frame after the first render. Transitions are held off until it is, so an element never animates its own arrival.
|
|
32793
32836
|
*/
|
|
32794
32837
|
"helix-headless-tour-stop": Partial<
|
|
@@ -39211,6 +39254,11 @@ export type CustomElementsSolidJs = {
|
|
|
39211
39254
|
* Choosing is announced, never applied. The row dispatches and the stack
|
|
39212
39255
|
* decides whether that means drilling in or choosing a command.
|
|
39213
39256
|
*
|
|
39257
|
+
* **A row that opens a page says so**, with a caret after its words and
|
|
39258
|
+
* `aria-haspopup`, the way `Menu` marks a row with a submenu: a row that goes
|
|
39259
|
+
* somewhere and a row that does something otherwise look the same until one is
|
|
39260
|
+
* pressed. Not on the server, which cannot see the children and so cannot know.
|
|
39261
|
+
*
|
|
39214
39262
|
* ## Attributes & Properties
|
|
39215
39263
|
*
|
|
39216
39264
|
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
@@ -39281,6 +39329,7 @@ export type CustomElementsSolidJs = {
|
|
|
39281
39329
|
*
|
|
39282
39330
|
* - `item`: The row itself.
|
|
39283
39331
|
* - `label`: The words.
|
|
39332
|
+
* - `mark`: The caret at the end of a row that opens a page, after the `end` slot. A caret points, so a sheet mirrors it in a right-to-left document.
|
|
39284
39333
|
*
|
|
39285
39334
|
* ## CSS States
|
|
39286
39335
|
*
|
|
@@ -47463,7 +47512,18 @@ export type CustomElementsSolidJs = {
|
|
|
47463
47512
|
*
|
|
47464
47513
|
* `end` is what a column of numbers wants, so digits of the same magnitude sit
|
|
47465
47514
|
* above each other. Left unset the cell inherits the table's own alignment,
|
|
47466
|
-
* which is `start` for text in either writing direction.
|
|
47515
|
+
* which is `start` for text in either writing direction. `helix-data-table`
|
|
47516
|
+
* aligns the cells it draws; a `helix-table`'s cells are markup the consumer
|
|
47517
|
+
* wrote, and align as the consumer styles them. The heading is this element's
|
|
47518
|
+
* own, and `@fusion.dev/helix` sets it to the same edge in either table.
|
|
47519
|
+
*
|
|
47520
|
+
* **Reflected, because the heading is drawn by a stylesheet and has no other
|
|
47521
|
+
* way to learn it.** Set as a property, which is how React sets it, an
|
|
47522
|
+
* unreflected `align` left no attribute to select on, so the heading stayed at
|
|
47523
|
+
* the start over a column of digits set to the end. It is the author's
|
|
47524
|
+
* declaration and nothing moves it afterwards, so an attribute cannot come to
|
|
47525
|
+
* disagree with the element, which is the reason `open` records a custom
|
|
47526
|
+
* state instead. No default, so an unset column writes nothing onto its host.
|
|
47467
47527
|
* - `field`: The key this column reads out of a row.
|
|
47468
47528
|
*
|
|
47469
47529
|
* Dot paths resolve, so `field="owner.name"` reads a nested value: a result
|
|
@@ -49972,6 +50032,10 @@ export type CustomElementsSolidJs = {
|
|
|
49972
50032
|
*
|
|
49973
50033
|
* These can be used to apply styling when a component is in a given state.
|
|
49974
50034
|
*
|
|
50035
|
+
* - `placed-bottom`: While the panel sits below its target.
|
|
50036
|
+
* - `placed-left`: While the panel sits to the left of its target.
|
|
50037
|
+
* - `placed-right`: While the panel sits to the right of its target.
|
|
50038
|
+
* - `placed-top`: While the panel sits above its target.
|
|
49975
50039
|
* - `settled`: Set a frame after the first render. Transitions are held off until it is, so an element never animates its own arrival.
|
|
49976
50040
|
*/
|
|
49977
50041
|
"helix-headless-tour-stop": Partial<
|
package/types/vue.d.ts
CHANGED
|
@@ -6834,7 +6834,18 @@ export type HelixHeadlessTableColumnVueProps = {
|
|
|
6834
6834
|
|
|
6835
6835
|
`end` is what a column of numbers wants, so digits of the same magnitude sit
|
|
6836
6836
|
above each other. Left unset the cell inherits the table's own alignment,
|
|
6837
|
-
which is `start` for text in either writing direction.
|
|
6837
|
+
which is `start` for text in either writing direction. `helix-data-table`
|
|
6838
|
+
aligns the cells it draws; a `helix-table`'s cells are markup the consumer
|
|
6839
|
+
wrote, and align as the consumer styles them. The heading is this element's
|
|
6840
|
+
own, and `@fusion.dev/helix` sets it to the same edge in either table.
|
|
6841
|
+
|
|
6842
|
+
**Reflected, because the heading is drawn by a stylesheet and has no other
|
|
6843
|
+
way to learn it.** Set as a property, which is how React sets it, an
|
|
6844
|
+
unreflected `align` left no attribute to select on, so the heading stayed at
|
|
6845
|
+
the start over a column of digits set to the end. It is the author's
|
|
6846
|
+
declaration and nothing moves it afterwards, so an attribute cannot come to
|
|
6847
|
+
disagree with the element, which is the reason `open` records a custom
|
|
6848
|
+
state instead. No default, so an unset column writes nothing onto its host. */
|
|
6838
6849
|
align?: (HelixHeadlessTableColumn["align"]) | undefined;
|
|
6839
6850
|
/** The key this column reads out of a row.
|
|
6840
6851
|
|
|
@@ -9020,7 +9031,7 @@ export interface WcToolkitVueGlobalComponents {
|
|
|
9020
9031
|
HelixHeadlessDrawerVueProps,
|
|
9021
9032
|
HelixHeadlessDrawerVueEvents
|
|
9022
9033
|
>;
|
|
9023
|
-
/** A row that opens a page *contains* that page: its rows are this row's own children, assigned to the 'page' slot. The tree is the structure, so there are no ids to wire and a consumer who moves a row has moved its page with it. **It renders one of three things**, and which one is the stack's business rather than its own. On the page showing, it is a row. Showing its own page, it contributes that page's rows and nothing else, because its row belongs to the page above. On neither, it renders nothing at all: the rows are in the light DOM and come back untouched, so there is no state to keep and nothing to hide with an attribute this element would have to write onto itself. Choosing is announced, never applied. The row dispatches and the stack decides whether that means drilling in or choosing a command. */
|
|
9034
|
+
/** A row that opens a page *contains* that page: its rows are this row's own children, assigned to the 'page' slot. The tree is the structure, so there are no ids to wire and a consumer who moves a row has moved its page with it. **It renders one of three things**, and which one is the stack's business rather than its own. On the page showing, it is a row. Showing its own page, it contributes that page's rows and nothing else, because its row belongs to the page above. On neither, it renders nothing at all: the rows are in the light DOM and come back untouched, so there is no state to keep and nothing to hide with an attribute this element would have to write onto itself. Choosing is announced, never applied. The row dispatches and the stack decides whether that means drilling in or choosing a command. **A row that opens a page says so**, with a caret after its words and 'aria-haspopup', the way 'Menu' marks a row with a submenu: a row that goes somewhere and a row that does something otherwise look the same until one is pressed. Not on the server, which cannot see the children and so cannot know. */
|
|
9024
9035
|
"helix-headless-drilldown-item": DefineCustomElement<
|
|
9025
9036
|
HelixHeadlessDrilldownItem,
|
|
9026
9037
|
HelixHeadlessDrilldownItemVueProps,
|