@plasmicpkgs/react-aria 0.0.90 → 0.0.91
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.tsbuildinfo +1 -1
- package/dist/react-aria.esm.js +2 -17
- package/dist/react-aria.esm.js.map +1 -1
- package/dist/react-aria.js +2 -17
- package/dist/react-aria.js.map +1 -1
- package/package.json +2 -2
- package/skinny/registerSliderTrack.cjs.js +2 -17
- package/skinny/registerSliderTrack.cjs.js.map +1 -1
- package/skinny/registerSliderTrack.esm.js +2 -17
- package/skinny/registerSliderTrack.esm.js.map +1 -1
package/dist/react-aria.js
CHANGED
|
@@ -3745,21 +3745,6 @@ const SLIDER_TRACK_VARIANTS = ["hovered"];
|
|
|
3745
3745
|
const { variants: variants$5, withObservedValues: withObservedValues$4 } = pickAriaComponentVariants(
|
|
3746
3746
|
SLIDER_TRACK_VARIANTS
|
|
3747
3747
|
);
|
|
3748
|
-
function findMinMaxIndices(values) {
|
|
3749
|
-
let minIndex = 0;
|
|
3750
|
-
let maxIndex = 0;
|
|
3751
|
-
if (Array.isArray(values)) {
|
|
3752
|
-
for (let i = 1; i < values.length; i++) {
|
|
3753
|
-
if (values[i] < values[minIndex]) {
|
|
3754
|
-
minIndex = i;
|
|
3755
|
-
}
|
|
3756
|
-
if (values[i] > values[maxIndex]) {
|
|
3757
|
-
maxIndex = i;
|
|
3758
|
-
}
|
|
3759
|
-
}
|
|
3760
|
-
}
|
|
3761
|
-
return { minIndex, maxIndex };
|
|
3762
|
-
}
|
|
3763
3748
|
function isMultiValueGuard(value) {
|
|
3764
3749
|
return Array.isArray(value) && value.length > 1;
|
|
3765
3750
|
}
|
|
@@ -3770,10 +3755,10 @@ function BaseSliderTrack(props) {
|
|
|
3770
3755
|
const thumbsLength = context && isMultiValueGuard(context.value) ? context.value.length : 1;
|
|
3771
3756
|
const isMultiValue = thumbsLength > 1;
|
|
3772
3757
|
const { minIndex, maxIndex } = React.useMemo(() => {
|
|
3773
|
-
if (
|
|
3758
|
+
if (thumbsLength <= 1) {
|
|
3774
3759
|
return { minIndex: 0, maxIndex: 0 };
|
|
3775
3760
|
}
|
|
3776
|
-
return
|
|
3761
|
+
return { minIndex: 0, maxIndex: thumbsLength - 1 };
|
|
3777
3762
|
}, [thumbsLength]);
|
|
3778
3763
|
const thumbs = React.useMemo(() => {
|
|
3779
3764
|
const thumbNodes = flattenChildren__default.default(children);
|