@carbon/web-components 2.0.0-beta.0 → 2.0.0-beta.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 (567) hide show
  1. package/custom-elements.json +5128 -3232
  2. package/es/components/breadcrumb/breadcrumb-skeleton.d.ts.map +1 -1
  3. package/es/components/breadcrumb/breadcrumb-skeleton.js.map +1 -1
  4. package/es/components/button/button-set.d.ts +2 -2
  5. package/es/components/button/button-set.d.ts.map +1 -1
  6. package/es/components/button/button-set.js +4 -4
  7. package/es/components/button/button-set.js.map +1 -1
  8. package/es/components/button/button-skeleton.d.ts +3 -3
  9. package/es/components/button/button-skeleton.d.ts.map +1 -1
  10. package/es/components/button/button-skeleton.js +6 -6
  11. package/es/components/button/button-skeleton.js.map +1 -1
  12. package/es/components/button/button.css.js +1 -1
  13. package/es/components/button/button.d.ts +5 -5
  14. package/es/components/button/button.d.ts.map +1 -1
  15. package/es/components/button/button.js +6 -6
  16. package/es/components/button/button.js.map +1 -1
  17. package/es/components/button/button.rtl.css.js +1 -1
  18. package/es/components/{tooltip/tooltip-footer.d.ts → checkbox/checkbox-skeleton.d.ts} +4 -4
  19. package/es/components/checkbox/checkbox-skeleton.d.ts.map +1 -0
  20. package/es/components/{tooltip/tooltip-footer.js → checkbox/checkbox-skeleton.js} +15 -9
  21. package/es/components/checkbox/checkbox-skeleton.js.map +1 -0
  22. package/es/components/checkbox/checkbox.css.js +1 -1
  23. package/es/components/checkbox/checkbox.d.ts +21 -8
  24. package/es/components/checkbox/checkbox.d.ts.map +1 -1
  25. package/es/components/checkbox/checkbox.js +65 -17
  26. package/es/components/checkbox/checkbox.js.map +1 -1
  27. package/es/components/checkbox/checkbox.rtl.css.js +1 -1
  28. package/es/components/checkbox/index.d.ts +2 -1
  29. package/es/components/checkbox/index.d.ts.map +1 -1
  30. package/es/components/checkbox/index.js +2 -1
  31. package/es/components/checkbox/index.js.map +1 -1
  32. package/es/components/code-snippet/code-snippet.d.ts +0 -8
  33. package/es/components/code-snippet/code-snippet.d.ts.map +1 -1
  34. package/es/components/code-snippet/code-snippet.js +20 -56
  35. package/es/components/code-snippet/code-snippet.js.map +1 -1
  36. package/es/components/combo-box/combo-box-item.d.ts +3 -3
  37. package/es/components/combo-box/combo-box-item.d.ts.map +1 -1
  38. package/es/components/combo-box/combo-box-item.js +6 -6
  39. package/es/components/combo-box/combo-box-item.js.map +1 -1
  40. package/es/components/combo-box/combo-box.css.js +1 -1
  41. package/es/components/combo-box/combo-box.d.ts +11 -11
  42. package/es/components/combo-box/combo-box.d.ts.map +1 -1
  43. package/es/components/combo-box/combo-box.js +40 -19
  44. package/es/components/combo-box/combo-box.js.map +1 -1
  45. package/es/components/combo-box/combo-box.rtl.css.js +1 -1
  46. package/es/components/content-switcher/content-switcher.css.js +1 -1
  47. package/es/components/content-switcher/content-switcher.rtl.css.js +1 -1
  48. package/es/components/copy/copy.d.ts +49 -0
  49. package/es/components/copy/copy.d.ts.map +1 -0
  50. package/es/components/copy/copy.js +183 -0
  51. package/es/components/copy/copy.js.map +1 -0
  52. package/es/components/copy-button/copy-button.css.js +1 -1
  53. package/es/components/copy-button/copy-button.d.ts +8 -53
  54. package/es/components/copy-button/copy-button.d.ts.map +1 -1
  55. package/es/components/copy-button/copy-button.js +22 -150
  56. package/es/components/copy-button/copy-button.js.map +1 -1
  57. package/es/components/copy-button/copy-button.rtl.css.js +1 -1
  58. package/es/components/data-table/data-table.css.js +1 -1
  59. package/es/components/data-table/data-table.rtl.css.js +1 -1
  60. package/es/components/data-table/table-header-cell.d.ts.map +1 -1
  61. package/es/components/data-table/table-header-cell.js +2 -2
  62. package/es/components/data-table/table-header-cell.js.map +1 -1
  63. package/es/components/data-table/table-toolbar-search.d.ts +3 -3
  64. package/es/components/data-table/table-toolbar-search.d.ts.map +1 -1
  65. package/es/components/data-table/table-toolbar-search.js +3 -3
  66. package/es/components/data-table/table-toolbar-search.js.map +1 -1
  67. package/es/components/date-picker/date-picker-input-skeleton.d.ts +2 -2
  68. package/es/components/date-picker/date-picker-input-skeleton.d.ts.map +1 -1
  69. package/es/components/date-picker/date-picker-input-skeleton.js +4 -4
  70. package/es/components/date-picker/date-picker-input-skeleton.js.map +1 -1
  71. package/es/components/date-picker/date-picker-input.d.ts +38 -352
  72. package/es/components/date-picker/date-picker-input.d.ts.map +1 -1
  73. package/es/components/date-picker/date-picker-input.js +138 -97
  74. package/es/components/date-picker/date-picker-input.js.map +1 -1
  75. package/es/components/date-picker/date-picker.css.js +1 -1
  76. package/es/components/date-picker/date-picker.d.ts +23 -3
  77. package/es/components/date-picker/date-picker.d.ts.map +1 -1
  78. package/es/components/date-picker/date-picker.js +100 -24
  79. package/es/components/date-picker/date-picker.js.map +1 -1
  80. package/es/components/date-picker/date-picker.rtl.css.js +1 -1
  81. package/es/components/date-picker/defs.d.ts +1 -14
  82. package/es/components/date-picker/defs.d.ts.map +1 -1
  83. package/es/components/date-picker/defs.js +1 -10
  84. package/es/components/date-picker/defs.js.map +1 -1
  85. package/es/components/date-picker/fix-events-plugin.d.ts +6 -6
  86. package/es/components/date-picker/fix-events-plugin.d.ts.map +1 -1
  87. package/es/components/date-picker/fix-events-plugin.js +7 -7
  88. package/es/components/date-picker/fix-events-plugin.js.map +1 -1
  89. package/es/components/date-picker/focus-plugin.d.ts +9 -9
  90. package/es/components/date-picker/focus-plugin.d.ts.map +1 -1
  91. package/es/components/date-picker/focus-plugin.js +16 -16
  92. package/es/components/date-picker/focus-plugin.js.map +1 -1
  93. package/es/components/date-picker/shadow-dom-events-plugin.d.ts +2 -2
  94. package/es/components/date-picker/shadow-dom-events-plugin.d.ts.map +1 -1
  95. package/es/components/date-picker/shadow-dom-events-plugin.js +4 -4
  96. package/es/components/date-picker/shadow-dom-events-plugin.js.map +1 -1
  97. package/es/components/date-picker/state-handshake-plugin.d.ts +2 -2
  98. package/es/components/date-picker/state-handshake-plugin.d.ts.map +1 -1
  99. package/es/components/date-picker/state-handshake-plugin.js.map +1 -1
  100. package/es/components/dropdown/defs.d.ts +16 -3
  101. package/es/components/dropdown/defs.d.ts.map +1 -1
  102. package/es/components/dropdown/defs.js +11 -2
  103. package/es/components/dropdown/defs.js.map +1 -1
  104. package/es/components/dropdown/dropdown-item.d.ts +2 -2
  105. package/es/components/dropdown/dropdown-item.d.ts.map +1 -1
  106. package/es/components/dropdown/dropdown-item.js +4 -4
  107. package/es/components/dropdown/dropdown-item.js.map +1 -1
  108. package/es/components/dropdown/dropdown-skeleton.d.ts +2 -2
  109. package/es/components/dropdown/dropdown-skeleton.d.ts.map +1 -1
  110. package/es/components/dropdown/dropdown-skeleton.js +4 -4
  111. package/es/components/dropdown/dropdown-skeleton.js.map +1 -1
  112. package/es/components/dropdown/dropdown.css.js +1 -1
  113. package/es/components/dropdown/dropdown.d.ts +45 -20
  114. package/es/components/dropdown/dropdown.d.ts.map +1 -1
  115. package/es/components/dropdown/dropdown.js +156 -65
  116. package/es/components/dropdown/dropdown.js.map +1 -1
  117. package/es/components/dropdown/dropdown.rtl.css.js +1 -1
  118. package/es/components/file-uploader/file-uploader.css.js +1 -1
  119. package/es/components/file-uploader/file-uploader.rtl.css.js +1 -1
  120. package/es/components/icon-button/defs.d.ts +64 -0
  121. package/es/components/icon-button/defs.d.ts.map +1 -0
  122. package/es/components/icon-button/defs.js +34 -0
  123. package/es/components/icon-button/defs.js.map +1 -0
  124. package/es/components/icon-button/icon-button.css.js +12 -0
  125. package/es/components/icon-button/icon-button.d.ts +50 -0
  126. package/es/components/icon-button/icon-button.d.ts.map +1 -0
  127. package/es/components/icon-button/icon-button.js +176 -0
  128. package/es/components/icon-button/icon-button.js.map +1 -0
  129. package/es/components/icon-button/icon-button.rtl.css.js +12 -0
  130. package/es/components/icon-button/index.d.ts +11 -0
  131. package/es/components/icon-button/index.d.ts.map +1 -0
  132. package/es/components/icon-button/index.js +11 -0
  133. package/es/components/icon-button/index.js.map +1 -0
  134. package/es/components/inline-loading/inline-loading.d.ts +6 -2
  135. package/es/components/inline-loading/inline-loading.d.ts.map +1 -1
  136. package/es/components/inline-loading/inline-loading.js +20 -5
  137. package/es/components/inline-loading/inline-loading.js.map +1 -1
  138. package/es/components/input/defs.d.ts +1 -1
  139. package/es/components/input/defs.d.ts.map +1 -1
  140. package/es/components/input/defs.js +1 -1
  141. package/es/components/input/defs.js.map +1 -1
  142. package/es/components/input/input.d.ts +31 -7
  143. package/es/components/input/input.d.ts.map +1 -1
  144. package/es/components/input/input.js +88 -11
  145. package/es/components/input/input.js.map +1 -1
  146. package/es/components/layer/layer.css.js +1 -1
  147. package/es/components/layer/layer.rtl.css.js +1 -1
  148. package/es/components/list/list.css.js +1 -1
  149. package/es/components/list/list.rtl.css.js +1 -1
  150. package/es/components/list/ordered-list.d.ts +3 -3
  151. package/es/components/list/ordered-list.d.ts.map +1 -1
  152. package/es/components/list/ordered-list.js +6 -6
  153. package/es/components/list/ordered-list.js.map +1 -1
  154. package/es/components/list/unordered-list.d.ts +2 -2
  155. package/es/components/list/unordered-list.d.ts.map +1 -1
  156. package/es/components/list/unordered-list.js +5 -5
  157. package/es/components/list/unordered-list.js.map +1 -1
  158. package/es/components/loading/loading.css.js +1 -1
  159. package/es/components/loading/loading.d.ts +2 -2
  160. package/es/components/loading/loading.d.ts.map +1 -1
  161. package/es/components/loading/loading.js +4 -4
  162. package/es/components/loading/loading.js.map +1 -1
  163. package/es/components/loading/loading.rtl.css.js +1 -1
  164. package/es/components/modal/modal-footer-button.d.ts +3 -3
  165. package/es/components/modal/modal-footer-button.d.ts.map +1 -1
  166. package/es/components/modal/modal-footer-button.js +6 -6
  167. package/es/components/modal/modal-footer-button.js.map +1 -1
  168. package/es/components/modal/modal-footer.d.ts.map +1 -1
  169. package/es/components/modal/modal-footer.js +1 -1
  170. package/es/components/modal/modal-footer.js.map +1 -1
  171. package/es/components/modal/modal.css.js +1 -1
  172. package/es/components/modal/modal.d.ts.map +1 -1
  173. package/es/components/modal/modal.js +2 -2
  174. package/es/components/modal/modal.js.map +1 -1
  175. package/es/components/modal/modal.rtl.css.js +1 -1
  176. package/es/components/multi-select/multi-select-item.d.ts +3 -3
  177. package/es/components/multi-select/multi-select-item.d.ts.map +1 -1
  178. package/es/components/multi-select/multi-select-item.js +6 -6
  179. package/es/components/multi-select/multi-select-item.js.map +1 -1
  180. package/es/components/multi-select/multi-select.css.js +1 -1
  181. package/es/components/multi-select/multi-select.d.ts +9 -9
  182. package/es/components/multi-select/multi-select.d.ts.map +1 -1
  183. package/es/components/multi-select/multi-select.js +17 -17
  184. package/es/components/multi-select/multi-select.js.map +1 -1
  185. package/es/components/multi-select/multi-select.rtl.css.js +1 -1
  186. package/es/components/notification/actionable-notification-button.d.ts +21 -0
  187. package/es/components/notification/actionable-notification-button.d.ts.map +1 -0
  188. package/es/components/notification/actionable-notification-button.js +56 -0
  189. package/es/components/notification/actionable-notification-button.js.map +1 -0
  190. package/es/components/notification/actionable-notification.css.js +12 -0
  191. package/es/components/notification/actionable-notification.d.ts +370 -0
  192. package/es/components/notification/actionable-notification.d.ts.map +1 -0
  193. package/es/components/notification/actionable-notification.js +281 -0
  194. package/es/components/notification/actionable-notification.js.map +1 -0
  195. package/es/components/notification/actionable-notification.rtl.css.js +12 -0
  196. package/es/components/notification/defs.d.ts +17 -1
  197. package/es/components/notification/defs.d.ts.map +1 -1
  198. package/es/components/notification/defs.js +3 -0
  199. package/es/components/notification/defs.js.map +1 -1
  200. package/es/components/notification/index.d.ts +2 -0
  201. package/es/components/notification/index.d.ts.map +1 -1
  202. package/es/components/notification/index.js +2 -0
  203. package/es/components/notification/index.js.map +1 -1
  204. package/es/components/notification/inline-notification.css.js +1 -1
  205. package/es/components/notification/inline-notification.d.ts +8 -8
  206. package/es/components/notification/inline-notification.d.ts.map +1 -1
  207. package/es/components/notification/inline-notification.js +23 -18
  208. package/es/components/notification/inline-notification.js.map +1 -1
  209. package/es/components/notification/inline-notification.rtl.css.js +1 -1
  210. package/es/components/notification/toast-notification.css.js +1 -1
  211. package/es/components/notification/toast-notification.d.ts +4 -4
  212. package/es/components/notification/toast-notification.d.ts.map +1 -1
  213. package/es/components/notification/toast-notification.js +7 -7
  214. package/es/components/notification/toast-notification.js.map +1 -1
  215. package/es/components/notification/toast-notification.rtl.css.js +1 -1
  216. package/es/components/number-input/index.d.ts +2 -1
  217. package/es/components/number-input/index.d.ts.map +1 -1
  218. package/es/components/number-input/index.js +2 -1
  219. package/es/components/number-input/index.js.map +1 -1
  220. package/es/components/number-input/number-input-skeleton.d.ts +2 -2
  221. package/es/components/number-input/number-input-skeleton.d.ts.map +1 -1
  222. package/es/components/number-input/number-input-skeleton.js +4 -4
  223. package/es/components/number-input/number-input-skeleton.js.map +1 -1
  224. package/es/components/number-input/number-input.css.js +1 -1
  225. package/es/components/number-input/number-input.d.ts +12 -25
  226. package/es/components/number-input/number-input.d.ts.map +1 -1
  227. package/es/components/number-input/number-input.js +85 -106
  228. package/es/components/number-input/number-input.js.map +1 -1
  229. package/es/components/number-input/number-input.rtl.css.js +1 -1
  230. package/es/components/pagination/pagination.css.js +1 -1
  231. package/es/components/pagination/pagination.rtl.css.js +1 -1
  232. package/es/components/popover/defs.d.ts +63 -0
  233. package/es/components/popover/defs.d.ts.map +1 -0
  234. package/es/components/popover/defs.js +28 -0
  235. package/es/components/popover/defs.js.map +1 -0
  236. package/es/components/popover/index.d.ts +12 -0
  237. package/es/components/popover/index.d.ts.map +1 -0
  238. package/es/components/popover/index.js +12 -0
  239. package/es/components/popover/index.js.map +1 -0
  240. package/es/components/popover/popover-content.d.ts +45 -0
  241. package/es/components/popover/popover-content.d.ts.map +1 -0
  242. package/es/components/popover/popover-content.js +141 -0
  243. package/es/components/popover/popover-content.js.map +1 -0
  244. package/es/components/popover/popover.css.js +12 -0
  245. package/es/components/popover/popover.d.ts +54 -0
  246. package/es/components/popover/popover.d.ts.map +1 -0
  247. package/es/components/popover/popover.js +201 -0
  248. package/es/components/popover/popover.js.map +1 -0
  249. package/es/components/popover/popover.rtl.css.js +12 -0
  250. package/es/components/progress-indicator/progress-indicator.css.js +1 -1
  251. package/es/components/progress-indicator/progress-indicator.rtl.css.js +1 -1
  252. package/es/components/radio-button/radio-button.css.js +1 -1
  253. package/es/components/radio-button/radio-button.rtl.css.js +1 -1
  254. package/es/components/search/search-skeleton.d.ts +3 -3
  255. package/es/components/search/search-skeleton.d.ts.map +1 -1
  256. package/es/components/search/search-skeleton.js +6 -6
  257. package/es/components/search/search-skeleton.js.map +1 -1
  258. package/es/components/search/search.css.js +1 -1
  259. package/es/components/search/search.d.ts +361 -19
  260. package/es/components/search/search.d.ts.map +1 -1
  261. package/es/components/search/search.js +136 -29
  262. package/es/components/search/search.js.map +1 -1
  263. package/es/components/search/search.rtl.css.js +1 -1
  264. package/es/components/select/index.d.ts +2 -1
  265. package/es/components/select/index.d.ts.map +1 -1
  266. package/es/components/select/index.js +2 -1
  267. package/es/components/select/index.js.map +1 -1
  268. package/es/components/select/select-item-group.d.ts +2 -2
  269. package/es/components/select/select-item-group.d.ts.map +1 -1
  270. package/es/components/select/select-item-group.js +4 -4
  271. package/es/components/select/select-item-group.js.map +1 -1
  272. package/es/components/select/select-item.d.ts +2 -2
  273. package/es/components/select/select-item.d.ts.map +1 -1
  274. package/es/components/select/select-item.js +4 -4
  275. package/es/components/select/select-item.js.map +1 -1
  276. package/es/components/select/select-skeleton.d.ts +23 -0
  277. package/es/components/select/select-skeleton.d.ts.map +1 -0
  278. package/es/components/select/select-skeleton.js +72 -0
  279. package/es/components/select/select-skeleton.js.map +1 -0
  280. package/es/components/select/select.css.js +1 -1
  281. package/es/components/select/select.d.ts +29 -331
  282. package/es/components/select/select.d.ts.map +1 -1
  283. package/es/components/select/select.js +151 -74
  284. package/es/components/select/select.js.map +1 -1
  285. package/es/components/select/select.rtl.css.js +1 -1
  286. package/es/components/skeleton-placeholder/skeleton-placeholder.d.ts +2 -2
  287. package/es/components/skeleton-placeholder/skeleton-placeholder.d.ts.map +1 -1
  288. package/es/components/skeleton-placeholder/skeleton-placeholder.js +4 -4
  289. package/es/components/skeleton-placeholder/skeleton-placeholder.js.map +1 -1
  290. package/es/components/skeleton-text/defs.d.ts +2 -6
  291. package/es/components/skeleton-text/defs.d.ts.map +1 -1
  292. package/es/components/skeleton-text/defs.js +1 -2
  293. package/es/components/skeleton-text/defs.js.map +1 -1
  294. package/es/components/skeleton-text/skeleton-text.css.js +1 -1
  295. package/es/components/skeleton-text/skeleton-text.d.ts +2 -2
  296. package/es/components/skeleton-text/skeleton-text.d.ts.map +1 -1
  297. package/es/components/skeleton-text/skeleton-text.js +4 -4
  298. package/es/components/skeleton-text/skeleton-text.js.map +1 -1
  299. package/es/components/skeleton-text/skeleton-text.rtl.css.js +1 -1
  300. package/es/components/slider/slider-input.d.ts +11 -9
  301. package/es/components/slider/slider-input.d.ts.map +1 -1
  302. package/es/components/slider/slider-input.js +36 -18
  303. package/es/components/slider/slider-input.js.map +1 -1
  304. package/es/components/slider/slider-skeleton.d.ts +2 -2
  305. package/es/components/slider/slider-skeleton.d.ts.map +1 -1
  306. package/es/components/slider/slider-skeleton.js +4 -4
  307. package/es/components/slider/slider-skeleton.js.map +1 -1
  308. package/es/components/slider/slider.css.js +1 -1
  309. package/es/components/slider/slider.d.ts +38 -20
  310. package/es/components/slider/slider.d.ts.map +1 -1
  311. package/es/components/slider/slider.js +119 -54
  312. package/es/components/slider/slider.js.map +1 -1
  313. package/es/components/slider/slider.rtl.css.js +1 -1
  314. package/es/components/structured-list/structured-list.css.js +1 -1
  315. package/es/components/structured-list/structured-list.rtl.css.js +1 -1
  316. package/es/components/tabs/tabs.css.js +1 -1
  317. package/es/components/tabs/tabs.rtl.css.js +1 -1
  318. package/es/components/text-input/defs.d.ts +44 -0
  319. package/es/components/text-input/defs.d.ts.map +1 -0
  320. package/es/components/text-input/defs.js +36 -0
  321. package/es/components/text-input/defs.js.map +1 -0
  322. package/es/components/text-input/index.d.ts +12 -0
  323. package/es/components/text-input/index.d.ts.map +1 -0
  324. package/es/components/text-input/index.js +12 -0
  325. package/es/components/text-input/index.js.map +1 -0
  326. package/es/components/text-input/text-input-skeleton.d.ts +23 -0
  327. package/es/components/text-input/text-input-skeleton.d.ts.map +1 -0
  328. package/es/components/text-input/text-input-skeleton.js +72 -0
  329. package/es/components/text-input/text-input-skeleton.js.map +1 -0
  330. package/es/components/text-input/text-input.css.js +12 -0
  331. package/es/components/text-input/text-input.d.ts +786 -0
  332. package/es/components/text-input/text-input.d.ts.map +1 -0
  333. package/es/components/text-input/text-input.js +657 -0
  334. package/es/components/text-input/text-input.js.map +1 -0
  335. package/es/components/text-input/text-input.rtl.css.js +12 -0
  336. package/es/components/textarea/textarea-skeleton.d.ts +2 -2
  337. package/es/components/textarea/textarea-skeleton.d.ts.map +1 -1
  338. package/es/components/textarea/textarea-skeleton.js +4 -4
  339. package/es/components/textarea/textarea-skeleton.js.map +1 -1
  340. package/es/components/textarea/textarea.css.js +1 -1
  341. package/es/components/textarea/textarea.d.ts +6 -681
  342. package/es/components/textarea/textarea.d.ts.map +1 -1
  343. package/es/components/textarea/textarea.js +63 -197
  344. package/es/components/textarea/textarea.js.map +1 -1
  345. package/es/components/textarea/textarea.rtl.css.js +1 -1
  346. package/es/components/tile/expandable-tile.d.ts.map +1 -1
  347. package/es/components/tile/expandable-tile.js +4 -0
  348. package/es/components/tile/expandable-tile.js.map +1 -1
  349. package/es/components/tile/tile.css.js +1 -1
  350. package/es/components/tile/tile.rtl.css.js +1 -1
  351. package/es/components/toggle-tip/toggletip.d.ts +2 -2
  352. package/es/components/toggle-tip/toggletip.d.ts.map +1 -1
  353. package/es/components/toggle-tip/toggletip.js +2 -2
  354. package/es/components/toggle-tip/toggletip.js.map +1 -1
  355. package/es/components/tooltip/index.d.ts +1 -3
  356. package/es/components/tooltip/index.d.ts.map +1 -1
  357. package/es/components/tooltip/index.js +1 -3
  358. package/es/components/tooltip/index.js.map +1 -1
  359. package/es/components/tooltip/tooltip-content.d.ts +20 -0
  360. package/es/components/tooltip/tooltip-content.d.ts.map +1 -0
  361. package/es/components/tooltip/tooltip-content.js +62 -0
  362. package/es/components/tooltip/tooltip-content.js.map +1 -0
  363. package/es/components/tooltip/tooltip.css.js +1 -1
  364. package/es/components/tooltip/tooltip.d.ts +36 -25
  365. package/es/components/tooltip/tooltip.d.ts.map +1 -1
  366. package/es/components/tooltip/tooltip.js +111 -124
  367. package/es/components/tooltip/tooltip.js.map +1 -1
  368. package/es/components/tooltip/tooltip.rtl.css.js +1 -1
  369. package/es/components-react/button/button-set.js +1 -1
  370. package/es/components-react/button/button-skeleton.d.ts +2 -2
  371. package/es/components-react/button/button-skeleton.js +1 -1
  372. package/es/components-react/button/button.d.ts +2 -2
  373. package/es/components-react/button/button.js +1 -1
  374. package/es/components-react/checkbox/checkbox-skeleton.d.ts +15 -0
  375. package/es/components-react/checkbox/checkbox-skeleton.js +21 -0
  376. package/es/components-react/checkbox/checkbox.d.ts +2 -2
  377. package/es/components-react/combo-box/combo-box-item.d.ts +2 -2
  378. package/es/components-react/combo-box/combo-box.d.ts +2 -2
  379. package/es/components-react/combo-box/combo-box.js +1 -5
  380. package/es/components-react/copy/copy.d.ts +14 -0
  381. package/es/components-react/copy/copy.js +23 -0
  382. package/es/components-react/copy-button/copy-button.d.ts +2 -2
  383. package/es/components-react/date-picker/date-picker-input-skeleton.d.ts +2 -2
  384. package/es/components-react/date-picker/date-picker-input.d.ts +2 -2
  385. package/es/components-react/date-picker/date-picker-input.js +0 -1
  386. package/es/components-react/date-picker/date-picker.d.ts +2 -2
  387. package/es/components-react/dropdown/dropdown-item.d.ts +2 -2
  388. package/es/components-react/dropdown/dropdown-skeleton.d.ts +2 -2
  389. package/es/components-react/dropdown/dropdown.d.ts +2 -2
  390. package/es/components-react/dropdown/dropdown.js +1 -1
  391. package/es/components-react/icon-button/defs.js +9 -0
  392. package/es/components-react/{tooltip/tooltip-body.d.ts → icon-button/icon-button.d.ts} +3 -3
  393. package/es/components-react/icon-button/icon-button.js +24 -0
  394. package/es/components-react/{slider/defs.js → icon-button/index.js} +0 -1
  395. package/es/components-react/inline-loading/inline-loading.d.ts +2 -2
  396. package/es/components-react/input/input.d.ts +2 -2
  397. package/es/components-react/list/ordered-list.d.ts +2 -2
  398. package/es/components-react/list/unordered-list.d.ts +2 -2
  399. package/es/components-react/loading/loading.d.ts +2 -2
  400. package/es/components-react/modal/modal-footer-button.d.ts +2 -2
  401. package/es/components-react/multi-select/multi-select-item.d.ts +2 -2
  402. package/es/components-react/multi-select/multi-select.d.ts +2 -2
  403. package/es/components-react/multi-select/multi-select.js +1 -5
  404. package/es/components-react/notification/actionable-notification-button.d.ts +15 -0
  405. package/es/components-react/notification/actionable-notification-button.js +23 -0
  406. package/es/components-react/notification/actionable-notification.d.ts +14 -0
  407. package/es/components-react/notification/actionable-notification.js +23 -0
  408. package/es/components-react/notification/inline-notification.d.ts +2 -2
  409. package/es/components-react/notification/toast-notification.d.ts +2 -2
  410. package/es/components-react/number-input/number-input-skeleton.d.ts +2 -2
  411. package/es/components-react/number-input/number-input.d.ts +3 -3
  412. package/es/components-react/number-input/number-input.js +3 -6
  413. package/es/components-react/popover/defs.d.ts +14 -0
  414. package/es/components-react/{tooltip → popover}/defs.js +1 -1
  415. package/es/components-react/popover/index.d.ts +14 -0
  416. package/es/components-react/popover/index.js +8 -0
  417. package/es/components-react/popover/popover-content.d.ts +15 -0
  418. package/es/components-react/popover/popover-content.js +21 -0
  419. package/es/components-react/{tooltip/tooltip-footer.d.ts → popover/popover.d.ts} +2 -2
  420. package/es/components-react/{tooltip/tooltip-footer.js → popover/popover.js} +2 -2
  421. package/es/components-react/search/search-skeleton.d.ts +2 -2
  422. package/es/components-react/search/search.d.ts +2 -2
  423. package/es/components-react/search/search.js +0 -1
  424. package/es/components-react/select/select-item-group.d.ts +2 -2
  425. package/es/components-react/select/select-item.d.ts +2 -2
  426. package/es/components-react/select/select-skeleton.d.ts +15 -0
  427. package/es/components-react/select/select-skeleton.js +21 -0
  428. package/es/components-react/select/select.d.ts +2 -2
  429. package/es/components-react/select/select.js +0 -1
  430. package/es/components-react/skeleton-placeholder/skeleton-placeholder.d.ts +2 -2
  431. package/es/components-react/skeleton-text/skeleton-text.d.ts +2 -2
  432. package/es/components-react/slider/slider-input.d.ts +2 -2
  433. package/es/components-react/slider/slider-input.js +0 -1
  434. package/es/components-react/slider/slider-skeleton.d.ts +2 -2
  435. package/es/components-react/slider/slider.d.ts +2 -2
  436. package/es/components-react/text-input/defs.d.ts +14 -0
  437. package/es/components-react/text-input/defs.js +9 -0
  438. package/es/components-react/text-input/index.d.ts +14 -0
  439. package/es/components-react/text-input/index.js +8 -0
  440. package/es/components-react/text-input/text-input-skeleton.d.ts +15 -0
  441. package/es/components-react/text-input/text-input-skeleton.js +21 -0
  442. package/es/components-react/text-input/text-input.d.ts +15 -0
  443. package/es/components-react/text-input/text-input.js +22 -0
  444. package/es/components-react/textarea/textarea-skeleton.d.ts +2 -2
  445. package/es/components-react/textarea/textarea.d.ts +4 -5
  446. package/es/components-react/textarea/textarea.js +4 -3
  447. package/es/components-react/tooltip/tooltip-content.d.ts +14 -0
  448. package/es/components-react/tooltip/{tooltip-body.js → tooltip-content.js} +4 -4
  449. package/es/components-react/tooltip/tooltip.d.ts +4 -5
  450. package/es/components-react/tooltip/tooltip.js +4 -2
  451. package/es/globals/settings.d.ts.map +1 -1
  452. package/es/globals/settings.js +1 -1
  453. package/es/globals/settings.js.map +1 -1
  454. package/es/globals/wrappers/createReactCustomElementType.d.ts +3 -3
  455. package/es/globals/wrappers/createReactCustomElementType.d.ts.map +1 -1
  456. package/es/globals/wrappers/createReactCustomElementType.js +3 -3
  457. package/es/globals/wrappers/createReactCustomElementType.js.map +1 -1
  458. package/es/icons/add/16.js +1 -1
  459. package/es/icons/arrows/16.js +1 -1
  460. package/es/icons/arrows--vertical/16.js +1 -1
  461. package/es/icons/caret--down/16.js +1 -1
  462. package/es/icons/caret--up/16.js +1 -1
  463. package/es/icons/information/16.js +1 -1
  464. package/es/icons/information--filled/20.js +1 -1
  465. package/es/icons/information--square--filled/20.js +1 -1
  466. package/es/icons/subtract/16.js +1 -1
  467. package/es/icons/warning--alt--filled/16.js +1 -1
  468. package/es/icons/warning--alt--filled/20.js +1 -1
  469. package/es/index.d.ts +110 -108
  470. package/es/index.d.ts.map +1 -1
  471. package/es/index.js +110 -108
  472. package/es/index.js.map +1 -1
  473. package/lib/components/date-picker/defs.js +2 -11
  474. package/lib/components/date-picker/defs.js.map +1 -1
  475. package/lib/components/dropdown/defs.js +12 -3
  476. package/lib/components/dropdown/defs.js.map +1 -1
  477. package/lib/components/icon-button/defs.js +40 -0
  478. package/lib/components/icon-button/defs.js.map +1 -0
  479. package/lib/components/input/defs.js +1 -1
  480. package/lib/components/input/defs.js.map +1 -1
  481. package/lib/components/notification/defs.js +3 -0
  482. package/lib/components/notification/defs.js.map +1 -1
  483. package/lib/components/popover/defs.js +34 -0
  484. package/lib/components/popover/defs.js.map +1 -0
  485. package/lib/components/skeleton-text/defs.js +1 -2
  486. package/lib/components/skeleton-text/defs.js.map +1 -1
  487. package/lib/components/text-input/defs.js +47 -0
  488. package/lib/components/text-input/defs.js.map +1 -0
  489. package/lib/components-react-node/button/button-set.js +1 -1
  490. package/lib/components-react-node/button/button-skeleton.js +1 -1
  491. package/lib/components-react-node/button/button.js +1 -1
  492. package/lib/components-react-node/{tooltip/tooltip-body.js → checkbox/checkbox-skeleton.js} +3 -4
  493. package/lib/components-react-node/combo-box/combo-box.js +2 -8
  494. package/lib/components-react-node/copy/copy.js +37 -0
  495. package/lib/components-react-node/date-picker/date-picker-input.js +0 -6
  496. package/lib/components-react-node/dropdown/dropdown.js +2 -2
  497. package/lib/components-react-node/icon-button/defs.js +24 -0
  498. package/lib/components-react-node/icon-button/icon-button.js +50 -0
  499. package/lib/components-react-node/icon-button/index.js +9 -0
  500. package/lib/components-react-node/multi-select/multi-select.js +0 -6
  501. package/lib/components-react-node/notification/actionable-notification-button.js +37 -0
  502. package/lib/components-react-node/notification/actionable-notification.js +37 -0
  503. package/lib/components-react-node/number-input/number-input.js +3 -9
  504. package/lib/components-react-node/{slider → popover}/defs.js +1 -1
  505. package/lib/components-react-node/popover/index.js +9 -0
  506. package/lib/components-react-node/popover/popover-content.js +36 -0
  507. package/lib/components-react-node/{tooltip/tooltip-footer.js → popover/popover.js} +1 -1
  508. package/lib/components-react-node/search/search.js +0 -7
  509. package/lib/components-react-node/select/select-skeleton.js +36 -0
  510. package/lib/components-react-node/select/select.js +0 -7
  511. package/lib/components-react-node/slider/slider-input.js +0 -7
  512. package/lib/components-react-node/{tooltip → text-input}/defs.js +1 -1
  513. package/lib/components-react-node/text-input/index.js +9 -0
  514. package/lib/components-react-node/text-input/text-input-skeleton.js +36 -0
  515. package/lib/components-react-node/text-input/text-input.js +55 -0
  516. package/lib/components-react-node/textarea/textarea.js +3 -9
  517. package/lib/components-react-node/tooltip/tooltip-content.js +37 -0
  518. package/lib/components-react-node/tooltip/tooltip.js +3 -2
  519. package/lib/globals/settings.js +1 -1
  520. package/lib/globals/settings.js.map +1 -1
  521. package/lib/globals/wrappers/createReactCustomElementType.js +3 -3
  522. package/lib/globals/wrappers/createReactCustomElementType.js.map +1 -1
  523. package/package.json +5 -5
  524. package/scss/components/button/button.scss +5 -5
  525. package/scss/components/checkbox/checkbox.scss +9 -1
  526. package/scss/components/combo-box/combo-box.scss +51 -42
  527. package/scss/components/copy-button/copy-button.scss +20 -0
  528. package/scss/components/date-picker/date-picker.scss +28 -14
  529. package/scss/components/dropdown/dropdown.scss +87 -34
  530. package/scss/components/icon-button/icon-button.scss +14 -0
  531. package/scss/components/layer/layer.scss +0 -6
  532. package/scss/components/list/list.scss +0 -5
  533. package/scss/components/loading/loading.scss +1 -0
  534. package/scss/components/modal/modal.scss +2 -2
  535. package/scss/components/notification/actionable-notification.scss +170 -0
  536. package/scss/components/notification/inline-notification.scss +26 -0
  537. package/scss/components/notification/toast-notification.scss +26 -0
  538. package/scss/components/number-input/number-input.scss +13 -0
  539. package/scss/components/popover/popover.scss +122 -0
  540. package/scss/components/search/search.scss +54 -21
  541. package/scss/components/select/select.scss +20 -4
  542. package/scss/components/skeleton-text/skeleton-text.scss +4 -0
  543. package/scss/components/slider/slider.scss +9 -1
  544. package/scss/components/text-input/text-input.scss +38 -0
  545. package/scss/components/textarea/textarea.scss +7 -0
  546. package/scss/components/tile/tile.scss +4 -0
  547. package/scss/components/tooltip/tooltip.scss +5 -135
  548. package/es/components/slider/defs.d.ts +0 -11
  549. package/es/components/slider/defs.d.ts.map +0 -1
  550. package/es/components/slider/defs.js +0 -11
  551. package/es/components/slider/defs.js.map +0 -1
  552. package/es/components/tooltip/defs.d.ts +0 -84
  553. package/es/components/tooltip/defs.d.ts.map +0 -1
  554. package/es/components/tooltip/defs.js +0 -39
  555. package/es/components/tooltip/defs.js.map +0 -1
  556. package/es/components/tooltip/tooltip-body.d.ts +0 -40
  557. package/es/components/tooltip/tooltip-body.d.ts.map +0 -1
  558. package/es/components/tooltip/tooltip-body.js +0 -175
  559. package/es/components/tooltip/tooltip-body.js.map +0 -1
  560. package/es/components/tooltip/tooltip-footer.d.ts.map +0 -1
  561. package/es/components/tooltip/tooltip-footer.js.map +0 -1
  562. package/lib/components/slider/defs.js +0 -21
  563. package/lib/components/slider/defs.js.map +0 -1
  564. package/lib/components/tooltip/defs.js +0 -45
  565. package/lib/components/tooltip/defs.js.map +0 -1
  566. /package/es/components-react/{slider → icon-button}/defs.d.ts +0 -0
  567. /package/es/components-react/{tooltip/defs.d.ts → icon-button/index.d.ts} +0 -0
