@mekari/pixel3-tooltip 0.0.7-dev.2 → 0.0.7-dev.4

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.
@@ -8,6 +8,7 @@ import {
8
8
  // src/tooltip.tsx
9
9
  import { Fragment as _Fragment, createVNode as _createVNode, createTextVNode as _createTextVNode } from "vue";
10
10
  import { defineComponent, cloneVNode, Teleport } from "vue";
11
+ import { isPixelTagComponent } from "@mekari/pixel3-utils";
11
12
  var MpTooltip = defineComponent({
12
13
  name: "MpTooltip",
13
14
  inheritAttrs: false,
@@ -23,7 +24,10 @@ var MpTooltip = defineComponent({
23
24
  isOpen
24
25
  } = useTooltip(props, emit, slots);
25
26
  return () => {
26
- const triggerNode = cloneVNode(slots.default()[0], triggerAttrs.value);
27
+ const children = slots.default()[0];
28
+ const isPixelTag = isPixelTagComponent(children.type.name);
29
+ const cloned = cloneVNode(children, isPixelTag ? {} : triggerAttrs.value);
30
+ const triggerNode = isPixelTag ? _createVNode("div", triggerAttrs.value, [_createTextVNode(" "), cloned, _createTextVNode(" ")]) : cloned;
27
31
  const contentNode = _createVNode("div", contentAttrs.value, [_createTextVNode(" "), slots.label ? slots.label() : props.label, _createTextVNode(" ")]);
28
32
  const renderContentNode = props.usePortal ? _createVNode(Teleport, {
29
33
  "to": "body"
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { MpTooltip } from './tooltip.mjs';
2
2
  export { PixelTooltipDirective } from './v-tooltip.mjs';
3
3
  import 'vue/jsx-runtime';
4
- import '@floating-ui/dom';
4
+ import '@floating-ui/vue';
5
5
  import 'vue';
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { MpTooltip } from './tooltip.js';
2
2
  export { PixelTooltipDirective } from './v-tooltip.js';
3
3
  import 'vue/jsx-runtime';
4
- import '@floating-ui/dom';
4
+ import '@floating-ui/vue';
5
5
  import 'vue';
package/dist/index.js CHANGED
@@ -207,6 +207,7 @@ var singletonTooltipProps = {
207
207
  };
208
208
 
209
209
  // src/tooltip.tsx
210
+ var import_pixel3_utils2 = require("@mekari/pixel3-utils");
210
211
  var MpTooltip = (0, import_vue4.defineComponent)({
211
212
  name: "MpTooltip",
212
213
  inheritAttrs: false,
@@ -222,7 +223,10 @@ var MpTooltip = (0, import_vue4.defineComponent)({
222
223
  isOpen
223
224
  } = useTooltip(props, emit, slots);
224
225
  return () => {
225
- const triggerNode2 = (0, import_vue4.cloneVNode)(slots.default()[0], triggerAttrs.value);
226
+ const children = slots.default()[0];
227
+ const isPixelTag = (0, import_pixel3_utils2.isPixelTagComponent)(children.type.name);
228
+ const cloned = (0, import_vue4.cloneVNode)(children, isPixelTag ? {} : triggerAttrs.value);
229
+ const triggerNode2 = isPixelTag ? (0, import_vue3.createVNode)("div", triggerAttrs.value, [(0, import_vue3.createTextVNode)(" "), cloned, (0, import_vue3.createTextVNode)(" ")]) : cloned;
226
230
  const contentNode = (0, import_vue3.createVNode)("div", contentAttrs.value, [(0, import_vue3.createTextVNode)(" "), slots.label ? slots.label() : props.label, (0, import_vue3.createTextVNode)(" ")]);
227
231
  const renderContentNode = props.usePortal ? (0, import_vue3.createVNode)(import_vue4.Teleport, {
228
232
  "to": "body"
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  MpTooltip
3
- } from "./chunk-BFYYWBFD.mjs";
3
+ } from "./chunk-BZI43ZJX.mjs";
4
4
  import {
5
5
  PixelTooltipDirective
6
6
  } from "./chunk-RY5UNIIN.mjs";
@@ -1 +1 @@
1
- {"inputs":{"src/modules/tooltip.hooks.ts":{"bytes":3115,"imports":[{"path":"@floating-ui/vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-utils","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/modules/tooltip.props.ts":{"bytes":1707,"imports":[],"format":"esm"},"src/tooltip.tsx":{"bytes":1278,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"src/modules/tooltip.hooks.ts","kind":"import-statement","original":"./modules/tooltip.hooks"},{"path":"src/modules/tooltip.props.ts","kind":"import-statement","original":"./modules/tooltip.props"}],"format":"esm"},"src/singleton-tooltip.tsx":{"bytes":781,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"src/modules/tooltip.props.ts","kind":"import-statement","original":"./modules/tooltip.props"},{"path":"src/modules/tooltip.hooks.ts","kind":"import-statement","original":"./modules/tooltip.hooks"}],"format":"esm"},"src/v-tooltip.ts":{"bytes":4420,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"src/singleton-tooltip.tsx","kind":"import-statement","original":"./singleton-tooltip"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":176,"imports":[{"path":"src/tooltip.tsx","kind":"import-statement","original":"./tooltip"},{"path":"src/v-tooltip.ts","kind":"import-statement","original":"./v-tooltip"}],"format":"esm"}},"outputs":{"dist/index.js":{"imports":[{"path":"vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"@floating-ui/vue","kind":"require-call","external":true},{"path":"@mekari/pixel3-utils","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":177},"src/tooltip.tsx":{"bytesInOutput":1141},"src/modules/tooltip.hooks.ts":{"bytesInOutput":3431},"src/modules/tooltip.props.ts":{"bytesInOutput":679},"src/v-tooltip.ts":{"bytesInOutput":3695},"src/singleton-tooltip.tsx":{"bytesInOutput":566}},"bytes":10901},"dist/singleton-tooltip.js":{"imports":[{"path":"vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"@floating-ui/vue","kind":"require-call","external":true},{"path":"@mekari/pixel3-utils","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/singleton-tooltip.tsx","inputs":{"src/singleton-tooltip.tsx":{"bytesInOutput":749},"src/modules/tooltip.props.ts":{"bytesInOutput":219},"src/modules/tooltip.hooks.ts":{"bytesInOutput":1096}},"bytes":3191},"dist/tooltip.js":{"imports":[{"path":"vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"@floating-ui/vue","kind":"require-call","external":true},{"path":"@mekari/pixel3-utils","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/tooltip.tsx","inputs":{"src/tooltip.tsx":{"bytesInOutput":1274},"src/modules/tooltip.hooks.ts":{"bytesInOutput":2498},"src/modules/tooltip.props.ts":{"bytesInOutput":460}},"bytes":5330},"dist/v-tooltip.js":{"imports":[{"path":"vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"@floating-ui/vue","kind":"require-call","external":true},{"path":"@mekari/pixel3-utils","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/v-tooltip.ts","inputs":{"src/v-tooltip.ts":{"bytesInOutput":3860},"src/singleton-tooltip.tsx":{"bytesInOutput":566},"src/modules/tooltip.props.ts":{"bytesInOutput":219},"src/modules/tooltip.hooks.ts":{"bytesInOutput":1125}},"bytes":6942},"dist/modules/tooltip.hooks.js":{"imports":[{"path":"@floating-ui/vue","kind":"require-call","external":true},{"path":"@mekari/pixel3-utils","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/modules/tooltip.hooks.ts","inputs":{"src/modules/tooltip.hooks.ts":{"bytesInOutput":3590}},"bytes":4639},"dist/modules/tooltip.props.js":{"imports":[],"exports":[],"entryPoint":"src/modules/tooltip.props.ts","inputs":{"src/modules/tooltip.props.ts":{"bytesInOutput":966}},"bytes":1945}}}
1
+ {"inputs":{"src/modules/tooltip.hooks.ts":{"bytes":3115,"imports":[{"path":"@floating-ui/vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-utils","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/modules/tooltip.props.ts":{"bytes":1707,"imports":[],"format":"esm"},"src/tooltip.tsx":{"bytes":1632,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"src/modules/tooltip.hooks.ts","kind":"import-statement","original":"./modules/tooltip.hooks"},{"path":"src/modules/tooltip.props.ts","kind":"import-statement","original":"./modules/tooltip.props"},{"path":"@mekari/pixel3-utils","kind":"import-statement","external":true}],"format":"esm"},"src/singleton-tooltip.tsx":{"bytes":781,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"src/modules/tooltip.props.ts","kind":"import-statement","original":"./modules/tooltip.props"},{"path":"src/modules/tooltip.hooks.ts","kind":"import-statement","original":"./modules/tooltip.hooks"}],"format":"esm"},"src/v-tooltip.ts":{"bytes":4420,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"src/singleton-tooltip.tsx","kind":"import-statement","original":"./singleton-tooltip"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":176,"imports":[{"path":"src/tooltip.tsx","kind":"import-statement","original":"./tooltip"},{"path":"src/v-tooltip.ts","kind":"import-statement","original":"./v-tooltip"}],"format":"esm"}},"outputs":{"dist/index.js":{"imports":[{"path":"vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"@floating-ui/vue","kind":"require-call","external":true},{"path":"@mekari/pixel3-utils","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"require-call","external":true},{"path":"@mekari/pixel3-utils","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":177},"src/tooltip.tsx":{"bytesInOutput":1532},"src/modules/tooltip.hooks.ts":{"bytesInOutput":3431},"src/modules/tooltip.props.ts":{"bytesInOutput":679},"src/v-tooltip.ts":{"bytesInOutput":3695},"src/singleton-tooltip.tsx":{"bytesInOutput":566}},"bytes":11292},"dist/singleton-tooltip.js":{"imports":[{"path":"vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"@floating-ui/vue","kind":"require-call","external":true},{"path":"@mekari/pixel3-utils","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/singleton-tooltip.tsx","inputs":{"src/singleton-tooltip.tsx":{"bytesInOutput":749},"src/modules/tooltip.props.ts":{"bytesInOutput":219},"src/modules/tooltip.hooks.ts":{"bytesInOutput":1096}},"bytes":3191},"dist/tooltip.js":{"imports":[{"path":"vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"@floating-ui/vue","kind":"require-call","external":true},{"path":"@mekari/pixel3-utils","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"require-call","external":true},{"path":"@mekari/pixel3-utils","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/tooltip.tsx","inputs":{"src/tooltip.tsx":{"bytesInOutput":1665},"src/modules/tooltip.hooks.ts":{"bytesInOutput":2498},"src/modules/tooltip.props.ts":{"bytesInOutput":460}},"bytes":5721},"dist/v-tooltip.js":{"imports":[{"path":"vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"@floating-ui/vue","kind":"require-call","external":true},{"path":"@mekari/pixel3-utils","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/v-tooltip.ts","inputs":{"src/v-tooltip.ts":{"bytesInOutput":3860},"src/singleton-tooltip.tsx":{"bytesInOutput":566},"src/modules/tooltip.props.ts":{"bytesInOutput":219},"src/modules/tooltip.hooks.ts":{"bytesInOutput":1125}},"bytes":6942},"dist/modules/tooltip.hooks.js":{"imports":[{"path":"@floating-ui/vue","kind":"require-call","external":true},{"path":"@mekari/pixel3-utils","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/modules/tooltip.hooks.ts","inputs":{"src/modules/tooltip.hooks.ts":{"bytesInOutput":3590}},"bytes":4639},"dist/modules/tooltip.props.js":{"imports":[],"exports":[],"entryPoint":"src/modules/tooltip.props.ts","inputs":{"src/modules/tooltip.props.ts":{"bytesInOutput":966}},"bytes":1945}}}
@@ -1 +1 @@
1
- {"inputs":{"src/modules/tooltip.hooks.ts":{"bytes":3115,"imports":[{"path":"@floating-ui/vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-utils","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/modules/tooltip.props.ts":{"bytes":1707,"imports":[],"format":"esm"},"src/tooltip.tsx":{"bytes":1278,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"src/modules/tooltip.hooks.ts","kind":"import-statement","original":"./modules/tooltip.hooks"},{"path":"src/modules/tooltip.props.ts","kind":"import-statement","original":"./modules/tooltip.props"}],"format":"esm"},"src/singleton-tooltip.tsx":{"bytes":781,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"src/modules/tooltip.props.ts","kind":"import-statement","original":"./modules/tooltip.props"},{"path":"src/modules/tooltip.hooks.ts","kind":"import-statement","original":"./modules/tooltip.hooks"}],"format":"esm"},"src/v-tooltip.ts":{"bytes":4420,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"src/singleton-tooltip.tsx","kind":"import-statement","original":"./singleton-tooltip"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":176,"imports":[{"path":"src/tooltip.tsx","kind":"import-statement","original":"./tooltip"},{"path":"src/v-tooltip.ts","kind":"import-statement","original":"./v-tooltip"}],"format":"esm"}},"outputs":{"dist/index.mjs":{"imports":[{"path":"dist/chunk-BFYYWBFD.mjs","kind":"import-statement"},{"path":"dist/chunk-RY5UNIIN.mjs","kind":"import-statement"},{"path":"dist/chunk-PZOZJSEB.mjs","kind":"import-statement"},{"path":"dist/chunk-2KZ7KSYS.mjs","kind":"import-statement"},{"path":"dist/chunk-ENW3A4UE.mjs","kind":"import-statement"},{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"}],"exports":["MpTooltip","PixelTooltipDirective"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":0}},"bytes":289},"dist/singleton-tooltip.mjs":{"imports":[{"path":"dist/chunk-PZOZJSEB.mjs","kind":"import-statement"},{"path":"dist/chunk-2KZ7KSYS.mjs","kind":"import-statement"},{"path":"dist/chunk-ENW3A4UE.mjs","kind":"import-statement"},{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"}],"exports":["MpSingletonTooltip"],"entryPoint":"src/singleton-tooltip.tsx","inputs":{},"bytes":187},"dist/tooltip.mjs":{"imports":[{"path":"dist/chunk-BFYYWBFD.mjs","kind":"import-statement"},{"path":"dist/chunk-2KZ7KSYS.mjs","kind":"import-statement"},{"path":"dist/chunk-ENW3A4UE.mjs","kind":"import-statement"},{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"}],"exports":["MpTooltip"],"entryPoint":"src/tooltip.tsx","inputs":{},"bytes":169},"dist/chunk-BFYYWBFD.mjs":{"imports":[{"path":"dist/chunk-2KZ7KSYS.mjs","kind":"import-statement"},{"path":"dist/chunk-ENW3A4UE.mjs","kind":"import-statement"},{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true}],"exports":["MpTooltip"],"inputs":{"src/tooltip.tsx":{"bytesInOutput":1074}},"bytes":1227},"dist/v-tooltip.mjs":{"imports":[{"path":"dist/chunk-RY5UNIIN.mjs","kind":"import-statement"},{"path":"dist/chunk-PZOZJSEB.mjs","kind":"import-statement"},{"path":"dist/chunk-2KZ7KSYS.mjs","kind":"import-statement"},{"path":"dist/chunk-ENW3A4UE.mjs","kind":"import-statement"},{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"}],"exports":["PixelTooltipDirective"],"entryPoint":"src/v-tooltip.ts","inputs":{},"bytes":224},"dist/chunk-RY5UNIIN.mjs":{"imports":[{"path":"dist/chunk-PZOZJSEB.mjs","kind":"import-statement"},{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"},{"path":"vue","kind":"import-statement","external":true}],"exports":["PixelTooltipDirective"],"inputs":{"src/v-tooltip.ts":{"bytesInOutput":3600}},"bytes":3768},"dist/chunk-PZOZJSEB.mjs":{"imports":[{"path":"dist/chunk-2KZ7KSYS.mjs","kind":"import-statement"},{"path":"dist/chunk-ENW3A4UE.mjs","kind":"import-statement"},{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true}],"exports":["MpSingletonTooltip"],"inputs":{"src/singleton-tooltip.tsx":{"bytesInOutput":560}},"bytes":750},"dist/modules/tooltip.hooks.mjs":{"imports":[{"path":"dist/chunk-2KZ7KSYS.mjs","kind":"import-statement"},{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"}],"exports":["useSingletonTooltip","useTooltip"],"entryPoint":"src/modules/tooltip.hooks.ts","inputs":{},"bytes":157},"dist/chunk-2KZ7KSYS.mjs":{"imports":[{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"},{"path":"@floating-ui/vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-utils","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"import-statement","external":true}],"exports":["useSingletonTooltip","useTooltip"],"inputs":{"src/modules/tooltip.hooks.ts":{"bytesInOutput":2989}},"bytes":3120},"dist/modules/tooltip.props.mjs":{"imports":[{"path":"dist/chunk-ENW3A4UE.mjs","kind":"import-statement"},{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"}],"exports":["singletonTooltipProps","tooltipEmits","tooltipProps"],"entryPoint":"src/modules/tooltip.props.ts","inputs":{},"bytes":197},"dist/chunk-ENW3A4UE.mjs":{"imports":[],"exports":["singletonTooltipProps","tooltipEmits","tooltipProps"],"inputs":{"src/modules/tooltip.props.ts":{"bytesInOutput":717}},"bytes":818},"dist/chunk-QZ7VFGWC.mjs":{"imports":[],"exports":["__name"],"inputs":{},"bytes":151}}}
1
+ {"inputs":{"src/modules/tooltip.hooks.ts":{"bytes":3115,"imports":[{"path":"@floating-ui/vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-utils","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/modules/tooltip.props.ts":{"bytes":1707,"imports":[],"format":"esm"},"src/tooltip.tsx":{"bytes":1632,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"src/modules/tooltip.hooks.ts","kind":"import-statement","original":"./modules/tooltip.hooks"},{"path":"src/modules/tooltip.props.ts","kind":"import-statement","original":"./modules/tooltip.props"},{"path":"@mekari/pixel3-utils","kind":"import-statement","external":true}],"format":"esm"},"src/singleton-tooltip.tsx":{"bytes":781,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"src/modules/tooltip.props.ts","kind":"import-statement","original":"./modules/tooltip.props"},{"path":"src/modules/tooltip.hooks.ts","kind":"import-statement","original":"./modules/tooltip.hooks"}],"format":"esm"},"src/v-tooltip.ts":{"bytes":4420,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"src/singleton-tooltip.tsx","kind":"import-statement","original":"./singleton-tooltip"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":176,"imports":[{"path":"src/tooltip.tsx","kind":"import-statement","original":"./tooltip"},{"path":"src/v-tooltip.ts","kind":"import-statement","original":"./v-tooltip"}],"format":"esm"}},"outputs":{"dist/index.mjs":{"imports":[{"path":"dist/chunk-BZI43ZJX.mjs","kind":"import-statement"},{"path":"dist/chunk-RY5UNIIN.mjs","kind":"import-statement"},{"path":"dist/chunk-PZOZJSEB.mjs","kind":"import-statement"},{"path":"dist/chunk-2KZ7KSYS.mjs","kind":"import-statement"},{"path":"dist/chunk-ENW3A4UE.mjs","kind":"import-statement"},{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"}],"exports":["MpTooltip","PixelTooltipDirective"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":0}},"bytes":289},"dist/singleton-tooltip.mjs":{"imports":[{"path":"dist/chunk-PZOZJSEB.mjs","kind":"import-statement"},{"path":"dist/chunk-2KZ7KSYS.mjs","kind":"import-statement"},{"path":"dist/chunk-ENW3A4UE.mjs","kind":"import-statement"},{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"}],"exports":["MpSingletonTooltip"],"entryPoint":"src/singleton-tooltip.tsx","inputs":{},"bytes":187},"dist/tooltip.mjs":{"imports":[{"path":"dist/chunk-BZI43ZJX.mjs","kind":"import-statement"},{"path":"dist/chunk-2KZ7KSYS.mjs","kind":"import-statement"},{"path":"dist/chunk-ENW3A4UE.mjs","kind":"import-statement"},{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"}],"exports":["MpTooltip"],"entryPoint":"src/tooltip.tsx","inputs":{},"bytes":169},"dist/chunk-BZI43ZJX.mjs":{"imports":[{"path":"dist/chunk-2KZ7KSYS.mjs","kind":"import-statement"},{"path":"dist/chunk-ENW3A4UE.mjs","kind":"import-statement"},{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-utils","kind":"import-statement","external":true}],"exports":["MpTooltip"],"inputs":{"src/tooltip.tsx":{"bytesInOutput":1391}},"bytes":1544},"dist/v-tooltip.mjs":{"imports":[{"path":"dist/chunk-RY5UNIIN.mjs","kind":"import-statement"},{"path":"dist/chunk-PZOZJSEB.mjs","kind":"import-statement"},{"path":"dist/chunk-2KZ7KSYS.mjs","kind":"import-statement"},{"path":"dist/chunk-ENW3A4UE.mjs","kind":"import-statement"},{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"}],"exports":["PixelTooltipDirective"],"entryPoint":"src/v-tooltip.ts","inputs":{},"bytes":224},"dist/chunk-RY5UNIIN.mjs":{"imports":[{"path":"dist/chunk-PZOZJSEB.mjs","kind":"import-statement"},{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"},{"path":"vue","kind":"import-statement","external":true}],"exports":["PixelTooltipDirective"],"inputs":{"src/v-tooltip.ts":{"bytesInOutput":3600}},"bytes":3768},"dist/chunk-PZOZJSEB.mjs":{"imports":[{"path":"dist/chunk-2KZ7KSYS.mjs","kind":"import-statement"},{"path":"dist/chunk-ENW3A4UE.mjs","kind":"import-statement"},{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true}],"exports":["MpSingletonTooltip"],"inputs":{"src/singleton-tooltip.tsx":{"bytesInOutput":560}},"bytes":750},"dist/modules/tooltip.hooks.mjs":{"imports":[{"path":"dist/chunk-2KZ7KSYS.mjs","kind":"import-statement"},{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"}],"exports":["useSingletonTooltip","useTooltip"],"entryPoint":"src/modules/tooltip.hooks.ts","inputs":{},"bytes":157},"dist/chunk-2KZ7KSYS.mjs":{"imports":[{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"},{"path":"@floating-ui/vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-utils","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"import-statement","external":true}],"exports":["useSingletonTooltip","useTooltip"],"inputs":{"src/modules/tooltip.hooks.ts":{"bytesInOutput":2989}},"bytes":3120},"dist/modules/tooltip.props.mjs":{"imports":[{"path":"dist/chunk-ENW3A4UE.mjs","kind":"import-statement"},{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"}],"exports":["singletonTooltipProps","tooltipEmits","tooltipProps"],"entryPoint":"src/modules/tooltip.props.ts","inputs":{},"bytes":197},"dist/chunk-ENW3A4UE.mjs":{"imports":[],"exports":["singletonTooltipProps","tooltipEmits","tooltipProps"],"inputs":{"src/modules/tooltip.props.ts":{"bytesInOutput":717}},"bytes":818},"dist/chunk-QZ7VFGWC.mjs":{"imports":[],"exports":["__name"],"inputs":{},"bytes":151}}}
@@ -1,8 +1,7 @@
1
1
  import * as vue_jsx_runtime from 'vue/jsx-runtime';
2
- import * as _floating_ui_dom from '@floating-ui/dom';
2
+ import * as _floating_ui_vue from '@floating-ui/vue';
3
3
  import * as vue from 'vue';
4
4
  import { MaybeElement } from './modules/tooltip.props.mjs';
5
- import '@floating-ui/vue';
6
5
 
7
6
  declare const MpSingletonTooltip: vue.DefineComponent<{
8
7
  triggerNode: {
@@ -13,7 +12,7 @@ declare const MpSingletonTooltip: vue.DefineComponent<{
13
12
  type: vue.PropType<string>;
14
13
  };
15
14
  placement: {
16
- type: vue.PropType<_floating_ui_dom.Placement>;
15
+ type: vue.PropType<_floating_ui_vue.Placement>;
17
16
  default: string;
18
17
  };
19
18
  isOpen: {
@@ -28,14 +27,14 @@ declare const MpSingletonTooltip: vue.DefineComponent<{
28
27
  type: vue.PropType<string>;
29
28
  };
30
29
  placement: {
31
- type: vue.PropType<_floating_ui_dom.Placement>;
30
+ type: vue.PropType<_floating_ui_vue.Placement>;
32
31
  default: string;
33
32
  };
34
33
  isOpen: {
35
34
  type: vue.PropType<boolean>;
36
35
  };
37
36
  }>>, {
38
- placement: _floating_ui_dom.Placement;
37
+ placement: _floating_ui_vue.Placement;
39
38
  triggerNode: Readonly<vue.Ref<MaybeElement>>;
40
39
  }, {}>;
41
40
 
@@ -1,8 +1,7 @@
1
1
  import * as vue_jsx_runtime from 'vue/jsx-runtime';
2
- import * as _floating_ui_dom from '@floating-ui/dom';
2
+ import * as _floating_ui_vue from '@floating-ui/vue';
3
3
  import * as vue from 'vue';
4
4
  import { MaybeElement } from './modules/tooltip.props.js';
5
- import '@floating-ui/vue';
6
5
 
7
6
  declare const MpSingletonTooltip: vue.DefineComponent<{
8
7
  triggerNode: {
@@ -13,7 +12,7 @@ declare const MpSingletonTooltip: vue.DefineComponent<{
13
12
  type: vue.PropType<string>;
14
13
  };
15
14
  placement: {
16
- type: vue.PropType<_floating_ui_dom.Placement>;
15
+ type: vue.PropType<_floating_ui_vue.Placement>;
17
16
  default: string;
18
17
  };
19
18
  isOpen: {
@@ -28,14 +27,14 @@ declare const MpSingletonTooltip: vue.DefineComponent<{
28
27
  type: vue.PropType<string>;
29
28
  };
30
29
  placement: {
31
- type: vue.PropType<_floating_ui_dom.Placement>;
30
+ type: vue.PropType<_floating_ui_vue.Placement>;
32
31
  default: string;
33
32
  };
34
33
  isOpen: {
35
34
  type: vue.PropType<boolean>;
36
35
  };
37
36
  }>>, {
38
- placement: _floating_ui_dom.Placement;
37
+ placement: _floating_ui_vue.Placement;
39
38
  triggerNode: Readonly<vue.Ref<MaybeElement>>;
40
39
  }, {}>;
41
40
 
@@ -1,5 +1,5 @@
1
1
  import * as vue_jsx_runtime from 'vue/jsx-runtime';
2
- import * as _floating_ui_dom from '@floating-ui/dom';
2
+ import * as _floating_ui_vue from '@floating-ui/vue';
3
3
  import * as vue from 'vue';
4
4
 
5
5
  declare const MpTooltip: vue.DefineComponent<{
@@ -7,7 +7,7 @@ declare const MpTooltip: vue.DefineComponent<{
7
7
  type: vue.PropType<string>;
8
8
  };
9
9
  placement: {
10
- type: vue.PropType<_floating_ui_dom.Placement>;
10
+ type: vue.PropType<_floating_ui_vue.Placement>;
11
11
  default: string;
12
12
  };
13
13
  id: {
@@ -42,7 +42,7 @@ declare const MpTooltip: vue.DefineComponent<{
42
42
  type: vue.PropType<string>;
43
43
  };
44
44
  placement: {
45
- type: vue.PropType<_floating_ui_dom.Placement>;
45
+ type: vue.PropType<_floating_ui_vue.Placement>;
46
46
  default: string;
47
47
  };
48
48
  id: {
@@ -76,7 +76,7 @@ declare const MpTooltip: vue.DefineComponent<{
76
76
  onOpen?: ((...args: any[]) => any) | undefined;
77
77
  onClose?: ((...args: any[]) => any) | undefined;
78
78
  }, {
79
- placement: _floating_ui_dom.Placement;
79
+ placement: _floating_ui_vue.Placement;
80
80
  showDelay: number;
81
81
  hideDelay: number;
82
82
  isKeepAlive: boolean;
package/dist/tooltip.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as vue_jsx_runtime from 'vue/jsx-runtime';
2
- import * as _floating_ui_dom from '@floating-ui/dom';
2
+ import * as _floating_ui_vue from '@floating-ui/vue';
3
3
  import * as vue from 'vue';
4
4
 
5
5
  declare const MpTooltip: vue.DefineComponent<{
@@ -7,7 +7,7 @@ declare const MpTooltip: vue.DefineComponent<{
7
7
  type: vue.PropType<string>;
8
8
  };
9
9
  placement: {
10
- type: vue.PropType<_floating_ui_dom.Placement>;
10
+ type: vue.PropType<_floating_ui_vue.Placement>;
11
11
  default: string;
12
12
  };
13
13
  id: {
@@ -42,7 +42,7 @@ declare const MpTooltip: vue.DefineComponent<{
42
42
  type: vue.PropType<string>;
43
43
  };
44
44
  placement: {
45
- type: vue.PropType<_floating_ui_dom.Placement>;
45
+ type: vue.PropType<_floating_ui_vue.Placement>;
46
46
  default: string;
47
47
  };
48
48
  id: {
@@ -76,7 +76,7 @@ declare const MpTooltip: vue.DefineComponent<{
76
76
  onOpen?: ((...args: any[]) => any) | undefined;
77
77
  onClose?: ((...args: any[]) => any) | undefined;
78
78
  }, {
79
- placement: _floating_ui_dom.Placement;
79
+ placement: _floating_ui_vue.Placement;
80
80
  showDelay: number;
81
81
  hideDelay: number;
82
82
  isKeepAlive: boolean;
package/dist/tooltip.js CHANGED
@@ -156,6 +156,7 @@ var tooltipProps = {
156
156
  };
157
157
 
158
158
  // src/tooltip.tsx
159
+ var import_pixel3_utils2 = require("@mekari/pixel3-utils");
159
160
  var MpTooltip = (0, import_vue4.defineComponent)({
160
161
  name: "MpTooltip",
161
162
  inheritAttrs: false,
@@ -171,7 +172,10 @@ var MpTooltip = (0, import_vue4.defineComponent)({
171
172
  isOpen
172
173
  } = useTooltip(props, emit, slots);
173
174
  return () => {
174
- const triggerNode = (0, import_vue4.cloneVNode)(slots.default()[0], triggerAttrs.value);
175
+ const children = slots.default()[0];
176
+ const isPixelTag = (0, import_pixel3_utils2.isPixelTagComponent)(children.type.name);
177
+ const cloned = (0, import_vue4.cloneVNode)(children, isPixelTag ? {} : triggerAttrs.value);
178
+ const triggerNode = isPixelTag ? (0, import_vue3.createVNode)("div", triggerAttrs.value, [(0, import_vue3.createTextVNode)(" "), cloned, (0, import_vue3.createTextVNode)(" ")]) : cloned;
175
179
  const contentNode = (0, import_vue3.createVNode)("div", contentAttrs.value, [(0, import_vue3.createTextVNode)(" "), slots.label ? slots.label() : props.label, (0, import_vue3.createTextVNode)(" ")]);
176
180
  const renderContentNode = props.usePortal ? (0, import_vue3.createVNode)(import_vue4.Teleport, {
177
181
  "to": "body"
package/dist/tooltip.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  MpTooltip
3
- } from "./chunk-BFYYWBFD.mjs";
3
+ } from "./chunk-BZI43ZJX.mjs";
4
4
  import "./chunk-2KZ7KSYS.mjs";
5
5
  import "./chunk-ENW3A4UE.mjs";
6
6
  import "./chunk-QZ7VFGWC.mjs";
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@mekari/pixel3-tooltip",
3
3
  "description": "Tooltip component for mekari pixel 3",
4
- "version": "0.0.7-dev.2",
4
+ "version": "0.0.7-dev.4",
5
5
  "main": "dist/index.js",
6
6
  "license": "MIT",
7
7
  "files": [
8
8
  "dist"
9
9
  ],
10
10
  "dependencies": {
11
- "@floating-ui/vue": "^1.0.2",
12
- "@mekari/pixel3-styled-system": "0.0.5-dev.1",
13
- "@mekari/pixel3-utils": "0.0.5-dev.0"
11
+ "@floating-ui/vue": "^1.0.6",
12
+ "@mekari/pixel3-styled-system": "0.0.5-dev.3",
13
+ "@mekari/pixel3-utils": "0.0.5-dev.1"
14
14
  },
15
15
  "peerDependencies": {
16
16
  "vue": "^3.4.9"