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,61 +1,50 @@
<script>
/**
* @dispatch {string} change
*/
/**
* Specify the date picker type
* @type {"simple" | "single" | "range"} [datePickerType="simple"]
* @type {"simple" | "single" | "range"}
*/
export let datePickerType = "simple";
/**
* Specify the date picker input value
* @type {string} [value=""]
*/
/** Specify the date picker input value */
export let value = "";
/**
* Specify the element to append the calendar to
* @type {HTMLElement} [appendTo=document.body]
* @type {HTMLElement}
*/
export let appendTo = document.body;
/**
* Specify the date format
* @type {string} [dateFormat="m/d/Y"]
*/
/** Specify the date format */
export let dateFormat = "m/d/Y";
/**
* Specify the maximum date
* @type {null | string | Date} [maxDate=null]
* @type {null | string | Date}
*/
export let maxDate = null;
/**
* Specify the minimum date
* @type {null | string | Date} [minDate=null]
* @type {null | string | Date}
*/
export let minDate = null;
/**
* Specify the locale
* @type {string} [locale="en"]
*/
/** Specify the locale */
export let locale = "en";
/**
* Set to `true` to use the short variant
* @type {boolean} [short=false]
*/
/** Set to `true` to use the short variant */
export let short = false;
/**
* Set to `true` to enable the light variant
* @type {boolean} [light=false]
*/
/** Set to `true` to enable the light variant */
export let light = false;
/**
* Set an id for the date picker element
* @type {string} [id]
* @type {string}
*/
export let id = "ccs-" + Math.random().toString(36);

View file

@ -1,79 +1,52 @@
<script>
/**
* Set the size of the input
* @type {"sm" | "xl"} [size]
* @type {"sm" | "xl"}
*/
export let size = undefined;
/**
* Specify the input type
* @type {string} [type="text"]
*/
/** Specify the input type */
export let type = "text";
/**
* Specify the input placeholder text
* @type {string} [placeholder=""]
*/
/** Specify the input placeholder text */
export let placeholder = "";
/**
* Specify the Regular Expression for the input value
* @type {string} [placeholder="\\d{1,2}\\/\\d{1,2}\\/\\d{4}"]
*/
/** Specify the Regular Expression for the input value */
export let pattern = "\\d{1,2}\\/\\d{1,2}\\/\\d{4}";
/**
* Set to `true` to disable the input
* @type {boolean} [disabled=false]
*/
/** Set to `true` to disable the input */
export let disabled = false;
/**
* Specify the ARIA label for the calendar icon
* @type {string} [iconDescription=""]
*/
/** Specify the ARIA label for the calendar icon */
export let iconDescription = "";
/**
* Set an id for the input element
* @type {string} [id]
* @type {string}
*/
export let id = "ccs-" + Math.random().toString(36);
/**
* Specify the label text
* @type {string} [labelText=""]
*/
/** Specify the label text */
export let labelText = "";
/**
* Set to `true` to visually hide the label text
* @type {boolean} [hideLabel=false]
*/
/** Set to `true` to visually hide the label text */
export let hideLabel = false;
/**
* Set to `true` to indicate an invalid state
* @type {boolean} [invalid=false]
*/
/** Set to `true` to indicate an invalid state */
export let invalid = false;
/**
* Specify the invalid state text
* @type {string} [invalidText=""]
*/
/** Specify the invalid state text */
export let invalidText = "";
/**
* Set a name for the input element
* @type {string} [name=""]
* @type {string}
*/
export let name = undefined;
/**
* Obtain a reference to the input HTML element
* @type {null | HTMLInputElement} [ref=null]
* @type {null | HTMLInputElement}
*/
export let ref = null;

View file

@ -1,13 +1,10 @@
<script>
/**
* Set to `true` to use the range variant
* @type {boolean} [range=false]
*/
/** Set to `true` to use the range variant */
export let range = false;
/**
* Set an id to be used by the label element
* @type {string} [id]
* @type {string}
*/
export let id = "ccs-" + Math.random().toString(36);
</script>

View file

@ -1,3 +1,3 @@
export { default as DatePicker } from "./DatePicker.svelte";
export { default as DatePickerInput } from "./DatePickerInput.svelte";
export { default as DatePickerSkeleton } from "./DatePicker.Skeleton.svelte";
export { default as DatePickerSkeleton } from "./DatePickerSkeleton.svelte";