UNPKG

igniteui-webcomponents-inputs

Version:

Ignite UI Web Components inputs components.

1,381 lines (1,380 loc) 76.5 kB
import { XButton } from "./XButton"; import { ensureEnum, brushToString, stringToBrush, ensureBool, initializePropertiesFromCss, NamePatcher, toSpinal, enumToString, getAllPropertyNames, fromSpinal } from "igniteui-webcomponents-core"; import { FontInfo } from "igniteui-webcomponents-core"; import { WebComponentRenderer, PortalManager } from "igniteui-webcomponents-core"; import { delegateCombine, delegateRemove } from "igniteui-webcomponents-core"; import { TypeRegistrar } from "igniteui-webcomponents-core"; import { RegisterElementHelper } from "igniteui-webcomponents-core"; import { CornerRadius } from "igniteui-webcomponents-core"; import { ButtonDisplayStyle_$type } from './ButtonDisplayStyle'; import { IgcButtonClickEventArgs } from './igc-button-click-event-args'; import { ControlDisplayDensity_$type } from "igniteui-webcomponents-core"; import { BaseControlTheme_$type } from "igniteui-webcomponents-core"; import { ElevationMode_$type } from "igniteui-webcomponents-core"; import { IgcHTMLElement } from "igniteui-webcomponents-core"; import { HorizontalAlignment_$type } from "igniteui-webcomponents-core"; import { VerticalAlignment_$type } from "igniteui-webcomponents-core"; import { IgcFocusEventArgs } from "igniteui-webcomponents-core"; let IgcXButtonComponent = /*@__PURE__*/ (() => { class IgcXButtonComponent extends IgcHTMLElement { _onDisplayChanged() { this.style.display = this.display; } _onFlexDirectionChanged() { this.style.flexDirection = this.flexDirection; } _onFlexGrowChanged() { this.style.flexGrow = this.flexGrow; } _onAlignItemsChanged() { this.style.alignItems = this.alignItems; } constructor() { super(); this._disconnected = false; this._settingAttributes = false; this._attached = false; this._queuedSetAttributes = []; this._updatingFromAttribute = false; this.__p = null; this._hasUserValues = new Set(); this._stylingContainer = null; this._stylingParent = null; this._inStyling = false; this._clicked = null; this._clicked_wrapped = null; this._gotFocus = null; this._gotFocus_wrapped = null; this._lostFocus = null; this._lostFocus_wrapped = null; if (this._styling) { NamePatcher.ensureStylablePatched(Object.getPrototypeOf(this)); } this._portalManager = new PortalManager("buttonContent"); this._renderer = new WebComponentRenderer(this, document, true, {}, this._portalManager); this._container = this._renderer.createElement("div"); this._renderer.updateRoot(this._container); this._implementation = this.createImplementation(); this._implementation.externalObject = this; //this._container.setStyleProperty("width", "100%"); //this._container.setStyleProperty("height", "100%"); var root; root = this._container; if (this._container.getNativeElement() != null) { root = this._container.getNativeElement(); } this._wrapper = this._renderer; var button = this.i; this._button = button; button.provideContainer(this._renderer); this._onChildrenChanged(); //Checkbox.notifySizeChanged(); let mut = new MutationObserver((list) => { for (var mutation of list) { if (mutation.type == 'childList') { this._onChildrenChanged(); } } }); mut.observe(this, { childList: true }); //this._renderer.addSizeWatcher(() => { // this._checkbox.notifySizeChanged(); //}); } _onChildrenChanged() { var children = []; for (var i = 0; i < this.childNodes.length; i++) { var child = this.childNodes[i]; if (child !== this._container.getNativeElement()) { children.push(child); } } this._portalManager.onChildrenChanged(children); } // supports angular themes or custom properties set in CSS updateStyle() { this._styling(this, this); } destroy() { this._button.destroy(); this._wrapper.destroy(); } createImplementation() { return new XButton(); } disconnectedCallback() { this._disconnected = true; if (this.i) { this.i.onDetachedFromUI(); } } connectedCallback() { if (this._disconnected) { this._disconnected = false; if (this.i) { this.i.onAttachedToUI(); } return; } this.classList.add("ig-x-button"); this.classList.add("igc-x-button"); this.appendChild(this._container.getNativeElement()); this._attached = true; this.style.display = this.display; //this.style.height = this._height; //this.style.width = this._width; this._flushQueuedAttributes(); // supports themes or custom properties set in CSS this._styling(this, this); this.afterContentInit(); } afterContentInit() { //this.i.notifySizeChanged(); } /** * @hidden */ get i() { return this._implementation; } /** * @hidden */ static _createFromInternal(internal) { if (!internal) { return null; } if (!internal.$type) { return null; } let name = internal.$type.name; let externalName = "Igc" + name + "Component"; if (!TypeRegistrar.isRegistered(externalName)) { return null; } return TypeRegistrar.create(externalName); } _enqueueSetAttribute(attrName, attrValue) { this._queuedSetAttributes.push({ attrName: attrName, attrValue: attrValue }); } _flushQueuedAttributes() { this._settingAttributes = true; for (let i = 0; i < this._queuedSetAttributes.length; i++) { this.setAttribute(this._queuedSetAttributes[i].attrName, this._queuedSetAttributes[i].attrValue); } this._settingAttributes = false; this._queuedSetAttributes.length = 0; } _a(attrName, attrValue) { if (this._updatingFromAttribute) { return; } if (attrValue) { attrValue = attrValue.toString(); } this._settingAttributes = true; attrName = toSpinal(attrName); if (this._attached) { this.setAttribute(attrName, attrValue); } else { this._enqueueSetAttribute(attrName, attrValue); } this._settingAttributes = false; } static get observedAttributes() { if (IgcXButtonComponent._observedAttributesIgcXButtonComponent == null) { let names = getAllPropertyNames(IgcXButtonComponent); for (let i = 0; i < names.length; i++) { names[i] = toSpinal(names[i]); } IgcXButtonComponent._observedAttributesIgcXButtonComponent = names; } return IgcXButtonComponent._observedAttributesIgcXButtonComponent; } attributeChangedCallback(name, oldValue, newValue) { if (this._settingAttributes) { return; } let setName = fromSpinal(name); this._updatingFromAttribute = true; this[setName] = newValue; this._updatingFromAttribute = false; } static register() { if (!IgcXButtonComponent._isElementRegistered) { IgcXButtonComponent._isElementRegistered = true; RegisterElementHelper.registerElement(IgcXButtonComponent.htmlTagName, IgcXButtonComponent); } } /** * Gets or sets the min width to use for the button. */ get minWidth() { return this.i.by; } set minWidth(v) { this.i.by = +v; this._a("minWidth", this.i.by); } /** * Gets or sets the min height to use for the button. */ get minHeight() { return this.i.bx; } set minHeight(v) { this.i.bx = +v; this._a("minHeight", this.i.bx); } /** * Gets or sets the display style to use for the button. */ get displayType() { return this.i.e; } set displayType(v) { this.i.e = ensureEnum(ButtonDisplayStyle_$type, v); this._a("displayType", enumToString(ButtonDisplayStyle_$type, this.i.e)); } /** * Gets or sets the display density to use for the button. */ get density() { return this.i.r; } set density(v) { this.i.r = ensureEnum(ControlDisplayDensity_$type, v); this._a("density", enumToString(ControlDisplayDensity_$type, this.i.r)); } /** * Gets or sets the base built in theme to use for the button. */ get baseTheme() { return this.i.n; } set baseTheme(v) { this.i.n = ensureEnum(BaseControlTheme_$type, v); this._a("baseTheme", enumToString(BaseControlTheme_$type, this.i.n)); } /** * Gets the actual display density to use for the label. */ get actualDensity() { return this.i.q; } set actualDensity(v) { this.i.q = ensureEnum(ControlDisplayDensity_$type, v); this._a("actualDensity", enumToString(ControlDisplayDensity_$type, this.i.q)); } /** * Gets or sets the color to use for the check mark when the checkbox is checked. */ get actualBorderColor() { return brushToString(this.i.np); } set actualBorderColor(v) { this.i.np = stringToBrush(v); this._a("actualBorderColor", brushToString(this.i.np)); } /** * Gets or sets the color to use for the check mark when the checkbox is checked. */ get actualUmbraShadowColor() { return brushToString(this.i.n0); } set actualUmbraShadowColor(v) { this.i.n0 = stringToBrush(v); this._a("actualUmbraShadowColor", brushToString(this.i.n0)); } /** * Gets or sets the color to use for the check mark when the checkbox is checked. */ get actualPenumbraShadowColor() { return brushToString(this.i.nx); } set actualPenumbraShadowColor(v) { this.i.nx = stringToBrush(v); this._a("actualPenumbraShadowColor", brushToString(this.i.nx)); } /** * Gets or sets the color to use for the check mark when the checkbox is checked. */ get actualAmbientShadowColor() { return brushToString(this.i.nn); } set actualAmbientShadowColor(v) { this.i.nn = stringToBrush(v); this._a("actualAmbientShadowColor", brushToString(this.i.nn)); } /** * Gets or sets the color to use for the check mark when the checkbox is checked. */ get actualRestingElevation() { return this.i.cx; } set actualRestingElevation(v) { this.i.cx = +v; this._a("actualRestingElevation", this.i.cx); } /** * Gets or sets the color to use for the check mark when the checkbox is checked. */ get actualFocusElevation() { return this.i.cv; } set actualFocusElevation(v) { this.i.cv = +v; this._a("actualFocusElevation", this.i.cv); } /** * Gets or sets the color to use for the check mark when the checkbox is checked. */ get actualHoverElevation() { return this.i.cw; } set actualHoverElevation(v) { this.i.cw = +v; this._a("actualHoverElevation", this.i.cw); } /** * Gets or sets the color to use for the ripple when the button is pressed. */ get actualRippleColor() { return brushToString(this.i.ny); } set actualRippleColor(v) { this.i.ny = stringToBrush(v); this._a("actualRippleColor", brushToString(this.i.ny)); } get actualCornerRadiusBottomRight() { return this.i.kz ? this.i.kz.c : NaN; } set actualCornerRadiusBottomRight(v) { this.ensureActualCornerRadius(); this.i.kz.c = +v; this._a("actualCornerRadiusBottomRight", this.i.kz.c); this.i.kz = this.i.kz; } get actualCornerRadiusBottomLeft() { return this.i.kz ? this.i.kz.b : NaN; } set actualCornerRadiusBottomLeft(v) { this.ensureActualCornerRadius(); this.i.kz.b = +v; this._a("actualCornerRadiusBottomLeft", this.i.kz.b); this.i.kz = this.i.kz; } get actualCornerRadiusTopLeft() { return this.i.kz ? this.i.kz.d : NaN; } set actualCornerRadiusTopLeft(v) { this.ensureActualCornerRadius(); this.i.kz.d = +v; this._a("actualCornerRadiusTopLeft", this.i.kz.d); this.i.kz = this.i.kz; } get actualCornerRadiusTopRight() { return this.i.kz ? this.i.kz.e : NaN; } set actualCornerRadiusTopRight(v) { this.ensureActualCornerRadius(); this.i.kz.e = +v; this._a("actualCornerRadiusTopRight", this.i.kz.e); this.i.kz = this.i.kz; } ensureActualCornerRadius() { if (this.i.kz) { return; } this.i.kz = new CornerRadius(2); } /** * Gets the color to use for the actual background. */ get actualBackgroundColor() { return brushToString(this.i.no); } set actualBackgroundColor(v) { this.i.no = stringToBrush(v); this._a("actualBackgroundColor", brushToString(this.i.no)); } /** * Gets the actual color to use for the disabled background of the button. */ get actualDisabledBackgroundColor() { return brushToString(this.i.nq); } set actualDisabledBackgroundColor(v) { this.i.nq = stringToBrush(v); this._a("actualDisabledBackgroundColor", brushToString(this.i.nq)); } /** * Gets the actual color to use for the disabled border of the button. */ get actualDisabledBorderColor() { return brushToString(this.i.nr); } set actualDisabledBorderColor(v) { this.i.nr = stringToBrush(v); this._a("actualDisabledBorderColor", brushToString(this.i.nr)); } /** * Gets the actual color to use for the disabled text of the button. */ get actualDisabledTextColor() { return brushToString(this.i.ns); } set actualDisabledTextColor(v) { this.i.ns = stringToBrush(v); this._a("actualDisabledTextColor", brushToString(this.i.ns)); } /** * Gets the actual disabled elevation to use for the button. */ get actualDisabledElevation() { return this.i.cu; } set actualDisabledElevation(v) { this.i.cu = +v; this._a("actualDisabledElevation", this.i.cu); } /** * Gets the actual disabled elevation to use for the button. */ get actualElevationMode() { return this.i.u; } set actualElevationMode(v) { this.i.u = ensureEnum(ElevationMode_$type, v); this._a("actualElevationMode", enumToString(ElevationMode_$type, this.i.u)); } /** * Gets the color to use for the actual background. */ get actualTextColor() { return brushToString(this.i.nz); } set actualTextColor(v) { this.i.nz = stringToBrush(v); this._a("actualTextColor", brushToString(this.i.nz)); } /** * Gets the color to use for the actual background. */ get actualHoverTextColor() { return brushToString(this.i.nw); } set actualHoverTextColor(v) { this.i.nw = stringToBrush(v); this._a("actualHoverTextColor", brushToString(this.i.nw)); } /** * Gets the color to use for the actual background. */ get actualFocusBackgroundColor() { return brushToString(this.i.nt); } set actualFocusBackgroundColor(v) { this.i.nt = stringToBrush(v); this._a("actualFocusBackgroundColor", brushToString(this.i.nt)); } /** * Gets the actual color to use for the focused text. */ get actualFocusTextColor() { return brushToString(this.i.nu); } set actualFocusTextColor(v) { this.i.nu = stringToBrush(v); this._a("actualFocusTextColor", brushToString(this.i.nu)); } /** * Gets the hover color to use for the actual background. */ get actualHoverBackgroundColor() { return brushToString(this.i.nv); } set actualHoverBackgroundColor(v) { this.i.nv = stringToBrush(v); this._a("actualHoverBackgroundColor", brushToString(this.i.nv)); } /** * Gets or sets the Width to use for the check mark when the checkbox is checked. */ get actualBorderWidth() { return this.i.bj; } set actualBorderWidth(v) { this.i.bj = +v; this._a("actualBorderWidth", this.i.bj); } /** * Gets or sets the color to use for the background of the button when the type is raised. */ get raisedBackgroundColor() { return brushToString(this.i.q4); } set raisedBackgroundColor(v) { this.i.q4 = stringToBrush(v); this._a("raisedBackgroundColor", brushToString(this.i.q4)); } /** * Gets or sets the color to use for the disabled background of the button when the type is raised. */ get raisedDisabledBackgroundColor() { return brushToString(this.i.q6); } set raisedDisabledBackgroundColor(v) { this.i.q6 = stringToBrush(v); this._a("raisedDisabledBackgroundColor", brushToString(this.i.q6)); } /** * Gets or sets the color to use for the disabled border of the button when the type is raised. */ get raisedDisabledBorderColor() { return brushToString(this.i.q7); } set raisedDisabledBorderColor(v) { this.i.q7 = stringToBrush(v); this._a("raisedDisabledBorderColor", brushToString(this.i.q7)); } /** * Gets or sets the color to use for the disabled text of the button when the type is raised. */ get raisedDisabledTextColor() { return brushToString(this.i.q8); } set raisedDisabledTextColor(v) { this.i.q8 = stringToBrush(v); this._a("raisedDisabledTextColor", brushToString(this.i.q8)); } /** * Gets or sets the disabled elevation to use for the button when the type is raised. */ get raisedDisabledElevation() { return this.i.d2; } set raisedDisabledElevation(v) { this.i.d2 = +v; this._a("raisedDisabledElevation", this.i.d2); } /** * Gets or sets the hover color to use for the background of the button when the type is raised. */ get raisedHoverBackgroundColor() { return brushToString(this.i.rb); } set raisedHoverBackgroundColor(v) { this.i.rb = stringToBrush(v); this._a("raisedHoverBackgroundColor", brushToString(this.i.rb)); } /** * Gets or sets the border color to use for the button when the type is raised. */ get raisedBorderColor() { return brushToString(this.i.q5); } set raisedBorderColor(v) { this.i.q5 = stringToBrush(v); this._a("raisedBorderColor", brushToString(this.i.q5)); } /** * Gets or sets the elevation to use for the button when the type is raised. */ get raisedRestingElevation() { return this.i.d5; } set raisedRestingElevation(v) { this.i.d5 = +v; this._a("raisedRestingElevation", this.i.d5); } /** * Gets or sets the hover elevation to use for the button when the type is raised. */ get raisedHoverElevation() { return this.i.d4; } set raisedHoverElevation(v) { this.i.d4 = +v; this._a("raisedHoverElevation", this.i.d4); } /** * Gets or sets the focus elevation to use for the button when the type is raised. */ get raisedFocusElevation() { return this.i.d3; } set raisedFocusElevation(v) { this.i.d3 = +v; this._a("raisedFocusElevation", this.i.d3); } /** * Gets or sets the width to use for the button border when the type is raised. */ get raisedBorderWidth() { return this.i.b0; } set raisedBorderWidth(v) { this.i.b0 = +v; this._a("raisedBorderWidth", this.i.b0); } get raisedCornerRadiusBottomRight() { return this.i.lc ? this.i.lc.c : NaN; } set raisedCornerRadiusBottomRight(v) { this.ensureRaisedCornerRadius(); this.i.lc.c = +v; this._a("raisedCornerRadiusBottomRight", this.i.lc.c); this.i.lc = this.i.lc; } get raisedCornerRadiusBottomLeft() { return this.i.lc ? this.i.lc.b : NaN; } set raisedCornerRadiusBottomLeft(v) { this.ensureRaisedCornerRadius(); this.i.lc.b = +v; this._a("raisedCornerRadiusBottomLeft", this.i.lc.b); this.i.lc = this.i.lc; } get raisedCornerRadiusTopLeft() { return this.i.lc ? this.i.lc.d : NaN; } set raisedCornerRadiusTopLeft(v) { this.ensureRaisedCornerRadius(); this.i.lc.d = +v; this._a("raisedCornerRadiusTopLeft", this.i.lc.d); this.i.lc = this.i.lc; } get raisedCornerRadiusTopRight() { return this.i.lc ? this.i.lc.e : NaN; } set raisedCornerRadiusTopRight(v) { this.ensureRaisedCornerRadius(); this.i.lc.e = +v; this._a("raisedCornerRadiusTopRight", this.i.lc.e); this.i.lc = this.i.lc; } ensureRaisedCornerRadius() { if (this.i.lc) { return; } this.i.lc = new CornerRadius(2); } /** * Gets or sets the color to use for the background when the button is pressed and the type is floating action button. */ get raisedRippleColor() { return brushToString(this.i.rd); } set raisedRippleColor(v) { this.i.rd = stringToBrush(v); this._a("raisedRippleColor", brushToString(this.i.rd)); } /** * Gets or sets the color to use for the background of the button when the type is flat. */ get flatBackgroundColor() { return brushToString(this.i.p3); } set flatBackgroundColor(v) { this.i.p3 = stringToBrush(v); this._a("flatBackgroundColor", brushToString(this.i.p3)); } /** * Gets or sets the color to use for the disabled background of the button when the type is flat. */ get flatDisabledBackgroundColor() { return brushToString(this.i.p5); } set flatDisabledBackgroundColor(v) { this.i.p5 = stringToBrush(v); this._a("flatDisabledBackgroundColor", brushToString(this.i.p5)); } /** * Gets or sets the color to use for the disabled border of the button when the type is flat. */ get flatDisabledBorderColor() { return brushToString(this.i.p6); } set flatDisabledBorderColor(v) { this.i.p6 = stringToBrush(v); this._a("flatDisabledBorderColor", brushToString(this.i.p6)); } /** * Gets or sets the color to use for the disabled text of the button when the type is flat. */ get flatDisabledTextColor() { return brushToString(this.i.p7); } set flatDisabledTextColor(v) { this.i.p7 = stringToBrush(v); this._a("flatDisabledTextColor", brushToString(this.i.p7)); } /** * Gets or sets the disabled elevation to use for the button when the type is flat. */ get flatDisabledElevation() { return this.i.dn; } set flatDisabledElevation(v) { this.i.dn = +v; this._a("flatDisabledElevation", this.i.dn); } /** * Gets or sets the hover color to use for the background of the button when the type is flat. */ get flatHoverBackgroundColor() { return brushToString(this.i.qa); } set flatHoverBackgroundColor(v) { this.i.qa = stringToBrush(v); this._a("flatHoverBackgroundColor", brushToString(this.i.qa)); } /** * Gets or sets the border color to use for the button when the type is flat. */ get flatBorderColor() { return brushToString(this.i.p4); } set flatBorderColor(v) { this.i.p4 = stringToBrush(v); this._a("flatBorderColor", brushToString(this.i.p4)); } /** * Gets or sets the elevation to use for the button when the type is flat. */ get flatRestingElevation() { return this.i.dr; } set flatRestingElevation(v) { this.i.dr = +v; this._a("flatRestingElevation", this.i.dr); } /** * Gets or sets the hover elevation to use for the button when the type is flat. */ get flatHoverElevation() { return this.i.dq; } set flatHoverElevation(v) { this.i.dq = +v; this._a("flatHoverElevation", this.i.dq); } /** * Gets or sets the focus elevation to use for the button when the type is flat. */ get flatFocusElevation() { return this.i.dp; } set flatFocusElevation(v) { this.i.dp = +v; this._a("flatFocusElevation", this.i.dp); } /** * Gets or sets the color to use for the background when the button is pressed and the type is floating action button. */ get flatRippleColor() { return brushToString(this.i.qc); } set flatRippleColor(v) { this.i.qc = stringToBrush(v); this._a("flatRippleColor", brushToString(this.i.qc)); } /** * Gets or sets the color to use for the text of the button when type is flat. */ get flatTextColor() { return brushToString(this.i.qd); } set flatTextColor(v) { this.i.qd = stringToBrush(v); this._a("flatTextColor", brushToString(this.i.qd)); } /** * Gets or sets the color to use for the hovered text of the button when type is flat. */ get flatHoverTextColor() { return brushToString(this.i.qb); } set flatHoverTextColor(v) { this.i.qb = stringToBrush(v); this._a("flatHoverTextColor", brushToString(this.i.qb)); } /** * Gets or sets the color to use for the backround the button when it is focused and flat. */ get flatFocusBackgroundColor() { return brushToString(this.i.p8); } set flatFocusBackgroundColor(v) { this.i.p8 = stringToBrush(v); this._a("flatFocusBackgroundColor", brushToString(this.i.p8)); } /** * Gets or sets the color to use for the text the button when it is focused and flat. */ get flatFocusTextColor() { return brushToString(this.i.p9); } set flatFocusTextColor(v) { this.i.p9 = stringToBrush(v); this._a("flatFocusTextColor", brushToString(this.i.p9)); } /** * Gets or sets the width to use for the button border when the type is flat. */ get flatBorderWidth() { return this.i.bv; } set flatBorderWidth(v) { this.i.bv = +v; this._a("flatBorderWidth", this.i.bv); } get flatCornerRadiusBottomRight() { return this.i.k8 ? this.i.k8.c : NaN; } set flatCornerRadiusBottomRight(v) { this.ensureFlatCornerRadius(); this.i.k8.c = +v; this._a("flatCornerRadiusBottomRight", this.i.k8.c); this.i.k8 = this.i.k8; } get flatCornerRadiusBottomLeft() { return this.i.k8 ? this.i.k8.b : NaN; } set flatCornerRadiusBottomLeft(v) { this.ensureFlatCornerRadius(); this.i.k8.b = +v; this._a("flatCornerRadiusBottomLeft", this.i.k8.b); this.i.k8 = this.i.k8; } get flatCornerRadiusTopLeft() { return this.i.k8 ? this.i.k8.d : NaN; } set flatCornerRadiusTopLeft(v) { this.ensureFlatCornerRadius(); this.i.k8.d = +v; this._a("flatCornerRadiusTopLeft", this.i.k8.d); this.i.k8 = this.i.k8; } get flatCornerRadiusTopRight() { return this.i.k8 ? this.i.k8.e : NaN; } set flatCornerRadiusTopRight(v) { this.ensureFlatCornerRadius(); this.i.k8.e = +v; this._a("flatCornerRadiusTopRight", this.i.k8.e); this.i.k8 = this.i.k8; } ensureFlatCornerRadius() { if (this.i.k8) { return; } this.i.k8 = new CornerRadius(2); } /** * Gets or sets the color to use for the background when the button regardless of type. */ get backgroundColor() { return brushToString(this.i.n1); } set backgroundColor(v) { this.i.n1 = stringToBrush(v); this._a("backgroundColor", brushToString(this.i.n1)); } /** * Gets or sets the color to use for the disabled background of the button when the type is disabled. */ get disabledBackgroundColor() { return brushToString(this.i.pp); } set disabledBackgroundColor(v) { this.i.pp = stringToBrush(v); this._a("disabledBackgroundColor", brushToString(this.i.pp)); } /** * Gets or sets the color to use for the disabled border of the button when the type is raised. */ get disabledBorderColor() { return brushToString(this.i.pq); } set disabledBorderColor(v) { this.i.pq = stringToBrush(v); this._a("disabledBorderColor", brushToString(this.i.pq)); } /** * Gets or sets the color to use for the disabled text of the button when the type is raised. */ get disabledTextColor() { return brushToString(this.i.pr); } set disabledTextColor(v) { this.i.pr = stringToBrush(v); this._a("disabledTextColor", brushToString(this.i.pr)); } /** * Gets or sets the disabled elevation to use for the button when the type is raised. */ get disabledElevation() { return this.i.di; } set disabledElevation(v) { this.i.di = +v; this._a("disabledElevation", this.i.di); } /** * Gets or sets the disabled elevation to use for the button when the type is raised. */ get elevationMode() { return this.i.w; } set elevationMode(v) { this.i.w = ensureEnum(ElevationMode_$type, v); this._a("elevationMode", enumToString(ElevationMode_$type, this.i.w)); } /** * Gets or sets the hover color to use for the background of the button when the type is hovered. */ get hoverBackgroundColor() { return brushToString(this.i.qg); } set hoverBackgroundColor(v) { this.i.qg = stringToBrush(v); this._a("hoverBackgroundColor", brushToString(this.i.qg)); } /** * Gets or sets the border color to use for the button regardless of type. */ get borderColor() { return brushToString(this.i.n2); } set borderColor(v) { this.i.n2 = stringToBrush(v); this._a("borderColor", brushToString(this.i.n2)); } /** * Gets or sets the elevation to use for the button regardless of type. */ get restingElevation() { return this.i.d6; } set restingElevation(v) { this.i.d6 = +v; this._a("restingElevation", this.i.d6); } /** * Gets or sets the hover elevation to use for the button regardless of type. */ get hoverElevation() { return this.i.dt; } set hoverElevation(v) { this.i.dt = +v; this._a("hoverElevation", this.i.dt); } /** * Gets or sets the focus elevation to use for the button regardless of type. */ get focusElevation() { return this.i.ds; } set focusElevation(v) { this.i.ds = +v; this._a("focusElevation", this.i.ds); } /** * Gets or sets the use for the button. */ get textStyle() { if (this.i.aa == null) { return null; } return this.i.aa.fontString; } set textStyle(v) { let fi = new FontInfo(); fi.fontString = v; this.i.aa = fi; this._a("textStyle", this.i.aa != null ? this.i.aa.fontString : ""); } /** * Gets or sets the color to use for the text of the button regardless of type. */ get textColor() { return brushToString(this.i.rg); } set textColor(v) { this.i.rg = stringToBrush(v); this._a("textColor", brushToString(this.i.rg)); } /** * Gets or sets the color to use for the hovered text of the button regardless of type. */ get hoverTextColor() { return brushToString(this.i.qh); } set hoverTextColor(v) { this.i.qh = stringToBrush(v); this._a("hoverTextColor", brushToString(this.i.qh)); } /** * Gets or sets the color to use for the background of the button regardless of type. */ get rippleColor() { return brushToString(this.i.rf); } set rippleColor(v) { this.i.rf = stringToBrush(v); this._a("rippleColor", brushToString(this.i.rf)); } /** * Gets or sets the color to use for the text of the button when type is raised. */ get raisedTextColor() { return brushToString(this.i.re); } set raisedTextColor(v) { this.i.re = stringToBrush(v); this._a("raisedTextColor", brushToString(this.i.re)); } /** * Gets or sets the color to use for the hovered text of the button when type is raised. */ get raisedHoverTextColor() { return brushToString(this.i.rc); } set raisedHoverTextColor(v) { this.i.rc = stringToBrush(v); this._a("raisedHoverTextColor", brushToString(this.i.rc)); } /** * Gets or sets the color to use for the backround the button when it is focused and raised. */ get raisedFocusBackgroundColor() { return brushToString(this.i.q9); } set raisedFocusBackgroundColor(v) { this.i.q9 = stringToBrush(v); this._a("raisedFocusBackgroundColor", brushToString(this.i.q9)); } /** * Gets or sets the color to use for the text the button when it is focused and raised. */ get raisedFocusTextColor() { return brushToString(this.i.ra); } set raisedFocusTextColor(v) { this.i.ra = stringToBrush(v); this._a("raisedFocusTextColor", brushToString(this.i.ra)); } /** * Gets or sets the color to use for the backround the button when it is focused. */ get focusBackgroundColor() { return brushToString(this.i.qe); } set focusBackgroundColor(v) { this.i.qe = stringToBrush(v); this._a("focusBackgroundColor", brushToString(this.i.qe)); } /** * Gets or sets the color to use for the text of the button when it is focused. */ get focusTextColor() { return brushToString(this.i.qf); } set focusTextColor(v) { this.i.qf = stringToBrush(v); this._a("focusTextColor", brushToString(this.i.qf)); } /** * Gets or sets the width to use for the button border regardless of type. */ get borderWidth() { return this.i.bk; } set borderWidth(v) { this.i.bk = +v; this._a("borderWidth", this.i.bk); } get cornerRadiusBottomRight() { return this.i.k1 ? this.i.k1.c : NaN; } set cornerRadiusBottomRight(v) { this.ensureCornerRadius(); this.i.k1.c = +v; this._a("cornerRadiusBottomRight", this.i.k1.c); this.i.k1 = this.i.k1; } get cornerRadiusBottomLeft() { return this.i.k1 ? this.i.k1.b : NaN; } set cornerRadiusBottomLeft(v) { this.ensureCornerRadius(); this.i.k1.b = +v; this._a("cornerRadiusBottomLeft", this.i.k1.b); this.i.k1 = this.i.k1; } get cornerRadiusTopLeft() { return this.i.k1 ? this.i.k1.d : NaN; } set cornerRadiusTopLeft(v) { this.ensureCornerRadius(); this.i.k1.d = +v; this._a("cornerRadiusTopLeft", this.i.k1.d); this.i.k1 = this.i.k1; } get cornerRadiusTopRight() { return this.i.k1 ? this.i.k1.e : NaN; } set cornerRadiusTopRight(v) { this.ensureCornerRadius(); this.i.k1.e = +v; this._a("cornerRadiusTopRight", this.i.k1.e); this.i.k1 = this.i.k1; } ensureCornerRadius() { if (this.i.k1) { return; } this.i.k1 = new CornerRadius(2); } /** * Gets or sets the color to use for the background of the button when the type is outlined. */ get outlinedBackgroundColor() { return brushToString(this.i.qt); } set outlinedBackgroundColor(v) { this.i.qt = stringToBrush(v); this._a("outlinedBackgroundColor", brushToString(this.i.qt)); } /** * Gets or sets the color to use for the disabled background of the button when the type is outlined. */ get outlinedDisabledBackgroundColor() { return brushToString(this.i.qv); } set outlinedDisabledBackgroundColor(v) { this.i.qv = stringToBrush(v); this._a("outlinedDisabledBackgroundColor", brushToString(this.i.qv)); } /** * Gets or sets the color to use for the disabled border of the button when the type is outlined. */ get outlinedDisabledBorderColor() { return brushToString(this.i.qw); } set outlinedDisabledBorderColor(v) { this.i.qw = stringToBrush(v); this._a("outlinedDisabledBorderColor", brushToString(this.i.qw)); } /** * Gets or sets the color to use for the disabled text of the button when the type is outlined. */ get outlinedDisabledTextColor() { return brushToString(this.i.qx); } set outlinedDisabledTextColor(v) { this.i.qx = stringToBrush(v); this._a("outlinedDisabledTextColor", brushToString(this.i.qx)); } /** * Gets or sets the disabled elevation to use for the button when the type is outlined. */ get outlinedDisabledElevation() { return this.i.dy; } set outlinedDisabledElevation(v) { this.i.dy = +v; this._a("outlinedDisabledElevation", this.i.dy); } /** * Gets or sets the hover color to use for the background of the button when the type is hoveredOutlined. */ get outlinedHoverBackgroundColor() { return brushToString(this.i.q0); } set outlinedHoverBackgroundColor(v) { this.i.q0 = stringToBrush(v); this._a("outlinedHoverBackgroundColor", brushToString(this.i.q0)); } /** * Gets or sets the border color to use for the button when the type is outlined. */ get outlinedBorderColor() { return brushToString(this.i.qu); } set outlinedBorderColor(v) { this.i.qu = stringToBrush(v); this._a("outlinedBorderColor", brushToString(this.i.qu)); } /** * Gets or sets the elevation to use for the button when the type is outlined. */ get outlinedRestingElevation() { return this.i.d1; } set outlinedRestingElevation(v) { this.i.d1 = +v; this._a("outlinedRestingElevation", this.i.d1); } /** * Gets or sets the hover elevation to use for the button when the type is outlined. */ get outlinedHoverElevation() { return this.i.d0; } set outlinedHoverElevation(v) { this.i.d0 = +v; this._a("outlinedHoverElevation", this.i.d0); } /** * Gets or sets the focus elevation to use for the button when the type is outlined. */ get outlinedFocusElevation() { return this.i.dz; } set outlinedFocusElevation(v) { this.i.dz = +v; this._a("outlinedFocusElevation", this.i.dz); } /** * Gets or sets the width to use for the button border when the type is outlined. */ get outlinedBorderWidth() { return this.i.bz; } set outlinedBorderWidth(v) { this.i.bz = +v; this._a("outlinedBorderWidth", this.i.bz); } get outlinedCornerRadiusBottomRight() { return this.i.lb ? this.i.lb.c : NaN; } set outlinedCornerRadiusBottomRight(v) { this.ensureOutlinedCornerRadius(); this.i.lb.c = +v; this._a("outlinedCornerRadiusBottomRight", this.i.lb.c); this.i.lb = this.i.lb; } get outlinedCornerRadiusBottomLeft() { return this.i.lb ? this.i.lb.b : NaN; } set outlinedCornerRadiusBottomLeft(v) { this.ensureOutlinedCornerRadius(); this.i.lb.b = +v; this._a("outlinedCornerRadiusBottomLeft", this.i.lb.b); this.i.lb = this.i.lb; } get outlinedCornerRadiusTopLeft() { return this.i.lb ? this.i.lb.d : NaN; } set outlinedCornerRadiusTopLeft(v) { this.ensureOutlinedCornerRadius(); this.i.lb.d = +v; this._a("outlinedCornerRadiusTopLeft", this.i.lb.d); this.i.lb = this.i.lb; } get outlinedCornerRadiusTopRight() { return this.i.lb ? this.i.lb.e : NaN; } set outlinedCornerRadiusTopRight(v) { this.ensureOutlinedCornerRadius(); this.i.lb.e = +v; this._a("outlinedCornerRadiusTopRight", this.i.lb.e); this.i.lb = this.i.lb; } ensureOutlinedCornerRadius() { if (this.i.lb) { return; } this.i.lb = new CornerRadius(2); } /** * Gets or sets the color to use for the background when the button is pressed and the type is floating action button. */ get outlinedRippleColor() { return brushToString(this.i.q2); } set outlinedRippleColor(v) { this.i.q2 = stringToBrush(v); this._a("outlinedRippleColor", brushToString(this.i.q2)); } /** * Gets or sets the color to use for the text of the button when type is outlined. */ get outlinedTextColor() { return brushToString(this.i.q3); } set outlinedTextColor(v) { this.i.q3 = stringToBrush(v); this._a("outlinedTextColor", brushToString(this.i.q3)); } /** * Gets or sets the color to use for the hovered text of the button when type is outlined. */ get outlinedHoverTextColor() { return brushToString(this.i.q1); } set outlinedHoverTextColor(v) { this.i.q1 = stringToBrush(v); this._a("outlinedHoverTextColor", brushToString(this.i.q1)); } /** * Gets or sets the color to use for the backround the button when it is focused and outlined. */ get outlinedFocusBackgroundColor() { return brushToString(this.i.qy); } set outlinedFocusBackgroundColor(v) { this.i.qy = stringToBrush(v); this._a("outlinedFocusBackgroundColor", brushToString(this.i.qy)); } /** * Gets or sets the color to use for the text the button when it is focused and outlined. */ get outlinedFocusTextColor() { return brushToString(this.i.qz); } set outlinedFocusTextColor(v) { this.i.qz = stringToBrush(v); this._a("outlinedFocusTextColor", brushToString(this.i.qz)); } /** * Gets or sets the color to use for the background of the button when the type is floating action button. */ get fabBackgroundColor() { return brushToString(this.i.ps); } set fabBackgroundColor(v) { this.i.ps = stringToBrush(v); this._a("fabBackgroundColor", brushToString(this.i.ps)); } /** * Gets or sets the color to use for the disabled background of the button when the type is fab. */ get fabDisabledBackgroundColor() { return brushToString(this.i.pu); } set fabDisabledBackgroundColor(v) { this.i.pu = stringToBrush(v); this._a("fabDisabledBackgroundColor", brushToString(this.i.pu)); } /** * Gets or sets the color to use for the disabled border of the button when the type is fab. */ get fabDisabledBorderColor() { return brushToString(this.i.pv); } set fabDisabledBorderColor(v) { this.i.pv = stringToBrush(v); this._a("fabDisabledBorderColor", brushToString(this.i.pv)); } /** * Gets or sets the color to use for the disabled text of the button when the type is fab. */ get fabDisabledTextColor() { return brushToString(this.i.pw);