| Age | Commit message (Collapse) | Author |
|
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
|
|
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.
|
|
The input number, select, and string now have method Set to set the
current value.
|
|
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.
|
|
A label on input can be a string or another HTMLElement.
|
|
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.
|