@@ -63,44 +63,59 @@ npm start
6363
6464### Trigger
6565
66- | Prop | Description | Type | Default |
67- | -------------------- | ------------------------------------------------------------------------- | -------------------------------------------------------- | ----------- |
68- | action | Actions that control popup visibility. | ` Array<'hover' \| 'click' \| 'focus' \| 'contextMenu'> ` | ` ['hover'] ` |
69- | alignPoint | Align popup to mouse position for click, hover, and context menu actions. | ` boolean ` | ` false ` |
70- | autoDestroy | Destroy popup DOM when it is hidden. | ` boolean ` | ` false ` |
71- | builtinPlacements | Named placement presets. | ` BuildInPlacements ` | - |
72- | defaultPopupVisible | Initial uncontrolled visibility. | ` boolean ` | ` false ` |
73- | destroyPopupOnHide | Destroy popup when it hides. | ` boolean ` | ` false ` |
74- | forceRender | Render popup before it is first shown. | ` boolean ` | ` false ` |
75- | getPopupContainer | Return the element that should contain the popup. | ` () => HTMLElement ` | - |
76- | mask | Render a mask behind the popup. | ` boolean ` | ` false ` |
77- | maskClosable | Close when clicking the mask. | ` boolean ` | ` true ` |
78- | popup | Popup content. | ` ReactNode ` \| ` () => ReactNode ` | - |
79- | popupAlign | Alignment config compatible with dom-align. | ` AlignType ` | - |
80- | popupClassName | Class name added to popup. | ` string ` | - |
81- | popupPlacement | Placement key from ` builtinPlacements ` . | ` string ` | - |
82- | popupRender | Customize popup node before render. | ` (node) => ReactNode ` | - |
83- | popupStyle | Inline popup style. | ` React.CSSProperties ` | - |
84- | popupVisible | Controlled popup visibility. | ` boolean ` | - |
85- | stretch | Stretch popup width and/or height from target. | ` 'width' ` \| ` 'minWidth' ` \| ` 'height' ` \| ` 'minHeight' ` | - |
86- | zIndex | Popup z-index. | ` number ` | - |
87- | onPopupAlign | Called when the popup is aligned. | ` (element, align) => void ` | - |
88- | onPopupVisibleChange | Called when visibility changes. | ` (visible) => void ` | - |
66+ | Prop | Description | Type | Default |
67+ | -------------------------- | ------------------------------------------------------------------------- | ----------------------------------------- | ------------------ |
68+ | action | Actions that control popup visibility. | ` ActionType ` \| ` ActionType[] ` | ` hover ` |
69+ | afterOpenChange | Called after popup visibility changes. | ` (visible) => void ` | - |
70+ | afterPopupVisibleChange | Deprecated. Use ` afterOpenChange ` instead. | ` (visible) => void ` | - |
71+ | alignPoint | Align popup to mouse position for click, hover, and context menu actions. | ` boolean ` | ` false ` |
72+ | arrow | Render popup arrow. | ` boolean ` \| ` ArrowType ` | - |
73+ | autoDestroy | Destroy popup DOM when it is hidden. | ` boolean ` | ` false ` |
74+ | blurDelay | Delay before hiding on blur, in seconds. | ` number ` | - |
75+ | builtinPlacements | Named placement presets. | ` BuildInPlacements ` | ` {} ` |
76+ | defaultPopupVisible | Initial uncontrolled visibility. | ` boolean ` | ` false ` |
77+ | focusDelay | Delay before showing on focus, in seconds. | ` number ` | - |
78+ | forceRender | Render popup before it is first shown. | ` boolean ` | ` false ` |
79+ | fresh | Keep popup content updated while closed. | ` boolean ` | - |
80+ | getPopupClassNameFromAlign | Return a popup class name from the current alignment. | ` (align) => string ` | - |
81+ | getPopupContainer | Return the element that should contain the popup. | ` (node) => HTMLElement ` | - |
82+ | hideAction | Actions that hide popup visibility. | ` ActionType[] ` | - |
83+ | mask | Render a mask behind the popup. | ` boolean ` | ` false ` |
84+ | maskClosable | Close when clicking the mask. | ` boolean ` | ` true ` |
85+ | maskMotion | Motion config for the mask. | ` CSSMotionProps ` | - |
86+ | mouseEnterDelay | Delay before showing on mouse enter, in seconds. | ` number ` | - |
87+ | mouseLeaveDelay | Delay before hiding on mouse leave, in seconds. | ` number ` | ` 0.1 ` |
88+ | popup | Popup content. | ` ReactNode ` \| ` () => ReactNode ` | - |
89+ | popupAlign | Alignment config compatible with dom-align. | ` AlignType ` | - |
90+ | popupClassName | Class name added to popup. | ` string ` | - |
91+ | popupMotion | Motion config for the popup. | ` CSSMotionProps ` | - |
92+ | popupPlacement | Placement key from ` builtinPlacements ` . | ` string ` | - |
93+ | popupStyle | Inline popup style. | ` React.CSSProperties ` | - |
94+ | popupVisible | Controlled popup visibility. | ` boolean ` | - |
95+ | prefixCls | Popup class name prefix. | ` string ` | ` rc-trigger-popup ` |
96+ | showAction | Actions that show popup visibility. | ` ActionType[] ` | - |
97+ | stretch | Stretch popup width and/or height from target. | ` string ` | - |
98+ | unique | Share popup container through ` UniqueProvider ` . | ` boolean ` | - |
99+ | uniqueContainerClassName | Class name passed to ` UniqueProvider ` container. | ` string ` | - |
100+ | uniqueContainerStyle | Style passed to ` UniqueProvider ` container. | ` React.CSSProperties ` | - |
101+ | zIndex | Popup z-index. | ` number ` | - |
102+ | onOpenChange | Called when visibility changes. | ` (visible) => void ` | - |
103+ | onPopupAlign | Called when the popup is aligned. | ` (element, align) => void ` | - |
104+ | onPopupClick | Called when popup is clicked. | ` React.MouseEventHandler<HTMLDivElement> ` | - |
105+ | onPopupVisibleChange | Deprecated. Use ` onOpenChange ` instead. | ` (visible) => void ` | - |
89106
90107## Development
91108
92109``` bash
93110npm install
94111npm start
95112npm test
96- npm run tsc
97- npm run compile
98113npm run build
99114```
100115
101116## Release
102117
103- The release flow is handled by ` @ rc-component/ np` from the ` prepublishOnly ` script :
118+ The ` prepublishOnly ` script runs ` npm run compile ` and then ` rc-np ` from ` @rc-component/np ` :
104119
105120``` bash
106121npm publish
0 commit comments