@mond-design-system/react 5.0.0 → 5.1.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/dist/index.d.cts CHANGED
@@ -1,5 +1,6 @@
1
1
  import * as react from 'react';
2
- import { CSSProperties, HTMLAttributes, JSX, ReactElement, Ref, ReactNode, ButtonHTMLAttributes, ElementType, ComponentPropsWithRef, MouseEventHandler, InputHTMLAttributes, HTMLInputTypeAttribute, TextareaHTMLAttributes, SelectHTMLAttributes, RefObject, KeyboardEvent } from 'react';
2
+ import { CSSProperties, HTMLAttributes, JSX, ReactElement, Ref, ReactNode, ButtonHTMLAttributes, ElementType, ComponentPropsWithRef, MouseEventHandler, InputHTMLAttributes, HTMLInputTypeAttribute, TextareaHTMLAttributes, SelectHTMLAttributes, RefObject, MouseEvent, KeyboardEvent, PointerEvent, FocusEvent } from 'react';
3
+ import { Placement } from '@floating-ui/dom';
3
4
 
4
5
  /**
5
6
  * Join class names, dropping anything falsy.
@@ -1355,6 +1356,141 @@ declare function SheetFooter({ children }: {
1355
1356
  children: ReactNode;
1356
1357
  }): react.JSX.Element;
1357
1358
 
1359
+ type PopoverPlacement = Placement;
1360
+ interface PopoverProps {
1361
+ open: boolean;
1362
+ onClose: () => void;
1363
+ /** The trigger the panel hangs off. It stays interactive while open. */
1364
+ anchorRef: RefObject<HTMLElement | null>;
1365
+ /** Accessible name of the panel. */
1366
+ label: string;
1367
+ /** Side it prefers. It flips and slides to stay on screen. Default "bottom-start". */
1368
+ placement?: PopoverPlacement;
1369
+ className?: string;
1370
+ children: ReactNode;
1371
+ }
1372
+ /**
1373
+ * Anchored, non-modal surface. The page behind it stays live and scrollable
1374
+ * and the panel travels with the anchor; a press outside, Escape, or the
1375
+ * trigger itself dismisses it.
1376
+ *
1377
+ * Modal by contrast: reach for Modal when the answer must come before anything
1378
+ * else, and for Sheet when the content is a task rather than a detail — a
1379
+ * form with its own header and footer belongs in one of those, not here.
1380
+ *
1381
+ * ```tsx
1382
+ * const anchor = useRef<HTMLButtonElement>(null);
1383
+ * const [open, setOpen] = useState(false);
1384
+ * <Button ref={anchor} aria-expanded={open} onClick={() => setOpen((v) => !v)}>
1385
+ * Equipment
1386
+ * </Button>
1387
+ * <Popover open={open} onClose={() => setOpen(false)} anchorRef={anchor} label="Equipment">
1388
+ * <PopoverBody>…</PopoverBody>
1389
+ * </Popover>
1390
+ * ```
1391
+ */
1392
+ declare function Popover({ open, onClose, anchorRef, label, placement, className, children, }: PopoverProps): react.ReactPortal | null;
1393
+ type PopoverHeaderProps = {
1394
+ children: ReactNode;
1395
+ } & ({
1396
+ /** Renders a close button after the title. Wire it to the popover's own onClose. */
1397
+ onClose: () => void;
1398
+ /** Accessible name of the close button (localise). */
1399
+ closeLabel: string;
1400
+ } | {
1401
+ onClose?: undefined;
1402
+ closeLabel?: undefined;
1403
+ });
1404
+ declare function PopoverHeader({ children, onClose, closeLabel }: PopoverHeaderProps): react.JSX.Element;
1405
+ declare function PopoverBody({ children }: {
1406
+ children: ReactNode;
1407
+ }): react.JSX.Element;
1408
+ declare function PopoverFooter({ children }: {
1409
+ children: ReactNode;
1410
+ }): react.JSX.Element;
1411
+
1412
+ type MenuPlacement = Placement;
1413
+ /** What Menu needs to be able to put on its trigger. */
1414
+ type MenuTriggerProps = {
1415
+ ref?: Ref<HTMLElement> | undefined;
1416
+ "aria-haspopup"?: "menu" | undefined;
1417
+ "aria-expanded"?: boolean | undefined;
1418
+ onClick?: ((event: MouseEvent<HTMLElement>) => void) | undefined;
1419
+ onKeyDown?: ((event: KeyboardEvent<HTMLElement>) => void) | undefined;
1420
+ };
1421
+ interface MenuProps {
1422
+ /** Accessible name of the menu — what the list of actions is *for*. */
1423
+ label: string;
1424
+ /** The control that opens it. Gets the ref, the ARIA and the key handling. */
1425
+ trigger: ReactElement<MenuTriggerProps>;
1426
+ /** Side it prefers. It flips and slides to stay on screen. Default "bottom-end". */
1427
+ placement?: MenuPlacement;
1428
+ className?: string;
1429
+ children: ReactNode;
1430
+ }
1431
+ /**
1432
+ * A button that opens a short list of actions (APG's menu button).
1433
+ *
1434
+ * Open state is the menu's own: a list of actions has no meaning outside the
1435
+ * button that opened it, so unlike Modal, Sheet and Popover there is nothing
1436
+ * for a caller to hold. Reach for Popover instead the moment the panel holds
1437
+ * anything but actions — a form, a filter, a list of things to read.
1438
+ *
1439
+ * ```tsx
1440
+ * <Menu label="Heat actions" trigger={<Button variant="ghost">Actions</Button>}>
1441
+ * <MenuItem onSelect={edit}>Edit</MenuItem>
1442
+ * <MenuItem onSelect={remove} tone="danger">Delete</MenuItem>
1443
+ * </Menu>
1444
+ * ```
1445
+ */
1446
+ declare function Menu({ label, trigger, placement, className, children }: MenuProps): react.JSX.Element;
1447
+ interface MenuItemProps {
1448
+ /** What the action does. The menu closes itself around it. */
1449
+ onSelect: () => void;
1450
+ disabled?: boolean;
1451
+ /** "danger" for an action that destroys something. Default "default". */
1452
+ tone?: "default" | "danger";
1453
+ children: ReactNode;
1454
+ }
1455
+ declare function MenuItem({ onSelect, disabled, tone, children }: MenuItemProps): react.JSX.Element;
1456
+
1457
+ type TooltipPlacement = Placement;
1458
+ /** What Tooltip needs to be able to put on its trigger. */
1459
+ type TriggerProps = {
1460
+ ref?: Ref<HTMLElement> | undefined;
1461
+ "aria-describedby"?: string | undefined;
1462
+ onPointerEnter?: ((event: PointerEvent<HTMLElement>) => void) | undefined;
1463
+ onPointerLeave?: ((event: PointerEvent<HTMLElement>) => void) | undefined;
1464
+ onFocus?: ((event: FocusEvent<HTMLElement>) => void) | undefined;
1465
+ onBlur?: ((event: FocusEvent<HTMLElement>) => void) | undefined;
1466
+ };
1467
+ interface TooltipProps {
1468
+ /** The label. Plain text — nothing here is reachable by pointer or key. */
1469
+ content: ReactNode;
1470
+ /** Side it prefers. It flips and slides to stay on screen. Default "top". */
1471
+ placement?: TooltipPlacement;
1472
+ /** Pointer dwell in ms. Keyboard focus ignores it. Default 400. */
1473
+ delayMs?: number;
1474
+ /** The control being labelled. Gets the ref and the handlers. */
1475
+ children: ReactElement<TriggerProps>;
1476
+ }
1477
+ /**
1478
+ * A name for a control that shows only its glyph, on hover and on focus.
1479
+ *
1480
+ * It describes; it does not hold anything. There is nothing to click inside
1481
+ * it and focus never moves into it, so anything the reader has to act on —
1482
+ * a link, a button, a form — belongs in a Popover instead. A control whose
1483
+ * label is *only* here still needs an aria-label of its own: this is the
1484
+ * accessible description, not the accessible name.
1485
+ *
1486
+ * ```tsx
1487
+ * <Tooltip content="Remove from heat">
1488
+ * <Button variant="ghost" aria-label="Remove from heat"><Icon name="x" /></Button>
1489
+ * </Tooltip>
1490
+ * ```
1491
+ */
1492
+ declare function Tooltip({ content, placement, delayMs, children, }: TooltipProps): react.JSX.Element;
1493
+
1358
1494
  type ConfirmDialogTone = "default" | "danger" | "warning";
