@code-sherpas/pharos-tokens 0.2.0 → 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,10 +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
- "fg-hover": "oklch(54% 0.22 27.48)",
48
- "fg-active": "oklch(46% 0.195 27.48)",
49
- "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)",
50
50
  "on": "oklch(100% 0 0)"
51
51
  },
52
52
  "warning": {
package/dist/styles.css CHANGED
@@ -28,10 +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-fg-hover: oklch(54% 0.22 27.48); /** Darker shade of error.fg for hover states on filled destructive surfaces. Passes WCAG AA 4.5:1 against error.on (white). */
33
- --pharos-color-semantic-error-fg-active: oklch(46% 0.195 27.48); /** Darker still — pressed/active state for filled destructive surfaces. Passes WCAG AAA 7:1 against error.on (white). */
34
- --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. */
35
35
  --pharos-color-semantic-warning-fg: oklch(77.77% 0.1588 90.66); /** Warning foreground. Replaces Alexandria #ddb101 / warning.fore. */
36
36
  --pharos-color-semantic-warning-bg: oklch(77.77% 0.1588 90.66 / 0.063); /** Warning background, subtle. Replaces Alexandria #ddb10110 / warning.back. */
37
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. */
@@ -104,7 +104,7 @@
104
104
  --pharos-font-letter-spacing-normal: 0;
105
105
  --pharos-font-letter-spacing-wide: 0.025em;
106
106
  --pharos-color-semantic-success-on: var(--pharos-color-base-white); /** Readable on success.fg filled surfaces (WCAG AA). */
107
- --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). */
108
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. */
109
109
  --pharos-color-semantic-info-on: var(--pharos-color-base-white); /** Readable on info.fg filled surfaces (WCAG AA). */
110
110
  }
package/dist/tokens.d.ts CHANGED
@@ -54,15 +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
- /** Darker shade of error.fg for hover states on filled destructive surfaces. Passes WCAG AA 4.5:1 against error.on (white). */
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
60
  export const PharosColorSemanticErrorFgHover: string;
61
- /** Darker still — pressed/active state for filled destructive surfaces. Passes WCAG AAA 7:1 against error.on (white). */
61
+ /** Darkest — pressed/active state for filled destructive surfaces. Contrast 9.69 vs error.on (white), passes WCAG AAA 7:1. */
62
62
  export const PharosColorSemanticErrorFgActive: string;
63
- /** Error background, subtle. Replaces Alexandria #ef282810. */
63
+ /** Error background, subtle tint of error.fg. Tracks the darkened fg so the relationship stays consistent. */
64
64
  export const PharosColorSemanticErrorBg: string;
65
- /** Readable on error.fg filled surfaces (WCAG AA). */
65
+ /** Readable on error.fg filled surfaces (WCAG AA 4.5:1 for normal text). */
66
66
  export const PharosColorSemanticErrorOn: string;
67
67
  /** Warning foreground. Replaces Alexandria #ddb101 / warning.fore. */
68
68
  export const PharosColorSemanticWarningFg: string;
package/dist/tokens.js CHANGED
@@ -28,11 +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 PharosColorSemanticErrorFgHover = "oklch(54% 0.22 27.48)"; // Darker shade of error.fg for hover states on filled destructive surfaces. Passes WCAG AA 4.5:1 against error.on (white).
33
- export const PharosColorSemanticErrorFgActive = "oklch(46% 0.195 27.48)"; // Darker still — pressed/active state for filled destructive surfaces. Passes WCAG AAA 7:1 against error.on (white).
34
- export const PharosColorSemanticErrorBg = "oklch(61.28% 0.2305 27.48 / 0.063)"; // Error background, subtle. Replaces Alexandria #ef282810.
35
- 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).
36
36
  export const PharosColorSemanticWarningFg = "oklch(77.77% 0.1588 90.66)"; // Warning foreground. Replaces Alexandria #ddb101 / warning.fore.
37
37
  export const PharosColorSemanticWarningBg =
38
38
  "oklch(77.77% 0.1588 90.66 / 0.063)"; // Warning background, subtle. Replaces Alexandria #ddb10110 / warning.back.
package/dist/tokens.json CHANGED
@@ -36,10 +36,10 @@
36
36
  "on": "oklch(100% 0 0)"
37
37
  },
38
38
  "error": {
39
- "fg": "oklch(61.28% 0.2305 27.48)",
40
- "fg-hover": "oklch(54% 0.22 27.48)",
41
- "fg-active": "oklch(46% 0.195 27.48)",
42
- "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)",
43
43
  "on": "oklch(100% 0 0)"
44
44
  },
45
45
  "warning": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@code-sherpas/pharos-tokens",
3
- "version": "0.2.0",
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,29 +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
147
  },
148
148
  "fg-hover": {
149
- "$value": "oklch(54% 0.22 27.48)",
149
+ "$value": "oklch(47% 0.205 27.48)",
150
150
  "$type": "color",
151
- "$description": "Darker shade of error.fg for hover states on filled destructive surfaces. Passes WCAG AA 4.5:1 against error.on (white)."
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
152
  },
153
153
  "fg-active": {
154
- "$value": "oklch(46% 0.195 27.48)",
154
+ "$value": "oklch(40% 0.175 27.48)",
155
155
  "$type": "color",
156
- "$description": "Darker still — pressed/active state for filled destructive surfaces. Passes WCAG AAA 7:1 against error.on (white)."
156
+ "$description": "Darkest — pressed/active state for filled destructive surfaces. Contrast 9.69 vs error.on (white), passes WCAG AAA 7:1."
157
157
  },
158
158
  "bg": {
159
- "$value": "oklch(61.28% 0.2305 27.48 / 0.063)",
159
+ "$value": "oklch(54% 0.22 27.48 / 0.063)",
160
160
  "$type": "color",
161
- "$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."
162
162
  },
163
163
  "on": {
164
164
  "$value": "{color.base.white}",
165
165
  "$type": "color",
166
- "$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)."
167
167
  }
168
168
  },
169
169
  "warning": {