@designbasekorea/ui 0.2.12 → 0.2.13
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 +3 -0
- package/dist/index.esm.css +1 -1
- package/dist/index.esm.css.map +1 -1
- package/dist/index.esm.js +7 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +7 -2
- 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 +7 -2
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -5278,7 +5278,7 @@
|
|
|
5278
5278
|
};
|
|
5279
5279
|
Chip.displayName = 'Chip';
|
|
5280
5280
|
|
|
5281
|
-
const ColorPicker = ({ size = 'm', type = 'dropdown', value, defaultValue = '#006FFF', showInput = true, showAlpha = false, showFormatSelector = true, showCopyButton = true, disabled = false, readonly = false, onChange, className, }) => {
|
|
5281
|
+
const ColorPicker = ({ size = 'm', type = 'dropdown', position = 'bottom-left', value, defaultValue = '#006FFF', showInput = true, showAlpha = false, showFormatSelector = true, showCopyButton = true, disabled = false, readonly = false, onChange, className, }) => {
|
|
5282
5282
|
const [selectedColor, setSelectedColor] = React.useState(value || defaultValue);
|
|
5283
5283
|
const [isOpen, setIsOpen] = React.useState(false);
|
|
5284
5284
|
const [hue, setHue] = React.useState(211);
|
|
@@ -5424,6 +5424,11 @@
|
|
|
5424
5424
|
const handleInputChange = (e) => {
|
|
5425
5425
|
const newValue = e.target.value.trim();
|
|
5426
5426
|
setInputValue(newValue);
|
|
5427
|
+
// HEX 값이 유효하면 실시간으로 색상 업데이트
|
|
5428
|
+
if (/^#[0-9A-F]{6}$/i.test(newValue)) {
|
|
5429
|
+
handleColorChange(newValue.toUpperCase());
|
|
5430
|
+
updateHSLFromHex(newValue);
|
|
5431
|
+
}
|
|
5427
5432
|
};
|
|
5428
5433
|
// 입력 필드에서 포커스 아웃 시 검증 및 적용
|
|
5429
5434
|
const handleInputBlur = () => {
|
|
@@ -5511,7 +5516,7 @@
|
|
|
5511
5516
|
return;
|
|
5512
5517
|
setIsOpen(!isOpen);
|
|
5513
5518
|
};
|
|
5514
|
-
const classes = clsx('designbase-color-picker', `designbase-color-picker--${size}`, {
|
|
5519
|
+
const classes = clsx('designbase-color-picker', `designbase-color-picker--${size}`, `designbase-color-picker--${position}`, {
|
|
5515
5520
|
'designbase-color-picker--disabled': disabled,
|
|
5516
5521
|
'designbase-color-picker--readonly': readonly,
|
|
5517
5522
|
'designbase-color-picker--open': isOpen,
|