neu-axentix
Advanced tools
Comparing version 1.0.1 to 1.1.0
@@ -0,1 +1,11 @@ | ||
# 1.1.0 - 2020-09-06 | ||
- ADDED | ||
- REMOVED | ||
- IMPROVED | ||
- Update Axentix to 1.0.0-beta.2 | ||
- Update dependencies | ||
- BUGFIXES | ||
- `data-neu-hover` change state at startup | ||
# 1.0.1 - 2020-04-23 | ||
@@ -2,0 +12,0 @@ |
@@ -32,2 +32,12 @@ "use strict"; | ||
if (datasetName === 'neuHover') { | ||
if (!this.neuActive && e.type === 'mouseenter') { | ||
this.neuActive = true; | ||
} else if (!this.neuActive && e.type === 'mouseleave') { | ||
return; | ||
} else if (this.neuActive && e.type === 'mouseleave') { | ||
this.neuActive = false; | ||
} | ||
} | ||
var nextClass = this.dataset[datasetName]; | ||
@@ -34,0 +44,0 @@ |
@@ -1,1 +0,1 @@ | ||
"use strict";var NeuAxentix=(()=>{function a(a,b){if(this.dataset[a]&&!i.includes(this.dataset[a]))return void console.error("Error: invalid classname in data-neu-...");if("neuClick"===a)if(this.neuActive){if("mousedown"===b.type||"touchstart"===b.type)return;this.neuActive=!1}else{if("mouseup"===b.type||"mouseleave"===b.type||"touchend"===b.type||"touchmove"===b.type)return;this.neuActive=!0}var c=this.dataset[a];this.neuCurrClass?(this.classList.remove(this.neuCurrClass),this.dataset[a]=this.neuCurrClass):this.dataset[a]="",c?(this.classList.add(c),this.neuCurrClass=c):this.neuCurrClass=""}function b(a){var b=a.className.split(" "),c=b.filter(a=>i.includes(a));if(2<=c.length){var d=b.filter(a=>!c.includes(a));d.push(c[0]),a.className=d.join(" ")}a.neuCurrClass=c[0]||""}function c(){e=document.querySelectorAll("[data-neu-click]"),f=document.querySelectorAll("[data-neu-focus]"),g=document.querySelectorAll("[data-neu-clicked]"),h=document.querySelectorAll("[data-neu-hover]"),g.forEach(c=>{b(c),c.toggleRef=a.bind(c,"neuClicked"),c.addEventListener("click",c.toggleRef)}),e.forEach(c=>{b(c),c.toggleRef=a.bind(c,"neuClick"),c.addEventListener("mousedown",c.toggleRef),c.addEventListener("mouseleave",c.toggleRef),c.addEventListener("mouseup",c.toggleRef),"ontouchstart"in document.documentElement&&(c.addEventListener("touchstart",c.toggleRef),c.addEventListener("touchend",c.toggleRef))}),f.forEach(c=>{b(c),c.toggleRef=a.bind(c,"neuFocus"),c.addEventListener("focus",c.toggleRef),c.addEventListener("blur",c.toggleRef)}),h.forEach(c=>{b(c),c.toggleRef=a.bind(c,"neuHover"),c.addEventListener("mouseenter",c.toggleRef),c.addEventListener("mouseleave",c.toggleRef)})}function d(){g&&g.forEach(a=>{a.removeEventListener("click",a.toggleRef),a.toggleRef=void 0}),e&&e.forEach(a=>{a.removeEventListener("mousedown",a.toggleRef),a.removeEventListener("mouseleave",a.toggleRef),a.removeEventListener("mouseup",a.toggleRef),"ontouchstart"in document.documentElement&&(a.removeEventListener("touchstart",a.toggleRef),a.removeEventListener("touchend",a.toggleRef)),a.toggleRef=void 0}),f&&f.forEach(a=>{a.removeEventListener("focus",a.toggleRef),a.removeEventListener("blur",a.toggleRef),a.toggleRef=void 0}),h&&h.forEach(a=>{a.removeEventListener("mouseenter",a.toggleRef),a.removeEventListener("mouseleave",a.toggleRef),a.toggleRef=void 0}),c()}var e,f,g,h,i=["neu-bordered","neu-flat","neu-pressed","neu-concave","neu-convex"];return{setup:c,reset:d}})();document.addEventListener("DOMContentLoaded",NeuAxentix.setup); | ||
"use strict";var NeuAxentix=(()=>{function a(a,b){if(this.dataset[a]&&!i.includes(this.dataset[a]))return void console.error("Error: invalid classname in data-neu-...");if("neuClick"===a)if(this.neuActive){if("mousedown"===b.type||"touchstart"===b.type)return;this.neuActive=!1}else{if("mouseup"===b.type||"mouseleave"===b.type||"touchend"===b.type||"touchmove"===b.type)return;this.neuActive=!0}if("neuHover"===a)if(!this.neuActive&&"mouseenter"===b.type)this.neuActive=!0;else{if(!this.neuActive&&"mouseleave"===b.type)return;this.neuActive&&"mouseleave"===b.type&&(this.neuActive=!1)}var c=this.dataset[a];this.neuCurrClass?(this.classList.remove(this.neuCurrClass),this.dataset[a]=this.neuCurrClass):this.dataset[a]="",c?(this.classList.add(c),this.neuCurrClass=c):this.neuCurrClass=""}function b(a){var b=a.className.split(" "),c=b.filter(a=>i.includes(a));if(2<=c.length){var d=b.filter(a=>!c.includes(a));d.push(c[0]),a.className=d.join(" ")}a.neuCurrClass=c[0]||""}function c(){e=document.querySelectorAll("[data-neu-click]"),f=document.querySelectorAll("[data-neu-focus]"),g=document.querySelectorAll("[data-neu-clicked]"),h=document.querySelectorAll("[data-neu-hover]"),g.forEach(c=>{b(c),c.toggleRef=a.bind(c,"neuClicked"),c.addEventListener("click",c.toggleRef)}),e.forEach(c=>{b(c),c.toggleRef=a.bind(c,"neuClick"),c.addEventListener("mousedown",c.toggleRef),c.addEventListener("mouseleave",c.toggleRef),c.addEventListener("mouseup",c.toggleRef),"ontouchstart"in document.documentElement&&(c.addEventListener("touchstart",c.toggleRef),c.addEventListener("touchend",c.toggleRef))}),f.forEach(c=>{b(c),c.toggleRef=a.bind(c,"neuFocus"),c.addEventListener("focus",c.toggleRef),c.addEventListener("blur",c.toggleRef)}),h.forEach(c=>{b(c),c.toggleRef=a.bind(c,"neuHover"),c.addEventListener("mouseenter",c.toggleRef),c.addEventListener("mouseleave",c.toggleRef)})}function d(){g&&g.forEach(a=>{a.removeEventListener("click",a.toggleRef),a.toggleRef=void 0}),e&&e.forEach(a=>{a.removeEventListener("mousedown",a.toggleRef),a.removeEventListener("mouseleave",a.toggleRef),a.removeEventListener("mouseup",a.toggleRef),"ontouchstart"in document.documentElement&&(a.removeEventListener("touchstart",a.toggleRef),a.removeEventListener("touchend",a.toggleRef)),a.toggleRef=void 0}),f&&f.forEach(a=>{a.removeEventListener("focus",a.toggleRef),a.removeEventListener("blur",a.toggleRef),a.toggleRef=void 0}),h&&h.forEach(a=>{a.removeEventListener("mouseenter",a.toggleRef),a.removeEventListener("mouseleave",a.toggleRef),a.toggleRef=void 0}),c()}var e,f,g,h,i=["neu-bordered","neu-flat","neu-pressed","neu-concave","neu-convex"];return{setup:c,reset:d}})();document.addEventListener("DOMContentLoaded",NeuAxentix.setup); |
{ | ||
"name": "neu-axentix", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"description": "Neu-Axentix is the first front end framework based on neumorphism using CSS and JS. Start creating your website using neumorphic design.", | ||
@@ -49,6 +49,6 @@ "homepage": "https://neu.useaxentix.com", | ||
"devDependencies": { | ||
"@babel/core": "^7.8.3", | ||
"@babel/preset-env": "^7.9.5", | ||
"browser-sync": "^2.26.7", | ||
"fibers": "^4.0.2", | ||
"@babel/core": "^7.11.6", | ||
"@babel/preset-env": "^7.11.5", | ||
"browser-sync": "^2.26.12", | ||
"fibers": "^4.0.3", | ||
"gulp": "^4.0.2", | ||
@@ -60,8 +60,8 @@ "gulp-autoprefixer": "^7.0.1", | ||
"gulp-rename": "^1.4.0", | ||
"gulp-sass": "^4.0.2", | ||
"sass": "^1.25.0" | ||
"gulp-sass": "^4.1.0", | ||
"sass": "^1.26.10" | ||
}, | ||
"dependencies": { | ||
"axentix": "^0.5.3" | ||
"axentix": "^1.0.0-beta.2" | ||
} | ||
} |
<p align="center"> | ||
<a href="https://useaxentix.com/"> | ||
<img src="https://useaxentix.com/img/axentix-250.png" alt="Axentix Logo" width="120" height="120"> | ||
<a href="https://neu.useaxentix.com/"> | ||
<img src="https://neu.useaxentix.com/img/neu-axentix.svg" alt="Neu-Axentix Logo" width="120" height="120"> | ||
</a> | ||
@@ -10,14 +10,71 @@ </p> | ||
<p align="center"> | ||
<a href="https://neu.useaxentix.com/"><strong>Home</strong></a> | | ||
<a href="https://neu.useaxentix.com/docs/"><strong>Documentation</strong></a> | ||
</p> | ||
<br> | ||
<p align="center"> | ||
<a href="https://badge.fury.io/js/neu-axentix"> | ||
<img src="https://badge.fury.io/js/neu-axentix.svg" alt="npm version" /> | ||
</a> | ||
<img src="https://img.shields.io/github/v/release/axentix/neumorphic" alt="GitHub release (latest by date)" /> | ||
<a href="https://www.jsdelivr.com/package/npm/neu-axentix"> | ||
<img src="https://data.jsdelivr.com/v1/package/npm/neu-axentix/badge?style=rounded" alt="jsDelivr Hits" /> | ||
</a> | ||
<img src="https://img.shields.io/david/axentix/neumorphic" alt="Dependencies" /> | ||
<img src="https://img.shields.io/david/dev/axentix/neumorphic" alt="Dev Dependencies" /> | ||
<a href="https://packagephobia.com/result?p=neu-axentix"> | ||
<img src="https://packagephobia.com/badge?p=neu-axentix" alt="install size" /> | ||
</a> | ||
<a href="https://snyk.io/test/github/axentix/neumorphic?targetFile=package.json"> | ||
<img src="https://snyk.io/test/github/axentix/neumorphic/badge.svg?targetFile=package.json" alt="Known Vulnerabilities" /> | ||
</a> | ||
<img src="https://img.shields.io/github/license/axentix/neumorphic" alt="License" /> | ||
</p> | ||
<p align="center"> | ||
<a href="https://discord.gg/8tgRDED"> | ||
<img src="https://img.shields.io/discord/727545620683816980" alt="Discord" /> | ||
</a> | ||
<a href="https://openbase.io/js/neu-axentix?utm_source=embedded&utm_medium=badge&utm_campaign=rate-badge"> | ||
<img src="https://badges.openbase.io/js/rating/neu-axentix.svg" alt="Rate on Openbase" /> | ||
</a> | ||
</p> | ||
Neu-Axentix is the first front end framework based on neumorphism using CSS and JS. Start creating your website using neumorphic design. | ||
## Quickstart | ||
- You can download the latest release from [Github](https://github.com/axentix/neumorphic/releases/latest). | ||
- Clone the repo : `git clone https://github.com/axentix/neumorphic.git` | ||
- Install with [npm](https://www.npmjs.com/) : `npm install neu-axentix` | ||
### NPM | ||
``` | ||
npm install neu-axentix | ||
``` | ||
### Yarn | ||
``` | ||
yarn add neu-axentix | ||
``` | ||
### CDN | ||
Include the files with [jsDelivr](https://www.jsdelivr.com/package/npm/neu-axentix). | ||
### Github Release | ||
You can download the latest release from [Github](https://github.com/axentix/neumorphic/releases/latest). | ||
### Clone the repo | ||
``` | ||
git clone https://github.com/axentix/neumorphic.git | ||
cd neumorphic | ||
npm install | ||
``` | ||
After installation you have access to our source files. | ||
You can build project with `npm run build` or watch it with `npm run watch`. | ||
We use BrowserSync for our development process. | ||
## Documentation | ||
Found the documentation at <https://neu.useaxentix.com/>. | ||
Find the documentation at <https://neu.useaxentix.com/docs/>. | ||
@@ -30,12 +87,16 @@ ## Changelog | ||
- Axel SIMONET | ||
- Axel SIMONET - (Xelzs) | ||
[Github](https://github.com/Xelzs) | ||
[Linkedin](https://www.linkedin.com/in/axel-simonet/) | ||
[Website](https://axelsimonet.fr/) | ||
- Vincent LEVEQUE | ||
- Vincent LEVEQUE - (Stallos11) | ||
[Github](https://github.com/Stallos11) | ||
[Linkedin](https://www.linkedin.com/in/leveque-vincent/) | ||
# | ||
<br> | ||
___ | ||
<p align="center"> | ||
Neu-Axentix Framework - Made with ♥ by Axel SIMONET & Vincent LEVEQUE | ||
Neu-Axentix Framework - Made with ❤️ by Axel SIMONET & Vincent LEVEQUE | ||
</p> |
@@ -33,2 +33,12 @@ const NeuAxentix = (() => { | ||
if (datasetName === 'neuHover') { | ||
if (!this.neuActive && e.type === 'mouseenter') { | ||
this.neuActive = true; | ||
} else if (!this.neuActive && e.type === 'mouseleave') { | ||
return; | ||
} else if (this.neuActive && e.type === 'mouseleave') { | ||
this.neuActive = false; | ||
} | ||
} | ||
const nextClass = this.dataset[datasetName]; | ||
@@ -35,0 +45,0 @@ if (this.neuCurrClass) { |
77584
994
101
+ Addedaxentix@1.3.4(transitive)
- Removedaxentix@0.5.3(transitive)
Updatedaxentix@^1.0.0-beta.2