1359
1495
  interface ConfirmDialogProps<T = void> {
1360
1496
  /** The row in question, or null when nothing is being asked. Held by the
@@ -1902,14 +2038,23 @@ declare function Breadcrumb({ items, label, linkAs, className, ...rest }: Breadc
1902
2038
  interface UseOverlayOptions {
1903
2039
  open: boolean;
1904
2040
  onClose: () => void;
2041
+ /**
2042
+ * Freeze the page behind the surface. Default true.
2043
+ *
2044
+ * False for anchored surfaces: a popover is pinned to a trigger that scrolls
2045
+ * with the page, so locking the page would strand it over content the reader
2046
+ * can no longer reach, and locking it *and* letting the popover follow the
2047
+ * anchor are the same gesture answered two ways.
2048
+ */
2049
+ lockScroll?: boolean;
1905
2050
  }
1906
2051
  /**
1907
2052
  * Shared modal-surface behaviour: focus capture and restore, Escape to
1908
2053
  * close, Tab cycling inside the panel, body scroll lock. Attach the
1909
2054
  * returned ref to the dialog element (it needs tabIndex={-1}).
1910
2055
  *
1911
- * Anchor-positioned overlays (Tooltip/Popover) will extend this hook with
1912
- * a floating-ui middleware pass; the options object leaves room for that.
2056
+ * Popover uses it too, with `lockScroll: false`; where it sits on the screen
2057
+ * is a separate question, answered by useAnchoredPosition.
1913
2058
  */
