@okam/stack-ui 1.42.1 → 1.42.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/components/ShareButton/interface.d.ts +0 -1
- package/index151.js +1 -1
- package/index151.mjs +1 -1
- package/index153.js +1 -1
- package/index153.mjs +4 -4
- package/index154.js +1 -1
- package/index154.mjs +2 -2
- package/index155.js +1 -1
- package/index155.mjs +1 -1
- package/index156.js +1 -1
- package/index156.mjs +1 -1
- package/index161.js +1 -1
- package/index161.mjs +2 -2
- package/index163.js +1 -1
- package/index163.mjs +2 -2
- package/index164.js +1 -1
- package/index164.mjs +5 -5
- package/index165.js +1 -1
- package/index165.mjs +3 -3
- package/index167.js +1 -1
- package/index167.mjs +2 -2
- package/index172.js +1 -1
- package/index172.mjs +2 -2
- package/index176.js +1 -1
- package/index176.mjs +1 -1
- package/index178.js +1 -1
- package/index178.mjs +1 -1
- package/index179.js +1 -1
- package/index179.mjs +1 -1
- package/index181.js +1 -1
- package/index181.mjs +3 -3
- package/index187.js +1 -1
- package/index187.mjs +5 -11
- package/index188.js +2 -1
- package/index188.mjs +49 -5
- package/index189.js +1 -2
- package/index189.mjs +11 -49
- package/index232.js +1 -1
- package/index232.mjs +132 -117
- package/index233.js +1 -1
- package/index233.mjs +196 -26
- package/index234.js +1 -1
- package/index234.mjs +18 -69
- package/index235.js +1 -1
- package/index235.mjs +4 -382
- package/index236.js +1 -1
- package/index236.mjs +28 -46
- package/index237.js +1 -1
- package/index237.mjs +50 -4
- package/index238.js +1 -1
- package/index238.mjs +52 -22
- package/index239.js +1 -1
- package/index239.mjs +46 -45
- package/index240.js +1 -1
- package/index240.mjs +96 -4
- package/index241.js +1 -1
- package/index241.mjs +5 -24
- package/index242.js +1 -1
- package/index242.mjs +6 -12
- package/index243.js +1 -1
- package/index243.mjs +41 -4
- package/index244.js +1 -1
- package/index244.mjs +72 -15
- package/index245.js +1 -1
- package/index245.mjs +14 -42
- package/index246.js +1 -1
- package/index246.mjs +66 -55
- package/index247.js +1 -1
- package/index247.mjs +7 -41
- package/index248.js +1 -1
- package/index248.mjs +10 -27
- package/index249.js +1 -1
- package/index249.mjs +46 -30
- package/index250.js +1 -1
- package/index250.mjs +124 -13
- package/index251.js +1 -1
- package/index251.mjs +27 -10
- package/index252.js +1 -1
- package/index252.mjs +69 -24
- package/index253.js +1 -1
- package/index253.mjs +380 -8
- package/index254.js +1 -1
- package/index254.mjs +46 -6
- package/index255.js +1 -1
- package/index255.mjs +24 -5
- package/index256.js +1 -1
- package/index256.mjs +24 -7
- package/index257.js +1 -1
- package/index257.mjs +12 -29
- package/index258.js +1 -1
- package/index258.mjs +4 -18
- package/index259.js +1 -1
- package/index259.mjs +14 -13
- package/index260.js +1 -1
- package/index260.mjs +37 -38
- package/index261.js +1 -1
- package/index261.mjs +56 -7
- package/index262.js +1 -1
- package/index262.mjs +27 -16
- package/index263.js +1 -1
- package/index263.mjs +32 -3
- package/index264.js +1 -1
- package/index264.mjs +10 -4
- package/index265.js +1 -1
- package/index265.mjs +9 -19
- package/index266.js +1 -1
- package/index266.mjs +5 -54
- package/index267.js +1 -1
- package/index267.mjs +7 -140
- package/index268.js +1 -1
- package/index268.mjs +28 -196
- package/index269.js +1 -1
- package/index269.mjs +14 -18
- package/index270.js +1 -1
- package/index270.mjs +12 -48
- package/index271.js +1 -1
- package/index271.mjs +40 -45
- package/index272.js +1 -1
- package/index272.mjs +7 -96
- package/index273.js +1 -1
- package/index273.mjs +18 -72
- package/index274.js +1 -1
- package/index274.mjs +3 -69
- package/index275.js +1 -1
- package/index275.mjs +4 -7
- package/index276.js +1 -1
- package/index276.mjs +19 -11
- package/index278.js +1 -1
- package/index278.mjs +3 -3
- package/index280.js +1 -1
- package/index280.mjs +9 -9
- package/index281.js +1 -1
- package/index281.mjs +1 -1
- package/index324.js +1 -1
- package/index324.mjs +7 -63
- package/index325.js +1 -1
- package/index325.mjs +28 -7
- package/index326.js +1 -1
- package/index326.mjs +89 -24
- package/index327.js +1 -1
- package/index327.mjs +58 -88
- package/index330.js +1 -1
- package/index330.mjs +3 -3
- package/index333.js +1 -1
- package/index333.mjs +5 -5
- package/index334.js +1 -1
- package/index334.mjs +2 -2
- package/index335.js +1 -1
- package/index335.mjs +5 -5
- package/index336.js +1 -1
- package/index336.mjs +1 -1
- package/index340.js +1 -1
- package/index340.mjs +1 -1
- package/index8.js +1 -1
- package/index8.mjs +32 -32
- package/package.json +1 -1
package/index327.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index326.js"),u=require("./index257.js"),m=require("./index243.js"),L=require("./index272.js");require("react");let f=null,y=new Set,a=new Map,i=!1,c=!1;function d(e,n){for(let t of y)t(e,n)}function g(e){return!(e.metaKey||!m.isMac()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function s(e){i=!0,g(e)&&(f="keyboard",d("keyboard",e))}function o(e){f="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(i=!0,d("pointer",e))}function b(e){L.isVirtualClick(e)&&(i=!0,f="virtual")}function $(e){e.target===window||e.target===document||l.ignoreFocusEvent||!e.isTrusted||(!i&&!c&&(f="virtual",d("virtual",e)),i=!1,c=!1)}function E(){l.ignoreFocusEvent||(i=!1,c=!0)}function v(e){if(typeof window>"u"||a.get(u.getOwnerWindow(e)))return;const n=u.getOwnerWindow(e),t=u.getOwnerDocument(e);let r=n.HTMLElement.prototype.focus;n.HTMLElement.prototype.focus=function(){i=!0,r.apply(this,arguments)},t.addEventListener("keydown",s,!0),t.addEventListener("keyup",s,!0),t.addEventListener("click",b,!0),n.addEventListener("focus",$,!0),n.addEventListener("blur",E,!1),typeof PointerEvent<"u"?(t.addEventListener("pointerdown",o,!0),t.addEventListener("pointermove",o,!0),t.addEventListener("pointerup",o,!0)):process.env.NODE_ENV==="test"&&(t.addEventListener("mousedown",o,!0),t.addEventListener("mousemove",o,!0),t.addEventListener("mouseup",o,!0)),n.addEventListener("beforeunload",()=>{p(e)},{once:!0}),a.set(n,{focus:r})}const p=(e,n)=>{const t=u.getOwnerWindow(e),r=u.getOwnerDocument(e);n&&r.removeEventListener("DOMContentLoaded",n),a.has(t)&&(t.HTMLElement.prototype.focus=a.get(t).focus,r.removeEventListener("keydown",s,!0),r.removeEventListener("keyup",s,!0),r.removeEventListener("click",b,!0),t.removeEventListener("focus",$,!0),t.removeEventListener("blur",E,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",o,!0),r.removeEventListener("pointermove",o,!0),r.removeEventListener("pointerup",o,!0)):process.env.NODE_ENV==="test"&&(r.removeEventListener("mousedown",o,!0),r.removeEventListener("mousemove",o,!0),r.removeEventListener("mouseup",o,!0)),a.delete(t))};function w(e){const n=u.getOwnerDocument(e);let t;return n.readyState!=="loading"?v(e):(t=()=>{v(e)},n.addEventListener("DOMContentLoaded",t)),()=>p(e,t)}typeof document<"u"&&w();function O(){return f}function k(e){f=e,d(e,null)}exports.addWindowFocusTracking=w;exports.getInteractionModality=O;exports.hasSetupGlobalListeners=a;exports.setInteractionModality=k;
|
package/index327.mjs
CHANGED
|
@@ -1,95 +1,65 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
function
|
|
8
|
-
let e
|
|
9
|
-
return e.nativeEvent = r, e.isDefaultPrevented = () => e.defaultPrevented, e.isPropagationStopped = () => e.cancelBubble, e.persist = () => {
|
|
10
|
-
}, e;
|
|
1
|
+
import { ignoreFocusEvent as b } from "./index326.mjs";
|
|
2
|
+
import { getOwnerDocument as v, getOwnerWindow as s } from "./index257.mjs";
|
|
3
|
+
import { isMac as L } from "./index243.mjs";
|
|
4
|
+
import { isVirtualClick as y } from "./index272.mjs";
|
|
5
|
+
import "react";
|
|
6
|
+
let f = null, w = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Map(), a = !1, c = !1;
|
|
7
|
+
function u(e, n) {
|
|
8
|
+
for (let t of w) t(e, n);
|
|
11
9
|
}
|
|
12
|
-
function
|
|
13
|
-
|
|
14
|
-
value: e
|
|
15
|
-
}), Object.defineProperty(r, "currentTarget", {
|
|
16
|
-
value: e
|
|
17
|
-
});
|
|
10
|
+
function g(e) {
|
|
11
|
+
return !(e.metaKey || !L() && e.altKey || e.ctrlKey || e.key === "Control" || e.key === "Shift" || e.key === "Meta");
|
|
18
12
|
}
|
|
19
|
-
function
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
13
|
+
function d(e) {
|
|
14
|
+
a = !0, g(e) && (f = "keyboard", u("keyboard", e));
|
|
15
|
+
}
|
|
16
|
+
function o(e) {
|
|
17
|
+
f = "pointer", (e.type === "mousedown" || e.type === "pointerdown") && (a = !0, u("pointer", e));
|
|
18
|
+
}
|
|
19
|
+
function l(e) {
|
|
20
|
+
y(e) && (a = !0, f = "virtual");
|
|
21
|
+
}
|
|
22
|
+
function p(e) {
|
|
23
|
+
e.target === window || e.target === document || b || !e.isTrusted || (!a && !c && (f = "virtual", u("virtual", e)), a = !1, c = !1);
|
|
24
|
+
}
|
|
25
|
+
function E() {
|
|
26
|
+
b || (a = !1, c = !0);
|
|
27
|
+
}
|
|
28
|
+
function $(e) {
|
|
29
|
+
if (typeof window > "u" || i.get(s(e))) return;
|
|
30
|
+
const n = s(e), t = v(e);
|
|
31
|
+
let r = n.HTMLElement.prototype.focus;
|
|
32
|
+
n.HTMLElement.prototype.focus = function() {
|
|
33
|
+
a = !0, r.apply(this, arguments);
|
|
34
|
+
}, t.addEventListener("keydown", d, !0), t.addEventListener("keyup", d, !0), t.addEventListener("click", l, !0), n.addEventListener("focus", p, !0), n.addEventListener("blur", E, !1), typeof PointerEvent < "u" ? (t.addEventListener("pointerdown", o, !0), t.addEventListener("pointermove", o, !0), t.addEventListener("pointerup", o, !0)) : process.env.NODE_ENV === "test" && (t.addEventListener("mousedown", o, !0), t.addEventListener("mousemove", o, !0), t.addEventListener("mouseup", o, !0)), n.addEventListener("beforeunload", () => {
|
|
35
|
+
m(e);
|
|
36
|
+
}, {
|
|
37
|
+
once: !0
|
|
38
|
+
}), i.set(n, {
|
|
39
|
+
focus: r
|
|
32
40
|
});
|
|
33
|
-
return $((t) => {
|
|
34
|
-
if (t.target instanceof HTMLButtonElement || t.target instanceof HTMLInputElement || t.target instanceof HTMLTextAreaElement || t.target instanceof HTMLSelectElement) {
|
|
35
|
-
e.current.isFocused = !0;
|
|
36
|
-
let o = t.target, u = (c) => {
|
|
37
|
-
if (e.current.isFocused = !1, o.disabled) {
|
|
38
|
-
let s = g(c);
|
|
39
|
-
a(s);
|
|
40
|
-
}
|
|
41
|
-
e.current.observer && (e.current.observer.disconnect(), e.current.observer = null);
|
|
42
|
-
};
|
|
43
|
-
o.addEventListener("focusout", u, {
|
|
44
|
-
once: !0
|
|
45
|
-
}), e.current.observer = new MutationObserver(() => {
|
|
46
|
-
if (e.current.isFocused && o.disabled) {
|
|
47
|
-
var c;
|
|
48
|
-
(c = e.current.observer) === null || c === void 0 || c.disconnect();
|
|
49
|
-
let s = o === document.activeElement ? null : document.activeElement;
|
|
50
|
-
o.dispatchEvent(new FocusEvent("blur", {
|
|
51
|
-
relatedTarget: s
|
|
52
|
-
})), o.dispatchEvent(new FocusEvent("focusout", {
|
|
53
|
-
bubbles: !0,
|
|
54
|
-
relatedTarget: s
|
|
55
|
-
}));
|
|
56
|
-
}
|
|
57
|
-
}), e.current.observer.observe(o, {
|
|
58
|
-
attributes: !0,
|
|
59
|
-
attributeFilter: [
|
|
60
|
-
"disabled"
|
|
61
|
-
]
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
}, [
|
|
65
|
-
a
|
|
66
|
-
]);
|
|
67
41
|
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
let t
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
cancelAnimationFrame(f), e.removeEventListener("blur", o, !0), e.removeEventListener("focusout", u, !0), e.removeEventListener("focusin", s, !0), e.removeEventListener("focus", c, !0), d = !1, t = !1;
|
|
86
|
-
}, f = requestAnimationFrame(i);
|
|
87
|
-
return i;
|
|
42
|
+
const m = (e, n) => {
|
|
43
|
+
const t = s(e), r = v(e);
|
|
44
|
+
n && r.removeEventListener("DOMContentLoaded", n), i.has(t) && (t.HTMLElement.prototype.focus = i.get(t).focus, r.removeEventListener("keydown", d, !0), r.removeEventListener("keyup", d, !0), r.removeEventListener("click", l, !0), t.removeEventListener("focus", p, !0), t.removeEventListener("blur", E, !1), typeof PointerEvent < "u" ? (r.removeEventListener("pointerdown", o, !0), r.removeEventListener("pointermove", o, !0), r.removeEventListener("pointerup", o, !0)) : process.env.NODE_ENV === "test" && (r.removeEventListener("mousedown", o, !0), r.removeEventListener("mousemove", o, !0), r.removeEventListener("mouseup", o, !0)), i.delete(t));
|
|
45
|
+
};
|
|
46
|
+
function k(e) {
|
|
47
|
+
const n = v(e);
|
|
48
|
+
let t;
|
|
49
|
+
return n.readyState !== "loading" ? $(e) : (t = () => {
|
|
50
|
+
$(e);
|
|
51
|
+
}, n.addEventListener("DOMContentLoaded", t)), () => m(e, t);
|
|
52
|
+
}
|
|
53
|
+
typeof document < "u" && k();
|
|
54
|
+
function D() {
|
|
55
|
+
return f;
|
|
56
|
+
}
|
|
57
|
+
function F(e) {
|
|
58
|
+
f = e, u(e, null);
|
|
88
59
|
}
|
|
89
60
|
export {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
I as useSyntheticBlurEvent
|
|
61
|
+
k as addWindowFocusTracking,
|
|
62
|
+
D as getInteractionModality,
|
|
63
|
+
i as hasSetupGlobalListeners,
|
|
64
|
+
F as setInteractionModality
|
|
95
65
|
};
|
package/index330.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index257.js"),r=require("./index262.js"),c=require("./index243.js");let n="default",s="",l=new WeakMap;function u(e){if(c.isIOS()){if(n==="default"){const t=o.getOwnerDocument(e);s=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}n="disabled"}else if(e instanceof HTMLElement||e instanceof SVGElement){let t="userSelect"in e.style?"userSelect":"webkitUserSelect";l.set(e,e.style[t]),e.style[t]="none"}}function d(e){if(c.isIOS()){if(n!=="disabled")return;n="restoring",setTimeout(()=>{r.runAfterTransition(()=>{if(n==="restoring"){const t=o.getOwnerDocument(e);t.documentElement.style.webkitUserSelect==="none"&&(t.documentElement.style.webkitUserSelect=s||""),s="",n="default"}})},300)}else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&l.has(e)){let t=l.get(e),i="userSelect"in e.style?"userSelect":"webkitUserSelect";e.style[i]==="none"&&(e.style[i]=t),e.getAttribute("style")===""&&e.removeAttribute("style"),l.delete(e)}}exports.disableTextSelection=u;exports.restoreTextSelection=d;
|
package/index330.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { getOwnerDocument as i } from "./
|
|
2
|
-
import { runAfterTransition as f } from "./
|
|
3
|
-
import { isIOS as o } from "./
|
|
1
|
+
import { getOwnerDocument as i } from "./index257.mjs";
|
|
2
|
+
import { runAfterTransition as f } from "./index262.mjs";
|
|
3
|
+
import { isIOS as o } from "./index243.mjs";
|
|
4
4
|
let l = "default", s = "", n = /* @__PURE__ */ new WeakMap();
|
|
5
5
|
function m(e) {
|
|
6
6
|
if (o()) {
|
package/index333.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("./index253.js"),f=require("./index257.js"),m=require("./index154.js"),L=require("./index260.js"),y=require("./index263.js"),D=require("./index268.js"),T=require("react"),h=500;function v(c){let{isDisabled:s,onLongPressStart:n,onLongPressEnd:o,onLongPress:r,threshold:l=h,accessibilityDescription:p}=c;const t=T.useRef(void 0);let{addGlobalListener:i,removeGlobalListener:a}=y.useGlobalListeners(),{pressProps:d}=b.usePress({isDisabled:s,onPressStart(e){if(e.continuePropagation(),(e.pointerType==="mouse"||e.pointerType==="touch")&&(n&&n({...e,type:"longpressstart"}),t.current=setTimeout(()=>{e.target.dispatchEvent(new PointerEvent("pointercancel",{bubbles:!0})),f.getOwnerDocument(e.target).activeElement!==e.target&&L.focusWithoutScrolling(e.target),r&&r({...e,type:"longpress"}),t.current=void 0},l),e.pointerType==="touch")){let u=P=>{P.preventDefault()};i(e.target,"contextmenu",u,{once:!0}),i(window,"pointerup",()=>{setTimeout(()=>{a(e.target,"contextmenu",u)},30)},{once:!0})}},onPressEnd(e){t.current&&clearTimeout(t.current),o&&(e.pointerType==="mouse"||e.pointerType==="touch")&&o({...e,type:"longpressend"})}}),g=D.useDescription(r&&!s?p:void 0);return{longPressProps:m.mergeProps(d,g)}}exports.useLongPress=v;
|
package/index333.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { usePress as $ } from "./
|
|
2
|
-
import { getOwnerDocument as b } from "./
|
|
1
|
+
import { usePress as $ } from "./index253.mjs";
|
|
2
|
+
import { getOwnerDocument as b } from "./index257.mjs";
|
|
3
3
|
import { mergeProps as g } from "./index154.mjs";
|
|
4
|
-
import { focusWithoutScrolling as P } from "./
|
|
5
|
-
import { useGlobalListeners as L } from "./
|
|
6
|
-
import { useDescription as x } from "./
|
|
4
|
+
import { focusWithoutScrolling as P } from "./index260.mjs";
|
|
5
|
+
import { useGlobalListeners as L } from "./index263.mjs";
|
|
6
|
+
import { useDescription as x } from "./index268.mjs";
|
|
7
7
|
import { useRef as y } from "react";
|
|
8
8
|
const D = 500;
|
|
9
9
|
function R(p) {
|
package/index334.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("./index335.js"),d=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("./index335.js"),d=require("./index325.js"),P=require("./index328.js"),n=require("./index154.js"),x=require("./index265.js"),r=require("react");let a=r.createContext(null);function y(e){let t=r.useContext(a)||{};x.useSyncRef(t,e);let{ref:u,...o}=t;return o}function $(e,t){let{focusProps:u}=d.useFocus(e),{keyboardProps:o}=P.useKeyboard(e),f=n.mergeProps(u,o),l=y(t),i=e.isDisabled?{}:l,s=r.useRef(e.autoFocus);r.useEffect(()=>{s.current&&t.current&&b.focusSafely(t.current),s.current=!1},[t]);let c=e.excludeFromTabOrder?-1:0;return e.isDisabled&&(c=void 0),{focusableProps:n.mergeProps({...f,tabIndex:c},i)}}exports.FocusableContext=a;exports.useFocusable=$;
|
package/index334.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { focusSafely as d } from "./index335.mjs";
|
|
2
|
-
import { useFocus as n } from "./
|
|
2
|
+
import { useFocus as n } from "./index325.mjs";
|
|
3
3
|
import { useKeyboard as $ } from "./index328.mjs";
|
|
4
4
|
import { mergeProps as c } from "./index154.mjs";
|
|
5
|
-
import { useSyncRef as l } from "./
|
|
5
|
+
import { useSyncRef as l } from "./index265.mjs";
|
|
6
6
|
import i, { useRef as x, useEffect as p, useContext as m } from "react";
|
|
7
7
|
let P = /* @__PURE__ */ i.createContext(null);
|
|
8
8
|
function F(e) {
|
package/index335.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index327.js"),o=require("./index256.js"),u=require("./index257.js"),i=require("./index260.js"),s=require("./index262.js");function l(e){const t=u.getOwnerDocument(e),n=o.getActiveElement(t);if(r.getInteractionModality()==="virtual"){let c=n;s.runAfterTransition(()=>{o.getActiveElement(t)===c&&e.isConnected&&i.focusWithoutScrolling(e)})}else i.focusWithoutScrolling(e)}exports.focusSafely=l;
|
package/index335.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { getInteractionModality as a } from "./
|
|
2
|
-
import { getActiveElement as o } from "./
|
|
3
|
-
import { getOwnerDocument as i } from "./
|
|
4
|
-
import { focusWithoutScrolling as f } from "./
|
|
5
|
-
import { runAfterTransition as $ } from "./
|
|
1
|
+
import { getInteractionModality as a } from "./index327.mjs";
|
|
2
|
+
import { getActiveElement as o } from "./index256.mjs";
|
|
3
|
+
import { getOwnerDocument as i } from "./index257.mjs";
|
|
4
|
+
import { focusWithoutScrolling as f } from "./index260.mjs";
|
|
5
|
+
import { runAfterTransition as $ } from "./index262.mjs";
|
|
6
6
|
function p(e) {
|
|
7
7
|
const t = i(e), c = o(t);
|
|
8
8
|
if (a() === "virtual") {
|
package/index336.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index181.js"),i=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index181.js"),i=require("./index243.js");function u(e){return i.isAppleDevice()?e.altKey:e.ctrlKey}function a(e,t){var o,f;let r=`[data-key="${CSS.escape(String(t))}"]`,n=(o=e.current)===null||o===void 0?void 0:o.dataset.collection;return n&&(r=`[data-collection="${CSS.escape(n)}"]${r}`),(f=e.current)===null||f===void 0?void 0:f.querySelector(r)}const c=new WeakMap;function d(e){let t=l.useId();return c.set(e,t),t}function $(e){return c.get(e)}exports.getCollectionId=$;exports.getItemElement=a;exports.isNonContiguousSelectionModifier=u;exports.useCollectionId=d;
|
package/index336.mjs
CHANGED
package/index340.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("./index346.js"),F=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("./index346.js"),F=require("./index251.js"),t=require("react");function M(e,o){if(e.size!==o.size)return!1;for(let c of e)if(!o.has(c))return!1;return!0}function R(e){let{selectionMode:o="none",disallowEmptySelection:c=!1,allowDuplicateSelectionEvents:K,selectionBehavior:s="toggle",disabledBehavior:b="all"}=e,r=t.useRef(!1),[,v]=t.useState(!1),u=t.useRef(null),a=t.useRef(null),[,h]=t.useState(null),g=t.useMemo(()=>S(e.selectedKeys),[e.selectedKeys]),w=t.useMemo(()=>S(e.defaultSelectedKeys,new y.Selection),[e.defaultSelectedKeys]),[i,B]=F.useControlledState(g,w,e.onSelectionChange),$=t.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),[d,n]=t.useState(s);s==="replace"&&d==="toggle"&&typeof i=="object"&&i.size===0&&n("replace");let f=t.useRef(s);return t.useEffect(()=>{s!==f.current&&(n(s),f.current=s)},[s]),{selectionMode:o,disallowEmptySelection:c,selectionBehavior:d,setSelectionBehavior:n,get isFocused(){return r.current},setFocused(l){r.current=l,v(l)},get focusedKey(){return u.current},get childFocusStrategy(){return a.current},setFocusedKey(l,m="first"){u.current=l,a.current=m,h(l)},selectedKeys:i,setSelectedKeys(l){(K||!M(l,i))&&B(l)},disabledKeys:$,disabledBehavior:b}}function S(e,o){return e?e==="all"?"all":new y.Selection(e):o}exports.useMultipleSelectionState=R;
|
package/index340.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Selection as K } from "./index346.mjs";
|
|
2
|
-
import { useControlledState as M } from "./
|
|
2
|
+
import { useControlledState as M } from "./index251.mjs";
|
|
3
3
|
import { useRef as a, useState as r, useMemo as n, useEffect as x } from "react";
|
|
4
4
|
function R(e, s) {
|
|
5
5
|
if (e.size !== s.size) return !1;
|
package/index8.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("react/jsx-runtime"),T=require("react"),b=require("react-aria"),j=require("./index88.js"),N=require("./index6.js"),A=require("./index23.js"),C=k=>{const{sharingLinksList:f,id:w,isOpen:
|
|
2
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("react/jsx-runtime"),T=require("react"),b=require("react-aria"),j=require("./index88.js"),N=require("./index6.js"),A=require("./index23.js"),C=k=>{const{sharingLinksList:f,id:w,isOpen:h,setIsOpen:x,onShare:d,themeName:c="shareButton",tokens:i,customTheme:l}=k,y=j(`${c}.linksList`,{...i,isOpen:h},l),e=b.useFocusManager(),m=s=>{s.key==="Escape"&&x(!1);const{listDirection:u}=i??{};u==="row"&&(s.key==="ArrowRight"&&(e==null||e.focusNext({wrap:!0}),s.preventDefault()),s.key==="ArrowLeft"&&(e==null||e.focusPrevious({wrap:!0}),s.preventDefault())),u==="column"&&(s.key==="ArrowDown"&&(e==null||e.focusNext({wrap:!0}),s.preventDefault()),s.key==="ArrowUp"&&(e==null||e.focusPrevious({wrap:!0}),s.preventDefault()))};return a.jsx("div",{className:y,id:w,role:"listbox",tabIndex:-1,onKeyDown:m,children:f==null?void 0:f.map(s=>{const{ariaLabel:u,onClick:p,href:t,icon:r,key:n}=s;return a.jsx(N.default,{themeName:`${c}.link`,tokens:{...i,isOpen:h},handlePress:()=>{d==null||d(n),p==null||p(n)},"aria-label":u,...t?{href:t,rel:"noopener noreferrer",target:"_blank",as:"a"}:{},role:"option",children:a.jsx(A,{themeName:`${c}.linkIcons`,icon:r})},n)})})},$=k=>{const{ariaLabel:f,icon:w,id:h,sharingLinksList:x,onShare:d,customTheme:c,themeName:i="shareButton",tokens:l,...y}=k,[e,m]=T.useState(!1),s=j(`${i}.container`,l,c),u=t=>{m(!e),!e&&setTimeout(()=>{var n,o;const r=(o=(n=t.target.parentElement)==null?void 0:n.lastChild)==null?void 0:o.firstChild;r==null||r.focus()})},p=t=>{const r=t.currentTarget.firstChild,n=t.currentTarget.lastChild,o=n.firstChild,D=n.lastChild,{listDirection:v}=l??{};v==="row"&&(t.key==="ArrowRight"&&t.target===r&&(o==null||o.focus(),t.preventDefault()),t.key==="ArrowLeft"&&t.target===r&&(D.focus(),t.preventDefault())),v==="column"&&(t.key==="ArrowDown"&&t.target===r&&(o==null||o.focus(),t.preventDefault()),t.key==="ArrowUp"&&t.target===r&&(D.focus(),t.preventDefault())),t.key==="Escape"&&(m(!1),r==null||r.focus()),document.activeElement===n&&(r==null||r.focus())};return a.jsx(b.FocusScope,{autoFocus:!0,restoreFocus:!0,contain:e,children:a.jsxs("div",{className:s,onKeyDown:p,children:[a.jsx(N.ButtonWithForwardRef,{themeName:`${i}.button`,tokens:{...l,isOpen:e},"aria-label":f,"aria-haspopup":"listbox","aria-expanded":e,...e&&{"aria-controls":h},handlePress:u,...y,children:a.jsx(A,{themeName:`${i}.icon`,icon:w??"Share"})}),e&&a.jsx(C,{id:h,sharingLinksList:x,onShare:d,isOpen:e,setIsOpen:m,themeName:i,customTheme:c,tokens:l})]})})};exports.IconsContainer=C;exports.default=$;
|
package/index8.mjs
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
2
|
+
import { jsx as a, jsxs as C } from "react/jsx-runtime";
|
|
3
3
|
import { useState as A } from "react";
|
|
4
4
|
import { FocusScope as T, useFocusManager as I } from "react-aria";
|
|
5
|
-
import
|
|
5
|
+
import N from "./index88.mjs";
|
|
6
6
|
import K, { ButtonWithForwardRef as L } from "./index6.mjs";
|
|
7
|
-
import
|
|
7
|
+
import b from "./index23.mjs";
|
|
8
8
|
const $ = (w) => {
|
|
9
|
-
const { sharingLinksList: f, id: k, isOpen:
|
|
10
|
-
return /* @__PURE__ */
|
|
11
|
-
|
|
12
|
-
const { listDirection: u } =
|
|
13
|
-
u === "row" && (
|
|
14
|
-
}, children: f == null ? void 0 : f.map((
|
|
15
|
-
const { ariaLabel: u, onClick: d, href: t, icon:
|
|
16
|
-
return /* @__PURE__ */
|
|
9
|
+
const { sharingLinksList: f, id: k, isOpen: m, setIsOpen: D, onShare: h, themeName: l = "shareButton", tokens: i, customTheme: c } = w, y = N(`${l}.linksList`, { ...i, isOpen: m }, c), e = I();
|
|
10
|
+
return /* @__PURE__ */ a("div", { className: y, id: k, role: "listbox", tabIndex: -1, onKeyDown: (r) => {
|
|
11
|
+
r.key === "Escape" && D(!1);
|
|
12
|
+
const { listDirection: u } = i ?? {};
|
|
13
|
+
u === "row" && (r.key === "ArrowRight" && (e == null || e.focusNext({ wrap: !0 }), r.preventDefault()), r.key === "ArrowLeft" && (e == null || e.focusPrevious({ wrap: !0 }), r.preventDefault())), u === "column" && (r.key === "ArrowDown" && (e == null || e.focusNext({ wrap: !0 }), r.preventDefault()), r.key === "ArrowUp" && (e == null || e.focusPrevious({ wrap: !0 }), r.preventDefault()));
|
|
14
|
+
}, children: f == null ? void 0 : f.map((r) => {
|
|
15
|
+
const { ariaLabel: u, onClick: d, href: t, icon: o, key: n } = r;
|
|
16
|
+
return /* @__PURE__ */ a(
|
|
17
17
|
K,
|
|
18
18
|
{
|
|
19
19
|
themeName: `${l}.link`,
|
|
20
|
-
tokens: { ...
|
|
20
|
+
tokens: { ...i, isOpen: m },
|
|
21
21
|
handlePress: () => {
|
|
22
|
-
|
|
22
|
+
h == null || h(n), d == null || d(n);
|
|
23
23
|
},
|
|
24
24
|
"aria-label": u,
|
|
25
25
|
...t ? { href: t, rel: "noopener noreferrer", target: "_blank", as: "a" } : {},
|
|
26
26
|
role: "option",
|
|
27
|
-
children: /* @__PURE__ */
|
|
27
|
+
children: /* @__PURE__ */ a(b, { themeName: `${l}.linkIcons`, icon: o })
|
|
28
28
|
},
|
|
29
29
|
n
|
|
30
30
|
);
|
|
@@ -33,47 +33,47 @@ const $ = (w) => {
|
|
|
33
33
|
const {
|
|
34
34
|
ariaLabel: f,
|
|
35
35
|
icon: k,
|
|
36
|
-
id:
|
|
36
|
+
id: m,
|
|
37
37
|
sharingLinksList: D,
|
|
38
|
-
onShare:
|
|
38
|
+
onShare: h,
|
|
39
39
|
customTheme: l,
|
|
40
|
-
themeName:
|
|
40
|
+
themeName: i = "shareButton",
|
|
41
41
|
tokens: c,
|
|
42
42
|
...y
|
|
43
|
-
} = w, [e, p] = A(!1),
|
|
43
|
+
} = w, [e, p] = A(!1), r = N(`${i}.container`, c, l), u = (t) => {
|
|
44
44
|
p(!e), !e && setTimeout(() => {
|
|
45
45
|
var n, s;
|
|
46
|
-
const
|
|
47
|
-
|
|
46
|
+
const o = (s = (n = t.target.parentElement) == null ? void 0 : n.lastChild) == null ? void 0 : s.firstChild;
|
|
47
|
+
o == null || o.focus();
|
|
48
48
|
});
|
|
49
49
|
};
|
|
50
|
-
return /* @__PURE__ */
|
|
51
|
-
const
|
|
52
|
-
x === "row" && (t.key === "ArrowRight" && t.target ===
|
|
50
|
+
return /* @__PURE__ */ a(T, { autoFocus: !0, restoreFocus: !0, contain: e, children: /* @__PURE__ */ C("div", { className: r, onKeyDown: (t) => {
|
|
51
|
+
const o = t.currentTarget.firstChild, n = t.currentTarget.lastChild, s = n.firstChild, v = n.lastChild, { listDirection: x } = c ?? {};
|
|
52
|
+
x === "row" && (t.key === "ArrowRight" && t.target === o && (s == null || s.focus(), t.preventDefault()), t.key === "ArrowLeft" && t.target === o && (v.focus(), t.preventDefault())), x === "column" && (t.key === "ArrowDown" && t.target === o && (s == null || s.focus(), t.preventDefault()), t.key === "ArrowUp" && t.target === o && (v.focus(), t.preventDefault())), t.key === "Escape" && (p(!1), o == null || o.focus()), document.activeElement === n && (o == null || o.focus());
|
|
53
53
|
}, children: [
|
|
54
|
-
/* @__PURE__ */
|
|
54
|
+
/* @__PURE__ */ a(
|
|
55
55
|
L,
|
|
56
56
|
{
|
|
57
|
-
themeName: `${
|
|
57
|
+
themeName: `${i}.button`,
|
|
58
58
|
tokens: { ...c, isOpen: e },
|
|
59
59
|
"aria-label": f,
|
|
60
60
|
"aria-haspopup": "listbox",
|
|
61
|
-
"aria-expanded": e
|
|
62
|
-
"aria-controls":
|
|
61
|
+
"aria-expanded": e,
|
|
62
|
+
...e && { "aria-controls": m },
|
|
63
63
|
handlePress: u,
|
|
64
64
|
...y,
|
|
65
|
-
children: /* @__PURE__ */
|
|
65
|
+
children: /* @__PURE__ */ a(b, { themeName: `${i}.icon`, icon: k ?? "Share" })
|
|
66
66
|
}
|
|
67
67
|
),
|
|
68
|
-
e && /* @__PURE__ */
|
|
68
|
+
e && /* @__PURE__ */ a(
|
|
69
69
|
$,
|
|
70
70
|
{
|
|
71
|
-
id:
|
|
71
|
+
id: m,
|
|
72
72
|
sharingLinksList: D,
|
|
73
|
-
onShare:
|
|
73
|
+
onShare: h,
|
|
74
74
|
isOpen: e,
|
|
75
75
|
setIsOpen: p,
|
|
76
|
-
themeName:
|
|
76
|
+
themeName: i,
|
|
77
77
|
customTheme: l,
|
|
78
78
|
tokens: c
|
|
79
79
|
}
|