@pine-ds/core 4.4.2 → 4.4.4

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 (321) hide show
  1. package/components/attributes.js +1 -1
  2. package/components/closest.js +1 -1
  3. package/components/pds-avatar.js +1 -1
  4. package/components/pds-box2.js +1 -1
  5. package/components/pds-checkbox2.js +1 -1
  6. package/components/pds-chip2.js +1 -1
  7. package/components/pds-combobox.js +2 -2
  8. package/components/pds-copytext.js +1 -1
  9. package/components/pds-datepicker.js +1 -1
  10. package/components/pds-drawer-content.js +1 -1
  11. package/components/pds-drawer-footer.js +1 -1
  12. package/components/pds-drawer-header.js +1 -1
  13. package/components/pds-drawer.js +1 -1
  14. package/components/pds-dropdown-menu.js +1 -1
  15. package/components/pds-loader2.js +1 -1
  16. package/components/pds-modal-content.js +1 -1
  17. package/components/pds-modal-footer.js +1 -1
  18. package/components/pds-modal-header.js +1 -1
  19. package/components/pds-modal2.js +1 -1
  20. package/components/pds-popover.js +1 -1
  21. package/components/pds-progress.js +1 -1
  22. package/components/pds-radio-group.js +1 -1
  23. package/components/pds-radio.js +1 -1
  24. package/components/pds-row.js +1 -1
  25. package/components/pds-select.js +1 -1
  26. package/components/pds-sortable-item.js +1 -1
  27. package/components/pds-sortable.js +2 -2
  28. package/components/pds-switch.js +1 -1
  29. package/components/pds-table-head.js +1 -1
  30. package/components/pds-table-row.js +1 -1
  31. package/components/pds-tabpanel.js +1 -1
  32. package/components/pds-tabs.js +1 -1
  33. package/components/pds-tooltip.js +1 -1
  34. package/components/reflected-attribute-default.js +1 -0
  35. package/dist/cjs/attributes-DrQqSEv4.js +188 -0
  36. package/dist/cjs/loader.cjs.js +1 -1
  37. package/dist/cjs/pds-avatar.cjs.entry.js +17 -1
  38. package/dist/cjs/pds-box.cjs.entry.js +11 -1
  39. package/dist/cjs/pds-checkbox.cjs.entry.js +11 -4
  40. package/dist/cjs/pds-chip.cjs.entry.js +10 -1
  41. package/dist/cjs/pds-combobox.cjs.entry.js +11 -6
  42. package/dist/cjs/pds-copytext.cjs.entry.js +16 -1
  43. package/dist/cjs/pds-drawer-content.cjs.entry.js +1 -1
  44. package/dist/cjs/pds-drawer-footer.cjs.entry.js +1 -1
  45. package/dist/cjs/pds-drawer-header.cjs.entry.js +1 -1
  46. package/dist/cjs/pds-drawer.cjs.entry.js +2 -2
  47. package/dist/cjs/pds-dropdown-menu.cjs.entry.js +39 -9
  48. package/dist/cjs/pds-input.cjs.entry.js +1 -1
  49. package/dist/cjs/pds-loader.cjs.entry.js +27 -1
  50. package/dist/cjs/pds-modal-content.cjs.entry.js +2 -2
  51. package/dist/cjs/pds-modal-footer.cjs.entry.js +1 -1
  52. package/dist/cjs/pds-modal-header.cjs.entry.js +1 -1
  53. package/dist/cjs/pds-modal.cjs.entry.js +135 -49
  54. package/dist/cjs/pds-popover.cjs.entry.js +81 -13
  55. package/dist/cjs/pds-progress.cjs.entry.js +12 -1
  56. package/dist/cjs/pds-radio-group.cjs.entry.js +3 -3
  57. package/dist/cjs/pds-radio.cjs.entry.js +11 -3
  58. package/dist/cjs/pds-row.cjs.entry.js +11 -1
  59. package/dist/cjs/pds-select.cjs.entry.js +13 -1
  60. package/dist/cjs/pds-sortable-item.cjs.entry.js +10 -1
  61. package/dist/cjs/pds-sortable.cjs.entry.js +11 -1
  62. package/dist/cjs/pds-switch.cjs.entry.js +12 -4
  63. package/dist/cjs/pds-tabpanel.cjs.entry.js +1 -1
  64. package/dist/cjs/pds-tabs.cjs.entry.js +13 -1
  65. package/dist/cjs/pds-textarea.cjs.entry.js +1 -1
  66. package/dist/cjs/pds-tooltip.cjs.entry.js +2 -2
  67. package/dist/cjs/pine-core.cjs.js +1 -1
  68. package/dist/cjs/reflected-attribute-default-DVYHG6O1.js +44 -0
  69. package/dist/collection/components/pds-avatar/pds-avatar.js +20 -3
  70. package/dist/collection/components/pds-box/pds-box.js +14 -1
  71. package/dist/collection/components/pds-checkbox/pds-checkbox.js +11 -4
  72. package/dist/collection/components/pds-chip/pds-chip.js +10 -1
  73. package/dist/collection/components/pds-combobox/pds-combobox.css +16 -2
  74. package/dist/collection/components/pds-combobox/pds-combobox.js +33 -5
  75. package/dist/collection/components/pds-combobox/stories/pds-combobox.stories.js +41 -0
  76. package/dist/collection/components/pds-copytext/pds-copytext.js +17 -2
  77. package/dist/collection/components/pds-drawer/pds-drawer-content/pds-drawer-content.js +2 -1
  78. package/dist/collection/components/pds-drawer/pds-drawer-footer/pds-drawer-footer.js +4 -1
  79. package/dist/collection/components/pds-drawer/pds-drawer-header/pds-drawer-header.js +4 -1
  80. package/dist/collection/components/pds-drawer/pds-drawer.js +3 -2
  81. package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu.js +39 -9
  82. package/dist/collection/components/pds-loader/pds-loader.js +29 -2
  83. package/dist/collection/components/pds-modal/pds-modal-content/pds-modal-content.js +5 -2
  84. package/dist/collection/components/pds-modal/pds-modal-footer/pds-modal-footer.js +4 -1
  85. package/dist/collection/components/pds-modal/pds-modal-header/pds-modal-header.js +4 -1
  86. package/dist/collection/components/pds-modal/pds-modal.js +138 -49
  87. package/dist/collection/components/pds-popover/pds-popover.js +83 -14
  88. package/dist/collection/components/pds-progress/pds-progress.js +12 -1
  89. package/dist/collection/components/pds-radio/pds-radio.js +12 -3
  90. package/dist/collection/components/pds-radio-group/pds-radio-group.js +4 -3
  91. package/dist/collection/components/pds-row/pds-row.js +14 -1
  92. package/dist/collection/components/pds-select/pds-select.js +13 -1
  93. package/dist/collection/components/pds-sortable/pds-sortable-item/pds-sortable-item.js +11 -1
  94. package/dist/collection/components/pds-sortable/pds-sortable.js +14 -1
  95. package/dist/collection/components/pds-switch/pds-switch.js +12 -4
  96. package/dist/collection/components/pds-tabs/pds-tab/pds-tab.js +3 -0
  97. package/dist/collection/components/pds-tabs/pds-tabpanel/pds-tabpanel.js +4 -1
  98. package/dist/collection/components/pds-tabs/pds-tabs.js +13 -1
  99. package/dist/collection/components/pds-tooltip/pds-tooltip.js +3 -2
  100. package/dist/collection/utils/attributes.js +101 -0
  101. package/dist/collection/utils/reflected-attribute-default.js +40 -0
  102. package/dist/collection/utils/test/host-strip.js +50 -0
  103. package/dist/docs.json +129 -19
  104. package/dist/esm/attributes-myrJDwbR.js +183 -0
  105. package/dist/esm/loader.js +1 -1
  106. package/dist/esm/pds-avatar.entry.js +18 -2
  107. package/dist/esm/pds-box.entry.js +12 -2
  108. package/dist/esm/pds-checkbox.entry.js +11 -4
  109. package/dist/esm/pds-chip.entry.js +10 -1
  110. package/dist/esm/pds-combobox.entry.js +11 -6
  111. package/dist/esm/pds-copytext.entry.js +16 -1
  112. package/dist/esm/pds-drawer-content.entry.js +1 -1
  113. package/dist/esm/pds-drawer-footer.entry.js +1 -1
  114. package/dist/esm/pds-drawer-header.entry.js +1 -1
  115. package/dist/esm/pds-drawer.entry.js +2 -2
  116. package/dist/esm/pds-dropdown-menu.entry.js +39 -9
  117. package/dist/esm/pds-input.entry.js +1 -1
  118. package/dist/esm/pds-loader.entry.js +28 -2
  119. package/dist/esm/pds-modal-content.entry.js +2 -2
  120. package/dist/esm/pds-modal-footer.entry.js +1 -1
  121. package/dist/esm/pds-modal-header.entry.js +1 -1
  122. package/dist/esm/pds-modal.entry.js +135 -49
  123. package/dist/esm/pds-popover.entry.js +81 -13
  124. package/dist/esm/pds-progress.entry.js +13 -2
  125. package/dist/esm/pds-radio-group.entry.js +3 -3
  126. package/dist/esm/pds-radio.entry.js +11 -3
  127. package/dist/esm/pds-row.entry.js +12 -2
  128. package/dist/esm/pds-select.entry.js +13 -1
  129. package/dist/esm/pds-sortable-item.entry.js +10 -1
  130. package/dist/esm/pds-sortable.entry.js +11 -1
  131. package/dist/esm/pds-switch.entry.js +12 -4
  132. package/dist/esm/pds-tabpanel.entry.js +1 -1
  133. package/dist/esm/pds-tabs.entry.js +13 -1
  134. package/dist/esm/pds-textarea.entry.js +1 -1
  135. package/dist/esm/pds-tooltip.entry.js +2 -2
  136. package/dist/esm/pine-core.js +1 -1
  137. package/dist/esm/reflected-attribute-default-t3idJwV0.js +42 -0
  138. package/dist/esm-es5/attributes-myrJDwbR.js +1 -0
  139. package/dist/esm-es5/loader.js +1 -1
  140. package/dist/esm-es5/pds-avatar.entry.js +1 -1
  141. package/dist/esm-es5/pds-box.entry.js +1 -1
  142. package/dist/esm-es5/pds-checkbox.entry.js +1 -1
  143. package/dist/esm-es5/pds-chip.entry.js +1 -1
  144. package/dist/esm-es5/pds-combobox.entry.js +1 -1
  145. package/dist/esm-es5/pds-copytext.entry.js +1 -1
  146. package/dist/esm-es5/pds-drawer-content.entry.js +1 -1
  147. package/dist/esm-es5/pds-drawer-footer.entry.js +1 -1
  148. package/dist/esm-es5/pds-drawer-header.entry.js +1 -1
  149. package/dist/esm-es5/pds-drawer.entry.js +1 -1
  150. package/dist/esm-es5/pds-dropdown-menu.entry.js +1 -1
  151. package/dist/esm-es5/pds-input.entry.js +1 -1
  152. package/dist/esm-es5/pds-loader.entry.js +1 -1
  153. package/dist/esm-es5/pds-modal-content.entry.js +1 -1
  154. package/dist/esm-es5/pds-modal-footer.entry.js +1 -1
  155. package/dist/esm-es5/pds-modal-header.entry.js +1 -1
  156. package/dist/esm-es5/pds-modal.entry.js +1 -1
  157. package/dist/esm-es5/pds-popover.entry.js +1 -1
  158. package/dist/esm-es5/pds-progress.entry.js +1 -1
  159. package/dist/esm-es5/pds-radio-group.entry.js +1 -1
  160. package/dist/esm-es5/pds-radio.entry.js +1 -1
  161. package/dist/esm-es5/pds-row.entry.js +1 -1
  162. package/dist/esm-es5/pds-select.entry.js +1 -1
  163. package/dist/esm-es5/pds-sortable-item.entry.js +1 -1
  164. package/dist/esm-es5/pds-sortable.entry.js +2 -2
  165. package/dist/esm-es5/pds-switch.entry.js +1 -1
  166. package/dist/esm-es5/pds-tabpanel.entry.js +1 -1
  167. package/dist/esm-es5/pds-tabs.entry.js +1 -1
  168. package/dist/esm-es5/pds-textarea.entry.js +1 -1
  169. package/dist/esm-es5/pds-tooltip.entry.js +1 -1
  170. package/dist/esm-es5/pine-core.js +1 -1
  171. package/dist/esm-es5/reflected-attribute-default-t3idJwV0.js +1 -0
  172. package/dist/pine-core/p-09d10e9e.entry.js +7 -0
  173. package/dist/pine-core/p-1feace6a.system.entry.js +1 -0
  174. package/dist/pine-core/p-21abd971.entry.js +1 -0
  175. package/dist/pine-core/p-2212224a.system.entry.js +1 -0
  176. package/dist/pine-core/p-2806fa55.system.entry.js +1 -0
  177. package/dist/pine-core/p-2dd3ab72.entry.js +1 -0
  178. package/dist/pine-core/p-30784d57.entry.js +1 -0
  179. package/dist/pine-core/p-3088cd66.entry.js +1 -0
  180. package/dist/pine-core/p-3e829372.system.entry.js +1 -0
  181. package/dist/pine-core/{p-67227922.entry.js → p-44cbdf94.system.entry.js} +1 -1
  182. package/dist/pine-core/p-4765f7f0.entry.js +1 -0
  183. package/dist/pine-core/{p-d00c5b9c.system.entry.js → p-48ab7da8.system.entry.js} +1 -1
  184. package/dist/pine-core/{p-c5c46b65.entry.js → p-4af5f936.entry.js} +1 -1
  185. package/dist/pine-core/{p-b823bde2.system.entry.js → p-5064f007.system.entry.js} +1 -1
  186. package/dist/pine-core/p-5081a96f.entry.js +1 -0
  187. package/dist/pine-core/p-51eb36f4.system.entry.js +3 -0
  188. package/dist/pine-core/p-5527e825.system.entry.js +1 -0
  189. package/dist/pine-core/{p-8d42f505.entry.js → p-5db91557.entry.js} +1 -1
  190. package/dist/pine-core/p-62377463.system.entry.js +1 -0
  191. package/dist/pine-core/{p-d11e4956.entry.js → p-63644dbd.entry.js} +1 -1
  192. package/dist/pine-core/p-6d6079f5.entry.js +1 -0
  193. package/dist/pine-core/p-7386bbdf.system.entry.js +1 -0
  194. package/dist/pine-core/p-74d93179.system.entry.js +1 -0
  195. package/dist/pine-core/p-7647b568.system.entry.js +1 -0
  196. package/dist/pine-core/{p-5e9396e2.system.entry.js → p-7698fcfa.system.entry.js} +1 -1
  197. package/dist/pine-core/{p-b802776b.system.entry.js → p-778a0228.system.entry.js} +1 -1
  198. package/dist/pine-core/{p-f5677949.system.entry.js → p-7a9c687d.system.entry.js} +1 -1
  199. package/dist/pine-core/{p-9b262a9d.entry.js → p-85d77b55.entry.js} +1 -1
  200. package/dist/pine-core/p-88728d46.system.entry.js +1 -0
  201. package/dist/pine-core/{p-6b25f349.system.entry.js → p-8d8512ae.system.entry.js} +1 -1
  202. package/dist/pine-core/p-93341083.system.entry.js +1 -0
  203. package/dist/pine-core/{p-871894e1.entry.js → p-95649e1c.entry.js} +1 -1
  204. package/dist/pine-core/p-97c04215.system.entry.js +1 -0
  205. package/dist/pine-core/p-9ca1b473.system.entry.js +1 -0
  206. package/dist/pine-core/p-Bkho_oFB.system.js +1 -0
  207. package/dist/pine-core/p-BwmzR47K.system.js +1 -0
  208. package/dist/pine-core/p-DO9XKAkv.system.js +1 -1
  209. package/dist/pine-core/p-a0f8a61a.entry.js +1 -0
  210. package/dist/pine-core/p-a232dc19.entry.js +1 -0
  211. package/dist/pine-core/p-a8884f2d.system.entry.js +1 -0
  212. package/dist/pine-core/{p-601b646c.system.entry.js → p-a8f23db0.system.entry.js} +1 -1
  213. package/dist/pine-core/p-a9ea3c9d.entry.js +1 -0
  214. package/dist/pine-core/{p-495f791c.entry.js → p-b15777a2.entry.js} +1 -1
  215. package/dist/pine-core/p-bc7ba7d3.system.entry.js +1 -0
  216. package/dist/pine-core/{p-7608e9b2.entry.js → p-c497d6c6.entry.js} +1 -1
  217. package/dist/pine-core/p-c971cdb3.entry.js +1 -0
  218. package/dist/pine-core/p-cdd21cbe.entry.js +1 -0
  219. package/dist/pine-core/p-ce74a47e.entry.js +2 -0
  220. package/dist/pine-core/p-cf4758a7.entry.js +1 -0
  221. package/dist/pine-core/{p-f2560935.entry.js → p-cfc9d4a8.entry.js} +1 -1
  222. package/dist/pine-core/p-d1b0b372.entry.js +1 -0
  223. package/dist/pine-core/p-d6002d5b.entry.js +1 -0
  224. package/dist/pine-core/{p-773f5771.system.entry.js → p-d8a6298c.system.entry.js} +1 -1
  225. package/dist/pine-core/p-d933227e.system.entry.js +1 -0
  226. package/dist/pine-core/p-d962fc84.entry.js +1 -0
  227. package/dist/pine-core/p-dafff7dd.system.entry.js +1 -0
  228. package/dist/pine-core/p-ed22da0c.system.entry.js +1 -0
  229. package/dist/pine-core/{p-de740b3e.system.entry.js → p-f0632690.system.entry.js} +1 -1
  230. package/dist/pine-core/p-f1c6b23a.entry.js +1 -0
  231. package/dist/pine-core/p-f3188c57.system.entry.js +8 -0
  232. package/dist/pine-core/p-f33d6417.entry.js +1 -0
  233. package/dist/pine-core/p-f832dcd9.entry.js +1 -0
  234. package/dist/pine-core/p-f83fe305.entry.js +1 -0
  235. package/dist/pine-core/p-myrJDwbR.js +1 -0
  236. package/dist/pine-core/p-t3idJwV0.js +1 -0
  237. package/dist/pine-core/pine-core.esm.js +1 -1
  238. package/dist/types/components/pds-avatar/pds-avatar.d.ts +3 -0
  239. package/dist/types/components/pds-box/pds-box.d.ts +7 -0
  240. package/dist/types/components/pds-checkbox/pds-checkbox.d.ts +2 -0
  241. package/dist/types/components/pds-chip/pds-chip.d.ts +2 -0
  242. package/dist/types/components/pds-combobox/pds-combobox.d.ts +5 -0
  243. package/dist/types/components/pds-copytext/pds-copytext.d.ts +3 -0
  244. package/dist/types/components/pds-drawer/pds-drawer-content/pds-drawer-content.d.ts +1 -0
  245. package/dist/types/components/pds-drawer/pds-drawer-footer/pds-drawer-footer.d.ts +3 -0
  246. package/dist/types/components/pds-drawer/pds-drawer-header/pds-drawer-header.d.ts +3 -0
  247. package/dist/types/components/pds-drawer/pds-drawer.d.ts +1 -0
  248. package/dist/types/components/pds-dropdown-menu/pds-dropdown-menu.d.ts +4 -0
  249. package/dist/types/components/pds-loader/pds-loader.d.ts +5 -0
  250. package/dist/types/components/pds-modal/pds-modal-content/pds-modal-content.d.ts +3 -0
  251. package/dist/types/components/pds-modal/pds-modal-footer/pds-modal-footer.d.ts +3 -0
  252. package/dist/types/components/pds-modal/pds-modal-header/pds-modal-header.d.ts +3 -0
  253. package/dist/types/components/pds-modal/pds-modal.d.ts +9 -1
  254. package/dist/types/components/pds-popover/pds-popover.d.ts +15 -0
  255. package/dist/types/components/pds-progress/pds-progress.d.ts +4 -0
  256. package/dist/types/components/pds-radio/pds-radio.d.ts +3 -0
  257. package/dist/types/components/pds-radio-group/pds-radio-group.d.ts +1 -0
  258. package/dist/types/components/pds-row/pds-row.d.ts +7 -0
  259. package/dist/types/components/pds-select/pds-select.d.ts +2 -0
  260. package/dist/types/components/pds-sortable/pds-sortable-item/pds-sortable-item.d.ts +4 -0
  261. package/dist/types/components/pds-sortable/pds-sortable.d.ts +6 -0
  262. package/dist/types/components/pds-switch/pds-switch.d.ts +2 -0
  263. package/dist/types/components/pds-tabs/pds-tab/pds-tab.d.ts +3 -0
  264. package/dist/types/components/pds-tabs/pds-tabpanel/pds-tabpanel.d.ts +3 -0
  265. package/dist/types/components/pds-tabs/pds-tabs.d.ts +3 -0
  266. package/dist/types/components/pds-tooltip/pds-tooltip.d.ts +1 -0
  267. package/dist/types/components.d.ts +199 -0
  268. package/dist/types/utils/attributes.d.ts +38 -0
  269. package/dist/types/utils/reflected-attribute-default.d.ts +31 -0
  270. package/dist/types/utils/test/host-strip.d.ts +10 -0
  271. package/dist/vscode.html-data.json +7 -0
  272. package/hydrate/index.js +717 -201
  273. package/hydrate/index.mjs +717 -201
  274. package/package.json +2 -2
  275. package/dist/cjs/attributes-oNMnBEnP.js +0 -85
  276. package/dist/esm/attributes-C0M1gTKv.js +0 -82
  277. package/dist/esm-es5/attributes-C0M1gTKv.js +0 -1
  278. package/dist/pine-core/p-015d2ceb.entry.js +0 -1
  279. package/dist/pine-core/p-02a428af.system.entry.js +0 -1
  280. package/dist/pine-core/p-06534502.entry.js +0 -1
  281. package/dist/pine-core/p-0827c6a6.entry.js +0 -1
  282. package/dist/pine-core/p-0af4685d.entry.js +0 -1
  283. package/dist/pine-core/p-1747c005.system.entry.js +0 -1
  284. package/dist/pine-core/p-1ae0b503.entry.js +0 -2
  285. package/dist/pine-core/p-2a00844f.entry.js +0 -1
  286. package/dist/pine-core/p-3653fd52.system.entry.js +0 -1
  287. package/dist/pine-core/p-4a43fbd9.entry.js +0 -1
  288. package/dist/pine-core/p-517f9962.entry.js +0 -1
  289. package/dist/pine-core/p-569b07ed.system.entry.js +0 -1
  290. package/dist/pine-core/p-5986f3c9.entry.js +0 -1
  291. package/dist/pine-core/p-600be0e1.entry.js +0 -1
  292. package/dist/pine-core/p-62045f88.system.entry.js +0 -1
  293. package/dist/pine-core/p-62241978.entry.js +0 -1
  294. package/dist/pine-core/p-63930a06.system.entry.js +0 -1
  295. package/dist/pine-core/p-6516adf7.system.entry.js +0 -1
  296. package/dist/pine-core/p-6aaf945c.entry.js +0 -1
  297. package/dist/pine-core/p-715b8e6b.entry.js +0 -1
  298. package/dist/pine-core/p-77961987.system.entry.js +0 -1
  299. package/dist/pine-core/p-7a177548.system.entry.js +0 -1
  300. package/dist/pine-core/p-806f17de.system.entry.js +0 -1
  301. package/dist/pine-core/p-832cedb7.entry.js +0 -1
  302. package/dist/pine-core/p-847e5f00.system.entry.js +0 -1
  303. package/dist/pine-core/p-85981c5d.system.entry.js +0 -1
  304. package/dist/pine-core/p-9dbb8fe9.entry.js +0 -1
  305. package/dist/pine-core/p-BhQhw0S3.system.js +0 -1
  306. package/dist/pine-core/p-C0M1gTKv.js +0 -1
  307. package/dist/pine-core/p-b412473d.system.entry.js +0 -8
  308. package/dist/pine-core/p-b51cfa3b.entry.js +0 -1
  309. package/dist/pine-core/p-b62e08c2.system.entry.js +0 -1
  310. package/dist/pine-core/p-c53e560a.system.entry.js +0 -1
  311. package/dist/pine-core/p-cd7deae5.entry.js +0 -1
  312. package/dist/pine-core/p-cd86ee3e.system.entry.js +0 -1
  313. package/dist/pine-core/p-cf5a484e.system.entry.js +0 -1
  314. package/dist/pine-core/p-cf99f7d8.system.entry.js +0 -1
  315. package/dist/pine-core/p-cff7013e.system.entry.js +0 -1
  316. package/dist/pine-core/p-e1d541f7.entry.js +0 -1
  317. package/dist/pine-core/p-ea0e5253.entry.js +0 -7
  318. package/dist/pine-core/p-f22a5f9c.system.entry.js +0 -3
  319. package/dist/pine-core/p-f22abb4d.system.entry.js +0 -1
  320. package/dist/pine-core/p-f6943cbf.entry.js +0 -1
  321. package/dist/pine-core/p-f794f7ad.entry.js +0 -1
