@dialpad/dialtone-vue 2.103.0 → 2.104.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.
Files changed (47) hide show
  1. package/CHANGELOG.json +1 -1
  2. package/CHANGELOG.md +36 -0
  3. package/dist/component-documentation.json +1 -1
  4. package/dist/dialtone-vue.cjs +6 -6
  5. package/dist/dialtone-vue.js +1846 -3462
  6. package/dist/directives.cjs +1 -1
  7. package/dist/directives.js +4 -3
  8. package/dist/emoji-098966fd.js +911 -0
  9. package/dist/emoji-d5a5af5e.cjs +1 -0
  10. package/dist/emoji.cjs +1 -1
  11. package/dist/emoji.js +26 -24
  12. package/dist/style.css +1 -1
  13. package/dist/tooltip-da61b649.cjs +1 -0
  14. package/dist/tooltip-fceff4af.js +706 -0
  15. package/dist/types/common/dates.d.ts.map +1 -1
  16. package/dist/types/common/storybook_utils.d.ts.map +1 -1
  17. package/dist/types/components/avatar/avatar.vue.d.ts +1 -1
  18. package/dist/types/components/button/button.vue.d.ts +1 -1
  19. package/dist/types/components/chip/chip.vue.d.ts +1 -1
  20. package/dist/types/components/description_list/description_list.vue.d.ts +98 -0
  21. package/dist/types/components/description_list/description_list.vue.d.ts.map +1 -0
  22. package/dist/types/components/description_list/description_list_constants.d.ts +2 -0
  23. package/dist/types/components/description_list/description_list_constants.d.ts.map +1 -0
  24. package/dist/types/components/description_list/description_list_validators.d.ts +2 -0
  25. package/dist/types/components/description_list/description_list_validators.d.ts.map +1 -0
  26. package/dist/types/components/description_list/index.d.ts +3 -0
  27. package/dist/types/components/description_list/index.d.ts.map +1 -0
  28. package/dist/types/components/icon/icon.vue.d.ts +16 -2
  29. package/dist/types/components/icon/icon.vue.d.ts.map +1 -1
  30. package/dist/types/components/icon/icon_constants.d.ts +0 -2
  31. package/dist/types/components/icon/icon_constants.d.ts.map +1 -1
  32. package/dist/types/components/input/input.vue.d.ts +1 -1
  33. package/dist/types/components/modal/modal.vue.d.ts +1 -1
  34. package/dist/types/components/root_layout/root_layout.vue.d.ts +2 -2
  35. package/dist/types/components/toast/toast.vue.d.ts +1 -1
  36. package/dist/types/components/tooltip/tooltip.vue.d.ts +2 -2
  37. package/dist/types/components/tooltip/tooltip_variants.vue.d.ts +1 -1
  38. package/dist/types/index.d.ts +1 -0
  39. package/dist/types/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.d.ts +1 -1
  40. package/dist/types/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.d.ts +1 -1
  41. package/package.json +13 -6
  42. package/dist/emoji-9ef04a92.cjs +0 -1
  43. package/dist/emoji-efd28b85.js +0 -58697
  44. package/dist/tooltip-92c086de.js +0 -2544
  45. package/dist/tooltip-9b93ec5a.cjs +0 -25
  46. package/dist/types/components/plugins/fixDefaultSlot.d.ts +0 -5
  47. package/dist/types/components/plugins/fixDefaultSlot.d.ts.map +0 -1
