aliveicon 1.0.2 → 1.0.4
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
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("framer-motion"),r=require("react");const n=r.forwardRef((({className:n="",size:i=28,...a},o)=>{const s=t.useAnimation(),l=r.useRef(!1);r.useImperativeHandle(o,(()=>({...o?.current,startAnimation:()=>(l.current=!0,s.start("animate")),stopAnimation:()=>(l.current=!0,s.start("normal"))})));const m=r.useCallback((e=>{l.current?a.onMouseEnter?.(e):s.start("animate")}),[s,a]),c=r.useCallback((e=>{l.current?a.onMouseLeave?.(e):s.start("normal")}),[s,a]);return e.jsx("div",{className:`inline-flex items-center justify-center ${n}`,onMouseEnter:m,onMouseLeave:c,...a,children:e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-current",children:[e.jsxs(t.motion.g,{transition:{type:"spring",stiffness:250,damping:25},variants:{normal:{rotate:"0deg"},animate:{rotate:"-50deg"}},animate:s,initial:"normal",children:[e.jsx("path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"}),e.jsx("path",{d:"M3 3v5h5"})]}),e.jsx(t.motion.line,{x1:"12",y1:"12",x2:"12",y2:"7",variants:{normal:{rotate:0,originX:"50%",originY:"50%"},animate:{rotate:-360}},animate:s,initial:"normal",transition:{duration:.6,ease:[.4,0,.2,1]}}),e.jsx(t.motion.line,{x1:"12",y1:"12",x2:"16",y2:"14",variants:{normal:{rotate:0,originX:"50%",originY:"50%"},animate:{rotate:-45}},animate:s,initial:"normal",transition:{duration:.5,ease:"easeInOut"}})]})})}));n.displayName="History",exports.Clock=({size:r=24,color:n="currentColor",className:i=""})=>e.jsxs(t.motion.svg,{className:i,width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:n,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",initial:{rotate:0},animate:{rotate:360},transition:{repeat:1/0,duration:4,ease:"linear"},children:[e.jsx("circle",{cx:"12",cy:"12",r:"10"}),e.jsx("polyline",{points:"12 6 12 12 16 14"})]}),exports.History=n;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsxs as
|
|
1
|
+
import{jsxs as t,jsx as e}from"react/jsx-runtime";import{motion as n,useAnimation as r}from"framer-motion";import{forwardRef as i,useRef as a,useImperativeHandle as o,useCallback as s}from"react";const l=({size:r=24,color:i="currentColor",className:a=""})=>t(n.svg,{className:a,width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:i,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",initial:{rotate:0},animate:{rotate:360},transition:{repeat:1/0,duration:4,ease:"linear"},children:[e("circle",{cx:"12",cy:"12",r:"10"}),e("polyline",{points:"12 6 12 12 16 14"})]}),m=i((({className:i="",size:l=28,...m},c)=>{const u=r(),d=a(!1);o(c,(()=>({...c?.current,startAnimation:()=>(d.current=!0,u.start("animate")),stopAnimation:()=>(d.current=!0,u.start("normal"))})));const p=s((t=>{d.current?m.onMouseEnter?.(t):u.start("animate")}),[u,m]),h=s((t=>{d.current?m.onMouseLeave?.(t):u.start("normal")}),[u,m]);return e("div",{className:`inline-flex items-center justify-center ${i}`,onMouseEnter:p,onMouseLeave:h,...m,children:t("svg",{xmlns:"http://www.w3.org/2000/svg",width:l,height:l,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-current",children:[t(n.g,{transition:{type:"spring",stiffness:250,damping:25},variants:{normal:{rotate:"0deg"},animate:{rotate:"-50deg"}},animate:u,initial:"normal",children:[e("path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"}),e("path",{d:"M3 3v5h5"})]}),e(n.line,{x1:"12",y1:"12",x2:"12",y2:"7",variants:{normal:{rotate:0,originX:"50%",originY:"50%"},animate:{rotate:-360}},animate:u,initial:"normal",transition:{duration:.6,ease:[.4,0,.2,1]}}),e(n.line,{x1:"12",y1:"12",x2:"16",y2:"14",variants:{normal:{rotate:0,originX:"50%",originY:"50%"},animate:{rotate:-45}},animate:u,initial:"normal",transition:{duration:.5,ease:"easeInOut"}})]})})}));m.displayName="History";export{l as Clock,m as History};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import React from
|
|
1
|
+
import React from "react";
|
|
2
2
|
type Props = {
|
|
3
3
|
size?: number;
|
|
4
4
|
color?: string;
|
|
5
5
|
className?: string;
|
|
6
|
-
onClick?: () => void;
|
|
7
6
|
};
|
|
8
|
-
export declare const
|
|
7
|
+
export declare const Clock: React.FC<Props>;
|
|
9
8
|
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
interface HistoryProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
2
|
+
className?: string;
|
|
3
|
+
size?: number;
|
|
4
|
+
}
|
|
5
|
+
export declare const History: import("react").ForwardRefExoticComponent<HistoryProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
6
|
+
export default History;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { Clock } from './icons/ClockIcon';
|
|
2
|
+
export { History } from './icons/History';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aliveicon",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "This is a project for animated icons library",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -32,12 +32,13 @@
|
|
|
32
32
|
"homepage": "https://github.com/Hemang-patel-9/aliveicon#readme",
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"framer-motion": "^10.0.0",
|
|
35
|
-
"react": "19.
|
|
35
|
+
"react": "^19.1.0",
|
|
36
|
+
"react-dom": "^19.1.0",
|
|
36
37
|
"tailwindcss": "^4.1.6"
|
|
37
38
|
},
|
|
38
39
|
"peerDependencies": {
|
|
39
|
-
"react": "^
|
|
40
|
-
"react-dom": "^
|
|
40
|
+
"react": "^19.1.0",
|
|
41
|
+
"react-dom": "^19.1.0",
|
|
41
42
|
"framer-motion": "^10.0.0"
|
|
42
43
|
},
|
|
43
44
|
"devDependencies": {
|
|
@@ -55,8 +56,8 @@
|
|
|
55
56
|
"rollup-plugin-terser": "^7.0.2",
|
|
56
57
|
"rollup-plugin-typescript2": "^0.36.0",
|
|
57
58
|
"typescript": "^5.8.3",
|
|
58
|
-
"react": "^19.
|
|
59
|
-
"react-dom": "^19.
|
|
59
|
+
"react": "^19.1.0",
|
|
60
|
+
"react-dom": "^19.1.0",
|
|
60
61
|
"framer-motion": "^10.0.0"
|
|
61
62
|
}
|
|
62
63
|
}
|