1914
2059
  declare function useOverlay<T extends HTMLElement>(options: UseOverlayOptions): RefObject<T | null>;
1915
2060
 
@@ -1979,4 +2124,4 @@ interface RovingGroupOptions {
1979
2124
  */
1980
2125
  declare function useRovingGroup(ref: RefObject<HTMLElement | null>, { selector, orientation }: RovingGroupOptions): (event: KeyboardEvent<HTMLElement>) => void;
1981
2126
 
1982
- export { AppBar, type AppBarProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, type AvatarSize, Badge, type BadgeProps, type BadgeTone, Breadcrumb, type BreadcrumbProps, Button, type ButtonProps, type ButtonShape, type ButtonSize, type ButtonVariant, type CSSVars, Card, CardBody, type CardBodyProps, CardFooter, CardHeader, type CardProps, type CardSectionProps, type CardVariant, type CarouselPager, type CarouselSlide, Checkbox, type CheckboxProps, Chip, ChipBar, type ChipBarGap, type ChipBarProps, ChipGroup, type ChipGroupGap, type ChipGroupProps, type ChipProps, type ChipVariant, ConfirmDialog, type ConfirmDialogProps, type ConfirmDialogTone, Container, type ContainerProps, type ContainerWidth, CountButton, type CountButtonProps, type CountButtonTone, type Crumb, type DataColumn, DataTable, type DataTableProps, type DataTableSelectionLabels, DateTimePicker, type DateTimePickerLabels, type DateTimePickerProps, Divider, type DividerProps, EmptyState, type EmptyStateProps, Field, type FieldContextValue, type FieldProps, FileDrop, type FileDropProps, Heading, type HeadingLevel, type HeadingProps, type HeadingTone, Icon, type IconProps, IconProvider, type IconProviderProps, type IconRender, type IconRenderProps, type IconSize, ImageCarousel, type ImageCarouselLabels, type ImageCarouselProps, Inline, type InlineAlign, type InlineGap, type InlineJustify, type InlineProps, Input, type InputProps, type InputSize, Lightbox, type LightboxLabels, type LightboxProps, Link, type LinkProps, type LinkVariant, ListGroup, type ListGroupProps, ListItem, type ListItemProps, MediaPlaceholder, type MediaPlaceholderProps, Modal, ModalBody, ModalFooter, ModalHeader, type ModalProps, type OverlayHistory, OverlayHistoryContext, PasswordInput, type PasswordInputProps, type Presence, ProgressBar, type ProgressBarProps, Radio, type RadioProps, type RovingGroupOptions, Screen, ScreenContent, type ScreenContentProps, Scroller, type ScrollerLabels, type ScrollerProps, type SegmentOption, SegmentedControl, type SegmentedControlProps, type SegmentedControlSize, Select, type SelectProps, type SelectSize, Sheet, SheetBody, SheetFooter, SheetHeader, type SheetProps, SideNav, SideNavGroup, type SideNavGroupProps, SideNavItem, type SideNavItemProps, type SideNavProps, Skeleton, type SkeletonProps, type SkeletonVariant, Spinner, type SpinnerProps, Stack, type StackAlign, type StackGap, type StackProps, Switch, type SwitchProps, Tab, TabBar, TabBarAction, type TabBarActionProps, TabBarItem, type TabBarItemProps, type TabBarProps, TabList, type TabListProps, TabPanel, type TabPanelProps, type TabProps, Tabs, type TabsProps, Tag, type TagProps, type TagTone, Text, type TextProps, type TextTone, type TextVariant, Textarea, type TextareaProps, type ToastAction, type ToastOptions, ToastProvider, type ToastProviderProps, type ToastTone, UploadProgress, type UploadProgressLabels, type UploadProgressProps, type UploadStatus, type UseOverlayOptions, type VideoCaptions, type VideoChapter, VideoPlayer, type VideoPlayerLabels, type VideoPlayerProps, VisuallyHidden, type VisuallyHiddenProps, cx, useFieldContext, useOverlay, usePresence, useRovingGroup, useToast };
2127
+ export { AppBar, type AppBarProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, type AvatarSize, Badge, type BadgeProps, type BadgeTone, Breadcrumb, type BreadcrumbProps, Button, type ButtonProps, type ButtonShape, type ButtonSize, type ButtonVariant, type CSSVars, Card, CardBody, type CardBodyProps, CardFooter, CardHeader, type CardProps, type CardSectionProps, type CardVariant, type CarouselPager, type CarouselSlide, Checkbox, type CheckboxProps, Chip, ChipBar, type ChipBarGap, type ChipBarProps, ChipGroup, type ChipGroupGap, type ChipGroupProps, type ChipProps, type ChipVariant, ConfirmDialog, type ConfirmDialogProps, type ConfirmDialogTone, Container, type ContainerProps, type ContainerWidth, CountButton, type CountButtonProps, type CountButtonTone, type Crumb, type DataColumn, DataTable, type DataTableProps, type DataTableSelectionLabels, DateTimePicker, type DateTimePickerLabels, type DateTimePickerProps, Divider, type DividerProps, EmptyState, type EmptyStateProps, Field, type FieldContextValue, type FieldProps, FileDrop, type FileDropProps, Heading, type HeadingLevel, type HeadingProps, type HeadingTone, Icon, type IconProps, IconProvider, type IconProviderProps, type IconRender, type IconRenderProps, type IconSize, ImageCarousel, type ImageCarouselLabels, type ImageCarouselProps, Inline, type InlineAlign, type InlineGap, type InlineJustify, type InlineProps, Input, type InputProps, type InputSize, Lightbox, type LightboxLabels, type LightboxProps, Link, type LinkProps, type LinkVariant, ListGroup, type ListGroupProps, ListItem, type ListItemProps, MediaPlaceholder, type MediaPlaceholderProps, Menu, MenuItem, type MenuItemProps, type MenuPlacement, type MenuProps, Modal, ModalBody, ModalFooter, ModalHeader, type ModalProps, type OverlayHistory, OverlayHistoryContext, PasswordInput, type PasswordInputProps, Popover, PopoverBody, PopoverFooter, PopoverHeader, type PopoverHeaderProps, type PopoverPlacement, type PopoverProps, type Presence, ProgressBar, type ProgressBarProps, Radio, type RadioProps, type RovingGroupOptions, Screen, ScreenContent, type ScreenContentProps, Scroller, type ScrollerLabels, type ScrollerProps, type SegmentOption, SegmentedControl, type SegmentedControlProps, type SegmentedControlSize, Select, type SelectProps, type SelectSize, Sheet, SheetBody, SheetFooter, SheetHeader, type SheetProps, SideNav, SideNavGroup, type SideNavGroupProps, SideNavItem, type SideNavItemProps, type SideNavProps, Skeleton, type SkeletonProps, type SkeletonVariant, Spinner, type SpinnerProps, Stack, type StackAlign, type StackGap, type StackProps, Switch, type SwitchProps, Tab, TabBar, TabBarAction, type TabBarActionProps, TabBarItem, type TabBarItemProps, type TabBarProps, TabList, type TabListProps, TabPanel, type TabPanelProps, type TabProps, Tabs, type TabsProps, Tag, type TagProps, type TagTone, Text, type TextProps, type TextTone, type TextVariant, Textarea, type TextareaProps, type ToastAction, type ToastOptions, ToastProvider, type ToastProviderProps, type ToastTone, Tooltip, type TooltipPlacement, type TooltipProps, UploadProgress, type UploadProgressLabels, type UploadProgressProps, type UploadStatus, type UseOverlayOptions, type VideoCaptions, type VideoChapter, VideoPlayer, type VideoPlayerLabels, type VideoPlayerProps, VisuallyHidden, type VisuallyHiddenProps, cx, useFieldContext, useOverlay, usePresence, useRovingGroup, useToast };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import * as react from 'react';
2
- import { CSSProperties, HTMLAttributes, JSX, ReactElement, Ref, ReactNode, ButtonHTMLAttributes, ElementType, ComponentPropsWithRef, MouseEventHandler, InputHTMLAttributes, HTMLInputTypeAttribute, TextareaHTMLAttributes, SelectHTMLAttributes, RefObject, KeyboardEvent } from 'react';
2
+ import { CSSProperties, HTMLAttributes, JSX, ReactElement, Ref, ReactNode, ButtonHTMLAttributes, ElementType, ComponentPropsWithRef, MouseEventHandler, InputHTMLAttributes, HTMLInputTypeAttribute, TextareaHTMLAttributes, SelectHTMLAttributes, RefObject, MouseEvent, KeyboardEvent, PointerEvent, FocusEvent } from 'react';
3
+ import { Placement } from '@floating-ui/dom';
3
4
 
4
5
  /**
5
6
  * Join class names, dropping anything falsy.
@@ -1355,6 +1356,141 @@ declare function SheetFooter({ children }: {
1355
1356
  children: ReactNode;
1356
1357
  }): react.JSX.Element;
1357
1358
 
1359
+ type PopoverPlacement = Placement;
1360
+ interface PopoverProps {
1361
+ open: boolean;
1362
+ onClose: () => void;
1363
+ /** The trigger the panel hangs off. It stays interactive while open. */
1364
+ anchorRef: RefObject<HTMLElement | null>;
1365
+ /** Accessible name of the panel. */
1366
+ label: string;
1367
+ /** Side it prefers. It flips and slides to stay on screen. Default "bottom-start". */
1368
+ placement?: PopoverPlacement;
1369
+ className?: string;
1370
+ children: ReactNode;
1371
+ }
1372
+ /**
1373
+ * Anchored, non-modal surface. The page behind it stays live and scrollable
1374
+ * and the panel travels with the anchor; a press outside, Escape, or the
1375
+ * trigger itself dismisses it.
1376
+ *
1377
+ * Modal by contrast: reach for Modal when the answer must come before anything
1378
+ * else, and for Sheet when the content is a task rather than a detail — a
1379
+ * form with its own header and footer belongs in one of those, not here.
1380
+ *
1381
+ * ```tsx
1382
+ * const anchor = useRef<HTMLButtonElement>(null);
1383
+ * const [open, setOpen] = useState(false);
1384
+ * <Button ref={anchor} aria-expanded={open} onClick={() => setOpen((v) => !v)}>
1385
+ * Equipment
1386
+ * </Button>
1387
+ * <Popover open={open} onClose={() => setOpen(false)} anchorRef={anchor} label="Equipment">
1388
+ * <PopoverBody>…</PopoverBody>
1389
+ * </Popover>
1390
+ * ```
1391
+ */
1392
+ declare function Popover({ open, onClose, anchorRef, label, placement, className, children, }: PopoverProps): react.ReactPortal | null;
1393
+ type PopoverHeaderProps = {
1394
+ children: ReactNode;
1395
+ } & ({
1396
+ /** Renders a close button after the title. Wire it to the popover's own onClose. */
1397
+ onClose: () => void;
1398
+ /** Accessible name of the close button (localise). */
1399
+ closeLabel: string;
1400
+ } | {
1401
+ onClose?: undefined;
1402
+ closeLabel?: undefined;
1403
+ });
1404
+ declare function PopoverHeader({ children, onClose, closeLabel }: PopoverHeaderProps): react.JSX.Element;
1405
+ declare function PopoverBody({ children }: {
1406
+ children: ReactNode;
1407
+ }): react.JSX.Element;
1408
+ declare function PopoverFooter({ children }: {
1409
+ children: ReactNode;
1410
+ }): react.JSX.Element;
1411
+
1412
+ type MenuPlacement = Placement;
1413
+ /** What Menu needs to be able to put on its trigger. */
1414
+ type MenuTriggerProps = {
1415
+ ref?: Ref<HTMLElement> | undefined;
1416
+ "aria-haspopup"?: "menu" | undefined;
1417
+ "aria-expanded"?: boolean | undefined;
1418
+ onClick?: ((event: MouseEvent<HTMLElement>) => void) | undefined;
1419
+ onKeyDown?: ((event: KeyboardEvent<HTMLElement>) => void) | undefined;
1420
+ };
1421
+ interface MenuProps {
1422
+ /** Accessible name of the menu — what the list of actions is *for*. */
1423
+ label: string;
1424
+ /** The control that opens it. Gets the ref, the ARIA and the key handling. */
1425
+ trigger: ReactElement<MenuTriggerProps>;
1426
+ /** Side it prefers. It flips and slides to stay on screen. Default "bottom-end". */
1427
+ placement?: MenuPlacement;
1428
+ className?: string;
1429
+ children: ReactNode;
1430
+ }
1431
+ /**
1432
+ * A button that opens a short list of actions (APG's menu button).
1433
+ *
1434
+ * Open state is the menu's own: a list of actions has no meaning outside the
1435
+ * button that opened it, so unlike Modal, Sheet and Popover there is nothing
1436
+ * for a caller to hold. Reach for Popover instead the moment the panel holds
1437
+ * anything but actions — a form, a filter, a list of things to read.
1438
+ *
1439
+ * ```tsx
1440
+ * <Menu label="Heat actions" trigger={<Button variant="ghost">Actions</Button>}>
1441
+ * <MenuItem onSelect={edit}>Edit</MenuItem>
1442
+ * <MenuItem onSelect={remove} tone="danger">Delete</MenuItem>
1443
+ * </Menu>
1444
+ * ```
1445
+ */
1446
+ declare function Menu({ label, trigger, placement, className, children }: MenuProps): react.JSX.Element;
1447
+ interface MenuItemProps {
1448
+ /** What the action does. The menu closes itself around it. */
1449
+ onSelect: () => void;
1450
+ disabled?: boolean;
1451
+ /** "danger" for an action that destroys something. Default "default". */
1452
+ tone?: "default" | "danger";
1453
+ children: ReactNode;
1454
+ }
1455
+ declare function MenuItem({ onSelect, disabled, tone, children }: MenuItemProps): react.JSX.Element;
1456
+
1457
+ type TooltipPlacement = Placement;
1458
+ /** What Tooltip needs to be able to put on its trigger. */
1459
+ type TriggerProps = {
1460
+ ref?: Ref<HTMLElement> | undefined;
1461
+ "aria-describedby"?: string | undefined;
1462
+ onPointerEnter?: ((event: PointerEvent<HTMLElement>) => void) | undefined;
1463
+ onPointerLeave?: ((event: PointerEvent<HTMLElement>) => void) | undefined;
1464
+ onFocus?: ((event: FocusEvent<HTMLElement>) => void) | undefined;
1465
+ onBlur?: ((event: FocusEvent<HTMLElement>) => void) | undefined;
1466
+ };
1467
+ interface TooltipProps {
1468
+ /** The label. Plain text — nothing here is reachable by pointer or key. */
1469
+ content: ReactNode;
1470
+ /** Side it prefers. It flips and slides to stay on screen. Default "top". */
1471
+ placement?: TooltipPlacement;
1472
+ /** Pointer dwell in ms. Keyboard focus ignores it. Default 400. */
1473
+ delayMs?: number;
1474
+ /** The control being labelled. Gets the ref and the handlers. */
1475
+ children: ReactElement<TriggerProps>;
1476
+ }
1477
+ /**
1478
+ * A name for a control that shows only its glyph, on hover and on focus.
1479
+ *
1480
+ * It describes; it does not hold anything. There is nothing to click inside
1481
+ * it and focus never moves into it, so anything the reader has to act on —
1482
+ * a link, a button, a form — belongs in a Popover instead. A control whose
1483
+ * label is *only* here still needs an aria-label of its own: this is the
1484
+ * accessible description, not the accessible name.
1485
+ *
1486
+ * ```tsx
1487
+ * <Tooltip content="Remove from heat">
1488
+ * <Button variant="ghost" aria-label="Remove from heat"><Icon name="x" /></Button>
1489
+ * </Tooltip>
1490
+ * ```
1491
+ */
1492
+ declare function Tooltip({ content, placement, delayMs, children, }: TooltipProps): react.JSX.Element;
1493
+
1358
1494
  type ConfirmDialogTone = "default" | "danger" | "warning";
