@pine-ds/core 4.5.0 → 4.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (478) hide show
  1. package/components/attributes.js +1 -1
  2. package/components/mock-pds-modal.js +1 -1
  3. package/components/pds-combobox.js +1 -1
  4. package/components/pds-container.js +1 -1
  5. package/components/pds-copytext.js +1 -1
  6. package/components/pds-datepicker.js +1 -1
  7. package/components/pds-divider.js +1 -1
  8. package/components/pds-drawer-content.js +1 -1
  9. package/components/pds-drawer-footer.js +1 -1
  10. package/components/pds-drawer-header.js +1 -1
  11. package/components/pds-drawer.js +1 -1
  12. package/components/pds-dropdown-menu-item.js +1 -1
  13. package/components/pds-dropdown-menu-separator.js +1 -1
  14. package/components/pds-dropdown-menu.js +1 -1
  15. package/components/pds-filter.js +1 -1
  16. package/components/pds-filters.js +1 -1
  17. package/components/pds-icon2.js +1 -1
  18. package/components/pds-image.js +1 -1
  19. package/components/pds-input2.js +1 -1
  20. package/components/pds-link2.js +1 -1
  21. package/components/pds-loader2.js +1 -1
  22. package/components/pds-modal-content.js +1 -1
  23. package/components/pds-modal-footer.js +1 -1
  24. package/components/pds-modal-header.js +1 -1
  25. package/components/pds-modal2.js +1 -1
  26. package/components/pds-multiselect.js +1 -1
  27. package/components/pds-popover.js +1 -1
  28. package/components/pds-progress.js +1 -1
  29. package/components/pds-property.js +1 -1
  30. package/components/pds-radio-group.js +1 -1
  31. package/components/pds-radio.js +1 -1
  32. package/components/pds-row.js +1 -1
  33. package/components/pds-select.js +1 -1
  34. package/components/pds-sortable-item.js +1 -1
  35. package/components/pds-sortable.js +1 -1
  36. package/components/pds-switch.js +1 -1
  37. package/components/pds-tab.js +1 -1
  38. package/components/pds-table-body.js +1 -1
  39. package/components/pds-table-cell2.js +1 -1
  40. package/components/pds-table-head-cell2.js +1 -1
  41. package/components/pds-table-head.js +1 -1
  42. package/components/pds-table-row.js +1 -1
  43. package/components/pds-tabpanel.js +1 -1
  44. package/components/pds-tabs.js +1 -1
  45. package/components/pds-text2.js +1 -1
  46. package/components/pds-textarea.js +1 -1
  47. package/components/pds-toast.js +1 -1
  48. package/components/pds-tooltip.js +1 -1
  49. package/dist/cjs/{attributes-DXvaSETR.js → attributes-BJ7KBHql.js} +18 -11
  50. package/dist/cjs/{index-D-QQKB0y.js → index-5Azb8EQG.js} +1 -1
  51. package/dist/cjs/{index-BQjWfQXw.js → index-jl_Q819j.js} +1 -1
  52. package/dist/cjs/index.cjs.js +1 -1
  53. package/dist/cjs/keep-hydrated-CiXgkEYd.js +196 -0
  54. package/dist/cjs/loader.cjs.js +3 -3
  55. package/dist/cjs/mock-pds-modal.cjs.entry.js +3 -3
  56. package/dist/cjs/pds-accordion.cjs.entry.js +3 -3
  57. package/dist/cjs/pds-alert.cjs.entry.js +2 -2
  58. package/dist/cjs/pds-avatar.cjs.entry.js +3 -3
  59. package/dist/cjs/pds-box.cjs.entry.js +3 -3
  60. package/dist/cjs/pds-button.cjs.entry.js +3 -3
  61. package/dist/cjs/pds-checkbox.cjs.entry.js +4 -4
  62. package/dist/cjs/pds-chip.cjs.entry.js +4 -4
  63. package/dist/cjs/pds-combobox.cjs.entry.js +187 -28
  64. package/dist/cjs/pds-container.cjs.entry.js +3 -3
  65. package/dist/cjs/pds-copytext.cjs.entry.js +5 -5
  66. package/dist/cjs/pds-datepicker.cjs.entry.js +5 -5
  67. package/dist/cjs/pds-divider.cjs.entry.js +3 -3
  68. package/dist/cjs/pds-drawer-content.cjs.entry.js +3 -3
  69. package/dist/cjs/pds-drawer-footer.cjs.entry.js +3 -3
  70. package/dist/cjs/pds-drawer-header.cjs.entry.js +3 -3
  71. package/dist/cjs/pds-drawer.cjs.entry.js +25 -12
  72. package/dist/cjs/pds-dropdown-menu-item.cjs.entry.js +3 -3
  73. package/dist/cjs/pds-dropdown-menu-separator.cjs.entry.js +3 -3
  74. package/dist/cjs/pds-dropdown-menu.cjs.entry.js +24 -12
  75. package/dist/cjs/pds-filter.cjs.entry.js +4 -4
  76. package/dist/cjs/pds-filters.cjs.entry.js +3 -3
  77. package/dist/cjs/pds-icon.cjs.entry.js +27 -4
  78. package/dist/cjs/pds-image.cjs.entry.js +4 -4
  79. package/dist/cjs/pds-input.cjs.entry.js +6 -6
  80. package/dist/cjs/pds-link.cjs.entry.js +5 -5
  81. package/dist/cjs/pds-loader.cjs.entry.js +4 -4
  82. package/dist/cjs/pds-modal-content.cjs.entry.js +4 -4
  83. package/dist/cjs/pds-modal-footer.cjs.entry.js +3 -3
  84. package/dist/cjs/pds-modal-header.cjs.entry.js +3 -3
  85. package/dist/cjs/pds-modal.cjs.entry.js +118 -33
  86. package/dist/cjs/pds-multiselect.cjs.entry.js +9 -8
  87. package/dist/cjs/pds-popover.cjs.entry.js +227 -37
  88. package/dist/cjs/pds-progress.cjs.entry.js +4 -4
  89. package/dist/cjs/pds-property.cjs.entry.js +3 -3
  90. package/dist/cjs/pds-radio-group.cjs.entry.js +6 -6
  91. package/dist/cjs/pds-radio.cjs.entry.js +7 -7
  92. package/dist/cjs/pds-row.cjs.entry.js +4 -4
  93. package/dist/cjs/pds-select.cjs.entry.js +5 -5
  94. package/dist/cjs/pds-sortable-item.cjs.entry.js +5 -5
  95. package/dist/cjs/pds-sortable.cjs.entry.js +4 -4
  96. package/dist/cjs/pds-switch.cjs.entry.js +7 -7
  97. package/dist/cjs/pds-tab.cjs.entry.js +13 -2
  98. package/dist/cjs/pds-table-body.cjs.entry.js +3 -3
  99. package/dist/cjs/pds-table-cell.cjs.entry.js +4 -4
  100. package/dist/cjs/pds-table-head-cell.cjs.entry.js +5 -5
  101. package/dist/cjs/pds-table-head.cjs.entry.js +3 -3
  102. package/dist/cjs/pds-table-row.cjs.entry.js +3 -3
  103. package/dist/cjs/pds-table.cjs.entry.js +2 -2
  104. package/dist/cjs/pds-tabpanel.cjs.entry.js +15 -3
  105. package/dist/cjs/pds-tabs.cjs.entry.js +111 -7
  106. package/dist/cjs/pds-text.cjs.entry.js +3 -3
  107. package/dist/cjs/pds-textarea.cjs.entry.js +8 -8
  108. package/dist/cjs/pds-toast.cjs.entry.js +5 -5
  109. package/dist/cjs/pds-tooltip.cjs.entry.js +4 -4
  110. package/dist/cjs/pine-core.cjs.js +3 -3
  111. package/dist/collection/components/pds-combobox/grouped-options-panel.js +21 -3
  112. package/dist/collection/components/pds-combobox/pds-combobox.css +42 -13
  113. package/dist/collection/components/pds-combobox/pds-combobox.js +166 -23
  114. package/dist/collection/components/pds-combobox/stories/pds-combobox.stories.js +45 -0
  115. package/dist/collection/components/pds-container/pds-container.js +1 -1
  116. package/dist/collection/components/pds-copytext/pds-copytext.js +1 -1
  117. package/dist/collection/components/pds-datepicker/pds-datepicker.js +2 -2
  118. package/dist/collection/components/pds-divider/pds-divider.js +1 -1
  119. package/dist/collection/components/pds-drawer/pds-drawer-content/pds-drawer-content.js +1 -1
  120. package/dist/collection/components/pds-drawer/pds-drawer-footer/pds-drawer-footer.js +1 -1
  121. package/dist/collection/components/pds-drawer/pds-drawer-header/pds-drawer-header.js +1 -1
  122. package/dist/collection/components/pds-drawer/pds-drawer.css +4 -1
  123. package/dist/collection/components/pds-drawer/pds-drawer.js +54 -17
  124. package/dist/collection/components/pds-drawer/stories/pds-drawer.stories.js +6 -1
  125. package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-item/pds-dropdown-menu-item.js +1 -1
  126. package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-separator/pds-dropdown-menu-separator.js +1 -1
  127. package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu.css +19 -5
  128. package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu.js +30 -9
  129. package/dist/collection/components/pds-filters/pds-filter/pds-filter.js +1 -1
  130. package/dist/collection/components/pds-filters/pds-filters.js +1 -1
  131. package/dist/collection/components/pds-image/pds-image.js +2 -2
  132. package/dist/collection/components/pds-input/pds-input.js +2 -2
  133. package/dist/collection/components/pds-link/pds-link.js +2 -2
  134. package/dist/collection/components/pds-loader/pds-loader.js +1 -1
  135. package/dist/collection/components/pds-modal/pds-modal-content/pds-modal-content.js +2 -2
  136. package/dist/collection/components/pds-modal/pds-modal-footer/pds-modal-footer.js +1 -1
  137. package/dist/collection/components/pds-modal/pds-modal-header/pds-modal-header.js +1 -1
  138. package/dist/collection/components/pds-modal/pds-modal.js +117 -32
  139. package/dist/collection/components/pds-modal/test/mock-pds-modal.js +1 -1
  140. package/dist/collection/components/pds-multiselect/pds-multiselect.js +8 -7
  141. package/dist/collection/components/pds-popover/pds-popover.js +185 -35
  142. package/dist/collection/components/pds-progress/pds-progress.js +1 -1
  143. package/dist/collection/components/pds-property/pds-property.js +1 -1
  144. package/dist/collection/components/pds-radio/pds-radio.js +3 -3
  145. package/dist/collection/components/pds-radio-group/pds-radio-group.js +3 -3
  146. package/dist/collection/components/pds-row/pds-row.js +1 -1
  147. package/dist/collection/components/pds-select/pds-select.js +1 -1
  148. package/dist/collection/components/pds-sortable/pds-sortable-item/pds-sortable-item.js +1 -1
  149. package/dist/collection/components/pds-sortable/pds-sortable.js +1 -1
  150. package/dist/collection/components/pds-switch/pds-switch.js +3 -3
  151. package/dist/collection/components/pds-table/pds-table-body/pds-table-body.js +1 -1
  152. package/dist/collection/components/pds-table/pds-table-cell/pds-table-cell.js +2 -2
  153. package/dist/collection/components/pds-table/pds-table-head/pds-table-head.js +1 -1
  154. package/dist/collection/components/pds-table/pds-table-head-cell/pds-table-head-cell.js +2 -2
  155. package/dist/collection/components/pds-table/pds-table-row/pds-table-row.js +1 -1
  156. package/dist/collection/components/pds-tabs/pds-tab/pds-tab.js +11 -0
  157. package/dist/collection/components/pds-tabs/pds-tabpanel/pds-tabpanel.js +13 -1
  158. package/dist/collection/components/pds-tabs/pds-tabs.js +111 -7
  159. package/dist/collection/components/pds-text/pds-text.js +1 -1
  160. package/dist/collection/components/pds-textarea/pds-textarea.js +4 -4
  161. package/dist/collection/components/pds-toast/pds-toast.js +3 -3
  162. package/dist/collection/components/pds-tooltip/pds-tooltip.js +2 -2
  163. package/dist/collection/utils/attributes.js +18 -11
  164. package/dist/collection/utils/css.js +41 -0
  165. package/dist/collection/utils/keep-hydrated.js +133 -6
  166. package/dist/docs.json +56 -12
  167. package/dist/esm/{attributes-CF5K2pxn.js → attributes-WXw_I_uJ.js} +18 -11
  168. package/dist/esm/{index-DxI-61GK.js → index-BJXk71tO.js} +1 -1
  169. package/dist/esm/{index-2HMD-zUO.js → index-Cw9J31qd.js} +1 -1
  170. package/dist/esm/index.js +1 -1
  171. package/dist/esm/keep-hydrated-BLG6RDBt.js +190 -0
  172. package/dist/esm/loader.js +4 -4
  173. package/dist/esm/mock-pds-modal.entry.js +3 -3
  174. package/dist/esm/pds-accordion.entry.js +3 -3
  175. package/dist/esm/pds-alert.entry.js +2 -2
  176. package/dist/esm/pds-avatar.entry.js +3 -3
  177. package/dist/esm/pds-box.entry.js +3 -3
  178. package/dist/esm/pds-button.entry.js +3 -3
  179. package/dist/esm/pds-checkbox.entry.js +4 -4
  180. package/dist/esm/pds-chip.entry.js +4 -4
  181. package/dist/esm/pds-combobox.entry.js +187 -28
  182. package/dist/esm/pds-container.entry.js +3 -3
  183. package/dist/esm/pds-copytext.entry.js +5 -5
  184. package/dist/esm/pds-datepicker.entry.js +5 -5
  185. package/dist/esm/pds-divider.entry.js +3 -3
  186. package/dist/esm/pds-drawer-content.entry.js +3 -3
  187. package/dist/esm/pds-drawer-footer.entry.js +3 -3
  188. package/dist/esm/pds-drawer-header.entry.js +3 -3
  189. package/dist/esm/pds-drawer.entry.js +25 -12
  190. package/dist/esm/pds-dropdown-menu-item.entry.js +3 -3
  191. package/dist/esm/pds-dropdown-menu-separator.entry.js +3 -3
  192. package/dist/esm/pds-dropdown-menu.entry.js +24 -12
  193. package/dist/esm/pds-filter.entry.js +4 -4
  194. package/dist/esm/pds-filters.entry.js +3 -3
  195. package/dist/esm/pds-icon.entry.js +27 -4
  196. package/dist/esm/pds-image.entry.js +4 -4
  197. package/dist/esm/pds-input.entry.js +6 -6
  198. package/dist/esm/pds-link.entry.js +5 -5
  199. package/dist/esm/pds-loader.entry.js +4 -4
  200. package/dist/esm/pds-modal-content.entry.js +4 -4
  201. package/dist/esm/pds-modal-footer.entry.js +3 -3
  202. package/dist/esm/pds-modal-header.entry.js +3 -3
  203. package/dist/esm/pds-modal.entry.js +118 -33
  204. package/dist/esm/pds-multiselect.entry.js +9 -8
  205. package/dist/esm/pds-popover.entry.js +228 -38
  206. package/dist/esm/pds-progress.entry.js +4 -4
  207. package/dist/esm/pds-property.entry.js +3 -3
  208. package/dist/esm/pds-radio-group.entry.js +6 -6
  209. package/dist/esm/pds-radio.entry.js +7 -7
  210. package/dist/esm/pds-row.entry.js +4 -4
  211. package/dist/esm/pds-select.entry.js +5 -5
  212. package/dist/esm/pds-sortable-item.entry.js +5 -5
  213. package/dist/esm/pds-sortable.entry.js +4 -4
  214. package/dist/esm/pds-switch.entry.js +7 -7
  215. package/dist/esm/pds-tab.entry.js +13 -2
  216. package/dist/esm/pds-table-body.entry.js +3 -3
  217. package/dist/esm/pds-table-cell.entry.js +4 -4
  218. package/dist/esm/pds-table-head-cell.entry.js +5 -5
  219. package/dist/esm/pds-table-head.entry.js +3 -3
  220. package/dist/esm/pds-table-row.entry.js +3 -3
  221. package/dist/esm/pds-table.entry.js +2 -2
  222. package/dist/esm/pds-tabpanel.entry.js +15 -3
  223. package/dist/esm/pds-tabs.entry.js +111 -7
  224. package/dist/esm/pds-text.entry.js +3 -3
  225. package/dist/esm/pds-textarea.entry.js +8 -8
  226. package/dist/esm/pds-toast.entry.js +5 -5
  227. package/dist/esm/pds-tooltip.entry.js +4 -4
  228. package/dist/esm/pine-core.js +4 -4
  229. package/dist/esm-es5/attributes-WXw_I_uJ.js +1 -0
  230. package/dist/esm-es5/{index-2HMD-zUO.js → index-Cw9J31qd.js} +2 -2
  231. package/dist/esm-es5/index.js +1 -1
  232. package/dist/esm-es5/keep-hydrated-BLG6RDBt.js +1 -0
  233. package/dist/esm-es5/loader.js +1 -1
  234. package/dist/esm-es5/mock-pds-modal.entry.js +1 -1
  235. package/dist/esm-es5/pds-accordion.entry.js +1 -1
  236. package/dist/esm-es5/pds-alert.entry.js +1 -1
  237. package/dist/esm-es5/pds-avatar.entry.js +1 -1
  238. package/dist/esm-es5/pds-box.entry.js +1 -1
  239. package/dist/esm-es5/pds-button.entry.js +1 -1
  240. package/dist/esm-es5/pds-checkbox.entry.js +1 -1
  241. package/dist/esm-es5/pds-chip.entry.js +1 -1
  242. package/dist/esm-es5/pds-combobox.entry.js +2 -2
  243. package/dist/esm-es5/pds-container.entry.js +1 -1
  244. package/dist/esm-es5/pds-copytext.entry.js +1 -1
  245. package/dist/esm-es5/pds-datepicker.entry.js +1 -1
  246. package/dist/esm-es5/pds-divider.entry.js +1 -1
  247. package/dist/esm-es5/pds-drawer-content.entry.js +1 -1
  248. package/dist/esm-es5/pds-drawer-footer.entry.js +1 -1
  249. package/dist/esm-es5/pds-drawer-header.entry.js +1 -1
  250. package/dist/esm-es5/pds-drawer.entry.js +1 -1
  251. package/dist/esm-es5/pds-dropdown-menu-item.entry.js +1 -1
  252. package/dist/esm-es5/pds-dropdown-menu-separator.entry.js +1 -1
  253. package/dist/esm-es5/pds-dropdown-menu.entry.js +1 -1
  254. package/dist/esm-es5/pds-filter.entry.js +1 -1
  255. package/dist/esm-es5/pds-filters.entry.js +1 -1
  256. package/dist/esm-es5/pds-icon.entry.js +1 -1
  257. package/dist/esm-es5/pds-image.entry.js +1 -1
  258. package/dist/esm-es5/pds-input.entry.js +1 -1
  259. package/dist/esm-es5/pds-link.entry.js +1 -1
  260. package/dist/esm-es5/pds-loader.entry.js +1 -1
  261. package/dist/esm-es5/pds-modal-content.entry.js +1 -1
  262. package/dist/esm-es5/pds-modal-footer.entry.js +1 -1
  263. package/dist/esm-es5/pds-modal-header.entry.js +1 -1
  264. package/dist/esm-es5/pds-modal.entry.js +1 -1
  265. package/dist/esm-es5/pds-multiselect.entry.js +1 -1
  266. package/dist/esm-es5/pds-popover.entry.js +1 -1
  267. package/dist/esm-es5/pds-progress.entry.js +1 -1
  268. package/dist/esm-es5/pds-property.entry.js +1 -1
  269. package/dist/esm-es5/pds-radio-group.entry.js +1 -1
  270. package/dist/esm-es5/pds-radio.entry.js +1 -1
  271. package/dist/esm-es5/pds-row.entry.js +1 -1
  272. package/dist/esm-es5/pds-select.entry.js +1 -1
  273. package/dist/esm-es5/pds-sortable-item.entry.js +1 -1
  274. package/dist/esm-es5/pds-sortable.entry.js +2 -2
  275. package/dist/esm-es5/pds-switch.entry.js +1 -1
  276. package/dist/esm-es5/pds-tab.entry.js +1 -1
  277. package/dist/esm-es5/pds-table-body.entry.js +1 -1
  278. package/dist/esm-es5/pds-table-cell.entry.js +1 -1
  279. package/dist/esm-es5/pds-table-head-cell.entry.js +1 -1
  280. package/dist/esm-es5/pds-table-head.entry.js +1 -1
  281. package/dist/esm-es5/pds-table-row.entry.js +1 -1
  282. package/dist/esm-es5/pds-table.entry.js +1 -1
  283. package/dist/esm-es5/pds-tabpanel.entry.js +1 -1
  284. package/dist/esm-es5/pds-tabs.entry.js +1 -1
  285. package/dist/esm-es5/pds-text.entry.js +1 -1
  286. package/dist/esm-es5/pds-textarea.entry.js +1 -1
  287. package/dist/esm-es5/pds-toast.entry.js +1 -1
  288. package/dist/esm-es5/pds-tooltip.entry.js +1 -1
  289. package/dist/esm-es5/pine-core.js +1 -1
  290. package/dist/pine-core/index.esm.js +1 -1
  291. package/dist/pine-core/{p-9a7ee7cb.system.entry.js → p-0092444c.system.entry.js} +1 -1
  292. package/dist/pine-core/{p-d576e542.system.entry.js → p-01aa382c.system.entry.js} +1 -1
  293. package/dist/pine-core/{p-d69cfaa4.entry.js → p-02088776.entry.js} +1 -1
  294. package/dist/pine-core/p-049f126a.entry.js +1 -0
  295. package/dist/pine-core/{p-8b9d8fb5.system.entry.js → p-080cb087.system.entry.js} +1 -1
  296. package/dist/pine-core/{p-99317375.system.entry.js → p-0913f696.system.entry.js} +1 -1
  297. package/dist/pine-core/{p-5737182f.entry.js → p-0a84d220.entry.js} +1 -1
  298. package/dist/pine-core/{p-4c9cccdb.system.entry.js → p-0b71ecb6.system.entry.js} +2 -2
  299. package/dist/pine-core/{p-37d73369.system.entry.js → p-1437585e.system.entry.js} +1 -1
  300. package/dist/pine-core/p-153ba77b.entry.js +1 -0
  301. package/dist/pine-core/{p-22f041ee.system.entry.js → p-1ee86d87.system.entry.js} +1 -1
  302. package/dist/pine-core/{p-5decd81f.entry.js → p-208c7dbf.entry.js} +1 -1
  303. package/dist/pine-core/p-21fe6ee1.system.entry.js +1 -0
  304. package/dist/pine-core/p-24fbbb74.system.entry.js +1 -0
  305. package/dist/pine-core/{p-51dff046.system.entry.js → p-258770cf.system.entry.js} +1 -1
  306. package/dist/pine-core/{p-1f2e5958.entry.js → p-258d5e83.entry.js} +1 -1
  307. package/dist/pine-core/{p-4e05a4f0.entry.js → p-26642718.entry.js} +1 -1
  308. package/dist/pine-core/{p-1b13f69c.system.entry.js → p-2ac2457b.system.entry.js} +1 -1
  309. package/dist/pine-core/p-2cb5483a.system.entry.js +1 -0
  310. package/dist/pine-core/{p-1f263c0b.system.entry.js → p-341c38f1.system.entry.js} +1 -1
  311. package/dist/pine-core/{p-bd7da23e.system.entry.js → p-3a959459.system.entry.js} +1 -1
  312. package/dist/pine-core/{p-1e464117.entry.js → p-432d5ec7.entry.js} +1 -1
  313. package/dist/pine-core/{p-0de74105.entry.js → p-4849fda7.entry.js} +1 -1
  314. package/dist/pine-core/{p-f30d6192.system.entry.js → p-4d03d1e2.system.entry.js} +1 -1
  315. package/dist/pine-core/{p-2cb02706.entry.js → p-4de8f333.entry.js} +1 -1
  316. package/dist/pine-core/{p-152245fa.system.entry.js → p-4f94b4f1.system.entry.js} +1 -1
  317. package/dist/pine-core/{p-66cfef6d.system.entry.js → p-4fa63723.system.entry.js} +1 -1
  318. package/dist/pine-core/p-4fd454f6.entry.js +1 -0
  319. package/dist/pine-core/{p-70c6f0ed.system.entry.js → p-5442d983.system.entry.js} +1 -1
  320. package/dist/pine-core/{p-8027db25.entry.js → p-550c2fd3.entry.js} +1 -1
  321. package/dist/pine-core/{p-7d01e719.entry.js → p-55224683.entry.js} +1 -1
  322. package/dist/pine-core/{p-65e30a4c.entry.js → p-57a2f927.entry.js} +1 -1
  323. package/dist/pine-core/{p-721297b5.system.entry.js → p-5870b092.system.entry.js} +1 -1
  324. package/dist/pine-core/p-5a10784e.system.entry.js +3 -0
  325. package/dist/pine-core/{p-6d83ad2d.system.entry.js → p-5c90091e.system.entry.js} +1 -1
  326. package/dist/pine-core/p-602c197f.entry.js +1 -0
  327. package/dist/pine-core/{p-45fcc5b7.entry.js → p-6bf853c9.entry.js} +1 -1
  328. package/dist/pine-core/{p-5d014059.entry.js → p-6d3610f9.entry.js} +1 -1
  329. package/dist/pine-core/{p-343546b1.system.entry.js → p-6eec23a7.system.entry.js} +1 -1
  330. package/dist/pine-core/{p-5132b8a1.entry.js → p-72865997.entry.js} +1 -1
  331. package/dist/pine-core/p-74a05bcc.entry.js +1 -0
  332. package/dist/pine-core/p-75ee0403.entry.js +1 -0
  333. package/dist/pine-core/p-77395d62.system.entry.js +1 -0
  334. package/dist/pine-core/p-7a287635.system.entry.js +1 -0
  335. package/dist/pine-core/p-7a5b21d2.system.entry.js +1 -0
  336. package/dist/pine-core/{p-a83a6618.system.entry.js → p-7bf6563a.system.entry.js} +1 -1
  337. package/dist/pine-core/{p-71e3a89e.system.entry.js → p-8191498f.system.entry.js} +1 -1
  338. package/dist/pine-core/{p-0166c620.entry.js → p-82cf4ec6.entry.js} +1 -1
  339. package/dist/pine-core/{p-16c2aa63.entry.js → p-84e9b7da.entry.js} +1 -1
  340. package/dist/pine-core/{p-bdf68e53.system.entry.js → p-86040cac.system.entry.js} +1 -1
  341. package/dist/pine-core/p-875b0436.system.entry.js +1 -0
  342. package/dist/pine-core/{p-87f91e02.system.entry.js → p-8c8cc079.system.entry.js} +1 -1
  343. package/dist/pine-core/{p-ba1b79c7.system.entry.js → p-8cc302aa.system.entry.js} +1 -1
  344. package/dist/pine-core/{p-5b7f7760.entry.js → p-8d292b48.entry.js} +1 -1
  345. package/dist/pine-core/{p-650ccffb.entry.js → p-8f531063.entry.js} +1 -1
  346. package/dist/pine-core/p-9109b90a.entry.js +1 -0
  347. package/dist/pine-core/p-92ae6082.entry.js +1 -0
  348. package/dist/pine-core/p-94593f20.system.entry.js +1 -0
  349. package/dist/pine-core/p-945fb0b1.entry.js +1 -0
  350. package/dist/pine-core/{p-04fe5da7.system.entry.js → p-9880d251.system.entry.js} +1 -1
  351. package/dist/pine-core/p-99459e27.entry.js +1 -0
  352. package/dist/pine-core/{p-9835c74b.entry.js → p-9ab95438.entry.js} +1 -1
  353. package/dist/pine-core/{p-a6d09102.system.entry.js → p-9af131d6.system.entry.js} +1 -1
  354. package/dist/pine-core/{p-59491f98.entry.js → p-9dcd2cdb.entry.js} +1 -1
  355. package/dist/pine-core/{p-c00e46a5.system.entry.js → p-9e0f920a.system.entry.js} +1 -1
  356. package/dist/pine-core/p-BGLP3keB.js +1 -0
  357. package/dist/pine-core/p-BLG6RDBt.js +1 -0
  358. package/dist/pine-core/p-BR5nujVX.system.js +1 -0
  359. package/dist/pine-core/{p-BJlg6wq7.system.js → p-CGRdQc49.system.js} +2 -2
  360. package/dist/pine-core/{p-DeIDZHrg.js → p-CmSJytt1.js} +2 -2
  361. package/dist/pine-core/p-CuSNnuFu.system.js +1 -0
  362. package/dist/pine-core/{p-YQa3CeL9.system.js → p-Cy8cvR7I.system.js} +1 -1
  363. package/dist/pine-core/p-XW4H0W6i.system.js +1 -0
  364. package/dist/pine-core/p-a0344e30.entry.js +2 -0
  365. package/dist/pine-core/p-a0960b3d.system.entry.js +1 -0
  366. package/dist/pine-core/p-a1230a74.system.entry.js +1 -0
  367. package/dist/pine-core/{p-fbea5703.entry.js → p-a19cd59c.entry.js} +1 -1
  368. package/dist/pine-core/p-a787b34a.system.entry.js +1 -0
  369. package/dist/pine-core/p-a826f290.entry.js +1 -0
  370. package/dist/pine-core/{p-1ec4eeaf.system.entry.js → p-a85a6ab9.system.entry.js} +1 -1
  371. package/dist/pine-core/p-acce8eb2.entry.js +1 -0
  372. package/dist/pine-core/p-b1548a20.entry.js +1 -0
  373. package/dist/pine-core/p-b60ac7eb.system.entry.js +1 -0
  374. package/dist/pine-core/{p-93877d4a.entry.js → p-b69f04b7.entry.js} +1 -1
  375. package/dist/pine-core/p-b75b0d09.system.entry.js +1 -0
  376. package/dist/pine-core/{p-02857936.entry.js → p-b8e8a4ce.entry.js} +1 -1
  377. package/dist/pine-core/{p-622e91e3.entry.js → p-b914dde8.entry.js} +2 -2
  378. package/dist/pine-core/{p-5bc670be.system.entry.js → p-ba1f65c2.system.entry.js} +1 -1
  379. package/dist/pine-core/p-bb68431a.entry.js +1 -0
  380. package/dist/pine-core/{p-c8e89b61.system.entry.js → p-bd67156b.system.entry.js} +1 -1
  381. package/dist/pine-core/{p-db4319fd.entry.js → p-beb23781.entry.js} +1 -1
  382. package/dist/pine-core/p-bf30dec0.entry.js +1 -0
  383. package/dist/pine-core/p-bf5887e8.system.entry.js +1 -0
  384. package/dist/pine-core/{p-91f712f4.system.entry.js → p-bf7ee3b7.system.entry.js} +1 -1
  385. package/dist/pine-core/{p-b5838211.system.entry.js → p-c5c9ed36.system.entry.js} +1 -1
  386. package/dist/pine-core/{p-21115986.system.entry.js → p-cb6a3e4c.system.entry.js} +1 -1
  387. package/dist/pine-core/{p-1cf1fced.entry.js → p-cde8eb81.entry.js} +1 -1
  388. package/dist/pine-core/{p-1d75a9b1.system.entry.js → p-cf08a6dd.system.entry.js} +1 -1
  389. package/dist/pine-core/p-cfd012d4.entry.js +1 -0
  390. package/dist/pine-core/{p-5e8d73d4.entry.js → p-d2c91e7a.entry.js} +1 -1
  391. package/dist/pine-core/{p-7bbfb965.system.entry.js → p-db17c626.system.entry.js} +1 -1
  392. package/dist/pine-core/p-e0917a26.entry.js +1 -0
  393. package/dist/pine-core/p-e21ff692.entry.js +1 -0
  394. package/dist/pine-core/p-e5420660.entry.js +1 -0
  395. package/dist/pine-core/{p-585832b1.entry.js → p-e800a2b1.entry.js} +1 -1
  396. package/dist/pine-core/{p-8b0fbeb3.entry.js → p-e836a041.entry.js} +1 -1
  397. package/dist/pine-core/{p-506d3e80.entry.js → p-e8cb76e8.entry.js} +1 -1
  398. package/dist/pine-core/p-ea4d4741.system.entry.js +1 -0
  399. package/dist/pine-core/{p-419f57c9.entry.js → p-eb5465ce.entry.js} +1 -1
  400. package/dist/pine-core/{p-63119d23.entry.js → p-ebd0bff2.entry.js} +1 -1
  401. package/dist/pine-core/p-f029b7da.system.entry.js +1 -0
  402. package/dist/pine-core/{p-e337f32c.system.entry.js → p-f0d24298.system.entry.js} +1 -1
  403. package/dist/pine-core/{p-9b9f66b7.entry.js → p-f1702281.entry.js} +1 -1
  404. package/dist/pine-core/{p-238e5171.system.entry.js → p-f25e4731.system.entry.js} +1 -1
  405. package/dist/pine-core/{p-37d95be9.entry.js → p-f2c253d8.entry.js} +1 -1
  406. package/dist/pine-core/{p-a22091c4.system.entry.js → p-f77905aa.system.entry.js} +1 -1
  407. package/dist/pine-core/{p-bef04e15.system.entry.js → p-fc25b956.system.entry.js} +1 -1
  408. package/dist/pine-core/{p-f06ca8df.entry.js → p-ff3de72e.entry.js} +1 -1
  409. package/dist/pine-core/pine-core.esm.js +1 -1
  410. package/dist/pine-core/pine-core.js +1 -1
  411. package/dist/types/components/pds-combobox/combobox-interface.d.ts +8 -1
  412. package/dist/types/components/pds-combobox/grouped-options-panel.d.ts +7 -1
  413. package/dist/types/components/pds-combobox/pds-combobox.d.ts +32 -0
  414. package/dist/types/components/pds-drawer/pds-drawer.d.ts +21 -9
  415. package/dist/types/components/pds-dropdown-menu/pds-dropdown-menu.d.ts +5 -0
  416. package/dist/types/components/pds-modal/pds-modal.d.ts +10 -3
  417. package/dist/types/components/pds-multiselect/pds-multiselect.d.ts +2 -1
  418. package/dist/types/components/pds-popover/pds-popover.d.ts +31 -1
  419. package/dist/types/components/pds-tabs/pds-tab/pds-tab.d.ts +3 -0
  420. package/dist/types/components/pds-tabs/pds-tabpanel/pds-tabpanel.d.ts +3 -0
  421. package/dist/types/components/pds-tabs/pds-tabs.d.ts +14 -2
  422. package/dist/types/components.d.ts +50 -35
  423. package/dist/types/utils/attributes.d.ts +2 -2
  424. package/dist/types/utils/css.d.ts +7 -0
  425. package/dist/types/utils/keep-hydrated.d.ts +29 -2
  426. package/dist/vscode.html-data.json +13 -6
  427. package/hydrate/index.js +961 -213
  428. package/hydrate/index.mjs +961 -213
  429. package/package.json +2 -2
  430. package/dist/cjs/keep-hydrated-iLS88j1Z.js +0 -67
  431. package/dist/esm/keep-hydrated-Dv7ssOTc.js +0 -63
  432. package/dist/esm-es5/attributes-CF5K2pxn.js +0 -1
  433. package/dist/esm-es5/keep-hydrated-Dv7ssOTc.js +0 -1
  434. package/dist/pine-core/p-1cd0acf0.system.entry.js +0 -1
  435. package/dist/pine-core/p-207c94da.entry.js +0 -1
  436. package/dist/pine-core/p-2357758d.system.entry.js +0 -1
  437. package/dist/pine-core/p-281efc69.entry.js +0 -1
  438. package/dist/pine-core/p-2ac9e90a.system.entry.js +0 -1
  439. package/dist/pine-core/p-2f539379.system.entry.js +0 -3
  440. package/dist/pine-core/p-347ae53c.system.entry.js +0 -1
  441. package/dist/pine-core/p-34b575b6.entry.js +0 -2
  442. package/dist/pine-core/p-3b1d8fae.entry.js +0 -1
  443. package/dist/pine-core/p-4414d442.system.entry.js +0 -1
  444. package/dist/pine-core/p-4e67e68e.entry.js +0 -1
  445. package/dist/pine-core/p-539ef98c.entry.js +0 -1
  446. package/dist/pine-core/p-56576b6e.entry.js +0 -1
  447. package/dist/pine-core/p-5ac84b2f.entry.js +0 -1
  448. package/dist/pine-core/p-63854c10.system.entry.js +0 -1
  449. package/dist/pine-core/p-73bc6e9f.system.entry.js +0 -1
  450. package/dist/pine-core/p-798839f7.system.entry.js +0 -1
  451. package/dist/pine-core/p-7e115d33.system.entry.js +0 -1
  452. package/dist/pine-core/p-834c678e.system.entry.js +0 -1
  453. package/dist/pine-core/p-912487fa.entry.js +0 -1
  454. package/dist/pine-core/p-969488f5.system.entry.js +0 -1
  455. package/dist/pine-core/p-9bcdfac2.entry.js +0 -1
  456. package/dist/pine-core/p-9d33bb05.entry.js +0 -1
  457. package/dist/pine-core/p-BMFBF3sJ.system.js +0 -1
  458. package/dist/pine-core/p-D2MUS7JO.js +0 -1
  459. package/dist/pine-core/p-D2yHYrxQ.system.js +0 -1
  460. package/dist/pine-core/p-Dv7ssOTc.js +0 -1
  461. package/dist/pine-core/p-TyevV8iv.system.js +0 -1
  462. package/dist/pine-core/p-afd5e2d7.entry.js +0 -1
  463. package/dist/pine-core/p-bde53290.system.entry.js +0 -1
  464. package/dist/pine-core/p-bf1aea9f.system.entry.js +0 -1
  465. package/dist/pine-core/p-c9395f43.system.entry.js +0 -1
  466. package/dist/pine-core/p-d5dd5599.entry.js +0 -1
  467. package/dist/pine-core/p-dc81ffff.entry.js +0 -1
  468. package/dist/pine-core/p-e46f7541.system.entry.js +0 -1
  469. package/dist/pine-core/p-e7ba30dd.system.entry.js +0 -1
  470. package/dist/pine-core/p-ed3dd3d2.entry.js +0 -1
  471. package/dist/pine-core/p-eee4f146.entry.js +0 -1
  472. package/dist/pine-core/p-f01e35e2.entry.js +0 -1
  473. package/dist/pine-core/p-f2e0da9a.entry.js +0 -1
  474. package/dist/pine-core/p-fc6ac917.entry.js +0 -1
  475. package/dist/pine-core/p-ffe276ef.entry.js +0 -1
  476. /package/dist/esm-es5/{index-DxI-61GK.js → index-BJXk71tO.js} +0 -0
  477. /package/dist/pine-core/{p-DxI-61GK.js → p-BJXk71tO.js} +0 -0
  478. /package/dist/pine-core/{p-CnO10OxH.system.js → p-n3_ytl_p.system.js} +0 -0
@@ -1 +1 @@
1
- import{proxyCustomElement as t,HTMLElement as e,createEvent as a,h as i,Fragment as s,Host as o,transformTag as d}from"@stencil/core/internal/client";import{u as n}from"./reconnected-content.js";const r=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.pdsTabClick=a(this,"pdsTabClick",7),this.disabled=!1,this.active=!1,this.selected=!1}componentDidRender(){n(this.el.querySelector(".pds-tab__content"),"a.pds-tab, button.pds-tab",".pds-tab__content")}onTabClick(t,e){this.disabled||this.pdsTabClick.emit([t,e])}get hasHref(){return null!=this.href&&""!==this.href}get isNav(){var t;return null!==(t=this.navMode)&&void 0!==t?t:this.hasHref}get isActive(){return this.isNav?this.active:this.selected}classNames(){return["pds-tab",this.isActive&&"is-active",this.disabled&&"is-disabled"].filter(Boolean).join(" ")}render(){const t=i("span",{class:"pds-tab-edge",role:"presentation"}),e=i("span",{class:"pds-tab-edge pds-tab-edge--end",role:"presentation"}),a=i(s,null,"availability"===this.variant&&t,"availability"===this.variant&&e,i("div",{class:"pds-tab__content"},i("slot",null)));return i(o,{variant:this.variant,slot:"tabs",index:this.index},this.isNav?i("a",{href:this.disabled||!this.hasHref?void 0:this.href,role:this.disabled||!this.hasHref?"link":void 0,id:this.parentComponentId+"__"+this.name,class:this.classNames(),target:this.target,rel:"_blank"===this.target?"noopener noreferrer":void 0,"aria-current":this.isActive?"page":void 0,"aria-disabled":this.disabled?"true":null,"data-turbo-frame":this.turboFrame||void 0,"data-turbo-action":this.turboAction||void 0},a):i("button",{role:"tab",id:this.parentComponentId+"__"+this.name,"aria-controls":this.parentComponentId+"__"+this.name+"-panel",tabindex:this.disabled?"-1":this.selected?"0":"-1","aria-selected":this.selected?"true":"false","aria-disabled":this.disabled?"true":null,disabled:this.disabled,class:this.classNames(),onClick:this.onTabClick.bind(this,this.index,this.parentComponentId)},a))}get el(){return this}static get style(){return'pds-tab{-ms-flex-align:center;align-items:center;display:-ms-inline-flexbox;display:inline-flex;position:relative}.pds-tabs--pill pds-tab{-ms-flex:1;flex:1}.pds-tab{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;border:var(--pine-border-width-none);-webkit-box-shadow:none;box-shadow:none;color:inherit;cursor:pointer;font-family:inherit;padding:var(--pine-dimension-none);-ms-flex-align:center;align-items:center;color:var(--pine-color-text-secondary);display:-ms-inline-flexbox;display:inline-flex;position:relative;text-decoration:none;white-space:nowrap}.pds-tab.is-active,.pds-tab[aria-selected=true]{color:var(--pine-color-text)}.pds-tab.is-active .pds-tab__content::after,.pds-tab[aria-selected=true] .pds-tab__content::after{opacity:1}.pds-tab:hover:not(:disabled,.is-disabled){color:var(--pine-color-text)}.pds-tab:focus{outline:none}.pds-tab:focus-visible{outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}.pds-tab:disabled,.pds-tab.is-disabled{color:var(--pine-color-text-disabled);cursor:not-allowed}.pds-tab .pds-tab__content{font-family:var(--pine-font-family-body);font-size:var(--pine-font-size);font-weight:var(--pine-font-weight-medium);letter-spacing:var(--pine-letter-spacing);line-height:var(--pine-line-height-body);-webkit-padding-after:11px;padding-block-end:11px;position:relative}.pds-tab .pds-tab__content::after{background-color:var(--pine-color-brand);content:"";height:3px;inset-block-end:var(--pine-dimension-none);inset-inline-end:var(--pine-dimension-none);inset-inline-start:var(--pine-dimension-none);opacity:0;position:absolute}.pds-tab .pds-tab-edge{display:none}.pds-tabs--availability{--color-background-tab:transparent}.pds-tabs--availability .pds-tab{background-color:var(--color-background-tab);border-radius:calc(var(--pine-dimension-xs) * 1.25) calc(var(--pine-dimension-xs) * 1.25) var(--pine-dimension-none) var(--pine-dimension-none);color:var(--pine-color-text-secondary);padding:8px 16px 13px}.pds-tabs--availability .pds-tab.is-active,.pds-tabs--availability .pds-tab[aria-selected=true]{--color-background-tab:var(--pine-color-secondary);color:var(--pine-color-text)}.pds-tabs--availability .pds-tab.is-active .pds-tab__content::after,.pds-tabs--availability .pds-tab[aria-selected=true] .pds-tab__content::after{opacity:1}.pds-tabs--availability .pds-tab.is-active .pds-tab-edge,.pds-tabs--availability .pds-tab[aria-selected=true] .pds-tab-edge{z-index:var(--pine-z-index-raised)}.pds-tabs--availability .pds-tab:hover:not(.is-active,[aria-selected=true],:disabled,.is-disabled){--color-background-tab:var(--pine-color-secondary-hover);color:var(--pine-color-text)}.pds-tabs--availability .pds-tab:focus-visible{color:var(--pine-color-text-secondary)}.pds-tabs--availability .pds-tab:disabled,.pds-tabs--availability .pds-tab.is-disabled{--color-background-tab:transparent;color:var(--pine-color-text-disabled)}.pds-tabs--availability .pds-tab__content{-webkit-padding-after:7px;padding-block-end:7px}.pds-tabs--availability .pds-tab-edge{bottom:0;display:block;height:8px;inset-inline-end:100%;overflow:hidden;position:absolute;width:8px}.pds-tabs--availability .pds-tab-edge::before{border-radius:50%;bottom:0;-webkit-box-shadow:4px 4px 0 0 var(--color-background-tab);box-shadow:4px 4px 0 0 var(--color-background-tab);content:"";display:block;height:200%;inset-inline-end:0;position:absolute;width:200%}.pds-tabs--availability .pds-tab-edge--end{inset-inline-end:unset;inset-inline-start:100%}.pds-tabs--availability .pds-tab-edge--end::before{-webkit-box-shadow:-4px 4px 0 0 var(--color-background-tab);box-shadow:-4px 4px 0 0 var(--color-background-tab);inset-inline-end:unset;inset-inline-start:0}.pds-tabs--filter .pds-tab{background-color:var(--pine-color-background-muted);border-radius:50px;color:var(--pine-color-text);padding:6px 15px}.pds-tabs--filter .pds-tab.is-active,.pds-tabs--filter .pds-tab[aria-selected=true]{background-color:var(--pine-color-primary);color:var(--pine-color-text-primary)}.pds-tabs--filter .pds-tab.is-active:hover:not(:disabled,.is-disabled),.pds-tabs--filter .pds-tab[aria-selected=true]:hover:not(:disabled,.is-disabled){background-color:var(--pine-color-primary-hover)}.pds-tabs--filter .pds-tab:hover:not(.is-active,[aria-selected=true],:disabled,.is-disabled){background-color:var(--pine-color-border-disabled)}.pds-tabs--filter .pds-tab:disabled,.pds-tabs--filter .pds-tab.is-disabled{background-color:transparent;color:var(--pine-color-text-disabled)}.pds-tabs--filter .pds-tab:disabled.is-active,.pds-tabs--filter .pds-tab:disabled[aria-selected=true],.pds-tabs--filter .pds-tab.is-disabled.is-active,.pds-tabs--filter .pds-tab.is-disabled[aria-selected=true]{background-color:var(--pine-color-primary-disabled)}.pds-tabs--filter .pds-tab__content{-webkit-padding-after:var(--pine-dimension-none);padding-block-end:var(--pine-dimension-none)}.pds-tabs--filter .pds-tab__content::after{content:unset}.pds-tabs--pill{--color-background-tab:transparent}.pds-tabs--pill .pds-tab{background-color:var(--color-background-tab);border:var(--pine-border-width-thin) solid transparent;border-radius:var(--pine-dimension-xs);color:var(--pine-color-text-muted);-ms-flex:1;flex:1;height:34px;-ms-flex-pack:center;justify-content:center}.pds-tabs--pill .pds-tab .pds-tab__content{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-webkit-padding-after:0;padding-block-end:0}.pds-tabs--pill .pds-tab.is-active,.pds-tabs--pill .pds-tab[aria-selected=true]{--color-background-tab:var(--pine-color-background-container);border-color:var(--pine-color-border);-webkit-box-shadow:var(--pine-box-shadow-100);box-shadow:var(--pine-box-shadow-100);color:var(--pine-color-text-active)}.pds-tabs--pill .pds-tab.is-active:focus-visible,.pds-tabs--pill .pds-tab[aria-selected=true]:focus-visible{border-color:var(--color-border-focus);outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}.pds-tabs--pill .pds-tab.is-active,.pds-tabs--pill .pds-tab[aria-selected=true]{}.pds-tabs--pill .pds-tab.is-active .pds-tab__content::after,.pds-tabs--pill .pds-tab[aria-selected=true] .pds-tab__content::after{opacity:0}.pds-tabs--pill .pds-tab.is-active,.pds-tabs--pill .pds-tab[aria-selected=true]{}.pds-tabs--pill .pds-tab:disabled,.pds-tabs--pill .pds-tab.is-disabled{color:var(--pine-color-text-disabled)}'}},[260,"pds-tab",{disabled:[4],href:[1],active:[4],target:[1],turboFrame:[1,"turbo-frame"],turboAction:[1,"turbo-action"],name:[1],parentComponentId:[1,"parent-component-id"],variant:[1],index:[2],selected:[4],navMode:[4,"nav-mode"]}]),l=r,b=function(){"undefined"!=typeof customElements&&["pds-tab"].forEach((t=>{"pds-tab"===t&&(customElements.get(d(t))||customElements.define(d(t),r))}))};export{l as PdsTab,b as defineCustomElement}
1
+ import{proxyCustomElement as t,HTMLElement as e,createEvent as a,h as i,Fragment as s,Host as o,transformTag as d}from"@stencil/core/internal/client";import{H as n}from"./attributes.js";import{u as r}from"./reconnected-content.js";const l=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.pdsTabClick=a(this,"pdsTabClick",7),this.hostKeeper=new n,this.disabled=!1,this.active=!1,this.selected=!1}connectedCallback(){this.hostKeeper.connect(this.el)}disconnectedCallback(){this.hostKeeper.disconnect()}componentDidRender(){r(this.el.querySelector(".pds-tab__content"),"a.pds-tab, button.pds-tab",".pds-tab__content")}onTabClick(t,e){this.disabled||this.pdsTabClick.emit([t,e])}get hasHref(){return null!=this.href&&""!==this.href}get isNav(){var t;return null!==(t=this.navMode)&&void 0!==t?t:this.hasHref}get isActive(){return this.isNav?this.active:this.selected}classNames(){return["pds-tab",this.isActive&&"is-active",this.disabled&&"is-disabled"].filter(Boolean).join(" ")}render(){this.hostKeeper.record("",{},{slot:"tabs"});const t=i("span",{class:"pds-tab-edge",role:"presentation"}),e=i("span",{class:"pds-tab-edge pds-tab-edge--end",role:"presentation"}),a=i(s,null,"availability"===this.variant&&t,"availability"===this.variant&&e,i("div",{class:"pds-tab__content"},i("slot",null)));return i(o,{variant:this.variant,slot:"tabs",index:this.index},this.isNav?i("a",{href:this.disabled||!this.hasHref?void 0:this.href,role:this.disabled||!this.hasHref?"link":void 0,id:this.parentComponentId+"__"+this.name,class:this.classNames(),target:this.target,rel:"_blank"===this.target?"noopener noreferrer":void 0,"aria-current":this.isActive?"page":void 0,"aria-disabled":this.disabled?"true":null,"data-turbo-frame":this.turboFrame||void 0,"data-turbo-action":this.turboAction||void 0},a):i("button",{role:"tab",id:this.parentComponentId+"__"+this.name,"aria-controls":this.parentComponentId+"__"+this.name+"-panel",tabindex:this.disabled?"-1":this.selected?"0":"-1","aria-selected":this.selected?"true":"false","aria-disabled":this.disabled?"true":null,disabled:this.disabled,class:this.classNames(),onClick:this.onTabClick.bind(this,this.index,this.parentComponentId)},a))}get el(){return this}static get style(){return'pds-tab{-ms-flex-align:center;align-items:center;display:-ms-inline-flexbox;display:inline-flex;position:relative}.pds-tabs--pill pds-tab{-ms-flex:1;flex:1}.pds-tab{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;border:var(--pine-border-width-none);-webkit-box-shadow:none;box-shadow:none;color:inherit;cursor:pointer;font-family:inherit;padding:var(--pine-dimension-none);-ms-flex-align:center;align-items:center;color:var(--pine-color-text-secondary);display:-ms-inline-flexbox;display:inline-flex;position:relative;text-decoration:none;white-space:nowrap}.pds-tab.is-active,.pds-tab[aria-selected=true]{color:var(--pine-color-text)}.pds-tab.is-active .pds-tab__content::after,.pds-tab[aria-selected=true] .pds-tab__content::after{opacity:1}.pds-tab:hover:not(:disabled,.is-disabled){color:var(--pine-color-text)}.pds-tab:focus{outline:none}.pds-tab:focus-visible{outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}.pds-tab:disabled,.pds-tab.is-disabled{color:var(--pine-color-text-disabled);cursor:not-allowed}.pds-tab .pds-tab__content{font-family:var(--pine-font-family-body);font-size:var(--pine-font-size);font-weight:var(--pine-font-weight-medium);letter-spacing:var(--pine-letter-spacing);line-height:var(--pine-line-height-body);-webkit-padding-after:11px;padding-block-end:11px;position:relative}.pds-tab .pds-tab__content::after{background-color:var(--pine-color-brand);content:"";height:3px;inset-block-end:var(--pine-dimension-none);inset-inline-end:var(--pine-dimension-none);inset-inline-start:var(--pine-dimension-none);opacity:0;position:absolute}.pds-tab .pds-tab-edge{display:none}.pds-tabs--availability{--color-background-tab:transparent}.pds-tabs--availability .pds-tab{background-color:var(--color-background-tab);border-radius:calc(var(--pine-dimension-xs) * 1.25) calc(var(--pine-dimension-xs) * 1.25) var(--pine-dimension-none) var(--pine-dimension-none);color:var(--pine-color-text-secondary);padding:8px 16px 13px}.pds-tabs--availability .pds-tab.is-active,.pds-tabs--availability .pds-tab[aria-selected=true]{--color-background-tab:var(--pine-color-secondary);color:var(--pine-color-text)}.pds-tabs--availability .pds-tab.is-active .pds-tab__content::after,.pds-tabs--availability .pds-tab[aria-selected=true] .pds-tab__content::after{opacity:1}.pds-tabs--availability .pds-tab.is-active .pds-tab-edge,.pds-tabs--availability .pds-tab[aria-selected=true] .pds-tab-edge{z-index:var(--pine-z-index-raised)}.pds-tabs--availability .pds-tab:hover:not(.is-active,[aria-selected=true],:disabled,.is-disabled){--color-background-tab:var(--pine-color-secondary-hover);color:var(--pine-color-text)}.pds-tabs--availability .pds-tab:focus-visible{color:var(--pine-color-text-secondary)}.pds-tabs--availability .pds-tab:disabled,.pds-tabs--availability .pds-tab.is-disabled{--color-background-tab:transparent;color:var(--pine-color-text-disabled)}.pds-tabs--availability .pds-tab__content{-webkit-padding-after:7px;padding-block-end:7px}.pds-tabs--availability .pds-tab-edge{bottom:0;display:block;height:8px;inset-inline-end:100%;overflow:hidden;position:absolute;width:8px}.pds-tabs--availability .pds-tab-edge::before{border-radius:50%;bottom:0;-webkit-box-shadow:4px 4px 0 0 var(--color-background-tab);box-shadow:4px 4px 0 0 var(--color-background-tab);content:"";display:block;height:200%;inset-inline-end:0;position:absolute;width:200%}.pds-tabs--availability .pds-tab-edge--end{inset-inline-end:unset;inset-inline-start:100%}.pds-tabs--availability .pds-tab-edge--end::before{-webkit-box-shadow:-4px 4px 0 0 var(--color-background-tab);box-shadow:-4px 4px 0 0 var(--color-background-tab);inset-inline-end:unset;inset-inline-start:0}.pds-tabs--filter .pds-tab{background-color:var(--pine-color-background-muted);border-radius:50px;color:var(--pine-color-text);padding:6px 15px}.pds-tabs--filter .pds-tab.is-active,.pds-tabs--filter .pds-tab[aria-selected=true]{background-color:var(--pine-color-primary);color:var(--pine-color-text-primary)}.pds-tabs--filter .pds-tab.is-active:hover:not(:disabled,.is-disabled),.pds-tabs--filter .pds-tab[aria-selected=true]:hover:not(:disabled,.is-disabled){background-color:var(--pine-color-primary-hover)}.pds-tabs--filter .pds-tab:hover:not(.is-active,[aria-selected=true],:disabled,.is-disabled){background-color:var(--pine-color-border-disabled)}.pds-tabs--filter .pds-tab:disabled,.pds-tabs--filter .pds-tab.is-disabled{background-color:transparent;color:var(--pine-color-text-disabled)}.pds-tabs--filter .pds-tab:disabled.is-active,.pds-tabs--filter .pds-tab:disabled[aria-selected=true],.pds-tabs--filter .pds-tab.is-disabled.is-active,.pds-tabs--filter .pds-tab.is-disabled[aria-selected=true]{background-color:var(--pine-color-primary-disabled)}.pds-tabs--filter .pds-tab__content{-webkit-padding-after:var(--pine-dimension-none);padding-block-end:var(--pine-dimension-none)}.pds-tabs--filter .pds-tab__content::after{content:unset}.pds-tabs--pill{--color-background-tab:transparent}.pds-tabs--pill .pds-tab{background-color:var(--color-background-tab);border:var(--pine-border-width-thin) solid transparent;border-radius:var(--pine-dimension-xs);color:var(--pine-color-text-muted);-ms-flex:1;flex:1;height:34px;-ms-flex-pack:center;justify-content:center}.pds-tabs--pill .pds-tab .pds-tab__content{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-webkit-padding-after:0;padding-block-end:0}.pds-tabs--pill .pds-tab.is-active,.pds-tabs--pill .pds-tab[aria-selected=true]{--color-background-tab:var(--pine-color-background-container);border-color:var(--pine-color-border);-webkit-box-shadow:var(--pine-box-shadow-100);box-shadow:var(--pine-box-shadow-100);color:var(--pine-color-text-active)}.pds-tabs--pill .pds-tab.is-active:focus-visible,.pds-tabs--pill .pds-tab[aria-selected=true]:focus-visible{border-color:var(--color-border-focus);outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}.pds-tabs--pill .pds-tab.is-active,.pds-tabs--pill .pds-tab[aria-selected=true]{}.pds-tabs--pill .pds-tab.is-active .pds-tab__content::after,.pds-tabs--pill .pds-tab[aria-selected=true] .pds-tab__content::after{opacity:0}.pds-tabs--pill .pds-tab.is-active,.pds-tabs--pill .pds-tab[aria-selected=true]{}.pds-tabs--pill .pds-tab:disabled,.pds-tabs--pill .pds-tab.is-disabled{color:var(--pine-color-text-disabled)}'}},[260,"pds-tab",{disabled:[4],href:[1],active:[4],target:[1],turboFrame:[1,"turbo-frame"],turboAction:[1,"turbo-action"],name:[1],parentComponentId:[1,"parent-component-id"],variant:[1],index:[2],selected:[4],navMode:[4,"nav-mode"]}]),b=l,p=function(){"undefined"!=typeof customElements&&["pds-tab"].forEach((t=>{"pds-tab"===t&&(customElements.get(d(t))||customElements.define(d(t),l))}))};export{b as PdsTab,p as defineCustomElement}
@@ -1 +1 @@
1
- import{proxyCustomElement as e,HTMLElement as t,h as o,Host as r,transformTag as s}from"@stencil/core/internal/client";const d=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}render(){return o(r,{key:"0278bf4c680e9054748039dddbbb5cfcce3bb4e6",role:"rowgroup",part:"body"},o("slot",{key:"44cf68f3b0dff78312a3d31d898209544ce8131e"}))}static get style(){return":host{border-color:inherit;display:table-row-group;vertical-align:middle}"}},[257,"pds-table-body"]),c=d,l=function(){"undefined"!=typeof customElements&&["pds-table-body"].forEach((e=>{"pds-table-body"===e&&(customElements.get(s(e))||customElements.define(s(e),d))}))};export{c as PdsTableBody,l as defineCustomElement}
1
+ import{proxyCustomElement as e,HTMLElement as t,h as o,Host as r,transformTag as s}from"@stencil/core/internal/client";const c=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}render(){return o(r,{key:"817532e93c8f91ef64cd0f90aa6c4372c3b7d83f",role:"rowgroup",part:"body"},o("slot",{key:"296ba876c6716e85252a06008bd55d59624223e3"}))}static get style(){return":host{border-color:inherit;display:table-row-group;vertical-align:middle}"}},[257,"pds-table-body"]),d=c,l=function(){"undefined"!=typeof customElements&&["pds-table-body"].forEach((e=>{"pds-table-body"===e&&(customElements.get(s(e))||customElements.define(s(e),c))}))};export{d as PdsTableBody,l as defineCustomElement}
@@ -1 +1 @@
1
- import{proxyCustomElement as t,HTMLElement as i,h as e,Host as s,transformTag as n}from"@stencil/core/internal/client";import{i as l}from"./scroll.js";import{s as o}from"./truncation-tooltip.js";const a=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.scrollContainer=null,this.setupRetries=0,this.truncationCleanup=null,this.tableScrolling=!1,this.handleScroll=()=>{if(this.scrollContainer)try{this.tableScrolling=l(this.scrollContainer)}catch(t){console.warn("Scroll handler error:",t)}}}componentWillRender(){this.tableRef=this.hostElement.closest("pds-table")}componentDidLoad(){this.tableRef&&this.tableRef.responsive&&this.tableRef.fixedColumn&&this.setupScrollListener(),this.truncate&&this.initTruncationTooltip()}disconnectedCallback(){this.cleanupScrollListener(),this.destroyTruncationTooltip()}setupScrollListener(){var t;if(!this.tableRef)return;const i=null===(t=this.tableRef.shadowRoot)||void 0===t?void 0:t.querySelector(".pds-table-responsive-container");i?(this.scrollContainer=i,this.scrollContainer.addEventListener("scroll",this.handleScroll,{passive:!0}),this.handleScroll(),this.setupRetries=0):this.setupTimer=window.setTimeout((()=>{this.scrollContainer||(this.setupRetries=(this.setupRetries||0)+1,this.setupRetries<=50?this.setupScrollListener():console.warn("Failed to find responsive container after 50 attempts"))}),100)}cleanupScrollListener(){this.scrollContainer&&(this.scrollContainer.removeEventListener("scroll",this.handleScroll),this.scrollContainer=null),void 0!==this.setupTimer&&(window.clearTimeout(this.setupTimer),this.setupTimer=void 0),this.setupRetries=0}handleTruncateChange(t){t?this.initTruncationTooltip():this.destroyTruncationTooltip()}initTruncationTooltip(){this.destroyTruncationTooltip(),this.truncationCleanup=o({hostEl:this.hostElement,contentEl:this.hostElement,getTooltipText:()=>this.hostElement.textContent||""})}destroyTruncationTooltip(){this.truncationCleanup&&(this.truncationCleanup(),this.truncationCleanup=null)}classNames(){const t=[];return this.tableRef&&this.tableRef.compact&&t.push("is-compact"),this.cellAlign&&t.push(`pds-table-cell--align-${this.cellAlign}`),this.truncate&&t.push("is-truncated"),this.tableRef&&this.tableRef.fixedColumn&&this.tableScrolling&&t.push("has-scrolled"),t.join(" ")}render(){return e(s,{key:"c32bd43c6080e9a8a98578016973de9025e5d367",class:this.classNames(),role:"gridcell",part:"cell",style:this.tableRef&&this.tableRef.fixedColumn&&this.tableRef.selectable?{"--fixed-cell-position":"40px"}:{}},e("slot",{key:"5b2af30784f41dcc7a0f66187f222ec2472f207f"}))}get hostElement(){return this}static get watchers(){return{truncate:[{handleTruncateChange:0}]}}static get style(){return":host{--box-shadow-fixed:3px 3px 6px -2px rgba(0, 0, 0, 0.2);color:var(--pine-color-text);display:table-cell;font-family:var(--pine-font-family-body);font-size:var(--pine-font-size);font-weight:var(--pine-font-weight-regular);inset-inline-start:var(--pine-dimension-none);letter-spacing:var(--pine-letter-spacing);line-height:var(--pine-line-height-body);padding:var(--pine-dimension-sm);vertical-align:middle}:host(.is-compact){padding-block:var(--pine-dimension-2xs)}:host(.is-fixed){background:var(--pine-color-background-container);inset-inline-start:0;position:-webkit-sticky;position:sticky;z-index:var(--pine-z-index-raised)}:host-context([dir=rtl]){--box-shadow-fixed:-3px 3px 6px -2px rgba(0, 0, 0, 0.2)}:host(.has-scrolled.is-fixed){-webkit-box-shadow:var(--box-shadow-fixed);box-shadow:var(--box-shadow-fixed)}:host(.is-truncated){max-width:var(--pds-table-cell-truncate-max-width, 100px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host(.has-checkbox){vertical-align:middle;width:16px}:host(.pds-table-cell--align-start){text-align:start}:host(.pds-table-cell--align-center){text-align:center}:host(.pds-table-cell--align-end){text-align:end}:host(.pds-table-cell--align-justify){text-align:justify}"}},[257,"pds-table-cell",{cellAlign:[1,"cell-align"],truncate:[4],tableScrolling:[32]},void 0,{truncate:[{handleTruncateChange:0}]}]);function h(){"undefined"!=typeof customElements&&["pds-table-cell"].forEach((t=>{"pds-table-cell"===t&&(customElements.get(n(t))||customElements.define(n(t),a))}))}export{a as P,h as d}
1
+ import{proxyCustomElement as t,HTMLElement as i,h as e,Host as s,transformTag as n}from"@stencil/core/internal/client";import{i as l}from"./scroll.js";import{s as o}from"./truncation-tooltip.js";const a=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.scrollContainer=null,this.setupRetries=0,this.truncationCleanup=null,this.tableScrolling=!1,this.handleScroll=()=>{if(this.scrollContainer)try{this.tableScrolling=l(this.scrollContainer)}catch(t){console.warn("Scroll handler error:",t)}}}componentWillRender(){this.tableRef=this.hostElement.closest("pds-table")}componentDidLoad(){this.tableRef&&this.tableRef.responsive&&this.tableRef.fixedColumn&&this.setupScrollListener(),this.truncate&&this.initTruncationTooltip()}disconnectedCallback(){this.cleanupScrollListener(),this.destroyTruncationTooltip()}setupScrollListener(){var t;if(!this.tableRef)return;const i=null===(t=this.tableRef.shadowRoot)||void 0===t?void 0:t.querySelector(".pds-table-responsive-container");i?(this.scrollContainer=i,this.scrollContainer.addEventListener("scroll",this.handleScroll,{passive:!0}),this.handleScroll(),this.setupRetries=0):this.setupTimer=window.setTimeout((()=>{this.scrollContainer||(this.setupRetries=(this.setupRetries||0)+1,this.setupRetries<=50?this.setupScrollListener():console.warn("Failed to find responsive container after 50 attempts"))}),100)}cleanupScrollListener(){this.scrollContainer&&(this.scrollContainer.removeEventListener("scroll",this.handleScroll),this.scrollContainer=null),void 0!==this.setupTimer&&(window.clearTimeout(this.setupTimer),this.setupTimer=void 0),this.setupRetries=0}handleTruncateChange(t){t?this.initTruncationTooltip():this.destroyTruncationTooltip()}initTruncationTooltip(){this.destroyTruncationTooltip(),this.truncationCleanup=o({hostEl:this.hostElement,contentEl:this.hostElement,getTooltipText:()=>this.hostElement.textContent||""})}destroyTruncationTooltip(){this.truncationCleanup&&(this.truncationCleanup(),this.truncationCleanup=null)}classNames(){const t=[];return this.tableRef&&this.tableRef.compact&&t.push("is-compact"),this.cellAlign&&t.push(`pds-table-cell--align-${this.cellAlign}`),this.truncate&&t.push("is-truncated"),this.tableRef&&this.tableRef.fixedColumn&&this.tableScrolling&&t.push("has-scrolled"),t.join(" ")}render(){return e(s,{key:"bedaeeb5723299656f872a760ed1dd80c7fe8793",class:this.classNames(),role:"gridcell",part:"cell",style:this.tableRef&&this.tableRef.fixedColumn&&this.tableRef.selectable?{"--fixed-cell-position":"40px"}:{}},e("slot",{key:"45182ee3e004097660432f552780b3d27671bd46"}))}get hostElement(){return this}static get watchers(){return{truncate:[{handleTruncateChange:0}]}}static get style(){return":host{--box-shadow-fixed:3px 3px 6px -2px rgba(0, 0, 0, 0.2);color:var(--pine-color-text);display:table-cell;font-family:var(--pine-font-family-body);font-size:var(--pine-font-size);font-weight:var(--pine-font-weight-regular);inset-inline-start:var(--pine-dimension-none);letter-spacing:var(--pine-letter-spacing);line-height:var(--pine-line-height-body);padding:var(--pine-dimension-sm);vertical-align:middle}:host(.is-compact){padding-block:var(--pine-dimension-2xs)}:host(.is-fixed){background:var(--pine-color-background-container);inset-inline-start:0;position:-webkit-sticky;position:sticky;z-index:var(--pine-z-index-raised)}:host-context([dir=rtl]){--box-shadow-fixed:-3px 3px 6px -2px rgba(0, 0, 0, 0.2)}:host(.has-scrolled.is-fixed){-webkit-box-shadow:var(--box-shadow-fixed);box-shadow:var(--box-shadow-fixed)}:host(.is-truncated){max-width:var(--pds-table-cell-truncate-max-width, 100px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host(.has-checkbox){vertical-align:middle;width:16px}:host(.pds-table-cell--align-start){text-align:start}:host(.pds-table-cell--align-center){text-align:center}:host(.pds-table-cell--align-end){text-align:end}:host(.pds-table-cell--align-justify){text-align:justify}"}},[257,"pds-table-cell",{cellAlign:[1,"cell-align"],truncate:[4],tableScrolling:[32]},void 0,{truncate:[{handleTruncateChange:0}]}]);function h(){"undefined"!=typeof customElements&&["pds-table-cell"].forEach((t=>{"pds-table-cell"===t&&(customElements.get(n(t))||customElements.define(n(t),a))}))}export{a as P,h as d}
@@ -1 +1 @@
1
- import{proxyCustomElement as t,HTMLElement as s,createEvent as e,h as i,Host as a,transformTag as o}from"@stencil/core/internal/client";import{u as r,d as n}from"./index2.js";import{i as l}from"./scroll.js";import{d as h}from"./pds-icon2.js";const d=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.pdsTableSort=e(this,"pdsTableSort",7),this.scrollContainer=null,this.setupRetries=0,this.sortingDirection="asc",this.tableScrolling=!1,this.isSelected=!1,this.hasHeadBorder=!1,this.hasHeadBackground=!1,this.isActive=!1,this.handleScroll=()=>{if(this.scrollContainer)try{this.tableScrolling=l(this.scrollContainer)}catch(t){console.warn("Scroll handler error:",t)}},this.toggleSort=()=>{if(this.sortable){if(!this.tableRef)return;const t=this.hostElement.innerText.trim();this.sortingDirection="asc"===this.sortingDirection?"desc":"asc",this.tableRef.querySelectorAll("pds-table-head-cell").forEach((async t=>{if(t!==this.hostElement){const s=t;await s.clearActiveSort()}})),this.isActive=!0,this.hostElement.classList.add("is-active"),this.pdsTableSort.emit({column:t,direction:this.sortingDirection})}}}async setActiveSort(t){this.sortable&&(this.sortingDirection=t,this.isActive=!0,this.hostElement.classList.add("is-active"))}async clearActiveSort(){this.isActive=!1,this.hostElement.classList.remove("is-active")}componentWillLoad(){this.tableRef=this.hostElement.closest("pds-table");const t=this.hostElement.closest("pds-table-head");t&&(this.hasHeadBorder=t.hasAttribute("border"),this.hasHeadBackground=t.hasAttribute("background"))}componentDidLoad(){this.tableRef&&this.tableRef.responsive&&this.tableRef.fixedColumn&&this.setupScrollListener();const t=this.hostElement.closest("pds-table-head");t&&"undefined"!=typeof MutationObserver&&(this.headObserver&&this.headObserver.disconnect(),this.headObserver=new MutationObserver((()=>{this.hasHeadBorder=t.hasAttribute("border"),this.hasHeadBackground=t.hasAttribute("background")})),this.headObserver.observe(t,{attributes:!0,attributeFilter:["border","background"]}))}disconnectedCallback(){this.cleanupScrollListener(),this.headObserver&&this.headObserver.disconnect()}setupScrollListener(){var t;if(!this.tableRef)return;const s=null===(t=this.tableRef.shadowRoot)||void 0===t?void 0:t.querySelector(".pds-table-responsive-container");s?(this.scrollContainer=s,this.scrollContainer.addEventListener("scroll",this.handleScroll,{passive:!0}),this.handleScroll(),this.setupRetries=0):this.setupTimer=window.setTimeout((()=>{this.scrollContainer||(this.setupRetries=(this.setupRetries||0)+1,this.setupRetries<=50?this.setupScrollListener():console.warn("Failed to find responsive container after 50 attempts"))}),100)}cleanupScrollListener(){this.scrollContainer&&(this.scrollContainer.removeEventListener("scroll",this.handleScroll),this.scrollContainer=null),void 0!==this.setupTimer&&(window.clearTimeout(this.setupTimer),this.setupTimer=void 0),this.setupRetries=0}classNames(){const t=[];return this.tableRef&&this.tableRef.compact&&t.push("is-compact"),this.cellAlign&&t.push(`pds-table-head-cell--align-${this.cellAlign}`),this.sortable&&t.push("is-sortable"),this.sortable&&null!==this.sortingDirection&&t.push("sort-"+this.sortingDirection),this.tableRef&&this.tableRef.fixedColumn&&this.tableScrolling&&t.push("has-scrolled"),this.hasHeadBackground&&t.push("has-head-background"),this.hasHeadBorder&&t.push("has-head-border"),t.join(" ")}render(){return i(a,{key:"de7b2fb674def0a8046e1940488d435176dc9851",class:this.classNames(),role:"columnheader",onClick:this.toggleSort,part:"head-cell",style:this.tableRef&&this.tableRef.fixedColumn&&this.tableRef.selectable?{"--fixed-cell-position":"40px"}:{}},i("slot",{key:"4ada173faf7d106cca34920540703a1d04f7e5bd"}),this.sortable&&this.isActive&&i("pds-icon",{key:"1b0e87d74b6fa359e901a8e66479f37a88cdcf1c",icon:"asc"===this.sortingDirection?r:n,part:"sort-icon"}))}get hostElement(){return this}static get style(){return":host{--border-head-cell-default:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);--box-shadow-default:3px 3px 6px -2px rgba(0, 0, 0, 0.1);-webkit-border-after:var(--border-head-cell-default);border-block-end:var(--border-head-cell-default);color:var(--pine-color-text);display:table-cell;font-family:var(--pine-font-family-body);font-size:var(--pine-font-size);font-weight:var(--pine-font-weight-regular);letter-spacing:var(--pine-letter-spacing);line-height:var(--pine-line-height-body);padding:var(--pine-dimension-sm);position:relative;text-align:start;vertical-align:inherit}:host(.is-compact){padding-block:var(--pine-dimension-2xs)}:host(.is-fixed){background:var(--pine-color-background-container);inset-inline-start:var(--pine-dimension-none);position:-webkit-sticky;position:sticky;z-index:var(--pine-z-index-raised)}:host(.is-fixed.has-head-background){background-color:var(--pine-color-background-subtle)}:host(.has-head-border){-webkit-border-before:var(--border-head-cell-default);border-block-start:var(--border-head-cell-default)}:host-context([dir=rtl]){--box-shadow-default:-3px 3px 6px -2px rgba(0, 0, 0, 0.1)}:host(.has-scrolled.is-fixed){-webkit-box-shadow:var(--box-shadow-default);box-shadow:var(--box-shadow-default)}:host(.is-sortable){cursor:pointer}:host(.is-sortable) pds-icon{-webkit-margin-start:var(--pine-dimension-2xs);margin-inline-start:var(--pine-dimension-2xs);-webkit-padding-before:2px;padding-block-start:2px;position:absolute}:host(.is-sortable:hover),:host(.is-active){color:var(--pine-color-text-strong)}:host(.pds-table-head-cell--align-start){text-align:start}:host(.pds-table-head-cell--align-center){text-align:center}:host(.pds-table-head-cell--align-end){text-align:end}:host(.pds-table-head-cell--align-justify){text-align:justify}"}},[257,"pds-table-head-cell",{cellAlign:[1,"cell-align"],sortable:[4],sortingDirection:[32],tableScrolling:[32],isSelected:[32],hasHeadBorder:[32],hasHeadBackground:[32],isActive:[32],setActiveSort:[64],clearActiveSort:[64]}]);function c(){"undefined"!=typeof customElements&&["pds-table-head-cell","pds-icon"].forEach((t=>{switch(t){case"pds-table-head-cell":customElements.get(o(t))||customElements.define(o(t),d);break;case"pds-icon":customElements.get(o(t))||h()}}))}export{d as P,c as d}
1
+ import{proxyCustomElement as t,HTMLElement as s,createEvent as i,h as e,Host as a,transformTag as o}from"@stencil/core/internal/client";import{u as r,d as n}from"./index2.js";import{i as l}from"./scroll.js";import{d as h}from"./pds-icon2.js";const d=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.pdsTableSort=i(this,"pdsTableSort",7),this.scrollContainer=null,this.setupRetries=0,this.sortingDirection="asc",this.tableScrolling=!1,this.isSelected=!1,this.hasHeadBorder=!1,this.hasHeadBackground=!1,this.isActive=!1,this.handleScroll=()=>{if(this.scrollContainer)try{this.tableScrolling=l(this.scrollContainer)}catch(t){console.warn("Scroll handler error:",t)}},this.toggleSort=()=>{if(this.sortable){if(!this.tableRef)return;const t=this.hostElement.innerText.trim();this.sortingDirection="asc"===this.sortingDirection?"desc":"asc",this.tableRef.querySelectorAll("pds-table-head-cell").forEach((async t=>{if(t!==this.hostElement){const s=t;await s.clearActiveSort()}})),this.isActive=!0,this.hostElement.classList.add("is-active"),this.pdsTableSort.emit({column:t,direction:this.sortingDirection})}}}async setActiveSort(t){this.sortable&&(this.sortingDirection=t,this.isActive=!0,this.hostElement.classList.add("is-active"))}async clearActiveSort(){this.isActive=!1,this.hostElement.classList.remove("is-active")}componentWillLoad(){this.tableRef=this.hostElement.closest("pds-table");const t=this.hostElement.closest("pds-table-head");t&&(this.hasHeadBorder=t.hasAttribute("border"),this.hasHeadBackground=t.hasAttribute("background"))}componentDidLoad(){this.tableRef&&this.tableRef.responsive&&this.tableRef.fixedColumn&&this.setupScrollListener();const t=this.hostElement.closest("pds-table-head");t&&"undefined"!=typeof MutationObserver&&(this.headObserver&&this.headObserver.disconnect(),this.headObserver=new MutationObserver((()=>{this.hasHeadBorder=t.hasAttribute("border"),this.hasHeadBackground=t.hasAttribute("background")})),this.headObserver.observe(t,{attributes:!0,attributeFilter:["border","background"]}))}disconnectedCallback(){this.cleanupScrollListener(),this.headObserver&&this.headObserver.disconnect()}setupScrollListener(){var t;if(!this.tableRef)return;const s=null===(t=this.tableRef.shadowRoot)||void 0===t?void 0:t.querySelector(".pds-table-responsive-container");s?(this.scrollContainer=s,this.scrollContainer.addEventListener("scroll",this.handleScroll,{passive:!0}),this.handleScroll(),this.setupRetries=0):this.setupTimer=window.setTimeout((()=>{this.scrollContainer||(this.setupRetries=(this.setupRetries||0)+1,this.setupRetries<=50?this.setupScrollListener():console.warn("Failed to find responsive container after 50 attempts"))}),100)}cleanupScrollListener(){this.scrollContainer&&(this.scrollContainer.removeEventListener("scroll",this.handleScroll),this.scrollContainer=null),void 0!==this.setupTimer&&(window.clearTimeout(this.setupTimer),this.setupTimer=void 0),this.setupRetries=0}classNames(){const t=[];return this.tableRef&&this.tableRef.compact&&t.push("is-compact"),this.cellAlign&&t.push(`pds-table-head-cell--align-${this.cellAlign}`),this.sortable&&t.push("is-sortable"),this.sortable&&null!==this.sortingDirection&&t.push("sort-"+this.sortingDirection),this.tableRef&&this.tableRef.fixedColumn&&this.tableScrolling&&t.push("has-scrolled"),this.hasHeadBackground&&t.push("has-head-background"),this.hasHeadBorder&&t.push("has-head-border"),t.join(" ")}render(){return e(a,{key:"13de42d136c5b037cd1545cd5b789b4660e23b87",class:this.classNames(),role:"columnheader",onClick:this.toggleSort,part:"head-cell",style:this.tableRef&&this.tableRef.fixedColumn&&this.tableRef.selectable?{"--fixed-cell-position":"40px"}:{}},e("slot",{key:"96084d87a34d7b601a8e8325f344f1fe6601204e"}),this.sortable&&this.isActive&&e("pds-icon",{key:"cba838fa029b280561676c2b57af7f8f00055511",icon:"asc"===this.sortingDirection?r:n,part:"sort-icon"}))}get hostElement(){return this}static get style(){return":host{--border-head-cell-default:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);--box-shadow-default:3px 3px 6px -2px rgba(0, 0, 0, 0.1);-webkit-border-after:var(--border-head-cell-default);border-block-end:var(--border-head-cell-default);color:var(--pine-color-text);display:table-cell;font-family:var(--pine-font-family-body);font-size:var(--pine-font-size);font-weight:var(--pine-font-weight-regular);letter-spacing:var(--pine-letter-spacing);line-height:var(--pine-line-height-body);padding:var(--pine-dimension-sm);position:relative;text-align:start;vertical-align:inherit}:host(.is-compact){padding-block:var(--pine-dimension-2xs)}:host(.is-fixed){background:var(--pine-color-background-container);inset-inline-start:var(--pine-dimension-none);position:-webkit-sticky;position:sticky;z-index:var(--pine-z-index-raised)}:host(.is-fixed.has-head-background){background-color:var(--pine-color-background-subtle)}:host(.has-head-border){-webkit-border-before:var(--border-head-cell-default);border-block-start:var(--border-head-cell-default)}:host-context([dir=rtl]){--box-shadow-default:-3px 3px 6px -2px rgba(0, 0, 0, 0.1)}:host(.has-scrolled.is-fixed){-webkit-box-shadow:var(--box-shadow-default);box-shadow:var(--box-shadow-default)}:host(.is-sortable){cursor:pointer}:host(.is-sortable) pds-icon{-webkit-margin-start:var(--pine-dimension-2xs);margin-inline-start:var(--pine-dimension-2xs);-webkit-padding-before:2px;padding-block-start:2px;position:absolute}:host(.is-sortable:hover),:host(.is-active){color:var(--pine-color-text-strong)}:host(.pds-table-head-cell--align-start){text-align:start}:host(.pds-table-head-cell--align-center){text-align:center}:host(.pds-table-head-cell--align-end){text-align:end}:host(.pds-table-head-cell--align-justify){text-align:justify}"}},[257,"pds-table-head-cell",{cellAlign:[1,"cell-align"],sortable:[4],sortingDirection:[32],tableScrolling:[32],isSelected:[32],hasHeadBorder:[32],hasHeadBackground:[32],isActive:[32],setActiveSort:[64],clearActiveSort:[64]}]);function c(){"undefined"!=typeof customElements&&["pds-table-head-cell","pds-icon"].forEach((t=>{switch(t){case"pds-table-head-cell":customElements.get(o(t))||customElements.define(o(t),d);break;case"pds-icon":customElements.get(o(t))||h()}}))}export{d as P,c as d}
@@ -1 +1 @@
1
- import{proxyCustomElement as e,HTMLElement as r,createEvent as t,h as o,Host as i,transformTag as d}from"@stencil/core/internal/client";import{c as s}from"./closest.js";import{d as l}from"./pds-checkbox2.js";import{d as a}from"./pds-icon2.js";import{d as b}from"./pds-table-head-cell2.js";const c=e(class extends r{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.pdsTableSelectAll=t(this,"pdsTableSelectAll",7),this.border=!1,this.background=!1,this.generateUniqueId=()=>`${Math.random().toString(36).substring(2,8)}-${(new Date).toISOString().replace(/[:.]/g,"-")}`,this.handleInput=e=>{this.isSelected=!e.target.checked,this.handleSelect(this.isSelected)},this.handleSelect=e=>{this.indeterminate=!1,s("pds-table-head",this.hostElement)&&this.pdsTableSelectAll.emit({isSelected:e})}}componentWillLoad(){this.isSelected&&this.handleSelect(this.isSelected)}componentWillRender(){if(this.tableRef=this.hostElement.closest("pds-table"),this.tableRef&&this.tableRef.fixedColumn){const e=this.hostElement.querySelector("pds-table-head-cell:first-child");null==e||e.classList.add("is-fixed")}}render(){return o(i,{key:"ca88406002f440e9b9eefa639dac056e85403bd8",role:"row",part:"head"},this.tableRef&&this.tableRef.selectable&&o("pds-table-head-cell",{key:"7c1939791a0573c6eccdec66d7b6d5de122a42c1",part:this.tableRef.selectable?"checkbox-cell":""},!this.tableRef.disableSelectAll&&o("pds-checkbox",{key:"3a8581bbf9b5fc26396937e7d0bab370f6078090",componentId:this.generateUniqueId(),indeterminate:this.indeterminate,onInput:this.handleInput,label:"Select All Rows",hideLabel:!0,checked:this.isSelected,part:"select-all-checkbox"})),o("slot",{key:"a736a10378936d4e4de5b139f3f57a345483c1bb"}))}get hostElement(){return this}static get style(){return":host{--border-head-default:var(--pine-border-width-thin) solid var(--pine-color-background-subtle);border-color:inherit;-webkit-box-sizing:border-box;box-sizing:border-box;display:table-header-group;vertical-align:middle}:host::part(checkbox-cell){background-color:var(--pine-color-background-container);inset-inline-start:var(--pine-dimension-none);position:-webkit-sticky;position:sticky;z-index:var(--pine-z-index-raised)}:host pds-table-checkbox-cell{-webkit-border-after:var(--border-head-default);border-block-end:var(--border-head-default)}:host([border]){-webkit-border-after:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);border-block-end:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);-webkit-border-before:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);border-block-start:var(--pine-border-width-thin) solid var(--pine-color-border-subtle)}:host([border]) pds-table-head-cell{-webkit-border-after:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);border-block-end:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);-webkit-border-before:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);border-block-start:var(--pine-border-width-thin) solid var(--pine-color-border-subtle)}:host([background]){background-color:var(--pine-color-background-subtle)}:host([background]) pds-table-head-cell{background-color:var(--pine-color-background-subtle)}"}},[257,"pds-table-head",{indeterminate:[1028],isSelected:[1028,"is-selected"],border:[516],background:[516]}]),n=c,h=function(){"undefined"!=typeof customElements&&["pds-table-head","pds-checkbox","pds-icon","pds-table-head-cell"].forEach((e=>{switch(e){case"pds-table-head":customElements.get(d(e))||customElements.define(d(e),c);break;case"pds-checkbox":customElements.get(d(e))||l();break;case"pds-icon":customElements.get(d(e))||a();break;case"pds-table-head-cell":customElements.get(d(e))||b()}}))};export{n as PdsTableHead,h as defineCustomElement}
1
+ import{proxyCustomElement as e,HTMLElement as r,createEvent as t,h as o,Host as d,transformTag as i}from"@stencil/core/internal/client";import{c as s}from"./closest.js";import{d as l}from"./pds-checkbox2.js";import{d as a}from"./pds-icon2.js";import{d as b}from"./pds-table-head-cell2.js";const c=e(class extends r{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.pdsTableSelectAll=t(this,"pdsTableSelectAll",7),this.border=!1,this.background=!1,this.generateUniqueId=()=>`${Math.random().toString(36).substring(2,8)}-${(new Date).toISOString().replace(/[:.]/g,"-")}`,this.handleInput=e=>{this.isSelected=!e.target.checked,this.handleSelect(this.isSelected)},this.handleSelect=e=>{this.indeterminate=!1,s("pds-table-head",this.hostElement)&&this.pdsTableSelectAll.emit({isSelected:e})}}componentWillLoad(){this.isSelected&&this.handleSelect(this.isSelected)}componentWillRender(){if(this.tableRef=this.hostElement.closest("pds-table"),this.tableRef&&this.tableRef.fixedColumn){const e=this.hostElement.querySelector("pds-table-head-cell:first-child");null==e||e.classList.add("is-fixed")}}render(){return o(d,{key:"de3faae735e90f5fde1258b5acb826f5f9dbd170",role:"row",part:"head"},this.tableRef&&this.tableRef.selectable&&o("pds-table-head-cell",{key:"e590e57c8b37ec0ad18e96077401c4692bbd45a4",part:this.tableRef.selectable?"checkbox-cell":""},!this.tableRef.disableSelectAll&&o("pds-checkbox",{key:"44ca7eda63185672939909e121a86e6502080a7d",componentId:this.generateUniqueId(),indeterminate:this.indeterminate,onInput:this.handleInput,label:"Select All Rows",hideLabel:!0,checked:this.isSelected,part:"select-all-checkbox"})),o("slot",{key:"0671df85d7989cff7266bfd3d1b4d62b332d2e81"}))}get hostElement(){return this}static get style(){return":host{--border-head-default:var(--pine-border-width-thin) solid var(--pine-color-background-subtle);border-color:inherit;-webkit-box-sizing:border-box;box-sizing:border-box;display:table-header-group;vertical-align:middle}:host::part(checkbox-cell){background-color:var(--pine-color-background-container);inset-inline-start:var(--pine-dimension-none);position:-webkit-sticky;position:sticky;z-index:var(--pine-z-index-raised)}:host pds-table-checkbox-cell{-webkit-border-after:var(--border-head-default);border-block-end:var(--border-head-default)}:host([border]){-webkit-border-after:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);border-block-end:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);-webkit-border-before:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);border-block-start:var(--pine-border-width-thin) solid var(--pine-color-border-subtle)}:host([border]) pds-table-head-cell{-webkit-border-after:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);border-block-end:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);-webkit-border-before:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);border-block-start:var(--pine-border-width-thin) solid var(--pine-color-border-subtle)}:host([background]){background-color:var(--pine-color-background-subtle)}:host([background]) pds-table-head-cell{background-color:var(--pine-color-background-subtle)}"}},[257,"pds-table-head",{indeterminate:[1028],isSelected:[1028,"is-selected"],border:[516],background:[516]}]),n=c,h=function(){"undefined"!=typeof customElements&&["pds-table-head","pds-checkbox","pds-icon","pds-table-head-cell"].forEach((e=>{switch(e){case"pds-table-head":customElements.get(i(e))||customElements.define(i(e),c);break;case"pds-checkbox":customElements.get(i(e))||l();break;case"pds-icon":customElements.get(i(e))||a();break;case"pds-table-head-cell":customElements.get(i(e))||b()}}))};export{n as PdsTableHead,h as defineCustomElement}
@@ -1 +1 @@
1
- import{proxyCustomElement as e,HTMLElement as t,createEvent as s,h as i,Host as o,transformTag as r}from"@stencil/core/internal/client";import{c as l}from"./closest.js";import{d as c}from"./pds-checkbox2.js";import{d}from"./pds-icon2.js";import{d as h}from"./pds-table-cell2.js";const a=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.pdsTableRowSelected=s(this,"pdsTableRowSelected",7),this.observer=null,this.bodyObserver=null,this.hasDivider=!1,this.isLastRow=!1,this.handleCheckboxChange=e=>{this.isSelected=e.detail.checked,this.handleSelect(this.isSelected)},this.handleSelect=e=>{if(this.indeterminate=!1,!l("pds-table-head",this.hostElement)){const t=Array.from(this.hostElement.parentNode.children).indexOf(this.hostElement);this.pdsTableRowSelected.emit({rowIndex:t,isSelected:e})}},this.generateUniqueId=()=>`${Math.random().toString(36).substring(2,8)}-${(new Date).toISOString().replace(/[:.]/g,"-")}`}classNames(){const e=[];return this.isSelected&&e.push("is-selected"),this.hasDivider&&e.push("has-divider"),this.isLastRow&&e.push("is-last-row"),e.join(" ")}componentWillRender(){if(this.tableRef=this.hostElement.closest("pds-table"),this.tableRef&&this.tableRef.fixedColumn){const e=this.hostElement.querySelector("pds-table-cell");null==e||e.classList.add("is-fixed")}}componentWillLoad(){this.isSelected&&this.handleSelect(this.isSelected)}connectedCallback(){this.tableRef=this.hostElement.closest("pds-table"),this.setupObservers(),this.updateDividerState()}disconnectedCallback(){this.cleanupObservers()}cleanupObservers(){this.observer&&(this.observer.disconnect(),this.observer=null),this.bodyObserver&&(this.bodyObserver.disconnect(),this.bodyObserver=null)}setupObservers(){this.cleanupObservers(),this.tableRef&&"undefined"!=typeof MutationObserver&&(this.observer=new MutationObserver((()=>{this.updateDividerState()})),this.observer.observe(this.tableRef,{attributes:!0,attributeFilter:["row-dividers"]}));const e=this.hostElement.closest("pds-table-body");e&&"undefined"!=typeof MutationObserver&&(this.bodyObserver=new MutationObserver((()=>{this.updateLastRowState()})),this.bodyObserver.observe(e,{childList:!0}))}shouldHaveDivider(){return this.tableRef||(this.tableRef=this.hostElement.closest("pds-table")),!(!this.tableRef||!this.tableRef.rowDividers)}updateDividerState(){this.hasDivider=this.shouldHaveDivider(),this.updateLastRowState()}updateLastRowState(){if(!this.hasDivider)return void(this.isLastRow=!1);const e=this.hostElement.closest("pds-table-body");if(e){const t=Array.from(e.querySelectorAll("pds-table-row"));this.isLastRow=t[t.length-1]===this.hostElement}else this.isLastRow=!1}render(){return i(o,{key:"16ca08eefa74468559a1c084b7619836f01b27af",class:this.classNames(),role:"row",part:"row"},this.tableRef&&this.tableRef.selectable&&i("pds-table-cell",{key:"4b4d2ae15d519e08cd6710ddb6759923d478457c",part:"checkbox-cell",class:this.tableRef.selectable?"has-checkbox":""},i("pds-checkbox",{key:"78b9a731113cce82c59f40713561033f563ffc5f",componentId:this.generateUniqueId(),onPdsCheckboxChange:this.handleCheckboxChange,indeterminate:this.indeterminate,label:"Select Row",hideLabel:!0,checked:this.isSelected,part:"row-checkbox"})),i("slot",{key:"5522f2335912f59013e9fc1e1fc6070d645cd519"}))}get hostElement(){return this}static get style(){return":host{--color-background-interactive:var(--pine-color-background-subtle);border-color:inherit;display:table-row;vertical-align:inherit}:host::part(checkbox-cell){background-color:var(--pine-color-background-container);inset-inline-start:var(--pine-dimension-none);position:-webkit-sticky;position:sticky;z-index:var(--pine-z-index-raised)}:host(:hover),:host(:hover)::part(checkbox-cell),:host(:hover) ::slotted(pds-table-cell),:host(.is-selected),:host(.is-selected)::part(checkbox-cell),:host(.is-selected) ::slotted(pds-table-cell){background:var(--color-background-interactive)}:host(.has-divider) ::slotted(pds-table-cell),:host(.has-divider) pds-table-cell{-webkit-border-after:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);border-block-end:var(--pine-border-width-thin) solid var(--pine-color-border-subtle)}:host(.has-divider.is-last-row) ::slotted(pds-table-cell),:host(.has-divider.is-last-row) pds-table-cell{-webkit-border-after:0;border-block-end:0}"}},[257,"pds-table-row",{indeterminate:[1028],isSelected:[1028,"is-selected"],hasDivider:[32],isLastRow:[32]}]),n=a,b=function(){"undefined"!=typeof customElements&&["pds-table-row","pds-checkbox","pds-icon","pds-table-cell"].forEach((e=>{switch(e){case"pds-table-row":customElements.get(r(e))||customElements.define(r(e),a);break;case"pds-checkbox":customElements.get(r(e))||c();break;case"pds-icon":customElements.get(r(e))||d();break;case"pds-table-cell":customElements.get(r(e))||h()}}))};export{n as PdsTableRow,b as defineCustomElement}
1
+ import{proxyCustomElement as e,HTMLElement as t,createEvent as s,h as i,Host as o,transformTag as r}from"@stencil/core/internal/client";import{c as l}from"./closest.js";import{d as c}from"./pds-checkbox2.js";import{d}from"./pds-icon2.js";import{d as h}from"./pds-table-cell2.js";const a=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.pdsTableRowSelected=s(this,"pdsTableRowSelected",7),this.observer=null,this.bodyObserver=null,this.hasDivider=!1,this.isLastRow=!1,this.handleCheckboxChange=e=>{this.isSelected=e.detail.checked,this.handleSelect(this.isSelected)},this.handleSelect=e=>{if(this.indeterminate=!1,!l("pds-table-head",this.hostElement)){const t=Array.from(this.hostElement.parentNode.children).indexOf(this.hostElement);this.pdsTableRowSelected.emit({rowIndex:t,isSelected:e})}},this.generateUniqueId=()=>`${Math.random().toString(36).substring(2,8)}-${(new Date).toISOString().replace(/[:.]/g,"-")}`}classNames(){const e=[];return this.isSelected&&e.push("is-selected"),this.hasDivider&&e.push("has-divider"),this.isLastRow&&e.push("is-last-row"),e.join(" ")}componentWillRender(){if(this.tableRef=this.hostElement.closest("pds-table"),this.tableRef&&this.tableRef.fixedColumn){const e=this.hostElement.querySelector("pds-table-cell");null==e||e.classList.add("is-fixed")}}componentWillLoad(){this.isSelected&&this.handleSelect(this.isSelected)}connectedCallback(){this.tableRef=this.hostElement.closest("pds-table"),this.setupObservers(),this.updateDividerState()}disconnectedCallback(){this.cleanupObservers()}cleanupObservers(){this.observer&&(this.observer.disconnect(),this.observer=null),this.bodyObserver&&(this.bodyObserver.disconnect(),this.bodyObserver=null)}setupObservers(){this.cleanupObservers(),this.tableRef&&"undefined"!=typeof MutationObserver&&(this.observer=new MutationObserver((()=>{this.updateDividerState()})),this.observer.observe(this.tableRef,{attributes:!0,attributeFilter:["row-dividers"]}));const e=this.hostElement.closest("pds-table-body");e&&"undefined"!=typeof MutationObserver&&(this.bodyObserver=new MutationObserver((()=>{this.updateLastRowState()})),this.bodyObserver.observe(e,{childList:!0}))}shouldHaveDivider(){return this.tableRef||(this.tableRef=this.hostElement.closest("pds-table")),!(!this.tableRef||!this.tableRef.rowDividers)}updateDividerState(){this.hasDivider=this.shouldHaveDivider(),this.updateLastRowState()}updateLastRowState(){if(!this.hasDivider)return void(this.isLastRow=!1);const e=this.hostElement.closest("pds-table-body");if(e){const t=Array.from(e.querySelectorAll("pds-table-row"));this.isLastRow=t[t.length-1]===this.hostElement}else this.isLastRow=!1}render(){return i(o,{key:"5323521abc5c2464299cf77520fb38ec81297866",class:this.classNames(),role:"row",part:"row"},this.tableRef&&this.tableRef.selectable&&i("pds-table-cell",{key:"eb94dd282f885d3466b6177b2454cbcc4f932466",part:"checkbox-cell",class:this.tableRef.selectable?"has-checkbox":""},i("pds-checkbox",{key:"222eaaedd4bebddc18cebf01bf4da81004773a96",componentId:this.generateUniqueId(),onPdsCheckboxChange:this.handleCheckboxChange,indeterminate:this.indeterminate,label:"Select Row",hideLabel:!0,checked:this.isSelected,part:"row-checkbox"})),i("slot",{key:"010f222fa02b1809ff818f7a030c2a12fc3e3abb"}))}get hostElement(){return this}static get style(){return":host{--color-background-interactive:var(--pine-color-background-subtle);border-color:inherit;display:table-row;vertical-align:inherit}:host::part(checkbox-cell){background-color:var(--pine-color-background-container);inset-inline-start:var(--pine-dimension-none);position:-webkit-sticky;position:sticky;z-index:var(--pine-z-index-raised)}:host(:hover),:host(:hover)::part(checkbox-cell),:host(:hover) ::slotted(pds-table-cell),:host(.is-selected),:host(.is-selected)::part(checkbox-cell),:host(.is-selected) ::slotted(pds-table-cell){background:var(--color-background-interactive)}:host(.has-divider) ::slotted(pds-table-cell),:host(.has-divider) pds-table-cell{-webkit-border-after:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);border-block-end:var(--pine-border-width-thin) solid var(--pine-color-border-subtle)}:host(.has-divider.is-last-row) ::slotted(pds-table-cell),:host(.has-divider.is-last-row) pds-table-cell{-webkit-border-after:0;border-block-end:0}"}},[257,"pds-table-row",{indeterminate:[1028],isSelected:[1028,"is-selected"],hasDivider:[32],isLastRow:[32]}]),n=a,b=function(){"undefined"!=typeof customElements&&["pds-table-row","pds-checkbox","pds-icon","pds-table-cell"].forEach((e=>{switch(e){case"pds-table-row":customElements.get(r(e))||customElements.define(r(e),a);break;case"pds-checkbox":customElements.get(r(e))||c();break;case"pds-icon":customElements.get(r(e))||d();break;case"pds-table-cell":customElements.get(r(e))||h()}}))};export{n as PdsTableRow,b as defineCustomElement}
@@ -1 +1 @@
1
- import{proxyCustomElement as t,HTMLElement as e,h as a,Host as s,transformTag as n}from"@stencil/core/internal/client";import{u as i}from"./reconnected-content.js";const d=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.selected=!1,this.stretch=!1}componentDidRender(){i(this.el.querySelector(".pds-tabpanel"),".pds-tabpanel")}render(){return a(s,{key:"87b00d828c9cddbcccd5d6e89dab7541a3c5c839",slot:"tabpanels",class:this.stretch&&this.selected?"pds-tabpanel--stretch-active":void 0},a("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"},a("slot",{key:"97861fcd8432206a1115135fad919d75dc327112"})))}get el(){return this}static get style(){return":host{display:block}:host(.pds-tabpanel--stretch-active){-ms-flex:1 1 auto;flex:1 1 auto;min-block-size:0}:host(.pds-tabpanel--stretch-active) .pds-tabpanel.is-active{block-size:100%}.pds-tabpanel{display:none;margin-top:var(--tabs-dimension-panel-margin-top);padding:var(--tabs-dimension-panel-padding)}.pds-tabpanel:focus-visible{outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}.pds-tabpanel.is-active{display:block}"}},[260,"pds-tabpanel",{name:[1],parentComponentId:[1,"parent-component-id"],variant:[1],selected:[1028],stretch:[4]}]),p=d,l=function(){"undefined"!=typeof customElements&&["pds-tabpanel"].forEach((t=>{"pds-tabpanel"===t&&(customElements.get(n(t))||customElements.define(n(t),d))}))};export{p as PdsTabpanel,l as defineCustomElement}
1
+ import{proxyCustomElement as t,HTMLElement as e,h as s,Host as a,transformTag as n}from"@stencil/core/internal/client";import{H as i}from"./attributes.js";import{u as l}from"./reconnected-content.js";const p=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.hostKeeper=new i,this.selected=!1,this.stretch=!1}connectedCallback(){this.hostKeeper.connect(this.el)}disconnectedCallback(){this.hostKeeper.disconnect()}componentDidRender(){l(this.el.querySelector(".pds-tabpanel"),".pds-tabpanel")}render(){const t=this.stretch&&this.selected?"pds-tabpanel--stretch-active":"";return this.hostKeeper.record(t,{},{slot:"tabpanels"}),s(a,{key:"5d867e31d0f5f14e18f1c81035991c90bb5fe529",slot:"tabpanels",class:t||void 0},s("div",{key:"255d37a73089904cfb170cd89f7b829756f6295f",role:"tabpanel",id:this.parentComponentId+"__"+this.name+"-panel",tabindex:"0","aria-labelledby":this.parentComponentId+"__"+this.name,class:this.selected?"pds-tabpanel is-active":"pds-tabpanel"},s("slot",{key:"714d3d0cf0fc6173e243a2b077d9b9918ae4acf9"})))}get el(){return this}static get style(){return":host{display:block}:host(.pds-tabpanel--stretch-active){-ms-flex:1 1 auto;flex:1 1 auto;min-block-size:0}:host(.pds-tabpanel--stretch-active) .pds-tabpanel.is-active{block-size:100%}.pds-tabpanel{display:none;margin-top:var(--tabs-dimension-panel-margin-top);padding:var(--tabs-dimension-panel-padding)}.pds-tabpanel:focus-visible{outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}.pds-tabpanel.is-active{display:block}"}},[260,"pds-tabpanel",{name:[1],parentComponentId:[1,"parent-component-id"],variant:[1],selected:[1028],stretch:[4]}]),o=p,c=function(){"undefined"!=typeof customElements&&["pds-tabpanel"].forEach((t=>{"pds-tabpanel"===t&&(customElements.get(n(t))||customElements.define(n(t),p))}))};export{o as PdsTabpanel,c as defineCustomElement}
@@ -1 +1 @@
1
- import{proxyCustomElement as s,HTMLElement as t,h as i,Host as a,transformTag as e}from"@stencil/core/internal/client";import{H as n}from"./attributes.js";const r=s(class extends t{constructor(s){super(),!1!==s&&this.__registerHost(),this.__attachShadow(),this.hostKeeper=new n,this.divider=!1,this.stretch=!1,this.nav=!1}connectedCallback(){this.hostKeeper.connect(this.el)}disconnectedCallback(){this.hostKeeper.disconnect()}tabClickHandler(s){this.componentId===s.detail[1]&&(this.activeTabIndex=s.detail[0],this.activeTabName=this.tabs[this.activeTabIndex].name)}handleKeyDown(s){if(this.isNav)return;const t=s.target.closest("pds-tab"),i=t&&t.closest("pds-tabs")===this.el;["ArrowLeft","ArrowRight","Home","End"].includes(s.key)&&i&&(s.preventDefault(),this.moveActiveTab(s.key))}get isNav(){return!!this.nav}warnOnNavConfig(){var s;if(!(null===(s=this.tabs)||void 0===s?void 0:s.length))return;const t=this.tabs.filter((s=>{const t=s.getAttribute("href");return null!=t&&""!==t})).length;this.nav&&t<this.tabs.length?console.warn("pds-tabs: `nav` is set, so every pds-tab needs an `href`."):!this.nav&&t>0&&console.warn("pds-tabs: a pds-tab has an `href` but `nav` is not set — add `nav` to pds-tabs for navigation mode; the href is ignored in panel mode.")}moveActiveTab(s){const t=this.tabs.length-1;let i=null;switch(s){case"ArrowLeft":i=0===this.activeTabIndex?t:this.activeTabIndex+-1;break;case"ArrowRight":i=this.activeTabIndex===t?0:this.activeTabIndex+1;break;case"Home":i=0;break;case"End":i=t}this.tabs[i].children[0].focus(),this.activeTabName=this.tabs[i].name,this.activeTabIndex=i}findAllChildren(){const s=Array.from(this.el.querySelectorAll("pds-tab")),t=Array.from(this.el.querySelectorAll("pds-tabpanel"));this.tabs=s.filter((s=>s.closest("pds-tabs")===this.el)),this.tabPanels=t.filter((s=>s.closest("pds-tabs")===this.el))}propGeneration(s,t=0){s.parentComponentId=""+this.componentId,s.variant=""+this.variant,s.selected=this.activeTabName===s.name,s.index=t}passPropsToChildren(){var s;if(!this.nav&&null==this.activeTabName&&this.tabs.length){const t=null!==(s=this.tabs.find((s=>!s.disabled)))&&void 0!==s?s:this.tabs[0];this.activeTabName=t.name}this.tabs.forEach(((s,t)=>{this.activeTabName===s.name&&(this.activeTabIndex=t),this.propGeneration(s,t),s.navMode=this.nav})),this.tabPanels.forEach((s=>{this.propGeneration(s),s.stretch=this.stretch}))}classNames(){let s="pds-tabs";return this.variant&&"primary"!=this.variant&&(s+=" pds-tabs--"+this.variant),this.divider&&(s+=" pds-tabs--divider"),this.stretch&&(s+=" pds-tabs--stretch"),s}componentWillLoad(){this.findAllChildren(),this.warnOnNavConfig()}componentWillRender(){this.passPropsToChildren()}render(){const s=this.isNav?i("nav",{class:"pds-tabs__tablist","aria-label":this.tablistLabel||void 0,part:"tab-list"},i("slot",{name:"tabs"})):i("div",{class:"pds-tabs__tablist",role:"tablist","aria-label":this.tablistLabel,part:"tab-list"},i("slot",{name:"tabs"})),t=this.classNames();return this.hostKeeper.record(t),i(a,{key:"ea26bc4e4cadd4621511afa01ca2a353a053fd0e","active-tab-name":this.activeTabName,class:t,id:this.componentId},s,i("slot",{key:"3f920708c647920af3d0d50f74b5409d30d70af8",name:"tabpanels"}))}get el(){return this}static get style(){return":host{--tabs-dimension-panel-margin-top:var(--pine-dimension-none);--tabs-dimension-panel-padding:0;display:block}.pds-tabs__tablist{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:var(--pine-dimension-md)}:host(.pds-tabs--divider) .pds-tabs__tablist{-webkit-border-after:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);border-block-end:var(--pine-border-width-thin) solid var(--pine-color-border-subtle)}:host(.pds-tabs--stretch){block-size:100%;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host(.pds-tabs--stretch) .pds-tabs__tablist{-ms-flex:0 0 auto;flex:0 0 auto}:host(.pds-tabs--availability) .pds-tabs__tablist{gap:var(--pine-dimension-xs)}:host(.pds-tabs--filter) .pds-tabs__tablist{gap:var(--pine-dimension-sm)}:host(.pds-tabs--pill) .pds-tabs__tablist{background-color:var(--pine-color-background-app);border:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);border-radius:var(--pine-dimension-100);display:-ms-inline-flexbox;display:inline-flex;display:-ms-flexbox;display:flex;gap:0;height:var(--pine-dimension-450)}"}},[257,"pds-tabs",{tablistLabel:[1,"tablist-label"],componentId:[1,"component-id"],variant:[1],divider:[4],stretch:[4],nav:[4],activeTabName:[1025,"active-tab-name"],activeTabIndex:[1026,"active-tab-index"]},[[16,"pdsTabClick","tabClickHandler"],[0,"keydown","handleKeyDown"]]]),d=r,o=function(){"undefined"!=typeof customElements&&["pds-tabs"].forEach((s=>{"pds-tabs"===s&&(customElements.get(e(s))||customElements.define(e(s),r))}))};export{d as PdsTabs,o as defineCustomElement}
1
+ import{proxyCustomElement as t,HTMLElement as s,h as i,Host as e,transformTag as a}from"@stencil/core/internal/client";import{H as n}from"./attributes.js";const l=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.hostKeeper=new n,this.slotChangeScheduled=!1,this.lastFocusedTab=null,this.handleFocusIn=t=>{var s;const i=null===(s=t.target)||void 0===s?void 0:s.closest("pds-tab");i&&i.closest("pds-tabs")===this.el&&(this.lastFocusedTab=i)},this.handleFocusOut=t=>{const s=this.lastFocusedTab;t.relatedTarget?this.lastFocusedTab=null:queueMicrotask((()=>{this.lastFocusedTab===s&&(null==s?void 0:s.isConnected)&&(this.lastFocusedTab=null)}))},this.divider=!1,this.stretch=!1,this.nav=!1,this.handleSlotChange=()=>{this.slotChangeScheduled||(this.slotChangeScheduled=!0,this.activeTabNameBeforeSlotChange=this.activeTabName,queueMicrotask((()=>{this.slotChangeScheduled=!1,this.recollectAfterSlotChange()})))}}connectedCallback(){this.hostKeeper.connect(this.el),this.el.addEventListener("focusin",this.handleFocusIn),this.el.addEventListener("focusout",this.handleFocusOut);const t=null!=this.tabsSlot;this.setupSlotChangeListeners(),t&&this.handleSlotChange()}disconnectedCallback(){var t,s;this.hostKeeper.disconnect(),this.el.removeEventListener("focusin",this.handleFocusIn),this.el.removeEventListener("focusout",this.handleFocusOut),null===(t=this.tabsSlot)||void 0===t||t.removeEventListener("slotchange",this.handleSlotChange),null===(s=this.tabPanelsSlot)||void 0===s||s.removeEventListener("slotchange",this.handleSlotChange)}componentDidLoad(){this.setupSlotChangeListeners()}tabClickHandler(t){this.componentId===t.detail[1]&&(this.activeTabIndex=t.detail[0],this.activeTabName=this.tabs[this.activeTabIndex].name)}handleKeyDown(t){if(this.isNav)return;const s=t.target.closest("pds-tab"),i=s&&s.closest("pds-tabs")===this.el;["ArrowLeft","ArrowRight","Home","End"].includes(t.key)&&i&&(t.preventDefault(),this.moveActiveTab(t.key))}get isNav(){return!!this.nav}warnOnNavConfig(){var t;if(!(null===(t=this.tabs)||void 0===t?void 0:t.length))return;const s=this.tabs.filter((t=>{const s=t.getAttribute("href");return null!=s&&""!==s})).length;this.nav&&s<this.tabs.length?console.warn("pds-tabs: `nav` is set, so every pds-tab needs an `href`."):!this.nav&&s>0&&console.warn("pds-tabs: a pds-tab has an `href` but `nav` is not set — add `nav` to pds-tabs for navigation mode; the href is ignored in panel mode.")}moveActiveTab(t){const s=this.tabs.length-1;let i=null;switch(t){case"ArrowLeft":i=0===this.activeTabIndex?s:this.activeTabIndex+-1;break;case"ArrowRight":i=this.activeTabIndex===s?0:this.activeTabIndex+1;break;case"Home":i=0;break;case"End":i=s}this.tabs[i].children[0].focus(),this.activeTabName=this.tabs[i].name,this.activeTabIndex=i}findAllChildren(){const t=Array.from(this.el.querySelectorAll("pds-tab")),s=Array.from(this.el.querySelectorAll("pds-tabpanel"));this.tabs=t.filter((t=>t.closest("pds-tabs")===this.el)),this.tabPanels=s.filter((t=>t.closest("pds-tabs")===this.el))}setupSlotChangeListeners(){var t,s,i,e;this.tabsSlot=null===(t=this.el.shadowRoot)||void 0===t?void 0:t.querySelector('slot[name="tabs"]'),this.tabPanelsSlot=null===(s=this.el.shadowRoot)||void 0===s?void 0:s.querySelector('slot[name="tabpanels"]'),null===(i=this.tabsSlot)||void 0===i||i.addEventListener("slotchange",this.handleSlotChange),null===(e=this.tabPanelsSlot)||void 0===e||e.addEventListener("slotchange",this.handleSlotChange)}recollectAfterSlotChange(){const t=this.activeTabNameBeforeSlotChange,s=!this.isNav&&null!=this.lastFocusedTab&&!this.lastFocusedTab.isConnected;this.findAllChildren(),this.warnOnNavConfig(),null==t||this.tabs.some((s=>s.name===t))||(this.activeTabName=void 0),this.passPropsToChildren(),s&&(this.lastFocusedTab=null,requestAnimationFrame((()=>{var t;const s=document.activeElement;if(s&&s!==document.body)return;const i=this.tabs.find((t=>t.name===this.activeTabName));null===(t=null==i?void 0:i.querySelector("button"))||void 0===t||t.focus()})))}propGeneration(t,s=0){t.parentComponentId=""+this.componentId,t.variant=this.variant,t.selected=this.activeTabName===t.name,t.index=s}passPropsToChildren(){var t;if(!this.nav&&null==this.activeTabName&&this.tabs.length){const s=null!==(t=this.tabs.find((t=>!t.disabled)))&&void 0!==t?t:this.tabs[0];this.activeTabName=s.name}this.tabs.forEach(((t,s)=>{this.activeTabName===t.name&&(this.activeTabIndex=s),this.propGeneration(t,s),t.navMode=this.nav})),this.tabPanels.forEach((t=>{this.propGeneration(t),t.stretch=this.stretch}))}classNames(){let t="pds-tabs";return this.variant&&"primary"!=this.variant&&(t+=" pds-tabs--"+this.variant),this.divider&&(t+=" pds-tabs--divider"),this.stretch&&(t+=" pds-tabs--stretch"),t}componentWillLoad(){this.findAllChildren(),this.warnOnNavConfig()}componentWillRender(){this.passPropsToChildren()}render(){const t=this.isNav?i("nav",{class:"pds-tabs__tablist","aria-label":this.tablistLabel||void 0,part:"tab-list"},i("slot",{name:"tabs"})):i("div",{class:"pds-tabs__tablist",role:"tablist","aria-label":this.tablistLabel,part:"tab-list"},i("slot",{name:"tabs"})),s=this.classNames();return this.hostKeeper.record(s),i(e,{key:"91a9a5cf4348b73ef5ec21430db20468fb67906c","active-tab-name":this.activeTabName,class:s,id:this.componentId},t,i("slot",{key:"f0ec002e513f3e91956e905c23e35dae0e6328ad",name:"tabpanels"}))}get el(){return this}static get style(){return":host{--tabs-dimension-panel-margin-top:var(--pine-dimension-none);--tabs-dimension-panel-padding:0;display:block}.pds-tabs__tablist{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:var(--pine-dimension-md)}:host(.pds-tabs--divider) .pds-tabs__tablist{-webkit-border-after:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);border-block-end:var(--pine-border-width-thin) solid var(--pine-color-border-subtle)}:host(.pds-tabs--stretch){block-size:100%;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host(.pds-tabs--stretch) .pds-tabs__tablist{-ms-flex:0 0 auto;flex:0 0 auto}:host(.pds-tabs--availability) .pds-tabs__tablist{gap:var(--pine-dimension-xs)}:host(.pds-tabs--filter) .pds-tabs__tablist{gap:var(--pine-dimension-sm)}:host(.pds-tabs--pill) .pds-tabs__tablist{background-color:var(--pine-color-background-app);border:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);border-radius:var(--pine-dimension-100);display:-ms-inline-flexbox;display:inline-flex;display:-ms-flexbox;display:flex;gap:0;height:var(--pine-dimension-450)}"}},[257,"pds-tabs",{tablistLabel:[1,"tablist-label"],componentId:[1,"component-id"],variant:[1],divider:[4],stretch:[4],nav:[4],activeTabName:[1025,"active-tab-name"],activeTabIndex:[1026,"active-tab-index"]},[[16,"pdsTabClick","tabClickHandler"],[0,"keydown","handleKeyDown"]]]),o=l,h=function(){"undefined"!=typeof customElements&&["pds-tabs"].forEach((t=>{"pds-tabs"===t&&(customElements.get(a(t))||customElements.define(a(t),l))}))};export{o as PdsTabs,h as defineCustomElement}
@@ -1 +1 @@
1
- import{proxyCustomElement as t,HTMLElement as e,h as i,transformTag as n}from"@stencil/core/internal/client";import{s}from"./utils.js";import{s as o}from"./truncation-tooltip.js";const a=["2xl","xl","lg","md","sm","xs","2xs","h1","h2","h3","h4","h5","h6"],r=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.truncationCleanup=null,this.tag="p"}handleTruncateChange(t){t?this.initTruncationTooltip():this.destroyTruncationTooltip()}validateSize(t){if(void 0!==t&&""!==t&&!a.includes(t)){const e=t.length>80?`${t.slice(0,80)}…`:t;console.warn(`pds-text: invalid size "${e}". Valid values are: ${a.join(", ")}.`)}}componentWillLoad(){this.validateSize(this.size)}componentDidLoad(){this.truncate&&this.initTruncationTooltip()}disconnectedCallback(){this.destroyTruncationTooltip()}initTruncationTooltip(){this.destroyTruncationTooltip(),this.contentEl&&(this.truncationCleanup=o({hostEl:this.el,contentEl:this.contentEl,getTooltipText:()=>this.el.textContent||""}))}destroyTruncationTooltip(){this.truncationCleanup&&(this.truncationCleanup(),this.truncationCleanup=null)}render(){const t=this.tag,e=`\n pds-text\n ${void 0!==this.align&&""!==this.align.trim()?`pds-text--align-${this.align}`:""}\n ${void 0!==this.gutter&&""!==this.gutter.trim()?`pds-text--gutter-${this.gutter}`:""}\n ${void 0!==this.size&&""!==this.size.trim()?`pds-text--size-${this.size}`:""}\n ${void 0!==this.weight&&""!==this.weight.trim()?`pds-text--weight-${this.weight}`:""}\n ${void 0!==this.decoration&&""!==this.decoration.trim()?`pds-text--decoration-${this.decoration}`:""}\n `;return i(t,{key:"98269ec5b06387f89026a4f1327688c611b25a46",ref:t=>this.contentEl=t,style:this.color&&s(this.color),class:e,part:"content"},i("slot",{key:"73b6169bdd25a73930d1a01db3a0b5359491ab67"}))}get el(){return this}static get watchers(){return{truncate:[{handleTruncateChange:0}],size:[{validateSize:0}]}}static get style(){return":host{display:inline}:host([decoration=underline-dotted])>*{-webkit-text-decoration-color:var(--pine-color-text-tertiary);text-decoration-color:var(--pine-color-text-tertiary);-webkit-text-decoration-line:underline;text-decoration-line:underline;-webkit-text-decoration-style:dotted;text-decoration-style:dotted;text-decoration-thickness:12%;text-underline-offset:0.3rem;text-underline-position:under}:host([decoration=strikethrough])>*{text-decoration:line-through}h1{font:var(--pine-typography-heading-1);letter-spacing:var(--pine-letter-spacing-heading-1)}h2{font:var(--pine-typography-heading-2);letter-spacing:var(--pine-letter-spacing-heading-2)}h3{font:var(--pine-typography-heading-3);letter-spacing:var(--pine-letter-spacing-heading-3)}h4{font:var(--pine-typography-heading-4);letter-spacing:var(--pine-letter-spacing-heading-4)}h5{font:var(--pine-typography-heading-5);letter-spacing:var(--pine-letter-spacing-heading-5)}h6{font:var(--pine-typography-heading-6);letter-spacing:var(--pine-letter-spacing-heading-6)}code,em,p,pre,strong{font:var(--pine-typography-body);letter-spacing:var(--pine-letter-spacing)}code,pre{font-family:monospace;letter-spacing:0;line-height:1}em{font-style:normal}strong{font-weight:bolder}:host([truncate]){display:block;min-width:0}:host([truncate])>*{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host([italic])>*{font-style:italic}.pds-text{color:var(--color, var(--pine-color-text));margin:var(--pine-dimension-none)}.pds-text--size-2xl{font-size:var(--pine-font-size-body-2xl)}.pds-text--size-xl{font-size:var(--pine-font-size-body-xl)}.pds-text--size-lg{font-size:var(--pine-font-size-body-lg)}.pds-text--size-md{font-size:var(--pine-font-size-body-md)}.pds-text--size-sm{font-size:var(--pine-font-size-body-sm)}.pds-text--size-xs{font-size:var(--pine-font-size-body-xs)}.pds-text--size-2xs{font-size:var(--pine-font-size-body-2xs)}.pds-text--size-h1{font-size:var(--pine-font-size-heading-1)}.pds-text--size-h2{font-size:var(--pine-font-size-heading-2)}.pds-text--size-h3{font-size:var(--pine-font-size-heading-3)}.pds-text--size-h4{font-size:var(--pine-font-size-heading-4)}.pds-text--size-h5{font-size:var(--pine-font-size-heading-5)}.pds-text--size-h6{font-size:var(--pine-font-size-heading-6)}.pds-text--weight-extra-light{font-weight:var(--pine-font-weight-extra-light)}.pds-text--weight-light{font-weight:var(--pine-font-weight-light)}.pds-text--weight-regular{font-weight:var(--pine-font-weight-regular)}.pds-text--weight-medium{font-weight:var(--pine-font-weight-medium)}.pds-text--weight-semibold{font-weight:var(--pine-font-weight-semi-bold)}.pds-text--weight-bold{font-weight:var(--pine-font-weight-bold)}.pds-text--gutter-2xl{-webkit-margin-after:var(--pine-dimension-2xl);margin-block-end:var(--pine-dimension-2xl)}.pds-text--gutter-xl{-webkit-margin-after:var(--pine-dimension-xl);margin-block-end:var(--pine-dimension-xl)}.pds-text--gutter-lg{-webkit-margin-after:var(--pine-dimension-lg);margin-block-end:var(--pine-dimension-lg)}.pds-text--gutter-md{-webkit-margin-after:var(--pine-dimension-md);margin-block-end:var(--pine-dimension-md)}.pds-text--gutter-sm{-webkit-margin-after:var(--pine-dimension-sm);margin-block-end:var(--pine-dimension-sm)}.pds-text--gutter-xs{-webkit-margin-after:var(--pine-dimension-xs);margin-block-end:var(--pine-dimension-xs)}.pds-text--gutter-2xs{-webkit-margin-after:var(--pine-dimension-2xs);margin-block-end:var(--pine-dimension-2xs)}.pds-text--align-start{text-align:start}.pds-text--align-center{text-align:center}.pds-text--align-end{text-align:end}.pds-text--align-justify{text-align:justify}"}},[257,"pds-text",{align:[1],color:[1],decoration:[1],gutter:[1],italic:[4],size:[1],weight:[1],tag:[1],truncate:[516]},void 0,{truncate:[{handleTruncateChange:0}],size:[{validateSize:0}]}]);function d(){"undefined"!=typeof customElements&&["pds-text"].forEach((t=>{"pds-text"===t&&(customElements.get(n(t))||customElements.define(n(t),r))}))}export{r as P,a as T,d}
1
+ import{proxyCustomElement as t,HTMLElement as e,h as i,transformTag as n}from"@stencil/core/internal/client";import{s}from"./utils.js";import{s as o}from"./truncation-tooltip.js";const a=["2xl","xl","lg","md","sm","xs","2xs","h1","h2","h3","h4","h5","h6"],r=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.truncationCleanup=null,this.tag="p"}handleTruncateChange(t){t?this.initTruncationTooltip():this.destroyTruncationTooltip()}validateSize(t){if(void 0!==t&&""!==t&&!a.includes(t)){const e=t.length>80?`${t.slice(0,80)}…`:t;console.warn(`pds-text: invalid size "${e}". Valid values are: ${a.join(", ")}.`)}}componentWillLoad(){this.validateSize(this.size)}componentDidLoad(){this.truncate&&this.initTruncationTooltip()}disconnectedCallback(){this.destroyTruncationTooltip()}initTruncationTooltip(){this.destroyTruncationTooltip(),this.contentEl&&(this.truncationCleanup=o({hostEl:this.el,contentEl:this.contentEl,getTooltipText:()=>this.el.textContent||""}))}destroyTruncationTooltip(){this.truncationCleanup&&(this.truncationCleanup(),this.truncationCleanup=null)}render(){const t=this.tag,e=`\n pds-text\n ${void 0!==this.align&&""!==this.align.trim()?`pds-text--align-${this.align}`:""}\n ${void 0!==this.gutter&&""!==this.gutter.trim()?`pds-text--gutter-${this.gutter}`:""}\n ${void 0!==this.size&&""!==this.size.trim()?`pds-text--size-${this.size}`:""}\n ${void 0!==this.weight&&""!==this.weight.trim()?`pds-text--weight-${this.weight}`:""}\n ${void 0!==this.decoration&&""!==this.decoration.trim()?`pds-text--decoration-${this.decoration}`:""}\n `;return i(t,{key:"6ae89af63963745cd4e8fa734a62f37bc27c59ac",ref:t=>this.contentEl=t,style:this.color&&s(this.color),class:e,part:"content"},i("slot",{key:"008f5852aeb4b43cff1a2fea9be9d8fbba9f7934"}))}get el(){return this}static get watchers(){return{truncate:[{handleTruncateChange:0}],size:[{validateSize:0}]}}static get style(){return":host{display:inline}:host([decoration=underline-dotted])>*{-webkit-text-decoration-color:var(--pine-color-text-tertiary);text-decoration-color:var(--pine-color-text-tertiary);-webkit-text-decoration-line:underline;text-decoration-line:underline;-webkit-text-decoration-style:dotted;text-decoration-style:dotted;text-decoration-thickness:12%;text-underline-offset:0.3rem;text-underline-position:under}:host([decoration=strikethrough])>*{text-decoration:line-through}h1{font:var(--pine-typography-heading-1);letter-spacing:var(--pine-letter-spacing-heading-1)}h2{font:var(--pine-typography-heading-2);letter-spacing:var(--pine-letter-spacing-heading-2)}h3{font:var(--pine-typography-heading-3);letter-spacing:var(--pine-letter-spacing-heading-3)}h4{font:var(--pine-typography-heading-4);letter-spacing:var(--pine-letter-spacing-heading-4)}h5{font:var(--pine-typography-heading-5);letter-spacing:var(--pine-letter-spacing-heading-5)}h6{font:var(--pine-typography-heading-6);letter-spacing:var(--pine-letter-spacing-heading-6)}code,em,p,pre,strong{font:var(--pine-typography-body);letter-spacing:var(--pine-letter-spacing)}code,pre{font-family:monospace;letter-spacing:0;line-height:1}em{font-style:normal}strong{font-weight:bolder}:host([truncate]){display:block;min-width:0}:host([truncate])>*{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host([italic])>*{font-style:italic}.pds-text{color:var(--color, var(--pine-color-text));margin:var(--pine-dimension-none)}.pds-text--size-2xl{font-size:var(--pine-font-size-body-2xl)}.pds-text--size-xl{font-size:var(--pine-font-size-body-xl)}.pds-text--size-lg{font-size:var(--pine-font-size-body-lg)}.pds-text--size-md{font-size:var(--pine-font-size-body-md)}.pds-text--size-sm{font-size:var(--pine-font-size-body-sm)}.pds-text--size-xs{font-size:var(--pine-font-size-body-xs)}.pds-text--size-2xs{font-size:var(--pine-font-size-body-2xs)}.pds-text--size-h1{font-size:var(--pine-font-size-heading-1)}.pds-text--size-h2{font-size:var(--pine-font-size-heading-2)}.pds-text--size-h3{font-size:var(--pine-font-size-heading-3)}.pds-text--size-h4{font-size:var(--pine-font-size-heading-4)}.pds-text--size-h5{font-size:var(--pine-font-size-heading-5)}.pds-text--size-h6{font-size:var(--pine-font-size-heading-6)}.pds-text--weight-extra-light{font-weight:var(--pine-font-weight-extra-light)}.pds-text--weight-light{font-weight:var(--pine-font-weight-light)}.pds-text--weight-regular{font-weight:var(--pine-font-weight-regular)}.pds-text--weight-medium{font-weight:var(--pine-font-weight-medium)}.pds-text--weight-semibold{font-weight:var(--pine-font-weight-semi-bold)}.pds-text--weight-bold{font-weight:var(--pine-font-weight-bold)}.pds-text--gutter-2xl{-webkit-margin-after:var(--pine-dimension-2xl);margin-block-end:var(--pine-dimension-2xl)}.pds-text--gutter-xl{-webkit-margin-after:var(--pine-dimension-xl);margin-block-end:var(--pine-dimension-xl)}.pds-text--gutter-lg{-webkit-margin-after:var(--pine-dimension-lg);margin-block-end:var(--pine-dimension-lg)}.pds-text--gutter-md{-webkit-margin-after:var(--pine-dimension-md);margin-block-end:var(--pine-dimension-md)}.pds-text--gutter-sm{-webkit-margin-after:var(--pine-dimension-sm);margin-block-end:var(--pine-dimension-sm)}.pds-text--gutter-xs{-webkit-margin-after:var(--pine-dimension-xs);margin-block-end:var(--pine-dimension-xs)}.pds-text--gutter-2xs{-webkit-margin-after:var(--pine-dimension-2xs);margin-block-end:var(--pine-dimension-2xs)}.pds-text--align-start{text-align:start}.pds-text--align-center{text-align:center}.pds-text--align-end{text-align:end}.pds-text--align-justify{text-align:justify}"}},[257,"pds-text",{align:[1],color:[1],decoration:[1],gutter:[1],italic:[4],size:[1],weight:[1],tag:[1],truncate:[516]},void 0,{truncate:[{handleTruncateChange:0}],size:[{validateSize:0}]}]);function d(){"undefined"!=typeof customElements&&["pds-text"].forEach((t=>{"pds-text"===t&&(customElements.get(n(t))||customElements.define(n(t),r))}))}export{r as P,a as T,d}
@@ -1 +1 @@
1
- import{proxyCustomElement as e,HTMLElement as t,createEvent as i,h as a,Host as s,transformTag as r}from"@stencil/core/internal/client";import{i as o,b as n,e as l,a as d,m as c}from"./form.js";import{d as h,f as p,c as b}from"./utils.js";import{i as u,a as m}from"./attributes.js";import{h as x}from"./index2.js";import{f as v}from"./i18n-format.js";import{d as g}from"./pds-icon2.js";const f=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.pdsBlur=i(this,"pdsBlur",7),this.pdsFocus=i(this,"pdsFocus",7),this.pdsInput=i(this,"pdsInput",7),this.pdsTextareaChange=i(this,"pdsTextareaChange",7),this.pdsKeyDown=i(this,"pdsKeyDown",7),this.inheritedAttributes={},this._type="textarea",this.disabled=!1,this.invalid=!1,this.name=this.componentId,this.readonly=!1,this.required=!1,this.value="",this.hasFocus=!1,this.hasAction=!1,this.characterCountLabel="{current} of {max} characters",this.onBlur=e=>{this.hasFocus=!1,this.focusedValue!==this.value&&this.emitValueChange(e),this.pdsBlur.emit(e)},this.onFocus=e=>{this.hasFocus=!0,this.focusedValue=this.value,this.pdsFocus.emit(e)},this.onInput=e=>{const t=e.target;t&&(this.maxLength&&t.value.length>this.maxLength&&(t.value=t.value.substring(0,this.maxLength)),this.value=t.value||""),this.emitInputChange(e),this.maxLength&&"undefined"!=typeof ResizeObserver&&requestAnimationFrame((()=>{this.updateCharacterCounterPosition()}))},this.onTextareaChange=e=>{this.emitValueChange(e)},this.onKeyDown=e=>{this.pdsKeyDown.emit(e)}}async setFocus(){this.nativeTextarea&&this.nativeTextarea.focus()}debounceChanged(){const{pdsInput:e,debounce:t,originalPdsInput:i}=this;this.pdsInput=void 0===t?null!=i?i:e:h(e,t),p(e)}valueChanged(){const e=this.nativeTextarea,t=this.getValue();e&&e.value!==t&&(e.value=t),this.updateFormValue(),this.maxLength&&"undefined"!=typeof ResizeObserver&&this.updateCharacterCounterPosition()}maxLengthChanged(){if(this.resizeObserver&&this.resizeObserver.disconnect(),this.maxLength&&this.nativeTextarea&&this.setupResizeObserver(),!o()&&this.internals&&this.internals.setValidity&&this.nativeTextarea){const e=this.nativeTextarea.value.length>(this.maxLength||0);this.internals.setValidity({tooLong:e},e?"Value exceeds maxLength":"",this.nativeTextarea)}}emitInputChange(e){const{value:t}=this;this.pdsInput.emit({value:t,event:e})}emitValueChange(e){const t=e.target;n(t,this);const{value:i}=t,a=null==i?i:""+i;this.focusedValue=a,this.pdsTextareaChange.emit({value:a,event:e})}getValue(){return this.value||""}textareaClassNames(){const e=["pds-textarea__field"];return this.invalid&&!0===this.invalid&&e.push("is-invalid"),e.join(" ")}connectedCallback(){var e;null!==(e=this.originalPdsInput)&&void 0!==e||(this.originalPdsInput=this.pdsInput),this.debounceChanged(),this.el.attachInternals&&!this.internals&&(this.internals=this.el.attachInternals())}disconnectedCallback(){b(this.pdsInput),this.resizeObserver&&this.resizeObserver.disconnect()}componentWillLoad(){this.inheritedAttributes=Object.assign(Object.assign({},u(this.el)),m(this.el)),this.hasAction=null!==this.el.querySelector('[slot="action"]')}componentDidLoad(){this.updateFormValue(),this.setupResizeObserver(),l(this.el,(()=>this._type))}setupResizeObserver(){this.maxLength&&this.nativeTextarea&&"undefined"!=typeof ResizeObserver&&(this.resizeObserver=new ResizeObserver((()=>{requestAnimationFrame((()=>{this.updateCharacterCounterPosition()}))})),this.resizeObserver.observe(this.nativeTextarea),requestAnimationFrame((()=>{this.updateCharacterCounterPosition()})))}updateCharacterCounterPosition(){if(!this.characterCounter||!this.nativeTextarea)return;if("undefined"==typeof ResizeObserver)return;if(0===this.characterCounter.offsetWidth||0===this.characterCounter.offsetHeight)return;const e=this.nativeTextarea.offsetWidth,t=this.nativeTextarea.offsetHeight,i=this.characterCounter.offsetWidth,a=this.characterCounter.offsetHeight,s=t-a-8,r=Math.max(8,Math.min(e-i-8,e-i-8)),o=Math.max(8,Math.min(s,t-a-8));this.characterCounter.style.position="absolute",this.characterCounter.style.left=r+"px",this.characterCounter.style.top=o+"px",this.characterCounter.style.right="auto",this.characterCounter.style.bottom="auto"}renderCharacterCounter(){if(!this.maxLength)return null;const e=this.getValue().length;return a("div",{class:"pds-textarea__character-counter",ref:e=>this.characterCounter=e,role:"status","aria-live":"polite","aria-label":v(this.characterCountLabel,{current:e,max:this.maxLength})},e," / ",this.maxLength)}renderAction(){return null!==this.el.querySelector('[slot="action"]')?a("div",{class:"pds-textarea__action",part:"action"},a("slot",{name:"action"})):null}updateFormValue(){if(!o()&&this.internals&&this.internals.setFormValue){const e=this.getValue();this.internals.setFormValue(e||null),this.nativeTextarea&&this.internals&&this.internals.setValidity&&this.internals.setValidity(this.nativeTextarea.validity,this.nativeTextarea.validationMessage,this.nativeTextarea)}}formResetCallback(){this.value="",this.updateFormValue()}formDisabledCallback(e){this.disabled=e}formStateRestoreCallback(e){if("string"==typeof e)this.value=e;else if(e instanceof FormData&&this.name){const t=e.get(this.name);"string"==typeof t&&(this.value=t)}}render(){const e=this.getValue();return a(s,{key:"2544624ceb5a51981954b76eb7a96f8bf0a258b5","aria-disabled":this.disabled?"true":null,"aria-readonly":this.readonly?"true":null,"has-action":this.hasAction&&!this.hideLabel?"true":null},a("div",{key:"e85e356a15dd11bbea276b122e67da23342e6ceb",class:"pds-textarea"},this.label&&a("div",{key:"452e96073c2045c2cb2dfa0c9ef7f7102096ab51",class:"pds-textarea__label-wrapper"},a("label",{key:"84f88bb8211120801cab8b0d7a4915a128fadbfb",htmlFor:this.componentId},a("span",{key:"43038785de0cb8c833ccd546a00bfc8879c94ecb",class:this.hideLabel?"visually-hidden":""},this.label)),!this.hideLabel&&this.renderAction()),a("div",{key:"868a11635731026168c1ff75d81121ddb96ab7a6",class:"pds-textarea__field-wrapper"},a("textarea",Object.assign({key:"80cb7da264045aba177d20f18df31b274afbf485",ref:e=>this.nativeTextarea=e,"aria-describedby":d(this.componentId,this.invalid,this.helperMessage,this.errorMessage),"aria-invalid":this.invalid?"true":void 0,autocomplete:this.autocomplete,class:this.textareaClassNames(),disabled:this.disabled,id:this.componentId,maxlength:this.maxLength,name:this.name,placeholder:this.placeholder,readOnly:this.readonly,required:this.required,rows:this.rows,onBlur:this.onBlur,onChange:this.onTextareaChange,onFocus:this.onFocus,onInput:this.onInput,onKeyDown:this.onKeyDown},this.inheritedAttributes),e),this.renderCharacterCounter()),this.helperMessage&&a("p",{key:"493b4378b668a96c7c66cbf2435f9c9d06bd0a72",class:"pds-textarea__helper-message",id:c(this.componentId,"helper")},this.helperMessage),this.invalid&&a("p",{key:"ae6826d389a2a92fbff8de62a0fd55811764eb15","aria-live":"assertive",class:"pds-textarea__error-message",id:c(this.componentId,"error")},a("pds-icon",{key:"e3dd638311ee2617c8b8ae5743b4e87e5a773ebd",icon:x,size:"small"}),this.errorMessage)))}static get formAssociated(){return!0}get el(){return this}static get watchers(){return{debounce:[{debounceChanged:0}],value:[{valueChanged:0}],maxLength:[{maxLengthChanged:0}]}}static get style(){return":host{display:inline-block}:host([aria-disabled=true]) label{color:var(--pine-color-text-label-disabled)}:host([aria-readonly=true]) label{color:var(--pine-color-text-label-readonly)}label{color:var(--pine-color-text-label);font:var(--pine-typography-body-medium);letter-spacing:var(--pine-letter-spacing)}:host{--pine-input-color-background-danger:var(--pine-color-red-050)}:host{display:inline-block;width:100%}:host([aria-readonly=true]) textarea{background-color:var(--pine-color-background-container-disabled);color:var(--pine-color-text-readonly)}:host([highlight]:not([disabled]):not([aria-disabled=true]):not([aria-readonly=true])) .pds-textarea__field:not(.is-invalid){background-color:var(--pine-color-accent-disabled);border-color:var(--pine-color-accent);color:var(--pine-color-text-accent)}:host([highlight]:not([disabled]):not([aria-disabled=true]):not([aria-readonly=true])) .pds-textarea__field:not(.is-invalid):hover{border-color:var(--pine-color-accent-hover)}:host([highlight]:not([disabled]):not([aria-disabled=true]):not([aria-readonly=true])) .pds-textarea__field:not(.is-invalid):focus-visible{outline-color:var(--pine-color-focus-ring)}:host([highlight]:not([disabled]):not([aria-disabled=true]):not([aria-readonly=true])) .pds-textarea__field:not(.is-invalid)~.pds-textarea__character-counter{background:color-mix(in srgb, var(--pine-color-accent-disabled) 80%, transparent);color:var(--pine-color-text-accent)}.pds-textarea{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.pds-textarea__label-wrapper{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}.pds-textarea__action{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;gap:var(--pine-dimension-xs);-webkit-margin-start:var(--pine-dimension-xs);margin-inline-start:var(--pine-dimension-xs)}label{display:block;-webkit-margin-after:var(--pine-dimension-xs);margin-block-end:var(--pine-dimension-xs)}.pds-textarea__label-wrapper label{-webkit-margin-after:0;margin-block-end:0}.pds-textarea__helper-message{color:var(--pine-color-text-message);font:var(--pine-typography-body-sm-medium);-webkit-margin-before:var(--pine-dimension-2xs);margin-block-start:var(--pine-dimension-2xs)}.pds-textarea__error-message{color:var(--pine-color-text-message-danger);display:-ms-flexbox;display:flex;font:var(--pine-typography-body-sm-medium);gap:var(--pine-dimension-2xs);-webkit-margin-before:var(--pine-dimension-2xs);margin-block-start:var(--pine-dimension-2xs)}.pds-textarea__error-message pds-icon{-webkit-margin-before:var(--pine-dimension-025);margin-block-start:var(--pine-dimension-025)}.pds-textarea__field-wrapper{display:inline-block;position:relative;width:100%}.pds-textarea__field{background-color:var(--pine-color-background-container);border:var(--pine-border);border-radius:calc(var(--pine-dimension-xs) * 1.25);-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--pine-color-text);font:var(--pine-typography-body);letter-spacing:var(--pine-letter-spacing);min-height:calc(var(--pine-dimension-xl) * 2);min-width:calc(var(--pine-dimension-xl) * 2);padding:var(--pine-dimension-xs) var(--pine-dimension-sm);resize:both;width:100%}:host([max-length]) .pds-textarea__field{padding-bottom:calc(var(--pine-dimension-xs) + var(--pine-dimension-md))}.pds-textarea__field:hover:not(:disabled,.is-invalid){border:var(--pine-border-hover)}.pds-textarea__field:disabled{background-color:var(--pine-color-background-container-disabled);color:var(--pine-color-text-disabled);cursor:not-allowed}.pds-textarea__field:focus-visible{outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}.pds-textarea__field::-webkit-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-textarea__field::-moz-placeholder{color:var(--pine-color-text-placeholder)}.pds-textarea__field:-ms-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-textarea__field::-ms-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-textarea__field::placeholder{color:var(--pine-color-text-placeholder)}.pds-textarea__field.is-invalid{background-color:var(--pine-input-color-background-danger);border-color:var(--pine-color-border-danger)}:host-context([data-theme=dark]) .pds-textarea__field.is-invalid{background-color:var(--pine-color-red-950)}.pds-textarea__field.is-invalid:focus-visible{outline-color:var(--pine-color-focus-ring-danger)}.pds-textarea__character-counter{background:color-mix(in srgb, var(--pine-color-background-container) 80%, transparent);border-radius:calc(var(--pine-dimension-2xs) * 0.5);color:var(--pine-color-text-muted);font:var(--pine-typography-body-sm-medium);padding:calc(var(--pine-dimension-2xs) * 0.5) var(--pine-dimension-2xs);pointer-events:none;position:absolute;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;z-index:var(--pine-z-index)}:host([aria-disabled=true]) .pds-textarea__character-counter{background-color:var(--pine-color-background-container-disabled);color:var(--pine-color-text-disabled)}:host([aria-readonly=true]) .pds-textarea__character-counter{background-color:var(--pine-color-background-container-disabled);color:var(--pine-color-text-readonly)}.pds-textarea__field.is-invalid~.pds-textarea__character-counter{background-color:var(--pine-input-color-background-danger)}:host-context([data-theme=dark]) .pds-textarea__field.is-invalid~.pds-textarea__character-counter{background-color:var(--pine-color-red-950)}.visually-hidden{border:0;clip:rect(0 0 0 0);-webkit-clip-path:polygon(0 0, 0 0, 0 0);clip-path:polygon(0 0, 0 0, 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}"}},[321,"pds-textarea",{autocomplete:[1],componentId:[1,"component-id"],disabled:[4],debounce:[2],errorMessage:[1,"error-message"],helperMessage:[1,"helper-message"],invalid:[1028],label:[1],hideLabel:[4,"hide-label"],name:[1],placeholder:[1],readonly:[4],required:[4],rows:[2],maxLength:[514,"max-length"],highlight:[516],value:[1025],characterCountLabel:[1,"character-count-label"],hasFocus:[32],hasAction:[32],setFocus:[64]},void 0,{debounce:[{debounceChanged:0}],value:[{valueChanged:0}],maxLength:[{maxLengthChanged:0}]}]),_=f,y=function(){"undefined"!=typeof customElements&&["pds-textarea","pds-icon"].forEach((e=>{switch(e){case"pds-textarea":customElements.get(r(e))||customElements.define(r(e),f);break;case"pds-icon":customElements.get(r(e))||g()}}))};export{_ as PdsTextarea,y as defineCustomElement}
1
+ import{proxyCustomElement as e,HTMLElement as t,createEvent as i,h as a,Host as s,transformTag as r}from"@stencil/core/internal/client";import{i as o,b as n,e as l,a as d,m as c}from"./form.js";import{d as h,f as p,c as b}from"./utils.js";import{i as u,a as m}from"./attributes.js";import{h as x}from"./index2.js";import{f as v}from"./i18n-format.js";import{d as g}from"./pds-icon2.js";const f=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.pdsBlur=i(this,"pdsBlur",7),this.pdsFocus=i(this,"pdsFocus",7),this.pdsInput=i(this,"pdsInput",7),this.pdsTextareaChange=i(this,"pdsTextareaChange",7),this.pdsKeyDown=i(this,"pdsKeyDown",7),this.inheritedAttributes={},this._type="textarea",this.disabled=!1,this.invalid=!1,this.name=this.componentId,this.readonly=!1,this.required=!1,this.value="",this.hasFocus=!1,this.hasAction=!1,this.characterCountLabel="{current} of {max} characters",this.onBlur=e=>{this.hasFocus=!1,this.focusedValue!==this.value&&this.emitValueChange(e),this.pdsBlur.emit(e)},this.onFocus=e=>{this.hasFocus=!0,this.focusedValue=this.value,this.pdsFocus.emit(e)},this.onInput=e=>{const t=e.target;t&&(this.maxLength&&t.value.length>this.maxLength&&(t.value=t.value.substring(0,this.maxLength)),this.value=t.value||""),this.emitInputChange(e),this.maxLength&&"undefined"!=typeof ResizeObserver&&requestAnimationFrame((()=>{this.updateCharacterCounterPosition()}))},this.onTextareaChange=e=>{this.emitValueChange(e)},this.onKeyDown=e=>{this.pdsKeyDown.emit(e)}}async setFocus(){this.nativeTextarea&&this.nativeTextarea.focus()}debounceChanged(){const{pdsInput:e,debounce:t,originalPdsInput:i}=this;this.pdsInput=void 0===t?null!=i?i:e:h(e,t),p(e)}valueChanged(){const e=this.nativeTextarea,t=this.getValue();e&&e.value!==t&&(e.value=t),this.updateFormValue(),this.maxLength&&"undefined"!=typeof ResizeObserver&&this.updateCharacterCounterPosition()}maxLengthChanged(){if(this.resizeObserver&&this.resizeObserver.disconnect(),this.maxLength&&this.nativeTextarea&&this.setupResizeObserver(),!o()&&this.internals&&this.internals.setValidity&&this.nativeTextarea){const e=this.nativeTextarea.value.length>(this.maxLength||0);this.internals.setValidity({tooLong:e},e?"Value exceeds maxLength":"",this.nativeTextarea)}}emitInputChange(e){const{value:t}=this;this.pdsInput.emit({value:t,event:e})}emitValueChange(e){const t=e.target;n(t,this);const{value:i}=t,a=null==i?i:""+i;this.focusedValue=a,this.pdsTextareaChange.emit({value:a,event:e})}getValue(){return this.value||""}textareaClassNames(){const e=["pds-textarea__field"];return this.invalid&&!0===this.invalid&&e.push("is-invalid"),e.join(" ")}connectedCallback(){var e;null!==(e=this.originalPdsInput)&&void 0!==e||(this.originalPdsInput=this.pdsInput),this.debounceChanged(),this.el.attachInternals&&!this.internals&&(this.internals=this.el.attachInternals())}disconnectedCallback(){b(this.pdsInput),this.resizeObserver&&this.resizeObserver.disconnect()}componentWillLoad(){this.inheritedAttributes=Object.assign(Object.assign({},u(this.el)),m(this.el)),this.hasAction=null!==this.el.querySelector('[slot="action"]')}componentDidLoad(){this.updateFormValue(),this.setupResizeObserver(),l(this.el,(()=>this._type))}setupResizeObserver(){this.maxLength&&this.nativeTextarea&&"undefined"!=typeof ResizeObserver&&(this.resizeObserver=new ResizeObserver((()=>{requestAnimationFrame((()=>{this.updateCharacterCounterPosition()}))})),this.resizeObserver.observe(this.nativeTextarea),requestAnimationFrame((()=>{this.updateCharacterCounterPosition()})))}updateCharacterCounterPosition(){if(!this.characterCounter||!this.nativeTextarea)return;if("undefined"==typeof ResizeObserver)return;if(0===this.characterCounter.offsetWidth||0===this.characterCounter.offsetHeight)return;const e=this.nativeTextarea.offsetWidth,t=this.nativeTextarea.offsetHeight,i=this.characterCounter.offsetWidth,a=this.characterCounter.offsetHeight,s=t-a-8,r=Math.max(8,Math.min(e-i-8,e-i-8)),o=Math.max(8,Math.min(s,t-a-8));this.characterCounter.style.position="absolute",this.characterCounter.style.left=r+"px",this.characterCounter.style.top=o+"px",this.characterCounter.style.right="auto",this.characterCounter.style.bottom="auto"}renderCharacterCounter(){if(!this.maxLength)return null;const e=this.getValue().length;return a("div",{class:"pds-textarea__character-counter",ref:e=>this.characterCounter=e,role:"status","aria-live":"polite","aria-label":v(this.characterCountLabel,{current:e,max:this.maxLength})},e," / ",this.maxLength)}renderAction(){return null!==this.el.querySelector('[slot="action"]')?a("div",{class:"pds-textarea__action",part:"action"},a("slot",{name:"action"})):null}updateFormValue(){if(!o()&&this.internals&&this.internals.setFormValue){const e=this.getValue();this.internals.setFormValue(e||null),this.nativeTextarea&&this.internals&&this.internals.setValidity&&this.internals.setValidity(this.nativeTextarea.validity,this.nativeTextarea.validationMessage,this.nativeTextarea)}}formResetCallback(){this.value="",this.updateFormValue()}formDisabledCallback(e){this.disabled=e}formStateRestoreCallback(e){if("string"==typeof e)this.value=e;else if(e instanceof FormData&&this.name){const t=e.get(this.name);"string"==typeof t&&(this.value=t)}}render(){const e=this.getValue();return a(s,{key:"5933dab0c3cd25b1cf2f6851ece8e8064bc7f3b9","aria-disabled":this.disabled?"true":null,"aria-readonly":this.readonly?"true":null,"has-action":this.hasAction&&!this.hideLabel?"true":null},a("div",{key:"4f1752514d8e5b0f0e3439515cb9e5f043607da1",class:"pds-textarea"},this.label&&a("div",{key:"d4e6df0b381d781b70eeae72ff2f0e9428c0d901",class:"pds-textarea__label-wrapper"},a("label",{key:"747d82067eb571d02840cfd981865821099f288b",htmlFor:this.componentId},a("span",{key:"bfab6e8ede66d0169dd020b7dd97e125aba417b0",class:this.hideLabel?"visually-hidden":""},this.label)),!this.hideLabel&&this.renderAction()),a("div",{key:"a18611c03270e7491c1af69f931419c832192c06",class:"pds-textarea__field-wrapper"},a("textarea",Object.assign({key:"868382c7b04a4e59c0daa9d98afcdc9048f6224f",ref:e=>this.nativeTextarea=e,"aria-describedby":d(this.componentId,this.invalid,this.helperMessage,this.errorMessage),"aria-invalid":this.invalid?"true":void 0,autocomplete:this.autocomplete,class:this.textareaClassNames(),disabled:this.disabled,id:this.componentId,maxlength:this.maxLength,name:this.name,placeholder:this.placeholder,readOnly:this.readonly,required:this.required,rows:this.rows,onBlur:this.onBlur,onChange:this.onTextareaChange,onFocus:this.onFocus,onInput:this.onInput,onKeyDown:this.onKeyDown},this.inheritedAttributes),e),this.renderCharacterCounter()),this.helperMessage&&a("p",{key:"dcb36f21443d2a782c25b7c29c4ce6215f3b212b",class:"pds-textarea__helper-message",id:c(this.componentId,"helper")},this.helperMessage),this.invalid&&a("p",{key:"be30fb1a38453296e26b775955389c0ec569df67","aria-live":"assertive",class:"pds-textarea__error-message",id:c(this.componentId,"error")},a("pds-icon",{key:"d93dce10d9d9db5815ac5f331848940aed735ba0",icon:x,size:"small"}),this.errorMessage)))}static get formAssociated(){return!0}get el(){return this}static get watchers(){return{debounce:[{debounceChanged:0}],value:[{valueChanged:0}],maxLength:[{maxLengthChanged:0}]}}static get style(){return":host{display:inline-block}:host([aria-disabled=true]) label{color:var(--pine-color-text-label-disabled)}:host([aria-readonly=true]) label{color:var(--pine-color-text-label-readonly)}label{color:var(--pine-color-text-label);font:var(--pine-typography-body-medium);letter-spacing:var(--pine-letter-spacing)}:host{--pine-input-color-background-danger:var(--pine-color-red-050)}:host{display:inline-block;width:100%}:host([aria-readonly=true]) textarea{background-color:var(--pine-color-background-container-disabled);color:var(--pine-color-text-readonly)}:host([highlight]:not([disabled]):not([aria-disabled=true]):not([aria-readonly=true])) .pds-textarea__field:not(.is-invalid){background-color:var(--pine-color-accent-disabled);border-color:var(--pine-color-accent);color:var(--pine-color-text-accent)}:host([highlight]:not([disabled]):not([aria-disabled=true]):not([aria-readonly=true])) .pds-textarea__field:not(.is-invalid):hover{border-color:var(--pine-color-accent-hover)}:host([highlight]:not([disabled]):not([aria-disabled=true]):not([aria-readonly=true])) .pds-textarea__field:not(.is-invalid):focus-visible{outline-color:var(--pine-color-focus-ring)}:host([highlight]:not([disabled]):not([aria-disabled=true]):not([aria-readonly=true])) .pds-textarea__field:not(.is-invalid)~.pds-textarea__character-counter{background:color-mix(in srgb, var(--pine-color-accent-disabled) 80%, transparent);color:var(--pine-color-text-accent)}.pds-textarea{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.pds-textarea__label-wrapper{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}.pds-textarea__action{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;gap:var(--pine-dimension-xs);-webkit-margin-start:var(--pine-dimension-xs);margin-inline-start:var(--pine-dimension-xs)}label{display:block;-webkit-margin-after:var(--pine-dimension-xs);margin-block-end:var(--pine-dimension-xs)}.pds-textarea__label-wrapper label{-webkit-margin-after:0;margin-block-end:0}.pds-textarea__helper-message{color:var(--pine-color-text-message);font:var(--pine-typography-body-sm-medium);-webkit-margin-before:var(--pine-dimension-2xs);margin-block-start:var(--pine-dimension-2xs)}.pds-textarea__error-message{color:var(--pine-color-text-message-danger);display:-ms-flexbox;display:flex;font:var(--pine-typography-body-sm-medium);gap:var(--pine-dimension-2xs);-webkit-margin-before:var(--pine-dimension-2xs);margin-block-start:var(--pine-dimension-2xs)}.pds-textarea__error-message pds-icon{-webkit-margin-before:var(--pine-dimension-025);margin-block-start:var(--pine-dimension-025)}.pds-textarea__field-wrapper{display:inline-block;position:relative;width:100%}.pds-textarea__field{background-color:var(--pine-color-background-container);border:var(--pine-border);border-radius:calc(var(--pine-dimension-xs) * 1.25);-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--pine-color-text);font:var(--pine-typography-body);letter-spacing:var(--pine-letter-spacing);min-height:calc(var(--pine-dimension-xl) * 2);min-width:calc(var(--pine-dimension-xl) * 2);padding:var(--pine-dimension-xs) var(--pine-dimension-sm);resize:both;width:100%}:host([max-length]) .pds-textarea__field{padding-bottom:calc(var(--pine-dimension-xs) + var(--pine-dimension-md))}.pds-textarea__field:hover:not(:disabled,.is-invalid){border:var(--pine-border-hover)}.pds-textarea__field:disabled{background-color:var(--pine-color-background-container-disabled);color:var(--pine-color-text-disabled);cursor:not-allowed}.pds-textarea__field:focus-visible{outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}.pds-textarea__field::-webkit-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-textarea__field::-moz-placeholder{color:var(--pine-color-text-placeholder)}.pds-textarea__field:-ms-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-textarea__field::-ms-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-textarea__field::placeholder{color:var(--pine-color-text-placeholder)}.pds-textarea__field.is-invalid{background-color:var(--pine-input-color-background-danger);border-color:var(--pine-color-border-danger)}:host-context([data-theme=dark]) .pds-textarea__field.is-invalid{background-color:var(--pine-color-red-950)}.pds-textarea__field.is-invalid:focus-visible{outline-color:var(--pine-color-focus-ring-danger)}.pds-textarea__character-counter{background:color-mix(in srgb, var(--pine-color-background-container) 80%, transparent);border-radius:calc(var(--pine-dimension-2xs) * 0.5);color:var(--pine-color-text-muted);font:var(--pine-typography-body-sm-medium);padding:calc(var(--pine-dimension-2xs) * 0.5) var(--pine-dimension-2xs);pointer-events:none;position:absolute;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;z-index:var(--pine-z-index)}:host([aria-disabled=true]) .pds-textarea__character-counter{background-color:var(--pine-color-background-container-disabled);color:var(--pine-color-text-disabled)}:host([aria-readonly=true]) .pds-textarea__character-counter{background-color:var(--pine-color-background-container-disabled);color:var(--pine-color-text-readonly)}.pds-textarea__field.is-invalid~.pds-textarea__character-counter{background-color:var(--pine-input-color-background-danger)}:host-context([data-theme=dark]) .pds-textarea__field.is-invalid~.pds-textarea__character-counter{background-color:var(--pine-color-red-950)}.visually-hidden{border:0;clip:rect(0 0 0 0);-webkit-clip-path:polygon(0 0, 0 0, 0 0);clip-path:polygon(0 0, 0 0, 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}"}},[321,"pds-textarea",{autocomplete:[1],componentId:[1,"component-id"],disabled:[4],debounce:[2],errorMessage:[1,"error-message"],helperMessage:[1,"helper-message"],invalid:[1028],label:[1],hideLabel:[4,"hide-label"],name:[1],placeholder:[1],readonly:[4],required:[4],rows:[2],maxLength:[514,"max-length"],highlight:[516],value:[1025],characterCountLabel:[1,"character-count-label"],hasFocus:[32],hasAction:[32],setFocus:[64]},void 0,{debounce:[{debounceChanged:0}],value:[{valueChanged:0}],maxLength:[{maxLengthChanged:0}]}]),_=f,y=function(){"undefined"!=typeof customElements&&["pds-textarea","pds-icon"].forEach((e=>{switch(e){case"pds-textarea":customElements.get(r(e))||customElements.define(r(e),f);break;case"pds-icon":customElements.get(r(e))||g()}}))};export{_ as PdsTextarea,y as defineCustomElement}
@@ -1 +1 @@
1
- import{proxyCustomElement as t,HTMLElement as i,createEvent as a,h as s,Host as e,transformTag as n}from"@stencil/core/internal/client";import{d as o}from"./pds-icon2.js";const r=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.pdsToastDismissed=a(this,"pdsToastDismissed",7),this.dismissible=!0,this.duration=4500,this.type="default",this.dismissLabel="Dismiss message",this.isVisible=!0,this.isAnimatingOut=!1}componentDidLoad(){this.duration>0&&this.startDismissTimer()}disconnectedCallback(){this.cleanup()}handleDurationChange(t){this.dismissTimer&&(window.clearTimeout(this.dismissTimer),this.dismissTimer=void 0),t>0&&this.startDismissTimer()}async dismiss(){this.isAnimatingOut=!0,await this.waitForDismissAnimation(),this.isVisible=!1,this.cleanup(),this.pdsToastDismissed.emit({componentId:this.componentId})}waitForDismissAnimation(){const t=this.getDismissAnimationDurationMs();return t<=0?Promise.resolve():new Promise((i=>window.setTimeout(i,t)))}getDismissAnimationDurationMs(){if("undefined"==typeof window)return 300;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return 0;const t=this.parseCssDurationToMs(getComputedStyle(this.el).getPropertyValue("--animation-duration").trim());return null!=t?t:300}parseCssDurationToMs(t){if(t){if("0"===t||"0ms"===t||"0s"===t)return 0;if(t.endsWith("ms")){const i=Number.parseFloat(t);return Number.isFinite(i)?i:void 0}if(t.endsWith("s")){const i=Number.parseFloat(t);return Number.isFinite(i)?1e3*i:void 0}}}cleanup(){this.dismissTimer&&(window.clearTimeout(this.dismissTimer),this.dismissTimer=void 0)}startDismissTimer(){this.dismissTimer=window.setTimeout((()=>{this.dismiss()}),this.duration)}renderIcon(){return"loading"===this.type?s("div",{class:"pds-toast__loader"},s("svg",{class:"pds-toast__loader-spinner",viewBox:"25 25 50 50","aria-hidden":"true"},s("circle",{class:"pds-toast__loader-path",cx:"50",cy:"50",r:"20",fill:"none",stroke:"currentColor","stroke-width":"4","stroke-linecap":"round"}))):this.icon&&s("pds-icon",{name:this.icon,class:"pds-toast__icon"})}render(){return s(e,{key:"250f871e3dfe412a11e8fe4c0e43c5ef7d886e9b",hidden:!this.isVisible},s("div",{key:"8c9d995cd597544a3c6ded08d18e09ff4619b364",class:{"pds-toast":!0,["pds-toast--"+this.type]:"default"!==this.type,"pds-toast--animating-out":this.isAnimatingOut},role:"alert","aria-live":"polite"},this.renderIcon(),s("span",{key:"83c4cad9b619ca0ad77721b7472e240719459290",class:"pds-toast__message"},s("slot",{key:"c2420b955c89eb8e32dd4a1aa8d89bbbbf1b9ca9"})),this.dismissible&&s("button",{key:"940bb9f1d235d7c31a334bec9aefdfdbd1c5ccfd",type:"button",part:"dismiss",class:"pds-toast__button",onClick:()=>{this.dismiss()},"aria-label":this.dismissLabel},s("pds-icon",{key:"f6b68f4cf9df23b367ade351dd4f00fc6f6e6442",name:"remove"}))))}get el(){return this}static get watchers(){return{duration:[{handleDurationChange:0}]}}static get style(){return":host{--animation-duration:var(--pine-motion-duration-slow);--animation-timing:var(--pine-motion-easing-in-out);--padding-inline:var(--pine-dimension-md);--padding-inline-desktop:var(--pine-dimension-2xl);--sizing-height-default:68px;--sizing-min-width:calc(var(--sizing-total-width) - (var(--padding-inline) * 2));--sizing-min-width-desktop:calc(var(--sizing-total-width) - (var(--padding-inline-desktop) * 2));--sizing-total-width:350px;-webkit-box-sizing:border-box;box-sizing:border-box;display:block;font:var(--pine-typography-body-medium)}.pds-toast{-ms-flex-align:center;align-items:center;-webkit-animation:pds-toast-animate-in var(--animation-duration) var(--animation-timing);animation:pds-toast-animate-in var(--animation-duration) var(--animation-timing);background-color:var(--pine-color-primary);border-radius:var(--pine-dimension-xs);-webkit-box-shadow:var(--pine-box-shadow);box-shadow:var(--pine-box-shadow);color:var(--pine-color-text-primary);display:-ms-flexbox;display:flex;height:var(--sizing-height-default);-ms-flex-pack:start;justify-content:flex-start;-webkit-margin-after:var(--pine-dimension-2xs);margin-block-end:var(--pine-dimension-2xs);max-width:90vw;min-width:var(--sizing-min-width);padding:0 var(--padding-inline);position:relative;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}@media screen and (max-width: 767px){.pds-toast{height:36px;max-width:calc(100vw - var(--pine-dimension-2xs) * 2);min-width:auto;padding-inline:var(--pine-dimension-2xs)}}.pds-toast--danger{background-color:var(--pine-color-danger)}.pds-toast--loading .pds-toast__loader{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-webkit-margin-end:var(--pine-dimension-sm);margin-inline-end:var(--pine-dimension-sm);position:relative}.pds-toast--loading .pds-toast__loader-spinner{-webkit-animation:pds-toast-rotate 2s linear infinite;animation:pds-toast-rotate 2s linear infinite;height:20px;width:20px}.pds-toast--loading .pds-toast__loader-path{-webkit-animation:pds-toast-dash 1.5s ease-in-out infinite;animation:pds-toast-dash 1.5s ease-in-out infinite;stroke-dasharray:1, 200;stroke-dashoffset:0;stroke-linecap:round}.pds-toast__icon{color:var(--pine-color-text-primary);display:-ms-inline-flexbox;display:inline-flex;-webkit-margin-end:var(--pine-dimension-sm);margin-inline-end:var(--pine-dimension-sm)}.pds-toast__message{font:var(--pine-typography-body-sm-medium);-webkit-margin-end:auto;margin-inline-end:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pds-toast__message ::slotted(a){color:var(--pine-color-text-primary);-webkit-margin-start:var(--pine-dimension-xs);margin-inline-start:var(--pine-dimension-xs);opacity:0.7;text-decoration:underline}.pds-toast__message ::slotted(a):hover,.pds-toast__message ::slotted(a):focus-visible{opacity:1}.pds-toast__message ::slotted(a):focus-visible{outline:2px solid var(--pine-color-text-primary);outline-offset:2px}.pds-toast__button{-ms-flex-align:center;align-items:center;background:none;border:0;border-radius:var(--pine-border-radius-full);color:inherit;cursor:pointer;display:-ms-inline-flexbox;display:inline-flex;-webkit-margin-start:var(--pine-dimension-md);margin-inline-start:var(--pine-dimension-md);opacity:0.7;padding:0;white-space:nowrap}.pds-toast__button:hover,.pds-toast__button:focus{opacity:1}.pds-toast__button:focus{outline:var(--pine-outline-focus);outline-offset:var(--pine-dimension-2xs)}@-webkit-keyframes pds-toast-animate-in{from{opacity:0;-webkit-transform:translateY(100%);transform:translateY(100%)}to{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes pds-toast-animate-in{from{opacity:0;-webkit-transform:translateY(100%);transform:translateY(100%)}to{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@-webkit-keyframes pds-toast-animate-out{from{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(100%);transform:translateY(100%)}}@keyframes pds-toast-animate-out{from{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(100%);transform:translateY(100%)}}@-webkit-keyframes pds-toast-rotate{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes pds-toast-rotate{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes pds-toast-dash{0%{stroke-dasharray:1, 200;stroke-dashoffset:0}50%{stroke-dasharray:89, 200;stroke-dashoffset:-35}100%{stroke-dasharray:89, 200;stroke-dashoffset:-124}}@keyframes pds-toast-dash{0%{stroke-dasharray:1, 200;stroke-dashoffset:0}50%{stroke-dasharray:89, 200;stroke-dashoffset:-35}100%{stroke-dasharray:89, 200;stroke-dashoffset:-124}}:host([hidden]) .pds-toast,.pds-toast--animating-out{-webkit-animation:pds-toast-animate-out var(--animation-duration) var(--animation-timing) forwards;animation:pds-toast-animate-out var(--animation-duration) var(--animation-timing) forwards;pointer-events:none;}"}},[257,"pds-toast",{componentId:[1,"component-id"],dismissible:[4],duration:[2],icon:[1],type:[1],dismissLabel:[1,"dismiss-label"],isVisible:[32],isAnimatingOut:[32],dismiss:[64]},void 0,{duration:[{handleDurationChange:0}]}]),d=r,m=function(){"undefined"!=typeof customElements&&["pds-toast","pds-icon"].forEach((t=>{switch(t){case"pds-toast":customElements.get(n(t))||customElements.define(n(t),r);break;case"pds-icon":customElements.get(n(t))||o()}}))};export{d as PdsToast,m as defineCustomElement}
1
+ import{proxyCustomElement as t,HTMLElement as i,createEvent as a,h as s,Host as e,transformTag as n}from"@stencil/core/internal/client";import{d as o}from"./pds-icon2.js";const r=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.pdsToastDismissed=a(this,"pdsToastDismissed",7),this.dismissible=!0,this.duration=4500,this.type="default",this.dismissLabel="Dismiss message",this.isVisible=!0,this.isAnimatingOut=!1}componentDidLoad(){this.duration>0&&this.startDismissTimer()}disconnectedCallback(){this.cleanup()}handleDurationChange(t){this.dismissTimer&&(window.clearTimeout(this.dismissTimer),this.dismissTimer=void 0),t>0&&this.startDismissTimer()}async dismiss(){this.isAnimatingOut=!0,await this.waitForDismissAnimation(),this.isVisible=!1,this.cleanup(),this.pdsToastDismissed.emit({componentId:this.componentId})}waitForDismissAnimation(){const t=this.getDismissAnimationDurationMs();return t<=0?Promise.resolve():new Promise((i=>window.setTimeout(i,t)))}getDismissAnimationDurationMs(){if("undefined"==typeof window)return 300;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return 0;const t=this.parseCssDurationToMs(getComputedStyle(this.el).getPropertyValue("--animation-duration").trim());return null!=t?t:300}parseCssDurationToMs(t){if(t){if("0"===t||"0ms"===t||"0s"===t)return 0;if(t.endsWith("ms")){const i=Number.parseFloat(t);return Number.isFinite(i)?i:void 0}if(t.endsWith("s")){const i=Number.parseFloat(t);return Number.isFinite(i)?1e3*i:void 0}}}cleanup(){this.dismissTimer&&(window.clearTimeout(this.dismissTimer),this.dismissTimer=void 0)}startDismissTimer(){this.dismissTimer=window.setTimeout((()=>{this.dismiss()}),this.duration)}renderIcon(){return"loading"===this.type?s("div",{class:"pds-toast__loader"},s("svg",{class:"pds-toast__loader-spinner",viewBox:"25 25 50 50","aria-hidden":"true"},s("circle",{class:"pds-toast__loader-path",cx:"50",cy:"50",r:"20",fill:"none",stroke:"currentColor","stroke-width":"4","stroke-linecap":"round"}))):this.icon&&s("pds-icon",{name:this.icon,class:"pds-toast__icon"})}render(){return s(e,{key:"754a4583cefca47a3d3fea7dab036c06ea8aabcd",hidden:!this.isVisible},s("div",{key:"8ac294344ca459202c0883e724e09a4218342cc4",class:{"pds-toast":!0,["pds-toast--"+this.type]:"default"!==this.type,"pds-toast--animating-out":this.isAnimatingOut},role:"alert","aria-live":"polite"},this.renderIcon(),s("span",{key:"eaf615d41c138e2c73088d29bac9349f49a63ba7",class:"pds-toast__message"},s("slot",{key:"33973447154d80b016f5a7954b0473db03228379"})),this.dismissible&&s("button",{key:"e189834633e1e648282ee43633fd05e53ce38869",type:"button",part:"dismiss",class:"pds-toast__button",onClick:()=>{this.dismiss()},"aria-label":this.dismissLabel},s("pds-icon",{key:"623a0e4d56e30781fb31bcd085511c17a4777edc",name:"remove"}))))}get el(){return this}static get watchers(){return{duration:[{handleDurationChange:0}]}}static get style(){return":host{--animation-duration:var(--pine-motion-duration-slow);--animation-timing:var(--pine-motion-easing-in-out);--padding-inline:var(--pine-dimension-md);--padding-inline-desktop:var(--pine-dimension-2xl);--sizing-height-default:68px;--sizing-min-width:calc(var(--sizing-total-width) - (var(--padding-inline) * 2));--sizing-min-width-desktop:calc(var(--sizing-total-width) - (var(--padding-inline-desktop) * 2));--sizing-total-width:350px;-webkit-box-sizing:border-box;box-sizing:border-box;display:block;font:var(--pine-typography-body-medium)}.pds-toast{-ms-flex-align:center;align-items:center;-webkit-animation:pds-toast-animate-in var(--animation-duration) var(--animation-timing);animation:pds-toast-animate-in var(--animation-duration) var(--animation-timing);background-color:var(--pine-color-primary);border-radius:var(--pine-dimension-xs);-webkit-box-shadow:var(--pine-box-shadow);box-shadow:var(--pine-box-shadow);color:var(--pine-color-text-primary);display:-ms-flexbox;display:flex;height:var(--sizing-height-default);-ms-flex-pack:start;justify-content:flex-start;-webkit-margin-after:var(--pine-dimension-2xs);margin-block-end:var(--pine-dimension-2xs);max-width:90vw;min-width:var(--sizing-min-width);padding:0 var(--padding-inline);position:relative;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}@media screen and (max-width: 767px){.pds-toast{height:36px;max-width:calc(100vw - var(--pine-dimension-2xs) * 2);min-width:auto;padding-inline:var(--pine-dimension-2xs)}}.pds-toast--danger{background-color:var(--pine-color-danger)}.pds-toast--loading .pds-toast__loader{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-webkit-margin-end:var(--pine-dimension-sm);margin-inline-end:var(--pine-dimension-sm);position:relative}.pds-toast--loading .pds-toast__loader-spinner{-webkit-animation:pds-toast-rotate 2s linear infinite;animation:pds-toast-rotate 2s linear infinite;height:20px;width:20px}.pds-toast--loading .pds-toast__loader-path{-webkit-animation:pds-toast-dash 1.5s ease-in-out infinite;animation:pds-toast-dash 1.5s ease-in-out infinite;stroke-dasharray:1, 200;stroke-dashoffset:0;stroke-linecap:round}.pds-toast__icon{color:var(--pine-color-text-primary);display:-ms-inline-flexbox;display:inline-flex;-webkit-margin-end:var(--pine-dimension-sm);margin-inline-end:var(--pine-dimension-sm)}.pds-toast__message{font:var(--pine-typography-body-sm-medium);-webkit-margin-end:auto;margin-inline-end:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pds-toast__message ::slotted(a){color:var(--pine-color-text-primary);-webkit-margin-start:var(--pine-dimension-xs);margin-inline-start:var(--pine-dimension-xs);opacity:0.7;text-decoration:underline}.pds-toast__message ::slotted(a):hover,.pds-toast__message ::slotted(a):focus-visible{opacity:1}.pds-toast__message ::slotted(a):focus-visible{outline:2px solid var(--pine-color-text-primary);outline-offset:2px}.pds-toast__button{-ms-flex-align:center;align-items:center;background:none;border:0;border-radius:var(--pine-border-radius-full);color:inherit;cursor:pointer;display:-ms-inline-flexbox;display:inline-flex;-webkit-margin-start:var(--pine-dimension-md);margin-inline-start:var(--pine-dimension-md);opacity:0.7;padding:0;white-space:nowrap}.pds-toast__button:hover,.pds-toast__button:focus{opacity:1}.pds-toast__button:focus{outline:var(--pine-outline-focus);outline-offset:var(--pine-dimension-2xs)}@-webkit-keyframes pds-toast-animate-in{from{opacity:0;-webkit-transform:translateY(100%);transform:translateY(100%)}to{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes pds-toast-animate-in{from{opacity:0;-webkit-transform:translateY(100%);transform:translateY(100%)}to{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@-webkit-keyframes pds-toast-animate-out{from{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(100%);transform:translateY(100%)}}@keyframes pds-toast-animate-out{from{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(100%);transform:translateY(100%)}}@-webkit-keyframes pds-toast-rotate{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes pds-toast-rotate{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes pds-toast-dash{0%{stroke-dasharray:1, 200;stroke-dashoffset:0}50%{stroke-dasharray:89, 200;stroke-dashoffset:-35}100%{stroke-dasharray:89, 200;stroke-dashoffset:-124}}@keyframes pds-toast-dash{0%{stroke-dasharray:1, 200;stroke-dashoffset:0}50%{stroke-dasharray:89, 200;stroke-dashoffset:-35}100%{stroke-dasharray:89, 200;stroke-dashoffset:-124}}:host([hidden]) .pds-toast,.pds-toast--animating-out{-webkit-animation:pds-toast-animate-out var(--animation-duration) var(--animation-timing) forwards;animation:pds-toast-animate-out var(--animation-duration) var(--animation-timing) forwards;pointer-events:none;}"}},[257,"pds-toast",{componentId:[1,"component-id"],dismissible:[4],duration:[2],icon:[1],type:[1],dismissLabel:[1,"dismiss-label"],isVisible:[32],isAnimatingOut:[32],dismiss:[64]},void 0,{duration:[{handleDurationChange:0}]}]),d=r,m=function(){"undefined"!=typeof customElements&&["pds-toast","pds-icon"].forEach((t=>{switch(t){case"pds-toast":customElements.get(n(t))||customElements.define(n(t),r);break;case"pds-icon":customElements.get(n(t))||o()}}))};export{d as PdsToast,m as defineCustomElement}
@@ -1 +1 @@
1
- import{proxyCustomElement as t,HTMLElement as o,h as i,Host as r,transformTag as s}from"@stencil/core/internal/client";import{c as e,a as l,o as n,f as a,s as p}from"./floating-ui.dom.js";const h=t(class t extends o{constructor(t){super(),!1!==t&&this.__registerHost(),this._isInteractiveOpen=!1,this.portalEl=null,this.resolvedPlacement="right",this.triggerEl=null,this.contentDiv=null,this.slotMutationObserver=null,this.currentPathname="",this.pathnameCheckInterval=null,this.stopAutoUpdate=null,this.hasArrow=!0,this.htmlContent=!1,this.placement="right",this.maxWidth="352px",this.opened=!1,this.hasCheckedReconnect=!1,this.handleHide=()=>{this.opened&&!this._isInteractiveOpen||(this.hideTooltip(),this._isInteractiveOpen=!1)},this.handleShow=()=>{this.opened&&!this._isInteractiveOpen||(this._isInteractiveOpen=!0,this.showTooltip())},this.handlePageShow=()=>{this.opened&&!this._isInteractiveOpen||(this.opened=!1,this._isInteractiveOpen=!1)},this.handleSpaNavigation=()=>{this.opened&&!this._isInteractiveOpen||(this.hideTooltip(),this._isInteractiveOpen=!1)},this.checkPathnameChange=()=>{window.location.pathname!==this.currentPathname&&(this.currentPathname=window.location.pathname,this.handleSpaNavigation())}}handleOpenToggle(t,o){!1===t&&!0===o&&(this._isInteractiveOpen=!1)}componentWillLoad(){this._isInteractiveOpen=!1,this.resolvedPlacement=this.placement}componentDidLoad(){window.addEventListener("pageshow",this.handlePageShow),this.currentPathname=window.location.pathname,this.triggerEl=this.el.querySelector(".pds-tooltip__trigger");const t=this.el.querySelector(".pds-tooltip__content-slot-wrapper");null!==t&&(this.slotMutationObserver=new MutationObserver((()=>{this.opened&&null!==this.portalEl&&(this.removePortal(),this.createPortal())})),this.slotMutationObserver.observe(t,{childList:!0,subtree:!1}))}connectedCallback(){this.hasCheckedReconnect=!1}disconnectedCallback(){window.removeEventListener("pageshow",this.handlePageShow),null!==this.slotMutationObserver&&(this.slotMutationObserver.disconnect(),this.slotMutationObserver=null),null!==this.portalEl&&this.removePortal(),null!==this.pathnameCheckInterval&&(clearInterval(this.pathnameCheckInterval),this.pathnameCheckInterval=null),null!==this.stopAutoUpdate&&(this.stopAutoUpdate(),this.stopAutoUpdate=null)}unwrapReconnectedSlots(){const t=Array.from(this.el.children).find((t=>t.matches(".pds-tooltip__trigger"))),o=Array.from(this.el.children).find((t=>t.matches(".pds-tooltip__content-slot-wrapper")));if(void 0===t||void 0===o)return;const i=t=>Array.from(t.children).find((t=>t.matches(".pds-tooltip__trigger, .pds-tooltip__content-slot-wrapper")));[t,o].forEach((r=>{let s=i(r);for(;void 0!==s;){const e=s.matches(".pds-tooltip__content-slot-wrapper")?o:t;Array.from(s.childNodes).forEach((t=>e===r?r.insertBefore(t,s):e.appendChild(t))),s.remove(),s=i(r)}}))}componentDidRender(){this.hasCheckedReconnect||(this.unwrapReconnectedSlots(),this.hasCheckedReconnect=!0),this.opened&&null===this.portalEl?this.createPortal():this.opened||null===this.portalEl||this.removePortal(),null!==this.portalEl&&(this.portalEl.className=`pds-tooltip pds-tooltip--${this.resolvedPlacement} ${this.htmlContent?"pds-tooltip--has-html-content":""} ${this.opened?"pds-tooltip--is-open":""} ${this.hasArrow?"":"pds-tooltip--no-arrow"}`,this.portalEl.setAttribute("aria-hidden",this.opened?"false":"true"),this.portalEl.setAttribute("aria-live",this.opened?"polite":"off"))}async showTooltip(){this.opened=!0}async hideTooltip(){this.opened=!1}determinePositioningAnchor(){let t=this.triggerEl;if(null!==this.triggerEl){const o=this.triggerEl.childNodes;for(let i=0;i<o.length;i++){const r=o[i];if(r.nodeType===Node.ELEMENT_NODE){t=r;break}}}return t}async repositionPortal(){const t=this.determinePositioningAnchor();if(null!==t&&null!==this.portalEl)try{const{x:o,y:i,placement:r}=await e(t,this.portalEl,{placement:this.placement,strategy:"fixed",middleware:[n(8),a(),p({padding:5})]});this.resolvedPlacement=r,Object.assign(this.portalEl.style,{left:o+"px",top:i+"px",position:"fixed"}),this.portalEl.className=`pds-tooltip pds-tooltip--${this.resolvedPlacement} ${this.htmlContent?"pds-tooltip--has-html-content":""} ${this.opened?"pds-tooltip--is-open":""} ${this.hasArrow?"":"pds-tooltip--no-arrow"}`}catch(o){console.warn("Failed to position tooltip:",o),this.resolvedPlacement=this.placement;const i=t.getBoundingClientRect();this.portalEl.style.left=i.right+8+"px",this.portalEl.style.top=i.top+"px",this.portalEl.style.position="fixed"}}createPortal(){if(null!==this.portalEl)return;if(this.portalEl=document.createElement("div"),this.portalEl.className=`pds-tooltip pds-tooltip--${this.resolvedPlacement} ${this.htmlContent?"pds-tooltip--has-html-content":""} ${this.opened?"pds-tooltip--is-open":""} ${this.hasArrow?"":"pds-tooltip--no-arrow"}`,this.portalEl.style.position="fixed",this.portalEl.style.zIndex="var(--pine-z-index-nuclear)",""===this.portalEl.id){const o=t.instanceCounter++;this.portalEl.id=`${this.componentId||this.el.id||"pds-tooltip"}-portal-${o}`}this.portalEl.getAttribute("id")!==this.portalEl.id&&this.portalEl.setAttribute("id",this.portalEl.id),this.portalEl.setAttribute("role","tooltip"),this.portalEl.setAttribute("aria-hidden",this.opened?"false":"true"),this.portalEl.setAttribute("aria-live",this.opened?"polite":"off"),this.portalEl.style.maxWidth=this.maxWidth,this.contentDiv=document.createElement("div"),this.contentDiv.className="pds-tooltip__content",this.contentDiv.setAttribute("aria-hidden",this.opened?"false":"true"),this.contentDiv.setAttribute("aria-live",this.opened?"polite":"off");const o=this.el.querySelector(".pds-tooltip__content-slot-wrapper"),i=null==o?void 0:o.querySelector('[slot="content"]');let r=!1;if(null!==i){const t=Array.from(i.childNodes);t.length>0&&t.some((t=>{var o;return t.nodeType===Node.ELEMENT_NODE||t.nodeType===Node.TEXT_NODE&&""!==(null===(o=t.textContent)||void 0===o?void 0:o.trim())}))&&(r=!0,t.forEach((t=>{var o;(t.nodeType===Node.ELEMENT_NODE||t.nodeType===Node.TEXT_NODE&&""!==(null===(o=t.textContent)||void 0===o?void 0:o.trim()))&&this.contentDiv.appendChild(t.cloneNode(!0))})))}r||"string"!=typeof this.content||""===this.content.trim()||(this.contentDiv.textContent=this.content),this.portalEl.appendChild(this.contentDiv),document.body.appendChild(this.portalEl),this.repositionPortal().catch((t=>{console.warn("Failed to position tooltip on creation:",t)})),this.triggerEl&&this.portalEl&&(this.stopAutoUpdate=l(this.triggerEl,this.portalEl,(()=>{this.repositionPortal().catch((t=>{console.warn("Failed to reposition tooltip on auto update:",t)}))}))),window.addEventListener("popstate",this.handleSpaNavigation,!0),window.addEventListener("hashchange",this.handleSpaNavigation,!0),this.pathnameCheckInterval=setInterval(this.checkPathnameChange,100),null!==this.triggerEl&&""!==this.portalEl.id&&this.triggerEl.setAttribute("aria-describedby",this.portalEl.id)}removePortal(){if(null!==this.stopAutoUpdate&&(this.stopAutoUpdate(),this.stopAutoUpdate=null),null!==this.pathnameCheckInterval&&(clearInterval(this.pathnameCheckInterval),this.pathnameCheckInterval=null),null!==this.portalEl){window.removeEventListener("popstate",this.handleSpaNavigation,!0),window.removeEventListener("hashchange",this.handleSpaNavigation,!0);try{this.portalEl.parentNode&&this.portalEl.parentNode.removeChild(this.portalEl)}catch(t){console.warn("Portal element could not be removed from DOM:",t)}this.portalEl=null}null!==this.triggerEl&&this.triggerEl.removeAttribute("aria-describedby"),this.contentDiv=null}render(){return i(r,{key:"e80abb11248d9bf6aec1ae738c61692594975630",id:this.componentId||void 0,class:{"pds-tooltip--is-open":this.opened}},i("span",{key:"9ff484925a1792302eee230a5c37a0268d536935",class:"pds-tooltip__trigger",onMouseEnter:this.handleShow,onMouseLeave:this.handleHide,onFocusin:this.handleShow,onFocusout:this.handleHide,ref:t=>this.triggerEl=t},i("slot",{key:"738c314a816e82fd81a0c0e9895d51af45b75eb2"})),i("div",{key:"5b0477cd433cae0b53c4d5ce5767dc703be28ee0",class:"pds-tooltip__content-slot-wrapper",hidden:!0},i("slot",{key:"51ad497357c1d1547bba69d07fd7fa1b675c021f",name:"content"})))}get el(){return this}static get watchers(){return{opened:[{handleOpenToggle:0}]}}static get style(){return'.pds-tooltip{--tooltip-border-width-arrow-down:var(--tooltip-sizing-arrow) var(--tooltip-sizing-arrow) 0;--tooltip-border-width-arrow-left:var(--tooltip-sizing-arrow) var(--tooltip-sizing-arrow) var(--tooltip-sizing-arrow) 0;--tooltip-border-width-arrow-right:var(--tooltip-sizing-arrow) 0 var(--tooltip-sizing-arrow) var(--tooltip-sizing-arrow);--tooltip-border-width-arrow-up:0 var(--tooltip-sizing-arrow) var(--tooltip-sizing-arrow);--tooltip-sizing-arrow:6px;--tooltip-sizing-arrow-offset:14px;--tooltip-dimension-max-width:320px}.pds-tooltip__content{background-color:var(--pine-color-primary);border-radius:calc(var(--pine-dimension-xs) * 1.25);-webkit-box-shadow:var(--pine-box-shadow);box-shadow:var(--pine-box-shadow);color:var(--pine-color-text-primary);max-width:var(--tooltip-dimension-max-width);opacity:0;padding:var(--pine-dimension-xs) calc(var(--pine-dimension-md) / 2);position:relative;visibility:hidden;width:-webkit-max-content;width:-moz-max-content;width:max-content}.pds-tooltip--is-open .pds-tooltip__content{opacity:1;visibility:visible;z-index:var(--pine-z-index-raised)}.pds-tooltip.pds-tooltip--has-html-content .pds-tooltip__content{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.pds-tooltip__content::after{border-color:transparent;border-right-color:transparent;border-style:solid;border-width:var(--tooltip-border-width-arrow-left);content:"";height:0;position:absolute;width:0}.pds-tooltip--right .pds-tooltip__content::after{border-inline-end-color:var(--pine-color-primary);border-width:var(--tooltip-border-width-arrow-left);left:calc(var(--tooltip-sizing-arrow) * -1);top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.pds-tooltip--right-end .pds-tooltip__content::after{border-inline-end-color:var(--pine-color-primary);border-width:var(--tooltip-border-width-arrow-left);bottom:var(--tooltip-sizing-arrow-offset);left:calc(var(--tooltip-sizing-arrow) * -1);top:initial}.pds-tooltip--right-start .pds-tooltip__content::after{border-inline-end-color:var(--pine-color-primary);border-width:var(--tooltip-border-width-arrow-left);left:calc(var(--tooltip-sizing-arrow) * -1);top:var(--tooltip-sizing-arrow-offset)}.pds-tooltip--top .pds-tooltip__content::after{border-block-start-color:var(--pine-color-primary);border-width:var(--tooltip-border-width-arrow-down);bottom:calc(var(--tooltip-sizing-arrow) * -1);left:50%;top:initial;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.pds-tooltip--top-start .pds-tooltip__content::after{border-block-start-color:var(--pine-color-primary);border-width:var(--tooltip-border-width-arrow-down);bottom:calc(var(--tooltip-sizing-arrow) * -1);left:var(--tooltip-sizing-arrow-offset);top:initial}.pds-tooltip--top-end .pds-tooltip__content::after{border-block-start-color:var(--pine-color-primary);border-width:var(--tooltip-border-width-arrow-down);bottom:calc(var(--tooltip-sizing-arrow) * -1);left:initial;right:var(--tooltip-sizing-arrow-offset);top:initial}.pds-tooltip--left .pds-tooltip__content::after{border-inline-start-color:var(--pine-color-primary);border-width:var(--tooltip-border-width-arrow-right);left:initial;right:calc(var(--tooltip-sizing-arrow) * -1);top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.pds-tooltip--left-end .pds-tooltip__content::after{border-inline-start-color:var(--pine-color-primary);border-width:var(--tooltip-border-width-arrow-right);bottom:var(--tooltip-sizing-arrow-offset);left:initial;right:calc(var(--tooltip-sizing-arrow) * -1);top:initial}.pds-tooltip--left-start .pds-tooltip__content::after{border-inline-start-color:var(--pine-color-primary);border-width:var(--tooltip-border-width-arrow-right);left:initial;right:calc(var(--tooltip-sizing-arrow) * -1);top:var(--tooltip-sizing-arrow-offset)}.pds-tooltip--bottom .pds-tooltip__content::after{border-block-end-color:var(--pine-color-primary);border-width:var(--tooltip-border-width-arrow-up);left:50%;top:calc(var(--tooltip-sizing-arrow) * -1);-webkit-transform:translateX(-50%);transform:translateX(-50%)}.pds-tooltip--bottom-end .pds-tooltip__content::after{border-block-end-color:var(--pine-color-primary);border-width:var(--tooltip-border-width-arrow-up);left:initial;right:var(--tooltip-sizing-arrow-offset);top:calc(var(--tooltip-sizing-arrow) * -1)}.pds-tooltip--bottom-start .pds-tooltip__content::after{border-block-end-color:var(--pine-color-primary);border-width:var(--tooltip-border-width-arrow-up);left:var(--tooltip-sizing-arrow-offset);top:calc(var(--tooltip-sizing-arrow) * -1)}.pds-tooltip--no-arrow .pds-tooltip__content::after{border-width:0}'}},[260,"pds-tooltip",{content:[1],componentId:[1,"component-id"],hasArrow:[4,"has-arrow"],htmlContent:[4,"html-content"],placement:[513],maxWidth:[1,"max-width"],opened:[1540],_isInteractiveOpen:[32],showTooltip:[64],hideTooltip:[64]},void 0,{opened:[{handleOpenToggle:0}]}]);h.instanceCounter=0;const d=h,c=function(){"undefined"!=typeof customElements&&["pds-tooltip"].forEach((t=>{"pds-tooltip"===t&&(customElements.get(s(t))||customElements.define(s(t),h))}))};export{d as PdsTooltip,c as defineCustomElement}
1
+ import{proxyCustomElement as t,HTMLElement as o,h as i,Host as r,transformTag as s}from"@stencil/core/internal/client";import{c as e,a as l,o as n,f as a,s as p}from"./floating-ui.dom.js";const h=t(class t extends o{constructor(t){super(),!1!==t&&this.__registerHost(),this._isInteractiveOpen=!1,this.portalEl=null,this.resolvedPlacement="right",this.triggerEl=null,this.contentDiv=null,this.slotMutationObserver=null,this.currentPathname="",this.pathnameCheckInterval=null,this.stopAutoUpdate=null,this.hasArrow=!0,this.htmlContent=!1,this.placement="right",this.maxWidth="352px",this.opened=!1,this.hasCheckedReconnect=!1,this.handleHide=()=>{this.opened&&!this._isInteractiveOpen||(this.hideTooltip(),this._isInteractiveOpen=!1)},this.handleShow=()=>{this.opened&&!this._isInteractiveOpen||(this._isInteractiveOpen=!0,this.showTooltip())},this.handlePageShow=()=>{this.opened&&!this._isInteractiveOpen||(this.opened=!1,this._isInteractiveOpen=!1)},this.handleSpaNavigation=()=>{this.opened&&!this._isInteractiveOpen||(this.hideTooltip(),this._isInteractiveOpen=!1)},this.checkPathnameChange=()=>{window.location.pathname!==this.currentPathname&&(this.currentPathname=window.location.pathname,this.handleSpaNavigation())}}handleOpenToggle(t,o){!1===t&&!0===o&&(this._isInteractiveOpen=!1)}componentWillLoad(){this._isInteractiveOpen=!1,this.resolvedPlacement=this.placement}componentDidLoad(){window.addEventListener("pageshow",this.handlePageShow),this.currentPathname=window.location.pathname,this.triggerEl=this.el.querySelector(".pds-tooltip__trigger");const t=this.el.querySelector(".pds-tooltip__content-slot-wrapper");null!==t&&(this.slotMutationObserver=new MutationObserver((()=>{this.opened&&null!==this.portalEl&&(this.removePortal(),this.createPortal())})),this.slotMutationObserver.observe(t,{childList:!0,subtree:!1}))}connectedCallback(){this.hasCheckedReconnect=!1}disconnectedCallback(){window.removeEventListener("pageshow",this.handlePageShow),null!==this.slotMutationObserver&&(this.slotMutationObserver.disconnect(),this.slotMutationObserver=null),null!==this.portalEl&&this.removePortal(),null!==this.pathnameCheckInterval&&(clearInterval(this.pathnameCheckInterval),this.pathnameCheckInterval=null),null!==this.stopAutoUpdate&&(this.stopAutoUpdate(),this.stopAutoUpdate=null)}unwrapReconnectedSlots(){const t=Array.from(this.el.children).find((t=>t.matches(".pds-tooltip__trigger"))),o=Array.from(this.el.children).find((t=>t.matches(".pds-tooltip__content-slot-wrapper")));if(void 0===t||void 0===o)return;const i=t=>Array.from(t.children).find((t=>t.matches(".pds-tooltip__trigger, .pds-tooltip__content-slot-wrapper")));[t,o].forEach((r=>{let s=i(r);for(;void 0!==s;){const e=s.matches(".pds-tooltip__content-slot-wrapper")?o:t;Array.from(s.childNodes).forEach((t=>e===r?r.insertBefore(t,s):e.appendChild(t))),s.remove(),s=i(r)}}))}componentDidRender(){this.hasCheckedReconnect||(this.unwrapReconnectedSlots(),this.hasCheckedReconnect=!0),this.opened&&null===this.portalEl?this.createPortal():this.opened||null===this.portalEl||this.removePortal(),null!==this.portalEl&&(this.portalEl.className=`pds-tooltip pds-tooltip--${this.resolvedPlacement} ${this.htmlContent?"pds-tooltip--has-html-content":""} ${this.opened?"pds-tooltip--is-open":""} ${this.hasArrow?"":"pds-tooltip--no-arrow"}`,this.portalEl.setAttribute("aria-hidden",this.opened?"false":"true"),this.portalEl.setAttribute("aria-live",this.opened?"polite":"off"))}async showTooltip(){this.opened=!0}async hideTooltip(){this.opened=!1}determinePositioningAnchor(){let t=this.triggerEl;if(null!==this.triggerEl){const o=this.triggerEl.childNodes;for(let i=0;i<o.length;i++){const r=o[i];if(r.nodeType===Node.ELEMENT_NODE){t=r;break}}}return t}async repositionPortal(){const t=this.determinePositioningAnchor();if(null!==t&&null!==this.portalEl)try{const{x:o,y:i,placement:r}=await e(t,this.portalEl,{placement:this.placement,strategy:"fixed",middleware:[n(8),a(),p({padding:5})]});this.resolvedPlacement=r,Object.assign(this.portalEl.style,{left:o+"px",top:i+"px",position:"fixed"}),this.portalEl.className=`pds-tooltip pds-tooltip--${this.resolvedPlacement} ${this.htmlContent?"pds-tooltip--has-html-content":""} ${this.opened?"pds-tooltip--is-open":""} ${this.hasArrow?"":"pds-tooltip--no-arrow"}`}catch(o){console.warn("Failed to position tooltip:",o),this.resolvedPlacement=this.placement;const i=t.getBoundingClientRect();this.portalEl.style.left=i.right+8+"px",this.portalEl.style.top=i.top+"px",this.portalEl.style.position="fixed"}}createPortal(){if(null!==this.portalEl)return;if(this.portalEl=document.createElement("div"),this.portalEl.className=`pds-tooltip pds-tooltip--${this.resolvedPlacement} ${this.htmlContent?"pds-tooltip--has-html-content":""} ${this.opened?"pds-tooltip--is-open":""} ${this.hasArrow?"":"pds-tooltip--no-arrow"}`,this.portalEl.style.position="fixed",this.portalEl.style.zIndex="var(--pine-z-index-nuclear)",""===this.portalEl.id){const o=t.instanceCounter++;this.portalEl.id=`${this.componentId||this.el.id||"pds-tooltip"}-portal-${o}`}this.portalEl.getAttribute("id")!==this.portalEl.id&&this.portalEl.setAttribute("id",this.portalEl.id),this.portalEl.setAttribute("role","tooltip"),this.portalEl.setAttribute("aria-hidden",this.opened?"false":"true"),this.portalEl.setAttribute("aria-live",this.opened?"polite":"off"),this.portalEl.style.maxWidth=this.maxWidth,this.contentDiv=document.createElement("div"),this.contentDiv.className="pds-tooltip__content",this.contentDiv.setAttribute("aria-hidden",this.opened?"false":"true"),this.contentDiv.setAttribute("aria-live",this.opened?"polite":"off");const o=this.el.querySelector(".pds-tooltip__content-slot-wrapper"),i=null==o?void 0:o.querySelector('[slot="content"]');let r=!1;if(null!==i){const t=Array.from(i.childNodes);t.length>0&&t.some((t=>{var o;return t.nodeType===Node.ELEMENT_NODE||t.nodeType===Node.TEXT_NODE&&""!==(null===(o=t.textContent)||void 0===o?void 0:o.trim())}))&&(r=!0,t.forEach((t=>{var o;(t.nodeType===Node.ELEMENT_NODE||t.nodeType===Node.TEXT_NODE&&""!==(null===(o=t.textContent)||void 0===o?void 0:o.trim()))&&this.contentDiv.appendChild(t.cloneNode(!0))})))}r||"string"!=typeof this.content||""===this.content.trim()||(this.contentDiv.textContent=this.content),this.portalEl.appendChild(this.contentDiv),document.body.appendChild(this.portalEl),this.repositionPortal().catch((t=>{console.warn("Failed to position tooltip on creation:",t)})),this.triggerEl&&this.portalEl&&(this.stopAutoUpdate=l(this.triggerEl,this.portalEl,(()=>{this.repositionPortal().catch((t=>{console.warn("Failed to reposition tooltip on auto update:",t)}))}))),window.addEventListener("popstate",this.handleSpaNavigation,!0),window.addEventListener("hashchange",this.handleSpaNavigation,!0),this.pathnameCheckInterval=setInterval(this.checkPathnameChange,100),null!==this.triggerEl&&""!==this.portalEl.id&&this.triggerEl.setAttribute("aria-describedby",this.portalEl.id)}removePortal(){if(null!==this.stopAutoUpdate&&(this.stopAutoUpdate(),this.stopAutoUpdate=null),null!==this.pathnameCheckInterval&&(clearInterval(this.pathnameCheckInterval),this.pathnameCheckInterval=null),null!==this.portalEl){window.removeEventListener("popstate",this.handleSpaNavigation,!0),window.removeEventListener("hashchange",this.handleSpaNavigation,!0);try{this.portalEl.parentNode&&this.portalEl.parentNode.removeChild(this.portalEl)}catch(t){console.warn("Portal element could not be removed from DOM:",t)}this.portalEl=null}null!==this.triggerEl&&this.triggerEl.removeAttribute("aria-describedby"),this.contentDiv=null}render(){return i(r,{key:"2e28dff93cd22fd3816d71b67e38883061a8b2bc",id:this.componentId||void 0,class:{"pds-tooltip--is-open":this.opened}},i("span",{key:"9e7ea50427587f61dcea1ea97e10d71f4d0c9d92",class:"pds-tooltip__trigger",onMouseEnter:this.handleShow,onMouseLeave:this.handleHide,onFocusin:this.handleShow,onFocusout:this.handleHide,ref:t=>this.triggerEl=t},i("slot",{key:"08c1ff63c91b97b4df1362eb9b2e42b6fd556b11"})),i("div",{key:"5cfe25e21d1f096b76335570fbb930a7bc8c95f8",class:"pds-tooltip__content-slot-wrapper",hidden:!0},i("slot",{key:"e7e8728d7c8a0c74933cef070aa38f88a1f53a32",name:"content"})))}get el(){return this}static get watchers(){return{opened:[{handleOpenToggle:0}]}}static get style(){return'.pds-tooltip{--tooltip-border-width-arrow-down:var(--tooltip-sizing-arrow) var(--tooltip-sizing-arrow) 0;--tooltip-border-width-arrow-left:var(--tooltip-sizing-arrow) var(--tooltip-sizing-arrow) var(--tooltip-sizing-arrow) 0;--tooltip-border-width-arrow-right:var(--tooltip-sizing-arrow) 0 var(--tooltip-sizing-arrow) var(--tooltip-sizing-arrow);--tooltip-border-width-arrow-up:0 var(--tooltip-sizing-arrow) var(--tooltip-sizing-arrow);--tooltip-sizing-arrow:6px;--tooltip-sizing-arrow-offset:14px;--tooltip-dimension-max-width:320px}.pds-tooltip__content{background-color:var(--pine-color-primary);border-radius:calc(var(--pine-dimension-xs) * 1.25);-webkit-box-shadow:var(--pine-box-shadow);box-shadow:var(--pine-box-shadow);color:var(--pine-color-text-primary);max-width:var(--tooltip-dimension-max-width);opacity:0;padding:var(--pine-dimension-xs) calc(var(--pine-dimension-md) / 2);position:relative;visibility:hidden;width:-webkit-max-content;width:-moz-max-content;width:max-content}.pds-tooltip--is-open .pds-tooltip__content{opacity:1;visibility:visible;z-index:var(--pine-z-index-raised)}.pds-tooltip.pds-tooltip--has-html-content .pds-tooltip__content{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.pds-tooltip__content::after{border-color:transparent;border-right-color:transparent;border-style:solid;border-width:var(--tooltip-border-width-arrow-left);content:"";height:0;position:absolute;width:0}.pds-tooltip--right .pds-tooltip__content::after{border-inline-end-color:var(--pine-color-primary);border-width:var(--tooltip-border-width-arrow-left);left:calc(var(--tooltip-sizing-arrow) * -1);top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.pds-tooltip--right-end .pds-tooltip__content::after{border-inline-end-color:var(--pine-color-primary);border-width:var(--tooltip-border-width-arrow-left);bottom:var(--tooltip-sizing-arrow-offset);left:calc(var(--tooltip-sizing-arrow) * -1);top:initial}.pds-tooltip--right-start .pds-tooltip__content::after{border-inline-end-color:var(--pine-color-primary);border-width:var(--tooltip-border-width-arrow-left);left:calc(var(--tooltip-sizing-arrow) * -1);top:var(--tooltip-sizing-arrow-offset)}.pds-tooltip--top .pds-tooltip__content::after{border-block-start-color:var(--pine-color-primary);border-width:var(--tooltip-border-width-arrow-down);bottom:calc(var(--tooltip-sizing-arrow) * -1);left:50%;top:initial;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.pds-tooltip--top-start .pds-tooltip__content::after{border-block-start-color:var(--pine-color-primary);border-width:var(--tooltip-border-width-arrow-down);bottom:calc(var(--tooltip-sizing-arrow) * -1);left:var(--tooltip-sizing-arrow-offset);top:initial}.pds-tooltip--top-end .pds-tooltip__content::after{border-block-start-color:var(--pine-color-primary);border-width:var(--tooltip-border-width-arrow-down);bottom:calc(var(--tooltip-sizing-arrow) * -1);left:initial;right:var(--tooltip-sizing-arrow-offset);top:initial}.pds-tooltip--left .pds-tooltip__content::after{border-inline-start-color:var(--pine-color-primary);border-width:var(--tooltip-border-width-arrow-right);left:initial;right:calc(var(--tooltip-sizing-arrow) * -1);top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.pds-tooltip--left-end .pds-tooltip__content::after{border-inline-start-color:var(--pine-color-primary);border-width:var(--tooltip-border-width-arrow-right);bottom:var(--tooltip-sizing-arrow-offset);left:initial;right:calc(var(--tooltip-sizing-arrow) * -1);top:initial}.pds-tooltip--left-start .pds-tooltip__content::after{border-inline-start-color:var(--pine-color-primary);border-width:var(--tooltip-border-width-arrow-right);left:initial;right:calc(var(--tooltip-sizing-arrow) * -1);top:var(--tooltip-sizing-arrow-offset)}.pds-tooltip--bottom .pds-tooltip__content::after{border-block-end-color:var(--pine-color-primary);border-width:var(--tooltip-border-width-arrow-up);left:50%;top:calc(var(--tooltip-sizing-arrow) * -1);-webkit-transform:translateX(-50%);transform:translateX(-50%)}.pds-tooltip--bottom-end .pds-tooltip__content::after{border-block-end-color:var(--pine-color-primary);border-width:var(--tooltip-border-width-arrow-up);left:initial;right:var(--tooltip-sizing-arrow-offset);top:calc(var(--tooltip-sizing-arrow) * -1)}.pds-tooltip--bottom-start .pds-tooltip__content::after{border-block-end-color:var(--pine-color-primary);border-width:var(--tooltip-border-width-arrow-up);left:var(--tooltip-sizing-arrow-offset);top:calc(var(--tooltip-sizing-arrow) * -1)}.pds-tooltip--no-arrow .pds-tooltip__content::after{border-width:0}'}},[260,"pds-tooltip",{content:[1],componentId:[1,"component-id"],hasArrow:[4,"has-arrow"],htmlContent:[4,"html-content"],placement:[513],maxWidth:[1,"max-width"],opened:[1540],_isInteractiveOpen:[32],showTooltip:[64],hideTooltip:[64]},void 0,{opened:[{handleOpenToggle:0}]}]);h.instanceCounter=0;const d=h,c=function(){"undefined"!=typeof customElements&&["pds-tooltip"].forEach((t=>{"pds-tooltip"===t&&(customElements.get(s(t))||customElements.define(s(t),h))}))};export{d as PdsTooltip,c as defineCustomElement}
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var keepHydrated = require('./keep-hydrated-iLS88j1Z.js');
3
+ var keepHydrated = require('./keep-hydrated-CiXgkEYd.js');
4
4
 
