@dialpad/dialtone-vue 3.96.0 → 3.96.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (148) hide show
  1. package/CHANGELOG.json +1 -1
  2. package/CHANGELOG.md +19 -0
  3. package/README.md +3 -3
  4. package/dist/component-documentation.json +1 -1
  5. package/dist/dialtone-vue.cjs +5 -5
  6. package/dist/dialtone-vue.js +2503 -2601
  7. package/dist/directives.cjs +1 -1
  8. package/dist/directives.js +1 -1
  9. package/dist/{emoji-zsImd-qD.js → emoji-64scMQZS.js} +6280 -7196
  10. package/dist/emoji-zMlz3b9J.cjs +1 -0
  11. package/dist/emoji.cjs +1 -1
  12. package/dist/emoji.js +33 -113
  13. package/dist/emoji_picker-MrGLDXUn.js +921 -0
  14. package/dist/emoji_picker-gkXbSV3i.cjs +1 -0
  15. package/dist/emoji_text_wrapper-5mWcPQ4m.cjs +1 -0
  16. package/dist/emoji_text_wrapper-GCssca4o.js +86 -0
  17. package/dist/message_input.cjs +92 -1
  18. package/dist/message_input.js +13903 -5
  19. package/dist/stack-_FIkvuMY.cjs +2 -0
  20. package/dist/stack-q9VLdD1J.js +2722 -0
  21. package/dist/style.css +1 -1
  22. package/dist/tooltip-H27s49LR.js +2476 -0
  23. package/dist/tooltip-gZ2LW6l0.cjs +21 -0
  24. package/dist/types/common/constants.d.ts +31 -31
  25. package/dist/types/common/mixins/input.d.ts +38 -38
  26. package/dist/types/common/mixins/input_group.d.ts +19 -19
  27. package/dist/types/common/mixins/sr_only_close_button.d.ts +6 -6
  28. package/dist/types/components/avatar/avatar.vue.d.ts +1 -1
  29. package/dist/types/components/avatar/avatar_constants.d.ts +20 -20
  30. package/dist/types/components/badge/badge.vue.d.ts +9 -2
  31. package/dist/types/components/badge/badge.vue.d.ts.map +1 -1
  32. package/dist/types/components/badge/badge_constants.d.ts +9 -9
  33. package/dist/types/components/button/button.vue.d.ts +1 -1
  34. package/dist/types/components/button/button_constants.d.ts +21 -21
  35. package/dist/types/components/button/index.d.ts +1 -0
  36. package/dist/types/components/checkbox/checkbox.vue.d.ts +6 -1
  37. package/dist/types/components/checkbox/checkbox.vue.d.ts.map +1 -1
  38. package/dist/types/components/checkbox/checkbox_constants.d.ts +3 -3
  39. package/dist/types/components/checkbox_group/checkbox_group.vue.d.ts +9 -2
  40. package/dist/types/components/checkbox_group/checkbox_group.vue.d.ts.map +1 -1
  41. package/dist/types/components/chip/chip_constants.d.ts +10 -9
  42. package/dist/types/components/chip/index.d.ts +1 -1
  43. package/dist/types/components/combobox/combobox.vue.d.ts +16 -8
  44. package/dist/types/components/combobox/combobox.vue.d.ts.map +1 -1
  45. package/dist/types/components/combobox/combobox_constants.d.ts +9 -5
  46. package/dist/types/components/combobox/index.d.ts +1 -0
  47. package/dist/types/components/datepicker/{DtDatepicker.vue.d.ts → datepicker.vue.d.ts} +2 -2
  48. package/dist/types/components/datepicker/datepicker.vue.d.ts.map +1 -0
  49. package/dist/types/components/datepicker/formatUtils.d.ts +8 -0
  50. package/dist/types/components/datepicker/index.d.ts +1 -1
  51. package/dist/types/components/datepicker/modules/calendar.vue.d.ts +4 -1
  52. package/dist/types/components/datepicker/modules/month-year-picker.vue.d.ts +7 -1
  53. package/dist/types/components/dropdown/dropdown.vue.d.ts +27 -1
  54. package/dist/types/components/dropdown/dropdown.vue.d.ts.map +1 -1
  55. package/dist/types/components/dropdown/dropdown_constants.d.ts +7 -3
  56. package/dist/types/components/dropdown/index.d.ts +1 -0
  57. package/dist/types/components/emoji_picker/composables/useKeyboardNavigation.d.ts.map +1 -1
  58. package/dist/types/components/emoji_picker/{DtEmojiPicker.vue.d.ts → emoji_picker.vue.d.ts} +2 -2
  59. package/dist/types/components/emoji_picker/emoji_picker.vue.d.ts.map +1 -0
  60. package/dist/types/components/emoji_picker/emoji_picker_constants.d.ts +22 -17
  61. package/dist/types/components/emoji_picker/index.d.ts +1 -1
  62. package/dist/types/components/emoji_picker/modules/emoji_description.vue.d.ts +1 -0
  63. package/dist/types/components/emoji_picker/modules/emoji_search.vue.d.ts +3 -1
  64. package/dist/types/components/emoji_picker/modules/emoji_search.vue.d.ts.map +1 -1
  65. package/dist/types/components/emoji_picker/modules/emoji_selector.vue.d.ts +1 -1
  66. package/dist/types/components/emoji_picker/modules/emoji_selector.vue.d.ts.map +1 -1
  67. package/dist/types/components/emoji_picker/modules/emoji_skin_selector.vue.d.ts +1 -1
  68. package/dist/types/components/emoji_picker/modules/emoji_skin_selector.vue.d.ts.map +1 -1
  69. package/dist/types/components/emoji_picker/modules/emoji_tabset.vue.d.ts +1 -1
  70. package/dist/types/components/input/input.vue.d.ts +2 -2
  71. package/dist/types/components/input/input_constants.d.ts +13 -13
  72. package/dist/types/components/input_group/input_group.vue.d.ts +3 -1
  73. package/dist/types/components/input_group/input_group.vue.d.ts.map +1 -1
  74. package/dist/types/components/link/link_constants.d.ts +11 -6
  75. package/dist/types/components/list_item/index.d.ts +1 -0
  76. package/dist/types/components/list_item/list_item.vue.d.ts +1 -1
  77. package/dist/types/components/list_item/list_item_constants.d.ts +5 -5
  78. package/dist/types/components/modal/modal_constants.d.ts +9 -9
  79. package/dist/types/components/popover/index.d.ts +1 -1
  80. package/dist/types/components/popover/popover.vue.d.ts +1 -1
  81. package/dist/types/components/popover/popover_constants.d.ts +19 -8
  82. package/dist/types/components/presence/presence_constants.d.ts +4 -4
  83. package/dist/types/components/radio/index.d.ts +1 -0
  84. package/dist/types/components/radio/radio.vue.d.ts +3 -7
  85. package/dist/types/components/radio/radio.vue.d.ts.map +1 -1
  86. package/dist/types/components/radio/radio_constants.d.ts +3 -3
  87. package/dist/types/components/radio_group/radio_group.vue.d.ts +1 -3
  88. package/dist/types/components/radio_group/radio_group.vue.d.ts.map +1 -1
  89. package/dist/types/components/rich_text_editor/extensions/emoji/EmojiComponent.vue.d.ts +2 -2
  90. package/dist/types/components/rich_text_editor/extensions/link/utils.d.ts +5 -1
  91. package/dist/types/components/rich_text_editor/extensions/link/utils.d.ts.map +1 -1
  92. package/dist/types/components/rich_text_editor/extensions/mentions/MentionComponent.vue.d.ts +2 -2
  93. package/dist/types/components/rich_text_editor/rich_text_editor.vue.d.ts +1 -1
  94. package/dist/types/components/rich_text_editor/rich_text_editor_constants.d.ts +5 -0
  95. package/dist/types/components/root_layout/root_layout_constants.d.ts +2 -2
  96. package/dist/types/components/scroller/DtScroller.vue.d.ts +11 -1
  97. package/dist/types/components/scroller/DtScroller.vue.d.ts.map +1 -1
  98. package/dist/types/components/scroller/modules/core_scroller.vue.d.ts +13 -1
  99. package/dist/types/components/scroller/modules/core_scroller.vue.d.ts.map +1 -1
  100. package/dist/types/components/scroller/modules/scroller_item.vue.d.ts.map +1 -1
  101. package/dist/types/components/select_menu/select_menu.vue.d.ts +1 -1
  102. package/dist/types/components/select_menu/select_menu_constants.d.ts +8 -8
  103. package/dist/types/components/skeleton/skeleton_constants.d.ts +8 -8
  104. package/dist/types/components/stack/index.d.ts +1 -0
  105. package/dist/types/components/stack/stack_constants.d.ts +6 -0
  106. package/dist/types/components/tabs/tabs_constants.d.ts +4 -4
  107. package/dist/types/components/toast/toast.vue.d.ts +4 -1
  108. package/dist/types/components/toast/toast.vue.d.ts.map +1 -1
  109. package/dist/types/components/toggle/index.d.ts +1 -0
  110. package/dist/types/components/toggle/toggle_constants.d.ts +3 -2
  111. package/dist/types/components/tooltip/tooltip_constants.d.ts +4 -4
  112. package/dist/types/directives/tooltip/tooltip.d.ts +1 -1
  113. package/dist/types/index.d.ts +0 -3
  114. package/dist/types/message_input.d.ts +1 -0
  115. package/dist/types/recipes/cards/ivr_node/ivr_node_constants.d.ts +22 -22
  116. package/dist/types/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.d.ts +2 -2
  117. package/dist/types/recipes/comboboxes/combobox_multi_select/combobox_multi_select_constants.d.ts +25 -0
  118. package/dist/types/recipes/comboboxes/combobox_multi_select/combobox_multi_select_constants.d.ts.map +1 -0
  119. package/dist/types/recipes/comboboxes/combobox_multi_select/combobox_multi_select_story_constants.d.ts +0 -18
  120. package/dist/types/recipes/comboboxes/combobox_multi_select/index.d.ts +1 -1
  121. package/dist/types/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.d.ts +1 -1
  122. package/dist/types/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.d.ts.map +1 -1
  123. package/dist/types/recipes/conversation_view/feed_item_row/feed_item_row.vue.d.ts +13 -2
  124. package/dist/types/recipes/conversation_view/feed_item_row/feed_item_row.vue.d.ts.map +1 -1
  125. package/dist/types/recipes/conversation_view/feed_item_row/feed_item_row_constants.d.ts +3 -3
  126. package/dist/types/recipes/conversation_view/feed_item_row/index.d.ts +1 -0
  127. package/dist/types/recipes/conversation_view/feed_pill/feed_item_pill_constants.d.ts +3 -3
  128. package/dist/types/recipes/conversation_view/message_input/message_input.vue.d.ts +14 -62
  129. package/dist/types/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -1
  130. package/dist/types/recipes/leftbar/callbox/callbox_constants.d.ts +4 -4
  131. package/dist/types/recipes/leftbar/general_row/general_row.vue.d.ts +1 -1
  132. package/dist/types/recipes/leftbar/general_row/general_row_constants.d.ts +12 -12
  133. package/dist/types/recipes/leftbar/general_row/leftbar_general_row_icon.vue.d.ts +1 -1
  134. package/dist/types/recipes/list_items/contact_info/contact_info.vue.d.ts +1 -1
  135. package/package.json +51 -51
  136. package/dist/emoji-5anz0QgY.cjs +0 -1
  137. package/dist/message_input-JdPf8pn2.js +0 -16500
  138. package/dist/message_input-s1pJ2P6G.cjs +0 -93
  139. package/dist/tooltip-3LC0ejIh.cjs +0 -25
  140. package/dist/tooltip-laZwfd56.js +0 -2574
  141. package/dist/types/components/datepicker/DtDatepicker.vue.d.ts.map +0 -1
  142. package/dist/types/components/emoji_picker/DtEmojiPicker.vue.d.ts.map +0 -1
  143. package/dist/types/components/list_section/index.d.ts +0 -2
  144. package/dist/types/components/list_section/index.d.ts.map +0 -1
  145. package/dist/types/components/list_section/list_section.vue.d.ts +0 -71
  146. package/dist/types/components/list_section/list_section.vue.d.ts.map +0 -1
  147. package/dist/types/components/tooltip/tooltip_variants.vue.d.ts +0 -7
  148. package/dist/types/components/tooltip/tooltip_variants.vue.d.ts.map +0 -1
