sit-onyx 1.1.0-dev-20250929141520 → 1.1.0-dev-20250930075345
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm-bundler.js +28 -22
- package/dist/index.esm-bundler.js.map +1 -1
- package/dist/index.js +721 -708
- package/package.json +6 -6
|
@@ -4393,24 +4393,26 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
|
4393
4393
|
() => props.alignment === "auto" ? openAlignment.value : props.alignment
|
|
4394
4394
|
);
|
|
4395
4395
|
const positionAndAlignment = computed(() => {
|
|
4396
|
-
|
|
4397
|
-
if ((toolTipPosition.value === "top" || toolTipPosition.value === "bottom") && alignsWithEdge.value) {
|
|
4396
|
+
if ((toolTipPosition.value === "top" || toolTipPosition.value === "bottom") && props.alignsWithEdge) {
|
|
4398
4397
|
if (alignment.value === "left") {
|
|
4399
|
-
|
|
4398
|
+
return `${toolTipPosition.value} x-start`;
|
|
4400
4399
|
}
|
|
4401
4400
|
if (alignment.value === "right") {
|
|
4402
|
-
|
|
4401
|
+
return `${toolTipPosition.value} x-end`;
|
|
4403
4402
|
}
|
|
4404
4403
|
}
|
|
4405
|
-
|
|
4404
|
+
if (toolTipPosition.value.includes(" ")) {
|
|
4405
|
+
return toolTipPosition.value;
|
|
4406
|
+
}
|
|
4407
|
+
return `${toolTipPosition.value} center`;
|
|
4406
4408
|
});
|
|
4407
4409
|
const createPattern = () => triggerType.value === "hover" ? createTooltip(tooltipOptions.value) : createToggletip(toggletipOptions.value);
|
|
4408
4410
|
const ariaPattern = shallowRef(createPattern());
|
|
4409
4411
|
watch(triggerType, () => ariaPattern.value = createPattern());
|
|
4410
4412
|
const tooltip2 = computed(() => ariaPattern.value?.elements.tooltip);
|
|
4411
4413
|
const triggerElementProps = computed(() => toValue(ariaPattern.value?.elements.trigger));
|
|
4412
|
-
const alignsWithEdge =
|
|
4413
|
-
const fitParent =
|
|
4414
|
+
const alignsWithEdge = toRef(() => props.alignsWithEdge);
|
|
4415
|
+
const fitParent = toRef(() => props.fitParent);
|
|
4414
4416
|
const tooltipWrapperRef = useTemplateRef("tooltipWrapperRefEl");
|
|
4415
4417
|
const tooltipRef = useTemplateRef("tooltipRefEl");
|
|
4416
4418
|
const { openDirection, updateOpenDirection } = useOpenDirection(tooltipWrapperRef, "top");
|
|
@@ -4458,27 +4460,31 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
|
4458
4460
|
onMounted(() => {
|
|
4459
4461
|
handleOpening(isVisible.value);
|
|
4460
4462
|
updateDirections();
|
|
4461
|
-
if (!useragentSupportsAnchorApi.value) updateAnchorPositionPolyfill();
|
|
4462
|
-
});
|
|
4463
|
-
watch(isVisible, async (newVal) => {
|
|
4464
|
-
await nextTick();
|
|
4465
|
-
handleOpening(newVal);
|
|
4466
|
-
updateDirections();
|
|
4467
|
-
if (!useragentSupportsAnchorApi.value) updateAnchorPositionPolyfill();
|
|
4468
4463
|
});
|
|
4469
|
-
|
|
4470
|
-
if (
|
|
4471
|
-
|
|
4472
|
-
updateAnchorPositionPolyfill();
|
|
4464
|
+
onMounted(() => {
|
|
4465
|
+
if (useragentSupportsAnchorApi.value) {
|
|
4466
|
+
return;
|
|
4473
4467
|
}
|
|
4468
|
+
watch(
|
|
4469
|
+
[tooltipWidth, toolTipPosition, alignment, alignsWithEdge, isVisible],
|
|
4470
|
+
() => updateAnchorPositionPolyfill(),
|
|
4471
|
+
{ flush: "post", immediate: true }
|
|
4472
|
+
);
|
|
4474
4473
|
});
|
|
4475
|
-
|
|
4476
|
-
|
|
4474
|
+
watch(
|
|
4475
|
+
isVisible,
|
|
4476
|
+
async (newVal) => {
|
|
4477
|
+
handleOpening(newVal);
|
|
4478
|
+
updateDirections();
|
|
4479
|
+
},
|
|
4480
|
+
{ flush: "post" }
|
|
4481
|
+
);
|
|
4482
|
+
const anchorName = `--anchor-${useId()}`;
|
|
4477
4483
|
const tooltipStyles = computed(() => {
|
|
4478
4484
|
if (useragentSupportsAnchorApi.value) {
|
|
4479
4485
|
return {
|
|
4480
4486
|
width: tooltipWidth.value,
|
|
4481
|
-
"position-anchor": anchorName
|
|
4487
|
+
"position-anchor": anchorName,
|
|
4482
4488
|
"position-area": positionAndAlignment.value
|
|
4483
4489
|
};
|
|
4484
4490
|
}
|
|
@@ -4488,7 +4494,7 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
|
4488
4494
|
top: topPosition.value
|
|
4489
4495
|
};
|
|
4490
4496
|
});
|
|
4491
|
-
const __returned__ = { props, emit, densityClass, t, isVisible, tooltipOptions, toggletipOptions, triggerType, toolTipPosition, alignment, positionAndAlignment, createPattern, ariaPattern, tooltip: tooltip2, triggerElementProps, alignsWithEdge, fitParent, tooltipWrapperRef, tooltipRef, openDirection, updateOpenDirection, openAlignment, updateOpenAlignment, leftPosition, topPosition, updateAnchorPositionPolyfill, useragentSupportsAnchorApi, updateDirections, handleOpening, tooltipClasses, width, tooltipWidth,
|
|
4497
|
+
const __returned__ = { props, emit, densityClass, t, isVisible, tooltipOptions, toggletipOptions, triggerType, toolTipPosition, alignment, positionAndAlignment, createPattern, ariaPattern, tooltip: tooltip2, triggerElementProps, alignsWithEdge, fitParent, tooltipWrapperRef, tooltipRef, openDirection, updateOpenDirection, openAlignment, updateOpenAlignment, leftPosition, topPosition, updateAnchorPositionPolyfill, useragentSupportsAnchorApi, updateDirections, handleOpening, tooltipClasses, width, tooltipWidth, anchorName, tooltipStyles, OnyxIcon };
|
|
4492
4498
|
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
|
4493
4499
|
return __returned__;
|
|
4494
4500
|
}
|