@designbasekorea/ui 0.1.7 → 0.1.9
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/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +5 -2
- package/dist/index.esm.css +1 -1
- package/dist/index.esm.css.map +1 -1
- package/dist/index.esm.js +51 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +51 -1
- package/dist/index.js.map +1 -1
- package/dist/index.umd.css +1 -1
- package/dist/index.umd.css.map +1 -1
- package/dist/index.umd.js +51 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -4407,10 +4407,25 @@
|
|
|
4407
4407
|
};
|
|
4408
4408
|
Dropdown.displayName = 'Dropdown';
|
|
4409
4409
|
|
|
4410
|
-
const
|
|
4410
|
+
const DesignBaseLogo = ({ width = 193, height = 40, color = 'currentColor', className, }) => {
|
|
4411
|
+
return (jsxRuntimeExports.jsx("svg", { width: width, height: height, viewBox: "0 0 386 40", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: className, "aria-label": "DesignBase Logo", children: jsxRuntimeExports.jsxs("g", { fill: color, children: [jsxRuntimeExports.jsx("polygon", { points: "58.4,23.6 77.3,23.6 77.3,16.2 58.4,16.2 58.4,7.7 79.4,7.7 79.4,0.4 49.5,0.4 49.5,39.6 80,39.6 80,32.3 58.4,32.3" }), jsxRuntimeExports.jsx("path", { d: "M95.6,10.8c0-2.1,2-3.2,5-3.2s8.1,1.6,12.2,4l3.4-7.3c-4.5-2.8-9.6-4.2-14.9-4.2c-9.1,0-15.2,4.5-15.2,11.6 c0,13.9,20.9,9.6,20.9,17c0,2.4-2.2,3.8-5.8,3.8c-4.2,0-9.9-2.3-13.9-5.9l-3.5,7.2c4.9,4,11,6.2,17.3,6.2c8.7,0,15.4-4.1,15.4-11.8 C116.5,13.9,95.6,18,95.6,10.8z" }), jsxRuntimeExports.jsx("rect", { x: "122.7", y: "0.4", width: "8.8", height: "39.2" }), jsxRuntimeExports.jsx("path", { d: "M158.8,7.8c4,0.1,7.8,1.7,10.8,4.4l5-6.3c-4.4-3.7-10-5.7-15.7-5.7c-12.2,0-21.4,8.5-21.4,19.9s9,20,20.9,20 c5.7-0.1,11.2-1.9,15.9-5.1V19.8h-7.6v10.3c-2.4,1.3-5,2-7.7,2.1h-0.4c-6.7-0.1-12.1-5.6-12-12.3v-0.4 C146.7,13,152.2,7.7,158.8,7.8z" }), jsxRuntimeExports.jsx("polygon", { points: "209.1,25.6 190.1,0.4 182,0.4 182,39.6 190.5,39.6 190.5,14.5 209.5,39.6 217.5,39.6 217.5,0.4 209.1,0.4" }), jsxRuntimeExports.jsx("path", { d: "M263.3,18.8c4-0.9,6.9-4.5,6.8-8.6c0-6-5.4-9.8-14-9.8h-24.5v6.5l6.4,1v31.8h18.7c9.1,0,14.8-4.2,14.8-10.9 C271.7,23.8,268.2,19.5,263.3,18.8z M246.9,7.6h8.7c3.4-0.1,5.4,1.5,5.4,4.2s-2,4.4-5.4,4.4h-8.7V7.6z M255.7,32.4h-8.7v-9.3h8.7 c4.1,0,6.7,1.7,6.7,4.5C262.4,30.6,259.8,32.4,255.7,32.4z" }), jsxRuntimeExports.jsx("path", { d: "M290.5,0.4l-17,39.2h9.1l3.1-7.6h18.2l3,7.6h9.5L299.6,0.4H290.5z M288.6,24.9l6.2-15.2l6.2,15.2L288.6,24.9z" }), jsxRuntimeExports.jsx("path", { d: "M328.9,10.8c0-2.1,2-3.2,5-3.2s8.1,1.6,12.2,4l3.4-7.3C345,1.4,339.9,0,334.6,0c-9.1,0-15.2,4.5-15.2,11.6 c0,13.9,20.9,9.6,20.9,17c0,2.4-2.2,3.8-5.8,3.8c-4.1,0-9.9-2.3-13.9-5.9l-3.5,7.2c4.9,4,11,6.2,17.3,6.2c8.7,0,15.4-4.1,15.4-11.8 C349.8,13.9,328.9,18,328.9,10.8z" }), jsxRuntimeExports.jsx("polygon", { points: "364.4,32.3 364.4,23.6 383.3,23.6 383.3,16.2 364.4,16.2 364.4,7.7 385.4,7.7 385.4,0.4 355.5,0.4 355.5,39.6 386,39.6 386,32.3" }), jsxRuntimeExports.jsx("path", { d: "M23.1,0.4H0v6.5l6.5,1v31.8h16.3c12.4,0,21-8.1,21-19.6S35.2,0.4,23.1,0.4z M34.7,20.1c0,7.2-4.8,12.1-11.4,12.1h-8V7.8H23 C29.8,7.8,34.8,12.8,34.7,20.1L34.7,20.1z" })] }) }));
|
|
4412
|
+
};
|
|
4413
|
+
DesignBaseLogo.displayName = 'DesignBaseLogo';
|
|
4414
|
+
|
|
4415
|
+
const DesignBaseLogoMark = ({ size = 38, color = 'currentColor', className, }) => {
|
|
4416
|
+
// 원본 비율 유지: 95:100
|
|
4417
|
+
const aspectRatio = 95 / 100;
|
|
4418
|
+
const width = size * aspectRatio;
|
|
4419
|
+
const height = size;
|
|
4420
|
+
return (jsxRuntimeExports.jsx("svg", { width: width, height: height, viewBox: "0 0 95 100", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: className, "aria-label": "DesignBase Mark", children: jsxRuntimeExports.jsx("path", { fill: color, d: "M45,0H0V8l10,2V90L0,92v8H45A50,50,0,0,0,45,0ZM43.12,90H20V10H38.33a15,15,0,0,1,0,30H30.11V50h13a20,20,0,0,1,0,40ZM71.4,80A30,30,0,0,0,55.83,42.83,24.93,24.93,0,0,0,60.27,13,40,40,0,0,1,71.4,80Z" }) }));
|
|
4421
|
+
};
|
|
4422
|
+
DesignBaseLogoMark.displayName = 'DesignBaseLogoMark';
|
|
4423
|
+
|
|
4424
|
+
const Logo = ({ type = 'designbase', text = 'Logo', src, alt, size = 'm', variant = 'default', clickable = false, href, target = '_self', fullWidth = false, className, onClick, ...props }) => {
|
|
4411
4425
|
const classes = clsx('designbase-logo', `designbase-logo--${size}`, `designbase-logo--${variant}`, {
|
|
4412
4426
|
'designbase-logo--clickable': clickable || href,
|
|
4413
4427
|
'designbase-logo--full-width': fullWidth,
|
|
4428
|
+
'designbase-logo--svg': type !== 'custom',
|
|
4414
4429
|
}, className);
|
|
4415
4430
|
const handleClick = (e) => {
|
|
4416
4431
|
if (onClick) {
|
|
@@ -4418,7 +4433,42 @@
|
|
|
4418
4433
|
onClick();
|
|
4419
4434
|
}
|
|
4420
4435
|
};
|
|
4436
|
+
// 크기별 SVG 로고 크기 매핑
|
|
4437
|
+
// 로고타입 비율: 386:40 (9.65:1)
|
|
4438
|
+
// 심볼 비율: 95:100 (0.95:1)
|
|
4439
|
+
const getSvgDimensions = () => {
|
|
4440
|
+
const dimensions = {
|
|
4441
|
+
xs: { width: 96, height: 20, markSize: 19 }, // 20 * 9.65 / 2
|
|
4442
|
+
s: { width: 125, height: 26, markSize: 25 }, // 26 * 9.65 / 2
|
|
4443
|
+
m: { width: 193, height: 40, markSize: 38 }, // 40 * 9.65 / 2 (기본)
|
|
4444
|
+
l: { width: 256, height: 53, markSize: 50 }, // 53 * 9.65 / 2
|
|
4445
|
+
xl: { width: 320, height: 66, markSize: 63 }, // 66 * 9.65 / 2
|
|
4446
|
+
};
|
|
4447
|
+
return dimensions[size];
|
|
4448
|
+
};
|
|
4449
|
+
// variant별 색상 매핑
|
|
4450
|
+
const getLogoColor = () => {
|
|
4451
|
+
const colors = {
|
|
4452
|
+
default: 'var(--db-text-primary)',
|
|
4453
|
+
primary: 'var(--db-brand-primary)',
|
|
4454
|
+
secondary: 'var(--db-text-secondary)',
|
|
4455
|
+
white: 'var(--db-text-inverse-primary)',
|
|
4456
|
+
dark: 'var(--db-text-primary)',
|
|
4457
|
+
};
|
|
4458
|
+
return colors[variant];
|
|
4459
|
+
};
|
|
4421
4460
|
const renderLogo = () => {
|
|
4461
|
+
const { width, height, markSize } = getSvgDimensions();
|
|
4462
|
+
const color = getLogoColor();
|
|
4463
|
+
// DesignBase 풀 로고
|
|
4464
|
+
if (type === 'designbase') {
|
|
4465
|
+
return (jsxRuntimeExports.jsx(DesignBaseLogo, { width: width, height: height, color: color, className: "designbase-logo__svg" }));
|
|
4466
|
+
}
|
|
4467
|
+
// DesignBase 심볼 마크
|
|
4468
|
+
if (type === 'designbase-mark') {
|
|
4469
|
+
return (jsxRuntimeExports.jsx(DesignBaseLogoMark, { size: markSize, color: color, className: "designbase-logo__svg" }));
|
|
4470
|
+
}
|
|
4471
|
+
// 커스텀 로고
|
|
4422
4472
|
if (src) {
|
|
4423
4473
|
return (jsxRuntimeExports.jsx("img", { src: src, alt: alt || text, className: "designbase-logo__image", ...props }));
|
|
4424
4474
|
}
|