@mt-gloss/ui 0.1.96 → 0.1.97
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/index.d.ts +6 -0
- package/index.js +1294 -1150
- package/lib/composites/dashboard/BellCutout/BellCutout.d.ts +11 -0
- package/lib/composites/dashboard/BellCutout/index.d.ts +2 -0
- package/lib/composites/dashboard/BellPopover/BellPopover.d.ts +12 -0
- package/lib/composites/dashboard/BellPopover/index.d.ts +2 -0
- package/lib/composites/dashboard/index.d.ts +2 -0
- package/lib/composites/index.d.ts +1 -0
- package/lib/composites/portal/BodyPortal.d.ts +18 -0
- package/lib/composites/portal/index.d.ts +4 -0
- package/lib/composites/portal/usePortalAnchor.d.ts +17 -0
- package/package.json +1 -1
- package/ui.css +1 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
export type BellCutoutMode = 'default' | 'lock' | 'unread-count';
|
|
3
|
+
export interface BellCutoutProps {
|
|
4
|
+
/** null → no chrome rendered. 'default' / 'lock' / 'unread-count' → chrome with corresponding data-mode. */
|
|
5
|
+
mode: BellCutoutMode | null;
|
|
6
|
+
/** When mode='unread-count', this drives the ::before count prefix via data-count. */
|
|
7
|
+
count?: number;
|
|
8
|
+
/** Anchor element to derive cutout circle center from. */
|
|
9
|
+
anchorRef: RefObject<HTMLElement | null>;
|
|
10
|
+
}
|
|
11
|
+
export declare function BellCutout(props: BellCutoutProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ReactNode, RefObject } from 'react';
|
|
2
|
+
export interface BellPopoverProps {
|
|
3
|
+
anchorRef: RefObject<HTMLElement | null>;
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
onRequestClose: () => void;
|
|
6
|
+
/** Called when the cursor lands on the popover — used by host to cancel pending close. */
|
|
7
|
+
onPopoverEnter?: () => void;
|
|
8
|
+
/** Called when the cursor leaves the popover — used by host to reschedule close. */
|
|
9
|
+
onPopoverLeave?: () => void;
|
|
10
|
+
children?: ReactNode;
|
|
11
|
+
}
|
|
12
|
+
export declare function BellPopover(props: BellPopoverProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ReactNode, RefObject } from 'react';
|
|
2
|
+
import { PortalPlacement } from './usePortalAnchor';
|
|
3
|
+
export interface BodyPortalProps {
|
|
4
|
+
anchorRef: RefObject<HTMLElement | null>;
|
|
5
|
+
placement: PortalPlacement;
|
|
6
|
+
gap?: number;
|
|
7
|
+
offset?: {
|
|
8
|
+
x?: number;
|
|
9
|
+
y?: number;
|
|
10
|
+
};
|
|
11
|
+
/** data-portal-host attribute value (UAT routing / DOM grep handle). */
|
|
12
|
+
dataHost: string;
|
|
13
|
+
/** Default true; pass false to detach without unmounting the host component. */
|
|
14
|
+
isOpen?: boolean;
|
|
15
|
+
className?: string;
|
|
16
|
+
children?: ReactNode;
|
|
17
|
+
}
|
|
18
|
+
export declare function BodyPortal(props: BodyPortalProps): import('react').ReactPortal | null;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { CSSProperties, RefObject } from 'react';
|
|
2
|
+
export type PortalPlacement = 'above-right' | 'above-left' | 'below-right' | 'below-left';
|
|
3
|
+
export interface UsePortalAnchorArgs {
|
|
4
|
+
anchorRef: RefObject<HTMLElement | null>;
|
|
5
|
+
placement: PortalPlacement;
|
|
6
|
+
gap?: number;
|
|
7
|
+
offset?: {
|
|
8
|
+
x?: number;
|
|
9
|
+
y?: number;
|
|
10
|
+
};
|
|
11
|
+
isOpen?: boolean;
|
|
12
|
+
}
|
|
13
|
+
interface AnchorStyle {
|
|
14
|
+
style: CSSProperties;
|
|
15
|
+
}
|
|
16
|
+
export declare function usePortalAnchor(args: UsePortalAnchorArgs): AnchorStyle;
|
|
17
|
+
export {};
|