burne-ui 1.6.2 → 1.6.4

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.
Files changed (108) hide show
  1. package/dist/components/composite/AlertDialog/AlertDialog.d.ts +1 -1
  2. package/dist/components/composite/AlertDialog/alertDialogAnimations.d.ts +1 -1
  3. package/dist/components/composite/AlertDialog/alertDialogParts.d.ts +2 -2
  4. package/dist/components/composite/AlertDialog/alertDialogStyles.d.ts +4 -1
  5. package/dist/components/composite/AlertDialog/alertDialogTypes.d.ts +11 -1
  6. package/dist/components/composite/AlertDialog/useAlertDialogRootState.d.ts +1 -1
  7. package/dist/components/composite/Form/Form.d.ts +1 -0
  8. package/dist/components/composite/Form/formParts.d.ts +17 -30
  9. package/dist/components/composite/Form/formTypes.d.ts +13 -5
  10. package/dist/components/composite/Form/index.d.ts +18 -8
  11. package/dist/components/core/Button/Button.d.ts +4 -2
  12. package/dist/components/core/Button/buttonTypes.d.ts +1 -0
  13. package/dist/components/core/Button/index.d.ts +1 -0
  14. package/dist/components/core/Calendar/Calendar.d.ts +2 -3
  15. package/dist/components/core/Calendar/calendarParts.d.ts +13 -1
  16. package/dist/components/core/Calendar/calendarStyles.d.ts +1 -0
  17. package/dist/components/core/Calendar/calendarTypes.d.ts +41 -4
  18. package/dist/components/core/Calendar/index.d.ts +13 -1
  19. package/dist/components/core/ColorPicker/ColorPicker.d.ts +3 -3
  20. package/dist/components/core/ColorPicker/colorPickerParts.d.ts +11 -1
  21. package/dist/components/core/ColorPicker/colorPickerTypes.d.ts +18 -16
  22. package/dist/components/core/ColorPicker/index.d.ts +11 -2
  23. package/dist/components/core/ComboBox/comboBoxParts.d.ts +8 -5
  24. package/dist/components/core/ComboBox/comboBoxTypes.d.ts +16 -0
  25. package/dist/components/core/ComboBox/index.d.ts +8 -2
  26. package/dist/components/core/Dialog/Dialog.d.ts +1 -1
  27. package/dist/components/core/Dialog/dialogAnimations.d.ts +1 -1
  28. package/dist/components/core/Dialog/dialogParts.d.ts +13 -26
  29. package/dist/components/core/Dialog/dialogStyles.d.ts +4 -1
  30. package/dist/components/core/Dialog/dialogTypes.d.ts +15 -4
  31. package/dist/components/core/Dialog/index.d.ts +12 -7
  32. package/dist/components/core/Dialog/useDialogRootState.d.ts +1 -1
  33. package/dist/components/core/Drawer/Drawer.d.ts +1 -1
  34. package/dist/components/core/Drawer/drawerAnimations.d.ts +1 -1
  35. package/dist/components/core/Drawer/drawerParts.d.ts +12 -22
  36. package/dist/components/core/Drawer/drawerStyles.d.ts +4 -1
  37. package/dist/components/core/Drawer/drawerTypes.d.ts +15 -4
  38. package/dist/components/core/Drawer/index.d.ts +11 -6
  39. package/dist/components/core/Drawer/useDrawerRootState.d.ts +1 -1
  40. package/dist/components/core/Dropdown/Dropdown.d.ts +1 -1
  41. package/dist/components/core/Dropdown/dropdownAnimations.d.ts +2 -1
  42. package/dist/components/core/Dropdown/dropdownParts.d.ts +10 -12
  43. package/dist/components/core/Dropdown/dropdownSubParts.d.ts +6 -6
  44. package/dist/components/core/Dropdown/dropdownTypes.d.ts +19 -3
  45. package/dist/components/core/Dropdown/index.d.ts +13 -5
  46. package/dist/components/core/Dropdown/useDropdownRootState.d.ts +1 -1
  47. package/dist/components/core/Field/fieldParts.d.ts +7 -2
  48. package/dist/components/core/Field/index.d.ts +7 -2
  49. package/dist/components/core/Link/Link.d.ts +1 -11
  50. package/dist/components/core/Link/linkAnchorBodyPart.d.ts +2 -1
  51. package/dist/components/core/Link/linkParts.d.ts +1 -1
  52. package/dist/components/core/Link/linkTypes.d.ts +15 -5
  53. package/dist/components/core/ListBox/listBoxParts.d.ts +1 -1
  54. package/dist/components/core/ListBox/listBoxTypes.d.ts +4 -1
  55. package/dist/components/core/Pagination/index.d.ts +3 -3
  56. package/dist/components/core/Pagination/paginationParts.d.ts +14 -18
  57. package/dist/components/core/Pagination/paginationTypes.d.ts +2 -3
  58. package/dist/components/core/Popover/Popover.d.ts +1 -1
  59. package/dist/components/core/Popover/index.d.ts +6 -5
  60. package/dist/components/core/Popover/popoverAnimations.d.ts +1 -1
  61. package/dist/components/core/Popover/popoverParts.d.ts +5 -16
  62. package/dist/components/core/Popover/popoverTypes.d.ts +9 -0
  63. package/dist/components/core/Popover/usePopoverRootState.d.ts +1 -1
  64. package/dist/components/core/Select/index.d.ts +8 -2
  65. package/dist/components/core/Select/selectParts.d.ts +7 -5
  66. package/dist/components/core/Select/selectTypes.d.ts +16 -0
  67. package/dist/components/core/Slider/index.d.ts +8 -3
  68. package/dist/components/core/Slider/sliderThumbParts.d.ts +21 -2
  69. package/dist/components/core/Slider/sliderTrackParts.d.ts +8 -9
  70. package/dist/components/core/Slider/sliderTypes.d.ts +8 -5
  71. package/dist/components/core/Slider/useSliderTrackState.d.ts +1406 -1
  72. package/dist/components/core/Switch/useSwitchRootState.d.ts +3 -3
  73. package/dist/components/core/Table/Table.d.ts +3 -3
  74. package/dist/components/core/Table/index.d.ts +4 -1
  75. package/dist/components/core/Table/tableAPI.d.ts +3 -0
  76. package/dist/components/core/Table/tableAnimations.d.ts +3 -1
  77. package/dist/components/core/Table/tableParts.d.ts +4 -1
  78. package/dist/components/core/Table/tableStyles.d.ts +4 -0
  79. package/dist/components/core/Table/tableTypes.d.ts +10 -0
  80. package/dist/components/core/TimeField/TimeField.d.ts +1 -1
  81. package/dist/components/core/TimeField/index.d.ts +1 -0
  82. package/dist/components/core/TimeField/timeFieldParts.d.ts +1 -0
  83. package/dist/components/core/TimeField/timeFieldStyles.d.ts +5 -1
  84. package/dist/components/core/TimeField/timeFieldTypes.d.ts +6 -0
  85. package/dist/components/core/Toast/index.d.ts +7 -7
  86. package/dist/components/core/Toast/toastParts.d.ts +6 -24
  87. package/dist/components/core/Toast/toastProvider.d.ts +1 -1
  88. package/dist/components/core/Toast/toastTypes.d.ts +2 -0
  89. package/dist/components/core/ToggleButton/ToggleButton.d.ts +1 -1
  90. package/dist/components/core/ToggleButton/index.d.ts +1 -1
  91. package/dist/components/core/Tooltip/Tooltip.d.ts +1 -1
  92. package/dist/components/core/Tooltip/index.d.ts +1 -0
  93. package/dist/components/core/Tooltip/tooltipParts.d.ts +1 -0
  94. package/dist/components/core/Tooltip/tooltipTypes.d.ts +6 -0
  95. package/dist/components/core/Tooltip/useTooltipRootState.d.ts +1 -1
  96. package/dist/components/core/utils/mergeAsChildProps.d.ts +21 -0
  97. package/dist/components/core/utils/portalContainer.d.ts +27 -0
  98. package/dist/index.cjs +1 -1
  99. package/dist/index.d.ts +1 -1
  100. package/dist/index.js +12742 -11953
  101. package/dist/internal.cjs +1 -1
  102. package/dist/internal.js +1 -1
  103. package/dist/theme/themeConfig.d.ts +1 -0
  104. package/dist/themeRuntimeContext-Cn9YgR1F.cjs +50 -0
  105. package/dist/{themeRuntimeContext-DyytHHaS.js → themeRuntimeContext-rM9wHr74.js} +33 -23
  106. package/dist/ui.css +53 -0
  107. package/package.json +1 -1
  108. package/dist/themeRuntimeContext-DpKqCfd0.cjs +0 -50
