bitboss-ui 0.2.47 → 0.2.48
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/index101.js +3 -3
- package/dist/index103.js +2 -2
- package/dist/index109.js +1 -1
- package/dist/index11.js +2 -2
- package/dist/index111.js +1 -1
- package/dist/index113.js +1 -1
- package/dist/index117.js +1 -1
- package/dist/index119.js +1 -1
- package/dist/index121.js +1 -1
- package/dist/index125.js +1 -1
- package/dist/index126.js +1 -1
- package/dist/index127.js +1 -1
- package/dist/index131.js +2 -2
- package/dist/index15.js +7 -7
- package/dist/index17.js +8 -8
- package/dist/index196.js +2 -2
- package/dist/index196.js.map +1 -1
- package/dist/index197.js +235 -4
- package/dist/index197.js.map +1 -1
- package/dist/index198.js +2 -5
- package/dist/index198.js.map +1 -1
- package/dist/index199.js +4 -16
- package/dist/index199.js.map +1 -1
- package/dist/index200.js +10 -16
- package/dist/index200.js.map +1 -1
- package/dist/index201.js +2 -19
- package/dist/index201.js.map +1 -1
- package/dist/index202.js +2 -20
- package/dist/index202.js.map +1 -1
- package/dist/index203.js +366 -27
- package/dist/index203.js.map +1 -1
- package/dist/index204.js +2 -8
- package/dist/index204.js.map +1 -1
- package/dist/index206.js +373 -2
- package/dist/index206.js.map +1 -1
- package/dist/index207.js +5 -368
- package/dist/index207.js.map +1 -1
- package/dist/index208.js +13 -131
- package/dist/index208.js.map +1 -1
- package/dist/index209.js +16 -2
- package/dist/index209.js.map +1 -1
- package/dist/index21.js +2 -2
- package/dist/index210.js +17 -172
- package/dist/index210.js.map +1 -1
- package/dist/index211.js +20 -23
- package/dist/index211.js.map +1 -1
- package/dist/index212.js +27 -371
- package/dist/index212.js.map +1 -1
- package/dist/index213.js +8 -10
- package/dist/index213.js.map +1 -1
- package/dist/index214.js +1 -1
- package/dist/index215.js +2 -2
- package/dist/index217.js +3 -2
- package/dist/index217.js.map +1 -1
- package/dist/index218.js +3 -3
- package/dist/index218.js.map +1 -1
- package/dist/index219.js +134 -3
- package/dist/index219.js.map +1 -1
- package/dist/index220.js +165 -226
- package/dist/index220.js.map +1 -1
- package/dist/index221.js +23 -2
- package/dist/index221.js.map +1 -1
- package/dist/index223.js +4 -4
- package/dist/index224.js +79 -6
- package/dist/index224.js.map +1 -1
- package/dist/index225.js +6 -17
- package/dist/index225.js.map +1 -1
- package/dist/index226.js +17 -4
- package/dist/index226.js.map +1 -1
- package/dist/index227.js +2 -295
- package/dist/index227.js.map +1 -1
- package/dist/index228.js +4 -6
- package/dist/index228.js.map +1 -1
- package/dist/index229.js +5 -2
- package/dist/index229.js.map +1 -1
- package/dist/index23.js +1 -1
- package/dist/index230.js +69 -2
- package/dist/index230.js.map +1 -1
- package/dist/index231.js +160 -2
- package/dist/index231.js.map +1 -1
- package/dist/index232.js +1 -4
- package/dist/index232.js.map +1 -1
- package/dist/index233.js +2 -2
- package/dist/index234.js +117 -2
- package/dist/index234.js.map +1 -1
- package/dist/index235.js +105 -78
- package/dist/index235.js.map +1 -1
- package/dist/index236.js +295 -2
- package/dist/index236.js.map +1 -1
- package/dist/index237.js +5 -116
- package/dist/index237.js.map +1 -1
- package/dist/index238.js +2 -106
- package/dist/index238.js.map +1 -1
- package/dist/index239.js +2 -160
- package/dist/index239.js.map +1 -1
- package/dist/index240.js +4 -1
- package/dist/index240.js.map +1 -1
- package/dist/index241.js +2 -2
- package/dist/index241.js.map +1 -1
- package/dist/index242.js +2 -69
- package/dist/index242.js.map +1 -1
- package/dist/index243.js +2 -5
- package/dist/index243.js.map +1 -1
- package/dist/index244.js +2 -15
- package/dist/index244.js.map +1 -1
- package/dist/index245.js +219 -430
- package/dist/index245.js.map +1 -1
- package/dist/index246.js +252 -83
- package/dist/index246.js.map +1 -1
- package/dist/index247.js +430 -219
- package/dist/index247.js.map +1 -1
- package/dist/index248.js +83 -252
- package/dist/index248.js.map +1 -1
- package/dist/index249.js +15 -200
- package/dist/index249.js.map +1 -1
- package/dist/index25.js +2 -2
- package/dist/index250.js +200 -2
- package/dist/index250.js.map +1 -1
- package/dist/index254.js +2 -3
- package/dist/index254.js.map +1 -1
- package/dist/index255.js +3 -2
- package/dist/index255.js.map +1 -1
- package/dist/index29.js +3 -3
- package/dist/index31.js +31 -31
- package/dist/index31.js.map +1 -1
- package/dist/index33.js +2 -2
- package/dist/index35.js +2 -2
- package/dist/index47.js +1 -1
- package/dist/index49.js +1 -1
- package/dist/index65.js +3 -3
- package/dist/index69.js +2 -2
- package/dist/index77.js +1 -1
- package/dist/index79.js +2 -2
- package/dist/index81.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index250.js
CHANGED
|
@@ -1,5 +1,203 @@
|
|
|
1
|
-
|
|
1
|
+
/*!
|
|
2
|
+
* tabbable 6.2.0
|
|
3
|
+
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
4
|
+
*/
|
|
5
|
+
var w = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])", "a[href]:not([inert])", "button:not([inert])", "[tabindex]:not(slot):not([inert])", "audio[controls]:not([inert])", "video[controls]:not([inert])", '[contenteditable]:not([contenteditable="false"]):not([inert])', "details>summary:first-of-type:not([inert])", "details:not([inert])"], v = /* @__PURE__ */ w.join(","), T = typeof Element > "u", o = T ? function() {
|
|
6
|
+
} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector, b = !T && Element.prototype.getRootNode ? function(i) {
|
|
7
|
+
var t;
|
|
8
|
+
return i == null || (t = i.getRootNode) === null || t === void 0 ? void 0 : t.call(i);
|
|
9
|
+
} : function(i) {
|
|
10
|
+
return i == null ? void 0 : i.ownerDocument;
|
|
11
|
+
}, h = function i(t, e) {
|
|
12
|
+
var r;
|
|
13
|
+
e === void 0 && (e = !0);
|
|
14
|
+
var a = t == null || (r = t.getAttribute) === null || r === void 0 ? void 0 : r.call(t, "inert"), l = a === "" || a === "true", n = l || e && t && i(t.parentNode);
|
|
15
|
+
return n;
|
|
16
|
+
}, A = function(t) {
|
|
17
|
+
var e, r = t == null || (e = t.getAttribute) === null || e === void 0 ? void 0 : e.call(t, "contenteditable");
|
|
18
|
+
return r === "" || r === "true";
|
|
19
|
+
}, I = function(t, e, r) {
|
|
20
|
+
if (h(t))
|
|
21
|
+
return [];
|
|
22
|
+
var a = Array.prototype.slice.apply(t.querySelectorAll(v));
|
|
23
|
+
return e && o.call(t, v) && a.unshift(t), a = a.filter(r), a;
|
|
24
|
+
}, m = function i(t, e, r) {
|
|
25
|
+
for (var a = [], l = Array.from(t); l.length; ) {
|
|
26
|
+
var n = l.shift();
|
|
27
|
+
if (!h(n, !1))
|
|
28
|
+
if (n.tagName === "SLOT") {
|
|
29
|
+
var u = n.assignedElements(), c = u.length ? u : n.children, s = i(c, !0, r);
|
|
30
|
+
r.flatten ? a.push.apply(a, s) : a.push({
|
|
31
|
+
scopeParent: n,
|
|
32
|
+
candidates: s
|
|
33
|
+
});
|
|
34
|
+
} else {
|
|
35
|
+
var f = o.call(n, v);
|
|
36
|
+
f && r.filter(n) && (e || !t.includes(n)) && a.push(n);
|
|
37
|
+
var d = n.shadowRoot || // check for an undisclosed shadow
|
|
38
|
+
typeof r.getShadowRoot == "function" && r.getShadowRoot(n), E = !h(d, !1) && (!r.shadowRootFilter || r.shadowRootFilter(n));
|
|
39
|
+
if (d && E) {
|
|
40
|
+
var y = i(d === !0 ? n.children : d.children, !0, r);
|
|
41
|
+
r.flatten ? a.push.apply(a, y) : a.push({
|
|
42
|
+
scopeParent: n,
|
|
43
|
+
candidates: y
|
|
44
|
+
});
|
|
45
|
+
} else
|
|
46
|
+
l.unshift.apply(l, n.children);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
return a;
|
|
50
|
+
}, N = function(t) {
|
|
51
|
+
return !isNaN(parseInt(t.getAttribute("tabindex"), 10));
|
|
52
|
+
}, R = function(t) {
|
|
53
|
+
if (!t)
|
|
54
|
+
throw new Error("No node provided");
|
|
55
|
+
return t.tabIndex < 0 && (/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName) || A(t)) && !N(t) ? 0 : t.tabIndex;
|
|
56
|
+
}, x = function(t, e) {
|
|
57
|
+
var r = R(t);
|
|
58
|
+
return r < 0 && e && !N(t) ? 0 : r;
|
|
59
|
+
}, O = function(t, e) {
|
|
60
|
+
return t.tabIndex === e.tabIndex ? t.documentOrder - e.documentOrder : t.tabIndex - e.tabIndex;
|
|
61
|
+
}, C = function(t) {
|
|
62
|
+
return t.tagName === "INPUT";
|
|
63
|
+
}, F = function(t) {
|
|
64
|
+
return C(t) && t.type === "hidden";
|
|
65
|
+
}, D = function(t) {
|
|
66
|
+
var e = t.tagName === "DETAILS" && Array.prototype.slice.apply(t.children).some(function(r) {
|
|
67
|
+
return r.tagName === "SUMMARY";
|
|
68
|
+
});
|
|
69
|
+
return e;
|
|
70
|
+
}, k = function(t, e) {
|
|
71
|
+
for (var r = 0; r < t.length; r++)
|
|
72
|
+
if (t[r].checked && t[r].form === e)
|
|
73
|
+
return t[r];
|
|
74
|
+
}, M = function(t) {
|
|
75
|
+
if (!t.name)
|
|
76
|
+
return !0;
|
|
77
|
+
var e = t.form || b(t), r = function(u) {
|
|
78
|
+
return e.querySelectorAll('input[type="radio"][name="' + u + '"]');
|
|
79
|
+
}, a;
|
|
80
|
+
if (typeof window < "u" && typeof window.CSS < "u" && typeof window.CSS.escape == "function")
|
|
81
|
+
a = r(window.CSS.escape(t.name));
|
|
82
|
+
else
|
|
83
|
+
try {
|
|
84
|
+
a = r(t.name);
|
|
85
|
+
} catch (n) {
|
|
86
|
+
return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s", n.message), !1;
|
|
87
|
+
}
|
|
88
|
+
var l = k(a, t.form);
|
|
89
|
+
return !l || l === t;
|
|
90
|
+
}, L = function(t) {
|
|
91
|
+
return C(t) && t.type === "radio";
|
|
92
|
+
}, P = function(t) {
|
|
93
|
+
return L(t) && !M(t);
|
|
94
|
+
}, B = function(t) {
|
|
95
|
+
var e, r = t && b(t), a = (e = r) === null || e === void 0 ? void 0 : e.host, l = !1;
|
|
96
|
+
if (r && r !== t) {
|
|
97
|
+
var n, u, c;
|
|
98
|
+
for (l = !!((n = a) !== null && n !== void 0 && (u = n.ownerDocument) !== null && u !== void 0 && u.contains(a) || t != null && (c = t.ownerDocument) !== null && c !== void 0 && c.contains(t)); !l && a; ) {
|
|
99
|
+
var s, f, d;
|
|
100
|
+
r = b(a), a = (s = r) === null || s === void 0 ? void 0 : s.host, l = !!((f = a) !== null && f !== void 0 && (d = f.ownerDocument) !== null && d !== void 0 && d.contains(a));
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
return l;
|
|
104
|
+
}, p = function(t) {
|
|
105
|
+
var e = t.getBoundingClientRect(), r = e.width, a = e.height;
|
|
106
|
+
return r === 0 && a === 0;
|
|
107
|
+
}, q = function(t, e) {
|
|
108
|
+
var r = e.displayCheck, a = e.getShadowRoot;
|
|
109
|
+
if (getComputedStyle(t).visibility === "hidden")
|
|
110
|
+
return !0;
|
|
111
|
+
var l = o.call(t, "details>summary:first-of-type"), n = l ? t.parentElement : t;
|
|
112
|
+
if (o.call(n, "details:not([open]) *"))
|
|
113
|
+
return !0;
|
|
114
|
+
if (!r || r === "full" || r === "legacy-full") {
|
|
115
|
+
if (typeof a == "function") {
|
|
116
|
+
for (var u = t; t; ) {
|
|
117
|
+
var c = t.parentElement, s = b(t);
|
|
118
|
+
if (c && !c.shadowRoot && a(c) === !0)
|
|
119
|
+
return p(t);
|
|
120
|
+
t.assignedSlot ? t = t.assignedSlot : !c && s !== t.ownerDocument ? t = s.host : t = c;
|
|
121
|
+
}
|
|
122
|
+
t = u;
|
|
123
|
+
}
|
|
124
|
+
if (B(t))
|
|
125
|
+
return !t.getClientRects().length;
|
|
126
|
+
if (r !== "legacy-full")
|
|
127
|
+
return !0;
|
|
128
|
+
} else if (r === "non-zero-area")
|
|
129
|
+
return p(t);
|
|
130
|
+
return !1;
|
|
131
|
+
}, U = function(t) {
|
|
132
|
+
if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))
|
|
133
|
+
for (var e = t.parentElement; e; ) {
|
|
134
|
+
if (e.tagName === "FIELDSET" && e.disabled) {
|
|
135
|
+
for (var r = 0; r < e.children.length; r++) {
|
|
136
|
+
var a = e.children.item(r);
|
|
137
|
+
if (a.tagName === "LEGEND")
|
|
138
|
+
return o.call(e, "fieldset[disabled] *") ? !0 : !a.contains(t);
|
|
139
|
+
}
|
|
140
|
+
return !0;
|
|
141
|
+
}
|
|
142
|
+
e = e.parentElement;
|
|
143
|
+
}
|
|
144
|
+
return !1;
|
|
145
|
+
}, g = function(t, e) {
|
|
146
|
+
return !(e.disabled || // we must do an inert look up to filter out any elements inside an inert ancestor
|
|
147
|
+
// because we're limited in the type of selectors we can use in JSDom (see related
|
|
148
|
+
// note related to `candidateSelectors`)
|
|
149
|
+
h(e) || F(e) || q(e, t) || // For a details element with a summary, the summary element gets the focus
|
|
150
|
+
D(e) || U(e));
|
|
151
|
+
}, S = function(t, e) {
|
|
152
|
+
return !(P(e) || R(e) < 0 || !g(t, e));
|
|
153
|
+
}, V = function(t) {
|
|
154
|
+
var e = parseInt(t.getAttribute("tabindex"), 10);
|
|
155
|
+
return !!(isNaN(e) || e >= 0);
|
|
156
|
+
}, j = function i(t) {
|
|
157
|
+
var e = [], r = [];
|
|
158
|
+
return t.forEach(function(a, l) {
|
|
159
|
+
var n = !!a.scopeParent, u = n ? a.scopeParent : a, c = x(u, n), s = n ? i(a.candidates) : u;
|
|
160
|
+
c === 0 ? n ? e.push.apply(e, s) : e.push(u) : r.push({
|
|
161
|
+
documentOrder: l,
|
|
162
|
+
tabIndex: c,
|
|
163
|
+
item: a,
|
|
164
|
+
isScope: n,
|
|
165
|
+
content: s
|
|
166
|
+
});
|
|
167
|
+
}), r.sort(O).reduce(function(a, l) {
|
|
168
|
+
return l.isScope ? a.push.apply(a, l.content) : a.push(l.content), a;
|
|
169
|
+
}, []).concat(e);
|
|
170
|
+
}, Z = function(t, e) {
|
|
171
|
+
e = e || {};
|
|
172
|
+
var r;
|
|
173
|
+
return e.getShadowRoot ? r = m([t], e.includeContainer, {
|
|
174
|
+
filter: S.bind(null, e),
|
|
175
|
+
flatten: !1,
|
|
176
|
+
getShadowRoot: e.getShadowRoot,
|
|
177
|
+
shadowRootFilter: V
|
|
178
|
+
}) : r = I(t, e.includeContainer, S.bind(null, e)), j(r);
|
|
179
|
+
}, z = function(t, e) {
|
|
180
|
+
e = e || {};
|
|
181
|
+
var r;
|
|
182
|
+
return e.getShadowRoot ? r = m([t], e.includeContainer, {
|
|
183
|
+
filter: g.bind(null, e),
|
|
184
|
+
flatten: !0,
|
|
185
|
+
getShadowRoot: e.getShadowRoot
|
|
186
|
+
}) : r = I(t, e.includeContainer, g.bind(null, e)), r;
|
|
187
|
+
}, G = function(t, e) {
|
|
188
|
+
if (e = e || {}, !t)
|
|
189
|
+
throw new Error("No node provided");
|
|
190
|
+
return o.call(t, v) === !1 ? !1 : S(e, t);
|
|
191
|
+
}, W = /* @__PURE__ */ w.concat("iframe").join(","), X = function(t, e) {
|
|
192
|
+
if (e = e || {}, !t)
|
|
193
|
+
throw new Error("No node provided");
|
|
194
|
+
return o.call(t, W) === !1 ? !1 : g(e, t);
|
|
195
|
+
};
|
|
2
196
|
export {
|
|
3
|
-
|
|
197
|
+
z as focusable,
|
|
198
|
+
R as getTabIndex,
|
|
199
|
+
X as isFocusable,
|
|
200
|
+
G as isTabbable,
|
|
201
|
+
Z as tabbable
|
|
4
202
|
};
|
|
5
203
|
//# sourceMappingURL=index250.js.map
|
package/dist/index250.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index250.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
1
|
+
{"version":3,"file":"index250.js","sources":["../node_modules/tabbable/dist/index.esm.js"],"sourcesContent":["/*!\n* tabbable 6.2.0\n* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE\n*/\n// NOTE: separate `:not()` selectors has broader browser support than the newer\n// `:not([inert], [inert] *)` (Feb 2023)\n// CAREFUL: JSDom does not support `:not([inert] *)` as a selector; using it causes\n// the entire query to fail, resulting in no nodes found, which will break a lot\n// of things... so we have to rely on JS to identify nodes inside an inert container\nvar candidateSelectors = ['input:not([inert])', 'select:not([inert])', 'textarea:not([inert])', 'a[href]:not([inert])', 'button:not([inert])', '[tabindex]:not(slot):not([inert])', 'audio[controls]:not([inert])', 'video[controls]:not([inert])', '[contenteditable]:not([contenteditable=\"false\"]):not([inert])', 'details>summary:first-of-type:not([inert])', 'details:not([inert])'];\nvar candidateSelector = /* #__PURE__ */candidateSelectors.join(',');\nvar NoElement = typeof Element === 'undefined';\nvar matches = NoElement ? function () {} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;\nvar getRootNode = !NoElement && Element.prototype.getRootNode ? function (element) {\n var _element$getRootNode;\n return element === null || element === void 0 ? void 0 : (_element$getRootNode = element.getRootNode) === null || _element$getRootNode === void 0 ? void 0 : _element$getRootNode.call(element);\n} : function (element) {\n return element === null || element === void 0 ? void 0 : element.ownerDocument;\n};\n\n/**\n * Determines if a node is inert or in an inert ancestor.\n * @param {Element} [node]\n * @param {boolean} [lookUp] If true and `node` is not inert, looks up at ancestors to\n * see if any of them are inert. If false, only `node` itself is considered.\n * @returns {boolean} True if inert itself or by way of being in an inert ancestor.\n * False if `node` is falsy.\n */\nvar isInert = function isInert(node, lookUp) {\n var _node$getAttribute;\n if (lookUp === void 0) {\n lookUp = true;\n }\n // CAREFUL: JSDom does not support inert at all, so we can't use the `HTMLElement.inert`\n // JS API property; we have to check the attribute, which can either be empty or 'true';\n // if it's `null` (not specified) or 'false', it's an active element\n var inertAtt = node === null || node === void 0 ? void 0 : (_node$getAttribute = node.getAttribute) === null || _node$getAttribute === void 0 ? void 0 : _node$getAttribute.call(node, 'inert');\n var inert = inertAtt === '' || inertAtt === 'true';\n\n // NOTE: this could also be handled with `node.matches('[inert], :is([inert] *)')`\n // if it weren't for `matches()` not being a function on shadow roots; the following\n // code works for any kind of node\n // CAREFUL: JSDom does not appear to support certain selectors like `:not([inert] *)`\n // so it likely would not support `:is([inert] *)` either...\n var result = inert || lookUp && node && isInert(node.parentNode); // recursive\n\n return result;\n};\n\n/**\n * Determines if a node's content is editable.\n * @param {Element} [node]\n * @returns True if it's content-editable; false if it's not or `node` is falsy.\n */\nvar isContentEditable = function isContentEditable(node) {\n var _node$getAttribute2;\n // CAREFUL: JSDom does not support the `HTMLElement.isContentEditable` API so we have\n // to use the attribute directly to check for this, which can either be empty or 'true';\n // if it's `null` (not specified) or 'false', it's a non-editable element\n var attValue = node === null || node === void 0 ? void 0 : (_node$getAttribute2 = node.getAttribute) === null || _node$getAttribute2 === void 0 ? void 0 : _node$getAttribute2.call(node, 'contenteditable');\n return attValue === '' || attValue === 'true';\n};\n\n/**\n * @param {Element} el container to check in\n * @param {boolean} includeContainer add container to check\n * @param {(node: Element) => boolean} filter filter candidates\n * @returns {Element[]}\n */\nvar getCandidates = function getCandidates(el, includeContainer, filter) {\n // even if `includeContainer=false`, we still have to check it for inertness because\n // if it's inert, all its children are inert\n if (isInert(el)) {\n return [];\n }\n var candidates = Array.prototype.slice.apply(el.querySelectorAll(candidateSelector));\n if (includeContainer && matches.call(el, candidateSelector)) {\n candidates.unshift(el);\n }\n candidates = candidates.filter(filter);\n return candidates;\n};\n\n/**\n * @callback GetShadowRoot\n * @param {Element} element to check for shadow root\n * @returns {ShadowRoot|boolean} ShadowRoot if available or boolean indicating if a shadowRoot is attached but not available.\n */\n\n/**\n * @callback ShadowRootFilter\n * @param {Element} shadowHostNode the element which contains shadow content\n * @returns {boolean} true if a shadow root could potentially contain valid candidates.\n */\n\n/**\n * @typedef {Object} CandidateScope\n * @property {Element} scopeParent contains inner candidates\n * @property {Element[]} candidates list of candidates found in the scope parent\n */\n\n/**\n * @typedef {Object} IterativeOptions\n * @property {GetShadowRoot|boolean} getShadowRoot true if shadow support is enabled; falsy if not;\n * if a function, implies shadow support is enabled and either returns the shadow root of an element\n * or a boolean stating if it has an undisclosed shadow root\n * @property {(node: Element) => boolean} filter filter candidates\n * @property {boolean} flatten if true then result will flatten any CandidateScope into the returned list\n * @property {ShadowRootFilter} shadowRootFilter filter shadow roots;\n */\n\n/**\n * @param {Element[]} elements list of element containers to match candidates from\n * @param {boolean} includeContainer add container list to check\n * @param {IterativeOptions} options\n * @returns {Array.<Element|CandidateScope>}\n */\nvar getCandidatesIteratively = function getCandidatesIteratively(elements, includeContainer, options) {\n var candidates = [];\n var elementsToCheck = Array.from(elements);\n while (elementsToCheck.length) {\n var element = elementsToCheck.shift();\n if (isInert(element, false)) {\n // no need to look up since we're drilling down\n // anything inside this container will also be inert\n continue;\n }\n if (element.tagName === 'SLOT') {\n // add shadow dom slot scope (slot itself cannot be focusable)\n var assigned = element.assignedElements();\n var content = assigned.length ? assigned : element.children;\n var nestedCandidates = getCandidatesIteratively(content, true, options);\n if (options.flatten) {\n candidates.push.apply(candidates, nestedCandidates);\n } else {\n candidates.push({\n scopeParent: element,\n candidates: nestedCandidates\n });\n }\n } else {\n // check candidate element\n var validCandidate = matches.call(element, candidateSelector);\n if (validCandidate && options.filter(element) && (includeContainer || !elements.includes(element))) {\n candidates.push(element);\n }\n\n // iterate over shadow content if possible\n var shadowRoot = element.shadowRoot ||\n // check for an undisclosed shadow\n typeof options.getShadowRoot === 'function' && options.getShadowRoot(element);\n\n // no inert look up because we're already drilling down and checking for inertness\n // on the way down, so all containers to this root node should have already been\n // vetted as non-inert\n var validShadowRoot = !isInert(shadowRoot, false) && (!options.shadowRootFilter || options.shadowRootFilter(element));\n if (shadowRoot && validShadowRoot) {\n // add shadow dom scope IIF a shadow root node was given; otherwise, an undisclosed\n // shadow exists, so look at light dom children as fallback BUT create a scope for any\n // child candidates found because they're likely slotted elements (elements that are\n // children of the web component element (which has the shadow), in the light dom, but\n // slotted somewhere _inside_ the undisclosed shadow) -- the scope is created below,\n // _after_ we return from this recursive call\n var _nestedCandidates = getCandidatesIteratively(shadowRoot === true ? element.children : shadowRoot.children, true, options);\n if (options.flatten) {\n candidates.push.apply(candidates, _nestedCandidates);\n } else {\n candidates.push({\n scopeParent: element,\n candidates: _nestedCandidates\n });\n }\n } else {\n // there's not shadow so just dig into the element's (light dom) children\n // __without__ giving the element special scope treatment\n elementsToCheck.unshift.apply(elementsToCheck, element.children);\n }\n }\n }\n return candidates;\n};\n\n/**\n * @private\n * Determines if the node has an explicitly specified `tabindex` attribute.\n * @param {HTMLElement} node\n * @returns {boolean} True if so; false if not.\n */\nvar hasTabIndex = function hasTabIndex(node) {\n return !isNaN(parseInt(node.getAttribute('tabindex'), 10));\n};\n\n/**\n * Determine the tab index of a given node.\n * @param {HTMLElement} node\n * @returns {number} Tab order (negative, 0, or positive number).\n * @throws {Error} If `node` is falsy.\n */\nvar getTabIndex = function getTabIndex(node) {\n if (!node) {\n throw new Error('No node provided');\n }\n if (node.tabIndex < 0) {\n // in Chrome, <details/>, <audio controls/> and <video controls/> elements get a default\n // `tabIndex` of -1 when the 'tabindex' attribute isn't specified in the DOM,\n // yet they are still part of the regular tab order; in FF, they get a default\n // `tabIndex` of 0; since Chrome still puts those elements in the regular tab\n // order, consider their tab index to be 0.\n // Also browsers do not return `tabIndex` correctly for contentEditable nodes;\n // so if they don't have a tabindex attribute specifically set, assume it's 0.\n if ((/^(AUDIO|VIDEO|DETAILS)$/.test(node.tagName) || isContentEditable(node)) && !hasTabIndex(node)) {\n return 0;\n }\n }\n return node.tabIndex;\n};\n\n/**\n * Determine the tab index of a given node __for sort order purposes__.\n * @param {HTMLElement} node\n * @param {boolean} [isScope] True for a custom element with shadow root or slot that, by default,\n * has tabIndex -1, but needs to be sorted by document order in order for its content to be\n * inserted into the correct sort position.\n * @returns {number} Tab order (negative, 0, or positive number).\n */\nvar getSortOrderTabIndex = function getSortOrderTabIndex(node, isScope) {\n var tabIndex = getTabIndex(node);\n if (tabIndex < 0 && isScope && !hasTabIndex(node)) {\n return 0;\n }\n return tabIndex;\n};\nvar sortOrderedTabbables = function sortOrderedTabbables(a, b) {\n return a.tabIndex === b.tabIndex ? a.documentOrder - b.documentOrder : a.tabIndex - b.tabIndex;\n};\nvar isInput = function isInput(node) {\n return node.tagName === 'INPUT';\n};\nvar isHiddenInput = function isHiddenInput(node) {\n return isInput(node) && node.type === 'hidden';\n};\nvar isDetailsWithSummary = function isDetailsWithSummary(node) {\n var r = node.tagName === 'DETAILS' && Array.prototype.slice.apply(node.children).some(function (child) {\n return child.tagName === 'SUMMARY';\n });\n return r;\n};\nvar getCheckedRadio = function getCheckedRadio(nodes, form) {\n for (var i = 0; i < nodes.length; i++) {\n if (nodes[i].checked && nodes[i].form === form) {\n return nodes[i];\n }\n }\n};\nvar isTabbableRadio = function isTabbableRadio(node) {\n if (!node.name) {\n return true;\n }\n var radioScope = node.form || getRootNode(node);\n var queryRadios = function queryRadios(name) {\n return radioScope.querySelectorAll('input[type=\"radio\"][name=\"' + name + '\"]');\n };\n var radioSet;\n if (typeof window !== 'undefined' && typeof window.CSS !== 'undefined' && typeof window.CSS.escape === 'function') {\n radioSet = queryRadios(window.CSS.escape(node.name));\n } else {\n try {\n radioSet = queryRadios(node.name);\n } catch (err) {\n // eslint-disable-next-line no-console\n console.error('Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s', err.message);\n return false;\n }\n }\n var checked = getCheckedRadio(radioSet, node.form);\n return !checked || checked === node;\n};\nvar isRadio = function isRadio(node) {\n return isInput(node) && node.type === 'radio';\n};\nvar isNonTabbableRadio = function isNonTabbableRadio(node) {\n return isRadio(node) && !isTabbableRadio(node);\n};\n\n// determines if a node is ultimately attached to the window's document\nvar isNodeAttached = function isNodeAttached(node) {\n var _nodeRoot;\n // The root node is the shadow root if the node is in a shadow DOM; some document otherwise\n // (but NOT _the_ document; see second 'If' comment below for more).\n // If rootNode is shadow root, it'll have a host, which is the element to which the shadow\n // is attached, and the one we need to check if it's in the document or not (because the\n // shadow, and all nodes it contains, is never considered in the document since shadows\n // behave like self-contained DOMs; but if the shadow's HOST, which is part of the document,\n // is hidden, or is not in the document itself but is detached, it will affect the shadow's\n // visibility, including all the nodes it contains). The host could be any normal node,\n // or a custom element (i.e. web component). Either way, that's the one that is considered\n // part of the document, not the shadow root, nor any of its children (i.e. the node being\n // tested).\n // To further complicate things, we have to look all the way up until we find a shadow HOST\n // that is attached (or find none) because the node might be in nested shadows...\n // If rootNode is not a shadow root, it won't have a host, and so rootNode should be the\n // document (per the docs) and while it's a Document-type object, that document does not\n // appear to be the same as the node's `ownerDocument` for some reason, so it's safer\n // to ignore the rootNode at this point, and use `node.ownerDocument`. Otherwise,\n // using `rootNode.contains(node)` will _always_ be true we'll get false-positives when\n // node is actually detached.\n // NOTE: If `nodeRootHost` or `node` happens to be the `document` itself (which is possible\n // if a tabbable/focusable node was quickly added to the DOM, focused, and then removed\n // from the DOM as in https://github.com/focus-trap/focus-trap-react/issues/905), then\n // `ownerDocument` will be `null`, hence the optional chaining on it.\n var nodeRoot = node && getRootNode(node);\n var nodeRootHost = (_nodeRoot = nodeRoot) === null || _nodeRoot === void 0 ? void 0 : _nodeRoot.host;\n\n // in some cases, a detached node will return itself as the root instead of a document or\n // shadow root object, in which case, we shouldn't try to look further up the host chain\n var attached = false;\n if (nodeRoot && nodeRoot !== node) {\n var _nodeRootHost, _nodeRootHost$ownerDo, _node$ownerDocument;\n attached = !!((_nodeRootHost = nodeRootHost) !== null && _nodeRootHost !== void 0 && (_nodeRootHost$ownerDo = _nodeRootHost.ownerDocument) !== null && _nodeRootHost$ownerDo !== void 0 && _nodeRootHost$ownerDo.contains(nodeRootHost) || node !== null && node !== void 0 && (_node$ownerDocument = node.ownerDocument) !== null && _node$ownerDocument !== void 0 && _node$ownerDocument.contains(node));\n while (!attached && nodeRootHost) {\n var _nodeRoot2, _nodeRootHost2, _nodeRootHost2$ownerD;\n // since it's not attached and we have a root host, the node MUST be in a nested shadow DOM,\n // which means we need to get the host's host and check if that parent host is contained\n // in (i.e. attached to) the document\n nodeRoot = getRootNode(nodeRootHost);\n nodeRootHost = (_nodeRoot2 = nodeRoot) === null || _nodeRoot2 === void 0 ? void 0 : _nodeRoot2.host;\n attached = !!((_nodeRootHost2 = nodeRootHost) !== null && _nodeRootHost2 !== void 0 && (_nodeRootHost2$ownerD = _nodeRootHost2.ownerDocument) !== null && _nodeRootHost2$ownerD !== void 0 && _nodeRootHost2$ownerD.contains(nodeRootHost));\n }\n }\n return attached;\n};\nvar isZeroArea = function isZeroArea(node) {\n var _node$getBoundingClie = node.getBoundingClientRect(),\n width = _node$getBoundingClie.width,\n height = _node$getBoundingClie.height;\n return width === 0 && height === 0;\n};\nvar isHidden = function isHidden(node, _ref) {\n var displayCheck = _ref.displayCheck,\n getShadowRoot = _ref.getShadowRoot;\n // NOTE: visibility will be `undefined` if node is detached from the document\n // (see notes about this further down), which means we will consider it visible\n // (this is legacy behavior from a very long way back)\n // NOTE: we check this regardless of `displayCheck=\"none\"` because this is a\n // _visibility_ check, not a _display_ check\n if (getComputedStyle(node).visibility === 'hidden') {\n return true;\n }\n var isDirectSummary = matches.call(node, 'details>summary:first-of-type');\n var nodeUnderDetails = isDirectSummary ? node.parentElement : node;\n if (matches.call(nodeUnderDetails, 'details:not([open]) *')) {\n return true;\n }\n if (!displayCheck || displayCheck === 'full' || displayCheck === 'legacy-full') {\n if (typeof getShadowRoot === 'function') {\n // figure out if we should consider the node to be in an undisclosed shadow and use the\n // 'non-zero-area' fallback\n var originalNode = node;\n while (node) {\n var parentElement = node.parentElement;\n var rootNode = getRootNode(node);\n if (parentElement && !parentElement.shadowRoot && getShadowRoot(parentElement) === true // check if there's an undisclosed shadow\n ) {\n // node has an undisclosed shadow which means we can only treat it as a black box, so we\n // fall back to a non-zero-area test\n return isZeroArea(node);\n } else if (node.assignedSlot) {\n // iterate up slot\n node = node.assignedSlot;\n } else if (!parentElement && rootNode !== node.ownerDocument) {\n // cross shadow boundary\n node = rootNode.host;\n } else {\n // iterate up normal dom\n node = parentElement;\n }\n }\n node = originalNode;\n }\n // else, `getShadowRoot` might be true, but all that does is enable shadow DOM support\n // (i.e. it does not also presume that all nodes might have undisclosed shadows); or\n // it might be a falsy value, which means shadow DOM support is disabled\n\n // Since we didn't find it sitting in an undisclosed shadow (or shadows are disabled)\n // now we can just test to see if it would normally be visible or not, provided it's\n // attached to the main document.\n // NOTE: We must consider case where node is inside a shadow DOM and given directly to\n // `isTabbable()` or `isFocusable()` -- regardless of `getShadowRoot` option setting.\n\n if (isNodeAttached(node)) {\n // this works wherever the node is: if there's at least one client rect, it's\n // somehow displayed; it also covers the CSS 'display: contents' case where the\n // node itself is hidden in place of its contents; and there's no need to search\n // up the hierarchy either\n return !node.getClientRects().length;\n }\n\n // Else, the node isn't attached to the document, which means the `getClientRects()`\n // API will __always__ return zero rects (this can happen, for example, if React\n // is used to render nodes onto a detached tree, as confirmed in this thread:\n // https://github.com/facebook/react/issues/9117#issuecomment-284228870)\n //\n // It also means that even window.getComputedStyle(node).display will return `undefined`\n // because styles are only computed for nodes that are in the document.\n //\n // NOTE: THIS HAS BEEN THE CASE FOR YEARS. It is not new, nor is it caused by tabbable\n // somehow. Though it was never stated officially, anyone who has ever used tabbable\n // APIs on nodes in detached containers has actually implicitly used tabbable in what\n // was later (as of v5.2.0 on Apr 9, 2021) called `displayCheck=\"none\"` mode -- essentially\n // considering __everything__ to be visible because of the innability to determine styles.\n //\n // v6.0.0: As of this major release, the default 'full' option __no longer treats detached\n // nodes as visible with the 'none' fallback.__\n if (displayCheck !== 'legacy-full') {\n return true; // hidden\n }\n // else, fallback to 'none' mode and consider the node visible\n } else if (displayCheck === 'non-zero-area') {\n // NOTE: Even though this tests that the node's client rect is non-zero to determine\n // whether it's displayed, and that a detached node will __always__ have a zero-area\n // client rect, we don't special-case for whether the node is attached or not. In\n // this mode, we do want to consider nodes that have a zero area to be hidden at all\n // times, and that includes attached or not.\n return isZeroArea(node);\n }\n\n // visible, as far as we can tell, or per current `displayCheck=none` mode, we assume\n // it's visible\n return false;\n};\n\n// form fields (nested) inside a disabled fieldset are not focusable/tabbable\n// unless they are in the _first_ <legend> element of the top-most disabled\n// fieldset\nvar isDisabledFromFieldset = function isDisabledFromFieldset(node) {\n if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(node.tagName)) {\n var parentNode = node.parentElement;\n // check if `node` is contained in a disabled <fieldset>\n while (parentNode) {\n if (parentNode.tagName === 'FIELDSET' && parentNode.disabled) {\n // look for the first <legend> among the children of the disabled <fieldset>\n for (var i = 0; i < parentNode.children.length; i++) {\n var child = parentNode.children.item(i);\n // when the first <legend> (in document order) is found\n if (child.tagName === 'LEGEND') {\n // if its parent <fieldset> is not nested in another disabled <fieldset>,\n // return whether `node` is a descendant of its first <legend>\n return matches.call(parentNode, 'fieldset[disabled] *') ? true : !child.contains(node);\n }\n }\n // the disabled <fieldset> containing `node` has no <legend>\n return true;\n }\n parentNode = parentNode.parentElement;\n }\n }\n\n // else, node's tabbable/focusable state should not be affected by a fieldset's\n // enabled/disabled state\n return false;\n};\nvar isNodeMatchingSelectorFocusable = function isNodeMatchingSelectorFocusable(options, node) {\n if (node.disabled ||\n // we must do an inert look up to filter out any elements inside an inert ancestor\n // because we're limited in the type of selectors we can use in JSDom (see related\n // note related to `candidateSelectors`)\n isInert(node) || isHiddenInput(node) || isHidden(node, options) ||\n // For a details element with a summary, the summary element gets the focus\n isDetailsWithSummary(node) || isDisabledFromFieldset(node)) {\n return false;\n }\n return true;\n};\nvar isNodeMatchingSelectorTabbable = function isNodeMatchingSelectorTabbable(options, node) {\n if (isNonTabbableRadio(node) || getTabIndex(node) < 0 || !isNodeMatchingSelectorFocusable(options, node)) {\n return false;\n }\n return true;\n};\nvar isValidShadowRootTabbable = function isValidShadowRootTabbable(shadowHostNode) {\n var tabIndex = parseInt(shadowHostNode.getAttribute('tabindex'), 10);\n if (isNaN(tabIndex) || tabIndex >= 0) {\n return true;\n }\n // If a custom element has an explicit negative tabindex,\n // browsers will not allow tab targeting said element's children.\n return false;\n};\n\n/**\n * @param {Array.<Element|CandidateScope>} candidates\n * @returns Element[]\n */\nvar sortByOrder = function sortByOrder(candidates) {\n var regularTabbables = [];\n var orderedTabbables = [];\n candidates.forEach(function (item, i) {\n var isScope = !!item.scopeParent;\n var element = isScope ? item.scopeParent : item;\n var candidateTabindex = getSortOrderTabIndex(element, isScope);\n var elements = isScope ? sortByOrder(item.candidates) : element;\n if (candidateTabindex === 0) {\n isScope ? regularTabbables.push.apply(regularTabbables, elements) : regularTabbables.push(element);\n } else {\n orderedTabbables.push({\n documentOrder: i,\n tabIndex: candidateTabindex,\n item: item,\n isScope: isScope,\n content: elements\n });\n }\n });\n return orderedTabbables.sort(sortOrderedTabbables).reduce(function (acc, sortable) {\n sortable.isScope ? acc.push.apply(acc, sortable.content) : acc.push(sortable.content);\n return acc;\n }, []).concat(regularTabbables);\n};\nvar tabbable = function tabbable(container, options) {\n options = options || {};\n var candidates;\n if (options.getShadowRoot) {\n candidates = getCandidatesIteratively([container], options.includeContainer, {\n filter: isNodeMatchingSelectorTabbable.bind(null, options),\n flatten: false,\n getShadowRoot: options.getShadowRoot,\n shadowRootFilter: isValidShadowRootTabbable\n });\n } else {\n candidates = getCandidates(container, options.includeContainer, isNodeMatchingSelectorTabbable.bind(null, options));\n }\n return sortByOrder(candidates);\n};\nvar focusable = function focusable(container, options) {\n options = options || {};\n var candidates;\n if (options.getShadowRoot) {\n candidates = getCandidatesIteratively([container], options.includeContainer, {\n filter: isNodeMatchingSelectorFocusable.bind(null, options),\n flatten: true,\n getShadowRoot: options.getShadowRoot\n });\n } else {\n candidates = getCandidates(container, options.includeContainer, isNodeMatchingSelectorFocusable.bind(null, options));\n }\n return candidates;\n};\nvar isTabbable = function isTabbable(node, options) {\n options = options || {};\n if (!node) {\n throw new Error('No node provided');\n }\n if (matches.call(node, candidateSelector) === false) {\n return false;\n }\n return isNodeMatchingSelectorTabbable(options, node);\n};\nvar focusableCandidateSelector = /* #__PURE__ */candidateSelectors.concat('iframe').join(',');\nvar isFocusable = function isFocusable(node, options) {\n options = options || {};\n if (!node) {\n throw new Error('No node provided');\n }\n if (matches.call(node, focusableCandidateSelector) === false) {\n return false;\n }\n return isNodeMatchingSelectorFocusable(options, node);\n};\n\nexport { focusable, getTabIndex, isFocusable, isTabbable, tabbable };\n//# sourceMappingURL=index.esm.js.map\n"],"names":["candidateSelectors","candidateSelector","NoElement","matches","getRootNode","element","_element$getRootNode","isInert","node","lookUp","_node$getAttribute","inertAtt","inert","result","isContentEditable","_node$getAttribute2","attValue","getCandidates","el","includeContainer","filter","candidates","getCandidatesIteratively","elements","options","elementsToCheck","assigned","content","nestedCandidates","validCandidate","shadowRoot","validShadowRoot","_nestedCandidates","hasTabIndex","getTabIndex","getSortOrderTabIndex","isScope","tabIndex","sortOrderedTabbables","a","b","isInput","isHiddenInput","isDetailsWithSummary","r","child","getCheckedRadio","nodes","form","i","isTabbableRadio","radioScope","queryRadios","name","radioSet","err","checked","isRadio","isNonTabbableRadio","isNodeAttached","_nodeRoot","nodeRoot","nodeRootHost","attached","_nodeRootHost","_nodeRootHost$ownerDo","_node$ownerDocument","_nodeRoot2","_nodeRootHost2","_nodeRootHost2$ownerD","isZeroArea","_node$getBoundingClie","width","height","isHidden","_ref","displayCheck","getShadowRoot","isDirectSummary","nodeUnderDetails","originalNode","parentElement","rootNode","isDisabledFromFieldset","parentNode","isNodeMatchingSelectorFocusable","isNodeMatchingSelectorTabbable","isValidShadowRootTabbable","shadowHostNode","sortByOrder","regularTabbables","orderedTabbables","item","candidateTabindex","acc","sortable","tabbable","container","focusable","isTabbable","focusableCandidateSelector","isFocusable"],"mappings":"AAAA;AAAA;AAAA;AAAA;AASA,IAAIA,IAAqB,CAAC,sBAAsB,uBAAuB,yBAAyB,wBAAwB,uBAAuB,qCAAqC,gCAAgC,gCAAgC,iEAAiE,8CAA8C,sBAAsB,GACrXC,IAAmC,gBAAAD,EA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AO,CAAC,GAE9GH;AACT,GACI8E,IAAa,SAAoB3F,GAAMgB,GAAS;AAElD,MADAA,IAAUA,KAAW,IACjB,CAAChB;AACH,UAAM,IAAI,MAAM,kBAAkB;AAEpC,SAAIL,EAAQ,KAAKK,GAAMP,CAAiB,MAAM,KACrC,KAEFqF,EAA+B9D,GAAShB,CAAI;AACrD,GACI4F,IAA4C,gBAAApG,EAAmB,OAAO,QAAQ,EAAE,KAAK,GAAG,GACxFqG,IAAc,SAAqB7F,GAAMgB,GAAS;AAEpD,MADAA,IAAUA,KAAW,IACjB,CAAChB;AACH,UAAM,IAAI,MAAM,kBAAkB;AAEpC,SAAIL,EAAQ,KAAKK,GAAM4F,CAA0B,MAAM,KAC9C,KAEFf,EAAgC7D,GAAShB,CAAI;AACtD;","x_google_ignoreList":[0]}
|
package/dist/index254.js
CHANGED
package/dist/index254.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index254.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index254.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/dist/index255.js
CHANGED
package/dist/index255.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index255.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index255.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
package/dist/index29.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as C, ref as b, computed as f, openBlock as l, createElementBlock as i, mergeProps as g, createElementVNode as r, Fragment as I, renderList as V, normalizeClass as B, toDisplayString as h, renderSlot as x } from "vue";
|
|
2
|
-
import { booleanishToBoolean as M } from "./
|
|
3
|
-
import { identity as F } from "./
|
|
4
|
-
import { isCssColor as p } from "./
|
|
2
|
+
import { booleanishToBoolean as M } from "./index201.js";
|
|
3
|
+
import { identity as F } from "./index202.js";
|
|
4
|
+
import { isCssColor as p } from "./index198.js";
|
|
5
5
|
import { isNotNil as T } from "./index124.js";
|
|
6
6
|
const H = { class: "bb-base-rating__inner-container" }, D = { class: "bb-base-rating__label-text" }, N = ["id", "autofocus", "checked", "disabled", "name", "value"], j = ["height", "width"], A = /* @__PURE__ */ r("path", {
|
|
7
7
|
d: "m8.243 7.34l-6.38.925l-.113.023a1 1 0 0 0-.44 1.684l4.622 4.499l-1.09 6.355l-.013.11a1 1 0 0 0 1.464.944l5.706-3l5.693 3l.1.046a1 1 0 0 0 1.352-1.1l-1.091-6.355l4.624-4.5l.078-.085a1 1 0 0 0-.633-1.62l-6.38-.926l-2.852-5.78a1 1 0 0 0-1.794 0L8.243 7.34z",
|
package/dist/index31.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { defineComponent as Ne, ref as v, computed as w, onMounted as $e, onBeforeUnmount as De, watch as ee, openBlock as g, createElementBlock as h, normalizeClass as I, renderSlot as b, createElementVNode as V, Fragment as L, renderList as
|
|
1
|
+
import { defineComponent as Ne, ref as v, computed as w, onMounted as $e, onBeforeUnmount as De, watch as ee, openBlock as g, createElementBlock as h, normalizeClass as I, renderSlot as b, createElementVNode as V, Fragment as L, renderList as U, toDisplayString as F, createBlock as ie, withModifiers as B, withCtx as Le, createTextVNode as le, createCommentVNode as se, withDirectives as Fe, vModelDynamic as Me, Teleport as Ae, normalizeStyle as qe, createVNode as Je, mergeProps as Re, nextTick as J } from "vue";
|
|
2
2
|
import ze from "./index115.js";
|
|
3
3
|
import "./index158.js";
|
|
4
4
|
import He from "./index119.js";
|
|
5
5
|
import "./index185.js";
|
|
6
|
-
import { autoUpdate as Pe, computePosition as Ue, flip as je, shift as Qe } from "./
|
|
6
|
+
import { autoUpdate as Pe, computePosition as Ue, flip as je, shift as Qe } from "./index203.js";
|
|
7
7
|
import { deepEqual as re } from "./index123.js";
|
|
8
|
-
import { head as te } from "./
|
|
8
|
+
import { head as te } from "./index204.js";
|
|
9
9
|
import { isNotNil as E } from "./index124.js";
|
|
10
10
|
import { last as We } from "./index205.js";
|
|
11
11
|
import { useItemText as Ke } from "./index125.js";
|
|
12
12
|
import { useItemValue as Ye } from "./index126.js";
|
|
13
|
-
import { wait as
|
|
14
|
-
import { when as Ze } from "./
|
|
15
|
-
import { offset as Ge } from "./
|
|
13
|
+
import { wait as R } from "./index122.js";
|
|
14
|
+
import { when as Ze } from "./index199.js";
|
|
15
|
+
import { offset as Ge } from "./index206.js";
|
|
16
16
|
const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomplete", "autofocus", "disabled", "placeholder", "readonly"], ll = {
|
|
17
17
|
key: 0,
|
|
18
18
|
class: "bb-base-select__loading-container"
|
|
@@ -151,7 +151,7 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
151
151
|
...a,
|
|
152
152
|
focused: _.value === t
|
|
153
153
|
}));
|
|
154
|
-
}),
|
|
154
|
+
}), z = w(
|
|
155
155
|
() => y.value.reduce(
|
|
156
156
|
(l, a) => ({
|
|
157
157
|
...l,
|
|
@@ -205,7 +205,7 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
205
205
|
}, []))), M = async (l) => {
|
|
206
206
|
e.debug && console.log("Running onOptionSelected", { option: l });
|
|
207
207
|
let a;
|
|
208
|
-
console.log("assigning focus index to value before nexttick", l.index), await
|
|
208
|
+
console.log("assigning focus index to value before nexttick", l.index), await J(), console.log("assigning focus index to value after nexttick", l.index), e.multiple ? (l.selected ? (l.manual && (e.debug && console.log("onOptionSelected: inside multiple > selected > manual"), C.value = C.value.filter(
|
|
209
209
|
(t) => t.id !== l.id
|
|
210
210
|
)), a = e.modelValue.filter(
|
|
211
211
|
(t) => JSON.stringify(t) !== l.jsonValue
|
|
@@ -230,7 +230,7 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
230
230
|
disabled: !1
|
|
231
231
|
};
|
|
232
232
|
C.value = C.value.concat(n), u.value = "";
|
|
233
|
-
},
|
|
233
|
+
}, H = e.prefill === !0 || !e.multiple && E(e.modelValue) || e.multiple && !!e.modelValue.length;
|
|
234
234
|
let j;
|
|
235
235
|
ee(
|
|
236
236
|
() => e.modelValue,
|
|
@@ -268,11 +268,11 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
268
268
|
t = p.value.get(e.modelValue), t ? (e.debug && console.log("watch.modelValue >> found"), u.value = t.text, e.debug && console.log("watch.modelValue assigned to query"), e.stash && (m.value = [t], e.debug && console.log("watch.modelValue assigned to stash")), e.debug && console.log("watch.modelValue end of found")) : e.enforceCoherence && E(l) ? (e.debug && console.log("watch.modelValue >> not found line 911"), u.value = "", e.stash && (m.value = []), f("update:modelValue", null)) : u.value = "";
|
|
269
269
|
}
|
|
270
270
|
},
|
|
271
|
-
|
|
271
|
+
H ? 0 : e.modelValueDebounceTime
|
|
272
272
|
);
|
|
273
273
|
},
|
|
274
274
|
// Prefill when asked or when items are static
|
|
275
|
-
{ immediate:
|
|
275
|
+
{ immediate: H, deep: !0 }
|
|
276
276
|
), ee(
|
|
277
277
|
() => e.items,
|
|
278
278
|
async (l, a) => {
|
|
@@ -293,7 +293,7 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
293
293
|
ee(
|
|
294
294
|
() => e.dependencies,
|
|
295
295
|
(l, a) => {
|
|
296
|
-
!
|
|
296
|
+
!H && e.prefill === "focus" && Z || JSON.stringify(l) !== JSON.stringify(a) && (Q && clearTimeout(Q), Q = setTimeout(async () => {
|
|
297
297
|
if (JSON.stringify(l) !== JSON.stringify(a)) {
|
|
298
298
|
e.enforceCoherence && e.stash && (m.value = []);
|
|
299
299
|
let t = u.value;
|
|
@@ -323,20 +323,20 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
323
323
|
d.value && (d.value.style.left = `${l.x}px`, d.value.style.top = `${l.y}px`, d.value.style.width = `${(a = N.value) == null ? void 0 : a.offsetWidth}px`);
|
|
324
324
|
});
|
|
325
325
|
}, k = v(!1), W = v(!1), K = v(!1), Y = v(!0), D = async () => {
|
|
326
|
-
Y.value = !1, W.value = !0, await
|
|
326
|
+
Y.value = !1, W.value = !0, await R(e.transitionDuration), W.value = !1, k.value = !0;
|
|
327
327
|
}, A = async () => {
|
|
328
|
-
k.value = !1, K.value = !0, await
|
|
329
|
-
},
|
|
328
|
+
k.value = !1, K.value = !0, await R(e.transitionDuration), K.value = !1, Y.value = !0;
|
|
329
|
+
}, P = v(!1);
|
|
330
330
|
let Z = !0;
|
|
331
331
|
const we = async (l) => {
|
|
332
|
-
e.debug && console.log("Running onInputFocus"), f("focus", l),
|
|
332
|
+
e.debug && console.log("Running onInputFocus"), f("focus", l), P.value = !0, document.addEventListener("click", ue), document.addEventListener("focusin", oe), x.value instanceof HTMLInputElement && x.value.select(), e.prefill === "focus" && Z && !H && (await $({ prefill: !0 }), Z = !1);
|
|
333
333
|
}, oe = async (l) => {
|
|
334
334
|
if (e.debug && console.log("Running onFocusOutside"), l.target instanceof Node && S.value && d.value && !S.value.contains(l.target) && !d.value.contains(l.target)) {
|
|
335
|
-
A(), f("inactive"), document.removeEventListener("focusin", oe),
|
|
335
|
+
A(), f("inactive"), document.removeEventListener("focusin", oe), P.value = !1, e.multiple && (await R(500), u.value = "");
|
|
336
336
|
return;
|
|
337
337
|
}
|
|
338
338
|
}, Ve = async (l) => {
|
|
339
|
-
if (e.debug && console.log("Running onInputBlur"), f("blur", l), !e.multiple && (e.modelValue, await
|
|
339
|
+
if (e.debug && console.log("Running onInputBlur"), f("blur", l), !e.multiple && (e.modelValue, await J(), await R(300), S.value && d.value)) {
|
|
340
340
|
const a = document.activeElement;
|
|
341
341
|
if (!S.value.contains(a) && !d.value.contains(a)) {
|
|
342
342
|
const t = p.value.get(e.modelValue);
|
|
@@ -347,7 +347,7 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
347
347
|
e.debug && console.log("Running onInputInput"), f("input", l), u.value === "" && (e.multiple || f("update:modelValue", null)), typeof e.items == "function" && xe();
|
|
348
348
|
}, r = v(null), _ = w(() => Number.isInteger(r.value) && r.value ? r.value % O.value.length : r.value), i = v(null), ke = async () => {
|
|
349
349
|
var l;
|
|
350
|
-
if (r.value !== null ? r.value = r.value % y.value.length : r.value = 0, await
|
|
350
|
+
if (r.value !== null ? r.value = r.value % y.value.length : r.value = 0, await J(), _.value !== null) {
|
|
351
351
|
const a = (l = d.value) == null ? void 0 : l.querySelector(
|
|
352
352
|
`#${y.value[_.value].id}`
|
|
353
353
|
);
|
|
@@ -359,7 +359,7 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
359
359
|
}
|
|
360
360
|
}, _e = async () => {
|
|
361
361
|
var l;
|
|
362
|
-
if (r.value !== null ? r.value = r.value === 0 ? y.value.length - 1 : r.value - 1 : r.value = y.value.length - 1, await
|
|
362
|
+
if (r.value !== null ? r.value = r.value === 0 ? y.value.length - 1 : r.value - 1 : r.value = y.value.length - 1, await J(), _.value !== null) {
|
|
363
363
|
const a = (l = d.value) == null ? void 0 : l.querySelector(
|
|
364
364
|
`#${y.value[_.value].id}`
|
|
365
365
|
);
|
|
@@ -412,7 +412,7 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
412
412
|
behavior: "smooth",
|
|
413
413
|
block: "nearest",
|
|
414
414
|
inline: "start"
|
|
415
|
-
}), r.value =
|
|
415
|
+
}), r.value = z.value[s.value[i.value].id].index);
|
|
416
416
|
}
|
|
417
417
|
}
|
|
418
418
|
break;
|
|
@@ -428,7 +428,7 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
428
428
|
behavior: "smooth",
|
|
429
429
|
block: "nearest",
|
|
430
430
|
inline: "start"
|
|
431
|
-
}), r.value =
|
|
431
|
+
}), r.value = z.value[s.value[i.value].id].index);
|
|
432
432
|
}
|
|
433
433
|
}
|
|
434
434
|
break;
|
|
@@ -453,7 +453,7 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
453
453
|
}
|
|
454
454
|
he();
|
|
455
455
|
const n = We(C.value);
|
|
456
|
-
M(
|
|
456
|
+
M(z.value[n.id]);
|
|
457
457
|
}
|
|
458
458
|
}
|
|
459
459
|
break;
|
|
@@ -498,14 +498,14 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
498
498
|
f("click", l), !(e.disabled || e.readonly) && (x.value instanceof HTMLElement && x.value.focus(), D());
|
|
499
499
|
}, Ie = async (l) => {
|
|
500
500
|
if (l.currentTarget instanceof HTMLElement && l.currentTarget.classList.contains("bb-base-select-option")) {
|
|
501
|
-
const a =
|
|
501
|
+
const a = z.value[l.currentTarget.id];
|
|
502
502
|
if (a.disabled)
|
|
503
503
|
return;
|
|
504
|
-
await M(a), x.value instanceof HTMLInputElement && x.value.focus(), e.multiple || A();
|
|
504
|
+
await M(a), await J(), x.value instanceof HTMLInputElement && x.value.focus(), e.multiple || A();
|
|
505
505
|
}
|
|
506
506
|
}, ue = async (l) => {
|
|
507
507
|
if (l.target instanceof Node && S.value && !S.value.contains(l.target)) {
|
|
508
|
-
A(), f("inactive"), document.removeEventListener("click", ue),
|
|
508
|
+
A(), f("inactive"), document.removeEventListener("click", ue), P.value = !1, e.multiple && (await R(500), u.value = "");
|
|
509
509
|
return;
|
|
510
510
|
}
|
|
511
511
|
}, Be = Ze(
|
|
@@ -525,7 +525,7 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
525
525
|
ref: S,
|
|
526
526
|
class: I({
|
|
527
527
|
"bb-base-select": !0,
|
|
528
|
-
"bb-base-select--active":
|
|
528
|
+
"bb-base-select--active": P.value,
|
|
529
529
|
"bb-base-select--loading": c.value,
|
|
530
530
|
"bb-base-select--disabled": l.disabled,
|
|
531
531
|
"bb-base-select--errors": l.hasErrors,
|
|
@@ -542,14 +542,14 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
542
542
|
b(l.$slots, "prepend"),
|
|
543
543
|
V("span", Xe, [
|
|
544
544
|
l.multiple ? (g(), h(L, { key: 0 }, [
|
|
545
|
-
l.comma ? (g(!0), h(L, { key: 0 },
|
|
545
|
+
l.comma ? (g(!0), h(L, { key: 0 }, U(s.value, (t, n) => (g(), h("span", {
|
|
546
546
|
key: t.id,
|
|
547
547
|
class: I({
|
|
548
548
|
"bb-base-select__selected": !0,
|
|
549
549
|
"bb-base-select__selected--comma": !0,
|
|
550
550
|
"bb-base-select__selected--focused": n === i.value
|
|
551
551
|
})
|
|
552
|
-
}, F(t.text) + F(n < s.value.length - 1 ? "," : ""), 3))), 128)) : (g(!0), h(L, { key: 1 },
|
|
552
|
+
}, F(t.text) + F(n < s.value.length - 1 ? "," : ""), 3))), 128)) : (g(!0), h(L, { key: 1 }, U(s.value, (t, n) => (g(), ie(ze, {
|
|
553
553
|
key: t.id,
|
|
554
554
|
class: I({
|
|
555
555
|
"bb-base-select__selected": !0,
|
|
@@ -623,7 +623,7 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
623
623
|
le(F(l.noDataText), 1)
|
|
624
624
|
])
|
|
625
625
|
])),
|
|
626
|
-
(g(!0), h(L, null,
|
|
626
|
+
(g(!0), h(L, null, U(O.value, (t) => (g(), h(L, {
|
|
627
627
|
key: t.id
|
|
628
628
|
}, [
|
|
629
629
|
b(l.$slots, "option:prepend", {
|
|
@@ -689,7 +689,7 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
689
689
|
], 2)) : b(l.$slots, "append", { key: 0 })
|
|
690
690
|
], 512),
|
|
691
691
|
b(l.$slots, "append-outer"),
|
|
692
|
-
(g(!0), h(L, null,
|
|
692
|
+
(g(!0), h(L, null, U(Ee.value, (t) => (g(), h("input", Re({
|
|
693
693
|
key: t.value
|
|
694
694
|
}, t), null, 16))), 128))
|
|
695
695
|
], 2));
|