@dialpad/dialtone-vue 2.125.0 → 2.125.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 (282) 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 +354 -10368
  39. package/dist/dialtone-vue.js.map +1 -1
  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 -12
  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 -14
  99. package/dist/lib/emoji-text-wrapper.js.map +1 -0
  100. package/dist/lib/emoji.js +11 -0
  101. package/dist/{emoji.js.map → lib/emoji.js.map} +1 -1
  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 -56
  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 -18
  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/skeleton/skeleton-list-item.vue.d.ts +1 -1
  227. package/dist/types/components/skeleton/skeleton-paragraph.vue.d.ts +3 -3
  228. package/dist/types/components/skeleton/skeleton-shape.vue.d.ts +2 -2
  229. package/dist/types/components/skeleton/skeleton-text.vue.d.ts +8 -3
  230. package/dist/types/components/skeleton/skeleton-text.vue.d.ts.map +1 -1
  231. package/dist/types/components/skeleton/skeleton.vue.d.ts +1 -1
  232. package/dist/types/components/toggle/toggle.vue.d.ts +1 -1
  233. package/dist/types/components/tooltip/tooltip.vue.d.ts +2 -2
  234. package/dist/types/index.d.ts +36 -29
  235. package/dist/types/recipes/buttons/callbar_button/callbar_button.vue.d.ts +1 -1
  236. package/dist/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts +2 -2
  237. package/dist/types/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.d.ts +1 -1
  238. package/dist/types/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.d.ts +2 -2
  239. package/package.json +18 -58
  240. package/CHANGELOG.json +0 -1
  241. package/CHANGELOG.md +0 -2904
  242. package/dist/dialtone-vue.cjs +0 -6
  243. package/dist/dialtone-vue.cjs.map +0 -1
  244. package/dist/directives.cjs +0 -2
  245. package/dist/directives.cjs.map +0 -1
  246. package/dist/directives.js.map +0 -1
  247. package/dist/emoji.cjs +0 -2
  248. package/dist/emoji.cjs.map +0 -1
  249. package/dist/emoji.js +0 -36
  250. package/dist/emoji_picker-kiTOKaq8.js.map +0 -1
  251. package/dist/emoji_picker-njWWAm6V.cjs +0 -2
  252. package/dist/emoji_picker-njWWAm6V.cjs.map +0 -1
  253. package/dist/emoji_text_wrapper-48ClwKvf.js.map +0 -1
  254. package/dist/emoji_text_wrapper-ZlynvHnd.cjs +0 -2
  255. package/dist/emoji_text_wrapper-ZlynvHnd.cjs.map +0 -1
  256. package/dist/index-OF94C6nQ.js +0 -142834
  257. package/dist/index-OF94C6nQ.js.map +0 -1
  258. package/dist/index-Wx7Jagcr.cjs +0 -2
  259. package/dist/index-Wx7Jagcr.cjs.map +0 -1
  260. package/dist/message_input.cjs +0 -2
  261. package/dist/message_input.cjs.map +0 -1
  262. package/dist/message_input.js.map +0 -1
  263. package/dist/rich_text_editor-RVMsCB8N.cjs +0 -98
  264. package/dist/rich_text_editor-RVMsCB8N.cjs.map +0 -1
  265. package/dist/rich_text_editor-eMvTs_Gp.js +0 -16479
  266. package/dist/rich_text_editor-eMvTs_Gp.js.map +0 -1
  267. package/dist/tooltip-88U5vFMA.js +0 -2517
  268. package/dist/tooltip-88U5vFMA.js.map +0 -1
  269. package/dist/tooltip-i2wxFIIi.cjs +0 -22
  270. package/dist/tooltip-i2wxFIIi.cjs.map +0 -1
  271. package/dist/types/common/constants.d.ts.map +0 -1
  272. package/dist/types/common/dates.d.ts.map +0 -1
  273. package/dist/types/common/utils.d.ts.map +0 -1
  274. package/dist/types/common/validators.d.ts.map +0 -1
  275. package/dist/types/components/emoji_picker/emojis/index.d.ts +0 -50
  276. package/dist/types/components/emoji_picker/emojis/index.d.ts.map +0 -1
  277. package/dist/types/directives.d.ts +0 -2
  278. package/dist/types/directives.d.ts.map +0 -1
  279. package/dist/types/emoji.d.ts +0 -5
  280. package/dist/types/emoji.d.ts.map +0 -1
  281. package/dist/types/message_input.d.ts +0 -3
  282. package/dist/types/message_input.d.ts.map +0 -1
