npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@wmcadigital/ui-asset-link

v0.1.0-alpha.2

Published

Allows users to download an offline version of the on-page content

Readme

# File Download

UI helpers and patterns for presenting downloadable files and links.

## Markup

````html
<a class="ds-file-download" href="/files/doc.pdf" download>
  <span class="ds-file-download__label">Download PDF</span>
  # @wmcadigital/ui-asset-link UI helpers and styles for presenting downloadable files and links.
  The package supplies CSS classes and icon styling to create consistent file-download links with
  optional descriptive metadata (file size, type, warnings). ## Install pnpm add
  @wmcadigital/ui-asset-link This package depends on `@wmcadigital/ui-icons` for icon styling —
  the package lists it as a dependency and the styles assume symbol-based or inline SVG icons will
  be available. ## What this package provides - A stylesheet (`dist/styles/main.css`) containing the
  `.ds-file-download` block and variants. - SCSS source at `src/styles/main.scss` for customization.
  - Class names and small markup patterns to present file downloads consistently across the site. ##
  Markup examples Basic download link (decorative icon): ```html
  <a class="ds-file-download" href="/files/doc.pdf" download>
    <svg class="ds-file-download__icon" aria-hidden="true" width="36" height="36">
      <use href="#icon-file-pdf"></use>
    </svg>
    <span class="ds-file-download__desc">
      <span class="ds-file-download__label">Download PDF</span>
      <div class="ds-file-download__warning">PDF, 1.2MB</div>
    </span>
    <svg class="ds-file-download__chevron-icon" aria-hidden="true" width="24" height="24">
      <use href="#icon-chevron-right"></use>
    </svg> </a
></a>

Variants:

- `.ds-file-download--non-accessible` — aligns content for visually-focused layouts (not recommended where accessibility text is required).
- `.ds-file-download--document` — adds document-specific spacing.

Key elements:

- `.ds-file-download__icon` — main file icon (styles set width/height and force icons to inherit `currentColor`).
- `.ds-file-download__chevron-icon` — right-hand chevron icon (CTA colour).
- `.ds-file-download__desc` — container for label and metadata.
- `.ds-file-download__warning` — metadata/warning text (e.g. file type, size).

## Accessibility

- Provide clear file type and size in the visible text where helpful (e.g. "PDF, 1.2MB") so users can make informed choices.
- Decorative icons should include `aria-hidden="true"` and not duplicate text that is already visible.
- If the file requires special handling (assistive tech needs to know format or that the link triggers a download), include that information in the visible label rather than relying on the `download` attribute alone.

## Customisation

- Colours and sizes are driven by the design system variables used in the SCSS (`$size-*`, `--color-primary`, `--color-cta`). Override these variables or modify the compiled CSS to match your site theme.
- The styles force fill/stroke on injected sprite symbols to `currentColor` to ensure icons match the declared colours.

Example override:

```css
.my-download .ds-file-download__icon {
  color: #0a66c2;
}
```

## Development

- SCSS source: `src/styles/main.scss`.
- Build: run the monorepo build from the repo root to regenerate `dist/`:

```bash
pnpm -w -r run build
```

- Linting: `pnpm -w -r run lint`.