Comparing version 1.0.0 to 1.0.1
@@ -8,2 +8,2 @@ /* | ||
*/ | ||
function suiMobile(){let e=document.querySelectorAll("[data-info]");for(let l of e)toggleClassOnBreakPoint(l)}function toggleClassOnBreakPoint(e){let l=e.dataset.info;l.includes(".")||(l=e.dataset.info+"."),l=l.split(".");for(let t of l){let l,s,o=t.split("#"),n=o[1];o[0].includes("min")?(s="min-width",l=o[0].replace("min-","")):o[0].includes("max")&&(s="max-width",l=o[0].replace("max-","")),mediaQuery(e,s,l,n)}}function mediaQuery(e,l,t,s){function o(l){l.matches?e.classList.add(s):e.classList.contains(s)&&e.classList.remove(s)}var n=window.matchMedia("("+l+":"+t+")");o(n),n.addListener(o)}suiMobile();let toggleClassName=document.querySelectorAll("[data-toggle]");for(let e of toggleClassName){let l=e.dataset.toggle;l.includes(".")||(l=e.dataset.toggle+"."),toggleClass(e,l=l.split("."))}function toggleClass(e,l){for(let t of l){let l=t.split("|");if(""==l[0]||null==l[0])return;let s="#"+l[0],o=l[1],n=l[2];e.addEventListener(n,function(){document.querySelector(s).classList.toggle(o)})}}window.onscroll=function(e){let l=document.querySelectorAll(".su-unscrolled");for(unscrolled of l)window.scrollY>unscrolled.offsetHeight?unscrolled.classList.add("su-scrolled"):unscrolled.classList.remove("su-scrolled")}; | ||
function e(){let l=document.querySelectorAll("[data-info]");for(let e of l){n(e)}}function n(f){let e=f.dataset.info;if(!e.includes(".")){e=f.dataset.info+"."}e=e.split(".");for(let t of e){let e=t.split("#");let l,n,o=e[1];if(e[0].includes("min")){n="min-width";l=e[0].replace("min-","")}else if(e[0].includes("max")){n="max-width";l=e[0].replace("max-","")}i(f,n,l,o)}}function i(l,e,n,o){function t(e){if(e.matches){l.classList.add(o)}else{if(l.classList.contains(o)){l.classList.remove(o)}}}var f=window.matchMedia("("+e+":"+n+")");t(f);f.addListener(t)}e();let l=document.querySelectorAll("[data-toggle]");for(let n of l){let e="click";let l=n.dataset.toggle;if(!l.includes(".")){l=n.dataset.toggle+"."}l=l.split(".");o(n,l)}function o(f,e){for(let t of e){let e=t.split("|");if(e[0]==""||e[0]==undefined){return}let l="#"+e[0];let n=e[1];let o=e[2];f.addEventListener(o,function(){document.querySelector(l).classList.toggle(n)})}}window.onscroll=function(e){let l=document.querySelectorAll(".su-unscrolled");for(unscrolled of l){if(window.scrollY>unscrolled.offsetHeight){unscrolled.classList.add("su-scrolled")}else{unscrolled.classList.remove("su-scrolled")}}}; |
{ | ||
"name": "simui-code", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "SIMUI is an open source frontend web framework built to ease the frontend development process.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
38023
952