Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
@servicensw/regions
Advanced tools
Readme
Regions that show/hide. Suitable to be used with drop menus or tab navigation.
Service NSW package documentation and examples
(Login credentials required)
npm install @servicensw/regions --save-dev
CSS
@import '@servicensw/regions';
@import 'servicensw-regions';
@import url('dist/regions.css');
<link href="dist/regions.css" rel="stylesheet" type="text/css">
Vanilla JS
The recommended usage is of ES modules, to take advantage of code-splitting.
import RegionToggle from "@servicensw/regions"
const regionToggles = document.querySelectorAll(".regions:not(.is-excluded)")
regionToggles.forEach(element => {
new RegionToggle(element)
})
Legacy usage;
<script src="dist/region-toggle.js" type="text/javascript"></script>
(initialized for all .regions
elements)const RegionToggle = require("@servicensw/regions")
(initialize yourself)HTML
<ul>
<li><a aria-controls="showHideRegion1">Region 1</a></li>
<li><a aria-controls="showHideRegion2">Region 2</a></li>
<li><a aria-controls="showHideRegion3">Region 3</a></li>
</ul>
<div class="regions">
<div role="region" id="showHideRegion1" aria-label="Region 1">
<p>Region 1</p>
</div>
<div role="region" id="showHideRegion2" aria-label="Region 2">
<p>Region 2</p>
</div>
<div role="region" id="showHideRegion3" aria-label="Region 3">
<p>Region 3</p>
</div>
</div>
Each region must have an id
and role="region"
attribute. The toggle
for that region must have an aria-controls
atttribute with the regions id
as its value.
Change log
FAQs
Region toggle component
The npm package @servicensw/regions receives a total of 102 weekly downloads. As such, @servicensw/regions popularity was classified as not popular.
We found that @servicensw/regions demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 11 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.