@@ -0,0 +1,2722 @@
1
+ import { _ as y, g as R, a as Y, h as L, u as Z, b as X, B as J, c as Q, i as ee, d as te, e as se } from "./tooltip-H27s49LR.js";
2
+ import { openBlock as a, createElementBlock as r, toDisplayString as I, createCommentVNode as d, createElementVNode as b, normalizeClass as f, resolveComponent as p, createBlock as u, resolveDynamicComponent as E, withCtx as h, mergeProps as A, renderSlot as l, createVNode as _, createTextVNode as oe, withKeys as S, withModifiers as P, toHandlers as K, createSlots as ne, renderList as ae, Teleport as ie } from "vue";
3
+ import { w, I as le, L as re, A as de, B as F } from "./emoji-64scMQZS.js";
4
+ const C = {
5
+ BUSY: "busy",
6
+ AWAY: "away",
7
+ OFFLINE: "offline",
8
+ ACTIVE: "active"
9
+ }, ce = [
10
+ C.BUSY,
11
+ C.AWAY,
12
+ C.OFFLINE,
13
+ C.ACTIVE
14
+ ], ue = {
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: C.ACTIVE,
25
+ validator: (e) => ce.includes(e)
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
+ }, he = ["aria-live"], pe = {
38
+ key: 0,
39
+ "data-qa": "dt-presence-sr-text",
40
+ class: "sr-only"
41
+ };
42
+ function fe(e, s, t, i, n, o) {
43
+ return a(), r("div", {
44
+ class: "d-presence",
45
+ "data-qa": "dt-presence",
46
+ role: "status",
47
+ "aria-live": e.$attrs.ariaLive || "off"
48
+ }, [
49
+ t.srText ? (a(), r("span", pe, I(t.srText), 1)) : d("", !0),
50
+ b("div", {
51
+ class: f(["d-presence__inner", {
52
+ "d-presence__inner--active": t.presence === "active",
53
+ "d-presence__inner--away": t.presence === "away",
54
+ "d-presence__inner--busy": t.presence === "busy",
55
+ "d-presence__inner--offline": t.presence === "offline"
56
+ }])
57
+ }, null, 2)
58
+ ], 8, he);
59
+ }
60
+ const me = /* @__PURE__ */ y(ue, [["render", fe]]), N = {
61
+ xs: "d-avatar--xs",
62
+ sm: "d-avatar--sm",
63
+ md: "d-avatar--md",
64
+ lg: "d-avatar--lg",
65
+ xl: "d-avatar--xl"
66
+ }, ye = {
67
+ default: "",
68
+ icon: "d-avatar__icon",
69
+ initials: "d-avatar__initials"
70
+ }, ge = {
71
+ md: "d-avatar__presence--md",
72
+ lg: "d-avatar__presence--lg"
73
+ }, z = {
74
+ NONE: "",
75
+ BUSY: "busy",
76
+ AWAY: "away",
77
+ OFFLINE: "offline",
78
+ ACTIVE: "active"
79
+ }, ve = {
80
+ xs: "100",
81
+ sm: "200",
82
+ md: "300",
83
+ lg: "500",
84
+ xl: "600"
85
+ }, _e = [
86
+ "100",
87
+ "200",
88
+ "300",
89
+ "400",
90
+ "500",
91
+ "600",
92
+ "700",
93
+ "800",
94
+ "900",
95
+ "1000",
96
+ "1100",
97
+ "1200",
98
+ "1300",
99
+ "1400",
100
+ "1500",
101
+ "1600",
102
+ "1700",
103
+ "1800"
104
+ ], H = (e) => e > 1, be = [
105
+ "accessibility",
106
+ "activity",
107
+ "add-task",
108
+ "ai-notes",
109
+ "airplay",
110
+ "airtable",
111
+ "alarm-check",
112
+ "alarm-clock-off",
113
+ "alarm-minus",
114
+ "alarm-plus",
115
+ "album",
116
+ "alert-circle",
117
+ "alert-triangle",
118
+ "amex",
119
+ "app-store-badge",
120
+ "apple",
121
+ "archive",
122
+ "archive-restore",
123
+ "arrow-down",
124
+ "arrow-down-left",
125
+ "arrow-down-right",
126
+ "arrow-left",
127
+ "arrow-left-right",
128
+ "arrow-right",
129
+ "arrow-up",
130
+ "arrow-up-down",
131
+ "arrow-up-left",
132
+ "arrow-up-right",
133
+ "asana",
134
+ "asterisk",
135
+ "at-sign",
136
+ "ata-adapter",
137
+ "attestation",
138
+ "attestation-outline",
139
+ "axis-3d",
140
+ "bar-chart",
141
+ "bar-chart-2",
142
+ "bar-chart-3",
143
+ "bar-chart-4",
144
+ "bar-chart-horizontal",
145
+ "barge",
146
+ "baseline",
147
+ "battery",
148
+ "battery-charging",
149
+ "battery-full",
150
+ "battery-low",
151
+ "battery-medium",
152
+ "bell",
153
+ "bell-minus",
154
+ "bell-off",
155
+ "bell-plus",
156
+ "bell-ring",
157
+ "binary",
158
+ "bluetooth",
159
+ "bluetooth-connected",
160
+ "bluetooth-off",
161
+ "bluetooth-searching",
162
+ "blur-background",
163
+ "bold",
164
+ "book",
165
+ "book-open",
166
+ "bookmark",
167
+ "bookmark-minus",
168
+ "bookmark-plus",
169
+ "box",
170
+ "box-select",
171
+ "boxes",
172
+ "branch",
173
+ "brand-dialpad",
174
+ "brand-dialpad-meetings",
175
+ "briefcase",
176
+ "building",
177
+ "building-2",
178
+ "bullhorn",
179
+ "calculator",
180
+ "calendar",
181
+ "calendar-check",
182
+ "calendar-check-2",
183
+ "calendar-clock",
184
+ "calendar-days",
185
+ "calendar-heart",
186
+ "calendar-minus",
187
+ "calendar-off",
188
+ "calendar-plus",
189
+ "calendar-range",
190
+ "calendar-search",
191
+ "calendar-x",
192
+ "call-abandoned",
193
+ "call-merge",
194
+ "call-rejected",
195
+ "camera",
196
+ "camera-off",
197
+ "camera-tracking",
198
+ "cast",
199
+ "check",
200
+ "check-circle",
201
+ "check-circle-filled",
202
+ "chevron-down",
203
+ "chevron-first",
204
+ "chevron-last",
205
+ "chevron-left",
206
+ "chevron-right",
207
+ "chevron-up",
208
+ "chevrons-down",
209
+ "chevrons-down-up",
210
+ "chevrons-left",
211
+ "chevrons-left-right",
212
+ "chevrons-right",
213
+ "chevrons-right-left",
214
+ "chevrons-up",
215
+ "chevrons-up-down",
216
+ "circle-half-filled",
217
+ "circle-slashed",
218
+ "clipboard",
219
+ "clipboard-check",
220
+ "clipboard-copy",
221
+ "clipboard-edit",
222
+ "clipboard-list",
223
+ "clipboard-signature",
224
+ "clipboard-type",
225
+ "clipboard-x",
226
+ "clock",
227
+ "clock-1",
228
+ "clock-10",
229
+ "clock-11",
230
+ "clock-12",
231
+ "clock-2",
232
+ "clock-3",
233
+ "clock-4",
234
+ "clock-5",
235
+ "clock-6",
236
+ "clock-7",
237
+ "clock-8",
238
+ "clock-9",
239
+ "clockify",
240
+ "close",
241
+ "cloud",
242
+ "cloud-cog",
243
+ "cloud-drizzle",
244
+ "cloud-fog",
245
+ "cloud-hail",
246
+ "cloud-lightning",
247
+ "cloud-moon",
248
+ "cloud-moon-rain",
249
+ "cloud-off",
250
+ "cloud-rain",
251
+ "cloud-rain-wind",
252
+ "cloud-snow",
253
+ "cloud-sun",
254
+ "cloud-sun-rain",
255
+ "cloudy",
256
+ "coaching-hub",
257
+ "code",
258
+ "command",
259
+ "concierge-bell",
260
+ "contacts",
261
+ "copper-crm",
262
+ "copy",
263
+ "copyright",
264
+ "corner-down-left",
265
+ "corner-down-right",
266
+ "corner-left-down",
267
+ "corner-left-up",
268
+ "corner-right-down",
269
+ "corner-right-up",
270
+ "corner-up-left",
271
+ "corner-up-right",
272
+ "cpu",
273
+ "credit-card",
274
+ "dash",
275
+ "dect-base-station",
276
+ "dect-handset",
277
+ "delete",
278
+ "deskphone",
279
+ "dialbot",
280
+ "dialer",
281
+ "dialpad-ai",
282
+ "dialpad-ai-color",
283
+ "dialpad-logomark",
284
+ "digital-whisper",
285
+ "diners-club",
286
+ "discover",
287
+ "dissatisfied",
288
+ "double-check",
289
+ "download",
290
+ "download-cloud",
291
+ "dp-phone",
292
+ "edit",
293
+ "edit-2",
294
+ "empty",
295
+ "end-chat",
296
+ "equal",
297
+ "eraser",
298
+ "evernote",
299
+ "expand",
300
+ "expert-node",
301
+ "external-link",
302
+ "eye",
303
+ "eye-off",
304
+ "facebook",
305
+ "factory",
306
+ "fast-forward",
307
+ "file",
308
+ "file-audio",
309
+ "files",
310
+ "film",
311
+ "filter",
312
+ "fingerprint",
313
+ "flag",
314
+ "flag-off",
315
+ "flame",
316
+ "focus",
317
+ "folder",
318
+ "folder-tree",
319
+ "folders",
320
+ "food",
321
+ "form-input",
322
+ "forward",
323
+ "freshsales-crm",
324
+ "front",
325
+ "gamepad",
326
+ "gauge",
327
+ "globe-2",
328
+ "gmail",
329
+ "google-business-messaging",
330
+ "google-calendar",
331
+ "google-docs",
332
+ "google-drive",
333
+ "google-glyph",
334
+ "google-sheets",
335
+ "google-slides",
336
+ "greenhouse",
337
+ "grid",
338
+ "grip-horizontal",
339
+ "grip-vertical",
340
+ "hand",
341
+ "hard-drive",
342
+ "hash",
343
+ "hash-bold",
344
+ "haze",
345
+ "hd",
346
+ "headphones",
347
+ "hear",
348
+ "heart",
349
+ "help-circle",
350
+ "highfive",
351
+ "history",
352
+ "hold",
353
+ "home",
354
+ "hourglass",
355
+ "hubspot",
356
+ "image",
357
+ "import",
358
+ "inbox",
359
+ "indent",
360
+ "infinity",
361
+ "info",
362
+ "inspect",
363
+ "instagram",
364
+ "intercom",
365
+ "isolated-queries",
366
+ "italic",
367
+ "jcb",
368
+ "jira-service-desk",
369
+ "key",
370
+ "keyboard",
371
+ "keypad",
372
+ "languages",
373
+ "laptop-2",
374
+ "large-self-view",
375
+ "layout",
376
+ "layout-dashboard",
377
+ "layout-filmstrip",
378
+ "layout-grid",
379
+ "layout-template",
380
+ "library",
381
+ "life-buoy",
382
+ "lightbulb",
383
+ "lightbulb-off",
384
+ "lightning-bolt",
385
+ "line-chart",
386
+ "line-messenger",
387
+ "link-2",
388
+ "link-2-off",
389
+ "linkedin",
390
+ "list-add",
391
+ "list-bullet",
392
+ "list-checks",
393
+ "list-ordered",
394
+ "listen",
395
+ "listen",
396
+ "listening",
397
+ "live-queue",
398
+ "living-thing",
399
+ "loading",
400
+ "lock",
401
+ "lock-filled",
402
+ "log-in",
403
+ "log-out",
404
+ "maestro",
405
+ "mail",
406
+ "mail-open",
407
+ "mails",
408
+ "map",
409
+ "map-pin",
410
+ "mastercard",
411
+ "maximize",
412
+ "megaphone",
413
+ "megaphone-off",
414
+ "menu",
415
+ "message",
416
+ "messenger",
417
+ "mic",
418
+ "mic-off",
419
+ "microsoft",
420
+ "microsoft-dynamics-365",
421
+ "microsoft-teams",
422
+ "minimize",
423
+ "minimize-alt",
424
+ "minus-circle",
425
+ "miro",
426
+ "monday-com",
427
+ "monitor",
428
+ "monitor-off",
429
+ "monitor-speaker",
430
+ "moon",
431
+ "more-horizontal",
432
+ "more-vertical",
433
+ "mouse",
434
+ "multi-line-dept",
435
+ "music",
436
+ "music-off",
437
+ "network",
438
+ "neutral",
439
+ "newspaper",
440
+ "not-enough-queries",
441
+ "notes",
442
+ "object",
443
+ "office-365",
444
+ "option",
445
+ "package",
446
+ "paperclip",
447
+ "park",
448
+ "party-popper",
449
+ "past-conversations",
450
+ "pause",
451
+ "pause-circle",
452
+ "phone",
453
+ "phone-call",
454
+ "phone-forward",
455
+ "phone-hang-up",
456
+ "phone-hang-up",
457
+ "phone-hold",
458
+ "phone-incoming",
459
+ "phone-missed",
460
+ "phone-off",
461
+ "phone-outgoing",
462
+ "picture-in-picture",
463
+ "pie-chart",
464
+ "pin",
465
+ "pin-off",
466
+ "pipedrive",
467
+ "play",
468
+ "play-circle",
469
+ "play-filled",
470
+ "play-store-badge",
471
+ "plug",
472
+ "plus",
473
+ "plus-circle",
474
+ "power",
475
+ "print-fax",
476
+ "printer",
477
+ "puzzle",
478
+ "qr-code",
479
+ "queries",
480
+ "quote",
481
+ "record",
482
+ "record-filled",
483
+ "redo",
484
+ "refresh",
485
+ "repeat",
486
+ "reply",
487
+ "reply-all",
488
+ "rewind",
489
+ "rewind-15-sec",
490
+ "salesforce-glyph",
491
+ "salesforce-logo",
492
+ "satisfied",
493
+ "save",
494
+ "scan",
495
+ "scan-face",
496
+ "scissors",
497
+ "screen-share-off",
498
+ "scroll",
499
+ "search",
500
+ "send",
501
+ "servicenow",
502
+ "settings",
503
+ "share",
504
+ "share-2",
505
+ "share-screen",
506
+ "sheet",
507
+ "shield",
508
+ "shield-alert",
509
+ "shield-check",
510
+ "shield-close",
511
+ "shield-off",
512
+ "shortcuts",
513
+ "shuffle",
514
+ "sidebar",
515
+ "sidebar-close",
516
+ "sidebar-open",
517
+ "signal-best",
518
+ "signal-high",
519
+ "signal-low",
520
+ "signal-medium",
521
+ "signal-zero",
522
+ "siren",
523
+ "skip-15-sec",
524
+ "skip-back",
525
+ "skip-back-ten",
526
+ "skip-forward",
527
+ "skip-forward-ten",
528
+ "slack",
529
+ "slash",
530
+ "sliders",
531
+ "sliders-horizontal",
532
+ "small-self-view",
533
+ "smartphone",
534
+ "smartphone-charging",
535
+ "snapchat",
536
+ "snooze",
537
+ "snowflake",
538
+ "somewhat-dissatisfied",
539
+ "somewhat-satisfied",
540
+ "sort-asc",
541
+ "sort-desc",
542
+ "sparkle",
543
+ "speaker",
544
+ "star",
545
+ "star-filled",
546
+ "stop-circle",
547
+ "stop-filled",
548
+ "strikethrough",
549
+ "sun",
550
+ "sun-dim",
551
+ "sun-medium",
552
+ "sunrise",
553
+ "sunset",
554
+ "switch-to-cellular",
555
+ "switch-to-hd",
556
+ "table",
557
+ "tag",
558
+ "tags",
559
+ "takeover",
560
+ "task",
561
+ "telegram",
562
+ "text-cursor",
563
+ "text-cursor-input",
564
+ "thermometer",
565
+ "thermometer-snowflake",
566
+ "thermometer-sun",
567
+ "thread",
568
+ "threads",
569
+ "thumbs-down",
570
+ "thumbs-up",
571
+ "tiktok",
572
+ "timer",
573
+ "timer-off",
574
+ "timer-reset",
575
+ "toggl",
576
+ "too-many-queries",
577
+ "tools",
578
+ "toy-brick",
579
+ "transfer",
580
+ "transfer-webchat",
581
+ "transportation",
582
+ "trash",
583
+ "trending-down",
584
+ "trending-up",
585
+ "triangle",
586
+ "twitter",
587
+ "type",
588
+ "umbrella",
589
+ "underline",
590
+ "undo-2",
591
+ "union-pay",
592
+ "unlink-2",
593
+ "unlock",
594
+ "unlock-filled",
595
+ "upload",
596
+ "upload-cloud",
597
+ "usb",
598
+ "user",
599
+ "user-check",
600
+ "user-minus",
601
+ "user-plus",
602
+ "user-remove",
603
+ "users",
604
+ "very-dissatisfied",
605
+ "very-satisfied",
606
+ "viber",
607
+ "video",
608
+ "video-off",
609
+ "video-settings",
610
+ "visa",
611
+ "voicemail",
612
+ "voicemail-drop",
613
+ "volume",
614
+ "volume-1",
615
+ "volume-2",
616
+ "volume-x",
617
+ "waveform",
618
+ "we-chat",
619
+ "webcam",
620
+ "webchat",
621
+ "whatsapp",
622
+ "whisper",
623
+ "wifi",
624
+ "wifi-off",
625
+ "wind",
626
+ "x-brand",
627
+ "x-circle",
628
+ "zap-off",
629
+ "zendesk",
630
+ "zoho",
631
+ "zoho-crm",
632
+ "zoho-desk",
633
+ "zoom",
634
+ "zoom-in",
635
+ "zoom-logo",
636
+ "zoom-out"
637
+ ];
638
+ function ke() {
639
+ return [void 0, ...be];
640
+ }
641
+ const Se = (e) => {
642
+ if (typeof e != "string" || !e.trim())
643
+ return "";
644
+ const s = e.trim().split(/\s+/g);
645
+ return s.length === 1 ? s.join("").substring(0, 2) : s.filter((t, i) => i === 0 || i === s.length - 1).map((t) => t.slice(0, 1).toUpperCase()).join("");
646
+ }, Ee = ke(), we = {
647
+ name: "DtAvatar",
648
+ components: { DtPresence: me, DtIcon: w },
649
+ inheritAttrs: !1,
650
+ props: {
651
+ /**
652
+ * Id of the avatar content wrapper element
653
+ */
654
+ id: {
655
+ type: String,
656
+ default() {
657
+ return R();
658
+ }
659
+ },
660
+ /**
661
+ * Pass in a seed to get the random color generation based on that string. For example if you pass in a
662
+ * user ID as the string it will return the same randomly generated colors every time for that user.
663
+ */
664
+ seed: {
665
+ type: String,
666
+ default: void 0
667
+ },
668
+ /**
669
+ * Set the avatar background to a specific color. If undefined will randomize the color which can be deterministic
670
+ * if the seed prop is set.
671
+ */
672
+ color: {
673
+ type: String,
674
+ default: void 0
675
+ },
676
+ /**
677
+ * The size of the avatar
678
+ * @values xs, sm, md, lg, xl
679
+ */
680
+ size: {
681
+ type: String,
682
+ default: "md",
683
+ validator: (e) => Object.keys(N).includes(e)
684
+ },
685
+ /**
686
+ * Used to customize the avatar container
687
+ */
688
+ avatarClass: {
689
+ type: [String, Array, Object],
690
+ default: ""
691
+ },
692
+ /**
693
+ * Set classes on the avatar canvas. Wrapper around the core avatar image.
694
+ */
695
+ canvasClass: {
696
+ type: [String, Array, Object],
697
+ default: ""
698
+ },
699
+ /**
700
+ * Pass through classes. Used to customize the avatar icon
701
+ */
702
+ iconClass: {
703
+ type: [String, Array, Object],
704
+ default: ""
705
+ },
706
+ /**
707
+ * Determines whether to show the presence indicator for
708
+ * Avatar - accepts PRESENCE_STATES values: 'busy', 'away', 'offline',
709
+ * or 'active'. By default, it's null and nothing is shown.
710
+ * @values null, busy, away, offline, active
711
+ */
712
+ presence: {
713
+ type: String,
714
+ default: z.NONE,
715
+ validator: (e) => Object.values(z).includes(e)
716
+ },
717
+ /**
718
+ * A set of props to be passed into the presence component.
719
+ */
720
+ presenceProps: {
721
+ type: Object,
722
+ default: () => ({})
723
+ },
724
+ /**
725
+ * Determines whether to show a group avatar.
726
+ * Limit to 2 digits max, more than 99 will be rendered as “99+”.
727
+ * if the number is 1 or less it would just show the regular avatar as if group had not been set.
728
+ */
729
+ group: {
730
+ type: Number,
731
+ default: void 0,
732
+ validator: (e) => H(e)
733
+ },
734
+ /**
735
+ * The icon that overlays the avatar
736
+ */
737
+ overlayIcon: {
738
+ type: String,
739
+ default: ""
740
+ },
741
+ /**
742
+ * The text that overlays the avatar
743
+ */
744
+ overlayText: {
745
+ type: String,
746
+ default: ""
747
+ },
748
+ /**
749
+ * Used to customize the avatar overlay
750
+ */
751
+ overlayClass: {
752
+ type: [String, Array, Object],
753
+ default: ""
754
+ },
755
+ /**
756
+ * Source of the image
757
+ */
758
+ imageSrc: {
759
+ type: String,
760
+ default: ""
761
+ },
762
+ /**
763
+ * Alt attribute of the image, by default
764
+ * it'd be the full name
765
+ */
766
+ imageAlt: {
767
+ type: String,
768
+ default: ""
769
+ },
770
+ /**
771
+ * Icon name to be displayed on the avatar
772
+ */
773
+ iconName: {
774
+ type: String,
775
+ default: void 0,
776
+ validator: (e) => Ee.includes(e)
777
+ },
778
+ /**
779
+ * Icon size to be displayed on the avatar
780
+ * @values 100, 200, 300, 400, 500, 600, 700, 800
781
+ */
782
+ iconSize: {
783
+ type: String,
784
+ default: "",
785
+ validator: (e) => !e || Object.keys(le).includes(e)
786
+ },
787
+ /**
788
+ * Full name used to extract initials and set alt attribute.
789
+ */
790
+ fullName: {
791
+ type: String,
792
+ default: ""
793
+ },
794
+ /**
795
+ * Makes the avatar focusable and clickable,
796
+ * emits a click event when clicked.
797
+ */
798
+ clickable: {
799
+ type: Boolean,
800
+ default: !1
801
+ }
802
+ },
803
+ emits: [
804
+ /**
805
+ * Avatar click event
806
+ *
807
+ * @event click
808
+ * @type {PointerEvent | KeyboardEvent}
809
+ */
810
+ "click"
811
+ ],
812
+ data() {
813
+ return {
814
+ AVATAR_SIZE_MODIFIERS: N,
815
+ AVATAR_KIND_MODIFIERS: ye,
816
+ AVATAR_PRESENCE_SIZE_MODIFIERS: ge,
817
+ AVATAR_ICON_SIZES: ve,
818
+ imageLoadedSuccessfully: null,
819
+ formattedInitials: "",
820
+ initializing: !1
821
+ };
822
+ },
823
+ computed: {
824
+ isNotIconType() {
825
+ return !this.iconName;
826
+ },
827
+ avatarClasses() {
828
+ return [
829
+ "d-avatar",
830
+ N[this.validatedSize],
831
+ this.avatarClass,
832
+ {
833
+ "d-avatar--group": this.showGroup,
834
+ [`d-avatar--color-${this.getColor()}`]: this.isNotIconType,
835
+ "d-avatar--clickable": this.clickable
836
+ }
837
+ ];
838
+ },
839
+ overlayClasses() {
840
+ return [
841
+ "d-avatar__overlay",
842
+ this.overlayClass
843
+ ];
844
+ },
845
+ showGroup() {
846
+ return H(this.group);
847
+ },
848
+ formattedGroup() {
849
+ return this.group > 99 ? "99+" : this.group;
850
+ },
851
+ validatedSize() {
852
+ return this.group ? "xs" : this.size;
853
+ },
854
+ showImage() {
855
+ return this.imageLoadedSuccessfully !== !1 && this.imageSrc;
856
+ },
857
+ buttonAriaLabel() {
858
+ if (this.clickable)
859
+ return this.fullName || this.imageAlt || this.$attrs["aria-label"];
860
+ }
861
+ },
862
+ watch: {
863
+ fullName: {
864
+ immediate: !0,
865
+ handler(e) {
866
+ this.formatInitials(e);
867
+ }
868
+ },
869
+ imageSrc(e) {
870
+ this.imageLoadedSuccessfully = null, e && (this.validateProps(), this.setImageListeners());
871
+ }
872
+ },
873
+ mounted() {
874
+ this.validateProps(), this.setImageListeners();
875
+ },
876
+ methods: {
877
+ async setImageListeners() {
878
+ await this.$nextTick();
879
+ const e = this.$refs.avatarImage;
880
+ e && (e.addEventListener("load", () => this._loadedImageEventHandler(e), { once: !0 }), e.addEventListener("error", () => this._erroredImageEventHandler(e), { once: !0 }));
881
+ },
882
+ formatInitials(e) {
883
+ const s = Se(e);
884
+ this.validatedSize === "xs" ? this.formattedInitials = "" : this.validatedSize === "sm" ? this.formattedInitials = s[0] : this.formattedInitials = s;
885
+ },
886
+ getColor() {
887
+ return this.color ?? Y(_e, this.seed);
888
+ },
889
+ _loadedImageEventHandler(e) {
890
+ this.imageLoadedSuccessfully = !0, e.classList.remove("d-d-none");
891
+ },
892
+ _erroredImageEventHandler(e) {
893
+ this.imageLoadedSuccessfully = !1, e.classList.add("d-d-none");
894
+ },
895
+ validateProps() {
896
+ if (this.imageSrc && !(this.fullName || this.imageAlt))
897
+ throw new Error("full-name or image-alt must be set if image-src is provided");
898
+ },
899
+ handleClick(e) {
900
+ this.clickable && this.$emit("click", e);
901
+ }
902
+ }
903
+ }, Ce = ["src", "alt"], Ie = {
904
+ key: 1,
905
+ class: "d-avatar__overlay-text"
906
+ }, Oe = {
907
+ key: 1,
908
+ class: "d-avatar__count",
909
+ "data-qa": "dt-avatar-count"
910
+ };
911
+ function Ae(e, s, t, i, n, o) {
912
+ const c = p("dt-icon"), g = p("dt-presence");
913
+ return a(), u(E(t.clickable ? "button" : "div"), {
914
+ id: t.id,
915
+ class: f(o.avatarClasses),
916
+ "data-qa": "dt-avatar",
917
+ "aria-label": o.buttonAriaLabel,
918
+ onClick: o.handleClick
919
+ }, {
920
+ default: h(() => [
921
+ b("div", {
922
+ ref: "canvas",
923
+ class: f([
924
+ t.canvasClass,
925
+ "d-avatar__canvas",
926
+ { "d-avatar--image-loaded": n.imageLoadedSuccessfully }
927
+ ])
928
+ }, [
929
+ o.showImage ? (a(), r("img", {
930
+ key: 0,
931
+ ref: "avatarImage",
932
+ class: "d-avatar__image",
933
+ "data-qa": "dt-avatar-image",
934
+ src: t.imageSrc,
935
+ alt: t.imageAlt || t.fullName
936
+ }, null, 8, Ce)) : t.iconName ? (a(), u(c, {
937
+ key: 1,
938
+ name: t.iconName,
939
+ size: t.iconSize || n.AVATAR_ICON_SIZES[t.size],
940
+ class: f([t.iconClass, n.AVATAR_KIND_MODIFIERS.icon]),
941
+ "data-qa": "dt-avatar-icon"
942
+ }, null, 8, ["name", "size", "class"])) : (a(), r("span", {
943
+ key: 2,
944
+ class: f([n.AVATAR_KIND_MODIFIERS.initials])
945
+ }, I(n.formattedInitials), 3))
946
+ ], 2),
947
+ t.overlayIcon || t.overlayText ? (a(), r("div", {
948
+ key: 0,
949
+ class: f(o.overlayClasses)
950
+ }, [
951
+ t.overlayIcon ? (a(), u(c, {
952
+ key: 0,
953
+ class: "d-avatar__overlay-icon",
954
+ name: t.overlayIcon
955
+ }, null, 8, ["name"])) : t.overlayText ? (a(), r("p", Ie, I(t.overlayText), 1)) : d("", !0)
956
+ ], 2)) : d("", !0),
957
+ o.showGroup ? (a(), r("span", Oe, I(o.formattedGroup), 1)) : d("", !0),
958
+ t.presence && !o.showGroup ? (a(), u(g, A({
959
+ key: 2,
960
+ presence: t.presence,
961
+ class: [
962
+ "d-avatar__presence",
963
+ n.AVATAR_PRESENCE_SIZE_MODIFIERS[t.size]
964
+ ]
965
+ }, t.presenceProps, { "data-qa": "dt-presence" }), null, 16, ["presence", "class"])) : d("", !0)
966
+ ]),
967
+ _: 1
968
+ }, 8, ["id", "class", "aria-label", "onClick"]);
969
+ }
970
+ const Rt = /* @__PURE__ */ y(we, [["render", Ae]]), M = ["base", "error", "info", "success", "warning"], Te = ["alert", "alertdialog", "status"], Pe = /* @__PURE__ */ new Map([
971
+ ["info", "info"],
972
+ ["success", "check-circle"],
973
+ ["warning", "alert-triangle"],
974
+ ["error", "alert-circle"],
975
+ ["base", "bell"]
976
+ ]), Le = {
977
+ name: "DtNoticeIcon",
978
+ components: {
979
+ DtIcon: w
980
+ },
981
+ props: {
982
+ /**
983
+ * Kind of icon
984
+ * @values base, error, info, success, warning
985
+ */
986
+ kind: {
987
+ type: String,
988
+ default: "base",
989
+ validate(e) {
990
+ return M.includes(e);
991
+ }
992
+ }
993
+ },
994
+ data() {
995
+ return {
996
+ hasSlotContent: L
997
+ };
998
+ },
999
+ computed: {
1000
+ defaultIcon() {
1001
+ return Pe.get(this.kind);
1002
+ }
1003
+ }
1004
+ }, Ne = {
1005
+ key: 0,
1006
+ "aria-hidden": "true",
1007
+ class: "d-notice__icon"
1008
+ };
1009
+ function De(e, s, t, i, n, o) {
1010
+ const c = p("dt-icon");
1011
+ return o.defaultIcon || n.hasSlotContent(e.$slots.default) ? (a(), r("div", Ne, [
1012
+ l(e.$slots, "default", {}, () => [
1013
+ _(c, {
1014
+ name: o.defaultIcon,
1015
+ size: "400"
1016
+ }, null, 8, ["name"])
1017
+ ])
1018
+ ])) : d("", !0);
1019
+ }
1020
+ const Re = /* @__PURE__ */ y(Le, [["render", De]]), Fe = {
1021
+ name: "DtNoticeContent",
1022
+ props: {
1023
+ /**
1024
+ * Title header of the notice. This can be left blank to remove the title from the notice entirely.
1025
+ */
1026
+ title: {
1027
+ type: String,
1028
+ default: ""
1029
+ },
1030
+ /**
1031
+ * ID for the title element of the component. Useful for aria-describedby
1032
+ * or aria-labelledby or any other reason you may need an id to refer to the title.
1033
+ */
1034
+ titleId: {
1035
+ type: String,
1036
+ default: void 0
1037
+ },
1038
+ /**
1039
+ * ID for the content element of the component. Useful for aria-describedby
1040
+ * or aria-labelledby or any other reason you may need an id to refer to the content.
1041
+ */
1042
+ contentId: {
1043
+ type: String,
1044
+ default: void 0
1045
+ }
1046
+ },
1047
+ data() {
1048
+ return {
1049
+ hasSlotContent: L
1050
+ };
1051
+ }
1052
+ }, Be = {
1053
+ class: "d-notice__content",
1054
+ "data-qa": "notice-content"
1055
+ }, xe = ["id"], ze = ["id"];
1056
+ function He(e, s, t, i, n, o) {
1057
+ return a(), r("div", Be, [
1058
+ t.title || n.hasSlotContent(e.$slots.titleOverride) ? (a(), r("p", {
1059
+ key: 0,
1060
+ id: t.titleId,
1061
+ class: "d-notice__title",
1062
+ "data-qa": "notice-content-title"
1063
+ }, [
1064
+ l(e.$slots, "titleOverride", {}, () => [
1065
+ oe(I(t.title), 1)
1066
+ ])
1067
+ ], 8, xe)) : d("", !0),
1068
+ b("p", {
1069
+ id: t.contentId,
1070
+ class: "d-notice__message",
1071
+ "data-qa": "notice-content-message"
1072
+ }, [
1073
+ l(e.$slots, "default")
1074
+ ], 8, ze)
1075
+ ]);
1076
+ }
1077
+ const Ve = /* @__PURE__ */ y(Fe, [["render", He]]), qe = {
1078
+ name: "DtLink",
1079
+ props: {
1080
+ /**
1081
+ * Applies the link variant styles
1082
+ * @values null, danger, warning, success, muted, inverted
1083
+ */
1084
+ kind: {
1085
+ type: String,
1086
+ default: "",
1087
+ validator(e) {
1088
+ return re.includes(e);
1089
+ }
1090
+ }
1091
+ },
1092
+ data() {
1093
+ return {
1094
+ LINK_KIND_MODIFIERS: de
1095
+ };
1096
+ }
1097
+ }, $e = ["href"];
1098
+ function je(e, s, t, i, n, o) {
1099
+ return a(), r("a", {
1100
+ class: f([
1101
+ "d-link",
1102
+ n.LINK_KIND_MODIFIERS[t.kind]
1103
+ ]),
1104
+ "data-qa": "dt-link",
1105
+ href: "href" in e.$attrs ? e.$attrs.href : "javascript:void(0)"
1106
+ }, [
1107
+ l(e.$slots, "default")
1108
+ ], 10, $e);
1109
+ }
1110
+ const Ft = /* @__PURE__ */ y(qe, [["render", je]]), B = {
1111
+ props: {
1112
+ /**
1113
+ * If true, a hidden close button is included for screen readers
1114
+ * @values true, false
1115
+ */
1116
+ visuallyHiddenClose: {
1117
+ type: Boolean,
1118
+ default: !1
1119
+ },
1120
+ /**
1121
+ * Label for the visually hidden close button
1122
+ * Required if visuallyHiddenClose is set to `true`
1123
+ */
1124
+ visuallyHiddenCloseLabel: {
1125
+ type: String,
1126
+ default: null
1127
+ }
1128
+ },
1129
+ watch: {
1130
+ $props: {
1131
+ immediate: !0,
1132
+ deep: !0,
1133
+ handler() {
1134
+ this.validateVisuallyHiddenCloseProps();
1135
+ }
1136
+ }
1137
+ },
1138
+ computed: {
1139
+ showVisuallyHiddenClose() {
1140
+ return this.visuallyHiddenClose && this.visuallyHiddenCloseLabel != null;
1141
+ }
1142
+ },
1143
+ methods: {
1144
+ validateVisuallyHiddenCloseProps() {
1145
+ this.visuallyHiddenClose && !this.visuallyHiddenCloseLabel && console.error(`If visuallyHiddenClose prop is true, the component includes
1146
+ a visually hidden close button and you must set the visuallyHiddenCloseLabel prop.`);
1147
+ }
1148
+ }
1149
+ }, Ke = {
1150
+ name: "SrOnlyCloseButton",
1151
+ components: {
1152
+ DtIcon: w,
1153
+ DtButton: F
1154
+ },
1155
+ props: {
1156
+ /**
1157
+ * Label for the visually hidden close button
1158
+ * Required if visuallyHiddenClose is set to `true`
1159
+ */
1160
+ visuallyHiddenCloseLabel: {
1161
+ type: String,
1162
+ default: null
1163
+ }
1164
+ },
1165
+ emits: ["close"],
1166
+ methods: {
1167
+ close() {
1168
+ this.$emit("close");
1169
+ }
1170
+ }
1171
+ };
1172
+ function Me(e, s, t, i, n, o) {
1173
+ const c = p("dt-icon"), g = p("dt-button");
1174
+ return a(), u(g, {
1175
+ id: "sr-only-close-button",
1176
+ "data-qa": "dt-sr-only-close-button",
1177
+ class: "d-vi-visible-sr",
1178
+ "aria-label": t.visuallyHiddenCloseLabel,
1179
+ onClick: o.close,
1180
+ onKeydown: S(P(o.close, ["prevent", "stop"]), ["space"])
1181
+ }, {
1182
+ default: h(() => [
1183
+ _(c, { name: "close" })
1184
+ ]),
1185
+ _: 1
1186
+ }, 8, ["aria-label", "onClick", "onKeydown"]);
1187
+ }
1188
+ const G = /* @__PURE__ */ y(Ke, [["render", Me]]), Ge = {
1189
+ name: "DtNoticeAction",
1190
+ components: {
1191
+ DtIcon: w,
1192
+ DtButton: F,
1193
+ SrOnlyCloseButton: G
1194
+ },
1195
+ mixins: [B],
1196
+ props: {
1197
+ /**
1198
+ * Props for the notice close button.
1199
+ */
1200
+ closeButtonProps: {
1201
+ type: Object,
1202
+ default: () => ({})
1203
+ },
1204
+ /**
1205
+ * Hides the close button from the notice
1206
+ * @values true, false
1207
+ */
1208
+ hideClose: {
1209
+ type: Boolean,
1210
+ default: !1
1211
+ }
1212
+ },
1213
+ emits: [
1214
+ /**
1215
+ * Close button click event
1216
+ *
1217
+ * @event close
1218
+ */
1219
+ "close"
1220
+ ],
1221
+ created() {
1222
+ !this.hideClose && !this.closeButtonProps.ariaLabel && console.error("Invalid props: you must pass in closeButtonProps.ariaLabel if the close button is displayed.");
1223
+ },
1224
+ mounted() {
1225
+ this.hideClose || (this.lastFocusedElement = document.activeElement);
1226
+ },
1227
+ beforeUnmount() {
1228
+ var e;
1229
+ (e = this.lastFocusedElement) == null || e.focus();
1230
+ },
1231
+ methods: {
1232
+ close() {
1233
+ this.$emit("close");
1234
+ }
1235
+ }
1236
+ }, We = {
1237
+ class: "d-notice__actions",
1238
+ "data-qa": "notice-content-actions"
1239
+ };
1240
+ function Ue(e, s, t, i, n, o) {
1241
+ const c = p("dt-icon"), g = p("dt-button"), v = p("sr-only-close-button");
1242
+ return a(), r("div", We, [
1243
+ l(e.$slots, "default"),
1244
+ t.hideClose ? d("", !0) : (a(), u(g, A({
1245
+ key: 0,
1246
+ ref: "closeButton",
1247
+ "data-qa": "dt-notice-action-close-button",
1248
+ size: "sm",
1249
+ importance: "clear",
1250
+ circle: "",
1251
+ "aria-label": t.closeButtonProps.ariaLabel ? t.closeButtonProps.ariaLabel : "Close"
1252
+ }, t.closeButtonProps, { onClick: o.close }), {
1253
+ icon: h(() => [
1254
+ _(c, {
1255
+ name: "close",
1256
+ size: "200"
1257
+ })
1258
+ ]),
1259
+ _: 1
1260
+ }, 16, ["aria-label", "onClick"])),
1261
+ e.showVisuallyHiddenClose ? (a(), u(v, {
1262
+ key: 1,
1263
+ "visually-hidden-close-label": e.visuallyHiddenCloseLabel,
1264
+ onClose: o.close
1265
+ }, null, 8, ["visually-hidden-close-label", "onClose"])) : d("", !0)
1266
+ ]);
1267
+ }
1268
+ const Ye = /* @__PURE__ */ y(Ge, [["render", Ue]]), Ze = {
1269
+ name: "DtNotice",
1270
+ components: {
1271
+ DtNoticeIcon: Re,
1272
+ DtNoticeContent: Ve,
1273
+ DtNoticeAction: Ye
1274
+ },
1275
+ mixins: [B],
1276
+ props: {
1277
+ /**
1278
+ * Sets an ID on the title element of the component. Useful for aria-describedby
1279
+ * or aria-labelledby or any other reason you may need an id to refer to the title.
1280
+ */
1281
+ titleId: {
1282
+ type: String,
1283
+ default: void 0
1284
+ },
1285
+ /**
1286
+ * Sets an ID on the content element of the component. Useful for aria-describedby
1287
+ * or aria-labelledby or any other reason you may need an id to refer to the content.
1288
+ */
1289
+ contentId: {
1290
+ type: String,
1291
+ default: void 0
1292
+ },
1293
+ /**
1294
+ * Title header of the notice. This can be left blank to remove the title from the notice entirely.
1295
+ */
1296
+ title: {
1297
+ type: String,
1298
+ default: ""
1299
+ },
1300
+ /**
1301
+ * Provides a role for the notice. 'status' is used to communicate a message. 'alert' is used to communicate an
1302
+ * important message that does not contain any interactive elements. 'alertdialog' is used to communicate an
1303
+ * important message that does contain interactive elements.
1304
+ * @values alert, alertdialog, status
1305
+ */
1306
+ role: {
1307
+ type: String,
1308
+ default: "status",
1309
+ validate(e) {
1310
+ return Te.includes(e);
1311
+ }
1312
+ },
1313
+ /**
1314
+ * Used in scenarios where the message needs to visually dominate the screen.
1315
+ * This will also change the aria role from status to alert.
1316
+ * @values true, false
1317
+ */
1318
+ important: {
1319
+ type: Boolean,
1320
+ default: !1
1321
+ },
1322
+ /**
1323
+ * Severity level of the notice, sets the icon and background
1324
+ * @values base, error, info, success, warning
1325
+ */
1326
+ kind: {
1327
+ type: String,
1328
+ default: "base",
1329
+ validate(e) {
1330
+ return M.includes(e);
1331
+ }
1332
+ },
1333
+ /**
1334
+ * Props for the notice close button.
1335
+ */
1336
+ closeButtonProps: {
1337
+ type: Object,
1338
+ default: () => ({})
1339
+ },
1340
+ /**
1341
+ * Hides the close button from the notice
1342
+ * @values true, false
1343
+ */
1344
+ hideClose: {
1345
+ type: Boolean,
1346
+ default: !1
1347
+ }
1348
+ },
1349
+ emits: [
1350
+ /**
1351
+ * Close button click event
1352
+ *
1353
+ * @event close
1354
+ */
1355
+ "close",
1356
+ /**
1357
+ * Native button click event
1358
+ *
1359
+ * @event click
1360
+ * @type {PointerEvent | KeyboardEvent}
1361
+ */
1362
+ "click"
1363
+ ],
1364
+ computed: {
1365
+ noticeClass() {
1366
+ return [
1367
+ "d-notice",
1368
+ {
1369
+ error: "d-notice--error",
1370
+ info: "d-notice--info",
1371
+ success: "d-notice--success",
1372
+ warning: "d-notice--warning",
1373
+ base: "d-notice--base"
1374
+ }[this.kind],
1375
+ { "d-notice--important": this.important }
1376
+ ];
1377
+ }
1378
+ }
1379
+ };
1380
+ function Xe(e, s, t, i, n, o) {
1381
+ const c = p("dt-notice-icon"), g = p("dt-notice-content"), v = p("dt-notice-action");
1382
+ return a(), r("aside", {
1383
+ class: f(o.noticeClass),
1384
+ "data-qa": "notice"
1385
+ }, [
1386
+ _(c, { kind: t.kind }, {
1387
+ default: h(() => [
1388
+ l(e.$slots, "icon")
1389
+ ]),
1390
+ _: 3
1391
+ }, 8, ["kind"]),
1392
+ _(g, {
1393
+ "title-id": t.titleId,
1394
+ "content-id": t.contentId,
1395
+ title: t.title,
1396
+ role: t.role
1397
+ }, {
1398
+ titleOverride: h(() => [
1399
+ l(e.$slots, "titleOverride")
1400
+ ]),
1401
+ default: h(() => [
1402
+ l(e.$slots, "default")
1403
+ ]),
1404
+ _: 3
1405
+ }, 8, ["title-id", "content-id", "title", "role"]),
1406
+ _(v, {
1407
+ "hide-close": t.hideClose,
1408
+ "close-button-props": t.closeButtonProps,
1409
+ "visually-hidden-close": e.visuallyHiddenClose,
1410
+ "visually-hidden-close-label": e.visuallyHiddenCloseLabel,
1411
+ onClose: s[0] || (s[0] = (m) => e.$emit("close"))
1412
+ }, {
1413
+ default: h(() => [
1414
+ l(e.$slots, "action")
1415
+ ]),
1416
+ _: 3
1417
+ }, 8, ["hide-close", "close-button-props", "visually-hidden-close", "visually-hidden-close-label"])
1418
+ ], 2);
1419
+ }
1420
+ const Bt = /* @__PURE__ */ y(Ze, [["render", Xe]]), W = ':not(:disabled):not([aria-disabled="true"]):not([role="presentation"])', Je = `${W}:not([tabindex="-1"])`, Qe = "button,[href],input,select,textarea,details,[tabindex]", et = {
1421
+ methods: {
1422
+ /**
1423
+ * get the first focusable element in your component, includes tabindex="-1".
1424
+ * @param {object} el - optional - ref of dom element to trap focus on.
1425
+ * will default to the root node of the vue component
1426
+ */
1427
+ async getFirstFocusableElement(e) {
1428
+ await this.$nextTick();
1429
+ const s = this._getFocusableElements(e, !0);
1430
+ return this._getFirstFocusElement(s);
1431
+ },
1432
+ /**
1433
+ * set focus to the first focusable element in your component, includes tabindex="-1".
1434
+ * @param {object} el - optional - ref of dom element to trap focus on.
1435
+ * will default to the root node of the vue component
1436
+ */
1437
+ async focusFirstElement(e) {
1438
+ const s = await this.getFirstFocusableElement(e);
1439
+ s == null || s.focus({ preventScroll: !0 });
1440
+ },
1441
+ /**
1442
+ * internal use only.
1443
+ *
1444
+ * @param focusableElements - list of focusable elements
1445
+ * @returns {*} - first DOM element that is focusable.
1446
+ * @private
1447
+ */
1448
+ _getFirstFocusElement(e) {
1449
+ if (!e.length)
1450
+ return;
1451
+ let s = e[0];
1452
+ return s.matches('[type="radio"]:not(:checked)') && (s = e.find((t) => t.checked && t.name === s.name) || s), s;
1453
+ },
1454
+ /**
1455
+ * internal use only.
1456
+ *
1457
+ * gets all the focusable elements within the component
1458
+ * and sets the first and last of those elements.
1459
+ *
1460
+ * @param {object} el - the root dom element to find focusable elements in.
1461
+ * @param {bool} includeNegativeTabIndex - will include tabindex="-1" in the list of focusable elements.
1462
+ */
1463
+ _getFocusableElements(e = this.$el, s = !1) {
1464
+ return e ? [...e.querySelectorAll(Qe)].filter((i) => {
1465
+ const n = window.getComputedStyle(i);
1466
+ return n.getPropertyValue("display") !== "none" && n.getPropertyValue("visibility") !== "hidden" && i.matches(s ? W : Je);
1467
+ }) : [];
1468
+ },
1469
+ /**
1470
+ * tabs to the next element contained within your component, does not include tabindex="-1".
1471
+ * @param {object} e - keypress event
1472
+ * @param {object} el - optional - ref of dom element to trap focus on.
1473
+ * will default to the root node of the vue component
1474
+ */
1475
+ focusTrappedTabPress(e, s) {
1476
+ if (!(e.key === "Tab"))
1477
+ return;
1478
+ const i = this._getFocusableElements(s);
1479
+ if (!i.length) {
1480
+ e.preventDefault();
1481
+ return;
1482
+ }
1483
+ const n = this._getFirstFocusElement(i), o = i[i.length - 1];
1484
+ e.shiftKey ? document.activeElement === n && (o.focus(), e.preventDefault()) : document.activeElement === o && (n.focus(), e.preventDefault());
1485
+ }
1486
+ }
1487
+ }, D = {
1488
+ DEFAULT: "default",
1489
+ CUSTOM: "custom"
1490
+ }, T = {
1491
+ ARROW_KEYS: "arrow-keys",
1492
+ TAB: "tab",
1493
+ NONE: "none"
1494
+ }, tt = {
1495
+ name: "DtItemLayout",
1496
+ props: {
1497
+ /**
1498
+ * Set this prop to render layout as a specific HTML element.
1499
+ */
1500
+ as: {
1501
+ type: String,
1502
+ default: "div"
1503
+ }
1504
+ }
1505
+ }, st = {
1506
+ key: 0,
1507
+ "data-qa": "dt-item-layout-left-wrapper",
1508
+ class: "dt-item-layout--left"
1509
+ }, ot = {
1510
+ "data-qa": "dt-item-layout-content-wrapper",
1511
+ class: "dt-item-layout--content"
1512
+ }, nt = {
1513
+ key: 0,
1514
+ "data-qa": "dt-item-layout-title-wrapper",
1515
+ class: "dt-item-layout--title"
1516
+ }, at = {
1517
+ key: 2,
1518
+ "data-qa": "dt-item-layout-bottom-wrapper",
1519
+ class: "dt-item-layout--bottom"
1520
+ }, it = {
1521
+ key: 1,
1522
+ "data-qa": "dt-item-layout-right-wrapper",
1523
+ class: "dt-item-layout--right"
1524
+ }, lt = {
1525
+ key: 2,
1526
+ "data-qa": "dt-item-layout-selected-wrapper",
1527
+ class: "dt-item-layout--selected"
1528
+ };
1529
+ function rt(e, s, t, i, n, o) {
1530
+ return a(), u(E(t.as), { class: "dt-item-layout" }, {
1531
+ default: h(() => [
1532
+ e.$slots.left ? (a(), r("section", st, [
1533
+ l(e.$slots, "left", {}, void 0, !0)
1534
+ ])) : d("", !0),
1535
+ b("section", ot, [
1536
+ e.$slots.default ? (a(), r("div", nt, [
1537
+ l(e.$slots, "default", {}, void 0, !0)
1538
+ ])) : d("", !0),
1539
+ e.$slots.subtitle ? (a(), r("div", {
1540
+ key: 1,
1541
+ "data-qa": "dt-item-layout-subtitle-wrapper",
1542
+ class: f(["dt-item-layout--subtitle", { "dt-item-layout--subtitle--with-title": e.$slots.default }])
1543
+ }, [
1544
+ l(e.$slots, "subtitle", {}, void 0, !0)
1545
+ ], 2)) : d("", !0),
1546
+ e.$slots.bottom ? (a(), r("div", at, [
1547
+ l(e.$slots, "bottom", {}, void 0, !0)
1548
+ ])) : d("", !0)
1549
+ ]),
1550
+ e.$slots.right ? (a(), r("section", it, [
1551
+ l(e.$slots, "right", {}, void 0, !0)
1552
+ ])) : d("", !0),
1553
+ e.$slots.selected ? (a(), r("section", lt, [
1554
+ l(e.$slots, "selected", {}, void 0, !0)
1555
+ ])) : d("", !0)
1556
+ ]),
1557
+ _: 3
1558
+ });
1559
+ }
1560
+ const V = /* @__PURE__ */ y(tt, [["render", rt], ["__scopeId", "data-v-c04dbbaa"]]), dt = {
1561
+ name: "DtListItem",
1562
+ components: {
1563
+ DtItemLayout: V,
1564
+ DtIcon: w
1565
+ },
1566
+ /**
1567
+ * Value provided from keyboard_list_navigation.js using id prop.
1568
+ */
1569
+ inject: {
1570
+ highlightId: { default: null }
1571
+ },
1572
+ props: {
1573
+ /**
1574
+ * Id for the item.
1575
+ */
1576
+ id: {
1577
+ type: String,
1578
+ default() {
1579
+ return Z.getUniqueString();
1580
+ }
1581
+ },
1582
+ /**
1583
+ * String to use for the item's role.
1584
+ */
1585
+ role: {
1586
+ type: String,
1587
+ default: "listitem"
1588
+ },
1589
+ /**
1590
+ * HTML element type (tag name) of the content wrapper element.
1591
+ */
1592
+ elementType: {
1593
+ type: String,
1594
+ default: "li"
1595
+ },
1596
+ /**
1597
+ * The type of child list item to use.
1598
+ * @values default, custom
1599
+ */
1600
+ type: {
1601
+ type: String,
1602
+ default: D.DEFAULT,
1603
+ validator: (e) => Object.values(D).includes(e)
1604
+ },
1605
+ /**
1606
+ * The type of navigation that this component should support.
1607
+ * - "arrow-keys" for items that are navigated with UP/DOWN keys.
1608
+ * - "tab" for items that are navigated using the TAB key.
1609
+ * - "none" for static items that are not interactive.
1610
+ * @values arrow-keys, tab, none
1611
+ */
1612
+ navigationType: {
1613
+ type: String,
1614
+ default: T.NONE,
1615
+ validator: (e) => Object.values(T).includes(e)
1616
+ },
1617
+ /**
1618
+ * Applies selected styles to the list item
1619
+ */
1620
+ selected: {
1621
+ type: Boolean,
1622
+ default: !1
1623
+ }
1624
+ },
1625
+ emits: [
1626
+ /**
1627
+ * Key down event
1628
+ *
1629
+ * @event keydown
1630
+ * @type {KeyboardEvent}
1631
+ */
1632
+ "keydown",
1633
+ /**
1634
+ * Native mouse move event
1635
+ *
1636
+ * @event mousemove
1637
+ * @type {MouseEvent}
1638
+ */
1639
+ "mousemove",
1640
+ /**
1641
+ * Native mouse leave event
1642
+ *
1643
+ * @event mouseleave
1644
+ * @type {MouseEvent}
1645
+ */
1646
+ "mouseleave",
1647
+ /**
1648
+ * Mouse down event
1649
+ *
1650
+ * @event mousedown
1651
+ */
1652
+ "mousedown"
1653
+ ],
1654
+ data() {
1655
+ return {
1656
+ injected: !1,
1657
+ mouseHighlighted: !1
1658
+ };
1659
+ },
1660
+ computed: {
1661
+ listItemType() {
1662
+ switch (this.type) {
1663
+ case D.DEFAULT:
1664
+ return V;
1665
+ default:
1666
+ return null;
1667
+ }
1668
+ },
1669
+ listItemListeners() {
1670
+ return {
1671
+ keydown: (e) => {
1672
+ ["enter", "space"].includes(e.code.toLowerCase()) && this.onClick(e), this.$emit("keydown", e);
1673
+ },
1674
+ mousemove: (e) => {
1675
+ this.onMouseHover(e), this.$emit("mousemove", e);
1676
+ },
1677
+ mouseleave: (e) => {
1678
+ this.onMouseLeave(e), this.$emit("mouseleave", e);
1679
+ }
1680
+ };
1681
+ },
1682
+ /**
1683
+ * For keyboard navigation, whether this item is currently highlighted.
1684
+ * An injected highlightId will override the default mouseover highlight.
1685
+ */
1686
+ isHighlighted() {
1687
+ return this.isHoverable ? this.highlightId && this.highlightId() ? this.id === this.highlightId() : this.mouseHighlighted : !1;
1688
+ },
1689
+ isFocusable() {
1690
+ return this.navigationType === T.TAB;
1691
+ },
1692
+ /**
1693
+ * Whether to apply hover styles.
1694
+ */
1695
+ isHoverable() {
1696
+ return this.navigationType !== T.NONE;
1697
+ }
1698
+ },
1699
+ methods: {
1700
+ onClick(e) {
1701
+ this.$emit("click", e);
1702
+ },
1703
+ onMouseHover() {
1704
+ this.mouseHighlighted = !0;
1705
+ },
1706
+ onMouseLeave() {
1707
+ this.mouseHighlighted = !1;
1708
+ }
1709
+ }
1710
+ };
1711
+ function ct(e, s, t, i, n, o) {
1712
+ const c = p("dt-icon");
1713
+ return a(), u(E(t.elementType), A({
1714
+ id: t.id,
1715
+ class: ["dt-list-item", {
1716
+ "dt-list-item--focusable": o.isFocusable,
1717
+ "dt-list-item--highlighted": o.isHighlighted,
1718
+ "dt-list-item--static": !o.isHoverable
1719
+ }],
1720
+ tabindex: o.isFocusable ? 0 : -1,
1721
+ role: t.role,
1722
+ "aria-selected": o.isHighlighted
1723
+ }, K(o.listItemListeners)), {
1724
+ default: h(() => [
1725
+ o.listItemType ? (a(), u(E(o.listItemType), { key: 0 }, ne({ _: 2 }, [
1726
+ ae(e.$slots, (g, v) => ({
1727
+ name: v,
1728
+ fn: h(() => [
1729
+ l(e.$slots, v)
1730
+ ])
1731
+ })),
1732
+ t.selected ? {
1733
+ name: "selected",
1734
+ fn: h(() => [
1735
+ _(c, {
1736
+ name: "check",
1737
+ size: "400",
1738
+ class: "dt-list-item--selected-icon"
1739
+ })
1740
+ ]),
1741
+ key: "0"
1742
+ } : void 0
1743
+ ]), 1024)) : l(e.$slots, "default", { key: 1 })
1744
+ ]),
1745
+ _: 3
1746
+ }, 16, ["id", "class", "tabindex", "role", "aria-selected"]);
1747
+ }
1748
+ const xt = /* @__PURE__ */ y(dt, [["render", ct]]), k = {
1749
+ default: "column",
1750
+ column: "column",
1751
+ row: "row",
1752
+ "row-reverse": "row-reverse",
1753
+ "column-reverse": "column-reverse"
1754
+ }, U = ["sm", "md", "lg", "xl"], x = ["0", "100", "200", "300", "400", "500", "600"], q = {
1755
+ none: void 0,
1756
+ small: "d-p4",
1757
+ medium: "d-p8",
1758
+ large: "d-p16"
1759
+ }, ut = {
1760
+ none: void 0,
1761
+ small: "d-pl4",
1762
+ medium: "d-pl8",
1763
+ large: "d-pl16"
1764
+ }, ht = ["dialog", "menu", "listbox", "tree", "grid"], pt = ["", "anchor"], ft = ["none", "dialog", "first"], mt = ["parent", "body"], yt = [
1765
+ ...X
1766
+ ], zt = [
1767
+ ...J
1768
+ ], gt = {
1769
+ name: "PopoverHeaderFooter",
1770
+ components: {
1771
+ DtButton: F,
1772
+ DtIcon: w
1773
+ },
1774
+ props: {
1775
+ // eslint-disable-next-line vue/require-default-prop
1776
+ type: {
1777
+ type: String,
1778
+ validator: function(e) {
1779
+ return ["header", "footer"].includes(e);
1780
+ }
1781
+ },
1782
+ /**
1783
+ * Additional class name for the content wrapper element.
1784
+ */
1785
+ contentClass: {
1786
+ type: [String, Array, Object],
1787
+ default: ""
1788
+ },
1789
+ /**
1790
+ * Determines visibility for close button
1791
+ * @values true, false
1792
+ */
1793
+ showCloseButton: {
1794
+ type: Boolean,
1795
+ default: !1
1796
+ },
1797
+ /**
1798
+ * A set of props to be passed into the popover's header close button.
1799
+ * Requires an 'ariaLabel' property.
1800
+ */
1801
+ closeButtonProps: {
1802
+ type: Object,
1803
+ default: () => {
1804
+ }
1805
+ }
1806
+ },
1807
+ emits: [
1808
+ /**
1809
+ * Emitted when popover is closed
1810
+ *
1811
+ * @event close
1812
+ * @type { Boolean }
1813
+ */
1814
+ "close"
1815
+ ],
1816
+ data() {
1817
+ return {
1818
+ hasSlotContent: L
1819
+ };
1820
+ },
1821
+ methods: {
1822
+ focusCloseButton() {
1823
+ var s;
1824
+ const e = (s = this.$refs["popover__close-button"]) == null ? void 0 : s.$el;
1825
+ e == null || e.focus();
1826
+ }
1827
+ }
1828
+ };
1829
+ function vt(e, s, t, i, n, o) {
1830
+ const c = p("dt-icon"), g = p("dt-button");
1831
+ return a(), r("div", {
1832
+ "data-qa": "dt-popover-header-footer",
1833
+ class: f({
1834
+ "d-popover__header": t.type === "header",
1835
+ "d-popover__footer": t.type === "footer"
1836
+ })
1837
+ }, [
1838
+ n.hasSlotContent(e.$slots.content) ? (a(), r("div", {
1839
+ key: 0,
1840
+ "data-qa": "dt-popover-header-footer-content",
1841
+ class: f([{
1842
+ "d-popover__header__content": t.type === "header",
1843
+ "d-popover__footer__content": t.type === "footer"
1844
+ }, t.contentClass])
1845
+ }, [
1846
+ l(e.$slots, "content")
1847
+ ], 2)) : d("", !0),
1848
+ t.showCloseButton ? (a(), u(g, A({
1849
+ key: 1,
1850
+ ref: "popover__close-button",
1851
+ "data-qa": "dt-popover-close",
1852
+ class: {
1853
+ "d-popover__header__close-button": t.type === "header",
1854
+ "d-popover__footer__close-button": t.type === "footer"
1855
+ },
1856
+ importance: "outlined",
1857
+ kind: "muted",
1858
+ circle: ""
1859
+ }, t.closeButtonProps, {
1860
+ onClick: s[0] || (s[0] = (v) => e.$emit("close"))
1861
+ }), {
1862
+ icon: h(() => [
1863
+ _(c, {
1864
+ name: "close",
1865
+ size: "300"
1866
+ })
1867
+ ]),
1868
+ _: 1
1869
+ }, 16, ["class"])) : d("", !0)
1870
+ ], 2);
1871
+ }
1872
+ const _t = /* @__PURE__ */ y(gt, [["render", vt]]), bt = {
1873
+ name: "DtPopover",
1874
+ /********************
1875
+ * CHILD COMPONENTS *
1876
+ ********************/
1877
+ components: {
1878
+ SrOnlyCloseButton: G,
1879
+ DtLazyShow: Q,
1880
+ PopoverHeaderFooter: _t
1881
+ },
1882
+ mixins: [et, B],
1883
+ props: {
1884
+ /**
1885
+ * Controls whether the popover is shown. Leaving this null will have the popover trigger on click by default.
1886
+ * If you set this value, the default trigger behavior will be disabled, and you can control it as you need.
1887
+ * Supports v-model
1888
+ * @values null, true, false
1889
+ */
1890
+ open: {
1891
+ type: Boolean,
1892
+ default: null
1893
+ },
1894
+ /**
1895
+ * Opens the popover on right click (context menu). If you set this value to `true`,
1896
+ * the default trigger behavior will be disabled.
1897
+ * @values true, false
1898
+ */
1899
+ openOnContext: {
1900
+ type: Boolean,
1901
+ default: !1
1902
+ },
1903
+ /**
1904
+ * Element type (tag name) of the root element of the component.
1905
+ */
1906
+ elementType: {
1907
+ type: String,
1908
+ default: "div"
1909
+ },
1910
+ /**
1911
+ * Named transition when the content display is toggled.
1912
+ * @see DtLazyShow
1913
+ */
1914
+ transition: {
1915
+ type: String,
1916
+ default: "fade"
1917
+ },
1918
+ /**
1919
+ * ARIA role for the content of the popover. Defaults to "dialog".
1920
+ * <a class="d-link" href="https://www.w3.org/TR/wai-aria/#aria-haspopup" target="_blank">aria-haspopup</a>
1921
+ */
1922
+ role: {
1923
+ type: String,
1924
+ default: "dialog",
1925
+ validator: (e) => ht.includes(e)
1926
+ },
1927
+ /**
1928
+ * ID of the element that serves as the label for the popover content.
1929
+ * Defaults to the "anchor" element; this exists to provide a different
1930
+ * ID of the label element if, for example, the anchor slot contains
1931
+ * other items that do not serve as a label. You should provide this
1932
+ * or ariaLabel, but not both.
1933
+ */
1934
+ ariaLabelledby: {
1935
+ type: String,
1936
+ default: null
1937
+ },
1938
+ /**
1939
+ * Descriptive label for the popover content. You should provide this
1940
+ * or ariaLabelledby, but not both.
1941
+ */
1942
+ ariaLabel: {
1943
+ type: String,
1944
+ default: null
1945
+ },
1946
+ /**
1947
+ * A set of props to be passed into the popover's header close button.
1948
+ * Requires an 'ariaLabel' property, when the header popover is visible
1949
+ */
1950
+ closeButtonProps: {
1951
+ type: Object,
1952
+ default: () => ({})
1953
+ },
1954
+ /**
1955
+ * Padding size class for the popover content.
1956
+ * @values none, small, medium, large
1957
+ */
1958
+ padding: {
1959
+ type: String,
1960
+ default: "large",
1961
+ validator: (e) => Object.keys(q).some((s) => s === e)
1962
+ },
1963
+ /**
1964
+ * Additional class name for the content wrapper element.
1965
+ */
1966
+ contentClass: {
1967
+ type: [String, Array, Object],
1968
+ default: ""
1969
+ },
1970
+ /**
1971
+ * Width configuration for the popover content. When its value is 'anchor',
1972
+ * the popover content will have the same width as the anchor.
1973
+ * @values null, anchor
1974
+ */
1975
+ contentWidth: {
1976
+ type: String,
1977
+ default: "",
1978
+ validator: (e) => pt.includes(e)
1979
+ },
1980
+ /**
1981
+ * Whether to apply transition on initial render in the content lazy show component.
1982
+ */
1983
+ contentAppear: {
1984
+ type: Boolean,
1985
+ default: null
1986
+ },
1987
+ /**
1988
+ * Tabindex value for the content. Passing null, no tabindex attribute will be set.
1989
+ */
1990
+ contentTabindex: {
1991
+ type: Number || null,
1992
+ default: -1
1993
+ },
1994
+ /**
1995
+ * External anchor id to use in those cases the anchor can't be provided via the slot.
1996
+ * For instance, using the combobox's input as the anchor for the popover.
1997
+ */
1998
+ externalAnchor: {
1999
+ type: String,
2000
+ default: ""
2001
+ },
2002
+ /**
2003
+ * The id of the tooltip
2004
+ */
2005
+ id: {
2006
+ type: String,
2007
+ default() {
2008
+ return R();
2009
+ }
2010
+ },
2011
+ /**
2012
+ * Displaces the content box from its anchor element
2013
+ * by the specified number of pixels.
2014
+ * <a
2015
+ * class="d-link"
2016
+ * href="https://atomiks.github.io/tippyjs/v6/all-props/#offset"
2017
+ * target="_blank"
2018
+ * >
2019
+ * Tippy.js docs
2020
+ * </a>
2021
+ */
2022
+ offset: {
2023
+ type: Array,
2024
+ default: () => [0, 4]
2025
+ },
2026
+ /**
2027
+ * Determines if the popover hides upon clicking the
2028
+ * anchor or outside the content box.
2029
+ * @values true, false
2030
+ */
2031
+ hideOnClick: {
2032
+ type: Boolean,
2033
+ default: !0
2034
+ },
2035
+ /**
2036
+ * Determines modal state. If enabled popover has a modal overlay
2037
+ * preventing interaction with elements below it, but it is invisible.
2038
+ * @values true, false
2039
+ */
2040
+ modal: {
2041
+ type: Boolean,
2042
+ default: !0
2043
+ },
2044
+ /**
2045
+ * If the popover does not fit in the direction described by "placement",
2046
+ * it will attempt to change its direction to the "fallbackPlacements".
2047
+ * <a
2048
+ * class="d-link"
2049
+ * href="https://popper.js.org/docs/v2/modifiers/flip/#fallbackplacements"
2050
+ * target="_blank"
2051
+ * >
2052
+ * Popper.js docs
2053
+ * </a>
2054
+ * */
2055
+ fallbackPlacements: {
2056
+ type: Array,
2057
+ default: () => ["auto"]
2058
+ },
2059
+ /**
2060
+ * The direction the popover displays relative to the anchor.
2061
+ * <a
2062
+ * class="d-link"
2063
+ * href="https://atomiks.github.io/tippyjs/v6/all-props/#placement"
2064
+ * target="_blank"
2065
+ * >
2066
+ * Tippy.js docs
2067
+ * </a>
2068
+ * @values top, top-start, top-end,
2069
+ * right, right-start, right-end,
2070
+ * left, left-start, left-end,
2071
+ * bottom, bottom-start, bottom-end,
2072
+ * auto, auto-start, auto-end
2073
+ */
2074
+ placement: {
2075
+ type: String,
2076
+ default: "bottom-end"
2077
+ },
2078
+ /**
2079
+ * If set to false the dialog will display over top of the anchor when there is insufficient space.
2080
+ * If set to true it will never move from its position relative to the anchor and will clip instead.
2081
+ * <a
2082
+ * class="d-link"
2083
+ * href="https://popper.js.org/docs/v2/modifiers/prevent-overflow/#tether"
2084
+ * target="_blank"
2085
+ * >
2086
+ * Popper.js docs
2087
+ * </a>
2088
+ * @values true, false
2089
+ */
2090
+ tether: {
2091
+ type: Boolean,
2092
+ default: !0
2093
+ },
2094
+ /**
2095
+ * If the popover sticks to the anchor. This is usually not needed, but can be needed
2096
+ * if the reference element's position is animating, or to automatically update the popover
2097
+ * position in those cases the DOM layout changes the reference element's position.
2098
+ * `true` enables it, `reference` only checks the "reference" rect for changes and `popper` only
2099
+ * checks the "popper" rect for changes.
2100
+ * <a
2101
+ * class="d-link"
2102
+ * href="https://atomiks.github.io/tippyjs/v6/all-props/#sticky"
2103
+ * target="_blank"
2104
+ * >
2105
+ * Tippy.js docs
2106
+ * </a>
2107
+ * @values true, false, reference, popper
2108
+ */
2109
+ sticky: {
2110
+ type: [Boolean, String],
2111
+ default: !1,
2112
+ validator: (e) => yt.includes(e)
2113
+ },
2114
+ /**
2115
+ * Determines maximum height for the popover before overflow.
2116
+ * Possible units rem|px|em
2117
+ */
2118
+ maxHeight: {
2119
+ type: String,
2120
+ default: ""
2121
+ },
2122
+ /**
2123
+ * Determines maximum width for the popover before overflow.
2124
+ * Possible units rem|px|%|em
2125
+ */
2126
+ maxWidth: {
2127
+ type: String,
2128
+ default: ""
2129
+ },
2130
+ /**
2131
+ * Determines visibility for close button
2132
+ * @values true, false
2133
+ */
2134
+ showCloseButton: {
2135
+ type: Boolean,
2136
+ default: !1
2137
+ },
2138
+ /**
2139
+ * Additional class name for the header content wrapper element.
2140
+ */
2141
+ headerClass: {
2142
+ type: [String, Array, Object],
2143
+ default: ""
2144
+ },
2145
+ /**
2146
+ * Additional class name for the footer content wrapper element.
2147
+ */
2148
+ footerClass: {
2149
+ type: [String, Array, Object],
2150
+ default: ""
2151
+ },
2152
+ /**
2153
+ * Additional class name for the dialog element.
2154
+ */
2155
+ dialogClass: {
2156
+ type: [String, Array, Object],
2157
+ default: ""
2158
+ },
2159
+ /**
2160
+ * The element that is focused when the popover is opened. This can be an
2161
+ * HTMLElement within the popover, a string starting with '#' which will
2162
+ * find the element by ID. 'first' which will automatically focus
2163
+ * the first element, or 'dialog' which will focus the dialog window itself.
2164
+ * If the dialog is modal this prop cannot be 'none'.
2165
+ * @values none, dialog, first
2166
+ */
2167
+ initialFocusElement: {
2168
+ type: [String, HTMLElement],
2169
+ default: "first",
2170
+ validator: (e) => ft.includes(e) || e instanceof HTMLElement || e.startsWith("#")
2171
+ },
2172
+ /**
2173
+ * If the popover should open pressing up or down arrow key on the anchor element.
2174
+ * This can be set when not passing open prop.
2175
+ * @values true, false
2176
+ */
2177
+ openWithArrowKeys: {
2178
+ type: Boolean,
2179
+ default: !1
2180
+ },
2181
+ /**
2182
+ * Sets the element to which the popover is going to append to.
2183
+ * 'body' will append to the nearest body (supports shadow DOM).
2184
+ * @values 'body', 'parent', HTMLElement,
2185
+ */
2186
+ appendTo: {
2187
+ type: [HTMLElement, String],
2188
+ default: "body",
2189
+ validator: (e) => mt.includes(e) || e instanceof HTMLElement
2190
+ }
2191
+ },
2192
+ emits: [
2193
+ /**
2194
+ * Native keydown event
2195
+ *
2196
+ * @event keydown
2197
+ * @type {KeyboardEvent}
2198
+ */
2199
+ "keydown",
2200
+ /**
2201
+ * Event fired to sync the open prop with the parent component
2202
+ * @event update:open
2203
+ */
2204
+ "update:open",
2205
+ /**
2206
+ * Emitted when popover is shown or hidden
2207
+ *
2208
+ * @event opened
2209
+ * @type {Boolean | Array}
2210
+ */
2211
+ "opened"
2212
+ ],
2213
+ data() {
2214
+ return {
2215
+ POPOVER_PADDING_CLASSES: q,
2216
+ POPOVER_HEADER_FOOTER_PADDING_CLASSES: ut,
2217
+ intersectionObserver: null,
2218
+ isOutsideViewport: !1,
2219
+ isOpen: !1,
2220
+ toAppear: !1,
2221
+ anchorEl: null,
2222
+ popoverContentEl: null,
2223
+ hasSlotContent: L
2224
+ };
2225
+ },
2226
+ computed: {
2227
+ popoverListeners() {
2228
+ return {
2229
+ keydown: (e) => {
2230
+ this.onKeydown(e);
2231
+ },
2232
+ "after-leave": (e) => {
2233
+ this.onLeaveTransitionComplete();
2234
+ },
2235
+ "after-enter": (e) => {
2236
+ this.onEnterTransitionComplete();
2237
+ }
2238
+ };
2239
+ },
2240
+ calculatedMaxHeight() {
2241
+ return this.isOutsideViewport && this.modal ? "calc(100vh - var(--dt-space-300))" : this.maxHeight;
2242
+ },
2243
+ labelledBy() {
2244
+ return this.ariaLabelledby || !this.ariaLabel && R("DtPopover__anchor");
2245
+ }
2246
+ },
2247
+ watch: {
2248
+ $props: {
2249
+ immediate: !0,
2250
+ deep: !0,
2251
+ handler() {
2252
+ this.validateProps();
2253
+ }
2254
+ },
2255
+ modal(e) {
2256
+ var s;
2257
+ (s = this.tip) == null || s.setProps({
2258
+ zIndex: e ? 650 : this.calculateAnchorZindex()
2259
+ });
2260
+ },
2261
+ offset(e) {
2262
+ var s;
2263
+ (s = this.tip) == null || s.setProps({
2264
+ offset: e
2265
+ });
2266
+ },
2267
+ sticky(e) {
2268
+ var s;
2269
+ (s = this.tip) == null || s.setProps({
2270
+ sticky: e
2271
+ });
2272
+ },
2273
+ fallbackPlacements() {
2274
+ var e;
2275
+ (e = this.tip) == null || e.setProps({
2276
+ popperOptions: this.popperOptions()
2277
+ });
2278
+ },
2279
+ tether() {
2280
+ var e;
2281
+ (e = this.tip) == null || e.setProps({
2282
+ popperOptions: this.popperOptions()
2283
+ });
2284
+ },
2285
+ placement(e) {
2286
+ var s;
2287
+ (s = this.tip) == null || s.setProps({
2288
+ placement: e
2289
+ });
2290
+ },
2291
+ open: {
2292
+ handler: function(e) {
2293
+ e !== null && (this.isOpen = e), e === !0 && (this.toAppear = !0);
2294
+ },
2295
+ immediate: !0
2296
+ },
2297
+ contentAppear: {
2298
+ handler: function(e) {
2299
+ e !== null && (this.toAppear = e);
2300
+ }
2301
+ },
2302
+ isOpen(e, s) {
2303
+ e ? (this.initTippyInstance(), this.tip.show()) : !e && s !== e && (this.removeEventListeners(), this.tip.hide());
2304
+ }
2305
+ },
2306
+ mounted() {
2307
+ const e = this.externalAnchor ? this.$refs.anchor.getRootNode().querySelector(`#${this.externalAnchor}`) : null;
2308
+ this.anchorEl = e ?? 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);
2309
+ },
2310
+ beforeUnmount() {
2311
+ var e;
2312
+ (e = this.tip) == null || e.destroy(), this.intersectionObserver.disconnect(), this.removeReferences(), this.removeEventListeners();
2313
+ },
2314
+ /******************
2315
+ * METHODS *
2316
+ ******************/
2317
+ methods: {
2318
+ hasIntersectedViewport(e) {
2319
+ var i;
2320
+ const s = (i = e == null ? void 0 : e[0]) == null ? void 0 : i.target;
2321
+ if (!s)
2322
+ return;
2323
+ const t = ee(s);
2324
+ this.isOutsideViewport = t.bottom || t.top;
2325
+ },
2326
+ popperOptions() {
2327
+ return te({
2328
+ fallbackPlacements: this.fallbackPlacements,
2329
+ tether: this.tether,
2330
+ hasHideModifierEnabled: !0
2331
+ });
2332
+ },
2333
+ validateProps() {
2334
+ this.modal && this.initialFocusElement === "none" && console.error('If the popover is modal you must set the initialFocusElement prop. Possible values: "dialog", "first", HTMLElement');
2335
+ },
2336
+ calculateAnchorZindex() {
2337
+ var e;
2338
+ 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
2339
+ // anchor of popover is within a drawer.
2340
+ (e = this.anchorEl) != null && e.closest(".d-zi-drawer") ? 650 : 300;
2341
+ },
2342
+ defaultToggleOpen(e) {
2343
+ var s, t, i;
2344
+ if (!this.openOnContext && (this.open === null || this.open === void 0)) {
2345
+ if (!((s = this.anchorEl) != null && s.contains(e.target)) && !((t = this.anchorEl) != null && t.isEqualNode(e.target)) || (i = this.anchorEl) != null && i.disabled)
2346
+ return;
2347
+ this.toggleOpen();
2348
+ }
2349
+ },
2350
+ async onContext(e) {
2351
+ this.openOnContext && (e.preventDefault(), this.isOpen = !0, await this.$nextTick(), this.tip.setProps({
2352
+ placement: "right-start",
2353
+ getReferenceClientRect: () => ({
2354
+ width: 0,
2355
+ height: 0,
2356
+ top: e.clientY,
2357
+ bottom: e.clientY,
2358
+ left: e.clientX,
2359
+ right: e.clientX
2360
+ })
2361
+ }));
2362
+ },
2363
+ toggleOpen() {
2364
+ this.isOpen = !this.isOpen;
2365
+ },
2366
+ onArrowKeyPress(e) {
2367
+ var s;
2368
+ this.open === null && (this.openWithArrowKeys && ((s = this.anchorEl) != null && s.contains(e.target)) && (this.isOpen || (this.isOpen = !0)), this.$emit("keydown", e));
2369
+ },
2370
+ addEventListeners() {
2371
+ window.addEventListener("dt-popover-close", this.closePopover), this.contentWidth === "anchor" && window.addEventListener("resize", this.onResize);
2372
+ },
2373
+ removeEventListeners() {
2374
+ window.removeEventListener("dt-popover-close", this.closePopover), this.contentWidth === "anchor" && window.removeEventListener("resize", this.onResize);
2375
+ },
2376
+ closePopover() {
2377
+ this.isOpen = !1;
2378
+ },
2379
+ /*
2380
+ * Prevents scrolling outside of the currently opened modal popover by:
2381
+ * - when anchor is not within another popover: setting the body to overflow: hidden
2382
+ * - when anchor is within another popover: set the popover dialog container to it's non-modal z-index
2383
+ * since it is no longer the active modal. This puts it underneath the overlay and prevents scrolling.
2384
+ **/
2385
+ preventScrolling() {
2386
+ var e;
2387
+ if (this.modal) {
2388
+ const s = (e = this.anchorEl) == null ? void 0 : e.closest("body, .tippy-box");
2389
+ s.tagName.toLowerCase() === "body" ? (s.classList.add("d-of-hidden"), this.tip.setProps({ offset: this.offset })) : s.classList.add("d-zi-popover");
2390
+ }
2391
+ },
2392
+ /*
2393
+ * Resets the prevent scrolling properties set in preventScrolling() back to normal.
2394
+ **/
2395
+ enableScrolling() {
2396
+ var s, t;
2397
+ const e = (s = this.anchorEl) == null ? void 0 : s.closest("body, .tippy-box");
2398
+ e && (((t = e.tagName) == null ? void 0 : t.toLowerCase()) === "body" ? (e.classList.remove("d-of-hidden"), this.tip.setProps({ offset: this.offset })) : e.classList.remove("d-zi-popover"));
2399
+ },
2400
+ removeReferences() {
2401
+ this.anchorEl = null, this.popoverContentEl = null, this.tip = null;
2402
+ },
2403
+ async onShow() {
2404
+ this.contentWidth === "anchor" && await this.setPopoverContentAnchorWidth(), this.contentWidth === null && (this.popoverContentEl.style.width = "auto"), this.addEventListeners();
2405
+ },
2406
+ async onLeaveTransitionComplete() {
2407
+ var e;
2408
+ this.modal && (await this.focusFirstElement(this.$refs.anchor), await this.$nextTick(), this.enableScrolling()), (e = this.tip) == null || e.unmount(), this.$emit("opened", !1), this.open !== null && this.$emit("update:open", !1);
2409
+ },
2410
+ async onEnterTransitionComplete() {
2411
+ this.focusInitialElement(), await this.$nextTick(), this.preventScrolling(), this.$emit("opened", !0, this.$refs.popover__content), this.open !== null && this.$emit("update:open", !0);
2412
+ },
2413
+ focusInitialElement() {
2414
+ 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();
2415
+ },
2416
+ focusInitialElementById() {
2417
+ var s, t, i;
2418
+ const e = (t = (s = this.$refs.content) == null ? void 0 : s.$el) == null ? void 0 : t.querySelector(this.initialFocusElement);
2419
+ e ? e.focus() : console.warn('Could not find the element specified in dt-popover prop "initialFocusElement". Defaulting to focusing the dialog.'), e ? e.focus() : (i = this.$refs.content) == null || i.$el.focus();
2420
+ },
2421
+ onResize() {
2422
+ this.closePopover();
2423
+ },
2424
+ onClickOutside() {
2425
+ if (!this.hideOnClick)
2426
+ return;
2427
+ this.popoverContentEl.querySelector(".d-popover__anchor--opened") || this.closePopover();
2428
+ },
2429
+ onKeydown(e) {
2430
+ e.key === "Tab" && this.modal && this.focusTrappedTabPress(e, this.popoverContentEl), e.key === "Escape" && this.closePopover(), this.$emit("keydown", e);
2431
+ },
2432
+ async setPopoverContentAnchorWidth() {
2433
+ var e;
2434
+ await this.$nextTick(), this.popoverContentEl.style.width = `${(e = this.anchorEl) == null ? void 0 : e.clientWidth}px`;
2435
+ },
2436
+ focusFirstElementIfNeeded(e) {
2437
+ var t, i;
2438
+ this._getFocusableElements(e, !0).length !== 0 ? this.focusFirstElement(e) : this.showCloseButton ? (t = this.$refs.popover__header) == null || t.focusCloseButton() : (i = this.$refs.content) == null || i.$el.focus();
2439
+ },
2440
+ initTippyInstance() {
2441
+ var e, s;
2442
+ this.tip = se(this.anchorEl, {
2443
+ popperOptions: this.popperOptions(),
2444
+ contentElement: this.popoverContentEl,
2445
+ placement: this.placement,
2446
+ offset: this.offset,
2447
+ sticky: this.sticky,
2448
+ appendTo: this.appendTo === "body" ? (s = (e = this.anchorEl) == null ? void 0 : e.getRootNode()) == null ? void 0 : s.querySelector("body") : this.appendTo,
2449
+ interactive: !0,
2450
+ trigger: "manual",
2451
+ // We have to manage hideOnClick functionality manually to handle
2452
+ // popover within popover situations.
2453
+ hideOnClick: !1,
2454
+ zIndex: this.modal ? 650 : this.calculateAnchorZindex(),
2455
+ onClickOutside: this.onClickOutside,
2456
+ onShow: this.onShow
2457
+ });
2458
+ }
2459
+ }
2460
+ }, kt = ["aria-hidden"], St = ["id", "tabindex"];
2461
+ function Et(e, s, t, i, n, o) {
2462
+ const c = p("popover-header-footer"), g = p("sr-only-close-button"), v = p("dt-lazy-show");
2463
+ return a(), r("div", null, [
2464
+ t.modal && n.isOpen ? (a(), u(ie, {
2465
+ key: 0,
2466
+ to: "body"
2467
+ }, [
2468
+ b("div", {
2469
+ class: "d-modal--transparent",
2470
+ "aria-hidden": t.modal && n.isOpen ? "false" : "true",
2471
+ onClick: s[0] || (s[0] = P(() => {
2472
+ }, ["prevent", "stop"]))
2473
+ }, null, 8, kt)
2474
+ ])) : d("", !0),
2475
+ (a(), u(E(t.elementType), {
2476
+ ref: "popover",
2477
+ class: f(["d-popover", { "d-popover__anchor--opened": n.isOpen }]),
2478
+ "data-qa": "dt-popover-container"
2479
+ }, {
2480
+ default: h(() => [
2481
+ b("div", {
2482
+ id: !t.ariaLabelledby && o.labelledBy,
2483
+ ref: "anchor",
2484
+ "data-qa": "dt-popover-anchor",
2485
+ tabindex: t.openOnContext ? 0 : void 0,
2486
+ onClickCapture: s[1] || (s[1] = (...m) => o.defaultToggleOpen && o.defaultToggleOpen(...m)),
2487
+ onContextmenu: s[2] || (s[2] = (...m) => o.onContext && o.onContext(...m)),
2488
+ onKeydown: [
2489
+ s[3] || (s[3] = S(P((...m) => o.onArrowKeyPress && o.onArrowKeyPress(...m), ["prevent"]), ["up"])),
2490
+ s[4] || (s[4] = S(P((...m) => o.onArrowKeyPress && o.onArrowKeyPress(...m), ["prevent"]), ["down"])),
2491
+ s[6] || (s[6] = S((m) => e.$emit("keydown", m), ["enter"])),
2492
+ s[7] || (s[7] = S((m) => e.$emit("keydown", m), ["space"]))
2493
+ ],
2494
+ onKeydownCapture: s[5] || (s[5] = S((...m) => o.closePopover && o.closePopover(...m), ["escape"]))
2495
+ }, [
2496
+ l(e.$slots, "anchor", {
2497
+ attrs: {
2498
+ "aria-expanded": n.isOpen.toString(),
2499
+ "aria-controls": t.id,
2500
+ "aria-haspopup": t.role
2501
+ }
2502
+ })
2503
+ ], 40, St),
2504
+ _(v, A({
2505
+ id: t.id,
2506
+ ref: "content",
2507
+ role: t.role,
2508
+ "data-qa": "dt-popover",
2509
+ "aria-hidden": `${!n.isOpen}`,
2510
+ "aria-labelledby": o.labelledBy,
2511
+ "aria-label": t.ariaLabel,
2512
+ "aria-modal": `${!t.modal}`,
2513
+ transition: t.transition,
2514
+ show: n.isOpen,
2515
+ appear: n.toAppear,
2516
+ class: ["d-popover__dialog", { "d-popover__dialog--modal": t.modal }, t.dialogClass],
2517
+ style: {
2518
+ "max-height": o.calculatedMaxHeight,
2519
+ "max-width": t.maxWidth
2520
+ },
2521
+ css: e.$attrs.css,
2522
+ tabindex: t.contentTabindex
2523
+ }, K(o.popoverListeners)), {
2524
+ default: h(() => [
2525
+ n.hasSlotContent(e.$slots.headerContent) || t.showCloseButton ? (a(), u(c, {
2526
+ key: 0,
2527
+ ref: "popover__header",
2528
+ class: f(n.POPOVER_HEADER_FOOTER_PADDING_CLASSES[t.padding]),
2529
+ "content-class": t.headerClass,
2530
+ type: "header",
2531
+ "show-close-button": t.showCloseButton,
2532
+ "close-button-props": t.closeButtonProps,
2533
+ onClose: o.closePopover
2534
+ }, {
2535
+ content: h(() => [
2536
+ l(e.$slots, "headerContent", { close: o.closePopover })
2537
+ ]),
2538
+ _: 3
2539
+ }, 8, ["class", "content-class", "show-close-button", "close-button-props", "onClose"])) : d("", !0),
2540
+ b("div", {
2541
+ ref: "popover__content",
2542
+ "data-qa": "dt-popover-content",
2543
+ class: f([
2544
+ "d-popover__content",
2545
+ n.POPOVER_PADDING_CLASSES[t.padding],
2546
+ t.contentClass
2547
+ ])
2548
+ }, [
2549
+ l(e.$slots, "content", { close: o.closePopover })
2550
+ ], 2),
2551
+ n.hasSlotContent(e.$slots.footerContent) ? (a(), u(c, {
2552
+ key: 1,
2553
+ ref: "popover__footer",
2554
+ type: "footer",
2555
+ class: f(n.POPOVER_HEADER_FOOTER_PADDING_CLASSES[t.padding]),
2556
+ "content-class": t.footerClass
2557
+ }, {
2558
+ content: h(() => [
2559
+ l(e.$slots, "footerContent", { close: o.closePopover })
2560
+ ]),
2561
+ _: 3
2562
+ }, 8, ["class", "content-class"])) : d("", !0),
2563
+ e.showVisuallyHiddenClose ? (a(), u(g, {
2564
+ key: 2,
2565
+ "visually-hidden-close-label": e.visuallyHiddenCloseLabel,
2566
+ onClose: o.closePopover
2567
+ }, null, 8, ["visually-hidden-close-label", "onClose"])) : d("", !0)
2568
+ ]),
2569
+ _: 3
2570
+ }, 16, ["id", "role", "aria-hidden", "aria-labelledby", "aria-label", "aria-modal", "transition", "show", "appear", "class", "style", "css", "tabindex"])
2571
+ ]),
2572
+ _: 3
2573
+ }, 8, ["class"]))
2574
+ ]);
2575
+ }
2576
+ const Ht = /* @__PURE__ */ y(bt, [["render", Et]]);
2577
+ function $(e) {
2578
+ return e === k.default;
2579
+ }
2580
+ function j(e) {
2581
+ if (O(e) === "string")
2582
+ return $(e) ? null : k[e];
2583
+ if (O(e) === "object") {
2584
+ const { default: s } = e;
2585
+ return $(s) ? null : k[s];
2586
+ } else
2587
+ return null;
2588
+ }
2589
+ function O(e) {
2590
+ return typeof e;
2591
+ }
2592
+ function wt(e) {
2593
+ return j(e) ? `d-stack--${k[j(e)]}` : null;
2594
+ }
2595
+ function Ct(e) {
2596
+ return O(e) === "object" ? [
2597
+ ...U.map((s) => e[s] ? `d-stack--${s}--${e[s]}` : null)
2598
+ ] : null;
2599
+ }
2600
+ function It(e) {
2601
+ return x.includes(e) ? `d-stack--gap-${e}` : null;
2602
+ }
2603
+ function Ot(e) {
2604
+ if (O(e) === "string")
2605
+ return Object.keys(k).includes(e);
2606
+ if (O(e) === "object") {
2607
+ const { default: s } = e;
2608
+ return Object.keys(k).includes(s);
2609
+ } else
2610
+ return null;
2611
+ }
2612
+ function At(e) {
2613
+ return x.includes(e);
2614
+ }
2615
+ const Tt = {
2616
+ name: "DtStack",
2617
+ props: {
2618
+ /**
2619
+ * Set this prop to the direction to stack the items.
2620
+ * You can override the default direction with 'default' key.
2621
+ * All the undefined breakpoints will have 'default' value.
2622
+ * By default, for the column direction it will have `justify-content: flex-start`
2623
+ * and for the row direction `align-items: center`. This can be overriden
2624
+ * by utility classes.
2625
+ */
2626
+ direction: {
2627
+ type: [String, Object],
2628
+ default: "column",
2629
+ validator: (e) => Ot(e)
2630
+ },
2631
+ /**
2632
+ * Set this prop to render stack as a specific HTML element.
2633
+ */
2634
+ as: {
2635
+ type: String,
2636
+ default: "div"
2637
+ },
2638
+ /**
2639
+ * Set this prop to have the space between each stack item
2640
+ * @values 0, 100, 200, 300, 400, 500, 600
2641
+ */
2642
+ gap: {
2643
+ type: String,
2644
+ default: "0",
2645
+ validator: (e) => At(e)
2646
+ }
2647
+ },
2648
+ data() {
2649
+ return {
2650
+ DT_STACK_DIRECTION: k,
2651
+ DT_STACK_GAP: x,
2652
+ DT_STACK_RESPONSIVE_BREAKPOINTS: U
2653
+ };
2654
+ },
2655
+ computed: {
2656
+ stackGap() {
2657
+ return It(this.gap);
2658
+ },
2659
+ defaultDirection() {
2660
+ return wt(this.direction);
2661
+ },
2662
+ stackResponsive() {
2663
+ return Ct(this.direction);
2664
+ }
2665
+ }
2666
+ };
2667
+ function Pt(e, s, t, i, n, o) {
2668
+ return a(), u(E(t.as), {
2669
+ class: f([
2670
+ "d-stack",
2671
+ o.defaultDirection,
2672
+ o.stackResponsive,
2673
+ o.stackGap
2674
+ ])
2675
+ }, {
2676
+ default: h(() => [
2677
+ l(e.$slots, "default")
2678
+ ]),
2679
+ _: 3
2680
+ }, 8, ["class"]);
2681
+ }
2682
+ const Vt = /* @__PURE__ */ y(Tt, [["render", Pt]]);
2683
+ export {
2684
+ N as A,
2685
+ me as B,
2686
+ C,
2687
+ xt as D,
2688
+ ce as E,
2689
+ k as F,
2690
+ U as G,
2691
+ T as L,
2692
+ et as M,
2693
+ M as N,
2694
+ mt as P,
2695
+ B as S,
2696
+ Vt as a,
2697
+ Ft as b,
2698
+ Rt as c,
2699
+ Bt as d,
2700
+ Ht as e,
2701
+ Re as f,
2702
+ Ve as g,
2703
+ Ye as h,
2704
+ x as i,
2705
+ G as j,
2706
+ pt as k,
2707
+ V as l,
2708
+ ye as m,
2709
+ ge as n,
2710
+ z as o,
2711
+ ve as p,
2712
+ _e as q,
2713
+ H as r,
2714
+ D as s,
2715
+ Te as t,
2716
+ q as u,
2717
+ ut as v,
2718
+ ht as w,
2719
+ ft as x,
2720
+ yt as y,
2721
+ zt as z
2722
+ };