@destyler/tooltip 0.0.1 → 0.0.3
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/component.cjs +10 -22
- package/dist/component.mjs +10 -22
- package/package.json +10 -9
package/dist/component.cjs
CHANGED
|
@@ -36,9 +36,7 @@ const DestylerTooltipArrow = vue.defineComponent({
|
|
|
36
36
|
name: "DestylerTooltipArrow",
|
|
37
37
|
props: destylerTooltipArrowProps,
|
|
38
38
|
render() {
|
|
39
|
-
return vue.h(popper.DestylerPopperArrow, vue.mergeProps(this.$props),
|
|
40
|
-
default: () => this.$slots.default?.()
|
|
41
|
-
});
|
|
39
|
+
return vue.h(popper.DestylerPopperArrow, vue.mergeProps(this.$props), () => this.$slots.default?.());
|
|
42
40
|
}
|
|
43
41
|
});
|
|
44
42
|
|
|
@@ -312,9 +310,7 @@ const DestylerTooltipRoot = vue.defineComponent({
|
|
|
312
310
|
});
|
|
313
311
|
},
|
|
314
312
|
render() {
|
|
315
|
-
return vue.h(popper.DestylerPopperRoot, null,
|
|
316
|
-
default: () => this.$slots.default?.()
|
|
317
|
-
});
|
|
313
|
+
return vue.h(popper.DestylerPopperRoot, null, () => this.$slots.default?.());
|
|
318
314
|
}
|
|
319
315
|
});
|
|
320
316
|
|
|
@@ -441,7 +437,7 @@ const DestylerTooltipContentImpl = vue.defineComponent({
|
|
|
441
437
|
onDismiss: () => {
|
|
442
438
|
this.rootContext.onClose();
|
|
443
439
|
}
|
|
444
|
-
}, vue.h(popper.DestylerPopperContent, vue.mergeProps(this.$attrs, this.popperContentProps, {
|
|
440
|
+
}, () => vue.h(popper.DestylerPopperContent, vue.mergeProps(this.$attrs, this.popperContentProps, {
|
|
445
441
|
"ref": "contentElement",
|
|
446
442
|
"data-state": this.rootContext.stateAttribute.value,
|
|
447
443
|
"style": {
|
|
@@ -451,11 +447,11 @@ const DestylerTooltipContentImpl = vue.defineComponent({
|
|
|
451
447
|
"--destyler_tooltip_trigger_width": "var(--destyler_popper_anchor_width)",
|
|
452
448
|
"--destyler_tooltip_trigger_height": "var(--destyler_popper_anchor_height)"
|
|
453
449
|
}
|
|
454
|
-
}), [
|
|
450
|
+
}), () => [
|
|
455
451
|
this.$slots.default?.(),
|
|
456
452
|
vue.h(visuallyHidden.DestylerVisuallyhidden, {
|
|
457
453
|
role: "tooltip"
|
|
458
|
-
}, this.ariaLabel)
|
|
454
|
+
}, () => this.ariaLabel)
|
|
459
455
|
]));
|
|
460
456
|
}
|
|
461
457
|
});
|
|
@@ -522,9 +518,7 @@ const DestylerTooltipContentHoverable = vue.defineComponent({
|
|
|
522
518
|
return vue.h(DestylerTooltipContentImpl, {
|
|
523
519
|
ref: (el) => this.forwardRef(el),
|
|
524
520
|
...vue.mergeProps(this.$props)
|
|
525
|
-
},
|
|
526
|
-
default: () => this.$slots.default?.()
|
|
527
|
-
});
|
|
521
|
+
}, () => this.$slots.default?.());
|
|
528
522
|
}
|
|
529
523
|
});
|
|
530
524
|
|
|
@@ -548,9 +542,7 @@ const DestylerTooltipContent = vue.defineComponent({
|
|
|
548
542
|
const useVShow = this.rootContext.open.value;
|
|
549
543
|
return useVShow ? vue.h(this.rootContext.disableHoverableContent.value ? DestylerTooltipContentImpl : DestylerTooltipContentHoverable, {
|
|
550
544
|
...this.forwarded
|
|
551
|
-
},
|
|
552
|
-
default: () => this.$slots.default?.()
|
|
553
|
-
}) : null;
|
|
545
|
+
}, () => this.$slots.default?.()) : null;
|
|
554
546
|
}
|
|
555
547
|
});
|
|
556
548
|
|
|
@@ -575,9 +567,7 @@ const DestylerTooltipPortal = vue.defineComponent({
|
|
|
575
567
|
name: "DestylerTooltipPortal",
|
|
576
568
|
props: destylerTooltipPortalProps,
|
|
577
569
|
render() {
|
|
578
|
-
return vue.h(teleport.DestylerTeleport, vue.mergeProps(this.$props),
|
|
579
|
-
default: () => this.$slots.default?.()
|
|
580
|
-
});
|
|
570
|
+
return vue.h(teleport.DestylerTeleport, vue.mergeProps(this.$props), () => this.$slots.default?.());
|
|
581
571
|
}
|
|
582
572
|
});
|
|
583
573
|
|
|
@@ -624,7 +614,7 @@ const DestylerTooltipTrigger = vue.defineComponent({
|
|
|
624
614
|
render() {
|
|
625
615
|
return vue.h(popper.DestylerPopperAnchor, {
|
|
626
616
|
asChild: true
|
|
627
|
-
}, vue.h(primitive.DestylerPrimitive, {
|
|
617
|
+
}, () => vue.h(primitive.DestylerPrimitive, {
|
|
628
618
|
"ref": (el) => this.forwardRef(el),
|
|
629
619
|
"aria-describedby": this.rootContext.open.value ? this.rootContext.contentId : void 0,
|
|
630
620
|
"data-state": this.rootContext.stateAttribute.value,
|
|
@@ -656,9 +646,7 @@ const DestylerTooltipTrigger = vue.defineComponent({
|
|
|
656
646
|
if (!this.rootContext.disableClosingTrigger.value)
|
|
657
647
|
this.rootContext.onClose();
|
|
658
648
|
}
|
|
659
|
-
},
|
|
660
|
-
default: () => this.$slots.default?.()
|
|
661
|
-
}));
|
|
649
|
+
}, () => this.$slots.default?.()));
|
|
662
650
|
}
|
|
663
651
|
});
|
|
664
652
|
|
package/dist/component.mjs
CHANGED
|
@@ -34,9 +34,7 @@ const DestylerTooltipArrow = defineComponent({
|
|
|
34
34
|
name: "DestylerTooltipArrow",
|
|
35
35
|
props: destylerTooltipArrowProps,
|
|
36
36
|
render() {
|
|
37
|
-
return h(DestylerPopperArrow, mergeProps(this.$props),
|
|
38
|
-
default: () => this.$slots.default?.()
|
|
39
|
-
});
|
|
37
|
+
return h(DestylerPopperArrow, mergeProps(this.$props), () => this.$slots.default?.());
|
|
40
38
|
}
|
|
41
39
|
});
|
|
42
40
|
|
|
@@ -310,9 +308,7 @@ const DestylerTooltipRoot = defineComponent({
|
|
|
310
308
|
});
|
|
311
309
|
},
|
|
312
310
|
render() {
|
|
313
|
-
return h(DestylerPopperRoot, null,
|
|
314
|
-
default: () => this.$slots.default?.()
|
|
315
|
-
});
|
|
311
|
+
return h(DestylerPopperRoot, null, () => this.$slots.default?.());
|
|
316
312
|
}
|
|
317
313
|
});
|
|
318
314
|
|
|
@@ -439,7 +435,7 @@ const DestylerTooltipContentImpl = defineComponent({
|
|
|
439
435
|
onDismiss: () => {
|
|
440
436
|
this.rootContext.onClose();
|
|
441
437
|
}
|
|
442
|
-
}, h(DestylerPopperContent, mergeProps(this.$attrs, this.popperContentProps, {
|
|
438
|
+
}, () => h(DestylerPopperContent, mergeProps(this.$attrs, this.popperContentProps, {
|
|
443
439
|
"ref": "contentElement",
|
|
444
440
|
"data-state": this.rootContext.stateAttribute.value,
|
|
445
441
|
"style": {
|
|
@@ -449,11 +445,11 @@ const DestylerTooltipContentImpl = defineComponent({
|
|
|
449
445
|
"--destyler_tooltip_trigger_width": "var(--destyler_popper_anchor_width)",
|
|
450
446
|
"--destyler_tooltip_trigger_height": "var(--destyler_popper_anchor_height)"
|
|
451
447
|
}
|
|
452
|
-
}), [
|
|
448
|
+
}), () => [
|
|
453
449
|
this.$slots.default?.(),
|
|
454
450
|
h(DestylerVisuallyhidden, {
|
|
455
451
|
role: "tooltip"
|
|
456
|
-
}, this.ariaLabel)
|
|
452
|
+
}, () => this.ariaLabel)
|
|
457
453
|
]));
|
|
458
454
|
}
|
|
459
455
|
});
|
|
@@ -520,9 +516,7 @@ const DestylerTooltipContentHoverable = defineComponent({
|
|
|
520
516
|
return h(DestylerTooltipContentImpl, {
|
|
521
517
|
ref: (el) => this.forwardRef(el),
|
|
522
518
|
...mergeProps(this.$props)
|
|
523
|
-
},
|
|
524
|
-
default: () => this.$slots.default?.()
|
|
525
|
-
});
|
|
519
|
+
}, () => this.$slots.default?.());
|
|
526
520
|
}
|
|
527
521
|
});
|
|
528
522
|
|
|
@@ -546,9 +540,7 @@ const DestylerTooltipContent = defineComponent({
|
|
|
546
540
|
const useVShow = this.rootContext.open.value;
|
|
547
541
|
return useVShow ? h(this.rootContext.disableHoverableContent.value ? DestylerTooltipContentImpl : DestylerTooltipContentHoverable, {
|
|
548
542
|
...this.forwarded
|
|
549
|
-
},
|
|
550
|
-
default: () => this.$slots.default?.()
|
|
551
|
-
}) : null;
|
|
543
|
+
}, () => this.$slots.default?.()) : null;
|
|
552
544
|
}
|
|
553
545
|
});
|
|
554
546
|
|
|
@@ -573,9 +565,7 @@ const DestylerTooltipPortal = defineComponent({
|
|
|
573
565
|
name: "DestylerTooltipPortal",
|
|
574
566
|
props: destylerTooltipPortalProps,
|
|
575
567
|
render() {
|
|
576
|
-
return h(DestylerTeleport, mergeProps(this.$props),
|
|
577
|
-
default: () => this.$slots.default?.()
|
|
578
|
-
});
|
|
568
|
+
return h(DestylerTeleport, mergeProps(this.$props), () => this.$slots.default?.());
|
|
579
569
|
}
|
|
580
570
|
});
|
|
581
571
|
|
|
@@ -622,7 +612,7 @@ const DestylerTooltipTrigger = defineComponent({
|
|
|
622
612
|
render() {
|
|
623
613
|
return h(DestylerPopperAnchor, {
|
|
624
614
|
asChild: true
|
|
625
|
-
}, h(DestylerPrimitive, {
|
|
615
|
+
}, () => h(DestylerPrimitive, {
|
|
626
616
|
"ref": (el) => this.forwardRef(el),
|
|
627
617
|
"aria-describedby": this.rootContext.open.value ? this.rootContext.contentId : void 0,
|
|
628
618
|
"data-state": this.rootContext.stateAttribute.value,
|
|
@@ -654,9 +644,7 @@ const DestylerTooltipTrigger = defineComponent({
|
|
|
654
644
|
if (!this.rootContext.disableClosingTrigger.value)
|
|
655
645
|
this.rootContext.onClose();
|
|
656
646
|
}
|
|
657
|
-
},
|
|
658
|
-
default: () => this.$slots.default?.()
|
|
659
|
-
}));
|
|
647
|
+
}, () => this.$slots.default?.()));
|
|
660
648
|
}
|
|
661
649
|
});
|
|
662
650
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@destyler/tooltip",
|
|
3
|
-
"
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "0.0.3",
|
|
4
5
|
"description": "unstyled tooltip component for vue",
|
|
5
6
|
"author": "Elone Hoo <elonehoo@gmail.com>",
|
|
6
7
|
"license": "MIT",
|
|
@@ -33,14 +34,14 @@
|
|
|
33
34
|
"vue": ">=3.3.4"
|
|
34
35
|
},
|
|
35
36
|
"dependencies": {
|
|
36
|
-
"@vueuse/core": "^10.
|
|
37
|
-
"@destyler/composition": "0.0.
|
|
38
|
-
"@destyler/
|
|
39
|
-
"@destyler/primitive": "0.0.
|
|
40
|
-
"@destyler/
|
|
41
|
-
"@destyler/
|
|
42
|
-
"@destyler/
|
|
43
|
-
"@destyler/
|
|
37
|
+
"@vueuse/core": "^10.9.0",
|
|
38
|
+
"@destyler/composition": "0.0.3",
|
|
39
|
+
"@destyler/visually-hidden": "0.0.3",
|
|
40
|
+
"@destyler/primitive": "0.0.3",
|
|
41
|
+
"@destyler/dismissable-layer": "0.0.3",
|
|
42
|
+
"@destyler/popper": "0.0.3",
|
|
43
|
+
"@destyler/shared": "0.0.3",
|
|
44
|
+
"@destyler/teleport": "0.0.3"
|
|
44
45
|
},
|
|
45
46
|
"scripts": {
|
|
46
47
|
"clear": "rimraf ./dist",
|