@designbasekorea/ui 0.5.4 → 0.5.5
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 +1 -1
- package/dist/index.esm.css +1 -1
- package/dist/index.esm.css.map +1 -1
- package/dist/index.esm.js +30 -10
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +30 -10
- 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 +30 -10
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -8207,7 +8207,7 @@ const HeroFeature = ({ title, subtitle, description, image, imageAlt, background
|
|
|
8207
8207
|
const renderButtons = () => {
|
|
8208
8208
|
if (buttons.length === 0)
|
|
8209
8209
|
return null;
|
|
8210
|
-
return (jsxRuntime.jsx("div", { className: "designbase-hero-feature__buttons", children: buttons.map((button, index) => (jsxRuntime.jsx(Button, { href: button.href, variant: button.variant || 'primary', size: button.size || '
|
|
8210
|
+
return (jsxRuntime.jsx("div", { className: "designbase-hero-feature__buttons", children: buttons.map((button, index) => (jsxRuntime.jsx(Button, { href: button.href, variant: button.variant || 'primary', size: button.size || 'm', onClick: button.onClick, target: button.external ? '_blank' : undefined, rel: button.external ? 'noopener noreferrer' : undefined, icon: button.icon, children: button.text }, index))) }));
|
|
8211
8211
|
};
|
|
8212
8212
|
const renderStats = () => {
|
|
8213
8213
|
if (stats.length === 0)
|
|
@@ -10835,14 +10835,34 @@ const ScrollArea = ({ direction = 'vertical', scrollbarStyle = 'auto', maxHeight
|
|
|
10835
10835
|
return (jsxRuntime.jsx("div", { className: classes, style: style, children: jsxRuntime.jsx("div", { ref: scrollRef, className: "designbase-scroll-area__content", children: children }) }));
|
|
10836
10836
|
};
|
|
10837
10837
|
|
|
10838
|
-
const Section = ({ title, subtitle, description, size = 'm', variant = 'default', header, footer, actions, noPadding = false, fullWidth = false, fullHeight = false, className, children, }) => {
|
|
10838
|
+
const Section = ({ title, subtitle, description = '', size = 'm', variant = 'default', header, footer, actions, noPadding = false, fullWidth = false, fullHeight = false, className, children, }) => {
|
|
10839
|
+
const normalizeActionButtonSize = (node) => {
|
|
10840
|
+
if (!React.isValidElement(node))
|
|
10841
|
+
return node;
|
|
10842
|
+
const element = node;
|
|
10843
|
+
const elementType = element.type;
|
|
10844
|
+
const isButtonComponent = elementType?.displayName === 'Button' || elementType?.name === 'Button';
|
|
10845
|
+
// Button이고 size가 지정되지 않았으면 기본값 m 적용
|
|
10846
|
+
if (isButtonComponent && element.props?.size === undefined) {
|
|
10847
|
+
return React.cloneElement(element, { size: 'm' });
|
|
10848
|
+
}
|
|
10849
|
+
if (element.props?.children) {
|
|
10850
|
+
return React.cloneElement(element, {
|
|
10851
|
+
children: React.Children.map(element.props.children, normalizeActionButtonSize),
|
|
10852
|
+
});
|
|
10853
|
+
}
|
|
10854
|
+
return element;
|
|
10855
|
+
};
|
|
10856
|
+
const normalizedActions = actions
|
|
10857
|
+
? React.Children.map(actions, normalizeActionButtonSize)
|
|
10858
|
+
: actions;
|
|
10839
10859
|
const classes = clsx('designbase-section', `designbase-section--size-${size}`, `designbase-section--variant-${variant}`, {
|
|
10840
10860
|
'designbase-section--no-padding': noPadding,
|
|
10841
10861
|
'designbase-section--full-width': fullWidth,
|
|
10842
10862
|
'designbase-section--full-height': fullHeight,
|
|
10843
10863
|
}, className);
|
|
10844
|
-
const hasHeader = title || subtitle || description || header ||
|
|
10845
|
-
return (jsxRuntime.jsxs("section", { className: classes, children: [hasHeader && (jsxRuntime.jsx("div", { className: "designbase-section__header", children: header || (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [(title || subtitle) && (jsxRuntime.jsxs("div", { className: "designbase-section__title-area", children: [title && (jsxRuntime.jsx("h2", { className: "designbase-section__title", children: title })), subtitle && (jsxRuntime.jsx("h3", { className: "designbase-section__subtitle", children: subtitle })), description && (jsxRuntime.jsx("p", { className: "designbase-section__description", children: description }))] })),
|
|
10864
|
+
const hasHeader = title || subtitle || description || header || normalizedActions;
|
|
10865
|
+
return (jsxRuntime.jsxs("section", { className: classes, children: [hasHeader && (jsxRuntime.jsx("div", { className: "designbase-section__header", children: header || (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [(title || subtitle) && (jsxRuntime.jsxs("div", { className: "designbase-section__title-area", children: [title && (jsxRuntime.jsx("h2", { className: "designbase-section__title", children: title })), subtitle && (jsxRuntime.jsx("h3", { className: "designbase-section__subtitle", children: subtitle })), description && (jsxRuntime.jsx("p", { className: "designbase-section__description", children: description }))] })), normalizedActions && (jsxRuntime.jsx("div", { className: "designbase-section__actions", children: normalizedActions }))] })) })), jsxRuntime.jsx("div", { className: "designbase-section__content", children: children }), footer && (jsxRuntime.jsx("div", { className: "designbase-section__footer", children: footer }))] }));
|
|
10846
10866
|
};
|
|
10847
10867
|
|
|
10848
10868
|
const Share = ({ url, title, description = '', imageUrl, hashtags = [], variant = 'button', size = 'm', position = 'bottom', platforms = ['facebook', 'x', 'linkedin', 'whatsapp', 'email', 'link'], customPlatforms = {}, buttonText = '공유', buttonIcon = icons.ShareAltIcon, modalTitle = '공유하기', copySuccessMessage = '링크가 클립보드에 복사되었습니다!', showQrCode = true, qrCodeSize = 200, className, style, onShare, onShareError, onCopySuccess, onCopyError, }) => {
|
|
@@ -11095,11 +11115,11 @@ const Skeleton = React.forwardRef(({ variant = 'text', size = 'm', width, height
|
|
|
11095
11115
|
switch (size) {
|
|
11096
11116
|
case 'xs':
|
|
11097
11117
|
return variant === 'circular' ? '16px' : '12px';
|
|
11098
|
-
case '
|
|
11118
|
+
case 's':
|
|
11099
11119
|
return variant === 'circular' ? '24px' : '16px';
|
|
11100
|
-
case '
|
|
11120
|
+
case 'm':
|
|
11101
11121
|
return variant === 'circular' ? '32px' : '20px';
|
|
11102
|
-
case '
|
|
11122
|
+
case 'l':
|
|
11103
11123
|
return variant === 'circular' ? '48px' : '24px';
|
|
11104
11124
|
case 'xl':
|
|
11105
11125
|
return variant === 'circular' ? '64px' : '32px';
|
|
@@ -11111,9 +11131,9 @@ const Skeleton = React.forwardRef(({ variant = 'text', size = 'm', width, height
|
|
|
11111
11131
|
const getTextLineHeight = () => {
|
|
11112
11132
|
switch (size) {
|
|
11113
11133
|
case 'xs': return '12px';
|
|
11114
|
-
case '
|
|
11115
|
-
case '
|
|
11116
|
-
case '
|
|
11134
|
+
case 's': return '16px';
|
|
11135
|
+
case 'm': return '20px';
|
|
11136
|
+
case 'l': return '24px';
|
|
11117
11137
|
case 'xl': return '32px';
|
|
11118
11138
|
default: return '20px';
|
|
11119
11139
|
}
|