@code-sherpas/pharos-tokens 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/LICENSE +21 -0
- package/README.md +100 -0
- package/RULES.md +50 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +151 -0
- package/dist/styles.css +108 -0
- package/dist/tokens.d.ts +187 -0
- package/dist/tokens.js +112 -0
- package/dist/tokens.json +143 -0
- package/package.json +59 -0
- package/src/color.tokens.json +195 -0
- package/src/radius.tokens.json +28 -0
- package/src/shadow.tokens.json +53 -0
- package/src/spacing.tokens.json +45 -0
- package/src/typography.tokens.json +81 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Code Sherpas
|
|
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
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# @code-sherpas/pharos-tokens
|
|
2
|
+
|
|
3
|
+
Design tokens for Code Sherpas. Framework-agnostic. DTCG + Style Dictionary v4 + OKLCH.
|
|
4
|
+
|
|
5
|
+
## What's in this package
|
|
6
|
+
|
|
7
|
+
This package defines **the atomic values** of Code Sherpas's visual system: colors, spacing, radius, typography, shadows, z-index, duration, and easing. They are consumable from any frontend (React, Vue, Svelte, React Native) and from backends (transactional emails, PDFs, reports).
|
|
8
|
+
|
|
9
|
+
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.
|
|
10
|
+
|
|
11
|
+
## Installation
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
pnpm add @code-sherpas/pharos-tokens
|
|
15
|
+
# or npm / yarn
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
### Option A — CSS custom properties (recommended)
|
|
21
|
+
|
|
22
|
+
Import the CSS tokens at your app's entry point:
|
|
23
|
+
|
|
24
|
+
```css
|
|
25
|
+
@import '@code-sherpas/pharos-tokens/css';
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
This exposes `--pharos-*` on `:root`. Use them directly or via Tailwind arbitrary values:
|
|
29
|
+
|
|
30
|
+
```css
|
|
31
|
+
.button-primary {
|
|
32
|
+
background: var(--pharos-color-primary-600);
|
|
33
|
+
color: white;
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
```html
|
|
38
|
+
<div class="bg-[var(--pharos-color-neutral-900)] text-white p-[var(--pharos-spacing-4)]">…</div>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Option B — Typed object (JS/TS)
|
|
42
|
+
|
|
43
|
+
```ts
|
|
44
|
+
import { tokens } from '@code-sherpas/pharos-tokens';
|
|
45
|
+
|
|
46
|
+
const darkSurface = tokens.color.neutral['900'];
|
|
47
|
+
const cardRadius = tokens.radius['2xl'];
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Full autocomplete thanks to `typeof tokens`.
|
|
51
|
+
|
|
52
|
+
### Option C — Flat constants (selective imports)
|
|
53
|
+
|
|
54
|
+
```ts
|
|
55
|
+
import { PharosColorPrimary600, PharosRadius2xl } from '@code-sherpas/pharos-tokens/tokens.js';
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Option D — DTCG source (custom pipelines)
|
|
59
|
+
|
|
60
|
+
For your own transforms (iOS, Android, Figma, etc.):
|
|
61
|
+
|
|
62
|
+
```ts
|
|
63
|
+
import colorDtcg from '@code-sherpas/pharos-tokens/dtcg/color';
|
|
64
|
+
// DTCG object with $value, $type, $description
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Rules for consumers
|
|
68
|
+
|
|
69
|
+
See [RULES.md](./RULES.md) — published with the package.
|
|
70
|
+
|
|
71
|
+
## Token structure
|
|
72
|
+
|
|
73
|
+
| Family | Example path | Description |
|
|
74
|
+
| ---------- | -------------------------------------------------------------------------------------- | --------------------------------------------------------- |
|
|
75
|
+
| Base | `color.base.{white,black}` | Pure white and black. |
|
|
76
|
+
| Neutrals | `color.neutral.{50..950}` | Grayscale, slightly navy-tinted in the darker steps. |
|
|
77
|
+
| Primary | `color.primary.{50..900}` | Sea blue, scale 50-900. 600 is the base hue. |
|
|
78
|
+
| Semantic | `color.semantic.{success,error,warning,info}.{fg,bg,on}` | Success/error/warning/info. `fg + on` pairs pass WCAG AA. |
|
|
79
|
+
| Spacing | `spacing.{0..24}` | Tailwind-compatible scale in `rem`. |
|
|
80
|
+
| Radius | `radius.{none,sm,md,lg,xl,2xl,3xl,full}` | Corner rounding. |
|
|
81
|
+
| Typography | `font.{family,weight,size,lineHeight,letterSpacing}.*` | Typography. Body default = `size.sm` (14px). |
|
|
82
|
+
| Shadow | `shadow.{sm,md,lg,xl}` | Elevation. |
|
|
83
|
+
| Z-index | `z.{0,header,above-header,modal-overlay,modal,drawer-overlay,drawer,dropdown,tooltip}` | Semantic, not literal. |
|
|
84
|
+
| Duration | `duration.{fast,normal,slow}` | Transitions. |
|
|
85
|
+
| Easing | `easing.{in,out,in-out}` | Cubic-bezier curves. |
|
|
86
|
+
|
|
87
|
+
## Contributing
|
|
88
|
+
|
|
89
|
+
1. `pnpm install`
|
|
90
|
+
2. Modify or add tokens in `src/*.tokens.json` (DTCG format).
|
|
91
|
+
3. `pnpm build` — verify that Style Dictionary compiles.
|
|
92
|
+
4. `pnpm test` — WCAG + DTCG validations must pass.
|
|
93
|
+
5. `pnpm changeset` — declare the type of change (patch / minor / major).
|
|
94
|
+
6. Open a PR.
|
|
95
|
+
|
|
96
|
+
CI validates WCAG 2.1 AA contrast on every color/on-color pair. A PR cannot be merged if it breaks contrast.
|
|
97
|
+
|
|
98
|
+
## License
|
|
99
|
+
|
|
100
|
+
MIT. See [LICENSE](./LICENSE).
|
package/RULES.md
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Rules for consumers of `@code-sherpas/pharos-tokens`
|
|
2
|
+
|
|
3
|
+
This file ships with the package (`files` includes `RULES.md`). Every
|
|
4
|
+
consumer — `pharos-react`, `alexandria-web-application`, `alexandria-design`,
|
|
5
|
+
and any future app — must follow these rules.
|
|
6
|
+
|
|
7
|
+
## 1. Do not redefine values locally
|
|
8
|
+
|
|
9
|
+
Tokens are the single source of truth. Forbidden:
|
|
10
|
+
|
|
11
|
+
- Hardcoded hex for colors that have an equivalent token (e.g. `#101820` when `--pharos-color-neutral-900` exists).
|
|
12
|
+
- Raw `rem`/`px` values for spacing when `--pharos-spacing-*` exists.
|
|
13
|
+
- Ad-hoc local shadows.
|
|
14
|
+
|
|
15
|
+
If a value has no token, open an issue in this repo. Do not improvise.
|
|
16
|
+
|
|
17
|
+
## 2. Do not invent colors outside the system
|
|
18
|
+
|
|
19
|
+
The system is: `color.neutral.*`, `color.primary.*`, `color.semantic.{success,error,warning,info}.*`, `color.base.{white,black}`. If you need a new accent (purple, amber, etc.) with clear semantics, open an issue — do not add it locally.
|
|
20
|
+
|
|
21
|
+
## 3. Use CSS vars or the JS object
|
|
22
|
+
|
|
23
|
+
**Web**: import `@code-sherpas/pharos-tokens/css` at your entry point and use `var(--pharos-*)` or Tailwind arbitrary values (`bg-[var(--pharos-color-primary-600)]`).
|
|
24
|
+
|
|
25
|
+
**Programmatic** (JS/TS): `import { tokens } from '@code-sherpas/pharos-tokens'` → `tokens.color.neutral['900']`.
|
|
26
|
+
|
|
27
|
+
**DTCG source** (for custom pipelines): `import dtcg from '@code-sherpas/pharos-tokens/dtcg/color'`.
|
|
28
|
+
|
|
29
|
+
## 4. Do not mutate values after importing
|
|
30
|
+
|
|
31
|
+
Forbidden: `tokens.color.primary['600'] = '#new'`. The object is frozen in spirit even if JS does not enforce it. Changes go through a PR to this repo.
|
|
32
|
+
|
|
33
|
+
## 5. Respect semver
|
|
34
|
+
|
|
35
|
+
- Breaking change in this repo → major bump → consumers upgrade explicitly.
|
|
36
|
+
- New token → minor bump → consumers may adopt without breaking anything.
|
|
37
|
+
- Value adjustment without renaming → patch → consumers receive visual improvements automatically.
|
|
38
|
+
|
|
39
|
+
## 6. Accessibility
|
|
40
|
+
|
|
41
|
+
When picking which tokens to use, respect the defined pairs:
|
|
42
|
+
|
|
43
|
+
- Text over `color.neutral.50`/`100`/`200`: use `color.neutral.900` or darker.
|
|
44
|
+
- Text over `color.primary.600`+: use `color.base.white`.
|
|
45
|
+
- Text over `color.semantic.{success,error,info}.fg` (filled): use `.on` from the same group.
|
|
46
|
+
- Text over `color.semantic.warning.fg`: `.on` is `color.neutral.900` (warning is light).
|
|
47
|
+
|
|
48
|
+
## 7. Extensions and overrides
|
|
49
|
+
|
|
50
|
+
**Do not** publish a new package `@yourorg/pharos-tokens-extended`. If a product needs its own tokens (e.g. co-branded identities), implement them as additional CSS vars in the consumer under your own namespace (`--myapp-*`) and document it.
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Do not edit directly, this file was auto-generated.
|
|
3
|
+
*
|
|
4
|
+
* Usage:
|
|
5
|
+
* import { tokens } from '@code-sherpas/pharos-tokens';
|
|
6
|
+
* tokens.color.neutral['900']; // OKLCH string
|
|
7
|
+
*/
|
|
8
|
+
export const tokens = {
|
|
9
|
+
"color": {
|
|
10
|
+
"base": {
|
|
11
|
+
"white": "oklch(100% 0 0)",
|
|
12
|
+
"black": "oklch(0% 0 0)"
|
|
13
|
+
},
|
|
14
|
+
"neutral": {
|
|
15
|
+
"50": "oklch(97.91% 0 0)",
|
|
16
|
+
"100": "oklch(97.02% 0 0)",
|
|
17
|
+
"200": "oklch(95.21% 0 0)",
|
|
18
|
+
"300": "oklch(88.82% 0.0029 264.54)",
|
|
19
|
+
"400": "oklch(81.09% 0 0)",
|
|
20
|
+
"500": "oklch(52.78% 0 0)",
|
|
21
|
+
"600": "oklch(35.62% 0 0)",
|
|
22
|
+
"700": "oklch(29.52% 0.0107 254)",
|
|
23
|
+
"800": "oklch(37.05% 0.0436 247.87)",
|
|
24
|
+
"900": "oklch(20.50% 0.02 248.83)",
|
|
25
|
+
"950": "oklch(14.69% 0.0225 269.48)"
|
|
26
|
+
},
|
|
27
|
+
"primary": {
|
|
28
|
+
"50": "oklch(95.94% 0.0164 274.82)",
|
|
29
|
+
"100": "oklch(91.35% 0.0374 275.69)",
|
|
30
|
+
"200": "oklch(82.70% 0.0785 274.99)",
|
|
31
|
+
"300": "oklch(74.07% 0.1205 273.68)",
|
|
32
|
+
"400": "oklch(65.40% 0.1582 271.71)",
|
|
33
|
+
"500": "oklch(57.34% 0.1996 269.61)",
|
|
34
|
+
"600": "oklch(49.83% 0.2417 267.34)",
|
|
35
|
+
"700": "oklch(42.19% 0.2111 267.20)",
|
|
36
|
+
"800": "oklch(34.32% 0.1726 267.54)",
|
|
37
|
+
"900": "oklch(25.97% 0.1317 268.18)"
|
|
38
|
+
},
|
|
39
|
+
"semantic": {
|
|
40
|
+
"success": {
|
|
41
|
+
"fg": "oklch(52% 0.17 152)",
|
|
42
|
+
"bg": "oklch(52% 0.17 152 / 0.063)",
|
|
43
|
+
"on": "oklch(100% 0 0)"
|
|
44
|
+
},
|
|
45
|
+
"error": {
|
|
46
|
+
"fg": "oklch(61.28% 0.2305 27.48)",
|
|
47
|
+
"bg": "oklch(61.28% 0.2305 27.48 / 0.063)",
|
|
48
|
+
"on": "oklch(100% 0 0)"
|
|
49
|
+
},
|
|
50
|
+
"warning": {
|
|
51
|
+
"fg": "oklch(77.77% 0.1588 90.66)",
|
|
52
|
+
"bg": "oklch(77.77% 0.1588 90.66 / 0.063)",
|
|
53
|
+
"on": "oklch(20.50% 0.02 248.83)"
|
|
54
|
+
},
|
|
55
|
+
"info": {
|
|
56
|
+
"fg": "oklch(52% 0.17 246)",
|
|
57
|
+
"bg": "oklch(52% 0.17 246 / 0.063)",
|
|
58
|
+
"on": "oklch(100% 0 0)"
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"radius": {
|
|
63
|
+
"none": 0,
|
|
64
|
+
"sm": "0.125rem",
|
|
65
|
+
"md": "0.375rem",
|
|
66
|
+
"lg": "0.5rem",
|
|
67
|
+
"xl": "0.75rem",
|
|
68
|
+
"2xl": "1rem",
|
|
69
|
+
"3xl": "1.5rem",
|
|
70
|
+
"full": "9999px"
|
|
71
|
+
},
|
|
72
|
+
"shadow": {
|
|
73
|
+
"sm": "0 1px 2px 0 rgb(0 0 0 / 0.05)",
|
|
74
|
+
"md": "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",
|
|
75
|
+
"lg": "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",
|
|
76
|
+
"xl": "0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)"
|
|
77
|
+
},
|
|
78
|
+
"z": {
|
|
79
|
+
"0": "0",
|
|
80
|
+
"header": "1000",
|
|
81
|
+
"above-header": "1100",
|
|
82
|
+
"modal-overlay": "9998",
|
|
83
|
+
"modal": "9999",
|
|
84
|
+
"drawer-overlay": "9999",
|
|
85
|
+
"drawer": "10000",
|
|
86
|
+
"dropdown": "10001",
|
|
87
|
+
"tooltip": "10002"
|
|
88
|
+
},
|
|
89
|
+
"duration": {
|
|
90
|
+
"fast": "100ms",
|
|
91
|
+
"normal": "200ms",
|
|
92
|
+
"slow": "300ms"
|
|
93
|
+
},
|
|
94
|
+
"easing": {
|
|
95
|
+
"in": "cubic-bezier(0.4, 0, 1, 1)",
|
|
96
|
+
"out": "cubic-bezier(0, 0, 0.2, 1)",
|
|
97
|
+
"in-out": "cubic-bezier(0.4, 0, 0.2, 1)"
|
|
98
|
+
},
|
|
99
|
+
"spacing": {
|
|
100
|
+
"0": 0,
|
|
101
|
+
"1": "0.25rem",
|
|
102
|
+
"2": "0.5rem",
|
|
103
|
+
"3": "0.75rem",
|
|
104
|
+
"4": "1rem",
|
|
105
|
+
"5": "1.25rem",
|
|
106
|
+
"6": "1.5rem",
|
|
107
|
+
"7": "1.75rem",
|
|
108
|
+
"8": "2rem",
|
|
109
|
+
"10": "2.5rem",
|
|
110
|
+
"12": "3rem",
|
|
111
|
+
"16": "4rem",
|
|
112
|
+
"20": "5rem",
|
|
113
|
+
"24": "6rem"
|
|
114
|
+
},
|
|
115
|
+
"font": {
|
|
116
|
+
"family": {
|
|
117
|
+
"sans": "\"Inter\", system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif",
|
|
118
|
+
"mono": "ui-monospace, SFMono-Regular, \"SF Mono\", Menlo, Consolas, \"Liberation Mono\", monospace"
|
|
119
|
+
},
|
|
120
|
+
"weight": {
|
|
121
|
+
"regular": "400",
|
|
122
|
+
"medium": "500",
|
|
123
|
+
"semibold": "600",
|
|
124
|
+
"bold": "700"
|
|
125
|
+
},
|
|
126
|
+
"size": {
|
|
127
|
+
"xs": "0.75rem",
|
|
128
|
+
"sm": "0.875rem",
|
|
129
|
+
"base": "1rem",
|
|
130
|
+
"lg": "1.125rem",
|
|
131
|
+
"xl": "1.25rem",
|
|
132
|
+
"2xl": "1.5rem",
|
|
133
|
+
"3xl": "1.875rem",
|
|
134
|
+
"4xl": "2.25rem",
|
|
135
|
+
"5xl": "3rem"
|
|
136
|
+
},
|
|
137
|
+
"lineHeight": {
|
|
138
|
+
"tight": "1.25",
|
|
139
|
+
"snug": "1.375",
|
|
140
|
+
"normal": "1.5",
|
|
141
|
+
"relaxed": "1.625",
|
|
142
|
+
"loose": "2"
|
|
143
|
+
},
|
|
144
|
+
"letterSpacing": {
|
|
145
|
+
"tight": "-0.025em",
|
|
146
|
+
"normal": 0,
|
|
147
|
+
"wide": "0.025em"
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
};
|
|
151
|
+
export default tokens;
|
package/dist/styles.css
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Do not edit directly, this file was auto-generated.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
:root {
|
|
6
|
+
--pharos-color-base-white: oklch(100% 0 0); /** Pure white. Used as surface background and typical on-color for dark brand fills. */
|
|
7
|
+
--pharos-color-base-black: oklch(0% 0 0); /** Pure black. Rarely used — prefer color.neutral.900 for text and dark surfaces. */
|
|
8
|
+
--pharos-color-neutral-50: oklch(97.91% 0 0); /** Lightest surface. Replaces Alexandria #f8f8f8 and legacy 'grey'. */
|
|
9
|
+
--pharos-color-neutral-100: oklch(97.02% 0 0); /** Subtle surface. Replaces Alexandria #f5f5f5 / light-grey / supporting.light. */
|
|
10
|
+
--pharos-color-neutral-200: oklch(95.21% 0 0); /** Quiet surface / default border on light mode. Replaces Alexandria #efefef / supporting.base / legacy border. */
|
|
11
|
+
--pharos-color-neutral-300: oklch(88.82% 0.0029 264.54); /** Border strong / disabled fill. Replaces Alexandria #d9dadc / supporting.dark / border-dark. */
|
|
12
|
+
--pharos-color-neutral-400: oklch(81.09% 0 0); /** Muted foreground on light surfaces. Replaces Alexandria #c1c1c1. */
|
|
13
|
+
--pharos-color-neutral-500: oklch(52.78% 0 0); /** Secondary text (most-used neutral). Replaces Alexandria #6b6b6b / secondary-text / supporting.secondary. */
|
|
14
|
+
--pharos-color-neutral-600: oklch(35.62% 0 0); /** Icon dark / secondary emphasis. Replaces Alexandria #3c3c3c. */
|
|
15
|
+
--pharos-color-neutral-700: oklch(29.52% 0.0107 254); /** Strong text on light surfaces. Replaces Alexandria #292d32. */
|
|
16
|
+
--pharos-color-neutral-800: oklch(37.05% 0.0436 247.87); /** Charcoal blue, alternative navy. Replaces Alexandria #2d4256 / charcoal-blue. */
|
|
17
|
+
--pharos-color-neutral-900: oklch(20.50% 0.02 248.83); /** Primary text / dark surface. Hero neutral of the Code Sherpas identity. Replaces Alexandria #101820 (279 usages) / main.base / navy-blue-text. */
|
|
18
|
+
--pharos-color-neutral-950: oklch(14.69% 0.0225 269.48); /** Deepest neutral. Replaces Alexandria #070a14 / primary-text. */
|
|
19
|
+
--pharos-color-primary-50: oklch(95.94% 0.0164 274.82); /** Primary tint, lightest. Replaces Alexandria #eef1fd / new-primary.light derivates. */
|
|
20
|
+
--pharos-color-primary-100: oklch(91.35% 0.0374 275.69); /** Primary tint, soft. Replaces Alexandria #dbe1fc / new-primary.light. */
|
|
21
|
+
--pharos-color-primary-200: oklch(82.70% 0.0785 274.99); /** Primary tint, medium. */
|
|
22
|
+
--pharos-color-primary-300: oklch(74.07% 0.1205 273.68); /** Primary tint, stronger. */
|
|
23
|
+
--pharos-color-primary-400: oklch(65.40% 0.1582 271.71); /** Primary highlight. */
|
|
24
|
+
--pharos-color-primary-500: oklch(57.34% 0.1996 269.61); /** Primary lighter step. */
|
|
25
|
+
--pharos-color-primary-600: oklch(49.83% 0.2417 267.34); /** Primary brand color (sea blue). Replaces Alexandria #2a48e9 / sea-blue-primitive / new-primary.base. */
|
|
26
|
+
--pharos-color-primary-700: oklch(42.19% 0.2111 267.20); /** Primary pressed / hover dark. */
|
|
27
|
+
--pharos-color-primary-800: oklch(34.32% 0.1726 267.54); /** Primary deep. */
|
|
28
|
+
--pharos-color-primary-900: oklch(25.97% 0.1317 268.18); /** Primary darkest. */
|
|
29
|
+
--pharos-color-semantic-success-fg: oklch(52% 0.17 152); /** Success foreground. Darkened from Alexandria #05b661 (L=68%, failed WCAG) to pass AA 4.5:1 vs white background and AA 3:1 for white text on filled surfaces. */
|
|
30
|
+
--pharos-color-semantic-success-bg: oklch(52% 0.17 152 / 0.063); /** Success background, subtle tint of success.fg. */
|
|
31
|
+
--pharos-color-semantic-error-fg: oklch(61.28% 0.2305 27.48); /** Error foreground. Replaces Alexandria #ef2828 / true-red-opaque. Decision D2: single red (laser-red merged). */
|
|
32
|
+
--pharos-color-semantic-error-bg: oklch(61.28% 0.2305 27.48 / 0.063); /** Error background, subtle. Replaces Alexandria #ef282810. */
|
|
33
|
+
--pharos-color-semantic-warning-fg: oklch(77.77% 0.1588 90.66); /** Warning foreground. Replaces Alexandria #ddb101 / warning.fore. */
|
|
34
|
+
--pharos-color-semantic-warning-bg: oklch(77.77% 0.1588 90.66 / 0.063); /** Warning background, subtle. Replaces Alexandria #ddb10110 / warning.back. */
|
|
35
|
+
--pharos-color-semantic-info-fg: oklch(52% 0.17 246); /** Info foreground. Darkened from Alexandria #009bf9 (L=67%, failed WCAG) to pass AA 4.5:1 vs white background. */
|
|
36
|
+
--pharos-color-semantic-info-bg: oklch(52% 0.17 246 / 0.063); /** Info background, subtle tint of info.fg. */
|
|
37
|
+
--pharos-radius-none: 0; /** No rounding. */
|
|
38
|
+
--pharos-radius-sm: 0.125rem; /** 2px. Subtle rounding. */
|
|
39
|
+
--pharos-radius-md: 0.375rem; /** 6px. Default control rounding. */
|
|
40
|
+
--pharos-radius-lg: 0.5rem; /** 8px. */
|
|
41
|
+
--pharos-radius-xl: 0.75rem; /** 12px. */
|
|
42
|
+
--pharos-radius-2xl: 1rem; /** 16px. Default card rounding (replaces Alexandria cs-md / rounded-cs-md). */
|
|
43
|
+
--pharos-radius-3xl: 1.5rem; /** 24px. Large surface rounding (replaces Alexandria cs-lg / rounded-cs-lg). */
|
|
44
|
+
--pharos-radius-full: 9999px; /** Fully rounded — pills, avatars, icon buttons. 117 usages in Alexandria. */
|
|
45
|
+
--pharos-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05); /** Subtle elevation. */
|
|
46
|
+
--pharos-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); /** Default elevation for cards at rest. */
|
|
47
|
+
--pharos-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); /** Hover or raised card. */
|
|
48
|
+
--pharos-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); /** Modals, popovers. */
|
|
49
|
+
--pharos-z-0: 0; /** Default stacking context. */
|
|
50
|
+
--pharos-z-header: 1000;
|
|
51
|
+
--pharos-z-above-header: 1100;
|
|
52
|
+
--pharos-z-modal-overlay: 9998;
|
|
53
|
+
--pharos-z-modal: 9999;
|
|
54
|
+
--pharos-z-drawer-overlay: 9999;
|
|
55
|
+
--pharos-z-drawer: 10000;
|
|
56
|
+
--pharos-z-dropdown: 10001;
|
|
57
|
+
--pharos-z-tooltip: 10002; /** Highest priority — tooltips always win. */
|
|
58
|
+
--pharos-duration-fast: 100ms; /** Micro interactions (hover). */
|
|
59
|
+
--pharos-duration-normal: 200ms; /** Default transitions. */
|
|
60
|
+
--pharos-duration-slow: 300ms; /** Panel slide, overlay fade. */
|
|
61
|
+
--pharos-easing-in: cubic-bezier(0.4, 0, 1, 1);
|
|
62
|
+
--pharos-easing-out: cubic-bezier(0, 0, 0.2, 1);
|
|
63
|
+
--pharos-easing-in-out: cubic-bezier(0.4, 0, 0.2, 1);
|
|
64
|
+
--pharos-spacing-0: 0; /** Zero. */
|
|
65
|
+
--pharos-spacing-1: 0.25rem; /** 4px. Tightest usable gap. */
|
|
66
|
+
--pharos-spacing-2: 0.5rem; /** 8px. Common small gap (replaces Alexandria cs-xs). */
|
|
67
|
+
--pharos-spacing-3: 0.75rem; /** 12px. Replaces Alexandria cs-sm. */
|
|
68
|
+
--pharos-spacing-4: 1rem; /** 16px. Default body padding (replaces Alexandria cs-md). */
|
|
69
|
+
--pharos-spacing-5: 1.25rem; /** 20px. */
|
|
70
|
+
--pharos-spacing-6: 1.5rem; /** 24px. Default card padding (replaces Alexandria cs-lg). */
|
|
71
|
+
--pharos-spacing-7: 1.75rem; /** 28px. */
|
|
72
|
+
--pharos-spacing-8: 2rem; /** 32px. Section gap (replaces Alexandria cs-xl). */
|
|
73
|
+
--pharos-spacing-10: 2.5rem; /** 40px. Large section gap (replaces Alexandria cs-2xl). */
|
|
74
|
+
--pharos-spacing-12: 3rem; /** 48px. */
|
|
75
|
+
--pharos-spacing-16: 4rem; /** 64px. */
|
|
76
|
+
--pharos-spacing-20: 5rem; /** 80px. */
|
|
77
|
+
--pharos-spacing-24: 6rem; /** 96px. */
|
|
78
|
+
--pharos-spacing-0-5: 0.125rem; /** 2px. */
|
|
79
|
+
--pharos-spacing-1-5: 0.375rem; /** 6px. */
|
|
80
|
+
--pharos-spacing-2-5: 0.625rem; /** 10px. */
|
|
81
|
+
--pharos-font-family-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; /** Default sans-serif stack. Inter can be replaced at the consumer layer via CSS var override. */
|
|
82
|
+
--pharos-font-family-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; /** Default monospace stack for code. */
|
|
83
|
+
--pharos-font-weight-regular: 400;
|
|
84
|
+
--pharos-font-weight-medium: 500;
|
|
85
|
+
--pharos-font-weight-semibold: 600;
|
|
86
|
+
--pharos-font-weight-bold: 700;
|
|
87
|
+
--pharos-font-size-xs: 0.75rem; /** 12px. Helper text, captions. */
|
|
88
|
+
--pharos-font-size-sm: 0.875rem; /** 14px. Body default in Pharos (Decision D3: formalizes Alexandria's dominant body size). */
|
|
89
|
+
--pharos-font-size-base: 1rem; /** 16px. Reserved for increased-legibility contexts. */
|
|
90
|
+
--pharos-font-size-lg: 1.125rem; /** 18px. */
|
|
91
|
+
--pharos-font-size-xl: 1.25rem; /** 20px. */
|
|
92
|
+
--pharos-font-size-2xl: 1.5rem; /** 24px. Heading level 3 / large titles. */
|
|
93
|
+
--pharos-font-size-3xl: 1.875rem; /** 30px. Heading level 2. */
|
|
94
|
+
--pharos-font-size-4xl: 2.25rem; /** 36px. Heading level 1. */
|
|
95
|
+
--pharos-font-size-5xl: 3rem; /** 48px. Display. */
|
|
96
|
+
--pharos-font-line-height-tight: 1.25;
|
|
97
|
+
--pharos-font-line-height-snug: 1.375;
|
|
98
|
+
--pharos-font-line-height-normal: 1.5; /** Default body line-height. */
|
|
99
|
+
--pharos-font-line-height-relaxed: 1.625;
|
|
100
|
+
--pharos-font-line-height-loose: 2;
|
|
101
|
+
--pharos-font-letter-spacing-tight: -0.025em;
|
|
102
|
+
--pharos-font-letter-spacing-normal: 0;
|
|
103
|
+
--pharos-font-letter-spacing-wide: 0.025em;
|
|
104
|
+
--pharos-color-semantic-success-on: var(--pharos-color-base-white); /** Readable on success.fg filled surfaces (WCAG AA). */
|
|
105
|
+
--pharos-color-semantic-error-on: var(--pharos-color-base-white); /** Readable on error.fg filled surfaces (WCAG AA). */
|
|
106
|
+
--pharos-color-semantic-warning-on: var(--pharos-color-neutral-900); /** Readable on warning.fg filled surfaces (WCAG AA). Warning is light/amber — needs dark on-color. */
|
|
107
|
+
--pharos-color-semantic-info-on: var(--pharos-color-base-white); /** Readable on info.fg filled surfaces (WCAG AA). */
|
|
108
|
+
}
|
package/dist/tokens.d.ts
ADDED
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Do not edit directly, this file was auto-generated.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/** Pure white. Used as surface background and typical on-color for dark brand fills. */
|
|
6
|
+
export const PharosColorBaseWhite: string;
|
|
7
|
+
/** Pure black. Rarely used — prefer color.neutral.900 for text and dark surfaces. */
|
|
8
|
+
export const PharosColorBaseBlack: string;
|
|
9
|
+
/** Lightest surface. Replaces Alexandria #f8f8f8 and legacy 'grey'. */
|
|
10
|
+
export const PharosColorNeutral50: string;
|
|
11
|
+
/** Subtle surface. Replaces Alexandria #f5f5f5 / light-grey / supporting.light. */
|
|
12
|
+
export const PharosColorNeutral100: string;
|
|
13
|
+
/** Quiet surface / default border on light mode. Replaces Alexandria #efefef / supporting.base / legacy border. */
|
|
14
|
+
export const PharosColorNeutral200: string;
|
|
15
|
+
/** Border strong / disabled fill. Replaces Alexandria #d9dadc / supporting.dark / border-dark. */
|
|
16
|
+
export const PharosColorNeutral300: string;
|
|
17
|
+
/** Muted foreground on light surfaces. Replaces Alexandria #c1c1c1. */
|
|
18
|
+
export const PharosColorNeutral400: string;
|
|
19
|
+
/** Secondary text (most-used neutral). Replaces Alexandria #6b6b6b / secondary-text / supporting.secondary. */
|
|
20
|
+
export const PharosColorNeutral500: string;
|
|
21
|
+
/** Icon dark / secondary emphasis. Replaces Alexandria #3c3c3c. */
|
|
22
|
+
export const PharosColorNeutral600: string;
|
|
23
|
+
/** Strong text on light surfaces. Replaces Alexandria #292d32. */
|
|
24
|
+
export const PharosColorNeutral700: string;
|
|
25
|
+
/** Charcoal blue, alternative navy. Replaces Alexandria #2d4256 / charcoal-blue. */
|
|
26
|
+
export const PharosColorNeutral800: string;
|
|
27
|
+
/** Primary text / dark surface. Hero neutral of the Code Sherpas identity. Replaces Alexandria #101820 (279 usages) / main.base / navy-blue-text. */
|
|
28
|
+
export const PharosColorNeutral900: string;
|
|
29
|
+
/** Deepest neutral. Replaces Alexandria #070a14 / primary-text. */
|
|
30
|
+
export const PharosColorNeutral950: string;
|
|
31
|
+
/** Primary tint, lightest. Replaces Alexandria #eef1fd / new-primary.light derivates. */
|
|
32
|
+
export const PharosColorPrimary50: string;
|
|
33
|
+
/** Primary tint, soft. Replaces Alexandria #dbe1fc / new-primary.light. */
|
|
34
|
+
export const PharosColorPrimary100: string;
|
|
35
|
+
/** Primary tint, medium. */
|
|
36
|
+
export const PharosColorPrimary200: string;
|
|
37
|
+
/** Primary tint, stronger. */
|
|
38
|
+
export const PharosColorPrimary300: string;
|
|
39
|
+
/** Primary highlight. */
|
|
40
|
+
export const PharosColorPrimary400: string;
|
|
41
|
+
/** Primary lighter step. */
|
|
42
|
+
export const PharosColorPrimary500: string;
|
|
43
|
+
/** Primary brand color (sea blue). Replaces Alexandria #2a48e9 / sea-blue-primitive / new-primary.base. */
|
|
44
|
+
export const PharosColorPrimary600: string;
|
|
45
|
+
/** Primary pressed / hover dark. */
|
|
46
|
+
export const PharosColorPrimary700: string;
|
|
47
|
+
/** Primary deep. */
|
|
48
|
+
export const PharosColorPrimary800: string;
|
|
49
|
+
/** Primary darkest. */
|
|
50
|
+
export const PharosColorPrimary900: string;
|
|
51
|
+
/** Success foreground. Darkened from Alexandria #05b661 (L=68%, failed WCAG) to pass AA 4.5:1 vs white background and AA 3:1 for white text on filled surfaces. */
|
|
52
|
+
export const PharosColorSemanticSuccessFg: string;
|
|
53
|
+
/** Success background, subtle tint of success.fg. */
|
|
54
|
+
export const PharosColorSemanticSuccessBg: string;
|
|
55
|
+
/** Readable on success.fg filled surfaces (WCAG AA). */
|
|
56
|
+
export const PharosColorSemanticSuccessOn: string;
|
|
57
|
+
/** Error foreground. Replaces Alexandria #ef2828 / true-red-opaque. Decision D2: single red (laser-red merged). */
|
|
58
|
+
export const PharosColorSemanticErrorFg: string;
|
|
59
|
+
/** Error background, subtle. Replaces Alexandria #ef282810. */
|
|
60
|
+
export const PharosColorSemanticErrorBg: string;
|
|
61
|
+
/** Readable on error.fg filled surfaces (WCAG AA). */
|
|
62
|
+
export const PharosColorSemanticErrorOn: string;
|
|
63
|
+
/** Warning foreground. Replaces Alexandria #ddb101 / warning.fore. */
|
|
64
|
+
export const PharosColorSemanticWarningFg: string;
|
|
65
|
+
/** Warning background, subtle. Replaces Alexandria #ddb10110 / warning.back. */
|
|
66
|
+
export const PharosColorSemanticWarningBg: string;
|
|
67
|
+
/** Readable on warning.fg filled surfaces (WCAG AA). Warning is light/amber — needs dark on-color. */
|
|
68
|
+
export const PharosColorSemanticWarningOn: string;
|
|
69
|
+
/** Info foreground. Darkened from Alexandria #009bf9 (L=67%, failed WCAG) to pass AA 4.5:1 vs white background. */
|
|
70
|
+
export const PharosColorSemanticInfoFg: string;
|
|
71
|
+
/** Info background, subtle tint of info.fg. */
|
|
72
|
+
export const PharosColorSemanticInfoBg: string;
|
|
73
|
+
/** Readable on info.fg filled surfaces (WCAG AA). */
|
|
74
|
+
export const PharosColorSemanticInfoOn: string;
|
|
75
|
+
/** No rounding. */
|
|
76
|
+
export const PharosRadiusNone: number;
|
|
77
|
+
/** 2px. Subtle rounding. */
|
|
78
|
+
export const PharosRadiusSm: string;
|
|
79
|
+
/** 6px. Default control rounding. */
|
|
80
|
+
export const PharosRadiusMd: string;
|
|
81
|
+
/** 8px. */
|
|
82
|
+
export const PharosRadiusLg: string;
|
|
83
|
+
/** 12px. */
|
|
84
|
+
export const PharosRadiusXl: string;
|
|
85
|
+
/** 16px. Default card rounding (replaces Alexandria cs-md / rounded-cs-md). */
|
|
86
|
+
export const PharosRadius2xl: string;
|
|
87
|
+
/** 24px. Large surface rounding (replaces Alexandria cs-lg / rounded-cs-lg). */
|
|
88
|
+
export const PharosRadius3xl: string;
|
|
89
|
+
/** Fully rounded — pills, avatars, icon buttons. 117 usages in Alexandria. */
|
|
90
|
+
export const PharosRadiusFull: string;
|
|
91
|
+
/** Subtle elevation. */
|
|
92
|
+
export const PharosShadowSm: string;
|
|
93
|
+
/** Default elevation for cards at rest. */
|
|
94
|
+
export const PharosShadowMd: string;
|
|
95
|
+
/** Hover or raised card. */
|
|
96
|
+
export const PharosShadowLg: string;
|
|
97
|
+
/** Modals, popovers. */
|
|
98
|
+
export const PharosShadowXl: string;
|
|
99
|
+
/** Default stacking context. */
|
|
100
|
+
export const PharosZ0: string;
|
|
101
|
+
export const PharosZHeader: string;
|
|
102
|
+
export const PharosZAboveHeader: string;
|
|
103
|
+
export const PharosZModalOverlay: string;
|
|
104
|
+
export const PharosZModal: string;
|
|
105
|
+
export const PharosZDrawerOverlay: string;
|
|
106
|
+
export const PharosZDrawer: string;
|
|
107
|
+
export const PharosZDropdown: string;
|
|
108
|
+
/** Highest priority — tooltips always win. */
|
|
109
|
+
export const PharosZTooltip: string;
|
|
110
|
+
/** Micro interactions (hover). */
|
|
111
|
+
export const PharosDurationFast: string;
|
|
112
|
+
/** Default transitions. */
|
|
113
|
+
export const PharosDurationNormal: string;
|
|
114
|
+
/** Panel slide, overlay fade. */
|
|
115
|
+
export const PharosDurationSlow: string;
|
|
116
|
+
export const PharosEasingIn: string;
|
|
117
|
+
export const PharosEasingOut: string;
|
|
118
|
+
export const PharosEasingInOut: string;
|
|
119
|
+
/** Zero. */
|
|
120
|
+
export const PharosSpacing0: number;
|
|
121
|
+
/** 4px. Tightest usable gap. */
|
|
122
|
+
export const PharosSpacing1: string;
|
|
123
|
+
/** 8px. Common small gap (replaces Alexandria cs-xs). */
|
|
124
|
+
export const PharosSpacing2: string;
|
|
125
|
+
/** 12px. Replaces Alexandria cs-sm. */
|
|
126
|
+
export const PharosSpacing3: string;
|
|
127
|
+
/** 16px. Default body padding (replaces Alexandria cs-md). */
|
|
128
|
+
export const PharosSpacing4: string;
|
|
129
|
+
/** 20px. */
|
|
130
|
+
export const PharosSpacing5: string;
|
|
131
|
+
/** 24px. Default card padding (replaces Alexandria cs-lg). */
|
|
132
|
+
export const PharosSpacing6: string;
|
|
133
|
+
/** 28px. */
|
|
134
|
+
export const PharosSpacing7: string;
|
|
135
|
+
/** 32px. Section gap (replaces Alexandria cs-xl). */
|
|
136
|
+
export const PharosSpacing8: string;
|
|
137
|
+
/** 40px. Large section gap (replaces Alexandria cs-2xl). */
|
|
138
|
+
export const PharosSpacing10: string;
|
|
139
|
+
/** 48px. */
|
|
140
|
+
export const PharosSpacing12: string;
|
|
141
|
+
/** 64px. */
|
|
142
|
+
export const PharosSpacing16: string;
|
|
143
|
+
/** 80px. */
|
|
144
|
+
export const PharosSpacing20: string;
|
|
145
|
+
/** 96px. */
|
|
146
|
+
export const PharosSpacing24: string;
|
|
147
|
+
/** 2px. */
|
|
148
|
+
export const PharosSpacing05: string;
|
|
149
|
+
/** 6px. */
|
|
150
|
+
export const PharosSpacing15: string;
|
|
151
|
+
/** 10px. */
|
|
152
|
+
export const PharosSpacing25: string;
|
|
153
|
+
/** Default sans-serif stack. Inter can be replaced at the consumer layer via CSS var override. */
|
|
154
|
+
export const PharosFontFamilySans: string;
|
|
155
|
+
/** Default monospace stack for code. */
|
|
156
|
+
export const PharosFontFamilyMono: string;
|
|
157
|
+
export const PharosFontWeightRegular: string;
|
|
158
|
+
export const PharosFontWeightMedium: string;
|
|
159
|
+
export const PharosFontWeightSemibold: string;
|
|
160
|
+
export const PharosFontWeightBold: string;
|
|
161
|
+
/** 12px. Helper text, captions. */
|
|
162
|
+
export const PharosFontSizeXs: string;
|
|
163
|
+
/** 14px. Body default in Pharos (Decision D3: formalizes Alexandria's dominant body size). */
|
|
164
|
+
export const PharosFontSizeSm: string;
|
|
165
|
+
/** 16px. Reserved for increased-legibility contexts. */
|
|
166
|
+
export const PharosFontSizeBase: string;
|
|
167
|
+
/** 18px. */
|
|
168
|
+
export const PharosFontSizeLg: string;
|
|
169
|
+
/** 20px. */
|
|
170
|
+
export const PharosFontSizeXl: string;
|
|
171
|
+
/** 24px. Heading level 3 / large titles. */
|
|
172
|
+
export const PharosFontSize2xl: string;
|
|
173
|
+
/** 30px. Heading level 2. */
|
|
174
|
+
export const PharosFontSize3xl: string;
|
|
175
|
+
/** 36px. Heading level 1. */
|
|
176
|
+
export const PharosFontSize4xl: string;
|
|
177
|
+
/** 48px. Display. */
|
|
178
|
+
export const PharosFontSize5xl: string;
|
|
179
|
+
export const PharosFontLineHeightTight: string;
|
|
180
|
+
export const PharosFontLineHeightSnug: string;
|
|
181
|
+
/** Default body line-height. */
|
|
182
|
+
export const PharosFontLineHeightNormal: string;
|
|
183
|
+
export const PharosFontLineHeightRelaxed: string;
|
|
184
|
+
export const PharosFontLineHeightLoose: string;
|
|
185
|
+
export const PharosFontLetterSpacingTight: string;
|
|
186
|
+
export const PharosFontLetterSpacingNormal: number;
|
|
187
|
+
export const PharosFontLetterSpacingWide: string;
|