@neovici/cosmoz-input 3.1.0 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,6 +2,7 @@ export interface BaseInput extends HTMLElement {
2
2
  value?: string | number;
3
3
  maxRows?: number;
4
4
  focused?: boolean;
5
+ disabled?: boolean;
5
6
  }
6
7
  export declare const useInput: <T extends BaseInput>(host: T) => {
7
8
  onChange: (e: Event) => boolean;
package/dist/use-input.js CHANGED
@@ -12,6 +12,7 @@ export const useInput = (host) => {
12
12
  useEffect(() => {
13
13
  const onMouseDown = (e) => {
14
14
  if (e.defaultPrevented ||
15
+ host.disabled ||
15
16
  e.target.matches('input, textarea, label')) {
16
17
  return;
17
18
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neovici/cosmoz-input",
3
- "version": "3.1.0",
3
+ "version": "3.2.0",
4
4
  "description": "A input web component",
5
5
  "keywords": [
6
6
  "lit-html",