asterui 0.12.21 → 0.12.22
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/components/VirtualList.d.ts +29 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +46 -44
- package/dist/index.js.map +1 -1
- package/dist/index10.js +1 -1
- package/dist/index100.js +32 -5
- package/dist/index100.js.map +1 -1
- package/dist/index101.js +5 -13
- package/dist/index101.js.map +1 -1
- package/dist/index102.js +11 -43
- package/dist/index102.js.map +1 -1
- package/dist/index103.js +44 -11
- package/dist/index103.js.map +1 -1
- package/dist/index104.js +10 -12
- package/dist/index104.js.map +1 -1
- package/dist/index105.js +14 -7
- package/dist/index105.js.map +1 -1
- package/dist/index106.js +7 -12
- package/dist/index106.js.map +1 -1
- package/dist/index107.js +11 -29
- package/dist/index107.js.map +1 -1
- package/dist/index108.js +29 -16
- package/dist/index108.js.map +1 -1
- package/dist/index109.js +21 -0
- package/dist/index109.js.map +1 -0
- package/dist/index11.js +14 -14
- package/dist/index110.js +36 -0
- package/dist/index110.js.map +1 -0
- package/dist/index111.js +523 -0
- package/dist/index111.js.map +1 -0
- package/dist/index112.js +53 -0
- package/dist/index112.js.map +1 -0
- package/dist/index20.js +8 -8
- package/dist/index23.js +13 -13
- package/dist/index28.js +2 -2
- package/dist/index36.js +5 -5
- package/dist/index40.js +6 -6
- package/dist/index41.js +30 -30
- package/dist/index45.js +5 -5
- package/dist/index47.js +15 -15
- package/dist/index51.js +18 -18
- package/dist/index51.js.map +1 -1
- package/dist/index55.js +4 -4
- package/dist/index55.js.map +1 -1
- package/dist/index58.js +22 -22
- package/dist/index62.js +12 -12
- package/dist/index64.js +13 -13
- package/dist/index68.js +12 -12
- package/dist/index71.js +19 -19
- package/dist/index76.js +2 -2
- package/dist/index77.js +21 -21
- package/dist/index8.js +18 -18
- package/dist/index80.js +13 -13
- package/dist/index82.js +23 -23
- package/dist/index88.js +2 -2
- package/dist/index97.js +61 -121
- package/dist/index97.js.map +1 -1
- package/dist/index98.js +126 -14
- package/dist/index98.js.map +1 -1
- package/dist/index99.js +12 -31
- package/dist/index99.js.map +1 -1
- package/package.json +6 -1
package/dist/index106.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index106.js","sources":["../src/hooks/
|
|
1
|
+
{"version":3,"file":"index106.js","sources":["../src/hooks/usePrevious.ts"],"sourcesContent":["import { useRef, useEffect } from 'react'\n\n/**\n * Hook that returns the previous value of a variable.\n * Useful for comparing current and previous values in effects.\n *\n * @param value - Current value\n * @returns Previous value (undefined on first render)\n *\n * @example\n * const [count, setCount] = useState(0)\n * const prevCount = usePrevious(count)\n *\n * // prevCount is the value from previous render\n * console.log(`Changed from ${prevCount} to ${count}`)\n */\nexport function usePrevious<T>(value: T): T | undefined {\n const ref = useRef<T | undefined>(undefined)\n\n useEffect(() => {\n ref.current = value\n }, [value])\n\n return ref.current\n}\n"],"names":["usePrevious","value","ref","useRef","useEffect"],"mappings":";AAgBO,SAASA,EAAeC,GAAyB;AACtD,QAAMC,IAAMC,EAAsB,MAAS;AAE3C,SAAAC,EAAU,MAAM;AACd,IAAAF,EAAI,UAAUD;AAAA,EAChB,GAAG,CAACA,CAAK,CAAC,GAEHC,EAAI;AACb;"}
|
package/dist/index107.js
CHANGED
|
@@ -1,34 +1,16 @@
|
|
|
1
|
-
import { useState as
|
|
2
|
-
function
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
e.key === n && d(!1);
|
|
11
|
-
},
|
|
12
|
-
[n]
|
|
13
|
-
);
|
|
14
|
-
return l(() => {
|
|
15
|
-
const e = u ?? window;
|
|
16
|
-
return o === "keydown" ? (e.addEventListener("keydown", t), e.addEventListener("keyup", s)) : e.addEventListener("keyup", t), () => {
|
|
17
|
-
e.removeEventListener("keydown", t), e.removeEventListener("keyup", s);
|
|
1
|
+
import { useState as u, useRef as v, useEffect as a } from "react";
|
|
2
|
+
function f() {
|
|
3
|
+
const [o, t] = u(!1), n = v(null);
|
|
4
|
+
return a(() => {
|
|
5
|
+
const e = n.current;
|
|
6
|
+
if (!e) return;
|
|
7
|
+
const r = () => t(!0), s = () => t(!1);
|
|
8
|
+
return e.addEventListener("mouseenter", r), e.addEventListener("mouseleave", s), () => {
|
|
9
|
+
e.removeEventListener("mouseenter", r), e.removeEventListener("mouseleave", s);
|
|
18
10
|
};
|
|
19
|
-
}, [
|
|
20
|
-
}
|
|
21
|
-
function y(n, f, u = {}) {
|
|
22
|
-
const { target: o, event: r = "keydown", preventDefault: a = !1 } = u;
|
|
23
|
-
l(() => {
|
|
24
|
-
const d = o ?? window, t = (s) => {
|
|
25
|
-
s.key === n && (a && s.preventDefault(), f(s));
|
|
26
|
-
};
|
|
27
|
-
return d.addEventListener(r, t), () => d.removeEventListener(r, t);
|
|
28
|
-
}, [o, n, f, r, a]);
|
|
11
|
+
}, []), { ref: n, isHovered: o };
|
|
29
12
|
}
|
|
30
13
|
export {
|
|
31
|
-
|
|
32
|
-
y as useKeyPressCallback
|
|
14
|
+
f as useHover
|
|
33
15
|
};
|
|
34
16
|
//# sourceMappingURL=index107.js.map
|
package/dist/index107.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index107.js","sources":["../src/hooks/
|
|
1
|
+
{"version":3,"file":"index107.js","sources":["../src/hooks/useHover.ts"],"sourcesContent":["import { useState, useRef, useEffect, type RefObject } from 'react'\n\nexport interface UseHoverReturn<T extends HTMLElement> {\n ref: RefObject<T | null>\n isHovered: boolean\n}\n\n/**\n * Hook that tracks hover state of an element.\n *\n * @returns Object with ref and isHovered state\n *\n * @example\n * const { ref, isHovered } = useHover<HTMLDivElement>()\n *\n * <div ref={ref} className={isHovered ? 'bg-blue-500' : 'bg-gray-500'}>\n * Hover me!\n * </div>\n */\nexport function useHover<T extends HTMLElement = HTMLElement>(): UseHoverReturn<T> {\n const [isHovered, setIsHovered] = useState(false)\n const ref = useRef<T>(null)\n\n useEffect(() => {\n const node = ref.current\n if (!node) return\n\n const handleMouseEnter = () => setIsHovered(true)\n const handleMouseLeave = () => setIsHovered(false)\n\n node.addEventListener('mouseenter', handleMouseEnter)\n node.addEventListener('mouseleave', handleMouseLeave)\n\n return () => {\n node.removeEventListener('mouseenter', handleMouseEnter)\n node.removeEventListener('mouseleave', handleMouseLeave)\n }\n }, [])\n\n return { ref, isHovered }\n}\n"],"names":["useHover","isHovered","setIsHovered","useState","ref","useRef","useEffect","node","handleMouseEnter","handleMouseLeave"],"mappings":";AAmBO,SAASA,IAAmE;AACjF,QAAM,CAACC,GAAWC,CAAY,IAAIC,EAAS,EAAK,GAC1CC,IAAMC,EAAU,IAAI;AAE1B,SAAAC,EAAU,MAAM;AACd,UAAMC,IAAOH,EAAI;AACjB,QAAI,CAACG,EAAM;AAEX,UAAMC,IAAmB,MAAMN,EAAa,EAAI,GAC1CO,IAAmB,MAAMP,EAAa,EAAK;AAEjD,WAAAK,EAAK,iBAAiB,cAAcC,CAAgB,GACpDD,EAAK,iBAAiB,cAAcE,CAAgB,GAE7C,MAAM;AACX,MAAAF,EAAK,oBAAoB,cAAcC,CAAgB,GACvDD,EAAK,oBAAoB,cAAcE,CAAgB;AAAA,IACzD;AAAA,EACF,GAAG,CAAA,CAAE,GAEE,EAAE,KAAAL,GAAK,WAAAH,EAAA;AAChB;"}
|
package/dist/index108.js
CHANGED
|
@@ -1,21 +1,34 @@
|
|
|
1
|
-
import { useState as
|
|
2
|
-
function
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
n(
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import { useState as v, useCallback as i, useEffect as l } from "react";
|
|
2
|
+
function c(n, f = {}) {
|
|
3
|
+
const { target: u, event: o = "keydown", preventDefault: r = !1 } = f, [a, d] = v(!1), t = i(
|
|
4
|
+
(e) => {
|
|
5
|
+
e.key === n && (r && e.preventDefault(), d(!0));
|
|
6
|
+
},
|
|
7
|
+
[n, r]
|
|
8
|
+
), s = i(
|
|
9
|
+
(e) => {
|
|
10
|
+
e.key === n && d(!1);
|
|
11
|
+
},
|
|
12
|
+
[n]
|
|
13
|
+
);
|
|
14
|
+
return l(() => {
|
|
15
|
+
const e = u ?? window;
|
|
16
|
+
return o === "keydown" ? (e.addEventListener("keydown", t), e.addEventListener("keyup", s)) : e.addEventListener("keyup", t), () => {
|
|
17
|
+
e.removeEventListener("keydown", t), e.removeEventListener("keyup", s);
|
|
14
18
|
};
|
|
15
|
-
|
|
16
|
-
|
|
19
|
+
}, [u, o, t, s]), a;
|
|
20
|
+
}
|
|
21
|
+
function y(n, f, u = {}) {
|
|
22
|
+
const { target: o, event: r = "keydown", preventDefault: a = !1 } = u;
|
|
23
|
+
l(() => {
|
|
24
|
+
const d = o ?? window, t = (s) => {
|
|
25
|
+
s.key === n && (a && s.preventDefault(), f(s));
|
|
26
|
+
};
|
|
27
|
+
return d.addEventListener(r, t), () => d.removeEventListener(r, t);
|
|
28
|
+
}, [o, n, f, r, a]);
|
|
17
29
|
}
|
|
18
30
|
export {
|
|
19
|
-
|
|
31
|
+
c as useKeyPress,
|
|
32
|
+
y as useKeyPressCallback
|
|
20
33
|
};
|
|
21
34
|
//# sourceMappingURL=index108.js.map
|
package/dist/index108.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index108.js","sources":["../src/hooks/
|
|
1
|
+
{"version":3,"file":"index108.js","sources":["../src/hooks/useKeyPress.ts"],"sourcesContent":["import { useState, useEffect, useCallback } from 'react'\n\nexport interface UseKeyPressOptions {\n /** Target element (default: window) */\n target?: HTMLElement | Window | null\n /** Event type: 'keydown' | 'keyup' (default: 'keydown') */\n event?: 'keydown' | 'keyup'\n /** Prevent default browser behavior */\n preventDefault?: boolean\n}\n\n/**\n * Hook that detects when a specific key is pressed.\n *\n * @param targetKey - Key to detect (e.g., 'Enter', 'Escape', 'a')\n * @param options - Configuration options\n * @returns Whether the key is currently pressed\n *\n * @example\n * const enterPressed = useKeyPress('Enter')\n * const escapePressed = useKeyPress('Escape')\n *\n * useEffect(() => {\n * if (escapePressed) closeModal()\n * }, [escapePressed])\n *\n * @example\n * // With callback for immediate action\n * useKeyPress('Escape', { preventDefault: true })\n */\nexport function useKeyPress(\n targetKey: string,\n options: UseKeyPressOptions = {}\n): boolean {\n const { target, event = 'keydown', preventDefault = false } = options\n const [keyPressed, setKeyPressed] = useState(false)\n\n const downHandler = useCallback(\n (e: KeyboardEvent) => {\n if (e.key === targetKey) {\n if (preventDefault) e.preventDefault()\n setKeyPressed(true)\n }\n },\n [targetKey, preventDefault]\n )\n\n const upHandler = useCallback(\n (e: KeyboardEvent) => {\n if (e.key === targetKey) {\n setKeyPressed(false)\n }\n },\n [targetKey]\n )\n\n useEffect(() => {\n const targetElement = target ?? window\n\n if (event === 'keydown') {\n targetElement.addEventListener('keydown', downHandler as EventListener)\n targetElement.addEventListener('keyup', upHandler as EventListener)\n } else {\n targetElement.addEventListener('keyup', downHandler as EventListener)\n }\n\n return () => {\n targetElement.removeEventListener('keydown', downHandler as EventListener)\n targetElement.removeEventListener('keyup', upHandler as EventListener)\n }\n }, [target, event, downHandler, upHandler])\n\n return keyPressed\n}\n\n/**\n * Hook that calls a callback when a specific key is pressed.\n *\n * @param targetKey - Key to detect\n * @param callback - Function to call when key is pressed\n * @param options - Configuration options\n *\n * @example\n * useKeyPressCallback('Escape', () => closeModal())\n * useKeyPressCallback('Enter', () => submitForm(), { preventDefault: true })\n */\nexport function useKeyPressCallback(\n targetKey: string,\n callback: (event: KeyboardEvent) => void,\n options: UseKeyPressOptions = {}\n): void {\n const { target, event = 'keydown', preventDefault = false } = options\n\n useEffect(() => {\n const targetElement = target ?? window\n\n const handler = (e: KeyboardEvent) => {\n if (e.key === targetKey) {\n if (preventDefault) e.preventDefault()\n callback(e)\n }\n }\n\n targetElement.addEventListener(event, handler as EventListener)\n return () => targetElement.removeEventListener(event, handler as EventListener)\n }, [target, targetKey, callback, event, preventDefault])\n}\n"],"names":["useKeyPress","targetKey","options","target","event","preventDefault","keyPressed","setKeyPressed","useState","downHandler","useCallback","upHandler","useEffect","targetElement","useKeyPressCallback","callback","handler","e"],"mappings":";AA8BO,SAASA,EACdC,GACAC,IAA8B,IACrB;AACT,QAAM,EAAE,QAAAC,GAAQ,OAAAC,IAAQ,WAAW,gBAAAC,IAAiB,OAAUH,GACxD,CAACI,GAAYC,CAAa,IAAIC,EAAS,EAAK,GAE5CC,IAAcC;AAAA,IAClB,CAAC,MAAqB;AACpB,MAAI,EAAE,QAAQT,MACRI,OAAkB,eAAA,GACtBE,EAAc,EAAI;AAAA,IAEtB;AAAA,IACA,CAACN,GAAWI,CAAc;AAAA,EAAA,GAGtBM,IAAYD;AAAA,IAChB,CAAC,MAAqB;AACpB,MAAI,EAAE,QAAQT,KACZM,EAAc,EAAK;AAAA,IAEvB;AAAA,IACA,CAACN,CAAS;AAAA,EAAA;AAGZ,SAAAW,EAAU,MAAM;AACd,UAAMC,IAAgBV,KAAU;AAEhC,WAAIC,MAAU,aACZS,EAAc,iBAAiB,WAAWJ,CAA4B,GACtEI,EAAc,iBAAiB,SAASF,CAA0B,KAElEE,EAAc,iBAAiB,SAASJ,CAA4B,GAG/D,MAAM;AACX,MAAAI,EAAc,oBAAoB,WAAWJ,CAA4B,GACzEI,EAAc,oBAAoB,SAASF,CAA0B;AAAA,IACvE;AAAA,EACF,GAAG,CAACR,GAAQC,GAAOK,GAAaE,CAAS,CAAC,GAEnCL;AACT;AAaO,SAASQ,EACdb,GACAc,GACAb,IAA8B,CAAA,GACxB;AACN,QAAM,EAAE,QAAAC,GAAQ,OAAAC,IAAQ,WAAW,gBAAAC,IAAiB,OAAUH;AAE9D,EAAAU,EAAU,MAAM;AACd,UAAMC,IAAgBV,KAAU,QAE1Ba,IAAU,CAACC,MAAqB;AACpC,MAAIA,EAAE,QAAQhB,MACRI,OAAkB,eAAA,GACtBU,EAASE,CAAC;AAAA,IAEd;AAEA,WAAAJ,EAAc,iBAAiBT,GAAOY,CAAwB,GACvD,MAAMH,EAAc,oBAAoBT,GAAOY,CAAwB;AAAA,EAChF,GAAG,CAACb,GAAQF,GAAWc,GAAUX,GAAOC,CAAc,CAAC;AACzD;"}
|
package/dist/index109.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { useState as t, useEffect as d } from "react";
|
|
2
|
+
function r() {
|
|
3
|
+
const [i, n] = t(() => typeof window > "u" ? { width: 0, height: 0 } : {
|
|
4
|
+
width: window.innerWidth,
|
|
5
|
+
height: window.innerHeight
|
|
6
|
+
});
|
|
7
|
+
return d(() => {
|
|
8
|
+
if (typeof window > "u") return;
|
|
9
|
+
const e = () => {
|
|
10
|
+
n({
|
|
11
|
+
width: window.innerWidth,
|
|
12
|
+
height: window.innerHeight
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
return window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
|
|
16
|
+
}, []), i;
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
r as useWindowSize
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=index109.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index109.js","sources":["../src/hooks/useWindowSize.ts"],"sourcesContent":["import { useState, useEffect } from 'react'\n\nexport interface WindowSize {\n width: number\n height: number\n}\n\n/**\n * Hook that tracks window dimensions.\n * Updates on window resize.\n *\n * @returns Object with current width and height\n *\n * @example\n * const { width, height } = useWindowSize()\n *\n * return (\n * <div>\n * Window: {width} x {height}\n * {width < 768 && <MobileNav />}\n * </div>\n * )\n */\nexport function useWindowSize(): WindowSize {\n const [windowSize, setWindowSize] = useState<WindowSize>(() => {\n if (typeof window === 'undefined') {\n return { width: 0, height: 0 }\n }\n return {\n width: window.innerWidth,\n height: window.innerHeight,\n }\n })\n\n useEffect(() => {\n if (typeof window === 'undefined') return\n\n const handleResize = () => {\n setWindowSize({\n width: window.innerWidth,\n height: window.innerHeight,\n })\n }\n\n window.addEventListener('resize', handleResize)\n return () => window.removeEventListener('resize', handleResize)\n }, [])\n\n return windowSize\n}\n"],"names":["useWindowSize","windowSize","setWindowSize","useState","useEffect","handleResize"],"mappings":";AAuBO,SAASA,IAA4B;AAC1C,QAAM,CAACC,GAAYC,CAAa,IAAIC,EAAqB,MACnD,OAAO,SAAW,MACb,EAAE,OAAO,GAAG,QAAQ,EAAA,IAEtB;AAAA,IACL,OAAO,OAAO;AAAA,IACd,QAAQ,OAAO;AAAA,EAAA,CAElB;AAED,SAAAC,EAAU,MAAM;AACd,QAAI,OAAO,SAAW,IAAa;AAEnC,UAAMC,IAAe,MAAM;AACzB,MAAAH,EAAc;AAAA,QACZ,OAAO,OAAO;AAAA,QACd,QAAQ,OAAO;AAAA,MAAA,CAChB;AAAA,IACH;AAEA,kBAAO,iBAAiB,UAAUG,CAAY,GACvC,MAAM,OAAO,oBAAoB,UAAUA,CAAY;AAAA,EAChE,GAAG,CAAA,CAAE,GAEEJ;AACT;"}
|
package/dist/index11.js
CHANGED
|
@@ -5,9 +5,9 @@ function I({
|
|
|
5
5
|
children: f,
|
|
6
6
|
value: o,
|
|
7
7
|
defaultValue: x,
|
|
8
|
-
onChange:
|
|
8
|
+
onChange: d,
|
|
9
9
|
disabled: n = !1,
|
|
10
|
-
options:
|
|
10
|
+
options: h,
|
|
11
11
|
direction: a = "vertical",
|
|
12
12
|
className: u = ""
|
|
13
13
|
}) {
|
|
@@ -15,13 +15,13 @@ function I({
|
|
|
15
15
|
value: r,
|
|
16
16
|
onChange: (i, e) => {
|
|
17
17
|
const k = e ? [...r, i] : r.filter((b) => b !== i);
|
|
18
|
-
o === void 0 && g(k),
|
|
18
|
+
o === void 0 && g(k), d?.(k);
|
|
19
19
|
},
|
|
20
20
|
disabled: n
|
|
21
21
|
};
|
|
22
|
-
if (
|
|
22
|
+
if (h) {
|
|
23
23
|
const i = a === "horizontal" ? "flex flex-row flex-wrap gap-4" : "flex flex-col";
|
|
24
|
-
return /* @__PURE__ */ c(y.Provider, { value: t, children: /* @__PURE__ */ c("div", { className: `${i} ${u}`.trim(), children:
|
|
24
|
+
return /* @__PURE__ */ c(y.Provider, { value: t, children: /* @__PURE__ */ c("div", { className: `${i} ${u}`.trim(), children: h.map((e) => typeof e == "string" || typeof e == "number" ? /* @__PURE__ */ p("label", { className: "label cursor-pointer justify-start gap-2", children: [
|
|
25
25
|
/* @__PURE__ */ c(m, { value: e }),
|
|
26
26
|
/* @__PURE__ */ c("span", { className: "label-text", children: e })
|
|
27
27
|
] }, e) : /* @__PURE__ */ p("label", { className: "label cursor-pointer justify-start gap-2", children: [
|
|
@@ -36,9 +36,9 @@ const m = G(
|
|
|
36
36
|
children: f,
|
|
37
37
|
size: o,
|
|
38
38
|
color: x,
|
|
39
|
-
indeterminate:
|
|
39
|
+
indeterminate: d = !1,
|
|
40
40
|
swap: n,
|
|
41
|
-
className:
|
|
41
|
+
className: h = "",
|
|
42
42
|
value: a,
|
|
43
43
|
checked: u,
|
|
44
44
|
onChange: C,
|
|
@@ -68,16 +68,16 @@ const m = G(
|
|
|
68
68
|
t && a !== void 0 && (typeof a == "string" || typeof a == "number") && t.onChange?.(a, s.target.checked), C?.(s);
|
|
69
69
|
}, V = R.useCallback(
|
|
70
70
|
(s) => {
|
|
71
|
-
s && (s.indeterminate =
|
|
71
|
+
s && (s.indeterminate = d), typeof l == "function" ? l(s) : l && (l.current = s);
|
|
72
72
|
},
|
|
73
|
-
[
|
|
74
|
-
), j =
|
|
73
|
+
[d, l]
|
|
74
|
+
), j = d ? "indeterminate" : b ? "checked" : "unchecked";
|
|
75
75
|
if (n) {
|
|
76
76
|
const s = [
|
|
77
77
|
"swap",
|
|
78
78
|
n.effect === "rotate" && "swap-rotate",
|
|
79
79
|
n.effect === "flip" && "swap-flip",
|
|
80
|
-
|
|
80
|
+
h
|
|
81
81
|
].filter(Boolean).join(" ");
|
|
82
82
|
return /* @__PURE__ */ p("label", { className: s, children: [
|
|
83
83
|
/* @__PURE__ */ c(
|
|
@@ -110,17 +110,17 @@ const m = G(
|
|
|
110
110
|
...r
|
|
111
111
|
}
|
|
112
112
|
);
|
|
113
|
-
return f ? /* @__PURE__ */ p("label", { className: `label cursor-pointer justify-start gap-2 ${
|
|
113
|
+
return f ? /* @__PURE__ */ p("label", { className: `label cursor-pointer justify-start gap-2 ${h}`, children: [
|
|
114
114
|
w,
|
|
115
115
|
/* @__PURE__ */ c("span", { className: "label-text", children: f })
|
|
116
116
|
] }) : w;
|
|
117
117
|
}
|
|
118
118
|
);
|
|
119
119
|
m.displayName = "Checkbox";
|
|
120
|
-
const
|
|
120
|
+
const _ = Object.assign(m, {
|
|
121
121
|
Group: I
|
|
122
122
|
});
|
|
123
123
|
export {
|
|
124
|
-
|
|
124
|
+
_ as Checkbox
|
|
125
125
|
};
|
|
126
126
|
//# sourceMappingURL=index11.js.map
|
package/dist/index110.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as r from "react";
|
|
2
|
+
import { flushSync as c } from "react-dom";
|
|
3
|
+
import { Virtualizer as f, elementScroll as i, observeElementOffset as m, observeElementRect as d } from "./index111.js";
|
|
4
|
+
import { defaultKeyExtractor as R, defaultRangeExtractor as g, measureElement as z } from "./index111.js";
|
|
5
|
+
const a = typeof document < "u" ? r.useLayoutEffect : r.useEffect;
|
|
6
|
+
function p(e) {
|
|
7
|
+
const n = r.useReducer(() => ({}), {})[1], o = {
|
|
8
|
+
...e,
|
|
9
|
+
onChange: (l, u) => {
|
|
10
|
+
var s;
|
|
11
|
+
u ? c(n) : n(), (s = e.onChange) == null || s.call(e, l, u);
|
|
12
|
+
}
|
|
13
|
+
}, [t] = r.useState(
|
|
14
|
+
() => new f(o)
|
|
15
|
+
);
|
|
16
|
+
return t.setOptions(o), a(() => t._didMount(), []), a(() => t._willUpdate()), t;
|
|
17
|
+
}
|
|
18
|
+
function h(e) {
|
|
19
|
+
return p({
|
|
20
|
+
observeElementRect: d,
|
|
21
|
+
observeElementOffset: m,
|
|
22
|
+
scrollToFn: i,
|
|
23
|
+
...e
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
export {
|
|
27
|
+
f as Virtualizer,
|
|
28
|
+
R as defaultKeyExtractor,
|
|
29
|
+
g as defaultRangeExtractor,
|
|
30
|
+
i as elementScroll,
|
|
31
|
+
z as measureElement,
|
|
32
|
+
m as observeElementOffset,
|
|
33
|
+
d as observeElementRect,
|
|
34
|
+
h as useVirtualizer
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=index110.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index110.js","sources":["../../../node_modules/.pnpm/@tanstack+react-virtual@3.13.13_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@tanstack/react-virtual/dist/esm/index.js"],"sourcesContent":["import * as React from \"react\";\nimport { flushSync } from \"react-dom\";\nimport { Virtualizer, elementScroll, observeElementOffset, observeElementRect, windowScroll, observeWindowOffset, observeWindowRect } from \"@tanstack/virtual-core\";\nexport * from \"@tanstack/virtual-core\";\nconst useIsomorphicLayoutEffect = typeof document !== \"undefined\" ? React.useLayoutEffect : React.useEffect;\nfunction useVirtualizerBase(options) {\n const rerender = React.useReducer(() => ({}), {})[1];\n const resolvedOptions = {\n ...options,\n onChange: (instance2, sync) => {\n var _a;\n if (sync) {\n flushSync(rerender);\n } else {\n rerender();\n }\n (_a = options.onChange) == null ? void 0 : _a.call(options, instance2, sync);\n }\n };\n const [instance] = React.useState(\n () => new Virtualizer(resolvedOptions)\n );\n instance.setOptions(resolvedOptions);\n useIsomorphicLayoutEffect(() => {\n return instance._didMount();\n }, []);\n useIsomorphicLayoutEffect(() => {\n return instance._willUpdate();\n });\n return instance;\n}\nfunction useVirtualizer(options) {\n return useVirtualizerBase({\n observeElementRect,\n observeElementOffset,\n scrollToFn: elementScroll,\n ...options\n });\n}\nfunction useWindowVirtualizer(options) {\n return useVirtualizerBase({\n getScrollElement: () => typeof document !== \"undefined\" ? window : null,\n observeElementRect: observeWindowRect,\n observeElementOffset: observeWindowOffset,\n scrollToFn: windowScroll,\n initialOffset: () => typeof document !== \"undefined\" ? window.scrollY : 0,\n ...options\n });\n}\nexport {\n useVirtualizer,\n useWindowVirtualizer\n};\n//# sourceMappingURL=index.js.map\n"],"names":["useIsomorphicLayoutEffect","React","useVirtualizerBase","options","rerender","resolvedOptions","instance2","sync","_a","flushSync","instance","Virtualizer","useVirtualizer","observeElementRect","observeElementOffset","elementScroll"],"mappings":";;;;AAIA,MAAMA,IAA4B,OAAO,WAAa,MAAcC,EAAM,kBAAkBA,EAAM;AAClG,SAASC,EAAmBC,GAAS;AACnC,QAAMC,IAAWH,EAAM,WAAW,OAAO,CAAA,IAAK,CAAA,CAAE,EAAE,CAAC,GAC7CI,IAAkB;AAAA,IACtB,GAAGF;AAAA,IACH,UAAU,CAACG,GAAWC,MAAS;AAC7B,UAAIC;AACJ,MAAID,IACFE,EAAUL,CAAQ,IAElBA,EAAQ,IAETI,IAAKL,EAAQ,aAAa,QAAgBK,EAAG,KAAKL,GAASG,GAAWC,CAAI;AAAA,IAC7E;AAAA,EACJ,GACQ,CAACG,CAAQ,IAAIT,EAAM;AAAA,IACvB,MAAM,IAAIU,EAAYN,CAAe;AAAA,EACzC;AACE,SAAAK,EAAS,WAAWL,CAAe,GACnCL,EAA0B,MACjBU,EAAS,UAAS,GACxB,CAAA,CAAE,GACLV,EAA0B,MACjBU,EAAS,YAAW,CAC5B,GACMA;AACT;AACA,SAASE,EAAeT,GAAS;AAC/B,SAAOD,EAAmB;AAAA,IACxB,oBAAAW;AAAA,IACA,sBAAAC;AAAA,IACA,YAAYC;AAAA,IACZ,GAAGZ;AAAA,EACP,CAAG;AACH;","x_google_ignoreList":[0]}
|