5
5
  /**
6
6
  * Sets each attribute whose current value differs, and leaves the rest alone. A `MutationObserver`
@@ -9,10 +9,14 @@ var keepHydrated = require('./keep-hydrated-iLS88j1Z.js');
9
9
  * @param attributes - Attribute names and the values they should have
10
10
  */
11
11
  const setAttributesIfChanged = (el, attributes) => {
12
+ let wrote = false;
12
13
  Object.entries(attributes).forEach(([name, value]) => {
13
- if (el.getAttribute(name) !== value)
14
+ if (el.getAttribute(name) !== value) {
14
15
  el.setAttribute(name, value);
16
+ wrote = true;
17
+ }
15
18
  });
19
+ return wrote;
16
20
  };
17
21
  /**
18
22
  * Puts back any of `expected`'s classes or style properties that are missing from `el`. It only
@@ -25,10 +29,9 @@ const restoreHostStyling = (el, { classes, styles }) => {
25
29
  const missing = classes.filter((name) => !el.classList.contains(name));
26
30
  if (missing.length > 0)
27
31
  el.classList.add(...missing);
28
- Object.entries(styles).forEach(([name, value]) => {
29
- if (value && el.style.getPropertyValue(name) === '')
30
- el.style.setProperty(name, value);
31
- });
32
+ const missingStyles = Object.entries(styles).filter(([name, value]) => value && el.style.getPropertyValue(name) === '');
33
+ missingStyles.forEach(([name, value]) => el.style.setProperty(name, value));
34
+ return missing.length > 0 || missingStyles.length > 0;
32
35
  };
33
36
  /**
34
37
  * Watches a component's own host and puts back what it rendered when something strips it. A DOM
@@ -45,16 +48,18 @@ const restoreHostStyling = (el, { classes, styles }) => {
45
48
  const keepHostStyling = (el, expected) => {
46
49
  if (typeof MutationObserver === 'undefined')
47
50
  return null;
48
- const observer = new MutationObserver((records) => {
51
+ const tag = el.tagName.toLowerCase();
52
+ const seenStencilClasses = new Set();
53
+ const observer = new MutationObserver(keepHydrated.limitRestores((records) => {
49
54
  const styling = expected();
50
55
  // A strip takes Stencil's own classes too: without `hydrated` Stencil hides the component, and
51
56
  // without its scope classes a scoped component's CSS stops matching. Put back only the ones that
52
57
  // were there, so this never runs ahead of Stencil. `keepPineHydrated` does the same for every
53
58
  // component, but the custom-elements build only runs it if the consumer calls it, so keep this.
54
59
  const stencilClasses = records
55
- .filter((record) => record.attributeName === 'class' && record.oldValue != null)
56
- .flatMap((record) => keepHydrated.classNamesOf(record.oldValue).filter((name) => keepHydrated.isStencilClass(el, name)));
57
- restoreHostStyling(el, Object.assign(Object.assign({}, styling), { classes: [...styling.classes, ...stencilClasses] }));
60
+ .filter((record) => record.attributeName === 'class')
61
+ .flatMap((record) => keepHydrated.stencilClassesOf(seenStencilClasses, el, record.oldValue));
62
+ let wrote = restoreHostStyling(el, Object.assign(Object.assign({}, styling), { classes: [...styling.classes, ...stencilClasses] }));
58
63
  // An attribute the component still renders comes back with the value it had, which is what
59
64
  // Stencil wrote (a boolean `true` lands as an empty value). One it stopped rendering stays
60
65
  // removed, since that was Stencil's own write.
@@ -64,8 +69,10 @@ const keepHostStyling = (el, expected) => {
64
69
  if (oldValue == null || rendered == null || rendered === false || el.hasAttribute(name))
65
70
  return;
66
71
  el.setAttribute(name, oldValue);
72
+ wrote = true;
67
73
  });
68
- });
74
+ return wrote;
75
+ }, `${tag}: stopped restoring its host, as another script keeps changing it. Use props instead.`, el, keepHydrated.HOST_RESTORE));
69
76
  observer.observe(el, { attributes: true, attributeOldValue: true });
70
77
  return observer;
71
78
  };
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- /* pds-icons v10.5.1, ES Modules */
3
+ /* pds-icons v10.6.0, ES Modules */
4
4
 
5
5
  const addCircle = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' class='pdsicon'><path fill-rule='evenodd' d='M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18M1 12C1 5.925 5.925 1 12 1s11 4.925 11 11-4.925 11-11 11S1 18.075 1 12m11-5a1 1 0 0 1 1 1v3h3a1 1 0 1 1 0 2h-3v3a1 1 0 1 1-2 0v-3H8a1 1 0 1 1 0-2h3V8a1 1 0 0 1 1-1'/></svg>";
6
6
  const calendarSimple = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' class='pdsicon'><path fill-rule='evenodd' d='M8 1a1 1 0 0 1 1 1v1h6V2a1 1 0 1 1 2 0v1.002c.476.003.891.013 1.252.042.562.046 1.079.145 1.564.392a4 4 0 0 1 1.748 1.748c.247.485.346 1.002.392 1.564C22 7.29 22 7.954 22 8.758v8.483c0 .805 0 1.47-.044 2.01-.046.563-.145 1.08-.392 1.565a4 4 0 0 1-1.748 1.748c-.485.247-1.002.346-1.564.392-.541.044-1.206.044-2.01.044H7.758c-.805 0-1.47 0-2.01-.044-.563-.046-1.08-.145-1.565-.392a4 4 0 0 1-1.748-1.748c-.247-.485-.346-1.002-.392-1.564C2 18.71 2 18.046 2 17.242V8.758c0-.805 0-1.47.044-2.01.046-.563.145-1.08.392-1.565a4 4 0 0 1 1.748-1.748c.485-.247 1.002-.346 1.564-.392.361-.03.777-.04 1.252-.042V2a1 1 0 0 1 1-1M7 5.002c-.446.003-.795.012-1.089.036-.438.035-.663.1-.819.18a2 2 0 0 0-.874.874c-.08.156-.145.38-.18.819C4 7.361 4 7.943 4 8.8V9h16v-.2c0-.857 0-1.439-.038-1.889-.035-.438-.1-.663-.18-.819a2 2 0 0 0-.874-.874c-.156-.08-.38-.145-.819-.18A15 15 0 0 0 17 5.002V6a1 1 0 1 1-2 0V5H9v1a1 1 0 1 1-2 0zM20 11H4v6.2c0 .857 0 1.439.038 1.889.035.438.1.663.18.819a2 2 0 0 0 .874.874c.156.08.38.145.819.18C6.361 21 6.943 21 7.8 21h8.4c.857 0 1.439 0 1.889-.038.438-.035.663-.1.819-.18a2 2 0 0 0 .874-.874c.08-.156.145-.38.18-.819.037-.45.038-1.032.038-1.889z'/></svg>";
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var keepHydrated = require('./keep-hydrated-iLS88j1Z.js');
3
+ var keepHydrated = require('./keep-hydrated-CiXgkEYd.js');
4
4
 
5
5
  const NAMESPACE = 'pine-core';
6
6
  const BUILD = /* pine-core */ { hotModuleReplacement: false, hydratedSelectorName: "hydrated", lazyLoad: true, propChangeCallback: true, slotRelocation: true, state: true, updatable: true};
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var keepHydrated = require('./keep-hydrated-iLS88j1Z.js');
3
+ var keepHydrated = require('./keep-hydrated-CiXgkEYd.js');
4
4
 
5
5
  // Single source of truth for `pds-text` `size` values. The `as const` tuple is
6
6
  // readable at runtime (for validation) and `TextSizeType` is derived from it,