@dialpad/dialtone-vue 2.114.3 → 2.115.0

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.
@@ -3,22 +3,22 @@ const he = {
3
3
  ERROR: "error",
4
4
  WARNING: "warning",
5
5
  SUCCESS: "success"
6
- }, co = {
6
+ }, uo = {
7
7
  LARGE: "lg",
8
8
  EXTRA_LARGE: "xl"
9
- }, lo = {
9
+ }, co = {
10
10
  xs: "",
11
11
  sm: "",
12
12
  md: "",
13
13
  lg: "d-description--lg",
14
14
  xl: "d-description--xl"
15
- }, fo = {
15
+ }, lo = {
16
16
  xs: "d-label--xs",
17
17
  sm: "d-label--sm",
18
18
  md: "",
19
19
  lg: "d-label--lg",
20
20
  xl: "d-label--xl"
21
- }, po = {
21
+ }, fo = {
22
22
  esc: "Esc",
23
23
  escape: "Escape",
24
24
  tab: "Tab",
@@ -165,7 +165,7 @@ function ir(e) {
165
165
  function or(e, t = "en-US") {
166
166
  return e.replace(new RegExp("^\\p{CWU}", "u"), (n) => n.toLocaleUpperCase(t));
167
167
  }
168
- const vo = {
168
+ const po = {
169
169
  getUniqueString: Zt,
170
170
  getRandomElement: Un,
171
171
  getRandomInt: Qt,
@@ -2096,14 +2096,14 @@ const zi = (e) => ({
2096
2096
  };
2097
2097
  }, Ji = [
2098
2098
  ...qi
2099
- ], eo = ["parent", "body"], to = 300, no = {
2099
+ ], eo = 300, to = {
2100
2100
  hover: "d-tooltip--hover",
2101
2101
  show: "d-tooltip--show",
2102
2102
  inverted: "d-tooltip--inverted",
2103
2103
  hide: "d-tooltip--hide"
2104
- }, ro = [
2104
+ }, no = [
2105
2105
  ...Yi
2106
- ], ho = [!0, !1, "toggle"], io = {
2106
+ ], vo = [!0, !1, "toggle"], ro = {
2107
2107
  name: "DtTooltip",
2108
2108
  components: {
2109
2109
  DtLazyShow: lr
@@ -2118,16 +2118,6 @@ const zi = (e) => ({
2118
2118
  return Zt();
2119
2119
  }
2120
2120
  },
2121
- /**
2122
- * Sets the element to which the popover is going to append to.
2123
- * 'body' will append to the nearest body (supports shadow DOM).
2124
- * @values 'body', 'parent', HTMLElement,
2125
- */
2126
- appendTo: {
2127
- type: [HTMLElement, String],
2128
- default: "body",
2129
- validator: (e) => eo.includes(e) || e instanceof HTMLElement
2130
- },
2131
2121
  /**
2132
2122
  * If the popover does not fit in the direction described by "placement",
2133
2123
  * it will attempt to change its direction to the "fallbackPlacements"
@@ -2208,7 +2198,7 @@ const zi = (e) => ({
2208
2198
  sticky: {
2209
2199
  type: [Boolean, String],
2210
2200
  default: !1,
2211
- validator: (e) => ro.includes(e)
2201
+ validator: (e) => no.includes(e)
2212
2202
  },
2213
2203
  /**
2214
2204
  * Additional css classes for the tooltip content element.
@@ -2287,7 +2277,7 @@ const zi = (e) => ({
2287
2277
  ],
2288
2278
  data() {
2289
2279
  return {
2290
- TOOLTIP_KIND_MODIFIERS: no,
2280
+ TOOLTIP_KIND_MODIFIERS: to,
2291
2281
  tip: null,
2292
2282
  inTimer: null,
2293
2283
  // Internal state for whether the tooltip is shown. Changing the prop
@@ -2297,8 +2287,6 @@ const zi = (e) => ({
2297
2287
  // the placement prop when there is not enough available room for the tip
2298
2288
  // to display and it uses a fallback placement.
2299
2289
  currentPlacement: this.placement,
2300
- // reference to the anchor element
2301
- anchor: null,
2302
2290
  // flag check touch based device
2303
2291
  isTouchDevice: !1
2304
2292
  };
@@ -2322,13 +2310,10 @@ const zi = (e) => ({
2322
2310
  };
2323
2311
  },
2324
2312
  tippyProps() {
2325
- var t, n;
2326
- const e = this.appendTo === "body" ? (n = (t = this.anchor) == null ? void 0 : t.getRootNode()) == null ? void 0 : n.querySelector("body") : this.appendTo;
2327
2313
  return {
2328
2314
  offset: this.offset,
2329
2315
  interactive: !1,
2330
2316
  trigger: "manual",
2331
- appendTo: e,
2332
2317
  placement: this.placement,
2333
2318
  sticky: this.sticky,
2334
2319
  popperOptions: Gi({
@@ -2337,6 +2322,9 @@ const zi = (e) => ({
2337
2322
  onChangePlacement: this.onChangePlacement
2338
2323
  })
2339
2324
  };
2325
+ },
2326
+ anchor() {
2327
+ return this.externalAnchor ? document.body.querySelector(this.externalAnchor) : Zi(this.$refs.anchor);
2340
2328
  }
2341
2329
  },
2342
2330
  watch: {
@@ -2351,19 +2339,16 @@ const zi = (e) => ({
2351
2339
  immediate: !0
2352
2340
  },
2353
2341
  isShown(e) {
2354
- var t, n;
2355
- e ? (this.setProps(), (t = this.tip) == null || t.show()) : (n = this.tip) == null || n.hide();
2342
+ e ? (this.setProps(), this.tip.show()) : this.tip.hide();
2356
2343
  },
2357
2344
  sticky(e) {
2358
- var t;
2359
- (t = this.tip) == null || t.setProps({
2345
+ this.tip.setProps({
2360
2346
  sticky: e
2361
2347
  });
2362
2348
  }
2363
2349
  },
2364
- // eslint-disable-next-line complexity
2365
2350
  mounted() {
2366
- !this.enabled && this.show != null && (console.warn("Tooltip: You cannot use both the enabled and show props at the same time."), console.warn("The show prop will be ignored.")), this.anchor = this.externalAnchor ? document.body.querySelector(this.externalAnchor) : Zi(this.$refs.anchor), this.externalAnchor && this.addExternalAnchorEventListeners(), this.tip = Xi(this.anchor, this.initOptions());
2351
+ !this.enabled && this.show != null && (console.warn("Tooltip: You cannot use both the enabled and show props at the same time."), console.warn("The show prop will be ignored.")), this.externalAnchor && this.addExternalAnchorEventListeners(), this.tip = Xi(this.anchor, this.initOptions()), this.isShown && this.tip.show();
2367
2352
  },
2368
2353
  beforeDestroy() {
2369
2354
  var e;
@@ -2381,7 +2366,7 @@ const zi = (e) => ({
2381
2366
  onEnterAnchor(e) {
2382
2367
  this.isTouchDevice && !e.relatedTarget || (this.delay ? this.inTimer = setTimeout((function(t) {
2383
2368
  this.triggerShow(t);
2384
- }).bind(this, e), to) : this.triggerShow(e), this.isTouchDevice = !1);
2369
+ }).bind(this, e), eo) : this.triggerShow(e), this.isTouchDevice = !1);
2385
2370
  },
2386
2371
  triggerShow(e) {
2387
2372
  e.type === "focusin" ? this.show === null && this.hasVisibleFocus() && (this.isShown = !0) : this.show === null && (this.isShown = !0);
@@ -2411,16 +2396,12 @@ const zi = (e) => ({
2411
2396
  onMount() {
2412
2397
  this.setProps();
2413
2398
  },
2414
- onCreate(e) {
2415
- this.isShown && e.show();
2416
- },
2417
2399
  initOptions() {
2418
2400
  return {
2419
2401
  contentElement: this.$refs.content.$el,
2420
2402
  allowHTML: !0,
2421
2403
  zIndex: this.calculateAnchorZindex(),
2422
2404
  onMount: this.onMount,
2423
- onCreate: this.onCreate,
2424
2405
  ...this.tippyProps
2425
2406
  };
2426
2407
  },
@@ -2443,7 +2424,7 @@ const zi = (e) => ({
2443
2424
  }
2444
2425
  }
2445
2426
  };
2446
- var oo = function() {
2427
+ var io = function() {
2447
2428
  var t = this, n = t._self._c;
2448
2429
  return n("div", { attrs: { "data-qa": "dt-tooltip-container" } }, [t.externalAnchor ? t._e() : n("span", { ref: "anchor", attrs: { "data-qa": "dt-tooltip-anchor" }, on: { focusin: t.onEnterAnchor, focusout: t.onLeaveAnchor, mouseenter: t.onEnterAnchor, mouseleave: t.onLeaveAnchor, keydown: function(r) {
2449
2430
  return !r.type.indexOf("key") && t._k(r.keyCode, "esc", 27, r.key, ["Esc", "Escape"]) ? null : t.onLeaveAnchor.apply(null, arguments);
@@ -2457,22 +2438,22 @@ var oo = function() {
2457
2438
  ], attrs: { id: t.id, show: t.isVisible, role: "tooltip", "aria-hidden": "false", "data-qa": "dt-tooltip", appear: "", transition: t.transition } }, t.tooltipListeners), [t._t("default", function() {
2458
2439
  return [t._v(" " + t._s(t.message) + " ")];
2459
2440
  })], 2)], 1);
2460
- }, ao = [], so = /* @__PURE__ */ un(
2441
+ }, oo = [], ao = /* @__PURE__ */ un(
2442
+ ro,
2461
2443
  io,
2462
2444
  oo,
2463
- ao,
2464
2445
  !1,
2465
2446
  null,
2466
2447
  null,
2467
2448
  null,
2468
2449
  null
2469
2450
  );
2470
- const mo = so.exports;
2451
+ const ho = ao.exports;
2471
2452
  export {
2472
2453
  qi as B,
2473
- mo as D,
2474
- po as E,
2475
- fo as L,
2454
+ ho as D,
2455
+ fo as E,
2456
+ lo as L,
2476
2457
  Ji as T,
2477
2458
  he as V,
2478
2459
  Un as a,
@@ -2480,23 +2461,23 @@ export {
2480
2461
  lr as c,
2481
2462
  Gi as d,
2482
2463
  Xi as e,
2483
- to as f,
2464
+ eo as f,
2484
2465
  Zt as g,
2485
2466
  an as h,
2486
2467
  Gn as i,
2487
2468
  Wn as j,
2488
2469
  Jt as k,
2489
2470
  er as l,
2490
- lo as m,
2471
+ co as m,
2491
2472
  un as n,
2492
2473
  or as o,
2493
- co as p,
2474
+ uo as p,
2494
2475
  kn as q,
2495
2476
  Fn as r,
2496
2477
  ir as s,
2497
2478
  ze as t,
2498
- vo as u,
2499
- no as v,
2500
- ro as w,
2501
- ho as x
2479
+ po as u,
2480
+ to as v,
2481
+ no as w,
2482
+ vo as x
2502
2483
  };
@@ -6,19 +6,6 @@ declare const _default: import("vue").DefineComponent<{
6
6
  type: StringConstructor;
7
7
  default(): string;
8
8
  };
9
- /**
10
- * Sets the element to which the popover is going to append to.
11
- * 'body' will append to the nearest body (supports shadow DOM).
12
- * @values 'body', 'parent', HTMLElement,
13
- */
14
- appendTo: {
15
- type: (StringConstructor | {
16
- new (): HTMLElement;
17
- prototype: HTMLElement;
18
- })[];
19
- default: string;
20
- validator: (appendTo: unknown) => boolean;
21
- };
22
9
  /**
23
10
  * If the popover does not fit in the direction described by "placement",
24
11
  * it will attempt to change its direction to the "fallbackPlacements"
@@ -169,7 +156,6 @@ declare const _default: import("vue").DefineComponent<{
169
156
  inTimer: null;
170
157
  isShown: boolean;
171
158
  currentPlacement: any;
172
- anchor: null;
173
159
  isTouchDevice: boolean;
174
160
  }, {
175
161
  isVisible(): any;
@@ -181,7 +167,6 @@ declare const _default: import("vue").DefineComponent<{
181
167
  offset: any;
182
168
  interactive: boolean;
183
169
  trigger: string;
184
- appendTo: any;
185
170
  placement: any;
186
171
  sticky: any;
187
172
  popperOptions: {
@@ -216,6 +201,7 @@ declare const _default: import("vue").DefineComponent<{
216
201
  })[];
217
202
  };
218
203
  };
204
+ anchor(): any;
219
205
  }, {
220
206
  calculateAnchorZindex(): 651 | 400;
221
207
  hasVisibleFocus(): any;
@@ -228,12 +214,10 @@ declare const _default: import("vue").DefineComponent<{
228
214
  onEnterTransitionComplete(): void;
229
215
  setProps(): void;
230
216
  onMount(): void;
231
- onCreate(instance: any): void;
232
217
  initOptions(): {
233
218
  offset: any;
234
219
  interactive: boolean;
235
220
  trigger: string;
236
- appendTo: any;
237
221
  placement: any;
238
222
  sticky: any;
239
223
  popperOptions: {
@@ -271,7 +255,6 @@ declare const _default: import("vue").DefineComponent<{
271
255
  allowHTML: boolean;
272
256
  zIndex: number;
273
257
  onMount: () => void;
274
- onCreate: (instance: any) => void;
275
258
  };
276
259
  addExternalAnchorEventListeners(): void;
277
260
  removeExternalAnchorEventListeners(): void;
@@ -284,19 +267,6 @@ declare const _default: import("vue").DefineComponent<{
284
267
  type: StringConstructor;
285
268
  default(): string;
286
269
  };
287
- /**
288
- * Sets the element to which the popover is going to append to.
289
- * 'body' will append to the nearest body (supports shadow DOM).
290
- * @values 'body', 'parent', HTMLElement,
291
- */
292
- appendTo: {
293
- type: (StringConstructor | {
294
- new (): HTMLElement;
295
- prototype: HTMLElement;
296
- })[];
297
- default: string;
298
- validator: (appendTo: unknown) => boolean;
299
- };
300
270
  /**
301
271
  * If the popover does not fit in the direction described by "placement",
302
272
  * it will attempt to change its direction to the "fallbackPlacements"
@@ -445,7 +415,6 @@ declare const _default: import("vue").DefineComponent<{
445
415
  transition: string;
446
416
  offset: unknown[];
447
417
  fallbackPlacements: unknown[];
448
- appendTo: string | HTMLElement;
449
418
  delay: boolean;
450
419
  placement: string;
451
420
  sticky: string | boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"tooltip.vue.d.ts","sourceRoot":"","sources":["../../../../components/tooltip/tooltip.vue.js"],"names":[],"mappings":";IA8BI;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA7JH;;OAEG;;;;;IAMH;;;;;;;;;;;;SAYK;;;;;IAML;;;OAGG;;;;;IAMH;;;;;;;;;;OAUG;;;;;IAMH;;;;;;;;;;;;;;OAcG;;;;;;IASH;;;;;;;;;;;;;;OAcG;;;;;;IASH;;;;OAIG;;;;;IAMH;;OAEG;;;;;IAMH;;;;OAIG;;;;;IAMH;;;;;OAKG;;;;;IAMH;;;OAGG;;;;;IAMH;;;OAGG;;;;;IAMH;;;OAGG"}
@@ -1,5 +1,4 @@
1
1
  export const TOOLTIP_DIRECTIONS: string[];
2
- export const TOOLTIP_APPEND_TO_VALUES: string[];
3
2
  export const TOOLTIP_DELAY_MS: 300;
4
3
  export namespace TOOLTIP_KIND_MODIFIERS {
5
4
  let hover: string;
@@ -11,7 +10,6 @@ export const TOOLTIP_STICKY_VALUES: (string | boolean)[];
11
10
  export const TOOLTIP_HIDE_ON_CLICK_VARIANTS: (string | boolean)[];
12
11
  declare namespace _default {
13
12
  export { TOOLTIP_DIRECTIONS };
14
- export { TOOLTIP_APPEND_TO_VALUES };
15
13
  export { TOOLTIP_DELAY_MS };
16
14
  export { TOOLTIP_KIND_MODIFIERS };
17
15
  export { TOOLTIP_STICKY_VALUES };
@@ -1 +1 @@
1
- {"version":3,"file":"tooltip_constants.d.ts","sourceRoot":"","sources":["../../../../components/tooltip/tooltip_constants.js"],"names":[],"mappings":"AAKA,0CAEE;AACF,gDAA2D;AAC3D,mCAAoC;;;;;;;AASpC,yDAEE;AAEF,kEAAsE"}
1
+ {"version":3,"file":"tooltip_constants.d.ts","sourceRoot":"","sources":["../../../../components/tooltip/tooltip_constants.js"],"names":[],"mappings":"AAKA,0CAEE;AAEF,mCAAoC;;;;;;;AASpC,yDAEE;AAEF,kEAAsE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dialpad/dialtone-vue",
3
- "version": "2.114.3",
3
+ "version": "2.115.0",
4
4
  "description": "Vue component library for Dialpad's design system Dialtone",
5
5
  "files": [
6
6
  "dist",