@sonhoseong/mfa-lib 1.1.2 → 1.2.1
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/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +2 -0
- package/dist/components/logo/Logo.d.ts +22 -0
- package/dist/components/logo/Logo.d.ts.map +1 -0
- package/dist/components/logo/Logo.js +38 -0
- package/dist/components/logo/index.d.ts +2 -0
- package/dist/components/logo/index.d.ts.map +1 -0
- package/dist/components/logo/index.js +1 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AACA,cAAc,UAAU,CAAC;AAGzB,cAAc,WAAW,CAAC;AAG1B,cAAc,SAAS,CAAC;AAGxB,cAAc,SAAS,CAAC;AAGxB,cAAc,SAAS,CAAC;AAGxB,cAAc,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AACA,cAAc,UAAU,CAAC;AAGzB,cAAc,WAAW,CAAC;AAG1B,cAAc,SAAS,CAAC;AAGxB,cAAc,SAAS,CAAC;AAGxB,cAAc,SAAS,CAAC;AAGxB,cAAc,cAAc,CAAC;AAG7B,cAAc,QAAQ,CAAC"}
|
package/dist/components/index.js
CHANGED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface LogoProps {
|
|
3
|
+
/** 크기 프리셋 */
|
|
4
|
+
size?: 'sm' | 'md' | 'lg' | 'xl';
|
|
5
|
+
/** 커스텀 크기 (중앙 아이콘 기준 px) */
|
|
6
|
+
customSize?: number;
|
|
7
|
+
/** ㅅ 색상 */
|
|
8
|
+
sideColor?: string;
|
|
9
|
+
/** ㅎ 색상 */
|
|
10
|
+
centerColor?: string;
|
|
11
|
+
/** 눈 색상 */
|
|
12
|
+
eyeColor?: string;
|
|
13
|
+
/** 호버 효과 활성화 */
|
|
14
|
+
interactive?: boolean;
|
|
15
|
+
/** 클릭 핸들러 */
|
|
16
|
+
onClick?: () => void;
|
|
17
|
+
/** 커스텀 클래스 */
|
|
18
|
+
className?: string;
|
|
19
|
+
}
|
|
20
|
+
export declare const Logo: React.FC<LogoProps>;
|
|
21
|
+
export default Logo;
|
|
22
|
+
//# sourceMappingURL=Logo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Logo.d.ts","sourceRoot":"","sources":["../../../src/components/logo/Logo.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,MAAM,WAAW,SAAS;IACxB,aAAa;IACb,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IACjC,4BAA4B;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW;IACX,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW;IACX,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW;IACX,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gBAAgB;IAChB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa;IACb,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,cAAc;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AASD,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CAgIpC,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
const sizeMap = {
|
|
4
|
+
sm: { main: 24, side: 14 },
|
|
5
|
+
md: { main: 40, side: 22 },
|
|
6
|
+
lg: { main: 56, side: 32 },
|
|
7
|
+
xl: { main: 72, side: 42 },
|
|
8
|
+
};
|
|
9
|
+
export const Logo = ({ size = 'md', customSize, sideColor = '#1E3A5F', centerColor = '#0EA5E9', eyeColor = '#FFFFFF', interactive = true, onClick, className = '', }) => {
|
|
10
|
+
const [sideHover, setSideHover] = useState(false);
|
|
11
|
+
const [centerHover, setCenterHover] = useState(false);
|
|
12
|
+
const dimensions = customSize
|
|
13
|
+
? { main: customSize, side: Math.round(customSize * 0.58) }
|
|
14
|
+
: sizeMap[size];
|
|
15
|
+
const styles = {
|
|
16
|
+
container: {
|
|
17
|
+
display: 'inline-flex',
|
|
18
|
+
alignItems: 'center',
|
|
19
|
+
justifyContent: 'center',
|
|
20
|
+
gap: Math.round(dimensions.main * 0.2),
|
|
21
|
+
cursor: onClick ? 'pointer' : 'default',
|
|
22
|
+
},
|
|
23
|
+
side: {
|
|
24
|
+
cursor: interactive ? 'pointer' : 'default',
|
|
25
|
+
transition: 'transform 0.2s ease',
|
|
26
|
+
},
|
|
27
|
+
center: {
|
|
28
|
+
cursor: interactive ? 'pointer' : 'default',
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
// 눈 위치 (호버시 위로 이동)
|
|
32
|
+
const eyeY = sideHover && interactive ? 33 : 36;
|
|
33
|
+
// 콧구멍 크기 (호버시 커짐)
|
|
34
|
+
const noseRx = centerHover && interactive ? 5.5 : 4;
|
|
35
|
+
const noseRy = centerHover && interactive ? 8 : 6;
|
|
36
|
+
return (_jsxs("div", { style: styles.container, className: `logo ${className}`, onClick: onClick, role: onClick ? 'button' : undefined, children: [_jsx("svg", { viewBox: "0 0 48 48", fill: "none", xmlns: "http://www.w3.org/2000/svg", width: dimensions.side, height: dimensions.side, style: styles.side, onMouseEnter: () => setSideHover(true), onMouseLeave: () => setSideHover(false), children: _jsx("path", { d: "M 8 40 L 24 8 L 40 40", stroke: sideColor, strokeWidth: "10", strokeLinecap: "round", strokeLinejoin: "round", fill: "none" }) }), _jsxs("svg", { viewBox: "0 0 48 48", fill: "none", xmlns: "http://www.w3.org/2000/svg", width: dimensions.main, height: dimensions.main, style: styles.center, onMouseEnter: () => setCenterHover(true), onMouseLeave: () => setCenterHover(false), children: [_jsx("rect", { x: "20", y: "2", width: "8", height: "16", rx: "4", fill: centerColor }), _jsx("rect", { x: "6", y: "16", width: "36", height: "6", rx: "3", fill: centerColor }), _jsx("ellipse", { cx: "24", cy: "36", rx: "18", ry: "12", fill: centerColor }), _jsx("ellipse", { cx: "17", cy: eyeY, rx: noseRx, ry: noseRy, fill: eyeColor, style: { transition: 'all 0.2s ease' } }), _jsx("ellipse", { cx: "31", cy: eyeY, rx: noseRx, ry: noseRy, fill: eyeColor, style: { transition: 'all 0.2s ease' } })] }), _jsx("svg", { viewBox: "0 0 48 48", fill: "none", xmlns: "http://www.w3.org/2000/svg", width: dimensions.side, height: dimensions.side, style: styles.side, onMouseEnter: () => setSideHover(true), onMouseLeave: () => setSideHover(false), children: _jsx("path", { d: "M 8 40 L 24 8 L 40 40", stroke: sideColor, strokeWidth: "10", strokeLinecap: "round", strokeLinejoin: "round", fill: "none" }) })] }));
|
|
37
|
+
};
|
|
38
|
+
export default Logo;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/logo/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Logo';
|