@inntechcorp/it-design 2.2.76 → 2.2.78
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/hooks/index.d.ts +1 -0
- package/dist/hooks/useAvoidCollision.d.ts +16 -0
- package/dist/index.cjs.js +27 -27
- package/dist/index.d.ts +17 -1
- package/dist/index.esm.js +246 -246
- package/package.json +1 -1
package/dist/hooks/index.d.ts
CHANGED
|
@@ -12,3 +12,4 @@ export { default as useCoreFetch } from './useCoreFetch';
|
|
|
12
12
|
export { default as useContextBridge } from './useContextBridge';
|
|
13
13
|
export { default as useKeyboardShortcut } from './useKeyboardShortcut';
|
|
14
14
|
export { default as useOrientation } from './useOrientation';
|
|
15
|
+
export { default as useAvoidCollision } from './useAvoidCollision';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
type UseAvoidCollisionOpts = {
|
|
2
|
+
/** .chat-bubble, .cookie-bar gibi engellerin CSS seçicileri */
|
|
3
|
+
obstacles?: string[];
|
|
4
|
+
/** Sağa/sola yerleşim - şu an sağ-alt odaklı, gerekirse geliştirilebilir */
|
|
5
|
+
corner?: "bottom-right" | "bottom-left";
|
|
6
|
+
/** Otomatik algılama açılsın mı? */
|
|
7
|
+
autoAvoid?: boolean;
|
|
8
|
+
/** Panelden gelen manuel ekstra boşluk */
|
|
9
|
+
extraBottom?: number;
|
|
10
|
+
/** Otomatik algıda en az kaç px boşluk bırakalım */
|
|
11
|
+
minGap?: number;
|
|
12
|
+
};
|
|
13
|
+
declare const useAvoidCollision: ({ obstacles, corner, autoAvoid, extraBottom, minGap, }?: UseAvoidCollisionOpts) => {
|
|
14
|
+
bottomOffset: number;
|
|
15
|
+
};
|
|
16
|
+
export default useAvoidCollision;
|