@pine-ds/core 3.4.2 → 3.5.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 (587) hide show
  1. package/components/floating-ui.dom.js +180 -4
  2. package/components/floating-ui.dom.js.map +1 -1
  3. package/components/index2.js +1 -1
  4. package/components/index2.js.map +1 -1
  5. package/components/mock-pds-modal.js +1 -1
  6. package/components/pds-box2.js +4 -2
  7. package/components/pds-box2.js.map +1 -1
  8. package/components/pds-button2.js +2 -2
  9. package/components/pds-button2.js.map +1 -1
  10. package/components/pds-input.js +3 -2
  11. package/components/pds-input.js.map +1 -1
  12. package/components/pds-link2.js +2 -2
  13. package/components/pds-loader2.js +1 -1
  14. package/components/pds-loader2.js.map +1 -1
  15. package/components/pds-modal-content.js +2 -2
  16. package/components/pds-modal-footer.js +1 -1
  17. package/components/pds-modal-header.js +1 -1
  18. package/components/pds-modal.js +2 -2
  19. package/components/pds-popover.js +1 -1
  20. package/components/pds-progress.js +1 -1
  21. package/components/pds-property.js +1 -1
  22. package/components/pds-radio.js +3 -3
  23. package/components/pds-row.js +1 -1
  24. package/components/pds-select.js +1 -1
  25. package/components/pds-select.js.map +1 -1
  26. package/components/pds-sortable-item.js +1 -1
  27. package/components/pds-sortable.js +1 -1
  28. package/components/pds-switch.js +3 -3
  29. package/components/pds-tab.js +4 -4
  30. package/components/pds-tab.js.map +1 -1
  31. package/components/pds-table-body.js +1 -1
  32. package/components/pds-table-cell2.js +66 -8
  33. package/components/pds-table-cell2.js.map +1 -1
  34. package/components/pds-table-head-cell2.js +67 -9
  35. package/components/pds-table-head-cell2.js.map +1 -1
  36. package/components/pds-table-head.js +1 -1
  37. package/components/pds-table-row.js +1 -1
  38. package/components/pds-table.js +106 -4
  39. package/components/pds-table.js.map +1 -1
  40. package/components/pds-tabpanel.js +1 -1
  41. package/components/pds-tabs.js +1 -1
  42. package/components/pds-text2.js +1 -1
  43. package/components/pds-textarea.js +7 -6
  44. package/components/pds-textarea.js.map +1 -1
  45. package/components/pds-tooltip.js +93 -159
  46. package/components/pds-tooltip.js.map +1 -1
  47. package/dist/cjs/{floating-ui.dom-Bz4BD-cr.js → floating-ui.dom-DTAy35nv.js} +182 -5
  48. package/dist/{esm-es5/floating-ui.dom-D_FwyeSw.js.map → cjs/floating-ui.dom-DTAy35nv.js.map} +1 -1
  49. package/dist/cjs/{index-BfqrB2cC.js → index-DVaLegMK.js} +3 -3
  50. package/dist/cjs/index-DVaLegMK.js.map +1 -0
  51. package/dist/cjs/loader.cjs.js +1 -1
  52. package/dist/cjs/mock-pds-modal.cjs.entry.js +1 -1
  53. package/dist/cjs/pds-accordion.cjs.entry.js +1 -1
  54. package/dist/cjs/pds-avatar.cjs.entry.js +1 -1
  55. package/dist/cjs/pds-box.cjs.entry.js +3 -2
  56. package/dist/cjs/pds-box.cjs.entry.js.map +1 -1
  57. package/dist/cjs/pds-box.entry.cjs.js.map +1 -1
  58. package/dist/cjs/pds-button.cjs.entry.js +3 -3
  59. package/dist/cjs/pds-button.cjs.entry.js.map +1 -1
  60. package/dist/cjs/pds-button.entry.cjs.js.map +1 -1
  61. package/dist/cjs/pds-checkbox.cjs.entry.js +1 -1
  62. package/dist/cjs/pds-chip.cjs.entry.js +1 -1
  63. package/dist/cjs/pds-combobox.cjs.entry.js +1 -1
  64. package/dist/cjs/pds-copytext.cjs.entry.js +1 -1
  65. package/dist/cjs/pds-dropdown-menu.cjs.entry.js +1 -1
  66. package/dist/cjs/pds-input.cjs.entry.js +3 -3
  67. package/dist/cjs/pds-input.cjs.entry.js.map +1 -1
  68. package/dist/cjs/pds-input.entry.cjs.js.map +1 -1
  69. package/dist/cjs/pds-link.cjs.entry.js +3 -3
  70. package/dist/cjs/pds-loader.cjs.entry.js +1 -1
  71. package/dist/cjs/pds-loader.cjs.entry.js.map +1 -1
  72. package/dist/cjs/pds-loader.entry.cjs.js.map +1 -1
  73. package/dist/cjs/pds-modal-content.cjs.entry.js +2 -2
  74. package/dist/cjs/pds-modal-footer.cjs.entry.js +1 -1
  75. package/dist/cjs/pds-modal-header.cjs.entry.js +1 -1
  76. package/dist/cjs/pds-modal.cjs.entry.js +2 -2
  77. package/dist/cjs/pds-popover.cjs.entry.js +1 -1
  78. package/dist/cjs/pds-progress.cjs.entry.js +1 -1
  79. package/dist/cjs/pds-property.cjs.entry.js +1 -1
  80. package/dist/cjs/pds-radio.cjs.entry.js +4 -4
  81. package/dist/cjs/pds-row.cjs.entry.js +1 -1
  82. package/dist/cjs/pds-select.cjs.entry.js +2 -2
  83. package/dist/cjs/pds-select.cjs.entry.js.map +1 -1
  84. package/dist/cjs/pds-select.entry.cjs.js.map +1 -1
  85. package/dist/cjs/pds-sortable-item.cjs.entry.js +2 -2
  86. package/dist/cjs/pds-sortable.cjs.entry.js +1 -1
  87. package/dist/cjs/pds-switch.cjs.entry.js +4 -4
  88. package/dist/cjs/pds-tab.cjs.entry.js +4 -4
  89. package/dist/cjs/pds-tab.cjs.entry.js.map +1 -1
  90. package/dist/cjs/pds-tab.entry.cjs.js.map +1 -1
  91. package/dist/cjs/pds-table-body.cjs.entry.js +1 -1
  92. package/dist/cjs/pds-table-cell.cjs.entry.js +65 -8
  93. package/dist/cjs/pds-table-cell.cjs.entry.js.map +1 -1
  94. package/dist/cjs/pds-table-cell.entry.cjs.js.map +1 -1
  95. package/dist/cjs/pds-table-head-cell.cjs.entry.js +67 -10
  96. package/dist/cjs/pds-table-head-cell.cjs.entry.js.map +1 -1
  97. package/dist/cjs/pds-table-head-cell.entry.cjs.js.map +1 -1
  98. package/dist/cjs/pds-table-head.cjs.entry.js +1 -1
  99. package/dist/cjs/pds-table-row.cjs.entry.js +1 -1
  100. package/dist/cjs/pds-table.cjs.entry.js +106 -4
  101. package/dist/cjs/pds-table.cjs.entry.js.map +1 -1
  102. package/dist/cjs/pds-table.entry.cjs.js.map +1 -1
  103. package/dist/cjs/pds-tabpanel.cjs.entry.js +1 -1
  104. package/dist/cjs/pds-tabs.cjs.entry.js +1 -1
  105. package/dist/cjs/pds-text.cjs.entry.js +1 -1
  106. package/dist/cjs/pds-textarea.cjs.entry.js +7 -7
  107. package/dist/cjs/pds-textarea.cjs.entry.js.map +1 -1
  108. package/dist/cjs/pds-textarea.entry.cjs.js.map +1 -1
  109. package/dist/cjs/pds-tooltip.cjs.entry.js +93 -158
  110. package/dist/cjs/pds-tooltip.cjs.entry.js.map +1 -1
  111. package/dist/cjs/pds-tooltip.entry.cjs.js.map +1 -1
  112. package/dist/cjs/pine-core.cjs.js +1 -1
  113. package/dist/collection/components/pds-accordion/stories/pds-accordion.stories.js +1 -1
  114. package/dist/collection/components/pds-alert/stories/pds-alert.stories.js +6 -6
  115. package/dist/collection/components/pds-box/pds-box.css +4 -0
  116. package/dist/collection/components/pds-box/pds-box.js +24 -1
  117. package/dist/collection/components/pds-box/pds-box.js.map +1 -1
  118. package/dist/collection/components/pds-box/stories/pds-box.stories.js +2 -2
  119. package/dist/collection/components/pds-button/pds-button.css +1 -0
  120. package/dist/collection/components/pds-button/pds-button.js +2 -1
  121. package/dist/collection/components/pds-button/pds-button.js.map +1 -1
  122. package/dist/collection/components/pds-button/stories/pds-button.stories.js +4 -4
  123. package/dist/collection/components/pds-checkbox/stories/pds-checkbox.stories.js +6 -6
  124. package/dist/collection/components/pds-chip/stories/pds-chip.stories.js +2 -2
  125. package/dist/collection/components/pds-copytext/stories/pds-copytext.stories.js +3 -3
  126. package/dist/collection/components/pds-image/stories/pds-image.stories.js +1 -1
  127. package/dist/collection/components/pds-input/pds-input.css +13 -0
  128. package/dist/collection/components/pds-input/pds-input.js +20 -1
  129. package/dist/collection/components/pds-input/pds-input.js.map +1 -1
  130. package/dist/collection/components/pds-input/stories/pds-input.stories.js +47 -38
  131. package/dist/collection/components/pds-link/pds-link.js +2 -2
  132. package/dist/collection/components/pds-link/stories/pds-link.stories.js +2 -2
  133. package/dist/collection/components/pds-loader/pds-loader.js +2 -1
  134. package/dist/collection/components/pds-loader/pds-loader.js.map +1 -1
  135. package/dist/collection/components/pds-loader/stories/pds-loader.stories.js +3 -3
  136. package/dist/collection/components/pds-modal/pds-modal-content/pds-modal-content.js +2 -2
  137. package/dist/collection/components/pds-modal/pds-modal-footer/pds-modal-footer.js +1 -1
  138. package/dist/collection/components/pds-modal/pds-modal-header/pds-modal-header.js +1 -1
  139. package/dist/collection/components/pds-modal/pds-modal.js +2 -2
  140. package/dist/collection/components/pds-modal/stories/pds-modal.stories.js +9 -9
  141. package/dist/collection/components/pds-modal/test/mock-pds-modal.js +1 -1
  142. package/dist/collection/components/pds-popover/pds-popover.js +1 -1
  143. package/dist/collection/components/pds-progress/pds-progress.js +1 -1
  144. package/dist/collection/components/pds-progress/stories/pds-progress.stories.js +2 -2
  145. package/dist/collection/components/pds-property/pds-property.js +1 -1
  146. package/dist/collection/components/pds-radio/pds-radio.js +3 -3
  147. package/dist/collection/components/pds-radio/stories/pds-radio.stories.js +6 -6
  148. package/dist/collection/components/pds-row/pds-row.js +1 -1
  149. package/dist/collection/components/pds-row/stories/pds-row.stories.js +16 -12
  150. package/dist/collection/components/pds-select/pds-select.js +2 -2
  151. package/dist/collection/components/pds-select/pds-select.js.map +1 -1
  152. package/dist/collection/components/pds-select/stories/pds-select.stories.js +19 -19
  153. package/dist/collection/components/pds-sortable/pds-sortable-item/pds-sortable-item.js +1 -1
  154. package/dist/collection/components/pds-sortable/pds-sortable.js +1 -1
  155. package/dist/collection/components/pds-sortable/stories/pds-sortable.stories.js +4 -4
  156. package/dist/collection/components/pds-switch/pds-switch.js +3 -3
  157. package/dist/collection/components/pds-switch/stories/pds-switch.stories.js +5 -5
  158. package/dist/collection/components/pds-table/pds-table-body/pds-table-body.js +1 -1
  159. package/dist/collection/components/pds-table/pds-table-cell/pds-table-cell.css +16 -0
  160. package/dist/collection/components/pds-table/pds-table-cell/pds-table-cell.js +83 -7
  161. package/dist/collection/components/pds-table/pds-table-cell/pds-table-cell.js.map +1 -1
  162. package/dist/collection/components/pds-table/pds-table-cell/stories/pds-table-cell.stories.js +23 -4
  163. package/dist/collection/components/pds-table/pds-table-head/pds-table-head.js +1 -1
  164. package/dist/collection/components/pds-table/pds-table-head-cell/pds-table-head-cell.css +18 -1
  165. package/dist/collection/components/pds-table/pds-table-head-cell/pds-table-head-cell.js +84 -8
  166. package/dist/collection/components/pds-table/pds-table-head-cell/pds-table-head-cell.js.map +1 -1
  167. package/dist/collection/components/pds-table/pds-table-head-cell/stories/pds-table-head-cell.stories.js +13 -4
  168. package/dist/collection/components/pds-table/pds-table-row/pds-table-row.js +1 -1
  169. package/dist/collection/components/pds-table/pds-table.css +80 -11
  170. package/dist/collection/components/pds-table/pds-table.js +105 -3
  171. package/dist/collection/components/pds-table/pds-table.js.map +1 -1
  172. package/dist/collection/components/pds-table/stories/pds-table.stories.js +57 -12
  173. package/dist/collection/components/pds-tabs/pds-tab/pds-tab.css +6 -6
  174. package/dist/collection/components/pds-tabs/pds-tab/pds-tab.js +3 -3
  175. package/dist/collection/components/pds-tabs/pds-tabpanel/pds-tabpanel.js +1 -1
  176. package/dist/collection/components/pds-tabs/pds-tabs.js +1 -1
  177. package/dist/collection/components/pds-text/pds-text.js +1 -1
  178. package/dist/collection/components/pds-textarea/pds-textarea.css +13 -0
  179. package/dist/collection/components/pds-textarea/pds-textarea.js +25 -6
  180. package/dist/collection/components/pds-textarea/pds-textarea.js.map +1 -1
  181. package/dist/collection/components/pds-textarea/stories/pds-textarea.stories.js +19 -15
  182. package/dist/collection/components/pds-toast/stories/pds-toast.stories.js +2 -2
  183. package/dist/collection/components/pds-tooltip/pds-tooltip.css +0 -1
  184. package/dist/collection/components/pds-tooltip/pds-tooltip.js +102 -78
  185. package/dist/collection/components/pds-tooltip/pds-tooltip.js.map +1 -1
  186. package/dist/collection/components/pds-tooltip/stories/pds-tooltip.stories.js +14 -14
  187. package/dist/docs.json +176 -7
  188. package/dist/esm/{floating-ui.dom-D_FwyeSw.js → floating-ui.dom-DbQzNDdQ.js} +182 -6
  189. package/dist/esm/{floating-ui.dom-D_FwyeSw.js.map → floating-ui.dom-DbQzNDdQ.js.map} +1 -1
  190. package/dist/esm/{index-CzVv99mW.js → index-DrJ5r5Pu.js} +3 -3
  191. package/dist/esm/index-DrJ5r5Pu.js.map +1 -0
  192. package/dist/esm/loader.js +1 -1
  193. package/dist/esm/mock-pds-modal.entry.js +1 -1
  194. package/dist/esm/pds-accordion.entry.js +1 -1
  195. package/dist/esm/pds-avatar.entry.js +1 -1
  196. package/dist/esm/pds-box.entry.js +3 -2
  197. package/dist/esm/pds-box.entry.js.map +1 -1
  198. package/dist/esm/pds-button.entry.js +3 -3
  199. package/dist/esm/pds-button.entry.js.map +1 -1
  200. package/dist/esm/pds-checkbox.entry.js +1 -1
  201. package/dist/esm/pds-chip.entry.js +1 -1
  202. package/dist/esm/pds-combobox.entry.js +1 -1
  203. package/dist/esm/pds-copytext.entry.js +1 -1
  204. package/dist/esm/pds-dropdown-menu.entry.js +1 -1
  205. package/dist/esm/pds-input.entry.js +3 -3
  206. package/dist/esm/pds-input.entry.js.map +1 -1
  207. package/dist/esm/pds-link.entry.js +3 -3
  208. package/dist/esm/pds-loader.entry.js +1 -1
  209. package/dist/esm/pds-loader.entry.js.map +1 -1
  210. package/dist/esm/pds-modal-content.entry.js +2 -2
  211. package/dist/esm/pds-modal-footer.entry.js +1 -1
  212. package/dist/esm/pds-modal-header.entry.js +1 -1
  213. package/dist/esm/pds-modal.entry.js +2 -2
  214. package/dist/esm/pds-popover.entry.js +1 -1
  215. package/dist/esm/pds-progress.entry.js +1 -1
  216. package/dist/esm/pds-property.entry.js +1 -1
  217. package/dist/esm/pds-radio.entry.js +4 -4
  218. package/dist/esm/pds-row.entry.js +1 -1
  219. package/dist/esm/pds-select.entry.js +2 -2
  220. package/dist/esm/pds-select.entry.js.map +1 -1
  221. package/dist/esm/pds-sortable-item.entry.js +2 -2
  222. package/dist/esm/pds-sortable.entry.js +1 -1
  223. package/dist/esm/pds-switch.entry.js +4 -4
  224. package/dist/esm/pds-tab.entry.js +4 -4
  225. package/dist/esm/pds-tab.entry.js.map +1 -1
  226. package/dist/esm/pds-table-body.entry.js +1 -1
  227. package/dist/esm/pds-table-cell.entry.js +65 -8
  228. package/dist/esm/pds-table-cell.entry.js.map +1 -1
  229. package/dist/esm/pds-table-head-cell.entry.js +67 -10
  230. package/dist/esm/pds-table-head-cell.entry.js.map +1 -1
  231. package/dist/esm/pds-table-head.entry.js +1 -1
  232. package/dist/esm/pds-table-row.entry.js +1 -1
  233. package/dist/esm/pds-table.entry.js +106 -4
  234. package/dist/esm/pds-table.entry.js.map +1 -1
  235. package/dist/esm/pds-tabpanel.entry.js +1 -1
  236. package/dist/esm/pds-tabs.entry.js +1 -1
  237. package/dist/esm/pds-text.entry.js +1 -1
  238. package/dist/esm/pds-textarea.entry.js +7 -7
  239. package/dist/esm/pds-textarea.entry.js.map +1 -1
  240. package/dist/esm/pds-tooltip.entry.js +93 -158
  241. package/dist/esm/pds-tooltip.entry.js.map +1 -1
  242. package/dist/esm/pine-core.js +1 -1
  243. package/dist/esm-es5/floating-ui.dom-DbQzNDdQ.js +2 -0
  244. package/dist/{cjs/floating-ui.dom-Bz4BD-cr.js.map → esm-es5/floating-ui.dom-DbQzNDdQ.js.map} +1 -1
  245. package/dist/esm-es5/{index-CzVv99mW.js → index-DrJ5r5Pu.js} +1 -1
  246. package/dist/esm-es5/index-DrJ5r5Pu.js.map +1 -0
  247. package/dist/esm-es5/loader.js +1 -1
  248. package/dist/esm-es5/mock-pds-modal.entry.js +1 -1
  249. package/dist/esm-es5/pds-accordion.entry.js +1 -1
  250. package/dist/esm-es5/pds-avatar.entry.js +1 -1
  251. package/dist/esm-es5/pds-box.entry.js +1 -1
  252. package/dist/esm-es5/pds-box.entry.js.map +1 -1
  253. package/dist/esm-es5/pds-button.entry.js +1 -1
  254. package/dist/esm-es5/pds-button.entry.js.map +1 -1
  255. package/dist/esm-es5/pds-checkbox.entry.js +1 -1
  256. package/dist/esm-es5/pds-chip.entry.js +1 -1
  257. package/dist/esm-es5/pds-combobox.entry.js +2 -2
  258. package/dist/esm-es5/pds-copytext.entry.js +1 -1
  259. package/dist/esm-es5/pds-dropdown-menu.entry.js +1 -1
  260. package/dist/esm-es5/pds-input.entry.js +1 -1
  261. package/dist/esm-es5/pds-input.entry.js.map +1 -1
  262. package/dist/esm-es5/pds-link.entry.js +1 -1
  263. package/dist/esm-es5/pds-loader.entry.js +1 -1
  264. package/dist/esm-es5/pds-loader.entry.js.map +1 -1
  265. package/dist/esm-es5/pds-modal-content.entry.js +1 -1
  266. package/dist/esm-es5/pds-modal-footer.entry.js +1 -1
  267. package/dist/esm-es5/pds-modal-header.entry.js +1 -1
  268. package/dist/esm-es5/pds-modal.entry.js +1 -1
  269. package/dist/esm-es5/pds-popover.entry.js +1 -1
  270. package/dist/esm-es5/pds-progress.entry.js +1 -1
  271. package/dist/esm-es5/pds-property.entry.js +1 -1
  272. package/dist/esm-es5/pds-radio.entry.js +1 -1
  273. package/dist/esm-es5/pds-row.entry.js +1 -1
  274. package/dist/esm-es5/pds-select.entry.js +1 -1
  275. package/dist/esm-es5/pds-select.entry.js.map +1 -1
  276. package/dist/esm-es5/pds-sortable-item.entry.js +1 -1
  277. package/dist/esm-es5/pds-sortable.entry.js +1 -1
  278. package/dist/esm-es5/pds-switch.entry.js +1 -1
  279. package/dist/esm-es5/pds-tab.entry.js +1 -1
  280. package/dist/esm-es5/pds-tab.entry.js.map +1 -1
  281. package/dist/esm-es5/pds-table-body.entry.js +1 -1
  282. package/dist/esm-es5/pds-table-cell.entry.js +1 -1
  283. package/dist/esm-es5/pds-table-cell.entry.js.map +1 -1
  284. package/dist/esm-es5/pds-table-head-cell.entry.js +1 -1
  285. package/dist/esm-es5/pds-table-head-cell.entry.js.map +1 -1
  286. package/dist/esm-es5/pds-table-head.entry.js +1 -1
  287. package/dist/esm-es5/pds-table-row.entry.js +1 -1
  288. package/dist/esm-es5/pds-table.entry.js +1 -1
  289. package/dist/esm-es5/pds-table.entry.js.map +1 -1
  290. package/dist/esm-es5/pds-tabpanel.entry.js +1 -1
  291. package/dist/esm-es5/pds-tabs.entry.js +1 -1
  292. package/dist/esm-es5/pds-text.entry.js +1 -1
  293. package/dist/esm-es5/pds-textarea.entry.js +1 -1
  294. package/dist/esm-es5/pds-textarea.entry.js.map +1 -1
  295. package/dist/esm-es5/pds-tooltip.entry.js +1 -1
  296. package/dist/esm-es5/pds-tooltip.entry.js.map +1 -1
  297. package/dist/esm-es5/pine-core.js +1 -1
  298. package/dist/pine-core/{p-209b1d69.entry.js → p-00616fc9.entry.js} +2 -2
  299. package/dist/pine-core/p-00616fc9.entry.js.map +1 -0
  300. package/dist/pine-core/p-02326ac3.entry.js +2 -0
  301. package/dist/pine-core/p-02326ac3.entry.js.map +1 -0
  302. package/dist/pine-core/{p-19d08886.system.entry.js → p-023d8b71.system.entry.js} +2 -2
  303. package/dist/pine-core/p-0485aa93.system.entry.js +2 -0
  304. package/dist/pine-core/{p-XHvXi3U6.system.js.map → p-0KTU2Jt-.system.js.map} +1 -1
  305. package/dist/pine-core/{p-380d1056.entry.js → p-0d9e28a2.entry.js} +2 -2
  306. package/dist/pine-core/p-0d9e28a2.entry.js.map +1 -0
  307. package/dist/pine-core/{p-8096b988.system.entry.js → p-14a52961.system.entry.js} +2 -2
  308. package/dist/pine-core/p-174506b9.entry.js +2 -0
  309. package/dist/pine-core/p-174506b9.entry.js.map +1 -0
  310. package/dist/pine-core/{p-4066a9c0.system.entry.js → p-2186e5d4.system.entry.js} +2 -2
  311. package/dist/pine-core/p-232a2043.entry.js +2 -0
  312. package/dist/pine-core/{p-c7075f11.entry.js → p-25190921.entry.js} +2 -2
  313. package/dist/pine-core/{p-81a28f54.system.entry.js → p-28f7c0d8.system.entry.js} +2 -2
  314. package/dist/pine-core/{p-487552a9.system.entry.js → p-297afc49.system.entry.js} +2 -2
  315. package/dist/pine-core/{p-03d17841.system.entry.js → p-2e19f167.system.entry.js} +2 -2
  316. package/dist/pine-core/p-2e491c3d.entry.js +2 -0
  317. package/dist/pine-core/p-2e491c3d.entry.js.map +1 -0
  318. package/dist/pine-core/{p-a2d16624.entry.js → p-349a8869.entry.js} +2 -2
  319. package/dist/pine-core/p-3abc0f49.system.entry.js +2 -0
  320. package/dist/pine-core/p-3abc0f49.system.entry.js.map +1 -0
  321. package/dist/pine-core/p-3ccb6b0c.system.entry.js +2 -0
  322. package/dist/pine-core/p-3ccb6b0c.system.entry.js.map +1 -0
  323. package/dist/pine-core/{p-0a4fc9c7.entry.js → p-47670150.entry.js} +3 -3
  324. package/dist/pine-core/p-487859a1.system.entry.js +2 -0
  325. package/dist/pine-core/{p-65275835.system.entry.js → p-48b658fc.system.entry.js} +2 -2
  326. package/dist/pine-core/p-48b658fc.system.entry.js.map +1 -0
  327. package/dist/pine-core/{p-042ee55c.entry.js → p-4bbf3e31.entry.js} +2 -2
  328. package/dist/pine-core/p-4bbf3e31.entry.js.map +1 -0
  329. package/dist/pine-core/{p-c1a1475e.entry.js → p-4deb7b8c.entry.js} +2 -2
  330. package/dist/pine-core/{p-7c867f1b.entry.js → p-503cab1f.entry.js} +2 -2
  331. package/dist/pine-core/{p-4e5b9d19.entry.js → p-52d37cc1.entry.js} +2 -2
  332. package/dist/pine-core/{p-f9bd0bc2.system.entry.js → p-54183d70.system.entry.js} +2 -2
  333. package/dist/pine-core/p-5708f95a.entry.js +2 -0
  334. package/dist/pine-core/{p-f647c1af.system.entry.js → p-5aed29fe.system.entry.js} +2 -2
  335. package/dist/pine-core/p-5c0803c3.entry.js +2 -0
  336. package/dist/pine-core/{p-d08ecd18.system.entry.js → p-5da82e8c.system.entry.js} +2 -2
  337. package/dist/pine-core/{p-ed94947b.entry.js → p-5e8badb9.entry.js} +2 -2
  338. package/dist/pine-core/{p-126197e5.entry.js → p-651861ff.entry.js} +2 -2
  339. package/dist/pine-core/p-68b5665a.entry.js +2 -0
  340. package/dist/pine-core/p-68b5665a.entry.js.map +1 -0
  341. package/dist/pine-core/{p-276a6a8b.system.entry.js → p-6db1e029.system.entry.js} +2 -2
  342. package/dist/pine-core/p-6db1e029.system.entry.js.map +1 -0
  343. package/dist/pine-core/{p-8cb99f2f.entry.js → p-6f4a6d0b.entry.js} +2 -2
  344. package/dist/pine-core/{p-c1115d78.system.entry.js → p-71169b66.system.entry.js} +2 -2
  345. package/dist/pine-core/p-71169b66.system.entry.js.map +1 -0
  346. package/dist/pine-core/{p-3e6229cc.entry.js → p-72053224.entry.js} +2 -2
  347. package/dist/pine-core/{p-14b424ab.system.entry.js → p-72b05928.system.entry.js} +2 -2
  348. package/dist/pine-core/p-77336705.entry.js +2 -0
  349. package/dist/pine-core/p-77336705.entry.js.map +1 -0
  350. package/dist/pine-core/{p-0dbb2ae9.entry.js → p-79e2782b.entry.js} +2 -2
  351. package/dist/pine-core/p-7d2c43df.system.entry.js +2 -0
  352. package/dist/pine-core/p-7d2c43df.system.entry.js.map +1 -0
  353. package/dist/pine-core/{p-aafb6e06.system.entry.js → p-8722865f.system.entry.js} +2 -2
  354. package/dist/pine-core/p-8722865f.system.entry.js.map +1 -0
  355. package/dist/pine-core/p-884b9ae6.system.entry.js +2 -0
  356. package/dist/pine-core/p-884b9ae6.system.entry.js.map +1 -0
  357. package/dist/pine-core/{p-89d9f273.system.entry.js → p-8ab7f0d7.system.entry.js} +3 -3
  358. package/dist/pine-core/{p-b956922a.entry.js → p-8d7abc83.entry.js} +2 -2
  359. package/dist/pine-core/{p-2aad0209.system.entry.js → p-92c52409.system.entry.js} +2 -2
  360. package/dist/pine-core/p-96a89cd5.system.entry.js +2 -0
  361. package/dist/pine-core/p-96a89cd5.system.entry.js.map +1 -0
  362. package/dist/pine-core/{p-c1f5148f.entry.js → p-98fe56d9.entry.js} +2 -2
  363. package/dist/pine-core/{p-B4ww2WM0.system.js.map → p-B1FQkx7R.system.js.map} +1 -1
  364. package/dist/pine-core/{p-CbDQeXQ4.system.js.map → p-B1fiSdbt.system.js.map} +1 -1
  365. package/dist/pine-core/{p-DQnK6lQ2.system.js.map → p-B6Znd6C5.system.js.map} +1 -1
  366. package/dist/pine-core/{p-DiBM9O5Q.system.js → p-BEn3hirk.system.js} +1 -1
  367. package/dist/pine-core/p-BEn3hirk.system.js.map +1 -0
  368. package/dist/pine-core/p-BKFboaI5.system.js.map +1 -0
  369. package/dist/pine-core/p-BOHu_LEs.system.js.map +1 -0
  370. package/dist/pine-core/p-BOmQOnQe.system.js +2 -0
  371. package/dist/pine-core/{p-ZCkmy1Gu.system.js.map → p-BOmQOnQe.system.js.map} +1 -1
  372. package/dist/pine-core/{p-REBgf8JA.system.js.map → p-BVKCNX0X.system.js.map} +1 -1
  373. package/dist/pine-core/{p-DKuFjXiD.system.js.map → p-CCQUgOoR.system.js.map} +1 -1
  374. package/dist/pine-core/{p-BCZ4LK15.system.js.map → p-CD_nPb2F.system.js.map} +1 -1
  375. package/dist/pine-core/p-CJT--ZXC.system.js.map +1 -0
  376. package/dist/pine-core/{p-DRqkTTfb.system.js.map → p-CLoi4eKt.system.js.map} +1 -1
  377. package/dist/pine-core/{p-B0PUl1_1.system.js.map → p-CQ8f8GnD.system.js.map} +1 -1
  378. package/dist/pine-core/{p-C3lnYhcV.system.js.map → p-CWdEolqa.system.js.map} +1 -1
  379. package/dist/pine-core/{p-CNOeJ6ra.system.js.map → p-CYiuzbNk.system.js.map} +1 -1
  380. package/dist/pine-core/{p-BY7O1nGC.system.js.map → p-CcXaBX2A.system.js.map} +1 -1
  381. package/dist/pine-core/p-CgyVIfOY.system.js.map +1 -0
  382. package/dist/pine-core/{p-pm8ElBzm.system.js.map → p-Cmzqpibo.system.js.map} +1 -1
  383. package/dist/pine-core/{p-CoHBlcHu.system.js.map → p-CqK-uhv8.system.js.map} +1 -1
  384. package/dist/pine-core/{p-KkT5zjJU.system.js.map → p-D05FrqXr.system.js.map} +1 -1
  385. package/dist/pine-core/{p-BdBU6s5P.system.js.map → p-D9_z2w3q.system.js.map} +1 -1
  386. package/dist/pine-core/{p-B_c-HOvq.system.js.map → p-DAwJ242E.system.js.map} +1 -1
  387. package/dist/pine-core/p-DBw5MRwj.system.js.map +1 -0
  388. package/dist/pine-core/p-DJekRkSL.system.js.map +1 -0
  389. package/dist/pine-core/{p-lMetQ5Q0.system.js.map → p-DNYl_6t_.system.js.map} +1 -1
  390. package/dist/pine-core/{p-DMNp4slx.system.js.map → p-DZggSEPe.system.js.map} +1 -1
  391. package/dist/pine-core/p-DbQzNDdQ.js +2 -0
  392. package/dist/pine-core/{p-D_FwyeSw.js.map → p-DbQzNDdQ.js.map} +1 -1
  393. package/dist/pine-core/p-De9tROL-.system.js +1 -1
  394. package/dist/pine-core/{p-PgQPKVDh.system.js.map → p-Df_3qA_L.system.js.map} +1 -1
  395. package/dist/pine-core/{p-DCdSlcTO.system.js.map → p-Dh7jcLgJ.system.js.map} +1 -1
  396. package/dist/pine-core/{p-CzVv99mW.js → p-DrJ5r5Pu.js} +1 -1
  397. package/dist/pine-core/p-DrJ5r5Pu.js.map +1 -0
  398. package/dist/pine-core/p-Dt10r3RZ.system.js.map +1 -0
  399. package/dist/pine-core/p-Dx9XkHH8.system.js.map +1 -0
  400. package/dist/pine-core/p-IG5YumI3.system.js.map +1 -0
  401. package/dist/pine-core/{p-C5Wo1bN2.system.js.map → p-IIl2cTlj.system.js.map} +1 -1
  402. package/dist/pine-core/{p-EytFbMH4.system.js.map → p-Kj_j7PHx.system.js.map} +1 -1
  403. package/dist/pine-core/p-MBv7PsKc.system.js.map +1 -0
  404. package/dist/pine-core/{p-CG_aggl0.system.js.map → p-UsEwlBJ0.system.js.map} +1 -1
  405. package/dist/pine-core/{p-DQ-QGnGf.system.js.map → p-_E9ZEzfO.system.js.map} +1 -1
  406. package/dist/pine-core/{p-3f83d4c4.system.entry.js → p-a04556e4.system.entry.js} +2 -2
  407. package/dist/pine-core/{p-0199e3e9.system.entry.js → p-a1b51557.system.entry.js} +2 -2
  408. package/dist/pine-core/{p-51e463bf.entry.js → p-a24c46e4.entry.js} +2 -2
  409. package/dist/pine-core/{p-1858ad6d.system.entry.js → p-a472af99.system.entry.js} +2 -2
  410. package/dist/pine-core/{p-9860d0a8.system.entry.js → p-aa645f28.system.entry.js} +2 -2
  411. package/dist/pine-core/{p-df15e16a.entry.js → p-ab82338f.entry.js} +2 -2
  412. package/dist/pine-core/{p-c16d01cc.entry.js → p-b6ea3332.entry.js} +2 -2
  413. package/dist/pine-core/{p-c721e8cf.entry.js → p-ba187a35.entry.js} +2 -2
  414. package/dist/pine-core/p-bb8ef74a.system.entry.js +2 -0
  415. package/dist/pine-core/{p-b2b405ca.system.entry.js → p-c13ef6a7.system.entry.js} +2 -2
  416. package/dist/pine-core/p-c2ffb466.system.entry.js +2 -0
  417. package/dist/pine-core/p-c4d6fe50.system.entry.js +2 -0
  418. package/dist/pine-core/p-c4d6fe50.system.entry.js.map +1 -0
  419. package/dist/pine-core/{p-978e722a.entry.js → p-c6badcf8.entry.js} +2 -2
  420. package/dist/pine-core/{p-064e3d73.entry.js → p-c8122bea.entry.js} +2 -2
  421. package/dist/pine-core/p-cd785026.system.entry.js +2 -0
  422. package/dist/pine-core/{p-c3f32f26.system.entry.js → p-d714f68f.system.entry.js} +2 -2
  423. package/dist/pine-core/p-db1956e5.entry.js +2 -0
  424. package/dist/pine-core/p-db1956e5.entry.js.map +1 -0
  425. package/dist/pine-core/{p-6bd5811c.system.entry.js → p-deb8a499.system.entry.js} +2 -2
  426. package/dist/pine-core/p-deb8a499.system.entry.js.map +1 -0
  427. package/dist/pine-core/{p-6d601fc2.system.entry.js → p-dfc5ab34.system.entry.js} +2 -2
  428. package/dist/pine-core/{p-f35a5afa.entry.js → p-e2887e78.entry.js} +2 -2
  429. package/dist/pine-core/p-e5ca5b8e.entry.js +2 -0
  430. package/dist/pine-core/p-e5ca5b8e.entry.js.map +1 -0
  431. package/dist/pine-core/{p-55bf6be2.system.entry.js → p-e65a7d1c.system.entry.js} +2 -2
  432. package/dist/pine-core/{p-ffe867ef.system.entry.js → p-e89cb1f2.system.entry.js} +2 -2
  433. package/dist/pine-core/p-efa788ea.entry.js +2 -0
  434. package/dist/pine-core/{p-280a0ec1.system.entry.js → p-f55b9f90.system.entry.js} +2 -2
  435. package/dist/pine-core/{p-1a5e79af.entry.js → p-f583e5d4.entry.js} +2 -2
  436. package/dist/pine-core/p-f583e5d4.entry.js.map +1 -0
  437. package/dist/pine-core/{p-6fd385ec.entry.js → p-f880adaa.entry.js} +2 -2
  438. package/dist/pine-core/{p-63ef55dd.entry.js → p-fb4058e6.entry.js} +2 -2
  439. package/dist/pine-core/p-fc457c65.entry.js +2 -0
  440. package/dist/pine-core/{p-qjvXmIGJ.system.js.map → p-m6UZWRsP.system.js.map} +1 -1
  441. package/dist/pine-core/{p-DvZWnvRb.system.js.map → p-pQqXEKPh.system.js.map} +1 -1
  442. package/dist/pine-core/p-rBOkvo-C.system.js.map +1 -0
  443. package/dist/pine-core/pds-box.entry.esm.js.map +1 -1
  444. package/dist/pine-core/pds-button.entry.esm.js.map +1 -1
  445. package/dist/pine-core/pds-input.entry.esm.js.map +1 -1
  446. package/dist/pine-core/pds-loader.entry.esm.js.map +1 -1
  447. package/dist/pine-core/pds-select.entry.esm.js.map +1 -1
  448. package/dist/pine-core/pds-tab.entry.esm.js.map +1 -1
  449. package/dist/pine-core/pds-table-cell.entry.esm.js.map +1 -1
  450. package/dist/pine-core/pds-table-head-cell.entry.esm.js.map +1 -1
  451. package/dist/pine-core/pds-table.entry.esm.js.map +1 -1
  452. package/dist/pine-core/pds-textarea.entry.esm.js.map +1 -1
  453. package/dist/pine-core/pds-tooltip.entry.esm.js.map +1 -1
  454. package/dist/pine-core/pine-core.css +1 -1
  455. package/dist/pine-core/pine-core.esm.js +1 -1
  456. package/dist/types/components/pds-box/pds-box.d.ts +5 -0
  457. package/dist/types/components/pds-button/pds-button.d.ts +1 -0
  458. package/dist/types/components/pds-input/pds-input.d.ts +5 -0
  459. package/dist/types/components/pds-loader/pds-loader.d.ts +1 -0
  460. package/dist/types/components/pds-select/pds-select.d.ts +2 -1
  461. package/dist/types/components/pds-table/pds-table-cell/pds-table-cell.d.ts +15 -0
  462. package/dist/types/components/pds-table/pds-table-head-cell/pds-table-head-cell.d.ts +15 -0
  463. package/dist/types/components/pds-table/pds-table.d.ts +24 -0
  464. package/dist/types/components/pds-textarea/pds-textarea.d.ts +6 -1
  465. package/dist/types/components/pds-tooltip/pds-tooltip.d.ts +9 -12
  466. package/dist/types/components.d.ts +48 -28
  467. package/hydrate/index.js +562 -229
  468. package/hydrate/index.mjs +562 -229
  469. package/package.json +2 -2
  470. package/dist/cjs/index-BfqrB2cC.js.map +0 -1
  471. package/dist/esm/index-CzVv99mW.js.map +0 -1
  472. package/dist/esm-es5/floating-ui.dom-D_FwyeSw.js +0 -2
  473. package/dist/esm-es5/index-CzVv99mW.js.map +0 -1
  474. package/dist/pine-core/p-042ee55c.entry.js.map +0 -1
  475. package/dist/pine-core/p-13ac0852.entry.js +0 -2
  476. package/dist/pine-core/p-13ac0852.entry.js.map +0 -1
  477. package/dist/pine-core/p-1a5e79af.entry.js.map +0 -1
  478. package/dist/pine-core/p-209b1d69.entry.js.map +0 -1
  479. package/dist/pine-core/p-2436cb86.system.entry.js +0 -2
  480. package/dist/pine-core/p-2436cb86.system.entry.js.map +0 -1
  481. package/dist/pine-core/p-276a6a8b.system.entry.js.map +0 -1
  482. package/dist/pine-core/p-2fb60757.system.entry.js +0 -2
  483. package/dist/pine-core/p-33016dd0.entry.js +0 -2
  484. package/dist/pine-core/p-380d1056.entry.js.map +0 -1
  485. package/dist/pine-core/p-3EWr6ZgL.system.js.map +0 -1
  486. package/dist/pine-core/p-41bf807f.system.entry.js +0 -2
  487. package/dist/pine-core/p-41bf807f.system.entry.js.map +0 -1
  488. package/dist/pine-core/p-6438a29d.system.entry.js +0 -2
  489. package/dist/pine-core/p-65275835.system.entry.js.map +0 -1
  490. package/dist/pine-core/p-6bd5811c.system.entry.js.map +0 -1
  491. package/dist/pine-core/p-7eb4ac7c.system.entry.js +0 -2
  492. package/dist/pine-core/p-7eb4ac7c.system.entry.js.map +0 -1
  493. package/dist/pine-core/p-91c6bd68.entry.js +0 -2
  494. package/dist/pine-core/p-91c6bd68.entry.js.map +0 -1
  495. package/dist/pine-core/p-94982c57.entry.js +0 -2
  496. package/dist/pine-core/p-94982c57.entry.js.map +0 -1
  497. package/dist/pine-core/p-987a7e4f.entry.js +0 -2
  498. package/dist/pine-core/p-987a7e4f.entry.js.map +0 -1
  499. package/dist/pine-core/p-B6IFMveo.system.js.map +0 -1
  500. package/dist/pine-core/p-BEky6idI.system.js.map +0 -1
  501. package/dist/pine-core/p-BmoX08WO.system.js.map +0 -1
  502. package/dist/pine-core/p-Bw9e5h_G.system.js.map +0 -1
  503. package/dist/pine-core/p-C36pvE-A.system.js.map +0 -1
  504. package/dist/pine-core/p-CMLxdmO2.system.js.map +0 -1
  505. package/dist/pine-core/p-CXLBzkzl.system.js.map +0 -1
  506. package/dist/pine-core/p-CmJBNVRO.system.js.map +0 -1
  507. package/dist/pine-core/p-CzVv99mW.js.map +0 -1
  508. package/dist/pine-core/p-D_FwyeSw.js +0 -2
  509. package/dist/pine-core/p-DdEbUZw3.system.js.map +0 -1
  510. package/dist/pine-core/p-DgMvQlxU.system.js.map +0 -1
  511. package/dist/pine-core/p-DiBM9O5Q.system.js.map +0 -1
  512. package/dist/pine-core/p-ZCkmy1Gu.system.js +0 -2
  513. package/dist/pine-core/p-a7204f01.entry.js +0 -2
  514. package/dist/pine-core/p-a7cb24c3.system.entry.js +0 -2
  515. package/dist/pine-core/p-a7cb24c3.system.entry.js.map +0 -1
  516. package/dist/pine-core/p-aafb6e06.system.entry.js.map +0 -1
  517. package/dist/pine-core/p-adf2449e.system.entry.js +0 -2
  518. package/dist/pine-core/p-adf2449e.system.entry.js.map +0 -1
  519. package/dist/pine-core/p-b649d711.entry.js +0 -2
  520. package/dist/pine-core/p-b649d711.entry.js.map +0 -1
  521. package/dist/pine-core/p-b9fe17b8.system.entry.js +0 -2
  522. package/dist/pine-core/p-b9fe17b8.system.entry.js.map +0 -1
  523. package/dist/pine-core/p-c1115d78.system.entry.js.map +0 -1
  524. package/dist/pine-core/p-c652847a.entry.js +0 -2
  525. package/dist/pine-core/p-c82c277f.entry.js +0 -2
  526. package/dist/pine-core/p-c82c277f.entry.js.map +0 -1
  527. package/dist/pine-core/p-c82d0a99.entry.js +0 -2
  528. package/dist/pine-core/p-ce0d9f05.system.entry.js +0 -2
  529. package/dist/pine-core/p-cf5506db.system.entry.js +0 -2
  530. package/dist/pine-core/p-d6d87fbc.system.entry.js +0 -2
  531. package/dist/pine-core/p-e05135c5.entry.js +0 -2
  532. package/dist/pine-core/p-e30601a6.entry.js +0 -2
  533. package/dist/pine-core/p-e30601a6.entry.js.map +0 -1
  534. /package/dist/pine-core/{p-19d08886.system.entry.js.map → p-023d8b71.system.entry.js.map} +0 -0
  535. /package/dist/pine-core/{p-6438a29d.system.entry.js.map → p-0485aa93.system.entry.js.map} +0 -0
  536. /package/dist/pine-core/{p-8096b988.system.entry.js.map → p-14a52961.system.entry.js.map} +0 -0
  537. /package/dist/pine-core/{p-4066a9c0.system.entry.js.map → p-2186e5d4.system.entry.js.map} +0 -0
  538. /package/dist/pine-core/{p-e05135c5.entry.js.map → p-232a2043.entry.js.map} +0 -0
  539. /package/dist/pine-core/{p-c7075f11.entry.js.map → p-25190921.entry.js.map} +0 -0
  540. /package/dist/pine-core/{p-81a28f54.system.entry.js.map → p-28f7c0d8.system.entry.js.map} +0 -0
  541. /package/dist/pine-core/{p-487552a9.system.entry.js.map → p-297afc49.system.entry.js.map} +0 -0
  542. /package/dist/pine-core/{p-03d17841.system.entry.js.map → p-2e19f167.system.entry.js.map} +0 -0
  543. /package/dist/pine-core/{p-a2d16624.entry.js.map → p-349a8869.entry.js.map} +0 -0
  544. /package/dist/pine-core/{p-0a4fc9c7.entry.js.map → p-47670150.entry.js.map} +0 -0
  545. /package/dist/pine-core/{p-2fb60757.system.entry.js.map → p-487859a1.system.entry.js.map} +0 -0
  546. /package/dist/pine-core/{p-c1a1475e.entry.js.map → p-4deb7b8c.entry.js.map} +0 -0
  547. /package/dist/pine-core/{p-7c867f1b.entry.js.map → p-503cab1f.entry.js.map} +0 -0
  548. /package/dist/pine-core/{p-4e5b9d19.entry.js.map → p-52d37cc1.entry.js.map} +0 -0
  549. /package/dist/pine-core/{p-f9bd0bc2.system.entry.js.map → p-54183d70.system.entry.js.map} +0 -0
  550. /package/dist/pine-core/{p-33016dd0.entry.js.map → p-5708f95a.entry.js.map} +0 -0
  551. /package/dist/pine-core/{p-f647c1af.system.entry.js.map → p-5aed29fe.system.entry.js.map} +0 -0
  552. /package/dist/pine-core/{p-a7204f01.entry.js.map → p-5c0803c3.entry.js.map} +0 -0
  553. /package/dist/pine-core/{p-d08ecd18.system.entry.js.map → p-5da82e8c.system.entry.js.map} +0 -0
  554. /package/dist/pine-core/{p-ed94947b.entry.js.map → p-5e8badb9.entry.js.map} +0 -0
  555. /package/dist/pine-core/{p-126197e5.entry.js.map → p-651861ff.entry.js.map} +0 -0
  556. /package/dist/pine-core/{p-8cb99f2f.entry.js.map → p-6f4a6d0b.entry.js.map} +0 -0
  557. /package/dist/pine-core/{p-3e6229cc.entry.js.map → p-72053224.entry.js.map} +0 -0
  558. /package/dist/pine-core/{p-14b424ab.system.entry.js.map → p-72b05928.system.entry.js.map} +0 -0
  559. /package/dist/pine-core/{p-0dbb2ae9.entry.js.map → p-79e2782b.entry.js.map} +0 -0
  560. /package/dist/pine-core/{p-89d9f273.system.entry.js.map → p-8ab7f0d7.system.entry.js.map} +0 -0
  561. /package/dist/pine-core/{p-b956922a.entry.js.map → p-8d7abc83.entry.js.map} +0 -0
  562. /package/dist/pine-core/{p-2aad0209.system.entry.js.map → p-92c52409.system.entry.js.map} +0 -0
  563. /package/dist/pine-core/{p-c1f5148f.entry.js.map → p-98fe56d9.entry.js.map} +0 -0
  564. /package/dist/pine-core/{p-3f83d4c4.system.entry.js.map → p-a04556e4.system.entry.js.map} +0 -0
  565. /package/dist/pine-core/{p-0199e3e9.system.entry.js.map → p-a1b51557.system.entry.js.map} +0 -0
  566. /package/dist/pine-core/{p-51e463bf.entry.js.map → p-a24c46e4.entry.js.map} +0 -0
  567. /package/dist/pine-core/{p-1858ad6d.system.entry.js.map → p-a472af99.system.entry.js.map} +0 -0
  568. /package/dist/pine-core/{p-9860d0a8.system.entry.js.map → p-aa645f28.system.entry.js.map} +0 -0
  569. /package/dist/pine-core/{p-df15e16a.entry.js.map → p-ab82338f.entry.js.map} +0 -0
  570. /package/dist/pine-core/{p-c16d01cc.entry.js.map → p-b6ea3332.entry.js.map} +0 -0
  571. /package/dist/pine-core/{p-c721e8cf.entry.js.map → p-ba187a35.entry.js.map} +0 -0
  572. /package/dist/pine-core/{p-cf5506db.system.entry.js.map → p-bb8ef74a.system.entry.js.map} +0 -0
  573. /package/dist/pine-core/{p-b2b405ca.system.entry.js.map → p-c13ef6a7.system.entry.js.map} +0 -0
  574. /package/dist/pine-core/{p-ce0d9f05.system.entry.js.map → p-c2ffb466.system.entry.js.map} +0 -0
  575. /package/dist/pine-core/{p-978e722a.entry.js.map → p-c6badcf8.entry.js.map} +0 -0
  576. /package/dist/pine-core/{p-064e3d73.entry.js.map → p-c8122bea.entry.js.map} +0 -0
  577. /package/dist/pine-core/{p-d6d87fbc.system.entry.js.map → p-cd785026.system.entry.js.map} +0 -0
  578. /package/dist/pine-core/{p-c3f32f26.system.entry.js.map → p-d714f68f.system.entry.js.map} +0 -0
  579. /package/dist/pine-core/{p-6d601fc2.system.entry.js.map → p-dfc5ab34.system.entry.js.map} +0 -0
  580. /package/dist/pine-core/{p-f35a5afa.entry.js.map → p-e2887e78.entry.js.map} +0 -0
  581. /package/dist/pine-core/{p-55bf6be2.system.entry.js.map → p-e65a7d1c.system.entry.js.map} +0 -0
  582. /package/dist/pine-core/{p-ffe867ef.system.entry.js.map → p-e89cb1f2.system.entry.js.map} +0 -0
  583. /package/dist/pine-core/{p-c82d0a99.entry.js.map → p-efa788ea.entry.js.map} +0 -0
  584. /package/dist/pine-core/{p-280a0ec1.system.entry.js.map → p-f55b9f90.system.entry.js.map} +0 -0
  585. /package/dist/pine-core/{p-6fd385ec.entry.js.map → p-f880adaa.entry.js.map} +0 -0
  586. /package/dist/pine-core/{p-63ef55dd.entry.js.map → p-fb4058e6.entry.js.map} +0 -0
  587. /package/dist/pine-core/{p-c652847a.entry.js.map → p-fc457c65.entry.js.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-BVCWKPy3.js";import{e as upSmall,d as downSmall}from"./index-CzVv99mW.js";var pdsTableHeadCellCss=":host{--border-head-cell-default:var(--pine-border-width-thin) solid var(--pine-color-grey-100);--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);line-height:var(--pine-line-height-body);padding:12px;text-align:start;vertical-align:inherit}:host(.is-compact){padding-block:var(--pine-dimension-2xs)}:host(.is-fixed){background:var(--pine-color-background-container);left:var(--pine-dimension-none);position:-webkit-sticky;position:sticky;z-index: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-active)}";var PdsTableHeadCell=function(){function e(e){var i=this;registerInstance(this,e);this.pdsTableSort=createEvent(this,"pdsTableSort");this.sortingDirection="asc";this.tableScrolling=false;this.isSelected=false;this.handleScroll=function(){if(i.tableRef.scrollLeft>0){i.tableScrolling=true}else{i.tableScrolling=false}};this.toggleSort=function(){if(i.sortable){var e=i.hostElement.innerText.trim();i.sortingDirection=i.sortingDirection==="asc"?"desc":"asc";i.tableRef.querySelectorAll("pds-table-head-cell").forEach((function(e){e.classList.remove("is-active")}));i.hostElement.classList.toggle("is-active");i.pdsTableSort.emit({column:e,direction:i.sortingDirection})}}}e.prototype.componentWillRender=function(){this.tableRef=this.hostElement.closest("pds-table")};e.prototype.componentDidLoad=function(){if(this.tableRef&&this.tableRef.responsive&&this.tableRef.fixedColumn){this.tableRef.addEventListener("scroll",this.handleScroll)}};e.prototype.classNames=function(){var e=[];if(this.tableRef&&this.tableRef.compact){e.push("is-compact")}if(this.sortable){e.push("is-sortable")}if(this.sortable&&this.sortingDirection!==null){e.push("sort-"+this.sortingDirection)}if(this.tableRef&&this.tableRef.fixedColumn&&this.tableScrolling){e.push("has-scrolled")}return e.join(" ")};e.prototype.render=function(){return h(Host,{key:"bf2f29d2214ba308be7c8cca6b2afb66fdccc2fa",class:this.classNames(),role:"columnheader",onClick:this.toggleSort,style:this.tableRef&&this.tableRef.fixedColumn&&this.tableRef.selectable?{"--fixed-cell-position":"40px"}:{}},h("slot",{key:"14a6849059768b901ec5be69cff37f56ce07c15b"}),this.sortable&&h("pds-icon",{key:"29e0068115ec20dba39e4a798f11d0b0a0c6fef7",icon:this.sortingDirection==="asc"?upSmall:downSmall}))};Object.defineProperty(e.prototype,"hostElement",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();PdsTableHeadCell.style=pdsTableHeadCellCss;export{PdsTableHeadCell as pds_table_head_cell};