1359
1495
  interface ConfirmDialogProps<T = void> {
1360
1496
  /** The row in question, or null when nothing is being asked. Held by the
@@ -1902,14 +2038,23 @@ declare function Breadcrumb({ items, label, linkAs, className, ...rest }: Breadc
1902
2038
  interface UseOverlayOptions {
1903
2039
  open: boolean;
1904
2040
  onClose: () => void;
2041
+ /**
2042
+ * Freeze the page behind the surface. Default true.
2043
+ *
2044
+ * False for anchored surfaces: a popover is pinned to a trigger that scrolls
2045
+ * with the page, so locking the page would strand it over content the reader
2046
+ * can no longer reach, and locking it *and* letting the popover follow the
2047
+ * anchor are the same gesture answered two ways.
2048
+ */
2049
+ lockScroll?: boolean;
1905
2050
  }
1906
2051
  /**
1907
2052
  * Shared modal-surface behaviour: focus capture and restore, Escape to
1908
2053
  * close, Tab cycling inside the panel, body scroll lock. Attach the
1909
2054
  * returned ref to the dialog element (it needs tabIndex={-1}).
1910
2055
  *
1911
- * Anchor-positioned overlays (Tooltip/Popover) will extend this hook with
1912
- * a floating-ui middleware pass; the options object leaves room for that.
2056
+ * Popover uses it too, with `lockScroll: false`; where it sits on the screen
2057
+ * is a separate question, answered by useAnchoredPosition.
1913
2058
  */
