@designbasekorea/ui 0.5.6 → 0.6.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/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +91 -5
- package/dist/index.esm.css +1 -1
- package/dist/index.esm.css.map +1 -1
- package/dist/index.esm.js +71 -12
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +73 -11
- 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 +73 -11
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4605,7 +4605,7 @@ const SearchBar = ({ value, defaultValue = '', placeholder = '검색...', size =
|
|
|
4605
4605
|
};
|
|
4606
4606
|
SearchBar.displayName = 'SearchBar';
|
|
4607
4607
|
|
|
4608
|
-
const Select = ({ value, defaultValue, options, label, placeholder = '선택하세요', multiple = false, searchable = false, disabled = false, readOnly = false, required = false, error = false, errorMessage, helperText, size = 'm', fullWidth = false, dropdownWidth = 'auto', position = 'bottom', maxHeight = 200, showClearButton =
|
|
4608
|
+
const Select = ({ value, defaultValue, options, label, placeholder = '선택하세요', multiple = false, searchable = false, disabled = false, readOnly = false, required = false, error = false, errorMessage, helperText, size = 'm', fullWidth = false, dropdownWidth = 'auto', position = 'bottom', maxHeight = 200, showClearButton = false, useMobileBottomSheet = false, className, onChange, onFocus, onBlur, ...props }) => {
|
|
4609
4609
|
const [isOpen, setIsOpen] = React.useState(false);
|
|
4610
4610
|
const [selectedValue, setSelectedValue] = React.useState(value ?? defaultValue ?? (multiple ? [] : ''));
|
|
4611
4611
|
const [searchTerm, setSearchTerm] = React.useState('');
|
|
@@ -5927,7 +5927,7 @@ const rgbToHsl = (r, g, b) => {
|
|
|
5927
5927
|
return { h, s: s * 100, l: l * 100 };
|
|
5928
5928
|
};
|
|
5929
5929
|
/* ----------------------- 컴포넌트 ----------------------- */
|
|
5930
|
-
const ColorPicker = ({ size = 'm', type = 'dropdown', position = 'bottom-
|
|
5930
|
+
const ColorPicker = ({ size = 'm', type = 'dropdown', position = 'bottom-start', value, defaultValue = '#006FFF', showInput = true, showAlpha = true, showFormatSelector = true, showCopyButton = true, showEyedropper = true, disabled = false, readonly = false, onChangeFormat = 'hex', fireOnInit = false, changeDebounceMs = 0, emitDuringDrag = true, onChange, onApply, onCancel, className, }) => {
|
|
5931
5931
|
/** 초기 HSV — StrictMode에서도 안전하도록 lazy init */
|
|
5932
5932
|
const initialHex = (isHex(value) ? normalizeHex(value) : normalizeHex(defaultValue)) || '#006FFF';
|
|
5933
5933
|
const initialRgb = hexToRgb(initialHex) || { r: 0, g: 111, b: 255 };
|
|
@@ -6301,14 +6301,14 @@ const ColorPicker = ({ size = 'm', type = 'dropdown', position = 'bottom-left',
|
|
|
6301
6301
|
const Trigger = (jsxRuntime.jsxs("div", { className: "designbase-color-picker__trigger", onClick: () => !disabled && !readonly && (type === 'modal' ? handleModalOpen() : setIsOpen(v => !v)), children: [jsxRuntime.jsx("div", { className: "designbase-color-picker__color-display", children: jsxRuntime.jsx("div", { className: "designbase-color-picker__color-box", style: {
|
|
6302
6302
|
backgroundColor: showAlpha ? `rgba(${rgb.r}, ${rgb.g}, ${rgb.b}, ${a / 100})` : hex
|
|
6303
6303
|
} }) }), showInput && (jsxRuntime.jsx("input", { type: "text", value: colorInput, onChange: (e) => setColorInput(e.target.value), onKeyDown: onColorKeyDown, onBlur: onColorBlur, onClick: (e) => e.stopPropagation(), disabled: disabled, readOnly: readonly, className: "designbase-color-picker__input", placeholder: "#000000" })), showInput && showCopyButton && (jsxRuntime.jsx("button", { type: "button", className: "designbase-color-picker__copy-button-inline", onClick: (e) => { e.stopPropagation(); onCopy(); }, disabled: disabled, "aria-label": "Copy color value", children: isCopied ? jsxRuntime.jsx(icons.DoneIcon, { size: 14 }) : jsxRuntime.jsx(icons.CopyIcon, { size: 14 }) })), jsxRuntime.jsx("button", { type: "button", className: "designbase-color-picker__toggle", disabled: disabled, "aria-label": "Toggle color picker", children: jsxRuntime.jsx(icons.ChevronDownIcon, { size: 16 }) })] }));
|
|
6304
|
-
const Selector = (jsxRuntime.jsxs("div", { className: "designbase-color-picker__selector", children: [jsxRuntime.jsx("div", { className: "designbase-color-picker__color-area", children: jsxRuntime.jsx("div", { ref: areaRef, className: "designbase-color-picker__color-field", style: areaBackground, onMouseDown: onAreaMouseDown, onMouseMove: onAreaMouseMove, onMouseUp: onAreaMouseUp, onMouseLeave: onAreaLeave, onTouchStart: onAreaTouchStart, onTouchMove: onAreaTouchMove, onTouchEnd: onAreaTouchEnd, children: jsxRuntime.jsx("div", { className: "designbase-color-picker__color-pointer", style: { left: `${s}%`, top: `${100 - v}%`, backgroundColor: `rgb(${rgb.r}, ${rgb.g}, ${rgb.b})` } }) }) }), jsxRuntime.jsxs("div", { className: "designbase-color-picker__controls", children: [showEyedropper && isEyedropperAvailable && (jsxRuntime.jsx(Button, { variant: "tertiary", size:
|
|
6304
|
+
const Selector = (jsxRuntime.jsxs("div", { className: "designbase-color-picker__selector", children: [jsxRuntime.jsx("div", { className: "designbase-color-picker__color-area", children: jsxRuntime.jsx("div", { ref: areaRef, className: "designbase-color-picker__color-field", style: areaBackground, onMouseDown: onAreaMouseDown, onMouseMove: onAreaMouseMove, onMouseUp: onAreaMouseUp, onMouseLeave: onAreaLeave, onTouchStart: onAreaTouchStart, onTouchMove: onAreaTouchMove, onTouchEnd: onAreaTouchEnd, children: jsxRuntime.jsx("div", { className: "designbase-color-picker__color-pointer", style: { left: `${s}%`, top: `${100 - v}%`, backgroundColor: `rgb(${rgb.r}, ${rgb.g}, ${rgb.b})` } }) }) }), jsxRuntime.jsxs("div", { className: "designbase-color-picker__controls", children: [showEyedropper && isEyedropperAvailable && (jsxRuntime.jsx(Button, { variant: "tertiary", size: size === 's' ? 's' : 'm', iconOnly: true, onClick: onEyedrop, "aria-label": "Eyedropper tool", children: jsxRuntime.jsx(icons.EyedropperIcon, {}) })), jsxRuntime.jsxs("div", { className: "designbase-color-picker__slider-container", children: [jsxRuntime.jsx("div", { className: "designbase-color-picker__hue-slider", children: jsxRuntime.jsx("input", { type: "range", min: 0, max: 360, value: h, onChange: onHueChange, className: "designbase-color-picker__slider designbase-color-picker__slider--hue", style: hueTrackStyle }) }), showAlpha && (jsxRuntime.jsx("div", { className: "designbase-color-picker__alpha-slider", children: jsxRuntime.jsx("input", { type: "range", min: 0, max: 100, value: a, onChange: onAlphaChange, className: "designbase-color-picker__slider designbase-color-picker__slider--alpha", style: alphaTrackStyle }) }))] })] }), jsxRuntime.jsxs("div", { className: "designbase-color-picker__value-display", children: [showFormatSelector && (jsxRuntime.jsx(Select, { value: format, onChange: (v) => setFormat(v), showClearButton: false, options: [
|
|
6305
6305
|
{ label: 'HEX', value: 'hex' },
|
|
6306
6306
|
{ label: 'RGB', value: 'rgb' },
|
|
6307
6307
|
{ label: 'RGBA', value: 'rgba' },
|
|
6308
6308
|
{ label: 'HSL', value: 'hsl' },
|
|
6309
6309
|
{ label: 'HSLA', value: 'hsla' },
|
|
6310
|
-
], size: "s", position: "top" })), jsxRuntime.jsx(Input, { type: "text", value: colorInput, onChange: setColorInput, onKeyDown: onColorKeyDown, onBlur: onColorBlur, placeholder: "#000000", size: "s", className: "designbase-color-picker__value-input" }), showAlpha && (jsxRuntime.jsxs("div", { className: "designbase-color-picker__alpha-input-wrap", children: [jsxRuntime.jsx(Input, { type: "text", inputMode: "numeric", value: alphaInput, onChange: (value) => setAlphaInput(value.replace(/[^\d]/g, '').slice(0, 3)), onKeyDown: onAlphaInputKeyDown, onBlur: onAlphaInputBlur, placeholder: "100", size: "s", className: "designbase-color-picker__alpha-input", "aria-label": "Alpha percent" }), jsxRuntime.jsx("span", { className: "designbase-color-picker__alpha-suffix", children: "%" })] })), showCopyButton && (jsxRuntime.jsx(Button, { variant: "tertiary", size:
|
|
6311
|
-
return (jsxRuntime.jsxs("div", { ref: pickerRef, className: classes, children: [Trigger, type === 'dropdown' && isOpen && (jsxRuntime.jsx("div", { className: "designbase-color-picker__dropdown", onClick: (e) => e.stopPropagation(), children: Selector })), type === 'modal' && (jsxRuntime.jsxs(Modal, { isOpen: isOpen, onClose: handleModalCancel, title: "\uC0C9\uC0C1 \uC120\uD0DD", size: "s", children: [jsxRuntime.jsx(ModalBody, { children: Selector }), jsxRuntime.jsx(ModalFooter, { children: jsxRuntime.jsxs("div", { style: { display: 'flex', gap: 8, justifyContent: 'flex-end' }, children: [jsxRuntime.jsx(Button, { variant: "tertiary", size: "m", onClick: handleModalCancel, children: "\uCDE8\uC18C" }), jsxRuntime.jsx(Button, { variant: "primary", size: "m", onClick: handleModalApply, children: "\uC801\uC6A9" })] }) })] }))] }));
|
|
6310
|
+
], size: "s", position: "top" })), jsxRuntime.jsx(Input, { type: "text", value: colorInput, onChange: setColorInput, onKeyDown: onColorKeyDown, onBlur: onColorBlur, placeholder: "#000000", size: "s", className: "designbase-color-picker__value-input" }), showAlpha && (jsxRuntime.jsxs("div", { className: "designbase-color-picker__alpha-input-wrap", children: [jsxRuntime.jsx(Input, { type: "text", inputMode: "numeric", value: alphaInput, onChange: (value) => setAlphaInput(value.replace(/[^\d]/g, '').slice(0, 3)), onKeyDown: onAlphaInputKeyDown, onBlur: onAlphaInputBlur, placeholder: "100", size: "s", className: "designbase-color-picker__alpha-input", "aria-label": "Alpha percent" }), jsxRuntime.jsx("span", { className: "designbase-color-picker__alpha-suffix", children: "%" })] })), showCopyButton && (jsxRuntime.jsx(Button, { variant: "tertiary", size: size === 's' ? 's' : 'm', iconOnly: true, onClick: onCopy, "aria-label": "Copy color value", children: isCopied ? jsxRuntime.jsx(icons.DoneIcon, {}) : jsxRuntime.jsx(icons.CopyIcon, {}) }))] })] }));
|
|
6311
|
+
return (jsxRuntime.jsxs("div", { ref: pickerRef, className: classes, children: [Trigger, type === 'dropdown' && isOpen && (jsxRuntime.jsx("div", { className: clsx("designbase-color-picker__dropdown", `designbase-color-picker__dropdown--${position}`), onClick: (e) => e.stopPropagation(), children: Selector })), type === 'modal' && (jsxRuntime.jsxs(Modal, { isOpen: isOpen, onClose: handleModalCancel, title: "\uC0C9\uC0C1 \uC120\uD0DD", size: "s", children: [jsxRuntime.jsx(ModalBody, { children: Selector }), jsxRuntime.jsx(ModalFooter, { children: jsxRuntime.jsxs("div", { style: { display: 'flex', gap: 8, justifyContent: 'flex-end' }, children: [jsxRuntime.jsx(Button, { variant: "tertiary", size: "m", onClick: handleModalCancel, children: "\uCDE8\uC18C" }), jsxRuntime.jsx(Button, { variant: "primary", size: "m", onClick: handleModalApply, children: "\uC801\uC6A9" })] }) })] }))] }));
|
|
6312
6312
|
};
|
|
6313
6313
|
ColorPicker.displayName = 'ColorPicker';
|
|
6314
6314
|
|
|
@@ -6673,7 +6673,7 @@ const ContextMenu = ({ items, open, x, y, onClose, className, }) => {
|
|
|
6673
6673
|
};
|
|
6674
6674
|
ContextMenu.displayName = 'ContextMenu';
|
|
6675
6675
|
|
|
6676
|
-
const DatePicker = ({ mode = 'single', type = 'dropdown', value, defaultValue, onChange, minDate, maxDate, events = [], showOutsideDays = true, startOfWeek = 'sunday', size = 'm', variant = 'default', highlightWeekends = true, highlightHolidays = false, today = new Date(), locale = 'ko-KR', format = 'yyyy-MM-dd', className, disabled = false, readonly = false,
|
|
6676
|
+
const DatePicker = ({ mode = 'single', type = 'dropdown', value, defaultValue, onChange, minDate, maxDate, events = [], showOutsideDays = true, startOfWeek = 'sunday', size = 'm', variant = 'default', highlightWeekends = true, highlightHolidays = false, today = new Date(), locale = 'ko-KR', format = 'yyyy-MM-dd', className, disabled = false, readonly = false, dropdownPosition = 'bottom-start',
|
|
6677
6677
|
// 인라인 모드
|
|
6678
6678
|
inline = false, }) => {
|
|
6679
6679
|
// 아이콘 크기 계산 (m이 기본값)
|
|
@@ -7013,7 +7013,7 @@ inline = false, }) => {
|
|
|
7013
7013
|
'designbase-date-picker--readonly': readonly,
|
|
7014
7014
|
'designbase-date-picker--open': isOpen,
|
|
7015
7015
|
}, className);
|
|
7016
|
-
return (jsxRuntime.jsxs("div", { ref: pickerRef, className: classes, children: [jsxRuntime.jsxs("div", { className: "designbase-date-picker__trigger", children: [jsxRuntime.jsx("button", { type: "button", className: "designbase-date-picker__icon-display", onClick: togglePicker, disabled: disabled, "aria-label": "\uB0A0\uC9DC \uC120\uD0DD \uC5F4\uAE30", children: jsxRuntime.jsx(icons.CalendarIcon, { size: 16 }) }), jsxRuntime.jsx("input", { type: "text", value: inputValue, onChange: handleInputChange, onBlur: handleInputBlur, onClick: (e) => e.stopPropagation(), disabled: disabled, readOnly: readonly, className: "designbase-date-picker__input", placeholder: "\uB0A0\uC9DC\uB97C \uC120\uD0DD\uD558\uC138\uC694", "aria-label": "\uB0A0\uC9DC \uC785\uB825" }), jsxRuntime.jsx("button", { type: "button", className: "designbase-date-picker__toggle", onClick: togglePicker, disabled: disabled, "aria-label": "\uB0A0\uC9DC \uC120\uD0DD \uC5F4\uAE30", children: jsxRuntime.jsx(icons.ChevronDownIcon, { size: 16 }) })] }), type === 'dropdown' && isOpen && (jsxRuntime.jsx("div", { className: "designbase-date-picker__dropdown", role: "dialog", "aria-modal": "false", children: renderCalendar(false) })), type === 'modal' && (jsxRuntime.jsx(Modal, { isOpen: isOpen, onClose: handleModalCancel, title: "\uB0A0\uC9DC \uC120\uD0DD", size: "s", children: renderCalendar(true) }))] }));
|
|
7016
|
+
return (jsxRuntime.jsxs("div", { ref: pickerRef, className: classes, children: [jsxRuntime.jsxs("div", { className: "designbase-date-picker__trigger", children: [jsxRuntime.jsx("button", { type: "button", className: "designbase-date-picker__icon-display", onClick: togglePicker, disabled: disabled, "aria-label": "\uB0A0\uC9DC \uC120\uD0DD \uC5F4\uAE30", children: jsxRuntime.jsx(icons.CalendarIcon, { size: 16 }) }), jsxRuntime.jsx("input", { type: "text", value: inputValue, onChange: handleInputChange, onBlur: handleInputBlur, onClick: (e) => e.stopPropagation(), disabled: disabled, readOnly: readonly, className: "designbase-date-picker__input", placeholder: "\uB0A0\uC9DC\uB97C \uC120\uD0DD\uD558\uC138\uC694", "aria-label": "\uB0A0\uC9DC \uC785\uB825" }), jsxRuntime.jsx("button", { type: "button", className: "designbase-date-picker__toggle", onClick: togglePicker, disabled: disabled, "aria-label": "\uB0A0\uC9DC \uC120\uD0DD \uC5F4\uAE30", children: jsxRuntime.jsx(icons.ChevronDownIcon, { size: 16 }) })] }), type === 'dropdown' && isOpen && (jsxRuntime.jsx("div", { className: clsx("designbase-date-picker__dropdown", `designbase-date-picker__dropdown--${dropdownPosition}`), role: "dialog", "aria-modal": "false", children: renderCalendar(false) })), type === 'modal' && (jsxRuntime.jsx(Modal, { isOpen: isOpen, onClose: handleModalCancel, title: "\uB0A0\uC9DC \uC120\uD0DD", size: "s", children: renderCalendar(true) }))] }));
|
|
7017
7017
|
};
|
|
7018
7018
|
|
|
7019
7019
|
const Drawer = ({ isOpen, onClose, title, children, position = 'right', size = 'm', showCloseButton = true, closeOnBackdropClick = true, closeOnEscape = true, animationDuration = 300, showOverlay = true, overlayClosable = true, className, style, zIndex = 1000, trapFocus = true, id, ...props }) => {
|
|
@@ -7623,7 +7623,7 @@ const Textarea = React.forwardRef(({ label, placeholder, defaultValue, value, si
|
|
|
7623
7623
|
Textarea.displayName = 'Textarea';
|
|
7624
7624
|
|
|
7625
7625
|
const ITEM_HEIGHT = 40;
|
|
7626
|
-
const TimePicker = ({ size = 'm', type = 'dropdown', value, defaultValue = '12:00', format = '24h', minuteStep = 1, disabled = false, readonly = false, onChange, className, }) => {
|
|
7626
|
+
const TimePicker = ({ size = 'm', type = 'dropdown', value, defaultValue = '12:00', format = '24h', minuteStep = 1, disabled = false, readonly = false, dropdownPosition = 'bottom-start', onChange, className, }) => {
|
|
7627
7627
|
const [selectedTime, setSelectedTime] = React.useState(value || defaultValue);
|
|
7628
7628
|
const [isOpen, setIsOpen] = React.useState(false);
|
|
7629
7629
|
const [inputValue, setInputValue] = React.useState(value || defaultValue);
|
|
@@ -7862,7 +7862,7 @@ const TimePicker = ({ size = 'm', type = 'dropdown', value, defaultValue = '12:0
|
|
|
7862
7862
|
}, children: "\uC120\uD0DD" }) }))] }));
|
|
7863
7863
|
};
|
|
7864
7864
|
const classes = clsx('designbase-time-picker', `designbase-time-picker--${size}`, { 'designbase-time-picker--disabled': disabled, 'designbase-time-picker--readonly': readonly, 'designbase-time-picker--open': isOpen }, className);
|
|
7865
|
-
return (jsxRuntime.jsxs("div", { ref: pickerRef, className: classes, children: [jsxRuntime.jsxs("div", { className: "designbase-time-picker__trigger", children: [jsxRuntime.jsx("button", { type: "button", className: "designbase-time-picker__icon-display", onClick: togglePicker, disabled: disabled, "aria-label": "\uC2DC\uAC04 \uC120\uD0DD \uC5F4\uAE30", children: jsxRuntime.jsx(icons.ClockIcon, { size: 16 }) }), jsxRuntime.jsx("input", { type: "text", value: inputValue, onChange: (e) => setInputValue(e.target.value), onBlur: handleInputBlur, onClick: (e) => e.stopPropagation(), disabled: disabled, readOnly: readonly, className: "designbase-time-picker__input", placeholder: is12h ? (showSeconds ? '12:00:00 PM' : '12:00 PM') : (showSeconds ? '12:00:00' : '12:00'), "aria-label": "\uC2DC\uAC04 \uC785\uB825" }), jsxRuntime.jsx("button", { type: "button", className: "designbase-time-picker__toggle", onClick: togglePicker, disabled: disabled, "aria-label": "\uC2DC\uAC04 \uC120\uD0DD \uC5F4\uAE30", children: jsxRuntime.jsx(icons.ChevronDownIcon, { size: 16 }) })] }), type === 'dropdown' && isOpen && (jsxRuntime.jsx("div", { className: "designbase-time-picker__dropdown", role: "dialog", "aria-modal": "false", children: renderTimeSelector(false) })), type === 'modal' && (jsxRuntime.jsxs(Modal, { isOpen: isOpen, onClose: handleModalCancel, title: "\uC2DC\uAC04 \uC120\uD0DD", size: "s", children: [renderTimeSelector(true), jsxRuntime.jsx(ModalFooter, { children: jsxRuntime.jsxs("div", { className: "designbase-time-picker__modal-footer", children: [jsxRuntime.jsx(Button, { variant: "secondary", size: "m", onPress: handleModalCancel, children: "\uCDE8\uC18C" }), jsxRuntime.jsx(Button, { variant: "primary", size: "m", onPress: handleModalApply, children: "\uC801\uC6A9" })] }) })] }))] }));
|
|
7865
|
+
return (jsxRuntime.jsxs("div", { ref: pickerRef, className: classes, children: [jsxRuntime.jsxs("div", { className: "designbase-time-picker__trigger", children: [jsxRuntime.jsx("button", { type: "button", className: "designbase-time-picker__icon-display", onClick: togglePicker, disabled: disabled, "aria-label": "\uC2DC\uAC04 \uC120\uD0DD \uC5F4\uAE30", children: jsxRuntime.jsx(icons.ClockIcon, { size: 16 }) }), jsxRuntime.jsx("input", { type: "text", value: inputValue, onChange: (e) => setInputValue(e.target.value), onBlur: handleInputBlur, onClick: (e) => e.stopPropagation(), disabled: disabled, readOnly: readonly, className: "designbase-time-picker__input", placeholder: is12h ? (showSeconds ? '12:00:00 PM' : '12:00 PM') : (showSeconds ? '12:00:00' : '12:00'), "aria-label": "\uC2DC\uAC04 \uC785\uB825" }), jsxRuntime.jsx("button", { type: "button", className: "designbase-time-picker__toggle", onClick: togglePicker, disabled: disabled, "aria-label": "\uC2DC\uAC04 \uC120\uD0DD \uC5F4\uAE30", children: jsxRuntime.jsx(icons.ChevronDownIcon, { size: 16 }) })] }), type === 'dropdown' && isOpen && (jsxRuntime.jsx("div", { className: clsx("designbase-time-picker__dropdown", `designbase-time-picker__dropdown--${dropdownPosition}`), role: "dialog", "aria-modal": "false", children: renderTimeSelector(false) })), type === 'modal' && (jsxRuntime.jsxs(Modal, { isOpen: isOpen, onClose: handleModalCancel, title: "\uC2DC\uAC04 \uC120\uD0DD", size: "s", children: [renderTimeSelector(true), jsxRuntime.jsx(ModalFooter, { children: jsxRuntime.jsxs("div", { className: "designbase-time-picker__modal-footer", children: [jsxRuntime.jsx(Button, { variant: "secondary", size: "m", onPress: handleModalCancel, children: "\uCDE8\uC18C" }), jsxRuntime.jsx(Button, { variant: "primary", size: "m", onPress: handleModalApply, children: "\uC801\uC6A9" })] }) })] }))] }));
|
|
7866
7866
|
};
|
|
7867
7867
|
TimePicker.displayName = 'TimePicker';
|
|
7868
7868
|
|
|
@@ -8257,6 +8257,32 @@ const HeroFeature = ({ title, subtitle, description, image, imageAlt, background
|
|
|
8257
8257
|
return (jsxRuntime.jsxs("section", { className: classes, style: containerStyle, children: [renderBackground(), renderOverlay(), jsxRuntime.jsxs("div", { className: "designbase-hero-feature__container", children: [jsxRuntime.jsxs("div", { className: "designbase-hero-feature__content", children: [icon && (jsxRuntime.jsx("div", { className: "designbase-hero-feature__icon", children: icon })), renderBadge(), jsxRuntime.jsx("h1", { className: "designbase-hero-feature__title", children: title }), subtitle && (jsxRuntime.jsx("h2", { className: "designbase-hero-feature__subtitle", children: subtitle })), description && (jsxRuntime.jsx("p", { className: "designbase-hero-feature__description", children: description })), renderButtons(), renderStats()] }), variant === 'split' && renderImage()] }), variant !== 'split' && renderImage()] }));
|
|
8258
8258
|
};
|
|
8259
8259
|
|
|
8260
|
+
/**
|
|
8261
|
+
* ImagePlaceholder 컴포넌트
|
|
8262
|
+
*
|
|
8263
|
+
* 이미지가 없거나 업로드 전 대기 상태일 때 격자 패턴과 라벨을 보여주는 자리표시자입니다.
|
|
8264
|
+
*/
|
|
8265
|
+
const ImagePlaceholder = ({ className, style, label, showLabel = false, patternSize = 20, patternColor = '#f3f3f3', backgroundColor = '#e7e7e7', width = '100%', height, aspectRatio, hoverEffect = false, onClick, }) => {
|
|
8266
|
+
const rootStyle = {
|
|
8267
|
+
width,
|
|
8268
|
+
height,
|
|
8269
|
+
aspectRatio,
|
|
8270
|
+
...style,
|
|
8271
|
+
};
|
|
8272
|
+
const patternStyle = {
|
|
8273
|
+
'--db-placeholder-bg': backgroundColor,
|
|
8274
|
+
'--db-placeholder-pattern': patternColor,
|
|
8275
|
+
'--db-placeholder-size': `${patternSize}px`,
|
|
8276
|
+
'--db-placeholder-half-size': `${patternSize / 2}px`,
|
|
8277
|
+
};
|
|
8278
|
+
const classes = clsx('designbase-image-placeholder', {
|
|
8279
|
+
'designbase-image-placeholder--hover': hoverEffect,
|
|
8280
|
+
'designbase-image-placeholder--clickable': !!onClick,
|
|
8281
|
+
}, className);
|
|
8282
|
+
return (jsxRuntime.jsxs("div", { className: classes, style: rootStyle, onClick: onClick, role: onClick ? 'button' : undefined, tabIndex: onClick ? 0 : undefined, children: [jsxRuntime.jsx("div", { className: "designbase-image-placeholder__pattern", style: patternStyle }), showLabel && label && (jsxRuntime.jsx("div", { className: "designbase-image-placeholder__label-wrap", children: jsxRuntime.jsx("span", { className: "designbase-image-placeholder__label", children: label }) }))] }));
|
|
8283
|
+
};
|
|
8284
|
+
ImagePlaceholder.displayName = 'ImagePlaceholder';
|
|
8285
|
+
|
|
8260
8286
|
const Lightbox = ({ images, currentIndex = 0, size = 'l', isOpen, onOpenChange, onImageChange, enableZoom = true, enableRotate = true, enableDownload = true, enableFullscreen = true, enableKeyboard = true, enableWheelZoom = true, showThumbnails = true, showCounter = true, showCloseButton = true, showNavigationButtons = true, showToolbar = true, closeOnBackdropClick = true, closeOnEscape = true, className, }) => {
|
|
8261
8287
|
const [internalCurrentIndex, setInternalCurrentIndex] = React.useState(currentIndex);
|
|
8262
8288
|
const [zoomLevel, setZoomLevel] = React.useState(1);
|
|
@@ -9356,6 +9382,17 @@ const OnboardingModal = ({ steps, currentStep = 0, isOpen, onClose, onStepChange
|
|
|
9356
9382
|
};
|
|
9357
9383
|
OnboardingModal.displayName = 'OnboardingModal';
|
|
9358
9384
|
|
|
9385
|
+
/**
|
|
9386
|
+
* PageHeader 컴포넌트
|
|
9387
|
+
*
|
|
9388
|
+
* 브레드크럼, 타이틀, 서브타이틀, 설명 및 액션(버튼, 탭 등)을 포함하는 페이지 헤더 섹션입니다.
|
|
9389
|
+
*/
|
|
9390
|
+
const PageHeader = ({ title, description, subtitle, breadcrumbs, actions, align = 'center', className, }) => {
|
|
9391
|
+
const classes = clsx('designbase-page-header', `designbase-page-header--${align}`, className);
|
|
9392
|
+
return (jsxRuntime.jsxs("div", { className: classes, children: [breadcrumbs && breadcrumbs.length > 0 && (jsxRuntime.jsx("div", { className: "designbase-page-header__breadcrumbs", children: jsxRuntime.jsx(Breadcrumbs, { items: breadcrumbs, size: "s" }) })), jsxRuntime.jsxs("div", { className: "designbase-page-header__content", children: [jsxRuntime.jsx("h1", { className: "designbase-page-header__title", children: title }), subtitle && (jsxRuntime.jsx("h2", { className: "designbase-page-header__subtitle", children: subtitle })), description && (jsxRuntime.jsx("div", { className: "designbase-page-header__description", children: description }))] }), actions && (jsxRuntime.jsx("div", { className: "designbase-page-header__actions", children: actions }))] }));
|
|
9393
|
+
};
|
|
9394
|
+
PageHeader.displayName = 'PageHeader';
|
|
9395
|
+
|
|
9359
9396
|
const Tutorial = ({ steps, currentStep = 0, isActive, onStart, onEnd, onStepChange, onNext, onPrev, indicatorType = 'numbers', indicatorSize = 'm', closeIcon: CloseIconComponent = icons.CloseIcon, prevIcon: PrevIconComponent = icons.ChevronLeftIcon, nextIcon: NextIconComponent = icons.ChevronRightIcon, className, ...props }) => {
|
|
9360
9397
|
const [internalStep, setInternalStep] = React.useState(currentStep);
|
|
9361
9398
|
const [targetElement, setTargetElement] = React.useState(null);
|
|
@@ -10040,7 +10077,7 @@ const Progress = ({ value, max = 100, size = 'm', variant = 'default', type = 'l
|
|
|
10040
10077
|
return (jsxRuntime.jsx("div", { className: classes, children: type === 'linear' ? renderLinearProgress() : renderCircularProgress() }));
|
|
10041
10078
|
};
|
|
10042
10079
|
|
|
10043
|
-
const ProgressStep = ({ items, size = 'm', layout = '
|
|
10080
|
+
const ProgressStep = ({ items, size = 'm', layout = 'horizontal', currentStep = 0, clickable = false, fullWidth = false, disabled = false, className, style, onStepClick, }) => {
|
|
10044
10081
|
const handleStepClick = (item, index) => {
|
|
10045
10082
|
if (disabled || item.disabled || !clickable)
|
|
10046
10083
|
return;
|
|
@@ -10078,7 +10115,7 @@ const ProgressStep = ({ items, size = 'm', layout = 'vertical', currentStep = 0,
|
|
|
10078
10115
|
e.preventDefault();
|
|
10079
10116
|
handleStepClick(item, index);
|
|
10080
10117
|
}
|
|
10081
|
-
}, children: [status === 'active' && (jsxRuntime.jsx("div", { className: "designbase-progress-step__pulse" })), item.icon ? (jsxRuntime.jsx("div", { className: "designbase-progress-step__icon", children: item.icon })) : (jsxRuntime.jsx("span", { className: "designbase-progress-step__number", children: index + 1 }))] }), !isLast && (jsxRuntime.jsx("div", { className: connectorClasses }))] }), jsxRuntime.jsxs("div", { className: "designbase-progress-step__content", children: [jsxRuntime.
|
|
10118
|
+
}, children: [status === 'active' && (jsxRuntime.jsx("div", { className: "designbase-progress-step__pulse" })), item.icon ? (jsxRuntime.jsx("div", { className: "designbase-progress-step__icon", children: item.icon })) : (jsxRuntime.jsx("div", { className: "designbase-progress-step__icon", children: status === 'completed' ? (jsxRuntime.jsx(icons.DoneIcon, { size: size === 's' ? 12 : size === 'l' ? 20 : 16 })) : status === 'error' ? (jsxRuntime.jsx(icons.WarningFilledIcon, { size: size === 's' ? 12 : size === 'l' ? 20 : 16 })) : (jsxRuntime.jsx("span", { className: "designbase-progress-step__number", children: index + 1 })) }))] }), !isLast && (jsxRuntime.jsx("div", { className: connectorClasses }))] }), jsxRuntime.jsxs("div", { className: "designbase-progress-step__content", children: [jsxRuntime.jsx("div", { className: "designbase-progress-step__header", children: jsxRuntime.jsx("h3", { className: "designbase-progress-step__title", children: item.title }) }), item.description && (jsxRuntime.jsx("p", { className: "designbase-progress-step__description", children: item.description })), item.timestamp && (jsxRuntime.jsx("span", { className: "designbase-progress-step__timestamp", children: item.timestamp }))] })] }, item.id));
|
|
10082
10119
|
}) }));
|
|
10083
10120
|
};
|
|
10084
10121
|
|
|
@@ -12184,6 +12221,28 @@ const Toolbar = ({ items, size = 'm', variant = 'default', position = 'top', ful
|
|
|
12184
12221
|
return (jsxRuntime.jsx("div", { className: classes, children: jsxRuntime.jsxs("div", { className: "designbase-toolbar__content", children: [Object.entries(groupedItems).map(([groupName, groupItems], groupIndex) => (jsxRuntime.jsxs("div", { className: "designbase-toolbar__group", children: [groupItems.map(renderItem), groupIndex < Object.keys(groupedItems).length - 1 && (jsxRuntime.jsx("div", { className: "designbase-toolbar__group-separator" }))] }, groupName))), children && (jsxRuntime.jsx("div", { className: "designbase-toolbar__children", children: children }))] }) }));
|
|
12185
12222
|
};
|
|
12186
12223
|
|
|
12224
|
+
/**
|
|
12225
|
+
* TopBanner 컴포넌트
|
|
12226
|
+
*
|
|
12227
|
+
* 페이지 최상단에 위치하여 공지사항이나 프로모션을 안내하는 슬림한 배너입니다.
|
|
12228
|
+
*/
|
|
12229
|
+
const TopBanner = ({ badgeText, content, image, linkText, onLinkPress, onClose, variant = 'primary', fixed = false, className, }) => {
|
|
12230
|
+
const [isVisible, setIsVisible] = React.useState(true);
|
|
12231
|
+
if (!isVisible)
|
|
12232
|
+
return null;
|
|
12233
|
+
const handleClose = () => {
|
|
12234
|
+
setIsVisible(false);
|
|
12235
|
+
onClose?.();
|
|
12236
|
+
};
|
|
12237
|
+
const isDarkBg = variant === 'primary' || variant === 'dark';
|
|
12238
|
+
const classes = clsx('designbase-top-banner', `designbase-top-banner--${variant}`, {
|
|
12239
|
+
'designbase-top-banner--fixed': fixed,
|
|
12240
|
+
'designbase-top-banner--has-image': !!image,
|
|
12241
|
+
}, className);
|
|
12242
|
+
return (jsxRuntime.jsx("div", { className: classes, role: "alert", children: jsxRuntime.jsxs("div", { className: "designbase-top-banner__container", children: [jsxRuntime.jsxs("div", { className: "designbase-top-banner__content", children: [image && (jsxRuntime.jsx("div", { className: "designbase-top-banner__image-wrapper", children: jsxRuntime.jsx("img", { src: image, alt: "", className: "designbase-top-banner__image" }) })), badgeText && (jsxRuntime.jsx(Badge, { size: "s", variant: isDarkBg ? 'secondary' : 'primary', style: "text", className: "designbase-top-banner__badge", children: badgeText })), jsxRuntime.jsx("span", { className: "designbase-top-banner__text", children: content }), linkText && (jsxRuntime.jsx(Button, { className: "designbase-top-banner__link", variant: isDarkBg ? 'secondary' : 'ghost', size: "s", onPress: onLinkPress, endIcon: icons.ChevronRightIcon, children: linkText }))] }), jsxRuntime.jsx(Button, { className: "designbase-top-banner__close", variant: "ghost", size: "m", iconOnly: true, onPress: handleClose, "aria-label": "\uB2EB\uAE30", children: jsxRuntime.jsx(icons.CloseIcon, {}) })] }) }));
|
|
12243
|
+
};
|
|
12244
|
+
TopBanner.displayName = 'TopBanner';
|
|
12245
|
+
|
|
12187
12246
|
const VideoPlayer = ({ src, poster, title, description, size = 'm', variant = 'default', theme = 'auto', autoPlay = false, loop = false, muted = false, showControls = true, enableFullscreen = true, enableKeyboard = true, enableTouch = true, showProgress = true, showTime = true, showVolume = true, showSettings = false, playlist = [], currentIndex = 0, autoPause = true, playbackRates = [0.5, 0.75, 1, 1.25, 1.5, 2], defaultPlaybackRate = 1, qualities = [], defaultQuality = '', subtitles = [], defaultSubtitle = '', onPlay, onPause, onEnded, onTimeUpdate, onVolumeChange, onFullscreenChange, onPlaylistChange, onPlaybackRateChange, onQualityChange, onSubtitleChange, onError, className, }) => {
|
|
12188
12247
|
const videoRef = React.useRef(null);
|
|
12189
12248
|
const containerRef = React.useRef(null);
|
|
@@ -12686,6 +12745,7 @@ exports.Grid = Grid;
|
|
|
12686
12745
|
exports.HeroFeature = HeroFeature;
|
|
12687
12746
|
exports.Image = Image$1;
|
|
12688
12747
|
exports.ImageList = ImageList;
|
|
12748
|
+
exports.ImagePlaceholder = ImagePlaceholder;
|
|
12689
12749
|
exports.Indicator = Indicator;
|
|
12690
12750
|
exports.Input = Input;
|
|
12691
12751
|
exports.Label = Label;
|
|
@@ -12702,6 +12762,7 @@ exports.ModalFooter = ModalFooter;
|
|
|
12702
12762
|
exports.ModalHeader = ModalHeader;
|
|
12703
12763
|
exports.Navbar = Navbar;
|
|
12704
12764
|
exports.OnboardingModal = OnboardingModal;
|
|
12765
|
+
exports.PageHeader = PageHeader;
|
|
12705
12766
|
exports.Pagination = Pagination;
|
|
12706
12767
|
exports.Popover = Popover;
|
|
12707
12768
|
exports.Progress = Progress;
|
|
@@ -12738,6 +12799,7 @@ exports.ToastProvider = ToastProvider;
|
|
|
12738
12799
|
exports.Toggle = Toggle;
|
|
12739
12800
|
exports.Toolbar = Toolbar;
|
|
12740
12801
|
exports.Tooltip = Tooltip;
|
|
12802
|
+
exports.TopBanner = TopBanner;
|
|
12741
12803
|
exports.Tutorial = Tutorial;
|
|
12742
12804
|
exports.VideoPlayer = VideoPlayer;
|
|
12743
12805
|
exports.YouTubePlayer = YouTubePlayer;
|