1
+ import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-BVCWKPy3.js";import{e as upSmall,d as downSmall}from"./index-DrJ5r5Pu.js";var pdsTableHeadCellCss=":host{--border-head-cell-default:var(--pine-border-width-thin) solid var(--pine-color-grey-100);--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);line-height:var(--pine-line-height-body);padding:var(--pine-dimension-150);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);left:var(--pine-dimension-none);position:-webkit-sticky;position:sticky;z-index: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-active)}: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}";var PdsTableHeadCell=function(){function e(e){var t=this;registerInstance(this,e);this.pdsTableSort=createEvent(this,"pdsTableSort");this.scrollContainer=null;this.setupRetries=0;this.sortingDirection="asc";this.tableScrolling=false;this.isSelected=false;this.handleScroll=function(){if(!t.scrollContainer){return}try{t.tableScrolling=t.scrollContainer.scrollLeft>0}catch(e){console.warn("Scroll handler error:",e)}};this.toggleSort=function(){if(t.sortable){var e=t.hostElement.innerText.trim();t.sortingDirection=t.sortingDirection==="asc"?"desc":"asc";t.tableRef.querySelectorAll("pds-table-head-cell").forEach((function(e){e.classList.remove("is-active")}));t.hostElement.classList.toggle("is-active");t.pdsTableSort.emit({column:e,direction:t.sortingDirection})}}}e.prototype.componentWillRender=function(){this.tableRef=this.hostElement.closest("pds-table")};e.prototype.componentDidLoad=function(){if(this.tableRef&&this.tableRef.responsive&&this.tableRef.fixedColumn){this.setupScrollListener()}};e.prototype.disconnectedCallback=function(){this.cleanupScrollListener()};e.prototype.setupScrollListener=function(){var e=this;var t;if(!this.tableRef)return;var i=(t=this.tableRef.shadowRoot)===null||t===void 0?void 0:t.querySelector(".pds-table-responsive-container");if(i){this.scrollContainer=i;this.scrollContainer.addEventListener("scroll",this.handleScroll,{passive:true});this.handleScroll();this.setupRetries=0}else{this.setupTimer=window.setTimeout((function(){if(e.scrollContainer)return;e.setupRetries=(e.setupRetries||0)+1;if(e.setupRetries<=50){e.setupScrollListener()}else{console.warn("Failed to find responsive container after 50 attempts")}}),100)}};e.prototype.cleanupScrollListener=function(){if(this.scrollContainer){this.scrollContainer.removeEventListener("scroll",this.handleScroll);this.scrollContainer=null}if(this.setupTimer!==undefined){window.clearTimeout(this.setupTimer);this.setupTimer=undefined}this.setupRetries=0};e.prototype.classNames=function(){var e=[];if(this.tableRef&&this.tableRef.compact){e.push("is-compact")}if(this.cellAlign){e.push("pds-table-head-cell--align-".concat(this.cellAlign))}if(this.sortable){e.push("is-sortable")}if(this.sortable&&this.sortingDirection!==null){e.push("sort-"+this.sortingDirection)}if(this.tableRef&&this.tableRef.fixedColumn&&this.tableScrolling){e.push("has-scrolled")}return e.join(" ")};e.prototype.render=function(){return h(Host,{key:"037d0c1d3cf8122132bee6887bcaceb29ac33cc0",class:this.classNames(),role:"columnheader",onClick:this.toggleSort,style:this.tableRef&&this.tableRef.fixedColumn&&this.tableRef.selectable?{"--fixed-cell-position":"40px"}:{}},h("slot",{key:"ccfc2ea9a8301783834bda8c627afd652c22405e"}),this.sortable&&h("pds-icon",{key:"de8a980b54bde4994f0339af5d7f3165ed35123b",icon:this.sortingDirection==="asc"?upSmall:downSmall}))};Object.defineProperty(e.prototype,"hostElement",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();PdsTableHeadCell.style=pdsTableHeadCellCss;export{PdsTableHeadCell as pds_table_head_cell};
2
2
  //# sourceMappingURL=pds-table-head-cell.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pds-table-head-cell.entry.js","sources":["src/components/pds-table/pds-table-head-cell/pds-table-head-cell.scss?tag=pds-table-head-cell&encapsulation=shadow","src/components/pds-table/pds-table-head-cell/pds-table-head-cell.tsx"],"sourcesContent":[":host {\n --border-head-cell-default: var(--pine-border-width-thin) solid var(--pine-color-grey-100);\n\n --box-shadow-default: 3px 3px 6px -2px rgba(0, 0, 0, 0.1);\n\n border-block-end: var(--border-head-cell-default);\n color: var(--pine-color-text);\n display: table-cell;\n font-family: var(--pine-font-family-body);\n font-size: var(--pine-font-size);\n font-weight: var(--pine-font-weight-regular);\n line-height: var(--pine-line-height-body);\n padding: 12px;\n text-align: start;\n vertical-align: inherit;\n}\n\n:host(.is-compact) {\n padding-block: var(--pine-dimension-2xs)\n}\n\n:host(.is-fixed) {\n background: var(--pine-color-background-container);\n left: var(--pine-dimension-none);\n position: sticky;\n z-index: 1;\n}\n\n// box shadow when table has scrolled and cell is fixed\n:host(.has-scrolled.is-fixed) {\n box-shadow: var(--box-shadow-default);\n}\n\n:host(.is-sortable) {\n cursor: pointer;\n\n pds-icon {\n margin-inline-start: var(--pine-dimension-2xs);\n padding-block-start: 2px;\n position: absolute;\n }\n}\n\n:host(.is-sortable:hover),\n:host(.is-active) {\n color: var(--pine-color-text-active);\n}\n","import { Component, Element, Host, Prop, h, Event, EventEmitter, State } from '@stencil/core';\n\nimport { downSmall, upSmall } from '@pine-ds/icons/icons';\n\n@Component({\n tag: 'pds-table-head-cell',\n styleUrls: ['pds-table-head-cell.scss'],\n shadow: true,\n})\nexport class PdsTableHeadCell {\n @Element() hostElement: HTMLPdsTableHeadCellElement;\n private tableRef: HTMLPdsTableElement;\n\n /**\n * Determines whether the table column is sortable when set to `true`.\n */\n @Prop() sortable: boolean;\n\n /**\n * Event emitted to signal that a table column header has been sorted, providing information about the sorted column's name and sorting direction.\n */\n @Event() pdsTableSort: EventEmitter<{ column: string; direction: string }>;\n\n /**\n * The direction of sorting.\n */\n @State() private sortingDirection: 'asc' | 'desc' = 'asc';\n\n /**\n * Determines if the table is currently scrolling.\n * @defaultValue false\n */\n @State() private tableScrolling: boolean = false;\n\n /**\n * Determines if the table row is currently selected.\n * @defaultValue false\n */\n @State() isSelected: boolean = false;\n\n componentWillRender() {\n this.tableRef = this.hostElement.closest('pds-table') as HTMLPdsTableElement;\n }\n\n componentDidLoad() {\n if (this.tableRef && this.tableRef.responsive && this.tableRef.fixedColumn) {\n this.tableRef.addEventListener('scroll', this.handleScroll);\n }\n }\n\n private handleScroll = () => {\n if (this.tableRef.scrollLeft > 0) {\n this.tableScrolling = true;\n } else {\n this.tableScrolling = false;\n }\n };\n\n private toggleSort = () => {\n if (this.sortable) {\n const column = this.hostElement.innerText.trim();\n this.sortingDirection = this.sortingDirection === 'asc' ? 'desc' : 'asc';\n\n this.tableRef.querySelectorAll('pds-table-head-cell').forEach((headCell) => {\n headCell.classList.remove('is-active');\n });\n\n this.hostElement.classList.toggle('is-active');\n this.pdsTableSort.emit({ column, direction: this.sortingDirection });\n }\n }\n\n private classNames() {\n const classNames = [];\n\n if (this.tableRef && this.tableRef.compact) {\n classNames.push('is-compact');\n }\n\n if (this.sortable) {\n classNames.push('is-sortable');\n }\n\n if (this.sortable && this.sortingDirection !== null) {\n classNames.push('sort-' + this.sortingDirection);\n }\n\n if (this.tableRef && this.tableRef.fixedColumn && this.tableScrolling) {\n classNames.push('has-scrolled');\n }\n\n return classNames.join(' ');\n }\n\n render() {\n return (\n <Host\n class={this.classNames()}\n role=\"columnheader\"\n onClick={this.toggleSort}\n style={\n this.tableRef &&\n this.tableRef.fixedColumn &&\n this.tableRef.selectable\n ? { '--fixed-cell-position': '40px' }\n : {}\n }\n >\n <slot></slot>\n {this.sortable && (\n <pds-icon icon={this.sortingDirection === 'asc' ? upSmall : downSmall} />\n )}\n </Host>\n );\n }\n}\n"],"names":[],"mappings":";;;AAAA,MAAM,mBAAmB,GAAG,snCAAsnC;;MCSroC,gBAAgB,GAAA,MAAA;AAL7B,IAAA,WAAA,CAAA,OAAA,EAAA;;;AAmBE;;AAEG;AACc,QAAA,IAAgB,CAAA,gBAAA,GAAmB,KAAK;AAEzD;;;AAGG;AACc,QAAA,IAAc,CAAA,cAAA,GAAY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AC1E,CACI;;;;;;;;"}
