@northslopetech/altitude-ui 2.8.2 → 3.0.0-alpha.10
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.
- package/README.md +20 -5
- package/dist/index.d.mts +586 -234
- package/dist/index.d.ts +586 -234
- package/dist/index.js +3498 -2808
- package/dist/index.mjs +3470 -2864
- package/dist/styles.css +6 -0
- package/package.json +22 -21
- package/dist/acme-tokens.css +0 -90
- package/dist/dnv-tokens.css +0 -103
- package/dist/tokens.css +0 -105
package/README.md
CHANGED
|
@@ -5,11 +5,26 @@ React UI components for the Altitude design system, built on top of [shadcn/ui](
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
npm install @northslopetech/altitude-ui
|
|
9
|
-
# or
|
|
10
8
|
pnpm add @northslopetech/altitude-ui
|
|
11
9
|
```
|
|
12
10
|
|
|
11
|
+
`@northslopetech/altitude-tokens` is installed automatically as a dependency.
|
|
12
|
+
|
|
13
|
+
Then import the stylesheet once at your app's entry point:
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
import "@northslopetech/altitude-ui/styles.css";
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
This single import provides design tokens, typography utilities, and semantic color utilities. No Tailwind preset is required.
|
|
20
|
+
|
|
21
|
+
Fonts (`Hanken Grotesk Variable` and `JetBrains Mono Variable`) are bundled with this package — `styles.css` `@import`s them via `@fontsource-variable`, so consumers don't need to install or load fonts separately. (`@northslopetech/altitude-tokens` declares the family names but deliberately leaves font loading to the rendering layer; this package is that rendering layer.)
|
|
22
|
+
|
|
23
|
+
### Requirements
|
|
24
|
+
|
|
25
|
+
- **Tailwind CSS v4** — the stylesheet uses `@theme` and `@utility` directives.
|
|
26
|
+
- **Peer dependencies** — `react`, `react-dom`.
|
|
27
|
+
|
|
13
28
|
## Architecture
|
|
14
29
|
|
|
15
30
|
This package combines the best of both worlds:
|
|
@@ -64,7 +79,7 @@ function Example() {
|
|
|
64
79
|
<Button size="sm">Small</Button>
|
|
65
80
|
<Button size="lg">Large</Button>
|
|
66
81
|
<Button size="xl">Extra Large</Button>
|
|
67
|
-
<Button size="
|
|
82
|
+
<Button size="default">🎯</Button>
|
|
68
83
|
</div>
|
|
69
84
|
);
|
|
70
85
|
}
|
|
@@ -167,7 +182,7 @@ pnpm check-types
|
|
|
167
182
|
npx shadcn@latest add [component-name]
|
|
168
183
|
```
|
|
169
184
|
|
|
170
|
-
> **Note**: The package includes a prebuild script that automatically builds tokens
|
|
185
|
+
> **Note**: The package includes a prebuild script that automatically builds tokens. For watch mode (`pnpm dev`), build tokens manually first with `pnpm tokens:build` from the repo root.
|
|
171
186
|
|
|
172
187
|
## Adding New Components
|
|
173
188
|
|
|
@@ -287,7 +302,7 @@ import { Typography } from "@northslopetech/altitude-ui";
|
|
|
287
302
|
function Example() {
|
|
288
303
|
return (
|
|
289
304
|
<div>
|
|
290
|
-
<Typography variant="display-
|
|
305
|
+
<Typography variant="display-3xl">Large Display Text</Typography>
|
|
291
306
|
<Typography variant="heading-lg">Section Heading</Typography>
|
|
292
307
|
<Typography variant="body-md">Body paragraph text</Typography>
|
|
293
308
|
<Typography variant="label-sm-bold">Form Label</Typography>
|