@dialpad/dialtone-vue 2.124.0 → 2.125.1-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (269) hide show
  1. package/dist/chunks/_plugin-vue2_normalizer-u6G_3nkj.js +33 -0
  2. package/dist/chunks/_plugin-vue2_normalizer-u6G_3nkj.js.map +1 -0
  3. package/dist/chunks/dropdown-SMWaTWyF.js +357 -0
  4. package/dist/chunks/dropdown-SMWaTWyF.js.map +1 -0
  5. package/dist/chunks/dropdown_constants-EUcDxBrX.js +9 -0
  6. package/dist/chunks/dropdown_constants-EUcDxBrX.js.map +1 -0
  7. package/dist/chunks/icon_constants-OpYAAKwF.js +16 -0
  8. package/dist/chunks/icon_constants-OpYAAKwF.js.map +1 -0
  9. package/dist/chunks/index-nIyl_PL6.js +372 -0
  10. package/dist/chunks/index-nIyl_PL6.js.map +1 -0
  11. package/dist/chunks/index-o4OMWMuv.js +244 -0
  12. package/dist/chunks/index-o4OMWMuv.js.map +1 -0
  13. package/dist/chunks/input-1tm09l_-.js +273 -0
  14. package/dist/chunks/input-1tm09l_-.js.map +1 -0
  15. package/dist/chunks/input_group-zcAq3DQl.js +141 -0
  16. package/dist/chunks/input_group-zcAq3DQl.js.map +1 -0
  17. package/dist/chunks/keyboard_list_navigation-F0O8nht0.js +197 -0
  18. package/dist/chunks/keyboard_list_navigation-F0O8nht0.js.map +1 -0
  19. package/dist/chunks/link_constants-vIUB92L4.js +16 -0
  20. package/dist/chunks/link_constants-vIUB92L4.js.map +1 -0
  21. package/dist/chunks/list_item_constants-LTUc74pD.js +13 -0
  22. package/dist/chunks/list_item_constants-LTUc74pD.js.map +1 -0
  23. package/dist/chunks/modal-VuMFkZFH.js +82 -0
  24. package/dist/chunks/modal-VuMFkZFH.js.map +1 -0
  25. package/dist/chunks/notice_action-9NmtQRai.js +182 -0
  26. package/dist/chunks/notice_action-9NmtQRai.js.map +1 -0
  27. package/dist/chunks/notice_constants-c--hBFQw.js +6 -0
  28. package/dist/chunks/notice_constants-c--hBFQw.js.map +1 -0
  29. package/dist/chunks/popover_constants-qjlEkroB.js +114 -0
  30. package/dist/chunks/popover_constants-qjlEkroB.js.map +1 -0
  31. package/dist/chunks/sr_only_close_button-JGole5Xi.js +86 -0
  32. package/dist/chunks/sr_only_close_button-JGole5Xi.js.map +1 -0
  33. package/dist/chunks/stack_constants-u7tNqGtc.js +13 -0
  34. package/dist/chunks/stack_constants-u7tNqGtc.js.map +1 -0
  35. package/dist/chunks/tab-Qm9LVkYj.js +346 -0
  36. package/dist/chunks/tab-Qm9LVkYj.js.map +1 -0
  37. package/dist/component-documentation.json +1 -1
  38. package/dist/dialtone-vue.js +356 -10364
  39. package/dist/dialtone-vue.js.map +1 -0
  40. package/dist/lib/attachment-carousel.js +250 -0
  41. package/dist/lib/attachment-carousel.js.map +1 -0
  42. package/dist/lib/avatar.js +369 -0
  43. package/dist/lib/avatar.js.map +1 -0
  44. package/dist/lib/badge.js +169 -0
  45. package/dist/lib/badge.js.map +1 -0
  46. package/dist/lib/banner.js +200 -0
  47. package/dist/lib/banner.js.map +1 -0
  48. package/dist/lib/breadcrumbs.js +138 -0
  49. package/dist/lib/breadcrumbs.js.map +1 -0
  50. package/dist/lib/button-group.js +45 -0
  51. package/dist/lib/button-group.js.map +1 -0
  52. package/dist/lib/button.js +328 -0
  53. package/dist/lib/button.js.map +1 -0
  54. package/dist/lib/callbar-button-with-popover.js +235 -0
  55. package/dist/lib/callbar-button-with-popover.js.map +1 -0
  56. package/dist/lib/callbar-button.js +175 -0
  57. package/dist/lib/callbar-button.js.map +1 -0
  58. package/dist/lib/callbox.js +142 -0
  59. package/dist/lib/callbox.js.map +1 -0
  60. package/dist/lib/card.js +72 -0
  61. package/dist/lib/card.js.map +1 -0
  62. package/dist/lib/checkbox-group.js +117 -0
  63. package/dist/lib/checkbox-group.js.map +1 -0
  64. package/dist/lib/checkbox.js +117 -0
  65. package/dist/lib/checkbox.js.map +1 -0
  66. package/dist/lib/chip.js +186 -0
  67. package/dist/lib/chip.js.map +1 -0
  68. package/dist/lib/codeblock.js +29 -0
  69. package/dist/lib/codeblock.js.map +1 -0
  70. package/dist/lib/collapsible.js +313 -0
  71. package/dist/lib/collapsible.js.map +1 -0
  72. package/dist/lib/combobox-multi-select.js +433 -0
  73. package/dist/lib/combobox-multi-select.js.map +1 -0
  74. package/dist/lib/combobox-with-popover.js +341 -0
  75. package/dist/lib/combobox-with-popover.js.map +1 -0
  76. package/dist/lib/combobox.js +19 -0
  77. package/dist/lib/combobox.js.map +1 -0
  78. package/dist/lib/constants.js +53 -0
  79. package/dist/lib/constants.js.map +1 -0
  80. package/dist/lib/contact-info.js +145 -0
  81. package/dist/lib/contact-info.js.map +1 -0
  82. package/dist/lib/contact-row.js +203 -0
  83. package/dist/lib/contact-row.js.map +1 -0
  84. package/dist/lib/datepicker.js +552 -0
  85. package/dist/lib/datepicker.js.map +1 -0
  86. package/dist/lib/dates.js +57 -0
  87. package/dist/lib/dates.js.map +1 -0
  88. package/dist/lib/description-list.js +83 -0
  89. package/dist/lib/description-list.js.map +1 -0
  90. package/dist/lib/dropdown.js +45 -0
  91. package/dist/lib/dropdown.js.map +1 -0
  92. package/dist/lib/editor.js +527 -0
  93. package/dist/lib/editor.js.map +1 -0
  94. package/dist/{emoji_picker-kiTOKaq8.js → lib/emoji-picker.js} +30 -11
  95. package/dist/lib/emoji-picker.js.map +1 -0
  96. package/dist/lib/emoji-row.js +83 -0
  97. package/dist/lib/emoji-row.js.map +1 -0
  98. package/dist/{emoji_text_wrapper-48ClwKvf.js → lib/emoji-text-wrapper.js} +19 -13
  99. package/dist/lib/emoji-text-wrapper.js.map +1 -0
  100. package/dist/lib/emoji.js +11 -0
  101. package/dist/lib/emoji.js.map +1 -0
  102. package/dist/lib/feed-item-row.js +207 -0
  103. package/dist/lib/feed-item-row.js.map +1 -0
  104. package/dist/lib/feed-pill.js +142 -0
  105. package/dist/lib/feed-pill.js.map +1 -0
  106. package/dist/lib/general-row.js +379 -0
  107. package/dist/lib/general-row.js.map +1 -0
  108. package/dist/lib/group-row.js +115 -0
  109. package/dist/lib/group-row.js.map +1 -0
  110. package/dist/lib/grouped-chip.js +45 -0
  111. package/dist/lib/grouped-chip.js.map +1 -0
  112. package/dist/lib/hovercard.js +194 -0
  113. package/dist/lib/hovercard.js.map +1 -0
  114. package/dist/lib/icon.js +82 -0
  115. package/dist/lib/icon.js.map +1 -0
  116. package/dist/lib/image-viewer.js +171 -0
  117. package/dist/lib/image-viewer.js.map +1 -0
  118. package/dist/lib/input-group.js +90 -0
  119. package/dist/lib/input-group.js.map +1 -0
  120. package/dist/lib/input.js +455 -0
  121. package/dist/lib/input.js.map +1 -0
  122. package/dist/lib/item-layout.js +39 -0
  123. package/dist/lib/item-layout.js.map +1 -0
  124. package/dist/lib/ivr-node.js +195 -0
  125. package/dist/lib/ivr-node.js.map +1 -0
  126. package/dist/lib/keyboard-shortcut.js +100 -0
  127. package/dist/lib/keyboard-shortcut.js.map +1 -0
  128. package/dist/lib/lazy-show.js +77 -0
  129. package/dist/lib/lazy-show.js.map +1 -0
  130. package/dist/lib/link.js +69 -0
  131. package/dist/lib/link.js.map +1 -0
  132. package/dist/lib/list-item-group.js +59 -0
  133. package/dist/lib/list-item-group.js.map +1 -0
  134. package/dist/lib/list-item.js +195 -0
  135. package/dist/lib/list-item.js.map +1 -0
  136. package/dist/{message_input.js → lib/message-input.js} +107 -55
  137. package/dist/lib/message-input.js.map +1 -0
  138. package/dist/lib/mixins.js +17 -0
  139. package/dist/lib/mixins.js.map +1 -0
  140. package/dist/lib/modal.js +324 -0
  141. package/dist/lib/modal.js.map +1 -0
  142. package/dist/lib/notice.js +158 -0
  143. package/dist/lib/notice.js.map +1 -0
  144. package/dist/lib/pagination.js +142 -0
  145. package/dist/lib/pagination.js.map +1 -0
  146. package/dist/lib/popover.js +779 -0
  147. package/dist/lib/popover.js.map +1 -0
  148. package/dist/lib/presence.js +60 -0
  149. package/dist/lib/presence.js.map +1 -0
  150. package/dist/lib/radio-group.js +97 -0
  151. package/dist/lib/radio-group.js.map +1 -0
  152. package/dist/lib/radio.js +111 -0
  153. package/dist/lib/radio.js.map +1 -0
  154. package/dist/lib/rich-text-editor.js +920 -0
  155. package/dist/lib/rich-text-editor.js.map +1 -0
  156. package/dist/lib/root-layout.js +127 -0
  157. package/dist/lib/root-layout.js.map +1 -0
  158. package/dist/lib/select-menu.js +243 -0
  159. package/dist/lib/select-menu.js.map +1 -0
  160. package/dist/lib/settings-menu-button.js +65 -0
  161. package/dist/lib/settings-menu-button.js.map +1 -0
  162. package/dist/lib/skeleton.js +574 -0
  163. package/dist/lib/skeleton.js.map +1 -0
  164. package/dist/lib/stack.js +118 -0
  165. package/dist/lib/stack.js.map +1 -0
  166. package/dist/lib/tabs.js +93 -0
  167. package/dist/lib/tabs.js.map +1 -0
  168. package/dist/lib/time-pill.js +43 -0
  169. package/dist/lib/time-pill.js.map +1 -0
  170. package/dist/lib/toast.js +226 -0
  171. package/dist/lib/toast.js.map +1 -0
  172. package/dist/lib/toggle.js +169 -0
  173. package/dist/lib/toggle.js.map +1 -0
  174. package/dist/{directives.js → lib/tooltip-directive.js} +24 -17
  175. package/dist/lib/tooltip-directive.js.map +1 -0
  176. package/dist/lib/tooltip.js +376 -0
  177. package/dist/lib/tooltip.js.map +1 -0
  178. package/dist/lib/top-banner-info.js +60 -0
  179. package/dist/lib/top-banner-info.js.map +1 -0
  180. package/dist/lib/unread-pill.js +61 -0
  181. package/dist/lib/unread-pill.js.map +1 -0
  182. package/dist/lib/utils.js +175 -0
  183. package/dist/lib/utils.js.map +1 -0
  184. package/dist/lib/validation-messages.js +83 -0
  185. package/dist/lib/validation-messages.js.map +1 -0
  186. package/dist/lib/validators.js +12 -0
  187. package/dist/lib/validators.js.map +1 -0
  188. package/dist/style.css +1 -1
  189. package/dist/types/common/{constants.d.ts → constants/index.d.ts} +1 -1
  190. package/dist/types/common/constants/index.d.ts.map +1 -0
  191. package/dist/types/common/{dates.d.ts → dates/index.d.ts} +1 -1
  192. package/dist/types/common/dates/index.d.ts.map +1 -0
  193. package/dist/types/common/{emoji.d.ts → emoji/index.d.ts} +1 -1
  194. package/dist/types/common/{emoji.d.ts.map → emoji/index.d.ts.map} +1 -1
  195. package/dist/types/common/{utils.d.ts → utils/index.d.ts} +1 -1
  196. package/dist/types/common/utils/index.d.ts.map +1 -0
  197. package/dist/types/common/{validators.d.ts → validators/index.d.ts} +1 -1
  198. package/dist/types/common/validators/index.d.ts.map +1 -0
  199. package/dist/types/components/avatar/avatar.vue.d.ts +1 -1
  200. package/dist/types/components/button/button.vue.d.ts +2 -2
  201. package/dist/types/components/card/card.vue.d.ts +1 -1
  202. package/dist/types/components/checkbox/checkbox.vue.d.ts +7 -7
  203. package/dist/types/components/checkbox/checkbox.vue.d.ts.map +1 -1
  204. package/dist/types/components/chip/chip.vue.d.ts +2 -2
  205. package/dist/types/components/collapsible/collapsible.vue.d.ts +3 -3
  206. package/dist/types/components/combobox/combobox.vue.d.ts +7 -8
  207. package/dist/types/components/combobox/combobox.vue.d.ts.map +1 -1
  208. package/dist/types/components/dropdown/dropdown.vue.d.ts +1 -1
  209. package/dist/types/components/emoji/emoji.vue.d.ts +1 -1
  210. package/dist/types/components/emoji_picker/modules/emoji_selector.vue.d.ts +1 -219
  211. package/dist/types/components/icon/icon.vue.d.ts +20 -16
  212. package/dist/types/components/icon/icon.vue.d.ts.map +1 -1
  213. package/dist/types/components/icon/icon_constants.d.ts +2 -0
  214. package/dist/types/components/icon/icon_constants.d.ts.map +1 -1
  215. package/dist/types/components/icon/index.d.ts +1 -1
  216. package/dist/types/components/input_group/input_group.vue.d.ts +15 -6
  217. package/dist/types/components/input_group/input_group.vue.d.ts.map +1 -1
  218. package/dist/types/components/list_item_group/list_item_group.vue.d.ts +1 -1
  219. package/dist/types/components/modal/modal.vue.d.ts +7 -2
  220. package/dist/types/components/modal/modal.vue.d.ts.map +1 -1
  221. package/dist/types/components/notice/notice_action.vue.d.ts +3 -1
  222. package/dist/types/components/notice/notice_action.vue.d.ts.map +1 -1
  223. package/dist/types/components/popover/popover_header_footer.vue.d.ts +1 -1
  224. package/dist/types/components/radio/radio.vue.d.ts +2 -12
  225. package/dist/types/components/radio/radio.vue.d.ts.map +1 -1
  226. package/dist/types/components/rich_text_editor/extensions/suggestion/SuggestionList.vue.d.ts +1 -1
  227. package/dist/types/components/skeleton/skeleton-list-item.vue.d.ts +1 -1
  228. package/dist/types/components/skeleton/skeleton-paragraph.vue.d.ts +3 -3
  229. package/dist/types/components/skeleton/skeleton-shape.vue.d.ts +2 -2
  230. package/dist/types/components/skeleton/skeleton-text.vue.d.ts +8 -3
  231. package/dist/types/components/skeleton/skeleton-text.vue.d.ts.map +1 -1
  232. package/dist/types/components/skeleton/skeleton.vue.d.ts +1 -1
  233. package/dist/types/components/toggle/toggle.vue.d.ts +1 -1
  234. package/dist/types/components/tooltip/tooltip.vue.d.ts +2 -2
  235. package/dist/types/index.d.ts +36 -29
  236. package/dist/types/recipes/buttons/callbar_button/callbar_button.vue.d.ts +1 -1
  237. package/dist/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts +2 -2
  238. package/dist/types/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.d.ts +1 -1
  239. package/dist/types/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.d.ts +2 -2
  240. package/dist/types/recipes/conversation_view/editor/editor.vue.d.ts +9 -0
  241. package/dist/types/recipes/conversation_view/editor/editor.vue.d.ts.map +1 -1
  242. package/package.json +19 -59
  243. package/CHANGELOG.json +0 -1
  244. package/CHANGELOG.md +0 -2890
  245. package/dist/dialtone-vue.cjs +0 -5
  246. package/dist/directives.cjs +0 -1
  247. package/dist/emoji.cjs +0 -1
  248. package/dist/emoji.js +0 -35
  249. package/dist/emoji_picker-njWWAm6V.cjs +0 -1
  250. package/dist/emoji_text_wrapper-ZlynvHnd.cjs +0 -1
  251. package/dist/index-OF94C6nQ.js +0 -142833
  252. package/dist/index-Wx7Jagcr.cjs +0 -1
  253. package/dist/message_input.cjs +0 -1
  254. package/dist/rich_text_editor-9sMob7ck.js +0 -16478
  255. package/dist/rich_text_editor-Eh5kYokw.cjs +0 -97
  256. package/dist/tooltip-88U5vFMA.js +0 -2516
  257. package/dist/tooltip-i2wxFIIi.cjs +0 -21
  258. package/dist/types/common/constants.d.ts.map +0 -1
  259. package/dist/types/common/dates.d.ts.map +0 -1
  260. package/dist/types/common/utils.d.ts.map +0 -1
  261. package/dist/types/common/validators.d.ts.map +0 -1
  262. package/dist/types/components/emoji_picker/emojis/index.d.ts +0 -50
  263. package/dist/types/components/emoji_picker/emojis/index.d.ts.map +0 -1
  264. package/dist/types/directives.d.ts +0 -2
  265. package/dist/types/directives.d.ts.map +0 -1
  266. package/dist/types/emoji.d.ts +0 -5
  267. package/dist/types/emoji.d.ts.map +0 -1
  268. package/dist/types/message_input.d.ts +0 -3
  269. package/dist/types/message_input.d.ts.map +0 -1
