@code-sherpas/pharos-tokens 1.0.1 → 1.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 +3 -1
- package/dist/index.js +6 -0
- package/dist/styles.css +2 -0
- package/dist/tokens.d.ts +4 -0
- package/dist/tokens.js +2 -0
- package/dist/tokens.json +6 -0
- package/package.json +3 -3
- package/src/layout.tokens.json +16 -0
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@ lives in Notion → [Programa Pharos](https://app.notion.com/p/38c1751eee1081a38
|
|
|
11
11
|
|
|
12
12
|
## What's in this package
|
|
13
13
|
|
|
14
|
-
This package defines **the atomic values** of Code Sherpas's visual system: colors, spacing, radius, typography, shadows, z-index, duration, and
|
|
14
|
+
This package defines **the atomic values** of Code Sherpas's visual system: colors, spacing, radius, typography, shadows, z-index, duration, easing, and layout widths and breakpoints. They are consumable from any frontend (React, Vue, Svelte, React Native) and from backends (transactional emails, PDFs, reports).
|
|
15
15
|
|
|
16
16
|
It contains no components. React components live in [`@code-sherpas/pharos-react`](https://github.com/code-sherpas/pharos-react) and consume this package as a peer dependency.
|
|
17
17
|
|
|
@@ -98,6 +98,8 @@ See [the rules for consumers](https://app.notion.com/p/4071751eee1081b2b000e212c
|
|
|
98
98
|
| Z-index | `z.{0,header,above-header,modal-overlay,modal,drawer-overlay,drawer,dropdown,tooltip}` | Semantic, not literal. |
|
|
99
99
|
| Duration | `duration.{fast,normal,slow}` | Transitions. |
|
|
100
100
|
| Easing | `easing.{in,out,in-out}` | Cubic-bezier curves. |
|
|
101
|
+
| Width | `width.panel` | Widths by role. `panel`: Sheet and SidePanel (24rem). |
|
|
102
|
+
| Breakpoint | `breakpoint.panel` | Viewport breakpoints by role (D32); read them in JS. |
|
|
101
103
|
|
|
102
104
|
## Contributing
|
|
103
105
|
|
package/dist/index.js
CHANGED
package/dist/styles.css
CHANGED
|
@@ -52,6 +52,8 @@
|
|
|
52
52
|
--pharos-color-accent-terracotta-700: oklch(51.60% 0.1261 40.7); /** Terracotta ink #A24A28: accent text on white (5.92:1, AA); solid marks carrying small white text; hover of a 600 fill. */
|
|
53
53
|
--pharos-color-accent-terracotta-800: oklch(42.00% 0.1020 42.5); /** Press step of a terracotta fill (#79371A). */
|
|
54
54
|
--pharos-color-accent-terracotta-900: oklch(33.00% 0.0770 42.5); /** Deep text on a terracotta tint (#552612). */
|
|
55
|
+
--pharos-width-panel: 24rem; /** Width of an edge-docked panel: Sheet, and SidePanel inline or modal. Cap it at the viewport (min(var(--pharos-width-panel), 100vw)). */
|
|
56
|
+
--pharos-breakpoint-panel: 64rem; /** Viewport width from which a SidePanel sits inline beside the content and narrows it; below it, the panel opens as a modal Sheet. Read it in JS (matchMedia) — a custom property does not work inside @media. */
|
|
55
57
|
--pharos-radius-none: 0; /** Square corners. */
|
|
56
58
|
--pharos-radius-sm: 0.125rem; /** 2px — small marks, code chips. */
|
|
57
59
|
--pharos-radius-md: 0.375rem; /** 6px — default control rounding. */
|
package/dist/tokens.d.ts
CHANGED
|
@@ -124,6 +124,10 @@ export const PharosColorAccentTerracottaFg: string;
|
|
|
124
124
|
export const PharosColorAccentTerracottaBg: string;
|
|
125
125
|
/** Text on a solid terracotta mark (use on 700 for small text). */
|
|
126
126
|
export const PharosColorAccentTerracottaOn: string;
|
|
127
|
+
/** Width of an edge-docked panel: Sheet, and SidePanel inline or modal. Cap it at the viewport (min(var(--pharos-width-panel), 100vw)). */
|
|
128
|
+
export const PharosWidthPanel: string;
|
|
129
|
+
/** Viewport width from which a SidePanel sits inline beside the content and narrows it; below it, the panel opens as a modal Sheet. Read it in JS (matchMedia) — a custom property does not work inside @media. */
|
|
130
|
+
export const PharosBreakpointPanel: string;
|
|
127
131
|
/** Square corners. */
|
|
128
132
|
export const PharosRadiusNone: string;
|
|
129
133
|
/** 2px — small marks, code chips. */
|
package/dist/tokens.js
CHANGED
|
@@ -64,6 +64,8 @@ export const PharosColorAccentTerracotta900 = "oklch(33.00% 0.0770 42.5)"; // De
|
|
|
64
64
|
export const PharosColorAccentTerracottaFg = "oklch(51.60% 0.1261 40.7)"; // Accessible ink for warm-accent blocks on white (→ terracotta-700).
|
|
65
65
|
export const PharosColorAccentTerracottaBg = "oklch(96.50% 0.0160 42.5)"; // Tint surface for warm-accent blocks on white (→ terracotta-50).
|
|
66
66
|
export const PharosColorAccentTerracottaOn = "oklch(100% 0 0)"; // Text on a solid terracotta mark (use on 700 for small text).
|
|
67
|
+
export const PharosWidthPanel = "24rem"; // Width of an edge-docked panel: Sheet, and SidePanel inline or modal. Cap it at the viewport (min(var(--pharos-width-panel), 100vw)).
|
|
68
|
+
export const PharosBreakpointPanel = "64rem"; // Viewport width from which a SidePanel sits inline beside the content and narrows it; below it, the panel opens as a modal Sheet. Read it in JS (matchMedia) — a custom property does not work inside @media.
|
|
67
69
|
export const PharosRadiusNone = "0"; // Square corners.
|
|
68
70
|
export const PharosRadiusSm = "0.125rem"; // 2px — small marks, code chips.
|
|
69
71
|
export const PharosRadiusMd = "0.375rem"; // 6px — default control rounding.
|
package/dist/tokens.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@code-sherpas/pharos-tokens",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Design tokens de Code Sherpas — agnóstico de framework. DTCG + Style Dictionary + OKLCH.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@changesets/cli": "^2.27.10",
|
|
47
47
|
"@types/culori": "^4.0.1",
|
|
48
|
-
"@types/node": "^
|
|
48
|
+
"@types/node": "^26.6.6",
|
|
49
49
|
"@typescript-eslint/eslint-plugin": "^8.20.0",
|
|
50
50
|
"@typescript-eslint/parser": "^8.20.0",
|
|
51
51
|
"culori": "^4.0.1",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"prettier": "^3.4.2",
|
|
58
58
|
"style-dictionary": "^5.4.0",
|
|
59
59
|
"typescript": "^6.0.3",
|
|
60
|
-
"vitest": "^
|
|
60
|
+
"vitest": "^5.0.5"
|
|
61
61
|
},
|
|
62
62
|
"scripts": {
|
|
63
63
|
"build": "bash scripts/check-node-version.sh && node build/style-dictionary.config.mjs",
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"width": {
|
|
3
|
+
"panel": {
|
|
4
|
+
"$value": "24rem",
|
|
5
|
+
"$type": "dimension",
|
|
6
|
+
"$description": "Width of an edge-docked panel: Sheet, and SidePanel inline or modal. Cap it at the viewport (min(var(--pharos-width-panel), 100vw))."
|
|
7
|
+
}
|
|
8
|
+
},
|
|
9
|
+
"breakpoint": {
|
|
10
|
+
"panel": {
|
|
11
|
+
"$value": "64rem",
|
|
12
|
+
"$type": "dimension",
|
|
13
|
+
"$description": "Viewport width from which a SidePanel sits inline beside the content and narrows it; below it, the panel opens as a modal Sheet. Read it in JS (matchMedia) — a custom property does not work inside @media."
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|