1
+ {"version":3,"file":"pds-table-head-cell.entry.js","sources":["src/components/pds-table/pds-table-head-cell/pds-table-head-cell.scss?tag=pds-table-head-cell&encapsulation=shadow","src/components/pds-table/pds-table-head-cell/pds-table-head-cell.tsx"],"sourcesContent":[":host {\n --border-head-cell-default: var(--pine-border-width-thin) solid var(--pine-color-grey-100);\n\n --box-shadow-default: 3px 3px 6px -2px rgba(0, 0, 0, 0.1);\n\n border-block-end: var(--border-head-cell-default);\n color: var(--pine-color-text);\n display: table-cell;\n font-family: var(--pine-font-family-body);\n font-size: var(--pine-font-size);\n font-weight: var(--pine-font-weight-regular);\n line-height: var(--pine-line-height-body);\n padding: var(--pine-dimension-150);\n position: relative;\n text-align: start;\n vertical-align: inherit;\n}\n\n:host(.is-compact) {\n padding-block: var(--pine-dimension-2xs)\n}\n\n:host(.is-fixed) {\n background: var(--pine-color-background-container);\n left: var(--pine-dimension-none);\n position: sticky;\n z-index: 1;\n}\n\n// box shadow when table has scrolled and cell is fixed\n:host(.has-scrolled.is-fixed) {\n box-shadow: var(--box-shadow-default);\n}\n\n:host(.is-sortable) {\n cursor: pointer;\n\n pds-icon {\n margin-inline-start: var(--pine-dimension-2xs);\n padding-block-start: 2px;\n position: absolute;\n }\n}\n\n:host(.is-sortable:hover),\n:host(.is-active) {\n color: var(--pine-color-text-active);\n}\n\n// Text Alignment\n:host(.pds-table-head-cell--align-start) {\n text-align: start;\n}\n\n:host(.pds-table-head-cell--align-center) {\n text-align: center;\n}\n\n:host(.pds-table-head-cell--align-end) {\n text-align: end;\n}\n\n:host(.pds-table-head-cell--align-justify) {\n text-align: justify;\n}\n","import { Component, Element, Host, Prop, h, Event, EventEmitter, State } from '@stencil/core';\n\nimport { downSmall, upSmall } from '@pine-ds/icons/icons';\n\n@Component({\n tag: 'pds-table-head-cell',\n styleUrls: ['pds-table-head-cell.scss'],\n shadow: true,\n})\nexport class PdsTableHeadCell {\n @Element() hostElement: HTMLPdsTableHeadCellElement;\n private tableRef: HTMLPdsTableElement;\n private scrollContainer: HTMLElement | null = null;\n private setupTimer: number | undefined;\n private setupRetries: number = 0;\n\n /**\n * Sets the text alignment within the head cell.\n */\n @Prop() cellAlign?: 'start' | 'center' | 'end' | 'justify';\n\n /**\n * Determines whether the table column is sortable when set to `true`.\n */\n @Prop() sortable: boolean;\n\n /**\n * Event emitted to signal that a table column header has been sorted, providing information about the sorted column's name and sorting direction.\n */\n @Event() pdsTableSort: EventEmitter<{ column: string; direction: string }>;\n\n /**\n * The direction of sorting.\n */\n @State() private sortingDirection: 'asc' | 'desc' = 'asc';\n\n /**\n * Determines if the table is currently scrolling.\n * @defaultValue false\n */\n @State() private tableScrolling: boolean = false;\n\n /**\n * Determines if the table row is currently selected.\n * @defaultValue false\n */\n @State() isSelected: boolean = false;\n\n componentWillRender() {\n this.tableRef = this.hostElement.closest('pds-table') as HTMLPdsTableElement;\n }\n\n componentDidLoad() {\n if (this.tableRef && this.tableRef.responsive && this.tableRef.fixedColumn) {\n // For responsive tables with fixed columns, set up scroll detection\n // This enables the first column header to show a shadow when the table is scrolled horizontally\n this.setupScrollListener();\n }\n }\n\n disconnectedCallback() {\n this.cleanupScrollListener();\n }\n\n private setupScrollListener() {\n if (!this.tableRef) return;\n\n // Query shadowRoot once and cache the container\n const container = this.tableRef.shadowRoot?.querySelector('.pds-table-responsive-container') as HTMLElement;\n\n if (container) {\n // Container available immediately\n this.scrollContainer = container;\n this.scrollContainer.addEventListener('scroll', this.handleScroll, { passive: true });\n this.handleScroll(); // Initial check\n this.setupRetries = 0; // Reset counter on success\n } else {\n // Container not ready, set up timer for retry with bounds\n this.setupTimer = window.setTimeout(() => {\n if (this.scrollContainer) return; // Already found\n this.setupRetries = (this.setupRetries || 0) + 1;\n if (this.setupRetries <= 50) {\n this.setupScrollListener();\n } else {\n console.warn('Failed to find responsive container after 50 attempts');\n }\n }, 100);\n }\n }\n\n private cleanupScrollListener() {\n if (this.scrollContainer) {\n this.scrollContainer.removeEventListener('scroll', this.handleScroll);\n this.scrollContainer = null;\n }\n\n if (this.setupTimer !== undefined) {\n window.clearTimeout(this.setupTimer);\n this.setupTimer = undefined;\n }\n\n this.setupRetries = 0; // Reset retry counter\n }\n\n /**\n * Handles scroll events to update fixed column shadow state.\n * Updates the tableScrolling state to control CSS classes for fixed column shadows.\n * @private\n */\n private handleScroll = () => {\n if (!this.scrollContainer) {\n return;\n }\n\n try {\n this.tableScrolling = this.scrollContainer.scrollLeft > 0;\n } catch (error) {\n console.warn('Scroll handler error:', error);\n }\n };\n\n private toggleSort = () => {\n if (this.sortable) {\n const column = this.hostElement.innerText.trim();\n this.sortingDirection = this.sortingDirection === 'asc' ? 'desc' : 'asc';\n\n this.tableRef.querySelectorAll('pds-table-head-cell').forEach((headCell) => {\n headCell.classList.remove('is-active');\n });\n\n this.hostElement.classList.toggle('is-active');\n this.pdsTableSort.emit({ column, direction: this.sortingDirection });\n }\n }\n\n private classNames() {\n const classNames = [];\n\n if (this.tableRef && this.tableRef.compact) {\n classNames.push('is-compact');\n }\n\n if (this.cellAlign) {\n classNames.push(`pds-table-head-cell--align-${this.cellAlign}`);\n }\n\n if (this.sortable) {\n classNames.push('is-sortable');\n }\n\n if (this.sortable && this.sortingDirection !== null) {\n classNames.push('sort-' + this.sortingDirection);\n }\n\n if (this.tableRef && this.tableRef.fixedColumn && this.tableScrolling) {\n classNames.push('has-scrolled');\n }\n\n return classNames.join(' ');\n }\n\n render() {\n return (\n <Host\n class={this.classNames()}\n role=\"columnheader\"\n onClick={this.toggleSort}\n style={\n this.tableRef &&\n this.tableRef.fixedColumn &&\n this.tableRef.selectable\n ? { '--fixed-cell-position': '40px' }\n : {}\n }\n >\n <slot></slot>\n {this.sortable && (\n <pds-icon icon={this.sortingDirection === 'asc' ? upSmall : downSmall} />\n )}\n </Host>\n );\n }\n}\n"],"names":[],"mappings":";;;AAAA,MAAM,mBAAmB,GAAG,u4CAAu4C;;MCSt5C,gBAAgB,GAAA,MAAA;AAL7B,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EACH,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,EACxB,IAAI,EAAC,cAAc,EACnB,OAAO,EAAE,IAAI,CAAC,UAAU,EACxB,KAAK,EACH,IAAI,CAAC,QAAQ;gBACb,IAAI,CAAC,QAAQ,CAAC,WAAW;gBACzB,IAAI,CAAC,QAAQ,CAAC;AACZ,kBAAE,EAAE,uBAAuB,EAAE,MAAM;kBACjC,EAAE,EAAA,EAGR,CAAa,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,EACZ,IAAI,CAAC,QAAQ,KACZ,CAAA,CAAA,UAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAU,IAAI,EAAE,IAAI,CAAC,gBAAgB,KAAK,KAAK,GAAG,OAAO,GAAG,SAAS,EAAI,CAAA,CAC1E,CACI;;;;;;;;"}
@@ -1,2 +1,2 @@
1
- import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-BVCWKPy3.js";import{c as closest}from"./closest-DnUJodVd.js";var pdsTableHeadCss=":host{--border-head-default:var(--pine-border-width-thin) solid var(--pine-color-grey-100);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:1}:host pds-table-checkbox-cell{-webkit-border-after:var(--border-head-default);border-block-end:var(--border-head-default)}";var PdsTableHead=function(){function e(e){var t=this;registerInstance(this,e);this.pdsTableSelectAll=createEvent(this,"pdsTableSelectAll");this.generateUniqueId=function(){var e=Math.random().toString(36).substring(2,8);var t=(new Date).toISOString().replace(/[:.]/g,"-");var i="".concat(e,"-").concat(t);return i};this.handleInput=function(e){t.isSelected=!e.target.checked;t.handleSelect(t.isSelected)};this.handleSelect=function(e){t.indeterminate=false;if(closest("pds-table-head",t.hostElement)){t.pdsTableSelectAll.emit({isSelected:e})}}}e.prototype.componentWillLoad=function(){if(this.isSelected){this.handleSelect(this.isSelected)}};e.prototype.componentWillRender=function(){this.tableRef=this.hostElement.closest("pds-table");if(this.tableRef&&this.tableRef.fixedColumn){var e=this.hostElement.querySelector("pds-table-head-cell:first-child");e===null||e===void 0?void 0:e.classList.add("is-fixed")}};e.prototype.render=function(){return h(Host,{key:"3f315b70b0c57570cbb81415a5590760242e6904",role:"row"},this.tableRef&&this.tableRef.selectable&&h("pds-table-head-cell",{key:"09dc3a0630448be1112650ae34d6c09e0bf2539b",part:this.tableRef.selectable?"checkbox-cell":""},h("pds-checkbox",{key:"518ec4ad92e8b0b11fbff1c064a6811e13b442e0",componentId:this.generateUniqueId(),indeterminate:this.indeterminate,onInput:this.handleInput,label:"Select All Rows",hideLabel:true,checked:this.isSelected})),h("slot",{key:"527db0d141790c0d673cb81d4cca2266495b117e"}))};Object.defineProperty(e.prototype,"hostElement",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();PdsTableHead.style=pdsTableHeadCss;export{PdsTableHead as pds_table_head};
1
+ import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-BVCWKPy3.js";import{c as closest}from"./closest-DnUJodVd.js";var pdsTableHeadCss=":host{--border-head-default:var(--pine-border-width-thin) solid var(--pine-color-grey-100);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:1}:host pds-table-checkbox-cell{-webkit-border-after:var(--border-head-default);border-block-end:var(--border-head-default)}";var PdsTableHead=function(){function e(e){var t=this;registerInstance(this,e);this.pdsTableSelectAll=createEvent(this,"pdsTableSelectAll");this.generateUniqueId=function(){var e=Math.random().toString(36).substring(2,8);var t=(new Date).toISOString().replace(/[:.]/g,"-");var i="".concat(e,"-").concat(t);return i};this.handleInput=function(e){t.isSelected=!e.target.checked;t.handleSelect(t.isSelected)};this.handleSelect=function(e){t.indeterminate=false;if(closest("pds-table-head",t.hostElement)){t.pdsTableSelectAll.emit({isSelected:e})}}}e.prototype.componentWillLoad=function(){if(this.isSelected){this.handleSelect(this.isSelected)}};e.prototype.componentWillRender=function(){this.tableRef=this.hostElement.closest("pds-table");if(this.tableRef&&this.tableRef.fixedColumn){var e=this.hostElement.querySelector("pds-table-head-cell:first-child");e===null||e===void 0?void 0:e.classList.add("is-fixed")}};e.prototype.render=function(){return h(Host,{key:"ffa2760e5512a41cc8882722ea7ad7e5650de50f",role:"row"},this.tableRef&&this.tableRef.selectable&&h("pds-table-head-cell",{key:"ba2e2ef60d570d739f5e582c0affe481ebed578d",part:this.tableRef.selectable?"checkbox-cell":""},h("pds-checkbox",{key:"4db057d54fbda8dccc49451ffb23ea1133fea53f",componentId:this.generateUniqueId(),indeterminate:this.indeterminate,onInput:this.handleInput,label:"Select All Rows",hideLabel:true,checked:this.isSelected})),h("slot",{key:"1f9167ccf1186c92033fa95b7e4a121b98d7c0ea"}))};Object.defineProperty(e.prototype,"hostElement",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();PdsTableHead.style=pdsTableHeadCss;export{PdsTableHead as pds_table_head};
2
2
  //# sourceMappingURL=pds-table-head.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-BVCWKPy3.js";import{c as closest}from"./closest-DnUJodVd.js";var pdsTableRowCss=":host{--color-background-interactive:var(--pine-color-grey-200);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:1}: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)}";var PdsTableRow=function(){function e(e){var t=this;registerInstance(this,e);this.pdsTableRowSelected=createEvent(this,"pdsTableRowSelected");this.handleClick=function(){t.isSelected=!t.isSelected;t.handleSelect(t.isSelected)};this.handleSelect=function(e){t.indeterminate=false;if(!closest("pds-table-head",t.hostElement)){var s=Array.from(t.hostElement.parentNode.children).indexOf(t.hostElement);t.pdsTableRowSelected.emit({rowIndex:s,isSelected:e})}};this.generateUniqueId=function(){var e=Math.random().toString(36).substring(2,8);var t=(new Date).toISOString().replace(/[:.]/g,"-");var s="".concat(e,"-").concat(t);return s}}e.prototype.classNames=function(){var e=[];if(this.isSelected){e.push("is-selected")}return e.join(" ")};e.prototype.componentWillRender=function(){this.tableRef=this.hostElement.closest("pds-table");if(this.tableRef&&this.tableRef.fixedColumn){var e=this.hostElement.querySelector("pds-table-cell");e===null||e===void 0?void 0:e.classList.add("is-fixed")}};e.prototype.componentWillLoad=function(){if(this.isSelected){this.handleSelect(this.isSelected)}};e.prototype.render=function(){return h(Host,{key:"3c2be878370bd35f97a3fc4cc1136a6fdb096a24",class:this.classNames(),role:"row"},this.tableRef&&this.tableRef.selectable&&h("pds-table-cell",{key:"40541b11040d4c243d82779cf84e212f73541368",part:this.tableRef.fixedColumn?"checkbox-cell":"",class:this.tableRef.selectable?"has-checkbox":""},h("pds-checkbox",{key:"d20e734a91562340f3808297c2bb6f5f257d7a46",componentId:this.generateUniqueId(),onClick:this.handleClick,indeterminate:this.indeterminate,label:"Select Row",hideLabel:true,checked:this.isSelected})),h("slot",{key:"148434aa3dace85b0d48aa2a0ead93cda6850d2a"}))};Object.defineProperty(e.prototype,"hostElement",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();PdsTableRow.style=pdsTableRowCss;export{PdsTableRow as pds_table_row};
