@pine-ds/core 4.5.0 → 4.7.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 (478) hide show
  1. package/components/attributes.js +1 -1
  2. package/components/mock-pds-modal.js +1 -1
  3. package/components/pds-combobox.js +1 -1
  4. package/components/pds-container.js +1 -1
  5. package/components/pds-copytext.js +1 -1
  6. package/components/pds-datepicker.js +1 -1
  7. package/components/pds-divider.js +1 -1
  8. package/components/pds-drawer-content.js +1 -1
  9. package/components/pds-drawer-footer.js +1 -1
  10. package/components/pds-drawer-header.js +1 -1
  11. package/components/pds-drawer.js +1 -1
  12. package/components/pds-dropdown-menu-item.js +1 -1
  13. package/components/pds-dropdown-menu-separator.js +1 -1
  14. package/components/pds-dropdown-menu.js +1 -1
  15. package/components/pds-filter.js +1 -1
  16. package/components/pds-filters.js +1 -1
  17. package/components/pds-icon2.js +1 -1
  18. package/components/pds-image.js +1 -1
  19. package/components/pds-input2.js +1 -1
  20. package/components/pds-link2.js +1 -1
  21. package/components/pds-loader2.js +1 -1
  22. package/components/pds-modal-content.js +1 -1
  23. package/components/pds-modal-footer.js +1 -1
  24. package/components/pds-modal-header.js +1 -1
  25. package/components/pds-modal2.js +1 -1
  26. package/components/pds-multiselect.js +1 -1
  27. package/components/pds-popover.js +1 -1
  28. package/components/pds-progress.js +1 -1
  29. package/components/pds-property.js +1 -1
  30. package/components/pds-radio-group.js +1 -1
  31. package/components/pds-radio.js +1 -1
  32. package/components/pds-row.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 +1 -1
  36. package/components/pds-switch.js +1 -1
  37. package/components/pds-tab.js +1 -1
  38. package/components/pds-table-body.js +1 -1
  39. package/components/pds-table-cell2.js +1 -1
  40. package/components/pds-table-head-cell2.js +1 -1
  41. package/components/pds-table-head.js +1 -1
  42. package/components/pds-table-row.js +1 -1
  43. package/components/pds-tabpanel.js +1 -1
  44. package/components/pds-tabs.js +1 -1
  45. package/components/pds-text2.js +1 -1
  46. package/components/pds-textarea.js +1 -1
  47. package/components/pds-toast.js +1 -1
  48. package/components/pds-tooltip.js +1 -1
  49. package/dist/cjs/{attributes-DXvaSETR.js → attributes-BJ7KBHql.js} +18 -11
  50. package/dist/cjs/{index-D-QQKB0y.js → index-5Azb8EQG.js} +1 -1
  51. package/dist/cjs/{index-BQjWfQXw.js → index-jl_Q819j.js} +1 -1
  52. package/dist/cjs/index.cjs.js +1 -1
  53. package/dist/cjs/keep-hydrated-CiXgkEYd.js +196 -0
  54. package/dist/cjs/loader.cjs.js +3 -3
  55. package/dist/cjs/mock-pds-modal.cjs.entry.js +3 -3
  56. package/dist/cjs/pds-accordion.cjs.entry.js +3 -3
  57. package/dist/cjs/pds-alert.cjs.entry.js +2 -2
  58. package/dist/cjs/pds-avatar.cjs.entry.js +3 -3
  59. package/dist/cjs/pds-box.cjs.entry.js +3 -3
  60. package/dist/cjs/pds-button.cjs.entry.js +3 -3
  61. package/dist/cjs/pds-checkbox.cjs.entry.js +4 -4
  62. package/dist/cjs/pds-chip.cjs.entry.js +4 -4
  63. package/dist/cjs/pds-combobox.cjs.entry.js +187 -28
  64. package/dist/cjs/pds-container.cjs.entry.js +3 -3
  65. package/dist/cjs/pds-copytext.cjs.entry.js +5 -5
  66. package/dist/cjs/pds-datepicker.cjs.entry.js +5 -5
  67. package/dist/cjs/pds-divider.cjs.entry.js +3 -3
  68. package/dist/cjs/pds-drawer-content.cjs.entry.js +3 -3
  69. package/dist/cjs/pds-drawer-footer.cjs.entry.js +3 -3
  70. package/dist/cjs/pds-drawer-header.cjs.entry.js +3 -3
  71. package/dist/cjs/pds-drawer.cjs.entry.js +25 -12
  72. package/dist/cjs/pds-dropdown-menu-item.cjs.entry.js +3 -3
  73. package/dist/cjs/pds-dropdown-menu-separator.cjs.entry.js +3 -3
  74. package/dist/cjs/pds-dropdown-menu.cjs.entry.js +24 -12
  75. package/dist/cjs/pds-filter.cjs.entry.js +4 -4
  76. package/dist/cjs/pds-filters.cjs.entry.js +3 -3
  77. package/dist/cjs/pds-icon.cjs.entry.js +27 -4
  78. package/dist/cjs/pds-image.cjs.entry.js +4 -4
  79. package/dist/cjs/pds-input.cjs.entry.js +6 -6
  80. package/dist/cjs/pds-link.cjs.entry.js +5 -5
  81. package/dist/cjs/pds-loader.cjs.entry.js +4 -4
  82. package/dist/cjs/pds-modal-content.cjs.entry.js +4 -4
  83. package/dist/cjs/pds-modal-footer.cjs.entry.js +3 -3
  84. package/dist/cjs/pds-modal-header.cjs.entry.js +3 -3
  85. package/dist/cjs/pds-modal.cjs.entry.js +118 -33
  86. package/dist/cjs/pds-multiselect.cjs.entry.js +9 -8
  87. package/dist/cjs/pds-popover.cjs.entry.js +227 -37
  88. package/dist/cjs/pds-progress.cjs.entry.js +4 -4
  89. package/dist/cjs/pds-property.cjs.entry.js +3 -3
  90. package/dist/cjs/pds-radio-group.cjs.entry.js +6 -6
  91. package/dist/cjs/pds-radio.cjs.entry.js +7 -7
  92. package/dist/cjs/pds-row.cjs.entry.js +4 -4
  93. package/dist/cjs/pds-select.cjs.entry.js +5 -5
  94. package/dist/cjs/pds-sortable-item.cjs.entry.js +5 -5
  95. package/dist/cjs/pds-sortable.cjs.entry.js +4 -4
  96. package/dist/cjs/pds-switch.cjs.entry.js +7 -7
  97. package/dist/cjs/pds-tab.cjs.entry.js +13 -2
  98. package/dist/cjs/pds-table-body.cjs.entry.js +3 -3
  99. package/dist/cjs/pds-table-cell.cjs.entry.js +4 -4
  100. package/dist/cjs/pds-table-head-cell.cjs.entry.js +5 -5
  101. package/dist/cjs/pds-table-head.cjs.entry.js +3 -3
  102. package/dist/cjs/pds-table-row.cjs.entry.js +3 -3
  103. package/dist/cjs/pds-table.cjs.entry.js +2 -2
  104. package/dist/cjs/pds-tabpanel.cjs.entry.js +15 -3
  105. package/dist/cjs/pds-tabs.cjs.entry.js +111 -7
  106. package/dist/cjs/pds-text.cjs.entry.js +3 -3
  107. package/dist/cjs/pds-textarea.cjs.entry.js +8 -8
  108. package/dist/cjs/pds-toast.cjs.entry.js +5 -5
  109. package/dist/cjs/pds-tooltip.cjs.entry.js +4 -4
  110. package/dist/cjs/pine-core.cjs.js +3 -3
  111. package/dist/collection/components/pds-combobox/grouped-options-panel.js +21 -3
  112. package/dist/collection/components/pds-combobox/pds-combobox.css +42 -13
  113. package/dist/collection/components/pds-combobox/pds-combobox.js +166 -23
  114. package/dist/collection/components/pds-combobox/stories/pds-combobox.stories.js +45 -0
  115. package/dist/collection/components/pds-container/pds-container.js +1 -1
  116. package/dist/collection/components/pds-copytext/pds-copytext.js +1 -1
  117. package/dist/collection/components/pds-datepicker/pds-datepicker.js +2 -2
  118. package/dist/collection/components/pds-divider/pds-divider.js +1 -1
  119. package/dist/collection/components/pds-drawer/pds-drawer-content/pds-drawer-content.js +1 -1
  120. package/dist/collection/components/pds-drawer/pds-drawer-footer/pds-drawer-footer.js +1 -1
  121. package/dist/collection/components/pds-drawer/pds-drawer-header/pds-drawer-header.js +1 -1
  122. package/dist/collection/components/pds-drawer/pds-drawer.css +4 -1
  123. package/dist/collection/components/pds-drawer/pds-drawer.js +54 -17
  124. package/dist/collection/components/pds-drawer/stories/pds-drawer.stories.js +6 -1
  125. package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-item/pds-dropdown-menu-item.js +1 -1
  126. package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-separator/pds-dropdown-menu-separator.js +1 -1
  127. package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu.css +19 -5
  128. package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu.js +30 -9
  129. package/dist/collection/components/pds-filters/pds-filter/pds-filter.js +1 -1
  130. package/dist/collection/components/pds-filters/pds-filters.js +1 -1
  131. package/dist/collection/components/pds-image/pds-image.js +2 -2
  132. package/dist/collection/components/pds-input/pds-input.js +2 -2
  133. package/dist/collection/components/pds-link/pds-link.js +2 -2
  134. package/dist/collection/components/pds-loader/pds-loader.js +1 -1
  135. package/dist/collection/components/pds-modal/pds-modal-content/pds-modal-content.js +2 -2
  136. package/dist/collection/components/pds-modal/pds-modal-footer/pds-modal-footer.js +1 -1
  137. package/dist/collection/components/pds-modal/pds-modal-header/pds-modal-header.js +1 -1
  138. package/dist/collection/components/pds-modal/pds-modal.js +117 -32
  139. package/dist/collection/components/pds-modal/test/mock-pds-modal.js +1 -1
  140. package/dist/collection/components/pds-multiselect/pds-multiselect.js +8 -7
  141. package/dist/collection/components/pds-popover/pds-popover.js +185 -35
  142. package/dist/collection/components/pds-progress/pds-progress.js +1 -1
  143. package/dist/collection/components/pds-property/pds-property.js +1 -1
  144. package/dist/collection/components/pds-radio/pds-radio.js +3 -3
  145. package/dist/collection/components/pds-radio-group/pds-radio-group.js +3 -3
  146. package/dist/collection/components/pds-row/pds-row.js +1 -1
  147. package/dist/collection/components/pds-select/pds-select.js +1 -1
  148. package/dist/collection/components/pds-sortable/pds-sortable-item/pds-sortable-item.js +1 -1
  149. package/dist/collection/components/pds-sortable/pds-sortable.js +1 -1
  150. package/dist/collection/components/pds-switch/pds-switch.js +3 -3
  151. package/dist/collection/components/pds-table/pds-table-body/pds-table-body.js +1 -1
  152. package/dist/collection/components/pds-table/pds-table-cell/pds-table-cell.js +2 -2
  153. package/dist/collection/components/pds-table/pds-table-head/pds-table-head.js +1 -1
  154. package/dist/collection/components/pds-table/pds-table-head-cell/pds-table-head-cell.js +2 -2
  155. package/dist/collection/components/pds-table/pds-table-row/pds-table-row.js +1 -1
  156. package/dist/collection/components/pds-tabs/pds-tab/pds-tab.js +11 -0
  157. package/dist/collection/components/pds-tabs/pds-tabpanel/pds-tabpanel.js +13 -1
  158. package/dist/collection/components/pds-tabs/pds-tabs.js +111 -7
  159. package/dist/collection/components/pds-text/pds-text.js +1 -1
  160. package/dist/collection/components/pds-textarea/pds-textarea.js +4 -4
  161. package/dist/collection/components/pds-toast/pds-toast.js +3 -3
  162. package/dist/collection/components/pds-tooltip/pds-tooltip.js +2 -2
  163. package/dist/collection/utils/attributes.js +18 -11
  164. package/dist/collection/utils/css.js +41 -0
  165. package/dist/collection/utils/keep-hydrated.js +133 -6
  166. package/dist/docs.json +56 -12
  167. package/dist/esm/{attributes-CF5K2pxn.js → attributes-WXw_I_uJ.js} +18 -11
  168. package/dist/esm/{index-DxI-61GK.js → index-BJXk71tO.js} +1 -1
  169. package/dist/esm/{index-2HMD-zUO.js → index-Cw9J31qd.js} +1 -1
  170. package/dist/esm/index.js +1 -1
  171. package/dist/esm/keep-hydrated-BLG6RDBt.js +190 -0
  172. package/dist/esm/loader.js +4 -4
  173. package/dist/esm/mock-pds-modal.entry.js +3 -3
  174. package/dist/esm/pds-accordion.entry.js +3 -3
  175. package/dist/esm/pds-alert.entry.js +2 -2
  176. package/dist/esm/pds-avatar.entry.js +3 -3
  177. package/dist/esm/pds-box.entry.js +3 -3
  178. package/dist/esm/pds-button.entry.js +3 -3
  179. package/dist/esm/pds-checkbox.entry.js +4 -4
  180. package/dist/esm/pds-chip.entry.js +4 -4
  181. package/dist/esm/pds-combobox.entry.js +187 -28
  182. package/dist/esm/pds-container.entry.js +3 -3
  183. package/dist/esm/pds-copytext.entry.js +5 -5
  184. package/dist/esm/pds-datepicker.entry.js +5 -5
  185. package/dist/esm/pds-divider.entry.js +3 -3
  186. package/dist/esm/pds-drawer-content.entry.js +3 -3
  187. package/dist/esm/pds-drawer-footer.entry.js +3 -3
  188. package/dist/esm/pds-drawer-header.entry.js +3 -3
  189. package/dist/esm/pds-drawer.entry.js +25 -12
  190. package/dist/esm/pds-dropdown-menu-item.entry.js +3 -3
  191. package/dist/esm/pds-dropdown-menu-separator.entry.js +3 -3
  192. package/dist/esm/pds-dropdown-menu.entry.js +24 -12
  193. package/dist/esm/pds-filter.entry.js +4 -4
  194. package/dist/esm/pds-filters.entry.js +3 -3
  195. package/dist/esm/pds-icon.entry.js +27 -4
  196. package/dist/esm/pds-image.entry.js +4 -4
  197. package/dist/esm/pds-input.entry.js +6 -6
  198. package/dist/esm/pds-link.entry.js +5 -5
  199. package/dist/esm/pds-loader.entry.js +4 -4
  200. package/dist/esm/pds-modal-content.entry.js +4 -4
  201. package/dist/esm/pds-modal-footer.entry.js +3 -3
  202. package/dist/esm/pds-modal-header.entry.js +3 -3
  203. package/dist/esm/pds-modal.entry.js +118 -33
  204. package/dist/esm/pds-multiselect.entry.js +9 -8
  205. package/dist/esm/pds-popover.entry.js +228 -38
  206. package/dist/esm/pds-progress.entry.js +4 -4
  207. package/dist/esm/pds-property.entry.js +3 -3
  208. package/dist/esm/pds-radio-group.entry.js +6 -6
  209. package/dist/esm/pds-radio.entry.js +7 -7
  210. package/dist/esm/pds-row.entry.js +4 -4
  211. package/dist/esm/pds-select.entry.js +5 -5
  212. package/dist/esm/pds-sortable-item.entry.js +5 -5
  213. package/dist/esm/pds-sortable.entry.js +4 -4
  214. package/dist/esm/pds-switch.entry.js +7 -7
  215. package/dist/esm/pds-tab.entry.js +13 -2
  216. package/dist/esm/pds-table-body.entry.js +3 -3
  217. package/dist/esm/pds-table-cell.entry.js +4 -4
  218. package/dist/esm/pds-table-head-cell.entry.js +5 -5
  219. package/dist/esm/pds-table-head.entry.js +3 -3
  220. package/dist/esm/pds-table-row.entry.js +3 -3
  221. package/dist/esm/pds-table.entry.js +2 -2
  222. package/dist/esm/pds-tabpanel.entry.js +15 -3
  223. package/dist/esm/pds-tabs.entry.js +111 -7
  224. package/dist/esm/pds-text.entry.js +3 -3
  225. package/dist/esm/pds-textarea.entry.js +8 -8
  226. package/dist/esm/pds-toast.entry.js +5 -5
  227. package/dist/esm/pds-tooltip.entry.js +4 -4
  228. package/dist/esm/pine-core.js +4 -4
  229. package/dist/esm-es5/attributes-WXw_I_uJ.js +1 -0
  230. package/dist/esm-es5/{index-2HMD-zUO.js → index-Cw9J31qd.js} +2 -2
  231. package/dist/esm-es5/index.js +1 -1
  232. package/dist/esm-es5/keep-hydrated-BLG6RDBt.js +1 -0
  233. package/dist/esm-es5/loader.js +1 -1
  234. package/dist/esm-es5/mock-pds-modal.entry.js +1 -1
  235. package/dist/esm-es5/pds-accordion.entry.js +1 -1
  236. package/dist/esm-es5/pds-alert.entry.js +1 -1
  237. package/dist/esm-es5/pds-avatar.entry.js +1 -1
  238. package/dist/esm-es5/pds-box.entry.js +1 -1
  239. package/dist/esm-es5/pds-button.entry.js +1 -1
  240. package/dist/esm-es5/pds-checkbox.entry.js +1 -1
  241. package/dist/esm-es5/pds-chip.entry.js +1 -1
  242. package/dist/esm-es5/pds-combobox.entry.js +2 -2
  243. package/dist/esm-es5/pds-container.entry.js +1 -1
  244. package/dist/esm-es5/pds-copytext.entry.js +1 -1
  245. package/dist/esm-es5/pds-datepicker.entry.js +1 -1
  246. package/dist/esm-es5/pds-divider.entry.js +1 -1
  247. package/dist/esm-es5/pds-drawer-content.entry.js +1 -1
  248. package/dist/esm-es5/pds-drawer-footer.entry.js +1 -1
  249. package/dist/esm-es5/pds-drawer-header.entry.js +1 -1
  250. package/dist/esm-es5/pds-drawer.entry.js +1 -1
  251. package/dist/esm-es5/pds-dropdown-menu-item.entry.js +1 -1
  252. package/dist/esm-es5/pds-dropdown-menu-separator.entry.js +1 -1
  253. package/dist/esm-es5/pds-dropdown-menu.entry.js +1 -1
  254. package/dist/esm-es5/pds-filter.entry.js +1 -1
  255. package/dist/esm-es5/pds-filters.entry.js +1 -1
  256. package/dist/esm-es5/pds-icon.entry.js +1 -1
  257. package/dist/esm-es5/pds-image.entry.js +1 -1
  258. package/dist/esm-es5/pds-input.entry.js +1 -1
  259. package/dist/esm-es5/pds-link.entry.js +1 -1
  260. package/dist/esm-es5/pds-loader.entry.js +1 -1
  261. package/dist/esm-es5/pds-modal-content.entry.js +1 -1
  262. package/dist/esm-es5/pds-modal-footer.entry.js +1 -1
  263. package/dist/esm-es5/pds-modal-header.entry.js +1 -1
  264. package/dist/esm-es5/pds-modal.entry.js +1 -1
  265. package/dist/esm-es5/pds-multiselect.entry.js +1 -1
  266. package/dist/esm-es5/pds-popover.entry.js +1 -1
  267. package/dist/esm-es5/pds-progress.entry.js +1 -1
  268. package/dist/esm-es5/pds-property.entry.js +1 -1
  269. package/dist/esm-es5/pds-radio-group.entry.js +1 -1
  270. package/dist/esm-es5/pds-radio.entry.js +1 -1
  271. package/dist/esm-es5/pds-row.entry.js +1 -1
  272. package/dist/esm-es5/pds-select.entry.js +1 -1
  273. package/dist/esm-es5/pds-sortable-item.entry.js +1 -1
  274. package/dist/esm-es5/pds-sortable.entry.js +2 -2
  275. package/dist/esm-es5/pds-switch.entry.js +1 -1
  276. package/dist/esm-es5/pds-tab.entry.js +1 -1
  277. package/dist/esm-es5/pds-table-body.entry.js +1 -1
  278. package/dist/esm-es5/pds-table-cell.entry.js +1 -1
  279. package/dist/esm-es5/pds-table-head-cell.entry.js +1 -1
  280. package/dist/esm-es5/pds-table-head.entry.js +1 -1
  281. package/dist/esm-es5/pds-table-row.entry.js +1 -1
  282. package/dist/esm-es5/pds-table.entry.js +1 -1
  283. package/dist/esm-es5/pds-tabpanel.entry.js +1 -1
  284. package/dist/esm-es5/pds-tabs.entry.js +1 -1
  285. package/dist/esm-es5/pds-text.entry.js +1 -1
  286. package/dist/esm-es5/pds-textarea.entry.js +1 -1
  287. package/dist/esm-es5/pds-toast.entry.js +1 -1
  288. package/dist/esm-es5/pds-tooltip.entry.js +1 -1
  289. package/dist/esm-es5/pine-core.js +1 -1
  290. package/dist/pine-core/index.esm.js +1 -1
  291. package/dist/pine-core/{p-9a7ee7cb.system.entry.js → p-0092444c.system.entry.js} +1 -1
  292. package/dist/pine-core/{p-d576e542.system.entry.js → p-01aa382c.system.entry.js} +1 -1
  293. package/dist/pine-core/{p-d69cfaa4.entry.js → p-02088776.entry.js} +1 -1
  294. package/dist/pine-core/p-049f126a.entry.js +1 -0
  295. package/dist/pine-core/{p-8b9d8fb5.system.entry.js → p-080cb087.system.entry.js} +1 -1
  296. package/dist/pine-core/{p-99317375.system.entry.js → p-0913f696.system.entry.js} +1 -1
  297. package/dist/pine-core/{p-5737182f.entry.js → p-0a84d220.entry.js} +1 -1
  298. package/dist/pine-core/{p-4c9cccdb.system.entry.js → p-0b71ecb6.system.entry.js} +2 -2
  299. package/dist/pine-core/{p-37d73369.system.entry.js → p-1437585e.system.entry.js} +1 -1
  300. package/dist/pine-core/p-153ba77b.entry.js +1 -0
  301. package/dist/pine-core/{p-22f041ee.system.entry.js → p-1ee86d87.system.entry.js} +1 -1
  302. package/dist/pine-core/{p-5decd81f.entry.js → p-208c7dbf.entry.js} +1 -1
  303. package/dist/pine-core/p-21fe6ee1.system.entry.js +1 -0
  304. package/dist/pine-core/p-24fbbb74.system.entry.js +1 -0
  305. package/dist/pine-core/{p-51dff046.system.entry.js → p-258770cf.system.entry.js} +1 -1
  306. package/dist/pine-core/{p-1f2e5958.entry.js → p-258d5e83.entry.js} +1 -1
  307. package/dist/pine-core/{p-4e05a4f0.entry.js → p-26642718.entry.js} +1 -1
  308. package/dist/pine-core/{p-1b13f69c.system.entry.js → p-2ac2457b.system.entry.js} +1 -1
  309. package/dist/pine-core/p-2cb5483a.system.entry.js +1 -0
  310. package/dist/pine-core/{p-1f263c0b.system.entry.js → p-341c38f1.system.entry.js} +1 -1
  311. package/dist/pine-core/{p-bd7da23e.system.entry.js → p-3a959459.system.entry.js} +1 -1
  312. package/dist/pine-core/{p-1e464117.entry.js → p-432d5ec7.entry.js} +1 -1
  313. package/dist/pine-core/{p-0de74105.entry.js → p-4849fda7.entry.js} +1 -1
  314. package/dist/pine-core/{p-f30d6192.system.entry.js → p-4d03d1e2.system.entry.js} +1 -1
  315. package/dist/pine-core/{p-2cb02706.entry.js → p-4de8f333.entry.js} +1 -1
  316. package/dist/pine-core/{p-152245fa.system.entry.js → p-4f94b4f1.system.entry.js} +1 -1
  317. package/dist/pine-core/{p-66cfef6d.system.entry.js → p-4fa63723.system.entry.js} +1 -1
  318. package/dist/pine-core/p-4fd454f6.entry.js +1 -0
  319. package/dist/pine-core/{p-70c6f0ed.system.entry.js → p-5442d983.system.entry.js} +1 -1
  320. package/dist/pine-core/{p-8027db25.entry.js → p-550c2fd3.entry.js} +1 -1
  321. package/dist/pine-core/{p-7d01e719.entry.js → p-55224683.entry.js} +1 -1
  322. package/dist/pine-core/{p-65e30a4c.entry.js → p-57a2f927.entry.js} +1 -1
  323. package/dist/pine-core/{p-721297b5.system.entry.js → p-5870b092.system.entry.js} +1 -1
  324. package/dist/pine-core/p-5a10784e.system.entry.js +3 -0
  325. package/dist/pine-core/{p-6d83ad2d.system.entry.js → p-5c90091e.system.entry.js} +1 -1
  326. package/dist/pine-core/p-602c197f.entry.js +1 -0
  327. package/dist/pine-core/{p-45fcc5b7.entry.js → p-6bf853c9.entry.js} +1 -1
  328. package/dist/pine-core/{p-5d014059.entry.js → p-6d3610f9.entry.js} +1 -1
  329. package/dist/pine-core/{p-343546b1.system.entry.js → p-6eec23a7.system.entry.js} +1 -1
  330. package/dist/pine-core/{p-5132b8a1.entry.js → p-72865997.entry.js} +1 -1
  331. package/dist/pine-core/p-74a05bcc.entry.js +1 -0
  332. package/dist/pine-core/p-75ee0403.entry.js +1 -0
  333. package/dist/pine-core/p-77395d62.system.entry.js +1 -0
  334. package/dist/pine-core/p-7a287635.system.entry.js +1 -0
  335. package/dist/pine-core/p-7a5b21d2.system.entry.js +1 -0
  336. package/dist/pine-core/{p-a83a6618.system.entry.js → p-7bf6563a.system.entry.js} +1 -1
  337. package/dist/pine-core/{p-71e3a89e.system.entry.js → p-8191498f.system.entry.js} +1 -1
  338. package/dist/pine-core/{p-0166c620.entry.js → p-82cf4ec6.entry.js} +1 -1
  339. package/dist/pine-core/{p-16c2aa63.entry.js → p-84e9b7da.entry.js} +1 -1
  340. package/dist/pine-core/{p-bdf68e53.system.entry.js → p-86040cac.system.entry.js} +1 -1
  341. package/dist/pine-core/p-875b0436.system.entry.js +1 -0
  342. package/dist/pine-core/{p-87f91e02.system.entry.js → p-8c8cc079.system.entry.js} +1 -1
  343. package/dist/pine-core/{p-ba1b79c7.system.entry.js → p-8cc302aa.system.entry.js} +1 -1
  344. package/dist/pine-core/{p-5b7f7760.entry.js → p-8d292b48.entry.js} +1 -1
  345. package/dist/pine-core/{p-650ccffb.entry.js → p-8f531063.entry.js} +1 -1
  346. package/dist/pine-core/p-9109b90a.entry.js +1 -0
  347. package/dist/pine-core/p-92ae6082.entry.js +1 -0
  348. package/dist/pine-core/p-94593f20.system.entry.js +1 -0
  349. package/dist/pine-core/p-945fb0b1.entry.js +1 -0
  350. package/dist/pine-core/{p-04fe5da7.system.entry.js → p-9880d251.system.entry.js} +1 -1
  351. package/dist/pine-core/p-99459e27.entry.js +1 -0
  352. package/dist/pine-core/{p-9835c74b.entry.js → p-9ab95438.entry.js} +1 -1
  353. package/dist/pine-core/{p-a6d09102.system.entry.js → p-9af131d6.system.entry.js} +1 -1
  354. package/dist/pine-core/{p-59491f98.entry.js → p-9dcd2cdb.entry.js} +1 -1
  355. package/dist/pine-core/{p-c00e46a5.system.entry.js → p-9e0f920a.system.entry.js} +1 -1
  356. package/dist/pine-core/p-BGLP3keB.js +1 -0
  357. package/dist/pine-core/p-BLG6RDBt.js +1 -0
  358. package/dist/pine-core/p-BR5nujVX.system.js +1 -0
  359. package/dist/pine-core/{p-BJlg6wq7.system.js → p-CGRdQc49.system.js} +2 -2
  360. package/dist/pine-core/{p-DeIDZHrg.js → p-CmSJytt1.js} +2 -2
  361. package/dist/pine-core/p-CuSNnuFu.system.js +1 -0
  362. package/dist/pine-core/{p-YQa3CeL9.system.js → p-Cy8cvR7I.system.js} +1 -1
  363. package/dist/pine-core/p-XW4H0W6i.system.js +1 -0
  364. package/dist/pine-core/p-a0344e30.entry.js +2 -0
  365. package/dist/pine-core/p-a0960b3d.system.entry.js +1 -0
  366. package/dist/pine-core/p-a1230a74.system.entry.js +1 -0
  367. package/dist/pine-core/{p-fbea5703.entry.js → p-a19cd59c.entry.js} +1 -1
  368. package/dist/pine-core/p-a787b34a.system.entry.js +1 -0
  369. package/dist/pine-core/p-a826f290.entry.js +1 -0
  370. package/dist/pine-core/{p-1ec4eeaf.system.entry.js → p-a85a6ab9.system.entry.js} +1 -1
  371. package/dist/pine-core/p-acce8eb2.entry.js +1 -0
  372. package/dist/pine-core/p-b1548a20.entry.js +1 -0
  373. package/dist/pine-core/p-b60ac7eb.system.entry.js +1 -0
  374. package/dist/pine-core/{p-93877d4a.entry.js → p-b69f04b7.entry.js} +1 -1
  375. package/dist/pine-core/p-b75b0d09.system.entry.js +1 -0
  376. package/dist/pine-core/{p-02857936.entry.js → p-b8e8a4ce.entry.js} +1 -1
  377. package/dist/pine-core/{p-622e91e3.entry.js → p-b914dde8.entry.js} +2 -2
  378. package/dist/pine-core/{p-5bc670be.system.entry.js → p-ba1f65c2.system.entry.js} +1 -1
  379. package/dist/pine-core/p-bb68431a.entry.js +1 -0
  380. package/dist/pine-core/{p-c8e89b61.system.entry.js → p-bd67156b.system.entry.js} +1 -1
  381. package/dist/pine-core/{p-db4319fd.entry.js → p-beb23781.entry.js} +1 -1
  382. package/dist/pine-core/p-bf30dec0.entry.js +1 -0
  383. package/dist/pine-core/p-bf5887e8.system.entry.js +1 -0
  384. package/dist/pine-core/{p-91f712f4.system.entry.js → p-bf7ee3b7.system.entry.js} +1 -1
  385. package/dist/pine-core/{p-b5838211.system.entry.js → p-c5c9ed36.system.entry.js} +1 -1
  386. package/dist/pine-core/{p-21115986.system.entry.js → p-cb6a3e4c.system.entry.js} +1 -1
  387. package/dist/pine-core/{p-1cf1fced.entry.js → p-cde8eb81.entry.js} +1 -1
  388. package/dist/pine-core/{p-1d75a9b1.system.entry.js → p-cf08a6dd.system.entry.js} +1 -1
  389. package/dist/pine-core/p-cfd012d4.entry.js +1 -0
  390. package/dist/pine-core/{p-5e8d73d4.entry.js → p-d2c91e7a.entry.js} +1 -1
  391. package/dist/pine-core/{p-7bbfb965.system.entry.js → p-db17c626.system.entry.js} +1 -1
  392. package/dist/pine-core/p-e0917a26.entry.js +1 -0
  393. package/dist/pine-core/p-e21ff692.entry.js +1 -0
  394. package/dist/pine-core/p-e5420660.entry.js +1 -0
  395. package/dist/pine-core/{p-585832b1.entry.js → p-e800a2b1.entry.js} +1 -1
  396. package/dist/pine-core/{p-8b0fbeb3.entry.js → p-e836a041.entry.js} +1 -1
  397. package/dist/pine-core/{p-506d3e80.entry.js → p-e8cb76e8.entry.js} +1 -1
  398. package/dist/pine-core/p-ea4d4741.system.entry.js +1 -0
  399. package/dist/pine-core/{p-419f57c9.entry.js → p-eb5465ce.entry.js} +1 -1
  400. package/dist/pine-core/{p-63119d23.entry.js → p-ebd0bff2.entry.js} +1 -1
  401. package/dist/pine-core/p-f029b7da.system.entry.js +1 -0
  402. package/dist/pine-core/{p-e337f32c.system.entry.js → p-f0d24298.system.entry.js} +1 -1
  403. package/dist/pine-core/{p-9b9f66b7.entry.js → p-f1702281.entry.js} +1 -1
  404. package/dist/pine-core/{p-238e5171.system.entry.js → p-f25e4731.system.entry.js} +1 -1
  405. package/dist/pine-core/{p-37d95be9.entry.js → p-f2c253d8.entry.js} +1 -1
  406. package/dist/pine-core/{p-a22091c4.system.entry.js → p-f77905aa.system.entry.js} +1 -1
  407. package/dist/pine-core/{p-bef04e15.system.entry.js → p-fc25b956.system.entry.js} +1 -1
  408. package/dist/pine-core/{p-f06ca8df.entry.js → p-ff3de72e.entry.js} +1 -1
  409. package/dist/pine-core/pine-core.esm.js +1 -1
  410. package/dist/pine-core/pine-core.js +1 -1
  411. package/dist/types/components/pds-combobox/combobox-interface.d.ts +8 -1
  412. package/dist/types/components/pds-combobox/grouped-options-panel.d.ts +7 -1
  413. package/dist/types/components/pds-combobox/pds-combobox.d.ts +32 -0
  414. package/dist/types/components/pds-drawer/pds-drawer.d.ts +21 -9
  415. package/dist/types/components/pds-dropdown-menu/pds-dropdown-menu.d.ts +5 -0
  416. package/dist/types/components/pds-modal/pds-modal.d.ts +10 -3
  417. package/dist/types/components/pds-multiselect/pds-multiselect.d.ts +2 -1
  418. package/dist/types/components/pds-popover/pds-popover.d.ts +31 -1
  419. package/dist/types/components/pds-tabs/pds-tab/pds-tab.d.ts +3 -0
  420. package/dist/types/components/pds-tabs/pds-tabpanel/pds-tabpanel.d.ts +3 -0
  421. package/dist/types/components/pds-tabs/pds-tabs.d.ts +14 -2
  422. package/dist/types/components.d.ts +50 -35
  423. package/dist/types/utils/attributes.d.ts +2 -2
  424. package/dist/types/utils/css.d.ts +7 -0
  425. package/dist/types/utils/keep-hydrated.d.ts +29 -2
  426. package/dist/vscode.html-data.json +13 -6
  427. package/hydrate/index.js +961 -213
  428. package/hydrate/index.mjs +961 -213
  429. package/package.json +2 -2
  430. package/dist/cjs/keep-hydrated-iLS88j1Z.js +0 -67
  431. package/dist/esm/keep-hydrated-Dv7ssOTc.js +0 -63
  432. package/dist/esm-es5/attributes-CF5K2pxn.js +0 -1
  433. package/dist/esm-es5/keep-hydrated-Dv7ssOTc.js +0 -1
  434. package/dist/pine-core/p-1cd0acf0.system.entry.js +0 -1
  435. package/dist/pine-core/p-207c94da.entry.js +0 -1
  436. package/dist/pine-core/p-2357758d.system.entry.js +0 -1
  437. package/dist/pine-core/p-281efc69.entry.js +0 -1
  438. package/dist/pine-core/p-2ac9e90a.system.entry.js +0 -1
  439. package/dist/pine-core/p-2f539379.system.entry.js +0 -3
  440. package/dist/pine-core/p-347ae53c.system.entry.js +0 -1
  441. package/dist/pine-core/p-34b575b6.entry.js +0 -2
  442. package/dist/pine-core/p-3b1d8fae.entry.js +0 -1
  443. package/dist/pine-core/p-4414d442.system.entry.js +0 -1
  444. package/dist/pine-core/p-4e67e68e.entry.js +0 -1
  445. package/dist/pine-core/p-539ef98c.entry.js +0 -1
  446. package/dist/pine-core/p-56576b6e.entry.js +0 -1
  447. package/dist/pine-core/p-5ac84b2f.entry.js +0 -1
  448. package/dist/pine-core/p-63854c10.system.entry.js +0 -1
  449. package/dist/pine-core/p-73bc6e9f.system.entry.js +0 -1
  450. package/dist/pine-core/p-798839f7.system.entry.js +0 -1
  451. package/dist/pine-core/p-7e115d33.system.entry.js +0 -1
  452. package/dist/pine-core/p-834c678e.system.entry.js +0 -1
  453. package/dist/pine-core/p-912487fa.entry.js +0 -1
  454. package/dist/pine-core/p-969488f5.system.entry.js +0 -1
  455. package/dist/pine-core/p-9bcdfac2.entry.js +0 -1
  456. package/dist/pine-core/p-9d33bb05.entry.js +0 -1
  457. package/dist/pine-core/p-BMFBF3sJ.system.js +0 -1
  458. package/dist/pine-core/p-D2MUS7JO.js +0 -1
  459. package/dist/pine-core/p-D2yHYrxQ.system.js +0 -1
  460. package/dist/pine-core/p-Dv7ssOTc.js +0 -1
  461. package/dist/pine-core/p-TyevV8iv.system.js +0 -1
  462. package/dist/pine-core/p-afd5e2d7.entry.js +0 -1
  463. package/dist/pine-core/p-bde53290.system.entry.js +0 -1
  464. package/dist/pine-core/p-bf1aea9f.system.entry.js +0 -1
  465. package/dist/pine-core/p-c9395f43.system.entry.js +0 -1
  466. package/dist/pine-core/p-d5dd5599.entry.js +0 -1
  467. package/dist/pine-core/p-dc81ffff.entry.js +0 -1
  468. package/dist/pine-core/p-e46f7541.system.entry.js +0 -1
  469. package/dist/pine-core/p-e7ba30dd.system.entry.js +0 -1
  470. package/dist/pine-core/p-ed3dd3d2.entry.js +0 -1
  471. package/dist/pine-core/p-eee4f146.entry.js +0 -1
  472. package/dist/pine-core/p-f01e35e2.entry.js +0 -1
  473. package/dist/pine-core/p-f2e0da9a.entry.js +0 -1
  474. package/dist/pine-core/p-fc6ac917.entry.js +0 -1
  475. package/dist/pine-core/p-ffe276ef.entry.js +0 -1
  476. /package/dist/esm-es5/{index-DxI-61GK.js → index-BJXk71tO.js} +0 -0
  477. /package/dist/pine-core/{p-DxI-61GK.js → p-BJXk71tO.js} +0 -0
  478. /package/dist/pine-core/{p-CnO10OxH.system.js → p-n3_ytl_p.system.js} +0 -0
