UNPKG

igniteui-react-inputs

Version:

Ignite UI React input components.

1,054 lines 128 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.b = null; this.k = null; this.d = null; this.h = new List$1(Delegate_$type, 0); this.e = true; this.n = null; this.j = NaN; this.i = NaN; this.l = null; this.c = null; this.m = null; this.p = null; this.o = null; } aq() { } g() { return true; } get q() { return this.n; } get s() { return this.m; } ak(a) { if (a == null) { for (let b of fromEnum(this.h)) { b(); } this.h.clear(); return; } this.k = a; this.k.rootWrapper.setStyleProperty("display", "flex"); this.k.rootWrapper.setStyleProperty("flex-direction", "row"); this.k.rootWrapper.setStyleProperty("flex-wrap", "no-wrap"); this.k.rootWrapper.setStyleProperty("align-items", "center"); let c = this.k.createElement("button"); this.n = c; this.n.setStyleProperty("position", "relative"); this.n.setStyleProperty("display", "inline-flex"); this.n.setStyleProperty("align-items", "center"); this.n.setStyleProperty("justify-content", "center"); this.a0(); this.n.setStyleProperty("border", "none"); this.n.setStyleProperty("cursor", "pointer"); this.n.setStyleProperty("user-select", "none"); this.n.setStyleProperty("outline-style", "none"); this.n.setStyleProperty("-webkit-tap-highlight-color", "transparent"); this.n.setStyleProperty("overflow", "hidden"); this.n.setStyleProperty("white-space", "no-wrap"); this.n.setStyleProperty("color", "#000"); this.n.setStyleProperty("background", this.b.no._fill); NativeUI.o(this.n, this.b.kz); this.n.setAttribute("id", this.b.hy); this.ax(); this.h.add(c.listen("change", runOn(this, this.z))); this.h.add(c.listen("click", runOn(this, this.aa))); this.h.add(c.listen("focus", runOn(this, this.ab))); this.h.add(c.listen("blur", runOn(this, this.y))); this.h.add(this.k.rootWrapper.listen("mouseenter", runOn(this, this.v))); this.h.add(this.k.rootWrapper.listen("mouseleave", runOn(this, this.w))); this.h.add(this.k.rootWrapper.listen("mousedown", runOn(this, this.u))); this.h.add(this.k.rootWrapper.listen("mouseup", runOn(this, this.x))); this.h.add(this.k.rootWrapper.listen("focusin", runOn(this, this.ac))); this.h.add(this.k.rootWrapper.listen("focusout", runOn(this, this.ad))); this.k.append(c); let d = this.k.createElement("div"); let e = this.k.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.k.getExternal(f, this.k.rootWrapper, this.k.getExternal(this.b, null, null)); f.h = false; f.k = true; this.c = f; this.n.append(d); let h = this.k.createElement("div"); h.addClass("ig-button-content"); h.setStyleProperty("font-family", "Verdana"); h.setStyleProperty("font-weight", "400"); h.setStyleProperty("font-size", ".875rem"); this.m = h; this.h.add(h.listen("click", runOn(this, this.t))); this.n.append(h); this.o = h; this.k.getPortal(h, "ChildContent", (i) => { let comp_ = i.componentRef; this.p = comp_; { this.o.setStyleProperty("flex-direction", this.b.g4); this.o.setStyleProperty("align-items", this.b.fb); let direction_ = this.b.g4; let display_ = this.b.fj != null ? this.b.fj : this.b.f0; let alignItems_ = this.b.fb; comp_.display = display_; comp_.flexDirection = direction_; comp_.alignItems = alignItems_; } }, true); this.b.kl(); } am() { this.c.i = this.b.as; } a0() { 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.b.q) { 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.b.bm) && !isNaN_(this.b.bo) && !isNaN_(this.b.bn) && !isNaN_(this.b.bl)) { m = this.b.bo + "px " + this.b.bn + "px " + this.b.bl + "px " + this.b.bm + "px"; } if (this.b.e == 4) { this.n.setStyleProperty("min-width", a); this.n.setStyleProperty("min-height", b); this.n.setStyleProperty("padding", k); this.n.setStyleProperty("width", c); this.n.setStyleProperty("height", d); } else if (this.b.e == 3) { this.n.setStyleProperty("min-width", e); this.n.setStyleProperty("min-height", f); this.n.setStyleProperty("padding", l); this.n.setStyleProperty("width", g); this.n.setStyleProperty("height", h); } else { this.n.setStyleProperty("width", "auto"); this.n.setStyleProperty("height", "auto"); this.n.setStyleProperty("min-width", i); this.n.setStyleProperty("min-height", j); this.n.setStyleProperty("padding", m); } this.k.rootWrapper.setStyleProperty("height", "auto"); if (!isNaN_(this.b.bj) && this.b.bj > 0) { this.n.setStyleProperty("border-style", "solid"); } else { this.n.setStyleProperty("border-style", "none"); } if (!isNaN_(this.j)) { this.n.setStyleProperty("min-width", this.j.toString() + "px"); } if (!isNaN_(this.i)) { this.n.setStyleProperty("min-height", this.i.toString() + "px"); } if (this.b.ay) { this.n.setStyleProperty("width", "100%"); this.n.setStyleProperty("height", "100%"); this.k.rootWrapper.setStyleProperty("height", "100%"); } } au() { switch (this.b.le) { case 1: this.n.setStyleProperty("justify-content", "center"); this.o.setStyleProperty("flex-grow", "unset"); break; case 3: this.n.setStyleProperty("justify-content", "stretch"); this.o.setStyleProperty("flex-grow", "1"); break; case 0: this.n.setStyleProperty("justify-content", "left"); this.o.setStyleProperty("flex-grow", "unset"); break; case 2: this.n.setStyleProperty("justify-content", "right"); this.o.setStyleProperty("flex-grow", "unset"); break; } } aw(a) { this.j = a; } av(a) { this.i = a; } as() { this.n.setAttribute("disabled", this.b.disabled ? "true" : "false"); this.n.setProperty("disabled", this.b.disabled); } an() { if (this.k != null) { this.k.rootWrapper.setStyleProperty("display", this.b.f0); let comp_ = this.p; if (this.p != null) { this.o.setStyleProperty("display", this.b.f0); let display_ = this.b.fj != null ? this.b.f0 : this.b.fj; comp_.display = display_; } let ext_ = this.k.getExternal(this.b, null, null); if (ext_ && ext_._onDisplayChanged) { ext_._onDisplayChanged(); } ; } } aj() { if (this.k != null) { let comp_ = this.p; if (this.p != null) { let display_ = this.b.fj != null ? this.b.fj : this.b.f0; comp_.display = display_; } } } ah() { if (this.k != null) { this.k.rootWrapper.setStyleProperty("align-items", this.b.fb); this.n.setStyleProperty("align-items", this.b.fb); let comp_ = this.p; if (this.p != null) { this.o.setStyleProperty("align-items", this.b.fb); let alignItems_ = this.b.fb; comp_.alignItems = alignItems_; } let ext_ = this.k.getExternal(this.b, null, null); if (ext_ && ext_._onAlignItemsChanged) { ext_._onAlignItemsChanged(); } ; } } ao() { if (this.k != null) { this.k.rootWrapper.setStyleProperty("flex-direction", this.b.g4); this.n.setStyleProperty("flex-direction", this.b.g4); let ext_ = this.k.getExternal(this.b, null, null); let comp_ = this.p; if (this.p != null) { this.o.setStyleProperty("flex-direction", this.b.g4); let direction_ = this.b.g4; comp_.flexDirection = direction_; } if (ext_ && ext_._onFlexDirectionChanged) { ext_._onFlexDirectionChanged(); } ; } } ap() { if (this.k != null) { this.k.rootWrapper.setStyleProperty("flex-grow", this.b.g6); this.n.setStyleProperty("flex-grow", this.b.g6); let ext_ = this.k.getExternal(this.b, null, null); if (ext_ && ext_._onFlexGrowChanged) { ext_._onFlexGrowChanged(); } ; } } t(a) { } ax() { if (this.g()) { let a = this.b.hy; this.n.setAttribute("name", this.b.h6); this.n.setProperty("value", this.b.ee); if (this.b.az) { this.n.setAttribute("tabindex", this.b.d7.toString()); } this.n.setProperty("disabled", this.b.disabled); { } this.n.setAttribute("aria-label", this.b.fd); this.n.setStyleProperty("cursor", !this.b.av ? "pointer" : "unset"); } } ar() { if (this.g()) { let a = this.b.hy; this.n.setAttribute("id", a); } } v(a) { this.b.kh(); if (this.b.a5) { a.stopPropagation(); } } w(a) { this.b.ki(); if (this.b.a5) { a.stopPropagation(); } } u(a) { this.b.kg(); if (this.b.a5) { a.stopPropagation(); } } x(a) { this.b.kj(); if (this.b.a5) { a.stopPropagation(); } } y(a) { this.b.ka(); } ab(a) { this.b.kd(); } aa(a) { this.b.kb(); if (!this.b.at) { a.preventDefault(); } if (this.b.a5) { a.stopPropagation(); } } ac(a) { this.b.ke(); } ad(a) { this.b.kf(a.originalEvent.relatedTarget, a.originalEvent.target); } f() { return false; } z(a) { } ag() { if (KeyFrameAnimationFactory.h == null) { KeyFrameAnimationFactory.h = this.k; } } ai() { this.e = true; this.h.add(this.n.listen("change", runOn(this, this.z))); this.h.add(this.n.listen("click", runOn(this, this.aa))); this.h.add(this.n.listen("focus", runOn(this, this.ab))); this.h.add(this.n.listen("blur", runOn(this, this.y))); this.h.add(this.m.listen("click", runOn(this, this.t))); this.h.add(this.n.listen("mouseenter", runOn(this, this.v))); this.h.add(this.n.listen("mouseleave", runOn(this, this.w))); this.h.add(this.n.listen("mousedown", runOn(this, this.u))); this.h.add(this.n.listen("mouseup", runOn(this, this.x))); this.h.add(this.n.listen("focusin", runOn(this, this.ac))); this.h.add(this.n.listen("focusout", runOn(this, this.ad))); } al() { this.e = false; for (let a of fromEnum(this.h)) { a(); } this.h.clear(); } at() { let model_ = this.b; if (model_.externalObject && model_.externalObject.refreshDefaults) { model_.externalObject.refreshDefaults(); } ; } ay(a, b) { this.c.ax = a; this.c.aw = b; } az(a, b) { let c = ElevationHelper.e(a, this.b.n0, this.b.nx, this.b.nn, b); this.n.setStyleProperty("box-shadow", c); } a1(a) { if (a != null) { this.m.setStyleProperty("font", a.fontString); } } ae(a) { this.m.append(a); } af() { this.m.removeChildren(); } r() { return this.m.getChildCount() > 0 ? this.m.getChildAt(0) : null; } a() { let rect_ = this.k.rootWrapper.getNativeElement().getBoundingClientRect(); let a = (rect_.top); let b = (rect_.left); let c = new Array(2); c[0] = a; c[1] = b; return c; } } ButtonView.$t = /*@__PURE__*/ markType(ButtonView, 'ButtonView'); return ButtonView; })(); /** * @hidden */ export let XButton = /*@__PURE__*/ (() => { class XButton extends Base { constructor() { super(); this._view = null; this.ed = null; this.po = XButton.k.ae(XButton.m, "UmbraShadowColor"); this.pc = XButton.k.ae(XButton.m, "PenumbraShadowColor"); this.n3 = XButton.k.ae(XButton.m, "AmbientShadowColor"); this.v = XButton.k.d(XButton.m, "ElevationMode"); this.pf = XButton.k.ad(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 0), "DisabledBackgroundColor"); this.pg = XButton.k.ad(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 0), "DisabledBorderColor"); this.ph = XButton.k.ad(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 0), "DisabledTextColor"); this.de = XButton.k.n(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 0), "DisabledElevation"); this.dh = XButton.k.n(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 0), "RestingElevation"); this.dg = XButton.k.n(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 0), "HoverElevation"); this.df = XButton.k.n(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 0), "FocusElevation"); this.pe = XButton.k.ad(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 0), "BorderColor"); this.pm = XButton.k.ad(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 0), "RippleColor"); this.k6 = XButton.k.y(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 0), "CornerRadius"); this.bt = XButton.k.i(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 0), "BorderWidth"); this.pd = XButton.k.ad(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 0), "BackgroundColor"); this.pn = XButton.k.ad(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 0), "TextColor"); this.pl = XButton.k.ad(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 0), "HoverTextColor"); this.pk = XButton.k.ad(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 0), "HoverBackgroundColor"); this.pi = XButton.k.ad(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 0), "FocusBackgroundColor"); this.pj = XButton.k.ad(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 0), "FocusTextColor"); this.oh = XButton.k.ad(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 1), "DisabledBackgroundColor"); this.oi = XButton.k.ad(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 1), "DisabledBorderColor"); this.oj = XButton.k.ad(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 1), "DisabledTextColor"); this.c2 = XButton.k.n(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 1), "DisabledElevation"); this.c5 = XButton.k.n(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 1), "RestingElevation"); this.c4 = XButton.k.n(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 1), "HoverElevation"); this.c3 = XButton.k.n(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 1), "FocusElevation"); this.og = XButton.k.ad(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 1), "BorderColor"); this.oo = XButton.k.ad(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 1), "RippleColor"); this.k3 = XButton.k.y(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 1), "CornerRadius"); this.bq = XButton.k.i(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 1), "BorderWidth"); this.of = XButton.k.ad(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 1), "BackgroundColor"); this.op = XButton.k.ad(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 1), "TextColor"); this.on = XButton.k.ad(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 1), "HoverTextColor"); this.om = XButton.k.ad(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 1), "HoverBackgroundColor"); this.ok = XButton.k.ad(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 1), "FocusBackgroundColor"); this.ol = XButton.k.ad(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 1), "FocusTextColor"); this.o3 = XButton.k.ad(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 2), "DisabledBackgroundColor"); this.o4 = XButton.k.ad(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 2), "DisabledBorderColor"); this.o5 = XButton.k.ad(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 2), "DisabledTextColor"); this.da = XButton.k.n(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 2), "DisabledElevation"); this.dd = XButton.k.n(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 2), "RestingElevation"); this.dc = XButton.k.n(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 2), "HoverElevation"); this.db = XButton.k.n(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 2), "FocusElevation"); this.o2 = XButton.k.ad(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 2), "BorderColor"); this.pa = XButton.k.ad(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 2), "RippleColor"); this.k5 = XButton.k.y(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 2), "CornerRadius"); this.bs = XButton.k.i(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 2), "BorderWidth"); this.o1 = XButton.k.ad(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 2), "BackgroundColor"); this.pb = XButton.k.ad(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 2), "TextColor"); this.o9 = XButton.k.ad(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 2), "HoverTextColor"); this.o8 = XButton.k.ad(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 2), "HoverBackgroundColor"); this.o6 = XButton.k.ad(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 2), "FocusBackgroundColor"); this.o7 = XButton.k.ad(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 2), "FocusTextColor"); this.os = XButton.k.ad(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 4), "DisabledBackgroundColor"); this.ot = XButton.k.ad(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 4), "DisabledBorderColor"); this.ou = XButton.k.ad(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 4), "DisabledTextColor"); this.c6 = XButton.k.n(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 4), "DisabledElevation"); this.c9 = XButton.k.n(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 4), "RestingElevation"); this.c8 = XButton.k.n(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 4), "HoverElevation"); this.c7 = XButton.k.n(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 4), "FocusElevation"); this.or = XButton.k.ad(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 4), "BorderColor"); this.oz = XButton.k.ad(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 4), "RippleColor"); this.k4 = XButton.k.y(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 4), "CornerRadius"); this.br = XButton.k.i(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 4), "BorderWidth"); this.oq = XButton.k.ad(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 4), "BackgroundColor"); this.o0 = XButton.k.ad(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 4), "TextColor"); this.oy = XButton.k.ad(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 4), "HoverTextColor"); this.ox = XButton.k.ad(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 4), "HoverBackgroundColor"); this.ov = XButton.k.ad(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 4), "FocusBackgroundColor"); this.ow = XButton.k.ad(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 4), "FocusTextColor"); this.n6 = XButton.k.ad(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 3), "DisabledBackgroundColor"); this.n7 = XButton.k.ad(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 3), "DisabledBorderColor"); this.n8 = XButton.k.ad(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 3), "DisabledTextColor"); this.cy = XButton.k.n(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 3), "DisabledElevation"); this.c1 = XButton.k.n(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 3), "RestingElevation"); this.c0 = XButton.k.n(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 3), "HoverElevation"); this.cz = XButton.k.n(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 3), "FocusElevation"); this.n5 = XButton.k.ad(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 3), "BorderColor"); this.od = XButton.k.ad(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 3), "RippleColor"); this.k2 = XButton.k.y(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 3), "CornerRadius"); this.bp = XButton.k.i(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 3), "BorderWidth"); this.n4 = XButton.k.ad(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 3), "BackgroundColor"); this.oe = XButton.k.ad(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 3), "TextColor"); this.oc = XButton.k.ad(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 3), "HoverTextColor"); this.ob = XButton.k.ad(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 3), "HoverBackgroundColor"); this.n9 = XButton.k.ad(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 3), "FocusBackgroundColor"); this.oa = XButton.k.ad(XButton.m, enumGetBox(ButtonDisplayStyle_$type, 3), "FocusTextColor"); this.bg = NaN; this.bf = NaN; this.d = 0; this.p = 0; this.l = 0; this.o = 1; this.lh = ThemeResolver.af(XButton.m, XButton.k, enumGetBox(ButtonDisplayStyle_$type, 0), "BorderColor"); this.ls = ThemeResolver.ag(XButton.m, XButton.k, "UmbraShadowColor"); this.lp = ThemeResolver.ag(XButton.m, XButton.k, "PenumbraShadowColor"); this.lf = ThemeResolver.ag(XButton.m, XButton.k, "AmbientShadowColor"); this.b4 = ThemeResolver.p(XButton.m, XButton.k, enumGetBox(ButtonDisplayStyle_$type, 0), "RestingElevation"); this.b2 = ThemeResolver.p(XButton.m, XButton.k, enumGetBox(ButtonDisplayStyle_$type, 0), "FocusElevation"); this.b3 = ThemeResolver.p(XButton.m, XButton.k, enumGetBox(ButtonDisplayStyle_$type, 0), "HoverElevation"); this.lq = ThemeResolver.af(XButton.m, XButton.k, enumGetBox(ButtonDisplayStyle_$type, 0), "RippleColor"); this.ks = ThemeResolver.aa(XButton.m, XButton.k, enumGetBox(ButtonDisplayStyle_$type, 0), "CornerRadius"); this.lg = ThemeResolver.af(XButton.m, XButton.k, enumGetBox(ButtonDisplayStyle_$type, 0), "BackgroundColor"); this.li = ThemeResolver.af(XButton.m, XButton.k, enumGetBox(ButtonDisplayStyle_$type, 0), "DisabledBackgroundColor"); this.lj = ThemeResolver.af(XButton.m, XButton.k, enumGetBox(ButtonDisplayStyle_$type, 0), "DisabledBorderColor"); this.lk = ThemeResolver.af(XButton.m, XButton.k, enumGetBox(ButtonDisplayStyle_$type, 0), "DisabledTextColor"); this.b1 = ThemeResolver.p(XButton.m, XButton.k, enumGetBox(ButtonDisplayStyle_$type, 0), "DisabledElevation"); this.s = ThemeResolver.f(XButton.m, XButton.k, "ElevationMode"); this.lr = ThemeResolver.af(XButton.m, XButton.k, enumGetBox(ButtonDisplayStyle_$type, 0), "TextColor"); this.lo = ThemeResolver.af(XButton.m, XButton.k, enumGetBox(ButtonDisplayStyle_$type, 0), "HoverTextColor"); this.ll = ThemeResolver.af(XButton.m, XButton.k, enumGetBox(ButtonDisplayStyle_$type, 0), "FocusBackgroundColor"); this.lm = ThemeResolver.af(XButton.m, XButton.k, enumGetBox(ButtonDisplayStyle_$type, 0), "FocusTextColor"); this.ln = ThemeResolver.af(XButton.m, XButton.k, enumGetBox(ButtonDisplayStyle_$type, 0), "HoverBackgroundColor"); this.a6 = ThemeResolver.k(XButton.m, XButton.k, enumGetBox(ButtonDisplayStyle_$type, 0), "BorderWidth"); this.na = null; this.nc = null; this.nd = null; this.ne = null; this.co = -1; this.nh = null; this.nb = null; this.cr = -1; this.cq = -1; this.cp = -1; this.bi = NaN; this.ky = new CornerRadius(1, NaN, NaN, NaN, NaN); this.nj = null; this.l8 = null; this.ma = null; this.mb = null; this.mc = null; this.ca = -1; this.mf = null; this.l9 = null; this.cd = -1; this.cc = -1; this.cb = -1; this.mh = null; this.mi = null; this.mg = null; this.md = null; this.me = null; this.bd = NaN; this.kv = new CornerRadius(1, NaN, NaN, NaN, NaN); this.lt = null; this.lv = null; this.lw = null; this.lx = null; this.b5 = -1; this.t = 0; this.ml = null; this.lu = null; this.cs = -1; this.cf = -1; this.ce = -1; this.z = null; this.nm = null; this.mn = null; this.nl = null; this.nk = null; this.ni = null; this.nf = null; this.ng = null; this.mj = null; this.mk = null; this.a7 = NaN; this.kt = new CornerRadius(1, NaN, NaN, NaN, NaN); this.mz = null; this.m1 = null; this.m2 = null; this.m3 = null; this.ck = -1; this.m6 = null; this.m0 = null; this.cn = -1; this.cm = -1; this.cl = -1; this.bh = NaN; this.kx = new CornerRadius(1, NaN, NaN, NaN, NaN); this.m8 = null; this.m9 = null; this.m7 = null; this.m4 = null; this.m5 = null; this.ly = null; this.l0 = null; this.l1 = null; this.l2 = null; this.b6 = -1; this.mm = null; this.lz = null; this.b9 = -1; this.b8 = -1; this.b7 = -1; this.bc = NaN; this.ku = new CornerRadius(1, NaN, NaN, NaN, NaN); this.l6 = null; this.l7 = null; this.l5 = null; this.l3 = null; this.l4 = null; this.mo = null; this.mq = null; this.mr = null; this.ms = null; this.cg = -1; this.mv = null; this.mp = null; this.cj = -1; this.ci = -1; this.ch = -1; this.be = NaN; this.kw = new CornerRadius(1, NaN, NaN, NaN, NaN); this.mx = null; this.my = null; this.mw = null; this.mt = null; this.mu = null; this.em = "ig-native-button-" + XButton.d9++; this.el = "ig-button-" + XButton.d8++; this.ei = "inline-block"; this.eh = null; this.ej = "inline-block"; this.ek = null; this.ef = "center"; this.ea = null; this.en = null; this.ct = 0; this.am = false; this.eg = null; this.al = false; this.ao = false; this.ap = true; this.aj = false; this.af = false; this.ah = false; this.aq = false; this.an = false; this.ak = false; this.ai = false; this.a9 = NaN; this.bb = NaN; this.ba = NaN; this.a8 = NaN; this.ld = 1; this.rh = 1; this.ag = true; this.ar = 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.b = this; this.view = a; this.view.aq(); } get view() { return this._view; } set view(a) { this._view = a; } destroy() { this.provideContainer(null); } kk(a, b, c) { if (this.propertyChanged != null) { this.propertyChanged(this, new PropertyChangedEventArgs(a)); } this.km(a, b, c); } km(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.kq(); break; case "BaseTheme": this.kr(this.n == 0 ? 2 : this.n); this.kq(); break; case "IsDisabled": this.as = this.disabled || this.aw; this.kq(); this.view.as(); this.kp(); break; case "DisableRipple": this.as = this.disabled || this.aw; this.kq(); break; case "TextStyle": case "DisableHover": this.kp(); break; case "ActualDisableRipple": this.view.am(); break; case "ActualBackgroundColor": case "ActualDisabledBackgroundColor": case "ActualDisabledBorderColor": case "ActualDisabledTextColor": case "ActualDisabledElevation": case "ActualHoverBackgroundColor": case "ActualBorderColor": case "ActualFocusTextColor": case "ActualHoverTextColor": case "ActualElevationMode": this.kp(); break; case "Density": this.q = this.r == 0 ? 1 : this.r; break; case "ActualDensity": case "ActualBorderWidth": case "ActualCornerRadius": if (this.e == 4) { this.ko(); } this.view.a0(); this.kp(); break; case "DisplayType": this.view.a0(); this.kq(); this.kp(); break; case "ContentPaddingLeft": case "ContentPaddingTop": case "ContentPaddingRight": case "ContentPaddingBottom": case "FillAvailableSpace": this.view.a0(); break; case "HorizontalContentAlignment": case "VerticalContentAlignment": this.view.au(); break; case "InputId": this.view.ar(); break; case "Display": this.view.an(); break; case "ChildContentDisplay": this.view.aj(); break; case "FlexDirection": this.view.ao(); break; case "FlexGrow": this.view.ap(); break; case "AlignItems": this.view.ah(); break; case "TabIndex": this.view.ax(); break; case "DisablePointer": this.view.ax(); break; case "MinWidth": this.view.aw(this.by); this.view.a0(); break; case "MinHeight": this.view.av(this.bx); this.view.a0(); break; } } k0(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); } kq() { this.u = this.w != 0 ? this.w : this.v; this.n0 = this.po; this.nx = this.pc; this.nn = this.n3; switch (this.e) { case 0: this.nq = this.pp != null ? this.pp : this.q6 != null ? this.q6 : this.pf; this.nr = this.pq != null ? this.pq : this.q7 != null ? this.q7 : this.pg; this.ns = this.pr != null ? this.pr : this.q8 != null ? this.q8 : this.ph; this.cu = this.di >= 0 ? this.di : this.d2 >= 0 ? this.d2 : this.de; this.cx = this.d6 >= 0 ? this.d6 : this.d5 >= 0 ? this.d5 : this.dh; this.cw = this.dt >= 0 ? this.dt : this.d4 >= 0 ? this.d4 : this.dg; this.cv = this.ds >= 0 ? this.ds : this.d3 >= 0 ? this.d3 : this.df; this.np = this.n2 != null ? this.n2 : this.q5 != null ? this.q5 : this.pe; this.no = this.n1 != null ? this.n1 : this.q4 != null ? this.q4 : this.pd; this.nv = this.qg != null ? this.qg : this.rb != null ? this.rb : this.pk; this.kz = this.k0(this.k1, this.k0(this.lc, this.k6)); this.bj = !isNaN_(this.bk) ? this.bk : !isNaN_(this.b0) ? this.b0 : this.bt; this.ny = this.rf != null ? this.rf : this.rd != null ? this.rd : this.pm; this.nt = this.qe != null ? this.qe : this.q9 != null ? this.q9 : this.pi; this.nu = this.qf != null ? this.qf : this.ra != null ? this.ra : this.pj; this.nz = this.rg != null ? this.rg : this.re != null ? this.re : this.pn; this.nw = this.qh != null ? this.qh : this.rc != null ? this.rc : this.pl; break; case 2: this.nq = this.pp != null ? this.pp : this.qv != null ? this.qv : this.o3; this.nr = this.pq != null ? this.pq : this.qw != null ? this.qw : this.o4; this.ns = this.pr != null ? this.pr : this.qx != null ? this.qx : this.o5; this.cu = this.di >= 0 ? this.di : this.dy >= 0 ? this.dy : this.da; this.cx = this.d6 >= 0 ? this.d6 : this.d1 >= 0 ? this.d1 : this.dd; this.cw = this.dt >= 0 ? this.dt : this.d0 >= 0 ? this.d0 : this.dc; this.cv = this.ds >= 0 ? this.ds : this.dz >= 0 ? this.dz : this.db; this.np = this.n2 != null ? this.n2 : this.qu != null ? this.qu : this.o2; this.no = this.qg != null ? this.qg : this.n1 != null ? this.n1 : this.qt != null ? this.qt : this.o1; this.nv = this.q0 != null ? this.q0 : this.o8; this.kz = this.k0(this.k1, this.k0(this.lb, this.k5)); this.bj = !isNaN_(this.bk) ? this.bk : !isNaN_(this.bz) ? this.bz : this.bs; this.ny = this.rf != null ? this.rf : this.q2 != null ? this.q2 : this.pa; this.nt = this.qe != null ? this.qe : this.qy != null ? this.qy : this.o6; this.nu = this.qf != null ? this.qf : this.qz != null ? this.qz : this.o7; this.nz = this.rg != null ? this.rg : this.q3 != null ? this.q3 : this.pb; this.nw = this.qh != null ? this.qh : this.q1 != null ? this.q1 : this.o9; break; case 1: this.nq = this.pp != null ? this.pp : this.p5 != null ? this.p5 : this.oh; this.nr = this.pq != null ? this.pq : this.p6 != null ? this.p6 : this.oi; this.ns = this.pr != null ? this.pr : this.p7 != null ? this.p7 : this.oj; this.cu = this.di >= 0 ? this.di : this.dn >= 0 ? this.dn : this.c2; this.cx = this.d6 >= 0 ? this.d6 : this.dr >= 0 ? this.dr : this.c5; this.cw = this.dt >= 0 ? this.dt : this.dq >= 0 ? this.dq : this.c4; this.cv = this.ds >= 0 ? this.ds : this.dp >= 0 ? this.dp : this.c3; this.np = this.n2 != null ? this.n2 : this.p4 != null ? this.p4 : this.og; this.no = this.n1 != null ? this.n1 : this.p3 != null ? this.p3 : this.of; this.nv = this.qg != null ? this.qg : this.qa != null ? this.qa : this.om; this.kz = this.k0(this.k1, this.k0(this.k8, this.k3)); this.bj = !isNaN_(this.bk) ? this.bk : !isNaN_(this.bv) ? this.bv : this.bq; this.ny = this.rf != null ? this.rf : this.qc != null ? this.qc : this.oo; this.nt = this.qe != null ? this.qe : this.p8 != null ? this.p8 : this.ok; this.nu = this.qf != null ? this.qf : this.p9 != null ? this.p9 : this.ol; this.nz = this.rg != null ? this.rg : this.qd != null ? this.qd : this.op; this.nw = this.qh != null ? this.qh : this.qb != null ? this.qb : this.on; break; case 4: this.nq = this.pp != null ? this.pp : this.qk != null ? this.qk : this.os; this.nr = this.pq != null ? this.pq : this.ql != null ? this.ql : this.ot; this.ns = this.pr != null ? this.pr : this.qm != null ? this.qm : this.ou; this.cu = this.di >= 0 ? this.di : this.du >= 0 ? this.du : this.c6; this.cx = this.d6 >= 0 ? this.d6 : this.dx >= 0 ? this.dx : this.c9; this.cw = this.dt >= 0 ? this.dt : this.dw >= 0 ? this.dw : this.c8; this.cv = this.ds >= 0 ? this.ds : this.dv >= 0 ? this.dv : this.c7; this.np = this.n2 != null ? this.n2 : this.qj != null ? this.qj : this.or; this.no = this.n1 != null ? this.n1 : this.qi != null ? this.qi : this.oq; this.nv = this.qg != null ? this.qg : this.qp != null ? this.qp : this.ox; this.ko(); this.bj = !isNaN_(this.bk) ? this.bk : !isNaN_(this.bw) ? this.bw : this.br; this.ny = this.rf != null ? this.rf : this.qr != null ? this.qr : this.oz; this.nt = this.qe != null ? this.qe : this.qn != null ? this.qn : this.ov; this.nu = this.qf != null ? this.qf : this.qo != null ? this.qo : this.ow; this.