reend-components 0.1.0 → 0.2.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 +106 -8
- package/dist/lib/index.cjs +1 -1
- package/dist/lib/index.cjs.map +1 -1
- package/dist/lib/index.d.ts +100 -0
- package/dist/lib/index.mjs +669 -142
- package/dist/lib/index.mjs.map +1 -1
- package/dist/lib/style.css +1 -1
- package/package.json +33 -13
- package/src/styles/variables.css +71 -1
- package/src/tailwind-preset.ts +189 -2
package/src/tailwind-preset.ts
CHANGED
|
@@ -71,9 +71,9 @@ const reendPreset: Partial<Config> = {
|
|
|
71
71
|
"white-muted": "hsl(var(--ef-white-muted))",
|
|
72
72
|
"white-soft": "hsl(var(--ef-white-soft))",
|
|
73
73
|
white: "hsl(var(--ef-white))",
|
|
74
|
+
"pure-white": "hsl(var(--ef-pure-white))",
|
|
74
75
|
yellow: "hsl(var(--ef-yellow))",
|
|
75
76
|
"yellow-dark": "hsl(var(--ef-yellow-dark))",
|
|
76
|
-
"yellow-glow": "hsl(var(--ef-yellow-glow))",
|
|
77
77
|
blue: "hsl(var(--ef-blue))",
|
|
78
78
|
"blue-light": "hsl(var(--ef-blue-light))",
|
|
79
79
|
"blue-dark": "hsl(var(--ef-blue-dark))",
|
|
@@ -98,7 +98,42 @@ const reendPreset: Partial<Config> = {
|
|
|
98
98
|
md: "calc(var(--radius) - 2px)",
|
|
99
99
|
sm: "calc(var(--radius) - 4px)",
|
|
100
100
|
},
|
|
101
|
+
// ─── Shadows referencing CSS vars ───────────────────────────────────
|
|
102
|
+
boxShadow: {
|
|
103
|
+
sm: "var(--shadow-sm)",
|
|
104
|
+
md: "var(--shadow-md)",
|
|
105
|
+
lg: "var(--shadow-lg)",
|
|
106
|
+
glow: "var(--shadow-glow)",
|
|
107
|
+
},
|
|
108
|
+
// ─── Z-Index scale matching CSS vars ────────────────────────────────
|
|
109
|
+
zIndex: {
|
|
110
|
+
base: "0",
|
|
111
|
+
dropdown: "10",
|
|
112
|
+
sticky: "20",
|
|
113
|
+
overlay: "30",
|
|
114
|
+
modal: "40",
|
|
115
|
+
popover: "50",
|
|
116
|
+
toast: "60",
|
|
117
|
+
tooltip: "70",
|
|
118
|
+
},
|
|
119
|
+
// ─── Transition durations matching CSS vars ──────────────────────────
|
|
120
|
+
transitionDuration: {
|
|
121
|
+
instant: "100ms",
|
|
122
|
+
fast: "150ms",
|
|
123
|
+
normal: "250ms",
|
|
124
|
+
slow: "400ms",
|
|
125
|
+
slower: "700ms",
|
|
126
|
+
},
|
|
127
|
+
// ─── Transition easing matching CSS vars ─────────────────────────────
|
|
128
|
+
transitionTimingFunction: {
|
|
129
|
+
default: "cubic-bezier(0.25, 0.8, 0.25, 1)",
|
|
130
|
+
bounce: "cubic-bezier(0.34, 1.56, 0.64, 1)",
|
|
131
|
+
sharp: "cubic-bezier(0.4, 0, 0.2, 1)",
|
|
132
|
+
smooth: "cubic-bezier(0.45, 0, 0.55, 1)",
|
|
133
|
+
},
|
|
134
|
+
// ─── Keyframes ───────────────────────────────────────────────────────
|
|
101
135
|
keyframes: {
|
|
136
|
+
// Existing
|
|
102
137
|
"accordion-down": {
|
|
103
138
|
from: { height: "0" },
|
|
104
139
|
to: { height: "var(--radix-accordion-content-height)" },
|
|
@@ -107,14 +142,166 @@ const reendPreset: Partial<Config> = {
|
|
|
107
142
|
from: { height: "var(--radix-accordion-content-height)" },
|
|
108
143
|
to: { height: "0" },
|
|
109
144
|
},
|
|
145
|
+
// Signature & design system animations
|
|
146
|
+
fadeIn: {
|
|
147
|
+
from: { opacity: "0" },
|
|
148
|
+
to: { opacity: "1" },
|
|
149
|
+
},
|
|
150
|
+
fadeInUp: {
|
|
151
|
+
from: { opacity: "0", transform: "translateY(16px)" },
|
|
152
|
+
to: { opacity: "1", transform: "translateY(0)" },
|
|
153
|
+
},
|
|
154
|
+
slideInRight: {
|
|
155
|
+
from: { opacity: "0", transform: "translateX(-10px)" },
|
|
156
|
+
to: { opacity: "1", transform: "translateX(0)" },
|
|
157
|
+
},
|
|
158
|
+
slideDown: {
|
|
159
|
+
from: { transform: "scaleY(0)", opacity: "0" },
|
|
160
|
+
to: { transform: "scaleY(1)", opacity: "1" },
|
|
161
|
+
},
|
|
162
|
+
glitch: {
|
|
163
|
+
"0%, 90%, 100%": { transform: "translate(0)" },
|
|
164
|
+
"92%": { transform: "translate(-2px, 1px)" },
|
|
165
|
+
"94%": { transform: "translate(2px, -1px)" },
|
|
166
|
+
"96%": { transform: "translate(-1px, -1px)" },
|
|
167
|
+
"98%": { transform: "translate(1px, 1px)" },
|
|
168
|
+
},
|
|
169
|
+
cursorBlink: {
|
|
170
|
+
"0%, 50%": { opacity: "1" },
|
|
171
|
+
"51%, 100%": { opacity: "0" },
|
|
172
|
+
},
|
|
173
|
+
diamondSpin: {
|
|
174
|
+
from: { transform: "rotate(0deg)" },
|
|
175
|
+
to: { transform: "rotate(360deg)" },
|
|
176
|
+
},
|
|
177
|
+
pulseGlow: {
|
|
178
|
+
"0%, 100%": { boxShadow: "0 0 8px hsl(var(--primary) / 0.2)" },
|
|
179
|
+
"50%": { boxShadow: "0 0 20px hsl(var(--primary) / 0.4)" },
|
|
180
|
+
},
|
|
181
|
+
scanLine: {
|
|
182
|
+
"0%": { top: "-5%" },
|
|
183
|
+
"100%": { top: "105%" },
|
|
184
|
+
},
|
|
185
|
+
skeletonShimmer: {
|
|
186
|
+
"0%": { backgroundPosition: "-200% 0" },
|
|
187
|
+
"100%": { backgroundPosition: "200% 0" },
|
|
188
|
+
},
|
|
189
|
+
shrink: {
|
|
190
|
+
from: { transform: "scaleX(1)" },
|
|
191
|
+
to: { transform: "scaleX(0)" },
|
|
192
|
+
},
|
|
193
|
+
countUp: {
|
|
194
|
+
from: { opacity: "0", transform: "translateY(8px)" },
|
|
195
|
+
to: { opacity: "1", transform: "translateY(0)" },
|
|
196
|
+
},
|
|
110
197
|
},
|
|
198
|
+
// ─── Animation utilities ─────────────────────────────────────────────
|
|
111
199
|
animation: {
|
|
112
200
|
"accordion-down": "accordion-down 0.2s ease-out",
|
|
113
201
|
"accordion-up": "accordion-up 0.2s ease-out",
|
|
202
|
+
"fade-in": "fadeIn 0.3s ease forwards",
|
|
203
|
+
"fade-in-up": "fadeInUp 0.4s var(--ease-default, ease) forwards",
|
|
204
|
+
"slide-in-right": "slideInRight 0.3s var(--ease-smooth, ease) forwards",
|
|
205
|
+
"slide-down": "slideDown 0.3s ease forwards",
|
|
206
|
+
glitch: "glitch 3s infinite",
|
|
207
|
+
"cursor-blink": "cursorBlink 1s step-end infinite",
|
|
208
|
+
"diamond-spin": "diamondSpin 0.8s linear infinite",
|
|
209
|
+
"pulse-glow": "pulseGlow 2s ease-in-out infinite",
|
|
210
|
+
"scan-line": "scanLine 2s linear infinite",
|
|
211
|
+
skeleton: "skeletonShimmer 1.5s infinite",
|
|
212
|
+
shrink: "shrink 5s linear forwards",
|
|
213
|
+
"count-up": "countUp 0.4s var(--ease-default, ease) forwards",
|
|
114
214
|
},
|
|
115
215
|
},
|
|
116
216
|
},
|
|
117
|
-
plugins: [
|
|
217
|
+
plugins: [
|
|
218
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
219
|
+
require("tailwindcss-animate"),
|
|
220
|
+
// ─── Endfield Signature Utilities ────────────────────────────────────
|
|
221
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
222
|
+
require("tailwindcss/plugin")(({ addUtilities, addComponents }: {
|
|
223
|
+
addUtilities: (utilities: Record<string, Record<string, string>>) => void;
|
|
224
|
+
addComponents: (components: Record<string, Record<string, string>>) => void;
|
|
225
|
+
}) => {
|
|
226
|
+
// Clip-corner utilities — Endfield signature cut-corner aesthetic
|
|
227
|
+
addComponents({
|
|
228
|
+
".clip-corner": {
|
|
229
|
+
"clip-path":
|
|
230
|
+
"polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px))",
|
|
231
|
+
},
|
|
232
|
+
".clip-corner-sm": {
|
|
233
|
+
"clip-path":
|
|
234
|
+
"polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px))",
|
|
235
|
+
},
|
|
236
|
+
".clip-corner-lg": {
|
|
237
|
+
"clip-path":
|
|
238
|
+
"polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px))",
|
|
239
|
+
},
|
|
240
|
+
});
|
|
241
|
+
|
|
242
|
+
// Scanline overlay — CRT scan-line texture for HUD panels
|
|
243
|
+
addComponents({
|
|
244
|
+
".scanline-overlay": {
|
|
245
|
+
position: "relative",
|
|
246
|
+
},
|
|
247
|
+
".scanline-overlay::after": {
|
|
248
|
+
content: '""',
|
|
249
|
+
position: "absolute",
|
|
250
|
+
inset: "0",
|
|
251
|
+
background:
|
|
252
|
+
"repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255, 255, 255, 0.015) 2px, rgba(255, 255, 255, 0.015) 4px)",
|
|
253
|
+
"pointer-events": "none",
|
|
254
|
+
"z-index": "1",
|
|
255
|
+
},
|
|
256
|
+
});
|
|
257
|
+
|
|
258
|
+
// Skeleton shimmer — includes background gradient (not just animation)
|
|
259
|
+
addUtilities({
|
|
260
|
+
".animate-skeleton": {
|
|
261
|
+
background:
|
|
262
|
+
"linear-gradient(90deg, hsl(var(--surface-1)) 0%, hsl(var(--surface-2)) 50%, hsl(var(--surface-1)) 100%)",
|
|
263
|
+
"background-size": "200% 100%",
|
|
264
|
+
animation: "skeletonShimmer 1.5s infinite",
|
|
265
|
+
},
|
|
266
|
+
});
|
|
267
|
+
|
|
268
|
+
// Slide-down — includes transform-origin and overflow (not just animation)
|
|
269
|
+
addUtilities({
|
|
270
|
+
".animate-slide-down": {
|
|
271
|
+
animation: "slideDown 0.3s ease forwards",
|
|
272
|
+
"transform-origin": "top",
|
|
273
|
+
overflow: "hidden",
|
|
274
|
+
},
|
|
275
|
+
});
|
|
276
|
+
|
|
277
|
+
// Glow effects
|
|
278
|
+
addUtilities({
|
|
279
|
+
".glow-yellow": {
|
|
280
|
+
"box-shadow": "0 0 20px hsl(var(--primary) / 0.2)",
|
|
281
|
+
},
|
|
282
|
+
".glow-yellow-strong": {
|
|
283
|
+
"box-shadow": "0 0 40px hsl(var(--primary) / 0.3)",
|
|
284
|
+
},
|
|
285
|
+
".text-glow-yellow": {
|
|
286
|
+
"text-shadow": "0 0 20px hsl(var(--primary) / 0.3)",
|
|
287
|
+
},
|
|
288
|
+
});
|
|
289
|
+
|
|
290
|
+
// Gradient line decorators
|
|
291
|
+
addUtilities({
|
|
292
|
+
".gradient-line-h": {
|
|
293
|
+
height: "1px",
|
|
294
|
+
background:
|
|
295
|
+
"linear-gradient(90deg, transparent 0%, hsl(var(--primary)) 50%, transparent 100%)",
|
|
296
|
+
},
|
|
297
|
+
".gradient-line-v": {
|
|
298
|
+
width: "1px",
|
|
299
|
+
background:
|
|
300
|
+
"linear-gradient(180deg, transparent 0%, hsl(var(--primary)) 50%, transparent 100%)",
|
|
301
|
+
},
|
|
302
|
+
});
|
|
303
|
+
}),
|
|
304
|
+
],
|
|
118
305
|
};
|
|
119
306
|
|
|
120
307
|
export default reendPreset;
|