welcome-ui 10.0.0-alpha.13 → 10.0.0-alpha.15
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/7PRQYBBV-D9IY4qtU.js +14 -0
- package/dist/Alert.js +34 -34
- package/dist/{B7UTNDHN-BghjolIs.js → B7UTNDHN-DDN2hpM5.js} +18 -28
- package/dist/DropdownMenu.js +17 -16
- package/dist/Field.js +7 -7
- package/dist/FileDrop.css +1 -1
- package/dist/FileDrop.js +310 -295
- package/dist/Icon.js +6 -4
- package/dist/Modal.js +1 -1
- package/dist/NSTBQJLB-C_1-awKs.js +173 -0
- package/dist/OLVWQA7U-UYYsJnlv.js +20 -0
- package/dist/RadioGroup.js +1 -1
- package/dist/Tabs.js +167 -367
- package/dist/Window.css +1 -0
- package/dist/Window.js +106 -0
- package/dist/tab-panel-B8NigruF.js +216 -0
- package/dist/types/components/Alert/components/Buttons.d.ts +2 -2
- package/dist/types/components/Alert/index.d.ts +2 -2
- package/dist/types/components/FileDrop/components/Message.d.ts +1 -1
- package/dist/types/components/FileDrop/types.d.ts +5 -0
- package/dist/types/components/Icon/icons.d.ts +2 -2
- package/dist/types/components/Tabs/utils.d.ts +1 -1
- package/dist/types/components/Window/components/Body.d.ts +3 -0
- package/dist/types/components/Window/components/BoxText.d.ts +3 -0
- package/dist/types/components/Window/components/Header.d.ts +13 -0
- package/dist/types/components/Window/components/Media.d.ts +3 -0
- package/dist/types/components/Window/components/TabPanel.d.ts +1 -0
- package/dist/types/components/Window/index.d.ts +22 -0
- package/dist/types/components/Window/index.test.d.ts +1 -0
- package/dist/types/components/Window/types.d.ts +48 -0
- package/package.json +1 -1
- package/dist/OLVWQA7U-Dia3UUnG.js +0 -187
package/dist/Icon.js
CHANGED
|
@@ -38,6 +38,8 @@ const s = "_root_576cf_2", A = {
|
|
|
38
38
|
/* @__PURE__ */ l("symbol", { id: "left-arrow-from-left", viewBox: "0 0 24 24", children: /* @__PURE__ */ l("path", { d: "M17 11H5.41L7.71 8.71C7.80324 8.61676 7.8772 8.50607 7.92766 8.38425C7.97812 8.26243 8.00409 8.13186 8.00409 8C8.00409 7.86814 7.97812 7.73757 7.92766 7.61575C7.8772 7.49393 7.80324 7.38324 7.71 7.29C7.61676 7.19676 7.50607 7.1228 7.38425 7.07234C7.26243 7.02188 7.13186 6.99591 7 6.99591C6.86814 6.99591 6.73757 7.02188 6.61575 7.07234C6.49393 7.1228 6.38324 7.19676 6.29 7.29L2.29 11.29C2.19896 11.3851 2.12759 11.4972 2.08 11.62C1.97998 11.8635 1.97998 12.1365 2.08 12.38C2.12759 12.5028 2.19896 12.6149 2.29 12.71L6.29 16.71C6.38296 16.8037 6.49356 16.8781 6.61542 16.9289C6.73728 16.9797 6.86799 17.0058 7 17.0058C7.13201 17.0058 7.26272 16.9797 7.38458 16.9289C7.50644 16.8781 7.61704 16.8037 7.71 16.71C7.80373 16.617 7.87812 16.5064 7.92889 16.3846C7.97966 16.2627 8.0058 16.132 8.0058 16C8.0058 15.868 7.97966 15.7373 7.92889 15.6154C7.87812 15.4936 7.80373 15.383 7.71 15.29L5.41 13H17C17.2652 13 17.5196 12.8946 17.7071 12.7071C17.8946 12.5196 18 12.2652 18 12C18 11.7348 17.8946 11.4804 17.7071 11.2929C17.5196 11.1054 17.2652 11 17 11ZM21 4C20.7348 4 20.4804 4.10536 20.2929 4.29289C20.1054 4.48043 20 4.73478 20 5V19C20 19.2652 20.1054 19.5196 20.2929 19.7071C20.4804 19.8946 20.7348 20 21 20C21.2652 20 21.5196 19.8946 21.7071 19.7071C21.8946 19.5196 22 19.2652 22 19V5C22 4.73478 21.8946 4.48043 21.7071 4.29289C21.5196 4.10536 21.2652 4 21 4Z", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg" }) }),
|
|
39
39
|
/* @__PURE__ */ l("symbol", { id: "arrow-from-right", viewBox: "0 0 24 24", children: /* @__PURE__ */ l("path", { d: "M3 4C2.73478 4 2.48043 4.10536 2.29289 4.29289C2.10536 4.48043 2 4.73478 2 5V19C2 19.2652 2.10536 19.5196 2.29289 19.7071C2.48043 19.8946 2.73478 20 3 20C3.26522 20 3.51957 19.8946 3.70711 19.7071C3.89464 19.5196 4 19.2652 4 19V5C4 4.73478 3.89464 4.48043 3.70711 4.29289C3.51957 4.10536 3.26522 4 3 4ZM21.92 11.62C21.8724 11.4972 21.801 11.3851 21.71 11.29L17.71 7.29C17.6168 7.19676 17.5061 7.1228 17.3842 7.07234C17.2624 7.02188 17.1319 6.99591 17 6.99591C16.7337 6.99591 16.4783 7.1017 16.29 7.29C16.1017 7.4783 15.9959 7.7337 15.9959 8C15.9959 8.2663 16.1017 8.5217 16.29 8.71L18.59 11H7C6.73478 11 6.48043 11.1054 6.29289 11.2929C6.10536 11.4804 6 11.7348 6 12C6 12.2652 6.10536 12.5196 6.29289 12.7071C6.48043 12.8946 6.73478 13 7 13H18.59L16.29 15.29C16.1963 15.383 16.1219 15.4936 16.0711 15.6154C16.0203 15.7373 15.9942 15.868 15.9942 16C15.9942 16.132 16.0203 16.2627 16.0711 16.3846C16.1219 16.5064 16.1963 16.617 16.29 16.71C16.383 16.8037 16.4936 16.8781 16.6154 16.9289C16.7373 16.9797 16.868 17.0058 17 17.0058C17.132 17.0058 17.2627 16.9797 17.3846 16.9289C17.5064 16.8781 17.617 16.8037 17.71 16.71L21.71 12.71C21.801 12.6149 21.8724 12.5028 21.92 12.38C22.02 12.1365 22.02 11.8635 21.92 11.62Z", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg" }) }),
|
|
40
40
|
/* @__PURE__ */ l("symbol", { id: "arrow-resize-diagonal", viewBox: "0 0 24 24", children: /* @__PURE__ */ l("path", { d: "M21.92 2.62C21.8185 2.37565 21.6243 2.18147 21.38 2.08C21.2598 2.02876 21.1307 2.00158 21 2H15C14.7348 2 14.4804 2.10536 14.2929 2.29289C14.1054 2.48043 14 2.73478 14 3C14 3.26522 14.1054 3.51957 14.2929 3.70711C14.4804 3.89464 14.7348 4 15 4H18.59L4 18.59V15C4 14.7348 3.89464 14.4804 3.70711 14.2929C3.51957 14.1054 3.26522 14 3 14C2.73478 14 2.48043 14.1054 2.29289 14.2929C2.10536 14.4804 2 14.7348 2 15V21C2.00158 21.1307 2.02876 21.2598 2.08 21.38C2.18147 21.6243 2.37565 21.8185 2.62 21.92C2.74022 21.9712 2.86932 21.9984 3 22H9C9.26522 22 9.51957 21.8946 9.70711 21.7071C9.89464 21.5196 10 21.2652 10 21C10 20.7348 9.89464 20.4804 9.70711 20.2929C9.51957 20.1054 9.26522 20 9 20H5.41L20 5.41V9C20 9.26522 20.1054 9.51957 20.2929 9.70711C20.4804 9.89464 20.7348 10 21 10C21.2652 10 21.5196 9.89464 21.7071 9.70711C21.8946 9.51957 22 9.26522 22 9V3C21.9984 2.86932 21.9712 2.74022 21.92 2.62Z", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg" }) }),
|
|
41
|
+
/* @__PURE__ */ l("symbol", { id: "draggabledots", viewBox: "0 0 24 24", children: /* @__PURE__ */ l("path", { fill: "currentColor", d: "M8.5,10a2,2,0,1,0,2,2A2,2,0,0,0,8.5,10Zm0,7a2,2,0,1,0,2,2A2,2,0,0,0,8.5,17Zm7-10a2,2,0,1,0-2-2A2,2,0,0,0,15.5,7Zm-7-4a2,2,0,1,0,2,2A2,2,0,0,0,8.5,3Zm7,14a2,2,0,1,0,2,2A2,2,0,0,0,15.5,17Zm0-7a2,2,0,1,0,2,2A2,2,0,0,0,15.5,10Z", xmlns: "http://www.w3.org/2000/svg" }) }),
|
|
42
|
+
/* @__PURE__ */ l("symbol", { id: "compress-alt", viewBox: "0 0 24 24", children: /* @__PURE__ */ l("path", { fill: "currentColor", d: "M21.71,2.29a1,1,0,0,0-1.42,0L14.5,8.09V6.5a1,1,0,0,0-2,0v4a1,1,0,0,0,.08.38,1,1,0,0,0,.54.54,1,1,0,0,0,.38.08h4a1,1,0,0,0,0-2H15.91l5.8-5.79A1,1,0,0,0,21.71,2.29ZM10.88,12.58a1,1,0,0,0-.38-.08h-4a1,1,0,0,0,0,2H8.09l-5.8,5.79a1,1,0,0,0,0,1.42,1,1,0,0,0,1.42,0l5.79-5.8V17.5a1,1,0,0,0,2,0v-4a1,1,0,0,0-.08-.38A1,1,0,0,0,10.88,12.58Z", xmlns: "http://www.w3.org/2000/svg" }) }),
|
|
41
43
|
/* @__PURE__ */ l("symbol", { id: "external-link-alt", viewBox: "0 0 24 24", children: /* @__PURE__ */ l("path", { fill: "currentColor", d: "M18,10.82a1,1,0,0,0-1,1V19a1,1,0,0,1-1,1H5a1,1,0,0,1-1-1V8A1,1,0,0,1,5,7h7.18a1,1,0,0,0,0-2H5A3,3,0,0,0,2,8V19a3,3,0,0,0,3,3H16a3,3,0,0,0,3-3V11.82A1,1,0,0,0,18,10.82Zm3.92-8.2a1,1,0,0,0-.54-.54A1,1,0,0,0,21,2H15a1,1,0,0,0,0,2h3.59L8.29,14.29a1,1,0,0,0,0,1.42,1,1,0,0,0,1.42,0L20,5.41V9a1,1,0,0,0,2,0V3A1,1,0,0,0,21.92,2.62Z", xmlns: "http://www.w3.org/2000/svg" }) }),
|
|
42
44
|
/* @__PURE__ */ l("symbol", { id: "heart-solid", viewBox: "0 0 24 24", children: /* @__PURE__ */ l("path", { fill: "currentColor", d: "M20.16,5A6.29,6.29,0,0,0,12,4.36a6.27,6.27,0,0,0-8.16,9.48l6.21,6.22a2.78,2.78,0,0,0,3.9,0l6.21-6.22A6.27,6.27,0,0,0,20.16,5Zm-1.41,7.46-6.21,6.21a.76.76,0,0,1-1.08,0L5.25,12.43a4.29,4.29,0,0,1,0-6,4.27,4.27,0,0,1,6,0,1,1,0,0,0,1.42,0,4.27,4.27,0,0,1,6,0A4.29,4.29,0,0,1,18.75,12.43Z", xmlns: "http://www.w3.org/2000/svg" }) }),
|
|
43
45
|
/* @__PURE__ */ l("symbol", { id: "heart", viewBox: "0 0 24 24", children: /* @__PURE__ */ l("path", { fill: "currentColor", d: "M20.16,5A6.29,6.29,0,0,0,12,4.36a6.27,6.27,0,0,0-8.16,9.48l6.21,6.22a2.78,2.78,0,0,0,3.9,0l6.21-6.22A6.27,6.27,0,0,0,20.16,5Zm-1.41,7.46-6.21,6.21a.76.76,0,0,1-1.08,0L5.25,12.43a4.29,4.29,0,0,1,0-6,4.27,4.27,0,0,1,6,0,1,1,0,0,0,1.42,0,4.27,4.27,0,0,1,6,0A4.29,4.29,0,0,1,18.75,12.43Z", xmlns: "http://www.w3.org/2000/svg" }) }),
|
|
@@ -223,13 +225,13 @@ const s = "_root_576cf_2", A = {
|
|
|
223
225
|
/* @__PURE__ */ l("symbol", { id: "trees", viewBox: "0 0 24 24", children: /* @__PURE__ */ l("path", { fill: "currentColor", d: "M16.5,5A4.86,4.86,0,0,0,14,5.69,6,6,0,0,0,2.5,8v4a6,6,0,0,0,5,5.91V21a1,1,0,0,0,2,0V17.91a6.08,6.08,0,0,0,2.78-1.26A5,5,0,0,0,15.5,18.9V21a1,1,0,0,0,2,0V18.9a5,5,0,0,0,4-4.9V10A5,5,0,0,0,16.5,5Zm-5,5v4a5.23,5.23,0,0,0,.06.57,4,4,0,0,1-2.06,1.3V13a1,1,0,0,0-2,0v2.86A4,4,0,0,1,4.5,12V8a4,4,0,0,1,6.83-2.84,3.94,3.94,0,0,1,1.06,2A5,5,0,0,0,11.5,10Zm8,4a3,3,0,0,1-2,2.82V13a1,1,0,0,0-2,0v3.82a3,3,0,0,1-2-2.82V10a3,3,0,0,1,6,0Z", xmlns: "http://www.w3.org/2000/svg" }) }),
|
|
224
226
|
/* @__PURE__ */ l("symbol", { id: "exit", viewBox: "0 0 24 24", children: /* @__PURE__ */ l("path", { fill: "currentColor", d: "M4,12a1,1,0,0,0,1,1h7.59l-2.3,2.29a1,1,0,0,0,0,1.42,1,1,0,0,0,1.42,0l4-4a1,1,0,0,0,.21-.33,1,1,0,0,0,0-.76,1,1,0,0,0-.21-.33l-4-4a1,1,0,1,0-1.42,1.42L12.59,11H5A1,1,0,0,0,4,12ZM17,2H7A3,3,0,0,0,4,5V8A1,1,0,0,0,6,8V5A1,1,0,0,1,7,4H17a1,1,0,0,1,1,1V19a1,1,0,0,1-1,1H7a1,1,0,0,1-1-1V16a1,1,0,0,0-2,0v3a3,3,0,0,0,3,3H17a3,3,0,0,0,3-3V5A3,3,0,0,0,17,2Z", xmlns: "http://www.w3.org/2000/svg" }) }),
|
|
225
227
|
/* @__PURE__ */ l("symbol", { id: "ban", viewBox: "0 0 24 24", children: /* @__PURE__ */ l("path", { fill: "currentColor", d: "M12,2A10,10,0,1,0,22,12,10,10,0,0,0,12,2Zm0,18a8,8,0,0,1-8-8A7.92,7.92,0,0,1,5.69,7.1L16.9,18.31A7.92,7.92,0,0,1,12,20Zm6.31-3.1L7.1,5.69A7.92,7.92,0,0,1,12,4a8,8,0,0,1,8,8A7.92,7.92,0,0,1,18.31,16.9Z", xmlns: "http://www.w3.org/2000/svg" }) })
|
|
226
|
-
] }),
|
|
228
|
+
] }), m = e(A), n = C(
|
|
227
229
|
({ "aria-label": a, className: w, name: r, size: h = "md", ...t }, i) => /* @__PURE__ */ l(
|
|
228
230
|
"svg",
|
|
229
231
|
{
|
|
230
232
|
"aria-hidden": a ? "false" : "true",
|
|
231
233
|
"aria-label": a,
|
|
232
|
-
className:
|
|
234
|
+
className: m("root", `size-${h}`, `name-${r}`, w),
|
|
233
235
|
ref: i,
|
|
234
236
|
role: a ? "img" : void 0,
|
|
235
237
|
...t,
|
|
@@ -237,8 +239,8 @@ const s = "_root_576cf_2", A = {
|
|
|
237
239
|
}
|
|
238
240
|
)
|
|
239
241
|
);
|
|
240
|
-
|
|
242
|
+
n.displayName = "Icon";
|
|
241
243
|
export {
|
|
242
|
-
|
|
244
|
+
n as Icon,
|
|
243
245
|
v as Sprite
|
|
244
246
|
};
|
package/dist/Modal.js
CHANGED
|
@@ -115,7 +115,7 @@ const je = r(d), B = i(
|
|
|
115
115
|
({ children: e, className: t, withClosingButton: s = !0, ...a }, n) => /* @__PURE__ */ _(
|
|
116
116
|
"div",
|
|
117
117
|
{
|
|
118
|
-
className:
|
|
118
|
+
className: je("content", s && "with-close-button", t),
|
|
119
119
|
ref: n,
|
|
120
120
|
...a,
|
|
121
121
|
children: [
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { c as Y, g as v, s as $, i as K, a as ee, d as te, e as re } from "./SBSPVDDI-CmtnvvUX.js";
|
|
3
|
+
import { c as oe, _ as O, i as ne, am as se, an as ie, m as B, ao as E, t as ae, ah as ue, u as F, j as I, p as ce, h as z, k as le, d as fe, v as de, a as M, Z as me, ap as pe, f as ve, b as ge } from "./OE2EFRVA-Dg1R6gaC.js";
|
|
4
|
+
import { f as ye, r as Ee } from "./7PRQYBBV-D9IY4qtU.js";
|
|
5
|
+
import { useRef as R, useEffect as L, useState as Ie, useCallback as Pe } from "react";
|
|
6
|
+
import { jsx as Fe } from "react/jsx-runtime";
|
|
7
|
+
var Se = "div";
|
|
8
|
+
function Ce(r) {
|
|
9
|
+
return r.some((i) => !!i.rowId);
|
|
10
|
+
}
|
|
11
|
+
function we(r) {
|
|
12
|
+
const i = r.target;
|
|
13
|
+
return i && !z(i) ? !1 : r.key.length === 1 && !r.ctrlKey && !r.metaKey;
|
|
14
|
+
}
|
|
15
|
+
function Ke(r) {
|
|
16
|
+
return r.key === "Shift" || r.key === "Control" || r.key === "Alt" || r.key === "Meta";
|
|
17
|
+
}
|
|
18
|
+
function H(r, i, l) {
|
|
19
|
+
return F((e) => {
|
|
20
|
+
var n;
|
|
21
|
+
if (i == null || i(e), e.defaultPrevented || e.isPropagationStopped() || !I(e) || Ke(e) || we(e)) return;
|
|
22
|
+
const f = r.getState(), m = (n = v(r, f.activeId)) == null ? void 0 : n.element;
|
|
23
|
+
if (!m) return;
|
|
24
|
+
const s = e, { view: h } = s, w = O(s, ["view"]), c = l == null ? void 0 : l.current;
|
|
25
|
+
m !== c && m.focus(), pe(m, e.type, w) || e.preventDefault(), e.currentTarget.contains(m) && e.stopPropagation();
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
function he(r) {
|
|
29
|
+
return te(
|
|
30
|
+
ye(Ee(re(r)))
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
function ke(r) {
|
|
34
|
+
const [i, l] = Ie(!1), e = Pe(() => l(!0), []), n = r.useState(
|
|
35
|
+
(f) => v(r, f.activeId)
|
|
36
|
+
);
|
|
37
|
+
return L(() => {
|
|
38
|
+
const f = n == null ? void 0 : n.element;
|
|
39
|
+
i && f && (l(!1), f.focus({ preventScroll: !0 }));
|
|
40
|
+
}, [n, i]), e;
|
|
41
|
+
}
|
|
42
|
+
var Ae = oe(
|
|
43
|
+
function(i) {
|
|
44
|
+
var l = i, {
|
|
45
|
+
store: e,
|
|
46
|
+
composite: n = !0,
|
|
47
|
+
focusOnMove: f = n,
|
|
48
|
+
moveOnKeyPress: m = !0
|
|
49
|
+
} = l, s = O(l, [
|
|
50
|
+
"store",
|
|
51
|
+
"composite",
|
|
52
|
+
"focusOnMove",
|
|
53
|
+
"moveOnKeyPress"
|
|
54
|
+
]);
|
|
55
|
+
const h = Y();
|
|
56
|
+
e = e || h, ne(
|
|
57
|
+
e,
|
|
58
|
+
process.env.NODE_ENV !== "production" && "Composite must receive a `store` prop or be wrapped in a CompositeProvider component."
|
|
59
|
+
);
|
|
60
|
+
const w = R(null), c = R(null), U = ke(e), S = e.useState("moves"), [, V] = se(
|
|
61
|
+
n ? e.setBaseElement : null
|
|
62
|
+
);
|
|
63
|
+
L(() => {
|
|
64
|
+
var t;
|
|
65
|
+
if (!e || !S || !n || !f) return;
|
|
66
|
+
const { activeId: o } = e.getState(), a = (t = v(e, o)) == null ? void 0 : t.element;
|
|
67
|
+
a && ie(a);
|
|
68
|
+
}, [e, S, n, f]), B(() => {
|
|
69
|
+
if (!e || !S || !n) return;
|
|
70
|
+
const { baseElement: t, activeId: o } = e.getState();
|
|
71
|
+
if (!(o === null) || !t) return;
|
|
72
|
+
const u = c.current;
|
|
73
|
+
c.current = null, u && E(u, { relatedTarget: t }), ae(t) || t.focus();
|
|
74
|
+
}, [e, S, n]);
|
|
75
|
+
const k = e.useState("activeId"), A = e.useState("virtualFocus");
|
|
76
|
+
B(() => {
|
|
77
|
+
var t;
|
|
78
|
+
if (!e || !n || !A) return;
|
|
79
|
+
const o = c.current;
|
|
80
|
+
if (c.current = null, !o) return;
|
|
81
|
+
const u = ((t = v(e, k)) == null ? void 0 : t.element) || ue(o);
|
|
82
|
+
u !== o && E(o, { relatedTarget: u });
|
|
83
|
+
}, [e, k, A, n]);
|
|
84
|
+
const j = H(
|
|
85
|
+
e,
|
|
86
|
+
s.onKeyDownCapture,
|
|
87
|
+
c
|
|
88
|
+
), N = H(
|
|
89
|
+
e,
|
|
90
|
+
s.onKeyUpCapture,
|
|
91
|
+
c
|
|
92
|
+
), _ = s.onFocusCapture, q = F((t) => {
|
|
93
|
+
if (_ == null || _(t), t.defaultPrevented || !e) return;
|
|
94
|
+
const { virtualFocus: o } = e.getState();
|
|
95
|
+
if (!o) return;
|
|
96
|
+
const a = t.relatedTarget, u = $(t.currentTarget);
|
|
97
|
+
I(t) && u && (t.stopPropagation(), c.current = a);
|
|
98
|
+
}), b = s.onFocus, G = F((t) => {
|
|
99
|
+
if (b == null || b(t), t.defaultPrevented || !n || !e) return;
|
|
100
|
+
const { relatedTarget: o } = t, { virtualFocus: a } = e.getState();
|
|
101
|
+
a ? I(t) && !K(e, o) && queueMicrotask(U) : I(t) && e.setActiveId(null);
|
|
102
|
+
}), T = s.onBlurCapture, W = F((t) => {
|
|
103
|
+
var o;
|
|
104
|
+
if (T == null || T(t), t.defaultPrevented || !e) return;
|
|
105
|
+
const { virtualFocus: a, activeId: u } = e.getState();
|
|
106
|
+
if (!a) return;
|
|
107
|
+
const p = (o = v(e, u)) == null ? void 0 : o.element, g = t.relatedTarget, C = K(e, g), d = c.current;
|
|
108
|
+
c.current = null, I(t) && C ? (g === p ? d && d !== g && E(d, t) : p ? E(p, t) : d && E(d, t), t.stopPropagation()) : !K(e, t.target) && p && E(p, t);
|
|
109
|
+
}), D = s.onKeyDown, Z = ce(m), J = F((t) => {
|
|
110
|
+
var o;
|
|
111
|
+
if (D == null || D(t), t.nativeEvent.isComposing || t.defaultPrevented || !e || !I(t)) return;
|
|
112
|
+
const { orientation: a, renderedItems: u, activeId: p } = e.getState(), g = v(e, p);
|
|
113
|
+
if ((o = g == null ? void 0 : g.element) != null && o.isConnected) return;
|
|
114
|
+
const C = a !== "horizontal", d = a !== "vertical", y = Ce(u);
|
|
115
|
+
if ((t.key === "ArrowLeft" || t.key === "ArrowRight" || t.key === "Home" || t.key === "End") && z(t.currentTarget)) return;
|
|
116
|
+
const x = {
|
|
117
|
+
ArrowUp: (y || C) && (() => {
|
|
118
|
+
if (y) {
|
|
119
|
+
const P = he(u);
|
|
120
|
+
return P == null ? void 0 : P.id;
|
|
121
|
+
}
|
|
122
|
+
return e == null ? void 0 : e.last();
|
|
123
|
+
}),
|
|
124
|
+
ArrowRight: (y || d) && e.first,
|
|
125
|
+
ArrowDown: (y || C) && e.first,
|
|
126
|
+
ArrowLeft: (y || d) && e.last,
|
|
127
|
+
Home: e.first,
|
|
128
|
+
End: e.last,
|
|
129
|
+
PageUp: e.first,
|
|
130
|
+
PageDown: e.last
|
|
131
|
+
}[t.key];
|
|
132
|
+
if (x) {
|
|
133
|
+
const P = x();
|
|
134
|
+
if (P !== void 0) {
|
|
135
|
+
if (!Z(t)) return;
|
|
136
|
+
t.preventDefault(), e.move(P);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
s = le(
|
|
141
|
+
s,
|
|
142
|
+
(t) => /* @__PURE__ */ Fe(ee, { value: e, children: t }),
|
|
143
|
+
[e]
|
|
144
|
+
);
|
|
145
|
+
const Q = e.useState((t) => {
|
|
146
|
+
var o;
|
|
147
|
+
if (e && n && t.virtualFocus)
|
|
148
|
+
return (o = v(e, t.activeId)) == null ? void 0 : o.id;
|
|
149
|
+
});
|
|
150
|
+
s = fe(M({
|
|
151
|
+
"aria-activedescendant": Q
|
|
152
|
+
}, s), {
|
|
153
|
+
ref: de(w, V, s.ref),
|
|
154
|
+
onKeyDownCapture: j,
|
|
155
|
+
onKeyUpCapture: N,
|
|
156
|
+
onFocusCapture: q,
|
|
157
|
+
onFocus: G,
|
|
158
|
+
onBlurCapture: W,
|
|
159
|
+
onKeyDown: J
|
|
160
|
+
});
|
|
161
|
+
const X = e.useState(
|
|
162
|
+
(t) => n && (t.virtualFocus || t.activeId === null)
|
|
163
|
+
);
|
|
164
|
+
return s = me(M({ focusable: X }, s)), s;
|
|
165
|
+
}
|
|
166
|
+
);
|
|
167
|
+
ve(function(i) {
|
|
168
|
+
const l = Ae(i);
|
|
169
|
+
return ge(Se, l);
|
|
170
|
+
});
|
|
171
|
+
export {
|
|
172
|
+
Ae as u
|
|
173
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { P as t, b as r } from "./Y67KZUMI-BwLWwpNF.js";
|
|
3
|
+
import { C as a, a as i } from "./SBSPVDDI-CmtnvvUX.js";
|
|
4
|
+
import { e as s } from "./OE2EFRVA-Dg1R6gaC.js";
|
|
5
|
+
import { createContext as o } from "react";
|
|
6
|
+
o(
|
|
7
|
+
void 0
|
|
8
|
+
);
|
|
9
|
+
var e = s(
|
|
10
|
+
[r, i],
|
|
11
|
+
[t, a]
|
|
12
|
+
), n = e.useContext, p = e.useProviderContext;
|
|
13
|
+
o(
|
|
14
|
+
void 0
|
|
15
|
+
);
|
|
16
|
+
o(!1);
|
|
17
|
+
export {
|
|
18
|
+
n as a,
|
|
19
|
+
p as u
|
|
20
|
+
};
|
package/dist/RadioGroup.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import './RadioGroup.css';
|
|
3
3
|
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
-
import { c as G, u as P } from "./B7UTNDHN-
|
|
4
|
+
import { c as G, u as P } from "./B7UTNDHN-DDN2hpM5.js";
|
|
5
5
|
import { c as $, u as b, a as x, b as y } from "./RTNCFSKZ-BywELldk.js";
|
|
6
6
|
import { M as L, A as d, z as p, B as i } from "./OE2EFRVA-Dg1R6gaC.js";
|
|
7
7
|
import { FieldGroup as N } from "./FieldGroup.js";
|