bitboss-ui 2.0.164 → 2.0.166
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/components/BaseButton/BaseButton.vue.d.ts +2 -1
- package/dist/components/BaseButton/RouterComponent.vue.d.ts +2 -1
- package/dist/components/BaseCheckbox/BaseCheckbox.vue.d.ts +5 -2
- package/dist/components/BaseCheckboxGroup/BaseCheckboxGroup.vue.d.ts +2 -4
- package/dist/components/BaseColorInput/BaseColorInput.vue.d.ts +106 -4
- package/dist/components/BaseColorInput/ColorPallette.vue.d.ts +5 -1
- package/dist/components/BaseDatePicker/BaseDatePicker.vue.d.ts +4 -3
- package/dist/components/BaseDatePicker/BaseDatePickerHeader.vue.d.ts +1 -1
- package/dist/components/BaseDatePicker/BaseDatePickerInputDaySelector.vue.d.ts +5 -2
- package/dist/components/BaseDatePicker/BaseDatePickerMonthSelector.vue.d.ts +1 -1
- package/dist/components/BaseDatePicker/BaseDatePickerYearSelector.vue.d.ts +3 -1
- package/dist/components/BaseDatePickerInput/BaseDatePickerInput.vue.d.ts +200 -10
- package/dist/components/BaseDialog/BaseDialog.vue.d.ts +10 -2
- package/dist/components/BaseInputContainer/BaseInputContainer.vue.d.ts +3 -2
- package/dist/components/BaseNumberInput/BaseNumberInput.vue.d.ts +5 -2
- package/dist/components/BaseRadio/BaseRadio.vue.d.ts +3 -2
- package/dist/components/BaseRadioGroup/BaseRadioGroup.vue.d.ts +2 -4
- package/dist/components/BaseRating/BaseRating.vue.d.ts +5 -2
- package/dist/components/BaseSelect/BaseSelect.vue.d.ts +2 -4
- package/dist/components/BaseSlider/BaseSlider.vue.d.ts +8 -2
- package/dist/components/BaseSwitch/BaseSwitch.vue.d.ts +5 -2
- package/dist/components/BaseSwitchGroup/BaseSwitchGroup.vue.d.ts +2 -4
- package/dist/components/BaseTag/BaseTag.vue.d.ts +207 -6
- package/dist/components/BaseTextInput/BaseTextInput.vue.d.ts +5 -2
- package/dist/components/BaseTextarea/BaseTextarea.vue.d.ts +5 -2
- package/dist/components/BbAccordion/BbAccordion.vue.d.ts +3 -2
- package/dist/components/BbAlert/BbAlert.vue.d.ts +2 -1
- package/dist/components/BbAvatar/BbAvatar.vue.d.ts +5 -2
- package/dist/components/BbBadge/BbBadge.vue.d.ts +3 -2
- package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue.d.ts +3 -2
- package/dist/components/BbButton/BbButton.vue.d.ts +2 -1
- package/dist/components/BbCheckbox/BbCheckbox.vue.d.ts +3 -2
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +2 -4
- package/dist/components/BbChip/BbChip.vue.d.ts +3 -2
- package/dist/components/BbCollapsible/BbCollapsible.vue.d.ts +2 -1
- package/dist/components/BbColorInput/BbColorInput.vue.d.ts +3 -2
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +3 -2
- package/dist/components/BbDialog/BbDialog.vue.d.ts +2 -1
- package/dist/components/BbDropdown/BbDropdown.vue.d.ts +241 -100
- package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +69 -126
- package/dist/components/BbDropzone/BbDropzone.vue.d.ts +5 -2
- package/dist/components/BbIntersection/BbIntersection.vue.d.ts +5 -2
- package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +100 -9
- package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +10 -2
- package/dist/components/BbPagination/BbPagination.vue.d.ts +10 -6
- package/dist/components/BbPopover/BbPopover.vue.d.ts +168 -15
- package/dist/components/BbProgress/BbProgress.vue.d.ts +1 -1
- package/dist/components/BbRadio/BbRadio.vue.d.ts +3 -2
- package/dist/components/BbRadioGroup/BbRadioGroup.vue.d.ts +2 -4
- package/dist/components/BbRating/BbRating.vue.d.ts +3 -2
- package/dist/components/BbRatio/BbRatio.vue.d.ts +2 -1
- package/dist/components/BbRows/BbRows.vue.d.ts +3 -5
- package/dist/components/BbSelect/BbSelect.vue.d.ts +2 -4
- package/dist/components/BbSlider/BbSlider.vue.d.ts +3 -2
- package/dist/components/BbSmoothHeight/BbSmoothHeight.vue.d.ts +6 -2
- package/dist/components/BbSpinner/BbSpinner.vue.d.ts +1 -1
- package/dist/components/BbSwitch/BbSwitch.vue.d.ts +3 -2
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue.d.ts +2 -4
- package/dist/components/BbTab/BbTab.vue.d.ts +6 -2
- package/dist/components/BbTable/BbTable.vue.d.ts +2 -4
- package/dist/components/BbTag/BbTag.vue.d.ts +3 -2
- package/dist/components/BbTeleport.vue.d.ts +2 -1
- package/dist/components/BbTextInput/BbTextInput.vue.d.ts +3 -2
- package/dist/components/BbTextarea/BbTextarea.vue.d.ts +3 -2
- package/dist/components/BbToast/BbToastMessage.vue.d.ts +1 -1
- package/dist/components/BbTooltip/BbTooltip.vue.d.ts +175 -7
- package/dist/components/BbTree/BbTree.vue.d.ts +2 -1
- package/dist/components/ClearableButton.vue.d.ts +1 -1
- package/dist/components/CommonFloating.vue.d.ts +6 -2
- package/dist/components/CommonInputInnerContainer.vue.d.ts +5 -2
- package/dist/components/CommonInputOuterContainer.vue.d.ts +5 -4
- package/dist/components/CommonPopover.vue.d.ts +42 -0
- package/dist/components/ErrorIcon.vue.d.ts +1 -1
- package/dist/components/ListBox.vue.d.ts +4 -6
- package/dist/components/OptionsContainer.vue.d.ts +4 -6
- package/dist/components/Transitions/Slide.vue.d.ts +2 -1
- package/dist/composables/useUntil.d.ts +7 -0
- package/dist/{style.css → index.css} +1 -1
- package/dist/index.js +148 -143
- package/dist/index100.js +122 -135
- package/dist/index102.js +100 -0
- package/dist/index104.js +24 -0
- package/dist/index106.js +144 -0
- package/dist/index107.js +106 -59
- package/dist/index109.js +101 -289
- package/dist/index11.js +2 -2
- package/dist/index111.js +37 -476
- package/dist/index113.js +31 -118
- package/dist/index115.js +43 -61
- package/dist/index117.js +86 -78
- package/dist/index119.js +296 -26
- package/dist/index12.js +6 -6
- package/dist/index121.js +470 -138
- package/dist/index123.js +117 -115
- package/dist/index125.js +110 -35
- package/dist/index127.js +115 -45
- package/dist/index129.js +28 -31
- package/dist/index13.js +5 -5
- package/dist/index131.js +117 -21
- package/dist/index133.js +120 -9
- package/dist/index135.js +2 -2
- package/dist/index136.js +21 -5
- package/dist/index137.js +375 -7
- package/dist/index138.js +9 -6
- package/dist/index139.js +25 -3
- package/dist/index140.js +2 -3
- package/dist/index141.js +5 -3
- package/dist/index142.js +9 -3
- package/dist/index143.js +6 -3
- package/dist/index144.js +1 -1
- package/dist/index145.js +1 -1
- package/dist/index146.js +1 -1
- package/dist/index147.js +1 -1
- package/dist/index148.js +1 -1
- package/dist/index149.js +1 -1
- package/dist/index15.js +15 -15
- package/dist/index150.js +1 -1
- package/dist/index151.js +1 -1
- package/dist/index152.js +1 -1
- package/dist/index153.js +1 -1
- package/dist/index154.js +1 -1
- package/dist/index155.js +1 -1
- package/dist/index156.js +1 -1
- package/dist/index157.js +1 -1
- package/dist/index158.js +1 -1
- package/dist/index159.js +1 -1
- package/dist/index160.js +1 -1
- package/dist/index161.js +1 -1
- package/dist/index162.js +1 -1
- package/dist/index163.js +1 -1
- package/dist/index164.js +1 -1
- package/dist/index165.js +1 -1
- package/dist/index166.js +2 -2
- package/dist/index167.js +5 -0
- package/dist/index168.js +2 -2
- package/dist/index169.js +5 -0
- package/dist/index17.js +6 -6
- package/dist/index170.js +1 -1
- package/dist/index171.js +1 -1
- package/dist/index172.js +1 -1
- package/dist/index173.js +1 -1
- package/dist/index174.js +1 -1
- package/dist/index175.js +1 -1
- package/dist/index176.js +1 -1
- package/dist/index177.js +2 -2
- package/dist/index178.js +5 -0
- package/dist/index179.js +3 -2
- package/dist/index180.js +1 -1
- package/dist/index181.js +2 -3
- package/dist/index182.js +1 -1
- package/dist/index183.js +1 -1
- package/dist/index184.js +1 -1
- package/dist/index185.js +1 -1
- package/dist/index186.js +1 -1
- package/dist/index187.js +1 -1
- package/dist/index188.js +2 -2
- package/dist/index189.js +3 -2
- package/dist/index19.js +10 -10
- package/dist/index190.js +1 -1
- package/dist/index191.js +2 -3
- package/dist/index192.js +1 -1
- package/dist/index193.js +5 -0
- package/dist/index194.js +1 -1
- package/dist/index195.js +5 -0
- package/dist/index196.js +1 -1
- package/dist/index197.js +1 -1
- package/dist/index198.js +1 -1
- package/dist/index199.js +1 -1
- package/dist/index200.js +1 -1
- package/dist/index201.js +1 -1
- package/dist/index202.js +1 -1
- package/dist/index203.js +1 -1
- package/dist/index204.js +1 -1
- package/dist/index205.js +1 -1
- package/dist/index206.js +138 -2
- package/dist/index207.js +2 -4
- package/dist/index208.js +2 -41
- package/dist/index209.js +2 -20
- package/dist/index21.js +17 -17
- package/dist/index210.js +4 -94
- package/dist/index212.js +41 -200
- package/dist/index213.js +8 -0
- package/dist/index214.js +7 -66
- package/dist/{index221.js → index215.js} +2 -2
- package/dist/index216.js +13 -13
- package/dist/index217.js +33 -12
- package/dist/index218.js +4 -3
- package/dist/index219.js +20 -6
- package/dist/index220.js +94 -7
- package/dist/index222.js +194 -80
- package/dist/index224.js +66 -29
- package/dist/index226.js +13 -51
- package/dist/index227.js +2 -15
- package/dist/index228.js +6 -3
- package/dist/index229.js +16 -12
- package/dist/index23.js +25 -25
- package/dist/index230.js +8 -15
- package/dist/index231.js +11 -2
- package/dist/index232.js +101 -4
- package/dist/index234.js +23 -5
- package/dist/index235.js +2 -16
- package/dist/index236.js +176 -15
- package/dist/index237.js +3 -19
- package/dist/index238.js +5 -15
- package/dist/index239.js +5 -19
- package/dist/index240.js +5 -27
- package/dist/index241.js +5 -2
- package/dist/index242.js +5 -8
- package/dist/index243.js +5 -250
- package/dist/index244.js +2 -52
- package/dist/index245.js +2 -44
- package/dist/index246.js +9 -5
- package/dist/index247.js +3 -60
- package/dist/index248.js +49 -32
- package/dist/index249.js +17 -2
- package/dist/index25.js +8 -8
- package/dist/index250.js +105 -124
- package/dist/index252.js +100 -2
- package/dist/index254.js +2 -115
- package/dist/index255.js +3 -2
- package/dist/index256.js +86 -2
- package/dist/index258.js +26 -123
- package/dist/index259.js +15 -106
- package/dist/index260.js +14 -0
- package/dist/index261.js +16 -100
- package/dist/index262.js +12 -0
- package/dist/index263.js +2 -11
- package/dist/index264.js +17 -227
- package/dist/index265.js +112 -353
- package/dist/index266.js +11 -175
- package/dist/index267.js +228 -10
- package/dist/index268.js +367 -2
- package/dist/index269.js +5 -6
- package/dist/index27.js +18 -18
- package/dist/index270.js +5 -16
- package/dist/index271.js +7 -8
- package/dist/index272.js +250 -23
- package/dist/index273.js +52 -3
- package/dist/index274.js +44 -224
- package/dist/index275.js +5 -431
- package/dist/index276.js +60 -3
- package/dist/index277.js +9 -3
- package/dist/index278.js +8 -3
- package/dist/index279.js +4 -0
- package/dist/index280.js +5 -7
- package/dist/index281.js +67 -7
- package/dist/index282.js +4 -11
- package/dist/index283.js +471 -2
- package/dist/index284.js +2 -200
- package/dist/index285.js +7 -3
- package/dist/index286.js +11 -17
- package/dist/index287.js +2 -9
- package/dist/index288.js +3 -28
- package/dist/index289.js +3 -4
- package/dist/index29.js +6 -6
- package/dist/index290.js +3 -281
- package/dist/index292.js +7 -2
- package/dist/index293.js +200 -2
- package/dist/index294.js +701 -2
- package/dist/index295.js +354 -2
- package/dist/index296.js +58 -2
- package/dist/index297.js +3 -2
- package/dist/index298.js +5 -2
- package/dist/index299.js +280 -2
- package/dist/index300.js +2 -2
- package/dist/index301.js +125 -2
- package/dist/index302.js +2 -2
- package/dist/index303.js +16 -22
- package/dist/index304.js +4 -0
- package/dist/index305.js +16 -2
- package/dist/index306.js +2 -8
- package/dist/index307.js +19 -5
- package/dist/index308.js +2 -2
- package/dist/index309.js +15 -67
- package/dist/index31.js +4 -4
- package/dist/index310.js +2 -2
- package/dist/index311.js +5 -126
- package/dist/index312.js +1 -1
- package/dist/index313.js +1 -1
- package/dist/index314.js +17 -2
- package/dist/index315.js +5 -435
- package/dist/index316.js +4 -126
- package/dist/index317.js +8 -3
- package/dist/index318.js +28 -3
- package/dist/index319.js +3 -58
- package/dist/index320.js +3 -88
- package/dist/index321.js +18 -7
- package/dist/index322.js +2 -6
- package/dist/index323.js +27 -8
- package/dist/index324.js +2 -480
- package/dist/index325.js +2 -5
- package/dist/index326.js +2 -8
- package/dist/index327.js +2 -33
- package/dist/index328.js +2 -28
- package/dist/index329.js +24 -0
- package/dist/index33.js +10 -10
- package/dist/index331.js +128 -57
- package/dist/index332.js +2 -4
- package/dist/index333.js +380 -5
- package/dist/index334.js +125 -6
- package/dist/index335.js +2 -19
- package/dist/index336.js +92 -46
- package/dist/index337.js +58 -2
- package/dist/index338.js +60 -0
- package/dist/index339.js +228 -3
- package/dist/index340.js +8 -2
- package/dist/index341.js +5 -423
- package/dist/index342.js +6 -45
- package/dist/index343.js +9 -0
- package/dist/index344.js +7 -0
- package/dist/index345.js +35 -0
- package/dist/index346.js +30 -0
- package/dist/index348.js +9 -0
- package/dist/index349.js +21 -0
- package/dist/index35.js +9 -9
- package/dist/index350.js +49 -0
- package/dist/index352.js +5 -0
- package/dist/index353.js +483 -0
- package/dist/index354.js +4 -0
- package/dist/index355.js +484 -0
- package/dist/index356.js +49 -0
- package/dist/index37.js +33 -33
- package/dist/index39.js +16 -16
- package/dist/index41.js +5 -5
- package/dist/index43.js +10 -10
- package/dist/index45.js +25 -25
- package/dist/index47.js +6 -6
- package/dist/index49.js +15 -15
- package/dist/index51.js +4 -4
- package/dist/index53.js +6 -6
- package/dist/index55.js +6 -6
- package/dist/index57.js +16 -16
- package/dist/index59.js +3 -3
- package/dist/index6.js +1 -1
- package/dist/index61.js +11 -11
- package/dist/index63.js +5 -5
- package/dist/index65.js +2 -2
- package/dist/index67.js +35 -107
- package/dist/index69.js +42 -85
- package/dist/index7.js +2 -2
- package/dist/index71.js +47 -56
- package/dist/index73.js +83 -54
- package/dist/index75.js +113 -273
- package/dist/index77.js +50 -158
- package/dist/index79.js +228 -194
- package/dist/index81.js +148 -40
- package/dist/index83.js +221 -0
- package/dist/index85.js +53 -0
- package/dist/index87.js +46 -0
- package/dist/index88.js +125 -184
- package/dist/index9.js +1 -1
- package/dist/index90.js +240 -26
- package/dist/index92.js +230 -86
- package/dist/index94.js +135 -117
- package/dist/index96.js +27 -94
- package/dist/index98.js +85 -15
- package/package.json +26 -27
- package/dist/index101.js +0 -178
- package/dist/index103.js +0 -116
- package/dist/index105.js +0 -100
- package/dist/index126.js +0 -46
- package/dist/index128.js +0 -49
- package/dist/index130.js +0 -4
- package/dist/index132.js +0 -346
- package/dist/index134.js +0 -27
- package/dist/index225.js +0 -19
- package/dist/index251.js +0 -4
- package/dist/index253.js +0 -11
- package/dist/index257.js +0 -20
- package/dist/index291.js +0 -8
- package/dist/index330.js +0 -60
- package/dist/index82.js +0 -136
- package/dist/index84.js +0 -247
- package/dist/index86.js +0 -235
- /package/dist/{index233.js → index211.js} +0 -0
package/dist/index283.js
CHANGED
@@ -1,4 +1,473 @@
|
|
1
|
-
import
|
1
|
+
import { tabbable as ne, focusable as ae, isTabbable as k, getTabIndex as R, isFocusable as S } from "./index293.js";
|
2
|
+
/*!
|
3
|
+
* focus-trap 7.6.4
|
4
|
+
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
|
5
|
+
*/
|
6
|
+
function x(r, t) {
|
7
|
+
(t == null || t > r.length) && (t = r.length);
|
8
|
+
for (var o = 0, u = Array(t); o < t; o++) u[o] = r[o];
|
9
|
+
return u;
|
10
|
+
}
|
11
|
+
function re(r) {
|
12
|
+
if (Array.isArray(r)) return x(r);
|
13
|
+
}
|
14
|
+
function ie(r, t, o) {
|
15
|
+
return (t = le(t)) in r ? Object.defineProperty(r, t, {
|
16
|
+
value: o,
|
17
|
+
enumerable: !0,
|
18
|
+
configurable: !0,
|
19
|
+
writable: !0
|
20
|
+
}) : r[t] = o, r;
|
21
|
+
}
|
22
|
+
function oe(r) {
|
23
|
+
if (typeof Symbol < "u" && r[Symbol.iterator] != null || r["@@iterator"] != null) return Array.from(r);
|
24
|
+
}
|
25
|
+
function ue() {
|
26
|
+
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
27
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
28
|
+
}
|
29
|
+
function Q(r, t) {
|
30
|
+
var o = Object.keys(r);
|
31
|
+
if (Object.getOwnPropertySymbols) {
|
32
|
+
var u = Object.getOwnPropertySymbols(r);
|
33
|
+
t && (u = u.filter(function(m) {
|
34
|
+
return Object.getOwnPropertyDescriptor(r, m).enumerable;
|
35
|
+
})), o.push.apply(o, u);
|
36
|
+
}
|
37
|
+
return o;
|
38
|
+
}
|
39
|
+
function X(r) {
|
40
|
+
for (var t = 1; t < arguments.length; t++) {
|
41
|
+
var o = arguments[t] != null ? arguments[t] : {};
|
42
|
+
t % 2 ? Q(Object(o), !0).forEach(function(u) {
|
43
|
+
ie(r, u, o[u]);
|
44
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(r, Object.getOwnPropertyDescriptors(o)) : Q(Object(o)).forEach(function(u) {
|
45
|
+
Object.defineProperty(r, u, Object.getOwnPropertyDescriptor(o, u));
|
46
|
+
});
|
47
|
+
}
|
48
|
+
return r;
|
49
|
+
}
|
50
|
+
function se(r) {
|
51
|
+
return re(r) || oe(r) || fe(r) || ue();
|
52
|
+
}
|
53
|
+
function ce(r, t) {
|
54
|
+
if (typeof r != "object" || !r) return r;
|
55
|
+
var o = r[Symbol.toPrimitive];
|
56
|
+
if (o !== void 0) {
|
57
|
+
var u = o.call(r, t);
|
58
|
+
if (typeof u != "object") return u;
|
59
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
60
|
+
}
|
61
|
+
return (t === "string" ? String : Number)(r);
|
62
|
+
}
|
63
|
+
function le(r) {
|
64
|
+
var t = ce(r, "string");
|
65
|
+
return typeof t == "symbol" ? t : t + "";
|
66
|
+
}
|
67
|
+
function fe(r, t) {
|
68
|
+
if (r) {
|
69
|
+
if (typeof r == "string") return x(r, t);
|
70
|
+
var o = {}.toString.call(r).slice(8, -1);
|
71
|
+
return o === "Object" && r.constructor && (o = r.constructor.name), o === "Map" || o === "Set" ? Array.from(r) : o === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o) ? x(r, t) : void 0;
|
72
|
+
}
|
73
|
+
}
|
74
|
+
var Z = {
|
75
|
+
activateTrap: function(t, o) {
|
76
|
+
if (t.length > 0) {
|
77
|
+
var u = t[t.length - 1];
|
78
|
+
u !== o && u._setPausedState(!0);
|
79
|
+
}
|
80
|
+
var m = t.indexOf(o);
|
81
|
+
m === -1 || t.splice(m, 1), t.push(o);
|
82
|
+
},
|
83
|
+
deactivateTrap: function(t, o) {
|
84
|
+
var u = t.indexOf(o);
|
85
|
+
u !== -1 && t.splice(u, 1), t.length > 0 && !t[t.length - 1]._isManuallyPaused() && t[t.length - 1]._setPausedState(!1);
|
86
|
+
}
|
87
|
+
}, de = function(t) {
|
88
|
+
return t.tagName && t.tagName.toLowerCase() === "input" && typeof t.select == "function";
|
89
|
+
}, be = function(t) {
|
90
|
+
return (t == null ? void 0 : t.key) === "Escape" || (t == null ? void 0 : t.key) === "Esc" || (t == null ? void 0 : t.keyCode) === 27;
|
91
|
+
}, L = function(t) {
|
92
|
+
return (t == null ? void 0 : t.key) === "Tab" || (t == null ? void 0 : t.keyCode) === 9;
|
93
|
+
}, ve = function(t) {
|
94
|
+
return L(t) && !t.shiftKey;
|
95
|
+
}, pe = function(t) {
|
96
|
+
return L(t) && t.shiftKey;
|
97
|
+
}, U = function(t) {
|
98
|
+
return setTimeout(t, 0);
|
99
|
+
}, K = function(t) {
|
100
|
+
for (var o = arguments.length, u = new Array(o > 1 ? o - 1 : 0), m = 1; m < o; m++)
|
101
|
+
u[m - 1] = arguments[m];
|
102
|
+
return typeof t == "function" ? t.apply(void 0, u) : t;
|
103
|
+
}, B = function(t) {
|
104
|
+
return t.target.shadowRoot && typeof t.composedPath == "function" ? t.composedPath()[0] : t.target;
|
105
|
+
}, me = [], he = function(t, o) {
|
106
|
+
var u = (o == null ? void 0 : o.document) || document, m = (o == null ? void 0 : o.trapStack) || me, f = X({
|
107
|
+
returnFocusOnDeactivate: !0,
|
108
|
+
escapeDeactivates: !0,
|
109
|
+
delayInitialFocus: !0,
|
110
|
+
isKeyForward: ve,
|
111
|
+
isKeyBackward: pe
|
112
|
+
}, o), a = {
|
113
|
+
// containers given to createFocusTrap()
|
114
|
+
// @type {Array<HTMLElement>}
|
115
|
+
containers: [],
|
116
|
+
// list of objects identifying tabbable nodes in `containers` in the trap
|
117
|
+
// NOTE: it's possible that a group has no tabbable nodes if nodes get removed while the trap
|
118
|
+
// is active, but the trap should never get to a state where there isn't at least one group
|
119
|
+
// with at least one tabbable node in it (that would lead to an error condition that would
|
120
|
+
// result in an error being thrown)
|
121
|
+
// @type {Array<{
|
122
|
+
// container: HTMLElement,
|
123
|
+
// tabbableNodes: Array<HTMLElement>, // empty if none
|
124
|
+
// focusableNodes: Array<HTMLElement>, // empty if none
|
125
|
+
// posTabIndexesFound: boolean,
|
126
|
+
// firstTabbableNode: HTMLElement|undefined,
|
127
|
+
// lastTabbableNode: HTMLElement|undefined,
|
128
|
+
// firstDomTabbableNode: HTMLElement|undefined,
|
129
|
+
// lastDomTabbableNode: HTMLElement|undefined,
|
130
|
+
// nextTabbableNode: (node: HTMLElement, forward: boolean) => HTMLElement|undefined
|
131
|
+
// }>}
|
132
|
+
containerGroups: [],
|
133
|
+
// same order/length as `containers` list
|
134
|
+
// references to objects in `containerGroups`, but only those that actually have
|
135
|
+
// tabbable nodes in them
|
136
|
+
// NOTE: same order as `containers` and `containerGroups`, but __not necessarily__
|
137
|
+
// the same length
|
138
|
+
tabbableGroups: [],
|
139
|
+
nodeFocusedBeforeActivation: null,
|
140
|
+
mostRecentlyFocusedNode: null,
|
141
|
+
active: !1,
|
142
|
+
paused: !1,
|
143
|
+
manuallyPaused: !1,
|
144
|
+
// timer ID for when delayInitialFocus is true and initial focus in this trap
|
145
|
+
// has been delayed during activation
|
146
|
+
delayInitialFocusTimer: void 0,
|
147
|
+
// the most recent KeyboardEvent for the configured nav key (typically [SHIFT+]TAB), if any
|
148
|
+
recentNavEvent: void 0
|
149
|
+
}, h, y = function(e, n, i) {
|
150
|
+
return e && e[n] !== void 0 ? e[n] : f[i || n];
|
151
|
+
}, N = function(e, n) {
|
152
|
+
var i = typeof (n == null ? void 0 : n.composedPath) == "function" ? n.composedPath() : void 0;
|
153
|
+
return a.containerGroups.findIndex(function(c) {
|
154
|
+
var l = c.container, b = c.tabbableNodes;
|
155
|
+
return l.contains(e) || // fall back to explicit tabbable search which will take into consideration any
|
156
|
+
// web components if the `tabbableOptions.getShadowRoot` option was used for
|
157
|
+
// the trap, enabling shadow DOM support in tabbable (`Node.contains()` doesn't
|
158
|
+
// look inside web components even if open)
|
159
|
+
(i == null ? void 0 : i.includes(l)) || b.find(function(s) {
|
160
|
+
return s === e;
|
161
|
+
});
|
162
|
+
});
|
163
|
+
}, T = function(e) {
|
164
|
+
var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = n.hasFallback, c = i === void 0 ? !1 : i, l = n.params, b = l === void 0 ? [] : l, s = f[e];
|
165
|
+
if (typeof s == "function" && (s = s.apply(void 0, se(b))), s === !0 && (s = void 0), !s) {
|
166
|
+
if (s === void 0 || s === !1)
|
167
|
+
return s;
|
168
|
+
throw new Error("`".concat(e, "` was specified but was not a node, or did not return a node"));
|
169
|
+
}
|
170
|
+
var v = s;
|
171
|
+
if (typeof s == "string") {
|
172
|
+
try {
|
173
|
+
v = u.querySelector(s);
|
174
|
+
} catch (p) {
|
175
|
+
throw new Error("`".concat(e, '` appears to be an invalid selector; error="').concat(p.message, '"'));
|
176
|
+
}
|
177
|
+
if (!v && !c)
|
178
|
+
throw new Error("`".concat(e, "` as selector refers to no known node"));
|
179
|
+
}
|
180
|
+
return v;
|
181
|
+
}, E = function() {
|
182
|
+
var e = T("initialFocus", {
|
183
|
+
hasFallback: !0
|
184
|
+
});
|
185
|
+
if (e === !1)
|
186
|
+
return !1;
|
187
|
+
if (e === void 0 || e && !S(e, f.tabbableOptions))
|
188
|
+
if (N(u.activeElement) >= 0)
|
189
|
+
e = u.activeElement;
|
190
|
+
else {
|
191
|
+
var n = a.tabbableGroups[0], i = n && n.firstTabbableNode;
|
192
|
+
e = i || T("fallbackFocus");
|
193
|
+
}
|
194
|
+
else e === null && (e = T("fallbackFocus"));
|
195
|
+
if (!e)
|
196
|
+
throw new Error("Your focus-trap needs to have at least one focusable element");
|
197
|
+
return e;
|
198
|
+
}, P = function() {
|
199
|
+
if (a.containerGroups = a.containers.map(function(e) {
|
200
|
+
var n = ne(e, f.tabbableOptions), i = ae(e, f.tabbableOptions), c = n.length > 0 ? n[0] : void 0, l = n.length > 0 ? n[n.length - 1] : void 0, b = i.find(function(p) {
|
201
|
+
return k(p);
|
202
|
+
}), s = i.slice().reverse().find(function(p) {
|
203
|
+
return k(p);
|
204
|
+
}), v = !!n.find(function(p) {
|
205
|
+
return R(p) > 0;
|
206
|
+
});
|
207
|
+
return {
|
208
|
+
container: e,
|
209
|
+
tabbableNodes: n,
|
210
|
+
focusableNodes: i,
|
211
|
+
/** True if at least one node with positive `tabindex` was found in this container. */
|
212
|
+
posTabIndexesFound: v,
|
213
|
+
/** First tabbable node in container, __tabindex__ order; `undefined` if none. */
|
214
|
+
firstTabbableNode: c,
|
215
|
+
/** Last tabbable node in container, __tabindex__ order; `undefined` if none. */
|
216
|
+
lastTabbableNode: l,
|
217
|
+
// NOTE: DOM order is NOT NECESSARILY "document position" order, but figuring that out
|
218
|
+
// would require more than just https://developer.mozilla.org/en-US/docs/Web/API/Node/compareDocumentPosition
|
219
|
+
// because that API doesn't work with Shadow DOM as well as it should (@see
|
220
|
+
// https://github.com/whatwg/dom/issues/320) and since this first/last is only needed, so far,
|
221
|
+
// to address an edge case related to positive tabindex support, this seems like a much easier,
|
222
|
+
// "close enough most of the time" alternative for positive tabindexes which should generally
|
223
|
+
// be avoided anyway...
|
224
|
+
/** First tabbable node in container, __DOM__ order; `undefined` if none. */
|
225
|
+
firstDomTabbableNode: b,
|
226
|
+
/** Last tabbable node in container, __DOM__ order; `undefined` if none. */
|
227
|
+
lastDomTabbableNode: s,
|
228
|
+
/**
|
229
|
+
* Finds the __tabbable__ node that follows the given node in the specified direction,
|
230
|
+
* in this container, if any.
|
231
|
+
* @param {HTMLElement} node
|
232
|
+
* @param {boolean} [forward] True if going in forward tab order; false if going
|
233
|
+
* in reverse.
|
234
|
+
* @returns {HTMLElement|undefined} The next tabbable node, if any.
|
235
|
+
*/
|
236
|
+
nextTabbableNode: function(F) {
|
237
|
+
var O = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, w = n.indexOf(F);
|
238
|
+
return w < 0 ? O ? i.slice(i.indexOf(F) + 1).find(function(A) {
|
239
|
+
return k(A);
|
240
|
+
}) : i.slice(0, i.indexOf(F)).reverse().find(function(A) {
|
241
|
+
return k(A);
|
242
|
+
}) : n[w + (O ? 1 : -1)];
|
243
|
+
}
|
244
|
+
};
|
245
|
+
}), a.tabbableGroups = a.containerGroups.filter(function(e) {
|
246
|
+
return e.tabbableNodes.length > 0;
|
247
|
+
}), a.tabbableGroups.length <= 0 && !T("fallbackFocus"))
|
248
|
+
throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");
|
249
|
+
if (a.containerGroups.find(function(e) {
|
250
|
+
return e.posTabIndexesFound;
|
251
|
+
}) && a.containerGroups.length > 1)
|
252
|
+
throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.");
|
253
|
+
}, G = function(e) {
|
254
|
+
var n = e.activeElement;
|
255
|
+
if (n)
|
256
|
+
return n.shadowRoot && n.shadowRoot.activeElement !== null ? G(n.shadowRoot) : n;
|
257
|
+
}, g = function(e) {
|
258
|
+
if (e !== !1 && e !== G(document)) {
|
259
|
+
if (!e || !e.focus) {
|
260
|
+
g(E());
|
261
|
+
return;
|
262
|
+
}
|
263
|
+
e.focus({
|
264
|
+
preventScroll: !!f.preventScroll
|
265
|
+
}), a.mostRecentlyFocusedNode = e, de(e) && e.select();
|
266
|
+
}
|
267
|
+
}, M = function(e) {
|
268
|
+
var n = T("setReturnFocus", {
|
269
|
+
params: [e]
|
270
|
+
});
|
271
|
+
return n || (n === !1 ? !1 : e);
|
272
|
+
}, $ = function(e) {
|
273
|
+
var n = e.target, i = e.event, c = e.isBackward, l = c === void 0 ? !1 : c;
|
274
|
+
n = n || B(i), P();
|
275
|
+
var b = null;
|
276
|
+
if (a.tabbableGroups.length > 0) {
|
277
|
+
var s = N(n, i), v = s >= 0 ? a.containerGroups[s] : void 0;
|
278
|
+
if (s < 0)
|
279
|
+
l ? b = a.tabbableGroups[a.tabbableGroups.length - 1].lastTabbableNode : b = a.tabbableGroups[0].firstTabbableNode;
|
280
|
+
else if (l) {
|
281
|
+
var p = a.tabbableGroups.findIndex(function(I) {
|
282
|
+
var _ = I.firstTabbableNode;
|
283
|
+
return n === _;
|
284
|
+
});
|
285
|
+
if (p < 0 && (v.container === n || S(n, f.tabbableOptions) && !k(n, f.tabbableOptions) && !v.nextTabbableNode(n, !1)) && (p = s), p >= 0) {
|
286
|
+
var F = p === 0 ? a.tabbableGroups.length - 1 : p - 1, O = a.tabbableGroups[F];
|
287
|
+
b = R(n) >= 0 ? O.lastTabbableNode : O.lastDomTabbableNode;
|
288
|
+
} else L(i) || (b = v.nextTabbableNode(n, !1));
|
289
|
+
} else {
|
290
|
+
var w = a.tabbableGroups.findIndex(function(I) {
|
291
|
+
var _ = I.lastTabbableNode;
|
292
|
+
return n === _;
|
293
|
+
});
|
294
|
+
if (w < 0 && (v.container === n || S(n, f.tabbableOptions) && !k(n, f.tabbableOptions) && !v.nextTabbableNode(n)) && (w = s), w >= 0) {
|
295
|
+
var A = w === a.tabbableGroups.length - 1 ? 0 : w + 1, J = a.tabbableGroups[A];
|
296
|
+
b = R(n) >= 0 ? J.firstTabbableNode : J.firstDomTabbableNode;
|
297
|
+
} else L(i) || (b = v.nextTabbableNode(n));
|
298
|
+
}
|
299
|
+
} else
|
300
|
+
b = T("fallbackFocus");
|
301
|
+
return b;
|
302
|
+
}, j = function(e) {
|
303
|
+
var n = B(e);
|
304
|
+
if (!(N(n, e) >= 0)) {
|
305
|
+
if (K(f.clickOutsideDeactivates, e)) {
|
306
|
+
h.deactivate({
|
307
|
+
// NOTE: by setting `returnFocus: false`, deactivate() will do nothing,
|
308
|
+
// which will result in the outside click setting focus to the node
|
309
|
+
// that was clicked (and if not focusable, to "nothing"); by setting
|
310
|
+
// `returnFocus: true`, we'll attempt to re-focus the node originally-focused
|
311
|
+
// on activation (or the configured `setReturnFocus` node), whether the
|
312
|
+
// outside click was on a focusable node or not
|
313
|
+
returnFocus: f.returnFocusOnDeactivate
|
314
|
+
});
|
315
|
+
return;
|
316
|
+
}
|
317
|
+
K(f.allowOutsideClick, e) || e.preventDefault();
|
318
|
+
}
|
319
|
+
}, H = function(e) {
|
320
|
+
var n = B(e), i = N(n, e) >= 0;
|
321
|
+
if (i || n instanceof Document)
|
322
|
+
i && (a.mostRecentlyFocusedNode = n);
|
323
|
+
else {
|
324
|
+
e.stopImmediatePropagation();
|
325
|
+
var c, l = !0;
|
326
|
+
if (a.mostRecentlyFocusedNode)
|
327
|
+
if (R(a.mostRecentlyFocusedNode) > 0) {
|
328
|
+
var b = N(a.mostRecentlyFocusedNode), s = a.containerGroups[b].tabbableNodes;
|
329
|
+
if (s.length > 0) {
|
330
|
+
var v = s.findIndex(function(p) {
|
331
|
+
return p === a.mostRecentlyFocusedNode;
|
332
|
+
});
|
333
|
+
v >= 0 && (f.isKeyForward(a.recentNavEvent) ? v + 1 < s.length && (c = s[v + 1], l = !1) : v - 1 >= 0 && (c = s[v - 1], l = !1));
|
334
|
+
}
|
335
|
+
} else
|
336
|
+
a.containerGroups.some(function(p) {
|
337
|
+
return p.tabbableNodes.some(function(F) {
|
338
|
+
return R(F) > 0;
|
339
|
+
});
|
340
|
+
}) || (l = !1);
|
341
|
+
else
|
342
|
+
l = !1;
|
343
|
+
l && (c = $({
|
344
|
+
// move FROM the MRU node, not event-related node (which will be the node that is
|
345
|
+
// outside the trap causing the focus escape we're trying to fix)
|
346
|
+
target: a.mostRecentlyFocusedNode,
|
347
|
+
isBackward: f.isKeyBackward(a.recentNavEvent)
|
348
|
+
})), g(c || a.mostRecentlyFocusedNode || E());
|
349
|
+
}
|
350
|
+
a.recentNavEvent = void 0;
|
351
|
+
}, ee = function(e) {
|
352
|
+
var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
|
353
|
+
a.recentNavEvent = e;
|
354
|
+
var i = $({
|
355
|
+
event: e,
|
356
|
+
isBackward: n
|
357
|
+
});
|
358
|
+
i && (L(e) && e.preventDefault(), g(i));
|
359
|
+
}, q = function(e) {
|
360
|
+
(f.isKeyForward(e) || f.isKeyBackward(e)) && ee(e, f.isKeyBackward(e));
|
361
|
+
}, Y = function(e) {
|
362
|
+
be(e) && K(f.escapeDeactivates, e) !== !1 && (e.preventDefault(), h.deactivate());
|
363
|
+
}, V = function(e) {
|
364
|
+
var n = B(e);
|
365
|
+
N(n, e) >= 0 || K(f.clickOutsideDeactivates, e) || K(f.allowOutsideClick, e) || (e.preventDefault(), e.stopImmediatePropagation());
|
366
|
+
}, W = function() {
|
367
|
+
if (a.active)
|
368
|
+
return Z.activateTrap(m, h), a.delayInitialFocusTimer = f.delayInitialFocus ? U(function() {
|
369
|
+
g(E());
|
370
|
+
}) : g(E()), u.addEventListener("focusin", H, !0), u.addEventListener("mousedown", j, {
|
371
|
+
capture: !0,
|
372
|
+
passive: !1
|
373
|
+
}), u.addEventListener("touchstart", j, {
|
374
|
+
capture: !0,
|
375
|
+
passive: !1
|
376
|
+
}), u.addEventListener("click", V, {
|
377
|
+
capture: !0,
|
378
|
+
passive: !1
|
379
|
+
}), u.addEventListener("keydown", q, {
|
380
|
+
capture: !0,
|
381
|
+
passive: !1
|
382
|
+
}), u.addEventListener("keydown", Y), h;
|
383
|
+
}, z = function() {
|
384
|
+
if (a.active)
|
385
|
+
return u.removeEventListener("focusin", H, !0), u.removeEventListener("mousedown", j, !0), u.removeEventListener("touchstart", j, !0), u.removeEventListener("click", V, !0), u.removeEventListener("keydown", q, !0), u.removeEventListener("keydown", Y), h;
|
386
|
+
}, te = function(e) {
|
387
|
+
var n = e.some(function(i) {
|
388
|
+
var c = Array.from(i.removedNodes);
|
389
|
+
return c.some(function(l) {
|
390
|
+
return l === a.mostRecentlyFocusedNode;
|
391
|
+
});
|
392
|
+
});
|
393
|
+
n && g(E());
|
394
|
+
}, C = typeof window < "u" && "MutationObserver" in window ? new MutationObserver(te) : void 0, D = function() {
|
395
|
+
C && (C.disconnect(), a.active && !a.paused && a.containers.map(function(e) {
|
396
|
+
C.observe(e, {
|
397
|
+
subtree: !0,
|
398
|
+
childList: !0
|
399
|
+
});
|
400
|
+
}));
|
401
|
+
};
|
402
|
+
return h = {
|
403
|
+
get active() {
|
404
|
+
return a.active;
|
405
|
+
},
|
406
|
+
get paused() {
|
407
|
+
return a.paused;
|
408
|
+
},
|
409
|
+
activate: function(e) {
|
410
|
+
if (a.active)
|
411
|
+
return this;
|
412
|
+
var n = y(e, "onActivate"), i = y(e, "onPostActivate"), c = y(e, "checkCanFocusTrap");
|
413
|
+
c || P(), a.active = !0, a.paused = !1, a.nodeFocusedBeforeActivation = u.activeElement, n == null || n();
|
414
|
+
var l = function() {
|
415
|
+
c && P(), W(), D(), i == null || i();
|
416
|
+
};
|
417
|
+
return c ? (c(a.containers.concat()).then(l, l), this) : (l(), this);
|
418
|
+
},
|
419
|
+
deactivate: function(e) {
|
420
|
+
if (!a.active)
|
421
|
+
return this;
|
422
|
+
var n = X({
|
423
|
+
onDeactivate: f.onDeactivate,
|
424
|
+
onPostDeactivate: f.onPostDeactivate,
|
425
|
+
checkCanReturnFocus: f.checkCanReturnFocus
|
426
|
+
}, e);
|
427
|
+
clearTimeout(a.delayInitialFocusTimer), a.delayInitialFocusTimer = void 0, z(), a.active = !1, a.paused = !1, D(), Z.deactivateTrap(m, h);
|
428
|
+
var i = y(n, "onDeactivate"), c = y(n, "onPostDeactivate"), l = y(n, "checkCanReturnFocus"), b = y(n, "returnFocus", "returnFocusOnDeactivate");
|
429
|
+
i == null || i();
|
430
|
+
var s = function() {
|
431
|
+
U(function() {
|
432
|
+
b && g(M(a.nodeFocusedBeforeActivation)), c == null || c();
|
433
|
+
});
|
434
|
+
};
|
435
|
+
return b && l ? (l(M(a.nodeFocusedBeforeActivation)).then(s, s), this) : (s(), this);
|
436
|
+
},
|
437
|
+
pause: function(e) {
|
438
|
+
return a.active ? (a.manuallyPaused = !0, this._setPausedState(!0, e)) : this;
|
439
|
+
},
|
440
|
+
unpause: function(e) {
|
441
|
+
return a.active ? (a.manuallyPaused = !1, m[m.length - 1] !== this ? this : this._setPausedState(!1, e)) : this;
|
442
|
+
},
|
443
|
+
updateContainerElements: function(e) {
|
444
|
+
var n = [].concat(e).filter(Boolean);
|
445
|
+
return a.containers = n.map(function(i) {
|
446
|
+
return typeof i == "string" ? u.querySelector(i) : i;
|
447
|
+
}), a.active && P(), D(), this;
|
448
|
+
}
|
449
|
+
}, Object.defineProperties(h, {
|
450
|
+
_isManuallyPaused: {
|
451
|
+
value: function() {
|
452
|
+
return a.manuallyPaused;
|
453
|
+
}
|
454
|
+
},
|
455
|
+
_setPausedState: {
|
456
|
+
value: function(e, n) {
|
457
|
+
if (a.paused === e)
|
458
|
+
return this;
|
459
|
+
if (a.paused = e, e) {
|
460
|
+
var i = y(n, "onPause"), c = y(n, "onPostPause");
|
461
|
+
i == null || i(), z(), D(), c == null || c();
|
462
|
+
} else {
|
463
|
+
var l = y(n, "onUnpause"), b = y(n, "onPostUnpause");
|
464
|
+
l == null || l(), P(), W(), D(), b == null || b();
|
465
|
+
}
|
466
|
+
return this;
|
467
|
+
}
|
468
|
+
}
|
469
|
+
}), h.updateContainerElements(t), h;
|
470
|
+
};
|
2
471
|
export {
|
3
|
-
|
472
|
+
he as createFocusTrap
|
4
473
|
};
|
package/dist/index284.js
CHANGED
@@ -1,202 +1,4 @@
|
|
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
|
-
};
|
1
|
+
import f from "./index215.js";
|
196
2
|
export {
|
197
|
-
|
198
|
-
R as getTabIndex,
|
199
|
-
X as isFocusable,
|
200
|
-
G as isTabbable,
|
201
|
-
Z as tabbable
|
3
|
+
f as default
|
202
4
|
};
|