aliveicon 1.0.22 → 1.0.23
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/dist/cjs/index.js +407 -4
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +404 -6
- package/dist/esm/index.js.map +1 -1
- package/dist/types/icons/A-Arrow-Down.d.ts +13 -0
- package/dist/types/icons/A-Arrow-Up.d.ts +13 -0
- package/dist/types/icons/Accessibility.d.ts +12 -0
- package/dist/types/icons/Activity.d.ts +12 -0
- package/dist/types/icons/Air-vent.d.ts +10 -0
- package/dist/types/index.d.ts +5 -0
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -2963,7 +2963,7 @@ const getDefaultConfig = () => {
|
|
|
2963
2963
|
};
|
|
2964
2964
|
const twMerge = /*#__PURE__*/createTailwindMerge(getDefaultConfig);
|
|
2965
2965
|
|
|
2966
|
-
function cn(...inputs) {
|
|
2966
|
+
function cn$5(...inputs) {
|
|
2967
2967
|
return twMerge(clsx(inputs));
|
|
2968
2968
|
}
|
|
2969
2969
|
const squareVariants = {
|
|
@@ -2978,7 +2978,7 @@ const squareVariants = {
|
|
|
2978
2978
|
transition: { duration: 0.6, ease: 'easeInOut' },
|
|
2979
2979
|
},
|
|
2980
2980
|
};
|
|
2981
|
-
const pathVariants = {
|
|
2981
|
+
const pathVariants$2 = {
|
|
2982
2982
|
normal: {
|
|
2983
2983
|
opacity: 1,
|
|
2984
2984
|
pathLength: 1,
|
|
@@ -3031,13 +3031,416 @@ function SquareActivity({ size = 28, className, style, autoAnimateOnLoad = false
|
|
|
3031
3031
|
triggerAnimation();
|
|
3032
3032
|
onClick?.(e);
|
|
3033
3033
|
};
|
|
3034
|
-
return (jsxRuntime.jsx("div", { className: cn('rounded-md', className), style: {
|
|
3034
|
+
return (jsxRuntime.jsx("div", { className: cn$5('rounded-md', className), style: {
|
|
3035
|
+
width: size,
|
|
3036
|
+
height: size,
|
|
3037
|
+
display: 'inline-block',
|
|
3038
|
+
...style,
|
|
3039
|
+
}, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, onClick: handleClick, ...props, children: jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", width: "100%", height: "100%", children: [jsxRuntime.jsx(framerMotion.motion.rect, { width: "18", height: "18", x: "3", y: "3", rx: "2", variants: squareVariants, animate: controls, initial: "normal" }), jsxRuntime.jsx(framerMotion.motion.path, { d: "M17 12h-2l-2 5-2-10-2 5H7", variants: pathVariants$2, animate: controls, initial: "normal", style: { strokeDasharray: 1 } })] }) }));
|
|
3040
|
+
}
|
|
3041
|
+
|
|
3042
|
+
function cn$4(...inputs) {
|
|
3043
|
+
return twMerge(clsx(inputs));
|
|
3044
|
+
}
|
|
3045
|
+
const bounceVariant$1 = {
|
|
3046
|
+
normal: {
|
|
3047
|
+
scale: 1,
|
|
3048
|
+
transition: {
|
|
3049
|
+
type: 'spring',
|
|
3050
|
+
stiffness: 200,
|
|
3051
|
+
damping: 15,
|
|
3052
|
+
},
|
|
3053
|
+
},
|
|
3054
|
+
animate: {
|
|
3055
|
+
scale: 1.2,
|
|
3056
|
+
transition: {
|
|
3057
|
+
type: 'spring',
|
|
3058
|
+
stiffness: 300,
|
|
3059
|
+
damping: 10,
|
|
3060
|
+
},
|
|
3061
|
+
},
|
|
3062
|
+
};
|
|
3063
|
+
const lineVariants$1 = {
|
|
3064
|
+
normal: {
|
|
3065
|
+
opacity: 1,
|
|
3066
|
+
pathLength: 1,
|
|
3067
|
+
pathOffset: 0,
|
|
3068
|
+
transition: {
|
|
3069
|
+
duration: 0.4,
|
|
3070
|
+
opacity: { duration: 0.1 },
|
|
3071
|
+
},
|
|
3072
|
+
},
|
|
3073
|
+
animate: {
|
|
3074
|
+
opacity: [0, 1],
|
|
3075
|
+
pathLength: [0, 1],
|
|
3076
|
+
pathOffset: [1, 0],
|
|
3077
|
+
transition: {
|
|
3078
|
+
duration: 0.6,
|
|
3079
|
+
ease: 'easeInOut',
|
|
3080
|
+
opacity: { duration: 0.1 },
|
|
3081
|
+
},
|
|
3082
|
+
},
|
|
3083
|
+
};
|
|
3084
|
+
const bouncePathVariants$1 = {
|
|
3085
|
+
hidden: {
|
|
3086
|
+
pathLength: 0,
|
|
3087
|
+
opacity: 0,
|
|
3088
|
+
},
|
|
3089
|
+
visible: (i) => ({
|
|
3090
|
+
pathLength: 1,
|
|
3091
|
+
opacity: 1,
|
|
3092
|
+
transition: {
|
|
3093
|
+
pathLength: { delay: i * 0.1, duration: 0.4, ease: 'easeInOut' },
|
|
3094
|
+
opacity: { delay: i * 0.1, duration: 0.2 },
|
|
3095
|
+
},
|
|
3096
|
+
}),
|
|
3097
|
+
};
|
|
3098
|
+
function ArrowDown({ size = 28, className, style, autoAnimateOnLoad = false, hoverable = true, loopOnHover = false, animateOnClick = false, isBounce = false, onMouseEnter, onMouseLeave, onClick, ...props }) {
|
|
3099
|
+
const controls = framerMotion.useAnimation();
|
|
3100
|
+
const loopRef = react.useRef(loopOnHover);
|
|
3101
|
+
const triggerAnimation = react.useCallback(async () => {
|
|
3102
|
+
await controls.start('animate');
|
|
3103
|
+
await controls.start('normal');
|
|
3104
|
+
if (loopRef.current)
|
|
3105
|
+
triggerAnimation();
|
|
3106
|
+
}, [controls]);
|
|
3107
|
+
react.useEffect(() => {
|
|
3108
|
+
loopRef.current = loopOnHover;
|
|
3109
|
+
}, [loopOnHover]);
|
|
3110
|
+
react.useEffect(() => {
|
|
3111
|
+
if (autoAnimateOnLoad)
|
|
3112
|
+
triggerAnimation();
|
|
3113
|
+
}, [autoAnimateOnLoad, triggerAnimation]);
|
|
3114
|
+
const handleMouseEnter = (e) => {
|
|
3115
|
+
if (hoverable)
|
|
3116
|
+
triggerAnimation();
|
|
3117
|
+
onMouseEnter?.(e);
|
|
3118
|
+
};
|
|
3119
|
+
const handleMouseLeave = (e) => {
|
|
3120
|
+
if (hoverable)
|
|
3121
|
+
controls.start('normal');
|
|
3122
|
+
onMouseLeave?.(e);
|
|
3123
|
+
};
|
|
3124
|
+
const handleClick = (e) => {
|
|
3125
|
+
if (animateOnClick)
|
|
3126
|
+
triggerAnimation();
|
|
3127
|
+
onClick?.(e);
|
|
3128
|
+
};
|
|
3129
|
+
const paths = [
|
|
3130
|
+
"M3.5 13h6",
|
|
3131
|
+
"m2 16 4.5-9 4.5 9",
|
|
3132
|
+
"M18 7v9",
|
|
3133
|
+
"m14 12 4 4 4-4",
|
|
3134
|
+
];
|
|
3135
|
+
return (jsxRuntime.jsx("div", { className: cn$4('inline-block', className), style: {
|
|
3136
|
+
width: size,
|
|
3137
|
+
height: size,
|
|
3138
|
+
...style,
|
|
3139
|
+
}, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, onClick: handleClick, ...props, children: jsxRuntime.jsx(framerMotion.motion.svg, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", width: "100%", height: "100%", variants: isBounce ? bounceVariant$1 : undefined, animate: isBounce ? controls : undefined, initial: isBounce ? 'normal' : undefined, children: paths.map((d, i) => (jsxRuntime.jsx(framerMotion.motion.path, { d: d, variants: isBounce ? bouncePathVariants$1 : lineVariants$1, initial: isBounce ? 'hidden' : 'normal', animate: isBounce ? 'visible' : controls, custom: i }, i))) }) }));
|
|
3140
|
+
}
|
|
3141
|
+
|
|
3142
|
+
function cn$3(...inputs) {
|
|
3143
|
+
return twMerge(clsx(inputs));
|
|
3144
|
+
}
|
|
3145
|
+
const bounceVariant = {
|
|
3146
|
+
normal: {
|
|
3147
|
+
scale: 1,
|
|
3148
|
+
transition: {
|
|
3149
|
+
type: 'spring',
|
|
3150
|
+
stiffness: 200,
|
|
3151
|
+
damping: 15,
|
|
3152
|
+
},
|
|
3153
|
+
},
|
|
3154
|
+
animate: {
|
|
3155
|
+
scale: 1.2,
|
|
3156
|
+
transition: {
|
|
3157
|
+
type: 'spring',
|
|
3158
|
+
stiffness: 300,
|
|
3159
|
+
damping: 10,
|
|
3160
|
+
},
|
|
3161
|
+
},
|
|
3162
|
+
};
|
|
3163
|
+
const lineVariants = {
|
|
3164
|
+
normal: {
|
|
3165
|
+
opacity: 1,
|
|
3166
|
+
pathLength: 1,
|
|
3167
|
+
pathOffset: 0,
|
|
3168
|
+
transition: {
|
|
3169
|
+
duration: 0.4,
|
|
3170
|
+
opacity: { duration: 0.1 },
|
|
3171
|
+
},
|
|
3172
|
+
},
|
|
3173
|
+
animate: {
|
|
3174
|
+
opacity: [0, 1],
|
|
3175
|
+
pathLength: [0, 1],
|
|
3176
|
+
pathOffset: [1, 0],
|
|
3177
|
+
transition: {
|
|
3178
|
+
duration: 0.6,
|
|
3179
|
+
ease: 'easeInOut',
|
|
3180
|
+
opacity: { duration: 0.1 },
|
|
3181
|
+
},
|
|
3182
|
+
},
|
|
3183
|
+
};
|
|
3184
|
+
const bouncePathVariants = {
|
|
3185
|
+
hidden: {
|
|
3186
|
+
pathLength: 0,
|
|
3187
|
+
opacity: 0,
|
|
3188
|
+
},
|
|
3189
|
+
visible: (i) => ({
|
|
3190
|
+
pathLength: 1,
|
|
3191
|
+
opacity: 1,
|
|
3192
|
+
transition: {
|
|
3193
|
+
pathLength: { delay: i * 0.1, duration: 0.4, ease: 'easeInOut' },
|
|
3194
|
+
opacity: { delay: i * 0.1, duration: 0.2 },
|
|
3195
|
+
},
|
|
3196
|
+
}),
|
|
3197
|
+
};
|
|
3198
|
+
function ArrowUp({ size = 28, className, style, autoAnimateOnLoad = false, hoverable = true, loopOnHover = false, animateOnClick = false, isBounce = false, onMouseEnter, onMouseLeave, onClick, ...props }) {
|
|
3199
|
+
const controls = framerMotion.useAnimation();
|
|
3200
|
+
const loopRef = react.useRef(loopOnHover);
|
|
3201
|
+
const triggerAnimation = react.useCallback(async () => {
|
|
3202
|
+
await controls.start('animate');
|
|
3203
|
+
await controls.start('normal');
|
|
3204
|
+
if (loopRef.current)
|
|
3205
|
+
triggerAnimation();
|
|
3206
|
+
}, [controls]);
|
|
3207
|
+
react.useEffect(() => {
|
|
3208
|
+
loopRef.current = loopOnHover;
|
|
3209
|
+
}, [loopOnHover]);
|
|
3210
|
+
react.useEffect(() => {
|
|
3211
|
+
if (autoAnimateOnLoad)
|
|
3212
|
+
triggerAnimation();
|
|
3213
|
+
}, [autoAnimateOnLoad, triggerAnimation]);
|
|
3214
|
+
const handleMouseEnter = (e) => {
|
|
3215
|
+
if (hoverable)
|
|
3216
|
+
triggerAnimation();
|
|
3217
|
+
onMouseEnter?.(e);
|
|
3218
|
+
};
|
|
3219
|
+
const handleMouseLeave = (e) => {
|
|
3220
|
+
if (hoverable)
|
|
3221
|
+
controls.start('normal');
|
|
3222
|
+
onMouseLeave?.(e);
|
|
3223
|
+
};
|
|
3224
|
+
const handleClick = (e) => {
|
|
3225
|
+
if (animateOnClick)
|
|
3226
|
+
triggerAnimation();
|
|
3227
|
+
onClick?.(e);
|
|
3228
|
+
};
|
|
3229
|
+
const paths = [
|
|
3230
|
+
"M3.5 13h6", // horizontal part of the "A"
|
|
3231
|
+
"m2 16 4.5-9 4.5 9", // the "A" structure stays same
|
|
3232
|
+
"M18 16V7", // arrow line, now reversed (was 7→16, now 16→7)
|
|
3233
|
+
"m22 12-4-4-4 4", // arrow head pointing upward
|
|
3234
|
+
];
|
|
3235
|
+
return (jsxRuntime.jsx("div", { className: cn$3('inline-block', className), style: {
|
|
3236
|
+
width: size,
|
|
3237
|
+
height: size,
|
|
3238
|
+
...style,
|
|
3239
|
+
}, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, onClick: handleClick, ...props, children: jsxRuntime.jsx(framerMotion.motion.svg, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", width: "100%", height: "100%", variants: isBounce ? bounceVariant : undefined, animate: isBounce ? controls : undefined, initial: isBounce ? 'normal' : undefined, children: paths.map((d, i) => (jsxRuntime.jsx(framerMotion.motion.path, { d: d, variants: isBounce ? bouncePathVariants : lineVariants, initial: isBounce ? 'hidden' : 'normal', animate: isBounce ? 'visible' : controls, custom: i }, i))) }) }));
|
|
3240
|
+
}
|
|
3241
|
+
|
|
3242
|
+
function cn$2(...inputs) {
|
|
3243
|
+
return twMerge(clsx(inputs));
|
|
3244
|
+
}
|
|
3245
|
+
const circleVariants = {
|
|
3246
|
+
normal: {
|
|
3247
|
+
scale: 1,
|
|
3248
|
+
opacity: 1,
|
|
3249
|
+
transition: { duration: 0.4 },
|
|
3250
|
+
},
|
|
3251
|
+
animate: {
|
|
3252
|
+
scale: [1, 1.2, 1],
|
|
3253
|
+
opacity: [1, 0.8, 1],
|
|
3254
|
+
transition: {
|
|
3255
|
+
duration: 0.6,
|
|
3256
|
+
times: [0, 0.5, 1],
|
|
3257
|
+
ease: 'easeInOut'
|
|
3258
|
+
},
|
|
3259
|
+
},
|
|
3260
|
+
};
|
|
3261
|
+
const pathVariants$1 = {
|
|
3262
|
+
normal: {
|
|
3263
|
+
opacity: 1,
|
|
3264
|
+
pathLength: 1,
|
|
3265
|
+
pathOffset: 0,
|
|
3266
|
+
transition: {
|
|
3267
|
+
duration: 0.4,
|
|
3268
|
+
opacity: { duration: 0.1 },
|
|
3269
|
+
},
|
|
3270
|
+
},
|
|
3271
|
+
animate: {
|
|
3272
|
+
opacity: [0, 1],
|
|
3273
|
+
pathLength: [0, 1],
|
|
3274
|
+
pathOffset: [1, 0],
|
|
3275
|
+
transition: {
|
|
3276
|
+
duration: 0.6,
|
|
3277
|
+
ease: 'linear',
|
|
3278
|
+
opacity: { duration: 0.1 },
|
|
3279
|
+
},
|
|
3280
|
+
},
|
|
3281
|
+
};
|
|
3282
|
+
function AccessibilityActivity({ size = 28, className, style, autoAnimateOnLoad = false, hoverable = true, loopOnHover = false, animateOnClick = false, onMouseEnter, onMouseLeave, onClick, ...props }) {
|
|
3283
|
+
const controls = framerMotion.useAnimation();
|
|
3284
|
+
const loopRef = react.useRef(loopOnHover);
|
|
3285
|
+
const triggerAnimation = react.useCallback(async () => {
|
|
3286
|
+
await controls.start('animate');
|
|
3287
|
+
await controls.start('normal');
|
|
3288
|
+
if (loopRef.current)
|
|
3289
|
+
triggerAnimation();
|
|
3290
|
+
}, [controls]);
|
|
3291
|
+
react.useEffect(() => {
|
|
3292
|
+
loopRef.current = loopOnHover;
|
|
3293
|
+
}, [loopOnHover]);
|
|
3294
|
+
react.useEffect(() => {
|
|
3295
|
+
if (autoAnimateOnLoad)
|
|
3296
|
+
triggerAnimation();
|
|
3297
|
+
}, [autoAnimateOnLoad, triggerAnimation]);
|
|
3298
|
+
const handleMouseEnter = (e) => {
|
|
3299
|
+
if (hoverable)
|
|
3300
|
+
triggerAnimation();
|
|
3301
|
+
onMouseEnter?.(e);
|
|
3302
|
+
};
|
|
3303
|
+
const handleMouseLeave = (e) => {
|
|
3304
|
+
if (hoverable)
|
|
3305
|
+
controls.start('normal');
|
|
3306
|
+
onMouseLeave?.(e);
|
|
3307
|
+
};
|
|
3308
|
+
const handleClick = (e) => {
|
|
3309
|
+
if (animateOnClick)
|
|
3310
|
+
triggerAnimation();
|
|
3311
|
+
onClick?.(e);
|
|
3312
|
+
};
|
|
3313
|
+
return (jsxRuntime.jsx("div", { className: cn$2('rounded-md', className), style: {
|
|
3314
|
+
width: size,
|
|
3315
|
+
height: size,
|
|
3316
|
+
display: 'inline-block',
|
|
3317
|
+
...style,
|
|
3318
|
+
}, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, onClick: handleClick, ...props, children: jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", width: "100%", height: "100%", children: [jsxRuntime.jsx(framerMotion.motion.circle, { cx: "16", cy: "4", r: "1", variants: circleVariants, animate: controls, initial: "normal" }), jsxRuntime.jsx(framerMotion.motion.path, { d: "m18 19 1-7-6 1", variants: pathVariants$1, animate: controls, initial: "normal", style: { strokeDasharray: 1 } }), jsxRuntime.jsx(framerMotion.motion.path, { d: "m5 8 3-3 5.5 3-2.36 3.5", variants: pathVariants$1, animate: controls, initial: "normal", style: { strokeDasharray: 1 } }), jsxRuntime.jsx(framerMotion.motion.path, { d: "M4.24 14.5a5 5 0 0 0 6.88 6", variants: pathVariants$1, animate: controls, initial: "normal", style: { strokeDasharray: 1 } }), jsxRuntime.jsx(framerMotion.motion.path, { d: "M13.76 17.5a5 5 0 0 0-6.88-6", variants: pathVariants$1, animate: controls, initial: "normal", style: { strokeDasharray: 1 } })] }) }));
|
|
3319
|
+
}
|
|
3320
|
+
|
|
3321
|
+
function cn$1(...inputs) {
|
|
3322
|
+
return twMerge(clsx(inputs));
|
|
3323
|
+
}
|
|
3324
|
+
const pathVariants = {
|
|
3325
|
+
normal: {
|
|
3326
|
+
opacity: 1,
|
|
3327
|
+
pathLength: 1,
|
|
3328
|
+
pathOffset: 0,
|
|
3329
|
+
transition: {
|
|
3330
|
+
duration: 0.4,
|
|
3331
|
+
opacity: { duration: 0.1 },
|
|
3332
|
+
},
|
|
3333
|
+
},
|
|
3334
|
+
animate: {
|
|
3335
|
+
opacity: [0, 1],
|
|
3336
|
+
pathLength: [0, 1],
|
|
3337
|
+
pathOffset: [1, 0],
|
|
3338
|
+
transition: {
|
|
3339
|
+
duration: 0.6,
|
|
3340
|
+
ease: 'linear',
|
|
3341
|
+
opacity: { duration: 0.1 },
|
|
3342
|
+
},
|
|
3343
|
+
},
|
|
3344
|
+
};
|
|
3345
|
+
function Activity({ size = 28, className, style, autoAnimateOnLoad = false, hoverable = true, loopOnHover = false, animateOnClick = false, onMouseEnter, onMouseLeave, onClick, ...props }) {
|
|
3346
|
+
const controls = framerMotion.useAnimation();
|
|
3347
|
+
const loopRef = react.useRef(loopOnHover);
|
|
3348
|
+
const triggerAnimation = react.useCallback(async () => {
|
|
3349
|
+
console.log("started animation");
|
|
3350
|
+
await controls.start('animate');
|
|
3351
|
+
await controls.start('normal');
|
|
3352
|
+
if (loopRef.current)
|
|
3353
|
+
triggerAnimation();
|
|
3354
|
+
}, [controls]);
|
|
3355
|
+
react.useEffect(() => {
|
|
3356
|
+
loopRef.current = loopOnHover;
|
|
3357
|
+
}, [loopOnHover]);
|
|
3358
|
+
react.useEffect(() => {
|
|
3359
|
+
if (autoAnimateOnLoad)
|
|
3360
|
+
triggerAnimation();
|
|
3361
|
+
}, [autoAnimateOnLoad, triggerAnimation]);
|
|
3362
|
+
const handleMouseEnter = (e) => {
|
|
3363
|
+
if (hoverable)
|
|
3364
|
+
triggerAnimation();
|
|
3365
|
+
onMouseEnter?.(e);
|
|
3366
|
+
};
|
|
3367
|
+
const handleMouseLeave = (e) => {
|
|
3368
|
+
if (hoverable)
|
|
3369
|
+
controls.start('normal');
|
|
3370
|
+
onMouseLeave?.(e);
|
|
3371
|
+
};
|
|
3372
|
+
const handleClick = (e) => {
|
|
3373
|
+
if (animateOnClick)
|
|
3374
|
+
triggerAnimation();
|
|
3375
|
+
onClick?.(e);
|
|
3376
|
+
};
|
|
3377
|
+
return (jsxRuntime.jsx("div", { className: cn$1('rounded-md', className), style: {
|
|
3035
3378
|
width: size,
|
|
3036
3379
|
height: size,
|
|
3037
3380
|
display: 'inline-block',
|
|
3038
3381
|
...style,
|
|
3039
|
-
}, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, onClick: handleClick, ...props, children: jsxRuntime.
|
|
3382
|
+
}, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, onClick: handleClick, ...props, children: jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", width: "100%", height: "100%", children: jsxRuntime.jsx(framerMotion.motion.path, { d: "M17 12h-2l-2 5-2-10-2 5H7", variants: pathVariants, animate: controls, initial: "normal", style: { strokeDasharray: 1 } }) }) }));
|
|
3040
3383
|
}
|
|
3041
3384
|
|
|
3385
|
+
function cn(...inputs) {
|
|
3386
|
+
return twMerge(clsx(inputs));
|
|
3387
|
+
}
|
|
3388
|
+
const windVariants = {
|
|
3389
|
+
normal: (custom) => ({
|
|
3390
|
+
pathLength: 1,
|
|
3391
|
+
opacity: 1,
|
|
3392
|
+
pathOffset: 0,
|
|
3393
|
+
transition: {
|
|
3394
|
+
duration: 0.3,
|
|
3395
|
+
ease: 'easeInOut',
|
|
3396
|
+
delay: custom,
|
|
3397
|
+
},
|
|
3398
|
+
}),
|
|
3399
|
+
animate: (custom) => ({
|
|
3400
|
+
pathLength: [0, 1],
|
|
3401
|
+
opacity: [0, 1],
|
|
3402
|
+
pathOffset: [1, 0],
|
|
3403
|
+
transition: {
|
|
3404
|
+
duration: 0.5,
|
|
3405
|
+
ease: 'easeInOut',
|
|
3406
|
+
delay: custom,
|
|
3407
|
+
},
|
|
3408
|
+
}),
|
|
3409
|
+
};
|
|
3410
|
+
const AirVent = react.forwardRef(({ onMouseEnter, onMouseLeave, className, size = 28, ...props }, ref) => {
|
|
3411
|
+
const controls = framerMotion.useAnimation();
|
|
3412
|
+
const isControlledRef = react.useRef(false);
|
|
3413
|
+
react.useImperativeHandle(ref, () => {
|
|
3414
|
+
isControlledRef.current = true;
|
|
3415
|
+
return {
|
|
3416
|
+
startAnimation: () => controls.start('animate'),
|
|
3417
|
+
stopAnimation: () => controls.start('normal'),
|
|
3418
|
+
};
|
|
3419
|
+
});
|
|
3420
|
+
const handleMouseEnter = react.useCallback((e) => {
|
|
3421
|
+
if (!isControlledRef.current) {
|
|
3422
|
+
controls.start('animate');
|
|
3423
|
+
}
|
|
3424
|
+
else {
|
|
3425
|
+
onMouseEnter?.(e);
|
|
3426
|
+
}
|
|
3427
|
+
}, [controls, onMouseEnter]);
|
|
3428
|
+
const handleMouseLeave = react.useCallback((e) => {
|
|
3429
|
+
if (!isControlledRef.current) {
|
|
3430
|
+
controls.start('normal');
|
|
3431
|
+
}
|
|
3432
|
+
else {
|
|
3433
|
+
onMouseLeave?.(e);
|
|
3434
|
+
}
|
|
3435
|
+
}, [controls, onMouseLeave]);
|
|
3436
|
+
return (jsxRuntime.jsx("div", { className: cn(className), onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, ...props, children: jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [jsxRuntime.jsx("path", { d: "M6 12H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2" }), jsxRuntime.jsx(framerMotion.motion.path, { d: "M6 8h12", variants: windVariants, initial: "normal", animate: controls, custom: 0.1 }), jsxRuntime.jsx(framerMotion.motion.path, { d: "M18.3 17.7a2.5 2.5 0 0 1-3.16 3.83 2.53 2.53 0 0 1-1.14-2V12", variants: windVariants, initial: "normal", animate: controls, custom: 0 }), jsxRuntime.jsx(framerMotion.motion.path, { d: "M6.6 15.6A2 2 0 1 0 10 17v-5", variants: windVariants, initial: "normal", animate: controls, custom: 0.2 })] }) }));
|
|
3437
|
+
});
|
|
3438
|
+
AirVent.displayName = 'AirVent';
|
|
3439
|
+
|
|
3440
|
+
exports.AccessibilityActivity = AccessibilityActivity;
|
|
3441
|
+
exports.Activity = Activity;
|
|
3442
|
+
exports.AirVent = AirVent;
|
|
3443
|
+
exports.ArrowDown = ArrowDown;
|
|
3444
|
+
exports.ArrowUp = ArrowUp;
|
|
3042
3445
|
exports.SquareActivity = SquareActivity;
|
|
3043
3446
|
//# sourceMappingURL=index.js.map
|