@@ -0,0 +1,574 @@
1
+ import { n as s } from "../chunks/_plugin-vue2_normalizer-u6G_3nkj.js";
2
+ const f = 3e6, o = {
3
+ circle: "d-bar-circle",
4
+ square: "d-bar2"
5
+ }, c = [
6
+ "body",
7
+ "heading"
8
+ ], h = {
9
+ sm: "24px",
10
+ md: "32px",
11
+ lg: "48px"
12
+ }, r = {
13
+ sm: "d-h16",
14
+ md: "d-h24",
15
+ lg: "d-h32"
16
+ }, l = {
17
+ computed: {
18
+ skeletonOffset() {
19
+ const e = this.$refs.skeleton;
20
+ if (!e)
21
+ return this.offset;
22
+ const { top: t, height: a } = e.getBoundingClientRect();
23
+ return t + a / 2;
24
+ },
25
+ skeletonStyle() {
26
+ const e = {};
27
+ if (this.skeletonOffset === -1 || !this.animate && this.animationDuration === -1)
28
+ return e;
29
+ const t = this.skeletonOffset * f / 1e3, a = this.animationDuration === -1 ? 1e3 : this.animationDuration;
30
+ return e.animationDelay = `${t}ms`, e.animationDuration = `${a}ms`, e;
31
+ }
32
+ }
33
+ }, _ = {
34
+ name: "DtSkeletonShape",
35
+ mixins: [l],
36
+ props: {
37
+ /**
38
+ * Defines the shape of the skeleton, accepts circle or square.
39
+ * @values circle, square
40
+ */
41
+ shape: {
42
+ type: String,
43
+ default: "circle",
44
+ validator: (e) => Object.keys(o).includes(e)
45
+ },
46
+ /**
47
+ * Size of the shape
48
+ * @values xs, sm, md, lg, xl
49
+ */
50
+ size: {
51
+ type: String,
52
+ default: "md"
53
+ },
54
+ /**
55
+ * Duration time of the animation (ms), set -1 for an infinite animation.
56
+ */
57
+ animationDuration: {
58
+ type: Number,
59
+ default: -1
60
+ },
61
+ /**
62
+ * This property has higher priority than "option.animate"
63
+ * @values true, false
64
+ */
65
+ animate: {
66
+ type: Boolean,
67
+ default: !0
68
+ },
69
+ /**
70
+ * RippleDuration controls how long the delay is for the animation of a
71
+ * placeholder 1000 pixels from the top of the page. Each placeholder
72
+ * from the top down will have a delay duration from 0 to this offset.
73
+ * The delay of each placeholder animation is based on how far down the page
74
+ * the placeholder is rendered. This is a linear relationship. The unit
75
+ * is milliseconds.
76
+ */
77
+ offset: {
78
+ type: Number,
79
+ default: 1
80
+ },
81
+ /**
82
+ * Additional class name for the content.
83
+ */
84
+ contentClass: {
85
+ type: [String, Object, Array],
86
+ default: ""
87
+ }
88
+ },
89
+ data() {
90
+ return {
91
+ SKELETON_SHAPES: o
92
+ };
93
+ },
94
+ computed: {
95
+ shapeStyles() {
96
+ const e = h[this.size] || this.size;
97
+ return {
98
+ ...this.skeletonStyle,
99
+ "min-width": e,
100
+ "max-width": e,
101
+ "min-height": e,
102
+ "max-height": e
103
+ };
104
+ }
105
+ }
106
+ };
107
+ var y = function() {
108
+ var t = this, a = t._self._c;
109
+ return a("div", { ref: "skeleton", class: [
110
+ "skeleton-placeholder",
111
+ t.SKELETON_SHAPES[t.shape],
112
+ {
113
+ "skeleton-placeholder--animate": t.animate
114
+ },
115
+ t.contentClass
116
+ ], style: t.shapeStyles, attrs: { "data-qa": "skeleton-shape" } });
117
+ }, g = [], k = /* @__PURE__ */ s(
118
+ _,
119
+ y,
120
+ g,
121
+ !1,
122
+ null,
123
+ null,
124
+ null,
125
+ null
126
+ );
127
+ const d = k.exports, S = {
128
+ name: "DtSkeletonText",
129
+ mixins: [l],
130
+ props: {
131
+ /**
132
+ * Skeleton type
133
+ * @values body, heading
134
+ */
135
+ type: {
136
+ type: String,
137
+ default: "body",
138
+ validator: (e) => c.includes(e)
139
+ },
140
+ /**
141
+ * Heading height
142
+ * @values sm, md, lg
143
+ */
144
+ headingHeight: {
145
+ type: String,
146
+ default: "md",
147
+ validator: (e) => Object.keys(r).includes(e)
148
+ },
149
+ /**
150
+ * Width of the skeleton
151
+ */
152
+ width: {
153
+ type: String,
154
+ default: "100%"
155
+ },
156
+ /**
157
+ * Duration time of the animation (ms), set -1 for an infinite animation.
158
+ */
159
+ animationDuration: {
160
+ type: Number,
161
+ default: -1
162
+ },
163
+ /**
164
+ * This property has higher priority than "option.animate"
165
+ * @values true, false
166
+ */
167
+ animate: {
168
+ type: Boolean,
169
+ default: !1
170
+ },
171
+ /**
172
+ * RippleDuration controls how long the delay is for the animation of a
173
+ * placeholder 1000 pixels from the top of the page. Each placeholder
174
+ * from the top down will have a delay duration from 0 to this offset.
175
+ * The delay of each placeholder animation is based on how far down the page
176
+ * the placeholder is rendered. This is a linear relationship. The unit
177
+ * is milliseconds.
178
+ */
179
+ offset: {
180
+ type: Number,
181
+ default: 1
182
+ },
183
+ /**
184
+ * Additional class name for the content.
185
+ */
186
+ contentClass: {
187
+ type: String,
188
+ default: ""
189
+ }
190
+ },
191
+ data() {
192
+ return {
193
+ SKELETON_HEADING_HEIGHTS: r
194
+ };
195
+ }
196
+ };
197
+ var O = function() {
198
+ var t = this, a = t._self._c;
199
+ return t.type === "body" ? a("div", { ref: "skeleton", class: [
200
+ "d-skeleton-text",
201
+ "skeleton-placeholder",
202
+ {
203
+ "skeleton-placeholder--animate": t.animate
204
+ },
205
+ t.contentClass
206
+ ], style: {
207
+ width: t.width,
208
+ ...t.skeletonStyle
209
+ }, attrs: { "data-qa": "skeleton-text-body" } }) : t.type === "heading" ? a("div", { ref: "skeleton", class: [
210
+ t.SKELETON_HEADING_HEIGHTS[t.headingHeight],
211
+ "d-skeleton-text--heading",
212
+ "skeleton-placeholder",
213
+ {
214
+ "skeleton-placeholder--animate": t.animate
215
+ },
216
+ t.contentClass
217
+ ], style: {
218
+ width: t.width,
219
+ ...t.skeletonStyle
220
+ }, attrs: { "data-qa": "skeleton-text-heading" } }) : t._e();
221
+ }, v = [], b = /* @__PURE__ */ s(
222
+ S,
223
+ O,
224
+ v,
225
+ !1,
226
+ null,
227
+ null,
228
+ null,
229
+ null
230
+ );
231
+ const p = b.exports, i = (e) => e !== "" && !Number.isNaN(Number(e)), x = {
232
+ name: "DtSkeletonParagraph",
233
+ components: {
234
+ DtSkeletonText: p
235
+ },
236
+ props: {
237
+ /**
238
+ * Quantity of rows to display
239
+ */
240
+ rows: {
241
+ type: [Number, String],
242
+ default: 3,
243
+ validator: i
244
+ },
245
+ /**
246
+ * This property has higher priority than "option.animate"
247
+ * @values true, false
248
+ */
249
+ animate: {
250
+ type: Boolean,
251
+ default: !0
252
+ },
253
+ /**
254
+ * Controls the min width of paragraphs
255
+ */
256
+ minWidth: {
257
+ type: [Number, String],
258
+ default: 30,
259
+ validator: i
260
+ },
261
+ /**
262
+ * Controls the max width of paragraphs
263
+ */
264
+ maxWidth: {
265
+ type: [Number, String],
266
+ default: 100,
267
+ validator: i
268
+ },
269
+ /**
270
+ * Controls the width of paragraphs
271
+ */
272
+ width: {
273
+ type: [String, Array],
274
+ default: null
275
+ },
276
+ /**
277
+ * If true, row widths will be random
278
+ * @values true, false
279
+ */
280
+ randomWidth: {
281
+ type: Boolean,
282
+ default: !1
283
+ },
284
+ /**
285
+ * RippleDuration controls how long the delay is for the animation of a
286
+ * placeholder 1000 pixels from the top of the page. Each placeholder
287
+ * from the top down will have a delay duration from 0 to this offset.
288
+ * The delay of each placeholder animation is based on how far down the page
289
+ * the placeholder is rendered. This is a linear relationship. The unit
290
+ * is milliseconds.
291
+ */
292
+ offset: {
293
+ type: Number,
294
+ default: 1
295
+ },
296
+ /**
297
+ * Duration time of the animation (ms), set -1 for an infinite animation.
298
+ */
299
+ animationDuration: {
300
+ type: Number,
301
+ default: -1
302
+ },
303
+ /**
304
+ * Additional class name for the content.
305
+ */
306
+ contentClass: {
307
+ type: String,
308
+ default: ""
309
+ },
310
+ /**
311
+ * Additional class name for the row.
312
+ */
313
+ rowClass: {
314
+ type: String,
315
+ default: ""
316
+ }
317
+ },
318
+ computed: {
319
+ integerRows() {
320
+ return Number(this.rows);
321
+ }
322
+ },
323
+ methods: {
324
+ randomWidthPercentage() {
325
+ const e = Math.min(this.minWidth, this.maxWidth), t = Math.max(this.minWidth, this.maxWidth);
326
+ return `${Math.round(Math.random() * (t - e)) + e}%`;
327
+ },
328
+ getSizeParagraphRow(e) {
329
+ const t = this.width, a = Array.isArray(t), n = t == null ? void 0 : t[e - 1], m = e === this.rows;
330
+ return this.randomWidth ? this.randomWidthPercentage() : t && !a ? t : t && a && n ? n : m ? "38%" : "100%";
331
+ }
332
+ }
333
+ };
334
+ var D = function() {
335
+ var t = this, a = t._self._c;
336
+ return a("div", { class: [
337
+ "d-skeleton-paragraph",
338
+ t.contentClass
339
+ ], attrs: { contentClass: "", "data-qa": "skeleton-paragraph" } }, t._l(t.integerRows, function(n) {
340
+ return a("dt-skeleton-text", { key: n, attrs: { "data-qa": "skeleton-paragraph-row", "content-class": t.rowClass, animate: t.animate, offset: t.offset, "animation-duration": t.animationDuration, width: t.getSizeParagraphRow(n) } });
341
+ }), 1);
342
+ }, N = [], E = /* @__PURE__ */ s(
343
+ x,
344
+ D,
345
+ N,
346
+ !1,
347
+ null,
348
+ null,
349
+ null,
350
+ null
351
+ );
352
+ const u = E.exports, w = {
353
+ name: "DtSkeletonListItem",
354
+ components: {
355
+ DtSkeletonShape: d,
356
+ DtSkeletonParagraph: u
357
+ },
358
+ props: {
359
+ /**
360
+ * Defines the shape of the skeleton, accepts circle or square.
361
+ * @values circle, square
362
+ */
363
+ shape: {
364
+ type: String,
365
+ default: "circle",
366
+ validator: (e) => Object.keys(o).includes(e)
367
+ },
368
+ /**
369
+ * Size of the shape
370
+ * @values xs, sm, md, lg, xl
371
+ */
372
+ shapeSize: {
373
+ type: String,
374
+ default: "md"
375
+ },
376
+ /**
377
+ * Object containing quantity of paragraphs to display
378
+ * and a randomWidth boolean.
379
+ */
380
+ paragraphs: {
381
+ type: Object,
382
+ default: () => ({ rows: 3, randomWidth: !0 })
383
+ },
384
+ /**
385
+ * Duration time of the animation (ms), set -1 for an infinite animation.
386
+ */
387
+ animationDuration: {
388
+ type: Number,
389
+ default: -1
390
+ },
391
+ /**
392
+ * This property has higher priority than "option.animate"
393
+ * @values true, false
394
+ */
395
+ animate: {
396
+ type: Boolean,
397
+ default: !0
398
+ },
399
+ /**
400
+ * RippleDuration controls how long the delay is for the animation of a
401
+ * placeholder 1000 pixels from the top of the page. Each placeholder
402
+ * from the top down will have a delay duration from 0 to this offset.
403
+ * The delay of each placeholder animation is based on how far down the page
404
+ * the placeholder is rendered. This is a linear relationship. The unit
405
+ * is milliseconds.
406
+ */
407
+ offset: {
408
+ type: Number,
409
+ default: 1
410
+ },
411
+ /**
412
+ * Additional class name for the shape.
413
+ */
414
+ shapeClass: {
415
+ type: String,
416
+ default: ""
417
+ },
418
+ /**
419
+ * Additional class name for the content.
420
+ */
421
+ contentClass: {
422
+ type: String,
423
+ default: ""
424
+ }
425
+ }
426
+ };
427
+ var $ = function() {
428
+ var t = this, a = t._self._c;
429
+ return a("div", { class: [
430
+ "d-skeleton-list-item",
431
+ {
432
+ "d-skeleton-list-item--single": t.paragraphs.rows === 1
433
+ },
434
+ t.contentClass
435
+ ], attrs: { "data-qa": "skeleton-list-item" } }, [a("dt-skeleton-shape", { staticClass: "d-skeleton-list-item__shape", attrs: { size: t.shapeSize, shape: t.shape, "animation-duration": t.animationDuration, animate: t.animate, offset: t.offset, "content-class": t.shapeClass } }), a("div", { staticClass: "d-skeleton-list-item__paragraph-container" }, [a("dt-skeleton-paragraph", t._b({ attrs: { "animation-duration": t.animationDuration, animate: t.animate, offset: t.offset } }, "dt-skeleton-paragraph", t.paragraphs, !1))], 1)], 1);
436
+ }, C = [], T = /* @__PURE__ */ s(
437
+ w,
438
+ $,
439
+ C,
440
+ !1,
441
+ null,
442
+ null,
443
+ null,
444
+ null
445
+ );
446
+ const I = T.exports, L = {
447
+ name: "DtSkeleton",
448
+ components: {
449
+ DtSkeletonText: p,
450
+ DtSkeletonShape: d,
451
+ DtSkeletonListItem: I,
452
+ DtSkeletonParagraph: u
453
+ },
454
+ props: {
455
+ /**
456
+ * Set this prop to have the skeleton render as multiple lines of text.
457
+ * Set only one option prop at a time.
458
+ */
459
+ paragraphOption: {
460
+ type: [Object, Boolean],
461
+ default: null
462
+ },
463
+ /**
464
+ * Set this prop to have the skeleton render as a list item with an avatar and wrapping text.
465
+ * Set only one option prop at a time.
466
+ */
467
+ listItemOption: {
468
+ type: [Object, Boolean],
469
+ default: null
470
+ },
471
+ /**
472
+ * Set this prop to have the skeleton render as a single line of text.
473
+ * Set only one option prop at a time.
474
+ */
475
+ textOption: {
476
+ type: Object,
477
+ default: null
478
+ },
479
+ /**
480
+ * Set this prop to have the skeleton render as a specific shape.
481
+ * Set only one option prop at a time.
482
+ */
483
+ shapeOption: {
484
+ type: [Object, Boolean],
485
+ default: null
486
+ },
487
+ /**
488
+ * Duration time of the animation (ms), set -1 for an infinite animation.
489
+ */
490
+ animationDuration: {
491
+ type: Number,
492
+ default: -1
493
+ },
494
+ /**
495
+ * Descriptive label for the content.
496
+ */
497
+ ariaLabel: {
498
+ type: String,
499
+ default: ""
500
+ },
501
+ /**
502
+ * This property has higher priority than "option.animate"
503
+ * @values true, false
504
+ */
505
+ animate: {
506
+ type: Boolean,
507
+ default: !0
508
+ },
509
+ /**
510
+ * RippleDuration controls how long the delay is for the animation of a
511
+ * placeholder 1000 pixels from the top of the page. Each placeholder
512
+ * from the top down will have a delay duration from 0 to this offset.
513
+ * The delay of each placeholder animation is based on how far down the page
514
+ * the placeholder is rendered. This is a linear relationship. The unit
515
+ * is milliseconds.
516
+ */
517
+ offset: {
518
+ type: Number,
519
+ default: 1
520
+ }
521
+ },
522
+ computed: {
523
+ validationOptions() {
524
+ return {
525
+ paragraphOption: this.paragraphOption,
526
+ listItemOption: this.listItemOption,
527
+ textOption: this.textOption,
528
+ shapeOption: this.shapeOption
529
+ };
530
+ }
531
+ },
532
+ watch: {
533
+ $props: {
534
+ immediate: !0,
535
+ handler: "validator"
536
+ }
537
+ },
538
+ methods: {
539
+ validator() {
540
+ const e = Object.entries(this.validationOptions).filter(([t, a]) => a);
541
+ if (e.length >= 2) {
542
+ const t = `Use only one of ${e.map(([a]) => a).join(" | ")} options at the same time`;
543
+ console.error(t);
544
+ }
545
+ }
546
+ }
547
+ };
548
+ var R = function() {
549
+ var t = this, a = t._self._c;
550
+ return a("div", { attrs: { "aria-busy": "true", role: "status", "aria-label": t.ariaLabel } }, [t.listItemOption ? a("dt-skeleton-list-item", t._b({ attrs: { "animation-duration": t.animationDuration, animate: t.animate, offset: t.offset } }, "dt-skeleton-list-item", t.listItemOption === !0 ? {} : t.listItemOption, !1)) : t.shapeOption ? a("dt-skeleton-shape", t._b({ attrs: { "animation-duration": t.animationDuration, animate: t.animate, offset: t.offset } }, "dt-skeleton-shape", t.shapeOption === !0 ? {} : t.shapeOption, !1)) : t.paragraphOption ? a("dt-skeleton-paragraph", t._b({ attrs: { "animation-duration": t.animationDuration, animate: t.animate, offset: t.offset } }, "dt-skeleton-paragraph", t.paragraphOption === !0 ? {} : t.paragraphOption, !1)) : a("dt-skeleton-text", t._b({ attrs: { "animation-duration": t.animationDuration, animate: t.animate, offset: t.offset } }, "dt-skeleton-text", t.textOption || {}, !1))], 1);
551
+ }, A = [], P = /* @__PURE__ */ s(
552
+ L,
553
+ R,
554
+ A,
555
+ !1,
556
+ null,
557
+ null,
558
+ null,
559
+ null
560
+ );
561
+ const j = P.exports;
562
+ export {
563
+ j as DtSkeleton,
564
+ I as DtSkeletonListItem,
565
+ u as DtSkeletonParagraph,
566
+ d as DtSkeletonShape,
567
+ p as DtSkeletonText,
568
+ r as SKELETON_HEADING_HEIGHTS,
569
+ f as SKELETON_RIPPLE_DURATION,
570
+ o as SKELETON_SHAPES,
571
+ h as SKELETON_SHAPE_SIZES,
572
+ c as SKELETON_TEXT_TYPES
573
+ };
574
+ //# sourceMappingURL=skeleton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skeleton.js","sources":["../../components/skeleton/skeleton_constants.js","../../common/mixins/skeleton.js","../../components/skeleton/skeleton-shape.vue","../../components/skeleton/skeleton-text.vue","../../components/skeleton/skeleton-paragraph.vue","../../components/skeleton/skeleton-list-item.vue","../../components/skeleton/skeleton.vue"],"sourcesContent":["// NOTE: RippleDuration controls how long the delay is for the animation\n// of a skeleton 1000 pixels from the top of the page. Each skeleton\n// from the top down will have a delay duration from 0 to this offset.\n// The delay of each skeleton animation is based on how far down the page\n// the skeleton is rendered. This is a linear relationship. The unit\n// is miliseconds.\nexport const SKELETON_RIPPLE_DURATION = 3000000;\n\nexport const SKELETON_SHAPES = {\n circle: 'd-bar-circle',\n square: 'd-bar2',\n};\n\nexport const SKELETON_TEXT_TYPES = [\n 'body',\n 'heading',\n];\n\nexport const SKELETON_SHAPE_SIZES = {\n sm: '24px',\n md: '32px',\n lg: '48px',\n};\n\nexport const SKELETON_HEADING_HEIGHTS = {\n sm: 'd-h16',\n md: 'd-h24',\n lg: 'd-h32',\n};\n\nexport default {\n SKELETON_RIPPLE_DURATION,\n SKELETON_SHAPES,\n SKELETON_TEXT_TYPES,\n SKELETON_HEADING_HEIGHTS,\n};\n","import { SKELETON_RIPPLE_DURATION } from '@/components/skeleton/skeleton_constants';\n\n/**\n * @displayName Skeleton Animation Mixin\n */\nexport default {\n computed: {\n skeletonOffset () {\n const skeletonText = this.$refs.skeleton;\n if (!skeletonText) { return this.offset; }\n const { top, height } = skeletonText.getBoundingClientRect();\n return top + (height / 2);\n },\n\n skeletonStyle () {\n const style = {};\n\n if (this.skeletonOffset === -1 || (!this.animate && this.animationDuration === -1)) {\n return style;\n }\n const animationDelay = this.skeletonOffset * SKELETON_RIPPLE_DURATION / 1000;\n const animationDuration = this.animationDuration === -1 ? 1000 : this.animationDuration;\n style.animationDelay = `${animationDelay}ms`;\n style.animationDuration = `${animationDuration}ms`;\n return style;\n },\n },\n};\n","<template>\n <div\n ref=\"skeleton\"\n data-qa=\"skeleton-shape\"\n :class=\"[\n 'skeleton-placeholder',\n SKELETON_SHAPES[shape],\n {\n 'skeleton-placeholder--animate': animate,\n },\n contentClass,\n ]\"\n :style=\"shapeStyles\"\n />\n</template>\n\n<script>\nimport SkeletonAnimation from '@/common/mixins/skeleton';\nimport {\n SKELETON_SHAPES,\n SKELETON_SHAPE_SIZES,\n} from './skeleton_constants';\n\nexport default {\n name: 'DtSkeletonShape',\n\n mixins: [SkeletonAnimation],\n\n props: {\n /**\n * Defines the shape of the skeleton, accepts circle or square.\n * @values circle, square\n */\n shape: {\n type: String,\n default: 'circle',\n validator: shape => Object.keys(SKELETON_SHAPES).includes(shape),\n },\n\n /**\n * Size of the shape\n * @values xs, sm, md, lg, xl\n */\n size: {\n type: String,\n default: 'md',\n },\n\n /**\n * Duration time of the animation (ms), set -1 for an infinite animation.\n */\n animationDuration: {\n type: Number,\n default: -1,\n },\n\n /**\n * This property has higher priority than \"option.animate\"\n * @values true, false\n */\n animate: {\n type: Boolean,\n default: true,\n },\n\n /**\n * RippleDuration controls how long the delay is for the animation of a\n * placeholder 1000 pixels from the top of the page. Each placeholder\n * from the top down will have a delay duration from 0 to this offset.\n * The delay of each placeholder animation is based on how far down the page\n * the placeholder is rendered. This is a linear relationship. The unit\n * is milliseconds.\n */\n offset: {\n type: Number,\n default: 1,\n },\n\n /**\n * Additional class name for the content.\n */\n contentClass: {\n type: [String, Object, Array],\n default: '',\n },\n },\n\n data () {\n return {\n SKELETON_SHAPES,\n };\n },\n\n computed: {\n shapeStyles () {\n const size = SKELETON_SHAPE_SIZES[this.size] || this.size;\n return {\n ...this.skeletonStyle,\n 'min-width': size,\n 'max-width': size,\n 'min-height': size,\n 'max-height': size,\n };\n },\n },\n};\n</script>\n","<template>\n <div\n v-if=\"type === 'body'\"\n ref=\"skeleton\"\n data-qa=\"skeleton-text-body\"\n :class=\"[\n 'd-skeleton-text',\n 'skeleton-placeholder',\n {\n 'skeleton-placeholder--animate': animate,\n },\n contentClass,\n ]\"\n :style=\"{\n width,\n ...skeletonStyle,\n }\"\n />\n <div\n v-else-if=\"type === 'heading'\"\n ref=\"skeleton\"\n data-qa=\"skeleton-text-heading\"\n :class=\"[\n SKELETON_HEADING_HEIGHTS[headingHeight],\n 'd-skeleton-text--heading',\n 'skeleton-placeholder',\n {\n 'skeleton-placeholder--animate': animate,\n },\n contentClass,\n ]\"\n :style=\"{\n width,\n ...skeletonStyle,\n }\"\n />\n</template>\n\n<script>\nimport { SKELETON_HEADING_HEIGHTS, SKELETON_TEXT_TYPES } from './skeleton_constants';\nimport SkeletonAnimation from '@/common/mixins/skeleton';\n\nexport default {\n name: 'DtSkeletonText',\n\n mixins: [SkeletonAnimation],\n\n props: {\n /**\n * Skeleton type\n * @values body, heading\n */\n type: {\n type: String,\n default: 'body',\n validator: type => SKELETON_TEXT_TYPES.includes(type),\n },\n\n /**\n * Heading height\n * @values sm, md, lg\n */\n headingHeight: {\n type: String,\n default: 'md',\n validator: headingHeight => Object.keys(SKELETON_HEADING_HEIGHTS).includes(headingHeight),\n },\n\n /**\n * Width of the skeleton\n */\n width: {\n type: String,\n default: '100%',\n },\n\n /**\n * Duration time of the animation (ms), set -1 for an infinite animation.\n */\n animationDuration: {\n type: Number,\n default: -1,\n },\n\n /**\n * This property has higher priority than \"option.animate\"\n * @values true, false\n */\n animate: {\n type: Boolean,\n default: false,\n },\n\n /**\n * RippleDuration controls how long the delay is for the animation of a\n * placeholder 1000 pixels from the top of the page. Each placeholder\n * from the top down will have a delay duration from 0 to this offset.\n * The delay of each placeholder animation is based on how far down the page\n * the placeholder is rendered. This is a linear relationship. The unit\n * is milliseconds.\n */\n offset: {\n type: Number,\n default: 1,\n },\n\n /**\n * Additional class name for the content.\n */\n contentClass: {\n type: String,\n default: '',\n },\n },\n\n data () {\n return {\n SKELETON_HEADING_HEIGHTS,\n };\n },\n};\n</script>\n","<template>\n <div\n :class=\"[\n 'd-skeleton-paragraph',\n contentClass,\n ]\"\n contentClass\n data-qa=\"skeleton-paragraph\"\n >\n <dt-skeleton-text\n v-for=\"row in integerRows\"\n :key=\"row\"\n data-qa=\"skeleton-paragraph-row\"\n :content-class=\"rowClass\"\n :animate=\"animate\"\n :offset=\"offset\"\n :animation-duration=\"animationDuration\"\n :width=\"getSizeParagraphRow(row)\"\n />\n </div>\n</template>\n\n<script>\nimport DtSkeletonText from './skeleton-text.vue';\n\nconst validator = number => number !== '' && !Number.isNaN(Number(number));\nexport default {\n name: 'DtSkeletonParagraph',\n components: {\n DtSkeletonText,\n },\n\n props: {\n /**\n * Quantity of rows to display\n */\n rows: {\n type: [Number, String],\n default: 3,\n validator,\n },\n\n /**\n * This property has higher priority than \"option.animate\"\n * @values true, false\n */\n animate: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Controls the min width of paragraphs\n */\n minWidth: {\n type: [Number, String],\n default: 30,\n validator,\n },\n\n /**\n * Controls the max width of paragraphs\n */\n maxWidth: {\n type: [Number, String],\n default: 100,\n validator,\n },\n\n /**\n * Controls the width of paragraphs\n */\n width: {\n type: [String, Array],\n default: null,\n },\n\n /**\n * If true, row widths will be random\n * @values true, false\n */\n randomWidth: {\n type: Boolean,\n default: false,\n },\n\n /**\n * RippleDuration controls how long the delay is for the animation of a\n * placeholder 1000 pixels from the top of the page. Each placeholder\n * from the top down will have a delay duration from 0 to this offset.\n * The delay of each placeholder animation is based on how far down the page\n * the placeholder is rendered. This is a linear relationship. The unit\n * is milliseconds.\n */\n offset: {\n type: Number,\n default: 1,\n },\n\n /**\n * Duration time of the animation (ms), set -1 for an infinite animation.\n */\n animationDuration: {\n type: Number,\n default: -1,\n },\n\n /**\n * Additional class name for the content.\n */\n contentClass: {\n type: String,\n default: '',\n },\n\n /**\n * Additional class name for the row.\n */\n rowClass: {\n type: String,\n default: '',\n },\n },\n\n computed: {\n integerRows () {\n return Number(this.rows);\n },\n },\n\n methods: {\n randomWidthPercentage () {\n const min = Math.min(this.minWidth, this.maxWidth);\n const max = Math.max(this.minWidth, this.maxWidth);\n return `${Math.round(Math.random() * (max - min)) + min}%`;\n },\n\n getSizeParagraphRow (row) {\n const paragraphWidth = this.width;\n const isArrayWidth = Array.isArray(paragraphWidth);\n const currentWidth = paragraphWidth?.[row - 1];\n const isLastRow = row === this.rows;\n\n if (this.randomWidth) {\n return this.randomWidthPercentage();\n }\n\n if (paragraphWidth && !isArrayWidth) {\n return paragraphWidth;\n }\n\n if (paragraphWidth && isArrayWidth && currentWidth) {\n return currentWidth;\n }\n\n return isLastRow ? '38%' : '100%';\n },\n },\n};\n</script>\n","<template>\n <div\n data-qa=\"skeleton-list-item\"\n :class=\"[\n 'd-skeleton-list-item',\n {\n 'd-skeleton-list-item--single': paragraphs.rows === 1,\n },\n contentClass,\n ]\"\n >\n <dt-skeleton-shape\n class=\"d-skeleton-list-item__shape\"\n :size=\"shapeSize\"\n :shape=\"shape\"\n :animation-duration=\"animationDuration\"\n :animate=\"animate\"\n :offset=\"offset\"\n :content-class=\"shapeClass\"\n />\n <div class=\"d-skeleton-list-item__paragraph-container\">\n <dt-skeleton-paragraph\n v-bind=\"paragraphs\"\n :animation-duration=\"animationDuration\"\n :animate=\"animate\"\n :offset=\"offset\"\n />\n </div>\n </div>\n</template>\n\n<script>\nimport { SKELETON_SHAPES } from './skeleton_constants';\nimport DtSkeletonShape from './skeleton-shape.vue';\nimport DtSkeletonParagraph from './skeleton-paragraph.vue';\n\nexport default {\n name: 'DtSkeletonListItem',\n\n components: {\n DtSkeletonShape,\n DtSkeletonParagraph,\n },\n\n props: {\n /**\n * Defines the shape of the skeleton, accepts circle or square.\n * @values circle, square\n */\n shape: {\n type: String,\n default: 'circle',\n validator: shape => Object.keys(SKELETON_SHAPES).includes(shape),\n },\n\n /**\n * Size of the shape\n * @values xs, sm, md, lg, xl\n */\n shapeSize: {\n type: String,\n default: 'md',\n },\n\n /**\n * Object containing quantity of paragraphs to display\n * and a randomWidth boolean.\n */\n paragraphs: {\n type: Object,\n default: () => ({ rows: 3, randomWidth: true }),\n },\n\n /**\n * Duration time of the animation (ms), set -1 for an infinite animation.\n */\n animationDuration: {\n type: Number,\n default: -1,\n },\n\n /**\n * This property has higher priority than \"option.animate\"\n * @values true, false\n */\n animate: {\n type: Boolean,\n default: true,\n },\n\n /**\n * RippleDuration controls how long the delay is for the animation of a\n * placeholder 1000 pixels from the top of the page. Each placeholder\n * from the top down will have a delay duration from 0 to this offset.\n * The delay of each placeholder animation is based on how far down the page\n * the placeholder is rendered. This is a linear relationship. The unit\n * is milliseconds.\n */\n offset: {\n type: Number,\n default: 1,\n },\n\n /**\n * Additional class name for the shape.\n */\n shapeClass: {\n type: String,\n default: '',\n },\n\n /**\n * Additional class name for the content.\n */\n contentClass: {\n type: String,\n default: '',\n },\n },\n};\n</script>\n","<template>\n <div\n aria-busy=\"true\"\n role=\"status\"\n :aria-label=\"ariaLabel\"\n >\n <dt-skeleton-list-item\n v-if=\"listItemOption\"\n v-bind=\"listItemOption === true ? {} : listItemOption\"\n :animation-duration=\"animationDuration\"\n :animate=\"animate\"\n :offset=\"offset\"\n />\n <dt-skeleton-shape\n v-else-if=\"shapeOption\"\n v-bind=\"shapeOption === true ? {} : shapeOption\"\n :animation-duration=\"animationDuration\"\n :animate=\"animate\"\n :offset=\"offset\"\n />\n <dt-skeleton-paragraph\n v-else-if=\"paragraphOption\"\n v-bind=\"paragraphOption === true ? {} : paragraphOption\"\n :animation-duration=\"animationDuration\"\n :animate=\"animate\"\n :offset=\"offset\"\n />\n <dt-skeleton-text\n v-else\n v-bind=\"textOption || {}\"\n :animation-duration=\"animationDuration\"\n :animate=\"animate\"\n :offset=\"offset\"\n />\n </div>\n</template>\n\n<script>\nimport DtSkeletonShape from './skeleton-shape.vue';\nimport DtSkeletonListItem from './skeleton-list-item.vue';\nimport DtSkeletonParagraph from './skeleton-paragraph.vue';\nimport DtSkeletonText from './skeleton-text.vue';\n\n/**\n * Skeleton loader is a non-interactive placeholder that displays a preview of the UI to visually communicate\n * that content is in the process of loading. Skeleton is used to provide a low fidelity\n * representation of the user interface (UI) before content appears on the page.\n * @see https://dialtone.dialpad.com/components/skeleton.html\n */\nexport default {\n name: 'DtSkeleton',\n components: {\n DtSkeletonText,\n DtSkeletonShape,\n DtSkeletonListItem,\n DtSkeletonParagraph,\n },\n\n props: {\n /**\n * Set this prop to have the skeleton render as multiple lines of text.\n * Set only one option prop at a time.\n */\n paragraphOption: {\n type: [Object, Boolean],\n default: null,\n },\n\n /**\n * Set this prop to have the skeleton render as a list item with an avatar and wrapping text.\n * Set only one option prop at a time.\n */\n listItemOption: {\n type: [Object, Boolean],\n default: null,\n },\n\n /**\n * Set this prop to have the skeleton render as a single line of text.\n * Set only one option prop at a time.\n */\n textOption: {\n type: Object,\n default: null,\n },\n\n /**\n * Set this prop to have the skeleton render as a specific shape.\n * Set only one option prop at a time.\n */\n shapeOption: {\n type: [Object, Boolean],\n default: null,\n },\n\n /**\n * Duration time of the animation (ms), set -1 for an infinite animation.\n */\n animationDuration: {\n type: Number,\n default: -1,\n },\n\n /**\n * Descriptive label for the content.\n */\n ariaLabel: {\n type: String,\n default: '',\n },\n\n /**\n * This property has higher priority than \"option.animate\"\n * @values true, false\n */\n animate: {\n type: Boolean,\n default: true,\n },\n\n /**\n * RippleDuration controls how long the delay is for the animation of a\n * placeholder 1000 pixels from the top of the page. Each placeholder\n * from the top down will have a delay duration from 0 to this offset.\n * The delay of each placeholder animation is based on how far down the page\n * the placeholder is rendered. This is a linear relationship. The unit\n * is milliseconds.\n */\n offset: {\n type: Number,\n default: 1,\n },\n },\n\n computed: {\n validationOptions () {\n return {\n paragraphOption: this.paragraphOption,\n listItemOption: this.listItemOption,\n textOption: this.textOption,\n shapeOption: this.shapeOption,\n };\n },\n },\n\n watch: {\n $props: {\n immediate: true,\n handler: 'validator',\n },\n },\n\n methods: {\n validator () {\n const filtered = Object.entries(this.validationOptions)\n .filter(([_, option]) => option);\n if (filtered.length >= 2) {\n const errorMessage = `Use only one of ${filtered.map(([key]) => key).join(' | ')} options at the same time`;\n console.error(errorMessage);\n }\n },\n },\n};\n</script>\n\n<style lang=\"less\">\n// The --placeholder-from-color and --placeholder-to-color\n// custom properties can be set on the parent class of the\n// placeholder to control the animation colors.\n.skeleton-placeholder {\n display: flex;\n stroke: none;\n fill: var(--placeholder-from-color, var(--dt-color-black-300));\n background: var(--placeholder-from-color, var(--dt-color-black-300));\n\n &--animate {\n animation-name: placeholder-throb;\n animation-iteration-count: infinite;\n }\n}\n\n// the animation is used by the skeleton component\n@keyframes placeholder-throb {\n 10% {\n fill: var(--placeholder-from-color, var(--dt-color-black-300));\n background: var(--placeholder-from-color, var(--dt-color-black-300));\n }\n 50% {\n fill: var(--placeholder-to-color, var(--dt-color-black-100));\n background: var(--placeholder-to-color, var(--dt-color-black-100));\n }\n 90% {\n fill: var(--placeholder-from-color, var(--dt-color-black-300));\n background: var(--placeholder-from-color, var(--dt-color-black-300));\n }\n}\n</style>\n"],"names":["SKELETON_RIPPLE_DURATION","SKELETON_SHAPES","SKELETON_TEXT_TYPES","SKELETON_SHAPE_SIZES","SKELETON_HEADING_HEIGHTS","SkeletonAnimation","skeletonText","top","height","style","animationDelay","animationDuration","_sfc_main","shape","size","type","headingHeight","validator","number","DtSkeletonText","min","max","row","paragraphWidth","isArrayWidth","currentWidth","isLastRow","DtSkeletonShape","DtSkeletonParagraph","DtSkeletonListItem","filtered","_","option","errorMessage","key"],"mappings":";AAMY,MAACA,IAA2B,KAE3BC,IAAkB;AAAA,EAC7B,QAAQ;AAAA,EACR,QAAQ;AACV,GAEaC,IAAsB;AAAA,EACjC;AAAA,EACA;AACF,GAEaC,IAAuB;AAAA,EAClC,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN,GAEaC,IAA2B;AAAA,EACtC,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN,GCvBeC,IAAA;AAAA,EACb,UAAU;AAAA,IACR,iBAAkB;AAChB,YAAMC,IAAe,KAAK,MAAM;AAChC,UAAI,CAACA;AAAgB,eAAO,KAAK;AACjC,YAAM,EAAE,KAAAC,GAAK,QAAAC,EAAQ,IAAGF,EAAa,sBAAqB;AAC1D,aAAOC,IAAOC,IAAS;AAAA,IACxB;AAAA,IAED,gBAAiB;AACf,YAAMC,IAAQ,CAAA;AAEd,UAAI,KAAK,mBAAmB,MAAO,CAAC,KAAK,WAAW,KAAK,sBAAsB;AAC7E,eAAOA;AAET,YAAMC,IAAiB,KAAK,iBAAiBV,IAA2B,KAClEW,IAAoB,KAAK,sBAAsB,KAAK,MAAO,KAAK;AACtE,aAAAF,EAAM,iBAAiB,GAAGC,CAAc,MACxCD,EAAM,oBAAoB,GAAGE,CAAiB,MACvCF;AAAA,IACR;AAAA,EACF;AACH,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