1
0
mirror of https://github.com/tabler/tabler.git synced 2025-12-22 01:44:25 +04:00
Files
tabler/demo/dist/js/tabler.min.js
2019-12-15 10:44:50 +01:00

7 lines
2.3 KiB
JavaScript

/*!
* Tabler v0.9.0 (https://tabler.io)
* Copyright 2018-2019 codecalm
* Licensed under MIT (https://github.com/tabler/tabler/blob/master/LICENSE)
*/'use strict';var tabler={colorVariation:function(a,b){var c=this.colors[a];if(c)return"light"===b?this.mixColors(c,"#ffffff",70):"lighten"===b?this.mixColors(c,"#ffffff",30):"lightest"===b?this.mixColors(c,"#ffffff",10):"dark"===b?this.mixColors(c,"#000000",80):"darken"===b?this.mixColors(c,"#000000",40):"darkest"===b?this.mixColors(c,"#000000",20):c;throw new Error("Wrong color: "+a)},hexToRgbA:function(a,b){var d;if(b=b||1,/^#([A-Fa-f0-9]{3}){1,2}$/.test(a))return d=a.substring(1).split(""),3===d.length&&(d=[d[0],d[0],d[1],d[1],d[2],d[2]]),d="0x"+d.join(""),"rgba("+[255&d>>16,255&d>>8,255&d].join(",")+","+b+")";throw new Error("Bad Hex")},mixColors:function(a,b,c){var f=Math.floor;function d(a){return a.toString(16)}function e(a){return parseInt(a,16)}a=a.substr(1),b=b.substr(1),c="undefined"==typeof c?50:c;for(var g="#",h=0;5>=h;h+=2){for(var j=e(a.substr(h,2)),k=e(b.substr(h,2)),l=d(f(k+(j-k)*(c/100)));2>l.length;)l="0"+l;g+=l}return g},colors:window.tabler_colors||[],toggleFullscreen:function(a){a=a||document.documentElement,document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement?document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen():a.requestFullscreen?a.requestFullscreen():a.msRequestFullscreen?a.msRequestFullscreen():a.mozRequestFullScreen?a.mozRequestFullScreen():a.webkitRequestFullscreen&&a.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)}};$(document).ready(function(){var a=$("body");if(a.on("click","[data-toggle=\"menubar\"]",function(b){return a.toggleClass("aside-visible"),b.preventDefault(),!1}),window.autosize&&function(){var a=document.querySelectorAll("[data-toggle=\"autosize\"]");a.length&&a.forEach(function(a){autosize(a)})}(),window.IMask&&function(){var a=$("[data-mask]");a&&a.each(function(){IMask($(this).get(0),{mask:$(this).attr("data-mask"),lazy:"true"===$(this).attr("data-mask-visible")})})}(),jQuery&&jQuery().selectize){var b=$("[data-selectize]");b&&b.selectize()}}),window.tabler=tabler;
//# sourceMappingURL=tabler.min.js.map