1
+ import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-BVCWKPy3.js";import{c as closest}from"./closest-DnUJodVd.js";var pdsTableRowCss=":host{--color-background-interactive:var(--pine-color-grey-200);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:1}: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)}";var PdsTableRow=function(){function e(e){var t=this;registerInstance(this,e);this.pdsTableRowSelected=createEvent(this,"pdsTableRowSelected");this.handleClick=function(){t.isSelected=!t.isSelected;t.handleSelect(t.isSelected)};this.handleSelect=function(e){t.indeterminate=false;if(!closest("pds-table-head",t.hostElement)){var s=Array.from(t.hostElement.parentNode.children).indexOf(t.hostElement);t.pdsTableRowSelected.emit({rowIndex:s,isSelected:e})}};this.generateUniqueId=function(){var e=Math.random().toString(36).substring(2,8);var t=(new Date).toISOString().replace(/[:.]/g,"-");var s="".concat(e,"-").concat(t);return s}}e.prototype.classNames=function(){var e=[];if(this.isSelected){e.push("is-selected")}return e.join(" ")};e.prototype.componentWillRender=function(){this.tableRef=this.hostElement.closest("pds-table");if(this.tableRef&&this.tableRef.fixedColumn){var e=this.hostElement.querySelector("pds-table-cell");e===null||e===void 0?void 0:e.classList.add("is-fixed")}};e.prototype.componentWillLoad=function(){if(this.isSelected){this.handleSelect(this.isSelected)}};e.prototype.render=function(){return h(Host,{key:"05fb5cf3a7bc10dbe451f6df0e338efe74f9d40e",class:this.classNames(),role:"row"},this.tableRef&&this.tableRef.selectable&&h("pds-table-cell",{key:"13f61eb4c6503a488e5307de41718bd1c03a2613",part:this.tableRef.fixedColumn?"checkbox-cell":"",class:this.tableRef.selectable?"has-checkbox":""},h("pds-checkbox",{key:"f17a2377913a8a6285e1eaee76700246c7861e9f",componentId:this.generateUniqueId(),onClick:this.handleClick,indeterminate:this.indeterminate,label:"Select Row",hideLabel:true,checked:this.isSelected})),h("slot",{key:"c84de0c7125f6892bc88aae69b367994f48281b1"}))};Object.defineProperty(e.prototype,"hostElement",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();PdsTableRow.style=pdsTableRowCss;export{PdsTableRow as pds_table_row};
2
2
  //# sourceMappingURL=pds-table-row.entry.js.map
@@ -1,2 +1,2 @@
1
- import{__awaiter,__generator}from"tslib";import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-BVCWKPy3.js";var pdsTableCss=":host{--color-background-default:var(--pine-color-white);background:var(--color-background-default);border-collapse:separate;-webkit-box-sizing:border-box;box-sizing:border-box;display:table;width:100%}:host(:focus-visible){outline:var(--pine-outline-focus)}:host(.is-responsive){background-attachment:local, local, scroll, scroll;background-image:-webkit-gradient(linear, left top, right top, from(var(--color-background-default)), to(var(--color-background-default))), -webkit-gradient(linear, left top, right top, from(var(--color-background-default)), to(var(--color-background-default))), -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, 0.1)), to(rgba(255, 255, 255, 0))), -webkit-gradient(linear, right top, left top, from(rgba(0, 0, 0, 0.1)), to(rgba(255, 255, 255, 0)));background-image:linear-gradient(to right, var(--color-background-default), var(--color-background-default)), linear-gradient(to right, var(--color-background-default), var(--color-background-default)), linear-gradient(to right, rgba(0, 0, 0, 0.1), rgba(255, 255, 255, 0)), linear-gradient(to left, rgba(0, 0, 0, 0.1), rgba(255, 255, 255, 0));background-position:left center, right center, left center, right center;background-repeat:no-repeat;background-size:4px 100%, 4px 100%, 4px 100%, 4px 100%;display:block;margin:0 auto;max-width:-webkit-fit-content;max-width:-moz-fit-content;max-width:fit-content;overflow-x:auto;white-space:nowrap}";var PdsTable=function(){function t(t){registerInstance(this,t);this.pdsTableSelect=createEvent(this,"pdsTableSelect");this.pdsTableSelectAll=createEvent(this,"pdsTableSelectAll");this.sortingColumn=null;this.sortingDirection="asc"}t.prototype.componentWillLoad=function(){this.sortingColumn=null};t.prototype.classNames=function(){var t=["pds-table"];if(this.compact){t.push("is-compact")}if(this.responsive){t.push("is-responsive")}return t.join(" ")};t.prototype.sortTable=function(t,r){var e=this.el.querySelector("pds-table-body");var a=Array.from(e.querySelectorAll("pds-table-row"));var o=Array.from(this.el.querySelectorAll("pds-table-head-cell[sortable]"));var n=o.find((function(r){return r.innerText.trim()===t}));if(!n){console.warn('Column "'.concat(t,'" not found.'));return}var i=o.indexOf(n);a.sort((function(t,e){var a=t.querySelector("pds-table-cell:nth-child(".concat(i+1,")")).textContent.trim();var o=e.querySelector("pds-table-cell:nth-child(".concat(i+1,")")).textContent.trim();if(r==="asc"){return a.localeCompare(o)}else{return o.localeCompare(a)}}));e.innerHTML="";a.forEach((function(t){e.appendChild(t)}))};t.prototype.handleTableSort=function(t){var r=t.detail.direction;this.sortTable(t.detail.column,r);this.sortingColumn=t.detail.column;this.sortingDirection=r};t.prototype.handleTableSelectAll=function(t){if(t.defaultPrevented)return;var r=this.el.querySelector("pds-table-body");var e=Array.from(r.querySelectorAll("pds-table-row"));e.forEach((function(r){r.isSelected=t.detail.isSelected}))};t.prototype.handleTableSelect=function(t){return __awaiter(this,void 0,void 0,(function(){var r,e,a,o,n;return __generator(this,(function(i){if(t.defaultPrevented)return[2];r=this.el.querySelectorAll("pds-table-row");e=Array.from(r).every((function(t){return t.isSelected}));a=Array.from(r).every((function(t){return!t.isSelected}));o=this.el.querySelector("pds-table-head");if(!o)return[2];n=o.shadowRoot.querySelector("pds-checkbox");n.checked=e;n.indeterminate=!e&&!a;return[2]}))}))};t.prototype.render=function(){return h(Host,{key:"994a8ae5aae1ddcc7dd0271187dd65718bc1401f",class:this.classNames(),id:this.componentId,role:"grid",selectable:this.selectable,tabindex:"0"},h("slot",{key:"e07c97a88d1bf1b2efb92f2cdf0159fc93ca9f9a"}))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();PdsTable.style=pdsTableCss;export{PdsTable as pds_table};
1
+ import{__awaiter,__generator}from"tslib";import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-BVCWKPy3.js";var pdsTableCss='@charset "UTF-8";:host{--color-background-default:var(--pine-color-white);background:var(--color-background-default);border-collapse:separate;border-radius:inherit;-webkit-box-sizing:border-box;box-sizing:border-box;display:table;width:100%}:host(:focus-visible){outline:var(--pine-outline-focus)}:host(.pds-table-responsive-host){border-radius:inherit;-webkit-box-sizing:border-box !important;box-sizing:border-box !important;display:block !important;max-width:100% !important;overflow:hidden !important;position:relative !important;width:100% !important}.pds-table-responsive-container{border-radius:inherit;-webkit-box-sizing:border-box !important;box-sizing:border-box !important;overflow-x:auto !important;overflow-y:visible !important;position:relative !important;width:100% !important}.pds-table-responsive-wrapper{border-radius:inherit;-webkit-box-sizing:border-box !important;box-sizing:border-box !important;display:block !important;position:relative !important;width:100% !important}.pds-table-responsive-wrapper .pds-table{display:table !important;min-width:-webkit-max-content !important;min-width:-moz-max-content !important;min-width:max-content !important;table-layout:auto !important;white-space:nowrap !important;width:100% !important}.scroll-shadow-left,.scroll-shadow-right{height:100%;opacity:0;pointer-events:none;position:absolute;top:0;-webkit-transition:opacity 0.1s ease;transition:opacity 0.1s ease;width:4px;z-index:10}.scroll-shadow-left{background:-webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, 0.1)), to(transparent));background:linear-gradient(to right, rgba(0, 0, 0, 0.1), transparent);border-bottom-left-radius:inherit;border-top-left-radius:inherit;left:0}.scroll-shadow-right{background:-webkit-gradient(linear, right top, left top, from(rgba(0, 0, 0, 0.1)), to(transparent));background:linear-gradient(to left, rgba(0, 0, 0, 0.1), transparent);border-bottom-right-radius:inherit;border-top-right-radius:inherit;right:0}';var PdsTable=function(){function t(t){registerInstance(this,t);this.pdsTableSelect=createEvent(this,"pdsTableSelect");this.pdsTableSelectAll=createEvent(this,"pdsTableSelectAll");this.scrollContainer=null;this._responsiveHandleScroll=null;this._responsiveHandleResize=null;this._responsiveResizeObserver=null;this._teardownResponsive=null;this.sortingColumn=null;this.sortingDirection="asc"}t.prototype.componentWillLoad=function(){this.sortingColumn=null};t.prototype.componentDidLoad=function(){if(this.responsive){this.setupResponsiveScrolling()}};t.prototype.disconnectedCallback=function(){if(this._teardownResponsive){this._teardownResponsive();this._teardownResponsive=null}};t.prototype.setupResponsiveScrolling=function(){var t=this;var i,r,e;var n=(i=this.el.shadowRoot)===null||i===void 0?void 0:i.querySelector(".pds-table-responsive-container");var o=(r=this.el.shadowRoot)===null||r===void 0?void 0:r.querySelector(".scroll-shadow-left");var s=(e=this.el.shadowRoot)===null||e===void 0?void 0:e.querySelector(".scroll-shadow-right");if(!n||!o||!s)return;this.scrollContainer=n;this._responsiveHandleScroll=function(){if(!t.scrollContainer)return;var i=t.scrollContainer.scrollLeft;var r=t.scrollContainer.scrollWidth-t.scrollContainer.clientWidth;o.style.opacity=i>0&&!t.fixedColumn?"1":"0";s.style.opacity=r>0&&i<r-1?"1":"0"};this.scrollContainer.addEventListener("scroll",this._responsiveHandleScroll,{passive:true});if(typeof window!=="undefined"&&window.ResizeObserver){try{this._responsiveResizeObserver=new ResizeObserver((function(){var i;(i=t._responsiveHandleScroll)===null||i===void 0?void 0:i.call(t)}));this._responsiveResizeObserver.observe(this.scrollContainer)}catch(t){}}if(typeof window!=="undefined"){this._responsiveHandleResize=function(){var i;(i=t._responsiveHandleScroll)===null||i===void 0?void 0:i.call(t)};window.addEventListener("resize",this._responsiveHandleResize)}this._teardownResponsive=function(){if(t.scrollContainer&&t._responsiveHandleScroll){t.scrollContainer.removeEventListener("scroll",t._responsiveHandleScroll);t.scrollContainer=null}if(t._responsiveResizeObserver){t._responsiveResizeObserver.disconnect();t._responsiveResizeObserver=null}if(typeof window!=="undefined"&&t._responsiveHandleResize){window.removeEventListener("resize",t._responsiveHandleResize);t._responsiveHandleResize=null}t._responsiveHandleScroll=null};this._responsiveHandleScroll()};t.prototype.classNames=function(){var t=["pds-table"];if(this.compact){t.push("is-compact")}if(this.responsive){t.push("is-responsive")}return t.join(" ")};t.prototype.sortTable=function(t,i){var r=this.el.querySelector("pds-table-body");var e=Array.from(r.querySelectorAll("pds-table-row"));var n=Array.from(this.el.querySelectorAll("pds-table-head-cell[sortable]"));var o=n.find((function(i){return i.innerText.trim()===t}));if(!o){console.warn('Column "'.concat(t,'" not found.'));return}var s=n.indexOf(o);e.sort((function(t,r){var e=t.querySelector("pds-table-cell:nth-child(".concat(s+1,")")).textContent.trim();var n=r.querySelector("pds-table-cell:nth-child(".concat(s+1,")")).textContent.trim();if(i==="asc"){return e.localeCompare(n,undefined,{sensitivity:"base"})}else{return n.localeCompare(e,undefined,{sensitivity:"base"})}}));r.innerHTML="";e.forEach((function(t){r.appendChild(t)}))};t.prototype.handleTableSort=function(t){var i=t.detail.direction;this.sortTable(t.detail.column,i);this.sortingColumn=t.detail.column;this.sortingDirection=i};t.prototype.handleTableSelectAll=function(t){if(t.defaultPrevented)return;var i=this.el.querySelector("pds-table-body");var r=Array.from(i.querySelectorAll("pds-table-row"));r.forEach((function(i){i.isSelected=t.detail.isSelected}))};t.prototype.handleTableSelect=function(t){return __awaiter(this,void 0,void 0,(function(){var i,r,e,n,o;return __generator(this,(function(s){if(t.defaultPrevented)return[2];i=this.el.querySelectorAll("pds-table-row");r=Array.from(i).every((function(t){return t.isSelected}));e=Array.from(i).every((function(t){return!t.isSelected}));n=this.el.querySelector("pds-table-head");if(!n)return[2];o=n.shadowRoot.querySelector("pds-checkbox");o.checked=r;o.indeterminate=!r&&!e;return[2]}))}))};t.prototype.render=function(){if(this.responsive){return h(Host,{class:"pds-table is-responsive pds-table-responsive-host",id:this.componentId,role:"grid",selectable:this.selectable,tabindex:"0"},h("div",{class:"scroll-shadow-left"}),h("div",{class:"scroll-shadow-right"}),h("div",{class:"pds-table-responsive-container"},h("div",{class:"pds-table-responsive-wrapper"},h("div",{class:this.classNames()},h("slot",null)))))}return h(Host,{class:this.classNames(),id:this.componentId,role:"grid",selectable:this.selectable,tabindex:"0"},h("slot",null))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();PdsTable.style=pdsTableCss;export{PdsTable as pds_table};
2
2
  //# sourceMappingURL=pds-table.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pds-table.entry.js","sources":["src/components/pds-table/pds-table.scss?tag=pds-table&encapsulation=shadow","src/components/pds-table/pds-table.tsx"],"sourcesContent":[":host {\n --color-background-default: var(--pine-color-white);\n\n background: var(--color-background-default);\n border-collapse: separate;\n box-sizing: border-box;\n display: table;\n width: 100%;\n}\n\n:host(:focus-visible) {\n outline: var(--pine-outline-focus);\n}\n\n:host(.is-responsive) {\n background-attachment: local, local, scroll, scroll;\n background-image: linear-gradient(to right, var(--color-background-default), var(--color-background-default)),\n linear-gradient(to right, var(--color-background-default), var(--color-background-default)),\n linear-gradient(to right, rgba(0, 0, 0, 0.1), rgba(255, 255, 255, 0)),\n linear-gradient(to left, rgba(0, 0, 0, 0.1), rgba(255, 255, 255, 0));\n background-position: left center, right center, left center, right center;\n background-repeat: no-repeat;\n background-size: 4px 100%, 4px 100%, 4px 100%, 4px 100%;\n display: block;\n margin: 0 auto;\n max-width: fit-content;\n overflow-x: auto;\n white-space: nowrap;\n}\n","import { Component, Element, Event, EventEmitter, Host, h, Prop, State, Listen } from '@stencil/core';\n\n@Component({\n tag: 'pds-table',\n styleUrls: ['pds-table.scss'],\n shadow: true,\n})\nexport class PdsTable {\n @Element() el: HTMLPdsTableElement;\n\n /**\n * Determines if the table displays with reduced table cell padding.\n */\n @Prop() compact: boolean;\n\n /**\n * A unique identifier used for the table `id` attribute.\n */\n @Prop() componentId!: string;\n\n /**\n * Enables the table to be responsive by horizontally scrolling on smaller screens.\n */\n @Prop() responsive: boolean;\n\n /**\n * Determines if the should display a fixed first column.\n */\n @Prop() fixedColumn: boolean;\n\n /**\n * Determines if the table displays checkboxes for selectable rows.\n */\n @Prop() selectable: boolean;\n\n /**\n * The name of the column being sorted.\n * @defaultValue null\n */\n @State() sortingColumn: string | null = null;\n\n /**\n * The direction of sorting.\n * @defaultValue 'asc'\n */\n @State() sortingDirection: 'asc' | 'desc' = 'asc';\n\n\n /**\n * Event that is emitted when the checkbox is clicked, carrying the rowIndex and selected value.\n */\n @Event() pdsTableSelect: EventEmitter<{ rowIndex: number; isSelected: boolean }>;\n\n /**\n * Event that is emitted when the select all checkbox is clicked, carrying the selected value.\n */\n @Event() pdsTableSelectAll: EventEmitter<{ isSelected: boolean }>;\n\n componentWillLoad() {\n this.sortingColumn = null;\n }\n\n private classNames() {\n const classNames = ['pds-table'];\n\n if (this.compact) {\n classNames.push('is-compact');\n }\n\n if (this.responsive) {\n classNames.push('is-responsive');\n }\n\n return classNames.join(' ');\n }\n\n private sortTable(column: string, direction: 'asc' | 'desc') {\n const tableBody = this.el.querySelector('pds-table-body');\n\n // Get the rows in the table body\n const tableRows = Array.from(tableBody.querySelectorAll('pds-table-row'));\n\n // Find the column index based on the column name\n const columnHeaderCells: HTMLElement[] = Array.from(\n this.el.querySelectorAll('pds-table-head-cell[sortable]')\n );\n\n const columnHeaderCell = columnHeaderCells.find(\n (cell) => cell.innerText.trim() === column\n );\n\n if (!columnHeaderCell) {\n console.warn(`Column \"${column}\" not found.`);\n return;\n }\n\n const columnIndex = columnHeaderCells.indexOf(columnHeaderCell);\n\n // Sort the rows based on the content of the specified column\n tableRows.sort((a, b) => {\n const valueA = a.querySelector(`pds-table-cell:nth-child(${columnIndex + 1})`).textContent.trim();\n const valueB = b.querySelector(`pds-table-cell:nth-child(${columnIndex + 1})`).textContent.trim();\n\n if (direction === 'asc') {\n return valueA.localeCompare(valueB);\n } else {\n return valueB.localeCompare(valueA);\n }\n });\n\n // Clear and append the sorted rows back to the table body\n tableBody.innerHTML = '';\n tableRows.forEach((row) => {\n tableBody.appendChild(row);\n });\n }\n\n @Listen('pdsTableSort')\n handleTableSort(event: CustomEvent<{ column: string; direction: 'asc' | 'desc' }>) {\n const { direction } = event.detail;\n this.sortTable(event.detail.column, direction);\n this.sortingColumn = event.detail.column;\n this.sortingDirection = direction;\n }\n\n @Listen('pdsTableSelectAll')\n handleTableSelectAll(event: CustomEvent<{ isSelected: boolean }>) {\n if (event.defaultPrevented) return;\n\n const pdsTableBody = this.el.querySelector('pds-table-body');\n const tableRows = Array.from(pdsTableBody.querySelectorAll('pds-table-row'));\n\n tableRows.forEach((row) => {\n row.isSelected = event.detail.isSelected;\n });\n }\n\n @Listen('pdsTableRowSelected')\n async handleTableSelect(event: CustomEvent<{ rowIndex: number; isSelected: boolean }>) {\n if (event.defaultPrevented) return;\n\n const allTableRows = this.el.querySelectorAll('pds-table-row');\n const allSelectedRows = Array.from(allTableRows).every((row) => row.isSelected);\n const noneSelectedRows = Array.from(allTableRows).every((row) => !row.isSelected);\n const pdsTableHead = this.el.querySelector('pds-table-head');\n if (!pdsTableHead) return;\n\n const headerCheckbox = pdsTableHead.shadowRoot.querySelector('pds-checkbox');\n headerCheckbox.checked = allSelectedRows;\n headerCheckbox.indeterminate = !allSelectedRows && !noneSelectedRows;\n }\n\n render() {\n return (\n <Host\n class={this.classNames()}\n id={this.componentId}\n role=\"grid\"\n selectable={this.selectable}\n tabindex=\"0\"\n >\n <slot></slot>\n </Host>\n );\n }\n}\n"],"names":[],"mappings":";;AAAA,MAAM,WAAW,GAAG,85CAA85C;;MCOr6C,QAAQ,GAAA,MAAA;AALrB,IAAA,WAAA,CAAA,OAAA,EAAA;;;;AAiCE;;;AAGG;AACM,QAAA,IAAa,CAAA,aAAA,GAAkB,IAAI;AAE5C;;;AAGG;AACM,QAAA,IAAgB,CAAA,gBAAA,GAAmB,KAAK;AAwHlD;IA3GC,iBAAiB,GAAA;AACf,QAAA,IAAI,CAAC,aAAa,GAAG,IAAI;;IAGnB,UAAU,GAAA;AAChB,QAAA,MAAM,UAAU,GAAG,CAAC,WAAW,CAAC;AAEhC,QAAA,IAAI,IAAI,CAAC,OAAO,EAAE;AAChB,YAAA,UAAU,CAAC,IAAI,CAAC,YAAY,CAAC;;AAG/B,QAAA,IAAI,IAAI,CAAC,UAAU,EAAE;AACnB,YAAA,UAAU,CAAC,IAAI,CAAC,eAAe,CAAC;;AAGlC,QAAA,OAAO,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC;;IAG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gBAAgB,CAAC;AAC5D,QAAA,IAAI,CAAC,YAAY;YAAE;QAEnB,MAAM,cAAc,GAAG,YAAY,CAAC,UAAU,CAAC,aAAa,CAAC,cAAc,CAAC;AAC5E,QAAA,cAAc,CAAC,OAAO,GAAG,eAAe;QACxC,cAAc,CAAC,aAAa,GAAG,CAAC,eAAe,IAAI,CAAC,gBAAgB;;IAGtE,MAAM,GAAA;QACJ,QACE,CAAA,CAAC,IAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EACH,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,EACxB,EAAE,EAAE,IAAI,CAAC,WAAW,EACpB,IAAI,EAAC,MAAM,EACX,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,QAAQ,EAAC,GAAG,EAAA,EAEZ,CAAa,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACR;;;;;;;;"}