@@ -6,9 +6,9 @@
6
6
  * This source code is licensed under the Apache-2.0 license found in the
7
7
  * LICENSE file in the root directory of this source tree.
8
8
  */
9
- import { LitElement } from 'lit';
10
- import BXFloatingMenuTrigger from '../floating-menu/floating-menu-trigger';
11
- declare const BXTooltip_base: {
9
+ import CDSPopover from '../popover/popover';
10
+ import '../popover/popover-content';
11
+ declare const CDSTooltip_base: {
12
12
  new (...args: any[]): {
13
13
  _handles: Set<import("../../globals/internal/handle").default>;
14
14
  connectedCallback(): void;
@@ -323,52 +323,63 @@ declare const BXTooltip_base: {
323
323
  };
324
324
  };
325
325
  };
326
- } & typeof LitElement;
326
+ } & typeof CDSPopover;
327
327
  /**
328
328
  * Trigger button of tooltip.
329
329
  *
330
330
  * @element cds-tooltip
331
331
  */
332
- declare class BXTooltip extends BXTooltip_base implements BXFloatingMenuTrigger {
332
+ declare class CDSTooltip extends CDSTooltip_base {
333
333
  /**
334
- * The menu body.
334
+ * Specify how the trigger should align with the tooltip
335
335
  */
336
- private _menuBody;
336
+ align: string;
337
337
  /**
338
- * The trigger button.
338
+ * Specify whether the tooltip should be closed when clicked
339
+ */
340
+ closeOnActivation: boolean;
341
+ /**
342
+ * Specify whether the tooltip should be open when it first renders
343
+ */
344
+ defaultOpen: boolean;
345
+ /**
346
+ * Specify the duration in milliseconds to delay before displaying the tooltip
339
347
  */
340
- private _triggerNode;
341
- align: string;
342
- duration: any;
343
348
  enterDelayMs: number;
344
- exitDelayMs: number;
345
349
  /**
346
- * Handles `click` event on this element.
350
+ * Specify the duration in milliseconds to delay before hiding the tooltip
347
351
  */
348
- private _handleOver;
352
+ leaveDelayMs: number;
349
353
  /**
350
- * Handles `keydown` event on this element.
354
+ * Handles `mouseover` event on this element.
355
+ */
356
+ private _handleHover;
357
+ /**
358
+ * Handles `mouseleave` event on this element.
351
359
  */
352
360
  private _handleHoverOut;
361
+ /**
362
+ * Handles `click` event on this element.
363
+ */
364
+ private _handleClick;
353
365
  /**
354
366
  * Handles `keydown` event on this element.
355
367
  * Space & enter will toggle state, Escape will only close.
368
+
356
369
  */
357
370
  private _handleKeydown;
358
371
  /**
359
- * `true` if the dropdown should be open.
372
+ * Handles `slotchange` event.
360
373
  */
361
- open: boolean;
362
- /**
363
- * @returns The position of the trigger button in the viewport.
364
- */
365
- get triggerPosition(): DOMRect;
374
+ protected _handleSlotChange({ target }: Event): void;
366
375
  connectedCallback(): void;
367
376
  updated(changedProperties: any): void;
368
- render(): import("lit-html").TemplateResult<1>;
369
- static get selectorTooltipBody(): string;
370
- static styles: any;
377
+ /**
378
+ * A selector that will return the CDSTooltipContent.
379
+ */
380
+ static get selectorTooltipContent(): string;
381
+ static get styles(): import("lit").CSSResult;
371
382
  }
372
- export default BXTooltip;
383
+ export default CDSTooltip;
373
384
 
374
385
  //# sourceMappingURL=tooltip.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"sources":["components/tooltip/tooltip.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AASvC,OAAO,qBAAqB,MAAM,wCAAwC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAG3E;;;;GAIG;AACH,cACM,SACJ,SAAQ,cACR,YAAW,qBAAqB;IAEhC;;OAEG;IACH,OAAO,CAAC,SAAS,CAA+B;IAEhD;;OAEG;IAEH,OAAO,CAAC,YAAY,CAAe;IAGnC,KAAK,SAAY;IAGjB,QAAQ,MAAC;IAGT,YAAY,SAAO;IAGnB,WAAW,SAAO;IAElB;;OAEG;IAGH,OAAO,CAAC,WAAW,CAcjB;IAEF;;OAEG;IAGH,OAAO,CAAC,eAAe,CAOrB;IAEF;;;OAGG;IAGH,OAAO,CAAC,cAAc,CAIpB;IAEF;;OAEG;IAEH,IAAI,UAAS;IAEb;;OAEG;IACH,IAAI,eAAe,YAMlB;IAED,iBAAiB;IAoBjB,OAAO,CAAC,iBAAiB,KAAA;IAezB,MAAM;IAwBN,MAAM,KAAK,mBAAmB,WAE7B;IAED,MAAM,CAAC,MAAM,MAAU;CACxB;AAED,eAAe,SAAS,CAAC","file":"tooltip.d.ts","sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2019, 2023\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { LitElement, html } from 'lit';\nimport { property, customElement, query } from 'lit/decorators.js';\nimport { classMap } from 'lit-html/directives/class-map';\nimport Information16 from '@carbon/icons/lib/information/16';\nimport { prefix } from '../../globals/settings';\nimport HostListener from '../../globals/decorators/host-listener';\nimport HostListenerMixin from '../../globals/mixins/host-listener';\nimport { find } from '../../globals/internal/collection-helpers';\nimport BXFloatingMenu from '../floating-menu/floating-menu';\nimport BXFloatingMenuTrigger from '../floating-menu/floating-menu-trigger';\nimport styles from './tooltip.scss';\n\n/**\n * Trigger button of tooltip.\n *\n * @element cds-tooltip\n */\n@customElement(`${prefix}-tooltip`)\nclass BXTooltip\n extends HostListenerMixin(LitElement)\n implements BXFloatingMenuTrigger\n{\n /**\n * The menu body.\n */\n private _menuBody: BXFloatingMenu | null = null;\n\n /**\n * The trigger button.\n */\n @query('#trigger')\n private _triggerNode!: HTMLElement;\n\n @property({ reflect: true, type: String })\n align = 'bottom';\n\n @property({ reflect: true, type: String })\n duration;\n\n @property({ attribute: 'enter-delay-ms', type: Number })\n enterDelayMs = 100;\n\n @property({ attribute: 'exit-delay-ms', type: Number })\n exitDelayMs = 300;\n\n /**\n * Handles `click` event on this element.\n */\n @HostListener('mouseover')\n // @ts-ignore: The decorator refers to this method but TS thinks this method is not referred to\n private _handleOver = async () => {\n setTimeout(async () => {\n this.open = !this.open;\n const { open, updateComplete } = this;\n if (open) {\n await updateComplete;\n const { _menuBody: menuBody } = this;\n (\n menuBody?.shadowRoot?.querySelector(\n BXTooltip.selectorTooltipBody\n ) as HTMLElement\n )?.focus();\n }\n }, this.enterDelayMs);\n };\n\n /**\n * Handles `keydown` event on this element.\n */\n @HostListener('mouseout')\n // @ts-ignore: The decorator refers to this method but TS thinks this method is not referred to\n private _handleHoverOut = async () => {\n setTimeout(async () => {\n const { open } = this;\n if (open) {\n this.open = !this.open;\n }\n }, this.exitDelayMs);\n };\n\n /**\n * Handles `keydown` event on this element.\n * Space & enter will toggle state, Escape will only close.\n */\n @HostListener('keydown')\n // @ts-ignore: The decorator refers to this method but TS thinks this method is not referred to\n private _handleKeydown = async (event) => {\n if (event.key === ' ' || event.key === 'Enter') {\n this._handleOver();\n }\n };\n\n /**\n * `true` if the dropdown should be open.\n */\n @property({ type: Boolean, reflect: true })\n open = false;\n\n /**\n * @returns The position of the trigger button in the viewport.\n */\n get triggerPosition() {\n const { _triggerNode: triggerNode } = this;\n if (!triggerNode) {\n throw new TypeError('Cannot find the trigger button.');\n }\n return triggerNode.getBoundingClientRect();\n }\n\n connectedCallback() {\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'button');\n }\n if (!this.hasAttribute('tabindex')) {\n // TODO: Should we use a property?\n this.setAttribute('tabindex', '0');\n }\n if (!this.hasAttribute('aria-haspopup')) {\n this.setAttribute('aria-haspopup', 'true');\n }\n if (!this.hasAttribute('aria-expanded')) {\n this.setAttribute('aria-expanded', 'false');\n }\n if (!this.shadowRoot) {\n this.attachShadow({ mode: 'open' });\n }\n super.connectedCallback();\n }\n\n updated(changedProperties) {\n if (changedProperties.has('open')) {\n if (!this._menuBody) {\n this._menuBody = find(\n this.childNodes,\n (elem) => (elem.constructor as typeof BXFloatingMenu).FLOATING_MENU\n );\n }\n if (this._menuBody) {\n this._menuBody.open = this.open;\n }\n this.setAttribute('aria-expanded', String(Boolean(this.open)));\n }\n }\n\n render() {\n const buttonClasses = classMap({\n [`${prefix}--popover-container`]: true,\n [`${prefix}--popover--caret`]: true,\n [`${prefix}--popover--high-contrast`]: true,\n [`${prefix}--tooltip`]: true,\n [`${prefix}--popover--open`]: this.open,\n [`${prefix}--popover--${this.align}`]: true,\n });\n return html`\n <span class=\"${buttonClasses}\">\n <button class=\"sb-tooltip-trigger\">\n ${Information16({ id: 'trigger' })}\n </button>\n <span class=\"${prefix}--popover\">\n <span class=\"${prefix}--popover-content ${prefix}--tooltip-content\">\n <slot></slot>\n </span>\n <span class=\"${prefix}--popover-caret\"> </span>\n </span>\n </span>\n `;\n }\n\n static get selectorTooltipBody() {\n return `.${prefix}--tooltip__content`;\n }\n\n static styles = styles; // `styles` here is a `CSSResult` generated by custom WebPack loader\n}\n\nexport default BXTooltip;\n"]}
1
+ {"version":3,"sources":["components/tooltip/tooltip.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAOH,OAAO,UAAU,MAAM,oBAAoB,CAAC;AAC5C,OAAO,4BAA4B,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIpC;;;;GAIG;AACH,cACM,UAAW,SAAQ,eAA6B;IACpD;;OAEG;IAEH,KAAK,SAAS;IAEd;;OAEG;IAEH,iBAAiB,UAAS;IAE1B;;OAEG;IAEH,WAAW,UAAS;IAEpB;;OAEG;IAEH,YAAY,SAAO;IAEnB;;OAEG;IAEH,YAAY,SAAO;IAEnB;;OAEG;IACH,OAAO,CAAC,YAAY,CAWlB;IAEF;;OAEG;IACH,OAAO,CAAC,eAAe,CAOrB;IAEF;;OAEG;IAGH,OAAO,CAAC,YAAY,CAIlB;IAEF;;;;OAIG;IAGH,OAAO,CAAC,cAAc,CAIpB;IAEF;;OAEG;IACH,SAAS,CAAC,iBAAiB,CAAC,EAAE,MAAM,EAAE,EAAE,KAAK;IAsB7C,iBAAiB;IAUjB,OAAO,CAAC,iBAAiB,KAAA;IA2BzB;;OAEG;IACH,MAAM,KAAK,sBAAsB,WAEhC;IAED,MAAM,KAAK,MAAM,4BAIhB;CACF;AAED,eAAe,UAAU,CAAC","file":"tooltip.d.ts","sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2019, 2023\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { css } from 'lit';\nimport { property, customElement } from 'lit/decorators.js';\nimport { prefix } from '../../globals/settings';\nimport HostListener from '../../globals/decorators/host-listener';\nimport HostListenerMixin from '../../globals/mixins/host-listener';\nimport CDSPopover from '../popover/popover';\nimport '../popover/popover-content';\nimport styles from './tooltip.scss';\nimport CDSTooltipContent from './tooltip-content';\n\n/**\n * Trigger button of tooltip.\n *\n * @element cds-tooltip\n */\n@customElement(`${prefix}-tooltip`)\nclass CDSTooltip extends HostListenerMixin(CDSPopover) {\n /**\n * Specify how the trigger should align with the tooltip\n */\n @property({ reflect: true, type: String })\n align = 'top';\n\n /**\n * Specify whether the tooltip should be closed when clicked\n */\n @property({ reflect: true, type: Boolean })\n closeOnActivation = false;\n\n /**\n * Specify whether the tooltip should be open when it first renders\n */\n @property({ reflect: true, type: Boolean })\n defaultOpen = false;\n\n /**\n * Specify the duration in milliseconds to delay before displaying the tooltip\n */\n @property({ attribute: 'enter-delay-ms', type: Number })\n enterDelayMs = 100;\n\n /**\n * Specify the duration in milliseconds to delay before hiding the tooltip\n */\n @property({ attribute: 'leave-delay-ms', type: Number })\n leaveDelayMs = 300;\n\n /**\n * Handles `mouseover` event on this element.\n */\n private _handleHover = async () => {\n setTimeout(async () => {\n this.open = true;\n const { open, updateComplete } = this;\n if (open) {\n await updateComplete;\n const { selectorTooltipContent } = this\n .constructor as typeof CDSTooltip;\n (this.querySelector(selectorTooltipContent) as HTMLElement)?.focus();\n }\n }, this.enterDelayMs);\n };\n\n /**\n * Handles `mouseleave` event on this element.\n */\n private _handleHoverOut = async () => {\n setTimeout(async () => {\n const { open } = this;\n if (open) {\n this.open = false;\n }\n }, this.leaveDelayMs);\n };\n\n /**\n * Handles `click` event on this element.\n */\n @HostListener('click')\n // @ts-ignore: The decorator refers to this method but TS thinks this method is not referred to\n private _handleClick = async () => {\n if (this.closeOnActivation) {\n this._handleHoverOut();\n }\n };\n\n /**\n * Handles `keydown` event on this element.\n * Space & enter will toggle state, Escape will only close.\n\n */\n @HostListener('click')\n // @ts-ignore: The decorator refers to this method but TS thinks this method is not referred to\n private _handleKeydown = async (event) => {\n if (event.key === ' ' || event.key === 'Enter' || event.key === 'Escape') {\n this._handleHoverOut();\n }\n };\n\n /**\n * Handles `slotchange` event.\n */\n protected _handleSlotChange({ target }: Event) {\n const component = (target as HTMLSlotElement)\n .assignedNodes()\n .filter(\n (node) => node.nodeType !== Node.TEXT_NODE || node!.textContent!.trim()\n );\n (component[0] as HTMLElement).addEventListener('focus', this._handleHover);\n (component[0] as HTMLElement).addEventListener(\n 'focusout',\n this._handleHoverOut\n );\n (component[0] as HTMLElement).addEventListener(\n 'mouseover',\n this._handleHover\n );\n (component[0] as HTMLElement).addEventListener(\n 'mouseleave',\n this._handleHoverOut\n );\n this.requestUpdate();\n }\n\n connectedCallback() {\n if (!this.hasAttribute('highContrast')) {\n this.setAttribute('highContrast', '');\n }\n if (!this.shadowRoot) {\n this.attachShadow({ mode: 'open' });\n }\n super.connectedCallback();\n }\n\n updated(changedProperties) {\n const { selectorTooltipContent } = this.constructor as typeof CDSTooltip;\n const toolTipContent = this.querySelector(selectorTooltipContent);\n\n if (changedProperties.has('defaultOpen')) {\n this.open = this.defaultOpen;\n }\n\n if (changedProperties.has('open')) {\n this.open\n ? toolTipContent?.setAttribute('open', '')\n : toolTipContent?.removeAttribute('open');\n this.setAttribute('aria-expanded', String(Boolean(this.open)));\n }\n\n ['align', 'caret'].forEach((name) => {\n if (changedProperties.has(name)) {\n const { [name as keyof CDSTooltip]: value } = this;\n (toolTipContent as CDSTooltipContent)[name] = value;\n }\n });\n\n this.shadowRoot\n ?.querySelector(`.${prefix}--popover-container`)\n ?.classList.add(`${prefix}--tooltip`);\n }\n\n /**\n * A selector that will return the CDSTooltipContent.\n */\n static get selectorTooltipContent() {\n return `${prefix}-tooltip-content`;\n }\n\n static get styles() {\n return css`\n ${super.styles}${styles}\n `;\n } // `styles` here is a `CSSResult` generated by custom WebPack loader\n}\n\nexport default CDSTooltip;\n"]}
@@ -12,63 +12,58 @@ let _ = t => t,
12
12
  * LICENSE file in the root directory of this source tree.
13
13
  */
14
14
 
15
- import { LitElement, html } from 'lit';
16
- import { property, customElement, query } from 'lit/decorators.js';
17
- import { classMap } from 'lit-html/directives/class-map';
18
- import Information16 from "../../icons/information/16";
15
+ import { css } from 'lit';
16
+ import { property, customElement } from 'lit/decorators.js';
19
17
  import { prefix } from '../../globals/settings';
20
18
  import HostListener from '../../globals/decorators/host-listener';
21
19
  import HostListenerMixin from '../../globals/mixins/host-listener';
22
- import { find } from '../../globals/internal/collection-helpers';
23
- import styles from "././tooltip.css.js";
24
-
20
+ import CDSPopover from '../popover/popover';
21
+ import '../popover/popover-content';
22
+ import _styles from "././tooltip.css.js";
25
23
  /**
26
24
  * Trigger button of tooltip.
27
25
  *
28
26
  * @element cds-tooltip
29
- */ /**
30
- * Trigger button of tooltip.
31
- *
32
- * @element cds-tooltip
33
- */
34
- let BXTooltip = _decorate([customElement(`${prefix}-tooltip`)], function (_initialize, _HostListenerMixin) {
35
- class BXTooltip extends _HostListenerMixin {
27
+ */
28
+ let CDSTooltip = _decorate([customElement(`${prefix}-tooltip`)], function (_initialize, _HostListenerMixin) {
29
+ class CDSTooltip extends _HostListenerMixin {
36
30
  constructor(...args) {
37
31
  super(...args);
38
32
  _initialize(this);
39
33
  }
40
34
  }
41
35
  return {
42
- F: BXTooltip,
36
+ F: CDSTooltip,
43
37
  d: [{
44
38
  kind: "field",
45
- key: "_menuBody",
39
+ decorators: [property({
40
+ reflect: true,
41
+ type: String
42
+ })],
43
+ key: "align",
46
44
  value() {
47
- return null;
45
+ return 'top';
48
46
  }
49
- }, {
50
- kind: "field",
51
- decorators: [query('#trigger')],
52
- key: "_triggerNode",
53
- value: void 0
54
47
  }, {
55
48
  kind: "field",
56
49
  decorators: [property({
57
50
  reflect: true,
58
- type: String
51
+ type: Boolean
59
52
  })],
60
- key: "align",
53
+ key: "closeOnActivation",
61
54
  value() {
62
- return 'bottom';
55
+ return false;
63
56
  }
64
57
  }, {
65
58
  kind: "field",
66
59
  decorators: [property({
67
60
  reflect: true,
68
- type: String
61
+ type: Boolean
69
62
  })],
70
- key: "duration",
71
- value: void 0
63
+ key: "defaultOpen",
64
+ value() {
65
+ return false;
66
+ }
72
67
  }, {
73
68
  kind: "field",
74
69
  decorators: [property({
@@ -82,39 +77,37 @@ let BXTooltip = _decorate([customElement(`${prefix}-tooltip`)], function (_initi
82
77
  }, {
83
78
  kind: "field",
84
79
  decorators: [property({
85
- attribute: 'exit-delay-ms',
80
+ attribute: 'leave-delay-ms',
86
81
  type: Number
87
82
  })],
88
- key: "exitDelayMs",
83
+ key: "leaveDelayMs",
89
84
  value() {
90
85
  return 300;
91
86
  }
92
87
  }, {
93
88
  kind: "field",
94
- decorators: [HostListener('mouseover')],
95
- key: "_handleOver",
89
+ key: "_handleHover",
96
90
  value() {
97
91
  return async () => {
98
92
  setTimeout(async () => {
99
- this.open = !this.open;
93
+ this.open = true;
100
94
  const {
101
95
  open,
102
96
  updateComplete
103
97
  } = this;
104
98
  if (open) {
105
- var _menuBody$shadowRoot, _menuBody$shadowRoot$;
99
+ var _this$querySelector;
106
100
  await updateComplete;
107
101
  const {
108
- _menuBody: menuBody
109
- } = this;
110
- menuBody === null || menuBody === void 0 ? void 0 : (_menuBody$shadowRoot = menuBody.shadowRoot) === null || _menuBody$shadowRoot === void 0 ? void 0 : (_menuBody$shadowRoot$ = _menuBody$shadowRoot.querySelector(BXTooltip.selectorTooltipBody)) === null || _menuBody$shadowRoot$ === void 0 ? void 0 : _menuBody$shadowRoot$.focus();
102
+ selectorTooltipContent
103
+ } = this.constructor;
104
+ (_this$querySelector = this.querySelector(selectorTooltipContent)) === null || _this$querySelector === void 0 ? void 0 : _this$querySelector.focus();
111
105
  }
112
106
  }, this.enterDelayMs);
113
107
  };
114
108
  }
115
109
  }, {
116
110
  kind: "field",
117
- decorators: [HostListener('mouseout')],
118
111
  key: "_handleHoverOut",
119
112
  value() {
120
113
  return async () => {
@@ -123,155 +116,149 @@ let BXTooltip = _decorate([customElement(`${prefix}-tooltip`)], function (_initi
123
116
  open
124
117
  } = this;
125
118
  if (open) {
126
- this.open = !this.open;
119
+ this.open = false;
127
120
  }
128
- }, this.exitDelayMs);
121
+ }, this.leaveDelayMs);
129
122
  };
130
123
  }
131
124
  }, {
132
125
  kind: "field",
133
- decorators: [HostListener('keydown')],
134
- key: "_handleKeydown",
126
+ decorators: [HostListener('click')],
127
+ key: "_handleClick",
135
128
  value() {
136
- return async event => {
137
- if (event.key === ' ' || event.key === 'Enter') {
138
- this._handleOver();
129
+ return async () => {
130
+ if (this.closeOnActivation) {
131
+ this._handleHoverOut();
139
132
  }
140
133
  };
141
134
  }
142
135
  }, {
143
136
  kind: "field",
144
- decorators: [property({
145
- type: Boolean,
146
- reflect: true
147
- })],
148
- key: "open",
137
+ decorators: [HostListener('click')],
138
+ key: "_handleKeydown",
149
139
  value() {
150
- return false;
140
+ return async event => {
141
+ if (event.key === ' ' || event.key === 'Enter' || event.key === 'Escape') {
142
+ this._handleHoverOut();
143
+ }
144
+ };
151
145
  }
152
146
  }, {
153
- kind: "get",
154
- key: "triggerPosition",
147
+ kind: "method",
148
+ key: "_handleSlotChange",
155
149
  value:
156
150
  /**
157
- * The menu body.
151
+ * Specify how the trigger should align with the tooltip
158
152
  */
159
153
 
160
154
  /**
161
- * The trigger button.
155
+ * Specify whether the tooltip should be closed when clicked
162
156
  */
163
157
 
164
158
  /**
165
- * Handles `click` event on this element.
159
+ * Specify whether the tooltip should be open when it first renders
166
160
  */
167
161
 
168
162
  /**
169
- * Handles `keydown` event on this element.
163
+ * Specify the duration in milliseconds to delay before displaying the tooltip
170
164
  */
171
165
 
172
166
  /**
173
- * Handles `keydown` event on this element.
174
- * Space & enter will toggle state, Escape will only close.
167
+ * Specify the duration in milliseconds to delay before hiding the tooltip
175
168
  */
176
169
 
177
170
  /**
178
- * `true` if the dropdown should be open.
171
+ * Handles `mouseover` event on this element.
179
172
  */
180
173
 
181
174
  /**
182
- * @returns The position of the trigger button in the viewport.
175
+ * Handles `mouseleave` event on this element.
183
176
  */
184
- function triggerPosition() {
185
- const {
186
- _triggerNode: triggerNode
187
- } = this;
188
- if (!triggerNode) {
189
- throw new TypeError('Cannot find the trigger button.');
190
- }
191
- return triggerNode.getBoundingClientRect();
177
+
178
+ /**
179
+ * Handles `click` event on this element.
180
+ */
181
+
182
+ /**
183
+ * Handles `keydown` event on this element.
184
+ * Space & enter will toggle state, Escape will only close.
185
+ */
186
+
187
+ /**
188
+ * Handles `slotchange` event.
189
+ */
190
+ function _handleSlotChange({
191
+ target
192
+ }) {
193
+ const component = target.assignedNodes().filter(node => node.nodeType !== Node.TEXT_NODE || node.textContent.trim());
194
+ component[0].addEventListener('focus', this._handleHover);
195
+ component[0].addEventListener('focusout', this._handleHoverOut);
196
+ component[0].addEventListener('mouseover', this._handleHover);
197
+ component[0].addEventListener('mouseleave', this._handleHoverOut);
198
+ this.requestUpdate();
192
199
  }
193
200
  }, {
194
201
  kind: "method",
195
202
  key: "connectedCallback",
196
203
  value: function connectedCallback() {
197
- if (!this.hasAttribute('role')) {
198
- this.setAttribute('role', 'button');
199
- }
200
- if (!this.hasAttribute('tabindex')) {
201
- // TODO: Should we use a property?
202
- this.setAttribute('tabindex', '0');
203
- }
204
- if (!this.hasAttribute('aria-haspopup')) {
205
- this.setAttribute('aria-haspopup', 'true');
206
- }
207
- if (!this.hasAttribute('aria-expanded')) {
208
- this.setAttribute('aria-expanded', 'false');
204
+ if (!this.hasAttribute('highContrast')) {
205
+ this.setAttribute('highContrast', '');
209
206
  }
210
207
  if (!this.shadowRoot) {
211
208
  this.attachShadow({
212
209
  mode: 'open'
213
210
  });
214
211
  }
215
- _get(_getPrototypeOf(BXTooltip.prototype), "connectedCallback", this).call(this);
212
+ _get(_getPrototypeOf(CDSTooltip.prototype), "connectedCallback", this).call(this);
216
213
  }
217
214
  }, {
218
215
  kind: "method",
219
216
  key: "updated",
220
217
  value: function updated(changedProperties) {
218
+ var _this$shadowRoot, _this$shadowRoot$quer;
219
+ const {
220
+ selectorTooltipContent
221
+ } = this.constructor;
222
+ const toolTipContent = this.querySelector(selectorTooltipContent);
223
+ if (changedProperties.has('defaultOpen')) {
224
+ this.open = this.defaultOpen;
225
+ }
221
226
  if (changedProperties.has('open')) {
222
- if (!this._menuBody) {
223
- this._menuBody = find(this.childNodes, elem => elem.constructor.FLOATING_MENU);
224
- }
225
- if (this._menuBody) {
226
- this._menuBody.open = this.open;
227
- }
227
+ this.open ? toolTipContent === null || toolTipContent === void 0 ? void 0 : toolTipContent.setAttribute('open', '') : toolTipContent === null || toolTipContent === void 0 ? void 0 : toolTipContent.removeAttribute('open');
228
228
  this.setAttribute('aria-expanded', String(Boolean(this.open)));
229
229
  }
230
- }
231
- }, {
232
- kind: "method",
233
- key: "render",
234
- value: function render() {
235
- const buttonClasses = classMap({
236
- [`${prefix}--popover-container`]: true,
237
- [`${prefix}--popover--caret`]: true,
238
- [`${prefix}--popover--high-contrast`]: true,
239
- [`${prefix}--tooltip`]: true,
240
- [`${prefix}--popover--open`]: this.open,
241
- [`${prefix}--popover--${this.align}`]: true
230
+ ['align', 'caret'].forEach(name => {
231
+ if (changedProperties.has(name)) {
232
+ const {
233
+ [name]: value
234
+ } = this;
235
+ toolTipContent[name] = value;
236
+ }
242
237
  });
243
- return html(_t || (_t = _`
244
- <span class="${0}">
245
- <button class="sb-tooltip-trigger">
246
- ${0}
247
- </button>
248
- <span class="${0}--popover">
249
- <span class="${0}--popover-content ${0}--tooltip-content">
250
- <slot></slot>
251
- </span>
252
- <span class="${0}--popover-caret"> </span>
253
- </span>
254
- </span>
255
- `), buttonClasses, Information16({
256
- id: 'trigger'
257
- }), prefix, prefix, prefix, prefix);
238
+ (_this$shadowRoot = this.shadowRoot) === null || _this$shadowRoot === void 0 ? void 0 : (_this$shadowRoot$quer = _this$shadowRoot.querySelector(`.${prefix}--popover-container`)) === null || _this$shadowRoot$quer === void 0 ? void 0 : _this$shadowRoot$quer.classList.add(`${prefix}--tooltip`);
258
239
  }
240
+
241
+ /**
242
+ * A selector that will return the CDSTooltipContent.
243
+ */
259
244
  }, {
260
245
  kind: "get",
261
246
  static: true,
262
- key: "selectorTooltipBody",
263
- value: function selectorTooltipBody() {
264
- return `.${prefix}--tooltip__content`;
247
+ key: "selectorTooltipContent",
248
+ value: function selectorTooltipContent() {
249
+ return `${prefix}-tooltip-content`;
265
250
  }
266
251
  }, {
267
- kind: "field",
252
+ kind: "get",
268
253
  static: true,
269
254
  key: "styles",
270
- value() {
271
- return styles;
272
- }
255
+ value: function styles() {
256
+ return css(_t || (_t = _`
257
+ ${0}${0}
258
+ `), _get(_getPrototypeOf(CDSTooltip), "styles", this), _styles);
259
+ } // `styles` here is a `CSSResult` generated by custom WebPack loader
273
260
  }]
274
261
  };
275
- }, HostListenerMixin(LitElement));
276
- export default BXTooltip;
262
+ }, HostListenerMixin(CDSPopover));
263
+ export default CDSTooltip;
277
264
  //# sourceMappingURL=tooltip.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tooltip.js","names":["LitElement","html","property","customElement","query","classMap","Information16","prefix","HostListener","HostListenerMixin","find","styles","BXTooltip","_decorate","_initialize","_HostListenerMixin","constructor","args","F","d","kind","key","value","decorators","reflect","type","String","attribute","Number","setTimeout","open","updateComplete","_menuBody$shadowRoot","_menuBody$shadowRoot$","_menuBody","menuBody","shadowRoot","querySelector","selectorTooltipBody","focus","enterDelayMs","exitDelayMs","event","_handleOver","Boolean","triggerPosition","_triggerNode","triggerNode","TypeError","getBoundingClientRect","connectedCallback","hasAttribute","setAttribute","attachShadow","mode","_get","_getPrototypeOf","prototype","call","updated","changedProperties","has","childNodes","elem","FLOATING_MENU","render","buttonClasses","align","_t","_","id","static"],"sources":["components/tooltip/tooltip.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2019, 2023\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { LitElement, html } from 'lit';\nimport { property, customElement, query } from 'lit/decorators.js';\nimport { classMap } from 'lit-html/directives/class-map';\nimport Information16 from '@carbon/icons/lib/information/16';\nimport { prefix } from '../../globals/settings';\nimport HostListener from '../../globals/decorators/host-listener';\nimport HostListenerMixin from '../../globals/mixins/host-listener';\nimport { find } from '../../globals/internal/collection-helpers';\nimport BXFloatingMenu from '../floating-menu/floating-menu';\nimport BXFloatingMenuTrigger from '../floating-menu/floating-menu-trigger';\nimport styles from './tooltip.scss';\n\n/**\n * Trigger button of tooltip.\n *\n * @element cds-tooltip\n */\n@customElement(`${prefix}-tooltip`)\nclass BXTooltip\n extends HostListenerMixin(LitElement)\n implements BXFloatingMenuTrigger\n{\n /**\n * The menu body.\n */\n private _menuBody: BXFloatingMenu | null = null;\n\n /**\n * The trigger button.\n */\n @query('#trigger')\n private _triggerNode!: HTMLElement;\n\n @property({ reflect: true, type: String })\n align = 'bottom';\n\n @property({ reflect: true, type: String })\n duration;\n\n @property({ attribute: 'enter-delay-ms', type: Number })\n enterDelayMs = 100;\n\n @property({ attribute: 'exit-delay-ms', type: Number })\n exitDelayMs = 300;\n\n /**\n * Handles `click` event on this element.\n */\n @HostListener('mouseover')\n // @ts-ignore: The decorator refers to this method but TS thinks this method is not referred to\n private _handleOver = async () => {\n setTimeout(async () => {\n this.open = !this.open;\n const { open, updateComplete } = this;\n if (open) {\n await updateComplete;\n const { _menuBody: menuBody } = this;\n (\n menuBody?.shadowRoot?.querySelector(\n BXTooltip.selectorTooltipBody\n ) as HTMLElement\n )?.focus();\n }\n }, this.enterDelayMs);\n };\n\n /**\n * Handles `keydown` event on this element.\n */\n @HostListener('mouseout')\n // @ts-ignore: The decorator refers to this method but TS thinks this method is not referred to\n private _handleHoverOut = async () => {\n setTimeout(async () => {\n const { open } = this;\n if (open) {\n this.open = !this.open;\n }\n }, this.exitDelayMs);\n };\n\n /**\n * Handles `keydown` event on this element.\n * Space & enter will toggle state, Escape will only close.\n */\n @HostListener('keydown')\n // @ts-ignore: The decorator refers to this method but TS thinks this method is not referred to\n private _handleKeydown = async (event) => {\n if (event.key === ' ' || event.key === 'Enter') {\n this._handleOver();\n }\n };\n\n /**\n * `true` if the dropdown should be open.\n */\n @property({ type: Boolean, reflect: true })\n open = false;\n\n /**\n * @returns The position of the trigger button in the viewport.\n */\n get triggerPosition() {\n const { _triggerNode: triggerNode } = this;\n if (!triggerNode) {\n throw new TypeError('Cannot find the trigger button.');\n }\n return triggerNode.getBoundingClientRect();\n }\n\n connectedCallback() {\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'button');\n }\n if (!this.hasAttribute('tabindex')) {\n // TODO: Should we use a property?\n this.setAttribute('tabindex', '0');\n }\n if (!this.hasAttribute('aria-haspopup')) {\n this.setAttribute('aria-haspopup', 'true');\n }\n if (!this.hasAttribute('aria-expanded')) {\n this.setAttribute('aria-expanded', 'false');\n }\n if (!this.shadowRoot) {\n this.attachShadow({ mode: 'open' });\n }\n super.connectedCallback();\n }\n\n updated(changedProperties) {\n if (changedProperties.has('open')) {\n if (!this._menuBody) {\n this._menuBody = find(\n this.childNodes,\n (elem) => (elem.constructor as typeof BXFloatingMenu).FLOATING_MENU\n );\n }\n if (this._menuBody) {\n this._menuBody.open = this.open;\n }\n this.setAttribute('aria-expanded', String(Boolean(this.open)));\n }\n }\n\n render() {\n const buttonClasses = classMap({\n [`${prefix}--popover-container`]: true,\n [`${prefix}--popover--caret`]: true,\n [`${prefix}--popover--high-contrast`]: true,\n [`${prefix}--tooltip`]: true,\n [`${prefix}--popover--open`]: this.open,\n [`${prefix}--popover--${this.align}`]: true,\n });\n return html`\n <span class=\"${buttonClasses}\">\n <button class=\"sb-tooltip-trigger\">\n ${Information16({ id: 'trigger' })}\n </button>\n <span class=\"${prefix}--popover\">\n <span class=\"${prefix}--popover-content ${prefix}--tooltip-content\">\n <slot></slot>\n </span>\n <span class=\"${prefix}--popover-caret\"> </span>\n </span>\n </span>\n `;\n }\n\n static get selectorTooltipBody() {\n return `.${prefix}--tooltip__content`;\n }\n\n static styles = styles; // `styles` here is a `CSSResult` generated by custom WebPack loader\n}\n\nexport default BXTooltip;\n"],"mappings":";;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,UAAU,EAAEC,IAAI,QAAQ,KAAK;AACtC,SAASC,QAAQ,EAAEC,aAAa,EAAEC,KAAK,QAAQ,mBAAmB;AAClE,SAASC,QAAQ,QAAQ,+BAA+B;AACxD,OAAOC,aAAa,MAAM,4BAAkC;AAC5D,SAASC,MAAM,QAAQ,wBAAwB;AAC/C,OAAOC,YAAY,MAAM,wCAAwC;AACjE,OAAOC,iBAAiB,MAAM,oCAAoC;AAClE,SAASC,IAAI,QAAQ,2CAA2C;AAGhE,OAAOC,MAAM,MAAM,oBAAgB;;AAEnC;AACA;AACA;AACA;AACA,GAJA;AACA;AACA;AACA;AACA;AAJA,IAMMC,SAAS,GAAAC,SAAA,EADdV,aAAa,CAAE,GAAEI,MAAO,UAAS,CAAC,aAAAO,WAAA,EAAAC,kBAAA;EAAnC,MACMH,SAAS,SAAAG,kBAAA,CAGf;IAAAC,YAAA,GAAAC,IAAA;MAAA,SAAAA,IAAA;MAAAH,WAAA;IAAA;EAwJA;EAAC;IAAAI,CAAA,EA3JKN,SAAS;IAAAO,CAAA;MAAAC,IAAA;MAAAC,GAAA;MAAAC,MAAA;QAAA,OAO8B,IAAI;MAAA;IA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,eAAeY,SAAS"}
1
+ {"version":3,"file":"tooltip.js","names":["css","property","customElement","prefix","HostListener","HostListenerMixin","CDSPopover","styles","CDSTooltip","_decorate","_initialize","_HostListenerMixin","constructor","args","F","d","kind","decorators","reflect","type","String","key","value","Boolean","attribute","Number","setTimeout","open","updateComplete","_this$querySelector","selectorTooltipContent","querySelector","focus","enterDelayMs","leaveDelayMs","closeOnActivation","_handleHoverOut","event","_handleSlotChange","target","component","assignedNodes","filter","node","nodeType","Node","TEXT_NODE","textContent","trim","addEventListener","_handleHover","requestUpdate","connectedCallback","hasAttribute","setAttribute","shadowRoot","attachShadow","mode","_get","_getPrototypeOf","prototype","call","updated","changedProperties","_this$shadowRoot","_this$shadowRoot$quer","toolTipContent","has","defaultOpen","removeAttribute","forEach","name","classList","add","static","_t","_"],"sources":["components/tooltip/tooltip.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2019, 2023\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { css } from 'lit';\nimport { property, customElement } from 'lit/decorators.js';\nimport { prefix } from '../../globals/settings';\nimport HostListener from '../../globals/decorators/host-listener';\nimport HostListenerMixin from '../../globals/mixins/host-listener';\nimport CDSPopover from '../popover/popover';\nimport '../popover/popover-content';\nimport styles from './tooltip.scss';\nimport CDSTooltipContent from './tooltip-content';\n\n/**\n * Trigger button of tooltip.\n *\n * @element cds-tooltip\n */\n@customElement(`${prefix}-tooltip`)\nclass CDSTooltip extends HostListenerMixin(CDSPopover) {\n /**\n * Specify how the trigger should align with the tooltip\n */\n @property({ reflect: true, type: String })\n align = 'top';\n\n /**\n * Specify whether the tooltip should be closed when clicked\n */\n @property({ reflect: true, type: Boolean })\n closeOnActivation = false;\n\n /**\n * Specify whether the tooltip should be open when it first renders\n */\n @property({ reflect: true, type: Boolean })\n defaultOpen = false;\n\n /**\n * Specify the duration in milliseconds to delay before displaying the tooltip\n */\n @property({ attribute: 'enter-delay-ms', type: Number })\n enterDelayMs = 100;\n\n /**\n * Specify the duration in milliseconds to delay before hiding the tooltip\n */\n @property({ attribute: 'leave-delay-ms', type: Number })\n leaveDelayMs = 300;\n\n /**\n * Handles `mouseover` event on this element.\n */\n private _handleHover = async () => {\n setTimeout(async () => {\n this.open = true;\n const { open, updateComplete } = this;\n if (open) {\n await updateComplete;\n const { selectorTooltipContent } = this\n .constructor as typeof CDSTooltip;\n (this.querySelector(selectorTooltipContent) as HTMLElement)?.focus();\n }\n }, this.enterDelayMs);\n };\n\n /**\n * Handles `mouseleave` event on this element.\n */\n private _handleHoverOut = async () => {\n setTimeout(async () => {\n const { open } = this;\n if (open) {\n this.open = false;\n }\n }, this.leaveDelayMs);\n };\n\n /**\n * Handles `click` event on this element.\n */\n @HostListener('click')\n // @ts-ignore: The decorator refers to this method but TS thinks this method is not referred to\n private _handleClick = async () => {\n if (this.closeOnActivation) {\n this._handleHoverOut();\n }\n };\n\n /**\n * Handles `keydown` event on this element.\n * Space & enter will toggle state, Escape will only close.\n\n */\n @HostListener('click')\n // @ts-ignore: The decorator refers to this method but TS thinks this method is not referred to\n private _handleKeydown = async (event) => {\n if (event.key === ' ' || event.key === 'Enter' || event.key === 'Escape') {\n this._handleHoverOut();\n }\n };\n\n /**\n * Handles `slotchange` event.\n */\n protected _handleSlotChange({ target }: Event) {\n const component = (target as HTMLSlotElement)\n .assignedNodes()\n .filter(\n (node) => node.nodeType !== Node.TEXT_NODE || node!.textContent!.trim()\n );\n (component[0] as HTMLElement).addEventListener('focus', this._handleHover);\n (component[0] as HTMLElement).addEventListener(\n 'focusout',\n this._handleHoverOut\n );\n (component[0] as HTMLElement).addEventListener(\n 'mouseover',\n this._handleHover\n );\n (component[0] as HTMLElement).addEventListener(\n 'mouseleave',\n this._handleHoverOut\n );\n this.requestUpdate();\n }\n\n connectedCallback() {\n if (!this.hasAttribute('highContrast')) {\n this.setAttribute('highContrast', '');\n }\n if (!this.shadowRoot) {\n this.attachShadow({ mode: 'open' });\n }\n super.connectedCallback();\n }\n\n updated(changedProperties) {\n const { selectorTooltipContent } = this.constructor as typeof CDSTooltip;\n const toolTipContent = this.querySelector(selectorTooltipContent);\n\n if (changedProperties.has('defaultOpen')) {\n this.open = this.defaultOpen;\n }\n\n if (changedProperties.has('open')) {\n this.open\n ? toolTipContent?.setAttribute('open', '')\n : toolTipContent?.removeAttribute('open');\n this.setAttribute('aria-expanded', String(Boolean(this.open)));\n }\n\n ['align', 'caret'].forEach((name) => {\n if (changedProperties.has(name)) {\n const { [name as keyof CDSTooltip]: value } = this;\n (toolTipContent as CDSTooltipContent)[name] = value;\n }\n });\n\n this.shadowRoot\n ?.querySelector(`.${prefix}--popover-container`)\n ?.classList.add(`${prefix}--tooltip`);\n }\n\n /**\n * A selector that will return the CDSTooltipContent.\n */\n static get selectorTooltipContent() {\n return `${prefix}-tooltip-content`;\n }\n\n static get styles() {\n return css`\n ${super.styles}${styles}\n `;\n } // `styles` here is a `CSSResult` generated by custom WebPack loader\n}\n\nexport default CDSTooltip;\n"],"mappings":";;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,GAAG,QAAQ,KAAK;AACzB,SAASC,QAAQ,EAAEC,aAAa,QAAQ,mBAAmB;AAC3D,SAASC,MAAM,QAAQ,wBAAwB;AAC/C,OAAOC,YAAY,MAAM,wCAAwC;AACjE,OAAOC,iBAAiB,MAAM,oCAAoC;AAClE,OAAOC,UAAU,MAAM,oBAAoB;AAC3C,OAAO,4BAA4B;AACnC,OAAOC,OAAM,MAAM,oBAAgB;AAGnC;AACA;AACA;AACA;AACA;AAJA,IAMMC,UAAU,GAAAC,SAAA,EADfP,aAAa,CAAE,GAAEC,MAAO,UAAS,CAAC,aAAAO,WAAA,EAAAC,kBAAA;EAAnC,MACMH,UAAU,SAAAG,kBAAA,CAAuC;IAAAC,YAAA,GAAAC,IAAA;MAAA,SAAAA,IAAA;MAAAH,WAAA;IAAA;EA6JvD;EAAC;IAAAI,CAAA,EA7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