@dialpad/dialtone 9.142.0 → 9.142.2

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.
Files changed (30) hide show
  1. package/dist/tokens/doc.json +75314 -75314
  2. package/dist/vue2/lib/split-button/split-button-alpha.cjs +1 -1
  3. package/dist/vue2/lib/split-button/split-button-alpha.cjs.map +1 -1
  4. package/dist/vue2/lib/split-button/split-button-alpha.js +16 -8
  5. package/dist/vue2/lib/split-button/split-button-alpha.js.map +1 -1
  6. package/dist/vue2/lib/split-button/split-button-omega.cjs +1 -1
  7. package/dist/vue2/lib/split-button/split-button-omega.cjs.map +1 -1
  8. package/dist/vue2/lib/split-button/split-button-omega.js +10 -10
  9. package/dist/vue2/lib/split-button/split-button-omega.js.map +1 -1
  10. package/dist/vue2/lib/tooltip-directive/tooltip.cjs +1 -1
  11. package/dist/vue2/lib/tooltip-directive/tooltip.cjs.map +1 -1
  12. package/dist/vue2/lib/tooltip-directive/tooltip.js +17 -16
  13. package/dist/vue2/lib/tooltip-directive/tooltip.js.map +1 -1
  14. package/dist/vue2/types/components/split_button/split_button-alpha.vue.d.ts +6 -1
  15. package/dist/vue2/types/directives/tooltip_directive/tooltip.d.ts.map +1 -1
  16. package/dist/vue3/lib/split-button/split-button-alpha.cjs +1 -1
  17. package/dist/vue3/lib/split-button/split-button-alpha.cjs.map +1 -1
  18. package/dist/vue3/lib/split-button/split-button-alpha.js +23 -15
  19. package/dist/vue3/lib/split-button/split-button-alpha.js.map +1 -1
  20. package/dist/vue3/lib/split-button/split-button-omega.cjs +1 -1
  21. package/dist/vue3/lib/split-button/split-button-omega.cjs.map +1 -1
  22. package/dist/vue3/lib/split-button/split-button-omega.js +13 -13
  23. package/dist/vue3/lib/split-button/split-button-omega.js.map +1 -1
  24. package/dist/vue3/lib/tooltip-directive/tooltip.cjs +1 -1
  25. package/dist/vue3/lib/tooltip-directive/tooltip.cjs.map +1 -1
  26. package/dist/vue3/lib/tooltip-directive/tooltip.js +12 -11
  27. package/dist/vue3/lib/tooltip-directive/tooltip.js.map +1 -1
  28. package/dist/vue3/types/components/split_button/split_button-alpha.vue.d.ts +6 -1
  29. package/dist/vue3/types/directives/tooltip_directive/tooltip.d.ts.map +1 -1
  30. package/package.json +3 -3
@@ -1,14 +1,14 @@
1
- import { SPLIT_BUTTON_ICON_SIZES as d } from "./split-button-constants.js";
1
+ import { SPLIT_BUTTON_ICON_SIZES as l } from "./split-button-constants.js";
2
2
  import { DtIconChevronDown as r } from "@dialpad/dialtone-icons/vue3";
3
3
  import { getUniqueString as c } from "../../common/utils/index.js";
