@code-sherpas/pharos-tokens 0.1.3 → 0.3.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/dist/index.js CHANGED
@@ -43,8 +43,10 @@ export const tokens = {
43
43
  "on": "oklch(100% 0 0)"
44
44
  },
45
45
  "error": {
46
- "fg": "oklch(61.28% 0.2305 27.48)",
47
- "bg": "oklch(61.28% 0.2305 27.48 / 0.063)",
46
+ "fg": "oklch(54% 0.22 27.48)",
47
+ "fg-hover": "oklch(47% 0.205 27.48)",
48
+ "fg-active": "oklch(40% 0.175 27.48)",
49
+ "bg": "oklch(54% 0.22 27.48 / 0.063)",
48
50
  "on": "oklch(100% 0 0)"
49
51
  },
50
52
  "warning": {
package/dist/styles.css CHANGED
@@ -28,8 +28,10 @@
28
28
  --pharos-color-primary-900: oklch(25.97% 0.1317 268.18); /** Primary darkest. */
29
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
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. */
31
+ --pharos-color-semantic-error-fg: oklch(54% 0.22 27.48); /** Error foreground. Darkened from Alexandria #ef2828 (L=61%, contrast 4.19 against white failed WCAG AA 4.5:1 for normal text in filled destructive buttons) to pass AA 4.5:1 (contrast 5.68 vs white). Decision D2: single red (laser-red merged). Same precedent as success.fg and info.fg — Alexandria's value failed AA, Pharos fixes it systemically. */
32
+ --pharos-color-semantic-error-fg-hover: oklch(47% 0.205 27.48); /** Darker shade of error.fg for hover states on filled destructive surfaces. Contrast 7.26 vs error.on (white), passes WCAG AA 4.5:1 with margin. */
33
+ --pharos-color-semantic-error-fg-active: oklch(40% 0.175 27.48); /** Darkest — pressed/active state for filled destructive surfaces. Contrast 9.69 vs error.on (white), passes WCAG AAA 7:1. */
34
+ --pharos-color-semantic-error-bg: oklch(54% 0.22 27.48 / 0.063); /** Error background, subtle tint of error.fg. Tracks the darkened fg so the relationship stays consistent. */
33
35
  --pharos-color-semantic-warning-fg: oklch(77.77% 0.1588 90.66); /** Warning foreground. Replaces Alexandria #ddb101 / warning.fore. */
34
36
  --pharos-color-semantic-warning-bg: oklch(77.77% 0.1588 90.66 / 0.063); /** Warning background, subtle. Replaces Alexandria #ddb10110 / warning.back. */
35
37
  --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. */
@@ -102,7 +104,7 @@
102
104
  --pharos-font-letter-spacing-normal: 0;
103
105
  --pharos-font-letter-spacing-wide: 0.025em;
104
106
  --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). */
107
+ --pharos-color-semantic-error-on: var(--pharos-color-base-white); /** Readable on error.fg filled surfaces (WCAG AA 4.5:1 for normal text). */
106
108
  --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
109
  --pharos-color-semantic-info-on: var(--pharos-color-base-white); /** Readable on info.fg filled surfaces (WCAG AA). */
108
110
  }
package/dist/tokens.d.ts CHANGED
@@ -54,11 +54,15 @@ export const PharosColorSemanticSuccessFg: string;
54
54
  export const PharosColorSemanticSuccessBg: string;
55
55
  /** Readable on success.fg filled surfaces (WCAG AA). */
56
56
  export const PharosColorSemanticSuccessOn: string;
57
- /** Error foreground. Replaces Alexandria #ef2828 / true-red-opaque. Decision D2: single red (laser-red merged). */
57
+ /** Error foreground. Darkened from Alexandria #ef2828 (L=61%, contrast 4.19 against white failed WCAG AA 4.5:1 for normal text in filled destructive buttons) to pass AA 4.5:1 (contrast 5.68 vs white). Decision D2: single red (laser-red merged). Same precedent as success.fg and info.fg — Alexandria's value failed AA, Pharos fixes it systemically. */
58
58
  export const PharosColorSemanticErrorFg: string;
59
- /** Error background, subtle. Replaces Alexandria #ef282810. */
59
+ /** Darker shade of error.fg for hover states on filled destructive surfaces. Contrast 7.26 vs error.on (white), passes WCAG AA 4.5:1 with margin. */
60
+ export const PharosColorSemanticErrorFgHover: string;
61
+ /** Darkest — pressed/active state for filled destructive surfaces. Contrast 9.69 vs error.on (white), passes WCAG AAA 7:1. */
62
+ export const PharosColorSemanticErrorFgActive: string;
63
+ /** Error background, subtle tint of error.fg. Tracks the darkened fg so the relationship stays consistent. */
60
64
  export const PharosColorSemanticErrorBg: string;
61
- /** Readable on error.fg filled surfaces (WCAG AA). */
65
+ /** Readable on error.fg filled surfaces (WCAG AA 4.5:1 for normal text). */
62
66
  export const PharosColorSemanticErrorOn: string;
63
67
  /** Warning foreground. Replaces Alexandria #ddb101 / warning.fore. */
64
68
  export const PharosColorSemanticWarningFg: string;
package/dist/tokens.js CHANGED
@@ -28,9 +28,11 @@ export const PharosColorPrimary900 = "oklch(25.97% 0.1317 268.18)"; // Primary d
28
28
  export const PharosColorSemanticSuccessFg = "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.
29
29
  export const PharosColorSemanticSuccessBg = "oklch(52% 0.17 152 / 0.063)"; // Success background, subtle tint of success.fg.
