@anoki/fse-ui 1.0.412 → 1.0.414
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/index.cjs179.js +1 -1
- package/dist/index.cjs183.js +1 -1
- package/dist/index.cjs190.js +1 -1
- package/dist/index.cjs201.js +1 -1
- package/dist/index.cjs228.js +1 -1
- package/dist/index.cjs272.js +1 -1
- package/dist/index.cjs272.js.map +1 -1
- package/dist/index.cjs275.js +1 -1
- package/dist/index.cjs275.js.map +1 -1
- package/dist/index.cjs276.js +1 -1
- package/dist/index.cjs276.js.map +1 -1
- package/dist/index.cjs277.js +1 -1
- package/dist/index.cjs277.js.map +1 -1
- package/dist/index.cjs278.js +1 -1
- package/dist/index.cjs278.js.map +1 -1
- package/dist/index.cjs279.js +1 -1
- package/dist/index.cjs279.js.map +1 -1
- package/dist/index.cjs280.js +1 -1
- package/dist/index.cjs280.js.map +1 -1
- package/dist/index.cjs281.js +1 -1
- package/dist/index.cjs281.js.map +1 -1
- package/dist/index.cjs282.js +1 -1
- package/dist/index.cjs282.js.map +1 -1
- package/dist/index.cjs283.js +2 -0
- package/dist/index.cjs283.js.map +1 -0
- package/dist/index.cjs284.js +2 -0
- package/dist/index.cjs284.js.map +1 -0
- package/dist/index.cjs288.js +1 -1
- package/dist/index.cjs288.js.map +1 -1
- package/dist/index.cjs289.js +1 -1
- package/dist/index.cjs289.js.map +1 -1
- package/dist/index.cjs290.js +1 -1
- package/dist/index.cjs290.js.map +1 -1
- package/dist/index.cjs291.js +1 -1
- package/dist/index.cjs291.js.map +1 -1
- package/dist/index.cjs292.js +2 -0
- package/dist/index.cjs292.js.map +1 -0
- package/dist/index.cjs293.js +2 -0
- package/dist/index.cjs293.js.map +1 -0
- package/dist/index.cjs294.js +2 -0
- package/dist/index.cjs294.js.map +1 -0
- package/dist/index.cjs309.js +1 -1
- package/dist/index.cjs311.js +1 -1
- package/dist/index.cjs312.js +1 -1
- package/dist/index.cjs316.js +1 -1
- package/dist/index.cjs322.js +1 -1
- package/dist/index.cjs324.js +1 -1
- package/dist/index.cjs326.js +1 -38
- package/dist/index.cjs326.js.map +1 -1
- package/dist/index.cjs327.js +38 -1
- package/dist/index.cjs327.js.map +1 -1
- package/dist/index.cjs328.js +1 -1
- package/dist/index.cjs328.js.map +1 -1
- package/dist/index.cjs329.js +1 -1
- package/dist/index.cjs329.js.map +1 -1
- package/dist/index.cjs330.js +1 -1
- package/dist/index.cjs330.js.map +1 -1
- package/dist/index.cjs55.js +1 -1
- package/dist/index.cjs55.js.map +1 -1
- package/dist/index.cjs56.js.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.es179.js +7 -7
- package/dist/index.es183.js +1 -1
- package/dist/index.es190.js +8 -8
- package/dist/index.es201.js +14 -14
- package/dist/index.es228.js +7 -7
- package/dist/index.es272.js +15 -7
- package/dist/index.es272.js.map +1 -1
- package/dist/index.es275.js +6 -29
- package/dist/index.es275.js.map +1 -1
- package/dist/index.es276.js +26 -32
- package/dist/index.es276.js.map +1 -1
- package/dist/index.es277.js +63 -617
- package/dist/index.es277.js.map +1 -1
- package/dist/index.es278.js +29 -10
- package/dist/index.es278.js.map +1 -1
- package/dist/index.es279.js +32 -5
- package/dist/index.es279.js.map +1 -1
- package/dist/index.es280.js +621 -24
- package/dist/index.es280.js.map +1 -1
- package/dist/index.es281.js +10 -68
- package/dist/index.es281.js.map +1 -1
- package/dist/index.es282.js +6 -15
- package/dist/index.es282.js.map +1 -1
- package/dist/index.es283.js +28 -0
- package/dist/index.es283.js.map +1 -0
- package/dist/index.es284.js +72 -0
- package/dist/index.es284.js.map +1 -0
- package/dist/index.es288.js +122 -12
- package/dist/index.es288.js.map +1 -1
- package/dist/index.es289.js +134 -8
- package/dist/index.es289.js.map +1 -1
- package/dist/index.es290.js +14 -50
- package/dist/index.es290.js.map +1 -1
- package/dist/index.es291.js +13 -40
- package/dist/index.es291.js.map +1 -1
- package/dist/index.es292.js +12 -0
- package/dist/index.es292.js.map +1 -0
- package/dist/index.es293.js +53 -0
- package/dist/index.es293.js.map +1 -0
- package/dist/index.es294.js +45 -0
- package/dist/index.es294.js.map +1 -0
- package/dist/index.es309.js +3 -3
- package/dist/index.es311.js +4 -4
- package/dist/index.es312.js +6 -6
- package/dist/index.es316.js +1 -1
- package/dist/index.es322.js +1 -1
- package/dist/index.es324.js +4 -4
- package/dist/index.es326.js +65 -69
- package/dist/index.es326.js.map +1 -1
- package/dist/index.es327.js +68 -8
- package/dist/index.es327.js.map +1 -1
- package/dist/index.es328.js +9 -14
- package/dist/index.es328.js.map +1 -1
- package/dist/index.es329.js +14 -62
- package/dist/index.es329.js.map +1 -1
- package/dist/index.es330.js +61 -64
- package/dist/index.es330.js.map +1 -1
- package/dist/index.es55.js +25 -24
- package/dist/index.es55.js.map +1 -1
- package/dist/index.es56.js.map +1 -1
- package/dist/sections/Login/Login.css +1 -1
- package/dist/styles/index.css +1 -1
- package/package.json +1 -1
- package/dist/index.cjs273.js +0 -2
- package/dist/index.cjs273.js.map +0 -1
- package/dist/index.cjs274.js +0 -2
- package/dist/index.cjs274.js.map +0 -1
- package/dist/index.cjs285.js +0 -2
- package/dist/index.cjs285.js.map +0 -1
- package/dist/index.cjs286.js +0 -2
- package/dist/index.cjs286.js.map +0 -1
- package/dist/index.cjs287.js +0 -2
- package/dist/index.cjs287.js.map +0 -1
- package/dist/index.es273.js +0 -30
- package/dist/index.es273.js.map +0 -1
- package/dist/index.es274.js +0 -71
- package/dist/index.es274.js.map +0 -1
- package/dist/index.es285.js +0 -128
- package/dist/index.es285.js.map +0 -1
- package/dist/index.es286.js +0 -138
- package/dist/index.es286.js.map +0 -1
- package/dist/index.es287.js +0 -17
- package/dist/index.es287.js.map +0 -1
package/dist/index.es201.js
CHANGED
@@ -1,18 +1,18 @@
|
|
1
1
|
import * as s from "react";
|
2
|
-
import { composeEventHandlers as p } from "./index.
|
3
|
-
import { useComposedRefs as C } from "./index.
|
4
|
-
import { createContextScope as L, createContext as $ } from "./index.
|
5
|
-
import { useId as x } from "./index.
|
6
|
-
import { useControllableState as B } from "./index.
|
7
|
-
import { DismissableLayer as H } from "./index.
|
8
|
-
import { FocusScope as V } from "./index.
|
9
|
-
import { Portal as q } from "./index.
|
10
|
-
import { Presence as R } from "./index.
|
11
|
-
import { Primitive as m } from "./index.
|
12
|
-
import { useFocusGuards as K } from "./index.
|
13
|
-
import U from "./index.
|
14
|
-
import { hideOthers as Y } from "./index.
|
15
|
-
import { Slot as Z } from "./index.
|
2
|
+
import { composeEventHandlers as p } from "./index.es275.js";
|
3
|
+
import { useComposedRefs as C } from "./index.es276.js";
|
4
|
+
import { createContextScope as L, createContext as $ } from "./index.es277.js";
|
5
|
+
import { useId as x } from "./index.es281.js";
|
6
|
+
import { useControllableState as B } from "./index.es278.js";
|
7
|
+
import { DismissableLayer as H } from "./index.es288.js";
|
8
|
+
import { FocusScope as V } from "./index.es289.js";
|
9
|
+
import { Portal as q } from "./index.es290.js";
|
10
|
+
import { Presence as R } from "./index.es284.js";
|
11
|
+
import { Primitive as m } from "./index.es279.js";
|
12
|
+
import { useFocusGuards as K } from "./index.es291.js";
|
13
|
+
import U from "./index.es292.js";
|
14
|
+
import { hideOthers as Y } from "./index.es293.js";
|
15
|
+
import { Slot as Z } from "./index.es294.js";
|
16
16
|
import { j as i } from "./index.es154.js";
|
17
17
|
var _ = "Dialog", [P, _e] = L(_), [z, u] = P(_), y = (e) => {
|
18
18
|
const {
|
package/dist/index.es228.js
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
import * as s from "react";
|
2
|
-
import { composeEventHandlers as T } from "./index.
|
3
|
-
import { useComposedRefs as _ } from "./index.
|
4
|
-
import { createContextScope as H } from "./index.
|
5
|
-
import { useControllableState as I } from "./index.
|
6
|
-
import { usePrevious as M } from "./index.
|
7
|
-
import { useSize as N } from "./index.
|
8
|
-
import { Primitive as w } from "./index.
|
2
|
+
import { composeEventHandlers as T } from "./index.es275.js";
|
3
|
+
import { useComposedRefs as _ } from "./index.es276.js";
|
4
|
+
import { createContextScope as H } from "./index.es277.js";
|
5
|
+
import { useControllableState as I } from "./index.es278.js";
|
6
|
+
import { usePrevious as M } from "./index.es282.js";
|
7
|
+
import { useSize as N } from "./index.es283.js";
|
8
|
+
import { Primitive as w } from "./index.es279.js";
|
9
9
|
import { j as p } from "./index.es154.js";
|
10
10
|
var S = "Switch", [B, J] = H(S), [q, z] = B(S), C = s.forwardRef(
|
11
11
|
(e, n) => {
|
package/dist/index.es272.js
CHANGED
@@ -1,10 +1,18 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
1
|
+
import { useEffect as l } from "react";
|
2
|
+
const f = (t, n) => {
|
3
|
+
l(() => {
|
4
|
+
if (!n || !t.current) return;
|
5
|
+
const o = t.current.querySelectorAll(
|
6
|
+
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
|
7
|
+
), c = o[0], r = o[o.length - 1], s = (e) => {
|
8
|
+
e.key === "Tab" && (e.shiftKey ? document.activeElement === c && (r.focus(), e.preventDefault()) : document.activeElement === r && (c.focus(), e.preventDefault()));
|
9
|
+
}, u = document.activeElement;
|
10
|
+
return c.focus(), document.addEventListener("keydown", s), () => {
|
11
|
+
document.removeEventListener("keydown", s), n && (u == null || u.focus());
|
12
|
+
};
|
13
|
+
}, [n, t]);
|
14
|
+
};
|
7
15
|
export {
|
8
|
-
|
16
|
+
f as useFocusTrap
|
9
17
|
};
|
10
18
|
//# sourceMappingURL=index.es272.js.map
|
package/dist/index.es272.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.es272.js","sources":["../
|
1
|
+
{"version":3,"file":"index.es272.js","sources":["../src/hooks/useFocusTrap.ts"],"sourcesContent":["import { useEffect } from \"react\";\r\n\r\nexport const useFocusTrap = (\r\n ref: React.RefObject<HTMLElement | null>,\r\n isActive: boolean,\r\n) => {\r\n useEffect(() => {\r\n if (!isActive || !ref.current) return;\r\n\r\n const focusableElements = ref.current.querySelectorAll(\r\n 'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])',\r\n );\r\n const firstFocusableElement = focusableElements[0] as HTMLElement;\r\n const lastFocusableElement = focusableElements[\r\n focusableElements.length - 1\r\n ] as HTMLElement;\r\n\r\n const handleKeyDown = (e: KeyboardEvent) => {\r\n if (e.key !== \"Tab\") return;\r\n\r\n if (e.shiftKey) {\r\n if (document.activeElement === firstFocusableElement) {\r\n lastFocusableElement.focus();\r\n e.preventDefault();\r\n }\r\n } else {\r\n if (document.activeElement === lastFocusableElement) {\r\n firstFocusableElement.focus();\r\n e.preventDefault();\r\n }\r\n }\r\n };\r\n\r\n const previousActiveElement = document.activeElement as HTMLElement;\r\n\r\n firstFocusableElement.focus();\r\n\r\n document.addEventListener(\"keydown\", handleKeyDown);\r\n\r\n return () => {\r\n document.removeEventListener(\"keydown\", handleKeyDown);\r\n\r\n if (isActive) {\r\n previousActiveElement?.focus();\r\n }\r\n };\r\n }, [isActive, ref]);\r\n};\r\n"],"names":["useFocusTrap","ref","isActive","useEffect","focusableElements","firstFocusableElement","lastFocusableElement","handleKeyDown","previousActiveElement"],"mappings":";AAEa,MAAAA,IAAe,CAC1BC,GACAC,MACG;AACH,EAAAC,EAAU,MAAM;AACd,QAAI,CAACD,KAAY,CAACD,EAAI,QAAS;AAEzB,UAAAG,IAAoBH,EAAI,QAAQ;AAAA,MACpC;AAAA,IACF,GACMI,IAAwBD,EAAkB,CAAC,GAC3CE,IAAuBF,EAC3BA,EAAkB,SAAS,CAC7B,GAEMG,IAAgB,CAAC,MAAqB;AACtC,MAAA,EAAE,QAAQ,UAEV,EAAE,WACA,SAAS,kBAAkBF,MAC7BC,EAAqB,MAAM,GAC3B,EAAE,eAAe,KAGf,SAAS,kBAAkBA,MAC7BD,EAAsB,MAAM,GAC5B,EAAE,eAAe;AAAA,IAGvB,GAEMG,IAAwB,SAAS;AAEvC,WAAAH,EAAsB,MAAM,GAEnB,SAAA,iBAAiB,WAAWE,CAAa,GAE3C,MAAM;AACF,eAAA,oBAAoB,WAAWA,CAAa,GAEjDL,MACFM,KAAA,QAAAA,EAAuB;AAAA,IAE3B;AAAA,EAAA,GACC,CAACN,GAAUD,CAAG,CAAC;AACpB;"}
|
package/dist/index.es275.js
CHANGED
@@ -1,33 +1,10 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
onChange: s = () => {
|
7
|
-
}
|
8
|
-
}) {
|
9
|
-
const [e, n] = v({ defaultProp: r, onChange: s }), o = t !== void 0, i = o ? t : e, u = f(s), d = l.useCallback(
|
10
|
-
(c) => {
|
11
|
-
if (o) {
|
12
|
-
const a = typeof c == "function" ? c(t) : c;
|
13
|
-
a !== t && u(a);
|
14
|
-
} else
|
15
|
-
n(c);
|
16
|
-
},
|
17
|
-
[o, t, n, u]
|
18
|
-
);
|
19
|
-
return [i, d];
|
20
|
-
}
|
21
|
-
function v({
|
22
|
-
defaultProp: t,
|
23
|
-
onChange: r
|
24
|
-
}) {
|
25
|
-
const s = l.useState(t), [e] = s, n = l.useRef(e), o = f(r);
|
26
|
-
return l.useEffect(() => {
|
27
|
-
n.current !== e && (o(e), n.current = e);
|
28
|
-
}, [e, n, o]), s;
|
1
|
+
function h(f, c, { checkForDefaultPrevented: p = !0 } = {}) {
|
2
|
+
return function(s) {
|
3
|
+
if (f == null || f(s), p === !1 || !s.defaultPrevented)
|
4
|
+
return c == null ? void 0 : c(s);
|
5
|
+
};
|
29
6
|
}
|
30
7
|
export {
|
31
|
-
|
8
|
+
h as composeEventHandlers
|
32
9
|
};
|
33
10
|
//# sourceMappingURL=index.es275.js.map
|
package/dist/index.es275.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.es275.js","sources":["../node_modules/@radix-ui/
|
1
|
+
{"version":3,"file":"index.es275.js","sources":["../node_modules/@radix-ui/primitive/dist/index.mjs"],"sourcesContent":["// packages/core/primitive/src/primitive.tsx\nfunction composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {\n return function handleEvent(event) {\n originalEventHandler?.(event);\n if (checkForDefaultPrevented === false || !event.defaultPrevented) {\n return ourEventHandler?.(event);\n }\n };\n}\nexport {\n composeEventHandlers\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["composeEventHandlers","originalEventHandler","ourEventHandler","checkForDefaultPrevented","event"],"mappings":"AACA,SAASA,EAAqBC,GAAsBC,GAAiB,EAAE,0BAAAC,IAA2B,GAAM,IAAG,IAAI;AAC7G,SAAO,SAAqBC,GAAO;AAEjC,QADAH,KAAA,QAAAA,EAAuBG,IACnBD,MAA6B,MAAS,CAACC,EAAM;AAC/C,aAAOF,KAAA,gBAAAA,EAAkBE;AAAA,EAE5B;AACH;","x_google_ignoreList":[0]}
|
package/dist/index.es276.js
CHANGED
@@ -1,36 +1,30 @@
|
|
1
|
-
import * as
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ u.jsx(a, { ...m, ref: e });
|
26
|
-
});
|
27
|
-
return t.displayName = `Primitive.${i}`, { ...r, [i]: t };
|
28
|
-
}, {});
|
29
|
-
function h(r, i) {
|
30
|
-
r && p.flushSync(() => r.dispatchEvent(i));
|
1
|
+
import * as f from "react";
|
2
|
+
function l(n, o) {
|
3
|
+
if (typeof n == "function")
|
4
|
+
return n(o);
|
5
|
+
n != null && (n.current = o);
|
6
|
+
}
|
7
|
+
function i(...n) {
|
8
|
+
return (o) => {
|
9
|
+
let u = !1;
|
10
|
+
const c = n.map((t) => {
|
11
|
+
const e = l(t, o);
|
12
|
+
return !u && typeof e == "function" && (u = !0), e;
|
13
|
+
});
|
14
|
+
if (u)
|
15
|
+
return () => {
|
16
|
+
for (let t = 0; t < c.length; t++) {
|
17
|
+
const e = c[t];
|
18
|
+
typeof e == "function" ? e() : l(n[t], null);
|
19
|
+
}
|
20
|
+
};
|
21
|
+
};
|
22
|
+
}
|
23
|
+
function s(...n) {
|
24
|
+
return f.useCallback(i(...n), n);
|
31
25
|
}
|
32
26
|
export {
|
33
|
-
|
34
|
-
|
27
|
+
i as composeRefs,
|
28
|
+
s as useComposedRefs
|
35
29
|
};
|
36
30
|
//# sourceMappingURL=index.es276.js.map
|
package/dist/index.es276.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.es276.js","sources":["../node_modules/@radix-ui/react-
|
1
|
+
{"version":3,"file":"index.es276.js","sources":["../node_modules/@radix-ui/react-compose-refs/dist/index.mjs"],"sourcesContent":["// packages/react/compose-refs/src/composeRefs.tsx\nimport * as React from \"react\";\nfunction setRef(ref, value) {\n if (typeof ref === \"function\") {\n return ref(value);\n } else if (ref !== null && ref !== void 0) {\n ref.current = value;\n }\n}\nfunction composeRefs(...refs) {\n return (node) => {\n let hasCleanup = false;\n const cleanups = refs.map((ref) => {\n const cleanup = setRef(ref, node);\n if (!hasCleanup && typeof cleanup == \"function\") {\n hasCleanup = true;\n }\n return cleanup;\n });\n if (hasCleanup) {\n return () => {\n for (let i = 0; i < cleanups.length; i++) {\n const cleanup = cleanups[i];\n if (typeof cleanup == \"function\") {\n cleanup();\n } else {\n setRef(refs[i], null);\n }\n }\n };\n }\n };\n}\nfunction useComposedRefs(...refs) {\n return React.useCallback(composeRefs(...refs), refs);\n}\nexport {\n composeRefs,\n useComposedRefs\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["setRef","ref","value","composeRefs","refs","node","hasCleanup","cleanups","cleanup","i","useComposedRefs","React"],"mappings":";AAEA,SAASA,EAAOC,GAAKC,GAAO;AAC1B,MAAI,OAAOD,KAAQ;AACjB,WAAOA,EAAIC,CAAK;AACX,EAAID,KAAQ,SACjBA,EAAI,UAAUC;AAElB;AACA,SAASC,KAAeC,GAAM;AAC5B,SAAO,CAACC,MAAS;AACf,QAAIC,IAAa;AACjB,UAAMC,IAAWH,EAAK,IAAI,CAACH,MAAQ;AACjC,YAAMO,IAAUR,EAAOC,GAAKI,CAAI;AAChC,aAAI,CAACC,KAAc,OAAOE,KAAW,eACnCF,IAAa,KAERE;AAAA,IACb,CAAK;AACD,QAAIF;AACF,aAAO,MAAM;AACX,iBAASG,IAAI,GAAGA,IAAIF,EAAS,QAAQE,KAAK;AACxC,gBAAMD,IAAUD,EAASE,CAAC;AAC1B,UAAI,OAAOD,KAAW,aACpBA,EAAS,IAETR,EAAOI,EAAKK,CAAC,GAAG,IAAI;AAAA,QAEhC;AAAA,MACO;AAAA,EAEJ;AACH;AACA,SAASC,KAAmBN,GAAM;AAChC,SAAOO,EAAM,YAAYR,EAAY,GAAGC,CAAI,GAAGA,CAAI;AACrD;","x_google_ignoreList":[0]}
|