@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.esm.js
CHANGED
|
@@ -3737,21 +3737,6 @@ const SLIDER_TRACK_VARIANTS = ["hovered"];
|
|
|
3737
3737
|
const { variants: variants$5, withObservedValues: withObservedValues$4 } = pickAriaComponentVariants(
|
|
3738
3738
|
SLIDER_TRACK_VARIANTS
|
|
3739
3739
|
);
|
|
3740
|
-
function findMinMaxIndices(values) {
|
|
3741
|
-
let minIndex = 0;
|
|
3742
|
-
let maxIndex = 0;
|
|
3743
|
-
if (Array.isArray(values)) {
|
|
3744
|
-
for (let i = 1; i < values.length; i++) {
|
|
3745
|
-
if (values[i] < values[minIndex]) {
|
|
3746
|
-
minIndex = i;
|
|
3747
|
-
}
|
|
3748
|
-
if (values[i] > values[maxIndex]) {
|
|
3749
|
-
maxIndex = i;
|
|
3750
|
-
}
|
|
3751
|
-
}
|
|
3752
|
-
}
|
|
3753
|
-
return { minIndex, maxIndex };
|
|
3754
|
-
}
|
|
3755
3740
|
function isMultiValueGuard(value) {
|
|
3756
3741
|
return Array.isArray(value) && value.length > 1;
|
|
3757
3742
|
}
|
|
@@ -3762,10 +3747,10 @@ function BaseSliderTrack(props) {
|
|
|
3762
3747
|
const thumbsLength = context && isMultiValueGuard(context.value) ? context.value.length : 1;
|
|
3763
3748
|
const isMultiValue = thumbsLength > 1;
|
|
3764
3749
|
const { minIndex, maxIndex } = useMemo(() => {
|
|
3765
|
-
if (
|
|
3750
|
+
if (thumbsLength <= 1) {
|
|
3766
3751
|
return { minIndex: 0, maxIndex: 0 };
|
|
3767
3752
|
}
|
|
3768
|
-
return
|
|
3753
|
+
return { minIndex: 0, maxIndex: thumbsLength - 1 };
|
|
3769
3754
|
}, [thumbsLength]);
|
|
3770
3755
|
const thumbs = useMemo(() => {
|
|
3771
3756
|
const thumbNodes = flattenChildren(children);
|