@dialpad/dialtone-vue 3.105.2 → 3.106.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/CHANGELOG.json +1 -1
  2. package/CHANGELOG.md +15 -0
  3. package/dist/dialtone-vue.cjs +5 -5
  4. package/dist/dialtone-vue.js +2857 -2264
  5. package/dist/{emoji-wyzCAeMh.cjs → emoji-3sZLmJtM.cjs} +1 -1
  6. package/dist/{emoji-WjzabgKs.js → emoji-RvO57rkW.js} +3406 -3406
  7. package/dist/emoji.cjs +1 -1
  8. package/dist/emoji.js +3 -3
  9. package/dist/{emoji_picker-Uhm2r1e3.cjs → emoji_picker-EYanEJrn.cjs} +1 -1
  10. package/dist/{emoji_picker-J3yCpi0n.js → emoji_picker-ZDMH1VIY.js} +1 -1
  11. package/dist/{emoji_text_wrapper-PF5FAHE8.cjs → emoji_text_wrapper-p2pyEE4j.cjs} +1 -1
  12. package/dist/{emoji_text_wrapper-N_7eQTWM.js → emoji_text_wrapper-zvhbHADN.js} +1 -1
  13. package/dist/message_input.cjs +1 -92
  14. package/dist/message_input.js +156 -13406
  15. package/dist/rich_text_editor-VFx2M8I2.cjs +97 -0
  16. package/dist/rich_text_editor-o1bRsprW.js +16664 -0
  17. package/dist/style.css +1 -1
  18. package/dist/types/components/rich_text_editor/rich_text_editor.vue.d.ts +16 -1
  19. package/dist/types/components/rich_text_editor/rich_text_editor.vue.d.ts.map +1 -1
  20. package/dist/types/components/rich_text_editor/rich_text_editor_constants.d.ts +2 -0
  21. package/dist/types/components/rich_text_editor/rich_text_editor_constants.d.ts.map +1 -1
  22. package/dist/types/index.d.ts +1 -0
  23. package/dist/types/recipes/conversation_view/editor/editor.vue.d.ts +522 -0
  24. package/dist/types/recipes/conversation_view/editor/editor.vue.d.ts.map +1 -0
  25. package/dist/types/recipes/conversation_view/editor/editor_constants.d.ts +8 -0
  26. package/dist/types/recipes/conversation_view/editor/editor_constants.d.ts.map +1 -0
  27. package/dist/types/recipes/conversation_view/editor/index.d.ts +2 -0
  28. package/dist/types/recipes/conversation_view/editor/index.d.ts.map +1 -0
  29. package/dist/types/recipes/conversation_view/feed_item_row/feed_item_row.vue.d.ts.map +1 -1
  30. package/package.json +12 -2
  31. package/dist/stack--3ERj1r4.cjs +0 -2
  32. package/dist/stack-tU3sgAgJ.js +0 -1905