@@ -0,0 +1,706 @@
1
+ import S, { sticky as v } from "/home/runner/work/dialtone-vue/dialtone-vue/node_modules/tippy.js/dist/tippy.esm.js";
2
+ import y from "vue";
3
+ import { n as l } from "./_plugin-vue2_normalizer-71e2aa87.js";
4
+ const r = {
5
+ ERROR: "error",
6
+ WARNING: "warning",
7
+ SUCCESS: "success"
8
+ }, Ee = {
9
+ LARGE: "lg",
10
+ EXTRA_LARGE: "xl"
11
+ }, ge = {
12
+ xs: "",
13
+ sm: "",
14
+ md: "",
15
+ lg: "d-description--lg",
16
+ xl: "d-description--xl"
17
+ }, we = {
18
+ xs: "d-label--xs",
19
+ sm: "d-label--sm",
20
+ md: "",
21
+ lg: "d-label--lg",
22
+ xl: "d-label--xl"
23
+ }, _e = {
24
+ esc: "Esc",
25
+ escape: "Escape",
26
+ tab: "Tab",
27
+ enter: "Enter",
28
+ space: "Space",
29
+ spacebar: "Spacebar",
30
+ up: "Up",
31
+ arrowup: "ArrowUp",
32
+ left: "Left",
33
+ arrowleft: "ArrowLeft",
34
+ right: "Right",
35
+ arrowright: "ArrowRight",
36
+ down: "Down",
37
+ arrowdown: "ArrowDown",
38
+ home: "Home",
39
+ end: "End"
40
+ }, x = r.ERROR, A = "dt";
41
+ let b = 0, a;
42
+ const R = typeof setImmediate == "function" ? setImmediate : setTimeout;
43
+ function c(e = A) {
44
+ return `${e}${b++}`;
45
+ }
46
+ function T(e, t) {
47
+ if (t) {
48
+ const n = I(t);
49
+ return e[Math.abs(n) % e.length];
50
+ } else
51
+ return e[u(e.length)];
52
+ }
53
+ function I(e) {
54
+ let t;
55
+ for (let n = 0; n < e.length; n++)
56
+ t = Math.imul(31, t) + e.charCodeAt(n) | 0;
57
+ return t;
58
+ }
59
+ function u(e) {
60
+ return Math.floor(Math.random() * e);
61
+ }
62
+ function L(e) {
63
+ return e ? e.map((t) => typeof t == "string" ? {
64
+ message: t,
65
+ type: x
66
+ } : t) : [];
67
+ }
68
+ function P(e) {
69
+ const t = h(e);
70
+ return !e || !t ? [] : e.filter((n) => !!n.message && n.type === t);
71
+ }
72
+ function h(e) {
73
+ return e ? s(e, r.ERROR) ? r.ERROR : s(e, r.WARNING) ? r.WARNING : s(e, r.SUCCESS) ? r.SUCCESS : null : null;
74
+ }
75
+ function s(e, t) {
76
+ return !e || !t ? !1 : e.some((n) => (n == null ? void 0 : n.type) === t);
77
+ }
78
+ const O = {
79
+ name: "html-fragment",
80
+ functional: !0,
81
+ props: ["html"],
82
+ render(e, t) {
83
+ return new y({
84
+ // eslint-disable-next-line vue/multi-word-component-names
85
+ name: "Inner",
86
+ beforeCreate() {
87
+ this.$createElement = e;
88
+ },
89
+ template: `<div>${t.props.html}</div>`
90
+ }).$mount()._vnode.children;
91
+ }
92
+ }, C = () => new Promise((e) => {
93
+ R(e);
94
+ }), N = (e) => e == null ? void 0 : e.toLowerCase().split("-").map((t) => t.charAt(0).toUpperCase() + t.slice(1)).join("");
95
+ function $(e, t = 300) {
96
+ clearTimeout(a), a = setTimeout(e, t);
97
+ }
98
+ function D(e) {
99
+ const t = e.getBoundingClientRect(), n = {
100
+ top: t.top < 0,
101
+ left: t.left < 0,
102
+ bottom: t.bottom > (window.innerHeight || document.documentElement.clientHeight),
103
+ right: t.right > (window.innerWidth || document.documentElement.clientWidth)
104
+ };
105
+ return n.any = Object.values(n).some((o) => o), n.all = Object.values(n).every((o) => o), n;
106
+ }
107
+ const k = /(?:(?:[^\s!@#$%^&*()_=+[\]{}\\|;:'",.<>/?]+)\.)/, z = new RegExp(
108
+ "(?:com|ru|org|net|de|jp|uk|br|it|pl|fr|in|au|ir|info|nl|cn|es|cz|kr|ca|eu|ua|co|gr|za|ro|biz|ch|se|tw|mx|vn|hu|be|tr|at|dk|tv|me|ar|sk|no|us|fi|id|cl|xyz|io|pt|by|il|ie|nz|kz|hk|lt|cc|my|sg|club|bg|edu|рф|pk|su|top|th|hr|rs|pe|pro|si|az|lv|pw|ae|ph|online|ng|ee|ws|ve|cat)"
109
+ ), U = new RegExp(
110
+ "(?:(?:[0-9]|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])\\.){3}(?:[0-9]|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])"
111
+ ), d = new RegExp(
112
+ "(?:" + [
113
+ [
114
+ k.source,
115
+ z.source
116
+ ].join("+"),
117
+ U.source
118
+ ].join("|") + ")"
119
+ ), F = /(?:(?:[;/][^#?<>\s]*)?)/, p = /(?:(?:\?[^#<>\s]+)?(?:#[^<>\s]+)?)/, f = new RegExp(
120
+ "\\b" + [
121
+ d.source,
122
+ F.source,
123
+ p.source,
124
+ "(?!\\w)"
125
+ ].join("+")
126
+ ), m = /\b[a-z\d.-]+:\/\/[^<>\s]+/, E = new RegExp(
127
+ "(?:mailto:)?[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@" + [
128
+ d.source,
129
+ p.source
130
+ ].join("+") + "(?!\\w)"
131
+ );
132
+ function g(e = 7, t = 15) {
133
+ let n = !0;
134
+ try {
135
+ RegExp("(?<=\\W)");
136
+ } catch {
137
+ n = !1;
138
+ }
139
+ return new RegExp(
140
+ `${n ? "(?:^|(?<=\\W))" : ""}(?![\\s\\-])\\+?(?:[0-9()\\- \\t]{${e},${t}})(?=\\b)(?=\\W(?=\\W|$)|\\s|$)`
141
+ );
142
+ }
143
+ const w = g(), M = new RegExp(
144
+ [
145
+ f.source,
146
+ m.source,
147
+ E.source,
148
+ w.source
149
+ ].join("|"),
150
+ "gi"
151
+ );
152
+ function V(e) {
153
+ var t;
154
+ return !e || !["string", "number"].includes(typeof e) ? !1 : (e = e.toString(), ((t = w.exec(e)) == null ? void 0 : t[0]) === e);
155
+ }
156
+ function j(e) {
157
+ var t, n;
158
+ return !e || typeof e != "string" ? !1 : ((t = f.exec(e)) == null ? void 0 : t[0]) === e || ((n = m.exec(e)) == null ? void 0 : n[0]) === e;
159
+ }
160
+ function B(e) {
161
+ var t;
162
+ return !e || typeof e != "string" ? !1 : ((t = E.exec(e)) == null ? void 0 : t[0]) === e;
163
+ }
164
+ function Y(e) {
165
+ return e.filter((t) => !!t).join(" ");
166
+ }
167
+ function H(e, t = "en-US") {
168
+ return e.replace(/^\p{CWU}/u, (n) => n.toLocaleUpperCase(t));
169
+ }
170
+ const Se = {
171
+ getUniqueString: c,
172
+ getRandomElement: T,
173
+ getRandomInt: u,
174
+ formatMessages: L,
175
+ filterFormattedMessages: P,
176
+ hasFormattedMessageOfType: s,
177
+ getValidationState: h,
178
+ htmlFragment: O,
179
+ flushPromises: C,
180
+ kebabCaseToPascalCase: N,
181
+ debounce: $,
182
+ isOutOfViewPort: D,
183
+ getPhoneNumberRegex: g,
184
+ linkRegex: M,
185
+ isEmailAddress: B,
186
+ isPhoneNumber: V,
187
+ isURL: j,
188
+ safeConcatStrings: Y,
189
+ capitalizeFirstLetter: H
190
+ }, q = {
191
+ name: "DtLazyShow",
192
+ /******************
193
+ * PROPS *
194
+ ******************/
195
+ props: {
196
+ /**
197
+ * Whether the child slot is shown.
198
+ * @values true, false
199
+ */
200
+ show: {
201
+ type: Boolean,
202
+ default: !1
203
+ },
204
+ /**
205
+ * A valid Vue enter/leave CSS transition name.
206
+ */
207
+ transition: {
208
+ type: String,
209
+ default: null
210
+ },
211
+ /**
212
+ * Enable/Disable transition animation
213
+ * @values true, false
214
+ */
215
+ appear: {
216
+ type: Boolean,
217
+ default: !1
218
+ }
219
+ },
220
+ /******************
221
+ * DATA *
222
+ ******************/
223
+ data() {
224
+ return {
225
+ initialized: !!this.show
226
+ };
227
+ },
228
+ computed: {
229
+ /**
230
+ * Set the css property to false when running tests only.
231
+ * Refer to: https://vuejs.org/guide/built-ins/transition.html#javascript-hooks for details about
232
+ * transition `css` property
233
+ * @returns {boolean}
234
+ */
235
+ isCSSEnabled() {
236
+ return process.env.NODE_ENV !== "test";
237
+ }
238
+ },
239
+ /******************
240
+ * WATCH *
241
+ ******************/
242
+ watch: {
243
+ show: function(e) {
244
+ !e || this.initialized || (this.initialized = !0);
245
+ }
246
+ }
247
+ };
248
+ var G = function() {
249
+ var t = this, n = t._self._c;
250
+ return n("transition", t._g({ attrs: { name: t.transition, appear: t.appear, css: t.isCSSEnabled } }, t.$listeners), [n("div", t._g({ directives: [{ name: "show", rawName: "v-show", value: t.show, expression: "show" }] }, t.$listeners), [t.initialized ? t._t("default") : t._e()], 2)]);
251
+ }, K = [], W = /* @__PURE__ */ l(
252
+ q,
253
+ G,
254
+ K,
255
+ !1,
256
+ null,
257
+ null,
258
+ null,
259
+ null
260
+ );
261
+ const Z = W.exports, Q = (e) => ({
262
+ name: "arrowDetected",
263
+ enabled: !0,
264
+ phase: "main",
265
+ fn: e,
266
+ requiresIfExists: ["offset"]
267
+ }), X = [
268
+ "bottom",
269
+ "bottom-start",
270
+ "bottom-end",
271
+ "right",
272
+ "right-start",
273
+ "right-end",
274
+ "left",
275
+ "left-start",
276
+ "left-end",
277
+ "top",
278
+ "top-start",
279
+ "top-end"
280
+ ], J = [!0, !1, "reference", "popper"], ee = (e, t) => {
281
+ const { contentElement: n } = { ...t };
282
+ return delete t.contentElement, S(e, {
283
+ ...t,
284
+ plugins: [v],
285
+ render: () => re(n)
286
+ });
287
+ }, te = ({
288
+ boundary: e = "clippingParents",
289
+ fallbackPlacements: t = [],
290
+ onChangePlacement: n = () => {
291
+ },
292
+ hasHideModifierEnabled: o = !1,
293
+ // If set to false the dialog will display over top of the anchor when there is insufficient space.
294
+ // if set to true it will never move from its position relative to the anchor and will clip instead.
295
+ tether: i = !0
296
+ } = {}) => ({
297
+ modifiers: [
298
+ {
299
+ name: "flip",
300
+ options: {
301
+ fallbackPlacements: t,
302
+ boundary: e
303
+ }
304
+ },
305
+ {
306
+ name: "hide",
307
+ enabled: o
308
+ },
309
+ {
310
+ name: "preventOverflow",
311
+ options: {
312
+ altAxis: !i,
313
+ tether: i
314
+ }
315
+ },
316
+ Q(({ state: _ }) => {
317
+ n(_.placement);
318
+ })
319
+ ]
320
+ }), ne = (e) => {
321
+ const t = document.createElement("span");
322
+ return t.innerText = e.innerText || "", e.innerText = "", e.appendChild(t), t;
323
+ }, oe = (e) => {
324
+ const t = e == null ? void 0 : e.children[0];
325
+ return t || ne(e);
326
+ }, re = (e) => {
327
+ const t = document.createElement("div");
328
+ return t.className = "tippy-box d-ps-absolute", t.appendChild(e), {
329
+ popper: t
330
+ };
331
+ }, se = [
332
+ ...X
333
+ ], ie = 300, ae = {
334
+ hover: "d-tooltip--hover",
335
+ show: "d-tooltip--show",
336
+ inverted: "d-tooltip--inverted",
337
+ hide: "d-tooltip--hide"
338
+ }, le = [
339
+ ...J
340
+ ], ve = [!0, !1, "toggle"];
341
+ const ce = {
342
+ name: "DtTooltip",
343
+ components: {
344
+ DtLazyShow: Z
345
+ },
346
+ props: {
347
+ /**
348
+ * The id of the tooltip
349
+ */
350
+ id: {
351
+ type: String,
352
+ default() {
353
+ return c();
354
+ }
355
+ },
356
+ /**
357
+ * If the popover does not fit in the direction described by "placement",
358
+ * it will attempt to change its direction to the "fallbackPlacements"
359
+ * if defined, otherwise it will automatically position to a new location
360
+ * as it sees best fit. See
361
+ * <a
362
+ * class="d-link"
363
+ * href="https://popper.js.org/docs/v2/modifiers/flip/#fallbackplacements"
364
+ * target="_blank"
365
+ * >
366
+ * Popper.js docs
367
+ * </a>
368
+ * */
369
+ fallbackPlacements: {
370
+ type: Array,
371
+ default: () => ["auto"]
372
+ },
373
+ /**
374
+ * If true, applies inverted styles to the tooltip
375
+ * @values true, false
376
+ */
377
+ inverted: {
378
+ type: Boolean,
379
+ default: !1
380
+ },
381
+ /**
382
+ * Displaces the tooltip from its reference element
383
+ * by the specified number of pixels. See
384
+ * <a
385
+ * class="d-link"
386
+ * href="https://atomiks.github.io/tippyjs/v6/all-props/#offset"
387
+ * target="_blank"
388
+ * >
389
+ * Tippy.js docs
390
+ * </a>
391
+ */
392
+ offset: {
393
+ type: Array,
394
+ default: () => [0, -4]
395
+ },
396
+ /**
397
+ * The direction the popover displays relative to the anchor. See
398
+ * <a
399
+ * class="d-link"
400
+ * href="https://atomiks.github.io/tippyjs/v6/all-props/#placement"
401
+ * target="_blank"
402
+ * >
403
+ * Tippy.js docs
404
+ * </a>
405
+ * @values top, top-start, top-end,
406
+ * right, right-start, right-end,
407
+ * left, left-start, left-end,
408
+ * bottom, bottom-start, bottom-end,
409
+ * auto, auto-start, auto-end
410
+ */
411
+ placement: {
412
+ type: String,
413
+ default: "top",
414
+ validator(e) {
415
+ return se.includes(e);
416
+ }
417
+ },
418
+ /**
419
+ * If the tooltip sticks to the anchor. This is usually not needed, but can be needed
420
+ * if the reference element's position is animating, or to automatically update the popover
421
+ * position in those cases the DOM layout changes the reference element's position.
422
+ * `true` enables it, `reference` only checks the "reference" rect for changes and `popper` only
423
+ * checks the "popper" rect for changes. See
424
+ * <a
425
+ * class="d-link"
426
+ * href="https://atomiks.github.io/tippyjs/v6/all-props/#sticky"
427
+ * target="_blank"
428
+ * >
429
+ * Tippy.js docs
430
+ * </a>
431
+ * @values true, false, reference, popper
432
+ */
433
+ sticky: {
434
+ type: [Boolean, String],
435
+ default: !1,
436
+ validator: (e) => le.includes(e)
437
+ },
438
+ /**
439
+ * Additional css classes for the tooltip content element.
440
+ * Can accept all of String, Object, and Array, i.e. has the
441
+ * same api as Vue's built-in handling of the class attribute.
442
+ */
443
+ contentClass: {
444
+ type: [String, Object, Array],
445
+ default: ""
446
+ },
447
+ /**
448
+ * A provided message for the tooltip content
449
+ */
450
+ message: {
451
+ type: String,
452
+ default: ""
453
+ },
454
+ /**
455
+ * Controls whether hover/focus causes the tooltip to appear.
456
+ * Cannot be combined with the show prop. show value will be ignored.
457
+ * by default this is true, if you override with false, the tooltip will never show up.
458
+ */
459
+ enabled: {
460
+ type: Boolean,
461
+ default: !0
462
+ },
463
+ /**
464
+ * Controls whether the tooltip is shown. Leaving this null will have the tooltip trigger on mouseover by default.
465
+ * If you set this value, the default mouseover behavior will be disabled and you can control it as you need.
466
+ * Supports .sync modifier
467
+ * @values null, true, false
468
+ */
469
+ show: {
470
+ type: Boolean,
471
+ default: null
472
+ },
473
+ /**
474
+ * Named transition when the content display is toggled.
475
+ * @see DtLazyShow
476
+ */
477
+ transition: {
478
+ type: String,
479
+ default: "fade"
480
+ },
481
+ /**
482
+ * Whether the tooltip will have a delay when being focused or moused over.
483
+ * @values true, false
484
+ */
485
+ delay: {
486
+ type: Boolean,
487
+ default: !0
488
+ },
489
+ /**
490
+ * External anchor id to use in those cases the anchor can't be provided via the slot.
491
+ * For instance, using the combobox's input as the anchor for the popover.
492
+ */
493
+ externalAnchor: {
494
+ type: String,
495
+ default: null
496
+ }
497
+ },
498
+ emits: [
499
+ /**
500
+ * Emitted when tooltip is shown or hidden
501
+ *
502
+ * @event shown
503
+ * @type {Boolean}
504
+ */
505
+ "shown",
506
+ /**
507
+ * Sync show value
508
+ *
509
+ * @event update:show
510
+ */
511
+ "update:show"
512
+ ],
513
+ data() {
514
+ return {
515
+ TOOLTIP_KIND_MODIFIERS: ae,
516
+ tip: null,
517
+ inTimer: null,
518
+ // Internal state for whether the tooltip is shown. Changing the prop
519
+ // will update this.
520
+ isShown: !1,
521
+ // this is where the placement currently is, this can be different than
522
+ // the placement prop when there is not enough available room for the tip
523
+ // to display and it uses a fallback placement.
524
+ currentPlacement: this.placement
525
+ };
526
+ },
527
+ computed: {
528
+ // whether the tooltip is visible or not.
529
+ isVisible() {
530
+ return this.isShown && this.enabled && (!!this.message.trim() || !!this.$slots.default);
531
+ },
532
+ tooltipListeners() {
533
+ return {
534
+ ...this.$listeners,
535
+ "after-leave": () => {
536
+ this.onLeaveTransitionComplete();
537
+ },
538
+ "after-enter": () => {
539
+ this.onEnterTransitionComplete();
540
+ }
541
+ };
542
+ },
543
+ tippyProps() {
544
+ return {
545
+ offset: this.offset,
546
+ interactive: !1,
547
+ trigger: "manual",
548
+ placement: this.placement,
549
+ sticky: this.sticky,
550
+ popperOptions: te({
551
+ fallbackPlacements: this.fallbackPlacements,
552
+ hasHideModifierEnabled: !0,
553
+ onChangePlacement: this.onChangePlacement
554
+ })
555
+ };
556
+ },
557
+ anchor() {
558
+ return this.externalAnchor ? document.body.querySelector(this.externalAnchor) : oe(this.$refs.anchor);
559
+ }
560
+ },
561
+ watch: {
562
+ tippyProps: {
563
+ handler: "setProps",
564
+ deep: !0
565
+ },
566
+ show: {
567
+ handler: function(e) {
568
+ e !== null && (this.isShown = e);
569
+ },
570
+ immediate: !0
571
+ },
572
+ isShown(e) {
573
+ e ? (this.setProps(), this.tip.show()) : this.tip.hide();
574
+ },
575
+ sticky(e) {
576
+ this.tip.setProps({
577
+ sticky: e
578
+ });
579
+ }
580
+ },
581
+ mounted() {
582
+ !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 = ee(this.anchor, this.initOptions()), this.isShown && this.tip.show();
583
+ },
584
+ beforeDestroy() {
585
+ var e;
586
+ this.externalAnchor && this.removeExternalAnchorEventListeners(), this.tip && ((e = this.tip) == null || e.destroy());
587
+ },
588
+ methods: {
589
+ calculateAnchorZindex() {
590
+ return this.$el.getRootNode().querySelector('.d-modal[aria-hidden="false"], .d-modal--transparent[aria-hidden="false"]') || // Special case because we don't have any dialtone drawer component yet. Render at 651 when
591
+ // anchor of popover is within a drawer.
592
+ this.$el.closest(".d-zi-drawer") ? 651 : 400;
593
+ },
594
+ hasVisibleFocus() {
595
+ return this.anchor.matches(":focus-visible");
596
+ },
597
+ onEnterAnchor(e) {
598
+ this.delay ? this.inTimer = setTimeout((function(t) {
599
+ this.triggerShow(t);
600
+ }).bind(this, e), ie) : this.triggerShow(e);
601
+ },
602
+ triggerShow(e) {
603
+ e.type === "focusin" ? this.show === null && this.hasVisibleFocus() && (this.isShown = !0) : this.show === null && (this.isShown = !0);
604
+ },
605
+ onLeaveAnchor(e) {
606
+ e.type === "keydown" && e.code !== "Escape" || (clearTimeout(this.inTimer), this.triggerHide());
607
+ },
608
+ triggerHide() {
609
+ this.show === null && (this.isShown = !1);
610
+ },
611
+ onChangePlacement(e) {
612
+ this.currentPlacement = e;
613
+ },
614
+ onLeaveTransitionComplete() {
615
+ var e;
616
+ (e = this.tip) == null || e.unmount(), this.$emit("shown", !1), this.show !== null && this.$emit("update:show", !1);
617
+ },
618
+ onEnterTransitionComplete() {
619
+ this.$emit("shown", !0), this.show !== null && this.$emit("update:show", !0);
620
+ },
621
+ setProps() {
622
+ this.tip && this.tip.setProps && this.tip.setProps({
623
+ ...this.tippyProps,
624
+ zIndex: this.calculateAnchorZindex()
625
+ });
626
+ },
627
+ onMount() {
628
+ this.setProps();
629
+ },
630
+ initOptions() {
631
+ return {
632
+ contentElement: this.$refs.content.$el,
633
+ allowHTML: !0,
634
+ zIndex: this.calculateAnchorZindex(),
635
+ onMount: this.onMount,
636
+ ...this.tippyProps
637
+ };
638
+ },
639
+ addExternalAnchorEventListeners() {
640
+ ["focusin", "mouseenter"].forEach((e) => {
641
+ this.anchor.addEventListener(e, (t) => this.onEnterAnchor(t));
642
+ }), ["focusout", "mouseleave", "keydown"].forEach((e) => {
643
+ this.anchor.addEventListener(e, (t) => this.onLeaveAnchor(t));
644
+ });
645
+ },
646
+ removeExternalAnchorEventListeners() {
647
+ ["focusin", "mouseenter"].forEach((e) => {
648
+ this.anchor.removeEventListener(e, (t) => this.onEnterAnchor(t));
649
+ }), ["focusout", "mouseleave", "keydown"].forEach((e) => {
650
+ this.anchor.removeEventListener(e, (t) => this.onLeaveAnchor(t));
651
+ });
652
+ }
653
+ }
654
+ };
655
+ var ue = function() {
656
+ var t = this, n = t._self._c;
657
+ 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(o) {
658
+ return !o.type.indexOf("key") && t._k(o.keyCode, "esc", 27, o.key, ["Esc", "Escape"]) ? null : t.onLeaveAnchor.apply(null, arguments);
659
+ } } }, [t._t("anchor")], 2), n("dt-lazy-show", t._g({ ref: "content", class: [
660
+ "d-tooltip",
661
+ `d-tooltip__arrow-tippy--${t.currentPlacement}`,
662
+ {
663
+ [t.TOOLTIP_KIND_MODIFIERS.inverted]: t.inverted
664
+ },
665
+ t.contentClass
666
+ ], 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() {
667
+ return [t._v(" " + t._s(t.message) + " ")];
668
+ })], 2)], 1);
669
+ }, he = [], de = /* @__PURE__ */ l(
670
+ ce,
671
+ ue,
672
+ he,
673
+ !1,
674
+ null,
675
+ null,
676
+ null,
677
+ null
678
+ );
679
+ const ye = de.exports;
680
+ export {
681
+ ye as D,
682
+ _e as E,
683
+ we as L,
684
+ se as T,
685
+ r as V,
686
+ T as a,
687
+ Z as b,
688
+ J as c,
689
+ te as d,
690
+ ee as e,
691
+ P as f,
692
+ c as g,
693
+ h,
694
+ D as i,
695
+ L as j,
696
+ Ee as k,
697
+ ge as l,
698
+ H as m,
699
+ x as n,
700
+ ie as o,
701
+ ae as p,
702
+ le as q,
703
+ ve as r,
704
+ Y as s,
705
+ Se as u
706
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"dates.d.ts","sourceRoot":"","sources":["../../../common/dates.js"],"names":[],"mappings":"AA+CA;;;GAGG;AACH,sCAFW,MAAM,QAIhB;AAED;;;;;GAKG;AACH,oCAHW,IAAI,GACF,MAAM,CAIlB;AAED;;;;;GAKG;AACH,kDAHW,MAAM,GACJ,MAAM,CAalB;AAaD;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,mCAHW,IAAI,GACF,MAAM,CAclB"}
1
+ {"version":3,"file":"dates.d.ts","sourceRoot":"","sources":["../../../common/dates.js"],"names":[],"mappings":"AAiDA;;;GAGG;AACH,sCAFW,MAAM,QAIhB;AAED;;;;;GAKG;AACH,oCAHW,IAAI,GACF,MAAM,CAIlB;AAED;;;;;GAKG;AACH,kDAHW,MAAM,GACJ,MAAM,CAalB;AAaD;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,mCAHW,IAAI,GACF,MAAM,CAclB"}
@@ -1 +1 @@
1
- {"version":3,"file":"storybook_utils.d.ts","sourceRoot":"","sources":["../../../common/storybook_utils.js"],"names":[],"mappings":"AAqBA;;;GAGG;AACH,gCAFa,MAAM,EAAE,CAIpB;AAZM,gDAPI,MAAM,YACN,MAAM,2CAUhB;AAUM;;;;;WAoBN"}
1
+ {"version":3,"file":"storybook_utils.d.ts","sourceRoot":"","sources":["../../../common/storybook_utils.js"],"names":[],"mappings":"AAoBA;;;GAGG;AACH,gCAFa,MAAM,EAAE,CAIpB;AAZM,gDAPI,MAAM,YACN,MAAM,2CAUf;AAUK;;;;;WAoBN"}