refactor: update/fix JSDoc props

This commit is contained in:
Eric Liu 2020-11-04 06:04:25 -08:00
commit d38e6d8be6
204 changed files with 992 additions and 2359 deletions

View file

@ -1,19 +1,19 @@
<script>
/**
* Set the direction of the tooltip relative to the button
* @type {"top" | "right" | "bottom" | "left"} [direction="bottom"]
* @type {"top" | "right" | "bottom" | "left"}
*/
export let direction = "bottom";
/**
* Set to `true` to open the tooltip
* @type {boolean} [open=false]
* @type {boolean}
*/
export let open = false;
/**
* Set to `true` to hide the tooltip icon
* @type {boolean} [hideIcon=false]
* @type {boolean}
*/
export let hideIcon = false;
@ -24,57 +24,45 @@
*/
export let icon = Information16;
/**
* Specify the ARIA label for the tooltip button
* @type {string} [iconDescription=""]
*/
/** Specify the ARIA label for the tooltip button */
export let iconDescription = "";
/**
* Specify the icon name attribute
* @type {string} [iconName=""]
*/
/** Specify the icon name attribute */
export let iconName = "";
/**
* Set the button tabindex
* @type {string} [tabindex="0"]
*/
/** Set the button tabindex */
export let tabindex = "0";
/**
* Set an id for the tooltip
* @type {string} [tooltipId]
* @type {string}
*/
export let tooltipId = "ccs-" + Math.random().toString(36);
/**
* Set an id for the tooltip button
* @type {string} [triggerId]
* @type {string}
*/
export let triggerId = "ccs-" + Math.random().toString(36);
/**
* Set the tooltip button text
* @type {string} [triggerText=""]
*/
/** Set the tooltip button text */
export let triggerText = "";
/**
* Obtain a reference to the trigger text HTML element
* @type {null | HTMLElement} [ref=null]
* @type {null | HTMLElement}
*/
export let ref = null;
/**
* Obtain a reference to the tooltip HTML element
* @type {null | HTMLElement} [ref=null]
* @type {null | HTMLElement}
*/
export let refTooltip = null;
/**
* Obtain a reference to the icon HTML element
* @type {null | HTMLElement} [ref=null]
* @type {null | HTMLElement}
*/
export let refIcon = null;
@ -83,7 +71,7 @@
const dispatch = createEventDispatcher();
$: programmatic = true;
let programmatic = true;
function onKeydown(e) {
if (e.key === "Escape") {