@7onic-ui/tokens 0.2.1 → 0.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/cli/sync.js +197 -15
- package/css/variables.css +9 -0
- package/figma-tokens.json +12 -0
- package/js/index.js +6 -1
- package/js/index.mjs +6 -1
- package/json/tokens.json +5 -2
- package/llms.txt +1990 -246
- package/package.json +1 -1
- package/tailwind/v3-preset.js +7 -0
- package/tailwind/v4-theme.css +8 -0
- package/types/index.d.ts +2 -1
package/cli/sync.js
CHANGED
|
@@ -319,7 +319,7 @@ var KNOWN_ORDERS = {
|
|
|
319
319
|
fontSize: ["2xs", "xs", "sm", "md", "base", "lg", "xl", "2xl", "3xl", "4xl", "5xl"],
|
|
320
320
|
borderRadius: ["none", "sm", "base", "md", "lg", "xl", "2xl", "3xl", "full"],
|
|
321
321
|
shadow: ["xs", "sm", "md", "lg", "xl", "primary-glow"],
|
|
322
|
-
iconSize: ["xs", "sm", "md", "lg", "xl"],
|
|
322
|
+
iconSize: ["2xs", "xs", "sm", "md", "lg", "xl"],
|
|
323
323
|
zIndex: ["0", "10", "20", "30", "40", "50", "sticky", "dropdown", "overlay", "modal", "popover", "tooltip", "toast"],
|
|
324
324
|
duration: ["instant", "fast", "micro", "normal", "slow", "slower", "slowest"],
|
|
325
325
|
easing: ["linear", "ease", "easeIn", "easeOut", "easeInOut"],
|
|
@@ -385,21 +385,23 @@ function readAnimationTokens(tokens) {
|
|
|
385
385
|
const durationVar = `var(--duration-${durationKey})`;
|
|
386
386
|
const easingVar = `var(--easing-${camelToKebab(easingKey)})`;
|
|
387
387
|
const animationType = ext?.animationType;
|
|
388
|
-
if (animationType === "spin") {
|
|
389
|
-
result.push({ name, type:
|
|
388
|
+
if (animationType === "spin" || animationType === "progress-stripe" || animationType === "spinner-orbit" || animationType === "spinner-dot" || animationType === "spinner-bar" || animationType === "spinner-morph" || animationType === "skeleton-pulse" || animationType === "skeleton-wave" || animationType === "typing-cursor") {
|
|
389
|
+
result.push({ name, type: animationType, opacity: "", scale: "", translateX: "", translateXNegative: false, translateY: "", translateYNegative: false, heightVar: "", durationVar, easingVar });
|
|
390
390
|
continue;
|
|
391
391
|
}
|
|
392
392
|
if (animationType === "height-expand" || animationType === "height-collapse") {
|
|
393
|
-
result.push({ name, type: animationType, opacity: "", scale: "", translateY: "", translateYNegative: false, heightVar: val.heightVar, durationVar, easingVar });
|
|
393
|
+
result.push({ name, type: animationType, opacity: "", scale: "", translateX: "", translateXNegative: false, translateY: "", translateYNegative: false, heightVar: val.heightVar, durationVar, easingVar });
|
|
394
394
|
continue;
|
|
395
395
|
}
|
|
396
396
|
const direction = ext?.direction;
|
|
397
397
|
const type = direction === "exit" ? "exit" : "enter";
|
|
398
398
|
const opacityRaw = val.opacity ? resolveRef(val.opacity, p) : "";
|
|
399
399
|
const scaleRaw = val.scale ? resolveRef(val.scale, p) : "";
|
|
400
|
+
const translateXRaw = val.translateX ? val.translateX.startsWith("{") ? resolveRef(val.translateX, p) : val.translateX : "";
|
|
401
|
+
const translateXNegative = ext?.translateXNegative === true;
|
|
400
402
|
const translateYRaw = val.translateY ? resolveRef(val.translateY, p) : "";
|
|
401
403
|
const translateYNegative = ext?.translateYNegative === true;
|
|
402
|
-
result.push({ name, type, opacity: opacityRaw, scale: scaleRaw, translateY: translateYRaw, translateYNegative, heightVar: "", durationVar, easingVar });
|
|
404
|
+
result.push({ name, type, opacity: opacityRaw, scale: scaleRaw, translateX: translateXRaw, translateXNegative, translateY: translateYRaw, translateYNegative, heightVar: "", durationVar, easingVar });
|
|
403
405
|
}
|
|
404
406
|
return result.length > 0 ? result : null;
|
|
405
407
|
}
|
|
@@ -414,6 +416,11 @@ function extractRefKey(ref) {
|
|
|
414
416
|
const match = ref.match(/^\{primitive\.\w+\.(\w+)\}$/);
|
|
415
417
|
return match ? match[1] : ref;
|
|
416
418
|
}
|
|
419
|
+
function formatTranslateVal(raw, negative) {
|
|
420
|
+
const sign = negative ? "-" : "";
|
|
421
|
+
if (/[%a-z]/i.test(raw)) return `${sign}${raw}`;
|
|
422
|
+
return `${sign}${raw}px`;
|
|
423
|
+
}
|
|
417
424
|
function generateAnimationCss(a, format) {
|
|
418
425
|
const lines = [];
|
|
419
426
|
if (a.type === "spin") {
|
|
@@ -430,6 +437,120 @@ function generateAnimationCss(a, format) {
|
|
|
430
437
|
lines.push(`}`);
|
|
431
438
|
return lines.join("\n");
|
|
432
439
|
}
|
|
440
|
+
if (a.type === "spinner-orbit") {
|
|
441
|
+
lines.push(`@keyframes ${a.name} {`);
|
|
442
|
+
lines.push(` from { transform: rotateY(0deg); }`);
|
|
443
|
+
lines.push(` to { transform: rotateY(360deg); }`);
|
|
444
|
+
lines.push(`}`);
|
|
445
|
+
if (format === "v4") {
|
|
446
|
+
lines.push(`@utility animate-${a.name} {`);
|
|
447
|
+
} else {
|
|
448
|
+
lines.push(`.animate-${a.name} {`);
|
|
449
|
+
}
|
|
450
|
+
lines.push(` animation: ${a.name} ${a.durationVar} ${a.easingVar} infinite;`);
|
|
451
|
+
lines.push(`}`);
|
|
452
|
+
return lines.join("\n");
|
|
453
|
+
}
|
|
454
|
+
if (a.type === "spinner-dot") {
|
|
455
|
+
lines.push(`@keyframes ${a.name} {`);
|
|
456
|
+
lines.push(` 0%, 100% { opacity: 0.2; }`);
|
|
457
|
+
lines.push(` 50% { opacity: 1; }`);
|
|
458
|
+
lines.push(`}`);
|
|
459
|
+
if (format === "v4") {
|
|
460
|
+
lines.push(`@utility animate-${a.name} {`);
|
|
461
|
+
} else {
|
|
462
|
+
lines.push(`.animate-${a.name} {`);
|
|
463
|
+
}
|
|
464
|
+
lines.push(` animation: ${a.name} ${a.durationVar} ${a.easingVar} infinite;`);
|
|
465
|
+
lines.push(`}`);
|
|
466
|
+
return lines.join("\n");
|
|
467
|
+
}
|
|
468
|
+
if (a.type === "spinner-bar") {
|
|
469
|
+
lines.push(`@keyframes ${a.name} {`);
|
|
470
|
+
lines.push(` 0%, 100% { transform: scaleY(0.4); }`);
|
|
471
|
+
lines.push(` 50% { transform: scaleY(1); }`);
|
|
472
|
+
lines.push(`}`);
|
|
473
|
+
if (format === "v4") {
|
|
474
|
+
lines.push(`@utility animate-${a.name} {`);
|
|
475
|
+
} else {
|
|
476
|
+
lines.push(`.animate-${a.name} {`);
|
|
477
|
+
}
|
|
478
|
+
lines.push(` animation: ${a.name} ${a.durationVar} ${a.easingVar} infinite;`);
|
|
479
|
+
lines.push(`}`);
|
|
480
|
+
return lines.join("\n");
|
|
481
|
+
}
|
|
482
|
+
if (a.type === "spinner-morph") {
|
|
483
|
+
lines.push(`@keyframes ${a.name} {`);
|
|
484
|
+
lines.push(` 0%, 100% { border-radius: 50%; transform: rotateY(0deg) rotate(0deg); }`);
|
|
485
|
+
lines.push(` 25% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; transform: rotateY(90deg) rotate(90deg); }`);
|
|
486
|
+
lines.push(` 50% { border-radius: 50%; transform: rotateY(180deg) rotate(180deg); }`);
|
|
487
|
+
lines.push(` 75% { border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%; transform: rotateY(270deg) rotate(270deg); }`);
|
|
488
|
+
lines.push(`}`);
|
|
489
|
+
if (format === "v4") {
|
|
490
|
+
lines.push(`@utility animate-${a.name} {`);
|
|
491
|
+
} else {
|
|
492
|
+
lines.push(`.animate-${a.name} {`);
|
|
493
|
+
}
|
|
494
|
+
lines.push(` animation: ${a.name} ${a.durationVar} ${a.easingVar} infinite;`);
|
|
495
|
+
lines.push(`}`);
|
|
496
|
+
return lines.join("\n");
|
|
497
|
+
}
|
|
498
|
+
if (a.type === "skeleton-pulse") {
|
|
499
|
+
lines.push(`@keyframes ${a.name} {`);
|
|
500
|
+
lines.push(` 0%, 100% { opacity: 1; }`);
|
|
501
|
+
lines.push(` 50% { opacity: 0.4; }`);
|
|
502
|
+
lines.push(`}`);
|
|
503
|
+
if (format === "v4") {
|
|
504
|
+
lines.push(`@utility animate-${a.name} {`);
|
|
505
|
+
} else {
|
|
506
|
+
lines.push(`.animate-${a.name} {`);
|
|
507
|
+
}
|
|
508
|
+
lines.push(` animation: ${a.name} ${a.durationVar} ${a.easingVar} infinite;`);
|
|
509
|
+
lines.push(`}`);
|
|
510
|
+
return lines.join("\n");
|
|
511
|
+
}
|
|
512
|
+
if (a.type === "skeleton-wave") {
|
|
513
|
+
lines.push(`@keyframes ${a.name} {`);
|
|
514
|
+
lines.push(` 0% { transform: translateX(-100%); }`);
|
|
515
|
+
lines.push(` 100% { transform: translateX(100%); }`);
|
|
516
|
+
lines.push(`}`);
|
|
517
|
+
if (format === "v4") {
|
|
518
|
+
lines.push(`@utility animate-${a.name} {`);
|
|
519
|
+
} else {
|
|
520
|
+
lines.push(`.animate-${a.name} {`);
|
|
521
|
+
}
|
|
522
|
+
lines.push(` animation: ${a.name} ${a.durationVar} ${a.easingVar} infinite;`);
|
|
523
|
+
lines.push(`}`);
|
|
524
|
+
return lines.join("\n");
|
|
525
|
+
}
|
|
526
|
+
if (a.type === "typing-cursor") {
|
|
527
|
+
lines.push(`@keyframes ${a.name} {`);
|
|
528
|
+
lines.push(` 0%, 100% { opacity: 1; }`);
|
|
529
|
+
lines.push(` 50% { opacity: 0.4; }`);
|
|
530
|
+
lines.push(`}`);
|
|
531
|
+
if (format === "v4") {
|
|
532
|
+
lines.push(`@utility animate-${a.name} {`);
|
|
533
|
+
} else {
|
|
534
|
+
lines.push(`.animate-${a.name} {`);
|
|
535
|
+
}
|
|
536
|
+
lines.push(` animation: ${a.name} ${a.durationVar} ${a.easingVar} infinite;`);
|
|
537
|
+
lines.push(`}`);
|
|
538
|
+
return lines.join("\n");
|
|
539
|
+
}
|
|
540
|
+
if (a.type === "progress-stripe") {
|
|
541
|
+
lines.push(`@keyframes ${a.name} {`);
|
|
542
|
+
lines.push(` from { background-position: 1rem 0; }`);
|
|
543
|
+
lines.push(` to { background-position: 0 0; }`);
|
|
544
|
+
lines.push(`}`);
|
|
545
|
+
if (format === "v4") {
|
|
546
|
+
lines.push(`@utility animate-${a.name} {`);
|
|
547
|
+
} else {
|
|
548
|
+
lines.push(`.animate-${a.name} {`);
|
|
549
|
+
}
|
|
550
|
+
lines.push(` animation: ${a.name} ${a.durationVar} ${a.easingVar} infinite;`);
|
|
551
|
+
lines.push(`}`);
|
|
552
|
+
return lines.join("\n");
|
|
553
|
+
}
|
|
433
554
|
if (a.type === "height-expand" || a.type === "height-collapse") {
|
|
434
555
|
const isExpand = a.type === "height-expand";
|
|
435
556
|
lines.push(`@keyframes ${a.name} {`);
|
|
@@ -449,10 +570,15 @@ function generateAnimationCss(a, format) {
|
|
|
449
570
|
fromT.push(isEnter ? `scale(${a.scale})` : "scale(1)");
|
|
450
571
|
toT.push(isEnter ? "scale(1)" : `scale(${a.scale})`);
|
|
451
572
|
}
|
|
573
|
+
if (a.translateX) {
|
|
574
|
+
const v = formatTranslateVal(a.translateX, a.translateXNegative);
|
|
575
|
+
fromT.push(isEnter ? `translateX(${v})` : "translateX(0)");
|
|
576
|
+
toT.push(isEnter ? "translateX(0)" : `translateX(${v})`);
|
|
577
|
+
}
|
|
452
578
|
if (a.translateY) {
|
|
453
|
-
const
|
|
454
|
-
fromT.push(isEnter ? `translateY(${
|
|
455
|
-
toT.push(isEnter ? "translateY(0)" : `translateY(${
|
|
579
|
+
const v = formatTranslateVal(a.translateY, a.translateYNegative);
|
|
580
|
+
fromT.push(isEnter ? `translateY(${v})` : "translateY(0)");
|
|
581
|
+
toT.push(isEnter ? "translateY(0)" : `translateY(${v})`);
|
|
456
582
|
}
|
|
457
583
|
if (fromT.length) {
|
|
458
584
|
fromProps.push(`transform: ${fromT.join(" ")}`);
|
|
@@ -1088,6 +1214,7 @@ function generateJsTokens(tokens) {
|
|
|
1088
1214
|
};
|
|
1089
1215
|
if (val.opacity) obj.opacity = resolveRef(val.opacity, p);
|
|
1090
1216
|
if (val.scale) obj.scale = resolveRef(val.scale, p);
|
|
1217
|
+
if (val.translateX) obj.translateX = val.translateX.startsWith("{") ? resolveRef(val.translateX, p) : val.translateX;
|
|
1091
1218
|
if (val.translateY) obj.translateY = resolveRef(val.translateY, p);
|
|
1092
1219
|
if (val.heightVar) obj.heightVar = val.heightVar;
|
|
1093
1220
|
animData[name] = obj;
|
|
@@ -1285,6 +1412,7 @@ function generateTypeDefinitions(tokens) {
|
|
|
1285
1412
|
const fields = ["duration: string", "easing: string"];
|
|
1286
1413
|
if (val.opacity) fields.unshift("opacity: string");
|
|
1287
1414
|
if (val.scale) fields.unshift("scale: string");
|
|
1415
|
+
if (val.translateX) fields.unshift("translateX: string");
|
|
1288
1416
|
if (val.translateY) fields.unshift("translateY: string");
|
|
1289
1417
|
if (val.heightVar) fields.unshift("heightVar: string");
|
|
1290
1418
|
lines.push(` '${name}': { ${fields.join("; ")} };`);
|
|
@@ -1552,6 +1680,7 @@ function generateNormalizedJson(tokens) {
|
|
|
1552
1680
|
animFlat[`${name}-easing`] = easingRaw;
|
|
1553
1681
|
if (val.opacity) animFlat[`${name}-opacity`] = resolveRef(val.opacity, p);
|
|
1554
1682
|
if (val.scale) animFlat[`${name}-scale`] = resolveRef(val.scale, p);
|
|
1683
|
+
if (val.translateX) animFlat[`${name}-translateX`] = val.translateX.startsWith("{") ? resolveRef(val.translateX, p) : val.translateX;
|
|
1555
1684
|
if (val.translateY) animFlat[`${name}-translateY`] = resolveRef(val.translateY, p);
|
|
1556
1685
|
if (val.heightVar) animFlat[`${name}-heightVar`] = val.heightVar;
|
|
1557
1686
|
}
|
|
@@ -1796,6 +1925,53 @@ function generateV3Preset(tokens) {
|
|
|
1796
1925
|
lines.push(` from: { height: '${isExpand ? "0" : `var(${a.heightVar})`}' },`);
|
|
1797
1926
|
lines.push(` to: { height: '${isExpand ? `var(${a.heightVar})` : "0"}' },`);
|
|
1798
1927
|
lines.push(` },`);
|
|
1928
|
+
} else if (a.type === "spin") {
|
|
1929
|
+
lines.push(` '${a.name}': {`);
|
|
1930
|
+
lines.push(` from: { 'transform': 'rotate(0deg)' },`);
|
|
1931
|
+
lines.push(` to: { 'transform': 'rotate(360deg)' },`);
|
|
1932
|
+
lines.push(` },`);
|
|
1933
|
+
} else if (a.type === "progress-stripe") {
|
|
1934
|
+
lines.push(` '${a.name}': {`);
|
|
1935
|
+
lines.push(` from: { 'background-position': '1rem 0' },`);
|
|
1936
|
+
lines.push(` to: { 'background-position': '0 0' },`);
|
|
1937
|
+
lines.push(` },`);
|
|
1938
|
+
} else if (a.type === "spinner-orbit") {
|
|
1939
|
+
lines.push(` '${a.name}': {`);
|
|
1940
|
+
lines.push(` from: { 'transform': 'rotateY(0deg)' },`);
|
|
1941
|
+
lines.push(` to: { 'transform': 'rotateY(360deg)' },`);
|
|
1942
|
+
lines.push(` },`);
|
|
1943
|
+
} else if (a.type === "spinner-dot") {
|
|
1944
|
+
lines.push(` '${a.name}': {`);
|
|
1945
|
+
lines.push(` '0%, 100%': { 'opacity': '0.2' },`);
|
|
1946
|
+
lines.push(` '50%': { 'opacity': '1' },`);
|
|
1947
|
+
lines.push(` },`);
|
|
1948
|
+
} else if (a.type === "spinner-bar") {
|
|
1949
|
+
lines.push(` '${a.name}': {`);
|
|
1950
|
+
lines.push(` '0%, 100%': { 'transform': 'scaleY(0.4)' },`);
|
|
1951
|
+
lines.push(` '50%': { 'transform': 'scaleY(1)' },`);
|
|
1952
|
+
lines.push(` },`);
|
|
1953
|
+
} else if (a.type === "spinner-morph") {
|
|
1954
|
+
lines.push(` '${a.name}': {`);
|
|
1955
|
+
lines.push(` '0%, 100%': { 'border-radius': '50%', 'transform': 'rotateY(0deg) rotate(0deg)' },`);
|
|
1956
|
+
lines.push(` '25%': { 'border-radius': '30% 70% 70% 30% / 30% 30% 70% 70%', 'transform': 'rotateY(90deg) rotate(90deg)' },`);
|
|
1957
|
+
lines.push(` '50%': { 'border-radius': '50%', 'transform': 'rotateY(180deg) rotate(180deg)' },`);
|
|
1958
|
+
lines.push(` '75%': { 'border-radius': '70% 30% 30% 70% / 70% 70% 30% 30%', 'transform': 'rotateY(270deg) rotate(270deg)' },`);
|
|
1959
|
+
lines.push(` },`);
|
|
1960
|
+
} else if (a.type === "skeleton-pulse") {
|
|
1961
|
+
lines.push(` '${a.name}': {`);
|
|
1962
|
+
lines.push(` '0%, 100%': { 'opacity': '1' },`);
|
|
1963
|
+
lines.push(` '50%': { 'opacity': '0.4' },`);
|
|
1964
|
+
lines.push(` },`);
|
|
1965
|
+
} else if (a.type === "skeleton-wave") {
|
|
1966
|
+
lines.push(` '${a.name}': {`);
|
|
1967
|
+
lines.push(` '0%': { 'transform': 'translateX(-100%)' },`);
|
|
1968
|
+
lines.push(` '100%': { 'transform': 'translateX(100%)' },`);
|
|
1969
|
+
lines.push(` },`);
|
|
1970
|
+
} else if (a.type === "typing-cursor") {
|
|
1971
|
+
lines.push(` '${a.name}': {`);
|
|
1972
|
+
lines.push(` '0%, 100%': { 'opacity': '1' },`);
|
|
1973
|
+
lines.push(` '50%': { 'opacity': '0.4' },`);
|
|
1974
|
+
lines.push(` },`);
|
|
1799
1975
|
} else {
|
|
1800
1976
|
const isEnter = a.type === "enter";
|
|
1801
1977
|
const fromProps = [];
|
|
@@ -1809,10 +1985,15 @@ function generateV3Preset(tokens) {
|
|
|
1809
1985
|
fromT.push(isEnter ? `scale(${a.scale})` : "scale(1)");
|
|
1810
1986
|
toT.push(isEnter ? "scale(1)" : `scale(${a.scale})`);
|
|
1811
1987
|
}
|
|
1988
|
+
if (a.translateX) {
|
|
1989
|
+
const v = formatTranslateVal(a.translateX, a.translateXNegative);
|
|
1990
|
+
fromT.push(isEnter ? `translateX(${v})` : "translateX(0)");
|
|
1991
|
+
toT.push(isEnter ? "translateX(0)" : `translateX(${v})`);
|
|
1992
|
+
}
|
|
1812
1993
|
if (a.translateY) {
|
|
1813
|
-
const
|
|
1814
|
-
fromT.push(isEnter ? `translateY(${
|
|
1815
|
-
toT.push(isEnter ? "translateY(0)" : `translateY(${
|
|
1994
|
+
const v = formatTranslateVal(a.translateY, a.translateYNegative);
|
|
1995
|
+
fromT.push(isEnter ? `translateY(${v})` : "translateY(0)");
|
|
1996
|
+
toT.push(isEnter ? "translateY(0)" : `translateY(${v})`);
|
|
1816
1997
|
}
|
|
1817
1998
|
if (fromT.length) {
|
|
1818
1999
|
fromProps.push(`'transform': '${fromT.join(" ")}'`);
|
|
@@ -1827,10 +2008,11 @@ function generateV3Preset(tokens) {
|
|
|
1827
2008
|
}
|
|
1828
2009
|
lines.push(` },`);
|
|
1829
2010
|
lines.push(``);
|
|
2011
|
+
const infiniteTypes = /* @__PURE__ */ new Set(["spin", "progress-stripe", "spinner-orbit", "spinner-dot", "spinner-bar", "spinner-morph", "skeleton-pulse", "skeleton-wave", "typing-cursor"]);
|
|
1830
2012
|
lines.push(` animation: {`);
|
|
1831
2013
|
if (v3Anim) {
|
|
1832
2014
|
for (const a of v3Anim) {
|
|
1833
|
-
const infinite = a.type
|
|
2015
|
+
const infinite = infiniteTypes.has(a.type) ? " infinite" : "";
|
|
1834
2016
|
lines.push(` '${a.name}': '${a.name} ${a.durationVar} ${a.easingVar}${infinite}',`);
|
|
1835
2017
|
}
|
|
1836
2018
|
}
|
|
@@ -1838,10 +2020,10 @@ function generateV3Preset(tokens) {
|
|
|
1838
2020
|
lines.push(` },`);
|
|
1839
2021
|
lines.push(` },`);
|
|
1840
2022
|
lines.push(` plugins: [`);
|
|
1841
|
-
lines.push(` // Icon size utilities
|
|
2023
|
+
lines.push(` // Icon size utilities`);
|
|
1842
2024
|
lines.push(` function({ addUtilities }) {`);
|
|
1843
2025
|
lines.push(` addUtilities({`);
|
|
1844
|
-
for (const name of
|
|
2026
|
+
for (const name of KNOWN_ORDERS.iconSize) {
|
|
1845
2027
|
lines.push(` '.icon-${name}': { width: 'var(--icon-size-${name})', height: 'var(--icon-size-${name})' },`);
|
|
1846
2028
|
}
|
|
1847
2029
|
lines.push(` })`);
|
|
@@ -1867,7 +2049,7 @@ function generateV3Preset(tokens) {
|
|
|
1867
2049
|
lines.push(` function({ addUtilities }) {`);
|
|
1868
2050
|
lines.push(` addUtilities({`);
|
|
1869
2051
|
for (const a of v3Anim) {
|
|
1870
|
-
const infinite = a.type
|
|
2052
|
+
const infinite = infiniteTypes.has(a.type) ? " infinite" : "";
|
|
1871
2053
|
lines.push(` '.animate-${a.name}': { 'animation': '${a.name} ${a.durationVar} ${a.easingVar}${infinite}' },`);
|
|
1872
2054
|
}
|
|
1873
2055
|
lines.push(` })`);
|
package/css/variables.css
CHANGED
|
@@ -247,6 +247,7 @@
|
|
|
247
247
|
--spacing-2: 0.5rem; /* 8px */
|
|
248
248
|
--spacing-2-5: 0.625rem; /* 10px */
|
|
249
249
|
--spacing-3: 0.75rem; /* 12px */
|
|
250
|
+
--spacing-3-5: 0.875rem; /* 14px */
|
|
250
251
|
--spacing-4: 1rem; /* 16px */
|
|
251
252
|
--spacing-5: 1.25rem; /* 20px */
|
|
252
253
|
--spacing-6: 1.5rem; /* 24px */
|
|
@@ -922,3 +923,11 @@
|
|
|
922
923
|
.animate-skeleton-wave {
|
|
923
924
|
animation: skeleton-wave var(--duration-spin) var(--easing-linear) infinite;
|
|
924
925
|
}
|
|
926
|
+
|
|
927
|
+
@keyframes typing-cursor {
|
|
928
|
+
0%, 100% { opacity: 1; }
|
|
929
|
+
50% { opacity: 0.4; }
|
|
930
|
+
}
|
|
931
|
+
.animate-typing-cursor {
|
|
932
|
+
animation: typing-cursor var(--duration-spin) var(--easing-ease-in-out) infinite;
|
|
933
|
+
}
|
package/figma-tokens.json
CHANGED
|
@@ -459,6 +459,10 @@
|
|
|
459
459
|
"value": "12",
|
|
460
460
|
"type": "spacing"
|
|
461
461
|
},
|
|
462
|
+
"3.5": {
|
|
463
|
+
"value": "14",
|
|
464
|
+
"type": "spacing"
|
|
465
|
+
},
|
|
462
466
|
"4": {
|
|
463
467
|
"value": "16",
|
|
464
468
|
"type": "spacing"
|
|
@@ -1548,6 +1552,14 @@
|
|
|
1548
1552
|
},
|
|
1549
1553
|
"type": "composition",
|
|
1550
1554
|
"$extensions": { "animationType": "skeleton-wave" }
|
|
1555
|
+
},
|
|
1556
|
+
"typing-cursor": {
|
|
1557
|
+
"value": {
|
|
1558
|
+
"duration": "{primitive.duration.spin}",
|
|
1559
|
+
"easing": "{primitive.easing.easeInOut}"
|
|
1560
|
+
},
|
|
1561
|
+
"type": "composition",
|
|
1562
|
+
"$extensions": { "animationType": "typing-cursor" }
|
|
1551
1563
|
}
|
|
1552
1564
|
},
|
|
1553
1565
|
"componentSize": {
|
package/js/index.js
CHANGED
|
@@ -123,7 +123,8 @@ const tokens = {
|
|
|
123
123
|
"24": "6rem",
|
|
124
124
|
"0.5": "0.125rem",
|
|
125
125
|
"1.5": "0.375rem",
|
|
126
|
-
"2.5": "0.625rem"
|
|
126
|
+
"2.5": "0.625rem",
|
|
127
|
+
"3.5": "0.875rem"
|
|
127
128
|
},
|
|
128
129
|
"fontSize": {
|
|
129
130
|
"2xs": {
|
|
@@ -608,6 +609,10 @@ const tokens = {
|
|
|
608
609
|
"skeleton-wave": {
|
|
609
610
|
"duration": "1000ms",
|
|
610
611
|
"easing": "linear"
|
|
612
|
+
},
|
|
613
|
+
"typing-cursor": {
|
|
614
|
+
"duration": "1000ms",
|
|
615
|
+
"easing": "ease-in-out"
|
|
611
616
|
}
|
|
612
617
|
},
|
|
613
618
|
"typography": {
|
package/js/index.mjs
CHANGED
|
@@ -122,7 +122,8 @@ const tokens = {
|
|
|
122
122
|
"24": "6rem",
|
|
123
123
|
"0.5": "0.125rem",
|
|
124
124
|
"1.5": "0.375rem",
|
|
125
|
-
"2.5": "0.625rem"
|
|
125
|
+
"2.5": "0.625rem",
|
|
126
|
+
"3.5": "0.875rem"
|
|
126
127
|
},
|
|
127
128
|
"fontSize": {
|
|
128
129
|
"2xs": {
|
|
@@ -607,6 +608,10 @@ const tokens = {
|
|
|
607
608
|
"skeleton-wave": {
|
|
608
609
|
"duration": "1000ms",
|
|
609
610
|
"easing": "linear"
|
|
611
|
+
},
|
|
612
|
+
"typing-cursor": {
|
|
613
|
+
"duration": "1000ms",
|
|
614
|
+
"easing": "ease-in-out"
|
|
610
615
|
}
|
|
611
616
|
},
|
|
612
617
|
"typography": {
|
package/json/tokens.json
CHANGED
|
@@ -101,7 +101,8 @@
|
|
|
101
101
|
"24": "6rem",
|
|
102
102
|
"0.5": "0.125rem",
|
|
103
103
|
"1.5": "0.375rem",
|
|
104
|
-
"2.5": "0.625rem"
|
|
104
|
+
"2.5": "0.625rem",
|
|
105
|
+
"3.5": "0.875rem"
|
|
105
106
|
},
|
|
106
107
|
"fontSize": {
|
|
107
108
|
"2xs": "0.6875rem",
|
|
@@ -442,6 +443,8 @@
|
|
|
442
443
|
"skeleton-pulse-duration": "1000ms",
|
|
443
444
|
"skeleton-pulse-easing": "ease-in-out",
|
|
444
445
|
"skeleton-wave-duration": "1000ms",
|
|
445
|
-
"skeleton-wave-easing": "linear"
|
|
446
|
+
"skeleton-wave-easing": "linear",
|
|
447
|
+
"typing-cursor-duration": "1000ms",
|
|
448
|
+
"typing-cursor-easing": "ease-in-out"
|
|
446
449
|
}
|
|
447
450
|
}
|