package/hydrate/index.js CHANGED
@@ -152,6 +152,109 @@ const isStencilClass = (el, name) => {
152
152
  const classNamesOf = (classes) => typeof classes === 'string'
153
153
  ? classes.split(/\s+/).filter(Boolean)
154
154
  : Object.keys(classes).filter((name) => classes[name]);
155
+ // Each restore that writes something counts. A real strip costs one, but a script that undoes the
156
+ // restore as soon as it lands (from a MutationObserver) keeps both going forever, all in
157
+ // microtasks, so the page never renders or takes input. More writes than this before the next task
158
+ // means that kind of fight. A script that undoes it from a timer or animation frame gets a fresh
159
+ // budget each task; the page stays responsive then, so that fight isn't capped.
160
+ const MAX_RESTORES_PER_TASK = 5;
161
+ // Callbacks waiting for the next task, all run by one message. A MessageChannel message isn't slowed
162
+ // down like a timer is in a background tab (or frozen by test fake timers); a timer is the fallback
163
+ // where it's missing. One message for all of them, so a morph that strips many hosts doesn't open a
164
+ // channel for each.
165
+ const nextTaskCallbacks = new Set();
166
+ const runNextTaskCallbacks = () => {
167
+ const callbacks = Array.from(nextTaskCallbacks);
168
+ nextTaskCallbacks.clear();
169
+ callbacks.forEach((callback) => callback());
170
+ };
171
+ const onNextTask = (callback) => {
172
+ nextTaskCallbacks.add(callback);
173
+ if (nextTaskCallbacks.size > 1)
174
+ return;
175
+ if (typeof MessageChannel === 'undefined') {
176
+ setTimeout(runNextTaskCallbacks);
177
+ return;
178
+ }
179
+ const channel = new MessageChannel();
180
+ channel.port1.onmessage = () => {
181
+ channel.port1.close();
182
+ runNextTaskCallbacks();
183
+ };
184
+ channel.port2.postMessage(null);
185
+ };
186
+ /**
187
+ * The restore kind for a host's own classes, styles and attributes, shared by a component's own
188
+ * host restore and `keepPineHydrated`: one fight on a host's classes stops both, and warns once.
189
+ */
190
+ const HOST_RESTORE = 'host';
191
+ /**
192
+ * Remembers the Stencil classes an element has had, and returns all of them. A restore can't read
193
+ * them from the latest mutation alone: after a script's last strip they're gone from its old value
194
+ * too, and the next change would restore nothing.
195
+ */
196
+ const stencilClassesOf = (seen, el, oldValue) => {
197
+ [...classNamesOf(oldValue !== null && oldValue !== void 0 ? oldValue : ''), ...Array.from(el.classList)]
198
+ .filter((name) => isStencilClass(el, name))
199
+ .forEach((name) => seen.add(name));
200
+ return Array.from(seen);
201
+ };
202
+ // What each element has already been warned about, by kind of restore. A host with its own restore
203
+ // is also watched for its Stencil classes, so one fight on its classes stops both and needs one
204
+ // warning; a fight over a trigger's ARIA is a different kind, and warns on its own. On the global
205
+ // object, like `OBSERVER` below, so two copies of Pine on a page share it.
206
+ const WARNED = Symbol.for('@pine-ds/core/restoreWarnings');
207
+ const warnedKinds = () => {
208
+ var _a;
209
+ const store = globalThis;
210
+ return ((_a = store[WARNED]) !== null && _a !== void 0 ? _a : (store[WARNED] = new WeakMap()));
211
+ };
212
+ /** Whether `el` was already warned about for `kind`; records it if not. */
213
+ const alreadyWarned = (el, kind) => {
214
+ var _a;
215
+ const kinds = (_a = warnedKinds().get(el)) !== null && _a !== void 0 ? _a : new Set();
216
+ warnedKinds().set(el, kinds);
217
+ if (kinds.has(kind))
218
+ return true;
219
+ kinds.add(kind);
220
+ return false;
221
+ };
222
+ /**
223
+ * Wraps a restore callback, which returns whether it wrote anything, so that it writes at most
224
+ * `MAX_RESTORES_PER_TASK` times before the next task (until the message posted after its first write
225
+ * runs). Past that, another script is undoing every restore as soon as it lands, so it stops and
226
+ * lets that script win rather than hang the page. What that script left stays until something
227
+ * changes the element again: the count resets on the next task, so a later change is restored, but
228
+ * nothing is restored on its own. The first give-up warns, logging `el` so it can be found in
229
+ * devtools; later ones, and other restores of the same `kind` giving up on the same element, are
230
+ * silent.
231
+ * @param restore - Puts back what something removed; returns `true` if it wrote anything
232
+ * @param warning - What the console warning says was given up
233
+ * @param el - The element being restored, logged with the warning
234
+ * @param kind - What's being restored; one warning per element for each kind
235
+ */
236
+ const limitRestores = (restore, warning, el, kind = warning) => {
237
+ let writes = 0;
238
+ let warned = false;
239
+ return (...args) => {
240
+ if (writes >= MAX_RESTORES_PER_TASK) {
241
+ if (!warned) {
242
+ warned = true;
243
+ if (el && alreadyWarned(el, kind))
244
+ return;
245
+ // The warning as an argument, not the format string: it carries the tag name, which the HTML
246
+ // parser lets contain `%`.
247
+ console.warn('%s', warning, el);
248
+ }
249
+ return;
250
+ }
251
+ if (!restore(...args))
252
+ return;
253
+ if (writes === 0)
254
+ onNextTask(() => (writes = 0));
255
+ writes += 1;
256
+ };
257
+ };
155
258
  // On the global object, not in this module, so a page with two copies of Pine (the CDN build and a
156
259
  // bundled `@pine-ds/react`) still has one observer.
157
260
  const OBSERVER = Symbol.for('@pine-ds/core/keepPineHydrated');
@@ -162,8 +265,9 @@ const OBSERVER = Symbol.for('@pine-ds/core/keepPineHydrated');
162
265
  * host restore of their own. It only restores classes the element had, so it never runs ahead of
163
266
  * Stencil. It can't see inside shadow roots, which a morph doesn't reach either.
164
267
  *
165
- * A script that removes `hydrated` on purpose sees it come back, and one that removes it every time it
166
- * appears never settles: don't strip Pine's classes from a `MutationObserver`.
268
+ * A script that removes `hydrated` on purpose sees it come back. One that removes it every time it
269
+ * appears (from a `MutationObserver`, say) wins after a few rounds, and the component logs a console
270
+ * warning. The component then stays hidden, as that script left it, until its class changes again.
167
271
  *
168
272
  * Pine's global script calls this, so the CDN and `dist` builds get it on load. The custom-elements
169
273
  * build (`@pine-ds/core/components/*`, `@pine-ds/react`) has no global script: call it once yourself.
@@ -176,14 +280,37 @@ const keepPineHydrated = () => {
176
280
  const store = globalThis;
177
281
  if (store[OBSERVER])
178
282
  return;
283
+ // One capped restore per element, so a script fighting one component doesn't stop the others,
284
+ // and the Stencil classes each one has had.
285
+ const restores = new WeakMap();
286
+ const seen = new WeakMap();
287
+ const restoreFor = (el) => {
288
+ let restore = restores.get(el);
289
+ if (!restore) {
290
+ restore = limitRestores((names) => {
291
+ const missing = names.filter((name) => !el.classList.contains(name));
292
+ if (missing.length > 0)
293
+ el.classList.add(...missing);
294
+ return missing.length > 0;
295
+ }, `${el.localName}: stopped putting back its hydrated and scope classes, as another script keeps removing them.`, el, HOST_RESTORE);
296
+ restores.set(el, restore);
297
+ }
298
+ return restore;
299
+ };
179
300
  const observer = new MutationObserver((records) => {
180
301
  records.forEach(({ target, oldValue }) => {
181
302
  const el = target;
182
- if (oldValue == null || !el.localName.startsWith('pds-'))
303
+ if (!el.localName.startsWith('pds-'))
183
304
  return;
184
- const missing = classNamesOf(oldValue).filter((name) => isStencilClass(el, name) && !el.classList.contains(name));
185
- if (missing.length > 0)
186
- el.classList.add(...missing);
305
+ // No old value is a `class` being added. Stencil's first `hydrated` arrives that way, which
306
+ // needs nothing; for an element already seen, it's the class coming back after a removal.
307
+ if (oldValue == null && !seen.has(el))
308
+ return;
309
+ if (!seen.has(el))
310
+ seen.set(el, new Set());
311
+ const names = stencilClassesOf(seen.get(el), el, oldValue);
312
+ if (names.length > 0)
313
+ restoreFor(el)(names);
187
314
  });
188
315
  });
189
316
  // The document rather than its root element, so replacing `<html>` doesn't end the watch.
@@ -5605,7 +5732,7 @@ class MockPdsModal {
5605
5732
  'pds-modal__backdrop': true,
5606
5733
  'open': this.open,
5607
5734
  };
5608
- return (hAsync("div", { key: '1211583aae06cfa7726371ba18796d7704d9e468', class: backdropClasses }, hAsync("div", { key: '8376a213a21b8f5ee78b9e58e2265d27ce957307', class: modalClasses, role: "dialog", "aria-modal": "true", "aria-labelledby": this.componentId ? `${this.componentId}-heading` : null, part: "modal" }, hAsync("div", { key: '4dfcad52e69fa2f207ed09c3ee3a225a1d789e71', class: "pds-modal__header" }, hAsync("slot", { key: '8d9710b91f6f83bc20b2f93b9e4e9fa5f59ae2ce', name: "header" })), hAsync("div", { key: 'f3291bf921619eabb6d63aa80e006f94239325fc', class: "pds-modal-content" }, hAsync("slot", { key: '19dca53455f9943e394d8ed9ea722a1a591e5de6' })), hAsync("div", { key: '835caa9692b1109649edc7d4daf308bb10ed0cd9', class: "pds-modal__footer" }, hAsync("slot", { key: 'f30033b8f842923df9780b893d05428dc14452dc', name: "footer" })))));
5735
+ return (hAsync("div", { key: '3a526f6883d7e7df35985a145962f656621535c1', class: backdropClasses }, hAsync("div", { key: '3af0487dc8c8831903cd7c22ffbf3e708b067ad7', class: modalClasses, role: "dialog", "aria-modal": "true", "aria-labelledby": this.componentId ? `${this.componentId}-heading` : null, part: "modal" }, hAsync("div", { key: '94e6205042ee91dac0823901cc97b79e93a515f2', class: "pds-modal__header" }, hAsync("slot", { key: 'ca04b575ccceabd431e3f5c57189f17f9aae6089', name: "header" })), hAsync("div", { key: 'f8327a261e70b622add1dd4ee21b5f8e8d91e603', class: "pds-modal-content" }, hAsync("slot", { key: 'a1a9c30d0f5479b0004ace4544e3d96ae87465be' })), hAsync("div", { key: 'af5fa59922047eeec7cbf0a0e1ee4b472b16079c', class: "pds-modal__footer" }, hAsync("slot", { key: '3c469bf94bb3a26dfd8046a5eda481f9d55edca1', name: "footer" })))));
5609
5736
  }
5610
5737
  get el() { return getElement(this); }
5611
5738
  static get style() { return pdsModalCss$1(); }
@@ -5627,7 +5754,7 @@ class MockPdsModal {
5627
5754
  }; }
5628
5755
  }
5629
5756
 
5630
- /* pds-icons v10.5.1, ES Modules */
5757
+ /* pds-icons v10.6.0, ES Modules */
5631
5758
 
5632
5759
  const addCircle = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' class='pdsicon'><path fill-rule='evenodd' d='M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18M1 12C1 5.925 5.925 1 12 1s11 4.925 11 11-4.925 11-11 11S1 18.075 1 12m11-5a1 1 0 0 1 1 1v3h3a1 1 0 1 1 0 2h-3v3a1 1 0 1 1-2 0v-3H8a1 1 0 1 1 0-2h3V8a1 1 0 0 1 1-1'/></svg>";
5633
5760
  const calendarSimple = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' class='pdsicon'><path fill-rule='evenodd' d='M8 1a1 1 0 0 1 1 1v1h6V2a1 1 0 1 1 2 0v1.002c.476.003.891.013 1.252.042.562.046 1.079.145 1.564.392a4 4 0 0 1 1.748 1.748c.247.485.346 1.002.392 1.564C22 7.29 22 7.954 22 8.758v8.483c0 .805 0 1.47-.044 2.01-.046.563-.145 1.08-.392 1.565a4 4 0 0 1-1.748 1.748c-.485.247-1.002.346-1.564.392-.541.044-1.206.044-2.01.044H7.758c-.805 0-1.47 0-2.01-.044-.563-.046-1.08-.145-1.565-.392a4 4 0 0 1-1.748-1.748c-.247-.485-.346-1.002-.392-1.564C2 18.71 2 18.046 2 17.242V8.758c0-.805 0-1.47.044-2.01.046-.563.145-1.08.392-1.565a4 4 0 0 1 1.748-1.748c.485-.247 1.002-.346 1.564-.392.361-.03.777-.04 1.252-.042V2a1 1 0 0 1 1-1M7 5.002c-.446.003-.795.012-1.089.036-.438.035-.663.1-.819.18a2 2 0 0 0-.874.874c-.08.156-.145.38-.18.819C4 7.361 4 7.943 4 8.8V9h16v-.2c0-.857 0-1.439-.038-1.889-.035-.438-.1-.663-.18-.819a2 2 0 0 0-.874-.874c-.156-.08-.38-.145-.819-.18A15 15 0 0 0 17 5.002V6a1 1 0 1 1-2 0V5H9v1a1 1 0 1 1-2 0zM20 11H4v6.2c0 .857 0 1.439.038 1.889.035.438.1.663.18.819a2 2 0 0 0 .874.874c.156.08.38.145.819.18C6.361 21 6.943 21 7.8 21h8.4c.857 0 1.439 0 1.889-.038.438-.035.663-.1.819-.18a2 2 0 0 0 .874-.874c.08-.156.145-.38.18-.819.037-.45.038-1.032.038-1.889z'/></svg>";
