@stackone/malachite 0.64.1 → 0.65.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/LICENSE +21 -0
- package/README.md +48 -2
- package/package.json +31 -2
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 StackOne
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,2 +1,48 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
# @stackone/malachite
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@stackone/malachite)
|
|
4
|
+
[](CONTRIBUTING.md#repo-health)
|
|
5
|
+
[](CONTRIBUTING.md#repo-health)
|
|
6
|
+
|
|
7
|
+
StackOne's themeable React component library. Components render inside a consumer's
|
|
8
|
+
Shadow DOM with scoped Tailwind CSS, and all colors come from theme tokens.
|
|
9
|
+
|
|
10
|
+
## Install
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npm install @stackone/malachite
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
React 18 or 19, plus `react-dom` and `react-hook-form`, are peer dependencies.
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
```tsx
|
|
21
|
+
import {applyDarkTheme, Button} from '@stackone/malachite';
|
|
22
|
+
|
|
23
|
+
applyDarkTheme();
|
|
24
|
+
|
|
25
|
+
export const Example = () => <Button variant="filled">Save</Button>;
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Components
|
|
29
|
+
|
|
30
|
+
`COMPONENTS.md`, shipped in the package, catalogs every exported component with its
|
|
31
|
+
purpose and key props. Reach for one of those before hand-rolling UI.
|
|
32
|
+
|
|
33
|
+
## Theming
|
|
34
|
+
|
|
35
|
+
Colors come from `--malachite-*` CSS custom properties rather than being passed in as
|
|
36
|
+
props, so components stay on-palette. Switch mode with `applyLightTheme` /
|
|
37
|
+
`applyDarkTheme` / `toggleTheme`, and override individual tokens with `applyTheme` or
|
|
38
|
+
`applyCustomTheme` — that is the supported way to restyle, rather than passing colors
|
|
39
|
+
into components.
|
|
40
|
+
|
|
41
|
+
## Contributing
|
|
42
|
+
|
|
43
|
+
See [`CONTRIBUTING.md`](CONTRIBUTING.md) for the repo-health score behind the badges
|
|
44
|
+
above, and for how to refresh them.
|
|
45
|
+
|
|
46
|
+
## License
|
|
47
|
+
|
|
48
|
+
MIT — see [`LICENSE`](LICENSE).
|
package/package.json
CHANGED
|
@@ -1,10 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stackone/malachite",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.65.0",
|
|
4
|
+
"description": "StackOne's themeable React component library — Shadow DOM isolated, scoped Tailwind, theme-token driven.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "StackOne",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"react",
|
|
9
|
+
"component-library",
|
|
10
|
+
"design-system",
|
|
11
|
+
"shadow-dom",
|
|
12
|
+
"tailwind",
|
|
13
|
+
"theming",
|
|
14
|
+
"stackone"
|
|
15
|
+
],
|
|
4
16
|
"type": "module",
|
|
5
17
|
"module": "dist/index.js",
|
|
6
18
|
"main": "dist/index.js",
|
|
7
19
|
"types": "dist/index.d.ts",
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "git+https://github.com/StackOneHQ/malachite.git"
|
|
23
|
+
},
|
|
24
|
+
"homepage": "https://www.stackone.com",
|
|
25
|
+
"bugs": {
|
|
26
|
+
"email": "engineering@stackone.com"
|
|
27
|
+
},
|
|
8
28
|
"files": [
|
|
9
29
|
"dist",
|
|
10
30
|
"README.md",
|
|
@@ -24,6 +44,8 @@
|
|
|
24
44
|
"build": "vite build",
|
|
25
45
|
"lint": "biome lint",
|
|
26
46
|
"lint:fix": "biome lint --fix",
|
|
47
|
+
"test": "vitest run",
|
|
48
|
+
"test:watch": "vitest",
|
|
27
49
|
"typecheck": "tsc -p tsconfig.app.json --noEmit && tsc -p tsconfig.demo.json --noEmit",
|
|
28
50
|
"docs:components": "node scripts/generate-components-doc.mjs",
|
|
29
51
|
"docs:check": "node scripts/generate-components-doc.mjs --check",
|
|
@@ -40,6 +62,8 @@
|
|
|
40
62
|
"@fontsource/geist-sans": "^5.2.5",
|
|
41
63
|
"@fontsource/inter": "^5.2.8",
|
|
42
64
|
"@tailwindcss/postcss": "^4.1.10",
|
|
65
|
+
"@testing-library/react": "^16.3.2",
|
|
66
|
+
"@testing-library/user-event": "^14.6.1",
|
|
43
67
|
"@types/node": "^22.15.18",
|
|
44
68
|
"@types/react": "^18.3.12",
|
|
45
69
|
"@types/react-dom": "^18.3.1",
|
|
@@ -47,12 +71,17 @@
|
|
|
47
71
|
"@vitejs/plugin-react-swc": "^3.7.1",
|
|
48
72
|
"autoprefixer": "^10.4.21",
|
|
49
73
|
"globals": "^16.0.0",
|
|
74
|
+
"jsdom": "^29.1.1",
|
|
50
75
|
"postcss": "^8.5.12",
|
|
76
|
+
"react": "^18.3.1",
|
|
77
|
+
"react-doctor": "0.9.2",
|
|
78
|
+
"react-dom": "^18.3.1",
|
|
51
79
|
"tailwindcss": "^4.1.10",
|
|
52
80
|
"typescript": "~5.8.3",
|
|
53
81
|
"vite": "^6.4.1",
|
|
54
82
|
"vite-plugin-dts": "^4.5.3",
|
|
55
|
-
"vite-plugin-svgr": "^4.3.0"
|
|
83
|
+
"vite-plugin-svgr": "^4.3.0",
|
|
84
|
+
"vitest": "^3.2.7"
|
|
56
85
|
},
|
|
57
86
|
"dependencies": {
|
|
58
87
|
"@tanstack/react-virtual": "^3.14.5",
|