@@ -0,0 +1,118 @@
1
+ import { D as n, a as u, b as l } from "../chunks/stack_constants-u7tNqGtc.js";
2
+ import { n as i } from "../chunks/_plugin-vue2_normalizer-u6G_3nkj.js";
3
+ function a(t) {
4
+ return t === n.default;
5
+ }
6
+ function s(t) {
7
+ if (r(t) === "string")
8
+ return a(t) ? null : n[t];
9
+ if (r(t) === "object") {
10
+ const { default: e } = t;
11
+ return a(e) ? null : n[e];
12
+ } else
13
+ return null;
14
+ }
15
+ function r(t) {
16
+ return typeof t;
17
+ }
18
+ function o(t) {
19
+ return s(t) ? `d-stack--${n[s(t)]}` : null;
20
+ }
21
+ function f(t) {
22
+ return r(t) === "object" ? [
23
+ ...u.map((e) => t[e] ? `d-stack--${e}--${t[e]}` : null)
24
+ ] : null;
25
+ }
26
+ function d(t) {
27
+ return l.includes(t) ? `d-stack--gap-${t}` : null;
28
+ }
29
+ function p(t) {
30
+ if (r(t) === "string")
31
+ return Object.keys(n).includes(t);
32
+ if (r(t) === "object") {
33
+ const { default: e } = t;
34
+ return Object.keys(n).includes(e);
35
+ } else
36
+ return null;
37
+ }
38
+ function _(t) {
39
+ return l.includes(t);
40
+ }
41
+ const m = {
42
+ name: "DtStack",
43
+ props: {
44
+ /**
45
+ * Set this prop to the direction to stack the items.
46
+ * You can override the default direction with 'default' key.
47
+ * All the undefined breakpoints will have 'default' value.
48
+ * By default, for the column direction it will have `justify-content: flex-start`
49
+ * and for the row direction `align-items: center`. This can be overriden
50
+ * by utility classes.
51
+ */
52
+ direction: {
53
+ type: [String, Object],
54
+ default: "column",
55
+ validator: (t) => p(t)
56
+ },
57
+ /**
58
+ * Set this prop to render stack as a specific HTML element.
59
+ */
60
+ as: {
61
+ type: String,
62
+ default: "div"
63
+ },
64
+ /**
65
+ * Set this prop to have the space between each stack item
66
+ * @values 0, 100, 200, 300, 400, 500, 600
67
+ */
68
+ gap: {
69
+ type: String,
70
+ default: "0",
71
+ validator: (t) => _(t)
72
+ }
73
+ },
74
+ data() {
75
+ return {
76
+ DT_STACK_DIRECTION: n,
77
+ DT_STACK_GAP: l,
78
+ DT_STACK_RESPONSIVE_BREAKPOINTS: u
79
+ };
80
+ },
81
+ computed: {
82
+ stackGap() {
83
+ return d(this.gap);
84
+ },
85
+ defaultDirection() {
86
+ return o(this.direction);
87
+ },
88
+ stackResponsive() {
89
+ return f(this.direction);
90
+ }
91
+ }
92
+ };
93
+ var D = function() {
94
+ var e = this, c = e._self._c;
95
+ return c(e.as, { tag: "component", class: [
96
+ "d-stack",
97
+ e.defaultDirection,
98
+ e.stackResponsive,
99
+ e.stackGap
100
+ ] }, [e._t("default")], 2);
101
+ }, g = [], S = /* @__PURE__ */ i(
102
+ m,
103
+ D,
104
+ g,
105
+ !1,
106
+ null,
107
+ null,
108
+ null,
109
+ null
110
+ );
111
+ const y = S.exports;
112
+ export {
113
+ n as DT_STACK_DIRECTION,
114
+ l as DT_STACK_GAP,
115
+ u as DT_STACK_RESPONSIVE_BREAKPOINTS,
116
+ y as DtStack
117
+ };
118
+ //# sourceMappingURL=stack.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stack.js","sources":["../../components/stack/utils.js","../../components/stack/validators.js","../../components/stack/stack.vue"],"sourcesContent":["import { DT_STACK_DIRECTION, DT_STACK_GAP, DT_STACK_RESPONSIVE_BREAKPOINTS } from '@/components/stack/stack_constants';\n\nfunction _isDefaultDirection (direction) {\n return direction === DT_STACK_DIRECTION.default;\n}\n\nfunction _getValidDirection (direction) {\n if (directionPropType(direction) === 'string') {\n return !_isDefaultDirection(direction) ? DT_STACK_DIRECTION[direction] : null;\n } else if (directionPropType(direction) === 'object') {\n const { default: defaultStyle } = direction;\n\n return !_isDefaultDirection(defaultStyle) ? DT_STACK_DIRECTION[defaultStyle] : null;\n } else { return null; }\n}\n\nexport function directionPropType (value) {\n return typeof value;\n}\n\nexport function getDefaultDirectionClass (direction) {\n return _getValidDirection(direction)\n ? `d-stack--${DT_STACK_DIRECTION[_getValidDirection(direction)]}`\n : null;\n}\n\nexport function getResponsiveClasses (direction) {\n if (directionPropType(direction) === 'object') {\n return [\n ...DT_STACK_RESPONSIVE_BREAKPOINTS.map((breakpoint) => {\n return direction[breakpoint]\n ? `d-stack--${breakpoint}--${direction[breakpoint]}`\n : null;\n })];\n } else { return null; }\n}\n\nexport function getGapClass (gap) {\n return DT_STACK_GAP.includes(gap) ? `d-stack--gap-${gap}` : null;\n}\n","import { DT_STACK_DIRECTION, DT_STACK_GAP } from '@/components/stack/stack_constants';\nimport { directionPropType } from './utils';\n\nexport function directionValidator (direction) {\n if (directionPropType(direction) === 'string') {\n return Object.keys(DT_STACK_DIRECTION).includes(direction);\n } else if (directionPropType(direction) === 'object') {\n const { default: defaultStyle } = direction;\n\n return Object.keys(DT_STACK_DIRECTION).includes(defaultStyle);\n } else { return null; }\n}\n\nexport function gapValidator (gap) {\n return DT_STACK_GAP.includes(gap);\n}\n","<template>\n <component\n :is=\"as\"\n :class=\"[\n 'd-stack',\n defaultDirection,\n stackResponsive,\n stackGap,\n ]\"\n >\n <!-- @slot Slot for main content -->\n <slot />\n </component>\n</template>\n\n<script>\nimport { DT_STACK_DIRECTION, DT_STACK_GAP, DT_STACK_RESPONSIVE_BREAKPOINTS } from './stack_constants';\nimport { directionValidator, gapValidator } from './validators';\nimport { getDefaultDirectionClass, getResponsiveClasses, getGapClass } from './utils';\n\nexport default {\n name: 'DtStack',\n\n props: {\n /**\n * Set this prop to the direction to stack the items.\n * You can override the default direction with 'default' key.\n * All the undefined breakpoints will have 'default' value.\n * By default, for the column direction it will have `justify-content: flex-start`\n * and for the row direction `align-items: center`. This can be overriden\n * by utility classes.\n */\n direction: {\n type: [String, Object],\n default: 'column',\n validator: (direction) => directionValidator(direction),\n },\n\n /**\n * Set this prop to render stack as a specific HTML element.\n */\n as: {\n type: String,\n default: 'div',\n },\n\n /**\n * Set this prop to have the space between each stack item\n * @values 0, 100, 200, 300, 400, 500, 600\n */\n gap: {\n type: String,\n default: '0',\n validator: (gap) => gapValidator(gap),\n },\n },\n\n data () {\n return {\n DT_STACK_DIRECTION,\n DT_STACK_GAP,\n DT_STACK_RESPONSIVE_BREAKPOINTS,\n };\n },\n\n computed: {\n stackGap () {\n return getGapClass(this.gap);\n },\n\n defaultDirection () {\n return getDefaultDirectionClass(this.direction);\n },\n\n stackResponsive () {\n return getResponsiveClasses(this.direction);\n },\n },\n};\n</script>\n"],"names":["_isDefaultDirection","direction","DT_STACK_DIRECTION","_getValidDirection","directionPropType","defaultStyle","value","getDefaultDirectionClass","getResponsiveClasses","DT_STACK_RESPONSIVE_BREAKPOINTS","breakpoint","getGapClass","gap","DT_STACK_GAP","directionValidator","gapValidator","_sfc_main"],"mappings":";;AAEA,SAASA,EAAqBC,GAAW;AACvC,SAAOA,MAAcC,EAAmB;AAC1C;AAEA,SAASC,EAAoBF,GAAW;AACtC,MAAIG,EAAkBH,CAAS,MAAM;AACnC,WAAQD,EAAoBC,CAAS,IAAoC,OAAhCC,EAAmBD,CAAS;AAChE,MAAIG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AA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,KAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,CAAAW,MAAAG,EAAAH,CAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AACA,WAAA;AAAA,MACA,oBAAAV;AAAA,MACA,cAAAW;AAAA,MACA,iCAAAJ;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,WAAA;AACA,aAAAE,EAAA,KAAA,GAAA;AAAA,IACA;AAAA,IAEA,mBAAA;AACA,aAAAJ,EAAA,KAAA,SAAA;AAAA,IACA;AAAA,IAEA,kBAAA;AACA,aAAAC,EAAA,KAAA,SAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,93 @@
1
+ import { a as h, D as F, d as E, c as I, T, b as P } from "../chunks/tab-Qm9LVkYj.js";
2
+ import { M as s } from "../chunks/modal-VuMFkZFH.js";
3
+ import { n } from "../chunks/_plugin-vue2_normalizer-u6G_3nkj.js";
4
+ import "./button.js";
5
+ import "vue";
6
+ import "../chunks/link_constants-vIUB92L4.js";
7
+ const l = {
8
+ name: "DtTabPanel",
9
+ mixins: [s],
10
+ inject: ["groupContext"],
11
+ props: {
12
+ /**
13
+ * Id of the panel
14
+ */
15
+ id: {
16
+ type: String,
17
+ required: !0
18
+ },
19
+ /**
20
+ * Id of the associated tab
21
+ */
22
+ tabId: {
23
+ type: String,
24
+ required: !0
25
+ },
26
+ /**
27
+ * If true, hides the tab content
28
+ * @values true, false
29
+ */
30
+ hidden: {
31
+ type: Boolean,
32
+ default: !1
33
+ },
34
+ /**
35
+ * Used to customize the tab element
36
+ */
37
+ tabPanelClass: {
38
+ type: [String, Array, Object],
39
+ default: ""
40
+ }
41
+ },
42
+ data() {
43
+ return {
44
+ isFirstElementFocusable: !1
45
+ };
46
+ },
47
+ computed: {
48
+ hidePanel() {
49
+ return this.groupContext.selected !== this.id || this.hidden;
50
+ }
51
+ },
52
+ async mounted() {
53
+ const t = await this.getFirstFocusableElement(this.$el);
54
+ t ? this.isFirstElementFocusable = this.isFirstElementOfPanel(t) : this.isFirstElementFocusable = !1;
55
+ },
56
+ methods: {
57
+ isFirstElementOfPanel(t) {
58
+ let e = t, a = !0;
59
+ for (; e; ) {
60
+ if (e.previousElementSibling !== null) {
61
+ a = !1;
62
+ break;
63
+ }
64
+ e = e.parentNode !== this.$el ? e.parentNode : null;
65
+ }
66
+ return a;
67
+ }
68
+ }
69
+ };
70
+ var i = function() {
71
+ var e = this, a = e._self._c;
72
+ return a("div", { directives: [{ name: "show", rawName: "v-show", value: !e.hidePanel, expression: "!hidePanel" }], class: e.tabPanelClass, attrs: { id: `dt-panel-${e.id}`, role: "tabpanel", tabindex: e.isFirstElementFocusable ? -1 : 0, "aria-labelledby": `dt-tab-${e.tabId}`, "aria-hidden": `${e.hidePanel}`, "data-qa": "dt-tab-panel" } }, [e._t("default")], 2);
73
+ }, r = [], o = /* @__PURE__ */ n(
74
+ l,
75
+ i,
76
+ r,
77
+ !1,
78
+ null,
79
+ null,
80
+ null,
81
+ null
82
+ );
83
+ const _ = o.exports;
84
+ export {
85
+ h as DtTab,
86
+ F as DtTabGroup,
87
+ _ as DtTabPanel,
88
+ E as TAB_IMPORTANCE_MODIFIERS,
89
+ I as TAB_LIST_IMPORTANCE_MODIFIERS,
90
+ T as TAB_LIST_KIND_MODIFIERS,
91
+ P as TAB_LIST_SIZES
92
+ };
93
+ //# sourceMappingURL=tabs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tabs.js","sources":["../../components/tabs/tab_panel.vue"],"sourcesContent":["<template>\n <div\n v-show=\"!hidePanel\"\n :id=\"`dt-panel-${id}`\"\n role=\"tabpanel\"\n :tabindex=\"isFirstElementFocusable ? -1 : 0\"\n :aria-labelledby=\"`dt-tab-${tabId}`\"\n :aria-hidden=\"`${hidePanel}`\"\n :class=\"tabPanelClass\"\n data-qa=\"dt-tab-panel\"\n >\n <!-- @slot Default slot for Tab Panel -->\n <slot v-show=\"!hidden\" />\n </div>\n</template>\n\n<script>\nimport Modal from '@/common/mixins/modal';\n\n/**\n * Tabs allow users to navigation between grouped content in different views while within the same page context.\n * @see https://dialtone.dialpad.com/components/tabs.html\n */\nexport default {\n name: 'DtTabPanel',\n\n mixins: [Modal],\n\n inject: ['groupContext'],\n\n props: {\n /**\n * Id of the panel\n */\n id: {\n type: String,\n required: true,\n },\n\n /**\n * Id of the associated tab\n */\n tabId: {\n type: String,\n required: true,\n },\n\n /**\n * If true, hides the tab content\n * @values true, false\n */\n hidden: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Used to customize the tab element\n */\n tabPanelClass: {\n type: [String, Array, Object],\n default: '',\n },\n },\n\n data () {\n return {\n isFirstElementFocusable: false,\n };\n },\n\n computed: {\n hidePanel () {\n return this.groupContext.selected !== this.id || this.hidden;\n },\n },\n\n async mounted () {\n const firstFocusableElement = await this.getFirstFocusableElement(this.$el);\n\n if (!firstFocusableElement) {\n this.isFirstElementFocusable = false;\n } else {\n // If the first focusable element isn't the first element in the panel,\n // then we need to set the panel tabindex to 0.\n // See notes in https://www.w3.org/WAI/ARIA/apg/patterns/tabpanel/\n this.isFirstElementFocusable = this.isFirstElementOfPanel(firstFocusableElement);\n }\n },\n\n methods: {\n isFirstElementOfPanel (element) {\n let current = element;\n let isFirstElement = true;\n\n while (current) {\n if (current.previousElementSibling !== null) {\n isFirstElement = false;\n break;\n }\n current = current.parentNode !== this.$el ? current.parentNode : null;\n }\n\n return isFirstElement;\n },\n },\n};\n</script>\n"],"names":["_sfc_main","Modal","firstFocusableElement","element","current","isFirstElement"],"mappings":";;;;;;AAuBA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,QAAA,CAAAC,CAAA;AAAA,EAEA,QAAA,CAAA,cAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,IAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,QAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,eAAA;AAAA,MACA,MAAA,CAAA,QAAA,OAAA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AACA,WAAA;AAAA,MACA,yBAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,YAAA;AACA,aAAA,KAAA,aAAA,aAAA,KAAA,MAAA,KAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,MAAA,UAAA;AACA,UAAAC,IAAA,MAAA,KAAA,yBAAA,KAAA,GAAA;AAEA,IAAAA,IAMA,KAAA,0BAAA,KAAA,sBAAAA,CAAA,IALA,KAAA,0BAAA;AAAA,EAOA;AAAA,EAEA,SAAA;AAAA,IACA,sBAAAC,GAAA;AACA,UAAAC,IAAAD,GACAE,IAAA;AAEA,aAAAD,KAAA;AACA,YAAAA,EAAA,2BAAA,MAAA;AACA,UAAAC,IAAA;AACA;AAAA,QACA;AACA,QAAAD,IAAAA,EAAA,eAAA,KAAA,MAAAA,EAAA,aAAA;AAAA,MACA;AAEA,aAAAC;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;"}
@@ -0,0 +1,43 @@
1
+ import { n as r } from "../chunks/_plugin-vue2_normalizer-u6G_3nkj.js";
2
+ const a = {
3
+ name: "DtRecipeTimePill",
4
+ props: {
5
+ /**
6
+ * Date time display value
7
+ */
8
+ dateTimeDisplay: {
9
+ type: String,
10
+ required: !0
11
+ },
12
+ /**
13
+ * Machine-readable attribute
14
+ * Accepts a string value of YYYY-MM-DD or YYYY-MM-DDThh:mm:ssTZD
15
+ */
16
+ dateTime: {
17
+ type: String,
18
+ required: !0,
19
+ validator: (t) => {
20
+ const e = new Date(t);
21
+ return e instanceof Date && !isNaN(e);
22
+ }
23
+ }
24
+ }
25
+ };
26
+ var n = function() {
27
+ var e = this, i = e._self._c;
28
+ return i("time", { staticClass: "dt-time-pill", attrs: { "data-qa": "dt-time-pill", dateTime: e.dateTime } }, [e._v(" " + e._s(e.dateTimeDisplay) + " ")]);
29
+ }, l = [], s = /* @__PURE__ */ r(
30
+ a,
31
+ n,
32
+ l,
33
+ !1,
34
+ null,
35
+ null,
36
+ null,
37
+ null
38
+ );
39
+ const _ = s.exports;
40
+ export {
41
+ _ as DtRecipeTimePill
42
+ };
43
+ //# sourceMappingURL=time-pill.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"time-pill.js","sources":["../../recipes/conversation_view/time_pill/time_pill.vue"],"sourcesContent":["<template>\n <time\n data-qa=\"dt-time-pill\"\n :dateTime=\"dateTime\"\n class=\"dt-time-pill\"\n >\n {{ dateTimeDisplay }}\n </time>\n</template>\n\n<script>\nimport {} from './time_pill_constants';\n\nexport default {\n name: 'DtRecipeTimePill',\n\n props: {\n /**\n * Date time display value\n */\n dateTimeDisplay: {\n type: String,\n required: true,\n },\n\n /**\n * Machine-readable attribute\n * Accepts a string value of YYYY-MM-DD or YYYY-MM-DDThh:mm:ssTZD\n */\n dateTime: {\n type: String,\n required: true,\n validator: (t) => {\n // Since this will only ever be used in the context of a date, we're rejecting non date inputs\n const x = new Date(t);\n if (x instanceof Date && !isNaN(x)) {\n return true;\n }\n return false;\n },\n },\n },\n};\n</script>\n\n<style lang=\"less\">\n.dt-time-pill {\n color: var(--dt-color-foreground-primary);\n border-radius: var(--dt-size-radius-pill);\n line-height: var(--dt-font-line-height-300);\n font-size: var(--dt-font-size-100);\n border: var(--dt-size-border-100) solid var(--dt-color-border-default);\n background-color: var(--dt-color-surface-primary);\n padding: var(--dt-space-300) var(--dt-space-500);\n}\n</style>\n"],"names":["_sfc_main","x"],"mappings":";AAaA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,iBAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,WAAA,CAAA,MAAA;AAEA,cAAAC,IAAA,IAAA,KAAA,CAAA;AACA,eAAAA,aAAA,QAAA,CAAA,MAAAA,CAAA;AAAA,MAIA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;"}
@@ -0,0 +1,226 @@
1
+ import s from "./utils.js";
2
+ import { a as n } from "../chunks/sr_only_close_button-JGole5Xi.js";
3
+ import { n as a } from "../chunks/_plugin-vue2_normalizer-u6G_3nkj.js";
4
+ import { a as r, b as l, D as d } from "../chunks/notice_action-9NmtQRai.js";
5
+ import { N as u } from "../chunks/notice_constants-c--hBFQw.js";
6
+ import "./constants.js";
7
+ import "vue";
8
+ import "./icon.js";
9
+ import "@dialpad/dialtone-icons/vue2";
10
+ import "../chunks/icon_constants-OpYAAKwF.js";
11
+ import "@dialpad/dialtone-icons/icons.json";
12
+ import "./skeleton.js";
13
+ import "./button.js";
14
+ import "../chunks/link_constants-vIUB92L4.js";
15
+ const c = ["status", "alert"], o = 6e3, m = {
16
+ name: "DtToast",
17
+ components: {
18
+ DtNoticeIcon: r,
19
+ DtNoticeContent: l,
20
+ DtNoticeAction: d
21
+ },
22
+ mixins: [n],
23
+ props: {
24
+ /**
25
+ * Sets an ID on the title element of the component. Useful for aria-describedby
26
+ * or aria-labelledby or any other reason you may need an id to refer to the title.
27
+ */
28
+ titleId: {
29
+ type: String,
30
+ default() {
31
+ return s.getUniqueString();
32
+ }
33
+ },
34
+ /**
35
+ * Sets an ID on the content element of the component. Useful for aria-describedby
36
+ * or aria-labelledby or any other reason you may need an id to refer to the content.
37
+ */
38
+ contentId: {
39
+ type: String,
40
+ default() {
41
+ return s.getUniqueString();
42
+ }
43
+ },
44
+ /**
45
+ * Title header of the toast. This can be left blank to remove the title from the toast entirely.
46
+ */
47
+ title: {
48
+ type: String,
49
+ default: ""
50
+ },
51
+ /**
52
+ * Message of the toast. Overridden by default slot.
53
+ */
54
+ message: {
55
+ type: String,
56
+ default: ""
57
+ },
58
+ /**
59
+ * Provides a role for the toast. 'status' is used by default to communicate a message. 'alert' is used to
60
+ * communicate an important message like an error that does not contain any interactive elements.
61
+ * @values status, alert
62
+ */
63
+ role: {
64
+ type: String,
65
+ default: "status",
66
+ validator: (e) => c.includes(e)
67
+ },
68
+ /**
69
+ * Severity level of the toast, sets the icon and background
70
+ * @values base, error, info, success, warning
71
+ */
72
+ kind: {
73
+ type: String,
74
+ default: "base",
75
+ validator: (e) => u.includes(e)
76
+ },
77
+ /**
78
+ * Used in scenarios where the message needs to visually dominate the screen.
79
+ * @values true, false
80
+ */
81
+ important: {
82
+ type: Boolean,
83
+ default: !1
84
+ },
85
+ /**
86
+ * Controls whether the toast is shown. If a valid duration is provided, the toast will disappear
87
+ * after reaching the duration time, so it's convenient to use `.sync` modifier with this prop to update
88
+ * the data in your component.
89
+ * Supports .sync modifier
90
+ * @values true, false
91
+ */
92
+ show: {
93
+ type: Boolean,
94
+ default: !1
95
+ },
96
+ /**
97
+ * Props for the toast close button.
98
+ */
99
+ closeButtonProps: {
100
+ type: Object,
101
+ default: () => ({})
102
+ },
103
+ /**
104
+ * Hides the close button from the toast
105
+ * @values true, false
106
+ */
107
+ hideClose: {
108
+ type: Boolean,
109
+ default: !1
110
+ },
111
+ /**
112
+ * Hides the icon from the notice
113
+ * @values true, false
114
+ */
115
+ hideIcon: {
116
+ type: Boolean,
117
+ default: !1
118
+ },
119
+ /**
120
+ * Hides the action from the notice
121
+ * @values true, false
122
+ */
123
+ hideAction: {
124
+ type: Boolean,
125
+ default: !1
126
+ },
127
+ /**
128
+ * The duration in ms the toast will display before disappearing.
129
+ * The toast won't disappear if the duration is not provided.
130
+ * If it's provided, it should be equal to or greater than 6000.
131
+ */
132
+ duration: {
133
+ type: Number,
134
+ default: null,
135
+ validator: (e) => e >= o
136
+ }
137
+ },
138
+ emits: [
139
+ /**
140
+ * Close button click event
141
+ *
142
+ * @event close
143
+ */
144
+ "close",
145
+ /**
146
+ * Sync show value
147
+ *
148
+ * @event update:show
149
+ */
150
+ "update:show"
151
+ ],
152
+ data() {
153
+ return {
154
+ isShown: !1,
155
+ minDuration: o
156
+ };
157
+ },
158
+ computed: {
159
+ kindClass() {
160
+ return {
161
+ error: "d-toast--error",
162
+ info: "d-toast--info",
163
+ success: "d-toast--success",
164
+ warning: "d-toast--warning",
165
+ base: "d-toast--base"
166
+ }[this.kind];
167
+ },
168
+ noticeActionListeners() {
169
+ return {
170
+ ...this.$listeners,
171
+ close: (e) => {
172
+ this.isShown = !1, this.$emit("update:show", !1), this.$emit("close", e);
173
+ }
174
+ };
175
+ },
176
+ shouldSetTimeout() {
177
+ return !!this.duration && this.duration >= this.minDuration;
178
+ }
179
+ },
180
+ watch: {
181
+ show: {
182
+ handler: function(e) {
183
+ this.isShown = e, e ? this.setTimeout() : clearTimeout(this.displayTimer);
184
+ },
185
+ immediate: !0
186
+ }
187
+ },
188
+ destroyed() {
189
+ this.shouldSetTimeout && clearTimeout(this.displayTimer);
190
+ },
191
+ methods: {
192
+ setTimeout() {
193
+ this.shouldSetTimeout && (this.displayTimer = setTimeout(() => {
194
+ this.isShown = !1, this.$emit("update:show", !1);
195
+ }, this.duration));
196
+ }
197
+ }
198
+ };
199
+ var p = function() {
200
+ var t = this, i = t._self._c;
201
+ return t.isShown ? i("div", { class: [
202
+ "d-toast",
203
+ t.kindClass,
204
+ { "d-toast--important": t.important }
205
+ ], attrs: { "data-qa": "dt-toast", "aria-hidden": (!t.isShown).toString() } }, [i("div", { staticClass: "d-toast__dialog" }, [t.hideIcon ? t._e() : i("dt-notice-icon", t._g({ attrs: { kind: t.kind } }, t.$listeners), [t._t("icon")], 2), i("dt-notice-content", t._g({ attrs: { "title-id": t.titleId, "content-id": t.contentId, title: t.title, role: t.role }, scopedSlots: t._u([{ key: "titleOverride", fn: function() {
206
+ return [t._t("titleOverride")];
207
+ }, proxy: !0 }], null, !0) }, t.$listeners), [t._t("default", function() {
208
+ return [t._v(" " + t._s(t.message) + " ")];
209
+ })], 2), i("dt-notice-action", t._g({ attrs: { "hide-action": t.hideAction, "hide-close": t.hideClose, "close-button-props": t.closeButtonProps, "visually-hidden-close": t.visuallyHiddenClose, "visually-hidden-close-label": t.visuallyHiddenCloseLabel } }, t.noticeActionListeners), [t._t("action")], 2)], 1)]) : t._e();
210
+ }, h = [], f = /* @__PURE__ */ a(
211
+ m,
212
+ p,
213
+ h,
214
+ !1,
215
+ null,
216
+ null,
217
+ null,
218
+ null
219
+ );
220
+ const A = f.exports;
221
+ export {
222
+ A as DtToast,
223
+ o as TOAST_MIN_DURATION,
224
+ c as TOAST_ROLES
225
+ };
226
+ //# sourceMappingURL=toast.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toast.js","sources":["../../components/toast/toast_constants.js","../../components/toast/toast.vue"],"sourcesContent":["export const TOAST_ROLES = ['status', 'alert'];\nexport const TOAST_MIN_DURATION = 6000;\n\nexport default {\n TOAST_ROLES,\n TOAST_MIN_DURATION,\n};\n","<template>\n <div\n v-if=\"isShown\"\n :class=\"[\n 'd-toast',\n kindClass,\n { 'd-toast--important': important },\n ]\"\n data-qa=\"dt-toast\"\n :aria-hidden=\"(!isShown).toString()\"\n >\n <div class=\"d-toast__dialog\">\n <dt-notice-icon\n v-if=\"!hideIcon\"\n :kind=\"kind\"\n v-on=\"$listeners\"\n >\n <!-- @slot Slot for custom icon -->\n <slot name=\"icon\" />\n </dt-notice-icon>\n <dt-notice-content\n :title-id=\"titleId\"\n :content-id=\"contentId\"\n :title=\"title\"\n :role=\"role\"\n v-on=\"$listeners\"\n >\n <template #titleOverride>\n <!-- @slot Allows you to override the title, only use this if you need to override\n with something other than text. Otherwise use the \"title\" prop. -->\n <slot name=\"titleOverride\" />\n </template>\n <!-- @slot the main textual content of the toast -->\n <slot>\n {{ message }}\n </slot>\n </dt-notice-content>\n <dt-notice-action\n :hide-action=\"hideAction\"\n :hide-close=\"hideClose\"\n :close-button-props=\"closeButtonProps\"\n :visually-hidden-close=\"visuallyHiddenClose\"\n :visually-hidden-close-label=\"visuallyHiddenCloseLabel\"\n v-on=\"noticeActionListeners\"\n >\n <!-- @slot Enter a possible action for the user to take, such as a link to another page -->\n <slot name=\"action\" />\n </dt-notice-action>\n </div>\n </div>\n</template>\n\n<script>\nimport { DtNoticeIcon, DtNoticeContent, DtNoticeAction, NOTICE_KINDS } from '@/components/notice';\nimport utils from '@/common/utils';\nimport { TOAST_ROLES, TOAST_MIN_DURATION } from './toast_constants.js';\nimport SrOnlyCloseButtonMixin from '@/common/mixins/sr_only_close_button';\n\n/**\n * A toast notice, sometimes called a snackbar, is a time-based message that appears based on users' actions.\n * It contains at-a-glance information about outcomes and can be paired with actions.\n * @see https://dialtone.dialpad.com/components/toast.html\n */\nexport default {\n name: 'DtToast',\n\n components: {\n DtNoticeIcon,\n DtNoticeContent,\n DtNoticeAction,\n },\n\n mixins: [SrOnlyCloseButtonMixin],\n\n props: {\n /**\n * Sets an ID on the title element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the title.\n */\n titleId: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * Sets an ID on the content element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the content.\n */\n contentId: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * Title header of the toast. This can be left blank to remove the title from the toast entirely.\n */\n title: {\n type: String,\n default: '',\n },\n\n /**\n * Message of the toast. Overridden by default slot.\n */\n message: {\n type: String,\n default: '',\n },\n\n /**\n * Provides a role for the toast. 'status' is used by default to communicate a message. 'alert' is used to\n * communicate an important message like an error that does not contain any interactive elements.\n * @values status, alert\n */\n role: {\n type: String,\n default: 'status',\n validator: (role) => {\n return TOAST_ROLES.includes(role);\n },\n },\n\n /**\n * Severity level of the toast, sets the icon and background\n * @values base, error, info, success, warning\n */\n kind: {\n type: String,\n default: 'base',\n validator: (kind) => {\n return NOTICE_KINDS.includes(kind);\n },\n },\n\n /**\n * Used in scenarios where the message needs to visually dominate the screen.\n * @values true, false\n */\n important: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Controls whether the toast is shown. If a valid duration is provided, the toast will disappear\n * after reaching the duration time, so it's convenient to use `.sync` modifier with this prop to update\n * the data in your component.\n * Supports .sync modifier\n * @values true, false\n */\n show: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Props for the toast close button.\n */\n closeButtonProps: {\n type: Object,\n default: () => ({}),\n },\n\n /**\n * Hides the close button from the toast\n * @values true, false\n */\n hideClose: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Hides the icon from the notice\n * @values true, false\n */\n hideIcon: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Hides the action from the notice\n * @values true, false\n */\n hideAction: {\n type: Boolean,\n default: false,\n },\n\n /**\n * The duration in ms the toast will display before disappearing.\n * The toast won't disappear if the duration is not provided.\n * If it's provided, it should be equal to or greater than 6000.\n */\n duration: {\n type: Number,\n default: null,\n validator: (duration) => {\n return duration >= TOAST_MIN_DURATION;\n },\n },\n },\n\n emits: [\n /**\n * Close button click event\n *\n * @event close\n */\n 'close',\n\n /**\n * Sync show value\n *\n * @event update:show\n */\n 'update:show',\n ],\n\n data () {\n return {\n isShown: false,\n minDuration: TOAST_MIN_DURATION,\n };\n },\n\n computed: {\n kindClass () {\n const kindClasses = {\n error: 'd-toast--error',\n info: 'd-toast--info',\n success: 'd-toast--success',\n warning: 'd-toast--warning',\n base: 'd-toast--base',\n };\n\n return kindClasses[this.kind];\n },\n\n noticeActionListeners () {\n return {\n ...this.$listeners,\n\n close: event => {\n this.isShown = false;\n this.$emit('update:show', false);\n this.$emit('close', event);\n },\n };\n },\n\n shouldSetTimeout () {\n return !!this.duration && this.duration >= this.minDuration;\n },\n },\n\n watch: {\n show: {\n handler: function (show) {\n this.isShown = show;\n if (show) {\n this.setTimeout();\n } else {\n clearTimeout(this.displayTimer);\n }\n },\n\n immediate: true,\n },\n },\n\n destroyed () {\n if (this.shouldSetTimeout) {\n clearTimeout(this.displayTimer);\n }\n },\n\n methods: {\n setTimeout () {\n if (this.shouldSetTimeout) {\n this.displayTimer = setTimeout(() => {\n this.isShown = false;\n this.$emit('update:show', false);\n }, this.duration);\n }\n },\n },\n};\n</script>\n"],"names":["TOAST_ROLES","TOAST_MIN_DURATION","_sfc_main","DtNoticeIcon","DtNoticeContent","DtNoticeAction","SrOnlyCloseButtonMixin","utils","role","kind","NOTICE_KINDS","duration","event","show"],"mappings":";;;;;;;;;;;;;;AAAY,MAACA,IAAc,CAAC,UAAU,OAAO,GAChCC,IAAqB,KC8DlCC,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,cAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,gBAAAC;AAAA,EACA;AAAA,EAEA,QAAA,CAAAC,CAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,SAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,eAAAC,EAAA,gBAAA;AAAA,MAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,eAAAA,EAAA,gBAAA;AAAA,MAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,SAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,CAAAC,MACAR,EAAA,SAAAQ,CA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