@pelatform/ui.components 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/README.md ADDED
@@ -0,0 +1 @@
1
+ # @pelatform/ui.components
@@ -0,0 +1,379 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as React from 'react';
3
+ import React__default, { ComponentPropsWithoutRef, ReactNode, ElementType } from 'react';
4
+ import { UseInViewOptions, SpringOptions, HTMLMotionProps, Transition, MotionProps } from 'motion/react';
5
+ import * as class_variance_authority_types from 'class-variance-authority/types';
6
+ import { VariantProps } from 'class-variance-authority';
7
+
8
+ type AnimationType = "default" | "flip" | "reveal";
9
+ interface AvatarGroupProps {
10
+ children: React.ReactNode;
11
+ className?: string;
12
+ tooltipClassName?: string;
13
+ animation?: AnimationType;
14
+ }
15
+ interface AvatarGroupItemProps {
16
+ children: React.ReactNode;
17
+ className?: string;
18
+ tooltipClassName?: string;
19
+ animation?: AnimationType;
20
+ }
21
+ interface AvatarGroupTooltipProps {
22
+ children: React.ReactNode;
23
+ className?: string;
24
+ }
25
+ declare function AvatarGroup({ children, className, tooltipClassName, animation, }: AvatarGroupProps): react_jsx_runtime.JSX.Element;
26
+ declare function AvatarGroupItem({ children, className, tooltipClassName, animation: itemAnimation, }: AvatarGroupItemProps): react_jsx_runtime.JSX.Element;
27
+ declare function AvatarGroupTooltip({ children, className }: AvatarGroupTooltipProps): react_jsx_runtime.JSX.Element;
28
+
29
+ interface CountingNumberProps {
30
+ from?: number;
31
+ to?: number;
32
+ duration?: number;
33
+ delay?: number;
34
+ className?: string;
35
+ startOnView?: boolean;
36
+ once?: boolean;
37
+ inViewMargin?: UseInViewOptions["margin"];
38
+ onComplete?: () => void;
39
+ format?: (value: number) => string;
40
+ }
41
+ declare function CountingNumber({ from, to, duration, delay, className, startOnView, once, inViewMargin, onComplete, format, ...props }: CountingNumberProps): react_jsx_runtime.JSX.Element;
42
+
43
+ declare const githubButtonVariants: (props?: ({
44
+ variant?: "default" | "outline" | null | undefined;
45
+ size?: "default" | "sm" | "lg" | null | undefined;
46
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
47
+ interface GithubButtonProps extends React__default.ComponentProps<"button">, VariantProps<typeof githubButtonVariants> {
48
+ /** Whether to round stars */
49
+ roundStars?: boolean;
50
+ /** Whether to show Github icon */
51
+ fixedWidth?: boolean;
52
+ /** Initial number of stars */
53
+ initialStars?: number;
54
+ /** Class for stars */
55
+ starsClass?: string;
56
+ /** Target number of stars to animate to */
57
+ targetStars?: number;
58
+ /** Animation duration in seconds */
59
+ animationDuration?: number;
60
+ /** Animation delay in seconds */
61
+ animationDelay?: number;
62
+ /** Whether to start animation automatically */
63
+ autoAnimate?: boolean;
64
+ /** Callback when animation completes */
65
+ onAnimationComplete?: () => void;
66
+ /** Whether to show Github icon */
67
+ showGithubIcon?: boolean;
68
+ /** Whether to show star icon */
69
+ showStarIcon?: boolean;
70
+ /** Whether to show separator */
71
+ separator?: boolean;
72
+ /** Whether stars should be filled */
73
+ filled?: boolean;
74
+ /** Repository URL for actual Github integration */
75
+ repoUrl?: string;
76
+ /** Button text label */
77
+ label?: string;
78
+ /** Use in-view detection to trigger animation */
79
+ useInViewTrigger?: boolean;
80
+ /** In-view options */
81
+ inViewOptions?: UseInViewOptions;
82
+ /** Spring transition options */
83
+ transition?: SpringOptions;
84
+ }
85
+ declare function GithubButton({ initialStars, targetStars, starsClass, fixedWidth, animationDuration, animationDelay, autoAnimate, className, variant, size, showGithubIcon, showStarIcon, roundStars, separator, filled, repoUrl, onClick, label, useInViewTrigger, inViewOptions, transition, ...props }: GithubButtonProps): react_jsx_runtime.JSX.Element;
86
+
87
+ type GradientBackgroundProps = HTMLMotionProps<"div"> & {
88
+ transition?: Transition;
89
+ };
90
+ declare function GradientBackground({ className, transition, ...props }: GradientBackgroundProps): react_jsx_runtime.JSX.Element;
91
+
92
+ type GridSize = "4:4" | "5:5" | "6:6" | "6:8" | "8:8" | "8:12" | "10:10" | "12:12" | "12:16" | "16:16";
93
+ type GridBackgroundProps = HTMLMotionProps<"div"> & {
94
+ children?: React.ReactNode;
95
+ gridSize?: GridSize;
96
+ colors?: {
97
+ background?: string;
98
+ borderColor?: string;
99
+ borderSize?: string;
100
+ borderStyle?: "solid" | "dashed" | "dotted";
101
+ };
102
+ beams?: {
103
+ count?: number;
104
+ colors?: string[];
105
+ size?: string;
106
+ shadow?: string;
107
+ speed?: number;
108
+ };
109
+ };
110
+ declare function GridBackground({ className, children, gridSize, colors, beams, ...props }: GridBackgroundProps): react_jsx_runtime.JSX.Element;
111
+
112
+ type HoverBackgroundProps = HTMLMotionProps<"div"> & {
113
+ objectCount?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
114
+ children?: React.ReactNode;
115
+ colors?: {
116
+ background?: string;
117
+ objects?: string[];
118
+ glow?: string;
119
+ };
120
+ };
121
+ declare function HoverBackground({ className, objectCount, children, colors, ...props }: HoverBackgroundProps): react_jsx_runtime.JSX.Element;
122
+
123
+ interface MarqueeProps extends ComponentPropsWithoutRef<"div"> {
124
+ /**
125
+ * Optional CSS class name to apply custom styles
126
+ */
127
+ className?: string;
128
+ /**
129
+ * Whether to reverse the animation direction
130
+ * @default false
131
+ */
132
+ reverse?: boolean;
133
+ /**
134
+ * Whether to pause the animation on hover
135
+ * @default false
136
+ */
137
+ pauseOnHover?: boolean;
138
+ /**
139
+ * Content to be displayed in the marquee
140
+ */
141
+ children: React__default.ReactNode;
142
+ /**
143
+ * Whether to animate vertically instead of horizontally
144
+ * @default false
145
+ */
146
+ vertical?: boolean;
147
+ /**
148
+ * Number of times to repeat the content
149
+ * @default 4
150
+ */
151
+ repeat?: number;
152
+ /**
153
+ * If true, automatically repeats children enough to fill the visible area
154
+ */
155
+ autoFill?: boolean;
156
+ /**
157
+ * ARIA label for accessibility
158
+ */
159
+ ariaLabel?: string;
160
+ /**
161
+ * ARIA live region politeness
162
+ */
163
+ ariaLive?: "off" | "polite" | "assertive";
164
+ /**
165
+ * ARIA role
166
+ */
167
+ ariaRole?: string;
168
+ }
169
+ declare function Marquee({ className, reverse, pauseOnHover, children, vertical, repeat, ariaLabel, ariaLive, ariaRole, ...props }: MarqueeProps): react_jsx_runtime.JSX.Element;
170
+
171
+ interface ShimmeringTextProps {
172
+ /** Text to display with shimmer effect */
173
+ text: string;
174
+ /** Animation duration in seconds */
175
+ duration?: number;
176
+ /** Delay before starting animation */
177
+ delay?: number;
178
+ /** Whether to repeat the animation */
179
+ repeat?: boolean;
180
+ /** Pause duration between repeats in seconds */
181
+ repeatDelay?: number;
182
+ /** Custom className */
183
+ className?: string;
184
+ /** Whether to start animation when component enters viewport */
185
+ startOnView?: boolean;
186
+ /** Whether to animate only once */
187
+ once?: boolean;
188
+ /** Margin for in-view detection (rootMargin) */
189
+ inViewMargin?: UseInViewOptions["margin"];
190
+ /** Shimmer spread multiplier */
191
+ spread?: number;
192
+ /** Base text color */
193
+ color?: string;
194
+ /** Shimmer gradient color */
195
+ shimmerColor?: string;
196
+ }
197
+ declare function ShimmeringText({ text, duration, delay, repeat, repeatDelay, className, startOnView, once, inViewMargin, spread, color, shimmerColor, }: ShimmeringTextProps): react_jsx_runtime.JSX.Element;
198
+
199
+ interface SlidingNumberProps {
200
+ from: number;
201
+ to: number;
202
+ duration?: number;
203
+ delay?: number;
204
+ startOnView?: boolean;
205
+ once?: boolean;
206
+ className?: string;
207
+ onComplete?: () => void;
208
+ digitHeight?: number;
209
+ }
210
+ declare function SlidingNumber({ from, to, duration, delay, startOnView, once, className, onComplete, digitHeight, }: SlidingNumberProps): react_jsx_runtime.JSX.Element;
211
+
212
+ interface SvgTextProps {
213
+ /**
214
+ * The SVG content to display inside the text
215
+ */
216
+ svg: ReactNode;
217
+ /**
218
+ * The content to display (will have the SVG "inside" it)
219
+ */
220
+ children: ReactNode;
221
+ /**
222
+ * Additional className for the container
223
+ */
224
+ className?: string;
225
+ /**
226
+ * Font size for the text mask (in viewport width units or CSS units)
227
+ * @default "20vw"
228
+ */
229
+ fontSize?: string | number;
230
+ /**
231
+ * Font weight for the text mask
232
+ * @default "bold"
233
+ */
234
+ fontWeight?: string | number;
235
+ /**
236
+ * The element type to render for the container
237
+ * @default "div"
238
+ */
239
+ as?: ElementType;
240
+ }
241
+ /**
242
+ * SvgText displays content with an SVG background fill effect.
243
+ * The SVG is masked by the content, creating a dynamic text look.
244
+ */
245
+ declare function SvgText({ svg, children, className, fontSize, fontWeight, as: Component, }: SvgTextProps): react_jsx_runtime.JSX.Element;
246
+
247
+ type RevealVariant = "fade" | "slideUp" | "slideDown" | "slideLeft" | "slideRight" | "scale" | "blur" | "typewriter" | "wave" | "stagger" | "rotate" | "elastic";
248
+ interface TextRevealProps {
249
+ children: string;
250
+ variant?: RevealVariant;
251
+ className?: string;
252
+ style?: React__default.CSSProperties;
253
+ delay?: number;
254
+ duration?: number;
255
+ staggerDelay?: number;
256
+ once?: boolean;
257
+ startOnView?: boolean;
258
+ wordLevel?: boolean;
259
+ onComplete?: () => void;
260
+ }
261
+ declare function TextReveal({ children, variant, className, style, delay, duration, staggerDelay, once, startOnView, wordLevel, }: TextRevealProps): react_jsx_runtime.JSX.Element;
262
+
263
+ type AnimationVariant = "fadeIn" | "blurIn" | "blurInUp" | "blurInDown" | "slideUp" | "slideDown" | "slideLeft" | "slideRight" | "scaleUp" | "scaleDown";
264
+ interface TypingTextProps extends Omit<MotionProps, "children"> {
265
+ /** Text to animate */
266
+ text?: string;
267
+ /** Array of texts to cycle through */
268
+ texts?: string[];
269
+ /** Typing speed in milliseconds */
270
+ speed?: number;
271
+ /** Delay before starting animation */
272
+ delay?: number;
273
+ /** Whether to show cursor */
274
+ showCursor?: boolean;
275
+ /** Cursor character */
276
+ cursor?: string;
277
+ /** Cursor className */
278
+ cursorClassName?: string;
279
+ /** Whether to loop through texts */
280
+ loop?: boolean;
281
+ /** Pause duration between loops */
282
+ pauseDuration?: number;
283
+ /** Custom className */
284
+ className?: string;
285
+ /** Callback when typing completes */
286
+ onComplete?: () => void;
287
+ /** Whether to start animation when component enters viewport */
288
+ startOnView?: boolean;
289
+ /** Whether to animate only once */
290
+ once?: boolean;
291
+ /** The animation preset to use */
292
+ animation?: AnimationVariant;
293
+ /** Margin for in-view detection (rootMargin) */
294
+ inViewMargin?: UseInViewOptions["margin"];
295
+ }
296
+ declare function TypingText({ text, texts, speed, delay, showCursor, cursorClassName, cursor, loop, pauseDuration, className, onComplete, startOnView, once, inViewMargin, ...props }: TypingTextProps): react_jsx_runtime.JSX.Element;
297
+
298
+ interface VideoTextProps {
299
+ /**
300
+ * The video source URL or array of sources for multiple formats
301
+ */
302
+ src: string | string[];
303
+ /**
304
+ * The content to display (will have the video "inside" it)
305
+ */
306
+ children: ReactNode;
307
+ /**
308
+ * Additional className for the container
309
+ */
310
+ className?: string;
311
+ /**
312
+ * Whether to autoplay the video
313
+ * @default true
314
+ */
315
+ autoPlay?: boolean;
316
+ /**
317
+ * Whether to mute the video
318
+ * @default true
319
+ */
320
+ muted?: boolean;
321
+ /**
322
+ * Whether to loop the video
323
+ * @default true
324
+ */
325
+ loop?: boolean;
326
+ /**
327
+ * Whether to preload the video
328
+ * @default "auto"
329
+ */
330
+ preload?: "auto" | "metadata" | "none";
331
+ /**
332
+ * Font size for the text mask (in viewport width units or CSS units)
333
+ * @default "20vw"
334
+ */
335
+ fontSize?: string | number;
336
+ /**
337
+ * Font weight for the text mask
338
+ * @default "bold"
339
+ */
340
+ fontWeight?: string | number;
341
+ /**
342
+ * The element type to render for the container
343
+ * @default "div"
344
+ */
345
+ as?: ElementType;
346
+ /**
347
+ * Callback when video starts playing
348
+ */
349
+ onPlay?: () => void;
350
+ /**
351
+ * Callback when video is paused
352
+ */
353
+ onPause?: () => void;
354
+ /**
355
+ * Callback when video ends
356
+ */
357
+ onEnded?: () => void;
358
+ }
359
+ /**
360
+ * VideoText displays content with a background video fill effect.
361
+ * The video is masked by the content, creating a dynamic animated text look.
362
+ */
363
+ declare function VideoText({ src, children, className, autoPlay, muted, loop, preload, fontSize, fontWeight, as: Component, onPlay, onPause, onEnded, }: VideoTextProps): react_jsx_runtime.JSX.Element;
364
+
365
+ interface WordRotateProps extends Omit<MotionProps, "children"> {
366
+ words: string[];
367
+ duration?: number;
368
+ animationStyle?: "fade" | "slide-up" | "slide-down" | "scale" | "flip";
369
+ loop?: boolean;
370
+ pauseDuration?: number;
371
+ className?: string;
372
+ containerClassName?: string;
373
+ startOnView?: boolean;
374
+ once?: boolean;
375
+ inViewMargin?: UseInViewOptions["margin"];
376
+ }
377
+ declare function WordRotate({ words, duration, animationStyle, loop, className, containerClassName, pauseDuration, startOnView, once, inViewMargin, ...props }: WordRotateProps): react_jsx_runtime.JSX.Element;
378
+
379
+ export { AvatarGroup, AvatarGroupItem, AvatarGroupTooltip, CountingNumber, GithubButton, type GithubButtonProps, GradientBackground, type GradientBackgroundProps, GridBackground, type GridBackgroundProps, HoverBackground, type HoverBackgroundProps, Marquee, ShimmeringText, SlidingNumber, SvgText, type SvgTextProps, TextReveal, TypingText, VideoText, type VideoTextProps, WordRotate, githubButtonVariants };