@pine-ds/core 4.11.0 → 4.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (506) hide show
  1. package/components/aria-references.js +1 -0
  2. package/components/attributes.js +1 -1
  3. package/components/index2.js +1 -1
  4. package/components/pds-alert.js +1 -1
  5. package/components/pds-avatar.js +1 -1
  6. package/components/pds-box2.js +1 -1
  7. package/components/pds-button2.js +1 -1
  8. package/components/pds-checkbox2.js +1 -1
  9. package/components/pds-chip2.js +1 -1
  10. package/components/pds-combobox.js +2 -2
  11. package/components/pds-copytext.js +1 -1
  12. package/components/pds-datepicker.js +1 -1
  13. package/components/pds-drawer-content.js +1 -1
  14. package/components/pds-drawer-footer.js +1 -1
  15. package/components/pds-drawer-header.js +1 -1
  16. package/components/pds-drawer.js +1 -1
  17. package/components/pds-dropdown-menu-item.js +1 -1
  18. package/components/pds-dropdown-menu-separator.js +1 -1
  19. package/components/pds-dropdown-menu.js +1 -1
  20. package/components/pds-filter.js +1 -1
  21. package/components/pds-image.js +1 -1
  22. package/components/pds-input2.js +1 -1
  23. package/components/pds-link2.js +1 -1
  24. package/components/pds-loader2.js +1 -1
  25. package/components/pds-modal-footer.js +1 -1
  26. package/components/pds-modal-header.js +1 -1
  27. package/components/pds-modal2.js +1 -1
  28. package/components/pds-multiselect.js +1 -1
  29. package/components/pds-popover.js +1 -1
  30. package/components/pds-progress.js +1 -1
  31. package/components/pds-radio-group.js +1 -1
  32. package/components/pds-radio.js +1 -1
  33. package/components/pds-select.js +1 -1
  34. package/components/pds-sortable-item.js +1 -1
  35. package/components/pds-sortable.js +2 -2
  36. package/components/pds-switch.js +1 -1
  37. package/components/pds-table-body.js +1 -1
  38. package/components/pds-table-cell2.js +1 -1
  39. package/components/pds-table-head-cell2.js +1 -1
  40. package/components/pds-table-head.js +1 -1
  41. package/components/pds-table-row.js +1 -1
  42. package/components/pds-table.js +1 -1
  43. package/components/pds-tabs.js +1 -1
  44. package/components/pds-text2.js +1 -1
  45. package/components/pds-textarea.js +1 -1
  46. package/components/pds-toast.js +1 -1
  47. package/components/pds-tooltip.js +1 -1
  48. package/components/sortable-label.js +1 -0
  49. package/components/truncation-tooltip.js +1 -1
  50. package/dist/cjs/aria-references-CUmqibnO.js +54 -0
  51. package/dist/cjs/{attributes-CW49XqaL.js → attributes-Cgbkw6gO.js} +3 -0
  52. package/dist/cjs/loader.cjs.js +1 -1
  53. package/dist/cjs/pds-alert.cjs.entry.js +2 -2
  54. package/dist/cjs/pds-avatar.cjs.entry.js +3 -2
  55. package/dist/cjs/pds-box.cjs.entry.js +4 -3
  56. package/dist/cjs/pds-button.cjs.entry.js +25 -45
  57. package/dist/cjs/pds-checkbox.cjs.entry.js +4 -4
  58. package/dist/cjs/pds-chip.cjs.entry.js +3 -3
  59. package/dist/cjs/pds-combobox.cjs.entry.js +246 -106
  60. package/dist/cjs/pds-copytext.cjs.entry.js +3 -3
  61. package/dist/cjs/pds-datepicker.cjs.entry.js +44 -9
  62. package/dist/cjs/pds-drawer-content.cjs.entry.js +1 -1
  63. package/dist/cjs/pds-drawer-footer.cjs.entry.js +1 -1
  64. package/dist/cjs/pds-drawer-header.cjs.entry.js +1 -1
  65. package/dist/cjs/pds-drawer.cjs.entry.js +5 -7
  66. package/dist/cjs/pds-dropdown-menu-item.cjs.entry.js +85 -49
  67. package/dist/cjs/pds-dropdown-menu-separator.cjs.entry.js +2 -2
  68. package/dist/cjs/pds-dropdown-menu.cjs.entry.js +83 -10
  69. package/dist/cjs/pds-filter.cjs.entry.js +24 -2
  70. package/dist/cjs/pds-image.cjs.entry.js +148 -6
  71. package/dist/cjs/pds-input.cjs.entry.js +4 -4
  72. package/dist/cjs/pds-link.cjs.entry.js +4 -5
  73. package/dist/cjs/pds-loader.cjs.entry.js +4 -3
  74. package/dist/cjs/pds-modal-footer.cjs.entry.js +1 -1
  75. package/dist/cjs/pds-modal-header.cjs.entry.js +1 -1
  76. package/dist/cjs/pds-modal.cjs.entry.js +9 -12
  77. package/dist/cjs/pds-multiselect.cjs.entry.js +64 -18
  78. package/dist/cjs/pds-popover.cjs.entry.js +8 -6
  79. package/dist/cjs/pds-progress.cjs.entry.js +3 -3
  80. package/dist/cjs/pds-radio-group.cjs.entry.js +4 -4
  81. package/dist/cjs/pds-radio.cjs.entry.js +6 -6
  82. package/dist/cjs/pds-row.cjs.entry.js +1 -1
  83. package/dist/cjs/pds-select.cjs.entry.js +2 -2
  84. package/dist/cjs/pds-sortable-item.cjs.entry.js +28 -5
  85. package/dist/cjs/pds-sortable.cjs.entry.js +356 -4
  86. package/dist/cjs/pds-switch.cjs.entry.js +92 -15
  87. package/dist/cjs/pds-tab.cjs.entry.js +1 -1
  88. package/dist/cjs/pds-table-body.cjs.entry.js +1 -1
  89. package/dist/cjs/pds-table-cell.cjs.entry.js +24 -5
  90. package/dist/cjs/pds-table-head-cell.cjs.entry.js +59 -11
  91. package/dist/cjs/pds-table-head.cjs.entry.js +1 -1
  92. package/dist/cjs/pds-table-row.cjs.entry.js +1 -1
  93. package/dist/cjs/pds-table.cjs.entry.js +260 -5
  94. package/dist/cjs/pds-tabpanel.cjs.entry.js +1 -1
  95. package/dist/cjs/pds-tabs.cjs.entry.js +3 -3
  96. package/dist/cjs/pds-text.cjs.entry.js +5 -3
  97. package/dist/cjs/pds-textarea.cjs.entry.js +8 -7
  98. package/dist/cjs/pds-toast.cjs.entry.js +8 -4
  99. package/dist/cjs/pds-tooltip.cjs.entry.js +1 -1
  100. package/dist/cjs/pine-core.cjs.js +1 -1
  101. package/dist/cjs/sortable-label-DOcJrHvA.js +37 -0
  102. package/dist/cjs/{truncation-tooltip-Bikp7n9I.js → truncation-tooltip-CM5HgRHh.js} +69 -0
  103. package/dist/collection/components/pds-alert/pds-alert.css +0 -3
  104. package/dist/collection/components/pds-alert/pds-alert.js +3 -2
  105. package/dist/collection/components/pds-avatar/pds-avatar.js +7 -6
  106. package/dist/collection/components/pds-avatar/stories/pds-avatar.stories.js +1 -1
  107. package/dist/collection/components/pds-box/pds-box.css +1273 -1189
  108. package/dist/collection/components/pds-box/pds-box.js +180 -156
  109. package/dist/collection/components/pds-box/stories/pds-box.stories.js +79 -37
  110. package/dist/collection/components/pds-button/pds-button.js +26 -4
  111. package/dist/collection/components/pds-button/stories/pds-button.stories.js +25 -11
  112. package/dist/collection/components/pds-checkbox/pds-checkbox.js +10 -10
  113. package/dist/collection/components/pds-chip/pds-chip.js +3 -3
  114. package/dist/collection/components/pds-combobox/pds-combobox.css +162 -53
  115. package/dist/collection/components/pds-combobox/pds-combobox.js +261 -121
  116. package/dist/collection/components/pds-combobox/stories/pds-combobox.stories.js +35 -4
  117. package/dist/collection/components/pds-copytext/pds-copytext.js +2 -2
  118. package/dist/collection/components/pds-datepicker/pds-datepicker.js +3 -3
  119. package/dist/collection/components/pds-datepicker/presets.js +42 -7
  120. package/dist/collection/components/pds-drawer/pds-drawer-content/pds-drawer-content.js +2 -5
  121. package/dist/collection/components/pds-drawer/pds-drawer-footer/pds-drawer-footer.js +2 -1
  122. package/dist/collection/components/pds-drawer/pds-drawer-header/pds-drawer-header.js +2 -1
  123. package/dist/collection/components/pds-drawer/pds-drawer.js +8 -10
  124. package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-item/pds-dropdown-menu-item.css +17 -8
  125. package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-item/pds-dropdown-menu-item.js +95 -62
  126. package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-separator/pds-dropdown-menu-separator.js +3 -3
  127. package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu.css +2 -0
  128. package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu.js +84 -9
  129. package/dist/collection/components/pds-dropdown-menu/stories/pds-dropdown-menu.stories.js +24 -1
  130. package/dist/collection/components/pds-filters/pds-filter/pds-filter.css +2 -1
  131. package/dist/collection/components/pds-filters/pds-filter/pds-filter.js +24 -7
  132. package/dist/collection/components/pds-image/image-interface.js +1 -0
  133. package/dist/collection/components/pds-image/pds-image.css +11 -0
  134. package/dist/collection/components/pds-image/pds-image.js +249 -8
  135. package/dist/collection/components/pds-image/stories/pds-image.stories.js +117 -1
  136. package/dist/collection/components/pds-input/pds-input.js +14 -9
  137. package/dist/collection/components/pds-link/pds-link.js +10 -14
  138. package/dist/collection/components/pds-link/stories/pds-link.stories.js +6 -2
  139. package/dist/collection/components/pds-loader/pds-loader.js +5 -4
  140. package/dist/collection/components/pds-modal/pds-modal-footer/pds-modal-footer.js +2 -1
  141. package/dist/collection/components/pds-modal/pds-modal-header/pds-modal-header.js +2 -1
  142. package/dist/collection/components/pds-modal/pds-modal.js +11 -13
  143. package/dist/collection/components/pds-modal/stories/pds-modal.stories.js +7 -7
  144. package/dist/collection/components/pds-multiselect/pds-multiselect.css +2 -2
  145. package/dist/collection/components/pds-multiselect/pds-multiselect.js +63 -18
  146. package/dist/collection/components/pds-popover/pds-popover.css +1 -1
  147. package/dist/collection/components/pds-popover/pds-popover.js +9 -7
  148. package/dist/collection/components/pds-progress/pds-progress.js +4 -4
  149. package/dist/collection/components/pds-radio/pds-radio.css +5 -1
  150. package/dist/collection/components/pds-radio/pds-radio.js +9 -9
  151. package/dist/collection/components/pds-radio/stories/pds-radio.stories.js +9 -9
  152. package/dist/collection/components/pds-radio-group/pds-radio-group.js +7 -7
  153. package/dist/collection/components/pds-radio-group/stories/pds-radio-group.stories.js +3 -3
  154. package/dist/collection/components/pds-row/stories/pds-row.stories.js +15 -14
  155. package/dist/collection/components/pds-select/pds-select.js +7 -4
  156. package/dist/collection/components/pds-sortable/pds-sortable-item/pds-sortable-item.css +38 -0
  157. package/dist/collection/components/pds-sortable/pds-sortable-item/pds-sortable-item.js +47 -5
  158. package/dist/collection/components/pds-sortable/pds-sortable.js +481 -5
  159. package/dist/collection/components/pds-sortable/sortable-label.js +33 -0
  160. package/dist/collection/components/pds-sortable/stories/pds-sortable.stories.js +27 -0
  161. package/dist/collection/components/pds-switch/pds-switch.js +114 -17
  162. package/dist/collection/components/pds-switch/stories/pds-switch.stories.js +79 -0
  163. package/dist/collection/components/pds-table/pds-table-body/pds-table-body.js +4 -1
  164. package/dist/collection/components/pds-table/pds-table-cell/pds-table-cell.js +47 -4
  165. package/dist/collection/components/pds-table/pds-table-head/pds-table-head.js +6 -2
  166. package/dist/collection/components/pds-table/pds-table-head-cell/pds-table-head-cell.css +11 -0
  167. package/dist/collection/components/pds-table/pds-table-head-cell/pds-table-head-cell.js +98 -10
  168. package/dist/collection/components/pds-table/pds-table-row/pds-table-row.js +5 -1
  169. package/dist/collection/components/pds-table/pds-table.css +8 -0
  170. package/dist/collection/components/pds-table/pds-table.js +295 -7
  171. package/dist/collection/components/pds-table/stories/pds-table.stories.js +131 -6
  172. package/dist/collection/components/pds-tabs/pds-tabs.js +3 -3
  173. package/dist/collection/components/pds-tabs/stories/pds-tabs.stories.js +1 -1
  174. package/dist/collection/components/pds-text/pds-text.js +5 -3
  175. package/dist/collection/components/pds-textarea/pds-textarea.js +16 -14
  176. package/dist/collection/components/pds-textarea/stories/pds-textarea.stories.js +2 -13
  177. package/dist/collection/components/pds-toast/pds-toast.css +4 -3
  178. package/dist/collection/components/pds-toast/pds-toast.js +9 -5
  179. package/dist/collection/components/pds-toast/stories/pds-toast.stories.js +2 -2
  180. package/dist/collection/components/pds-tooltip/pds-tooltip.css +2 -1
  181. package/dist/collection/components/pds-tooltip/stories/pds-tooltip.stories.js +17 -17
  182. package/dist/collection/utils/aria-references.js +9 -3
  183. package/dist/collection/utils/truncation-tooltip.js +67 -0
  184. package/dist/docs.json +1124 -374
  185. package/dist/esm/aria-references-CNn1lObg.js +50 -0
  186. package/dist/esm/{attributes-DkeVeN0g.js → attributes-CD8knu3a.js} +3 -0
  187. package/dist/esm/{index-DvN3tyZp.js → index-B0DXTeeV.js} +1 -1
  188. package/dist/esm/loader.js +1 -1
  189. package/dist/esm/pds-accordion.entry.js +1 -1
  190. package/dist/esm/pds-alert.entry.js +2 -2
  191. package/dist/esm/pds-avatar.entry.js +4 -3
  192. package/dist/esm/pds-box.entry.js +4 -3
  193. package/dist/esm/pds-button.entry.js +24 -44
  194. package/dist/esm/pds-checkbox.entry.js +5 -5
  195. package/dist/esm/pds-chip.entry.js +4 -4
  196. package/dist/esm/pds-combobox.entry.js +246 -106
  197. package/dist/esm/pds-copytext.entry.js +4 -4
  198. package/dist/esm/pds-datepicker.entry.js +45 -10
  199. package/dist/esm/pds-drawer-content.entry.js +1 -1
  200. package/dist/esm/pds-drawer-footer.entry.js +1 -1
  201. package/dist/esm/pds-drawer-header.entry.js +1 -1
  202. package/dist/esm/pds-drawer.entry.js +5 -7
  203. package/dist/esm/pds-dropdown-menu-item.entry.js +85 -49
  204. package/dist/esm/pds-dropdown-menu-separator.entry.js +2 -2
  205. package/dist/esm/pds-dropdown-menu.entry.js +84 -11
  206. package/dist/esm/pds-filter.entry.js +25 -3
  207. package/dist/esm/pds-image.entry.js +149 -7
  208. package/dist/esm/pds-input.entry.js +5 -5
  209. package/dist/esm/pds-link.entry.js +5 -6
  210. package/dist/esm/pds-loader.entry.js +4 -3
  211. package/dist/esm/pds-modal-footer.entry.js +1 -1
  212. package/dist/esm/pds-modal-header.entry.js +1 -1
  213. package/dist/esm/pds-modal.entry.js +9 -12
  214. package/dist/esm/pds-multiselect.entry.js +65 -19
  215. package/dist/esm/pds-popover.entry.js +8 -6
  216. package/dist/esm/pds-progress.entry.js +3 -3
  217. package/dist/esm/pds-radio-group.entry.js +5 -5
  218. package/dist/esm/pds-radio.entry.js +7 -7
  219. package/dist/esm/pds-row.entry.js +1 -1
  220. package/dist/esm/pds-select.entry.js +3 -3
  221. package/dist/esm/pds-sortable-item.entry.js +29 -6
  222. package/dist/esm/pds-sortable.entry.js +357 -5
  223. package/dist/esm/pds-switch.entry.js +94 -17
  224. package/dist/esm/pds-tab.entry.js +1 -1
  225. package/dist/esm/pds-table-body.entry.js +1 -1
  226. package/dist/esm/pds-table-cell.entry.js +24 -5
  227. package/dist/esm/pds-table-head-cell.entry.js +60 -12
  228. package/dist/esm/pds-table-head.entry.js +1 -1
  229. package/dist/esm/pds-table-row.entry.js +1 -1
  230. package/dist/esm/pds-table.entry.js +261 -6
  231. package/dist/esm/pds-tabpanel.entry.js +1 -1
  232. package/dist/esm/pds-tabs.entry.js +3 -3
  233. package/dist/esm/pds-text.entry.js +5 -3
  234. package/dist/esm/pds-textarea.entry.js +9 -8
  235. package/dist/esm/pds-toast.entry.js +8 -4
  236. package/dist/esm/pds-tooltip.entry.js +1 -1
  237. package/dist/esm/pine-core.js +1 -1
  238. package/dist/esm/sortable-label-PItnzVVR.js +35 -0
  239. package/dist/esm/{truncation-tooltip-DBcPipr9.js → truncation-tooltip-CkIWm6Z-.js} +68 -1
  240. package/dist/esm-es5/aria-references-CNn1lObg.js +1 -0
  241. package/dist/esm-es5/{attributes-DkeVeN0g.js → attributes-CD8knu3a.js} +1 -1
  242. package/dist/esm-es5/{index-DvN3tyZp.js → index-B0DXTeeV.js} +1 -1
  243. package/dist/esm-es5/loader.js +1 -1
  244. package/dist/esm-es5/pds-accordion.entry.js +1 -1
  245. package/dist/esm-es5/pds-alert.entry.js +1 -1
  246. package/dist/esm-es5/pds-avatar.entry.js +1 -1
  247. package/dist/esm-es5/pds-box.entry.js +1 -1
  248. package/dist/esm-es5/pds-button.entry.js +1 -1
  249. package/dist/esm-es5/pds-checkbox.entry.js +1 -1
  250. package/dist/esm-es5/pds-chip.entry.js +1 -1
  251. package/dist/esm-es5/pds-combobox.entry.js +1 -1
  252. package/dist/esm-es5/pds-copytext.entry.js +1 -1
  253. package/dist/esm-es5/pds-datepicker.entry.js +1 -1
  254. package/dist/esm-es5/pds-drawer-content.entry.js +1 -1
  255. package/dist/esm-es5/pds-drawer-footer.entry.js +1 -1
  256. package/dist/esm-es5/pds-drawer-header.entry.js +1 -1
  257. package/dist/esm-es5/pds-drawer.entry.js +1 -1
  258. package/dist/esm-es5/pds-dropdown-menu-item.entry.js +1 -1
  259. package/dist/esm-es5/pds-dropdown-menu-separator.entry.js +1 -1
  260. package/dist/esm-es5/pds-dropdown-menu.entry.js +1 -1
  261. package/dist/esm-es5/pds-filter.entry.js +1 -1
  262. package/dist/esm-es5/pds-image.entry.js +1 -1
  263. package/dist/esm-es5/pds-input.entry.js +1 -1
  264. package/dist/esm-es5/pds-link.entry.js +1 -1
  265. package/dist/esm-es5/pds-loader.entry.js +1 -1
  266. package/dist/esm-es5/pds-modal-footer.entry.js +1 -1
  267. package/dist/esm-es5/pds-modal-header.entry.js +1 -1
  268. package/dist/esm-es5/pds-modal.entry.js +1 -1
  269. package/dist/esm-es5/pds-multiselect.entry.js +1 -1
  270. package/dist/esm-es5/pds-popover.entry.js +1 -1
  271. package/dist/esm-es5/pds-progress.entry.js +1 -1
  272. package/dist/esm-es5/pds-radio-group.entry.js +1 -1
  273. package/dist/esm-es5/pds-radio.entry.js +1 -1
  274. package/dist/esm-es5/pds-row.entry.js +1 -1
  275. package/dist/esm-es5/pds-select.entry.js +1 -1
  276. package/dist/esm-es5/pds-sortable-item.entry.js +1 -1
  277. package/dist/esm-es5/pds-sortable.entry.js +2 -2
  278. package/dist/esm-es5/pds-switch.entry.js +1 -1
  279. package/dist/esm-es5/pds-tab.entry.js +1 -1
  280. package/dist/esm-es5/pds-table-body.entry.js +1 -1
  281. package/dist/esm-es5/pds-table-cell.entry.js +1 -1
  282. package/dist/esm-es5/pds-table-head-cell.entry.js +1 -1
  283. package/dist/esm-es5/pds-table-head.entry.js +1 -1
  284. package/dist/esm-es5/pds-table-row.entry.js +1 -1
  285. package/dist/esm-es5/pds-table.entry.js +1 -1
  286. package/dist/esm-es5/pds-tabpanel.entry.js +1 -1
  287. package/dist/esm-es5/pds-tabs.entry.js +1 -1
  288. package/dist/esm-es5/pds-text.entry.js +1 -1
  289. package/dist/esm-es5/pds-textarea.entry.js +1 -1
  290. package/dist/esm-es5/pds-toast.entry.js +1 -1
  291. package/dist/esm-es5/pds-tooltip.entry.js +1 -1
  292. package/dist/esm-es5/pine-core.js +1 -1
  293. package/dist/esm-es5/sortable-label-PItnzVVR.js +1 -0
  294. package/dist/esm-es5/truncation-tooltip-CkIWm6Z-.js +1 -0
  295. package/dist/pine-core/{p-f834cb07.system.entry.js → p-00891b8d.system.entry.js} +1 -1
  296. package/dist/pine-core/{p-3f8bd3fb.system.entry.js → p-053ff8eb.system.entry.js} +1 -1
  297. package/dist/pine-core/p-08b9e3ad.entry.js +1 -0
  298. package/dist/pine-core/{p-4d98bc0c.system.entry.js → p-0a7570dd.system.entry.js} +1 -1
  299. package/dist/pine-core/{p-d018dc60.system.entry.js → p-0ac4262e.system.entry.js} +1 -1
  300. package/dist/pine-core/{p-89d38a82.system.entry.js → p-0e1b8bd1.system.entry.js} +1 -1
  301. package/dist/pine-core/{p-e1d1b5d8.entry.js → p-12fdc65f.entry.js} +1 -1
  302. package/dist/pine-core/{p-d48fe5a0.system.entry.js → p-16fceef6.system.entry.js} +1 -1
  303. package/dist/pine-core/p-1765a41b.system.entry.js +1 -0
  304. package/dist/pine-core/{p-a594c41f.entry.js → p-18524c25.entry.js} +1 -1
  305. package/dist/pine-core/p-1a013a5c.system.entry.js +1 -0
  306. package/dist/pine-core/{p-2b9622c1.system.entry.js → p-1ab52531.system.entry.js} +1 -1
  307. package/dist/pine-core/p-1c584a20.entry.js +1 -0
  308. package/dist/pine-core/p-1edef412.entry.js +1 -0
  309. package/dist/pine-core/{p-5946203c.entry.js → p-1f998e3e.entry.js} +1 -1
  310. package/dist/pine-core/{p-39e57657.entry.js → p-1fb1ca3d.entry.js} +1 -1
  311. package/dist/pine-core/p-2b6becc2.entry.js +1 -0
  312. package/dist/pine-core/p-2cc7c682.entry.js +1 -0
  313. package/dist/pine-core/{p-639acef8.system.entry.js → p-2ddcd845.system.entry.js} +1 -1
  314. package/dist/pine-core/{p-6a1aa8d3.entry.js → p-2f15e85f.entry.js} +1 -1
  315. package/dist/pine-core/{p-67f795d5.system.entry.js → p-33da254f.system.entry.js} +1 -1
  316. package/dist/pine-core/{p-c6a9e62c.system.entry.js → p-3fc9ef80.system.entry.js} +1 -1
  317. package/dist/pine-core/p-4125a4a6.system.entry.js +1 -0
  318. package/dist/pine-core/p-47df9e9f.system.entry.js +3 -0
  319. package/dist/pine-core/p-51680c9c.system.entry.js +1 -0
  320. package/dist/pine-core/p-55535481.system.entry.js +1 -0
  321. package/dist/pine-core/p-55a4659a.system.entry.js +1 -0
  322. package/dist/pine-core/{p-c5e1eb3c.system.entry.js → p-57af5c29.system.entry.js} +1 -1
  323. package/dist/pine-core/p-57edd301.system.entry.js +1 -0
  324. package/dist/pine-core/{p-bfa34194.entry.js → p-5d582798.entry.js} +1 -1
  325. package/dist/pine-core/p-5db87fda.system.entry.js +1 -0
  326. package/dist/pine-core/{p-19cf1d91.system.entry.js → p-5eb0c78c.system.entry.js} +1 -1
  327. package/dist/pine-core/{p-42f70f93.system.entry.js → p-6017afb5.system.entry.js} +1 -1
  328. package/dist/pine-core/{p-63f85859.system.entry.js → p-60e65fe0.system.entry.js} +1 -1
  329. package/dist/pine-core/{p-973c3ac0.entry.js → p-627a94da.entry.js} +1 -1
  330. package/dist/pine-core/{p-a9d96e22.entry.js → p-68328afc.entry.js} +1 -1
  331. package/dist/pine-core/{p-bd7dc317.system.entry.js → p-72668673.system.entry.js} +1 -1
  332. package/dist/pine-core/p-72ff5ad2.system.entry.js +1 -0
  333. package/dist/pine-core/p-736ea7dd.entry.js +7 -0
  334. package/dist/pine-core/p-765f4207.entry.js +1 -0
  335. package/dist/pine-core/{p-2a18852f.entry.js → p-77530cf2.entry.js} +1 -1
  336. package/dist/pine-core/p-77a22399.entry.js +1 -0
  337. package/dist/pine-core/p-783127bf.entry.js +1 -0
  338. package/dist/pine-core/{p-d9719e37.entry.js → p-82f7eed1.entry.js} +1 -1
  339. package/dist/pine-core/{p-124a0a24.entry.js → p-84d4ae26.entry.js} +1 -1
  340. package/dist/pine-core/p-8deeda07.entry.js +1 -0
  341. package/dist/pine-core/{p-849ec281.system.entry.js → p-8e17a6d8.system.entry.js} +1 -1
  342. package/dist/pine-core/p-8e7e7bba.entry.js +1 -0
  343. package/dist/pine-core/{p-e82f758f.system.entry.js → p-907c69e9.system.entry.js} +1 -1
  344. package/dist/pine-core/{p-1415c988.system.entry.js → p-90f83a5b.system.entry.js} +1 -1
  345. package/dist/pine-core/p-97145eee.system.entry.js +1 -0
  346. package/dist/pine-core/{p-a09c9c5e.system.entry.js → p-9d983e09.system.entry.js} +1 -1
  347. package/dist/pine-core/{p-1e3ef425.entry.js → p-9e005996.entry.js} +1 -1
  348. package/dist/pine-core/{p-DvN3tyZp.js → p-B0DXTeeV.js} +1 -1
  349. package/dist/pine-core/{p-CNXspDYs.system.js → p-BlJQebvG.system.js} +1 -1
  350. package/dist/pine-core/p-C35-349-.system.js +1 -0
  351. package/dist/pine-core/{p-vFsJv75D.system.js → p-CIe1DGXa.system.js} +1 -1
  352. package/dist/pine-core/p-CNn1lObg.js +1 -0
  353. package/dist/pine-core/p-CQJ44c6o.system.js +1 -0
  354. package/dist/pine-core/p-Dv9QBmIF.js +1 -0
  355. package/dist/pine-core/p-PItnzVVR.js +1 -0
  356. package/dist/pine-core/p-VPGVqK3P.system.js +1 -0
  357. package/dist/pine-core/p-XK45dzWR.system.js +1 -1
  358. package/dist/pine-core/p-a149af29.entry.js +1 -0
  359. package/dist/pine-core/p-a20d9eca.system.entry.js +1 -0
  360. package/dist/pine-core/{p-f6f4fd42.entry.js → p-a5782d99.entry.js} +1 -1
  361. package/dist/pine-core/p-a5e9c583.entry.js +1 -0
  362. package/dist/pine-core/{p-4d47023c.system.entry.js → p-a9eaf160.system.entry.js} +1 -1
  363. package/dist/pine-core/{p-143b33a6.entry.js → p-b00b07e3.entry.js} +1 -1
  364. package/dist/pine-core/{p-c7a53c4f.entry.js → p-b7b29392.entry.js} +1 -1
  365. package/dist/pine-core/p-b96bdff6.entry.js +1 -0
  366. package/dist/pine-core/{p-f71d71ca.entry.js → p-bbd9ab75.entry.js} +1 -1
  367. package/dist/pine-core/p-bdab6c9f.entry.js +1 -0
  368. package/dist/pine-core/p-biShcgLI.js +1 -0
  369. package/dist/pine-core/{p-548bce53.system.entry.js → p-c12b5cd7.system.entry.js} +1 -1
  370. package/dist/pine-core/p-c1dc7692.entry.js +1 -0
  371. package/dist/pine-core/p-c76d8b9e.system.entry.js +1 -0
  372. package/dist/pine-core/{p-590df41a.entry.js → p-c89ea2d3.entry.js} +1 -1
  373. package/dist/pine-core/{p-d920d759.system.entry.js → p-c9630934.system.entry.js} +1 -1
  374. package/dist/pine-core/{p-6f4ab1ea.system.entry.js → p-cb9227f6.system.entry.js} +1 -1
  375. package/dist/pine-core/p-ceef0eb1.entry.js +1 -0
  376. package/dist/pine-core/p-d1283e8d.entry.js +1 -0
  377. package/dist/pine-core/p-d676926d.system.entry.js +1 -0
  378. package/dist/pine-core/{p-61cfdbb2.entry.js → p-d7d7a4e1.entry.js} +1 -1
  379. package/dist/pine-core/p-d85d50cb.entry.js +1 -0
  380. package/dist/pine-core/p-daa802f1.entry.js +2 -0
  381. package/dist/pine-core/p-ddf4b9b5.system.entry.js +1 -0
  382. package/dist/pine-core/p-de3b319e.system.entry.js +8 -0
  383. package/dist/pine-core/{p-cb9baf78.system.entry.js → p-e00777da.system.entry.js} +1 -1
  384. package/dist/pine-core/p-e2541eeb.entry.js +1 -0
  385. package/dist/pine-core/{p-01f1cdaf.system.entry.js → p-e2a1a49a.system.entry.js} +1 -1
  386. package/dist/pine-core/p-e4ebea88.system.entry.js +1 -0
  387. package/dist/pine-core/{p-947582e1.entry.js → p-e554bd64.entry.js} +1 -1
  388. package/dist/pine-core/{p-dd7ded84.entry.js → p-e6427c87.entry.js} +1 -1
  389. package/dist/pine-core/{p-50ddadbf.entry.js → p-e72e8b8f.entry.js} +1 -1
  390. package/dist/pine-core/p-e92d0f0f.system.entry.js +1 -0
  391. package/dist/pine-core/{p-9b32727a.system.entry.js → p-eab165b9.system.entry.js} +1 -1
  392. package/dist/pine-core/p-eabc4bd8.entry.js +1 -0
  393. package/dist/pine-core/p-ef9f84f2.system.entry.js +1 -0
  394. package/dist/pine-core/{p-c9ae7964.entry.js → p-f026af73.entry.js} +1 -1
  395. package/dist/pine-core/{p-99530cb5.entry.js → p-f0509c8e.entry.js} +1 -1
  396. package/dist/pine-core/p-f1252e72.system.entry.js +1 -0
  397. package/dist/pine-core/p-f3496fd1.entry.js +1 -0
  398. package/dist/pine-core/{p-eecd9ad8.system.entry.js → p-f90f4be7.system.entry.js} +1 -1
  399. package/dist/pine-core/p-f9bdaadd.system.entry.js +1 -0
  400. package/dist/pine-core/{p-128c04e7.entry.js → p-fda791df.entry.js} +1 -1
  401. package/dist/pine-core/p-fea4296d.entry.js +1 -0
  402. package/dist/pine-core/pine-core.esm.js +1 -1
  403. package/dist/types/components/pds-alert/pds-alert.d.ts +2 -1
  404. package/dist/types/components/pds-avatar/pds-avatar.d.ts +5 -4
  405. package/dist/types/components/pds-box/pds-box.d.ts +68 -57
  406. package/dist/types/components/pds-button/pds-button.d.ts +14 -3
  407. package/dist/types/components/pds-checkbox/pds-checkbox.d.ts +15 -8
  408. package/dist/types/components/pds-chip/pds-chip.d.ts +2 -2
  409. package/dist/types/components/pds-combobox/pds-combobox.d.ts +48 -11
  410. package/dist/types/components/pds-copytext/pds-copytext.d.ts +3 -1
  411. package/dist/types/components/pds-datepicker/datepicker-interface.d.ts +20 -4
  412. package/dist/types/components/pds-datepicker/pds-datepicker.d.ts +3 -2
  413. package/dist/types/components/pds-datepicker/presets.d.ts +3 -2
  414. package/dist/types/components/pds-drawer/pds-drawer-content/pds-drawer-content.d.ts +1 -4
  415. package/dist/types/components/pds-drawer/pds-drawer-footer/pds-drawer-footer.d.ts +1 -0
  416. package/dist/types/components/pds-drawer/pds-drawer-header/pds-drawer-header.d.ts +1 -0
  417. package/dist/types/components/pds-drawer/pds-drawer.d.ts +4 -6
  418. package/dist/types/components/pds-dropdown-menu/pds-dropdown-menu-item/pds-dropdown-menu-item.d.ts +20 -16
  419. package/dist/types/components/pds-dropdown-menu/pds-dropdown-menu-separator/pds-dropdown-menu-separator.d.ts +1 -1
  420. package/dist/types/components/pds-dropdown-menu/pds-dropdown-menu.d.ts +7 -0
  421. package/dist/types/components/pds-filters/pds-filter/pds-filter.d.ts +6 -5
  422. package/dist/types/components/pds-image/image-interface.d.ts +12 -0
  423. package/dist/types/components/pds-image/pds-image.d.ts +69 -9
  424. package/dist/types/components/pds-input/pds-input.d.ts +17 -7
  425. package/dist/types/components/pds-link/pds-link.d.ts +8 -8
  426. package/dist/types/components/pds-loader/pds-loader.d.ts +3 -2
  427. package/dist/types/components/pds-modal/pds-modal-footer/pds-modal-footer.d.ts +1 -0
  428. package/dist/types/components/pds-modal/pds-modal-header/pds-modal-header.d.ts +1 -0
  429. package/dist/types/components/pds-modal/pds-modal.d.ts +7 -9
  430. package/dist/types/components/pds-multiselect/pds-multiselect.d.ts +14 -8
  431. package/dist/types/components/pds-popover/pds-popover.d.ts +2 -2
  432. package/dist/types/components/pds-progress/pds-progress.d.ts +2 -2
  433. package/dist/types/components/pds-radio/pds-radio.d.ts +6 -5
  434. package/dist/types/components/pds-radio-group/pds-radio-group.d.ts +5 -4
  435. package/dist/types/components/pds-select/pds-select.d.ts +9 -3
  436. package/dist/types/components/pds-sortable/pds-sortable-item/pds-sortable-item.d.ts +8 -2
  437. package/dist/types/components/pds-sortable/pds-sortable.d.ts +82 -1
  438. package/dist/types/components/pds-sortable/sortable-label.d.ts +7 -0
  439. package/dist/types/components/pds-switch/pds-switch.d.ts +17 -2
  440. package/dist/types/components/pds-table/pds-table-body/pds-table-body.d.ts +3 -0
  441. package/dist/types/components/pds-table/pds-table-cell/pds-table-cell.d.ts +10 -0
  442. package/dist/types/components/pds-table/pds-table-head/pds-table-head.d.ts +5 -1
  443. package/dist/types/components/pds-table/pds-table-head-cell/pds-table-head-cell.d.ts +21 -0
  444. package/dist/types/components/pds-table/pds-table-row/pds-table-row.d.ts +4 -0
  445. package/dist/types/components/pds-table/pds-table.d.ts +76 -2
  446. package/dist/types/components/pds-tabs/pds-tabs.d.ts +1 -1
  447. package/dist/types/components/pds-textarea/pds-textarea.d.ts +15 -13
  448. package/dist/types/components/pds-toast/pds-toast.d.ts +5 -1
  449. package/dist/types/components.d.ts +480 -325
  450. package/dist/types/utils/aria-references.d.ts +4 -0
  451. package/dist/types/utils/truncation-tooltip.d.ts +39 -0
  452. package/dist/types/utils/types.d.ts +3 -0
  453. package/dist/vscode.html-data.json +340 -134
  454. package/hydrate/index.js +1800 -353
  455. package/hydrate/index.mjs +1800 -353
  456. package/package.json +3 -3
  457. package/readme.md +26 -55
  458. package/dist/esm-es5/truncation-tooltip-DBcPipr9.js +0 -1
  459. package/dist/pine-core/p-07323107.entry.js +0 -1
  460. package/dist/pine-core/p-08b8e941.entry.js +0 -1
  461. package/dist/pine-core/p-0b7b3fc2.system.entry.js +0 -3
  462. package/dist/pine-core/p-0d5f0ab5.system.entry.js +0 -1
  463. package/dist/pine-core/p-14dedf01.system.entry.js +0 -1
  464. package/dist/pine-core/p-1ca8d183.entry.js +0 -1
  465. package/dist/pine-core/p-1f62bb71.entry.js +0 -7
  466. package/dist/pine-core/p-2dd30d12.entry.js +0 -1
  467. package/dist/pine-core/p-3359a935.entry.js +0 -1
  468. package/dist/pine-core/p-35s7h-dk.js +0 -1
  469. package/dist/pine-core/p-3610cb3b.entry.js +0 -1
  470. package/dist/pine-core/p-39276663.entry.js +0 -1
  471. package/dist/pine-core/p-3a1dc752.system.entry.js +0 -1
  472. package/dist/pine-core/p-42d43c3f.system.entry.js +0 -1
  473. package/dist/pine-core/p-4a90b9c8.system.entry.js +0 -1
  474. package/dist/pine-core/p-4cfe922b.entry.js +0 -1
  475. package/dist/pine-core/p-5f181694.system.entry.js +0 -1
  476. package/dist/pine-core/p-60a30975.system.entry.js +0 -1
  477. package/dist/pine-core/p-62aa6a78.system.entry.js +0 -1
  478. package/dist/pine-core/p-64bcb378.entry.js +0 -1
  479. package/dist/pine-core/p-724baba3.system.entry.js +0 -1
  480. package/dist/pine-core/p-72659a0e.system.entry.js +0 -1
  481. package/dist/pine-core/p-8ade17ce.entry.js +0 -1
  482. package/dist/pine-core/p-8e7f75e6.entry.js +0 -1
  483. package/dist/pine-core/p-8fb520df.entry.js +0 -1
  484. package/dist/pine-core/p-92115e88.entry.js +0 -1
  485. package/dist/pine-core/p-94c9b7d1.system.entry.js +0 -1
  486. package/dist/pine-core/p-97356d4b.entry.js +0 -1
  487. package/dist/pine-core/p-97653e60.entry.js +0 -1
  488. package/dist/pine-core/p-97b73359.entry.js +0 -1
  489. package/dist/pine-core/p-BZVUD2on.js +0 -1
  490. package/dist/pine-core/p-Dj-z_ugg.system.js +0 -1
  491. package/dist/pine-core/p-ad5208a4.system.entry.js +0 -1
  492. package/dist/pine-core/p-afc2f165.entry.js +0 -1
  493. package/dist/pine-core/p-bcc378ba.system.entry.js +0 -8
  494. package/dist/pine-core/p-c8a0b562.system.entry.js +0 -1
  495. package/dist/pine-core/p-d4968f9d.system.entry.js +0 -1
  496. package/dist/pine-core/p-d6f338e0.entry.js +0 -1
  497. package/dist/pine-core/p-da8b864a.entry.js +0 -2
  498. package/dist/pine-core/p-db7fb5a3.entry.js +0 -1
  499. package/dist/pine-core/p-de455073.system.entry.js +0 -1
  500. package/dist/pine-core/p-e3de6a1d.entry.js +0 -1
  501. package/dist/pine-core/p-e84fa9ed.entry.js +0 -1
  502. package/dist/pine-core/p-eb4f0daa.system.entry.js +0 -1
  503. package/dist/pine-core/p-eb56af4a.system.entry.js +0 -1
  504. package/dist/pine-core/p-ef0eba9b.system.entry.js +0 -1
  505. package/dist/pine-core/p-f11cce27.system.entry.js +0 -1
  506. package/dist/pine-core/p-f354dbac.entry.js +0 -1
