mirror of
https://github.com/tabler/tabler.git
synced 2026-07-23 05:51:42 +04:00
build, demo, editorconfig fixes, flat fallback
This commit is contained in:
Vendored
-45
@@ -1,45 +0,0 @@
|
||||
/*!
|
||||
* Tabler vv1.0.0-alpha (https://tabler.io)
|
||||
* Copyright 2018-2019 codecalm
|
||||
* Licensed under MIT (https://github.com/tabler/tabler/blob/master/LICENSE)
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
(function ($) {
|
||||
$(document).ready(function () {
|
||||
$().peity &&
|
||||
$('[data-spark]').each(function () {
|
||||
const $this = $(this),
|
||||
data = $this.attr('data-spark'),
|
||||
color = $this.attr('data-spark-color') || 'blue',
|
||||
bgColor = $this.attr('data-spark-color-bg') || 'blue',
|
||||
type = $this.attr('data-spark-type') || 'line';
|
||||
|
||||
const $div = $('<div/>').html(data);
|
||||
$this.append($div);
|
||||
|
||||
let fillColor;
|
||||
|
||||
if (type === 'donut' || type === 'pie') {
|
||||
fillColor = [color, bgColor];
|
||||
} else if (type === 'bar') {
|
||||
fillColor = [color];
|
||||
} else if (type === 'line') {
|
||||
fillColor = bgColor;
|
||||
}
|
||||
|
||||
$div.peity(type, {
|
||||
width: $this.width(),
|
||||
height: $this.height(),
|
||||
// max: 100,
|
||||
// min: 0,
|
||||
stroke: color,
|
||||
strokeWidth: 2,
|
||||
fill: fillColor,
|
||||
padding: 0.2,
|
||||
innerRadius: type === 'donut' ? 17 : 0,
|
||||
});
|
||||
});
|
||||
});
|
||||
})(jQuery);
|
||||
//# sourceMappingURL=tabler-charts.js.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"tabler-charts.js","sources":["../../js/tabler-charts.js"],"sourcesContent":["(function ($) {\n $(document).ready(function () {\n $().peity &&\n $('[data-spark]').each(function () {\n const $this = $(this),\n data = $this.attr('data-spark'),\n color = $this.attr('data-spark-color') || 'blue',\n bgColor = $this.attr('data-spark-color-bg') || 'blue',\n type = $this.attr('data-spark-type') || 'line';\n\n const $div = $('<div/>').html(data);\n $this.append($div);\n\n let fillColor;\n\n if (type === 'donut' || type === 'pie') {\n fillColor = [color, bgColor];\n } else if (type === 'bar') {\n fillColor = [color];\n } else if (type === 'line') {\n fillColor = bgColor;\n }\n\n $div.peity(type, {\n width: $this.width(),\n height: $this.height(),\n // max: 100,\n // min: 0,\n stroke: color,\n strokeWidth: 2,\n fill: fillColor,\n padding: 0.2,\n innerRadius: type === 'donut' ? 17 : 0,\n });\n });\n });\n})(jQuery);\n\n/*\ncharts default configuration\n */\nif (window.Apex) {\n // const borderColor = 'rgba(0, 0, 0, 0.09)';\n // const mutedColor = '#888e9a';\n\n // window.Apex = {\n // chart: {\n // // fontFamily: 'inherit',\n // // foreColor: 'currentColor',\n // toolbar: {\n // show: false,\n // },\n // zoom: {\n // enabled: false,\n // },\n // animations: {\n // enabled: false,\n // },\n // },\n //\n // grid: {\n // show: true,\n // borderColor: borderColor,\n // padding: {\n // right: 0,\n // bottom: 0,\n // left: 0,\n // top: 0,\n // },\n // },\n //\n // dataLabels: {\n // enabled: false,\n // dropShadow: {\n // enabled: false,\n // },\n // },\n //\n // plotOptions: {\n // pie: {\n // customScale: 1,\n // expandOnClick: false,\n // dataLabels: {\n // minAngleToShowLabel: 10,\n // },\n // donut: {\n // size: '80%'\n // }\n // },\n // },\n //\n // stroke: {\n // width: 2,\n // curve: 'smooth',\n // lineCap: \"round\",\n // },\n //\n // fill: {\n // type: 'solid',\n // opacity: 1,\n // },\n //\n // markers: {\n // size: 0,\n // strokeWidth: 1,\n // radius: 2,\n // hover: {\n // size: 4,\n // },\n // },\n //\n // legend: {\n // show: true,\n // fontSize: '14px',\n // markers: {\n // width: 8,\n // height: 8,\n // },\n // itemMargin: {\n // horizontal: 0,\n // vertical: 8,\n // },\n // },\n //\n // title: {\n // margin: 0,\n // floating: true,\n // offsetX: 10,\n // style: {\n // fontSize: '18px',\n // },\n // },\n //\n // subtitle: {\n // margin: 0,\n // },\n //\n // tooltip: {\n // fillSeriesColor: false,\n // },\n\n // xaxis: {\n // labels: {\n // style: {\n // colors: mutedColor,\n // fontSize: '12px',\n // },\n // datetimeFormatter: {\n // year: 'yyyy',\n // month: 'MMM \\'yy',\n // day: 'd MMM',\n // hour: 'HH:mm'\n // }\n // },\n // tooltip: {\n // enabled: false,\n // },\n // axisBorder: {\n // color: borderColor,\n // height: 0,\n // },\n // axisTicks: {\n // show: true,\n // height: 4,\n // color: borderColor,\n // },\n // },\n //\n // yaxis: {\n // show: true,\n // },\n // };\n}\n"],"names":[],"mappings":";;;;;;;AAAA,CAAC,UAAU,CAAC,EAAE;EACZ,CAAC,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,YAAY;IAC5B,CAAC,EAAE,CAAC,KAAK;IACT,CAAC,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,YAAY;MACjC,MAAM,KAAK,GAAG,CAAC,CAAC,IAAI,CAAC;QACnB,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC;QAC/B,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,MAAM;QAChD,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,qBAAqB,CAAC,IAAI,MAAM;QACrD,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,iBAAiB,CAAC,IAAI,MAAM,CAAC;;MAEjD,MAAM,IAAI,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;MACpC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;;MAEnB,IAAI,SAAS,CAAC;;MAEd,IAAI,IAAI,KAAK,OAAO,IAAI,IAAI,KAAK,KAAK,EAAE;QACtC,SAAS,GAAG,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;OAC9B,MAAM,IAAI,IAAI,KAAK,KAAK,EAAE;QACzB,SAAS,GAAG,CAAC,KAAK,CAAC,CAAC;OACrB,MAAM,IAAI,IAAI,KAAK,MAAM,EAAE;QAC1B,SAAS,GAAG,OAAO,CAAC;OACrB;;MAED,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE;QACf,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE;QACpB,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE;;;QAGtB,MAAM,EAAE,KAAK;QACb,WAAW,EAAE,CAAC;QACd,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,GAAG;QACZ,WAAW,EAAE,IAAI,KAAK,OAAO,GAAG,EAAE,GAAG,CAAC;OACvC,CAAC,CAAC;KACJ,CAAC,CAAC;GACJ,CAAC,CAAC;CACJ,EAAE,MAAM,CAAC,CAAC"}
|
||||
Vendored
-115
@@ -1,115 +0,0 @@
|
||||
/*!
|
||||
* Tabler vv1.0.0-alpha (https://tabler.io)
|
||||
* Copyright 2018-2019 codecalm
|
||||
* Licensed under MIT (https://github.com/tabler/tabler/blob/master/LICENSE)
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
const tabler = {
|
||||
hexToRgbA: function(hex, opacity) {
|
||||
let c;
|
||||
|
||||
opacity = opacity || 1;
|
||||
|
||||
if (/^#([A-Fa-f0-9]{3}){1,2}$/.test(hex)) {
|
||||
c = hex.substring(1).split('');
|
||||
if (c.length === 3) {
|
||||
c = [c[0], c[0], c[1], c[1], c[2], c[2]];
|
||||
}
|
||||
c = '0x' + c.join('');
|
||||
return 'rgba(' + [(c >> 16) & 255, (c >> 8) & 255, c & 255].join(',') + ',' + opacity + ')';
|
||||
}
|
||||
throw new Error('Bad Hex');
|
||||
},
|
||||
|
||||
toggleFullscreen: function(elem) {
|
||||
elem = elem || document.documentElement;
|
||||
if (
|
||||
!document.fullscreenElement &&
|
||||
!document.mozFullScreenElement &&
|
||||
!document.webkitFullscreenElement &&
|
||||
!document.msFullscreenElement
|
||||
) {
|
||||
if (elem.requestFullscreen) {
|
||||
elem.requestFullscreen();
|
||||
} else if (elem.msRequestFullscreen) {
|
||||
elem.msRequestFullscreen();
|
||||
} else if (elem.mozRequestFullScreen) {
|
||||
elem.mozRequestFullScreen();
|
||||
} else if (elem.webkitRequestFullscreen) {
|
||||
elem.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);
|
||||
}
|
||||
} else {
|
||||
if (document.exitFullscreen) {
|
||||
document.exitFullscreen();
|
||||
} else if (document.msExitFullscreen) {
|
||||
document.msExitFullscreen();
|
||||
} else if (document.mozCancelFullScreen) {
|
||||
document.mozCancelFullScreen();
|
||||
} else if (document.webkitExitFullscreen) {
|
||||
document.webkitExitFullscreen();
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
$(document).ready(function() {
|
||||
const $body = $('body');
|
||||
|
||||
$body.on('click', '[data-toggle="menubar"]', function(e) {
|
||||
$body.toggleClass('aside-visible');
|
||||
|
||||
e.preventDefault();
|
||||
return false;
|
||||
});
|
||||
|
||||
// $('[data-toggle="tooltip"]').tooltip();
|
||||
// $('[data-toggle="popover"]').popover();
|
||||
|
||||
/*
|
||||
Autosize plugin
|
||||
*/
|
||||
if (window.autosize) {
|
||||
(function() {
|
||||
const elements = document.querySelectorAll('[data-toggle="autosize"]');
|
||||
|
||||
if (elements.length) {
|
||||
elements.forEach(function(element) {
|
||||
autosize(element);
|
||||
});
|
||||
}
|
||||
})();
|
||||
}
|
||||
|
||||
/*
|
||||
Imask plugin
|
||||
*/
|
||||
if (window.IMask) {
|
||||
(function() {
|
||||
const $elem = $('[data-mask]');
|
||||
|
||||
if ($elem) {
|
||||
$elem.each(function() {
|
||||
IMask($(this).get(0), {
|
||||
mask: $(this).attr('data-mask'),
|
||||
lazy: $(this).attr('data-mask-visible') === 'true',
|
||||
});
|
||||
});
|
||||
}
|
||||
})();
|
||||
}
|
||||
|
||||
/**
|
||||
* Seelectize plugin
|
||||
*/
|
||||
if (jQuery && jQuery().selectize) {
|
||||
const $elem = $('[data-selectize]');
|
||||
|
||||
if ($elem) {
|
||||
$elem.selectize();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
window.tabler = tabler;
|
||||
//# sourceMappingURL=tabler.js.map
|
||||
Vendored
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user