@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,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
3
  var index = require('./index-D9iJuJCP.js');
4
- var attributes = require('./attributes-CW49XqaL.js');
4
+ var attributes = require('./attributes-Cgbkw6gO.js');
5
5
  var index$1 = require('./index-BDnbr0DK.js');
6
6
  var reflectedAttributeDefault = require('./reflected-attribute-default-DVYHG6O1.js');
7
- var truncationTooltip = require('./truncation-tooltip-Bikp7n9I.js');
7
+ var truncationTooltip = require('./truncation-tooltip-CM5HgRHh.js');
8
8
  require('./keep-hydrated-AKoh0DG4.js');
9
9
  require('./floating-ui.dom-Dw41zbyY.js');
10
10
  require('./portal-target-e8WQ6dLx.js');
@@ -117,7 +117,7 @@ const PdsCopytext = class {
117
117
  render() {
118
118
  const hostClass = this.classNames();
119
119
  this.hostKeeper.record(hostClass);
120
- return (index.h(index.Host, { key: '35d74eaecedd432f7852545522f9ce72396f9ab9', class: hostClass, id: this.componentId }, index.h("pds-button", { key: '9550ce2fb21166e9726b08b5928036244c7b729e', type: "button", variant: "unstyled", onClick: this.handleClick }, index.h("span", { key: '47af45448759c911ca4ca03d0158088289b622e0', ref: (el) => this.valueSpanEl = el }, this.value), index.h("pds-icon", { key: '3ddab7c3e7063843cd606ffb19481cae3792db43', "aria-hidden": "true", icon: index$1.copy, size: "16px" }))));
120
+ return (index.h(index.Host, { key: '2c3bf9cd49adf9a68be5f6cf3bdf0bb29aab956a', class: hostClass, id: this.componentId }, index.h("pds-button", { key: '88ff5d9b7071583c76c8875834b9d4fda274d711', type: "button", variant: "unstyled", onClick: this.handleClick }, index.h("span", { key: '5dee0ec40cbabf3d781037a785ec7c5aa7621121', ref: (el) => this.valueSpanEl = el }, this.value), index.h("pds-icon", { key: '3399b3573670f32f6a70f78f1ae60c9cba031955', "aria-hidden": "true", icon: index$1.copy, size: "16px" }))));
121
121
  }
122
122
  get el() { return index.getElement(this); }
123
123
  static get watchers() { return {
@@ -337,12 +337,35 @@ function builtInPresetRange(key, now) {
337
337
  return null;
338
338
  }
339
339
  }
340
+ const isWholeNumber = (value) => typeof value === 'number' && Number.isInteger(value);
341
+ /** A preset's offset range: whole days from today, a missing or `null` one being today. `null` if unusable. */
342
+ function offsetPresetRange(preset, now) {
343
+ const { startOffset, endOffset } = preset;
344
+ // Checked at runtime, as offsets often come from JSON, where a missing one is often written `null`.
345
+ if (startOffset == null && endOffset == null)
346
+ return null;
347
+ if (startOffset != null && !isWholeNumber(startOffset))
348
+ return null;
349
+ if (endOffset != null && !isWholeNumber(endOffset))
350
+ return null;
351
+ const start = addDays(now, startOffset !== null && startOffset !== void 0 ? startOffset : 0);
352
+ const end = addDays(now, endOffset !== null && endOffset !== void 0 ? endOffset : 0);
353
+ return start <= end ? [start, end] : null;
354
+ }
355
+ // The list is re-resolved on every read, so each warning is said once.
356
+ const warned = new Set();
357
+ function warnOnce(message) {
358
+ if (warned.has(message))
359
+ return;
360
+ warned.add(message);
361
+ console.warn(`PDS Datepicker: ${message}`);
362
+ }
340
363
  /**
341
364
  * Normalizes the `presets` prop: a comma-separated list of built-in keys, or an array of presets
342
- * that may relabel a built-in (for translation) or give their own `start` and `end`. Entries that
343
- * resolve to no range are dropped.
365
+ * that may relabel a built-in or give their own range. Unusable entries are dropped with a warning.
344
366
  */
345
367
  function resolvePresets(presets, now) {
368
+ var _a;
346
369
  const entries = typeof presets === 'string'
347
370
  ? presets
348
371
  .split(',')
@@ -356,14 +379,26 @@ function resolvePresets(presets, now) {
356
379
  for (const preset of entries) {
357
380
  // Presets often come from parsed JSON, so check types at runtime: a non-string label would
358
381
  // otherwise reach the render as an object, which Stencil can turn into nodes.
359
- if (!preset || typeof preset.key !== 'string')
382
+ if (!preset || typeof preset.key !== 'string') {
383
+ warnOnce('a preset with no string key was left out.');
360
384
  continue;
385
+ }
361
386
  const start = typeof preset.start === 'string' ? parseIsoDate(preset.start) : null;
362
387
  const end = typeof preset.end === 'string' ? parseIsoDate(preset.end) : null;
363
- const range = start && end && start <= end ? [start, end] : builtInPresetRange(preset.key, now);
364
- const label = typeof preset.label === 'string' ? preset.label : DEFAULT_LABELS[preset.key];
365
- if (range && label)
366
- resolved.push({ key: preset.key, label, start: range[0], end: range[1] });
388
+ // Fixed days, then offsets, then the built-in range.
389
+ const fixed = start !== null && end !== null && start <= end ? [start, end] : null;
390
+ const range = (_a = fixed !== null && fixed !== void 0 ? fixed : offsetPresetRange(preset, now)) !== null && _a !== void 0 ? _a : builtInPresetRange(preset.key, now);
391
+ // A blank label would leave the button unnamed.
392
+ const label = typeof preset.label === 'string' && preset.label.trim() !== '' ? preset.label : DEFAULT_LABELS[preset.key];
393
+ if (range === null) {
394
+ 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.`);
395
+ continue;
396
+ }
397
+ if (label === undefined) {
398
+ warnOnce(`preset "${preset.key}" has no label and was left out.`);
399
+ continue;
400
+ }
401
+ resolved.push({ key: preset.key, label, start: range[0], end: range[1] });
367
402
  }
368
403
  return resolved;
369
404
  }
@@ -2049,14 +2084,14 @@ const PdsDatepicker = class {
2049
2084
  }
2050
2085
  render() {
2051
2086
  const locale = this.resolvedLocale;
2052
- return (index.h(index.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 }, index.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 && (index.h("button", {
2087
+ return (index.h(index.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 }, index.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 && (index.h("button", {
2053
2088
  // Keyed, as is the calendar button: when Clear appears after a pick, the focused
2054
2089
  // calendar button must stay that button rather than be reused as Clear.
2055
2090
  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,
2056
2091
  // Out of the tab order, as a native search field's clear button is: Tab from a field
2057
2092
  // just emptied would land on it as the change removes it, dropping focus to the page.
2058
2093
  tabindex: "-1", onMouseDown: this.onClearMouseDown, onClick: this.onClearClick
2059
- }, index.h("pds-icon", { key: '6a7da726d86654d3598f84b8ea7a8ed244a8e5da', icon: index$1.remove, "aria-hidden": "true" }))), index.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 }, index.h("pds-icon", { key: '92af87e66b7bb2e95861b873077a7bfb0268c2e0', icon: index$1.calendarSimple, "aria-hidden": "true" }))), this.isOpen && this.renderCalendar(locale)));
2094
+ }, index.h("pds-icon", { key: '934fc6303da1dca04cb073c5875a0f9fc286fdd1', icon: index$1.remove, "aria-hidden": "true" }))), index.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 }, index.h("pds-icon", { key: '75ab4fc79ce9f95e7ee6555763166d800a2f1135', icon: index$1.calendarSimple, "aria-hidden": "true" }))), this.isOpen && this.renderCalendar(locale)));
2060
2095
  }
2061
2096
  static get formAssociated() { return true; }
2062
2097
  get el() { return index.getElement(this); }
@@ -15,7 +15,7 @@ const PdsDrawerContent = class {
15
15
  reconnectedContent.unwrapReconnectedContent(this.el.querySelector('.pds-drawer-content'), '.pds-drawer-content');
16
16
  }
17
17
  render() {
18
- return (index.h("div", { key: 'b15b087506c1292f9d67e531e8d935069749c09d', class: "pds-drawer-content" }, index.h("slot", { key: '9c60ca75c7905e7e994f9c41eee213b962afb833' })));
18
+ return (index.h("div", { key: '0d59724de849bc2364d88c4460f70f8b1efa5d1b', class: "pds-drawer-content" }, index.h("slot", { key: '83782b9b4ad99f8075809c9e63d8351fa6109b11' })));
19
19
  }
20
20
  get el() { return index.getElement(this); }
21
21
  };
@@ -15,7 +15,7 @@ const PdsDrawerFooter = class {
15
15
  reconnectedContent.unwrapReconnectedContent(this.el.querySelector('.pds-drawer__footer'), '.pds-drawer__footer');
16
16
  }
17
17
  render() {
18
- return (index.h("footer", { key: 'a4eec0aff617c605b94f8d3b9ec1e2d98cded6fb', class: "pds-drawer__footer" }, index.h("slot", { key: '6dc379c940e37edfd05d99728be9dff58ca1d717' })));
18
+ return (index.h("footer", { key: '1345b87580b1931d7c541fac71c0dff33b6cfbf9', class: "pds-drawer__footer" }, index.h("slot", { key: '638fa6bd14d28e814e0e40b02efb1b74f89f51dd' })));
19
19
  }
20
20
  get el() { return index.getElement(this); }
21
21
  };
@@ -15,7 +15,7 @@ const PdsDrawerHeader = class {
15
15
  reconnectedContent.unwrapReconnectedContent(this.el.querySelector('.pds-drawer__header'), '.pds-drawer__header');
16
16
  }
17
17
  render() {
18
- return (index.h("header", { key: '6b9338e5dbf7a7e580c11b28c95ca53693528382', class: "pds-drawer__header" }, index.h("slot", { key: '0990fbcf94c0c438b98cf1e8945f1e2fd9aa33dc' })));
18
+ return (index.h("header", { key: '6354f36d59e608a85c3cb75d1e5cf04c48dd7045', class: "pds-drawer__header" }, index.h("slot", { key: '2c9d8a405c8850588377553f3d9a19790828cba7' })));
19
19
  }
20
20
  get el() { return index.getElement(this); }
21
21
  };
@@ -25,8 +25,8 @@ const PdsDrawer = class {
25
25
  */
26
26
  this.open = false;
27
27
  /**
28
- * Which edge of the viewport the drawer is docked to. Logical, so this is
29
- * free under RTL — `end` is the inline-end edge regardless of direction.
28
+ * Which edge of the viewport the drawer is docked to. Logical: `end` is the
29
+ * inline-end edge, so an `end` drawer docks on the left in right-to-left layouts.
30
30
  * @default 'end'
31
31
  */
32
32
  this.side = 'end';
@@ -52,9 +52,7 @@ const PdsDrawer = class {
52
52
  /**
53
53
  * Whether the drawer can be dismissed with a pointerdown outside it (in a
54
54
  * `modal` drawer, a click on its backdrop).
55
- * Replaces `pds-modal`'s `backdropDismiss`.
56
- * This also gates Escape, matching how `backdropDismiss` gates Escape on
57
- * `pds-modal` today: setting this to `false` means the close button is the
55
+ * Setting it to `false` also turns off Escape, so the close button is the
58
56
  * only way out.
59
57
  *
60
58
  * A trigger outside the drawer should only ever set `open` to `true` and
@@ -145,11 +143,11 @@ const PdsDrawer = class {
145
143
  this.open = false;
146
144
  }
147
145
  render() {
148
- return (index.h(index.Host, { key: '7cf13256457914e48e8fde422832a2a52ee0c13b', class: {
146
+ return (index.h(index.Host, { key: 'dda3f1dc3013f28a3fc8d1894609dd4b14d227ee', class: {
149
147
  'pds-drawer': true,
150
148
  [`pds-drawer--${this.side}`]: true,
151
149
  [`pds-drawer--${this.size}`]: true,
152
- } }, index.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' }, index.h("slot", { key: '41bfdea76282b333ca6950048999cb9d94e69438' }))));
150
+ } }, index.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' }, index.h("slot", { key: 'ca4cd34297b4580d554edb45bfbec5b44d7d1fb0' }))));
153
151
  }
154
152
  get el() { return index.getElement(this); }
155
153
  };
@@ -3,42 +3,72 @@
3
3
  var index = require('./index-D9iJuJCP.js');
4
4
  require('./keep-hydrated-AKoh0DG4.js');
5
5
 
6
- 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)}`;
6
+ 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)}`;
7
7
 
8
8
  const PdsDropdownMenuItem = class {
9
9
  constructor(hostRef) {
10
10
  index.registerInstance(this, hostRef);
11
11
  this.pdsClick = index.createEvent(this, "pdsClick");
12
12
  /**
13
- * It determines whether or not the dropdown-item is destructive.
13
+ * Determines whether or not the dropdown menu item is destructive.
14
14
  * @defaultValue false
15
15
  */
16
16
  this.destructive = false;
17
17
  /**
18
- * It determines whether or not the dropdown-item is disabled.
18
+ * Determines whether or not the dropdown menu item is disabled.
19
19
  * @defaultValue false
20
20
  */
21
21
  this.disabled = false;
22
22
  /**
23
- * It determines whether or not the dropdown-item is informational: text that the arrow keys
23
+ * Determines whether or not the dropdown menu item is informational: text that the arrow keys
24
24
  * reach but that can't be activated. Takes precedence over `href` and `destructive`.
25
25
  * Screen readers announce it as dimmed or unavailable, the same way as a disabled item.
26
26
  * @defaultValue false
27
27
  */
28
28
  this.informational = false;
29
29
  /**
30
- * Determines whether the link should open in a new tab and display an external icon.
31
- * This is a simpler alternative to using `target="_blank"` for the common case.
32
- * Ignored when `informational` is set.
30
+ * Shows the external-link (launch) icon. Opens in a new tab unless `target` says otherwise.
31
+ * Only applies when href is set. Ignored when `informational` is set.
33
32
  * @defaultValue false
34
33
  */
35
34
  this.external = false;
36
- this.hasFocus = false;
37
- this.handleFocus = () => {
38
- this.hasFocus = true;
35
+ this.handleClick = () => {
36
+ var _a, _b;
37
+ if (this.disabled || this.informational)
38
+ return;
39
+ // Filter only pds-dropdown-menu-item elements and find the index of the current item
40
+ 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');
41
+ const itemIndex = menuItems.indexOf(this.host);
42
+ // The label's text: default-slot content only, so start-slot content stays out of it
43
+ const content = Array.from(this.host.childNodes)
44
+ .filter((node) => node.nodeType === Node.TEXT_NODE ||
45
+ (node.nodeType === Node.ELEMENT_NODE && !node.getAttribute('slot')))
46
+ .map((node) => node.textContent)
47
+ .join('')
48
+ .trim();
49
+ this.pdsClick.emit({
50
+ itemIndex,
51
+ item: this.host,
52
+ content
53
+ });
39
54
  };
40
- this.handleBlur = () => {
41
- this.hasFocus = false;
55
+ // Checked directly against the light DOM rather than kept in @State: Stencil's JSX doesn't
56
+ // type a `class` prop for `<slot>`, and a ref callback only fires once, on creation, so it
57
+ // can't push a later @State change back onto the element either way. Called once up front
58
+ // (from the ref, since nothing's assigned at componentWillLoad's point) and again on every
59
+ // native slotchange after that, both calling classList directly. add/remove, not the two-argument
60
+ // form of toggle(): Stencil's mock-doc (used by spec tests) implements toggle() as a plain flip
61
+ // and silently ignores a force argument, so a toggle() call that'd be correct against a real
62
+ // DOM can still fail there.
63
+ this.updateStartSlotEmpty = () => {
64
+ var _a, _b;
65
+ const hasContent = Array.from(this.host.children).some((child) => child.getAttribute('slot') === 'start');
66
+ if (hasContent) {
67
+ (_a = this.startSlotEl) === null || _a === void 0 ? void 0 : _a.classList.remove('pds-dropdown-menu-item__start--empty');
68
+ }
69
+ else {
70
+ (_b = this.startSlotEl) === null || _b === void 0 ? void 0 : _b.classList.add('pds-dropdown-menu-item__start--empty');
71
+ }
42
72
  };
43
73
  // Space would otherwise scroll the page, since nothing in the item takes the key.
44
74
  this.handleInformationalKeyDown = (event) => {
@@ -47,63 +77,69 @@ const PdsDropdownMenuItem = class {
47
77
  }
48
78
  };
49
79
  this.handleKeyDown = (event) => {
50
- // Handle keyboard events
51
- if (!this.disabled && (event.key === 'Enter')) {
52
- // Only prevent default for button elements or Space key
53
- // For links with Enter key, we want the default navigation behavior
54
- if (!this.href) {
55
- event.preventDefault();
56
- }
57
- this.handleClick();
80
+ var _a;
81
+ if (this.disabled || event.key !== 'Enter')
82
+ return;
83
+ if (this.href != null) {
84
+ // Enter on the inner <a> itself follows the link, and its native click reaches the host's
85
+ // click handler below, which emits pdsClick -- returning early here leaves that alone.
86
+ // Safari leaves focus on the pds-link host after a mouse click, not its inner <a>, where
87
+ // Enter would otherwise do nothing: an anchor only activates on Enter when it is itself the
88
+ // focused element, not an ancestor of it. Forwarding the click to the real anchor instead
89
+ // runs the browser's own navigation (hash, download, target), and still reaches the same
90
+ // host click handler, so pdsClick still isn't emitted twice.
91
+ if (event.composedPath()[0] !== this.innerAnchor())
92
+ (_a = this.innerAnchor()) === null || _a === void 0 ? void 0 : _a.click();
93
+ return;
58
94
  }
95
+ event.preventDefault();
96
+ this.handleClick();
59
97
  };
60
98
  }
61
99
  /**
62
- * Trigger the click event
100
+ * Trigger the click event. Does nothing when the item is disabled or informational.
63
101
  */
64
102
  async clickItem() {
65
103
  this.handleClick();
66
104
  }
67
105
  ;
68
- handleClick() {
69
- var _a;
70
- if (this.informational)
71
- return;
72
- // Filter only pds-dropdown-menu-item elements and find the index of the current item
73
- const menuItems = Array.from(this.host.parentNode.children).filter((child) => child.tagName.toLowerCase() === 'pds-dropdown-menu-item');
74
- const itemIndex = menuItems.indexOf(this.host);
75
- // Get the text content from the slotted content
76
- const content = ((_a = this.host.textContent) === null || _a === void 0 ? void 0 : _a.trim()) || '';
77
- this.pdsClick.emit({
78
- itemIndex,
79
- item: this.host,
80
- content
81
- });
106
+ // Always render the start slot so slotted content is projected reliably, with nothing wrapping
107
+ // it: a wrapper would sit between the slotted content and this host, leaving it without an
108
+ // assignedSlot, which breaks a click-target walk that follows assignedSlot up to find a link
109
+ // (Turbo's link lookup works this way). The --empty class hides it when nothing is slotted, so
110
+ // it adds no gap.
111
+ renderContent() {
112
+ return [
113
+ index.h("slot", { name: "start", onSlotchange: this.updateStartSlotEmpty, ref: (el) => {
114
+ this.startSlotEl = el;
115
+ if (el) {
116
+ el.classList.add('pds-dropdown-menu-item__start');
117
+ this.updateStartSlotEmpty();
118
+ }
119
+ } }),
120
+ index.h("slot", null)
121
+ ];
82
122
  }
83
123
  renderElement() {
84
124
  if (this.informational) {
85
- return (index.h("div", { class: {
86
- 'pds-dropdown-menu-item__content': true,
87
- 'has-focus': this.hasFocus
88
- }, role: "menuitem", "aria-disabled": "true", part: "button", tabIndex: this.disabled ? -1 : 0, onKeyDown: this.handleInformationalKeyDown, onFocus: this.handleFocus, onBlur: this.handleBlur }, index.h("slot", null)));
125
+ return (index.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()));
89
126
  }
90
127
  if (this.href != null) {
91
- return (index.h("pds-link", { download: this.download, href: this.disabled ? null : this.href, external: this.external, externalLabel: this.externalLabel, target: this.target, class: {
92
- 'pds-dropdown-menu-item__content': true,
93
- 'has-focus': this.hasFocus
94
- }, tabIndex: this.disabled ? -1 : 0, onKeyDown: this.handleKeyDown, onFocus: this.handleFocus, onBlur: this.handleBlur, "aria-disabled": this.disabled ? 'true' : null }, index.h("slot", null)));
128
+ return (index.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()));
95
129
  }
96
- return (index.h("button", { class: {
97
- 'pds-dropdown-menu-item__content': true,
98
- 'has-focus': this.hasFocus
99
- }, 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 }, index.h("slot", null)));
130
+ return (index.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()));
131
+ }
132
+ // pds-link's own shadow root, one level in from its host.
133
+ innerAnchor() {
134
+ var _a, _b, _c, _d;
135
+ 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;
100
136
  }
101
137
  render() {
102
- return (index.h(index.Host, { key: 'a69947d99160783919f711d7c53e0592694f9565', id: this.componentId, class: {
138
+ return (index.h(index.Host, { key: '139943faad1c0047bb0363e0eaa0cde9efb2f957', id: this.componentId, class: {
103
139
  'is-disabled': this.disabled,
104
140
  'is-informational': this.informational,
105
141
  'destructive': !this.disabled && !this.informational && this.destructive
106
- }, onClick: () => !this.disabled && this.handleClick(), role: "none",
142
+ }, onClick: this.handleClick, role: "none",
107
143
  // ARIA ignores role="none" on focusable elements, so a focusable host would sit between
108
144
  // the menu and the informational menuitem as an unexpected child.
109
145
  tabIndex: this.informational ? null : -1, "aria-disabled": this.disabled && !this.informational ? 'true' : null }, this.renderElement()));
@@ -9,13 +9,13 @@ const PdsDropdownMenuSeparator = class {
9
9
  constructor(hostRef) {
10
10
  index.registerInstance(this, hostRef);
11
11
  /**
12
- * It determines whether or not the dropdown-item is disabled.
12
+ * Has no effect. A separator can't be focused or activated.
13
13
  * @defaultValue false
14
14
  */
15
15
  this.disabled = false;
16
16
  }
17
17
  render() {
18
- return (index.h(index.Host, { key: '72f29c5015d2379d9986c90ec966f34f41298226', id: this.componentId }, index.h("hr", { key: '72c2155d0fbee6346f3f38997009a7d9e14ad0c8' })));
18
+ return (index.h(index.Host, { key: '74a214d61042d5759af5aef9d6410ed1a267083c', id: this.componentId }, index.h("hr", { key: 'c521eda51523fce09bd408af2586645fc9a9cd03' })));
19
19
  }
20
20
  };
21
21
  PdsDropdownMenuSeparator.style = pdsDropdownMenuSeparatorCss();
@@ -1,11 +1,11 @@
1
1
  'use strict';
2
2
 
3
3
  var index = require('./index-D9iJuJCP.js');
4
- var attributes = require('./attributes-CW49XqaL.js');
4
+ var attributes = require('./attributes-Cgbkw6gO.js');
5
5
  var keepHydrated = require('./keep-hydrated-AKoh0DG4.js');
6
6
  var floatingUi_dom = require('./floating-ui.dom-Dw41zbyY.js');
7
7
 
8
- 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}`;
8
+ 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}`;
9
9
 
10
10
  const PdsDropdownMenu = class {
11
11
  constructor(hostRef) {
@@ -13,7 +13,10 @@ const PdsDropdownMenu = class {
13
13
  this.isOpen = false;
14
14
  this.menuItems = [];
15
15
  this.cleanupAutoUpdate = null;
16
+ // Counts each opening, so a position worked out for an earlier opening is ignored.
17
+ this.openCount = 0;
16
18
  this.triggerObserver = null;
19
+ this.triggerVisibility = null;
17
20
  this.currentFocusIndex = -1;
18
21
  this.hasHeader = false;
19
22
  /**
@@ -74,12 +77,20 @@ const PdsDropdownMenu = class {
74
77
  // Open the dropdown and position it
75
78
  this.openDropdown = () => {
76
79
  var _a;
80
+ const opening = ++this.openCount;
77
81
  const updatePosition = () => {
78
82
  floatingUi_dom.computePosition(this.triggerEl, this.panelEl, {
79
83
  placement: this.placement,
80
84
  strategy: 'fixed',
81
- middleware: [floatingUi_dom.offset(6), floatingUi_dom.flip(), floatingUi_dom.shift({ padding: 5 })],
85
+ middleware: [
86
+ floatingUi_dom.offset(6),
87
+ floatingUi_dom.flip(),
88
+ floatingUi_dom.shift({ padding: 5 }),
89
+ floatingUi_dom.size({ padding: 5, apply: ({ availableHeight, elements }) => this.capPanelHeight(elements.floating, availableHeight) }),
90
+ ],
82
91
  }).then(({ x, y }) => {
92
+ if (!this.isOpen || opening !== this.openCount)
93
+ return;
83
94
  Object.assign(this.panelEl.style, {
84
95
  left: `${x}px`,
85
96
  top: `${y}px`,
@@ -90,12 +101,15 @@ const PdsDropdownMenu = class {
90
101
  updatePosition();
91
102
  // Set up auto-update for window resize and scroll
92
103
  this.cleanupAutoUpdate = floatingUi_dom.autoUpdate(this.triggerEl, this.panelEl, updatePosition);
104
+ this.watchTriggerVisibility();
93
105
  (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('pds-box').classList.remove('is-hidden');
94
106
  this.isOpen = true;
95
107
  this.syncTriggerAria();
96
108
  };
97
- // Close the dropdown
98
- this.closeDropdown = () => {
109
+ // Close the dropdown. Closed because its trigger left the view, focus from the menu still goes back
110
+ // to the trigger, so it isn't lost, but without scrolling the trigger back into view. The next Tab
111
+ // carries on from there.
112
+ this.closeDropdown = ({ preventScroll = false } = {}) => {
99
113
  var _a;
100
114
  (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('pds-box').classList.add('is-hidden');
101
115
  this.isOpen = false;
@@ -104,12 +118,13 @@ const PdsDropdownMenu = class {
104
118
  this.cleanupAutoUpdate();
105
119
  this.cleanupAutoUpdate = null;
106
120
  }
121
+ this.stopWatchingTriggerVisibility();
107
122
  this.syncTriggerAria();
108
123
  // Reset focus index
109
124
  this.currentFocusIndex = -1;
110
125
  // Return focus to trigger
111
126
  if (this.isFocusInMenu()) {
112
- this.focusTrigger();
127
+ this.focusTrigger(preventScroll);
113
128
  }
114
129
  };
115
130
  // Handle click on the trigger element
@@ -139,6 +154,10 @@ const PdsDropdownMenu = class {
139
154
  }
140
155
  (_a = this.triggerObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
141
156
  this.triggerObserver = null;
157
+ this.stopWatchingTriggerVisibility();
158
+ // The menu was detached, so a position still being worked out for it is dropped. The menu
159
+ // itself stays open.
160
+ this.openCount++;
142
161
  }
143
162
  // The trigger is the consumer's element, so anything can rewrite its attributes (a Turbo morph
144
163
  // matches it to server HTML that has no ARIA). Put Pine's values back when that happens.
@@ -155,18 +174,72 @@ const PdsDropdownMenu = class {
155
174
  attributeFilter: ['aria-haspopup', 'aria-expanded'],
156
175
  });
157
176
  }
177
+ // The panel is fixed, so a menu taller than the room beside its trigger would run off the window
178
+ // with no way to reach its last items. It's capped to that room and scrolls inside itself. A
179
+ // smaller max-height set through the menu-panel part is kept. The cap is important, as a
180
+ // ::part() rule outside the shadow root otherwise beats the panel's own inline style.
181
+ //
182
+ // Removing `max-height` lifts the panel's own scroll constraint, so a layout read in between
183
+ // (`getComputedStyle`) can commit a frame with nothing left to scroll, and the browser resets
184
+ // `scrollTop` to 0. This runs on every `autoUpdate` pass, including a small ancestor scroll that
185
+ // leaves the trigger in view, so a menu scrolled partway down would otherwise jump back to the
186
+ // top on its own. Restoring `scrollTop` afterward keeps the user's place; the browser clamps it
187
+ // automatically if the new max-height is shorter than before.
188
+ capPanelHeight(panel, availableHeight) {
189
+ const { scrollTop } = panel;
190
+ panel.style.removeProperty('max-height');
191
+ const partMaxHeight = getComputedStyle(panel).maxHeight;
192
+ const room = `${Math.max(0, availableHeight)}px`;
193
+ panel.style.setProperty('max-height', partMaxHeight === 'none' ? room : `min(${partMaxHeight}, ${room})`, 'important');
194
+ panel.scrollTop = scrollTop;
195
+ }
196
+ // Once the trigger is fully out of view, scrolled or clipped by any container or the window, the
197
+ // menu closes rather than float away from it, much as a native select's list does. An
198
+ // IntersectionObserver measures against the layout viewport, so panning a pinch-zoomed page
199
+ // doesn't close it, as Floating UI's hide() would.
200
+ watchTriggerVisibility() {
201
+ this.stopWatchingTriggerVisibility();
202
+ if (typeof IntersectionObserver === 'undefined')
203
+ return;
204
+ // Only a trigger seen in view this opening closes the menu when it leaves.
205
+ let triggerSeen = false;
206
+ let broughtIntoView = false;
207
+ this.triggerVisibility = new IntersectionObserver((entries) => {
208
+ if (!this.isOpen)
209
+ return;
210
+ if (entries[entries.length - 1].isIntersecting) {
211
+ triggerSeen = true;
212
+ }
213
+ else if (triggerSeen) {
214
+ this.closeDropdown({ preventScroll: true });
215
+ }
216
+ else if (!broughtIntoView) {
217
+ // Opened with its trigger out of view, from the keyboard after an earlier close or from a
218
+ // script, the trigger is scrolled into view so the menu opens beside it. A trigger that
219
+ // still can't be seen leaves the menu open.
220
+ broughtIntoView = true;
221
+ this.triggerEl.scrollIntoView({ block: 'nearest', inline: 'nearest' });
222
+ }
223
+ });
224
+ this.triggerVisibility.observe(this.triggerEl);
225
+ }
226
+ stopWatchingTriggerVisibility() {
227
+ var _a;
228
+ (_a = this.triggerVisibility) === null || _a === void 0 ? void 0 : _a.disconnect();
229
+ this.triggerVisibility = null;
230
+ }
158
231
  // Outside clicks and scripted closes leave focus where it is; only focus in the menu or on its trigger returns.
159
232
  isFocusInMenu() {
160
233
  const focused = this.host.getRootNode().activeElement;
161
234
  return focused != null && this.host.contains(focused);
162
235
  }
163
236
  // A trigger whose host can't take focus itself, such as pds-chip, passes it to the control inside.
164
- focusTrigger() {
237
+ focusTrigger(preventScroll = false) {
165
238
  var _a, _b;
166
- this.triggerEl.focus();
239
+ this.triggerEl.focus({ preventScroll });
167
240
  if (this.host.getRootNode().activeElement === this.triggerEl)
168
241
  return;
169
- (_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();
242
+ (_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 });
170
243
  }
171
244
  // Check if a menu item is disabled (handles both component and raw elements)
172
245
  isItemDisabled(item) {
@@ -371,7 +444,7 @@ const PdsDropdownMenu = class {
371
444
  }
372
445
  }
373
446
  render() {
374
- return (index.h(index.Host, { key: 'aa4ce84354cf87638ee46fd7ed69520228b7e656', id: this.componentId }, index.h("slot", { key: '948800e67d18c8c6cc9e77ef3aeab635c5035453', name: "trigger", onSlotchange: this.handleTriggerSlotChange }), index.h("pds-box", { key: '3ce2a2879b14aad975cea8ae72fcbf8c3abcf20c', "border-radius": "sm", display: "flex", direction: "column", class: "pds-dropdown-menu--panel is-hidden", shadow: "100", part: "menu-panel" }, index.h("div", { key: 'ad25fbf4f3c7a24653c229e64fe2ce893a92e4c8', class: { 'pds-dropdown-menu__header': true, 'is-hidden': !this.hasHeader } }, index.h("slot", { key: '35a5903543e08577997b456bcd312bdd009fd8fc', name: "header", onSlotchange: this.handleHeaderSlotChange })), index.h("div", { key: 'a9593adacf047918c1d87494f8c951a2a4a5f76f', class: "pds-dropdown-menu__items", role: "menu", "aria-orientation": "vertical" }, index.h("slot", { key: '8d2def1cc7020608220099f4ced0f44e9838cce8', onSlotchange: this.handleSlotChange })))));
447
+ return (index.h(index.Host, { key: '1776921b263178df0de2cdf07a9fb81c668381b6', id: this.componentId }, index.h("slot", { key: '952fdc2b6bb3f1fca5a17dc1962af0e4c38f92e2', name: "trigger", onSlotchange: this.handleTriggerSlotChange }), index.h("pds-box", { key: 'f5f95cebdcf4a4d78d0e4bc47b99c681045f8d38', "border-radius": "sm", display: "flex", direction: "column", class: "pds-dropdown-menu--panel is-hidden", shadow: "100", part: "menu-panel" }, index.h("div", { key: '8bff8a8dd06fe1f433bc512bc0ac9030fc9714e7', class: { 'pds-dropdown-menu__header': true, 'is-hidden': !this.hasHeader } }, index.h("slot", { key: '1c248f137414dd00037d333b1e07c6b04a7b079d', name: "header", onSlotchange: this.handleHeaderSlotChange })), index.h("div", { key: 'db9954f26762a65e762f8c7b3dfd60e363ff8573', class: "pds-dropdown-menu__items", role: "menu", "aria-orientation": "vertical" }, index.h("slot", { key: 'd5cb929db03966d673b23de150970744936cf26d', onSlotchange: this.handleSlotChange })))));
375
448
  }
376
449
  get host() { return index.getElement(this); }
377
450
  };