1 line
13 KiB
JavaScript
1 line
13 KiB
JavaScript
import{_ as t,c as e,o,N as a}from"./chunks/framework.0799945b.js";const g=JSON.parse('{"title":"Module: features/tooltips/tooltip","description":"","frontmatter":{"editLink":false},"headers":[],"relativePath":"api/modules/features/tooltip.md","lastUpdated":null}'),l={name:"api/modules/features/tooltip.md"},d=a('<h1 id="module-features-tooltips-tooltip" tabindex="-1">Module: features/tooltips/tooltip <a class="header-anchor" href="#module-features-tooltips-tooltip" aria-label="Permalink to "Module: features/tooltips/tooltip""></a></h1><h2 id="interfaces" tabindex="-1">Interfaces <a class="header-anchor" href="#interfaces" aria-label="Permalink to "Interfaces""></a></h2><h3 id="basetooltip" tabindex="-1">BaseTooltip <a class="header-anchor" href="#basetooltip" aria-label="Permalink to "BaseTooltip""></a></h3><p>• <strong>BaseTooltip</strong>: <code>Object</code></p><p>The properties that are added onto a processed <a href="./tooltip#tooltipoptions">TooltipOptions</a> to create an <a href="./tooltip#tooltip">Tooltip</a>.</p><table><thead><tr><th style="text-align:left;">Name</th><th style="text-align:left;">Type</th></tr></thead><tbody><tr><td style="text-align:left;"><code>pinned?</code></td><td style="text-align:left;"><code>Ref</code><<code>boolean</code>></td></tr></tbody></table><h4 id="defined-in" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in" aria-label="Permalink to "Defined in""></a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/c386ace/src/features/tooltips/tooltip.ts#L47" target="_blank" rel="noreferrer">profectus/src/features/tooltips/tooltip.ts:47</a></p><hr><h3 id="tooltipoptions" tabindex="-1">TooltipOptions <a class="header-anchor" href="#tooltipoptions" aria-label="Permalink to "TooltipOptions""></a></h3><p>• <strong>TooltipOptions</strong>: <code>Object</code></p><p>An object that configures a <a href="./tooltip#tooltip">Tooltip</a>.</p><table><thead><tr><th style="text-align:left;">Name</th><th style="text-align:left;">Type</th><th style="text-align:left;">Description</th></tr></thead><tbody><tr><td style="text-align:left;"><code>classes?</code></td><td style="text-align:left;"><a href="./../util/computed#computable"><code>Computable</code></a><<a href="https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type" target="_blank" rel="noreferrer"><code>Record</code></a><<code>string</code>, <code>boolean</code>>></td><td style="text-align:left;">Dictionary of CSS classes to apply to this feature.</td></tr><tr><td style="text-align:left;"><code>direction?</code></td><td style="text-align:left;"><a href="./../util/computed#computable"><code>Computable</code></a><<a href="./../util/common#direction"><code>Direction</code></a>></td><td style="text-align:left;">The direction in which to display the tooltip</td></tr><tr><td style="text-align:left;"><code>display</code></td><td style="text-align:left;"><a href="./../util/computed#computable"><code>Computable</code></a><<a href="./feature#coercablecomponent"><code>CoercableComponent</code></a>></td><td style="text-align:left;">The text to display inside the tooltip.</td></tr><tr><td style="text-align:left;"><code>pinnable?</code></td><td style="text-align:left;"><code>boolean</code></td><td style="text-align:left;">Whether or not this tooltip can be pinned, meaning it'll stay visible even when not hovered.</td></tr><tr><td style="text-align:left;"><code>style?</code></td><td style="text-align:left;"><a href="./../util/computed#computable"><code>Computable</code></a><<a href="./feature#stylevalue"><code>StyleValue</code></a>></td><td style="text-align:left;">CSS to apply to this feature.</td></tr><tr><td style="text-align:left;"><code>xoffset?</code></td><td style="text-align:left;"><a href="./../util/computed#computable"><code>Computable</code></a><<code>string</code>></td><td style="text-align:left;">The x offset of the tooltip, in px.</td></tr><tr><td style="text-align:left;"><code>yoffset?</code></td><td style="text-align:left;"><a href="./../util/computed#computable"><code>Computable</code></a><<code>string</code>></td><td style="text-align:left;">The y offset of the tooltip, in px.</td></tr></tbody></table><h4 id="defined-in-1" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-1" aria-label="Permalink to "Defined in""></a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/c386ace/src/features/tooltips/tooltip.ts#L27" target="_blank" rel="noreferrer">profectus/src/features/tooltips/tooltip.ts:27</a></p><h2 id="type-aliases" tabindex="-1">Type Aliases <a class="header-anchor" href="#type-aliases" aria-label="Permalink to "Type Aliases""></a></h2><h3 id="generictooltip" tabindex="-1">GenericTooltip <a class="header-anchor" href="#generictooltip" aria-label="Permalink to "GenericTooltip""></a></h3><p>Ƭ <strong>GenericTooltip</strong>: <a href="./feature#replace"><code>Replace</code></a><<a href="./tooltip#tooltip"><code>Tooltip</code></a><<a href="./tooltip#tooltipoptions"><code>TooltipOptions</code></a>>, { <code>direction</code>: <a href="./../util/computed#processedcomputable"><code>ProcessedComputable</code></a><<a href="./../util/common#direction"><code>Direction</code></a>> ; <code>pinnable</code>: <code>boolean</code> ; <code>pinned</code>: <code>Ref</code><<code>boolean</code>> | <code>undefined</code> }></p><p>A type that matches any valid <a href="./tooltip#tooltip">Tooltip</a> object.</p><h4 id="defined-in-2" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-2" aria-label="Permalink to "Defined in""></a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/c386ace/src/features/tooltips/tooltip.ts#L67" target="_blank" rel="noreferrer">profectus/src/features/tooltips/tooltip.ts:67</a></p><hr><h3 id="tooltip" tabindex="-1">Tooltip <a class="header-anchor" href="#tooltip" aria-label="Permalink to "Tooltip""></a></h3><p>Ƭ <strong>Tooltip</strong><<code>T</code>>: <a href="./feature#replace"><code>Replace</code></a><<code>T</code> & <a href="./tooltip#basetooltip"><code>BaseTooltip</code></a>, { <code>classes</code>: <a href="./../util/computed#getcomputabletype"><code>GetComputableType</code></a><<code>T</code>[<code>"classes"</code>]> ; <code>direction</code>: <a href="./../util/computed#getcomputabletypewithdefault"><code>GetComputableTypeWithDefault</code></a><<code>T</code>[<code>"direction"</code>], <a href="./../util/common#up"><code>Up</code></a>> ; <code>display</code>: <a href="./../util/computed#getcomputabletype"><code>GetComputableType</code></a><<code>T</code>[<code>"display"</code>]> ; <code>pinnable</code>: <code>T</code>[<code>"pinnable"</code>] extends <code>undefined</code> ? <code>false</code> : <code>T</code>[<code>"pinnable"</code>] ; <code>pinned</code>: <code>T</code>[<code>"pinnable"</code>] extends <code>true</code> ? <code>Ref</code><<code>boolean</code>> : <code>undefined</code> ; <code>style</code>: <a href="./../util/computed#getcomputabletype"><code>GetComputableType</code></a><<code>T</code>[<code>"style"</code>]> ; <code>xoffset</code>: <a href="./../util/computed#getcomputabletype"><code>GetComputableType</code></a><<code>T</code>[<code>"xoffset"</code>]> ; <code>yoffset</code>: <a href="./../util/computed#getcomputabletype"><code>GetComputableType</code></a><<code>T</code>[<code>"yoffset"</code>]> }></p><p>An object that represents a tooltip that appears when hovering over an element.</p><h4 id="type-parameters" tabindex="-1">Type parameters <a class="header-anchor" href="#type-parameters" aria-label="Permalink to "Type parameters""></a></h4><table><thead><tr><th style="text-align:left;">Name</th><th style="text-align:left;">Type</th></tr></thead><tbody><tr><td style="text-align:left;"><code>T</code></td><td style="text-align:left;">extends <a href="./tooltip#tooltipoptions"><code>TooltipOptions</code></a></td></tr></tbody></table><h4 id="defined-in-3" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-3" aria-label="Permalink to "Defined in""></a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/c386ace/src/features/tooltips/tooltip.ts#L52" target="_blank" rel="noreferrer">profectus/src/features/tooltips/tooltip.ts:52</a></p><h2 id="functions" tabindex="-1">Functions <a class="header-anchor" href="#functions" aria-label="Permalink to "Functions""></a></h2><h3 id="addtooltip" tabindex="-1">addTooltip <a class="header-anchor" href="#addtooltip" aria-label="Permalink to "addTooltip""></a></h3><p>▸ <strong>addTooltip</strong><<code>T</code>>(<code>element</code>, <code>options</code>): <a href="./tooltip#tooltip"><code>Tooltip</code></a><<code>T</code>></p><p>Creates a tooltip on the given element with the given options.</p><h5 id="type-parameters-1" tabindex="-1">Type parameters <a class="header-anchor" href="#type-parameters-1" aria-label="Permalink to "Type parameters""></a></h5><table><thead><tr><th style="text-align:left;">Name</th><th style="text-align:left;">Type</th></tr></thead><tbody><tr><td style="text-align:left;"><code>T</code></td><td style="text-align:left;">extends <a href="./tooltip#tooltipoptions"><code>TooltipOptions</code></a></td></tr></tbody></table><h5 id="parameters" tabindex="-1">Parameters <a class="header-anchor" href="#parameters" aria-label="Permalink to "Parameters""></a></h5><table><thead><tr><th style="text-align:left;">Name</th><th style="text-align:left;">Type</th><th style="text-align:left;">Description</th></tr></thead><tbody><tr><td style="text-align:left;"><code>element</code></td><td style="text-align:left;"><a href="./../util/vue#vuefeature"><code>VueFeature</code></a></td><td style="text-align:left;">The renderable feature to display the tooltip on.</td></tr><tr><td style="text-align:left;"><code>options</code></td><td style="text-align:left;"><code>T</code> & <a href="https://www.typescriptlang.org/docs/handbook/utility-types.html#thistypetype" target="_blank" rel="noreferrer"><code>ThisType</code></a><<a href="./tooltip#tooltip"><code>Tooltip</code></a><<code>T</code>>> & <a href="https://www.typescriptlang.org/docs/handbook/utility-types.html#partialtype" target="_blank" rel="noreferrer"><code>Partial</code></a><<a href="./tooltip#basetooltip"><code>BaseTooltip</code></a>></td><td style="text-align:left;">Tooltip options.</td></tr></tbody></table><h5 id="returns" tabindex="-1">Returns <a class="header-anchor" href="#returns" aria-label="Permalink to "Returns""></a></h5><p><a href="./tooltip#tooltip"><code>Tooltip</code></a><<code>T</code>></p><h4 id="defined-in-4" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-4" aria-label="Permalink to "Defined in""></a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/c386ace/src/features/tooltips/tooltip.ts#L81" target="_blank" rel="noreferrer">profectus/src/features/tooltips/tooltip.ts:81</a></p><h2 id="components" tabindex="-1">Components <a class="header-anchor" href="#components" aria-label="Permalink to "Components""></a></h2><h3 id="tooltip-component" tabindex="-1">Tooltip Component <a class="header-anchor" href="#tooltip-component" aria-label="Permalink to "Tooltip Component""></a></h3><h4 id="props" tabindex="-1">Props <a class="header-anchor" href="#props" aria-label="Permalink to "Props""></a></h4><table><thead><tr><th style="text-align:left;">Name</th><th style="text-align:left;">Type</th></tr></thead><tbody><tr><td style="text-align:left;"><code>element</code></td><td style="text-align:left;"><code>VueFeature</code></td></tr><tr><td style="text-align:left;"><code>display</code>*</td><td style="text-align:left;"><code>processedPropType<CoercableComponent>(Object, String, Function)</code></td></tr><tr><td style="text-align:left;"><code>style</code></td><td style="text-align:left;"><code>processedPropType<StyleValue>(Object, String, Array)</code></td></tr><tr><td style="text-align:left;"><code>classes</code></td><td style="text-align:left;"><code>processedPropType<Record<string, boolean>>(Object)</code></td></tr><tr><td style="text-align:left;"><code>direction</code></td><td style="text-align:left;"><code>processedPropType<Direction>(String)</code></td></tr><tr><td style="text-align:left;"><code>xoffset</code></td><td style="text-align:left;"><code>processedPropType<string>(String)</code></td></tr><tr><td style="text-align:left;"><code>yoffset</code></td><td style="text-align:left;"><code>processedPropType<string>(String)</code></td></tr><tr><td style="text-align:left;"><code>pinned</code></td><td style="text-align:left;"><code>Persistent<boolean></code></td></tr></tbody></table><h4 id="slots" tabindex="-1">Slots <a class="header-anchor" href="#slots" aria-label="Permalink to "Slots""></a></h4><table><thead><tr><th style="text-align:left;">Name</th></tr></thead><tbody><tr><td style="text-align:left;"><code>default</code></td></tr></tbody></table>',47),i=[d];function r(c,n,s,p,h,f){return o(),e("div",null,i)}const b=t(l,[["render",r]]);export{g as __pageData,b as default};
|