Skip to content

Commit ade9754

Browse files
committed
feat: Add v4.0.0 components to demo app
1 parent f49f9e8 commit ade9754

2 files changed

Lines changed: 174 additions & 1 deletion

File tree

demo/src/data/components.ts

Lines changed: 173 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,17 @@ import {
6767
FormFieldLoader,
6868
// Accessibility
6969
LiveRegion,
70+
// Morph
71+
MorphBlob,
72+
LiquidFill,
73+
WaveCircle,
74+
// Gradient
75+
GradientSpinner,
76+
GradientRing,
77+
GradientBar,
78+
// Particle
79+
ParticleBurst,
80+
ParticleOrbit,
7081
} from '@lib/components';
7182

7283
export const COMPONENTS: ComponentMetadata[] = [
@@ -4121,6 +4132,165 @@ export const COMPONENTS: ComponentMetadata[] = [
41214132
],
41224133
importPath: "import { LiveRegion } from 'premium-react-loaders';",
41234134
},
4135+
// ==================== MORPH COMPONENTS ====================
4136+
{
4137+
id: 'morph-blob',
4138+
name: 'MorphBlob',
4139+
category: 'morph',
4140+
component: MorphBlob,
4141+
description: 'Organic blob shape that continuously morphs with smooth CSS animation',
4142+
defaultProps: { size: 80, color: '#3b82f6', speed: 'normal' },
4143+
propDefinitions: [
4144+
{ name: 'size', type: 'number', control: { type: 'range', min: 40, max: 200, step: 8 }, description: 'Diameter in px', defaultValue: 80 },
4145+
{ name: 'color', type: 'string', control: { type: 'color' }, description: 'Fill color', defaultValue: '#3b82f6' },
4146+
{ name: 'speed', type: 'string', control: { type: 'select', options: ['slow', 'normal', 'fast'] }, description: 'Morphing speed', defaultValue: 'normal' },
4147+
],
4148+
examples: [
4149+
{ name: 'Default', props: { size: 80, color: '#3b82f6' } },
4150+
{ name: 'Large', props: { size: 120, color: '#8b5cf6', speed: 'slow' } },
4151+
],
4152+
importPath: "import { MorphBlob } from 'premium-react-loaders';",
4153+
},
4154+
{
4155+
id: 'liquid-fill',
4156+
name: 'LiquidFill',
4157+
category: 'morph',
4158+
component: LiquidFill,
4159+
description: 'Container that fills with animated liquid; supports determinate and indeterminate modes',
4160+
defaultProps: { value: 65, size: 80, color: '#3b82f6' },
4161+
propDefinitions: [
4162+
{ name: 'value', type: 'number', control: { type: 'range', min: 0, max: 100, step: 1 }, description: 'Fill percentage (0–100); omit for indeterminate', defaultValue: 65 },
4163+
{ name: 'size', type: 'number', control: { type: 'range', min: 40, max: 200, step: 8 }, description: 'Diameter in px', defaultValue: 80 },
4164+
{ name: 'color', type: 'string', control: { type: 'color' }, description: 'Liquid color', defaultValue: '#3b82f6' },
4165+
{ name: 'waveAmplitude', type: 'number', control: { type: 'range', min: 1, max: 12, step: 1 }, description: 'Wave height in px', defaultValue: 4 },
4166+
],
4167+
examples: [
4168+
{ name: 'Half Full', props: { value: 50, color: '#3b82f6' } },
4169+
{ name: 'Almost Full', props: { value: 90, color: '#10b981' } },
4170+
{ name: 'Indeterminate', props: {} },
4171+
],
4172+
importPath: "import { LiquidFill } from 'premium-react-loaders';",
4173+
},
4174+
{
4175+
id: 'wave-circle',
4176+
name: 'WaveCircle',
4177+
category: 'morph',
4178+
component: WaveCircle,
4179+
description: 'Concentric ripple rings expanding outward like a sonar pulse',
4180+
defaultProps: { size: 80, color: '#3b82f6', ringCount: 3 },
4181+
propDefinitions: [
4182+
{ name: 'size', type: 'number', control: { type: 'range', min: 40, max: 200, step: 8 }, description: 'Max diameter in px', defaultValue: 80 },
4183+
{ name: 'color', type: 'string', control: { type: 'color' }, description: 'Ring color', defaultValue: '#3b82f6' },
4184+
{ name: 'ringCount', type: 'number', control: { type: 'range', min: 2, max: 5, step: 1 }, description: 'Number of rings (2–5)', defaultValue: 3 },
4185+
{ name: 'speed', type: 'string', control: { type: 'select', options: ['slow', 'normal', 'fast'] }, description: 'Expansion speed', defaultValue: 'normal' },
4186+
],
4187+
examples: [
4188+
{ name: 'Default', props: { ringCount: 3 } },
4189+
{ name: 'Dense', props: { ringCount: 5, color: '#8b5cf6' } },
4190+
],
4191+
importPath: "import { WaveCircle } from 'premium-react-loaders';",
4192+
},
4193+
// ==================== GRADIENT COMPONENTS ====================
4194+
{
4195+
id: 'gradient-spinner',
4196+
name: 'GradientSpinner',
4197+
category: 'gradient',
4198+
component: GradientSpinner,
4199+
description: 'Circular spinner with a sweeping conic gradient animation',
4200+
defaultProps: { size: 48, color: '#3b82f6', secondaryColor: '#8b5cf6', thickness: 4 },
4201+
propDefinitions: [
4202+
{ name: 'size', type: 'number', control: { type: 'range', min: 24, max: 120, step: 8 }, description: 'Diameter in px', defaultValue: 48 },
4203+
{ name: 'color', type: 'string', control: { type: 'color' }, description: 'Gradient start color', defaultValue: '#3b82f6' },
4204+
{ name: 'secondaryColor', type: 'string', control: { type: 'color' }, description: 'Gradient end color', defaultValue: '#8b5cf6' },
4205+
{ name: 'thickness', type: 'number', control: { type: 'range', min: 2, max: 16, step: 1 }, description: 'Ring stroke width in px', defaultValue: 4 },
4206+
{ name: 'speed', type: 'string', control: { type: 'select', options: ['slow', 'normal', 'fast'] }, description: 'Spin speed', defaultValue: 'normal' },
4207+
],
4208+
examples: [
4209+
{ name: 'Default', props: {} },
4210+
{ name: 'Warm', props: { color: '#f59e0b', secondaryColor: '#ef4444', thickness: 6 } },
4211+
],
4212+
importPath: "import { GradientSpinner } from 'premium-react-loaders';",
4213+
},
4214+
{
4215+
id: 'gradient-ring',
4216+
name: 'GradientRing',
4217+
category: 'gradient',
4218+
component: GradientRing,
4219+
description: 'Ring with a flowing multi-stop gradient that rotates around the circumference',
4220+
defaultProps: { size: 48, colors: ['#3b82f6', '#8b5cf6', '#ec4899'], thickness: 6 },
4221+
propDefinitions: [
4222+
{ name: 'size', type: 'number', control: { type: 'range', min: 24, max: 120, step: 8 }, description: 'Diameter in px', defaultValue: 48 },
4223+
{ name: 'thickness', type: 'number', control: { type: 'range', min: 2, max: 20, step: 1 }, description: 'Ring width in px', defaultValue: 6 },
4224+
{ name: 'speed', type: 'string', control: { type: 'select', options: ['slow', 'normal', 'fast'] }, description: 'Animation speed', defaultValue: 'normal' },
4225+
],
4226+
examples: [
4227+
{ name: 'Default', props: {} },
4228+
{ name: 'Rainbow', props: { colors: ['#ef4444', '#f59e0b', '#10b981', '#3b82f6'], thickness: 8 } },
4229+
],
4230+
importPath: "import { GradientRing } from 'premium-react-loaders';",
4231+
},
4232+
{
4233+
id: 'gradient-bar',
4234+
name: 'GradientBar',
4235+
category: 'gradient',
4236+
component: GradientBar,
4237+
description: 'Progress bar with flowing animated gradient; supports determinate and indeterminate modes',
4238+
defaultProps: { value: 65, height: 8, color: '#3b82f6', secondaryColor: '#8b5cf6' },
4239+
propDefinitions: [
4240+
{ name: 'value', type: 'number', control: { type: 'range', min: 0, max: 100, step: 1 }, description: 'Progress (0–100); omit for indeterminate', defaultValue: 65 },
4241+
{ name: 'height', type: 'number', control: { type: 'range', min: 4, max: 24, step: 1 }, description: 'Bar height in px', defaultValue: 8 },
4242+
{ name: 'color', type: 'string', control: { type: 'color' }, description: 'Gradient start color', defaultValue: '#3b82f6' },
4243+
{ name: 'secondaryColor', type: 'string', control: { type: 'color' }, description: 'Gradient end color', defaultValue: '#8b5cf6' },
4244+
{ name: 'speed', type: 'string', control: { type: 'select', options: ['slow', 'normal', 'fast'] }, description: 'Flow speed', defaultValue: 'normal' },
4245+
],
4246+
examples: [
4247+
{ name: 'Determinate', props: { value: 65 } },
4248+
{ name: 'Indeterminate', props: {} },
4249+
{ name: 'Warm', props: { value: 80, color: '#f59e0b', secondaryColor: '#ef4444', height: 12 } },
4250+
],
4251+
importPath: "import { GradientBar } from 'premium-react-loaders';",
4252+
},
4253+
// ==================== PARTICLE COMPONENTS ====================
4254+
{
4255+
id: 'particle-burst',
4256+
name: 'ParticleBurst',
4257+
category: 'particle',
4258+
component: ParticleBurst,
4259+
description: 'Particles that burst outward from a central point in a looping animation',
4260+
defaultProps: { size: 60, count: 8, color: '#3b82f6', particleSize: 6 },
4261+
propDefinitions: [
4262+
{ name: 'size', type: 'number', control: { type: 'range', min: 40, max: 160, step: 8 }, description: 'Burst radius in px', defaultValue: 60 },
4263+
{ name: 'count', type: 'number', control: { type: 'range', min: 4, max: 20, step: 1 }, description: 'Number of particles', defaultValue: 8 },
4264+
{ name: 'color', type: 'string', control: { type: 'color' }, description: 'Particle color', defaultValue: '#3b82f6' },
4265+
{ name: 'particleSize', type: 'number', control: { type: 'range', min: 2, max: 16, step: 1 }, description: 'Dot diameter in px', defaultValue: 6 },
4266+
{ name: 'speed', type: 'string', control: { type: 'select', options: ['slow', 'normal', 'fast'] }, description: 'Burst cycle speed', defaultValue: 'normal' },
4267+
],
4268+
examples: [
4269+
{ name: 'Default', props: {} },
4270+
{ name: 'Dense', props: { count: 16, particleSize: 4, color: '#8b5cf6' } },
4271+
],
4272+
importPath: "import { ParticleBurst } from 'premium-react-loaders';",
4273+
},
4274+
{
4275+
id: 'particle-orbit',
4276+
name: 'ParticleOrbit',
4277+
category: 'particle',
4278+
component: ParticleOrbit,
4279+
description: 'Particles orbiting a central dot with staggered animation offsets',
4280+
defaultProps: { size: 80, count: 5, color: '#3b82f6' },
4281+
propDefinitions: [
4282+
{ name: 'size', type: 'number', control: { type: 'range', min: 40, max: 160, step: 8 }, description: 'Orbital diameter in px', defaultValue: 80 },
4283+
{ name: 'count', type: 'number', control: { type: 'range', min: 3, max: 8, step: 1 }, description: 'Number of particles', defaultValue: 5 },
4284+
{ name: 'color', type: 'string', control: { type: 'color' }, description: 'Particle color', defaultValue: '#3b82f6' },
4285+
{ name: 'centerColor', type: 'string', control: { type: 'color' }, description: 'Central dot color (defaults to color)', defaultValue: '#3b82f6' },
4286+
{ name: 'speed', type: 'string', control: { type: 'select', options: ['slow', 'normal', 'fast'] }, description: 'Orbit speed', defaultValue: 'normal' },
4287+
],
4288+
examples: [
4289+
{ name: 'Default', props: {} },
4290+
{ name: 'Multicolor', props: { count: 6, color: '#8b5cf6', centerColor: '#ef4444' } },
4291+
],
4292+
importPath: "import { ParticleOrbit } from 'premium-react-loaders';",
4293+
},
41244294
];
41254295

