@cocso-ui/css 1.2.1 → 1.4.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 +17 -0
- package/theme-dark.css +38 -3
- package/token.css +5 -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);
|
|
@@ -161,6 +176,8 @@
|
|
|
161
176
|
--color-interactive-info-hover: var(--cocso-color-interactive-info-hover);
|
|
162
177
|
--color-interactive-info-active: var(--cocso-color-interactive-info-active);
|
|
163
178
|
--color-interactive-info-hover-subtle: var(--cocso-color-interactive-info-hover-subtle);
|
|
179
|
+
--color-interactive-info-text: var(--cocso-color-interactive-info-text);
|
|
180
|
+
--color-interactive-info-text-hover: var(--cocso-color-interactive-info-text-hover);
|
|
164
181
|
--color-focus-ring: var(--cocso-color-focus-ring);
|
|
165
182
|
--color-feedback-danger: var(--cocso-color-feedback-danger);
|
|
166
183
|
--color-feedback-danger-subtle: var(--cocso-color-feedback-danger-subtle);
|
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 */
|
|
@@ -44,6 +45,16 @@
|
|
|
44
45
|
WCAG 1.4.11 asks of a focus indicator. */
|
|
45
46
|
--cocso-color-border-strong: var(--cocso-color-neutral-500);
|
|
46
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
|
+
|
|
47
58
|
/* Interactive — primary (derived from the neutral scale) */
|
|
48
59
|
--cocso-color-interactive-primary: var(--cocso-color-primary-50);
|
|
49
60
|
--cocso-color-interactive-primary-hover: var(--cocso-color-primary-200);
|
|
@@ -65,9 +76,33 @@
|
|
|
65
76
|
--cocso-color-interactive-neutral-hover: var(--cocso-color-neutral-700);
|
|
66
77
|
--cocso-color-interactive-neutral-active: var(--cocso-color-neutral-600);
|
|
67
78
|
|
|
79
|
+
/* Interactive — info as text (Link). The `interactive-info` fills above keep
|
|
80
|
+
their hue in both themes because a saturated accent reads on either
|
|
81
|
+
surface, but Link paints *text* with them, and there the ramp runs the
|
|
82
|
+
wrong way: on a dark surface `info-500` is 4.05:1 and the `info-700`
|
|
83
|
+
hover state is 1.74:1, so hovering a link nearly erased it. These two
|
|
84
|
+
carry the light theme's values unchanged and flip here. */
|
|
85
|
+
--cocso-color-interactive-info-text: var(--cocso-color-info-300);
|
|
86
|
+
--cocso-color-interactive-info-text-hover: var(--cocso-color-info-200);
|
|
87
|
+
|
|
68
88
|
/* Focus ring */
|
|
69
89
|
--cocso-color-focus-ring: var(--cocso-color-primary-50);
|
|
70
90
|
|
|
91
|
+
/* Feedback base colors — one step up the ramp. The light theme's 500 level is
|
|
92
|
+
tuned for white; on the dark `surface-primary` (#131416) it lands at
|
|
93
|
+
4.04 (danger), 4.05 (info), 3.96 (warning) and 4.03 (success), all under
|
|
94
|
+
the 4.5:1 AA needs for the body-size text that StockQuantityStatus draws
|
|
95
|
+
with them. The 400 level clears it at 5.36-5.96 without shifting hue; the
|
|
96
|
+
300 level clears it too but washes out to pastel, and a pastel red does
|
|
97
|
+
not read as "danger". `feedback-success-muted` is left at the light
|
|
98
|
+
theme's 400 and therefore coincides with `feedback-success` here: the
|
|
99
|
+
ramp has no quieter green that still clears AA at body size, and no
|
|
100
|
+
surface renders the two side by side. */
|
|
101
|
+
--cocso-color-feedback-danger: var(--cocso-color-danger-400);
|
|
102
|
+
--cocso-color-feedback-info: var(--cocso-color-info-400);
|
|
103
|
+
--cocso-color-feedback-warning: var(--cocso-color-warning-400);
|
|
104
|
+
--cocso-color-feedback-success: var(--cocso-color-success-400);
|
|
105
|
+
|
|
71
106
|
/* Feedback surfaces — flip the light tints/text/borders for dark backgrounds */
|
|
72
107
|
--cocso-color-feedback-danger-subtle: var(--cocso-color-danger-950);
|
|
73
108
|
--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);
|
|
@@ -196,6 +199,8 @@
|
|
|
196
199
|
--cocso-color-interactive-info-hover: var(--cocso-color-info-600);
|
|
197
200
|
--cocso-color-interactive-info-active: var(--cocso-color-info-700);
|
|
198
201
|
--cocso-color-interactive-info-hover-subtle: var(--cocso-color-info-400);
|
|
202
|
+
--cocso-color-interactive-info-text: var(--cocso-color-info-500);
|
|
203
|
+
--cocso-color-interactive-info-text-hover: var(--cocso-color-info-700);
|
|
199
204
|
--cocso-color-focus-ring: var(--cocso-color-primary-950);
|
|
200
205
|
--cocso-color-feedback-danger: var(--cocso-color-danger-500);
|
|
201
206
|
--cocso-color-feedback-danger-subtle: var(--cocso-color-danger-50);
|