Comparing version 0.2.0-alpha.19 to 0.2.0-alpha.20
@@ -9,3 +9,3 @@ /** | ||
function alert($elements) { | ||
$elements.forEach($alert => { | ||
$elements.forEach(($alert) => { | ||
$alert.addEventListener('click', (e) => { | ||
@@ -12,0 +12,0 @@ if (e.target && e.target.classList.contains('close')) { |
@@ -9,3 +9,3 @@ /** | ||
function alert($elements) { | ||
$elements.forEach($alert => { | ||
$elements.forEach(($alert) => { | ||
$alert.addEventListener('click', (e) => { | ||
@@ -12,0 +12,0 @@ if (e.target && e.target.classList.contains('close')) { |
@@ -9,3 +9,3 @@ /** | ||
function dropdowns($elements) { | ||
$elements.forEach($dropdown => { | ||
$elements.forEach(($dropdown) => { | ||
if ($dropdown.classList.contains('dropdown--hoverable')) { | ||
@@ -16,3 +16,3 @@ return; | ||
const $toggle = $dropdown.querySelector('[data-toggle="dropdown"]'); | ||
$toggle.addEventListener('click', e => { | ||
$toggle.addEventListener('click', (e) => { | ||
function dismissDropdown() { | ||
@@ -19,0 +19,0 @@ $toggle.classList.remove('button--active'); |
@@ -9,3 +9,3 @@ /** | ||
function dropdowns($elements) { | ||
$elements.forEach($dropdown => { | ||
$elements.forEach(($dropdown) => { | ||
if ($dropdown.classList.contains('dropdown--hoverable')) { | ||
@@ -16,3 +16,3 @@ return; | ||
const $toggle = $dropdown.querySelector('[data-toggle="dropdown"]'); | ||
$toggle.addEventListener('click', e => { | ||
$toggle.addEventListener('click', (e) => { | ||
function dismissDropdown() { | ||
@@ -19,0 +19,0 @@ $toggle.classList.remove('button--active'); |
@@ -9,4 +9,4 @@ /** | ||
function menu($elements) { | ||
$elements.forEach($menu => { | ||
$menu.addEventListener('click', event => { | ||
$elements.forEach(($menu) => { | ||
$menu.addEventListener('click', (event) => { | ||
let $listItem = event.target; | ||
@@ -41,3 +41,3 @@ while ($listItem) { | ||
.querySelectorAll('.menu__link') | ||
.forEach($elItem => $elItem.classList.remove('menu__link--active')); | ||
.forEach(($elItem) => $elItem.classList.remove('menu__link--active')); | ||
@@ -63,3 +63,3 @@ // Traverse parents and add active class. | ||
if ($button) { | ||
$button.addEventListener('click', e => { | ||
$button.addEventListener('click', (e) => { | ||
$menu.classList.toggle('menu--show'); | ||
@@ -66,0 +66,0 @@ }); |
@@ -9,4 +9,4 @@ /** | ||
function menu($elements) { | ||
$elements.forEach($menu => { | ||
$menu.addEventListener('click', event => { | ||
$elements.forEach(($menu) => { | ||
$menu.addEventListener('click', (event) => { | ||
let $listItem = event.target; | ||
@@ -41,3 +41,3 @@ while ($listItem) { | ||
.querySelectorAll('.menu__link') | ||
.forEach($elItem => $elItem.classList.remove('menu__link--active')); | ||
.forEach(($elItem) => $elItem.classList.remove('menu__link--active')); | ||
@@ -63,3 +63,3 @@ // Traverse parents and add active class. | ||
if ($button) { | ||
$button.addEventListener('click', e => { | ||
$button.addEventListener('click', (e) => { | ||
$menu.classList.toggle('menu--show'); | ||
@@ -66,0 +66,0 @@ }); |
@@ -9,3 +9,3 @@ /** | ||
function navbar($elements) { | ||
$elements.forEach($navbar => { | ||
$elements.forEach(($navbar) => { | ||
// TODO: Use data-toggle approach. | ||
@@ -21,8 +21,8 @@ const $toggle = $navbar.querySelector('.navbar__toggle'); | ||
$toggle.addEventListener('click', e => { | ||
$toggle.addEventListener('click', (e) => { | ||
$navbar.classList.add('navbar-sidebar--show'); | ||
}); | ||
[$backdrop, $sidebarClose].forEach($el => | ||
$el.addEventListener('click', e => { | ||
[$backdrop, $sidebarClose].forEach(($el) => | ||
$el.addEventListener('click', (e) => { | ||
$navbar.classList.remove('navbar-sidebar--show'); | ||
@@ -29,0 +29,0 @@ }), |
@@ -9,3 +9,3 @@ /** | ||
function navbar($elements) { | ||
$elements.forEach($navbar => { | ||
$elements.forEach(($navbar) => { | ||
// TODO: Use data-toggle approach. | ||
@@ -21,8 +21,8 @@ const $toggle = $navbar.querySelector('.navbar__toggle'); | ||
$toggle.addEventListener('click', e => { | ||
$toggle.addEventListener('click', (e) => { | ||
$navbar.classList.add('navbar-sidebar--show'); | ||
}); | ||
[$backdrop, $sidebarClose].forEach($el => | ||
$el.addEventListener('click', e => { | ||
[$backdrop, $sidebarClose].forEach(($el) => | ||
$el.addEventListener('click', (e) => { | ||
$navbar.classList.remove('navbar-sidebar--show'); | ||
@@ -29,0 +29,0 @@ }), |
@@ -10,8 +10,8 @@ /** | ||
return function radioBehavior($elements) { | ||
$elements.forEach($element => { | ||
$element.addEventListener(eventName, event => { | ||
$elements.forEach(($element) => { | ||
$element.addEventListener(eventName, (event) => { | ||
if (event.target && event.target.classList.contains(itemClass)) { | ||
$element.querySelectorAll('.' + itemClass).forEach($elItem => | ||
$elItem.classList.remove(activeItemClass) | ||
); | ||
$element | ||
.querySelectorAll('.' + itemClass) | ||
.forEach(($elItem) => $elItem.classList.remove(activeItemClass)); | ||
event.target.classList.add(activeItemClass); | ||
@@ -21,3 +21,3 @@ } | ||
}); | ||
} | ||
}; | ||
} |
@@ -10,8 +10,8 @@ /** | ||
return function radioBehavior($elements) { | ||
$elements.forEach($element => { | ||
$element.addEventListener(eventName, event => { | ||
$elements.forEach(($element) => { | ||
$element.addEventListener(eventName, (event) => { | ||
if (event.target && event.target.classList.contains(itemClass)) { | ||
$element.querySelectorAll('.' + itemClass).forEach($elItem => | ||
$elItem.classList.remove(activeItemClass) | ||
); | ||
$element | ||
.querySelectorAll('.' + itemClass) | ||
.forEach(($elItem) => $elItem.classList.remove(activeItemClass)); | ||
event.target.classList.add(activeItemClass); | ||
@@ -21,3 +21,3 @@ } | ||
}); | ||
} | ||
}; | ||
} |
{ | ||
"name": "infima", | ||
"version": "0.2.0-alpha.19", | ||
"version": "0.2.0-alpha.20", | ||
"description": "A UI framework for content-centric websites.", | ||
@@ -25,23 +25,52 @@ "author": "Yangshun Tay", | ||
"cssnano": "^4.1.10", | ||
"del": "^4.1.0", | ||
"gulp": "^4.0.0", | ||
"gulp-postcss": "^8.0.0", | ||
"gulp-rename": "^1.2.2", | ||
"del": "^6.0.0", | ||
"gulp": "^4.0.2", | ||
"gulp-postcss": "^9.0.0", | ||
"gulp-rename": "^2.0.0", | ||
"gulp-rtlcss": "^1.4.1", | ||
"gulp-sass": "^4.0.1", | ||
"gulp-sass": "^4.1.0", | ||
"gulp-webserver": "^0.9.1", | ||
"lint-staged": "^10.5.4", | ||
"natives": "^1.1.6", | ||
"postcss-preset-infima": "^0.2.0-alpha.18" | ||
"postcss": "^8.2.6", | ||
"postcss-preset-infima": "^0.2.0-alpha.19", | ||
"stylelint": "^13.10.0", | ||
"stylelint-copyright": "^2.0.0-alpha.69", | ||
"stylelint-declaration-block-no-ignored-properties": "^2.3.0", | ||
"stylelint-high-performance-animation": "^1.5.2", | ||
"stylelint-order": "^4.1.0" | ||
}, | ||
"scripts": { | ||
"build": "gulp build", | ||
"start": "gulp", | ||
"build": "gulp build" | ||
"lint": "stylelint \"styles/**/*.pcss\"", | ||
"lint:fix": "stylelint \"styles/**/*.pcss\" --fix" | ||
}, | ||
"engines": { | ||
"node": ">=8" | ||
"node": ">=12" | ||
}, | ||
"files": [ | ||
"dist/{css,js}/**/*.{css,js}", | ||
"styles/**/*.css" | ||
] | ||
"styles/**/*.pcss" | ||
], | ||
"stylelint": { | ||
"plugins": [ | ||
"stylelint-copyright", | ||
"stylelint-declaration-block-no-ignored-properties", | ||
"stylelint-high-performance-animation", | ||
"stylelint-order" | ||
], | ||
"rules": { | ||
"docusaurus/copyright-header": true, | ||
"order/properties-alphabetical-order": true, | ||
"plugin/declaration-block-no-ignored-properties": true, | ||
"plugin/no-low-performance-animation-properties": true | ||
}, | ||
"ignoreFiles": [ | ||
"**/variables.pcss" | ||
] | ||
}, | ||
"lint-staged": { | ||
"*.pcss": "npm run lint:fix" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
592363
0
17
10252