@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
|
@@ -0,0 +1,445 @@
|
|
|
1
|
+
import { a as y, n as ke } from "./dist-CK8FUUUn.js";
|
|
2
|
+
import { n as Ae, t as z } from "./dist-CYuWoi9I.js";
|
|
3
|
+
import { i as ae, r as v, t as Le } from "./dist-DbeY0Pzx.js";
|
|
4
|
+
import { n as oe, 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 ce, 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 i } from "react/jsx-runtime";
|
|
14
|
+
var en = Object.defineProperty, p = (o, e) => en(o, "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], Bn = {
|
|
26
|
+
ltr: [...$, "ArrowRight"],
|
|
27
|
+
rtl: [...$, "ArrowLeft"]
|
|
28
|
+
}, N = "Menu", [W, on, rn] = Ze(N), [I, ie] = ae(N, [
|
|
29
|
+
rn,
|
|
30
|
+
ce,
|
|
31
|
+
ue
|
|
32
|
+
]), Z = ce(), de = ue(), [an, K] = I(N), [cn, q] = I(N), un = /* @__PURE__ */ p((o) => {
|
|
33
|
+
const { __scopeMenu: e, open: a = !1, children: n, dir: c, onOpenChange: s, modal: u = !0 } = o, d = Z(e), [h, l] = t.useState(null), m = t.useRef(!1), M = Ne(s), f = qe(c);
|
|
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 (!a) return;
|
|
49
|
+
const C = /* @__PURE__ */ p(() => M(!1), "handleBlur");
|
|
50
|
+
return window.addEventListener("blur", C), () => window.removeEventListener("blur", C);
|
|
51
|
+
}, [a, M]), /* @__PURE__ */ i(ze, {
|
|
52
|
+
...d,
|
|
53
|
+
children: /* @__PURE__ */ i(an, {
|
|
54
|
+
scope: e,
|
|
55
|
+
open: a,
|
|
56
|
+
onOpenChange: M,
|
|
57
|
+
content: h,
|
|
58
|
+
onContentChange: l,
|
|
59
|
+
children: /* @__PURE__ */ i(cn, {
|
|
60
|
+
scope: e,
|
|
61
|
+
onClose: t.useCallback(() => M(!1), [M]),
|
|
62
|
+
isUsingKeyboardRef: m,
|
|
63
|
+
dir: f,
|
|
64
|
+
modal: u,
|
|
65
|
+
children: n
|
|
66
|
+
})
|
|
67
|
+
})
|
|
68
|
+
});
|
|
69
|
+
}, "Menu"), sn = /* @__PURE__ */ t.forwardRef(/* @__PURE__ */ p(function(e, a) {
|
|
70
|
+
const { __scopeMenu: n, ...c } = e, s = Z(n);
|
|
71
|
+
return /* @__PURE__ */ i(He, {
|
|
72
|
+
...s,
|
|
73
|
+
...c,
|
|
74
|
+
ref: a
|
|
75
|
+
});
|
|
76
|
+
}, "MenuAnchor")), dn = "MenuPortal", [Un, ln] = I(dn, { forceMount: void 0 }), R = "MenuContent", [fn, le] = I(R), pn = /* @__PURE__ */ t.forwardRef(/* @__PURE__ */ p(function(e, a) {
|
|
77
|
+
const n = ln(R, e.__scopeMenu), { forceMount: c = n.forceMount, ...s } = e, u = K(R, e.__scopeMenu), d = q(R, e.__scopeMenu);
|
|
78
|
+
return /* @__PURE__ */ i(W.Provider, {
|
|
79
|
+
scope: e.__scopeMenu,
|
|
80
|
+
children: /* @__PURE__ */ i(je, {
|
|
81
|
+
present: c || u.open,
|
|
82
|
+
children: /* @__PURE__ */ i(W.Slot, {
|
|
83
|
+
scope: e.__scopeMenu,
|
|
84
|
+
children: d.modal ? /* @__PURE__ */ i(mn, {
|
|
85
|
+
...s,
|
|
86
|
+
ref: a
|
|
87
|
+
}) : /* @__PURE__ */ i(Mn, {
|
|
88
|
+
...s,
|
|
89
|
+
ref: a
|
|
90
|
+
})
|
|
91
|
+
})
|
|
92
|
+
})
|
|
93
|
+
});
|
|
94
|
+
}, "MenuContent")), mn = /* @__PURE__ */ t.forwardRef(/* @__PURE__ */ p(function(e, a) {
|
|
95
|
+
const n = K(R, e.__scopeMenu), c = t.useRef(null), s = y(a, c);
|
|
96
|
+
return t.useEffect(() => {
|
|
97
|
+
const u = c.current;
|
|
98
|
+
if (u) return Xe(u);
|
|
99
|
+
}, []), /* @__PURE__ */ i(fe, {
|
|
100
|
+
...e,
|
|
101
|
+
ref: s,
|
|
102
|
+
trapFocus: n.open,
|
|
103
|
+
disableOutsidePointerEvents: n.open,
|
|
104
|
+
disableOutsideScroll: !0,
|
|
105
|
+
onFocusOutside: v(e.onFocusOutside, (u) => u.preventDefault(), { checkForDefaultPrevented: !1 }),
|
|
106
|
+
onDismiss: () => n.onOpenChange(!1)
|
|
107
|
+
});
|
|
108
|
+
}, "MenuRootContentModal")), Mn = /* @__PURE__ */ t.forwardRef(/* @__PURE__ */ p(function(e, a) {
|
|
109
|
+
const n = K(R, e.__scopeMenu);
|
|
110
|
+
return /* @__PURE__ */ i(fe, {
|
|
111
|
+
...e,
|
|
112
|
+
ref: a,
|
|
113
|
+
trapFocus: !1,
|
|
114
|
+
disableOutsidePointerEvents: !1,
|
|
115
|
+
disableOutsideScroll: !1,
|
|
116
|
+
onDismiss: () => n.onOpenChange(!1)
|
|
117
|
+
});
|
|
118
|
+
}, "MenuRootContentNonModal")), hn = ke("MenuContent.ScrollLock"), fe = /* @__PURE__ */ t.forwardRef(/* @__PURE__ */ p(function(e, a) {
|
|
119
|
+
const { __scopeMenu: n, loop: c = !1, trapFocus: s, onOpenAutoFocus: u, onCloseAutoFocus: d, disableOutsidePointerEvents: h, onEntryFocus: l, onEscapeKeyDown: m, onPointerDownOutside: M, onFocusOutside: f, onInteractOutside: C, onDismiss: w, disableOutsideScroll: g, ...G } = e, Q = K(R, n), B = q(R, n), Se = Z(n), Re = de(n), ee = on(n), [Pe, ne] = t.useState(null), D = t.useRef(null), [Ie, De] = t.useState(null);
|
|
120
|
+
Ue(Ie);
|
|
121
|
+
const { nodes: U, registry: Ee } = Ge(), _e = !!(s || g), be = y(a, D, Q.onContentChange, De), F = t.useRef(0), k = t.useRef(""), xe = t.useRef(0), V = t.useRef(null), te = t.useRef("right"), j = t.useRef(0), ye = t.useMemo(() => g ? [D, ...U.map((r) => ({ current: r }))] : [], [
|
|
122
|
+
D,
|
|
123
|
+
U,
|
|
124
|
+
g
|
|
125
|
+
]), Oe = g ? $e : t.Fragment, Te = g ? {
|
|
126
|
+
as: hn,
|
|
127
|
+
allowPinchZoom: !0,
|
|
128
|
+
shards: ye
|
|
129
|
+
} : void 0, Fe = /* @__PURE__ */ p((r) => {
|
|
130
|
+
const _ = k.current + r, P = ee().filter((S) => !S.disabled), x = document.activeElement, Y = P.find((S) => S.ref.current === x)?.textValue, A = ve(P.map((S) => S.textValue), _, Y), b = P.find((S) => S.textValue === A)?.ref.current;
|
|
131
|
+
function X(S) {
|
|
132
|
+
k.current = S, window.clearTimeout(F.current), S !== "" && (F.current = window.setTimeout(() => X(""), 1e3));
|
|
133
|
+
}
|
|
134
|
+
p(X, "updateSearch"), X(_), b && setTimeout(() => b.focus());
|
|
135
|
+
}, "handleTypeaheadSearch");
|
|
136
|
+
t.useEffect(() => () => window.clearTimeout(F.current), []), Ye();
|
|
137
|
+
const E = t.useCallback((r) => te.current === V.current?.side && Ce(r, V.current?.area), []);
|
|
138
|
+
return /* @__PURE__ */ i(fn, {
|
|
139
|
+
scope: n,
|
|
140
|
+
searchRef: k,
|
|
141
|
+
onItemEnter: t.useCallback((r) => {
|
|
142
|
+
E(r) && r.preventDefault();
|
|
143
|
+
}, [E]),
|
|
144
|
+
onItemLeave: t.useCallback((r) => {
|
|
145
|
+
E(r) || (D.current?.focus(), ne(null));
|
|
146
|
+
}, [E]),
|
|
147
|
+
onTriggerLeave: t.useCallback((r) => {
|
|
148
|
+
E(r) && r.preventDefault();
|
|
149
|
+
}, [E]),
|
|
150
|
+
pointerGraceTimerRef: xe,
|
|
151
|
+
onPointerGraceIntentChange: t.useCallback((r) => {
|
|
152
|
+
V.current = r;
|
|
153
|
+
}, []),
|
|
154
|
+
children: /* @__PURE__ */ i(Be, {
|
|
155
|
+
registry: _e ? Ee : null,
|
|
156
|
+
children: /* @__PURE__ */ i(Oe, {
|
|
157
|
+
...Te,
|
|
158
|
+
children: /* @__PURE__ */ i(Ve, {
|
|
159
|
+
asChild: !0,
|
|
160
|
+
trapped: s,
|
|
161
|
+
branches: U,
|
|
162
|
+
onMountAutoFocus: v(u, (r) => {
|
|
163
|
+
r.preventDefault(), D.current?.focus({ preventScroll: !0 });
|
|
164
|
+
}),
|
|
165
|
+
onUnmountAutoFocus: d,
|
|
166
|
+
children: /* @__PURE__ */ i(Ke, {
|
|
167
|
+
asChild: !0,
|
|
168
|
+
disableOutsidePointerEvents: h,
|
|
169
|
+
onEscapeKeyDown: m,
|
|
170
|
+
onPointerDownOutside: M,
|
|
171
|
+
onFocusOutside: f,
|
|
172
|
+
onInteractOutside: C,
|
|
173
|
+
onDismiss: w,
|
|
174
|
+
children: /* @__PURE__ */ i(Qe, {
|
|
175
|
+
asChild: !0,
|
|
176
|
+
...Re,
|
|
177
|
+
dir: B.dir,
|
|
178
|
+
orientation: "vertical",
|
|
179
|
+
loop: c,
|
|
180
|
+
currentTabStopId: Pe,
|
|
181
|
+
onCurrentTabStopIdChange: ne,
|
|
182
|
+
onEntryFocus: v(l, (r) => {
|
|
183
|
+
B.isUsingKeyboardRef.current || r.preventDefault();
|
|
184
|
+
}),
|
|
185
|
+
preventScrollOnEntryFocus: !0,
|
|
186
|
+
children: /* @__PURE__ */ i(We, {
|
|
187
|
+
role: "menu",
|
|
188
|
+
"aria-orientation": "vertical",
|
|
189
|
+
"data-state": pe(Q.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: v(G.onKeyDown, (r) => {
|
|
200
|
+
const _ = r.target.closest("[data-radix-menu-content]") === r.currentTarget, P = r.ctrlKey || r.altKey || r.metaKey, x = r.key.length === 1;
|
|
201
|
+
_ && (r.key === "Tab" && r.preventDefault(), !P && x && Fe(r.key));
|
|
202
|
+
const Y = D.current;
|
|
203
|
+
if (r.target !== Y || !tn.includes(r.key)) return;
|
|
204
|
+
r.preventDefault();
|
|
205
|
+
const A = ee().filter((b) => !b.disabled).map((b) => b.ref.current);
|
|
206
|
+
se.includes(r.key) && A.reverse(), Me(A);
|
|
207
|
+
}),
|
|
208
|
+
onBlur: v(e.onBlur, (r) => {
|
|
209
|
+
r.currentTarget.contains(r.target) || (window.clearTimeout(F.current), k.current = "");
|
|
210
|
+
}),
|
|
211
|
+
onPointerMove: v(e.onPointerMove, L((r) => {
|
|
212
|
+
const _ = r.target, P = j.current !== r.clientX;
|
|
213
|
+
if (r.currentTarget.contains(_) && P) {
|
|
214
|
+
const x = r.clientX > j.current ? "right" : "left";
|
|
215
|
+
te.current = x, j.current = r.clientX;
|
|
216
|
+
}
|
|
217
|
+
}))
|
|
218
|
+
})
|
|
219
|
+
})
|
|
220
|
+
})
|
|
221
|
+
})
|
|
222
|
+
})
|
|
223
|
+
})
|
|
224
|
+
});
|
|
225
|
+
}, "MenuContentImpl")), H = "MenuItem", re = "menu.itemSelect", vn = /* @__PURE__ */ t.forwardRef(/* @__PURE__ */ p(function(e, a) {
|
|
226
|
+
const { disabled: n = !1, onSelect: c, ...s } = e, u = t.useRef(null), d = q(H, e.__scopeMenu), h = le(H, e.__scopeMenu), l = y(a, u), m = t.useRef(!1), M = /* @__PURE__ */ p(() => {
|
|
227
|
+
const f = u.current;
|
|
228
|
+
if (!n && f) {
|
|
229
|
+
const C = new CustomEvent(re, {
|
|
230
|
+
bubbles: !0,
|
|
231
|
+
cancelable: !0
|
|
232
|
+
});
|
|
233
|
+
f.addEventListener(re, (w) => c?.(w), { once: !0 }), Ae(f, C), C.defaultPrevented ? m.current = !1 : d.onClose();
|
|
234
|
+
}
|
|
235
|
+
}, "handleSelect");
|
|
236
|
+
return /* @__PURE__ */ i(gn, {
|
|
237
|
+
...s,
|
|
238
|
+
ref: l,
|
|
239
|
+
disabled: n,
|
|
240
|
+
onClick: v(e.onClick, M),
|
|
241
|
+
onPointerDown: (f) => {
|
|
242
|
+
e.onPointerDown?.(f), m.current = !0;
|
|
243
|
+
},
|
|
244
|
+
onPointerUp: v(e.onPointerUp, (f) => {
|
|
245
|
+
m.current || f.currentTarget?.click();
|
|
246
|
+
}),
|
|
247
|
+
onKeyDown: v(e.onKeyDown, (f) => {
|
|
248
|
+
n || f.target !== f.currentTarget || h.searchRef.current !== "" && f.key === " " || $.includes(f.key) && (f.currentTarget.click(), f.preventDefault());
|
|
249
|
+
})
|
|
250
|
+
});
|
|
251
|
+
}, "MenuItem")), gn = /* @__PURE__ */ t.forwardRef(/* @__PURE__ */ p(function(e, a) {
|
|
252
|
+
const { __scopeMenu: n, disabled: c = !1, textValue: s, ...u } = e, d = le(H, n), h = de(n), l = t.useRef(null), m = y(a, l), [M, f] = t.useState(!1), [C, w] = t.useState("");
|
|
253
|
+
return t.useEffect(() => {
|
|
254
|
+
const g = l.current;
|
|
255
|
+
g && w((g.textContent ?? "").trim());
|
|
256
|
+
}, [u.children]), /* @__PURE__ */ i(W.ItemSlot, {
|
|
257
|
+
scope: n,
|
|
258
|
+
disabled: c,
|
|
259
|
+
textValue: s ?? C,
|
|
260
|
+
children: /* @__PURE__ */ i(Je, {
|
|
261
|
+
asChild: !0,
|
|
262
|
+
...h,
|
|
263
|
+
focusable: !c,
|
|
264
|
+
children: /* @__PURE__ */ i(z.div, {
|
|
265
|
+
role: "menuitem",
|
|
266
|
+
"data-highlighted": M ? "" : void 0,
|
|
267
|
+
"aria-disabled": c || void 0,
|
|
268
|
+
"data-disabled": c ? "" : void 0,
|
|
269
|
+
...u,
|
|
270
|
+
ref: m,
|
|
271
|
+
onPointerMove: v(e.onPointerMove, L((g) => {
|
|
272
|
+
c ? d.onItemLeave(g) : (d.onItemEnter(g), g.defaultPrevented || g.currentTarget.focus({ preventScroll: !0 }));
|
|
273
|
+
})),
|
|
274
|
+
onPointerLeave: v(e.onPointerLeave, L((g) => d.onItemLeave(g))),
|
|
275
|
+
onFocus: v(e.onFocus, () => f(!0)),
|
|
276
|
+
onBlur: v(e.onBlur, () => f(!1))
|
|
277
|
+
})
|
|
278
|
+
})
|
|
279
|
+
});
|
|
280
|
+
}, "MenuItemImpl")), [Vn, jn] = I("MenuRadioGroup", {
|
|
281
|
+
value: void 0,
|
|
282
|
+
onValueChange: /* @__PURE__ */ p(() => {
|
|
283
|
+
}, "onValueChange")
|
|
284
|
+
}), Cn = "MenuItemIndicator", [Yn, Xn] = I(Cn, { checked: !1 }), wn = /* @__PURE__ */ t.forwardRef(/* @__PURE__ */ p(function(e, a) {
|
|
285
|
+
const { __scopeMenu: n, ...c } = e;
|
|
286
|
+
return /* @__PURE__ */ i(z.div, {
|
|
287
|
+
role: "separator",
|
|
288
|
+
"aria-orientation": "horizontal",
|
|
289
|
+
...c,
|
|
290
|
+
ref: a
|
|
291
|
+
});
|
|
292
|
+
}, "MenuSeparator")), Sn = "MenuSub", [$n, Wn] = I(Sn);
|
|
293
|
+
function pe(o) {
|
|
294
|
+
return o ? "open" : "closed";
|
|
295
|
+
}
|
|
296
|
+
p(pe, "getOpenState");
|
|
297
|
+
function me(o) {
|
|
298
|
+
return o === "indeterminate";
|
|
299
|
+
}
|
|
300
|
+
p(me, "isIndeterminate");
|
|
301
|
+
function Rn(o) {
|
|
302
|
+
return me(o) ? "indeterminate" : o ? "checked" : "unchecked";
|
|
303
|
+
}
|
|
304
|
+
p(Rn, "getCheckedState");
|
|
305
|
+
function Me(o) {
|
|
306
|
+
const e = document.activeElement;
|
|
307
|
+
for (const a of o)
|
|
308
|
+
if (a === e || (a.focus(), document.activeElement !== e)) return;
|
|
309
|
+
}
|
|
310
|
+
p(Me, "focusFirst");
|
|
311
|
+
function he(o, e) {
|
|
312
|
+
return o.map((a, n) => o[(e + n) % o.length]);
|
|
313
|
+
}
|
|
314
|
+
p(he, "wrapArray");
|
|
315
|
+
function ve(o, e, a) {
|
|
316
|
+
const n = e.length > 1 && Array.from(e).every((d) => d === e[0]) ? e[0] : e, c = a ? o.indexOf(a) : -1;
|
|
317
|
+
let s = he(o, Math.max(c, 0));
|
|
318
|
+
n.length === 1 && (s = s.filter((d) => d !== a));
|
|
319
|
+
const u = s.find((d) => d.toLowerCase().startsWith(n.toLowerCase()));
|
|
320
|
+
return u !== a ? u : void 0;
|
|
321
|
+
}
|
|
322
|
+
p(ve, "getNextMatch");
|
|
323
|
+
function ge(o, e) {
|
|
324
|
+
const { x: a, y: n } = o;
|
|
325
|
+
let c = !1;
|
|
326
|
+
for (let s = 0, u = e.length - 1; s < e.length; u = s++) {
|
|
327
|
+
const d = e[s], h = e[u], l = d.x, m = d.y, M = h.x, f = h.y;
|
|
328
|
+
m > n != f > n && a < (M - l) * (n - m) / (f - m) + l && (c = !c);
|
|
329
|
+
}
|
|
330
|
+
return c;
|
|
331
|
+
}
|
|
332
|
+
p(ge, "isPointInPolygon");
|
|
333
|
+
function Ce(o, e) {
|
|
334
|
+
return e ? ge({
|
|
335
|
+
x: o.clientX,
|
|
336
|
+
y: o.clientY
|
|
337
|
+
}, e) : !1;
|
|
338
|
+
}
|
|
339
|
+
p(Ce, "isPointerInGraceArea");
|
|
340
|
+
function L(o) {
|
|
341
|
+
return (e) => e.pointerType === "mouse" ? o(e) : void 0;
|
|
342
|
+
}
|
|
343
|
+
p(L, "whenMouse");
|
|
344
|
+
var Pn = Object.defineProperty, O = (o, e) => Pn(o, "name", {
|
|
345
|
+
value: e,
|
|
346
|
+
configurable: !0
|
|
347
|
+
}), J = "DropdownMenu", [In, Hn] = ae(J, [ie]), T = ie(), [Dn, we] = In(J), zn = /* @__PURE__ */ O((o) => {
|
|
348
|
+
const { __scopeDropdownMenu: e, children: a, dir: n, open: c, defaultOpen: s, onOpenChange: u, modal: d = !0 } = o, h = T(e), l = t.useRef(null), [m, M] = Le({
|
|
349
|
+
prop: c,
|
|
350
|
+
defaultProp: s ?? !1,
|
|
351
|
+
onChange: u,
|
|
352
|
+
caller: J
|
|
353
|
+
});
|
|
354
|
+
return /* @__PURE__ */ i(Dn, {
|
|
355
|
+
scope: e,
|
|
356
|
+
triggerId: oe(),
|
|
357
|
+
triggerRef: l,
|
|
358
|
+
contentId: oe(),
|
|
359
|
+
open: m,
|
|
360
|
+
onOpenChange: M,
|
|
361
|
+
onOpenToggle: t.useCallback(() => M((f) => !f), [M]),
|
|
362
|
+
modal: d,
|
|
363
|
+
children: /* @__PURE__ */ i(un, {
|
|
364
|
+
...h,
|
|
365
|
+
open: m,
|
|
366
|
+
onOpenChange: M,
|
|
367
|
+
dir: n,
|
|
368
|
+
modal: d,
|
|
369
|
+
children: a
|
|
370
|
+
})
|
|
371
|
+
});
|
|
372
|
+
}, "DropdownMenu"), En = "DropdownMenuTrigger", Zn = /* @__PURE__ */ t.forwardRef(/* @__PURE__ */ O(function(e, a) {
|
|
373
|
+
const { __scopeDropdownMenu: n, disabled: c = !1, ...s } = e, u = we(En, n), d = T(n), h = y(a, u.triggerRef);
|
|
374
|
+
return /* @__PURE__ */ i(sn, {
|
|
375
|
+
asChild: !0,
|
|
376
|
+
...d,
|
|
377
|
+
children: /* @__PURE__ */ i(z.button, {
|
|
378
|
+
type: "button",
|
|
379
|
+
id: u.triggerId,
|
|
380
|
+
"aria-haspopup": "menu",
|
|
381
|
+
"aria-expanded": u.open,
|
|
382
|
+
"aria-controls": u.open ? u.contentId : void 0,
|
|
383
|
+
"data-state": u.open ? "open" : "closed",
|
|
384
|
+
"data-disabled": c ? "" : void 0,
|
|
385
|
+
disabled: c,
|
|
386
|
+
...s,
|
|
387
|
+
ref: h,
|
|
388
|
+
onPointerDown: v(e.onPointerDown, (l) => {
|
|
389
|
+
!c && l.button === 0 && l.ctrlKey === !1 && (u.onOpenToggle(), u.open || l.preventDefault());
|
|
390
|
+
}),
|
|
391
|
+
onKeyDown: v(e.onKeyDown, (l) => {
|
|
392
|
+
c || (["Enter", " "].includes(l.key) && u.onOpenToggle(), l.key === "ArrowDown" && u.onOpenChange(!0), [
|
|
393
|
+
"Enter",
|
|
394
|
+
" ",
|
|
395
|
+
"ArrowDown"
|
|
396
|
+
].includes(l.key) && l.preventDefault());
|
|
397
|
+
})
|
|
398
|
+
})
|
|
399
|
+
});
|
|
400
|
+
}, "DropdownMenuTrigger")), _n = "DropdownMenuContent", qn = /* @__PURE__ */ t.forwardRef(/* @__PURE__ */ O(function(e, a) {
|
|
401
|
+
const { __scopeDropdownMenu: n, ...c } = e, s = we(_n, n), u = T(n), d = t.useRef(!1);
|
|
402
|
+
return /* @__PURE__ */ i(pn, {
|
|
403
|
+
id: s.contentId,
|
|
404
|
+
"aria-labelledby": s.triggerId,
|
|
405
|
+
...u,
|
|
406
|
+
...c,
|
|
407
|
+
ref: a,
|
|
408
|
+
onCloseAutoFocus: v(e.onCloseAutoFocus, (h) => {
|
|
409
|
+
d.current || s.triggerRef.current?.focus(), d.current = !1, h.preventDefault();
|
|
410
|
+
}),
|
|
411
|
+
onInteractOutside: v(e.onInteractOutside, (h) => {
|
|
412
|
+
const l = h.detail.originalEvent, m = l.button === 0 && l.ctrlKey === !0, M = l.button === 2 || m;
|
|
413
|
+
(!s.modal || M) && (d.current = !0);
|
|
414
|
+
}),
|
|
415
|
+
style: {
|
|
416
|
+
...e.style,
|
|
417
|
+
"--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
418
|
+
"--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
|
|
419
|
+
"--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
|
|
420
|
+
"--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
|
|
421
|
+
"--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
|
|
422
|
+
}
|
|
423
|
+
});
|
|
424
|
+
}, "DropdownMenuContent")), Jn = /* @__PURE__ */ t.forwardRef(/* @__PURE__ */ O(function(e, a) {
|
|
425
|
+
const { __scopeDropdownMenu: n, ...c } = e, s = T(n);
|
|
426
|
+
return /* @__PURE__ */ i(vn, {
|
|
427
|
+
...s,
|
|
428
|
+
...c,
|
|
429
|
+
ref: a
|
|
430
|
+
});
|
|
431
|
+
}, "DropdownMenuItem")), Qn = /* @__PURE__ */ t.forwardRef(/* @__PURE__ */ O(function(e, a) {
|
|
432
|
+
const { __scopeDropdownMenu: n, ...c } = e, s = T(n);
|
|
433
|
+
return /* @__PURE__ */ i(wn, {
|
|
434
|
+
...s,
|
|
435
|
+
...c,
|
|
436
|
+
ref: a
|
|
437
|
+
});
|
|
438
|
+
}, "DropdownMenuSeparator"));
|
|
439
|
+
export {
|
|
440
|
+
Zn as a,
|
|
441
|
+
Qn as i,
|
|
442
|
+
qn as n,
|
|
443
|
+
Jn as r,
|
|
444
|
+
zn as t
|
|
445
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { o as Se } from "./rolldown-runtime-
|
|
2
|
-
import { t as Ne } from "./prop-types-
|
|
1
|
+
import { o as Se } from "./rolldown-runtime-B28h4lGi.js";
|
|
2
|
+
import { t as Ne } from "./prop-types-qsAjMBb1.js";
|
|
3
3
|
import { i as Te, n as ir, r as Pe } from "./Combination-CnMM05mt.js";
|
|
4
4
|
import O, { Fragment as Cr, PureComponent as _e, createContext as Ae, forwardRef as Lr, useCallback as L, useEffect as De, useMemo as Me, useRef as X, useState as Z } from "react";
|
|
5
5
|
function Ce(r, e) {
|