@zmzai/theme 0.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/LICENSE +201 -0
- package/README.md +76 -0
- package/package.json +91 -0
- package/src/brand/index.ts +3 -0
- package/src/brand/logo/Logo.tsx +46 -0
- package/src/brand/logo/favicon.png +0 -0
- package/src/brand/logo/index.ts +2 -0
- package/src/brand/logo/zmzai-logo.png +0 -0
- package/src/brand/wordmark/Wordmark.tsx +48 -0
- package/src/brand/wordmark/index.ts +2 -0
- package/src/components/aceternity-sidebar/AceternitySidebar.tsx +133 -0
- package/src/components/aceternity-sidebar/index.ts +2 -0
- package/src/components/animated-tabs/AnimatedTabs.tsx +60 -0
- package/src/components/animated-tabs/index.ts +2 -0
- package/src/components/animated-tooltip/AnimatedTooltip.tsx +93 -0
- package/src/components/animated-tooltip/index.ts +2 -0
- package/src/components/avatar/Avatar.tsx +59 -0
- package/src/components/avatar/index.ts +2 -0
- package/src/components/badge/Badge.tsx +45 -0
- package/src/components/badge/index.ts +2 -0
- package/src/components/bento-grid/BentoGrid.tsx +85 -0
- package/src/components/bento-grid/index.ts +2 -0
- package/src/components/button/Button.tsx +66 -0
- package/src/components/button/button.styles.ts +41 -0
- package/src/components/button/index.ts +4 -0
- package/src/components/card/Card.tsx +87 -0
- package/src/components/card/card.styles.ts +35 -0
- package/src/components/card/index.ts +4 -0
- package/src/components/card-3d/Card3D.tsx +84 -0
- package/src/components/card-3d/index.ts +2 -0
- package/src/components/card-hover-effect/CardHoverEffect.tsx +83 -0
- package/src/components/card-hover-effect/index.ts +2 -0
- package/src/components/card-spotlight/CardSpotlight.tsx +63 -0
- package/src/components/card-spotlight/index.ts +2 -0
- package/src/components/carousel/Carousel.tsx +79 -0
- package/src/components/carousel/index.ts +2 -0
- package/src/components/code-block/CodeBlock.tsx +153 -0
- package/src/components/code-block/index.ts +2 -0
- package/src/components/comet-card/CometCard.tsx +106 -0
- package/src/components/comet-card/index.ts +2 -0
- package/src/components/compare/Compare.tsx +128 -0
- package/src/components/compare/index.ts +2 -0
- package/src/components/dialog/Dialog.tsx +79 -0
- package/src/components/dialog/index.ts +10 -0
- package/src/components/dropdown-menu/DropdownMenu.tsx +76 -0
- package/src/components/dropdown-menu/index.ts +8 -0
- package/src/components/empty-state/EmptyState.tsx +78 -0
- package/src/components/empty-state/index.ts +2 -0
- package/src/components/encrypt-text/EncryptText.tsx +102 -0
- package/src/components/encrypt-text/index.ts +2 -0
- package/src/components/evervault-card/EvervaultCard.tsx +114 -0
- package/src/components/evervault-card/index.ts +2 -0
- package/src/components/expandable-card/ExpandableCard.tsx +91 -0
- package/src/components/expandable-card/index.ts +2 -0
- package/src/components/file-upload/FileUpload.tsx +171 -0
- package/src/components/file-upload/index.ts +2 -0
- package/src/components/flip-words/FlipWords.tsx +70 -0
- package/src/components/flip-words/index.ts +2 -0
- package/src/components/floating-navbar/FloatingNavbar.tsx +82 -0
- package/src/components/floating-navbar/index.ts +2 -0
- package/src/components/focus-cards/FocusCards.tsx +93 -0
- package/src/components/focus-cards/index.ts +2 -0
- package/src/components/glare-card/GlareCard.tsx +66 -0
- package/src/components/glare-card/index.ts +2 -0
- package/src/components/glowing-effect/GlowingEffect.tsx +68 -0
- package/src/components/glowing-effect/index.ts +2 -0
- package/src/components/hover-border-gradient/HoverBorderGradient.tsx +80 -0
- package/src/components/hover-border-gradient/index.ts +2 -0
- package/src/components/index.ts +71 -0
- package/src/components/infinite-moving-cards/InfiniteMovingCards.tsx +84 -0
- package/src/components/infinite-moving-cards/index.ts +2 -0
- package/src/components/input/Input.tsx +35 -0
- package/src/components/input/index.ts +4 -0
- package/src/components/input/input.styles.ts +34 -0
- package/src/components/keyboard/Keyboard.tsx +38 -0
- package/src/components/keyboard/index.ts +2 -0
- package/src/components/layout-grid/LayoutGrid.tsx +121 -0
- package/src/components/layout-grid/index.ts +2 -0
- package/src/components/link-preview/LinkPreview.tsx +121 -0
- package/src/components/link-preview/index.ts +2 -0
- package/src/components/loader/Loader.tsx +130 -0
- package/src/components/loader/index.ts +2 -0
- package/src/components/magnetic-button/MagneticButton.tsx +79 -0
- package/src/components/magnetic-button/index.ts +2 -0
- package/src/components/moving-border/MovingBorder.tsx +72 -0
- package/src/components/moving-border/index.ts +2 -0
- package/src/components/multi-step-loader/MultiStepLoader.tsx +95 -0
- package/src/components/multi-step-loader/index.ts +2 -0
- package/src/components/notch/Notch.tsx +47 -0
- package/src/components/notch/index.ts +2 -0
- package/src/components/select/Select.tsx +100 -0
- package/src/components/select/index.ts +10 -0
- package/src/components/skeleton/Skeleton.tsx +34 -0
- package/src/components/skeleton/index.ts +2 -0
- package/src/components/stateful-button/StatefulButton.tsx +115 -0
- package/src/components/stateful-button/index.ts +2 -0
- package/src/components/sticky-banner/StickyBanner.tsx +74 -0
- package/src/components/sticky-banner/index.ts +2 -0
- package/src/components/sticky-scroll-reveal/StickyScrollReveal.tsx +141 -0
- package/src/components/sticky-scroll-reveal/index.ts +2 -0
- package/src/components/terminal/Terminal.tsx +55 -0
- package/src/components/terminal/index.ts +2 -0
- package/src/components/text-generate/TextGenerate.tsx +59 -0
- package/src/components/text-generate/index.ts +2 -0
- package/src/components/text-hover-effect/TextHoverEffect.tsx +90 -0
- package/src/components/text-hover-effect/index.ts +2 -0
- package/src/components/textarea/Textarea.tsx +39 -0
- package/src/components/textarea/index.ts +2 -0
- package/src/components/timeline/Timeline.tsx +106 -0
- package/src/components/timeline/index.ts +3 -0
- package/src/components/tooltip/Tooltip.tsx +51 -0
- package/src/components/tooltip/index.ts +2 -0
- package/src/components/tooltip-card/TooltipCard.tsx +130 -0
- package/src/components/tooltip-card/index.ts +2 -0
- package/src/components/tracing-beam/TracingBeam.tsx +110 -0
- package/src/components/tracing-beam/index.ts +2 -0
- package/src/components/typewriter/Typewriter.tsx +69 -0
- package/src/components/typewriter/index.ts +2 -0
- package/src/components/vanish-input/VanishInput.tsx +170 -0
- package/src/components/vanish-input/index.ts +2 -0
- package/src/components/wobble-card/WobbleCard.tsx +77 -0
- package/src/components/wobble-card/index.ts +2 -0
- package/src/index.ts +21 -0
- package/src/tokens/fonts.css +42 -0
- package/src/tokens/theme.css +120 -0
- package/src/utils/cn.ts +13 -0
- package/src/utils/index.ts +2 -0
- package/src/utils/motion.ts +47 -0
- package/src/vite-env.d.ts +6 -0
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @zmzai/theme — Design Tokens
|
|
3
|
+
*
|
|
4
|
+
* Tailwind v4 @theme block. Import in your app's globals.css:
|
|
5
|
+
* @import "tailwindcss";
|
|
6
|
+
* @import "@zmzai/theme/tokens";
|
|
7
|
+
* @import "@zmzai/theme/fonts";
|
|
8
|
+
*
|
|
9
|
+
* Override --color-accent per-site for Variants:
|
|
10
|
+
* :root { --color-accent: #7C3AED; }
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
@theme {
|
|
14
|
+
/* ===== Color =====
|
|
15
|
+
纯白底 + 纯黑字。灰阶用 neutral(不暖不冷)。
|
|
16
|
+
蓝色 accent 只用于动态状态(进行中/running/聚焦/审批)。 */
|
|
17
|
+
--color-bg: #FFFFFF;
|
|
18
|
+
--color-surface: #FAFAFA;
|
|
19
|
+
--color-surface-2: #F5F5F5;
|
|
20
|
+
--color-ink: #000000;
|
|
21
|
+
--color-ink-2: #525252;
|
|
22
|
+
--color-ink-3: #A3A3A3;
|
|
23
|
+
--color-line: #E5E5E5;
|
|
24
|
+
--color-line-strong: #171717;
|
|
25
|
+
--color-accent: #2563EB;
|
|
26
|
+
--color-accent-ink: #FFFFFF;
|
|
27
|
+
--color-success: #16A34A;
|
|
28
|
+
--color-danger: #DC2626;
|
|
29
|
+
--color-warning: #CA8A04;
|
|
30
|
+
|
|
31
|
+
/* Dark surface — 仅用于代码块/preview,不是全局 dark mode */
|
|
32
|
+
--color-dark-bg: #0A0A0A;
|
|
33
|
+
--color-dark-surface: #171717;
|
|
34
|
+
--color-dark-ink: #FAFAFA;
|
|
35
|
+
--color-dark-line: #27272A;
|
|
36
|
+
|
|
37
|
+
/* ===== Fonts =====
|
|
38
|
+
英文 SF Pro(系统自带零加载),中文 MiSans(开源加载)。
|
|
39
|
+
字体栈顺序让浏览器逐字符匹配:英文命中 SF Pro,中文跳到 MiSans。 */
|
|
40
|
+
--font-sans: "MiSans", -apple-system, "SF Pro Display", "SF Pro Text",
|
|
41
|
+
"PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
|
|
42
|
+
--font-mono: "MiSans", "SF Mono", "JetBrains Mono", ui-monospace,
|
|
43
|
+
"SFMono-Regular", monospace;
|
|
44
|
+
|
|
45
|
+
/* ===== Radius ===== */
|
|
46
|
+
--radius-sm: 8px;
|
|
47
|
+
--radius: 12px;
|
|
48
|
+
--radius-lg: 16px;
|
|
49
|
+
--radius-xl: 20px;
|
|
50
|
+
--radius-pill: 9999px;
|
|
51
|
+
|
|
52
|
+
/* ===== Motion ===== */
|
|
53
|
+
--ease-out: cubic-bezier(0.16, 1, 0.3, 1);
|
|
54
|
+
--ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
|
|
55
|
+
|
|
56
|
+
/* ===== Backward-compat aliases =====
|
|
57
|
+
Maps old v1 token names → new v2 values.
|
|
58
|
+
Lets zmzai-agent's 267 existing CSS classes work without modification. */
|
|
59
|
+
--color-paper: var(--color-bg);
|
|
60
|
+
--color-muted: var(--color-ink-2);
|
|
61
|
+
--color-rule: var(--color-ink);
|
|
62
|
+
--color-surface-strong: var(--color-surface-2);
|
|
63
|
+
--color-accent-strong: var(--color-ink);
|
|
64
|
+
--font-serif: var(--font-sans);
|
|
65
|
+
--animate-dur-fast: 150ms;
|
|
66
|
+
--animate-dur-base: 250ms;
|
|
67
|
+
--animate-dur-slow: 500ms;
|
|
68
|
+
--radius-card: var(--radius);
|
|
69
|
+
--radius-input: var(--radius-sm);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
:root {
|
|
73
|
+
color-scheme: light;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
@layer base {
|
|
77
|
+
* {
|
|
78
|
+
box-sizing: border-box;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
html {
|
|
82
|
+
scroll-behavior: smooth;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
body {
|
|
86
|
+
margin: 0;
|
|
87
|
+
background: var(--color-bg);
|
|
88
|
+
color: var(--color-ink);
|
|
89
|
+
font-family: var(--font-sans);
|
|
90
|
+
font-size: 1rem;
|
|
91
|
+
line-height: 1.65;
|
|
92
|
+
text-rendering: optimizeLegibility;
|
|
93
|
+
-webkit-font-smoothing: antialiased;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
a {
|
|
97
|
+
color: inherit;
|
|
98
|
+
text-decoration: none;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
::selection {
|
|
102
|
+
background: var(--color-ink);
|
|
103
|
+
color: #fff;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
:focus-visible {
|
|
107
|
+
outline: 2px solid var(--color-accent);
|
|
108
|
+
outline-offset: 2px;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
@media (prefers-reduced-motion: reduce) {
|
|
113
|
+
*,
|
|
114
|
+
*::before,
|
|
115
|
+
*::after {
|
|
116
|
+
animation-duration: 0.01ms !important;
|
|
117
|
+
transition-duration: 0.01ms !important;
|
|
118
|
+
scroll-behavior: auto !important;
|
|
119
|
+
}
|
|
120
|
+
}
|
package/src/utils/cn.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { clsx, type ClassValue } from "clsx";
|
|
2
|
+
import { twMerge } from "tailwind-merge";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Merge Tailwind classes with conditional logic.
|
|
6
|
+
* Uses clsx for conditionals + tailwind-merge for dedup.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* cn("px-4 py-2", isActive && "bg-ink text-white", className)
|
|
10
|
+
*/
|
|
11
|
+
export function cn(...inputs: ClassValue[]): string {
|
|
12
|
+
return twMerge(clsx(inputs));
|
|
13
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared framer-motion transition presets.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import type { Variants, Transition } from "framer-motion";
|
|
6
|
+
|
|
7
|
+
export const easeOut: number[] = [0.16, 1, 0.3, 1];
|
|
8
|
+
export const easeSpring: number[] = [0.34, 1.56, 0.64, 1];
|
|
9
|
+
|
|
10
|
+
/** Hover: scale up slightly */
|
|
11
|
+
export const hoverScale = {
|
|
12
|
+
scale: 1.03,
|
|
13
|
+
transition: { duration: 0.15, ease: easeOut },
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/** Hover: lift up slightly */
|
|
17
|
+
export const hoverLift = {
|
|
18
|
+
y: -2,
|
|
19
|
+
transition: { duration: 0.2, ease: easeOut },
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/** Entrance: fade in + slide up */
|
|
23
|
+
export const fadeInUp: Variants = {
|
|
24
|
+
hidden: { opacity: 0, y: 10 },
|
|
25
|
+
visible: {
|
|
26
|
+
opacity: 1,
|
|
27
|
+
y: 0,
|
|
28
|
+
transition: { duration: 0.4, ease: easeOut },
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
/** Entrance: fade in + scale from 0.95 */
|
|
33
|
+
export const fadeInScale: Variants = {
|
|
34
|
+
hidden: { opacity: 0, scale: 0.95 },
|
|
35
|
+
visible: {
|
|
36
|
+
opacity: 1,
|
|
37
|
+
scale: 1,
|
|
38
|
+
transition: { duration: 0.3, ease: easeSpring },
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
/** Spring transition for dialogs / popovers */
|
|
43
|
+
export const springTransition: Transition = {
|
|
44
|
+
type: "spring",
|
|
45
|
+
stiffness: 400,
|
|
46
|
+
damping: 30,
|
|
47
|
+
};
|