{#if $tooltip.kind === 'popup'}
closeTooltip()} on:keydown|stopPropagation|preventDefault={() => {}} /> {/if}
{ if ($tooltip.kind !== 'popup') { hideTooltip() } }} on:mousemove={(ev) => { whileShow(ev) }} on:keydown={(evt) => { if (($tooltip.component || $tooltip.label) && evt.key === 'Escape' && $tooltip.kind !== 'popup') { evt.preventDefault() evt.stopImmediatePropagation() hideTooltip() } }} /> {#if $tooltip.component && $tooltip.kind !== 'submenu'}
{ clWidth = element.clientWidth options = fitTooltip(tooltipHTML, clWidth) }} style:top={options.top} style:bottom={options.bottom} style:left={options.left} style:right={options.right} style:width={options.width} style:height={options.height} style:transform={options.transform} bind:this={tooltipHTML} > {#if $tooltip.label}
{/if} {#if typeof $tooltip.component === 'string'}
{}} /> {:else}
{ $tooltip = { ...$tooltip, ...evt.detail } }} on:update={onUpdate !== undefined ? onUpdate : async () => {}} /> {/if}
{:else if $tooltip.label && $tooltip.kind !== 'submenu'}
{#if $tooltip.keys !== undefined}
{#each $tooltip.keys as key, i} {#if i !== 0}
/
{/if} {#each formatKey(key) as k, jj}
{#each k as kk, j} {#if j !== 0} + {/if} {capitalizeFirstLetter(kk.trim())} {/each}
{/each} {/each}
{/if}
{:else if $tooltip.kind === 'submenu'}
{ clWidth = element.clientWidth }} style:top={options.top} style:bottom={options.bottom} style:left={options.left} style:right={options.right} style:width={options.width} style:height={options.height} style:transform={options.transform} bind:this={tooltipHTML} > {#if typeof $tooltip.component === 'string'}
{}} /> {:else}
{}} /> {/if}
{/if}