@konstructio/ui 0.1.2-alpha.119 → 0.1.2-alpha.120
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/Breadcrumb-DDRmDlWK.js +93 -0
- package/dist/{Checkbox-DRdyrKjk.js → Checkbox-DrounE52.js} +2 -2
- package/dist/{CollapsedSteps-CR7oCTRC.js → CollapsedSteps-DvBeYShi.js} +3 -3
- package/dist/{CommandInput-Du2o616y.js → CommandInput-_vujzQ6B.js} +2 -2
- package/dist/{Counter-DMkXIsOO.js → Counter-LQ5_uh06.js} +2 -2
- package/dist/{DayPicker-BtpJg2q3.js → DayPicker-D7KFB2bI.js} +383 -383
- package/dist/DropdownButton-BWfWN4fg.js +121 -0
- package/dist/{HamburgerTrigger-BgeS_nBA.js → HamburgerTrigger-CfrAnhmG.js} +10 -10
- package/dist/{Input-2M2I_H60.js → Input-O2bqyJKW.js} +2 -2
- package/dist/Modal-B-l4ii6w.js +84 -0
- package/dist/{Wrapper-JmStmade.js → Wrapper-B5PmrW4J.js} +3 -3
- package/dist/{Wrapper-ThpRi_Gg.js → Wrapper-CZCSSCLm.js} +2 -2
- package/dist/components/Alert/Alert.js +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.js +1 -1
- package/dist/components/Breadcrumb/components/CollapsedSteps/CollapsedSteps.js +1 -1
- package/dist/components/Breadcrumb/components/index.js +1 -1
- package/dist/components/Button/Button.variants.js +1 -0
- package/dist/components/Checkbox/Checkbox.js +1 -1
- package/dist/components/CheckboxCard/CheckboxCard.js +1 -1
- package/dist/components/Command/components/CommandInput.js +1 -1
- package/dist/components/Command/components/DialogContent.js +1 -1
- package/dist/components/Command/components/index.js +1 -1
- package/dist/components/ConfirmDialog/ConfirmDialog.js +7 -5
- package/dist/components/CopyButton/CopyButton.variants.js +3 -1
- package/dist/components/Counter/Counter.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarMonth/components/CalendarMonthContent/CalendarMonthContent.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/components/DatePickerContent/DatePickerContent.js +1 -1
- package/dist/components/Drawer/Drawer.js +78 -58
- package/dist/components/Drawer/Drawer.variants.js +40 -22
- package/dist/components/Drawer/components/Footer/Footer.js +5 -5
- package/dist/components/Drawer/constants/index.js +5 -4
- package/dist/components/DropdownButton/DropdownButton.js +1 -1
- package/dist/components/DropdownButton/components/ActionSheet/ActionSheet.js +34 -0
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +1 -1
- package/dist/components/Filter/components/TextMultiSelect/TextMultiSelect.js +1 -1
- package/dist/components/Filter/utils/index.js +2 -2
- package/dist/components/Input/Input.js +1 -1
- package/dist/components/Input/Input.variants.js +1 -0
- package/dist/components/LineChart/components/LineChartContent/LineChartContent.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/Wrapper/Wrapper.variants.js +12 -6
- 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/components/FlagSelectorWrapper/FlagSelectorWrapper.js +1 -1
- package/dist/components/PhoneNumberInput/components/PhoneNumberInputContent.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 +1 -1
- package/dist/components/PhoneNumberInput/contexts/index.js +1 -1
- package/dist/components/PhoneNumberInput/contexts/phone-number.provider.js +1 -1
- package/dist/components/PhoneNumberInput/utils/index.js +1 -1
- package/dist/components/PieChart/components/PieChartContent/PieChartContent.js +1 -1
- package/dist/components/Select/Select.variants.js +2 -0
- package/dist/components/Select/components/List/List.js +2 -2
- package/dist/components/Sheet/Sheet.js +130 -0
- package/dist/components/Sidebar/components/HamburgerTrigger/HamburgerTrigger.js +1 -1
- package/dist/components/Sidebar/components/Wrapper/Wrapper.js +103 -86
- package/dist/components/Sidebar/components/index.js +1 -1
- package/dist/components/Table/components/Filter.js +1 -1
- package/dist/components/Tabs/components/Trigger.js +13 -13
- 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/TextArea/TextArea.variants.js +1 -0
- package/dist/components/VirtualizedTable/components/Actions/components/ActionsTrigger/ActionsTrigger.js +7 -7
- package/dist/components/VirtualizedTable/components/Body/Body.js +47 -44
- package/dist/components/VirtualizedTable/components/Filter/Filter.js +68 -68
- package/dist/components/VirtualizedTable/components/FormPaginate/FormPaginate.js +1 -1
- package/dist/components/VirtualizedTable/components/Header/Header.js +38 -31
- package/dist/components/VirtualizedTable/components/ScrollContainer/ScrollContainer.js +75 -0
- package/dist/components/VirtualizedTable/components/Skeleton/Skeleton.js +42 -35
- package/dist/components/VirtualizedTable/components/VirtualizedTableContent/VirtualizedTableContent.js +72 -72
- package/dist/components/VirtualizedTable/components/index.js +14 -12
- package/dist/components/VirtualizedTable/constants/index.js +5 -3
- package/dist/components/VirtualizedTable/constants/responsive.js +10 -0
- package/dist/components/VirtualizedTable/contexts/index.js +1 -1
- package/dist/components/VirtualizedTable/contexts/table.context.js +4 -0
- package/dist/components/VirtualizedTable/contexts/table.provider.js +1 -1
- package/dist/components/VirtualizedTable/utils/index.js +8 -4
- package/dist/components/VirtualizedTable/utils/pinned-columns/index.js +6 -0
- package/dist/components/VirtualizedTable/utils/pinned-columns/pinned-columns.js +32 -0
- package/dist/components/index.js +147 -145
- package/dist/{components-B_SWqhCL.js → components-Bq71eyUH.js} +1 -1
- package/dist/{country-locale-map-DbrJ3bEE.js → country-locale-map-BQYYErun.js} +1407 -1407
- package/dist/{debounce-dMRJxNsT.js → debounce-DhCY9mXz.js} +2 -2
- package/dist/{dist-Dg3vyTx9.js → dist-BCqfbYE9.js} +1356 -1317
- package/dist/dist-CMqY_9n-.js +445 -0
- package/dist/{es2015-B_07N-UL.js → es2015-BvX7Yq5Q.js} +2 -2
- package/dist/index.js +158 -156
- package/dist/{isSymbol-BG9higgO.js → isSymbol-CcfkyZfq.js} +1 -1
- package/dist/lib/components/Drawer/Drawer.types.d.ts +10 -0
- package/dist/lib/components/Drawer/Drawer.variants.d.ts +1 -0
- package/dist/lib/components/Drawer/constants/index.d.ts +1 -0
- package/dist/lib/components/DropdownButton/DropdownButton.d.ts +2 -1
- package/dist/lib/components/DropdownButton/DropdownButton.types.d.ts +25 -0
- package/dist/lib/components/DropdownButton/components/ActionSheet/ActionSheet.d.ts +7 -0
- package/dist/lib/components/DropdownButton/components/ActionSheet/ActionSheet.types.d.ts +12 -0
- package/dist/lib/components/Modal/Modal.types.d.ts +2 -0
- package/dist/lib/components/Modal/components/Wrapper/Wrapper.types.d.ts +1 -0
- package/dist/lib/components/Sheet/Sheet.d.ts +21 -0
- package/dist/lib/components/Sheet/Sheet.types.d.ts +39 -0
- package/dist/lib/components/Sidebar/Sidebar.types.d.ts +9 -0
- package/dist/lib/components/VirtualizedTable/VirtualizedTable.types.d.ts +11 -2
- package/dist/lib/components/VirtualizedTable/components/ScrollContainer/ScrollContainer.d.ts +10 -0
- package/dist/lib/components/VirtualizedTable/components/ScrollContainer/ScrollContainer.types.d.ts +6 -0
- package/dist/lib/components/VirtualizedTable/components/VirtualizedTableContent/VirtualizedTableContent.d.ts +1 -1
- package/dist/lib/components/VirtualizedTable/components/index.d.ts +1 -0
- package/dist/lib/components/VirtualizedTable/constants/index.d.ts +1 -0
- package/dist/lib/components/VirtualizedTable/constants/responsive.d.ts +2 -0
- package/dist/lib/components/VirtualizedTable/contexts/table.context.d.ts +4 -0
- package/dist/lib/components/VirtualizedTable/contexts/table.provider.d.ts +1 -1
- package/dist/lib/components/VirtualizedTable/contexts/table.types.d.ts +2 -1
- package/dist/lib/components/VirtualizedTable/utils/index.d.ts +1 -0
- package/dist/lib/components/VirtualizedTable/utils/pinned-columns/index.d.ts +1 -0
- package/dist/lib/components/VirtualizedTable/utils/pinned-columns/pinned-columns.d.ts +23 -0
- package/dist/lib/components/index.d.ts +3 -1
- package/dist/{libphonenumber-DtibHRPP.js → libphonenumber-BIeQOhzl.js} +196 -164
- package/dist/package.json +18 -18
- package/dist/{phone-number.provider-DnuL-yYF.js → phone-number.provider-CJeivoDY.js} +2 -2
- package/dist/{prop-types-BCUW56rg.js → prop-types-qsAjMBb1.js} +1 -1
- package/dist/{rolldown-runtime-Dw9YIBcH.js → rolldown-runtime-B28h4lGi.js} +6 -6
- package/dist/styles.css +1 -1
- package/dist/{table.provider-CzfMGbe4.js → table.provider-QUo2buYX.js} +561 -523
- package/dist/{x-Vur_9PXW.js → x-BmNOD9Gr.js} +2 -2
- package/package.json +18 -18
- package/dist/Breadcrumb-CpXRb08J.js +0 -93
- package/dist/DropdownButton-JilCRLJY.js +0 -92
- package/dist/Modal-0Wp5szX4.js +0 -84
- package/dist/dist-BCoDIdCt.js +0 -429
package/dist/dist-BCoDIdCt.js
DELETED
|
@@ -1,429 +0,0 @@
|
|
|
1
|
-
import { a as y, n as ke } from "./dist-CK8FUUUn.js";
|
|
2
|
-
import { n as Ae, t as re } from "./dist-CYuWoi9I.js";
|
|
3
|
-
import { i as ce, r as g, t as Le } from "./dist-DbeY0Pzx.js";
|
|
4
|
-
import { n as te, t as Ne } from "./dist-C0OhTLFV.js";
|
|
5
|
-
import { a as Ke, i as Ge, n as Be, r as Ue, t as Ve } from "./dist-Bh7M0KDN.js";
|
|
6
|
-
import { t as je } from "./dist-uuWgjOcO.js";
|
|
7
|
-
import { n as Ye, t as Xe } from "./es2015-ChhQTsb4.js";
|
|
8
|
-
import { t as $e } from "./Combination-CnMM05mt.js";
|
|
9
|
-
import { a as ae, i as We, n as He, t as ze } from "./dist-1AtWkIZ4.js";
|
|
10
|
-
import { n as Ze, t as qe } from "./dist-rsFD9q_X.js";
|
|
11
|
-
import { n as Je, r as ue, t as Qe } from "./dist-BXv-jY2v.js";
|
|
12
|
-
import * as t from "react";
|
|
13
|
-
import { jsx as l } from "react/jsx-runtime";
|
|
14
|
-
var en = Object.defineProperty, p = (r, e) => en(r, "name", {
|
|
15
|
-
value: e,
|
|
16
|
-
configurable: !0
|
|
17
|
-
}), $ = ["Enter", " "], nn = [
|
|
18
|
-
"ArrowDown",
|
|
19
|
-
"PageUp",
|
|
20
|
-
"Home"
|
|
21
|
-
], se = [
|
|
22
|
-
"ArrowUp",
|
|
23
|
-
"PageDown",
|
|
24
|
-
"End"
|
|
25
|
-
], tn = [...nn, ...se], Gn = {
|
|
26
|
-
ltr: [...$, "ArrowRight"],
|
|
27
|
-
rtl: [...$, "ArrowLeft"]
|
|
28
|
-
}, A = "Menu", [W, on, rn] = Ze(A), [I, ie] = ce(A, [
|
|
29
|
-
rn,
|
|
30
|
-
ae,
|
|
31
|
-
ue
|
|
32
|
-
]), z = ae(), le = ue(), [cn, L] = I(A), [an, Z] = I(A), un = /* @__PURE__ */ p((r) => {
|
|
33
|
-
const { __scopeMenu: e, open: c = !1, children: n, dir: u, onOpenChange: s, modal: a = !0 } = r, i = z(e), [M, d] = t.useState(null), m = t.useRef(!1), h = Ne(s), f = qe(u);
|
|
34
|
-
return t.useEffect(() => {
|
|
35
|
-
const C = /* @__PURE__ */ p(() => {
|
|
36
|
-
m.current = !0, document.addEventListener("pointerdown", w, {
|
|
37
|
-
capture: !0,
|
|
38
|
-
once: !0
|
|
39
|
-
}), document.addEventListener("pointermove", w, {
|
|
40
|
-
capture: !0,
|
|
41
|
-
once: !0
|
|
42
|
-
});
|
|
43
|
-
}, "handleKeyDown"), w = /* @__PURE__ */ p(() => m.current = !1, "handlePointer");
|
|
44
|
-
return document.addEventListener("keydown", C, { capture: !0 }), () => {
|
|
45
|
-
document.removeEventListener("keydown", C, { capture: !0 }), document.removeEventListener("pointerdown", w, { capture: !0 }), document.removeEventListener("pointermove", w, { capture: !0 });
|
|
46
|
-
};
|
|
47
|
-
}, []), t.useEffect(() => {
|
|
48
|
-
if (!c) return;
|
|
49
|
-
const C = /* @__PURE__ */ p(() => h(!1), "handleBlur");
|
|
50
|
-
return window.addEventListener("blur", C), () => window.removeEventListener("blur", C);
|
|
51
|
-
}, [c, h]), /* @__PURE__ */ l(ze, {
|
|
52
|
-
...i,
|
|
53
|
-
children: /* @__PURE__ */ l(cn, {
|
|
54
|
-
scope: e,
|
|
55
|
-
open: c,
|
|
56
|
-
onOpenChange: h,
|
|
57
|
-
content: M,
|
|
58
|
-
onContentChange: d,
|
|
59
|
-
children: /* @__PURE__ */ l(an, {
|
|
60
|
-
scope: e,
|
|
61
|
-
onClose: t.useCallback(() => h(!1), [h]),
|
|
62
|
-
isUsingKeyboardRef: m,
|
|
63
|
-
dir: f,
|
|
64
|
-
modal: a,
|
|
65
|
-
children: n
|
|
66
|
-
})
|
|
67
|
-
})
|
|
68
|
-
});
|
|
69
|
-
}, "Menu"), sn = /* @__PURE__ */ t.forwardRef(/* @__PURE__ */ p(function(e, c) {
|
|
70
|
-
const { __scopeMenu: n, ...u } = e, s = z(n);
|
|
71
|
-
return /* @__PURE__ */ l(He, {
|
|
72
|
-
...s,
|
|
73
|
-
...u,
|
|
74
|
-
ref: c
|
|
75
|
-
});
|
|
76
|
-
}, "MenuAnchor")), ln = "MenuPortal", [Bn, dn] = I(ln, { forceMount: void 0 }), R = "MenuContent", [fn, de] = I(R), pn = /* @__PURE__ */ t.forwardRef(/* @__PURE__ */ p(function(e, c) {
|
|
77
|
-
const n = dn(R, e.__scopeMenu), { forceMount: u = n.forceMount, ...s } = e, a = L(R, e.__scopeMenu), i = Z(R, e.__scopeMenu);
|
|
78
|
-
return /* @__PURE__ */ l(W.Provider, {
|
|
79
|
-
scope: e.__scopeMenu,
|
|
80
|
-
children: /* @__PURE__ */ l(je, {
|
|
81
|
-
present: u || a.open,
|
|
82
|
-
children: /* @__PURE__ */ l(W.Slot, {
|
|
83
|
-
scope: e.__scopeMenu,
|
|
84
|
-
children: i.modal ? /* @__PURE__ */ l(mn, {
|
|
85
|
-
...s,
|
|
86
|
-
ref: c
|
|
87
|
-
}) : /* @__PURE__ */ l(hn, {
|
|
88
|
-
...s,
|
|
89
|
-
ref: c
|
|
90
|
-
})
|
|
91
|
-
})
|
|
92
|
-
})
|
|
93
|
-
});
|
|
94
|
-
}, "MenuContent")), mn = /* @__PURE__ */ t.forwardRef(/* @__PURE__ */ p(function(e, c) {
|
|
95
|
-
const n = L(R, e.__scopeMenu), u = t.useRef(null), s = y(c, u);
|
|
96
|
-
return t.useEffect(() => {
|
|
97
|
-
const a = u.current;
|
|
98
|
-
if (a) return Xe(a);
|
|
99
|
-
}, []), /* @__PURE__ */ l(fe, {
|
|
100
|
-
...e,
|
|
101
|
-
ref: s,
|
|
102
|
-
trapFocus: n.open,
|
|
103
|
-
disableOutsidePointerEvents: n.open,
|
|
104
|
-
disableOutsideScroll: !0,
|
|
105
|
-
onFocusOutside: g(e.onFocusOutside, (a) => a.preventDefault(), { checkForDefaultPrevented: !1 }),
|
|
106
|
-
onDismiss: () => n.onOpenChange(!1)
|
|
107
|
-
});
|
|
108
|
-
}, "MenuRootContentModal")), hn = /* @__PURE__ */ t.forwardRef(/* @__PURE__ */ p(function(e, c) {
|
|
109
|
-
const n = L(R, e.__scopeMenu);
|
|
110
|
-
return /* @__PURE__ */ l(fe, {
|
|
111
|
-
...e,
|
|
112
|
-
ref: c,
|
|
113
|
-
trapFocus: !1,
|
|
114
|
-
disableOutsidePointerEvents: !1,
|
|
115
|
-
disableOutsideScroll: !1,
|
|
116
|
-
onDismiss: () => n.onOpenChange(!1)
|
|
117
|
-
});
|
|
118
|
-
}, "MenuRootContentNonModal")), Mn = ke("MenuContent.ScrollLock"), fe = /* @__PURE__ */ t.forwardRef(/* @__PURE__ */ p(function(e, c) {
|
|
119
|
-
const { __scopeMenu: n, loop: u = !1, trapFocus: s, onOpenAutoFocus: a, onCloseAutoFocus: i, disableOutsidePointerEvents: M, onEntryFocus: d, onEscapeKeyDown: m, onPointerDownOutside: h, onFocusOutside: f, onInteractOutside: C, onDismiss: w, disableOutsideScroll: v, ...G } = e, J = L(R, n), B = Z(R, n), Se = z(n), Re = le(n), Q = on(n), [Pe, ee] = t.useState(null), E = t.useRef(null), [Ie, Ee] = t.useState(null);
|
|
120
|
-
Ue(Ie);
|
|
121
|
-
const { nodes: U, registry: De } = Ge(), _e = !!(s || v), be = y(c, E, J.onContentChange, Ee), O = t.useRef(0), T = t.useRef(""), xe = t.useRef(0), V = t.useRef(null), ne = t.useRef("right"), j = t.useRef(0), ye = t.useMemo(() => v ? [E, ...U.map((o) => ({ current: o }))] : [], [
|
|
122
|
-
E,
|
|
123
|
-
U,
|
|
124
|
-
v
|
|
125
|
-
]), Oe = v ? $e : t.Fragment, Te = v ? {
|
|
126
|
-
as: Mn,
|
|
127
|
-
allowPinchZoom: !0,
|
|
128
|
-
shards: ye
|
|
129
|
-
} : void 0, Fe = /* @__PURE__ */ p((o) => {
|
|
130
|
-
const _ = T.current + o, P = Q().filter((S) => !S.disabled), x = document.activeElement, Y = P.find((S) => S.ref.current === x)?.textValue, F = ge(P.map((S) => S.textValue), _, Y), b = P.find((S) => S.textValue === F)?.ref.current;
|
|
131
|
-
function X(S) {
|
|
132
|
-
T.current = S, window.clearTimeout(O.current), S !== "" && (O.current = window.setTimeout(() => X(""), 1e3));
|
|
133
|
-
}
|
|
134
|
-
p(X, "updateSearch"), X(_), b && setTimeout(() => b.focus());
|
|
135
|
-
}, "handleTypeaheadSearch");
|
|
136
|
-
t.useEffect(() => () => window.clearTimeout(O.current), []), Ye();
|
|
137
|
-
const D = t.useCallback((o) => ne.current === V.current?.side && Ce(o, V.current?.area), []);
|
|
138
|
-
return /* @__PURE__ */ l(fn, {
|
|
139
|
-
scope: n,
|
|
140
|
-
searchRef: T,
|
|
141
|
-
onItemEnter: t.useCallback((o) => {
|
|
142
|
-
D(o) && o.preventDefault();
|
|
143
|
-
}, [D]),
|
|
144
|
-
onItemLeave: t.useCallback((o) => {
|
|
145
|
-
D(o) || (E.current?.focus(), ee(null));
|
|
146
|
-
}, [D]),
|
|
147
|
-
onTriggerLeave: t.useCallback((o) => {
|
|
148
|
-
D(o) && o.preventDefault();
|
|
149
|
-
}, [D]),
|
|
150
|
-
pointerGraceTimerRef: xe,
|
|
151
|
-
onPointerGraceIntentChange: t.useCallback((o) => {
|
|
152
|
-
V.current = o;
|
|
153
|
-
}, []),
|
|
154
|
-
children: /* @__PURE__ */ l(Be, {
|
|
155
|
-
registry: _e ? De : null,
|
|
156
|
-
children: /* @__PURE__ */ l(Oe, {
|
|
157
|
-
...Te,
|
|
158
|
-
children: /* @__PURE__ */ l(Ve, {
|
|
159
|
-
asChild: !0,
|
|
160
|
-
trapped: s,
|
|
161
|
-
branches: U,
|
|
162
|
-
onMountAutoFocus: g(a, (o) => {
|
|
163
|
-
o.preventDefault(), E.current?.focus({ preventScroll: !0 });
|
|
164
|
-
}),
|
|
165
|
-
onUnmountAutoFocus: i,
|
|
166
|
-
children: /* @__PURE__ */ l(Ke, {
|
|
167
|
-
asChild: !0,
|
|
168
|
-
disableOutsidePointerEvents: M,
|
|
169
|
-
onEscapeKeyDown: m,
|
|
170
|
-
onPointerDownOutside: h,
|
|
171
|
-
onFocusOutside: f,
|
|
172
|
-
onInteractOutside: C,
|
|
173
|
-
onDismiss: w,
|
|
174
|
-
children: /* @__PURE__ */ l(Qe, {
|
|
175
|
-
asChild: !0,
|
|
176
|
-
...Re,
|
|
177
|
-
dir: B.dir,
|
|
178
|
-
orientation: "vertical",
|
|
179
|
-
loop: u,
|
|
180
|
-
currentTabStopId: Pe,
|
|
181
|
-
onCurrentTabStopIdChange: ee,
|
|
182
|
-
onEntryFocus: g(d, (o) => {
|
|
183
|
-
B.isUsingKeyboardRef.current || o.preventDefault();
|
|
184
|
-
}),
|
|
185
|
-
preventScrollOnEntryFocus: !0,
|
|
186
|
-
children: /* @__PURE__ */ l(We, {
|
|
187
|
-
role: "menu",
|
|
188
|
-
"aria-orientation": "vertical",
|
|
189
|
-
"data-state": pe(J.open),
|
|
190
|
-
"data-radix-menu-content": "",
|
|
191
|
-
dir: B.dir,
|
|
192
|
-
...Se,
|
|
193
|
-
...G,
|
|
194
|
-
ref: be,
|
|
195
|
-
style: {
|
|
196
|
-
outline: "none",
|
|
197
|
-
...G.style
|
|
198
|
-
},
|
|
199
|
-
onKeyDown: g(G.onKeyDown, (o) => {
|
|
200
|
-
const _ = o.target.closest("[data-radix-menu-content]") === o.currentTarget, P = o.ctrlKey || o.altKey || o.metaKey, x = o.key.length === 1;
|
|
201
|
-
_ && (o.key === "Tab" && o.preventDefault(), !P && x && Fe(o.key));
|
|
202
|
-
const Y = E.current;
|
|
203
|
-
if (o.target !== Y || !tn.includes(o.key)) return;
|
|
204
|
-
o.preventDefault();
|
|
205
|
-
const F = Q().filter((b) => !b.disabled).map((b) => b.ref.current);
|
|
206
|
-
se.includes(o.key) && F.reverse(), he(F);
|
|
207
|
-
}),
|
|
208
|
-
onBlur: g(e.onBlur, (o) => {
|
|
209
|
-
o.currentTarget.contains(o.target) || (window.clearTimeout(O.current), T.current = "");
|
|
210
|
-
}),
|
|
211
|
-
onPointerMove: g(e.onPointerMove, k((o) => {
|
|
212
|
-
const _ = o.target, P = j.current !== o.clientX;
|
|
213
|
-
if (o.currentTarget.contains(_) && P) {
|
|
214
|
-
const x = o.clientX > j.current ? "right" : "left";
|
|
215
|
-
ne.current = x, j.current = o.clientX;
|
|
216
|
-
}
|
|
217
|
-
}))
|
|
218
|
-
})
|
|
219
|
-
})
|
|
220
|
-
})
|
|
221
|
-
})
|
|
222
|
-
})
|
|
223
|
-
})
|
|
224
|
-
});
|
|
225
|
-
}, "MenuContentImpl")), H = "MenuItem", oe = "menu.itemSelect", gn = /* @__PURE__ */ t.forwardRef(/* @__PURE__ */ p(function(e, c) {
|
|
226
|
-
const { disabled: n = !1, onSelect: u, ...s } = e, a = t.useRef(null), i = Z(H, e.__scopeMenu), M = de(H, e.__scopeMenu), d = y(c, a), m = t.useRef(!1), h = /* @__PURE__ */ p(() => {
|
|
227
|
-
const f = a.current;
|
|
228
|
-
if (!n && f) {
|
|
229
|
-
const C = new CustomEvent(oe, {
|
|
230
|
-
bubbles: !0,
|
|
231
|
-
cancelable: !0
|
|
232
|
-
});
|
|
233
|
-
f.addEventListener(oe, (w) => u?.(w), { once: !0 }), Ae(f, C), C.defaultPrevented ? m.current = !1 : i.onClose();
|
|
234
|
-
}
|
|
235
|
-
}, "handleSelect");
|
|
236
|
-
return /* @__PURE__ */ l(vn, {
|
|
237
|
-
...s,
|
|
238
|
-
ref: d,
|
|
239
|
-
disabled: n,
|
|
240
|
-
onClick: g(e.onClick, h),
|
|
241
|
-
onPointerDown: (f) => {
|
|
242
|
-
e.onPointerDown?.(f), m.current = !0;
|
|
243
|
-
},
|
|
244
|
-
onPointerUp: g(e.onPointerUp, (f) => {
|
|
245
|
-
m.current || f.currentTarget?.click();
|
|
246
|
-
}),
|
|
247
|
-
onKeyDown: g(e.onKeyDown, (f) => {
|
|
248
|
-
n || f.target !== f.currentTarget || M.searchRef.current !== "" && f.key === " " || $.includes(f.key) && (f.currentTarget.click(), f.preventDefault());
|
|
249
|
-
})
|
|
250
|
-
});
|
|
251
|
-
}, "MenuItem")), vn = /* @__PURE__ */ t.forwardRef(/* @__PURE__ */ p(function(e, c) {
|
|
252
|
-
const { __scopeMenu: n, disabled: u = !1, textValue: s, ...a } = e, i = de(H, n), M = le(n), d = t.useRef(null), m = y(c, d), [h, f] = t.useState(!1), [C, w] = t.useState("");
|
|
253
|
-
return t.useEffect(() => {
|
|
254
|
-
const v = d.current;
|
|
255
|
-
v && w((v.textContent ?? "").trim());
|
|
256
|
-
}, [a.children]), /* @__PURE__ */ l(W.ItemSlot, {
|
|
257
|
-
scope: n,
|
|
258
|
-
disabled: u,
|
|
259
|
-
textValue: s ?? C,
|
|
260
|
-
children: /* @__PURE__ */ l(Je, {
|
|
261
|
-
asChild: !0,
|
|
262
|
-
...M,
|
|
263
|
-
focusable: !u,
|
|
264
|
-
children: /* @__PURE__ */ l(re.div, {
|
|
265
|
-
role: "menuitem",
|
|
266
|
-
"data-highlighted": h ? "" : void 0,
|
|
267
|
-
"aria-disabled": u || void 0,
|
|
268
|
-
"data-disabled": u ? "" : void 0,
|
|
269
|
-
...a,
|
|
270
|
-
ref: m,
|
|
271
|
-
onPointerMove: g(e.onPointerMove, k((v) => {
|
|
272
|
-
u ? i.onItemLeave(v) : (i.onItemEnter(v), v.defaultPrevented || v.currentTarget.focus({ preventScroll: !0 }));
|
|
273
|
-
})),
|
|
274
|
-
onPointerLeave: g(e.onPointerLeave, k((v) => i.onItemLeave(v))),
|
|
275
|
-
onFocus: g(e.onFocus, () => f(!0)),
|
|
276
|
-
onBlur: g(e.onBlur, () => f(!1))
|
|
277
|
-
})
|
|
278
|
-
})
|
|
279
|
-
});
|
|
280
|
-
}, "MenuItemImpl")), [Un, Vn] = I("MenuRadioGroup", {
|
|
281
|
-
value: void 0,
|
|
282
|
-
onValueChange: /* @__PURE__ */ p(() => {
|
|
283
|
-
}, "onValueChange")
|
|
284
|
-
}), Cn = "MenuItemIndicator", [jn, Yn] = I(Cn, { checked: !1 }), wn = "MenuSub", [Xn, $n] = I(wn);
|
|
285
|
-
function pe(r) {
|
|
286
|
-
return r ? "open" : "closed";
|
|
287
|
-
}
|
|
288
|
-
p(pe, "getOpenState");
|
|
289
|
-
function me(r) {
|
|
290
|
-
return r === "indeterminate";
|
|
291
|
-
}
|
|
292
|
-
p(me, "isIndeterminate");
|
|
293
|
-
function Sn(r) {
|
|
294
|
-
return me(r) ? "indeterminate" : r ? "checked" : "unchecked";
|
|
295
|
-
}
|
|
296
|
-
p(Sn, "getCheckedState");
|
|
297
|
-
function he(r) {
|
|
298
|
-
const e = document.activeElement;
|
|
299
|
-
for (const c of r)
|
|
300
|
-
if (c === e || (c.focus(), document.activeElement !== e)) return;
|
|
301
|
-
}
|
|
302
|
-
p(he, "focusFirst");
|
|
303
|
-
function Me(r, e) {
|
|
304
|
-
return r.map((c, n) => r[(e + n) % r.length]);
|
|
305
|
-
}
|
|
306
|
-
p(Me, "wrapArray");
|
|
307
|
-
function ge(r, e, c) {
|
|
308
|
-
const n = e.length > 1 && Array.from(e).every((i) => i === e[0]) ? e[0] : e, u = c ? r.indexOf(c) : -1;
|
|
309
|
-
let s = Me(r, Math.max(u, 0));
|
|
310
|
-
n.length === 1 && (s = s.filter((i) => i !== c));
|
|
311
|
-
const a = s.find((i) => i.toLowerCase().startsWith(n.toLowerCase()));
|
|
312
|
-
return a !== c ? a : void 0;
|
|
313
|
-
}
|
|
314
|
-
p(ge, "getNextMatch");
|
|
315
|
-
function ve(r, e) {
|
|
316
|
-
const { x: c, y: n } = r;
|
|
317
|
-
let u = !1;
|
|
318
|
-
for (let s = 0, a = e.length - 1; s < e.length; a = s++) {
|
|
319
|
-
const i = e[s], M = e[a], d = i.x, m = i.y, h = M.x, f = M.y;
|
|
320
|
-
m > n != f > n && c < (h - d) * (n - m) / (f - m) + d && (u = !u);
|
|
321
|
-
}
|
|
322
|
-
return u;
|
|
323
|
-
}
|
|
324
|
-
p(ve, "isPointInPolygon");
|
|
325
|
-
function Ce(r, e) {
|
|
326
|
-
return e ? ve({
|
|
327
|
-
x: r.clientX,
|
|
328
|
-
y: r.clientY
|
|
329
|
-
}, e) : !1;
|
|
330
|
-
}
|
|
331
|
-
p(Ce, "isPointerInGraceArea");
|
|
332
|
-
function k(r) {
|
|
333
|
-
return (e) => e.pointerType === "mouse" ? r(e) : void 0;
|
|
334
|
-
}
|
|
335
|
-
p(k, "whenMouse");
|
|
336
|
-
var Rn = Object.defineProperty, N = (r, e) => Rn(r, "name", {
|
|
337
|
-
value: e,
|
|
338
|
-
configurable: !0
|
|
339
|
-
}), q = "DropdownMenu", [Pn, Wn] = ce(q, [ie]), K = ie(), [In, we] = Pn(q), Hn = /* @__PURE__ */ N((r) => {
|
|
340
|
-
const { __scopeDropdownMenu: e, children: c, dir: n, open: u, defaultOpen: s, onOpenChange: a, modal: i = !0 } = r, M = K(e), d = t.useRef(null), [m, h] = Le({
|
|
341
|
-
prop: u,
|
|
342
|
-
defaultProp: s ?? !1,
|
|
343
|
-
onChange: a,
|
|
344
|
-
caller: q
|
|
345
|
-
});
|
|
346
|
-
return /* @__PURE__ */ l(In, {
|
|
347
|
-
scope: e,
|
|
348
|
-
triggerId: te(),
|
|
349
|
-
triggerRef: d,
|
|
350
|
-
contentId: te(),
|
|
351
|
-
open: m,
|
|
352
|
-
onOpenChange: h,
|
|
353
|
-
onOpenToggle: t.useCallback(() => h((f) => !f), [h]),
|
|
354
|
-
modal: i,
|
|
355
|
-
children: /* @__PURE__ */ l(un, {
|
|
356
|
-
...M,
|
|
357
|
-
open: m,
|
|
358
|
-
onOpenChange: h,
|
|
359
|
-
dir: n,
|
|
360
|
-
modal: i,
|
|
361
|
-
children: c
|
|
362
|
-
})
|
|
363
|
-
});
|
|
364
|
-
}, "DropdownMenu"), En = "DropdownMenuTrigger", zn = /* @__PURE__ */ t.forwardRef(/* @__PURE__ */ N(function(e, c) {
|
|
365
|
-
const { __scopeDropdownMenu: n, disabled: u = !1, ...s } = e, a = we(En, n), i = K(n), M = y(c, a.triggerRef);
|
|
366
|
-
return /* @__PURE__ */ l(sn, {
|
|
367
|
-
asChild: !0,
|
|
368
|
-
...i,
|
|
369
|
-
children: /* @__PURE__ */ l(re.button, {
|
|
370
|
-
type: "button",
|
|
371
|
-
id: a.triggerId,
|
|
372
|
-
"aria-haspopup": "menu",
|
|
373
|
-
"aria-expanded": a.open,
|
|
374
|
-
"aria-controls": a.open ? a.contentId : void 0,
|
|
375
|
-
"data-state": a.open ? "open" : "closed",
|
|
376
|
-
"data-disabled": u ? "" : void 0,
|
|
377
|
-
disabled: u,
|
|
378
|
-
...s,
|
|
379
|
-
ref: M,
|
|
380
|
-
onPointerDown: g(e.onPointerDown, (d) => {
|
|
381
|
-
!u && d.button === 0 && d.ctrlKey === !1 && (a.onOpenToggle(), a.open || d.preventDefault());
|
|
382
|
-
}),
|
|
383
|
-
onKeyDown: g(e.onKeyDown, (d) => {
|
|
384
|
-
u || (["Enter", " "].includes(d.key) && a.onOpenToggle(), d.key === "ArrowDown" && a.onOpenChange(!0), [
|
|
385
|
-
"Enter",
|
|
386
|
-
" ",
|
|
387
|
-
"ArrowDown"
|
|
388
|
-
].includes(d.key) && d.preventDefault());
|
|
389
|
-
})
|
|
390
|
-
})
|
|
391
|
-
});
|
|
392
|
-
}, "DropdownMenuTrigger")), Dn = "DropdownMenuContent", Zn = /* @__PURE__ */ t.forwardRef(/* @__PURE__ */ N(function(e, c) {
|
|
393
|
-
const { __scopeDropdownMenu: n, ...u } = e, s = we(Dn, n), a = K(n), i = t.useRef(!1);
|
|
394
|
-
return /* @__PURE__ */ l(pn, {
|
|
395
|
-
id: s.contentId,
|
|
396
|
-
"aria-labelledby": s.triggerId,
|
|
397
|
-
...a,
|
|
398
|
-
...u,
|
|
399
|
-
ref: c,
|
|
400
|
-
onCloseAutoFocus: g(e.onCloseAutoFocus, (M) => {
|
|
401
|
-
i.current || s.triggerRef.current?.focus(), i.current = !1, M.preventDefault();
|
|
402
|
-
}),
|
|
403
|
-
onInteractOutside: g(e.onInteractOutside, (M) => {
|
|
404
|
-
const d = M.detail.originalEvent, m = d.button === 0 && d.ctrlKey === !0, h = d.button === 2 || m;
|
|
405
|
-
(!s.modal || h) && (i.current = !0);
|
|
406
|
-
}),
|
|
407
|
-
style: {
|
|
408
|
-
...e.style,
|
|
409
|
-
"--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
410
|
-
"--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
|
|
411
|
-
"--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
|
|
412
|
-
"--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
|
|
413
|
-
"--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
|
|
414
|
-
}
|
|
415
|
-
});
|
|
416
|
-
}, "DropdownMenuContent")), qn = /* @__PURE__ */ t.forwardRef(/* @__PURE__ */ N(function(e, c) {
|
|
417
|
-
const { __scopeDropdownMenu: n, ...u } = e, s = K(n);
|
|
418
|
-
return /* @__PURE__ */ l(gn, {
|
|
419
|
-
...s,
|
|
420
|
-
...u,
|
|
421
|
-
ref: c
|
|
422
|
-
});
|
|
423
|
-
}, "DropdownMenuItem"));
|
|
424
|
-
export {
|
|
425
|
-
zn as i,
|
|
426
|
-
Zn as n,
|
|
427
|
-
qn as r,
|
|
428
|
-
Hn as t
|
|
429
|
-
};
|