@patternfly/pfe-core 2.0.0-next.12 → 2.0.0-next.14
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/controllers/floating-dom-controller.d.ts +35 -16
- package/controllers/floating-dom-controller.js +1 -1
- package/controllers/floating-dom-controller.js.map +3 -3
- package/controllers/internals-controller.d.ts +45 -2
- package/controllers/internals-controller.js +1 -1
- package/controllers/internals-controller.js.map +3 -3
- package/controllers/logger.js.map +1 -7
- package/controllers/roving-tabindex-controller.d.ts +44 -0
- package/controllers/roving-tabindex-controller.js +2 -0
- package/controllers/roving-tabindex-controller.js.map +7 -0
- package/controllers/scroll-spy-controller.d.ts +37 -0
- package/controllers/scroll-spy-controller.js +2 -0
- package/controllers/scroll-spy-controller.js.map +7 -0
- package/package.json +6 -4
|
@@ -1,30 +1,49 @@
|
|
|
1
|
+
import type { Placement } from '@floating-ui/dom';
|
|
1
2
|
import type { ReactiveController, ReactiveElement } from 'lit';
|
|
2
|
-
type
|
|
3
|
-
type
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
import type { StyleInfo } from 'lit/directives/style-map.js';
|
|
4
|
+
import type { Options as Offset } from '@floating-ui/core/src/middleware/offset';
|
|
5
|
+
export { Placement };
|
|
6
|
+
type Lazy<T> = T | (() => T | null | undefined);
|
|
7
|
+
interface FloatingDOMControllerOptions {
|
|
8
|
+
content: Lazy<HTMLElement>;
|
|
9
|
+
invoker?: Lazy<HTMLElement>;
|
|
10
|
+
arrow?: boolean;
|
|
11
|
+
flip?: boolean;
|
|
12
|
+
shift?: boolean;
|
|
13
|
+
padding?: number;
|
|
14
|
+
}
|
|
15
|
+
interface ShowOptions {
|
|
16
|
+
offset?: Offset;
|
|
17
|
+
placement?: Placement;
|
|
18
|
+
}
|
|
19
|
+
export type Anchor = '' | 'top' | 'left' | 'bottom' | 'right';
|
|
20
|
+
export type Alignment = 'center' | 'start' | 'end';
|
|
8
21
|
/**
|
|
9
22
|
* Controls floating DOM within a web component, e.g. tooltips and popovers
|
|
10
23
|
*/
|
|
11
24
|
export declare class FloatingDOMController implements ReactiveController {
|
|
12
25
|
#private;
|
|
13
26
|
private host;
|
|
14
|
-
|
|
15
|
-
|
|
27
|
+
/** The crosswise alignment of the invoker on which to display the floating DOM */
|
|
28
|
+
get alignment(): Alignment;
|
|
29
|
+
/** The side of the invoker on which to display the floating DOM */
|
|
30
|
+
get anchor(): Anchor;
|
|
16
31
|
/**
|
|
17
32
|
* When true, the floating DOM is visible
|
|
18
33
|
*/
|
|
19
34
|
get open(): boolean;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
35
|
+
/** The computed placement of the floating DOM */
|
|
36
|
+
get placement(): Placement;
|
|
37
|
+
/**
|
|
38
|
+
* Styles to apply to your element's container
|
|
39
|
+
*
|
|
40
|
+
* - `--_floating-content-translate`: translate to apply to floating content.
|
|
41
|
+
*/
|
|
42
|
+
get styles(): StyleInfo;
|
|
43
|
+
constructor(host: ReactiveElement, options: FloatingDOMControllerOptions);
|
|
44
|
+
hostDisconnected(): void;
|
|
23
45
|
/** Show the floating DOM */
|
|
24
|
-
show(): void
|
|
46
|
+
show({ offset, placement }?: ShowOptions): Promise<void>;
|
|
25
47
|
/** Hide the floating DOM */
|
|
26
|
-
hide(): void
|
|
27
|
-
/** Initialize the floating DOM */
|
|
28
|
-
create(invoker: Element, content: HTMLElement, placement: Placement, offset?: number[]): void;
|
|
48
|
+
hide(): Promise<void>;
|
|
29
49
|
}
|
|
30
|
-
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var
|
|
1
|
+
var C=(n,t,i)=>{if(!t.has(n))throw TypeError("Cannot "+i)};var e=(n,t,i)=>(C(n,t,"read from private field"),i?i.call(n):t.get(n)),s=(n,t,i)=>{if(t.has(n))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(n):t.set(n,i)},l=(n,t,i,o)=>(C(n,t,"write to private field"),o?o.call(n,i):t.set(n,i),i),M=(n,t,i,o)=>({set _(a){l(n,t,a,i)},get _(){return e(n,t,o)}}),P=(n,t,i)=>(C(n,t,"access private method"),i);import{autoUpdate as T,computePosition as D,offset as E,shift as F,flip as U}from"@floating-ui/dom";var c,p,f,d,g,y,m,r,w,x,v,A,O,b,q=class{constructor(t,i){this.host=t;s(this,w);s(this,v);s(this,O);s(this,c,!1);s(this,p,!1);s(this,f,void 0);s(this,d,void 0);s(this,g,void 0);s(this,y,void 0);s(this,m,void 0);s(this,r,void 0);var o,a,h,u;t.addController(this),l(this,r,i),(o=e(this,r)).invoker??(o.invoker=t),(a=e(this,r)).arrow??(a.arrow=!1),(h=e(this,r)).flip??(h.flip=!0),(u=e(this,r)).shift??(u.shift=!0)}get alignment(){return e(this,g)??"center"}get anchor(){return e(this,d)??""}get open(){return e(this,c)}get placement(){return e(this,m)??"top"}get styles(){return e(this,y)??{}}hostDisconnected(){var t;(t=e(this,f))==null||t.call(this)}async show({offset:t,placement:i}={}){let o=e(this,w,x),a=e(this,v,A);if(!(!o||!a)){if(!e(this,p)){l(this,p,!0);let h=P(this,O,b).call(this,i,t);e(this,f)??l(this,f,T(o,a,()=>P(this,O,b).call(this,i,t))),await h,l(this,p,!1)}l(this,c,!0),this.host.requestUpdate()}}async hide(){var t;for(await this.host.updateComplete;e(this,p)&&!this.open;)await new Promise(requestAnimationFrame);l(this,c,!1),(t=e(this,f))==null||t.call(this),this.host.requestUpdate(),await this.host.updateComplete}};c=new WeakMap,p=new WeakMap,f=new WeakMap,d=new WeakMap,g=new WeakMap,y=new WeakMap,m=new WeakMap,r=new WeakMap,w=new WeakSet,x=function(){let{invoker:t}=e(this,r);return typeof t=="function"?t():t},v=new WeakSet,A=function(){let{content:t}=e(this,r);return typeof t=="function"?t():t},O=new WeakSet,b=async function(t="top",i){let{flip:o,padding:a,shift:h}=e(this,r),u=e(this,w,x),k=e(this,v,A);if(!u||!k)return;let{x:R,y:L,placement:S}=await D(u,k,{strategy:"absolute",placement:t,middleware:[E(i),h&&F({padding:a}),o&&U({padding:a})].filter(Boolean)});l(this,m,S),[M(this,d)._,M(this,g)._]=e(this,m).split("-")??[],l(this,y,{"--_floating-content-translate":`${R}px ${L}px`}),this.host.requestUpdate()};export{q as FloatingDOMController};
|
|
2
2
|
//# sourceMappingURL=floating-dom-controller.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["floating-dom-controller.ts"],
|
|
4
|
-
"sourcesContent": ["import type {
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["
|
|
4
|
+
"sourcesContent": ["import type { Placement } from '@floating-ui/dom';\nimport type { ReactiveController, ReactiveElement } from 'lit';\nimport type { StyleInfo } from 'lit/directives/style-map.js';\nimport type { Options as Offset } from '@floating-ui/core/src/middleware/offset';\n\n\nexport { Placement };\n\nimport {\n autoUpdate,\n computePosition,\n offset as offsetMiddleware,\n shift as shiftMiddleware,\n flip as flipMiddleware,\n} from '@floating-ui/dom';\n\ntype Lazy<T> = T|(() => T|null|undefined);\n\ninterface FloatingDOMControllerOptions {\n content: Lazy<HTMLElement>;\n invoker?: Lazy<HTMLElement>;\n arrow?: boolean;\n flip?: boolean;\n shift?: boolean;\n padding?: number;\n}\n\ninterface ShowOptions {\n offset?: Offset;\n placement?: Placement;\n}\n\nexport type Anchor = ''|'top'|'left'|'bottom'|'right';\nexport type Alignment = 'center'|'start'|'end';\n\n/**\n * Controls floating DOM within a web component, e.g. tooltips and popovers\n */\nexport class FloatingDOMController implements ReactiveController {\n #open = false;\n #opening = false;\n #cleanup?: () => void;\n #anchor?: Anchor;\n #alignment?: Alignment;\n #styles?: StyleInfo;\n #placement?: Placement;\n #options: Required<FloatingDOMControllerOptions>;\n\n get #invoker() {\n const { invoker } = this.#options;\n return typeof invoker === 'function' ? invoker() : invoker;\n }\n\n get #content() {\n const { content } = this.#options;\n return typeof content === 'function' ? content() : content;\n }\n\n /** The crosswise alignment of the invoker on which to display the floating DOM */\n get alignment() {\n return this.#alignment ?? 'center';\n }\n\n /** The side of the invoker on which to display the floating DOM */\n get anchor() {\n return this.#anchor ?? '';\n }\n\n /**\n * When true, the floating DOM is visible\n */\n get open() {\n return this.#open;\n }\n\n /** The computed placement of the floating DOM */\n get placement(): Placement {\n return this.#placement ?? 'top';\n }\n\n /**\n * Styles to apply to your element's container\n *\n * - `--_floating-content-translate`: translate to apply to floating content.\n */\n get styles(): StyleInfo {\n return this.#styles ?? {};\n }\n\n constructor(\n private host: ReactiveElement,\n options: FloatingDOMControllerOptions\n ) {\n host.addController(this);\n this.#options = options as Required<FloatingDOMControllerOptions>;\n this.#options.invoker ??= host;\n this.#options.arrow ??= false;\n this.#options.flip ??= true;\n this.#options.shift ??= true;\n }\n\n hostDisconnected() {\n this.#cleanup?.();\n }\n\n async #update(placement: Placement = 'top', offset?: Offset) {\n const { flip, padding, shift } = this.#options;\n\n const invoker = this.#invoker;\n const content = this.#content;\n if (!invoker || !content) {\n return;\n }\n const { x, y, placement: _placement } = await computePosition(invoker, content, {\n strategy: 'absolute',\n placement,\n middleware: [\n offsetMiddleware(offset),\n shift && shiftMiddleware({ padding }),\n flip && flipMiddleware({ padding }),\n ].filter(Boolean)\n });\n\n this.#placement = _placement;\n [this.#anchor, this.#alignment] = (this.#placement.split('-') ?? []) as [Anchor, Alignment];\n this.#styles = {\n '--_floating-content-translate': `${x}px ${y}px`,\n };\n this.host.requestUpdate();\n }\n\n /** Show the floating DOM */\n async show({ offset, placement }: ShowOptions = {}) {\n const invoker = this.#invoker;\n const content = this.#content;\n if (!invoker || !content) {\n return;\n }\n if (!this.#opening) {\n this.#opening = true;\n const p = this.#update(placement, offset);\n this.#cleanup ??= autoUpdate(invoker, content, () =>\n this.#update(placement, offset));\n await p;\n this.#opening = false;\n }\n this.#open = true;\n this.host.requestUpdate();\n }\n\n /** Hide the floating DOM */\n async hide() {\n await this.host.updateComplete;\n while (this.#opening && !this.open) {\n await new Promise(requestAnimationFrame);\n }\n this.#open = false;\n this.#cleanup?.();\n this.host.requestUpdate();\n await this.host.updateComplete;\n }\n}\n"],
|
|
5
|
+
"mappings": "gcAQA,OACE,cAAAA,EACA,mBAAAC,EACA,UAAUC,EACV,SAASC,EACT,QAAQC,MACH,mBAdP,IAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAsCaC,EAAN,KAA0D,CAmD/D,YACUC,EACRC,EACA,CAFQ,UAAAD,EA1CVE,EAAA,KAAIT,GAKJS,EAAA,KAAIP,GAoDJO,EAAA,KAAML,GAlENK,EAAA,KAAAjB,EAAQ,IACRiB,EAAA,KAAAhB,EAAW,IACXgB,EAAA,KAAAf,EAAA,QACAe,EAAA,KAAAd,EAAA,QACAc,EAAA,KAAAb,EAAA,QACAa,EAAA,KAAAZ,EAAA,QACAY,EAAA,KAAAX,EAAA,QACAW,EAAA,KAAAV,EAAA,QA9CF,IAAAW,EAAAC,EAAAC,EAAAC,EA6FIN,EAAK,cAAc,IAAI,EACvBO,EAAA,KAAKf,EAAWS,IAChBE,EAAAK,EAAA,KAAKhB,IAAS,UAAdW,EAAc,QAAYH,IAC1BI,EAAAI,EAAA,KAAKhB,IAAS,QAAdY,EAAc,MAAU,KACxBC,EAAAG,EAAA,KAAKhB,IAAS,OAAda,EAAc,KAAS,KACvBC,EAAAE,EAAA,KAAKhB,IAAS,QAAdc,EAAc,MAAU,GAC1B,CAxCA,IAAI,WAAY,CACd,OAAOE,EAAA,KAAKnB,IAAc,QAC5B,CAGA,IAAI,QAAS,CACX,OAAOmB,EAAA,KAAKpB,IAAW,EACzB,CAKA,IAAI,MAAO,CACT,OAAOoB,EAAA,KAAKvB,EACd,CAGA,IAAI,WAAuB,CACzB,OAAOuB,EAAA,KAAKjB,IAAc,KAC5B,CAOA,IAAI,QAAoB,CACtB,OAAOiB,EAAA,KAAKlB,IAAW,CAAC,CAC1B,C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hB,GACzB,OAAO,OAAOoB,GAAY,WAAaA,EAAQ,EAAIA,CACrD,EAiDMf,EAAA,YAAAC,EAAO,eAACY,EAAuB,MAAOD,EAAiB,CAC3D,GAAM,CAAE,KAAAO,EAAM,QAAAC,EAAS,MAAAC,CAAM,EAAIV,EAAA,KAAKhB,GAEhCmB,EAAUH,EAAA,KAAKf,EAAAC,GACfkB,EAAUJ,EAAA,KAAKb,EAAAC,GACrB,GAAI,CAACe,GAAW,CAACC,EACf,OAEF,GAAM,CAAE,EAAAO,EAAG,EAAAC,EAAG,UAAW7B,CAAW,EAAI,MAAM8B,EAAgBV,EAASC,EAAS,CAC9E,SAAU,WACV,UAAAF,EACA,WAAY,CACVY,EAAiBb,CAAM,EACvBS,GAASK,EAAgB,CAAE,QAAAN,CAAQ,CAAC,EACpCD,GAAQQ,EAAe,CAAE,QAAAP,CAAQ,CAAC,CACpC,EAAE,OAAO,OAAO,CAClB,CAAC,EAEDV,EAAA,KAAKhB,EAAaA,GAClB,CAACkC,EAAA,KAAArC,GAAA,EAAcqC,EAAA,KAAApC,GAAA,CAAe,EAAKmB,EAAA,KAAKjB,GAAW,MAAM,GAAG,GAAK,CAAC,EAClEgB,EAAA,KAAKjB,EAAU,CACb,gCAAiC,GAAG6B,OAAOC,KAC7C,GACA,KAAK,KAAK,cAAc,CAC1B",
|
|
6
|
+
"names": ["autoUpdate", "computePosition", "offsetMiddleware", "shiftMiddleware", "flipMiddleware", "_open", "_opening", "_cleanup", "_anchor", "_alignment", "_styles", "_placement", "_options", "_invoker", "invoker_get", "_content", "content_get", "_update", "update_fn", "FloatingDOMController", "host", "options", "__privateAdd", "_a", "_b", "_c", "_d", "__privateSet", "__privateGet", "offset", "placement", "invoker", "content", "p", "__privateMethod", "autoUpdate", "flip", "padding", "shift", "x", "y", "computePosition", "offsetMiddleware", "shiftMiddleware", "flipMiddleware", "__privateWrapper"]
|
|
7
7
|
}
|
|
@@ -1,8 +1,51 @@
|
|
|
1
1
|
import type { ReactiveController, ReactiveControllerHost } from 'lit';
|
|
2
|
-
export declare class InternalsController implements ReactiveController {
|
|
2
|
+
export declare class InternalsController implements ReactiveController, ARIAMixin {
|
|
3
3
|
#private;
|
|
4
4
|
host: ReactiveControllerHost & HTMLElement;
|
|
5
|
-
|
|
5
|
+
role: ARIAMixin['role'];
|
|
6
|
+
ariaAtomic: ARIAMixin['ariaAtomic'];
|
|
7
|
+
ariaAutoComplete: ARIAMixin['ariaAutoComplete'];
|
|
8
|
+
ariaBusy: ARIAMixin['ariaBusy'];
|
|
9
|
+
ariaChecked: ARIAMixin['ariaChecked'];
|
|
10
|
+
ariaColCount: ARIAMixin['ariaColCount'];
|
|
11
|
+
ariaColIndex: ARIAMixin['ariaColIndex'];
|
|
12
|
+
ariaColIndexText: ARIAMixin['ariaColIndexText'];
|
|
13
|
+
ariaColSpan: ARIAMixin['ariaColSpan'];
|
|
14
|
+
ariaCurrent: ARIAMixin['ariaCurrent'];
|
|
15
|
+
ariaDisabled: ARIAMixin['ariaDisabled'];
|
|
16
|
+
ariaExpanded: ARIAMixin['ariaExpanded'];
|
|
17
|
+
ariaHasPopup: ARIAMixin['ariaHasPopup'];
|
|
18
|
+
ariaHidden: ARIAMixin['ariaHidden'];
|
|
19
|
+
ariaInvalid: ARIAMixin['ariaInvalid'];
|
|
20
|
+
ariaKeyShortcuts: ARIAMixin['ariaKeyShortcuts'];
|
|
21
|
+
ariaLabel: ARIAMixin['ariaLabel'];
|
|
22
|
+
ariaLevel: ARIAMixin['ariaLevel'];
|
|
23
|
+
ariaLive: ARIAMixin['ariaLive'];
|
|
24
|
+
ariaModal: ARIAMixin['ariaModal'];
|
|
25
|
+
ariaMultiLine: ARIAMixin['ariaMultiLine'];
|
|
26
|
+
ariaMultiSelectable: ARIAMixin['ariaMultiSelectable'];
|
|
27
|
+
ariaOrientation: ARIAMixin['ariaOrientation'];
|
|
28
|
+
ariaPlaceholder: ARIAMixin['ariaPlaceholder'];
|
|
29
|
+
ariaPosInSet: ARIAMixin['ariaPosInSet'];
|
|
30
|
+
ariaPressed: ARIAMixin['ariaPressed'];
|
|
31
|
+
ariaReadOnly: ARIAMixin['ariaReadOnly'];
|
|
32
|
+
ariaRequired: ARIAMixin['ariaRequired'];
|
|
33
|
+
ariaRoleDescription: ARIAMixin['ariaRoleDescription'];
|
|
34
|
+
ariaRowCount: ARIAMixin['ariaRowCount'];
|
|
35
|
+
ariaRowIndex: ARIAMixin['ariaRowIndex'];
|
|
36
|
+
ariaRowIndexText: ARIAMixin['ariaRowIndexText'];
|
|
37
|
+
ariaRowSpan: ARIAMixin['ariaRowSpan'];
|
|
38
|
+
ariaSelected: ARIAMixin['ariaSelected'];
|
|
39
|
+
ariaSetSize: ARIAMixin['ariaSetSize'];
|
|
40
|
+
ariaSort: ARIAMixin['ariaSort'];
|
|
41
|
+
ariaValueMax: ARIAMixin['ariaValueMax'];
|
|
42
|
+
ariaValueMin: ARIAMixin['ariaValueMin'];
|
|
43
|
+
ariaValueNow: ARIAMixin['ariaValueNow'];
|
|
44
|
+
ariaValueText: ARIAMixin['ariaValueText'];
|
|
45
|
+
/** True when the control is disabled via it's containing fieldset element */
|
|
46
|
+
get formDisabled(): boolean;
|
|
47
|
+
static protos: WeakMap<object, any>;
|
|
48
|
+
constructor(host: ReactiveControllerHost & HTMLElement, options?: Partial<ARIAMixin>);
|
|
6
49
|
hostConnected?(): void;
|
|
7
50
|
submit(): void;
|
|
8
51
|
reset(): void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var
|
|
1
|
+
var o=(a,i,e)=>{if(!i.has(a))throw TypeError("Cannot "+e)};var l=(a,i,e)=>(o(a,i,"read from private field"),e?e.call(a):i.get(a)),d=(a,i,e)=>{if(i.has(a))throw TypeError("Cannot add the same private member more than once");i instanceof WeakSet?i.add(a):i.set(a,e)},c=(a,i,e,r)=>(o(a,i,"write to private field"),r?r.call(a,e):i.set(a,e),e);function x(a){return a==="role"||a.startsWith("aria")}var t,A=class{constructor(i,e){this.host=i;d(this,t,void 0);c(this,t,i.attachInternals());for(let r of Object.keys(Object.getPrototypeOf(l(this,t))))x(r)&&Object.defineProperty(this,r,{get(){return l(this,t)[r]},set(n){l(this,t)[r]=n,this.host.requestUpdate()}});for(let[r,n]of Object.entries(e??{}))x(r)&&(this[r]=n)}get formDisabled(){return this.host.matches(":disabled")}submit(){l(this,t).form?.requestSubmit()}reset(){l(this,t).form?.reset()}};t=new WeakMap,A.protos=new WeakMap;export{A as InternalsController};
|
|
2
2
|
//# sourceMappingURL=internals-controller.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["internals-controller.ts"],
|
|
4
|
-
"sourcesContent": ["import type { ReactiveController, ReactiveControllerHost } from 'lit';\n\nexport class InternalsController implements ReactiveController {\n #internals: ElementInternals;\n\n constructor(\n public host: ReactiveControllerHost & HTMLElement,\n ) {\n this.#internals = host.attachInternals();\n }\n\n hostConnected?(): void\n\n submit() {\n this.#internals.form?.requestSubmit(
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["_internals", "InternalsController", "host", "__privateAdd", "__privateSet", "__privateGet"]
|
|
4
|
+
"sourcesContent": ["import type { ReactiveController, ReactiveControllerHost } from 'lit';\n\nfunction isARIAMixinProp(key: string): key is keyof ARIAMixin {\n return key === 'role' || key.startsWith('aria');\n}\n\nexport class InternalsController implements ReactiveController, ARIAMixin {\n declare role: ARIAMixin['role'];\n declare ariaAtomic: ARIAMixin['ariaAtomic'];\n declare ariaAutoComplete: ARIAMixin['ariaAutoComplete'];\n declare ariaBusy: ARIAMixin['ariaBusy'];\n declare ariaChecked: ARIAMixin['ariaChecked'];\n declare ariaColCount: ARIAMixin['ariaColCount'];\n declare ariaColIndex: ARIAMixin['ariaColIndex'];\n declare ariaColIndexText: ARIAMixin['ariaColIndexText'];\n declare ariaColSpan: ARIAMixin['ariaColSpan'];\n declare ariaCurrent: ARIAMixin['ariaCurrent'];\n declare ariaDisabled: ARIAMixin['ariaDisabled'];\n declare ariaExpanded: ARIAMixin['ariaExpanded'];\n declare ariaHasPopup: ARIAMixin['ariaHasPopup'];\n declare ariaHidden: ARIAMixin['ariaHidden'];\n declare ariaInvalid: ARIAMixin['ariaInvalid'];\n declare ariaKeyShortcuts: ARIAMixin['ariaKeyShortcuts'];\n declare ariaLabel: ARIAMixin['ariaLabel'];\n declare ariaLevel: ARIAMixin['ariaLevel'];\n declare ariaLive: ARIAMixin['ariaLive'];\n declare ariaModal: ARIAMixin['ariaModal'];\n declare ariaMultiLine: ARIAMixin['ariaMultiLine'];\n declare ariaMultiSelectable: ARIAMixin['ariaMultiSelectable'];\n declare ariaOrientation: ARIAMixin['ariaOrientation'];\n declare ariaPlaceholder: ARIAMixin['ariaPlaceholder'];\n declare ariaPosInSet: ARIAMixin['ariaPosInSet'];\n declare ariaPressed: ARIAMixin['ariaPressed'];\n declare ariaReadOnly: ARIAMixin['ariaReadOnly'];\n declare ariaRequired: ARIAMixin['ariaRequired'];\n declare ariaRoleDescription: ARIAMixin['ariaRoleDescription'];\n declare ariaRowCount: ARIAMixin['ariaRowCount'];\n declare ariaRowIndex: ARIAMixin['ariaRowIndex'];\n declare ariaRowIndexText: ARIAMixin['ariaRowIndexText'];\n declare ariaRowSpan: ARIAMixin['ariaRowSpan'];\n declare ariaSelected: ARIAMixin['ariaSelected'];\n declare ariaSetSize: ARIAMixin['ariaSetSize'];\n declare ariaSort: ARIAMixin['ariaSort'];\n declare ariaValueMax: ARIAMixin['ariaValueMax'];\n declare ariaValueMin: ARIAMixin['ariaValueMin'];\n declare ariaValueNow: ARIAMixin['ariaValueNow'];\n declare ariaValueText: ARIAMixin['ariaValueText'];\n\n #internals: ElementInternals;\n\n /** True when the control is disabled via it's containing fieldset element */\n get formDisabled() {\n return this.host.matches(':disabled');\n }\n\n static protos = new WeakMap();\n\n constructor(\n public host: ReactiveControllerHost & HTMLElement,\n options?: Partial<ARIAMixin>\n ) {\n this.#internals = host.attachInternals();\n // proxy the internals object's aria prototype\n for (const key of Object.keys(Object.getPrototypeOf(this.#internals))) {\n if (isARIAMixinProp(key)) {\n Object.defineProperty(this, key, {\n get() {\n return this.#internals[key];\n },\n set(value) {\n this.#internals[key] = value;\n this.host.requestUpdate();\n }\n });\n }\n }\n\n for (const [key, val] of Object.entries(options ?? {})) {\n if (isARIAMixinProp(key)) {\n this[key] = val;\n }\n }\n }\n\n hostConnected?(): void\n\n submit() {\n this.#internals.form?.requestSubmit();\n }\n\n reset() {\n this.#internals.form?.reset();\n }\n}\n"],
|
|
5
|
+
"mappings": "mVAEA,SAASA,EAAgBC,EAAqC,CAC5D,OAAOA,IAAQ,QAAUA,EAAI,WAAW,MAAM,CAChD,CAJA,IAAAC,EAMaC,EAAN,KAAmE,CAmDxE,YACSC,EACPC,EACA,CAFO,UAAAD,EAVTE,EAAA,KAAAJ,EAAA,QAaEK,EAAA,KAAKL,EAAaE,EAAK,gBAAgB,GAEvC,QAAWH,KAAO,OAAO,KAAK,OAAO,eAAeO,EAAA,KAAKN,EAAU,CAAC,EAC9DF,EAAgBC,CAAG,GACrB,OAAO,eAAe,KAAMA,EAAK,CAC/B,KAAM,CACJ,OAAOO,EAAA,KAAKN,GAAWD,EACzB,EACA,IAAIQ,EAAO,CACTD,EAAA,KAAKN,GAAWD,GAAOQ,EACvB,KAAK,KAAK,cAAc,CAC1B,CACF,CAAC,EAIL,OAAW,CAACR,EAAKS,CAAG,IAAK,OAAO,QAAQL,GAAW,CAAC,CAAC,EAC/CL,EAAgBC,CAAG,IACrB,KAAKA,GAAOS,EAGlB,CA/BA,IAAI,cAAe,CACjB,OAAO,KAAK,KAAK,QAAQ,WAAW,CACtC,CAiCA,QAAS,CACPF,EAAA,KAAKN,GAAW,MAAM,cAAc,CACtC,CAEA,OAAQ,CACNM,EAAA,KAAKN,GAAW,MAAM,MAAM,CAC9B,CACF,EA7CEA,EAAA,YA1CWC,EAiDJ,OAAS,IAAI",
|
|
6
|
+
"names": ["isARIAMixinProp", "key", "_internals", "InternalsController", "host", "options", "__privateAdd", "__privateSet", "__privateGet", "value", "val"]
|
|
7
7
|
}
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["logger.ts"],
|
|
4
|
-
"sourcesContent": ["import type { ReactiveController, ReactiveElement } from 'lit';\n\nexport class Logger implements ReactiveController {\n private static logDebug: boolean;\n\n private static instances: WeakMap<HTMLElement, Logger> = new WeakMap();\n\n private get prefix() {\n return `[${this.host.localName}${this.host.id ? `#${this.host.id}` : ''}]`;\n }\n\n /**\n * A boolean value that indicates if the logging should be printed to the console; used for debugging.\n * For use in a JS file or script tag; can also be added in the constructor of a component during development.\n * @example Logger.debugLog(true);\n * @tags debug\n */\n static debugLog(preference = null) {\n // wrap localStorage references in a try/catch; merely referencing it can\n // throw errors in some locked down environments\n try {\n if (preference !== null) {\n Logger.logDebug = !!preference;\n localStorage.pfeLog = !!preference;\n }\n return localStorage.pfeLog === 'true';\n } catch (e) {\n return Logger.logDebug;\n }\n }\n\n /**\n * A logging wrapper which checks the debugLog boolean and prints to the console if true.\n *\n * @example Logger.log(\"Hello\");\n */\n static log(...msgs: unknown[]) {\n if (Logger.debugLog()) {\n // eslint-disable-next-line no-console\n console.log(...msgs);\n }\n }\n\n /**\n * A console warning wrapper which formats your output with useful debugging information.\n *\n * @example Logger.warn(\"Hello\");\n */\n static warn(...msgs: unknown[]) {\n console.warn(...msgs); // eslint-disable-line no-console\n }\n\n /**\n * A console error wrapper which formats your output with useful debugging information.\n * For use inside a component's function.\n * @example Logger.error(\"Hello\");\n */\n static error(...msgs: unknown[]) {\n console.error([...msgs].join(' ')); // eslint-disable-line no-console\n }\n\n /**\n * Local logging that outputs the tag name as a prefix automatically\n *\n * @example this.logger.log(\"Hello\");\n */\n log(...msgs: unknown[]) {\n Logger.log(this.prefix, ...msgs);\n }\n\n /**\n * Local warning wrapper that outputs the tag name as a prefix automatically.\n * For use inside a component's function.\n * @example this.logger.warn(\"Hello\");\n */\n warn(...msgs: unknown[]) {\n Logger.warn(this.prefix, ...msgs);\n }\n\n /**\n * Local error wrapper that outputs the tag name as a prefix automatically.\n * For use inside a component's function.\n * @example this.logger.error(\"Hello\");\n */\n error(...msgs: unknown[]) {\n Logger.error(this.prefix, ...msgs);\n }\n\n constructor(private host: ReactiveElement) {\n // We only need one logger instance per host\n if (Logger.instances.get(host)) {\n return Logger.instances.get(host) as Logger;\n }\n host.addController(this);\n Logger.instances.set(host, this);\n }\n\n hostConnected() {\n this.log('connected');\n }\n}\n"],
|
|
5
|
-
"mappings": "AAEO,IAAMA,EAAN,KAA2C,CAsFhD,YAAoBC,EAAuB,CAAvB,UAAAA,EAElB,GAAID,EAAO,UAAU,IAAIC,CAAI,EAC3B,OAAOD,EAAO,UAAU,IAAIC,CAAI,EAElCA,EAAK,cAAc,IAAI,EACvBD,EAAO,UAAU,IAAIC,EAAM,IAAI,CACjC,CAxFA,IAAY,QAAS,CACnB,MAAO,IAAI,KAAK,KAAK,YAAY,KAAK,KAAK,GAAK,IAAI,KAAK,KAAK,KAAO,KACvE,CAQA,OAAO,SAASC,EAAa,KAAM,CAGjC,GAAI,CACF,OAAIA,IAAe,OACjBF,EAAO,SAAW,CAAC,CAACE,EACpB,aAAa,OAAS,CAAC,CAACA,GAEnB,aAAa,SAAW,MACjC,MAAE,CACA,OAAOF,EAAO,QAChB,CACF,CAOA,OAAO,OAAOG,EAAiB,CACzBH,EAAO,SAAS,GAElB,QAAQ,IAAI,GAAGG,CAAI,CAEvB,CAOA,OAAO,QAAQA,EAAiB,CAC9B,QAAQ,KAAK,GAAGA,CAAI,CACtB,CAOA,OAAO,SAASA,EAAiB,CAC/B,QAAQ,MAAM,CAAC,GAAGA,CAAI,EAAE,KAAK,GAAG,CAAC,CACnC,CAOA,OAAOA,EAAiB,CACtBH,EAAO,IAAI,KAAK,OAAQ,GAAGG,CAAI,CACjC,CAOA,QAAQA,EAAiB,CACvBH,EAAO,KAAK,KAAK,OAAQ,GAAGG,CAAI,CAClC,CAOA,SAASA,EAAiB,CACxBH,EAAO,MAAM,KAAK,OAAQ,GAAGG,CAAI,CACnC,CAWA,eAAgB,CACd,KAAK,IAAI,WAAW,CACtB,CACF,EAlGaC,EAANJ,EAAMI,EAGI,UAA0C,IAAI",
|
|
6
|
-
"names": ["_Logger", "host", "preference", "msgs", "Logger"]
|
|
7
|
-
}
|
|
1
|
+
{"version":3,"file":"logger.js","sourceRoot":"","sources":["logger.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,MAAM;aAGF,cAAS,GAAiC,IAAI,OAAO,EAAE,CAAC;IAEvE,IAAY,MAAM;QAChB,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC;IAC7E,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,QAAQ,CAAC,UAAU,GAAG,IAAI;QAC/B,yEAAyE;QACzE,gDAAgD;QAChD,IAAI;YACF,IAAI,UAAU,KAAK,IAAI,EAAE;gBACvB,MAAM,CAAC,QAAQ,GAAG,CAAC,CAAC,UAAU,CAAC;gBAC/B,YAAY,CAAC,MAAM,GAAG,CAAC,CAAC,UAAU,CAAC;aACpC;YACD,OAAO,YAAY,CAAC,MAAM,KAAK,MAAM,CAAC;SACvC;QAAC,OAAO,CAAC,EAAE;YACV,OAAO,MAAM,CAAC,QAAQ,CAAC;SACxB;IACH,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,GAAG,CAAC,GAAG,IAAe;QAC3B,IAAI,MAAM,CAAC,QAAQ,EAAE,EAAE;YACrB,sCAAsC;YACtC,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;SACtB;IACH,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,IAAI,CAAC,GAAG,IAAe;QAC5B,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,iCAAiC;IAC1D,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,KAAK,CAAC,GAAG,IAAe;QAC7B,OAAO,CAAC,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,iCAAiC;IACvE,CAAC;IAED;;;;OAIG;IACH,GAAG,CAAC,GAAG,IAAe;QACpB,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,CAAC;IACnC,CAAC;IAED;;;;OAIG;IACH,IAAI,CAAC,GAAG,IAAe;QACrB,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,CAAC;IACpC,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,GAAG,IAAe;QACtB,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,CAAC;IACrC,CAAC;IAED,YAAoB,IAAqB;QAArB,SAAI,GAAJ,IAAI,CAAiB;QACvC,4CAA4C;QAC5C,IAAI,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;YAC9B,OAAO,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAW,CAAC;SAC7C;QACD,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;QACzB,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACnC,CAAC;IAED,aAAa;QACX,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;IACxB,CAAC","sourcesContent":["import type { ReactiveController, ReactiveElement } from 'lit';\n\nexport class Logger implements ReactiveController {\n private static logDebug: boolean;\n\n private static instances: WeakMap<HTMLElement, Logger> = new WeakMap();\n\n private get prefix() {\n return `[${this.host.localName}${this.host.id ? `#${this.host.id}` : ''}]`;\n }\n\n /**\n * A boolean value that indicates if the logging should be printed to the console; used for debugging.\n * For use in a JS file or script tag; can also be added in the constructor of a component during development.\n * @example Logger.debugLog(true);\n * @tags debug\n */\n static debugLog(preference = null) {\n // wrap localStorage references in a try/catch; merely referencing it can\n // throw errors in some locked down environments\n try {\n if (preference !== null) {\n Logger.logDebug = !!preference;\n localStorage.pfeLog = !!preference;\n }\n return localStorage.pfeLog === 'true';\n } catch (e) {\n return Logger.logDebug;\n }\n }\n\n /**\n * A logging wrapper which checks the debugLog boolean and prints to the console if true.\n *\n * @example Logger.log(\"Hello\");\n */\n static log(...msgs: unknown[]) {\n if (Logger.debugLog()) {\n // eslint-disable-next-line no-console\n console.log(...msgs);\n }\n }\n\n /**\n * A console warning wrapper which formats your output with useful debugging information.\n *\n * @example Logger.warn(\"Hello\");\n */\n static warn(...msgs: unknown[]) {\n console.warn(...msgs); // eslint-disable-line no-console\n }\n\n /**\n * A console error wrapper which formats your output with useful debugging information.\n * For use inside a component's function.\n * @example Logger.error(\"Hello\");\n */\n static error(...msgs: unknown[]) {\n console.error([...msgs].join(' ')); // eslint-disable-line no-console\n }\n\n /**\n * Local logging that outputs the tag name as a prefix automatically\n *\n * @example this.logger.log(\"Hello\");\n */\n log(...msgs: unknown[]) {\n Logger.log(this.prefix, ...msgs);\n }\n\n /**\n * Local warning wrapper that outputs the tag name as a prefix automatically.\n * For use inside a component's function.\n * @example this.logger.warn(\"Hello\");\n */\n warn(...msgs: unknown[]) {\n Logger.warn(this.prefix, ...msgs);\n }\n\n /**\n * Local error wrapper that outputs the tag name as a prefix automatically.\n * For use inside a component's function.\n * @example this.logger.error(\"Hello\");\n */\n error(...msgs: unknown[]) {\n Logger.error(this.prefix, ...msgs);\n }\n\n constructor(private host: ReactiveElement) {\n // We only need one logger instance per host\n if (Logger.instances.get(host)) {\n return Logger.instances.get(host) as Logger;\n }\n host.addController(this);\n Logger.instances.set(host, this);\n }\n\n hostConnected() {\n this.log('connected');\n }\n}\n"]}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { ReactiveController, ReactiveControllerHost } from 'lit';
|
|
2
|
+
/**
|
|
3
|
+
* Implements roving tabindex, as described in WAI-ARIA practices, [Managing Focus Within
|
|
4
|
+
* Components Using a Roving
|
|
5
|
+
* tabindex](https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/#kbd_roving_tabindex)
|
|
6
|
+
*/
|
|
7
|
+
export declare class RovingTabindexController implements ReactiveController {
|
|
8
|
+
#private;
|
|
9
|
+
host: ReactiveControllerHost & HTMLElement;
|
|
10
|
+
/**
|
|
11
|
+
* active item of array of items
|
|
12
|
+
*/
|
|
13
|
+
get activeItem(): HTMLElement | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* first item in array of focusable items
|
|
16
|
+
*/
|
|
17
|
+
get firstItem(): HTMLElement | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* last item in array of focusable items
|
|
20
|
+
*/
|
|
21
|
+
get lastItem(): HTMLElement | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* next item after active item in array of focusable items
|
|
24
|
+
*/
|
|
25
|
+
get nextItem(): HTMLElement | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* previous item after active item in array of focusable items
|
|
28
|
+
*/
|
|
29
|
+
get prevItem(): HTMLElement | undefined;
|
|
30
|
+
constructor(host: ReactiveControllerHost & HTMLElement);
|
|
31
|
+
/**
|
|
32
|
+
* focuses on an item and sets it as active
|
|
33
|
+
*/
|
|
34
|
+
focusOnItem(item?: HTMLElement): void;
|
|
35
|
+
/**
|
|
36
|
+
* Focuses next focusable item
|
|
37
|
+
*/
|
|
38
|
+
updateItems(items: HTMLElement[]): void;
|
|
39
|
+
/**
|
|
40
|
+
* from array of HTML items, and sets active items
|
|
41
|
+
*/
|
|
42
|
+
initItems(items: HTMLElement[]): void;
|
|
43
|
+
hostConnected(): void;
|
|
44
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var E=(s,t,i)=>{if(!t.has(s))throw TypeError("Cannot "+i)};var e=(s,t,i)=>(E(s,t,"read from private field"),i?i.call(s):t.get(s)),m=(s,t,i)=>{if(t.has(s))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(s):t.set(s,i)},I=(s,t,i,n)=>(E(s,t,"write to private field"),n?n.call(s,i):t.set(s,i),i);var H=(s,t,i)=>(E(s,t,"access private method"),i);var M=s=>!!s&&!s.hasAttribute("disabled")&&!s.ariaHidden&&!s.hasAttribute("hidden"),a,c,r,h,u,l,f,p,d,L,b,g,v=class{constructor(t){this.host=t;m(this,r);m(this,u);m(this,f);m(this,d);m(this,b);m(this,a,void 0);m(this,c,[]);this.host.addController(this)}get activeItem(){return e(this,a)}get firstItem(){return e(this,r,h)[0]}get lastItem(){return e(this,r,h).at(-1)}get nextItem(){return e(this,u,l)<e(this,r,h).length-1?e(this,r,h)[e(this,u,l)+1]:this.firstItem}get prevItem(){return e(this,u,l)>0?e(this,r,h)[e(this,u,l)-1]:this.lastItem}focusOnItem(t){H(this,b,g).call(this,t||this.firstItem),e(this,a)?.focus()}updateItems(t){let n=[...t.slice(e(this,f,p)),...t.slice(0,e(this,f,p))].find(o=>e(this,r,h).includes(o));this.focusOnItem(n||this.firstItem)}initItems(t){I(this,c,t??[]);let i=e(this,r,h),[n]=i;I(this,a,n);for(let o of i)o.tabIndex=e(this,a)===o?0:-1}hostConnected(){this.host.addEventListener("keydown",H(this,d,L).bind(this))}};a=new WeakMap,c=new WeakMap,r=new WeakSet,h=function(){return e(this,c).filter(M)},u=new WeakSet,l=function(){return!!e(this,r,h)&&!!this.activeItem?e(this,r,h).indexOf(this.activeItem):-1},f=new WeakSet,p=function(){return this.activeItem?e(this,c).indexOf(this.activeItem):-1},d=new WeakSet,L=function(t){if(t.ctrlKey||t.altKey||t.metaKey||e(this,r,h).length<1)return;let i=this.activeItem,n=!1,o=i?i.tagName==="SELECT"||i.getAttribute("aria-expanded")==="true"||i.getAttribute("role")==="spinbutton":!1;switch(t.key){case"ArrowLeft":this.focusOnItem(this.prevItem),n=!0;break;case"ArrowRight":this.focusOnItem(this.nextItem),n=!0;break;case"ArrowDown":if(o)return;this.focusOnItem(this.prevItem),n=!0;break;case"ArrowUp":if(o)return;this.focusOnItem(this.nextItem),n=!0;break;case"Home":this.focusOnItem(this.firstItem),n=!0;break;case"PageUp":if(o)return;this.focusOnItem(this.firstItem),n=!0;break;case"End":this.focusOnItem(this.lastItem),n=!0;break;case"PageDown":if(o)return;this.focusOnItem(this.lastItem),n=!0;break;default:break}n&&(t.stopPropagation(),t.preventDefault())},b=new WeakSet,g=function(t){t&&(!!e(this,a)&&t!==e(this,a)&&(e(this,a).tabIndex=-1),t.tabIndex=0,I(this,a,t))};export{v as RovingTabindexController};
|
|
2
|
+
//# sourceMappingURL=roving-tabindex-controller.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["roving-tabindex-controller.ts"],
|
|
4
|
+
"sourcesContent": ["import type { ReactiveController, ReactiveControllerHost } from 'lit';\n\nconst isFocusableElement = (el: Element): el is HTMLElement =>\n !!el &&\n !el.hasAttribute('disabled') &&\n !el.ariaHidden &&\n !el.hasAttribute('hidden');\n\n/**\n * Implements roving tabindex, as described in WAI-ARIA practices, [Managing Focus Within\n * Components Using a Roving\n * tabindex](https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/#kbd_roving_tabindex)\n */\nexport class RovingTabindexController implements ReactiveController {\n /** active focusable element */\n #activeItem?: HTMLElement;\n\n /** array of all focusable elements */\n #items: HTMLElement[] = [];\n\n /**\n * finds focusable items from a group of items\n */\n get #focusableItems(): HTMLElement[] {\n return this.#items.filter(isFocusableElement);\n }\n\n /**\n * index of active item in array of focusable items\n */\n get #activeIndex(): number {\n return !!this.#focusableItems && !!this.activeItem ? this.#focusableItems.indexOf(this.activeItem) : -1;\n }\n\n /**\n * index of active item in array of items\n */\n get #itemIndex(): number {\n return this.activeItem ? this.#items.indexOf(this.activeItem) : -1;\n }\n\n /**\n * active item of array of items\n */\n get activeItem(): HTMLElement | undefined {\n return this.#activeItem;\n }\n\n /**\n * first item in array of focusable items\n */\n get firstItem(): HTMLElement | undefined {\n return this.#focusableItems[0];\n }\n\n /**\n * last item in array of focusable items\n */\n get lastItem(): HTMLElement | undefined {\n return this.#focusableItems.at(-1);\n }\n\n /**\n * next item after active item in array of focusable items\n */\n get nextItem(): HTMLElement | undefined {\n return (\n this.#activeIndex < this.#focusableItems.length - 1 ? this.#focusableItems[this.#activeIndex + 1]\n : this.firstItem\n );\n }\n\n /**\n * previous item after active item in array of focusable items\n */\n get prevItem(): HTMLElement | undefined {\n return (\n this.#activeIndex > 0 ? this.#focusableItems[this.#activeIndex - 1]\n : this.lastItem\n );\n }\n\n constructor(public host: ReactiveControllerHost & HTMLElement) {\n this.host.addController(this);\n }\n\n /**\n * handles keyboard navigation\n */\n #onKeydown(event: KeyboardEvent):void {\n if (event.ctrlKey || event.altKey || event.metaKey || this.#focusableItems.length < 1) {\n return;\n }\n\n const item = this.activeItem;\n let shouldPreventDefault = false;\n const horizontalOnly =\n !item ? false\n : item.tagName === 'SELECT' ||\n item.getAttribute('aria-expanded') === 'true' ||\n item.getAttribute('role') === 'spinbutton';\n\n switch (event.key) {\n case 'ArrowLeft':\n this.focusOnItem(this.prevItem);\n shouldPreventDefault = true;\n break;\n case 'ArrowRight':\n this.focusOnItem(this.nextItem);\n shouldPreventDefault = true;\n break;\n case 'ArrowDown':\n if (horizontalOnly) {\n return;\n }\n this.focusOnItem(this.prevItem);\n shouldPreventDefault = true;\n break;\n case 'ArrowUp':\n if (horizontalOnly) {\n return;\n }\n this.focusOnItem(this.nextItem);\n shouldPreventDefault = true;\n break;\n case 'Home':\n this.focusOnItem(this.firstItem);\n shouldPreventDefault = true;\n break;\n case 'PageUp':\n if (horizontalOnly) {\n return;\n }\n this.focusOnItem(this.firstItem);\n shouldPreventDefault = true;\n break;\n case 'End':\n this.focusOnItem(this.lastItem);\n shouldPreventDefault = true;\n break;\n case 'PageDown':\n if (horizontalOnly) {\n return;\n }\n this.focusOnItem(this.lastItem);\n shouldPreventDefault = true;\n break;\n default:\n break;\n }\n\n if (shouldPreventDefault) {\n event.stopPropagation();\n event.preventDefault();\n }\n }\n\n /**\n * sets tabindex of item based on whether or not it is active\n */\n #updateActiveItem(item?: HTMLElement):void {\n if (item) {\n if (!!this.#activeItem && item !== this.#activeItem) {\n this.#activeItem.tabIndex = -1;\n }\n item.tabIndex = 0;\n this.#activeItem = item;\n }\n }\n\n /**\n * focuses on an item and sets it as active\n */\n focusOnItem(item?: HTMLElement):void {\n this.#updateActiveItem(item || this.firstItem);\n this.#activeItem?.focus();\n }\n\n /**\n * Focuses next focusable item\n */\n updateItems(items: HTMLElement[]) {\n const sequence = [...items.slice(this.#itemIndex), ...items.slice(0, this.#itemIndex)];\n const first = sequence.find(item => this.#focusableItems.includes(item));\n this.focusOnItem(first || this.firstItem);\n }\n\n /**\n * from array of HTML items, and sets active items\n */\n initItems(items: HTMLElement[]) {\n this.#items = items ?? [];\n const focusableItems = this.#focusableItems;\n const [focusableItem] = focusableItems;\n this.#activeItem = focusableItem;\n for (const item of focusableItems) {\n item.tabIndex = this.#activeItem === item ? 0 : -1;\n }\n }\n\n hostConnected() {\n this.host.addEventListener('keydown', this.#onKeydown.bind(this));\n }\n}\n"],
|
|
5
|
+
"mappings": "qYAEA,IAAMA,EAAsBC,GAC1B,CAAC,CAACA,GACF,CAACA,EAAG,aAAa,UAAU,GAC3B,CAACA,EAAG,YACJ,CAACA,EAAG,aAAa,QAAQ,EAN3BC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAaaC,EAAN,KAA6D,CAqElE,YAAmBC,EAA4C,CAA5C,UAAAA,EA3DnBC,EAAA,KAAIZ,GAOJY,EAAA,KAAIV,GAOJU,EAAA,KAAIR,GAoDJQ,EAAA,KAAAN,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,EAC/BD,EAAuB,GACvB,MACF,IAAK,MACH,KAAK,YAAY,KAAK,QAAQ,EAC9BA,EAAuB,GACvB,MACF,IAAK,WACH,GAAIC,EACF,OAEF,KAAK,YAAY,KAAK,QAAQ,EAC9BD,EAAuB,GACvB,MACF,QACE,KACJ,CAEIA,IACFD,EAAM,gBAAgB,EACtBA,EAAM,eAAe,EAEzB,EAKAb,EAAA,YAAAC,EAAiB,SAACK,EAAyB,CACrCA,IACE,CAAC,CAACD,EAAA,KAAKf,IAAegB,IAASD,EAAA,KAAKf,KACtCe,EAAA,KAAKf,GAAY,SAAW,IAE9BgB,EAAK,SAAW,EAChBI,EAAA,KAAKpB,EAAcgB,GAEvB",
|
|
6
|
+
"names": ["isFocusableElement", "el", "_activeItem", "_items", "_focusableItems", "focusableItems_get", "_activeIndex", "activeIndex_get", "_itemIndex", "itemIndex_get", "_onKeydown", "onKeydown_fn", "_updateActiveItem", "updateActiveItem_fn", "RovingTabindexController", "host", "__privateAdd", "__privateGet", "item", "__privateMethod", "items", "first", "__privateSet", "focusableItems", "focusableItem", "event", "shouldPreventDefault", "horizontalOnly"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { ReactiveController, ReactiveControllerHost } from 'lit';
|
|
2
|
+
export interface ScrollSpyControllerOptions extends IntersectionObserverInit {
|
|
3
|
+
/**
|
|
4
|
+
* Tag names of legal link children.
|
|
5
|
+
* Legal children must have an `href` property/attribute pair, like `<a>`.
|
|
6
|
+
*/
|
|
7
|
+
tagNames: string[];
|
|
8
|
+
/**
|
|
9
|
+
* Attribute to set on the active link element.
|
|
10
|
+
* @default 'active'
|
|
11
|
+
*/
|
|
12
|
+
activeAttribute?: string;
|
|
13
|
+
/**
|
|
14
|
+
* The root node to query content for
|
|
15
|
+
* @default the host's root node
|
|
16
|
+
*/
|
|
17
|
+
rootNode?: Node;
|
|
18
|
+
/**
|
|
19
|
+
* function to call on link children to get their URL hash (i.e. id to scroll to)
|
|
20
|
+
* @default el => el.getAttribute('href');
|
|
21
|
+
*/
|
|
22
|
+
getHash?: (el: Element) => string | null;
|
|
23
|
+
}
|
|
24
|
+
export declare class ScrollSpyController implements ReactiveController {
|
|
25
|
+
#private;
|
|
26
|
+
private host;
|
|
27
|
+
get root(): Element | Document | null | undefined;
|
|
28
|
+
set root(v: Element | Document | null | undefined);
|
|
29
|
+
get rootMargin(): string | undefined;
|
|
30
|
+
set rootMargin(v: string | undefined);
|
|
31
|
+
get threshold(): number | number[];
|
|
32
|
+
set threshold(v: number | number[]);
|
|
33
|
+
constructor(host: ReactiveControllerHost & HTMLElement, options: ScrollSpyControllerOptions);
|
|
34
|
+
hostConnected(): void;
|
|
35
|
+
/** Explicitly set the active item */
|
|
36
|
+
setActive(link: EventTarget | null): Promise<void>;
|
|
37
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var M=(o,t,e)=>{if(!t.has(o))throw TypeError("Cannot "+e)};var s=(o,t,e)=>(M(o,t,"read from private field"),e?e.call(o):t.get(o)),i=(o,t,e)=>{if(t.has(o))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(o):t.set(o,e)},r=(o,t,e,h)=>(M(o,t,"write to private field"),h?h.call(o,e):t.set(o,e),e);var l=(o,t,e)=>(M(o,t,"access private method"),e);var f,C,a,m,u,c,v,b,E,N,p,d,y,g,A,I,O,w,x,R,q,S,L,k=class{constructor(t,e){this.host=t;i(this,d);i(this,g);i(this,I);i(this,w);i(this,R);i(this,S);i(this,f,void 0);i(this,C,void 0);i(this,a,void 0);i(this,m,new Set);i(this,u,!1);i(this,c,!1);i(this,v,void 0);i(this,b,void 0);i(this,E,void 0);i(this,N,void 0);i(this,p,void 0);t.addController(this),r(this,f,e.tagNames),r(this,v,e.root),r(this,b,e.rootMargin),r(this,C,e.activeAttribute??"active"),r(this,E,e.threshold??.85),r(this,N,e.rootNode??t.getRootNode()),r(this,p,e?.getHash??(h=>h.getAttribute("href")))}get root(){return s(this,v)}set root(t){r(this,v,t),s(this,a)?.disconnect(),l(this,g,A).call(this)}get rootMargin(){return s(this,b)}set rootMargin(t){r(this,b,t),s(this,a)?.disconnect(),l(this,g,A).call(this)}get threshold(){return s(this,E)}set threshold(t){r(this,E,t),s(this,a)?.disconnect(),l(this,g,A).call(this)}hostConnected(){l(this,g,A).call(this)}async setActive(t){r(this,u,!0),l(this,w,x).call(this,t);let e=!1;for(let h of s(this,d,y))l(this,I,O).call(this,h,!e),h===t&&(e=!0);await l(this,R,q).call(this),r(this,u,!1)}};f=new WeakMap,C=new WeakMap,a=new WeakMap,m=new WeakMap,u=new WeakMap,c=new WeakMap,v=new WeakMap,b=new WeakMap,E=new WeakMap,N=new WeakMap,p=new WeakMap,d=new WeakSet,y=function(){return Array.from(this.host.querySelectorAll(s(this,f).join(","))).filter(s(this,p))},g=new WeakSet,A=function(){let t=s(this,N);if(t instanceof Document||t instanceof ShadowRoot){let{rootMargin:e,threshold:h,root:H}=this;r(this,a,new IntersectionObserver(n=>l(this,S,L).call(this,n),{root:H,rootMargin:e,threshold:h})),s(this,d,y).map(n=>s(this,p).call(this,n)).filter(n=>!!n).map(n=>t.getElementById(n.replace("#",""))).filter(n=>!!n).forEach(n=>s(this,a)?.observe(n))}},I=new WeakSet,O=function(t,e){e?s(this,m).add(t):s(this,m).delete(t)},w=new WeakSet,x=function(t){for(let e of s(this,d,y))e.toggleAttribute(s(this,C),e===t)},R=new WeakSet,q=async function(){for(r(this,c,!1),setTimeout(()=>r(this,c,!1),3e3);!s(this,c);)await new Promise(requestAnimationFrame)},S=new WeakSet,L=async function(t){if(!s(this,u)){for(let{target:H,boundingClientRect:n,intersectionRect:j}of t){let P=`:is(${s(this,f).join(",")})[href="#${H.id}"]`,T=this.host.querySelector(P);T&&l(this,I,O).call(this,T,n.top<j.top)}let h=[...s(this,m)].at(-1);l(this,w,x).call(this,h??s(this,d,y).at(0))}r(this,c,!0)};export{k as ScrollSpyController};
|
|
2
|
+
//# sourceMappingURL=scroll-spy-controller.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["scroll-spy-controller.ts"],
|
|
4
|
+
"sourcesContent": ["import type { ReactiveController, ReactiveControllerHost } from 'lit';\n\nexport interface ScrollSpyControllerOptions extends IntersectionObserverInit {\n /**\n * Tag names of legal link children.\n * Legal children must have an `href` property/attribute pair, like `<a>`.\n */\n tagNames: string[];\n\n /**\n * Attribute to set on the active link element.\n * @default 'active'\n */\n activeAttribute?: string;\n\n /**\n * The root node to query content for\n * @default the host's root node\n */\n rootNode?: Node;\n /**\n * function to call on link children to get their URL hash (i.e. id to scroll to)\n * @default el => el.getAttribute('href');\n */\n getHash?: (el: Element) => string|null;\n}\n\nexport class ScrollSpyController implements ReactiveController {\n #tagNames: string[];\n #activeAttribute: string;\n\n #io?: IntersectionObserver;\n\n /** Which link's targets have already scrolled past? */\n #passedLinks = new Set<Element>();\n\n /** Ignore intersections? */\n #force = false;\n\n /** Has the intersection observer found an element? */\n #intersected = false;\n\n #root: ScrollSpyControllerOptions['root'];\n #rootMargin?: string;\n #threshold: number|number[];\n\n #rootNode: Node;\n #getHash: (el: Element) => string|null;\n\n get #linkChildren(): Element[] {\n return Array.from(this.host.querySelectorAll(this.#tagNames.join(',')))\n .filter(this.#getHash);\n }\n\n get root() {\n return this.#root;\n }\n\n set root(v) {\n this.#root = v;\n this.#io?.disconnect();\n this.#initIo();\n }\n\n get rootMargin() {\n return this.#rootMargin;\n }\n\n set rootMargin(v) {\n this.#rootMargin = v;\n this.#io?.disconnect();\n this.#initIo();\n }\n\n get threshold() {\n return this.#threshold;\n }\n\n set threshold(v) {\n this.#threshold = v;\n this.#io?.disconnect();\n this.#initIo();\n }\n\n constructor(\n private host: ReactiveControllerHost & HTMLElement,\n options: ScrollSpyControllerOptions,\n ) {\n host.addController(this);\n this.#tagNames = options.tagNames;\n this.#root = options.root;\n this.#rootMargin = options.rootMargin;\n this.#activeAttribute = options.activeAttribute ?? 'active';\n this.#threshold = options.threshold ?? 0.85;\n this.#rootNode = options.rootNode ?? host.getRootNode();\n this.#getHash = options?.getHash ?? ((el: Element) => el.getAttribute('href'));\n }\n\n hostConnected() {\n this.#initIo();\n }\n\n #initIo() {\n const rootNode = this.#rootNode;\n if (rootNode instanceof Document || rootNode instanceof ShadowRoot) {\n const { rootMargin, threshold, root } = this;\n this.#io = new IntersectionObserver(r => this.#onIo(r), { root, rootMargin, threshold });\n this.#linkChildren\n .map(x => this.#getHash(x))\n .filter((x): x is string => !!x)\n .map(x => rootNode.getElementById(x.replace('#', '')))\n .filter((x): x is HTMLElement => !!x)\n .forEach(target => this.#io?.observe(target));\n }\n }\n\n #markPassed(link: Element, force: boolean) {\n if (force) {\n this.#passedLinks.add(link);\n } else {\n this.#passedLinks.delete(link);\n }\n }\n\n #setActive(link?: EventTarget|null) {\n for (const child of this.#linkChildren) {\n child.toggleAttribute(this.#activeAttribute, child === link);\n }\n }\n\n async #nextIntersection() {\n this.#intersected = false;\n // safeguard the loop\n setTimeout(() => this.#intersected = false, 3000);\n while (!this.#intersected) {\n await new Promise(requestAnimationFrame);\n }\n }\n\n async #onIo(entries: IntersectionObserverEntry[]) {\n if (!this.#force) {\n for (const { target, boundingClientRect, intersectionRect } of entries) {\n const selector = `:is(${this.#tagNames.join(',')})[href=\"#${target.id}\"]`;\n const link = this.host.querySelector(selector);\n if (link) {\n this.#markPassed(link, boundingClientRect.top < intersectionRect.top);\n }\n }\n const link = [...this.#passedLinks];\n const last = link.at(-1);\n this.#setActive(last ?? this.#linkChildren.at(0));\n }\n this.#intersected = true;\n }\n\n /** Explicitly set the active item */\n public async setActive(link: EventTarget|null) {\n this.#force = true;\n this.#setActive(link);\n let sawActive = false;\n for (const child of this.#linkChildren) {\n this.#markPassed(child, !sawActive);\n if (child === link) {\n sawActive = true;\n }\n }\n await this.#nextIntersection();\n this.#force = false;\n }\n}\n"],
|
|
5
|
+
"mappings": "qYAAA,IAAAA,EAAAC,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MC,EAAiB,IAErE,CAEA,IAAME,EADO,CAAC,GAAGlB,EAAA,KAAK1B,EAAY,EAChB,GAAG,EAAE,EACvB4B,EAAA,KAAKd,EAAAC,GAAL,UAAgB6B,GAAQlB,EAAA,KAAKlB,EAAAC,GAAc,GAAG,CAAC,EACjD,CACAe,EAAA,KAAKtB,EAAe,GACtB",
|
|
6
|
+
"names": ["_tagNames", "_activeAttribute", "_io", "_passedLinks", "_force", "_intersected", "_root", "_rootMargin", "_threshold", "_rootNode", "_getHash", "_linkChildren", "linkChildren_get", "_initIo", "initIo_fn", "_markPassed", "markPassed_fn", "_setActive", "setActive_fn", "_nextIntersection", "nextIntersection_fn", "_onIo", "onIo_fn", "ScrollSpyController", "host", "options", "__privateAdd", "__privateSet", "el", "__privateGet", "v", "__privateMethod", "link", "sawActive", "child", "rootNode", "rootMargin", "threshold", "root", "r", "x", "target", "force", "entries", "boundingClientRect", "intersectionRect", "selector", "last"]
|
|
7
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@patternfly/pfe-core",
|
|
3
|
-
"version": "2.0.0-next.
|
|
3
|
+
"version": "2.0.0-next.14",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "PatternFly Elements Core Library",
|
|
6
6
|
"customElements": "custom-elements.json",
|
|
@@ -16,13 +16,15 @@
|
|
|
16
16
|
"./controllers/cascade-controller.js": "./controllers/cascade-controller.js",
|
|
17
17
|
"./controllers/color-context.js": "./controllers/color-context.js",
|
|
18
18
|
"./controllers/css-variable-controller.js": "./controllers/css-variable-controller.js",
|
|
19
|
+
"./controllers/floating-dom-controller.js": "./controllers/floating-dom-controller.js",
|
|
20
|
+
"./controllers/internals-controller.js": "./controllers/internals-controller.js",
|
|
19
21
|
"./controllers/light-dom-controller.js": "./controllers/light-dom-controller.js",
|
|
20
22
|
"./controllers/logger.js": "./controllers/logger.js",
|
|
21
|
-
"./controllers/internals-controller.js": "./controllers/internals-controller.js",
|
|
22
23
|
"./controllers/perf-controller.js": "./controllers/perf-controller.js",
|
|
23
24
|
"./controllers/property-observer-controller.js": "./controllers/property-observer-controller.js",
|
|
25
|
+
"./controllers/roving-tabindex-controller.js": "./controllers/roving-tabindex-controller.js",
|
|
26
|
+
"./controllers/scroll-spy-controller.js": "./controllers/scroll-spy-controller.js",
|
|
24
27
|
"./controllers/slot-controller.js": "./controllers/slot-controller.js",
|
|
25
|
-
"./controllers/floating-dom-controller.js": "./controllers/floating-dom-controller.js",
|
|
26
28
|
"./controllers/style-controller.js": "./controllers/style-controller.js",
|
|
27
29
|
"./decorators/bound.js": "./decorators/bound.js",
|
|
28
30
|
"./decorators/cascades.js": "./decorators/cascades.js",
|
|
@@ -62,7 +64,7 @@
|
|
|
62
64
|
"watch:types": "tsc -w"
|
|
63
65
|
},
|
|
64
66
|
"dependencies": {
|
|
65
|
-
"@
|
|
67
|
+
"@floating-ui/dom": "^1.0.5",
|
|
66
68
|
"lit": "2.3.0"
|
|
67
69
|
},
|
|
68
70
|
"repository": {
|