apex-ui-kit 2.0.5

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.
Files changed (40) hide show
  1. package/Licence.md +21 -0
  2. package/ReadMe.md +75 -0
  3. package/dist/ApexUI-Kit/templates/Avatar/Avatar.jsx +81 -0
  4. package/dist/ApexUI-Kit/templates/BeamBar/BeamBar.jsx +101 -0
  5. package/dist/ApexUI-Kit/templates/Cards/BasicCard.jsx +60 -0
  6. package/dist/ApexUI-Kit/templates/Carousel/Carousel.jsx +95 -0
  7. package/dist/ApexUI-Kit/templates/Carousel/DragCarousel.jsx +105 -0
  8. package/dist/ApexUI-Kit/templates/Carousel/ParallaxCarousel.jsx +161 -0
  9. package/dist/ApexUI-Kit/templates/DragCarousel/DragCarousel.jsx +105 -0
  10. package/dist/ApexUI-Kit/templates/EdgeGlowForm/EdgeGlowFrom.jsx +297 -0
  11. package/dist/ApexUI-Kit/templates/FlipProfile/FlipProfile.jsx +125 -0
  12. package/dist/ApexUI-Kit/templates/GlareCard/GlareCard.jsx +146 -0
  13. package/dist/ApexUI-Kit/templates/GlassCardStack/GlassCardStack.jsx +111 -0
  14. package/dist/ApexUI-Kit/templates/HoverText/HoverText.jsx +371 -0
  15. package/dist/ApexUI-Kit/templates/HyperCard/HyperCard.jsx +183 -0
  16. package/dist/ApexUI-Kit/templates/KineticThreadsBackground/KineticThreadBackground.jsx +249 -0
  17. package/dist/ApexUI-Kit/templates/LensFlareBackground/LensFlareBackground.jsx +268 -0
  18. package/dist/ApexUI-Kit/templates/LuminousParticleOcean/LuminousParticleOcean.jsx +155 -0
  19. package/dist/ApexUI-Kit/templates/NavDropDown/NavDropDown.jsx +114 -0
  20. package/dist/ApexUI-Kit/templates/NavMenu/NavMenu.jsx +153 -0
  21. package/dist/ApexUI-Kit/templates/OrbsBackground/FloatingOrbs.jsx +96 -0
  22. package/dist/ApexUI-Kit/templates/ParallaxCard/ParallaxCard.jsx +127 -0
  23. package/dist/ApexUI-Kit/templates/ParallaxCarousel/ParallaxCarousel.jsx +161 -0
  24. package/dist/ApexUI-Kit/templates/ParallaxProfile/ParallaxProfile.jsx +107 -0
  25. package/dist/ApexUI-Kit/templates/PointerFollower/PointerFollower.jsx +126 -0
  26. package/dist/ApexUI-Kit/templates/RainBackground/RainBackground.jsx +109 -0
  27. package/dist/ApexUI-Kit/templates/RippleBackground/RippleBackground.jsx +160 -0
  28. package/dist/ApexUI-Kit/templates/ScrollMarquee/ScrollMarquee.jsx +174 -0
  29. package/dist/ApexUI-Kit/templates/SmartGridCard/SmartGridCard.jsx +241 -0
  30. package/dist/ApexUI-Kit/templates/SmokeBackground/SmokeBackground.jsx +216 -0
  31. package/dist/ApexUI-Kit/templates/Testimonials/Testimonials.jsx +117 -0
  32. package/dist/ApexUI-Kit/templates/ThemeToggle/ThemeAnimation.js +252 -0
  33. package/dist/ApexUI-Kit/templates/ThemeToggle/ThemeConfig.js +8 -0
  34. package/dist/ApexUI-Kit/templates/ThemeToggle/ThemeToggle.css +560 -0
  35. package/dist/ApexUI-Kit/templates/ThemeToggle/ThemeToggle.jsx +118 -0
  36. package/dist/ApexUI-Kit/templates/ToolTip/ToolTip.jsx +85 -0
  37. package/dist/ApexUI-Kit/templates/WaterDropReveal/WaterDropReveal.jsx +151 -0
  38. package/dist/cli/index.d.ts +2 -0
  39. package/dist/cli/index.js +145 -0
  40. package/package.json +56 -0
