@matteoaliano/forest-ui 0.3.6 → 0.4.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.
- package/bin/sync.mjs +27 -151
- package/dist/{chunk-G2ZXCZKP.mjs → chunk-IWYN6REP.mjs} +78 -65
- package/dist/chunk-IWYN6REP.mjs.map +1 -0
- package/dist/index.d.mts +29 -7
- package/dist/index.d.ts +29 -7
- package/dist/index.js +220 -69
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +116 -13
- package/dist/index.mjs.map +1 -1
- package/dist/theme.d.mts +770 -3
- package/dist/theme.d.ts +770 -3
- package/dist/theme.js +77 -67
- package/dist/theme.js.map +1 -1
- package/dist/theme.mjs +1 -1
- package/fonts/aeonik-mono/aeonik-mono.css +32 -0
- package/fonts/aeonik-mono/aeonikmono-light.woff +0 -0
- package/fonts/aeonik-mono/aeonikmono-light.woff2 +0 -0
- package/fonts/aeonik-mono/aeonikmono-medium.woff +0 -0
- package/fonts/aeonik-mono/aeonikmono-medium.woff2 +0 -0
- package/fonts/aeonik-mono/aeonikmono-regular.woff +0 -0
- package/fonts/aeonik-mono/aeonikmono-regular.woff2 +0 -0
- package/package.json +4 -5
- package/skills/forest-agency/SKILL.md +8 -24
- package/skills/forest-external/SKILL.md +8 -26
- package/skills/forest-internal/SKILL.md +8 -26
- package/bin/stamp-version.mjs +0 -53
- package/dist/chunk-G2ZXCZKP.mjs.map +0 -1
- package/dist/index-BCXD47YU.d.mts +0 -795
- package/dist/index-BCXD47YU.d.ts +0 -795
- package/guidelines/FOREST_BE_GUIDELINES.md +0 -90
- package/guidelines/FOREST_FE_GUIDELINES.md +0 -543
- package/guidelines/FOREST_UI_GUIDELINES.md +0 -408
package/dist/theme.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { alpha, avatarColors, base, bg, border, breadcrumbColors, buildTheme, buildThemeOptions, buttonColors, chartColors,
|
|
1
|
+
export { alpha, avatarColors, base, bg, border, breadcrumbColors, buildTheme, buildThemeOptions, buttonColors, chartColors, container, display, error, fg, focusRings, fontFamily, fontFamilyMono, fontSize, fontWeight, forestAgencyPreset, forestExternalPreset, forestInternalPreset, forestTheme, forestThemeOptions, getAvailablePresets, getPreset, gray, iconColors, info, lineHeight, magenta, misc, navColors, radius, red, registerPreset, shadows, sliderColors, spacing, success, text, toggleColors, violet, warning, widths } from './chunk-IWYN6REP.mjs';
|
|
2
2
|
//# sourceMappingURL=theme.mjs.map
|
|
3
3
|
//# sourceMappingURL=theme.mjs.map
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/* Aeonik Mono — bundled with @matteoaliano/forest-ui */
|
|
2
|
+
/* Usage: import "@matteoaliano/forest-ui/fonts/aeonik-mono/aeonik-mono.css" */
|
|
3
|
+
|
|
4
|
+
@font-face {
|
|
5
|
+
font-family: "Aeonik Mono";
|
|
6
|
+
font-style: normal;
|
|
7
|
+
font-weight: 300;
|
|
8
|
+
font-display: swap;
|
|
9
|
+
src:
|
|
10
|
+
url("./aeonikmono-light.woff2") format("woff2"),
|
|
11
|
+
url("./aeonikmono-light.woff") format("woff");
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@font-face {
|
|
15
|
+
font-family: "Aeonik Mono";
|
|
16
|
+
font-style: normal;
|
|
17
|
+
font-weight: 400;
|
|
18
|
+
font-display: swap;
|
|
19
|
+
src:
|
|
20
|
+
url("./aeonikmono-regular.woff2") format("woff2"),
|
|
21
|
+
url("./aeonikmono-regular.woff") format("woff");
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@font-face {
|
|
25
|
+
font-family: "Aeonik Mono";
|
|
26
|
+
font-style: normal;
|
|
27
|
+
font-weight: 500;
|
|
28
|
+
font-display: swap;
|
|
29
|
+
src:
|
|
30
|
+
url("./aeonikmono-medium.woff2") format("woff2"),
|
|
31
|
+
url("./aeonikmono-medium.woff") format("woff");
|
|
32
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@matteoaliano/forest-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "Forest Design System — themed MUI components",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
"require": "./dist/theme.js"
|
|
18
18
|
},
|
|
19
19
|
"./fonts/aeonik/aeonik.css": "./fonts/aeonik/aeonik.css",
|
|
20
|
-
"./fonts/alkemy-beta/alkemy-beta.css": "./fonts/alkemy-beta/alkemy-beta.css"
|
|
20
|
+
"./fonts/alkemy-beta/alkemy-beta.css": "./fonts/alkemy-beta/alkemy-beta.css",
|
|
21
|
+
"./fonts/aeonik-mono/aeonik-mono.css": "./fonts/aeonik-mono/aeonik-mono.css"
|
|
21
22
|
},
|
|
22
23
|
"bin": {
|
|
23
24
|
"forest-ui": "./bin/sync.mjs"
|
|
@@ -25,16 +26,14 @@
|
|
|
25
26
|
"files": [
|
|
26
27
|
"dist",
|
|
27
28
|
"bin",
|
|
28
|
-
"guidelines",
|
|
29
29
|
"skills",
|
|
30
30
|
"fonts"
|
|
31
31
|
],
|
|
32
32
|
"scripts": {
|
|
33
|
-
"presync": "node bin/stamp-version.mjs",
|
|
34
33
|
"sync": "node bin/sync.mjs",
|
|
35
34
|
"lint": "eslint src --ext .ts,.tsx",
|
|
36
35
|
"build": "tsup",
|
|
37
|
-
"prepublishOnly": "
|
|
36
|
+
"prepublishOnly": "tsup && node bin/sync.mjs",
|
|
38
37
|
"dev": "tsup --watch",
|
|
39
38
|
"test": "vitest",
|
|
40
39
|
"test:coverage": "vitest --coverage",
|
|
@@ -3,7 +3,7 @@ name: forest-agency
|
|
|
3
3
|
description: Forest UI Design System rules for the Agency (charcoal/red) preset. Enforces correct imports, component usage, and theming with @matteoaliano/forest-ui. Use when the project uses forest-ui, forest-agency preset, or when user builds UI components in a forest-ui project. Triggers on "forest", "forest-ui", "forest agency", "@matteoaliano/forest-ui".
|
|
4
4
|
metadata:
|
|
5
5
|
author: Forest Design System
|
|
6
|
-
version: 0.
|
|
6
|
+
version: 0.4.1
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# Forest UI — Agency Preset
|
|
@@ -35,29 +35,6 @@ function App() {
|
|
|
35
35
|
}
|
|
36
36
|
```
|
|
37
37
|
|
|
38
|
-
## Preset Identity
|
|
39
|
-
|
|
40
|
-
**Atmosphere:** Bold, authoritative, and editorial — commanding yet refined.
|
|
41
|
-
|
|
42
|
-
| Role | Color | Hex |
|
|
43
|
-
|------|-------|-----|
|
|
44
|
-
| Primary (brand) | Commanding Charcoal | `#09090b` |
|
|
45
|
-
| Secondary (brand) | Deep Onyx | `#18181b` |
|
|
46
|
-
| Accent | Signal Red | `#FF2821` |
|
|
47
|
-
| Background | Warm Parchment | `#faf9f8` |
|
|
48
|
-
| Surface | Pure White | `#ffffff` |
|
|
49
|
-
| Text primary | Near-Black Ink | `#18181b` |
|
|
50
|
-
| Text secondary | Steel Gray | `#3f3f46` |
|
|
51
|
-
| Border primary | Silver Mist | `#d8d8dc` |
|
|
52
|
-
| Success | Verdant | `#079455` |
|
|
53
|
-
| Warning | Amber | `#dc6803` |
|
|
54
|
-
| Error | Coral | `#d92d20` |
|
|
55
|
-
| Info | Sky | `#1570ef` |
|
|
56
|
-
|
|
57
|
-
**Corner radius:** Sharp and architectural (4px for buttons/inputs, up to 12px for cards/modals).
|
|
58
|
-
**Font:** Aeonik (geometric sans-serif). Consumers must load it.
|
|
59
|
-
**Button height:** Compact 32px.
|
|
60
|
-
|
|
61
38
|
## Available Components
|
|
62
39
|
|
|
63
40
|
**Inputs:** Button, ButtonGroup, TextField, Select + MenuItem, MultiSelect, Checkbox, RadioGroup + Radio, Switch, ToggleButton + ToggleButtonGroup, Fab, IconButton, Autocomplete, Search, DatePicker
|
|
@@ -74,6 +51,13 @@ function App() {
|
|
|
74
51
|
|
|
75
52
|
See `references/components.md` for full API details and `references/patterns.md` for code examples.
|
|
76
53
|
|
|
54
|
+
## Tooltip vs Popover
|
|
55
|
+
|
|
56
|
+
- **Tooltip** — Use for **text-only hints**. The Tooltip has a dark (black) background and is meant for short, plain-text labels or descriptions. Do not nest rich content inside a Tooltip.
|
|
57
|
+
- **Popover** — Use when you need to display **rich or interactive content** such as Chips, lists, buttons, or any nested components. Popover renders in a neutral surface container that supports arbitrary children.
|
|
58
|
+
|
|
59
|
+
**Rule of thumb:** If the overlay content is just a string, use `<Tooltip>`. If it contains components, use `<Popover>`.
|
|
60
|
+
|
|
77
61
|
## Common Anti-Patterns
|
|
78
62
|
|
|
79
63
|
1. **Importing from `@mui/material`** instead of `@matteoaliano/forest-ui`
|
|
@@ -3,7 +3,7 @@ name: forest-external
|
|
|
3
3
|
description: Forest UI Design System rules for the External (violet) preset. Enforces correct imports, component usage, and theming with @matteoaliano/forest-ui. Use when the project uses forest-ui, forest-external preset, or when user builds UI components in a forest-ui project. Triggers on "forest", "forest-ui", "forest external", "@matteoaliano/forest-ui".
|
|
4
4
|
metadata:
|
|
5
5
|
author: Forest Design System
|
|
6
|
-
version: 0.
|
|
6
|
+
version: 0.4.1
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# Forest UI — External Preset
|
|
@@ -35,31 +35,6 @@ function App() {
|
|
|
35
35
|
}
|
|
36
36
|
```
|
|
37
37
|
|
|
38
|
-
## Preset Identity
|
|
39
|
-
|
|
40
|
-
**Atmosphere:** Vibrant, creative, and confidently modern — electric yet composed.
|
|
41
|
-
|
|
42
|
-
| Role | Color | Hex |
|
|
43
|
-
|------|-------|-----|
|
|
44
|
-
| Primary (brand) | Electric Violet | `#9D5FFF` |
|
|
45
|
-
| Primary hover | Deep Amethyst | `#7c4de6` |
|
|
46
|
-
| Brand depth | Royal Violet | `#5b3acc` |
|
|
47
|
-
| Brand tint | Soft Lavender | `#f5f0ff` |
|
|
48
|
-
| Background | Warm Parchment | `#faf9f8` |
|
|
49
|
-
| Surface | Pure White | `#ffffff` |
|
|
50
|
-
| Text primary | Near-Black Ink | `#18181b` |
|
|
51
|
-
| Text secondary | Steel Gray | `#3f3f46` |
|
|
52
|
-
| Border primary | Silver Mist | `#d8d8dc` |
|
|
53
|
-
| Border brand | Violet Frost | `#b090ff` |
|
|
54
|
-
| Success | Verdant | `#079455` |
|
|
55
|
-
| Warning | Amber | `#dc6803` |
|
|
56
|
-
| Error | Coral | `#d92d20` |
|
|
57
|
-
| Info | Sky | `#1570ef` |
|
|
58
|
-
|
|
59
|
-
**Corner radius:** Sharp and contemporary (4px for buttons/inputs, up to 12px for cards/modals).
|
|
60
|
-
**Font:** Aeonik (geometric sans-serif). Consumers must load it.
|
|
61
|
-
**Button height:** Compact 32px.
|
|
62
|
-
|
|
63
38
|
## Available Components
|
|
64
39
|
|
|
65
40
|
**Inputs:** Button, ButtonGroup, TextField, Select + MenuItem, MultiSelect, Checkbox, RadioGroup + Radio, Switch, ToggleButton + ToggleButtonGroup, Fab, IconButton, Autocomplete, Search, DatePicker
|
|
@@ -76,6 +51,13 @@ function App() {
|
|
|
76
51
|
|
|
77
52
|
See `references/components.md` for full API details and `references/patterns.md` for code examples.
|
|
78
53
|
|
|
54
|
+
## Tooltip vs Popover
|
|
55
|
+
|
|
56
|
+
- **Tooltip** — Use for **text-only hints**. The Tooltip has a dark (black) background and is meant for short, plain-text labels or descriptions. Do not nest rich content inside a Tooltip.
|
|
57
|
+
- **Popover** — Use when you need to display **rich or interactive content** such as Chips, lists, buttons, or any nested components. Popover renders in a neutral surface container that supports arbitrary children.
|
|
58
|
+
|
|
59
|
+
**Rule of thumb:** If the overlay content is just a string, use `<Tooltip>`. If it contains components, use `<Popover>`.
|
|
60
|
+
|
|
79
61
|
## Common Anti-Patterns
|
|
80
62
|
|
|
81
63
|
1. **Importing from `@mui/material`** instead of `@matteoaliano/forest-ui`
|
|
@@ -3,7 +3,7 @@ name: forest-internal
|
|
|
3
3
|
description: Forest UI Design System rules for the Internal (magenta) preset. Enforces correct imports, component usage, and theming with @matteoaliano/forest-ui. Use when the project uses forest-ui, forest-internal preset, or when user builds UI components in a forest-ui project. Triggers on "forest", "forest-ui", "forest internal", "@matteoaliano/forest-ui".
|
|
4
4
|
metadata:
|
|
5
5
|
author: Forest Design System
|
|
6
|
-
version: 0.
|
|
6
|
+
version: 0.4.1
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# Forest UI — Internal Preset
|
|
@@ -35,31 +35,6 @@ function App() {
|
|
|
35
35
|
}
|
|
36
36
|
```
|
|
37
37
|
|
|
38
|
-
## Preset Identity
|
|
39
|
-
|
|
40
|
-
**Atmosphere:** Playful, energetic, and unapologetically expressive — vibrant yet functional.
|
|
41
|
-
|
|
42
|
-
| Role | Color | Hex |
|
|
43
|
-
|------|-------|-----|
|
|
44
|
-
| Primary (brand) | Hot Magenta | `#FF78F3` |
|
|
45
|
-
| Primary hover | Vivid Fuchsia | `#e650d4` |
|
|
46
|
-
| Brand depth | Deep Orchid | `#cc28b5` |
|
|
47
|
-
| Brand tint | Blush Mist | `#fff0fa` |
|
|
48
|
-
| Background | Warm Parchment | `#faf9f8` |
|
|
49
|
-
| Surface | Pure White | `#ffffff` |
|
|
50
|
-
| Text primary | Near-Black Ink | `#18181b` |
|
|
51
|
-
| Text secondary | Steel Gray | `#3f3f46` |
|
|
52
|
-
| Border primary | Silver Mist | `#d8d8dc` |
|
|
53
|
-
| Border brand | Pink Frost | `#ff90d8` |
|
|
54
|
-
| Success | Verdant | `#079455` |
|
|
55
|
-
| Warning | Amber | `#dc6803` |
|
|
56
|
-
| Error | Coral | `#d92d20` |
|
|
57
|
-
| Info | Sky | `#1570ef` |
|
|
58
|
-
|
|
59
|
-
**Corner radius:** Sharp and geometric (4px for buttons/inputs, up to 12px for cards/modals).
|
|
60
|
-
**Font:** Aeonik (geometric sans-serif). Consumers must load it.
|
|
61
|
-
**Button height:** Compact 32px.
|
|
62
|
-
|
|
63
38
|
## Available Components
|
|
64
39
|
|
|
65
40
|
**Inputs:** Button, ButtonGroup, TextField, Select + MenuItem, MultiSelect, Checkbox, RadioGroup + Radio, Switch, ToggleButton + ToggleButtonGroup, Fab, IconButton, Autocomplete, Search, DatePicker
|
|
@@ -76,6 +51,13 @@ function App() {
|
|
|
76
51
|
|
|
77
52
|
See `references/components.md` for full API details and `references/patterns.md` for code examples.
|
|
78
53
|
|
|
54
|
+
## Tooltip vs Popover
|
|
55
|
+
|
|
56
|
+
- **Tooltip** — Use for **text-only hints**. The Tooltip has a dark (black) background and is meant for short, plain-text labels or descriptions. Do not nest rich content inside a Tooltip.
|
|
57
|
+
- **Popover** — Use when you need to display **rich or interactive content** such as Chips, lists, buttons, or any nested components. Popover renders in a neutral surface container that supports arbitrary children.
|
|
58
|
+
|
|
59
|
+
**Rule of thumb:** If the overlay content is just a string, use `<Tooltip>`. If it contains components, use `<Popover>`.
|
|
60
|
+
|
|
79
61
|
## Common Anti-Patterns
|
|
80
62
|
|
|
81
63
|
1. **Importing from `@mui/material`** instead of `@matteoaliano/forest-ui`
|
package/bin/stamp-version.mjs
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Stamps the current package version into all guideline .md files.
|
|
5
|
-
* Replaces lines matching `> **forest-ui v*.**` with the version from package.json.
|
|
6
|
-
*
|
|
7
|
-
* Run automatically before sync and publish via npm scripts.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
import { readFileSync, writeFileSync, readdirSync, existsSync } from "node:fs";
|
|
11
|
-
import { resolve, dirname } from "node:path";
|
|
12
|
-
import { fileURLToPath } from "node:url";
|
|
13
|
-
|
|
14
|
-
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
15
|
-
const pkgPath = resolve(__dirname, "..", "package.json");
|
|
16
|
-
const version = JSON.parse(readFileSync(pkgPath, "utf-8")).version;
|
|
17
|
-
|
|
18
|
-
const guidelinesDir = resolve(__dirname, "..", "guidelines");
|
|
19
|
-
const themesDir = resolve(guidelinesDir, "themes");
|
|
20
|
-
|
|
21
|
-
const versionRe = />\s*\*\*forest-ui v[^*]*\*\*/;
|
|
22
|
-
const replacement = `> **forest-ui v${version}**`;
|
|
23
|
-
|
|
24
|
-
function stampFile(filePath) {
|
|
25
|
-
const content = readFileSync(filePath, "utf-8");
|
|
26
|
-
if (!versionRe.test(content)) return false;
|
|
27
|
-
const updated = content.replace(versionRe, replacement);
|
|
28
|
-
if (updated === content) return false;
|
|
29
|
-
writeFileSync(filePath, updated, "utf-8");
|
|
30
|
-
return true;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
let stamped = 0;
|
|
34
|
-
|
|
35
|
-
// Stamp top-level guideline files
|
|
36
|
-
for (const f of readdirSync(guidelinesDir)) {
|
|
37
|
-
if (!f.endsWith(".md")) continue;
|
|
38
|
-
if (stampFile(resolve(guidelinesDir, f))) stamped++;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
// Stamp theme files
|
|
42
|
-
if (existsSync(themesDir)) {
|
|
43
|
-
for (const f of readdirSync(themesDir)) {
|
|
44
|
-
if (!f.endsWith(".md")) continue;
|
|
45
|
-
if (stampFile(resolve(themesDir, f))) stamped++;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
if (stamped > 0) {
|
|
50
|
-
console.log(` Stamped v${version} into ${stamped} guideline file(s)`);
|
|
51
|
-
} else {
|
|
52
|
-
console.log(` All guideline files already at v${version}`);
|
|
53
|
-
}
|