@pine-ds/core 4.10.0 → 4.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (511) hide show
  1. package/components/aria-references.js +1 -0
  2. package/components/attributes.js +1 -1
  3. package/components/index2.js +1 -1
  4. package/components/pds-alert.js +1 -1
  5. package/components/pds-avatar.js +1 -1
  6. package/components/pds-box2.js +1 -1
  7. package/components/pds-button2.js +1 -1
  8. package/components/pds-checkbox2.js +1 -1
  9. package/components/pds-chip2.js +1 -1
  10. package/components/pds-combobox.js +2 -2
  11. package/components/pds-copytext.js +1 -1
  12. package/components/pds-datepicker.js +1 -1
  13. package/components/pds-drawer-content.js +1 -1
  14. package/components/pds-drawer-footer.js +1 -1
  15. package/components/pds-drawer-header.js +1 -1
  16. package/components/pds-drawer.js +1 -1
  17. package/components/pds-dropdown-menu-item.js +1 -1
  18. package/components/pds-dropdown-menu-separator.js +1 -1
  19. package/components/pds-dropdown-menu.js +1 -1
  20. package/components/pds-filter.js +1 -1
  21. package/components/pds-image.js +1 -1
  22. package/components/pds-input2.js +1 -1
  23. package/components/pds-link2.js +1 -1
  24. package/components/pds-loader2.js +1 -1
  25. package/components/pds-modal-footer.js +1 -1
  26. package/components/pds-modal-header.js +1 -1
  27. package/components/pds-modal2.js +1 -1
  28. package/components/pds-multiselect.js +1 -1
  29. package/components/pds-popover.js +1 -1
  30. package/components/pds-progress.js +1 -1
  31. package/components/pds-radio-group.js +1 -1
  32. package/components/pds-radio.js +1 -1
  33. package/components/pds-select.js +1 -1
  34. package/components/pds-sortable-item.js +1 -1
  35. package/components/pds-sortable.js +2 -2
  36. package/components/pds-switch.js +1 -1
  37. package/components/pds-table-body.js +1 -1
  38. package/components/pds-table-cell2.js +1 -1
  39. package/components/pds-table-head-cell2.js +1 -1
  40. package/components/pds-table-head.js +1 -1
  41. package/components/pds-table-row.js +1 -1
  42. package/components/pds-table.js +1 -1
  43. package/components/pds-tabs.js +1 -1
  44. package/components/pds-text2.js +1 -1
  45. package/components/pds-textarea.js +1 -1
  46. package/components/pds-toast.js +1 -1
  47. package/components/pds-tooltip.js +1 -1
  48. package/components/sortable-label.js +1 -0
  49. package/components/truncation-tooltip.js +1 -1
  50. package/dist/cjs/aria-references-CUmqibnO.js +54 -0
  51. package/dist/cjs/{attributes-CW49XqaL.js → attributes-Cgbkw6gO.js} +3 -0
  52. package/dist/cjs/loader.cjs.js +1 -1
  53. package/dist/cjs/pds-alert.cjs.entry.js +2 -2
  54. package/dist/cjs/pds-avatar.cjs.entry.js +3 -2
  55. package/dist/cjs/pds-box.cjs.entry.js +4 -3
  56. package/dist/cjs/pds-button.cjs.entry.js +25 -45
  57. package/dist/cjs/pds-checkbox.cjs.entry.js +4 -4
  58. package/dist/cjs/pds-chip.cjs.entry.js +3 -3
  59. package/dist/cjs/pds-combobox.cjs.entry.js +246 -106
  60. package/dist/cjs/pds-copytext.cjs.entry.js +3 -3
  61. package/dist/cjs/pds-datepicker.cjs.entry.js +295 -82
  62. package/dist/cjs/pds-drawer-content.cjs.entry.js +1 -1
  63. package/dist/cjs/pds-drawer-footer.cjs.entry.js +1 -1
  64. package/dist/cjs/pds-drawer-header.cjs.entry.js +1 -1
  65. package/dist/cjs/pds-drawer.cjs.entry.js +5 -7
  66. package/dist/cjs/pds-dropdown-menu-item.cjs.entry.js +85 -49
  67. package/dist/cjs/pds-dropdown-menu-separator.cjs.entry.js +2 -2
  68. package/dist/cjs/pds-dropdown-menu.cjs.entry.js +83 -10
  69. package/dist/cjs/pds-filter.cjs.entry.js +24 -2
  70. package/dist/cjs/pds-image.cjs.entry.js +148 -6
  71. package/dist/cjs/pds-input.cjs.entry.js +4 -4
  72. package/dist/cjs/pds-link.cjs.entry.js +4 -5
  73. package/dist/cjs/pds-loader.cjs.entry.js +4 -3
  74. package/dist/cjs/pds-modal-footer.cjs.entry.js +1 -1
  75. package/dist/cjs/pds-modal-header.cjs.entry.js +1 -1
  76. package/dist/cjs/pds-modal.cjs.entry.js +9 -12
  77. package/dist/cjs/pds-multiselect.cjs.entry.js +64 -18
  78. package/dist/cjs/pds-popover.cjs.entry.js +8 -6
  79. package/dist/cjs/pds-progress.cjs.entry.js +3 -3
  80. package/dist/cjs/pds-radio-group.cjs.entry.js +4 -4
  81. package/dist/cjs/pds-radio.cjs.entry.js +6 -6
  82. package/dist/cjs/pds-row.cjs.entry.js +1 -1
  83. package/dist/cjs/pds-select.cjs.entry.js +2 -2
  84. package/dist/cjs/pds-sortable-item.cjs.entry.js +28 -5
  85. package/dist/cjs/pds-sortable.cjs.entry.js +356 -4
  86. package/dist/cjs/pds-switch.cjs.entry.js +92 -15
  87. package/dist/cjs/pds-tab.cjs.entry.js +1 -1
  88. package/dist/cjs/pds-table-body.cjs.entry.js +1 -1
  89. package/dist/cjs/pds-table-cell.cjs.entry.js +24 -5
  90. package/dist/cjs/pds-table-head-cell.cjs.entry.js +59 -11
  91. package/dist/cjs/pds-table-head.cjs.entry.js +1 -1
  92. package/dist/cjs/pds-table-row.cjs.entry.js +1 -1
  93. package/dist/cjs/pds-table.cjs.entry.js +260 -5
  94. package/dist/cjs/pds-tabpanel.cjs.entry.js +1 -1
  95. package/dist/cjs/pds-tabs.cjs.entry.js +3 -3
  96. package/dist/cjs/pds-text.cjs.entry.js +5 -3
  97. package/dist/cjs/pds-textarea.cjs.entry.js +8 -7
  98. package/dist/cjs/pds-toast.cjs.entry.js +8 -4
  99. package/dist/cjs/pds-tooltip.cjs.entry.js +1 -1
  100. package/dist/cjs/pine-core.cjs.js +1 -1
  101. package/dist/cjs/sortable-label-DOcJrHvA.js +37 -0
  102. package/dist/cjs/{truncation-tooltip-Bikp7n9I.js → truncation-tooltip-CM5HgRHh.js} +69 -0
  103. package/dist/collection/components/pds-alert/pds-alert.css +0 -3
  104. package/dist/collection/components/pds-alert/pds-alert.js +3 -2
  105. package/dist/collection/components/pds-avatar/pds-avatar.js +7 -6
  106. package/dist/collection/components/pds-avatar/stories/pds-avatar.stories.js +1 -1
  107. package/dist/collection/components/pds-box/pds-box.css +1273 -1189
  108. package/dist/collection/components/pds-box/pds-box.js +180 -156
  109. package/dist/collection/components/pds-box/stories/pds-box.stories.js +79 -37
  110. package/dist/collection/components/pds-button/pds-button.js +26 -4
  111. package/dist/collection/components/pds-button/stories/pds-button.stories.js +25 -11
  112. package/dist/collection/components/pds-checkbox/pds-checkbox.js +10 -10
  113. package/dist/collection/components/pds-chip/pds-chip.js +3 -3
  114. package/dist/collection/components/pds-combobox/pds-combobox.css +162 -53
  115. package/dist/collection/components/pds-combobox/pds-combobox.js +261 -121
  116. package/dist/collection/components/pds-combobox/stories/pds-combobox.stories.js +35 -4
  117. package/dist/collection/components/pds-copytext/pds-copytext.js +2 -2
  118. package/dist/collection/components/pds-datepicker/date-utils.js +42 -0
  119. package/dist/collection/components/pds-datepicker/pds-datepicker.js +164 -65
  120. package/dist/collection/components/pds-datepicker/presets.js +42 -7
  121. package/dist/collection/components/pds-datepicker/stories/pds-datepicker.stories.js +11 -0
  122. package/dist/collection/components/pds-datepicker/value.js +76 -18
  123. package/dist/collection/components/pds-drawer/pds-drawer-content/pds-drawer-content.js +2 -5
  124. package/dist/collection/components/pds-drawer/pds-drawer-footer/pds-drawer-footer.js +2 -1
  125. package/dist/collection/components/pds-drawer/pds-drawer-header/pds-drawer-header.js +2 -1
  126. package/dist/collection/components/pds-drawer/pds-drawer.js +8 -10
  127. package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-item/pds-dropdown-menu-item.css +17 -8
  128. package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-item/pds-dropdown-menu-item.js +95 -62
  129. package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-separator/pds-dropdown-menu-separator.js +3 -3
  130. package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu.css +2 -0
  131. package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu.js +84 -9
  132. package/dist/collection/components/pds-dropdown-menu/stories/pds-dropdown-menu.stories.js +24 -1
  133. package/dist/collection/components/pds-filters/pds-filter/pds-filter.css +2 -1
  134. package/dist/collection/components/pds-filters/pds-filter/pds-filter.js +24 -7
  135. package/dist/collection/components/pds-image/image-interface.js +1 -0
  136. package/dist/collection/components/pds-image/pds-image.css +11 -0
  137. package/dist/collection/components/pds-image/pds-image.js +249 -8
  138. package/dist/collection/components/pds-image/stories/pds-image.stories.js +117 -1
  139. package/dist/collection/components/pds-input/pds-input.js +14 -9
  140. package/dist/collection/components/pds-link/pds-link.js +10 -14
  141. package/dist/collection/components/pds-link/stories/pds-link.stories.js +6 -2
  142. package/dist/collection/components/pds-loader/pds-loader.js +5 -4
  143. package/dist/collection/components/pds-modal/pds-modal-footer/pds-modal-footer.js +2 -1
  144. package/dist/collection/components/pds-modal/pds-modal-header/pds-modal-header.js +2 -1
  145. package/dist/collection/components/pds-modal/pds-modal.js +11 -13
  146. package/dist/collection/components/pds-modal/stories/pds-modal.stories.js +7 -7
  147. package/dist/collection/components/pds-multiselect/pds-multiselect.css +2 -2
  148. package/dist/collection/components/pds-multiselect/pds-multiselect.js +63 -18
  149. package/dist/collection/components/pds-popover/pds-popover.css +1 -1
  150. package/dist/collection/components/pds-popover/pds-popover.js +9 -7
  151. package/dist/collection/components/pds-progress/pds-progress.js +4 -4
  152. package/dist/collection/components/pds-radio/pds-radio.css +5 -1
  153. package/dist/collection/components/pds-radio/pds-radio.js +9 -9
  154. package/dist/collection/components/pds-radio/stories/pds-radio.stories.js +9 -9
  155. package/dist/collection/components/pds-radio-group/pds-radio-group.js +7 -7
  156. package/dist/collection/components/pds-radio-group/stories/pds-radio-group.stories.js +3 -3
  157. package/dist/collection/components/pds-row/stories/pds-row.stories.js +15 -14
  158. package/dist/collection/components/pds-select/pds-select.js +7 -4
  159. package/dist/collection/components/pds-sortable/pds-sortable-item/pds-sortable-item.css +38 -0
  160. package/dist/collection/components/pds-sortable/pds-sortable-item/pds-sortable-item.js +47 -5
  161. package/dist/collection/components/pds-sortable/pds-sortable.js +481 -5
  162. package/dist/collection/components/pds-sortable/sortable-label.js +33 -0
  163. package/dist/collection/components/pds-sortable/stories/pds-sortable.stories.js +27 -0
  164. package/dist/collection/components/pds-switch/pds-switch.js +114 -17
  165. package/dist/collection/components/pds-switch/stories/pds-switch.stories.js +79 -0
  166. package/dist/collection/components/pds-table/pds-table-body/pds-table-body.js +4 -1
  167. package/dist/collection/components/pds-table/pds-table-cell/pds-table-cell.js +47 -4
  168. package/dist/collection/components/pds-table/pds-table-head/pds-table-head.js +6 -2
  169. package/dist/collection/components/pds-table/pds-table-head-cell/pds-table-head-cell.css +11 -0
  170. package/dist/collection/components/pds-table/pds-table-head-cell/pds-table-head-cell.js +98 -10
  171. package/dist/collection/components/pds-table/pds-table-row/pds-table-row.js +5 -1
  172. package/dist/collection/components/pds-table/pds-table.css +8 -0
  173. package/dist/collection/components/pds-table/pds-table.js +295 -7
  174. package/dist/collection/components/pds-table/stories/pds-table.stories.js +131 -6
  175. package/dist/collection/components/pds-tabs/pds-tabs.js +3 -3
  176. package/dist/collection/components/pds-tabs/stories/pds-tabs.stories.js +1 -1
  177. package/dist/collection/components/pds-text/pds-text.js +5 -3
  178. package/dist/collection/components/pds-textarea/pds-textarea.js +16 -14
  179. package/dist/collection/components/pds-textarea/stories/pds-textarea.stories.js +2 -13
  180. package/dist/collection/components/pds-toast/pds-toast.css +4 -3
  181. package/dist/collection/components/pds-toast/pds-toast.js +9 -5
  182. package/dist/collection/components/pds-toast/stories/pds-toast.stories.js +2 -2
  183. package/dist/collection/components/pds-tooltip/pds-tooltip.css +2 -1
  184. package/dist/collection/components/pds-tooltip/stories/pds-tooltip.stories.js +17 -17
  185. package/dist/collection/utils/aria-references.js +9 -3
  186. package/dist/collection/utils/truncation-tooltip.js +67 -0
  187. package/dist/docs.json +1150 -371
  188. package/dist/esm/aria-references-CNn1lObg.js +50 -0
  189. package/dist/esm/{attributes-DkeVeN0g.js → attributes-CD8knu3a.js} +3 -0
  190. package/dist/esm/{index-DvN3tyZp.js → index-B0DXTeeV.js} +1 -1
  191. package/dist/esm/loader.js +1 -1
  192. package/dist/esm/pds-accordion.entry.js +1 -1
  193. package/dist/esm/pds-alert.entry.js +2 -2
  194. package/dist/esm/pds-avatar.entry.js +4 -3
  195. package/dist/esm/pds-box.entry.js +4 -3
  196. package/dist/esm/pds-button.entry.js +24 -44
  197. package/dist/esm/pds-checkbox.entry.js +5 -5
  198. package/dist/esm/pds-chip.entry.js +4 -4
  199. package/dist/esm/pds-combobox.entry.js +246 -106
  200. package/dist/esm/pds-copytext.entry.js +4 -4
  201. package/dist/esm/pds-datepicker.entry.js +296 -83
  202. package/dist/esm/pds-drawer-content.entry.js +1 -1
  203. package/dist/esm/pds-drawer-footer.entry.js +1 -1
  204. package/dist/esm/pds-drawer-header.entry.js +1 -1
  205. package/dist/esm/pds-drawer.entry.js +5 -7
  206. package/dist/esm/pds-dropdown-menu-item.entry.js +85 -49
  207. package/dist/esm/pds-dropdown-menu-separator.entry.js +2 -2
  208. package/dist/esm/pds-dropdown-menu.entry.js +84 -11
  209. package/dist/esm/pds-filter.entry.js +25 -3
  210. package/dist/esm/pds-image.entry.js +149 -7
  211. package/dist/esm/pds-input.entry.js +5 -5
  212. package/dist/esm/pds-link.entry.js +5 -6
  213. package/dist/esm/pds-loader.entry.js +4 -3
  214. package/dist/esm/pds-modal-footer.entry.js +1 -1
  215. package/dist/esm/pds-modal-header.entry.js +1 -1
  216. package/dist/esm/pds-modal.entry.js +9 -12
  217. package/dist/esm/pds-multiselect.entry.js +65 -19
  218. package/dist/esm/pds-popover.entry.js +8 -6
  219. package/dist/esm/pds-progress.entry.js +3 -3
  220. package/dist/esm/pds-radio-group.entry.js +5 -5
  221. package/dist/esm/pds-radio.entry.js +7 -7
  222. package/dist/esm/pds-row.entry.js +1 -1
  223. package/dist/esm/pds-select.entry.js +3 -3
  224. package/dist/esm/pds-sortable-item.entry.js +29 -6
  225. package/dist/esm/pds-sortable.entry.js +357 -5
  226. package/dist/esm/pds-switch.entry.js +94 -17
  227. package/dist/esm/pds-tab.entry.js +1 -1
  228. package/dist/esm/pds-table-body.entry.js +1 -1
  229. package/dist/esm/pds-table-cell.entry.js +24 -5
  230. package/dist/esm/pds-table-head-cell.entry.js +60 -12
  231. package/dist/esm/pds-table-head.entry.js +1 -1
  232. package/dist/esm/pds-table-row.entry.js +1 -1
  233. package/dist/esm/pds-table.entry.js +261 -6
  234. package/dist/esm/pds-tabpanel.entry.js +1 -1
  235. package/dist/esm/pds-tabs.entry.js +3 -3
  236. package/dist/esm/pds-text.entry.js +5 -3
  237. package/dist/esm/pds-textarea.entry.js +9 -8
  238. package/dist/esm/pds-toast.entry.js +8 -4
  239. package/dist/esm/pds-tooltip.entry.js +1 -1
  240. package/dist/esm/pine-core.js +1 -1
  241. package/dist/esm/sortable-label-PItnzVVR.js +35 -0
  242. package/dist/esm/{truncation-tooltip-DBcPipr9.js → truncation-tooltip-CkIWm6Z-.js} +68 -1
  243. package/dist/esm-es5/aria-references-CNn1lObg.js +1 -0
  244. package/dist/esm-es5/{attributes-DkeVeN0g.js → attributes-CD8knu3a.js} +1 -1
  245. package/dist/esm-es5/{index-DvN3tyZp.js → index-B0DXTeeV.js} +1 -1
  246. package/dist/esm-es5/loader.js +1 -1
  247. package/dist/esm-es5/pds-accordion.entry.js +1 -1
  248. package/dist/esm-es5/pds-alert.entry.js +1 -1
  249. package/dist/esm-es5/pds-avatar.entry.js +1 -1
  250. package/dist/esm-es5/pds-box.entry.js +1 -1
  251. package/dist/esm-es5/pds-button.entry.js +1 -1
  252. package/dist/esm-es5/pds-checkbox.entry.js +1 -1
  253. package/dist/esm-es5/pds-chip.entry.js +1 -1
  254. package/dist/esm-es5/pds-combobox.entry.js +1 -1
  255. package/dist/esm-es5/pds-copytext.entry.js +1 -1
  256. package/dist/esm-es5/pds-datepicker.entry.js +1 -1
  257. package/dist/esm-es5/pds-drawer-content.entry.js +1 -1
  258. package/dist/esm-es5/pds-drawer-footer.entry.js +1 -1
  259. package/dist/esm-es5/pds-drawer-header.entry.js +1 -1
  260. package/dist/esm-es5/pds-drawer.entry.js +1 -1
  261. package/dist/esm-es5/pds-dropdown-menu-item.entry.js +1 -1
  262. package/dist/esm-es5/pds-dropdown-menu-separator.entry.js +1 -1
  263. package/dist/esm-es5/pds-dropdown-menu.entry.js +1 -1
  264. package/dist/esm-es5/pds-filter.entry.js +1 -1
  265. package/dist/esm-es5/pds-image.entry.js +1 -1
  266. package/dist/esm-es5/pds-input.entry.js +1 -1
  267. package/dist/esm-es5/pds-link.entry.js +1 -1
  268. package/dist/esm-es5/pds-loader.entry.js +1 -1
  269. package/dist/esm-es5/pds-modal-footer.entry.js +1 -1
  270. package/dist/esm-es5/pds-modal-header.entry.js +1 -1
  271. package/dist/esm-es5/pds-modal.entry.js +1 -1
  272. package/dist/esm-es5/pds-multiselect.entry.js +1 -1
  273. package/dist/esm-es5/pds-popover.entry.js +1 -1
  274. package/dist/esm-es5/pds-progress.entry.js +1 -1
  275. package/dist/esm-es5/pds-radio-group.entry.js +1 -1
  276. package/dist/esm-es5/pds-radio.entry.js +1 -1
  277. package/dist/esm-es5/pds-row.entry.js +1 -1
  278. package/dist/esm-es5/pds-select.entry.js +1 -1
  279. package/dist/esm-es5/pds-sortable-item.entry.js +1 -1
  280. package/dist/esm-es5/pds-sortable.entry.js +2 -2
  281. package/dist/esm-es5/pds-switch.entry.js +1 -1
  282. package/dist/esm-es5/pds-tab.entry.js +1 -1
  283. package/dist/esm-es5/pds-table-body.entry.js +1 -1
  284. package/dist/esm-es5/pds-table-cell.entry.js +1 -1
  285. package/dist/esm-es5/pds-table-head-cell.entry.js +1 -1
  286. package/dist/esm-es5/pds-table-head.entry.js +1 -1
  287. package/dist/esm-es5/pds-table-row.entry.js +1 -1
  288. package/dist/esm-es5/pds-table.entry.js +1 -1
  289. package/dist/esm-es5/pds-tabpanel.entry.js +1 -1
  290. package/dist/esm-es5/pds-tabs.entry.js +1 -1
  291. package/dist/esm-es5/pds-text.entry.js +1 -1
  292. package/dist/esm-es5/pds-textarea.entry.js +1 -1
  293. package/dist/esm-es5/pds-toast.entry.js +1 -1
  294. package/dist/esm-es5/pds-tooltip.entry.js +1 -1
  295. package/dist/esm-es5/pine-core.js +1 -1
  296. package/dist/esm-es5/sortable-label-PItnzVVR.js +1 -0
  297. package/dist/esm-es5/truncation-tooltip-CkIWm6Z-.js +1 -0
  298. package/dist/pine-core/{p-f834cb07.system.entry.js → p-00891b8d.system.entry.js} +1 -1
  299. package/dist/pine-core/{p-3f8bd3fb.system.entry.js → p-053ff8eb.system.entry.js} +1 -1
  300. package/dist/pine-core/p-08b9e3ad.entry.js +1 -0
  301. package/dist/pine-core/{p-4d98bc0c.system.entry.js → p-0a7570dd.system.entry.js} +1 -1
  302. package/dist/pine-core/{p-d018dc60.system.entry.js → p-0ac4262e.system.entry.js} +1 -1
  303. package/dist/pine-core/{p-89d38a82.system.entry.js → p-0e1b8bd1.system.entry.js} +1 -1
  304. package/dist/pine-core/{p-e1d1b5d8.entry.js → p-12fdc65f.entry.js} +1 -1
  305. package/dist/pine-core/{p-d48fe5a0.system.entry.js → p-16fceef6.system.entry.js} +1 -1
  306. package/dist/pine-core/p-1765a41b.system.entry.js +1 -0
  307. package/dist/pine-core/{p-a594c41f.entry.js → p-18524c25.entry.js} +1 -1
  308. package/dist/pine-core/p-1a013a5c.system.entry.js +1 -0
  309. package/dist/pine-core/{p-2b9622c1.system.entry.js → p-1ab52531.system.entry.js} +1 -1
  310. package/dist/pine-core/p-1c584a20.entry.js +1 -0
  311. package/dist/pine-core/p-1edef412.entry.js +1 -0
  312. package/dist/pine-core/{p-5946203c.entry.js → p-1f998e3e.entry.js} +1 -1
  313. package/dist/pine-core/{p-39e57657.entry.js → p-1fb1ca3d.entry.js} +1 -1
  314. package/dist/pine-core/p-2b6becc2.entry.js +1 -0
  315. package/dist/pine-core/p-2cc7c682.entry.js +1 -0
  316. package/dist/pine-core/{p-639acef8.system.entry.js → p-2ddcd845.system.entry.js} +1 -1
  317. package/dist/pine-core/{p-6a1aa8d3.entry.js → p-2f15e85f.entry.js} +1 -1
  318. package/dist/pine-core/{p-67f795d5.system.entry.js → p-33da254f.system.entry.js} +1 -1
  319. package/dist/pine-core/{p-c6a9e62c.system.entry.js → p-3fc9ef80.system.entry.js} +1 -1
  320. package/dist/pine-core/p-4125a4a6.system.entry.js +1 -0
  321. package/dist/pine-core/p-47df9e9f.system.entry.js +3 -0
  322. package/dist/pine-core/p-51680c9c.system.entry.js +1 -0
  323. package/dist/pine-core/p-55535481.system.entry.js +1 -0
  324. package/dist/pine-core/p-55a4659a.system.entry.js +1 -0
  325. package/dist/pine-core/{p-c5e1eb3c.system.entry.js → p-57af5c29.system.entry.js} +1 -1
  326. package/dist/pine-core/p-57edd301.system.entry.js +1 -0
  327. package/dist/pine-core/{p-bfa34194.entry.js → p-5d582798.entry.js} +1 -1
  328. package/dist/pine-core/p-5db87fda.system.entry.js +1 -0
  329. package/dist/pine-core/{p-19cf1d91.system.entry.js → p-5eb0c78c.system.entry.js} +1 -1
  330. package/dist/pine-core/{p-42f70f93.system.entry.js → p-6017afb5.system.entry.js} +1 -1
  331. package/dist/pine-core/{p-63f85859.system.entry.js → p-60e65fe0.system.entry.js} +1 -1
  332. package/dist/pine-core/{p-973c3ac0.entry.js → p-627a94da.entry.js} +1 -1
  333. package/dist/pine-core/{p-a9d96e22.entry.js → p-68328afc.entry.js} +1 -1
  334. package/dist/pine-core/{p-bd7dc317.system.entry.js → p-72668673.system.entry.js} +1 -1
  335. package/dist/pine-core/p-72ff5ad2.system.entry.js +1 -0
  336. package/dist/pine-core/p-736ea7dd.entry.js +7 -0
  337. package/dist/pine-core/p-765f4207.entry.js +1 -0
  338. package/dist/pine-core/{p-2a18852f.entry.js → p-77530cf2.entry.js} +1 -1
  339. package/dist/pine-core/p-77a22399.entry.js +1 -0
  340. package/dist/pine-core/p-783127bf.entry.js +1 -0
  341. package/dist/pine-core/{p-d9719e37.entry.js → p-82f7eed1.entry.js} +1 -1
  342. package/dist/pine-core/{p-124a0a24.entry.js → p-84d4ae26.entry.js} +1 -1
  343. package/dist/pine-core/p-8deeda07.entry.js +1 -0
  344. package/dist/pine-core/{p-849ec281.system.entry.js → p-8e17a6d8.system.entry.js} +1 -1
  345. package/dist/pine-core/p-8e7e7bba.entry.js +1 -0
  346. package/dist/pine-core/{p-e82f758f.system.entry.js → p-907c69e9.system.entry.js} +1 -1
  347. package/dist/pine-core/{p-1415c988.system.entry.js → p-90f83a5b.system.entry.js} +1 -1
  348. package/dist/pine-core/p-97145eee.system.entry.js +1 -0
  349. package/dist/pine-core/{p-a09c9c5e.system.entry.js → p-9d983e09.system.entry.js} +1 -1
  350. package/dist/pine-core/{p-1e3ef425.entry.js → p-9e005996.entry.js} +1 -1
  351. package/dist/pine-core/{p-DvN3tyZp.js → p-B0DXTeeV.js} +1 -1
  352. package/dist/pine-core/{p-CNXspDYs.system.js → p-BlJQebvG.system.js} +1 -1
  353. package/dist/pine-core/p-C35-349-.system.js +1 -0
  354. package/dist/pine-core/{p-vFsJv75D.system.js → p-CIe1DGXa.system.js} +1 -1
  355. package/dist/pine-core/p-CNn1lObg.js +1 -0
  356. package/dist/pine-core/p-CQJ44c6o.system.js +1 -0
  357. package/dist/pine-core/p-Dv9QBmIF.js +1 -0
  358. package/dist/pine-core/p-PItnzVVR.js +1 -0
  359. package/dist/pine-core/p-VPGVqK3P.system.js +1 -0
  360. package/dist/pine-core/p-XK45dzWR.system.js +1 -1
  361. package/dist/pine-core/p-a149af29.entry.js +1 -0
  362. package/dist/pine-core/p-a20d9eca.system.entry.js +1 -0
  363. package/dist/pine-core/{p-f6f4fd42.entry.js → p-a5782d99.entry.js} +1 -1
  364. package/dist/pine-core/p-a5e9c583.entry.js +1 -0
  365. package/dist/pine-core/{p-4d47023c.system.entry.js → p-a9eaf160.system.entry.js} +1 -1
  366. package/dist/pine-core/{p-143b33a6.entry.js → p-b00b07e3.entry.js} +1 -1
  367. package/dist/pine-core/{p-c7a53c4f.entry.js → p-b7b29392.entry.js} +1 -1
  368. package/dist/pine-core/p-b96bdff6.entry.js +1 -0
  369. package/dist/pine-core/{p-f71d71ca.entry.js → p-bbd9ab75.entry.js} +1 -1
  370. package/dist/pine-core/p-bdab6c9f.entry.js +1 -0
  371. package/dist/pine-core/p-biShcgLI.js +1 -0
  372. package/dist/pine-core/{p-548bce53.system.entry.js → p-c12b5cd7.system.entry.js} +1 -1
  373. package/dist/pine-core/p-c1dc7692.entry.js +1 -0
  374. package/dist/pine-core/p-c76d8b9e.system.entry.js +1 -0
  375. package/dist/pine-core/{p-590df41a.entry.js → p-c89ea2d3.entry.js} +1 -1
  376. package/dist/pine-core/{p-d920d759.system.entry.js → p-c9630934.system.entry.js} +1 -1
  377. package/dist/pine-core/{p-6f4ab1ea.system.entry.js → p-cb9227f6.system.entry.js} +1 -1
  378. package/dist/pine-core/p-ceef0eb1.entry.js +1 -0
  379. package/dist/pine-core/p-d1283e8d.entry.js +1 -0
  380. package/dist/pine-core/p-d676926d.system.entry.js +1 -0
  381. package/dist/pine-core/{p-61cfdbb2.entry.js → p-d7d7a4e1.entry.js} +1 -1
  382. package/dist/pine-core/p-d85d50cb.entry.js +1 -0
  383. package/dist/pine-core/p-daa802f1.entry.js +2 -0
  384. package/dist/pine-core/p-ddf4b9b5.system.entry.js +1 -0
  385. package/dist/pine-core/p-de3b319e.system.entry.js +8 -0
  386. package/dist/pine-core/{p-cb9baf78.system.entry.js → p-e00777da.system.entry.js} +1 -1
  387. package/dist/pine-core/p-e2541eeb.entry.js +1 -0
  388. package/dist/pine-core/{p-01f1cdaf.system.entry.js → p-e2a1a49a.system.entry.js} +1 -1
  389. package/dist/pine-core/p-e4ebea88.system.entry.js +1 -0
  390. package/dist/pine-core/{p-947582e1.entry.js → p-e554bd64.entry.js} +1 -1
  391. package/dist/pine-core/{p-dd7ded84.entry.js → p-e6427c87.entry.js} +1 -1
  392. package/dist/pine-core/{p-50ddadbf.entry.js → p-e72e8b8f.entry.js} +1 -1
  393. package/dist/pine-core/p-e92d0f0f.system.entry.js +1 -0
  394. package/dist/pine-core/{p-9b32727a.system.entry.js → p-eab165b9.system.entry.js} +1 -1
  395. package/dist/pine-core/p-eabc4bd8.entry.js +1 -0
  396. package/dist/pine-core/p-ef9f84f2.system.entry.js +1 -0
  397. package/dist/pine-core/{p-c9ae7964.entry.js → p-f026af73.entry.js} +1 -1
  398. package/dist/pine-core/{p-99530cb5.entry.js → p-f0509c8e.entry.js} +1 -1
  399. package/dist/pine-core/p-f1252e72.system.entry.js +1 -0
  400. package/dist/pine-core/p-f3496fd1.entry.js +1 -0
  401. package/dist/pine-core/{p-eecd9ad8.system.entry.js → p-f90f4be7.system.entry.js} +1 -1
  402. package/dist/pine-core/p-f9bdaadd.system.entry.js +1 -0
  403. package/dist/pine-core/{p-128c04e7.entry.js → p-fda791df.entry.js} +1 -1
  404. package/dist/pine-core/p-fea4296d.entry.js +1 -0
  405. package/dist/pine-core/pine-core.esm.js +1 -1
  406. package/dist/types/components/pds-alert/pds-alert.d.ts +2 -1
  407. package/dist/types/components/pds-avatar/pds-avatar.d.ts +5 -4
  408. package/dist/types/components/pds-box/pds-box.d.ts +68 -57
  409. package/dist/types/components/pds-button/pds-button.d.ts +14 -3
  410. package/dist/types/components/pds-checkbox/pds-checkbox.d.ts +15 -8
  411. package/dist/types/components/pds-chip/pds-chip.d.ts +2 -2
  412. package/dist/types/components/pds-combobox/pds-combobox.d.ts +48 -11
  413. package/dist/types/components/pds-copytext/pds-copytext.d.ts +3 -1
  414. package/dist/types/components/pds-datepicker/date-utils.d.ts +19 -0
  415. package/dist/types/components/pds-datepicker/datepicker-interface.d.ts +22 -5
  416. package/dist/types/components/pds-datepicker/pds-datepicker.d.ts +33 -7
  417. package/dist/types/components/pds-datepicker/presets.d.ts +3 -2
  418. package/dist/types/components/pds-datepicker/value.d.ts +14 -2
  419. package/dist/types/components/pds-drawer/pds-drawer-content/pds-drawer-content.d.ts +1 -4
  420. package/dist/types/components/pds-drawer/pds-drawer-footer/pds-drawer-footer.d.ts +1 -0
  421. package/dist/types/components/pds-drawer/pds-drawer-header/pds-drawer-header.d.ts +1 -0
  422. package/dist/types/components/pds-drawer/pds-drawer.d.ts +4 -6
  423. package/dist/types/components/pds-dropdown-menu/pds-dropdown-menu-item/pds-dropdown-menu-item.d.ts +20 -16
  424. package/dist/types/components/pds-dropdown-menu/pds-dropdown-menu-separator/pds-dropdown-menu-separator.d.ts +1 -1
  425. package/dist/types/components/pds-dropdown-menu/pds-dropdown-menu.d.ts +7 -0
  426. package/dist/types/components/pds-filters/pds-filter/pds-filter.d.ts +6 -5
  427. package/dist/types/components/pds-image/image-interface.d.ts +12 -0
  428. package/dist/types/components/pds-image/pds-image.d.ts +69 -9
  429. package/dist/types/components/pds-input/pds-input.d.ts +17 -7
  430. package/dist/types/components/pds-link/pds-link.d.ts +8 -8
  431. package/dist/types/components/pds-loader/pds-loader.d.ts +3 -2
  432. package/dist/types/components/pds-modal/pds-modal-footer/pds-modal-footer.d.ts +1 -0
  433. package/dist/types/components/pds-modal/pds-modal-header/pds-modal-header.d.ts +1 -0
  434. package/dist/types/components/pds-modal/pds-modal.d.ts +7 -9
  435. package/dist/types/components/pds-multiselect/pds-multiselect.d.ts +14 -8
  436. package/dist/types/components/pds-popover/pds-popover.d.ts +2 -2
  437. package/dist/types/components/pds-progress/pds-progress.d.ts +2 -2
  438. package/dist/types/components/pds-radio/pds-radio.d.ts +6 -5
  439. package/dist/types/components/pds-radio-group/pds-radio-group.d.ts +5 -4
  440. package/dist/types/components/pds-select/pds-select.d.ts +9 -3
  441. package/dist/types/components/pds-sortable/pds-sortable-item/pds-sortable-item.d.ts +8 -2
  442. package/dist/types/components/pds-sortable/pds-sortable.d.ts +82 -1
  443. package/dist/types/components/pds-sortable/sortable-label.d.ts +7 -0
  444. package/dist/types/components/pds-switch/pds-switch.d.ts +17 -2
  445. package/dist/types/components/pds-table/pds-table-body/pds-table-body.d.ts +3 -0
  446. package/dist/types/components/pds-table/pds-table-cell/pds-table-cell.d.ts +10 -0
  447. package/dist/types/components/pds-table/pds-table-head/pds-table-head.d.ts +5 -1
  448. package/dist/types/components/pds-table/pds-table-head-cell/pds-table-head-cell.d.ts +21 -0
  449. package/dist/types/components/pds-table/pds-table-row/pds-table-row.d.ts +4 -0
  450. package/dist/types/components/pds-table/pds-table.d.ts +76 -2
  451. package/dist/types/components/pds-tabs/pds-tabs.d.ts +1 -1
  452. package/dist/types/components/pds-textarea/pds-textarea.d.ts +15 -13
  453. package/dist/types/components/pds-toast/pds-toast.d.ts +5 -1
  454. package/dist/types/components.d.ts +505 -335
  455. package/dist/types/utils/aria-references.d.ts +4 -0
  456. package/dist/types/utils/truncation-tooltip.d.ts +39 -0
  457. package/dist/types/utils/types.d.ts +3 -0
  458. package/dist/vscode.html-data.json +350 -137
  459. package/hydrate/index.js +2054 -427
  460. package/hydrate/index.mjs +2054 -427
  461. package/package.json +3 -3
  462. package/readme.md +26 -55
  463. package/dist/esm-es5/truncation-tooltip-DBcPipr9.js +0 -1
  464. package/dist/pine-core/p-07323107.entry.js +0 -1
  465. package/dist/pine-core/p-08b8e941.entry.js +0 -1
  466. package/dist/pine-core/p-0b7b3fc2.system.entry.js +0 -3
  467. package/dist/pine-core/p-0d5f0ab5.system.entry.js +0 -1
  468. package/dist/pine-core/p-14dedf01.system.entry.js +0 -1
  469. package/dist/pine-core/p-1ca8d183.entry.js +0 -1
  470. package/dist/pine-core/p-1f62bb71.entry.js +0 -7
  471. package/dist/pine-core/p-2dd30d12.entry.js +0 -1
  472. package/dist/pine-core/p-35s7h-dk.js +0 -1
  473. package/dist/pine-core/p-3610cb3b.entry.js +0 -1
  474. package/dist/pine-core/p-39276663.entry.js +0 -1
  475. package/dist/pine-core/p-3a1dc752.system.entry.js +0 -1
  476. package/dist/pine-core/p-42d43c3f.system.entry.js +0 -1
  477. package/dist/pine-core/p-4a90b9c8.system.entry.js +0 -1
  478. package/dist/pine-core/p-4cfe922b.entry.js +0 -1
  479. package/dist/pine-core/p-5f181694.system.entry.js +0 -1
  480. package/dist/pine-core/p-60a30975.system.entry.js +0 -1
  481. package/dist/pine-core/p-62aa6a78.system.entry.js +0 -1
  482. package/dist/pine-core/p-64bcb378.entry.js +0 -1
  483. package/dist/pine-core/p-724baba3.system.entry.js +0 -1
  484. package/dist/pine-core/p-72659a0e.system.entry.js +0 -1
  485. package/dist/pine-core/p-8436cbfb.entry.js +0 -1
  486. package/dist/pine-core/p-8ade17ce.entry.js +0 -1
  487. package/dist/pine-core/p-8e7f75e6.entry.js +0 -1
  488. package/dist/pine-core/p-8fb520df.entry.js +0 -1
  489. package/dist/pine-core/p-92115e88.entry.js +0 -1
  490. package/dist/pine-core/p-94c9b7d1.system.entry.js +0 -1
  491. package/dist/pine-core/p-97356d4b.entry.js +0 -1
  492. package/dist/pine-core/p-97653e60.entry.js +0 -1
  493. package/dist/pine-core/p-97b73359.entry.js +0 -1
  494. package/dist/pine-core/p-BZVUD2on.js +0 -1
  495. package/dist/pine-core/p-Dj-z_ugg.system.js +0 -1
  496. package/dist/pine-core/p-ad5208a4.system.entry.js +0 -1
  497. package/dist/pine-core/p-afc2f165.entry.js +0 -1
  498. package/dist/pine-core/p-bcc378ba.system.entry.js +0 -8
  499. package/dist/pine-core/p-c8a0b562.system.entry.js +0 -1
  500. package/dist/pine-core/p-d47b2a6a.system.entry.js +0 -1
  501. package/dist/pine-core/p-d6f338e0.entry.js +0 -1
  502. package/dist/pine-core/p-da8b864a.entry.js +0 -2
  503. package/dist/pine-core/p-db7fb5a3.entry.js +0 -1
  504. package/dist/pine-core/p-de455073.system.entry.js +0 -1
  505. package/dist/pine-core/p-e3de6a1d.entry.js +0 -1
  506. package/dist/pine-core/p-e84fa9ed.entry.js +0 -1
  507. package/dist/pine-core/p-eb4f0daa.system.entry.js +0 -1
  508. package/dist/pine-core/p-eb56af4a.system.entry.js +0 -1
  509. package/dist/pine-core/p-ef0eba9b.system.entry.js +0 -1
  510. package/dist/pine-core/p-f11cce27.system.entry.js +0 -1
  511. package/dist/pine-core/p-f354dbac.entry.js +0 -1
