@a4ui/core 0.13.0 → 0.14.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/README.md +48 -38
- package/dist/elements.css +3 -0
- package/dist/full.css +3 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +2451 -2305
- package/dist/ui/NotificationStack.d.ts +7 -7
- package/dist/ui/Ripple.d.ts +25 -0
- package/dist/ui/Typewriter.d.ts +28 -0
- package/package.json +14 -6
- package/src/index.ts +3 -1
- package/src/ui/NotificationStack.tsx +101 -66
- package/src/ui/Ripple.tsx +119 -0
- package/src/ui/Typewriter.tsx +149 -0
- package/src/elements.tsx +0 -167
- package/src/styles/space.css +0 -510
- package/src/styles/tokens.css +0 -213
package/src/styles/tokens.css
DELETED
|
@@ -1,213 +0,0 @@
|
|
|
1
|
-
/* A4ui — Spatial Glass design tokens + motion.
|
|
2
|
-
*
|
|
3
|
-
* Pure CSS (no @tailwind / @apply) so it can be imported directly by any
|
|
4
|
-
* consumer: `import 'a4ui/styles.css'`. Dark "night" theme is the default;
|
|
5
|
-
* `data-theme="light"` on the root opts into the light palette.
|
|
6
|
-
*
|
|
7
|
-
* Extracted verbatim from the source project
|
|
8
|
-
* (sonora precision/alfredorust/solid/src/index.css) — keep in sync until that
|
|
9
|
-
* app consumes this package instead. */
|
|
10
|
-
|
|
11
|
-
:root {
|
|
12
|
-
--background: 222 47% 7%;
|
|
13
|
-
--foreground: 213 31% 91%;
|
|
14
|
-
--card: 222 40% 11%;
|
|
15
|
-
--card-foreground: 213 31% 91%;
|
|
16
|
-
--muted: 217 33% 17%;
|
|
17
|
-
/* 75% (not 65%) for WCAG AA contrast on glass/dark surfaces (pa11y/axe). */
|
|
18
|
-
--muted-foreground: 215 25% 75%;
|
|
19
|
-
--border: 217 30% 22%;
|
|
20
|
-
--input: 217 30% 22%;
|
|
21
|
-
--primary: 217 91% 52%;
|
|
22
|
-
--primary-foreground: 0 0% 100%;
|
|
23
|
-
--accent: 199 89% 55%;
|
|
24
|
-
--accent-foreground: 0 0% 100%;
|
|
25
|
-
--ring: 217 91% 52%;
|
|
26
|
-
--destructive: 0 72% 52%;
|
|
27
|
-
--destructive-foreground: 0 0% 100%;
|
|
28
|
-
|
|
29
|
-
/* Semantic data colors (financial direction) — constant across themes. */
|
|
30
|
-
--data-emit: 160 84% 39%;
|
|
31
|
-
--data-received: 347 89% 61%;
|
|
32
|
-
--data-net: 199 89% 48%;
|
|
33
|
-
|
|
34
|
-
--font-sans: 'IBM Plex Sans', ui-sans-serif, system-ui, sans-serif;
|
|
35
|
-
--font-mono: 'IBM Plex Mono', ui-monospace, monospace;
|
|
36
|
-
--sidebar-w: 248px;
|
|
37
|
-
--sidebar-w-collapsed: 68px;
|
|
38
|
-
|
|
39
|
-
/* Shadow color for glass surfaces (consumed by the glass plugin in preset.js).
|
|
40
|
-
Undefined in the source project, so its .card box-shadow silently dropped —
|
|
41
|
-
defined here so the intended elevation renders. Low alpha in use, so one
|
|
42
|
-
dark value covers both themes. */
|
|
43
|
-
--shadow: 222 47% 4%;
|
|
44
|
-
--radius-xl: 1rem;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
:root[data-theme='light'] {
|
|
48
|
-
--background: 214 32% 95%;
|
|
49
|
-
--foreground: 222 47% 11%;
|
|
50
|
-
--card: 0 0% 100%;
|
|
51
|
-
--card-foreground: 222 47% 11%;
|
|
52
|
-
--muted: 214 30% 92%;
|
|
53
|
-
/* 38% (not 47%) for WCAG AA contrast on light/glass surfaces (pa11y/axe). */
|
|
54
|
-
--muted-foreground: 215 22% 38%;
|
|
55
|
-
--border: 214 24% 84%;
|
|
56
|
-
--input: 214 32% 91%;
|
|
57
|
-
--primary: 217 91% 52%;
|
|
58
|
-
--primary-foreground: 0 0% 100%;
|
|
59
|
-
--accent: 199 89% 48%;
|
|
60
|
-
--accent-foreground: 0 0% 100%;
|
|
61
|
-
--ring: 217 91% 52%;
|
|
62
|
-
--destructive: 0 72% 50%;
|
|
63
|
-
--destructive-foreground: 0 0% 100%;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
body {
|
|
67
|
-
background: hsl(var(--background));
|
|
68
|
-
color: hsl(var(--foreground));
|
|
69
|
-
font-family: var(--font-sans);
|
|
70
|
-
-webkit-font-smoothing: antialiased;
|
|
71
|
-
font-feature-settings: 'cv02', 'cv03', 'cv04';
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
/* ---- Motion (transform/opacity only, short & functional) --------------- */
|
|
75
|
-
|
|
76
|
-
/* Route/page cross-fade (AppShell wraps routed content in a <Transition>). */
|
|
77
|
-
.page-enter-active,
|
|
78
|
-
.page-exit-active {
|
|
79
|
-
transition: opacity 0.16s ease-out;
|
|
80
|
-
}
|
|
81
|
-
.page-enter,
|
|
82
|
-
.page-exit-to {
|
|
83
|
-
opacity: 0;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
/* Modal — MUST be @keyframes (Kobalte Dialog presence listens for
|
|
87
|
-
animationend, not transitionend, or the exit never resolves). */
|
|
88
|
-
@keyframes modal-overlay-in {
|
|
89
|
-
from {
|
|
90
|
-
opacity: 0;
|
|
91
|
-
}
|
|
92
|
-
to {
|
|
93
|
-
opacity: 1;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
@keyframes modal-overlay-out {
|
|
97
|
-
from {
|
|
98
|
-
opacity: 1;
|
|
99
|
-
}
|
|
100
|
-
to {
|
|
101
|
-
opacity: 0;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
@keyframes modal-content-in {
|
|
105
|
-
from {
|
|
106
|
-
opacity: 0;
|
|
107
|
-
transform: scale(0.96) translateY(4px);
|
|
108
|
-
}
|
|
109
|
-
to {
|
|
110
|
-
opacity: 1;
|
|
111
|
-
transform: scale(1) translateY(0);
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
@keyframes modal-content-out {
|
|
115
|
-
from {
|
|
116
|
-
opacity: 1;
|
|
117
|
-
transform: scale(1) translateY(0);
|
|
118
|
-
}
|
|
119
|
-
to {
|
|
120
|
-
opacity: 0;
|
|
121
|
-
transform: scale(0.96) translateY(4px);
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
.modal-overlay[data-expanded] {
|
|
125
|
-
animation: modal-overlay-in 0.15s ease-out;
|
|
126
|
-
}
|
|
127
|
-
.modal-overlay[data-closed] {
|
|
128
|
-
animation: modal-overlay-out 0.15s ease-in;
|
|
129
|
-
}
|
|
130
|
-
.modal-content[data-expanded] {
|
|
131
|
-
animation: modal-content-in 0.18s ease-out;
|
|
132
|
-
}
|
|
133
|
-
.modal-content[data-closed] {
|
|
134
|
-
animation: modal-content-out 0.15s ease-in;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
/* Toast — same animationend-only presence mechanism as Dialog. */
|
|
138
|
-
@keyframes toast-in {
|
|
139
|
-
from {
|
|
140
|
-
opacity: 0;
|
|
141
|
-
transform: translateX(16px);
|
|
142
|
-
}
|
|
143
|
-
to {
|
|
144
|
-
opacity: 1;
|
|
145
|
-
transform: translateX(0);
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
@keyframes toast-out {
|
|
149
|
-
from {
|
|
150
|
-
opacity: 1;
|
|
151
|
-
transform: translateX(0);
|
|
152
|
-
}
|
|
153
|
-
to {
|
|
154
|
-
opacity: 0;
|
|
155
|
-
transform: translateX(16px);
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
.toast-item[data-opened] {
|
|
159
|
-
animation: toast-in 0.2s ease-out;
|
|
160
|
-
}
|
|
161
|
-
.toast-item[data-closed] {
|
|
162
|
-
animation: toast-out 0.18s ease-in;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
/* Table row enter/exit fade. */
|
|
166
|
-
.row-enter-active,
|
|
167
|
-
.row-exit-active {
|
|
168
|
-
transition: opacity 0.15s ease-out;
|
|
169
|
-
}
|
|
170
|
-
.row-enter,
|
|
171
|
-
.row-exit-to {
|
|
172
|
-
opacity: 0;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
/* Drawer / Modal drawer-variant slide-over (Kobalte Dialog presence →
|
|
176
|
-
animationend keyframes, keyed off data-expanded/data-closed like Modal). */
|
|
177
|
-
@keyframes drawer-in {
|
|
178
|
-
from {
|
|
179
|
-
transform: translateX(100%);
|
|
180
|
-
}
|
|
181
|
-
to {
|
|
182
|
-
transform: translateX(0);
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
@keyframes drawer-out {
|
|
186
|
-
from {
|
|
187
|
-
transform: translateX(0);
|
|
188
|
-
}
|
|
189
|
-
to {
|
|
190
|
-
transform: translateX(100%);
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
.drawer-content[data-expanded] {
|
|
194
|
-
animation: drawer-in 0.28s cubic-bezier(0.16, 1, 0.3, 1);
|
|
195
|
-
}
|
|
196
|
-
.drawer-content[data-closed] {
|
|
197
|
-
animation: drawer-out 0.2s ease-in;
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
/* Reduced motion: resolve near-instantly rather than removing outright, so
|
|
201
|
-
libraries that gate DOM unmount on transitionend/animationend (Kobalte
|
|
202
|
-
Dialog/Toast, solid-transition-group) still fire the event. Add
|
|
203
|
-
`force-motion` to <html> to opt back in (the ⚡ / effects toggle). */
|
|
204
|
-
@media (prefers-reduced-motion: reduce) {
|
|
205
|
-
html:not(.force-motion) *,
|
|
206
|
-
html:not(.force-motion) *::before,
|
|
207
|
-
html:not(.force-motion) *::after {
|
|
208
|
-
animation-duration: 0.001ms !important;
|
|
209
|
-
animation-iteration-count: 1 !important;
|
|
210
|
-
transition-duration: 0.001ms !important;
|
|
211
|
-
scroll-behavior: auto !important;
|
|
212
|
-
}
|
|
213
|
-
}
|