diff options
| author | Shulhan <ms@kilabit.info> | 2021-09-05 18:36:22 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2021-09-05 18:36:42 +0700 |
| commit | b18cd3529299e03f5c14d9bf702f28c3f7acb4d0 (patch) | |
| tree | ae58dab7fb4277216307de3fd870c35e3e37617b /input/select.d.ts | |
| parent | 2df99a87e652db2c82383b59307b6016ae2ba4f4 (diff) | |
| download | pakakeh.ts-b18cd3529299e03f5c14d9bf702f28c3f7acb4d0.tar.xz | |
input: implement class for input with select
The WuiInputSelect create an HTML input for selecting one more item.
Diffstat (limited to 'input/select.d.ts')
| -rw-r--r-- | input/select.d.ts | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/input/select.d.ts b/input/select.d.ts new file mode 100644 index 0000000..6a568f3 --- /dev/null +++ b/input/select.d.ts @@ -0,0 +1,33 @@ +import { WuiInputOption } from "./option.js"; +export interface WuiKeyValue { + [key: string]: string; +} +export interface WuiKeySelectOption { + [key: string]: WuiInputOption; +} +export interface WuiInputSelectOpts { + label: string; + name: string; + options: WuiKeySelectOption; + id?: string; + hint?: string; + is_disabled?: boolean; + onChangeHandler?: (key: string, value: string) => void; +} +export declare class WuiInputSelect { + opts: WuiInputSelectOpts; + el: HTMLElement; + private el_label; + private el_input; + private el_hint; + private el_hint_toggler; + private value_key; + private value; + constructor(opts: WuiInputSelectOpts); + private generateLabel; + private generateInput; + private generateHintToggler; + private generateHint; + private onClickHintToggler; + private onClickInput; +} |
