@umbraco-ui/uui-boolean-input
Advanced tools
Comparing version 1.7.0 to 1.8.0-rc.0
@@ -1,2 +0,2 @@ | ||
import { FormControlMixin, LabelMixin } from '@umbraco-ui/uui-base/lib/mixins'; | ||
import { UUIFormControlMixin, LabelMixin } from '@umbraco-ui/uui-base/lib/mixins'; | ||
import { LitElement, html, css } from 'lit'; | ||
@@ -27,7 +27,9 @@ import { property, query } from 'lit/decorators.js'; | ||
}; | ||
class UUIBooleanInputElement extends FormControlMixin( | ||
LabelMixin("", LitElement) | ||
class UUIBooleanInputElement extends UUIFormControlMixin( | ||
LabelMixin("", LitElement), | ||
"" | ||
) { | ||
constructor(inputRole = "checkbox") { | ||
super(); | ||
this._value = ""; | ||
this.labelPosition = "right"; | ||
@@ -47,3 +49,3 @@ this._checked = false; | ||
set value(newVal) { | ||
const oldValue = this._value; | ||
const oldValue = super.value; | ||
this._value = newVal; | ||
@@ -106,6 +108,8 @@ if ("ElementInternals" in window && //@ts-ignore | ||
*/ | ||
focus() { | ||
async focus() { | ||
await this.updateComplete; | ||
this._input.focus(); | ||
} | ||
click() { | ||
async click() { | ||
await this.updateComplete; | ||
this._input.click(); | ||
@@ -112,0 +116,0 @@ } |
import { LitElement, TemplateResult } from 'lit'; | ||
type LabelPosition = 'left' | 'right' | 'top' | 'bottom'; | ||
declare const UUIBooleanInputElement_base: (new (...args: any[]) => import("@umbraco-ui/uui-base/lib/mixins").FormControlMixinInterface) & (new (...args: any[]) => import("@umbraco-ui/uui-base/lib/mixins").LabelMixinInterface) & typeof LitElement; | ||
declare const UUIBooleanInputElement_base: (new (...args: any[]) => import("@umbraco-ui/uui-base/lib/mixins").UUIFormControlMixinInterface<FormDataEntryValue | FormData, string>) & (new (...args: any[]) => import("@umbraco-ui/uui-base/lib/mixins").LabelMixinInterface) & typeof LitElement; | ||
/** | ||
@@ -11,2 +11,3 @@ * Base class wrapping native input type="checkbox". Extend for custom boolean input. | ||
export declare abstract class UUIBooleanInputElement extends UUIBooleanInputElement_base { | ||
private _value; | ||
/** intentional overwrite of FormControlMixins value getter and setter method. */ | ||
@@ -42,3 +43,3 @@ get value(): string; | ||
constructor(inputRole?: 'checkbox' | 'switch'); | ||
protected getFormElement(): HTMLElement; | ||
protected getFormElement(): HTMLInputElement; | ||
private _onKeypress; | ||
@@ -51,4 +52,4 @@ hasValue(): boolean; | ||
*/ | ||
focus(): void; | ||
click(): void; | ||
focus(): Promise<void>; | ||
click(): Promise<void>; | ||
private _onInputChange; | ||
@@ -55,0 +56,0 @@ /** |
{ | ||
"name": "@umbraco-ui/uui-boolean-input", | ||
"version": "1.7.0", | ||
"version": "1.8.0-rc.0", | ||
"license": "MIT", | ||
@@ -33,3 +33,3 @@ "keywords": [ | ||
"dependencies": { | ||
"@umbraco-ui/uui-base": "1.7.0" | ||
"@umbraco-ui/uui-base": "1.8.0-rc.0" | ||
}, | ||
@@ -45,3 +45,3 @@ "scripts": { | ||
"homepage": "https://uui.umbraco.com/?path=/story/uui-boolean-input", | ||
"gitHead": "1f139dc2b4ed9ba7b9fb1af5e934589d7c4d8f06" | ||
"gitHead": "46d444c66217c9a3c74518d8ce4badc7f121bfdf" | ||
} |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
11199
255
1
+ Added@umbraco-ui/uui-base@1.8.0-rc.0(transitive)
- Removed@umbraco-ui/uui-base@1.7.0(transitive)