@hussmartinez/ui 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +30 -1
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,8 +1,37 @@
1
1
  # @hussmartinez/ui
2
2
 
3
+ [![npm version of @hussmartinez/ui](https://img.shields.io/npm/v/@hussmartinez/ui)](https://www.npmjs.com/package/@hussmartinez/ui) [![Verify workflow status on main](https://github.com/ie-huss-martinez/ui/actions/workflows/verify.yml/badge.svg?branch=main)](https://github.com/ie-huss-martinez/ui/actions/workflows/verify.yml?query=branch%3Amain) [![License: Apache-2.0](https://img.shields.io/badge/license-Apache--2.0-blue)](https://github.com/ie-huss-martinez/ui/blob/main/LICENSE)
4
+
3
5
  The design system of the `@hussmartinez` SDK family: design tokens, themes, base styles and accessible React components. Every SDK's editor uses it, and standalone applications can too.
4
6
 
5
- > Status: not published yet. Tokens, theming and the first components are in place; more components are on the way.
7
+ > Status: `0.x`, so the API may still change between minor versions. Tokens, theming and the first components are available; more components are on the way.
8
+
9
+ ## Install
10
+
11
+ ```sh
12
+ npm install @hussmartinez/ui
13
+ ```
14
+
15
+ For the React components, your application also needs `react` and `react-dom` 18.3 or later. They're optional peer dependencies, so the tokens and theme helpers work without them.
16
+
17
+ ## Quick start
18
+
19
+ Import the stylesheet once, at the root of your application, and use the components:
20
+
21
+ ```tsx
22
+ import "@hussmartinez/ui/styles.css";
23
+ import { Button, ThemeProvider } from "@hussmartinez/ui/react";
24
+
25
+ export function App() {
26
+ return (
27
+ <ThemeProvider mode="system">
28
+ <Button variant="primary">Save</Button>
29
+ </ThemeProvider>
30
+ );
31
+ }
32
+ ```
33
+
34
+ `mode="system"` follows the operating system's light or dark preference, in CSS, so nothing flashes on load. Without `ThemeProvider`, the page follows the system preference too; the provider is for a forced mode, a density or a custom theme.
6
35
 
7
36
  ## Entry points
8
37
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hussmartinez/ui",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Design system of the @hussmartinez SDK family: tokens, themes, base styles and accessible React components.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {