@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,13 +1,16 @@
1
1
  import { Host, h } from "@stencil/core";
2
+ import { HostStylingKeeper } from "../../utils/attributes";
2
3
  import { assignDescription, messageId, exposeTypeProperty } from "../../utils/form";
3
4
  import { danger } from "@pine-ds/icons/icons";
4
5
  /**
5
6
  * @slot image - Custom image content to display instead of the default radio input
6
7
  * @part image-container - The container for the image
8
+ * @lightDom renders-markup
7
9
  */
8
10
  export class PdsRadio {
9
11
  constructor() {
10
12
  this._type = 'radio';
13
+ this.hostKeeper = new HostStylingKeeper();
11
14
  this._hasImage = false;
12
15
  /**
13
16
  * Determines whether or not the radio is checked.
@@ -75,9 +78,13 @@ export class PdsRadio {
75
78
  this._hasImage = this.hasImageSlot();
76
79
  }
77
80
  connectedCallback() {
81
+ this.hostKeeper.connect(this.el);
78
82
  // Expose type property on the element instance to match native form element behavior
79
83
  exposeTypeProperty(this.el, () => this._type);
80
84
  }
85
+ disconnectedCallback() {
86
+ this.hostKeeper.disconnect();
87
+ }
81
88
  // Discards stale hidden label/message/wrapper copies left by a page-cache (Turbo, bfcache) reconnect, rescuing real [slot="image"] content stranded inside a stale image-container first.
82
89
  componentDidRender() {
83
90
  const freshImageContainer = this.el.querySelector('.pds-radio__image-container:not([hidden])');
@@ -92,11 +99,13 @@ export class PdsRadio {
92
99
  }
93
100
  render() {
94
101
  const renderLabelAndMessages = () => [
95
- h("label", { htmlFor: this.componentId, key: `${this.componentId}-label` }, h("input", { key: '4a8736c360681b399c4e70ef9e6612d4cb4f9285', "aria-describedby": assignDescription(this.componentId, this.invalid, this.helperMessage, this.errorMessage), "aria-invalid": this.invalid ? "true" : undefined, type: "radio", id: this.componentId, name: this.name, value: this.value, checked: this.checked, required: this.required, disabled: this.disabled, onChange: this.handleRadioChange, class: this.hasImage() ? 'visually-hidden' : '' }), h("span", { key: '093d96ac788d713eafb2e537c812145869dddad8', class: this.hideLabel ? 'visually-hidden' : '' }, this.label)),
102
+ h("label", { htmlFor: this.componentId, key: `${this.componentId}-label` }, h("input", { key: 'add893cd82f79b9398589bd5c0a72d5ae4a90475', "aria-describedby": assignDescription(this.componentId, this.invalid, this.helperMessage, this.errorMessage), "aria-invalid": this.invalid ? "true" : undefined, type: "radio", id: this.componentId, name: this.name, value: this.value, checked: this.checked, required: this.required, disabled: this.disabled, onChange: this.handleRadioChange, class: this.hasImage() ? 'visually-hidden' : '' }), h("span", { key: 'b58eed8681d1932397d38ffe82515987e6486e08', class: this.hideLabel ? 'visually-hidden' : '' }, this.label)),
96
103
  this.helperMessage && (h("div", { key: `${this.componentId}-helper`, class: 'pds-radio__message', id: messageId(this.componentId, 'helper') }, this.helperMessage)),
97
- this.errorMessage && (h("div", { key: `${this.componentId}-error`, class: `pds-radio__message pds-radio__message--error`, id: messageId(this.componentId, 'error'), "aria-live": "assertive" }, h("pds-icon", { key: '55fc5ab2a5a18734dbd8ed452c4e3794ece7fe15', icon: danger, size: "small" }), this.errorMessage))
104
+ this.errorMessage && (h("div", { key: `${this.componentId}-error`, class: `pds-radio__message pds-radio__message--error`, id: messageId(this.componentId, 'error'), "aria-live": "assertive" }, h("pds-icon", { key: '7374924219e59eab46a7ced9e7062c3e674b4451', icon: danger, size: "small" }), this.errorMessage))
98
105
  ];
99
- return (h(Host, { key: '97d0f61aeb93bb29e3d21281e72775cb274de072', class: this.classNames() }, this.hasImage() && (h("div", { key: '0d1fb05dc00617945350e9d1ffeec9e17fc4affa', class: "pds-radio__image-container", part: "image-container" }, h("slot", { key: '1cd8494378269651730ea64f25af4e9572ede794', name: "image", onSlotchange: () => (this._hasImage = this.hasImageSlot()) }))), this.hasImage() ? (h("div", { class: "pds-radio__content-wrapper" }, renderLabelAndMessages())) : (renderLabelAndMessages())));
106
+ const hostClass = this.classNames();
107
+ this.hostKeeper.record(hostClass);
108
+ return (h(Host, { key: '24269923f168d1d39ebfc1994619736f0dc8087a', class: hostClass }, this.hasImage() && (h("div", { key: '74a72bef89aa012047cbf3a1744fcd33f13bb464', class: "pds-radio__image-container", part: "image-container" }, h("slot", { key: '99dbcfdac86cb7c012fd44eab607217e21304bab', name: "image", onSlotchange: () => (this._hasImage = this.hasImageSlot()) }))), this.hasImage() ? (h("div", { class: "pds-radio__content-wrapper" }, renderLabelAndMessages())) : (renderLabelAndMessages())));
100
109
  }
101
110
  static get is() { return "pds-radio"; }
102
111
  static get encapsulation() { return "scoped"; }
@@ -3,6 +3,7 @@ import { messageId } from "../../utils/form";
3
3
  import { danger } from "@pine-ds/icons/icons";
4
4
  /**
5
5
  * @slot (default) - Child pds-radio components
6
+ * @lightDom renders-markup
6
7
  */
7
8
  export class PdsRadioGroup {
8
9
  constructor() {
@@ -160,13 +161,13 @@ export class PdsRadioGroup {
160
161
  render() {
161
162
  const gapValue = this.getGapValue();
162
163
  const ariaDescribedBy = this.getAriaDescribedBy();
163
- return (h(Host, { key: '3f35b3cea2933ed25174387fc45d80f0d6bceced', class: this.classNames(), id: this._groupId, role: "group", "aria-describedby": ariaDescribedBy, style: {
164
+ return (h(Host, { key: '9dc78eb36bbc1b872f4320203dbbc64e43816ebf', class: this.classNames(), id: this._groupId, role: "group", "aria-describedby": ariaDescribedBy, style: {
164
165
  '--pds-radio-group-gap': gapValue,
165
- } }, this.groupLabel && (h("div", { key: '83764282e3049b0802e966c306654bbdda4f0c02', class: "pds-radio-group__label" }, this.groupLabel)), h("div", { key: '39c0e97e5280527d9ab597dcf4f5b0282b19d69a', class: {
166
+ } }, this.groupLabel && (h("div", { key: '7b6f95608dcf356b141ef5d590ff3070f83b5975', class: "pds-radio-group__label" }, this.groupLabel)), h("div", { key: '6e1a634c9b81ca3f3bbbe9c6590bcd4efc97e6ea', class: {
166
167
  'pds-radio-group__radios': true,
167
168
  'pds-radio-group__radios--row': this.direction === 'row',
168
169
  'pds-radio-group__radios--column': this.direction === 'column',
169
- } }, h("slot", { key: 'ef827a254e8b9bac58f297f5bbd6a37f8e132677', onSlotchange: () => this.updateChildRadios() })), this.helperMessage && (h("div", { key: '4d2f58d979a34e685d00f04483c20a0f9e286af2', class: "pds-radio-group__message", id: messageId(this._groupId, 'helper') }, this.helperMessage)), this.errorMessage && (h("div", { key: 'c05a32676fd6fe8aee30e1ea5c476424e10945f3', class: "pds-radio-group__message pds-radio-group__message--error", id: messageId(this._groupId, 'error'), "aria-live": "assertive" }, h("pds-icon", { key: '1bc3177459e179af3709f1cacd329980a8a45df7', icon: danger, size: "small" }), this.errorMessage))));
170
+ } }, h("slot", { key: 'b5b16148f3c77d425a50b7ada8a822e9919ef5c5', onSlotchange: () => this.updateChildRadios() })), this.helperMessage && (h("div", { key: 'ca6b98f926b8d7a53fda630170ac037c99f5ee85', class: "pds-radio-group__message", id: messageId(this._groupId, 'helper') }, this.helperMessage)), this.errorMessage && (h("div", { key: '37b57e2622370364e619ea090712a7b79fe79501', class: "pds-radio-group__message pds-radio-group__message--error", id: messageId(this._groupId, 'error'), "aria-live": "assertive" }, h("pds-icon", { key: '6a362d048a67312b1b227f71cc4b8f821ae0817e', icon: danger, size: "small" }), this.errorMessage))));
170
171
  }
171
172
  static get is() { return "pds-radio-group"; }
172
173
  static get encapsulation() { return "scoped"; }
@@ -1,6 +1,11 @@
1
1
  import { h, Host } from "@stencil/core";
2
+ import { HostStylingKeeper } from "../../utils/attributes";
3
+ /**
4
+ * @lightDom host-only
5
+ */
2
6
  export class PdsRow {
3
7
  constructor() {
8
+ this.hostKeeper = new HostStylingKeeper();
4
9
  /**
5
10
  * If `true`, the row will have a border.
6
11
  */
@@ -38,6 +43,12 @@ export class PdsRow {
38
43
  '800': 'var(--pine-dimension-800)'
39
44
  };
40
45
  }
46
+ connectedCallback() {
47
+ this.hostKeeper.connect(this.el);
48
+ }
49
+ disconnectedCallback() {
50
+ this.hostKeeper.disconnect();
51
+ }
41
52
  render() {
42
53
  const rowClasses = `
43
54
  ${this.alignItems !== undefined && this.alignItems.trim() !== '' ? `pds-align-items-${this.alignItems}` : ''}
@@ -55,7 +66,8 @@ export class PdsRow {
55
66
  })), (this.minHeight && {
56
67
  'min-height': this.minHeight,
57
68
  }));
58
- return h(Host, { key: '2d71570cba49c0e896ffe29c0a7727d7c2872036', class: `pds-row ${rowClasses}`, style: rowInlineStyles });
69
+ this.hostKeeper.record(`pds-row ${rowClasses}`, rowInlineStyles);
70
+ return h(Host, { key: 'ee3a32ae1376919c7c2d1fcf186a1b7c272ee085', class: `pds-row ${rowClasses}`, style: rowInlineStyles });
59
71
  }
60
72
  static get is() { return "pds-row"; }
61
73
  static get originalStyleUrls() {
@@ -272,4 +284,5 @@ export class PdsRow {
272
284
  }
273
285
  };
274
286
  }
287
+ static get elementRef() { return "el"; }
275
288
  }
@@ -1,4 +1,5 @@
1
1
  import { Host, h } from "@stencil/core";
2
+ import { HostStylingKeeper } from "../../utils/attributes";
2
3
  import { assignDescription, isSpecTest, messageId, exposeTypeProperty } from "../../utils/form";
3
4
  import { danger, enlarge } from "@pine-ds/icons/icons";
4
5
  /**
@@ -7,6 +8,7 @@ import { danger, enlarge } from "@pine-ds/icons/icons";
7
8
  export class PdsSelect {
8
9
  constructor() {
9
10
  this._type = 'select-one';
11
+ this.hostKeeper = new HostStylingKeeper();
10
12
  /**
11
13
  * Indicates whether or not the select field is disabled.
12
14
  * @defaultValue false
@@ -88,6 +90,7 @@ export class PdsSelect {
88
90
  this._type = this.multiple ? 'select-multiple' : 'select-one';
89
91
  }
90
92
  connectedCallback() {
93
+ this.hostKeeper.connect(this.el);
91
94
  // Initialize ElementInternals for form association (only once per element instance)
92
95
  if (this.el.attachInternals && !this.internals) {
93
96
  this.internals = this.el.attachInternals();
@@ -95,6 +98,9 @@ export class PdsSelect {
95
98
  // Expose type property on the element instance to match native form element behavior
96
99
  exposeTypeProperty(this.el, () => this._type);
97
100
  }
101
+ disconnectedCallback() {
102
+ this.hostKeeper.disconnect();
103
+ }
98
104
  componentWillLoad() {
99
105
  // Set initial type based on multiple prop
100
106
  this.updateType();
@@ -228,7 +234,13 @@ export class PdsSelect {
228
234
  }
229
235
  render() {
230
236
  const hasAction = this.el.querySelector('[slot="action"]') !== null;
231
- return (h(Host, { key: '89ba8f5f06b2a1bf82a495992efcb8490021e19f', "aria-disabled": this.disabled ? 'true' : null, class: this.classNames(), "has-action": hasAction && !this.hideLabel ? 'true' : null }, h("div", { key: '009dd8fe960889fd85a6cbe3239d94f81eddc9bb', class: "pds-select" }, !this.hideLabel && (h("div", { key: 'e198c3dcd664da65c0356b7eb7f9b4dff8c27035', class: "pds-select__label-wrapper" }, h("label", { key: '914b278a8e154b17365ffadcfe655139d3bef915', htmlFor: this.componentId }, h("span", { key: '6cd42f182ae8c585364a781044b8fd2fa3d61304', class: this.hideLabel ? 'visually-hidden' : '' }, this.label)), hasAction && this.renderAction())), h("select", { key: '7a3a91336f938ffb13a1e7ea1632090c37b5ad78', "aria-describedby": assignDescription(this.componentId, this.isInvalid(), this.helperMessage, this.errorMessage), "aria-invalid": this.isInvalid() ? 'true' : undefined, "aria-label": this.hideLabel ? this.label : undefined, autocomplete: this.autocomplete || undefined, class: "pds-select__field", disabled: this.disabled, id: this.componentId, multiple: this.multiple, name: this.name, onBlur: this.onBlur, onChange: this.onSelectUpdate, onFocus: this.onFocus, onKeyDown: this.onKeyDown, part: "select", required: this.required, ref: (el) => (this.selectEl = el) }), h("div", { key: 'd3ddc61e4458e5ec0af1e700e69355d1cabaa651', "aria-hidden": "true", class: "hidden", ref: (el) => (this.slotContainer = el) }, h("slot", { key: 'dae8f36dd59e84f502500a24fec97a6fad305167', onSlotchange: this.handleSlotChange })), this.renderMessages(), !this.multiple && h("pds-icon", { key: '66fd7ed9fd065b6aff73df75234fa9534c828b6f', "aria-hidden": "true", class: "pds-select__select-icon", icon: enlarge }))));
237
+ const hostClass = this.classNames();
238
+ const hostAttributes = {
239
+ 'aria-disabled': this.disabled ? 'true' : null,
240
+ 'has-action': hasAction && !this.hideLabel ? 'true' : null,
241
+ };
242
+ this.hostKeeper.record(hostClass, {}, hostAttributes);
243
+ return (h(Host, Object.assign({ key: 'c99bfc000ad351298e154554a8b22635b1abb718', class: hostClass }, hostAttributes), h("div", { key: '35374b150cbef745c6a6068ba5a2fde0803c0314', class: "pds-select" }, !this.hideLabel && (h("div", { key: 'a3b9bae451c5c384606790a29bf8ab5fc70427c0', class: "pds-select__label-wrapper" }, h("label", { key: '80d7740a05a6d3cce6d51224169eb6c2501c4896', htmlFor: this.componentId }, h("span", { key: 'a51c02d7c84f75bb168889dab50cae807271c63d', class: this.hideLabel ? 'visually-hidden' : '' }, this.label)), hasAction && this.renderAction())), h("select", { key: '11444dad795bd02c008252a60e701125861e4af0', "aria-describedby": assignDescription(this.componentId, this.isInvalid(), this.helperMessage, this.errorMessage), "aria-invalid": this.isInvalid() ? 'true' : undefined, "aria-label": this.hideLabel ? this.label : undefined, autocomplete: this.autocomplete || undefined, class: "pds-select__field", disabled: this.disabled, id: this.componentId, multiple: this.multiple, name: this.name, onBlur: this.onBlur, onChange: this.onSelectUpdate, onFocus: this.onFocus, onKeyDown: this.onKeyDown, part: "select", required: this.required, ref: (el) => (this.selectEl = el) }), h("div", { key: 'ce54fa1df287d96a7503bb19cd2ba6c74a6da638', "aria-hidden": "true", class: "hidden", ref: (el) => (this.slotContainer = el) }, h("slot", { key: '22c55e78999076a37d43fb708dabc7379dd4cee3', onSlotchange: this.handleSlotChange })), this.renderMessages(), !this.multiple && h("pds-icon", { key: '45628074fbcdb259b8bba42299082423309a6968', "aria-hidden": "true", class: "pds-select__select-icon", icon: enlarge }))));
232
244
  }
233
245
  static get is() { return "pds-select"; }
234
246
  static get encapsulation() { return "shadow"; }
@@ -1,10 +1,13 @@
1
1
  import { Host, h } from "@stencil/core";
2
+ import { HostStylingKeeper } from "../../../utils/attributes";
2
3
  import { handle as handleIcon } from "@pine-ds/icons/icons";
3
4
  /**
4
5
  * @slot sortable-item-actions - Content is placed within the `pds-sortable-item__actions` element as children. This slot is only rendered if `actions` is set to `true`.
6
+ * @lightDom renders-markup
5
7
  */
6
8
  export class PdsSortableItem {
7
9
  constructor() {
10
+ this.hostKeeper = new HostStylingKeeper();
8
11
  /**
9
12
  * Determines whether `sortable-item-actions` slot should be enabled.
10
13
  * @defaultValue false
@@ -16,6 +19,12 @@ export class PdsSortableItem {
16
19
  */
17
20
  this.showHandle = false;
18
21
  }
22
+ connectedCallback() {
23
+ this.hostKeeper.connect(this.el);
24
+ }
25
+ disconnectedCallback() {
26
+ this.hostKeeper.disconnect();
27
+ }
19
28
  // Discards stale handle/actions siblings left by a page-cache (Turbo, bfcache) reconnect; the fresh handle is always first, the fresh actions wrapper always last.
20
29
  componentDidRender() {
21
30
  const handles = Array.from(this.el.children).filter((child) => child.matches('.pds-sortable-item__handle'));
@@ -38,7 +47,8 @@ export class PdsSortableItem {
38
47
  }
39
48
  }
40
49
  render() {
41
- return (h(Host, { key: 'a401963153e64b33f47f8897f2e8a157557d625e', class: "pds-sortable-item", id: this.componentId }, this.showHandle && (h("div", { key: 'e93df2aea5fcad497bd64f54b09a3e700141dfa6', class: "pds-sortable-item__handle" }, h("pds-icon", { key: '9454196233b1c12a232815a2a14f05e41721a152', "aria-hidden": "true", icon: handleIcon }))), h("slot", { key: 'da456ae383e8fe7dd9375eada035bee755cdd684' }), this.enableActions && (h("div", { key: 'bed7efa1c242e59b547e5e09018b1aacb1c1b172', class: "pds-sortable-item__actions" }, h("slot", { key: 'c4563d2a50c3bb55108527ae1f0a68a84d5749a7', name: "sortable-item-actions" })))));
50
+ this.hostKeeper.record('pds-sortable-item');
51
+ return (h(Host, { key: '3f9098a7c938bfa6443f08fb8b0a7c7217230890', class: "pds-sortable-item", id: this.componentId }, this.showHandle && (h("div", { key: '77718a6867ddd8bc029bb3ef995f6ee9a5999ce7', class: "pds-sortable-item__handle" }, h("pds-icon", { key: 'aad7f46e776ece85858798f8f1a1a50c9022b84f', "aria-hidden": "true", icon: handleIcon }))), h("slot", { key: 'afa9346ec8fd7aa6132a15dd44d3b1cae24500b9' }), this.enableActions && (h("div", { key: 'c28c85391117542999c12d673879768394002c90', class: "pds-sortable-item__actions" }, h("slot", { key: '88ab53f3ba4ed47715e31935b861d9ab42342b32', name: "sortable-item-actions" })))));
42
52
  }
43
53
  static get is() { return "pds-sortable-item"; }
44
54
  static get encapsulation() { return "scoped"; }
@@ -1,5 +1,9 @@
1
1
  import { Host, h } from "@stencil/core";
2
+ import { HostStylingKeeper } from "../../utils/attributes";
2
3
  import Sortable from "sortablejs";
4
+ /**
5
+ * @lightDom host-only
6
+ */
3
7
  export class PdsSortable {
4
8
  constructor() {
5
9
  /**
@@ -20,6 +24,7 @@ export class PdsSortable {
20
24
  * Determines the grabbable area for the `pds-sortable-item`.
21
25
  */
22
26
  this.handleType = 'row';
27
+ this.hostKeeper = new HostStylingKeeper();
23
28
  }
24
29
  handleDisabledChange() {
25
30
  var _a;
@@ -41,6 +46,12 @@ export class PdsSortable {
41
46
  }
42
47
  return classNames.join(' ');
43
48
  }
49
+ connectedCallback() {
50
+ this.hostKeeper.connect(this.el);
51
+ }
52
+ disconnectedCallback() {
53
+ this.hostKeeper.disconnect();
54
+ }
44
55
  componentDidLoad() {
45
56
  let sortableOptions = {
46
57
  animation: 150,
@@ -57,7 +68,9 @@ export class PdsSortable {
57
68
  this.sortableInstance = Sortable.create(this.el, sortableOptions);
58
69
  }
59
70
  render() {
60
- return (h(Host, { key: '6ff85345305337587c3d06b6f6c333125707efe8', class: this.classNames(), id: this.componentId }, h("slot", { key: 'e25c441574cc8b59bb1865a69af8691ce37ff341' })));
71
+ const classNames = this.classNames();
72
+ this.hostKeeper.record(classNames);
73
+ return (h(Host, { key: 'fb6e9a79babf01980c04ee7208d195510493a7dc', class: classNames, id: this.componentId }, h("slot", { key: '5735ca3af531a736f07d1fafde8ae544d00a75bb' })));
61
74
  }
62
75
  static get is() { return "pds-sortable"; }
63
76
  static get encapsulation() { return "scoped"; }
@@ -1,7 +1,7 @@
1
1
  import { Host, h } from "@stencil/core";
2
2
  import { assignDescription, isSpecTest, messageId, exposeTypeProperty } from "../../utils/form";
3
3
  import { danger } from "@pine-ds/icons/icons";
4
- import { inheritAriaAttributes } from "../../utils/attributes";
4
+ import { inheritAriaAttributes, HostStylingKeeper } from "../../utils/attributes";
5
5
  /**
6
6
  * @slot label - Content displayed as the switch label in place of the `label` text. Clicking it toggles the switch.
7
7
  */
@@ -9,6 +9,7 @@ export class PdsSwitch {
9
9
  constructor() {
10
10
  this.inheritedAttributes = {};
11
11
  this._type = 'checkbox';
12
+ this.hostKeeper = new HostStylingKeeper();
12
13
  this.hasLabelSlot = false;
13
14
  /**
14
15
  * Determines the input 'checked' state.
@@ -52,6 +53,7 @@ export class PdsSwitch {
52
53
  };
53
54
  }
54
55
  connectedCallback() {
56
+ this.hostKeeper.connect(this.el);
55
57
  // Initialize ElementInternals for form association (only once per element instance)
56
58
  if (this.el.attachInternals && !this.internals) {
57
59
  this.internals = this.el.attachInternals();
@@ -59,6 +61,9 @@ export class PdsSwitch {
59
61
  // Expose type property on the element instance to match native form element behavior
60
62
  exposeTypeProperty(this.el, () => this._type);
61
63
  }
64
+ disconnectedCallback() {
65
+ this.hostKeeper.disconnect();
66
+ }
62
67
  componentDidLoad() {
63
68
  this.updateFormValue();
64
69
  }
@@ -93,9 +98,12 @@ export class PdsSwitch {
93
98
  this.updateHasLabelSlot();
94
99
  }
95
100
  render() {
96
- return (h(Host, { key: 'b04295a8cc5acec33c5c6461516e9ec57ff9c396', class: this.switchClassNames(), "aria-disabled": this.disabled ? 'true' : null }, h("label", { key: 'f052e2409b0d7603598fd59bcdd382d6091cd794', htmlFor: this.componentId }, h("input", Object.assign({ key: 'd61df3ac3762af2dcc27a8800f7317ac03994ea3', "aria-describedby": assignDescription(this.componentId, this.invalid, this.helperMessage, this.errorMessage), "aria-invalid": this.invalid ? "true" : undefined, checked: this.checked, class: "pds-switch__input", disabled: this.disabled, id: this.componentId, name: this.name ? this.name : this.componentId, onChange: this.onSwitchUpdate, required: this.required, type: "checkbox", value: this.value }, this.inheritedAttributes)), h("span", { key: '0f921ea88d5706c364b1d8e4e05afac95be9f092', class: this.hideLabel ? 'visually-hidden' : '' }, h("slot", { key: '10f20c7f761635be8d90580be85fd7d62e2968f3', name: "label", onSlotchange: this.updateHasLabelSlot }), !this.hasLabelSlot && this.label)), this.helperMessage &&
97
- h("div", { key: '97a0281aa88b9208128fa169740cc710beed5538', class: `pds-switch__message`, id: messageId(this.componentId, 'helper') }, this.helperMessage), this.errorMessage &&
98
- h("div", { key: '26dd988675278031577df77560557484a8187cd5', class: `pds-switch__message pds-switch__message--error`, id: messageId(this.componentId, 'error'), "aria-live": "assertive" }, h("pds-icon", { key: 'ed674224e564f330ea797d0b4196442ad372ae99', icon: danger, size: "small" }), this.errorMessage)));
101
+ const hostClass = this.switchClassNames();
102
+ const ariaDisabled = this.disabled ? 'true' : null;
103
+ this.hostKeeper.record(hostClass, {}, { 'aria-disabled': ariaDisabled });
104
+ return (h(Host, { key: '6d4b51307f2619a99981e344f782f69871aabf0f', class: hostClass, "aria-disabled": ariaDisabled }, h("label", { key: '068ef3759e2bc3d9870cff36714de0e9cf558b2b', htmlFor: this.componentId }, h("input", Object.assign({ key: 'aa28fb67332bb2d81c09b6c749c1cb0f079e327f', "aria-describedby": assignDescription(this.componentId, this.invalid, this.helperMessage, this.errorMessage), "aria-invalid": this.invalid ? "true" : undefined, checked: this.checked, class: "pds-switch__input", disabled: this.disabled, id: this.componentId, name: this.name ? this.name : this.componentId, onChange: this.onSwitchUpdate, required: this.required, type: "checkbox", value: this.value }, this.inheritedAttributes)), h("span", { key: 'd237980a9ce2abc04d57085df022f28dfa2768e4', class: this.hideLabel ? 'visually-hidden' : '' }, h("slot", { key: '83d0e2110cfdcd3208319302af237178dfd419a4', name: "label", onSlotchange: this.updateHasLabelSlot }), !this.hasLabelSlot && this.label)), this.helperMessage &&
105
+ h("div", { key: '137d9e5626b34ade33f68c4c24c3dcb154500dc6', class: `pds-switch__message`, id: messageId(this.componentId, 'helper') }, this.helperMessage), this.errorMessage &&
106
+ h("div", { key: '64c3b8884d0568e26953f67a95d045aa5731c41f', class: `pds-switch__message pds-switch__message--error`, id: messageId(this.componentId, 'error'), "aria-live": "assertive" }, h("pds-icon", { key: 'f99f8045eb33d0c60518f3b4c6a0183170a50f4a', icon: danger, size: "small" }), this.errorMessage)));
99
107
  }
100
108
  static get is() { return "pds-switch"; }
101
109
  static get encapsulation() { return "shadow"; }
@@ -1,5 +1,8 @@
1
1
  import { Fragment, Host, h } from "@stencil/core";
2
2
  import { unwrapReconnectedContent } from "../../../utils/reconnected-content";
3
+ /**
4
+ * @lightDom renders-markup
5
+ */
3
6
  export class PdsTab {
4
7
  constructor() {
5
8
  /**
@@ -1,5 +1,8 @@
1
1
  import { Host, h } from "@stencil/core";
2
2
  import { unwrapReconnectedContent } from "../../../utils/reconnected-content";
3
+ /**
4
+ * @lightDom renders-markup
5
+ */
3
6
  export class PdsTabpanel {
4
7
  constructor() {
5
8
  /**
@@ -18,7 +21,7 @@ export class PdsTabpanel {
18
21
  unwrapReconnectedContent(this.el.querySelector('.pds-tabpanel'), '.pds-tabpanel');
19
22
  }
20
23
  render() {
21
- return (h(Host, { key: 'cce5229aaa694a4eeb30ceacb7edbb7b03f7e24a', slot: "tabpanels", class: this.stretch && this.selected ? "pds-tabpanel--stretch-active" : undefined }, h("div", { key: '614187ea6676c80d94acd9aef7c8e10137fb6179', role: "tabpanel", id: this.parentComponentId + "__" + this.name + '-panel', tabindex: "0", "aria-labelledby": this.parentComponentId + "__" + this.name, class: this.selected ? "pds-tabpanel is-active" : "pds-tabpanel" }, h("slot", { key: '368f81238023d647d42b3c1f6dc14795245bbc87' }))));
24
+ return (h(Host, { key: '87b00d828c9cddbcccd5d6e89dab7541a3c5c839', slot: "tabpanels", class: this.stretch && this.selected ? "pds-tabpanel--stretch-active" : undefined }, h("div", { key: 'd7058a727d010351c73b5287f45991d48ef71151', role: "tabpanel", id: this.parentComponentId + "__" + this.name + '-panel', tabindex: "0", "aria-labelledby": this.parentComponentId + "__" + this.name, class: this.selected ? "pds-tabpanel is-active" : "pds-tabpanel" }, h("slot", { key: '97861fcd8432206a1115135fad919d75dc327112' }))));
22
25
  }
23
26
  static get is() { return "pds-tabpanel"; }
24
27
  static get originalStyleUrls() {
@@ -1,4 +1,5 @@
1
1
  import { Host, h } from "@stencil/core";
2
+ import { HostStylingKeeper } from "../../utils/attributes";
2
3
  /**
3
4
  * @slot tabs - Content is placed within the `div[role="tablist"]` element as children
4
5
  * @slot tabpanels - Content is placed directly after the `div[role="tablist"]` element as siblings
@@ -6,6 +7,7 @@ import { Host, h } from "@stencil/core";
6
7
  */
7
8
  export class PdsTabs {
8
9
  constructor() {
10
+ this.hostKeeper = new HostStylingKeeper();
9
11
  /**
10
12
  * Adds a divider rule beneath the tab list.
11
13
  * @defaultValue false
@@ -26,6 +28,12 @@ export class PdsTabs {
26
28
  */
27
29
  this.nav = false;
28
30
  }
31
+ connectedCallback() {
32
+ this.hostKeeper.connect(this.el);
33
+ }
34
+ disconnectedCallback() {
35
+ this.hostKeeper.disconnect();
36
+ }
29
37
  tabClickHandler(event) {
30
38
  if (this.componentId === event.detail[1]) {
31
39
  this.activeTabIndex = event.detail[0];
@@ -160,7 +168,11 @@ export class PdsTabs {
160
168
  // Navigation mode: a <nav> landmark of links (aria-current marks the current
161
169
  // page). Panel mode: the ARIA tablist of role=tab buttons over tabpanels.
162
170
  const tabList = this.isNav ? (h("nav", { class: "pds-tabs__tablist", "aria-label": this.tablistLabel || undefined, part: "tab-list" }, h("slot", { name: "tabs" }))) : (h("div", { class: "pds-tabs__tablist", role: "tablist", "aria-label": this.tablistLabel, part: "tab-list" }, h("slot", { name: "tabs" })));
163
- return (h(Host, { key: 'db689b695d53916eb40a7c6f4596a20925fd4b2e', "active-tab-name": this.activeTabName, class: this.classNames(), id: this.componentId }, tabList, h("slot", { key: 'd2e79967a75d4e2fc33bff5321c62cc89ac74491', name: "tabpanels" })));
171
+ const hostClass = this.classNames();
172
+ // Only the classes: `active-tab-name` backs the mutable activeTabName prop, so a morph that drops
173
+ // it is a prop change, not a strip.
174
+ this.hostKeeper.record(hostClass);
175
+ return (h(Host, { key: 'ea26bc4e4cadd4621511afa01ca2a353a053fd0e', "active-tab-name": this.activeTabName, class: hostClass, id: this.componentId }, tabList, h("slot", { key: '3f920708c647920af3d0d50f74b5409d30d70af8', name: "tabpanels" })));
164
176
  }
165
177
  static get is() { return "pds-tabs"; }
166
178
  static get encapsulation() { return "shadow"; }
@@ -3,6 +3,7 @@ import { autoUpdate, computePosition, flip, offset, shift, } from "@floating-ui/
3
3
  /**
4
4
  * @slot (default) - The tooltip's target element
5
5
  * @slot content - HTML content for the tooltip
6
+ * @lightDom renders-markup
6
7
  */
7
8
  export class PdsTooltip {
8
9
  constructor() {
@@ -342,9 +343,9 @@ export class PdsTooltip {
342
343
  }
343
344
  render() {
344
345
  const hostId = this.componentId || undefined;
345
- return (h(Host, { key: 'd63b6632a084fbaebd2004a569fb96e0fff91f41', id: hostId, class: { 'pds-tooltip--is-open': this.opened } }, h("span", { key: '79b8b9c2bb9fc2afaf8cbb06dbc102d18c060362', class: "pds-tooltip__trigger", onMouseEnter: this.handleShow, onMouseLeave: this.handleHide,
346
+ return (h(Host, { key: 'e80abb11248d9bf6aec1ae738c61692594975630', id: hostId, class: { 'pds-tooltip--is-open': this.opened } }, h("span", { key: '9ff484925a1792302eee230a5c37a0268d536935', class: "pds-tooltip__trigger", onMouseEnter: this.handleShow, onMouseLeave: this.handleHide,
346
347
  /* focusin/out bubble; ensure keyboard users see tooltips */
347
- onFocusin: this.handleShow, onFocusout: this.handleHide, ref: el => this.triggerEl = el }, h("slot", { key: '9e12d130ac5f392d966f442d91673c3864962b01' })), h("div", { key: '5b83f093b2cbb2b22af0c440278ee318c456087a', class: "pds-tooltip__content-slot-wrapper", hidden: true }, h("slot", { key: 'c0243ad0a833326e8daf799d41b1bf8048c6dee9', name: "content" }))));
348
+ onFocusin: this.handleShow, onFocusout: this.handleHide, ref: el => this.triggerEl = el }, h("slot", { key: '738c314a816e82fd81a0c0e9895d51af45b75eb2' })), h("div", { key: '5b0477cd433cae0b53c4d5ce5767dc703be28ee0', class: "pds-tooltip__content-slot-wrapper", hidden: true }, h("slot", { key: '51ad497357c1d1547bba69d07fd7fa1b675c021f', name: "content" }))));
348
349
  }
349
350
  static get is() { return "pds-tooltip"; }
350
351
  static get originalStyleUrls() {
@@ -1,3 +1,82 @@
1
+ /**
2
+ * Sets each attribute whose current value differs, and leaves the rest alone. A `MutationObserver`
3
+ * that calls this to restore attributes sees its own writes once and then settles, so it can't loop.
4
+ * @param el - Element to write to
5
+ * @param attributes - Attribute names and the values they should have
6
+ */
7
+ export const setAttributesIfChanged = (el, attributes) => {
8
+ Object.entries(attributes).forEach(([name, value]) => {
9
+ if (el.getAttribute(name) !== value)
10
+ el.setAttribute(name, value);
11
+ });
12
+ };
13
+ // Classes Stencil itself puts on a host: its default `hydratedFlag` (Pine doesn't change it), and a
14
+ // scoped component's own scope classes (`sc-pds-radio`, `sc-pds-radio-h`, `sc-pds-radio-s`), which
15
+ // its CSS needs. Only the host's own: another `sc-` class may be a consumer's (styled-components ids).
16
+ const isStencilClass = (el, name) => {
17
+ const scope = `sc-${el.localName}`;
18
+ return name === 'hydrated' || name === scope || name === `${scope}-h` || name === `${scope}-s`;
19
+ };
20
+ /**
21
+ * The class names in a rendered `class` value: a string, or Stencil's `{ name: boolean }` form.
22
+ */
23
+ export const classNamesOf = (classes) => typeof classes === 'string'
24
+ ? classes.split(/\s+/).filter(Boolean)
25
+ : Object.keys(classes).filter((name) => classes[name]);
26
+ /**
27
+ * Puts back any of `expected`'s classes or style properties that are missing from `el`. It only
28
+ * adds what's missing, never rewrites a value that's there, because browsers normalize some style
29
+ * values (`flex: 1` reads back as `1 1 0%`): comparing values would rewrite them forever.
30
+ * @param el - Host element
31
+ * @param expected - Classes and style properties the component rendered
32
+ */
33
+ export const restoreHostStyling = (el, { classes, styles }) => {
34
+ const missing = classes.filter((name) => !el.classList.contains(name));
35
+ if (missing.length > 0)
36
+ el.classList.add(...missing);
37
+ Object.entries(styles).forEach(([name, value]) => {
38
+ if (value && el.style.getPropertyValue(name) === '')
39
+ el.style.setProperty(name, value);
40
+ });
41
+ };
42
+ /**
43
+ * Watches a component's own host and puts back what it rendered when something strips it. A DOM
44
+ * morph does: it makes the host match the server's HTML, which carries the component's props but not
45
+ * the classes, styles and attributes it wrote, and Stencil won't write them again because it diffs
46
+ * against its previous render, not the live DOM.
47
+ *
48
+ * It also means a script that removes one of these on purpose sees it come back: change them through
49
+ * the component's props instead.
50
+ * @param el - Host element
51
+ * @param expected - Reads what the component last rendered
52
+ * @returns The observer, to disconnect when the component is removed; `null` without MutationObserver
53
+ */
54
+ const keepHostStyling = (el, expected) => {
55
+ if (typeof MutationObserver === 'undefined')
56
+ return null;
57
+ const observer = new MutationObserver((records) => {
58
+ const styling = expected();
59
+ // A strip takes Stencil's own classes too: without `hydrated` Stencil hides the component, and
60
+ // without its scope classes a scoped component's CSS stops matching. Put back only the ones that
61
+ // were there, so this never runs ahead of Stencil.
62
+ const stencilClasses = records
63
+ .filter((record) => record.attributeName === 'class' && record.oldValue != null)
64
+ .flatMap((record) => classNamesOf(record.oldValue).filter((name) => isStencilClass(el, name)));
65
+ restoreHostStyling(el, Object.assign(Object.assign({}, styling), { classes: [...styling.classes, ...stencilClasses] }));
66
+ // An attribute the component still renders comes back with the value it had, which is what
67
+ // Stencil wrote (a boolean `true` lands as an empty value). One it stopped rendering stays
68
+ // removed, since that was Stencil's own write.
69
+ records.forEach(({ attributeName: name, oldValue }) => {
70
+ var _a;
71
+ const rendered = (_a = styling.attributes) === null || _a === void 0 ? void 0 : _a[name];
72
+ if (oldValue == null || rendered == null || rendered === false || el.hasAttribute(name))
73
+ return;
74
+ el.setAttribute(name, oldValue);
75
+ });
76
+ });
77
+ observer.observe(el, { attributes: true, attributeOldValue: true });
78
+ return observer;
79
+ };
1
80
  /**
2
81
  * Inherit attributes from the host element
3
82
  * @param el - Host element
@@ -81,3 +160,25 @@ export const inheritAriaAttributes = (el, ignoreList) => {
81
160
  }
82
161
  return inheritAttributes(el, attributesToInherit);
83
162
  };
163
+ /**
164
+ * One component's use of `keepHostStyling`: `record` what `render()` puts on the host, `connect` in
165
+ * `connectedCallback` and `disconnect` in `disconnectedCallback`.
166
+ */
167
+ export class HostStylingKeeper {
168
+ constructor() {
169
+ this.styling = { classes: [], styles: {} };
170
+ this.observer = null;
171
+ }
172
+ record(classes, styles = {}, attributes = {}) {
173
+ this.styling = { classes: classNamesOf(classes), styles, attributes };
174
+ }
175
+ connect(el) {
176
+ var _a;
177
+ (_a = this.observer) !== null && _a !== void 0 ? _a : (this.observer = keepHostStyling(el, () => this.styling));
178
+ }
179
+ disconnect() {
180
+ var _a;
181
+ (_a = this.observer) === null || _a === void 0 ? void 0 : _a.disconnect();
182
+ this.observer = null;
183
+ }
184
+ }
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Restores a reflected prop's default when its attribute is removed.
3
+ *
4
+ * A reflected `@Prop` with a default writes that default onto the host as an
5
+ * attribute even when the author leaves it out. Removing the attribute doesn't
6
+ * restore the default: Stencil's `attributeChangedCallback` sets the prop to
7
+ * `null` (or `false` for a boolean), even when its default is `true`. A Turbo
8
+ * morph hits this whenever the author relied on the default, since the
9
+ * server's HTML never carries the attribute Pine wrote.
10
+ *
11
+ * A `null` or `undefined` falls back to the default, whether the attribute was
12
+ * removed or a consumer (or a framework clearing a prop) assigned it. Any other
13
+ * value is a real write and is kept, except a boolean's `false`: that's also
14
+ * what removing the attribute produces, so it's told apart by the host's actual
15
+ * attribute. Present, trust it; absent, fall back to the default.
16
+ *
17
+ * Falling back also writes the default back onto the host. Stencil won't: it
18
+ * diffs a reflected attribute against the previous render, not the live DOM,
19
+ * so when the removed attribute held the default (`'lg'` → `null` → `'lg'`)
20
+ * the values match and it skips the write. Left absent, the attribute would
21
+ * make a later `copytext.border = false` fall back to the default too.
22
+ *
23
+ * Wire up from a `@Watch` on the prop and reassign the prop to the result.
24
+ *
25
+ * `attr` is the HTML attribute name, not the prop name — pass the kebab-case
26
+ * form (e.g. `'is-loading'`) for a camelCase prop. They're the same string
27
+ * for every current caller (`size`, `variant`, `placement`, `border`), but
28
+ * `hasAttribute` would silently always return `false` for a multi-word prop
29
+ * if the prop name were passed instead.
30
+ */
31
+ export function restoreReflectedDefault(el, attr, value, defaultValue) {
32
+ // Only a boolean's `false` needs the attribute to tell a write from a removal. Checking it for
33
+ // other values would let a `null` write strip the attribute and reset every later write.
34
+ if (value != null && (value !== false || el.hasAttribute(attr)))
35
+ return value;
36
+ if (defaultValue !== false && defaultValue != null) {
37
+ el.setAttribute(attr, defaultValue === true ? '' : String(defaultValue));
38
+ }
39
+ return defaultValue;
40
+ }
@@ -0,0 +1,50 @@
1
+ // The browser-side code below is passed as strings, the same workaround `runAxe` uses: under Jest's
2
+ // coverage instrumentation, a function passed to `page.$eval` is serialized with injected `cov_*`
3
+ // counter calls that don't exist in the browser, which throws a `ReferenceError` there.
4
+ const inBrowser = (page, selector, body, args = null) => page.evaluate(`
5
+ (() => {
6
+ const el = document.querySelector(${JSON.stringify(selector)});
7
+ const args = ${JSON.stringify(args)};
8
+ ${body}
9
+ })()
10
+ `);
11
+ // Computed properties a host class, style or attribute tends to drive, for the host and everything
12
+ // it renders (its shadow tree, or its light DOM for a shadowless component).
13
+ const snapshotStyles = (page, selector) => inBrowser(page, selector, `
14
+ const nodes = [el, ...Array.from((el.shadowRoot || el).querySelectorAll('*'))];
15
+ return nodes.map((node) => {
16
+ const style = getComputedStyle(node);
17
+ // No sizes: text width shifts as web fonts load, and inner elements can be mid-animation. The
18
+ // class check covers what a size would have caught.
19
+ return [
20
+ style.display, style.visibility, style.opacity, style.position, style.clip, style.overflow, style.flexDirection, style.flex, style.minHeight, style.gap,
21
+ style.paddingTop, style.maxWidth, style.color, style.backgroundColor, style.fontWeight,
22
+ style.borderTopStyle, style.borderTopColor, style.borderTopWidth,
23
+ style.borderBottomStyle, style.borderBottomColor, style.borderBottomWidth,
24
+ style.animationName, style.cursor,
25
+ ].join(' | ');
26
+ });
27
+ `);
28
+ /**
29
+ * Strips the host's `class` (keeping a `consumer` class the markup must carry), its `style`, and any
30
+ * `removeAttributes`, as a DOM morph does when the server's HTML lacks what the component wrote.
31
+ * Expects every class and removed attribute to come back, and every computed style of the host and
32
+ * what it renders to be unchanged.
33
+ */
34
+ export const expectStylingSurvivesStrip = async (page, selector, { removeAttributes = [] } = {}) => {
35
+ const host = () => inBrowser(page, selector, `
36
+ return {
37
+ classes: Array.from(el.classList).sort(),
38
+ attributes: args.map((name) => [name, el.getAttribute(name)]),
39
+ };
40
+ `, removeAttributes);
41
+ const before = { host: await host(), styles: await snapshotStyles(page, selector) };
42
+ await inBrowser(page, selector, `
43
+ el.setAttribute('class', 'consumer');
44
+ el.removeAttribute('style');
45
+ args.forEach((name) => el.removeAttribute(name));
46
+ `, removeAttributes);
47
+ await page.waitForChanges();
48
+ expect(await host()).toEqual(before.host);
49
+ expect(await snapshotStyles(page, selector)).toEqual(before.styles);
50
+ };