@@ -1,8 +1,8 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-4_RRPJTO.js';
2
- import { H as HostStylingKeeper } from './attributes-DkeVeN0g.js';
3
- import { a as copy } from './index-DvN3tyZp.js';
2
+ import { H as HostStylingKeeper } from './attributes-CD8knu3a.js';
3
+ import { a as copy } from './index-B0DXTeeV.js';
4
4
  import { r as restoreReflectedDefault } from './reflected-attribute-default-t3idJwV0.js';
5
- import { s as setupTruncationTooltip } from './truncation-tooltip-DBcPipr9.js';
5
+ import { s as setupTruncationTooltip } from './truncation-tooltip-CkIWm6Z-.js';
6
6
  import './keep-hydrated-BgNaWLoS.js';
7
7
  import './floating-ui.dom-Cuc0DYlm.js';
8
8
  import './portal-target-CKRzRKdO.js';
@@ -115,7 +115,7 @@ const PdsCopytext = class {
115
115
  render() {
116
116
  const hostClass = this.classNames();
117
117
  this.hostKeeper.record(hostClass);
118
- return (h(Host, { key: '35d74eaecedd432f7852545522f9ce72396f9ab9', class: hostClass, id: this.componentId }, h("pds-button", { key: '9550ce2fb21166e9726b08b5928036244c7b729e', type: "button", variant: "unstyled", onClick: this.handleClick }, h("span", { key: '47af45448759c911ca4ca03d0158088289b622e0', ref: (el) => this.valueSpanEl = el }, this.value), h("pds-icon", { key: '3ddab7c3e7063843cd606ffb19481cae3792db43', "aria-hidden": "true", icon: copy, size: "16px" }))));
118
+ return (h(Host, { key: '2c3bf9cd49adf9a68be5f6cf3bdf0bb29aab956a', class: hostClass, id: this.componentId }, h("pds-button", { key: '88ff5d9b7071583c76c8875834b9d4fda274d711', type: "button", variant: "unstyled", onClick: this.handleClick }, h("span", { key: '5dee0ec40cbabf3d781037a785ec7c5aa7621121', ref: (el) => this.valueSpanEl = el }, this.value), h("pds-icon", { key: '3399b3573670f32f6a70f78f1ae60c9cba031955', "aria-hidden": "true", icon: copy, size: "16px" }))));
119
119
  }
120
120
  get el() { return getElement(this); }
121
121
  static get watchers() { return {
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-4_RRPJTO.js';
2
2
  import { a as autoUpdate, c as computePosition, o as offset, f as flip, b as size, s as shift, h as hide } from './floating-ui.dom-Cuc0DYlm.js';
3
- import { i as caretDown, j as caretLeft, k as caretRight, m as check, r as remove, n as calendarSimple } from './index-DvN3tyZp.js';
3
+ import { g as caretDown, j as caretLeft, k as caretRight, m as check, r as remove, n as calendarSimple } from './index-B0DXTeeV.js';
4
4
  import { i as isSpecTest } from './form-BuRbS7Hp.js';
5
5
  import { r as resolveLocale, f as formatMessage } from './i18n-format-BJgZHCWe.js';
6
6
  import { a as closest } from './closest-DHPzKMVS.js';
@@ -335,12 +335,35 @@ function builtInPresetRange(key, now) {
335
335
  return null;
336
336
  }
337
337
  }
338
+ const isWholeNumber = (value) => typeof value === 'number' && Number.isInteger(value);
339
+ /** A preset's offset range: whole days from today, a missing or `null` one being today. `null` if unusable. */
340
+ function offsetPresetRange(preset, now) {
341
+ const { startOffset, endOffset } = preset;
342
+ // Checked at runtime, as offsets often come from JSON, where a missing one is often written `null`.
343
+ if (startOffset == null && endOffset == null)
344
+ return null;
345
+ if (startOffset != null && !isWholeNumber(startOffset))
346
+ return null;
347
+ if (endOffset != null && !isWholeNumber(endOffset))
348
+ return null;
349
+ const start = addDays(now, startOffset !== null && startOffset !== void 0 ? startOffset : 0);
350
+ const end = addDays(now, endOffset !== null && endOffset !== void 0 ? endOffset : 0);
351
+ return start <= end ? [start, end] : null;
352
+ }
353
+ // The list is re-resolved on every read, so each warning is said once.
354
+ const warned = new Set();
355
+ function warnOnce(message) {
356
+ if (warned.has(message))
357
+ return;
358
+ warned.add(message);
359
+ console.warn(`PDS Datepicker: ${message}`);
360
+ }
338
361
  /**
339
362
  * Normalizes the `presets` prop: a comma-separated list of built-in keys, or an array of presets
340
- * that may relabel a built-in (for translation) or give their own `start` and `end`. Entries that
341
- * resolve to no range are dropped.
363
+ * that may relabel a built-in or give their own range. Unusable entries are dropped with a warning.
342
364
  */
343
365
  function resolvePresets(presets, now) {
366
+ var _a;
344
367
  const entries = typeof presets === 'string'
345
368
  ? presets
346
369
  .split(',')
@@ -354,14 +377,26 @@ function resolvePresets(presets, now) {
354
377
  for (const preset of entries) {
355
378
  // Presets often come from parsed JSON, so check types at runtime: a non-string label would
356
379
  // otherwise reach the render as an object, which Stencil can turn into nodes.
357
- if (!preset || typeof preset.key !== 'string')
380
+ if (!preset || typeof preset.key !== 'string') {
381
+ warnOnce('a preset with no string key was left out.');
358
382
  continue;
383
+ }
359
384
  const start = typeof preset.start === 'string' ? parseIsoDate(preset.start) : null;
360
385
  const end = typeof preset.end === 'string' ? parseIsoDate(preset.end) : null;
361
- const range = start && end && start <= end ? [start, end] : builtInPresetRange(preset.key, now);
362
- const label = typeof preset.label === 'string' ? preset.label : DEFAULT_LABELS[preset.key];
363
- if (range && label)
364
- resolved.push({ key: preset.key, label, start: range[0], end: range[1] });
386
+ // Fixed days, then offsets, then the built-in range.
387
+ const fixed = start !== null && end !== null && start <= end ? [start, end] : null;
388
+ const range = (_a = fixed !== null && fixed !== void 0 ? fixed : offsetPresetRange(preset, now)) !== null && _a !== void 0 ? _a : builtInPresetRange(preset.key, now);
389
+ // A blank label would leave the button unnamed.
390
+ const label = typeof preset.label === 'string' && preset.label.trim() !== '' ? preset.label : DEFAULT_LABELS[preset.key];
391
+ if (range === null) {
392
+ warnOnce(`preset "${preset.key}" has no usable range and was left out. Give it whole-day startOffset/endOffset or YYYY-MM-DD start/end, start first.`);
393
+ continue;
394
+ }
395
+ if (label === undefined) {
396
+ warnOnce(`preset "${preset.key}" has no label and was left out.`);
397
+ continue;
398
+ }
399
+ resolved.push({ key: preset.key, label, start: range[0], end: range[1] });
365
400
  }
366
401
  return resolved;
367
402
  }
@@ -2047,14 +2082,14 @@ const PdsDatepicker = class {
2047
2082
  }
2048
2083
  render() {
2049
2084
  const locale = this.resolvedLocale;
2050
- return (h(Host, { key: '7c5388369fe78becfd26b0807f1c6cb54c7934a1', class: { 'pds-datepicker--range': this.isRange, 'pds-datepicker--time': this.hasTime }, "full-width": this.fullWidth ? 'true' : null, onFocusin: this.onHostFocusIn, onFocusout: this.onHostFocusOut }, h("pds-input", { key: 'fc565c99359715415886ae63ef1bcbf8671569c9', 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 && (h("button", {
2085
+ return (h(Host, { key: 'd40bce6136eca084b23d38d995010592bfd702bd', class: { 'pds-datepicker--range': this.isRange, 'pds-datepicker--time': this.hasTime }, "full-width": this.fullWidth ? 'true' : null, onFocusin: this.onHostFocusIn, onFocusout: this.onHostFocusOut }, h("pds-input", { key: 'a047df90ca3e013a2eeb1f88e8fb033b24754f0d', 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 && (h("button", {
2051
2086
  // Keyed, as is the calendar button: when Clear appears after a pick, the focused
2052
2087
  // calendar button must stay that button rather than be reused as Clear.
2053
2088
  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,
2054
2089
  // Out of the tab order, as a native search field's clear button is: Tab from a field
2055
2090
  // just emptied would land on it as the change removes it, dropping focus to the page.
2056
2091
  tabindex: "-1", onMouseDown: this.onClearMouseDown, onClick: this.onClearClick
2057
- }, h("pds-icon", { key: '6a7da726d86654d3598f84b8ea7a8ed244a8e5da', icon: remove, "aria-hidden": "true" }))), h("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 }, h("pds-icon", { key: '92af87e66b7bb2e95861b873077a7bfb0268c2e0', icon: calendarSimple, "aria-hidden": "true" }))), this.isOpen && this.renderCalendar(locale)));
2092
+ }, h("pds-icon", { key: '934fc6303da1dca04cb073c5875a0f9fc286fdd1', icon: remove, "aria-hidden": "true" }))), h("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 }, h("pds-icon", { key: '75ab4fc79ce9f95e7ee6555763166d800a2f1135', icon: calendarSimple, "aria-hidden": "true" }))), this.isOpen && this.renderCalendar(locale)));
2058
2093
  }
2059
2094
  static get formAssociated() { return true; }
2060
2095
  get el() { return getElement(this); }
@@ -13,7 +13,7 @@ const PdsDrawerContent = class {
13
13
  unwrapReconnectedContent(this.el.querySelector('.pds-drawer-content'), '.pds-drawer-content');
14
14
  }
15
15
  render() {
16
- return (h("div", { key: 'b15b087506c1292f9d67e531e8d935069749c09d', class: "pds-drawer-content" }, h("slot", { key: '9c60ca75c7905e7e994f9c41eee213b962afb833' })));
16
+ return (h("div", { key: '0d59724de849bc2364d88c4460f70f8b1efa5d1b', class: "pds-drawer-content" }, h("slot", { key: '83782b9b4ad99f8075809c9e63d8351fa6109b11' })));
17
17
  }
18
18
  get el() { return getElement(this); }
19
19
  };
@@ -13,7 +13,7 @@ const PdsDrawerFooter = class {
13
13
  unwrapReconnectedContent(this.el.querySelector('.pds-drawer__footer'), '.pds-drawer__footer');
14
14
  }
15
15
  render() {
16
- return (h("footer", { key: 'a4eec0aff617c605b94f8d3b9ec1e2d98cded6fb', class: "pds-drawer__footer" }, h("slot", { key: '6dc379c940e37edfd05d99728be9dff58ca1d717' })));
16
+ return (h("footer", { key: '1345b87580b1931d7c541fac71c0dff33b6cfbf9', class: "pds-drawer__footer" }, h("slot", { key: '638fa6bd14d28e814e0e40b02efb1b74f89f51dd' })));
17
17
  }
18
18
  get el() { return getElement(this); }
19
19
  };
@@ -13,7 +13,7 @@ const PdsDrawerHeader = class {
13
13
  unwrapReconnectedContent(this.el.querySelector('.pds-drawer__header'), '.pds-drawer__header');
14
14
  }
15
15
  render() {
16
- return (h("header", { key: '6b9338e5dbf7a7e580c11b28c95ca53693528382', class: "pds-drawer__header" }, h("slot", { key: '0990fbcf94c0c438b98cf1e8945f1e2fd9aa33dc' })));
16
+ return (h("header", { key: '6354f36d59e608a85c3cb75d1e5cf04c48dd7045', class: "pds-drawer__header" }, h("slot", { key: '2c9d8a405c8850588377553f3d9a19790828cba7' })));
17
17
  }
18
18
  get el() { return getElement(this); }
19
19
  };
@@ -23,8 +23,8 @@ const PdsDrawer = class {
23
23
  */
24
24
  this.open = false;
25
25
  /**
26
- * Which edge of the viewport the drawer is docked to. Logical, so this is
27
- * free under RTL — `end` is the inline-end edge regardless of direction.
26
+ * Which edge of the viewport the drawer is docked to. Logical: `end` is the
27
+ * inline-end edge, so an `end` drawer docks on the left in right-to-left layouts.
28
28
  * @default 'end'
29
29
  */
30
30
  this.side = 'end';
@@ -50,9 +50,7 @@ const PdsDrawer = class {
50
50
  /**
51
51
  * Whether the drawer can be dismissed with a pointerdown outside it (in a
52
52
  * `modal` drawer, a click on its backdrop).
53
- * Replaces `pds-modal`'s `backdropDismiss`.
54
- * This also gates Escape, matching how `backdropDismiss` gates Escape on
55
- * `pds-modal` today: setting this to `false` means the close button is the
53
+ * Setting it to `false` also turns off Escape, so the close button is the
56
54
  * only way out.
57
55
  *
58
56
  * A trigger outside the drawer should only ever set `open` to `true` and
@@ -143,11 +141,11 @@ const PdsDrawer = class {
143
141
  this.open = false;
144
142
  }
145
143
  render() {
146
- return (h(Host, { key: '7cf13256457914e48e8fde422832a2a52ee0c13b', class: {
144
+ return (h(Host, { key: 'dda3f1dc3013f28a3fc8d1894609dd4b14d227ee', class: {
147
145
  'pds-drawer': true,
148
146
  [`pds-drawer--${this.side}`]: true,
149
147
  [`pds-drawer--${this.size}`]: true,
150
- } }, h("pds-modal", { key: 'd4ceb5b4c0b03930aa3d001ae1bbbfbf449bde33', 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' }, h("slot", { key: '41bfdea76282b333ca6950048999cb9d94e69438' }))));
148
+ } }, h("pds-modal", { key: '3188b99ffb9b3ecb3eeb42fd3ba808d71c652b4f', 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' }, h("slot", { key: 'ca4cd34297b4580d554edb45bfbec5b44d7d1fb0' }))));
151
149
  }
152
150
  get el() { return getElement(this); }
153
151
  };
@@ -1,42 +1,72 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-4_RRPJTO.js';
2
2
  import './keep-hydrated-BgNaWLoS.js';
3
3
 
4
- const pdsDropdownMenuItemCss = () => `:host{cursor:pointer;display:-ms-flexbox;display:flex;width:100%;}:host(.is-disabled){cursor:not-allowed !important;opacity:0.5 !important}:host(.is-disabled) .pds-dropdown-menu-item__content{cursor:not-allowed !important;pointer-events:none !important}.pds-dropdown-menu-item__content{-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);color:var(--pine-color-text);display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;font:var(--pine-typography-body-medium);gap:var(--pine-dimension-xs);margin:calc(var(--pine-border-width) + 2px);padding:var(--pine-dimension-xs);text-align:start;width:100%;}.pds-dropdown-menu-item__content:hover{background-color:var(--pine-color-background-muted);color:var(--pine-color-text-hover)}.pds-dropdown-menu-item__content{}.pds-dropdown-menu-item__content:focus,.pds-dropdown-menu-item__content:focus-visible,.pds-dropdown-menu-item__content.has-focus{outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}:host(.is-informational){cursor:default}:host(.is-informational) .pds-dropdown-menu-item__content:hover{background-color:transparent;color:var(--pine-color-text)}:host(.destructive) .pds-dropdown-menu-item__content{--pds-context-link-color:var(--pine-color-danger);--pds-context-link-color-hover:var(--pine-color-danger-hover);-ms-flex-align:center;align-items:center;color:var(--pine-color-danger)}:host(.destructive) .pds-dropdown-menu-item__content:hover{background-color:var(--pine-color-danger-disabled);color:var(--pine-color-danger-hover)}:host(.destructive) .pds-dropdown-menu-item__content:focus,:host(.destructive) .pds-dropdown-menu-item__content:focus-visible,:host(.destructive) .pds-dropdown-menu-item__content.has-focus{background-color:var(--pine-color-danger-disabled);outline:var(--pine-outline-focus-danger);outline-offset:var(--pine-border-width)}pds-link::part(link):focus,pds-link::part(link):focus-visible{-webkit-box-shadow:none;box-shadow:none;outline:none}pds-link::part(link){-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;gap:var(--pine-dimension-xs);margin:calc(var(--pine-dimension-xs) * -1);padding:var(--pine-dimension-xs);text-decoration:none;width:calc(100% + var(--pine-dimension-xs) * 2)}`;
4
+ const pdsDropdownMenuItemCss = () => `:host{cursor:pointer;display:-ms-flexbox;display:flex;width:100%;}:host(.is-disabled){cursor:not-allowed !important;opacity:0.5 !important}:host(.is-disabled) .pds-dropdown-menu-item__content{cursor:not-allowed !important;pointer-events:none !important}.pds-dropdown-menu-item__content{-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);color:var(--pine-color-text);display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;font:var(--pine-typography-body-medium);gap:var(--pine-dimension-xs);margin:calc(var(--pine-border-width) + 2px);padding:var(--pine-dimension-xs);text-align:start;width:100%;}.pds-dropdown-menu-item__content:hover{background-color:var(--pine-color-background-muted);color:var(--pine-color-text-hover)}.pds-dropdown-menu-item__content:focus-visible{outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}.pds-dropdown-menu-item__start{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-negative:0;flex-shrink:0}.pds-dropdown-menu-item__start--empty{display:none}:host(.is-informational){cursor:default}:host(.is-informational) .pds-dropdown-menu-item__content:hover{background-color:transparent;color:var(--pine-color-text)}:host(.destructive) .pds-dropdown-menu-item__content{--pds-context-link-color:var(--pine-color-danger);--pds-context-link-color-hover:var(--pine-color-danger-hover);-ms-flex-align:center;align-items:center;color:var(--pine-color-danger)}:host(.destructive) .pds-dropdown-menu-item__content:hover{background-color:var(--pine-color-danger-disabled);color:var(--pine-color-danger-hover)}:host(.destructive) .pds-dropdown-menu-item__content:focus-visible{background-color:var(--pine-color-danger-disabled);outline:var(--pine-outline-focus-danger);outline-offset:var(--pine-border-width)}:host(.destructive) pds-link::part(link):focus-visible{background-color:var(--pine-color-danger-disabled);outline:var(--pine-outline-focus-danger)}pds-link::part(link):focus-visible{border-radius:var(--pine-dimension-xs);-webkit-box-shadow:none;box-shadow:none;outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}pds-link::part(link){-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;gap:var(--pine-dimension-xs);margin:calc(var(--pine-dimension-xs) * -1);padding:var(--pine-dimension-xs);text-decoration:none;width:calc(100% + var(--pine-dimension-xs) * 2)}`;
5
5
 
6
6
  const PdsDropdownMenuItem = class {
7
7
  constructor(hostRef) {
8
8
  registerInstance(this, hostRef);
9
9
  this.pdsClick = createEvent(this, "pdsClick");
10
10
  /**
11
- * It determines whether or not the dropdown-item is destructive.
11
+ * Determines whether or not the dropdown menu item is destructive.
12
12
  * @defaultValue false
13
13
  */
14
14
  this.destructive = false;
15
15
  /**
16
- * It determines whether or not the dropdown-item is disabled.
16
+ * Determines whether or not the dropdown menu item is disabled.
17
17
  * @defaultValue false
18
18
  */
19
19
  this.disabled = false;
20
20
  /**
21
- * It determines whether or not the dropdown-item is informational: text that the arrow keys
21
+ * Determines whether or not the dropdown menu item is informational: text that the arrow keys
22
22
  * reach but that can't be activated. Takes precedence over `href` and `destructive`.
23
23
  * Screen readers announce it as dimmed or unavailable, the same way as a disabled item.
24
24
  * @defaultValue false
25
25
  */
26
26
  this.informational = false;
27
27
  /**
28
- * Determines whether the link should open in a new tab and display an external icon.
29
- * This is a simpler alternative to using `target="_blank"` for the common case.
30
- * Ignored when `informational` is set.
28
+ * Shows the external-link (launch) icon. Opens in a new tab unless `target` says otherwise.
29
+ * Only applies when href is set. Ignored when `informational` is set.
31
30
  * @defaultValue false
32
31
  */
33
32
  this.external = false;
34
- this.hasFocus = false;
35
- this.handleFocus = () => {
36
- this.hasFocus = true;
33
+ this.handleClick = () => {
34
+ var _a, _b;
35
+ if (this.disabled || this.informational)
36
+ return;
37
+ // Filter only pds-dropdown-menu-item elements and find the index of the current item
38
+ const menuItems = Array.from((_b = (_a = this.host.parentElement) === null || _a === void 0 ? void 0 : _a.children) !== null && _b !== void 0 ? _b : []).filter((child) => child.tagName.toLowerCase() === 'pds-dropdown-menu-item');
39
+ const itemIndex = menuItems.indexOf(this.host);
40
+ // The label's text: default-slot content only, so start-slot content stays out of it
41
+ const content = Array.from(this.host.childNodes)
42
+ .filter((node) => node.nodeType === Node.TEXT_NODE ||
43
+ (node.nodeType === Node.ELEMENT_NODE && !node.getAttribute('slot')))
44
+ .map((node) => node.textContent)
45
+ .join('')
46
+ .trim();
47
+ this.pdsClick.emit({
48
+ itemIndex,
49
+ item: this.host,
50
+ content
51
+ });
37
52
  };
38
- this.handleBlur = () => {
39
- this.hasFocus = false;
53
+ // Checked directly against the light DOM rather than kept in @State: Stencil's JSX doesn't
54
+ // type a `class` prop for `<slot>`, and a ref callback only fires once, on creation, so it
55
+ // can't push a later @State change back onto the element either way. Called once up front
56
+ // (from the ref, since nothing's assigned at componentWillLoad's point) and again on every
57
+ // native slotchange after that, both calling classList directly. add/remove, not the two-argument
58
+ // form of toggle(): Stencil's mock-doc (used by spec tests) implements toggle() as a plain flip
59
+ // and silently ignores a force argument, so a toggle() call that'd be correct against a real
60
+ // DOM can still fail there.
61
+ this.updateStartSlotEmpty = () => {
62
+ var _a, _b;
63
+ const hasContent = Array.from(this.host.children).some((child) => child.getAttribute('slot') === 'start');
64
+ if (hasContent) {
65
+ (_a = this.startSlotEl) === null || _a === void 0 ? void 0 : _a.classList.remove('pds-dropdown-menu-item__start--empty');
66
+ }
67
+ else {
68
+ (_b = this.startSlotEl) === null || _b === void 0 ? void 0 : _b.classList.add('pds-dropdown-menu-item__start--empty');
69
+ }
40
70
  };
41
71
  // Space would otherwise scroll the page, since nothing in the item takes the key.
42
72
  this.handleInformationalKeyDown = (event) => {
@@ -45,63 +75,69 @@ const PdsDropdownMenuItem = class {
45
75
  }
46
76
  };
47
77
  this.handleKeyDown = (event) => {
48
- // Handle keyboard events
49
- if (!this.disabled && (event.key === 'Enter')) {
50
- // Only prevent default for button elements or Space key
51
- // For links with Enter key, we want the default navigation behavior
52
- if (!this.href) {
53
- event.preventDefault();
54
- }
55
- this.handleClick();
78
+ var _a;
79
+ if (this.disabled || event.key !== 'Enter')
80
+ return;
81
+ if (this.href != null) {
82
+ // Enter on the inner <a> itself follows the link, and its native click reaches the host's
83
+ // click handler below, which emits pdsClick -- returning early here leaves that alone.
84
+ // Safari leaves focus on the pds-link host after a mouse click, not its inner <a>, where
85
+ // Enter would otherwise do nothing: an anchor only activates on Enter when it is itself the
86
+ // focused element, not an ancestor of it. Forwarding the click to the real anchor instead
87
+ // runs the browser's own navigation (hash, download, target), and still reaches the same
88
+ // host click handler, so pdsClick still isn't emitted twice.
89
+ if (event.composedPath()[0] !== this.innerAnchor())
90
+ (_a = this.innerAnchor()) === null || _a === void 0 ? void 0 : _a.click();
91
+ return;
56
92
  }
93
+ event.preventDefault();
94
+ this.handleClick();
57
95
  };
58
96
  }
59
97
  /**
60
- * Trigger the click event
98
+ * Trigger the click event. Does nothing when the item is disabled or informational.
61
99
  */
62
100
  async clickItem() {
63
101
  this.handleClick();
64
102
  }
65
103
  ;
66
- handleClick() {
67
- var _a;
68
- if (this.informational)
69
- return;
70
- // Filter only pds-dropdown-menu-item elements and find the index of the current item
71
- const menuItems = Array.from(this.host.parentNode.children).filter((child) => child.tagName.toLowerCase() === 'pds-dropdown-menu-item');
72
- const itemIndex = menuItems.indexOf(this.host);
73
- // Get the text content from the slotted content
74
- const content = ((_a = this.host.textContent) === null || _a === void 0 ? void 0 : _a.trim()) || '';
75
- this.pdsClick.emit({
76
- itemIndex,
77
- item: this.host,
78
- content
79
- });
104
+ // Always render the start slot so slotted content is projected reliably, with nothing wrapping
105
+ // it: a wrapper would sit between the slotted content and this host, leaving it without an
106
+ // assignedSlot, which breaks a click-target walk that follows assignedSlot up to find a link
107
+ // (Turbo's link lookup works this way). The --empty class hides it when nothing is slotted, so
108
+ // it adds no gap.
109
+ renderContent() {
110
+ return [
111
+ h("slot", { name: "start", onSlotchange: this.updateStartSlotEmpty, ref: (el) => {
112
+ this.startSlotEl = el;
113
+ if (el) {
114
+ el.classList.add('pds-dropdown-menu-item__start');
115
+ this.updateStartSlotEmpty();
116
+ }
117
+ } }),
118
+ h("slot", null)
119
+ ];
80
120
  }
81
121
  renderElement() {
82
122
  if (this.informational) {
83
- return (h("div", { class: {
84
- 'pds-dropdown-menu-item__content': true,
85
- 'has-focus': this.hasFocus
86
- }, role: "menuitem", "aria-disabled": "true", part: "button", tabIndex: this.disabled ? -1 : 0, onKeyDown: this.handleInformationalKeyDown, onFocus: this.handleFocus, onBlur: this.handleBlur }, h("slot", null)));
123
+ return (h("div", { class: "pds-dropdown-menu-item__content", role: "menuitem", "aria-disabled": "true", part: "button", tabIndex: this.disabled ? -1 : 0, onKeyDown: this.handleInformationalKeyDown }, this.renderContent()));
87
124
  }
88
125
  if (this.href != null) {
89
- return (h("pds-link", { download: this.download, href: this.disabled ? null : this.href, external: this.external, externalLabel: this.externalLabel, target: this.target, class: {
90
- 'pds-dropdown-menu-item__content': true,
91
- 'has-focus': this.hasFocus
92
- }, tabIndex: this.disabled ? -1 : 0, onKeyDown: this.handleKeyDown, onFocus: this.handleFocus, onBlur: this.handleBlur, "aria-disabled": this.disabled ? 'true' : null }, h("slot", null)));
126
+ return (h("pds-link", { download: this.download, href: this.disabled ? null : this.href, external: this.external, externalLabel: this.externalLabel, target: this.target, class: "pds-dropdown-menu-item__content", tabIndex: this.disabled ? -1 : 0, onKeyDown: this.handleKeyDown, "aria-disabled": this.disabled ? 'true' : null }, this.renderContent()));
93
127
  }
94
- return (h("button", { class: {
95
- 'pds-dropdown-menu-item__content': true,
96
- 'has-focus': this.hasFocus
97
- }, 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 }, h("slot", null)));
128
+ return (h("button", { class: "pds-dropdown-menu-item__content", tabIndex: this.disabled ? -1 : 0, type: "button", part: "button", onKeyDown: this.handleKeyDown, disabled: this.disabled, "aria-disabled": this.disabled ? 'true' : null }, this.renderContent()));
129
+ }
130
+ // pds-link's own shadow root, one level in from its host.
131
+ innerAnchor() {
132
+ var _a, _b, _c, _d;
133
+ return (_d = (_c = (_b = (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('pds-link')) === null || _b === void 0 ? void 0 : _b.shadowRoot) === null || _c === void 0 ? void 0 : _c.querySelector('a')) !== null && _d !== void 0 ? _d : null;
98
134
  }
99
135
  render() {
100
- return (h(Host, { key: 'a69947d99160783919f711d7c53e0592694f9565', id: this.componentId, class: {
136
+ return (h(Host, { key: '139943faad1c0047bb0363e0eaa0cde9efb2f957', id: this.componentId, class: {
101
137
  'is-disabled': this.disabled,
102
138
  'is-informational': this.informational,
103
139
  'destructive': !this.disabled && !this.informational && this.destructive
104
- }, onClick: () => !this.disabled && this.handleClick(), role: "none",
140
+ }, onClick: this.handleClick, role: "none",
105
141
  // ARIA ignores role="none" on focusable elements, so a focusable host would sit between
106
142
  // the menu and the informational menuitem as an unexpected child.
107
143
  tabIndex: this.informational ? null : -1, "aria-disabled": this.disabled && !this.informational ? 'true' : null }, this.renderElement()));
@@ -7,13 +7,13 @@ const PdsDropdownMenuSeparator = class {
7
7
  constructor(hostRef) {
8
8
  registerInstance(this, hostRef);
9
9
  /**
10
- * It determines whether or not the dropdown-item is disabled.
10
+ * Has no effect. A separator can't be focused or activated.
11
11
  * @defaultValue false
12
12
  */
13
13
  this.disabled = false;
14
14
  }
15
15
  render() {
16
- return (h(Host, { key: '72f29c5015d2379d9986c90ec966f34f41298226', id: this.componentId }, h("hr", { key: '72c2155d0fbee6346f3f38997009a7d9e14ad0c8' })));
16
+ return (h(Host, { key: '74a214d61042d5759af5aef9d6410ed1a267083c', id: this.componentId }, h("hr", { key: 'c521eda51523fce09bd408af2586645fc9a9cd03' })));
17
17
  }
18
18
  };
19
19
  PdsDropdownMenuSeparator.style = pdsDropdownMenuSeparatorCss();
@@ -1,9 +1,9 @@
1
1
  import { r as registerInstance, h, H as Host, a as getElement } from './index-4_RRPJTO.js';
2
- import { s as setAttributesIfChanged } from './attributes-DkeVeN0g.js';
2
+ import { s as setAttributesIfChanged } from './attributes-CD8knu3a.js';
3
3
  import { l as limitRestores } from './keep-hydrated-BgNaWLoS.js';
4
- import { a as autoUpdate, c as computePosition, o as offset, f as flip, s as shift } from './floating-ui.dom-Cuc0DYlm.js';
4
+ import { a as autoUpdate, c as computePosition, o as offset, f as flip, s as shift, b as size } from './floating-ui.dom-Cuc0DYlm.js';
5
5
 
6
- 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}`;
6
+ 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;overflow-y:auto;-ms-scroll-chaining:none;overscroll-behavior:contain;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}`;
7
7
 
8
8
  const PdsDropdownMenu = class {
9
9
  constructor(hostRef) {
@@ -11,7 +11,10 @@ const PdsDropdownMenu = class {
11
11
  this.isOpen = false;
12
12
  this.menuItems = [];
13
13
  this.cleanupAutoUpdate = null;
14
+ // Counts each opening, so a position worked out for an earlier opening is ignored.
15
+ this.openCount = 0;
14
16
  this.triggerObserver = null;
17
+ this.triggerVisibility = null;
15
18
  this.currentFocusIndex = -1;
16
19
  this.hasHeader = false;
17
20
  /**
@@ -72,12 +75,20 @@ const PdsDropdownMenu = class {
72
75
  // Open the dropdown and position it
73
76
  this.openDropdown = () => {
74
77
  var _a;
78
+ const opening = ++this.openCount;
75
79
  const updatePosition = () => {
76
80
  computePosition(this.triggerEl, this.panelEl, {
77
81
  placement: this.placement,
78
82
  strategy: 'fixed',
79
- middleware: [offset(6), flip(), shift({ padding: 5 })],
83
+ middleware: [
84
+ offset(6),
85
+ flip(),
86
+ shift({ padding: 5 }),
87
+ size({ padding: 5, apply: ({ availableHeight, elements }) => this.capPanelHeight(elements.floating, availableHeight) }),
88
+ ],
80
89
  }).then(({ x, y }) => {
90
+ if (!this.isOpen || opening !== this.openCount)
91
+ return;
81
92
  Object.assign(this.panelEl.style, {
82
93
  left: `${x}px`,
83
94
  top: `${y}px`,
@@ -88,12 +99,15 @@ const PdsDropdownMenu = class {
88
99
  updatePosition();
89
100
  // Set up auto-update for window resize and scroll
90
101
  this.cleanupAutoUpdate = autoUpdate(this.triggerEl, this.panelEl, updatePosition);
102
+ this.watchTriggerVisibility();
91
103
  (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('pds-box').classList.remove('is-hidden');
92
104
  this.isOpen = true;
93
105
  this.syncTriggerAria();
94
106
  };
95
- // Close the dropdown
96
- this.closeDropdown = () => {
107
+ // Close the dropdown. Closed because its trigger left the view, focus from the menu still goes back
108
+ // to the trigger, so it isn't lost, but without scrolling the trigger back into view. The next Tab
109
+ // carries on from there.
110
+ this.closeDropdown = ({ preventScroll = false } = {}) => {
97
111
  var _a;
98
112
  (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('pds-box').classList.add('is-hidden');
99
113
  this.isOpen = false;
@@ -102,12 +116,13 @@ const PdsDropdownMenu = class {
102
116
  this.cleanupAutoUpdate();
103
117
  this.cleanupAutoUpdate = null;
104
118
  }
119
+ this.stopWatchingTriggerVisibility();
105
120
  this.syncTriggerAria();
106
121
  // Reset focus index
107
122
  this.currentFocusIndex = -1;
108
123
  // Return focus to trigger
109
124
  if (this.isFocusInMenu()) {
110
- this.focusTrigger();
125
+ this.focusTrigger(preventScroll);
111
126
  }
112
127
  };
113
128
  // Handle click on the trigger element
@@ -137,6 +152,10 @@ const PdsDropdownMenu = class {
137
152
  }
138
153
  (_a = this.triggerObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
139
154
  this.triggerObserver = null;
155
+ this.stopWatchingTriggerVisibility();
156
+ // The menu was detached, so a position still being worked out for it is dropped. The menu
157
+ // itself stays open.
158
+ this.openCount++;
140
159
  }
141
160
  // The trigger is the consumer's element, so anything can rewrite its attributes (a Turbo morph
142
161
  // matches it to server HTML that has no ARIA). Put Pine's values back when that happens.
@@ -153,18 +172,72 @@ const PdsDropdownMenu = class {
153
172
  attributeFilter: ['aria-haspopup', 'aria-expanded'],
154
173
  });
155
174
  }
175
+ // The panel is fixed, so a menu taller than the room beside its trigger would run off the window
176
+ // with no way to reach its last items. It's capped to that room and scrolls inside itself. A
177
+ // smaller max-height set through the menu-panel part is kept. The cap is important, as a
178
+ // ::part() rule outside the shadow root otherwise beats the panel's own inline style.
179
+ //
180
+ // Removing `max-height` lifts the panel's own scroll constraint, so a layout read in between
181
+ // (`getComputedStyle`) can commit a frame with nothing left to scroll, and the browser resets
182
+ // `scrollTop` to 0. This runs on every `autoUpdate` pass, including a small ancestor scroll that
183
+ // leaves the trigger in view, so a menu scrolled partway down would otherwise jump back to the
184
+ // top on its own. Restoring `scrollTop` afterward keeps the user's place; the browser clamps it
185
+ // automatically if the new max-height is shorter than before.
186
+ capPanelHeight(panel, availableHeight) {
187
+ const { scrollTop } = panel;
188
+ panel.style.removeProperty('max-height');
189
+ const partMaxHeight = getComputedStyle(panel).maxHeight;
190
+ const room = `${Math.max(0, availableHeight)}px`;
191
+ panel.style.setProperty('max-height', partMaxHeight === 'none' ? room : `min(${partMaxHeight}, ${room})`, 'important');
192
+ panel.scrollTop = scrollTop;
193
+ }
194
+ // Once the trigger is fully out of view, scrolled or clipped by any container or the window, the
195
+ // menu closes rather than float away from it, much as a native select's list does. An
196
+ // IntersectionObserver measures against the layout viewport, so panning a pinch-zoomed page
197
+ // doesn't close it, as Floating UI's hide() would.
198
+ watchTriggerVisibility() {
199
+ this.stopWatchingTriggerVisibility();
200
+ if (typeof IntersectionObserver === 'undefined')
201
+ return;
202
+ // Only a trigger seen in view this opening closes the menu when it leaves.
203
+ let triggerSeen = false;
204
+ let broughtIntoView = false;
205
+ this.triggerVisibility = new IntersectionObserver((entries) => {
206
+ if (!this.isOpen)
207
+ return;
208
+ if (entries[entries.length - 1].isIntersecting) {
209
+ triggerSeen = true;
210
+ }
211
+ else if (triggerSeen) {
212
+ this.closeDropdown({ preventScroll: true });
213
+ }
214
+ else if (!broughtIntoView) {
215
+ // Opened with its trigger out of view, from the keyboard after an earlier close or from a
216
+ // script, the trigger is scrolled into view so the menu opens beside it. A trigger that
217
+ // still can't be seen leaves the menu open.
218
+ broughtIntoView = true;
219
+ this.triggerEl.scrollIntoView({ block: 'nearest', inline: 'nearest' });
220
+ }
221
+ });
222
+ this.triggerVisibility.observe(this.triggerEl);
223
+ }
224
+ stopWatchingTriggerVisibility() {
225
+ var _a;
226
+ (_a = this.triggerVisibility) === null || _a === void 0 ? void 0 : _a.disconnect();
227
+ this.triggerVisibility = null;
228
+ }
156
229
  // Outside clicks and scripted closes leave focus where it is; only focus in the menu or on its trigger returns.
157
230
  isFocusInMenu() {
158
231
  const focused = this.host.getRootNode().activeElement;
159
232
  return focused != null && this.host.contains(focused);
160
233
  }
161
234
  // A trigger whose host can't take focus itself, such as pds-chip, passes it to the control inside.
162
- focusTrigger() {
235
+ focusTrigger(preventScroll = false) {
163
236
  var _a, _b;
164
- this.triggerEl.focus();
237
+ this.triggerEl.focus({ preventScroll });
165
238
  if (this.host.getRootNode().activeElement === this.triggerEl)
166
239
  return;
167
- (_b = (_a = this.triggerEl.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('button, [href], [tabindex]:not([tabindex="-1"])')) === null || _b === void 0 ? void 0 : _b.focus();
240
+ (_b = (_a = this.triggerEl.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('button, [href], [tabindex]:not([tabindex="-1"])')) === null || _b === void 0 ? void 0 : _b.focus({ preventScroll });
168
241
  }
169
242
  // Check if a menu item is disabled (handles both component and raw elements)
170
243
  isItemDisabled(item) {
@@ -369,7 +442,7 @@ const PdsDropdownMenu = class {
369
442
  }
370
443
  }
371
444
  render() {
372
- return (h(Host, { key: 'aa4ce84354cf87638ee46fd7ed69520228b7e656', id: this.componentId }, h("slot", { key: '948800e67d18c8c6cc9e77ef3aeab635c5035453', name: "trigger", onSlotchange: this.handleTriggerSlotChange }), h("pds-box", { key: '3ce2a2879b14aad975cea8ae72fcbf8c3abcf20c', "border-radius": "sm", display: "flex", direction: "column", class: "pds-dropdown-menu--panel is-hidden", shadow: "100", part: "menu-panel" }, h("div", { key: 'ad25fbf4f3c7a24653c229e64fe2ce893a92e4c8', class: { 'pds-dropdown-menu__header': true, 'is-hidden': !this.hasHeader } }, h("slot", { key: '35a5903543e08577997b456bcd312bdd009fd8fc', name: "header", onSlotchange: this.handleHeaderSlotChange })), h("div", { key: 'a9593adacf047918c1d87494f8c951a2a4a5f76f', class: "pds-dropdown-menu__items", role: "menu", "aria-orientation": "vertical" }, h("slot", { key: '8d2def1cc7020608220099f4ced0f44e9838cce8', onSlotchange: this.handleSlotChange })))));
445
+ return (h(Host, { key: '1776921b263178df0de2cdf07a9fb81c668381b6', id: this.componentId }, h("slot", { key: '952fdc2b6bb3f1fca5a17dc1962af0e4c38f92e2', name: "trigger", onSlotchange: this.handleTriggerSlotChange }), h("pds-box", { key: 'f5f95cebdcf4a4d78d0e4bc47b99c681045f8d38', "border-radius": "sm", display: "flex", direction: "column", class: "pds-dropdown-menu--panel is-hidden", shadow: "100", part: "menu-panel" }, h("div", { key: '8bff8a8dd06fe1f433bc512bc0ac9030fc9714e7', class: { 'pds-dropdown-menu__header': true, 'is-hidden': !this.hasHeader } }, h("slot", { key: '1c248f137414dd00037d333b1e07c6b04a7b079d', name: "header", onSlotchange: this.handleHeaderSlotChange })), h("div", { key: 'db9954f26762a65e762f8c7b3dfd60e363ff8573', class: "pds-dropdown-menu__items", role: "menu", "aria-orientation": "vertical" }, h("slot", { key: 'd5cb929db03966d673b23de150970744936cf26d', onSlotchange: this.handleSlotChange })))));
373
446
  }
374
447
  get host() { return getElement(this); }
375
448
  };