@compa11y/core 0.1.0 → 0.1.3
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/dist/announcer/index.cjs +1 -49
- package/dist/announcer/index.d.cts +1 -1
- package/dist/announcer/index.d.ts +1 -1
- package/dist/announcer/index.js +1 -4
- package/dist/aria/index.cjs +1 -24
- package/dist/aria/index.d.cts +1 -1
- package/dist/aria/index.d.ts +1 -1
- package/dist/aria/index.js +1 -3
- package/dist/chunk-7BL2ABLF.cjs +1 -0
- package/dist/chunk-AQ6HEUSD.cjs +1 -0
- package/dist/chunk-BAFKUMWA.js +1 -0
- package/dist/chunk-C3VZQUKG.js +1 -0
- package/dist/chunk-EM45V5TK.cjs +1 -0
- package/dist/chunk-KQUAJKTG.cjs +1 -0
- package/dist/chunk-OSJIG3A2.cjs +1 -0
- package/dist/chunk-RE4QIUWR.js +1 -0
- package/dist/chunk-TGXWODB3.js +1 -0
- package/dist/chunk-ZAQMM5TA.js +1 -0
- package/dist/focus/index.cjs +1 -53
- package/dist/focus/index.d.cts +1 -1
- package/dist/focus/index.d.ts +1 -1
- package/dist/focus/index.js +1 -4
- package/dist/index.cjs +2 -572
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +2 -342
- package/dist/keyboard/index.cjs +1 -28
- package/dist/keyboard/index.js +1 -3
- package/dist/{types-DDSPmE8m.d.ts → types-DpTUSAxr.d.cts} +1 -1
- package/dist/{types-DDSPmE8m.d.cts → types-DpTUSAxr.d.ts} +1 -1
- package/package.json +1 -1
- package/dist/announcer/index.cjs.map +0 -1
- package/dist/announcer/index.js.map +0 -1
- package/dist/aria/index.cjs.map +0 -1
- package/dist/aria/index.js.map +0 -1
- package/dist/chunk-24U5HHMC.js +0 -309
- package/dist/chunk-24U5HHMC.js.map +0 -1
- package/dist/chunk-2CQOLVQH.js +0 -147
- package/dist/chunk-2CQOLVQH.js.map +0 -1
- package/dist/chunk-2PUYKF2E.js +0 -631
- package/dist/chunk-2PUYKF2E.js.map +0 -1
- package/dist/chunk-2WF5Y6D7.js +0 -175
- package/dist/chunk-2WF5Y6D7.js.map +0 -1
- package/dist/chunk-CQXMBRLD.cjs +0 -657
- package/dist/chunk-CQXMBRLD.cjs.map +0 -1
- package/dist/chunk-HQOFVJFO.cjs +0 -181
- package/dist/chunk-HQOFVJFO.cjs.map +0 -1
- package/dist/chunk-NBGFFCIJ.cjs +0 -314
- package/dist/chunk-NBGFFCIJ.cjs.map +0 -1
- package/dist/chunk-V6TZIZZ4.cjs +0 -158
- package/dist/chunk-V6TZIZZ4.cjs.map +0 -1
- package/dist/chunk-XEGB27QF.cjs +0 -78
- package/dist/chunk-XEGB27QF.cjs.map +0 -1
- package/dist/chunk-Z7K2G6FX.js +0 -66
- package/dist/chunk-Z7K2G6FX.js.map +0 -1
- package/dist/focus/index.cjs.map +0 -1
- package/dist/focus/index.js.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/keyboard/index.cjs.map +0 -1
- package/dist/keyboard/index.js.map +0 -1
package/dist/announcer/index.cjs
CHANGED
|
@@ -1,49 +1 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chunkV6TZIZZ4_cjs = require('../chunk-V6TZIZZ4.cjs');
|
|
4
|
-
require('../chunk-XEGB27QF.cjs');
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
Object.defineProperty(exports, "announce", {
|
|
9
|
-
enumerable: true,
|
|
10
|
-
get: function () { return chunkV6TZIZZ4_cjs.announce; }
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(exports, "announceAssertive", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function () { return chunkV6TZIZZ4_cjs.announceAssertive; }
|
|
15
|
-
});
|
|
16
|
-
Object.defineProperty(exports, "announceError", {
|
|
17
|
-
enumerable: true,
|
|
18
|
-
get: function () { return chunkV6TZIZZ4_cjs.announceError; }
|
|
19
|
-
});
|
|
20
|
-
Object.defineProperty(exports, "announcePolite", {
|
|
21
|
-
enumerable: true,
|
|
22
|
-
get: function () { return chunkV6TZIZZ4_cjs.announcePolite; }
|
|
23
|
-
});
|
|
24
|
-
Object.defineProperty(exports, "announceProgress", {
|
|
25
|
-
enumerable: true,
|
|
26
|
-
get: function () { return chunkV6TZIZZ4_cjs.announceProgress; }
|
|
27
|
-
});
|
|
28
|
-
Object.defineProperty(exports, "announceStatus", {
|
|
29
|
-
enumerable: true,
|
|
30
|
-
get: function () { return chunkV6TZIZZ4_cjs.announceStatus; }
|
|
31
|
-
});
|
|
32
|
-
Object.defineProperty(exports, "clearAnnouncements", {
|
|
33
|
-
enumerable: true,
|
|
34
|
-
get: function () { return chunkV6TZIZZ4_cjs.clearAnnouncements; }
|
|
35
|
-
});
|
|
36
|
-
Object.defineProperty(exports, "createAnnouncer", {
|
|
37
|
-
enumerable: true,
|
|
38
|
-
get: function () { return chunkV6TZIZZ4_cjs.createAnnouncer; }
|
|
39
|
-
});
|
|
40
|
-
Object.defineProperty(exports, "initAnnouncer", {
|
|
41
|
-
enumerable: true,
|
|
42
|
-
get: function () { return chunkV6TZIZZ4_cjs.initAnnouncer; }
|
|
43
|
-
});
|
|
44
|
-
Object.defineProperty(exports, "queueAnnouncement", {
|
|
45
|
-
enumerable: true,
|
|
46
|
-
get: function () { return chunkV6TZIZZ4_cjs.queueAnnouncement; }
|
|
47
|
-
});
|
|
48
|
-
//# sourceMappingURL=index.cjs.map
|
|
49
|
-
//# sourceMappingURL=index.cjs.map
|
|
1
|
+
'use strict';var chunkAQ6HEUSD_cjs=require('../chunk-AQ6HEUSD.cjs');require('../chunk-7BL2ABLF.cjs');Object.defineProperty(exports,"announce",{enumerable:true,get:function(){return chunkAQ6HEUSD_cjs.b}});Object.defineProperty(exports,"announceAssertive",{enumerable:true,get:function(){return chunkAQ6HEUSD_cjs.d}});Object.defineProperty(exports,"announceError",{enumerable:true,get:function(){return chunkAQ6HEUSD_cjs.i}});Object.defineProperty(exports,"announcePolite",{enumerable:true,get:function(){return chunkAQ6HEUSD_cjs.c}});Object.defineProperty(exports,"announceProgress",{enumerable:true,get:function(){return chunkAQ6HEUSD_cjs.j}});Object.defineProperty(exports,"announceStatus",{enumerable:true,get:function(){return chunkAQ6HEUSD_cjs.h}});Object.defineProperty(exports,"clearAnnouncements",{enumerable:true,get:function(){return chunkAQ6HEUSD_cjs.e}});Object.defineProperty(exports,"createAnnouncer",{enumerable:true,get:function(){return chunkAQ6HEUSD_cjs.g}});Object.defineProperty(exports,"initAnnouncer",{enumerable:true,get:function(){return chunkAQ6HEUSD_cjs.a}});Object.defineProperty(exports,"queueAnnouncement",{enumerable:true,get:function(){return chunkAQ6HEUSD_cjs.f}});
|
package/dist/announcer/index.js
CHANGED
|
@@ -1,4 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
import '../chunk-Z7K2G6FX.js';
|
|
3
|
-
//# sourceMappingURL=index.js.map
|
|
4
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
export{b as announce,d as announceAssertive,i as announceError,c as announcePolite,j as announceProgress,h as announceStatus,e as clearAnnouncements,g as createAnnouncer,a as initAnnouncer,f as queueAnnouncement}from'../chunk-ZAQMM5TA.js';import'../chunk-C3VZQUKG.js';
|
package/dist/aria/index.cjs
CHANGED
|
@@ -1,24 +1 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chunkNBGFFCIJ_cjs = require('../chunk-NBGFFCIJ.cjs');
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Object.defineProperty(exports, "aria", {
|
|
8
|
-
enumerable: true,
|
|
9
|
-
get: function () { return chunkNBGFFCIJ_cjs.aria; }
|
|
10
|
-
});
|
|
11
|
-
Object.defineProperty(exports, "buildAriaProps", {
|
|
12
|
-
enumerable: true,
|
|
13
|
-
get: function () { return chunkNBGFFCIJ_cjs.buildAriaProps; }
|
|
14
|
-
});
|
|
15
|
-
Object.defineProperty(exports, "hasAccessibleName", {
|
|
16
|
-
enumerable: true,
|
|
17
|
-
get: function () { return chunkNBGFFCIJ_cjs.hasAccessibleName; }
|
|
18
|
-
});
|
|
19
|
-
Object.defineProperty(exports, "mergeAriaIds", {
|
|
20
|
-
enumerable: true,
|
|
21
|
-
get: function () { return chunkNBGFFCIJ_cjs.mergeAriaIds; }
|
|
22
|
-
});
|
|
23
|
-
//# sourceMappingURL=index.cjs.map
|
|
24
|
-
//# sourceMappingURL=index.cjs.map
|
|
1
|
+
'use strict';var chunkKQUAJKTG_cjs=require('../chunk-KQUAJKTG.cjs');Object.defineProperty(exports,"aria",{enumerable:true,get:function(){return chunkKQUAJKTG_cjs.a}});Object.defineProperty(exports,"buildAriaProps",{enumerable:true,get:function(){return chunkKQUAJKTG_cjs.b}});Object.defineProperty(exports,"hasAccessibleName",{enumerable:true,get:function(){return chunkKQUAJKTG_cjs.d}});Object.defineProperty(exports,"mergeAriaIds",{enumerable:true,get:function(){return chunkKQUAJKTG_cjs.c}});
|
package/dist/aria/index.d.cts
CHANGED
package/dist/aria/index.d.ts
CHANGED
package/dist/aria/index.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';function e(){return typeof window<"u"&&typeof document<"u"}function s(){return e()?/Mac|iPod|iPhone|iPad/.test(navigator.platform):false}function c(){return e()?/iPod|iPhone|iPad/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1:false}function d(){return e()?/Android/.test(navigator.userAgent):false}function f(){return e()?/Win/.test(navigator.platform):false}function u(){return e()?"ontouchstart"in window||navigator.maxTouchPoints>0:false}function l(){return e()?window.matchMedia("(prefers-reduced-motion: reduce)").matches:false}function m(){return e()?window.matchMedia("(prefers-contrast: more)").matches||window.matchMedia("(-ms-high-contrast: active)").matches:false}function h(){return e()?window.matchMedia("(prefers-color-scheme: dark)").matches:false}function p(){if(!e())return {possibleScreenReader:false,forcedColors:false};let n=window.matchMedia("(forced-colors: active)").matches;return {possibleScreenReader:n,forcedColors:n}}function v(n,o){if(!e())return ()=>{};let r=window.matchMedia(n);if(o(r.matches),r.addEventListener){let a=i=>o(i.matches);return r.addEventListener("change",a),()=>r.removeEventListener("change",a)}let t=()=>o(r.matches);return r.addListener(t),()=>r.removeListener(t)}exports.a=e;exports.b=s;exports.c=c;exports.d=d;exports.e=f;exports.f=u;exports.g=l;exports.h=m;exports.i=h;exports.j=p;exports.k=v;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunk7BL2ABLF_cjs=require('./chunk-7BL2ABLF.cjs');var o=null,i=null,m=false,l=[],r=null;function L(){return {position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"}}function x(n){let e=document.createElement("div");e.setAttribute("role","status"),e.setAttribute("aria-live",n),e.setAttribute("aria-atomic","true"),e.setAttribute("aria-relevant","additions text"),e.id=`compa11y-announcer-${n}`;let t=L();return Object.assign(e.style,t),document.body.appendChild(e),{element:e,politeness:n}}function b(){return !chunk7BL2ABLF_cjs.a()||m?()=>{}:(m=true,o=x("polite"),i=x("assertive"),()=>{o&&(o.element.remove(),o=null),i&&(i.element.remove(),i=null),r&&(clearTimeout(r),r=null),l=[],m=false;})}function R(){!m&&chunk7BL2ABLF_cjs.a()&&b();}function g(n){n.element.textContent="";}function a(n,e={}){if(!chunk7BL2ABLF_cjs.a())return;let{politeness:t="polite",delay:s=0,clearPrevious:c=false,timeout:A=7e3}=e;R();let u=t==="assertive"?i:o;if(!u)return;let d=()=>{c&&g(u),u.element.textContent="",requestAnimationFrame(()=>{u.element.textContent=n,A>0&&setTimeout(()=>{u.element.textContent===n&&(u.element.textContent="");},A);});};s>0?setTimeout(d,s):d();}function f(n,e){a(n,{...e,politeness:"polite"});}function v(n,e){a(n,{...e,politeness:"assertive"});}function O(){o&&g(o),i&&g(i);}function y(n,e={}){let{debounce:t=150,...s}=e;l.push({message:n,options:s}),r&&clearTimeout(r),r=setTimeout(()=>{let c=l[l.length-1];c&&a(c.message,c.options),l=[],r=null;},t);}function P(n={}){return {announce:(e,t)=>a(e,{...n,...t}),polite:(e,t)=>f(e,{...n,...t}),assertive:(e,t)=>v(e,{...n,...t}),queue:(e,t)=>y(e,{...n,...t}),clear:O}}function S(n){f(n);}function T(n){v(n);}function h(n,e,t="{current} of {total}"){let s=t.replace("{current}",String(n)).replace("{total}",String(e));f(s);}exports.a=b;exports.b=a;exports.c=f;exports.d=v;exports.e=O;exports.f=y;exports.g=P;exports.h=S;exports.i=T;exports.j=h;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a}from'./chunk-C3VZQUKG.js';var D=["a[href]","area[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])','[contenteditable="true"]',"audio[controls]","video[controls]","details > summary:first-of-type","iframe"].join(","),V=['a[href]:not([tabindex="-1"])','area[href]:not([tabindex="-1"])','button:not([disabled]):not([tabindex="-1"])','input:not([disabled]):not([type="hidden"]):not([tabindex="-1"])','select:not([disabled]):not([tabindex="-1"])','textarea:not([disabled]):not([tabindex="-1"])','[tabindex]:not([tabindex="-1"])','[contenteditable="true"]:not([tabindex="-1"])','audio[controls]:not([tabindex="-1"])','video[controls]:not([tabindex="-1"])','details > summary:first-of-type:not([tabindex="-1"])','iframe:not([tabindex="-1"])'].join(",");function q(e){if(!(e instanceof HTMLElement)||e.hidden||e.style.display==="none"||e.style.visibility==="hidden")return false;let t=window.getComputedStyle(e);return !(t.display==="none"||t.visibility==="hidden"||!e.isConnected)}function O(e){return !(!(e instanceof HTMLElement)||!q(e)||!e.matches(D)||e.closest("[inert]"))}function B(e){return !O(e)||e.tabIndex<0?false:e.matches(V)}function te(e){return Array.from(e.querySelectorAll(D)).filter(O)}function y(e){return Array.from(e.querySelectorAll(V)).filter(B).sort((r,l)=>{let i=Math.max(0,r.tabIndex),s=Math.max(0,l.tabIndex);return i===0&&s===0?0:i===0?1:s===0?-1:i-s})}function A(e){return y(e)[0]??null}function ne(e){let t=y(e);return t[t.length-1]??null}function P(e){let t=document.activeElement;return t!==null&&e.contains(t)}function R(e,t,a=true){let r=y(e),l=r.indexOf(t);if(l===-1)return r[0]??null;let i=l+1;return i<r.length?r[i]:a?r[0]??null:null}function C(e,t,a=true){let r=y(e),l=r.indexOf(t);if(l===-1)return r[r.length-1]??null;let i=l-1;return i>=0?r[i]:a?r[r.length-1]??null:null}function oe(e,t){return t.contains(e)}function N(e,t=document.body){return e?typeof e=="string"?t.querySelector(e):typeof e=="function"?e():e:null}var T=[];function z(e,t={}){let{initialFocus:a,returnFocus:r=true,clickOutsideDeactivates:l=false,escapeDeactivates:i=true,onDeactivate:s,onEscapeFocus:c}=t,o=false,m=false,f=null;function h(u){m||!o||(u.key==="Tab"?L(u):u.key==="Escape"&&i&&(u.preventDefault(),u.stopPropagation(),v()));}function L(u){let E=y(e);if(E.length===0){u.preventDefault();return}let w=E[0],g=E[E.length-1],S=document.activeElement;u.shiftKey?(S===w||!e.contains(S))&&(u.preventDefault(),g.focus()):(S===g||!e.contains(S))&&(u.preventDefault(),w.focus());}function p(u){if(m||!o)return;let E=u.target;e.contains(E)||(c?.(E),A(e)?.focus());}function d(u){if(m||!o)return;let E=u.target;l&&!e.contains(E)&&v();}function b(){if(!o){f=document.activeElement,T.push(k);for(let u=0;u<T.length-1;u++)T[u].pause();document.addEventListener("keydown",h,true),document.addEventListener("focusin",p,true),document.addEventListener("click",d,true),o=true,requestAnimationFrame(()=>{if(!o)return;let u=N(a,e);if(u)u.focus();else {let E=A(e);E?E.focus():(e.setAttribute("tabindex","-1"),e.focus());}});}}function n(u){if(!o)return;document.removeEventListener("keydown",h,true),document.removeEventListener("focusin",p,true),document.removeEventListener("click",d,true),o=false,m=false;let E=T.indexOf(k);if(E>-1&&T.splice(E,1),T[T.length-1]?.unpause(),r&&f){let g=typeof r=="boolean"?f:r;requestAnimationFrame(()=>{g&&"focus"in g&&g.focus();});}u&&s?.();}function v(){n(true);}function F(){n(false);}function M(){!o||m||(m=true);}function H(){!o||!m||(m=false,P(e)||A(e)?.focus());}let k={activate:b,deactivate:v,destroy:F,pause:M,unpause:H,isActive:()=>o,isPaused:()=>m};return k}function U(){return T[T.length-1]??null}function W(){return T.length>0}var x={hadKeyboardEvent:true,isPointerInput:false,lastFocusSource:"unknown"},I=false,_=new Set(["Tab","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Enter"," ","Home","End","PageUp","PageDown","Escape"]);function j(){if(!a()||I)return ()=>{};I=true;function e(i){_.has(i.key)&&(x.hadKeyboardEvent=true,x.isPointerInput=false,x.lastFocusSource="keyboard");}function t(i){x.isPointerInput=true,x.hadKeyboardEvent=false,x.lastFocusSource="pointerType"in i&&i.pointerType==="touch"?"touch":"mouse";}function a$1(i){let s=i.target;s instanceof HTMLElement&&(x.hadKeyboardEvent||G(s))&&(s.dataset.a11ykitFocusVisible="true");}function r(i){let s=i.target;s instanceof HTMLElement&&delete s.dataset.a11ykitFocusVisible;}function l(){document.visibilityState==="hidden"&&(x.hadKeyboardEvent=true);}return document.addEventListener("keydown",e,true),document.addEventListener("mousedown",t,true),document.addEventListener("pointerdown",t,true),document.addEventListener("focus",a$1,true),document.addEventListener("blur",r,true),document.addEventListener("visibilitychange",l,true),()=>{document.removeEventListener("keydown",e,true),document.removeEventListener("mousedown",t,true),document.removeEventListener("pointerdown",t,true),document.removeEventListener("focus",a$1,true),document.removeEventListener("blur",r,true),document.removeEventListener("visibilitychange",l,true),I=false;}}function G(e){let t=e.tagName.toLowerCase(),a=e.getAttribute("type")?.toLowerCase();return !!(t==="input"&&(!a||a==="text"||a==="email"||a==="password"||a==="search"||a==="tel"||a==="url"||a==="number")||t==="textarea"||e.isContentEditable)}function Y(){return x.hadKeyboardEvent}function J(e){return e.dataset.a11ykitFocusVisible==="true"}function Q(){return x.lastFocusSource}function X(e,t){t?e.dataset.a11ykitFocusVisible="true":delete e.dataset.a11ykitFocusVisible;}function Z(e,t){x.hadKeyboardEvent=true,x.lastFocusSource="keyboard",e.focus(t);}function $(e,t={}){let{contain:a=false,restoreFocus:r=false,autoFocus:l=false}=t,i=null,s=false;r&&(i=document.activeElement);function c(){return s?[]:y(e)}function o(){let n=document.activeElement;return n&&e.contains(n)?n:null}function m(){if(s)return;c()[0]?.focus();}function f(){if(s)return;let n=c();n[n.length-1]?.focus();}function h({wrap:n=true}={}){if(s)return;let v=o();if(!v){m();return}R(e,v,n)?.focus();}function L({wrap:n=true}={}){if(s)return;let v=o();if(!v){f();return}C(e,v,n)?.focus();}function p(n){if(s)return;c()[n]?.focus();}function d(n){if(!(s||!a)&&n.key==="Tab"){let v=c();if(v.length===0){n.preventDefault();return}let F=v[0],M=v[v.length-1],H=o();n.shiftKey&&H===F?(n.preventDefault(),M.focus()):!n.shiftKey&&H===M&&(n.preventDefault(),F.focus());}}function b(){s||(s=true,document.removeEventListener("keydown",d,true),r&&i&&i.focus());}return a&&document.addEventListener("keydown",d,true),l&&requestAnimationFrame(()=>{s||m();}),{focusFirst:m,focusLast:f,focusNext:h,focusPrevious:L,focusAt:p,getFocused:o,getElements:c,destroy:b}}function ee(e,t,a={}){let{initialIndex:r=0,orientation:l="both",wrap:i=true,onSelectionChange:s}=a,c=[],o=r;function m(){c=Array.from(e.querySelectorAll(t)),c.forEach((p,d)=>{p.setAttribute("tabindex",d===o?"0":"-1");});}function f(p){if(c.length===0)return;let d=p;d<0?d=i?c.length-1:0:d>=c.length&&(d=i?0:c.length-1);let b=c[o],n=c[d];b&&b.setAttribute("tabindex","-1"),n&&(n.setAttribute("tabindex","0"),n.focus(),s?.(d,n)),o=d;}function h(p){let d=p.target;if(!c.includes(d))return;let b=false;switch(p.key){case "ArrowRight":(l==="horizontal"||l==="both")&&(f(o+1),b=true);break;case "ArrowLeft":(l==="horizontal"||l==="both")&&(f(o-1),b=true);break;case "ArrowDown":(l==="vertical"||l==="both")&&(f(o+1),b=true);break;case "ArrowUp":(l==="vertical"||l==="both")&&(f(o-1),b=true);break;case "Home":f(0),b=true;break;case "End":f(c.length-1),b=true;break}b&&(p.preventDefault(),p.stopPropagation());}function L(p){let d=p.target,b=c.indexOf(d);if(b!==-1&&b!==o){let n=c[o];n&&n.setAttribute("tabindex","-1"),d.setAttribute("tabindex","0"),o=b;}}return m(),e.addEventListener("keydown",h),e.addEventListener("focusin",L),{next:()=>f(o+1),previous:()=>f(o-1),first:()=>f(0),last:()=>f(c.length-1),goto:f,getIndex:()=>o,update:m,destroy:()=>{e.removeEventListener("keydown",h),e.removeEventListener("focusin",L);}}}export{D as a,V as b,q as c,O as d,B as e,te as f,y as g,A as h,ne as i,P as j,R as k,C as l,oe as m,N as n,z as o,U as p,W as q,j as r,Y as s,J as t,Q as u,X as v,Z as w,$ as x,ee as y};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(){return typeof window<"u"&&typeof document<"u"}function s(){return e()?/Mac|iPod|iPhone|iPad/.test(navigator.platform):false}function c(){return e()?/iPod|iPhone|iPad/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1:false}function d(){return e()?/Android/.test(navigator.userAgent):false}function f(){return e()?/Win/.test(navigator.platform):false}function u(){return e()?"ontouchstart"in window||navigator.maxTouchPoints>0:false}function l(){return e()?window.matchMedia("(prefers-reduced-motion: reduce)").matches:false}function m(){return e()?window.matchMedia("(prefers-contrast: more)").matches||window.matchMedia("(-ms-high-contrast: active)").matches:false}function h(){return e()?window.matchMedia("(prefers-color-scheme: dark)").matches:false}function p(){if(!e())return {possibleScreenReader:false,forcedColors:false};let n=window.matchMedia("(forced-colors: active)").matches;return {possibleScreenReader:n,forcedColors:n}}function v(n,o){if(!e())return ()=>{};let r=window.matchMedia(n);if(o(r.matches),r.addEventListener){let a=i=>o(i.matches);return r.addEventListener("change",a),()=>r.removeEventListener("change",a)}let t=()=>o(r.matches);return r.addListener(t),()=>r.removeListener(t)}export{e as a,s as b,c,d,f as e,u as f,l as g,m as h,h as i,p as j,v as k};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';function f(e){let t=e.key;switch(t){case " ":return "Space";case "Esc":return "Escape";case "Left":return "ArrowLeft";case "Right":return "ArrowRight";case "Up":return "ArrowUp";case "Down":return "ArrowDown";default:return t}}function p(e){let t=[];e.ctrlKey&&t.push("Ctrl"),e.altKey&&t.push("Alt"),e.shiftKey&&t.push("Shift"),e.metaKey&&t.push("Meta");let d=f(e);return ["Control","Alt","Shift","Meta"].includes(d)||t.push(d),t.join("+")}function v(e={},t={}){let{preventDefault:d=true,stopPropagation:i=true,targetSelector:o}=t,n=new Map(Object.entries(e)),a=null;function l(r){if(o&&!r.target.matches(o))return;let y=p(r),c=n.get(y);if(!c){let u=f(r);c=n.get(u);}c&&c(r)!==false&&(d&&r.preventDefault(),i&&r.stopPropagation());}function g(r){a&&s(),a=r,r.addEventListener("keydown",l);}function s(){a&&(a.removeEventListener("keydown",l),a=null);}function h(r,y){n.set(r,y);}function m(r){n.delete(r);}function b(){s(),n.clear();}return {attach:g,detach:s,on:h,off:m,destroy:b}}var K={menu:e=>({ArrowUp:()=>e.onUp?.(),ArrowDown:()=>e.onDown?.(),Enter:()=>e.onEnter?.(),Space:()=>e.onEnter?.(),Escape:()=>e.onEscape?.(),Home:()=>e.onHome?.(),End:()=>e.onEnd?.()}),tabs:e=>({ArrowLeft:()=>e.onLeft?.(),ArrowRight:()=>e.onRight?.(),Home:()=>e.onHome?.(),End:()=>e.onEnd?.()}),dialog:e=>({Escape:()=>e.onEscape?.()}),grid:e=>({ArrowUp:()=>e.onUp?.(),ArrowDown:()=>e.onDown?.(),ArrowLeft:()=>e.onLeft?.(),ArrowRight:()=>e.onRight?.(),Home:()=>e.onHome?.(),End:()=>e.onEnd?.(),"Ctrl+Home":()=>e.onCtrlHome?.(),"Ctrl+End":()=>e.onCtrlEnd?.()})};function E(e,t={}){let{timeout:d=500}=t,i="",o=null;function n(){i="",o&&(clearTimeout(o),o=null);}function a(l){return l.length!==1||l===" "?null:(o&&clearTimeout(o),i+=l.toLowerCase(),o=setTimeout(n,d),e.find(s=>s.toLowerCase().startsWith(i))??null)}return {type:a,reset:n,getSearch:()=>i}}exports.a=f;exports.b=p;exports.c=v;exports.d=K;exports.e=E;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var r={hide(e){e.setAttribute("aria-hidden","true");},show(e){e.removeAttribute("aria-hidden");},setExpanded(e,t){e.setAttribute("aria-expanded",String(t));},setSelected(e,t){e.setAttribute("aria-selected",String(t));},setChecked(e,t){e.setAttribute("aria-checked",String(t));},setPressed(e,t){e.setAttribute("aria-pressed",String(t));},setDisabled(e,t){e.setAttribute("aria-disabled",String(t));},setBusy(e,t){e.setAttribute("aria-busy",String(t));},setCurrent(e,t){t==="false"?e.removeAttribute("aria-current"):e.setAttribute("aria-current",t);},setInvalid(e,t){t===false?e.removeAttribute("aria-invalid"):e.setAttribute("aria-invalid",String(t));},setLabel(e,t){t?e.setAttribute("aria-label",t):e.removeAttribute("aria-label");},setLabelledBy(e,...t){let i=t.filter(Boolean).join(" ");i?e.setAttribute("aria-labelledby",i):e.removeAttribute("aria-labelledby");},setDescribedBy(e,...t){let i=t.filter(Boolean).join(" ");i?e.setAttribute("aria-describedby",i):e.removeAttribute("aria-describedby");},setControls(e,...t){let i=t.filter(Boolean).join(" ");i?e.setAttribute("aria-controls",i):e.removeAttribute("aria-controls");},setOwns(e,...t){let i=t.filter(Boolean).join(" ");i?e.setAttribute("aria-owns",i):e.removeAttribute("aria-owns");},setActiveDescendant(e,t){t?e.setAttribute("aria-activedescendant",t):e.removeAttribute("aria-activedescendant");},setHasPopup(e,t){t===false?e.removeAttribute("aria-haspopup"):e.setAttribute("aria-haspopup",String(t));},setLevel(e,t){e.setAttribute("aria-level",String(t));},setPosition(e,t,i){e.setAttribute("aria-posinset",String(t)),e.setAttribute("aria-setsize",String(i));},setValue(e,t){t.min!==void 0&&e.setAttribute("aria-valuemin",String(t.min)),t.max!==void 0&&e.setAttribute("aria-valuemax",String(t.max)),t.now!==void 0&&e.setAttribute("aria-valuenow",String(t.now)),t.text!==void 0&&e.setAttribute("aria-valuetext",t.text);},setRole(e,t){t?e.setAttribute("role",t):e.removeAttribute("role");},setModal(e,t){t?e.setAttribute("aria-modal","true"):e.removeAttribute("aria-modal");},setOrientation(e,t){e.setAttribute("aria-orientation",t);},setRequired(e,t){e.setAttribute("aria-required",String(t));},setReadOnly(e,t){e.setAttribute("aria-readonly",String(t));},setAutocomplete(e,t){e.setAttribute("aria-autocomplete",t);},setMultiSelectable(e,t){e.setAttribute("aria-multiselectable",String(t));},setSort(e,t){e.setAttribute("aria-sort",t);}};function l(e){let t={};return e.label&&(t["aria-label"]=e.label),e.labelledBy&&(t["aria-labelledby"]=Array.isArray(e.labelledBy)?e.labelledBy.join(" "):e.labelledBy),e.describedBy&&(t["aria-describedby"]=Array.isArray(e.describedBy)?e.describedBy.join(" "):e.describedBy),e.controls&&(t["aria-controls"]=Array.isArray(e.controls)?e.controls.join(" "):e.controls),e.owns&&(t["aria-owns"]=Array.isArray(e.owns)?e.owns.join(" "):e.owns),e.expanded!==void 0&&(t["aria-expanded"]=String(e.expanded)),e.selected!==void 0&&(t["aria-selected"]=String(e.selected)),e.checked!==void 0&&(t["aria-checked"]=String(e.checked)),e.pressed!==void 0&&(t["aria-pressed"]=String(e.pressed)),e.disabled!==void 0&&(t["aria-disabled"]=String(e.disabled)),e.hidden!==void 0&&(t["aria-hidden"]=String(e.hidden)),e.modal!==void 0&&(t["aria-modal"]=String(e.modal)),e.busy!==void 0&&(t["aria-busy"]=String(e.busy)),e.current&&(t["aria-current"]=e.current),e.invalid!==void 0&&(t["aria-invalid"]=String(e.invalid)),e.hasPopup!==void 0&&(t["aria-haspopup"]=String(e.hasPopup)),e.activeDescendant&&(t["aria-activedescendant"]=e.activeDescendant),e.level!==void 0&&(t["aria-level"]=String(e.level)),e.posInSet!==void 0&&(t["aria-posinset"]=String(e.posInSet)),e.setSize!==void 0&&(t["aria-setsize"]=String(e.setSize)),e.valueMin!==void 0&&(t["aria-valuemin"]=String(e.valueMin)),e.valueMax!==void 0&&(t["aria-valuemax"]=String(e.valueMax)),e.valueNow!==void 0&&(t["aria-valuenow"]=String(e.valueNow)),e.valueText&&(t["aria-valuetext"]=e.valueText),e.orientation&&(t["aria-orientation"]=e.orientation),e.required!==void 0&&(t["aria-required"]=String(e.required)),e.readOnly!==void 0&&(t["aria-readonly"]=String(e.readOnly)),e.autocomplete&&(t["aria-autocomplete"]=e.autocomplete),e.multiSelectable!==void 0&&(t["aria-multiselectable"]=String(e.multiSelectable)),e.sort&&(t["aria-sort"]=e.sort),e.role&&(t.role=e.role),t}function d(...e){let t=e.filter(Boolean);return t.length>0?t.join(" "):void 0}function u(e){if(e.getAttribute("aria-label"))return true;let t=e.getAttribute("aria-labelledby");return !!(t&&t.split(" ").some(n=>{let a=document.getElementById(n);return a&&a.textContent?.trim()})||e.textContent?.trim()||e.getAttribute("title")||"labels"in e&&e.labels?.length||e.tagName==="IMG"&&e.getAttribute("alt"))}exports.a=r;exports.b=l;exports.c=d;exports.d=u;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunk7BL2ABLF_cjs=require('./chunk-7BL2ABLF.cjs');var D=["a[href]","area[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])','[contenteditable="true"]',"audio[controls]","video[controls]","details > summary:first-of-type","iframe"].join(","),V=['a[href]:not([tabindex="-1"])','area[href]:not([tabindex="-1"])','button:not([disabled]):not([tabindex="-1"])','input:not([disabled]):not([type="hidden"]):not([tabindex="-1"])','select:not([disabled]):not([tabindex="-1"])','textarea:not([disabled]):not([tabindex="-1"])','[tabindex]:not([tabindex="-1"])','[contenteditable="true"]:not([tabindex="-1"])','audio[controls]:not([tabindex="-1"])','video[controls]:not([tabindex="-1"])','details > summary:first-of-type:not([tabindex="-1"])','iframe:not([tabindex="-1"])'].join(",");function q(e){if(!(e instanceof HTMLElement)||e.hidden||e.style.display==="none"||e.style.visibility==="hidden")return false;let t=window.getComputedStyle(e);return !(t.display==="none"||t.visibility==="hidden"||!e.isConnected)}function O(e){return !(!(e instanceof HTMLElement)||!q(e)||!e.matches(D)||e.closest("[inert]"))}function B(e){return !O(e)||e.tabIndex<0?false:e.matches(V)}function te(e){return Array.from(e.querySelectorAll(D)).filter(O)}function y(e){return Array.from(e.querySelectorAll(V)).filter(B).sort((r,l)=>{let i=Math.max(0,r.tabIndex),s=Math.max(0,l.tabIndex);return i===0&&s===0?0:i===0?1:s===0?-1:i-s})}function A(e){return y(e)[0]??null}function ne(e){let t=y(e);return t[t.length-1]??null}function P(e){let t=document.activeElement;return t!==null&&e.contains(t)}function R(e,t,a=true){let r=y(e),l=r.indexOf(t);if(l===-1)return r[0]??null;let i=l+1;return i<r.length?r[i]:a?r[0]??null:null}function C(e,t,a=true){let r=y(e),l=r.indexOf(t);if(l===-1)return r[r.length-1]??null;let i=l-1;return i>=0?r[i]:a?r[r.length-1]??null:null}function oe(e,t){return t.contains(e)}function N(e,t=document.body){return e?typeof e=="string"?t.querySelector(e):typeof e=="function"?e():e:null}var T=[];function z(e,t={}){let{initialFocus:a,returnFocus:r=true,clickOutsideDeactivates:l=false,escapeDeactivates:i=true,onDeactivate:s,onEscapeFocus:c}=t,o=false,m=false,f=null;function h(u){m||!o||(u.key==="Tab"?L(u):u.key==="Escape"&&i&&(u.preventDefault(),u.stopPropagation(),v()));}function L(u){let E=y(e);if(E.length===0){u.preventDefault();return}let w=E[0],g=E[E.length-1],S=document.activeElement;u.shiftKey?(S===w||!e.contains(S))&&(u.preventDefault(),g.focus()):(S===g||!e.contains(S))&&(u.preventDefault(),w.focus());}function p(u){if(m||!o)return;let E=u.target;e.contains(E)||(c?.(E),A(e)?.focus());}function d(u){if(m||!o)return;let E=u.target;l&&!e.contains(E)&&v();}function b(){if(!o){f=document.activeElement,T.push(k);for(let u=0;u<T.length-1;u++)T[u].pause();document.addEventListener("keydown",h,true),document.addEventListener("focusin",p,true),document.addEventListener("click",d,true),o=true,requestAnimationFrame(()=>{if(!o)return;let u=N(a,e);if(u)u.focus();else {let E=A(e);E?E.focus():(e.setAttribute("tabindex","-1"),e.focus());}});}}function n(u){if(!o)return;document.removeEventListener("keydown",h,true),document.removeEventListener("focusin",p,true),document.removeEventListener("click",d,true),o=false,m=false;let E=T.indexOf(k);if(E>-1&&T.splice(E,1),T[T.length-1]?.unpause(),r&&f){let g=typeof r=="boolean"?f:r;requestAnimationFrame(()=>{g&&"focus"in g&&g.focus();});}u&&s?.();}function v(){n(true);}function F(){n(false);}function M(){!o||m||(m=true);}function H(){!o||!m||(m=false,P(e)||A(e)?.focus());}let k={activate:b,deactivate:v,destroy:F,pause:M,unpause:H,isActive:()=>o,isPaused:()=>m};return k}function U(){return T[T.length-1]??null}function W(){return T.length>0}var x={hadKeyboardEvent:true,isPointerInput:false,lastFocusSource:"unknown"},I=false,_=new Set(["Tab","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Enter"," ","Home","End","PageUp","PageDown","Escape"]);function j(){if(!chunk7BL2ABLF_cjs.a()||I)return ()=>{};I=true;function e(i){_.has(i.key)&&(x.hadKeyboardEvent=true,x.isPointerInput=false,x.lastFocusSource="keyboard");}function t(i){x.isPointerInput=true,x.hadKeyboardEvent=false,x.lastFocusSource="pointerType"in i&&i.pointerType==="touch"?"touch":"mouse";}function a(i){let s=i.target;s instanceof HTMLElement&&(x.hadKeyboardEvent||G(s))&&(s.dataset.a11ykitFocusVisible="true");}function r(i){let s=i.target;s instanceof HTMLElement&&delete s.dataset.a11ykitFocusVisible;}function l(){document.visibilityState==="hidden"&&(x.hadKeyboardEvent=true);}return document.addEventListener("keydown",e,true),document.addEventListener("mousedown",t,true),document.addEventListener("pointerdown",t,true),document.addEventListener("focus",a,true),document.addEventListener("blur",r,true),document.addEventListener("visibilitychange",l,true),()=>{document.removeEventListener("keydown",e,true),document.removeEventListener("mousedown",t,true),document.removeEventListener("pointerdown",t,true),document.removeEventListener("focus",a,true),document.removeEventListener("blur",r,true),document.removeEventListener("visibilitychange",l,true),I=false;}}function G(e){let t=e.tagName.toLowerCase(),a=e.getAttribute("type")?.toLowerCase();return !!(t==="input"&&(!a||a==="text"||a==="email"||a==="password"||a==="search"||a==="tel"||a==="url"||a==="number")||t==="textarea"||e.isContentEditable)}function Y(){return x.hadKeyboardEvent}function J(e){return e.dataset.a11ykitFocusVisible==="true"}function Q(){return x.lastFocusSource}function X(e,t){t?e.dataset.a11ykitFocusVisible="true":delete e.dataset.a11ykitFocusVisible;}function Z(e,t){x.hadKeyboardEvent=true,x.lastFocusSource="keyboard",e.focus(t);}function $(e,t={}){let{contain:a=false,restoreFocus:r=false,autoFocus:l=false}=t,i=null,s=false;r&&(i=document.activeElement);function c(){return s?[]:y(e)}function o(){let n=document.activeElement;return n&&e.contains(n)?n:null}function m(){if(s)return;c()[0]?.focus();}function f(){if(s)return;let n=c();n[n.length-1]?.focus();}function h({wrap:n=true}={}){if(s)return;let v=o();if(!v){m();return}R(e,v,n)?.focus();}function L({wrap:n=true}={}){if(s)return;let v=o();if(!v){f();return}C(e,v,n)?.focus();}function p(n){if(s)return;c()[n]?.focus();}function d(n){if(!(s||!a)&&n.key==="Tab"){let v=c();if(v.length===0){n.preventDefault();return}let F=v[0],M=v[v.length-1],H=o();n.shiftKey&&H===F?(n.preventDefault(),M.focus()):!n.shiftKey&&H===M&&(n.preventDefault(),F.focus());}}function b(){s||(s=true,document.removeEventListener("keydown",d,true),r&&i&&i.focus());}return a&&document.addEventListener("keydown",d,true),l&&requestAnimationFrame(()=>{s||m();}),{focusFirst:m,focusLast:f,focusNext:h,focusPrevious:L,focusAt:p,getFocused:o,getElements:c,destroy:b}}function ee(e,t,a={}){let{initialIndex:r=0,orientation:l="both",wrap:i=true,onSelectionChange:s}=a,c=[],o=r;function m(){c=Array.from(e.querySelectorAll(t)),c.forEach((p,d)=>{p.setAttribute("tabindex",d===o?"0":"-1");});}function f(p){if(c.length===0)return;let d=p;d<0?d=i?c.length-1:0:d>=c.length&&(d=i?0:c.length-1);let b=c[o],n=c[d];b&&b.setAttribute("tabindex","-1"),n&&(n.setAttribute("tabindex","0"),n.focus(),s?.(d,n)),o=d;}function h(p){let d=p.target;if(!c.includes(d))return;let b=false;switch(p.key){case "ArrowRight":(l==="horizontal"||l==="both")&&(f(o+1),b=true);break;case "ArrowLeft":(l==="horizontal"||l==="both")&&(f(o-1),b=true);break;case "ArrowDown":(l==="vertical"||l==="both")&&(f(o+1),b=true);break;case "ArrowUp":(l==="vertical"||l==="both")&&(f(o-1),b=true);break;case "Home":f(0),b=true;break;case "End":f(c.length-1),b=true;break}b&&(p.preventDefault(),p.stopPropagation());}function L(p){let d=p.target,b=c.indexOf(d);if(b!==-1&&b!==o){let n=c[o];n&&n.setAttribute("tabindex","-1"),d.setAttribute("tabindex","0"),o=b;}}return m(),e.addEventListener("keydown",h),e.addEventListener("focusin",L),{next:()=>f(o+1),previous:()=>f(o-1),first:()=>f(0),last:()=>f(c.length-1),goto:f,getIndex:()=>o,update:m,destroy:()=>{e.removeEventListener("keydown",h),e.removeEventListener("focusin",L);}}}exports.a=D;exports.b=V;exports.c=q;exports.d=O;exports.e=B;exports.f=te;exports.g=y;exports.h=A;exports.i=ne;exports.j=P;exports.k=R;exports.l=C;exports.m=oe;exports.n=N;exports.o=z;exports.p=U;exports.q=W;exports.r=j;exports.s=Y;exports.t=J;exports.u=Q;exports.v=X;exports.w=Z;exports.x=$;exports.y=ee;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function f(e){let t=e.key;switch(t){case " ":return "Space";case "Esc":return "Escape";case "Left":return "ArrowLeft";case "Right":return "ArrowRight";case "Up":return "ArrowUp";case "Down":return "ArrowDown";default:return t}}function p(e){let t=[];e.ctrlKey&&t.push("Ctrl"),e.altKey&&t.push("Alt"),e.shiftKey&&t.push("Shift"),e.metaKey&&t.push("Meta");let d=f(e);return ["Control","Alt","Shift","Meta"].includes(d)||t.push(d),t.join("+")}function v(e={},t={}){let{preventDefault:d=true,stopPropagation:i=true,targetSelector:o}=t,n=new Map(Object.entries(e)),a=null;function l(r){if(o&&!r.target.matches(o))return;let y=p(r),c=n.get(y);if(!c){let u=f(r);c=n.get(u);}c&&c(r)!==false&&(d&&r.preventDefault(),i&&r.stopPropagation());}function g(r){a&&s(),a=r,r.addEventListener("keydown",l);}function s(){a&&(a.removeEventListener("keydown",l),a=null);}function h(r,y){n.set(r,y);}function m(r){n.delete(r);}function b(){s(),n.clear();}return {attach:g,detach:s,on:h,off:m,destroy:b}}var K={menu:e=>({ArrowUp:()=>e.onUp?.(),ArrowDown:()=>e.onDown?.(),Enter:()=>e.onEnter?.(),Space:()=>e.onEnter?.(),Escape:()=>e.onEscape?.(),Home:()=>e.onHome?.(),End:()=>e.onEnd?.()}),tabs:e=>({ArrowLeft:()=>e.onLeft?.(),ArrowRight:()=>e.onRight?.(),Home:()=>e.onHome?.(),End:()=>e.onEnd?.()}),dialog:e=>({Escape:()=>e.onEscape?.()}),grid:e=>({ArrowUp:()=>e.onUp?.(),ArrowDown:()=>e.onDown?.(),ArrowLeft:()=>e.onLeft?.(),ArrowRight:()=>e.onRight?.(),Home:()=>e.onHome?.(),End:()=>e.onEnd?.(),"Ctrl+Home":()=>e.onCtrlHome?.(),"Ctrl+End":()=>e.onCtrlEnd?.()})};function E(e,t={}){let{timeout:d=500}=t,i="",o=null;function n(){i="",o&&(clearTimeout(o),o=null);}function a(l){return l.length!==1||l===" "?null:(o&&clearTimeout(o),i+=l.toLowerCase(),o=setTimeout(n,d),e.find(s=>s.toLowerCase().startsWith(i))??null)}return {type:a,reset:n,getSearch:()=>i}}export{f as a,p as b,v as c,K as d,E as e};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var r={hide(e){e.setAttribute("aria-hidden","true");},show(e){e.removeAttribute("aria-hidden");},setExpanded(e,t){e.setAttribute("aria-expanded",String(t));},setSelected(e,t){e.setAttribute("aria-selected",String(t));},setChecked(e,t){e.setAttribute("aria-checked",String(t));},setPressed(e,t){e.setAttribute("aria-pressed",String(t));},setDisabled(e,t){e.setAttribute("aria-disabled",String(t));},setBusy(e,t){e.setAttribute("aria-busy",String(t));},setCurrent(e,t){t==="false"?e.removeAttribute("aria-current"):e.setAttribute("aria-current",t);},setInvalid(e,t){t===false?e.removeAttribute("aria-invalid"):e.setAttribute("aria-invalid",String(t));},setLabel(e,t){t?e.setAttribute("aria-label",t):e.removeAttribute("aria-label");},setLabelledBy(e,...t){let i=t.filter(Boolean).join(" ");i?e.setAttribute("aria-labelledby",i):e.removeAttribute("aria-labelledby");},setDescribedBy(e,...t){let i=t.filter(Boolean).join(" ");i?e.setAttribute("aria-describedby",i):e.removeAttribute("aria-describedby");},setControls(e,...t){let i=t.filter(Boolean).join(" ");i?e.setAttribute("aria-controls",i):e.removeAttribute("aria-controls");},setOwns(e,...t){let i=t.filter(Boolean).join(" ");i?e.setAttribute("aria-owns",i):e.removeAttribute("aria-owns");},setActiveDescendant(e,t){t?e.setAttribute("aria-activedescendant",t):e.removeAttribute("aria-activedescendant");},setHasPopup(e,t){t===false?e.removeAttribute("aria-haspopup"):e.setAttribute("aria-haspopup",String(t));},setLevel(e,t){e.setAttribute("aria-level",String(t));},setPosition(e,t,i){e.setAttribute("aria-posinset",String(t)),e.setAttribute("aria-setsize",String(i));},setValue(e,t){t.min!==void 0&&e.setAttribute("aria-valuemin",String(t.min)),t.max!==void 0&&e.setAttribute("aria-valuemax",String(t.max)),t.now!==void 0&&e.setAttribute("aria-valuenow",String(t.now)),t.text!==void 0&&e.setAttribute("aria-valuetext",t.text);},setRole(e,t){t?e.setAttribute("role",t):e.removeAttribute("role");},setModal(e,t){t?e.setAttribute("aria-modal","true"):e.removeAttribute("aria-modal");},setOrientation(e,t){e.setAttribute("aria-orientation",t);},setRequired(e,t){e.setAttribute("aria-required",String(t));},setReadOnly(e,t){e.setAttribute("aria-readonly",String(t));},setAutocomplete(e,t){e.setAttribute("aria-autocomplete",t);},setMultiSelectable(e,t){e.setAttribute("aria-multiselectable",String(t));},setSort(e,t){e.setAttribute("aria-sort",t);}};function l(e){let t={};return e.label&&(t["aria-label"]=e.label),e.labelledBy&&(t["aria-labelledby"]=Array.isArray(e.labelledBy)?e.labelledBy.join(" "):e.labelledBy),e.describedBy&&(t["aria-describedby"]=Array.isArray(e.describedBy)?e.describedBy.join(" "):e.describedBy),e.controls&&(t["aria-controls"]=Array.isArray(e.controls)?e.controls.join(" "):e.controls),e.owns&&(t["aria-owns"]=Array.isArray(e.owns)?e.owns.join(" "):e.owns),e.expanded!==void 0&&(t["aria-expanded"]=String(e.expanded)),e.selected!==void 0&&(t["aria-selected"]=String(e.selected)),e.checked!==void 0&&(t["aria-checked"]=String(e.checked)),e.pressed!==void 0&&(t["aria-pressed"]=String(e.pressed)),e.disabled!==void 0&&(t["aria-disabled"]=String(e.disabled)),e.hidden!==void 0&&(t["aria-hidden"]=String(e.hidden)),e.modal!==void 0&&(t["aria-modal"]=String(e.modal)),e.busy!==void 0&&(t["aria-busy"]=String(e.busy)),e.current&&(t["aria-current"]=e.current),e.invalid!==void 0&&(t["aria-invalid"]=String(e.invalid)),e.hasPopup!==void 0&&(t["aria-haspopup"]=String(e.hasPopup)),e.activeDescendant&&(t["aria-activedescendant"]=e.activeDescendant),e.level!==void 0&&(t["aria-level"]=String(e.level)),e.posInSet!==void 0&&(t["aria-posinset"]=String(e.posInSet)),e.setSize!==void 0&&(t["aria-setsize"]=String(e.setSize)),e.valueMin!==void 0&&(t["aria-valuemin"]=String(e.valueMin)),e.valueMax!==void 0&&(t["aria-valuemax"]=String(e.valueMax)),e.valueNow!==void 0&&(t["aria-valuenow"]=String(e.valueNow)),e.valueText&&(t["aria-valuetext"]=e.valueText),e.orientation&&(t["aria-orientation"]=e.orientation),e.required!==void 0&&(t["aria-required"]=String(e.required)),e.readOnly!==void 0&&(t["aria-readonly"]=String(e.readOnly)),e.autocomplete&&(t["aria-autocomplete"]=e.autocomplete),e.multiSelectable!==void 0&&(t["aria-multiselectable"]=String(e.multiSelectable)),e.sort&&(t["aria-sort"]=e.sort),e.role&&(t.role=e.role),t}function d(...e){let t=e.filter(Boolean);return t.length>0?t.join(" "):void 0}function u(e){if(e.getAttribute("aria-label"))return true;let t=e.getAttribute("aria-labelledby");return !!(t&&t.split(" ").some(n=>{let a=document.getElementById(n);return a&&a.textContent?.trim()})||e.textContent?.trim()||e.getAttribute("title")||"labels"in e&&e.labels?.length||e.tagName==="IMG"&&e.getAttribute("alt"))}export{r as a,l as b,d as c,u as d};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a as a$1}from'./chunk-C3VZQUKG.js';var o=null,i=null,m=false,l=[],r=null;function L(){return {position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"}}function x(n){let e=document.createElement("div");e.setAttribute("role","status"),e.setAttribute("aria-live",n),e.setAttribute("aria-atomic","true"),e.setAttribute("aria-relevant","additions text"),e.id=`compa11y-announcer-${n}`;let t=L();return Object.assign(e.style,t),document.body.appendChild(e),{element:e,politeness:n}}function b(){return !a$1()||m?()=>{}:(m=true,o=x("polite"),i=x("assertive"),()=>{o&&(o.element.remove(),o=null),i&&(i.element.remove(),i=null),r&&(clearTimeout(r),r=null),l=[],m=false;})}function R(){!m&&a$1()&&b();}function g(n){n.element.textContent="";}function a(n,e={}){if(!a$1())return;let{politeness:t="polite",delay:s=0,clearPrevious:c=false,timeout:A=7e3}=e;R();let u=t==="assertive"?i:o;if(!u)return;let d=()=>{c&&g(u),u.element.textContent="",requestAnimationFrame(()=>{u.element.textContent=n,A>0&&setTimeout(()=>{u.element.textContent===n&&(u.element.textContent="");},A);});};s>0?setTimeout(d,s):d();}function f(n,e){a(n,{...e,politeness:"polite"});}function v(n,e){a(n,{...e,politeness:"assertive"});}function O(){o&&g(o),i&&g(i);}function y(n,e={}){let{debounce:t=150,...s}=e;l.push({message:n,options:s}),r&&clearTimeout(r),r=setTimeout(()=>{let c=l[l.length-1];c&&a(c.message,c.options),l=[],r=null;},t);}function P(n={}){return {announce:(e,t)=>a(e,{...n,...t}),polite:(e,t)=>f(e,{...n,...t}),assertive:(e,t)=>v(e,{...n,...t}),queue:(e,t)=>y(e,{...n,...t}),clear:O}}function S(n){f(n);}function T(n){v(n);}function h(n,e,t="{current} of {total}"){let s=t.replace("{current}",String(n)).replace("{total}",String(e));f(s);}export{b as a,a as b,f as c,v as d,O as e,y as f,P as g,S as h,T as i,h as j};
|
package/dist/focus/index.cjs
CHANGED
|
@@ -1,53 +1 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chunkCQXMBRLD_cjs = require('../chunk-CQXMBRLD.cjs');
|
|
4
|
-
require('../chunk-XEGB27QF.cjs');
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
Object.defineProperty(exports, "createFocusScope", {
|
|
9
|
-
enumerable: true,
|
|
10
|
-
get: function () { return chunkCQXMBRLD_cjs.createFocusScope; }
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(exports, "createFocusTrap", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function () { return chunkCQXMBRLD_cjs.createFocusTrap; }
|
|
15
|
-
});
|
|
16
|
-
Object.defineProperty(exports, "createRovingTabindex", {
|
|
17
|
-
enumerable: true,
|
|
18
|
-
get: function () { return chunkCQXMBRLD_cjs.createRovingTabindex; }
|
|
19
|
-
});
|
|
20
|
-
Object.defineProperty(exports, "focusWithVisibleRing", {
|
|
21
|
-
enumerable: true,
|
|
22
|
-
get: function () { return chunkCQXMBRLD_cjs.focusWithVisibleRing; }
|
|
23
|
-
});
|
|
24
|
-
Object.defineProperty(exports, "getActiveFocusTrap", {
|
|
25
|
-
enumerable: true,
|
|
26
|
-
get: function () { return chunkCQXMBRLD_cjs.getActiveFocusTrap; }
|
|
27
|
-
});
|
|
28
|
-
Object.defineProperty(exports, "getLastFocusSource", {
|
|
29
|
-
enumerable: true,
|
|
30
|
-
get: function () { return chunkCQXMBRLD_cjs.getLastFocusSource; }
|
|
31
|
-
});
|
|
32
|
-
Object.defineProperty(exports, "hasFocusTrap", {
|
|
33
|
-
enumerable: true,
|
|
34
|
-
get: function () { return chunkCQXMBRLD_cjs.hasFocusTrap; }
|
|
35
|
-
});
|
|
36
|
-
Object.defineProperty(exports, "hasVisibleFocus", {
|
|
37
|
-
enumerable: true,
|
|
38
|
-
get: function () { return chunkCQXMBRLD_cjs.hasVisibleFocus; }
|
|
39
|
-
});
|
|
40
|
-
Object.defineProperty(exports, "initFocusVisible", {
|
|
41
|
-
enumerable: true,
|
|
42
|
-
get: function () { return chunkCQXMBRLD_cjs.initFocusVisible; }
|
|
43
|
-
});
|
|
44
|
-
Object.defineProperty(exports, "isFocusVisible", {
|
|
45
|
-
enumerable: true,
|
|
46
|
-
get: function () { return chunkCQXMBRLD_cjs.isFocusVisible; }
|
|
47
|
-
});
|
|
48
|
-
Object.defineProperty(exports, "setFocusVisible", {
|
|
49
|
-
enumerable: true,
|
|
50
|
-
get: function () { return chunkCQXMBRLD_cjs.setFocusVisible; }
|
|
51
|
-
});
|
|
52
|
-
//# sourceMappingURL=index.cjs.map
|
|
53
|
-
//# sourceMappingURL=index.cjs.map
|
|
1
|
+
'use strict';var chunkOSJIG3A2_cjs=require('../chunk-OSJIG3A2.cjs');require('../chunk-7BL2ABLF.cjs');Object.defineProperty(exports,"createFocusScope",{enumerable:true,get:function(){return chunkOSJIG3A2_cjs.x}});Object.defineProperty(exports,"createFocusTrap",{enumerable:true,get:function(){return chunkOSJIG3A2_cjs.o}});Object.defineProperty(exports,"createRovingTabindex",{enumerable:true,get:function(){return chunkOSJIG3A2_cjs.y}});Object.defineProperty(exports,"focusWithVisibleRing",{enumerable:true,get:function(){return chunkOSJIG3A2_cjs.w}});Object.defineProperty(exports,"getActiveFocusTrap",{enumerable:true,get:function(){return chunkOSJIG3A2_cjs.p}});Object.defineProperty(exports,"getLastFocusSource",{enumerable:true,get:function(){return chunkOSJIG3A2_cjs.u}});Object.defineProperty(exports,"hasFocusTrap",{enumerable:true,get:function(){return chunkOSJIG3A2_cjs.q}});Object.defineProperty(exports,"hasVisibleFocus",{enumerable:true,get:function(){return chunkOSJIG3A2_cjs.t}});Object.defineProperty(exports,"initFocusVisible",{enumerable:true,get:function(){return chunkOSJIG3A2_cjs.r}});Object.defineProperty(exports,"isFocusVisible",{enumerable:true,get:function(){return chunkOSJIG3A2_cjs.s}});Object.defineProperty(exports,"setFocusVisible",{enumerable:true,get:function(){return chunkOSJIG3A2_cjs.v}});
|
package/dist/focus/index.d.cts
CHANGED
package/dist/focus/index.d.ts
CHANGED
package/dist/focus/index.js
CHANGED
|
@@ -1,4 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
import '../chunk-Z7K2G6FX.js';
|
|
3
|
-
//# sourceMappingURL=index.js.map
|
|
4
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
export{x as createFocusScope,o as createFocusTrap,y as createRovingTabindex,w as focusWithVisibleRing,p as getActiveFocusTrap,u as getLastFocusSource,q as hasFocusTrap,t as hasVisibleFocus,r as initFocusVisible,s as isFocusVisible,v as setFocusVisible}from'../chunk-BAFKUMWA.js';import'../chunk-C3VZQUKG.js';
|