@konstructio/ui 0.1.2-alpha.101 → 0.1.2-alpha.103
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/AlertDialogTrigger-CgcsW_ta.js +109 -0
- package/dist/{Breadcrumb-Bmv0vzgt.js → Breadcrumb-Cp3abB2w.js} +1 -1
- package/dist/Checkbox-DzAx7n67.js +249 -0
- package/dist/{CommandInput-CYYsk_31.js → CommandInput-BnvRMfLI.js} +2 -2
- package/dist/{Counter-DWKyr569.js → Counter-CY0xGnVM.js} +2 -2
- package/dist/{DayPicker-CwO8Zff5.js → DayPicker-kweJz134.js} +750 -746
- package/dist/{DropdownButton-Beel5_gN.js → DropdownButton-DnlwdPmb.js} +1 -1
- package/dist/FlagSelectorList-BoYG-_It.js +852 -0
- package/dist/{HamburgerTrigger-7a4POUaM.js → HamburgerTrigger-1vOTrm8-.js} +2 -2
- package/dist/{Input-DG3snJf_.js → Input-CW0VwW2T.js} +4 -4
- package/dist/{Modal-Bcu6LLAp.js → Modal-Bfzggwlr.js} +2 -2
- package/dist/{Spinner-BegZ5yd7.js → Spinner-Lw9mZYhg.js} +1 -1
- package/dist/Switch-WBRr8uOJ.js +196 -0
- package/dist/Toast-ByH-l4XK.js +459 -0
- package/dist/{Wrapper-DwxJAkNQ.js → Wrapper-ClJ_Mham.js} +2 -2
- package/dist/{Wrapper-DtT29fc5.js → Wrapper-XeeD3av7.js} +1 -1
- package/dist/components/Alert/Alert.js +2 -2
- package/dist/components/AlertDialog/AlertDialog.js +1 -1
- package/dist/components/AlertDialog/components/AlertDialogTrigger.js +1 -1
- package/dist/components/AlertDialog/components/index.js +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.js +1 -1
- package/dist/components/Checkbox/Checkbox.js +1 -1
- package/dist/components/Command/Command.js +2 -2
- package/dist/components/Command/components/Command.js +1 -1
- package/dist/components/Command/components/CommandEmpty.js +1 -1
- package/dist/components/Command/components/CommandGroup.js +1 -1
- package/dist/components/Command/components/CommandInput.js +1 -1
- package/dist/components/Command/components/CommandItem.js +1 -1
- package/dist/components/Command/components/CommandList.js +1 -1
- package/dist/components/Command/components/CommandSeparator.js +1 -1
- package/dist/components/Command/components/DialogContent.js +2 -2
- package/dist/components/Command/components/DialogOverlay.js +1 -1
- package/dist/components/Command/components/index.js +1 -1
- package/dist/components/Counter/Counter.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarMonth/CalendarMonth.js +1 -1
- package/dist/components/DateRangePicker/components/DateTimeInputs/components/EndInputFields/EndInputFields.js +1 -1
- package/dist/components/DateRangePicker/components/DateTimeInputs/components/StartInputFields/StartInputFields.js +1 -1
- package/dist/components/Datepicker/DatePicker.js +2 -3
- package/dist/components/Drawer/Drawer.js +2 -2
- package/dist/components/DropdownButton/DropdownButton.js +1 -1
- package/dist/components/Filter/Filter.js +4 -3
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.hook.js +23 -24
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +60 -65
- package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.hook.js +35 -43
- package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.js +40 -45
- package/dist/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.hook.js +33 -34
- package/dist/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.js +45 -51
- package/dist/components/Filter/components/FilterDropdown/FilterDropdown.js +28 -0
- package/dist/components/Filter/components/TextMultiSelect/TextMultiSelect.js +56 -61
- package/dist/components/Filter/components/TimeFilterDropdown/TimeFilterDropdown.hook.js +33 -34
- package/dist/components/Filter/components/TimeFilterDropdown/TimeFilterDropdown.js +70 -75
- package/dist/components/Filter/contexts/filter.provider.js +8 -5
- package/dist/components/Filter/utils/index.js +1 -1
- package/dist/components/Input/Input.js +1 -1
- package/dist/components/LineChart/LineChart.js +1 -1
- package/dist/components/Modal/Modal.js +1 -1
- package/dist/components/Modal/components/Wrapper/Wrapper.js +1 -1
- package/dist/components/Modal/components/index.js +1 -1
- package/dist/components/MultiSelectDropdown/MultiSelectDropdown.js +1 -1
- package/dist/components/MultiSelectDropdown/components/List/List.js +1 -1
- package/dist/components/MultiSelectDropdown/components/Wrapper/Wrapper.js +1 -1
- package/dist/components/MultiSelectDropdown/components/index.js +1 -1
- package/dist/components/PhoneNumberInput/PhoneNumberInput.js +2 -2
- package/dist/components/PhoneNumberInput/components/FlagSelectorList/FlagSelectorList.js +1 -1
- package/dist/components/PhoneNumberInput/components/FlagSelectorWrapper/FlagSelectorWrapper.js +2 -2
- package/dist/components/PhoneNumberInput/components/TruncateText/TruncateText.js +2 -2
- package/dist/components/PhoneNumberInput/components/Wrapper.js +1 -1
- package/dist/components/PhoneNumberInput/components/index.js +2 -2
- package/dist/components/PhoneNumberInput/contexts/index.js +1 -1
- package/dist/components/PhoneNumberInput/contexts/phone-number.provider.js +1 -1
- package/dist/components/PieChart/PieChart.js +1 -1
- package/dist/components/Range/Range.js +1 -1
- package/dist/components/Select/components/List/List.js +1 -1
- package/dist/components/Sidebar/components/HamburgerTrigger/HamburgerTrigger.js +1 -1
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.js +1 -1
- package/dist/components/Sidebar/components/Wrapper/Wrapper.js +1 -1
- package/dist/components/Sidebar/components/index.js +1 -1
- package/dist/components/Slider/Slider.js +1 -1
- package/dist/components/Spinner/Spinner.js +1 -1
- package/dist/components/Switch/Switch.js +1 -1
- package/dist/components/Table/components/Filter.js +1 -1
- package/dist/components/Tabs/Tabs.js +1 -1
- package/dist/components/Tabs/components/Content.js +1 -1
- package/dist/components/Tabs/components/List.js +1 -1
- package/dist/components/Tabs/components/Trigger.js +1 -1
- package/dist/components/TagSelect/TagSelect.js +1 -1
- package/dist/components/TagSelect/components/Wrapper/Wrapper.js +1 -1
- package/dist/components/TagSelect/components/index.js +1 -1
- package/dist/components/Toast/Toast.js +1 -1
- package/dist/components/Tooltip/Tooltip.js +1 -1
- package/dist/components/VirtualizedTable/VirtualizedTable.js +87 -87
- package/dist/components/VirtualizedTable/components/Actions/Actions.js +19 -19
- package/dist/components/VirtualizedTable/components/Body/Body.js +50 -49
- package/dist/components/VirtualizedTable/components/DropdownPaginate/DropdownPaginate.js +67 -21
- package/dist/components/VirtualizedTable/components/ExpandableRow/ExpandableRow.js +1 -1
- package/dist/components/VirtualizedTable/components/Filter/Filter.js +53 -63
- package/dist/components/VirtualizedTable/components/FormPaginate/FormPaginate.js +10 -10
- package/dist/components/VirtualizedTable/components/Header/Header.js +47 -34
- package/dist/components/VirtualizedTable/components/Pagination/Pagination.js +19 -15
- package/dist/components/VirtualizedTable/components/Skeleton/Skeleton.js +10 -10
- package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.js +1 -1
- package/dist/components/VirtualizedTable/components/WrapperBody/WrapperBody.js +8 -8
- package/dist/components/VirtualizedTable/contexts/index.js +1 -1
- package/dist/components/VirtualizedTable/contexts/table.context.js +1 -0
- package/dist/components/VirtualizedTable/contexts/table.provider.js +1 -1
- package/dist/components/index.js +10 -10
- package/dist/{components-CYt24H4n.js → components-BIHlj4yH.js} +1 -1
- package/dist/{debounce-KoeGNmnW.js → debounce-C5Ycjilj.js} +14 -14
- package/dist/dist-2bGlmy8N2.js +165 -0
- package/dist/dist-BiJrNvNo.js +193 -0
- package/dist/dist-BuFiu480.js +13 -0
- package/dist/dist-C2aTw0m62.js +1320 -0
- package/dist/{dist-DvoMuWKO2.js → dist-C2s4VX-42.js} +4 -4
- package/dist/dist-CT6d9xe7.js +441 -0
- package/dist/dist-CTvBzxW8.js +31 -0
- package/dist/dist-CVDFmWf2.js +358 -0
- package/dist/dist-D4FePjTS.js +194 -0
- package/dist/dist-DISvWx7U.js +99 -0
- package/dist/dist-Db6UeFo4.js +291 -0
- package/dist/{dist-DGO9opgu.js → dist-Dse3gSmZ.js} +49 -49
- package/dist/dist-j7FOUrFU.js +206 -0
- package/dist/{dist-C8NWUTUh.js → dist-l-aDnQZC.js} +1 -1
- package/dist/es2015-BWf6xQHm.js +222 -0
- package/dist/index.js +10 -10
- package/dist/{isObject-1ZmdWuhC.js → isObject-BeFFiVJK.js} +8 -8
- package/dist/lib/components/Alert/Alert.types.d.ts +1 -1
- package/dist/lib/components/AlertDialog/AlertDialog.types.d.ts +1 -1
- package/dist/lib/components/AlertDialog/components/AlertDialogTrigger.types.d.ts +2 -2
- package/dist/lib/components/Autocomplete/Autocomplete.types.d.ts +1 -1
- package/dist/lib/components/Breadcrumb/Breadcrumb.types.d.ts +1 -1
- package/dist/lib/components/Breadcrumb/components/BackButton/BackButton.types.d.ts +1 -1
- package/dist/lib/components/Breadcrumb/components/Item/Item.types.d.ts +1 -1
- package/dist/lib/components/Button/Button.types.d.ts +1 -1
- package/dist/lib/components/ButtonGroup/ButtonGroup.types.d.ts +1 -1
- package/dist/lib/components/Card/Card.types.d.ts +1 -1
- package/dist/lib/components/Checkbox/Checkbox.types.d.ts +1 -1
- package/dist/lib/components/Command/Command.types.d.ts +1 -1
- package/dist/lib/components/Counter/Counter.types.d.ts +1 -1
- package/dist/lib/components/DateRangePicker/DateRangePicker.types.d.ts +1 -1
- package/dist/lib/components/Drawer/Drawer.types.d.ts +1 -1
- package/dist/lib/components/Filter/Filter.types.d.ts +1 -1
- package/dist/lib/components/Filter/components/BadgeDropdown/BadgeMultiSelect.hook.d.ts +2 -3
- package/dist/lib/components/Filter/components/DateFilterDropdown/DateFilterDropdown.hook.d.ts +1 -2
- package/dist/lib/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.hook.d.ts +2 -3
- package/dist/lib/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.types.d.ts +1 -1
- package/dist/lib/components/Filter/components/FilterDropdown/FilterDropdown.d.ts +3 -0
- package/dist/lib/components/Filter/components/FilterDropdown/FilterDropdown.types.d.ts +9 -0
- package/dist/lib/components/Filter/components/ResetButton/ResetButton.types.d.ts +1 -1
- package/dist/lib/components/Filter/components/TimeFilterDropdown/TimeFilterDropdown.hook.d.ts +1 -2
- package/dist/lib/components/Filter/contexts/filter.context.d.ts +1 -0
- package/dist/lib/components/ImageUpload/ImageUpload.types.d.ts +1 -1
- package/dist/lib/components/Input/Input.types.d.ts +1 -1
- package/dist/lib/components/LineChart/LineChart.types.d.ts +1 -1
- package/dist/lib/components/Loading/Loading.types.d.ts +1 -1
- package/dist/lib/components/Modal/Modal.types.d.ts +1 -1
- package/dist/lib/components/Modal/components/Wrapper/Wrapper.types.d.ts +1 -1
- package/dist/lib/components/MultiSelectDropdown/components/Item/Item.types.d.ts +1 -1
- package/dist/lib/components/MultiSelectDropdown/components/List/List.types.d.ts +1 -1
- package/dist/lib/components/MultiSelectDropdown/components/Wrapper/Wrapper.types.d.ts +1 -1
- package/dist/lib/components/ProgressBar/ProgressBar.types.d.ts +1 -1
- package/dist/lib/components/Radio/Radio.types.d.ts +1 -1
- package/dist/lib/components/RadioCard/RadioCard.types.d.ts +1 -1
- package/dist/lib/components/RadioCardGroup/RadioCardGroup.types.d.ts +1 -1
- package/dist/lib/components/RadioGroup/RadioGroup.types.d.ts +1 -1
- package/dist/lib/components/Range/Range.types.d.ts +1 -1
- package/dist/lib/components/Select/Select.types.d.ts +1 -1
- package/dist/lib/components/Sidebar/Sidebar.types.d.ts +2 -2
- package/dist/lib/components/Sidebar/components/Label/Label.types.d.ts +1 -1
- package/dist/lib/components/Slider/Slider.types.d.ts +1 -1
- package/dist/lib/components/Spinner/Spinner.types.d.ts +2 -2
- package/dist/lib/components/Stepper/Stepper.types.d.ts +1 -1
- package/dist/lib/components/Stepper/components/StepItem/StepItem.types.d.ts +1 -1
- package/dist/lib/components/Switch/Switch.types.d.ts +1 -1
- package/dist/lib/components/Table/Table.types.d.ts +1 -1
- package/dist/lib/components/Tabs/Tabs.types.d.ts +1 -1
- package/dist/lib/components/TagSelect/TagSelect.types.d.ts +1 -1
- package/dist/lib/components/TagSelect/components/Item/Item.types.d.ts +2 -2
- package/dist/lib/components/TagSelect/components/List/List.types.d.ts +1 -1
- package/dist/lib/components/TagSelect/components/Wrapper/Wrapper.types.d.ts +1 -1
- package/dist/lib/components/TagSelect/contexts/TagSelect.types.d.ts +1 -1
- package/dist/lib/components/TextArea/TextArea.types.d.ts +1 -1
- package/dist/lib/components/Toast/Toast.types.d.ts +1 -1
- package/dist/lib/components/Typography/Typography.types.d.ts +1 -1
- package/dist/lib/components/VirtualizedTable/VirtualizedTable.types.d.ts +27 -3
- package/dist/lib/components/VirtualizedTable/components/Body/Body.d.ts +1 -1
- package/dist/lib/components/VirtualizedTable/components/Body/Body.types.d.ts +1 -0
- package/dist/lib/components/VirtualizedTable/components/DropdownPaginate/DropdownPaginate.types.d.ts +2 -0
- package/dist/lib/components/VirtualizedTable/components/Filter/Filter.types.d.ts +1 -1
- package/dist/lib/components/VirtualizedTable/components/Header/Header.d.ts +1 -1
- package/dist/lib/components/VirtualizedTable/components/Header/Header.types.d.ts +1 -0
- package/dist/lib/components/VirtualizedTable/components/Pagination/Pagination.types.d.ts +2 -0
- package/dist/lib/components/VirtualizedTable/components/TruncateText/TruncateText.types.d.ts +1 -1
- package/dist/lib/components/VirtualizedTable/contexts/table.context.d.ts +2 -0
- package/dist/lib/components/VirtualizedTable/contexts/table.provider.d.ts +1 -1
- package/dist/lib/components/VirtualizedTable/contexts/table.types.d.ts +1 -0
- package/dist/lib/contexts/theme.context.d.ts +1 -1
- package/dist/lib/contexts/theme.hook.d.ts +1 -1
- package/dist/package.json +34 -33
- package/dist/{phone-number.provider-CJJOFYk-.js → phone-number.provider-BxQCTxp8.js} +457 -457
- package/dist/{prop-types-CaJpPVsa.js → prop-types-CfEYxTbR.js} +52 -52
- package/dist/styles.css +1 -1
- package/dist/{table.provider-9uUt5a-s.js → table.provider-2sAkE7z_.js} +395 -368
- package/dist/{utils-B6A9pnrH.js → utils-B-BTGYA5.js} +193 -193
- package/dist/{x-CESTrenk.js → x-BI9jmc7e.js} +1 -1
- package/package.json +34 -33
- package/dist/AlertDialogTrigger-HhbFOOUE.js +0 -124
- package/dist/Checkbox-B1rTwzR3.js +0 -240
- package/dist/FlagSelectorList-BARhzfj2.js +0 -848
- package/dist/Switch-1RGhhTtg.js +0 -178
- package/dist/Toast-CS-igZor.js +0 -467
- package/dist/dist-7edduNXi.js +0 -398
- package/dist/dist-BkYHh2kH.js +0 -408
- package/dist/dist-C6Cif8-U.js +0 -28
- package/dist/dist-CeuUxVmT.js +0 -13
- package/dist/dist-CfYOvauX.js +0 -125
- package/dist/dist-CktbIsHq.js +0 -264
- package/dist/dist-DGqWMRtc.js +0 -183
- package/dist/dist-DdFwUrO22.js +0 -11
- package/dist/dist-DnGj9MTf.js +0 -1692
- package/dist/dist-eAwtFCCA.js +0 -87
- /package/dist/{dist-AihTpWdF2.js → dist-AihTpWdF.js} +0 -0
package/dist/dist-7edduNXi.js
DELETED
|
@@ -1,398 +0,0 @@
|
|
|
1
|
-
import { a as T, n as ae } from "./dist-DqKFpce5.js";
|
|
2
|
-
import { t as R } from "./dist-CVy-ulDZ.js";
|
|
3
|
-
import { a as se, i as P, t as ie } from "./dist-CfYOvauX.js";
|
|
4
|
-
import { t as L } from "./dist-CeuUxVmT.js";
|
|
5
|
-
import { t as j } from "./dist-ppXKUlVt.js";
|
|
6
|
-
import { a as ce, r as ue, t as le } from "./dist-DGqWMRtc.js";
|
|
7
|
-
import { t as W } from "./dist-eAwtFCCA.js";
|
|
8
|
-
import { t as fe } from "./Combination-cjXRJS03.js";
|
|
9
|
-
import * as i from "react";
|
|
10
|
-
import { Fragment as de, jsx as u } from "react/jsx-runtime";
|
|
11
|
-
var k = "focusScope.autoFocusOnMount", U = "focusScope.autoFocusOnUnmount", V = {
|
|
12
|
-
bubbles: !1,
|
|
13
|
-
cancelable: !0
|
|
14
|
-
}, pe = "FocusScope", Z = i.forwardRef((e, o) => {
|
|
15
|
-
const { loop: t = !1, trapped: n = !1, onMountAutoFocus: a, onUnmountAutoFocus: r, ...d } = e, [s, _] = i.useState(null), h = j(a), E = j(r), c = i.useRef(null), f = T(o, _), p = i.useRef({
|
|
16
|
-
paused: !1,
|
|
17
|
-
pause() {
|
|
18
|
-
this.paused = !0;
|
|
19
|
-
},
|
|
20
|
-
resume() {
|
|
21
|
-
this.paused = !1;
|
|
22
|
-
}
|
|
23
|
-
}).current;
|
|
24
|
-
i.useEffect(() => {
|
|
25
|
-
if (n) {
|
|
26
|
-
let l = function(y) {
|
|
27
|
-
if (p.paused || !s) return;
|
|
28
|
-
const m = y.target;
|
|
29
|
-
s.contains(m) ? c.current = m : b(c.current, { select: !0 });
|
|
30
|
-
}, v = function(y) {
|
|
31
|
-
if (p.paused || !s) return;
|
|
32
|
-
const m = y.relatedTarget;
|
|
33
|
-
m !== null && (s.contains(m) || b(c.current, { select: !0 }));
|
|
34
|
-
}, D = function(y) {
|
|
35
|
-
if (document.activeElement === document.body)
|
|
36
|
-
for (const m of y) m.removedNodes.length > 0 && b(s);
|
|
37
|
-
};
|
|
38
|
-
document.addEventListener("focusin", l), document.addEventListener("focusout", v);
|
|
39
|
-
const F = new MutationObserver(D);
|
|
40
|
-
return s && F.observe(s, {
|
|
41
|
-
childList: !0,
|
|
42
|
-
subtree: !0
|
|
43
|
-
}), () => {
|
|
44
|
-
document.removeEventListener("focusin", l), document.removeEventListener("focusout", v), F.disconnect();
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
}, [
|
|
48
|
-
n,
|
|
49
|
-
s,
|
|
50
|
-
p.paused
|
|
51
|
-
]), i.useEffect(() => {
|
|
52
|
-
if (s) {
|
|
53
|
-
q.add(p);
|
|
54
|
-
const l = document.activeElement;
|
|
55
|
-
if (!s.contains(l)) {
|
|
56
|
-
const v = new CustomEvent(k, V);
|
|
57
|
-
s.addEventListener(k, h), s.dispatchEvent(v), v.defaultPrevented || (ve(he(z(s)), { select: !0 }), document.activeElement === l && b(s));
|
|
58
|
-
}
|
|
59
|
-
return () => {
|
|
60
|
-
s.removeEventListener(k, h), setTimeout(() => {
|
|
61
|
-
const v = new CustomEvent(U, V);
|
|
62
|
-
s.addEventListener(U, E), s.dispatchEvent(v), v.defaultPrevented || b(l ?? document.body, { select: !0 }), s.removeEventListener(U, E), q.remove(p);
|
|
63
|
-
}, 0);
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
}, [
|
|
67
|
-
s,
|
|
68
|
-
h,
|
|
69
|
-
E,
|
|
70
|
-
p
|
|
71
|
-
]);
|
|
72
|
-
const N = i.useCallback((l) => {
|
|
73
|
-
if (!t && !n || p.paused) return;
|
|
74
|
-
const v = l.key === "Tab" && !l.altKey && !l.ctrlKey && !l.metaKey, D = document.activeElement;
|
|
75
|
-
if (v && D) {
|
|
76
|
-
const F = l.currentTarget, [y, m] = me(F);
|
|
77
|
-
y && m ? !l.shiftKey && D === m ? (l.preventDefault(), t && b(y, { select: !0 })) : l.shiftKey && D === y && (l.preventDefault(), t && b(m, { select: !0 })) : D === F && l.preventDefault();
|
|
78
|
-
}
|
|
79
|
-
}, [
|
|
80
|
-
t,
|
|
81
|
-
n,
|
|
82
|
-
p.paused
|
|
83
|
-
]);
|
|
84
|
-
return /* @__PURE__ */ u(R.div, {
|
|
85
|
-
tabIndex: -1,
|
|
86
|
-
...d,
|
|
87
|
-
ref: f,
|
|
88
|
-
onKeyDown: N
|
|
89
|
-
});
|
|
90
|
-
});
|
|
91
|
-
Z.displayName = pe;
|
|
92
|
-
function ve(e, { select: o = !1 } = {}) {
|
|
93
|
-
const t = document.activeElement;
|
|
94
|
-
for (const n of e)
|
|
95
|
-
if (b(n, { select: o }), document.activeElement !== t) return;
|
|
96
|
-
}
|
|
97
|
-
function me(e) {
|
|
98
|
-
const o = z(e);
|
|
99
|
-
return [$(o, e), $(o.reverse(), e)];
|
|
100
|
-
}
|
|
101
|
-
function z(e) {
|
|
102
|
-
const o = [], t = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, { acceptNode: (n) => {
|
|
103
|
-
const a = n.tagName === "INPUT" && n.type === "hidden";
|
|
104
|
-
return n.disabled || n.hidden || a ? NodeFilter.FILTER_SKIP : n.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
105
|
-
} });
|
|
106
|
-
for (; t.nextNode(); ) o.push(t.currentNode);
|
|
107
|
-
return o;
|
|
108
|
-
}
|
|
109
|
-
function $(e, o) {
|
|
110
|
-
for (const t of e) if (!ge(t, { upTo: o })) return t;
|
|
111
|
-
}
|
|
112
|
-
function ge(e, { upTo: o }) {
|
|
113
|
-
if (getComputedStyle(e).visibility === "hidden") return !0;
|
|
114
|
-
for (; e; ) {
|
|
115
|
-
if (o !== void 0 && e === o) return !1;
|
|
116
|
-
if (getComputedStyle(e).display === "none") return !0;
|
|
117
|
-
e = e.parentElement;
|
|
118
|
-
}
|
|
119
|
-
return !1;
|
|
120
|
-
}
|
|
121
|
-
function Ee(e) {
|
|
122
|
-
return e instanceof HTMLInputElement && "select" in e;
|
|
123
|
-
}
|
|
124
|
-
function b(e, { select: o = !1 } = {}) {
|
|
125
|
-
if (e && e.focus) {
|
|
126
|
-
const t = document.activeElement;
|
|
127
|
-
e.focus({ preventScroll: !0 }), e !== t && Ee(e) && o && e.select();
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
var q = ye();
|
|
131
|
-
function ye() {
|
|
132
|
-
let e = [];
|
|
133
|
-
return {
|
|
134
|
-
add(o) {
|
|
135
|
-
const t = e[0];
|
|
136
|
-
o !== t && t?.pause(), e = B(e, o), e.unshift(o);
|
|
137
|
-
},
|
|
138
|
-
remove(o) {
|
|
139
|
-
e = B(e, o), e[0]?.resume();
|
|
140
|
-
}
|
|
141
|
-
};
|
|
142
|
-
}
|
|
143
|
-
function B(e, o) {
|
|
144
|
-
const t = [...e], n = t.indexOf(o);
|
|
145
|
-
return n !== -1 && t.splice(n, 1), t;
|
|
146
|
-
}
|
|
147
|
-
function he(e) {
|
|
148
|
-
return e.filter((o) => o.tagName !== "A");
|
|
149
|
-
}
|
|
150
|
-
var M = 0, C = null;
|
|
151
|
-
function De() {
|
|
152
|
-
i.useEffect(() => {
|
|
153
|
-
C || (C = {
|
|
154
|
-
start: Y(),
|
|
155
|
-
end: Y()
|
|
156
|
-
});
|
|
157
|
-
const { start: e, end: o } = C;
|
|
158
|
-
return document.body.firstElementChild !== e && document.body.insertAdjacentElement("afterbegin", e), document.body.lastElementChild !== o && document.body.insertAdjacentElement("beforeend", o), M++, () => {
|
|
159
|
-
M === 1 && (C?.start.remove(), C?.end.remove(), C = null), M = Math.max(0, M - 1);
|
|
160
|
-
};
|
|
161
|
-
}, []);
|
|
162
|
-
}
|
|
163
|
-
function Y() {
|
|
164
|
-
const e = document.createElement("span");
|
|
165
|
-
return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.outline = "none", e.style.opacity = "0", e.style.position = "fixed", e.style.pointerEvents = "none", e;
|
|
166
|
-
}
|
|
167
|
-
var be = function(e) {
|
|
168
|
-
return typeof document > "u" ? null : (Array.isArray(e) ? e[0] : e).ownerDocument.body;
|
|
169
|
-
}, O = /* @__PURE__ */ new WeakMap(), S = /* @__PURE__ */ new WeakMap(), w = {}, K = 0, J = function(e) {
|
|
170
|
-
return e && (e.host || J(e.parentNode));
|
|
171
|
-
}, Ce = function(e, o) {
|
|
172
|
-
return o.map(function(t) {
|
|
173
|
-
if (e.contains(t)) return t;
|
|
174
|
-
var n = J(t);
|
|
175
|
-
return n && e.contains(n) ? n : (console.error("aria-hidden", t, "in not contained inside", e, ". Doing nothing"), null);
|
|
176
|
-
}).filter(function(t) {
|
|
177
|
-
return !!t;
|
|
178
|
-
});
|
|
179
|
-
}, Oe = function(e, o, t, n) {
|
|
180
|
-
var a = Ce(o, Array.isArray(e) ? e : [e]);
|
|
181
|
-
w[t] || (w[t] = /* @__PURE__ */ new WeakMap());
|
|
182
|
-
var r = w[t], d = [], s = /* @__PURE__ */ new Set(), _ = new Set(a), h = function(c) {
|
|
183
|
-
!c || s.has(c) || (s.add(c), h(c.parentNode));
|
|
184
|
-
};
|
|
185
|
-
a.forEach(h);
|
|
186
|
-
var E = function(c) {
|
|
187
|
-
!c || _.has(c) || Array.prototype.forEach.call(c.children, function(f) {
|
|
188
|
-
if (s.has(f)) E(f);
|
|
189
|
-
else try {
|
|
190
|
-
var p = f.getAttribute(n), N = p !== null && p !== "false", l = (O.get(f) || 0) + 1, v = (r.get(f) || 0) + 1;
|
|
191
|
-
O.set(f, l), r.set(f, v), d.push(f), l === 1 && N && S.set(f, !0), v === 1 && f.setAttribute(t, "true"), N || f.setAttribute(n, "true");
|
|
192
|
-
} catch (D) {
|
|
193
|
-
console.error("aria-hidden: cannot operate on ", f, D);
|
|
194
|
-
}
|
|
195
|
-
});
|
|
196
|
-
};
|
|
197
|
-
return E(o), s.clear(), K++, function() {
|
|
198
|
-
d.forEach(function(c) {
|
|
199
|
-
var f = O.get(c) - 1, p = r.get(c) - 1;
|
|
200
|
-
O.set(c, f), r.set(c, p), f || (S.has(c) || c.removeAttribute(n), S.delete(c)), p || c.removeAttribute(t);
|
|
201
|
-
}), K--, K || (O = /* @__PURE__ */ new WeakMap(), O = /* @__PURE__ */ new WeakMap(), S = /* @__PURE__ */ new WeakMap(), w = {});
|
|
202
|
-
};
|
|
203
|
-
}, Ae = function(e, o, t) {
|
|
204
|
-
t === void 0 && (t = "data-aria-hidden");
|
|
205
|
-
var n = Array.from(Array.isArray(e) ? e : [e]), a = o || be(e);
|
|
206
|
-
return a ? (n.push.apply(n, Array.from(a.querySelectorAll("[aria-live], script"))), Oe(n, a, t, "aria-hidden")) : function() {
|
|
207
|
-
return null;
|
|
208
|
-
};
|
|
209
|
-
}, x = "Dialog", [Q, Ye] = se(x), [Re, g] = Q(x), _e = (e) => {
|
|
210
|
-
const { __scopeDialog: o, children: t, open: n, defaultOpen: a, onOpenChange: r, modal: d = !0 } = e, s = i.useRef(null), _ = i.useRef(null), [h, E] = ie({
|
|
211
|
-
prop: n,
|
|
212
|
-
defaultProp: a ?? !1,
|
|
213
|
-
onChange: r,
|
|
214
|
-
caller: x
|
|
215
|
-
});
|
|
216
|
-
return /* @__PURE__ */ u(Re, {
|
|
217
|
-
scope: o,
|
|
218
|
-
triggerRef: s,
|
|
219
|
-
contentRef: _,
|
|
220
|
-
contentId: L(),
|
|
221
|
-
titleId: L(),
|
|
222
|
-
descriptionId: L(),
|
|
223
|
-
open: h,
|
|
224
|
-
onOpenChange: E,
|
|
225
|
-
onOpenToggle: i.useCallback(() => E((c) => !c), [E]),
|
|
226
|
-
modal: d,
|
|
227
|
-
children: t
|
|
228
|
-
});
|
|
229
|
-
};
|
|
230
|
-
_e.displayName = x;
|
|
231
|
-
var X = "DialogTrigger", Fe = i.forwardRef((e, o) => {
|
|
232
|
-
const { __scopeDialog: t, ...n } = e, a = g(X, t), r = T(o, a.triggerRef);
|
|
233
|
-
return /* @__PURE__ */ u(R.button, {
|
|
234
|
-
type: "button",
|
|
235
|
-
"aria-haspopup": "dialog",
|
|
236
|
-
"aria-expanded": a.open,
|
|
237
|
-
"aria-controls": a.open ? a.contentId : void 0,
|
|
238
|
-
"data-state": H(a.open),
|
|
239
|
-
...n,
|
|
240
|
-
ref: r,
|
|
241
|
-
onClick: P(e.onClick, a.onOpenToggle)
|
|
242
|
-
});
|
|
243
|
-
});
|
|
244
|
-
Fe.displayName = X;
|
|
245
|
-
var G = "DialogPortal", [Pe, ee] = Q(G, { forceMount: void 0 }), Ne = (e) => {
|
|
246
|
-
const { __scopeDialog: o, forceMount: t, children: n, container: a } = e, r = g(G, o);
|
|
247
|
-
return /* @__PURE__ */ u(Pe, {
|
|
248
|
-
scope: o,
|
|
249
|
-
forceMount: t,
|
|
250
|
-
children: i.Children.map(n, (d) => /* @__PURE__ */ u(W, {
|
|
251
|
-
present: t || r.open,
|
|
252
|
-
children: /* @__PURE__ */ u(le, {
|
|
253
|
-
asChild: !0,
|
|
254
|
-
container: a,
|
|
255
|
-
children: d
|
|
256
|
-
})
|
|
257
|
-
}))
|
|
258
|
-
});
|
|
259
|
-
};
|
|
260
|
-
Ne.displayName = G;
|
|
261
|
-
var I = "DialogOverlay", Me = i.forwardRef((e, o) => {
|
|
262
|
-
const t = ee(I, e.__scopeDialog), { forceMount: n = t.forceMount, ...a } = e, r = g(I, e.__scopeDialog);
|
|
263
|
-
return r.modal ? /* @__PURE__ */ u(W, {
|
|
264
|
-
present: n || r.open,
|
|
265
|
-
children: /* @__PURE__ */ u(we, {
|
|
266
|
-
...a,
|
|
267
|
-
ref: o
|
|
268
|
-
})
|
|
269
|
-
}) : null;
|
|
270
|
-
});
|
|
271
|
-
Me.displayName = I;
|
|
272
|
-
var Se = ae("DialogOverlay.RemoveScroll"), we = i.forwardRef((e, o) => {
|
|
273
|
-
const { __scopeDialog: t, ...n } = e, a = g(I, t), r = T(o, ce());
|
|
274
|
-
return /* @__PURE__ */ u(fe, {
|
|
275
|
-
as: Se,
|
|
276
|
-
allowPinchZoom: !0,
|
|
277
|
-
shards: [a.contentRef],
|
|
278
|
-
children: /* @__PURE__ */ u(R.div, {
|
|
279
|
-
"data-state": H(a.open),
|
|
280
|
-
...n,
|
|
281
|
-
ref: r,
|
|
282
|
-
style: {
|
|
283
|
-
pointerEvents: "auto",
|
|
284
|
-
...n.style
|
|
285
|
-
}
|
|
286
|
-
})
|
|
287
|
-
});
|
|
288
|
-
}), A = "DialogContent", Ie = i.forwardRef((e, o) => {
|
|
289
|
-
const t = ee(A, e.__scopeDialog), { forceMount: n = t.forceMount, ...a } = e, r = g(A, e.__scopeDialog);
|
|
290
|
-
return /* @__PURE__ */ u(W, {
|
|
291
|
-
present: n || r.open,
|
|
292
|
-
children: r.modal ? /* @__PURE__ */ u(Te, {
|
|
293
|
-
...a,
|
|
294
|
-
ref: o
|
|
295
|
-
}) : /* @__PURE__ */ u(xe, {
|
|
296
|
-
...a,
|
|
297
|
-
ref: o
|
|
298
|
-
})
|
|
299
|
-
});
|
|
300
|
-
});
|
|
301
|
-
Ie.displayName = A;
|
|
302
|
-
var Te = i.forwardRef((e, o) => {
|
|
303
|
-
const t = g(A, e.__scopeDialog), n = i.useRef(null), a = T(o, t.contentRef, n);
|
|
304
|
-
return i.useEffect(() => {
|
|
305
|
-
const r = n.current;
|
|
306
|
-
if (r) return Ae(r);
|
|
307
|
-
}, []), /* @__PURE__ */ u(te, {
|
|
308
|
-
...e,
|
|
309
|
-
ref: a,
|
|
310
|
-
trapFocus: t.open,
|
|
311
|
-
disableOutsidePointerEvents: t.open,
|
|
312
|
-
onCloseAutoFocus: P(e.onCloseAutoFocus, (r) => {
|
|
313
|
-
r.preventDefault(), t.triggerRef.current?.focus();
|
|
314
|
-
}),
|
|
315
|
-
onPointerDownOutside: P(e.onPointerDownOutside, (r) => {
|
|
316
|
-
const d = r.detail.originalEvent, s = d.button === 0 && d.ctrlKey === !0;
|
|
317
|
-
(d.button === 2 || s) && r.preventDefault();
|
|
318
|
-
}),
|
|
319
|
-
onFocusOutside: P(e.onFocusOutside, (r) => r.preventDefault())
|
|
320
|
-
});
|
|
321
|
-
}), xe = i.forwardRef((e, o) => {
|
|
322
|
-
const t = g(A, e.__scopeDialog), n = i.useRef(!1), a = i.useRef(!1);
|
|
323
|
-
return /* @__PURE__ */ u(te, {
|
|
324
|
-
...e,
|
|
325
|
-
ref: o,
|
|
326
|
-
trapFocus: !1,
|
|
327
|
-
disableOutsidePointerEvents: !1,
|
|
328
|
-
onCloseAutoFocus: (r) => {
|
|
329
|
-
e.onCloseAutoFocus?.(r), r.defaultPrevented || (n.current || t.triggerRef.current?.focus(), r.preventDefault()), n.current = !1, a.current = !1;
|
|
330
|
-
},
|
|
331
|
-
onInteractOutside: (r) => {
|
|
332
|
-
e.onInteractOutside?.(r), r.defaultPrevented || (n.current = !0, r.detail.originalEvent.type === "pointerdown" && (a.current = !0));
|
|
333
|
-
const d = r.target;
|
|
334
|
-
t.triggerRef.current?.contains(d) && r.preventDefault(), r.detail.originalEvent.type === "focusin" && a.current && r.preventDefault();
|
|
335
|
-
}
|
|
336
|
-
});
|
|
337
|
-
}), te = i.forwardRef((e, o) => {
|
|
338
|
-
const { __scopeDialog: t, trapFocus: n, onOpenAutoFocus: a, onCloseAutoFocus: r, ...d } = e, s = g(A, t);
|
|
339
|
-
return De(), /* @__PURE__ */ u(de, { children: /* @__PURE__ */ u(Z, {
|
|
340
|
-
asChild: !0,
|
|
341
|
-
loop: !0,
|
|
342
|
-
trapped: n,
|
|
343
|
-
onMountAutoFocus: a,
|
|
344
|
-
onUnmountAutoFocus: r,
|
|
345
|
-
children: /* @__PURE__ */ u(ue, {
|
|
346
|
-
role: "dialog",
|
|
347
|
-
id: s.contentId,
|
|
348
|
-
"aria-describedby": s.descriptionId,
|
|
349
|
-
"aria-labelledby": s.titleId,
|
|
350
|
-
"data-state": H(s.open),
|
|
351
|
-
...d,
|
|
352
|
-
ref: o,
|
|
353
|
-
deferPointerDownOutside: !0,
|
|
354
|
-
onDismiss: () => s.onOpenChange(!1)
|
|
355
|
-
})
|
|
356
|
-
}) });
|
|
357
|
-
}), oe = "DialogTitle", Le = i.forwardRef((e, o) => {
|
|
358
|
-
const { __scopeDialog: t, ...n } = e, a = g(oe, t);
|
|
359
|
-
return /* @__PURE__ */ u(R.h2, {
|
|
360
|
-
id: a.titleId,
|
|
361
|
-
...n,
|
|
362
|
-
ref: o
|
|
363
|
-
});
|
|
364
|
-
});
|
|
365
|
-
Le.displayName = oe;
|
|
366
|
-
var ne = "DialogDescription", ke = i.forwardRef((e, o) => {
|
|
367
|
-
const { __scopeDialog: t, ...n } = e, a = g(ne, t);
|
|
368
|
-
return /* @__PURE__ */ u(R.p, {
|
|
369
|
-
id: a.descriptionId,
|
|
370
|
-
...n,
|
|
371
|
-
ref: o
|
|
372
|
-
});
|
|
373
|
-
});
|
|
374
|
-
ke.displayName = ne;
|
|
375
|
-
var re = "DialogClose", Ue = i.forwardRef((e, o) => {
|
|
376
|
-
const { __scopeDialog: t, ...n } = e, a = g(re, t);
|
|
377
|
-
return /* @__PURE__ */ u(R.button, {
|
|
378
|
-
type: "button",
|
|
379
|
-
...n,
|
|
380
|
-
ref: o,
|
|
381
|
-
onClick: P(e.onClick, () => a.onOpenChange(!1))
|
|
382
|
-
});
|
|
383
|
-
});
|
|
384
|
-
Ue.displayName = re;
|
|
385
|
-
function H(e) {
|
|
386
|
-
return e ? "open" : "closed";
|
|
387
|
-
}
|
|
388
|
-
export {
|
|
389
|
-
Me as a,
|
|
390
|
-
Fe as c,
|
|
391
|
-
ke as i,
|
|
392
|
-
Ye as l,
|
|
393
|
-
Ue as n,
|
|
394
|
-
Ne as o,
|
|
395
|
-
Ie as r,
|
|
396
|
-
Le as s,
|
|
397
|
-
_e as t
|
|
398
|
-
};
|