41264296
// Helper functions
@@ -4149,4 +4319,7 @@ export const CATEGORIES = [
41494319
{ id: '3d', name: '3D', description: 'Immersive 3D animations' },
41504320
{ id: 'smart', name: 'Smart', description: 'Intelligent context-aware loaders' },
41514321
{ id: 'accessibility', name: 'Accessibility', description: 'Screen reader support' },
4322+
{ id: 'morph', name: 'Morph', description: 'Fluid and organic morphing animations' },
4323+
{ id: 'gradient', name: 'Gradient', description: 'Animated gradient spinners and bars' },
4324+
{ id: 'particle', name: 'Particle', description: 'Particle-based loading animations' },
41524325
];

demo/src/types/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { ComponentType } from 'react';
22

3-
export type ComponentCategory = 'skeleton' | 'spinner' | 'progress' | 'pulse' | 'overlay' | 'button' | 'status' | 'transition' | 'shimmer' | 'orbit' | 'bounce' | 'infinity' | 'text' | '3d' | 'smart' | 'accessibility';
3+
export type ComponentCategory = 'skeleton' | 'spinner' | 'progress' | 'pulse' | 'overlay' | 'button' | 'status' | 'transition' | 'shimmer' | 'orbit' | 'bounce' | 'infinity' | 'text' | '3d' | 'smart' | 'accessibility' | 'morph' | 'gradient' | 'particle';
44

55
export type ControlType = 'number' | 'color' | 'select' | 'boolean' | 'range' | 'text';
66

0 commit comments

Comments
 (0)