@campminder/ds 0.1.0
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 +51 -0
- package/dist/index.cjs +5597 -0
- package/dist/index.d.cts +771 -0
- package/dist/index.d.ts +771 -0
- package/dist/index.js +5379 -0
- package/package.json +62 -0
- package/styles.css +232 -0
package/README.md
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# @campminder/ds
|
|
2
|
+
|
|
3
|
+
The Campminder design system as an npm package — base-ui-era components + design tokens, for apps that prefer `npm install` over shadcn copy-source. The package is **generated from the registry** (`npm run sync`), so it never drifts from what the design system ships.
|
|
4
|
+
|
|
5
|
+
> Published to the **public npm registry** (no auth). Requires React 19 · Next.js App Router · Tailwind v4.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @campminder/ds @base-ui/react
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
`@base-ui/react` is a peer (you control its version); everything else the components need is pulled in automatically.
|
|
14
|
+
|
|
15
|
+
## Wire up styles — one line
|
|
16
|
+
|
|
17
|
+
```css
|
|
18
|
+
/* your globals.css, after Tailwind */
|
|
19
|
+
@import "tailwindcss";
|
|
20
|
+
@import "@campminder/ds/styles.css"; /* tokens + the @source Tailwind needs */
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
That single import gives you the Campminder tokens (so `bg-primary` is brand purple) **and** the Tailwind scanning of the package's components. No config file.
|
|
24
|
+
|
|
25
|
+
## Use
|
|
26
|
+
|
|
27
|
+
```tsx
|
|
28
|
+
import { Button, Card, Badge, PhoneInput, CamperForm } from "@campminder/ds"
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Works in Server Components — the package carries its own client boundary.
|
|
32
|
+
|
|
33
|
+
## What's included
|
|
34
|
+
|
|
35
|
+
- **Primitives:** avatar, badge, breadcrumb, button, card, checkbox, command, dialog, field, input, input-group, label, popover, scroll-area, select, separator, sheet, sidebar, skeleton, switch, table, tabs, textarea, tooltip
|
|
36
|
+
- **Domain components:** phone-input, photo-upload, step-card, step-notices, session-card / session-picker, person-list, person-tabs, camper-form, package-picker, addon-picker
|
|
37
|
+
- **Hooks / utils:** use-locale, use-mobile, session-selection helpers, `cn`
|
|
38
|
+
|
|
39
|
+
**Not yet included:** the admin shell (sidebar/search/top-nav) — deferred to a follow-up. Pull those from the copy-source registry for now.
|
|
40
|
+
|
|
41
|
+
## Versioning
|
|
42
|
+
|
|
43
|
+
semver, shared with the registry's `registry-versions.json`. `npm update @campminder/ds` to take changes; nothing updates under you.
|
|
44
|
+
|
|
45
|
+
## Maintaining (for the design system team)
|
|
46
|
+
|
|
47
|
+
`src/` is **generated** from the registry by `scripts/sync-from-registry.mjs` (runs automatically in `npm run build`). Don't hand-edit `src/` — edit the source components in the design system, and the package mirrors them. `styles.css` is likewise generated from `app/globals.css`.
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
npm run build # sync from registry → generate tokens → bundle (ESM+CJS+dts)
|
|
51
|
+
```
|