@designbasekorea/ui 0.2.13 → 0.2.14
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 +4 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +4 -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 +4 -2
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -9362,7 +9362,7 @@ const ProgressStep = ({ items, size = 'm', layout = 'vertical', currentStep = 0,
|
|
|
9362
9362
|
}) }));
|
|
9363
9363
|
};
|
|
9364
9364
|
|
|
9365
|
-
const RangeSlider = ({ value, range, min = 0, max = 100, step = 1, size = 'm', variant = 'default', showValue = false, showMarks = false, marks = [], markLabels = {}, disabled = false, readOnly = false, fullWidth = false, vertical = false, onChange, onRangeChange, className, ...props }) => {
|
|
9365
|
+
const RangeSlider = ({ value, range, min = 0, max = 100, step = 1, size = 'm', variant = 'default', showValue = false, valuePosition = 'top', showMarks = false, marks = [], markLabels = {}, disabled = false, readOnly = false, fullWidth = false, vertical = false, onChange, onRangeChange, className, ...props }) => {
|
|
9366
9366
|
const [internalValue, setInternalValue] = useState(value ?? min);
|
|
9367
9367
|
const [internalRange, setInternalRange] = useState(range ?? [min, max]);
|
|
9368
9368
|
const [isDragging, setIsDragging] = useState(false);
|
|
@@ -9373,6 +9373,8 @@ const RangeSlider = ({ value, range, min = 0, max = 100, step = 1, size = 'm', v
|
|
|
9373
9373
|
const isControlled = value !== undefined || range !== undefined;
|
|
9374
9374
|
const currentValue = isControlled ? (value ?? internalValue) : internalValue;
|
|
9375
9375
|
const currentRange = isControlled ? (range ?? internalRange) : internalRange;
|
|
9376
|
+
// 단일 값일 때 기본적으로 우측에 표시
|
|
9377
|
+
const effectiveValuePosition = valuePosition === 'top' && range === undefined ? 'right' : valuePosition;
|
|
9376
9378
|
// 값 정규화
|
|
9377
9379
|
const normalizeValue = useCallback((val) => {
|
|
9378
9380
|
return Math.max(min, Math.min(max, val));
|
|
@@ -9542,7 +9544,7 @@ const RangeSlider = ({ value, range, min = 0, max = 100, step = 1, size = 'm', v
|
|
|
9542
9544
|
}, "aria-hidden": "true", children: markLabels[mark] && (jsx("span", { className: "designbase-range-slider__mark-label", children: markLabels[mark] })) }, mark));
|
|
9543
9545
|
});
|
|
9544
9546
|
};
|
|
9545
|
-
const classes = clsx('designbase-range-slider', `designbase-range-slider--${size}`, `designbase-range-slider--${variant}`, {
|
|
9547
|
+
const classes = clsx('designbase-range-slider', `designbase-range-slider--${size}`, `designbase-range-slider--${variant}`, `designbase-range-slider--value-${effectiveValuePosition}`, {
|
|
9546
9548
|
'designbase-range-slider--disabled': disabled,
|
|
9547
9549
|
'designbase-range-slider--readonly': readOnly,
|
|
9548
9550
|
'designbase-range-slider--full-width': fullWidth,
|