@protonradio/proton-ui 0.10.11 → 0.10.12

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.
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./useBreakpoint-B8cmf0FU.js");exports.useBreakpoint=e.useBreakpoint;exports.useIsClosing=e.useIsClosing;exports.useLockBodyScroll=e.useLockBodyScroll;
2
+ //# sourceMappingURL=hooks.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hooks.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,53 @@
1
+ import { RefObject } from 'react';
2
+
3
+ declare type Breakpoint = (typeof BREAKPOINTS)[keyof typeof BREAKPOINTS];
4
+
5
+ declare type BreakpointDirection = "up" | "down";
6
+
7
+ declare const BREAKPOINTS: {
8
+ SMALL: number;
9
+ MEDIUM: number;
10
+ LARGE: number;
11
+ X_LARGE: number;
12
+ };
13
+
14
+ export declare function useBreakpoint(breakpoint: Breakpoint, direction?: BreakpointDirection): boolean;
15
+
16
+ /**
17
+ * Hook to manage the closing animation state of a component
18
+ * @interface UseIsClosingOptions
19
+ * @returns Object containing isClosing state and handleClose function
20
+ */
21
+ export declare function useIsClosing({ duration, onClose, overlayRef, }: UseIsClosingOptions): {
22
+ isClosing: boolean;
23
+ handleClose: () => void;
24
+ };
25
+
26
+ declare interface UseIsClosingOptions {
27
+ /**
28
+ * Duration of the closing animation in milliseconds
29
+ * @default 200
30
+ */
31
+ duration?: number;
32
+ /**
33
+ * Callback to run after the closing animation completes
34
+ */
35
+ onClose?: () => void;
36
+ /**
37
+ * When passed, the fade-out class will be added to @ScreenOverlay on close
38
+ */
39
+ overlayRef?: RefObject<HTMLElement>;
40
+ }
41
+
42
+ /**
43
+ * A React hook that prevents body scrolling while a component is mounted.
44
+ * Useful for modals, overlays, and other components that should prevent background scrolling.
45
+ */
46
+ export declare function useLockBodyScroll(isActive?: boolean): void;
47
+
48
+ export { }
49
+
50
+
51
+ declare namespace ButtonGroup {
52
+ var Option: (props: ButtonGroupOptionProps) => import("react/jsx-runtime").JSX.Element;
53
+ }
@@ -0,0 +1,7 @@
1
+ import { b as a, a as e, u as r } from "./useBreakpoint-B-Q9Hjyn.mjs";
2
+ export {
3
+ a as useBreakpoint,
4
+ e as useIsClosing,
5
+ r as useLockBodyScroll
6
+ };
7
+ //# sourceMappingURL=hooks.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hooks.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}