@dialpad/dialtone 9.3.0 → 9.4.1

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 (79) hide show
  1. package/dist/css/CHANGELOG.json +1 -1
  2. package/dist/css/dialtone.css +4 -4
  3. package/dist/css/dialtone.min.css +1 -1
  4. package/dist/icons/svg/video-off.svg +1 -1
  5. package/dist/tokens/android/java/tokens-dark.kt +1 -1
  6. package/dist/tokens/android/java/tokens-light.kt +1 -1
  7. package/dist/tokens/android/res/values/colors-dark.xml +1 -1
  8. package/dist/tokens/android/res/values/colors-light.xml +1 -1
  9. package/dist/tokens/android/res/values/dimens.xml +1 -1
  10. package/dist/tokens/css/variables-dark.css +1 -1
  11. package/dist/tokens/css/variables-light.css +1 -1
  12. package/dist/tokens/ios/tokens-dark.swift +1 -1
  13. package/dist/tokens/ios/tokens-light.swift +1 -1
  14. package/dist/tokens/less/variables-dark.less +1 -1
  15. package/dist/tokens/less/variables-light.less +1 -1
  16. package/dist/vue2/dialtone-vue.cjs +5 -6
  17. package/dist/vue2/dialtone-vue.js +1510 -3804
  18. package/dist/vue2/directives.cjs +1 -1
  19. package/dist/vue2/directives.js +1 -1
  20. package/dist/vue2/{emoji_text_wrapper--R-54YKU.js → emoji-k30EufQP.js} +3875 -3418
  21. package/dist/vue2/emoji-npEzXEju.cjs +1 -0
  22. package/dist/vue2/emoji.cjs +1 -1
  23. package/dist/vue2/emoji.js +32 -83625
  24. package/dist/vue2/emoji_picker-h6ZjaaSm.cjs +1 -0
  25. package/dist/vue2/emoji_picker-phIBLWjO.js +83604 -0
  26. package/dist/vue2/emoji_text_wrapper-KU3Kyfko.js +91 -0
  27. package/dist/vue2/emoji_text_wrapper-KiKRUPpa.cjs +1 -0
  28. package/dist/vue2/message_input.cjs +92 -0
  29. package/dist/vue2/message_input.js +13530 -0
  30. package/dist/vue2/stack-Xl6jQs_C.cjs +2 -0
  31. package/dist/vue2/stack-klSxDym-.js +1796 -0
  32. package/dist/vue2/style.css +1 -1
  33. package/dist/vue2/{tooltip-eJqD2Wwv.js → tooltip-PDBwUvGD.js} +21 -18
  34. package/dist/vue2/{tooltip-N61DaooE.cjs → tooltip-RmgCyjmY.cjs} +6 -6
  35. package/dist/vue2/types/components/button/button.vue.d.ts +1 -1
  36. package/dist/vue2/types/components/combobox/combobox.vue.d.ts +1 -1
  37. package/dist/vue2/types/components/icon/icon.vue.d.ts +2 -0
  38. package/dist/vue2/types/components/icon/icon.vue.d.ts.map +1 -1
  39. package/dist/vue2/types/components/modal/modal.vue.d.ts +1 -1
  40. package/dist/vue2/types/components/tooltip/tooltip.vue.d.ts +1 -1
  41. package/dist/vue2/types/message_input.d.ts +3 -0
  42. package/dist/vue2/types/message_input.d.ts.map +1 -0
  43. package/dist/vue2/types/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.d.ts +1 -1
  44. package/dist/vue2/types/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.d.ts +1 -1
  45. package/dist/vue2/types/recipes/conversation_view/message_input/index.d.ts +2 -0
  46. package/dist/vue2/types/recipes/conversation_view/message_input/index.d.ts.map +1 -0
  47. package/dist/vue2/types/recipes/conversation_view/message_input/message_input.vue.d.ts +354 -0
  48. package/dist/vue2/types/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -0
  49. package/dist/vue2/types/recipes/conversation_view/message_input/message_input_constants.d.ts +6 -0
  50. package/dist/vue2/types/recipes/conversation_view/message_input/message_input_constants.d.ts.map +1 -0
  51. package/dist/vue3/dialtone-vue.cjs +1 -1
  52. package/dist/vue3/dialtone-vue.js +5 -5
  53. package/dist/vue3/emoji-0CxcYOpi.cjs +1 -0
  54. package/dist/vue3/{emoji-w7mkBLzY.js → emoji-qCvCxNzD.js} +876 -343
  55. package/dist/vue3/emoji.cjs +1 -1
  56. package/dist/vue3/emoji.js +3 -3
  57. package/dist/vue3/{emoji_picker-nLVt8cFZ.js → emoji_picker-6nxcKkgd.js} +1 -1
  58. package/dist/vue3/{emoji_picker-4xiNkfJF.cjs → emoji_picker-PNpV-epL.cjs} +1 -1
  59. package/dist/vue3/{emoji_text_wrapper-mBDw9Xy3.js → emoji_text_wrapper-GV9Xmp4q.js} +1 -1
  60. package/dist/vue3/{emoji_text_wrapper-MBYdbA6A.cjs → emoji_text_wrapper-M6frYocA.cjs} +1 -1
  61. package/dist/vue3/message_input.cjs +10 -10
  62. package/dist/vue3/message_input.js +162 -143
  63. package/dist/vue3/stack-CYxcB-QD.cjs +2 -0
  64. package/dist/vue3/{stack-FdfddyeK.js → stack-J7X4gRRv.js} +224 -764
  65. package/dist/vue3/types/components/button/button.vue.d.ts +1 -1
  66. package/dist/vue3/types/components/combobox/combobox.vue.d.ts +1 -1
  67. package/dist/vue3/types/components/icon/icon.vue.d.ts +2 -0
  68. package/dist/vue3/types/components/icon/icon.vue.d.ts.map +1 -1
  69. package/dist/vue3/types/components/modal/modal.vue.d.ts +1 -1
  70. package/dist/vue3/types/components/rich_text_editor/extensions/mentions/suggestion.d.ts.map +1 -1
  71. package/dist/vue3/types/components/tooltip/tooltip.vue.d.ts +1 -1
  72. package/dist/vue3/types/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.d.ts +1 -1
  73. package/dist/vue3/types/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.d.ts +1 -1
  74. package/dist/vue3/types/recipes/conversation_view/message_input/message_input.vue.d.ts +7 -2
  75. package/dist/vue3/types/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -1
  76. package/package.json +1 -1
  77. package/dist/vue2/emoji_text_wrapper-_UNgB0uv.cjs +0 -1
  78. package/dist/vue3/emoji-AfK6oyUP.cjs +0 -1
  79. package/dist/vue3/stack-w8PNJngT.cjs +0 -2
