1
0
mirror of https://github.com/tabler/tabler.git synced 2025-12-24 02:38:15 +04:00

build, demo, editorconfig fixes, flat fallback

This commit is contained in:
codecalm
2019-12-18 21:45:53 +01:00
parent 06bd29b3dd
commit 60d22b56a1
772 changed files with 53656 additions and 77889 deletions

View File

@@ -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

Binary file not shown.

115
dist/js/tabler.js vendored
View File

@@ -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

BIN
dist/js/tabler.js.map vendored

Binary file not shown.