@@ -0,0 +1,522 @@
1
+ declare const _default: import("vue").DefineComponent<{
2
+ /**
3
+ * Value of the input. The object format should match TipTap's JSON
4
+ * document structure: https://tiptap.dev/guide/output#option-1-json
5
+ */
6
+ value: {
7
+ type: (ObjectConstructor | StringConstructor)[];
8
+ default: string;
9
+ };
10
+ /**
11
+ * Whether the input is editable
12
+ */
13
+ editable: {
14
+ type: BooleanConstructor;
15
+ default: boolean;
16
+ };
17
+ /**
18
+ * Descriptive label for the input element
19
+ */
20
+ inputAriaLabel: {
21
+ type: StringConstructor;
22
+ required: true;
23
+ default: string;
24
+ };
25
+ /**
26
+ * Additional class name for the input element. Only accepts a String value
27
+ * because this is passed to the editor via options. For multiple classes,
28
+ * join them into one string, e.g. "d-p8 d-hmx96"
29
+ */
30
+ inputClass: {
31
+ type: StringConstructor;
32
+ default: string;
33
+ };
34
+ /**
35
+ * Whether the input should receive focus after the component has been
36
+ * mounted. Either one of `start`, `end`, `all` or a Boolean or a Number.
37
+ * - `start` Sets the focus to the beginning of the input
38
+ * - `end` Sets the focus to the end of the input
39
+ * - `all` Selects the whole contents of the input
40
+ * - `Number` Sets the focus to a specific position in the input
41
+ * - `true` Defaults to `start`
42
+ * - `false` Disables autofocus
43
+ * @values true, false, start, end, all, number
44
+ */
45
+ autoFocus: {
46
+ type: (StringConstructor | BooleanConstructor | NumberConstructor)[];
47
+ default: boolean;
48
+ validator(autoFocus: unknown): boolean;
49
+ };
50
+ /**
51
+ * Placeholder text
52
+ */
53
+ placeholder: {
54
+ type: StringConstructor;
55
+ default: string;
56
+ };
57
+ /**
58
+ * Content area needs to dynamically adjust height based on the conversation area height.
59
+ * can be vh|px|rem|em|%
60
+ */
61
+ maxHeight: {
62
+ type: StringConstructor;
63
+ default: string;
64
+ };
65
+ /**
66
+ * Confirm set link button defaults.
67
+ */
68
+ confirmSetLinkButton: {
69
+ type: ObjectConstructor;
70
+ default: () => {
71
+ label: string;
72
+ ariaLabel: string;
73
+ };
74
+ };
75
+ /**
76
+ * Remove link button defaults.
77
+ */
78
+ removeLinkButton: {
79
+ type: ObjectConstructor;
80
+ default: () => {
81
+ label: string;
82
+ ariaLabel: string;
83
+ };
84
+ };
85
+ /**
86
+ * Cancel set link button defaults.
87
+ */
88
+ cancelSetLinkButton: {
89
+ type: ObjectConstructor;
90
+ default: () => {
91
+ label: string;
92
+ ariaLabel: string;
93
+ };
94
+ };
95
+ /**
96
+ * Placeholder text for the set link input field
97
+ */
98
+ setLinkPlaceholder: {
99
+ type: StringConstructor;
100
+ default: string;
101
+ };
102
+ /**
103
+ * Show button to render text as bold
104
+ */
105
+ showBoldButton: {
106
+ type: BooleanConstructor;
107
+ default: boolean;
108
+ };
109
+ /**
110
+ * Show button to render text in italics
111
+ */
112
+ showItalicsButton: {
113
+ type: BooleanConstructor;
114
+ default: boolean;
115
+ };
116
+ /**
117
+ * Show button to underline text
118
+ */
119
+ showUnderlineButton: {
120
+ type: BooleanConstructor;
121
+ default: boolean;
122
+ };
123
+ /**
124
+ * Show button to strike text
125
+ */
126
+ showStrikeButton: {
127
+ type: BooleanConstructor;
128
+ default: boolean;
129
+ };
130
+ /**
131
+ * Show button to render list items
132
+ */
133
+ showListItemsButton: {
134
+ type: BooleanConstructor;
135
+ default: boolean;
136
+ };
137
+ /**
138
+ * Show button to render ordered list items
139
+ */
140
+ showOrderedListButton: {
141
+ type: BooleanConstructor;
142
+ default: boolean;
143
+ };
144
+ /**
145
+ * Show button to align text to the left
146
+ */
147
+ showAlignLeftButton: {
148
+ type: BooleanConstructor;
149
+ default: boolean;
150
+ };
151
+ /**
152
+ * Show button to align text to the center
153
+ */
154
+ showAlignCenterButton: {
155
+ type: BooleanConstructor;
156
+ default: boolean;
157
+ };
158
+ /**
159
+ * Show button to align text to the right
160
+ */
161
+ showAlignRightButton: {
162
+ type: BooleanConstructor;
163
+ default: boolean;
164
+ };
165
+ /**
166
+ * Show button to justify text
167
+ */
168
+ showAlignJustifyButton: {
169
+ type: BooleanConstructor;
170
+ default: boolean;
171
+ };
172
+ /**
173
+ * Show button to add quote format to text
174
+ */
175
+ showQuoteButton: {
176
+ type: BooleanConstructor;
177
+ default: boolean;
178
+ };
179
+ /**
180
+ * Show button to add code block
181
+ */
182
+ showCodeBlockButton: {
183
+ type: BooleanConstructor;
184
+ default: boolean;
185
+ };
186
+ /**
187
+ * Show add link default config.
188
+ */
189
+ showAddLink: {
190
+ type: ObjectConstructor;
191
+ default: () => {
192
+ showAddLinkButton: boolean;
193
+ setLinkTitle: string;
194
+ setLinkInputAriaLabel: string;
195
+ };
196
+ };
197
+ }, any, {
198
+ internalInputValue: string | Record<string, any>;
199
+ hasFocus: boolean;
200
+ linkOptions: {
201
+ class: string;
202
+ };
203
+ showLinkInput: boolean;
204
+ linkInput: string;
205
+ }, {
206
+ inputLength(): any;
207
+ htmlOutputFormat(): string;
208
+ showingTextFormatButtons(): boolean;
209
+ showingAlignmentButtons(): boolean;
210
+ showingListButtons(): boolean;
211
+ buttonGroups(): ({
212
+ key: string;
213
+ buttonGroup: {
214
+ showBtn: boolean;
215
+ selector: string;
216
+ iconName: string;
217
+ dataQA: string;
218
+ tooltipMessage: string;
219
+ onClick: () => void;
220
+ }[];
221
+ } | {
222
+ key: string;
223
+ buttonGroup: {
224
+ showBtn: boolean;
225
+ selector: {
226
+ textAlign: string;
227
+ };
228
+ iconName: string;
229
+ dataQA: string;
230
+ tooltipMessage: string;
231
+ onClick: () => any;
232
+ }[];
233
+ })[];
234
+ textFormatButtons(): {
235
+ showBtn: boolean;
236
+ selector: string;
237
+ iconName: string;
238
+ dataQA: string;
239
+ tooltipMessage: string;
240
+ onClick: () => void;
241
+ }[];
242
+ alignmentButtons(): {
243
+ showBtn: boolean;
244
+ selector: {
245
+ textAlign: string;
246
+ };
247
+ iconName: string;
248
+ dataQA: string;
249
+ tooltipMessage: string;
250
+ onClick: () => any;
251
+ }[];
252
+ listButtons(): {
253
+ showBtn: boolean;
254
+ selector: string;
255
+ iconName: string;
256
+ dataQA: string;
257
+ tooltipMessage: string;
258
+ onClick: () => void;
259
+ }[];
260
+ individualButtons(): {
261
+ showBtn: boolean;
262
+ selector: string;
263
+ iconName: string;
264
+ dataQA: string;
265
+ tooltipMessage: string;
266
+ onClick: () => void;
267
+ }[];
268
+ linkButton(): {
269
+ showBtn: any;
270
+ selector: string;
271
+ iconName: string;
272
+ dataQA: string;
273
+ tooltipMessage: string;
274
+ onClick: () => void;
275
+ };
276
+ }, {
277
+ onInputFocus(event: any): void;
278
+ removeLink(): void;
279
+ setLink(event: any): void;
280
+ openLinkInput(): void;
281
+ updateInput(openedInput: any): void;
282
+ closeLinkInput(): void;
283
+ onBoldTextToggle(): void;
284
+ onItalicTextToggle(): void;
285
+ onUnderlineTextToggle(): void;
286
+ onStrikethroughTextToggle(): void;
287
+ onTextAlign(alignment: any): any;
288
+ onBulletListToggle(): void;
289
+ onOrderedListToggle(): void;
290
+ onCodeBlockToggle(): void;
291
+ onBlockquoteToggle(): void;
292
+ onFocus(event: any): void;
293
+ onBlur(event: any): void;
294
+ onInput(event: any): void;
295
+ }, never, import("vue").ComponentOptionsMixin, ("input" | "focus" | "blur")[], "input" | "focus" | "blur", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
296
+ /**
297
+ * Value of the input. The object format should match TipTap's JSON
298
+ * document structure: https://tiptap.dev/guide/output#option-1-json
299
+ */
300
+ value: {
301
+ type: (ObjectConstructor | StringConstructor)[];
302
+ default: string;
303
+ };
304
+ /**
305
+ * Whether the input is editable
306
+ */
307
+ editable: {
308
+ type: BooleanConstructor;
309
+ default: boolean;
310
+ };
311
+ /**
312
+ * Descriptive label for the input element
313
+ */
314
+ inputAriaLabel: {
315
+ type: StringConstructor;
316
+ required: true;
317
+ default: string;
318
+ };
319
+ /**
320
+ * Additional class name for the input element. Only accepts a String value
321
+ * because this is passed to the editor via options. For multiple classes,
322
+ * join them into one string, e.g. "d-p8 d-hmx96"
323
+ */
324
+ inputClass: {
325
+ type: StringConstructor;
326
+ default: string;
327
+ };
328
+ /**
329
+ * Whether the input should receive focus after the component has been
330
+ * mounted. Either one of `start`, `end`, `all` or a Boolean or a Number.
331
+ * - `start` Sets the focus to the beginning of the input
332
+ * - `end` Sets the focus to the end of the input
333
+ * - `all` Selects the whole contents of the input
334
+ * - `Number` Sets the focus to a specific position in the input
335
+ * - `true` Defaults to `start`
336
+ * - `false` Disables autofocus
337
+ * @values true, false, start, end, all, number
338
+ */
339
+ autoFocus: {
340
+ type: (StringConstructor | BooleanConstructor | NumberConstructor)[];
341
+ default: boolean;
342
+ validator(autoFocus: unknown): boolean;
343
+ };
344
+ /**
345
+ * Placeholder text
346
+ */
347
+ placeholder: {
348
+ type: StringConstructor;
349
+ default: string;
350
+ };
351
+ /**
352
+ * Content area needs to dynamically adjust height based on the conversation area height.
353
+ * can be vh|px|rem|em|%
354
+ */
355
+ maxHeight: {
356
+ type: StringConstructor;
357
+ default: string;
358
+ };
359
+ /**
360
+ * Confirm set link button defaults.
361
+ */
362
+ confirmSetLinkButton: {
363
+ type: ObjectConstructor;
364
+ default: () => {
365
+ label: string;
366
+ ariaLabel: string;
367
+ };
368
+ };
369
+ /**
370
+ * Remove link button defaults.
371
+ */
372
+ removeLinkButton: {
373
+ type: ObjectConstructor;
374
+ default: () => {
375
+ label: string;
376
+ ariaLabel: string;
377
+ };
378
+ };
379
+ /**
380
+ * Cancel set link button defaults.
381
+ */
382
+ cancelSetLinkButton: {
383
+ type: ObjectConstructor;
384
+ default: () => {
385
+ label: string;
386
+ ariaLabel: string;
387
+ };
388
+ };
389
+ /**
390
+ * Placeholder text for the set link input field
391
+ */
392
+ setLinkPlaceholder: {
393
+ type: StringConstructor;
394
+ default: string;
395
+ };
396
+ /**
397
+ * Show button to render text as bold
398
+ */
399
+ showBoldButton: {
400
+ type: BooleanConstructor;
401
+ default: boolean;
402
+ };
403
+ /**
404
+ * Show button to render text in italics
405
+ */
406
+ showItalicsButton: {
407
+ type: BooleanConstructor;
408
+ default: boolean;
409
+ };
410
+ /**
411
+ * Show button to underline text
412
+ */
413
+ showUnderlineButton: {
414
+ type: BooleanConstructor;
415
+ default: boolean;
416
+ };
417
+ /**
418
+ * Show button to strike text
419
+ */
420
+ showStrikeButton: {
421
+ type: BooleanConstructor;
422
+ default: boolean;
423
+ };
424
+ /**
425
+ * Show button to render list items
426
+ */
427
+ showListItemsButton: {
428
+ type: BooleanConstructor;
429
+ default: boolean;
430
+ };
431
+ /**
432
+ * Show button to render ordered list items
433
+ */
434
+ showOrderedListButton: {
435
+ type: BooleanConstructor;
436
+ default: boolean;
437
+ };
438
+ /**
439
+ * Show button to align text to the left
440
+ */
441
+ showAlignLeftButton: {
442
+ type: BooleanConstructor;
443
+ default: boolean;
444
+ };
445
+ /**
446
+ * Show button to align text to the center
447
+ */
448
+ showAlignCenterButton: {
449
+ type: BooleanConstructor;
450
+ default: boolean;
451
+ };
452
+ /**
453
+ * Show button to align text to the right
454
+ */
455
+ showAlignRightButton: {
456
+ type: BooleanConstructor;
457
+ default: boolean;
458
+ };
459
+ /**
460
+ * Show button to justify text
461
+ */
462
+ showAlignJustifyButton: {
463
+ type: BooleanConstructor;
464
+ default: boolean;
465
+ };
466
+ /**
467
+ * Show button to add quote format to text
468
+ */
469
+ showQuoteButton: {
470
+ type: BooleanConstructor;
471
+ default: boolean;
472
+ };
473
+ /**
474
+ * Show button to add code block
475
+ */
476
+ showCodeBlockButton: {
477
+ type: BooleanConstructor;
478
+ default: boolean;
479
+ };
480
+ /**
481
+ * Show add link default config.
482
+ */
483
+ showAddLink: {
484
+ type: ObjectConstructor;
485
+ default: () => {
486
+ showAddLinkButton: boolean;
487
+ setLinkTitle: string;
488
+ setLinkInputAriaLabel: string;
489
+ };
490
+ };
491
+ }>> & {
492
+ onFocus?: ((...args: any[]) => any) | undefined;
493
+ onBlur?: ((...args: any[]) => any) | undefined;
494
+ onInput?: ((...args: any[]) => any) | undefined;
495
+ }, {
496
+ value: string | Record<string, any>;
497
+ maxHeight: string;
498
+ inputClass: string;
499
+ placeholder: string;
500
+ editable: boolean;
501
+ inputAriaLabel: string;
502
+ autoFocus: string | number | boolean;
503
+ confirmSetLinkButton: Record<string, any>;
504
+ removeLinkButton: Record<string, any>;
505
+ cancelSetLinkButton: Record<string, any>;
506
+ setLinkPlaceholder: string;
507
+ showBoldButton: boolean;
508
+ showItalicsButton: boolean;
509
+ showUnderlineButton: boolean;
510
+ showStrikeButton: boolean;
511
+ showListItemsButton: boolean;
512
+ showOrderedListButton: boolean;
513
+ showAlignLeftButton: boolean;
514
+ showAlignCenterButton: boolean;
515
+ showAlignRightButton: boolean;
516
+ showAlignJustifyButton: boolean;
517
+ showQuoteButton: boolean;
518
+ showCodeBlockButton: boolean;
519
+ showAddLink: Record<string, any>;
520
+ }, {}>;
521
+ export default _default;
522
+ //# sourceMappingURL=editor.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editor.vue.d.ts","sourceRoot":"","sources":["../../../../../recipes/conversation_view/editor/editor.vue.js"],"names":[],"mappings":";IAqCI;;;OAGG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;;IAOH;;;;OAIG;;;;;IAMH;;;;;;;;;;OAUG;;;;;;IAYH;;OAEG;;;;;IAMH;;;OAGG;;;;;IAMH;;OAEG;;;;;;;;IAMH;;OAEG;;;;;;;;IAMH;;OAEG;;;;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA7MH;;;OAGG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;;IAOH;;;;OAIG;;;;;IAMH;;;;;;;;;;OAUG;;;;;;IAYH;;OAEG;;;;;IAMH;;;OAGG;;;;;IAMH;;OAEG;;;;;;;;IAMH;;OAEG;;;;;;;;IAMH;;OAEG;;;;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG"}
@@ -0,0 +1,8 @@
1
+ export const EDITOR_SUPPORTED_LINK_PROTOCOLS: RegExp[];
2
+ export const EDITOR_DEFAULT_LINK_PREFIX: "https://";
3
+ declare namespace _default {
4
+ export { EDITOR_SUPPORTED_LINK_PROTOCOLS };
5
+ export { EDITOR_DEFAULT_LINK_PREFIX };
6
+ }
7
+ export default _default;
8
+ //# sourceMappingURL=editor_constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editor_constants.d.ts","sourceRoot":"","sources":["../../../../../recipes/conversation_view/editor/editor_constants.js"],"names":[],"mappings":"AAAA,uDAOE;AAEF,oDAAqD"}
@@ -0,0 +1,2 @@
1
+ export { default as DtRecipeWysiwygEditor } from "./editor.vue";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../recipes/conversation_view/editor/index.js"],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"feed_item_row.vue.d.ts","sourceRoot":"","sources":["../../../../../recipes/conversation_view/feed_item_row/feed_item_row.vue.js"],"names":[],"mappings":";IAwBI;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;;OAGG;;;;;IAMH;;;OAGG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IApEH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;;OAGG;;;;;IAMH;;;OAGG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG"}
1
+ {"version":3,"file":"feed_item_row.vue.d.ts","sourceRoot":"","sources":["../../../../../recipes/conversation_view/feed_item_row/feed_item_row.vue.js"],"names":[],"mappings":";IAyBI;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;;OAGG;;;;;IAMH;;;OAGG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IApEH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;;OAGG;;;;;IAMH;;;OAGG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dialpad/dialtone-vue",
3
- "version": "3.105.2",
3
+ "version": "3.106.0",
4
4
  "description": "Vue component library for Dialpad's design system Dialtone",
5
5
  "files": [
6
6
  "dist",
@@ -10,13 +10,23 @@
10
10
  ],
11
11
  "dependencies": {
12
12
  "@tiptap/core": "^2.0.3",
13
+ "@tiptap/extension-blockquote": "^2.1.16",
14
+ "@tiptap/extension-bold": "^2.1.16",
15
+ "@tiptap/extension-bullet-list": "^2.1.16",
13
16
  "@tiptap/extension-code-block": "^2.0.3",
14
17
  "@tiptap/extension-document": "^2.0.3",
15
18
  "@tiptap/extension-hard-break": "^2.0.3",
19
+ "@tiptap/extension-italic": "^2.1.16",
20
+ "@tiptap/extension-link": "^2.1.16",
21
+ "@tiptap/extension-list-item": "^2.1.16",
16
22
  "@tiptap/extension-mention": "^2.1.11",
23
+ "@tiptap/extension-ordered-list": "^2.2.0",
17
24
  "@tiptap/extension-paragraph": "^2.0.3",
18
25
  "@tiptap/extension-placeholder": "^2.0.3",
26
+ "@tiptap/extension-strike": "^2.1.16",
19
27
  "@tiptap/extension-text": "^2.0.3",
28
+ "@tiptap/extension-text-align": "^2.2.0",
29
+ "@tiptap/extension-underline": "^2.1.16",
20
30
  "@tiptap/pm": "^2.0.3",
21
31
  "@tiptap/suggestion": "^2.1.4",
22
32
  "@tiptap/vue-3": "^2.0.3",
@@ -73,7 +83,7 @@
73
83
  "yo": "^4.3.1",
74
84
  "yorkie": "^2.0.0",
75
85
  "@dialpad/dialtone-css": "^8.24.0",
76
- "@dialpad/dialtone-icons": "^4.7.0"
86
+ "@dialpad/dialtone-icons": "^4.7.2"
77
87
  },
78
88
  "peerDependencies": {
79
89
  "@dialpad/dialtone-css": "^7.30.0 || ^8.21.2",
@@ -1,2 +0,0 @@
1
- "use strict";const l=require("./tooltip-gZ2LW6l0.cjs"),t=require("vue"),d=require("./emoji-wyzCAeMh.cjs"),p={BUSY:"busy",AWAY:"away",OFFLINE:"offline",ACTIVE:"active"},T=[p.BUSY,p.AWAY,p.OFFLINE,p.ACTIVE],K={name:"DtPresence",props:{presence:{type:String,default:p.ACTIVE,validator:e=>T.includes(e)},srText:{type:String,default:null}}},j=["aria-live"],G={key:0,"data-qa":"dt-presence-sr-text",class:"sr-only"};function U(e,n,o,i,a,s){return t.openBlock(),t.createElementBlock("div",{class:"d-presence","data-qa":"dt-presence",role:"status","aria-live":e.$attrs.ariaLive||"off"},[o.srText?(t.openBlock(),t.createElementBlock("span",G,t.toDisplayString(o.srText),1)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["d-presence__inner",{"d-presence__inner--active":o.presence==="active","d-presence__inner--away":o.presence==="away","d-presence__inner--busy":o.presence==="busy","d-presence__inner--offline":o.presence==="offline"}])},null,2)],8,j)}const k=l._export_sfc(K,[["render",U]]),_={xs:"d-avatar--xs",sm:"d-avatar--sm",md:"d-avatar--md",lg:"d-avatar--lg",xl:"d-avatar--xl"},P={default:"",icon:"d-avatar__icon",initials:"d-avatar__initials"},w={md:"d-avatar__presence--md",lg:"d-avatar__presence--lg"},S={NONE:"",BUSY:"busy",AWAY:"away",OFFLINE:"offline",ACTIVE:"active"},D={xs:"100",sm:"200",md:"300",lg:"500",xl:"600"},L=["100","200","300","400","500","600","700","800","900","1000","1100","1200","1300","1400","1500","1600","1700","1800"],g=e=>e>1;function $(){return[void 0,...d.iconNames]}const W=e=>{if(typeof e!="string"||!e.trim())return"";const n=e.trim().split(/\s+/g);return n.length===1?n.join("").substring(0,2):n.filter((o,i)=>i===0||i===n.length-1).map(o=>o.slice(0,1).toUpperCase()).join("")},Y=$(),Z={name:"DtAvatar",components:{DtPresence:k,DtIcon:d.DtIcon},inheritAttrs:!1,props:{id:{type:String,default(){return l.getUniqueString()}},seed:{type:String,default:void 0},color:{type:String,default:void 0},size:{type:String,default:"md",validator:e=>Object.keys(_).includes(e)},avatarClass:{type:[String,Array,Object],default:""},canvasClass:{type:[String,Array,Object],default:""},iconClass:{type:[String,Array,Object],default:""},presence:{type:String,default:S.NONE,validator:e=>Object.values(S).includes(e)},presenceProps:{type:Object,default:()=>({})},group:{type:Number,default:void 0,validator:e=>g(e)},overlayIcon:{type:String,default:""},overlayText:{type:String,default:""},overlayClass:{type:[String,Array,Object],default:""},imageSrc:{type:String,default:""},imageAlt:{type:String,default:""},iconName:{type:String,default:void 0,validator:e=>Y.includes(e)},iconSize:{type:String,default:"",validator:e=>!e||Object.keys(d.ICON_SIZE_MODIFIERS).includes(e)},fullName:{type:String,default:""},clickable:{type:Boolean,default:!1}},emits:["click"],data(){return{AVATAR_SIZE_MODIFIERS:_,AVATAR_KIND_MODIFIERS:P,AVATAR_PRESENCE_SIZE_MODIFIERS:w,AVATAR_ICON_SIZES:D,imageLoadedSuccessfully:null,formattedInitials:"",initializing:!1}},computed:{isNotIconType(){return!this.iconName},avatarClasses(){return["d-avatar",_[this.validatedSize],this.avatarClass,{"d-avatar--group":this.showGroup,[`d-avatar--color-${this.getColor()}`]:this.isNotIconType,"d-avatar--clickable":this.clickable}]},overlayClasses(){return["d-avatar__overlay",this.overlayClass]},showGroup(){return g(this.group)},formattedGroup(){return this.group>99?"99+":this.group},validatedSize(){return this.group?"xs":this.size},showImage(){return this.imageLoadedSuccessfully!==!1&&this.imageSrc},buttonAriaLabel(){if(this.clickable)return this.fullName||this.imageAlt||this.$attrs["aria-label"]}},watch:{fullName:{immediate:!0,handler(e){this.formatInitials(e)}},imageSrc(e){this.imageLoadedSuccessfully=null,e&&(this.validateProps(),this.setImageListeners())}},mounted(){this.validateProps(),this.setImageListeners()},methods:{async setImageListeners(){await this.$nextTick();const e=this.$refs.avatarImage;e&&(e.addEventListener("load",()=>this._loadedImageEventHandler(e),{once:!0}),e.addEventListener("error",()=>this._erroredImageEventHandler(e),{once:!0}))},formatInitials(e){const n=W(e);this.validatedSize==="xs"?this.formattedInitials="":this.validatedSize==="sm"?this.formattedInitials=n[0]:this.formattedInitials=n},getColor(){return this.color??l.getRandomElement(L,this.seed)},_loadedImageEventHandler(e){this.imageLoadedSuccessfully=!0,e.classList.remove("d-d-none")},_erroredImageEventHandler(e){this.imageLoadedSuccessfully=!1,e.classList.add("d-d-none")},validateProps(){if(this.imageSrc&&!(this.fullName||this.imageAlt))throw new Error("full-name or image-alt must be set if image-src is provided")},handleClick(e){this.clickable&&this.$emit("click",e)}}},X=["src","alt"],J={key:1,class:"d-avatar__overlay-text"},Q={key:1,class:"d-avatar__count","data-qa":"dt-avatar-count"};function ee(e,n,o,i,a,s){const c=t.resolveComponent("dt-icon"),u=t.resolveComponent("dt-presence");return t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.clickable?"button":"div"),{id:o.id,class:t.normalizeClass(s.avatarClasses),"data-qa":"dt-avatar","aria-label":s.buttonAriaLabel,onClick:s.handleClick},{default:t.withCtx(()=>[t.createElementVNode("div",{ref:"canvas",class:t.normalizeClass([o.canvasClass,"d-avatar__canvas",{"d-avatar--image-loaded":a.imageLoadedSuccessfully}])},[s.showImage?(t.openBlock(),t.createElementBlock("img",{key:0,ref:"avatarImage",class:"d-avatar__image","data-qa":"dt-avatar-image",src:o.imageSrc,alt:o.imageAlt||o.fullName},null,8,X)):o.iconName?(t.openBlock(),t.createBlock(c,{key:1,name:o.iconName,size:o.iconSize||a.AVATAR_ICON_SIZES[o.size],class:t.normalizeClass([o.iconClass,a.AVATAR_KIND_MODIFIERS.icon]),"data-qa":"dt-avatar-icon"},null,8,["name","size","class"])):(t.openBlock(),t.createElementBlock("span",{key:2,class:t.normalizeClass([a.AVATAR_KIND_MODIFIERS.initials])},t.toDisplayString(a.formattedInitials),3))],2),o.overlayIcon||o.overlayText?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(s.overlayClasses)},[o.overlayIcon?(t.openBlock(),t.createBlock(c,{key:0,class:"d-avatar__overlay-icon",name:o.overlayIcon},null,8,["name"])):o.overlayText?(t.openBlock(),t.createElementBlock("p",J,t.toDisplayString(o.overlayText),1)):t.createCommentVNode("",!0)],2)):t.createCommentVNode("",!0),s.showGroup?(t.openBlock(),t.createElementBlock("span",Q,t.toDisplayString(s.formattedGroup),1)):t.createCommentVNode("",!0),o.presence&&!s.showGroup?(t.openBlock(),t.createBlock(u,t.mergeProps({key:2,presence:o.presence,class:["d-avatar__presence",a.AVATAR_PRESENCE_SIZE_MODIFIERS[o.size]]},o.presenceProps,{"data-qa":"dt-presence"}),null,16,["presence","class"])):t.createCommentVNode("",!0)]),_:1},8,["id","class","aria-label","onClick"])}const te=l._export_sfc(Z,[["render",ee]]),ne={name:"DtLink",props:{kind:{type:String,default:"",validator(e){return d.LINK_VARIANTS.includes(e)}}},data(){return{LINK_KIND_MODIFIERS:d.LINK_KIND_MODIFIERS}}},oe=["href"];function se(e,n,o,i,a,s){return t.openBlock(),t.createElementBlock("a",{class:t.normalizeClass(["d-link",a.LINK_KIND_MODIFIERS[o.kind]]),"data-qa":"dt-link",href:"href"in e.$attrs?e.$attrs.href:"javascript:void(0)"},[t.renderSlot(e.$slots,"default")],10,oe)}const ae=l._export_sfc(ne,[["render",se]]),N={props:{visuallyHiddenClose:{type:Boolean,default:!1},visuallyHiddenCloseLabel:{type:String,default:null}},watch:{$props:{immediate:!0,deep:!0,handler(){this.validateVisuallyHiddenCloseProps()}}},computed:{showVisuallyHiddenClose(){return this.visuallyHiddenClose&&this.visuallyHiddenCloseLabel!=null}},methods:{validateVisuallyHiddenCloseProps(){this.visuallyHiddenClose&&!this.visuallyHiddenCloseLabel&&console.error(`If visuallyHiddenClose prop is true, the component includes
2
- a visually hidden close button and you must set the visuallyHiddenCloseLabel prop.`)}}},ie={name:"SrOnlyCloseButton",components:{DtIcon:d.DtIcon,DtButton:d.DtButton},props:{visuallyHiddenCloseLabel:{type:String,default:null}},emits:["close"],methods:{close(){this.$emit("close")}}};function le(e,n,o,i,a,s){const c=t.resolveComponent("dt-icon"),u=t.resolveComponent("dt-button");return t.openBlock(),t.createBlock(u,{id:"sr-only-close-button","data-qa":"dt-sr-only-close-button",class:"d-vi-visible-sr","aria-label":o.visuallyHiddenCloseLabel,onClick:s.close,onKeydown:t.withKeys(t.withModifiers(s.close,["prevent","stop"]),["space"])},{default:t.withCtx(()=>[t.createVNode(c,{name:"close"})]),_:1},8,["aria-label","onClick","onKeydown"])}const B=l._export_sfc(ie,[["render",le]]),R=':not(:disabled):not([aria-disabled="true"]):not([role="presentation"])',re=`${R}:not([tabindex="-1"])`,ce="button,[href],input,select,textarea,details,[tabindex]",V={methods:{async getFirstFocusableElement(e){await this.$nextTick();const n=this._getFocusableElements(e,!0);return this._getFirstFocusElement(n)},async focusFirstElement(e){const n=await this.getFirstFocusableElement(e);n==null||n.focus({preventScroll:!0})},_getFirstFocusElement(e){if(!e.length)return;let n=e[0];return n.matches('[type="radio"]:not(:checked)')&&(n=e.find(o=>o.checked&&o.name===n.name)||n),n},_getFocusableElements(e=this.$el,n=!1){return e?[...e.querySelectorAll(ce)].filter(i=>{const a=window.getComputedStyle(i);return a.getPropertyValue("display")!=="none"&&a.getPropertyValue("visibility")!=="hidden"&&i.matches(n?R:re)}):[]},focusTrappedTabPress(e,n){if(!(e.key==="Tab"))return;const i=this._getFocusableElements(n);if(!i.length){e.preventDefault();return}const a=this._getFirstFocusElement(i),s=i[i.length-1];e.shiftKey?document.activeElement===a&&(s.focus(),e.preventDefault()):document.activeElement===s&&(a.focus(),e.preventDefault())}}},v={DEFAULT:"default",CUSTOM:"custom"},f={ARROW_KEYS:"arrow-keys",TAB:"tab",NONE:"none"},de={name:"DtItemLayout",props:{as:{type:String,default:"div"}}},ue={key:0,"data-qa":"dt-item-layout-left-wrapper",class:"dt-item-layout--left"},he={"data-qa":"dt-item-layout-content-wrapper",class:"dt-item-layout--content"},pe={key:0,"data-qa":"dt-item-layout-title-wrapper",class:"dt-item-layout--title"},me={key:2,"data-qa":"dt-item-layout-bottom-wrapper",class:"dt-item-layout--bottom"},fe={key:1,"data-qa":"dt-item-layout-right-wrapper",class:"dt-item-layout--right"},ye={key:2,"data-qa":"dt-item-layout-selected-wrapper",class:"dt-item-layout--selected"};function _e(e,n,o,i,a,s){return t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.as),{class:"dt-item-layout"},{default:t.withCtx(()=>[e.$slots.left?(t.openBlock(),t.createElementBlock("section",ue,[t.renderSlot(e.$slots,"left",{},void 0,!0)])):t.createCommentVNode("",!0),t.createElementVNode("section",he,[e.$slots.default?(t.openBlock(),t.createElementBlock("div",pe,[t.renderSlot(e.$slots,"default",{},void 0,!0)])):t.createCommentVNode("",!0),e.$slots.subtitle?(t.openBlock(),t.createElementBlock("div",{key:1,"data-qa":"dt-item-layout-subtitle-wrapper",class:t.normalizeClass(["dt-item-layout--subtitle",{"dt-item-layout--subtitle--with-title":e.$slots.default}])},[t.renderSlot(e.$slots,"subtitle",{},void 0,!0)],2)):t.createCommentVNode("",!0),e.$slots.bottom?(t.openBlock(),t.createElementBlock("div",me,[t.renderSlot(e.$slots,"bottom",{},void 0,!0)])):t.createCommentVNode("",!0)]),e.$slots.right?(t.openBlock(),t.createElementBlock("section",fe,[t.renderSlot(e.$slots,"right",{},void 0,!0)])):t.createCommentVNode("",!0),e.$slots.selected?(t.openBlock(),t.createElementBlock("section",ye,[t.renderSlot(e.$slots,"selected",{},void 0,!0)])):t.createCommentVNode("",!0)]),_:3})}const C=l._export_sfc(de,[["render",_e],["__scopeId","data-v-411cb81e"]]),ve={name:"DtListItem",components:{DtItemLayout:C,DtIcon:d.DtIcon},inject:{highlightId:{default:null}},props:{id:{type:String,default(){return l.utils.getUniqueString()}},role:{type:String,default:"listitem"},elementType:{type:String,default:"li"},type:{type:String,default:v.DEFAULT,validator:e=>Object.values(v).includes(e)},navigationType:{type:String,default:f.NONE,validator:e=>Object.values(f).includes(e)},selected:{type:Boolean,default:!1}},emits:["keydown","mousemove","mouseleave","mousedown"],data(){return{injected:!1,mouseHighlighted:!1}},computed:{listItemType(){switch(this.type){case v.DEFAULT:return C;default:return null}},listItemListeners(){return{keydown:e=>{["enter","space"].includes(e.code.toLowerCase())&&this.onClick(e),this.$emit("keydown",e)},mousemove:e=>{this.onMouseHover(e),this.$emit("mousemove",e)},mouseleave:e=>{this.onMouseLeave(e),this.$emit("mouseleave",e)}}},isHighlighted(){return this.isHoverable?this.highlightId&&this.highlightId()?this.id===this.highlightId():this.mouseHighlighted:!1},isFocusable(){return this.navigationType===f.TAB},isHoverable(){return this.navigationType!==f.NONE}},methods:{onClick(e){this.$emit("click",e)},onMouseHover(){this.mouseHighlighted=!0},onMouseLeave(){this.mouseHighlighted=!1}}};function Ee(e,n,o,i,a,s){const c=t.resolveComponent("dt-icon");return t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.elementType),t.mergeProps({id:o.id,class:["dt-list-item",{"dt-list-item--focusable":s.isFocusable,"dt-list-item--highlighted":s.isHighlighted,"dt-list-item--static":!s.isHoverable}],tabindex:s.isFocusable?0:-1,role:o.role,"aria-selected":s.isHighlighted},t.toHandlers(s.listItemListeners)),{default:t.withCtx(()=>[s.listItemType?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(s.listItemType),{key:0},t.createSlots({_:2},[t.renderList(e.$slots,(u,m)=>({name:m,fn:t.withCtx(()=>[t.renderSlot(e.$slots,m)])})),o.selected?{name:"selected",fn:t.withCtx(()=>[t.createVNode(c,{name:"check",size:"400",class:"dt-list-item--selected-icon"})]),key:"0"}:void 0]),1024)):t.renderSlot(e.$slots,"default",{key:1})]),_:3},16,["id","class","tabindex","role","aria-selected"])}const Se=l._export_sfc(ve,[["render",Ee]]),h={default:"column",column:"column",row:"row","row-reverse":"row-reverse","column-reverse":"column-reverse"},I=["sm","md","lg","xl"],E=["0","100","200","300","400","500","600"],O={none:void 0,small:"d-p4",medium:"d-p8",large:"d-p16"},F={none:void 0,small:"d-pl4",medium:"d-pl8",large:"d-pl16"},x=["dialog","menu","listbox","tree","grid"],H=["","anchor"],M=["none","dialog","first"],q=["parent","body"],z=[...l.TIPPY_STICKY_VALUES],ge=[...l.BASE_TIPPY_DIRECTIONS],Ce={name:"PopoverHeaderFooter",components:{DtButton:d.DtButton,DtIcon:d.DtIcon},props:{type:{type:String,validator:function(e){return["header","footer"].includes(e)}},contentClass:{type:[String,Array,Object],default:""},showCloseButton:{type:Boolean,default:!1},closeButtonProps:{type:Object,default:()=>{}}},emits:["close"],data(){return{hasSlotContent:l.hasSlotContent}},methods:{focusCloseButton(){var n;const e=(n=this.$refs["popover__close-button"])==null?void 0:n.$el;e==null||e.focus()}}};function Oe(e,n,o,i,a,s){const c=t.resolveComponent("dt-icon"),u=t.resolveComponent("dt-button");return t.openBlock(),t.createElementBlock("div",{"data-qa":"dt-popover-header-footer",class:t.normalizeClass({"d-popover__header":o.type==="header","d-popover__footer":o.type==="footer"})},[a.hasSlotContent(e.$slots.content)?(t.openBlock(),t.createElementBlock("div",{key:0,"data-qa":"dt-popover-header-footer-content",class:t.normalizeClass([{"d-popover__header__content":o.type==="header","d-popover__footer__content":o.type==="footer"},o.contentClass])},[t.renderSlot(e.$slots,"content")],2)):t.createCommentVNode("",!0),o.showCloseButton?(t.openBlock(),t.createBlock(u,t.mergeProps({key:1,ref:"popover__close-button","data-qa":"dt-popover-close",class:{"d-popover__header__close-button":o.type==="header","d-popover__footer__close-button":o.type==="footer"},importance:"outlined",kind:"muted",circle:""},o.closeButtonProps,{onClick:n[0]||(n[0]=m=>e.$emit("close"))}),{icon:t.withCtx(()=>[t.createVNode(c,{name:"close",size:"300"})]),_:1},16,["class"])):t.createCommentVNode("",!0)],2)}const Ie=l._export_sfc(Ce,[["render",Oe]]),be={name:"DtPopover",components:{SrOnlyCloseButton:B,DtLazyShow:l.DtLazyShow,PopoverHeaderFooter:Ie},mixins:[V,N],props:{open:{type:Boolean,default:null},openOnContext:{type:Boolean,default:!1},elementType:{type:String,default:"div"},transition:{type:String,default:"fade"},role:{type:String,default:"dialog",validator:e=>x.includes(e)},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null},closeButtonProps:{type:Object,default:()=>({})},padding:{type:String,default:"large",validator:e=>Object.keys(O).some(n=>n===e)},contentClass:{type:[String,Array,Object],default:""},contentWidth:{type:String,default:"",validator:e=>H.includes(e)},contentAppear:{type:Boolean,default:null},contentTabindex:{type:Number||null,default:-1},externalAnchor:{type:String,default:""},id:{type:String,default(){return l.getUniqueString()}},offset:{type:Array,default:()=>[0,4]},hideOnClick:{type:Boolean,default:!0},modal:{type:Boolean,default:!0},fallbackPlacements:{type:Array,default:()=>["auto"]},placement:{type:String,default:"bottom-end"},tether:{type:Boolean,default:!0},sticky:{type:[Boolean,String],default:!1,validator:e=>z.includes(e)},maxHeight:{type:String,default:""},maxWidth:{type:String,default:""},showCloseButton:{type:Boolean,default:!1},headerClass:{type:[String,Array,Object],default:""},footerClass:{type:[String,Array,Object],default:""},dialogClass:{type:[String,Array,Object],default:""},initialFocusElement:{type:[String,HTMLElement],default:"first",validator:e=>M.includes(e)||e instanceof HTMLElement||e.startsWith("#")},openWithArrowKeys:{type:Boolean,default:!1},appendTo:{type:[HTMLElement,String],default:"body",validator:e=>q.includes(e)||e instanceof HTMLElement},hovercard:{type:Boolean,default:!1},timer:{type:[Object,null],default:null,validator:e=>e===null||e.enter&&e.leave&&Object.keys(e).includes("current")}},emits:["keydown","update:open","opened"],data(){return{POPOVER_PADDING_CLASSES:O,POPOVER_HEADER_FOOTER_PADDING_CLASSES:F,intersectionObserver:null,isOutsideViewport:!1,isOpen:!1,toAppear:!1,anchorEl:null,popoverContentEl:null,hasSlotContent:l.hasSlotContent,inTimer:null,outTimer:null}},computed:{popoverListeners(){return{keydown:e=>{this.onKeydown(e)},"after-leave":e=>{this.onLeaveTransitionComplete()},"after-enter":e=>{this.onEnterTransitionComplete()}}},calculatedMaxHeight(){return this.isOutsideViewport&&this.modal?"calc(100vh - var(--dt-space-300))":this.maxHeight},labelledBy(){return this.ariaLabelledby||!this.ariaLabel&&l.getUniqueString("DtPopover__anchor")},currentHovercard(){var e;return(e=this.timer)==null?void 0:e.current}},watch:{$props:{immediate:!0,deep:!0,handler(){this.validateProps()}},modal(e){var n;(n=this.tip)==null||n.setProps({zIndex:e?650:this.calculateAnchorZindex()})},offset(e){var n;(n=this.tip)==null||n.setProps({offset:e})},sticky(e){var n;(n=this.tip)==null||n.setProps({sticky:e})},fallbackPlacements(){var e;(e=this.tip)==null||e.setProps({popperOptions:this.popperOptions()})},tether(){var e;(e=this.tip)==null||e.setProps({popperOptions:this.popperOptions()})},placement(e){var n;(n=this.tip)==null||n.setProps({placement:e})},open:{handler:function(e){e!==null&&(this.isOpen=e),e===!0&&(this.toAppear=!0)},immediate:!0},contentAppear:{handler:function(e){e!==null&&(this.toAppear=e)}},isOpen(e,n){e?(this.initTippyInstance(),this.tip.show()):!e&&n!==e&&(this.removeEventListeners(),this.tip.hide())},currentHovercard(){this.hovercard&&this.timer&&(this.currentHovercard===this.id?this.isOpen=!0:this.isOpen=!1)}},mounted(){const e=this.externalAnchor?this.$refs.anchor.getRootNode().querySelector(`#${this.externalAnchor}`):null;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)},beforeUnmount(){var e;(e=this.tip)==null||e.destroy(),this.intersectionObserver.disconnect(),this.removeReferences(),this.removeEventListeners()},methods:{hasIntersectedViewport(e){var i;const n=(i=e==null?void 0:e[0])==null?void 0:i.target;if(!n)return;const o=l.isOutOfViewPort(n);this.isOutsideViewport=o.bottom||o.top},popperOptions(){return l.getPopperOptions({fallbackPlacements:this.fallbackPlacements,tether:this.tether,hasHideModifierEnabled:!0})},validateProps(){this.modal&&this.initialFocusElement==="none"&&console.error('If the popover is modal you must set the initialFocusElement prop. Possible values: "dialog", "first", HTMLElement')},calculateAnchorZindex(){var e;return this.$el.getRootNode().querySelector('.d-modal[aria-hidden="false"], .d-modal--transparent[aria-hidden="false"]')||(e=this.anchorEl)!=null&&e.closest(".d-zi-drawer")?650:300},defaultToggleOpen(e){var n,o,i;if(!this.hovercard&&!this.openOnContext&&(this.open===null||this.open===void 0)){if(!((n=this.anchorEl)!=null&&n.contains(e.target))&&!((o=this.anchorEl)!=null&&o.isEqualNode(e.target))||(i=this.anchorEl)!=null&&i.disabled)return;this.toggleOpen()}},async onContext(e){this.openOnContext&&(e.preventDefault(),this.isOpen=!0,await this.$nextTick(),this.tip.setProps({placement:"right-start",getReferenceClientRect:()=>({width:0,height:0,top:e.clientY,bottom:e.clientY,left:e.clientX,right:e.clientX})}))},toggleOpen(){this.isOpen=!this.isOpen},onArrowKeyPress(e){var n;this.open===null&&(this.openWithArrowKeys&&((n=this.anchorEl)!=null&&n.contains(e.target))&&(this.isOpen||(this.isOpen=!0)),this.$emit("keydown",e))},addEventListeners(){window.addEventListener("dt-popover-close",this.closePopover),this.contentWidth==="anchor"&&window.addEventListener("resize",this.onResize)},removeEventListeners(){window.removeEventListener("dt-popover-close",this.closePopover),this.contentWidth==="anchor"&&window.removeEventListener("resize",this.onResize)},closePopover(){this.isOpen=!1},preventScrolling(){var e;if(this.modal){const n=(e=this.anchorEl)==null?void 0:e.closest("body, .tippy-box");n.tagName.toLowerCase()==="body"?(n.classList.add("d-of-hidden"),this.tip.setProps({offset:this.offset})):n.classList.add("d-zi-popover")}},enableScrolling(){var n,o;const e=(n=this.anchorEl)==null?void 0:n.closest("body, .tippy-box");e&&(((o=e.tagName)==null?void 0:o.toLowerCase())==="body"?(e.classList.remove("d-of-hidden"),this.tip.setProps({offset:this.offset})):e.classList.remove("d-zi-popover"))},removeReferences(){this.anchorEl=null,this.popoverContentEl=null,this.tip=null},async onShow(){this.contentWidth==="anchor"&&await this.setPopoverContentAnchorWidth(),this.contentWidth===null&&(this.popoverContentEl.style.width="auto"),this.addEventListeners()},async onLeaveTransitionComplete(){var e;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)},async onEnterTransitionComplete(){this.focusInitialElement(),await this.$nextTick(),this.preventScrolling(),this.$emit("opened",!0,this.$refs.popover__content),this.open!==null&&this.$emit("update:open",!0)},focusInitialElement(){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()},focusInitialElementById(){var n,o,i;const e=(o=(n=this.$refs.content)==null?void 0:n.$el)==null?void 0:o.querySelector(this.initialFocusElement);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()},onResize(){this.closePopover()},onClickOutside(){if(!this.hideOnClick)return;this.popoverContentEl.querySelector(".d-popover__anchor--opened")||this.closePopover()},onKeydown(e){e.key==="Tab"&&this.modal&&this.focusTrappedTabPress(e,this.popoverContentEl),e.key==="Escape"&&this.closePopover(),this.$emit("keydown",e)},async setPopoverContentAnchorWidth(){var e;await this.$nextTick(),this.popoverContentEl.style.width=`${(e=this.anchorEl)==null?void 0:e.clientWidth}px`},focusFirstElementIfNeeded(e){var o,i;this._getFocusableElements(e,!0).length!==0?this.focusFirstElement(e):this.showCloseButton?(o=this.$refs.popover__header)==null||o.focusCloseButton():(i=this.$refs.content)==null||i.$el.focus()},initTippyInstance(){var e,n;this.tip=l.createTippy(this.anchorEl,{popperOptions:this.popperOptions(),contentElement:this.popoverContentEl,placement:this.placement,offset:this.offset,sticky:this.sticky,appendTo:this.appendTo==="body"?(n=(e=this.anchorEl)==null?void 0:e.getRootNode())==null?void 0:n.querySelector("body"):this.appendTo,interactive:!0,trigger:"manual",hideOnClick:!1,zIndex:this.modal?650:this.calculateAnchorZindex(),onClickOutside:this.onClickOutside,onShow:this.onShow})},setInTimer(){this.inTimer=setTimeout(()=>{this.isOpen=!0},l.TOOLTIP_DELAY_MS)},setOutTimer(){this.outTimer=setTimeout(()=>{this.isOpen=!1},l.TOOLTIP_DELAY_MS)},onEnterAnchor(){this.hovercard&&(this.timer?this.timer.enter(this.id):(clearTimeout(this.outTimer),this.setInTimer()))},onLeaveAnchor(){this.hovercard&&(this.timer?this.timer.leave():(clearTimeout(this.inTimer),this.setOutTimer()))},onEnterContent(){this.hovercard&&(this.timer?this.timer.enter(this.id):clearTimeout(this.outTimer))},onLeaveContent(){this.hovercard&&(this.timer?this.timer.leave():this.setOutTimer())}}},Ae=["aria-hidden"],Te=["id","data-qa","tabindex"],ke=["data-qa"];function Pe(e,n,o,i,a,s){const c=t.resolveComponent("popover-header-footer"),u=t.resolveComponent("sr-only-close-button"),m=t.resolveComponent("dt-lazy-show");return t.openBlock(),t.createElementBlock("div",null,[o.modal&&a.isOpen?(t.openBlock(),t.createBlock(t.Teleport,{key:0,to:"body"},[t.createElementVNode("div",{class:"d-modal--transparent","aria-hidden":o.modal&&a.isOpen?"false":"true",onClick:n[0]||(n[0]=t.withModifiers(()=>{},["prevent","stop"]))},null,8,Ae)])):t.createCommentVNode("",!0),(t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.elementType),{ref:"popover",class:t.normalizeClass(["d-popover",{"d-popover__anchor--opened":a.isOpen}]),"data-qa":"dt-popover-container"},{default:t.withCtx(()=>[t.createElementVNode("div",{id:!o.ariaLabelledby&&s.labelledBy,ref:"anchor","data-qa":e.$attrs["data-qa"]?`${e.$attrs["data-qa"]}-anchor`:"dt-popover-anchor",tabindex:o.openOnContext?0:void 0,onClickCapture:n[1]||(n[1]=(...r)=>s.defaultToggleOpen&&s.defaultToggleOpen(...r)),onContextmenu:n[2]||(n[2]=(...r)=>s.onContext&&s.onContext(...r)),onKeydown:[n[3]||(n[3]=t.withKeys(t.withModifiers((...r)=>s.onArrowKeyPress&&s.onArrowKeyPress(...r),["prevent"]),["up"])),n[4]||(n[4]=t.withKeys(t.withModifiers((...r)=>s.onArrowKeyPress&&s.onArrowKeyPress(...r),["prevent"]),["down"])),n[6]||(n[6]=t.withKeys(r=>e.$emit("keydown",r),["enter"])),n[7]||(n[7]=t.withKeys(r=>e.$emit("keydown",r),["space"]))],onKeydownCapture:n[5]||(n[5]=t.withKeys((...r)=>s.closePopover&&s.closePopover(...r),["escape"])),onMouseenter:n[8]||(n[8]=(...r)=>s.onEnterAnchor&&s.onEnterAnchor(...r)),onMouseleave:n[9]||(n[9]=(...r)=>s.onLeaveAnchor&&s.onLeaveAnchor(...r))},[t.renderSlot(e.$slots,"anchor",{attrs:{"aria-expanded":a.isOpen.toString(),"aria-controls":o.id,"aria-haspopup":o.role}})],40,Te),t.createVNode(m,t.mergeProps({id:o.id,ref:"content",role:o.role,"data-qa":e.$attrs["data-qa"]?`${e.$attrs["data-qa"]}__dialog`:"dt-popover","aria-hidden":`${!a.isOpen}`,"aria-labelledby":s.labelledBy,"aria-label":o.ariaLabel,"aria-modal":`${!o.modal}`,transition:o.transition,show:a.isOpen,appear:a.toAppear,class:["d-popover__dialog",{"d-popover__dialog--modal":o.modal},o.dialogClass],style:{"max-height":s.calculatedMaxHeight,"max-width":o.maxWidth},css:e.$attrs.css,tabindex:o.contentTabindex},t.toHandlers(s.popoverListeners),{onMouseenter:s.onEnterContent,onMouseleave:s.onLeaveContent}),{default:t.withCtx(()=>[a.hasSlotContent(e.$slots.headerContent)||o.showCloseButton?(t.openBlock(),t.createBlock(c,{key:0,ref:"popover__header",class:t.normalizeClass(a.POPOVER_HEADER_FOOTER_PADDING_CLASSES[o.padding]),"content-class":o.headerClass,type:"header","show-close-button":o.showCloseButton,"close-button-props":o.closeButtonProps,onClose:s.closePopover},{content:t.withCtx(()=>[t.renderSlot(e.$slots,"headerContent",{close:s.closePopover})]),_:3},8,["class","content-class","show-close-button","close-button-props","onClose"])):t.createCommentVNode("",!0),t.createElementVNode("div",{ref:"popover__content","data-qa":e.$attrs["data-qa"]?`${e.$attrs["data-qa"]}-content`:"dt-popover-content",class:t.normalizeClass(["d-popover__content",a.POPOVER_PADDING_CLASSES[o.padding],o.contentClass])},[t.renderSlot(e.$slots,"content",{close:s.closePopover})],10,ke),a.hasSlotContent(e.$slots.footerContent)?(t.openBlock(),t.createBlock(c,{key:1,ref:"popover__footer",type:"footer",class:t.normalizeClass(a.POPOVER_HEADER_FOOTER_PADDING_CLASSES[o.padding]),"content-class":o.footerClass},{content:t.withCtx(()=>[t.renderSlot(e.$slots,"footerContent",{close:s.closePopover})]),_:3},8,["class","content-class"])):t.createCommentVNode("",!0),e.showVisuallyHiddenClose?(t.openBlock(),t.createBlock(u,{key:2,"visually-hidden-close-label":e.visuallyHiddenCloseLabel,onClose:s.closePopover},null,8,["visually-hidden-close-label","onClose"])):t.createCommentVNode("",!0)]),_:3},16,["id","role","data-qa","aria-hidden","aria-labelledby","aria-label","aria-modal","transition","show","appear","class","style","css","tabindex","onMouseenter","onMouseleave"])]),_:3},8,["class"]))])}const we=l._export_sfc(be,[["render",Pe]]);function b(e){return e===h.default}function A(e){if(y(e)==="string")return b(e)?null:h[e];if(y(e)==="object"){const{default:n}=e;return b(n)?null:h[n]}else return null}function y(e){return typeof e}function De(e){return A(e)?`d-stack--${h[A(e)]}`:null}function Le(e){return y(e)==="object"?[...I.map(n=>e[n]?`d-stack--${n}--${e[n]}`:null)]:null}function Ne(e){return E.includes(e)?`d-stack--gap-${e}`:null}function Be(e){if(y(e)==="string")return Object.keys(h).includes(e);if(y(e)==="object"){const{default:n}=e;return Object.keys(h).includes(n)}else return null}function Re(e){return E.includes(e)}const Ve={name:"DtStack",props:{direction:{type:[String,Object],default:"column",validator:e=>Be(e)},as:{type:String,default:"div"},gap:{type:String,default:"0",validator:e=>Re(e)}},data(){return{DT_STACK_DIRECTION:h,DT_STACK_GAP:E,DT_STACK_RESPONSIVE_BREAKPOINTS:I}},computed:{stackGap(){return Ne(this.gap)},defaultDirection(){return De(this.direction)},stackResponsive(){return Le(this.direction)}}};function Fe(e,n,o,i,a,s){return t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.as),{class:t.normalizeClass(["d-stack",s.defaultDirection,s.stackResponsive,s.stackGap])},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},8,["class"])}const xe=l._export_sfc(Ve,[["render",Fe]]);exports.AVATAR_COLORS=L;exports.AVATAR_GROUP_VALIDATOR=g;exports.AVATAR_ICON_SIZES=D;exports.AVATAR_KIND_MODIFIERS=P;exports.AVATAR_PRESENCE_SIZE_MODIFIERS=w;exports.AVATAR_PRESENCE_STATES=S;exports.AVATAR_SIZE_MODIFIERS=_;exports.DT_STACK_DIRECTION=h;exports.DT_STACK_GAP=E;exports.DT_STACK_RESPONSIVE_BREAKPOINTS=I;exports.DtAvatar=te;exports.DtItemLayout=C;exports.DtLink=ae;exports.DtListItem=Se;exports.DtPopover=we;exports.DtPresence=k;exports.DtStack=xe;exports.LIST_ITEM_NAVIGATION_TYPES=f;exports.LIST_ITEM_TYPES=v;exports.Modal=V;exports.POPOVER_APPEND_TO_VALUES=q;exports.POPOVER_CONTENT_WIDTHS=H;exports.POPOVER_DIRECTIONS=ge;exports.POPOVER_HEADER_FOOTER_PADDING_CLASSES=F;exports.POPOVER_INITIAL_FOCUS_STRINGS=M;exports.POPOVER_PADDING_CLASSES=O;exports.POPOVER_ROLES=x;exports.POPOVER_STICKY_VALUES=z;exports.PRESENCE_STATES=p;exports.PRESENCE_STATES_LIST=T;exports.SrOnlyCloseButton=B;exports.SrOnlyCloseButtonMixin=N;