1
+ {"version":3,"file":"pds-table.entry.js","sources":["src/components/pds-table/pds-table.scss?tag=pds-table&encapsulation=shadow","src/components/pds-table/pds-table.tsx"],"sourcesContent":[":host {\n --color-background-default: var(--pine-color-white);\n\n background: var(--color-background-default);\n border-collapse: separate;\n border-radius: inherit;\n box-sizing: border-box;\n display: table;\n width: 100%;\n}\n\n:host(:focus-visible) {\n outline: var(--pine-outline-focus);\n}\n\n/*\n * Responsive Table Architecture\n *\n * When responsive=true, the table uses a nested structure to provide horizontal scrolling\n * while maintaining proper width behavior and scroll shadows:\n *\n * Host (.pds-table-responsive-host)\n * ├── Shadow Left (positioned fixed to left edge)\n * ├── Shadow Right (positioned fixed to right edge)\n * └── Container (.pds-table-responsive-container)\n * └── Wrapper (.pds-table-responsive-wrapper)\n * └── Table (.pds-table)\n *\n * - Host: Constrains everything to parent width, clips shadows to border-radius\n * - Shadows: Stay fixed during scroll, provide visual scroll indicators\n * - Container: Handles horizontal scrolling (overflow-x: auto)\n * - Table: Expands to full width or scrolls based on content\n */\n:host(.pds-table-responsive-host) {\n border-radius: inherit;\n box-sizing: border-box !important;\n display: block !important;\n max-width: 100% !important;\n overflow: hidden !important;\n position: relative !important;\n width: 100% !important;\n}\n\n.pds-table-responsive-container {\n border-radius: inherit;\n box-sizing: border-box !important;\n overflow-x: auto !important;\n overflow-y: visible !important;\n position: relative !important;\n width: 100% !important;\n}\n\n.pds-table-responsive-wrapper {\n border-radius: inherit;\n box-sizing: border-box !important;\n display: block !important;\n position: relative !important;\n width: 100% !important;\n}\n\n.pds-table-responsive-wrapper .pds-table {\n display: table !important;\n min-width: max-content !important;\n table-layout: auto !important;\n white-space: nowrap !important;\n width: 100% !important;\n}\n\n/* Shadows positioned relative to host (non-scrolling), covering container edges */\n.scroll-shadow-left,\n.scroll-shadow-right {\n height: 100%;\n opacity: 0;\n pointer-events: none;\n position: absolute;\n top: 0;\n transition: opacity 0.1s ease;\n width: 4px;\n z-index: 10;\n}\n\n.scroll-shadow-left {\n background: linear-gradient(to right, rgba(0, 0, 0, 0.1), transparent);\n border-bottom-left-radius: inherit;\n border-top-left-radius: inherit;\n left: 0;\n}\n\n.scroll-shadow-right {\n background: linear-gradient(to left, rgba(0, 0, 0, 0.1), transparent);\n border-bottom-right-radius: inherit;\n border-top-right-radius: inherit;\n right: 0;\n}\n","import { Component, Element, Event, EventEmitter, Host, h, Prop, State, Listen } from '@stencil/core';\n\n@Component({\n tag: 'pds-table',\n styleUrls: ['pds-table.scss'],\n shadow: true,\n})\nexport class PdsTable {\n @Element() el: HTMLPdsTableElement;\n private scrollContainer: HTMLElement | null = null;\n private _responsiveHandleScroll: (() => void) | null = null;\n private _responsiveHandleResize: (() => void) | null = null;\n private _responsiveResizeObserver: ResizeObserver | null = null;\n private _teardownResponsive: (() => void) | null = null;\n\n /**\n * Determines if the table displays with reduced table cell padding.\n */\n @Prop() compact: boolean;\n\n /**\n * A unique identifier used for the table `id` attribute.\n */\n @Prop() componentId!: string;\n\n /**\n * Enables the table to be responsive by horizontally scrolling on smaller screens.\n */\n @Prop() responsive: boolean;\n\n /**\n * Determines if the should display a fixed first column.\n */\n @Prop() fixedColumn: boolean;\n\n /**\n * Determines if the table displays checkboxes for selectable rows.\n */\n @Prop() selectable: boolean;\n\n /**\n * The name of the column being sorted.\n * @defaultValue null\n */\n @State() sortingColumn: string | null = null;\n\n /**\n * The direction of sorting.\n * @defaultValue 'asc'\n */\n @State() sortingDirection: 'asc' | 'desc' = 'asc';\n\n\n /**\n * Event that is emitted when the checkbox is clicked, carrying the rowIndex and selected value.\n */\n @Event() pdsTableSelect: EventEmitter<{ rowIndex: number; isSelected: boolean }>;\n\n /**\n * Event that is emitted when the select all checkbox is clicked, carrying the selected value.\n */\n @Event() pdsTableSelectAll: EventEmitter<{ isSelected: boolean }>;\n\n componentWillLoad() {\n this.sortingColumn = null;\n }\n\n componentDidLoad() {\n if (this.responsive) {\n this.setupResponsiveScrolling();\n }\n }\n\n disconnectedCallback() {\n if (this._teardownResponsive) {\n this._teardownResponsive();\n this._teardownResponsive = null;\n }\n }\n\n /**\n * Sets up responsive scrolling behavior for the table.\n *\n * This method creates a horizontal scrolling system where:\n * - The table content can scroll horizontally when it exceeds the container width\n * - Scroll shadows appear at the left/right edges to indicate scrollable content\n * - Fixed columns remain sticky during horizontal scrolling\n * - Shadows respect border-radius and don't appear when there's nothing to scroll\n *\n * Architecture:\n * - Host element: Contains everything, respects parent constraints\n * - Container element: Handles horizontal scrolling (overflow-x: auto)\n * - Shadow elements: Positioned fixed relative to host, show scroll indicators\n *\n * @private\n */\n private setupResponsiveScrolling() {\n const container = this.el.shadowRoot?.querySelector('.pds-table-responsive-container') as HTMLElement;\n const leftShadow = this.el.shadowRoot?.querySelector('.scroll-shadow-left') as HTMLElement;\n const rightShadow = this.el.shadowRoot?.querySelector('.scroll-shadow-right') as HTMLElement;\n\n if (!container || !leftShadow || !rightShadow) return;\n\n // Store container reference for cleanup\n this.scrollContainer = container;\n\n /**\n * Updates the visibility of scroll shadows based on current scroll position.\n * Left shadow: Shows when scrolled away from start (hidden if fixedColumn is enabled)\n * Right shadow: Shows when there's content to scroll and not at the end\n */\n this._responsiveHandleScroll = () => {\n if (!this.scrollContainer) return;\n\n const scrollLeft = this.scrollContainer.scrollLeft;\n const maxScrollLeft = this.scrollContainer.scrollWidth - this.scrollContainer.clientWidth;\n\n // Show left shadow when scrolled away from start, but not if there's a fixed column\n leftShadow.style.opacity = (scrollLeft > 0 && !this.fixedColumn) ? '1' : '0';\n\n // Show right shadow only if there's content to scroll AND not at end\n rightShadow.style.opacity = (maxScrollLeft > 0 && scrollLeft < maxScrollLeft - 1) ? '1' : '0';\n };\n\n // Add scroll event listener to container element\n this.scrollContainer.addEventListener('scroll', this._responsiveHandleScroll, { passive: true });\n\n // Add resize observer to update shadows when container size changes\n if (typeof window !== 'undefined' && window.ResizeObserver) {\n try {\n this._responsiveResizeObserver = new ResizeObserver(() => {\n this._responsiveHandleScroll?.();\n });\n this._responsiveResizeObserver.observe(this.scrollContainer);\n } catch (error) {\n // ResizeObserver not available in some environments (e.g., tests)\n // Fall back to window resize listener only\n }\n }\n\n // Listen for window resize as fallback\n if (typeof window !== 'undefined') {\n this._responsiveHandleResize = () => {\n this._responsiveHandleScroll?.();\n };\n window.addEventListener('resize', this._responsiveHandleResize);\n }\n\n // Create teardown function for cleanup\n this._teardownResponsive = () => {\n if (this.scrollContainer && this._responsiveHandleScroll) {\n this.scrollContainer.removeEventListener('scroll', this._responsiveHandleScroll);\n this.scrollContainer = null;\n }\n\n if (this._responsiveResizeObserver) {\n this._responsiveResizeObserver.disconnect();\n this._responsiveResizeObserver = null;\n }\n\n if (typeof window !== 'undefined' && this._responsiveHandleResize) {\n window.removeEventListener('resize', this._responsiveHandleResize);\n this._responsiveHandleResize = null;\n }\n\n this._responsiveHandleScroll = null;\n };\n\n // Initial check after setup\n this._responsiveHandleScroll();\n }\n\n\n private classNames() {\n const classNames = ['pds-table'];\n\n if (this.compact) {\n classNames.push('is-compact');\n }\n\n if (this.responsive) {\n classNames.push('is-responsive');\n }\n\n return classNames.join(' ');\n }\n\n private sortTable(column: string, direction: 'asc' | 'desc') {\n const tableBody = this.el.querySelector('pds-table-body');\n\n // Get the rows in the table body\n const tableRows = Array.from(tableBody.querySelectorAll('pds-table-row'));\n\n // Find the column index based on the column name\n const columnHeaderCells: HTMLElement[] = Array.from(\n this.el.querySelectorAll('pds-table-head-cell[sortable]')\n );\n\n const columnHeaderCell = columnHeaderCells.find(\n (cell) => cell.innerText.trim() === column\n );\n\n if (!columnHeaderCell) {\n console.warn(`Column \"${column}\" not found.`);\n return;\n }\n\n const columnIndex = columnHeaderCells.indexOf(columnHeaderCell);\n\n // Sort the rows based on the content of the specified column\n tableRows.sort((a, b) => {\n const valueA = a.querySelector(`pds-table-cell:nth-child(${columnIndex + 1})`).textContent.trim();\n const valueB = b.querySelector(`pds-table-cell:nth-child(${columnIndex + 1})`).textContent.trim();\n\n if (direction === 'asc') {\n return valueA.localeCompare(valueB, undefined, { sensitivity: 'base' });\n } else {\n return valueB.localeCompare(valueA, undefined, { sensitivity: 'base' });\n }\n });\n\n // Clear and append the sorted rows back to the table body\n tableBody.innerHTML = '';\n tableRows.forEach((row) => {\n tableBody.appendChild(row);\n });\n }\n\n @Listen('pdsTableSort')\n handleTableSort(event: CustomEvent<{ column: string; direction: 'asc' | 'desc' }>) {\n const { direction } = event.detail;\n this.sortTable(event.detail.column, direction);\n this.sortingColumn = event.detail.column;\n this.sortingDirection = direction;\n }\n\n @Listen('pdsTableSelectAll')\n handleTableSelectAll(event: CustomEvent<{ isSelected: boolean }>) {\n if (event.defaultPrevented) return;\n\n const pdsTableBody = this.el.querySelector('pds-table-body');\n const tableRows = Array.from(pdsTableBody.querySelectorAll('pds-table-row'));\n\n tableRows.forEach((row) => {\n row.isSelected = event.detail.isSelected;\n });\n }\n\n @Listen('pdsTableRowSelected')\n async handleTableSelect(event: CustomEvent<{ rowIndex: number; isSelected: boolean }>) {\n if (event.defaultPrevented) return;\n\n const allTableRows = this.el.querySelectorAll('pds-table-row');\n const allSelectedRows = Array.from(allTableRows).every((row) => row.isSelected);\n const noneSelectedRows = Array.from(allTableRows).every((row) => !row.isSelected);\n const pdsTableHead = this.el.querySelector('pds-table-head');\n if (!pdsTableHead) return;\n\n const headerCheckbox = pdsTableHead.shadowRoot.querySelector('pds-checkbox');\n headerCheckbox.checked = allSelectedRows;\n headerCheckbox.indeterminate = !allSelectedRows && !noneSelectedRows;\n }\n\n render() {\n if (this.responsive) {\n return (\n <Host\n class=\"pds-table is-responsive pds-table-responsive-host\"\n id={this.componentId}\n role=\"grid\"\n selectable={this.selectable}\n tabindex=\"0\"\n >\n <div class=\"scroll-shadow-left\"></div>\n <div class=\"scroll-shadow-right\"></div>\n <div class=\"pds-table-responsive-container\">\n <div class=\"pds-table-responsive-wrapper\">\n <div class={this.classNames()}>\n <slot></slot>\n </div>\n </div>\n </div>\n </Host>\n );\n }\n\n return (\n <Host\n class={this.classNames()}\n id={this.componentId}\n role=\"grid\"\n selectable={this.selectable}\n tabindex=\"0\"\n >\n <slot></slot>\n </Host>\n );\n }\n}\n"],"names":[],"mappings":";;AAAA,MAAM,WAAW,GAAG,07DAA07D;;MCOj8D,QAAQ,GAAA,MAAA;AALrB,IAAA,WAAA,CAAA,OAAA,EAAA;;;;AAOU,QAAA,IAAe,CAAA,eAAA,GAAuB,IAAI;AAC1C,QAAA,IAAuB,CAAA,uBAAA,GAAwB,IAAI;AACnD,QAAA,IAAuB,CAAA,uBAAA,GAAwB,IAAI;AACnD,QAAA,IAAyB,CAAA,yBAAA,GAA0B,IAAI;AACvD,QAAA,IAAmB,CAAA,mBAAA,GAAwB,IAAI;AA2BvD;;;AAGG;AACM,QAAA,IAAa,CAAA,aAAA,GAAkB,IAAI;AAE5C;;;AAGG;AACM,QAAA,IAAgB,CAAA,gBAAA,GAAmB,KAAK;AAwPlD;IA3OC,iBAAiB,GAAA;AACf,QAAA,IAAI,CAAC,aAAa,GAAG,IAAI;;IAG3B,gBAAgB,GAAA;AACd,QAAA,IAAI,IAAI,CAAC,U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,EAAE,IAAI,CAAC,WAAW,EACpB,IAAI,EAAC,MAAM,EACX,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,QAAQ,EAAC,GAAG,EAAA,EAEZ,CAAK,CAAA,KAAA,EAAA,EAAA,KAAK,EAAC,oBAAoB,EAAO,CAAA,EACtC,CAAK,CAAA,KAAA,EAAA,EAAA,KAAK,EAAC,qBAAqB,EAAO,CAAA,EACvC,CAAK,CAAA,KAAA,EAAA,EAAA,KAAK,EAAC,gCAAgC,EAAA,EACzC,CAAK,CAAA,KAAA,EAAA,EAAA,KAAK,EAAC,8BAA8B,EAAA,EACvC,CAAA,CAAA,KAAA,EAAA,EAAK,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,EAAA,EAC3B,CAAA,CAAA,MAAA,EAAA,IAAA,CAAa,CACT,CACF,CACF,CACD;;AAIX,QAAA,QACE,CAAA,CAAC,IAAI,EAAA,EACH,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,EACxB,EAAE,EAAE,IAAI,CAAC,WAAW,EACpB,IAAI,EAAC,MAAM,EACX,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,QAAQ,EAAC,GAAG,EAAA,EAEZ,CAAa,CAAA,MAAA,EAAA,IAAA,CAAA,CACR;;;;;;;;"}
@@ -1,2 +1,2 @@
1
- import{r as registerInstance,h,H as Host,g as getElement}from"./index-BVCWKPy3.js";var pdsTabpanelCss=":host{display:block}.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}";var PdsTabpanel=function(){function a(a){registerInstance(this,a);this.selected=false}a.prototype.render=function(){return h(Host,{key:"0465e33b28555596cc4a891a63a99c49153f577d",slot:"tabpanels"},h("div",{key:"8c2404f0aaee7dd7219552b51332d4194aa535ae",role:"tabpanel",id:this.parentComponentId+"__"+this.name+"-panel",tabindex:"0","aria-labelledby":this.parentComponentId+"__"+this.name,class:this.selected?"pds-tabpanel is-active":"pds-tabpanel"},h("slot",{key:"f7f9dc2a755aa726b8e46d8641087a8fdb1a9e5e"})))};Object.defineProperty(a.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return a}();PdsTabpanel.style=pdsTabpanelCss;export{PdsTabpanel as pds_tabpanel};
1
+ import{r as registerInstance,h,H as Host,g as getElement}from"./index-BVCWKPy3.js";var pdsTabpanelCss=":host{display:block}.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}";var PdsTabpanel=function(){function e(e){registerInstance(this,e);this.selected=false}e.prototype.render=function(){return h(Host,{key:"452260718e63155f0ce100b6d502b208fe0b8210",slot:"tabpanels"},h("div",{key:"dbf06166503b2890d827ac58f3481330f60edb5c",role:"tabpanel",id:this.parentComponentId+"__"+this.name+"-panel",tabindex:"0","aria-labelledby":this.parentComponentId+"__"+this.name,class:this.selected?"pds-tabpanel is-active":"pds-tabpanel"},h("slot",{key:"4785fa2a3781569b51e1947db5dd860b36e09ab5"})))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();PdsTabpanel.style=pdsTabpanelCss;export{PdsTabpanel as pds_tabpanel};
2
2
  //# sourceMappingURL=pds-tabpanel.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as registerInstance,h,H as Host,g as getElement}from"./index-BVCWKPy3.js";var pdsTabsCss=":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--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-grey-100);border:var(--pine-border-width-thin) solid var(--pine-color-grey-200);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)}";var PdsTabs=function(){function s(s){registerInstance(this,s)}s.prototype.tabClickHandler=function(s){if(this.componentId===s.detail[1]){this.activeTabIndex=s.detail[0];this.activeTabName=this.tabs[this.activeTabIndex].name}};s.prototype.handleKeyDown=function(s){var i=["ArrowLeft","ArrowRight","Home","End"];if(i.includes(s.key)){s.preventDefault();this.moveActiveTab(s.key)}};s.prototype.moveActiveTab=function(s){var i=0;var t=this.tabs.length-1;var a=null;switch(s){case"ArrowLeft":a=this.activeTabIndex===i?t:this.activeTabIndex+-1;break;case"ArrowRight":a=this.activeTabIndex===t?i:this.activeTabIndex+1;break;case"Home":a=i;break;case"End":a=t;break}this.tabs[a].children[0].focus();this.activeTabName=this.tabs[a].name;this.activeTabIndex=a};s.prototype.findAllChildren=function(){this.tabs=this.el.querySelectorAll("pds-tab");this.tabPanels=this.el.querySelectorAll("pds-tabpanel")};s.prototype.propGeneration=function(s,i){if(i===void 0){i=0}s.parentComponentId=this.componentId.toString();s.variant=this.variant.toString();s.selected=this.activeTabName===s.name?true:false;s["index"]=i};s.prototype.passPropsToChildren=function(){var s=this;this.tabs.forEach((function(i,t){if(s.activeTabName===i.name)s.activeTabIndex=t;s.propGeneration(i,t)}));this.tabPanels.forEach((function(i){s.propGeneration(i)}))};s.prototype.classNames=function(){var s="pds-tabs";if(this.variant&&this.variant!="primary"){var i="pds-tabs--".concat(this.variant);s+=" "+i}return s};s.prototype.componentWillLoad=function(){this.findAllChildren()};s.prototype.componentWillRender=function(){this.passPropsToChildren()};s.prototype.render=function(){return h(Host,{key:"3b06654b1d2298a9cfa3fc42996ad72e80942ee4","active-tab-name":this.activeTabName,class:this.classNames(),id:this.componentId},h("div",{key:"529e1aa48f7fea4754dbe8a3d8f655eb297e1a9a",class:"pds-tabs__tablist",role:"tablist","aria-label":this.tablistLabel},h("slot",{key:"cca3b75eec2a519e87878b39d8ca52a6c033dc4d",name:"tabs"})),h("slot",{key:"caf5abcc85eee1e45e197a7ec792a873cdfb104b",name:"tabpanels"}))};Object.defineProperty(s.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return s}();PdsTabs.style=pdsTabsCss;export{PdsTabs as pds_tabs};
1
+ import{r as registerInstance,h,H as Host,g as getElement}from"./index-BVCWKPy3.js";var pdsTabsCss=":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--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-grey-100);border:var(--pine-border-width-thin) solid var(--pine-color-grey-200);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)}";var PdsTabs=function(){function s(s){registerInstance(this,s)}s.prototype.tabClickHandler=function(s){if(this.componentId===s.detail[1]){this.activeTabIndex=s.detail[0];this.activeTabName=this.tabs[this.activeTabIndex].name}};s.prototype.handleKeyDown=function(s){var i=["ArrowLeft","ArrowRight","Home","End"];if(i.includes(s.key)){s.preventDefault();this.moveActiveTab(s.key)}};s.prototype.moveActiveTab=function(s){var i=0;var t=this.tabs.length-1;var a=null;switch(s){case"ArrowLeft":a=this.activeTabIndex===i?t:this.activeTabIndex+-1;break;case"ArrowRight":a=this.activeTabIndex===t?i:this.activeTabIndex+1;break;case"Home":a=i;break;case"End":a=t;break}this.tabs[a].children[0].focus();this.activeTabName=this.tabs[a].name;this.activeTabIndex=a};s.prototype.findAllChildren=function(){this.tabs=this.el.querySelectorAll("pds-tab");this.tabPanels=this.el.querySelectorAll("pds-tabpanel")};s.prototype.propGeneration=function(s,i){if(i===void 0){i=0}s.parentComponentId=this.componentId.toString();s.variant=this.variant.toString();s.selected=this.activeTabName===s.name?true:false;s["index"]=i};s.prototype.passPropsToChildren=function(){var s=this;this.tabs.forEach((function(i,t){if(s.activeTabName===i.name)s.activeTabIndex=t;s.propGeneration(i,t)}));this.tabPanels.forEach((function(i){s.propGeneration(i)}))};s.prototype.classNames=function(){var s="pds-tabs";if(this.variant&&this.variant!="primary"){var i="pds-tabs--".concat(this.variant);s+=" "+i}return s};s.prototype.componentWillLoad=function(){this.findAllChildren()};s.prototype.componentWillRender=function(){this.passPropsToChildren()};s.prototype.render=function(){return h(Host,{key:"e5b0d44fbe0df70a9260b5ce1ecabad9e5ce52da","active-tab-name":this.activeTabName,class:this.classNames(),id:this.componentId},h("div",{key:"4e987262ef8355b0a94f94ded397d72ccbb678f8",class:"pds-tabs__tablist",role:"tablist","aria-label":this.tablistLabel},h("slot",{key:"f615e1d116f4c0f9ee28d172f64a05e755386ead",name:"tabs"})),h("slot",{key:"f74280a78775d19fb1e94d522c28531d79ba73e3",name:"tabpanels"}))};Object.defineProperty(s.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return s}();PdsTabs.style=pdsTabsCss;export{PdsTabs as pds_tabs};
2
2
  //# sourceMappingURL=pds-tabs.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as registerInstance,h,g as getElement}from"./index-BVCWKPy3.js";import{s as setColor}from"./utils-tJa4KYNO.js";var pdsTextCss=":host{display:inline}:host([decoration=underline-dotted])>*{-webkit-text-decoration-color:var(--pine-color-grey-600);text-decoration-color:var(--pine-color-grey-600);-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])>*{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}";var PdsText=function(){function e(e){registerInstance(this,e);this.tag="p"}e.prototype.render=function(){var e=this.tag;var t="\n pds-text\n ".concat(this.align!==undefined&&this.align.trim()!==""?"pds-text--align-".concat(this.align):"","\n ").concat(this.gutter!==undefined&&this.gutter.trim()!==""?"pds-text--gutter-".concat(this.gutter):"","\n ").concat(this.size!==undefined&&this.size.trim()!==""?"pds-text--size-".concat(this.size):"","\n ").concat(this.weight!==undefined&&this.weight.trim()!==""?"pds-text--weight-".concat(this.weight):"","\n ").concat(this.decoration!==undefined&&this.decoration.trim()!==""?"pds-text--decoration-".concat(this.decoration):"","\n ");return h(e,{key:"2b8a2f2aaafd342a7df51029213c82224774fd5f",style:this.color&&setColor(this.color),class:t,part:"content"},h("slot",{key:"8dd80aaec576c1e1ab152529f94732d6074c5542"}))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();PdsText.style=pdsTextCss;export{PdsText as pds_text};
1
+ import{r as registerInstance,h,g as getElement}from"./index-BVCWKPy3.js";import{s as setColor}from"./utils-tJa4KYNO.js";var pdsTextCss=":host{display:inline}:host([decoration=underline-dotted])>*{-webkit-text-decoration-color:var(--pine-color-grey-600);text-decoration-color:var(--pine-color-grey-600);-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])>*{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}";var PdsText=function(){function e(e){registerInstance(this,e);this.tag="p"}e.prototype.render=function(){var e=this.tag;var t="\n pds-text\n ".concat(this.align!==undefined&&this.align.trim()!==""?"pds-text--align-".concat(this.align):"","\n ").concat(this.gutter!==undefined&&this.gutter.trim()!==""?"pds-text--gutter-".concat(this.gutter):"","\n ").concat(this.size!==undefined&&this.size.trim()!==""?"pds-text--size-".concat(this.size):"","\n ").concat(this.weight!==undefined&&this.weight.trim()!==""?"pds-text--weight-".concat(this.weight):"","\n ").concat(this.decoration!==undefined&&this.decoration.trim()!==""?"pds-text--decoration-".concat(this.decoration):"","\n ");return h(e,{key:"290b394545a5769f9d020922b31e14991148ebc7",style:this.color&&setColor(this.color),class:t,part:"content"},h("slot",{key:"0e64e2e05db073a5d0568f282acce4b9f06238cf"}))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();PdsText.style=pdsTextCss;export{PdsText as pds_text};
2
2
  //# sourceMappingURL=pds-text.entry.js.map
@@ -1,2 +1,2 @@
1
- import{__awaiter,__generator}from"tslib";import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-BVCWKPy3.js";import{i as isRequired,a as assignDescription,m as messageId}from"./form-DTL_39D_.js";import{d as debounceEvent}from"./utils-tJa4KYNO.js";import{i as inheritAriaAttributes,a as inheritAttributes}from"./attributes-C0M1gTKv.js";import{f as danger}from"./index-CzVv99mW.js";var labelCss=":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)}";var pdsInputTokensCss=":host{--pine-input-color-background-danger:var(--pine-color-red-050)}";var pdsTextareaCss=":host{display:inline}:host([aria-readonly=true]) textarea{background-color:var(--pine-color-background-container-disabled);color:var(--pine-color-text-readonly)}.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__field{background-color:var(--pine-color-background-container);border:var(--pine-border);border-radius:calc(var(--pine-dimension-xs) * 1.25);font:var(--pine-typography-body);letter-spacing:var(--pine-letter-spacing);padding:var(--pine-dimension-xs) var(--pine-dimension-sm)}.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)}.pds-textarea__field.is-invalid:focus-visible{outline-color:var(--pine-color-focus-ring-danger)}.pds-textarea__error-message,.pds-textarea__helper-message{color:var(--pine-color-text-message);font:var(--pine-typography-body-sm-medium);-webkit-margin-before:var(--pine-dimension-xs);margin-block-start:var(--pine-dimension-xs)}.pds-textarea__error-message{-ms-flex-align:center;align-items:center;color:var(--pine-color-text-message-danger);display:-ms-flexbox;display:flex;gap:var(--pine-dimension-2xs)}";var PdsTextarea=function(){function e(e){var t=this;registerInstance(this,e);this.pdsBlur=createEvent(this,"pdsBlur");this.pdsFocus=createEvent(this,"pdsFocus");this.pdsInput=createEvent(this,"pdsInput");this.pdsTextareaChange=createEvent(this,"pdsTextareaChange");this.inheritedAttributes={};this.disabled=false;this.invalid=false;this.name=this.componentId;this.readonly=false;this.required=false;this.value="";this.hasFocus=false;this.hasAction=false;this.onBlur=function(e){t.hasFocus=false;if(t.focusedValue!==t.value){t.emitValueChange(e)}t.pdsBlur.emit(e)};this.onFocus=function(e){t.hasFocus=true;t.focusedValue=t.value;t.pdsFocus.emit(e)};this.onInput=function(e){var i=e.target;if(i){t.value=i.value||""}t.emitInputChange(e)};this.onTextareaChange=function(e){t.emitValueChange(e)}}e.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(this.nativeTextarea){this.nativeTextarea.focus()}return[2]}))}))};e.prototype.debounceChanged=function(){var e=this,t=e.pdsInput,i=e.debounce,a=e.originalPdsInput;this.pdsInput=i===undefined?a!==null&&a!==void 0?a:t:debounceEvent(t,i)};e.prototype.valueChanged=function(){var e=this.nativeTextarea;var t=this.getValue();if(e&&e.value!==t){e.value=t}this.updateFormValue()};e.prototype.emitInputChange=function(e){var t=this.value;this.pdsInput.emit({value:t,event:e})};e.prototype.emitValueChange=function(e){var t=e.target;isRequired(t,this);var i=t.value;var a=i==null?i:i.toString();this.focusedValue=a;this.pdsTextareaChange.emit({value:a,event:e})};e.prototype.getValue=function(){return this.value||""};e.prototype.textareaClassNames=function(){var e=["pds-textarea__field"];if(this.invalid&&this.invalid===true){e.push("is-invalid")}return e.join(" ")};e.prototype.connectedCallback=function(){this.debounceChanged();if(this.el.attachInternals){this.internals=this.el.attachInternals()}};e.prototype.componentWillLoad=function(){this.inheritedAttributes=Object.assign(Object.assign({},inheritAriaAttributes(this.el)),inheritAttributes(this.el));this.hasAction=this.el.querySelector('[slot="action"]')!==null};e.prototype.componentDidLoad=function(){this.originalPdsInput=this.pdsInput;this.updateFormValue()};e.prototype.renderAction=function(){var e=this.el.querySelector('[slot="action"]')!==null;if(e){return h("div",{class:"pds-textarea__action",part:"action"},h("slot",{name:"action"}))}return null};e.prototype.updateFormValue=function(){if(this.internals&&this.internals.setFormValue){var e=this.getValue();this.internals.setFormValue(e||null);if(this.nativeTextarea&&this.internals&&this.internals.setValidity){this.internals.setValidity(this.nativeTextarea.validity,this.nativeTextarea.validationMessage,this.nativeTextarea)}}};e.prototype.formResetCallback=function(){this.value="";this.updateFormValue()};e.prototype.formDisabledCallback=function(e){this.disabled=e};e.prototype.formStateRestoreCallback=function(e){if(typeof e==="string"){this.value=e}else if(e instanceof FormData&&this.name){var t=e.get(this.name);if(typeof t==="string"){this.value=t}}};e.prototype.render=function(){var e=this;var t=this.getValue();return h(Host,{key:"c16e4a612ae46f9ab893294f513e1564e941ddec","aria-disabled":this.disabled?"true":null,"aria-readonly":this.readonly?"true":null,"has-action":this.hasAction?"true":null},h("div",{key:"d5acca80be2960ac20a3602c3e887e8d714062d7",class:"pds-textarea"},this.label&&h("div",{key:"49f3c081172f3d81f38e7ad49e4461b9d31772e7",class:"pds-textarea__label-wrapper"},h("label",{key:"105f191fb2db52c63d165fbda0e78e507f327c49",htmlFor:this.componentId},this.label),this.renderAction()),h("textarea",Object.assign({key:"5cbfbee17d058767f6d9d530dbee936ee8638f99",ref:function(t){return e.nativeTextarea=t},"aria-describedby":assignDescription(this.componentId,this.invalid,this.helperMessage),"aria-invalid":this.invalid?"true":undefined,autocomplete:this.autocomplete,class:this.textareaClassNames(),disabled:this.disabled,id:this.componentId,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},this.inheritedAttributes),t),this.helperMessage&&h("p",{key:"0cef5379519c3a1d26a86bb2142a58583d5619ad",class:"pds-textarea__helper-message",id:messageId(this.componentId,"helper")},this.helperMessage),this.invalid&&h("p",{key:"30a5fc1c6469dfa755db9a9bbb7b858b082700ac","aria-live":"assertive",class:"pds-textarea__error-message",id:messageId(this.componentId,"error")},h("pds-icon",{key:"51a725db0e4e522a584b673df174c7c97c8fe8e3",icon:danger,size:"small"}),this.errorMessage)))};Object.defineProperty(e,"formAssociated",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{debounce:["debounceChanged"],value:["valueChanged"]}},enumerable:false,configurable:true});return e}();PdsTextarea.style=labelCss+(pdsInputTokensCss+pdsTextareaCss);export{PdsTextarea as pds_textarea};
1
+ import{__awaiter,__generator}from"tslib";import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-BVCWKPy3.js";import{i as isRequired,a as assignDescription,m as messageId}from"./form-DTL_39D_.js";import{d as debounceEvent}from"./utils-tJa4KYNO.js";import{i as inheritAriaAttributes,a as inheritAttributes}from"./attributes-C0M1gTKv.js";import{f as danger}from"./index-DrJ5r5Pu.js";var labelCss=":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)}";var pdsInputTokensCss=":host{--pine-input-color-background-danger:var(--pine-color-red-050)}";var pdsTextareaCss=":host{display:inline}:host([aria-readonly=true]) textarea{background-color:var(--pine-color-background-container-disabled);color:var(--pine-color-text-readonly)}.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__field{background-color:var(--pine-color-background-container);border:var(--pine-border);border-radius:calc(var(--pine-dimension-xs) * 1.25);font:var(--pine-typography-body);letter-spacing:var(--pine-letter-spacing);padding:var(--pine-dimension-xs) var(--pine-dimension-sm)}.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)}.pds-textarea__field.is-invalid:focus-visible{outline-color:var(--pine-color-focus-ring-danger)}.pds-textarea__error-message,.pds-textarea__helper-message{color:var(--pine-color-text-message);font:var(--pine-typography-body-sm-medium);-webkit-margin-before:var(--pine-dimension-xs);margin-block-start:var(--pine-dimension-xs)}.pds-textarea__error-message{-ms-flex-align:center;align-items:center;color:var(--pine-color-text-message-danger);display:-ms-flexbox;display:flex;gap:var(--pine-dimension-2xs)}.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}";var PdsTextarea=function(){function e(e){var t=this;registerInstance(this,e);this.pdsBlur=createEvent(this,"pdsBlur");this.pdsFocus=createEvent(this,"pdsFocus");this.pdsInput=createEvent(this,"pdsInput");this.pdsTextareaChange=createEvent(this,"pdsTextareaChange");this.inheritedAttributes={};this.disabled=false;this.invalid=false;this.name=this.componentId;this.readonly=false;this.required=false;this.value="";this.hasFocus=false;this.hasAction=false;this.onBlur=function(e){t.hasFocus=false;if(t.focusedValue!==t.value){t.emitValueChange(e)}t.pdsBlur.emit(e)};this.onFocus=function(e){t.hasFocus=true;t.focusedValue=t.value;t.pdsFocus.emit(e)};this.onInput=function(e){var i=e.target;if(i){t.value=i.value||""}t.emitInputChange(e)};this.onTextareaChange=function(e){t.emitValueChange(e)}}e.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(this.nativeTextarea){this.nativeTextarea.focus()}return[2]}))}))};e.prototype.debounceChanged=function(){var e=this,t=e.pdsInput,i=e.debounce,a=e.originalPdsInput;this.pdsInput=i===undefined?a!==null&&a!==void 0?a:t:debounceEvent(t,i)};e.prototype.valueChanged=function(){var e=this.nativeTextarea;var t=this.getValue();if(e&&e.value!==t){e.value=t}this.updateFormValue()};e.prototype.emitInputChange=function(e){var t=this.value;this.pdsInput.emit({value:t,event:e})};e.prototype.emitValueChange=function(e){var t=e.target;isRequired(t,this);var i=t.value;var a=i==null?i:i.toString();this.focusedValue=a;this.pdsTextareaChange.emit({value:a,event:e})};e.prototype.getValue=function(){return this.value||""};e.prototype.textareaClassNames=function(){var e=["pds-textarea__field"];if(this.invalid&&this.invalid===true){e.push("is-invalid")}return e.join(" ")};e.prototype.connectedCallback=function(){this.debounceChanged();if(this.el.attachInternals){this.internals=this.el.attachInternals()}};e.prototype.componentWillLoad=function(){this.inheritedAttributes=Object.assign(Object.assign({},inheritAriaAttributes(this.el)),inheritAttributes(this.el));this.hasAction=this.el.querySelector('[slot="action"]')!==null};e.prototype.componentDidLoad=function(){this.originalPdsInput=this.pdsInput;this.updateFormValue()};e.prototype.renderAction=function(){var e=this.el.querySelector('[slot="action"]')!==null;if(e){return h("div",{class:"pds-textarea__action",part:"action"},h("slot",{name:"action"}))}return null};e.prototype.updateFormValue=function(){if(this.internals&&this.internals.setFormValue){var e=this.getValue();this.internals.setFormValue(e||null);if(this.nativeTextarea&&this.internals&&this.internals.setValidity){this.internals.setValidity(this.nativeTextarea.validity,this.nativeTextarea.validationMessage,this.nativeTextarea)}}};e.prototype.formResetCallback=function(){this.value="";this.updateFormValue()};e.prototype.formDisabledCallback=function(e){this.disabled=e};e.prototype.formStateRestoreCallback=function(e){if(typeof e==="string"){this.value=e}else if(e instanceof FormData&&this.name){var t=e.get(this.name);if(typeof t==="string"){this.value=t}}};e.prototype.render=function(){var e=this;var t=this.getValue();return h(Host,{key:"a1a70451b8987a1d152c5e440a672267b3ee325e","aria-disabled":this.disabled?"true":null,"aria-readonly":this.readonly?"true":null,"has-action":this.hasAction&&!this.hideLabel?"true":null},h("div",{key:"c28061e7848a58995c0883a99af04170bbdd2ba0",class:"pds-textarea"},this.label&&h("div",{key:"53bf7022550e51bc63decb0595c2e01c0bf7051c",class:"pds-textarea__label-wrapper"},h("label",{key:"ac1152cfb3f096a7861c6db9779f4bde3d117522",htmlFor:this.componentId},h("span",{key:"0d664943f7fd9490879d0a8349743d535103608c",class:this.hideLabel?"visually-hidden":""},this.label)),!this.hideLabel&&this.renderAction()),h("textarea",Object.assign({key:"a7374006831ab8f0cda0a9b3bf999abc7485a16d",ref:function(t){return e.nativeTextarea=t},"aria-describedby":assignDescription(this.componentId,this.invalid,this.helperMessage),"aria-invalid":this.invalid?"true":undefined,autocomplete:this.autocomplete,class:this.textareaClassNames(),disabled:this.disabled,id:this.componentId,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},this.inheritedAttributes),t),this.helperMessage&&h("p",{key:"4ca62e53a085acde9b8550c123ea1ee5a8723581",class:"pds-textarea__helper-message",id:messageId(this.componentId,"helper")},this.helperMessage),this.invalid&&h("p",{key:"f70e70f4588d0d9f1e7cc570bc5db1b6f6f27f0b","aria-live":"assertive",class:"pds-textarea__error-message",id:messageId(this.componentId,"error")},h("pds-icon",{key:"7a91bdea1bd0ac2a477b41d6eec3dc6369119ab0",icon:danger,size:"small"}),this.errorMessage)))};Object.defineProperty(e,"formAssociated",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{debounce:["debounceChanged"],value:["valueChanged"]}},enumerable:false,configurable:true});return e}();PdsTextarea.style=labelCss+(pdsInputTokensCss+pdsTextareaCss);export{PdsTextarea as pds_textarea};
2
2
  //# sourceMappingURL=pds-textarea.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pds-textarea.entry.js","sources":["src/global/styles/utils/label.scss?tag=pds-textarea&encapsulation=shadow","src/components/pds-input/pds-input.tokens.scss?tag=pds-textarea&encapsulation=shadow","src/components/pds-textarea/pds-textarea.scss?tag=pds-textarea&encapsulation=shadow","src/components/pds-textarea/pds-textarea.tsx"],"sourcesContent":[":host {\n display: inline-block;\n}\n\n:host([aria-disabled=\"true\"]) label {\n color: var(--pine-color-text-label-disabled);\n}\n\n:host([aria-readonly=\"true\"]) {\n label {\n color: var(--pine-color-text-label-readonly);\n }\n}\n\nlabel {\n color: var(--pine-color-text-label);\n font: var(--pine-typography-body-medium);\n letter-spacing: var(--pine-letter-spacing);\n}\n","@use '~@kajabi-ui/styles/dist/pine/components/pds-input/pds-input.tokens'\n",":host {\n display: inline;\n}\n\n:host([aria-readonly=\"true\"]) {\n textarea {\n background-color: var(--pine-color-background-container-disabled);\n color: var(--pine-color-text-readonly);\n }\n}\n\n.pds-textarea {\n display: flex;\n flex-direction: column;\n}\n\n.pds-textarea__label-wrapper {\n align-items: center;\n display: flex;\n justify-content: space-between;\n}\n\n.pds-textarea__action {\n align-items: center;\n display: flex;\n gap: var(--pine-dimension-xs);\n margin-inline-start: var(--pine-dimension-xs);\n}\n\nlabel {\n display: block;\n margin-block-end: var(--pine-dimension-xs);\n}\n\n// When label is inside wrapper, remove its margin\n.pds-textarea__label-wrapper label {\n margin-block-end: 0;\n}\n\n.pds-textarea__field {\n background-color: var(--pine-color-background-container);\n border: var(--pine-border);\n border-radius: calc(var(--pine-dimension-xs) * 1.25);\n font: var(--pine-typography-body);\n letter-spacing: var(--pine-letter-spacing);\n padding: var(--pine-dimension-xs) var(--pine-dimension-sm);\n\n &:hover:not(:disabled, .is-invalid) {\n border: var(--pine-border-hover);\n }\n\n &:disabled {\n background-color: var(--pine-color-background-container-disabled);\n color: var(--pine-color-text-disabled);\n cursor: not-allowed;\n }\n\n &:focus-visible {\n outline: var(--pine-outline-focus);\n outline-offset: var(--pine-border-width);\n }\n\n &::placeholder {\n color: var(--pine-color-text-placeholder);\n }\n\n &.is-invalid {\n background-color: var(--pine-input-color-background-danger);\n border-color: var(--pine-color-border-danger);\n\n &:focus-visible {\n outline-color: var(--pine-color-focus-ring-danger);\n }\n }\n}\n\n.pds-textarea__error-message,\n.pds-textarea__helper-message {\n color: var(--pine-color-text-message);\n font: var(--pine-typography-body-sm-medium);\n margin-block-start: var(--pine-dimension-xs);\n}\n\n.pds-textarea__error-message {\n align-items: center;\n color: var(--pine-color-text-message-danger);\n display: flex;\n gap: var(--pine-dimension-2xs);\n}\n","import { Component, Element, Event, EventEmitter, Host, h, Method, Prop, State, Watch } from '@stencil/core';\nimport { assignDescription, isRequired, messageId } from '../../utils/form';\nimport { TextareaChangeEventDetail, TextareaInputEventDetail } from './textarea-interface';\nimport { debounceEvent } from '@utils/utils';\nimport type { Attributes } from '@utils/attributes';\nimport { inheritAttributes, inheritAriaAttributes } from '@utils/attributes';\nimport { danger } from '@pine-ds/icons/icons';\n\n/**\n * @slot action - Content to be displayed in the label area, typically for help icons or links\n */\n@Component({\n tag: 'pds-textarea',\n styleUrls: [\n '../../global/styles/utils/label.scss',\n '../pds-input/pds-input.tokens.scss',\n 'pds-textarea.scss'\n ],\n shadow: true,\n formAssociated: true,\n})\nexport class PdsTextarea {\n\n private nativeTextarea?: HTMLTextAreaElement\n private focusedValue?: string | null;\n private inheritedAttributes: Attributes = {};\n private originalPdsInput?: EventEmitter<TextareaInputEventDetail>;\n private internals?: ElementInternals;\n\n @Element() el: HTMLPdsTextareaElement;\n\n /**\n * Emitted when the input loses focus.\n */\n @Event() pdsBlur!: EventEmitter<FocusEvent>;\n\n /**\n * Emitted when the input has focus.\n */\n @Event() pdsFocus!: EventEmitter<FocusEvent>;\n\n /**\n * Emitted when a keyboard input occurs.\n *\n * For elements that accept text input (`type=text`, `type=tel`, etc.), the interface\n * is [`InputEvent`](https://developer.mozilla.org/en-US/docs/Web/API/InputEvent); for others,\n * the interface is [`Event`](https://developer.mozilla.org/en-US/docs/Web/API/Event). If\n * the input is cleared on edit, the type is `null`.\n */\n @Event() pdsInput: EventEmitter<TextareaInputEventDetail>;\n\n /**\n * Event emitted whenever the value of the textarea changes.\n *\n * This event will not emit when programmatically setting the `value` property.\n */\n @Event() pdsTextareaChange: EventEmitter<TextareaChangeEventDetail>;\n\n /**\n * Sets focus on the native `textarea` in the `pds-texarea`. Use this method instead of the global\n * `textarea.focus()`.\n */\n @Method()\n async setFocus() {\n if (this.nativeTextarea) {\n this.nativeTextarea.focus();\n }\n }\n\n /**\n * Specifies if and how the browser provides `autocomplete` assistance for the field.\n */\n @Prop() autocomplete: string;\n\n /**\n * A unique identifier used for the underlying component `id` attribute.\n */\n @Prop() componentId!: string;\n\n /**\n * Determines whether or not the textarea is disabled.\n * @defaultValue false\n */\n @Prop() disabled = false;\n\n /**\n * The amount of time, in milliseconds, to wait to trigger the event after each keystroke.\n */\n @Prop() debounce?: number;\n\n /**\n * Displays an error message below the textarea field.\n */\n @Prop() errorMessage?: string;\n\n /**\n * Displays a message or hint below the textarea field.\n */\n @Prop() helperMessage?: string;\n\n /**\n * Determines whether or not the textarea is invalid or throws an error.\n * @defaultValue false\n */\n @Prop({mutable: true}) invalid = false; // eslint-disable-line @stencil-community/strict-mutable\n\n /**\n * Text to be displayed as the textarea label.\n */\n @Prop() label?: string;\n\n /**\n * Specifies the name. Submitted with the form name/value pair. This value will mirror the componentId.\n */\n @Prop() name: string = this.componentId;\n\n /**\n * Specifies a short hint that describes the expected value of the textarea.\n */\n @Prop() placeholder?: string;\n\n /**\n * Determines whether or not the textarea is readonly.\n * @defaultValue false\n */\n @Prop() readonly = false;\n\n /**\n * Determines whether or not the textarea is required.\n * @defaultValue false\n */\n @Prop() required = false;\n\n /**\n * Sets number of rows of text visible without needing to scroll in the textarea.\n */\n @Prop() rows?: number;\n\n /**\n * The value of the textarea.\n */\n @Prop({mutable: true}) value?: string | null = '';\n\n @State() hasFocus = false;\n\n /**\n * If true, the textarea has action content in the label area\n */\n @State() hasAction = false;\n\n @Watch('debounce')\n protected debounceChanged() {\n const { pdsInput, debounce, originalPdsInput } = this;\n\n this.pdsInput = debounce === undefined ? originalPdsInput ?? pdsInput : debounceEvent(pdsInput, debounce);\n }\n\n /**\n * Update the native input element when the value changes\n */\n @Watch('value')\n protected valueChanged() {\n const nativeTextarea = this.nativeTextarea;\n const value = this.getValue();\n\n if (nativeTextarea && nativeTextarea.value !== value) {\n nativeTextarea.value = value;\n }\n\n // Update form value for Form Associated Custom Elements API\n this.updateFormValue();\n }\n\n /**\n * Emits an `pdsInput` event.\n */\n private emitInputChange(event?: Event) {\n const { value } = this;\n this.pdsInput.emit({ value, event });\n }\n\n /**\n * Emits an `pdsTextareaChange` event.\n */\n private emitValueChange(event?: Event) {\n const textarea = event.target as HTMLTextAreaElement;\n isRequired(textarea, this);\n\n const { value } = textarea;\n\n // Checks for both null and undefined values\n const newValue = value == null ? value : value.toString();\n this.focusedValue = newValue;\n this.pdsTextareaChange.emit({ value: newValue, event });\n }\n\n private getValue(): string {\n return this.value || '';\n }\n\n private onBlur = (ev: FocusEvent) => {\n this.hasFocus = false;\n\n if (this.focusedValue !== this.value) {\n this.emitValueChange(ev);\n }\n\n this.pdsBlur.emit(ev);\n };\n\n private onFocus = (ev: FocusEvent) => {\n this.hasFocus = true;\n this.focusedValue = this.value;\n\n this.pdsFocus.emit(ev);\n };\n\n private onInput = (ev: Event) => {\n const input = ev.target as HTMLTextAreaElement | null;\n if (input) {\n this.value = input.value || '';\n }\n this.emitInputChange(ev);\n };\n\n private onTextareaChange = (ev: Event) => {\n this.emitValueChange(ev);\n };\n\n private textareaClassNames() {\n const classNames = ['pds-textarea__field'];\n\n if (this.invalid && this.invalid === true) {\n classNames.push('is-invalid');\n }\n\n return classNames.join(' ');\n }\n\n connectedCallback() {\n this.debounceChanged();\n // Initialize ElementInternals for form association\n if (this.el.attachInternals) {\n this.internals = this.el.attachInternals();\n }\n }\n\n componentWillLoad() {\n this.inheritedAttributes = {\n ...inheritAriaAttributes(this.el),\n ...inheritAttributes(this.el),\n };\n this.hasAction = this.el.querySelector('[slot=\"action\"]') !== null;\n }\n\n componentDidLoad() {\n this.originalPdsInput = this.pdsInput;\n // Set initial form value\n this.updateFormValue();\n }\n\n private renderAction() {\n const hasAction = this.el.querySelector('[slot=\"action\"]') !== null;\n if (hasAction) {\n return (\n <div class=\"pds-textarea__action\" part=\"action\">\n <slot name=\"action\"></slot>\n </div>\n );\n }\n return null;\n }\n\n /**\n * Updates the form value using ElementInternals API\n */\n private updateFormValue() {\n if (this.internals && this.internals.setFormValue) {\n const value = this.getValue();\n this.internals.setFormValue(value || null);\n\n // Set validity based on native textarea validation\n if (this.nativeTextarea && this.internals && this.internals.setValidity) {\n this.internals.setValidity(\n this.nativeTextarea.validity,\n this.nativeTextarea.validationMessage,\n this.nativeTextarea\n );\n }\n }\n }\n\n /**\n * Form Associated Custom Elements API: Called when the form is reset\n */\n formResetCallback() {\n this.value = '';\n this.updateFormValue();\n }\n\n /**\n * Form Associated Custom Elements API: Called when the form is disabled\n */\n formDisabledCallback(disabled: boolean) {\n this.disabled = disabled;\n }\n\n /**\n * Form Associated Custom Elements API: Called to restore form state\n */\n formStateRestoreCallback(state: string | FormData | null) {\n if (typeof state === 'string') {\n this.value = state;\n } else if (state instanceof FormData && this.name) {\n // Extract value from FormData using the textarea's name\n const value = state.get(this.name);\n if (typeof value === 'string') {\n this.value = value;\n }\n }\n }\n\n render() {\n const value = this.getValue();\n\n return (\n <Host\n aria-disabled={this.disabled ? 'true' : null}\n aria-readonly={this.readonly ? 'true' : null}\n has-action={this.hasAction ? 'true' : null}\n >\n <div class=\"pds-textarea\">\n {this.label &&\n <div class=\"pds-textarea__label-wrapper\">\n <label htmlFor={this.componentId}>{this.label}</label>\n {this.renderAction()}\n </div>\n }\n <textarea\n ref={(el) => this.nativeTextarea = el }\n aria-describedby={assignDescription(this.componentId, this.invalid, this.helperMessage)}\n aria-invalid={this.invalid ? \"true\" : undefined}\n autocomplete={this.autocomplete}\n class={this.textareaClassNames()}\n disabled={this.disabled}\n id={this.componentId}\n name={this.name}\n placeholder={this.placeholder}\n readOnly={this.readonly}\n required={this.required}\n rows={this.rows}\n onBlur={this.onBlur}\n onChange={this.onTextareaChange}\n onFocus={this.onFocus}\n onInput={this.onInput}\n {...this.inheritedAttributes}\n >\n {value}\n </textarea>\n {this.helperMessage &&\n <p\n class=\"pds-textarea__helper-message\"\n id={messageId(this.componentId, 'helper')}\n >\n {this.helperMessage}\n </p>\n }\n {this.invalid &&\n <p\n aria-live=\"assertive\"\n class=\"pds-textarea__error-message\"\n id={messageId(this.componentId, 'error')}\n >\n <pds-icon icon={danger} size=\"small\" />\n {this.errorMessage}\n </p>\n }\n </div>\n </Host>\n );\n }\n}\n"],"names":[],"mappings":";;;;;;AAAA,MAAM,QAAQ,GAAG,oTAAoT;;ACArU,MAAM,iBAAiB,GAAG,uEAAuE;;ACAjG,MAAM,cAAc,GAAG,q8EAAq8E;;MCqB/8E,WAAW,GAAA,MAAA;AAVxB,IAAA,WAAA,CAAA,OAAA,EAAA;;;;;;AAcU,QAAA,IAAmB,CAAA,mBAAA,GAAe,EAAE;AAsD5C;;;AAGG;AACK,QAAA,IAAQ,CAAA,QAAA,GAAG,KAAK;AAiBxB;;;AAGG;AACoB,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAAC;AAOvC;;AAEG;AACK,QAAA,IAAA,CAAA,IAAI,GAAW,IAAI,CAAC,WAAW;AAOvC;;;AAGG;AACK,QAAA,IAAQ,CAAA,QAAA,GAAG,KAAK;AAExB;;;AAGG;AACK,QAAA,IAAQ,CAAA,QAAA,GAAG,KAAK;AAOxB;;AAEG;AACoB,QAAA,IAAK,CAAA,KAAA,GAAmB,EAAE;A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,CAAA,CAAA,GAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAC,8BAA8B,EACpC,EAAE,EAAE,SAAS,CAAC,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC,IAExC,IAAI,CAAC,aAAa,CACjB,EAEL,IAAI,CAAC,OAAO;YACX,CAAA,CAAA,GAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,WAAA,EACY,WAAW,EACrB,KAAK,EAAC,6BAA6B,EACnC,EAAE,EAAE,SAAS,CAAC,IAAI,CAAC,WAAW,EAAE,OAAO,CAAC,EAAA,EAExC,CAAA,CAAA,UAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAU,IAAI,EAAE,MAAM,EAAE,IAAI,EAAC,OAAO,EAAG,CAAA,EACtC,IAAI,CAAC,YAAY,CAChB,CAEF,CACD;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"pds-textarea.entry.js","sources":["src/global/styles/utils/label.scss?tag=pds-textarea&encapsulation=shadow","src/components/pds-input/pds-input.tokens.scss?tag=pds-textarea&encapsulation=shadow","src/components/pds-textarea/pds-textarea.scss?tag=pds-textarea&encapsulation=shadow","src/components/pds-textarea/pds-textarea.tsx"],"sourcesContent":[":host {\n display: inline-block;\n}\n\n:host([aria-disabled=\"true\"]) label {\n color: var(--pine-color-text-label-disabled);\n}\n\n:host([aria-readonly=\"true\"]) {\n label {\n color: var(--pine-color-text-label-readonly);\n }\n}\n\nlabel {\n color: var(--pine-color-text-label);\n font: var(--pine-typography-body-medium);\n letter-spacing: var(--pine-letter-spacing);\n}\n","@use '~@kajabi-ui/styles/dist/pine/components/pds-input/pds-input.tokens'\n",":host {\n display: inline;\n}\n\n:host([aria-readonly=\"true\"]) {\n textarea {\n background-color: var(--pine-color-background-container-disabled);\n color: var(--pine-color-text-readonly);\n }\n}\n\n.pds-textarea {\n display: flex;\n flex-direction: column;\n}\n\n.pds-textarea__label-wrapper {\n align-items: center;\n display: flex;\n justify-content: space-between;\n}\n\n.pds-textarea__action {\n align-items: center;\n display: flex;\n gap: var(--pine-dimension-xs);\n margin-inline-start: var(--pine-dimension-xs);\n}\n\nlabel {\n display: block;\n margin-block-end: var(--pine-dimension-xs);\n}\n\n// When label is inside wrapper, remove its margin\n.pds-textarea__label-wrapper label {\n margin-block-end: 0;\n}\n\n.pds-textarea__field {\n background-color: var(--pine-color-background-container);\n border: var(--pine-border);\n border-radius: calc(var(--pine-dimension-xs) * 1.25);\n font: var(--pine-typography-body);\n letter-spacing: var(--pine-letter-spacing);\n padding: var(--pine-dimension-xs) var(--pine-dimension-sm);\n\n &:hover:not(:disabled, .is-invalid) {\n border: var(--pine-border-hover);\n }\n\n &:disabled {\n background-color: var(--pine-color-background-container-disabled);\n color: var(--pine-color-text-disabled);\n cursor: not-allowed;\n }\n\n &:focus-visible {\n outline: var(--pine-outline-focus);\n outline-offset: var(--pine-border-width);\n }\n\n &::placeholder {\n color: var(--pine-color-text-placeholder);\n }\n\n &.is-invalid {\n background-color: var(--pine-input-color-background-danger);\n border-color: var(--pine-color-border-danger);\n\n &:focus-visible {\n outline-color: var(--pine-color-focus-ring-danger);\n }\n }\n}\n\n.pds-textarea__error-message,\n.pds-textarea__helper-message {\n color: var(--pine-color-text-message);\n font: var(--pine-typography-body-sm-medium);\n margin-block-start: var(--pine-dimension-xs);\n}\n\n.pds-textarea__error-message {\n align-items: center;\n color: var(--pine-color-text-message-danger);\n display: flex;\n gap: var(--pine-dimension-2xs);\n}\n\n.visually-hidden {\n border: 0;\n clip: rect(0 0 0 0);\n clip-path: polygon(0 0, 0 0, 0 0);\n height: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n}\n","import { Component, Element, Event, EventEmitter, Host, h, Method, Prop, State, Watch } from '@stencil/core';\nimport { assignDescription, isRequired, messageId } from '../../utils/form';\nimport { TextareaChangeEventDetail, TextareaInputEventDetail } from './textarea-interface';\nimport { debounceEvent } from '@utils/utils';\nimport type { Attributes } from '@utils/attributes';\nimport { inheritAttributes, inheritAriaAttributes } from '@utils/attributes';\nimport { danger } from '@pine-ds/icons/icons';\n\n/**\n * @slot action - Content to be displayed in the label area, typically for help icons or links\n */\n@Component({\n tag: 'pds-textarea',\n styleUrls: [\n '../../global/styles/utils/label.scss',\n '../pds-input/pds-input.tokens.scss',\n 'pds-textarea.scss'\n ],\n shadow: true,\n formAssociated: true,\n})\nexport class PdsTextarea {\n\n private nativeTextarea?: HTMLTextAreaElement\n private focusedValue?: string | null;\n private inheritedAttributes: Attributes = {};\n private originalPdsInput?: EventEmitter<TextareaInputEventDetail>;\n private internals?: ElementInternals;\n\n @Element() el: HTMLPdsTextareaElement;\n\n /**\n * Emitted when the input loses focus.\n */\n @Event() pdsBlur!: EventEmitter<FocusEvent>;\n\n /**\n * Emitted when the input has focus.\n */\n @Event() pdsFocus!: EventEmitter<FocusEvent>;\n\n /**\n * Emitted when a keyboard input occurs.\n *\n * For elements that accept text input (`type=text`, `type=tel`, etc.), the interface\n * is [`InputEvent`](https://developer.mozilla.org/en-US/docs/Web/API/InputEvent); for others,\n * the interface is [`Event`](https://developer.mozilla.org/en-US/docs/Web/API/Event). If\n * the input is cleared on edit, the type is `null`.\n */\n @Event() pdsInput: EventEmitter<TextareaInputEventDetail>;\n\n /**\n * Event emitted whenever the value of the textarea changes.\n *\n * This event will not emit when programmatically setting the `value` property.\n */\n @Event() pdsTextareaChange: EventEmitter<TextareaChangeEventDetail>;\n\n /**\n * Sets focus on the native `textarea` in the `pds-textarea`. Use this method instead of the global\n * `textarea.focus()`.\n */\n @Method()\n async setFocus() {\n if (this.nativeTextarea) {\n this.nativeTextarea.focus();\n }\n }\n\n /**\n * Specifies if and how the browser provides `autocomplete` assistance for the field.\n */\n @Prop() autocomplete: string;\n\n /**\n * A unique identifier used for the underlying component `id` attribute.\n */\n @Prop() componentId!: string;\n\n /**\n * Determines whether or not the textarea is disabled.\n * @defaultValue false\n */\n @Prop() disabled = false;\n\n /**\n * The amount of time, in milliseconds, to wait to trigger the event after each keystroke.\n */\n @Prop() debounce?: number;\n\n /**\n * Displays an error message below the textarea field.\n */\n @Prop() errorMessage?: string;\n\n /**\n * Displays a message or hint below the textarea field.\n */\n @Prop() helperMessage?: string;\n\n /**\n * Determines whether or not the textarea is invalid or throws an error.\n * @defaultValue false\n */\n @Prop({mutable: true}) invalid = false; // eslint-disable-line @stencil-community/strict-mutable\n\n /**\n * Text to be displayed as the textarea label.\n */\n @Prop() label?: string;\n\n /**\n * Visually hides the label text for instances where only the textarea should be displayed. Label remains accessible to assistive technology such as screen readers.\n * Note: When true, the action slot is also hidden to maintain a minimal UI.\n */\n @Prop() hideLabel: boolean;\n\n /**\n * Specifies the name. Submitted with the form name/value pair. This value will mirror the componentId.\n */\n @Prop() name: string = this.componentId;\n\n /**\n * Specifies a short hint that describes the expected value of the textarea.\n */\n @Prop() placeholder?: string;\n\n /**\n * Determines whether or not the textarea is readonly.\n * @defaultValue false\n */\n @Prop() readonly = false;\n\n /**\n * Determines whether or not the textarea is required.\n * @defaultValue false\n */\n @Prop() required = false;\n\n /**\n * Sets number of rows of text visible without needing to scroll in the textarea.\n */\n @Prop() rows?: number;\n\n /**\n * The value of the textarea.\n */\n @Prop({mutable: true}) value?: string | null = '';\n\n @State() hasFocus = false;\n\n /**\n * If true, the textarea has action content in the label area\n */\n @State() hasAction = false;\n\n @Watch('debounce')\n protected debounceChanged() {\n const { pdsInput, debounce, originalPdsInput } = this;\n\n this.pdsInput = debounce === undefined ? originalPdsInput ?? pdsInput : debounceEvent(pdsInput, debounce);\n }\n\n /**\n * Update the native input element when the value changes\n */\n @Watch('value')\n protected valueChanged() {\n const nativeTextarea = this.nativeTextarea;\n const value = this.getValue();\n\n if (nativeTextarea && nativeTextarea.value !== value) {\n nativeTextarea.value = value;\n }\n\n // Update form value for Form Associated Custom Elements API\n this.updateFormValue();\n }\n\n /**\n * Emits an `pdsInput` event.\n */\n private emitInputChange(event?: Event) {\n const { value } = this;\n this.pdsInput.emit({ value, event });\n }\n\n /**\n * Emits an `pdsTextareaChange` event.\n */\n private emitValueChange(event?: Event) {\n const textarea = event.target as HTMLTextAreaElement;\n isRequired(textarea, this);\n\n const { value } = textarea;\n\n // Checks for both null and undefined values\n const newValue = value == null ? value : value.toString();\n this.focusedValue = newValue;\n this.pdsTextareaChange.emit({ value: newValue, event });\n }\n\n private getValue(): string {\n return this.value || '';\n }\n\n private onBlur = (ev: FocusEvent) => {\n this.hasFocus = false;\n\n if (this.focusedValue !== this.value) {\n this.emitValueChange(ev);\n }\n\n this.pdsBlur.emit(ev);\n };\n\n private onFocus = (ev: FocusEvent) => {\n this.hasFocus = true;\n this.focusedValue = this.value;\n\n this.pdsFocus.emit(ev);\n };\n\n private onInput = (ev: Event) => {\n const input = ev.target as HTMLTextAreaElement | null;\n if (input) {\n this.value = input.value || '';\n }\n this.emitInputChange(ev);\n };\n\n private onTextareaChange = (ev: Event) => {\n this.emitValueChange(ev);\n };\n\n private textareaClassNames() {\n const classNames = ['pds-textarea__field'];\n\n if (this.invalid && this.invalid === true) {\n classNames.push('is-invalid');\n }\n\n return classNames.join(' ');\n }\n\n connectedCallback() {\n this.debounceChanged();\n // Initialize ElementInternals for form association\n if (this.el.attachInternals) {\n this.internals = this.el.attachInternals();\n }\n }\n\n componentWillLoad() {\n this.inheritedAttributes = {\n ...inheritAriaAttributes(this.el),\n ...inheritAttributes(this.el),\n };\n this.hasAction = this.el.querySelector('[slot=\"action\"]') !== null;\n }\n\n componentDidLoad() {\n this.originalPdsInput = this.pdsInput;\n // Set initial form value\n this.updateFormValue();\n }\n\n private renderAction() {\n const hasAction = this.el.querySelector('[slot=\"action\"]') !== null;\n if (hasAction) {\n return (\n <div class=\"pds-textarea__action\" part=\"action\">\n <slot name=\"action\"></slot>\n </div>\n );\n }\n return null;\n }\n\n /**\n * Updates the form value using ElementInternals API\n */\n private updateFormValue() {\n if (this.internals && this.internals.setFormValue) {\n const value = this.getValue();\n this.internals.setFormValue(value || null);\n\n // Set validity based on native textarea validation\n if (this.nativeTextarea && this.internals && this.internals.setValidity) {\n this.internals.setValidity(\n this.nativeTextarea.validity,\n this.nativeTextarea.validationMessage,\n this.nativeTextarea\n );\n }\n }\n }\n\n /**\n * Form Associated Custom Elements API: Called when the form is reset\n */\n formResetCallback() {\n this.value = '';\n this.updateFormValue();\n }\n\n /**\n * Form Associated Custom Elements API: Called when the form is disabled\n */\n formDisabledCallback(disabled: boolean) {\n this.disabled = disabled;\n }\n\n /**\n * Form Associated Custom Elements API: Called to restore form state\n */\n formStateRestoreCallback(state: string | FormData | null) {\n if (typeof state === 'string') {\n this.value = state;\n } else if (state instanceof FormData && this.name) {\n // Extract value from FormData using the textarea's name\n const value = state.get(this.name);\n if (typeof value === 'string') {\n this.value = value;\n }\n }\n }\n\n render() {\n const value = this.getValue();\n\n return (\n <Host\n aria-disabled={this.disabled ? 'true' : null}\n aria-readonly={this.readonly ? 'true' : null}\n has-action={this.hasAction && !this.hideLabel ? 'true' : null}\n >\n <div class=\"pds-textarea\">\n {this.label &&\n <div class=\"pds-textarea__label-wrapper\">\n <label htmlFor={this.componentId}>\n <span class={this.hideLabel ? 'visually-hidden' : ''}>\n {this.label}\n </span>\n </label>\n {!this.hideLabel && this.renderAction()}\n </div>\n }\n <textarea\n ref={(el) => this.nativeTextarea = el }\n aria-describedby={assignDescription(this.componentId, this.invalid, this.helperMessage)}\n aria-invalid={this.invalid ? \"true\" : undefined}\n autocomplete={this.autocomplete}\n class={this.textareaClassNames()}\n disabled={this.disabled}\n id={this.componentId}\n name={this.name}\n placeholder={this.placeholder}\n readOnly={this.readonly}\n required={this.required}\n rows={this.rows}\n onBlur={this.onBlur}\n onChange={this.onTextareaChange}\n onFocus={this.onFocus}\n onInput={this.onInput}\n {...this.inheritedAttributes}\n >\n {value}\n </textarea>\n {this.helperMessage &&\n <p\n class=\"pds-textarea__helper-message\"\n id={messageId(this.componentId, 'helper')}\n >\n {this.helperMessage}\n </p>\n }\n {this.invalid &&\n <p\n aria-live=\"assertive\"\n class=\"pds-textarea__error-message\"\n id={messageId(this.componentId, 'error')}\n >\n <pds-icon icon={danger} size=\"small\" />\n {this.errorMessage}\n </p>\n }\n </div>\n </Host>\n );\n }\n}\n"],"names":[],"mappings":";;;;;;AAAA,MAAM,QAAQ,GAAG,oTAAoT;;ACArU,MAAM,iBAAiB,GAAG,uEAAuE;;ACAjG,MAAM,cAAc,GAAG,4pFAA4pF;;MCqBtqF,WAAW,GAAA,MAAA;AAVxB,IAAA,WAAA,CAAA,OAAA,EAAA;;;;;;AAcU,QAAA,IAAmB,CAAA,mBAAA,GAAe,EAAE;AAsD5C;;;AAGG;AACK,QAAA,IAAQ,CAAA,QAAA,GAAG,KAAK;AAiBxB;;;AAGG;AACoB,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAAC;AAavC;;AAEG;AACK,QAAA,IAAA,CAAA,IAAI,GAAW,IAAI,CAAC,WAAW;AAOvC;;;AAGG;AACK,QAAA,IAAQ,CAAA,QAAA,GAAG,KAAK;AAExB;;;AAGG;AACK,QAAA,IAAQ,CAAA,QAAA,GAAG,KAAK;AAOxB;;AAEG;AACoB,QAAA,IAAK,CAAA,KAAA,GAAmB,EAAE;AAExC,QAAA,IAAQ,CAAA,QAAA,GAAG,KAAK;AAEzB;;AAEG;AACM,QAAA,IAAS,CAAA,SAAA,GAAG,KAAK;AAoDlB,QAAA,IAAA,CAAA,MAAM,GAAG,CAAC,EAAc,KAAI;AAClC,YAAA,IAAI,CAAC,QAAQ,GAAG,KAAK;YAErB,IAAI,IAAI,CAAC,YAAY,KAAK,IAAI,CAAC,KAAK,EAAE;AACpC,gBAAA,IAAI,CAAC,eAAe,CAAC,EAAE,CAAC;;AAG1B,YAAA,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;AACvB,SAAC;AAEO,QAAA,IAAA,CAAA,OAAO,GAAG,CAAC,EAAc,KAAI;AACnC,YAAA,IAAI,CAAC,QAAQ,GAAG,IAAI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,CAAC,EAAA,EAExC,CAAA,CAAA,UAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAU,IAAI,EAAE,MAAM,EAAE,IAAI,EAAC,OAAO,EAAG,CAAA,EACtC,IAAI,CAAC,YAAY,CAChB,CAEF,CACD;;;;;;;;;;;;;"}