@@ -0,0 +1,1796 @@
1
+ import { n as a, g as _, a as $, u as k, b as L, B as x, c as D, i as R, d as N, e as F } from "./tooltip-PDBwUvGD.js";
2
+ import { t as V, w as p, I as H, L as B, x as q, y as I } from "./emoji-k30EufQP.js";
3
+ import u from "vue";
4
+ const r = {
5
+ BUSY: "busy",
6
+ AWAY: "away",
7
+ OFFLINE: "offline",
8
+ ACTIVE: "active"
9
+ }, M = [
10
+ r.BUSY,
11
+ r.AWAY,
12
+ r.OFFLINE,
13
+ r.ACTIVE
14
+ ], z = {
15
+ name: "DtPresence",
16
+ props: {
17
+ /**
18
+ * Determines the color of the inner presence circle, indicating status.
19
+ * Accepts one of 4 values: 'busy', 'away', 'active', 'offline'
20
+ * @values busy, away, active, offline
21
+ */
22
+ presence: {
23
+ type: String,
24
+ default: r.ACTIVE,
25
+ validator: (t) => M.includes(t)
26
+ },
27
+ /**
28
+ * Since Presence is a visual element, we need SRs to read out any state changes
29
+ * that occur.
30
+ * Text entered here will be read by assistive technology. If null this component will be ignored by AT.
31
+ */
32
+ srText: {
33
+ type: String,
34
+ default: null
35
+ }
36
+ }
37
+ };
38
+ var j = function() {
39
+ var e = this, s = e._self._c;
40
+ return s("div", { staticClass: "d-presence", attrs: { "data-qa": "dt-presence", role: "status", "aria-live": e.$attrs.ariaLive || "off" } }, [e.srText ? s("span", { staticClass: "sr-only", attrs: { "data-qa": "dt-presence-sr-text" } }, [e._v(e._s(e.srText) + " ")]) : e._e(), s("div", { staticClass: "d-presence__inner", class: {
41
+ "d-presence__inner--active": e.presence === "active",
42
+ "d-presence__inner--away": e.presence === "away",
43
+ "d-presence__inner--busy": e.presence === "busy",
44
+ "d-presence__inner--offline": e.presence === "offline"
45
+ } })]);
46
+ }, K = [], W = /* @__PURE__ */ a(
47
+ z,
48
+ j,
49
+ K,
50
+ !1,
51
+ null,
52
+ null,
53
+ null,
54
+ null
55
+ );
56
+ const G = W.exports, f = {
57
+ xs: "d-avatar--xs",
58
+ sm: "d-avatar--sm",
59
+ md: "d-avatar--md",
60
+ lg: "d-avatar--lg",
61
+ xl: "d-avatar--xl"
62
+ }, U = {
63
+ default: "",
64
+ icon: "d-avatar__icon",
65
+ initials: "d-avatar__initials"
66
+ }, Y = {
67
+ md: "d-avatar__presence--md",
68
+ lg: "d-avatar__presence--lg"
69
+ }, g = {
70
+ NONE: "",
71
+ BUSY: "busy",
72
+ AWAY: "away",
73
+ OFFLINE: "offline",
74
+ ACTIVE: "active"
75
+ }, Z = {
76
+ xs: "100",
77
+ sm: "200",
78
+ md: "300",
79
+ lg: "500",
80
+ xl: "600"
81
+ }, X = [
82
+ "100",
83
+ "200",
84
+ "300",
85
+ "400",
86
+ "500",
87
+ "600",
88
+ "700",
89
+ "800",
90
+ "900",
91
+ "1000",
92
+ "1100",
93
+ "1200",
94
+ "1300",
95
+ "1400",
96
+ "1500",
97
+ "1600",
98
+ "1700",
99
+ "1800"
100
+ ], S = (t) => t > 1;
101
+ function J() {
102
+ return [void 0, ...V];
103
+ }
104
+ const Q = (t) => {
105
+ if (typeof t != "string" || !t.trim())
106
+ return "";
107
+ const e = t.trim().split(/\s+/g);
108
+ return e.length === 1 ? e.join("").substring(0, 2) : e.filter((s, n) => n === 0 || n === e.length - 1).map((s) => s.slice(0, 1).toUpperCase()).join("");
109
+ }, ee = J(), te = {
110
+ name: "DtAvatar",
111
+ components: { DtPresence: G, DtIcon: p },
112
+ inheritAttrs: !1,
113
+ props: {
114
+ /**
115
+ * Id of the avatar content wrapper element
116
+ */
117
+ id: {
118
+ type: String,
119
+ default() {
120
+ return _();
121
+ }
122
+ },
123
+ /**
124
+ * Pass in a seed to get the random color generation based on that string. For example if you pass in a
125
+ * user ID as the string it will return the same randomly generated colors every time for that user.
126
+ */
127
+ seed: {
128
+ type: String,
129
+ default: void 0
130
+ },
131
+ /**
132
+ * Set the avatar background to a specific color. If undefined will randomize the color which can be deterministic
133
+ * if the seed prop is set.
134
+ */
135
+ color: {
136
+ type: String,
137
+ default: void 0
138
+ },
139
+ /**
140
+ * The size of the avatar
141
+ * @values xs, sm, md, lg, xl
142
+ */
143
+ size: {
144
+ type: String,
145
+ default: "md",
146
+ validator: (t) => Object.keys(f).includes(t)
147
+ },
148
+ /**
149
+ * Used to customize the avatar container
150
+ */
151
+ avatarClass: {
152
+ type: [String, Array, Object],
153
+ default: ""
154
+ },
155
+ /**
156
+ * Set classes on the avatar canvas. Wrapper around the core avatar image.
157
+ */
158
+ canvasClass: {
159
+ type: [String, Array, Object],
160
+ default: ""
161
+ },
162
+ /**
163
+ * Pass through classes. Used to customize the avatar icon
164
+ */
165
+ iconClass: {
166
+ type: [String, Array, Object],
167
+ default: ""
168
+ },
169
+ /**
170
+ * Determines whether to show the presence indicator for
171
+ * Avatar - accepts PRESENCE_STATES values: 'busy', 'away', 'offline',
172
+ * or 'active'. By default, it's null and nothing is shown.
173
+ * @values null, busy, away, offline, active
174
+ */
175
+ presence: {
176
+ type: String,
177
+ default: g.NONE,
178
+ validator: (t) => Object.values(g).includes(t)
179
+ },
180
+ /**
181
+ * A set of props to be passed into the presence component.
182
+ */
183
+ presenceProps: {
184
+ type: Object,
185
+ default: () => ({})
186
+ },
187
+ /**
188
+ * Determines whether to show a group avatar.
189
+ * Limit to 2 digits max, more than 99 will be rendered as “99+”.
190
+ * if the number is 1 or less it would just show the regular avatar as if group had not been set.
191
+ */
192
+ group: {
193
+ type: Number,
194
+ default: void 0,
195
+ validator: (t) => S(t)
196
+ },
197
+ /**
198
+ * The icon that overlays the avatar
199
+ */
200
+ overlayIcon: {
201
+ type: String,
202
+ default: ""
203
+ },
204
+ /**
205
+ * The text that overlays the avatar
206
+ */
207
+ overlayText: {
208
+ type: String,
209
+ default: ""
210
+ },
211
+ /**
212
+ * Used to customize the avatar overlay
213
+ */
214
+ overlayClass: {
215
+ type: [String, Array, Object],
216
+ default: ""
217
+ },
218
+ /**
219
+ * Source of the image
220
+ */
221
+ imageSrc: {
222
+ type: String,
223
+ default: ""
224
+ },
225
+ /**
226
+ * Alt attribute of the image, by default
227
+ * it'd be the full name
228
+ */
229
+ imageAlt: {
230
+ type: String,
231
+ default: ""
232
+ },
233
+ /**
234
+ * Icon name to be displayed on the avatar
235
+ */
236
+ iconName: {
237
+ type: String,
238
+ default: void 0,
239
+ validator: (t) => ee.includes(t)
240
+ },
241
+ /**
242
+ * Icon size to be displayed on the avatar
243
+ * @values 100, 200, 300, 400, 500, 600, 700, 800
244
+ */
245
+ iconSize: {
246
+ type: String,
247
+ default: "",
248
+ validator: (t) => !t || Object.keys(H).includes(t)
249
+ },
250
+ /**
251
+ * Full name used to extract initials and set alt attribute.
252
+ */
253
+ fullName: {
254
+ type: String,
255
+ default: ""
256
+ },
257
+ /**
258
+ * Makes the avatar focusable and clickable,
259
+ * emits a click event when clicked.
260
+ */
261
+ clickable: {
262
+ type: Boolean,
263
+ default: !1
264
+ }
265
+ },
266
+ emits: [
267
+ /**
268
+ * Avatar click event
269
+ *
270
+ * @event click
271
+ * @type {PointerEvent | KeyboardEvent}
272
+ */
273
+ "click"
274
+ ],
275
+ data() {
276
+ return {
277
+ AVATAR_SIZE_MODIFIERS: f,
278
+ AVATAR_KIND_MODIFIERS: U,
279
+ AVATAR_PRESENCE_SIZE_MODIFIERS: Y,
280
+ AVATAR_ICON_SIZES: Z,
281
+ imageLoadedSuccessfully: null,
282
+ formattedInitials: "",
283
+ initializing: !1
284
+ };
285
+ },
286
+ computed: {
287
+ isNotIconType() {
288
+ return !this.iconName;
289
+ },
290
+ avatarClasses() {
291
+ return [
292
+ "d-avatar",
293
+ f[this.validatedSize],
294
+ this.avatarClass,
295
+ {
296
+ "d-avatar--group": this.showGroup,
297
+ [`d-avatar--color-${this.getColor()}`]: this.isNotIconType,
298
+ "d-avatar--clickable": this.clickable
299
+ }
300
+ ];
301
+ },
302
+ overlayClasses() {
303
+ return [
304
+ "d-avatar__overlay",
305
+ this.overlayClass
306
+ ];
307
+ },
308
+ showGroup() {
309
+ return S(this.group);
310
+ },
311
+ formattedGroup() {
312
+ return this.group > 99 ? "99+" : this.group;
313
+ },
314
+ validatedSize() {
315
+ return this.group ? "xs" : this.size;
316
+ },
317
+ showImage() {
318
+ return this.imageLoadedSuccessfully !== !1 && this.imageSrc;
319
+ },
320
+ buttonAriaLabel() {
321
+ if (this.clickable)
322
+ return this.fullName || this.imageAlt || this.$attrs["aria-label"];
323
+ }
324
+ },
325
+ watch: {
326
+ fullName: {
327
+ immediate: !0,
328
+ handler() {
329
+ this.formatInitials();
330
+ }
331
+ },
332
+ size: {
333
+ immediate: !0,
334
+ handler() {
335
+ this.formatInitials();
336
+ }
337
+ },
338
+ group: {
339
+ immediate: !0,
340
+ handler() {
341
+ this.formatInitials();
342
+ }
343
+ },
344
+ imageSrc(t) {
345
+ this.imageLoadedSuccessfully = null, t && (this.validateProps(), this.setImageListeners());
346
+ }
347
+ },
348
+ mounted() {
349
+ this.validateProps(), this.setImageListeners();
350
+ },
351
+ methods: {
352
+ async setImageListeners() {
353
+ await this.$nextTick();
354
+ const t = this.$refs.avatarImage;
355
+ t && (t.addEventListener("load", () => this._loadedImageEventHandler(t), { once: !0 }), t.addEventListener("error", () => this._erroredImageEventHandler(t), { once: !0 }));
356
+ },
357
+ formatInitials() {
358
+ const t = Q(this.fullName);
359
+ this.validatedSize === "xs" ? this.formattedInitials = "" : this.validatedSize === "sm" ? this.formattedInitials = t[0] : this.formattedInitials = t;
360
+ },
361
+ getColor() {
362
+ return this.color ?? $(X, this.seed);
363
+ },
364
+ _loadedImageEventHandler(t) {
365
+ this.imageLoadedSuccessfully = !0, t.classList.remove("d-d-none");
366
+ },
367
+ _erroredImageEventHandler(t) {
368
+ this.imageLoadedSuccessfully = !1, t.classList.add("d-d-none");
369
+ },
370
+ validateProps() {
371
+ if (this.imageSrc && !(this.fullName || this.imageAlt))
372
+ throw new Error("full-name or image-alt must be set if image-src is provided");
373
+ },
374
+ handleClick(t) {
375
+ this.clickable && this.$emit("click", t);
376
+ }
377
+ }
378
+ };
379
+ var se = function() {
380
+ var e = this, s = e._self._c;
381
+ return s(e.clickable ? "button" : "div", { tag: "component", class: e.avatarClasses, attrs: { id: e.id, "data-qa": "dt-avatar", "aria-label": e.buttonAriaLabel }, on: { click: e.handleClick } }, [s("div", { ref: "canvas", class: [
382
+ e.canvasClass,
383
+ "d-avatar__canvas",
384
+ { "d-avatar--image-loaded": e.imageLoadedSuccessfully }
385
+ ] }, [e.showImage ? s("img", { ref: "avatarImage", staticClass: "d-avatar__image", attrs: { "data-qa": "dt-avatar-image", src: e.imageSrc, alt: e.imageAlt || e.fullName } }) : e.iconName ? s("dt-icon", { class: [e.iconClass, e.AVATAR_KIND_MODIFIERS.icon], attrs: { name: e.iconName, size: e.iconSize || e.AVATAR_ICON_SIZES[e.size], "data-qa": "dt-avatar-icon" } }) : s("span", { class: [e.AVATAR_KIND_MODIFIERS.initials] }, [e._v(" " + e._s(e.formattedInitials) + " ")])], 1), e.overlayIcon || e.overlayText ? s("div", { class: e.overlayClasses }, [e.overlayIcon ? s("dt-icon", { staticClass: "d-avatar__overlay-icon", attrs: { name: e.overlayIcon } }) : e.overlayText ? s("p", { staticClass: "d-avatar__overlay-text" }, [e._v(" " + e._s(e.overlayText) + " ")]) : e._e()], 1) : e._e(), e.showGroup ? s("span", { staticClass: "d-avatar__count", attrs: { "data-qa": "dt-avatar-count" } }, [e._v(e._s(e.formattedGroup))]) : e._e(), e.presence && !e.showGroup ? s("dt-presence", e._b({ class: [
386
+ "d-avatar__presence",
387
+ e.AVATAR_PRESENCE_SIZE_MODIFIERS[e.size]
388
+ ], attrs: { presence: e.presence, "data-qa": "dt-presence" } }, "dt-presence", e.presenceProps, !1)) : e._e()], 1);
389
+ }, ne = [], ae = /* @__PURE__ */ a(
390
+ te,
391
+ se,
392
+ ne,
393
+ !1,
394
+ null,
395
+ null,
396
+ null,
397
+ null
398
+ );
399
+ const at = ae.exports, oe = {
400
+ name: "DtLink",
401
+ props: {
402
+ /**
403
+ * Applies the link variant styles
404
+ * @values null, danger, warning, success, muted, inverted
405
+ */
406
+ kind: {
407
+ type: String,
408
+ default: "",
409
+ validator(t) {
410
+ return B.includes(t);
411
+ }
412
+ }
413
+ },
414
+ emits: [
415
+ /**
416
+ * Native click event
417
+ *
418
+ * @event click
419
+ * @type {PointerEvent | KeyboardEvent}
420
+ */
421
+ "click",
422
+ /**
423
+ * Native focus in event
424
+ *
425
+ * @event focusin
426
+ * @type {FocusEvent}
427
+ */
428
+ "focusin",
429
+ /**
430
+ * Native focus out event
431
+ *
432
+ * @event focusout
433
+ * @type {FocusEvent}
434
+ */
435
+ "focusout"
436
+ ],
437
+ data() {
438
+ return {
439
+ LINK_KIND_MODIFIERS: q
440
+ };
441
+ }
442
+ };
443
+ var ie = function() {
444
+ var e = this, s = e._self._c;
445
+ return s("a", e._g({ class: [
446
+ "d-link",
447
+ e.LINK_KIND_MODIFIERS[e.kind]
448
+ ], attrs: { "data-qa": "dt-link", href: "href" in e.$attrs ? e.$attrs.href : "javascript:void(0)" } }, e.$listeners), [e._t("default")], 2);
449
+ }, re = [], le = /* @__PURE__ */ a(
450
+ oe,
451
+ ie,
452
+ re,
453
+ !1,
454
+ null,
455
+ null,
456
+ null,
457
+ null
458
+ );
459
+ const ot = le.exports, de = {
460
+ props: {
461
+ /**
462
+ * If true, a hidden close button is included for screen readers
463
+ * @values true, false
464
+ */
465
+ visuallyHiddenClose: {
466
+ type: Boolean,
467
+ default: !1
468
+ },
469
+ /**
470
+ * Label for the visually hidden close button
471
+ * Required if visuallyHiddenClose is set to `true`
472
+ */
473
+ visuallyHiddenCloseLabel: {
474
+ type: String,
475
+ default: null
476
+ }
477
+ },
478
+ watch: {
479
+ $props: {
480
+ immediate: !0,
481
+ deep: !0,
482
+ handler() {
483
+ this.validateVisuallyHiddenCloseProps();
484
+ }
485
+ }
486
+ },
487
+ computed: {
488
+ showVisuallyHiddenClose() {
489
+ return this.visuallyHiddenClose && this.visuallyHiddenCloseLabel != null;
490
+ }
491
+ },
492
+ methods: {
493
+ validateVisuallyHiddenCloseProps() {
494
+ this.visuallyHiddenClose && !this.visuallyHiddenCloseLabel && console.error(`If visuallyHiddenClose prop is true, the component includes
495
+ a visually hidden close button and you must set the visuallyHiddenCloseLabel prop.`);
496
+ }
497
+ }
498
+ }, ce = {
499
+ name: "SrOnlyCloseButton",
500
+ components: {
501
+ DtIcon: p,
502
+ DtButton: I
503
+ },
504
+ props: {
505
+ /**
506
+ * Label for the visually hidden close button
507
+ * Required if visuallyHiddenClose is set to `true`
508
+ */
509
+ visuallyHiddenCloseLabel: {
510
+ type: String,
511
+ default: null
512
+ }
513
+ },
514
+ emits: ["close"],
515
+ methods: {
516
+ close() {
517
+ this.$emit("close");
518
+ }
519
+ }
520
+ };
521
+ var ue = function() {
522
+ var e = this, s = e._self._c;
523
+ return s("dt-button", { staticClass: "d-vi-visible-sr", attrs: { id: "sr-only-close-button", "data-qa": "dt-sr-only-close-button", "aria-label": e.visuallyHiddenCloseLabel }, on: { click: e.close, keydown: function(n) {
524
+ return !n.type.indexOf("key") && e._k(n.keyCode, "space", 32, n.key, [" ", "Spacebar"]) ? null : (n.preventDefault(), n.stopPropagation(), e.close.apply(null, arguments));
525
+ } } }, [s("dt-icon", { attrs: { name: "close" } })], 1);
526
+ }, pe = [], fe = /* @__PURE__ */ a(
527
+ ce,
528
+ ue,
529
+ pe,
530
+ !1,
531
+ null,
532
+ null,
533
+ null,
534
+ null
535
+ );
536
+ const he = fe.exports, T = ':not(:disabled):not([aria-disabled="true"]):not([role="presentation"])', me = `${T}:not([tabindex="-1"])`, _e = "button,[href],input,select,textarea,details,[tabindex]", ye = {
537
+ methods: {
538
+ /**
539
+ * get the first focusable element in your component, includes tabindex="-1".
540
+ * @param {object} el - optional - ref of dom element to trap focus on.
541
+ * will default to the root node of the vue component
542
+ */
543
+ async getFirstFocusableElement(t) {
544
+ await this.$nextTick();
545
+ const e = this._getFocusableElements(t, !0);
546
+ return this._getFirstFocusElement(e);
547
+ },
548
+ /**
549
+ * set focus to the first focusable element in your component, includes tabindex="-1".
550
+ * @param {object} el - optional - ref of dom element to trap focus on.
551
+ * will default to the root node of the vue component
552
+ */
553
+ async focusFirstElement(t = this.$el) {
554
+ const e = await this.getFirstFocusableElement(t);
555
+ e == null || e.focus({ preventScroll: !0 });
556
+ },
557
+ async focusElementById(t) {
558
+ var s;
559
+ await this.$nextTick();
560
+ const e = (s = this.$el) == null ? void 0 : s.querySelector(t);
561
+ if (e) {
562
+ e.focus();
563
+ return;
564
+ }
565
+ console.warn('Could not find the element specified in dt-modal prop "initialFocusElement". Defaulting to focusing the first element.'), await this.focusFirstElement();
566
+ },
567
+ /**
568
+ * internal use only.
569
+ *
570
+ * @param focusableElements - list of focusable elements
571
+ * @returns {*} - first DOM element that is focusable.
572
+ * @private
573
+ */
574
+ _getFirstFocusElement(t) {
575
+ if (!t.length)
576
+ return;
577
+ let e = t[0];
578
+ return e.matches('[type="radio"]:not(:checked)') && (e = t.find((s) => s.checked && s.name === e.name) || e), e;
579
+ },
580
+ /**
581
+ * internal use only.
582
+ *
583
+ * gets all the focusable elements within the component
584
+ * and sets the first and last of those elements.
585
+ *
586
+ * @param {object} el - the root dom element to find focusable elements in.
587
+ * @param {bool} includeNegativeTabIndex - will include tabindex="-1" in the list of focusable elements.
588
+ */
589
+ _getFocusableElements(t = this.$el, e = !1) {
590
+ return t ? [...t.querySelectorAll(_e)].filter((n) => {
591
+ const o = window.getComputedStyle(n);
592
+ return o.getPropertyValue("display") !== "none" && o.getPropertyValue("visibility") !== "hidden" && n.matches(e ? T : me);
593
+ }) : [];
594
+ },
595
+ /**
596
+ * tabs to the next element contained within your component, does not include tabindex="-1".
597
+ * @param {object} e - keypress event
598
+ * @param {object} el - optional - ref of dom element to trap focus on.
599
+ * will default to the root node of the vue component
600
+ */
601
+ focusTrappedTabPress(t, e) {
602
+ if (!(t.key === "Tab"))
603
+ return;
604
+ const n = this._getFocusableElements(e);
605
+ if (!n.length) {
606
+ t.preventDefault();
607
+ return;
608
+ }
609
+ const o = this._getFirstFocusElement(n), v = n[n.length - 1];
610
+ t.shiftKey ? document.activeElement === o && (v.focus(), t.preventDefault()) : document.activeElement === v && (o.focus(), t.preventDefault());
611
+ }
612
+ }
613
+ }, h = {
614
+ DEFAULT: "default",
615
+ CUSTOM: "custom"
616
+ }, d = {
617
+ ARROW_KEYS: "arrow-keys",
618
+ TAB: "tab",
619
+ NONE: "none"
620
+ }, ve = {
621
+ name: "DtItemLayout",
622
+ props: {
623
+ /**
624
+ * Set this prop to render layout as a specific HTML element.
625
+ */
626
+ as: {
627
+ type: String,
628
+ default: "div"
629
+ }
630
+ }
631
+ };
632
+ var ge = function() {
633
+ var e = this, s = e._self._c;
634
+ return s(e.as, { tag: "component", staticClass: "dt-item-layout" }, [e.$slots.left ? s("section", { staticClass: "dt-item-layout--left", attrs: { "data-qa": "dt-item-layout-left-wrapper" } }, [e._t("left")], 2) : e._e(), s("section", { staticClass: "dt-item-layout--content", attrs: { "data-qa": "dt-item-layout-content-wrapper" } }, [e.$slots.default ? s("div", { staticClass: "dt-item-layout--title", attrs: { "data-qa": "dt-item-layout-title-wrapper" } }, [e._t("default")], 2) : e._e(), e.$slots.subtitle ? s("div", { class: ["dt-item-layout--subtitle", { "dt-item-layout--subtitle--with-title": e.$slots.default }], attrs: { "data-qa": "dt-item-layout-subtitle-wrapper" } }, [e._t("subtitle")], 2) : e._e(), e.$slots.bottom ? s("div", { staticClass: "dt-item-layout--bottom", attrs: { "data-qa": "dt-item-layout-bottom-wrapper" } }, [e._t("bottom")], 2) : e._e()]), e.$slots.right ? s("section", { staticClass: "dt-item-layout--right", attrs: { "data-qa": "dt-item-layout-right-wrapper" } }, [e._t("right")], 2) : e._e(), e.$slots.selected ? s("section", { staticClass: "dt-item-layout--selected", attrs: { "data-qa": "dt-item-layout-selected-wrapper" } }, [e._t("selected")], 2) : e._e()]);
635
+ }, Se = [], Ee = /* @__PURE__ */ a(
636
+ ve,
637
+ ge,
638
+ Se,
639
+ !1,
640
+ null,
641
+ "411cb81e",
642
+ null,
643
+ null
644
+ );
645
+ const E = Ee.exports, be = {
646
+ name: "DtListItem",
647
+ components: {
648
+ DtItemLayout: E,
649
+ DtIcon: p
650
+ },
651
+ /**
652
+ * Value provided from keyboard_list_navigation.js using id prop.
653
+ */
654
+ inject: {
655
+ highlightId: { default: null }
656
+ },
657
+ props: {
658
+ /**
659
+ * Id for the item.
660
+ */
661
+ id: {
662
+ type: String,
663
+ default() {
664
+ return k.getUniqueString();
665
+ }
666
+ },
667
+ /**
668
+ * String to use for the item's role.
669
+ */
670
+ role: {
671
+ type: String,
672
+ default: "listitem"
673
+ },
674
+ /**
675
+ * HTML element type (tag name) of the content wrapper element.
676
+ */
677
+ elementType: {
678
+ type: String,
679
+ default: "li"
680
+ },
681
+ /**
682
+ * The type of child list item to use.
683
+ * @values default, custom
684
+ */
685
+ type: {
686
+ type: String,
687
+ default: h.DEFAULT,
688
+ validator: (t) => Object.values(h).includes(t)
689
+ },
690
+ /**
691
+ * The type of navigation that this component should support.
692
+ * - "arrow-keys" for items that are navigated with UP/DOWN keys.
693
+ * - "tab" for items that are navigated using the TAB key.
694
+ * - "none" for static items that are not interactive.
695
+ * @values arrow-keys, tab, none
696
+ */
697
+ navigationType: {
698
+ type: String,
699
+ default: d.NONE,
700
+ validator: (t) => Object.values(d).includes(t)
701
+ },
702
+ /**
703
+ * Applies selected styles to the list item
704
+ */
705
+ selected: {
706
+ type: Boolean,
707
+ default: !1
708
+ }
709
+ },
710
+ emits: [
711
+ /**
712
+ * Native click event
713
+ *
714
+ * @event click
715
+ * @type {PointerEvent | KeyboardEvent}
716
+ */
717
+ "click",
718
+ /**
719
+ * Key down event
720
+ *
721
+ * @event keydown
722
+ * @type {KeyboardEvent}
723
+ */
724
+ "keydown",
725
+ /**
726
+ * Native mouse move event
727
+ *
728
+ * @event mousemove
729
+ * @type {MouseEvent}
730
+ */
731
+ "mousemove",
732
+ /**
733
+ * Native mouse leave event
734
+ *
735
+ * @event mouseleave
736
+ * @type {MouseEvent}
737
+ */
738
+ "mouseleave"
739
+ ],
740
+ data() {
741
+ return {
742
+ injected: !1,
743
+ mouseHighlighted: !1
744
+ };
745
+ },
746
+ computed: {
747
+ listItemType() {
748
+ switch (this.type) {
749
+ case h.DEFAULT:
750
+ return E;
751
+ default:
752
+ return null;
753
+ }
754
+ },
755
+ listItemListeners() {
756
+ return {
757
+ ...this.$listeners,
758
+ keydown: (t) => {
759
+ ["enter", "space"].includes(t.code.toLowerCase()) && this.onClick(t), this.$emit("keydown", t);
760
+ },
761
+ mousemove: (t) => {
762
+ this.onMouseHover(t), this.$emit("mousemove", t);
763
+ },
764
+ mouseleave: (t) => {
765
+ this.onMouseLeave(t), this.$emit("mouseleave", t);
766
+ }
767
+ };
768
+ },
769
+ /**
770
+ * For keyboard navigation, whether this item is currently highlighted.
771
+ * An injected highlightId will override the default mouseover highlight.
772
+ */
773
+ isHighlighted() {
774
+ return this.isHoverable ? this.highlightId && this.highlightId() ? this.id === this.highlightId() : this.mouseHighlighted : !1;
775
+ },
776
+ isFocusable() {
777
+ return this.navigationType === d.TAB;
778
+ },
779
+ /**
780
+ * Whether to apply hover styles.
781
+ */
782
+ isHoverable() {
783
+ return this.navigationType !== d.NONE;
784
+ }
785
+ },
786
+ methods: {
787
+ onClick(t) {
788
+ this.$emit("click", t);
789
+ },
790
+ onMouseHover() {
791
+ this.mouseHighlighted = !0;
792
+ },
793
+ onMouseLeave() {
794
+ this.mouseHighlighted = !1;
795
+ }
796
+ }
797
+ };
798
+ var Ce = function() {
799
+ var e = this, s = e._self._c;
800
+ return s(e.elementType, e._g({ tag: "component", class: ["dt-list-item", {
801
+ "dt-list-item--focusable": e.isFocusable,
802
+ "dt-list-item--highlighted": e.isHighlighted,
803
+ "dt-list-item--static": !e.isHoverable
804
+ }], attrs: { id: e.id, tabindex: e.isFocusable ? 0 : -1, role: e.role, "aria-selected": e.isHighlighted } }, e.listItemListeners), [e.listItemType ? s(e.listItemType, { tag: "component", scopedSlots: e._u([e._l(e.$slots, function(n, o) {
805
+ return { key: o, fn: function() {
806
+ return [e._t(o)];
807
+ }, proxy: !0 };
808
+ }), e.selected ? { key: "selected", fn: function() {
809
+ return [s("dt-icon", { staticClass: "dt-list-item--selected-icon", attrs: { name: "check", size: "400" } })];
810
+ }, proxy: !0 } : null], null, !0) }) : e._t("default")], 2);
811
+ }, Oe = [], Ie = /* @__PURE__ */ a(
812
+ be,
813
+ Ce,
814
+ Oe,
815
+ !1,
816
+ null,
817
+ null,
818
+ null,
819
+ null
820
+ );
821
+ const it = Ie.exports, i = {
822
+ default: "column",
823
+ column: "column",
824
+ row: "row",
825
+ "row-reverse": "row-reverse",
826
+ "column-reverse": "column-reverse"
827
+ }, A = ["sm", "md", "lg", "xl"], y = ["0", "100", "200", "300", "400", "500", "600"], b = {
828
+ none: void 0,
829
+ small: "d-p4",
830
+ medium: "d-p8",
831
+ large: "d-p16"
832
+ }, Te = {
833
+ none: void 0,
834
+ small: "d-pl4",
835
+ medium: "d-pl8",
836
+ large: "d-pl16"
837
+ }, Ae = ["dialog", "menu", "listbox", "tree", "grid"], we = ["", "anchor"], Pe = ["none", "dialog", "first"], $e = ["parent", "body"], ke = [
838
+ ...L
839
+ ], rt = [
840
+ ...x
841
+ ];
842
+ let Le = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict", xe = (t = 21) => {
843
+ let e = "", s = t;
844
+ for (; s--; )
845
+ e += Le[Math.random() * 64 | 0];
846
+ return e;
847
+ };
848
+ function c(t) {
849
+ "@babel/helpers - typeof";
850
+ return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? c = function(e) {
851
+ return typeof e;
852
+ } : c = function(e) {
853
+ return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
854
+ }, c(t);
855
+ }
856
+ var w = {
857
+ selector: "vue-portal-target-".concat(xe())
858
+ }, De = function(e) {
859
+ return w.selector = e;
860
+ }, m = typeof window < "u" && (typeof document > "u" ? "undefined" : c(document)) !== void 0, Re = u.extend({
861
+ // as an abstract component, it doesn't appear in
862
+ // the $parent chain of components.
863
+ // which means the next parent of any component rendered inside of this oen
864
+ // will be the parent from which is was sent
865
+ // @ts-expect-error
866
+ abstract: !0,
867
+ name: "PortalOutlet",
868
+ props: ["nodes", "tag"],
869
+ data: function(e) {
870
+ return {
871
+ updatedNodes: e.nodes
872
+ };
873
+ },
874
+ render: function(e) {
875
+ var s = this.updatedNodes && this.updatedNodes();
876
+ return s ? s.length === 1 && !s[0].text ? s : e(this.tag || "DIV", s) : e();
877
+ },
878
+ destroyed: function() {
879
+ var e = this.$el;
880
+ e && e.parentNode.removeChild(e);
881
+ }
882
+ }), P = u.extend({
883
+ name: "VueSimplePortal",
884
+ props: {
885
+ disabled: {
886
+ type: Boolean
887
+ },
888
+ prepend: {
889
+ type: Boolean
890
+ },
891
+ selector: {
892
+ type: String,
893
+ default: function() {
894
+ return "#".concat(w.selector);
895
+ }
896
+ },
897
+ tag: {
898
+ type: String,
899
+ default: "DIV"
900
+ }
901
+ },
902
+ render: function(e) {
903
+ if (this.disabled) {
904
+ var s = this.$scopedSlots && this.$scopedSlots.default();
905
+ return s ? s.length < 2 && !s[0].text ? s : e(this.tag, s) : e();
906
+ }
907
+ return e();
908
+ },
909
+ created: function() {
910
+ this.getTargetEl() || this.insertTargetEl();
911
+ },
912
+ updated: function() {
913
+ var e = this;
914
+ this.$nextTick(function() {
915
+ !e.disabled && e.slotFn !== e.$scopedSlots.default && (e.container.updatedNodes = e.$scopedSlots.default), e.slotFn = e.$scopedSlots.default;
916
+ });
917
+ },
918
+ beforeDestroy: function() {
919
+ this.unmount();
920
+ },
921
+ watch: {
922
+ disabled: {
923
+ immediate: !0,
924
+ handler: function(e) {
925
+ e ? this.unmount() : this.$nextTick(this.mount);
926
+ }
927
+ }
928
+ },
929
+ methods: {
930
+ // This returns the element into which the content should be mounted.
931
+ getTargetEl: function() {
932
+ if (m)
933
+ return document.querySelector(this.selector);
934
+ },
935
+ insertTargetEl: function() {
936
+ if (m) {
937
+ var e = document.querySelector("body"), s = document.createElement(this.tag);
938
+ s.id = this.selector.substring(1), e.appendChild(s);
939
+ }
940
+ },
941
+ mount: function() {
942
+ if (m) {
943
+ var e = this.getTargetEl(), s = document.createElement("DIV");
944
+ this.prepend && e.firstChild ? e.insertBefore(s, e.firstChild) : e.appendChild(s), this.container = new Re({
945
+ el: s,
946
+ parent: this,
947
+ propsData: {
948
+ tag: this.tag,
949
+ nodes: this.$scopedSlots.default
950
+ }
951
+ });
952
+ }
953
+ },
954
+ unmount: function() {
955
+ this.container && (this.container.$destroy(), delete this.container);
956
+ }
957
+ }
958
+ });
959
+ function Ne(t) {
960
+ var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
961
+ t.component(e.name || "portal", P), e.defaultSelector && De(e.defaultSelector);
962
+ }
963
+ typeof window < "u" && window.Vue && window.Vue === u && u.use(Ne);
964
+ const Fe = {
965
+ name: "PopoverHeaderFooter",
966
+ components: {
967
+ DtButton: I,
968
+ DtIcon: p
969
+ },
970
+ props: {
971
+ // eslint-disable-next-line vue/require-default-prop
972
+ type: {
973
+ type: String,
974
+ validator: function(t) {
975
+ return ["header", "footer"].includes(t);
976
+ }
977
+ },
978
+ /**
979
+ * Additional class name for the content wrapper element.
980
+ */
981
+ contentClass: {
982
+ type: [String, Array, Object],
983
+ default: ""
984
+ },
985
+ /**
986
+ * Determines visibility for close button
987
+ * @values true, false
988
+ */
989
+ showCloseButton: {
990
+ type: Boolean,
991
+ default: !1
992
+ },
993
+ /**
994
+ * A set of props to be passed into the popover's header close button.
995
+ * Requires an 'ariaLabel' property.
996
+ */
997
+ closeButtonProps: {
998
+ type: Object,
999
+ default: () => {
1000
+ }
1001
+ }
1002
+ },
1003
+ emits: [
1004
+ /**
1005
+ * Emitted when popover is closed
1006
+ *
1007
+ * @event close
1008
+ * @type { Boolean }
1009
+ */
1010
+ "close"
1011
+ ],
1012
+ methods: {
1013
+ focusCloseButton() {
1014
+ var e;
1015
+ const t = (e = this.$refs["popover__close-button"]) == null ? void 0 : e.$el;
1016
+ t == null || t.focus();
1017
+ }
1018
+ }
1019
+ };
1020
+ var Ve = function() {
1021
+ var e = this, s = e._self._c;
1022
+ return s("div", { class: {
1023
+ "d-popover__header": e.type === "header",
1024
+ "d-popover__footer": e.type === "footer"
1025
+ }, attrs: { "data-qa": "dt-popover-header-footer" } }, [e.$slots.content ? s("div", { class: [{
1026
+ "d-popover__header__content": e.type === "header",
1027
+ "d-popover__footer__content": e.type === "footer"
1028
+ }, e.contentClass], attrs: { "data-qa": "dt-popover-header-footer-content" } }, [e._t("content")], 2) : e._e(), e.showCloseButton ? s("dt-button", e._b({ ref: "popover__close-button", class: {
1029
+ "d-popover__header__close-button": e.type === "header",
1030
+ "d-popover__footer__close-button": e.type === "footer"
1031
+ }, attrs: { "data-qa": "dt-popover-close", importance: "outlined", kind: "muted", circle: "" }, on: { click: function(n) {
1032
+ return e.$emit("close");
1033
+ } }, scopedSlots: e._u([{ key: "icon", fn: function() {
1034
+ return [s("dt-icon", { attrs: { name: "close", size: "300" } })];
1035
+ }, proxy: !0 }], null, !1, 2538694920) }, "dt-button", e.closeButtonProps, !1)) : e._e()], 1);
1036
+ }, He = [], Be = /* @__PURE__ */ a(
1037
+ Fe,
1038
+ Ve,
1039
+ He,
1040
+ !1,
1041
+ null,
1042
+ null,
1043
+ null,
1044
+ null
1045
+ );
1046
+ const qe = Be.exports, Me = {
1047
+ name: "DtPopover",
1048
+ /********************
1049
+ * CHILD COMPONENTS *
1050
+ ********************/
1051
+ components: {
1052
+ SrOnlyCloseButton: he,
1053
+ DtLazyShow: D,
1054
+ PopoverHeaderFooter: qe,
1055
+ Portal: P
1056
+ },
1057
+ mixins: [ye, de],
1058
+ props: {
1059
+ /**
1060
+ * Controls whether the popover is shown. Leaving this null will have the popover trigger on click by default.
1061
+ * If you set this value, the default trigger behavior will be disabled, and you can control it as you need.
1062
+ * Supports .sync modifier
1063
+ * @values null, true, false
1064
+ */
1065
+ open: {
1066
+ type: Boolean,
1067
+ default: null
1068
+ },
1069
+ /**
1070
+ * Opens the popover on right click (context menu). If you set this value to `true`,
1071
+ * the default trigger behavior will be disabled.
1072
+ * @values true, false
1073
+ */
1074
+ openOnContext: {
1075
+ type: Boolean,
1076
+ default: !1
1077
+ },
1078
+ /**
1079
+ * Element type (tag name) of the root element of the component.
1080
+ */
1081
+ elementType: {
1082
+ type: String,
1083
+ default: "div"
1084
+ },
1085
+ /**
1086
+ * Named transition when the content display is toggled.
1087
+ * @see DtLazyShow
1088
+ */
1089
+ transition: {
1090
+ type: String,
1091
+ default: "fade"
1092
+ },
1093
+ /**
1094
+ * ARIA role for the content of the popover. Defaults to "dialog".
1095
+ * <a class="d-link" href="https://www.w3.org/TR/wai-aria/#aria-haspopup" target="_blank">aria-haspopup</a>
1096
+ */
1097
+ role: {
1098
+ type: String,
1099
+ default: "dialog",
1100
+ validator: (t) => Ae.includes(t)
1101
+ },
1102
+ /**
1103
+ * ID of the element that serves as the label for the popover content.
1104
+ * Defaults to the "anchor" element; this exists to provide a different
1105
+ * ID of the label element if, for example, the anchor slot contains
1106
+ * other items that do not serve as a label. You should provide this
1107
+ * or ariaLabel, but not both.
1108
+ */
1109
+ ariaLabelledby: {
1110
+ type: String,
1111
+ default: null
1112
+ },
1113
+ /**
1114
+ * Descriptive label for the popover content. You should provide this
1115
+ * or ariaLabelledby, but not both.
1116
+ */
1117
+ ariaLabel: {
1118
+ type: String,
1119
+ default: null
1120
+ },
1121
+ /**
1122
+ * A set of props to be passed into the popover's header close button.
1123
+ * Requires an 'ariaLabel' property, when the header popover is visible
1124
+ */
1125
+ closeButtonProps: {
1126
+ type: Object,
1127
+ default: () => ({})
1128
+ },
1129
+ /**
1130
+ * Padding size class for the popover content.
1131
+ * @values none, small, medium, large
1132
+ */
1133
+ padding: {
1134
+ type: String,
1135
+ default: "large",
1136
+ validator: (t) => Object.keys(b).some((e) => e === t)
1137
+ },
1138
+ /**
1139
+ * Additional class name for the content wrapper element.
1140
+ */
1141
+ contentClass: {
1142
+ type: [String, Array, Object],
1143
+ default: ""
1144
+ },
1145
+ /**
1146
+ * Width configuration for the popover content. When its value is 'anchor',
1147
+ * the popover content will have the same width as the anchor.
1148
+ * @values null, anchor
1149
+ */
1150
+ contentWidth: {
1151
+ type: String,
1152
+ default: "",
1153
+ validator: (t) => we.includes(t)
1154
+ },
1155
+ /**
1156
+ * Tabindex value for the content. Passing null, no tabindex attribute will be set.
1157
+ */
1158
+ contentTabindex: {
1159
+ type: Number || null,
1160
+ default: -1
1161
+ },
1162
+ /**
1163
+ * External anchor id to use in those cases the anchor can't be provided via the slot.
1164
+ * For instance, using the combobox's input as the anchor for the popover.
1165
+ */
1166
+ externalAnchor: {
1167
+ type: String,
1168
+ default: ""
1169
+ },
1170
+ /**
1171
+ * The id of the tooltip
1172
+ */
1173
+ id: {
1174
+ type: String,
1175
+ default() {
1176
+ return _();
1177
+ }
1178
+ },
1179
+ /**
1180
+ * Displaces the content box from its anchor element
1181
+ * by the specified number of pixels.
1182
+ * <a
1183
+ * class="d-link"
1184
+ * href="https://atomiks.github.io/tippyjs/v6/all-props/#offset"
1185
+ * target="_blank"
1186
+ * >
1187
+ * Tippy.js docs
1188
+ * </a>
1189
+ */
1190
+ offset: {
1191
+ type: Array,
1192
+ default: () => [0, 4]
1193
+ },
1194
+ /**
1195
+ * Determines if the popover hides upon clicking the
1196
+ * anchor or outside the content box.
1197
+ * @values true, false
1198
+ */
1199
+ hideOnClick: {
1200
+ type: Boolean,
1201
+ default: !0
1202
+ },
1203
+ /**
1204
+ * Determines modal state. If enabled popover has a modal overlay
1205
+ * preventing interaction with elements below it, but it is invisible.
1206
+ * @values true, false
1207
+ */
1208
+ modal: {
1209
+ type: Boolean,
1210
+ default: !0
1211
+ },
1212
+ /**
1213
+ * If the popover does not fit in the direction described by "placement",
1214
+ * it will attempt to change its direction to the "fallbackPlacements".
1215
+ * <a
1216
+ * class="d-link"
1217
+ * href="https://popper.js.org/docs/v2/modifiers/flip/#fallbackplacements"
1218
+ * target="_blank"
1219
+ * >
1220
+ * Popper.js docs
1221
+ * </a>
1222
+ * */
1223
+ fallbackPlacements: {
1224
+ type: Array,
1225
+ default: () => ["auto"]
1226
+ },
1227
+ /**
1228
+ * The direction the popover displays relative to the anchor.
1229
+ * <a
1230
+ * class="d-link"
1231
+ * href="https://atomiks.github.io/tippyjs/v6/all-props/#placement"
1232
+ * target="_blank"
1233
+ * >
1234
+ * Tippy.js docs
1235
+ * </a>
1236
+ * @values top, top-start, top-end,
1237
+ * right, right-start, right-end,
1238
+ * left, left-start, left-end,
1239
+ * bottom, bottom-start, bottom-end,
1240
+ * auto, auto-start, auto-end
1241
+ */
1242
+ placement: {
1243
+ type: String,
1244
+ default: "bottom-end"
1245
+ },
1246
+ /**
1247
+ * If set to false the dialog will display over top of the anchor when there is insufficient space.
1248
+ * If set to true it will never move from its position relative to the anchor and will clip instead.
1249
+ * <a
1250
+ * class="d-link"
1251
+ * href="https://popper.js.org/docs/v2/modifiers/prevent-overflow/#tether"
1252
+ * target="_blank"
1253
+ * >
1254
+ * Popper.js docs
1255
+ * </a>
1256
+ * @values true, false
1257
+ */
1258
+ tether: {
1259
+ type: Boolean,
1260
+ default: !0
1261
+ },
1262
+ /**
1263
+ * If the popover sticks to the anchor. This is usually not needed, but can be needed
1264
+ * if the reference element's position is animating, or to automatically update the popover
1265
+ * position in those cases the DOM layout changes the reference element's position.
1266
+ * `true` enables it, `reference` only checks the "reference" rect for changes and `popper` only
1267
+ * checks the "popper" rect for changes.
1268
+ * <a
1269
+ * class="d-link"
1270
+ * href="https://atomiks.github.io/tippyjs/v6/all-props/#sticky"
1271
+ * target="_blank"
1272
+ * >
1273
+ * Tippy.js docs
1274
+ * </a>
1275
+ * @values true, false, reference, popper
1276
+ */
1277
+ sticky: {
1278
+ type: [Boolean, String],
1279
+ default: !1,
1280
+ validator: (t) => ke.includes(t)
1281
+ },
1282
+ /**
1283
+ * Determines maximum height for the popover before overflow.
1284
+ * Possible units rem|px|em
1285
+ */
1286
+ maxHeight: {
1287
+ type: String,
1288
+ default: ""
1289
+ },
1290
+ /**
1291
+ * Determines maximum width for the popover before overflow.
1292
+ * Possible units rem|px|%|em
1293
+ */
1294
+ maxWidth: {
1295
+ type: String,
1296
+ default: ""
1297
+ },
1298
+ /**
1299
+ * Determines visibility for close button
1300
+ * @values true, false
1301
+ */
1302
+ showCloseButton: {
1303
+ type: Boolean,
1304
+ default: !1
1305
+ },
1306
+ /**
1307
+ * Additional class name for the header content wrapper element.
1308
+ */
1309
+ headerClass: {
1310
+ type: [String, Array, Object],
1311
+ default: ""
1312
+ },
1313
+ /**
1314
+ * Additional class name for the footer content wrapper element.
1315
+ */
1316
+ footerClass: {
1317
+ type: [String, Array, Object],
1318
+ default: ""
1319
+ },
1320
+ /**
1321
+ * Additional class name for the dialog element.
1322
+ */
1323
+ dialogClass: {
1324
+ type: [String, Array, Object],
1325
+ default: ""
1326
+ },
1327
+ /**
1328
+ * The element that is focused when the popover is opened. This can be an
1329
+ * HTMLElement within the popover, a string starting with '#' which will
1330
+ * find the element by ID. 'first' which will automatically focus
1331
+ * the first element, or 'dialog' which will focus the dialog window itself.
1332
+ * If the dialog is modal this prop cannot be 'none'.
1333
+ * @values none, dialog, first
1334
+ */
1335
+ initialFocusElement: {
1336
+ type: [String, HTMLElement],
1337
+ default: "first",
1338
+ validator: (t) => Pe.includes(t) || t instanceof HTMLElement || t.startsWith("#")
1339
+ },
1340
+ /**
1341
+ * If the popover should open pressing up or down arrow key on the anchor element.
1342
+ * This can be set when not passing open prop.
1343
+ * @values true, false
1344
+ */
1345
+ openWithArrowKeys: {
1346
+ type: Boolean,
1347
+ default: !1
1348
+ },
1349
+ /**
1350
+ * Sets the element to which the popover is going to append to.
1351
+ * 'body' will append to the nearest body (supports shadow DOM).
1352
+ * @values 'body', 'parent', HTMLElement,
1353
+ */
1354
+ appendTo: {
1355
+ type: [HTMLElement, String],
1356
+ default: "body",
1357
+ validator: (t) => $e.includes(t) || t instanceof HTMLElement
1358
+ }
1359
+ },
1360
+ emits: [
1361
+ /**
1362
+ * Emitted when popover is shown or hidden
1363
+ *
1364
+ * @event opened
1365
+ * @type {Boolean | Array}
1366
+ */
1367
+ "opened",
1368
+ /**
1369
+ * Emitted to sync value with parent
1370
+ *
1371
+ * @event update:opened
1372
+ * @type {Boolean | Array}
1373
+ */
1374
+ "update:open"
1375
+ ],
1376
+ data() {
1377
+ return {
1378
+ POPOVER_PADDING_CLASSES: b,
1379
+ POPOVER_HEADER_FOOTER_PADDING_CLASSES: Te,
1380
+ intersectionObserver: null,
1381
+ isOutsideViewport: !1,
1382
+ isOpen: !1,
1383
+ anchorEl: null,
1384
+ popoverContentEl: null
1385
+ };
1386
+ },
1387
+ computed: {
1388
+ popoverListeners() {
1389
+ return {
1390
+ ...this.$listeners,
1391
+ keydown: (t) => {
1392
+ this.onKeydown(t), this.$emit("keydown", t);
1393
+ },
1394
+ "after-leave": (t) => {
1395
+ this.onLeaveTransitionComplete();
1396
+ },
1397
+ "after-enter": (t) => {
1398
+ this.onEnterTransitionComplete();
1399
+ }
1400
+ };
1401
+ },
1402
+ calculatedMaxHeight() {
1403
+ return this.isOutsideViewport && this.modal ? "calc(100vh - var(--dt-space-300))" : this.maxHeight;
1404
+ },
1405
+ labelledBy() {
1406
+ return this.ariaLabelledby || !this.ariaLabel && _("DtPopover__anchor");
1407
+ }
1408
+ },
1409
+ watch: {
1410
+ $props: {
1411
+ immediate: !0,
1412
+ deep: !0,
1413
+ handler() {
1414
+ this.validateProps();
1415
+ }
1416
+ },
1417
+ modal(t) {
1418
+ var e;
1419
+ (e = this.tip) == null || e.setProps({
1420
+ zIndex: t ? 650 : this.calculateAnchorZindex()
1421
+ });
1422
+ },
1423
+ offset(t) {
1424
+ var e;
1425
+ (e = this.tip) == null || e.setProps({
1426
+ offset: t
1427
+ });
1428
+ },
1429
+ sticky(t) {
1430
+ var e;
1431
+ (e = this.tip) == null || e.setProps({
1432
+ sticky: t
1433
+ });
1434
+ },
1435
+ fallbackPlacements() {
1436
+ var t;
1437
+ (t = this.tip) == null || t.setProps({
1438
+ popperOptions: this.popperOptions()
1439
+ });
1440
+ },
1441
+ tether() {
1442
+ var t;
1443
+ (t = this.tip) == null || t.setProps({
1444
+ popperOptions: this.popperOptions()
1445
+ });
1446
+ },
1447
+ placement(t) {
1448
+ var e;
1449
+ (e = this.tip) == null || e.setProps({
1450
+ placement: t
1451
+ });
1452
+ },
1453
+ open: {
1454
+ handler: function(t) {
1455
+ t !== null && (this.isOpen = t);
1456
+ },
1457
+ immediate: !0
1458
+ },
1459
+ isOpen(t, e) {
1460
+ t ? (this.initTippyInstance(), this.tip.show()) : !t && e !== t && (this.removeEventListeners(), this.tip.hide());
1461
+ }
1462
+ },
1463
+ mounted() {
1464
+ const t = this.externalAnchor ? this.$refs.anchor.getRootNode().querySelector(`#${this.externalAnchor}`) : null;
1465
+ this.anchorEl = t ?? this.$refs.anchor.children[0], this.popoverContentEl = this.$refs.content.$el, this.isOpen && (this.initTippyInstance(), this.tip.show()), this.intersectionObserver = new IntersectionObserver(this.hasIntersectedViewport), this.intersectionObserver.observe(this.popoverContentEl);
1466
+ },
1467
+ beforeDestroy() {
1468
+ var t;
1469
+ (t = this.tip) == null || t.destroy(), this.intersectionObserver.disconnect(), this.removeReferences(), this.removeEventListeners();
1470
+ },
1471
+ /******************
1472
+ * METHODS *
1473
+ ******************/
1474
+ methods: {
1475
+ hasIntersectedViewport(t) {
1476
+ var n;
1477
+ const e = (n = t == null ? void 0 : t[0]) == null ? void 0 : n.target;
1478
+ if (!e)
1479
+ return;
1480
+ const s = R(e);
1481
+ this.isOutsideViewport = s.bottom || s.top;
1482
+ },
1483
+ popperOptions() {
1484
+ return N({
1485
+ fallbackPlacements: this.fallbackPlacements,
1486
+ tether: this.tether,
1487
+ hasHideModifierEnabled: !0
1488
+ });
1489
+ },
1490
+ validateProps() {
1491
+ this.modal && this.initialFocusElement === "none" && console.error('If the popover is modal you must set the initialFocusElement prop. Possible values: "dialog", "first", HTMLElement');
1492
+ },
1493
+ calculateAnchorZindex() {
1494
+ var t;
1495
+ 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 650 when
1496
+ // anchor of popover is within a drawer.
1497
+ (t = this.anchorEl) != null && t.closest(".d-zi-drawer") ? 650 : 300;
1498
+ },
1499
+ defaultToggleOpen(t) {
1500
+ var e, s;
1501
+ this.openOnContext || (this.open ?? ((e = this.anchorEl) != null && e.contains(t.target) && !((s = this.anchorEl) != null && s.disabled) && this.toggleOpen()));
1502
+ },
1503
+ async onContext(t) {
1504
+ this.openOnContext && (t.preventDefault(), this.isOpen = !0, await this.$nextTick(), this.tip.setProps({
1505
+ placement: "right-start",
1506
+ getReferenceClientRect: () => ({
1507
+ width: 0,
1508
+ height: 0,
1509
+ top: t.clientY,
1510
+ bottom: t.clientY,
1511
+ left: t.clientX,
1512
+ right: t.clientX
1513
+ })
1514
+ }));
1515
+ },
1516
+ toggleOpen() {
1517
+ this.isOpen = !this.isOpen;
1518
+ },
1519
+ onArrowKeyPress(t) {
1520
+ var e;
1521
+ this.open === null && this.openWithArrowKeys && (e = this.anchorEl) != null && e.contains(t.target) && (this.isOpen || (this.isOpen = !0));
1522
+ },
1523
+ addEventListeners() {
1524
+ window.addEventListener("dt-popover-close", this.closePopover), this.contentWidth === "anchor" && window.addEventListener("resize", this.onResize);
1525
+ },
1526
+ removeEventListeners() {
1527
+ window.removeEventListener("dt-popover-close", this.closePopover), this.contentWidth === "anchor" && window.removeEventListener("resize", this.onResize);
1528
+ },
1529
+ closePopover() {
1530
+ this.isOpen = !1;
1531
+ },
1532
+ /*
1533
+ * Prevents scrolling outside of the currently opened modal popover by:
1534
+ * - when anchor is not within another popover: setting the body to overflow: hidden
1535
+ * - when anchor is within another popover: set the popover dialog container to it's non-modal z-index
1536
+ * since it is no longer the active modal. This puts it underneath the overlay and prevents scrolling.
1537
+ **/
1538
+ preventScrolling() {
1539
+ var t;
1540
+ if (this.modal) {
1541
+ const e = (t = this.anchorEl) == null ? void 0 : t.closest("body, .tippy-box");
1542
+ e.tagName.toLowerCase() === "body" ? (e.classList.add("d-of-hidden"), this.tip.setProps({ offset: this.offset })) : e.classList.add("d-zi-popover");
1543
+ }
1544
+ },
1545
+ /*
1546
+ * Resets the prevent scrolling properties set in preventScrolling() back to normal.
1547
+ **/
1548
+ enableScrolling() {
1549
+ var e, s;
1550
+ const t = (e = this.anchorEl) == null ? void 0 : e.closest("body, .tippy-box");
1551
+ t && (((s = t.tagName) == null ? void 0 : s.toLowerCase()) === "body" ? (t.classList.remove("d-of-hidden"), this.tip.setProps({ offset: this.offset })) : t.classList.remove("d-zi-popover"));
1552
+ },
1553
+ removeReferences() {
1554
+ this.anchorEl = null, this.popoverContentEl = null, this.tip = null;
1555
+ },
1556
+ async onShow() {
1557
+ this.contentWidth === "anchor" && await this.setPopoverContentAnchorWidth(), this.contentWidth === null && (this.popoverContentEl.style.width = "auto"), this.addEventListeners();
1558
+ },
1559
+ async onLeaveTransitionComplete() {
1560
+ var t;
1561
+ this.modal && (await this.focusFirstElement(this.$refs.anchor), await this.$nextTick(), this.enableScrolling()), (t = this.tip) == null || t.unmount(), this.$emit("opened", !1), this.open !== null && this.$emit("update:open", !1);
1562
+ },
1563
+ async onEnterTransitionComplete() {
1564
+ this.focusInitialElement(), await this.$nextTick(), this.preventScrolling(), this.$emit("opened", !0, this.$refs.popover__content), this.open !== null && this.$emit("update:open", !0);
1565
+ },
1566
+ focusInitialElement() {
1567
+ this.initialFocusElement === "dialog" && this.$refs.content.$el.focus(), this.initialFocusElement.startsWith("#") && this.focusInitialElementById(), this.initialFocusElement === "first" && this.focusFirstElementIfNeeded(this.$refs.popover__content), this.initialFocusElement instanceof HTMLElement && this.initialFocusElement.focus();
1568
+ },
1569
+ focusInitialElementById() {
1570
+ var e, s, n;
1571
+ const t = (s = (e = this.$refs.content) == null ? void 0 : e.$el) == null ? void 0 : s.querySelector(this.initialFocusElement);
1572
+ t ? t.focus() : console.warn('Could not find the element specified in dt-popover prop "initialFocusElement". Defaulting to focusing the dialog.'), t ? t.focus() : (n = this.$refs.content) == null || n.$el.focus();
1573
+ },
1574
+ onResize() {
1575
+ this.closePopover();
1576
+ },
1577
+ onClickOutside() {
1578
+ if (!this.hideOnClick)
1579
+ return;
1580
+ this.popoverContentEl.querySelector(".d-popover__anchor--opened") || this.closePopover();
1581
+ },
1582
+ onKeydown(t) {
1583
+ t.key === "Tab" && this.modal && this.focusTrappedTabPress(t, this.popoverContentEl), t.key === "Escape" && this.closePopover();
1584
+ },
1585
+ async setPopoverContentAnchorWidth() {
1586
+ var t;
1587
+ await this.$nextTick(), this.popoverContentEl.style.width = `${(t = this.anchorEl) == null ? void 0 : t.clientWidth}px`;
1588
+ },
1589
+ focusFirstElementIfNeeded(t) {
1590
+ var s, n;
1591
+ this._getFocusableElements(t, !0).length !== 0 ? this.focusFirstElement(t) : this.showCloseButton ? (s = this.$refs.popover__header) == null || s.focusCloseButton() : (n = this.$refs.content) == null || n.$el.focus();
1592
+ },
1593
+ initTippyInstance() {
1594
+ var t, e;
1595
+ this.tip = F(this.anchorEl, {
1596
+ popperOptions: this.popperOptions(),
1597
+ contentElement: this.popoverContentEl,
1598
+ placement: this.placement,
1599
+ offset: this.offset,
1600
+ sticky: this.sticky,
1601
+ appendTo: this.appendTo === "body" ? (e = (t = this.anchorEl) == null ? void 0 : t.getRootNode()) == null ? void 0 : e.querySelector("body") : this.appendTo,
1602
+ interactive: !0,
1603
+ trigger: "manual",
1604
+ // We have to manage hideOnClick functionality manually to handle
1605
+ // popover within popover situations.
1606
+ hideOnClick: !1,
1607
+ zIndex: this.modal ? 650 : this.calculateAnchorZindex(),
1608
+ onClickOutside: this.onClickOutside,
1609
+ onShow: this.onShow
1610
+ });
1611
+ }
1612
+ }
1613
+ };
1614
+ var ze = function() {
1615
+ var e = this, s = e._self._c;
1616
+ return s("div", [e.modal && e.isOpen ? s("portal", [s("div", { staticClass: "d-modal--transparent", attrs: { "aria-hidden": e.modal && e.isOpen ? "false" : "true" }, on: { click: function(n) {
1617
+ n.preventDefault(), n.stopPropagation();
1618
+ } } })]) : e._e(), s(e.elementType, e._g({ ref: "popover", tag: "component", class: ["d-popover", { "d-popover__anchor--opened": e.isOpen }], attrs: { "data-qa": "dt-popover-container" } }, e.$listeners), [s("div", { ref: "anchor", attrs: { id: !e.ariaLabelledby && e.labelledBy, "data-qa": "dt-popover-anchor", tabindex: e.openOnContext ? 0 : void 0 }, on: { "!click": function(n) {
1619
+ return e.defaultToggleOpen.apply(null, arguments);
1620
+ }, contextmenu: e.onContext, keydown: [function(n) {
1621
+ return !n.type.indexOf("key") && e._k(n.keyCode, "up", 38, n.key, ["Up", "ArrowUp"]) ? null : (n.preventDefault(), e.onArrowKeyPress.apply(null, arguments));
1622
+ }, function(n) {
1623
+ return !n.type.indexOf("key") && e._k(n.keyCode, "down", 40, n.key, ["Down", "ArrowDown"]) ? null : (n.preventDefault(), e.onArrowKeyPress.apply(null, arguments));
1624
+ }], "!keydown": function(n) {
1625
+ return !n.type.indexOf("key") && e._k(n.keyCode, "escape", void 0, n.key, void 0) ? null : e.closePopover.apply(null, arguments);
1626
+ } } }, [e._t("anchor", null, { attrs: {
1627
+ "aria-expanded": e.isOpen.toString(),
1628
+ "aria-controls": e.id,
1629
+ "aria-haspopup": e.role
1630
+ } })], 2), s("dt-lazy-show", e._g({ ref: "content", class: ["d-popover__dialog", { "d-popover__dialog--modal": e.modal }, e.dialogClass], style: {
1631
+ "max-height": e.calculatedMaxHeight,
1632
+ "max-width": e.maxWidth
1633
+ }, attrs: { id: e.id, role: e.role, "data-qa": "dt-popover", "aria-hidden": `${!e.isOpen}`, "aria-labelledby": e.labelledBy, "aria-label": e.ariaLabel, "aria-modal": `${!e.modal}`, transition: e.transition, show: e.isOpen, tabindex: e.contentTabindex, appear: "" } }, e.popoverListeners), [e.$slots.headerContent || e.showCloseButton ? s("popover-header-footer", { ref: "popover__header", class: e.POPOVER_HEADER_FOOTER_PADDING_CLASSES[e.padding], attrs: { "content-class": e.headerClass, type: "header", "show-close-button": e.showCloseButton, "close-button-props": e.closeButtonProps }, on: { close: e.closePopover }, scopedSlots: e._u([{ key: "content", fn: function() {
1634
+ return [e._t("headerContent", null, { close: e.closePopover })];
1635
+ }, proxy: !0 }], null, !0) }) : e._e(), s("div", { ref: "popover__content", class: [
1636
+ "d-popover__content",
1637
+ e.POPOVER_PADDING_CLASSES[e.padding],
1638
+ e.contentClass
1639
+ ], attrs: { "data-qa": "dt-popover-content" } }, [e._t("content", null, { close: e.closePopover })], 2), e.$slots.footerContent ? s("popover-header-footer", { ref: "popover__footer", class: e.POPOVER_HEADER_FOOTER_PADDING_CLASSES[e.padding], attrs: { type: "footer", "content-class": e.footerClass }, scopedSlots: e._u([{ key: "content", fn: function() {
1640
+ return [e._t("footerContent", null, { close: e.closePopover })];
1641
+ }, proxy: !0 }], null, !0) }) : e._e(), e.showVisuallyHiddenClose ? s("sr-only-close-button", { attrs: { "visually-hidden-close-label": e.visuallyHiddenCloseLabel }, on: { close: e.closePopover } }) : e._e()], 1)], 1)], 1);
1642
+ }, je = [], Ke = /* @__PURE__ */ a(
1643
+ Me,
1644
+ ze,
1645
+ je,
1646
+ !1,
1647
+ null,
1648
+ null,
1649
+ null,
1650
+ null
1651
+ );
1652
+ const lt = Ke.exports;
1653
+ function C(t) {
1654
+ return t === i.default;
1655
+ }
1656
+ function O(t) {
1657
+ if (l(t) === "string")
1658
+ return C(t) ? null : i[t];
1659
+ if (l(t) === "object") {
1660
+ const { default: e } = t;
1661
+ return C(e) ? null : i[e];
1662
+ } else
1663
+ return null;
1664
+ }
1665
+ function l(t) {
1666
+ return typeof t;
1667
+ }
1668
+ function We(t) {
1669
+ return O(t) ? `d-stack--${i[O(t)]}` : null;
1670
+ }
1671
+ function Ge(t) {
1672
+ return l(t) === "object" ? [
1673
+ ...A.map((e) => t[e] ? `d-stack--${e}--${t[e]}` : null)
1674
+ ] : null;
1675
+ }
1676
+ function Ue(t) {
1677
+ return y.includes(t) ? `d-stack--gap-${t}` : null;
1678
+ }
1679
+ function Ye(t) {
1680
+ if (l(t) === "string")
1681
+ return Object.keys(i).includes(t);
1682
+ if (l(t) === "object") {
1683
+ const { default: e } = t;
1684
+ return Object.keys(i).includes(e);
1685
+ } else
1686
+ return null;
1687
+ }
1688
+ function Ze(t) {
1689
+ return y.includes(t);
1690
+ }
1691
+ const Xe = {
1692
+ name: "DtStack",
1693
+ props: {
1694
+ /**
1695
+ * Set this prop to the direction to stack the items.
1696
+ * You can override the default direction with 'default' key.
1697
+ * All the undefined breakpoints will have 'default' value.
1698
+ * By default, for the column direction it will have `justify-content: flex-start`
1699
+ * and for the row direction `align-items: center`. This can be overriden
1700
+ * by utility classes.
1701
+ */
1702
+ direction: {
1703
+ type: [String, Object],
1704
+ default: "column",
1705
+ validator: (t) => Ye(t)
1706
+ },
1707
+ /**
1708
+ * Set this prop to render stack as a specific HTML element.
1709
+ */
1710
+ as: {
1711
+ type: String,
1712
+ default: "div"
1713
+ },
1714
+ /**
1715
+ * Set this prop to have the space between each stack item
1716
+ * @values 0, 100, 200, 300, 400, 500, 600
1717
+ */
1718
+ gap: {
1719
+ type: String,
1720
+ default: "0",
1721
+ validator: (t) => Ze(t)
1722
+ }
1723
+ },
1724
+ data() {
1725
+ return {
1726
+ DT_STACK_DIRECTION: i,
1727
+ DT_STACK_GAP: y,
1728
+ DT_STACK_RESPONSIVE_BREAKPOINTS: A
1729
+ };
1730
+ },
1731
+ computed: {
1732
+ stackGap() {
1733
+ return Ue(this.gap);
1734
+ },
1735
+ defaultDirection() {
1736
+ return We(this.direction);
1737
+ },
1738
+ stackResponsive() {
1739
+ return Ge(this.direction);
1740
+ }
1741
+ }
1742
+ };
1743
+ var Je = function() {
1744
+ var e = this, s = e._self._c;
1745
+ return s(e.as, { tag: "component", class: [
1746
+ "d-stack",
1747
+ e.defaultDirection,
1748
+ e.stackResponsive,
1749
+ e.stackGap
1750
+ ] }, [e._t("default")], 2);
1751
+ }, Qe = [], et = /* @__PURE__ */ a(
1752
+ Xe,
1753
+ Je,
1754
+ Qe,
1755
+ !1,
1756
+ null,
1757
+ null,
1758
+ null,
1759
+ null
1760
+ );
1761
+ const dt = et.exports;
1762
+ export {
1763
+ f as A,
1764
+ A as B,
1765
+ it as D,
1766
+ d as L,
1767
+ ye as M,
1768
+ $e as P,
1769
+ he as S,
1770
+ dt as a,
1771
+ ot as b,
1772
+ at as c,
1773
+ lt as d,
1774
+ de as e,
1775
+ y as f,
1776
+ P as g,
1777
+ we as h,
1778
+ E as i,
1779
+ U as j,
1780
+ Y as k,
1781
+ g as l,
1782
+ Z as m,
1783
+ X as n,
1784
+ S as o,
1785
+ h as p,
1786
+ b as q,
1787
+ Te as r,
1788
+ Ae as s,
1789
+ Pe as t,
1790
+ ke as u,
1791
+ rt as v,
1792
+ G as w,
1793
+ r as x,
1794
+ M as y,
1795
+ i as z
1796
+ };