@sonhoseong/mfa-lib 1.2.0 → 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.
@@ -4,10 +4,14 @@ export interface LogoProps {
4
4
  size?: 'sm' | 'md' | 'lg' | 'xl';
5
5
  /** 커스텀 크기 (중앙 아이콘 기준 px) */
6
6
  customSize?: number;
7
- /** 메인 색상 */
8
- color?: string;
7
+ /** 색상 */
8
+ sideColor?: string;
9
+ /** ㅎ 색상 */
10
+ centerColor?: string;
9
11
  /** 눈 색상 */
10
12
  eyeColor?: string;
13
+ /** 호버 효과 활성화 */
14
+ interactive?: boolean;
11
15
  /** 클릭 핸들러 */
12
16
  onClick?: () => void;
13
17
  /** 커스텀 클래스 */
@@ -1 +1 @@
1
- {"version":3,"file":"Logo.d.ts","sourceRoot":"","sources":["../../../src/components/logo/Logo.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,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,YAAY;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW;IACX,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,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,CAiFpC,CAAC;AAEF,eAAe,IAAI,CAAC"}
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"}
@@ -1,11 +1,14 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useState } from 'react';
2
3
  const sizeMap = {
3
4
  sm: { main: 24, side: 14 },
4
5
  md: { main: 40, side: 22 },
5
6
  lg: { main: 56, side: 32 },
6
7
  xl: { main: 72, side: 42 },
7
8
  };
8
- export const Logo = ({ size = 'md', customSize, color = '#1E3A5F', eyeColor = '#FFFFFF', onClick, className = '', }) => {
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);
9
12
  const dimensions = customSize
10
13
  ? { main: customSize, side: Math.round(customSize * 0.58) }
11
14
  : sizeMap[size];
@@ -17,7 +20,19 @@ export const Logo = ({ size = 'md', customSize, color = '#1E3A5F', eyeColor = '#
17
20
  gap: Math.round(dimensions.main * 0.2),
18
21
  cursor: onClick ? 'pointer' : 'default',
19
22
  },
23
+ side: {
24
+ cursor: interactive ? 'pointer' : 'default',
25
+ transition: 'transform 0.2s ease',
26
+ },
27
+ center: {
28
+ cursor: interactive ? 'pointer' : 'default',
29
+ },
20
30
  };
21
- 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, children: _jsx("path", { d: "M 8 40 L 24 8 L 40 40", stroke: color, 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, children: [_jsx("rect", { x: "20", y: "2", width: "8", height: "16", rx: "4", fill: color }), _jsx("rect", { x: "6", y: "16", width: "36", height: "6", rx: "3", fill: color }), _jsx("ellipse", { cx: "24", cy: "36", rx: "18", ry: "12", fill: color }), _jsx("ellipse", { cx: "17", cy: "36", rx: "4", ry: "6", fill: eyeColor }), _jsx("ellipse", { cx: "31", cy: "36", rx: "4", ry: "6", fill: eyeColor })] }), _jsx("svg", { viewBox: "0 0 48 48", fill: "none", xmlns: "http://www.w3.org/2000/svg", width: dimensions.side, height: dimensions.side, children: _jsx("path", { d: "M 8 40 L 24 8 L 40 40", stroke: color, strokeWidth: "10", strokeLinecap: "round", strokeLinejoin: "round", fill: "none" }) })] }));
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" }) })] }));
22
37
  };
23
38
  export default Logo;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sonhoseong/mfa-lib",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "MFA 공통 라이브러리 - KOMCA 패턴",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",