sit-onyx 1.6.0-dev-20260112070348 → 1.6.0-dev-20260112084701
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.
|
@@ -491,15 +491,14 @@ const useForwardProps = (props, target) => {
|
|
|
491
491
|
};
|
|
492
492
|
const createBuilder = (builder) => builder;
|
|
493
493
|
function createElRef() {
|
|
494
|
-
const elementRef = shallowRef();
|
|
494
|
+
const elementRef = shallowRef(null);
|
|
495
495
|
return computed({
|
|
496
|
-
set: (
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
} else if (element != null && "$el" in element) {
|
|
496
|
+
set: (ref2) => {
|
|
497
|
+
const element = Array.isArray(ref2) ? ref2.at(0) : ref2;
|
|
498
|
+
if (element != null && "$el" in element) {
|
|
500
499
|
elementRef.value = element.$el;
|
|
501
500
|
} else {
|
|
502
|
-
elementRef.value = element;
|
|
501
|
+
elementRef.value = element ?? null;
|
|
503
502
|
}
|
|
504
503
|
},
|
|
505
504
|
get: () => elementRef.value
|
|
@@ -1476,7 +1475,7 @@ const _unstableCreateSlider = createBuilder(
|
|
|
1476
1475
|
const draggingThumbIndex = ref();
|
|
1477
1476
|
watch(draggingThumbIndex, (newThumbIndex) => {
|
|
1478
1477
|
if (newThumbIndex == void 0) return;
|
|
1479
|
-
Array.from(sliderRef.value
|
|
1478
|
+
Array.from(sliderRef.value?.querySelectorAll('[role="slider"]') ?? []).at(newThumbIndex)?.focus();
|
|
1480
1479
|
});
|
|
1481
1480
|
const shiftStep = computed(() => {
|
|
1482
1481
|
const shiftStep2 = toValue(options.shiftStep);
|
|
@@ -1591,8 +1590,8 @@ const _unstableCreateSlider = createBuilder(
|
|
|
1591
1590
|
disabled: computed(() => draggingThumbIndex.value == void 0)
|
|
1592
1591
|
});
|
|
1593
1592
|
const getValueFromCoordinates = (x) => {
|
|
1594
|
-
const rect = sliderRef.value
|
|
1595
|
-
if (rect.width <= 0) return;
|
|
1593
|
+
const rect = sliderRef.value?.getBoundingClientRect();
|
|
1594
|
+
if (!rect || rect.width <= 0) return;
|
|
1596
1595
|
const percent = MathUtils.clamp((x - rect.left) / rect.width, 0, 1);
|
|
1597
1596
|
return MathUtils.percentToValue(percent, min.value, max.value);
|
|
1598
1597
|
};
|