@@ -0,0 +1,85 @@
1
+ import React, { useState, useRef, useEffect } from "react";
2
+ import gsap from "gsap";
3
+
4
+ const ToolTip = ({ items }) => {
5
+ const [hoveredIndex, setHoveredIndex] = useState(null);
6
+ const tooltipRefs = useRef([]);
7
+ const avatarRefs = useRef([]);
8
+
9
+ useEffect(() => {
10
+ // Animate all avatars based on hover state
11
+ items.forEach((_, idx) => {
12
+ const isHovered = hoveredIndex === idx;
13
+
14
+ // Animate the avatar image
15
+ gsap.to(avatarRefs.current[idx], {
16
+ scale: isHovered ? 1.15 : 1,
17
+ filter: isHovered ? "blur(0px)" : hoveredIndex !== null ? "blur(1.5px)" : "blur(0px)",
18
+ duration: 0.25,
19
+ ease: "power2.inOut",
20
+ });
21
+ });
22
+
23
+ // Animate the tooltip for the hovered item
24
+ if (hoveredIndex !== null && tooltipRefs.current[hoveredIndex]) {
25
+ gsap.fromTo(
26
+ tooltipRefs.current[hoveredIndex],
27
+ { opacity: 0, y: 10, scale: 0.8 },
28
+ {
29
+ opacity: 1,
30
+ y: 0,
31
+ scale: 1,
32
+ duration: 0.4,
33
+ ease: "power3.out",
34
+ }
35
+ );
36
+ }
37
+ }, [hoveredIndex, items]);
38
+
39
+ return (
40
+ <div className="flex items-end -space-x-4">
41
+ {items.map((item, idx) => (
42
+ <div
43
+ key={item.name}
44
+ onMouseEnter={() => setHoveredIndex(idx)}
45
+ onMouseLeave={() => setHoveredIndex(null)}
46
+ className="relative group cursor-pointer"
47
+ style={{ zIndex: hoveredIndex === idx ? 50 : 10 }}
48
+ >
49
+ {hoveredIndex === idx && (
50
+ <div
51
+ ref={(el) => (tooltipRefs.current[idx] = el)}
52
+ className="absolute bottom-full left-1/2 -translate-x-1/2 mb-3 z-50 flex flex-col items-center justify-center rounded-lg border border-teal-500/50 bg-gradient-to-br from-black/90 to-zinc-900/80 px-4 py-2 shadow-2xl backdrop-blur-md"
53
+ >
54
+ <div className="absolute bottom-[-6px] left-1/2 -translate-x-1/2 w-0 h-0 border-t-[8px] border-l-[8px] border-r-[8px] border-t-teal-500/40 border-l-transparent border-r-transparent" />
55
+ <span className="text-sm font-bold text-teal-300 drop-shadow-sm whitespace-nowrap">
56
+ {item.name}
57
+ </span>
58
+ <span className="text-xs text-zinc-300 italic whitespace-nowrap">
59
+ {item.designation}
60
+ </span>
61
+ </div>
62
+ )}
63
+ <img
64
+ ref={(el) => (avatarRefs.current[idx] = el)}
65
+ src={item.image}
66
+ alt={item.name}
67
+ className="h-14 w-14 object-cover object-center rounded-full border-2 border-white shadow-lg transition-transform"
68
+ style={{
69
+ zIndex: hoveredIndex === idx ? 50 : 10,
70
+ transition: "all 0.25s ease-in-out",
71
+ }}
72
+ />
73
+ </div>
74
+ ))}
75
+ </div>
76
+ );
77
+ };
78
+
79
+ export default function ToolTipInner({ items }) {
80
+ return (
81
+ <div className="flex flex-row items-center justify-center">
82
+ <ToolTip items={items} />
83
+ </div>
84
+ );
85
+ }
@@ -0,0 +1,151 @@
1
+ import React, { useState, useRef, useEffect } from "react";
2
+ import gsap from "gsap";
3
+
4
+ const WaterDropReveal = ({
5
+ text = "Discover the Water Drop Reveal Effect!\nMake your UI interactive, modern, and magical.\nHover to experience the reveal.",
6
+ dropCount = 3,
7
+ dropColor = "#a855f7",
8
+ animationSpeed = 0.4,
9
+ }) => {
10
+ // Limit dropCount to max 10
11
+ const safeDropCount = Math.min(Math.max(1, dropCount), 10);
12
+ const [hovered, setHovered] = useState(false);
13
+ const [mouse, setMouse] = useState({ x: 0.5, y: 0.5 });
14
+ const dropRef = useRef(null);
15
+ const textRef = useRef(null);
16
+ const mouseAnim = useRef({ x: 0.5, y: 0.5 });
17
+
18
+ useEffect(() => {
19
+ if (!hovered) return;
20
+ gsap.to(mouseAnim.current, {
21
+ x: mouse.x,
22
+ y: mouse.y,
23
+ duration: animationSpeed,
24
+ ease: "power2.out",
25
+ onUpdate: () => {
26
+ if (dropRef.current) {
27
+ dropRef.current.setAttribute("data-x", mouseAnim.current.x);
28
+ dropRef.current.setAttribute("data-y", mouseAnim.current.y);
29
+ }
30
+ if (textRef.current) {
31
+ const xShift = (mouseAnim.current.x - 0.5) * 20;
32
+ const yShift = (mouseAnim.current.y - 0.5) * 10;
33
+ const rotateX = -(mouseAnim.current.y - 0.5) * 10;
34
+ const rotateY = (mouseAnim.current.x - 0.5) * 15;
35
+ gsap.to(textRef.current, {
36
+ x: xShift,
37
+ y: yShift,
38
+ rotateX,
39
+ rotateY,
40
+ scale: 1.08,
41
+ transformPerspective: 600,
42
+ transformOrigin: "center",
43
+ duration: animationSpeed,
44
+ ease: "power3.out",
45
+ });
46
+ }
47
+ },
48
+ });
49
+ }, [mouse, hovered, animationSpeed]);
50
+
51
+ const handleMouseMove = (e) => {
52
+ const rect = e.currentTarget.getBoundingClientRect();
53
+ const x = (e.clientX - rect.left) / rect.width;
54
+ const y = (e.clientY - rect.top) / rect.height;
55
+ setMouse({ x, y });
56
+ };
57
+
58
+ const animX = hovered ? mouseAnim.current.x : 0.5;
59
+ const animY = hovered ? mouseAnim.current.y : 0.5;
60
+ const cx = 200 + (animX - 0.5) * 40;
61
+ const cy = 80 + (animY - 0.5) * 20;
62
+
63
+ return (
64
+ <div
65
+ className="relative w-full h-full rounded-2xl shadow-2xl flex items-center justify-center cursor-pointer overflow-hidden group border border-gray-800 transition-all duration-300"
66
+ onMouseEnter={() => setHovered(true)}
67
+ onMouseLeave={() => {
68
+ setHovered(false);
69
+ gsap.to(textRef.current, {
70
+ x: 0,
71
+ y: 0,
72
+ rotateX: 0,
73
+ rotateY: 0,
74
+ scale: 1,
75
+ duration: 0.6,
76
+ ease: "power2.out",
77
+ });
78
+ }}
79
+ onMouseMove={handleMouseMove}
80
+ style={{ minHeight: 260 }}
81
+ >
82
+ {/* Water Drop Layer */}
83
+ <div
84
+ ref={dropRef}
85
+ className={`pointer-events-none absolute left-1/2 top-1/2 z-10 -translate-x-1/2 -translate-y-1/2 transition-opacity duration-700 ${hovered ? "opacity-100" : "opacity-0"}`}
86
+ style={{ width: "100%", height: "100%" }}
87
+ >
88
+ <svg width="100%" height="100%" viewBox="0 0 400 160" preserveAspectRatio="xMidYMid slice">
89
+ <defs>
90
+ <filter id="drop-shadow" x="-30%" y="-30%" width="160%" height="160%">
91
+ <feDropShadow dx="0" dy="6" stdDeviation="18" flood-color="black" flood-opacity="60" />
92
+ </filter>
93
+ </defs>
94
+ {(() => {
95
+ // Dynamic radii and opacities for unique drops
96
+ const maxRadius = 160;
97
+ const minRadius = 36;
98
+ const maxOpacity = 0.7;
99
+ const minOpacity = 0.18;
100
+ const step = safeDropCount > 1 ? (maxRadius - minRadius) / (safeDropCount - 1) : 0;
101
+ const opacityStep = safeDropCount > 1 ? (maxOpacity - minOpacity) / (safeDropCount - 1) : 0;
102
+ return [...Array(safeDropCount)].map((_, i) => {
103
+ const r = Math.round(maxRadius - i * step);
104
+ const opacity = +(maxOpacity - i * opacityStep).toFixed(2);
105
+ return (
106
+ <circle
107
+ key={i}
108
+ cx={cx}
109
+ cy={cy}
110
+ r={hovered ? r : 0}
111
+ fill={dropColor}
112
+ fillOpacity={hovered ? opacity : 0}
113
+ style={{ transition: `r 0.7s, fill-opacity 0.7s` }}
114
+ filter="url(#drop-shadow)"
115
+ />
116
+ );
117
+ });
118
+ })()}
119
+ </svg>
120
+ </div>
121
+
122
+ {/* Text Reveal with 3D */}
123
+ <span
124
+ ref={textRef}
125
+ className={`absolute whitespace-break-spaces z-20 max-sm:text-xl text-4xl font-semibold tracking-wide select-none transition-opacity duration-700 text-center w-full px-4 ${hovered ? "blur-0 opacity-100" : "text-gray-400 blur-sm opacity-60"}`}
126
+ style={{
127
+ left: 0,
128
+ letterSpacing: 0,
129
+ willChange: "transform",
130
+ background: hovered ? "linear-gradient(90deg, #fff, #38bdf8, #fff)" : undefined,
131
+ WebkitBackgroundClip: hovered ? "text" : undefined,
132
+ WebkitTextFillColor: hovered ? "transparent" : undefined,
133
+ backgroundClip: hovered ? "text" : undefined,
134
+ color: hovered ? undefined : undefined,
135
+ fontFamily: "Bitcount Prop Double, system-ui",
136
+ }}
137
+ >
138
+ {text}
139
+ </span>
140
+
141
+ {/* Hover Hint */}
142
+ {!hovered && (
143
+ <span className="absolute bottom-4 left-1/2 -translate-x-1/2 z-30 text-xs sm:text-sm text-white bg-black/40 px-3 py-1 rounded-full shadow-md animate-pulse pointer-events-none select-none">
144
+ Hover to reveal
145
+ </span>
146
+ )}
147
+ </div>
148
+ );
149
+ };
150
+
151
+ export default WaterDropReveal;
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
@@ -0,0 +1,145 @@
1
+ #!/usr/bin/env node
2
+ import fs from "fs-extra";
3
+ import prompts from "prompts";
4
+ import path from "path";
5
+ import chalk from "chalk";
6
+ import { fileURLToPath } from "url";
7
+ import { execSync } from "child_process";
8
+ // Paths
9
+ const __filename = fileURLToPath(import.meta.url);
10
+ const __dirname = path.dirname(__filename);
11
+ const componentRoot = path.join(__dirname, "..", "ApexUI-Kit", "templates");
12
+ // Component name map
13
+ const componentMap = {
14
+ "avatar": "Avatar",
15
+ "beam-bar": "BeamBar",
16
+ "carousel": "Carousel",
17
+ "parallax-carousel": "ParallaxCarousel",
18
+ "drag-carousel": "DragCarousel",
19
+ "basic-card": "Cards",
20
+ "edge-glow-from": "EdgeGlowFrom",
21
+ "glare-card": "GlareCard",
22
+ "glass-card-stack": "GlassCardStack",
23
+ "glass-profile": "GlassProfile",
24
+ "hover-text": "HoverText",
25
+ "hyper-card": "HyperCard",
26
+ "kinetic-threads-background": "KineticThreadsBackground",
27
+ "lens-flare-background": "LensFlareBackground",
28
+ "luminous-particle-ocean": "LuminousParticleOcean",
29
+ "nav-menu": "NavMenu",
30
+ "nav-dropdown": "NavDropDown",
31
+ "orbs-background": "OrbsBackground",
32
+ "pointer-follower": "PointerFollower",
33
+ "flip-profiler": "FlipProfile",
34
+ "parallax-profile": "ParallaxProfile",
35
+ "parallax-card": "ParallaxCard",
36
+ "rain-background": "RainBackground",
37
+ "ripple-background": "RippleBackground",
38
+ "scroll-marquee": "ScrollMarquee",
39
+ "smart-grid-card": "SmartGridCard",
40
+ "smoke-background": "SmokeBackground",
41
+ "tool-tip": "ToolTip",
42
+ "theme-toggle": "ThemeToggle",
43
+ "testimonials": "Testimonials",
44
+ "water-drop-reveal": "WaterDropReveal",
45
+ };
46
+ async function main() {
47
+ const args = process.argv.slice(2);
48
+ const command = args[0];
49
+ const rawInput = args[1];
50
+ if (command !== "add" || !rawInput) {
51
+ console.log(chalk.yellow("Usage:"));
52
+ console.log(" npx apex-ui-templete add <component-name>");
53
+ return;
54
+ }
55
+ const input = rawInput.toLowerCase();
56
+ const matchedName = componentMap[input];
57
+ if (!matchedName) {
58
+ console.log(chalk.red(`❌ Component '${rawInput}' not found in ApexUI-Kit.`));
59
+ console.log(chalk.gray("👉 Available components:"));
60
+ Object.values(componentMap).forEach((c) => console.log(` • ${c}`));
61
+ return;
62
+ }
63
+ // Validate package.json
64
+ const pkgPath = path.join(process.cwd(), "package.json");
65
+ if (!(await fs.pathExists(pkgPath))) {
66
+ console.log(chalk.red("🚫 No package.json found. Are you in a React project?"));
67
+ return;
68
+ }
69
+ // Ask install path
70
+ const { dirInput } = await prompts({
71
+ type: "text",
72
+ name: "dirInput",
73
+ message: "📁 Install in which folder? (use . for current)",
74
+ initial: "."
75
+ });
76
+ let basePath = "";
77
+ if (dirInput.trim() === ".") {
78
+ const { confirmInside } = await prompts({
79
+ type: "select",
80
+ name: "confirmInside",
81
+ message: "📍 Are you currently inside the folder where ApexUI-Kit should be?",
82
+ choices: [
83
+ { title: "Yes (install here)", value: "yes" },
84
+ { title: "No (I'll choose a path)", value: "no" }
85
+ ]
86
+ });
87
+ if (confirmInside === "yes") {
88
+ basePath = process.cwd();
89
+ }
90
+ else {
91
+ const { targetPath } = await prompts({
92
+ type: "text",
93
+ name: "targetPath",
94
+ message: "📂 Enter target folder path (or use . for current)",
95
+ initial: "."
96
+ });
97
+ basePath = path.resolve(targetPath.trim());
98
+ }
99
+ }
100
+ else {
101
+ basePath = path.resolve(dirInput.trim());
102
+ }
103
+ // 🔠 Ask language
104
+ const { lang } = await prompts({
105
+ type: "select",
106
+ name: "lang",
107
+ message: "🧠 Choose language",
108
+ choices: [
109
+ { title: "JavaScript (JSX)", value: "jsx" },
110
+ { title: "TypeScript (Coming Soon)", value: "ts", disabled: true }
111
+ ]
112
+ });
113
+ // Install dependencies
114
+ console.log(chalk.cyan("📦 Installing dependencies..."));
115
+ const deps = [
116
+ "gsap",
117
+ "framer-motion",
118
+ "three",
119
+ "@fortawesome/fontawesome-svg-core",
120
+ "@fortawesome/free-solid-svg-icons",
121
+ "@fortawesome/react-fontawesome",
122
+ "react-icons"
123
+ ];
124
+ try {
125
+ execSync(`npm install ${deps.join(" ")}`, { stdio: "inherit" });
126
+ }
127
+ catch (err) {
128
+ console.log(chalk.red("❌ Failed to install dependencies."));
129
+ return;
130
+ }
131
+ // Prepare destination
132
+ const apexKitPath = path.join(basePath, "ApexUI-Kit");
133
+ const dest = path.join(apexKitPath, matchedName);
134
+ const source = path.join(componentRoot, matchedName);
135
+ console.log("🔍 Looking in:", source);
136
+ console.log("📁 Installing to:", dest);
137
+ if (!(await fs.pathExists(source))) {
138
+ console.log(chalk.red(`❌ Internal error: Component folder '${matchedName}' not found.`));
139
+ return;
140
+ }
141
+ await fs.ensureDir(dest);
142
+ await fs.copy(source, dest);
143
+ console.log(chalk.green(`✅ '${matchedName}' added to ${dest}`));
144
+ }
145
+ main();
package/package.json ADDED
@@ -0,0 +1,56 @@
1
+ {
2
+ "name": "apex-ui-kit",
3
+ "version": "2.0.5",
4
+ "license": "MIT",
5
+ "description": "Apex UI Kit - A React component library for building modern user interfaces",
6
+ "keywords": [
7
+ "react",
8
+ "ui",
9
+ "components",
10
+ "library",
11
+ "design",
12
+ "kit",
13
+ "modern",
14
+ "user interface",
15
+ "frontend",
16
+ "web development",
17
+ "react components",
18
+ "ui components",
19
+ "react ui library",
20
+ "apex ui kit",
21
+ "ui components library"
22
+ ],
23
+ "type": "module",
24
+ "main": "dist/cli/index.js",
25
+ "bin": {
26
+ "apex-ui-kit": "./dist/cli/index.js"
27
+ },
28
+ "files": [
29
+ "dist"
30
+ ],
31
+ "scripts": {
32
+ "build": "tsc && copyfiles -u 2 src/ApexUI-Kit/**/* dist/ApexUI-Kit"
33
+ },
34
+ "dependencies": {
35
+ "@fortawesome/fontawesome-svg-core": "^7.0.0",
36
+ "@fortawesome/free-solid-svg-icons": "^7.0.0",
37
+ "@fortawesome/react-fontawesome": "^0.2.3",
38
+ "chalk": "^5.4.1",
39
+ "framer-motion": "^12.23.9",
40
+ "fs-extra": "^11.3.0",
41
+ "gsap": "^3.13.0",
42
+ "prompts": "^2.4.2",
43
+ "react-icons": "^5.5.0",
44
+ "three": "^0.178.0",
45
+ "react-three-fiber": "^6.0.13",
46
+ "@react-three/drei": "^10.7.3",
47
+ "@react-three/fiber": "^9.3.0",
48
+ "@react-three/postprocessing": "^3.0.4",
49
+ "lucide-react": "^0.525.0"
50
+ },
51
+ "devDependencies": {
52
+ "@types/node": "^20.4.0",
53
+ "copyfiles": "^2.4.1",
54
+ "typescript": "^5.4.0"
55
+ }
56
+ }