Skip to content

Commit

Permalink
[2.2.3] UI update
Browse files Browse the repository at this point in the history
  • Loading branch information
neluckoff committed Apr 3, 2024
1 parent 133937f commit bbbbc0c
Show file tree
Hide file tree
Showing 7 changed files with 67 additions and 69 deletions.
100 changes: 49 additions & 51 deletions dist/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,59 +5,57 @@ import { ExtractPropTypes } from 'vue';
import { PublicProps } from 'vue';
import { Ref } from 'vue';

declare module 'vue3-tooltip' {
const _default: {
install: (app: any) => void;
};
export default _default;
declare const _default: {
install: (app: any) => void;
};
export default _default;

export const install: (app: any) => void;
export declare const install: (app: any) => void;

export const TooltipComponent: DefineComponent<{
disable: {
type: BooleanConstructor;
required: false;
default: boolean;
};
position: {
type: () => TooltipPosition;
required: false;
default: string;
};
clickable: {
type: BooleanConstructor;
required: false;
default: boolean;
};
}, {
isShowTooltip: Ref<boolean>;
afterEnter: (el: Element) => void;
hideTooltip: () => void;
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes<{
disable: {
type: BooleanConstructor;
required: false;
default: boolean;
};
position: {
type: () => TooltipPosition;
required: false;
default: string;
};
clickable: {
type: BooleanConstructor;
required: false;
default: boolean;
};
}>>, {
disable: boolean;
position: TooltipPosition;
clickable: boolean;
}, {}>;
export declare const TooltipComponent: DefineComponent<{
disable: {
type: BooleanConstructor;
required: false;
default: boolean;
};
position: {
type: () => TooltipPosition;
required: false;
default: string;
};
clickable: {
type: BooleanConstructor;
required: false;
default: boolean;
};
}, {
isShowTooltip: Ref<boolean>;
afterEnter: (el: Element) => void;
hideTooltip: () => void;
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes<{
disable: {
type: BooleanConstructor;
required: false;
default: boolean;
};
position: {
type: () => TooltipPosition;
required: false;
default: string;
};
clickable: {
type: BooleanConstructor;
required: false;
default: boolean;
};
}>>, {
disable: boolean;
position: TooltipPosition;
clickable: boolean;
}, {}>;

export const TooltipDirective: Directive<HTMLElement, string>;
export declare const TooltipDirective: Directive<HTMLElement, string>;

type TooltipPosition = 'bottom' | 'top' | 'left' | 'right';
declare type TooltipPosition = 'bottom' | 'top' | 'left' | 'right';

export { }
}
export { }
2 changes: 1 addition & 1 deletion dist/style.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 11 additions & 11 deletions dist/vue3-tooltip.es.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ref as d, openBlock as r, createElementBlock as s, normalizeClass as a, renderSlot as i, createVNode as p, Transition as f, withCtx as v, createCommentVNode as m } from "vue";
import { ref as d, openBlock as n, createElementBlock as r, normalizeClass as s, renderSlot as i, createVNode as p, Transition as f, withCtx as v, createCommentVNode as m } from "vue";
const _ = {
name: "TooltipComponent",
props: {
Expand All @@ -22,8 +22,8 @@ const _ = {
const e = d(!1);
return {
isShowTooltip: e,
afterEnter: (n) => {
n.classList.add(`vue-tooltip__hover-${t.position}`);
afterEnter: (a) => {
a.classList.add(`vue-tooltip__hover-${t.position}`);
},
hideTooltip: () => {
e.value = !1;
Expand All @@ -32,25 +32,25 @@ const _ = {
}
}, y = (t, e) => {
const o = t.__vccOpts || t;
for (const [l, n] of e)
o[l] = n;
for (const [l, a] of e)
o[l] = a;
return o;
};
function T(t, e, o, l, n, h) {
return r(), s("div", {
function T(t, e, o, l, a, h) {
return n(), r("div", {
onMouseenter: e[0] || (e[0] = (u) => l.isShowTooltip = !0),
onMouseleave: e[1] || (e[1] = (u) => l.isShowTooltip = !1),
class: a(["vue-tooltip", { disable: o.disable }])
class: s(["vue-tooltip", { disable: o.disable }])
}, [
i(t.$slots, "text", {}, void 0, !0),
p(f, {
name: o.position,
onAfterEnter: l.afterEnter
}, {
default: v(() => [
!o.disable && l.isShowTooltip ? (r(), s("div", {
!o.disable && l.isShowTooltip ? (n(), r("div", {
key: 0,
class: a(["vue-tooltip--component", [{ "vue-tooltip__pointer-event": !o.clickable }, `vue-tooltip__${o.position}`]])
class: s(["vue-tooltip--component", [{ "vue-tooltip__pointer-event": !o.clickable }, `vue-tooltip__${o.position}`]])
}, [
i(t.$slots, "tooltip", {}, void 0, !0)
], 2)) : m("", !0)
Expand All @@ -59,7 +59,7 @@ function T(t, e, o, l, n, h) {
}, 8, ["name", "onAfterEnter"])
], 34);
}
const S = /* @__PURE__ */ y(_, [["render", T], ["__scopeId", "data-v-f73c658e"]]), k = {
const S = /* @__PURE__ */ y(_, [["render", T], ["__scopeId", "data-v-f8a3696a"]]), k = {
mounted: (t, e) => {
c(t, e);
},
Expand Down
2 changes: 1 addition & 1 deletion dist/vue3-tooltip.umd.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "vue3-tooltip",
"description": "Module for convenient work with tooltips in Vue3 (using a directive and a component)",
"type": "module",
"version": "2.1.4",
"version": "2.2.3",
"private": false,
"author": {
"name": "Dmitry Luckyanenko",
Expand Down
Loading

0 comments on commit bbbbc0c

Please sign in to comment.