@progress/kendo-ui
Version:
This package is part of the [Kendo UI for jQuery](http://www.telerik.com/kendo-ui) suite.
107 lines (86 loc) • 3.09 kB
JavaScript
Object.defineProperty(exports, '__esModule', { value: true });
require('./kendo.html.icon.js');
var svgIcons = require('@progress/kendo-svg-icons');
require('./kendo.html.base.js');
require('./kendo.core.js');
require('./kendo.licensing.js');
require('@progress/kendo-licensing');
function _interopNamespaceDefault(e) {
var n = Object.create(null);
if (e) {
Object.keys(e).forEach(function (k) {
if (k !== 'default') {
var d = Object.getOwnPropertyDescriptor(e, k);
Object.defineProperty(n, k, d.get ? d : {
enumerable: true,
get: function () { return e[k]; }
});
}
});
}
n.default = e;
return Object.freeze(n);
}
var svgIcons__namespace = /*#__PURE__*/_interopNamespaceDefault(svgIcons);
const __meta__ = {
id: "icons",
name: "Icons",
category: "web",
description: "The Icons set provides both FontIcon and SvgIcon components along with the SVG icons collection from @progress/kendo-svg-icons",
depends: ["core", "html.icon"]
};
(function($, undefined$1) {
var kendo = window.kendo,
html = kendo.html,
ui = kendo.ui,
Widget = ui.Widget,
extend = $.extend;
var FontIcon = Widget.extend({
init: function(element, options) {
var that = this;
Widget.fn.init.call(that, element, options);
delete options.name;
that._icon = new html.HTMLFontIcon(element, $.extend({}, options));
that.element = that.wrapper = that._icon.element;
kendo.notify(that);
},
options: extend({}, html.HTMLFontIcon.fn.options, {
name: 'FontIcon'
}),
setOptions: function(options) {
var that = this;
Widget.fn.setOptions.call(that, options);
that._icon = new html.HTMLFontIcon(that.element, $.extend({}, that.options));
}
});
var SvgIcon = Widget.extend({
init: function(element, options) {
var that = this;
Widget.fn.init.call(that, element, options);
delete options.name;
that._icon = new html.HTMLSvgIcon(element, $.extend({}, options));
that.element = that.wrapper = that._icon.element;
kendo.notify(that);
},
options: extend({}, html.HTMLSvgIcon.fn.options, {
name: 'SvgIcon'
}),
setOptions: function(options) {
var that = this;
Widget.fn.setOptions.call(that, options);
if (options.icon) {
this.element.html('');
}
that._icon = new html.HTMLSvgIcon(that.element, $.extend({}, that.options));
}
});
kendo.ui.plugin(FontIcon);
kendo.ui.plugin(SvgIcon);
kendo.setDefaults('iconType', 'svg');
kendo.ui.svgIcons = svgIcons__namespace;
kendo.ui.icon = html.renderIcon;
})(window.kendo.jQuery);
var kendo$1 = kendo;
exports.__meta__ = __meta__;
exports.default = kendo$1;
;