@@ -1,6 +1,9 @@
1
1
  import { HTMLAttributes, InputHTMLAttributes, ReactNode } from 'react';
2
2
  import { ButtonGroupSegment } from '../../composite/ButtonGroup/buttonGroupTypes';
3
3
  import { InputSize, InputStatus, InputVariant } from '../Input';
4
+ import { ListBoxProps } from '../ListBox';
5
+ import { PopoverSide } from '../Popover';
6
+ import { FloatingAlign } from '../Tooltip/tooltipPosition';
4
7
  export type ComboBoxOption = {
5
8
  value: string;
6
9
  label: ReactNode;
@@ -19,6 +22,13 @@ export type ComboBoxClassNames = {
19
22
  popover?: string;
20
23
  popoverBody?: string;
21
24
  listBox?: string;
25
+ listBoxItem?: string;
26
+ listBoxLabel?: string;
27
+ listBoxHint?: string;
28
+ listBoxIcon?: string;
29
+ listBoxEmpty?: string;
30
+ listBoxHeader?: string;
31
+ listBoxHeaderText?: string;
22
32
  hint?: string;
23
33
  error?: string;
24
34
  };
@@ -93,7 +103,13 @@ export type ComboBoxInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, "va
93
103
  export type ComboBoxTriggerProps = HTMLAttributes<HTMLButtonElement>;
94
104
  export type ComboBoxPopoverProps = HTMLAttributes<HTMLDivElement> & {
95
105
  children?: ReactNode;
106
+ /** Preferred side relative to the trigger. Default: `bottom`. */
107
+ side?: PopoverSide;
108
+ /** Panel alignment relative to the trigger. Default: `start` when matching width. */
109
+ align?: FloatingAlign;
96
110
  offset?: number;
111
+ /** Props forwarded to the inner `ListBox` (controlled selection props are owned by ComboBox). */
112
+ listBoxProps?: Omit<ListBoxProps, "children" | "value" | "defaultValue" | "onValueChange" | "activeValue" | "onActiveValueChange" | "listId">;
97
113
  };
98
114
  export type ComboBoxHintProps = HTMLAttributes<HTMLParagraphElement> & {
99
115
  children?: ReactNode;
@@ -1,4 +1,4 @@
1
- import { ComboBoxError, ComboBoxHint, ComboBoxLabel, ComboBoxPopover, ComboBoxRoot } from './ComboBox';
1
+ import { ComboBoxError, ComboBoxHint, ComboBoxLabel, ComboBoxRoot } from './ComboBox';
2
2
  export declare const ComboBox: typeof ComboBoxRoot & {
3
3
  Label: typeof ComboBoxLabel;
4
4
  InputGroup: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & {
@@ -6,7 +6,13 @@ export declare const ComboBox: typeof ComboBoxRoot & {
6
6
  } & import('react').RefAttributes<HTMLDivElement>>;
7
7
  Input: import('react').ForwardRefExoticComponent<import('./comboBoxTypes').ComboBoxInputProps & import('react').RefAttributes<HTMLInputElement>>;
8
8
  Trigger: import('react').ForwardRefExoticComponent<import('./comboBoxTypes').ComboBoxTriggerProps & import('react').RefAttributes<HTMLButtonElement>>;
9
- Popover: typeof ComboBoxPopover;
9
+ Popover: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & {
10
+ children?: import('react').ReactNode;
11
+ side?: import('../Popover').PopoverSide;
12
+ align?: import('../Popover').FloatingAlign;
13
+ offset?: number;
14
+ listBoxProps?: Omit<import('../ListBox').ListBoxProps, "children" | "value" | "defaultValue" | "onValueChange" | "activeValue" | "onActiveValueChange" | "listId">;
15
+ } & import('react').RefAttributes<HTMLDivElement>>;
10
16
  Hint: typeof ComboBoxHint;
11
17
  Error: typeof ComboBoxError;
12
18
  };
@@ -1,7 +1,7 @@
1
1
  import { DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogHeadingBlock, DialogPanel, DialogTitle, DialogTrigger } from './dialogParts';
2
2
  import { DialogProps } from './dialogTypes';
3
3
  export type { DialogProps, DialogPanelProps, DialogTriggerProps, DialogVariant, DialogSize, DialogHeaderProps, DialogTitleProps, DialogDescriptionProps, DialogBodyProps, DialogFooterProps, DialogCloseProps, DialogContentProps, DialogHeadingBlockProps, DialogClassNames, } from './dialogTypes';
4
- export declare function DialogRoot({ open, defaultOpen, onOpenChange, size, children, classNames, }: DialogProps): import("react/jsx-runtime").JSX.Element;
4
+ export declare function DialogRoot({ open, defaultOpen, onOpenChange, size, children, classNames, portalContainer, }: DialogProps): import("react/jsx-runtime").JSX.Element;
5
5
  export declare namespace DialogRoot {
6
6
  var displayName: string;
7
7
  }
@@ -1,6 +1,6 @@
1
1
  import { MouseEvent } from 'react';
2
2
  import { UseDialogModalMotionProps } from './dialogTypes';
3
- export declare function useDialogModalMotion({ open, onOpenChange, variant, dismissOnBackdrop, }: UseDialogModalMotionProps): {
3
+ export declare function useDialogModalMotion({ open, onOpenChange, variant, dismissOnBackdrop, contained, }: UseDialogModalMotionProps): {
4
4
  mounted: boolean;
5
5
  dialogRef: import('react').RefObject<HTMLDialogElement | null>;
6
6
  overlayRef: import('react').RefObject<HTMLDivElement | null>;
@@ -1,17 +1,8 @@
1
- import { DialogBodyProps, DialogContentProps, DialogDescriptionProps, DialogFooterProps, DialogHeaderProps, DialogHeadingBlockProps, DialogPanelProps, DialogPortalShellProps, DialogTitleProps } from './dialogTypes';
2
- export declare function DialogContent({ className, ...rest }: DialogContentProps): import("react/jsx-runtime").JSX.Element;
3
- export declare namespace DialogContent {
4
- var displayName: string;
5
- }
6
- export declare function DialogHeader({ className, ...rest }: DialogHeaderProps): import("react/jsx-runtime").JSX.Element;
7
- export declare namespace DialogHeader {
8
- var displayName: string;
9
- }
1
+ import { DialogBodyProps, DialogContentProps, DialogDescriptionProps, DialogFooterProps, DialogHeaderProps, DialogHeadingBlockProps, DialogPortalShellProps, DialogTitleProps } from './dialogTypes';
2
+ export declare const DialogContent: import('react').ForwardRefExoticComponent<DialogContentProps & import('react').RefAttributes<HTMLDivElement>>;
3
+ export declare const DialogHeader: import('react').ForwardRefExoticComponent<DialogHeaderProps & import('react').RefAttributes<HTMLDivElement>>;
10
4
  export declare const DialogTitle: import('react').ForwardRefExoticComponent<DialogTitleProps & import('react').RefAttributes<HTMLHeadingElement>>;
11
- export declare function DialogDescription({ className, id, ...rest }: DialogDescriptionProps): import("react/jsx-runtime").JSX.Element;
12
- export declare namespace DialogDescription {
13
- var displayName: string;
14
- }
5
+ export declare const DialogDescription: import('react').ForwardRefExoticComponent<DialogDescriptionProps & import('react').RefAttributes<HTMLParagraphElement>>;
15
6
  export declare function DialogHeadingBlock({ className, ...rest }: DialogHeadingBlockProps): import("react/jsx-runtime").JSX.Element;
16
7
  export declare namespace DialogHeadingBlock {
17
8
  var displayName: string;
@@ -23,20 +14,16 @@ export declare const DialogClose: import('react').ForwardRefExoticComponent<Omit
23
14
  ripple?: boolean;
24
15
  classNames?: import('../CloseButton').CloseButtonClassNames;
25
16
  } & import('react').RefAttributes<HTMLButtonElement>>;
26
- export declare function DialogBody({ className, ...rest }: DialogBodyProps): import("react/jsx-runtime").JSX.Element;
27
- export declare namespace DialogBody {
28
- var displayName: string;
29
- }
30
- export declare function DialogFooter({ className, children, ...rest }: DialogFooterProps): import("react/jsx-runtime").JSX.Element;
31
- export declare namespace DialogFooter {
32
- var displayName: string;
33
- }
17
+ export declare const DialogBody: import('react').ForwardRefExoticComponent<DialogBodyProps & import('react').RefAttributes<HTMLDivElement>>;
18
+ export declare const DialogFooter: import('react').ForwardRefExoticComponent<DialogFooterProps & import('react').RefAttributes<HTMLDivElement>>;
34
19
  export declare const DialogTrigger: import('react').ForwardRefExoticComponent<import('react').ButtonHTMLAttributes<HTMLButtonElement> & {
35
20
  asChild?: boolean;
36
21
  children?: import('react').ReactNode;
37
22
  } & import('react').RefAttributes<HTMLButtonElement>>;
38
- export declare function DialogPanel({ variant, dismissOnBackdrop, className, themeAnchor, children, }: DialogPanelProps): import('react').ReactPortal | null;
39
- export declare namespace DialogPanel {
40
- var displayName: string;
41
- }
42
- export declare function DialogPortalShell({ children, className, variant, sizePreset, portalTheme, lightUi, titleId, descriptionId, hasDescription, dialogRef, overlayRef, panelRef, bindGlossPanelRef, onBackdropMouseDown, onDialogClose, onDialogCancel, }: DialogPortalShellProps): import("react/jsx-runtime").JSX.Element;
23
+ export declare const DialogPanel: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & {
24
+ variant?: import('./dialogTypes').DialogVariant;
25
+ dismissOnBackdrop?: boolean;
26
+ themeAnchor?: HTMLElement | null;
27
+ portalContainer?: HTMLElement | null;
28
+ } & import('react').RefAttributes<HTMLDivElement>>;
29
+ export declare function DialogPortalShell({ children, className, style, variant, sizePreset, portalTheme, lightUi, titleId, descriptionId, hasDescription, dialogRef, overlayRef, panelRef, panelForwardedRef, panelRest, bindGlossPanelRef, onBackdropMouseDown, onDialogClose, onDialogCancel, contained, }: DialogPortalShellProps): import("react/jsx-runtime").JSX.Element;
@@ -3,7 +3,10 @@ import { DialogSize, DialogSizePreset, DialogVariant } from './dialogTypes';
3
3
  export declare const DIALOG_CONTENT_CLASS = "flex min-h-0 flex-1 flex-col gap-mid text-left";
4
4
  export declare const DIALOG_SIZE: Record<DialogSize, DialogSizePreset>;
5
5
  export declare const FOOTER_BUTTON_SIZE: Record<DialogSize, ButtonSize>;
6
- export declare const DIALOG_NATIVE_CLASS = "fixed inset-0 z-[100] m-0 flex h-full w-full max-h-none max-w-none items-center justify-center border-0 bg-transparent p-mid open:flex [&::backdrop]:bg-transparent";
6
+ export declare const DIALOG_NATIVE_CLASS = "m-0 flex h-full w-full max-h-none max-w-none items-center justify-center border-0 bg-transparent p-mid open:flex [&::backdrop]:bg-transparent";
7
+ export declare const DIALOG_NATIVE_POSITION_FIXED_CLASS = "fixed inset-0 z-[100]";
8
+ export declare const DIALOG_NATIVE_POSITION_CONTAINED_CLASS = "absolute inset-0 z-[100]";
9
+ export declare function dialogNativeClass(contained: boolean): string;
7
10
  export declare const DIALOG_OVERLAY_LIGHT_CLASS = "bg-[color-mix(in_oklab,var(--color-foreground)_14%,transparent)] backdrop-blur-[14px] backdrop-saturate-150 motion-reduce:backdrop-blur-none";
8
11
  export declare const DIALOG_OVERLAY_DARK_CLASS = "bg-[color-mix(in_oklab,black_58%,transparent)]";
9
12
  export declare const DIALOG_PANEL_BASE_CLASS = "relative z-10 w-full outline-none";
@@ -39,14 +39,16 @@ export type DialogProps = {
39
39
  onOpenChange?: (open: boolean) => void;
40
40
  children?: ReactNode;
41
41
  size?: DialogSize;
42
+ /** DOM node for the portal. Default: `document.body`. */
43
+ portalContainer?: HTMLElement | null;
42
44
  classNames?: DialogClassNames;
43
45
  };
44
- export type DialogPanelProps = {
46
+ export type DialogPanelProps = HTMLAttributes<HTMLDivElement> & {
45
47
  variant?: DialogVariant;
46
48
  dismissOnBackdrop?: boolean;
47
- className?: string;
48
49
  themeAnchor?: HTMLElement | null;
49
- children?: ReactNode;
50
+ /** Overrides Root `portalContainer`. Default: `document.body`. */
51
+ portalContainer?: HTMLElement | null;
50
52
  };
51
53
  export type DialogTriggerProps = ButtonHTMLAttributes<HTMLButtonElement> & {
52
54
  /** Render trigger as a child element (the child receives all trigger props). */
@@ -64,6 +66,8 @@ export type DialogContextValue = {
64
66
  size: DialogSize;
65
67
  sizePreset: DialogSizePreset;
66
68
  footerButtonSize: ButtonSize;
69
+ /** Portal mount node from Root; Panel may override via its own prop. */
70
+ portalContainer?: HTMLElement | null;
67
71
  };
68
72
  export type DialogClassNamesProviderProps = {
69
73
  classNames?: DialogClassNames;
@@ -77,16 +81,19 @@ export type DialogFooterProps = HTMLAttributes<HTMLDivElement>;
77
81
  export type DialogCloseProps = CloseButtonProps;
78
82
  export type DialogContentProps = HTMLAttributes<HTMLDivElement>;
79
83
  export type DialogHeadingBlockProps = HTMLAttributes<HTMLDivElement>;
80
- export type UseDialogRootStateProps = Pick<DialogProps, "open" | "defaultOpen" | "onOpenChange" | "size">;
84
+ export type UseDialogRootStateProps = Pick<DialogProps, "open" | "defaultOpen" | "onOpenChange" | "size" | "portalContainer">;
81
85
  export type UseDialogModalMotionProps = {
82
86
  open: boolean;
83
87
  onOpenChange: (open: boolean) => void;
84
88
  variant: DialogVariant;
85
89
  dismissOnBackdrop: boolean;
90
+ /** When true, open with `show()` + absolute positioning inside a custom portal host. */
91
+ contained?: boolean;
86
92
  };
87
93
  export type DialogPortalShellProps = {
88
94
  children: ReactNode;
89
95
  className?: string;
96
+ style?: React.CSSProperties;
90
97
  variant: DialogVariant;
91
98
  sizePreset: DialogSizePreset;
92
99
  portalTheme: Record<string, string | undefined>;
@@ -97,10 +104,14 @@ export type DialogPortalShellProps = {
97
104
  dialogRef: React.RefObject<HTMLDialogElement | null>;
98
105
  overlayRef: React.RefObject<HTMLDivElement | null>;
99
106
  panelRef: React.RefObject<HTMLDivElement | null>;
107
+ panelForwardedRef?: React.ForwardedRef<HTMLDivElement>;
108
+ panelRest?: Omit<HTMLAttributes<HTMLDivElement>, "className" | "style" | "children" | "ref">;
100
109
  bindGlossPanelRef: (node: HTMLDivElement | null) => void;
101
110
  onBackdropMouseDown: (e: React.MouseEvent<HTMLDivElement>) => void;
102
111
  onDialogClose: () => void;
103
112
  onDialogCancel: (e: React.SyntheticEvent<HTMLDialogElement>) => void;
113
+ /** Custom portal host — use absolute positioning instead of fixed/top-layer. */
114
+ contained?: boolean;
104
115
  };
105
116
  export type DialogTriggerInternalProps = {
106
117
  triggerRef: React.RefObject<HTMLElement | null>;
@@ -1,15 +1,20 @@
1
- import { DialogBody, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogHeadingBlock, DialogPanel, DialogRoot } from './Dialog';
1
+ import { DialogContent, DialogHeadingBlock, DialogRoot } from './Dialog';
2
2
  export declare const Dialog: typeof DialogRoot & {
3
3
  Trigger: import('react').ForwardRefExoticComponent<import('react').ButtonHTMLAttributes<HTMLButtonElement> & {
4
4
  asChild?: boolean;
5
5
  children?: import('react').ReactNode;
6
6
  } & import('react').RefAttributes<HTMLButtonElement>>;
7
- Panel: typeof DialogPanel;
8
- Content: typeof DialogContent;
9
- Header: typeof DialogHeader;
7
+ Panel: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & {
8
+ variant?: import('./dialogTypes').DialogVariant;
9
+ dismissOnBackdrop?: boolean;
10
+ themeAnchor?: HTMLElement | null;
11
+ portalContainer?: HTMLElement | null;
12
+ } & import('react').RefAttributes<HTMLDivElement>>;
13
+ Content: import('react').ForwardRefExoticComponent<import('./dialogTypes').DialogContentProps & import('react').RefAttributes<HTMLDivElement>>;
14
+ Header: import('react').ForwardRefExoticComponent<import('./dialogTypes').DialogHeaderProps & import('react').RefAttributes<HTMLDivElement>>;
10
15
  HeadingBlock: typeof DialogHeadingBlock;
11
16
  Title: import('react').ForwardRefExoticComponent<import('./dialogTypes').DialogTitleProps & import('react').RefAttributes<HTMLHeadingElement>>;
12
- Description: typeof DialogDescription;
17
+ Description: import('react').ForwardRefExoticComponent<import('./dialogTypes').DialogDescriptionProps & import('react').RefAttributes<HTMLParagraphElement>>;
13
18
  Close: import('react').ForwardRefExoticComponent<Omit<import('react').ButtonHTMLAttributes<HTMLButtonElement>, "children"> & {
14
19
  variant?: import('../CloseButton').CloseButtonVariant;
15
20
  size?: import('../CloseButton').CloseButtonSize;
@@ -17,8 +22,8 @@ export declare const Dialog: typeof DialogRoot & {
17
22
  ripple?: boolean;
18
23
  classNames?: import('../CloseButton').CloseButtonClassNames;
19
24
  } & import('react').RefAttributes<HTMLButtonElement>>;
20
- Body: typeof DialogBody;
21
- Footer: typeof DialogFooter;
25
+ Body: import('react').ForwardRefExoticComponent<import('./dialogTypes').DialogBodyProps & import('react').RefAttributes<HTMLDivElement>>;
26
+ Footer: import('react').ForwardRefExoticComponent<import('./dialogTypes').DialogFooterProps & import('react').RefAttributes<HTMLDivElement>>;
22
27
  };
23
28
  export type { DialogProps, DialogPanelProps, DialogTriggerProps, DialogVariant, DialogSize, DialogHeaderProps, DialogTitleProps, DialogDescriptionProps, DialogBodyProps, DialogFooterProps, DialogCloseProps, DialogContentProps, DialogHeadingBlockProps, DialogClassNames, } from './dialogTypes';
24
29
  export { DialogContent };
@@ -1,4 +1,4 @@
1
1
  import { DialogContextValue, UseDialogRootStateProps } from './dialogTypes';
2
- export declare function useDialogRootState({ open: openProp, defaultOpen, onOpenChange, size, }: UseDialogRootStateProps): {
2
+ export declare function useDialogRootState({ open: openProp, defaultOpen, onOpenChange, size, portalContainer, }: UseDialogRootStateProps): {
3
3
  contextValue: DialogContextValue;
4
4
  };
@@ -1,7 +1,7 @@
1
1
  import { DrawerBackdropInner, DrawerBody, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHandleInner, DrawerHeader, DrawerHeadingBlock, DrawerPanel, DrawerTitle, DrawerTrigger } from './drawerParts';
2
2
  import { DrawerProps } from './drawerTypes';
3
3
  export type { DrawerProps, DrawerPanelProps, DrawerTriggerProps, DrawerPlacement, DrawerExtent, DrawerVariant, DrawerClassNames, DrawerBackdropProps, DrawerHandleProps, DrawerHeaderProps, DrawerHeadingBlockProps, DrawerTitleProps, DrawerDescriptionProps, DrawerBodyProps, DrawerFooterProps, DrawerCloseProps, DrawerContentProps, } from './drawerTypes';
4
- export declare function DrawerRoot({ open, defaultOpen, onOpenChange, placement, children, classNames, }: DrawerProps): import("react/jsx-runtime").JSX.Element;
4
+ export declare function DrawerRoot({ open, defaultOpen, onOpenChange, placement, children, classNames, portalContainer, }: DrawerProps): import("react/jsx-runtime").JSX.Element;
5
5
  export declare namespace DrawerRoot {
6
6
  var displayName: string;
7
7
  }
@@ -1,6 +1,6 @@
1
1
  import { MouseEvent } from 'react';
2
2
  import { UseDrawerModalMotionProps } from './drawerTypes';
3
- export declare function useDrawerModalMotion({ open, onOpenChange, variant, placement, backdropIsDismissable, }: UseDrawerModalMotionProps): {
3
+ export declare function useDrawerModalMotion({ open, onOpenChange, variant, placement, backdropIsDismissable, contained, }: UseDrawerModalMotionProps): {
4
4
  showPortal: boolean;
5
5
  mounted: boolean;
6
6
  dialogRef: import('react').RefObject<HTMLDialogElement | null>;
@@ -1,20 +1,14 @@
1
- import { DrawerBackdropProps, DrawerBodyProps, DrawerContentProps, DrawerDescriptionProps, DrawerFooterProps, DrawerHandleProps, DrawerHeaderProps, DrawerHeadingBlockProps, DrawerPanelProps, DrawerPortalShellProps, DrawerTitleProps } from './drawerTypes';
1
+ import { DrawerBackdropProps, DrawerBodyProps, DrawerContentProps, DrawerDescriptionProps, DrawerFooterProps, DrawerHandleProps, DrawerHeaderProps, DrawerHeadingBlockProps, DrawerPortalShellProps, DrawerTitleProps, DrawerVariant } from './drawerTypes';
2
2
  export declare function DrawerBackdropInner(_props: DrawerBackdropProps): null;
3
3
  export declare namespace DrawerBackdropInner {
4
4
  var displayName: string;
5
5
  }
6
- export declare function DrawerContent({ className, ...rest }: DrawerContentProps): import("react/jsx-runtime").JSX.Element;
7
- export declare namespace DrawerContent {
8
- var displayName: string;
9
- }
6
+ export declare const DrawerContent: import('react').ForwardRefExoticComponent<DrawerContentProps & import('react').RefAttributes<HTMLDivElement>>;
10
7
  export declare function DrawerHandleInner({ className, onPointerDown, ...rest }: DrawerHandleProps): import("react/jsx-runtime").JSX.Element;
11
8
  export declare namespace DrawerHandleInner {
12
9
  var displayName: string;
13
10
  }
14
- export declare function DrawerHeader({ className, ...rest }: DrawerHeaderProps): import("react/jsx-runtime").JSX.Element;
15
- export declare namespace DrawerHeader {
16
- var displayName: string;
17
- }
11
+ export declare const DrawerHeader: import('react').ForwardRefExoticComponent<DrawerHeaderProps & import('react').RefAttributes<HTMLDivElement>>;
18
12
  export declare function DrawerHeadingBlock({ className, ...rest }: DrawerHeadingBlockProps): import("react/jsx-runtime").JSX.Element;
19
13
  export declare namespace DrawerHeadingBlock {
20
14
  var displayName: string;
@@ -31,20 +25,16 @@ export declare const DrawerClose: import('react').ForwardRefExoticComponent<Omit
31
25
  ripple?: boolean;
32
26
  classNames?: import('../CloseButton').CloseButtonClassNames;
33
27
  } & import('react').RefAttributes<HTMLButtonElement>>;
34
- export declare function DrawerBody({ className, ...rest }: DrawerBodyProps): import("react/jsx-runtime").JSX.Element;
35
- export declare namespace DrawerBody {
36
- var displayName: string;
37
- }
38
- export declare function DrawerFooter({ className, ...rest }: DrawerFooterProps): import("react/jsx-runtime").JSX.Element;
39
- export declare namespace DrawerFooter {
40
- var displayName: string;
41
- }
28
+ export declare const DrawerBody: import('react').ForwardRefExoticComponent<DrawerBodyProps & import('react').RefAttributes<HTMLDivElement>>;
29
+ export declare const DrawerFooter: import('react').ForwardRefExoticComponent<DrawerFooterProps & import('react').RefAttributes<HTMLDivElement>>;
42
30
  export declare const DrawerTrigger: import('react').ForwardRefExoticComponent<import('react').ButtonHTMLAttributes<HTMLButtonElement> & {
43
31
  asChild?: boolean;
44
32
  children?: import('react').ReactNode;
45
33
  } & import('react').RefAttributes<HTMLButtonElement>>;
46
- export declare function DrawerPanel({ extent, variant, className, themeAnchor, children, }: DrawerPanelProps): import('react').ReactPortal | null;
47
- export declare namespace DrawerPanel {
48
- var displayName: string;
49
- }
50
- export declare function DrawerPortalShell({ className, variant, placement, extent, portalTheme, lightUi, titleId, descriptionId, hasDescription, backdropIsDismissable, panelSegments, dialogRef, overlayRef, panelRef, bindGlossPanelRef, onBackdropMouseDown, onDialogClose, onDialogCancel, }: DrawerPortalShellProps): import("react/jsx-runtime").JSX.Element;
34
+ export declare const DrawerPanel: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & {
35
+ extent?: import('./drawerTypes').DrawerExtent;
36
+ variant?: DrawerVariant;
37
+ themeAnchor?: HTMLElement | null;
38
+ portalContainer?: HTMLElement | null;
39
+ } & import('react').RefAttributes<HTMLDivElement>>;
40
+ export declare function DrawerPortalShell({ className, style, variant, placement, extent, portalTheme, lightUi, titleId, descriptionId, hasDescription, backdropIsDismissable, panelSegments, dialogRef, overlayRef, panelRef, panelForwardedRef, panelRest, bindGlossPanelRef, onBackdropMouseDown, onDialogClose, onDialogCancel, contained, }: DrawerPortalShellProps): import("react/jsx-runtime").JSX.Element;
@@ -4,7 +4,10 @@ export declare const DRAWER_CONTENT_CLASS = "flex min-h-0 flex-1 flex-col gap-mi
4
4
  export declare const DRAWER_HEADER_PADDING = "px-mid pt-plus";
5
5
  export declare const DRAWER_BODY_PADDING = "px-mid py-base";
6
6
  export declare const DRAWER_FOOTER_PADDING = "px-mid pb-plus";
7
- export declare const DRAWER_NATIVE_CLASS = "fixed inset-0 z-[100] m-0 h-full w-full max-h-none max-w-none border-0 bg-transparent p-0 open:block [&::backdrop]:bg-transparent";
7
+ export declare const DRAWER_NATIVE_CLASS = "m-0 h-full w-full max-h-none max-w-none border-0 bg-transparent p-0 open:block [&::backdrop]:bg-transparent";
8
+ export declare const DRAWER_NATIVE_POSITION_FIXED_CLASS = "fixed inset-0 z-[100]";
9
+ export declare const DRAWER_NATIVE_POSITION_CONTAINED_CLASS = "absolute inset-0 z-[100]";
10
+ export declare function drawerNativeClass(contained: boolean): string;
8
11
  export declare const DRAWER_OVERLAY_LIGHT_CLASS = "bg-[color-mix(in_oklab,var(--color-foreground)_14%,transparent)] backdrop-blur-[14px] backdrop-saturate-150 motion-reduce:backdrop-blur-none";
9
12
  export declare const DRAWER_OVERLAY_DARK_CLASS = "bg-[color-mix(in_oklab,black_55%,transparent)]";
10
13
  export declare const DRAWER_PANEL_BASE_CLASS = "absolute z-10 flex flex-col outline-none overflow-hidden";
@@ -28,14 +28,16 @@ export type DrawerProps = {
28
28
  /** Slide direction (structural, used in context). */
29
29
  placement?: DrawerPlacement;
30
30
  children?: ReactNode;
31
+ /** DOM node for the portal. Default: `document.body`. */
32
+ portalContainer?: HTMLElement | null;
31
33
  classNames?: DrawerClassNames;
32
34
  };
33
- export type DrawerPanelProps = {
35
+ export type DrawerPanelProps = HTMLAttributes<HTMLDivElement> & {
34
36
  extent?: DrawerExtent;
35
37
  variant?: DrawerVariant;
36
- className?: string;
37
38
  themeAnchor?: HTMLElement | null;
38
- children?: ReactNode;
39
+ /** Overrides Root `portalContainer`. Default: `document.body`. */
40
+ portalContainer?: HTMLElement | null;
39
41
  };
40
42
  export type DrawerTriggerProps = ButtonHTMLAttributes<HTMLButtonElement> & {
41
43
  /** Render trigger as a child element (the child receives all trigger props). */
@@ -54,6 +56,8 @@ export type DrawerContextValue = {
54
56
  overlayRef: React.RefObject<HTMLDivElement | null>;
55
57
  panelRef: React.RefObject<HTMLDivElement | null>;
56
58
  skipCloseAnimRef: React.RefObject<boolean>;
59
+ /** Portal mount node from Root; Panel may override via its own prop. */
60
+ portalContainer?: HTMLElement | null;
57
61
  };
58
62
  export type DrawerClassNamesProviderProps = {
59
63
  classNames?: DrawerClassNames;
@@ -79,7 +83,7 @@ export type DrawerPanelSegment = {
79
83
  kind: "content";
80
84
  children: ReactNode[];
81
85
  };
82
- export type UseDrawerRootStateProps = Pick<DrawerProps, "open" | "defaultOpen" | "onOpenChange">;
86
+ export type UseDrawerRootStateProps = Pick<DrawerProps, "open" | "defaultOpen" | "onOpenChange" | "portalContainer">;
83
87
  export type UseDrawerPanelStateProps = {
84
88
  open: boolean;
85
89
  themeAnchor: HTMLElement | null | undefined;
@@ -91,9 +95,12 @@ export type UseDrawerModalMotionProps = {
91
95
  variant: DrawerVariant;
92
96
  placement: DrawerPlacement;
93
97
  backdropIsDismissable: boolean;
98
+ /** When true, open with `show()` + absolute positioning inside a custom portal host. */
99
+ contained?: boolean;
94
100
  };
95
101
  export type DrawerPortalShellProps = {
96
102
  className?: string;
103
+ style?: React.CSSProperties;
97
104
  variant: DrawerVariant;
98
105
  placement: DrawerPlacement;
99
106
  extent: DrawerExtent;
@@ -107,10 +114,14 @@ export type DrawerPortalShellProps = {
107
114
  dialogRef: React.RefObject<HTMLDialogElement | null>;
108
115
  overlayRef: React.RefObject<HTMLDivElement | null>;
109
116
  panelRef: React.RefObject<HTMLDivElement | null>;
117
+ panelForwardedRef?: React.ForwardedRef<HTMLDivElement>;
118
+ panelRest?: Omit<HTMLAttributes<HTMLDivElement>, "className" | "style" | "children" | "ref">;
110
119
  bindGlossPanelRef: (node: HTMLDivElement | null) => void;
111
120
  onBackdropMouseDown: (e: React.MouseEvent<HTMLDivElement>) => void;
112
121
  onDialogClose: () => void;
113
122
  onDialogCancel: (e: React.SyntheticEvent<HTMLDialogElement>) => void;
123
+ /** Custom portal host — use absolute positioning instead of fixed/top-layer. */
124
+ contained?: boolean;
114
125
  };
115
126
  export type DrawerTriggerInternalProps = {
116
127
  triggerRef: React.RefObject<HTMLElement | null>;
@@ -1,14 +1,19 @@
1
- import { DrawerBackdropInner, DrawerBody, DrawerContent, DrawerDescription, DrawerFooter, DrawerHandleInner, DrawerHeader, DrawerHeadingBlock, DrawerPanel, DrawerRoot } from './Drawer';
1
+ import { DrawerBackdropInner, DrawerDescription, DrawerHandleInner, DrawerHeadingBlock, DrawerRoot } from './Drawer';
2
2
  export declare const Drawer: typeof DrawerRoot & {
3
3
  Trigger: import('react').ForwardRefExoticComponent<import('react').ButtonHTMLAttributes<HTMLButtonElement> & {
4
4
  asChild?: boolean;
5
5
  children?: import('react').ReactNode;
6
6
  } & import('react').RefAttributes<HTMLButtonElement>>;
7
- Panel: typeof DrawerPanel;
7
+ Panel: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & {
8
+ extent?: import('./drawerTypes').DrawerExtent;
9
+ variant?: import('./drawerTypes').DrawerVariant;
10
+ themeAnchor?: HTMLElement | null;
11
+ portalContainer?: HTMLElement | null;
12
+ } & import('react').RefAttributes<HTMLDivElement>>;
8
13
  Backdrop: typeof DrawerBackdropInner;
9
14
  Handle: typeof DrawerHandleInner;
10
- Content: typeof DrawerContent;
11
- Header: typeof DrawerHeader;
15
+ Content: import('react').ForwardRefExoticComponent<import('./drawerTypes').DrawerContentProps & import('react').RefAttributes<HTMLDivElement>>;
16
+ Header: import('react').ForwardRefExoticComponent<import('./drawerTypes').DrawerHeaderProps & import('react').RefAttributes<HTMLDivElement>>;
12
17
  HeadingBlock: typeof DrawerHeadingBlock;
13
18
  Title: import('react').ForwardRefExoticComponent<import('./drawerTypes').DrawerTitleProps & import('react').RefAttributes<HTMLHeadingElement>>;
14
19
  Description: typeof DrawerDescription;
@@ -19,7 +24,7 @@ export declare const Drawer: typeof DrawerRoot & {
19
24
  ripple?: boolean;
20
25
  classNames?: import('../CloseButton').CloseButtonClassNames;
21
26
  } & import('react').RefAttributes<HTMLButtonElement>>;
22
- Body: typeof DrawerBody;
23
- Footer: typeof DrawerFooter;
27
+ Body: import('react').ForwardRefExoticComponent<import('./drawerTypes').DrawerBodyProps & import('react').RefAttributes<HTMLDivElement>>;
28
+ Footer: import('react').ForwardRefExoticComponent<import('./drawerTypes').DrawerFooterProps & import('react').RefAttributes<HTMLDivElement>>;
24
29
  };
25
30
  export type { DrawerProps, DrawerPanelProps, DrawerTriggerProps, DrawerPlacement, DrawerExtent, DrawerVariant, DrawerClassNames, DrawerBackdropProps, DrawerHandleProps, DrawerHeaderProps, DrawerHeadingBlockProps, DrawerTitleProps, DrawerDescriptionProps, DrawerBodyProps, DrawerFooterProps, DrawerCloseProps, DrawerContentProps, } from './drawerTypes';
@@ -1,5 +1,5 @@
1
1
  import { DrawerContextValue, DrawerPlacement, UseDrawerRootStateProps } from './drawerTypes';
2
- export declare function useDrawerRootState({ open: openProp, defaultOpen, onOpenChange, placement, }: UseDrawerRootStateProps & {
2
+ export declare function useDrawerRootState({ open: openProp, defaultOpen, onOpenChange, placement, portalContainer, }: UseDrawerRootStateProps & {
3
3
  placement?: DrawerPlacement;
4
4
  }): {
5
5
  contextValue: DrawerContextValue;
@@ -1,7 +1,7 @@
1
1
  import { DropdownGroup, DropdownItem, DropdownItemHint, DropdownItemIcon, DropdownItemIndicator, DropdownItemLabel, DropdownLabel, DropdownPopover, DropdownSeparator, DropdownSub, DropdownSubContent, DropdownSubTrigger, DropdownTrigger } from './dropdownParts';
2
2
  import { DropdownProps } from './dropdownTypes';
3
3
  export type { DropdownProps, DropdownClassNames, DropdownTriggerProps, DropdownPopoverProps, DropdownGroupProps, DropdownLabelProps, DropdownSeparatorProps, DropdownItemProps, DropdownItemLabelProps, DropdownItemHintProps, DropdownItemIconProps, DropdownItemIndicatorProps, DropdownItemStatus, DropdownSubProps, DropdownSubTriggerProps, DropdownSubContentProps, } from './dropdownTypes';
4
- export declare function DropdownRoot({ children, className, classNames, open, defaultOpen, onOpenChange, multiple, value, defaultValue, onValueChange, selectionIndicator, closeOnSelect, popoverVariant, ...rest }: DropdownProps): import("react/jsx-runtime").JSX.Element;
4
+ export declare function DropdownRoot({ children, className, classNames, open, defaultOpen, onOpenChange, multiple, value, defaultValue, onValueChange, selectionIndicator, closeOnSelect, popoverVariant, portalContainer, ...rest }: DropdownProps): import("react/jsx-runtime").JSX.Element;
5
5
  export declare namespace DropdownRoot {
6
6
  var displayName: string;
7
7
  }
@@ -1,6 +1,6 @@
1
1
  import { UseDropdownPopoverMenuProps, UseDropdownSubContentPortalProps } from './dropdownTypes';
2
2
  export declare function useDropdownPopoverMenu({ open, setOpen, triggerRef, contentRef, }: UseDropdownPopoverMenuProps): void;
3
- export declare function useDropdownSubContentPortal({ subOpen, triggerRef, menuTriggerRef, subPanelRootsRef, popoverVariant, }: UseDropdownSubContentPortalProps): {
3
+ export declare function useDropdownSubContentPortal({ subOpen, triggerRef, menuTriggerRef, subPanelRootsRef, popoverVariant, portalContainer, }: UseDropdownSubContentPortalProps): {
4
4
  isGlossPanel: boolean;
5
5
  panelRef: import('react').RefObject<HTMLDivElement | null>;
6
6
  pos: {
@@ -10,4 +10,5 @@ export declare function useDropdownSubContentPortal({ subOpen, triggerRef, menuT
10
10
  };
11
11
  portalMounted: boolean;
12
12
  menuTriggerRef: import('react').RefObject<HTMLElement | null>;
13
+ contained: boolean;
13
14
  };
@@ -1,22 +1,20 @@
1
- import { HTMLAttributes } from 'react';
2
1
  import { DROPDOWN_ROOT_CLASS } from './dropdownStyles';
3
- import { DropdownGroupProps, DropdownLabelProps, DropdownSeparatorProps } from './dropdownTypes';
4
- export declare const DropdownTrigger: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLElement> & {
2
+ import { DropdownLabelProps, DropdownSeparatorProps } from './dropdownTypes';
3
+ export declare const DropdownTrigger: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLElement> & {
5
4
  asChild?: boolean;
6
5
  } & import('react').RefAttributes<HTMLElement>>;
7
- export declare const DropdownPopover: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
6
+ export declare const DropdownPopover: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & {
8
7
  variant?: import('../Popover').PopoverVariant;
9
8
  bodyClassName?: string;
9
+ side?: import('../Popover').PopoverSide;
10
10
  align?: import('../Popover').FloatingAlign;
11
+ offset?: number;
12
+ portalContainer?: HTMLElement | null;
11
13
  } & import('react').RefAttributes<HTMLDivElement>>;
12
- export declare function DropdownGroup({ className, children, selectionIndicator, ...rest }: DropdownGroupProps): import("react/jsx-runtime").JSX.Element;
13
- export declare namespace DropdownGroup {
14
- var displayName: string;
15
- }
16
- export declare function DropdownLabel({ className, children, id: idProp, ...rest }: DropdownLabelProps): import("react/jsx-runtime").JSX.Element;
17
- export declare namespace DropdownLabel {
18
- var displayName: string;
19
- }
14
+ export declare const DropdownGroup: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & {
15
+ selectionIndicator?: boolean;
16
+ } & import('react').RefAttributes<HTMLDivElement>>;
17
+ export declare const DropdownLabel: import('react').ForwardRefExoticComponent<DropdownLabelProps & import('react').RefAttributes<HTMLDivElement>>;
20
18
  export declare function DropdownSeparator({ className, ...rest }: DropdownSeparatorProps): import("react/jsx-runtime").JSX.Element;
21
19
  export declare namespace DropdownSeparator {
22
20
  var displayName: string;
@@ -1,10 +1,10 @@
1
1
  import { HTMLAttributes } from 'react';
2
- import { DropdownSubContentProps, DropdownSubProps } from './dropdownTypes';
3
- export declare function DropdownSub({ className, children, ...rest }: DropdownSubProps): import("react/jsx-runtime").JSX.Element;
4
- export declare namespace DropdownSub {
5
- var displayName: string;
6
- }
2
+ import { DropdownSubProps } from './dropdownTypes';
3
+ export declare const DropdownSub: import('react').ForwardRefExoticComponent<DropdownSubProps & import('react').RefAttributes<HTMLDivElement>>;
7
4
  export declare const DropdownSubTrigger: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
8
5
  asChild?: boolean;
6
+ icon?: import('react').ReactNode;
7
+ } & import('react').RefAttributes<HTMLDivElement>>;
8
+ export declare const DropdownSubContent: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
9
+ portalContainer?: HTMLElement | null;
9
10
  } & import('react').RefAttributes<HTMLDivElement>>;
10
- export declare const DropdownSubContent: import('react').ForwardRefExoticComponent<DropdownSubContentProps & import('react').RefAttributes<HTMLDivElement>>;
@@ -1,5 +1,5 @@
1
1
  import { HTMLAttributes, ReactNode } from 'react';
2
- import { PopoverVariant } from '../Popover';
2
+ import { PopoverSide, PopoverVariant } from '../Popover';
3
3
  import { FloatingAlign } from '../Tooltip/tooltipPosition';
4
4
  import { SelectionIndicatorClassNames, SelectionIndicatorSize, SelectionIndicatorVariant } from '../SelectionIndicator';
5
5
  export type DropdownItemStatus = "default" | "danger" | "warning" | "info" | "success";
@@ -39,6 +39,8 @@ export type DropdownProps = Omit<HTMLAttributes<HTMLDivElement>, "children"> & {
39
39
  selectionIndicator?: boolean;
40
40
  closeOnSelect?: boolean;
41
41
  popoverVariant?: PopoverVariant;
42
+ /** DOM node for menu / submenu portals. Default: `document.body`. */
43
+ portalContainer?: HTMLElement | null;
42
44
  classNames?: DropdownClassNames;
43
45
  };
44
46
  export type DropdownContextValue = {
@@ -54,6 +56,8 @@ export type DropdownContextValue = {
54
56
  contentRef: React.RefObject<HTMLDivElement | null>;
55
57
  contentId: string;
56
58
  subPanelRootsRef: React.RefObject<Set<HTMLElement>>;
59
+ /** Portal mount node from Root; Popover / SubContent may override. */
60
+ portalContainer?: HTMLElement | null;
57
61
  };
58
62
  export type DropdownSubContextValue = {
59
63
  open: boolean;
@@ -72,8 +76,14 @@ export type DropdownTriggerProps = HTMLAttributes<HTMLElement> & {
72
76
  export type DropdownPopoverProps = HTMLAttributes<HTMLDivElement> & {
73
77
  variant?: PopoverVariant;
74
78
  bodyClassName?: string;
79
+ /** Preferred side relative to the trigger. Default: `bottom`. */
80
+ side?: PopoverSide;
75
81
  /** Panel alignment relative to trigger (passed to Popover). Default: `start` when matching width. */
76
82
  align?: FloatingAlign;
83
+ /** Distance from the trigger in px. Default: Popover default offset. */
84
+ offset?: number;
85
+ /** Overrides Root `portalContainer` for the main menu panel. */
86
+ portalContainer?: HTMLElement | null;
77
87
  };
78
88
  export type DropdownGroupProps = HTMLAttributes<HTMLDivElement> & {
79
89
  selectionIndicator?: boolean;
@@ -83,8 +93,13 @@ export type DropdownSeparatorProps = HTMLAttributes<HTMLDivElement>;
83
93
  export type DropdownSubProps = HTMLAttributes<HTMLDivElement>;
84
94
  export type DropdownSubTriggerProps = HTMLAttributes<HTMLDivElement> & {
85
95
  asChild?: boolean;
96
+ /** Replaces the default submenu chevron. Pass `null` to hide. */
97
+ icon?: ReactNode;
98
+ };
99
+ export type DropdownSubContentProps = HTMLAttributes<HTMLDivElement> & {
100
+ /** Overrides Root `portalContainer` for the submenu panel. */
101
+ portalContainer?: HTMLElement | null;
86
102
  };
87
- export type DropdownSubContentProps = HTMLAttributes<HTMLDivElement>;
88
103
  export type DropdownItemLabelProps = HTMLAttributes<HTMLSpanElement>;
89
104
  export type DropdownItemHintProps = HTMLAttributes<HTMLSpanElement>;
90
105
  export type DropdownItemIconProps = HTMLAttributes<HTMLSpanElement>;
@@ -103,7 +118,7 @@ export type DropdownItemProps = Omit<HTMLAttributes<HTMLElement>, "value"> & {
103
118
  selection?: boolean;
104
119
  status?: DropdownItemStatus;
105
120
  };
106
- export type UseDropdownRootStateProps = Pick<DropdownProps, "open" | "defaultOpen" | "onOpenChange" | "multiple" | "value" | "defaultValue" | "onValueChange" | "closeOnSelect" | "popoverVariant">;
121
+ export type UseDropdownRootStateProps = Pick<DropdownProps, "open" | "defaultOpen" | "onOpenChange" | "multiple" | "value" | "defaultValue" | "onValueChange" | "closeOnSelect" | "popoverVariant" | "portalContainer">;
107
122
  export type UseDropdownPopoverMenuProps = {
108
123
  open: boolean;
109
124
  setOpen: (next: boolean) => void;
@@ -111,6 +126,7 @@ export type UseDropdownPopoverMenuProps = {
111
126
  contentRef: React.RefObject<HTMLDivElement | null>;
112
127
  };
113
128
  export type UseDropdownSubContentPortalProps = {
129
+ portalContainer?: HTMLElement | null;
114
130
  subOpen: boolean;
115
131
  triggerRef: React.RefObject<HTMLDivElement | null>;
116
132
  menuTriggerRef: React.RefObject<HTMLElement | null>;