@@ -1,10 +1,13 @@
1
1
  import { Host, h } from "@stencil/core";
2
+ import { HostStylingKeeper } from "../../utils/attributes";
3
+ import { restoreReflectedDefault } from "../../utils/reflected-attribute-default";
2
4
  /**
3
5
  * @part loader-svg - Exposes the spinner SVG element for color customization.
4
6
  * @slot label - Default slot for Loader label text.
5
7
  */
6
8
  export class PdsLoader {
7
9
  constructor() {
10
+ this.hostKeeper = new HostStylingKeeper();
8
11
  /**
9
12
  * If false, the loader will be hidden.
10
13
  */
@@ -30,6 +33,15 @@ export class PdsLoader {
30
33
  }
31
34
  };
32
35
  }
36
+ connectedCallback() {
37
+ this.hostKeeper.connect(this.el);
38
+ }
39
+ disconnectedCallback() {
40
+ this.hostKeeper.disconnect();
41
+ }
42
+ restoreSizeDefault(newValue) {
43
+ this.size = restoreReflectedDefault(this.el, 'size', newValue, 'md');
44
+ }
33
45
  loaderSize() {
34
46
  const sizes = {
35
47
  xs: '24px',
@@ -46,7 +58,15 @@ export class PdsLoader {
46
58
  }
47
59
  }
48
60
  render() {
49
- return (h(Host, { key: '173f7ae2d2f49807144df2faa8d8a765f92da235', class: `pds-loader ${this.isLoading ? '' : 'pds-loader--hidden'}`, "aria-hidden": !this.isLoading, "aria-busy": this.isLoading, "aria-live": "polite" }, this.variant === 'spinner' && (h("div", { key: '05bc278d18ef2470d87676b3a53d691a6a9872dd', class: "pds-loader--spinner" }, h("svg", { key: 'fcfc87492dd5cdbc7bf471089a038bd8b057f6ec', style: this.getSvgStyle(), viewBox: "0 0 200 200", fill: "none", part: "loader-svg" }, h("defs", { key: 'd9f6aecc7e5a8b03e2d18f79125fd6190b27803c' }, h("linearGradient", { key: '7851a1b709bccac7704b3822e1aae292d3a68e2d', id: "spinner-secondHalf" }, h("stop", { key: '3d4a75792365cad4ea417794dca6c440859f8ce3', offset: "0%", "stop-opacity": "0", "stop-color": "currentColor" }), h("stop", { key: '7287acab80b1ea32f884cf69ceb19989603e0882', offset: "100%", "stop-opacity": "0.5", "stop-color": "currentColor" })), h("linearGradient", { key: '0ec8d95161c24d14773ebee01c189f269079b79d', id: "spinner-firstHalf" }, h("stop", { key: '2a7cea30b2bf2044a14f29f4d64728150669d048', offset: "0%", "stop-opacity": "1", "stop-color": "currentColor" }), h("stop", { key: '608bd5cc1c7b9014a5f183d9e06efe4a0c119616', offset: "100%", "stop-opacity": "0.5", "stop-color": "currentColor" }))), h("g", { key: '36016dc3bd8a2e4f03f4f287881bfe1b7ce15494', class: "pds-loader__spinner-path" }, h("path", { key: '9410bff29a42cd469ed0f52510a36f7d173b2247', stroke: "url(#spinner-secondHalf)", d: "M 4 100 A 96 96 0 0 1 196 100" }), h("path", { key: '66e8283575e53ca52edd12e95c6545406d39c361', stroke: "url(#spinner-firstHalf)", d: "M 196 100 A 96 96 0 0 1 4 100" }), h("path", { key: '1c8a7526bc763ac62f0e8c762ab47cb2bca0ec89', stroke: "currentColor", "stroke-linecap": "round", d: "M 4 100 A 96 96 0 0 1 4 98" }))))), this.variant === 'typing' && (h("div", { key: '2c8f9596beb8010778e0cf79f006970769da9795', class: "pds-loader--typing" }, h("span", { key: '587cd8da845d1223a5e8b2d199d049ccc1ed78aa' }), h("span", { key: '972f7844a5f2469adbb04b15ebf41e49eb5c0354' }), h("span", { key: '575511989d50f6d9436b846cadec1a5a4fa57c1e' }))), h("div", { key: '70f1b43a79a1d2605145a5ea6fe86e0a6059889d', class: `pds-loader__label ${this.showLabel ? '' : 'pds-loader--hidden'}` }, h("slot", { key: '9a981b8530200aa91916017180266edaea6da9ac', name: "label" }, "Loading..."))));
61
+ const hostClass = `pds-loader ${this.isLoading ? '' : 'pds-loader--hidden'}`;
62
+ // Explicit 'true': a boolean `true` lands as an empty value, which ARIA reads as unset.
63
+ const hostAttributes = {
64
+ 'aria-hidden': this.isLoading ? null : 'true',
65
+ 'aria-busy': this.isLoading ? 'true' : null,
66
+ 'aria-live': 'polite',
67
+ };
68
+ this.hostKeeper.record(hostClass, {}, hostAttributes);
69
+ return (h(Host, Object.assign({ key: '81f97b8a6adf4d2c0e5516aa2af9054e200629e1', class: hostClass }, hostAttributes), this.variant === 'spinner' && (h("div", { key: '6e25806c83d6ddeb1141acdd083654867c6ff8a2', class: "pds-loader--spinner" }, h("svg", { key: '4798f27facfcf57da8d408319527fc6083489107', style: this.getSvgStyle(), viewBox: "0 0 200 200", fill: "none", part: "loader-svg" }, h("defs", { key: '0c64abfabc18ccd51ef41017e088f6ec10736d61' }, h("linearGradient", { key: '3aa61edf6250dc827bf925938b69008860f96596', id: "spinner-secondHalf" }, h("stop", { key: '2693d8a866492ef4ca98cbc4beb5f9f1a34a8b52', offset: "0%", "stop-opacity": "0", "stop-color": "currentColor" }), h("stop", { key: 'ae229fdc73733e4d6ab15a6663e67b574bd49b40', offset: "100%", "stop-opacity": "0.5", "stop-color": "currentColor" })), h("linearGradient", { key: '8ddbb46a1a387113d74a82cc4e3e0e9c7e12d573', id: "spinner-firstHalf" }, h("stop", { key: 'd166a3c1ae37c3afa898351683b07f5c4d0ee906', offset: "0%", "stop-opacity": "1", "stop-color": "currentColor" }), h("stop", { key: 'e4c9790bc9a645d752aa56c238fb8708310208b5', offset: "100%", "stop-opacity": "0.5", "stop-color": "currentColor" }))), h("g", { key: '8b3897ff925d4207f9060e2fb69afa657b1b8fe3', class: "pds-loader__spinner-path" }, h("path", { key: '603ef195d1fc64d2059d9fbfeb9b14e2bdb1cabe', stroke: "url(#spinner-secondHalf)", d: "M 4 100 A 96 96 0 0 1 196 100" }), h("path", { key: 'a649ac9538248f5a22d48008377e18f4407efad9', stroke: "url(#spinner-firstHalf)", d: "M 196 100 A 96 96 0 0 1 4 100" }), h("path", { key: '37f3772b61d1459959cc4d8c0b5c729dbd6953ff', stroke: "currentColor", "stroke-linecap": "round", d: "M 4 100 A 96 96 0 0 1 4 98" }))))), this.variant === 'typing' && (h("div", { key: 'e510c2e6498a5542ce6e6573fdc03e8770121cd7', class: "pds-loader--typing" }, h("span", { key: 'bbf4f5a328175f06b221d9abc73118505a09455d' }), h("span", { key: '9a7e80b28e1455ef9d0c1bdb330a6425a3037709' }), h("span", { key: 'f8aa1eb4f822a6d0e2a14a982bbe99866a97815b' }))), h("div", { key: '3492189495798a2ea861d0dcb460f1b25d43d565', class: `pds-loader__label ${this.showLabel ? '' : 'pds-loader--hidden'}` }, h("slot", { key: 'c1a19415b513a2a5f76a53d64b0ef5fbb4a5d100', name: "label" }, "Loading..."))));
50
70
  }
51
71
  static get is() { return "pds-loader"; }
52
72
  static get encapsulation() { return "shadow"; }
@@ -104,7 +124,7 @@ export class PdsLoader {
104
124
  },
105
125
  "size": {
106
126
  "type": "string",
107
- "mutable": false,
127
+ "mutable": true,
108
128
  "complexType": {
109
129
  "original": "| 'xs' // 24px\n | 'sm' // 32px\n | 'md' // 48px\n | 'lg' // 64px\n | 'xl' // 80px\n | string",
110
130
  "resolved": "string",
@@ -144,4 +164,11 @@ export class PdsLoader {
144
164
  }
145
165
  };
146
166
  }
167
+ static get elementRef() { return "el"; }
168
+ static get watchers() {
169
+ return [{
170
+ "propName": "size",
171
+ "methodName": "restoreSizeDefault"
172
+ }];
173
+ }
147
174
  }
