-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathhex-input.ts
27 lines (24 loc) · 850 Bytes
/
hex-input.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import { HexInputBase } from './lib/entrypoints/hex-input.js';
/**
* A custom element for entering color in HEX format.
*
* @element hex-input
*
* @prop {string} color - Color in HEX format.
* @attr {string} color - Selected color in HEX format.
* @prop {boolean} alpha - When true, `#rgba` and `#rrggbbaa` color formats are allowed.
* @attr {boolean} alpha - Allows `#rgba` and `#rrggbbaa` color formats.
* @prop {boolean} prefixed - When true, `#` prefix is displayed in the input.
* @attr {boolean} prefixed - Enables `#` prefix displaying.
*
* @fires color-changed - Event fired when color is changed.
*
* @csspart input - A native input element.
*/
export class HexInput extends HexInputBase {}
customElements.define('hex-input', HexInput);
declare global {
interface HTMLElementTagNameMap {
'hex-input': HexInput;
}
}