@emporix/component-library 1.8.0 → 1.8.1
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 +17 -17
- package/dist/index.es.js +191 -191
- package/dist/index.umd.js +10 -10
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -256,24 +256,24 @@ import { Tooltip } from '@emporix/component-library'
|
|
|
256
256
|
|
|
257
257
|
#### Props
|
|
258
258
|
|
|
259
|
-
| Prop | Type
|
|
260
|
-
| -------------- |
|
|
261
|
-
| target | string
|
|
262
|
-
| content | ReactNode
|
|
259
|
+
| Prop | Type | Default | Description |
|
|
260
|
+
| -------------- | ------------------------------------------------- | ------- | --------------------------------------------------------------------------- |
|
|
261
|
+
| target | string | - | CSS selector for anchor elements; when set, `children` is ignored |
|
|
262
|
+
| content | ReactNode | - | Tooltip body; required for children mode; fallback for selector mode |
|
|
263
263
|
| position | `top` \| `bottom` \| `left` \| `right` \| `mouse` | `top` | Placement; `mouse` follows the pointer |
|
|
264
|
-
| event | `hover` \| `focus` \| `both` | `hover` | How the tooltip is triggered
|
|
265
|
-
| showDelay | number
|
|
266
|
-
| hideDelay | number
|
|
267
|
-
| autoHide | boolean
|
|
268
|
-
| mouseTrack | boolean
|
|
269
|
-
| mouseTrackTop | number
|
|
270
|
-
| mouseTrackLeft | number
|
|
271
|
-
| disabled | boolean
|
|
272
|
-
| className | string
|
|
273
|
-
| panelClassName | string
|
|
274
|
-
| id | string
|
|
275
|
-
| children | ReactNode
|
|
276
|
-
| data-testid | string
|
|
264
|
+
| event | `hover` \| `focus` \| `both` | `hover` | How the tooltip is triggered |
|
|
265
|
+
| showDelay | number | `0` | Delay before show (ms) |
|
|
266
|
+
| hideDelay | number | `0` | Delay before hide (ms) |
|
|
267
|
+
| autoHide | boolean | `true` | When `false`, pointer can move to the tooltip without hiding it |
|
|
268
|
+
| mouseTrack | boolean | `false` | While visible, position tracks the pointer |
|
|
269
|
+
| mouseTrackTop | number | `0` | Vertical offset when using mouse track |
|
|
270
|
+
| mouseTrackLeft | number | `0` | Horizontal offset when using mouse track |
|
|
271
|
+
| disabled | boolean | `false` | Disable the tooltip |
|
|
272
|
+
| className | string | - | Extra class on the anchor wrapper (children mode) or merged on single child |
|
|
273
|
+
| panelClassName | string | - | Extra class on the floating panel |
|
|
274
|
+
| id | string | - | Optional id for the tooltip (`aria-describedby` on the anchor) |
|
|
275
|
+
| children | ReactNode | - | Single element recommended; multiple nodes are wrapped in an inline span |
|
|
276
|
+
| data-testid | string | - | Adds `data-testid` on the panel as `{id}-panel` |
|
|
277
277
|
|
|
278
278
|
Selector targets can override position per element with `data-pr-position`. Escape closes the tooltip.
|
|
279
279
|
|