@websolutespa/ask-ui 1.0.1 → 1.0.2
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/exports/components.d.mts +2232 -5
- package/dist/exports/components.mjs +4439 -4
- package/dist/exports/hooks.mjs +1 -17
- package/dist/exports/lib.d.mts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/use-mobile-SSHtEcOs.mjs +18 -0
- package/package.json +1 -1
- /package/dist/{utils-Dnvgforf.d.mts → utils-CCM7KiiI.d.mts} +0 -0
package/dist/exports/hooks.mjs
CHANGED
|
@@ -1,18 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
//#region src/hooks/use-mobile.ts
|
|
3
|
-
const MOBILE_BREAKPOINT = 768;
|
|
4
|
-
function useIsMobile() {
|
|
5
|
-
const [isMobile, setIsMobile] = React.useState(void 0);
|
|
6
|
-
React.useEffect(() => {
|
|
7
|
-
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
|
|
8
|
-
const onChange = () => {
|
|
9
|
-
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
10
|
-
};
|
|
11
|
-
mql.addEventListener("change", onChange);
|
|
12
|
-
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
13
|
-
return () => mql.removeEventListener("change", onChange);
|
|
14
|
-
}, []);
|
|
15
|
-
return !!isMobile;
|
|
16
|
-
}
|
|
17
|
-
//#endregion
|
|
1
|
+
import { t as useIsMobile } from "../use-mobile-SSHtEcOs.mjs";
|
|
18
2
|
export { useIsMobile };
|
package/dist/exports/lib.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as cn } from "../utils-
|
|
1
|
+
import { t as cn } from "../utils-CCM7KiiI.mjs";
|
|
2
2
|
export { cn };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as cn } from "./utils-
|
|
1
|
+
import { t as cn } from "./utils-CCM7KiiI.mjs";
|
|
2
2
|
export { cn };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
//#region src/hooks/use-mobile.ts
|
|
3
|
+
const MOBILE_BREAKPOINT = 768;
|
|
4
|
+
function useIsMobile() {
|
|
5
|
+
const [isMobile, setIsMobile] = React.useState(void 0);
|
|
6
|
+
React.useEffect(() => {
|
|
7
|
+
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
|
|
8
|
+
const onChange = () => {
|
|
9
|
+
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
10
|
+
};
|
|
11
|
+
mql.addEventListener("change", onChange);
|
|
12
|
+
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
13
|
+
return () => mql.removeEventListener("change", onChange);
|
|
14
|
+
}, []);
|
|
15
|
+
return !!isMobile;
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
18
|
+
export { useIsMobile as t };
|
package/package.json
CHANGED
|
File without changes
|