|!multi ? null : []|If not in multi-mode (default): the current selected value or null if no value is selected Else: the list of currently selected values|
|label|string|""|Label of this component|
|className|string\|undefined|undefined|A string containing any additional classes to apply to the component|
|style|string\|undefined|undefined|A string specifying custom style properties for the component|
|textIfNoResult|string|""|Text to show when the applied filter doesn't return any result|
|textIfInvalid|string|""|Text to show when the field is required but no value has been chosen|
|disabled|boolean|false|Control whether the component is disabled or not|
|tooltip|string\|undefined|undefined|UIkit tooltip|
|placeholder|string\|undefined|undefined|Input placeholder|
|optional|boolean|false||
|ref|HTMLDivElement|undefined|Reference to the div that wraps this component|
|autocapitalize|string\|undefined|undefined|Autocapitalize setting of the input tag|
|autocomplete|string\|undefined|"off"|Autocomplete setting of the input tag|
|autocorrect|string\|undefined|undefined|Autocorrect setting of the input tag|
|spellcheck|string\|undefined|undefined||
|animationDuration|number|100|In/Out fly animation duration (in milliseconds)|
|state|'initial'\|'valid'\|'invalid'|"initial"||
|query|string|""|The current search string|
|selectedOptions|Array.<{label: string, value: any}>|[]|Currently selected options|
|requiredMarker|string\|undefined|undefined||
|optionalMarker|string\|undefined|undefined||
Checkbox
$3
|name|type|default|description|
|--|--|--|--|
|id|string|generateId()||
|label|string|""||
|style|string\|undefined|undefined|A string specifying custom style properties for the component|
|className|string\|undefined|undefined||
|name|string\|undefined|undefined||
|textIfInvalid|string\|undefined|undefined||
|textIfValid|string\|undefined|undefined||
|helperText|string\|undefined|undefined||
|optional|boolean|false||
|value|boolean|-||
|ref|HTMLInputElement|undefined||
|disabled|boolean|false||
|tooltip|string\|undefined|undefined||
|requiredMarker|string\|undefined|undefined||
|optionalMarker|string\|undefined|undefined||
|state|'initial'\|'valid'\|'invalid'|"initial"||
DatePicker
$3
|name|type|default|description|
|--|--|--|--|
|id|string|generateId()||
|label|string|""||
|style|string\|undefined|undefined|A string specifying custom style properties for the component|
|className|string\|undefined|undefined||
|name|string\|undefined|undefined||
|textIfInvalid|string\|undefined|undefined||
|textIfValid|string\|undefined|undefined||
|helperText|string\|undefined|undefined||
|placeholder|string|""||
|optional|boolean|false||
|value|string|-||
|ref|HTMLInputElement|undefined||
|disabled|boolean|false||
|tooltip|string\|undefined|undefined||
|min|string\|undefined|undefined||
|max|string\|undefined|undefined||
|autocapitalize|string\|undefined|undefined||
|autocomplete|string\|undefined|undefined||
|autocorrect|string\|undefined|undefined||
|spellcheck|string\|undefined|undefined||
|requiredMarker|string\|undefined|undefined||
|optionalMarker|string\|undefined|undefined||
|state|'initial'\|'valid'\|'invalid'|"initial"||
EmailInput
$3
|name|type|default|description|
|--|--|--|--|
|id|string|generateId()||
|label|string|""||
|style|string\|undefined|undefined|A string specifying custom style properties for the component|
|className|string\|undefined|undefined||
|name|string\|undefined|undefined||
|textIfInvalid|string\|undefined|undefined||
|textIfValid|string\|undefined|undefined||
|helperText|string\|undefined|undefined||
|placeholder|string|""||
|optional|boolean|false||
|value|string|-||
|ref|HTMLInputElement|undefined||
|disabled|boolean|false||
|tooltip|string\|undefined|undefined||
|autocapitalize|string\|undefined|'off'||
|autocomplete|string\|undefined|undefined||
|autocorrect|string\|undefined|'off'||
|spellcheck|string\|undefined|'off'||
|requiredMarker|string\|undefined|undefined||
|optionalMarker|string\|undefined|undefined||
|state|'initial'\|'valid'\|'invalid'|"initial"||
Field
$3
|name|type|default|description|
|--|--|--|--|
|style|string\|undefined|undefined|A string specifying custom style properties for the component|
|state|'initial'\|'valid'\|'invalid'|"initial"||
|requiredMarker|string\|undefined|undefined||
|optionalMarker|string\|undefined|undefined||
FixedPointInput
$3
|name|type|default|description|
|--|--|--|--|
|id|string|generateId()||
|decimalPlaces|number|2||
|inhibitDecimalSeparatorKey|boolean|false||
|label|string|""||
|style|string\|undefined|undefined|A string specifying custom style properties for the component|
|className|string\|undefined|undefined||
|textIfInvalid|string\|undefined|undefined||
|textIfValid|string\|undefined|undefined||
|helperText|string\|undefined|undefined||
|optional|boolean|false||
|value|string|-||
|min|string\|number|undefined||
|max|string\|number|undefined||
|ref|HTMLInputElement|undefined||
|disabled|boolean|false||
|tooltip|string\|undefined|undefined||
|icon|string\|undefined|undefined||
|iconPosition|'left'\|'right'|"left"||
|state|'initial'\|'valid'\|'invalid'|"initial"||
MonthPicker
$3
|name|type|default|description|
|--|--|--|--|
|id|string|generateId()||
|label|string|""||
|style|string\|undefined|undefined|A string specifying custom style properties for the component|
|className|string\|undefined|undefined||
|name|string\|undefined|undefined||
|textIfInvalid|string\|undefined|undefined||
|textIfValid|string\|undefined|undefined||
|helperText|string\|undefined|undefined||
|placeholder|string|""||
|optional|boolean|false||
|value|string|-||
|ref|HTMLInputElement|undefined||
|disabled|boolean|false||
|tooltip|string\|undefined|undefined||
|autocapitalize|string\|undefined|undefined||
|autocomplete|string\|undefined|undefined||
|autocorrect|string\|undefined|undefined||
|spellcheck|string\|undefined|undefined||
|requiredMarker|string\|undefined|undefined||
|optionalMarker|string\|undefined|undefined||
|state|'initial'\|'valid'\|'invalid'|"initial"||
NumberInput
$3
|name|type|default|description|
|--|--|--|--|
|id|string|generateId()||
|label|string|""||
|style|string\|undefined|undefined|A string specifying custom style properties for the component|
|className|string\|undefined|undefined||
|name|string\|undefined|undefined||
|textIfInvalid|string\|undefined|undefined||
|textIfValid|string\|undefined|undefined||
|helperText|string\|undefined|undefined||
|placeholder|string|""||
|optional|boolean|false||
|value|string|-||
|ref|HTMLInputElement|undefined||
|min|number\|string|undefined||
|max|number\|string|undefined||
|step|number\|string|undefined||
|disabled|boolean|false||
|tooltip|string\|undefined|undefined||
|icon|string\|undefined|undefined||
|iconPosition|'left'\|'right'|"left"||
|autocapitalize|string\|undefined|undefined||
|autocomplete|string\|undefined|undefined||
|autocorrect|string\|undefined|undefined||
|spellcheck|string\|undefined|undefined||
|requiredMarker|string\|undefined|undefined||
|optionalMarker|string\|undefined|undefined||
|state|'initial'\|'valid'\|'invalid'|"initial"||
PasswordInput
$3
|name|type|default|description|
|--|--|--|--|
|id|string|generateId()||
|label|string|""||
|style|string\|undefined|undefined|A string specifying custom style properties for the component|
|className|string\|undefined|undefined||
|name|string\|undefined|undefined||
|textIfInvalid|string\|undefined|undefined||
|textIfValid|string\|undefined|undefined||
|helperText|string\|undefined|undefined||
|placeholder|string|""||
|optional|boolean|false||
|value|string|-||
|ref|HTMLInputElement|undefined||
|disabled|boolean|false||
|tooltip|string\|undefined|undefined||
|autocapitalize|string\|undefined|"off"||
|autocomplete|string\|undefined|undefined||
|autocorrect|string\|undefined|"off"||
|spellcheck|string\|undefined|"off"||
|minlength|number\|undefined|undefined||
|maxlength|string\|undefined|undefined||
|requiredMarker|string\|undefined|undefined||
|optionalMarker|string\|undefined|undefined||
|state|'initial'\|'valid'\|'invalid'|"initial"||
PasswordInputAlt
$3
|name|type|default|description|
|--|--|--|--|
|id|string|generateId()||
|label|string|""||
|style|string\|undefined|undefined|A string specifying custom style properties for the component|
|className|string\|undefined|undefined||
|name|string\|undefined|undefined||
|textIfInvalid|string\|undefined|undefined||
|textIfValid|string\|undefined|undefined||
|helperText|string\|undefined|undefined||
|placeholder|string|""||
|optional|boolean|false||
|value|string|-||
|ref|HTMLInputElement|undefined||
|disabled|boolean|false||
|tooltip|string\|undefined|undefined||
|autocapitalize|string\|undefined|"off"||
|autocomplete|string\|undefined|undefined||
|autocorrect|string\|undefined|"off"||
|spellcheck|string\|undefined|"off"||
|minlength|number\|undefined|undefined||
|maxlength|string\|undefined|undefined||
|requiredMarker|string\|undefined|undefined||
|optionalMarker|string\|undefined|undefined||
|state|'initial'\|'valid'\|'invalid'|"initial"||
PercentageInput
$3
|name|type|default|description|
|--|--|--|--|
|style|string\|undefined|undefined|A string specifying custom style properties for the component|
|autocapitalize|string\|undefined|undefined||
|autocomplete|string\|undefined|undefined||
|autocorrect|string\|undefined|undefined||
|spellcheck|string\|undefined|undefined||
Radio
$3
|name|type|default|description|
|--|--|--|--|
|id|string|generateId()||
|label|string\|undefined|undefined||
|name|string\|undefined|undefined||
|value|any\|undefined|undefined||
|options|Array.<{value: any, label: string, disabled: (boolean\|undefined)}>|[]||
|disabled|boolean|false||
|optional|boolean|false||
|tooltip|string\|undefined|undefined||
|ref|HTMLDivElement|undefined||
|size|undefined\|'small'\|'large'|undefined||
|className|string\|undefined|undefined||
|variant|'primary'\|'secondary'\|'danger'|"primary"|This property is used to style the button corresponding to the selected value with one of the base uikit classes for button appearance|
|style|string\|undefined|undefined|A string specifying custom style properties for the component|
|requiredMarker|string\|undefined|undefined||
|optionalMarker|string\|undefined|undefined||
SearchInput
$3
|name|type|default|description|
|--|--|--|--|
|id|string|generateId()||
|label|string|""||
|style|string\|undefined|undefined|A string specifying custom style properties for the component|
|className|string\|undefined|undefined||
|name|string\|undefined|undefined||
|textIfInvalid|string\|undefined|undefined||
|textIfValid|string\|undefined|undefined||
|helperText|string\|undefined|undefined||
|placeholder|string|""||
|optional|boolean|false||
|value|string|-||
|ref|HTMLInputElement|undefined||
|disabled|boolean|false||
|tooltip|string\|undefined|undefined||
|icon|string\|undefined|undefined||
|iconPosition|'left'\|'right'|"left"||
|inputmode|string\|undefined|undefined||
|pattern|string\|undefined|undefined||
|autocapitalize|string\|undefined|undefined||
|autocomplete|string\|undefined|undefined||
|autocorrect|string\|undefined|undefined||
|spellcheck|string\|undefined|undefined||
|minlength|number\|undefined|undefined||
|maxlength|string\|undefined|undefined||
|requiredMarker|string\|undefined|undefined||
|optionalMarker|string\|undefined|undefined||
|state|'initial'\|'valid'\|'invalid'|"initial"||
Select
$3
|name|type|default|description|
|--|--|--|--|
|id|string|generateId()||
|label|string|""||
|style|string\|undefined|undefined|A string specifying custom style properties for the component|
|className|string\|undefined|undefined||
|textIfInvalid|string\|undefined|undefined||
|textIfValid|string\|undefined|undefined||
|helperText|string\|undefined|undefined||
|placeholder|string|""||
|optional|boolean|false||
|value|any|-|Current value of the select. Setting it to undefined sets the selected index to 0, choosing the first option, whether it's disabled, the placeholder, or a valid option|
|options|Array.<{label: string, value: any, disabled: (boolean\|undefined)}>|[]||
|ref|HTMLSelectElement|undefined||
|disabled|boolean|false||
|tooltip|string\|undefined|undefined||
|requiredMarker|string\|undefined|undefined||
|optionalMarker|string\|undefined|undefined||
|state|'initial'\|'valid'\|'invalid'|"initial"||
TelInput
$3
|name|type|default|description|
|--|--|--|--|
|id|string|generateId()||
|label|string|""||
|style|string\|undefined|undefined|A string specifying custom style properties for the component|
|className|string\|undefined|undefined||
|name|string\|undefined|undefined||
|textIfInvalid|string\|undefined|undefined||
|textIfValid|string\|undefined|undefined||
|helperText|string\|undefined|undefined||
|placeholder|string|""||
|optional|boolean|false||
|value|string|-||
|ref|HTMLInputElement|undefined||
|disabled|boolean|false||
|tooltip|string\|undefined|undefined||
|autocapitalize|string\|undefined|undefined||
|autocomplete|string\|undefined|undefined||
|autocorrect|string\|undefined|undefined||
|spellcheck|string\|undefined|undefined||
|minlength|number\|undefined|undefined||
|maxlength|string\|undefined|undefined||
|requiredMarker|string\|undefined|undefined||
|optionalMarker|string\|undefined|undefined||
|state|'initial'\|'valid'\|'invalid'|"initial"||
TextInput
$3
|name|type|default|description|
|--|--|--|--|
|id|string|generateId()||
|label|string|""||
|style|string\|undefined|undefined|A string specifying custom style properties for the component|
|className|string\|undefined|undefined||
|name|string\|undefined|undefined||
|textIfInvalid|string\|undefined|undefined||
|textIfValid|string\|undefined|undefined||
|helperText|string\|undefined|undefined||
|placeholder|string|""||
|optional|boolean|false||
|value|string|-||
|ref|HTMLInputElement|undefined||
|disabled|boolean|false||
|tooltip|string\|undefined|undefined||
|icon|string\|undefined|undefined||
|iconPosition|'left'\|'right'|"left"||
|inputmode|string\|undefined|undefined||
|pattern|string\|undefined|undefined||
|autocapitalize|string\|undefined|undefined||
|autocomplete|string\|undefined|undefined||
|autocorrect|string\|undefined|undefined||
|spellcheck|string\|undefined|undefined||
|minlength|number\|undefined|undefined||
|maxlength|string\|undefined|undefined||
|requiredMarker|string\|undefined|undefined||
|optionalMarker|string\|undefined|undefined||
|state|'initial'\|'valid'\|'invalid'|"initial"||
Textarea
$3
|name|type|default|description|
|--|--|--|--|
|id|string|generateId()||
|label|string|""||
|name|string\|undefined|undefined||
|style|string\|undefined|undefined|A string specifying custom style properties for the component|
|className|string\|undefined|undefined||
|textIfInvalid|string\|undefined|undefined||
|textIfValid|string\|undefined|undefined||
|helperText|string\|undefined|undefined||
|placeholder|string|""||
|optional|boolean|false||
|value|string|-||
|ref|HTMLTextAreaElement|undefined||
|rows|number|5||
|disabled|boolean|false||
|tooltip|string\|undefined|undefined||
|autocapitalize|string\|undefined|undefined||
|autocomplete|string\|undefined|undefined||
|autocorrect|string\|undefined|undefined||
|spellcheck|string\|undefined|undefined||
|minlength|number\|undefined|undefined||
|maxlength|string\|undefined|undefined||
|requiredMarker|string\|undefined|undefined||
|optionalMarker|string\|undefined|undefined||
|state|'initial'\|'valid'\|'invalid'|"initial"||
TimePicker
$3
|name|type|default|description|
|--|--|--|--|
|id|string|generateId()||
|label|string|""||
|style|string\|undefined|undefined|A string specifying custom style properties for the component|
|className|string\|undefined|undefined||
|name|string\|undefined|undefined||
|textIfInvalid|string\|undefined|undefined||
|textIfValid|string\|undefined|undefined||
|helperText|string\|undefined|undefined||
|placeholder|string|""||
|optional|boolean|false||
|value|string|-||
|ref|HTMLInputElement|undefined||
|disabled|boolean|false||
|tooltip|string\|undefined|undefined||
|autocapitalize|string\|undefined|undefined||
|autocomplete|string\|undefined|undefined||
|autocorrect|string\|undefined|undefined||
|spellcheck|string\|undefined|undefined||
|requiredMarker|string\|undefined|undefined||
|optionalMarker|string\|undefined|undefined||
|state|'initial'\|'valid'\|'invalid'|"initial"||
WeekPicker
$3
|name|type|default|description|
|--|--|--|--|
|id|string|generateId()||
|label|string|""||
|style|string\|undefined|undefined|A string specifying custom style properties for the component|
|className|string\|undefined|undefined||
|name|string\|undefined|undefined||
|textIfInvalid|string\|undefined|undefined||
|textIfValid|string\|undefined|undefined||
|helperText|string\|undefined|undefined||
|placeholder|string|""||
|optional|boolean|false||
|value|string|-||
|ref|HTMLInputElement|undefined||
|disabled|boolean|false||
|tooltip|string\|undefined|undefined||
|autocapitalize|string\|undefined|undefined||
|autocomplete|string\|undefined|undefined||
|autocorrect|string\|undefined|undefined||
|spellcheck|string\|undefined|undefined||
|requiredMarker|string\|undefined|undefined||
|optionalMarker|string\|undefined|undefined||
|state|'initial'\|'valid'\|'invalid'|"initial"||
Special Types
`typescript
/**
* Compares two values
*/
export type Comparator = (v1: any, v2: any) => number;
/**
* Returns a Promise that will contain an array of options (label + value) given a query string
*/
export type AsyncAutocompleteDataProvider = (query: string) => Promise>;
/**
* Returns a Promise that will contain an object describing the result given a query string
*/
export type AsyncDataTableDataProvider =
(query: string, orderBy: Array<{ key: string, direction: 'asc' | 'desc' }>, recordsPerPage: number, pageIndex: number) => Promise;
export interface AsyncDataTableDataProviderResult {
/* (optional) the number of available records /
total: number|undefined,
/* the number of records, filtered by the given query. This is used to create the pagination buttons of the table /
filtered: number,
/* the chunk of records to display /
records: Array>
}
/**
* Given the column value and its current row object, this function returns a representation of that cell
*/
export type DataTableRenderer = (value: any, row: Record) => string | DataTableRenderWithComponent
export interface DataTableRenderWithComponent {
/* The Svelte component that will render the cell /
component: SvelteComponent,
/* Props passed to the Svelte component /
props: Record | undefined,
/* An "on:click" handler. Note that this handler will stop the propagation of the click event to the entire row /
onClick: (e) => any,
/* The text content that will be passed to the default slot of the Svelte component /
textContent: string | undefined
}
/**
* Given the current query, the column value and the entire row that column is part of, returns a boolean indicating
* whether or not the current row should be displayed
*/
export type DataTableSearchCallback = (query: string, columnValue: any, row: Record) => boolean;
/**
* Once called, returns a Promise. While waiting for the Promise to settle (either by resolving or rejecting) the form will show a loading state
*/
export type FormSubmitCallback = () => Promise;
``