@mindtris/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 +3 -69
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -3,74 +3,8 @@
3
3
  Published as **@mindtris/ui** on [npm](https://www.npmjs.com/package/@mindtris/ui).
4
4
 
5
5
  ```bash
6
- # -----------------------------------------------------------------------------
7
- # install (npm)
8
- # -----------------------------------------------------------------------------
9
6
  pnpm add @mindtris/ui
10
-
11
- # -----------------------------------------------------------------------------
12
- # publish to npm (from pkg/design)
13
- # -----------------------------------------------------------------------------
14
- cd pkg/design
15
- pnpm run build # build dist/ (runs automatically on publish via prepublishOnly)
16
- npm login # one-time: log in to npmjs.com
17
- npm publish --access public # first publish; use npm version patch && npm publish for releases
18
-
19
- # -----------------------------------------------------------------------------
20
- # install via file link (local dev, e.g. dash)
21
- # -----------------------------------------------------------------------------
22
- # In the app: pnpm add file:../mindtris-ui/pkg/design
23
- # Run `pnpm run build` in pkg/design first so dist/ exists; then the app consumes the built output.
24
-
25
- # -----------------------------------------------------------------------------
26
- # tokens (CSS) — MUST import once in app root CSS
27
- # -----------------------------------------------------------------------------
28
- # app/globals.css (or app/css/style.css):
29
- # @import '@mindtris/ui/tokens';
30
- #
31
- # then use semantic token classes:
32
- # bg-background text-foreground border-border bg-card text-muted-foreground
33
- # bg-primary text-primary-foreground bg-destructive text-destructive-foreground
34
-
35
-
36
- # -----------------------------------------------------------------------------
37
- # react usage (UI + theme engine)
38
- # -----------------------------------------------------------------------------
39
- # import what you need:
40
- # import { Button, Input, Label, DatePicker, Container, Page, Section, Toaster, useThemeManager } from '@mindtris/ui'
41
- #
42
- # theme apply (runtime; sets CSS vars on <html>):
43
- # const { applyTheme, applyImportedTheme, applyRadius, isDarkMode } = useThemeManager()
44
- # applyThemePreset('mindtris-ui', isDarkMode)
45
-
46
-
47
- # -----------------------------------------------------------------------------
48
- # package rules (CONTRIBUTING.md summary)
49
- # -----------------------------------------------------------------------------
50
- # scope:
51
- # - UI-only primitives + tokens + theme engine
52
- # - MUST be usable in >= 2 apps without renaming meaning
53
- #
54
- # must NOT exist in pkg/design:
55
- # - API calls / data fetching
56
- # - domain terms (Invoice, User, KYC, Transaction, ...)
57
- # - app routing/nav/permissions/workflows
58
- #
59
- # styling:
60
- # - token-only colors (NO tailwind palette like bg-gray-900, NO hex in components)
61
- # - prefer semantic classes: bg-card, text-foreground, border-border, ...
62
- #
63
- # labels and copy:
64
- # - sentence case: capitalize only the first letter (e.g. "Full name", not "Full Name")
65
- # - exception: proper nouns, acronyms (e.g. "API key", "URL")
66
- #
67
- # layouts:
68
- # - components like Sidebar/Header are chrome/slots only; apps provide routes + items
69
-
70
-
71
- # -----------------------------------------------------------------------------
72
- # dev checks (in this repo)
73
- # -----------------------------------------------------------------------------
74
- cd pkg/design
75
- pnpm tsc --noEmit -p tsconfig.json
76
7
  ```
8
+
9
+ In app root CSS: `@import '@mindtris/ui/tokens';`
10
+ In code: `import { Button, Container, Page, Section, Toaster } from '@mindtris/ui'`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mindtris/ui",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "private": false,
5
5
  "description": "Mindtris UI - Components, themes, and tokens",
6
6
  "main": "./dist/index.mjs",
@@ -13,7 +13,7 @@
13
13
  ],
14
14
  "repository": {
15
15
  "type": "git",
16
- "url": "https://github.com/mindtris/mindtris-ui.git",
16
+ "url": "git+https://github.com/mindtris/mindtris-ui.git",
17
17
  "directory": "pkg/design"
18
18
  },
19
19
  "publishConfig": {