@cocso-ui/css 1.2.0 → 1.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/package.json +1 -1
- package/tailwind4.css +15 -0
- package/theme-dark.css +35 -6
- package/token.css +3 -0
package/package.json
CHANGED
package/tailwind4.css
CHANGED
|
@@ -132,6 +132,10 @@
|
|
|
132
132
|
--color-text-tertiary: var(--cocso-color-text-tertiary);
|
|
133
133
|
--color-text-disabled: var(--cocso-color-text-disabled);
|
|
134
134
|
--color-text-on-primary: var(--cocso-color-text-on-primary);
|
|
135
|
+
--color-text-on-success: var(--cocso-color-text-on-success);
|
|
136
|
+
--color-text-on-danger: var(--cocso-color-text-on-danger);
|
|
137
|
+
--color-text-on-info: var(--cocso-color-text-on-info);
|
|
138
|
+
--color-text-on-warning: var(--cocso-color-text-on-warning);
|
|
135
139
|
--color-text-muted: var(--cocso-color-text-muted);
|
|
136
140
|
--color-surface-primary: var(--cocso-color-surface-primary);
|
|
137
141
|
--color-surface-secondary: var(--cocso-color-surface-secondary);
|
|
@@ -139,16 +143,27 @@
|
|
|
139
143
|
--color-surface-neutral: var(--cocso-color-surface-neutral);
|
|
140
144
|
--color-border-primary: var(--cocso-color-border-primary);
|
|
141
145
|
--color-border-secondary: var(--cocso-color-border-secondary);
|
|
146
|
+
--color-border-strong: var(--cocso-color-border-strong);
|
|
147
|
+
--color-overlay-subtle: var(--cocso-color-overlay-subtle);
|
|
148
|
+
--color-overlay-muted: var(--cocso-color-overlay-muted);
|
|
149
|
+
--color-overlay-strong: var(--cocso-color-overlay-strong);
|
|
142
150
|
--color-interactive-primary: var(--cocso-color-interactive-primary);
|
|
143
151
|
--color-interactive-primary-hover: var(--cocso-color-interactive-primary-hover);
|
|
144
152
|
--color-interactive-primary-active: var(--cocso-color-interactive-primary-active);
|
|
145
153
|
--color-interactive-primary-muted: var(--cocso-color-interactive-primary-muted);
|
|
154
|
+
--color-interactive-primary-subtle: var(--cocso-color-interactive-primary-subtle);
|
|
155
|
+
--color-interactive-primary-text: var(--cocso-color-interactive-primary-text);
|
|
146
156
|
--color-interactive-secondary: var(--cocso-color-interactive-secondary);
|
|
147
157
|
--color-interactive-secondary-hover: var(--cocso-color-interactive-secondary-hover);
|
|
158
|
+
--color-interactive-neutral: var(--cocso-color-interactive-neutral);
|
|
159
|
+
--color-interactive-neutral-hover: var(--cocso-color-interactive-neutral-hover);
|
|
160
|
+
--color-interactive-neutral-active: var(--cocso-color-interactive-neutral-active);
|
|
148
161
|
--color-interactive-danger: var(--cocso-color-interactive-danger);
|
|
149
162
|
--color-interactive-danger-hover: var(--cocso-color-interactive-danger-hover);
|
|
150
163
|
--color-interactive-danger-active: var(--cocso-color-interactive-danger-active);
|
|
151
164
|
--color-interactive-danger-hover-subtle: var(--cocso-color-interactive-danger-hover-subtle);
|
|
165
|
+
--color-interactive-danger-subtle-hover: var(--cocso-color-interactive-danger-subtle-hover);
|
|
166
|
+
--color-interactive-danger-subtle-active: var(--cocso-color-interactive-danger-subtle-active);
|
|
152
167
|
--color-interactive-success: var(--cocso-color-interactive-success);
|
|
153
168
|
--color-interactive-success-hover: var(--cocso-color-interactive-success-hover);
|
|
154
169
|
--color-interactive-success-active: var(--cocso-color-interactive-success-active);
|
package/theme-dark.css
CHANGED
|
@@ -12,9 +12,10 @@
|
|
|
12
12
|
* Only the semantic token layer is remapped — raw color-scale tokens
|
|
13
13
|
* (`--cocso-color-neutral-*`, `--cocso-color-info-*`, …) are unchanged, so
|
|
14
14
|
* any app override of those scales is preserved. Neutral-driven tokens are
|
|
15
|
-
* inverted along the scale (50 ↔ 950); saturated accent
|
|
16
|
-
* `-500`
|
|
17
|
-
*
|
|
15
|
+
* inverted along the scale (50 ↔ 950); saturated accent colors move one step
|
|
16
|
+
* up the ramp (`-500` → `-400`) so they clear AA on the dark surface, except
|
|
17
|
+
* the `interactive-*` fills, which keep their hue in both themes so their
|
|
18
|
+
* fixed `text-on-*` foregrounds stay valid.
|
|
18
19
|
*/
|
|
19
20
|
[data-theme="dark"] {
|
|
20
21
|
/* Text */
|
|
@@ -34,13 +35,26 @@
|
|
|
34
35
|
--cocso-color-surface-inverse: var(--cocso-color-white);
|
|
35
36
|
--cocso-color-surface-neutral: var(--cocso-color-neutral-800);
|
|
36
37
|
|
|
37
|
-
/* Border
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
/* Border — one step lighter than the surface they sit on, mirroring the light
|
|
39
|
+
theme where surfaces take the two lightest steps and borders the next two.
|
|
40
|
+
`border-secondary` was `neutral-900`, the same value as `surface-secondary`,
|
|
41
|
+
so every divider drawn on a card was invisible at 1.00:1. */
|
|
42
|
+
--cocso-color-border-primary: var(--cocso-color-neutral-700);
|
|
43
|
+
--cocso-color-border-secondary: var(--cocso-color-neutral-800);
|
|
40
44
|
/* neutral-600 would be 2.93:1 on the dark surface, under the 3:1 that
|
|
41
45
|
WCAG 1.4.11 asks of a focus indicator. */
|
|
42
46
|
--cocso-color-border-strong: var(--cocso-color-neutral-500);
|
|
43
47
|
|
|
48
|
+
/* Overlay — translucent tints that darken whatever sits under them in the
|
|
49
|
+
light theme and must lighten it here. The `black-alpha-*` primitives they
|
|
50
|
+
resolve to in the light theme are raw scale and stay black in both themes
|
|
51
|
+
by design (the Dialog scrim depends on that), so a consumer reaching for
|
|
52
|
+
`black-alpha-5` directly got a 5% black wash on a #131416 surface: an
|
|
53
|
+
invisible hover state and a hairline border that was not there. */
|
|
54
|
+
--cocso-color-overlay-subtle: var(--cocso-color-white-alpha-5);
|
|
55
|
+
--cocso-color-overlay-muted: var(--cocso-color-white-alpha-10);
|
|
56
|
+
--cocso-color-overlay-strong: var(--cocso-color-white-alpha-20);
|
|
57
|
+
|
|
44
58
|
/* Interactive — primary (derived from the neutral scale) */
|
|
45
59
|
--cocso-color-interactive-primary: var(--cocso-color-primary-50);
|
|
46
60
|
--cocso-color-interactive-primary-hover: var(--cocso-color-primary-200);
|
|
@@ -65,6 +79,21 @@
|
|
|
65
79
|
/* Focus ring */
|
|
66
80
|
--cocso-color-focus-ring: var(--cocso-color-primary-50);
|
|
67
81
|
|
|
82
|
+
/* Feedback base colors — one step up the ramp. The light theme's 500 level is
|
|
83
|
+
tuned for white; on the dark `surface-primary` (#131416) it lands at
|
|
84
|
+
4.04 (danger), 4.05 (info), 3.96 (warning) and 4.03 (success), all under
|
|
85
|
+
the 4.5:1 AA needs for the body-size text that StockQuantityStatus draws
|
|
86
|
+
with them. The 400 level clears it at 5.36-5.96 without shifting hue; the
|
|
87
|
+
300 level clears it too but washes out to pastel, and a pastel red does
|
|
88
|
+
not read as "danger". `feedback-success-muted` is left at the light
|
|
89
|
+
theme's 400 and therefore coincides with `feedback-success` here: the
|
|
90
|
+
ramp has no quieter green that still clears AA at body size, and no
|
|
91
|
+
surface renders the two side by side. */
|
|
92
|
+
--cocso-color-feedback-danger: var(--cocso-color-danger-400);
|
|
93
|
+
--cocso-color-feedback-info: var(--cocso-color-info-400);
|
|
94
|
+
--cocso-color-feedback-warning: var(--cocso-color-warning-400);
|
|
95
|
+
--cocso-color-feedback-success: var(--cocso-color-success-400);
|
|
96
|
+
|
|
68
97
|
/* Feedback surfaces — flip the light tints/text/borders for dark backgrounds */
|
|
69
98
|
--cocso-color-feedback-danger-subtle: var(--cocso-color-danger-950);
|
|
70
99
|
--cocso-color-feedback-danger-text: var(--cocso-color-danger-300);
|
package/token.css
CHANGED
|
@@ -167,6 +167,9 @@
|
|
|
167
167
|
--cocso-color-border-primary: var(--cocso-color-neutral-200);
|
|
168
168
|
--cocso-color-border-secondary: var(--cocso-color-neutral-100);
|
|
169
169
|
--cocso-color-border-strong: var(--cocso-color-neutral-400);
|
|
170
|
+
--cocso-color-overlay-subtle: var(--cocso-color-black-alpha-5);
|
|
171
|
+
--cocso-color-overlay-muted: var(--cocso-color-black-alpha-10);
|
|
172
|
+
--cocso-color-overlay-strong: var(--cocso-color-black-alpha-20);
|
|
170
173
|
--cocso-color-interactive-primary: var(--cocso-color-primary-950);
|
|
171
174
|
--cocso-color-interactive-primary-hover: var(--cocso-color-primary-800);
|
|
172
175
|
--cocso-color-interactive-primary-active: var(--cocso-color-primary-700);
|