@@ -1,6 +1,6 @@
1
1
  import { h } from "@stencil/core";
2
2
  import { setColor } from "../../utils/utils";
3
- import { FOCUSABLE_WRAPPER, setupTruncationTooltip } from "../../utils/truncation-tooltip";
3
+ import { FOCUSABLE_WRAPPER, flattenedText, setupTruncationTooltip } from "../../utils/truncation-tooltip";
4
4
  import { TEXT_SIZES } from "../../utils/types";
5
5
  // Re-runs setup for each text bound to its wrapping control, keyed by host, so a truncated
6
6
  // text that joins the same control later can take that control's focus away from it.
@@ -80,7 +80,9 @@ export class PdsText {
80
80
  this.truncationCleanup = setupTruncationTooltip({
81
81
  hostEl: this.el,
82
82
  contentEl: this.contentEl,
83
- getTooltipText: () => this.el.textContent || '',
83
+ // Not `textContent`: a consumer that wraps its own slot in this text, as `pds-alert` does, holds a
84
+ // `<slot>` here, which counts as empty and would leave the tooltip with nothing to show.
85
+ getTooltipText: () => flattenedText(this.el),
84
86
  // A wrapping link or button already takes focus, so its focus reveals the text instead of a nested tab stop.
85
87
  manageTabIndex: !usesWrapper,
86
88
  focusEl: usesWrapper ? wrapper : this.el,
@@ -116,7 +118,7 @@ export class PdsText {
116
118
  ? `pds-text--decoration-${this.decoration}`
117
119
  : ''}
118
120
  `;
119
- return (h(Tag, { key: '30566c7810d3fd7f76ae281ae6d9a7e66803f0a3', ref: (el) => (this.contentEl = el), style: this.color && setColor(this.color), class: typeClasses, part: "content" }, h("slot", { key: 'f5113458aa9295803fc1c0bc552f9f92602cacba' })));
121
+ return (h(Tag, { key: '3b9efbad7872410a7e07438801ec17382282ab16', ref: (el) => (this.contentEl = el), style: this.color && setColor(this.color), class: typeClasses, part: "content" }, h("slot", { key: '0784e6aee6ce23f93f0e3c077da5fa3ca944aebb' })));
120
122
  }
121
123
  static get is() { return "pds-text"; }
122
124
  static get encapsulation() { return "shadow"; }
@@ -6,6 +6,7 @@ import { danger } from "@pine-ds/icons/icons";
6
6
  import { formatMessage } from "../../i18n";
7
7
  /**
8
8
  * @slot action - Content to be displayed in the label area, typically for help icons or links
9
+ * @part action - Exposes the wrapper around the `action` slot for styling. Appears only when the `action` slot has content.
9
10
  */
10
11
  export class PdsTextarea {
11
12
  constructor() {
@@ -17,12 +18,13 @@ export class PdsTextarea {
17
18
  */
18
19
  this.disabled = false;
19
20
  /**
20
- * Determines whether or not the textarea is invalid or throws an error.
21
+ * Determines whether or not the textarea is invalid. When `required` is set, the textarea sets it
22
+ * itself each time `pdsTextareaChange` fires, replacing a value you set.
21
23
  * @defaultValue false
22
24
  */
23
25
  this.invalid = false; // eslint-disable-line @stencil-community/strict-mutable
24
26
  /**
25
- * Specifies the name. Submitted with the form name/value pair. This value will mirror the componentId.
27
+ * Specifies the name. Submitted with the form name/value pair.
26
28
  */
27
29
  this.name = this.componentId;
28
30
  /**
@@ -306,10 +308,10 @@ export class PdsTextarea {
306
308
  }
307
309
  render() {
308
310
  const value = this.getValue();
309
- return (h(Host, { key: '76e445d135191df3090620f2c2eaf6ed8d7eb9cb', "aria-disabled": this.disabled ? 'true' : null, "aria-readonly": this.readonly ? 'true' : null, "has-action": this.hasAction && !this.hideLabel ? 'true' : null }, h("div", { key: '836815333b0ca925bc205a4b8b25086fe82fcedc', class: "pds-textarea" }, this.label &&
310
- h("div", { key: 'e8633457c994d3387ec277fd9945afb2c653d27a', class: "pds-textarea__label-wrapper" }, h("label", { key: '977bb1c171b68242ab06e01ef94ecc4e4cb26880', htmlFor: this.componentId }, h("span", { key: 'ef87433d6524296b3153e8d04e6406c9287e3f2e', class: this.hideLabel ? 'visually-hidden' : '' }, this.label)), !this.hideLabel && this.renderAction()), h("div", { key: '92952c76f5f4a87da4953f792a9a5589d7765451', class: "pds-textarea__field-wrapper" }, h("textarea", Object.assign({ key: 'a61f39d0e299cb6b3e6d1beed37805ad9a71b579', ref: (el) => this.nativeTextarea = el, "aria-describedby": assignDescription(this.componentId, this.invalid, this.helperMessage, this.errorMessage), "aria-invalid": this.invalid ? "true" : undefined, autocomplete: this.autocomplete, class: this.textareaClassNames(), disabled: this.disabled, id: this.componentId, maxlength: this.maxLength, name: this.name, placeholder: this.placeholder, readOnly: this.readonly, required: this.required, rows: this.rows, onBlur: this.onBlur, onChange: this.onTextareaChange, onFocus: this.onFocus, onInput: this.onInput, onKeyDown: this.onKeyDown }, this.inheritedAttributes), value), this.renderCharacterCounter()), this.helperMessage &&
311
- h("p", { key: '811065b7ce7b45d902d821dbceb25fef4231db94', class: "pds-textarea__helper-message", id: messageId(this.componentId, 'helper') }, this.helperMessage), this.invalid &&
312
- h("p", { key: 'f95f566b79215a4a128fe92c02be244219f843e5', "aria-live": "assertive", class: "pds-textarea__error-message", id: messageId(this.componentId, 'error') }, h("pds-icon", { key: '08f649e4b32551d59d60b978262cd7beaa99e08d', "aria-hidden": "true", icon: danger, size: "small" }), this.errorMessage))));
311
+ return (h(Host, { key: '96f8863a39579b421057fa9b2857753785d4c585', "aria-disabled": this.disabled ? 'true' : null, "aria-readonly": this.readonly ? 'true' : null, "has-action": this.hasAction && !this.hideLabel ? 'true' : null }, h("div", { key: '89ae283a1674af03795c0443ee7fea2bac658c9e', class: "pds-textarea" }, this.label &&
312
+ h("div", { key: '7da482f50cfbf7361c457d79e9185bdf204d728d', class: "pds-textarea__label-wrapper" }, h("label", { key: '3c1a24beae7a190e11a686c4f15dbc175221db0b', htmlFor: this.componentId }, h("span", { key: '7d2f5618fe0893bca5926237adfc610adfaf7cc7', class: this.hideLabel ? 'visually-hidden' : '' }, this.label)), !this.hideLabel && this.renderAction()), h("div", { key: '371d16fe7e0446658316d4f2047776ef4429346c', class: "pds-textarea__field-wrapper" }, h("textarea", Object.assign({ key: '6e433b544a20b82d16ce8522196c41ca8b22411f', ref: (el) => this.nativeTextarea = el, "aria-describedby": assignDescription(this.componentId, this.invalid, this.helperMessage, this.errorMessage), "aria-invalid": this.invalid ? "true" : undefined, autocomplete: this.autocomplete, class: this.textareaClassNames(), disabled: this.disabled, id: this.componentId, maxlength: this.maxLength, name: this.name, placeholder: this.placeholder, readOnly: this.readonly, required: this.required, rows: this.rows, onBlur: this.onBlur, onChange: this.onTextareaChange, onFocus: this.onFocus, onInput: this.onInput, onKeyDown: this.onKeyDown }, this.inheritedAttributes), value), this.renderCharacterCounter()), this.helperMessage &&
313
+ h("p", { key: '7b7117493340f25be2c4d18b48e00add775155d3', class: "pds-textarea__helper-message", id: messageId(this.componentId, 'helper') }, this.helperMessage), this.invalid &&
314
+ h("p", { key: '79a604af17aa9a6735d44aa52a858881e053de43', "aria-live": "assertive", class: "pds-textarea__error-message", id: messageId(this.componentId, 'error') }, h("pds-icon", { key: '765e5df4a34b583183f1ceeb92fb596067d4a212', "aria-hidden": "true", icon: danger, size: "small" }), this.errorMessage))));
313
315
  }
314
316
  static get is() { return "pds-textarea"; }
315
317
  static get encapsulation() { return "shadow"; }
@@ -399,7 +401,7 @@ export class PdsTextarea {
399
401
  "optional": true,
400
402
  "docs": {
401
403
  "tags": [],
402
- "text": "The amount of time, in milliseconds, to wait to trigger the event after each keystroke."
404
+ "text": "Sets the number of milliseconds to wait after each input event before emitting `pdsInput`."
403
405
  },
404
406
  "getter": false,
405
407
  "setter": false,
@@ -418,7 +420,7 @@ export class PdsTextarea {
418
420
  "optional": true,
419
421
  "docs": {
420
422
  "tags": [],
421
- "text": "Displays an error message below the textarea field."
423
+ "text": "Displays an error message below the textarea while `invalid` is set."
422
424
  },
423
425
  "getter": false,
424
426
  "setter": false,
@@ -459,7 +461,7 @@ export class PdsTextarea {
459
461
  "name": "defaultValue",
460
462
  "text": "false"
461
463
  }],
462
- "text": "Determines whether or not the textarea is invalid or throws an error."
464
+ "text": "Determines whether or not the textarea is invalid. When `required` is set, the textarea sets it\nitself each time `pdsTextareaChange` fires, replacing a value you set."
463
465
  },
464
466
  "getter": false,
465
467
  "setter": false,
@@ -517,7 +519,7 @@ export class PdsTextarea {
517
519
  "optional": false,
518
520
  "docs": {
519
521
  "tags": [],
520
- "text": "Specifies the name. Submitted with the form name/value pair. This value will mirror the componentId."
522
+ "text": "Specifies the name. Submitted with the form name/value pair."
521
523
  },
522
524
  "getter": false,
523
525
  "setter": false,
@@ -707,7 +709,7 @@ export class PdsTextarea {
707
709
  "composed": true,
708
710
  "docs": {
709
711
  "tags": [],
710
- "text": "Emitted when the input loses focus."
712
+ "text": "Emitted when the textarea loses focus."
711
713
  },
712
714
  "complexType": {
713
715
  "original": "FocusEvent",
@@ -727,7 +729,7 @@ export class PdsTextarea {
727
729
  "composed": true,
728
730
  "docs": {
729
731
  "tags": [],
730
- "text": "Emitted when the input has focus."
732
+ "text": "Emitted when the textarea has focus."
731
733
  },
732
734
  "complexType": {
733
735
  "original": "FocusEvent",
@@ -747,7 +749,7 @@ export class PdsTextarea {
747
749
  "composed": true,
748
750
  "docs": {
749
751
  "tags": [],
750
- "text": "Emitted when a keyboard input occurs.\n\nFor elements that accept text input (`type=text`, `type=tel`, etc.), the interface\nis [`InputEvent`](https://developer.mozilla.org/en-US/docs/Web/API/InputEvent); for others,\nthe interface is [`Event`](https://developer.mozilla.org/en-US/docs/Web/API/Event). If\nthe input is cleared on edit, the type is `null`."
752
+ "text": "Emitted after each `input` event, such as typing or pasting. With `debounce`, it waits until that many milliseconds have passed since the last one.\n`detail` has `value`, the current text, and `event`, the native `input` event.\n\nThis event will not emit when programmatically setting the `value` property."
751
753
  },
752
754
  "complexType": {
753
755
  "original": "TextareaInputEventDetail",
@@ -769,7 +771,7 @@ export class PdsTextarea {
769
771
  "composed": true,
770
772
  "docs": {
771
773
  "tags": [],
772
- "text": "Event emitted whenever the value of the textarea changes.\n\nThis event will not emit when programmatically setting the `value` property."
774
+ "text": "Emitted when the user changes the value and then leaves the textarea. `Enter` adds a new line, so it doesn't emit this event.\n`detail` has `value`, the text, and `event`, the native event behind it, usually `change`.\n\nThis event will not emit when programmatically setting the `value` property, unless the field has focus at the time;\nthen it emits when the field loses focus."
773
775
  },
774
776
  "complexType": {
775
777
  "original": "TextareaChangeEventDetail",
@@ -5,7 +5,6 @@ export default {
5
5
 
6
6
  args: {
7
7
  autocomplete: null,
8
- clearOnEdit: false,
9
8
  componentId: null,
10
9
  debounce: null,
11
10
  disabled: false,
@@ -29,7 +28,6 @@ export default {
29
28
 
30
29
  const BaseTemplate = (args) => html`<pds-textarea
31
30
  autocomplete="${args.autocomplete}"
32
- ?clear-on-edit=${args.clearOnEdit}
33
31
  component-id="${args.componentId}"
34
32
  ?disabled=${args.disabled}
35
33
  error-message="${args.errorMessage}"
@@ -40,14 +38,11 @@ const BaseTemplate = (args) => html`<pds-textarea
40
38
  label="${args.label}"
41
39
  max-length="${args.maxLength}"
42
40
  name="${args.name}"
43
- onChange="${args.onChange}"
44
41
  placeholder="${args.placeholder}"
45
42
  ?readonly=${args.readonly}
46
43
  ?required=${args.required}
47
44
  rows="${args.rows}"
48
45
  value="${args.value}"
49
- data-tooltip-id="foo"
50
- title="bar"
51
46
  >
52
47
  ${args.action || ''}
53
48
  </pds-textarea>`;
@@ -138,7 +133,6 @@ Autocomplete.args = {
138
133
 
139
134
  export const withActionLink = (args) => html`<pds-textarea
140
135
  autocomplete="${args.autocomplete}"
141
- ?clear-on-edit=${args.clearOnEdit}
142
136
  component-id="pds-textarea-action-link"
143
137
  ?disabled=${args.disabled}
144
138
  error-message="${args.errorMessage}"
@@ -148,14 +142,12 @@ export const withActionLink = (args) => html`<pds-textarea
148
142
  ?invalid=${args.invalid}
149
143
  label="Notes"
150
144
  name="${args.name}"
151
- onChange="${args.onChange}"
152
145
  placeholder="${args.placeholder}"
153
146
  ?readonly=${args.readonly}
154
147
  ?required=${args.required}
155
148
  rows="3"
156
149
  value="${args.value}"
157
- data-tooltip-id="foo"
158
- title="bar">
150
+ >
159
151
  <pds-link href="#" slot="action">
160
152
  View examples
161
153
  </pds-link>
@@ -163,7 +155,6 @@ export const withActionLink = (args) => html`<pds-textarea
163
155
 
164
156
  export const withActionButton = (args) => html`<pds-textarea
165
157
  autocomplete="${args.autocomplete}"
166
- ?clear-on-edit=${args.clearOnEdit}
167
158
  component-id="pds-textarea-action-button"
168
159
  ?disabled=${args.disabled}
169
160
  error-message="${args.errorMessage}"
@@ -173,14 +164,12 @@ export const withActionButton = (args) => html`<pds-textarea
173
164
  ?invalid=${args.invalid}
174
165
  label="Description"
175
166
  name="${args.name}"
176
- onChange="${args.onChange}"
177
167
  placeholder="${args.placeholder}"
178
168
  ?readonly=${args.readonly}
179
169
  ?required=${args.required}
180
170
  rows="4"
181
171
  value="${args.value}"
182
- data-tooltip-id="foo"
183
- title="bar">
172
+ >
184
173
  <pds-button slot="action" variant="unstyled" aria-label="Help with description">
185
174
  <pds-icon name="question-circle" aria-hidden="true"></pds-icon>
186
175
  </pds-button>
@@ -18,13 +18,14 @@
18
18
  background-color: var(--pine-color-primary);
19
19
  border-radius: var(--pine-dimension-xs);
20
20
  box-shadow: var(--pine-box-shadow);
21
+ box-sizing: border-box;
21
22
  color: var(--pine-color-text-primary);
22
23
  display: flex;
23
24
  height: var(--sizing-height-default);
24
25
  justify-content: flex-start;
25
26
  margin-block-end: var(--pine-dimension-2xs);
26
- max-width: 90vw;
27
- min-width: var(--sizing-min-width);
27
+ max-width: calc(90vw + var(--padding-inline) * 2);
28
+ min-width: calc(var(--sizing-min-width) + var(--padding-inline) * 2);
28
29
  padding: 0 var(--padding-inline);
29
30
  position: relative;
30
31
  width: fit-content;
@@ -32,7 +33,7 @@
32
33
  @media screen and (max-width: 767px) {
33
34
  .pds-toast {
34
35
  height: 36px;
35
- max-width: calc(100vw - var(--pine-dimension-2xs) * 2);
36
+ max-width: 100vw;
36
37
  min-width: auto;
37
38
  padding-inline: var(--pine-dimension-2xs);
38
39
  }
@@ -2,7 +2,7 @@ import { h, Host } from "@stencil/core";
2
2
  /** Fallback when computed `--animation-duration` is unavailable (matches `--pine-motion-duration-slow`). */
3
3
  const TOAST_DISMISS_ANIMATION_MS = 300;
4
4
  /**
5
- * @part dismiss
5
+ * @part dismiss - Exposes the dismiss button for styling. Appears unless `dismissible` is `false`.
6
6
  */
7
7
  export class PdsToast {
8
8
  constructor() {
@@ -58,6 +58,10 @@ export class PdsToast {
58
58
  this.startDismissTimer();
59
59
  }
60
60
  }
61
+ /**
62
+ * Dismisses the toast, as the dismiss button and `duration` do: plays the exit animation and emits `pdsToastDismissed`, and the toast
63
+ * gets `hidden` on the next render, after the event. Works even when `dismissible` is `false`. The toast stays in the DOM.
64
+ */
61
65
  async dismiss() {
62
66
  // Start the animation out
63
67
  this.isAnimatingOut = true;
@@ -127,13 +131,13 @@ export class PdsToast {
127
131
  }
128
132
  render() {
129
133
  const severity = this.severityText();
130
- return (h(Host, { key: '4c4077add1843ab84674dfa49fb963df55f1c432', hidden: !this.isVisible }, h("div", { key: '0d819ac123de625604d3b1aa0f9391366b4d0289', class: {
134
+ return (h(Host, { key: '89a7a4a9105730769c83cbb39af3cec31d1a39da', hidden: !this.isVisible }, h("div", { key: '6543b52aea9ba5e956f894148e965619c8836432', class: {
131
135
  'pds-toast': true,
132
136
  [`pds-toast--${this.type}`]: this.type !== 'default',
133
137
  'pds-toast--animating-out': this.isAnimatingOut
134
- }, role: "alert", "aria-live": "polite" }, this.renderIcon(), severity && h("span", { key: 'f75fb422797082e99acb85432c1b50cf702d7afc', class: "visually-hidden" }, severity), h("span", { key: '3d9f03d96dbda41c72d2c2cc492b1422928d573f', class: "pds-toast__message" }, h("slot", { key: 'affc7e4cb592735ec396fa90a9405f25b389e4bd' })), this.dismissible && (h("button", { key: '0c4ef459dda09b8a196eed7ee28383995d959b11', type: "button", part: "dismiss", class: "pds-toast__button", onClick: () => {
138
+ }, role: "alert", "aria-live": "polite" }, this.renderIcon(), severity && h("span", { key: 'c2ec7185878dd0d00f0cf12c29080b716997f2c2', class: "visually-hidden" }, severity), h("span", { key: '0274afc2c23f43d7cd50a42fc999d82f91ad026d', class: "pds-toast__message" }, h("slot", { key: 'daba1b8fb461ffeb9c662d6c30f5cc93ca7c08f9' })), this.dismissible && (h("button", { key: '56cd7eb04c759acdaa850d230a5204eb2cae87f0', type: "button", part: "dismiss", class: "pds-toast__button", onClick: () => {
135
139
  this.dismiss();
136
- }, "aria-label": this.dismissLabel }, h("pds-icon", { key: '1b26a6a842868a5b1e55b7110c755edc7f830ba5', name: "remove", "aria-hidden": "true" }))))));
140
+ }, "aria-label": this.dismissLabel }, h("pds-icon", { key: '95b08c3cbe0fb015515884484cf5ea28f7f0025c', name: "remove", "aria-hidden": "true" }))))));
137
141
  }
138
142
  static get is() { return "pds-toast"; }
139
143
  static get encapsulation() { return "shadow"; }
@@ -342,7 +346,7 @@ export class PdsToast {
342
346
  "return": "Promise<void>"
343
347
  },
344
348
  "docs": {
345
- "text": "",
349
+ "text": "Dismisses the toast, as the dismiss button and `duration` do: plays the exit animation and emits `pdsToastDismissed`, and the toast\ngets `hidden` on the next render, after the event. Works even when `dismissible` is `false`. The toast stays in the DOM.",
346
350
  "tags": []
347
351
  }
348
352
  }
@@ -11,7 +11,7 @@ export default {
11
11
 
12
12
  const BaseTemplate = (args) => html`
13
13
  <pds-toast
14
- ?dismissible=${args.dismissible}
14
+ dismissible="${args.dismissible}"
15
15
  component-id="${args.componentId}"
16
16
  duration="${args.duration}"
17
17
  icon="${args.icon || ''}"
@@ -23,7 +23,7 @@ const BaseTemplate = (args) => html`
23
23
 
24
24
  const WithLinkTemplate = (args) => html`
25
25
  <pds-toast
26
- ?dismissible=${args.dismissible}
26
+ dismissible="${args.dismissible}"
27
27
  component-id="${args.componentId}"
28
28
  duration="${args.duration}"
29
29
  icon="${args.icon || ''}"
@@ -5,7 +5,7 @@
5
5
  --tooltip-border-width-arrow-up: 0 var(--tooltip-sizing-arrow) var(--tooltip-sizing-arrow);
6
6
  --tooltip-sizing-arrow: 6px;
7
7
  --tooltip-sizing-arrow-offset: 14px;
8
- --tooltip-dimension-max-width: 320px;
8
+ --tooltip-dimension-max-width: 344px;
9
9
  }
10
10
 
11
11
  :is(dialog, [popover]) > .pds-tooltip {
@@ -23,6 +23,7 @@
23
23
  background-color: var(--pine-color-primary);
24
24
  border-radius: calc(var(--pine-dimension-xs) * 1.25);
25
25
  box-shadow: var(--pine-box-shadow);
26
+ box-sizing: border-box;
26
27
  color: var(--pine-color-text-primary);
27
28
  max-width: var(--tooltip-dimension-max-width);
28
29
  opacity: 0;
@@ -9,10 +9,10 @@ export default {
9
9
  }
10
10
 
11
11
  const BaseTemplate = (args) => html`
12
- <pds-tooltip content=${args.content} max-width=${args.maxWidth} ?has-arrow=${args.hasArrow} placement=${args.placement} ?opened=${args.opened}>${args.slot}</pds-tooltip>`;
12
+ <pds-tooltip content=${args.content} max-width=${args.maxWidth} has-arrow="${args.hasArrow}" placement=${args.placement} ?opened=${args.opened}>${args.slot}</pds-tooltip>`;
13
13
 
14
14
  const HTMLContentTemplate = (args) => html`
15
- <pds-tooltip ?has-arrow=${args.hasArrow} max-width=${args.maxWidth} placement=${args.placement} ?html-content=${args.htmlContent} ?opened=${args.opened}>
15
+ <pds-tooltip has-arrow="${args.hasArrow}" max-width=${args.maxWidth} placement=${args.placement} ?html-content=${args.htmlContent} ?opened=${args.opened}>
16
16
  <div slot="content">
17
17
  <p><strong>This is a tooltip</strong></p>
18
18
  <p>Tooltips are used to describe or identify an element. In most scenarios, tooltips help the user understand the meaning, function or alt-text of an element.</p>
@@ -25,7 +25,7 @@ const InModalTemplate = (args) => html`
25
25
  <pds-modal id="tooltip-modal" component-id="tooltip-modal" size="sm">
26
26
  <pds-modal-header>
27
27
  <pds-box padding="md">
28
- <pds-text tag="h2" size="h3">Publish changes</pds-text>
28
+ <pds-text tag="h2" size="h3" id="tooltip-modal-heading">Publish changes</pds-text>
29
29
  </pds-box>
30
30
  </pds-modal-header>
31
31
  <pds-modal-content>
@@ -36,7 +36,7 @@ const InModalTemplate = (args) => html`
36
36
  <pds-modal-footer>
37
37
  <pds-box fit gap="sm" justify-content="end" padding="md">
38
38
  <pds-button variant="secondary" onclick="document.querySelector('#tooltip-modal').open = false">Cancel</pds-button>
39
- <pds-tooltip content=${args.content} ?has-arrow=${args.hasArrow} placement=${args.placement}>
39
+ <pds-tooltip content=${args.content} has-arrow="${args.hasArrow}" placement=${args.placement}>
40
40
  <pds-button variant="primary">Publish</pds-button>
41
41
  </pds-tooltip>
42
42
  </pds-box>
@@ -47,46 +47,46 @@ const PositionTemplate = (args) => html`
47
47
  <div class="demo-container" style="min-height: 50vh; width: 100%; display: flex; align-items: center; justify-content: center;">
48
48
  <div class="position-demo-grid">
49
49
  <div class="position-demo-grid-item">
50
- <pds-tooltip content="content 2" ?has-arrow=${args.hasArrow} max-width=${args.maxWidth} placement="top-start" ?opened=${args.opened}>
50
+ <pds-tooltip content="content 2" has-arrow="${args.hasArrow}" max-width=${args.maxWidth} placement="top-start" ?opened=${args.opened}>
51
51
  <pds-button variant="accent">t</pds-button>
52
52
  </pds-tooltip>
53
- <pds-tooltip content="content 2" ?has-arrow=${args.hasArrow} max-width=${args.maxWidth} placement="top" ?opened=${args.opened}>
53
+ <pds-tooltip content="content 2" has-arrow="${args.hasArrow}" max-width=${args.maxWidth} placement="top" ?opened=${args.opened}>
54
54
  <pds-button variant="accent">t</pds-button>
55
55
  </pds-tooltip>
56
- <pds-tooltip content="content 3" ?has-arrow=${args.hasArrow} max-width=${args.maxWidth} placement="top-end" ?opened=${args.opened}>
56
+ <pds-tooltip content="content 3" has-arrow="${args.hasArrow}" max-width=${args.maxWidth} placement="top-end" ?opened=${args.opened}>
57
57
  <pds-button variant="accent">te</pds-button>
58
58
  </pds-tooltip>
59
59
  </div>
60
60
  <div class="position-demo-grid-item">
61
- <pds-tooltip content="content 1" ?has-arrow=${args.hasArrow} max-width=${args.maxWidth} placement="left-start" ?opened=${args.opened}>
61
+ <pds-tooltip content="content 1" has-arrow="${args.hasArrow}" max-width=${args.maxWidth} placement="left-start" ?opened=${args.opened}>
62
62
  <pds-button variant="accent">ls</pds-button>
63
63
  </pds-tooltip>
64
- <pds-tooltip content="content 2" ?has-arrow=${args.hasArrow} max-width=${args.maxWidth} placement="left" ?opened=${args.opened}>
64
+ <pds-tooltip content="content 2" has-arrow="${args.hasArrow}" max-width=${args.maxWidth} placement="left" ?opened=${args.opened}>
65
65
  <pds-button variant="accent">l</pds-button>
66
66
  </pds-tooltip>
67
- <pds-tooltip content="content 3" ?has-arrow=${args.hasArrow} max-width=${args.maxWidth} placement="left-end" ?opened=${args.opened}>
67
+ <pds-tooltip content="content 3" has-arrow="${args.hasArrow}" max-width=${args.maxWidth} placement="left-end" ?opened=${args.opened}>
68
68
  <pds-button variant="accent">le</pds-button>
69
69
  </pds-tooltip>
70
70
  </div>
71
71
  <div class="position-demo-grid-item">
72
- <pds-tooltip content="content 1" ?has-arrow=${args.hasArrow} max-width=${args.maxWidth} placement="bottom-start" ?opened=${args.opened}>
72
+ <pds-tooltip content="content 1" has-arrow="${args.hasArrow}" max-width=${args.maxWidth} placement="bottom-start" ?opened=${args.opened}>
73
73
  <pds-button variant="accent">bs</pds-button>
74
74
  </pds-tooltip>
75
- <pds-tooltip content="content 2" ?has-arrow=${args.hasArrow} max-width=${args.maxWidth} placement="bottom" ?opened=${args.opened}>
75
+ <pds-tooltip content="content 2" has-arrow="${args.hasArrow}" max-width=${args.maxWidth} placement="bottom" ?opened=${args.opened}>
76
76
  <pds-button variant="accent">b</pds-button>
77
77
  </pds-tooltip>
78
- <pds-tooltip content="content 3" ?has-arrow=${args.hasArrow} max-width=${args.maxWidth} placement="bottom-end" ?opened=${args.opened}>
78
+ <pds-tooltip content="content 3" has-arrow="${args.hasArrow}" max-width=${args.maxWidth} placement="bottom-end" ?opened=${args.opened}>
79
79
  <pds-button variant="accent">be</pds-button>
80
80
  </pds-tooltip>
81
81
  </div>
82
82
  <div class="position-demo-grid-item">
83
- <pds-tooltip content="content 1" ?has-arrow=${args.hasArrow} max-width=${args.maxWidth} placement="right-start" ?opened=${args.opened}>
83
+ <pds-tooltip content="content 1" has-arrow="${args.hasArrow}" max-width=${args.maxWidth} placement="right-start" ?opened=${args.opened}>
84
84
  <pds-button variant="accent">rs</pds-button>
85
85
  </pds-tooltip>
86
- <pds-tooltip content="content 2" ?has-arrow=${args.hasArrow} max-width=${args.maxWidth} placement="right" ?opened=${args.opened}>
86
+ <pds-tooltip content="content 2" has-arrow="${args.hasArrow}" max-width=${args.maxWidth} placement="right" ?opened=${args.opened}>
87
87
  <pds-button variant="accent">r</pds-button>
88
88
  </pds-tooltip>
89
- <pds-tooltip content="content 3" ?has-arrow=${args.hasArrow} max-width=${args.maxWidth} placement="right-end" ?opened=${args.opened}>
89
+ <pds-tooltip content="content 3" has-arrow="${args.hasArrow}" max-width=${args.maxWidth} placement="right-end" ?opened=${args.opened}>
90
90
  <pds-button variant="accent">re</pds-button>
91
91
  </pds-tooltip>
92
92
  </div>
@@ -125,7 +125,7 @@ NoArrow.args = {
125
125
 
126
126
  export const InModal = InModalTemplate.bind({});
127
127
  InModal.args = {
128
- content: "Fix the errors on the page to publish",
128
+ content: "Makes your changes visible to everyone",
129
129
  hasArrow: true,
130
130
  placement: "top",
131
131
  };
@@ -25,6 +25,14 @@ export const findInAncestorRoots = (host, id) => {
25
25
  }
26
26
  return root instanceof Document ? root.getElementById(id) : null;
27
27
  };
28
+ /**
29
+ * The elements an ID-reference attribute on the host names, skipping IDs that match nothing.
30
+ */
31
+ export const referencedElements = (host, attribute) => {
32
+ var _a, _b;
33
+ const ids = (_b = (_a = host.getAttribute(attribute)) === null || _a === void 0 ? void 0 : _a.split(/\s+/).filter(Boolean)) !== null && _b !== void 0 ? _b : [];
34
+ return ids.map((id) => findInAncestorRoots(host, id)).filter((el) => el !== null);
35
+ };
28
36
  /**
29
37
  * Points the target's reflected ARIA properties at the elements the host's ID-reference attributes
30
38
  * name, or clears them. Run it again whenever the attributes or the referenced elements may have
@@ -32,11 +40,9 @@ export const findInAncestorRoots = (host, id) => {
32
40
  */
33
41
  export const forwardAriaReferences = (host, target) => {
34
42
  Object.entries(ARIA_REFERENCE_PROPERTIES).forEach(([attribute, property]) => {
35
- var _a, _b;
36
43
  if (!(property in target))
37
44
  return;
38
- const ids = (_b = (_a = host.getAttribute(attribute)) === null || _a === void 0 ? void 0 : _a.split(/\s+/).filter(Boolean)) !== null && _b !== void 0 ? _b : [];
39
- const referenced = ids.map((id) => findInAncestorRoots(host, id)).filter((el) => el !== null);
45
+ const referenced = referencedElements(host, attribute);
40
46
  target[property] = referenced.length > 0 ? referenced : null;
41
47
  });
42
48
  };
@@ -3,6 +3,40 @@ import { findPortalTarget, isTopLayerInDocument, onTopLayerClose } from "./porta
3
3
  // Controls that clipped text can sit inside that already take focus, so the text adds no tab stop of its own.
4
4
  // Not any `[tabindex]`: a focusable scroll region full of chips would show every chip's tooltip at once.
5
5
  export const FOCUSABLE_WRAPPER = 'a[href], button, summary, pds-button, pds-link, pds-tab, pds-dropdown-menu-item, [role="option"], [role="treeitem"]';
6
+ const ELEMENT_NODE = 1;
7
+ const TEXT_NODE = 3;
8
+ /**
9
+ * The text `el` actually shows, with every `<slot>` it holds replaced by the
10
+ * nodes assigned to it.
11
+ *
12
+ * `textContent` counts a slot as empty, so a component that renders a clipped
13
+ * text around a slot of its own — `pds-alert` renders `<pds-text truncate><slot/></pds-text>` —
14
+ * would leave the tooltip with nothing to show and so no tooltip at all, even
15
+ * though the text is clipped and holds a tab stop.
16
+ *
17
+ * Text nodes only, as `textContent` counts too: Stencil leaves comment nodes
18
+ * among slotted content to mark where it was relocated from, and their data is
19
+ * not text anyone reads.
20
+ */
21
+ export function flattenedText(el) {
22
+ let text = '';
23
+ const add = (node) => {
24
+ var _a;
25
+ const slot = node;
26
+ // `flatten` returns the slot's own children when nothing is assigned, which is what renders then.
27
+ if (node.nodeName === 'SLOT' && typeof slot.assignedNodes === 'function') {
28
+ slot.assignedNodes({ flatten: true }).forEach(add);
29
+ }
30
+ else if (node.nodeType === ELEMENT_NODE) {
31
+ text += flattenedText(node);
32
+ }
33
+ else if (node.nodeType === TEXT_NODE) {
34
+ text += (_a = node.textContent) !== null && _a !== void 0 ? _a : '';
35
+ }
36
+ };
37
+ el.childNodes.forEach(add);
38
+ return text;
39
+ }
6
40
  /** CSS class prefix used for truncation tooltip portal elements */
7
41
  const TOOLTIP_CLASS = 'pds-truncation-tooltip';
8
42
  /**
@@ -353,3 +387,36 @@ export function setupTruncationTooltip(options) {
353
387
  removePortal();
354
388
  };
355
389
  }
390
+ /**
391
+ * Keeps tooltips bound to the elements a component's render clips, for a component
392
+ * that re-renders while those elements stay in place.
393
+ *
394
+ * Each tooltip holds listeners and an observer on its element, so it is rebound
395
+ * only when a different set of elements renders: rebinding on every render would
396
+ * tear down a tooltip the pointer is still inside, and a component can render
397
+ * again on every keystroke or when it opens its popover.
398
+ *
399
+ * Call `sync` from `componentDidRender`, and from `connectedCallback` too, since
400
+ * moving an element reconnects it without rendering it again. Call `destroy` from
401
+ * `disconnectedCallback`.
402
+ *
403
+ * @param getOptions - The options for one element, read when it is bound.
404
+ */
405
+ export function bindTruncationTooltips(getOptions) {
406
+ let bound = [];
407
+ let cleanups = [];
408
+ const destroy = () => {
409
+ cleanups.forEach((cleanup) => cleanup());
410
+ cleanups = [];
411
+ bound = [];
412
+ };
413
+ const sync = (els) => {
414
+ const next = Array.from(els).filter((el) => el != null);
415
+ if (next.length === bound.length && next.every((el, index) => el === bound[index]))
416
+ return;
417
+ destroy();
418
+ bound = next;
419
+ cleanups = next.map((el) => setupTruncationTooltip(getOptions(el)));
420
+ };
421
+ return { sync, destroy };
422
+ }