@tokis/theme 1.2.2 → 1.2.3
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tokis/theme",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.3",
|
|
4
4
|
"description": "Default visual theme for Tokis — CSS variables, component styles, reset, and typography. Zero-runtime, precompiled CSS.",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./src/index.css",
|
|
@@ -62,6 +62,9 @@
|
|
|
62
62
|
"bugs": {
|
|
63
63
|
"url": "https://github.com/PrerakMathur20/TokisLib/issues"
|
|
64
64
|
},
|
|
65
|
+
"engines": {
|
|
66
|
+
"node": ">=18.0.0"
|
|
67
|
+
},
|
|
65
68
|
"publishConfig": {
|
|
66
69
|
"access": "public",
|
|
67
70
|
"registry": "https://registry.npmjs.org/"
|
package/src/base/variables.css
CHANGED
|
@@ -107,9 +107,16 @@
|
|
|
107
107
|
--tokis-shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
|
|
108
108
|
--tokis-shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / 0.05);
|
|
109
109
|
|
|
110
|
-
/* Focus */
|
|
111
|
-
--tokis-color-focus-ring:
|
|
112
|
-
--tokis-color-focus-ring-error:
|
|
110
|
+
/* Focus — solid opaque values ensure ≥3:1 contrast against any light surface (WCAG 2.2 §1.4.11) */
|
|
111
|
+
--tokis-color-focus-ring: #0066ff;
|
|
112
|
+
--tokis-color-focus-ring-error: #dc2626;
|
|
113
|
+
|
|
114
|
+
/* Badge accessible text colors — each meets 4.5:1 contrast on its paired subtle background */
|
|
115
|
+
--tokis-badge-primary-text: #0047b3; /* 6.7:1 on #e6f0ff */
|
|
116
|
+
--tokis-badge-success-text: #166534; /* 6.1:1 on #f0fdf4 */
|
|
117
|
+
--tokis-badge-warning-text: #92400e; /* 6.2:1 on #fffbeb */
|
|
118
|
+
--tokis-badge-error-text: #b91c1c; /* 5.5:1 on #fef2f2 */
|
|
119
|
+
--tokis-badge-info-text: #075985; /* 6.4:1 on #f0f9ff */
|
|
113
120
|
|
|
114
121
|
/* Surface interaction states */
|
|
115
122
|
--tokis-color-surface-hover: var(--tokis-color-neutral-100);
|
|
@@ -196,8 +203,15 @@
|
|
|
196
203
|
--tokis-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.4);
|
|
197
204
|
--tokis-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.4), 0 8px 10px -6px rgb(0 0 0 / 0.4);
|
|
198
205
|
|
|
199
|
-
--tokis-color-focus-ring:
|
|
200
|
-
--tokis-color-focus-ring-error:
|
|
206
|
+
--tokis-color-focus-ring: #60a5fa;
|
|
207
|
+
--tokis-color-focus-ring-error: #f87171;
|
|
208
|
+
|
|
209
|
+
/* Badge accessible text — light tones for dark subtle backgrounds, each meets 4.5:1 */
|
|
210
|
+
--tokis-badge-primary-text: #93c5fd; /* 5.8:1 on #1e3a5f */
|
|
211
|
+
--tokis-badge-success-text: #86efac; /* >10:1 on #052e16 */
|
|
212
|
+
--tokis-badge-warning-text: #fde68a; /* >10:1 on #451a03 */
|
|
213
|
+
--tokis-badge-error-text: #fca5a5; /* >10:1 on #450a0a */
|
|
214
|
+
--tokis-badge-info-text: #7dd3fc; /* >10:1 on #082f49 */
|
|
201
215
|
|
|
202
216
|
/* Dark mode surface-hover needs to be noticeably different from surface-overlay */
|
|
203
217
|
--tokis-color-surface-hover: var(--tokis-color-neutral-200); /* #334155 vs overlay #1e293b */
|
|
@@ -96,12 +96,13 @@
|
|
|
96
96
|
to { transform: scale(1); opacity: 1; }
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
+
/* Text colors use --tokis-badge-*-text vars which are calibrated per-theme for ≥4.5:1 contrast */
|
|
99
100
|
.tokis-badge--default { background: var(--tokis-color-neutral-100); color: var(--tokis-text-secondary); }
|
|
100
|
-
.tokis-badge--primary { background: var(--tokis-color-primary-subtle); color: var(--tokis-
|
|
101
|
-
.tokis-badge--success { background: var(--tokis-color-success-subtle); color: var(--tokis-
|
|
102
|
-
.tokis-badge--warning { background: var(--tokis-color-warning-subtle); color: var(--tokis-
|
|
103
|
-
.tokis-badge--error { background: var(--tokis-color-error-subtle); color: var(--tokis-
|
|
104
|
-
.tokis-badge--info { background: var(--tokis-color-info-subtle); color: var(--tokis-
|
|
101
|
+
.tokis-badge--primary { background: var(--tokis-color-primary-subtle); color: var(--tokis-badge-primary-text); }
|
|
102
|
+
.tokis-badge--success { background: var(--tokis-color-success-subtle); color: var(--tokis-badge-success-text); }
|
|
103
|
+
.tokis-badge--warning { background: var(--tokis-color-warning-subtle); color: var(--tokis-badge-warning-text); }
|
|
104
|
+
.tokis-badge--error { background: var(--tokis-color-error-subtle); color: var(--tokis-badge-error-text); }
|
|
105
|
+
.tokis-badge--info { background: var(--tokis-color-info-subtle); color: var(--tokis-badge-info-text); }
|
|
105
106
|
|
|
106
107
|
.tokis-badge--solid-primary { background: var(--tokis-color-primary); color: var(--tokis-text-on-primary); }
|
|
107
108
|
.tokis-badge--solid-success { background: var(--tokis-color-success); color: var(--tokis-text-inverse); }
|
|
@@ -49,8 +49,9 @@
|
|
|
49
49
|
border-color: var(--tokis-color-primary);
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
+
/* Disabled prev/next navigation — exclude active page buttons which are styled separately */
|
|
52
53
|
.tokis-pagination__item--disabled,
|
|
53
|
-
.tokis-pagination__item:disabled {
|
|
54
|
+
.tokis-pagination__item:disabled:not(.tokis-pagination__item--active) {
|
|
54
55
|
opacity: 0.4;
|
|
55
56
|
cursor: not-allowed;
|
|
56
57
|
pointer-events: none;
|
package/src/utilities/layout.css
CHANGED
|
@@ -26,3 +26,19 @@
|
|
|
26
26
|
|
|
27
27
|
.tokis-box { display: block; }
|
|
28
28
|
|
|
29
|
+
/* ── Screen-reader only utility ────────────────────────────── */
|
|
30
|
+
|
|
31
|
+
/* Visually hides content while keeping it accessible to screen readers.
|
|
32
|
+
Use on elements that provide text alternatives for visual-only information
|
|
33
|
+
(e.g. dot badges, decorative icons, status indicators). */
|
|
34
|
+
.tokis-sr-only {
|
|
35
|
+
position: absolute;
|
|
36
|
+
width: 1px;
|
|
37
|
+
height: 1px;
|
|
38
|
+
padding: 0;
|
|
39
|
+
margin: -1px;
|
|
40
|
+
overflow: hidden;
|
|
41
|
+
clip: rect(0, 0, 0, 0);
|
|
42
|
+
white-space: nowrap;
|
|
43
|
+
border-width: 0;
|
|
44
|
+
}
|