@@ -6072,7 +6199,7 @@ const debounce = (func, wait = 0) => {
6072
6199
  * @param options.semanticMap - Optional mapping of semantic names to CSS variables
6073
6200
  * @returns Normalized color value or undefined for invalid inputs
6074
6201
  */
6075
- const normalizeColorValue = (value, options) => {
6202
+ const normalizeColorValue$1 = (value, options) => {
6076
6203
  if (!value)
6077
6204
  return undefined;
6078
6205
  const trimmed = value.trim();
@@ -6116,7 +6243,7 @@ const setColor = (color, customColors) => {
6116
6243
  // Merge defaults with any custom overrides so defaults are preserved
6117
6244
  const semanticMap = Object.assign(Object.assign({}, defaultColors), (customColors || {}));
6118
6245
  // Use the shared normalizer so components accept semantic names, raw tokens, var(...), or literals
6119
- const resolved = normalizeColorValue(color, { semanticMap });
6246
+ const resolved = normalizeColorValue$1(color, { semanticMap });
6120
6247
  // Ensure we never return an undefined style value; if unresolved, omit the property
6121
6248
  if (!resolved)
6122
6249
  return {};
@@ -6132,10 +6259,14 @@ const setColor = (color, customColors) => {
6132
6259
  * @param attributes - Attribute names and the values they should have
6133
6260
  */
6134
6261
  const setAttributesIfChanged = (el, attributes) => {
6262
+ let wrote = false;
6135
6263
  Object.entries(attributes).forEach(([name, value]) => {
6136
- if (el.getAttribute(name) !== value)
6264
+ if (el.getAttribute(name) !== value) {
6137
6265
  el.setAttribute(name, value);
6266
+ wrote = true;
6267
+ }
6138
6268
  });
6269
+ return wrote;
6139
6270
  };
6140
6271
  /**
6141
6272
  * Puts back any of `expected`'s classes or style properties that are missing from `el`. It only
@@ -6148,10 +6279,9 @@ const restoreHostStyling = (el, { classes, styles }) => {
6148
6279
  const missing = classes.filter((name) => !el.classList.contains(name));
6149
6280
  if (missing.length > 0)
6150
6281
  el.classList.add(...missing);
6151
- Object.entries(styles).forEach(([name, value]) => {
6152
- if (value && el.style.getPropertyValue(name) === '')
6153
- el.style.setProperty(name, value);
6154
- });
6282
+ const missingStyles = Object.entries(styles).filter(([name, value]) => value && el.style.getPropertyValue(name) === '');
6283
+ missingStyles.forEach(([name, value]) => el.style.setProperty(name, value));
6284
+ return missing.length > 0 || missingStyles.length > 0;
6155
6285
  };
6156
6286
  /**
6157
6287
  * Watches a component's own host and puts back what it rendered when something strips it. A DOM
@@ -6168,16 +6298,18 @@ const restoreHostStyling = (el, { classes, styles }) => {
6168
6298
  const keepHostStyling = (el, expected) => {
6169
6299
  if (typeof MutationObserver === 'undefined')
6170
6300
  return null;
6171
- const observer = new MutationObserver((records) => {
6301
+ const tag = el.tagName.toLowerCase();
6302
+ const seenStencilClasses = new Set();
6303
+ const observer = new MutationObserver(limitRestores((records) => {
6172
6304
  const styling = expected();
6173
6305
  // A strip takes Stencil's own classes too: without `hydrated` Stencil hides the component, and
6174
6306
  // without its scope classes a scoped component's CSS stops matching. Put back only the ones that
6175
6307
  // were there, so this never runs ahead of Stencil. `keepPineHydrated` does the same for every
6176
6308
  // component, but the custom-elements build only runs it if the consumer calls it, so keep this.
6177
6309
  const stencilClasses = records
6178
- .filter((record) => record.attributeName === 'class' && record.oldValue != null)
6179
- .flatMap((record) => classNamesOf(record.oldValue).filter((name) => isStencilClass(el, name)));
6180
- restoreHostStyling(el, Object.assign(Object.assign({}, styling), { classes: [...styling.classes, ...stencilClasses] }));
6310
+ .filter((record) => record.attributeName === 'class')
6311
+ .flatMap((record) => stencilClassesOf(seenStencilClasses, el, record.oldValue));
6312
+ let wrote = restoreHostStyling(el, Object.assign(Object.assign({}, styling), { classes: [...styling.classes, ...stencilClasses] }));
6181
6313
  // An attribute the component still renders comes back with the value it had, which is what
6182
6314
  // Stencil wrote (a boolean `true` lands as an empty value). One it stopped rendering stays
6183
6315
  // removed, since that was Stencil's own write.
@@ -6187,8 +6319,10 @@ const keepHostStyling = (el, expected) => {
6187
6319
  if (oldValue == null || rendered == null || rendered === false || el.hasAttribute(name))
6188
6320
  return;
6189
6321
  el.setAttribute(name, oldValue);
6322
+ wrote = true;
6190
6323
  });
6191
- });
6324
+ return wrote;
6325
+ }, `${tag}: stopped restoring its host, as another script keeps changing it. Use props instead.`, el, HOST_RESTORE));
6192
6326
  observer.observe(el, { attributes: true, attributeOldValue: true });
6193
6327
  return observer;
6194
6328
  };
@@ -6446,8 +6580,8 @@ class PdsBox {
6446
6580
  this.sizeXl == undefined ? 'pds-box' : ''}
6447
6581
  `;
6448
6582
  // Normalize so pds-box accepts --token, var(--token), or literals (no semantic names)
6449
- const normalizedBackground = normalizeColorValue(this.backgroundColor);
6450
- const normalizedBorder = normalizeColorValue(this.borderColor);
6583
+ const normalizedBackground = normalizeColorValue$1(this.backgroundColor);
6584
+ const normalizedBorder = normalizeColorValue$1(this.borderColor);
6451
6585
  const boxInlineStyles = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (normalizedBackground && { '--color-background-box': normalizedBackground })), (normalizedBorder && { '--color-border-box': normalizedBorder })), (this.minHeight && { '--sizing-min-height-box': this.minHeight })), (this.minWidth && { '--sizing-min-width-box': this.minWidth })), (this.flex && !['none', 'grow', 'shrink'].includes(this.flex) && { 'flex': this.flex }));
6452
6586
  this.hostKeeper.record(boxClasses, boxInlineStyles);
6453
6587
  return (hAsync(Host, { key: 'dc4d939daf38b24ecbfa0eb0a95ab67b97a85665', class: boxClasses, style: boxInlineStyles }));
@@ -9235,11 +9369,11 @@ class PdsChip {
9235
9369
  }
9236
9370
  // Custom properties rather than inline colors on the dot/icon, so a
9237
9371
  // consumer's ::part(dot) or ::part(icon) rule still wins over the prop.
9238
- const dotColor = normalizeColorValue(this.dotColor, { semanticMap: SENTIMENT_DOT_COLORS });
9372
+ const dotColor = normalizeColorValue$1(this.dotColor, { semanticMap: SENTIMENT_DOT_COLORS });
9239
9373
  if (dotColor !== undefined) {
9240
9374
  styles['--pds-chip-dot-color'] = dotColor;
9241
9375
  }
9242
- const iconColor = normalizeColorValue(this.iconColor, { semanticMap: SENTIMENT_DOT_COLORS });
9376
+ const iconColor = normalizeColorValue$1(this.iconColor, { semanticMap: SENTIMENT_DOT_COLORS });
9243
9377
  if (iconColor !== undefined) {
9244
9378
  styles['--pds-chip-icon-color'] = iconColor;
9245
9379
  }
@@ -10736,7 +10870,14 @@ const PINE_ICON_NAME$1 = /^[a-z0-9-]+$/i;
10736
10870
  * only ever passed to `pds-icon` as `name`.
10737
10871
  */
10738
10872
  function groupIconOf(optgroup) {
10739
- const icon = optgroup.getAttribute('data-icon');
10873
+ return iconOf(optgroup);
10874
+ }
10875
+ /** An option's `data-icon` when it's a Pine icon name, or null; the same check as a group's. */
10876
+ function optionIconOf(option) {
10877
+ return iconOf(option);
10878
+ }
10879
+ function iconOf(element) {
10880
+ const icon = element.getAttribute('data-icon');
10740
10881
  return icon !== null && PINE_ICON_NAME$1.test(icon) ? icon : null;
10741
10882
  }
10742
10883
  /** An option is disabled by its own `disabled` or its optgroup's, as in a native select. */
@@ -10754,8 +10895,12 @@ function isGroupDisabled(group) {
10754
10895
  * Groups the combobox's filtered items for the panel: each optgroup becomes one entry holding its
10755
10896
  * options, and ungrouped options stay where they are. Indexes count options in list order, the
10756
10897
  * same as the inline listbox, so `data-option-index` means the same thing in every mode.
10898
+ *
10899
+ * `position`, when given, orders the entries instead: an ungrouped option or an optgroup it knows
10900
+ * goes where it reports, and the rest keep their place after those. Options from the `options` prop
10901
+ * use it, so a row the data lists between two groups is drawn between them.
10757
10902
  */
10758
- function buildPanelEntries(items) {
10903
+ function buildPanelEntries(items, position) {
10759
10904
  const entries = [];
10760
10905
  const groups = new Map();
10761
10906
  let index = 0;
@@ -10777,7 +10922,14 @@ function buildPanelEntries(items) {
10777
10922
  entries.push({ kind: 'option', option, index: index++ });
10778
10923
  }
10779
10924
  });
10780
- return entries;
10925
+ if (position === undefined)
10926
+ return entries;
10927
+ const at = (entry) => { var _a; return (_a = position(entry.kind === 'group' ? entry.group.optgroup : entry.option)) !== null && _a !== void 0 ? _a : Infinity; };
10928
+ // Array.prototype.sort is stable, so entries with no position keep their order.
10929
+ return entries.sort((a, b) => {
10930
+ const [first, second] = [at(a), at(b)];
10931
+ return first === second ? 0 : first < second ? -1 : 1;
10932
+ });
10781
10933
  }
10782
10934
  /** The label of the optgroup an option sits in, or null for an ungrouped option. */
10783
10935
  function groupLabelOf(option) {
@@ -10985,7 +11137,7 @@ class FlyoutController {
10985
11137
  }
10986
11138
  }
10987
11139
 
10988
- const pdsComboboxCss = () => `:host{display:block}:host([aria-disabled=true]) .pds-combobox__input-icon{color:var(--pine-color-text-disabled);pointer-events:none}.pds-combobox{position:relative}.pds-combobox__label{color:var(--pine-color-text-label);display:block;font:var(--pine-typography-body-medium);letter-spacing:var(--pine-letter-spacing);-webkit-margin-after:var(--pine-dimension-2xs);margin-block-end:var(--pine-dimension-2xs)}.pds-combobox__input-wrapper{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;position:relative;width:100%}.pds-combobox__input{background:var(--pine-color-background-container);border:var(--pine-border);border-radius:var(--pine-dimension-125);-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--pine-color-text-strong);-ms-flex:1;flex:1;font:var(--pine-typography-body-medium);padding:var(--pine-dimension-xs) var(--pine-dimension-450) var(--pine-dimension-xs) var(--pine-dimension-150);-webkit-transition:border-color var(--pine-motion-duration-base) ease;transition:border-color var(--pine-motion-duration-base) ease;width:100%}.pds-combobox__input:hover:not(:disabled){border-color:var(--pine-color-border-hover)}.pds-combobox__input:disabled{background:var(--pine-color-background-container-disabled);border-color:var(--pine-color-border-disabled);color:var(--pine-color-text-disabled);cursor:not-allowed}.pds-combobox__input:disabled::-webkit-input-placeholder{color:var(--pine-color-text-placeholder-disabled)}.pds-combobox__input:disabled::-moz-placeholder{color:var(--pine-color-text-placeholder-disabled)}.pds-combobox__input:disabled:-ms-input-placeholder{color:var(--pine-color-text-placeholder-disabled)}.pds-combobox__input:disabled::-ms-input-placeholder{color:var(--pine-color-text-placeholder-disabled)}.pds-combobox__input:disabled::placeholder{color:var(--pine-color-text-placeholder-disabled)}.pds-combobox__input:focus-visible{border-color:var(--pine-color-border-active);outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}.pds-combobox__input::-webkit-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-combobox__input::-moz-placeholder{color:var(--pine-color-text-placeholder)}.pds-combobox__input:-ms-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-combobox__input::-ms-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-combobox__input::placeholder{color:var(--pine-color-text-placeholder)}.pds-combobox__input.pds-combobox__input--invalid{background:var(--pine-color-red-050);border-color:var(--pine-color-border-danger)}:host-context([data-theme=dark]) .pds-combobox__input.pds-combobox__input--invalid{background:var(--pine-color-red-950)}.pds-combobox__input.pds-combobox__input--invalid:hover:not(:disabled){border-color:var(--pine-color-border-danger)}.pds-combobox__input.pds-combobox__input--invalid:focus-visible{outline-color:var(--pine-color-focus-ring-danger)}.pds-combobox__input-icon{color:var(--pine-color-text-secondary);inset-inline-end:var(--pine-dimension-150);pointer-events:none;position:absolute;z-index:calc(var(--pine-z-index-raised) - 1)}.pds-combobox__helper{color:var(--pine-color-text-message);font:var(--pine-typography-body-sm-medium);-webkit-margin-before:var(--pine-dimension-2xs);margin-block-start:var(--pine-dimension-2xs)}.pds-combobox__error{-ms-flex-align:start;align-items:flex-start;color:var(--pine-color-text-message-danger);display:-ms-flexbox;display:flex;font:var(--pine-typography-body-sm-medium);gap:var(--pine-dimension-2xs);-webkit-margin-before:var(--pine-dimension-2xs);margin-block-start:var(--pine-dimension-2xs)}.pds-combobox__error pds-icon{-ms-flex-negative:0;flex-shrink:0;-webkit-margin-before:var(--pine-dimension-025);margin-block-start:var(--pine-dimension-025)}.pds-combobox__listbox{background:var(--pine-color-background-overlay);border:0;border-radius:var(--pine-dimension-125);-webkit-box-shadow:var(--pine-box-shadow);box-shadow:var(--pine-box-shadow);list-style:none;margin:0;min-width:220px;overflow-y:auto;padding:var(--pine-dimension-xs);position:absolute;z-index:var(--pine-z-index-raised)}.pds-combobox__option{-ms-flex-align:center;align-items:center;background:transparent;border-radius:var(--pine-dimension-125);color:var(--pine-color-text-secondary);cursor:pointer;display:-ms-flexbox;display:flex;font:var(--pine-typography-body-medium);-ms-flex-pack:justify;justify-content:space-between;padding:var(--pine-dimension-xs) var(--pine-dimension-sm);position:relative;-webkit-transition:background 0.15s;transition:background 0.15s}.pds-combobox__option[aria-selected=true]{background:var(--pine-color-background-muted)}.pds-combobox__option:focus-visible{outline:0}.pds-combobox__option.pds-combobox__option--layout .pds-combobox__option-layout-wrapper{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;width:100%}.pds-combobox__option.pds-combobox__option--chip .pds-combobox__option-chip{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;width:100%}.pds-combobox__option:last-child{-webkit-margin-after:0;margin-block-end:0}.pds-combobox__option--highlighted,.pds-combobox__option[selected],.pds-combobox__option--selected{background:var(--pine-color-background-muted)}.pds-combobox__option--disabled,.pds-combobox__group-row--disabled>.pds-combobox__group-row-trigger,.pds-combobox__group-back--disabled>.pds-combobox__group-back-trigger,.pds-combobox__group--disabled>.pds-combobox__group-label{color:var(--pine-color-text-disabled)}.pds-combobox__option--disabled{cursor:not-allowed}.pds-combobox__option--disabled .pds-combobox__option-chip,.pds-combobox__option--disabled .pds-combobox__option-layout-wrapper{opacity:0.5}.pds-combobox__option-check{color:currentColor;font-size:var(--pine-dimension-150);-webkit-margin-start:var(--pine-dimension-150);margin-inline-start:var(--pine-dimension-150)}.pds-combobox__group-label{color:var(--pine-color-text-tertiary);cursor:default;font:var(--pine-typography-heading-caption);-webkit-margin-after:var(--pine-dimension-2xs);margin-block-end:var(--pine-dimension-2xs);-webkit-margin-before:var(--pine-dimension-150);margin-block-start:var(--pine-dimension-150);padding:var(--pine-dimension-2xs) var(--pine-dimension-sm);text-transform:uppercase}.pds-combobox__group-label:first-child{-webkit-margin-before:0;margin-block-start:0}.pds-combobox__group{list-style:none;-webkit-margin-before:var(--pine-dimension-150);margin-block-start:var(--pine-dimension-150)}.pds-combobox__group:first-child{-webkit-margin-before:0;margin-block-start:0}.pds-combobox__group-list{list-style:none;margin:0;padding:0}.pds-combobox__listbox--grouped .pds-combobox__group-list{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--pine-dimension-2xs)}.pds-combobox__group-label--with-icon{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;gap:var(--pine-dimension-xs)}.pds-combobox__group-icon{-ms-flex-negative:0;flex-shrink:0}.pds-combobox__group-row{list-style:none;position:relative}.pds-combobox__group-row-trigger{-ms-flex-align:center;align-items:center;border-radius:var(--pine-dimension-125);color:var(--pine-color-text-secondary);cursor:pointer;display:-ms-flexbox;display:flex;font:var(--pine-typography-body-medium);gap:var(--pine-dimension-xs);-ms-flex-pack:justify;justify-content:space-between;padding:var(--pine-dimension-xs) var(--pine-dimension-sm);-webkit-transition:background 0.15s;transition:background 0.15s}.pds-combobox__group-row--open>.pds-combobox__group-row-trigger,.pds-combobox__group-row--has-selection>.pds-combobox__group-row-trigger,.pds-combobox__group-row--highlighted>.pds-combobox__group-row-trigger,.pds-combobox__group-back--highlighted>.pds-combobox__group-row-trigger,.pds-combobox__group-row-trigger:hover{background:var(--pine-color-background-muted)}.pds-combobox__listbox--drill-in,.pds-combobox__listbox--drill-out{overflow-x:hidden}.pds-combobox__listbox--drill-in>.pds-combobox__group-back{-webkit-animation:pds-combobox-drill-from-end var(--pine-motion-duration-base) var(--pine-motion-easing-out);animation:pds-combobox-drill-from-end var(--pine-motion-duration-base) var(--pine-motion-easing-out)}.pds-combobox__listbox--drill-out>li{-webkit-animation:pds-combobox-drill-from-start var(--pine-motion-duration-base) var(--pine-motion-easing-out);animation:pds-combobox-drill-from-start var(--pine-motion-duration-base) var(--pine-motion-easing-out)}@-webkit-keyframes pds-combobox-drill-from-end{from{opacity:0;-webkit-transform:translateX(var(--pine-dimension-sm));transform:translateX(var(--pine-dimension-sm))}}@keyframes pds-combobox-drill-from-end{from{opacity:0;-webkit-transform:translateX(var(--pine-dimension-sm));transform:translateX(var(--pine-dimension-sm))}}@-webkit-keyframes pds-combobox-drill-from-start{from{opacity:0;-webkit-transform:translateX(calc(var(--pine-dimension-sm) * -1));transform:translateX(calc(var(--pine-dimension-sm) * -1))}}@keyframes pds-combobox-drill-from-start{from{opacity:0;-webkit-transform:translateX(calc(var(--pine-dimension-sm) * -1));transform:translateX(calc(var(--pine-dimension-sm) * -1))}}.pds-combobox__group-row--keyboard>.pds-combobox__group-row-trigger,.pds-combobox__group-back--keyboard>.pds-combobox__group-row-trigger{outline:var(--pine-outline-focus);outline-offset:calc(var(--pine-border-width) * -2)}.pds-combobox__group-row-label{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;gap:var(--pine-dimension-xs);min-width:0}.pds-combobox__group-row-caret{-ms-flex-negative:0;flex-shrink:0}.pds-combobox__listbox--grouped,.pds-combobox__flyout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--pine-dimension-2xs);padding:var(--pine-dimension-2xs)}.pds-combobox__flyout{background:var(--pine-color-background-overlay);border-radius:var(--pine-dimension-125);-webkit-box-shadow:var(--pine-box-shadow);box-shadow:var(--pine-box-shadow);list-style:none;margin:0;overflow-y:auto;position:fixed;visibility:hidden;width:-webkit-max-content;width:-moz-max-content;width:max-content;z-index:1}.pds-combobox__listbox--with-search{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;overflow:hidden;padding:0}.pds-combobox__listbox-options{-ms-flex:1;flex:1;list-style:none;margin:0;min-height:0;overflow-y:auto;padding:var(--pine-dimension-xs)}.pds-combobox__listbox-options.pds-combobox__listbox--grouped{padding:var(--pine-dimension-2xs)}.pds-combobox__panel-search{-ms-flex-align:center;align-items:center;-webkit-border-after:var(--pine-border);border-block-end:var(--pine-border);border-block-end-color:var(--pine-color-border-subtle);display:-ms-flexbox;display:flex;-ms-flex-negative:0;flex-shrink:0;gap:var(--pine-dimension-xs);padding:var(--pine-dimension-sm)}.pds-combobox__panel-search pds-icon{color:var(--pine-color-text-muted);-ms-flex-negative:0;flex-shrink:0}.pds-combobox__panel-search:focus-within{border-block-end-color:var(--pine-color-border-active)}.pds-combobox__panel-search-input{background:transparent;border:0;color:var(--pine-color-text-strong);-ms-flex:1;flex:1;font:var(--pine-typography-body);letter-spacing:var(--pine-letter-spacing);min-width:0;outline:none;padding:0}.pds-combobox__panel-search-input::-webkit-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-combobox__panel-search-input::-moz-placeholder{color:var(--pine-color-text-placeholder)}.pds-combobox__panel-search-input:-ms-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-combobox__panel-search-input::-ms-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-combobox__panel-search-input::placeholder{color:var(--pine-color-text-placeholder)}.pds-combobox__group-back{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--pine-dimension-2xs);list-style:none}.pds-combobox__group-back-trigger{-ms-flex-pack:start;justify-content:flex-start}.pds-combobox__listbox-options--drilled-in.pds-combobox__listbox--grouped{-webkit-padding-before:0;padding-block-start:0}.pds-combobox__listbox-options--drilled-in:focus{outline:none}.pds-combobox__listbox-options--drilled-in:focus .pds-combobox__group-back-trigger{border-block-end-color:var(--pine-color-border-active)}:where(.pds-combobox__listbox-options--drilled-in) .pds-combobox__group-back-trigger{background-color:var(--pine-color-background-overlay);-webkit-border-after:var(--pine-border);border-block-end:var(--pine-border);border-block-end-color:var(--pine-color-border-subtle);border-radius:0;color:var(--pine-color-text-strong);font:var(--pine-typography-body);inset-block-start:0;letter-spacing:var(--pine-letter-spacing);margin-inline:calc(var(--pine-dimension-2xs) * -1);padding:var(--pine-dimension-sm);position:-webkit-sticky;position:sticky;z-index:1}.pds-combobox__drill-in-options{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--pine-dimension-2xs);list-style:none;margin:0;padding:0}.visually-hidden{border:0;clip:rect(0 0 0 0);-webkit-clip-path:polygon(0 0, 0 0, 0 0);clip-path:polygon(0 0, 0 0, 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.pds-combobox__loading{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;padding:var(--pine-dimension-150)}.pds-combobox__empty{color:var(--pine-color-text-tertiary);padding:var(--pine-dimension-150) var(--pine-dimension-sm);text-align:center}.pds-combobox__load-more{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;padding:var(--pine-dimension-150)}:host(.pds-combobox-dropdown-portal) .pds-combobox__listbox{position:fixed;z-index:var(--pine-z-index-priority)}.pds-combobox__button-trigger{-ms-flex-align:center;align-items:center;background:var(--color-background-default, var(--pine-color-secondary));border:var(--pine-border);border-radius:var(--pine-border-radius-full);-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--color-text-default, var(--pine-color-text-inverse-emphasis));cursor:pointer;display:-ms-flexbox;display:flex;font:var(--pine-typography-body-medium);-ms-flex-pack:justify;justify-content:space-between;min-height:var(--pine-dimension-450);outline:none;padding:0 var(--pine-dimension-sm);-webkit-transition:border-color 0.15s, background 0.15s, -webkit-box-shadow 0.15s;transition:border-color 0.15s, background 0.15s, -webkit-box-shadow 0.15s;transition:border-color 0.15s, box-shadow 0.15s, background 0.15s;transition:border-color 0.15s, box-shadow 0.15s, background 0.15s, -webkit-box-shadow 0.15s;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.pds-combobox__button-trigger .pds-combobox__button-trigger-layout-wrapper{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex:1;flex:1}.pds-combobox__button-trigger .trigger-content{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;width:100%}.pds-combobox__button-trigger:focus-visible{border-color:var(--color-border-focus, var(--pine-color-border));-webkit-box-shadow:0 0 0 2px var(--color-outline, var(--pine-color-focus-ring));box-shadow:0 0 0 2px var(--color-outline, var(--pine-color-focus-ring))}.pds-combobox__button-trigger:hover{background:var(--color-background-hover, var(--pine-color-secondary-hover));border-color:var(--color-border-hover, var(--pine-color-border-hover))}.pds-combobox__button-trigger[aria-disabled=true],.pds-combobox__button-trigger:disabled{background:var(--color-background-disabled, var(--pine-color-secondary-disabled));border-color:var(--color-border-disabled, var(--pine-color-border-disabled));color:var(--color-text-disabled, var(--pine-color-text-secondary-disabled));cursor:not-allowed;opacity:0.6}.pds-combobox__button-trigger-label{color:inherit;-ms-flex:1 1 auto;flex:1 1 auto;text-align:start}.pds-combobox__button-trigger--input-shape{border-radius:var(--pine-dimension-125);font:var(--pine-typography-body);letter-spacing:var(--pine-letter-spacing);min-height:var(--pine-dimension-450);padding:calc(var(--pine-dimension-xs) - var(--pine-border-width)) var(--pine-dimension-150)}.pds-combobox__button-trigger--secondary.pds-combobox__button-trigger--input-shape:not([aria-disabled=true]) .pds-combobox__button-trigger-label--placeholder{color:var(--pine-color-text-muted)}.pds-combobox__button-trigger-chevron{color:currentColor;-webkit-margin-start:var(--pine-dimension-150);margin-inline-start:var(--pine-dimension-150)}.pds-combobox__button-trigger--primary{--color-background-default:var(--pine-color-primary);--color-background-hover:var(--pine-color-primary-hover);--color-background-disabled:var(--pine-color-primary-disabled);--color-border-default:var(--pine-color-primary);--color-border-hover:var(--pine-color-primary-hover);--color-border-disabled:var(--pine-color-primary-disabled);--color-border-focus:var(--pine-color-primary);--color-text-default:var(--pine-color-text-primary);--color-text-disabled:var(--pine-color-text-primary-disabled);--color-outline:var(--pine-color-focus-ring)}.pds-combobox__button-trigger--accent{--color-background-default:var(--pine-color-accent);--color-background-hover:var(--pine-color-accent-hover);--color-background-disabled:var(--pine-color-accent-disabled);--color-border-default:var(--pine-color-accent);--color-border-hover:var(--pine-color-accent-hover);--color-border-disabled:var(--pine-color-accent-disabled);--color-border-focus:var(--pine-color-accent);--color-text-default:var(--pine-color-text-primary);--color-text-disabled:var(--pine-color-text-accent-disabled);--color-outline:var(--pine-color-focus-ring)}.pds-combobox__button-trigger--secondary{--color-background-default:var(--pine-color-secondary);--color-background-hover:var(--pine-color-secondary-hover);--color-background-disabled:var(--pine-color-secondary-disabled);--color-border-default:var(--pine-color-border);--color-border-hover:var(--pine-color-border-hover);--color-border-disabled:var(--pine-color-border-disabled);--color-border-focus:var(--pine-color-border);--color-text-default:var(--pine-color-text-secondary);--color-text-disabled:var(--pine-color-text-secondary-disabled);--color-outline:var(--pine-color-focus-ring)}.pds-combobox__button-trigger--destructive{--color-background-default:var(--pine-color-danger);--color-background-hover:var(--pine-color-danger-hover);--color-background-disabled:var(--pine-color-danger-disabled);--color-border-default:var(--pine-color-danger);--color-border-hover:var(--pine-color-danger-hover);--color-border-disabled:var(--pine-color-danger-disabled);--color-border-focus:var(--pine-color-danger);--color-text-default:var(--pine-color-white);--color-text-disabled:var(--pine-color-text-danger-disabled);--color-outline:var(--pine-color-focus-ring-danger)}[data-layout]{border-radius:var(--pine-dimension-125);padding-block:var(--pine-dimension-xs)}.pds-combobox__chip-trigger{-ms-flex-align:center;align-items:center;border-radius:var(--pine-dimension-sm);-webkit-box-sizing:border-box;box-sizing:border-box;cursor:pointer;display:-ms-inline-flexbox;display:inline-flex;font:var(--pine-typography-body-medium);-ms-flex-pack:justify;justify-content:space-between;outline:none;padding-block:var(--pine-dimension-025);padding-inline:var(--pine-dimension-150);-webkit-transition:all 0.15s ease;transition:all 0.15s ease;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.pds-combobox__chip-trigger .pds-combobox__chip-trigger-layout-wrapper{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex:1;flex:1}.pds-combobox__chip-trigger .trigger-content{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;width:100%}.pds-combobox__chip-trigger:focus-visible{outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}.pds-combobox__chip-trigger[aria-disabled=true]{cursor:not-allowed;opacity:0.6}.pds-combobox__chip-trigger-label{color:inherit;-ms-flex:1 1 auto;flex:1 1 auto;text-align:start}.pds-combobox__chip-trigger-chevron{color:currentColor;-webkit-margin-start:var(--pine-dimension-150);margin-inline-start:var(--pine-dimension-150)}.pds-combobox__chip-trigger-icon{-webkit-margin-end:var(--pine-dimension-2xs);margin-inline-end:var(--pine-dimension-2xs)}.pds-combobox__chip-trigger--neutral,.pds-combobox__chip-trigger--accent,.pds-combobox__chip-trigger--success,.pds-combobox__chip-trigger--warning,.pds-combobox__chip-trigger--danger,.pds-combobox__chip-trigger--info{background:var(--chip-bg);border:var(--pine-border-width) solid var(--chip-border);color:var(--chip-text)}.pds-combobox__chip-trigger--neutral:hover:not([aria-disabled=true]),.pds-combobox__chip-trigger--accent:hover:not([aria-disabled=true]),.pds-combobox__chip-trigger--success:hover:not([aria-disabled=true]),.pds-combobox__chip-trigger--warning:hover:not([aria-disabled=true]),.pds-combobox__chip-trigger--danger:hover:not([aria-disabled=true]),.pds-combobox__chip-trigger--info:hover:not([aria-disabled=true]){background:var(--chip-bg-hover)}.pds-combobox__chip-trigger--neutral:focus-visible,.pds-combobox__chip-trigger--accent:focus-visible,.pds-combobox__chip-trigger--success:focus-visible,.pds-combobox__chip-trigger--warning:focus-visible,.pds-combobox__chip-trigger--danger:focus-visible,.pds-combobox__chip-trigger--info:focus-visible{border-color:var(--chip-border)}.pds-combobox__chip-trigger--neutral{--chip-bg:var(--pine-chip-color-neutral);--chip-bg-hover:var(--pine-chip-color-neutral-hover);--chip-border:var(--pine-chip-color-neutral-hover);--chip-text:var(--pine-color-text-neutral)}.pds-combobox__chip-trigger--accent{--chip-bg:var(--pine-chip-color-accent);--chip-bg-hover:var(--pine-chip-color-accent-hover);--chip-border:var(--pine-chip-color-accent-hover);--chip-text:var(--pine-color-text-accent)}.pds-combobox__chip-trigger--success{--chip-bg:var(--pine-chip-color-success);--chip-bg-hover:var(--pine-chip-color-success-hover);--chip-border:var(--pine-chip-color-success-hover);--chip-text:var(--pine-color-text-success)}.pds-combobox__chip-trigger--warning{--chip-bg:var(--pine-chip-color-warning);--chip-bg-hover:var(--pine-chip-color-warning-hover);--chip-border:var(--pine-chip-color-warning-hover);--chip-text:var(--pine-color-text-warning)}.pds-combobox__chip-trigger--danger{--chip-bg:var(--pine-chip-color-danger);--chip-bg-hover:var(--pine-chip-color-danger-hover);--chip-border:var(--pine-chip-color-danger-hover);--chip-text:var(--pine-color-text-danger)}.pds-combobox__chip-trigger--info{--chip-bg:var(--pine-chip-color-info);--chip-bg-hover:var(--pine-chip-color-info-hover);--chip-border:var(--pine-chip-color-info-hover);--chip-text:var(--pine-color-text-info)}.pds-combobox__chip-trigger--brand{background:-webkit-gradient(linear, left top, right top, from(#FF3E14), to(#6B62F2));background:linear-gradient(90deg, #FF3E14 0%, #6B62F2 100%);border:0;color:var(--pine-color-text-neutral);padding:1px;position:relative}.pds-combobox__chip-trigger--brand .pds-combobox__chip-trigger-label{background:rgba(255, 255, 255, 0.9);border-radius:calc(var(--pine-dimension-sm) - 1px);color:var(--pine-color-text-neutral);font-weight:var(--pine-font-weight-medium);padding:var(--pine-dimension-025) var(--pine-dimension-150);position:relative;z-index:1}.pds-combobox__chip-trigger--brand .pds-combobox__chip-trigger-chevron{position:relative;z-index:1}.pds-combobox__chip-trigger--brand:hover:not([aria-disabled=true]) .pds-combobox__chip-trigger-label{background:rgba(255, 255, 255, 0.8)}.pds-combobox__chip-trigger--dropdown:not(.pds-combobox__chip-trigger--brand){padding:var(--pine-dimension-none)}.pds-combobox__chip-trigger--dropdown:not(.pds-combobox__chip-trigger--brand) .pds-combobox__chip-trigger-label{padding:var(--pine-dimension-025) var(--pine-dimension-150)}.pds-combobox__chip-trigger--large .pds-combobox__chip-trigger-label{font-family:var(--pine-font-family-heading);font-size:var(--pine-font-size-heading-6);font-weight:var(--pine-font-weight-medium);letter-spacing:var(--pine-letter-spacing-heading-6)}.pds-combobox__chip-trigger--dot .pds-combobox__chip-trigger-label::before{border:var(--pine-border-width) solid transparent;border-radius:var(--pine-border-radius-full);content:"";display:inline-block;height:var(--pine-dimension-2xs);-webkit-margin-end:var(--pine-dimension-2xs);margin-inline-end:var(--pine-dimension-2xs);width:var(--pine-dimension-2xs)}`;
11140
+ const pdsComboboxCss = () => `:host{display:block}:host([aria-disabled=true]) .pds-combobox__input-icon{color:var(--pine-color-text-disabled);pointer-events:none}.pds-combobox{position:relative}.pds-combobox__label{color:var(--pine-color-text-label);display:block;font:var(--pine-typography-body-medium);letter-spacing:var(--pine-letter-spacing);-webkit-margin-after:var(--pine-dimension-2xs);margin-block-end:var(--pine-dimension-2xs)}.pds-combobox__input-wrapper{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;position:relative;width:100%}.pds-combobox__input{background:var(--pine-color-background-container);border:var(--pine-border);border-radius:var(--pine-dimension-125);-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--pine-color-text-strong);-ms-flex:1;flex:1;font:var(--pine-typography-body-medium);padding:var(--pine-dimension-xs) var(--pine-dimension-450) var(--pine-dimension-xs) var(--pine-dimension-150);-webkit-transition:border-color var(--pine-motion-duration-base) ease;transition:border-color var(--pine-motion-duration-base) ease;width:100%}.pds-combobox__input:hover:not(:disabled){border-color:var(--pine-color-border-hover)}.pds-combobox__input:disabled{background:var(--pine-color-background-container-disabled);border-color:var(--pine-color-border-disabled);color:var(--pine-color-text-disabled);cursor:not-allowed}.pds-combobox__input:disabled::-webkit-input-placeholder{color:var(--pine-color-text-placeholder-disabled)}.pds-combobox__input:disabled::-moz-placeholder{color:var(--pine-color-text-placeholder-disabled)}.pds-combobox__input:disabled:-ms-input-placeholder{color:var(--pine-color-text-placeholder-disabled)}.pds-combobox__input:disabled::-ms-input-placeholder{color:var(--pine-color-text-placeholder-disabled)}.pds-combobox__input:disabled::placeholder{color:var(--pine-color-text-placeholder-disabled)}.pds-combobox__input:focus-visible{border-color:var(--pine-color-border-active);outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}.pds-combobox__input::-webkit-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-combobox__input::-moz-placeholder{color:var(--pine-color-text-placeholder)}.pds-combobox__input:-ms-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-combobox__input::-ms-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-combobox__input::placeholder{color:var(--pine-color-text-placeholder)}.pds-combobox__input.pds-combobox__input--invalid{background:var(--pine-color-red-050);border-color:var(--pine-color-border-danger)}:host-context([data-theme=dark]) .pds-combobox__input.pds-combobox__input--invalid{background:var(--pine-color-red-950)}.pds-combobox__input.pds-combobox__input--invalid:hover:not(:disabled){border-color:var(--pine-color-border-danger)}.pds-combobox__input.pds-combobox__input--invalid:focus-visible{outline-color:var(--pine-color-focus-ring-danger)}.pds-combobox__input-icon{color:var(--pine-color-text-secondary);inset-inline-end:var(--pine-dimension-150);pointer-events:none;position:absolute;z-index:calc(var(--pine-z-index-raised) - 1)}.pds-combobox__helper{color:var(--pine-color-text-message);font:var(--pine-typography-body-sm-medium);-webkit-margin-before:var(--pine-dimension-2xs);margin-block-start:var(--pine-dimension-2xs)}.pds-combobox__error{-ms-flex-align:start;align-items:flex-start;color:var(--pine-color-text-message-danger);display:-ms-flexbox;display:flex;font:var(--pine-typography-body-sm-medium);gap:var(--pine-dimension-2xs);-webkit-margin-before:var(--pine-dimension-2xs);margin-block-start:var(--pine-dimension-2xs)}.pds-combobox__error pds-icon{-ms-flex-negative:0;flex-shrink:0;-webkit-margin-before:var(--pine-dimension-025);margin-block-start:var(--pine-dimension-025)}.pds-combobox__listbox{background:var(--pine-color-background-overlay);border:0;border-radius:var(--pine-dimension-125);-webkit-box-shadow:var(--pine-box-shadow);box-shadow:var(--pine-box-shadow);list-style:none;margin:0;min-width:220px;overflow-y:auto;padding:var(--pine-dimension-xs);position:absolute;z-index:var(--pine-z-index-raised)}.pds-combobox__option{-ms-flex-align:center;align-items:center;background:transparent;border-radius:var(--pine-dimension-125);color:var(--pine-color-text-secondary);cursor:pointer;display:-ms-flexbox;display:flex;font:var(--pine-typography-body-medium);-ms-flex-pack:justify;justify-content:space-between;padding:var(--pine-dimension-xs) var(--pine-dimension-sm);position:relative;-webkit-transition:background 0.15s;transition:background 0.15s}.pds-combobox__option[aria-selected=true]{background:var(--pine-color-background-muted)}.pds-combobox__option:focus-visible{outline:0}.pds-combobox__option.pds-combobox__option--layout .pds-combobox__option-layout-wrapper{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;width:100%}.pds-combobox__option.pds-combobox__option--chip .pds-combobox__option-chip{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;width:100%}.pds-combobox__option:last-child{-webkit-margin-after:0;margin-block-end:0}.pds-combobox__option--highlighted,.pds-combobox__option[selected],.pds-combobox__option--selected{background:var(--pine-color-background-muted)}.pds-combobox__option--disabled,.pds-combobox__group-row--disabled>.pds-combobox__group-row-trigger,.pds-combobox__group-back--disabled>.pds-combobox__group-back-trigger,.pds-combobox__group--disabled>.pds-combobox__group-label{color:var(--pine-color-text-disabled)}.pds-combobox__option--disabled{cursor:not-allowed}.pds-combobox__option--disabled .pds-combobox__option-chip,.pds-combobox__option--disabled .pds-combobox__option-layout-wrapper{opacity:0.5}.pds-combobox__option-label{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;gap:var(--pine-dimension-xs);min-width:0;overflow-wrap:anywhere}.pds-combobox__option-icon{-ms-flex-negative:0;flex-shrink:0}.pds-combobox__option-check{color:currentColor;font-size:var(--pine-dimension-150);-webkit-margin-start:var(--pine-dimension-150);margin-inline-start:var(--pine-dimension-150)}.pds-combobox__group-label{color:var(--pine-color-text-tertiary);cursor:default;font:var(--pine-typography-heading-caption);-webkit-margin-after:var(--pine-dimension-2xs);margin-block-end:var(--pine-dimension-2xs);-webkit-margin-before:var(--pine-dimension-150);margin-block-start:var(--pine-dimension-150);padding:var(--pine-dimension-2xs) var(--pine-dimension-sm);text-transform:uppercase}.pds-combobox__group-label:first-child{-webkit-margin-before:0;margin-block-start:0}.pds-combobox__group{list-style:none;-webkit-margin-before:var(--pine-dimension-150);margin-block-start:var(--pine-dimension-150)}.pds-combobox__group:first-child{-webkit-margin-before:0;margin-block-start:0}.pds-combobox__group-list{list-style:none;margin:0;padding:0}.pds-combobox__listbox--grouped .pds-combobox__group-list{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--pine-dimension-2xs)}.pds-combobox__group-label--with-icon{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;gap:var(--pine-dimension-xs)}.pds-combobox__group-icon{-ms-flex-negative:0;flex-shrink:0}.pds-combobox__group-row{list-style:none;position:relative}.pds-combobox__group-row-trigger{-ms-flex-align:center;align-items:center;border-radius:var(--pine-dimension-125);color:var(--pine-color-text-secondary);cursor:pointer;display:-ms-flexbox;display:flex;font:var(--pine-typography-body-medium);gap:var(--pine-dimension-xs);-ms-flex-pack:justify;justify-content:space-between;padding:var(--pine-dimension-xs) var(--pine-dimension-sm);-webkit-transition:background 0.15s;transition:background 0.15s}.pds-combobox__group-row--open>.pds-combobox__group-row-trigger,.pds-combobox__group-row--has-selection>.pds-combobox__group-row-trigger,.pds-combobox__group-row--highlighted>.pds-combobox__group-row-trigger,.pds-combobox__group-back--highlighted>.pds-combobox__group-row-trigger{background:var(--pine-color-background-muted)}.pds-combobox__listbox--pointer-hover .pds-combobox__group-row-trigger:hover{background:var(--pine-color-background-muted)}.pds-combobox__listbox--drill-in,.pds-combobox__listbox--drill-out{overflow-x:hidden}.pds-combobox__listbox--drill-in,.pds-combobox__listbox--drill-out:dir(rtl){--pds-combobox-drill-from:var(--pine-dimension-sm)}.pds-combobox__listbox--drill-out,.pds-combobox__listbox--drill-in:dir(rtl){--pds-combobox-drill-from:calc(var(--pine-dimension-sm) * -1)}.pds-combobox__listbox--drill-in .pds-combobox__drill-in-options>li,.pds-combobox__listbox--drill-in .pds-combobox__group-back-trigger,.pds-combobox__listbox--drill-out>li{-webkit-animation:pds-combobox-drill var(--pine-motion-duration-base) var(--pine-motion-easing-out);animation:pds-combobox-drill var(--pine-motion-duration-base) var(--pine-motion-easing-out)}@-webkit-keyframes pds-combobox-drill{from{opacity:0;-webkit-transform:translateX(var(--pds-combobox-drill-from));transform:translateX(var(--pds-combobox-drill-from))}}@keyframes pds-combobox-drill{from{opacity:0;-webkit-transform:translateX(var(--pds-combobox-drill-from));transform:translateX(var(--pds-combobox-drill-from))}}.pds-combobox__group-row--keyboard>.pds-combobox__group-row-trigger,.pds-combobox__group-back--keyboard>.pds-combobox__group-row-trigger{outline:var(--pine-outline-focus);outline-offset:calc(var(--pine-border-width) * -2)}.pds-combobox__group-row-label{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;gap:var(--pine-dimension-xs);min-width:0}.pds-combobox__group-row-caret{-ms-flex-negative:0;flex-shrink:0}.pds-combobox__listbox--grouped,.pds-combobox__flyout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--pine-dimension-2xs);padding:var(--pine-dimension-2xs)}.pds-combobox__flyout{background:var(--pine-color-background-overlay);border-radius:var(--pine-dimension-125);-webkit-box-shadow:var(--pine-box-shadow);box-shadow:var(--pine-box-shadow);list-style:none;margin:0;overflow-y:auto;position:fixed;visibility:hidden;width:-webkit-max-content;width:-moz-max-content;width:max-content;z-index:1}.pds-combobox__listbox--with-search{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;overflow:hidden;padding:0}.pds-combobox__listbox-options{-ms-flex:1;flex:1;list-style:none;margin:0;min-height:0;overflow-y:auto;padding:var(--pine-dimension-xs)}.pds-combobox__listbox-options.pds-combobox__listbox--grouped{padding:var(--pine-dimension-2xs)}.pds-combobox__panel-search{-ms-flex-align:center;align-items:center;-webkit-border-after:var(--pine-border);border-block-end:var(--pine-border);border-block-end-color:var(--pine-color-border-subtle);display:-ms-flexbox;display:flex;-ms-flex-negative:0;flex-shrink:0;gap:var(--pine-dimension-xs);padding:var(--pine-dimension-sm)}.pds-combobox__panel-search pds-icon{color:var(--pine-color-text-muted);-ms-flex-negative:0;flex-shrink:0}.pds-combobox__panel-search:focus-within{border-block-end-color:var(--pine-color-border-active)}.pds-combobox__panel-search-input{background:transparent;border:0;color:var(--pine-color-text-strong);-ms-flex:1;flex:1;font:var(--pine-typography-body);letter-spacing:var(--pine-letter-spacing);min-width:0;outline:none;padding:0}.pds-combobox__panel-search-input::-webkit-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-combobox__panel-search-input::-moz-placeholder{color:var(--pine-color-text-placeholder)}.pds-combobox__panel-search-input:-ms-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-combobox__panel-search-input::-ms-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-combobox__panel-search-input::placeholder{color:var(--pine-color-text-placeholder)}.pds-combobox__group-back{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--pine-dimension-2xs);list-style:none}.pds-combobox__group-back-trigger{-ms-flex-pack:start;justify-content:flex-start}.pds-combobox__listbox-options--drilled-in.pds-combobox__listbox--grouped{-webkit-padding-before:0;padding-block-start:0}.pds-combobox__listbox-options--drilled-in:focus{outline:none}.pds-combobox__listbox-options--drilled-in:focus .pds-combobox__group-back-trigger{border-block-end-color:var(--pine-color-border-active)}:where(.pds-combobox__listbox-options--drilled-in) .pds-combobox__group-back-trigger{background-color:var(--pine-color-background-overlay);-webkit-border-after:var(--pine-border);border-block-end:var(--pine-border);border-block-end-color:var(--pine-color-border-subtle);border-radius:0;color:var(--pine-color-text-strong);font:var(--pine-typography-body);inset-block-start:0;letter-spacing:var(--pine-letter-spacing);margin-inline:calc(var(--pine-dimension-2xs) * -1);padding:var(--pine-dimension-sm);position:-webkit-sticky;position:sticky;z-index:1}.pds-combobox__drill-in-options{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--pine-dimension-2xs);list-style:none;margin:0;padding:0}.visually-hidden{border:0;clip:rect(0 0 0 0);-webkit-clip-path:polygon(0 0, 0 0, 0 0);clip-path:polygon(0 0, 0 0, 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.pds-combobox__loading{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;padding:var(--pine-dimension-150)}.pds-combobox__empty{color:var(--pine-color-text-tertiary);padding:var(--pine-dimension-150) var(--pine-dimension-sm);text-align:center}.pds-combobox__load-more{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;padding:var(--pine-dimension-150)}:host(.pds-combobox-dropdown-portal) .pds-combobox__listbox{position:fixed;z-index:var(--pine-z-index-priority)}.pds-combobox__button-trigger{-ms-flex-align:center;align-items:center;background:var(--color-background-default, var(--pine-color-secondary));border:var(--pine-border);border-radius:var(--pine-border-radius-full);-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--color-text-default, var(--pine-color-text-inverse-emphasis));cursor:pointer;display:-ms-flexbox;display:flex;font:var(--pine-typography-body-medium);-ms-flex-pack:justify;justify-content:space-between;min-height:var(--pine-dimension-450);outline:none;padding:0 var(--pine-dimension-sm);-webkit-transition:border-color 0.15s, background 0.15s, -webkit-box-shadow 0.15s;transition:border-color 0.15s, background 0.15s, -webkit-box-shadow 0.15s;transition:border-color 0.15s, box-shadow 0.15s, background 0.15s;transition:border-color 0.15s, box-shadow 0.15s, background 0.15s, -webkit-box-shadow 0.15s;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.pds-combobox__button-trigger .pds-combobox__button-trigger-layout-wrapper{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex:1;flex:1}.pds-combobox__button-trigger .trigger-content{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;width:100%}.pds-combobox__button-trigger:focus-visible{border-color:var(--color-border-focus, var(--pine-color-border));-webkit-box-shadow:0 0 0 2px var(--color-outline, var(--pine-color-focus-ring));box-shadow:0 0 0 2px var(--color-outline, var(--pine-color-focus-ring))}.pds-combobox__button-trigger:hover{background:var(--color-background-hover, var(--pine-color-secondary-hover));border-color:var(--color-border-hover, var(--pine-color-border-hover))}.pds-combobox__button-trigger[aria-disabled=true],.pds-combobox__button-trigger:disabled{background:var(--color-background-disabled, var(--pine-color-secondary-disabled));border-color:var(--color-border-disabled, var(--pine-color-border-disabled));color:var(--color-text-disabled, var(--pine-color-text-secondary-disabled));cursor:not-allowed;opacity:0.6}.pds-combobox__button-trigger-label{color:inherit;-ms-flex:1 1 auto;flex:1 1 auto;min-width:0;overflow-wrap:anywhere;text-align:start}.pds-combobox__button-trigger-label--with-icon{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;gap:var(--pine-dimension-xs)}.pds-combobox__button-trigger-icon{-ms-flex-negative:0;flex-shrink:0}.pds-combobox__button-trigger--input-shape{border-radius:var(--pine-dimension-125);font:var(--pine-typography-body);letter-spacing:var(--pine-letter-spacing);min-height:var(--pine-dimension-450);padding:calc(var(--pine-dimension-xs) - var(--pine-border-width)) var(--pine-dimension-150)}.pds-combobox__button-trigger--secondary.pds-combobox__button-trigger--input-shape:not([aria-disabled=true]) .pds-combobox__button-trigger-label--placeholder{color:var(--pine-color-text-muted)}.pds-combobox__button-trigger-chevron{color:currentColor;-webkit-margin-start:var(--pine-dimension-150);margin-inline-start:var(--pine-dimension-150)}.pds-combobox__button-trigger--primary{--color-background-default:var(--pine-color-primary);--color-background-hover:var(--pine-color-primary-hover);--color-background-disabled:var(--pine-color-primary-disabled);--color-border-default:var(--pine-color-primary);--color-border-hover:var(--pine-color-primary-hover);--color-border-disabled:var(--pine-color-primary-disabled);--color-border-focus:var(--pine-color-primary);--color-text-default:var(--pine-color-text-primary);--color-text-disabled:var(--pine-color-text-primary-disabled);--color-outline:var(--pine-color-focus-ring)}.pds-combobox__button-trigger--accent{--color-background-default:var(--pine-color-accent);--color-background-hover:var(--pine-color-accent-hover);--color-background-disabled:var(--pine-color-accent-disabled);--color-border-default:var(--pine-color-accent);--color-border-hover:var(--pine-color-accent-hover);--color-border-disabled:var(--pine-color-accent-disabled);--color-border-focus:var(--pine-color-accent);--color-text-default:var(--pine-color-text-primary);--color-text-disabled:var(--pine-color-text-accent-disabled);--color-outline:var(--pine-color-focus-ring)}.pds-combobox__button-trigger--secondary{--color-background-default:var(--pine-color-secondary);--color-background-hover:var(--pine-color-secondary-hover);--color-background-disabled:var(--pine-color-secondary-disabled);--color-border-default:var(--pine-color-border);--color-border-hover:var(--pine-color-border-hover);--color-border-disabled:var(--pine-color-border-disabled);--color-border-focus:var(--pine-color-border);--color-text-default:var(--pine-color-text-secondary);--color-text-disabled:var(--pine-color-text-secondary-disabled);--color-outline:var(--pine-color-focus-ring)}.pds-combobox__button-trigger--destructive{--color-background-default:var(--pine-color-danger);--color-background-hover:var(--pine-color-danger-hover);--color-background-disabled:var(--pine-color-danger-disabled);--color-border-default:var(--pine-color-danger);--color-border-hover:var(--pine-color-danger-hover);--color-border-disabled:var(--pine-color-danger-disabled);--color-border-focus:var(--pine-color-danger);--color-text-default:var(--pine-color-white);--color-text-disabled:var(--pine-color-text-danger-disabled);--color-outline:var(--pine-color-focus-ring-danger)}[data-layout]{border-radius:var(--pine-dimension-125);padding-block:var(--pine-dimension-xs)}.pds-combobox__chip-trigger{-ms-flex-align:center;align-items:center;border-radius:var(--pine-dimension-sm);-webkit-box-sizing:border-box;box-sizing:border-box;cursor:pointer;display:-ms-inline-flexbox;display:inline-flex;font:var(--pine-typography-body-medium);-ms-flex-pack:justify;justify-content:space-between;outline:none;padding-block:var(--pine-dimension-025);padding-inline:var(--pine-dimension-150);-webkit-transition:all 0.15s ease;transition:all 0.15s ease;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.pds-combobox__chip-trigger .pds-combobox__chip-trigger-layout-wrapper{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex:1;flex:1}.pds-combobox__chip-trigger .trigger-content{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;width:100%}.pds-combobox__chip-trigger:focus-visible{outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}.pds-combobox__chip-trigger[aria-disabled=true]{cursor:not-allowed;opacity:0.6}.pds-combobox__chip-trigger-label{color:inherit;-ms-flex:1 1 auto;flex:1 1 auto;text-align:start}.pds-combobox__chip-trigger-chevron{color:currentColor;-webkit-margin-start:var(--pine-dimension-150);margin-inline-start:var(--pine-dimension-150)}.pds-combobox__chip-trigger-icon{-webkit-margin-end:var(--pine-dimension-2xs);margin-inline-end:var(--pine-dimension-2xs)}.pds-combobox__chip-trigger--neutral,.pds-combobox__chip-trigger--accent,.pds-combobox__chip-trigger--success,.pds-combobox__chip-trigger--warning,.pds-combobox__chip-trigger--danger,.pds-combobox__chip-trigger--info{background:var(--chip-bg);border:var(--pine-border-width) solid var(--chip-border);color:var(--chip-text)}.pds-combobox__chip-trigger--neutral:hover:not([aria-disabled=true]),.pds-combobox__chip-trigger--accent:hover:not([aria-disabled=true]),.pds-combobox__chip-trigger--success:hover:not([aria-disabled=true]),.pds-combobox__chip-trigger--warning:hover:not([aria-disabled=true]),.pds-combobox__chip-trigger--danger:hover:not([aria-disabled=true]),.pds-combobox__chip-trigger--info:hover:not([aria-disabled=true]){background:var(--chip-bg-hover)}.pds-combobox__chip-trigger--neutral:focus-visible,.pds-combobox__chip-trigger--accent:focus-visible,.pds-combobox__chip-trigger--success:focus-visible,.pds-combobox__chip-trigger--warning:focus-visible,.pds-combobox__chip-trigger--danger:focus-visible,.pds-combobox__chip-trigger--info:focus-visible{border-color:var(--chip-border)}.pds-combobox__chip-trigger--neutral{--chip-bg:var(--pine-chip-color-neutral);--chip-bg-hover:var(--pine-chip-color-neutral-hover);--chip-border:var(--pine-chip-color-neutral-hover);--chip-text:var(--pine-color-text-neutral)}.pds-combobox__chip-trigger--accent{--chip-bg:var(--pine-chip-color-accent);--chip-bg-hover:var(--pine-chip-color-accent-hover);--chip-border:var(--pine-chip-color-accent-hover);--chip-text:var(--pine-color-text-accent)}.pds-combobox__chip-trigger--success{--chip-bg:var(--pine-chip-color-success);--chip-bg-hover:var(--pine-chip-color-success-hover);--chip-border:var(--pine-chip-color-success-hover);--chip-text:var(--pine-color-text-success)}.pds-combobox__chip-trigger--warning{--chip-bg:var(--pine-chip-color-warning);--chip-bg-hover:var(--pine-chip-color-warning-hover);--chip-border:var(--pine-chip-color-warning-hover);--chip-text:var(--pine-color-text-warning)}.pds-combobox__chip-trigger--danger{--chip-bg:var(--pine-chip-color-danger);--chip-bg-hover:var(--pine-chip-color-danger-hover);--chip-border:var(--pine-chip-color-danger-hover);--chip-text:var(--pine-color-text-danger)}.pds-combobox__chip-trigger--info{--chip-bg:var(--pine-chip-color-info);--chip-bg-hover:var(--pine-chip-color-info-hover);--chip-border:var(--pine-chip-color-info-hover);--chip-text:var(--pine-color-text-info)}.pds-combobox__chip-trigger--brand{background:-webkit-gradient(linear, left top, right top, from(#FF3E14), to(#6B62F2));background:linear-gradient(90deg, #FF3E14 0%, #6B62F2 100%);border:0;color:var(--pine-color-text-neutral);padding:1px;position:relative}.pds-combobox__chip-trigger--brand .pds-combobox__chip-trigger-label{background:rgba(255, 255, 255, 0.9);border-radius:calc(var(--pine-dimension-sm) - 1px);color:var(--pine-color-text-neutral);font-weight:var(--pine-font-weight-medium);padding:var(--pine-dimension-025) var(--pine-dimension-150);position:relative;z-index:1}.pds-combobox__chip-trigger--brand .pds-combobox__chip-trigger-chevron{position:relative;z-index:1}.pds-combobox__chip-trigger--brand:hover:not([aria-disabled=true]) .pds-combobox__chip-trigger-label{background:rgba(255, 255, 255, 0.8)}.pds-combobox__chip-trigger--dropdown:not(.pds-combobox__chip-trigger--brand){padding:var(--pine-dimension-none)}.pds-combobox__chip-trigger--dropdown:not(.pds-combobox__chip-trigger--brand) .pds-combobox__chip-trigger-label{padding:var(--pine-dimension-025) var(--pine-dimension-150)}.pds-combobox__chip-trigger--large .pds-combobox__chip-trigger-label{font-family:var(--pine-font-family-heading);font-size:var(--pine-font-size-heading-6);font-weight:var(--pine-font-weight-medium);letter-spacing:var(--pine-letter-spacing-heading-6)}.pds-combobox__chip-trigger--dot .pds-combobox__chip-trigger-label::before{border:var(--pine-border-width) solid transparent;border-radius:var(--pine-border-radius-full);content:"";display:inline-block;height:var(--pine-dimension-2xs);-webkit-margin-end:var(--pine-dimension-2xs);margin-inline-end:var(--pine-dimension-2xs);width:var(--pine-dimension-2xs)}`;
10989
11141
 
10990
11142
  /**
10991
11143
  * @slot option - Option elements for the combobox dropdown
@@ -11193,6 +11345,17 @@ class PdsCombobox {
11193
11345
  this.highlightedGroup = null;
11194
11346
  /** The keys, not the pointer, moved the highlight last; the focus ring shows only then. */
11195
11347
  this.keyboardNavigating = false;
11348
+ /**
11349
+ * A drill-in group row the first arrow showed rather than moved past. `aria-activedescendant`
11350
+ * already pointed at it, so the status region says it instead.
11351
+ */
11352
+ this.revealedGroupLabel = null;
11353
+ /**
11354
+ * The pointer in the panel can hover: a mouse or pen, not touch. Touch browsers keep a tapped row
11355
+ * hovered, so group rows shade on `:hover` only for a pointer that can hover. Checked on the
11356
+ * pointer itself rather than `(hover: hover)`, which a touch-first device with a trackpad fails.
11357
+ */
11358
+ this.pointerCanHover = true;
11196
11359
  /**
11197
11360
  * What's typed in the dropdown's own search field (`panelSearch`).
11198
11361
  */
@@ -11237,6 +11400,11 @@ class PdsCombobox {
11237
11400
  });
11238
11401
  /** The groups in the flyout panel's last render, so a row's index finds its optgroup. */
11239
11402
  this.renderedGroups = [];
11403
+ /**
11404
+ * Where each ungrouped option and optgroup built from the `options` prop came in the data, so
11405
+ * the flyout and drill-in panels draw them in that order. Slotted markup is already in order.
11406
+ */
11407
+ this.panelPositions = new WeakMap();
11240
11408
  /** Room for a flyout was checked for this open. */
11241
11409
  this.flyoutRoomChecked = false;
11242
11410
  /** The highlighted option sits in a flyout that hasn't rendered yet; focus it after the next render. */
@@ -11250,10 +11418,14 @@ class PdsCombobox {
11250
11418
  * the list shows every option until the user types (then normal filtering applies).
11251
11419
  */
11252
11420
  this.expandFilterListWhileOpen = false;
11421
+ this.onPanelPointer = (event) => {
11422
+ const canHover = event.pointerType !== 'touch';
11423
+ if (this.pointerCanHover !== canHover)
11424
+ this.pointerCanHover = canHover;
11425
+ };
11253
11426
  this.onDrillAnimationEnd = (event) => {
11254
- var _a;
11255
11427
  // Only the slide's own end: slotted consumer content can animate inside the list too.
11256
- if ((_a = event.animationName) === null || _a === void 0 ? void 0 : _a.startsWith('pds-combobox-drill'))
11428
+ if (event.animationName === 'pds-combobox-drill')
11257
11429
  this.drillDirection = null;
11258
11430
  };
11259
11431
  /** `<label for>` only works on the input trigger; for a div trigger a click on the label focuses it. */
@@ -11453,6 +11625,9 @@ class PdsCombobox {
11453
11625
  };
11454
11626
  // Handler for button trigger click
11455
11627
  this.onButtonTriggerClick = () => {
11628
+ // The button and chip triggers are divs, so a click reaches them even while disabled.
11629
+ if (this.disabled)
11630
+ return;
11456
11631
  this.isOpen = !this.isOpen;
11457
11632
  if (this.isOpen) {
11458
11633
  this.prepareExpandFilterListOnOpen();
@@ -11472,6 +11647,13 @@ class PdsCombobox {
11472
11647
  };
11473
11648
  // Handler for button trigger keyboard events
11474
11649
  this.onButtonTriggerKeyDown = (e) => {
11650
+ // Disabled takes it out of the tab order, but setFocus() or a click can still focus it.
11651
+ if (this.disabled) {
11652
+ // Keep Space from scrolling the page, as on a native disabled button.
11653
+ if (e.key === ' ')
11654
+ e.preventDefault();
11655
+ return;
11656
+ }
11475
11657
  // Escape closes an open group before the dropdown. Other keys reach the tree through handleKeyDown.
11476
11658
  if (this.isOpen && e.key === 'Escape' && this.handleGroupedPanelKey(e))
11477
11659
  return;
@@ -11492,8 +11674,9 @@ class PdsCombobox {
11492
11674
  }, 0);
11493
11675
  }
11494
11676
  else if (e.key === 'Escape') {
11495
- e.preventDefault();
11677
+ // Only an open dropdown claims Escape; a closed one leaves it to a modal or popover around it.
11496
11678
  if (this.isOpen) {
11679
+ e.preventDefault();
11497
11680
  this.isOpen = false;
11498
11681
  this.highlightedIndex = -1;
11499
11682
  this.clearExpandFilterList();
@@ -11672,6 +11855,31 @@ class PdsCombobox {
11672
11855
  this.focusPanel(panelFocusEl);
11673
11856
  }
11674
11857
  }
11858
+ /**
11859
+ * Scrolls just enough to show `el`, as `scrollIntoView({ block: 'nearest' })` does. In the drill-in
11860
+ * panel it scrolls the list alone, and never sideways: while a drill-in slide offsets a row past
11861
+ * the list's edge, `scrollIntoView` also scrolls the list horizontally to reach it, which eats most
11862
+ * of the slide. There it keeps clear of the sticky row back, through the scroll padding set for it,
11863
+ * but doesn't scroll the page or a scrolling ancestor.
11864
+ */
11865
+ scrollIntoViewNearest(el, smooth) {
11866
+ const behavior = smooth ? 'smooth' : 'auto';
11867
+ if (!this.showsGroupedPanel || this.effectiveGroupDisplay !== 'drill-in') {
11868
+ el.scrollIntoView({ block: 'nearest', behavior });
11869
+ return;
11870
+ }
11871
+ const list = this.usesPanelSearch ? this.panelTreeEl : this.listboxEl;
11872
+ if (!list)
11873
+ return;
11874
+ const offset = el.getBoundingClientRect().top - list.getBoundingClientRect().top - list.clientTop;
11875
+ // The padding keeps rows clear of the sticky row back; the row back itself doesn't need it.
11876
+ const padding = el.classList.contains('pds-combobox__group-back-trigger') ? 0 : parseFloat(list.style.scrollPaddingBlockStart) || 0;
11877
+ const top = list.scrollTop + offset - padding;
11878
+ const bottom = list.scrollTop + offset + el.offsetHeight - list.clientHeight;
11879
+ const target = top < list.scrollTop ? top : bottom > list.scrollTop ? bottom : null;
11880
+ if (target !== null)
11881
+ list.scrollTo({ top: target, behavior });
11882
+ }
11675
11883
  focusPanel(el) {
11676
11884
  var _a, _b;
11677
11885
  this.panelFocusEl = el;
@@ -11692,6 +11900,7 @@ class PdsCombobox {
11692
11900
  }
11693
11901
  openGroupChanged(next, previous) {
11694
11902
  this.handPanelFocusToList();
11903
+ this.revealedGroupLabel = null;
11695
11904
  // Only moves between the drill-in panel's views slide; search results don't.
11696
11905
  if (!this.isOpen || this.effectiveGroupDisplay !== 'drill-in' || !this.showsGroupedPanel)
11697
11906
  return;
@@ -11712,8 +11921,25 @@ class PdsCombobox {
11712
11921
  if (this.isOpen && this.hidesPanelSearch && this.panelTreeEl)
11713
11922
  this.focusPanel(this.panelTreeEl);
11714
11923
  }
11924
+ disabledChanged(disabled) {
11925
+ var _a, _b, _c, _d, _e;
11926
+ if (!disabled || !this.isOpen)
11927
+ return;
11928
+ const shadowActive = (_b = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.activeElement) !== null && _b !== void 0 ? _b : null;
11929
+ const focusInDropdown = !!((_d = (_c = this.portalEl) === null || _c === void 0 ? void 0 : _c.shadowRoot) === null || _d === void 0 ? void 0 : _d.activeElement) || (!!shadowActive && !!((_e = this.listboxEl) === null || _e === void 0 ? void 0 : _e.contains(shadowActive)));
11930
+ this.isOpen = false;
11931
+ this.highlightedIndex = -1;
11932
+ this.isArrowKeyNavigationMode = false;
11933
+ this.clearExpandFilterList();
11934
+ this.updateAriaActiveDescendant();
11935
+ // Closing removes the search field or option that held focus. A button or chip trigger can still
11936
+ // take it (aria-disabled), so focus doesn't fall to the page; a disabled input can't, as natively.
11937
+ if (focusInDropdown && this.trigger !== 'input')
11938
+ this.restoreFocusToTrigger();
11939
+ }
11715
11940
  isOpenChanged(isOpen) {
11716
11941
  if (!isOpen) {
11942
+ this.revealedGroupLabel = null;
11717
11943
  this.drillDirection = null;
11718
11944
  this.openGroup = null;
11719
11945
  this.highlightedGroup = null;
@@ -11992,20 +12218,25 @@ class PdsCombobox {
11992
12218
  // slotted markup would be, so grouping, filtering and labels work the same either way. Each
11993
12219
  // group is listed where it first appears with all of its options, even when the data
11994
12220
  // interleaves groups, so an option never renders under another group's label. Ungrouped
11995
- // options come first, so none reads as part of the group above it.
12221
+ // options come first, so none reads as part of the group above it. The flyout and drill-in
12222
+ // panels draw groups as rows, where that can't happen, so they keep the data's order instead.
11996
12223
  const asyncOptions = this.options || this.internalOptions;
11997
12224
  const groups = new Map();
11998
12225
  const ungrouped = [];
11999
12226
  const groupEntries = [];
12000
- asyncOptions.forEach(opt => {
12227
+ this.panelPositions = new WeakMap();
12228
+ asyncOptions.forEach((opt, position) => {
12001
12229
  const optionEl = document.createElement('option');
12002
12230
  optionEl.value = String(opt.id);
12003
12231
  optionEl.textContent = opt.text;
12004
12232
  if (opt.disabled === true)
12005
12233
  optionEl.setAttribute('disabled', '');
12006
12234
  // Only strings group an option or name an icon; anything else from JS is ignored, not coerced.
12235
+ if (typeof opt.icon === 'string' && opt.icon !== '')
12236
+ optionEl.setAttribute('data-icon', opt.icon);
12007
12237
  if (typeof opt.group !== 'string' || opt.group === '') {
12008
12238
  ungrouped.push(optionEl);
12239
+ this.panelPositions.set(optionEl, position);
12009
12240
  return;
12010
12241
  }
12011
12242
  let optgroup = groups.get(opt.group);
@@ -12014,6 +12245,7 @@ class PdsCombobox {
12014
12245
  optgroup.label = opt.group;
12015
12246
  groups.set(opt.group, optgroup);
12016
12247
  groupEntries.push(optgroup);
12248
+ this.panelPositions.set(optgroup, position);
12017
12249
  }
12018
12250
  if (!optgroup.hasAttribute('data-icon') && typeof opt.groupIcon === 'string' && opt.groupIcon !== '') {
12019
12251
  optgroup.setAttribute('data-icon', opt.groupIcon);
@@ -12478,6 +12710,7 @@ class PdsCombobox {
12478
12710
  handleGroupedPanelKey(e) {
12479
12711
  if (!this.showsGroupedPanel)
12480
12712
  return false;
12713
+ const highlightShown = this.keyboardNavigating;
12481
12714
  this.keyboardNavigating = true;
12482
12715
  // In the input trigger, Left and Right still move the caret through typed text, and Space,
12483
12716
  // Home and End edit it, as they do in the panel's search field.
@@ -12487,23 +12720,32 @@ class PdsCombobox {
12487
12720
  if (e.key === ' ' || e.key === 'Home' || e.key === 'End')
12488
12721
  return false;
12489
12722
  }
12490
- const entries = buildPanelEntries(this.filteredItems);
12723
+ const entries = this.panelEntries();
12491
12724
  const drilledIn = this.effectiveGroupDisplay === 'drill-in' && this.openGroup !== null;
12492
12725
  const current = this.currentPanelItem();
12493
12726
  const column = panelColumn(entries, this.openGroup, current, drilledIn);
12494
12727
  if (column.length === 0)
12495
12728
  return false;
12496
12729
  const position = current === null ? -1 : column.indexOf(current);
12730
+ // Drill-in doesn't shade a group row the pointer or a click-open highlighted, so the first Up or
12731
+ // Down shows that row rather than moving past one the user never saw.
12732
+ const unseenRow = !highlightShown && this.effectiveGroupDisplay === 'drill-in' && current !== null && typeof current !== 'number' && current !== this.openGroup;
12497
12733
  const moveTo = (to) => {
12498
12734
  e.preventDefault();
12499
12735
  this.highlightPanelItem(column[Math.max(0, Math.min(column.length - 1, to))]);
12736
+ this.revealedGroupLabel = null;
12737
+ return true;
12738
+ };
12739
+ const reveal = () => {
12740
+ e.preventDefault();
12741
+ this.revealedGroupLabel = current.label;
12500
12742
  return true;
12501
12743
  };
12502
12744
  switch (e.key) {
12503
12745
  case 'ArrowDown':
12504
- return moveTo(position < 0 ? 0 : position + 1);
12746
+ return unseenRow ? reveal() : moveTo(position < 0 ? 0 : position + 1);
12505
12747
  case 'ArrowUp':
12506
- return moveTo(position < 0 ? column.length - 1 : position - 1);
12748
+ return unseenRow ? reveal() : moveTo(position < 0 ? column.length - 1 : position - 1);
12507
12749
  case 'Home':
12508
12750
  return moveTo(0);
12509
12751
  case 'End':
@@ -12636,7 +12878,7 @@ class PdsCombobox {
12636
12878
  // In the grouped panel, the first row with something to choose: a group stays closed until
12637
12879
  // it's opened.
12638
12880
  if (this.showsGroupedPanel) {
12639
- const first = buildPanelEntries(this.filteredItems).find(entry => entry.kind === 'group' ? !isGroupDisabled(entry.group) : !isOptionDisabled(entry.option));
12881
+ const first = this.panelEntries().find(entry => entry.kind === 'group' ? !isGroupDisabled(entry.group) : !isOptionDisabled(entry.option));
12640
12882
  this.highlightedIndex = (first === null || first === void 0 ? void 0 : first.kind) === 'option' ? first.index : -1;
12641
12883
  this.highlightedGroup = (first === null || first === void 0 ? void 0 : first.kind) === 'group' ? first.group.optgroup : null;
12642
12884
  return;
@@ -12701,8 +12943,13 @@ class PdsCombobox {
12701
12943
  }
12702
12944
  // Matched by id, not a selector: componentId is consumer text and may not be selector-safe.
12703
12945
  const id = this.groupDomId(groupRow);
12704
- (_a = Array.from(this.listboxEl.querySelectorAll('[role="treeitem"]'))
12705
- .find(row => row.id === id)) === null || _a === void 0 ? void 0 : _a.scrollIntoView({ block: 'nearest' });
12946
+ const row = Array.from(this.listboxEl.querySelectorAll('[role="treeitem"]'))
12947
+ .find(item => item.id === id);
12948
+ // The row's trigger, not its item: the row back's item wraps the group's options, and showing
12949
+ // all of a group taller than the list would scroll the row back itself out of view.
12950
+ const trigger = Array.from((_a = row === null || row === void 0 ? void 0 : row.children) !== null && _a !== void 0 ? _a : []).find(child => child.classList.contains('pds-combobox__group-row-trigger'));
12951
+ if (trigger)
12952
+ this.scrollIntoViewNearest(trigger, false);
12706
12953
  this.updateAriaActiveDescendant();
12707
12954
  return;
12708
12955
  }
@@ -12753,7 +13000,7 @@ class PdsCombobox {
12753
13000
  this.flyout.reveal(flyout, currentOption);
12754
13001
  }
12755
13002
  else {
12756
- currentOption.scrollIntoView({ block: 'nearest', behavior: 'smooth' });
13003
+ this.scrollIntoViewNearest(currentOption, true);
12757
13004
  }
12758
13005
  }
12759
13006
  // Always update aria-activedescendant on the trigger element
@@ -12850,6 +13097,8 @@ class PdsCombobox {
12850
13097
  this.highlightedIndex = -1;
12851
13098
  this.highlightedGroup = group;
12852
13099
  this.keyboardNavigating = false;
13100
+ // So revealing this row again later is announced again.
13101
+ this.revealedGroupLabel = null;
12853
13102
  }
12854
13103
  // Get the label of the selected option
12855
13104
  get selectedLabel() {
@@ -13005,7 +13254,8 @@ class PdsCombobox {
13005
13254
  'pds-combobox__listbox--grouped': this.groupDisplay !== 'inline',
13006
13255
  'pds-combobox__listbox--drill-in': this.drillDirection === 'in',
13007
13256
  'pds-combobox__listbox--drill-out': this.drillDirection === 'out',
13008
- }, onAnimationEnd: this.onDrillAnimationEnd, role: this.showsGroupedPanel ? 'tree' : 'listbox', id: this.listboxId, "aria-label": this.label || 'Options', "aria-multiselectable": "false",
13257
+ 'pds-combobox__listbox--pointer-hover': this.pointerCanHover,
13258
+ }, onAnimationEnd: this.onDrillAnimationEnd, onPointerMove: this.onPanelPointer, onPointerDown: this.onPanelPointer, role: this.showsGroupedPanel ? 'tree' : 'listbox', id: this.listboxId, "aria-label": this.label || 'Options', "aria-multiselectable": "false",
13009
13259
  // Focusable but out of the tab order with panel search, so it can take focus when a
13010
13260
  // drilled-in group hides the field. Dropping it while focused would blur the list and close.
13011
13261
  tabIndex: withSearch ? -1 : undefined, "aria-activedescendant": listTakesFocus ? this.activeDescendantId : undefined, onKeyDown: withSearch ? this.onPanelTreeKeyDown : undefined, ref: el => {
@@ -13171,7 +13421,21 @@ class PdsCombobox {
13171
13421
  'pds-combobox__option--layout': isLayout,
13172
13422
  'pds-combobox__option--chip': isChip,
13173
13423
  'pds-combobox__option--disabled': isDisabled,
13174
- }, "data-option-index": index, onMouseDown: this.onOptionMouseDown, onClick: this.onOptionClick, onMouseEnter: this.onOptionMouseEnter, onKeyDown: this.onOptionKeyDown }, isLayout ? (hAsync("pds-box", { class: "pds-combobox__option-layout-wrapper", innerHTML: this.getOptionLayoutContent(option) })) : isChip ? (this.renderOptionChip(option)) : (this.getOptionLabel(option)), isSelected && hAsync("pds-icon", { icon: "check", size: "regular", class: "pds-combobox__option-check" })));
13424
+ }, "data-option-index": index, onMouseDown: this.onOptionMouseDown, onClick: this.onOptionClick, onMouseEnter: this.onOptionMouseEnter, onKeyDown: this.onOptionKeyDown }, isLayout ? (hAsync("pds-box", { class: "pds-combobox__option-layout-wrapper", innerHTML: this.getOptionLayoutContent(option) })) : isChip ? (this.renderOptionChip(option)) : (this.renderOptionLabel(option)), isSelected && hAsync("pds-icon", { icon: "check", size: "regular", class: "pds-combobox__option-check" })));
13425
+ }
13426
+ /** An option's text, after its `data-icon` when it has one. */
13427
+ renderOptionLabel(option) {
13428
+ const icon = optionIconOf(option);
13429
+ if (icon === null)
13430
+ return this.getOptionLabel(option);
13431
+ return (hAsync("span", { class: "pds-combobox__option-label" }, hAsync("pds-icon", { name: icon, size: "regular", "aria-hidden": "true", class: "pds-combobox__option-icon" }), this.getOptionLabel(option)));
13432
+ }
13433
+ /** The grouped panel's rows, in the order the panel draws them and the keyboard moves through. */
13434
+ panelEntries() {
13435
+ // Slotted markup is already in order; only options from data record positions.
13436
+ if (this.options === undefined && !this.asyncUrl)
13437
+ return buildPanelEntries(this.filteredItems);
13438
+ return buildPanelEntries(this.filteredItems, element => this.panelPositions.get(element));
13175
13439
  }
13176
13440
  /**
13177
13441
  * `flyout`: one row per group, its options in a flyout beside it. `drill-in`: the same rows, and
@@ -13179,7 +13443,7 @@ class PdsCombobox {
13179
13443
  * it's a tree: the rows and ungrouped options are level 1, a group's options level 2.
13180
13444
  */
13181
13445
  renderGroupedPanel() {
13182
- const entries = buildPanelEntries(this.filteredItems);
13446
+ const entries = this.panelEntries();
13183
13447
  const setsize = entries.length;
13184
13448
  if (this.effectiveGroupDisplay === 'drill-in' && this.openGroup !== null) {
13185
13449
  const position = entries.findIndex(entry => entry.kind === 'group' && entry.group.optgroup === this.openGroup);
@@ -13210,22 +13474,26 @@ class PdsCombobox {
13210
13474
  return (hAsync("li", { key: "group-back", id: id, class: {
13211
13475
  'pds-combobox__group-back': true,
13212
13476
  'pds-combobox__group-back--disabled': disabled,
13213
- 'pds-combobox__group-back--highlighted': this.highlightedGroupRow === group.optgroup,
13477
+ // As the group rows: shaded for the keys, and by `:hover` for the pointer.
13478
+ 'pds-combobox__group-back--highlighted': this.keyboardNavigating && this.highlightedGroupRow === group.optgroup,
13214
13479
  'pds-combobox__group-back--keyboard': this.keyboardNavigating && this.highlightedGroupRow === group.optgroup,
13215
13480
  }, role: "treeitem", "aria-expanded": "true", "aria-disabled": disabled ? 'true' : undefined, "aria-level": 1, "aria-posinset": posinset, "aria-setsize": setsize, "aria-labelledby": `${id}-label` }, hAsync("div", { class: "pds-combobox__group-row-trigger pds-combobox__group-back-trigger", onMouseDown: this.onOptionMouseDown, onMouseEnter: this.onGroupBackMouseEnter, onClick: this.onGroupBackClick }, hAsync("span", { class: "pds-combobox__group-row-label", id: `${id}-label` }, hAsync("pds-icon", { name: "caret-left", size: "regular", "aria-hidden": "true", class: "pds-combobox__group-row-caret" }), hAsync("span", { class: "visually-hidden" }, this.drillInBackLabel, ": "), group.label)), hAsync("ul", { class: "pds-combobox__drill-in-options", role: "group", "aria-label": group.label }, this.renderGroupOptions(group))));
13216
13481
  }
13217
13482
  renderGroupRow(group, groupIndex, { posinset, setsize }) {
13218
13483
  const flyout = this.effectiveGroupDisplay === 'flyout';
13219
13484
  const isOpen = flyout && this.openGroup === group.optgroup;
13220
- const hasSelection = group.options.some(({ option }) => this.isOptionSelected(option));
13485
+ // Drill-in shades a group row only for the keys: not for the group holding the selection, or the
13486
+ // row the pointer or a click-open left highlighted, which read as picked. `:hover` covers the pointer.
13487
+ const hasSelection = flyout && group.options.some(({ option }) => this.isOptionSelected(option));
13488
+ const isCurrent = this.highlightedGroupRow === group.optgroup;
13221
13489
  const disabled = isGroupDisabled(group);
13222
13490
  const id = this.groupDomId(group.optgroup);
13223
13491
  return (hAsync("li", { key: `group-${groupIndex}`, id: id, class: {
13224
13492
  'pds-combobox__group-row': true,
13225
13493
  'pds-combobox__group-row--open': isOpen,
13226
13494
  'pds-combobox__group-row--has-selection': hasSelection,
13227
- 'pds-combobox__group-row--highlighted': this.highlightedGroupRow === group.optgroup,
13228
- 'pds-combobox__group-row--keyboard': this.keyboardNavigating && this.highlightedGroupRow === group.optgroup,
13495
+ 'pds-combobox__group-row--highlighted': isCurrent && (flyout || this.keyboardNavigating),
13496
+ 'pds-combobox__group-row--keyboard': isCurrent && this.keyboardNavigating,
13229
13497
  'pds-combobox__group-row--disabled': disabled,
13230
13498
  }, role: "treeitem", "aria-expanded": isOpen ? 'true' : 'false', "aria-disabled": disabled ? 'true' : undefined, "aria-level": 1, "aria-posinset": posinset, "aria-setsize": setsize, "aria-labelledby": `${id}-label`, "data-group-index": groupIndex, onMouseEnter: flyout ? this.onGroupRowMouseEnter : undefined, onMouseLeave: flyout ? this.onGroupRowMouseLeave : undefined }, hAsync("div", { class: "pds-combobox__group-row-trigger", "data-group-index": groupIndex, onMouseDown: this.onOptionMouseDown, onMouseEnter: this.onGroupRowTriggerMouseEnter, onClick: this.onGroupRowClick }, hAsync("span", { class: "pds-combobox__group-row-label", id: `${id}-label` }, group.icon !== null && (
13231
13499
  // `name`, not `icon`: `icon` also loads URLs and data: SVGs, unsanitized.
@@ -13241,7 +13509,23 @@ class PdsCombobox {
13241
13509
  }
13242
13510
  // Helper method to render default text content
13243
13511
  renderDefaultContent() {
13244
- return (hAsync("span", { class: { 'pds-combobox__button-trigger-label': true, 'pds-combobox__button-trigger-label--placeholder': !this.selectedLabel } }, this.selectedLabel || this.placeholder));
13512
+ const icon = this.selectedIcon;
13513
+ return (hAsync("span", { class: {
13514
+ 'pds-combobox__button-trigger-label': true,
13515
+ 'pds-combobox__button-trigger-label--placeholder': !this.selectedLabel,
13516
+ 'pds-combobox__button-trigger-label--with-icon': icon !== null,
13517
+ } }, icon !== null && (
13518
+ // `name`, not `icon`: `icon` also loads URLs and data: SVGs, unsanitized.
13519
+ hAsync("pds-icon", { name: icon, size: "regular", "aria-hidden": "true", class: "pds-combobox__button-trigger-icon" })), this.selectedLabel || this.placeholder));
13520
+ }
13521
+ /** The selection's icon for the button trigger: the option's own, or else its group's. */
13522
+ get selectedIcon() {
13523
+ var _a;
13524
+ const option = this.selectedOption;
13525
+ if (!option)
13526
+ return null;
13527
+ const optgroup = parentOptgroupOf(option);
13528
+ return (_a = optionIconOf(option)) !== null && _a !== void 0 ? _a : (optgroup !== null ? groupIconOf(optgroup) : null);
13245
13529
  }
13246
13530
  // Helper method to check if we should show layout content
13247
13531
  shouldShowLayoutContent() {
@@ -13359,6 +13643,7 @@ class PdsCombobox {
13359
13643
  ];
13360
13644
  }
13361
13645
  render() {
13646
+ var _a;
13362
13647
  const triggerClass = [
13363
13648
  'pds-combobox__button-trigger',
13364
13649
  `pds-combobox__button-trigger--${this.triggerVariant}`,
@@ -13366,13 +13651,18 @@ class PdsCombobox {
13366
13651
  ]
13367
13652
  .filter(Boolean)
13368
13653
  .join(' ');
13369
- return (hAsync(Host, { key: '960558b36010eb059c98acc37439656f2f7ff657', "aria-disabled": this.disabled ? 'true' : null }, hAsync("div", { key: 'b0abcd004aa98b630819cfdd0cfb85ebde2ee2f8', class: "pds-combobox", tabIndex: -1, onFocusout: this.onComboboxFocusOut, part: "combobox" }, this.hasVisibleLabel && (hAsync("label", { key: 'ae42f12fe4d0c498c99c0baae7673ff90e1be576', htmlFor: this.trigger === 'input' ? this.componentId : undefined, id: this.labelId, class: "pds-combobox__label", onClick: this.onLabelClick }, this.label)), this.trigger === 'input' ? (hAsync("div", { class: "pds-combobox__input-wrapper", style: { width: this.triggerWidth } }, hAsync("input", { ref: el => {
13654
+ return (hAsync(Host, { key: 'c3bda161c67bab75f306c7f38435d279e5a88756', "aria-disabled": this.disabled ? 'true' : null }, hAsync("div", { key: '92b3f83c14a7296b3b2671eaef538a15743f695f', class: "pds-combobox", tabIndex: -1, onFocusout: this.onComboboxFocusOut, part: "combobox" }, this.hasVisibleLabel && (hAsync("label", { key: '4a2dba09dd6db9893e21346b861b4c6cb891112b', htmlFor: this.trigger === 'input' ? this.componentId : undefined, id: this.labelId, class: "pds-combobox__label", onClick: this.onLabelClick }, this.label)), this.trigger === 'input' ? (hAsync("div", { class: "pds-combobox__input-wrapper", style: { width: this.triggerWidth } }, hAsync("input", { ref: el => {
13370
13655
  this.inputEl = el;
13371
13656
  this.triggerEl = el;
13372
13657
  }, class: {
13373
13658
  'pds-combobox__input': true,
13374
13659
  'pds-combobox__input--invalid': this.isInvalid(),
13375
- }, type: "text", role: "combobox", "aria-autocomplete": "list", "aria-haspopup": this.inputPopupRole === 'tree' ? 'tree' : undefined, "aria-controls": this.listboxId, "aria-describedby": assignDescription(this.componentId, this.isInvalid(), this.helperMessage, this.errorMessage), "aria-invalid": this.isInvalid() ? 'true' : undefined, "aria-activedescendant": this.usesPanelSearch ? undefined : this.activeDescendantId, "aria-expanded": this.isOpen ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false', "aria-label": this.hideLabel ? this.label : undefined, id: this.componentId, value: this.displayText, placeholder: this.placeholder, disabled: this.disabled, onInput: this.handleInput, onClick: this.handleInputClick, onKeyDown: this.handleKeyDown, autocomplete: "off", part: "input" }), hAsync("pds-icon", { icon: "enlarge", "aria-hidden": "true", class: "pds-combobox__input-icon" }))) : this.trigger === 'chip' ? (hAsync("div", { class: this.getChipTriggerClass(), style: { width: this.triggerWidth }, role: this.usesPanelSearch ? 'button' : 'combobox', "aria-haspopup": this.triggerPopupRole, "aria-controls": this.listboxId, "aria-describedby": assignDescription(this.componentId, this.isInvalid(), this.helperMessage, this.errorMessage), "aria-invalid": this.isInvalid() ? 'true' : undefined, "aria-activedescendant": this.usesPanelSearch ? undefined : this.activeDescendantId, "aria-expanded": this.isOpen ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false', "aria-label": this.triggerAriaLabel, "aria-labelledby": this.triggerLabelledBy, id: this.componentId, tabIndex: this.disabled ? -1 : 0, onClick: this.onButtonTriggerClick, "data-layout": this.customTriggerContent, onKeyDown: this.onButtonTriggerKeyDown, onKeyUp: this.onButtonTriggerKeyUp, ref: el => (this.triggerEl = el), part: "chip-trigger" }, this.renderChipTriggerContent())) : (hAsync("div", { class: triggerClass, style: { width: this.triggerWidth }, role: this.usesPanelSearch ? 'button' : 'combobox', "aria-haspopup": this.triggerPopupRole, "aria-controls": this.listboxId, "aria-describedby": assignDescription(this.componentId, this.isInvalid(), this.helperMessage, this.errorMessage), "aria-invalid": this.isInvalid() ? 'true' : undefined, "aria-activedescendant": this.usesPanelSearch ? undefined : this.activeDescendantId, "aria-expanded": this.isOpen ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false', "aria-label": this.triggerAriaLabel, "aria-labelledby": this.triggerLabelledBy, id: this.componentId, tabIndex: this.disabled ? -1 : 0, onClick: this.onButtonTriggerClick, "data-layout": this.customTriggerContent, onKeyDown: this.onButtonTriggerKeyDown, onKeyUp: this.onButtonTriggerKeyUp, ref: el => (this.triggerEl = el), part: "button-trigger" }, this.renderButtonTriggerContent())), this.renderMessages(), hAsync("div", { key: 'ab0dba6db0a989cb2e41632cb8412062f96c38cd', style: { display: 'none' } }, hAsync("slot", { key: '337461c5ead6dda1d04911fd4b5a23b1dc6b9726', onSlotchange: () => this.updateOptions() })), this.renderDropdown(), this.groupDisplay !== 'inline' && (hAsync("span", { key: 'd8d82d69381548b2e3266d9109c98ab0397b22e0', class: "visually-hidden", role: "status", "aria-live": "polite" }, this.isOpen && this.effectiveGroupDisplay === 'drill-in' && this.openGroup !== null ? this.openGroup.label : '')))));
13660
+ }, type: "text", role: "combobox", "aria-autocomplete": "list", "aria-haspopup": this.inputPopupRole === 'tree' ? 'tree' : undefined, "aria-controls": this.listboxId, "aria-describedby": assignDescription(this.componentId, this.isInvalid(), this.helperMessage, this.errorMessage), "aria-invalid": this.isInvalid() ? 'true' : undefined, "aria-activedescendant": this.usesPanelSearch ? undefined : this.activeDescendantId, "aria-expanded": this.isOpen ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false', "aria-label": this.hideLabel ? this.label : undefined, id: this.componentId, value: this.displayText, placeholder: this.placeholder, disabled: this.disabled, onInput: this.handleInput, onClick: this.handleInputClick, onKeyDown: this.handleKeyDown, autocomplete: "off", part: "input" }), hAsync("pds-icon", { icon: "enlarge", "aria-hidden": "true", class: "pds-combobox__input-icon" }))) : this.trigger === 'chip' ? (hAsync("div", { class: this.getChipTriggerClass(), style: { width: this.triggerWidth }, role: this.usesPanelSearch ? 'button' : 'combobox', "aria-haspopup": this.triggerPopupRole, "aria-controls": this.listboxId, "aria-describedby": assignDescription(this.componentId, this.isInvalid(), this.helperMessage, this.errorMessage), "aria-invalid": this.isInvalid() ? 'true' : undefined, "aria-activedescendant": this.usesPanelSearch ? undefined : this.activeDescendantId, "aria-expanded": this.isOpen ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false', "aria-label": this.triggerAriaLabel, "aria-labelledby": this.triggerLabelledBy, id: this.componentId, tabIndex: this.disabled ? -1 : 0, onClick: this.onButtonTriggerClick, "data-layout": this.customTriggerContent, onKeyDown: this.onButtonTriggerKeyDown, onKeyUp: this.onButtonTriggerKeyUp, ref: el => (this.triggerEl = el), part: "chip-trigger" }, this.renderChipTriggerContent())) : (hAsync("div", { class: triggerClass, style: { width: this.triggerWidth }, role: this.usesPanelSearch ? 'button' : 'combobox', "aria-haspopup": this.triggerPopupRole, "aria-controls": this.listboxId, "aria-describedby": assignDescription(this.componentId, this.isInvalid(), this.helperMessage, this.errorMessage), "aria-invalid": this.isInvalid() ? 'true' : undefined, "aria-activedescendant": this.usesPanelSearch ? undefined : this.activeDescendantId, "aria-expanded": this.isOpen ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false', "aria-label": this.triggerAriaLabel, "aria-labelledby": this.triggerLabelledBy, id: this.componentId, tabIndex: this.disabled ? -1 : 0, onClick: this.onButtonTriggerClick, "data-layout": this.customTriggerContent, onKeyDown: this.onButtonTriggerKeyDown, onKeyUp: this.onButtonTriggerKeyUp, ref: el => (this.triggerEl = el), part: "button-trigger" }, this.renderButtonTriggerContent())), this.renderMessages(), hAsync("div", { key: 'b8d358339bb26037b6c3c464bd4e13fe978f7857', style: { display: 'none' } }, hAsync("slot", { key: '4aa4c2b8f2b57e13d1e958cc745c61e39e800529', onSlotchange: () => this.updateOptions() })), this.renderDropdown(), this.groupDisplay !== 'inline' && [
13661
+ hAsync("span", { key: "drill-status", class: "visually-hidden", role: "status", "aria-live": "polite" }, this.isOpen && this.effectiveGroupDisplay === 'drill-in' && this.openGroup !== null ? this.openGroup.label : ''),
13662
+ // Its own region: sharing one, revealing a row then opening it would leave the text the
13663
+ // same, and opening the group would go unannounced.
13664
+ hAsync("span", { key: "reveal-status", class: "visually-hidden", role: "status", "aria-live": "polite" }, this.isOpen ? (_a = this.revealedGroupLabel) !== null && _a !== void 0 ? _a : '' : ''),
13665
+ ])));
13376
13666
  }
13377
13667
  static get formAssociated() { return true; }
13378
13668
  get el() { return getElement(this); }
@@ -13386,6 +13676,9 @@ class PdsCombobox {
13386
13676
  "flyoutFallback": [{
13387
13677
  "flyoutFallbackChanged": 0
13388
13678
  }],
13679
+ "disabled": [{
13680
+ "disabledChanged": 0
13681
+ }],
13389
13682
  "isOpen": [{
13390
13683
  "isOpenChanged": 0
13391
13684
  }],
@@ -13455,6 +13748,8 @@ class PdsCombobox {
13455
13748
  "drillDirection": [32],
13456
13749
  "highlightedGroup": [32],
13457
13750
  "keyboardNavigating": [32],
13751
+ "revealedGroupLabel": [32],
13752
+ "pointerCanHover": [32],
13458
13753
  "panelQuery": [32],
13459
13754
  "flyoutFallback": [32],
13460
13755
  "selectedOption": [32],
@@ -13502,7 +13797,7 @@ class PdsContainer {
13502
13797
  hostStyle['--pine-container-max-width'] = customSize;
13503
13798
  if (!this.centered)
13504
13799
  hostStyle['margin-inline'] = '0';
13505
- return (hAsync(Host, { key: '8a01369c4d1817dd083b1ac714ff7c02920f817e', class: { [`pds-container--${this.size}`]: isNamed }, style: Object.keys(hostStyle).length ? hostStyle : undefined }, hAsync(Tag, { key: '7428cb0040896dc11004065cf91ae9d3c3a99c49', part: "container" }, hAsync("slot", { key: '5a5b5bbc87c03afc23f1c9a0523fced8c0795efb' }))));
13800
+ return (hAsync(Host, { key: '8a9b10b5d0e348b73f8a6bd7933083c596df10d8', class: { [`pds-container--${this.size}`]: isNamed }, style: Object.keys(hostStyle).length ? hostStyle : undefined }, hAsync(Tag, { key: '55fb22be49377c4cccf08381e7cf954a3f097d08', part: "container" }, hAsync("slot", { key: '4cd9c4fa74a2c6a056e076ab67a0279c395b5c79' }))));
13506
13801
  }
13507
13802
  static get style() { return pdsContainerCss(); }
13508
13803
  static get cmpMeta() { return {
@@ -13622,7 +13917,7 @@ class PdsCopytext {
13622
13917
  render() {
13623
13918
  const hostClass = this.classNames();
13624
13919
  this.hostKeeper.record(hostClass);
13625
- return (hAsync(Host, { key: '1c43941f808f58a53f1c445e0f5693985c793c35', class: hostClass, id: this.componentId }, hAsync("pds-button", { key: 'd771d2587a11f1b27bded17b5df5e649ea93cd90', type: "button", variant: "unstyled", onClick: this.handleClick }, hAsync("span", { key: '0d4fd25220cac636b328fd1ee1aba40d07296265', ref: (el) => this.valueSpanEl = el }, this.value), hAsync("pds-icon", { key: '832a044c10843bb90833301cc3f3ea1f7b755f42', "aria-hidden": "true", icon: copy, size: "16px" }))));
13920
+ return (hAsync(Host, { key: 'd9bd40af6e435d606841cb551341eab33c5983b7', class: hostClass, id: this.componentId }, hAsync("pds-button", { key: '7a42b32678fccb2cbe0d7a68a5da6d5fe5276a4a', type: "button", variant: "unstyled", onClick: this.handleClick }, hAsync("span", { key: '732db283b8075ebad8e1daff70692bac2978aade', ref: (el) => this.valueSpanEl = el }, this.value), hAsync("pds-icon", { key: 'ebfd34b9b5a47b78783302ce97d752af09e3f3e3', "aria-hidden": "true", icon: copy, size: "16px" }))));
13626
13921
  }
13627
13922
  get el() { return getElement(this); }
13628
13923
  static get watchers() { return {
@@ -15624,14 +15919,14 @@ class PdsDatepicker {
15624
15919
  }
15625
15920
  render() {
15626
15921
  const locale = this.resolvedLocale;
15627
- return (hAsync(Host, { key: 'a761f0ca6eeedcac3e4bd90760aa9781cd37dcdc', class: { 'pds-datepicker--range': this.range, 'pds-datepicker--time': this.timePicker }, "full-width": this.fullWidth ? 'true' : null, onFocusin: this.onHostFocusIn, onFocusout: this.onHostFocusOut }, hAsync("pds-input", { key: '2eb04f9fd4e2f7a2437145d250c629c2cc8a0bf6', ref: (el) => (this.inputEl = el), componentId: this.baseId, label: this.label, hideLabel: this.hideLabel, helperMessage: this.helperMessage, errorMessage: this.errorMessage, invalid: this.invalid || !!this.textError || !!this.valueError(), disabled: this.disabled, readonly: this.readonly, required: this.required, placeholder: this.fieldPlaceholder, fullWidth: this.fullWidth, autocomplete: "off", value: this.text, onClick: this.onFieldClick, onPdsInput: this.onTextInput, onPdsChange: this.onTextChange, onPdsKeyDown: this.onTextKeyDown, onPdsFocus: this.stopInnerEvent, onPdsBlur: this.stopInnerEvent }, this.clearable && !!this.value && this.isInteractive && (hAsync("button", {
15922
+ return (hAsync(Host, { key: '82ffd88b7741a90edc28b66a7384178eb2a9a86c', class: { 'pds-datepicker--range': this.range, 'pds-datepicker--time': this.timePicker }, "full-width": this.fullWidth ? 'true' : null, onFocusin: this.onHostFocusIn, onFocusout: this.onHostFocusOut }, hAsync("pds-input", { key: 'f2b9aad64d1fe8d94327cc3d4f87cd6904eb3076', ref: (el) => (this.inputEl = el), componentId: this.baseId, label: this.label, hideLabel: this.hideLabel, helperMessage: this.helperMessage, errorMessage: this.errorMessage, invalid: this.invalid || !!this.textError || !!this.valueError(), disabled: this.disabled, readonly: this.readonly, required: this.required, placeholder: this.fieldPlaceholder, fullWidth: this.fullWidth, autocomplete: "off", value: this.text, onClick: this.onFieldClick, onPdsInput: this.onTextInput, onPdsChange: this.onTextChange, onPdsKeyDown: this.onTextKeyDown, onPdsFocus: this.stopInnerEvent, onPdsBlur: this.stopInnerEvent }, this.clearable && !!this.value && this.isInteractive && (hAsync("button", {
15628
15923
  // Keyed, as is the calendar button: when Clear appears after a pick, the focused
15629
15924
  // calendar button must stay that button rather than be reused as Clear.
15630
15925
  key: "clear", slot: "suffix", type: "button", class: "pds-datepicker__clear", ref: (el) => (this.clearEl = el), "aria-label": this.label ? `${this.clearLabel} ${this.label}` : this.clearLabel,
15631
15926
  // Out of the tab order, as a native search field's clear button is: Tab from a field
15632
15927
  // just emptied would land on it as the change removes it, dropping focus to the page.
15633
15928
  tabindex: "-1", onMouseDown: this.onClearMouseDown, onClick: this.onClearClick
15634
- }, hAsync("pds-icon", { key: '98c325fbba8ea78b2d409bc77099db3206738508', icon: remove, "aria-hidden": "true" }))), hAsync("button", { key: "trigger", slot: "suffix", type: "button", class: "pds-datepicker__trigger", ref: (el) => (this.triggerEl = el), "aria-label": this.triggerAccessibleName(locale), "aria-haspopup": "dialog", "aria-expanded": this.isOpen ? 'true' : 'false', disabled: !this.isInteractive, onClick: this.onTriggerClick, onKeyDown: this.onTriggerKeyDown }, hAsync("pds-icon", { key: 'cb8483febe1b485058b7bb4271b749981a7747a1', icon: calendarSimple, "aria-hidden": "true" }))), this.isOpen && this.renderCalendar(locale)));
15929
+ }, hAsync("pds-icon", { key: 'f2c784e9d6577d4900b7641ee58aa43f5922fc75', icon: remove, "aria-hidden": "true" }))), hAsync("button", { key: "trigger", slot: "suffix", type: "button", class: "pds-datepicker__trigger", ref: (el) => (this.triggerEl = el), "aria-label": this.triggerAccessibleName(locale), "aria-haspopup": "dialog", "aria-expanded": this.isOpen ? 'true' : 'false', disabled: !this.isInteractive, onClick: this.onTriggerClick, onKeyDown: this.onTriggerKeyDown }, hAsync("pds-icon", { key: '98b2e773240c8ea2bbd5a1acfa3c9ba74cb7917b', icon: calendarSimple, "aria-hidden": "true" }))), this.isOpen && this.renderCalendar(locale)));
15635
15930
  }
15636
15931
  static get formAssociated() { return true; }
15637
15932
  get el() { return getElement(this); }
@@ -15773,7 +16068,7 @@ class PdsDivider {
15773
16068
  return classNames.join(' ');
15774
16069
  }
15775
16070
  render() {
15776
- return (hAsync(Host, { key: '072cc8552bd33c4a00d216f15a5a848cfc97fd92', id: this.componentId }, this.hasLabel ? (hAsync("div", { class: this.classNames(), role: "separator", "aria-label": this.label }, hAsync("span", { class: "pds-divider__label", part: "label", "aria-hidden": "true" }, this.label))) : (hAsync("hr", { class: this.classNames() }))));
16071
+ return (hAsync(Host, { key: 'ef2a5ee85e8f37036be5b8df490683636ffb66f0', id: this.componentId }, this.hasLabel ? (hAsync("div", { class: this.classNames(), role: "separator", "aria-label": this.label }, hAsync("span", { class: "pds-divider__label", part: "label", "aria-hidden": "true" }, this.label))) : (hAsync("hr", { class: this.classNames() }))));
15777
16072
  }
15778
16073
  static get style() { return pdsDividerCss(); }
15779
16074
  static get cmpMeta() { return {
@@ -15817,22 +16112,24 @@ function unwrapReconnectedContent(container, selector, contentSelector) {
15817
16112
  }
15818
16113
  }
15819
16114
 
15820
- const pdsDrawerCss = () => `.pds-drawer__modal>.pds-modal__backdrop{-ms-flex-align:stretch;align-items:stretch;background-color:transparent;pointer-events:none}@supports ((-webkit-backdrop-filter: blur(3px)) or (backdrop-filter: blur(3px))){.pds-drawer__modal>.pds-modal__backdrop{-webkit-backdrop-filter:none;backdrop-filter:none}}.pds-drawer__modal>.pds-modal__backdrop[aria-modal]::before{content:none}.pds-drawer__modal>.pds-modal__backdrop>.pds-modal{border-radius:0;height:100%;margin:0;max-height:100%;max-width:100%;pointer-events:auto;width:var(--pds-drawer-width, 500px)}.pds-drawer{display:contents}.pds-drawer.pds-drawer--end .pds-drawer__modal>.pds-modal__backdrop{-ms-flex-pack:end;justify-content:flex-end}.pds-drawer.pds-drawer--start .pds-drawer__modal>.pds-modal__backdrop{-ms-flex-pack:start;justify-content:flex-start}.pds-drawer.pds-drawer--sm{--pds-drawer-width:360px}.pds-drawer.pds-drawer--md{--pds-drawer-width:500px}`;
16115
+ const pdsDrawerCss = () => `.pds-drawer__modal>.pds-modal__backdrop{-ms-flex-align:stretch;align-items:stretch}.pds-drawer__modal:not(.pds-drawer__modal--modal)>.pds-modal__backdrop{background-color:transparent;pointer-events:none}@supports ((-webkit-backdrop-filter: blur(3px)) or (backdrop-filter: blur(3px))){.pds-drawer__modal:not(.pds-drawer__modal--modal)>.pds-modal__backdrop{-webkit-backdrop-filter:none;backdrop-filter:none}}.pds-drawer__modal>.pds-modal__backdrop[aria-modal]::before{content:none}.pds-drawer__modal>.pds-modal__backdrop>.pds-modal{border-radius:0;height:100%;margin:0;max-height:100%;max-width:100%;pointer-events:auto;width:var(--pds-drawer-width, 500px)}.pds-drawer{display:contents}.pds-drawer.pds-drawer--end .pds-drawer__modal>.pds-modal__backdrop{-ms-flex-pack:end;justify-content:flex-end}.pds-drawer.pds-drawer--start .pds-drawer__modal>.pds-modal__backdrop{-ms-flex-pack:start;justify-content:flex-start}.pds-drawer.pds-drawer--sm{--pds-drawer-width:360px}.pds-drawer.pds-drawer--md{--pds-drawer-width:500px}`;
15821
16116
 
15822
- // Known selectors for content Pine components portal to document.body rather
15823
- // than rendering in place — pds-popover, pds-tooltip, pds-combobox's dropdown.
16117
+ // Known selectors for content Pine components portal out of place rather than
16118
+ // rendering where they are — pds-tooltip and pds-combobox's dropdown in
16119
+ // document.body, pds-popover in the body or the open dialog it's in.
15824
16120
  // A pointerdown landing on one of these is not "outside" the drawer in the
15825
16121
  // sense light dismiss cares about: it belongs to an overlay something inside
15826
16122
  // the drawer opened, even though it is not a DOM descendant of the drawer.
15827
16123
  const PORTALED_OVERLAY_SELECTOR = '.pds-popover, .pds-tooltip, .pds-combobox-dropdown-portal';
15828
16124
  /**
15829
- * A non-modal side panel composed from `pds-modal`.
16125
+ * A side panel composed from `pds-modal`, non-modal by default.
15830
16126
  *
15831
- * Unlike `pds-modal`, the page stays interactive while a drawer is open: no
15832
- * dimming, no blur, no scroll lock, no click blocking. `pds-drawer` renders a
15833
- * `pds-modal` internally with `disableTopLayer` always on and its backdrop
15834
- * suppressed, and adds the edge, width and dismiss behavior a side panel
15835
- * needs on top. It does not reimplement focus, Escape or dialog semantics —
16127
+ * By default, unlike `pds-modal`, the page stays interactive while a drawer
16128
+ * is open: no dimming, no blur, no scroll lock, no click blocking.
16129
+ * `pds-drawer` renders a `pds-modal` internally with `disableTopLayer` on and
16130
+ * its backdrop suppressed, and adds the edge, width and dismiss behavior a
16131
+ * side panel needs on top. With `modal`, it opens that `pds-modal` in the top
16132
+ * layer instead and keeps its backdrop. It does not reimplement focus, Escape or dialog semantics —
15836
16133
  * those come from `pds-modal` unchanged.
15837
16134
  * @lightDom renders-markup
15838
16135
  */
@@ -15863,8 +16160,18 @@ class PdsDrawer {
15863
16160
  */
15864
16161
  this.scrollable = true;
15865
16162
  /**
15866
- * Whether the drawer can be dismissed with a pointerdown outside it.
15867
- * Replaces `pds-modal`'s `backdropDismiss` — there is no backdrop to click.
16163
+ * Whether the drawer is modal. A modal drawer dims the page behind it with a
16164
+ * backdrop, makes the page inert, and keeps focus inside the drawer, like
16165
+ * `pds-modal`. Use it for a task the page should wait on. Leave it off for a
16166
+ * panel people work alongside the page. Read when the drawer opens; changing
16167
+ * it while the drawer is open is not supported.
16168
+ * @default false
16169
+ */
16170
+ this.modal = false;
16171
+ /**
16172
+ * Whether the drawer can be dismissed with a pointerdown outside it (in a
16173
+ * `modal` drawer, a click on its backdrop).
16174
+ * Replaces `pds-modal`'s `backdropDismiss`.
15868
16175
  * This also gates Escape, matching how `backdropDismiss` gates Escape on
15869
16176
  * `pds-modal` today: setting this to `false` means the close button is the
15870
16177
  * only way out.
@@ -15883,7 +16190,8 @@ class PdsDrawer {
15883
16190
  * background event while the user is mid-task elsewhere on the page —
15884
16191
  * moving focus there would interrupt them, and the page stays live under
15885
16192
  * a non-modal drawer, so it is a genuine data-entry risk, not just an
15886
- * annoyance.
16193
+ * annoyance. A `modal` drawer ignores `none`: the page behind it is inert,
16194
+ * so focus starts in the drawer.
15887
16195
  * @default 'auto'
15888
16196
  */
15889
16197
  this.initialFocus = 'auto';
@@ -15929,7 +16237,8 @@ class PdsDrawer {
15929
16237
  // page underneath stays genuinely clickable, which means a click there
15930
16238
  // never reaches pds-modal's backdrop element at all.
15931
16239
  handleOutsidePointerDown(e) {
15932
- if (!this.lightDismiss || !this.open)
16240
+ // A modal drawer's backdrop takes the click instead, through pds-modal.
16241
+ if (this.modal || !this.lightDismiss || !this.open)
15933
16242
  return;
15934
16243
  const target = e.target;
15935
16244
  if (!target)
@@ -15939,7 +16248,7 @@ class PdsDrawer {
15939
16248
  if (target.closest(PORTALED_OVERLAY_SELECTOR))
15940
16249
  return;
15941
16250
  // A datepicker's portaled calendar counts as inside only when its datepicker is in the drawer,
15942
- // or in an overlay portaled from it (a pds-popover in the drawer puts its content on the body).
16251
+ // or in an overlay portaled from it (a pds-popover in the drawer puts its content beside it).
15943
16252
  const calendar = target.closest('.pds-datepicker-calendar-portal');
15944
16253
  const owner = calendar === null || calendar === void 0 ? void 0 : calendar.pdsDatepicker;
15945
16254
  if (owner && (containsComposed$1(this.el, owner) || closest$1(PORTALED_OVERLAY_SELECTOR, owner)))
@@ -15955,11 +16264,11 @@ class PdsDrawer {
15955
16264
  this.open = false;
15956
16265
  }
15957
16266
  render() {
15958
- return (hAsync(Host, { key: '166bc90b45d29f64f11b6840e7c6ae798bf14261', class: {
16267
+ return (hAsync(Host, { key: '287bf043c991209488eb1b617031acffb59ff9af', class: {
15959
16268
  'pds-drawer': true,
15960
16269
  [`pds-drawer--${this.side}`]: true,
15961
16270
  [`pds-drawer--${this.size}`]: true,
15962
- } }, hAsync("pds-modal", { key: '2faa1cee1f34a85e9df0cabb8e78803982414982', class: "pds-drawer__modal", ref: (el) => (this.modalEl = el), componentId: this.componentId, open: this.open, scrollable: this.scrollable, disableTopLayer: true, backdropDismiss: this.lightDismiss, disableInitialFocus: this.initialFocus === 'none' }, hAsync("slot", { key: '93968e612756c398f6d1faf9383f6c88c420da28' }))));
16271
+ } }, hAsync("pds-modal", { key: 'cd86fb552353f5cc12fb36fc956033432a91847c', class: { 'pds-drawer__modal': true, 'pds-drawer__modal--modal': this.modal }, ref: (el) => (this.modalEl = el), componentId: this.componentId, open: this.open, scrollable: this.scrollable, disableTopLayer: !this.modal, backdropDismiss: this.lightDismiss, disableInitialFocus: !this.modal && this.initialFocus === 'none' }, hAsync("slot", { key: '56bbe9b5c26b10b07c0f503ba147899a57a5de85' }))));
15963
16272
  }
15964
16273
  get el() { return getElement(this); }
15965
16274
  static get style() { return pdsDrawerCss(); }
@@ -15972,6 +16281,7 @@ class PdsDrawer {
15972
16281
  "side": [1],
15973
16282
  "size": [1],
15974
16283
  "scrollable": [4],
16284
+ "modal": [4],
15975
16285
  "lightDismiss": [4, "light-dismiss"],
15976
16286
  "initialFocus": [1, "initial-focus"]
15977
16287
  },
@@ -15999,7 +16309,7 @@ class PdsDrawerContent {
15999
16309
  unwrapReconnectedContent(this.el.querySelector('.pds-drawer-content'), '.pds-drawer-content');
16000
16310
  }
16001
16311
  render() {
16002
- return (hAsync("div", { key: 'b15b087506c1292f9d67e531e8d935069749c09d', class: "pds-drawer-content" }, hAsync("slot", { key: '9c60ca75c7905e7e994f9c41eee213b962afb833' })));
16312
+ return (hAsync("div", { key: 'f307939ab0a94f6a0d8a3675c658def0ded68b98', class: "pds-drawer-content" }, hAsync("slot", { key: 'dadac08ac15bb8ded98ea982511e2d57bea9bdca' })));
16003
16313
  }
16004
16314
  get el() { return getElement(this); }
16005
16315
  static get style() { return pdsDrawerContentCss(); }
@@ -16027,7 +16337,7 @@ class PdsDrawerFooter {
16027
16337
  unwrapReconnectedContent(this.el.querySelector('.pds-drawer__footer'), '.pds-drawer__footer');
16028
16338
  }
16029
16339
  render() {
16030
- return (hAsync("footer", { key: 'a4eec0aff617c605b94f8d3b9ec1e2d98cded6fb', class: "pds-drawer__footer" }, hAsync("slot", { key: '6dc379c940e37edfd05d99728be9dff58ca1d717' })));
16340
+ return (hAsync("footer", { key: 'b58c68d88b467e8baa3682d16f97076d06ea2414', class: "pds-drawer__footer" }, hAsync("slot", { key: 'ff2306202c14029b397d40b5bb3d672a8aa571c0' })));
16031
16341
  }
16032
16342
  get el() { return getElement(this); }
16033
16343
  static get style() { return pdsDrawerFooterCss(); }
@@ -16055,7 +16365,7 @@ class PdsDrawerHeader {
16055
16365
  unwrapReconnectedContent(this.el.querySelector('.pds-drawer__header'), '.pds-drawer__header');
16056
16366
  }
16057
16367
  render() {
16058
- return (hAsync("header", { key: '6b9338e5dbf7a7e580c11b28c95ca53693528382', class: "pds-drawer__header" }, hAsync("slot", { key: '0990fbcf94c0c438b98cf1e8945f1e2fd9aa33dc' })));
16368
+ return (hAsync("header", { key: '280e6ca734317d5733e4c595431c8070eff13d58', class: "pds-drawer__header" }, hAsync("slot", { key: 'cc6af6084600c4dc60d7bd99e040376abdf5ffe3' })));
16059
16369
  }
16060
16370
  get el() { return getElement(this); }
16061
16371
  static get style() { return pdsDrawerHeaderCss(); }
@@ -16069,9 +16379,10 @@ class PdsDrawerHeader {
16069
16379
  }; }
16070
16380
  }
16071
16381
 
16072
- const pdsDropdownMenuCss = () => `:host{display:block}.is-hidden{display:none}.pds-dropdown-menu--panel{background-color:var(--pine-color-background-overlay);border-radius:var(--pine-dimension-xs);left:var(--pine-dimension-none);min-width:170px;padding:var(--pine-dimension-xs);position:fixed;z-index:var(--pine-z-index-overlay)}:host-context([data-theme=dark]) .pds-dropdown-menu--panel{border:var(--pine-border)}::slotted(a),::slotted(button){-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;border-radius:var(--pine-dimension-xs) !important;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--pine-color-text) !important;cursor:pointer;display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;font:var(--pine-typography-body-medium) !important;gap:var(--pine-dimension-xs);margin:calc(var(--pine-border-width) + 2px) !important;padding:var(--pine-dimension-xs) !important;text-align:start;text-decoration:none !important;width:calc(100% - (var(--pine-border-width) + 2px) * 2)}::slotted(.destructive){color:var(--pine-color-danger) !important}::slotted([aria-disabled=true]),::slotted([disabled]:not([disabled=false])){cursor:not-allowed;opacity:0.5;pointer-events:none}`;
16382
+ const pdsDropdownMenuCss = () => `:host{display:block}.is-hidden{display:none}.pds-dropdown-menu--panel{background-color:var(--pine-color-background-overlay);border-radius:var(--pine-dimension-xs);left:var(--pine-dimension-none);min-width:170px;padding:var(--pine-dimension-xs);position:fixed;z-index:var(--pine-z-index-overlay)}:host-context([data-theme=dark]) .pds-dropdown-menu--panel{border:var(--pine-border)}.pds-dropdown-menu__header{-webkit-border-after:var(--pine-border-width-thin) solid var(--pine-color-border);border-block-end:var(--pine-border-width-thin) solid var(--pine-color-border);-webkit-margin-after:var(--pine-dimension-xs);margin-block-end:var(--pine-dimension-xs);margin-inline:calc(var(--pine-dimension-xs) * -1);-webkit-padding-after:var(--pine-dimension-xs);padding-block-end:var(--pine-dimension-xs);padding-inline:calc(var(--pine-dimension-xs) * 2 + var(--pine-border-width) + 2px);text-align:start}.pds-dropdown-menu__items{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}::slotted(a:not([slot=header])),::slotted(button:not([slot=header])){-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;border-radius:var(--pine-dimension-xs) !important;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--pine-color-text) !important;cursor:pointer;display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;font:var(--pine-typography-body-medium) !important;gap:var(--pine-dimension-xs);margin:calc(var(--pine-border-width) + 2px) !important;padding:var(--pine-dimension-xs) !important;text-align:start;text-decoration:none !important;width:calc(100% - (var(--pine-border-width) + 2px) * 2)}::slotted(.destructive:not([slot=header])){color:var(--pine-color-danger) !important}::slotted([aria-disabled=true]:not([slot=header])),::slotted([disabled]:not([disabled=false]):not([slot=header])){cursor:not-allowed;opacity:0.5;pointer-events:none}`;
16073
16383
 
16074
16384
  /**
16385
+ * @slot header - Non-interactive content displayed above the menu items inside the dropdown panel. It renders outside the menu role, so assistive tech reads it as plain content rather than as a menu item.
16075
16386
  * @part menu-panel - Exposes the dropdown menu container for styling.
16076
16387
  */
16077
16388
  class PdsDropdownMenu {
@@ -16082,6 +16393,7 @@ class PdsDropdownMenu {
16082
16393
  this.cleanupAutoUpdate = null;
16083
16394
  this.triggerObserver = null;
16084
16395
  this.currentFocusIndex = -1;
16396
+ this.hasHeader = false;
16085
16397
  /**
16086
16398
  * The placement of the dropdown panel relative to the trigger.
16087
16399
  */
@@ -16100,8 +16412,11 @@ class PdsDropdownMenu {
16100
16412
  // Writes the trigger's ARIA from the menu's state, so the observer's own callback doesn't loop.
16101
16413
  this.syncTriggerAria = () => {
16102
16414
  if (!this.triggerEl)
16103
- return;
16104
- setAttributesIfChanged(this.triggerEl, { 'aria-haspopup': 'menu', 'aria-expanded': String(this.isOpen) });
16415
+ return false;
16416
+ return setAttributesIfChanged(this.triggerEl, { 'aria-haspopup': 'menu', 'aria-expanded': String(this.isOpen) });
16417
+ };
16418
+ this.handleHeaderSlotChange = (event) => {
16419
+ this.hasHeader = event.target.assignedElements().length > 0;
16105
16420
  };
16106
16421
  this.handleSlotChange = (event) => {
16107
16422
  this.slotEl = event.target;
@@ -16180,6 +16495,9 @@ class PdsDropdownMenu {
16180
16495
  this.toggleDropdown();
16181
16496
  };
16182
16497
  }
16498
+ componentWillLoad() {
16499
+ this.hasHeader = Array.from(this.host.children).some(el => el.getAttribute('slot') === 'header');
16500
+ }
16183
16501
  componentDidRender() {
16184
16502
  var _a;
16185
16503
  this.panelEl = (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('pds-box');
@@ -16208,7 +16526,8 @@ class PdsDropdownMenu {
16208
16526
  this.triggerObserver = null;
16209
16527
  if (!this.triggerEl || typeof MutationObserver === 'undefined')
16210
16528
  return;
16211
- this.triggerObserver = new MutationObserver(this.syncTriggerAria);
16529
+ // Capped against a script that keeps undoing it; opening and closing still write it directly.
16530
+ this.triggerObserver = new MutationObserver(limitRestores(this.syncTriggerAria, 'pds-dropdown-menu: stopped restoring its trigger ARIA, as another script keeps changing it. It may be wrong until the menu opens or closes.', this.triggerEl));
16212
16531
  this.triggerObserver.observe(this.triggerEl, {
16213
16532
  attributes: true,
16214
16533
  attributeFilter: ['aria-haspopup', 'aria-expanded'],
@@ -16314,15 +16633,19 @@ class PdsDropdownMenu {
16314
16633
  this.focusItemByIndex(prevIndex);
16315
16634
  }
16316
16635
  }
16636
+ // Escape is taken in document's capture phase, before a modal around the menu hears it on
16637
+ // document and closes too.
16638
+ handleEscapeKeyDown(event) {
16639
+ if (!this.isOpen || event.key !== 'Escape' || event.defaultPrevented)
16640
+ return;
16641
+ event.preventDefault();
16642
+ this.closeDropdown();
16643
+ }
16317
16644
  // Handle keyboard events for the dropdown
16318
16645
  handleKeyDown(event) {
16319
16646
  if (!this.isOpen)
16320
16647
  return;
16321
16648
  switch (event.key) {
16322
- case 'Escape':
16323
- event.preventDefault();
16324
- this.closeDropdown();
16325
- break;
16326
16649
  case 'ArrowDown':
16327
16650
  event.preventDefault();
16328
16651
  this.focusNextItem();
@@ -16414,7 +16737,7 @@ class PdsDropdownMenu {
16414
16737
  }
16415
16738
  }
16416
16739
  render() {
16417
- return (hAsync(Host, { key: '9d67972cf15c22bc666c32b86dcd8f143160ee0a', id: this.componentId }, hAsync("slot", { key: 'e9cbc0612ce0e8c2bf55e1dc7930eda075fcc173', name: "trigger", onSlotchange: this.handleTriggerSlotChange }), hAsync("pds-box", { key: '6fed3f11cf962a97f8ebb3cc69bd76efb425c464', "border-radius": "sm", display: "flex", direction: "column", class: "pds-dropdown-menu--panel is-hidden", shadow: "100", role: "menu", "aria-orientation": "vertical", part: "menu-panel" }, hAsync("slot", { key: 'b8757512713b913f3ee56d9518897e7ed3c3b830', onSlotchange: this.handleSlotChange }))));
16740
+ return (hAsync(Host, { key: '18dac4d59ea236fe171f4c16f6571cb1547059c6', id: this.componentId }, hAsync("slot", { key: '95201a75a33ccb70dbd51a5cf9d78c76ebf26f65', name: "trigger", onSlotchange: this.handleTriggerSlotChange }), hAsync("pds-box", { key: '7fc588f40f607ad81ad70bf74a525d078d32a80b', "border-radius": "sm", display: "flex", direction: "column", class: "pds-dropdown-menu--panel is-hidden", shadow: "100", part: "menu-panel" }, hAsync("div", { key: '73d13d94edccb68db7b703f930b50f729334efa8', class: { 'pds-dropdown-menu__header': true, 'is-hidden': !this.hasHeader } }, hAsync("slot", { key: '7066f3a6f71c8961326f38f0509f1c0cc17098ae', name: "header", onSlotchange: this.handleHeaderSlotChange })), hAsync("div", { key: '9f07ec488b688c58c6422b575015ccd364075fe8', class: "pds-dropdown-menu__items", role: "menu", "aria-orientation": "vertical" }, hAsync("slot", { key: 'd0aad3f9ac3b58779669411523adbb8878dec61c', onSlotchange: this.handleSlotChange })))));
16418
16741
  }
16419
16742
  get host() { return getElement(this); }
16420
16743
  static get style() { return pdsDropdownMenuCss(); }
@@ -16424,9 +16747,10 @@ class PdsDropdownMenu {
16424
16747
  "$members$": {
16425
16748
  "componentId": [1, "component-id"],
16426
16749
  "placement": [1],
16427
- "currentFocusIndex": [32]
16750
+ "currentFocusIndex": [32],
16751
+ "hasHeader": [32]
16428
16752
  },
16429
- "$listeners$": [[8, "keydown", "handleKeyDown"], [8, "click", "handleWindowClick"]],
16753
+ "$listeners$": [[6, "keydown", "handleEscapeKeyDown"], [8, "keydown", "handleKeyDown"], [8, "click", "handleWindowClick"]],
16430
16754
  "$lazyBundleId$": "-",
16431
16755
  "$attrsToReflect$": []
16432
16756
  }; }
@@ -16509,7 +16833,7 @@ class PdsDropdownMenuItem {
16509
16833
  }, tabIndex: this.disabled ? -1 : 0, type: "button", part: "button", onKeyDown: this.handleKeyDown, onFocus: this.handleFocus, onBlur: this.handleBlur, disabled: this.disabled, "aria-disabled": this.disabled ? 'true' : null }, hAsync("slot", null)));
16510
16834
  }
16511
16835
  render() {
16512
- return (hAsync(Host, { key: 'cf22f97df3869d59820ba0deff9a21bfee2628b8', id: this.componentId, class: { 'is-disabled': this.disabled, 'destructive': !this.disabled && this.destructive }, onClick: () => !this.disabled && this.handleClick(), role: "none", tabIndex: -1, "aria-disabled": this.disabled ? 'true' : null }, this.renderElement()));
16836
+ return (hAsync(Host, { key: '33bd645d7c9547e3fd07429cf795302e6a482296', id: this.componentId, class: { 'is-disabled': this.disabled, 'destructive': !this.disabled && this.destructive }, onClick: () => !this.disabled && this.handleClick(), role: "none", tabIndex: -1, "aria-disabled": this.disabled ? 'true' : null }, this.renderElement()));
16513
16837
  }
16514
16838
  get host() { return getElement(this); }
16515
16839
  static get style() { return pdsDropdownMenuItemCss(); }
@@ -16545,7 +16869,7 @@ class PdsDropdownMenuSeparator {
16545
16869
  this.disabled = false;
16546
16870
  }
16547
16871
  render() {
16548
- return (hAsync(Host, { key: '63bd5fd3112b1030d1e86b331a659ab3a92dd387', id: this.componentId }, hAsync("hr", { key: '0a8504d34a9b91db03abdddd86ce918c00534410' })));
16872
+ return (hAsync(Host, { key: '60407a2edc8b4667d39cbd1ba9a859d09b0b8ff1', id: this.componentId }, hAsync("hr", { key: '8485d1c8508c5fe5e3635505f25e278f45f45b82' })));
16549
16873
  }
16550
16874
  static get style() { return pdsDropdownMenuSeparatorCss(); }
16551
16875
  static get cmpMeta() { return {
@@ -17125,7 +17449,7 @@ class PdsFilter {
17125
17449
  return null;
17126
17450
  }
17127
17451
  render() {
17128
- return (hAsync(Host, { key: '4abb55453c9ab4cd49b21a23047aa5ee4ab70056', id: this.componentId }, hAsync("button", { key: 'e6b6bd81ca3f9d23f490219cf8e81f0bdf511798', class: this.getTriggerClasses(), type: "button", popoverTarget: this.variant !== 'clear' ? `${this.componentId}-popover` : undefined, popoverTargetAction: this.variant !== 'clear' ? 'toggle' : undefined, onKeyDown: this.variant === 'clear' ? this.handleKeyDown : undefined, onClick: (event) => this.handleClick(event), part: "button", "aria-expanded": this.isOpen ? 'true' : 'false', "aria-haspopup": this.variant !== 'clear' ? 'true' : undefined, "aria-controls": this.variant !== 'clear' ? `${this.componentId}-popover` : undefined }, hAsync("span", { key: '4cea081451f50508cef36e90d4c88cbd94933287', class: "pds-filter__button-content", part: "button-content" }, this.renderIcon(), this.text && (hAsync("span", { key: '479f84087e7969fa555475b240f5e70ce5bcf136', class: "pds-filter__button-text", part: "button-text" }, this.text)), this.renderDropdownIcon())), this.variant !== 'clear' && (hAsync("div", { key: '85aec3d5d7b33a0cfb3602412238830929902eb1', ref: el => this.popoverEl = el, id: `${this.componentId}-popover`, class: "pds-filter__popover", popover: "auto", part: "popover" }, hAsync("slot", { key: 'ede4c3866bfdce974e0d21c6e6a3ae22aee47d2c' })))));
17452
+ return (hAsync(Host, { key: '3cae951aee1f9c75f3e207cf6c68633a23f8f6dc', id: this.componentId }, hAsync("button", { key: 'f4c644710dc936248995be9a49cef8ad13031d61', class: this.getTriggerClasses(), type: "button", popoverTarget: this.variant !== 'clear' ? `${this.componentId}-popover` : undefined, popoverTargetAction: this.variant !== 'clear' ? 'toggle' : undefined, onKeyDown: this.variant === 'clear' ? this.handleKeyDown : undefined, onClick: (event) => this.handleClick(event), part: "button", "aria-expanded": this.isOpen ? 'true' : 'false', "aria-haspopup": this.variant !== 'clear' ? 'true' : undefined, "aria-controls": this.variant !== 'clear' ? `${this.componentId}-popover` : undefined }, hAsync("span", { key: '2dd87e53f363118becc762051ea1be664258b8b6', class: "pds-filter__button-content", part: "button-content" }, this.renderIcon(), this.text && (hAsync("span", { key: '733ceb5e07198e844fbdc1af294d2046c4c571d8', class: "pds-filter__button-text", part: "button-text" }, this.text)), this.renderDropdownIcon())), this.variant !== 'clear' && (hAsync("div", { key: 'beb65a21192c6f5c16703aec7ab9a92ea378ef3c', ref: el => this.popoverEl = el, id: `${this.componentId}-popover`, class: "pds-filter__popover", popover: "auto", part: "popover" }, hAsync("slot", { key: '5a481cc6b143b059a5fc33d377abe5ab79aefb4e' })))));
17129
17453
  }
17130
17454
  get el() { return getElement(this); }
17131
17455
  static get style() { return pdsFilterCss(); }
@@ -17157,7 +17481,7 @@ class PdsFilters {
17157
17481
  registerInstance(this, hostRef);
17158
17482
  }
17159
17483
  render() {
17160
- return (hAsync(Host, { key: '5587c41a5ca93cc48399d7c1af0762d4a3516b4d', id: this.componentId }, hAsync("div", { key: '43ee499b9c3f49b52cf18beee8ac5cf97b8ad49a', class: "pds-filters" }, hAsync("slot", { key: '79a452042d7aa7e0492d80fd773f71fb820c2211' }))));
17484
+ return (hAsync(Host, { key: '8688235fe7cdea1b4fc540156ff21bb9711b41b6', id: this.componentId }, hAsync("div", { key: 'e51a37977df8c31f99b28d8c7e4bedb0d63e53c6', class: "pds-filters" }, hAsync("slot", { key: '8ce936da4d3f0213408090bc3eeb011920f9aa6c' }))));
17161
17485
  }
17162
17486
  static get style() { return pdsFiltersCss(); }
17163
17487
  static get cmpMeta() { return {
@@ -17286,6 +17610,28 @@ const isRTL = (hostEl) => {
17286
17610
  const isSrc = (str) => str.length > 0 && /(\/|\.)/.test(str);
17287
17611
  const isStr = (val) => typeof val === 'string'; // eslint-disable-line @typescript-eslint/no-explicit-any
17288
17612
  const toLower = (val) => val.toLowerCase();
17613
+ /**
17614
+ * Normalizes a color value for use as a CSS custom property value: a bare
17615
+ * design token (--pine-color-foo) is wrapped in var(...), an already-wrapped
17616
+ * var(--token) is passed through unchanged, and anything else (a literal CSS
17617
+ * color, or currentColor) is passed through as-is. Mirrors the equivalent
17618
+ * utility in the `pine` repo's `libs/core/src/utils/utils.ts`
17619
+ * (`normalizeColorValue`) — duplicated here rather than imported because
17620
+ * `@pine-ds/core` already depends on `@pine-ds/icons`, so the reverse
17621
+ * dependency would be circular.
17622
+ */
17623
+ const normalizeColorValue = (value) => {
17624
+ if (!isStr(value))
17625
+ return undefined;
17626
+ const trimmed = value.trim();
17627
+ if (trimmed === '')
17628
+ return undefined;
17629
+ if (trimmed.startsWith('var('))
17630
+ return trimmed;
17631
+ if (trimmed.startsWith('--'))
17632
+ return `var(${trimmed})`;
17633
+ return trimmed;
17634
+ };
17289
17635
  /**
17290
17636
  * Elements inside of web components sometimes need to inherit global attributes
17291
17637
  * set on the host. For example, the inner input in `pds-input` should inherit
@@ -17447,9 +17793,10 @@ class PdsIcon {
17447
17793
  this.setupInitialAriaLabel();
17448
17794
  }
17449
17795
  setCSSVariables() {
17796
+ var _a;
17450
17797
  this.el.style.setProperty(`--dimension-icon-height`, this.iconSize());
17451
17798
  this.el.style.setProperty(`--dimension-icon-width`, this.iconSize());
17452
- this.el.style.setProperty(`--color-icon-fill`, typeof this.color !== 'undefined' ? this.color : 'currentColor');
17799
+ this.el.style.setProperty(`--color-icon-fill`, (_a = normalizeColorValue(this.color)) !== null && _a !== void 0 ? _a : 'currentColor');
17453
17800
  }
17454
17801
  connectedCallback() {
17455
17802
  // Handle re-connection during client-side navigation
@@ -17494,7 +17841,7 @@ class PdsIcon {
17494
17841
  const shouldFlip = flipRtl || shouldIconAutoFlip;
17495
17842
  // Use inherited aria-label if provided, otherwise fall back to auto-generated one
17496
17843
  const finalAriaLabel = inheritedAttributes['aria-label'] || ariaLabel;
17497
- return (hAsync(Host, Object.assign({ key: '43aa73531314e6529a887468e69362430d006229', "aria-label": finalAriaLabel !== undefined && !this.hasAriaHidden() ? finalAriaLabel : null, alt: "", role: "img", class: Object.assign(Object.assign({}, createColorClasses(this.color)), { 'flip-rtl': shouldFlip, 'icon-rtl': shouldFlip && isRTL(this.el) }) }, inheritedAttributes), (hAsync("div", { class: "icon-inner" }))));
17844
+ return (hAsync(Host, Object.assign({ key: '3af1c02235a2645bc3bb300831b19779cca78827', "aria-label": finalAriaLabel !== undefined && !this.hasAriaHidden() ? finalAriaLabel : null, alt: "", role: "img", class: Object.assign(Object.assign({}, createColorClasses(this.color)), { 'flip-rtl': shouldFlip, 'icon-rtl': shouldFlip && isRTL(this.el) }) }, inheritedAttributes), (hAsync("div", { class: "icon-inner" }))));
17498
17845
  }
17499
17846
  /*****
17500
17847
  * Private Methods
@@ -17630,9 +17977,9 @@ class PdsImage {
17630
17977
  this.loading = 'eager';
17631
17978
  }
17632
17979
  render() {
17633
- return (hAsync(Host, { key: 'fff1a796e59b8e666069e56390e174d7d2861f03', class: {
17980
+ return (hAsync(Host, { key: '1e8bb3882c2a629004ce1441e85d5c5a75a84e98', class: {
17634
17981
  'pds-image': true,
17635
- }, id: this.componentId }, hAsync("img", { key: 'dbeda9da5adca51c58ec5a807cde673d6b479d0f', alt: this.alt, height: this.height, loading: this.loading, sizes: this.sizes, src: this.src, srcset: this.srcset, width: this.width })));
17982
+ }, id: this.componentId }, hAsync("img", { key: 'b50b19d51431d45027c7a918a4ba4c38493741d5', alt: this.alt, height: this.height, loading: this.loading, sizes: this.sizes, src: this.src, srcset: this.srcset, width: this.width })));
17636
17983
  }
17637
17984
  static get style() { return pdsImageCss(); }
17638
17985
  static get cmpMeta() { return {
@@ -17952,10 +18299,10 @@ class PdsInput {
17952
18299
  'has-prepend': this.hasPrepend,
17953
18300
  'has-append': this.hasAppend,
17954
18301
  };
17955
- return (hAsync(Host, { key: '8c0829cc3502e5fa1fe52584d84b9345fcb0f3fd', "aria-disabled": this.disabled ? 'true' : null, "aria-readonly": this.readonly ? 'true' : null, "has-prefix": this.hasPrefix ? 'true' : null, "has-suffix": this.hasSuffix ? 'true' : null, "has-prepend": this.hasPrepend ? 'true' : null, "has-append": this.hasAppend ? 'true' : null, "has-action": this.hasAction && !this.hideLabel ? 'true' : null, "full-width": this.fullWidth ? 'true' : null }, hAsync("div", { key: 'cf754e6fc72d2cf900e541a469a8e0ba62851538', class: "pds-input" }, label && (hAsync("div", { key: 'f55793898eb2840322ec9a79daed186420ef0d90', class: {
18302
+ return (hAsync(Host, { key: '75eb8bc6cda5e947f8677ebefe7995688f03f947', "aria-disabled": this.disabled ? 'true' : null, "aria-readonly": this.readonly ? 'true' : null, "has-prefix": this.hasPrefix ? 'true' : null, "has-suffix": this.hasSuffix ? 'true' : null, "has-prepend": this.hasPrepend ? 'true' : null, "has-append": this.hasAppend ? 'true' : null, "has-action": this.hasAction && !this.hideLabel ? 'true' : null, "full-width": this.fullWidth ? 'true' : null }, hAsync("div", { key: '93d7f90b9a64daccea1533abc08a8cb18825b828', class: "pds-input" }, label && (hAsync("div", { key: '948109b3bfa1a1b8171572da9160425e3e35a7a6', class: {
17956
18303
  'pds-input__label-wrapper': true,
17957
18304
  'visually-hidden': this.hideLabel,
17958
- } }, hAsync("label", { key: '2a7deac2a9443b1a648133a799b69414b96314e3', htmlFor: componentId, class: "pds-input__label" }, hAsync("span", { key: '75dc7787e0132c4f62272307867a8066f9cf6ce2' }, label, this.required && hAsync("span", { key: 'c7c413addd2b3f275031596598b030c02f647969', class: "pds-input__required-indicator" }, " *"))), !this.hideLabel && this.renderAction())), hAsync("div", { key: 'eaf09d07c4fbc84ef835d2c7b4f00e252394f5ed', class: inputWrapperClasses }, this.renderPrepend(), this.renderPrefix(), hAsync("input", Object.assign({ key: 'dca2390b44e430f0ab1d29daa4ce630ac3b12881', ref: (input) => (this.nativeInput = input), class: "pds-input__field", "aria-describedby": assignDescription(componentId, invalid, helperMessage, errorMessage), "aria-invalid": invalid ? "true" : undefined, autocomplete: this.autocomplete, disabled: disabled, id: componentId, max: this.max, maxlength: this.maxlength, min: this.min, minlength: this.minlength, name: this.name, pattern: this.pattern, placeholder: this.placeholder, readOnly: this.readonly, required: this.required, step: this.step, type: this.type, value: value, onInput: this.onInputEvent, onChange: this.onChangeEvent, onBlur: this.onBlurEvent, onFocus: this.onFocusEvent, onKeyDown: this.onKeyDownEvent, onCompositionstart: this.onCompositionStart, onCompositionend: this.onCompositionEnd }, this.inheritedAttributes)), this.renderSuffix(), this.renderAppend()), helperMessage && (hAsync("p", { key: '0bd7859f44185ed0c1478833518cb5829ffea4ad', class: "pds-input__helper-message", id: messageId(componentId, 'helper') }, helperMessage)), errorMessage && (hAsync("p", { key: 'c40016f5bb03e292e01430c2940aff0ebb98abb5', class: "pds-input__error-message", id: messageId(componentId, 'error') }, hAsync("pds-icon", { key: '54985d775ddf951b50cae4796b7847e98de7434f', "aria-hidden": "true", icon: danger, size: "small" }), errorMessage)))));
18305
+ } }, hAsync("label", { key: 'bb0e6c6febb97ad4aa3942ac5e67ac42dc1bde0a', htmlFor: componentId, class: "pds-input__label" }, hAsync("span", { key: 'c6a122f829aa3b92ccb715c3f3975f6baadb3028' }, label, this.required && hAsync("span", { key: 'dce7d1a9c010a545992734bd238e9f6a4ca7b4ce', class: "pds-input__required-indicator" }, " *"))), !this.hideLabel && this.renderAction())), hAsync("div", { key: '1b92ab5d649a4a9cf8112ea9b8a8a1095714f6d0', class: inputWrapperClasses }, this.renderPrepend(), this.renderPrefix(), hAsync("input", Object.assign({ key: 'bc3c4b907312149d375bb78f9912e4501da59348', ref: (input) => (this.nativeInput = input), class: "pds-input__field", "aria-describedby": assignDescription(componentId, invalid, helperMessage, errorMessage), "aria-invalid": invalid ? "true" : undefined, autocomplete: this.autocomplete, disabled: disabled, id: componentId, max: this.max, maxlength: this.maxlength, min: this.min, minlength: this.minlength, name: this.name, pattern: this.pattern, placeholder: this.placeholder, readOnly: this.readonly, required: this.required, step: this.step, type: this.type, value: value, onInput: this.onInputEvent, onChange: this.onChangeEvent, onBlur: this.onBlurEvent, onFocus: this.onFocusEvent, onKeyDown: this.onKeyDownEvent, onCompositionstart: this.onCompositionStart, onCompositionend: this.onCompositionEnd }, this.inheritedAttributes)), this.renderSuffix(), this.renderAppend()), helperMessage && (hAsync("p", { key: 'f7bcbafc17a20310d602fce14a0adad522acbcb1', class: "pds-input__helper-message", id: messageId(componentId, 'helper') }, helperMessage)), errorMessage && (hAsync("p", { key: 'bbbd6dc3203b89e5759587147de74d2ce3ce6177', class: "pds-input__error-message", id: messageId(componentId, 'error') }, hAsync("pds-icon", { key: '68a6a92c82c1756ad99f431e0cb56756e3cdf75c', "aria-hidden": "true", icon: danger, size: "small" }), errorMessage)))));
17959
18306
  }
17960
18307
  static get formAssociated() { return true; }
17961
18308
  get el() { return getElement(this); }
@@ -18067,8 +18414,8 @@ class PdsLink {
18067
18414
  const targetValue = this.target || (this.external ? '_blank' : undefined);
18068
18415
  const showExternalIcon = this.external;
18069
18416
  const relValue = targetValue === '_blank' ? 'noopener noreferrer' : undefined;
18070
- return (hAsync("a", { key: '4757dc775fb132ea1fed93fed8e3cd18c77d45af', class: this.classNames(), download: this.download, href: this.href, id: this.componentId, part: "link", "aria-current": this.active ? 'page' : undefined, target: targetValue, rel: relValue, style: this.setLinkStyles(), "data-turbo": this.turbo || undefined, "data-turbo-frame": this.turboFrame || undefined, "data-turbo-action": this.turboAction || undefined, "data-turbo-method": this.turboMethod || undefined, "data-turbo-confirm": this.turboConfirm || undefined, "data-turbo-stream": this.turboStream || undefined, "data-turbo-prefetch": this.turboPrefetch || undefined, "data-turbo-preload": this.turboPreload || undefined }, hAsync("slot", { key: '88e5a1ef3b0fc384f7449979029fa45c627aab99' }, this.href), showExternalIcon &&
18071
- hAsync("pds-icon", { key: '6f1b9cf0dab342ea09c1f52c605228ef4d04f829', icon: launch, size: this.fontSize })));
18417
+ return (hAsync("a", { key: '3b6f9d19d7f50d0606cf5f3c3a97b85ee4aa63b0', class: this.classNames(), download: this.download, href: this.href, id: this.componentId, part: "link", "aria-current": this.active ? 'page' : undefined, target: targetValue, rel: relValue, style: this.setLinkStyles(), "data-turbo": this.turbo || undefined, "data-turbo-frame": this.turboFrame || undefined, "data-turbo-action": this.turboAction || undefined, "data-turbo-method": this.turboMethod || undefined, "data-turbo-confirm": this.turboConfirm || undefined, "data-turbo-stream": this.turboStream || undefined, "data-turbo-prefetch": this.turboPrefetch || undefined, "data-turbo-preload": this.turboPreload || undefined }, hAsync("slot", { key: 'a265f1c4c9b6ff089b23906d8f650bfd65b25013' }, this.href), showExternalIcon &&
18418
+ hAsync("pds-icon", { key: '9553a8256b6811296ea4b762e32662c1a2f4aecf', icon: launch, size: this.fontSize })));
18072
18419
  }
18073
18420
  static get style() { return pdsLinkCss(); }
18074
18421
  static get cmpMeta() { return {
@@ -18167,7 +18514,7 @@ class PdsLoader {
18167
18514
  'aria-live': 'polite',
18168
18515
  };
18169
18516
  this.hostKeeper.record(hostClass, {}, hostAttributes);
18170
- return (hAsync(Host, Object.assign({ key: '81f97b8a6adf4d2c0e5516aa2af9054e200629e1', class: hostClass }, hostAttributes), this.variant === 'spinner' && (hAsync("div", { key: '6e25806c83d6ddeb1141acdd083654867c6ff8a2', class: "pds-loader--spinner" }, hAsync("svg", { key: '4798f27facfcf57da8d408319527fc6083489107', style: this.getSvgStyle(), viewBox: "0 0 200 200", fill: "none", part: "loader-svg" }, hAsync("defs", { key: '0c64abfabc18ccd51ef41017e088f6ec10736d61' }, hAsync("linearGradient", { key: '3aa61edf6250dc827bf925938b69008860f96596', id: "spinner-secondHalf" }, hAsync("stop", { key: '2693d8a866492ef4ca98cbc4beb5f9f1a34a8b52', offset: "0%", "stop-opacity": "0", "stop-color": "currentColor" }), hAsync("stop", { key: 'ae229fdc73733e4d6ab15a6663e67b574bd49b40', offset: "100%", "stop-opacity": "0.5", "stop-color": "currentColor" })), hAsync("linearGradient", { key: '8ddbb46a1a387113d74a82cc4e3e0e9c7e12d573', id: "spinner-firstHalf" }, hAsync("stop", { key: 'd166a3c1ae37c3afa898351683b07f5c4d0ee906', offset: "0%", "stop-opacity": "1", "stop-color": "currentColor" }), hAsync("stop", { key: 'e4c9790bc9a645d752aa56c238fb8708310208b5', offset: "100%", "stop-opacity": "0.5", "stop-color": "currentColor" }))), hAsync("g", { key: '8b3897ff925d4207f9060e2fb69afa657b1b8fe3', class: "pds-loader__spinner-path" }, hAsync("path", { key: '603ef195d1fc64d2059d9fbfeb9b14e2bdb1cabe', stroke: "url(#spinner-secondHalf)", d: "M 4 100 A 96 96 0 0 1 196 100" }), hAsync("path", { key: 'a649ac9538248f5a22d48008377e18f4407efad9', stroke: "url(#spinner-firstHalf)", d: "M 196 100 A 96 96 0 0 1 4 100" }), hAsync("path", { key: '37f3772b61d1459959cc4d8c0b5c729dbd6953ff', stroke: "currentColor", "stroke-linecap": "round", d: "M 4 100 A 96 96 0 0 1 4 98" }))))), this.variant === 'typing' && (hAsync("div", { key: 'e510c2e6498a5542ce6e6573fdc03e8770121cd7', class: "pds-loader--typing" }, hAsync("span", { key: 'bbf4f5a328175f06b221d9abc73118505a09455d' }), hAsync("span", { key: '9a7e80b28e1455ef9d0c1bdb330a6425a3037709' }), hAsync("span", { key: 'f8aa1eb4f822a6d0e2a14a982bbe99866a97815b' }))), hAsync("div", { key: '3492189495798a2ea861d0dcb460f1b25d43d565', class: `pds-loader__label ${this.showLabel ? '' : 'pds-loader--hidden'}` }, hAsync("slot", { key: 'c1a19415b513a2a5f76a53d64b0ef5fbb4a5d100', name: "label" }, "Loading..."))));
18517
+ return (hAsync(Host, Object.assign({ key: 'c42c1aeec5c8db9a1065f35492734a8cb265f3ce', class: hostClass }, hostAttributes), this.variant === 'spinner' && (hAsync("div", { key: 'dc1b7943709d03e02467cca0817fb6a7ad5ed10a', class: "pds-loader--spinner" }, hAsync("svg", { key: 'db38e607541ac1eb91be87b2cd0240341c8fb51d', style: this.getSvgStyle(), viewBox: "0 0 200 200", fill: "none", part: "loader-svg" }, hAsync("defs", { key: 'd734ef70b0039758a25881c22bb3e6453ac40012' }, hAsync("linearGradient", { key: '697627f516c5f7b4cd5351dd39de231c0cb9e429', id: "spinner-secondHalf" }, hAsync("stop", { key: '03082c0ec354685eebf7d0132202d54b083d26df', offset: "0%", "stop-opacity": "0", "stop-color": "currentColor" }), hAsync("stop", { key: '181b661b36aeb44943e20dec513f7265a9487004', offset: "100%", "stop-opacity": "0.5", "stop-color": "currentColor" })), hAsync("linearGradient", { key: '67f6c51aefe99bcbfdb741290337364501fc4fcb', id: "spinner-firstHalf" }, hAsync("stop", { key: 'cb6adf27ecb06b42ba572a702153de960491b0b6', offset: "0%", "stop-opacity": "1", "stop-color": "currentColor" }), hAsync("stop", { key: 'aeebabfa1ac00391937388feefa120bd0bb4d26c', offset: "100%", "stop-opacity": "0.5", "stop-color": "currentColor" }))), hAsync("g", { key: 'f06ca75e4df171b6db426fce9bc34076cfee5bca', class: "pds-loader__spinner-path" }, hAsync("path", { key: 'a278b37de8f77a1000efecb62b89e3f751712a98', stroke: "url(#spinner-secondHalf)", d: "M 4 100 A 96 96 0 0 1 196 100" }), hAsync("path", { key: 'a035add4d01b60bcebf7625c8730d6a41ddf40ff', stroke: "url(#spinner-firstHalf)", d: "M 196 100 A 96 96 0 0 1 4 100" }), hAsync("path", { key: '1189c8299d33a2a6bb6a8345b60f22bf4ad9beee', stroke: "currentColor", "stroke-linecap": "round", d: "M 4 100 A 96 96 0 0 1 4 98" }))))), this.variant === 'typing' && (hAsync("div", { key: '39826fae20e8826d9c73cf57ba938583d610e1ea', class: "pds-loader--typing" }, hAsync("span", { key: '8f2b837c79548a1080710a7cc30c3be3a051e1dd' }), hAsync("span", { key: '8efb1193ef51f110950861767eccc3896e90b81e' }), hAsync("span", { key: '366f2d205adbb043691c253cff17d2d29d56a2cc' }))), hAsync("div", { key: 'aeaa4aa12863b34088e84fd2791c2ce32dc05248', class: `pds-loader__label ${this.showLabel ? '' : 'pds-loader--hidden'}` }, hAsync("slot", { key: '7a8ec45aed1cd6f9e60f4db2ec5376439fa41c81', name: "label" }, "Loading..."))));
18171
18518
  }
18172
18519
  get el() { return getElement(this); }
18173
18520
  static get watchers() { return {
@@ -18272,8 +18619,36 @@ function containsComposed(ancestor, node) {
18272
18619
  }
18273
18620
  return false;
18274
18621
  }
18622
+ /**
18623
+ * Every open modal, with the order it opened in, which ranks top-layer modals and the modals
18624
+ * inside them. Kept here rather than queried from the document, which can't see a modal inside
18625
+ * another component's shadow root.
18626
+ */
18627
+ const openModals = new Map();
18628
+ let openSequence = 0;
18629
+ /** Whether an open auto popover's panel sits in `root`, including inside shadow roots under it. */
18630
+ function hasOpenPopover(root) {
18631
+ if (root.querySelector('[data-pds-popover-open]'))
18632
+ return true;
18633
+ return Array.from(root.querySelectorAll('*')).some(el => !!el.shadowRoot && hasOpenPopover(el.shadowRoot));
18634
+ }
18635
+ /**
18636
+ * Whether `a` comes before `b` in the page. `compareDocumentPosition` is arbitrary across a shadow
18637
+ * boundary, so each side climbs to its host until both are in the same tree.
18638
+ */
18639
+ function precedesComposed(a, b) {
18640
+ // A document has no host, which ends each climb.
18641
+ for (let x = a; x; x = x.getRootNode().host) {
18642
+ for (let y = b; y; y = y.getRootNode().host) {
18643
+ if (x.getRootNode() === y.getRootNode()) {
18644
+ return !!(x.compareDocumentPosition(y) & Node.DOCUMENT_POSITION_FOLLOWING);
18645
+ }
18646
+ }
18647
+ }
18648
+ return false;
18649
+ }
18275
18650
  /** The focused element, followed down through shadow roots to the control that has focus. */
18276
- function deepActiveElement() {
18651
+ function deepActiveElement$1() {
18277
18652
  var _a;
18278
18653
  let active = document.activeElement;
18279
18654
  while ((_a = active === null || active === void 0 ? void 0 : active.shadowRoot) === null || _a === void 0 ? void 0 : _a.activeElement)
@@ -18290,7 +18665,8 @@ class PdsModal {
18290
18665
  this.pdsModalClose = createEvent(this, "pdsModalClose");
18291
18666
  this.focusableElements = [];
18292
18667
  /**
18293
- * Whether the modal can be dismissed by clicking the backdrop
18668
+ * Whether the modal can be dismissed by clicking the backdrop, pressing Escape, or the browser's
18669
+ * own close request (such as a back gesture)
18294
18670
  * @default true
18295
18671
  */
18296
18672
  this.backdropDismiss = true;
@@ -18338,19 +18714,33 @@ class PdsModal {
18338
18714
  * Stores the list of focusable elements in the modal
18339
18715
  */
18340
18716
  this.focusableElementsArray = [];
18717
+ // The browser's own close request (an Escape nothing prevented, a back gesture) would close the
18718
+ // dialog without updating `open`, so close it through hideModal() instead, or not at all.
18719
+ this.handleCancel = (e) => {
18720
+ e.preventDefault();
18721
+ if (!this.open)
18722
+ return;
18723
+ // The request reaches the top-layer dialog even when a disableTopLayer modal inside it is on
18724
+ // top; that one closes first, as it would on Escape.
18725
+ const top = this.innermostOpenModal();
18726
+ const target = (top && containsComposed(this.el, top) ? top : this.el);
18727
+ if (target.backdropDismiss)
18728
+ target.hideModal();
18729
+ };
18341
18730
  this.handleBackdropClick = (e) => {
18342
18731
  if (!this.backdropDismiss || !this.open)
18343
18732
  return;
18344
- if (e.target.classList.contains('pds-modal__backdrop')) {
18733
+ // This modal's own backdrop; a nested modal's backdrop handles its own clicks.
18734
+ if (e.target === this.modalRef) {
18345
18735
  e.stopPropagation();
18346
18736
  // Only close if this is the innermost modal
18347
- if (this.isInnermostModal()) {
18737
+ if (this.innermostOpenModal() === this.el) {
18348
18738
  this.hideModal();
18349
18739
  }
18350
18740
  }
18351
18741
  };
18352
18742
  this.handleKeyDown = (e) => {
18353
- var _a, _b, _c;
18743
+ var _a, _b, _c, _d;
18354
18744
  // If the modal is not open, don't handle any keyboard events
18355
18745
  if (!this.open)
18356
18746
  return;
@@ -18373,24 +18763,39 @@ class PdsModal {
18373
18763
  if (!('__pdsActiveElementAtEscape' in eventSnapshot)) {
18374
18764
  const activeAtDispatch = document.activeElement;
18375
18765
  eventSnapshot.__pdsActiveElementAtEscape = activeAtDispatch;
18766
+ // Followed into shadow roots: for a modal inside one, document.activeElement is only the host.
18767
+ eventSnapshot.__pdsDeepActiveElementAtEscape = deepActiveElement$1();
18376
18768
  const topLayerDialog = (_a = activeAtDispatch === null || activeAtDispatch === void 0 ? void 0 : activeAtDispatch.closest('dialog')) !== null && _a !== void 0 ? _a : null;
18377
18769
  eventSnapshot.__pdsTopLayerDialogAtEscape = topLayerDialog;
18378
18770
  eventSnapshot.__pdsTopLayerDialogWasModalAtEscape = !!(topLayerDialog && topLayerDialog.matches(':modal'));
18771
+ // A control that closed on this Escape (a combobox on its own element, a dropdown menu or
18772
+ // multiselect in document's capture phase) has prevented it before this bubble listener.
18773
+ // Read before any modal prevents it below.
18774
+ eventSnapshot.__pdsEscapeHandledInside = e.defaultPrevented;
18775
+ // Which modal is innermost is read once too: the inner one closing first would make its
18776
+ // outer modal the innermost by the time that modal's listener runs.
18777
+ eventSnapshot.__pdsInnermostModalAtEscape = this.innermostOpenModal();
18379
18778
  }
18779
+ if (eventSnapshot.__pdsEscapeHandledInside)
18780
+ return;
18380
18781
  // Leave Escape to a genuinely stacked-above overlay (disableTopLayer's
18381
18782
  // reason for existing) — not just to anything outside this modal.
18382
18783
  const active = eventSnapshot.__pdsActiveElementAtEscape;
18383
18784
  if (this.disableTopLayer &&
18384
18785
  active &&
18385
18786
  active !== document.body &&
18386
- !this.el.contains(active) &&
18387
- this.isStackedAboveOverlay(active, (_b = eventSnapshot.__pdsTopLayerDialogAtEscape) !== null && _b !== void 0 ? _b : null, (_c = eventSnapshot.__pdsTopLayerDialogWasModalAtEscape) !== null && _c !== void 0 ? _c : false)) {
18787
+ !containsComposed(this.el, (_b = eventSnapshot.__pdsDeepActiveElementAtEscape) !== null && _b !== void 0 ? _b : active) &&
18788
+ this.isStackedAboveOverlay(active, (_c = eventSnapshot.__pdsTopLayerDialogAtEscape) !== null && _c !== void 0 ? _c : null, (_d = eventSnapshot.__pdsTopLayerDialogWasModalAtEscape) !== null && _d !== void 0 ? _d : false)) {
18388
18789
  return;
18389
18790
  }
18791
+ // An open popover inside takes Escape from its own document listener, which runs after this
18792
+ // one, so leave the key for it. Its preventDefault() keeps the native dialog open.
18793
+ if (this.modalRef && hasOpenPopover(this.modalRef))
18794
+ return;
18390
18795
  // Always prevent native dialog close behavior
18391
18796
  e.preventDefault();
18392
18797
  // Only close if backdropDismiss is enabled and this is the innermost modal
18393
- if (this.backdropDismiss && this.isInnermostModal()) {
18798
+ if (this.backdropDismiss && eventSnapshot.__pdsInnermostModalAtEscape === this.el) {
18394
18799
  this.hideModal();
18395
18800
  }
18396
18801
  return;
@@ -18410,7 +18815,7 @@ class PdsModal {
18410
18815
  // Every open modal hears this keydown. When focus is in a modal dialog opened above this one,
18411
18816
  // that dialog traps Tab: this modal's list also holds its controls, so it would wrap first. A
18412
18817
  // non-modal dialog inside (a disableTopLayer modal) doesn't trap, so this one still does.
18413
- const activeElement = deepActiveElement();
18818
+ const activeElement = deepActiveElement$1();
18414
18819
  if (!activeElement || this.modalDialogAbove(activeElement))
18415
18820
  return;
18416
18821
  // Content can change while the modal is open (rows fetched in, sections shown), so the
@@ -18450,8 +18855,6 @@ class PdsModal {
18450
18855
  }
18451
18856
  componentDidLoad() {
18452
18857
  this.modalRef = this.el.querySelector('.pds-modal__backdrop');
18453
- // Add keyboard event listener
18454
- document.addEventListener('keydown', this.handleKeyDown);
18455
18858
  // @Watch('open') only fires on a later change, not the prop's initial
18456
18859
  // value — a modal mounted with `open` already true (static markup, or a
18457
18860
  // framework passing it on first render) would otherwise never call
@@ -18467,9 +18870,18 @@ class PdsModal {
18467
18870
  componentDidRender() {
18468
18871
  unwrapReconnectedContent(this.el.querySelector('.pds-modal'), 'dialog.pds-modal__backdrop', '.pds-modal');
18469
18872
  }
18873
+ // Here rather than in componentDidLoad, which runs once: a modal taken out of the page and put
18874
+ // back (a morph or a framework moving it) gets its keyboard handling, and its place among the
18875
+ // open modals, back too. Adding the same listener twice is a no-op.
18876
+ connectedCallback() {
18877
+ document.addEventListener('keydown', this.handleKeyDown);
18878
+ if (this.open && !openModals.has(this.el))
18879
+ openModals.set(this.el, ++openSequence);
18880
+ }
18470
18881
  disconnectedCallback() {
18471
18882
  // Clean up event listener
18472
18883
  document.removeEventListener('keydown', this.handleKeyDown);
18884
+ openModals.delete(this.el);
18473
18885
  }
18474
18886
  handleOpenChange(newValue) {
18475
18887
  if (newValue) {
@@ -18534,6 +18946,9 @@ class PdsModal {
18534
18946
  this.modalRef.showModal();
18535
18947
  }
18536
18948
  this.open = true;
18949
+ // Showing an open modal again doesn't move it above one opened after it.
18950
+ if (!openModals.has(this.el))
18951
+ openModals.set(this.el, ++openSequence);
18537
18952
  // Update focusable elements and set initial focus
18538
18953
  // Using a longer timeout to ensure all components are fully rendered
18539
18954
  setTimeout(() => {
@@ -18596,6 +19011,7 @@ class PdsModal {
18596
19011
  const focusAlreadyMovedElsewhere = activeElement !== null && activeElement !== document.body && !this.modalRef.contains(activeElement);
18597
19012
  this.modalRef.close();
18598
19013
  this.open = false;
19014
+ openModals.delete(this.el);
18599
19015
  // Restore focus to the element that was focused before the modal was opened
18600
19016
  if (!focusAlreadyMovedElsewhere &&
18601
19017
  this.previousActiveElement &&
@@ -18614,7 +19030,9 @@ class PdsModal {
18614
19030
  */
18615
19031
  getBackdropZIndex(modal) {
18616
19032
  const backdrop = modal.querySelector('.pds-modal__backdrop');
18617
- return backdrop ? parseInt(getComputedStyle(backdrop).zIndex, 10) : -1;
19033
+ // `auto` (no z-index token loaded) parses to NaN, which no comparison can rank.
19034
+ const zIndex = backdrop ? parseInt(getComputedStyle(backdrop).zIndex, 10) : -1;
19035
+ return Number.isNaN(zIndex) ? 0 : zIndex;
18618
19036
  }
18619
19037
  /**
18620
19038
  * Whether `active` sits inside a surface actually stacked above this modal.
@@ -18641,7 +19059,8 @@ class PdsModal {
18641
19059
  * lose that evidence depending on listener order.
18642
19060
  */
18643
19061
  isStackedAboveOverlay(active, topLayerDialog, topLayerDialogWasModal) {
18644
- if (topLayerDialog && topLayerDialog !== this.modalRef && topLayerDialogWasModal) {
19062
+ // A top-layer dialog this modal sits inside is underneath it, not an overlay above.
19063
+ if (topLayerDialog && topLayerDialog !== this.modalRef && topLayerDialogWasModal && !containsComposed(topLayerDialog, this.el)) {
18645
19064
  return true;
18646
19065
  }
18647
19066
  const ownZIndex = this.getBackdropZIndex(this.el);
@@ -18657,24 +19076,37 @@ class PdsModal {
18657
19076
  return false;
18658
19077
  }
18659
19078
  /**
18660
- * Checks if this modal is the innermost (highest z-index) modal
19079
+ * The open modal that takes Escape or a backdrop click, among those with no other open modal
19080
+ * inside them (a nested modal's backdrop can share its outer modal's z-index). A top-layer dialog
19081
+ * (or a modal inside one) paints above anything outside it, and within the top layer the last
19082
+ * opened is on top. Modals in the same layer (the page, or one top-layer dialog) then rank by
19083
+ * the highest backdrop, then the one later in the page.
18661
19084
  */
18662
- isInnermostModal() {
18663
- // Find all open modals
18664
- const openModals = Array.from(document.querySelectorAll('pds-modal')).filter(modal => modal.open);
18665
- if (openModals.length === 0)
18666
- return false;
18667
- // Get this modal's backdrop element
18668
- const thisBackdrop = this.el.querySelector('.pds-modal__backdrop');
18669
- if (!thisBackdrop)
18670
- return false;
18671
- // Get computed z-index of all open modal backdrops
18672
- const modalZIndexes = openModals.map(modal => this.getBackdropZIndex(modal));
18673
- // Get the highest z-index
18674
- const maxZIndex = Math.max(...modalZIndexes);
18675
- // Check if this modal's backdrop has the highest z-index
18676
- const thisZIndex = this.getBackdropZIndex(this.el);
18677
- return thisZIndex === maxZIndex;
19085
+ innermostOpenModal() {
19086
+ const open = Array.from(openModals.keys()).filter(modal => modal.isConnected);
19087
+ const innermost = open.filter(modal => !open.some(other => other !== modal && containsComposed(modal, other)));
19088
+ const byDocumentOrder = [...innermost].sort((a, b) => (precedesComposed(a, b) ? -1 : 1));
19089
+ // A modal inside a top-layer dialog paints in that dialog's place in the top layer, even when it
19090
+ // isn't in the top layer itself (disableTopLayer), so that dialog's open order ranks it first.
19091
+ const rank = (modal) => {
19092
+ var _a;
19093
+ const backdrop = modal.querySelector('.pds-modal__backdrop');
19094
+ const topLayerDialog = backdrop ? closest$1('dialog:modal', backdrop) : null;
19095
+ const topLayerModal = topLayerDialog === null || topLayerDialog === void 0 ? void 0 : topLayerDialog.closest('pds-modal');
19096
+ const layer = topLayerDialog ? ((_a = (topLayerModal && openModals.get(topLayerModal))) !== null && _a !== void 0 ? _a : 0) : 0;
19097
+ return [topLayerDialog ? 1 : 0, layer, this.getBackdropZIndex(modal), byDocumentOrder.indexOf(modal)];
19098
+ };
19099
+ let top = null;
19100
+ let topRank = [-1, -1, -1, -1];
19101
+ for (const modal of innermost) {
19102
+ const modalRank = rank(modal);
19103
+ const above = modalRank.findIndex((value, i) => value !== topRank[i]);
19104
+ if (above >= 0 && modalRank[above] > topRank[above]) {
19105
+ top = modal;
19106
+ topRank = modalRank;
19107
+ }
19108
+ }
19109
+ return top;
18678
19110
  }
18679
19111
  /** Whether a modal dialog other than this one sits between the focused element and this modal. */
18680
19112
  modalDialogAbove(active) {
@@ -18714,14 +19146,14 @@ class PdsModal {
18714
19146
  }
18715
19147
  render() {
18716
19148
  const [sizeClass = 'md', customSize] = this.resolveSize();
18717
- return (hAsync("dialog", { key: 'b6714c7e77d80bf2370f2170ffce029abe147d81', class: {
19149
+ return (hAsync("dialog", { key: '0633d4e8a7cb81f2f9280e754564960a00a4d60b', class: {
18718
19150
  'pds-modal__backdrop': true,
18719
19151
  'open': this.open
18720
- }, "aria-modal": this.disableTopLayer ? 'false' : 'true', "aria-labelledby": `${this.componentId}-heading`, onClick: this.handleBackdropClick }, hAsync("div", { key: '8c3319f53dd8c79c9e952785277e9e82e28b651e', class: {
19152
+ }, "aria-modal": this.disableTopLayer ? 'false' : 'true', "aria-labelledby": `${this.componentId}-heading`, onClick: this.handleBackdropClick, onCancel: this.handleCancel }, hAsync("div", { key: '466f8a3476cf066817554f47ec7d3a0e3ab10b89', class: {
18721
19153
  'pds-modal': true,
18722
19154
  [`pds-modal--${sizeClass}`]: true,
18723
19155
  'pds-modal--scrollable': this.scrollable
18724
- }, style: customSize !== undefined ? { '--pds-modal-max-width': customSize } : undefined, part: "modal" }, hAsync("slot", { key: '8c6f9cc1a20b515659344ad041512de52761800d' }))));
19156
+ }, style: customSize !== undefined ? { '--pds-modal-max-width': customSize } : undefined, part: "modal" }, hAsync("slot", { key: '01ca45c96540416216a1082bad52b137720f0f4d' }))));
18725
19157
  }
18726
19158
  get el() { return getElement(this); }
18727
19159
  static get watchers() { return {
@@ -18938,10 +19370,10 @@ class PdsModalContent {
18938
19370
  render() {
18939
19371
  // Only apply max-height style if it's not 'none'
18940
19372
  const styleObj = this.contentMaxHeight !== 'none' ? { maxHeight: this.contentMaxHeight } : {};
18941
- return (hAsync(Host, { key: 'f66dbdd08d6af3f87b0a6e8f30e1948b2f674e34' }, hAsync("div", { key: 'ac0469cbfe48002d5bc7f401e0dc30926cfd4421', class: {
19373
+ return (hAsync(Host, { key: 'd41d5632eb6a2dafe921546af60f835d3545cc4f' }, hAsync("div", { key: '741ac9f28149039ecf5051142a939ab62ef26a87', class: {
18942
19374
  'pds-modal-content': true,
18943
19375
  [`pds-modal-content--border-${this.border}`]: true
18944
- }, style: styleObj, tabindex: "-1" }, hAsync("slot", { key: '26a8a45ab4dcd0349da68304fa3cacc64603208a' }))));
19376
+ }, style: styleObj, tabindex: "-1" }, hAsync("slot", { key: '090a52e9425d4df61c2d8216cc19f0925babdffe' }))));
18945
19377
  }
18946
19378
  get el() { return getElement(this); }
18947
19379
  static get style() { return pdsModalContentCss(); }
@@ -18972,7 +19404,7 @@ class PdsModalFooter {
18972
19404
  unwrapReconnectedContent(this.el.querySelector('.pds-modal__footer'), '.pds-modal__footer');
18973
19405
  }
18974
19406
  render() {
18975
- return (hAsync("footer", { key: '1148892c2d6b9a461f6c04a670fceda76c1be53a', class: "pds-modal__footer" }, hAsync("slot", { key: 'ccd754674c82c415f8c056c9dda6327df35dbd03' })));
19407
+ return (hAsync("footer", { key: '030153b84f1ea1cb133c9ccec3ad86583995974f', class: "pds-modal__footer" }, hAsync("slot", { key: '3a479e7047f3e845a65c37d60539648c8ff78602' })));
18976
19408
  }
18977
19409
  get el() { return getElement(this); }
18978
19410
  static get style() { return pdsModalFooterCss(); }
@@ -19000,7 +19432,7 @@ class PdsModalHeader {
19000
19432
  unwrapReconnectedContent(this.el.querySelector('.pds-modal__header'), '.pds-modal__header');
19001
19433
  }
19002
19434
  render() {
19003
- return (hAsync("header", { key: '030153b84f1ea1cb133c9ccec3ad86583995974f', class: "pds-modal__header" }, hAsync("slot", { key: '3a479e7047f3e845a65c37d60539648c8ff78602' })));
19435
+ return (hAsync("header", { key: 'ee3ac5fb9b00a943aa86c3434ea07291b74d776c', class: "pds-modal__header" }, hAsync("slot", { key: '0b0f7ff257635723099c536648a826be8dcc05e7' })));
19004
19436
  }
19005
19437
  get el() { return getElement(this); }
19006
19438
  static get style() { return pdsModalHeaderCss(); }
@@ -19554,11 +19986,12 @@ class PdsMultiselect {
19554
19986
  }
19555
19987
  /**
19556
19988
  * Handle global keyboard events for accessibility.
19557
- * Closes dropdown on Escape key press regardless of focus location.
19989
+ * Closes dropdown on Escape key press regardless of focus location. Taken in document's capture
19990
+ * phase, before a modal around the multiselect hears it on document and closes too.
19558
19991
  */
19559
19992
  handleWindowKeyDown(event) {
19560
19993
  var _a;
19561
- if (!this.isOpen)
19994
+ if (!this.isOpen || event.defaultPrevented)
19562
19995
  return;
19563
19996
  if (event.key === 'Escape') {
19564
19997
  event.preventDefault();
@@ -20248,10 +20681,10 @@ class PdsMultiselect {
20248
20681
  }
20249
20682
  render() {
20250
20683
  const hasSelections = this.selectedItems.length > 0;
20251
- return (hAsync(Host, { key: '295354c218d03a512ee87a9f19d2267a59731eb1', "aria-disabled": this.disabled ? 'true' : null }, hAsync("div", { key: '8696c02fad869239fa85dcec7f92a3efb402c963', class: "pds-multiselect", onFocusout: this.handleContainerFocusOut }, this.label && (hAsync("label", { key: '2a9cc565c5dbcf78305eb65e94d795669fb0f93b', id: `${this.componentId}-label`, htmlFor: this.componentId, class: {
20684
+ return (hAsync(Host, { key: 'fcc35a82c16d5cf35a49ce997f19618104f9cc45', "aria-disabled": this.disabled ? 'true' : null }, hAsync("div", { key: '72d1fdf759d9173f54bac80ec50aff651fd2b357', class: "pds-multiselect", onFocusout: this.handleContainerFocusOut }, this.label && (hAsync("label", { key: 'e28f02c2beb23dc2c0deefadbd0645b20d938d91', id: `${this.componentId}-label`, htmlFor: this.componentId, class: {
20252
20685
  'pds-multiselect__label': true,
20253
20686
  'visually-hidden': this.hideLabel,
20254
- } }, this.label)), hAsync("div", { key: '9358ebffb50e74fe4ceb9ca1c13cf819cc3e96e6', class: "pds-multiselect__wrapper", ref: el => (this.containerEl = el), style: { width: this.triggerWidth } }, this.slottedTriggerEl ? (hAsync("slot", { name: "trigger" })) : this.selectedDisplay === 'pill' && this.pillPosition === 'inline' ? (hAsync("div", { ref: el => (this.pillInlineTriggerEl = el || undefined), part: "trigger", class: {
20687
+ } }, this.label)), hAsync("div", { key: '06539bf2c4b8da2889505a9f042d5cd6721b1853', class: "pds-multiselect__wrapper", ref: el => (this.containerEl = el), style: { width: this.triggerWidth } }, this.slottedTriggerEl ? (hAsync("slot", { name: "trigger" })) : this.selectedDisplay === 'pill' && this.pillPosition === 'inline' ? (hAsync("div", { ref: el => (this.pillInlineTriggerEl = el || undefined), part: "trigger", class: {
20255
20688
  'pds-multiselect__trigger': true,
20256
20689
  'pds-multiselect__trigger--open': this.isOpen,
20257
20690
  'pds-multiselect__trigger--disabled': this.disabled,
@@ -20267,7 +20700,7 @@ class PdsMultiselect {
20267
20700
  }, id: this.componentId, disabled: this.disabled, "aria-required": this.required ? 'true' : undefined, "aria-expanded": this.isOpen ? 'true' : 'false', "aria-haspopup": "listbox", "aria-describedby": assignDescription(this.componentId, this.invalid || !!this.errorMessage, this.helperMessage, this.errorMessage), "aria-invalid": this.invalid || !!this.errorMessage ? 'true' : undefined, onClick: this.handleTriggerClick, onKeyDown: this.handleTriggerKeyDown }, hAsync("span", { class: {
20268
20701
  'pds-multiselect__trigger-text': true,
20269
20702
  'pds-multiselect__trigger-text--placeholder': !hasSelections || (this.selectedDisplay === 'pill' && this.pillPosition === 'below'),
20270
- } }, this.getTriggerText()), hAsync("pds-icon", { "aria-hidden": "true", class: "pds-multiselect__icon", icon: enlarge }))), this.renderDropdown()), this.selectedDisplay === 'pill' && this.pillPosition === 'below' && this.renderBelowPills(), hAsync("span", { key: '722da251199792366dc72b6c7f016e24ae807b30', class: "visually-hidden", "aria-live": "polite", "aria-atomic": "true" }, this.removalAnnouncement), this.helperMessage && !(this.errorMessage && this.errorMessage.length > 0) && (hAsync("p", { key: '7b4da9b2e04f53f3e8f245c119135f3b664897ec', class: "pds-multiselect__helper", id: messageId(this.componentId, 'helper') }, this.helperMessage)), this.errorMessage && (hAsync("p", { key: '95a152f6a350eee2f67dbab2930f19e583ca3b85', class: "pds-multiselect__error", id: messageId(this.componentId, 'error') }, hAsync("pds-icon", { key: '7b9cded907054757a6f054d0d325811a2199e496', icon: danger, size: "small" }), this.errorMessage)), hAsync("div", { key: '8b07974c8e2d838d76c17c3a52ba4282fb101968', style: { display: 'none' } }, hAsync("slot", { key: '0a34d582bc4dd780072f00ac13bfdce7e297191e' })))));
20703
+ } }, this.getTriggerText()), hAsync("pds-icon", { "aria-hidden": "true", class: "pds-multiselect__icon", icon: enlarge }))), this.renderDropdown()), this.selectedDisplay === 'pill' && this.pillPosition === 'below' && this.renderBelowPills(), hAsync("span", { key: '3364fc00bc744fcd599436a9cb6dc563564d89d9', class: "visually-hidden", "aria-live": "polite", "aria-atomic": "true" }, this.removalAnnouncement), this.helperMessage && !(this.errorMessage && this.errorMessage.length > 0) && (hAsync("p", { key: 'bf712c65b9acb66e2998a43686fed408fc1ff48a', class: "pds-multiselect__helper", id: messageId(this.componentId, 'helper') }, this.helperMessage)), this.errorMessage && (hAsync("p", { key: 'b485db6c2c3ae312cce2b90db60e850ad6dfdcf5', class: "pds-multiselect__error", id: messageId(this.componentId, 'error') }, hAsync("pds-icon", { key: '20daf861cf9584f33f5a9574e9581acc487e7dfe', icon: danger, size: "small" }), this.errorMessage)), hAsync("div", { key: '018d333254771695a8c191f1cea40af6e78427a2', style: { display: 'none' } }, hAsync("slot", { key: '2ef4a01fbe5d294a9ead5cc1183c28341834539b' })))));
20271
20704
  }
20272
20705
  static get formAssociated() { return true; }
20273
20706
  get el() { return getElement(this); }
@@ -20357,14 +20790,66 @@ class PdsMultiselect {
20357
20790
  "clear": [64],
20358
20791
  "refreshOptions": [64]
20359
20792
  },
20360
- "$listeners$": [[8, "keydown", "handleWindowKeyDown"]],
20793
+ "$listeners$": [[6, "keydown", "handleWindowKeyDown"]],
20361
20794
  "$lazyBundleId$": "-",
20362
20795
  "$attrsToReflect$": []
20363
20796
  }; }
20364
20797
  }
20365
20798
 
20799
+ /**
20800
+ * Escapes a string so it's safe to interpolate into a CSS identifier (an id selector like `#${id}`)
20801
+ * or into CSS text (a stylesheet rule referencing that id). Equivalent to the native `CSS.escape`,
20802
+ * reimplemented because Stencil's unit-test DOM (`newSpecPage`'s mock-doc) doesn't provide it.
20803
+ * @param value - The string to escape, e.g. a consumer-supplied id
20804
+ */
20805
+ const cssEscape = (value) => {
20806
+ const string = String(value);
20807
+ const length = string.length;
20808
+ const firstCodeUnit = string.charCodeAt(0);
20809
+ let result = '';
20810
+ for (let index = 0; index < length; index++) {
20811
+ const codeUnit = string.charCodeAt(index);
20812
+ if (codeUnit === 0x0000) {
20813
+ result += '�';
20814
+ continue;
20815
+ }
20816
+ if ((codeUnit >= 0x0001 && codeUnit <= 0x001f) ||
20817
+ codeUnit === 0x007f ||
20818
+ (index === 0 && codeUnit >= 0x0030 && codeUnit <= 0x0039) ||
20819
+ (index === 1 && codeUnit >= 0x0030 && codeUnit <= 0x0039 && firstCodeUnit === 0x002d)) {
20820
+ result += `\\${codeUnit.toString(16)} `;
20821
+ continue;
20822
+ }
20823
+ if (index === 0 && length === 1 && codeUnit === 0x002d) {
20824
+ result += `\\${string.charAt(index)}`;
20825
+ continue;
20826
+ }
20827
+ if (codeUnit >= 0x0080 ||
20828
+ codeUnit === 0x002d ||
20829
+ codeUnit === 0x005f ||
20830
+ (codeUnit >= 0x0030 && codeUnit <= 0x0039) ||
20831
+ (codeUnit >= 0x0041 && codeUnit <= 0x005a) ||
20832
+ (codeUnit >= 0x0061 && codeUnit <= 0x007a)) {
20833
+ result += string.charAt(index);
20834
+ continue;
20835
+ }
20836
+ result += `\\${string.charAt(index)}`;
20837
+ }
20838
+ return result;
20839
+ };
20840
+
20366
20841
  const pdsPopoverCss = () => `:host{--sizing-max-width-default:352px;display:inline-block}:host .pds-popover__trigger-wrapper{display:inline-block}:host .pds-popover__content-slot-wrapper{display:none}`;
20367
20842
 
20843
+ /** Open auto popovers, in the order they opened: Escape goes to the last one it applies to. */
20844
+ const openAutoPopovers = [];
20845
+ /** The focused element, followed down through shadow roots to the control that has focus. */
20846
+ function deepActiveElement() {
20847
+ var _a;
20848
+ let active = document.activeElement;
20849
+ while ((_a = active === null || active === void 0 ? void 0 : active.shadowRoot) === null || _a === void 0 ? void 0 : _a.activeElement)
20850
+ active = active.shadowRoot.activeElement;
20851
+ return active;
20852
+ }
20368
20853
  /**
20369
20854
  * @slot trigger - The trigger element for the popover
20370
20855
  * @slot (default) - The content to display inside the popover
@@ -20400,7 +20885,7 @@ class PdsPopover {
20400
20885
  */
20401
20886
  this.triggerObserver = null;
20402
20887
  /**
20403
- * Portal element rendered in document.body
20888
+ * Portal element: in document.body, or in the open dialog the popover is in
20404
20889
  */
20405
20890
  this.portalEl = null;
20406
20891
  /**
@@ -20496,6 +20981,26 @@ class PdsPopover {
20496
20981
  break;
20497
20982
  }
20498
20983
  };
20984
+ /** The focus style copied into a shadow root the panel opened in, which `document.head` can't reach. */
20985
+ this.shadowFocusStyle = null;
20986
+ /** The dialog the panel was opened in, closed along with it. */
20987
+ this.watchedDialog = null;
20988
+ this.onDialogClose = () => {
20989
+ this.hide();
20990
+ };
20991
+ /**
20992
+ * Inside a dialog, the panel can sit in a form that wraps the dialog, which a body portal never
20993
+ * did. A submit from the panel (a button in it, or Enter in a field in it) is stopped, so the
20994
+ * panel behaves as it does in the body.
20995
+ */
20996
+ this.handleSubmitFromPanel = (event) => {
20997
+ if (!this.portalEl || !containsComposed$1(event.target, this.portalEl))
20998
+ return;
20999
+ if (containsComposed$1(this.portalEl, event.submitter) || containsComposed$1(this.portalEl, deepActiveElement())) {
21000
+ event.preventDefault();
21001
+ event.stopPropagation();
21002
+ }
21003
+ };
20499
21004
  }
20500
21005
  restorePlacementDefault(newValue) {
20501
21006
  this.placement = restoreReflectedDefault(this.el, 'placement', newValue, 'right');
@@ -20532,7 +21037,8 @@ class PdsPopover {
20532
21037
  this.triggerObserver = null;
20533
21038
  if (this.triggerEl == null || typeof MutationObserver === 'undefined')
20534
21039
  return;
20535
- this.triggerObserver = new MutationObserver(() => this.linkTriggerToPortal());
21040
+ // Capped against a script that keeps undoing it; opening and closing still write it directly.
21041
+ this.triggerObserver = new MutationObserver(limitRestores(() => this.linkTriggerToPortal(), 'pds-popover: stopped restoring its trigger ARIA, as another script keeps changing it. It may be wrong until the popover opens or closes.', this.triggerEl));
20536
21042
  this.triggerObserver.observe(this.triggerEl, {
20537
21043
  attributes: true,
20538
21044
  attributeFilter: ['aria-expanded', 'aria-controls'],
@@ -20542,9 +21048,9 @@ class PdsPopover {
20542
21048
  // This mirrors the native Popover API's accessibility behavior
20543
21049
  linkTriggerToPortal() {
20544
21050
  if (this.triggerEl == null || this.portalEl == null)
20545
- return;
21051
+ return false;
20546
21052
  // Skips values already in place, so the trigger observer's own callback doesn't loop.
20547
- setAttributesIfChanged(this.triggerEl, { 'aria-expanded': String(this.active), 'aria-controls': this.portalEl.id });
21053
+ return setAttributesIfChanged(this.triggerEl, { 'aria-expanded': String(this.active), 'aria-controls': this.portalEl.id });
20548
21054
  }
20549
21055
  // componentDidLoad doesn't run again when a popover comes back, so rebuild whatever
20550
21056
  // disconnectedCallback tore down. Each step is a no-op when nothing was.
@@ -20557,19 +21063,23 @@ class PdsPopover {
20557
21063
  (_a = this.triggerEl) === null || _a === void 0 ? void 0 : _a.addEventListener('click', this.handleTriggerClick);
20558
21064
  this.observeTrigger();
20559
21065
  this.linkTriggerToPortal();
20560
- // Still open after a move: the trigger moved, so the portal follows it.
21066
+ // Still open after a move: the trigger moved, so the portal follows it, into the dialog it
21067
+ // is in now, if any.
20561
21068
  if (this.active) {
21069
+ this.placePortal();
20562
21070
  requestAnimationFrame(() => this.handlePopoverPositioning());
20563
21071
  }
20564
21072
  }
20565
21073
  disconnectedCallback() {
20566
21074
  var _a;
20567
21075
  // Moved in one operation (a DOM morph, or a framework reparenting it), the popover is
20568
- // already back in the page. Its portal is in <body>, untouched, so it stays open, with focus
20569
- // where it was.
21076
+ // already back in the page. Its portal is outside the popover, so it stays open, with focus
21077
+ // where it was; connectedCallback moves it to follow the popover.
20570
21078
  if (this.el.isConnected)
20571
21079
  return;
20572
21080
  this.isComponentMounted = false;
21081
+ this.unwatchDialogClose();
21082
+ this.forgetOpen();
20573
21083
  // Open, the content sits in the portal; put it back before the portal goes. Only listeners on
20574
21084
  // the popover itself hear the close event now, but those are the ones mirroring its state.
20575
21085
  if (this.active) {
@@ -20590,6 +21100,7 @@ class PdsPopover {
20590
21100
  // Clean up all event listeners
20591
21101
  this.removeLightDismissListeners();
20592
21102
  this.removeScrollAndResizeListeners();
21103
+ document.removeEventListener('submit', this.handleSubmitFromPanel, true);
20593
21104
  // Clear any pending debounce timers
20594
21105
  this.clearDebounceTimers();
20595
21106
  // Remove portal from DOM
@@ -20634,9 +21145,6 @@ class PdsPopover {
20634
21145
  else {
20635
21146
  this.portalEl.id = `${this.componentId}-portal`;
20636
21147
  }
20637
- // Add accessibility attributes for screen readers
20638
- // Note: Native Popover API doesn't add a specific role, keeping semantic HTML
20639
- this.portalEl.setAttribute('aria-modal', 'false'); // Not a modal, can interact with rest of page
20640
21148
  // Append to body
20641
21149
  document.body.appendChild(this.portalEl);
20642
21150
  // Add global focus styles to match Pine design system
@@ -20651,22 +21159,25 @@ class PdsPopover {
20651
21159
  if (!this.portalEl)
20652
21160
  return;
20653
21161
  const portalId = this.portalEl.id;
21162
+ // componentId comes from the consumer, so it can carry characters cssEscape needs to
21163
+ // neutralize before the id is used as a selector or interpolated into stylesheet text.
21164
+ const escapedPortalId = cssEscape(portalId);
20654
21165
  // Check if style element already exists
20655
- const existingStyle = document.querySelector(`style[data-pds-popover-focus="${portalId}"]`);
21166
+ const existingStyle = document.querySelector(`style[data-pds-popover-focus="${escapedPortalId}"]`);
20656
21167
  if (existingStyle)
20657
21168
  return;
20658
21169
  // Create style element with Pine's focus ring styles and dark mode border
20659
21170
  const styleEl = document.createElement('style');
20660
21171
  styleEl.setAttribute('data-pds-popover-focus', portalId);
20661
21172
  styleEl.textContent = `
20662
- #${portalId}:focus {
21173
+ #${escapedPortalId}:focus {
20663
21174
  outline: var(--pine-outline-focus, 2px solid var(--pine-color-focus-ring, #6366f1)) !important;
20664
21175
  outline-offset: var(--pine-border-width, 1px);
20665
21176
  }
20666
- #${portalId}:focus:not(:focus-visible) {
21177
+ #${escapedPortalId}:focus:not(:focus-visible) {
20667
21178
  outline: none;
20668
21179
  }
20669
- [data-theme="dark"] #${portalId} {
21180
+ [data-theme="dark"] #${escapedPortalId} {
20670
21181
  border: var(--pine-border);
20671
21182
  }
20672
21183
  `;
@@ -20717,7 +21228,27 @@ class PdsPopover {
20717
21228
  // Clear tracking array
20718
21229
  this.movedNodes = [];
20719
21230
  }
21231
+ copyFocusStylesInto(root) {
21232
+ var _a, _b, _c;
21233
+ // Outside a shadow root the document's own style applies, so drop a copy left in one.
21234
+ if (!(root instanceof ShadowRoot)) {
21235
+ (_a = this.shadowFocusStyle) === null || _a === void 0 ? void 0 : _a.remove();
21236
+ this.shadowFocusStyle = null;
21237
+ return;
21238
+ }
21239
+ if (((_b = this.shadowFocusStyle) === null || _b === void 0 ? void 0 : _b.parentNode) === root || !this.portalEl)
21240
+ return;
21241
+ const source = document.querySelector(`style[data-pds-popover-focus="${cssEscape(this.portalEl.id)}"]`);
21242
+ if (!source)
21243
+ return;
21244
+ (_c = this.shadowFocusStyle) === null || _c === void 0 ? void 0 : _c.remove();
21245
+ this.shadowFocusStyle = source.cloneNode(true);
21246
+ root.appendChild(this.shadowFocusStyle);
21247
+ }
20720
21248
  removePortal() {
21249
+ var _a;
21250
+ (_a = this.shadowFocusStyle) === null || _a === void 0 ? void 0 : _a.remove();
21251
+ this.shadowFocusStyle = null;
20721
21252
  if (this.portalEl) {
20722
21253
  // Remove the portal element from DOM
20723
21254
  if (this.portalEl.parentNode) {
@@ -20725,7 +21256,7 @@ class PdsPopover {
20725
21256
  }
20726
21257
  // Remove the associated focus style element
20727
21258
  const portalId = this.portalEl.id;
20728
- const styleEl = document.querySelector(`style[data-pds-popover-focus="${portalId}"]`);
21259
+ const styleEl = document.querySelector(`style[data-pds-popover-focus="${cssEscape(portalId)}"]`);
20729
21260
  if (styleEl && styleEl.parentNode) {
20730
21261
  styleEl.parentNode.removeChild(styleEl);
20731
21262
  }
@@ -20742,9 +21273,13 @@ class PdsPopover {
20742
21273
  // Record open timestamp to prevent immediate close from opening click
20743
21274
  this.openTimestamp = Date.now();
20744
21275
  this.linkTriggerToPortal();
21276
+ this.placePortal();
20745
21277
  // Update portal content with latest slot content
20746
21278
  this.updatePortalContent();
20747
- // Show portal
21279
+ // Show portal. The attribute tells a modal around it that this popover takes Escape first; only
21280
+ // an auto popover listens for Escape.
21281
+ if (this.popoverType === 'auto')
21282
+ this.portalEl.setAttribute('data-pds-popover-open', '');
20748
21283
  this.portalEl.style.display = 'block';
20749
21284
  this.portalEl.style.opacity = '1';
20750
21285
  this.portalEl.style.visibility = 'visible';
@@ -20756,8 +21291,10 @@ class PdsPopover {
20756
21291
  });
20757
21292
  // Add scroll and resize listeners for repositioning (always)
20758
21293
  this.addScrollAndResizeListeners();
21294
+ document.addEventListener('submit', this.handleSubmitFromPanel, true);
20759
21295
  // Add document listeners for light dismiss and escape key (auto type only)
20760
21296
  if (this.popoverType === 'auto') {
21297
+ openAutoPopovers.push(this);
20761
21298
  this.addLightDismissListeners();
20762
21299
  }
20763
21300
  // Emit open event
@@ -20773,12 +21310,16 @@ class PdsPopover {
20773
21310
  if (!this.active || !this.portalEl)
20774
21311
  return;
20775
21312
  this.active = false;
20776
- // Restoring the content drops its focus to the body, so check where focus is first.
20777
- const focusWasInside = this.portalEl.contains(document.activeElement);
21313
+ this.unwatchDialogClose();
21314
+ // Restoring the content drops its focus to the body, so check where focus is first. In a
21315
+ // shadow root, document.activeElement is only its host.
21316
+ const focusWasInside = containsComposed$1(this.portalEl, deepActiveElement());
20778
21317
  this.linkTriggerToPortal();
20779
21318
  // Restore content back to original slot positions
20780
21319
  this.restorePortalContent();
20781
- // Hide portal
21320
+ // Hide portal. The dark-mode border set in a shadow root is worked out again on the next open.
21321
+ this.portalEl.style.border = '';
21322
+ this.portalEl.removeAttribute('data-pds-popover-open');
20782
21323
  this.portalEl.style.display = 'none';
20783
21324
  this.portalEl.style.opacity = '0';
20784
21325
  this.portalEl.style.visibility = 'hidden';
@@ -20788,8 +21329,10 @@ class PdsPopover {
20788
21329
  this.returnFocusToTrigger();
20789
21330
  }
20790
21331
  // Remove all listeners
21332
+ this.forgetOpen();
20791
21333
  this.removeLightDismissListeners();
20792
21334
  this.removeScrollAndResizeListeners();
21335
+ document.removeEventListener('submit', this.handleSubmitFromPanel, true);
20793
21336
  // Clear any pending timers
20794
21337
  this.clearDebounceTimers();
20795
21338
  // Emit close event
@@ -20809,6 +21352,59 @@ class PdsPopover {
20809
21352
  this.show();
20810
21353
  }
20811
21354
  }
21355
+ /**
21356
+ * Puts the panel where it shows above everything around the popover. In an open dialog, it goes
21357
+ * inside it: a modal dialog sits in the top layer above the body and makes the rest of the page
21358
+ * inert, and a non-modal one sits above it by z-index. Right after the popover, it's next in the
21359
+ * Tab order. In another component's slot, though, it would have no slot to render in, and in a
21360
+ * form its buttons would submit it, so there it goes at the end of the dialog.
21361
+ */
21362
+ placePortal() {
21363
+ var _a, _b;
21364
+ if (!this.portalEl)
21365
+ return;
21366
+ const dialog = closest$1('dialog[open]', this.el);
21367
+ if (!dialog) {
21368
+ this.unwatchDialogClose();
21369
+ this.portalEl.style.border = '';
21370
+ if (this.portalEl.parentElement !== document.body)
21371
+ document.body.appendChild(this.portalEl);
21372
+ this.copyFocusStylesInto(document);
21373
+ return;
21374
+ }
21375
+ const form = closest$1('form', this.el);
21376
+ const besidePopover = !((_a = this.el.parentElement) === null || _a === void 0 ? void 0 : _a.shadowRoot) && !(form && containsComposed$1(dialog, form));
21377
+ if (besidePopover) {
21378
+ if (this.el.nextElementSibling !== this.portalEl)
21379
+ (_b = this.el.parentNode) === null || _b === void 0 ? void 0 : _b.insertBefore(this.portalEl, this.el.nextSibling);
21380
+ }
21381
+ else if (this.portalEl.parentNode !== dialog) {
21382
+ dialog.appendChild(this.portalEl);
21383
+ }
21384
+ this.watchDialogClose(dialog);
21385
+ const root = this.portalEl.getRootNode();
21386
+ this.copyFocusStylesInto(root);
21387
+ // In a shadow root, the copied dark-mode rule can't see a [data-theme="dark"] on the page.
21388
+ this.portalEl.style.border = root instanceof ShadowRoot && closest$1('[data-theme="dark"]', this.el) ? 'var(--pine-border)' : '';
21389
+ }
21390
+ forgetOpen() {
21391
+ const index = openAutoPopovers.indexOf(this);
21392
+ if (index >= 0)
21393
+ openAutoPopovers.splice(index, 1);
21394
+ }
21395
+ /**
21396
+ * Whether an Escape is this popover's. One from a dialog the popover isn't in belongs to that
21397
+ * dialog when it's above it: a top-layer dialog or a pds-modal. A plain non-modal dialog inside
21398
+ * the popover's modal doesn't close on Escape, so the popover takes it.
21399
+ */
21400
+ takesEscapeFrom(event) {
21401
+ var _a, _b;
21402
+ const origin = ((_b = (_a = event.composedPath) === null || _a === void 0 ? void 0 : _a.call(event)[0]) !== null && _b !== void 0 ? _b : event.target);
21403
+ const dialog = closest$1('dialog[open]', origin);
21404
+ if (!dialog || containsComposed$1(dialog, this.portalEl))
21405
+ return true;
21406
+ return !(dialog.classList.contains('pds-modal__backdrop') || dialog.matches(':modal'));
21407
+ }
20812
21408
  /**
20813
21409
  * Adds light dismiss listeners (click outside and escape key)
20814
21410
  */
@@ -20817,6 +21413,19 @@ class PdsPopover {
20817
21413
  document.addEventListener('click', this.boundClickOutsideHandler, true);
20818
21414
  document.addEventListener('keydown', this.boundEscapeKeyHandler);
20819
21415
  }
21416
+ /** Closes the popover when the dialog it opened in closes, so it isn't left open inside. */
21417
+ watchDialogClose(dialog) {
21418
+ if (this.watchedDialog === dialog)
21419
+ return;
21420
+ this.unwatchDialogClose();
21421
+ this.watchedDialog = dialog;
21422
+ dialog.addEventListener('close', this.onDialogClose);
21423
+ }
21424
+ unwatchDialogClose() {
21425
+ var _a;
21426
+ (_a = this.watchedDialog) === null || _a === void 0 ? void 0 : _a.removeEventListener('close', this.onDialogClose);
21427
+ this.watchedDialog = null;
21428
+ }
20820
21429
  /**
20821
21430
  * Removes light dismiss listeners
20822
21431
  */
@@ -20842,7 +21451,7 @@ class PdsPopover {
20842
21451
  * Handles clicks outside the popover for light dismiss (auto type only)
20843
21452
  */
20844
21453
  handleClickOutside(event) {
20845
- var _a, _b, _c, _d;
21454
+ var _a, _b;
20846
21455
  // Ignore events that occurred at or before the popover opened
20847
21456
  // This prevents the opening click from immediately closing the popover
20848
21457
  // Convert event.timeStamp (DOMHighResTimeStamp from performance.now()) to epoch time
@@ -20853,16 +21462,18 @@ class PdsPopover {
20853
21462
  if (eventTime <= this.openTimestamp) {
20854
21463
  return;
20855
21464
  }
20856
- const target = event.target;
21465
+ // In a shadow root, event.target is only its host.
21466
+ const target = ((_b = (_a = event.composedPath) === null || _a === void 0 ? void 0 : _a.call(event)[0]) !== null && _b !== void 0 ? _b : event.target);
20857
21467
  // A datepicker's calendar is portaled to the body: a click in the calendar of a datepicker
20858
- // inside this popover, in its content or its trigger, isn't outside it.
20859
- const calendar = (_b = (_a = target).closest) === null || _b === void 0 ? void 0 : _b.call(_a, '.pds-datepicker-calendar-portal');
21468
+ // inside this popover, in its content or its trigger, isn't outside it. The target can be
21469
+ // inside the calendar's shadow root, so look up across it.
21470
+ const calendar = closest$1('.pds-datepicker-calendar-portal', target);
20860
21471
  const owner = calendar === null || calendar === void 0 ? void 0 : calendar.pdsDatepicker;
20861
21472
  if (owner && (containsComposed$1(this.portalEl, owner) || containsComposed$1(this.triggerEl, owner)))
20862
21473
  return;
20863
21474
  // Check if click is outside both the popover portal and the trigger
20864
- const clickedInsidePopover = (_c = this.portalEl) === null || _c === void 0 ? void 0 : _c.contains(target);
20865
- const clickedInsideTrigger = (_d = this.triggerEl) === null || _d === void 0 ? void 0 : _d.contains(target);
21475
+ const clickedInsidePopover = containsComposed$1(this.portalEl, target);
21476
+ const clickedInsideTrigger = containsComposed$1(this.triggerEl, target);
20866
21477
  if (!clickedInsidePopover && !clickedInsideTrigger) {
20867
21478
  this.hide();
20868
21479
  }
@@ -20883,14 +21494,19 @@ class PdsPopover {
20883
21494
  * Mirrors native Popover API: Escape closes and returns focus to trigger
20884
21495
  */
20885
21496
  handleEscapeKey(event) {
20886
- if (event.key === 'Escape') {
20887
- // Prevent default Escape behavior and stop propagation
20888
- // This mirrors native Popover API which handles Escape exclusively
20889
- event.preventDefault();
20890
- event.stopPropagation();
20891
- // Close popover and return focus to trigger
20892
- this.hide();
20893
- }
21497
+ // A control inside that closes on Escape (a datepicker, a combobox) has handled it already.
21498
+ if (event.key !== 'Escape' || event.defaultPrevented)
21499
+ return;
21500
+ // Like the native Popover API, Escape closes only the top popover: the last one opened that
21501
+ // it applies to. Every open popover hears it, so each checks whether it's that one.
21502
+ const top = [...openAutoPopovers].reverse().find(popover => popover.takesEscapeFrom(event));
21503
+ if (top !== this)
21504
+ return;
21505
+ // Take the key, so the dialog or modal around it doesn't close too.
21506
+ event.preventDefault();
21507
+ event.stopPropagation();
21508
+ // Close popover and return focus to trigger
21509
+ this.hide();
20894
21510
  }
20895
21511
  /**
20896
21512
  * Handles scroll events to reposition the popover (debounced for performance)
@@ -20995,13 +21611,20 @@ class PdsPopover {
20995
21611
  }
20996
21612
  this.portalEl.style.top = `${top}px`;
20997
21613
  this.portalEl.style.left = `${left}px`;
21614
+ // `position: fixed` measures from the viewport unless an ancestor becomes its containing block,
21615
+ // as a modal dialog does with its backdrop filter. Shift by however far it landed from the spot.
21616
+ const placed = this.portalEl.getBoundingClientRect();
21617
+ if (Math.abs(placed.top - top) > 0.5 || Math.abs(placed.left - left) > 0.5) {
21618
+ this.portalEl.style.top = `${2 * top - placed.top}px`;
21619
+ this.portalEl.style.left = `${2 * left - placed.left}px`;
21620
+ }
20998
21621
  // Reset the repositioning guard after a short delay
20999
21622
  setTimeout(() => {
21000
21623
  this.isRepositioning = false;
21001
21624
  }, 16); // ~1 frame at 60fps
21002
21625
  }
21003
21626
  render() {
21004
- return (hAsync(Host, { key: '66347d4922274d25504e5be134b36f05a3f12fdc', id: this.componentId }, hAsync("span", { key: '8f29d54d58cf0c66f86470c77c676716f1ab056f', class: "pds-popover__trigger-wrapper" }, hAsync("slot", { key: '5c89b687cfc01e67d3c11835e77755de88f03584', name: "trigger", onSlotchange: this.handleTriggerSlotChange })), hAsync("div", { key: '0ca9aff3021720098d86ec29eb69cbf149ef79a9', class: "pds-popover__content-slot-wrapper" }, hAsync("slot", { key: 'b73c3324d3322c41c68161e9ada51499c0e49cb0', onSlotchange: this.handleContentSlotChange }))));
21627
+ return (hAsync(Host, { key: 'da8a0c715df1199231b1265085f3f9ae0234032d', id: this.componentId }, hAsync("span", { key: 'f35023492399420829cec2e88556462f5ac1663e', class: "pds-popover__trigger-wrapper" }, hAsync("slot", { key: '38ebe92eebb87665467b3f92ff94dc8095450063', name: "trigger", onSlotchange: this.handleTriggerSlotChange })), hAsync("div", { key: '8917930f4520544d14bbd68b4c7936dd60af19e3', class: "pds-popover__content-slot-wrapper" }, hAsync("slot", { key: '28d3f9112256edd95721a79a7072a9e35a3712bf', onSlotchange: this.handleContentSlotChange }))));
21005
21628
  }
21006
21629
  get el() { return getElement(this); }
21007
21630
  static get watchers() { return {
@@ -21063,10 +21686,10 @@ class PdsProgress {
21063
21686
  this.hostKeeper.disconnect();
21064
21687
  }
21065
21688
  render() {
21066
- const normalizedFillColor = normalizeColorValue(this.fillColor);
21689
+ const normalizedFillColor = normalizeColorValue$1(this.fillColor);
21067
21690
  const hostClass = this.animated ? { 'is-animated': this.animated } : '';
21068
21691
  this.hostKeeper.record(hostClass);
21069
- return (hAsync(Host, { key: '5573a5c48eee2f7968835db92afdaebb73c1b85e', class: hostClass }, hAsync("div", { key: 'bb5cf260495be798f4272673884336022c28441e', class: "pds-progress" }, hAsync("label", { key: '017efa649ada73ec724b930e06bbf1ab19a18f61', class: "pds-progress__label", htmlFor: this.componentId }, this.label), hAsync("progress", { key: 'e648d910b072b7b2ca1c4a92c0832bf6e2ef5406', id: this.componentId, max: "100", style: normalizedFillColor ? { '--color-progress-fill': normalizedFillColor } : {}, value: this.percent })), this.showPercent && hAsync("div", { key: '1f9f1733ff2cd6e2ec81e9a46759ff451cf158f7', class: "pds-progress__percentage" }, this.percent, "%")));
21692
+ return (hAsync(Host, { key: 'a224e1e9bc50433553ab8bf4b0d772f01148ee76', class: hostClass }, hAsync("div", { key: '261742044f3d68c204cbf640cc4447eb6d74df11', class: "pds-progress" }, hAsync("label", { key: 'd686bdc6ab450bf8c14dd56077525a3139593f46', class: "pds-progress__label", htmlFor: this.componentId }, this.label), hAsync("progress", { key: 'c716e977a952a628aec600fa680aa9c3b8d0e996', id: this.componentId, max: "100", style: normalizedFillColor ? { '--color-progress-fill': normalizedFillColor } : {}, value: this.percent })), this.showPercent && hAsync("div", { key: '44176a580b435f69993be4a60ee2e888b87e10fb', class: "pds-progress__percentage" }, this.percent, "%")));
21070
21693
  }
21071
21694
  get el() { return getElement(this); }
21072
21695
  static get style() { return pdsProgressCss(); }
@@ -21101,7 +21724,7 @@ class PdsProperty {
21101
21724
  this.icon = 'star';
21102
21725
  }
21103
21726
  render() {
21104
- return (hAsync(Host, { key: '0f6195faaaf3adb11ad14f09a36c78f94e2bdf65', id: this.componentId }, hAsync("pds-box", { key: '0a9670c0e38065f5fbe035b81703e21155396ff8', "align-items": "center", gap: "xs" }, hAsync("pds-icon", { key: '13b497e8670bc5210a752b8c24b9fd6397b1a8c9', icon: this.icon, size: "var(--pine-dimension-sm)", "aria-hidden": "true" }), hAsync("slot", { key: 'a9b3cf5fd830b7551f68866a62341670f8b61b34' }))));
21727
+ return (hAsync(Host, { key: 'd599b62be4bacf1d89afcc26b14fc93bdc9bb3a4', id: this.componentId }, hAsync("pds-box", { key: 'd7f80f6598615c761d672893c8acab09bd9ea33f', "align-items": "center", gap: "xs" }, hAsync("pds-icon", { key: '15a6a6545c2cd2332bd830451106b7b08adc39ff', icon: this.icon, size: "var(--pine-dimension-sm)", "aria-hidden": "true" }), hAsync("slot", { key: '4e5661563b99ec56189447faabcdd1ae631159b2' }))));
21105
21728
  }
21106
21729
  static get style() { return pdsPropertyCss(); }
21107
21730
  static get cmpMeta() { return {
@@ -21220,13 +21843,13 @@ class PdsRadio {
21220
21843
  }
21221
21844
  render() {
21222
21845
  const renderLabelAndMessages = () => [
21223
- hAsync("label", { htmlFor: this.componentId, key: `${this.componentId}-label` }, hAsync("input", { key: 'add893cd82f79b9398589bd5c0a72d5ae4a90475', "aria-describedby": assignDescription(this.componentId, this.invalid, this.helperMessage, this.errorMessage), "aria-invalid": this.invalid ? "true" : undefined, type: "radio", id: this.componentId, name: this.name, value: this.value, checked: this.checked, required: this.required, disabled: this.disabled, onChange: this.handleRadioChange, class: this.hasImage() ? 'visually-hidden' : '' }), hAsync("span", { key: 'b58eed8681d1932397d38ffe82515987e6486e08', class: this.hideLabel ? 'visually-hidden' : '' }, this.label)),
21846
+ hAsync("label", { htmlFor: this.componentId, key: `${this.componentId}-label` }, hAsync("input", { key: 'ccd618855831bcee309e815f2cd2712fd4e8fe1f', "aria-describedby": assignDescription(this.componentId, this.invalid, this.helperMessage, this.errorMessage), "aria-invalid": this.invalid ? "true" : undefined, type: "radio", id: this.componentId, name: this.name, value: this.value, checked: this.checked, required: this.required, disabled: this.disabled, onChange: this.handleRadioChange, class: this.hasImage() ? 'visually-hidden' : '' }), hAsync("span", { key: '2e372a880c28f48fb804bac2518208082c141fad', class: this.hideLabel ? 'visually-hidden' : '' }, this.label)),
21224
21847
  this.helperMessage && (hAsync("div", { key: `${this.componentId}-helper`, class: 'pds-radio__message', id: messageId(this.componentId, 'helper') }, this.helperMessage)),
21225
- this.errorMessage && (hAsync("div", { key: `${this.componentId}-error`, class: `pds-radio__message pds-radio__message--error`, id: messageId(this.componentId, 'error'), "aria-live": "assertive" }, hAsync("pds-icon", { key: '7374924219e59eab46a7ced9e7062c3e674b4451', icon: danger, size: "small" }), this.errorMessage))
21848
+ this.errorMessage && (hAsync("div", { key: `${this.componentId}-error`, class: `pds-radio__message pds-radio__message--error`, id: messageId(this.componentId, 'error'), "aria-live": "assertive" }, hAsync("pds-icon", { key: '889d502575f6a162f450b6b58d76a6f6f1c74e4b', icon: danger, size: "small" }), this.errorMessage))
21226
21849
  ];
21227
21850
  const hostClass = this.classNames();
21228
21851
  this.hostKeeper.record(hostClass);
21229
- return (hAsync(Host, { key: '24269923f168d1d39ebfc1994619736f0dc8087a', class: hostClass }, this.hasImage() && (hAsync("div", { key: '74a72bef89aa012047cbf3a1744fcd33f13bb464', class: "pds-radio__image-container", part: "image-container" }, hAsync("slot", { key: '99dbcfdac86cb7c012fd44eab607217e21304bab', name: "image", onSlotchange: () => (this._hasImage = this.hasImageSlot()) }))), this.hasImage() ? (hAsync("div", { class: "pds-radio__content-wrapper" }, renderLabelAndMessages())) : (renderLabelAndMessages())));
21852
+ return (hAsync(Host, { key: '374003032b28407581a55f1fb0a304c49acf3c16', class: hostClass }, this.hasImage() && (hAsync("div", { key: '7eeb516267de1afcfa85fc7567999db488c2f4f5', class: "pds-radio__image-container", part: "image-container" }, hAsync("slot", { key: 'a312fea06f0c015bffab3bb392ff04d4913fd1c0', name: "image", onSlotchange: () => (this._hasImage = this.hasImageSlot()) }))), this.hasImage() ? (hAsync("div", { class: "pds-radio__content-wrapper" }, renderLabelAndMessages())) : (renderLabelAndMessages())));
21230
21853
  }
21231
21854
  get el() { return getElement(this); }
21232
21855
  static get style() { return labelCss$3() + pdsRadioCss(); }
@@ -21418,13 +22041,13 @@ class PdsRadioGroup {
21418
22041
  render() {
21419
22042
  const gapValue = this.getGapValue();
21420
22043
  const ariaDescribedBy = this.getAriaDescribedBy();
21421
- return (hAsync(Host, { key: '9dc78eb36bbc1b872f4320203dbbc64e43816ebf', class: this.classNames(), id: this._groupId, role: "group", "aria-describedby": ariaDescribedBy, style: {
22044
+ return (hAsync(Host, { key: 'bf8063c1a99e272bb3f6bc647998a6ef103f8a71', class: this.classNames(), id: this._groupId, role: "group", "aria-describedby": ariaDescribedBy, style: {
21422
22045
  '--pds-radio-group-gap': gapValue,
21423
- } }, this.groupLabel && (hAsync("div", { key: '7b6f95608dcf356b141ef5d590ff3070f83b5975', class: "pds-radio-group__label" }, this.groupLabel)), hAsync("div", { key: '6e1a634c9b81ca3f3bbbe9c6590bcd4efc97e6ea', class: {
22046
+ } }, this.groupLabel && (hAsync("div", { key: '8564ed3f8f99cdc1a0e5b189aacc6960923eb5f7', class: "pds-radio-group__label" }, this.groupLabel)), hAsync("div", { key: '2309c9373790182cde030c1dbda88fa3bdcaaf12', class: {
21424
22047
  'pds-radio-group__radios': true,
21425
22048
  'pds-radio-group__radios--row': this.direction === 'row',
21426
22049
  'pds-radio-group__radios--column': this.direction === 'column',
21427
- } }, hAsync("slot", { key: 'b5b16148f3c77d425a50b7ada8a822e9919ef5c5', onSlotchange: () => this.updateChildRadios() })), this.helperMessage && (hAsync("div", { key: 'ca6b98f926b8d7a53fda630170ac037c99f5ee85', class: "pds-radio-group__message", id: messageId(this._groupId, 'helper') }, this.helperMessage)), this.errorMessage && (hAsync("div", { key: '37b57e2622370364e619ea090712a7b79fe79501', class: "pds-radio-group__message pds-radio-group__message--error", id: messageId(this._groupId, 'error'), "aria-live": "assertive" }, hAsync("pds-icon", { key: '6a362d048a67312b1b227f71cc4b8f821ae0817e', icon: danger, size: "small" }), this.errorMessage))));
22050
+ } }, hAsync("slot", { key: 'd88dde3c631e25c01bc7b6d3ef5d517255fabd1a', onSlotchange: () => this.updateChildRadios() })), this.helperMessage && (hAsync("div", { key: 'a229214ed01663b0fc34f35e27c7148b4eb412ab', class: "pds-radio-group__message", id: messageId(this._groupId, 'helper') }, this.helperMessage)), this.errorMessage && (hAsync("div", { key: 'dc092f2e6dbef0cb369cf00a6eccf9a095a0313d', class: "pds-radio-group__message pds-radio-group__message--error", id: messageId(this._groupId, 'error'), "aria-live": "assertive" }, hAsync("pds-icon", { key: 'd242da328731e55fa52d8e624fdfc750bfa6cce4', icon: danger, size: "small" }), this.errorMessage))));
21428
22051
  }
21429
22052
  get el() { return getElement(this); }
21430
22053
  static get watchers() { return {
@@ -21533,7 +22156,7 @@ class PdsRow {
21533
22156
  'min-height': this.minHeight,
21534
22157
  }));
21535
22158
  this.hostKeeper.record(`pds-row ${rowClasses}`, rowInlineStyles);
21536
- return hAsync(Host, { key: 'ee3a32ae1376919c7c2d1fcf186a1b7c272ee085', class: `pds-row ${rowClasses}`, style: rowInlineStyles });
22159
+ return hAsync(Host, { key: '78a505fef7132f9545916155d2485a6d2df8f4a5', class: `pds-row ${rowClasses}`, style: rowInlineStyles });
21537
22160
  }
21538
22161
  get el() { return getElement(this); }
21539
22162
  static get style() { return pdsRowCss(); }
@@ -21805,7 +22428,7 @@ class PdsSelect {
21805
22428
  'has-action': hasAction && !this.hideLabel ? 'true' : null,
21806
22429
  };
21807
22430
  this.hostKeeper.record(hostClass, {}, hostAttributes);
21808
- return (hAsync(Host, Object.assign({ key: 'c99bfc000ad351298e154554a8b22635b1abb718', class: hostClass }, hostAttributes), hAsync("div", { key: '35374b150cbef745c6a6068ba5a2fde0803c0314', class: "pds-select" }, !this.hideLabel && (hAsync("div", { key: 'a3b9bae451c5c384606790a29bf8ab5fc70427c0', class: "pds-select__label-wrapper" }, hAsync("label", { key: '80d7740a05a6d3cce6d51224169eb6c2501c4896', htmlFor: this.componentId }, hAsync("span", { key: 'a51c02d7c84f75bb168889dab50cae807271c63d', class: this.hideLabel ? 'visually-hidden' : '' }, this.label)), hasAction && this.renderAction())), hAsync("select", { key: '11444dad795bd02c008252a60e701125861e4af0', "aria-describedby": assignDescription(this.componentId, this.isInvalid(), this.helperMessage, this.errorMessage), "aria-invalid": this.isInvalid() ? 'true' : undefined, "aria-label": this.hideLabel ? this.label : undefined, autocomplete: this.autocomplete || undefined, class: "pds-select__field", disabled: this.disabled, id: this.componentId, multiple: this.multiple, name: this.name, onBlur: this.onBlur, onChange: this.onSelectUpdate, onFocus: this.onFocus, onKeyDown: this.onKeyDown, part: "select", required: this.required, ref: (el) => (this.selectEl = el) }), hAsync("div", { key: 'ce54fa1df287d96a7503bb19cd2ba6c74a6da638', "aria-hidden": "true", class: "hidden", ref: (el) => (this.slotContainer = el) }, hAsync("slot", { key: '22c55e78999076a37d43fb708dabc7379dd4cee3', onSlotchange: this.handleSlotChange })), this.renderMessages(), !this.multiple && hAsync("pds-icon", { key: '45628074fbcdb259b8bba42299082423309a6968', "aria-hidden": "true", class: "pds-select__select-icon", icon: enlarge }))));
22431
+ return (hAsync(Host, Object.assign({ key: '343ed671e67dd1d6f9eb284b07e06d59877c64e9', class: hostClass }, hostAttributes), hAsync("div", { key: '650aed0869b02f658feb16ee99f17e1cd22e5a8e', class: "pds-select" }, !this.hideLabel && (hAsync("div", { key: '74739461acbea33c92279ec8ec9042d6af1773c1', class: "pds-select__label-wrapper" }, hAsync("label", { key: '1ad96ffd243000358edfbd79054ee770e1ba97d3', htmlFor: this.componentId }, hAsync("span", { key: 'b832868db4f9cd4fd2f8313054d2e96e106189ab', class: this.hideLabel ? 'visually-hidden' : '' }, this.label)), hasAction && this.renderAction())), hAsync("select", { key: 'e83c1a1a0a5646fc8abf9e50bc374f52b56be773', "aria-describedby": assignDescription(this.componentId, this.isInvalid(), this.helperMessage, this.errorMessage), "aria-invalid": this.isInvalid() ? 'true' : undefined, "aria-label": this.hideLabel ? this.label : undefined, autocomplete: this.autocomplete || undefined, class: "pds-select__field", disabled: this.disabled, id: this.componentId, multiple: this.multiple, name: this.name, onBlur: this.onBlur, onChange: this.onSelectUpdate, onFocus: this.onFocus, onKeyDown: this.onKeyDown, part: "select", required: this.required, ref: (el) => (this.selectEl = el) }), hAsync("div", { key: 'a34880120b88124b5122350856d023368f96abf7', "aria-hidden": "true", class: "hidden", ref: (el) => (this.slotContainer = el) }, hAsync("slot", { key: 'df6abaf6a630761a32b263813181ff3453757e0d', onSlotchange: this.handleSlotChange })), this.renderMessages(), !this.multiple && hAsync("pds-icon", { key: 'f9197284ef9965d693242a652b583f48bc3d7097', "aria-hidden": "true", class: "pds-select__select-icon", icon: enlarge }))));
21809
22432
  }
21810
22433
  static get formAssociated() { return true; }
21811
22434
  get el() { return getElement(this); }
@@ -24564,7 +25187,7 @@ class PdsSortable {
24564
25187
  render() {
24565
25188
  const classNames = this.classNames();
24566
25189
  this.hostKeeper.record(classNames);
24567
- return (hAsync(Host, { key: 'fb6e9a79babf01980c04ee7208d195510493a7dc', class: classNames, id: this.componentId }, hAsync("slot", { key: '5735ca3af531a736f07d1fafde8ae544d00a75bb' })));
25190
+ return (hAsync(Host, { key: 'a0e532d31561748b4632a6be9163562f990af804', class: classNames, id: this.componentId }, hAsync("slot", { key: 'd1b0defb683f841e6708374fff4bf62eb7fd5080' })));
24568
25191
  }
24569
25192
  get el() { return getElement(this); }
24570
25193
  static get watchers() { return {
@@ -24639,7 +25262,7 @@ class PdsSortableItem {
24639
25262
  }
24640
25263
  render() {
24641
25264
  this.hostKeeper.record('pds-sortable-item');
24642
- return (hAsync(Host, { key: '3f9098a7c938bfa6443f08fb8b0a7c7217230890', class: "pds-sortable-item", id: this.componentId }, this.showHandle && (hAsync("div", { key: '77718a6867ddd8bc029bb3ef995f6ee9a5999ce7', class: "pds-sortable-item__handle" }, hAsync("pds-icon", { key: 'aad7f46e776ece85858798f8f1a1a50c9022b84f', "aria-hidden": "true", icon: handle }))), hAsync("slot", { key: 'afa9346ec8fd7aa6132a15dd44d3b1cae24500b9' }), this.enableActions && (hAsync("div", { key: 'c28c85391117542999c12d673879768394002c90', class: "pds-sortable-item__actions" }, hAsync("slot", { key: '88ab53f3ba4ed47715e31935b861d9ab42342b32', name: "sortable-item-actions" })))));
25265
+ return (hAsync(Host, { key: '2065ccb474ae4b7032edc3c37aa6855f3048909d', class: "pds-sortable-item", id: this.componentId }, this.showHandle && (hAsync("div", { key: '32385cc94837a3d0bc1c496615135c79274afe35', class: "pds-sortable-item__handle" }, hAsync("pds-icon", { key: 'ea94e28b2867aa20622ca073dc31d3b4a11eebbb', "aria-hidden": "true", icon: handle }))), hAsync("slot", { key: 'fb18aa90be0b8fa3832a5dd2b02a7b571205341f' }), this.enableActions && (hAsync("div", { key: '4c6e59d77a7b2183552533a544f4a70ce0cc7011', class: "pds-sortable-item__actions" }, hAsync("slot", { key: '497b1ff88436175d9365a28032e109b6fa118e44', name: "sortable-item-actions" })))));
24643
25266
  }
24644
25267
  get el() { return getElement(this); }
24645
25268
  static get style() { return pdsSortableItemCss(); }
@@ -24762,9 +25385,9 @@ class PdsSwitch {
24762
25385
  const hostClass = this.switchClassNames();
24763
25386
  const ariaDisabled = this.disabled ? 'true' : null;
24764
25387
  this.hostKeeper.record(hostClass, {}, { 'aria-disabled': ariaDisabled });
24765
- return (hAsync(Host, { key: '6d4b51307f2619a99981e344f782f69871aabf0f', class: hostClass, "aria-disabled": ariaDisabled }, hAsync("label", { key: '068ef3759e2bc3d9870cff36714de0e9cf558b2b', htmlFor: this.componentId }, hAsync("input", Object.assign({ key: 'aa28fb67332bb2d81c09b6c749c1cb0f079e327f', "aria-describedby": assignDescription(this.componentId, this.invalid, this.helperMessage, this.errorMessage), "aria-invalid": this.invalid ? "true" : undefined, checked: this.checked, class: "pds-switch__input", disabled: this.disabled, id: this.componentId, name: this.name ? this.name : this.componentId, onChange: this.onSwitchUpdate, required: this.required, type: "checkbox", value: this.value }, this.inheritedAttributes)), hAsync("span", { key: 'd237980a9ce2abc04d57085df022f28dfa2768e4', class: this.hideLabel ? 'visually-hidden' : '' }, hAsync("slot", { key: '83d0e2110cfdcd3208319302af237178dfd419a4', name: "label", onSlotchange: this.updateHasLabelSlot }), !this.hasLabelSlot && this.label)), this.helperMessage &&
24766
- hAsync("div", { key: '137d9e5626b34ade33f68c4c24c3dcb154500dc6', class: `pds-switch__message`, id: messageId(this.componentId, 'helper') }, this.helperMessage), this.errorMessage &&
24767
- hAsync("div", { key: '64c3b8884d0568e26953f67a95d045aa5731c41f', class: `pds-switch__message pds-switch__message--error`, id: messageId(this.componentId, 'error'), "aria-live": "assertive" }, hAsync("pds-icon", { key: 'f99f8045eb33d0c60518f3b4c6a0183170a50f4a', icon: danger, size: "small" }), this.errorMessage)));
25388
+ return (hAsync(Host, { key: 'ee8576e523348ff9eed1b6087626849bb0966608', class: hostClass, "aria-disabled": ariaDisabled }, hAsync("label", { key: '09433b5356d718be65f4f2eb61f35fff1d000e10', htmlFor: this.componentId }, hAsync("input", Object.assign({ key: 'f996a0fad56119674cfb7d95e1444bf411b64396', "aria-describedby": assignDescription(this.componentId, this.invalid, this.helperMessage, this.errorMessage), "aria-invalid": this.invalid ? "true" : undefined, checked: this.checked, class: "pds-switch__input", disabled: this.disabled, id: this.componentId, name: this.name ? this.name : this.componentId, onChange: this.onSwitchUpdate, required: this.required, type: "checkbox", value: this.value }, this.inheritedAttributes)), hAsync("span", { key: '4b23305d3cc0f5b37b23c6b79a14cfba57c16816', class: this.hideLabel ? 'visually-hidden' : '' }, hAsync("slot", { key: '258b5ccf0d4b01518df3a37772d694cb37569ffa', name: "label", onSlotchange: this.updateHasLabelSlot }), !this.hasLabelSlot && this.label)), this.helperMessage &&
25389
+ hAsync("div", { key: 'c8196fa2ce832de3a8c6d987a78fd65d791c4c59', class: `pds-switch__message`, id: messageId(this.componentId, 'helper') }, this.helperMessage), this.errorMessage &&
25390
+ hAsync("div", { key: '948894dd2e642689af6cad545a0b31f7c4711d87', class: `pds-switch__message pds-switch__message--error`, id: messageId(this.componentId, 'error'), "aria-live": "assertive" }, hAsync("pds-icon", { key: 'd4b72b49bfd38a396b8f7c0686e1b2ef92d65491', icon: danger, size: "small" }), this.errorMessage)));
24768
25391
  }
24769
25392
  static get formAssociated() { return true; }
24770
25393
  get el() { return getElement(this); }
@@ -24806,6 +25429,7 @@ class PdsTab {
24806
25429
  constructor(hostRef) {
24807
25430
  registerInstance(this, hostRef);
24808
25431
  this.pdsTabClick = createEvent(this, "pdsTabClick");
25432
+ this.hostKeeper = new HostStylingKeeper();
24809
25433
  /**
24810
25434
  * Determines the tab's disabled state.
24811
25435
  * @defaultValue false
@@ -24824,6 +25448,12 @@ class PdsTab {
24824
25448
  /** @internal */
24825
25449
  this.selected = false;
24826
25450
  }
25451
+ connectedCallback() {
25452
+ this.hostKeeper.connect(this.el);
25453
+ }
25454
+ disconnectedCallback() {
25455
+ this.hostKeeper.disconnect();
25456
+ }
24827
25457
  // Unwraps a nested <a>/<button> left by a page-cache (Turbo, bfcache) reconnect.
24828
25458
  componentDidRender() {
24829
25459
  unwrapReconnectedContent(this.el.querySelector('.pds-tab__content'), 'a.pds-tab, button.pds-tab', '.pds-tab__content');
@@ -24859,6 +25489,9 @@ class PdsTab {
24859
25489
  return classes.filter(Boolean).join(' ');
24860
25490
  }
24861
25491
  render() {
25492
+ // The docs show consumers omitting `slot`, so server HTML doesn't carry it — a DOM morph
25493
+ // that strips it leaves this tab unslotted, and pds-tabs has no default slot. Put it back.
25494
+ this.hostKeeper.record('', {}, { slot: 'tabs' });
24862
25495
  const availabilityTabEdgeInlineStart = (hAsync("span", { class: "pds-tab-edge", role: "presentation" }));
24863
25496
  const availabilityTabEdgeInlineEnd = (hAsync("span", { class: "pds-tab-edge pds-tab-edge--end", role: "presentation" }));
24864
25497
  const content = (hAsync(Fragment, null, this.variant === "availability" && availabilityTabEdgeInlineStart, this.variant === "availability" && availabilityTabEdgeInlineEnd, hAsync("div", { class: "pds-tab__content" }, hAsync("slot", null))));
@@ -25178,7 +25811,7 @@ class PdsTableBody {
25178
25811
  registerInstance(this, hostRef);
25179
25812
  }
25180
25813
  render() {
25181
- return (hAsync(Host, { key: '0278bf4c680e9054748039dddbbb5cfcce3bb4e6', role: "rowgroup", part: "body" }, hAsync("slot", { key: '44cf68f3b0dff78312a3d31d898209544ce8131e' })));
25814
+ return (hAsync(Host, { key: '817532e93c8f91ef64cd0f90aa6c4372c3b7d83f', role: "rowgroup", part: "body" }, hAsync("slot", { key: '296ba876c6716e85252a06008bd55d59624223e3' })));
25182
25815
  }
25183
25816
  static get style() { return pdsTableBodyCss(); }
25184
25817
  static get cmpMeta() { return {
@@ -25316,11 +25949,11 @@ class PdsTableCell {
25316
25949
  return classNames.join(' ');
25317
25950
  }
25318
25951
  render() {
25319
- return (hAsync(Host, { key: 'c32bd43c6080e9a8a98578016973de9025e5d367', class: this.classNames(), role: "gridcell", part: "cell", style: this.tableRef &&
25952
+ return (hAsync(Host, { key: 'bedaeeb5723299656f872a760ed1dd80c7fe8793', class: this.classNames(), role: "gridcell", part: "cell", style: this.tableRef &&
25320
25953
  this.tableRef.fixedColumn &&
25321
25954
  this.tableRef.selectable
25322
25955
  ? { '--fixed-cell-position': '40px' }
25323
- : {} }, hAsync("slot", { key: '5b2af30784f41dcc7a0f66187f222ec2472f207f' })));
25956
+ : {} }, hAsync("slot", { key: '45182ee3e004097660432f552780b3d27671bd46' })));
25324
25957
  }
25325
25958
  get hostElement() { return getElement(this); }
25326
25959
  static get watchers() { return {
@@ -25389,7 +26022,7 @@ class PdsTableHead {
25389
26022
  }
25390
26023
  }
25391
26024
  render() {
25392
- return (hAsync(Host, { key: 'ca88406002f440e9b9eefa639dac056e85403bd8', role: "row", part: "head" }, this.tableRef && this.tableRef.selectable && (hAsync("pds-table-head-cell", { key: '7c1939791a0573c6eccdec66d7b6d5de122a42c1', part: this.tableRef.selectable ? 'checkbox-cell' : '' }, !this.tableRef.disableSelectAll && (hAsync("pds-checkbox", { key: '3a8581bbf9b5fc26396937e7d0bab370f6078090', componentId: this.generateUniqueId(), indeterminate: this.indeterminate, onInput: this.handleInput, label: "Select All Rows", hideLabel: true, checked: this.isSelected, part: "select-all-checkbox" })))), hAsync("slot", { key: 'a736a10378936d4e4de5b139f3f57a345483c1bb' })));
26025
+ return (hAsync(Host, { key: 'de3faae735e90f5fde1258b5acb826f5f9dbd170', role: "row", part: "head" }, this.tableRef && this.tableRef.selectable && (hAsync("pds-table-head-cell", { key: 'e590e57c8b37ec0ad18e96077401c4692bbd45a4', part: this.tableRef.selectable ? 'checkbox-cell' : '' }, !this.tableRef.disableSelectAll && (hAsync("pds-checkbox", { key: '44ca7eda63185672939909e121a86e6502080a7d', componentId: this.generateUniqueId(), indeterminate: this.indeterminate, onInput: this.handleInput, label: "Select All Rows", hideLabel: true, checked: this.isSelected, part: "select-all-checkbox" })))), hAsync("slot", { key: '0671df85d7989cff7266bfd3d1b4d62b332d2e81' })));
25393
26026
  }
25394
26027
  get hostElement() { return getElement(this); }
25395
26028
  static get style() { return pdsTableHeadCss(); }
@@ -25610,11 +26243,11 @@ class PdsTableHeadCell {
25610
26243
  return classNames.join(' ');
25611
26244
  }
25612
26245
  render() {
25613
- return (hAsync(Host, { key: 'de7b2fb674def0a8046e1940488d435176dc9851', class: this.classNames(), role: "columnheader", onClick: this.toggleSort, part: "head-cell", style: this.tableRef &&
26246
+ return (hAsync(Host, { key: '13de42d136c5b037cd1545cd5b789b4660e23b87', class: this.classNames(), role: "columnheader", onClick: this.toggleSort, part: "head-cell", style: this.tableRef &&
25614
26247
  this.tableRef.fixedColumn &&
25615
26248
  this.tableRef.selectable
25616
26249
  ? { '--fixed-cell-position': '40px' }
25617
- : {} }, hAsync("slot", { key: '4ada173faf7d106cca34920540703a1d04f7e5bd' }), this.sortable && this.isActive && (hAsync("pds-icon", { key: '1b0e87d74b6fa359e901a8e66479f37a88cdcf1c', icon: this.sortingDirection === 'asc' ? upSmall : downSmall, part: "sort-icon" }))));
26250
+ : {} }, hAsync("slot", { key: '96084d87a34d7b601a8e8325f344f1fe6601204e' }), this.sortable && this.isActive && (hAsync("pds-icon", { key: 'cba838fa029b280561676c2b57af7f8f00055511', icon: this.sortingDirection === 'asc' ? upSmall : downSmall, part: "sort-icon" }))));
25618
26251
  }
25619
26252
  get hostElement() { return getElement(this); }
25620
26253
  static get style() { return pdsTableHeadCellCss(); }
@@ -25780,7 +26413,7 @@ class PdsTableRow {
25780
26413
  }
25781
26414
  }
25782
26415
  render() {
25783
- return (hAsync(Host, { key: '16ca08eefa74468559a1c084b7619836f01b27af', class: this.classNames(), role: "row", part: "row" }, this.tableRef && this.tableRef.selectable && (hAsync("pds-table-cell", { key: '4b4d2ae15d519e08cd6710ddb6759923d478457c', part: this.tableRef.fixedColumn ? 'checkbox-cell' : 'checkbox-cell', class: this.tableRef.selectable ? 'has-checkbox' : '' }, hAsync("pds-checkbox", { key: '78b9a731113cce82c59f40713561033f563ffc5f', componentId: this.generateUniqueId(), onPdsCheckboxChange: this.handleCheckboxChange, indeterminate: this.indeterminate, label: "Select Row", hideLabel: true, checked: this.isSelected, part: "row-checkbox" }))), hAsync("slot", { key: '5522f2335912f59013e9fc1e1fc6070d645cd519' })));
26416
+ return (hAsync(Host, { key: '5323521abc5c2464299cf77520fb38ec81297866', class: this.classNames(), role: "row", part: "row" }, this.tableRef && this.tableRef.selectable && (hAsync("pds-table-cell", { key: 'eb94dd282f885d3466b6177b2454cbcc4f932466', part: this.tableRef.fixedColumn ? 'checkbox-cell' : 'checkbox-cell', class: this.tableRef.selectable ? 'has-checkbox' : '' }, hAsync("pds-checkbox", { key: '222eaaedd4bebddc18cebf01bf4da81004773a96', componentId: this.generateUniqueId(), onPdsCheckboxChange: this.handleCheckboxChange, indeterminate: this.indeterminate, label: "Select Row", hideLabel: true, checked: this.isSelected, part: "row-checkbox" }))), hAsync("slot", { key: '010f222fa02b1809ff818f7a030c2a12fc3e3abb' })));
25784
26417
  }
25785
26418
  get hostElement() { return getElement(this); }
25786
26419
  static get style() { return pdsTableRowCss(); }
@@ -25807,6 +26440,7 @@ const pdsTabpanelCss = () => `:host{display:block}:host(.pds-tabpanel--stretch-a
25807
26440
  class PdsTabpanel {
25808
26441
  constructor(hostRef) {
25809
26442
  registerInstance(this, hostRef);
26443
+ this.hostKeeper = new HostStylingKeeper();
25810
26444
  /**
25811
26445
  * Keeps track of the tabpanel selected state, this property is passed by parent component
25812
26446
  */
@@ -25818,12 +26452,22 @@ class PdsTabpanel {
25818
26452
  /** @internal */
25819
26453
  this.stretch = false;
25820
26454
  }
26455
+ connectedCallback() {
26456
+ this.hostKeeper.connect(this.el);
26457
+ }
26458
+ disconnectedCallback() {
26459
+ this.hostKeeper.disconnect();
26460
+ }
25821
26461
  // Unwraps a nested .pds-tabpanel left by a page-cache (Turbo, bfcache) reconnect.
25822
26462
  componentDidRender() {
25823
26463
  unwrapReconnectedContent(this.el.querySelector('.pds-tabpanel'), '.pds-tabpanel');
25824
26464
  }
25825
26465
  render() {
25826
- return (hAsync(Host, { key: '87b00d828c9cddbcccd5d6e89dab7541a3c5c839', slot: "tabpanels", class: this.stretch && this.selected ? "pds-tabpanel--stretch-active" : undefined }, hAsync("div", { key: 'd7058a727d010351c73b5287f45991d48ef71151', role: "tabpanel", id: this.parentComponentId + "__" + this.name + '-panel', tabindex: "0", "aria-labelledby": this.parentComponentId + "__" + this.name, class: this.selected ? "pds-tabpanel is-active" : "pds-tabpanel" }, hAsync("slot", { key: '97861fcd8432206a1115135fad919d75dc327112' }))));
26466
+ const hostClass = this.stretch && this.selected ? "pds-tabpanel--stretch-active" : "";
26467
+ // The docs show consumers omitting `slot`, so server HTML doesn't carry it — a DOM morph
26468
+ // that strips it (and the stretch-active class) leaves this panel unslotted. Put both back.
26469
+ this.hostKeeper.record(hostClass, {}, { slot: 'tabpanels' });
26470
+ return (hAsync(Host, { key: '5d867e31d0f5f14e18f1c81035991c90bb5fe529', slot: "tabpanels", class: hostClass || undefined }, hAsync("div", { key: '255d37a73089904cfb170cd89f7b829756f6295f', role: "tabpanel", id: this.parentComponentId + "__" + this.name + '-panel', tabindex: "0", "aria-labelledby": this.parentComponentId + "__" + this.name, class: this.selected ? "pds-tabpanel is-active" : "pds-tabpanel" }, hAsync("slot", { key: '714d3d0cf0fc6173e243a2b077d9b9918ae4acf9' }))));
25827
26471
  }
25828
26472
  get el() { return getElement(this); }
25829
26473
  static get style() { return pdsTabpanelCss(); }
@@ -25854,6 +26498,35 @@ class PdsTabs {
25854
26498
  constructor(hostRef) {
25855
26499
  registerInstance(this, hostRef);
25856
26500
  this.hostKeeper = new HostStylingKeeper();
26501
+ this.slotChangeScheduled = false;
26502
+ // The tab that most recently had focus, tracked continuously via `focusin` rather
26503
+ // than sampled inside handleSlotChange: removing a focused element blurs it to
26504
+ // <body> synchronously, but slotchange only fires later (a microtask checkpoint),
26505
+ // by which point the sample would already read <body>.
26506
+ this.lastFocusedTab = null;
26507
+ this.handleFocusIn = (event) => {
26508
+ var _a;
26509
+ const tab = (_a = event.target) === null || _a === void 0 ? void 0 : _a.closest('pds-tab');
26510
+ if (tab && tab.closest('pds-tabs') === this.el) {
26511
+ this.lastFocusedTab = tab;
26512
+ }
26513
+ };
26514
+ // Focus that leaves a tab forgets it, so replacing the tab later doesn't pull focus back,
26515
+ // including focus that moves into a panel. Focus moving to another tab is tracked again
26516
+ // by focusin, which follows focusout. Removing a focused tab also fires focusout (with no
26517
+ // relatedTarget), while the tab is still connected, so that case is checked a microtask
26518
+ // later: a tab that's gone by then was removed, and is kept so its focus can be restored.
26519
+ this.handleFocusOut = (event) => {
26520
+ const tab = this.lastFocusedTab;
26521
+ if (event.relatedTarget) {
26522
+ this.lastFocusedTab = null;
26523
+ return;
26524
+ }
26525
+ queueMicrotask(() => {
26526
+ if (this.lastFocusedTab === tab && (tab === null || tab === void 0 ? void 0 : tab.isConnected))
26527
+ this.lastFocusedTab = null;
26528
+ });
26529
+ };
25857
26530
  /**
25858
26531
  * Adds a divider rule beneath the tab list.
25859
26532
  * @defaultValue false
@@ -25873,12 +26546,44 @@ class PdsTabs {
25873
26546
  * @defaultValue false
25874
26547
  */
25875
26548
  this.nav = false;
26549
+ // The tabs and tabpanels slots fire slotchange separately, even for the same morph
26550
+ // (both swapped together). Coalesce same-tick firings into one re-collection pass
26551
+ // with a microtask, the way a single DOM mutation already only triggers one event.
26552
+ this.handleSlotChange = () => {
26553
+ if (this.slotChangeScheduled)
26554
+ return;
26555
+ this.slotChangeScheduled = true;
26556
+ this.activeTabNameBeforeSlotChange = this.activeTabName;
26557
+ queueMicrotask(() => {
26558
+ this.slotChangeScheduled = false;
26559
+ this.recollectAfterSlotChange();
26560
+ });
26561
+ };
25876
26562
  }
25877
26563
  connectedCallback() {
25878
26564
  this.hostKeeper.connect(this.el);
26565
+ this.el.addEventListener('focusin', this.handleFocusIn);
26566
+ this.el.addEventListener('focusout', this.handleFocusOut);
26567
+ // componentDidLoad only runs once, so a reconnect (the element moved in the DOM) re-attaches
26568
+ // the slotchange listeners disconnectedCallback removed. Before the first render the slots
26569
+ // don't exist yet, so this is a no-op and componentDidLoad attaches them.
26570
+ const isReconnect = this.tabsSlot != null;
26571
+ this.setupSlotChangeListeners();
26572
+ // Content can change while detached, with no listener to see it — re-collect now
26573
+ // instead of waiting on a slotchange that may never come if nothing changes again.
26574
+ if (isReconnect)
26575
+ this.handleSlotChange();
25879
26576
  }
25880
26577
  disconnectedCallback() {
26578
+ var _a, _b;
25881
26579
  this.hostKeeper.disconnect();
26580
+ this.el.removeEventListener('focusin', this.handleFocusIn);
26581
+ this.el.removeEventListener('focusout', this.handleFocusOut);
26582
+ (_a = this.tabsSlot) === null || _a === void 0 ? void 0 : _a.removeEventListener('slotchange', this.handleSlotChange);
26583
+ (_b = this.tabPanelsSlot) === null || _b === void 0 ? void 0 : _b.removeEventListener('slotchange', this.handleSlotChange);
26584
+ }
26585
+ componentDidLoad() {
26586
+ this.setupSlotChangeListeners();
25882
26587
  }
25883
26588
  tabClickHandler(event) {
25884
26589
  if (this.componentId === event.detail[1]) {
@@ -25906,8 +26611,8 @@ class PdsTabs {
25906
26611
  // Navigation mode is an explicit, single source of truth: `nav` drives both the
25907
26612
  // container (<nav> of links vs role=tablist of buttons) and every child tab (via
25908
26613
  // `navMode`), so the tabs present when the strip initializes can't mix the two.
25909
- // (Child discovery is load-time only, like `variant`/`id`; tabs added after load
25910
- // aren't managed.)
26614
+ // Unlike child discovery (re-run on slotchange), `nav` itself isn't watched — it's
26615
+ // a load-time mode switch, not something a consumer is expected to toggle live.
25911
26616
  get isNav() {
25912
26617
  return !!this.nav;
25913
26618
  }
@@ -25960,9 +26665,52 @@ class PdsTabs {
25960
26665
  this.tabs = allTabs.filter(tab => tab.closest('pds-tabs') === this.el);
25961
26666
  this.tabPanels = allTabPanels.filter(panel => panel.closest('pds-tabs') === this.el);
25962
26667
  }
26668
+ // The initial collection (componentWillLoad) only sees tabs/panels present at load.
26669
+ // A tab or panel added, removed or replaced afterwards — including by a DOM morph
26670
+ // swapping in a fresh copy — needs to be re-collected the same way pds-dropdown-menu,
26671
+ // pds-select and pds-multiselect already do for their own slotted content.
26672
+ setupSlotChangeListeners() {
26673
+ var _a, _b, _c, _d;
26674
+ this.tabsSlot = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('slot[name="tabs"]');
26675
+ this.tabPanelsSlot = (_b = this.el.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector('slot[name="tabpanels"]');
26676
+ (_c = this.tabsSlot) === null || _c === void 0 ? void 0 : _c.addEventListener('slotchange', this.handleSlotChange);
26677
+ (_d = this.tabPanelsSlot) === null || _d === void 0 ? void 0 : _d.addEventListener('slotchange', this.handleSlotChange);
26678
+ }
26679
+ recollectAfterSlotChange() {
26680
+ const previousActiveTabName = this.activeTabNameBeforeSlotChange;
26681
+ // A removed node stays referenced but disconnected — checked before
26682
+ // findAllChildren() re-collects, since that doesn't affect this either way.
26683
+ const focusedTabWasRemoved = !this.isNav && this.lastFocusedTab != null && !this.lastFocusedTab.isConnected;
26684
+ this.findAllChildren();
26685
+ this.warnOnNavConfig();
26686
+ // Keep the current selection if it still exists. Otherwise clear it so
26687
+ // passPropsToChildren() falls back to the first enabled tab, the same way
26688
+ // it does when a consumer never set activeTabName in the first place.
26689
+ if (previousActiveTabName != null && !this.tabs.some((tab) => tab.name === previousActiveTabName)) {
26690
+ this.activeTabName = undefined;
26691
+ }
26692
+ this.passPropsToChildren();
26693
+ // If the tab that last had focus was removed (e.g. replaced by a fresh copy),
26694
+ // the browser already silently dropped focus to <body> — restore it to the new
26695
+ // active tab's button so keyboard/screen-reader users don't lose their place.
26696
+ // Deferred a frame since a freshly-created pds-tab's button doesn't exist until
26697
+ // its own render completes; re-checked then in case focus moved on its own, to
26698
+ // the tabs or anywhere else — only focus the removal dropped to <body> is restored.
26699
+ if (focusedTabWasRemoved) {
26700
+ this.lastFocusedTab = null;
26701
+ requestAnimationFrame(() => {
26702
+ var _a;
26703
+ const active = document.activeElement;
26704
+ if (active && active !== document.body)
26705
+ return;
26706
+ const newActiveTab = this.tabs.find((tab) => tab.name === this.activeTabName);
26707
+ (_a = newActiveTab === null || newActiveTab === void 0 ? void 0 : newActiveTab.querySelector('button')) === null || _a === void 0 ? void 0 : _a.focus();
26708
+ });
26709
+ }
26710
+ }
25963
26711
  propGeneration(child, index = 0) {
25964
26712
  child.parentComponentId = this.componentId.toString();
25965
- child.variant = this.variant.toString();
26713
+ child.variant = this.variant;
25966
26714
  child.selected = (this.activeTabName === child.name) ? true : false;
25967
26715
  child['index'] = index;
25968
26716
  }
@@ -26018,7 +26766,7 @@ class PdsTabs {
26018
26766
  // Only the classes: `active-tab-name` backs the mutable activeTabName prop, so a morph that drops
26019
26767
  // it is a prop change, not a strip.
26020
26768
  this.hostKeeper.record(hostClass);
26021
- return (hAsync(Host, { key: 'ea26bc4e4cadd4621511afa01ca2a353a053fd0e', "active-tab-name": this.activeTabName, class: hostClass, id: this.componentId }, tabList, hAsync("slot", { key: '3f920708c647920af3d0d50f74b5409d30d70af8', name: "tabpanels" })));
26769
+ return (hAsync(Host, { key: '91a9a5cf4348b73ef5ec21430db20468fb67906c', "active-tab-name": this.activeTabName, class: hostClass, id: this.componentId }, tabList, hAsync("slot", { key: 'f0ec002e513f3e91956e905c23e35dae0e6328ad', name: "tabpanels" })));
26022
26770
  }
26023
26771
  get el() { return getElement(this); }
26024
26772
  static get style() { return pdsTabsCss(); }
@@ -26144,7 +26892,7 @@ class PdsText {
26144
26892
  ? `pds-text--decoration-${this.decoration}`
26145
26893
  : ''}
26146
26894
  `;
26147
- return (hAsync(Tag, { key: '98269ec5b06387f89026a4f1327688c611b25a46', ref: (el) => (this.contentEl = el), style: this.color && setColor(this.color), class: typeClasses, part: "content" }, hAsync("slot", { key: '73b6169bdd25a73930d1a01db3a0b5359491ab67' })));
26895
+ return (hAsync(Tag, { key: '6ae89af63963745cd4e8fa734a62f37bc27c59ac', ref: (el) => (this.contentEl = el), style: this.color && setColor(this.color), class: typeClasses, part: "content" }, hAsync("slot", { key: '008f5852aeb4b43cff1a2fea9be9d8fbba9f7934' })));
26148
26896
  }
26149
26897
  get el() { return getElement(this); }
26150
26898
  static get watchers() { return {
@@ -26490,10 +27238,10 @@ class PdsTextarea {
26490
27238
  }
26491
27239
  render() {
26492
27240
  const value = this.getValue();
26493
- return (hAsync(Host, { key: '2544624ceb5a51981954b76eb7a96f8bf0a258b5', "aria-disabled": this.disabled ? 'true' : null, "aria-readonly": this.readonly ? 'true' : null, "has-action": this.hasAction && !this.hideLabel ? 'true' : null }, hAsync("div", { key: 'e85e356a15dd11bbea276b122e67da23342e6ceb', class: "pds-textarea" }, this.label &&
26494
- hAsync("div", { key: '452e96073c2045c2cb2dfa0c9ef7f7102096ab51', class: "pds-textarea__label-wrapper" }, hAsync("label", { key: '84f88bb8211120801cab8b0d7a4915a128fadbfb', htmlFor: this.componentId }, hAsync("span", { key: '43038785de0cb8c833ccd546a00bfc8879c94ecb', class: this.hideLabel ? 'visually-hidden' : '' }, this.label)), !this.hideLabel && this.renderAction()), hAsync("div", { key: '868a11635731026168c1ff75d81121ddb96ab7a6', class: "pds-textarea__field-wrapper" }, hAsync("textarea", Object.assign({ key: '80cb7da264045aba177d20f18df31b274afbf485', 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 &&
26495
- hAsync("p", { key: '493b4378b668a96c7c66cbf2435f9c9d06bd0a72', class: "pds-textarea__helper-message", id: messageId(this.componentId, 'helper') }, this.helperMessage), this.invalid &&
26496
- hAsync("p", { key: 'ae6826d389a2a92fbff8de62a0fd55811764eb15', "aria-live": "assertive", class: "pds-textarea__error-message", id: messageId(this.componentId, 'error') }, hAsync("pds-icon", { key: 'e3dd638311ee2617c8b8ae5743b4e87e5a773ebd', icon: danger, size: "small" }), this.errorMessage))));
27241
+ return (hAsync(Host, { key: '5933dab0c3cd25b1cf2f6851ece8e8064bc7f3b9', "aria-disabled": this.disabled ? 'true' : null, "aria-readonly": this.readonly ? 'true' : null, "has-action": this.hasAction && !this.hideLabel ? 'true' : null }, hAsync("div", { key: '4f1752514d8e5b0f0e3439515cb9e5f043607da1', class: "pds-textarea" }, this.label &&
27242
+ hAsync("div", { key: 'd4e6df0b381d781b70eeae72ff2f0e9428c0d901', class: "pds-textarea__label-wrapper" }, hAsync("label", { key: '747d82067eb571d02840cfd981865821099f288b', htmlFor: this.componentId }, hAsync("span", { key: 'bfab6e8ede66d0169dd020b7dd97e125aba417b0', class: this.hideLabel ? 'visually-hidden' : '' }, this.label)), !this.hideLabel && this.renderAction()), hAsync("div", { key: 'a18611c03270e7491c1af69f931419c832192c06', class: "pds-textarea__field-wrapper" }, hAsync("textarea", Object.assign({ key: '868382c7b04a4e59c0daa9d98afcdc9048f6224f', 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 &&
27243
+ hAsync("p", { key: 'dcb36f21443d2a782c25b7c29c4ce6215f3b212b', class: "pds-textarea__helper-message", id: messageId(this.componentId, 'helper') }, this.helperMessage), this.invalid &&
27244
+ hAsync("p", { key: 'be30fb1a38453296e26b775955389c0ec569df67', "aria-live": "assertive", class: "pds-textarea__error-message", id: messageId(this.componentId, 'error') }, hAsync("pds-icon", { key: 'd93dce10d9d9db5815ac5f331848940aed735ba0', icon: danger, size: "small" }), this.errorMessage))));
26497
27245
  }
26498
27246
  static get formAssociated() { return true; }
26499
27247
  get el() { return getElement(this); }
@@ -26667,13 +27415,13 @@ class PdsToast {
26667
27415
  return this.icon && hAsync("pds-icon", { name: this.icon, class: "pds-toast__icon" });
26668
27416
  }
26669
27417
  render() {
26670
- return (hAsync(Host, { key: '250f871e3dfe412a11e8fe4c0e43c5ef7d886e9b', hidden: !this.isVisible }, hAsync("div", { key: '8c9d995cd597544a3c6ded08d18e09ff4619b364', class: {
27418
+ return (hAsync(Host, { key: '754a4583cefca47a3d3fea7dab036c06ea8aabcd', hidden: !this.isVisible }, hAsync("div", { key: '8ac294344ca459202c0883e724e09a4218342cc4', class: {
26671
27419
  'pds-toast': true,
26672
27420
  [`pds-toast--${this.type}`]: this.type !== 'default',
26673
27421
  'pds-toast--animating-out': this.isAnimatingOut
26674
- }, role: "alert", "aria-live": "polite" }, this.renderIcon(), hAsync("span", { key: '83c4cad9b619ca0ad77721b7472e240719459290', class: "pds-toast__message" }, hAsync("slot", { key: 'c2420b955c89eb8e32dd4a1aa8d89bbbbf1b9ca9' })), this.dismissible && (hAsync("button", { key: '940bb9f1d235d7c31a334bec9aefdfdbd1c5ccfd', type: "button", part: "dismiss", class: "pds-toast__button", onClick: () => {
27422
+ }, role: "alert", "aria-live": "polite" }, this.renderIcon(), hAsync("span", { key: 'eaf615d41c138e2c73088d29bac9349f49a63ba7', class: "pds-toast__message" }, hAsync("slot", { key: '33973447154d80b016f5a7954b0473db03228379' })), this.dismissible && (hAsync("button", { key: 'e189834633e1e648282ee43633fd05e53ce38869', type: "button", part: "dismiss", class: "pds-toast__button", onClick: () => {
26675
27423
  this.dismiss();
26676
- }, "aria-label": this.dismissLabel }, hAsync("pds-icon", { key: 'f6b68f4cf9df23b367ade351dd4f00fc6f6e6442', name: "remove" }))))));
27424
+ }, "aria-label": this.dismissLabel }, hAsync("pds-icon", { key: '623a0e4d56e30781fb31bcd085511c17a4777edc', name: "remove" }))))));
26677
27425
  }
26678
27426
  get el() { return getElement(this); }
26679
27427
  static get watchers() { return {
@@ -27048,9 +27796,9 @@ class PdsTooltip {
27048
27796
  }
27049
27797
  render() {
27050
27798
  const hostId = this.componentId || undefined;
27051
- return (hAsync(Host, { key: 'e80abb11248d9bf6aec1ae738c61692594975630', id: hostId, class: { 'pds-tooltip--is-open': this.opened } }, hAsync("span", { key: '9ff484925a1792302eee230a5c37a0268d536935', class: "pds-tooltip__trigger", onMouseEnter: this.handleShow, onMouseLeave: this.handleHide,
27799
+ return (hAsync(Host, { key: '2e28dff93cd22fd3816d71b67e38883061a8b2bc', id: hostId, class: { 'pds-tooltip--is-open': this.opened } }, hAsync("span", { key: '9e7ea50427587f61dcea1ea97e10d71f4d0c9d92', class: "pds-tooltip__trigger", onMouseEnter: this.handleShow, onMouseLeave: this.handleHide,
27052
27800
  /* focusin/out bubble; ensure keyboard users see tooltips */
27053
- onFocusin: this.handleShow, onFocusout: this.handleHide, ref: el => this.triggerEl = el }, hAsync("slot", { key: '738c314a816e82fd81a0c0e9895d51af45b75eb2' })), hAsync("div", { key: '5b0477cd433cae0b53c4d5ce5767dc703be28ee0', class: "pds-tooltip__content-slot-wrapper", hidden: true }, hAsync("slot", { key: '51ad497357c1d1547bba69d07fd7fa1b675c021f', name: "content" }))));
27801
+ onFocusin: this.handleShow, onFocusout: this.handleHide, ref: el => this.triggerEl = el }, hAsync("slot", { key: '08c1ff63c91b97b4df1362eb9b2e42b6fd556b11' })), hAsync("div", { key: '5cfe25e21d1f096b76335570fbb930a7bc8c95f8', class: "pds-tooltip__content-slot-wrapper", hidden: true }, hAsync("slot", { key: 'e7e8728d7c8a0c74933cef070aa38f88a1f53a32', name: "content" }))));
27054
27802
  }
27055
27803
  get el() { return getElement(this); }
27056
27804
  static get watchers() { return {