@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.
@@ -4,4 +4,5 @@ export * from './toast';
4
4
  export * from './error';
5
5
  export * from './modal';
6
6
  export * from './navigation';
7
+ export * from './logo';
7
8
  //# sourceMappingURL=index.d.ts.map
@@ -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"}
@@ -10,3 +10,5 @@ export * from './error';
10
10
  export * from './modal';
11
11
  // Navigation
12
12
  export * from './navigation';
13
+ // Logo
14
+ export * from './logo';
@@ -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,2 @@
1
+ export * from './Logo';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -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';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sonhoseong/mfa-lib",
3
- "version": "1.1.2",
3
+ "version": "1.2.1",
4
4
  "description": "MFA 공통 라이브러리 - KOMCA 패턴",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",