igniteui-react-inputs
Version:
Ignite UI React input components.
1,574 lines • 86.1 kB
JavaScript
import { __extends, __values } from "tslib";
import * as React from 'react';
import { XButton } from "./XButton";
import { ensureEnum, brushToString, stringToBrush, ensureBool, initializePropertiesFromCss, NamePatcher, isValidProp, toSpinal, getModifiedProps } from "igniteui-react-core";
import { FontInfo } from "igniteui-react-core";
import { ReactRenderer, PortalManager } from "igniteui-react-core";
import { delegateCombine, delegateRemove } from "igniteui-react-core";
import { CornerRadius } from "igniteui-react-core";
import { ButtonDisplayStyle_$type } from './ButtonDisplayStyle';
import { IgrButtonClickEventArgs } from './igr-button-click-event-args';
import { TypeRegistrar } from "igniteui-react-core";
import { ControlDisplayDensity_$type } from "igniteui-react-core";
import { BaseControlTheme_$type } from "igniteui-react-core";
import { ElevationMode_$type } from "igniteui-react-core";
import { HorizontalAlignment_$type } from "igniteui-react-core";
import { VerticalAlignment_$type } from "igniteui-react-core";
import { IgrFocusEventArgs } from "igniteui-react-core";
var IgrXButton = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(IgrXButton, _super);
function IgrXButton(props) {
var _this = _super.call(this, props) || this;
_this._wrapper = null;
_this.mounted = 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._implementation = _this.createImplementation();
_this._implementation.externalObject = _this;
_this._getMainRef = _this._getMainRef.bind(_this);
var container;
if (document) {
container = document.createElement("div");
}
var root;
root = container;
if (container != null) {
root = container;
}
_this.requestRender = _this.requestRender.bind(_this);
_this._portalManager = new PortalManager("buttonContent", _this.requestRender);
var ren = new ReactRenderer(root, document, true, {}, _this._portalManager);
_this._wrapper = ren;
_this._container = _this._wrapper.rootWrapper;
_this._container.setStyleProperty("display", "inline-block");
var button = _this.i;
_this._button = button;
button.provideContainer(ren);
if (props) {
_this.initializeProperties();
}
return _this;
}
IgrXButton.prototype._getMainRef = function (ref) {
this._elRef = ref;
};
IgrXButton.prototype.render = function () {
var propChildren = this.props.children;
var children = [];
React.Children.forEach(propChildren, function (ch) {
children.push(React.cloneElement(ch));
});
this._portalManager.onRender(children);
var div = React.createElement("div", {
className: "ig-x-button igr-x-button",
ref: this._getMainRef,
children: children
});
return div;
};
IgrXButton.prototype.requestRender = function () {
if (this._initialized) {
this.setState({});
}
};
IgrXButton.prototype._onDisplayChanged = function () {
this._container.setStyleProperty("display", this.display);
};
IgrXButton.prototype._onFlexDirectionChanged = function () {
this._container.setStyleProperty("flex-direction", this.flexDirection);
};
IgrXButton.prototype._onFlexGrowChanged = function () {
this._container.setStyleProperty("flex-grow", this.flexGrow);
};
IgrXButton.prototype._onAlignItemsChanged = function () {
this._container.setStyleProperty("align-items", this.alignItems);
};
//private _getLabelPortal(element: DomWrapper, portalCallback: (portal: DomPortal) => void): void {
// this._portalManager.getPortal(element, "TemplateContent", portalCallback);
//}
IgrXButton.prototype.shouldComponentUpdate = function (nextProps, nextState) {
var e_1, _a;
var mod = getModifiedProps(this.props, nextProps);
try {
for (var _b = __values(Object.keys(mod)), _c = _b.next(); !_c.done; _c = _b.next()) {
var p = _c.value;
if (isValidProp(this, p)) {
this[p] = mod[p];
}
}
}
catch (e_1_1) {
e_1 = { error: e_1_1 };
}
finally {
try {
if (_c && !_c.done && (_a = _b.return))
_a.call(_b);
}
finally {
if (e_1)
throw e_1.error;
}
}
return true;
};
IgrXButton.prototype.initializeProperties = function () {
var e_2, _a;
try {
for (var _b = __values(Object.keys(this.props)), _c = _b.next(); !_c.done; _c = _b.next()) {
var p = _c.value;
if (isValidProp(this, p)) {
this[p] = this.props[p];
}
}
}
catch (e_2_1) {
e_2 = { error: e_2_1 };
}
finally {
try {
if (_c && !_c.done && (_a = _b.return))
_a.call(_b);
}
finally {
if (e_2)
throw e_2.error;
}
}
};
// supports angular themes or custom properties set in CSS
IgrXButton.prototype.updateStyle = function () {
this._styling(this._elRef, this);
};
IgrXButton.prototype.destroy = function () {
this._button.destroy();
this._wrapper.destroy();
};
IgrXButton.prototype.componentWillUnmount = function () {
};
IgrXButton.prototype.componentDidMount = function () {
this._elRef.appendChild(this._container.getNativeElement());
this.initializeContent();
};
IgrXButton.prototype.initializeContent = function () {
this._styling(this._container.getNativeElement(), this);
this.updateStyle();
};
IgrXButton.prototype.createImplementation = function () {
return new XButton();
};
Object.defineProperty(IgrXButton.prototype, "nativeElement", {
get: function () {
return this._implementation.nativeElement;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "i", {
/**
* @hidden
*/
get: function () {
return this._implementation;
} /**
* @hidden
*/,
enumerable: false,
configurable: true
});
IgrXButton._createFromInternal = function (internal) {
if (!internal) {
return null;
}
if (!internal.$type) {
return null;
}
var name = internal.$type.name;
var externalName = "Igr" + name;
if (!TypeRegistrar.isRegistered(externalName)) {
return null;
}
return TypeRegistrar.create(externalName);
};
Object.defineProperty(IgrXButton.prototype, "minWidth", {
/**
* Gets or sets the min width to use for the button.
*/
get: function () {
return this.i.by;
},
set: function (v) {
this.i.by = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "minHeight", {
/**
* Gets or sets the min height to use for the button.
*/
get: function () {
return this.i.bx;
},
set: function (v) {
this.i.bx = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "displayType", {
/**
* Gets or sets the display style to use for the button.
*/
get: function () {
return this.i.e;
},
set: function (v) {
this.i.e = ensureEnum(ButtonDisplayStyle_$type, v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "density", {
/**
* Gets or sets the display density to use for the button.
*/
get: function () {
return this.i.r;
},
set: function (v) {
this.i.r = ensureEnum(ControlDisplayDensity_$type, v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "baseTheme", {
/**
* Gets or sets the base built in theme to use for the button.
*/
get: function () {
return this.i.n;
},
set: function (v) {
this.i.n = ensureEnum(BaseControlTheme_$type, v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "actualDensity", {
/**
* Gets the actual display density to use for the label.
*/
get: function () {
return this.i.q;
},
set: function (v) {
this.i.q = ensureEnum(ControlDisplayDensity_$type, v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "actualBorderColor", {
/**
* Gets or sets the color to use for the check mark when the checkbox is checked.
*/
get: function () {
return brushToString(this.i.np);
},
set: function (v) {
this.i.np = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "actualUmbraShadowColor", {
/**
* Gets or sets the color to use for the check mark when the checkbox is checked.
*/
get: function () {
return brushToString(this.i.n0);
},
set: function (v) {
this.i.n0 = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "actualPenumbraShadowColor", {
/**
* Gets or sets the color to use for the check mark when the checkbox is checked.
*/
get: function () {
return brushToString(this.i.nx);
},
set: function (v) {
this.i.nx = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "actualAmbientShadowColor", {
/**
* Gets or sets the color to use for the check mark when the checkbox is checked.
*/
get: function () {
return brushToString(this.i.nn);
},
set: function (v) {
this.i.nn = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "actualRestingElevation", {
/**
* Gets or sets the color to use for the check mark when the checkbox is checked.
*/
get: function () {
return this.i.cx;
},
set: function (v) {
this.i.cx = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "actualFocusElevation", {
/**
* Gets or sets the color to use for the check mark when the checkbox is checked.
*/
get: function () {
return this.i.cv;
},
set: function (v) {
this.i.cv = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "actualHoverElevation", {
/**
* Gets or sets the color to use for the check mark when the checkbox is checked.
*/
get: function () {
return this.i.cw;
},
set: function (v) {
this.i.cw = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "actualRippleColor", {
/**
* Gets or sets the color to use for the ripple when the button is pressed.
*/
get: function () {
return brushToString(this.i.ny);
},
set: function (v) {
this.i.ny = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "actualCornerRadiusBottomRight", {
get: function () {
return this.i.kz ? this.i.kz.c : NaN;
},
set: function (v) {
this.ensureActualCornerRadius();
this.i.kz.c = +v;
this.i.kz = this.i.kz;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "actualCornerRadiusBottomLeft", {
get: function () {
return this.i.kz ? this.i.kz.b : NaN;
},
set: function (v) {
this.ensureActualCornerRadius();
this.i.kz.b = +v;
this.i.kz = this.i.kz;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "actualCornerRadiusTopLeft", {
get: function () {
return this.i.kz ? this.i.kz.d : NaN;
},
set: function (v) {
this.ensureActualCornerRadius();
this.i.kz.d = +v;
this.i.kz = this.i.kz;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "actualCornerRadiusTopRight", {
get: function () {
return this.i.kz ? this.i.kz.e : NaN;
},
set: function (v) {
this.ensureActualCornerRadius();
this.i.kz.e = +v;
this.i.kz = this.i.kz;
},
enumerable: false,
configurable: true
});
IgrXButton.prototype.ensureActualCornerRadius = function () {
if (this.i.kz) {
return;
}
this.i.kz = new CornerRadius(2);
};
Object.defineProperty(IgrXButton.prototype, "actualBackgroundColor", {
/**
* Gets the color to use for the actual background.
*/
get: function () {
return brushToString(this.i.no);
},
set: function (v) {
this.i.no = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "actualDisabledBackgroundColor", {
/**
* Gets the actual color to use for the disabled background of the button.
*/
get: function () {
return brushToString(this.i.nq);
},
set: function (v) {
this.i.nq = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "actualDisabledBorderColor", {
/**
* Gets the actual color to use for the disabled border of the button.
*/
get: function () {
return brushToString(this.i.nr);
},
set: function (v) {
this.i.nr = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "actualDisabledTextColor", {
/**
* Gets the actual color to use for the disabled text of the button.
*/
get: function () {
return brushToString(this.i.ns);
},
set: function (v) {
this.i.ns = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "actualDisabledElevation", {
/**
* Gets the actual disabled elevation to use for the button.
*/
get: function () {
return this.i.cu;
},
set: function (v) {
this.i.cu = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "actualElevationMode", {
/**
* Gets the actual disabled elevation to use for the button.
*/
get: function () {
return this.i.u;
},
set: function (v) {
this.i.u = ensureEnum(ElevationMode_$type, v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "actualTextColor", {
/**
* Gets the color to use for the actual background.
*/
get: function () {
return brushToString(this.i.nz);
},
set: function (v) {
this.i.nz = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "actualHoverTextColor", {
/**
* Gets the color to use for the actual background.
*/
get: function () {
return brushToString(this.i.nw);
},
set: function (v) {
this.i.nw = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "actualFocusBackgroundColor", {
/**
* Gets the color to use for the actual background.
*/
get: function () {
return brushToString(this.i.nt);
},
set: function (v) {
this.i.nt = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "actualFocusTextColor", {
/**
* Gets the actual color to use for the focused text.
*/
get: function () {
return brushToString(this.i.nu);
},
set: function (v) {
this.i.nu = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "actualHoverBackgroundColor", {
/**
* Gets the hover color to use for the actual background.
*/
get: function () {
return brushToString(this.i.nv);
},
set: function (v) {
this.i.nv = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "actualBorderWidth", {
/**
* Gets or sets the Width to use for the check mark when the checkbox is checked.
*/
get: function () {
return this.i.bj;
},
set: function (v) {
this.i.bj = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "raisedBackgroundColor", {
/**
* Gets or sets the color to use for the background of the button when the type is raised.
*/
get: function () {
return brushToString(this.i.q4);
},
set: function (v) {
this.i.q4 = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "raisedDisabledBackgroundColor", {
/**
* Gets or sets the color to use for the disabled background of the button when the type is raised.
*/
get: function () {
return brushToString(this.i.q6);
},
set: function (v) {
this.i.q6 = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "raisedDisabledBorderColor", {
/**
* Gets or sets the color to use for the disabled border of the button when the type is raised.
*/
get: function () {
return brushToString(this.i.q7);
},
set: function (v) {
this.i.q7 = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "raisedDisabledTextColor", {
/**
* Gets or sets the color to use for the disabled text of the button when the type is raised.
*/
get: function () {
return brushToString(this.i.q8);
},
set: function (v) {
this.i.q8 = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "raisedDisabledElevation", {
/**
* Gets or sets the disabled elevation to use for the button when the type is raised.
*/
get: function () {
return this.i.d2;
},
set: function (v) {
this.i.d2 = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "raisedHoverBackgroundColor", {
/**
* Gets or sets the hover color to use for the background of the button when the type is raised.
*/
get: function () {
return brushToString(this.i.rb);
},
set: function (v) {
this.i.rb = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "raisedBorderColor", {
/**
* Gets or sets the border color to use for the button when the type is raised.
*/
get: function () {
return brushToString(this.i.q5);
},
set: function (v) {
this.i.q5 = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "raisedRestingElevation", {
/**
* Gets or sets the elevation to use for the button when the type is raised.
*/
get: function () {
return this.i.d5;
},
set: function (v) {
this.i.d5 = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "raisedHoverElevation", {
/**
* Gets or sets the hover elevation to use for the button when the type is raised.
*/
get: function () {
return this.i.d4;
},
set: function (v) {
this.i.d4 = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "raisedFocusElevation", {
/**
* Gets or sets the focus elevation to use for the button when the type is raised.
*/
get: function () {
return this.i.d3;
},
set: function (v) {
this.i.d3 = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "raisedBorderWidth", {
/**
* Gets or sets the width to use for the button border when the type is raised.
*/
get: function () {
return this.i.b0;
},
set: function (v) {
this.i.b0 = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "raisedCornerRadiusBottomRight", {
get: function () {
return this.i.lc ? this.i.lc.c : NaN;
},
set: function (v) {
this.ensureRaisedCornerRadius();
this.i.lc.c = +v;
this.i.lc = this.i.lc;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "raisedCornerRadiusBottomLeft", {
get: function () {
return this.i.lc ? this.i.lc.b : NaN;
},
set: function (v) {
this.ensureRaisedCornerRadius();
this.i.lc.b = +v;
this.i.lc = this.i.lc;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "raisedCornerRadiusTopLeft", {
get: function () {
return this.i.lc ? this.i.lc.d : NaN;
},
set: function (v) {
this.ensureRaisedCornerRadius();
this.i.lc.d = +v;
this.i.lc = this.i.lc;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "raisedCornerRadiusTopRight", {
get: function () {
return this.i.lc ? this.i.lc.e : NaN;
},
set: function (v) {
this.ensureRaisedCornerRadius();
this.i.lc.e = +v;
this.i.lc = this.i.lc;
},
enumerable: false,
configurable: true
});
IgrXButton.prototype.ensureRaisedCornerRadius = function () {
if (this.i.lc) {
return;
}
this.i.lc = new CornerRadius(2);
};
Object.defineProperty(IgrXButton.prototype, "raisedRippleColor", {
/**
* Gets or sets the color to use for the background when the button is pressed and the type is floating action button.
*/
get: function () {
return brushToString(this.i.rd);
},
set: function (v) {
this.i.rd = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "flatBackgroundColor", {
/**
* Gets or sets the color to use for the background of the button when the type is flat.
*/
get: function () {
return brushToString(this.i.p3);
},
set: function (v) {
this.i.p3 = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "flatDisabledBackgroundColor", {
/**
* Gets or sets the color to use for the disabled background of the button when the type is flat.
*/
get: function () {
return brushToString(this.i.p5);
},
set: function (v) {
this.i.p5 = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "flatDisabledBorderColor", {
/**
* Gets or sets the color to use for the disabled border of the button when the type is flat.
*/
get: function () {
return brushToString(this.i.p6);
},
set: function (v) {
this.i.p6 = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "flatDisabledTextColor", {
/**
* Gets or sets the color to use for the disabled text of the button when the type is flat.
*/
get: function () {
return brushToString(this.i.p7);
},
set: function (v) {
this.i.p7 = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "flatDisabledElevation", {
/**
* Gets or sets the disabled elevation to use for the button when the type is flat.
*/
get: function () {
return this.i.dn;
},
set: function (v) {
this.i.dn = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "flatHoverBackgroundColor", {
/**
* Gets or sets the hover color to use for the background of the button when the type is flat.
*/
get: function () {
return brushToString(this.i.qa);
},
set: function (v) {
this.i.qa = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "flatBorderColor", {
/**
* Gets or sets the border color to use for the button when the type is flat.
*/
get: function () {
return brushToString(this.i.p4);
},
set: function (v) {
this.i.p4 = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "flatRestingElevation", {
/**
* Gets or sets the elevation to use for the button when the type is flat.
*/
get: function () {
return this.i.dr;
},
set: function (v) {
this.i.dr = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "flatHoverElevation", {
/**
* Gets or sets the hover elevation to use for the button when the type is flat.
*/
get: function () {
return this.i.dq;
},
set: function (v) {
this.i.dq = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "flatFocusElevation", {
/**
* Gets or sets the focus elevation to use for the button when the type is flat.
*/
get: function () {
return this.i.dp;
},
set: function (v) {
this.i.dp = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "flatRippleColor", {
/**
* Gets or sets the color to use for the background when the button is pressed and the type is floating action button.
*/
get: function () {
return brushToString(this.i.qc);
},
set: function (v) {
this.i.qc = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "flatTextColor", {
/**
* Gets or sets the color to use for the text of the button when type is flat.
*/
get: function () {
return brushToString(this.i.qd);
},
set: function (v) {
this.i.qd = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "flatHoverTextColor", {
/**
* Gets or sets the color to use for the hovered text of the button when type is flat.
*/
get: function () {
return brushToString(this.i.qb);
},
set: function (v) {
this.i.qb = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "flatFocusBackgroundColor", {
/**
* Gets or sets the color to use for the backround the button when it is focused and flat.
*/
get: function () {
return brushToString(this.i.p8);
},
set: function (v) {
this.i.p8 = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "flatFocusTextColor", {
/**
* Gets or sets the color to use for the text the button when it is focused and flat.
*/
get: function () {
return brushToString(this.i.p9);
},
set: function (v) {
this.i.p9 = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "flatBorderWidth", {
/**
* Gets or sets the width to use for the button border when the type is flat.
*/
get: function () {
return this.i.bv;
},
set: function (v) {
this.i.bv = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "flatCornerRadiusBottomRight", {
get: function () {
return this.i.k8 ? this.i.k8.c : NaN;
},
set: function (v) {
this.ensureFlatCornerRadius();
this.i.k8.c = +v;
this.i.k8 = this.i.k8;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "flatCornerRadiusBottomLeft", {
get: function () {
return this.i.k8 ? this.i.k8.b : NaN;
},
set: function (v) {
this.ensureFlatCornerRadius();
this.i.k8.b = +v;
this.i.k8 = this.i.k8;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "flatCornerRadiusTopLeft", {
get: function () {
return this.i.k8 ? this.i.k8.d : NaN;
},
set: function (v) {
this.ensureFlatCornerRadius();
this.i.k8.d = +v;
this.i.k8 = this.i.k8;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "flatCornerRadiusTopRight", {
get: function () {
return this.i.k8 ? this.i.k8.e : NaN;
},
set: function (v) {
this.ensureFlatCornerRadius();
this.i.k8.e = +v;
this.i.k8 = this.i.k8;
},
enumerable: false,
configurable: true
});
IgrXButton.prototype.ensureFlatCornerRadius = function () {
if (this.i.k8) {
return;
}
this.i.k8 = new CornerRadius(2);
};
Object.defineProperty(IgrXButton.prototype, "backgroundColor", {
/**
* Gets or sets the color to use for the background when the button regardless of type.
*/
get: function () {
return brushToString(this.i.n1);
},
set: function (v) {
this.i.n1 = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "disabledBackgroundColor", {
/**
* Gets or sets the color to use for the disabled background of the button when the type is disabled.
*/
get: function () {
return brushToString(this.i.pp);
},
set: function (v) {
this.i.pp = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "disabledBorderColor", {
/**
* Gets or sets the color to use for the disabled border of the button when the type is raised.
*/
get: function () {
return brushToString(this.i.pq);
},
set: function (v) {
this.i.pq = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "disabledTextColor", {
/**
* Gets or sets the color to use for the disabled text of the button when the type is raised.
*/
get: function () {
return brushToString(this.i.pr);
},
set: function (v) {
this.i.pr = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "disabledElevation", {
/**
* Gets or sets the disabled elevation to use for the button when the type is raised.
*/
get: function () {
return this.i.di;
},
set: function (v) {
this.i.di = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "elevationMode", {
/**
* Gets or sets the disabled elevation to use for the button when the type is raised.
*/
get: function () {
return this.i.w;
},
set: function (v) {
this.i.w = ensureEnum(ElevationMode_$type, v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "hoverBackgroundColor", {
/**
* Gets or sets the hover color to use for the background of the button when the type is hovered.
*/
get: function () {
return brushToString(this.i.qg);
},
set: function (v) {
this.i.qg = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "borderColor", {
/**
* Gets or sets the border color to use for the button regardless of type.
*/
get: function () {
return brushToString(this.i.n2);
},
set: function (v) {
this.i.n2 = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "restingElevation", {
/**
* Gets or sets the elevation to use for the button regardless of type.
*/
get: function () {
return this.i.d6;
},
set: function (v) {
this.i.d6 = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "hoverElevation", {
/**
* Gets or sets the hover elevation to use for the button regardless of type.
*/
get: function () {
return this.i.dt;
},
set: function (v) {
this.i.dt = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "focusElevation", {
/**
* Gets or sets the focus elevation to use for the button regardless of type.
*/
get: function () {
return this.i.ds;
},
set: function (v) {
this.i.ds = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "textStyle", {
/**
* Gets or sets the use for the button.
*/
get: function () {
if (this.i.aa == null) {
return null;
}
return this.i.aa.fontString;
},
set: function (v) {
var fi = new FontInfo();
fi.fontString = v;
this.i.aa = fi;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "textColor", {
/**
* Gets or sets the color to use for the text of the button regardless of type.
*/
get: function () {
return brushToString(this.i.rg);
},
set: function (v) {
this.i.rg = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "hoverTextColor", {
/**
* Gets or sets the color to use for the hovered text of the button regardless of type.
*/
get: function () {
return brushToString(this.i.qh);
},
set: function (v) {
this.i.qh = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "rippleColor", {
/**
* Gets or sets the color to use for the background of the button regardless of type.
*/
get: function () {
return brushToString(this.i.rf);
},
set: function (v) {
this.i.rf = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "raisedTextColor", {
/**
* Gets or sets the color to use for the text of the button when type is raised.
*/
get: function () {
return brushToString(this.i.re);
},
set: function (v) {
this.i.re = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "raisedHoverTextColor", {
/**
* Gets or sets the color to use for the hovered text of the button when type is raised.
*/
get: function () {
return brushToString(this.i.rc);
},
set: function (v) {
this.i.rc = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "raisedFocusBackgroundColor", {
/**
* Gets or sets the color to use for the backround the button when it is focused and raised.
*/
get: function () {
return brushToString(this.i.q9);
},
set: function (v) {
this.i.q9 = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "raisedFocusTextColor", {
/**
* Gets or sets the color to use for the text the button when it is focused and raised.
*/
get: function () {
return brushToString(this.i.ra);
},
set: function (v) {
this.i.ra = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "focusBackgroundColor", {
/**
* Gets or sets the color to use for the backround the button when it is focused.
*/
get: function () {
return brushToString(this.i.qe);
},
set: function (v) {
this.i.qe = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "focusTextColor", {
/**
* Gets or sets the color to use for the text of the button when it is focused.
*/
get: function () {
return brushToString(this.i.qf);
},
set: function (v) {
this.i.qf = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "borderWidth", {
/**
* Gets or sets the width to use for the button border regardless of type.
*/
get: function () {
return this.i.bk;
},
set: function (v) {
this.i.bk = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "cornerRadiusBottomRight", {
get: function () {
return this.i.k1 ? this.i.k1.c : NaN;
},
set: function (v) {
this.ensureCornerRadius();
this.i.k1.c = +v;
this.i.k1 = this.i.k1;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "cornerRadiusBottomLeft", {
get: function () {
return this.i.k1 ? this.i.k1.b : NaN;
},
set: function (v) {
this.ensureCornerRadius();
this.i.k1.b = +v;
this.i.k1 = this.i.k1;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "cornerRadiusTopLeft", {
get: function () {
return this.i.k1 ? this.i.k1.d : NaN;
},
set: function (v) {
this.ensureCornerRadius();
this.i.k1.d = +v;
this.i.k1 = this.i.k1;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "cornerRadiusTopRight", {
get: function () {
return this.i.k1 ? this.i.k1.e : NaN;
},
set: function (v) {
this.ensureCornerRadius();
this.i.k1.e = +v;
this.i.k1 = this.i.k1;
},
enumerable: false,
configurable: true
});
IgrXButton.prototype.ensureCornerRadius = function () {
if (this.i.k1) {
return;
}
this.i.k1 = new CornerRadius(2);
};
Object.defineProperty(IgrXButton.prototype, "outlinedBackgroundColor", {
/**
* Gets or sets the color to use for the background of the button when the type is outlined.
*/
get: function () {
return brushToString(this.i.qt);
},
set: function (v) {
this.i.qt = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "outlinedDisabledBackgroundColor", {
/**
* Gets or sets the color to use for the disabled background of the button when the type is outlined.
*/
get: function () {
return brushToString(this.i.qv);
},
set: function (v) {
this.i.qv = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "outlinedDisabledBorderColor", {
/**
* Gets or sets the color to use for the disabled border of the button when the type is outlined.
*/
get: function () {
return brushToString(this.i.qw);
},
set: function (v) {
this.i.qw = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "outlinedDisabledTextColor", {
/**
* Gets or sets the color to use for the disabled text of the button when the type is outlined.
*/
get: function () {
return brushToString(this.i.qx);
},
set: function (v) {
this.i.qx = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "outlinedDisabledElevation", {
/**
* Gets or sets the disabled elevation to use for the button when the type is outlined.
*/
get: function () {
return this.i.dy;
},
set: function (v) {
this.i.dy = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "outlinedHoverBackgroundColor", {
/**
* Gets or sets the hover color to use for the background of the button when the type is hoveredOutlined.
*/
get: function () {
return brushToString(this.i.q0);
},
set: function (v) {
this.i.q0 = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "outlinedBorderColor", {
/**
* Gets or sets the border color to use for the button when the type is outlined.
*/
get: function () {
return brushToString(this.i.qu);
},
set: function (v) {
this.i.qu = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "outlinedRestingElevation", {
/**
* Gets or sets the elevation to use for the button when the type is outlined.
*/
get: function () {
return this.i.d1;
},
set: function (v) {
this.i.d1 = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "outlinedHoverElevation", {
/**
* Gets or sets the hover elevation to use for the button when the type is outlined.
*/
get: function () {
return this.i.d0;
},
set: function (v) {
this.i.d0 = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "outlinedFocusElevation", {
/**
* Gets or sets the focus elevation to use for the button when the type is outlined.
*/
get: function () {
return this.i.dz;
},
set: function (v) {
this.i.dz = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "outlinedBorderWidth", {
/**
* Gets or sets the width to use for the button border when the type is outlined.
*/
get: function () {
return this.i.bz;
},
set: function (v) {
this.i.bz = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "outlinedCornerRadiusBottomRight", {
get: function () {
return this.i.lb ? this.i.lb.c : NaN;
},
set: function (v) {
this.ensureOutlinedCornerRadius();
this.i.lb.c = +v;
this.i.lb = this.i.lb;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrXButton.prototype, "outlinedCornerRadiusBottomLeft", {
get: function () {
return this.i.lb ? this.i.lb.b : NaN;
},
set: function (v) {
this.e