UNPKG

igniteui-react-inputs

Version:

Ignite UI React input components.

1,059 lines 146 kB
/* THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE AGREEMENT ("AGREEMENT") LOCATED HERE: https://www.infragistics.com/legal/license/igultimate-la https://www.infragistics.com/legal/license/igultimate-eula GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE: you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company. */ import { Base, Delegate_$type, fromEnum, runOn, markType, INotifyPropertyChanged_$type, PropertyChangedEventArgs, enumGetBox, String_$type } from "igniteui-react-core"; import { List$1 } from "igniteui-react-core"; import { XRipple } from "./XRipple"; import { NativeUI } from "igniteui-react-core"; import { ControlDisplayDensity_$type } from "igniteui-react-core"; import { HorizontalAlignment_$type } from "igniteui-react-core"; import { KeyFrameAnimationFactory } from "igniteui-react-core"; import { ElevationMode_$type } from "igniteui-react-core"; import { ElevationHelper } from "./ElevationHelper"; import { ButtonDisplayStyle_$type } from "./ButtonDisplayStyle"; import { isNaN_ } from "igniteui-react-core"; import { BaseControlTheme_$type } from "igniteui-react-core"; import { CornerRadius } from "igniteui-react-core"; import { VerticalAlignment_$type } from "igniteui-react-core"; import { AnimationKeyFrameEffectTiming } from "igniteui-react-core"; import { ThemeResolver } from "./ThemeResolver"; import { ButtonClickEventArgs } from "./ButtonClickEventArgs"; import { MouseEventArgs } from "igniteui-react-core"; import { FocusEventArgs } from "igniteui-react-core"; import { Thickness } from "igniteui-react-core"; import { BrushUtil } from "igniteui-react-core"; import { ButtonVisualModelExport } from "./ButtonVisualModelExport"; import { AppearanceHelper } from "igniteui-react-core"; import { FontUtil } from "igniteui-react-core"; import { Dictionary$2 } from "igniteui-react-core"; import { Theme } from "./Theme"; /** * @hidden */ export let ButtonView = /*@__PURE__*/ (() => { class ButtonView extends Base { constructor() { super(); this.c = null; this.l = null; this.e = null; this.i = new List$1(Delegate_$type, 0); this.f = true; this.o = null; this.k = NaN; this.j = NaN; this.m = null; this.d = null; this.n = null; this.q = null; this.p = null; } ar() { } h() { return true; } get r() { return this.o; } get t() { return this.n; } al(a) { if (a == null) { for (let b of fromEnum(this.i)) { b(); } this.i.clear(); return; } this.l = a; this.l.rootWrapper.setStyleProperty("display", "flex"); this.l.rootWrapper.setStyleProperty("flex-direction", "row"); this.l.rootWrapper.setStyleProperty("flex-wrap", "no-wrap"); this.l.rootWrapper.setStyleProperty("align-items", "center"); let c = this.l.createElement("button"); this.o = c; this.o.setStyleProperty("position", "relative"); this.o.setStyleProperty("display", "inline-flex"); this.o.setStyleProperty("align-items", "center"); this.o.setStyleProperty("justify-content", "center"); this.a1(); this.o.setStyleProperty("border", "none"); this.o.setStyleProperty("cursor", "pointer"); this.o.setStyleProperty("user-select", "none"); this.o.setStyleProperty("outline-style", "none"); this.o.setStyleProperty("-webkit-tap-highlight-color", "transparent"); this.o.setStyleProperty("overflow", "hidden"); this.o.setStyleProperty("white-space", "no-wrap"); this.o.setStyleProperty("color", "#000"); this.o.setStyleProperty("background", this.c.nt._fill); NativeUI.p(this.o, this.c.k4); this.o.setAttribute("id", this.c.hz); this.ay(); this.i.add(c.listen("change", runOn(this, this.aa))); this.i.add(c.listen("click", runOn(this, this.ab))); this.i.add(c.listen("focus", runOn(this, this.ac))); this.i.add(c.listen("blur", runOn(this, this.z))); this.i.add(this.l.rootWrapper.listen("mouseenter", runOn(this, this.w))); this.i.add(this.l.rootWrapper.listen("mouseleave", runOn(this, this.x))); this.i.add(this.l.rootWrapper.listen("mousedown", runOn(this, this.v))); this.i.add(this.l.rootWrapper.listen("mouseup", runOn(this, this.y))); this.i.add(this.l.rootWrapper.listen("focusin", runOn(this, this.ad))); this.i.add(this.l.rootWrapper.listen("focusout", runOn(this, this.ae))); this.l.append(c); let d = this.l.createElement("div"); let e = this.l.getSubRenderer(d); d.setStyleProperty("position", "absolute"); d.setStyleProperty("width", "100%"); d.setStyleProperty("height", "100%"); d.setStyleProperty("left", "0px"); d.setStyleProperty("top", "0px"); d.setStyleProperty("overflow", "hidden"); let f = new XRipple(); f.provideContainer(e); f.q = c; let g = this.l.getExternal(f, this.l.rootWrapper, this.l.getExternal(this.c, null, null)); f.h = false; f.k = true; this.d = f; this.o.append(d); let h = this.l.createElement("div"); h.addClass("ig-button-content"); h.setStyleProperty("font-family", "Verdana"); h.setStyleProperty("font-weight", "400"); h.setStyleProperty("font-size", ".875rem"); this.n = h; this.i.add(h.listen("click", runOn(this, this.u))); this.o.append(h); this.p = h; this.l.getPortal(h, "ChildContent", (i) => { let comp_ = i.componentRef; this.q = comp_; { this.p.setStyleProperty("flex-direction", this.c.g5); this.p.setStyleProperty("align-items", this.c.fc); let direction_ = this.c.g5; let display_ = this.c.fk != null ? this.c.fk : this.c.f1; let alignItems_ = this.c.fc; comp_.display = display_; comp_.flexDirection = direction_; comp_.alignItems = alignItems_; } }, true); this.c.kq(); } an() { this.d.i = this.c.at; } a1() { let a = "2.25rem"; let b = "2.25rem"; let c = "2.25rem"; let d = "2.25rem"; let e = "3.5rem"; let f = "3.5rem"; let g = "3.5rem"; let h = "3.5rem"; let i = "5.5rem"; let j = "2.25rem"; let k = "0px"; let l = ".9375rem"; let m = ".5625rem 1rem"; switch (this.c.r) { case 2: m = ".375rem .75rem"; j = "1.875rem"; e = "3rem"; f = "3rem"; g = "3rem"; h = "3rem"; l = ".6875rem"; break; case 3: m = ".1875rem 1rem"; j = "1.5rem"; f = "2.5rem"; e = "2.5rem"; h = "2.5rem"; g = "2.5rem"; l = ".4375rem"; break; case 4: m = "0.09375rem 0.5rem"; j = "0.5rem"; f = "1.5rem"; e = "1.5rem"; h = "1.5rem"; g = "1.5rem"; l = "0.21875rem"; b = "1rem"; a = "1rem"; d = "1rem"; c = "1rem"; break; } if (!isNaN_(this.c.bn) && !isNaN_(this.c.bp) && !isNaN_(this.c.bo) && !isNaN_(this.c.bm)) { m = this.c.bp + "px " + this.c.bo + "px " + this.c.bm + "px " + this.c.bn + "px"; } if (this.c.e == 4) { this.o.setStyleProperty("min-width", a); this.o.setStyleProperty("min-height", b); this.o.setStyleProperty("padding", k); this.o.setStyleProperty("width", c); this.o.setStyleProperty("height", d); } else if (this.c.e == 3) { this.o.setStyleProperty("min-width", e); this.o.setStyleProperty("min-height", f); this.o.setStyleProperty("padding", l); this.o.setStyleProperty("width", g); this.o.setStyleProperty("height", h); } else { this.o.setStyleProperty("width", "auto"); this.o.setStyleProperty("height", "auto"); this.o.setStyleProperty("min-width", i); this.o.setStyleProperty("min-height", j); this.o.setStyleProperty("padding", m); } this.l.rootWrapper.setStyleProperty("height", "auto"); if (!isNaN_(this.c.bk) && this.c.bk > 0) { this.o.setStyleProperty("border-style", "solid"); } else { this.o.setStyleProperty("border-style", "none"); } if (!isNaN_(this.k)) { this.o.setStyleProperty("min-width", this.k.toString() + "px"); } if (!isNaN_(this.j)) { this.o.setStyleProperty("min-height", this.j.toString() + "px"); } if (this.c.az) { this.o.setStyleProperty("width", "100%"); this.o.setStyleProperty("height", "100%"); this.l.rootWrapper.setStyleProperty("height", "100%"); } } av() { switch (this.c.lj) { case 1: this.o.setStyleProperty("justify-content", "center"); this.p.setStyleProperty("flex-grow", "unset"); break; case 3: this.o.setStyleProperty("justify-content", "stretch"); this.p.setStyleProperty("flex-grow", "1"); break; case 0: this.o.setStyleProperty("justify-content", "left"); this.p.setStyleProperty("flex-grow", "unset"); break; case 2: this.o.setStyleProperty("justify-content", "right"); this.p.setStyleProperty("flex-grow", "unset"); break; } } ax(a) { this.k = a; } aw(a) { this.j = a; } at() { this.o.setAttribute("disabled", this.c.disabled ? "true" : "false"); this.o.setProperty("disabled", this.c.disabled); } ao() { if (this.l != null) { this.l.rootWrapper.setStyleProperty("display", this.c.f1); let comp_ = this.q; if (this.q != null) { this.p.setStyleProperty("display", this.c.f1); let display_ = this.c.fk != null ? this.c.f1 : this.c.fk; comp_.display = display_; } let ext_ = this.l.getExternal(this.c, null, null); if (ext_ && ext_._onDisplayChanged) { ext_._onDisplayChanged(); } ; } } ak() { if (this.l != null) { let comp_ = this.q; if (this.q != null) { let display_ = this.c.fk != null ? this.c.fk : this.c.f1; comp_.display = display_; } } } ai() { if (this.l != null) { this.l.rootWrapper.setStyleProperty("align-items", this.c.fc); this.o.setStyleProperty("align-items", this.c.fc); let comp_ = this.q; if (this.q != null) { this.p.setStyleProperty("align-items", this.c.fc); let alignItems_ = this.c.fc; comp_.alignItems = alignItems_; } let ext_ = this.l.getExternal(this.c, null, null); if (ext_ && ext_._onAlignItemsChanged) { ext_._onAlignItemsChanged(); } ; } } ap() { if (this.l != null) { this.l.rootWrapper.setStyleProperty("flex-direction", this.c.g5); this.o.setStyleProperty("flex-direction", this.c.g5); let ext_ = this.l.getExternal(this.c, null, null); let comp_ = this.q; if (this.q != null) { this.p.setStyleProperty("flex-direction", this.c.g5); let direction_ = this.c.g5; comp_.flexDirection = direction_; } if (ext_ && ext_._onFlexDirectionChanged) { ext_._onFlexDirectionChanged(); } ; } } aq() { if (this.l != null) { this.l.rootWrapper.setStyleProperty("flex-grow", this.c.g7); this.o.setStyleProperty("flex-grow", this.c.g7); let ext_ = this.l.getExternal(this.c, null, null); if (ext_ && ext_._onFlexGrowChanged) { ext_._onFlexGrowChanged(); } ; } } u(a) { } ay() { if (this.h()) { let a = this.c.hz; this.o.setAttribute("name", this.c.h7); this.o.setProperty("value", this.c.ef); if (this.c.a0) { this.o.setAttribute("tabindex", this.c.d8.toString()); } this.o.setProperty("disabled", this.c.disabled); { } this.o.setAttribute("aria-label", this.c.fe); this.o.setStyleProperty("cursor", !this.c.aw ? "pointer" : "unset"); } } as() { if (this.h()) { let a = this.c.hz; this.o.setAttribute("id", a); } } w(a) { this.c.km(); if (this.c.a6) { a.stopPropagation(); } } x(a) { this.c.kn(); if (this.c.a6) { a.stopPropagation(); } } v(a) { this.c.kl(); if (this.c.a6) { a.stopPropagation(); } } y(a) { this.c.ko(); if (this.c.a6) { a.stopPropagation(); } } z(a) { this.c.kf(); } ac(a) { this.c.ki(); } ab(a) { this.c.kg(); if (!this.c.au) { a.preventDefault(); } if (this.c.a6) { a.stopPropagation(); } } ad(a) { this.c.kj(); } ae(a) { this.c.kk(a.originalEvent.relatedTarget, a.originalEvent.target); } g() { return false; } aa(a) { } ah() { if (KeyFrameAnimationFactory.h == null) { KeyFrameAnimationFactory.h = this.l; } } aj() { this.f = true; this.i.add(this.o.listen("change", runOn(this, this.aa))); this.i.add(this.o.listen("click", runOn(this, this.ab))); this.i.add(this.o.listen("focus", runOn(this, this.ac))); this.i.add(this.o.listen("blur", runOn(this, this.z))); this.i.add(this.n.listen("click", runOn(this, this.u))); this.i.add(this.o.listen("mouseenter", runOn(this, this.w))); this.i.add(this.o.listen("mouseleave", runOn(this, this.x))); this.i.add(this.o.listen("mousedown", runOn(this, this.v))); this.i.add(this.o.listen("mouseup", runOn(this, this.y))); this.i.add(this.o.listen("focusin", runOn(this, this.ad))); this.i.add(this.o.listen("focusout", runOn(this, this.ae))); } am() { this.f = false; for (let a of fromEnum(this.i)) { a(); } this.i.clear(); } au() { let model_ = this.c; if (model_.externalObject && model_.externalObject.refreshDefaults) { model_.externalObject.refreshDefaults(); } ; } az(a, b) { this.d.ax = a; this.d.aw = b; } a0(a, b) { let c = ElevationHelper.e(a, this.c.n5, this.c.n2, this.c.ns, b); this.o.setStyleProperty("box-shadow", c); } a2(a) { if (a != null) { this.n.setStyleProperty("font", a.fontString); } } af(a) { this.n.append(a); } ag() { this.n.removeChildren(); } s() { return this.n.getChildCount() > 0 ? this.n.getChildAt(0) : null; } b() { let rect_ = this.l.rootWrapper.getNativeElement().getBoundingClientRect(); let a = (rect_.top); let b = (rect_.left); let c = new Array(2); c[0] = a; c[1] = b; return c; } a() { let a = new Array(2); a[0] = NativeUI.k(this.r); a[1] = NativeUI.d(this.r); return a; } } ButtonView.$t = /*@__PURE__*/ markType(ButtonView, 'ButtonView'); return ButtonView; })(); /** * @hidden */ export let XButton = /*@__PURE__*/ (() => { class XButton extends Base { constructor() { super(); this._view = null; this.ee = null; this.pt = XButton.l.ag(XButton.n, "UmbraShadowColor"); this.ph = XButton.l.ag(XButton.n, "PenumbraShadowColor"); this.n8 = XButton.l.ag(XButton.n, "AmbientShadowColor"); this.w = XButton.l.d(XButton.n, "ElevationMode"); this.pk = XButton.l.af(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 0), "DisabledBackgroundColor"); this.pl = XButton.l.af(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 0), "DisabledBorderColor"); this.pm = XButton.l.af(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 0), "DisabledTextColor"); this.df = XButton.l.n(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 0), "DisabledElevation"); this.di = XButton.l.n(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 0), "RestingElevation"); this.dh = XButton.l.n(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 0), "HoverElevation"); this.dg = XButton.l.n(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 0), "FocusElevation"); this.pj = XButton.l.af(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 0), "BorderColor"); this.pr = XButton.l.af(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 0), "RippleColor"); this.lb = XButton.l.y(XButton.n, 1, enumGetBox(ButtonDisplayStyle_$type, 0), "CornerRadius"); this.bu = XButton.l.i(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 0), "BorderWidth"); this.pi = XButton.l.af(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 0), "BackgroundColor"); this.ps = XButton.l.af(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 0), "TextColor"); this.pq = XButton.l.af(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 0), "HoverTextColor"); this.pp = XButton.l.af(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 0), "HoverBackgroundColor"); this.pn = XButton.l.af(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 0), "FocusBackgroundColor"); this.po = XButton.l.af(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 0), "FocusTextColor"); this.om = XButton.l.af(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 1), "DisabledBackgroundColor"); this.on = XButton.l.af(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 1), "DisabledBorderColor"); this.oo = XButton.l.af(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 1), "DisabledTextColor"); this.c3 = XButton.l.n(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 1), "DisabledElevation"); this.c6 = XButton.l.n(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 1), "RestingElevation"); this.c5 = XButton.l.n(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 1), "HoverElevation"); this.c4 = XButton.l.n(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 1), "FocusElevation"); this.ol = XButton.l.af(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 1), "BorderColor"); this.ot = XButton.l.af(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 1), "RippleColor"); this.k8 = XButton.l.y(XButton.n, 1, enumGetBox(ButtonDisplayStyle_$type, 1), "CornerRadius"); this.br = XButton.l.i(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 1), "BorderWidth"); this.ok = XButton.l.af(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 1), "BackgroundColor"); this.ou = XButton.l.af(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 1), "TextColor"); this.os = XButton.l.af(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 1), "HoverTextColor"); this.or = XButton.l.af(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 1), "HoverBackgroundColor"); this.op = XButton.l.af(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 1), "FocusBackgroundColor"); this.oq = XButton.l.af(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 1), "FocusTextColor"); this.o8 = XButton.l.af(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 2), "DisabledBackgroundColor"); this.o9 = XButton.l.af(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 2), "DisabledBorderColor"); this.pa = XButton.l.af(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 2), "DisabledTextColor"); this.db = XButton.l.n(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 2), "DisabledElevation"); this.de = XButton.l.n(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 2), "RestingElevation"); this.dd = XButton.l.n(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 2), "HoverElevation"); this.dc = XButton.l.n(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 2), "FocusElevation"); this.o7 = XButton.l.af(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 2), "BorderColor"); this.pf = XButton.l.af(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 2), "RippleColor"); this.la = XButton.l.y(XButton.n, 1, enumGetBox(ButtonDisplayStyle_$type, 2), "CornerRadius"); this.bt = XButton.l.i(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 2), "BorderWidth"); this.o6 = XButton.l.af(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 2), "BackgroundColor"); this.pg = XButton.l.af(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 2), "TextColor"); this.pe = XButton.l.af(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 2), "HoverTextColor"); this.pd = XButton.l.af(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 2), "HoverBackgroundColor"); this.pb = XButton.l.af(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 2), "FocusBackgroundColor"); this.pc = XButton.l.af(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 2), "FocusTextColor"); this.ox = XButton.l.af(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 4), "DisabledBackgroundColor"); this.oy = XButton.l.af(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 4), "DisabledBorderColor"); this.oz = XButton.l.af(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 4), "DisabledTextColor"); this.c7 = XButton.l.n(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 4), "DisabledElevation"); this.da = XButton.l.n(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 4), "RestingElevation"); this.c9 = XButton.l.n(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 4), "HoverElevation"); this.c8 = XButton.l.n(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 4), "FocusElevation"); this.ow = XButton.l.af(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 4), "BorderColor"); this.o4 = XButton.l.af(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 4), "RippleColor"); this.k9 = XButton.l.y(XButton.n, 1, enumGetBox(ButtonDisplayStyle_$type, 4), "CornerRadius"); this.bs = XButton.l.i(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 4), "BorderWidth"); this.ov = XButton.l.af(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 4), "BackgroundColor"); this.o5 = XButton.l.af(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 4), "TextColor"); this.o3 = XButton.l.af(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 4), "HoverTextColor"); this.o2 = XButton.l.af(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 4), "HoverBackgroundColor"); this.o0 = XButton.l.af(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 4), "FocusBackgroundColor"); this.o1 = XButton.l.af(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 4), "FocusTextColor"); this.ob = XButton.l.af(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 3), "DisabledBackgroundColor"); this.oc = XButton.l.af(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 3), "DisabledBorderColor"); this.od = XButton.l.af(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 3), "DisabledTextColor"); this.cz = XButton.l.n(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 3), "DisabledElevation"); this.c2 = XButton.l.n(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 3), "RestingElevation"); this.c1 = XButton.l.n(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 3), "HoverElevation"); this.c0 = XButton.l.n(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 3), "FocusElevation"); this.oa = XButton.l.af(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 3), "BorderColor"); this.oi = XButton.l.af(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 3), "RippleColor"); this.k7 = XButton.l.y(XButton.n, 1, enumGetBox(ButtonDisplayStyle_$type, 3), "CornerRadius"); this.bq = XButton.l.i(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 3), "BorderWidth"); this.n9 = XButton.l.af(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 3), "BackgroundColor"); this.oj = XButton.l.af(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 3), "TextColor"); this.oh = XButton.l.af(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 3), "HoverTextColor"); this.og = XButton.l.af(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 3), "HoverBackgroundColor"); this.oe = XButton.l.af(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 3), "FocusBackgroundColor"); this.of = XButton.l.af(XButton.n, enumGetBox(ButtonDisplayStyle_$type, 3), "FocusTextColor"); this.bh = NaN; this.bg = NaN; this.d = 0; this.q = 0; this.m = 0; this.p = 1; this.lm = ThemeResolver.ah(XButton.n, XButton.l, enumGetBox(ButtonDisplayStyle_$type, 0), "BorderColor"); this.lx = ThemeResolver.ai(XButton.n, XButton.l, "UmbraShadowColor"); this.lu = ThemeResolver.ai(XButton.n, XButton.l, "PenumbraShadowColor"); this.lk = ThemeResolver.ai(XButton.n, XButton.l, "AmbientShadowColor"); this.b5 = ThemeResolver.p(XButton.n, XButton.l, enumGetBox(ButtonDisplayStyle_$type, 0), "RestingElevation"); this.b3 = ThemeResolver.p(XButton.n, XButton.l, enumGetBox(ButtonDisplayStyle_$type, 0), "FocusElevation"); this.b4 = ThemeResolver.p(XButton.n, XButton.l, enumGetBox(ButtonDisplayStyle_$type, 0), "HoverElevation"); this.lv = ThemeResolver.ah(XButton.n, XButton.l, enumGetBox(ButtonDisplayStyle_$type, 0), "RippleColor"); this.kx = ThemeResolver.ad(XButton.n, 1, XButton.l, enumGetBox(ButtonDisplayStyle_$type, 0), "CornerRadius"); this.ll = ThemeResolver.ah(XButton.n, XButton.l, enumGetBox(ButtonDisplayStyle_$type, 0), "BackgroundColor"); this.ln = ThemeResolver.ah(XButton.n, XButton.l, enumGetBox(ButtonDisplayStyle_$type, 0), "DisabledBackgroundColor"); this.lo = ThemeResolver.ah(XButton.n, XButton.l, enumGetBox(ButtonDisplayStyle_$type, 0), "DisabledBorderColor"); this.lp = ThemeResolver.ah(XButton.n, XButton.l, enumGetBox(ButtonDisplayStyle_$type, 0), "DisabledTextColor"); this.b2 = ThemeResolver.p(XButton.n, XButton.l, enumGetBox(ButtonDisplayStyle_$type, 0), "DisabledElevation"); this.t = ThemeResolver.f(XButton.n, XButton.l, "ElevationMode"); this.lw = ThemeResolver.ah(XButton.n, XButton.l, enumGetBox(ButtonDisplayStyle_$type, 0), "TextColor"); this.lt = ThemeResolver.ah(XButton.n, XButton.l, enumGetBox(ButtonDisplayStyle_$type, 0), "HoverTextColor"); this.lq = ThemeResolver.ah(XButton.n, XButton.l, enumGetBox(ButtonDisplayStyle_$type, 0), "FocusBackgroundColor"); this.lr = ThemeResolver.ah(XButton.n, XButton.l, enumGetBox(ButtonDisplayStyle_$type, 0), "FocusTextColor"); this.ls = ThemeResolver.ah(XButton.n, XButton.l, enumGetBox(ButtonDisplayStyle_$type, 0), "HoverBackgroundColor"); this.a7 = ThemeResolver.k(XButton.n, XButton.l, enumGetBox(ButtonDisplayStyle_$type, 0), "BorderWidth"); this.nf = null; this.nh = null; this.ni = null; this.nj = null; this.cp = -1; this.nm = null; this.ng = null; this.cs = -1; this.cr = -1; this.cq = -1; this.bj = NaN; this.k3 = new CornerRadius(1, NaN, NaN, NaN, NaN); this.no = null; this.md = null; this.mf = null; this.mg = null; this.mh = null; this.cb = -1; this.mk = null; this.me = null; this.ce = -1; this.cd = -1; this.cc = -1; this.mm = null; this.mn = null; this.ml = null; this.mi = null; this.mj = null; this.be = NaN; this.k0 = new CornerRadius(1, NaN, NaN, NaN, NaN); this.ly = null; this.l0 = null; this.l1 = null; this.l2 = null; this.b6 = -1; this.u = 0; this.mq = null; this.lz = null; this.ct = -1; this.cg = -1; this.cf = -1; this.aa = null; this.nr = null; this.ms = null; this.nq = null; this.np = null; this.nn = null; this.nk = null; this.nl = null; this.mo = null; this.mp = null; this.a8 = NaN; this.ky = new CornerRadius(1, NaN, NaN, NaN, NaN); this.m4 = null; this.m6 = null; this.m7 = null; this.m8 = null; this.cl = -1; this.nb = null; this.m5 = null; this.co = -1; this.cn = -1; this.cm = -1; this.bi = NaN; this.k2 = new CornerRadius(1, NaN, NaN, NaN, NaN); this.nd = null; this.ne = null; this.nc = null; this.m9 = null; this.na = null; this.l3 = null; this.l5 = null; this.l6 = null; this.l7 = null; this.b7 = -1; this.mr = null; this.l4 = null; this.ca = -1; this.b9 = -1; this.b8 = -1; this.bd = NaN; this.kz = new CornerRadius(1, NaN, NaN, NaN, NaN); this.mb = null; this.mc = null; this.ma = null; this.l8 = null; this.l9 = null; this.mt = null; this.mv = null; this.mw = null; this.mx = null; this.ch = -1; this.m0 = null; this.mu = null; this.ck = -1; this.cj = -1; this.ci = -1; this.bf = NaN; this.k1 = new CornerRadius(1, NaN, NaN, NaN, NaN); this.m2 = null; this.m3 = null; this.m1 = null; this.my = null; this.mz = null; this.en = "ig-native-button-" + XButton.ea++; this.em = "ig-button-" + XButton.d9++; this.ej = "inline-block"; this.ei = null; this.ek = "inline-block"; this.el = null; this.eg = "center"; this.eb = null; this.eo = null; this.cu = 0; this.an = false; this.eh = null; this.am = false; this.ap = false; this.aq = true; this.ak = false; this.ag = false; this.ai = false; this.ar = false; this.ao = false; this.al = false; this.aj = false; this.ba = NaN; this.bc = NaN; this.bb = NaN; this.a9 = NaN; this.li = 1; this.rm = 1; this.ah = true; this.as = false; this.propertyChanged = null; this.clicked = null; this.mouseEnter = null; this.mouseLeave = null; this.mouseDown = null; this.mouseUp = null; this.gotFocus = null; this.lostFocus = null; let a = new ButtonView(); a.c = this; this.view = a; this.view.ar(); } get view() { return this._view; } set view(a) { this._view = a; } destroy() { this.provideContainer(null); } kp(a, b, c) { if (this.propertyChanged != null) { this.propertyChanged(this, new PropertyChangedEventArgs(a)); } this.kr(a, b, c); } kr(a, b, c) { switch (a) { case "CornerRadius": case "BorderColor": case "RestingElevation": case "HoverElevation": case "FocusElevation": case "RippleColor": case "BorderWidth": case "BackgroundColor": case "DisabledBackgroundColor": case "DisabledBorderColor": case "DisabledTextColor": case "DisabledElevation": case "HoverBackgroundColor": case "FocusTextColor": case "TextColor": case "HoverTextColor": case "FocusBackgroundColor": case "RaisedBorderColor": case "RaisedRestingElevation": case "RaisedFocusElevation": case "RaisedHoverElevation": case "RaisedRippleColor": case "RaisedBorderWidth": case "RaisedBackgroundColor": case "RaisedDisabledBackgroundColor": case "RaisedDisabledBorderColor": case "RaisedDisabledTextColor": case "RaisedDisabledElevation": case "RaisedHoverBackgroundColor": case "RaisedCornerRadius": case "RaisedFocusBackgroundColor": case "RaisedFocusTextColor": case "RaisedTextColor": case "RaisedHoverTextColor": case "FlatBorderColor": case "FlatRestingElevation": case "FlatFocusElevation": case "FlatHoverElevation": case "FlatRippleColor": case "FlatBorderWidth": case "FlatBackgroundColor": case "FlatDisabledBackgroundColor": case "FlatDisabledBorderColor": case "FlatDisabledTextColor": case "FlatDisabledElevation": case "FlatHoverBackgroundColor": case "FlatCornerRadius": case "FlatFocusBackgroundColor": case "FlatFocusTextColor": case "FlatTextColor": case "FlatHoverTextColor": case "OutlinedRippleColor": case "OutlinedRestingElevation": case "OutlinedFocusElevation": case "OutlinedHoverElevation": case "OutlinedBorderColor": case "OutlinedBorderWidth": case "OutlinedBackgroundColor": case "OutlinedDisabledBackgroundColor": case "OutlinedDisabledBorderColor": case "OutlinedDisabledTextColor": case "OutlinedDisabledElevation": case "OutlinedHoverBackgroundColor": case "OutlinedCornerRadius": case "OutlinedFocusBackgroundColor": case "OutlinedFocusTextColor": case "OutlinedTextColor": case "OutlinedHoverTextColor": case "FabBorderColor": case "FabRippleColor": case "FabRestingElevation": case "FabFocusElevation": case "FabHoverElevation": case "FabBorderWidth": case "FabBackgroundColor": case "FabDisabledBackgroundColor": case "FabDisabledBorderColor": case "FabDisabledTextColor": case "FabDisabledElevation": case "FabHoverBackgroundColor": case "FabCornerRadius": case "FabFocusBackgroundColor": case "FabFocusTextColor": case "FabTextColor": case "FabHoverTextColor": case "IconRestingElevation": case "IconFocusElevation": case "IconHoverElevation": case "IconBorderColor": case "IconRippleColor": case "IconBorderWidth": case "IconBackgroundColor": case "IconDisabledBackgroundColor": case "IconDisabledBorderColor": case "IconDisabledTextColor": case "IconDisabledElevation": case "IconHoverBackgroundColor": case "IconCornerRadius": case "IconFocusBackgroundColor": case "IconFocusTextColor": case "IconTextColor": case "IconHoverTextColor": case "ElevationMode": this.kv(); break; case "BaseTheme": this.kw(this.o == 0 ? 2 : this.o); this.kv(); break; case "IsDisabled": this.at = this.disabled || this.ax; this.kv(); this.view.at(); this.ku(); break; case "DisableRipple": this.at = this.disabled || this.ax; this.kv(); break; case "TextStyle": case "DisableHover": this.ku(); break; case "ActualDisableRipple": this.view.an(); break; case "ActualBackgroundColor": case "ActualDisabledBackgroundColor": case "ActualDisabledBorderColor": case "ActualDisabledTextColor": case "ActualDisabledElevation": case "ActualHoverBackgroundColor": case "ActualBorderColor": case "ActualFocusTextColor": case "ActualHoverTextColor": case "ActualElevationMode": this.ku(); break; case "Density": this.r = this.s == 0 ? 1 : this.s; this.kw(this.o == 0 ? 2 : this.o); this.kv(); break; case "ActualDensity": case "ActualBorderWidth": case "ActualCornerRadius": if (this.e == 4) { this.kt(); } this.view.a1(); this.ku(); break; case "DisplayType": this.view.a1(); this.kv(); this.ku(); break; case "ContentPaddingLeft": case "ContentPaddingTop": case "ContentPaddingRight": case "ContentPaddingBottom": case "FillAvailableSpace": this.view.a1(); break; case "HorizontalContentAlignment": case "VerticalContentAlignment": this.view.av(); break; case "InputId": this.view.as(); break; case "Display": this.view.ao(); break; case "ChildContentDisplay": this.view.ak(); break; case "FlexDirection": this.view.ap(); break; case "FlexGrow": this.view.aq(); break; case "AlignItems": this.view.ai(); break; case "TabIndex": this.view.ay(); break; case "DisablePointer": this.view.ay(); break; case "MinWidth": this.view.ax(this.bz); this.view.a1(); break; case "MinHeight": this.view.aw(this.by); this.view.a1(); break; } } k5(a, b) { return new CornerRadius(1, !isNaN_(a.d) ? a.d : b.d, !isNaN_(a.e) ? a.e : b.e, !isNaN_(a.c) ? a.c : b.c, !isNaN_(a.b) ? a.b : b.b); } kv() { this.v = this.x != 0 ? this.x : this.w; this.n5 = this.pt; this.n2 = this.ph; this.ns = this.n8; switch (this.e) { case 0: this.nv = this.pu != null ? this.pu : this.rb != null ? this.rb : this.pk; this.nw = this.pv != null ? this.pv : this.rc != null ? this.rc : this.pl; this.nx = this.pw != null ? this.pw : this.rd != null ? this.rd : this.pm; this.cv = this.dj >= 0 ? this.dj : this.d3 >= 0 ? this.d3 : this.df; this.cy = this.d7 >= 0 ? this.d7 : this.d6 >= 0 ? this.d6 : this.di; this.cx = this.du >= 0 ? this.du : this.d5 >= 0 ? this.d5 : this.dh; this.cw = this.dt >= 0 ? this.dt : this.d4 >= 0 ? this.d4 : this.dg; this.nu = this.n7 != null ? this.n7 : this.ra != null ? this.ra : this.pj; this.nt = this.n6 != null ? this.n6 : this.q9 != null ? this.q9 : this.pi; this.n0 = this.ql != null ? this.ql : this.rg != null ? this.rg : this.pp; this.k4 = this.k5(this.k6, this.k5(this.lh, this.lb)); this.bk = !isNaN_(this.bl) ? this.bl : !isNaN_(this.b1) ? this.b1 : this.bu; this.n3 = this.rk != null ? this.rk : this.ri != null ? this.ri : this.pr; this.ny = this.qj != null ? this.qj : this.re != null ? this.re : this.pn; this.nz = this.qk != null ? this.qk : this.rf != null ? this.rf : this.po; this.n4 = this.rl != null ? this.rl : this.rj != null ? this.rj : this.ps; this.n1 = this.qm != null ? this.qm : this.rh != null ? this.rh : this.pq; break; case 2: this.nv = this.pu != null ? this.pu : this.q0 != null ? this.q0 : this.o8; this.nw = this.pv != null ? this.pv : this.q1 != null ? this.q1 : this.o9; this.nx = this.pw != null ? this.pw : this.q2 != null ? this.q2 : this.pa; this.cv = this.dj >= 0 ? this.dj : this.dz >= 0 ? this.dz : this.db; this.cy = this.d7 >= 0 ? this.d7 : this.d2 >= 0 ? this.d2 : this.de; this.cx = this.du >= 0 ? this.du : this.d1 >= 0 ? this.d1 : this.dd; this.cw = this.dt >= 0 ? this.dt : this.d0 >= 0 ? this.d0 : this.dc; this.nu = this.n7 != null ? this.n7 : this.qz != null ? this.qz : this.o7; this.nt = this.ql != null ? this.ql : this.n6 != null ? this.n6 : this.qy != null ? this.qy : this.o6; this.n0 = this.q5 != null ? this.q5 : this.pd; this.k4 = this.k5(this.k6, this.k5(this.lg, this.la)); this.bk = !isNaN_(this.bl) ? this.bl : !isNaN_(this.b0) ? this.b0 : this.bt; this.n3 = this.rk != null ? this.rk : this.q7 != null ? this.q7 : this.pf; this.ny = this.qj != null ? this.qj : this.q3 != null ? this.q3 : this.pb; this.nz = this.qk != null ? this.qk : this.q4 != null ? this.q4 : this.pc; this.n4 = this.rl != null ? this.rl : this.q8 != null ? this.q8 : this.pg; this.n1 = this.qm != null ? this.qm : this.q6 != null ? this.q6 : this.pe; break; case 1: this.nv = this.pu != null ? this.pu : this.qa != null ? this.qa : this.om; this.nw = this.pv != null ? this.pv : this.qb != null ? this.qb : this.on; this.nx = this.pw != null ? this.pw : this.qc != null ? this.qc : this.oo; this.cv = this.dj >= 0 ? this.dj : this.dp >= 0 ? this.dp : this.c3; this.cy = this.d7 >= 0 ? this.d7 : this.ds >= 0 ? this.ds : this.c6; this.cx = this.du >= 0 ? this.du : this.dr >= 0 ? this.dr : this.c5; this.cw = this.dt >= 0 ? this.dt : this.dq >= 0 ? this.dq : this.c4; this.nu = this.n7 != null ? this.n7 : this.p9 != null ? this.p9 : this.ol; this.nt = this.n6 != null ? this.n6 : this.p8 != null ? this.p8 : this.ok; this.n0 = this.ql != null ? this.ql : this.qf != null ? this.qf : this.or; this.k4 = this.k5(this.k6, this.k5(this.ld, this.k8)); this.bk = !isNaN_(this.bl) ? this.bl : !isNaN_(this.bw) ? this.bw : this.br; this.n3 = this.rk != null ? this.rk : this.qh != null ? this.qh : this.ot; this.ny = this.qj != null ? this.qj : this.qd != null ? this.qd : this.op; this.nz = this.qk != null ? this.qk : this.qe != null ? this.qe : this.oq; this.n4 = this.rl != null ? this.rl : this.qi != null ? this.qi : this.ou; this.n1 = this.qm != null ? this.qm : this.qg != null ? this.qg : this.os; break; case 4: this.nv = this.pu != null ? this.pu : this.qp != null ? this.qp : this.ox; this.nw = this.pv != null ? this.pv : this.qq != null ? this.qq : this.oy; this.nx = this.pw != null ? this.pw : this.qr != null ? this.qr : this.oz; this.cv = this.dj >= 0 ? this.dj : this.dv >= 0 ? this.dv : this.c7; this.cy = this.d7 >= 0 ? this.d7 : this.dy >= 0 ? this.dy : this.da; this.cx = this.du >= 0 ? this.du : this.dx >= 0 ? this.dx : this.c9; this.cw = this.dt >= 0 ? this.dt : this.dw >= 0 ? this.dw : this.c8; this.nu = this.n7 != null ? this.n7 : this.qo != null ? this.qo : this.ow; this.nt = this.n6 != null ? this.n6 : this.qn != null ? this.qn : this.ov; this.n0 = this.ql != null ? this.ql : this.qu != null ? this.qu : this.o2; this.kt(); this.bk = !isNaN_(this.bl) ? this.bl : !isNaN_(this.bx) ? this.bx : this.bs; this.n3 = this.rk != nul