(function (global, factory) {
    typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@alyle/ui'), require('rxjs'), require('@angular/forms'), require('@angular/cdk/platform'), require('rxjs/operators'), require('@angular/common'), require('@angular/cdk/observers')) :
    typeof define === 'function' && define.amd ? define('@alyle/ui/field', ['exports', '@angular/core', '@alyle/ui', 'rxjs', '@angular/forms', '@angular/cdk/platform', 'rxjs/operators', '@angular/common', '@angular/cdk/observers'], factory) :
    (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.ly = global.ly || {}, global.ly.field = {}), global.ng.core, global.ly.core, global.rxjs, global.ng.forms, global.ng.cdk.platform, global.rxjs.operators, global.ng.common, global.ng.cdk.observers));
}(this, (function (exports, core, ui, rxjs, forms, platform, operators, common, observers) { 'use strict';

    /*! *****************************************************************************
    Copyright (c) Microsoft Corporation.

    Permission to use, copy, modify, and/or distribute this software for any
    purpose with or without fee is hereby granted.

    THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
    REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
    AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
    INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
    LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
    OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
    PERFORMANCE OF THIS SOFTWARE.
    ***************************************************************************** */
    /* global Reflect, Promise */
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b)
                if (Object.prototype.hasOwnProperty.call(b, p))
                    d[p] = b[p]; };
        return extendStatics(d, b);
    };
    function __extends(d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    }
    var __assign = function () {
        __assign = Object.assign || function __assign(t) {
            for (var s, i = 1, n = arguments.length; i < n; i++) {
                s = arguments[i];
                for (var p in s)
                    if (Object.prototype.hasOwnProperty.call(s, p))
                        t[p] = s[p];
            }
            return t;
        };
        return __assign.apply(this, arguments);
    };
    function __rest(s, e) {
        var t = {};
        for (var p in s)
            if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
                t[p] = s[p];
        if (s != null && typeof Object.getOwnPropertySymbols === "function")
            for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
                if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
                    t[p[i]] = s[p[i]];
            }
        return t;
    }
    function __decorate(decorators, target, key, desc) {
        var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
        if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
            r = Reflect.decorate(decorators, target, key, desc);
        else
            for (var i = decorators.length - 1; i >= 0; i--)
                if (d = decorators[i])
                    r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }
    function __param(paramIndex, decorator) {
        return function (target, key) { decorator(target, key, paramIndex); };
    }
    function __metadata(metadataKey, metadataValue) {
        if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
            return Reflect.metadata(metadataKey, metadataValue);
    }
    function __awaiter(thisArg, _arguments, P, generator) {
        function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
        return new (P || (P = Promise))(function (resolve, reject) {
            function fulfilled(value) { try {
                step(generator.next(value));
            }
            catch (e) {
                reject(e);
            } }
            function rejected(value) { try {
                step(generator["throw"](value));
            }
            catch (e) {
                reject(e);
            } }
            function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
            step((generator = generator.apply(thisArg, _arguments || [])).next());
        });
    }
    function __generator(thisArg, body) {
        var _ = { label: 0, sent: function () { if (t[0] & 1)
                throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
        return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
        function verb(n) { return function (v) { return step([n, v]); }; }
        function step(op) {
            if (f)
                throw new TypeError("Generator is already executing.");
            while (_)
                try {
                    if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
                        return t;
                    if (y = 0, t)
                        op = [op[0] & 2, t.value];
                    switch (op[0]) {
                        case 0:
                        case 1:
                            t = op;
                            break;
                        case 4:
                            _.label++;
                            return { value: op[1], done: false };
                        case 5:
                            _.label++;
                            y = op[1];
                            op = [0];
                            continue;
                        case 7:
                            op = _.ops.pop();
                            _.trys.pop();
                            continue;
                        default:
                            if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
                                _ = 0;
                                continue;
                            }
                            if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
                                _.label = op[1];
                                break;
                            }
                            if (op[0] === 6 && _.label < t[1]) {
                                _.label = t[1];
                                t = op;
                                break;
                            }
                            if (t && _.label < t[2]) {
                                _.label = t[2];
                                _.ops.push(op);
                                break;
                            }
                            if (t[2])
                                _.ops.pop();
                            _.trys.pop();
                            continue;
                    }
                    op = body.call(thisArg, _);
                }
                catch (e) {
                    op = [6, e];
                    y = 0;
                }
                finally {
                    f = t = 0;
                }
            if (op[0] & 5)
                throw op[1];
            return { value: op[0] ? op[1] : void 0, done: true };
        }
    }
    var __createBinding = Object.create ? (function (o, m, k, k2) {
        if (k2 === undefined)
            k2 = k;
        Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
    }) : (function (o, m, k, k2) {
        if (k2 === undefined)
            k2 = k;
        o[k2] = m[k];
    });
    function __exportStar(m, o) {
        for (var p in m)
            if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
                __createBinding(o, m, p);
    }
    function __values(o) {
        var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
        if (m)
            return m.call(o);
        if (o && typeof o.length === "number")
            return {
                next: function () {
                    if (o && i >= o.length)
                        o = void 0;
                    return { value: o && o[i++], done: !o };
                }
            };
        throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
    }
    function __read(o, n) {
        var m = typeof Symbol === "function" && o[Symbol.iterator];
        if (!m)
            return o;
        var i = m.call(o), r, ar = [], e;
        try {
            while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
                ar.push(r.value);
        }
        catch (error) {
            e = { error: error };
        }
        finally {
            try {
                if (r && !r.done && (m = i["return"]))
                    m.call(i);
            }
            finally {
                if (e)
                    throw e.error;
            }
        }
        return ar;
    }
    function __spread() {
        for (var ar = [], i = 0; i < arguments.length; i++)
            ar = ar.concat(__read(arguments[i]));
        return ar;
    }
    function __spreadArrays() {
        for (var s = 0, i = 0, il = arguments.length; i < il; i++)
            s += arguments[i].length;
        for (var r = Array(s), k = 0, i = 0; i < il; i++)
            for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
                r[k] = a[j];
        return r;
    }
    ;
    function __await(v) {
        return this instanceof __await ? (this.v = v, this) : new __await(v);
    }
    function __asyncGenerator(thisArg, _arguments, generator) {
        if (!Symbol.asyncIterator)
            throw new TypeError("Symbol.asyncIterator is not defined.");
        var g = generator.apply(thisArg, _arguments || []), i, q = [];
        return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
        function verb(n) { if (g[n])
            i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
        function resume(n, v) { try {
            step(g[n](v));
        }
        catch (e) {
            settle(q[0][3], e);
        } }
        function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
        function fulfill(value) { resume("next", value); }
        function reject(value) { resume("throw", value); }
        function settle(f, v) { if (f(v), q.shift(), q.length)
            resume(q[0][0], q[0][1]); }
    }
    function __asyncDelegator(o) {
        var i, p;
        return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
        function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
    }
    function __asyncValues(o) {
        if (!Symbol.asyncIterator)
            throw new TypeError("Symbol.asyncIterator is not defined.");
        var m = o[Symbol.asyncIterator], i;
        return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
        function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
        function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
    }
    function __makeTemplateObject(cooked, raw) {
        if (Object.defineProperty) {
            Object.defineProperty(cooked, "raw", { value: raw });
        }
        else {
            cooked.raw = raw;
        }
        return cooked;
    }
    ;
    var __setModuleDefault = Object.create ? (function (o, v) {
        Object.defineProperty(o, "default", { enumerable: true, value: v });
    }) : function (o, v) {
        o["default"] = v;
    };
    function __importStar(mod) {
        if (mod && mod.__esModule)
            return mod;
        var result = {};
        if (mod != null)
            for (var k in mod)
                if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
                    __createBinding(result, mod, k);
        __setModuleDefault(result, mod);
        return result;
    }
    function __importDefault(mod) {
        return (mod && mod.__esModule) ? mod : { default: mod };
    }
    function __classPrivateFieldGet(receiver, privateMap) {
        if (!privateMap.has(receiver)) {
            throw new TypeError("attempted to get private field on non-instance");
        }
        return privateMap.get(receiver);
    }
    function __classPrivateFieldSet(receiver, privateMap, value) {
        if (!privateMap.has(receiver)) {
            throw new TypeError("attempted to set private field on non-instance");
        }
        privateMap.set(receiver, value);
        return value;
    }

    var LyLabel = /** @class */ (function () {
        function LyLabel() {
        }
        return LyLabel;
    }());
    LyLabel.decorators = [
        { type: core.Directive, args: [{
                    selector: 'ly-field > ly-label'
                },] }
    ];

    var LyPlaceholder = /** @class */ (function () {
        function LyPlaceholder() {
        }
        return LyPlaceholder;
    }());
    LyPlaceholder.decorators = [
        { type: core.Directive, args: [{
                    selector: 'ly-field > ly-placeholder'
                },] }
    ];

    /**
     * For internal use only.
     * @docs-private
     */
    var LY_FIELD_STYLES_TOKEN = new core.InjectionToken('LY_FIELD_STYLES_TOKEN');

    /** LyHint */
    var STYLE_PRIORITY$2 = -2;
    /** Hint text to be shown underneath the field. */
    var LyHint = /** @class */ (function () {
        function LyHint(_renderer, _el, _theme, styles) {
            this._renderer = _renderer;
            this._el = _el;
            this._theme = _theme;
            this.classes = this._theme.addStyleSheet(styles, STYLE_PRIORITY$2);
            _renderer.addClass(_el.nativeElement, this.classes.hint);
        }
        Object.defineProperty(LyHint.prototype, "align", {
            get: function () {
                return this._align;
            },
            set: function (val) {
                if (val) {
                    if (val === 'after') {
                        this._renderer.addClass(this._el.nativeElement, this.classes.hintAfter);
                        this._alignClass = this.classes.hintAfter;
                    }
                    else {
                        this._renderer.addClass(this._el.nativeElement, this.classes.hintBefore);
                        this._alignClass = this.classes.hintBefore;
                    }
                }
                else if (this._alignClass) {
                    this._renderer.removeClass(this._el.nativeElement, this._alignClass);
                    this._alignClass = undefined;
                }
                this._align = val;
            },
            enumerable: false,
            configurable: true
        });
        return LyHint;
    }());
    LyHint.decorators = [
        { type: core.Directive, args: [{
                    selector: 'ly-field > ly-hint'
                },] }
    ];
    LyHint.ctorParameters = function () { return [
        { type: core.Renderer2 },
        { type: core.ElementRef },
        { type: ui.LyTheme2 },
        { type: undefined, decorators: [{ type: core.Inject, args: [LY_FIELD_STYLES_TOKEN,] }] }
    ]; };
    LyHint.propDecorators = {
        align: [{ type: core.Input }]
    };

    /** Prefix to be placed the before of the field. */
    var LyPrefix = /** @class */ (function () {
        function LyPrefix() {
        }
        return LyPrefix;
    }());
    LyPrefix.decorators = [
        { type: core.Directive, args: [{
                    selector: '[lyPrefix]',
                },] }
    ];

    /** Suffix to be placed the after of the field. */
    var LySuffix = /** @class */ (function () {
        function LySuffix() {
        }
        return LySuffix;
    }());
    LySuffix.decorators = [
        { type: core.Directive, args: [{
                    selector: '[lySuffix]',
                },] }
    ];

    var STYLE_PRIORITY$1 = -2;
    var LyError = /** @class */ (function () {
        function LyError(renderer, el, theme, styles) {
            var className = theme.addStyleSheet(styles, STYLE_PRIORITY$1).error;
            renderer.addClass(el.nativeElement, className);
        }
        return LyError;
    }());
    LyError.decorators = [
        { type: core.Directive, args: [{
                    selector: 'ly-error'
                },] }
    ];
    LyError.ctorParameters = function () { return [
        { type: core.Renderer2 },
        { type: core.ElementRef },
        { type: ui.LyTheme2 },
        { type: undefined, decorators: [{ type: core.Inject, args: [LY_FIELD_STYLES_TOKEN,] }] }
    ]; };

    /** An interface which allows a control to work inside of a `LyField`. */
    var LyFieldControlBase = /** @class */ (function () {
        function LyFieldControlBase() {
        }
        return LyFieldControlBase;
    }());

    /**
     * Only show when input is not focused, and hides input`.
     * You can use it to display formatted values.
     */
    var LyDisplayWith = /** @class */ (function () {
        function LyDisplayWith(sRenderer, styles) {
            this.sRenderer = sRenderer;
            sRenderer.renderSheet(styles, 'displayWith');
        }
        return LyDisplayWith;
    }());
    LyDisplayWith.decorators = [
        { type: core.Directive, args: [{
                    selector: 'ly-display-with',
                    providers: [
                        ui.StyleRenderer
                    ]
                },] }
    ];
    LyDisplayWith.ctorParameters = function () { return [
        { type: ui.StyleRenderer },
        { type: undefined, decorators: [{ type: core.Inject, args: [LY_FIELD_STYLES_TOKEN,] }] }
    ]; };

    var LY_FIELD_DEFAULT_OPTIONS = new core.InjectionToken('LY_FIELD_DEFAULT_OPTIONS');
    /** LyField */
    var STYLE_PRIORITY = -2;
    var DEFAULT_APPEARANCE = 'standard';
    var DEFAULT_WITH_COLOR = 'primary';
    var DEFAULT_FLOATING_LABEL_SIZE = 0.75;
    var inputText = [
        'text',
        'number',
        'password',
        'search',
        'tel',
        'url'
    ];
    var STYLE_SELECT_ARROW = function (className) { return className + "::after{position:absolute;content:'';width:0;height:0;border-left:0.3125em solid transparent;border-right:0.3125em solid transparent;border-top:0.3125em solid;top:50%;{after}:0;margin-top:-0.15625em;pointer-events:none;}"; };
    var MIXIN_CDK_TEXTAREA_AUTOSIZE_MEASURING_BASE = function (className) { return className + "{padding:2px 0 !important;box-sizing:content-box !important;}"; };
    var ɵ0$1 = MIXIN_CDK_TEXTAREA_AUTOSIZE_MEASURING_BASE;
    var STYLE_AUTOSIZE = function (className) { return className + " textarea.cdk-textarea-autosize{resize:none;}" + ui.st2c((MIXIN_CDK_TEXTAREA_AUTOSIZE_MEASURING_BASE), className + " textarea.cdk-textarea-autosize-measuring") + className + " textarea.cdk-textarea-autosize-measuring{height:auto !important;overflow:hidden !important;}" + ui.st2c((MIXIN_CDK_TEXTAREA_AUTOSIZE_MEASURING_BASE), className + " textarea.cdk-textarea-autosize-measuring-firefox") + className + " textarea.cdk-textarea-autosize-measuring-firefox{height:0 !important;}"; };
    var ɵ1 = STYLE_AUTOSIZE;
    var STYLES = function (theme, ref) {
        var classes = ref.selectorsOf(STYLES);
        var before = theme.before, after = theme.after;
        var shake = ui.keyframesUniqueId.next();
        return {
            $priority: STYLE_PRIORITY,
            $global: function (className) { return ui.st2c((STYLE_AUTOSIZE), "" + className) + "@keyframes " + shake + "{" + className + " 0%{margin-" + before + ":0;}" + className + " 40%{margin-" + before + ":2px;}" + className + " 50%{margin-" + before + ":-2px;}" + className + " 70%{margin-" + before + ":2px;}" + className + " 100%{margin-" + before + ":0;}}"; },
            root: function () { return function (className) { return className + "{display:inline-block;position:relative;line-height:1.125;}" + ui.st2c(((theme.field
                && theme.field.root
                && (theme.field.root instanceof ui.StyleCollection
                    ? theme.field.root.setTransformer(function (fn) { return fn(classes); })
                    : theme.field.root(classes)))), "" + className) + className + " " + classes.hint + "," + className + " " + classes.error + "{display:block;}" + className + " " + classes.label + " ly-icon," + className + " " + classes.placeholder + " ly-icon{font-size:inherit;}" + className + " " + classes.prefix + "," + className + " " + classes.suffix + "{position:relative;white-space:nowrap;flex:none;}"; }; },
            animations: function () { return function (className) { return className + " " + classes.labelSpan + "{transition:" + theme.animations.curves.deceleration + " ." + theme.animations.durations.complex + "s;}" + className + " " + classes.label + "{transition:" + theme.animations.curves.deceleration + " ." + theme.animations.durations.complex + "s;}"; }; },
            container: function (className) { return className + "{height:100%;display:flex;align-items:baseline;position:relative;-webkit-tap-highlight-color:transparent;box-sizing:border-box;}" + ui.st2c((ui.LY_COMMON_STYLES.fill), className + ":after") + className + ":after{content:'';pointer-events:none;}"; },
            fieldset: function (className) { return "" + ui.st2c((ui.LY_COMMON_STYLES.fill), "" + className) + className + "{margin:0;border-style:solid;border-width:0;}"; },
            fieldsetSpan: function (className) { return className + "{padding:0;height:2px;}"; },
            prefix: function (className) { return className + "{max-height:2em;}"; },
            infix: function (className) { return className + "{display:inline-flex;position:relative;min-width:0;width:180px;flex:auto;}"; },
            suffix: function (className) { return className + "{max-height:2em;}"; },
            labelContainer: function (className) { return "" + ui.st2c((ui.LY_COMMON_STYLES.fill), "" + className) + className + "{pointer-events:none;display:flex;width:100%;}"; },
            labelSpacingStart: null,
            labelCenter: function (className) { return className + "{display:flex;max-width:100%;}"; },
            labelSpacingEnd: function (className) { return className + "{flex:1;}"; },
            label: function (className) { return "" + ui.st2c((ui.LY_COMMON_STYLES.fill), "" + className) + className + "{margin:0;border:none;pointer-events:none;overflow:hidden;width:100%;height:100%;}"; },
            labelSpan: function (className) { return className + "{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;display:block;width:100%;height:100%;transform-origin:" + before + " 0;}"; },
            isFloatingLabel: null,
            floatingLabel: null,
            placeholder: function (className) { return "" + ui.st2c((ui.LY_COMMON_STYLES.fill), "" + className) + className + "{pointer-events:none;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;}"; },
            focused: null,
            inputNative: function (className) { return className + "{padding:0;outline:none;border:none;background-color:transparent;color:inherit;font:inherit;width:100%;}textarea" + className + "{padding:2px 0;margin:-2px 0;resize:vertical;overflow:auto;}select" + className + "{-moz-appearance:none;-webkit-appearance:none;position:relative;background-color:transparent;display:inline-flex;box-sizing:border-box;padding-" + after + ":1em;}select" + className + " option:not([disabled]){color:initial;}select" + className + " optgroup:not([disabled]){color:initial;}select" + className + "::-ms-expand{display:none;}select" + className + "::-moz-focus-inner{border:0;}select" + className + ":not(:disabled){cursor:pointer;}select" + className + "::-ms-value{color:inherit;background:0 0;}"; },
            /** Is used to hide the input when `displayWith` is shown */
            _hiddenInput: function (className) { return className + "{color:transparent;}"; },
            displayWith: function (className) { return "" + ui.st2c((ui.LY_COMMON_STYLES.fill), "" + className) + className + "{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;width:100%;pointer-events:none;}"; },
            hintContainer: function (className) { return className + "{min-height:1.25em;font-size:0.75em;margin-top:.25em;}" + className + " > div{display:flex;max-width:100%;overflow:hidden;justify-content:space-between;}"; },
            disabled: function () { return function (className) { return className + "," + className + " " + classes.label + "," + className + " " + classes.container + ":after{color:" + theme.disabled.contrast + ";cursor:default;}"; }; },
            hint: null,
            error: null,
            errorState: function () { return function (className) { return className + " " + classes.label + "," + className + " " + classes.hintContainer + "," + className + classes.selectArrow + " " + classes.infix + ":after{color:" + theme.warn.default + "!important;}" + className + " " + classes.fieldset + "," + className + " " + classes.container + ":after{border-color:" + theme.warn.default + "!important;}" + className + " " + classes.inputNative + "{caret-color:" + theme.warn.default + "!important;}" + className + " " + classes.hintContainer + " ly-hint:not(" + classes.hintAfter + "){display:none;}" + className + " " + classes.labelSpan + "{animation:" + shake + " " + theme.animations.durations.complex + "ms " + theme.animations.curves.deceleration + ";}" + className + " " + classes.inputNative + "::selection," + className + " " + classes.inputNative + "::-moz-selection{background-color:" + theme.warn.default + " !important;color:" + theme.warn.contrast + " !important;}"; }; },
            hintAfter: function (className) { return className + "{margin-" + before + ":auto;}"; },
            hintBefore: function (className) { return className + "{margin-" + after + ":auto;}"; },
            selectArrow: function () { return function (className) { return className + " " + classes.infix + "::after{position:absolute;content:'';width:0;height:0;border-left:0.3125em solid transparent;border-right:0.3125em solid transparent;border-top:0.3125em solid;top:0;" + after + ":0;pointer-events:none;}"; }; }
        };
    };
    var ɵ2 = function (val, media) { return function (_h, ref) {
        var breakpoints = _h.breakpoints;
        var classes = ref.selectorsOf(STYLES);
        return function (className) { return "@media " + ((media && breakpoints[media]) || 'all') + "{" + className + " " + classes.floatingLabel + " " + classes.labelSpan + "{transform:scale(" + val + ");width:" + Math.round(100 / 0.75) + "%;}}"; };
    }; }, ɵ3 = function (val) { return function (theme, ref) {
        var classes = ref.selectorsOf(STYLES);
        var color = theme.colorOf(val);
        var contrast = theme.colorOf(val + ":contrast");
        return function (className) { return "" + className + classes.focused + " " + classes.container + ":after," + className + classes.focused + classes.selectArrow + " " + classes.infix + ":after{color:" + color + ";}" + className + classes.focused + " " + classes.fieldset + "{border-color:" + color + ";}" + className + classes.focused + " " + classes.label + "{color:" + color + ";}" + className + " " + classes.inputNative + "{caret-color:" + color + ";}" + className + " " + classes.inputNative + "::selection{background-color:" + color + ";color:" + contrast + ";}" + className + " " + classes.inputNative + "::-moz-selection{background-color:" + color + ";color:" + contrast + ";}"; };
    }; }, ɵ4 = function (val) { return function (theme, ref) {
        var _a;
        var classes = ref.selectorsOf(STYLES);
        if ((_a = theme.field) === null || _a === void 0 ? void 0 : _a.appearance) {
            var appearance = theme.field.appearance[val];
            if (appearance) {
                return appearance instanceof ui.StyleCollection
                    ? appearance.setTransformer(function (_) { return _(classes); }).css
                    : appearance(classes);
            }
        }
        throw new Error("[" + val + "] not found in theme.field.appearance");
    }; };
    /**
     * @dynamic
     */
    var LyField = /** @class */ (function () {
        function LyField(_renderer, _el, _theme, _cd, _ngZone, sRenderer, _platform, _defaults) {
            this._renderer = _renderer;
            this._el = _el;
            this._theme = _theme;
            this._cd = _cd;
            this._ngZone = _ngZone;
            this.sRenderer = sRenderer;
            this._platform = _platform;
            this._defaults = _defaults;
            /**
             * styles
             * @docs-private
             */
            this.classes = this._theme.renderStyleSheet(STYLES);
            this._destroyed = new rxjs.Subject();
            _renderer.addClass(_el.nativeElement, this.classes.root);
        }
        Object.defineProperty(LyField.prototype, "_control", {
            get: function () {
                // Support both Ivy and ViewEngine.
                return this._controlNonStatic || this._controlStatic;
            },
            enumerable: false,
            configurable: true
        });
        Object.defineProperty(LyField.prototype, "errorState", {
            get: function () {
                return this._control ? this._control.errorState : false;
            },
            enumerable: false,
            configurable: true
        });
        Object.defineProperty(LyField.prototype, "displayWithStatus", {
            get: function () {
                return !!(this._displayWithChild
                    && this._control
                    && !this._control.empty
                    && !this._control.focused
                    && !this._control.errorState);
            },
            enumerable: false,
            configurable: true
        });
        Object.defineProperty(LyField.prototype, "fullWidth", {
            get: function () {
                return this._fullWidth;
            },
            set: function (val) {
                var newVal = ui.toBoolean(val);
                if (newVal) {
                    this._fullWidthClass = this._theme.addStyle("fullWidth", {
                        display: 'block',
                        width: '100%'
                    }, this._getHostElement(), this._fullWidthClass, STYLE_PRIORITY);
                }
                else if (this._fullWidthClass) {
                    this._renderer.removeClass(this._getHostElement(), this._fullWidthClass);
                    this._fullWidthClass = undefined;
                }
                this._fullWidth = newVal;
            },
            enumerable: false,
            configurable: true
        });
        Object.defineProperty(LyField.prototype, "floatingLabel", {
            get: function () {
                return this._floatingLabel;
            },
            /** Whether the label is floating. */
            set: function (val) {
                this._floatingLabel = ui.toBoolean(val);
                this._updateFloatingLabel();
            },
            enumerable: false,
            configurable: true
        });
        Object.defineProperty(LyField.prototype, "appearance", {
            /** The field appearance style. */
            set: function (val) {
                if (val === 'outlined') {
                    this._updateFielsetSpanOnStable = true;
                }
            },
            enumerable: false,
            configurable: true
        });
        LyField.prototype.onFocus = function () {
            this._el.nativeElement.focus();
        };
        LyField.prototype.ngOnInit = function () {
            var _a, _b, _c, _d, _f, _g;
            if (!this.color) {
                this.color = DEFAULT_WITH_COLOR;
            }
            if (this.floatingLabelSize == null) {
                this.floatingLabelSize = (((_a = this._defaults) === null || _a === void 0 ? void 0 : _a.floatingLabelSize) != null)
                    ? (_b = this._defaults) === null || _b === void 0 ? void 0 : _b.floatingLabelSize : DEFAULT_FLOATING_LABEL_SIZE;
            }
            if (!this.appearance) {
                this.appearance = ((_c = this._defaults) === null || _c === void 0 ? void 0 : _c.appearance) ? (_d = this._defaults) === null || _d === void 0 ? void 0 : _d.appearance : DEFAULT_APPEARANCE;
            }
            if (this.persistentHint == null) {
                this.persistentHint = (((_f = this._defaults) === null || _f === void 0 ? void 0 : _f.persistentHint) != null) ? this._defaults.persistentHint : false;
            }
            if (this.floatingLabel == null) {
                this.persistentHint = (((_g = this._defaults) === null || _g === void 0 ? void 0 : _g.floatingLabel) != null) ? this._defaults.floatingLabel : false;
            }
        };
        LyField.prototype.ngAfterContentInit = function () {
            var _this = this;
            this._control.stateChanges.subscribe(function () {
                _this._updateFloatingLabel();
                _this._updateDisplayWith();
                _this._markForCheck();
            });
            var ngControl = this._control.ngControl;
            // Run change detection if the value changes.
            if (ngControl && ngControl.valueChanges) {
                ngControl.valueChanges.pipe(operators.takeUntil(this._destroyed)).subscribe(function () {
                    _this._updateFloatingLabel();
                    _this._updateDisplayWith();
                    _this._markForCheck();
                });
            }
            this._ngZone.runOutsideAngular(function () {
                _this._ngZone.onStable.pipe(operators.takeUntil(_this._destroyed)).subscribe(function () {
                    if (_this._updateFielsetSpanOnStable) {
                        _this._updateFielsetSpan();
                    }
                });
                _this._ngZone.onStable.pipe(operators.take(1), operators.takeUntil(_this._destroyed)).subscribe(function () {
                    _this._updateDisplayWith();
                    _this._renderer.addClass(_this._el.nativeElement, _this.classes.animations);
                });
            });
            rxjs.merge(this._prefixChildren.changes, this._suffixChildren.changes).subscribe(function () {
                _this._updateFielsetSpanOnStable = true;
                _this._markForCheck();
            });
        };
        LyField.prototype.ngAfterViewInit = function () {
            this._updateFielsetSpan();
            this._updateFloatingLabel();
        };
        LyField.prototype.ngOnDestroy = function () {
            this._destroyed.next();
            this._destroyed.complete();
        };
        LyField.prototype._updateFielsetSpan = function () {
            var _h;
            if (!this._platform.isBrowser) {
                return;
            }
            if (this.floatingLabelSize == null) {
                return;
            }
            if (this.appearance !== 'outlined') {
                return;
            }
            var label = this._isLabel() ? this._labelSpan.nativeElement : null;
            var labelFirstChild = this._isLabel()
                ? this._labelSpan.nativeElement.firstElementChild
                : null;
            if (!label) {
                return;
            }
            var before = this._theme.variables.before;
            var fieldsetLegend = this._getHostElement().querySelector('legend');
            if (!fieldsetLegend) {
                this._updateFielsetSpanOnStable = true;
                return;
            }
            var labelRect = label.getBoundingClientRect();
            var container = this._container.nativeElement;
            var containerRect = this._container.nativeElement.getBoundingClientRect();
            var width = labelFirstChild.getBoundingClientRect().width;
            var percent = containerRect.width / container.offsetWidth;
            var labelPercent = labelRect.width / label.offsetWidth;
            var beforeMargin = Math.abs((containerRect[before] - labelRect[before]) / percent) - 12;
            width /= labelPercent;
            width *= this.floatingLabelSize;
            // add 6px of space
            width += 6;
            width = width > (label.parentElement.offsetWidth)
                ? (label.parentElement.offsetWidth)
                : width;
            width = Math.round(width);
            beforeMargin = Math.round(beforeMargin);
            fieldsetLegend.style["margin-right"] = "";
            fieldsetLegend.style["margin-left"] = "";
            fieldsetLegend.style["margin-" + before] = beforeMargin + "px";
            this._updateFielsetSpanOnStable = false;
            this._fielsetSpanClass = this._theme.addStyle("style.fieldsetSpanFocused:" + width, (_h = {},
                _h["&." + this.classes.isFloatingLabel + " ." + this.classes.fieldsetSpan] = { width: width + "px" },
                _h), this._el.nativeElement, this._fielsetSpanClass, STYLE_PRIORITY);
        };
        /** @ignore */
        LyField.prototype._isLabel = function () {
            if (this._control && this._control.placeholder && !this._labelChild) {
                return true;
            }
            else if (this._labelChild || this._placeholderChild) {
                return true;
            }
            return false;
        };
        /** @ignore */
        LyField.prototype._isPlaceholder = function () {
            if ((this._labelChild && this._control && this._control.placeholder) || (this._labelChild && this._placeholderChild)) {
                return true;
            }
            return false;
        };
        /** @ignore */
        LyField.prototype._isEmpty = function () {
            var val = this._control ? this._control.value : null;
            return val === '' || val === null || val === undefined;
        };
        LyField.prototype._updateFloatingLabel = function () {
            if (this._labelContainer2) {
                var isFloating = this._control.floatingLabel || this.floatingLabel;
                if (this._isFloating !== isFloating) {
                    this._isFloating = isFloating;
                    if (isFloating) {
                        this._renderer.addClass(this._labelContainer2.nativeElement, this.classes.floatingLabel);
                        this._renderer.addClass(this._el.nativeElement, this.classes.isFloatingLabel);
                    }
                    else {
                        this._renderer.removeClass(this._labelContainer2.nativeElement, this.classes.floatingLabel);
                        this._renderer.removeClass(this._el.nativeElement, this.classes.isFloatingLabel);
                    }
                }
            }
            if (this._control) {
                if (this._control.focused) {
                    this._renderer.addClass(this._el.nativeElement, this.classes.focused);
                }
                else {
                    this._renderer.removeClass(this._el.nativeElement, this.classes.focused);
                }
            }
        };
        LyField.prototype._updateDisplayWith = function () {
            if (this._control) {
                this._control.sRenderer.toggleClass(this.classes._hiddenInput, this.displayWithStatus);
            }
        };
        LyField.prototype._markForCheck = function () {
            this._cd.markForCheck();
        };
        LyField.prototype._getHostElement = function () {
            return this._el.nativeElement;
        };
        return LyField;
    }());
    LyField.decorators = [
        { type: core.Component, args: [{
                    selector: 'ly-field',
                    exportAs: 'lyFormField',
                    template: "<div #_container\n  [className]=\"classes.container\"\n  (click)=\"_control && _control.onContainerClick && _control.onContainerClick($event)\">\n  <fieldset\n    *ngIf=\"appearance === 'outlined'\"\n    [className]=\"classes.fieldset\"><legend [className]=\"classes.fieldsetSpan\"></legend></fieldset>\n  <div [className]=\"classes.prefix\" *ngIf=\"_prefixChildren.length\" #_prefixContainer>\n    <ng-content select=\"[lyPrefix]\"></ng-content>\n  </div>\n  <div [className]=\"classes.infix\">\n    <ng-container\n      *ngIf=\"displayWithStatus\"\n    >\n      <ng-content select=\"ly-display-with\"></ng-content>\n    </ng-container>\n    <ng-content></ng-content>\n    <span [className]=\"classes.label\" *ngIf=\"_isLabel()\" #_labelContainer2>\n      <span #_labelSpan [className]=\"classes.labelSpan\"\n        (cdkObserveContent)=\"_updateFielsetSpan()\"\n        [cdkObserveContentDisabled]=\"appearance != 'outlined'\"\n      >\n        <ng-container *ngTemplateOutlet=\"_labelTemplate\"></ng-container>\n      </span>\n    </span>\n    <div [className]=\"classes.placeholder\"\n      *ngIf=\"_isPlaceholder() && _control?.empty && (_control?.floatingLabel || floatingLabel)\"\n    >\n      <ng-container *ngTemplateOutlet=\"_placeholderTemplate\"></ng-container>\n    </div>\n  </div>\n  <div [className]=\"classes.suffix\" *ngIf=\"_suffixChildren.length\" #_suffixContainer>\n    <ng-content select=\"[lySuffix]\"></ng-content>\n  </div>\n</div>\n\n<div [className]=\"classes.hintContainer\">\n  <div *ngIf=\"(_hintChildren.length || _errorChildren.length) && (persistentHint || _control?.errorState || _control?.focused)\">\n    <ng-container *ngIf=\"_control?.errorState\">\n      <ng-content select=\"ly-error\"></ng-content>\n    </ng-container>\n    <ng-content select=\"ly-hint\"></ng-content>\n  </div>\n</div>\n\n<ng-template #_labelTemplate>\n  <ng-content select=\"ly-label\"></ng-content>\n  <ng-container *ngIf=\"!_labelChild\">\n    <ng-template *ngTemplateOutlet=\"_placeholderTemplate\"></ng-template>\n  </ng-container>\n</ng-template>\n\n<ng-template #_placeholderTemplate>\n  <ng-content select=\"ly-placeholder\"></ng-content>\n  <span *ngIf=\"_control?.placeholder\">{{ _control?.placeholder }}</span>\n</ng-template>\n",
                    changeDetection: core.ChangeDetectionStrategy.OnPush,
                    encapsulation: core.ViewEncapsulation.None,
                    providers: [
                        ui.StyleRenderer,
                    ]
                },] }
    ];
    LyField.ctorParameters = function () { return [
        { type: core.Renderer2 },
        { type: core.ElementRef },
        { type: ui.LyTheme2 },
        { type: core.ChangeDetectorRef },
        { type: core.NgZone },
        { type: ui.StyleRenderer },
        { type: platform.Platform },
        { type: undefined, decorators: [{ type: core.Optional }, { type: core.Inject, args: [LY_FIELD_DEFAULT_OPTIONS,] }] }
    ]; };
    LyField.propDecorators = {
        _container: [{ type: core.ViewChild, args: ['_container', { static: true },] }],
        _labelContainer: [{ type: core.ViewChild, args: ['_labelContainer',] }],
        _labelContainer2: [{ type: core.ViewChild, args: ['_labelContainer2',] }],
        _labelSpan: [{ type: core.ViewChild, args: ['_labelSpan',] }],
        _prefixContainer: [{ type: core.ViewChild, args: ['_prefixContainer',] }],
        _suffixContainer: [{ type: core.ViewChild, args: ['_suffixContainer',] }],
        _controlNonStatic: [{ type: core.ContentChild, args: [LyFieldControlBase,] }],
        _controlStatic: [{ type: core.ContentChild, args: [LyFieldControlBase, { static: true },] }],
        _placeholderChild: [{ type: core.ContentChild, args: [LyPlaceholder,] }],
        _labelChild: [{ type: core.ContentChild, args: [LyLabel,] }],
        _displayWithChild: [{ type: core.ContentChild, args: [LyDisplayWith,] }],
        _hintChildren: [{ type: core.ContentChildren, args: [LyHint,] }],
        _prefixChildren: [{ type: core.ContentChildren, args: [LyPrefix,] }],
        _suffixChildren: [{ type: core.ContentChildren, args: [LySuffix,] }],
        _errorChildren: [{ type: core.ContentChildren, args: [LyError,] }],
        persistentHint: [{ type: core.Input }],
        floatingLabelSize: [{ type: core.Input }],
        fullWidth: [{ type: core.Input }],
        floatingLabel: [{ type: core.Input }],
        color: [{ type: core.Input }],
        appearance: [{ type: core.Input }],
        onFocus: [{ type: core.HostListener, args: ['focus',] }]
    };
    __decorate([
        ui.Style(ɵ2)
    ], LyField.prototype, "floatingLabelSize", void 0);
    __decorate([
        ui.Style(ɵ3)
    ], LyField.prototype, "color", void 0);
    __decorate([
        ui.Style(ɵ4, STYLE_PRIORITY)
    ], LyField.prototype, "appearance", null);
    var LyNativeControl = /** @class */ (function () {
        function LyNativeControl(_theme, sRenderer, _el, _renderer, _field, 
        /** @docs-private */
        ngControl, _parentForm, _parentFormGroup) {
            this._theme = _theme;
            this.sRenderer = sRenderer;
            this._el = _el;
            this._renderer = _renderer;
            this._field = _field;
            this.ngControl = ngControl;
            this._parentForm = _parentForm;
            this._parentFormGroup = _parentFormGroup;
            this._disabled = false;
            this._required = false;
            this.stateChanges = new rxjs.Subject();
            this._form = this._parentForm || this._parentFormGroup;
            this._focused = false;
            this.errorState = false;
        }
        LyNativeControl.prototype._onInput = function () {
            this.stateChanges.next();
        };
        LyNativeControl.prototype._onBlur = function () {
            if (this._focused !== false) {
                this._focused = false;
                this.stateChanges.next();
            }
        };
        LyNativeControl.prototype._onFocus = function () {
            if (this._focused !== true) {
                this._focused = true;
                this.stateChanges.next();
            }
        };
        Object.defineProperty(LyNativeControl.prototype, "value", {
            get: function () {
                return this._getHostElement().value;
            },
            /** @ignore */
            set: function (val) {
                if (val !== this.value) {
                    this._getHostElement().value = val;
                    this.stateChanges.next();
                }
            },
            enumerable: false,
            configurable: true
        });
        Object.defineProperty(LyNativeControl.prototype, "disabled", {
            get: function () {
                if (this.ngControl && this.ngControl.disabled !== null) {
                    return this.ngControl.disabled;
                }
                return this._disabled;
            },
            /** Whether the input is disabled. */
            set: function (val) {
                if (val !== this._disabled) {
                    this._disabled = ui.toBoolean(val);
                    if (this._field) {
                        if (!val && this._hasDisabledClass) {
                            this._renderer.removeClass(this._field._getHostElement(), this._field.classes.disabled);
                            if (this._cursorClass) {
                                this._renderer.addClass(this._field._getHostElement(), this._cursorClass);
                            }
                            this._hasDisabledClass = undefined;
                        }
                        else if (val) {
                            this._renderer.addClass(this._field._getHostElement(), this._field.classes.disabled);
                            if (this._cursorClass) {
                                this._renderer.removeClass(this._field._getHostElement(), this._cursorClass);
                            }
                            this._hasDisabledClass = true;
                        }
                    }
                }
            },
            enumerable: false,
            configurable: true
        });
        Object.defineProperty(LyNativeControl.prototype, "required", {
            get: function () { return this._required; },
            set: function (value) {
                this._required = ui.toBoolean(value);
            },
            enumerable: false,
            configurable: true
        });
        Object.defineProperty(LyNativeControl.prototype, "placeholder", {
            get: function () { return this._placeholder; },
            set: function (val) {
                this._placeholder = val;
            },
            enumerable: false,
            configurable: true
        });
        Object.defineProperty(LyNativeControl.prototype, "focused", {
            get: function () {
                return this._focused;
            },
            enumerable: false,
            configurable: true
        });
        Object.defineProperty(LyNativeControl.prototype, "empty", {
            get: function () {
                var val = this.value;
                return val === '' || val == null;
            },
            enumerable: false,
            configurable: true
        });
        Object.defineProperty(LyNativeControl.prototype, "floatingLabel", {
            get: function () {
                return this.focused || !this.empty || (this._isSelectInput ? this._hasLabelSelectionOption() : false);
            },
            enumerable: false,
            configurable: true
        });
        LyNativeControl.prototype.ngOnInit = function () {
            var _this = this;
            this._renderer.setAttribute(this._getHostElement(), 'placeholder', '­');
            var nativeElement = this._el.nativeElement;
            if (nativeElement.nodeName.toLowerCase() === 'select') {
                this._isSelectInput = true;
            }
            // apply class {selectArrow} to `<select> not multiple`
            if (this._field && nativeElement.type === 'select-one') {
                this._renderer.addClass(this._field._getHostElement(), this._field.classes.selectArrow);
            }
            // apply style cursor only for input of type text
            if (nativeElement instanceof HTMLTextAreaElement ||
                inputText.some(function (type) { return type === nativeElement.type; })) {
                this._cursorClass = this._theme.addSimpleStyle('lyField.text', {
                    '& {infix}': {
                        cursor: 'text'
                    }
                }, STYLE_PRIORITY, STYLES);
            }
            if (this._isSelectInput) {
                this._cursorClass = this._theme.addSimpleStyle('lyField.select', {
                    '& {infix}': {
                        cursor: 'pointer'
                    }
                }, STYLE_PRIORITY, STYLES);
            }
            if (this._cursorClass) {
                this._renderer.addClass(this._field._getHostElement(), this._cursorClass);
            }
            // apply default styles
            this._renderer.addClass(nativeElement, this._field.classes.inputNative);
            var ngControl = this.ngControl;
            // update styles on disabled
            if (ngControl && ngControl.statusChanges) {
                ngControl.statusChanges.subscribe(function () {
                    _this.disabled = !!ngControl.disabled;
                });
            }
        };
        LyNativeControl.prototype.ngDoCheck = function () {
            if (this._field._control) {
                var oldVal = this.errorState;
                var newVal = !!(this.ngControl && this.ngControl.invalid && (this.ngControl.touched || (this._form && this._form.submitted)));
                if (newVal !== oldVal) {
                    this.errorState = newVal;
                    if (this._field) {
                        var errorClass = this._field.classes.errorState;
                        if (newVal) {
                            this._renderer.addClass(this._field._getHostElement(), errorClass);
                            this._errorClass = errorClass;
                        }
                        else if (this._errorClass) {
                            this._renderer.removeClass(this._field._getHostElement(), errorClass);
                            this._errorClass = undefined;
                        }
                        this.stateChanges.next();
                    }
                }
            }
        };
        LyNativeControl.prototype.ngOnDestroy = function () {
            this.stateChanges.complete();
        };
        /** @docs-private */
        LyNativeControl.prototype.onContainerClick = function (_e) {
            this._getHostElement().focus();
        };
        /** Focuses the input. */
        LyNativeControl.prototype.focus = function () { this._getHostElement().focus(); };
        LyNativeControl.prototype._getHostElement = function () {
            return this._el.nativeElement;
        };
        LyNativeControl.prototype._hasLabelSelectionOption = function () {
            var el = this._getHostElement();
            var option = el.selectedOptions ? el.selectedOptions.item(0) : null;
            return option ? !!option.label : false;
        };
        return LyNativeControl;
    }());
    LyNativeControl.decorators = [
        { type: core.Directive, args: [{
                    selector: 'input[lyInput], textarea[lyInput], input[lyNativeControl], textarea[lyNativeControl], select[lyNativeControl]',
                    exportAs: 'LyNativeControl',
                    providers: [
                        ui.StyleRenderer,
                        { provide: LyFieldControlBase, useExisting: LyNativeControl }
                    ]
                },] }
    ];
    LyNativeControl.ctorParameters = function () { return [
        { type: ui.LyTheme2 },
        { type: ui.StyleRenderer },
        { type: core.ElementRef },
        { type: core.Renderer2 },
        { type: LyField, decorators: [{ type: core.Optional }] },
        { type: forms.NgControl, decorators: [{ type: core.Optional }, { type: core.Self }] },
        { type: forms.NgForm, decorators: [{ type: core.Optional }] },
        { type: forms.FormGroupDirective, decorators: [{ type: core.Optional }] }
    ]; };
    LyNativeControl.propDecorators = {
        _onInput: [{ type: core.HostListener, args: ['input',] }],
        _onBlur: [{ type: core.HostListener, args: ['blur',] }],
        _onFocus: [{ type: core.HostListener, args: ['focus',] }],
        value: [{ type: core.Input }],
        disabled: [{ type: core.HostBinding }, { type: core.Input }],
        required: [{ type: core.HostBinding }, { type: core.Input }],
        placeholder: [{ type: core.Input }]
    };

    var ɵ0 = STYLES;
    var LyFieldModule = /** @class */ (function () {
        function LyFieldModule() {
        }
        return LyFieldModule;
    }());
    LyFieldModule.decorators = [
        { type: core.NgModule, args: [{
                    imports: [
                        common.CommonModule,
                        ui.LyCommonModule,
                        observers.ObserversModule
                    ],
                    exports: [
                        LyField,
                        LyPlaceholder,
                        LyLabel,
                        LyNativeControl,
                        LyPrefix,
                        LySuffix,
                        LyHint,
                        LyError,
                        LyDisplayWith,
                        ui.LyCommonModule
                    ],
                    providers: [
                        {
                            provide: LY_FIELD_STYLES_TOKEN,
                            useValue: ɵ0
                        }
                    ],
                    declarations: [
                        LyField,
                        LyPlaceholder,
                        LyLabel,
                        LyNativeControl,
                        LyPrefix,
                        LySuffix,
                        LyHint,
                        LyError,
                        LyDisplayWith
                    ]
                },] }
    ];

    /**
     * Generated bundle index. Do not edit.
     */

    exports.LY_FIELD_DEFAULT_OPTIONS = LY_FIELD_DEFAULT_OPTIONS;
    exports.LyField = LyField;
    exports.LyFieldControlBase = LyFieldControlBase;
    exports.LyFieldModule = LyFieldModule;
    exports.LyNativeControl = LyNativeControl;
    exports.STYLES = STYLES;
    exports.STYLE_SELECT_ARROW = STYLE_SELECT_ARROW;
    exports.ɵ1 = ɵ1;
    exports.ɵ2 = ɵ2;
    exports.ɵ3 = ɵ3;
    exports.ɵ4 = ɵ4;
    exports.ɵa = LyPlaceholder;
    exports.ɵb = LyLabel;
    exports.ɵc = LyDisplayWith;
    exports.ɵd = LY_FIELD_STYLES_TOKEN;
    exports.ɵe = LyHint;
    exports.ɵf = LyPrefix;
    exports.ɵg = LySuffix;
    exports.ɵh = LyError;

    Object.defineProperty(exports, '__esModule', { value: true });

})));
//# sourceMappingURL=alyle-ui-field.umd.js.map