@@ -1,5 +1,8 @@
1
1
  import { h, Host } from "@stencil/core";
2
2
  import { unwrapReconnectedContent } from "../../../utils/reconnected-content";
3
+ /**
4
+ * @lightDom renders-markup
5
+ */
3
6
  export class PdsModalContent {
4
7
  constructor() {
5
8
  /**
@@ -178,10 +181,10 @@ export class PdsModalContent {
178
181
  render() {
179
182
  // Only apply max-height style if it's not 'none'
180
183
  const styleObj = this.contentMaxHeight !== 'none' ? { maxHeight: this.contentMaxHeight } : {};
181
- return (h(Host, { key: '3e8352c946c3646a485ca505e11de3ace3906435' }, h("div", { key: 'd1fb3cb8f2c7ce0c3b19787152d93c1a0ac84b72', class: {
184
+ return (h(Host, { key: 'f66dbdd08d6af3f87b0a6e8f30e1948b2f674e34' }, h("div", { key: 'ac0469cbfe48002d5bc7f401e0dc30926cfd4421', class: {
182
185
  'pds-modal-content': true,
183
186
  [`pds-modal-content--border-${this.border}`]: true
184
- }, style: styleObj, tabindex: "-1" }, h("slot", { key: '6d263b4960a3cffe985ee3af6d6e22e97ded4b7e' }))));
187
+ }, style: styleObj, tabindex: "-1" }, h("slot", { key: '26a8a45ab4dcd0349da68304fa3cacc64603208a' }))));
185
188
  }
186
189
  static get is() { return "pds-modal-content"; }
187
190
  static get originalStyleUrls() {
@@ -1,12 +1,15 @@
1
1
  import { h } from "@stencil/core";
2
2
  import { unwrapReconnectedContent } from "../../../utils/reconnected-content";
3
+ /**
4
+ * @lightDom renders-markup
5
+ */
3
6
  export class PdsModalFooter {
4
7
  // Unwraps a nested .pds-modal__footer left by a page-cache (Turbo, bfcache) reconnect.
5
8
  componentDidRender() {
6
9
  unwrapReconnectedContent(this.el.querySelector('.pds-modal__footer'), '.pds-modal__footer');
7
10
  }
8
11
  render() {
9
- return (h("footer", { key: 'ed10ed9c8ab3a472ec9e4d20683c4c209877a6c2', class: "pds-modal__footer" }, h("slot", { key: '35765b1624e35dfc540620b7fca20dba3a5c2ca7' })));
12
+ return (h("footer", { key: '1148892c2d6b9a461f6c04a670fceda76c1be53a', class: "pds-modal__footer" }, h("slot", { key: 'ccd754674c82c415f8c056c9dda6327df35dbd03' })));
10
13
  }
11
14
  static get is() { return "pds-modal-footer"; }
12
15
  static get originalStyleUrls() {
@@ -1,12 +1,15 @@
1
1
  import { h } from "@stencil/core";
2
2
  import { unwrapReconnectedContent } from "../../../utils/reconnected-content";
3
+ /**
4
+ * @lightDom renders-markup
5
+ */
3
6
  export class PdsModalHeader {
4
7
  // Unwraps a nested .pds-modal__header left by a page-cache (Turbo, bfcache) reconnect.
5
8
  componentDidRender() {
6
9
  unwrapReconnectedContent(this.el.querySelector('.pds-modal__header'), '.pds-modal__header');
7
10
  }
8
11
  render() {
9
- return (h("header", { key: '247373607b807a1428d5b3e7726bd88b6c23776b', class: "pds-modal__header" }, h("slot", { key: '75e7cbf018c82809d23ad4095546af2cd5a01823' })));
12
+ return (h("header", { key: '030153b84f1ea1cb133c9ccec3ad86583995974f', class: "pds-modal__header" }, h("slot", { key: '3a479e7047f3e845a65c37d60539648c8ff78602' })));
10
13
  }
11
14
  static get is() { return "pds-modal-header"; }
12
15
  static get originalStyleUrls() {
@@ -1,9 +1,96 @@
1
1
  import { h } from "@stencil/core";
2
+ import { closest } from "../../utils/closest";
2
3
  import { unwrapReconnectedContent } from "../../utils/reconnected-content";
3
4
  const PRESET_SIZES = ['sm', 'md', 'lg', 'fullscreen'];
4
5
  const isCustomLength = (value) => /^[a-z0-9.%+\-*/(), ]+$/i.test(value) &&
5
6
  /\d/.test(value) &&
6
7
  (typeof CSS === 'undefined' || CSS.supports('max-width', value));
8
+ const TABBABLE = [
9
+ 'a[href]',
10
+ 'area[href]',
11
+ 'button',
12
+ 'input:not([type="hidden"])',
13
+ 'select',
14
+ 'textarea',
15
+ 'iframe',
16
+ 'summary',
17
+ '[contenteditable]:not([contenteditable="false"])',
18
+ '[tabindex]',
19
+ ].join(',');
20
+ /**
21
+ * Collects the tabbable elements under `root` in focus order, walking into open shadow roots and
22
+ * following slots, so a component's own controls (the input inside pds-combobox or pds-textarea)
23
+ * count without being registered here by tag name. Positive tabindex values are not reordered,
24
+ * and a closed shadow root can't be seen into.
25
+ */
26
+ function collectTabbable(root, found) {
27
+ for (const child of Array.from(root.children))
28
+ visitTabbable(child, found);
29
+ }
30
+ // An editing host reports tabIndex -1 but is still a Tab stop; editable content inside it is not.
31
+ const isTabStop = (el) => { var _a; return el.tabIndex >= 0 || (el.isContentEditable && !el.hasAttribute('tabindex') && !((_a = el.parentElement) === null || _a === void 0 ? void 0 : _a.isContentEditable)); };
32
+ function visitTabbable(el, found) {
33
+ var _a, _b, _c, _d;
34
+ if (el.hasAttribute('inert'))
35
+ return;
36
+ if (el.localName === 'slot') {
37
+ const slot = el;
38
+ // Fallback content renders only when nothing at all is assigned, text included.
39
+ if (((_b = (_a = slot.assignedNodes) === null || _a === void 0 ? void 0 : _a.call(slot, { flatten: true })) !== null && _b !== void 0 ? _b : []).length === 0)
40
+ return collectTabbable(el, found);
41
+ for (const slotted of slot.assignedElements({ flatten: true }))
42
+ visitTabbable(slotted, found);
43
+ return;
44
+ }
45
+ // A delegatesFocus host passes focus to its first control, which the walk below finds.
46
+ const delegates = ((_c = el.shadowRoot) === null || _c === void 0 ? void 0 : _c.delegatesFocus) === true;
47
+ if (el instanceof HTMLElement && !delegates && isTabStop(el) && el.matches(TABBABLE) && !el.matches(':disabled')) {
48
+ found.push(el);
49
+ }
50
+ // A shadow host's light children render only through its slots, which the walk reaches.
51
+ collectTabbable((_d = el.shadowRoot) !== null && _d !== void 0 ? _d : el, found);
52
+ }
53
+ /** The element as a radio in a named group, or `null`. */
54
+ const groupedRadio = (el) => el instanceof HTMLInputElement && el.type === 'radio' && el.name !== '' ? el : null;
55
+ /**
56
+ * Keeps one radio per named group, as the browser does: the checked one, or the first. The others
57
+ * are reached with the arrow keys, so they can't be the first or last stop of the trap.
58
+ */
59
+ function oneRadioPerGroup(elements) {
60
+ // Radios group by name and form within one tree, so each shadow root starts its own groups.
61
+ const groups = [];
62
+ for (const el of elements) {
63
+ const radio = groupedRadio(el);
64
+ if (radio === null)
65
+ continue;
66
+ const group = groups.find(([first]) => first.name === radio.name && first.form === radio.form && first.getRootNode() === radio.getRootNode());
67
+ if (group)
68
+ group.push(radio);
69
+ else
70
+ groups.push([radio]);
71
+ }
72
+ const stops = new Set(groups.map((radios) => { var _a; return (_a = radios.find((radio) => radio.checked)) !== null && _a !== void 0 ? _a : radios[0]; }));
73
+ return elements.filter((el) => groupedRadio(el) === null || stops.has(el));
74
+ }
75
+ /** Whether `node` is `ancestor` or inside it, crossing shadow roots, which `Node.contains` doesn't. */
76
+ function containsComposed(ancestor, node) {
77
+ for (let current = node; current; current = current instanceof ShadowRoot ? current.host : current.parentNode) {
78
+ if (current === ancestor)
79
+ return true;
80
+ }
81
+ return false;
82
+ }
83
+ /** The focused element, followed down through shadow roots to the control that has focus. */
84
+ function deepActiveElement() {
85
+ var _a;
86
+ let active = document.activeElement;
87
+ while ((_a = active === null || active === void 0 ? void 0 : active.shadowRoot) === null || _a === void 0 ? void 0 : _a.activeElement)
88
+ active = active.shadowRoot.activeElement;
89
+ return active;
90
+ }
91
+ /**
92
+ * @lightDom renders-markup
93
+ */
7
94
  export class PdsModal {
8
95
  constructor() {
9
96
  this.focusableElements = [];
@@ -120,6 +207,17 @@ export class PdsModal {
120
207
  // disableTopLayer), so do not trap Tab here.
121
208
  if (this.disableTopLayer)
122
209
  return;
210
+ // A control inside that handles Tab itself (a popup with its own trap) has already moved
211
+ // focus. This holds only when it listens on its own element, which runs before this
212
+ // document listener; one listening on document too would race it.
213
+ if (e.defaultPrevented)
214
+ return;
215
+ // Every open modal hears this keydown. When focus is in a modal dialog opened above this one,
216
+ // that dialog traps Tab: this modal's list also holds its controls, so it would wrap first. A
217
+ // non-modal dialog inside (a disableTopLayer modal) doesn't trap, so this one still does.
218
+ const activeElement = deepActiveElement();
219
+ if (!activeElement || this.modalDialogAbove(activeElement))
220
+ return;
123
221
  // Content can change while the modal is open (rows fetched in, sections shown), so the
124
222
  // first and last elements are read now rather than from the list taken on opening.
125
223
  this.updateFocusableElements();
@@ -129,13 +227,13 @@ export class PdsModal {
129
227
  // Get the first and last focusable elements
130
228
  const firstFocusableElement = this.focusableElements[0];
131
229
  const lastFocusableElement = this.focusableElements[this.focusableElements.length - 1];
132
- // Get the current active element
133
- const activeElement = document.activeElement;
134
- // Check if we need to wrap focus
135
- const isFirstElement = activeElement === firstFocusableElement ||
136
- firstFocusableElement.contains(activeElement);
137
- const isLastElement = activeElement === lastFocusableElement ||
138
- lastFocusableElement.contains(activeElement);
230
+ // activeElement is the control inside any shadow root, as the list holds, not the host
231
+ // document.activeElement reports. It's matched to its own stop first, so a stop inside a
232
+ // listed host isn't taken for that host; a focused node that isn't a stop counts as the
233
+ // innermost stop it sits in.
234
+ const stop = this.stopIndex(activeElement);
235
+ const isFirstElement = stop === 0;
236
+ const isLastElement = stop === this.focusableElements.length - 1;
139
237
  // If shift + tab is pressed and focus is on the first element, move to the last element
140
238
  if (e.shiftKey && isFirstElement) {
141
239
  e.preventDefault();
@@ -192,23 +290,8 @@ export class PdsModal {
192
290
  updateFocusableElements() {
193
291
  if (!this.modalRef)
194
292
  return;
195
- // Get all focusable elements within the modal
196
- const selector = [
197
- 'a[href]',
198
- 'button:not([disabled])',
199
- 'input:not([disabled])',
200
- 'select:not([disabled])',
201
- 'textarea:not([disabled])',
202
- '[tabindex]:not([tabindex="-1"])',
203
- 'pds-button:not([disabled])',
204
- 'pds-link:not([disabled])',
205
- 'pds-input:not([disabled])',
206
- 'pds-checkbox:not([disabled])',
207
- 'pds-radio:not([disabled])',
208
- 'pds-switch:not([disabled])',
209
- 'pds-select:not([disabled])',
210
- ].join(',');
211
- this.focusableElements = Array.from(this.modalRef.querySelectorAll(selector));
293
+ this.focusableElements = [];
294
+ collectTabbable(this.modalRef, this.focusableElements);
212
295
  // checkVisibility() also drops an element inside a hidden ancestor, whose own computed
213
296
  // display isn't none; such an element can't take focus, so it can't anchor the trap.
214
297
  this.focusableElements = this.focusableElements.filter(el => {
@@ -217,6 +300,7 @@ export class PdsModal {
217
300
  const style = window.getComputedStyle(el);
218
301
  return style.display !== 'none' && style.visibility !== 'hidden';
219
302
  });
303
+ this.focusableElements = oneRadioPerGroup(this.focusableElements);
220
304
  }
221
305
  /**
222
306
  * Sets focus to the first focusable element in the modal
@@ -230,30 +314,11 @@ export class PdsModal {
230
314
  this.focusElement(firstElement);
231
315
  }
232
316
  /**
233
- * Helper method to focus an element, with special handling for web components
317
+ * Focuses an element from the list. It holds the controls themselves, inside any shadow root,
318
+ * so they take focus directly.
234
319
  */
235
320
  focusElement(element) {
236
- if (!element)
237
- return;
238
- try {
239
- // Try standard focus first
240
- element.focus();
241
- // Check if focus worked
242
- setTimeout(() => {
243
- if (document.activeElement !== element) {
244
- // For web components, try to find a focusable element inside
245
- if (element.shadowRoot) {
246
- const focusableInShadow = element.shadowRoot.querySelector('button, [tabindex], input, a[href]');
247
- if (focusableInShadow) {
248
- focusableInShadow.focus();
249
- }
250
- }
251
- }
252
- }, 0);
253
- }
254
- catch (error) {
255
- console.error('Error focusing element:', error);
256
- }
321
+ element === null || element === void 0 ? void 0 : element.focus();
257
322
  }
258
323
  /**
259
324
  * Opens the modal
@@ -416,6 +481,30 @@ export class PdsModal {
416
481
  const thisZIndex = this.getBackdropZIndex(this.el);
417
482
  return thisZIndex === maxZIndex;
418
483
  }
484
+ /** Whether a modal dialog other than this one sits between the focused element and this modal. */
485
+ modalDialogAbove(active) {
486
+ var _a;
487
+ for (let dialog = closest('dialog[open]', active); dialog instanceof HTMLElement;) {
488
+ if (dialog === this.modalRef)
489
+ return false;
490
+ if (dialog.matches(':modal'))
491
+ return true;
492
+ // Up from this dialog, across a shadow root; past the document root, closest() gives nothing.
493
+ dialog = closest('dialog[open]', (_a = dialog.parentElement) !== null && _a !== void 0 ? _a : dialog.getRootNode().host);
494
+ }
495
+ return false;
496
+ }
497
+ /** The focused element's place in the list: its own stop, or the innermost stop it sits in. */
498
+ stopIndex(active) {
499
+ const own = this.focusableElements.indexOf(active);
500
+ if (own >= 0)
501
+ return own;
502
+ for (let i = this.focusableElements.length - 1; i >= 0; i--) {
503
+ if (containsComposed(this.focusableElements[i], active))
504
+ return i;
505
+ }
506
+ return -1;
507
+ }
419
508
  resolveSize() {
420
509
  var _a;
421
510
  const size = ((_a = this.size) !== null && _a !== void 0 ? _a : '').trim() || 'md';
@@ -430,14 +519,14 @@ export class PdsModal {
430
519
  }
431
520
  render() {
432
521
  const [sizeClass = 'md', customSize] = this.resolveSize();
433
- return (h("dialog", { key: 'aa352ccc057e4d6183f8c17349bc71857208a928', class: {
522
+ return (h("dialog", { key: 'b6714c7e77d80bf2370f2170ffce029abe147d81', class: {
434
523
  'pds-modal__backdrop': true,
435
524
  'open': this.open
436
- }, "aria-modal": this.disableTopLayer ? 'false' : 'true', "aria-labelledby": `${this.componentId}-heading`, onClick: this.handleBackdropClick }, h("div", { key: '12799824edbeea42a6f7f91e0172c6ecbde93337', class: {
525
+ }, "aria-modal": this.disableTopLayer ? 'false' : 'true', "aria-labelledby": `${this.componentId}-heading`, onClick: this.handleBackdropClick }, h("div", { key: '8c3319f53dd8c79c9e952785277e9e82e28b651e', class: {
437
526
  'pds-modal': true,
438
527
  [`pds-modal--${sizeClass}`]: true,
439
528
  'pds-modal--scrollable': this.scrollable
440
- }, style: customSize !== undefined ? { '--pds-modal-max-width': customSize } : undefined, part: "modal" }, h("slot", { key: 'f517c6466d65f141fba2d41cfe36d1b8d5f29930' }))));
529
+ }, style: customSize !== undefined ? { '--pds-modal-max-width': customSize } : undefined, part: "modal" }, h("slot", { key: '8c6f9cc1a20b515659344ad041512de52761800d' }))));
441
530
  }
442
531
  static get is() { return "pds-modal"; }
443
532
  static get originalStyleUrls() {
@@ -1,5 +1,7 @@
1
1
  import { Host, h } from "@stencil/core";
2
2
  import { containsComposed } from "../../utils/closest";
3
+ import { restoreReflectedDefault } from "../../utils/reflected-attribute-default";
4
+ import { setAttributesIfChanged } from "../../utils/attributes";
3
5
  /**
4
6
  * @slot trigger - The trigger element for the popover
5
7
  * @slot (default) - The content to display inside the popover
@@ -15,10 +17,22 @@ export class PdsPopover {
15
17
  * Tracks if the component is still mounted to prevent memory leaks
16
18
  */
17
19
  this.isComponentMounted = true;
20
+ /**
21
+ * Set once `componentDidLoad` has built the portal, so a later reconnect knows to rebuild it
22
+ */
23
+ this.hasLoaded = false;
24
+ /**
25
+ * A popover without a componentId keeps one generated portal id, even when the portal is rebuilt
26
+ */
27
+ this.generatedPortalId = null;
18
28
  /**
19
29
  * Reference to the trigger element
20
30
  */
21
31
  this.triggerEl = null;
32
+ /**
33
+ * Puts the trigger's ARIA back when something else removes or changes it
34
+ */
35
+ this.triggerObserver = null;
22
36
  /**
23
37
  * Portal element rendered in document.body
24
38
  */
@@ -80,6 +94,7 @@ export class PdsPopover {
80
94
  else {
81
95
  this.triggerEl = null;
82
96
  }
97
+ this.observeTrigger();
83
98
  };
84
99
  /**
85
100
  * Handles changes to the default slot (popover content)
@@ -116,6 +131,9 @@ export class PdsPopover {
116
131
  }
117
132
  };
118
133
  }
134
+ restorePlacementDefault(newValue) {
135
+ this.placement = restoreReflectedDefault(this.el, 'placement', newValue, 'right');
136
+ }
119
137
  componentDidLoad() {
120
138
  var _a;
121
139
  // Bind event handlers for cleanup
@@ -125,6 +143,7 @@ export class PdsPopover {
125
143
  this.boundResizeHandler = this.handleResize.bind(this);
126
144
  // Create portal element
127
145
  this.createPortal();
146
+ this.hasLoaded = true;
128
147
  // Initialize trigger element by calling slot change handler
129
148
  // This is a fallback for environments where slot change might not fire reliably
130
149
  const triggerSlot = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('slot[name="trigger"]');
@@ -139,20 +158,69 @@ export class PdsPopover {
139
158
  this.linkTriggerToPortal();
140
159
  }
141
160
  }
161
+ // The trigger is the consumer's element, so anything can rewrite its attributes (a Turbo morph
162
+ // matches it to server HTML that has no ARIA). Put Pine's values back when that happens.
163
+ observeTrigger() {
164
+ var _a;
165
+ (_a = this.triggerObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
166
+ this.triggerObserver = null;
167
+ if (this.triggerEl == null || typeof MutationObserver === 'undefined')
168
+ return;
169
+ this.triggerObserver = new MutationObserver(() => this.linkTriggerToPortal());
170
+ this.triggerObserver.observe(this.triggerEl, {
171
+ attributes: true,
172
+ attributeFilter: ['aria-expanded', 'aria-controls'],
173
+ });
174
+ }
142
175
  // Set ARIA attributes to establish relationship between trigger and popover
143
176
  // This mirrors the native Popover API's accessibility behavior
144
177
  linkTriggerToPortal() {
145
178
  if (this.triggerEl == null || this.portalEl == null)
146
179
  return;
147
- this.triggerEl.setAttribute('aria-expanded', String(this.active));
148
- this.triggerEl.setAttribute('aria-controls', this.portalEl.id);
180
+ // Skips values already in place, so the trigger observer's own callback doesn't loop.
181
+ setAttributesIfChanged(this.triggerEl, { 'aria-expanded': String(this.active), 'aria-controls': this.portalEl.id });
182
+ }
183
+ // componentDidLoad doesn't run again when a popover comes back, so rebuild whatever
184
+ // disconnectedCallback tore down. Each step is a no-op when nothing was.
185
+ connectedCallback() {
186
+ var _a;
187
+ if (!this.hasLoaded)
188
+ return;
189
+ this.isComponentMounted = true;
190
+ this.createPortal();
191
+ (_a = this.triggerEl) === null || _a === void 0 ? void 0 : _a.addEventListener('click', this.handleTriggerClick);
192
+ this.observeTrigger();
193
+ this.linkTriggerToPortal();
194
+ // Still open after a move: the trigger moved, so the portal follows it.
195
+ if (this.active) {
196
+ requestAnimationFrame(() => this.handlePopoverPositioning());
197
+ }
149
198
  }
150
199
  disconnectedCallback() {
200
+ var _a;
201
+ // Moved in one operation (a DOM morph, or a framework reparenting it), the popover is
202
+ // already back in the page. Its portal is in <body>, untouched, so it stays open, with focus
203
+ // where it was.
204
+ if (this.el.isConnected)
205
+ return;
151
206
  this.isComponentMounted = false;
207
+ // Open, the content sits in the portal; put it back before the portal goes. Only listeners on
208
+ // the popover itself hear the close event now, but those are the ones mirroring its state.
209
+ if (this.active) {
210
+ this.restorePortalContent();
211
+ this.active = false;
212
+ this.linkTriggerToPortal();
213
+ this.pdsPopoverClose.emit({
214
+ componentId: this.componentId,
215
+ popoverType: this.popoverType,
216
+ });
217
+ }
152
218
  // Clean up trigger click event listener
153
219
  if (this.triggerEl != null) {
154
220
  this.triggerEl.removeEventListener('click', this.handleTriggerClick);
155
221
  }
222
+ (_a = this.triggerObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
223
+ this.triggerObserver = null;
156
224
  // Clean up all event listeners
157
225
  this.removeLightDismissListeners();
158
226
  this.removeScrollAndResizeListeners();
@@ -175,6 +243,7 @@ export class PdsPopover {
175
243
  }
176
244
  }
177
245
  createPortal() {
246
+ var _a;
178
247
  if (this.portalEl !== null)
179
248
  return;
180
249
  this.portalEl = document.createElement('div');
@@ -193,8 +262,8 @@ export class PdsPopover {
193
262
  this.portalEl.style.padding = 'var(--pine-dimension-md)';
194
263
  // Generate unique ID
195
264
  if (!this.componentId) {
196
- const suffix = PdsPopover.instanceCounter++;
197
- this.portalEl.id = `pds-popover-portal-${suffix}`;
265
+ (_a = this.generatedPortalId) !== null && _a !== void 0 ? _a : (this.generatedPortalId = `pds-popover-portal-${PdsPopover.instanceCounter++}`);
266
+ this.portalEl.id = this.generatedPortalId;
198
267
  }
199
268
  else {
200
269
  this.portalEl.id = `${this.componentId}-portal`;
@@ -306,10 +375,7 @@ export class PdsPopover {
306
375
  this.active = true;
307
376
  // Record open timestamp to prevent immediate close from opening click
308
377
  this.openTimestamp = Date.now();
309
- // Update ARIA expanded state on trigger
310
- if (this.triggerEl) {
311
- this.triggerEl.setAttribute('aria-expanded', 'true');
312
- }
378
+ this.linkTriggerToPortal();
313
379
  // Update portal content with latest slot content
314
380
  this.updatePortalContent();
315
381
  // Show portal
@@ -343,10 +409,7 @@ export class PdsPopover {
343
409
  this.active = false;
344
410
  // Restoring the content drops its focus to the body, so check where focus is first.
345
411
  const focusWasInside = this.portalEl.contains(document.activeElement);
346
- // Update ARIA expanded state on trigger
347
- if (this.triggerEl) {
348
- this.triggerEl.setAttribute('aria-expanded', 'false');
349
- }
412
+ this.linkTriggerToPortal();
350
413
  // Restore content back to original slot positions
351
414
  this.restorePortalContent();
352
415
  // Hide portal
@@ -572,7 +635,7 @@ export class PdsPopover {
572
635
  }, 16); // ~1 frame at 60fps
573
636
  }
574
637
  render() {
575
- return (h(Host, { key: '7f02e4a9af4d2dc4cafb9187fc2263edaa79af86', id: this.componentId }, h("span", { key: '128828d5fc52478b3e9670418a8e9c2d5ce6e7f6', class: "pds-popover__trigger-wrapper" }, h("slot", { key: 'c479f39a3653d6627a20d05c3a87ea1a5e2bebf2', name: "trigger", onSlotchange: this.handleTriggerSlotChange })), h("div", { key: 'e730149edce755c8789ec700c0a95dfa4b4ab835', class: "pds-popover__content-slot-wrapper" }, h("slot", { key: '2f5ab80b4d75c114568d364ce9a74a658e426766', onSlotchange: this.handleContentSlotChange }))));
638
+ return (h(Host, { key: '66347d4922274d25504e5be134b36f05a3f12fdc', id: this.componentId }, h("span", { key: '8f29d54d58cf0c66f86470c77c676716f1ab056f', class: "pds-popover__trigger-wrapper" }, h("slot", { key: '5c89b687cfc01e67d3c11835e77755de88f03584', name: "trigger", onSlotchange: this.handleTriggerSlotChange })), h("div", { key: '0ca9aff3021720098d86ec29eb69cbf149ef79a9', class: "pds-popover__content-slot-wrapper" }, h("slot", { key: 'b73c3324d3322c41c68161e9ada51499c0e49cb0', onSlotchange: this.handleContentSlotChange }))));
576
639
  }
577
640
  static get is() { return "pds-popover"; }
578
641
  static get encapsulation() { return "shadow"; }
@@ -675,7 +738,7 @@ export class PdsPopover {
675
738
  },
676
739
  "placement": {
677
740
  "type": "string",
678
- "mutable": false,
741
+ "mutable": true,
679
742
  "complexType": {
680
743
  "original": "PlacementType",
681
744
  "resolved": "\"bottom\" | \"bottom-end\" | \"bottom-start\" | \"left\" | \"left-end\" | \"left-start\" | \"right\" | \"right-end\" | \"right-start\" | \"top\" | \"top-end\" | \"top-start\"",
@@ -813,6 +876,12 @@ export class PdsPopover {
813
876
  };
814
877
  }
815
878
  static get elementRef() { return "el"; }
879
+ static get watchers() {
880
+ return [{
881
+ "propName": "placement",
882
+ "methodName": "restorePlacementDefault"
883
+ }];
884
+ }
816
885
  }
817
886
  /**
818
887
  * Instance counter for unique IDs
@@ -1,7 +1,9 @@
1
1
  import { Host, h } from "@stencil/core";
2
+ import { HostStylingKeeper } from "../../utils/attributes";
2
3
  import { normalizeColorValue } from "../../utils/utils";
3
4
  export class PdsProgress {
4
5
  constructor() {
6
+ this.hostKeeper = new HostStylingKeeper();
5
7
  /**
6
8
  * Determines whether or not progress is animated.
7
9
  * @defaultValue false
@@ -18,9 +20,17 @@ export class PdsProgress {
18
20
  */
19
21
  this.showPercent = false;
20
22
  }
23
+ connectedCallback() {
24
+ this.hostKeeper.connect(this.el);
25
+ }
26
+ disconnectedCallback() {
27
+ this.hostKeeper.disconnect();
28
+ }
21
29
  render() {
22
30
  const normalizedFillColor = normalizeColorValue(this.fillColor);
23
- return (h(Host, { key: '2aaabbb78cef6237b47408a6766936a4ce065e40', class: this.animated ? { 'is-animated': this.animated } : '' }, h("div", { key: '192ce4a08155a84577ed46d9dc342a744354213a', class: "pds-progress" }, h("label", { key: '3e9f16f9a4c5d822ef6493d6457dbb657835903a', class: "pds-progress__label", htmlFor: this.componentId }, this.label), h("progress", { key: '35b4cd422bb247b8ae8eeaa7c3ea231d312197c9', id: this.componentId, max: "100", style: normalizedFillColor ? { '--color-progress-fill': normalizedFillColor } : {}, value: this.percent })), this.showPercent && h("div", { key: 'a4952bcda7ab062da7ff706b519476f8e7fff898', class: "pds-progress__percentage" }, this.percent, "%")));
31
+ const hostClass = this.animated ? { 'is-animated': this.animated } : '';
32
+ this.hostKeeper.record(hostClass);
33
+ return (h(Host, { key: '5573a5c48eee2f7968835db92afdaebb73c1b85e', class: hostClass }, h("div", { key: 'bb5cf260495be798f4272673884336022c28441e', class: "pds-progress" }, h("label", { key: '017efa649ada73ec724b930e06bbf1ab19a18f61', class: "pds-progress__label", htmlFor: this.componentId }, this.label), h("progress", { key: 'e648d910b072b7b2ca1c4a92c0832bf6e2ef5406', id: this.componentId, max: "100", style: normalizedFillColor ? { '--color-progress-fill': normalizedFillColor } : {}, value: this.percent })), this.showPercent && h("div", { key: '1f9f1733ff2cd6e2ec81e9a46759ff451cf158f7', class: "pds-progress__percentage" }, this.percent, "%")));
24
34
  }
25
35
  static get is() { return "pds-progress"; }
26
36
  static get encapsulation() { return "shadow"; }
@@ -167,4 +177,5 @@ export class PdsProgress {
167
177
  }
168
178
  };
169
179
  }
180
+ static get elementRef() { return "el"; }
170
181
  }