@pelatform/ui 1.5.9 → 2.0.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.
Files changed (104) hide show
  1. package/css/source.css +20 -0
  2. package/css/theme.css +1 -2
  3. package/dist/animation.d.ts +4 -379
  4. package/dist/animation.js +2 -1752
  5. package/dist/aria.d.ts +1 -31
  6. package/dist/aria.js +2 -139
  7. package/dist/base.d.ts +1 -651
  8. package/dist/base.js +2 -5559
  9. package/dist/chunk-UEVIEY7W.js +51 -0
  10. package/dist/{components.cjs → chunk-VZEE3GOC.js} +81 -2344
  11. package/dist/components.d.ts +224 -181
  12. package/dist/components.js +364 -765
  13. package/dist/default.d.ts +1 -1322
  14. package/dist/default.js +2 -8931
  15. package/dist/hooks.d.ts +4 -1087
  16. package/dist/hooks.js +5 -662
  17. package/dist/index.d.ts +58 -308
  18. package/dist/index.js +5 -226
  19. package/package.json +29 -109
  20. package/dist/animation.cjs +0 -1752
  21. package/dist/animation.d.cts +0 -379
  22. package/dist/aria.cjs +0 -139
  23. package/dist/aria.d.cts +0 -31
  24. package/dist/badge-BtI4BMea.d.cts +0 -33
  25. package/dist/badge-BtI4BMea.d.ts +0 -33
  26. package/dist/base.cjs +0 -5559
  27. package/dist/base.d.cts +0 -651
  28. package/dist/chunk-3N75YA6Q.cjs +0 -60
  29. package/dist/chunk-7472NIIL.cjs +0 -40
  30. package/dist/chunk-BXUKTDPN.cjs +0 -576
  31. package/dist/chunk-CD2BCCQU.js +0 -180
  32. package/dist/chunk-CJXIPSTG.cjs +0 -10
  33. package/dist/chunk-CTHRAJQZ.js +0 -1522
  34. package/dist/chunk-D373YKDA.js +0 -196
  35. package/dist/chunk-EZW5GNS4.js +0 -6
  36. package/dist/chunk-HILACSFA.cjs +0 -1522
  37. package/dist/chunk-HR3R6KKM.js +0 -40
  38. package/dist/chunk-HW52LCWN.js +0 -22
  39. package/dist/chunk-I46SELBA.cjs +0 -22
  40. package/dist/chunk-J4JGE3U5.cjs +0 -180
  41. package/dist/chunk-RQHJBTEU.js +0 -10
  42. package/dist/chunk-SK6SSJHC.js +0 -9
  43. package/dist/chunk-T74DBLYY.js +0 -60
  44. package/dist/chunk-TB6DU23O.js +0 -576
  45. package/dist/chunk-UP53DCYH.cjs +0 -6
  46. package/dist/chunk-ZBO5IAMA.cjs +0 -196
  47. package/dist/chunk-ZDR3OZ7Z.cjs +0 -9
  48. package/dist/colors-CUDWvz1g.d.cts +0 -42
  49. package/dist/colors-CUDWvz1g.d.ts +0 -42
  50. package/dist/components-CidsRcc3.d.cts +0 -46
  51. package/dist/components-CidsRcc3.d.ts +0 -46
  52. package/dist/components.d.cts +0 -2944
  53. package/dist/default.cjs +0 -8931
  54. package/dist/default.d.cts +0 -1322
  55. package/dist/hooks.cjs +0 -666
  56. package/dist/hooks.d.cts +0 -1176
  57. package/dist/index.cjs +0 -230
  58. package/dist/index.d.cts +0 -318
  59. package/dist/input-AwYIskrX.d.cts +0 -22
  60. package/dist/input-AwYIskrX.d.ts +0 -22
  61. package/dist/menu-GmSRfRGB.d.cts +0 -43
  62. package/dist/menu-GmSRfRGB.d.ts +0 -43
  63. package/dist/metafile-cjs.json +0 -1
  64. package/dist/metafile-esm.json +0 -1
  65. package/dist/re-export/cva.cjs +0 -6
  66. package/dist/re-export/cva.d.cts +0 -10
  67. package/dist/re-export/cva.d.ts +0 -10
  68. package/dist/re-export/cva.js +0 -6
  69. package/dist/re-export/motion.cjs +0 -2
  70. package/dist/re-export/motion.d.cts +0 -1
  71. package/dist/re-export/motion.d.ts +0 -1
  72. package/dist/re-export/motion.js +0 -2
  73. package/dist/re-export/next-themes.cjs +0 -2
  74. package/dist/re-export/next-themes.d.cts +0 -1
  75. package/dist/re-export/next-themes.d.ts +0 -1
  76. package/dist/re-export/next-themes.js +0 -2
  77. package/dist/re-export/react-day-picker.cjs +0 -2
  78. package/dist/re-export/react-day-picker.d.cts +0 -1
  79. package/dist/re-export/react-day-picker.d.ts +0 -1
  80. package/dist/re-export/react-day-picker.js +0 -2
  81. package/dist/re-export/react-hook-form.cjs +0 -2
  82. package/dist/re-export/react-hook-form.d.cts +0 -1
  83. package/dist/re-export/react-hook-form.d.ts +0 -1
  84. package/dist/re-export/react-hook-form.js +0 -2
  85. package/dist/re-export/resolver.cjs +0 -2
  86. package/dist/re-export/resolver.d.cts +0 -1
  87. package/dist/re-export/resolver.d.ts +0 -1
  88. package/dist/re-export/resolver.js +0 -2
  89. package/dist/re-export/sonner.cjs +0 -2
  90. package/dist/re-export/sonner.d.cts +0 -1
  91. package/dist/re-export/sonner.d.ts +0 -1
  92. package/dist/re-export/sonner.js +0 -2
  93. package/dist/re-export/tanstack-query.cjs +0 -2
  94. package/dist/re-export/tanstack-query.d.cts +0 -1
  95. package/dist/re-export/tanstack-query.d.ts +0 -1
  96. package/dist/re-export/tanstack-query.js +0 -2
  97. package/dist/re-export/tanstack-table.cjs +0 -2
  98. package/dist/re-export/tanstack-table.d.cts +0 -1
  99. package/dist/re-export/tanstack-table.d.ts +0 -1
  100. package/dist/re-export/tanstack-table.js +0 -2
  101. package/dist/re-export/zod.cjs +0 -2
  102. package/dist/re-export/zod.d.cts +0 -1
  103. package/dist/re-export/zod.d.ts +0 -1
  104. package/dist/re-export/zod.js +0 -2