30
30
  export const PharosColorSemanticSuccessOn = "oklch(100% 0 0)"; // Readable on success.fg filled surfaces (WCAG AA).
31
- export const PharosColorSemanticErrorFg = "oklch(61.28% 0.2305 27.48)"; // Error foreground. Replaces Alexandria #ef2828 / true-red-opaque. Decision D2: single red (laser-red merged).
32
- export const PharosColorSemanticErrorBg = "oklch(61.28% 0.2305 27.48 / 0.063)"; // Error background, subtle. Replaces Alexandria #ef282810.
33
- export const PharosColorSemanticErrorOn = "oklch(100% 0 0)"; // Readable on error.fg filled surfaces (WCAG AA).
31
+ export const PharosColorSemanticErrorFg = "oklch(54% 0.22 27.48)"; // Error foreground. Darkened from Alexandria #ef2828 (L=61%, contrast 4.19 against white failed WCAG AA 4.5:1 for normal text in filled destructive buttons) to pass AA 4.5:1 (contrast 5.68 vs white). Decision D2: single red (laser-red merged). Same precedent as success.fg and info.fg — Alexandria's value failed AA, Pharos fixes it systemically.
32
+ export const PharosColorSemanticErrorFgHover = "oklch(47% 0.205 27.48)"; // Darker shade of error.fg for hover states on filled destructive surfaces. Contrast 7.26 vs error.on (white), passes WCAG AA 4.5:1 with margin.
33
+ export const PharosColorSemanticErrorFgActive = "oklch(40% 0.175 27.48)"; // Darkest — pressed/active state for filled destructive surfaces. Contrast 9.69 vs error.on (white), passes WCAG AAA 7:1.
34
+ export const PharosColorSemanticErrorBg = "oklch(54% 0.22 27.48 / 0.063)"; // Error background, subtle tint of error.fg. Tracks the darkened fg so the relationship stays consistent.
35
+ export const PharosColorSemanticErrorOn = "oklch(100% 0 0)"; // Readable on error.fg filled surfaces (WCAG AA 4.5:1 for normal text).
34
36
  export const PharosColorSemanticWarningFg = "oklch(77.77% 0.1588 90.66)"; // Warning foreground. Replaces Alexandria #ddb101 / warning.fore.
35
37
  export const PharosColorSemanticWarningBg =
36
38
  "oklch(77.77% 0.1588 90.66 / 0.063)"; // Warning background, subtle. Replaces Alexandria #ddb10110 / warning.back.
package/dist/tokens.json CHANGED
@@ -36,8 +36,10 @@
36
36
  "on": "oklch(100% 0 0)"
37
37
  },
38
38
  "error": {
39
- "fg": "oklch(61.28% 0.2305 27.48)",
40
- "bg": "oklch(61.28% 0.2305 27.48 / 0.063)",
39
+ "fg": "oklch(54% 0.22 27.48)",
40
+ "fg-hover": "oklch(47% 0.205 27.48)",
41
+ "fg-active": "oklch(40% 0.175 27.48)",
42
+ "bg": "oklch(54% 0.22 27.48 / 0.063)",
41
43
  "on": "oklch(100% 0 0)"
42
44
  },
43
45
  "warning": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@code-sherpas/pharos-tokens",
3
- "version": "0.1.3",
3
+ "version": "0.3.0",
4
4
  "description": "Design tokens de Code Sherpas — agnóstico de framework. DTCG + Style Dictionary + OKLCH.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -141,19 +141,29 @@
141
141
  },
142
142
  "error": {
143
143
  "fg": {
144
- "$value": "oklch(61.28% 0.2305 27.48)",
144
+ "$value": "oklch(54% 0.22 27.48)",
145
145
  "$type": "color",
146
- "$description": "Error foreground. Replaces Alexandria #ef2828 / true-red-opaque. Decision D2: single red (laser-red merged)."
146
+ "$description": "Error foreground. Darkened from Alexandria #ef2828 (L=61%, contrast 4.19 against white failed WCAG AA 4.5:1 for normal text in filled destructive buttons) to pass AA 4.5:1 (contrast 5.68 vs white). Decision D2: single red (laser-red merged). Same precedent as success.fg and info.fg — Alexandria's value failed AA, Pharos fixes it systemically."
147
+ },
148
+ "fg-hover": {
149
+ "$value": "oklch(47% 0.205 27.48)",
150
+ "$type": "color",
151
+ "$description": "Darker shade of error.fg for hover states on filled destructive surfaces. Contrast 7.26 vs error.on (white), passes WCAG AA 4.5:1 with margin."
152
+ },
153
+ "fg-active": {
154
+ "$value": "oklch(40% 0.175 27.48)",
155
+ "$type": "color",
156
+ "$description": "Darkest — pressed/active state for filled destructive surfaces. Contrast 9.69 vs error.on (white), passes WCAG AAA 7:1."
147
157
  },
148
158
  "bg": {
149
- "$value": "oklch(61.28% 0.2305 27.48 / 0.063)",
159
+ "$value": "oklch(54% 0.22 27.48 / 0.063)",
150
160
  "$type": "color",
151
- "$description": "Error background, subtle. Replaces Alexandria #ef282810."
161
+ "$description": "Error background, subtle tint of error.fg. Tracks the darkened fg so the relationship stays consistent."
152
162
  },
153
163
  "on": {
154
164
  "$value": "{color.base.white}",
155
165
  "$type": "color",
156
- "$description": "Readable on error.fg filled surfaces (WCAG AA)."
166
+ "$description": "Readable on error.fg filled surfaces (WCAG AA 4.5:1 for normal text)."
157
167
  }
158
168
  },
159
169
  "warning": {