feat(v11): TooltipDefinition

In v11 the definintion tooltip uses the `Popover` component internally. While the component is called `DefinitionTooltip` in the reference implementation, it is not renamed at this point.

- rename `tooltipText` to `definition`
- rename `tooltip` slot to `definition`
- remove `direction` (see `align`)
- use `align` values from `Popover` and set to `bottom-left` as default instead of `center`
This commit is contained in:
Gregor Wassmann 2023-09-30 12:45:10 +02:00
commit 3350a412da
6 changed files with 61 additions and 92 deletions

View file

@ -8,22 +8,21 @@
bind:open
on:open
on:close
tooltipText="IBM Corporate Headquarters is based in Armonk, New York."
definition="IBM Corporate Headquarters is based in Armonk, New York."
>
Armonk
</TooltipDefinition>
<TooltipDefinition
direction="top"
align="start"
tooltipText="IBM Corporate Headquarters is based in Armonk, New York."
align="top"
definition="IBM Corporate Headquarters is based in Armonk, New York."
>
Armonk
</TooltipDefinition>
<TooltipDefinition>
Armonk
<span slot="tooltip" style="color: red">
<span slot="definition" style="color: red">
IBM Corporate Headquarters is based in Armonk, New York.
</span>
</TooltipDefinition>