@chayns-components/core 5.5.66 → 5.5.67
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/lib/cjs/components/slider/Slider.js +77 -36
- package/lib/cjs/components/slider/Slider.js.map +1 -1
- package/lib/cjs/components/slider/Slider.styles.js +2 -2
- package/lib/cjs/components/slider/Slider.styles.js.map +1 -1
- package/lib/esm/components/slider/Slider.js +74 -31
- package/lib/esm/components/slider/Slider.js.map +1 -1
- package/lib/esm/components/slider/Slider.styles.js +2 -2
- package/lib/esm/components/slider/Slider.styles.js.map +1 -1
- package/lib/types/components/slider/Slider.styles.d.ts +6 -6
- package/package.json +2 -2
|
@@ -13,6 +13,7 @@ var _useKeyboardFocusHighlighting = require("../../hooks/useKeyboardFocusHighlig
|
|
|
13
13
|
var _slider = require("../../utils/slider");
|
|
14
14
|
var _Slider = require("./Slider.styles");
|
|
15
15
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
16
|
+
const SLIDER_TRACK_INSET = 40;
|
|
16
17
|
const Slider = ({
|
|
17
18
|
interval,
|
|
18
19
|
isDisabled,
|
|
@@ -44,7 +45,9 @@ const Slider = ({
|
|
|
44
45
|
const fromSliderThumbContentRef = (0, _react.useRef)(null);
|
|
45
46
|
const toSliderThumbContentRef = (0, _react.useRef)(null);
|
|
46
47
|
const sliderWrapperRef = (0, _react.useRef)(null);
|
|
48
|
+
const activePointerIdRef = (0, _react.useRef)(null);
|
|
47
49
|
const sliderWrapperSize = (0, _element.useElementSize)(sliderWrapperRef);
|
|
50
|
+
const sliderTrackWidth = Math.max(((sliderWrapperSize === null || sliderWrapperSize === void 0 ? void 0 : sliderWrapperSize.width) ?? 0) - SLIDER_TRACK_INSET, 0);
|
|
48
51
|
const theme = (0, _styledComponents.useTheme)();
|
|
49
52
|
const shouldShowKeyboardHighlighting = (0, _useKeyboardFocusHighlighting.useKeyboardFocusHighlighting)(shouldEnableKeyboardHighlighting && !isDisabled);
|
|
50
53
|
(0, _useFocusRingPortal.useFocusRingPortal)(fromSliderRef, {
|
|
@@ -177,6 +180,16 @@ const Slider = ({
|
|
|
177
180
|
// Note: An interval can't be in the deps because of rerender
|
|
178
181
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
179
182
|
}, [theme]);
|
|
183
|
+
const normalizeSingleValue = (0, _react.useCallback)(rawValue => {
|
|
184
|
+
const effectiveMin = typeof minEnabledValue === 'number' ? Math.max(minValue, minEnabledValue) : minValue;
|
|
185
|
+
const effectiveMax = typeof maxEnabledValue === 'number' ? Math.min(maxValue, maxEnabledValue) : maxValue;
|
|
186
|
+
let newValue = rawValue;
|
|
187
|
+
if (Number.isNaN(newValue)) {
|
|
188
|
+
newValue = effectiveMin;
|
|
189
|
+
}
|
|
190
|
+
if (newValue < effectiveMin) newValue = effectiveMin;else if (newValue > effectiveMax - effectiveMax % step) newValue = effectiveMax;else newValue = Math.round(newValue / step) * step;
|
|
191
|
+
return newValue;
|
|
192
|
+
}, [maxEnabledValue, maxValue, minEnabledValue, minValue, step]);
|
|
180
193
|
|
|
181
194
|
/**
|
|
182
195
|
* This function updates the value
|
|
@@ -191,50 +204,78 @@ const Slider = ({
|
|
|
191
204
|
handleControlFromSlider(event);
|
|
192
205
|
return;
|
|
193
206
|
}
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
const effectiveMax = typeof maxEnabledValue === 'number' ? Math.min(maxValue, maxEnabledValue) : maxValue;
|
|
198
|
-
let newValue = Number(event.target.value);
|
|
199
|
-
|
|
200
|
-
// Clamp to effective range first
|
|
201
|
-
if (Number.isNaN(newValue)) {
|
|
202
|
-
newValue = effectiveMin;
|
|
207
|
+
const newValue = normalizeSingleValue(Number(event.target.value));
|
|
208
|
+
if (typeof onChange === 'function' && newValue !== previousFromValueRef.current) {
|
|
209
|
+
onChange(newValue);
|
|
203
210
|
}
|
|
204
|
-
|
|
211
|
+
updateFromValue(newValue);
|
|
212
|
+
}, [handleControlFromSlider, interval, isDisabled, maxEnabledValue, normalizeSingleValue, onChange, updateFromValue]);
|
|
213
|
+
const updateValueFromPointer = (0, _react.useCallback)(event => {
|
|
214
|
+
const bounds = event.currentTarget.getBoundingClientRect();
|
|
215
|
+
const relativePosition = (event.clientX - bounds.left - SLIDER_TRACK_INSET / 2) / sliderTrackWidth;
|
|
216
|
+
const rawValue = minValue + Math.min(Math.max(relativePosition, 0), 1) * (maxValue - minValue);
|
|
217
|
+
const newValue = normalizeSingleValue(rawValue);
|
|
205
218
|
if (typeof onChange === 'function' && newValue !== previousFromValueRef.current) {
|
|
206
219
|
onChange(newValue);
|
|
207
220
|
}
|
|
208
221
|
updateFromValue(newValue);
|
|
209
|
-
|
|
210
|
-
|
|
222
|
+
return newValue;
|
|
223
|
+
}, [maxValue, minValue, normalizeSingleValue, onChange, sliderTrackWidth, updateFromValue]);
|
|
224
|
+
const handlePointerDown = (0, _react.useCallback)(event => {
|
|
211
225
|
var _fromSliderRef$curren2;
|
|
212
|
-
if (
|
|
226
|
+
if (isDisabled || interval || event.button !== 0) {
|
|
227
|
+
return;
|
|
228
|
+
}
|
|
229
|
+
event.preventDefault();
|
|
230
|
+
activePointerIdRef.current = event.pointerId;
|
|
231
|
+
event.currentTarget.setPointerCapture(event.pointerId);
|
|
232
|
+
(_fromSliderRef$curren2 = fromSliderRef.current) === null || _fromSliderRef$curren2 === void 0 || _fromSliderRef$curren2.focus();
|
|
233
|
+
updateValueFromPointer(event);
|
|
234
|
+
}, [interval, isDisabled, updateValueFromPointer]);
|
|
235
|
+
const handlePointerMove = (0, _react.useCallback)(event => {
|
|
236
|
+
if (activePointerIdRef.current !== event.pointerId) {
|
|
237
|
+
return;
|
|
238
|
+
}
|
|
239
|
+
event.preventDefault();
|
|
240
|
+
updateValueFromPointer(event);
|
|
241
|
+
}, [updateValueFromPointer]);
|
|
242
|
+
const handlePointerUp = (0, _react.useCallback)(event => {
|
|
243
|
+
if (activePointerIdRef.current !== event.pointerId) {
|
|
244
|
+
return;
|
|
245
|
+
}
|
|
246
|
+
event.preventDefault();
|
|
247
|
+
activePointerIdRef.current = null;
|
|
248
|
+
event.currentTarget.releasePointerCapture(event.pointerId);
|
|
249
|
+
if (typeof onSelect === 'function') {
|
|
250
|
+
onSelect(updateValueFromPointer(event));
|
|
251
|
+
}
|
|
252
|
+
}, [onSelect, updateValueFromPointer]);
|
|
253
|
+
const fromSliderThumbPosition = (0, _react.useMemo)(() => {
|
|
254
|
+
if (typeof (sliderWrapperSize === null || sliderWrapperSize === void 0 ? void 0 : sliderWrapperSize.width) === 'number') {
|
|
213
255
|
return (0, _slider.calculateGradientOffset)({
|
|
214
256
|
maxValue,
|
|
215
257
|
minValue,
|
|
216
|
-
sliderWidth:
|
|
258
|
+
sliderWidth: sliderTrackWidth,
|
|
217
259
|
thumbWidth: 20,
|
|
218
260
|
value: fromValue,
|
|
219
261
|
wrapperWidth: sliderWrapperSize.width
|
|
220
262
|
});
|
|
221
263
|
}
|
|
222
264
|
return 0;
|
|
223
|
-
}, [fromValue, maxValue, minValue, sliderWrapperSize === null || sliderWrapperSize === void 0 ? void 0 : sliderWrapperSize.width]);
|
|
265
|
+
}, [fromValue, maxValue, minValue, sliderTrackWidth, sliderWrapperSize === null || sliderWrapperSize === void 0 ? void 0 : sliderWrapperSize.width]);
|
|
224
266
|
const toSliderThumbPosition = (0, _react.useMemo)(() => {
|
|
225
|
-
|
|
226
|
-
if (typeof ((_toSliderRef$current2 = toSliderRef.current) === null || _toSliderRef$current2 === void 0 ? void 0 : _toSliderRef$current2.offsetWidth) === 'number' && typeof (sliderWrapperSize === null || sliderWrapperSize === void 0 ? void 0 : sliderWrapperSize.width) === 'number') {
|
|
267
|
+
if (typeof (sliderWrapperSize === null || sliderWrapperSize === void 0 ? void 0 : sliderWrapperSize.width) === 'number') {
|
|
227
268
|
return (0, _slider.calculateGradientOffset)({
|
|
228
269
|
maxValue,
|
|
229
270
|
minValue,
|
|
230
|
-
sliderWidth:
|
|
271
|
+
sliderWidth: sliderTrackWidth,
|
|
231
272
|
thumbWidth: 20,
|
|
232
273
|
value: toValue,
|
|
233
274
|
wrapperWidth: sliderWrapperSize.width
|
|
234
275
|
});
|
|
235
276
|
}
|
|
236
277
|
return 0;
|
|
237
|
-
}, [maxValue, minValue, sliderWrapperSize === null || sliderWrapperSize === void 0 ? void 0 : sliderWrapperSize.width, toValue]);
|
|
278
|
+
}, [maxValue, minValue, sliderTrackWidth, sliderWrapperSize === null || sliderWrapperSize === void 0 ? void 0 : sliderWrapperSize.width, toValue]);
|
|
238
279
|
const toSliderThumbContentPosition = (0, _react.useMemo)(() => (0, _slider.calculatePopupPosition)({
|
|
239
280
|
min: minValue,
|
|
240
281
|
max: maxValue,
|
|
@@ -257,44 +298,41 @@ const Slider = ({
|
|
|
257
298
|
}
|
|
258
299
|
}, [isDisabled, shouldShowThumbLabel]);
|
|
259
300
|
const handleTouchEnd = (0, _react.useCallback)(() => {
|
|
260
|
-
var _fromSliderRef$curren3, _toSliderRef$
|
|
301
|
+
var _fromSliderRef$curren3, _toSliderRef$current2;
|
|
261
302
|
if (isDisabled) {
|
|
262
303
|
return;
|
|
263
304
|
}
|
|
264
305
|
void (0, _chaynsApi.setRefreshScrollEnabled)(true);
|
|
265
306
|
const from = Number((_fromSliderRef$curren3 = fromSliderRef.current) === null || _fromSliderRef$curren3 === void 0 ? void 0 : _fromSliderRef$curren3.value);
|
|
266
|
-
const to = Number((_toSliderRef$
|
|
267
|
-
if (typeof onSelect === 'function') {
|
|
268
|
-
onSelect(
|
|
307
|
+
const to = Number((_toSliderRef$current2 = toSliderRef.current) === null || _toSliderRef$current2 === void 0 ? void 0 : _toSliderRef$current2.value);
|
|
308
|
+
if (interval && typeof onSelect === 'function') {
|
|
309
|
+
onSelect(undefined, {
|
|
269
310
|
maxValue: to,
|
|
270
311
|
minValue: from
|
|
271
|
-
}
|
|
312
|
+
});
|
|
272
313
|
}
|
|
273
314
|
if (shouldShowThumbLabel) {
|
|
274
315
|
setIsBigSlider(false);
|
|
275
316
|
}
|
|
276
317
|
}, [interval, isDisabled, onSelect, shouldShowThumbLabel]);
|
|
277
318
|
const highlightedStepElements = (0, _react.useMemo)(() => {
|
|
278
|
-
var _fromSliderRef$curren4;
|
|
279
|
-
const sliderWidth = ((_fromSliderRef$curren4 = fromSliderRef.current) === null || _fromSliderRef$curren4 === void 0 ? void 0 : _fromSliderRef$curren4.offsetWidth) ?? 0;
|
|
280
319
|
const wrapperWidth = (sliderWrapperSize === null || sliderWrapperSize === void 0 ? void 0 : sliderWrapperSize.width) ?? 0;
|
|
281
|
-
if (!shouldHighlightSteps || interval ||
|
|
320
|
+
if (!shouldHighlightSteps || interval || sliderTrackWidth === 0 || wrapperWidth === 0) {
|
|
282
321
|
return null;
|
|
283
322
|
}
|
|
284
323
|
const elements = [];
|
|
285
324
|
for (let i = minValue; i <= maxValue; i += step) {
|
|
286
325
|
const isStepDisabled = typeof minEnabledValue === 'number' && i < minEnabledValue || typeof maxEnabledValue === 'number' && i > maxEnabledValue;
|
|
287
|
-
const offset = (wrapperWidth -
|
|
288
|
-
const stepWidth = sliderWidth / (maxValue - minValue) * step;
|
|
326
|
+
const offset = (wrapperWidth - sliderTrackWidth) / 2;
|
|
289
327
|
elements.push(/*#__PURE__*/_react.default.createElement(_Slider.StyledHighlightedStep, {
|
|
290
328
|
key: `step--${i}`,
|
|
291
329
|
$isDisabled: isStepDisabled,
|
|
292
330
|
$isFilled: i < fromValue,
|
|
293
|
-
$leftPosition: offset +
|
|
331
|
+
$leftPosition: offset + (i - minValue) / (maxValue - minValue) * sliderTrackWidth
|
|
294
332
|
}));
|
|
295
333
|
}
|
|
296
334
|
return elements;
|
|
297
|
-
}, [fromValue, interval, maxEnabledValue, maxValue, minEnabledValue, minValue, shouldHighlightSteps, sliderWrapperSize === null || sliderWrapperSize === void 0 ? void 0 : sliderWrapperSize.width, step]);
|
|
335
|
+
}, [fromValue, interval, maxEnabledValue, maxValue, minEnabledValue, minValue, shouldHighlightSteps, sliderTrackWidth, sliderWrapperSize === null || sliderWrapperSize === void 0 ? void 0 : sliderWrapperSize.width, step]);
|
|
298
336
|
const fromInputBackground = (0, _react.useMemo)(() => {
|
|
299
337
|
if (interval) return undefined;
|
|
300
338
|
const gradientPoints = [];
|
|
@@ -319,7 +357,10 @@ const Slider = ({
|
|
|
319
357
|
}, [fromValue, interval, maxEnabledValue, maxValue, minEnabledValue, minValue, theme]);
|
|
320
358
|
return (0, _react.useMemo)(() => /*#__PURE__*/_react.default.createElement(_Slider.StyledSlider, {
|
|
321
359
|
ref: sliderWrapperRef,
|
|
322
|
-
$isDisabled: isDisabled
|
|
360
|
+
$isDisabled: isDisabled,
|
|
361
|
+
onPointerDown: handlePointerDown,
|
|
362
|
+
onPointerMove: handlePointerMove,
|
|
363
|
+
onPointerUp: handlePointerUp
|
|
323
364
|
}, highlightedStepElements, /*#__PURE__*/_react.default.createElement(_Slider.StyledSliderInput, {
|
|
324
365
|
animate: {
|
|
325
366
|
height: isBigSlider ? 30 : 10
|
|
@@ -330,7 +371,7 @@ const Slider = ({
|
|
|
330
371
|
exit: {
|
|
331
372
|
height: 10
|
|
332
373
|
},
|
|
333
|
-
$
|
|
374
|
+
$trackInset: SLIDER_TRACK_INSET,
|
|
334
375
|
ref: fromSliderRef,
|
|
335
376
|
$isInterval: !!interval,
|
|
336
377
|
type: "range",
|
|
@@ -341,7 +382,7 @@ const Slider = ({
|
|
|
341
382
|
onTouchStart: handleTouchStart,
|
|
342
383
|
onTouchEnd: handleTouchEnd,
|
|
343
384
|
onChange: handleInputChange,
|
|
344
|
-
onMouseUp: handleMouseUp,
|
|
385
|
+
onMouseUp: interval ? handleMouseUp : undefined,
|
|
345
386
|
$background: fromInputBackground,
|
|
346
387
|
onFocus: () => {
|
|
347
388
|
setIsFromThumbFocused(true);
|
|
@@ -378,7 +419,7 @@ const Slider = ({
|
|
|
378
419
|
exit: {
|
|
379
420
|
height: 10
|
|
380
421
|
},
|
|
381
|
-
$
|
|
422
|
+
$trackInset: SLIDER_TRACK_INSET,
|
|
382
423
|
ref: toSliderRef,
|
|
383
424
|
$isInterval: !!interval,
|
|
384
425
|
type: "range",
|
|
@@ -397,7 +438,7 @@ const Slider = ({
|
|
|
397
438
|
onBlur: () => {
|
|
398
439
|
setIsToThumbFocused(false);
|
|
399
440
|
}
|
|
400
|
-
})), [fromInputBackground, fromSliderThumbContentPosition, fromSliderThumbPosition, fromValue, handleControlToSlider, handleInputChange, handleMouseUp, handleTouchEnd, handleTouchStart, highlightedStepElements, interval, isBigSlider, isDisabled, isFromThumbFocused, isToThumbFocused, maxValue, minValue, shouldShowThumbLabel, shouldShowKeyboardHighlighting, thumbLabelFormatter, thumbWidth, toSliderThumbContentPosition, toSliderThumbPosition, toValue]);
|
|
441
|
+
})), [fromInputBackground, fromSliderThumbContentPosition, fromSliderThumbPosition, fromValue, handleControlToSlider, handleInputChange, handleMouseUp, handlePointerDown, handlePointerMove, handlePointerUp, handleTouchEnd, handleTouchStart, highlightedStepElements, interval, isBigSlider, isDisabled, isFromThumbFocused, isToThumbFocused, maxValue, minValue, shouldShowThumbLabel, shouldShowKeyboardHighlighting, thumbLabelFormatter, thumbWidth, toSliderThumbContentPosition, toSliderThumbPosition, toValue]);
|
|
401
442
|
};
|
|
402
443
|
Slider.displayName = 'Slider';
|
|
403
444
|
var _default = exports.default = Slider;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Slider.js","names":["_chaynsApi","require","_react","_interopRequireWildcard","_styledComponents","_element","_useFocusRingPortal","_useKeyboardFocusHighlighting","_slider","_Slider","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","Slider","interval","isDisabled","maxEnabledValue","maxValue","minEnabledValue","minValue","onChange","onSelect","shouldHighlightSteps","shouldEnableKeyboardHighlighting","shouldShowThumbLabel","step","thumbLabelFormatter","value","fromValue","setFromValue","useState","toValue","setToValue","thumbWidth","setThumbWidth","isBigSlider","setIsBigSlider","isFromThumbFocused","setIsFromThumbFocused","isToThumbFocused","setIsToThumbFocused","previousFromValueRef","useRef","previousToValueRef","fromSliderRef","toSliderRef","fromSliderThumbRef","toSliderThumbRef","fromSliderThumbContentRef","toSliderThumbContentRef","sliderWrapperRef","sliderWrapperSize","useElementSize","theme","useTheme","shouldShowKeyboardHighlighting","useKeyboardFocusHighlighting","useFocusRingPortal","isEnabled","overlayRef","shape","updateFromValue","useCallback","nextValue","current","updateToValue","normalizeIntervalValue","newValue","Number","Math","round","applyIntervalThumbChange","thumb","rawValue","isFromThumb","previousValue","hasChanged","from","to","undefined","fillSlider","toSlider","fromSlider","String","useEffect","getThumbMaxWidth","maxNumber","handleMouseUp","_fromSliderRef$curren","_toSliderRef$current","handleControlFromSlider","event","target","handleControlToSlider","handleInputChange","effectiveMin","max","effectiveMax","min","isNaN","fromSliderThumbPosition","useMemo","_fromSliderRef$curren2","offsetWidth","width","calculateGradientOffset","sliderWidth","wrapperWidth","toSliderThumbPosition","_toSliderRef$current2","toSliderThumbContentPosition","calculatePopupPosition","sliderValue","popupWidth","fromSliderThumbContentPosition","handleTouchStart","setRefreshScrollEnabled","handleTouchEnd","_fromSliderRef$curren3","_toSliderRef$current3","highlightedStepElements","_fromSliderRef$curren4","elements","isStepDisabled","offset","stepWidth","push","createElement","StyledHighlightedStep","key","$isDisabled","$isFilled","$leftPosition","fromInputBackground","gradientPoints","getPercentage","x","join","StyledSlider","ref","StyledSliderInput","animate","height","initial","exit","$thumbWidth","$isInterval","type","onTouchStart","onTouchEnd","onMouseUp","$background","onFocus","onBlur","StyledSliderThumb","$position","$isBigSlider","StyledSliderThumbLabel","$width","displayName","_default","exports"],"sources":["../../../../src/components/slider/Slider.tsx"],"sourcesContent":["import { setRefreshScrollEnabled } from 'chayns-api';\nimport React, {\n ChangeEvent,\n FC,\n ReactNode,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { useTheme } from 'styled-components';\nimport { useElementSize } from '../../hooks/element';\nimport { useFocusRingPortal } from '../../hooks/useFocusRingPortal';\nimport { useKeyboardFocusHighlighting } from '../../hooks/useKeyboardFocusHighlighting';\nimport {\n calculateGradientOffset,\n calculatePopupPosition,\n fillSlider,\n getThumbMaxWidth,\n} from '../../utils/slider';\nimport type { Theme } from '../color-scheme-provider/ColorSchemeProvider';\nimport {\n StyledHighlightedStep,\n StyledSlider,\n StyledSliderInput,\n StyledSliderThumb,\n StyledSliderThumbLabel,\n} from './Slider.styles';\n\nexport interface SliderInterval {\n maxValue: number;\n minValue: number;\n}\n\nexport type SliderProps = {\n /**\n * The current interval of the slider.\n * @description\n * The `interval` prop is used to define a range for the slider, allowing users to select a minimum and maximum value.\n * This is particularly useful for scenarios where you want to allow users to select a range of values, such as price ranges or date ranges.\n * When provided, the slider will display two thumbs, one for the minimum value and one for the maximum value.\n * @example\n * <Slider interval={{ minValue: 10, maxValue: 50 }} />\n * @optional\n */\n interval?: SliderInterval;\n /**\n * Disables the slider, preventing user interaction.\n * @description\n * The `isDisabled` prop is used to disable the slider, making it unresponsive to user input.\n * When set to `true`, the slider cannot be moved, and its appearance may change to indicate that it is disabled.\n * This is useful for scenarios where the slider should not be interacted with, such as when the data it controls is not available or when the user does not have permission to change the value.\n * @default false\n * @example\n * <Slider isDisabled={true} />\n * @optional\n */\n isDisabled?: boolean;\n /**\n * The maximum enabled value of the slider.\n * @description\n * The `maxEnabledValue` prop is used to define the maximum value that can be selected on the slider.\n * It is particularly useful when you want to set an upper limit for the slider's range, ensuring that users cannot select values above this threshold.\n * This prop is optional and can be used in conjunction with the `maxValue` prop to create a more flexible slider.\n * @example\n * <Slider maxEnabledValue={75} />\n * @optional\n */\n maxEnabledValue?: number;\n /**\n * The maximum value of the slider.\n * @description\n * The `maxValue` prop defines the upper limit of the slider's range. It is used to set the maximum value that can be selected by the user.\n * This value should be greater than or equal to `minValue`.\n * @example\n * <Slider maxValue={200} />\n */\n maxValue: number;\n /**\n * The minimum enabled value of the slider.\n * @description\n * The `minEnabledValue` prop is used to define the minimum value that can be selected on the slider.\n * It is particularly useful when you want to set a lower limit for the slider's range, ensuring that users cannot select values below this threshold.\n * This prop is optional and can be used in conjunction with the `minValue` prop to create a more flexible slider.\n * @example\n * <Slider minEnabledValue={25} />\n * @optional\n */\n minEnabledValue?: number;\n /**\n * The minimum value of the slider.\n * @description\n * The `minValue` prop defines the lower limit of the slider's range. It is used to set the minimum value that can be selected by the user.\n * This value should be less than or equal to `maxValue`.\n * @example\n * <Slider minValue={0} />\n */\n minValue: number;\n /**\n * Callback function that is called when the slider value changes.\n * @description\n * The `onChange` prop is a callback function that is triggered whenever the slider value changes.\n * It receives the new value or interval of the slider as an argument, allowing you to update your application state or perform other actions based on the new value.\n * If the slider is configured as an interval, it will receive an object with `minValue` and `maxValue`.\n * @example\n * <Slider onChange={(value, interval) => console.log('Slider changed', { value, interval })} />\n */\n onChange?: (value?: number, interval?: SliderInterval) => void;\n /**\n * Callback function that is called when the slider selection is finalized.\n * @description\n * The `onSelect` prop is a callback function that is triggered when the user finishes interacting with the slider, such as releasing the mouse or touch after dragging the thumb.\n * It receives the selected value or interval as arguments, allowing you to perform actions based on the final selection.\n * If the slider is configured as an interval, it will receive an object with `minValue` and `maxValue`.\n * @example\n * <Slider onSelect={(value, interval) => console.log('Slider selected', { value, interval })} />\n */\n onSelect?: (value?: number, interval?: SliderInterval) => void;\n /**\n * Indicates whether the slider should highlight steps.\n * @description\n * The `shouldHighlightSteps` prop determines whether the slider should visually indicate the steps between values.\n * When set to `true`, the slider will show visual markers for each step, making it easier for users to see the increments.\n * @default false\n * @example\n * <Slider shouldHighlightSteps={true} />\n * @optional\n */\n shouldHighlightSteps?: boolean;\n /**\n * Enables keyboard-only focus highlighting.\n * @description\n * Focus styles are shown only during keyboard navigation and reset on mouse interaction.\n * @default false\n * @optional\n */\n shouldEnableKeyboardHighlighting?: boolean;\n /**\n * Indicates whether the slider should show a label on the thumb.\n * @description\n * The `shouldShowThumbLabel` prop determines whether the slider should display a label on the thumb that shows the current value.\n * When set to `true`, a label will be shown above the thumb, providing users with immediate feedback on the selected value.\n * @default false\n * @example\n * <Slider shouldShowThumbLabel={true} />\n * @optional\n */\n shouldShowThumbLabel?: boolean;\n /**\n * The step size for the slider.\n * @description\n * The `step` prop defines the increment by which the slider value changes when the user interacts with it.\n * It is used to control the granularity of the slider's movement. For example, if `step` is set to 1, the slider will move in increments of 1.\n * @default 1\n * @example\n * <Slider step={5} />\n * @optional\n */\n step?: number;\n /**\n * A function to format the thumb label.\n * @description\n * The `thumbLabelFormatter` prop is a function that formats the value displayed on the thumb label.\n * It receives the current value as an argument and should return a string that will be displayed on the thumb label.\n * This is useful for customizing the appearance of the label, such as adding currency symbols or units.\n * @example\n * <Slider thumbLabelFormatter={(value) => `${value} €`} />\n * @optional\n */\n thumbLabelFormatter?: (value: number, isMeasuring?: boolean) => string;\n /**\n * The current value of the slider.\n * @description\n * The `value` prop is used to set the current value of the slider when it is not configured as an interval.\n * It should be a number between `minValue` and `maxValue`. If the slider is configured as an interval, this prop will be ignored.\n * @example\n * <Slider value={50} />\n * @optional\n */\n value?: number;\n};\n\nconst Slider: FC<SliderProps> = ({\n interval,\n isDisabled,\n maxEnabledValue,\n maxValue,\n minEnabledValue,\n minValue,\n onChange,\n onSelect,\n shouldHighlightSteps = false,\n shouldEnableKeyboardHighlighting,\n shouldShowThumbLabel = false,\n step = 1,\n thumbLabelFormatter,\n value,\n}) => {\n const [fromValue, setFromValue] = useState(minEnabledValue ?? minValue);\n const [toValue, setToValue] = useState(maxEnabledValue ?? maxValue);\n const [thumbWidth, setThumbWidth] = useState(20);\n const [isBigSlider, setIsBigSlider] = useState(false);\n const [isFromThumbFocused, setIsFromThumbFocused] = useState(false);\n const [isToThumbFocused, setIsToThumbFocused] = useState(false);\n\n const previousFromValueRef = useRef(fromValue);\n const previousToValueRef = useRef(toValue);\n const fromSliderRef = useRef<HTMLInputElement>(null);\n const toSliderRef = useRef<HTMLInputElement>(null);\n const fromSliderThumbRef = useRef<HTMLDivElement>(null);\n const toSliderThumbRef = useRef<HTMLDivElement>(null);\n const fromSliderThumbContentRef = useRef<HTMLDivElement>(null);\n const toSliderThumbContentRef = useRef<HTMLDivElement>(null);\n const sliderWrapperRef = useRef<HTMLDivElement>(null);\n\n const sliderWrapperSize = useElementSize(sliderWrapperRef);\n\n const theme = useTheme() as Theme;\n const shouldShowKeyboardHighlighting = useKeyboardFocusHighlighting(\n shouldEnableKeyboardHighlighting && !isDisabled,\n );\n useFocusRingPortal(fromSliderRef, {\n isEnabled: shouldShowKeyboardHighlighting && isFromThumbFocused,\n overlayRef: fromSliderThumbRef,\n shape: 'circle',\n });\n useFocusRingPortal(toSliderRef, {\n isEnabled: shouldShowKeyboardHighlighting && isToThumbFocused,\n overlayRef: toSliderThumbRef,\n shape: 'circle',\n });\n\n const updateFromValue = useCallback((nextValue: number) => {\n previousFromValueRef.current = nextValue;\n setFromValue(nextValue);\n }, []);\n\n const updateToValue = useCallback((nextValue: number) => {\n previousToValueRef.current = nextValue;\n setToValue(nextValue);\n }, []);\n\n const normalizeIntervalValue = useCallback(\n (nextValue: number) => {\n let newValue = Number(nextValue);\n\n if (newValue > maxValue || newValue > maxValue - (maxValue % step)) {\n newValue = maxValue;\n } else if (newValue < minValue) {\n newValue = minValue;\n } else {\n newValue = Math.round(newValue / step) * step;\n }\n\n return newValue;\n },\n [maxValue, minValue, step],\n );\n\n const applyIntervalThumbChange = useCallback(\n (thumb: 'from' | 'to', rawValue: number) => {\n if (!fromSliderRef.current || !toSliderRef.current) {\n return;\n }\n\n const newValue = normalizeIntervalValue(rawValue);\n const isFromThumb = thumb === 'from';\n const previousValue = isFromThumb\n ? previousFromValueRef.current\n : previousToValueRef.current;\n const hasChanged = newValue !== previousValue;\n\n if (isFromThumb) {\n updateFromValue(newValue);\n } else {\n updateToValue(newValue);\n }\n\n const from = Number(fromSliderRef.current.value);\n const to = Number(toSliderRef.current.value);\n\n if (hasChanged && typeof onChange === 'function') {\n onChange(undefined, {\n minValue: isFromThumb ? newValue : from,\n maxValue: isFromThumb ? to : newValue,\n });\n }\n\n fillSlider({\n toSlider: toSliderRef.current,\n fromSlider: fromSliderRef.current,\n ...(isFromThumb ? { fromValue: newValue } : { toValue: newValue }),\n theme,\n });\n\n if (isFromThumb) {\n fromSliderRef.current.value = String(newValue > to ? to : newValue);\n } else {\n toSliderRef.current.value = String(from <= newValue ? newValue : from);\n }\n },\n [normalizeIntervalValue, onChange, theme, updateFromValue, updateToValue],\n );\n\n useEffect(() => {\n if (shouldShowThumbLabel) {\n setThumbWidth(getThumbMaxWidth({ maxNumber: maxValue, thumbLabelFormatter }));\n }\n }, [maxValue, shouldShowThumbLabel, thumbLabelFormatter]);\n\n /**\n * This function sets the value\n */\n useEffect(() => {\n if (\n typeof value === 'number' &&\n value >= minValue &&\n value <= maxValue &&\n (typeof minEnabledValue !== 'number' || value >= minEnabledValue) &&\n (typeof maxEnabledValue !== 'number' || value <= maxEnabledValue)\n ) {\n updateFromValue(value);\n }\n }, [maxEnabledValue, maxValue, minEnabledValue, minValue, updateFromValue, value]);\n\n useEffect(() => {\n if (fromValue > toValue) {\n updateFromValue(toValue);\n }\n\n if (toValue < fromValue) {\n updateToValue(fromValue);\n }\n }, [fromValue, toValue, updateFromValue, updateToValue]);\n\n const handleMouseUp = useCallback(() => {\n if (isDisabled) {\n return;\n }\n\n const from = Number(fromSliderRef.current?.value);\n const to = Number(toSliderRef.current?.value);\n\n if (typeof onSelect === 'function') {\n onSelect(\n interval ? undefined : from,\n interval ? { maxValue: to, minValue: from } : undefined,\n );\n }\n }, [interval, isDisabled, onSelect]);\n\n const handleControlFromSlider = useCallback(\n (event: ChangeEvent<HTMLInputElement>) => {\n applyIntervalThumbChange('from', Number(event.target.value));\n },\n [applyIntervalThumbChange],\n );\n\n const handleControlToSlider = useCallback(\n (event: ChangeEvent<HTMLInputElement>) => {\n if (isDisabled) {\n return;\n }\n\n applyIntervalThumbChange('to', Number(event.target.value));\n },\n [applyIntervalThumbChange, isDisabled],\n );\n\n useEffect(() => {\n if (!fromSliderRef.current || !toSliderRef.current || !interval) {\n return;\n }\n\n updateFromValue(interval.minValue);\n updateToValue(interval.maxValue);\n\n fromSliderRef.current.value = String(interval.minValue);\n toSliderRef.current.value = String(interval.maxValue);\n\n fillSlider({\n fromSlider: fromSliderRef.current,\n toSlider: toSliderRef.current,\n theme,\n });\n // Note: An interval can't be in the deps because of rerender\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [theme]);\n\n /**\n * This function updates the value\n */\n const handleInputChange = useCallback(\n (event: ChangeEvent<HTMLInputElement>) => {\n if (isDisabled) {\n return;\n }\n\n // If interval mode is active, delegate to the \"from\" handler and return early\n if (interval) {\n handleControlFromSlider(event);\n\n return;\n }\n\n // Respect optionally enabled bounds in addition to absolute min/max\n const effectiveMin =\n typeof minEnabledValue === 'number'\n ? Math.max(minValue, minEnabledValue)\n : minValue;\n\n const effectiveMax =\n typeof maxEnabledValue === 'number'\n ? Math.min(maxValue, maxEnabledValue)\n : maxValue;\n\n let newValue = Number(event.target.value);\n\n // Clamp to effective range first\n if (Number.isNaN(newValue)) {\n newValue = effectiveMin;\n }\n\n if (newValue < effectiveMin) newValue = effectiveMin;\n else if (newValue > effectiveMax - (effectiveMax % step)) newValue = effectiveMax;\n else newValue = Math.round(newValue / step) * step;\n\n if (typeof onChange === 'function' && newValue !== previousFromValueRef.current) {\n onChange(newValue);\n }\n\n updateFromValue(newValue);\n },\n [\n handleControlFromSlider,\n interval,\n isDisabled,\n maxEnabledValue,\n maxValue,\n minEnabledValue,\n minValue,\n onChange,\n step,\n updateFromValue,\n ],\n );\n\n const fromSliderThumbPosition = useMemo(() => {\n if (\n typeof fromSliderRef.current?.offsetWidth === 'number' &&\n typeof sliderWrapperSize?.width === 'number'\n ) {\n return calculateGradientOffset({\n maxValue,\n minValue,\n sliderWidth: fromSliderRef.current.offsetWidth,\n thumbWidth: 20,\n value: fromValue,\n wrapperWidth: sliderWrapperSize.width,\n });\n }\n\n return 0;\n }, [fromValue, maxValue, minValue, sliderWrapperSize?.width]);\n\n const toSliderThumbPosition = useMemo(() => {\n if (\n typeof toSliderRef.current?.offsetWidth === 'number' &&\n typeof sliderWrapperSize?.width === 'number'\n ) {\n return calculateGradientOffset({\n maxValue,\n minValue,\n sliderWidth: toSliderRef.current.offsetWidth,\n thumbWidth: 20,\n value: toValue,\n wrapperWidth: sliderWrapperSize.width,\n });\n }\n\n return 0;\n }, [maxValue, minValue, sliderWrapperSize?.width, toValue]);\n\n const toSliderThumbContentPosition = useMemo(\n () =>\n calculatePopupPosition({\n min: minValue,\n max: maxValue,\n sliderValue: toValue,\n popupWidth: thumbWidth,\n }),\n [maxValue, minValue, thumbWidth, toValue],\n );\n\n const fromSliderThumbContentPosition = useMemo(\n () =>\n calculatePopupPosition({\n min: minValue,\n max: maxValue,\n sliderValue: fromValue,\n popupWidth: thumbWidth,\n }),\n [fromValue, maxValue, minValue, thumbWidth],\n );\n\n const handleTouchStart = useCallback(() => {\n if (isDisabled) {\n return;\n }\n\n void setRefreshScrollEnabled(false);\n\n if (shouldShowThumbLabel) {\n setIsBigSlider(true);\n }\n }, [isDisabled, shouldShowThumbLabel]);\n\n const handleTouchEnd = useCallback(() => {\n if (isDisabled) {\n return;\n }\n\n void setRefreshScrollEnabled(true);\n\n const from = Number(fromSliderRef.current?.value);\n const to = Number(toSliderRef.current?.value);\n\n if (typeof onSelect === 'function') {\n onSelect(\n interval ? undefined : from,\n interval ? { maxValue: to, minValue: from } : undefined,\n );\n }\n\n if (shouldShowThumbLabel) {\n setIsBigSlider(false);\n }\n }, [interval, isDisabled, onSelect, shouldShowThumbLabel]);\n\n const highlightedStepElements = useMemo(() => {\n const sliderWidth = fromSliderRef.current?.offsetWidth ?? 0;\n const wrapperWidth = sliderWrapperSize?.width ?? 0;\n\n if (!shouldHighlightSteps || interval || sliderWidth === 0 || wrapperWidth === 0) {\n return null;\n }\n\n const elements: ReactNode[] = [];\n\n for (let i = minValue; i <= maxValue; i += step) {\n const isStepDisabled =\n (typeof minEnabledValue === 'number' && i < minEnabledValue) ||\n (typeof maxEnabledValue === 'number' && i > maxEnabledValue);\n\n const offset = (wrapperWidth - sliderWidth) / 2;\n const stepWidth = (sliderWidth / (maxValue - minValue)) * step;\n\n elements.push(\n <StyledHighlightedStep\n key={`step--${i}`}\n $isDisabled={isStepDisabled}\n $isFilled={i < fromValue}\n $leftPosition={offset + stepWidth * i}\n />,\n );\n }\n\n return elements;\n }, [\n fromValue,\n interval,\n maxEnabledValue,\n maxValue,\n minEnabledValue,\n minValue,\n shouldHighlightSteps,\n sliderWrapperSize?.width,\n step,\n ]);\n\n const fromInputBackground = useMemo(() => {\n if (interval) return undefined;\n\n const gradientPoints: string[] = [];\n\n const getPercentage = (x: number) => ((x - minValue) / (maxValue - minValue)) * 100;\n\n if (typeof minEnabledValue === 'number') {\n gradientPoints.push('rgb(215, 215, 215) 0%');\n gradientPoints.push(`rgb(215, 215, 215) ${getPercentage(minEnabledValue)}%`);\n gradientPoints.push(`${theme['409'] ?? ''} ${getPercentage(minEnabledValue)}%`);\n } else {\n gradientPoints.push(`${theme['409'] ?? ''} 0%`);\n }\n\n gradientPoints.push(`${theme['409'] ?? ''} ${getPercentage(fromValue)}%`);\n gradientPoints.push(`${theme['403'] ?? ''} ${getPercentage(fromValue)}%`);\n\n if (typeof maxEnabledValue === 'number') {\n gradientPoints.push(`${theme['403'] ?? ''} ${getPercentage(maxEnabledValue)}%`);\n gradientPoints.push(`rgb(215, 215, 215) ${getPercentage(maxEnabledValue)}%`);\n gradientPoints.push('rgb(215, 215, 215) 100%');\n } else {\n gradientPoints.push(`${theme['403'] ?? ''} 100%`);\n }\n\n return `linear-gradient(to right, ${gradientPoints.join(', ')})`;\n }, [fromValue, interval, maxEnabledValue, maxValue, minEnabledValue, minValue, theme]);\n\n return useMemo(\n () => (\n <StyledSlider ref={sliderWrapperRef} $isDisabled={isDisabled}>\n {highlightedStepElements}\n <StyledSliderInput\n animate={{ height: isBigSlider ? 30 : 10 }}\n initial={{ height: 10 }}\n exit={{ height: 10 }}\n $thumbWidth={40}\n ref={fromSliderRef}\n $isInterval={!!interval}\n type=\"range\"\n value={fromValue}\n step={step}\n max={maxValue}\n min={minValue}\n onTouchStart={handleTouchStart}\n onTouchEnd={handleTouchEnd}\n onChange={handleInputChange}\n onMouseUp={handleMouseUp}\n $background={fromInputBackground}\n onFocus={() => {\n setIsFromThumbFocused(true);\n setIsToThumbFocused(false);\n }}\n onBlur={() => {\n setIsFromThumbFocused(false);\n }}\n />\n <StyledSliderThumb\n ref={fromSliderThumbRef}\n $position={fromSliderThumbPosition}\n $isBigSlider={isBigSlider}\n >\n {shouldShowThumbLabel && (\n <StyledSliderThumbLabel\n $width={thumbWidth}\n $isBigSlider={isBigSlider}\n $position={fromSliderThumbContentPosition}\n ref={fromSliderThumbContentRef}\n >\n {typeof thumbLabelFormatter === 'function'\n ? thumbLabelFormatter(fromValue)\n : fromValue}\n </StyledSliderThumbLabel>\n )}\n </StyledSliderThumb>\n {interval && (\n <StyledSliderThumb\n ref={toSliderThumbRef}\n $position={toSliderThumbPosition}\n $isBigSlider={isBigSlider}\n >\n {shouldShowThumbLabel && (\n <StyledSliderThumbLabel\n $width={thumbWidth}\n $isBigSlider={isBigSlider}\n $position={toSliderThumbContentPosition}\n ref={toSliderThumbContentRef}\n >\n {typeof thumbLabelFormatter === 'function'\n ? thumbLabelFormatter(toValue)\n : toValue}\n </StyledSliderThumbLabel>\n )}\n </StyledSliderThumb>\n )}\n {interval && (\n <StyledSliderInput\n animate={{ height: isBigSlider ? 30 : 10 }}\n initial={{ height: 10 }}\n exit={{ height: 10 }}\n $thumbWidth={40}\n ref={toSliderRef}\n $isInterval={!!interval}\n type=\"range\"\n value={toValue}\n step={step}\n max={maxValue}\n min={minValue}\n onTouchStart={handleTouchStart}\n onTouchEnd={handleTouchEnd}\n onChange={handleControlToSlider}\n onMouseUp={handleMouseUp}\n onFocus={() => {\n setIsToThumbFocused(true);\n setIsFromThumbFocused(false);\n }}\n onBlur={() => {\n setIsToThumbFocused(false);\n }}\n />\n )}\n </StyledSlider>\n ),\n [\n fromInputBackground,\n fromSliderThumbContentPosition,\n fromSliderThumbPosition,\n fromValue,\n handleControlToSlider,\n handleInputChange,\n handleMouseUp,\n handleTouchEnd,\n handleTouchStart,\n highlightedStepElements,\n interval,\n isBigSlider,\n isDisabled,\n isFromThumbFocused,\n isToThumbFocused,\n maxValue,\n minValue,\n shouldShowThumbLabel,\n shouldShowKeyboardHighlighting,\n thumbLabelFormatter,\n thumbWidth,\n toSliderThumbContentPosition,\n toSliderThumbPosition,\n toValue,\n ],\n );\n};\n\nSlider.displayName = 'Slider';\n\nexport default Slider;\n"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AAUA,IAAAG,iBAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,mBAAA,GAAAL,OAAA;AACA,IAAAM,6BAAA,GAAAN,OAAA;AACA,IAAAO,OAAA,GAAAP,OAAA;AAOA,IAAAQ,OAAA,GAAAR,OAAA;AAMyB,SAAAE,wBAAAO,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAT,uBAAA,YAAAA,CAAAO,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD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ACXuE,GAAG,EAAE/E,QAAS;IACdiF,GAAG,EAAE/E,QAAS;IACdiI,YAAY,EAAEjC,gBAAiB;IAC/BkC,UAAU,EAAEhC,cAAe;IAC3BjG,QAAQ,EAAEyE,qBAAsB;IAChCyD,SAAS,EAAE/D,aAAc;IACzBiE,OAAO,EAAEA,CAAA,KAAM;MACXhH,mBAAmB,CAAC,IAAI,CAAC;MACzBF,qBAAqB,CAAC,KAAK,CAAC;IAChC,CAAE;IACFmH,MAAM,EAAEA,CAAA,KAAM;MACVjH,mBAAmB,CAAC,KAAK,CAAC;IAC9B;EAAE,CACL,CAEK,CACjB,EACD,CACI6F,mBAAmB,EACnBnB,8BAA8B,EAC9Bd,uBAAuB,EACvBxE,SAAS,EACTiE,qBAAqB,EACrBC,iBAAiB,EACjBP,aAAa,EACb8B,cAAc,EACdF,gBAAgB,EAChBK,uBAAuB,EACvB1G,QAAQ,EACRqB,WAAW,EACXpB,UAAU,EACVsB,kBAAkB,EAClBE,gBAAgB,EAChBtB,QAAQ,EACRE,QAAQ,EACRK,oBAAoB,EACpB+B,8BAA8B,EAC9B7B,mBAAmB,EACnBO,UAAU,EACV6E,4BAA4B,EAC5BF,qBAAqB,EACrB7E,OAAO,CAEf,CAAC;AACL,CAAC;AAEDlB,MAAM,CAACkJ,WAAW,GAAG,QAAQ;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAA7J,OAAA,GAEfS,MAAM","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"Slider.js","names":["_chaynsApi","require","_react","_interopRequireWildcard","_styledComponents","_element","_useFocusRingPortal","_useKeyboardFocusHighlighting","_slider","_Slider","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","SLIDER_TRACK_INSET","Slider","interval","isDisabled","maxEnabledValue","maxValue","minEnabledValue","minValue","onChange","onSelect","shouldHighlightSteps","shouldEnableKeyboardHighlighting","shouldShowThumbLabel","step","thumbLabelFormatter","value","fromValue","setFromValue","useState","toValue","setToValue","thumbWidth","setThumbWidth","isBigSlider","setIsBigSlider","isFromThumbFocused","setIsFromThumbFocused","isToThumbFocused","setIsToThumbFocused","previousFromValueRef","useRef","previousToValueRef","fromSliderRef","toSliderRef","fromSliderThumbRef","toSliderThumbRef","fromSliderThumbContentRef","toSliderThumbContentRef","sliderWrapperRef","activePointerIdRef","sliderWrapperSize","useElementSize","sliderTrackWidth","Math","max","width","theme","useTheme","shouldShowKeyboardHighlighting","useKeyboardFocusHighlighting","useFocusRingPortal","isEnabled","overlayRef","shape","updateFromValue","useCallback","nextValue","current","updateToValue","normalizeIntervalValue","newValue","Number","round","applyIntervalThumbChange","thumb","rawValue","isFromThumb","previousValue","hasChanged","from","to","undefined","fillSlider","toSlider","fromSlider","String","useEffect","getThumbMaxWidth","maxNumber","handleMouseUp","_fromSliderRef$curren","_toSliderRef$current","handleControlFromSlider","event","target","handleControlToSlider","normalizeSingleValue","effectiveMin","effectiveMax","min","isNaN","handleInputChange","updateValueFromPointer","bounds","currentTarget","getBoundingClientRect","relativePosition","clientX","left","handlePointerDown","_fromSliderRef$curren2","button","preventDefault","pointerId","setPointerCapture","focus","handlePointerMove","handlePointerUp","releasePointerCapture","fromSliderThumbPosition","useMemo","calculateGradientOffset","sliderWidth","wrapperWidth","toSliderThumbPosition","toSliderThumbContentPosition","calculatePopupPosition","sliderValue","popupWidth","fromSliderThumbContentPosition","handleTouchStart","setRefreshScrollEnabled","handleTouchEnd","_fromSliderRef$curren3","_toSliderRef$current2","highlightedStepElements","elements","isStepDisabled","offset","push","createElement","StyledHighlightedStep","key","$isDisabled","$isFilled","$leftPosition","fromInputBackground","gradientPoints","getPercentage","x","join","StyledSlider","ref","onPointerDown","onPointerMove","onPointerUp","StyledSliderInput","animate","height","initial","exit","$trackInset","$isInterval","type","onTouchStart","onTouchEnd","onMouseUp","$background","onFocus","onBlur","StyledSliderThumb","$position","$isBigSlider","StyledSliderThumbLabel","$width","displayName","_default","exports"],"sources":["../../../../src/components/slider/Slider.tsx"],"sourcesContent":["import { setRefreshScrollEnabled } from 'chayns-api';\nimport React, {\n ChangeEvent,\n FC,\n PointerEvent as ReactPointerEvent,\n ReactNode,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { useTheme } from 'styled-components';\nimport { useElementSize } from '../../hooks/element';\nimport { useFocusRingPortal } from '../../hooks/useFocusRingPortal';\nimport { useKeyboardFocusHighlighting } from '../../hooks/useKeyboardFocusHighlighting';\nimport {\n calculateGradientOffset,\n calculatePopupPosition,\n fillSlider,\n getThumbMaxWidth,\n} from '../../utils/slider';\nimport type { Theme } from '../color-scheme-provider/ColorSchemeProvider';\nimport {\n StyledHighlightedStep,\n StyledSlider,\n StyledSliderInput,\n StyledSliderThumb,\n StyledSliderThumbLabel,\n} from './Slider.styles';\n\nconst SLIDER_TRACK_INSET = 40;\n\nexport interface SliderInterval {\n maxValue: number;\n minValue: number;\n}\n\nexport type SliderProps = {\n /**\n * The current interval of the slider.\n * @description\n * The `interval` prop is used to define a range for the slider, allowing users to select a minimum and maximum value.\n * This is particularly useful for scenarios where you want to allow users to select a range of values, such as price ranges or date ranges.\n * When provided, the slider will display two thumbs, one for the minimum value and one for the maximum value.\n * @example\n * <Slider interval={{ minValue: 10, maxValue: 50 }} />\n * @optional\n */\n interval?: SliderInterval;\n /**\n * Disables the slider, preventing user interaction.\n * @description\n * The `isDisabled` prop is used to disable the slider, making it unresponsive to user input.\n * When set to `true`, the slider cannot be moved, and its appearance may change to indicate that it is disabled.\n * This is useful for scenarios where the slider should not be interacted with, such as when the data it controls is not available or when the user does not have permission to change the value.\n * @default false\n * @example\n * <Slider isDisabled={true} />\n * @optional\n */\n isDisabled?: boolean;\n /**\n * The maximum enabled value of the slider.\n * @description\n * The `maxEnabledValue` prop is used to define the maximum value that can be selected on the slider.\n * It is particularly useful when you want to set an upper limit for the slider's range, ensuring that users cannot select values above this threshold.\n * This prop is optional and can be used in conjunction with the `maxValue` prop to create a more flexible slider.\n * @example\n * <Slider maxEnabledValue={75} />\n * @optional\n */\n maxEnabledValue?: number;\n /**\n * The maximum value of the slider.\n * @description\n * The `maxValue` prop defines the upper limit of the slider's range. It is used to set the maximum value that can be selected by the user.\n * This value should be greater than or equal to `minValue`.\n * @example\n * <Slider maxValue={200} />\n */\n maxValue: number;\n /**\n * The minimum enabled value of the slider.\n * @description\n * The `minEnabledValue` prop is used to define the minimum value that can be selected on the slider.\n * It is particularly useful when you want to set a lower limit for the slider's range, ensuring that users cannot select values below this threshold.\n * This prop is optional and can be used in conjunction with the `minValue` prop to create a more flexible slider.\n * @example\n * <Slider minEnabledValue={25} />\n * @optional\n */\n minEnabledValue?: number;\n /**\n * The minimum value of the slider.\n * @description\n * The `minValue` prop defines the lower limit of the slider's range. It is used to set the minimum value that can be selected by the user.\n * This value should be less than or equal to `maxValue`.\n * @example\n * <Slider minValue={0} />\n */\n minValue: number;\n /**\n * Callback function that is called when the slider value changes.\n * @description\n * The `onChange` prop is a callback function that is triggered whenever the slider value changes.\n * It receives the new value or interval of the slider as an argument, allowing you to update your application state or perform other actions based on the new value.\n * If the slider is configured as an interval, it will receive an object with `minValue` and `maxValue`.\n * @example\n * <Slider onChange={(value, interval) => console.log('Slider changed', { value, interval })} />\n */\n onChange?: (value?: number, interval?: SliderInterval) => void;\n /**\n * Callback function that is called when the slider selection is finalized.\n * @description\n * The `onSelect` prop is a callback function that is triggered when the user finishes interacting with the slider, such as releasing the mouse or touch after dragging the thumb.\n * It receives the selected value or interval as arguments, allowing you to perform actions based on the final selection.\n * If the slider is configured as an interval, it will receive an object with `minValue` and `maxValue`.\n * @example\n * <Slider onSelect={(value, interval) => console.log('Slider selected', { value, interval })} />\n */\n onSelect?: (value?: number, interval?: SliderInterval) => void;\n /**\n * Indicates whether the slider should highlight steps.\n * @description\n * The `shouldHighlightSteps` prop determines whether the slider should visually indicate the steps between values.\n * When set to `true`, the slider will show visual markers for each step, making it easier for users to see the increments.\n * @default false\n * @example\n * <Slider shouldHighlightSteps={true} />\n * @optional\n */\n shouldHighlightSteps?: boolean;\n /**\n * Enables keyboard-only focus highlighting.\n * @description\n * Focus styles are shown only during keyboard navigation and reset on mouse interaction.\n * @default false\n * @optional\n */\n shouldEnableKeyboardHighlighting?: boolean;\n /**\n * Indicates whether the slider should show a label on the thumb.\n * @description\n * The `shouldShowThumbLabel` prop determines whether the slider should display a label on the thumb that shows the current value.\n * When set to `true`, a label will be shown above the thumb, providing users with immediate feedback on the selected value.\n * @default false\n * @example\n * <Slider shouldShowThumbLabel={true} />\n * @optional\n */\n shouldShowThumbLabel?: boolean;\n /**\n * The step size for the slider.\n * @description\n * The `step` prop defines the increment by which the slider value changes when the user interacts with it.\n * It is used to control the granularity of the slider's movement. For example, if `step` is set to 1, the slider will move in increments of 1.\n * @default 1\n * @example\n * <Slider step={5} />\n * @optional\n */\n step?: number;\n /**\n * A function to format the thumb label.\n * @description\n * The `thumbLabelFormatter` prop is a function that formats the value displayed on the thumb label.\n * It receives the current value as an argument and should return a string that will be displayed on the thumb label.\n * This is useful for customizing the appearance of the label, such as adding currency symbols or units.\n * @example\n * <Slider thumbLabelFormatter={(value) => `${value} €`} />\n * @optional\n */\n thumbLabelFormatter?: (value: number, isMeasuring?: boolean) => string;\n /**\n * The current value of the slider.\n * @description\n * The `value` prop is used to set the current value of the slider when it is not configured as an interval.\n * It should be a number between `minValue` and `maxValue`. If the slider is configured as an interval, this prop will be ignored.\n * @example\n * <Slider value={50} />\n * @optional\n */\n value?: number;\n};\n\nconst Slider: FC<SliderProps> = ({\n interval,\n isDisabled,\n maxEnabledValue,\n maxValue,\n minEnabledValue,\n minValue,\n onChange,\n onSelect,\n shouldHighlightSteps = false,\n shouldEnableKeyboardHighlighting,\n shouldShowThumbLabel = false,\n step = 1,\n thumbLabelFormatter,\n value,\n}) => {\n const [fromValue, setFromValue] = useState(minEnabledValue ?? minValue);\n const [toValue, setToValue] = useState(maxEnabledValue ?? maxValue);\n const [thumbWidth, setThumbWidth] = useState(20);\n const [isBigSlider, setIsBigSlider] = useState(false);\n const [isFromThumbFocused, setIsFromThumbFocused] = useState(false);\n const [isToThumbFocused, setIsToThumbFocused] = useState(false);\n\n const previousFromValueRef = useRef(fromValue);\n const previousToValueRef = useRef(toValue);\n const fromSliderRef = useRef<HTMLInputElement>(null);\n const toSliderRef = useRef<HTMLInputElement>(null);\n const fromSliderThumbRef = useRef<HTMLDivElement>(null);\n const toSliderThumbRef = useRef<HTMLDivElement>(null);\n const fromSliderThumbContentRef = useRef<HTMLDivElement>(null);\n const toSliderThumbContentRef = useRef<HTMLDivElement>(null);\n const sliderWrapperRef = useRef<HTMLDivElement>(null);\n const activePointerIdRef = useRef<number | null>(null);\n\n const sliderWrapperSize = useElementSize(sliderWrapperRef);\n const sliderTrackWidth = Math.max((sliderWrapperSize?.width ?? 0) - SLIDER_TRACK_INSET, 0);\n\n const theme = useTheme() as Theme;\n const shouldShowKeyboardHighlighting = useKeyboardFocusHighlighting(\n shouldEnableKeyboardHighlighting && !isDisabled,\n );\n useFocusRingPortal(fromSliderRef, {\n isEnabled: shouldShowKeyboardHighlighting && isFromThumbFocused,\n overlayRef: fromSliderThumbRef,\n shape: 'circle',\n });\n useFocusRingPortal(toSliderRef, {\n isEnabled: shouldShowKeyboardHighlighting && isToThumbFocused,\n overlayRef: toSliderThumbRef,\n shape: 'circle',\n });\n\n const updateFromValue = useCallback((nextValue: number) => {\n previousFromValueRef.current = nextValue;\n setFromValue(nextValue);\n }, []);\n\n const updateToValue = useCallback((nextValue: number) => {\n previousToValueRef.current = nextValue;\n setToValue(nextValue);\n }, []);\n\n const normalizeIntervalValue = useCallback(\n (nextValue: number) => {\n let newValue = Number(nextValue);\n\n if (newValue > maxValue || newValue > maxValue - (maxValue % step)) {\n newValue = maxValue;\n } else if (newValue < minValue) {\n newValue = minValue;\n } else {\n newValue = Math.round(newValue / step) * step;\n }\n\n return newValue;\n },\n [maxValue, minValue, step],\n );\n\n const applyIntervalThumbChange = useCallback(\n (thumb: 'from' | 'to', rawValue: number) => {\n if (!fromSliderRef.current || !toSliderRef.current) {\n return;\n }\n\n const newValue = normalizeIntervalValue(rawValue);\n const isFromThumb = thumb === 'from';\n const previousValue = isFromThumb\n ? previousFromValueRef.current\n : previousToValueRef.current;\n const hasChanged = newValue !== previousValue;\n\n if (isFromThumb) {\n updateFromValue(newValue);\n } else {\n updateToValue(newValue);\n }\n\n const from = Number(fromSliderRef.current.value);\n const to = Number(toSliderRef.current.value);\n\n if (hasChanged && typeof onChange === 'function') {\n onChange(undefined, {\n minValue: isFromThumb ? newValue : from,\n maxValue: isFromThumb ? to : newValue,\n });\n }\n\n fillSlider({\n toSlider: toSliderRef.current,\n fromSlider: fromSliderRef.current,\n ...(isFromThumb ? { fromValue: newValue } : { toValue: newValue }),\n theme,\n });\n\n if (isFromThumb) {\n fromSliderRef.current.value = String(newValue > to ? to : newValue);\n } else {\n toSliderRef.current.value = String(from <= newValue ? newValue : from);\n }\n },\n [normalizeIntervalValue, onChange, theme, updateFromValue, updateToValue],\n );\n\n useEffect(() => {\n if (shouldShowThumbLabel) {\n setThumbWidth(getThumbMaxWidth({ maxNumber: maxValue, thumbLabelFormatter }));\n }\n }, [maxValue, shouldShowThumbLabel, thumbLabelFormatter]);\n\n /**\n * This function sets the value\n */\n useEffect(() => {\n if (\n typeof value === 'number' &&\n value >= minValue &&\n value <= maxValue &&\n (typeof minEnabledValue !== 'number' || value >= minEnabledValue) &&\n (typeof maxEnabledValue !== 'number' || value <= maxEnabledValue)\n ) {\n updateFromValue(value);\n }\n }, [maxEnabledValue, maxValue, minEnabledValue, minValue, updateFromValue, value]);\n\n useEffect(() => {\n if (fromValue > toValue) {\n updateFromValue(toValue);\n }\n\n if (toValue < fromValue) {\n updateToValue(fromValue);\n }\n }, [fromValue, toValue, updateFromValue, updateToValue]);\n\n const handleMouseUp = useCallback(() => {\n if (isDisabled) {\n return;\n }\n\n const from = Number(fromSliderRef.current?.value);\n const to = Number(toSliderRef.current?.value);\n\n if (typeof onSelect === 'function') {\n onSelect(\n interval ? undefined : from,\n interval ? { maxValue: to, minValue: from } : undefined,\n );\n }\n }, [interval, isDisabled, onSelect]);\n\n const handleControlFromSlider = useCallback(\n (event: ChangeEvent<HTMLInputElement>) => {\n applyIntervalThumbChange('from', Number(event.target.value));\n },\n [applyIntervalThumbChange],\n );\n\n const handleControlToSlider = useCallback(\n (event: ChangeEvent<HTMLInputElement>) => {\n if (isDisabled) {\n return;\n }\n\n applyIntervalThumbChange('to', Number(event.target.value));\n },\n [applyIntervalThumbChange, isDisabled],\n );\n\n useEffect(() => {\n if (!fromSliderRef.current || !toSliderRef.current || !interval) {\n return;\n }\n\n updateFromValue(interval.minValue);\n updateToValue(interval.maxValue);\n\n fromSliderRef.current.value = String(interval.minValue);\n toSliderRef.current.value = String(interval.maxValue);\n\n fillSlider({\n fromSlider: fromSliderRef.current,\n toSlider: toSliderRef.current,\n theme,\n });\n // Note: An interval can't be in the deps because of rerender\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [theme]);\n\n const normalizeSingleValue = useCallback(\n (rawValue: number) => {\n const effectiveMin =\n typeof minEnabledValue === 'number'\n ? Math.max(minValue, minEnabledValue)\n : minValue;\n\n const effectiveMax =\n typeof maxEnabledValue === 'number'\n ? Math.min(maxValue, maxEnabledValue)\n : maxValue;\n\n let newValue = rawValue;\n\n if (Number.isNaN(newValue)) {\n newValue = effectiveMin;\n }\n\n if (newValue < effectiveMin) newValue = effectiveMin;\n else if (newValue > effectiveMax - (effectiveMax % step)) newValue = effectiveMax;\n else newValue = Math.round(newValue / step) * step;\n\n return newValue;\n },\n [maxEnabledValue, maxValue, minEnabledValue, minValue, step],\n );\n\n /**\n * This function updates the value\n */\n const handleInputChange = useCallback(\n (event: ChangeEvent<HTMLInputElement>) => {\n if (isDisabled) {\n return;\n }\n\n // If interval mode is active, delegate to the \"from\" handler and return early\n if (interval) {\n handleControlFromSlider(event);\n\n return;\n }\n\n const newValue = normalizeSingleValue(Number(event.target.value));\n\n if (typeof onChange === 'function' && newValue !== previousFromValueRef.current) {\n onChange(newValue);\n }\n\n updateFromValue(newValue);\n },\n [\n handleControlFromSlider,\n interval,\n isDisabled,\n maxEnabledValue,\n normalizeSingleValue,\n onChange,\n updateFromValue,\n ],\n );\n\n const updateValueFromPointer = useCallback(\n (event: ReactPointerEvent<HTMLDivElement>) => {\n const bounds = event.currentTarget.getBoundingClientRect();\n const relativePosition =\n (event.clientX - bounds.left - SLIDER_TRACK_INSET / 2) / sliderTrackWidth;\n const rawValue =\n minValue + Math.min(Math.max(relativePosition, 0), 1) * (maxValue - minValue);\n const newValue = normalizeSingleValue(rawValue);\n\n if (typeof onChange === 'function' && newValue !== previousFromValueRef.current) {\n onChange(newValue);\n }\n\n updateFromValue(newValue);\n\n return newValue;\n },\n [maxValue, minValue, normalizeSingleValue, onChange, sliderTrackWidth, updateFromValue],\n );\n\n const handlePointerDown = useCallback(\n (event: ReactPointerEvent<HTMLDivElement>) => {\n if (isDisabled || interval || event.button !== 0) {\n return;\n }\n\n event.preventDefault();\n activePointerIdRef.current = event.pointerId;\n event.currentTarget.setPointerCapture(event.pointerId);\n fromSliderRef.current?.focus();\n updateValueFromPointer(event);\n },\n [interval, isDisabled, updateValueFromPointer],\n );\n\n const handlePointerMove = useCallback(\n (event: ReactPointerEvent<HTMLDivElement>) => {\n if (activePointerIdRef.current !== event.pointerId) {\n return;\n }\n\n event.preventDefault();\n updateValueFromPointer(event);\n },\n [updateValueFromPointer],\n );\n\n const handlePointerUp = useCallback(\n (event: ReactPointerEvent<HTMLDivElement>) => {\n if (activePointerIdRef.current !== event.pointerId) {\n return;\n }\n\n event.preventDefault();\n activePointerIdRef.current = null;\n event.currentTarget.releasePointerCapture(event.pointerId);\n\n if (typeof onSelect === 'function') {\n onSelect(updateValueFromPointer(event));\n }\n },\n [onSelect, updateValueFromPointer],\n );\n\n const fromSliderThumbPosition = useMemo(() => {\n if (typeof sliderWrapperSize?.width === 'number') {\n return calculateGradientOffset({\n maxValue,\n minValue,\n sliderWidth: sliderTrackWidth,\n thumbWidth: 20,\n value: fromValue,\n wrapperWidth: sliderWrapperSize.width,\n });\n }\n\n return 0;\n }, [fromValue, maxValue, minValue, sliderTrackWidth, sliderWrapperSize?.width]);\n\n const toSliderThumbPosition = useMemo(() => {\n if (typeof sliderWrapperSize?.width === 'number') {\n return calculateGradientOffset({\n maxValue,\n minValue,\n sliderWidth: sliderTrackWidth,\n thumbWidth: 20,\n value: toValue,\n wrapperWidth: sliderWrapperSize.width,\n });\n }\n\n return 0;\n }, [maxValue, minValue, sliderTrackWidth, sliderWrapperSize?.width, toValue]);\n\n const toSliderThumbContentPosition = useMemo(\n () =>\n calculatePopupPosition({\n min: minValue,\n max: maxValue,\n sliderValue: toValue,\n popupWidth: thumbWidth,\n }),\n [maxValue, minValue, thumbWidth, toValue],\n );\n\n const fromSliderThumbContentPosition = useMemo(\n () =>\n calculatePopupPosition({\n min: minValue,\n max: maxValue,\n sliderValue: fromValue,\n popupWidth: thumbWidth,\n }),\n [fromValue, maxValue, minValue, thumbWidth],\n );\n\n const handleTouchStart = useCallback(() => {\n if (isDisabled) {\n return;\n }\n\n void setRefreshScrollEnabled(false);\n\n if (shouldShowThumbLabel) {\n setIsBigSlider(true);\n }\n }, [isDisabled, shouldShowThumbLabel]);\n\n const handleTouchEnd = useCallback(() => {\n if (isDisabled) {\n return;\n }\n\n void setRefreshScrollEnabled(true);\n\n const from = Number(fromSliderRef.current?.value);\n const to = Number(toSliderRef.current?.value);\n\n if (interval && typeof onSelect === 'function') {\n onSelect(undefined, { maxValue: to, minValue: from });\n }\n\n if (shouldShowThumbLabel) {\n setIsBigSlider(false);\n }\n }, [interval, isDisabled, onSelect, shouldShowThumbLabel]);\n\n const highlightedStepElements = useMemo(() => {\n const wrapperWidth = sliderWrapperSize?.width ?? 0;\n\n if (!shouldHighlightSteps || interval || sliderTrackWidth === 0 || wrapperWidth === 0) {\n return null;\n }\n\n const elements: ReactNode[] = [];\n\n for (let i = minValue; i <= maxValue; i += step) {\n const isStepDisabled =\n (typeof minEnabledValue === 'number' && i < minEnabledValue) ||\n (typeof maxEnabledValue === 'number' && i > maxEnabledValue);\n\n const offset = (wrapperWidth - sliderTrackWidth) / 2;\n\n elements.push(\n <StyledHighlightedStep\n key={`step--${i}`}\n $isDisabled={isStepDisabled}\n $isFilled={i < fromValue}\n $leftPosition={\n offset + ((i - minValue) / (maxValue - minValue)) * sliderTrackWidth\n }\n />,\n );\n }\n\n return elements;\n }, [\n fromValue,\n interval,\n maxEnabledValue,\n maxValue,\n minEnabledValue,\n minValue,\n shouldHighlightSteps,\n sliderTrackWidth,\n sliderWrapperSize?.width,\n step,\n ]);\n\n const fromInputBackground = useMemo(() => {\n if (interval) return undefined;\n\n const gradientPoints: string[] = [];\n\n const getPercentage = (x: number) => ((x - minValue) / (maxValue - minValue)) * 100;\n\n if (typeof minEnabledValue === 'number') {\n gradientPoints.push('rgb(215, 215, 215) 0%');\n gradientPoints.push(`rgb(215, 215, 215) ${getPercentage(minEnabledValue)}%`);\n gradientPoints.push(`${theme['409'] ?? ''} ${getPercentage(minEnabledValue)}%`);\n } else {\n gradientPoints.push(`${theme['409'] ?? ''} 0%`);\n }\n\n gradientPoints.push(`${theme['409'] ?? ''} ${getPercentage(fromValue)}%`);\n gradientPoints.push(`${theme['403'] ?? ''} ${getPercentage(fromValue)}%`);\n\n if (typeof maxEnabledValue === 'number') {\n gradientPoints.push(`${theme['403'] ?? ''} ${getPercentage(maxEnabledValue)}%`);\n gradientPoints.push(`rgb(215, 215, 215) ${getPercentage(maxEnabledValue)}%`);\n gradientPoints.push('rgb(215, 215, 215) 100%');\n } else {\n gradientPoints.push(`${theme['403'] ?? ''} 100%`);\n }\n\n return `linear-gradient(to right, ${gradientPoints.join(', ')})`;\n }, [fromValue, interval, maxEnabledValue, maxValue, minEnabledValue, minValue, theme]);\n\n return useMemo(\n () => (\n <StyledSlider\n ref={sliderWrapperRef}\n $isDisabled={isDisabled}\n onPointerDown={handlePointerDown}\n onPointerMove={handlePointerMove}\n onPointerUp={handlePointerUp}\n >\n {highlightedStepElements}\n <StyledSliderInput\n animate={{ height: isBigSlider ? 30 : 10 }}\n initial={{ height: 10 }}\n exit={{ height: 10 }}\n $trackInset={SLIDER_TRACK_INSET}\n ref={fromSliderRef}\n $isInterval={!!interval}\n type=\"range\"\n value={fromValue}\n step={step}\n max={maxValue}\n min={minValue}\n onTouchStart={handleTouchStart}\n onTouchEnd={handleTouchEnd}\n onChange={handleInputChange}\n onMouseUp={interval ? handleMouseUp : undefined}\n $background={fromInputBackground}\n onFocus={() => {\n setIsFromThumbFocused(true);\n setIsToThumbFocused(false);\n }}\n onBlur={() => {\n setIsFromThumbFocused(false);\n }}\n />\n <StyledSliderThumb\n ref={fromSliderThumbRef}\n $position={fromSliderThumbPosition}\n $isBigSlider={isBigSlider}\n >\n {shouldShowThumbLabel && (\n <StyledSliderThumbLabel\n $width={thumbWidth}\n $isBigSlider={isBigSlider}\n $position={fromSliderThumbContentPosition}\n ref={fromSliderThumbContentRef}\n >\n {typeof thumbLabelFormatter === 'function'\n ? thumbLabelFormatter(fromValue)\n : fromValue}\n </StyledSliderThumbLabel>\n )}\n </StyledSliderThumb>\n {interval && (\n <StyledSliderThumb\n ref={toSliderThumbRef}\n $position={toSliderThumbPosition}\n $isBigSlider={isBigSlider}\n >\n {shouldShowThumbLabel && (\n <StyledSliderThumbLabel\n $width={thumbWidth}\n $isBigSlider={isBigSlider}\n $position={toSliderThumbContentPosition}\n ref={toSliderThumbContentRef}\n >\n {typeof thumbLabelFormatter === 'function'\n ? thumbLabelFormatter(toValue)\n : toValue}\n </StyledSliderThumbLabel>\n )}\n </StyledSliderThumb>\n )}\n {interval && (\n <StyledSliderInput\n animate={{ height: isBigSlider ? 30 : 10 }}\n initial={{ height: 10 }}\n exit={{ height: 10 }}\n $trackInset={SLIDER_TRACK_INSET}\n ref={toSliderRef}\n $isInterval={!!interval}\n type=\"range\"\n value={toValue}\n step={step}\n max={maxValue}\n min={minValue}\n onTouchStart={handleTouchStart}\n onTouchEnd={handleTouchEnd}\n onChange={handleControlToSlider}\n onMouseUp={handleMouseUp}\n onFocus={() => {\n setIsToThumbFocused(true);\n setIsFromThumbFocused(false);\n }}\n onBlur={() => {\n setIsToThumbFocused(false);\n }}\n />\n )}\n </StyledSlider>\n ),\n [\n fromInputBackground,\n fromSliderThumbContentPosition,\n fromSliderThumbPosition,\n fromValue,\n handleControlToSlider,\n handleInputChange,\n handleMouseUp,\n handlePointerDown,\n handlePointerMove,\n handlePointerUp,\n handleTouchEnd,\n handleTouchStart,\n highlightedStepElements,\n interval,\n isBigSlider,\n isDisabled,\n isFromThumbFocused,\n isToThumbFocused,\n maxValue,\n minValue,\n shouldShowThumbLabel,\n shouldShowKeyboardHighlighting,\n thumbLabelFormatter,\n thumbWidth,\n toSliderThumbContentPosition,\n toSliderThumbPosition,\n toValue,\n ],\n );\n};\n\nSlider.displayName = 'Slider';\n\nexport default Slider;\n"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AAWA,IAAAG,iBAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,mBAAA,GAAAL,OAAA;AACA,IAAAM,6BAAA,GAAAN,OAAA;AACA,IAAAO,OAAA,GAAAP,OAAA;AAOA,IAAAQ,OAAA,GAAAR,OAAA;AAMyB,SAAAE,wBAAAO,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAT,uBAAA,YAAAA,CAAAO,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBA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BAAmB,CAAC,KAAK,CAAC;IAC9B;EAAE,CACL,CAEK,CACjB,EACD,CACI4G,mBAAmB,EACnBjB,8BAA8B,EAC9BV,uBAAuB,EACvB7F,SAAS,EACTqE,qBAAqB,EACrBM,iBAAiB,EACjBZ,aAAa,EACboB,iBAAiB,EACjBO,iBAAiB,EACjBC,eAAe,EACfe,cAAc,EACdF,gBAAgB,EAChBK,uBAAuB,EACvB3H,QAAQ,EACRqB,WAAW,EACXpB,UAAU,EACVsB,kBAAkB,EAClBE,gBAAgB,EAChBtB,QAAQ,EACRE,QAAQ,EACRK,oBAAoB,EACpBoC,8BAA8B,EAC9BlC,mBAAmB,EACnBO,UAAU,EACV8F,4BAA4B,EAC5BD,qBAAqB,EACrB/F,OAAO,CAEf,CAAC;AACL,CAAC;AAEDlB,MAAM,CAACoK,WAAW,GAAG,QAAQ;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAhL,OAAA,GAEfU,MAAM","ignoreList":[]}
|
|
@@ -26,11 +26,11 @@ const StyledSlider = exports.StyledSlider = _styledComponents.default.div`
|
|
|
26
26
|
const StyledSliderInput = exports.StyledSliderInput = (0, _styledComponents.default)(_react.motion.input).attrs(({
|
|
27
27
|
$background,
|
|
28
28
|
$isInterval,
|
|
29
|
-
$
|
|
29
|
+
$trackInset
|
|
30
30
|
}) => ({
|
|
31
31
|
style: {
|
|
32
32
|
pointerEvents: $isInterval ? 'none' : 'all',
|
|
33
|
-
width: `calc(100% - ${$
|
|
33
|
+
width: `calc(100% - ${$trackInset}px)`,
|
|
34
34
|
background: $background
|
|
35
35
|
}
|
|
36
36
|
}))`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Slider.styles.js","names":["_react","require","_styledComponents","_interopRequireDefault","e","__esModule","default","StyledSlider","exports","styled","div","$isDisabled","StyledSliderInput","motion","input","attrs","$background","$isInterval","$
|
|
1
|
+
{"version":3,"file":"Slider.styles.js","names":["_react","require","_styledComponents","_interopRequireDefault","e","__esModule","default","StyledSlider","exports","styled","div","$isDisabled","StyledSliderInput","motion","input","attrs","$background","$isInterval","$trackInset","style","pointerEvents","width","background","StyledSliderThumb","$position","$isBigSlider","left","height","StyledSliderThumbLabel","span","$width","minWidth","top","StyledHighlightedStep","$isFilled","theme","$leftPosition"],"sources":["../../../../src/components/slider/Slider.styles.ts"],"sourcesContent":["import { motion } from 'motion/react';\nimport styled, { css } from 'styled-components';\nimport type { WithTheme } from '../color-scheme-provider/ColorSchemeProvider';\n\ntype StyledSliderProps = WithTheme<{ $isDisabled?: boolean }>;\n\nexport const StyledSlider = styled.div<StyledSliderProps>`\n width: 100%;\n height: 30px;\n cursor: ${({ $isDisabled }) => ($isDisabled ? 'default' : 'pointer')} !important;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n touch-action: none;\n user-select: none;\n opacity: ${({ $isDisabled }) => ($isDisabled ? 0.5 : 1)};\n`;\n\ntype StyledSliderInputProps = WithTheme<{\n $background?: string;\n $isInterval: boolean;\n $trackInset: number;\n}>;\n\nexport const StyledSliderInput = styled(motion.input).attrs<StyledSliderInputProps>(\n ({ $background, $isInterval, $trackInset }) => ({\n style: {\n pointerEvents: $isInterval ? 'none' : 'all',\n width: `calc(100% - ${$trackInset}px)`,\n background: $background,\n },\n }),\n)`\n position: absolute;\n border-radius: 100px;\n -webkit-appearance: none;\n\n outline: none;\n cursor: pointer !important;\n z-index: 2;\n appearance: none;\n\n // Slider thumb for chrome\n &::-webkit-slider-thumb {\n -webkit-appearance: none;\n appearance: none;\n width: 50px;\n height: 20px;\n cursor: pointer;\n opacity: 0;\n pointer-events: all;\n position: relative;\n }\n\n // slider thumb for firefox\n\n &::-moz-range-thumb {\n width: 50px;\n height: 20px;\n cursor: pointer;\n opacity: 0;\n pointer-events: all;\n position: relative;\n }\n`;\n\ntype StyledSliderThumbProps = WithTheme<{\n $position: number;\n $isBigSlider: boolean;\n}>;\n\nexport const StyledSliderThumb = styled.div.attrs<StyledSliderThumbProps>(\n ({ $position, $isBigSlider }) => ({\n style: {\n left: `${$position}px`,\n height: `${$isBigSlider ? 0 : 20}px`,\n },\n }),\n)`\n width: 20px;\n height: 20px;\n cursor: pointer;\n border-radius: 100px;\n background-color: white;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);\n pointer-events: none;\n z-index: 5;\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0 8px;\n white-space: nowrap;\n top: 5px;\n\n transition: top 0.2s ease 0s;\n`;\n\ntype StyledSliderThumbLabelProps = WithTheme<{\n $position: number;\n $width: number;\n $isBigSlider: boolean;\n}>;\n\nexport const StyledSliderThumbLabel = styled.span.attrs<StyledSliderThumbLabelProps>(\n ({ $position, $isBigSlider, $width }) => ({\n style: {\n minWidth: `${$width}px`,\n top: `-${$isBigSlider ? 56 : 48}px`,\n left: `${$position}px`,\n },\n }),\n)`\n pointer-events: none;\n color: #222;\n\n height: 20px;\n cursor: pointer;\n border-radius: 3px;\n background-color: white;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);\n z-index: 3;\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 16px;\n white-space: nowrap;\n\n transition: top 0.2s ease 0s;\n\n &::after {\n background-color: inherit;\n border-bottom: 1px solid rgba(0, 0, 0, 0.1);\n border-right: 1px solid rgba(0, 0, 0, 0.1);\n box-shadow: 0 0 6px 2px rgba(0, 0, 0, 0.4);\n content: '';\n height: 14px;\n position: absolute;\n width: 14px;\n z-index: -2;\n left: ${({ $position }) => $position * -1}px;\n transform: rotate(225deg);\n bottom: -7px;\n }\n\n &::before {\n background-color: inherit;\n bottom: 0;\n content: '';\n left: 0;\n position: absolute;\n right: 0;\n border-radius: 3px;\n top: 0;\n z-index: -1;\n }\n`;\n\ntype StyledHighlightedStepProps = WithTheme<{\n $isDisabled: boolean;\n $isFilled: boolean;\n $leftPosition: number;\n}>;\n\nexport const StyledHighlightedStep = styled.div<StyledHighlightedStepProps>`\n background-color: ${({ $isDisabled, $isFilled, theme }) => {\n if ($isDisabled) return 'rgb(215, 215, 215)';\n if ($isFilled) return theme['409'];\n return theme['403'];\n }};\n border-radius: 50%;\n height: 18px;\n left: ${({ $leftPosition }) => $leftPosition}px;\n pointer-events: none;\n position: absolute;\n top: 50%;\n transform: translate(-50%, -50%);\n width: 18px;\n z-index: 3;\n`;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAC,sBAAA,CAAAF,OAAA;AAAgD,SAAAE,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAKzC,MAAMG,YAAY,GAAAC,OAAA,CAAAD,YAAA,GAAGE,yBAAM,CAACC,GAAsB;AACzD;AACA;AACA,cAAc,CAAC;EAAEC;AAAY,CAAC,KAAMA,WAAW,GAAG,SAAS,GAAG,SAAU;AACxE;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,CAAC;EAAEA;AAAY,CAAC,KAAMA,WAAW,GAAG,GAAG,GAAG,CAAE;AAC3D,CAAC;AAQM,MAAMC,iBAAiB,GAAAJ,OAAA,CAAAI,iBAAA,GAAG,IAAAH,yBAAM,EAACI,aAAM,CAACC,KAAK,CAAC,CAACC,KAAK,CACvD,CAAC;EAAEC,WAAW;EAAEC,WAAW;EAAEC;AAAY,CAAC,MAAM;EAC5CC,KAAK,EAAE;IACHC,aAAa,EAAEH,WAAW,GAAG,MAAM,GAAG,KAAK;IAC3CI,KAAK,EAAE,eAAeH,WAAW,KAAK;IACtCI,UAAU,EAAEN;EAChB;AACJ,CAAC,CACL,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAOM,MAAMO,iBAAiB,GAAAf,OAAA,CAAAe,iBAA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KAAK,CAAC;AACvB,CAAC;AACL;AACA;AACA,YAAY,CAAC;EAAEC;AAAc,CAAC,KAAKA,aAAa;AAChD;AACA;AACA;AACA;AACA;AACA;AACA,CAAC","ignoreList":[]}
|
|
@@ -6,6 +6,7 @@ import { useFocusRingPortal } from '../../hooks/useFocusRingPortal';
|
|
|
6
6
|
import { useKeyboardFocusHighlighting } from '../../hooks/useKeyboardFocusHighlighting';
|
|
7
7
|
import { calculateGradientOffset, calculatePopupPosition, fillSlider, getThumbMaxWidth } from '../../utils/slider';
|
|
8
8
|
import { StyledHighlightedStep, StyledSlider, StyledSliderInput, StyledSliderThumb, StyledSliderThumbLabel } from './Slider.styles';
|
|
9
|
+
const SLIDER_TRACK_INSET = 40;
|
|
9
10
|
const Slider = ({
|
|
10
11
|
interval,
|
|
11
12
|
isDisabled,
|
|
@@ -37,7 +38,9 @@ const Slider = ({
|
|
|
37
38
|
const fromSliderThumbContentRef = useRef(null);
|
|
38
39
|
const toSliderThumbContentRef = useRef(null);
|
|
39
40
|
const sliderWrapperRef = useRef(null);
|
|
41
|
+
const activePointerIdRef = useRef(null);
|
|
40
42
|
const sliderWrapperSize = useElementSize(sliderWrapperRef);
|
|
43
|
+
const sliderTrackWidth = Math.max((sliderWrapperSize?.width ?? 0) - SLIDER_TRACK_INSET, 0);
|
|
41
44
|
const theme = useTheme();
|
|
42
45
|
const shouldShowKeyboardHighlighting = useKeyboardFocusHighlighting(shouldEnableKeyboardHighlighting && !isDisabled);
|
|
43
46
|
useFocusRingPortal(fromSliderRef, {
|
|
@@ -169,6 +172,16 @@ const Slider = ({
|
|
|
169
172
|
// Note: An interval can't be in the deps because of rerender
|
|
170
173
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
171
174
|
}, [theme]);
|
|
175
|
+
const normalizeSingleValue = useCallback(rawValue => {
|
|
176
|
+
const effectiveMin = typeof minEnabledValue === 'number' ? Math.max(minValue, minEnabledValue) : minValue;
|
|
177
|
+
const effectiveMax = typeof maxEnabledValue === 'number' ? Math.min(maxValue, maxEnabledValue) : maxValue;
|
|
178
|
+
let newValue = rawValue;
|
|
179
|
+
if (Number.isNaN(newValue)) {
|
|
180
|
+
newValue = effectiveMin;
|
|
181
|
+
}
|
|
182
|
+
if (newValue < effectiveMin) newValue = effectiveMin;else if (newValue > effectiveMax - effectiveMax % step) newValue = effectiveMax;else newValue = Math.round(newValue / step) * step;
|
|
183
|
+
return newValue;
|
|
184
|
+
}, [maxEnabledValue, maxValue, minEnabledValue, minValue, step]);
|
|
172
185
|
|
|
173
186
|
/**
|
|
174
187
|
* This function updates the value
|
|
@@ -183,48 +196,77 @@ const Slider = ({
|
|
|
183
196
|
handleControlFromSlider(event);
|
|
184
197
|
return;
|
|
185
198
|
}
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
const effectiveMax = typeof maxEnabledValue === 'number' ? Math.min(maxValue, maxEnabledValue) : maxValue;
|
|
190
|
-
let newValue = Number(event.target.value);
|
|
191
|
-
|
|
192
|
-
// Clamp to effective range first
|
|
193
|
-
if (Number.isNaN(newValue)) {
|
|
194
|
-
newValue = effectiveMin;
|
|
199
|
+
const newValue = normalizeSingleValue(Number(event.target.value));
|
|
200
|
+
if (typeof onChange === 'function' && newValue !== previousFromValueRef.current) {
|
|
201
|
+
onChange(newValue);
|
|
195
202
|
}
|
|
196
|
-
|
|
203
|
+
updateFromValue(newValue);
|
|
204
|
+
}, [handleControlFromSlider, interval, isDisabled, maxEnabledValue, normalizeSingleValue, onChange, updateFromValue]);
|
|
205
|
+
const updateValueFromPointer = useCallback(event => {
|
|
206
|
+
const bounds = event.currentTarget.getBoundingClientRect();
|
|
207
|
+
const relativePosition = (event.clientX - bounds.left - SLIDER_TRACK_INSET / 2) / sliderTrackWidth;
|
|
208
|
+
const rawValue = minValue + Math.min(Math.max(relativePosition, 0), 1) * (maxValue - minValue);
|
|
209
|
+
const newValue = normalizeSingleValue(rawValue);
|
|
197
210
|
if (typeof onChange === 'function' && newValue !== previousFromValueRef.current) {
|
|
198
211
|
onChange(newValue);
|
|
199
212
|
}
|
|
200
213
|
updateFromValue(newValue);
|
|
201
|
-
|
|
214
|
+
return newValue;
|
|
215
|
+
}, [maxValue, minValue, normalizeSingleValue, onChange, sliderTrackWidth, updateFromValue]);
|
|
216
|
+
const handlePointerDown = useCallback(event => {
|
|
217
|
+
if (isDisabled || interval || event.button !== 0) {
|
|
218
|
+
return;
|
|
219
|
+
}
|
|
220
|
+
event.preventDefault();
|
|
221
|
+
activePointerIdRef.current = event.pointerId;
|
|
222
|
+
event.currentTarget.setPointerCapture(event.pointerId);
|
|
223
|
+
fromSliderRef.current?.focus();
|
|
224
|
+
updateValueFromPointer(event);
|
|
225
|
+
}, [interval, isDisabled, updateValueFromPointer]);
|
|
226
|
+
const handlePointerMove = useCallback(event => {
|
|
227
|
+
if (activePointerIdRef.current !== event.pointerId) {
|
|
228
|
+
return;
|
|
229
|
+
}
|
|
230
|
+
event.preventDefault();
|
|
231
|
+
updateValueFromPointer(event);
|
|
232
|
+
}, [updateValueFromPointer]);
|
|
233
|
+
const handlePointerUp = useCallback(event => {
|
|
234
|
+
if (activePointerIdRef.current !== event.pointerId) {
|
|
235
|
+
return;
|
|
236
|
+
}
|
|
237
|
+
event.preventDefault();
|
|
238
|
+
activePointerIdRef.current = null;
|
|
239
|
+
event.currentTarget.releasePointerCapture(event.pointerId);
|
|
240
|
+
if (typeof onSelect === 'function') {
|
|
241
|
+
onSelect(updateValueFromPointer(event));
|
|
242
|
+
}
|
|
243
|
+
}, [onSelect, updateValueFromPointer]);
|
|
202
244
|
const fromSliderThumbPosition = useMemo(() => {
|
|
203
|
-
if (typeof
|
|
245
|
+
if (typeof sliderWrapperSize?.width === 'number') {
|
|
204
246
|
return calculateGradientOffset({
|
|
205
247
|
maxValue,
|
|
206
248
|
minValue,
|
|
207
|
-
sliderWidth:
|
|
249
|
+
sliderWidth: sliderTrackWidth,
|
|
208
250
|
thumbWidth: 20,
|
|
209
251
|
value: fromValue,
|
|
210
252
|
wrapperWidth: sliderWrapperSize.width
|
|
211
253
|
});
|
|
212
254
|
}
|
|
213
255
|
return 0;
|
|
214
|
-
}, [fromValue, maxValue, minValue, sliderWrapperSize?.width]);
|
|
256
|
+
}, [fromValue, maxValue, minValue, sliderTrackWidth, sliderWrapperSize?.width]);
|
|
215
257
|
const toSliderThumbPosition = useMemo(() => {
|
|
216
|
-
if (typeof
|
|
258
|
+
if (typeof sliderWrapperSize?.width === 'number') {
|
|
217
259
|
return calculateGradientOffset({
|
|
218
260
|
maxValue,
|
|
219
261
|
minValue,
|
|
220
|
-
sliderWidth:
|
|
262
|
+
sliderWidth: sliderTrackWidth,
|
|
221
263
|
thumbWidth: 20,
|
|
222
264
|
value: toValue,
|
|
223
265
|
wrapperWidth: sliderWrapperSize.width
|
|
224
266
|
});
|
|
225
267
|
}
|
|
226
268
|
return 0;
|
|
227
|
-
}, [maxValue, minValue, sliderWrapperSize?.width, toValue]);
|
|
269
|
+
}, [maxValue, minValue, sliderTrackWidth, sliderWrapperSize?.width, toValue]);
|
|
228
270
|
const toSliderThumbContentPosition = useMemo(() => calculatePopupPosition({
|
|
229
271
|
min: minValue,
|
|
230
272
|
max: maxValue,
|
|
@@ -253,36 +295,34 @@ const Slider = ({
|
|
|
253
295
|
void setRefreshScrollEnabled(true);
|
|
254
296
|
const from = Number(fromSliderRef.current?.value);
|
|
255
297
|
const to = Number(toSliderRef.current?.value);
|
|
256
|
-
if (typeof onSelect === 'function') {
|
|
257
|
-
onSelect(
|
|
298
|
+
if (interval && typeof onSelect === 'function') {
|
|
299
|
+
onSelect(undefined, {
|
|
258
300
|
maxValue: to,
|
|
259
301
|
minValue: from
|
|
260
|
-
}
|
|
302
|
+
});
|
|
261
303
|
}
|
|
262
304
|
if (shouldShowThumbLabel) {
|
|
263
305
|
setIsBigSlider(false);
|
|
264
306
|
}
|
|
265
307
|
}, [interval, isDisabled, onSelect, shouldShowThumbLabel]);
|
|
266
308
|
const highlightedStepElements = useMemo(() => {
|
|
267
|
-
const sliderWidth = fromSliderRef.current?.offsetWidth ?? 0;
|
|
268
309
|
const wrapperWidth = sliderWrapperSize?.width ?? 0;
|
|
269
|
-
if (!shouldHighlightSteps || interval ||
|
|
310
|
+
if (!shouldHighlightSteps || interval || sliderTrackWidth === 0 || wrapperWidth === 0) {
|
|
270
311
|
return null;
|
|
271
312
|
}
|
|
272
313
|
const elements = [];
|
|
273
314
|
for (let i = minValue; i <= maxValue; i += step) {
|
|
274
315
|
const isStepDisabled = typeof minEnabledValue === 'number' && i < minEnabledValue || typeof maxEnabledValue === 'number' && i > maxEnabledValue;
|
|
275
|
-
const offset = (wrapperWidth -
|
|
276
|
-
const stepWidth = sliderWidth / (maxValue - minValue) * step;
|
|
316
|
+
const offset = (wrapperWidth - sliderTrackWidth) / 2;
|
|
277
317
|
elements.push(/*#__PURE__*/React.createElement(StyledHighlightedStep, {
|
|
278
318
|
key: `step--${i}`,
|
|
279
319
|
$isDisabled: isStepDisabled,
|
|
280
320
|
$isFilled: i < fromValue,
|
|
281
|
-
$leftPosition: offset +
|
|
321
|
+
$leftPosition: offset + (i - minValue) / (maxValue - minValue) * sliderTrackWidth
|
|
282
322
|
}));
|
|
283
323
|
}
|
|
284
324
|
return elements;
|
|
285
|
-
}, [fromValue, interval, maxEnabledValue, maxValue, minEnabledValue, minValue, shouldHighlightSteps, sliderWrapperSize?.width, step]);
|
|
325
|
+
}, [fromValue, interval, maxEnabledValue, maxValue, minEnabledValue, minValue, shouldHighlightSteps, sliderTrackWidth, sliderWrapperSize?.width, step]);
|
|
286
326
|
const fromInputBackground = useMemo(() => {
|
|
287
327
|
if (interval) return undefined;
|
|
288
328
|
const gradientPoints = [];
|
|
@@ -307,7 +347,10 @@ const Slider = ({
|
|
|
307
347
|
}, [fromValue, interval, maxEnabledValue, maxValue, minEnabledValue, minValue, theme]);
|
|
308
348
|
return useMemo(() => /*#__PURE__*/React.createElement(StyledSlider, {
|
|
309
349
|
ref: sliderWrapperRef,
|
|
310
|
-
$isDisabled: isDisabled
|
|
350
|
+
$isDisabled: isDisabled,
|
|
351
|
+
onPointerDown: handlePointerDown,
|
|
352
|
+
onPointerMove: handlePointerMove,
|
|
353
|
+
onPointerUp: handlePointerUp
|
|
311
354
|
}, highlightedStepElements, /*#__PURE__*/React.createElement(StyledSliderInput, {
|
|
312
355
|
animate: {
|
|
313
356
|
height: isBigSlider ? 30 : 10
|
|
@@ -318,7 +361,7 @@ const Slider = ({
|
|
|
318
361
|
exit: {
|
|
319
362
|
height: 10
|
|
320
363
|
},
|
|
321
|
-
$
|
|
364
|
+
$trackInset: SLIDER_TRACK_INSET,
|
|
322
365
|
ref: fromSliderRef,
|
|
323
366
|
$isInterval: !!interval,
|
|
324
367
|
type: "range",
|
|
@@ -329,7 +372,7 @@ const Slider = ({
|
|
|
329
372
|
onTouchStart: handleTouchStart,
|
|
330
373
|
onTouchEnd: handleTouchEnd,
|
|
331
374
|
onChange: handleInputChange,
|
|
332
|
-
onMouseUp: handleMouseUp,
|
|
375
|
+
onMouseUp: interval ? handleMouseUp : undefined,
|
|
333
376
|
$background: fromInputBackground,
|
|
334
377
|
onFocus: () => {
|
|
335
378
|
setIsFromThumbFocused(true);
|
|
@@ -366,7 +409,7 @@ const Slider = ({
|
|
|
366
409
|
exit: {
|
|
367
410
|
height: 10
|
|
368
411
|
},
|
|
369
|
-
$
|
|
412
|
+
$trackInset: SLIDER_TRACK_INSET,
|
|
370
413
|
ref: toSliderRef,
|
|
371
414
|
$isInterval: !!interval,
|
|
372
415
|
type: "range",
|
|
@@ -385,7 +428,7 @@ const Slider = ({
|
|
|
385
428
|
onBlur: () => {
|
|
386
429
|
setIsToThumbFocused(false);
|
|
387
430
|
}
|
|
388
|
-
})), [fromInputBackground, fromSliderThumbContentPosition, fromSliderThumbPosition, fromValue, handleControlToSlider, handleInputChange, handleMouseUp, handleTouchEnd, handleTouchStart, highlightedStepElements, interval, isBigSlider, isDisabled, isFromThumbFocused, isToThumbFocused, maxValue, minValue, shouldShowThumbLabel, shouldShowKeyboardHighlighting, thumbLabelFormatter, thumbWidth, toSliderThumbContentPosition, toSliderThumbPosition, toValue]);
|
|
431
|
+
})), [fromInputBackground, fromSliderThumbContentPosition, fromSliderThumbPosition, fromValue, handleControlToSlider, handleInputChange, handleMouseUp, handlePointerDown, handlePointerMove, handlePointerUp, handleTouchEnd, handleTouchStart, highlightedStepElements, interval, isBigSlider, isDisabled, isFromThumbFocused, isToThumbFocused, maxValue, minValue, shouldShowThumbLabel, shouldShowKeyboardHighlighting, thumbLabelFormatter, thumbWidth, toSliderThumbContentPosition, toSliderThumbPosition, toValue]);
|
|
389
432
|
};
|
|
390
433
|
Slider.displayName = 'Slider';
|
|
391
434
|
export default Slider;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Slider.js","names":["setRefreshScrollEnabled","React","useCallback","useEffect","useMemo","useRef","useState","useTheme","useElementSize","useFocusRingPortal","useKeyboardFocusHighlighting","calculateGradientOffset","calculatePopupPosition","fillSlider","getThumbMaxWidth","StyledHighlightedStep","StyledSlider","StyledSliderInput","StyledSliderThumb","StyledSliderThumbLabel","Slider","interval","isDisabled","maxEnabledValue","maxValue","minEnabledValue","minValue","onChange","onSelect","shouldHighlightSteps","shouldEnableKeyboardHighlighting","shouldShowThumbLabel","step","thumbLabelFormatter","value","fromValue","setFromValue","toValue","setToValue","thumbWidth","setThumbWidth","isBigSlider","setIsBigSlider","isFromThumbFocused","setIsFromThumbFocused","isToThumbFocused","setIsToThumbFocused","previousFromValueRef","previousToValueRef","fromSliderRef","toSliderRef","fromSliderThumbRef","toSliderThumbRef","fromSliderThumbContentRef","toSliderThumbContentRef","sliderWrapperRef","sliderWrapperSize","theme","shouldShowKeyboardHighlighting","isEnabled","overlayRef","shape","updateFromValue","nextValue","current","updateToValue","normalizeIntervalValue","newValue","Number","Math","round","applyIntervalThumbChange","thumb","rawValue","isFromThumb","previousValue","hasChanged","from","to","undefined","toSlider","fromSlider","String","maxNumber","handleMouseUp","handleControlFromSlider","event","target","handleControlToSlider","handleInputChange","effectiveMin","max","effectiveMax","min","isNaN","fromSliderThumbPosition","offsetWidth","width","sliderWidth","wrapperWidth","toSliderThumbPosition","toSliderThumbContentPosition","sliderValue","popupWidth","fromSliderThumbContentPosition","handleTouchStart","handleTouchEnd","highlightedStepElements","elements","i","isStepDisabled","offset","stepWidth","push","createElement","key","$isDisabled","$isFilled","$leftPosition","fromInputBackground","gradientPoints","getPercentage","x","join","ref","animate","height","initial","exit","$thumbWidth","$isInterval","type","onTouchStart","onTouchEnd","onMouseUp","$background","onFocus","onBlur","$position","$isBigSlider","$width","displayName"],"sources":["../../../../src/components/slider/Slider.tsx"],"sourcesContent":["import { setRefreshScrollEnabled } from 'chayns-api';\nimport React, {\n ChangeEvent,\n FC,\n ReactNode,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { useTheme } from 'styled-components';\nimport { useElementSize } from '../../hooks/element';\nimport { useFocusRingPortal } from '../../hooks/useFocusRingPortal';\nimport { useKeyboardFocusHighlighting } from '../../hooks/useKeyboardFocusHighlighting';\nimport {\n calculateGradientOffset,\n calculatePopupPosition,\n fillSlider,\n getThumbMaxWidth,\n} from '../../utils/slider';\nimport type { Theme } from '../color-scheme-provider/ColorSchemeProvider';\nimport {\n StyledHighlightedStep,\n StyledSlider,\n StyledSliderInput,\n StyledSliderThumb,\n StyledSliderThumbLabel,\n} from './Slider.styles';\n\nexport interface SliderInterval {\n maxValue: number;\n minValue: number;\n}\n\nexport type SliderProps = {\n /**\n * The current interval of the slider.\n * @description\n * The `interval` prop is used to define a range for the slider, allowing users to select a minimum and maximum value.\n * This is particularly useful for scenarios where you want to allow users to select a range of values, such as price ranges or date ranges.\n * When provided, the slider will display two thumbs, one for the minimum value and one for the maximum value.\n * @example\n * <Slider interval={{ minValue: 10, maxValue: 50 }} />\n * @optional\n */\n interval?: SliderInterval;\n /**\n * Disables the slider, preventing user interaction.\n * @description\n * The `isDisabled` prop is used to disable the slider, making it unresponsive to user input.\n * When set to `true`, the slider cannot be moved, and its appearance may change to indicate that it is disabled.\n * This is useful for scenarios where the slider should not be interacted with, such as when the data it controls is not available or when the user does not have permission to change the value.\n * @default false\n * @example\n * <Slider isDisabled={true} />\n * @optional\n */\n isDisabled?: boolean;\n /**\n * The maximum enabled value of the slider.\n * @description\n * The `maxEnabledValue` prop is used to define the maximum value that can be selected on the slider.\n * It is particularly useful when you want to set an upper limit for the slider's range, ensuring that users cannot select values above this threshold.\n * This prop is optional and can be used in conjunction with the `maxValue` prop to create a more flexible slider.\n * @example\n * <Slider maxEnabledValue={75} />\n * @optional\n */\n maxEnabledValue?: number;\n /**\n * The maximum value of the slider.\n * @description\n * The `maxValue` prop defines the upper limit of the slider's range. It is used to set the maximum value that can be selected by the user.\n * This value should be greater than or equal to `minValue`.\n * @example\n * <Slider maxValue={200} />\n */\n maxValue: number;\n /**\n * The minimum enabled value of the slider.\n * @description\n * The `minEnabledValue` prop is used to define the minimum value that can be selected on the slider.\n * It is particularly useful when you want to set a lower limit for the slider's range, ensuring that users cannot select values below this threshold.\n * This prop is optional and can be used in conjunction with the `minValue` prop to create a more flexible slider.\n * @example\n * <Slider minEnabledValue={25} />\n * @optional\n */\n minEnabledValue?: number;\n /**\n * The minimum value of the slider.\n * @description\n * The `minValue` prop defines the lower limit of the slider's range. It is used to set the minimum value that can be selected by the user.\n * This value should be less than or equal to `maxValue`.\n * @example\n * <Slider minValue={0} />\n */\n minValue: number;\n /**\n * Callback function that is called when the slider value changes.\n * @description\n * The `onChange` prop is a callback function that is triggered whenever the slider value changes.\n * It receives the new value or interval of the slider as an argument, allowing you to update your application state or perform other actions based on the new value.\n * If the slider is configured as an interval, it will receive an object with `minValue` and `maxValue`.\n * @example\n * <Slider onChange={(value, interval) => console.log('Slider changed', { value, interval })} />\n */\n onChange?: (value?: number, interval?: SliderInterval) => void;\n /**\n * Callback function that is called when the slider selection is finalized.\n * @description\n * The `onSelect` prop is a callback function that is triggered when the user finishes interacting with the slider, such as releasing the mouse or touch after dragging the thumb.\n * It receives the selected value or interval as arguments, allowing you to perform actions based on the final selection.\n * If the slider is configured as an interval, it will receive an object with `minValue` and `maxValue`.\n * @example\n * <Slider onSelect={(value, interval) => console.log('Slider selected', { value, interval })} />\n */\n onSelect?: (value?: number, interval?: SliderInterval) => void;\n /**\n * Indicates whether the slider should highlight steps.\n * @description\n * The `shouldHighlightSteps` prop determines whether the slider should visually indicate the steps between values.\n * When set to `true`, the slider will show visual markers for each step, making it easier for users to see the increments.\n * @default false\n * @example\n * <Slider shouldHighlightSteps={true} />\n * @optional\n */\n shouldHighlightSteps?: boolean;\n /**\n * Enables keyboard-only focus highlighting.\n * @description\n * Focus styles are shown only during keyboard navigation and reset on mouse interaction.\n * @default false\n * @optional\n */\n shouldEnableKeyboardHighlighting?: boolean;\n /**\n * Indicates whether the slider should show a label on the thumb.\n * @description\n * The `shouldShowThumbLabel` prop determines whether the slider should display a label on the thumb that shows the current value.\n * When set to `true`, a label will be shown above the thumb, providing users with immediate feedback on the selected value.\n * @default false\n * @example\n * <Slider shouldShowThumbLabel={true} />\n * @optional\n */\n shouldShowThumbLabel?: boolean;\n /**\n * The step size for the slider.\n * @description\n * The `step` prop defines the increment by which the slider value changes when the user interacts with it.\n * It is used to control the granularity of the slider's movement. For example, if `step` is set to 1, the slider will move in increments of 1.\n * @default 1\n * @example\n * <Slider step={5} />\n * @optional\n */\n step?: number;\n /**\n * A function to format the thumb label.\n * @description\n * The `thumbLabelFormatter` prop is a function that formats the value displayed on the thumb label.\n * It receives the current value as an argument and should return a string that will be displayed on the thumb label.\n * This is useful for customizing the appearance of the label, such as adding currency symbols or units.\n * @example\n * <Slider thumbLabelFormatter={(value) => `${value} €`} />\n * @optional\n */\n thumbLabelFormatter?: (value: number, isMeasuring?: boolean) => string;\n /**\n * The current value of the slider.\n * @description\n * The `value` prop is used to set the current value of the slider when it is not configured as an interval.\n * It should be a number between `minValue` and `maxValue`. If the slider is configured as an interval, this prop will be ignored.\n * @example\n * <Slider value={50} />\n * @optional\n */\n value?: number;\n};\n\nconst Slider: FC<SliderProps> = ({\n interval,\n isDisabled,\n maxEnabledValue,\n maxValue,\n minEnabledValue,\n minValue,\n onChange,\n onSelect,\n shouldHighlightSteps = false,\n shouldEnableKeyboardHighlighting,\n shouldShowThumbLabel = false,\n step = 1,\n thumbLabelFormatter,\n value,\n}) => {\n const [fromValue, setFromValue] = useState(minEnabledValue ?? minValue);\n const [toValue, setToValue] = useState(maxEnabledValue ?? maxValue);\n const [thumbWidth, setThumbWidth] = useState(20);\n const [isBigSlider, setIsBigSlider] = useState(false);\n const [isFromThumbFocused, setIsFromThumbFocused] = useState(false);\n const [isToThumbFocused, setIsToThumbFocused] = useState(false);\n\n const previousFromValueRef = useRef(fromValue);\n const previousToValueRef = useRef(toValue);\n const fromSliderRef = useRef<HTMLInputElement>(null);\n const toSliderRef = useRef<HTMLInputElement>(null);\n const fromSliderThumbRef = useRef<HTMLDivElement>(null);\n const toSliderThumbRef = useRef<HTMLDivElement>(null);\n const fromSliderThumbContentRef = useRef<HTMLDivElement>(null);\n const toSliderThumbContentRef = useRef<HTMLDivElement>(null);\n const sliderWrapperRef = useRef<HTMLDivElement>(null);\n\n const sliderWrapperSize = useElementSize(sliderWrapperRef);\n\n const theme = useTheme() as Theme;\n const shouldShowKeyboardHighlighting = useKeyboardFocusHighlighting(\n shouldEnableKeyboardHighlighting && !isDisabled,\n );\n useFocusRingPortal(fromSliderRef, {\n isEnabled: shouldShowKeyboardHighlighting && isFromThumbFocused,\n overlayRef: fromSliderThumbRef,\n shape: 'circle',\n });\n useFocusRingPortal(toSliderRef, {\n isEnabled: shouldShowKeyboardHighlighting && isToThumbFocused,\n overlayRef: toSliderThumbRef,\n shape: 'circle',\n });\n\n const updateFromValue = useCallback((nextValue: number) => {\n previousFromValueRef.current = nextValue;\n setFromValue(nextValue);\n }, []);\n\n const updateToValue = useCallback((nextValue: number) => {\n previousToValueRef.current = nextValue;\n setToValue(nextValue);\n }, []);\n\n const normalizeIntervalValue = useCallback(\n (nextValue: number) => {\n let newValue = Number(nextValue);\n\n if (newValue > maxValue || newValue > maxValue - (maxValue % step)) {\n newValue = maxValue;\n } else if (newValue < minValue) {\n newValue = minValue;\n } else {\n newValue = Math.round(newValue / step) * step;\n }\n\n return newValue;\n },\n [maxValue, minValue, step],\n );\n\n const applyIntervalThumbChange = useCallback(\n (thumb: 'from' | 'to', rawValue: number) => {\n if (!fromSliderRef.current || !toSliderRef.current) {\n return;\n }\n\n const newValue = normalizeIntervalValue(rawValue);\n const isFromThumb = thumb === 'from';\n const previousValue = isFromThumb\n ? previousFromValueRef.current\n : previousToValueRef.current;\n const hasChanged = newValue !== previousValue;\n\n if (isFromThumb) {\n updateFromValue(newValue);\n } else {\n updateToValue(newValue);\n }\n\n const from = Number(fromSliderRef.current.value);\n const to = Number(toSliderRef.current.value);\n\n if (hasChanged && typeof onChange === 'function') {\n onChange(undefined, {\n minValue: isFromThumb ? newValue : from,\n maxValue: isFromThumb ? to : newValue,\n });\n }\n\n fillSlider({\n toSlider: toSliderRef.current,\n fromSlider: fromSliderRef.current,\n ...(isFromThumb ? { fromValue: newValue } : { toValue: newValue }),\n theme,\n });\n\n if (isFromThumb) {\n fromSliderRef.current.value = String(newValue > to ? to : newValue);\n } else {\n toSliderRef.current.value = String(from <= newValue ? newValue : from);\n }\n },\n [normalizeIntervalValue, onChange, theme, updateFromValue, updateToValue],\n );\n\n useEffect(() => {\n if (shouldShowThumbLabel) {\n setThumbWidth(getThumbMaxWidth({ maxNumber: maxValue, thumbLabelFormatter }));\n }\n }, [maxValue, shouldShowThumbLabel, thumbLabelFormatter]);\n\n /**\n * This function sets the value\n */\n useEffect(() => {\n if (\n typeof value === 'number' &&\n value >= minValue &&\n value <= maxValue &&\n (typeof minEnabledValue !== 'number' || value >= minEnabledValue) &&\n (typeof maxEnabledValue !== 'number' || value <= maxEnabledValue)\n ) {\n updateFromValue(value);\n }\n }, [maxEnabledValue, maxValue, minEnabledValue, minValue, updateFromValue, value]);\n\n useEffect(() => {\n if (fromValue > toValue) {\n updateFromValue(toValue);\n }\n\n if (toValue < fromValue) {\n updateToValue(fromValue);\n }\n }, [fromValue, toValue, updateFromValue, updateToValue]);\n\n const handleMouseUp = useCallback(() => {\n if (isDisabled) {\n return;\n }\n\n const from = Number(fromSliderRef.current?.value);\n const to = Number(toSliderRef.current?.value);\n\n if (typeof onSelect === 'function') {\n onSelect(\n interval ? undefined : from,\n interval ? { maxValue: to, minValue: from } : undefined,\n );\n }\n }, [interval, isDisabled, onSelect]);\n\n const handleControlFromSlider = useCallback(\n (event: ChangeEvent<HTMLInputElement>) => {\n applyIntervalThumbChange('from', Number(event.target.value));\n },\n [applyIntervalThumbChange],\n );\n\n const handleControlToSlider = useCallback(\n (event: ChangeEvent<HTMLInputElement>) => {\n if (isDisabled) {\n return;\n }\n\n applyIntervalThumbChange('to', Number(event.target.value));\n },\n [applyIntervalThumbChange, isDisabled],\n );\n\n useEffect(() => {\n if (!fromSliderRef.current || !toSliderRef.current || !interval) {\n return;\n }\n\n updateFromValue(interval.minValue);\n updateToValue(interval.maxValue);\n\n fromSliderRef.current.value = String(interval.minValue);\n toSliderRef.current.value = String(interval.maxValue);\n\n fillSlider({\n fromSlider: fromSliderRef.current,\n toSlider: toSliderRef.current,\n theme,\n });\n // Note: An interval can't be in the deps because of rerender\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [theme]);\n\n /**\n * This function updates the value\n */\n const handleInputChange = useCallback(\n (event: ChangeEvent<HTMLInputElement>) => {\n if (isDisabled) {\n return;\n }\n\n // If interval mode is active, delegate to the \"from\" handler and return early\n if (interval) {\n handleControlFromSlider(event);\n\n return;\n }\n\n // Respect optionally enabled bounds in addition to absolute min/max\n const effectiveMin =\n typeof minEnabledValue === 'number'\n ? Math.max(minValue, minEnabledValue)\n : minValue;\n\n const effectiveMax =\n typeof maxEnabledValue === 'number'\n ? Math.min(maxValue, maxEnabledValue)\n : maxValue;\n\n let newValue = Number(event.target.value);\n\n // Clamp to effective range first\n if (Number.isNaN(newValue)) {\n newValue = effectiveMin;\n }\n\n if (newValue < effectiveMin) newValue = effectiveMin;\n else if (newValue > effectiveMax - (effectiveMax % step)) newValue = effectiveMax;\n else newValue = Math.round(newValue / step) * step;\n\n if (typeof onChange === 'function' && newValue !== previousFromValueRef.current) {\n onChange(newValue);\n }\n\n updateFromValue(newValue);\n },\n [\n handleControlFromSlider,\n interval,\n isDisabled,\n maxEnabledValue,\n maxValue,\n minEnabledValue,\n minValue,\n onChange,\n step,\n updateFromValue,\n ],\n );\n\n const fromSliderThumbPosition = useMemo(() => {\n if (\n typeof fromSliderRef.current?.offsetWidth === 'number' &&\n typeof sliderWrapperSize?.width === 'number'\n ) {\n return calculateGradientOffset({\n maxValue,\n minValue,\n sliderWidth: fromSliderRef.current.offsetWidth,\n thumbWidth: 20,\n value: fromValue,\n wrapperWidth: sliderWrapperSize.width,\n });\n }\n\n return 0;\n }, [fromValue, maxValue, minValue, sliderWrapperSize?.width]);\n\n const toSliderThumbPosition = useMemo(() => {\n if (\n typeof toSliderRef.current?.offsetWidth === 'number' &&\n typeof sliderWrapperSize?.width === 'number'\n ) {\n return calculateGradientOffset({\n maxValue,\n minValue,\n sliderWidth: toSliderRef.current.offsetWidth,\n thumbWidth: 20,\n value: toValue,\n wrapperWidth: sliderWrapperSize.width,\n });\n }\n\n return 0;\n }, [maxValue, minValue, sliderWrapperSize?.width, toValue]);\n\n const toSliderThumbContentPosition = useMemo(\n () =>\n calculatePopupPosition({\n min: minValue,\n max: maxValue,\n sliderValue: toValue,\n popupWidth: thumbWidth,\n }),\n [maxValue, minValue, thumbWidth, toValue],\n );\n\n const fromSliderThumbContentPosition = useMemo(\n () =>\n calculatePopupPosition({\n min: minValue,\n max: maxValue,\n sliderValue: fromValue,\n popupWidth: thumbWidth,\n }),\n [fromValue, maxValue, minValue, thumbWidth],\n );\n\n const handleTouchStart = useCallback(() => {\n if (isDisabled) {\n return;\n }\n\n void setRefreshScrollEnabled(false);\n\n if (shouldShowThumbLabel) {\n setIsBigSlider(true);\n }\n }, [isDisabled, shouldShowThumbLabel]);\n\n const handleTouchEnd = useCallback(() => {\n if (isDisabled) {\n return;\n }\n\n void setRefreshScrollEnabled(true);\n\n const from = Number(fromSliderRef.current?.value);\n const to = Number(toSliderRef.current?.value);\n\n if (typeof onSelect === 'function') {\n onSelect(\n interval ? undefined : from,\n interval ? { maxValue: to, minValue: from } : undefined,\n );\n }\n\n if (shouldShowThumbLabel) {\n setIsBigSlider(false);\n }\n }, [interval, isDisabled, onSelect, shouldShowThumbLabel]);\n\n const highlightedStepElements = useMemo(() => {\n const sliderWidth = fromSliderRef.current?.offsetWidth ?? 0;\n const wrapperWidth = sliderWrapperSize?.width ?? 0;\n\n if (!shouldHighlightSteps || interval || sliderWidth === 0 || wrapperWidth === 0) {\n return null;\n }\n\n const elements: ReactNode[] = [];\n\n for (let i = minValue; i <= maxValue; i += step) {\n const isStepDisabled =\n (typeof minEnabledValue === 'number' && i < minEnabledValue) ||\n (typeof maxEnabledValue === 'number' && i > maxEnabledValue);\n\n const offset = (wrapperWidth - sliderWidth) / 2;\n const stepWidth = (sliderWidth / (maxValue - minValue)) * step;\n\n elements.push(\n <StyledHighlightedStep\n key={`step--${i}`}\n $isDisabled={isStepDisabled}\n $isFilled={i < fromValue}\n $leftPosition={offset + stepWidth * i}\n />,\n );\n }\n\n return elements;\n }, [\n fromValue,\n interval,\n maxEnabledValue,\n maxValue,\n minEnabledValue,\n minValue,\n shouldHighlightSteps,\n sliderWrapperSize?.width,\n step,\n ]);\n\n const fromInputBackground = useMemo(() => {\n if (interval) return undefined;\n\n const gradientPoints: string[] = [];\n\n const getPercentage = (x: number) => ((x - minValue) / (maxValue - minValue)) * 100;\n\n if (typeof minEnabledValue === 'number') {\n gradientPoints.push('rgb(215, 215, 215) 0%');\n gradientPoints.push(`rgb(215, 215, 215) ${getPercentage(minEnabledValue)}%`);\n gradientPoints.push(`${theme['409'] ?? ''} ${getPercentage(minEnabledValue)}%`);\n } else {\n gradientPoints.push(`${theme['409'] ?? ''} 0%`);\n }\n\n gradientPoints.push(`${theme['409'] ?? ''} ${getPercentage(fromValue)}%`);\n gradientPoints.push(`${theme['403'] ?? ''} ${getPercentage(fromValue)}%`);\n\n if (typeof maxEnabledValue === 'number') {\n gradientPoints.push(`${theme['403'] ?? ''} ${getPercentage(maxEnabledValue)}%`);\n gradientPoints.push(`rgb(215, 215, 215) ${getPercentage(maxEnabledValue)}%`);\n gradientPoints.push('rgb(215, 215, 215) 100%');\n } else {\n gradientPoints.push(`${theme['403'] ?? ''} 100%`);\n }\n\n return `linear-gradient(to right, ${gradientPoints.join(', ')})`;\n }, [fromValue, interval, maxEnabledValue, maxValue, minEnabledValue, minValue, theme]);\n\n return useMemo(\n () => (\n <StyledSlider ref={sliderWrapperRef} $isDisabled={isDisabled}>\n {highlightedStepElements}\n <StyledSliderInput\n animate={{ height: isBigSlider ? 30 : 10 }}\n initial={{ height: 10 }}\n exit={{ height: 10 }}\n $thumbWidth={40}\n ref={fromSliderRef}\n $isInterval={!!interval}\n type=\"range\"\n value={fromValue}\n step={step}\n max={maxValue}\n min={minValue}\n onTouchStart={handleTouchStart}\n onTouchEnd={handleTouchEnd}\n onChange={handleInputChange}\n onMouseUp={handleMouseUp}\n $background={fromInputBackground}\n onFocus={() => {\n setIsFromThumbFocused(true);\n setIsToThumbFocused(false);\n }}\n onBlur={() => {\n setIsFromThumbFocused(false);\n }}\n />\n <StyledSliderThumb\n ref={fromSliderThumbRef}\n $position={fromSliderThumbPosition}\n $isBigSlider={isBigSlider}\n >\n {shouldShowThumbLabel && (\n <StyledSliderThumbLabel\n $width={thumbWidth}\n $isBigSlider={isBigSlider}\n $position={fromSliderThumbContentPosition}\n ref={fromSliderThumbContentRef}\n >\n {typeof thumbLabelFormatter === 'function'\n ? thumbLabelFormatter(fromValue)\n : fromValue}\n </StyledSliderThumbLabel>\n )}\n </StyledSliderThumb>\n {interval && (\n <StyledSliderThumb\n ref={toSliderThumbRef}\n $position={toSliderThumbPosition}\n $isBigSlider={isBigSlider}\n >\n {shouldShowThumbLabel && (\n <StyledSliderThumbLabel\n $width={thumbWidth}\n $isBigSlider={isBigSlider}\n $position={toSliderThumbContentPosition}\n ref={toSliderThumbContentRef}\n >\n {typeof thumbLabelFormatter === 'function'\n ? thumbLabelFormatter(toValue)\n : toValue}\n </StyledSliderThumbLabel>\n )}\n </StyledSliderThumb>\n )}\n {interval && (\n <StyledSliderInput\n animate={{ height: isBigSlider ? 30 : 10 }}\n initial={{ height: 10 }}\n exit={{ height: 10 }}\n $thumbWidth={40}\n ref={toSliderRef}\n $isInterval={!!interval}\n type=\"range\"\n value={toValue}\n step={step}\n max={maxValue}\n min={minValue}\n onTouchStart={handleTouchStart}\n onTouchEnd={handleTouchEnd}\n onChange={handleControlToSlider}\n onMouseUp={handleMouseUp}\n onFocus={() => {\n setIsToThumbFocused(true);\n setIsFromThumbFocused(false);\n }}\n onBlur={() => {\n setIsToThumbFocused(false);\n }}\n />\n )}\n </StyledSlider>\n ),\n [\n fromInputBackground,\n fromSliderThumbContentPosition,\n fromSliderThumbPosition,\n fromValue,\n handleControlToSlider,\n handleInputChange,\n handleMouseUp,\n handleTouchEnd,\n handleTouchStart,\n highlightedStepElements,\n interval,\n isBigSlider,\n isDisabled,\n isFromThumbFocused,\n isToThumbFocused,\n maxValue,\n minValue,\n shouldShowThumbLabel,\n shouldShowKeyboardHighlighting,\n thumbLabelFormatter,\n thumbWidth,\n toSliderThumbContentPosition,\n toSliderThumbPosition,\n toValue,\n ],\n );\n};\n\nSlider.displayName = 'Slider';\n\nexport default Slider;\n"],"mappings":"AAAA,SAASA,uBAAuB,QAAQ,YAAY;AACpD,OAAOC,KAAK,IAIRC,WAAW,EACXC,SAAS,EACTC,OAAO,EACPC,MAAM,EACNC,QAAQ,QACL,OAAO;AACd,SAASC,QAAQ,QAAQ,mBAAmB;AAC5C,SAASC,cAAc,QAAQ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B,EAChBE,uBAAuB,EACvBtF,QAAQ,EACRoB,WAAW,EACXnB,UAAU,EACVqB,kBAAkB,EAClBE,gBAAgB,EAChBrB,QAAQ,EACRE,QAAQ,EACRK,oBAAoB,EACpB2B,8BAA8B,EAC9BzB,mBAAmB,EACnBM,UAAU,EACV8D,4BAA4B,EAC5BD,qBAAqB,EACrB/D,OAAO,CAEf,CAAC;AACL,CAAC;AAEDjB,MAAM,CAACyH,WAAW,GAAG,QAAQ;AAE7B,eAAezH,MAAM","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"Slider.js","names":["setRefreshScrollEnabled","React","useCallback","useEffect","useMemo","useRef","useState","useTheme","useElementSize","useFocusRingPortal","useKeyboardFocusHighlighting","calculateGradientOffset","calculatePopupPosition","fillSlider","getThumbMaxWidth","StyledHighlightedStep","StyledSlider","StyledSliderInput","StyledSliderThumb","StyledSliderThumbLabel","SLIDER_TRACK_INSET","Slider","interval","isDisabled","maxEnabledValue","maxValue","minEnabledValue","minValue","onChange","onSelect","shouldHighlightSteps","shouldEnableKeyboardHighlighting","shouldShowThumbLabel","step","thumbLabelFormatter","value","fromValue","setFromValue","toValue","setToValue","thumbWidth","setThumbWidth","isBigSlider","setIsBigSlider","isFromThumbFocused","setIsFromThumbFocused","isToThumbFocused","setIsToThumbFocused","previousFromValueRef","previousToValueRef","fromSliderRef","toSliderRef","fromSliderThumbRef","toSliderThumbRef","fromSliderThumbContentRef","toSliderThumbContentRef","sliderWrapperRef","activePointerIdRef","sliderWrapperSize","sliderTrackWidth","Math","max","width","theme","shouldShowKeyboardHighlighting","isEnabled","overlayRef","shape","updateFromValue","nextValue","current","updateToValue","normalizeIntervalValue","newValue","Number","round","applyIntervalThumbChange","thumb","rawValue","isFromThumb","previousValue","hasChanged","from","to","undefined","toSlider","fromSlider","String","maxNumber","handleMouseUp","handleControlFromSlider","event","target","handleControlToSlider","normalizeSingleValue","effectiveMin","effectiveMax","min","isNaN","handleInputChange","updateValueFromPointer","bounds","currentTarget","getBoundingClientRect","relativePosition","clientX","left","handlePointerDown","button","preventDefault","pointerId","setPointerCapture","focus","handlePointerMove","handlePointerUp","releasePointerCapture","fromSliderThumbPosition","sliderWidth","wrapperWidth","toSliderThumbPosition","toSliderThumbContentPosition","sliderValue","popupWidth","fromSliderThumbContentPosition","handleTouchStart","handleTouchEnd","highlightedStepElements","elements","i","isStepDisabled","offset","push","createElement","key","$isDisabled","$isFilled","$leftPosition","fromInputBackground","gradientPoints","getPercentage","x","join","ref","onPointerDown","onPointerMove","onPointerUp","animate","height","initial","exit","$trackInset","$isInterval","type","onTouchStart","onTouchEnd","onMouseUp","$background","onFocus","onBlur","$position","$isBigSlider","$width","displayName"],"sources":["../../../../src/components/slider/Slider.tsx"],"sourcesContent":["import { setRefreshScrollEnabled } from 'chayns-api';\nimport React, {\n ChangeEvent,\n FC,\n PointerEvent as ReactPointerEvent,\n ReactNode,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { useTheme } from 'styled-components';\nimport { useElementSize } from '../../hooks/element';\nimport { useFocusRingPortal } from '../../hooks/useFocusRingPortal';\nimport { useKeyboardFocusHighlighting } from '../../hooks/useKeyboardFocusHighlighting';\nimport {\n calculateGradientOffset,\n calculatePopupPosition,\n fillSlider,\n getThumbMaxWidth,\n} from '../../utils/slider';\nimport type { Theme } from '../color-scheme-provider/ColorSchemeProvider';\nimport {\n StyledHighlightedStep,\n StyledSlider,\n StyledSliderInput,\n StyledSliderThumb,\n StyledSliderThumbLabel,\n} from './Slider.styles';\n\nconst SLIDER_TRACK_INSET = 40;\n\nexport interface SliderInterval {\n maxValue: number;\n minValue: number;\n}\n\nexport type SliderProps = {\n /**\n * The current interval of the slider.\n * @description\n * The `interval` prop is used to define a range for the slider, allowing users to select a minimum and maximum value.\n * This is particularly useful for scenarios where you want to allow users to select a range of values, such as price ranges or date ranges.\n * When provided, the slider will display two thumbs, one for the minimum value and one for the maximum value.\n * @example\n * <Slider interval={{ minValue: 10, maxValue: 50 }} />\n * @optional\n */\n interval?: SliderInterval;\n /**\n * Disables the slider, preventing user interaction.\n * @description\n * The `isDisabled` prop is used to disable the slider, making it unresponsive to user input.\n * When set to `true`, the slider cannot be moved, and its appearance may change to indicate that it is disabled.\n * This is useful for scenarios where the slider should not be interacted with, such as when the data it controls is not available or when the user does not have permission to change the value.\n * @default false\n * @example\n * <Slider isDisabled={true} />\n * @optional\n */\n isDisabled?: boolean;\n /**\n * The maximum enabled value of the slider.\n * @description\n * The `maxEnabledValue` prop is used to define the maximum value that can be selected on the slider.\n * It is particularly useful when you want to set an upper limit for the slider's range, ensuring that users cannot select values above this threshold.\n * This prop is optional and can be used in conjunction with the `maxValue` prop to create a more flexible slider.\n * @example\n * <Slider maxEnabledValue={75} />\n * @optional\n */\n maxEnabledValue?: number;\n /**\n * The maximum value of the slider.\n * @description\n * The `maxValue` prop defines the upper limit of the slider's range. It is used to set the maximum value that can be selected by the user.\n * This value should be greater than or equal to `minValue`.\n * @example\n * <Slider maxValue={200} />\n */\n maxValue: number;\n /**\n * The minimum enabled value of the slider.\n * @description\n * The `minEnabledValue` prop is used to define the minimum value that can be selected on the slider.\n * It is particularly useful when you want to set a lower limit for the slider's range, ensuring that users cannot select values below this threshold.\n * This prop is optional and can be used in conjunction with the `minValue` prop to create a more flexible slider.\n * @example\n * <Slider minEnabledValue={25} />\n * @optional\n */\n minEnabledValue?: number;\n /**\n * The minimum value of the slider.\n * @description\n * The `minValue` prop defines the lower limit of the slider's range. It is used to set the minimum value that can be selected by the user.\n * This value should be less than or equal to `maxValue`.\n * @example\n * <Slider minValue={0} />\n */\n minValue: number;\n /**\n * Callback function that is called when the slider value changes.\n * @description\n * The `onChange` prop is a callback function that is triggered whenever the slider value changes.\n * It receives the new value or interval of the slider as an argument, allowing you to update your application state or perform other actions based on the new value.\n * If the slider is configured as an interval, it will receive an object with `minValue` and `maxValue`.\n * @example\n * <Slider onChange={(value, interval) => console.log('Slider changed', { value, interval })} />\n */\n onChange?: (value?: number, interval?: SliderInterval) => void;\n /**\n * Callback function that is called when the slider selection is finalized.\n * @description\n * The `onSelect` prop is a callback function that is triggered when the user finishes interacting with the slider, such as releasing the mouse or touch after dragging the thumb.\n * It receives the selected value or interval as arguments, allowing you to perform actions based on the final selection.\n * If the slider is configured as an interval, it will receive an object with `minValue` and `maxValue`.\n * @example\n * <Slider onSelect={(value, interval) => console.log('Slider selected', { value, interval })} />\n */\n onSelect?: (value?: number, interval?: SliderInterval) => void;\n /**\n * Indicates whether the slider should highlight steps.\n * @description\n * The `shouldHighlightSteps` prop determines whether the slider should visually indicate the steps between values.\n * When set to `true`, the slider will show visual markers for each step, making it easier for users to see the increments.\n * @default false\n * @example\n * <Slider shouldHighlightSteps={true} />\n * @optional\n */\n shouldHighlightSteps?: boolean;\n /**\n * Enables keyboard-only focus highlighting.\n * @description\n * Focus styles are shown only during keyboard navigation and reset on mouse interaction.\n * @default false\n * @optional\n */\n shouldEnableKeyboardHighlighting?: boolean;\n /**\n * Indicates whether the slider should show a label on the thumb.\n * @description\n * The `shouldShowThumbLabel` prop determines whether the slider should display a label on the thumb that shows the current value.\n * When set to `true`, a label will be shown above the thumb, providing users with immediate feedback on the selected value.\n * @default false\n * @example\n * <Slider shouldShowThumbLabel={true} />\n * @optional\n */\n shouldShowThumbLabel?: boolean;\n /**\n * The step size for the slider.\n * @description\n * The `step` prop defines the increment by which the slider value changes when the user interacts with it.\n * It is used to control the granularity of the slider's movement. For example, if `step` is set to 1, the slider will move in increments of 1.\n * @default 1\n * @example\n * <Slider step={5} />\n * @optional\n */\n step?: number;\n /**\n * A function to format the thumb label.\n * @description\n * The `thumbLabelFormatter` prop is a function that formats the value displayed on the thumb label.\n * It receives the current value as an argument and should return a string that will be displayed on the thumb label.\n * This is useful for customizing the appearance of the label, such as adding currency symbols or units.\n * @example\n * <Slider thumbLabelFormatter={(value) => `${value} €`} />\n * @optional\n */\n thumbLabelFormatter?: (value: number, isMeasuring?: boolean) => string;\n /**\n * The current value of the slider.\n * @description\n * The `value` prop is used to set the current value of the slider when it is not configured as an interval.\n * It should be a number between `minValue` and `maxValue`. If the slider is configured as an interval, this prop will be ignored.\n * @example\n * <Slider value={50} />\n * @optional\n */\n value?: number;\n};\n\nconst Slider: FC<SliderProps> = ({\n interval,\n isDisabled,\n maxEnabledValue,\n maxValue,\n minEnabledValue,\n minValue,\n onChange,\n onSelect,\n shouldHighlightSteps = false,\n shouldEnableKeyboardHighlighting,\n shouldShowThumbLabel = false,\n step = 1,\n thumbLabelFormatter,\n value,\n}) => {\n const [fromValue, setFromValue] = useState(minEnabledValue ?? minValue);\n const [toValue, setToValue] = useState(maxEnabledValue ?? maxValue);\n const [thumbWidth, setThumbWidth] = useState(20);\n const [isBigSlider, setIsBigSlider] = useState(false);\n const [isFromThumbFocused, setIsFromThumbFocused] = useState(false);\n const [isToThumbFocused, setIsToThumbFocused] = useState(false);\n\n const previousFromValueRef = useRef(fromValue);\n const previousToValueRef = useRef(toValue);\n const fromSliderRef = useRef<HTMLInputElement>(null);\n const toSliderRef = useRef<HTMLInputElement>(null);\n const fromSliderThumbRef = useRef<HTMLDivElement>(null);\n const toSliderThumbRef = useRef<HTMLDivElement>(null);\n const fromSliderThumbContentRef = useRef<HTMLDivElement>(null);\n const toSliderThumbContentRef = useRef<HTMLDivElement>(null);\n const sliderWrapperRef = useRef<HTMLDivElement>(null);\n const activePointerIdRef = useRef<number | null>(null);\n\n const sliderWrapperSize = useElementSize(sliderWrapperRef);\n const sliderTrackWidth = Math.max((sliderWrapperSize?.width ?? 0) - SLIDER_TRACK_INSET, 0);\n\n const theme = useTheme() as Theme;\n const shouldShowKeyboardHighlighting = useKeyboardFocusHighlighting(\n shouldEnableKeyboardHighlighting && !isDisabled,\n );\n useFocusRingPortal(fromSliderRef, {\n isEnabled: shouldShowKeyboardHighlighting && isFromThumbFocused,\n overlayRef: fromSliderThumbRef,\n shape: 'circle',\n });\n useFocusRingPortal(toSliderRef, {\n isEnabled: shouldShowKeyboardHighlighting && isToThumbFocused,\n overlayRef: toSliderThumbRef,\n shape: 'circle',\n });\n\n const updateFromValue = useCallback((nextValue: number) => {\n previousFromValueRef.current = nextValue;\n setFromValue(nextValue);\n }, []);\n\n const updateToValue = useCallback((nextValue: number) => {\n previousToValueRef.current = nextValue;\n setToValue(nextValue);\n }, []);\n\n const normalizeIntervalValue = useCallback(\n (nextValue: number) => {\n let newValue = Number(nextValue);\n\n if (newValue > maxValue || newValue > maxValue - (maxValue % step)) {\n newValue = maxValue;\n } else if (newValue < minValue) {\n newValue = minValue;\n } else {\n newValue = Math.round(newValue / step) * step;\n }\n\n return newValue;\n },\n [maxValue, minValue, step],\n );\n\n const applyIntervalThumbChange = useCallback(\n (thumb: 'from' | 'to', rawValue: number) => {\n if (!fromSliderRef.current || !toSliderRef.current) {\n return;\n }\n\n const newValue = normalizeIntervalValue(rawValue);\n const isFromThumb = thumb === 'from';\n const previousValue = isFromThumb\n ? previousFromValueRef.current\n : previousToValueRef.current;\n const hasChanged = newValue !== previousValue;\n\n if (isFromThumb) {\n updateFromValue(newValue);\n } else {\n updateToValue(newValue);\n }\n\n const from = Number(fromSliderRef.current.value);\n const to = Number(toSliderRef.current.value);\n\n if (hasChanged && typeof onChange === 'function') {\n onChange(undefined, {\n minValue: isFromThumb ? newValue : from,\n maxValue: isFromThumb ? to : newValue,\n });\n }\n\n fillSlider({\n toSlider: toSliderRef.current,\n fromSlider: fromSliderRef.current,\n ...(isFromThumb ? { fromValue: newValue } : { toValue: newValue }),\n theme,\n });\n\n if (isFromThumb) {\n fromSliderRef.current.value = String(newValue > to ? to : newValue);\n } else {\n toSliderRef.current.value = String(from <= newValue ? newValue : from);\n }\n },\n [normalizeIntervalValue, onChange, theme, updateFromValue, updateToValue],\n );\n\n useEffect(() => {\n if (shouldShowThumbLabel) {\n setThumbWidth(getThumbMaxWidth({ maxNumber: maxValue, thumbLabelFormatter }));\n }\n }, [maxValue, shouldShowThumbLabel, thumbLabelFormatter]);\n\n /**\n * This function sets the value\n */\n useEffect(() => {\n if (\n typeof value === 'number' &&\n value >= minValue &&\n value <= maxValue &&\n (typeof minEnabledValue !== 'number' || value >= minEnabledValue) &&\n (typeof maxEnabledValue !== 'number' || value <= maxEnabledValue)\n ) {\n updateFromValue(value);\n }\n }, [maxEnabledValue, maxValue, minEnabledValue, minValue, updateFromValue, value]);\n\n useEffect(() => {\n if (fromValue > toValue) {\n updateFromValue(toValue);\n }\n\n if (toValue < fromValue) {\n updateToValue(fromValue);\n }\n }, [fromValue, toValue, updateFromValue, updateToValue]);\n\n const handleMouseUp = useCallback(() => {\n if (isDisabled) {\n return;\n }\n\n const from = Number(fromSliderRef.current?.value);\n const to = Number(toSliderRef.current?.value);\n\n if (typeof onSelect === 'function') {\n onSelect(\n interval ? undefined : from,\n interval ? { maxValue: to, minValue: from } : undefined,\n );\n }\n }, [interval, isDisabled, onSelect]);\n\n const handleControlFromSlider = useCallback(\n (event: ChangeEvent<HTMLInputElement>) => {\n applyIntervalThumbChange('from', Number(event.target.value));\n },\n [applyIntervalThumbChange],\n );\n\n const handleControlToSlider = useCallback(\n (event: ChangeEvent<HTMLInputElement>) => {\n if (isDisabled) {\n return;\n }\n\n applyIntervalThumbChange('to', Number(event.target.value));\n },\n [applyIntervalThumbChange, isDisabled],\n );\n\n useEffect(() => {\n if (!fromSliderRef.current || !toSliderRef.current || !interval) {\n return;\n }\n\n updateFromValue(interval.minValue);\n updateToValue(interval.maxValue);\n\n fromSliderRef.current.value = String(interval.minValue);\n toSliderRef.current.value = String(interval.maxValue);\n\n fillSlider({\n fromSlider: fromSliderRef.current,\n toSlider: toSliderRef.current,\n theme,\n });\n // Note: An interval can't be in the deps because of rerender\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [theme]);\n\n const normalizeSingleValue = useCallback(\n (rawValue: number) => {\n const effectiveMin =\n typeof minEnabledValue === 'number'\n ? Math.max(minValue, minEnabledValue)\n : minValue;\n\n const effectiveMax =\n typeof maxEnabledValue === 'number'\n ? Math.min(maxValue, maxEnabledValue)\n : maxValue;\n\n let newValue = rawValue;\n\n if (Number.isNaN(newValue)) {\n newValue = effectiveMin;\n }\n\n if (newValue < effectiveMin) newValue = effectiveMin;\n else if (newValue > effectiveMax - (effectiveMax % step)) newValue = effectiveMax;\n else newValue = Math.round(newValue / step) * step;\n\n return newValue;\n },\n [maxEnabledValue, maxValue, minEnabledValue, minValue, step],\n );\n\n /**\n * This function updates the value\n */\n const handleInputChange = useCallback(\n (event: ChangeEvent<HTMLInputElement>) => {\n if (isDisabled) {\n return;\n }\n\n // If interval mode is active, delegate to the \"from\" handler and return early\n if (interval) {\n handleControlFromSlider(event);\n\n return;\n }\n\n const newValue = normalizeSingleValue(Number(event.target.value));\n\n if (typeof onChange === 'function' && newValue !== previousFromValueRef.current) {\n onChange(newValue);\n }\n\n updateFromValue(newValue);\n },\n [\n handleControlFromSlider,\n interval,\n isDisabled,\n maxEnabledValue,\n normalizeSingleValue,\n onChange,\n updateFromValue,\n ],\n );\n\n const updateValueFromPointer = useCallback(\n (event: ReactPointerEvent<HTMLDivElement>) => {\n const bounds = event.currentTarget.getBoundingClientRect();\n const relativePosition =\n (event.clientX - bounds.left - SLIDER_TRACK_INSET / 2) / sliderTrackWidth;\n const rawValue =\n minValue + Math.min(Math.max(relativePosition, 0), 1) * (maxValue - minValue);\n const newValue = normalizeSingleValue(rawValue);\n\n if (typeof onChange === 'function' && newValue !== previousFromValueRef.current) {\n onChange(newValue);\n }\n\n updateFromValue(newValue);\n\n return newValue;\n },\n [maxValue, minValue, normalizeSingleValue, onChange, sliderTrackWidth, updateFromValue],\n );\n\n const handlePointerDown = useCallback(\n (event: ReactPointerEvent<HTMLDivElement>) => {\n if (isDisabled || interval || event.button !== 0) {\n return;\n }\n\n event.preventDefault();\n activePointerIdRef.current = event.pointerId;\n event.currentTarget.setPointerCapture(event.pointerId);\n fromSliderRef.current?.focus();\n updateValueFromPointer(event);\n },\n [interval, isDisabled, updateValueFromPointer],\n );\n\n const handlePointerMove = useCallback(\n (event: ReactPointerEvent<HTMLDivElement>) => {\n if (activePointerIdRef.current !== event.pointerId) {\n return;\n }\n\n event.preventDefault();\n updateValueFromPointer(event);\n },\n [updateValueFromPointer],\n );\n\n const handlePointerUp = useCallback(\n (event: ReactPointerEvent<HTMLDivElement>) => {\n if (activePointerIdRef.current !== event.pointerId) {\n return;\n }\n\n event.preventDefault();\n activePointerIdRef.current = null;\n event.currentTarget.releasePointerCapture(event.pointerId);\n\n if (typeof onSelect === 'function') {\n onSelect(updateValueFromPointer(event));\n }\n },\n [onSelect, updateValueFromPointer],\n );\n\n const fromSliderThumbPosition = useMemo(() => {\n if (typeof sliderWrapperSize?.width === 'number') {\n return calculateGradientOffset({\n maxValue,\n minValue,\n sliderWidth: sliderTrackWidth,\n thumbWidth: 20,\n value: fromValue,\n wrapperWidth: sliderWrapperSize.width,\n });\n }\n\n return 0;\n }, [fromValue, maxValue, minValue, sliderTrackWidth, sliderWrapperSize?.width]);\n\n const toSliderThumbPosition = useMemo(() => {\n if (typeof sliderWrapperSize?.width === 'number') {\n return calculateGradientOffset({\n maxValue,\n minValue,\n sliderWidth: sliderTrackWidth,\n thumbWidth: 20,\n value: toValue,\n wrapperWidth: sliderWrapperSize.width,\n });\n }\n\n return 0;\n }, [maxValue, minValue, sliderTrackWidth, sliderWrapperSize?.width, toValue]);\n\n const toSliderThumbContentPosition = useMemo(\n () =>\n calculatePopupPosition({\n min: minValue,\n max: maxValue,\n sliderValue: toValue,\n popupWidth: thumbWidth,\n }),\n [maxValue, minValue, thumbWidth, toValue],\n );\n\n const fromSliderThumbContentPosition = useMemo(\n () =>\n calculatePopupPosition({\n min: minValue,\n max: maxValue,\n sliderValue: fromValue,\n popupWidth: thumbWidth,\n }),\n [fromValue, maxValue, minValue, thumbWidth],\n );\n\n const handleTouchStart = useCallback(() => {\n if (isDisabled) {\n return;\n }\n\n void setRefreshScrollEnabled(false);\n\n if (shouldShowThumbLabel) {\n setIsBigSlider(true);\n }\n }, [isDisabled, shouldShowThumbLabel]);\n\n const handleTouchEnd = useCallback(() => {\n if (isDisabled) {\n return;\n }\n\n void setRefreshScrollEnabled(true);\n\n const from = Number(fromSliderRef.current?.value);\n const to = Number(toSliderRef.current?.value);\n\n if (interval && typeof onSelect === 'function') {\n onSelect(undefined, { maxValue: to, minValue: from });\n }\n\n if (shouldShowThumbLabel) {\n setIsBigSlider(false);\n }\n }, [interval, isDisabled, onSelect, shouldShowThumbLabel]);\n\n const highlightedStepElements = useMemo(() => {\n const wrapperWidth = sliderWrapperSize?.width ?? 0;\n\n if (!shouldHighlightSteps || interval || sliderTrackWidth === 0 || wrapperWidth === 0) {\n return null;\n }\n\n const elements: ReactNode[] = [];\n\n for (let i = minValue; i <= maxValue; i += step) {\n const isStepDisabled =\n (typeof minEnabledValue === 'number' && i < minEnabledValue) ||\n (typeof maxEnabledValue === 'number' && i > maxEnabledValue);\n\n const offset = (wrapperWidth - sliderTrackWidth) / 2;\n\n elements.push(\n <StyledHighlightedStep\n key={`step--${i}`}\n $isDisabled={isStepDisabled}\n $isFilled={i < fromValue}\n $leftPosition={\n offset + ((i - minValue) / (maxValue - minValue)) * sliderTrackWidth\n }\n />,\n );\n }\n\n return elements;\n }, [\n fromValue,\n interval,\n maxEnabledValue,\n maxValue,\n minEnabledValue,\n minValue,\n shouldHighlightSteps,\n sliderTrackWidth,\n sliderWrapperSize?.width,\n step,\n ]);\n\n const fromInputBackground = useMemo(() => {\n if (interval) return undefined;\n\n const gradientPoints: string[] = [];\n\n const getPercentage = (x: number) => ((x - minValue) / (maxValue - minValue)) * 100;\n\n if (typeof minEnabledValue === 'number') {\n gradientPoints.push('rgb(215, 215, 215) 0%');\n gradientPoints.push(`rgb(215, 215, 215) ${getPercentage(minEnabledValue)}%`);\n gradientPoints.push(`${theme['409'] ?? ''} ${getPercentage(minEnabledValue)}%`);\n } else {\n gradientPoints.push(`${theme['409'] ?? ''} 0%`);\n }\n\n gradientPoints.push(`${theme['409'] ?? ''} ${getPercentage(fromValue)}%`);\n gradientPoints.push(`${theme['403'] ?? ''} ${getPercentage(fromValue)}%`);\n\n if (typeof maxEnabledValue === 'number') {\n gradientPoints.push(`${theme['403'] ?? ''} ${getPercentage(maxEnabledValue)}%`);\n gradientPoints.push(`rgb(215, 215, 215) ${getPercentage(maxEnabledValue)}%`);\n gradientPoints.push('rgb(215, 215, 215) 100%');\n } else {\n gradientPoints.push(`${theme['403'] ?? ''} 100%`);\n }\n\n return `linear-gradient(to right, ${gradientPoints.join(', ')})`;\n }, [fromValue, interval, maxEnabledValue, maxValue, minEnabledValue, minValue, theme]);\n\n return useMemo(\n () => (\n <StyledSlider\n ref={sliderWrapperRef}\n $isDisabled={isDisabled}\n onPointerDown={handlePointerDown}\n onPointerMove={handlePointerMove}\n onPointerUp={handlePointerUp}\n >\n {highlightedStepElements}\n <StyledSliderInput\n animate={{ height: isBigSlider ? 30 : 10 }}\n initial={{ height: 10 }}\n exit={{ height: 10 }}\n $trackInset={SLIDER_TRACK_INSET}\n ref={fromSliderRef}\n $isInterval={!!interval}\n type=\"range\"\n value={fromValue}\n step={step}\n max={maxValue}\n min={minValue}\n onTouchStart={handleTouchStart}\n onTouchEnd={handleTouchEnd}\n onChange={handleInputChange}\n onMouseUp={interval ? handleMouseUp : undefined}\n $background={fromInputBackground}\n onFocus={() => {\n setIsFromThumbFocused(true);\n setIsToThumbFocused(false);\n }}\n onBlur={() => {\n setIsFromThumbFocused(false);\n }}\n />\n <StyledSliderThumb\n ref={fromSliderThumbRef}\n $position={fromSliderThumbPosition}\n $isBigSlider={isBigSlider}\n >\n {shouldShowThumbLabel && (\n <StyledSliderThumbLabel\n $width={thumbWidth}\n $isBigSlider={isBigSlider}\n $position={fromSliderThumbContentPosition}\n ref={fromSliderThumbContentRef}\n >\n {typeof thumbLabelFormatter === 'function'\n ? thumbLabelFormatter(fromValue)\n : fromValue}\n </StyledSliderThumbLabel>\n )}\n </StyledSliderThumb>\n {interval && (\n <StyledSliderThumb\n ref={toSliderThumbRef}\n $position={toSliderThumbPosition}\n $isBigSlider={isBigSlider}\n >\n {shouldShowThumbLabel && (\n <StyledSliderThumbLabel\n $width={thumbWidth}\n $isBigSlider={isBigSlider}\n $position={toSliderThumbContentPosition}\n ref={toSliderThumbContentRef}\n >\n {typeof thumbLabelFormatter === 'function'\n ? thumbLabelFormatter(toValue)\n : toValue}\n </StyledSliderThumbLabel>\n )}\n </StyledSliderThumb>\n )}\n {interval && (\n <StyledSliderInput\n animate={{ height: isBigSlider ? 30 : 10 }}\n initial={{ height: 10 }}\n exit={{ height: 10 }}\n $trackInset={SLIDER_TRACK_INSET}\n ref={toSliderRef}\n $isInterval={!!interval}\n type=\"range\"\n value={toValue}\n step={step}\n max={maxValue}\n min={minValue}\n onTouchStart={handleTouchStart}\n onTouchEnd={handleTouchEnd}\n onChange={handleControlToSlider}\n onMouseUp={handleMouseUp}\n onFocus={() => {\n setIsToThumbFocused(true);\n setIsFromThumbFocused(false);\n }}\n onBlur={() => {\n setIsToThumbFocused(false);\n }}\n />\n )}\n </StyledSlider>\n ),\n [\n fromInputBackground,\n fromSliderThumbContentPosition,\n fromSliderThumbPosition,\n fromValue,\n handleControlToSlider,\n handleInputChange,\n handleMouseUp,\n handlePointerDown,\n handlePointerMove,\n handlePointerUp,\n handleTouchEnd,\n handleTouchStart,\n highlightedStepElements,\n interval,\n isBigSlider,\n isDisabled,\n isFromThumbFocused,\n isToThumbFocused,\n maxValue,\n minValue,\n shouldShowThumbLabel,\n shouldShowKeyboardHighlighting,\n thumbLabelFormatter,\n thumbWidth,\n toSliderThumbContentPosition,\n toSliderThumbPosition,\n toValue,\n ],\n );\n};\n\nSlider.displayName = 'Slider';\n\nexport default Slider;\n"],"mappings":"AAAA,SAASA,uBAAuB,QAAQ,YAAY;AACpD,OAAOC,KAAK,IAKRC,WAAW,EACXC,SAAS,EACTC,OAAO,EACPC,MAAM,EACNC,QAAQ,QACL,OAAO;AACd,SAASC,QAAQ,QAAQ,mBAAmB;AAC5C,SAASC,cAAc,Q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QAAQ,EACRE,QAAQ,EACRK,oBAAoB,EACpBgC,8BAA8B,EAC9B9B,mBAAmB,EACnBM,UAAU,EACVgF,4BAA4B,EAC5BD,qBAAqB,EACrBjF,OAAO,CAEf,CAAC;AACL,CAAC;AAEDjB,MAAM,CAAC6I,WAAW,GAAG,QAAQ;AAE7B,eAAe7I,MAAM","ignoreList":[]}
|
|
@@ -19,11 +19,11 @@ export const StyledSlider = styled.div`
|
|
|
19
19
|
export const StyledSliderInput = styled(motion.input).attrs(({
|
|
20
20
|
$background,
|
|
21
21
|
$isInterval,
|
|
22
|
-
$
|
|
22
|
+
$trackInset
|
|
23
23
|
}) => ({
|
|
24
24
|
style: {
|
|
25
25
|
pointerEvents: $isInterval ? 'none' : 'all',
|
|
26
|
-
width: `calc(100% - ${$
|
|
26
|
+
width: `calc(100% - ${$trackInset}px)`,
|
|
27
27
|
background: $background
|
|
28
28
|
}
|
|
29
29
|
}))`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Slider.styles.js","names":["motion","styled","StyledSlider","div","$isDisabled","StyledSliderInput","input","attrs","$background","$isInterval","$
|
|
1
|
+
{"version":3,"file":"Slider.styles.js","names":["motion","styled","StyledSlider","div","$isDisabled","StyledSliderInput","input","attrs","$background","$isInterval","$trackInset","style","pointerEvents","width","background","StyledSliderThumb","$position","$isBigSlider","left","height","StyledSliderThumbLabel","span","$width","minWidth","top","StyledHighlightedStep","$isFilled","theme","$leftPosition"],"sources":["../../../../src/components/slider/Slider.styles.ts"],"sourcesContent":["import { motion } from 'motion/react';\nimport styled, { css } from 'styled-components';\nimport type { WithTheme } from '../color-scheme-provider/ColorSchemeProvider';\n\ntype StyledSliderProps = WithTheme<{ $isDisabled?: boolean }>;\n\nexport const StyledSlider = styled.div<StyledSliderProps>`\n width: 100%;\n height: 30px;\n cursor: ${({ $isDisabled }) => ($isDisabled ? 'default' : 'pointer')} !important;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n touch-action: none;\n user-select: none;\n opacity: ${({ $isDisabled }) => ($isDisabled ? 0.5 : 1)};\n`;\n\ntype StyledSliderInputProps = WithTheme<{\n $background?: string;\n $isInterval: boolean;\n $trackInset: number;\n}>;\n\nexport const StyledSliderInput = styled(motion.input).attrs<StyledSliderInputProps>(\n ({ $background, $isInterval, $trackInset }) => ({\n style: {\n pointerEvents: $isInterval ? 'none' : 'all',\n width: `calc(100% - ${$trackInset}px)`,\n background: $background,\n },\n }),\n)`\n position: absolute;\n border-radius: 100px;\n -webkit-appearance: none;\n\n outline: none;\n cursor: pointer !important;\n z-index: 2;\n appearance: none;\n\n // Slider thumb for chrome\n &::-webkit-slider-thumb {\n -webkit-appearance: none;\n appearance: none;\n width: 50px;\n height: 20px;\n cursor: pointer;\n opacity: 0;\n pointer-events: all;\n position: relative;\n }\n\n // slider thumb for firefox\n\n &::-moz-range-thumb {\n width: 50px;\n height: 20px;\n cursor: pointer;\n opacity: 0;\n pointer-events: all;\n position: relative;\n }\n`;\n\ntype StyledSliderThumbProps = WithTheme<{\n $position: number;\n $isBigSlider: boolean;\n}>;\n\nexport const StyledSliderThumb = styled.div.attrs<StyledSliderThumbProps>(\n ({ $position, $isBigSlider }) => ({\n style: {\n left: `${$position}px`,\n height: `${$isBigSlider ? 0 : 20}px`,\n },\n }),\n)`\n width: 20px;\n height: 20px;\n cursor: pointer;\n border-radius: 100px;\n background-color: white;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);\n pointer-events: none;\n z-index: 5;\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0 8px;\n white-space: nowrap;\n top: 5px;\n\n transition: top 0.2s ease 0s;\n`;\n\ntype StyledSliderThumbLabelProps = WithTheme<{\n $position: number;\n $width: number;\n $isBigSlider: boolean;\n}>;\n\nexport const StyledSliderThumbLabel = styled.span.attrs<StyledSliderThumbLabelProps>(\n ({ $position, $isBigSlider, $width }) => ({\n style: {\n minWidth: `${$width}px`,\n top: `-${$isBigSlider ? 56 : 48}px`,\n left: `${$position}px`,\n },\n }),\n)`\n pointer-events: none;\n color: #222;\n\n height: 20px;\n cursor: pointer;\n border-radius: 3px;\n background-color: white;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);\n z-index: 3;\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 16px;\n white-space: nowrap;\n\n transition: top 0.2s ease 0s;\n\n &::after {\n background-color: inherit;\n border-bottom: 1px solid rgba(0, 0, 0, 0.1);\n border-right: 1px solid rgba(0, 0, 0, 0.1);\n box-shadow: 0 0 6px 2px rgba(0, 0, 0, 0.4);\n content: '';\n height: 14px;\n position: absolute;\n width: 14px;\n z-index: -2;\n left: ${({ $position }) => $position * -1}px;\n transform: rotate(225deg);\n bottom: -7px;\n }\n\n &::before {\n background-color: inherit;\n bottom: 0;\n content: '';\n left: 0;\n position: absolute;\n right: 0;\n border-radius: 3px;\n top: 0;\n z-index: -1;\n }\n`;\n\ntype StyledHighlightedStepProps = WithTheme<{\n $isDisabled: boolean;\n $isFilled: boolean;\n $leftPosition: number;\n}>;\n\nexport const StyledHighlightedStep = styled.div<StyledHighlightedStepProps>`\n background-color: ${({ $isDisabled, $isFilled, theme }) => {\n if ($isDisabled) return 'rgb(215, 215, 215)';\n if ($isFilled) return theme['409'];\n return theme['403'];\n }};\n border-radius: 50%;\n height: 18px;\n left: ${({ $leftPosition }) => $leftPosition}px;\n pointer-events: none;\n position: absolute;\n top: 50%;\n transform: translate(-50%, -50%);\n width: 18px;\n z-index: 3;\n`;\n"],"mappings":"AAAA,SAASA,MAAM,QAAQ,cAAc;AACrC,OAAOC,MAAM,MAAe,mBAAmB;AAK/C,OAAO,MAAMC,YAAY,GAAGD,MAAM,CAACE,GAAsB;AACzD;AACA;AACA,cAAc,CAAC;EAAEC;AAAY,CAAC,KAAMA,WAAW,GAAG,SAAS,GAAG,SAAU;AACxE;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,CAAC;EAAEA;AAAY,CAAC,KAAMA,WAAW,G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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,CAAC;EAAEA;AAAU,CAAC,KAAKA,SAAS,GAAG,CAAC,CAAC;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAQD,OAAO,MAAMS,qBAAqB,GAAGxB,MAAM,CAACE,GAA+B;AAC3E,wBAAwB,CAAC;EAAEC,WAAW;EAAEsB,SAAS;EAAEC;AAAM,CAAC,KAAK;EACvD,IAAIvB,WAAW,EAAE,OAAO,oBAAoB;EAC5C,IAAIsB,SAAS,EAAE,OAAOC,KAAK,CAAC,KAAK,CAAC;EAClC,OAAOA,KAAK,CAAC,KAAK,CAAC;AACvB,CAAC;AACL;AACA;AACA,YAAY,CAAC;EAAEC;AAAc,CAAC,KAAKA,aAAa;AAChD;AACA;AACA;AACA;AACA;AACA;AACA,CAAC","ignoreList":[]}
|
|
@@ -11,23 +11,23 @@ export declare const StyledSliderInput: import("styled-components/dist/types").I
|
|
|
11
11
|
ref?: ((instance: HTMLInputElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | React.RefObject<HTMLInputElement> | null | undefined;
|
|
12
12
|
}, "form" | "slot" | "pattern" | "hidden" | "color" | "content" | "size" | "multiple" | "disabled" | "ref" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | "part" | "inert" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDragCapture" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "value" | "height" | "max" | "min" | "name" | "type" | "width" | "alt" | "src" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "autoComplete" | "accept" | "capture" | "checked" | "list" | "maxLength" | "minLength" | "placeholder" | "readOnly" | "required" | "step" | keyof import("framer-motion").MotionProps> & Omit<Omit<import("framer-motion").HTMLMotionProps<"input">, "ref"> & React.RefAttributes<HTMLInputElement>, "ref"> & {
|
|
13
13
|
ref?: ((instance: HTMLInputElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | React.RefObject<HTMLInputElement> | null | undefined;
|
|
14
|
-
}, "theme" | "$background" | "$isInterval" | "$
|
|
14
|
+
}, "theme" | "$background" | "$isInterval" | "$trackInset"> & {
|
|
15
15
|
$background?: string;
|
|
16
16
|
$isInterval: boolean;
|
|
17
|
-
$
|
|
17
|
+
$trackInset: number;
|
|
18
18
|
} & {
|
|
19
19
|
theme: import("../color-scheme-provider/ColorSchemeProvider").Theme;
|
|
20
|
-
}, "form" | "slot" | "pattern" | "theme" | "inherit" | "initial" | "exit" | "hidden" | "color" | "content" | "layout" | "size" | "style" | "drag" | "multiple" | "disabled" | "ref" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | "part" | "inert" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "values" | "value" | "animate" | "height" | "max" | "min" | "name" | "type" | "width" | "alt" | "src" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "autoComplete" | "accept" | "capture" | "checked" | "list" | "maxLength" | "minLength" | "placeholder" | "readOnly" | "required" | "step" | "custom" | "propagate" | "variants" | "transition" | "onUpdate" | "onAnimationComplete" | "onBeforeLayoutMeasure" | "onLayoutMeasure" | "onLayoutAnimationStart" | "onLayoutAnimationComplete" | "onPan" | "onPanStart" | "onPanSessionStart" | "onPanEnd" | "onTap" | "onTapStart" | "onTapCancel" | "whileTap" | "globalTapTarget" | "whileHover" | "onHoverStart" | "onHoverEnd" | "whileFocus" | "whileInView" | "onViewportEnter" | "onViewportLeave" | "viewport" | "onDirectionLock" | "onDragTransitionEnd" | "whileDrag" | "dragDirectionLock" | "dragPropagation" | "dragConstraints" | "dragElastic" | "dragMomentum" | "dragTransition" | "dragControls" | "dragSnapToOrigin" | "dragListener" | "onMeasureDragConstraints" | "_dragX" | "_dragY" | "layoutId" | "layoutDependency" | "layoutScroll" | "layoutRoot" | "layoutAnchor" | "data-framer-portal-id" | "layoutCrossfade" | "ignoreStrict" | "transformTemplate" | "data-framer-appear-id" | "$background" | "$isInterval" | "$
|
|
20
|
+
}, "form" | "slot" | "pattern" | "theme" | "inherit" | "initial" | "exit" | "hidden" | "color" | "content" | "layout" | "size" | "style" | "drag" | "multiple" | "disabled" | "ref" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | "part" | "inert" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "values" | "value" | "animate" | "height" | "max" | "min" | "name" | "type" | "width" | "alt" | "src" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "autoComplete" | "accept" | "capture" | "checked" | "list" | "maxLength" | "minLength" | "placeholder" | "readOnly" | "required" | "step" | "custom" | "propagate" | "variants" | "transition" | "onUpdate" | "onAnimationComplete" | "onBeforeLayoutMeasure" | "onLayoutMeasure" | "onLayoutAnimationStart" | "onLayoutAnimationComplete" | "onPan" | "onPanStart" | "onPanSessionStart" | "onPanEnd" | "onTap" | "onTapStart" | "onTapCancel" | "whileTap" | "globalTapTarget" | "whileHover" | "onHoverStart" | "onHoverEnd" | "whileFocus" | "whileInView" | "onViewportEnter" | "onViewportLeave" | "viewport" | "onDirectionLock" | "onDragTransitionEnd" | "whileDrag" | "dragDirectionLock" | "dragPropagation" | "dragConstraints" | "dragElastic" | "dragMomentum" | "dragTransition" | "dragControls" | "dragSnapToOrigin" | "dragListener" | "onMeasureDragConstraints" | "_dragX" | "_dragY" | "layoutId" | "layoutDependency" | "layoutScroll" | "layoutRoot" | "layoutAnchor" | "data-framer-portal-id" | "layoutCrossfade" | "ignoreStrict" | "transformTemplate" | "data-framer-appear-id" | "$background" | "$isInterval" | "$trackInset"> & Partial<Pick<import("styled-components").FastOmit<import("styled-components").FastOmit<Omit<Omit<import("framer-motion").HTMLMotionProps<"input">, "ref"> & React.RefAttributes<HTMLInputElement>, "ref"> & {
|
|
21
21
|
ref?: ((instance: HTMLInputElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | React.RefObject<HTMLInputElement> | null | undefined;
|
|
22
22
|
}, "form" | "slot" | "pattern" | "hidden" | "color" | "content" | "size" | "multiple" | "disabled" | "ref" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | "part" | "inert" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDragCapture" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "value" | "height" | "max" | "min" | "name" | "type" | "width" | "alt" | "src" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "autoComplete" | "accept" | "capture" | "checked" | "list" | "maxLength" | "minLength" | "placeholder" | "readOnly" | "required" | "step" | keyof import("framer-motion").MotionProps> & Omit<Omit<import("framer-motion").HTMLMotionProps<"input">, "ref"> & React.RefAttributes<HTMLInputElement>, "ref"> & {
|
|
23
23
|
ref?: ((instance: HTMLInputElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | React.RefObject<HTMLInputElement> | null | undefined;
|
|
24
|
-
}, "theme" | "$background" | "$isInterval" | "$
|
|
24
|
+
}, "theme" | "$background" | "$isInterval" | "$trackInset"> & {
|
|
25
25
|
$background?: string;
|
|
26
26
|
$isInterval: boolean;
|
|
27
|
-
$
|
|
27
|
+
$trackInset: number;
|
|
28
28
|
} & {
|
|
29
29
|
theme: import("../color-scheme-provider/ColorSchemeProvider").Theme;
|
|
30
|
-
}, "form" | "slot" | "pattern" | "theme" | "inherit" | "initial" | "exit" | "hidden" | "color" | "content" | "layout" | "size" | "style" | "drag" | "multiple" | "disabled" | "ref" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | "part" | "inert" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "values" | "value" | "animate" | "height" | "max" | "min" | "name" | "type" | "width" | "alt" | "src" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "autoComplete" | "accept" | "capture" | "checked" | "list" | "maxLength" | "minLength" | "placeholder" | "readOnly" | "required" | "step" | "custom" | "propagate" | "variants" | "transition" | "onUpdate" | "onAnimationComplete" | "onBeforeLayoutMeasure" | "onLayoutMeasure" | "onLayoutAnimationStart" | "onLayoutAnimationComplete" | "onPan" | "onPanStart" | "onPanSessionStart" | "onPanEnd" | "onTap" | "onTapStart" | "onTapCancel" | "whileTap" | "globalTapTarget" | "whileHover" | "onHoverStart" | "onHoverEnd" | "whileFocus" | "whileInView" | "onViewportEnter" | "onViewportLeave" | "viewport" | "onDirectionLock" | "onDragTransitionEnd" | "whileDrag" | "dragDirectionLock" | "dragPropagation" | "dragConstraints" | "dragElastic" | "dragMomentum" | "dragTransition" | "dragControls" | "dragSnapToOrigin" | "dragListener" | "onMeasureDragConstraints" | "_dragX" | "_dragY" | "layoutId" | "layoutDependency" | "layoutScroll" | "layoutRoot" | "layoutAnchor" | "data-framer-portal-id" | "layoutCrossfade" | "ignoreStrict" | "transformTemplate" | "data-framer-appear-id" | "$background" | "$isInterval" | "$
|
|
30
|
+
}, "form" | "slot" | "pattern" | "theme" | "inherit" | "initial" | "exit" | "hidden" | "color" | "content" | "layout" | "size" | "style" | "drag" | "multiple" | "disabled" | "ref" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | "part" | "inert" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "values" | "value" | "animate" | "height" | "max" | "min" | "name" | "type" | "width" | "alt" | "src" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "autoComplete" | "accept" | "capture" | "checked" | "list" | "maxLength" | "minLength" | "placeholder" | "readOnly" | "required" | "step" | "custom" | "propagate" | "variants" | "transition" | "onUpdate" | "onAnimationComplete" | "onBeforeLayoutMeasure" | "onLayoutMeasure" | "onLayoutAnimationStart" | "onLayoutAnimationComplete" | "onPan" | "onPanStart" | "onPanSessionStart" | "onPanEnd" | "onTap" | "onTapStart" | "onTapCancel" | "whileTap" | "globalTapTarget" | "whileHover" | "onHoverStart" | "onHoverEnd" | "whileFocus" | "whileInView" | "onViewportEnter" | "onViewportLeave" | "viewport" | "onDirectionLock" | "onDragTransitionEnd" | "whileDrag" | "dragDirectionLock" | "dragPropagation" | "dragConstraints" | "dragElastic" | "dragMomentum" | "dragTransition" | "dragControls" | "dragSnapToOrigin" | "dragListener" | "onMeasureDragConstraints" | "_dragX" | "_dragY" | "layoutId" | "layoutDependency" | "layoutScroll" | "layoutRoot" | "layoutAnchor" | "data-framer-portal-id" | "layoutCrossfade" | "ignoreStrict" | "transformTemplate" | "data-framer-appear-id" | "$background" | "$isInterval" | "$trackInset">>> & string & Omit<import("framer-motion").ForwardRefComponent<HTMLInputElement, import("framer-motion").HTMLMotionProps<"input">>, keyof React.Component<any, {}, any>>;
|
|
31
31
|
export declare const StyledSliderThumb: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref" | "key" | keyof React.HTMLAttributes<HTMLDivElement>> & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
32
32
|
ref?: ((instance: HTMLDivElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | React.RefObject<HTMLDivElement> | null | undefined;
|
|
33
33
|
}, "theme" | "$position" | "$isBigSlider"> & {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chayns-components/core",
|
|
3
|
-
"version": "5.5.
|
|
3
|
+
"version": "5.5.67",
|
|
4
4
|
"description": "A set of beautiful React components for developing your own applications with chayns.",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"browserslist": [
|
|
@@ -93,5 +93,5 @@
|
|
|
93
93
|
"publishConfig": {
|
|
94
94
|
"access": "public"
|
|
95
95
|
},
|
|
96
|
-
"gitHead": "
|
|
96
|
+
"gitHead": "6b2535f41e5426840bb99fd0669c301103723cbf"
|
|
97
97
|
}
|