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

@top-message/ui-lib

v2.24.52

Published

UI Library for top-message products

Readme

ui-lib

UI component library for TopMessage products, built on top of Ant Design with:

  • shared design tokens (CSS variables)
  • shared Ant Design theme tokens
  • shared locale mapping

Core Theme Architecture

The theming entrypoint is TopMessageConfigProvider in src/components/theme/TopMessageConfigProvider.tsx.

It applies three concerns in one place:

  1. Design tokens (CSS variables)

    • Imports src/styles/variables.css.
    • Provides palette, spacing, radius, and shared style primitives used by all components.
  2. Ant Design locale

    • Maps language (de, fr, it, es, nl, pl, sv, en) through src/components/locale.ts.
    • Passes the matching Ant locale object to Ant Design ConfigProvider.
  3. Ant Design theme

    • Uses mergeTopMessageTheme(themeOverrides) from src/components/theme/antdTheme.ts.
    • Merges a shared base + TopMessage component tokens + optional consumer overrides.

Theme Layers

Theme composition in antdTheme.ts is structured as:

  • baseToken / baseTheme: foundation-level defaults (primary color, border defaults, base font).
  • topMessageTheme: standard component-level tokens (for example Segmented, Slider, InputNumber, Select).
  • mergeTopMessageTheme(overrides): safe merge point for app/product-specific overrides.

ConfigProvider Usage Rules

1) Required top-level wrapper

Wrap app roots and Storybook roots with TopMessageConfigProvider.

import { TopMessageConfigProvider } from '@top-message/ui-lib';

<TopMessageConfigProvider language="en">
    <App />
</TopMessageConfigProvider>;

2) Default component behavior

Components should rely on the top-level provider for:

  • locale
  • standard theme tokens
  • global token consistency

Avoid adding local ConfigProvider unless there is a clear scoped requirement.

3) When local ConfigProvider is acceptable

Use a local ConfigProvider only for intentional scoped overrides that must not affect all components.

Example: OTP input styling uses an Input token override (otpInputTheme), and keeping it local prevents global changes to every Input/Password/TextArea.

Practical Notes

  • language controls Ant Design locale text.
  • locale props in some date/time components are still used for formatting behavior (for example en-US 12h/time formats), even though Ant locale is global.
  • themeOverrides on TopMessageConfigProvider is the supported extension point for product-level theming.