aboutsummaryrefslogtreecommitdiff
path: root/input
AgeCommit message (Collapse)Author
2024-09-15all: commit all generate JavaScript filesShulhan
This is to simplify development on third party where they can clone and include the file directly without installing or running anything to build the files.
2024-02-05input: implement component for inputing fileShulhan
2023-11-11input: use lower case for method name SetShulhan
2023-10-24all: fix all linter warnings from tsc and eslintShulhan
In this changes we introduce eslint as our linter for TypeScript and update our tsconfig to be more strict. The ".eslintrc.yaml" and "tsconfig.json" is taken from golang/website repository [1]. [1]: https://cs.opensource.google/go/x/website
2023-10-24all: reformat all filesShulhan
I cannot remember how I reformat those files previously, probably without any tools. This changes reformat the TypeScript files using prettier and HTML files using js-beautify.
2022-03-15all: re-licensing wui under GPL 3.0 or laterShulhan
See https://kilabit.info/journal/2022/gpl/ for more information.
2021-09-19input: remove background color on hint elementShulhan
It is up to the user on how to set the background color of any elements, not the library.
2021-09-19input: add option "is_hint_toggled"Shulhan
If the "is_hint_toggled" is true, the hint text will be displayed by default on first render, instead of hidden. While at it, add 2px to the top margin of the hint element to make it separatable from the input element.
2021-09-19input: display the new value on changes inside the exampleShulhan
Instead of printing the new value using console.log, display it as text below the example.
2021-09-19input: allow floating value on WuiInputNumberShulhan
While at it, set the input number "step" option to "any".
2021-09-18input: add method to set the input valueShulhan
The input number, select, and string now have method Set to set the current value.
2021-09-11input: add options to add custom CSS class to label and inputShulhan
The input options for string, number, and select now have two additional options: "class_label" and "class_input". The "class_label" option will add custom CSS class to the input label. The "class_input" option will add custom CSS class to the input group.
2021-09-11input: allow label to be HTMLElement instead of only stringShulhan
A label on input can be a string or another HTMLElement.
2021-09-05input: implement input for checkboxesShulhan
The WuiInputCheckboxes class can create an HTML input for selecting one or more item using checkbox. The class require the following options: label, name, and options; and optionally id, hint, is_disabled, and onChangeHandler. The onChangeHandler receive all checked values.
2021-09-05input: implement class for input with selectShulhan
The WuiInputSelect create an HTML input for selecting one more item.
2021-09-05input: implement class WuiInputStringShulhan
The WuiInputString create an HTML input for string with predefined options. The required options are "label" and "value".
2021-09-05input: implement class for input numberShulhan
The WuiInputNumber create an HTML input that allow number only, with optional max and min options. The required options is "label" and "value". Format of generated HTML output, <div [id=${id}] class="${WUI_INPUT_NUMBER_CLASS}"> <div> <label class="${WUI_INPUT_NUMBER_CLASS_LABEL}">${label}</label> <input class="${WUI_INPUT_NUMBER_CLASS_INPUT}" [max=${max}] [min=${min}] [disabled=${is_disabled}] value=${value} > <span class="${WUI_INPUT_NUMBER_CLASS_HINT_TOGGLER}">i </span> </div> <div class="${WUI_INPUT_NUMBER_CLASS_HINT}">${hint}</div> </div> User can set onChangeHandler to receive new value when the value changes and valid; otherwise, if the value is invalid, the input background will changes accordingly.