4
- import { resolveComponent as i, resolveDirective as s, withDirectives as _, createBlock as m, openBlock as f, normalizeClass as u, withCtx as p, renderSlot as S, createVNode as g } from "vue";
5
- import { _ as b } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
6
- import v from "../button/button.js";
4
+ import { resolveComponent as i, resolveDirective as s, withDirectives as _, createBlock as m, openBlock as f, normalizeClass as u, withCtx as S, renderSlot as p, createVNode as g } from "vue";
5
+ import { _ as v } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
6
+ import b from "../button/button.js";
7
7
  const z = {
8
8
  compatConfig: { MODE: 3 },
9
9
  name: "SplitButtonOmega",
10
10
  components: {
11
- DtButton: v,
11
+ DtButton: b,
12
12
  DtIconChevronDown: r
13
13
  },
14
14
  props: {
@@ -72,12 +72,12 @@ const z = {
72
72
  },
73
73
  data() {
74
74
  return {
75
- SPLIT_BUTTON_ICON_SIZES: d
75
+ SPLIT_BUTTON_ICON_SIZES: l
76
76
  };
77
77
  }
78
78
  };
79
- function T(o, B, t, I, e, y) {
80
- const n = i("dt-icon-chevron-down"), a = i("dt-button"), l = s("dt-tooltip");
79
+ function T(n, B, t, I, e, y) {
80
+ const o = i("dt-icon-chevron-down"), a = i("dt-button"), d = s("dt-tooltip");
81
81
  return _((f(), m(a, {
82
82
  id: t.id,
83
83
  "data-qa": "dt-split-button-omega",
@@ -89,21 +89,21 @@ function T(o, B, t, I, e, y) {
89
89
  kind: t.kind,
90
90
  size: t.size
91
91
  }, {
92
- icon: p(() => [
93
- S(o.$slots, "icon", {
92
+ icon: S(() => [
93
+ p(n.$slots, "icon", {
94
94
  size: e.SPLIT_BUTTON_ICON_SIZES[t.size]
95
95
  }, () => [
96
- g(n, {
96
+ g(o, {
97
97
  size: e.SPLIT_BUTTON_ICON_SIZES[t.size]
98
98
  }, null, 8, ["size"])
99
99
  ])
100
100
  ]),
101
101
  _: 3
102
102
  }, 8, ["id", "active", "aria-label", "class", "disabled", "importance", "kind", "size"])), [
103
- [l, t.tooltipText]
103
+ [d, { message: t.tooltipText, inverted: t.kind === "inverted" }]
104
104
  ]);
105
105
  }
106
- const w = /* @__PURE__ */ b(z, [["render", T]]);
106
+ const w = /* @__PURE__ */ v(z, [["render", T]]);
107
107
  export {
108
108
  w as default
109
109
  };
@@ -1 +1 @@
1
- {"version":3,"file":"split-button-omega.js","sources":["../../../components/split_button/split_button-omega.vue"],"sourcesContent":["<template>\n <dt-button\n :id=\"id\"\n v-dt-tooltip=\"tooltipText\"\n data-qa=\"dt-split-button-omega\"\n :active=\"active\"\n :aria-label=\"ariaLabel\"\n :class=\"`d-split-btn__omega d-split-btn__omega--${size}`\"\n :disabled=\"disabled\"\n :importance=\"importance\"\n :kind=\"kind\"\n :size=\"size\"\n >\n <template #icon>\n <slot\n name=\"icon\"\n :size=\"SPLIT_BUTTON_ICON_SIZES[size]\"\n >\n <dt-icon-chevron-down :size=\"SPLIT_BUTTON_ICON_SIZES[size]\" />\n </slot>\n </template>\n </dt-button>\n</template>\n\n<script>\nimport { SPLIT_BUTTON_ICON_SIZES } from './split_button_constants';\nimport { DtButton } from '@/components/button';\nimport { DtIconChevronDown } from '@dialpad/dialtone-icons/vue3';\nimport { getUniqueString } from '@/common/utils';\n\nexport default {\n compatConfig: { MODE: 3 },\n name: 'SplitButtonOmega',\n components: {\n DtButton,\n DtIconChevronDown,\n },\n\n props: {\n /**\n * Determines whether the button should have active styling\n */\n active: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Descriptive label for the button\n */\n ariaLabel: {\n type: String,\n default: null,\n },\n\n /**\n * HTML button disabled attribute\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Element ID, useful in case you need to reference the button\n * as an external anchor for popover\n */\n id: {\n type: String,\n default: getUniqueString(),\n },\n\n /**\n * The fill and outline of the button associated with its visual importance.\n */\n importance: {\n type: String,\n default: 'primary',\n },\n\n /**\n * The color of the button.\n */\n kind: {\n type: String,\n default: 'default',\n },\n\n /**\n * The size of the button.\n */\n size: {\n type: String,\n default: 'md',\n },\n\n /**\n * Text shown in tooltip when you hover the button\n */\n tooltipText: {\n type: String,\n default: '',\n },\n },\n\n data () {\n return {\n SPLIT_BUTTON_ICON_SIZES,\n };\n },\n};\n</script>\n"],"names":["_sfc_main","DtButton","DtIconChevronDown","getUniqueString","SPLIT_BUTTON_ICON_SIZES","_createBlock","_component_dt_button","$props","_normalizeClass","_renderSlot","_ctx","$data","_createVNode","_component_dt_icon_chevron_down"],"mappings":";;;;;;AA8BA,MAAKA,IAAU;AAAA,EACb,cAAc,EAAE,MAAM;EACtB,MAAM;AAAA,EACN,YAAY;AAAA,IACV,UAAAC;AAAA,IACA,mBAAAC;AAAA;EAGF,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,SAAS;AAAA;;;;IAMX,WAAW;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA;;;;IAMX,UAAU;AAAA,MACR,MAAM;AAAA,MACN,SAAS;AAAA;;;;;IAOX,IAAI;AAAA,MACF,MAAM;AAAA,MACN,SAASC,EAAe;AAAA;;;;IAM1B,YAAY;AAAA,MACV,MAAM;AAAA,MACN,SAAS;AAAA;;;;IAMX,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS;AAAA;;;;IAMX,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS;AAAA;;;;IAMX,aAAa;AAAA,MACX,MAAM;AAAA,MACN,SAAS;AAAA;;EAIb,OAAQ;AACN,WAAO;AAAA,MACL,yBAAAC;AAAA;EAEJ;AACF;;;iBA7GEC,EAoBYC,GAAA;AAAA,IAnBT,IAAIC,EAAA;AAAA,IAEL,WAAQ;AAAA,IACP,QAAQA,EAAA;AAAA,IACR,cAAYA,EAAA;AAAA,IACZ,OAPLC,4CAOsDD,EAAA,IAAI,EAAA;AAAA,IACrD,UAAUA,EAAA;AAAA,IACV,YAAYA,EAAA;AAAA,IACZ,MAAMA,EAAA;AAAA,IACN,MAAMA,EAAA;AAAA;IAEI,QACT,MAKO;AAAA,MALPE,EAKOC,EAAA,QAAA,QAAA;AAAA,QAHJ,MAAMC,EAAA,wBAAwBJ,EAAA,IAAI;AAAA,SAFrC,MAKO;AAAA,QADLK,EAA8DC,GAAA;AAAA,UAAvC,MAAMF,EAAA,wBAAwBJ,EAAA,IAAI;AAAA;;;IAlBjE,GAAA;AAAA;QAGkBA,EAAA,WAAW;AAAA;;;"}
1
+ {"version":3,"file":"split-button-omega.js","sources":["../../../components/split_button/split_button-omega.vue"],"sourcesContent":["<template>\n <dt-button\n :id=\"id\"\n v-dt-tooltip=\"{ message: tooltipText, inverted: kind === 'inverted' }\"\n data-qa=\"dt-split-button-omega\"\n :active=\"active\"\n :aria-label=\"ariaLabel\"\n :class=\"`d-split-btn__omega d-split-btn__omega--${size}`\"\n :disabled=\"disabled\"\n :importance=\"importance\"\n :kind=\"kind\"\n :size=\"size\"\n >\n <template #icon>\n <slot\n name=\"icon\"\n :size=\"SPLIT_BUTTON_ICON_SIZES[size]\"\n >\n <dt-icon-chevron-down :size=\"SPLIT_BUTTON_ICON_SIZES[size]\" />\n </slot>\n </template>\n </dt-button>\n</template>\n\n<script>\nimport { SPLIT_BUTTON_ICON_SIZES } from './split_button_constants';\nimport { DtButton } from '@/components/button';\nimport { DtIconChevronDown } from '@dialpad/dialtone-icons/vue3';\nimport { getUniqueString } from '@/common/utils';\n\nexport default {\n compatConfig: { MODE: 3 },\n name: 'SplitButtonOmega',\n components: {\n DtButton,\n DtIconChevronDown,\n },\n\n props: {\n /**\n * Determines whether the button should have active styling\n */\n active: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Descriptive label for the button\n */\n ariaLabel: {\n type: String,\n default: null,\n },\n\n /**\n * HTML button disabled attribute\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Element ID, useful in case you need to reference the button\n * as an external anchor for popover\n */\n id: {\n type: String,\n default: getUniqueString(),\n },\n\n /**\n * The fill and outline of the button associated with its visual importance.\n */\n importance: {\n type: String,\n default: 'primary',\n },\n\n /**\n * The color of the button.\n */\n kind: {\n type: String,\n default: 'default',\n },\n\n /**\n * The size of the button.\n */\n size: {\n type: String,\n default: 'md',\n },\n\n /**\n * Text shown in tooltip when you hover the button\n */\n tooltipText: {\n type: String,\n default: '',\n },\n },\n\n data () {\n return {\n SPLIT_BUTTON_ICON_SIZES,\n };\n },\n};\n</script>\n"],"names":["_sfc_main","DtButton","DtIconChevronDown","getUniqueString","SPLIT_BUTTON_ICON_SIZES","_createBlock","_component_dt_button","$props","_normalizeClass","_renderSlot","_ctx","$data","_createVNode","_component_dt_icon_chevron_down","_directive_dt_tooltip"],"mappings":";;;;;;AA8BA,MAAKA,IAAU;AAAA,EACb,cAAc,EAAE,MAAM;EACtB,MAAM;AAAA,EACN,YAAY;AAAA,IACV,UAAAC;AAAA,IACA,mBAAAC;AAAA;EAGF,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,SAAS;AAAA;;;;IAMX,WAAW;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA;;;;IAMX,UAAU;AAAA,MACR,MAAM;AAAA,MACN,SAAS;AAAA;;;;;IAOX,IAAI;AAAA,MACF,MAAM;AAAA,MACN,SAASC,EAAe;AAAA;;;;IAM1B,YAAY;AAAA,MACV,MAAM;AAAA,MACN,SAAS;AAAA;;;;IAMX,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS;AAAA;;;;IAMX,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS;AAAA;;;;IAMX,aAAa;AAAA,MACX,MAAM;AAAA,MACN,SAAS;AAAA;;EAIb,OAAQ;AACN,WAAO;AAAA,MACL,yBAAAC;AAAA;EAEJ;AACF;;;iBA7GEC,EAoBYC,GAAA;AAAA,IAnBT,IAAIC,EAAA;AAAA,IAEL,WAAQ;AAAA,IACP,QAAQA,EAAA;AAAA,IACR,cAAYA,EAAA;AAAA,IACZ,OAPLC,4CAOsDD,EAAA,IAAI,EAAA;AAAA,IACrD,UAAUA,EAAA;AAAA,IACV,YAAYA,EAAA;AAAA,IACZ,MAAMA,EAAA;AAAA,IACN,MAAMA,EAAA;AAAA;IAEI,QACT,MAKO;AAAA,MALPE,EAKOC,EAAA,QAAA,QAAA;AAAA,QAHJ,MAAMC,EAAA,wBAAwBJ,EAAA,IAAI;AAAA,SAFrC,MAKO;AAAA,QADLK,EAA8DC,GAAA;AAAA,UAAvC,MAAMF,EAAA,wBAAwBJ,EAAA,IAAI;AAAA;;;IAlBjE,GAAA;AAAA;IAG6B,CAAAO,GAAA,EAAA,SAAAP,EAAA,uBAAuBA,EAAA,SAAI,WAAA,CAAA;AAAA;;;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const f=require("../../common/utils/index.cjs"),a=require("vue"),c=require("../tooltip/tooltip.cjs"),m=require("../tooltip/tooltip-constants.cjs"),p={name:"dt-tooltip-directive",install(v){let r;const s=document.createElement("div");document.body.appendChild(s);const u="top",d=a.createApp({name:"DtTooltipDirectiveApp",components:{DtTooltip:c.default},data(){return{tooltips:[]}},created(){r=a.getCurrentInstance()},methods:{addOrUpdateTooltip(e,t){const i=this.tooltips.findIndex(o=>o.id===e);i!==-1?this.tooltips.splice(i,1,{id:e,...t}):this.tooltips.push({id:e,...t})},removeTooltip(e){this.tooltips=this.tooltips.filter(t=>t.id!==e)}},render(){return a.h("div",this.tooltips.map(({id:e,...t})=>a.h(c.default,{key:e,...t,sticky:t.sticky!==void 0?t.sticky:!0,delay:t.delay!==void 0?t.delay:process.env.NODE_ENV!=="test",externalAnchor:`[data-dt-tooltip-id="${e}"]`})))}});d.mount(s),v.directive("dt-tooltip",{beforeMount(e,t){n(e,t)},updated(e,t){t.value!==t.oldValue&&n(e,t)},unmounted(e){r.ctx.removeTooltip(e.getAttribute("data-dt-tooltip-id"))}});function n(e,t){if(t.value===null||t.value===void 0){const l=e.getAttribute("data-dt-tooltip-id");l&&d.removeTooltip(l);return}const i=e.getAttribute("data-dt-tooltip-id")||f.getUniqueString();let o;if(typeof t.value=="string")o={message:t.value,placement:t.arg||u};else if(typeof t.value=="object"&&t.value!==null)o={placement:t.arg||t.value.placement||u,...t.value};else{console.error("DtTooltipDirective: binding value must be string, object, null or undefined");return}Object.keys(t.modifiers).forEach(l=>{switch(l){case"inverted":o.inverted=!0;break;case"no-delay":o.delay=!1;break;case"no-transition":o.transition=!1;break;default:m.TOOLTIP_DIRECTIONS.includes(l)&&(o.placement=l);break}}),e.setAttribute("data-dt-tooltip-id",i),r.ctx.addOrUpdateTooltip(i,o)}}};exports.DtTooltipDirective=p;exports.default=p;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const f=require("../../common/utils/index.cjs"),a=require("vue"),m=require("deep-equal"),c=require("../tooltip/tooltip.cjs"),T=require("../tooltip/tooltip-constants.cjs"),p={name:"dt-tooltip-directive",install(v){let r;const s=document.createElement("div");document.body.appendChild(s);const u="top",d=a.createApp({name:"DtTooltipDirectiveApp",components:{DtTooltip:c.default},data(){return{tooltips:[]}},created(){r=a.getCurrentInstance()},methods:{addOrUpdateTooltip(e,t){const i=this.tooltips.findIndex(o=>o.id===e);i!==-1?this.tooltips.splice(i,1,{id:e,...t}):this.tooltips.push({id:e,...t})},removeTooltip(e){this.tooltips=this.tooltips.filter(t=>t.id!==e)}},render(){return a.h("div",this.tooltips.map(({id:e,...t})=>a.h(c.default,{key:e,...t,sticky:t.sticky!==void 0?t.sticky:!0,delay:t.delay!==void 0?t.delay:process.env.NODE_ENV!=="test",externalAnchor:`[data-dt-tooltip-id="${e}"]`})))}});d.mount(s),v.directive("dt-tooltip",{beforeMount(e,t){n(e,t)},updated(e,t){m(t.value,t.oldValue)||n(e,t)},unmounted(e){r.ctx.removeTooltip(e.getAttribute("data-dt-tooltip-id"))}});function n(e,t){if(t.value===null||t.value===void 0){const l=e.getAttribute("data-dt-tooltip-id");l&&d.removeTooltip(l);return}const i=e.getAttribute("data-dt-tooltip-id")||f.getUniqueString();let o;if(typeof t.value=="string")o={message:t.value,placement:t.arg||u};else if(typeof t.value=="object"&&t.value!==null)o={placement:t.arg||t.value.placement||u,...t.value};else{console.error("DtTooltipDirective: binding value must be string, object, null or undefined");return}Object.keys(t.modifiers).forEach(l=>{switch(l){case"inverted":o.inverted=!0;break;case"no-delay":o.delay=!1;break;case"no-transition":o.transition=!1;break;default:T.TOOLTIP_DIRECTIONS.includes(l)&&(o.placement=l);break}}),e.setAttribute("data-dt-tooltip-id",i),r.ctx.addOrUpdateTooltip(i,o)}}};exports.DtTooltipDirective=p;exports.default=p;
2
2
  //# sourceMappingURL=tooltip.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"tooltip.cjs","sources":["../../../directives/tooltip_directive/tooltip.js"],"sourcesContent":["import { DtTooltip, TOOLTIP_DIRECTIONS } from '@/components/tooltip';\nimport { getUniqueString } from '@/common/utils';\nimport { createApp, getCurrentInstance, h } from 'vue';\n\nexport const DtTooltipDirective = {\n name: 'dt-tooltip-directive',\n install (app) {\n let tooltipInstance;\n const mountPoint = document.createElement('div');\n document.body.appendChild(mountPoint);\n\n const DEFAULT_PLACEMENT = 'top';\n const DtTooltipDirectiveApp = createApp({\n name: 'DtTooltipDirectiveApp',\n components: { DtTooltip },\n data () {\n return {\n tooltips: [],\n };\n },\n\n created () {\n tooltipInstance = getCurrentInstance();\n },\n\n methods: {\n addOrUpdateTooltip (id, tooltipConfig) {\n const index = this.tooltips.findIndex(tooltip => tooltip.id === id);\n if (index !== -1) {\n // Update existing tooltip\n this.tooltips.splice(index, 1, { id, ...tooltipConfig });\n } else {\n // Add new tooltip\n this.tooltips.push({ id, ...tooltipConfig });\n }\n },\n\n removeTooltip (id) {\n this.tooltips = this.tooltips.filter(tooltip => tooltip.id !== id);\n },\n },\n\n render () {\n return h('div',\n this.tooltips.map(({ id, ...tooltipProps }) => {\n return h(DtTooltip, {\n key: id,\n ...tooltipProps,\n sticky: tooltipProps.sticky !== undefined ? tooltipProps.sticky : true,\n /**\n * Set the delay to false when running tests only.\n */\n delay: tooltipProps.delay !== undefined ? tooltipProps.delay : (process.env.NODE_ENV !== 'test'),\n externalAnchor: `[data-dt-tooltip-id=\"${id}\"]`,\n });\n }),\n );\n },\n });\n\n DtTooltipDirectiveApp.mount(mountPoint);\n\n app.directive('dt-tooltip', {\n beforeMount (anchor, binding) {\n // Initial tooltip setup\n setupTooltip(anchor, binding);\n },\n updated (anchor, binding) {\n // Update tooltip on binding value change\n if (binding.value !== binding.oldValue) {\n setupTooltip(anchor, binding);\n }\n },\n unmounted (anchor) {\n tooltipInstance.ctx.removeTooltip(anchor.getAttribute('data-dt-tooltip-id'));\n },\n });\n\n function setupTooltip (anchor, binding) {\n if (binding.value === null || binding.value === undefined) {\n const tooltipId = anchor.getAttribute('data-dt-tooltip-id');\n if (tooltipId) {\n DtTooltipDirectiveApp.removeTooltip(tooltipId);\n }\n return;\n }\n const tooltipId = anchor.getAttribute('data-dt-tooltip-id') || getUniqueString();\n\n let tooltipConfig;\n if (typeof binding.value === 'string') {\n tooltipConfig = {\n message: binding.value,\n placement: binding.arg || DEFAULT_PLACEMENT,\n };\n } else if (typeof binding.value === 'object' && binding.value !== null) {\n tooltipConfig = {\n placement: binding.arg || binding.value.placement || DEFAULT_PLACEMENT,\n ...binding.value,\n };\n } else {\n console.error('DtTooltipDirective: binding value must be string, object, null or undefined');\n return;\n }\n\n Object.keys(binding.modifiers).forEach(modifier => {\n switch (modifier) {\n case 'inverted':\n tooltipConfig.inverted = true;\n break;\n case 'no-delay':\n tooltipConfig.delay = false;\n break;\n case 'no-transition':\n tooltipConfig.transition = false;\n break;\n default:\n if (TOOLTIP_DIRECTIONS.includes(modifier)) {\n tooltipConfig.placement = modifier;\n }\n break;\n }\n });\n\n anchor.setAttribute('data-dt-tooltip-id', tooltipId);\n tooltipInstance.ctx.addOrUpdateTooltip(tooltipId, tooltipConfig);\n }\n },\n};\n\nexport default DtTooltipDirective;\n"],"names":["DtTooltipDirective","app","tooltipInstance","mountPoint","DEFAULT_PLACEMENT","DtTooltipDirectiveApp","createApp","DtTooltip","getCurrentInstance","id","tooltipConfig","index","tooltip","h","tooltipProps","anchor","binding","setupTooltip","tooltipId","getUniqueString","modifier","TOOLTIP_DIRECTIONS"],"mappings":"+PAIaA,EAAqB,CAChC,KAAM,uBACN,QAASC,EAAK,CACZ,IAAIC,EACJ,MAAMC,EAAa,SAAS,cAAc,KAAK,EAC/C,SAAS,KAAK,YAAYA,CAAU,EAEpC,MAAMC,EAAoB,MACpBC,EAAwBC,EAAAA,UAAU,CACtC,KAAM,wBACN,WAAY,CAAA,UAAEC,EAAAA,OAAS,EACvB,MAAQ,CACN,MAAO,CACL,SAAU,CAAA,CACpB,CACM,EAEA,SAAW,CACTL,EAAkBM,EAAAA,mBAAkB,CACtC,EAEA,QAAS,CACP,mBAAoBC,EAAIC,EAAe,CACrC,MAAMC,EAAQ,KAAK,SAAS,UAAUC,GAAWA,EAAQ,KAAOH,CAAE,EAC9DE,IAAU,GAEZ,KAAK,SAAS,OAAOA,EAAO,EAAG,CAAE,GAAAF,EAAI,GAAGC,EAAe,EAGvD,KAAK,SAAS,KAAK,CAAE,GAAAD,EAAI,GAAGC,CAAa,CAAE,CAE/C,EAEA,cAAeD,EAAI,CACj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AO,KAAKA,EAAQ,SAAS,EAAE,QAAQI,GAAY,CACjD,OAAQA,EAAQ,CACd,IAAK,WACHV,EAAc,SAAW,GACzB,MACF,IAAK,WACHA,EAAc,MAAQ,GACtB,MACF,IAAK,gBACHA,EAAc,WAAa,GAC3B,MACF,QACMW,EAAAA,mBAAmB,SAASD,CAAQ,IACtCV,EAAc,UAAYU,GAE5B,KACZ,CACM,CAAC,EAEDL,EAAO,aAAa,qBAAsBG,CAAS,EACnDhB,EAAgB,IAAI,mBAAmBgB,EAAWR,CAAa,CACjE,CACF,CACF"}
1
+ {"version":3,"file":"tooltip.cjs","sources":["../../../directives/tooltip_directive/tooltip.js"],"sourcesContent":["import { DtTooltip, TOOLTIP_DIRECTIONS } from '@/components/tooltip';\nimport { getUniqueString } from '@/common/utils';\nimport { createApp, getCurrentInstance, h } from 'vue';\nimport deepEqual from 'deep-equal';\n\nexport const DtTooltipDirective = {\n name: 'dt-tooltip-directive',\n install (app) {\n let tooltipInstance;\n const mountPoint = document.createElement('div');\n document.body.appendChild(mountPoint);\n\n const DEFAULT_PLACEMENT = 'top';\n const DtTooltipDirectiveApp = createApp({\n name: 'DtTooltipDirectiveApp',\n components: { DtTooltip },\n data () {\n return {\n tooltips: [],\n };\n },\n\n created () {\n tooltipInstance = getCurrentInstance();\n },\n\n methods: {\n addOrUpdateTooltip (id, tooltipConfig) {\n const index = this.tooltips.findIndex(tooltip => tooltip.id === id);\n if (index !== -1) {\n // Update existing tooltip\n this.tooltips.splice(index, 1, { id, ...tooltipConfig });\n } else {\n // Add new tooltip\n this.tooltips.push({ id, ...tooltipConfig });\n }\n },\n\n removeTooltip (id) {\n this.tooltips = this.tooltips.filter(tooltip => tooltip.id !== id);\n },\n },\n\n render () {\n return h('div',\n this.tooltips.map(({ id, ...tooltipProps }) => {\n return h(DtTooltip, {\n key: id,\n ...tooltipProps,\n sticky: tooltipProps.sticky !== undefined ? tooltipProps.sticky : true,\n /**\n * Set the delay to false when running tests only.\n */\n delay: tooltipProps.delay !== undefined ? tooltipProps.delay : (process.env.NODE_ENV !== 'test'),\n externalAnchor: `[data-dt-tooltip-id=\"${id}\"]`,\n });\n }),\n );\n },\n });\n\n DtTooltipDirectiveApp.mount(mountPoint);\n\n app.directive('dt-tooltip', {\n beforeMount (anchor, binding) {\n // Initial tooltip setup\n setupTooltip(anchor, binding);\n },\n updated (anchor, binding) {\n // Update tooltip on binding value change\n // Use deep equality check to prevent infinite loops when objects are passed\n if (!deepEqual(binding.value, binding.oldValue)) {\n setupTooltip(anchor, binding);\n }\n },\n unmounted (anchor) {\n tooltipInstance.ctx.removeTooltip(anchor.getAttribute('data-dt-tooltip-id'));\n },\n });\n\n function setupTooltip (anchor, binding) {\n if (binding.value === null || binding.value === undefined) {\n const tooltipId = anchor.getAttribute('data-dt-tooltip-id');\n if (tooltipId) {\n DtTooltipDirectiveApp.removeTooltip(tooltipId);\n }\n return;\n }\n const tooltipId = anchor.getAttribute('data-dt-tooltip-id') || getUniqueString();\n\n let tooltipConfig;\n if (typeof binding.value === 'string') {\n tooltipConfig = {\n message: binding.value,\n placement: binding.arg || DEFAULT_PLACEMENT,\n };\n } else if (typeof binding.value === 'object' && binding.value !== null) {\n tooltipConfig = {\n placement: binding.arg || binding.value.placement || DEFAULT_PLACEMENT,\n ...binding.value,\n };\n } else {\n console.error('DtTooltipDirective: binding value must be string, object, null or undefined');\n return;\n }\n\n Object.keys(binding.modifiers).forEach(modifier => {\n switch (modifier) {\n case 'inverted':\n tooltipConfig.inverted = true;\n break;\n case 'no-delay':\n tooltipConfig.delay = false;\n break;\n case 'no-transition':\n tooltipConfig.transition = false;\n break;\n default:\n if (TOOLTIP_DIRECTIONS.includes(modifier)) {\n tooltipConfig.placement = modifier;\n }\n break;\n }\n });\n\n anchor.setAttribute('data-dt-tooltip-id', tooltipId);\n tooltipInstance.ctx.addOrUpdateTooltip(tooltipId, tooltipConfig);\n }\n },\n};\n\nexport default DtTooltipDirective;\n"],"names":["DtTooltipDirective","app","tooltipInstance","mountPoint","DEFAULT_PLACEMENT","DtTooltipDirectiveApp","createApp","DtTooltip","getCurrentInstance","id","tooltipConfig","index","tooltip","h","tooltipProps","anchor","binding","setupTooltip","deepEqual","tooltipId","getUniqueString","modifier","TOOLTIP_DIRECTIONS"],"mappings":"uRAKaA,EAAqB,CAChC,KAAM,uBACN,QAASC,EAAK,CACZ,IAAIC,EACJ,MAAMC,EAAa,SAAS,cAAc,KAAK,EAC/C,SAAS,KAAK,YAAYA,CAAU,EAEpC,MAAMC,EAAoB,MACpBC,EAAwBC,EAAAA,UAAU,CACtC,KAAM,wBACN,WAAY,CAAA,UAAEC,EAAAA,OAAS,EACvB,MAAQ,CACN,MAAO,CACL,SAAU,CAAA,CACpB,CACM,EAEA,SAAW,CACTL,EAAkBM,EAAAA,mBAAkB,CACtC,EAEA,QAAS,CACP,mBAAoBC,EAAIC,EAAe,CACrC,MAAMC,EAAQ,KAAK,SAAS,UAAUC,GAAWA,EAAQ,KAAOH,CAAE,EAC9DE,IAAU,GAEZ,KAAK,SAAS,OAAOA,EAAO,EAAG,CAAE,GAAAF,EAAI,GAAGC,EAAe,EAGvD,KAAK,SAAS,KAAK,CAAE,GAAAD,EAAI,GAAGC,CAAa,CAAE,CAE/C,EAEA,cAAeD,EAAI,CACjB,KAAK,SAAW,KAAK,SAAS,OAAOG,GAAWA,EAAQ,KAAOH,CAAE,CACnE,CACR,EAEM,QAAU,CACR,OAAOI,EAAAA,EAAE,MACP,KAAK,SAAS,IAAI,CAAC,CAAE,GAAAJ,EAAI,GAAGK,KACnBD,EAAAA,EAAEN,EAAAA,QAAW,CAClB,IAAKE,EACL,GAAGK,EACH,OAAQA,EAAa,SAAW,OAAYA,EAAa,OAAS,GAIlE,MAAOA,EAAa,QAAU,OAAYA,EAAa,MAAS,QAAQ,IAAI,WAAa,OACzF,eAAgB,wBAAwBL,CAAE,IACxD,CAAa,CACF,CACX,CACM,CACN,CAAK,EAEDJ,EAAsB,MAAMF,CAAU,EAEtCF,EA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f, h as n, getCurrentInstance as v } from "vue";
3
- import u from "../tooltip/tooltip.js";
4
- import { TOOLTIP_DIRECTIONS as T } from "../tooltip/tooltip-constants.js";
5
- const k = {
2
+ import { createApp as f, h as u, getCurrentInstance as v } from "vue";
3
+ import T from "deep-equal";
4
+ import n from "../tooltip/tooltip.js";
5
+ import { TOOLTIP_DIRECTIONS as y } from "../tooltip/tooltip-constants.js";
6
+ const I = {
6
7
  name: "dt-tooltip-directive",
7
8
  install(c) {
8
9
  let a;
@@ -10,7 +11,7 @@ const k = {
10
11
  document.body.appendChild(r);
11
12
  const s = "top", d = f({
12
13
  name: "DtTooltipDirectiveApp",
13
- components: { DtTooltip: u },
14
+ components: { DtTooltip: n },
14
15
  data() {
15
16
  return {
16
17
  tooltips: []
@@ -29,9 +30,9 @@ const k = {
29
30
  }
30
31
  },
31
32
  render() {
32
- return n(
33
+ return u(
33
34
  "div",
34
- this.tooltips.map(({ id: e, ...t }) => n(u, {
35
+ this.tooltips.map(({ id: e, ...t }) => u(n, {
35
36
  key: e,
36
37
  ...t,
37
38
  sticky: t.sticky !== void 0 ? t.sticky : !0,
@@ -49,7 +50,7 @@ const k = {
49
50
  p(e, t);
50
51
  },
51
52
  updated(e, t) {
52
- t.value !== t.oldValue && p(e, t);
53
+ T(t.value, t.oldValue) || p(e, t);
53
54
  },
54
55
  unmounted(e) {
55
56
  a.ctx.removeTooltip(e.getAttribute("data-dt-tooltip-id"));
@@ -89,7 +90,7 @@ const k = {
89
90
  o.transition = !1;
90
91
  break;
91
92
  default:
92
- T.includes(l) && (o.placement = l);
93
+ y.includes(l) && (o.placement = l);
93
94
  break;
94
95
  }
95
96
  }), e.setAttribute("data-dt-tooltip-id", i), a.ctx.addOrUpdateTooltip(i, o);
@@ -97,7 +98,7 @@ const k = {
97
98
  }
98
99
  };
99
100
  export {
100
- k as DtTooltipDirective,
101
- k as default
101
+ I as DtTooltipDirective,
102
+ I as default
102
103
  };
103
104
  //# sourceMappingURL=tooltip.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tooltip.js","sources":["../../../directives/tooltip_directive/tooltip.js"],"sourcesContent":["import { DtTooltip, TOOLTIP_DIRECTIONS } from '@/components/tooltip';\nimport { getUniqueString } from '@/common/utils';\nimport { createApp, getCurrentInstance, h } from 'vue';\n\nexport const DtTooltipDirective = {\n name: 'dt-tooltip-directive',\n install (app) {\n let tooltipInstance;\n const mountPoint = document.createElement('div');\n document.body.appendChild(mountPoint);\n\n const DEFAULT_PLACEMENT = 'top';\n const DtTooltipDirectiveApp = createApp({\n name: 'DtTooltipDirectiveApp',\n components: { DtTooltip },\n data () {\n return {\n tooltips: [],\n };\n },\n\n created () {\n tooltipInstance = getCurrentInstance();\n },\n\n methods: {\n addOrUpdateTooltip (id, tooltipConfig) {\n const index = this.tooltips.findIndex(tooltip => tooltip.id === id);\n if (index !== -1) {\n // Update existing tooltip\n this.tooltips.splice(index, 1, { id, ...tooltipConfig });\n } else {\n // Add new tooltip\n this.tooltips.push({ id, ...tooltipConfig });\n }\n },\n\n removeTooltip (id) {\n this.tooltips = this.tooltips.filter(tooltip => tooltip.id !== id);\n },\n },\n\n render () {\n return h('div',\n this.tooltips.map(({ id, ...tooltipProps }) => {\n return h(DtTooltip, {\n key: id,\n ...tooltipProps,\n sticky: tooltipProps.sticky !== undefined ? tooltipProps.sticky : true,\n /**\n * Set the delay to false when running tests only.\n */\n delay: tooltipProps.delay !== undefined ? tooltipProps.delay : (process.env.NODE_ENV !== 'test'),\n externalAnchor: `[data-dt-tooltip-id=\"${id}\"]`,\n });\n }),\n );\n },\n });\n\n DtTooltipDirectiveApp.mount(mountPoint);\n\n app.directive('dt-tooltip', {\n beforeMount (anchor, binding) {\n // Initial tooltip setup\n setupTooltip(anchor, binding);\n },\n updated (anchor, binding) {\n // Update tooltip on binding value change\n if (binding.value !== binding.oldValue) {\n setupTooltip(anchor, binding);\n }\n },\n unmounted (anchor) {\n tooltipInstance.ctx.removeTooltip(anchor.getAttribute('data-dt-tooltip-id'));\n },\n });\n\n function setupTooltip (anchor, binding) {\n if (binding.value === null || binding.value === undefined) {\n const tooltipId = anchor.getAttribute('data-dt-tooltip-id');\n if (tooltipId) {\n DtTooltipDirectiveApp.removeTooltip(tooltipId);\n }\n return;\n }\n const tooltipId = anchor.getAttribute('data-dt-tooltip-id') || getUniqueString();\n\n let tooltipConfig;\n if (typeof binding.value === 'string') {\n tooltipConfig = {\n message: binding.value,\n placement: binding.arg || DEFAULT_PLACEMENT,\n };\n } else if (typeof binding.value === 'object' && binding.value !== null) {\n tooltipConfig = {\n placement: binding.arg || binding.value.placement || DEFAULT_PLACEMENT,\n ...binding.value,\n };\n } else {\n console.error('DtTooltipDirective: binding value must be string, object, null or undefined');\n return;\n }\n\n Object.keys(binding.modifiers).forEach(modifier => {\n switch (modifier) {\n case 'inverted':\n tooltipConfig.inverted = true;\n break;\n case 'no-delay':\n tooltipConfig.delay = false;\n break;\n case 'no-transition':\n tooltipConfig.transition = false;\n break;\n default:\n if (TOOLTIP_DIRECTIONS.includes(modifier)) {\n tooltipConfig.placement = modifier;\n }\n break;\n }\n });\n\n anchor.setAttribute('data-dt-tooltip-id', tooltipId);\n tooltipInstance.ctx.addOrUpdateTooltip(tooltipId, tooltipConfig);\n }\n },\n};\n\nexport default DtTooltipDirective;\n"],"names":["DtTooltipDirective","app","tooltipInstance","mountPoint","DEFAULT_PLACEMENT","DtTooltipDirectiveApp","createApp","DtTooltip","getCurrentInstance","id","tooltipConfig","index","tooltip","h","tooltipProps","anchor","binding","setupTooltip","tooltipId","getUniqueString","modifier","TOOLTIP_DIRECTIONS"],"mappings":";;;;AAIY,MAACA,IAAqB;AAAA,EAChC,MAAM;AAAA,EACN,QAASC,GAAK;AACZ,QAAIC;AACJ,UAAMC,IAAa,SAAS,cAAc,KAAK;AAC/C,aAAS,KAAK,YAAYA,CAAU;AAEpC,UAAMC,IAAoB,OACpBC,IAAwBC,EAAU;AAAA,MACtC,MAAM;AAAA,MACN,YAAY,EAAE,WAAAC,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AAb,EAAgB,IAAI,cAAca,EAAO,aAAa,oBAAoB,CAAC;AAAA,MAC7E;AAAA,IACN,CAAK;AAED,aAASE,EAAcF,GAAQC,GAAS;AACtC,UAAIA,EAAQ,UAAU,QAAQA,EAAQ,UAAU,QAAW;AACzD,cAAME,IAAYH,EAAO,aAAa,oBAAoB;AAC1D,QAAIG,KACFb,EAAsB,cAAca,CAAS;AAE/C;AAAA,MACF;AACA,YAAMA,IAAYH,EAAO,aAAa,oBAAoB,KAAKI,EAAe;AAE9E,UAAIT;AACJ,UAAI,OAAOM,EAAQ,SAAU;AAC3B,QAAAN,IAAgB;AAAA,UACd,SAASM,EAAQ;AAAA,UACjB,WAAWA,EAAQ,OAAOZ;AAAA,QACpC;AAAA,eACiB,OAAOY,EAAQ,SAAU,YAAYA,EAAQ,UAAU;AAChE,QAAAN,IAAgB;AAAA,UACd,WAAWM,EAAQ,OAAOA,EAAQ,MAAM,aAAaZ;AAAA,UACrD,GAAGY,EAAQ;AAAA,QACrB;AAAA,WACa;AACL,gBAAQ,MAAM,6EAA6E;AAC3F;AAAA,MACF;AAEA,aAAO,KAAKA,EAAQ,SAAS,EAAE,QAAQ,CAAAI,MAAY;AACjD,gBAAQA,GAAQ;AAAA,UACd,KAAK;AACH,YAAAV,EAAc,WAAW;AACzB;AAAA,UACF,KAAK;AACH,YAAAA,EAAc,QAAQ;AACtB;AAAA,UACF,KAAK;AACH,YAAAA,EAAc,aAAa;AAC3B;AAAA,UACF;AACE,YAAIW,EAAmB,SAASD,CAAQ,MACtCV,EAAc,YAAYU;AAE5B;AAAA,QACZ;AAAA,MACM,CAAC,GAEDL,EAAO,aAAa,sBAAsBG,CAAS,GACnDhB,EAAgB,IAAI,mBAAmBgB,GAAWR,CAAa;AAAA,IACjE;AAAA,EACF;AACF;"}
1
+ {"version":3,"file":"tooltip.js","sources":["../../../directives/tooltip_directive/tooltip.js"],"sourcesContent":["import { DtTooltip, TOOLTIP_DIRECTIONS } from '@/components/tooltip';\nimport { getUniqueString } from '@/common/utils';\nimport { createApp, getCurrentInstance, h } from 'vue';\nimport deepEqual from 'deep-equal';\n\nexport const DtTooltipDirective = {\n name: 'dt-tooltip-directive',\n install (app) {\n let tooltipInstance;\n const mountPoint = document.createElement('div');\n document.body.appendChild(mountPoint);\n\n const DEFAULT_PLACEMENT = 'top';\n const DtTooltipDirectiveApp = createApp({\n name: 'DtTooltipDirectiveApp',\n components: { DtTooltip },\n data () {\n return {\n tooltips: [],\n };\n },\n\n created () {\n tooltipInstance = getCurrentInstance();\n },\n\n methods: {\n addOrUpdateTooltip (id, tooltipConfig) {\n const index = this.tooltips.findIndex(tooltip => tooltip.id === id);\n if (index !== -1) {\n // Update existing tooltip\n this.tooltips.splice(index, 1, { id, ...tooltipConfig });\n } else {\n // Add new tooltip\n this.tooltips.push({ id, ...tooltipConfig });\n }\n },\n\n removeTooltip (id) {\n this.tooltips = this.tooltips.filter(tooltip => tooltip.id !== id);\n },\n },\n\n render () {\n return h('div',\n this.tooltips.map(({ id, ...tooltipProps }) => {\n return h(DtTooltip, {\n key: id,\n ...tooltipProps,\n sticky: tooltipProps.sticky !== undefined ? tooltipProps.sticky : true,\n /**\n * Set the delay to false when running tests only.\n */\n delay: tooltipProps.delay !== undefined ? tooltipProps.delay : (process.env.NODE_ENV !== 'test'),\n externalAnchor: `[data-dt-tooltip-id=\"${id}\"]`,\n });\n }),\n );\n },\n });\n\n DtTooltipDirectiveApp.mount(mountPoint);\n\n app.directive('dt-tooltip', {\n beforeMount (anchor, binding) {\n // Initial tooltip setup\n setupTooltip(anchor, binding);\n },\n updated (anchor, binding) {\n // Update tooltip on binding value change\n // Use deep equality check to prevent infinite loops when objects are passed\n if (!deepEqual(binding.value, binding.oldValue)) {\n setupTooltip(anchor, binding);\n }\n },\n unmounted (anchor) {\n tooltipInstance.ctx.removeTooltip(anchor.getAttribute('data-dt-tooltip-id'));\n },\n });\n\n function setupTooltip (anchor, binding) {\n if (binding.value === null || binding.value === undefined) {\n const tooltipId = anchor.getAttribute('data-dt-tooltip-id');\n if (tooltipId) {\n DtTooltipDirectiveApp.removeTooltip(tooltipId);\n }\n return;\n }\n const tooltipId = anchor.getAttribute('data-dt-tooltip-id') || getUniqueString();\n\n let tooltipConfig;\n if (typeof binding.value === 'string') {\n tooltipConfig = {\n message: binding.value,\n placement: binding.arg || DEFAULT_PLACEMENT,\n };\n } else if (typeof binding.value === 'object' && binding.value !== null) {\n tooltipConfig = {\n placement: binding.arg || binding.value.placement || DEFAULT_PLACEMENT,\n ...binding.value,\n };\n } else {\n console.error('DtTooltipDirective: binding value must be string, object, null or undefined');\n return;\n }\n\n Object.keys(binding.modifiers).forEach(modifier => {\n switch (modifier) {\n case 'inverted':\n tooltipConfig.inverted = true;\n break;\n case 'no-delay':\n tooltipConfig.delay = false;\n break;\n case 'no-transition':\n tooltipConfig.transition = false;\n break;\n default:\n if (TOOLTIP_DIRECTIONS.includes(modifier)) {\n tooltipConfig.placement = modifier;\n }\n break;\n }\n });\n\n anchor.setAttribute('data-dt-tooltip-id', tooltipId);\n tooltipInstance.ctx.addOrUpdateTooltip(tooltipId, tooltipConfig);\n }\n },\n};\n\nexport default DtTooltipDirective;\n"],"names":["DtTooltipDirective","app","tooltipInstance","mountPoint","DEFAULT_PLACEMENT","DtTooltipDirectiveApp","createApp","DtTooltip","getCurrentInstance","id","tooltipConfig","index","tooltip","h","tooltipProps","anchor","binding","setupTooltip","deepEqual","tooltipId","getUniqueString","modifier","TOOLTIP_DIRECTIONS"],"mappings":";;;;;AAKY,MAACA,IAAqB;AAAA,EAChC,MAAM;AAAA,EACN,QAASC,GAAK;AACZ,QAAIC;AACJ,UAAMC,IAAa,SAAS,cAAc,KAAK;AAC/C,aAAS,KAAK,YAAYA,CAAU;AAEpC,UAAMC,IAAoB,OACpBC,IAAwBC,EAAU;AAAA,MACtC,MAAM;AAAA,MACN,YAAY,EAAE,WAAAC,EAAS;AAAA,MACvB,OAAQ;AACN,eAAO;AAAA,UACL,UAAU,CAAA;AA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AAC;AAAA,MAC7E;AAAA,IACN,CAAK;AAED,aAASE,EAAcF,GAAQC,GAAS;AACtC,UAAIA,EAAQ,UAAU,QAAQA,EAAQ,UAAU,QAAW;AACzD,cAAMG,IAAYJ,EAAO,aAAa,oBAAoB;AAC1D,QAAII,KACFd,EAAsB,cAAcc,CAAS;AAE/C;AAAA,MACF;AACA,YAAMA,IAAYJ,EAAO,aAAa,oBAAoB,KAAKK,EAAe;AAE9E,UAAIV;AACJ,UAAI,OAAOM,EAAQ,SAAU;AAC3B,QAAAN,IAAgB;AAAA,UACd,SAASM,EAAQ;AAAA,UACjB,WAAWA,EAAQ,OAAOZ;AAAA,QACpC;AAAA,eACiB,OAAOY,EAAQ,SAAU,YAAYA,EAAQ,UAAU;AAChE,QAAAN,IAAgB;AAAA,UACd,WAAWM,EAAQ,OAAOA,EAAQ,MAAM,aAAaZ;AAAA,UACrD,GAAGY,EAAQ;AAAA,QACrB;AAAA,WACa;AACL,gBAAQ,MAAM,6EAA6E;AAC3F;AAAA,MACF;AAEA,aAAO,KAAKA,EAAQ,SAAS,EAAE,QAAQ,CAAAK,MAAY;AACjD,gBAAQA,GAAQ;AAAA,UACd,KAAK;AACH,YAAAX,EAAc,WAAW;AACzB;AAAA,UACF,KAAK;AACH,YAAAA,EAAc,QAAQ;AACtB;AAAA,UACF,KAAK;AACH,YAAAA,EAAc,aAAa;AAC3B;AAAA,UACF;AACE,YAAIY,EAAmB,SAASD,CAAQ,MACtCX,EAAc,YAAYW;AAE5B;AAAA,QACZ;AAAA,MACM,CAAC,GAEDN,EAAO,aAAa,sBAAsBI,CAAS,GACnDjB,EAAgB,IAAI,mBAAmBiB,GAAWT,CAAa;AAAA,IACjE;AAAA,EACF;AACF;"}
@@ -51,7 +51,12 @@ declare const _default: import('vue').DefineComponent<{
51
51
  lg: string;
52
52
  xl: string;
53
53
  };
54
- }, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
54
+ }, {
55
+ tooltipConfig(): {
56
+ message: any;
57
+ inverted: boolean;
58
+ };
59
+ }, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
55
60
  active: {
56
61
  type: BooleanConstructor;
57
62
  default: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../../../directives/tooltip_directive/tooltip.js"],"names":[],"mappings":";;IAME,iCAwHC"}
1
+ {"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../../../directives/tooltip_directive/tooltip.js"],"names":[],"mappings":";;IAOE,iCAyHC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dialpad/dialtone",
3
- "version": "9.142.0",
3
+ "version": "9.142.2",
4
4
  "description": "Dialpad's Dialtone design system monorepo",
5
5
  "files": [
6
6
  "dist"
@@ -80,10 +80,10 @@
80
80
  "overlayscrollbars": "2.10.0",
81
81
  "regex-combined-emojis": "1.6.0",
82
82
  "tippy.js": "6.3.7",
83
+ "@dialpad/dialtone-tokens": "1.47.1",
83
84
  "@dialpad/dialtone-emojis": "1.2.3",
84
- "@dialpad/dialtone-mcp-server": "1.0.1",
85
85
  "@dialpad/dialtone-icons": "4.44.1",
86
- "@dialpad/dialtone-tokens": "1.47.1"
86
+ "@dialpad/dialtone-mcp-server": "1.0.2"
87
87
  },
88
88
  "devDependencies": {
89
89
  "@commitlint/cli": "^18.4.3",