Socket
Socket
Sign inDemoInstall

@vaadin/field-base

Package Overview
Dependencies
Maintainers
19
Versions
378
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vaadin/field-base - npm Package Compare versions

Comparing version 22.0.0-beta1 to 22.0.0-beta2

7

package.json
{
"name": "@vaadin/field-base",
"version": "22.0.0-beta1",
"version": "22.0.0-beta2",
"publishConfig": {

@@ -32,4 +32,5 @@ "access": "public"

"dependencies": {
"@open-wc/dedupe-mixin": "^1.3.0",
"@polymer/polymer": "^3.0.0",
"@vaadin/component-base": "22.0.0-beta1",
"@vaadin/component-base": "22.0.0-beta2",
"lit": "^2.0.0"

@@ -42,3 +43,3 @@ },

},
"gitHead": "4cf8a9d0504994200c610e44b3676114fef49c1e"
"gitHead": "f13833683e6667f6ca6678452db14aa6b7eac4a4"
}
# @vaadin/field-base
A set of mixins for using by Vaadin field components.
A set of mixins and controllers used by Vaadin field components.
## Contributing
Read the [contributing guide](https://vaadin.com/docs/latest/guide/contributing/overview) to learn about our development process, how to propose bugfixes and improvements, and how to test your changes to Vaadin components.
## License
Apache License 2.0
Vaadin collects usage statistics at development time to improve this product.
For details and to opt-out, see https://github.com/vaadin/vaadin-usage-statistics.

@@ -6,5 +6,6 @@ /**

*/
import { DisabledMixin } from '@vaadin/component-base/src/disabled-mixin.js';
import { DelegateStateMixin } from './delegate-state-mixin.js';
import { InputMixin } from './input-mixin.js';
import { Constructor } from '@open-wc/dedupe-mixin';
import { DisabledMixinClass } from '@vaadin/component-base/src/disabled-mixin.js';
import { DelegateStateMixinClass } from './delegate-state-mixin.js';
import { InputMixinClass } from './input-mixin.js';

@@ -14,9 +15,11 @@ /**

*/
declare function CheckedMixin<T extends new (...args: any[]) => {}>(base: T): T & CheckedMixinConstructor;
export declare function CheckedMixin<T extends Constructor<object>>(
base: T
): T &
Constructor<CheckedMixinClass> &
Constructor<DelegateStateMixinClass> &
Constructor<DisabledMixinClass> &
Constructor<InputMixinClass>;
interface CheckedMixinConstructor {
new (...args: any[]): CheckedMixin;
}
interface CheckedMixin extends DelegateStateMixin, DisabledMixin, InputMixin {
export declare class CheckedMixinClass {
/**

@@ -26,4 +29,4 @@ * True if the element is checked.

checked: boolean;
protected _toggleChecked(checked: boolean): void;
}
export { CheckedMixinConstructor, CheckedMixin };

@@ -6,4 +6,5 @@ /**

*/
import { DisabledMixin } from '@vaadin/component-base/src/disabled-mixin.js';
import { FocusMixin } from '@vaadin/component-base/src/focus-mixin.js';
import { Constructor } from '@open-wc/dedupe-mixin';
import { DisabledMixinClass } from '@vaadin/component-base/src/disabled-mixin.js';
import { FocusMixinClass } from '@vaadin/component-base/src/focus-mixin.js';

@@ -13,9 +14,7 @@ /**

*/
declare function DelegateFocusMixin<T extends new (...args: any[]) => {}>(base: T): T & DelegateFocusMixinConstructor;
export declare function DelegateFocusMixin<T extends Constructor<HTMLElement>>(
base: T
): T & Constructor<DelegateFocusMixinClass> & Constructor<DisabledMixinClass> & Constructor<FocusMixinClass>;
interface DelegateFocusMixinConstructor {
new (...args: any[]): DelegateFocusMixin;
}
interface DelegateFocusMixin extends DisabledMixin, FocusMixin {
export declare class DelegateFocusMixinClass {
/**

@@ -33,5 +32,15 @@ * Specify that this control should have input focus when the page loads.

*/
readonly focusElement: Element | null | undefined;
readonly focusElement: HTMLElement | null | undefined;
protected _addFocusListeners(element: HTMLElement): void;
protected _removeFocusListeners(element: HTMLElement): void;
protected _focusElementChanged(element: HTMLElement, oldElement: HTMLElement): void;
protected _onBlur(event: FocusEvent): void;
protected _onFocus(event: FocusEvent): void;
protected _setFocusElement(element: HTMLElement): void;
}
export { DelegateFocusMixinConstructor, DelegateFocusMixin };

@@ -6,2 +6,3 @@ /**

*/
import { Constructor } from '@open-wc/dedupe-mixin';

@@ -11,9 +12,7 @@ /**

*/
declare function DelegateStateMixin<T extends new (...args: any[]) => {}>(base: T): T & DelegateStateMixinConstructor;
export declare function DelegateStateMixin<T extends Constructor<HTMLElement>>(
base: T
): T & Constructor<DelegateStateMixinClass>;
interface DelegateStateMixinConstructor {
new (...args: any[]): DelegateStateMixin;
}
interface DelegateStateMixin {
export declare class DelegateStateMixinClass {
/**

@@ -24,3 +23,1 @@ * A target element to which attributes and properties are delegated.

}
export { DelegateStateMixinConstructor, DelegateStateMixin };

@@ -6,4 +6,6 @@ /**

*/
import { LabelMixin } from './label-mixin.js';
import { ValidateMixin } from './validate-mixin.js';
import { Constructor } from '@open-wc/dedupe-mixin';
import { DelegateStateMixinClass } from './delegate-state-mixin.js';
import { LabelMixinClass } from './label-mixin.js';
import { ValidateMixinClass } from './validate-mixin.js';

@@ -13,9 +15,11 @@ /**

*/
declare function FieldMixin<T extends new (...args: any[]) => {}>(base: T): T & FieldMixinConstructor;
export declare function FieldMixin<T extends Constructor<HTMLElement>>(
superclass: T
): T &
Constructor<DelegateStateMixinClass> &
Constructor<FieldMixinClass> &
Constructor<LabelMixinClass> &
Constructor<ValidateMixinClass>;
interface FieldMixinConstructor {
new (...args: any[]): FieldMixin;
}
interface FieldMixin extends LabelMixin, ValidateMixin {
export declare class FieldMixinClass {
/**

@@ -39,4 +43,16 @@ * A target element to which ARIA attributes are set.

errorMessage: string;
protected readonly _ariaAttr: 'aria-labelledby' | 'aria-describedby';
protected _ariaTargetChanged(target: HTMLElement): void;
protected readonly _errorNode: HTMLElement;
protected readonly _helperNode?: HTMLElement;
protected _helperTextChanged(helperText: string | null | undefined): void;
protected _updateAriaAttribute(target: HTMLElement, invalid: boolean, helperId: string): void;
protected _updateAriaRequiredAttribute(target: HTMLElement, required: boolean): void;
}
export { FieldMixin, FieldMixinConstructor };

@@ -7,4 +7,4 @@ /**

import { FlattenedNodesObserver } from '@polymer/polymer/lib/utils/flattened-nodes-observer.js';
import { animationFrame } from '@vaadin/component-base/src/async.js';
import { Debouncer } from '@vaadin/component-base/src/debounce.js';
import { animationFrame } from '@vaadin/component-base/src/async.js';
import { LabelMixin } from './label-mixin.js';

@@ -11,0 +11,0 @@ import { ValidateMixin } from './validate-mixin.js';

@@ -6,5 +6,7 @@ /**

*/
import { DelegateStateMixin } from './delegate-state-mixin.js';
import { InputMixin } from './input-mixin.js';
import { ValidateMixin } from './validate-mixin.js';
import { Constructor } from '@open-wc/dedupe-mixin';
import { DisabledMixinClass } from '@vaadin/component-base/src/disabled-mixin.js';
import { DelegateStateMixinClass } from './delegate-state-mixin.js';
import { InputMixinClass } from './input-mixin.js';
import { ValidateMixinClass } from './validate-mixin.js';

@@ -14,11 +16,12 @@ /**

*/
declare function InputConstraintsMixin<T extends new (...args: any[]) => {}>(
export declare function InputConstraintsMixin<T extends Constructor<HTMLElement>>(
base: T
): T & InputConstraintsMixinConstructor;
): T &
Constructor<DelegateStateMixinClass> &
Constructor<DisabledMixinClass> &
Constructor<InputConstraintsMixinClass> &
Constructor<InputMixinClass> &
Constructor<ValidateMixinClass>;
interface InputConstraintsMixinConstructor {
new (...args: any[]): InputConstraintsMixin;
}
interface InputConstraintsMixin extends DelegateStateMixin, InputMixin, ValidateMixin {
export declare class InputConstraintsMixinClass {
/**

@@ -29,3 +32,1 @@ * Returns true if the current input value satisfies all constraints (if any).

}
export { InputConstraintsMixin, InputConstraintsMixinConstructor };

@@ -6,5 +6,13 @@ /**

*/
import { KeyboardMixin } from '@vaadin/component-base/src/keyboard-mixin.js';
import { FieldMixin } from './field-mixin.js';
import { InputConstraintsMixin } from './input-constraints-mixin.js';
import { Constructor } from '@open-wc/dedupe-mixin';
import { DisabledMixinClass } from '@vaadin/component-base/src/disabled-mixin.js';
import { FocusMixinClass } from '@vaadin/component-base/src/focus-mixin.js';
import { KeyboardMixinClass } from '@vaadin/component-base/src/keyboard-mixin.js';
import { DelegateFocusMixinClass } from './delegate-focus-mixin.js';
import { DelegateStateMixinClass } from './delegate-state-mixin.js';
import { FieldMixinClass } from './field-mixin.js';
import { InputConstraintsMixinClass } from './input-constraints-mixin.js';
import { InputMixinClass } from './input-mixin.js';
import { LabelMixinClass } from './label-mixin.js';
import { ValidateMixinClass } from './validate-mixin.js';

@@ -14,9 +22,18 @@ /**

*/
declare function InputControlMixin<T extends new (...args: any[]) => {}>(base: T): T & InputControlMixinConstructor;
export declare function InputControlMixin<T extends Constructor<HTMLElement>>(
base: T
): T &
Constructor<DelegateFocusMixinClass> &
Constructor<DelegateStateMixinClass> &
Constructor<DisabledMixinClass> &
Constructor<FieldMixinClass> &
Constructor<FocusMixinClass> &
Constructor<InputConstraintsMixinClass> &
Constructor<InputControlMixinClass> &
Constructor<InputMixinClass> &
Constructor<KeyboardMixinClass> &
Constructor<LabelMixinClass> &
Constructor<ValidateMixinClass>;
interface InputControlMixinConstructor {
new (...args: any[]): InputControlMixin;
}
interface InputControlMixin extends KeyboardMixin, InputConstraintsMixin, FieldMixin {
export declare class InputControlMixinClass {
/**

@@ -53,3 +70,1 @@ * If true, the input text gets fully selected when the field is focused using click or touch / tap.

}
export { InputControlMixin, InputControlMixinConstructor };

@@ -6,3 +6,14 @@ /**

*/
import { InputControlMixin } from './input-control-mixin.js';
import { Constructor } from '@open-wc/dedupe-mixin';
import { DisabledMixinClass } from '@vaadin/component-base/src/disabled-mixin.js';
import { FocusMixinClass } from '@vaadin/component-base/src/focus-mixin.js';
import { KeyboardMixinClass } from '@vaadin/component-base/src/keyboard-mixin.js';
import { DelegateFocusMixinClass } from './delegate-focus-mixin.js';
import { DelegateStateMixinClass } from './delegate-state-mixin.js';
import { FieldMixinClass } from './field-mixin.js';
import { InputConstraintsMixinClass } from './input-constraints-mixin.js';
import { InputControlMixinClass } from './input-control-mixin.js';
import { InputMixinClass } from './input-mixin.js';
import { LabelMixinClass } from './label-mixin.js';
import { ValidateMixinClass } from './validate-mixin.js';

@@ -12,9 +23,19 @@ /**

*/
declare function InputFieldMixin<T extends new (...args: any[]) => {}>(base: T): T & InputFieldMixinConstructor;
export declare function InputFieldMixin<T extends Constructor<HTMLElement>>(
base: T
): T &
Constructor<DelegateFocusMixinClass> &
Constructor<DelegateStateMixinClass> &
Constructor<DisabledMixinClass> &
Constructor<FieldMixinClass> &
Constructor<FocusMixinClass> &
Constructor<InputConstraintsMixinClass> &
Constructor<InputControlMixinClass> &
Constructor<InputFieldMixinClass> &
Constructor<InputMixinClass> &
Constructor<KeyboardMixinClass> &
Constructor<LabelMixinClass> &
Constructor<ValidateMixinClass>;
interface InputFieldMixinConstructor {
new (...args: any[]): InputFieldMixin;
}
interface InputFieldMixin extends InputControlMixin {
export declare class InputFieldMixinClass {
/**

@@ -47,3 +68,1 @@ * Whether the value of the control can be automatically completed by the browser.

}
export { InputFieldMixin, InputFieldMixinConstructor };

@@ -6,2 +6,3 @@ /**

*/
import { Constructor } from '@open-wc/dedupe-mixin';

@@ -12,9 +13,5 @@ /**

*/
declare function InputMixin<T extends new (...args: any[]) => {}>(base: T): T & InputMixinConstructor;
export declare function InputMixin<T extends Constructor<HTMLElement>>(base: T): T & Constructor<InputMixinClass>;
interface InputMixinConstructor {
new (...args: any[]): InputMixin;
}
interface InputMixin {
export declare class InputMixinClass {
/**

@@ -29,3 +26,3 @@ * A reference to the input element controlled by the mixin.

*/
readonly inputElement: HTMLInputElement;
readonly inputElement: HTMLElement;

@@ -41,4 +38,20 @@ /**

clear(): void;
protected _addInputListeners(input: HTMLElement): void;
protected _removeInputListeners(input: HTMLElement): void;
protected _forwardInputValue(input: HTMLElement): void;
protected _inputElementChanged(input: HTMLElement, oldInput: HTMLElement): void;
protected _onChange(event: void): void;
protected _onInput(event: void): void;
protected _setInputElement(input: HTMLElement): void;
protected _toggleHasValue(value: boolean): void;
protected _valueChanged(value?: string, oldValue?: string): void;
}
export { InputMixin, InputMixinConstructor };

@@ -6,3 +6,4 @@ /**

*/
import { SlotMixin } from '@vaadin/component-base/src/slot-mixin.js';
import { Constructor } from '@open-wc/dedupe-mixin';
import { SlotMixinClass } from '@vaadin/component-base/src/slot-mixin.js';

@@ -12,9 +13,7 @@ /**

*/
declare function LabelMixin<T extends new (...args: any[]) => {}>(base: T): T & LabelMixinConstructor;
export declare function LabelMixin<T extends Constructor<HTMLElement>>(
base: T
): T & Constructor<LabelMixinClass> & Constructor<SlotMixinClass>;
interface LabelMixinConstructor {
new (...args: any[]): LabelMixin;
}
interface LabelMixin extends SlotMixin {
export declare class LabelMixinClass {
/**

@@ -24,4 +23,8 @@ * String used for a label element.

label: string | null | undefined;
protected readonly _labelNode: HTMLLabelElement;
protected _labelChanged(label: string | null | undefined): void;
protected _toggleHasLabelAttribute(): void;
}
export { LabelMixinConstructor, LabelMixin };

@@ -6,3 +6,8 @@ /**

*/
import { InputConstraintsMixin } from './input-constraints-mixin.js';
import { Constructor } from '@open-wc/dedupe-mixin';
import { DisabledMixinClass } from '@vaadin/component-base/src/disabled-mixin.js';
import { DelegateStateMixinClass } from './delegate-state-mixin.js';
import { InputConstraintsMixinClass } from './input-constraints-mixin.js';
import { InputMixinClass } from './input-mixin.js';
import { ValidateMixinClass } from './validate-mixin.js';

@@ -12,9 +17,13 @@ /**

*/
declare function PatternMixin<T extends new (...args: any[]) => {}>(base: T): T & PatternMixinConstructor;
export declare function PatternMixin<T extends Constructor<HTMLElement>>(
base: T
): T &
Constructor<DelegateStateMixinClass> &
Constructor<DisabledMixinClass> &
Constructor<InputConstraintsMixinClass> &
Constructor<InputMixinClass> &
Constructor<PatternMixinClass> &
Constructor<ValidateMixinClass>;
interface PatternMixinConstructor {
new (...args: any[]): PatternMixin;
}
interface PatternMixin extends InputConstraintsMixin {
export declare class PatternMixinClass {
/**

@@ -33,3 +42,1 @@ * A regular expression that the value is checked against.

}
export { PatternMixin, PatternMixinConstructor };

@@ -6,4 +6,4 @@ /**

*/
import { timeOut } from '@vaadin/component-base/src/async.js';
import { Debouncer } from '@vaadin/component-base/src/debounce.js';
import { timeOut } from '@vaadin/component-base/src/async.js';
import { InputConstraintsMixin } from './input-constraints-mixin.js';

@@ -10,0 +10,0 @@

@@ -6,5 +6,8 @@ /**

*/
import { KeyboardMixin } from '@vaadin/component-base/src/keyboard-mixin.js';
import { TabindexMixin } from '@vaadin/component-base/src/tabindex-mixin.js';
import { DelegateFocusMixin } from './delegate-focus-mixin.js';
import { Constructor } from '@open-wc/dedupe-mixin';
import { DisabledMixinClass } from '@vaadin/component-base/src/disabled-mixin.js';
import { FocusMixinClass } from '@vaadin/component-base/src/focus-mixin.js';
import { KeyboardMixinClass } from '@vaadin/component-base/src/keyboard-mixin.js';
import { TabindexMixinClass } from '@vaadin/component-base/src/tabindex-mixin.js';
import { DelegateFocusMixinClass } from './delegate-focus-mixin.js';

@@ -14,10 +17,9 @@ /**

*/
declare function ShadowFocusMixin<T extends new (...args: any[]) => {}>(base: T): T & ShadowFocusMixinConstructor;
interface ShadowFocusMixinConstructor {
new (...args: any[]): ShadowFocusMixin;
}
interface ShadowFocusMixin extends KeyboardMixin, TabindexMixin, DelegateFocusMixin {}
export { ShadowFocusMixinConstructor, ShadowFocusMixin };
export declare function ShadowFocusMixin<T extends Constructor<HTMLElement>>(
base: T
): T &
Constructor<DelegateFocusMixinClass> &
Constructor<DisabledMixinClass> &
Constructor<FocusMixinClass> &
Constructor<KeyboardMixinClass> &
Constructor<TabindexMixinClass>;

@@ -6,4 +6,5 @@ /**

*/
import { LabelMixin } from './label-mixin.js';
import { SlotTargetMixin } from './slot-target-mixin.js';
import { Constructor } from '@open-wc/dedupe-mixin';
import { LabelMixinClass } from './label-mixin.js';
import { SlotTargetMixinClass } from './slot-target-mixin.js';

@@ -13,10 +14,4 @@ /**

*/
declare function SlotLabelMixin<T extends new (...args: any[]) => {}>(base: T): T & SlotLabelMixinConstructor;
interface SlotLabelMixinConstructor {
new (...args: any[]): SlotLabelMixin;
}
interface SlotLabelMixin extends SlotTargetMixin, LabelMixin {}
export { SlotLabelMixinConstructor, SlotLabelMixin };
export declare function SlotLabelMixin<T extends Constructor<HTMLElement>>(
base: T
): T & Constructor<LabelMixinClass> & Constructor<SlotTargetMixinClass>;

@@ -6,2 +6,3 @@ /**

*/
import { Constructor } from '@open-wc/dedupe-mixin';

@@ -12,15 +13,11 @@ /**

*/
declare function SlotStylesMixin<T extends new (...args: any[]) => {}>(base: T): T & SlotStylesMixinConstructor;
export declare function SlotStylesMixin<T extends Constructor<HTMLElement>>(
base: T
): T & Constructor<SlotStylesMixinClass>;
interface SlotStylesMixinConstructor {
new (...args: any[]): SlotStylesMixin;
}
interface SlotStylesMixin {
export declare class SlotStylesMixinClass {
/**
* List of styles to insert into root.
*/
readonly slotStyles: string[];
protected readonly slotStyles: string[];
}
export { SlotStylesMixinConstructor, SlotStylesMixin };

@@ -6,2 +6,3 @@ /**

*/
import { Constructor } from '@open-wc/dedupe-mixin';

@@ -11,24 +12,16 @@ /**

*/
declare function SlotTargetMixin<T extends new (...args: any[]) => {}>(base: T): T & SlotTargetMixinConstructor;
export declare function SlotTargetMixin<T extends Constructor<HTMLElement>>(
base: T
): T & Constructor<SlotTargetMixinClass>;
interface SlotTargetMixinConstructor {
new (...args: any[]): SlotTargetMixin;
}
interface SlotTargetMixin {
export declare class SlotTargetMixinClass {
/**
* A reference to the source slot from which the content is copied to the target element.
*
* @protected
*/
_sourceSlot: HTMLSlotElement;
protected readonly _sourceSlot: HTMLSlotElement;
/**
* A reference to the target element to which the content is copied from the source slot.
*
* @protected
*/
_slotTarget: HTMLElement;
protected readonly _slotTarget: HTMLElement;
}
export { SlotTargetMixinConstructor, SlotTargetMixin };

@@ -6,2 +6,3 @@ /**

*/
import { Constructor } from '@open-wc/dedupe-mixin';

@@ -11,9 +12,5 @@ /**

*/
declare function ValidateMixin<T extends new (...args: any[]) => {}>(base: T): T & ValidateMixinConstructor;
export declare function ValidateMixin<T extends Constructor<HTMLElement>>(base: T): T & Constructor<ValidateMixinClass>;
interface ValidateMixinConstructor {
new (...args: any[]): ValidateMixin;
}
interface ValidateMixin {
export declare class ValidateMixinClass {
/**

@@ -39,3 +36,1 @@ * Set to true when the field is invalid.

}
export { ValidateMixinConstructor, ValidateMixin };
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc