@averoui/tokens 1.0.1 → 2.1.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@averoui/tokens",
3
- "version": "1.0.1",
3
+ "version": "2.1.0",
4
4
  "type": "module",
5
5
  "description": "Avero design tokens: Tailwind CSS v4 theme, base styles, utilities and token data.",
6
6
  "sideEffects": [
@@ -82,6 +82,11 @@ export type TokenName =
82
82
  | "animationSway"
83
83
  | "animationShimmer"
84
84
  | "animationSpinGlow"
85
+ | "animationSpinnerDot"
86
+ | "animationSpinnerBar"
87
+ | "animationSpinnerSpoke"
88
+ | "animationCheckDraw"
89
+ | "animationCheckPop"
85
90
  | "animationAccordionDown"
86
91
  | "animationAccordionUp"
87
92
  | "zIndexRaised"
@@ -328,6 +328,26 @@ export const tokens = {
328
328
  "cssVar": "--animate-spin-glow",
329
329
  "value": "spin-glow 1.5s cubic-bezier(0.5, 0, 0.5, 1) infinite"
330
330
  },
331
+ "animationSpinnerDot": {
332
+ "cssVar": "--animate-spinner-dot",
333
+ "value": "spinner-dot 1.2s ease-in-out infinite"
334
+ },
335
+ "animationSpinnerBar": {
336
+ "cssVar": "--animate-spinner-bar",
337
+ "value": "spinner-bar 1s ease-in-out infinite"
338
+ },
339
+ "animationSpinnerSpoke": {
340
+ "cssVar": "--animate-spinner-spoke",
341
+ "value": "spinner-spoke 1s linear infinite"
342
+ },
343
+ "animationCheckDraw": {
344
+ "cssVar": "--animate-check-draw",
345
+ "value": "check-draw 0.2s ease-out 0.03s both"
346
+ },
347
+ "animationCheckPop": {
348
+ "cssVar": "--animate-check-pop",
349
+ "value": "check-pop 0.18s ease-out"
350
+ },
331
351
  "animationAccordionDown": {
332
352
  "cssVar": "--animate-accordion-down",
333
353
  "value": "accordion-down 0.3s ease-in-out"
@@ -494,6 +514,11 @@ export const tokenGroups = {
494
514
  "sway",
495
515
  "shimmer",
496
516
  "spin-glow",
517
+ "spinner-dot",
518
+ "spinner-bar",
519
+ "spinner-spoke",
520
+ "check-draw",
521
+ "check-pop",
497
522
  "accordion-down",
498
523
  "accordion-up"
499
524
  ],
@@ -272,6 +272,21 @@
272
272
  "spin-glow": {
273
273
  "$value": "spin-glow 1.5s cubic-bezier(0.5, 0, 0.5, 1) infinite"
274
274
  },
275
+ "spinner-dot": {
276
+ "$value": "spinner-dot 1.2s ease-in-out infinite"
277
+ },
278
+ "spinner-bar": {
279
+ "$value": "spinner-bar 1s ease-in-out infinite"
280
+ },
281
+ "spinner-spoke": {
282
+ "$value": "spinner-spoke 1s linear infinite"
283
+ },
284
+ "check-draw": {
285
+ "$value": "check-draw 0.2s ease-out 0.03s both"
286
+ },
287
+ "check-pop": {
288
+ "$value": "check-pop 0.18s ease-out"
289
+ },
275
290
  "accordion-down": {
276
291
  "$value": "accordion-down 0.3s ease-in-out"
277
292
  },
package/src/theme.css CHANGED
@@ -129,6 +129,13 @@
129
129
  --animate-sway: sway 3s ease-in-out forwards;
130
130
  --animate-shimmer: shimmer 1.6s linear infinite;
131
131
  --animate-spin-glow: spin-glow 1.5s cubic-bezier(0.5, 0, 0.5, 1) infinite;
132
+ /* Spinner parts. Each part runs the same cycle; the component offsets them with negative delays. */
133
+ --animate-spinner-dot: spinner-dot 1.2s ease-in-out infinite;
134
+ --animate-spinner-bar: spinner-bar 1s ease-in-out infinite;
135
+ --animate-spinner-spoke: spinner-spoke 1s linear infinite;
136
+ /* Checkbox: the tick draws itself in and the filled box pops, over roughly one Button press. */
137
+ --animate-check-draw: check-draw 0.2s ease-out 0.03s both;
138
+ --animate-check-pop: check-pop 0.18s ease-out;
132
139
  /* Accordion open/close: height and opacity animate over 300ms ease-in-out. */
133
140
  --animate-accordion-down: accordion-down 0.3s ease-in-out;
134
141
  --animate-accordion-up: accordion-up 0.3s ease-in-out;
@@ -237,6 +244,64 @@
237
244
  }
238
245
  }
239
246
 
247
+ @keyframes spinner-dot {
248
+ 0%,
249
+ 80%,
250
+ to {
251
+ opacity: 0.35;
252
+ transform: scale(0.6);
253
+ }
254
+ 40% {
255
+ opacity: 1;
256
+ transform: scale(1);
257
+ }
258
+ }
259
+
260
+ @keyframes spinner-bar {
261
+ 0%,
262
+ to {
263
+ transform: scaleY(0.35);
264
+ }
265
+ 50% {
266
+ transform: scaleY(1);
267
+ }
268
+ }
269
+
270
+ @keyframes spinner-spoke {
271
+ 0% {
272
+ opacity: 1;
273
+ }
274
+ to {
275
+ opacity: 0.15;
276
+ }
277
+ }
278
+
279
+ /* The check path is under 24 units long, so a 24-unit dash covers it. Starting the offset at -24
280
+ reveals the path from its end, which on the check glyph is the short leg: the order a hand draws
281
+ it. */
282
+ @keyframes check-draw {
283
+ from {
284
+ stroke-dasharray: 24;
285
+ stroke-dashoffset: -24;
286
+ }
287
+ to {
288
+ stroke-dasharray: 24;
289
+ stroke-dashoffset: 0;
290
+ }
291
+ }
292
+
293
+ @keyframes check-pop {
294
+ 0% {
295
+ transform: scale(0.85);
296
+ }
297
+ 60% {
298
+ transform: scale(1.06);
299
+ }
300
+ to {
301
+ transform: scale(1);
302
+ }
303
+ }
304
+
240
305
  @keyframes spin-glow {
241
306
  0% {
242
307
  transform: rotate(0);