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

@polarisoffice/pds-react

v1.1.0

Published

Polaris Design System — React components. 토큰 CSS 변수 기반, 런타임 스타일 엔진 없음.

Readme

@polarisoffice/pds-react

Polaris Design System 의 React 컴포넌트입니다. 치수·색은 Figma 📚Polaris Design System 실측값이며, 렌더 결과를 디자인과 대조하는 검증기가 함께 있습니다.

npm install @polarisoffice/pds-react

쓰기

import { Button, InputField } from '@polarisoffice/pds-react';
import '@polarisoffice/pds-react/tokens.css';   // 토큰 + 웹폰트

export default function Example() {
  return (
    <>
      <Button variant="primary" size={48}>버튼</Button>
      <InputField label="이메일" placeholder="[email protected]" />
    </>
  );
}

tokens.css 는 한 번만 불러오면 됩니다. CSS 변수(--color-*, --radius-*, --typography-*)를 정의합니다. 서체 Pretendard 는 포함되지 않습니다 — 외부 CDN 을 자동으로 부르지 않으므로 프로젝트가 직접 로드하세요(없으면 시스템 한글 서체로 폴백됩니다):

npm i pretendard
// app/layout.tsx — tokens.css 와 같은 자리
import 'pretendard/dist/web/static/pretendard-dynamic-subset.css';

React 18 이상이 필요합니다. 상태를 가진 컴포넌트에는 'use client' 가 붙어 있어 Next.js App Router 의 서버 컴포넌트에서 그대로 가져다 쓸 수 있습니다.

컴포넌트

| | 변형 축 | |---|---| | Button | variant 10종 (primary·default·ai·sub·gray·black·delete + ghost 3종) × size 6종 (24·32·40·48·54·64, 숫자) | | InputField | 상태는 값·상호작용으로 결정 · leftIcon · revealToggle · error | | Toggle | size (md · sm) · label | | Checkbox · Radio · RadioGroup | tone (brand · ai) · indeterminate | | Tabs | variant (primary · secondary) · layout (fill · hug) · size (medium · small) | | SegmentControl | variant (pill · filled · outlined) · layout · size (md · sm) | | Select | size (lg · md · sm) | | Menu · MenuItem · MenuDivider | selected · hasSubmenu · hideCheck | | Table · Badge · Credit | | | Tooltip | placement (top · bottom · left · right · none) | | Toast · Toaster · toast() | type (default · success · error) · placement (top · bottom) | | Popup | 버튼 1~2개 · closable · dontShowAgain | | Dim | loading | | IconButton · DownloadIcon · UserIcon | |

각 컴포넌트는 지원 축을 코드로 알립니다.

Button.supportedProps    // { variant: [...10], size: [24, 32, 40, 48, 54, 64] }
Tooltip.supportedProps   // { placement: ['top','bottom','left','right','none'] }

스타일 방식

CSS 변수 + 인라인 style 만 씁니다. 런타임 스타일 엔진(emotion 등)이 없어 어떤 번들러에서도 그대로 돌아가고, 토큰 값을 바꾸면 재빌드 없이 반영됩니다.

document.documentElement.style.setProperty('--color-accent-normal', '#00c853');
// 버튼·탭·체크박스가 함께 따라옵니다

다크 모드

tokens.csshtml[data-theme="dark"] 로 다크 팔레트를 정의합니다.

document.documentElement.setAttribute('data-theme', 'dark');

색 토큰은 두 갈래입니다 — 테마에 따라 뒤집히는 것(--color-label-inverse, --color-background-base, --color-action-normal)과 고정인 것(--color-static-white, --color-accent-normal, --color-layer-overlay). 직접 색을 조합할 때는 전경과 배경을 같은 갈래에서 골라야 합니다. 섞으면 라이트에서는 멀쩡하다가 다크에서만 글자가 묻힙니다.

값의 출처

치수·색은 디자인이 정본입니다. 문서 산문과 어긋나면 디자인을 따랐고, 그런 자리는 코드 주석에 남겼습니다(Toast 배경·너비, Tooltip radius·padding, Toggle 크기, Radio 점 지름 등).

라이선스

Apache-2.0