@kenlo/kdls-design-system 2.0.0
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/README.md +27 -0
- package/dist/components/Accordion/Accordion.d.ts +44 -0
- package/dist/components/Accordion/Accordion.test.d.ts +1 -0
- package/dist/components/Accordion/index.d.ts +1 -0
- package/dist/components/AccordionGroup/AccordionGroup.d.ts +13 -0
- package/dist/components/AccordionGroup/AccordionGroup.test.d.ts +1 -0
- package/dist/components/AccordionGroup/index.d.ts +1 -0
- package/dist/components/Alert/Alert.d.ts +37 -0
- package/dist/components/Alert/Alert.test.d.ts +1 -0
- package/dist/components/Alert/index.d.ts +2 -0
- package/dist/components/AttachmentList/AttachmentList.d.ts +63 -0
- package/dist/components/AttachmentList/AttachmentList.test.d.ts +1 -0
- package/dist/components/AttachmentList/index.d.ts +2 -0
- package/dist/components/Avatar/Avatar.d.ts +18 -0
- package/dist/components/Avatar/Avatar.test.d.ts +1 -0
- package/dist/components/Avatar/index.d.ts +2 -0
- package/dist/components/Badge/Badge.d.ts +32 -0
- package/dist/components/Badge/Badge.test.d.ts +1 -0
- package/dist/components/Badge/index.d.ts +2 -0
- package/dist/components/BottomSheet/BottomSheet.d.ts +59 -0
- package/dist/components/BottomSheet/BottomSheet.test.d.ts +1 -0
- package/dist/components/BottomSheet/index.d.ts +2 -0
- package/dist/components/BulkActionBar/BulkActionBar.d.ts +69 -0
- package/dist/components/BulkActionBar/BulkActionBar.test.d.ts +1 -0
- package/dist/components/BulkActionBar/index.d.ts +1 -0
- package/dist/components/Button/Button.d.ts +39 -0
- package/dist/components/Button/Button.test.d.ts +1 -0
- package/dist/components/Button/index.d.ts +2 -0
- package/dist/components/Card/Card.d.ts +126 -0
- package/dist/components/Card/Card.test.d.ts +1 -0
- package/dist/components/Card/index.d.ts +1 -0
- package/dist/components/Checkbox/Checkbox.d.ts +36 -0
- package/dist/components/Checkbox/Checkbox.test.d.ts +1 -0
- package/dist/components/Checkbox/index.d.ts +2 -0
- package/dist/components/ColorPicker/ColorPicker.d.ts +22 -0
- package/dist/components/ColorPicker/ColorPicker.test.d.ts +1 -0
- package/dist/components/ColorPicker/index.d.ts +1 -0
- package/dist/components/ColorScheme/ColorScheme.d.ts +15 -0
- package/dist/components/ColorScheme/index.d.ts +1 -0
- package/dist/components/DatePicker/DatePicker.d.ts +84 -0
- package/dist/components/DatePicker/DatePicker.test.d.ts +1 -0
- package/dist/components/DatePicker/dateUtils.d.ts +18 -0
- package/dist/components/DatePicker/index.d.ts +3 -0
- package/dist/components/Drawer/Drawer.d.ts +90 -0
- package/dist/components/Drawer/Drawer.test.d.ts +1 -0
- package/dist/components/Drawer/index.d.ts +2 -0
- package/dist/components/Field/Field.d.ts +44 -0
- package/dist/components/Field/Field.test.d.ts +1 -0
- package/dist/components/Field/index.d.ts +1 -0
- package/dist/components/Floating/Floating.d.ts +25 -0
- package/dist/components/Form/Form.d.ts +13 -0
- package/dist/components/Form/index.d.ts +3 -0
- package/dist/components/Grid/Grid.d.ts +35 -0
- package/dist/components/Grid/index.d.ts +2 -0
- package/dist/components/Header/Header.d.ts +48 -0
- package/dist/components/Header/Header.test.d.ts +1 -0
- package/dist/components/Header/index.d.ts +2 -0
- package/dist/components/Icon/Icon.d.ts +31 -0
- package/dist/components/Icon/Icon.test.d.ts +1 -0
- package/dist/components/Icon/custom/index.d.ts +10 -0
- package/dist/components/Icon/products/index.d.ts +27 -0
- package/dist/components/Icon/social/index.d.ts +24 -0
- package/dist/components/IconButton/IconButton.d.ts +24 -0
- package/dist/components/IconButton/IconButton.test.d.ts +1 -0
- package/dist/components/IconButton/index.d.ts +2 -0
- package/dist/components/Incrementer/Incrementer.d.ts +20 -0
- package/dist/components/Incrementer/index.d.ts +2 -0
- package/dist/components/Input/Input.d.ts +136 -0
- package/dist/components/Input/Input.test.d.ts +1 -0
- package/dist/components/Input/index.d.ts +2 -0
- package/dist/components/KenloLogo/KenloLogo.d.ts +13 -0
- package/dist/components/KenloLogo/KenloLogo.test.d.ts +1 -0
- package/dist/components/KenloLogo/index.d.ts +2 -0
- package/dist/components/LyaLogo/LyaLogo.d.ts +11 -0
- package/dist/components/LyaLogo/LyaLogo.test.d.ts +1 -0
- package/dist/components/LyaLogo/index.d.ts +2 -0
- package/dist/components/Menu/Menu.d.ts +171 -0
- package/dist/components/Menu/Menu.test.d.ts +1 -0
- package/dist/components/Menu/index.d.ts +1 -0
- package/dist/components/Modal/Modal.d.ts +81 -0
- package/dist/components/Modal/Modal.test.d.ts +1 -0
- package/dist/components/Modal/index.d.ts +2 -0
- package/dist/components/Nav/Nav.d.ts +42 -0
- package/dist/components/Nav/index.d.ts +1 -0
- package/dist/components/Notification/Notification.d.ts +24 -0
- package/dist/components/Notification/Notification.test.d.ts +1 -0
- package/dist/components/Notification/index.d.ts +2 -0
- package/dist/components/Pagination/Pagination.d.ts +24 -0
- package/dist/components/Pagination/Pagination.test.d.ts +1 -0
- package/dist/components/Pagination/index.d.ts +1 -0
- package/dist/components/Pill/Pill.d.ts +38 -0
- package/dist/components/Pill/Pill.test.d.ts +1 -0
- package/dist/components/Pill/index.d.ts +2 -0
- package/dist/components/Popover/Popover.d.ts +24 -0
- package/dist/components/Popover/Popover.test.d.ts +1 -0
- package/dist/components/Popover/index.d.ts +1 -0
- package/dist/components/Radio/Radio.d.ts +21 -0
- package/dist/components/Radio/index.d.ts +2 -0
- package/dist/components/RadioGroup/RadioGroup.d.ts +43 -0
- package/dist/components/RadioGroup/RadioGroup.test.d.ts +1 -0
- package/dist/components/RadioGroup/index.d.ts +2 -0
- package/dist/components/SearchBar/SearchBar.d.ts +31 -0
- package/dist/components/SearchBar/SearchBar.test.d.ts +1 -0
- package/dist/components/SearchBar/index.d.ts +1 -0
- package/dist/components/Select/Select.d.ts +117 -0
- package/dist/components/Select/Select.test.d.ts +1 -0
- package/dist/components/Select/index.d.ts +1 -0
- package/dist/components/Separator/Separator.d.ts +11 -0
- package/dist/components/Separator/Separator.test.d.ts +1 -0
- package/dist/components/Separator/index.d.ts +2 -0
- package/dist/components/Skeleton/Skeleton.d.ts +62 -0
- package/dist/components/Skeleton/Skeleton.test.d.ts +1 -0
- package/dist/components/Skeleton/index.d.ts +1 -0
- package/dist/components/Spinner/Spinner.d.ts +20 -0
- package/dist/components/Spinner/Spinner.test.d.ts +1 -0
- package/dist/components/Spinner/index.d.ts +1 -0
- package/dist/components/StatCard/StatCard.d.ts +23 -0
- package/dist/components/StatCard/StatCard.test.d.ts +1 -0
- package/dist/components/StatCard/index.d.ts +1 -0
- package/dist/components/Switch/Switch.d.ts +27 -0
- package/dist/components/Switch/Switch.test.d.ts +1 -0
- package/dist/components/Switch/index.d.ts +2 -0
- package/dist/components/Table/Table.d.ts +88 -0
- package/dist/components/Table/Table.test.d.ts +1 -0
- package/dist/components/Table/index.d.ts +1 -0
- package/dist/components/Text/Text.d.ts +24 -0
- package/dist/components/Text/Text.test.d.ts +1 -0
- package/dist/components/Text/index.d.ts +1 -0
- package/dist/components/TextEditor/TextEditor.d.ts +11 -0
- package/dist/components/TextEditor/index.d.ts +1 -0
- package/dist/components/Toast/Toast.d.ts +30 -0
- package/dist/components/Toast/Toast.imperative.test.d.ts +1 -0
- package/dist/components/Toast/Toast.test.d.ts +1 -0
- package/dist/components/Toast/Toaster.d.ts +4 -0
- package/dist/components/Toast/index.d.ts +5 -0
- package/dist/components/Toast/toast-api.d.ts +19 -0
- package/dist/components/Toast/toast-store.d.ts +47 -0
- package/dist/components/Toggle/Toggle.d.ts +33 -0
- package/dist/components/Toggle/Toggle.test.d.ts +1 -0
- package/dist/components/Toggle/index.d.ts +2 -0
- package/dist/components/Tooltip/Tooltip.d.ts +15 -0
- package/dist/components/Tooltip/Tooltip.test.d.ts +1 -0
- package/dist/components/Tooltip/index.d.ts +2 -0
- package/dist/components/Uploader/Uploader.d.ts +34 -0
- package/dist/components/Uploader/Uploader.test.d.ts +1 -0
- package/dist/components/Uploader/index.d.ts +1 -0
- package/dist/components/getVisibleBounds.d.ts +6 -0
- package/dist/components/index.d.ts +51 -0
- package/dist/components/useFloatingPosition.d.ts +54 -0
- package/dist/components/useFloatingPosition.test.d.ts +1 -0
- package/dist/components/useIsMobile.d.ts +1 -0
- package/dist/foundations/Scrollbar/index.d.ts +5 -0
- package/dist/index.cjs +3 -0
- package/dist/index.css +1 -0
- package/dist/index.js +6509 -0
- package/foundations/Scrollbar/Scrollbar.css +26 -0
- package/foundations/styles.css +269 -0
- package/foundations/tailwind-preset.cjs +39 -0
- package/foundations/tokens.css +1338 -0
- package/package.json +73 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { ToastFeedback } from './Toast';
|
|
2
|
+
import type { TooltipPosition } from '../Tooltip';
|
|
3
|
+
/** Must match the exit animation in Toast.css (.kdls-toast--leaving) */
|
|
4
|
+
export declare const TOAST_EXIT_MS = 220;
|
|
5
|
+
export interface ToastOptions {
|
|
6
|
+
/** Visual state — defines icon and color */
|
|
7
|
+
feedback?: ToastFeedback;
|
|
8
|
+
/** Action button label shown to the right of the message */
|
|
9
|
+
actionLabel?: string;
|
|
10
|
+
/** Callback for the action button click */
|
|
11
|
+
onAction?: () => void;
|
|
12
|
+
/** Disables the action button */
|
|
13
|
+
actionDisabled?: boolean;
|
|
14
|
+
/** Tooltip text shown when the action button is disabled */
|
|
15
|
+
actionDisabledTooltip?: string;
|
|
16
|
+
/** Position of the disabled action button's tooltip — default 'top' */
|
|
17
|
+
actionDisabledTooltipPosition?: TooltipPosition;
|
|
18
|
+
/** Shows the close (✕) button — on by default */
|
|
19
|
+
showDismiss?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export interface ToastItem {
|
|
22
|
+
id: number;
|
|
23
|
+
message: string;
|
|
24
|
+
feedback: ToastFeedback;
|
|
25
|
+
actionLabel?: string;
|
|
26
|
+
onAction?: () => void;
|
|
27
|
+
actionDisabled?: boolean;
|
|
28
|
+
actionDisabledTooltip?: string;
|
|
29
|
+
actionDisabledTooltipPosition?: TooltipPosition;
|
|
30
|
+
showDismiss: boolean;
|
|
31
|
+
/** true while the exit animates, before leaving the list */
|
|
32
|
+
leaving: boolean;
|
|
33
|
+
}
|
|
34
|
+
type Listener = (toasts: ToastItem[]) => void;
|
|
35
|
+
/** Subscribes to list changes. Calls immediately with the current state. Returns the unsubscribe function. */
|
|
36
|
+
export declare function subscribe(listener: Listener): () => void;
|
|
37
|
+
/** Adds a toast and schedules the auto-dismiss (4s; 8s if error). Returns the id. */
|
|
38
|
+
export declare function addToast(message: string, opts?: ToastOptions): number;
|
|
39
|
+
/** Closes a toast manually (triggers the exit animation). */
|
|
40
|
+
export declare function dismissToast(id: number): void;
|
|
41
|
+
/** Pauses the timers for all toasts (used on container hover). */
|
|
42
|
+
export declare function pauseAll(): void;
|
|
43
|
+
/** Resumes paused timers with their remaining time. */
|
|
44
|
+
export declare function resumeAll(): void;
|
|
45
|
+
/** Test-only — clears the list and timers. */
|
|
46
|
+
export declare function _resetToasts(): void;
|
|
47
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IconElement } from '../Icon/Icon';
|
|
3
|
+
import './Toggle.css';
|
|
4
|
+
export interface ToggleItem {
|
|
5
|
+
/** Item's unique identifier — used as `value` in onChange */
|
|
6
|
+
value: string;
|
|
7
|
+
/** Item text (optional when there's only an icon) */
|
|
8
|
+
label?: string;
|
|
9
|
+
/** Icon to the left of the label (24px) */
|
|
10
|
+
iconLeft?: IconElement;
|
|
11
|
+
/** Icon to the right of the label (24px) */
|
|
12
|
+
iconRight?: IconElement;
|
|
13
|
+
/** Disables only this item */
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export interface ToggleProps {
|
|
17
|
+
/** List of options — minimum 2 items */
|
|
18
|
+
items: [ToggleItem, ToggleItem, ...ToggleItem[]];
|
|
19
|
+
/** Width: 'hug' = fits content | 'fill' = 100% of the container */
|
|
20
|
+
width?: 'hug' | 'fill';
|
|
21
|
+
/** Active item's value (controlled) — must match an `item.value`. Use with onChange */
|
|
22
|
+
value?: string;
|
|
23
|
+
/** Initial value (uncontrolled) — ignored when value is passed */
|
|
24
|
+
defaultValue?: string;
|
|
25
|
+
/** Callback fired when selecting an item — receives the item's `value` */
|
|
26
|
+
onChange?: (value: string) => void;
|
|
27
|
+
/** Disables all items */
|
|
28
|
+
disabled?: boolean;
|
|
29
|
+
/** Additional CSS classes */
|
|
30
|
+
className?: string;
|
|
31
|
+
}
|
|
32
|
+
export declare const Toggle: React.FC<ToggleProps>;
|
|
33
|
+
export default Toggle;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './Tooltip.css';
|
|
3
|
+
export type TooltipPosition = 'top' | 'topLeft' | 'topRight' | 'right' | 'rightTop' | 'rightBottom' | 'bottom' | 'bottomLeft' | 'bottomRight' | 'left' | 'leftTop' | 'leftBottom';
|
|
4
|
+
export interface TooltipProps {
|
|
5
|
+
/** Text shown inside the tooltip on hovering or focusing the trigger. */
|
|
6
|
+
content: string;
|
|
7
|
+
/** Trigger element — receives hover/focus to show the tooltip (button, text, etc.). When omitted, renders the DS's default info icon (fixed — the icon and color can't be changed). */
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
/** Tooltip position relative to the trigger. Automatically flips to the opposite side when there's no space in the requested direction. */
|
|
10
|
+
placement?: TooltipPosition;
|
|
11
|
+
/** Additional CSS class applied to the trigger's wrapper. */
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const Tooltip: React.FC<TooltipProps>;
|
|
15
|
+
export default Tooltip;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './Uploader.css';
|
|
3
|
+
export type UploaderMode = 'image' | 'document';
|
|
4
|
+
/**
|
|
5
|
+
* Crop constraint for the image editor.
|
|
6
|
+
* - `string` — aspect ratio, e.g. `"16:9"`, `"4:3"`, `"1:1"`
|
|
7
|
+
* - `{ width, height }` — fixed pixel dimensions, e.g. `{ width: 400, height: 300 }`
|
|
8
|
+
*
|
|
9
|
+
* When provided a draggable/resizable crop overlay is shown in the edit modal.
|
|
10
|
+
* Corner handles maintain the ratio when `crop` is a string;
|
|
11
|
+
* free resize when `crop` is a pixel object with no forced ratio.
|
|
12
|
+
*/
|
|
13
|
+
export type CropRatio = string;
|
|
14
|
+
export type CropSizePx = {
|
|
15
|
+
width: number;
|
|
16
|
+
height: number;
|
|
17
|
+
};
|
|
18
|
+
export type CropConstraint = CropRatio | CropSizePx;
|
|
19
|
+
export interface UploaderProps {
|
|
20
|
+
mode?: UploaderMode;
|
|
21
|
+
/** Data URL or src URL of the uploaded file (controlled) */
|
|
22
|
+
value?: string | null;
|
|
23
|
+
/** Fired with the new data URL when a file is selected, or null when removed */
|
|
24
|
+
onChange?: (dataUrl: string | null) => void;
|
|
25
|
+
/**
|
|
26
|
+
* Crop constraint. Pass a ratio string (`"16:9"`) or pixel dimensions
|
|
27
|
+
* (`{ width: 400, height: 300 }`) to display a crop overlay in the editor.
|
|
28
|
+
* Omit for free-form editing without a crop frame.
|
|
29
|
+
*/
|
|
30
|
+
crop?: CropConstraint;
|
|
31
|
+
className?: string;
|
|
32
|
+
}
|
|
33
|
+
export declare const Uploader: React.FC<UploaderProps>;
|
|
34
|
+
export default Uploader;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Uploader';
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import '../foundations/tokens.css';
|
|
2
|
+
export * from './ColorScheme';
|
|
3
|
+
export * from './Form';
|
|
4
|
+
export * from './Accordion';
|
|
5
|
+
export * from './AccordionGroup';
|
|
6
|
+
export * from './Grid';
|
|
7
|
+
export * from './AttachmentList';
|
|
8
|
+
export * from './Avatar';
|
|
9
|
+
export * from './Badge';
|
|
10
|
+
export * from './Icon/Icon';
|
|
11
|
+
export * from './Icon/products';
|
|
12
|
+
export * from './Icon/social';
|
|
13
|
+
export * from './Icon/custom';
|
|
14
|
+
export * from './Alert';
|
|
15
|
+
export * from './BottomSheet';
|
|
16
|
+
export * from './Button';
|
|
17
|
+
export * from './Checkbox';
|
|
18
|
+
export * from './ColorPicker';
|
|
19
|
+
export * from './DatePicker';
|
|
20
|
+
export * from './Separator';
|
|
21
|
+
export * from './Select';
|
|
22
|
+
export * from './Drawer';
|
|
23
|
+
export * from './Header';
|
|
24
|
+
export * from './Uploader';
|
|
25
|
+
export * from './IconButton';
|
|
26
|
+
export * from './Incrementer';
|
|
27
|
+
export * from './Input';
|
|
28
|
+
export * from './SearchBar';
|
|
29
|
+
export * from './Skeleton';
|
|
30
|
+
export * from './Spinner';
|
|
31
|
+
export * from './KenloLogo';
|
|
32
|
+
export * from './LyaLogo';
|
|
33
|
+
export * from './Menu';
|
|
34
|
+
export * from './Nav';
|
|
35
|
+
export * from './Modal';
|
|
36
|
+
export * from './Notification';
|
|
37
|
+
export * from './Pill';
|
|
38
|
+
export * from './Popover';
|
|
39
|
+
export * from './RadioGroup';
|
|
40
|
+
export * from '../foundations/Scrollbar';
|
|
41
|
+
export * from './Switch';
|
|
42
|
+
export * from './Text';
|
|
43
|
+
export * from './TextEditor';
|
|
44
|
+
export * from './Toast';
|
|
45
|
+
export * from './Toggle';
|
|
46
|
+
export * from './Tooltip';
|
|
47
|
+
export * from './BulkActionBar';
|
|
48
|
+
export * from './Card';
|
|
49
|
+
export * from './Table';
|
|
50
|
+
export * from './Pagination';
|
|
51
|
+
export * from './StatCard';
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export type FloatingSide = 'top' | 'bottom' | 'left' | 'right';
|
|
2
|
+
export type FloatingAlign = 'start' | 'center' | 'end';
|
|
3
|
+
export interface FloatingBounds {
|
|
4
|
+
top: number;
|
|
5
|
+
bottom: number;
|
|
6
|
+
left: number;
|
|
7
|
+
right: number;
|
|
8
|
+
}
|
|
9
|
+
export interface FloatingSize {
|
|
10
|
+
width: number;
|
|
11
|
+
height: number;
|
|
12
|
+
}
|
|
13
|
+
export interface FloatingPositionResult {
|
|
14
|
+
style: React.CSSProperties;
|
|
15
|
+
effectiveSide: FloatingSide;
|
|
16
|
+
}
|
|
17
|
+
export declare function parseFloatingPlacement(placement: string): {
|
|
18
|
+
side: FloatingSide;
|
|
19
|
+
align: FloatingAlign;
|
|
20
|
+
};
|
|
21
|
+
export declare function joinFloatingPlacement(side: FloatingSide, align: FloatingAlign): string;
|
|
22
|
+
export declare function camelToKebab(s: string): string;
|
|
23
|
+
/**
|
|
24
|
+
* Style for an already-decided side/align — uses `transform` (percentages relative to the
|
|
25
|
+
* panel itself) to center/align, so it doesn't need the panel size.
|
|
26
|
+
*/
|
|
27
|
+
export declare function floatingStyleFor(anchor: DOMRect, side: FloatingSide, align: FloatingAlign, gap: number): React.CSSProperties;
|
|
28
|
+
/**
|
|
29
|
+
* Pure floating-position function — decides the effective side (flips when it doesn't fit)
|
|
30
|
+
* and the final style (position: fixed already included by the caller). No DOM reads.
|
|
31
|
+
*/
|
|
32
|
+
export declare function computeFloatingPosition(anchor: DOMRect, panelSize: FloatingSize, side: FloatingSide, align: FloatingAlign, gap: number, bounds: FloatingBounds): FloatingPositionResult;
|
|
33
|
+
export interface UseFloatingPositionOptions {
|
|
34
|
+
triggerRef: React.RefObject<HTMLElement | null>;
|
|
35
|
+
panelRef: React.RefObject<HTMLElement | null>;
|
|
36
|
+
side: FloatingSide;
|
|
37
|
+
align: FloatingAlign;
|
|
38
|
+
gap: number;
|
|
39
|
+
open: boolean;
|
|
40
|
+
/** Observes resize of the panel itself (dynamic content) — default false. */
|
|
41
|
+
observePanel?: boolean;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Floating-position hook anchored to the trigger — measures the trigger, projects the panel
|
|
45
|
+
* size (0 before the first measurement), decides the flip, and repositions on scroll/resize
|
|
46
|
+
* while `open`. Used by components that decide the position BEFORE revealing the panel
|
|
47
|
+
* (Floating, Menu). Tooltip measures its own already-rendered panel — it doesn't use this hook,
|
|
48
|
+
* it uses `computeFloatingPosition` directly.
|
|
49
|
+
*/
|
|
50
|
+
export declare function useFloatingPosition({ triggerRef, panelRef, side, align, gap, open, observePanel, }: UseFloatingPositionOptions): {
|
|
51
|
+
style: React.CSSProperties;
|
|
52
|
+
effectiveSide: FloatingSide;
|
|
53
|
+
positioned: boolean;
|
|
54
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useIsMobile(): boolean;
|