Skip to content

Commit cb6955a

Browse files
committed
ref(vueltip): prefix default keys with data-
1 parent bf29827 commit cb6955a

4 files changed

Lines changed: 22 additions & 17 deletions

File tree

.changeset/happy-streets-push.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@vingy/vueltip": patch
3+
---
4+
5+
Prefix default attributes with `data`

packages/vueltip/README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -139,17 +139,17 @@ See the demo app in [demo/](../../demo/).
139139

140140
The `vueltipPlugin` accepts the following options:
141141

142-
| Option | Type | Default | Description |
143-
| -------------------------- | -------------------------------- | --------------------- | ---------------------------------------------------------------------------------------------------------------------- |
144-
| `component` | `Component` | Required | The Vue component to render as the tooltip |
145-
| `showDelay` | `number` | `0` | Delay in milliseconds before the tooltip appears on hover |
146-
| `hideDelay` | `number` | `200` | Delay in milliseconds before the tooltip disappears when the cursor leaves |
147-
| `defaultPlacement` | `Placement` | `'top'` | Default tooltip placement: `'top'`, `'bottom'`, `'left'`, `'right'`, etc. |
148-
| `defaultTruncateDetection` | `'x' \| 'y' \| 'both' \| 'none'` | `'both'` | Direction(s) to check for text truncation (`'x'` for horizontal, `'y'` for vertical, `'both'`, or `'none'` to disable) |
149-
| `handleDialogModals` | `boolean` | `false` | Whether to handle tooltips within HTML `<dialog>` elements with the `open` attribute (modal dialogs) |
150-
| `placementAttribute` | `string` | `'vueltip-placement'` | HTML attribute name for tooltip placement overrides |
151-
| `keyAttribute` | `string` | `'vueltip-key'` | HTML attribute name for tooltip identification |
152-
| `truncateAttribute` | `string` | `'vueltip-truncate'` | HTML attribute name for truncate detection overrides |
142+
| Option | Type | Default | Description |
143+
| -------------------------- | -------------------------------- | -------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
144+
| `component` | `Component` | Required | The Vue component to render as the tooltip |
145+
| `showDelay` | `number` | `0` | Delay in milliseconds before the tooltip appears on hover |
146+
| `hideDelay` | `number` | `200` | Delay in milliseconds before the tooltip disappears when the cursor leaves |
147+
| `defaultPlacement` | `Placement` | `'top'` | Default tooltip placement: `'top'`, `'bottom'`, `'left'`, `'right'`, etc. |
148+
| `defaultTruncateDetection` | `'x' \| 'y' \| 'both' \| 'none'` | `'both'` | Direction(s) to check for text truncation (`'x'` for horizontal, `'y'` for vertical, `'both'`, or `'none'` to disable) |
149+
| `handleDialogModals` | `boolean` | `false` | Whether to handle tooltips within HTML `<dialog>` elements with the `open` attribute (modal dialogs) |
150+
| `placementAttribute` | `string` | `'data-vueltip-placement'` | HTML attribute name for tooltip placement overrides |
151+
| `keyAttribute` | `string` | `'data-vueltip-key'` | HTML attribute name for tooltip identification |
152+
| `truncateAttribute` | `string` | `'data-vueltip-truncate'` | HTML attribute name for truncate detection overrides |
153153

154154
### useVueltip Composable Options
155155

packages/vueltip/src/options.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import type { Options } from './types'
22

33
let options: Options = {
4-
placementAttribute: 'vueltip-placement',
5-
keyAttribute: 'vueltip-key',
6-
truncateAttribute: 'vueltip-truncate',
4+
placementAttribute: 'data-vueltip-placement',
5+
keyAttribute: 'data-vueltip-key',
6+
truncateAttribute: 'data-vueltip-truncate',
77
showDelay: 0,
88
hideDelay: 200,
99
handleDialogModals: false,

packages/vueltip/src/types.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ export type TooltipDirective = Directive<
2727
>
2828

2929
export type Options = {
30-
/** @default 'vueltip-placement' */
30+
/** @default 'data-vueltip-placement' */
3131
placementAttribute: string
32-
/** @default 'vueltip-key' */
32+
/** @default 'data-vueltip-key' */
3333
keyAttribute: string
34-
/** @default 'vueltip-truncate' */
34+
/** @default 'data-vueltip-truncate' */
3535
truncateAttribute: string
3636
/** @default 0 */
3737
showDelay: number

0 commit comments

Comments
 (0)