@pibit.ai/cure-design-system 0.5.6 → 0.5.8
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/applications/date-picker/calendar.d.ts +42 -0
- package/dist/applications/date-picker/calendar.d.ts.map +1 -0
- package/dist/applications/date-picker/calendar.js +310 -0
- package/dist/applications/date-picker/cell.d.ts +15 -0
- package/dist/applications/date-picker/cell.d.ts.map +1 -0
- package/dist/applications/date-picker/cell.js +90 -0
- package/dist/applications/date-picker/date-input.d.ts +7 -0
- package/dist/applications/date-picker/date-input.d.ts.map +1 -0
- package/dist/applications/date-picker/date-input.js +39 -0
- package/dist/applications/date-picker/date-picker.d.ts +47 -0
- package/dist/applications/date-picker/date-picker.d.ts.map +1 -0
- package/dist/applications/date-picker/date-picker.js +237 -0
- package/dist/applications/date-picker/date-range-picker.d.ts +44 -0
- package/dist/applications/date-picker/date-range-picker.d.ts.map +1 -0
- package/dist/applications/date-picker/date-range-picker.js +335 -0
- package/dist/applications/date-picker/date-range-presets.d.ts +50 -0
- package/dist/applications/date-picker/date-range-presets.d.ts.map +1 -0
- package/dist/applications/date-picker/date-range-presets.js +86 -0
- package/dist/applications/date-picker/date-time-calendar.d.ts +34 -0
- package/dist/applications/date-picker/date-time-calendar.d.ts.map +1 -0
- package/dist/applications/date-picker/date-time-calendar.js +140 -0
- package/dist/applications/date-picker/index.d.ts +12 -0
- package/dist/applications/date-picker/index.d.ts.map +1 -0
- package/dist/applications/date-picker/index.js +36 -0
- package/dist/applications/date-picker/range-calendar.d.ts +23 -0
- package/dist/applications/date-picker/range-calendar.d.ts.map +1 -0
- package/dist/applications/date-picker/range-calendar.js +210 -0
- package/dist/applications/date-picker/range-preset.d.ts +10 -0
- package/dist/applications/date-picker/range-preset.d.ts.map +1 -0
- package/dist/applications/date-picker/range-preset.js +27 -0
- package/dist/applications/date-picker/styles.d.ts +8 -0
- package/dist/applications/date-picker/styles.d.ts.map +1 -0
- package/dist/applications/date-picker/styles.js +14 -0
- package/dist/applications/date-picker/time-field.d.ts +7 -0
- package/dist/applications/date-picker/time-field.d.ts.map +1 -0
- package/dist/applications/date-picker/time-field.js +116 -0
- package/dist/applications/date-picker/time-list.d.ts +23 -0
- package/dist/applications/date-picker/time-list.d.ts.map +1 -0
- package/dist/applications/date-picker/time-list.js +89 -0
- package/dist/hooks/use-breakpoint.d.ts +10 -0
- package/dist/hooks/use-breakpoint.d.ts.map +1 -0
- package/dist/hooks/use-breakpoint.js +21 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +331 -304
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.js +6 -6
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.js +6 -6
- package/dist/primitives/select/ExpandableSearchInput.d.ts +1 -1
- package/dist/primitives/select/ExpandableSearchInput.d.ts.map +1 -1
- package/dist/primitives/select/ExpandableSearchInput.js +23 -23
- package/dist/primitives/select/SearchInput.d.ts +15 -2
- package/dist/primitives/select/SearchInput.d.ts.map +1 -1
- package/dist/primitives/select/SearchInput.js +128 -114
- package/dist/primitives/select/index.d.ts +1 -0
- package/dist/primitives/select/index.d.ts.map +1 -1
- package/dist/primitives/select/multi-select.js +81 -82
- package/dist/primitives/select/select.d.ts +4 -0
- package/dist/primitives/select/select.d.ts.map +1 -1
- package/dist/primitives/select/select.js +40 -21
- package/dist/styles/components.css +1 -1
- package/package.json +8 -1
- package/dist/node_modules/@react-aria/focus/dist/FocusScope.js +0 -442
- package/dist/node_modules/@react-aria/i18n/dist/context.js +0 -10
- package/dist/node_modules/@react-aria/i18n/dist/useCollator.js +0 -11
- package/dist/node_modules/@react-aria/i18n/dist/useDefaultLocale.js +0 -36
- package/dist/node_modules/@react-aria/i18n/dist/useFilter.js +0 -35
- package/dist/node_modules/@react-aria/i18n/dist/utils.js +0 -44
- package/dist/node_modules/@react-aria/interactions/dist/focusSafely.js +0 -18
- package/dist/node_modules/@react-aria/interactions/dist/useFocusVisible.js +0 -62
- package/dist/node_modules/@react-aria/interactions/dist/utils.js +0 -5
- package/dist/node_modules/@react-aria/ssr/dist/SSRProvider.js +0 -49
- package/dist/node_modules/@react-aria/utils/dist/DOMFunctions.js +0 -27
- package/dist/node_modules/@react-aria/utils/dist/ShadowTreeWalker.js +0 -130
- package/dist/node_modules/@react-aria/utils/dist/domHelpers.js +0 -15
- package/dist/node_modules/@react-aria/utils/dist/focusWithoutScrolling.js +0 -45
- package/dist/node_modules/@react-aria/utils/dist/isElementVisible.js +0 -25
- package/dist/node_modules/@react-aria/utils/dist/isFocusable.js +0 -37
- package/dist/node_modules/@react-aria/utils/dist/isVirtualEvent.js +0 -7
- package/dist/node_modules/@react-aria/utils/dist/openLink.js +0 -28
- package/dist/node_modules/@react-aria/utils/dist/platform.js +0 -47
- package/dist/node_modules/@react-aria/utils/dist/runAfterTransition.js +0 -35
- package/dist/node_modules/@react-aria/utils/dist/useLayoutEffect.js +0 -6
- package/dist/node_modules/@react-stately/flags/dist/import.js +0 -7
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { ignoreFocusEvent as L } from "./utils.js";
|
|
2
|
-
import { getOwnerDocument as c, getOwnerWindow as s } from "../../utils/dist/domHelpers.js";
|
|
3
|
-
import { openLink as p } from "../../utils/dist/openLink.js";
|
|
4
|
-
import { isMac as y } from "../../utils/dist/platform.js";
|
|
5
|
-
import { isVirtualClick as w } from "../../utils/dist/isVirtualEvent.js";
|
|
6
|
-
import "react";
|
|
7
|
-
let f = null, g = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Map(), a = !1, u = !1;
|
|
8
|
-
function v(e, n) {
|
|
9
|
-
for (let t of g) t(e, n);
|
|
10
|
-
}
|
|
11
|
-
function k(e) {
|
|
12
|
-
return !(e.metaKey || !y() && e.altKey || e.ctrlKey || e.key === "Control" || e.key === "Shift" || e.key === "Meta");
|
|
13
|
-
}
|
|
14
|
-
function d(e) {
|
|
15
|
-
a = !0, !p.isOpening && k(e) && (f = "keyboard", v("keyboard", e));
|
|
16
|
-
}
|
|
17
|
-
function o(e) {
|
|
18
|
-
f = "pointer", "pointerType" in e && e.pointerType, (e.type === "mousedown" || e.type === "pointerdown") && (a = !0, v("pointer", e));
|
|
19
|
-
}
|
|
20
|
-
function b(e) {
|
|
21
|
-
!p.isOpening && w(e) && (a = !0, f = "virtual");
|
|
22
|
-
}
|
|
23
|
-
function l(e) {
|
|
24
|
-
e.target === window || e.target === document || L || !e.isTrusted || (!a && !u && (f = "virtual", v("virtual", e)), a = !1, u = !1);
|
|
25
|
-
}
|
|
26
|
-
function E() {
|
|
27
|
-
a = !1, u = !0;
|
|
28
|
-
}
|
|
29
|
-
function $(e) {
|
|
30
|
-
if (typeof window > "u" || typeof document > "u" || i.get(s(e))) return;
|
|
31
|
-
const n = s(e), t = c(e);
|
|
32
|
-
let r = n.HTMLElement.prototype.focus;
|
|
33
|
-
n.HTMLElement.prototype.focus = function() {
|
|
34
|
-
a = !0, r.apply(this, arguments);
|
|
35
|
-
}, t.addEventListener("keydown", d, !0), t.addEventListener("keyup", d, !0), t.addEventListener("click", b, !0), n.addEventListener("focus", l, !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", () => {
|
|
36
|
-
m(e);
|
|
37
|
-
}, {
|
|
38
|
-
once: !0
|
|
39
|
-
}), i.set(n, {
|
|
40
|
-
focus: r
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
const m = (e, n) => {
|
|
44
|
-
const t = s(e), r = c(e);
|
|
45
|
-
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", b, !0), t.removeEventListener("focus", l, !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));
|
|
46
|
-
};
|
|
47
|
-
function h(e) {
|
|
48
|
-
const n = c(e);
|
|
49
|
-
let t;
|
|
50
|
-
return n.readyState !== "loading" ? $(e) : (t = () => {
|
|
51
|
-
$(e);
|
|
52
|
-
}, n.addEventListener("DOMContentLoaded", t)), () => m(e, t);
|
|
53
|
-
}
|
|
54
|
-
typeof document < "u" && h();
|
|
55
|
-
function F() {
|
|
56
|
-
return f;
|
|
57
|
-
}
|
|
58
|
-
export {
|
|
59
|
-
h as addWindowFocusTracking,
|
|
60
|
-
F as getInteractionModality,
|
|
61
|
-
i as hasSetupGlobalListeners
|
|
62
|
-
};
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import a, { useContext as s, useState as l, useRef as f } from "react";
|
|
2
|
-
const c = {
|
|
3
|
-
prefix: String(Math.round(Math.random() * 1e10)),
|
|
4
|
-
current: 0
|
|
5
|
-
}, $ = /* @__PURE__ */ a.createContext(c), p = /* @__PURE__ */ a.createContext(!1);
|
|
6
|
-
let v = !!(typeof window < "u" && window.document && window.document.createElement), d = /* @__PURE__ */ new WeakMap();
|
|
7
|
-
function S(t = !1) {
|
|
8
|
-
let e = s($), r = f(null);
|
|
9
|
-
if (r.current === null && !t) {
|
|
10
|
-
var n, u;
|
|
11
|
-
let o = (u = a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) === null || u === void 0 || (n = u.ReactCurrentOwner) === null || n === void 0 ? void 0 : n.current;
|
|
12
|
-
if (o) {
|
|
13
|
-
let i = d.get(o);
|
|
14
|
-
i == null ? d.set(o, {
|
|
15
|
-
id: e.current,
|
|
16
|
-
state: o.memoizedState
|
|
17
|
-
}) : o.memoizedState !== i.state && (e.current = i.id, d.delete(o));
|
|
18
|
-
}
|
|
19
|
-
r.current = ++e.current;
|
|
20
|
-
}
|
|
21
|
-
return r.current;
|
|
22
|
-
}
|
|
23
|
-
function x(t) {
|
|
24
|
-
let e = s($);
|
|
25
|
-
e === c && !v && process.env.NODE_ENV !== "production" && console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");
|
|
26
|
-
let r = S(!!t), n = e === c && process.env.NODE_ENV === "test" ? "react-aria" : `react-aria${e.prefix}`;
|
|
27
|
-
return t || `${n}-${r}`;
|
|
28
|
-
}
|
|
29
|
-
function b(t) {
|
|
30
|
-
let e = a.useId(), [r] = l(y()), n = r || process.env.NODE_ENV === "test" ? "react-aria" : `react-aria${c.prefix}`;
|
|
31
|
-
return t || `${n}-${e}`;
|
|
32
|
-
}
|
|
33
|
-
a.useId;
|
|
34
|
-
function m() {
|
|
35
|
-
return !1;
|
|
36
|
-
}
|
|
37
|
-
function w() {
|
|
38
|
-
return !0;
|
|
39
|
-
}
|
|
40
|
-
function g(t) {
|
|
41
|
-
return () => {
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
function y() {
|
|
45
|
-
return typeof a.useSyncExternalStore == "function" ? a.useSyncExternalStore(g, m, w) : s(p);
|
|
46
|
-
}
|
|
47
|
-
export {
|
|
48
|
-
y as useIsSSR
|
|
49
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { isShadowRoot as f } from "./domHelpers.js";
|
|
2
|
-
import { shadowDOM as o } from "../../../@react-stately/flags/dist/import.js";
|
|
3
|
-
function n(t, a) {
|
|
4
|
-
if (!o()) return a && t ? t.contains(a) : !1;
|
|
5
|
-
if (!t || !a) return !1;
|
|
6
|
-
let e = a;
|
|
7
|
-
for (; e !== null; ) {
|
|
8
|
-
if (e === t) return !0;
|
|
9
|
-
e.tagName === "SLOT" && e.assignedSlot ? e = e.assignedSlot.parentNode : f(e) ? e = e.host : e = e.parentNode;
|
|
10
|
-
}
|
|
11
|
-
return !1;
|
|
12
|
-
}
|
|
13
|
-
const s = (t = document) => {
|
|
14
|
-
var a;
|
|
15
|
-
if (!o()) return t.activeElement;
|
|
16
|
-
let e = t.activeElement;
|
|
17
|
-
for (; e && "shadowRoot" in e && (!((a = e.shadowRoot) === null || a === void 0) && a.activeElement); ) e = e.shadowRoot.activeElement;
|
|
18
|
-
return e;
|
|
19
|
-
};
|
|
20
|
-
function d(t) {
|
|
21
|
-
return o() && t.target.shadowRoot && t.composedPath ? t.composedPath()[0] : t.target;
|
|
22
|
-
}
|
|
23
|
-
export {
|
|
24
|
-
s as getActiveElement,
|
|
25
|
-
d as getEventTarget,
|
|
26
|
-
n as nodeContains
|
|
27
|
-
};
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
import { nodeContains as l } from "./DOMFunctions.js";
|
|
2
|
-
import { shadowDOM as h } from "../../../@react-stately/flags/dist/import.js";
|
|
3
|
-
class u {
|
|
4
|
-
get currentNode() {
|
|
5
|
-
return this._currentNode;
|
|
6
|
-
}
|
|
7
|
-
set currentNode(t) {
|
|
8
|
-
if (!l(this.root, t)) throw new Error("Cannot set currentNode to a node that is not contained by the root node.");
|
|
9
|
-
const e = [];
|
|
10
|
-
let r = t, o = t;
|
|
11
|
-
for (this._currentNode = t; r && r !== this.root; ) if (r.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
|
|
12
|
-
const s = r, n = this._doc.createTreeWalker(s, this.whatToShow, {
|
|
13
|
-
acceptNode: this._acceptNode
|
|
14
|
-
});
|
|
15
|
-
e.push(n), n.currentNode = o, this._currentSetFor.add(n), r = o = s.host;
|
|
16
|
-
} else r = r.parentNode;
|
|
17
|
-
const i = this._doc.createTreeWalker(this.root, this.whatToShow, {
|
|
18
|
-
acceptNode: this._acceptNode
|
|
19
|
-
});
|
|
20
|
-
e.push(i), i.currentNode = o, this._currentSetFor.add(i), this._walkerStack = e;
|
|
21
|
-
}
|
|
22
|
-
get doc() {
|
|
23
|
-
return this._doc;
|
|
24
|
-
}
|
|
25
|
-
firstChild() {
|
|
26
|
-
let t = this.currentNode, e = this.nextNode();
|
|
27
|
-
return l(t, e) ? (e && (this.currentNode = e), e) : (this.currentNode = t, null);
|
|
28
|
-
}
|
|
29
|
-
lastChild() {
|
|
30
|
-
let e = this._walkerStack[0].lastChild();
|
|
31
|
-
return e && (this.currentNode = e), e;
|
|
32
|
-
}
|
|
33
|
-
nextNode() {
|
|
34
|
-
const t = this._walkerStack[0].nextNode();
|
|
35
|
-
if (t) {
|
|
36
|
-
if (t.shadowRoot) {
|
|
37
|
-
var e;
|
|
38
|
-
let o;
|
|
39
|
-
if (typeof this.filter == "function" ? o = this.filter(t) : !((e = this.filter) === null || e === void 0) && e.acceptNode && (o = this.filter.acceptNode(t)), o === NodeFilter.FILTER_ACCEPT)
|
|
40
|
-
return this.currentNode = t, t;
|
|
41
|
-
let i = this.nextNode();
|
|
42
|
-
return i && (this.currentNode = i), i;
|
|
43
|
-
}
|
|
44
|
-
return t && (this.currentNode = t), t;
|
|
45
|
-
} else if (this._walkerStack.length > 1) {
|
|
46
|
-
this._walkerStack.shift();
|
|
47
|
-
let r = this.nextNode();
|
|
48
|
-
return r && (this.currentNode = r), r;
|
|
49
|
-
} else return null;
|
|
50
|
-
}
|
|
51
|
-
previousNode() {
|
|
52
|
-
const t = this._walkerStack[0];
|
|
53
|
-
if (t.currentNode === t.root) {
|
|
54
|
-
if (this._currentSetFor.has(t))
|
|
55
|
-
if (this._currentSetFor.delete(t), this._walkerStack.length > 1) {
|
|
56
|
-
this._walkerStack.shift();
|
|
57
|
-
let o = this.previousNode();
|
|
58
|
-
return o && (this.currentNode = o), o;
|
|
59
|
-
} else return null;
|
|
60
|
-
return null;
|
|
61
|
-
}
|
|
62
|
-
const e = t.previousNode();
|
|
63
|
-
if (e) {
|
|
64
|
-
if (e.shadowRoot) {
|
|
65
|
-
var r;
|
|
66
|
-
let i;
|
|
67
|
-
if (typeof this.filter == "function" ? i = this.filter(e) : !((r = this.filter) === null || r === void 0) && r.acceptNode && (i = this.filter.acceptNode(e)), i === NodeFilter.FILTER_ACCEPT)
|
|
68
|
-
return e && (this.currentNode = e), e;
|
|
69
|
-
let s = this.lastChild();
|
|
70
|
-
return s && (this.currentNode = s), s;
|
|
71
|
-
}
|
|
72
|
-
return e && (this.currentNode = e), e;
|
|
73
|
-
} else if (this._walkerStack.length > 1) {
|
|
74
|
-
this._walkerStack.shift();
|
|
75
|
-
let o = this.previousNode();
|
|
76
|
-
return o && (this.currentNode = o), o;
|
|
77
|
-
} else return null;
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* @deprecated
|
|
81
|
-
*/
|
|
82
|
-
nextSibling() {
|
|
83
|
-
return null;
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* @deprecated
|
|
87
|
-
*/
|
|
88
|
-
previousSibling() {
|
|
89
|
-
return null;
|
|
90
|
-
}
|
|
91
|
-
/**
|
|
92
|
-
* @deprecated
|
|
93
|
-
*/
|
|
94
|
-
parentNode() {
|
|
95
|
-
return null;
|
|
96
|
-
}
|
|
97
|
-
constructor(t, e, r, o) {
|
|
98
|
-
this._walkerStack = [], this._currentSetFor = /* @__PURE__ */ new Set(), this._acceptNode = (s) => {
|
|
99
|
-
if (s.nodeType === Node.ELEMENT_NODE) {
|
|
100
|
-
const d = s.shadowRoot;
|
|
101
|
-
if (d) {
|
|
102
|
-
const a = this._doc.createTreeWalker(d, this.whatToShow, {
|
|
103
|
-
acceptNode: this._acceptNode
|
|
104
|
-
});
|
|
105
|
-
return this._walkerStack.unshift(a), NodeFilter.FILTER_ACCEPT;
|
|
106
|
-
} else {
|
|
107
|
-
var n;
|
|
108
|
-
if (typeof this.filter == "function") return this.filter(s);
|
|
109
|
-
if (!((n = this.filter) === null || n === void 0) && n.acceptNode) return this.filter.acceptNode(s);
|
|
110
|
-
if (this.filter === null) return NodeFilter.FILTER_ACCEPT;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
return NodeFilter.FILTER_SKIP;
|
|
114
|
-
}, this._doc = t, this.root = e, this.filter = o ?? null, this.whatToShow = r ?? NodeFilter.SHOW_ALL, this._currentNode = e, this._walkerStack.unshift(t.createTreeWalker(e, r, this._acceptNode));
|
|
115
|
-
const i = e.shadowRoot;
|
|
116
|
-
if (i) {
|
|
117
|
-
const s = this._doc.createTreeWalker(i, this.whatToShow, {
|
|
118
|
-
acceptNode: this._acceptNode
|
|
119
|
-
});
|
|
120
|
-
this._walkerStack.unshift(s);
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
function w(c, t, e, r) {
|
|
125
|
-
return h() ? new u(c, t, e, r) : c.createTreeWalker(t, e, r);
|
|
126
|
-
}
|
|
127
|
-
export {
|
|
128
|
-
u as ShadowTreeWalker,
|
|
129
|
-
w as createShadowTreeWalker
|
|
130
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
const t = (o) => {
|
|
2
|
-
var n;
|
|
3
|
-
return (n = o == null ? void 0 : o.ownerDocument) !== null && n !== void 0 ? n : document;
|
|
4
|
-
}, e = (o) => o && "window" in o && o.window === o ? o : t(o).defaultView || window;
|
|
5
|
-
function d(o) {
|
|
6
|
-
return o !== null && typeof o == "object" && "nodeType" in o && typeof o.nodeType == "number";
|
|
7
|
-
}
|
|
8
|
-
function c(o) {
|
|
9
|
-
return d(o) && o.nodeType === Node.DOCUMENT_FRAGMENT_NODE && "host" in o;
|
|
10
|
-
}
|
|
11
|
-
export {
|
|
12
|
-
t as getOwnerDocument,
|
|
13
|
-
e as getOwnerWindow,
|
|
14
|
-
c as isShadowRoot
|
|
15
|
-
};
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
function f(l) {
|
|
2
|
-
if (c()) l.focus({
|
|
3
|
-
preventScroll: !0
|
|
4
|
-
});
|
|
5
|
-
else {
|
|
6
|
-
let e = n(l);
|
|
7
|
-
l.focus(), s(e);
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
let r = null;
|
|
11
|
-
function c() {
|
|
12
|
-
if (r == null) {
|
|
13
|
-
r = !1;
|
|
14
|
-
try {
|
|
15
|
-
document.createElement("div").focus({
|
|
16
|
-
get preventScroll() {
|
|
17
|
-
return r = !0, !0;
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
} catch {
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
return r;
|
|
24
|
-
}
|
|
25
|
-
function n(l) {
|
|
26
|
-
let e = l.parentNode, o = [], t = document.scrollingElement || document.documentElement;
|
|
27
|
-
for (; e instanceof HTMLElement && e !== t; )
|
|
28
|
-
(e.offsetHeight < e.scrollHeight || e.offsetWidth < e.scrollWidth) && o.push({
|
|
29
|
-
element: e,
|
|
30
|
-
scrollTop: e.scrollTop,
|
|
31
|
-
scrollLeft: e.scrollLeft
|
|
32
|
-
}), e = e.parentNode;
|
|
33
|
-
return t instanceof HTMLElement && o.push({
|
|
34
|
-
element: t,
|
|
35
|
-
scrollTop: t.scrollTop,
|
|
36
|
-
scrollLeft: t.scrollLeft
|
|
37
|
-
}), o;
|
|
38
|
-
}
|
|
39
|
-
function s(l) {
|
|
40
|
-
for (let { element: e, scrollTop: o, scrollLeft: t } of l)
|
|
41
|
-
e.scrollTop = o, e.scrollLeft = t;
|
|
42
|
-
}
|
|
43
|
-
export {
|
|
44
|
-
f as focusWithoutScrolling
|
|
45
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { getOwnerWindow as d } from "./domHelpers.js";
|
|
2
|
-
const c = typeof Element < "u" && "checkVisibility" in Element.prototype;
|
|
3
|
-
function p(i) {
|
|
4
|
-
const t = d(i);
|
|
5
|
-
if (!(i instanceof t.HTMLElement) && !(i instanceof t.SVGElement)) return !1;
|
|
6
|
-
let { display: o, visibility: e } = i.style, a = o !== "none" && e !== "hidden" && e !== "collapse";
|
|
7
|
-
if (a) {
|
|
8
|
-
const { getComputedStyle: r } = i.ownerDocument.defaultView;
|
|
9
|
-
let { display: n, visibility: s } = r(i);
|
|
10
|
-
a = n !== "none" && s !== "hidden" && s !== "collapse";
|
|
11
|
-
}
|
|
12
|
-
return a;
|
|
13
|
-
}
|
|
14
|
-
function u(i, t) {
|
|
15
|
-
return !i.hasAttribute("hidden") && // Ignore HiddenSelect when tree walking.
|
|
16
|
-
!i.hasAttribute("data-react-aria-prevent-focus") && (i.nodeName === "DETAILS" && t && t.nodeName !== "SUMMARY" ? i.hasAttribute("open") : !0);
|
|
17
|
-
}
|
|
18
|
-
function f(i, t) {
|
|
19
|
-
return c ? i.checkVisibility({
|
|
20
|
-
visibilityProperty: !0
|
|
21
|
-
}) && !i.closest("[data-react-aria-prevent-focus]") : i.nodeName !== "#comment" && p(i) && u(i, t) && (!i.parentElement || f(i.parentElement, i));
|
|
22
|
-
}
|
|
23
|
-
export {
|
|
24
|
-
f as isElementVisible
|
|
25
|
-
};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { isElementVisible as n } from "./isElementVisible.js";
|
|
2
|
-
const t = [
|
|
3
|
-
"input:not([disabled]):not([type=hidden])",
|
|
4
|
-
"select:not([disabled])",
|
|
5
|
-
"textarea:not([disabled])",
|
|
6
|
-
"button:not([disabled])",
|
|
7
|
-
"a[href]",
|
|
8
|
-
"area[href]",
|
|
9
|
-
"summary",
|
|
10
|
-
"iframe",
|
|
11
|
-
"object",
|
|
12
|
-
"embed",
|
|
13
|
-
"audio[controls]",
|
|
14
|
-
"video[controls]",
|
|
15
|
-
'[contenteditable]:not([contenteditable^="false"])',
|
|
16
|
-
"permission"
|
|
17
|
-
], o = t.join(":not([hidden]),") + ",[tabindex]:not([disabled]):not([hidden])";
|
|
18
|
-
t.push('[tabindex]:not([tabindex="-1"]):not([disabled])');
|
|
19
|
-
const i = t.join(':not([hidden]):not([tabindex="-1"]),');
|
|
20
|
-
function r(b) {
|
|
21
|
-
return b.matches(o) && n(b) && !a(b);
|
|
22
|
-
}
|
|
23
|
-
function s(b) {
|
|
24
|
-
return b.matches(i) && n(b) && !a(b);
|
|
25
|
-
}
|
|
26
|
-
function a(b) {
|
|
27
|
-
let e = b;
|
|
28
|
-
for (; e != null; ) {
|
|
29
|
-
if (e instanceof e.ownerDocument.defaultView.HTMLElement && e.inert) return !0;
|
|
30
|
-
e = e.parentElement;
|
|
31
|
-
}
|
|
32
|
-
return !1;
|
|
33
|
-
}
|
|
34
|
-
export {
|
|
35
|
-
r as isFocusable,
|
|
36
|
-
s as isTabbable
|
|
37
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { focusWithoutScrolling as f } from "./focusWithoutScrolling.js";
|
|
2
|
-
import { isFirefox as p, isWebKit as K, isMac as l, isIPad as $ } from "./platform.js";
|
|
3
|
-
import "react";
|
|
4
|
-
function o(e, c, d = !0) {
|
|
5
|
-
var t, a;
|
|
6
|
-
let { metaKey: i, ctrlKey: n, altKey: s, shiftKey: r } = c;
|
|
7
|
-
p() && (!((a = window.event) === null || a === void 0 || (t = a.type) === null || t === void 0) && t.startsWith("key")) && e.target === "_blank" && (l() ? i = !0 : n = !0);
|
|
8
|
-
let y = K() && l() && !$() && process.env.NODE_ENV !== "test" ? new KeyboardEvent("keydown", {
|
|
9
|
-
keyIdentifier: "Enter",
|
|
10
|
-
metaKey: i,
|
|
11
|
-
ctrlKey: n,
|
|
12
|
-
altKey: s,
|
|
13
|
-
shiftKey: r
|
|
14
|
-
}) : new MouseEvent("click", {
|
|
15
|
-
metaKey: i,
|
|
16
|
-
ctrlKey: n,
|
|
17
|
-
altKey: s,
|
|
18
|
-
shiftKey: r,
|
|
19
|
-
detail: 1,
|
|
20
|
-
bubbles: !0,
|
|
21
|
-
cancelable: !0
|
|
22
|
-
});
|
|
23
|
-
o.isOpening = d, f(e), e.dispatchEvent(y), o.isOpening = !1;
|
|
24
|
-
}
|
|
25
|
-
o.isOpening = !1;
|
|
26
|
-
export {
|
|
27
|
-
o as openLink
|
|
28
|
-
};
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
function a(t) {
|
|
2
|
-
var n;
|
|
3
|
-
if (typeof window > "u" || window.navigator == null) return !1;
|
|
4
|
-
let o = (n = window.navigator.userAgentData) === null || n === void 0 ? void 0 : n.brands;
|
|
5
|
-
return Array.isArray(o) && o.some((s) => t.test(s.brand)) || t.test(window.navigator.userAgent);
|
|
6
|
-
}
|
|
7
|
-
function r(t) {
|
|
8
|
-
var n;
|
|
9
|
-
return typeof window < "u" && window.navigator != null ? t.test(((n = window.navigator.userAgentData) === null || n === void 0 ? void 0 : n.platform) || window.navigator.platform) : !1;
|
|
10
|
-
}
|
|
11
|
-
function e(t) {
|
|
12
|
-
if (process.env.NODE_ENV === "test") return t;
|
|
13
|
-
let n = null;
|
|
14
|
-
return () => (n == null && (n = t()), n);
|
|
15
|
-
}
|
|
16
|
-
const i = e(function() {
|
|
17
|
-
return r(/^Mac/i);
|
|
18
|
-
}), c = e(function() {
|
|
19
|
-
return r(/^iPhone/i);
|
|
20
|
-
}), u = e(function() {
|
|
21
|
-
return r(/^iPad/i) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
|
|
22
|
-
i() && navigator.maxTouchPoints > 1;
|
|
23
|
-
}), d = e(function() {
|
|
24
|
-
return c() || u();
|
|
25
|
-
});
|
|
26
|
-
e(function() {
|
|
27
|
-
return i() || d();
|
|
28
|
-
});
|
|
29
|
-
const f = e(function() {
|
|
30
|
-
return a(/AppleWebKit/i) && !$();
|
|
31
|
-
}), $ = e(function() {
|
|
32
|
-
return a(/Chrome/i);
|
|
33
|
-
}), l = e(function() {
|
|
34
|
-
return a(/Android/i);
|
|
35
|
-
}), w = e(function() {
|
|
36
|
-
return a(/Firefox/i);
|
|
37
|
-
});
|
|
38
|
-
export {
|
|
39
|
-
l as isAndroid,
|
|
40
|
-
$ as isChrome,
|
|
41
|
-
w as isFirefox,
|
|
42
|
-
d as isIOS,
|
|
43
|
-
u as isIPad,
|
|
44
|
-
c as isIPhone,
|
|
45
|
-
i as isMac,
|
|
46
|
-
f as isWebKit
|
|
47
|
-
};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
let r = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Set();
|
|
2
|
-
function o() {
|
|
3
|
-
if (typeof window > "u") return;
|
|
4
|
-
function t(e) {
|
|
5
|
-
return "propertyName" in e;
|
|
6
|
-
}
|
|
7
|
-
let d = (e) => {
|
|
8
|
-
if (!t(e) || !e.target) return;
|
|
9
|
-
let n = r.get(e.target);
|
|
10
|
-
n || (n = /* @__PURE__ */ new Set(), r.set(e.target, n), e.target.addEventListener("transitioncancel", i, {
|
|
11
|
-
once: !0
|
|
12
|
-
})), n.add(e.propertyName);
|
|
13
|
-
}, i = (e) => {
|
|
14
|
-
if (!t(e) || !e.target) return;
|
|
15
|
-
let n = r.get(e.target);
|
|
16
|
-
if (n && (n.delete(e.propertyName), n.size === 0 && (e.target.removeEventListener("transitioncancel", i), r.delete(e.target)), r.size === 0)) {
|
|
17
|
-
for (let s of a) s();
|
|
18
|
-
a.clear();
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
document.body.addEventListener("transitionrun", d), document.body.addEventListener("transitionend", i);
|
|
22
|
-
}
|
|
23
|
-
typeof document < "u" && (document.readyState !== "loading" ? o() : document.addEventListener("DOMContentLoaded", o));
|
|
24
|
-
function c() {
|
|
25
|
-
for (const [t] of r)
|
|
26
|
-
"isConnected" in t && !t.isConnected && r.delete(t);
|
|
27
|
-
}
|
|
28
|
-
function f(t) {
|
|
29
|
-
requestAnimationFrame(() => {
|
|
30
|
-
c(), r.size === 0 ? t() : a.add(t);
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
export {
|
|
34
|
-
f as runAfterTransition
|
|
35
|
-
};
|