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

@riducms/ui

v0.26.0

Published

Framework-owned Svelte UI primitives shared by Ridu admin surfaces.

Readme

@riducms/ui

Svelte interaction components for the Ridu admin and admin plugins. They wrap Bits UI behavior and apply Ridu's theme tokens.

Import components by name:

import { CommandInput, CommandRoot, ConfirmationDialog, PopoverContent, PopoverRoot, cv, type VariantProps } from "@riducms/ui";

Keep every part of a compound primitive, such as CommandRoot, CommandList, and CommandItem, behind this package boundary. Mixing wrappers from separate Bits UI installations can split their Svelte context identity.

Use ConfirmationDialog for plugin confirmations instead of browser modal APIs. It focuses the cancel action first, prevents dismissal while an asynchronous confirmation is pending, and requires the consuming admin/plugin to supply localized labels and description text.

Compose conditional classes with Svelte's native class arrays or objects. Use cv() for reusable semantic variants:



const notice = cv({
	base: "notice",
	variants: {
		tone: { neutral: "notice--neutral", warning: "notice--warning" },
	},
	defaultVariants: { tone: "neutral" },
});

type NoticeTone = VariantProps<typeof notice>["tone"];
notice({ tone: "warning", class: "app-notice" });

The helper supports a base string, named string choices, optional defaults, inferred prop types, and an optional additional class string. Omitted or undefined selections use defaults; absent defaults and empty class choices add nothing. class is reserved and cannot be a variant axis. Compose class arrays or objects at the Svelte boundary: class={[notice({ tone }), className]}. CSS layers and specificity govern overrides. The helper has no utility merging, slots, compound variants, inheritance, or dependency on a styling runtime.

buttonVariants() uses this same contract for links and third-party triggers; Button itself accepts Svelte's native class values. cv() is the only variant helper; utility conflict merging and the tailwind-variants dependency have been removed.

Styling

Import @riducms/ui/theme.css once at your admin entry. The Ridu admin already does this. Shared input/button/field styles are imported by their components and compile to static CSS. PasswordInput supplies a bound string value, standard input attributes, and required localized showLabel/hideLabel props. Its value and autocomplete behavior belong to the native input.

The ridu layer orders reset, theme, base, components, and transitional utilities. Plugins can use ridu-plugins; applications can use app or ordinary unlayered CSS. Import @riducms/ui/layers.css before declaring a framework/plugin layer, including in lazy stylesheets. Application authors can customize the admin with plain CSS:

@import "@riducms/ui/layers.css";

@layer app {
	:root {
		--control-radius: 6px;
		--control-height: 44px;
	}
	.ridu-auth {
		--auth-width: 520px;
	}
	.ridu-input {
		border-color: var(--foreground-muted);
	}
}

Public classes include .ridu-auth, .ridu-auth__content, .ridu-auth__brand, .ridu-auth__heading, .ridu-auth__submit, .ridu-input, .ridu-password-input, .ridu-password-input__toggle, .ridu-button, .ridu-field, .ridu-field-label, .ridu-field-help, .ridu-field-error, and .ridu-field-error-tooltip. Error bubbles use --field-error-surface and --field-error-foreground. Prefer semantic variables for colors and geometry; do not target generated Svelte hashes. Public UI controls, the main admin workflows, and the rich-text and SEO plugins use named component classes. See the Customizing CSS guide for stylesheet registration, light and dark themes, and selectors for individual screens.

Sass authoring

@riducms/ui/styles.scss exports the shared Sass definitions and includes the layer-order declarations. One import establishes the cascade order before your rules. In Ridu's Vite build:

@use "@riducms/ui/styles.scss" as ui;

@layer ridu-plugins {
	.plugin-control {
		@include ui.control-surface;
		padding: 8px var(--control-padding-inline);

		&:focus-visible {
			@include ui.focus-outline;
		}
	}

	@media (max-width: ui.$small) {
		.plugin-control {
			width: 100%;
		}
	}
}

For standalone Dart Sass, enable its NodePackageImporter (CLI: --pkg-importer=node) and use pkg:@riducms/ui/styles.scss instead. Bare package resolution in the example is supplied by Vite. Plain CSS consumers continue to import @riducms/ui/layers.css directly. The Sass entry emits only the layer-order declarations; component rules are emitted where their mixins are included.

  • control-surface supplies the shared resting border, radius, background and shadow. Geometry, text and hover/focus/invalid/disabled behavior stay with the consuming control.
  • focus-outline($offset: var(--focus-outline-offset)) supplies outline declarations inside the caller's focus selector. Components retain their own focus rules so they also work outside the admin's global reset. Inputs retain their separate border-only focus treatment.
  • $small, $medium and $large are the existing inclusive layout boundaries: 768px, 1024px and 1440px. Use ordinary media queries; the shell's desktop minimum remains $small + 1px. Content-specific boundaries stay local.

Keep full semantic class names searchable; nest related states and shallow descendants without changing selector specificity or cascade order. Reuse shared declarations for a common design rule, not simply because two components happen to have the same dimensions. Add no theme values or configurable component variants to Sass: runtime CSS variables and cv() retain those roles.