1914
2059
  declare function useOverlay<T extends HTMLElement>(options: UseOverlayOptions): RefObject<T | null>;
1915
2060
 
@@ -1979,4 +2124,4 @@ interface RovingGroupOptions {
1979
2124
  */
1980
2125
  declare function useRovingGroup(ref: RefObject<HTMLElement | null>, { selector, orientation }: RovingGroupOptions): (event: KeyboardEvent<HTMLElement>) => void;
1981
2126
 
1982
- export { AppBar, type AppBarProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, type AvatarSize, Badge, type BadgeProps, type BadgeTone, Breadcrumb, type BreadcrumbProps, Button, type ButtonProps, type ButtonShape, type ButtonSize, type ButtonVariant, type CSSVars, Card, CardBody, type CardBodyProps, CardFooter, CardHeader, type CardProps, type CardSectionProps, type CardVariant, type CarouselPager, type CarouselSlide, Checkbox, type CheckboxProps, Chip, ChipBar, type ChipBarGap, type ChipBarProps, ChipGroup, type ChipGroupGap, type ChipGroupProps, type ChipProps, type ChipVariant, ConfirmDialog, type ConfirmDialogProps, type ConfirmDialogTone, Container, type ContainerProps, type ContainerWidth, CountButton, type CountButtonProps, type CountButtonTone, type Crumb, type DataColumn, DataTable, type DataTableProps, type DataTableSelectionLabels, DateTimePicker, type DateTimePickerLabels, type DateTimePickerProps, Divider, type DividerProps, EmptyState, type EmptyStateProps, Field, type FieldContextValue, type FieldProps, FileDrop, type FileDropProps, Heading, type HeadingLevel, type HeadingProps, type HeadingTone, Icon, type IconProps, IconProvider, type IconProviderProps, type IconRender, type IconRenderProps, type IconSize, ImageCarousel, type ImageCarouselLabels, type ImageCarouselProps, Inline, type InlineAlign, type InlineGap, type InlineJustify, type InlineProps, Input, type InputProps, type InputSize, Lightbox, type LightboxLabels, type LightboxProps, Link, type LinkProps, type LinkVariant, ListGroup, type ListGroupProps, ListItem, type ListItemProps, MediaPlaceholder, type MediaPlaceholderProps, Modal, ModalBody, ModalFooter, ModalHeader, type ModalProps, type OverlayHistory, OverlayHistoryContext, PasswordInput, type PasswordInputProps, type Presence, ProgressBar, type ProgressBarProps, Radio, type RadioProps, type RovingGroupOptions, Screen, ScreenContent, type ScreenContentProps, Scroller, type ScrollerLabels, type ScrollerProps, type SegmentOption, SegmentedControl, type SegmentedControlProps, type SegmentedControlSize, Select, type SelectProps, type SelectSize, Sheet, SheetBody, SheetFooter, SheetHeader, type SheetProps, SideNav, SideNavGroup, type SideNavGroupProps, SideNavItem, type SideNavItemProps, type SideNavProps, Skeleton, type SkeletonProps, type SkeletonVariant, Spinner, type SpinnerProps, Stack, type StackAlign, type StackGap, type StackProps, Switch, type SwitchProps, Tab, TabBar, TabBarAction, type TabBarActionProps, TabBarItem, type TabBarItemProps, type TabBarProps, TabList, type TabListProps, TabPanel, type TabPanelProps, type TabProps, Tabs, type TabsProps, Tag, type TagProps, type TagTone, Text, type TextProps, type TextTone, type TextVariant, Textarea, type TextareaProps, type ToastAction, type ToastOptions, ToastProvider, type ToastProviderProps, type ToastTone, UploadProgress, type UploadProgressLabels, type UploadProgressProps, type UploadStatus, type UseOverlayOptions, type VideoCaptions, type VideoChapter, VideoPlayer, type VideoPlayerLabels, type VideoPlayerProps, VisuallyHidden, type VisuallyHiddenProps, cx, useFieldContext, useOverlay, usePresence, useRovingGroup, useToast };
2127
+ export { AppBar, type AppBarProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, type AvatarSize, Badge, type BadgeProps, type BadgeTone, Breadcrumb, type BreadcrumbProps, Button, type ButtonProps, type ButtonShape, type ButtonSize, type ButtonVariant, type CSSVars, Card, CardBody, type CardBodyProps, CardFooter, CardHeader, type CardProps, type CardSectionProps, type CardVariant, type CarouselPager, type CarouselSlide, Checkbox, type CheckboxProps, Chip, ChipBar, type ChipBarGap, type ChipBarProps, ChipGroup, type ChipGroupGap, type ChipGroupProps, type ChipProps, type ChipVariant, ConfirmDialog, type ConfirmDialogProps, type ConfirmDialogTone, Container, type ContainerProps, type ContainerWidth, CountButton, type CountButtonProps, type CountButtonTone, type Crumb, type DataColumn, DataTable, type DataTableProps, type DataTableSelectionLabels, DateTimePicker, type DateTimePickerLabels, type DateTimePickerProps, Divider, type DividerProps, EmptyState, type EmptyStateProps, Field, type FieldContextValue, type FieldProps, FileDrop, type FileDropProps, Heading, type HeadingLevel, type HeadingProps, type HeadingTone, Icon, type IconProps, IconProvider, type IconProviderProps, type IconRender, type IconRenderProps, type IconSize, ImageCarousel, type ImageCarouselLabels, type ImageCarouselProps, Inline, type InlineAlign, type InlineGap, type InlineJustify, type InlineProps, Input, type InputProps, type InputSize, Lightbox, type LightboxLabels, type LightboxProps, Link, type LinkProps, type LinkVariant, ListGroup, type ListGroupProps, ListItem, type ListItemProps, MediaPlaceholder, type MediaPlaceholderProps, Menu, MenuItem, type MenuItemProps, type MenuPlacement, type MenuProps, Modal, ModalBody, ModalFooter, ModalHeader, type ModalProps, type OverlayHistory, OverlayHistoryContext, PasswordInput, type PasswordInputProps, Popover, PopoverBody, PopoverFooter, PopoverHeader, type PopoverHeaderProps, type PopoverPlacement, type PopoverProps, type Presence, ProgressBar, type ProgressBarProps, Radio, type RadioProps, type RovingGroupOptions, Screen, ScreenContent, type ScreenContentProps, Scroller, type ScrollerLabels, type ScrollerProps, type SegmentOption, SegmentedControl, type SegmentedControlProps, type SegmentedControlSize, Select, type SelectProps, type SelectSize, Sheet, SheetBody, SheetFooter, SheetHeader, type SheetProps, SideNav, SideNavGroup, type SideNavGroupProps, SideNavItem, type SideNavItemProps, type SideNavProps, Skeleton, type SkeletonProps, type SkeletonVariant, Spinner, type SpinnerProps, Stack, type StackAlign, type StackGap, type StackProps, Switch, type SwitchProps, Tab, TabBar, TabBarAction, type TabBarActionProps, TabBarItem, type TabBarItemProps, type TabBarProps, TabList, type TabListProps, TabPanel, type TabPanelProps, type TabProps, Tabs, type TabsProps, Tag, type TagProps, type TagTone, Text, type TextProps, type TextTone, type TextVariant, Textarea, type TextareaProps, type ToastAction, type ToastOptions, ToastProvider, type ToastProviderProps, type ToastTone, Tooltip, type TooltipPlacement, type TooltipProps, UploadProgress, type UploadProgressLabels, type UploadProgressProps, type UploadStatus, type UseOverlayOptions, type VideoCaptions, type VideoChapter, VideoPlayer, type VideoPlayerLabels, type VideoPlayerProps, VisuallyHidden, type VisuallyHiddenProps, cx, useFieldContext, useOverlay, usePresence, useRovingGroup, useToast };