@anoki/fse-ui 1.0.362 → 1.0.364
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.cjs166.js +1 -1
- package/dist/index.cjs170.js +1 -1
- package/dist/index.cjs177.js +1 -1
- package/dist/index.cjs188.js +1 -1
- package/dist/index.cjs215.js +1 -1
- package/dist/index.cjs240.js +1 -1
- package/dist/index.cjs241.js +1 -1
- package/dist/index.cjs246.js +1 -1
- package/dist/index.cjs246.js.map +1 -1
- package/dist/index.cjs247.js +2 -0
- package/dist/index.cjs247.js.map +1 -0
- package/dist/index.cjs248.js +2 -0
- package/dist/index.cjs248.js.map +1 -0
- package/dist/index.cjs249.js +1 -1
- package/dist/index.cjs249.js.map +1 -1
- package/dist/index.cjs250.js +1 -1
- package/dist/index.cjs250.js.map +1 -1
- package/dist/index.cjs251.js +1 -1
- package/dist/index.cjs251.js.map +1 -1
- package/dist/index.cjs252.js +1 -1
- package/dist/index.cjs252.js.map +1 -1
- package/dist/index.cjs253.js +1 -1
- package/dist/index.cjs253.js.map +1 -1
- package/dist/index.cjs256.js +1 -1
- package/dist/index.cjs256.js.map +1 -1
- package/dist/index.cjs257.js +1 -1
- package/dist/index.cjs257.js.map +1 -1
- package/dist/index.cjs258.js +1 -1
- package/dist/index.cjs258.js.map +1 -1
- package/dist/index.cjs259.js +1 -1
- package/dist/index.cjs259.js.map +1 -1
- package/dist/index.cjs260.js +1 -1
- package/dist/index.cjs260.js.map +1 -1
- package/dist/index.cjs261.js +1 -1
- package/dist/index.cjs261.js.map +1 -1
- package/dist/index.cjs263.js +1 -1
- package/dist/index.cjs264.js +1 -1
- package/dist/index.cjs266.js +1 -1
- package/dist/index.cjs268.js +1 -1
- package/dist/index.cjs269.js +1 -1
- package/dist/index.cjs270.js +1 -1
- package/dist/index.cjs271.js +1 -1
- package/dist/index.cjs273.js +1 -1
- package/dist/index.cjs277.js +2 -0
- package/dist/index.cjs277.js.map +1 -0
- 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.cjs275.js → index.cjs288.js} +2 -2
- package/dist/{index.cjs275.js.map → index.cjs288.js.map} +1 -1
- package/dist/index.cjs295.js +1 -1
- package/dist/index.cjs295.js.map +1 -1
- package/dist/{index.cjs292.js → index.cjs296.js} +1 -1
- package/dist/{index.cjs292.js.map → index.cjs296.js.map} +1 -1
- package/dist/{index.cjs293.js → index.cjs297.js} +2 -2
- package/dist/{index.cjs293.js.map → index.cjs297.js.map} +1 -1
- package/dist/{index.cjs294.js → index.cjs298.js} +2 -2
- package/dist/{index.cjs294.js.map → index.cjs298.js.map} +1 -1
- package/dist/index.cjs299.js +1 -1
- package/dist/index.cjs299.js.map +1 -1
- package/dist/index.cjs300.js +1 -1
- package/dist/index.cjs300.js.map +1 -1
- package/dist/index.cjs301.js +1 -1
- package/dist/index.cjs301.js.map +1 -1
- package/dist/index.cjs302.js +1 -1
- package/dist/index.cjs302.js.map +1 -1
- package/dist/index.cjs303.js +1 -1
- package/dist/index.cjs303.js.map +1 -1
- package/dist/index.cjs305.js +1 -1
- package/dist/index.cjs307.js +1 -1
- package/dist/index.cjs308.js +1 -1
- package/dist/index.cjs312.js +1 -38
- package/dist/index.cjs312.js.map +1 -1
- package/dist/index.cjs313.js +38 -1
- package/dist/index.cjs313.js.map +1 -1
- package/dist/index.cjs314.js +1 -1
- package/dist/index.cjs314.js.map +1 -1
- package/dist/index.cjs315.js +1 -1
- package/dist/index.cjs315.js.map +1 -1
- package/dist/index.cjs316.js +1 -1
- package/dist/index.cjs316.js.map +1 -1
- package/dist/index.es166.js +7 -7
- package/dist/index.es170.js +1 -1
- package/dist/index.es177.js +8 -8
- package/dist/index.es188.js +11 -11
- package/dist/index.es215.js +7 -7
- package/dist/index.es240.js +1 -1
- package/dist/index.es241.js +1 -1
- package/dist/index.es246.js +7 -15
- package/dist/index.es246.js.map +1 -1
- package/dist/index.es247.js +30 -0
- package/dist/index.es247.js.map +1 -0
- package/dist/index.es248.js +71 -0
- package/dist/index.es248.js.map +1 -0
- package/dist/index.es249.js +29 -6
- package/dist/index.es249.js.map +1 -1
- package/dist/index.es250.js +32 -26
- package/dist/index.es250.js.map +1 -1
- package/dist/index.es251.js +617 -63
- package/dist/index.es251.js.map +1 -1
- package/dist/index.es252.js +10 -29
- package/dist/index.es252.js.map +1 -1
- package/dist/index.es253.js +15 -33
- package/dist/index.es253.js.map +1 -1
- package/dist/index.es256.js +6 -2
- package/dist/index.es256.js.map +1 -1
- package/dist/index.es257.js +25 -2
- package/dist/index.es257.js.map +1 -1
- package/dist/index.es258.js +68 -5
- package/dist/index.es258.js.map +1 -1
- package/dist/index.es259.js +29 -25
- package/dist/index.es259.js.map +1 -1
- package/dist/index.es260.js +2 -69
- package/dist/index.es260.js.map +1 -1
- package/dist/index.es261.js +2 -29
- package/dist/index.es261.js.map +1 -1
- package/dist/index.es263.js +1 -1
- package/dist/index.es264.js +2 -2
- package/dist/index.es266.js +4 -4
- package/dist/index.es268.js +2 -2
- package/dist/index.es269.js +7 -7
- package/dist/index.es270.js +1 -1
- package/dist/index.es271.js +6 -6
- package/dist/index.es273.js +3 -3
- package/dist/index.es277.js +128 -0
- package/dist/index.es277.js.map +1 -0
- package/dist/index.es278.js +126 -116
- package/dist/index.es278.js.map +1 -1
- package/dist/index.es279.js +13 -134
- package/dist/index.es279.js.map +1 -1
- package/dist/index.es280.js +33 -14
- package/dist/index.es280.js.map +1 -1
- package/dist/index.es281.js +41 -32
- package/dist/index.es281.js.map +1 -1
- package/dist/{index.es275.js → index.es288.js} +2 -2
- package/dist/{index.es275.js.map → index.es288.js.map} +1 -1
- package/dist/index.es295.js +28 -392
- package/dist/index.es295.js.map +1 -1
- package/dist/{index.es292.js → index.es296.js} +1 -1
- package/dist/{index.es292.js.map → index.es296.js.map} +1 -1
- package/dist/{index.es293.js → index.es297.js} +3 -3
- package/dist/{index.es293.js.map → index.es297.js.map} +1 -1
- package/dist/{index.es294.js → index.es298.js} +2 -2
- package/dist/{index.es294.js.map → index.es298.js.map} +1 -1
- package/dist/index.es299.js +392 -28
- package/dist/index.es299.js.map +1 -1
- package/dist/index.es300.js +40 -23
- package/dist/index.es300.js.map +1 -1
- package/dist/index.es301.js +24 -28
- package/dist/index.es301.js.map +1 -1
- package/dist/index.es302.js +29 -5
- package/dist/index.es302.js.map +1 -1
- package/dist/index.es303.js +5 -42
- package/dist/index.es303.js.map +1 -1
- package/dist/index.es305.js +1 -1
- package/dist/index.es307.js +5 -5
- package/dist/index.es308.js +1 -1
- package/dist/index.es312.js +65 -69
- package/dist/index.es312.js.map +1 -1
- package/dist/index.es313.js +68 -8
- package/dist/index.es313.js.map +1 -1
- package/dist/index.es314.js +9 -14
- package/dist/index.es314.js.map +1 -1
- package/dist/index.es315.js +14 -62
- package/dist/index.es315.js.map +1 -1
- package/dist/index.es316.js +61 -64
- package/dist/index.es316.js.map +1 -1
- package/dist/sections/Services/Services.css +1 -1
- package/package.json +1 -1
- package/dist/index.cjs254.js +0 -2
- package/dist/index.cjs254.js.map +0 -1
- package/dist/index.cjs255.js +0 -2
- package/dist/index.cjs255.js.map +0 -1
- package/dist/index.cjs282.js +0 -2
- package/dist/index.cjs282.js.map +0 -1
- package/dist/index.es254.js +0 -625
- package/dist/index.es254.js.map +0 -1
- package/dist/index.es255.js +0 -14
- package/dist/index.es255.js.map +0 -1
- package/dist/index.es282.js +0 -45
- package/dist/index.es282.js.map +0 -1
package/dist/index.es177.js
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
import * as n from "react";
|
2
|
-
import { useComposedRefs as N } from "./index.
|
3
|
-
import { createContextScope as M } from "./index.
|
4
|
-
import { composeEventHandlers as S } from "./index.
|
5
|
-
import { useControllableState as O } from "./index.
|
6
|
-
import { usePrevious as A } from "./index.
|
7
|
-
import { useSize as B } from "./index.
|
8
|
-
import { Presence as H } from "./index.
|
9
|
-
import { Primitive as j } from "./index.
|
2
|
+
import { useComposedRefs as N } from "./index.es247.js";
|
3
|
+
import { createContextScope as M } from "./index.es248.js";
|
4
|
+
import { composeEventHandlers as S } from "./index.es246.js";
|
5
|
+
import { useControllableState as O } from "./index.es249.js";
|
6
|
+
import { usePrevious as A } from "./index.es256.js";
|
7
|
+
import { useSize as B } from "./index.es257.js";
|
8
|
+
import { Presence as H } from "./index.es258.js";
|
9
|
+
import { Primitive as j } from "./index.es259.js";
|
10
10
|
import { j as f } from "./index.es141.js";
|
11
11
|
var R = "Checkbox", [K, Y] = M(R), [L, q] = K(R), I = n.forwardRef(
|
12
12
|
(e, l) => {
|
package/dist/index.es188.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.
|
2
|
+
import { composeEventHandlers as p } from "./index.es246.js";
|
3
|
+
import { useComposedRefs as C } from "./index.es247.js";
|
4
|
+
import { createContextScope as L, createContext as $ } from "./index.es248.js";
|
5
|
+
import { useId as x } from "./index.es252.js";
|
6
|
+
import { useControllableState as B } from "./index.es249.js";
|
7
|
+
import { DismissableLayer as H } from "./index.es277.js";
|
8
|
+
import { FocusScope as V } from "./index.es278.js";
|
9
|
+
import { Portal as q } from "./index.es279.js";
|
10
|
+
import { Presence as R } from "./index.es258.js";
|
11
|
+
import { Primitive as m } from "./index.es280.js";
|
12
12
|
import { useFocusGuards as K } from "./index.es267.js";
|
13
13
|
import U from "./index.es273.js";
|
14
14
|
import { hideOthers as Y } from "./index.es272.js";
|
15
|
-
import { Slot as Z } from "./index.
|
15
|
+
import { Slot as Z } from "./index.es281.js";
|
16
16
|
import { j as i } from "./index.es141.js";
|
17
17
|
var _ = "Dialog", [P, _e] = L(_), [z, u] = P(_), y = (e) => {
|
18
18
|
const {
|
package/dist/index.es215.js
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
import * as n 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.es246.js";
|
3
|
+
import { useComposedRefs as _ } from "./index.es247.js";
|
4
|
+
import { createContextScope as H } from "./index.es248.js";
|
5
|
+
import { useControllableState as I } from "./index.es249.js";
|
6
|
+
import { usePrevious as M } from "./index.es256.js";
|
7
|
+
import { useSize as N } from "./index.es257.js";
|
8
|
+
import { Primitive as w } from "./index.es295.js";
|
9
9
|
import { j as u } from "./index.es141.js";
|
10
10
|
var k = "Switch", [B, J] = H(k), [q, z] = B(k), C = n.forwardRef(
|
11
11
|
(e, s) => {
|
package/dist/index.es240.js
CHANGED
package/dist/index.es241.js
CHANGED
package/dist/index.es246.js
CHANGED
@@ -1,18 +1,10 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
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
|
-
};
|
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
|
+
};
|
6
|
+
}
|
15
7
|
export {
|
16
|
-
|
8
|
+
h as composeEventHandlers
|
17
9
|
};
|
18
10
|
//# sourceMappingURL=index.es246.js.map
|
package/dist/index.es246.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.es246.js","sources":["../
|
1
|
+
{"version":3,"file":"index.es246.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]}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
import * as l from "react";
|
2
|
+
function f(n, u) {
|
3
|
+
if (typeof n == "function")
|
4
|
+
return n(u);
|
5
|
+
n != null && (n.current = u);
|
6
|
+
}
|
7
|
+
function i(...n) {
|
8
|
+
return (u) => {
|
9
|
+
let o = !1;
|
10
|
+
const c = n.map((e) => {
|
11
|
+
const t = f(e, u);
|
12
|
+
return !o && typeof t == "function" && (o = !0), t;
|
13
|
+
});
|
14
|
+
if (o)
|
15
|
+
return () => {
|
16
|
+
for (let e = 0; e < c.length; e++) {
|
17
|
+
const t = c[e];
|
18
|
+
typeof t == "function" ? t() : f(n[e], null);
|
19
|
+
}
|
20
|
+
};
|
21
|
+
};
|
22
|
+
}
|
23
|
+
function s(...n) {
|
24
|
+
return l.useCallback(i(...n), n);
|
25
|
+
}
|
26
|
+
export {
|
27
|
+
i as composeRefs,
|
28
|
+
s as useComposedRefs
|
29
|
+
};
|
30
|
+
//# sourceMappingURL=index.es247.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.es247.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]}
|
@@ -0,0 +1,71 @@
|
|
1
|
+
import * as u from "react";
|
2
|
+
import { j as h } from "./index.es141.js";
|
3
|
+
function j(t, c) {
|
4
|
+
const r = u.createContext(c), a = (o) => {
|
5
|
+
const { children: e, ...n } = o, s = u.useMemo(() => n, Object.values(n));
|
6
|
+
return /* @__PURE__ */ h.jsx(r.Provider, { value: s, children: e });
|
7
|
+
};
|
8
|
+
a.displayName = t + "Provider";
|
9
|
+
function i(o) {
|
10
|
+
const e = u.useContext(r);
|
11
|
+
if (e) return e;
|
12
|
+
if (c !== void 0) return c;
|
13
|
+
throw new Error(`\`${o}\` must be used within \`${t}\``);
|
14
|
+
}
|
15
|
+
return [a, i];
|
16
|
+
}
|
17
|
+
function w(t, c = []) {
|
18
|
+
let r = [];
|
19
|
+
function a(o, e) {
|
20
|
+
const n = u.createContext(e), s = r.length;
|
21
|
+
r = [...r, e];
|
22
|
+
const p = (d) => {
|
23
|
+
var S;
|
24
|
+
const { scope: x, children: C, ...m } = d, f = ((S = x == null ? void 0 : x[t]) == null ? void 0 : S[s]) || n, P = u.useMemo(() => m, Object.values(m));
|
25
|
+
return /* @__PURE__ */ h.jsx(f.Provider, { value: P, children: C });
|
26
|
+
};
|
27
|
+
p.displayName = o + "Provider";
|
28
|
+
function v(d, x) {
|
29
|
+
var f;
|
30
|
+
const C = ((f = x == null ? void 0 : x[t]) == null ? void 0 : f[s]) || n, m = u.useContext(C);
|
31
|
+
if (m) return m;
|
32
|
+
if (e !== void 0) return e;
|
33
|
+
throw new Error(`\`${d}\` must be used within \`${o}\``);
|
34
|
+
}
|
35
|
+
return [p, v];
|
36
|
+
}
|
37
|
+
const i = () => {
|
38
|
+
const o = r.map((e) => u.createContext(e));
|
39
|
+
return function(n) {
|
40
|
+
const s = (n == null ? void 0 : n[t]) || o;
|
41
|
+
return u.useMemo(
|
42
|
+
() => ({ [`__scope${t}`]: { ...n, [t]: s } }),
|
43
|
+
[n, s]
|
44
|
+
);
|
45
|
+
};
|
46
|
+
};
|
47
|
+
return i.scopeName = t, [a, l(i, ...c)];
|
48
|
+
}
|
49
|
+
function l(...t) {
|
50
|
+
const c = t[0];
|
51
|
+
if (t.length === 1) return c;
|
52
|
+
const r = () => {
|
53
|
+
const a = t.map((i) => ({
|
54
|
+
useScope: i(),
|
55
|
+
scopeName: i.scopeName
|
56
|
+
}));
|
57
|
+
return function(o) {
|
58
|
+
const e = a.reduce((n, { useScope: s, scopeName: p }) => {
|
59
|
+
const d = s(o)[`__scope${p}`];
|
60
|
+
return { ...n, ...d };
|
61
|
+
}, {});
|
62
|
+
return u.useMemo(() => ({ [`__scope${c.scopeName}`]: e }), [e]);
|
63
|
+
};
|
64
|
+
};
|
65
|
+
return r.scopeName = c.scopeName, r;
|
66
|
+
}
|
67
|
+
export {
|
68
|
+
j as createContext,
|
69
|
+
w as createContextScope
|
70
|
+
};
|
71
|
+
//# sourceMappingURL=index.es248.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.es248.js","sources":["../node_modules/@radix-ui/react-context/dist/index.mjs"],"sourcesContent":["// packages/react/context/src/createContext.tsx\nimport * as React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nfunction createContext2(rootComponentName, defaultContext) {\n const Context = React.createContext(defaultContext);\n const Provider = (props) => {\n const { children, ...context } = props;\n const value = React.useMemo(() => context, Object.values(context));\n return /* @__PURE__ */ jsx(Context.Provider, { value, children });\n };\n Provider.displayName = rootComponentName + \"Provider\";\n function useContext2(consumerName) {\n const context = React.useContext(Context);\n if (context) return context;\n if (defaultContext !== void 0) return defaultContext;\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n return [Provider, useContext2];\n}\nfunction createContextScope(scopeName, createContextScopeDeps = []) {\n let defaultContexts = [];\n function createContext3(rootComponentName, defaultContext) {\n const BaseContext = React.createContext(defaultContext);\n const index = defaultContexts.length;\n defaultContexts = [...defaultContexts, defaultContext];\n const Provider = (props) => {\n const { scope, children, ...context } = props;\n const Context = scope?.[scopeName]?.[index] || BaseContext;\n const value = React.useMemo(() => context, Object.values(context));\n return /* @__PURE__ */ jsx(Context.Provider, { value, children });\n };\n Provider.displayName = rootComponentName + \"Provider\";\n function useContext2(consumerName, scope) {\n const Context = scope?.[scopeName]?.[index] || BaseContext;\n const context = React.useContext(Context);\n if (context) return context;\n if (defaultContext !== void 0) return defaultContext;\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n return [Provider, useContext2];\n }\n const createScope = () => {\n const scopeContexts = defaultContexts.map((defaultContext) => {\n return React.createContext(defaultContext);\n });\n return function useScope(scope) {\n const contexts = scope?.[scopeName] || scopeContexts;\n return React.useMemo(\n () => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),\n [scope, contexts]\n );\n };\n };\n createScope.scopeName = scopeName;\n return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];\n}\nfunction composeContextScopes(...scopes) {\n const baseScope = scopes[0];\n if (scopes.length === 1) return baseScope;\n const createScope = () => {\n const scopeHooks = scopes.map((createScope2) => ({\n useScope: createScope2(),\n scopeName: createScope2.scopeName\n }));\n return function useComposedScopes(overrideScopes) {\n const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {\n const scopeProps = useScope(overrideScopes);\n const currentScope = scopeProps[`__scope${scopeName}`];\n return { ...nextScopes2, ...currentScope };\n }, {});\n return React.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);\n };\n };\n createScope.scopeName = baseScope.scopeName;\n return createScope;\n}\nexport {\n createContext2 as createContext,\n createContextScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["createContext2","rootComponentName","defaultContext","Context","React","Provider","props","children","context","value","jsx","useContext2","consumerName","createContextScope","scopeName","createContextScopeDeps","defaultContexts","createContext3","BaseContext","index","scope","_a","createScope","scopeContexts","contexts","composeContextScopes","scopes","baseScope","scopeHooks","createScope2","overrideScopes","nextScopes","nextScopes2","useScope","currentScope"],"mappings":"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","x_google_ignoreList":[0]}
|
package/dist/index.es249.js
CHANGED
@@ -1,10 +1,33 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
import * as l from "react";
|
2
|
+
import { useCallbackRef as f } from "./index.es262.js";
|
3
|
+
function R({
|
4
|
+
prop: e,
|
5
|
+
defaultProp: r,
|
6
|
+
onChange: s = () => {
|
7
|
+
}
|
8
|
+
}) {
|
9
|
+
const [t, n] = C({ defaultProp: r, onChange: s }), o = e !== void 0, i = o ? e : t, u = f(s), d = l.useCallback(
|
10
|
+
(c) => {
|
11
|
+
if (o) {
|
12
|
+
const a = typeof c == "function" ? c(e) : c;
|
13
|
+
a !== e && u(a);
|
14
|
+
} else
|
15
|
+
n(c);
|
16
|
+
},
|
17
|
+
[o, e, n, u]
|
18
|
+
);
|
19
|
+
return [i, d];
|
20
|
+
}
|
21
|
+
function C({
|
22
|
+
defaultProp: e,
|
23
|
+
onChange: r
|
24
|
+
}) {
|
25
|
+
const s = l.useState(e), [t] = s, n = l.useRef(t), o = f(r);
|
26
|
+
return l.useEffect(() => {
|
27
|
+
n.current !== t && (o(t), n.current = t);
|
28
|
+
}, [t, n, o]), s;
|
6
29
|
}
|
7
30
|
export {
|
8
|
-
|
31
|
+
R as useControllableState
|
9
32
|
};
|
10
33
|
//# sourceMappingURL=index.es249.js.map
|
package/dist/index.es249.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.es249.js","sources":["../node_modules/@radix-ui/
|
1
|
+
{"version":3,"file":"index.es249.js","sources":["../node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs"],"sourcesContent":["// packages/react/use-controllable-state/src/useControllableState.tsx\nimport * as React from \"react\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nfunction useControllableState({\n prop,\n defaultProp,\n onChange = () => {\n }\n}) {\n const [uncontrolledProp, setUncontrolledProp] = useUncontrolledState({ defaultProp, onChange });\n const isControlled = prop !== void 0;\n const value = isControlled ? prop : uncontrolledProp;\n const handleChange = useCallbackRef(onChange);\n const setValue = React.useCallback(\n (nextValue) => {\n if (isControlled) {\n const setter = nextValue;\n const value2 = typeof nextValue === \"function\" ? setter(prop) : nextValue;\n if (value2 !== prop) handleChange(value2);\n } else {\n setUncontrolledProp(nextValue);\n }\n },\n [isControlled, prop, setUncontrolledProp, handleChange]\n );\n return [value, setValue];\n}\nfunction useUncontrolledState({\n defaultProp,\n onChange\n}) {\n const uncontrolledState = React.useState(defaultProp);\n const [value] = uncontrolledState;\n const prevValueRef = React.useRef(value);\n const handleChange = useCallbackRef(onChange);\n React.useEffect(() => {\n if (prevValueRef.current !== value) {\n handleChange(value);\n prevValueRef.current = value;\n }\n }, [value, prevValueRef, handleChange]);\n return uncontrolledState;\n}\nexport {\n useControllableState\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["useControllableState","prop","defaultProp","onChange","uncontrolledProp","setUncontrolledProp","useUncontrolledState","isControlled","value","handleChange","useCallbackRef","setValue","React","nextValue","value2","uncontrolledState","prevValueRef"],"mappings":";;AAGA,SAASA,EAAqB;AAAA,EAC5B,MAAAC;AAAA,EACA,aAAAC;AAAA,EACA,UAAAC,IAAW,MAAM;AAAA,EACnB;AACA,GAAG;AACD,QAAM,CAACC,GAAkBC,CAAmB,IAAIC,EAAqB,EAAE,aAAAJ,GAAa,UAAAC,GAAU,GACxFI,IAAeN,MAAS,QACxBO,IAAQD,IAAeN,IAAOG,GAC9BK,IAAeC,EAAeP,CAAQ,GACtCQ,IAAWC,EAAM;AAAA,IACrB,CAACC,MAAc;AACb,UAAIN,GAAc;AAEhB,cAAMO,IAAS,OAAOD,KAAc,aADrBA,EACyCZ,CAAI,IAAIY;AAChE,QAAIC,MAAWb,KAAMQ,EAAaK,CAAM;AAAA,MAChD;AACQ,QAAAT,EAAoBQ,CAAS;AAAA,IAEhC;AAAA,IACD,CAACN,GAAcN,GAAMI,GAAqBI,CAAY;AAAA,EACvD;AACD,SAAO,CAACD,GAAOG,CAAQ;AACzB;AACA,SAASL,EAAqB;AAAA,EAC5B,aAAAJ;AAAA,EACA,UAAAC;AACF,GAAG;AACD,QAAMY,IAAoBH,EAAM,SAASV,CAAW,GAC9C,CAACM,CAAK,IAAIO,GACVC,IAAeJ,EAAM,OAAOJ,CAAK,GACjCC,IAAeC,EAAeP,CAAQ;AAC5C,SAAAS,EAAM,UAAU,MAAM;AACpB,IAAII,EAAa,YAAYR,MAC3BC,EAAaD,CAAK,GAClBQ,EAAa,UAAUR;AAAA,EAE1B,GAAE,CAACA,GAAOQ,GAAcP,CAAY,CAAC,GAC/BM;AACT;","x_google_ignoreList":[0]}
|
package/dist/index.es250.js
CHANGED
@@ -1,30 +1,36 @@
|
|
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
|
-
|
1
|
+
import * as n from "react";
|
2
|
+
import * as p from "react-dom";
|
3
|
+
import { Slot as f } from "./index.es263.js";
|
4
|
+
import { j as u } from "./index.es141.js";
|
5
|
+
var c = [
|
6
|
+
"a",
|
7
|
+
"button",
|
8
|
+
"div",
|
9
|
+
"form",
|
10
|
+
"h2",
|
11
|
+
"h3",
|
12
|
+
"img",
|
13
|
+
"input",
|
14
|
+
"label",
|
15
|
+
"li",
|
16
|
+
"nav",
|
17
|
+
"ol",
|
18
|
+
"p",
|
19
|
+
"span",
|
20
|
+
"svg",
|
21
|
+
"ul"
|
22
|
+
], v = c.reduce((r, i) => {
|
23
|
+
const t = n.forwardRef((o, e) => {
|
24
|
+
const { asChild: s, ...m } = o, a = s ? f : i;
|
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));
|
25
31
|
}
|
26
32
|
export {
|
27
|
-
|
28
|
-
|
33
|
+
v as Primitive,
|
34
|
+
h as dispatchDiscreteCustomEvent
|
29
35
|
};
|
30
36
|
//# sourceMappingURL=index.es250.js.map
|
package/dist/index.es250.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.es250.js","sources":["../node_modules/@radix-ui/react-
|
1
|
+
{"version":3,"file":"index.es250.js","sources":["../node_modules/@radix-ui/react-primitive/dist/index.mjs"],"sourcesContent":["// packages/react/primitive/src/Primitive.tsx\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NODES = [\n \"a\",\n \"button\",\n \"div\",\n \"form\",\n \"h2\",\n \"h3\",\n \"img\",\n \"input\",\n \"label\",\n \"li\",\n \"nav\",\n \"ol\",\n \"p\",\n \"span\",\n \"svg\",\n \"ul\"\n];\nvar Primitive = NODES.reduce((primitive, node) => {\n const Node = React.forwardRef((props, forwardedRef) => {\n const { asChild, ...primitiveProps } = props;\n const Comp = asChild ? Slot : node;\n if (typeof window !== \"undefined\") {\n window[Symbol.for(\"radix-ui\")] = true;\n }\n return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });\n });\n Node.displayName = `Primitive.${node}`;\n return { ...primitive, [node]: Node };\n}, {});\nfunction dispatchDiscreteCustomEvent(target, event) {\n if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));\n}\nvar Root = Primitive;\nexport {\n Primitive,\n Root,\n dispatchDiscreteCustomEvent\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["NODES","Primitive","primitive","node","Node","React","props","forwardedRef","asChild","primitiveProps","Comp","Slot","jsx","dispatchDiscreteCustomEvent","target","event","ReactDOM"],"mappings":";;;;AAKA,IAAIA,IAAQ;AAAA,EACV;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GACIC,IAAYD,EAAM,OAAO,CAACE,GAAWC,MAAS;AAChD,QAAMC,IAAOC,EAAM,WAAW,CAACC,GAAOC,MAAiB;AACrD,UAAM,EAAE,SAAAC,GAAS,GAAGC,EAAc,IAAKH,GACjCI,IAAOF,IAAUG,IAAOR;AAC9B,WAAI,OAAO,SAAW,QACpB,OAAO,OAAO,IAAI,UAAU,CAAC,IAAI,KAEZS,gBAAAA,EAAAA,IAAIF,GAAM,EAAE,GAAGD,GAAgB,KAAKF,GAAc;AAAA,EAC7E,CAAG;AACD,SAAAH,EAAK,cAAc,aAAaD,CAAI,IAC7B,EAAE,GAAGD,GAAW,CAACC,CAAI,GAAGC,EAAM;AACvC,GAAG,CAAE,CAAA;AACL,SAASS,EAA4BC,GAAQC,GAAO;AAClD,EAAID,KAAQE,EAAS,UAAU,MAAMF,EAAO,cAAcC,CAAK,CAAC;AAClE;","x_google_ignoreList":[0]}
|