@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.js
CHANGED
|
@@ -9364,7 +9364,7 @@ const ProgressStep = ({ items, size = 'm', layout = 'vertical', currentStep = 0,
|
|
|
9364
9364
|
}) }));
|
|
9365
9365
|
};
|
|
9366
9366
|
|
|
9367
|
-
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 }) => {
|
|
9367
|
+
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 }) => {
|
|
9368
9368
|
const [internalValue, setInternalValue] = React.useState(value ?? min);
|
|
9369
9369
|
const [internalRange, setInternalRange] = React.useState(range ?? [min, max]);
|
|
9370
9370
|
const [isDragging, setIsDragging] = React.useState(false);
|
|
@@ -9375,6 +9375,8 @@ const RangeSlider = ({ value, range, min = 0, max = 100, step = 1, size = 'm', v
|
|
|
9375
9375
|
const isControlled = value !== undefined || range !== undefined;
|
|
9376
9376
|
const currentValue = isControlled ? (value ?? internalValue) : internalValue;
|
|
9377
9377
|
const currentRange = isControlled ? (range ?? internalRange) : internalRange;
|
|
9378
|
+
// 단일 값일 때 기본적으로 우측에 표시
|
|
9379
|
+
const effectiveValuePosition = valuePosition === 'top' && range === undefined ? 'right' : valuePosition;
|
|
9378
9380
|
// 값 정규화
|
|
9379
9381
|
const normalizeValue = React.useCallback((val) => {
|
|
9380
9382
|
return Math.max(min, Math.min(max, val));
|
|
@@ -9544,7 +9546,7 @@ const RangeSlider = ({ value, range, min = 0, max = 100, step = 1, size = 'm', v
|
|
|
9544
9546
|
}, "aria-hidden": "true", children: markLabels[mark] && (jsxRuntime.jsx("span", { className: "designbase-range-slider__mark-label", children: markLabels[mark] })) }, mark));
|
|
9545
9547
|
});
|
|
9546
9548
|
};
|
|
9547
|
-
const classes = clsx('designbase-range-slider', `designbase-range-slider--${size}`, `designbase-range-slider--${variant}`, {
|
|
9549
|
+
const classes = clsx('designbase-range-slider', `designbase-range-slider--${size}`, `designbase-range-slider--${variant}`, `designbase-range-slider--value-${effectiveValuePosition}`, {
|
|
9548
9550
|
'designbase-range-slider--disabled': disabled,
|
|
9549
9551
|
'designbase-range-slider--readonly': readOnly,
|
|
9550
9552
|
'designbase-range-slider--full-width': fullWidth,
|