@@ -1,2 +1,2 @@
1
- import{__awaiter,__generator}from"tslib";import{r as registerInstance,h,H as Host,g as getElement}from"./index-BVCWKPy3.js";var positionTooltip=function(t){var i=t.elem,o=t.elemPlacement,r=t.overlay,e=t.offset,a=e===void 0?8:e;if(i===null||r===null)return false;if(typeof o!=="string"||o.trim()===""){return false}var s=i.getBoundingClientRect();var n=r.getBoundingClientRect();r.style.top="";r.style.left="";r.style.right="";r.style.bottom="";r.style.transform="";r.style.position="fixed";var l=false;if(i.childNodes.length===1&&i.childNodes[0].nodeType===Node.TEXT_NODE){l=true}else if(i.childNodes.length===1&&i.childNodes[0].nodeType===Node.ELEMENT_NODE){var p=i.childNodes[0];if(p.tagName==="SPAN"&&p.childNodes.length===1&&p.childNodes[0].nodeType===Node.TEXT_NODE){l=true}}switch(true){case o.includes("right"):if(l){r.style.top="".concat(s.bottom-n.height/2,"px")}else{r.style.top="".concat(s.top+s.height/2-n.height/2,"px")}r.style.left="".concat(s.right+a,"px");if(o.includes("start")){r.style.top="".concat(s.top,"px")}if(o.includes("end")){r.style.top="".concat(s.bottom-n.height,"px")}break;case o.includes("left"):if(l){r.style.top="".concat(s.bottom-n.height/2,"px")}else{r.style.top="".concat(s.top+s.height/2-n.height/2,"px")}r.style.left="".concat(s.left-n.width-a,"px");if(o.includes("start")){r.style.top="".concat(s.top,"px")}if(o.includes("end")){r.style.top="".concat(s.bottom-n.height,"px")}break;case o.includes("bottom"):r.style.top="".concat(s.bottom+a,"px");r.style.left="".concat(s.left+s.width/2-n.width/2,"px");if(o.includes("start")){r.style.left="".concat(s.left,"px")}if(o.includes("end")){r.style.left="".concat(s.right-n.width,"px");r.style.right="initial"}break;case o.includes("top"):r.style.top="".concat(s.top-n.height-a,"px");r.style.left="".concat(s.left+s.width/2-n.width/2,"px");if(o.includes("start")){r.style.left="".concat(s.left,"px")}if(o.includes("end")){r.style.left="".concat(s.right-n.width,"px");r.style.right="initial"}break}return true};var pdsTooltipCss='.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:absolute;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:1}.pds-tooltip.pds-tooltip--has-html-content .pds-tooltip__content{width:auto}.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}';var PdsTooltip=function(){function t(t){var i=this;registerInstance(this,t);this._isInteractiveOpen=false;this.portalEl=null;this.triggerEl=null;this.contentDiv=null;this.slotMutationObserver=null;this.overlayResizeObserver=null;this.currentPathname="";this.pathnameCheckInterval=null;this.isOpen=false;this.hasArrow=true;this.htmlContent=false;this.placement="right";this.maxWidth="352px";this.opened=false;this.handleHide=function(){if(i.opened&&!i._isInteractiveOpen){return}i.hideTooltip();i._isInteractiveOpen=false};this.handleShow=function(){if(i.opened&&!i._isInteractiveOpen){return}i._isInteractiveOpen=true;i.showTooltip()};this.handlePageShow=function(){if(i.opened&&!i._isInteractiveOpen){return}i.opened=false;i._isInteractiveOpen=false};this.handleScroll=function(){if(i.opened){if(!i._isInteractiveOpen){i.repositionPortal()}else{i.hideTooltip();i._isInteractiveOpen=false}}};this.handleSpaNavigation=function(){if(i.opened&&!i._isInteractiveOpen){return}i.hideTooltip();i._isInteractiveOpen=false};this.checkPathnameChange=function(){if(window.location.pathname!==i.currentPathname){i.currentPathname=window.location.pathname;i.handleSpaNavigation()}}}t.prototype.handleOpenToggle=function(t,i){if(t===false&&i===true){this._isInteractiveOpen=false}};t.prototype.componentWillLoad=function(){this._isInteractiveOpen=false};t.prototype.componentDidLoad=function(){var t=this;window.addEventListener("pageshow",this.handlePageShow);this.currentPathname=window.location.pathname;this.triggerEl=this.el.querySelector(".pds-tooltip__trigger");var i=this.el.querySelector(".pds-tooltip__content-slot-wrapper");if(i!==null){this.slotMutationObserver=new MutationObserver((function(){if(t.opened&&t.portalEl!==null){t.removePortal();t.createPortal()}}));this.slotMutationObserver.observe(i,{childList:true,subtree:false})}return function(){window.removeEventListener("pageshow",t.handlePageShow);if(t.slotMutationObserver!==null){t.slotMutationObserver.disconnect()}}};t.prototype.componentDidRender=function(){if(this.opened&&this.portalEl===null){this.createPortal()}else if(!this.opened&&this.portalEl!==null){this.removePortal()}};t.prototype.showTooltip=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.opened=true;return[2]}))}))};t.prototype.hideTooltip=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.opened=false;return[2]}))}))};t.prototype.determinePositioningAnchor=function(){var t=this.triggerEl;if(this.triggerEl!==null){var i=this.triggerEl.childNodes;for(var o=0;o<i.length;o++){var r=i[o];if(r.nodeType===Node.ELEMENT_NODE){t=r;break}}}return t};t.prototype.repositionPortal=function(){var t=this.determinePositioningAnchor();if(t!==null&&this.contentDiv!==null){positionTooltip({elem:t,elemPlacement:this.placement,overlay:this.contentDiv});var i=this.placement.split("-");var o=i[0];var r=i.length===1;if(r){var e=t.getBoundingClientRect();var a=this.contentDiv.getBoundingClientRect();if(o==="left"||o==="right"){var s=parseFloat(this.contentDiv.style.top||"0");var n=e.top+e.height/2;var l=a.top+a.height/2;var p=n-l;if(Math.abs(p)>.5){this.contentDiv.style.top="".concat(s+p,"px")}}else if(o==="top"||o==="bottom"){var d=parseFloat(this.contentDiv.style.left||"0");var h=e.left+e.width/2;var f=a.left+a.width/2;var c=h-f;if(Math.abs(c)>.5){this.contentDiv.style.left="".concat(d+c,"px")}}}}};t.prototype.createPortal=function(){var t=this;if(this.portalEl!==null)return;this.portalEl=document.createElement("div");this.portalEl.className="pds-tooltip pds-tooltip--".concat(this.placement," ").concat(this.htmlContent?"pds-tooltip--has-html-content":""," ").concat(this.opened?"pds-tooltip--is-open":""," ").concat(this.hasArrow?"":"pds-tooltip--no-arrow");this.portalEl.style.position="fixed";this.portalEl.style.zIndex="9999";if(this.portalEl.id===""){this.portalEl.id=this.componentId||this.el.id||"pds-tooltip-portal-".concat(PdsTooltip.instanceCounter++)}if(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");this.contentDiv.setAttribute("role","tooltip");this.contentDiv.style.maxWidth=this.maxWidth;var i=this.el.querySelector(".pds-tooltip__content-slot-wrapper");var o=i===null||i===void 0?void 0:i.querySelector('[slot="content"]');var r=false;if(o!==null){var e=Array.from(o.childNodes);if(e.length>0){var a=e.some((function(t){var i;return t.nodeType===Node.ELEMENT_NODE||t.nodeType===Node.TEXT_NODE&&((i=t.textContent)===null||i===void 0?void 0:i.trim())!==""}));if(a){r=true;e.forEach((function(i){var o;if(i.nodeType===Node.ELEMENT_NODE||i.nodeType===Node.TEXT_NODE&&((o=i.textContent)===null||o===void 0?void 0:o.trim())!==""){t.contentDiv.appendChild(i.cloneNode(true))}}))}}}if(!r){if(this.content!==""){this.contentDiv.textContent=this.content}}this.portalEl.appendChild(this.contentDiv);document.body.appendChild(this.portalEl);this.repositionPortal();if(this.contentDiv!==null){this.overlayResizeObserver=new ResizeObserver((function(){t.repositionPortal()}));this.overlayResizeObserver.observe(this.contentDiv)}window.addEventListener("scroll",this.handleScroll,true);window.addEventListener("popstate",this.handleSpaNavigation,true);window.addEventListener("hashchange",this.handleSpaNavigation,true);this.pathnameCheckInterval=setInterval(this.checkPathnameChange,100);if(this.triggerEl!==null&&this.portalEl.id!==""){this.triggerEl.setAttribute("aria-describedby",this.portalEl.id)}};t.prototype.removePortal=function(){if(this.overlayResizeObserver!==null&&this.contentDiv!==null){this.overlayResizeObserver.unobserve(this.contentDiv);this.overlayResizeObserver=null}if(this.pathnameCheckInterval!==null){clearInterval(this.pathnameCheckInterval);this.pathnameCheckInterval=null}if(this.portalEl!==null){window.removeEventListener("scroll",this.handleScroll,true);window.removeEventListener("popstate",this.handleSpaNavigation,true);window.removeEventListener("hashchange",this.handleSpaNavigation,true);document.body.removeChild(this.portalEl);this.portalEl=null}if(this.triggerEl!==null){this.triggerEl.removeAttribute("aria-describedby")}this.contentDiv=null};t.prototype.render=function(){var t=this;var i=this.componentId||undefined;return h(Host,{key:"d0651080fc68d70a01d8c487d08a59f356f06e88",id:i,class:{"pds-tooltip--is-open":this.opened}},h("span",{key:"9f8c246c63a80c0d30c73687faa133b213c6bb63",class:"pds-tooltip__trigger",onMouseEnter:this.handleShow,onMouseLeave:this.handleHide,onFocus:this.handleShow,onBlur:this.handleHide,ref:function(i){return t.triggerEl=i}},h("slot",{key:"2295b22ac9ec244f31410cd6a3764248100a1c48"})),h("div",{key:"7c8a59703b7c6ff43b0aa9352a869d59bca9b2b1",class:"pds-tooltip__content-slot-wrapper",style:{display:"none"}},h("slot",{key:"612dab7daf61394624177c45d47f542d551af52c",name:"content"})))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{opened:["handleOpenToggle"]}},enumerable:false,configurable:true});return t}();PdsTooltip.instanceCounter=0;PdsTooltip.style=pdsTooltipCss;export{PdsTooltip as pds_tooltip};
1
+ import{__awaiter,__generator}from"tslib";import{r as registerInstance,h,H as Host,g as getElement}from"./index-BVCWKPy3.js";import{c as computePosition,a as autoUpdate,o as offset,f as flip,s as shift}from"./floating-ui.dom-DbQzNDdQ.js";var pdsTooltipCss='.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);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:1}.pds-tooltip.pds-tooltip--has-html-content .pds-tooltip__content{width:auto}.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}';var PdsTooltip=function(){function t(t){var i=this;registerInstance(this,t);this._isInteractiveOpen=false;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=true;this.htmlContent=false;this.placement="right";this.maxWidth="352px";this.opened=false;this.handleHide=function(){if(i.opened&&!i._isInteractiveOpen){return}i.hideTooltip();i._isInteractiveOpen=false};this.handleShow=function(){if(i.opened&&!i._isInteractiveOpen){return}i._isInteractiveOpen=true;i.showTooltip()};this.handlePageShow=function(){if(i.opened&&!i._isInteractiveOpen){return}i.opened=false;i._isInteractiveOpen=false};this.handleSpaNavigation=function(){if(i.opened&&!i._isInteractiveOpen){return}i.hideTooltip();i._isInteractiveOpen=false};this.checkPathnameChange=function(){if(window.location.pathname!==i.currentPathname){i.currentPathname=window.location.pathname;i.handleSpaNavigation()}}}t.prototype.handleOpenToggle=function(t,i){if(t===false&&i===true){this._isInteractiveOpen=false}};t.prototype.componentWillLoad=function(){this._isInteractiveOpen=false;this.resolvedPlacement=this.placement};t.prototype.componentDidLoad=function(){var t=this;window.addEventListener("pageshow",this.handlePageShow);this.currentPathname=window.location.pathname;this.triggerEl=this.el.querySelector(".pds-tooltip__trigger");var i=this.el.querySelector(".pds-tooltip__content-slot-wrapper");if(i!==null){this.slotMutationObserver=new MutationObserver((function(){if(t.opened&&t.portalEl!==null){t.removePortal();t.createPortal()}}));this.slotMutationObserver.observe(i,{childList:true,subtree:false})}};t.prototype.disconnectedCallback=function(){window.removeEventListener("pageshow",this.handlePageShow);if(this.slotMutationObserver!==null){this.slotMutationObserver.disconnect();this.slotMutationObserver=null}if(this.portalEl!==null){this.removePortal()}if(this.pathnameCheckInterval!==null){clearInterval(this.pathnameCheckInterval);this.pathnameCheckInterval=null}if(this.stopAutoUpdate!==null){this.stopAutoUpdate();this.stopAutoUpdate=null}};t.prototype.componentDidRender=function(){if(this.opened&&this.portalEl===null){this.createPortal()}else if(!this.opened&&this.portalEl!==null){this.removePortal()}if(this.portalEl!==null){this.portalEl.className="pds-tooltip pds-tooltip--".concat(this.resolvedPlacement," ").concat(this.htmlContent?"pds-tooltip--has-html-content":""," ").concat(this.opened?"pds-tooltip--is-open":""," ").concat(this.hasArrow?"":"pds-tooltip--no-arrow");this.portalEl.setAttribute("aria-hidden",this.opened?"false":"true");this.portalEl.setAttribute("aria-live",this.opened?"polite":"off")}};t.prototype.showTooltip=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.opened=true;return[2]}))}))};t.prototype.hideTooltip=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.opened=false;return[2]}))}))};t.prototype.determinePositioningAnchor=function(){var t=this.triggerEl;if(this.triggerEl!==null){var i=this.triggerEl.childNodes;for(var o=0;o<i.length;o++){var r=i[o];if(r.nodeType===Node.ELEMENT_NODE){t=r;break}}}return t};t.prototype.repositionPortal=function(){return __awaiter(this,void 0,void 0,(function(){var t,i,o,r,s,e,n;return __generator(this,(function(a){switch(a.label){case 0:t=this.determinePositioningAnchor();if(!(t!==null&&this.portalEl!==null))return[3,4];a.label=1;case 1:a.trys.push([1,3,,4]);return[4,computePosition(t,this.portalEl,{placement:this.placement,strategy:"fixed",middleware:[offset(8),flip(),shift({padding:5})]})];case 2:i=a.sent(),o=i.x,r=i.y,s=i.placement;this.resolvedPlacement=s;Object.assign(this.portalEl.style,{left:"".concat(o,"px"),top:"".concat(r,"px"),position:"fixed"});this.portalEl.className="pds-tooltip pds-tooltip--".concat(this.resolvedPlacement," ").concat(this.htmlContent?"pds-tooltip--has-html-content":""," ").concat(this.opened?"pds-tooltip--is-open":""," ").concat(this.hasArrow?"":"pds-tooltip--no-arrow");return[3,4];case 3:e=a.sent();console.warn("Failed to position tooltip:",e);this.resolvedPlacement=this.placement;n=t.getBoundingClientRect();this.portalEl.style.left="".concat(n.right+8,"px");this.portalEl.style.top="".concat(n.top,"px");this.portalEl.style.position="fixed";return[3,4];case 4:return[2]}}))}))};t.prototype.createPortal=function(){var t=this;if(this.portalEl!==null)return;this.portalEl=document.createElement("div");this.portalEl.className="pds-tooltip pds-tooltip--".concat(this.resolvedPlacement," ").concat(this.htmlContent?"pds-tooltip--has-html-content":""," ").concat(this.opened?"pds-tooltip--is-open":""," ").concat(this.hasArrow?"":"pds-tooltip--no-arrow");this.portalEl.style.position="fixed";this.portalEl.style.zIndex="9999";if(this.portalEl.id===""){var i=PdsTooltip.instanceCounter++;var o=this.componentId||this.el.id||"pds-tooltip";this.portalEl.id="".concat(o,"-portal-").concat(i)}if(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");var r=this.el.querySelector(".pds-tooltip__content-slot-wrapper");var s=r===null||r===void 0?void 0:r.querySelector('[slot="content"]');var e=false;if(s!==null){var n=Array.from(s.childNodes);if(n.length>0){var a=n.some((function(t){var i;return t.nodeType===Node.ELEMENT_NODE||t.nodeType===Node.TEXT_NODE&&((i=t.textContent)===null||i===void 0?void 0:i.trim())!==""}));if(a){e=true;n.forEach((function(i){var o;if(i.nodeType===Node.ELEMENT_NODE||i.nodeType===Node.TEXT_NODE&&((o=i.textContent)===null||o===void 0?void 0:o.trim())!==""){t.contentDiv.appendChild(i.cloneNode(true))}}))}}}if(!e&&typeof this.content==="string"&&this.content.trim()!==""){this.contentDiv.textContent=this.content}this.portalEl.appendChild(this.contentDiv);document.body.appendChild(this.portalEl);this.repositionPortal().catch((function(t){console.warn("Failed to position tooltip on creation:",t)}));if(this.triggerEl&&this.portalEl){this.stopAutoUpdate=autoUpdate(this.triggerEl,this.portalEl,(function(){t.repositionPortal().catch((function(t){console.warn("Failed to reposition tooltip on auto update:",t)}))}))}window.addEventListener("popstate",this.handleSpaNavigation,true);window.addEventListener("hashchange",this.handleSpaNavigation,true);this.pathnameCheckInterval=setInterval(this.checkPathnameChange,100);if(this.triggerEl!==null&&this.portalEl.id!==""){this.triggerEl.setAttribute("aria-describedby",this.portalEl.id)}};t.prototype.removePortal=function(){if(this.stopAutoUpdate!==null){this.stopAutoUpdate();this.stopAutoUpdate=null}if(this.pathnameCheckInterval!==null){clearInterval(this.pathnameCheckInterval);this.pathnameCheckInterval=null}if(this.portalEl!==null){window.removeEventListener("popstate",this.handleSpaNavigation,true);window.removeEventListener("hashchange",this.handleSpaNavigation,true);try{if(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}if(this.triggerEl!==null){this.triggerEl.removeAttribute("aria-describedby")}this.contentDiv=null};t.prototype.render=function(){var t=this;var i=this.componentId||undefined;return h(Host,{key:"71fb8114cbf8db309eba0c19c0d9bd491d250157",id:i,class:{"pds-tooltip--is-open":this.opened}},h("span",{key:"9df511e60bc96c462a80f6bf6431f695e2effa3c",class:"pds-tooltip__trigger",onMouseEnter:this.handleShow,onMouseLeave:this.handleHide,onFocusin:this.handleShow,onFocusout:this.handleHide,ref:function(i){return t.triggerEl=i}},h("slot",{key:"eae36227df5fd93edf1af61e58b6369c0162944f"})),h("div",{key:"4c3a3f86d7e24aeff9299a9ef19396e078421467",class:"pds-tooltip__content-slot-wrapper",hidden:true},h("slot",{key:"babfdd5793e8007015dab364985c1451d976383f",name:"content"})))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{opened:["handleOpenToggle"]}},enumerable:false,configurable:true});return t}();PdsTooltip.instanceCounter=0;PdsTooltip.style=pdsTooltipCss;export{PdsTooltip as pds_tooltip};
2
2
  //# sourceMappingURL=pds-tooltip.entry.js.map