@@ -1,196 +0,0 @@
1
- 'use client';
2
-
3
- import {
4
- cn
5
- } from "./chunk-RQHJBTEU.js";
6
-
7
- // src/ui/animation/hover-background.tsx
8
- import * as React from "react";
9
- import { motion, useMotionValue, useSpring } from "motion/react";
10
- import { jsx, jsxs } from "react/jsx-runtime";
11
- function HoverBackground({
12
- className,
13
- objectCount = 12,
14
- children,
15
- colors = {},
16
- ...props
17
- }) {
18
- const {
19
- background = "bg-gradient-to-br from-slate-900 via-purple-900 to-slate-900",
20
- objects = [
21
- "bg-cyan-400/20",
22
- "bg-purple-400/20",
23
- "bg-fuchsia-400/20",
24
- "bg-violet-400/20",
25
- "bg-blue-400/20",
26
- "bg-indigo-400/20"
27
- ],
28
- glow = "shadow-cyan-400/50"
29
- } = colors;
30
- const [isHovered, setIsHovered] = React.useState(false);
31
- const mouseX = useMotionValue(0);
32
- const mouseY = useMotionValue(0);
33
- const springX = useSpring(mouseX, {
34
- stiffness: 300,
35
- damping: 30,
36
- // Slower return to center when hover ends
37
- restSpeed: 0.1,
38
- restDelta: 0.1
39
- });
40
- const springY = useSpring(mouseY, {
41
- stiffness: 300,
42
- damping: 30,
43
- restSpeed: 0.1,
44
- restDelta: 0.1
45
- });
46
- const animatedObjects = React.useMemo(
47
- () => Array.from({ length: objectCount }, (_, i) => {
48
- const shape = Math.random() > 0.5 ? "circle" : "square";
49
- return {
50
- id: i,
51
- x: Math.random() * 90 + 5,
52
- // 5-95% to avoid edges
53
- y: Math.random() * 90 + 5,
54
- size: Math.random() * 60 + 20,
55
- // 20-80px
56
- color: objects[i % objects.length],
57
- delay: Math.random() * 2,
58
- shape,
59
- floatDirection: Math.random() > 0.5 ? 1 : -1,
60
- breathDuration: Math.random() * 3 + 3,
61
- // 3-6 seconds
62
- parallaxStrength: Math.random() * 0.5 + 0.3,
63
- // 0.3-0.8 for more varied parallax depth
64
- baseRotation: Math.random() * 360
65
- // Random starting rotation offset
66
- };
67
- }),
68
- [objectCount, objects]
69
- );
70
- const handleMouseMove = (event) => {
71
- if (!isHovered) return;
72
- const rect = event.currentTarget.getBoundingClientRect();
73
- const centerX = rect.width / 2;
74
- const centerY = rect.height / 2;
75
- const x = (event.clientX - rect.left - centerX) / centerX;
76
- const y = (event.clientY - rect.top - centerY) / centerY;
77
- mouseX.set(x * 15);
78
- mouseY.set(y * 15);
79
- };
80
- const handleHoverStart = () => {
81
- setIsHovered(true);
82
- };
83
- const handleHoverEnd = () => {
84
- setIsHovered(false);
85
- mouseX.set(0);
86
- mouseY.set(0);
87
- };
88
- return /* @__PURE__ */ jsxs(
89
- motion.div,
90
- {
91
- "data-slot": "hover-background",
92
- className: cn("relative size-full overflow-hidden", background, className),
93
- onHoverStart: handleHoverStart,
94
- onHoverEnd: handleHoverEnd,
95
- onMouseMove: handleMouseMove,
96
- whileHover: { scale: 1.02 },
97
- transition: { duration: 0.3, ease: "easeOut" },
98
- animate: {
99
- backgroundPosition: ["0% 50%", "100% 50%", "0% 50%"]
100
- },
101
- style: {
102
- backgroundSize: "200% 200%"
103
- },
104
- ...props,
105
- children: [
106
- /* @__PURE__ */ jsx(
107
- motion.div,
108
- {
109
- className: "absolute inset-0 bg-gradient-radial from-white/5 via-transparent to-transparent",
110
- animate: {
111
- opacity: [0.3, 0.6, 0.3],
112
- scale: [1, 1.1, 1]
113
- },
114
- transition: {
115
- duration: 4,
116
- repeat: Infinity,
117
- ease: "easeInOut"
118
- }
119
- }
120
- ),
121
- animatedObjects.map((obj) => /* @__PURE__ */ jsx(
122
- motion.div,
123
- {
124
- className: cn(
125
- "absolute border border-white/10 backdrop-blur-sm",
126
- obj.color,
127
- obj.shape === "circle" ? "rounded-full" : "rotate-45 rounded-lg"
128
- ),
129
- style: {
130
- left: `${obj.x}%`,
131
- top: `${obj.y}%`,
132
- width: obj.size,
133
- height: obj.size,
134
- // Apply parallax with individual object strength
135
- x: springX.get() * obj.parallaxStrength,
136
- y: springY.get() * obj.parallaxStrength
137
- },
138
- initial: {
139
- scale: 0.6,
140
- opacity: 0.4,
141
- rotate: obj.baseRotation
142
- },
143
- animate: {
144
- // Default state animations - breathing with base rotation offset
145
- scale: [0.6, 0.8, 0.6],
146
- opacity: [0.4, 0.6, 0.4],
147
- rotate: obj.shape === "circle" ? [obj.baseRotation, obj.baseRotation + 10, obj.baseRotation] : [obj.baseRotation, obj.baseRotation + 5, obj.baseRotation],
148
- y: [0, obj.floatDirection * 15, 0],
149
- x: [0, obj.floatDirection * 8, 0]
150
- },
151
- transition: {
152
- duration: obj.breathDuration,
153
- delay: obj.delay,
154
- ease: "easeInOut",
155
- repeat: Infinity,
156
- repeatType: "reverse"
157
- },
158
- whileHover: {
159
- scale: 1.5,
160
- boxShadow: `0 0 30px ${glow.replace("shadow-", "").replace("/50", "")}`
161
- }
162
- },
163
- obj.id
164
- )),
165
- isHovered && /* @__PURE__ */ jsx("div", { className: "pointer-events-none absolute inset-0", children: Array.from({ length: 20 }).map((_, i) => /* @__PURE__ */ jsx(
166
- motion.div,
167
- {
168
- className: "absolute h-1 w-1 rounded-full bg-white/60",
169
- style: {
170
- left: `${Math.random() * 100}%`,
171
- top: `${Math.random() * 100}%`
172
- },
173
- initial: { opacity: 0, scale: 0 },
174
- animate: {
175
- opacity: [0, 1, 0],
176
- scale: [0, 1, 0],
177
- y: [0, -50, -100]
178
- },
179
- transition: {
180
- duration: 3,
181
- delay: Math.random() * 2,
182
- repeat: Infinity,
183
- ease: "easeOut"
184
- }
185
- },
186
- `particle-${i}`
187
- )) }),
188
- /* @__PURE__ */ jsx("div", { className: "relative z-10 size-full", children })
189
- ]
190
- }
191
- );
192
- }
193
-
194
- export {
195
- HoverBackground
196
- };
@@ -1,6 +0,0 @@
1
- // src/re-export/cva.ts
2
- import { cva } from "class-variance-authority";
3
-
4
- export {
5
- cva
6
- };