@pine-ds/core 3.14.0 → 3.14.2-dev.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 (526) hide show
  1. package/components/floating-ui.dom.js +161 -40
  2. package/components/floating-ui.dom.js.map +1 -1
  3. package/components/index.d.ts +2 -0
  4. package/components/index.js +1 -0
  5. package/components/index.js.map +1 -1
  6. package/components/index2.js +1 -1
  7. package/components/index2.js.map +1 -1
  8. package/components/pds-checkbox2.js +5 -4
  9. package/components/pds-checkbox2.js.map +1 -1
  10. package/components/pds-combobox.js +69 -29
  11. package/components/pds-combobox.js.map +1 -1
  12. package/components/pds-dropdown-menu-item.js +1 -1
  13. package/components/pds-dropdown-menu-item.js.map +1 -1
  14. package/components/pds-dropdown-menu.js +3 -2
  15. package/components/pds-dropdown-menu.js.map +1 -1
  16. package/components/pds-filter.js +1 -1
  17. package/components/pds-filter.js.map +1 -1
  18. package/components/pds-input.js +3 -3
  19. package/components/pds-input.js.map +1 -1
  20. package/components/pds-loader2.js +2 -2
  21. package/components/pds-loader2.js.map +1 -1
  22. package/components/pds-multiselect.d.ts +11 -0
  23. package/components/pds-multiselect.js +667 -0
  24. package/components/pds-multiselect.js.map +1 -0
  25. package/components/pds-popover.js +1 -1
  26. package/components/pds-progress.js +1 -1
  27. package/components/pds-property.js +1 -1
  28. package/components/pds-radio-group.js +3 -3
  29. package/components/pds-radio.js +3 -3
  30. package/components/pds-row.js +1 -1
  31. package/components/pds-select.js +3 -3
  32. package/components/pds-select.js.map +1 -1
  33. package/components/pds-sortable-item.js +1 -1
  34. package/components/pds-sortable.js +1 -1
  35. package/components/pds-switch.js +5 -4
  36. package/components/pds-switch.js.map +1 -1
  37. package/components/pds-tab.js +4 -4
  38. package/components/pds-tab.js.map +1 -1
  39. package/components/pds-table-body.js +1 -1
  40. package/components/pds-table-cell2.js +2 -2
  41. package/components/pds-table-head-cell2.js +35 -6
  42. package/components/pds-table-head-cell2.js.map +1 -1
  43. package/components/pds-table-head.js +1 -1
  44. package/components/pds-table-row.js +1 -1
  45. package/components/pds-tabpanel.js +1 -1
  46. package/components/pds-tabs.js +1 -1
  47. package/components/pds-text2.js +1 -1
  48. package/components/pds-textarea.js +6 -6
  49. package/components/pds-textarea.js.map +1 -1
  50. package/components/pds-toast.js +3 -3
  51. package/components/pds-tooltip.js +2 -2
  52. package/dist/cjs/{floating-ui.dom-DTAy35nv.js → floating-ui.dom-Ca6tS7ef.js} +163 -41
  53. package/dist/cjs/floating-ui.dom-Ca6tS7ef.js.map +1 -0
  54. package/dist/cjs/{index-CMeuo765.js → index-BA--jsiy.js} +3 -3
  55. package/dist/cjs/index-BA--jsiy.js.map +1 -0
  56. package/dist/cjs/loader.cjs.js +1 -1
  57. package/dist/cjs/pds-accordion.cjs.entry.js +1 -1
  58. package/dist/cjs/pds-avatar.cjs.entry.js +1 -1
  59. package/dist/cjs/pds-button.cjs.entry.js +1 -1
  60. package/dist/cjs/pds-checkbox.cjs.entry.js +6 -5
  61. package/dist/cjs/pds-checkbox.entry.cjs.js.map +1 -1
  62. package/dist/cjs/pds-chip.cjs.entry.js +1 -1
  63. package/dist/cjs/pds-combobox.cjs.entry.js +70 -30
  64. package/dist/cjs/pds-combobox.entry.cjs.js.map +1 -1
  65. package/dist/cjs/pds-copytext.cjs.entry.js +1 -1
  66. package/dist/cjs/pds-dropdown-menu-item.cjs.entry.js +1 -1
  67. package/dist/cjs/pds-dropdown-menu-item.entry.cjs.js.map +1 -1
  68. package/dist/cjs/pds-dropdown-menu.cjs.entry.js +4 -3
  69. package/dist/cjs/pds-dropdown-menu.entry.cjs.js.map +1 -1
  70. package/dist/cjs/pds-filter.cjs.entry.js +2 -2
  71. package/dist/cjs/pds-filter.entry.cjs.js.map +1 -1
  72. package/dist/cjs/pds-input.cjs.entry.js +4 -4
  73. package/dist/cjs/pds-input.entry.cjs.js.map +1 -1
  74. package/dist/cjs/pds-link.cjs.entry.js +1 -1
  75. package/dist/cjs/pds-loader.cjs.entry.js +2 -2
  76. package/dist/cjs/pds-loader.entry.cjs.js.map +1 -1
  77. package/dist/cjs/pds-multiselect.cjs.entry.js +593 -0
  78. package/dist/cjs/pds-multiselect.entry.cjs.js.map +1 -0
  79. package/dist/cjs/pds-popover.cjs.entry.js +1 -1
  80. package/dist/cjs/pds-progress.cjs.entry.js +1 -1
  81. package/dist/cjs/pds-property.cjs.entry.js +1 -1
  82. package/dist/cjs/pds-radio-group.cjs.entry.js +4 -4
  83. package/dist/cjs/pds-radio.cjs.entry.js +4 -4
  84. package/dist/cjs/pds-row.cjs.entry.js +1 -1
  85. package/dist/cjs/pds-select.cjs.entry.js +4 -4
  86. package/dist/cjs/pds-select.entry.cjs.js.map +1 -1
  87. package/dist/cjs/pds-sortable-item.cjs.entry.js +2 -2
  88. package/dist/cjs/pds-sortable.cjs.entry.js +1 -1
  89. package/dist/cjs/pds-switch.cjs.entry.js +6 -5
  90. package/dist/cjs/pds-switch.entry.cjs.js.map +1 -1
  91. package/dist/cjs/pds-tab.cjs.entry.js +4 -4
  92. package/dist/cjs/pds-tab.entry.cjs.js.map +1 -1
  93. package/dist/cjs/pds-table-body.cjs.entry.js +1 -1
  94. package/dist/cjs/pds-table-cell.cjs.entry.js +2 -2
  95. package/dist/cjs/pds-table-head-cell.cjs.entry.js +33 -6
  96. package/dist/cjs/pds-table-head-cell.entry.cjs.js.map +1 -1
  97. package/dist/cjs/pds-table-head.cjs.entry.js +1 -1
  98. package/dist/cjs/pds-table-row.cjs.entry.js +1 -1
  99. package/dist/cjs/pds-tabpanel.cjs.entry.js +1 -1
  100. package/dist/cjs/pds-tabs.cjs.entry.js +1 -1
  101. package/dist/cjs/pds-text.cjs.entry.js +1 -1
  102. package/dist/cjs/pds-textarea.cjs.entry.js +7 -7
  103. package/dist/cjs/pds-textarea.entry.cjs.js.map +1 -1
  104. package/dist/cjs/pds-toast.cjs.entry.js +3 -3
  105. package/dist/cjs/pds-tooltip.cjs.entry.js +3 -3
  106. package/dist/cjs/pine-core.cjs.js +1 -1
  107. package/dist/collection/collection-manifest.json +1 -0
  108. package/dist/collection/components/pds-box/pds-box.css +0 -191
  109. package/dist/collection/components/pds-checkbox/pds-checkbox.js +5 -4
  110. package/dist/collection/components/pds-checkbox/pds-checkbox.js.map +1 -1
  111. package/dist/collection/components/pds-combobox/pds-combobox.js +4 -4
  112. package/dist/collection/components/pds-combobox/pds-combobox.js.map +1 -1
  113. package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-item/pds-dropdown-menu-item.css +3 -1
  114. package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu.css +1 -1
  115. package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu.js +2 -1
  116. package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu.js.map +1 -1
  117. package/dist/collection/components/pds-filters/pds-filter/pds-filter.css +6 -2
  118. package/dist/collection/components/pds-input/pds-input.js +3 -3
  119. package/dist/collection/components/pds-input/pds-input.js.map +1 -1
  120. package/dist/collection/components/pds-loader/pds-loader.js +2 -2
  121. package/dist/collection/components/pds-loader/pds-loader.js.map +1 -1
  122. package/dist/collection/components/pds-multiselect/multiselect-interface.js +2 -0
  123. package/dist/collection/components/pds-multiselect/multiselect-interface.js.map +1 -0
  124. package/dist/collection/components/pds-multiselect/pds-multiselect.css +232 -0
  125. package/dist/collection/components/pds-multiselect/pds-multiselect.js +1153 -0
  126. package/dist/collection/components/pds-multiselect/pds-multiselect.js.map +1 -0
  127. package/dist/collection/components/pds-multiselect/stories/pds-multiselect.stories.js +371 -0
  128. package/dist/collection/components/pds-popover/pds-popover.js +1 -1
  129. package/dist/collection/components/pds-progress/pds-progress.js +1 -1
  130. package/dist/collection/components/pds-property/pds-property.js +1 -1
  131. package/dist/collection/components/pds-radio/pds-radio.js +3 -3
  132. package/dist/collection/components/pds-radio-group/pds-radio-group.js +3 -3
  133. package/dist/collection/components/pds-row/pds-row.js +1 -1
  134. package/dist/collection/components/pds-select/pds-select.js +3 -3
  135. package/dist/collection/components/pds-select/pds-select.js.map +1 -1
  136. package/dist/collection/components/pds-sortable/pds-sortable-item/pds-sortable-item.js +1 -1
  137. package/dist/collection/components/pds-sortable/pds-sortable.js +1 -1
  138. package/dist/collection/components/pds-switch/pds-switch.js +5 -4
  139. package/dist/collection/components/pds-switch/pds-switch.js.map +1 -1
  140. package/dist/collection/components/pds-table/pds-table-body/pds-table-body.js +1 -1
  141. package/dist/collection/components/pds-table/pds-table-cell/pds-table-cell.js +2 -2
  142. package/dist/collection/components/pds-table/pds-table-head/pds-table-head.js +1 -1
  143. package/dist/collection/components/pds-table/pds-table-head-cell/pds-table-head-cell.js +51 -6
  144. package/dist/collection/components/pds-table/pds-table-head-cell/pds-table-head-cell.js.map +1 -1
  145. package/dist/collection/components/pds-table/pds-table-row/pds-table-row.js +1 -1
  146. package/dist/collection/components/pds-table/stories/pds-table.stories.js +32 -4
  147. package/dist/collection/components/pds-tabs/pds-tab/pds-tab.css +6 -2
  148. package/dist/collection/components/pds-tabs/pds-tab/pds-tab.js +3 -3
  149. package/dist/collection/components/pds-tabs/pds-tabpanel/pds-tabpanel.js +1 -1
  150. package/dist/collection/components/pds-tabs/pds-tabs.js +1 -1
  151. package/dist/collection/components/pds-text/pds-text.js +1 -1
  152. package/dist/collection/components/pds-textarea/pds-textarea.js +6 -6
  153. package/dist/collection/components/pds-textarea/pds-textarea.js.map +1 -1
  154. package/dist/collection/components/pds-toast/pds-toast.js +3 -3
  155. package/dist/collection/components/pds-tooltip/pds-tooltip.js +2 -2
  156. package/dist/docs.json +960 -174
  157. package/dist/esm/{floating-ui.dom-DbQzNDdQ.js → floating-ui.dom-BO6p966C.js} +163 -42
  158. package/dist/esm/floating-ui.dom-BO6p966C.js.map +1 -0
  159. package/dist/esm/{index-xbb79yLt.js → index-DY8eSueV.js} +3 -3
  160. package/dist/esm/index-DY8eSueV.js.map +1 -0
  161. package/dist/esm/loader.js +1 -1
  162. package/dist/esm/pds-accordion.entry.js +1 -1
  163. package/dist/esm/pds-avatar.entry.js +1 -1
  164. package/dist/esm/pds-button.entry.js +1 -1
  165. package/dist/esm/pds-checkbox.entry.js +6 -5
  166. package/dist/esm/pds-checkbox.entry.js.map +1 -1
  167. package/dist/esm/pds-chip.entry.js +1 -1
  168. package/dist/esm/pds-combobox.entry.js +70 -30
  169. package/dist/esm/pds-combobox.entry.js.map +1 -1
  170. package/dist/esm/pds-copytext.entry.js +1 -1
  171. package/dist/esm/pds-dropdown-menu-item.entry.js +1 -1
  172. package/dist/esm/pds-dropdown-menu-item.entry.js.map +1 -1
  173. package/dist/esm/pds-dropdown-menu.entry.js +4 -3
  174. package/dist/esm/pds-dropdown-menu.entry.js.map +1 -1
  175. package/dist/esm/pds-filter.entry.js +2 -2
  176. package/dist/esm/pds-filter.entry.js.map +1 -1
  177. package/dist/esm/pds-input.entry.js +4 -4
  178. package/dist/esm/pds-input.entry.js.map +1 -1
  179. package/dist/esm/pds-link.entry.js +1 -1
  180. package/dist/esm/pds-loader.entry.js +2 -2
  181. package/dist/esm/pds-loader.entry.js.map +1 -1
  182. package/dist/esm/pds-multiselect.entry.js +591 -0
  183. package/dist/esm/pds-multiselect.entry.js.map +1 -0
  184. package/dist/esm/pds-popover.entry.js +1 -1
  185. package/dist/esm/pds-progress.entry.js +1 -1
  186. package/dist/esm/pds-property.entry.js +1 -1
  187. package/dist/esm/pds-radio-group.entry.js +4 -4
  188. package/dist/esm/pds-radio.entry.js +4 -4
  189. package/dist/esm/pds-row.entry.js +1 -1
  190. package/dist/esm/pds-select.entry.js +4 -4
  191. package/dist/esm/pds-select.entry.js.map +1 -1
  192. package/dist/esm/pds-sortable-item.entry.js +2 -2
  193. package/dist/esm/pds-sortable.entry.js +1 -1
  194. package/dist/esm/pds-switch.entry.js +6 -5
  195. package/dist/esm/pds-switch.entry.js.map +1 -1
  196. package/dist/esm/pds-tab.entry.js +4 -4
  197. package/dist/esm/pds-tab.entry.js.map +1 -1
  198. package/dist/esm/pds-table-body.entry.js +1 -1
  199. package/dist/esm/pds-table-cell.entry.js +2 -2
  200. package/dist/esm/pds-table-head-cell.entry.js +33 -6
  201. package/dist/esm/pds-table-head-cell.entry.js.map +1 -1
  202. package/dist/esm/pds-table-head.entry.js +1 -1
  203. package/dist/esm/pds-table-row.entry.js +1 -1
  204. package/dist/esm/pds-tabpanel.entry.js +1 -1
  205. package/dist/esm/pds-tabs.entry.js +1 -1
  206. package/dist/esm/pds-text.entry.js +1 -1
  207. package/dist/esm/pds-textarea.entry.js +7 -7
  208. package/dist/esm/pds-textarea.entry.js.map +1 -1
  209. package/dist/esm/pds-toast.entry.js +3 -3
  210. package/dist/esm/pds-tooltip.entry.js +3 -3
  211. package/dist/esm/pine-core.js +1 -1
  212. package/dist/esm-es5/floating-ui.dom-BO6p966C.js +2 -0
  213. package/dist/esm-es5/floating-ui.dom-BO6p966C.js.map +1 -0
  214. package/dist/esm-es5/{index-xbb79yLt.js → index-DY8eSueV.js} +1 -1
  215. package/dist/esm-es5/index-DY8eSueV.js.map +1 -0
  216. package/dist/esm-es5/loader.js +1 -1
  217. package/dist/esm-es5/pds-accordion.entry.js +1 -1
  218. package/dist/esm-es5/pds-avatar.entry.js +1 -1
  219. package/dist/esm-es5/pds-button.entry.js +1 -1
  220. package/dist/esm-es5/pds-checkbox.entry.js +1 -1
  221. package/dist/esm-es5/pds-checkbox.entry.js.map +1 -1
  222. package/dist/esm-es5/pds-chip.entry.js +1 -1
  223. package/dist/esm-es5/pds-combobox.entry.js +2 -2
  224. package/dist/esm-es5/pds-combobox.entry.js.map +1 -1
  225. package/dist/esm-es5/pds-copytext.entry.js +1 -1
  226. package/dist/esm-es5/pds-dropdown-menu-item.entry.js +1 -1
  227. package/dist/esm-es5/pds-dropdown-menu-item.entry.js.map +1 -1
  228. package/dist/esm-es5/pds-dropdown-menu.entry.js +1 -1
  229. package/dist/esm-es5/pds-dropdown-menu.entry.js.map +1 -1
  230. package/dist/esm-es5/pds-filter.entry.js +1 -1
  231. package/dist/esm-es5/pds-filter.entry.js.map +1 -1
  232. package/dist/esm-es5/pds-input.entry.js +1 -1
  233. package/dist/esm-es5/pds-input.entry.js.map +1 -1
  234. package/dist/esm-es5/pds-link.entry.js +1 -1
  235. package/dist/esm-es5/pds-loader.entry.js +1 -1
  236. package/dist/esm-es5/pds-loader.entry.js.map +1 -1
  237. package/dist/esm-es5/pds-multiselect.entry.js +2 -0
  238. package/dist/esm-es5/pds-multiselect.entry.js.map +1 -0
  239. package/dist/esm-es5/pds-popover.entry.js +1 -1
  240. package/dist/esm-es5/pds-progress.entry.js +1 -1
  241. package/dist/esm-es5/pds-property.entry.js +1 -1
  242. package/dist/esm-es5/pds-radio-group.entry.js +1 -1
  243. package/dist/esm-es5/pds-radio.entry.js +1 -1
  244. package/dist/esm-es5/pds-row.entry.js +1 -1
  245. package/dist/esm-es5/pds-select.entry.js +1 -1
  246. package/dist/esm-es5/pds-select.entry.js.map +1 -1
  247. package/dist/esm-es5/pds-sortable-item.entry.js +1 -1
  248. package/dist/esm-es5/pds-sortable.entry.js +1 -1
  249. package/dist/esm-es5/pds-switch.entry.js +1 -1
  250. package/dist/esm-es5/pds-switch.entry.js.map +1 -1
  251. package/dist/esm-es5/pds-tab.entry.js +1 -1
  252. package/dist/esm-es5/pds-tab.entry.js.map +1 -1
  253. package/dist/esm-es5/pds-table-body.entry.js +1 -1
  254. package/dist/esm-es5/pds-table-cell.entry.js +1 -1
  255. package/dist/esm-es5/pds-table-head-cell.entry.js +1 -1
  256. package/dist/esm-es5/pds-table-head-cell.entry.js.map +1 -1
  257. package/dist/esm-es5/pds-table-head.entry.js +1 -1
  258. package/dist/esm-es5/pds-table-row.entry.js +1 -1
  259. package/dist/esm-es5/pds-tabpanel.entry.js +1 -1
  260. package/dist/esm-es5/pds-tabs.entry.js +1 -1
  261. package/dist/esm-es5/pds-text.entry.js +1 -1
  262. package/dist/esm-es5/pds-textarea.entry.js +1 -1
  263. package/dist/esm-es5/pds-textarea.entry.js.map +1 -1
  264. package/dist/esm-es5/pds-toast.entry.js +1 -1
  265. package/dist/esm-es5/pds-tooltip.entry.js +1 -1
  266. package/dist/esm-es5/pine-core.js +1 -1
  267. package/dist/pine-core/p-02f48157.system.entry.js +2 -0
  268. package/dist/pine-core/{p-b30424e3.system.entry.js → p-063afa19.system.entry.js} +2 -2
  269. package/dist/pine-core/p-0sPVsRFU.system.js.map +1 -0
  270. package/dist/pine-core/{p-15202869.entry.js → p-10dbe3e2.entry.js} +2 -2
  271. package/dist/pine-core/{p-5b7ab891.entry.js → p-12360e47.entry.js} +2 -2
  272. package/dist/pine-core/{p-ac14c8e3.system.entry.js → p-137b3289.system.entry.js} +2 -2
  273. package/dist/pine-core/{p-a737df90.entry.js → p-154a32f4.entry.js} +2 -2
  274. package/dist/pine-core/{p-098cbcd7.system.entry.js → p-205ec2ac.system.entry.js} +2 -2
  275. package/dist/pine-core/{p-098cbcd7.system.entry.js.map → p-205ec2ac.system.entry.js.map} +1 -1
  276. package/dist/pine-core/{p-a847fad3.entry.js → p-2537aacb.entry.js} +2 -2
  277. package/dist/pine-core/{p-cd335ec2.system.entry.js → p-2fe330d0.system.entry.js} +2 -2
  278. package/dist/pine-core/p-30ea3668.system.entry.js +2 -0
  279. package/dist/pine-core/{p-1daf66d1.entry.js → p-31168da5.entry.js} +2 -2
  280. package/dist/pine-core/{p-732e2564.system.entry.js → p-325b3b0d.system.entry.js} +2 -2
  281. package/dist/pine-core/{p-4d25449c.entry.js → p-3440138d.entry.js} +2 -2
  282. package/dist/pine-core/{p-4d25449c.entry.js.map → p-3440138d.entry.js.map} +1 -1
  283. package/dist/pine-core/p-3c04c17e.system.entry.js +2 -0
  284. package/dist/pine-core/p-3c04c17e.system.entry.js.map +1 -0
  285. package/dist/pine-core/p-475bb340.entry.js +2 -0
  286. package/dist/pine-core/p-475bb340.entry.js.map +1 -0
  287. package/dist/pine-core/{p-CGo2P4Fr.system.js.map → p-4EbKXnVN.system.js.map} +1 -1
  288. package/dist/pine-core/{p-4SEjggIC.system.js.map → p-4alPHnzl.system.js.map} +1 -1
  289. package/dist/pine-core/{p-9bfaed7e.system.entry.js → p-4c23c75b.system.entry.js} +2 -2
  290. package/dist/pine-core/{p-bdf8bff3.system.entry.js → p-4d85945b.system.entry.js} +2 -2
  291. package/dist/pine-core/{p-3f8b0885.system.entry.js → p-4d9eee67.system.entry.js} +2 -2
  292. package/dist/pine-core/{p-4fD2iHS9.system.js.map → p-4f1cRPxE.system.js.map} +1 -1
  293. package/dist/pine-core/{p-e2104c31.entry.js → p-5040a872.entry.js} +2 -2
  294. package/dist/pine-core/p-51114c2b.system.entry.js +2 -0
  295. package/dist/pine-core/p-51114c2b.system.entry.js.map +1 -0
  296. package/dist/pine-core/p-5L_gsODn.system.js.map +1 -0
  297. package/dist/pine-core/{p-bbc349b3.system.entry.js → p-5b3ac18e.system.entry.js} +2 -2
  298. package/dist/pine-core/{p-bbc349b3.system.entry.js.map → p-5b3ac18e.system.entry.js.map} +1 -1
  299. package/dist/pine-core/{p-a08b60ae.entry.js → p-5b9110fe.entry.js} +2 -2
  300. package/dist/pine-core/{p-94b1997d.system.entry.js → p-5e92aa34.system.entry.js} +2 -2
  301. package/dist/pine-core/{p-41d89f20.entry.js → p-5f2865df.entry.js} +2 -2
  302. package/dist/pine-core/{p-41d89f20.entry.js.map → p-5f2865df.entry.js.map} +1 -1
  303. package/dist/pine-core/p-622f1342.system.entry.js +4 -0
  304. package/dist/pine-core/p-622f1342.system.entry.js.map +1 -0
  305. package/dist/pine-core/p-63269b89.entry.js +2 -0
  306. package/dist/pine-core/{p-ff182316.system.entry.js → p-6d2da3ca.system.entry.js} +2 -2
  307. package/dist/pine-core/{p-ff182316.system.entry.js.map → p-6d2da3ca.system.entry.js.map} +1 -1
  308. package/dist/pine-core/p-6e862168.system.entry.js +2 -0
  309. package/dist/pine-core/{p-dcc6ad67.system.entry.js.map → p-6e862168.system.entry.js.map} +1 -1
  310. package/dist/pine-core/{p-cf2e1c07.system.entry.js → p-70aa35fc.system.entry.js} +2 -2
  311. package/dist/pine-core/{p-fc0ee6da.entry.js → p-757c7b80.entry.js} +2 -2
  312. package/dist/pine-core/{p-1df25b57.system.entry.js → p-78ee2e08.system.entry.js} +2 -2
  313. package/dist/pine-core/{p-2319298c.system.entry.js → p-7b5c8248.system.entry.js} +2 -2
  314. package/dist/pine-core/{p-e3d76aa3.system.entry.js → p-7dd74fe2.system.entry.js} +2 -2
  315. package/dist/pine-core/p-7dd74fe2.system.entry.js.map +1 -0
  316. package/dist/pine-core/p-811e510d.system.entry.js +2 -0
  317. package/dist/pine-core/p-811e510d.system.entry.js.map +1 -0
  318. package/dist/pine-core/{p-f9ef2f74.system.entry.js → p-87eb8d4b.system.entry.js} +2 -2
  319. package/dist/pine-core/p-8b201c9a.system.entry.js +2 -0
  320. package/dist/pine-core/p-8b201c9a.system.entry.js.map +1 -0
  321. package/dist/pine-core/{p-711989de.entry.js → p-8c0fc8ff.entry.js} +2 -2
  322. package/dist/pine-core/p-8c0fc8ff.entry.js.map +1 -0
  323. package/dist/pine-core/p-8eb1c168.entry.js +2 -0
  324. package/dist/pine-core/{p-e5bc22b6.system.entry.js → p-8fdb10c4.system.entry.js} +2 -2
  325. package/dist/pine-core/{p-232e4282.system.entry.js → p-90615423.system.entry.js} +2 -2
  326. package/dist/pine-core/{p-f79f6f08.system.entry.js → p-932283cf.system.entry.js} +2 -2
  327. package/dist/pine-core/{p-0b05708b.entry.js → p-9ada659b.entry.js} +2 -2
  328. package/dist/pine-core/{p-4778ae70.entry.js → p-9bb6cc3d.entry.js} +2 -2
  329. package/dist/pine-core/{p-3f6b9520.entry.js → p-9c928c44.entry.js} +2 -2
  330. package/dist/pine-core/{p-dad604e4.system.entry.js → p-9e7cd072.system.entry.js} +2 -2
  331. package/dist/pine-core/p-9e7cd072.system.entry.js.map +1 -0
  332. package/dist/pine-core/{p-e8aad8dc.entry.js → p-9eccf7b9.entry.js} +2 -2
  333. package/dist/pine-core/{p-WhfStK1C.system.js.map → p-B0Otb6kF.system.js.map} +1 -1
  334. package/dist/pine-core/{p-CUmDvil2.system.js.map → p-BA95hFrH.system.js.map} +1 -1
  335. package/dist/pine-core/{p-B4EMeCRH.system.js.map → p-BHjZufAO.system.js.map} +1 -1
  336. package/dist/pine-core/{p-IH8oGXiE.system.js.map → p-BJtTt670.system.js.map} +1 -1
  337. package/dist/pine-core/p-BO6p966C.js +2 -0
  338. package/dist/pine-core/p-BO6p966C.js.map +1 -0
  339. package/dist/pine-core/{p-jBhqNO5u.system.js.map → p-BSRmAvMC.system.js.map} +1 -1
  340. package/dist/pine-core/{p-DyrNlfLT.system.js.map → p-BTe59phF.system.js.map} +1 -1
  341. package/dist/pine-core/{p-B0Y1Zs9b.system.js.map → p-Bn36FPag.system.js.map} +1 -1
  342. package/dist/pine-core/{p-DpeOrUYB.system.js.map → p-CG5jdxoZ.system.js.map} +1 -1
  343. package/dist/pine-core/{p-PMNjgK0C.system.js.map → p-CP2nsJcg.system.js.map} +1 -1
  344. package/dist/pine-core/{p-CKzDRRgx.system.js → p-CP48ADFM.system.js} +1 -1
  345. package/dist/pine-core/p-CP48ADFM.system.js.map +1 -0
  346. package/dist/pine-core/p-CR01VmO6.system.js.map +1 -0
  347. package/dist/pine-core/{p-CAnnMfDw.system.js.map → p-CSLo9qKS.system.js.map} +1 -1
  348. package/dist/pine-core/{p-DmVKABQy.system.js.map → p-CboCokff.system.js.map} +1 -1
  349. package/dist/pine-core/{p-r_cS5LMw.system.js.map → p-Civ2VHC7.system.js.map} +1 -1
  350. package/dist/pine-core/{p-ChiYqN-p.system.js.map → p-CmquVvkz.system.js.map} +1 -1
  351. package/dist/pine-core/{p-CXGuX44q.system.js.map → p-Cn_QqTXg.system.js.map} +1 -1
  352. package/dist/pine-core/{p-tHMXRB8d.system.js.map → p-CpyTw2IQ.system.js.map} +1 -1
  353. package/dist/pine-core/{p-Brpt0zl5.system.js.map → p-Ct9csNdF.system.js.map} +1 -1
  354. package/dist/pine-core/{p-B_Co5NfG.system.js.map → p-Cun139qe.system.js.map} +1 -1
  355. package/dist/pine-core/p-D2eS6fhD.system.js +2 -0
  356. package/dist/pine-core/p-D2eS6fhD.system.js.map +1 -0
  357. package/dist/pine-core/{p-CTfQ_9yC.system.js.map → p-DFXWnbHE.system.js.map} +1 -1
  358. package/dist/pine-core/{p-xbb79yLt.js → p-DY8eSueV.js} +1 -1
  359. package/dist/pine-core/p-DY8eSueV.js.map +1 -0
  360. package/dist/pine-core/p-DbNPEZgc.system.js.map +1 -0
  361. package/dist/pine-core/p-DieNsvcz.system.js.map +1 -0
  362. package/dist/pine-core/{p-DB45WSlG.system.js.map → p-DwQewDCV.system.js.map} +1 -1
  363. package/dist/pine-core/p-JAVnELnm.system.js +1 -1
  364. package/dist/pine-core/{p-DC2NZwtk.system.js.map → p-LM0mZTib.system.js.map} +1 -1
  365. package/dist/pine-core/{p-DAvCgWA9.system.js.map → p-Lk6DnEPT.system.js.map} +1 -1
  366. package/dist/pine-core/{p-Bjj4Pcbb.system.js.map → p-YqHO7iPZ.system.js.map} +1 -1
  367. package/dist/pine-core/{p-00568c20.system.entry.js → p-a07b8e45.system.entry.js} +2 -2
  368. package/dist/pine-core/{p-c5013d20.entry.js → p-a3cdff85.entry.js} +2 -2
  369. package/dist/pine-core/{p-a4b16b32.system.entry.js → p-a5b24b1d.system.entry.js} +2 -2
  370. package/dist/pine-core/{p-596acf65.entry.js → p-a99e8caf.entry.js} +2 -2
  371. package/dist/pine-core/p-aPfTGFhq.system.js.map +1 -0
  372. package/dist/pine-core/{p-646ac76d.entry.js → p-ab3b6e0c.entry.js} +2 -2
  373. package/dist/pine-core/p-ab3b6e0c.entry.js.map +1 -0
  374. package/dist/pine-core/{p-002fe322.system.entry.js → p-ac240034.system.entry.js} +2 -2
  375. package/dist/pine-core/{p-fe28b975.system.entry.js → p-ac56273a.system.entry.js} +2 -2
  376. package/dist/pine-core/{p-fe28b975.system.entry.js.map → p-ac56273a.system.entry.js.map} +1 -1
  377. package/dist/pine-core/p-b41465b8.entry.js +3 -0
  378. package/dist/pine-core/p-b41465b8.entry.js.map +1 -0
  379. package/dist/pine-core/{p-b02936d2.entry.js → p-ba623ced.entry.js} +2 -2
  380. package/dist/pine-core/p-ba623ced.entry.js.map +1 -0
  381. package/dist/pine-core/{p-f8fba315.entry.js → p-bc85016b.entry.js} +2 -2
  382. package/dist/pine-core/{p-61588eac.entry.js → p-bddc9c5a.entry.js} +2 -2
  383. package/dist/pine-core/p-bff9fb8e.entry.js +2 -0
  384. package/dist/pine-core/p-bff9fb8e.entry.js.map +1 -0
  385. package/dist/pine-core/{p--gPqixhD.system.js.map → p-bs74TBAh.system.js.map} +1 -1
  386. package/dist/pine-core/{p-7de73ac5.entry.js → p-c24d11c7.entry.js} +2 -2
  387. package/dist/pine-core/p-c292e5da.system.entry.js +2 -0
  388. package/dist/pine-core/{p-6bc7d67f.system.entry.js.map → p-c292e5da.system.entry.js.map} +1 -1
  389. package/dist/pine-core/p-c68bceb1.entry.js +2 -0
  390. package/dist/pine-core/{p-478d1107.entry.js.map → p-c68bceb1.entry.js.map} +1 -1
  391. package/dist/pine-core/{p-0ace9c16.entry.js → p-c7c00a27.entry.js} +2 -2
  392. package/dist/pine-core/{p-cb6c279a.system.entry.js → p-cac3128b.system.entry.js} +2 -2
  393. package/dist/pine-core/p-ccab748a.entry.js +2 -0
  394. package/dist/pine-core/p-ccab748a.entry.js.map +1 -0
  395. package/dist/pine-core/p-d41112ad.entry.js +2 -0
  396. package/dist/pine-core/{p-f82b464c.entry.js.map → p-d41112ad.entry.js.map} +1 -1
  397. package/dist/pine-core/{p-6cba6806.entry.js → p-d6302edd.entry.js} +2 -2
  398. package/dist/pine-core/{p-e011d7e5.entry.js → p-d9693048.entry.js} +2 -2
  399. package/dist/pine-core/{p-e011d7e5.entry.js.map → p-d9693048.entry.js.map} +1 -1
  400. package/dist/pine-core/{p-04294b28.system.entry.js → p-daa36570.system.entry.js} +2 -2
  401. package/dist/pine-core/{p-15650db8.entry.js → p-e6dc2297.entry.js} +2 -2
  402. package/dist/pine-core/{p-9f53eb94.system.entry.js → p-e8cf15d7.system.entry.js} +2 -2
  403. package/dist/pine-core/p-eb026745.entry.js +2 -0
  404. package/dist/pine-core/{p-95f2782c.entry.js → p-f47d6724.entry.js} +2 -2
  405. package/dist/pine-core/p-f47d6724.entry.js.map +1 -0
  406. package/dist/pine-core/{p-D8Jc24Qq.system.js.map → p-htODgUCV.system.js.map} +1 -1
  407. package/dist/pine-core/{p-DYq1Mef8.system.js.map → p-j0609tLE.system.js.map} +1 -1
  408. package/dist/pine-core/{p-DoP8Sl1O.system.js.map → p-rcUX-rt5.system.js.map} +1 -1
  409. package/dist/pine-core/p-ztsUkqit.system.js.map +1 -0
  410. package/dist/pine-core/pds-checkbox.entry.esm.js.map +1 -1
  411. package/dist/pine-core/pds-combobox.entry.esm.js.map +1 -1
  412. package/dist/pine-core/pds-dropdown-menu-item.entry.esm.js.map +1 -1
  413. package/dist/pine-core/pds-dropdown-menu.entry.esm.js.map +1 -1
  414. package/dist/pine-core/pds-filter.entry.esm.js.map +1 -1
  415. package/dist/pine-core/pds-input.entry.esm.js.map +1 -1
  416. package/dist/pine-core/pds-loader.entry.esm.js.map +1 -1
  417. package/dist/pine-core/pds-multiselect.entry.esm.js.map +1 -0
  418. package/dist/pine-core/pds-select.entry.esm.js.map +1 -1
  419. package/dist/pine-core/pds-switch.entry.esm.js.map +1 -1
  420. package/dist/pine-core/pds-tab.entry.esm.js.map +1 -1
  421. package/dist/pine-core/pds-table-head-cell.entry.esm.js.map +1 -1
  422. package/dist/pine-core/pds-textarea.entry.esm.js.map +1 -1
  423. package/dist/pine-core/pine-core.esm.js +1 -1
  424. package/dist/types/components/pds-loader/pds-loader.d.ts +1 -1
  425. package/dist/types/components/pds-multiselect/multiselect-interface.d.ts +24 -0
  426. package/dist/types/components/pds-multiselect/pds-multiselect.d.ts +175 -0
  427. package/dist/types/components/pds-table/pds-table-head-cell/pds-table-head-cell.d.ts +10 -0
  428. package/dist/types/components.d.ts +250 -0
  429. package/dist/vscode.html-data.json +156 -0
  430. package/hydrate/index.js +939 -118
  431. package/hydrate/index.mjs +939 -118
  432. package/package.json +5 -5
  433. package/dist/cjs/floating-ui.dom-DTAy35nv.js.map +0 -1
  434. package/dist/cjs/index-CMeuo765.js.map +0 -1
  435. package/dist/esm/floating-ui.dom-DbQzNDdQ.js.map +0 -1
  436. package/dist/esm/index-xbb79yLt.js.map +0 -1
  437. package/dist/esm-es5/floating-ui.dom-DbQzNDdQ.js +0 -2
  438. package/dist/esm-es5/floating-ui.dom-DbQzNDdQ.js.map +0 -1
  439. package/dist/esm-es5/index-xbb79yLt.js.map +0 -1
  440. package/dist/pine-core/p-43990889.entry.js +0 -2
  441. package/dist/pine-core/p-478d1107.entry.js +0 -2
  442. package/dist/pine-core/p-534e44cb.system.entry.js +0 -4
  443. package/dist/pine-core/p-534e44cb.system.entry.js.map +0 -1
  444. package/dist/pine-core/p-54a56826.entry.js +0 -3
  445. package/dist/pine-core/p-54a56826.entry.js.map +0 -1
  446. package/dist/pine-core/p-553e4543.entry.js +0 -2
  447. package/dist/pine-core/p-553e4543.entry.js.map +0 -1
  448. package/dist/pine-core/p-5f6cd30d.system.entry.js +0 -2
  449. package/dist/pine-core/p-5f6cd30d.system.entry.js.map +0 -1
  450. package/dist/pine-core/p-646ac76d.entry.js.map +0 -1
  451. package/dist/pine-core/p-6bc7d67f.system.entry.js +0 -2
  452. package/dist/pine-core/p-711989de.entry.js.map +0 -1
  453. package/dist/pine-core/p-8323fe69.system.entry.js +0 -2
  454. package/dist/pine-core/p-8323fe69.system.entry.js.map +0 -1
  455. package/dist/pine-core/p-95f2782c.entry.js.map +0 -1
  456. package/dist/pine-core/p-9e62c418.system.entry.js +0 -2
  457. package/dist/pine-core/p-9e62c418.system.entry.js.map +0 -1
  458. package/dist/pine-core/p-BOmQOnQe.system.js +0 -2
  459. package/dist/pine-core/p-BOmQOnQe.system.js.map +0 -1
  460. package/dist/pine-core/p-Bnp3zJ0T.system.js.map +0 -1
  461. package/dist/pine-core/p-CKzDRRgx.system.js.map +0 -1
  462. package/dist/pine-core/p-DSwKfctG.system.js.map +0 -1
  463. package/dist/pine-core/p-DbQzNDdQ.js +0 -2
  464. package/dist/pine-core/p-DbQzNDdQ.js.map +0 -1
  465. package/dist/pine-core/p-DfCCzxYg.system.js.map +0 -1
  466. package/dist/pine-core/p-X0_TH-op.system.js.map +0 -1
  467. package/dist/pine-core/p-XCTiWii8.system.js.map +0 -1
  468. package/dist/pine-core/p-ac2f9463.entry.js +0 -2
  469. package/dist/pine-core/p-ac2f9463.entry.js.map +0 -1
  470. package/dist/pine-core/p-b02936d2.entry.js.map +0 -1
  471. package/dist/pine-core/p-b59a0c6b.system.entry.js +0 -2
  472. package/dist/pine-core/p-d0e336b7.system.entry.js +0 -2
  473. package/dist/pine-core/p-dad604e4.system.entry.js.map +0 -1
  474. package/dist/pine-core/p-dcc6ad67.system.entry.js +0 -2
  475. package/dist/pine-core/p-e3d76aa3.system.entry.js.map +0 -1
  476. package/dist/pine-core/p-e7e25d42.entry.js +0 -2
  477. package/dist/pine-core/p-f82b464c.entry.js +0 -2
  478. package/dist/pine-core/p-f92055f3.entry.js +0 -2
  479. package/dist/pine-core/p-xbb79yLt.js.map +0 -1
  480. package/dist/pine-core/p-zgS7Vsk7.system.js.map +0 -1
  481. /package/dist/pine-core/{p-b59a0c6b.system.entry.js.map → p-02f48157.system.entry.js.map} +0 -0
  482. /package/dist/pine-core/{p-b30424e3.system.entry.js.map → p-063afa19.system.entry.js.map} +0 -0
  483. /package/dist/pine-core/{p-15202869.entry.js.map → p-10dbe3e2.entry.js.map} +0 -0
  484. /package/dist/pine-core/{p-5b7ab891.entry.js.map → p-12360e47.entry.js.map} +0 -0
  485. /package/dist/pine-core/{p-ac14c8e3.system.entry.js.map → p-137b3289.system.entry.js.map} +0 -0
  486. /package/dist/pine-core/{p-a737df90.entry.js.map → p-154a32f4.entry.js.map} +0 -0
  487. /package/dist/pine-core/{p-a847fad3.entry.js.map → p-2537aacb.entry.js.map} +0 -0
  488. /package/dist/pine-core/{p-cd335ec2.system.entry.js.map → p-2fe330d0.system.entry.js.map} +0 -0
  489. /package/dist/pine-core/{p-d0e336b7.system.entry.js.map → p-30ea3668.system.entry.js.map} +0 -0
  490. /package/dist/pine-core/{p-1daf66d1.entry.js.map → p-31168da5.entry.js.map} +0 -0
  491. /package/dist/pine-core/{p-732e2564.system.entry.js.map → p-325b3b0d.system.entry.js.map} +0 -0
  492. /package/dist/pine-core/{p-9bfaed7e.system.entry.js.map → p-4c23c75b.system.entry.js.map} +0 -0
  493. /package/dist/pine-core/{p-bdf8bff3.system.entry.js.map → p-4d85945b.system.entry.js.map} +0 -0
  494. /package/dist/pine-core/{p-3f8b0885.system.entry.js.map → p-4d9eee67.system.entry.js.map} +0 -0
  495. /package/dist/pine-core/{p-e2104c31.entry.js.map → p-5040a872.entry.js.map} +0 -0
  496. /package/dist/pine-core/{p-a08b60ae.entry.js.map → p-5b9110fe.entry.js.map} +0 -0
  497. /package/dist/pine-core/{p-94b1997d.system.entry.js.map → p-5e92aa34.system.entry.js.map} +0 -0
  498. /package/dist/pine-core/{p-43990889.entry.js.map → p-63269b89.entry.js.map} +0 -0
  499. /package/dist/pine-core/{p-cf2e1c07.system.entry.js.map → p-70aa35fc.system.entry.js.map} +0 -0
  500. /package/dist/pine-core/{p-fc0ee6da.entry.js.map → p-757c7b80.entry.js.map} +0 -0
  501. /package/dist/pine-core/{p-1df25b57.system.entry.js.map → p-78ee2e08.system.entry.js.map} +0 -0
  502. /package/dist/pine-core/{p-2319298c.system.entry.js.map → p-7b5c8248.system.entry.js.map} +0 -0
  503. /package/dist/pine-core/{p-f9ef2f74.system.entry.js.map → p-87eb8d4b.system.entry.js.map} +0 -0
  504. /package/dist/pine-core/{p-e7e25d42.entry.js.map → p-8eb1c168.entry.js.map} +0 -0
  505. /package/dist/pine-core/{p-e5bc22b6.system.entry.js.map → p-8fdb10c4.system.entry.js.map} +0 -0
  506. /package/dist/pine-core/{p-232e4282.system.entry.js.map → p-90615423.system.entry.js.map} +0 -0
  507. /package/dist/pine-core/{p-f79f6f08.system.entry.js.map → p-932283cf.system.entry.js.map} +0 -0
  508. /package/dist/pine-core/{p-0b05708b.entry.js.map → p-9ada659b.entry.js.map} +0 -0
  509. /package/dist/pine-core/{p-4778ae70.entry.js.map → p-9bb6cc3d.entry.js.map} +0 -0
  510. /package/dist/pine-core/{p-3f6b9520.entry.js.map → p-9c928c44.entry.js.map} +0 -0
  511. /package/dist/pine-core/{p-e8aad8dc.entry.js.map → p-9eccf7b9.entry.js.map} +0 -0
  512. /package/dist/pine-core/{p-00568c20.system.entry.js.map → p-a07b8e45.system.entry.js.map} +0 -0
  513. /package/dist/pine-core/{p-c5013d20.entry.js.map → p-a3cdff85.entry.js.map} +0 -0
  514. /package/dist/pine-core/{p-a4b16b32.system.entry.js.map → p-a5b24b1d.system.entry.js.map} +0 -0
  515. /package/dist/pine-core/{p-596acf65.entry.js.map → p-a99e8caf.entry.js.map} +0 -0
  516. /package/dist/pine-core/{p-002fe322.system.entry.js.map → p-ac240034.system.entry.js.map} +0 -0
  517. /package/dist/pine-core/{p-f8fba315.entry.js.map → p-bc85016b.entry.js.map} +0 -0
  518. /package/dist/pine-core/{p-61588eac.entry.js.map → p-bddc9c5a.entry.js.map} +0 -0
  519. /package/dist/pine-core/{p-7de73ac5.entry.js.map → p-c24d11c7.entry.js.map} +0 -0
  520. /package/dist/pine-core/{p-0ace9c16.entry.js.map → p-c7c00a27.entry.js.map} +0 -0
  521. /package/dist/pine-core/{p-cb6c279a.system.entry.js.map → p-cac3128b.system.entry.js.map} +0 -0
  522. /package/dist/pine-core/{p-6cba6806.entry.js.map → p-d6302edd.entry.js.map} +0 -0
  523. /package/dist/pine-core/{p-04294b28.system.entry.js.map → p-daa36570.system.entry.js.map} +0 -0
  524. /package/dist/pine-core/{p-15650db8.entry.js.map → p-e6dc2297.entry.js.map} +0 -0
  525. /package/dist/pine-core/{p-9f53eb94.system.entry.js.map → p-e8cf15d7.system.entry.js.map} +0 -0
  526. /package/dist/pine-core/{p-f92055f3.entry.js.map → p-eb026745.entry.js.map} +0 -0
@@ -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-border-subtle);\n\n /* stylelint-disable-next-line pine-design-system/no-hardcoded-colors */\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 letter-spacing: var(--pine-letter-spacing);\n line-height: var(--pine-line-height-body);\n padding: var(--pine-dimension-sm);\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: var(--pine-z-index-raised);\n}\n\n// When parent table-head has background, fixed cells should inherit it\n:host(.is-fixed.has-head-background) {\n background-color: var(--pine-color-background-subtle);\n}\n\n// When parent table-head has border prop, add top border (bottom already set in :host)\n:host(.has-head-border) {\n border-block-start: var(--border-head-cell-default);\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-strong);\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, Method } 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 private headObserver?: MutationObserver;\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 /**\n * Determines if the parent table-head has the border attribute.\n * @defaultValue false\n */\n @State() private hasHeadBorder: boolean = false;\n\n /**\n * Determines if the parent table-head has the background attribute.\n * @defaultValue false\n */\n @State() private hasHeadBackground: boolean = false;\n\n /**\n * Programmatically sets this column as the active sort column with the specified direction.\n * Used by pds-table to apply a default sort on initial load.\n * @param direction - The sort direction to apply ('asc' or 'desc')\n */\n @Method()\n async setActiveSort(direction: 'asc' | 'desc') {\n if (!this.sortable) return;\n\n this.sortingDirection = direction;\n this.hostElement.classList.add('is-active');\n }\n\n componentWillLoad() {\n // Set initial references and state before first render\n this.tableRef = this.hostElement.closest('pds-table') as HTMLPdsTableElement;\n\n const tableHead = this.hostElement.closest('pds-table-head') as HTMLElement;\n if (tableHead) {\n this.hasHeadBorder = tableHead.hasAttribute('border');\n this.hasHeadBackground = tableHead.hasAttribute('background');\n }\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 // Watch for changes to the parent table-head's border and background attributes\n const tableHead = this.hostElement.closest('pds-table-head') as HTMLElement;\n if (tableHead && typeof MutationObserver !== 'undefined') {\n // Defensive guard: disconnect existing observer before creating a new one\n if (this.headObserver) {\n this.headObserver.disconnect();\n }\n\n this.headObserver = new MutationObserver(() => {\n // Update state when border or background attributes change\n this.hasHeadBorder = tableHead.hasAttribute('border');\n this.hasHeadBackground = tableHead.hasAttribute('background');\n });\n\n this.headObserver.observe(tableHead, {\n attributes: true,\n attributeFilter: ['border', 'background']\n });\n }\n }\n\n disconnectedCallback() {\n this.cleanupScrollListener();\n\n if (this.headObserver) {\n this.headObserver.disconnect();\n }\n }\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 if (this.hasHeadBackground) {\n classNames.push('has-head-background');\n }\n\n if (this.hasHeadBorder) {\n classNames.push('has-head-border');\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 part=\"head-cell\"\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} part=\"sort-icon\" />\n )}\n </Host>\n );\n }\n}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CAAC,IAAI,CAAC,cAAc,CAAC;;AAGjC,QAAA,IAAI,IAAI,CAAC,iBAAiB,EAAE;AAC1B,YAAA,UAAU,CAAC,IAAI,CAAC,qBAAqB,CAAC;;AAGxC,QAAA,IAAI,IAAI,CAAC,aAAa,EAAE;AACtB,YAAA,UAAU,CAAC,IAAI,CAAC,iBAAiB,CAAC;;AAGpC,QAAA,OAAO,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC;;IAG7B,MAAM,GAAA;AACJ,QAAA,QACE,CAAA,CAAC,IAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EACH,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,EACxB,IAAI,EAAC,cAAc,EACnB,OAAO,EAAE,IAAI,CAAC,UAAU,EACxB,IAAI,EAAC,WAAW,EAChB,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,CAAU,CAAA,UAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAE,IAAI,CAAC,gBAAgB,KAAK,KAAK,GAAG,OAAO,GAAG,SAAS,EAAE,IAAI,EAAC,WAAW,EAAG,CAAA,CAC3F,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-border-subtle);\n\n /* stylelint-disable-next-line pine-design-system/no-hardcoded-colors */\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 letter-spacing: var(--pine-letter-spacing);\n line-height: var(--pine-line-height-body);\n padding: var(--pine-dimension-sm);\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: var(--pine-z-index-raised);\n}\n\n// When parent table-head has background, fixed cells should inherit it\n:host(.is-fixed.has-head-background) {\n background-color: var(--pine-color-background-subtle);\n}\n\n// When parent table-head has border prop, add top border (bottom already set in :host)\n:host(.has-head-border) {\n border-block-start: var(--border-head-cell-default);\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-strong);\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, Method } 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 private headObserver?: MutationObserver;\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 /**\n * Determines if the parent table-head has the border attribute.\n * @defaultValue false\n */\n @State() private hasHeadBorder: boolean = false;\n\n /**\n * Determines if the parent table-head has the background attribute.\n * @defaultValue false\n */\n @State() private hasHeadBackground: boolean = false;\n\n /**\n * Determines if this column is the currently active sorted column.\n * @defaultValue false\n */\n @State() private isActive: boolean = false;\n\n /**\n * Programmatically sets this column as the active sort column with the specified direction.\n * Used by pds-table to apply a default sort on initial load.\n * @param direction - The sort direction to apply ('asc' or 'desc')\n */\n @Method()\n async setActiveSort(direction: 'asc' | 'desc') {\n if (!this.sortable) return;\n\n this.sortingDirection = direction;\n this.isActive = true;\n this.hostElement.classList.add('is-active');\n }\n\n /**\n * Clears the active sort state from this column.\n * Used internally when another column becomes active.\n */\n @Method()\n async clearActiveSort() {\n this.isActive = false;\n this.hostElement.classList.remove('is-active');\n }\n\n componentWillLoad() {\n // Set initial references and state before first render\n this.tableRef = this.hostElement.closest('pds-table') as HTMLPdsTableElement;\n\n const tableHead = this.hostElement.closest('pds-table-head') as HTMLElement;\n if (tableHead) {\n this.hasHeadBorder = tableHead.hasAttribute('border');\n this.hasHeadBackground = tableHead.hasAttribute('background');\n }\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 // Watch for changes to the parent table-head's border and background attributes\n const tableHead = this.hostElement.closest('pds-table-head') as HTMLElement;\n if (tableHead && typeof MutationObserver !== 'undefined') {\n // Defensive guard: disconnect existing observer before creating a new one\n if (this.headObserver) {\n this.headObserver.disconnect();\n }\n\n this.headObserver = new MutationObserver(() => {\n // Update state when border or background attributes change\n this.hasHeadBorder = tableHead.hasAttribute('border');\n this.hasHeadBackground = tableHead.hasAttribute('background');\n });\n\n this.headObserver.observe(tableHead, {\n attributes: true,\n attributeFilter: ['border', 'background']\n });\n }\n }\n\n disconnectedCallback() {\n this.cleanupScrollListener();\n\n if (this.headObserver) {\n this.headObserver.disconnect();\n }\n }\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 // Guard: return early if tableRef is not available\n if (!this.tableRef) {\n return;\n }\n\n const column = this.hostElement.innerText.trim();\n \n // Always toggle the direction (preserves original behavior)\n this.sortingDirection = this.sortingDirection === 'asc' ? 'desc' : 'asc';\n \n // Reset all OTHER head cells to inactive state (skip the current one)\n this.tableRef.querySelectorAll('pds-table-head-cell').forEach(async (headCell) => {\n // Skip clearing the current cell\n if (headCell !== this.hostElement) {\n const headCellComponent = headCell as HTMLPdsTableHeadCellElement;\n await headCellComponent.clearActiveSort();\n }\n });\n \n // Mark this column as active\n this.isActive = true;\n this.hostElement.classList.add('is-active');\n\n // Emit the sort event with the current direction\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 if (this.hasHeadBackground) {\n classNames.push('has-head-background');\n }\n\n if (this.hasHeadBorder) {\n classNames.push('has-head-border');\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 part=\"head-cell\"\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 && this.isActive && (\n <pds-icon icon={this.sortingDirection === 'asc' ? upSmall : downSmall} part=\"sort-icon\" />\n )}\n </Host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AAQ,KAC7B,CAAA,CAAA,UAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAU,IAAI,EAAE,IAAI,CAAC,gBAAgB,KAAK,KAAK,GAAG,OAAO,GAAG,SAAS,EAAE,IAAI,EAAC,WAAW,EAAA,CAAG,CAC3F,CACI;;;;;;;;"}
@@ -1,2 +1,2 @@
1
- import{r as registerInstance,c as createEvent,h,H as Host,a as getElement}from"./index-DHPhrb5T.js";import{c as closest}from"./closest-DnUJodVd.js";var pdsTableHeadCss=":host{--border-head-default:var(--pine-border-width-thin) solid var(--pine-color-background-subtle);border-color:inherit;-webkit-box-sizing:border-box;box-sizing:border-box;display:table-header-group;vertical-align:middle}:host::part(checkbox-cell){background-color:var(--pine-color-background-container);inset-inline-start:var(--pine-dimension-none);position:-webkit-sticky;position:sticky;z-index:var(--pine-z-index-raised)}:host pds-table-checkbox-cell{-webkit-border-after:var(--border-head-default);border-block-end:var(--border-head-default)}:host([border]){-webkit-border-after:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);border-block-end:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);-webkit-border-before:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);border-block-start:var(--pine-border-width-thin) solid var(--pine-color-border-subtle)}:host([border]) pds-table-head-cell{-webkit-border-after:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);border-block-end:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);-webkit-border-before:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);border-block-start:var(--pine-border-width-thin) solid var(--pine-color-border-subtle)}:host([background]){background-color:var(--pine-color-background-subtle)}:host([background]) pds-table-head-cell{background-color:var(--pine-color-background-subtle)}";var PdsTableHead=function(){function e(e){var r=this;registerInstance(this,e);this.pdsTableSelectAll=createEvent(this,"pdsTableSelectAll");this.border=false;this.background=false;this.generateUniqueId=function(){var e=Math.random().toString(36).substring(2,8);var r=(new Date).toISOString().replace(/[:.]/g,"-");var t="".concat(e,"-").concat(r);return t};this.handleInput=function(e){r.isSelected=!e.target.checked;r.handleSelect(r.isSelected)};this.handleSelect=function(e){r.indeterminate=false;if(closest("pds-table-head",r.hostElement)){r.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:"ebcbe90052f2f4b5aa6e3a09a7b23c46e5aba90f",role:"row",part:"head"},this.tableRef&&this.tableRef.selectable&&h("pds-table-head-cell",{key:"cd43463e58db8244439d07b3826534a70028c1a4",part:this.tableRef.selectable?"checkbox-cell":""},h("pds-checkbox",{key:"d6f4e05806a2c823188bc01fdc7a299aab9bf7d7",componentId:this.generateUniqueId(),indeterminate:this.indeterminate,onInput:this.handleInput,label:"Select All Rows",hideLabel:true,checked:this.isSelected,part:"select-all-checkbox"})),h("slot",{key:"8f86dd51b56f5c37cdcfbd3b2513b0e92c6e4c14"}))};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,a as getElement}from"./index-DHPhrb5T.js";import{c as closest}from"./closest-DnUJodVd.js";var pdsTableHeadCss=":host{--border-head-default:var(--pine-border-width-thin) solid var(--pine-color-background-subtle);border-color:inherit;-webkit-box-sizing:border-box;box-sizing:border-box;display:table-header-group;vertical-align:middle}:host::part(checkbox-cell){background-color:var(--pine-color-background-container);inset-inline-start:var(--pine-dimension-none);position:-webkit-sticky;position:sticky;z-index:var(--pine-z-index-raised)}:host pds-table-checkbox-cell{-webkit-border-after:var(--border-head-default);border-block-end:var(--border-head-default)}:host([border]){-webkit-border-after:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);border-block-end:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);-webkit-border-before:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);border-block-start:var(--pine-border-width-thin) solid var(--pine-color-border-subtle)}:host([border]) pds-table-head-cell{-webkit-border-after:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);border-block-end:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);-webkit-border-before:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);border-block-start:var(--pine-border-width-thin) solid var(--pine-color-border-subtle)}:host([background]){background-color:var(--pine-color-background-subtle)}:host([background]) pds-table-head-cell{background-color:var(--pine-color-background-subtle)}";var PdsTableHead=function(){function e(e){var r=this;registerInstance(this,e);this.pdsTableSelectAll=createEvent(this,"pdsTableSelectAll");this.border=false;this.background=false;this.generateUniqueId=function(){var e=Math.random().toString(36).substring(2,8);var r=(new Date).toISOString().replace(/[:.]/g,"-");var t="".concat(e,"-").concat(r);return t};this.handleInput=function(e){r.isSelected=!e.target.checked;r.handleSelect(r.isSelected)};this.handleSelect=function(e){r.indeterminate=false;if(closest("pds-table-head",r.hostElement)){r.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:"b68c0d7259cfced019c138dc4504c142e7e12ff9",role:"row",part:"head"},this.tableRef&&this.tableRef.selectable&&h("pds-table-head-cell",{key:"90c91ee525359986e7878e8ae647411bf9b4a637",part:this.tableRef.selectable?"checkbox-cell":""},h("pds-checkbox",{key:"d79ebef09df3424ed36d8838ecdc5ca6a0029c8a",componentId:this.generateUniqueId(),indeterminate:this.indeterminate,onInput:this.handleInput,label:"Select All Rows",hideLabel:true,checked:this.isSelected,part:"select-all-checkbox"})),h("slot",{key:"17eca8a861fceb73b8d957ab0d5ba2cf7b256b55"}))};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,a as getElement}from"./index-DHPhrb5T.js";import{c as closest}from"./closest-DnUJodVd.js";var pdsTableRowCss=":host{--color-background-interactive:var(--pine-color-border-disabled);border-color:inherit;display:table-row;vertical-align:inherit}:host::part(checkbox-cell){background-color:var(--pine-color-background-container);inset-inline-start:var(--pine-dimension-none);position:-webkit-sticky;position:sticky;z-index:var(--pine-z-index-raised)}:host(:hover),:host(:hover)::part(checkbox-cell),:host(:hover) ::slotted(pds-table-cell),:host(.is-selected),:host(.is-selected)::part(checkbox-cell),:host(.is-selected) ::slotted(pds-table-cell){background:var(--color-background-interactive)}:host(.has-divider) ::slotted(pds-table-cell),:host(.has-divider) pds-table-cell{-webkit-border-after:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);border-block-end:var(--pine-border-width-thin) solid var(--pine-color-border-subtle)}:host(.has-divider.is-last-row) ::slotted(pds-table-cell),:host(.has-divider.is-last-row) pds-table-cell{-webkit-border-after:0;border-block-end:0}";var PdsTableRow=function(){function t(t){var e=this;registerInstance(this,t);this.pdsTableRowSelected=createEvent(this,"pdsTableRowSelected");this.observer=null;this.bodyObserver=null;this.hasDivider=false;this.isLastRow=false;this.handleClick=function(){e.isSelected=!e.isSelected;e.handleSelect(e.isSelected)};this.handleSelect=function(t){e.indeterminate=false;if(!closest("pds-table-head",e.hostElement)){var i=Array.from(e.hostElement.parentNode.children).indexOf(e.hostElement);e.pdsTableRowSelected.emit({rowIndex:i,isSelected:t})}};this.generateUniqueId=function(){var t=Math.random().toString(36).substring(2,8);var e=(new Date).toISOString().replace(/[:.]/g,"-");var i="".concat(t,"-").concat(e);return i}}t.prototype.classNames=function(){var t=[];if(this.isSelected){t.push("is-selected")}if(this.hasDivider){t.push("has-divider")}if(this.isLastRow){t.push("is-last-row")}return t.join(" ")};t.prototype.componentWillRender=function(){this.tableRef=this.hostElement.closest("pds-table");if(this.tableRef&&this.tableRef.fixedColumn){var t=this.hostElement.querySelector("pds-table-cell");t===null||t===void 0?void 0:t.classList.add("is-fixed")}};t.prototype.componentWillLoad=function(){if(this.isSelected){this.handleSelect(this.isSelected)}};t.prototype.connectedCallback=function(){this.tableRef=this.hostElement.closest("pds-table");this.setupObservers();this.updateDividerState()};t.prototype.disconnectedCallback=function(){this.cleanupObservers()};t.prototype.cleanupObservers=function(){if(this.observer){this.observer.disconnect();this.observer=null}if(this.bodyObserver){this.bodyObserver.disconnect();this.bodyObserver=null}};t.prototype.setupObservers=function(){var t=this;this.cleanupObservers();if(this.tableRef&&typeof MutationObserver!=="undefined"){this.observer=new MutationObserver((function(){t.updateDividerState()}));this.observer.observe(this.tableRef,{attributes:true,attributeFilter:["row-dividers"]})}var e=this.hostElement.closest("pds-table-body");if(e&&typeof MutationObserver!=="undefined"){this.bodyObserver=new MutationObserver((function(){t.updateLastRowState()}));this.bodyObserver.observe(e,{childList:true})}};t.prototype.shouldHaveDivider=function(){if(!this.tableRef){this.tableRef=this.hostElement.closest("pds-table")}return!!(this.tableRef&&this.tableRef.rowDividers)};t.prototype.updateDividerState=function(){this.hasDivider=this.shouldHaveDivider();this.updateLastRowState()};t.prototype.updateLastRowState=function(){if(!this.hasDivider){this.isLastRow=false;return}var t=this.hostElement.closest("pds-table-body");if(t){var e=Array.from(t.querySelectorAll("pds-table-row"));this.isLastRow=e[e.length-1]===this.hostElement}else{this.isLastRow=false}};t.prototype.render=function(){return h(Host,{key:"dedf37f2841e51a325b6c414d3e7ec0072bdf78f",class:this.classNames(),role:"row",part:"row"},this.tableRef&&this.tableRef.selectable&&h("pds-table-cell",{key:"3e9295398c8f48cb7aa78d10daf5201ae8f86e9f",part:this.tableRef.fixedColumn?"checkbox-cell":"checkbox-cell",class:this.tableRef.selectable?"has-checkbox":""},h("pds-checkbox",{key:"b786f181988110d3e3d47928da9290dfd79f5fbd",componentId:this.generateUniqueId(),onClick:this.handleClick,indeterminate:this.indeterminate,label:"Select Row",hideLabel:true,checked:this.isSelected,part:"row-checkbox"})),h("slot",{key:"d37e3d44d34f81553060185d96fb44a55a40edc8"}))};Object.defineProperty(t.prototype,"hostElement",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();PdsTableRow.style=pdsTableRowCss;export{PdsTableRow as pds_table_row};
1
+ import{r as registerInstance,c as createEvent,h,H as Host,a as getElement}from"./index-DHPhrb5T.js";import{c as closest}from"./closest-DnUJodVd.js";var pdsTableRowCss=":host{--color-background-interactive:var(--pine-color-border-disabled);border-color:inherit;display:table-row;vertical-align:inherit}:host::part(checkbox-cell){background-color:var(--pine-color-background-container);inset-inline-start:var(--pine-dimension-none);position:-webkit-sticky;position:sticky;z-index:var(--pine-z-index-raised)}:host(:hover),:host(:hover)::part(checkbox-cell),:host(:hover) ::slotted(pds-table-cell),:host(.is-selected),:host(.is-selected)::part(checkbox-cell),:host(.is-selected) ::slotted(pds-table-cell){background:var(--color-background-interactive)}:host(.has-divider) ::slotted(pds-table-cell),:host(.has-divider) pds-table-cell{-webkit-border-after:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);border-block-end:var(--pine-border-width-thin) solid var(--pine-color-border-subtle)}:host(.has-divider.is-last-row) ::slotted(pds-table-cell),:host(.has-divider.is-last-row) pds-table-cell{-webkit-border-after:0;border-block-end:0}";var PdsTableRow=function(){function t(t){var e=this;registerInstance(this,t);this.pdsTableRowSelected=createEvent(this,"pdsTableRowSelected");this.observer=null;this.bodyObserver=null;this.hasDivider=false;this.isLastRow=false;this.handleClick=function(){e.isSelected=!e.isSelected;e.handleSelect(e.isSelected)};this.handleSelect=function(t){e.indeterminate=false;if(!closest("pds-table-head",e.hostElement)){var i=Array.from(e.hostElement.parentNode.children).indexOf(e.hostElement);e.pdsTableRowSelected.emit({rowIndex:i,isSelected:t})}};this.generateUniqueId=function(){var t=Math.random().toString(36).substring(2,8);var e=(new Date).toISOString().replace(/[:.]/g,"-");var i="".concat(t,"-").concat(e);return i}}t.prototype.classNames=function(){var t=[];if(this.isSelected){t.push("is-selected")}if(this.hasDivider){t.push("has-divider")}if(this.isLastRow){t.push("is-last-row")}return t.join(" ")};t.prototype.componentWillRender=function(){this.tableRef=this.hostElement.closest("pds-table");if(this.tableRef&&this.tableRef.fixedColumn){var t=this.hostElement.querySelector("pds-table-cell");t===null||t===void 0?void 0:t.classList.add("is-fixed")}};t.prototype.componentWillLoad=function(){if(this.isSelected){this.handleSelect(this.isSelected)}};t.prototype.connectedCallback=function(){this.tableRef=this.hostElement.closest("pds-table");this.setupObservers();this.updateDividerState()};t.prototype.disconnectedCallback=function(){this.cleanupObservers()};t.prototype.cleanupObservers=function(){if(this.observer){this.observer.disconnect();this.observer=null}if(this.bodyObserver){this.bodyObserver.disconnect();this.bodyObserver=null}};t.prototype.setupObservers=function(){var t=this;this.cleanupObservers();if(this.tableRef&&typeof MutationObserver!=="undefined"){this.observer=new MutationObserver((function(){t.updateDividerState()}));this.observer.observe(this.tableRef,{attributes:true,attributeFilter:["row-dividers"]})}var e=this.hostElement.closest("pds-table-body");if(e&&typeof MutationObserver!=="undefined"){this.bodyObserver=new MutationObserver((function(){t.updateLastRowState()}));this.bodyObserver.observe(e,{childList:true})}};t.prototype.shouldHaveDivider=function(){if(!this.tableRef){this.tableRef=this.hostElement.closest("pds-table")}return!!(this.tableRef&&this.tableRef.rowDividers)};t.prototype.updateDividerState=function(){this.hasDivider=this.shouldHaveDivider();this.updateLastRowState()};t.prototype.updateLastRowState=function(){if(!this.hasDivider){this.isLastRow=false;return}var t=this.hostElement.closest("pds-table-body");if(t){var e=Array.from(t.querySelectorAll("pds-table-row"));this.isLastRow=e[e.length-1]===this.hostElement}else{this.isLastRow=false}};t.prototype.render=function(){return h(Host,{key:"900905bc103a54d3f13b59a66cfd53178de0da49",class:this.classNames(),role:"row",part:"row"},this.tableRef&&this.tableRef.selectable&&h("pds-table-cell",{key:"f5a5a0426f15182e278b052090c71f45e8848347",part:this.tableRef.fixedColumn?"checkbox-cell":"checkbox-cell",class:this.tableRef.selectable?"has-checkbox":""},h("pds-checkbox",{key:"1fd91b0d4bf412dc3a2705fcb5909e42a54bde56",componentId:this.generateUniqueId(),onClick:this.handleClick,indeterminate:this.indeterminate,label:"Select Row",hideLabel:true,checked:this.isSelected,part:"row-checkbox"})),h("slot",{key:"17a60a0251a36613cc8631efe780020d4a5e1167"}))};Object.defineProperty(t.prototype,"hostElement",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();PdsTableRow.style=pdsTableRowCss;export{PdsTableRow as pds_table_row};
2
2
  //# sourceMappingURL=pds-table-row.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as registerInstance,h,H as Host,a as getElement}from"./index-DHPhrb5T.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:"f7a2009fbf7cb1da7aaed92c64fd4e80b83c9ad3",slot:"tabpanels"},h("div",{key:"696804cadb97707558ef8c4a7cb90529fbf14c87",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:"25b1a21995505a25af429038d2b3394063db723f"})))};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,a as getElement}from"./index-DHPhrb5T.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:"0f64285738a96afa3cf2e1134201e942cf04b0ee",slot:"tabpanels"},h("div",{key:"f677ed3b377ce2f5f6868831369338829af89868",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:"46a236b465f387508aa494ecf80aa146cecd4ade"})))};Object.defineProperty(a.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return a}();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,a as getElement}from"./index-DHPhrb5T.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-background-app);border:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);border-radius:var(--pine-dimension-100);display:-ms-inline-flexbox;display:inline-flex;display:-ms-flexbox;display:flex;gap:0;height:var(--pine-dimension-450)}";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 t=["ArrowLeft","ArrowRight","Home","End"];var a=s.target;var i=a.closest("pds-tab");var e=i&&i.closest("pds-tabs")===this.el;if(t.includes(s.key)&&e){s.preventDefault();this.moveActiveTab(s.key)}};s.prototype.moveActiveTab=function(s){var t=0;var a=this.tabs.length-1;var i=null;switch(s){case"ArrowLeft":i=this.activeTabIndex===t?a:this.activeTabIndex+-1;break;case"ArrowRight":i=this.activeTabIndex===a?t:this.activeTabIndex+1;break;case"Home":i=t;break;case"End":i=a;break}this.tabs[i].children[0].focus();this.activeTabName=this.tabs[i].name;this.activeTabIndex=i};s.prototype.findAllChildren=function(){var s=this;var t=Array.from(this.el.querySelectorAll("pds-tab"));var a=Array.from(this.el.querySelectorAll("pds-tabpanel"));this.tabs=t.filter((function(t){return t.closest("pds-tabs")===s.el}));this.tabPanels=a.filter((function(t){return t.closest("pds-tabs")===s.el}))};s.prototype.propGeneration=function(s,t){if(t===void 0){t=0}s.parentComponentId=this.componentId.toString();s.variant=this.variant.toString();s.selected=this.activeTabName===s.name?true:false;s["index"]=t};s.prototype.passPropsToChildren=function(){var s=this;this.tabs.forEach((function(t,a){if(s.activeTabName===t.name)s.activeTabIndex=a;s.propGeneration(t,a)}));this.tabPanels.forEach((function(t){s.propGeneration(t)}))};s.prototype.classNames=function(){var s="pds-tabs";if(this.variant&&this.variant!="primary"){var t="pds-tabs--".concat(this.variant);s+=" "+t}return s};s.prototype.componentWillLoad=function(){this.findAllChildren()};s.prototype.componentWillRender=function(){this.passPropsToChildren()};s.prototype.render=function(){return h(Host,{key:"94465ebf3e3a10ff9171a8bd890cab85cff52636","active-tab-name":this.activeTabName,class:this.classNames(),id:this.componentId},h("div",{key:"3af742499e795c9b4c89d0537aa45679e02cc3b7",class:"pds-tabs__tablist",role:"tablist","aria-label":this.tablistLabel,part:"tab-list"},h("slot",{key:"655e6686afd2bc5823c69259f8ee0ba943905ecd",name:"tabs"})),h("slot",{key:"7fdebe4e77cb52ad481ca12af0796db825d31365",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,a as getElement}from"./index-DHPhrb5T.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-background-app);border:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);border-radius:var(--pine-dimension-100);display:-ms-inline-flexbox;display:inline-flex;display:-ms-flexbox;display:flex;gap:0;height:var(--pine-dimension-450)}";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 t=["ArrowLeft","ArrowRight","Home","End"];var i=s.target;var a=i.closest("pds-tab");var e=a&&a.closest("pds-tabs")===this.el;if(t.includes(s.key)&&e){s.preventDefault();this.moveActiveTab(s.key)}};s.prototype.moveActiveTab=function(s){var t=0;var i=this.tabs.length-1;var a=null;switch(s){case"ArrowLeft":a=this.activeTabIndex===t?i:this.activeTabIndex+-1;break;case"ArrowRight":a=this.activeTabIndex===i?t:this.activeTabIndex+1;break;case"Home":a=t;break;case"End":a=i;break}this.tabs[a].children[0].focus();this.activeTabName=this.tabs[a].name;this.activeTabIndex=a};s.prototype.findAllChildren=function(){var s=this;var t=Array.from(this.el.querySelectorAll("pds-tab"));var i=Array.from(this.el.querySelectorAll("pds-tabpanel"));this.tabs=t.filter((function(t){return t.closest("pds-tabs")===s.el}));this.tabPanels=i.filter((function(t){return t.closest("pds-tabs")===s.el}))};s.prototype.propGeneration=function(s,t){if(t===void 0){t=0}s.parentComponentId=this.componentId.toString();s.variant=this.variant.toString();s.selected=this.activeTabName===s.name?true:false;s["index"]=t};s.prototype.passPropsToChildren=function(){var s=this;this.tabs.forEach((function(t,i){if(s.activeTabName===t.name)s.activeTabIndex=i;s.propGeneration(t,i)}));this.tabPanels.forEach((function(t){s.propGeneration(t)}))};s.prototype.classNames=function(){var s="pds-tabs";if(this.variant&&this.variant!="primary"){var t="pds-tabs--".concat(this.variant);s+=" "+t}return s};s.prototype.componentWillLoad=function(){this.findAllChildren()};s.prototype.componentWillRender=function(){this.passPropsToChildren()};s.prototype.render=function(){return h(Host,{key:"fee342f0fbc06387fd964a518c0e97a091d1aded","active-tab-name":this.activeTabName,class:this.classNames(),id:this.componentId},h("div",{key:"7512b1d02a8320aad1e2934428dec970ff0c1743",class:"pds-tabs__tablist",role:"tablist","aria-label":this.tablistLabel,part:"tab-list"},h("slot",{key:"dccf28dad2d084185e5f1b0f1f1eeab1c77cd541",name:"tabs"})),h("slot",{key:"bd8b9040808925ea5f1c73c06d636f35c297b4b7",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,a as getElement}from"./index-DHPhrb5T.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-text-tertiary);text-decoration-color:var(--pine-color-text-tertiary);-webkit-text-decoration-line:underline;text-decoration-line:underline;-webkit-text-decoration-style:dotted;text-decoration-style:dotted;text-decoration-thickness:12%;text-underline-offset:0.3rem;text-underline-position:under}:host([decoration=strikethrough])>*{text-decoration:line-through}h1{font:var(--pine-typography-heading-1);letter-spacing:var(--pine-letter-spacing-heading-1)}h2{font:var(--pine-typography-heading-2);letter-spacing:var(--pine-letter-spacing-heading-2)}h3{font:var(--pine-typography-heading-3);letter-spacing:var(--pine-letter-spacing-heading-3)}h4{font:var(--pine-typography-heading-4);letter-spacing:var(--pine-letter-spacing-heading-4)}h5{font:var(--pine-typography-heading-5);letter-spacing:var(--pine-letter-spacing-heading-5)}h6{font:var(--pine-typography-heading-6);letter-spacing:var(--pine-letter-spacing-heading-6)}code,em,p,pre,strong{font:var(--pine-typography-body);letter-spacing:var(--pine-letter-spacing)}code,pre{font-family:monospace;letter-spacing:0;line-height:1}em{font-style:normal}strong{font-weight:bolder}:host([truncate])>*{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:"42a62bfa709c5d093d6559ed073486b6a74e6bf5",style:this.color&&setColor(this.color),class:t,part:"content"},h("slot",{key:"46dd8be0670070f381bad21df56307595a5c94c9"}))};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,a as getElement}from"./index-DHPhrb5T.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-text-tertiary);text-decoration-color:var(--pine-color-text-tertiary);-webkit-text-decoration-line:underline;text-decoration-line:underline;-webkit-text-decoration-style:dotted;text-decoration-style:dotted;text-decoration-thickness:12%;text-underline-offset:0.3rem;text-underline-position:under}:host([decoration=strikethrough])>*{text-decoration:line-through}h1{font:var(--pine-typography-heading-1);letter-spacing:var(--pine-letter-spacing-heading-1)}h2{font:var(--pine-typography-heading-2);letter-spacing:var(--pine-letter-spacing-heading-2)}h3{font:var(--pine-typography-heading-3);letter-spacing:var(--pine-letter-spacing-heading-3)}h4{font:var(--pine-typography-heading-4);letter-spacing:var(--pine-letter-spacing-heading-4)}h5{font:var(--pine-typography-heading-5);letter-spacing:var(--pine-letter-spacing-heading-5)}h6{font:var(--pine-typography-heading-6);letter-spacing:var(--pine-letter-spacing-heading-6)}code,em,p,pre,strong{font:var(--pine-typography-body);letter-spacing:var(--pine-letter-spacing)}code,pre{font-family:monospace;letter-spacing:0;line-height:1}em{font-style:normal}strong{font-weight:bolder}:host([truncate])>*{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:"5f7d43603c8d412a375d2e49818b363b5e9a142b",style:this.color&&setColor(this.color),class:t,part:"content"},h("slot",{key:"702d5065297e0405295aa941cd39dba38787519e"}))};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,a as getElement}from"./index-DHPhrb5T.js";import{i as isRequired,e as exposeTypeProperty,a as assignDescription,m as messageId}from"./form-DwjNklzi.js";import{d as debounceEvent}from"./utils-tJa4KYNO.js";import{i as inheritAriaAttributes,a as inheritAttributes}from"./attributes-C0M1gTKv.js";import{b as danger}from"./index-xbb79yLt.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-block;width:100%}:host([aria-readonly=true]) textarea{background-color:var(--pine-color-background-container-disabled);color:var(--pine-color-text-readonly)}:host([highlight]:not([disabled]):not([aria-disabled=true]):not([aria-readonly=true])) .pds-textarea__field:not(.is-invalid){background-color:var(--pine-color-accent-disabled);border-color:var(--pine-color-accent);color:var(--pine-color-text-accent)}:host([highlight]:not([disabled]):not([aria-disabled=true]):not([aria-readonly=true])) .pds-textarea__field:not(.is-invalid):hover{border-color:var(--pine-color-accent-hover)}:host([highlight]:not([disabled]):not([aria-disabled=true]):not([aria-readonly=true])) .pds-textarea__field:not(.is-invalid):focus-visible{outline-color:var(--pine-color-focus-ring)}:host([highlight]:not([disabled]):not([aria-disabled=true]):not([aria-readonly=true])) .pds-textarea__field:not(.is-invalid)~.pds-textarea__character-counter{background:color-mix(in srgb, var(--pine-color-accent-disabled) 80%, transparent);color:var(--pine-color-text-accent)}.pds-textarea{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.pds-textarea__label-wrapper{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}.pds-textarea__action{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;gap:var(--pine-dimension-xs);-webkit-margin-start:var(--pine-dimension-xs);margin-inline-start:var(--pine-dimension-xs)}label{display:block;-webkit-margin-after:var(--pine-dimension-xs);margin-block-end:var(--pine-dimension-xs)}.pds-textarea__label-wrapper label{-webkit-margin-after:0;margin-block-end:0}.pds-textarea__helper-message{color:var(--pine-color-text-message);font:var(--pine-typography-body-sm-medium);-webkit-margin-before:var(--pine-dimension-2xs);margin-block-start:var(--pine-dimension-2xs)}.pds-textarea__error-message{color:var(--pine-color-text-message-danger);display:-ms-flexbox;display:flex;font:var(--pine-typography-body-sm-medium);gap:var(--pine-dimension-2xs);-webkit-margin-before:var(--pine-dimension-2xs);margin-block-start:var(--pine-dimension-2xs)}.pds-textarea__error-message pds-icon{-webkit-margin-before:var(--pine-dimension-025);margin-block-start:var(--pine-dimension-025)}.pds-textarea__field-wrapper{display:inline-block;position:relative;width:100%}.pds-textarea__field{background-color:var(--pine-color-background-container);border:var(--pine-border);border-radius:calc(var(--pine-dimension-xs) * 1.25);-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--pine-color-text);font:var(--pine-typography-body);letter-spacing:var(--pine-letter-spacing);min-height:calc(var(--pine-dimension-xl) * 2);min-width:calc(var(--pine-dimension-xl) * 2);padding:var(--pine-dimension-xs) var(--pine-dimension-sm);resize:both;width:100%}:host([max-length]) .pds-textarea__field{padding-bottom:calc(var(--pine-dimension-xs) + var(--pine-dimension-md))}.pds-textarea__field:hover:not(:disabled,.is-invalid){border:var(--pine-border-hover)}.pds-textarea__field:disabled{background-color:var(--pine-color-background-container-disabled);color:var(--pine-color-text-disabled);cursor:not-allowed}.pds-textarea__field:focus-visible{outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}.pds-textarea__field::-webkit-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-textarea__field::-moz-placeholder{color:var(--pine-color-text-placeholder)}.pds-textarea__field:-ms-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-textarea__field::-ms-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-textarea__field::placeholder{color:var(--pine-color-text-placeholder)}.pds-textarea__field.is-invalid{background-color:var(--pine-input-color-background-danger);border-color:var(--pine-color-border-danger)}:host-context([data-theme=dark]) .pds-textarea__field.is-invalid{background-color:var(--pine-color-red-950)}.pds-textarea__field.is-invalid:focus-visible{outline-color:var(--pine-color-focus-ring-danger)}.pds-textarea__character-counter{background:color-mix(in srgb, var(--pine-color-background-container) 80%, transparent);border-radius:calc(var(--pine-dimension-2xs) * 0.5);color:var(--pine-color-text-muted);font:var(--pine-typography-body-sm-medium);padding:calc(var(--pine-dimension-2xs) * 0.5) var(--pine-dimension-2xs);pointer-events:none;position:absolute;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;z-index:var(--pine-z-index)}:host([aria-disabled=true]) .pds-textarea__character-counter{background-color:var(--pine-color-background-container-disabled);color:var(--pine-color-text-disabled)}:host([aria-readonly=true]) .pds-textarea__character-counter{background-color:var(--pine-color-background-container-disabled);color:var(--pine-color-text-readonly)}.pds-textarea__field.is-invalid~.pds-textarea__character-counter{background-color:var(--pine-input-color-background-danger)}:host-context([data-theme=dark]) .pds-textarea__field.is-invalid~.pds-textarea__character-counter{background-color:var(--pine-color-red-950)}.visually-hidden{border:0;clip:rect(0 0 0 0);-webkit-clip-path:polygon(0 0, 0 0, 0 0);clip-path:polygon(0 0, 0 0, 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}";var PdsTextarea=function(){function e(e){var i=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.pdsKeyDown=createEvent(this,"pdsKeyDown");this.inheritedAttributes={};this._type="textarea";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){i.hasFocus=false;if(i.focusedValue!==i.value){i.emitValueChange(e)}i.pdsBlur.emit(e)};this.onFocus=function(e){i.hasFocus=true;i.focusedValue=i.value;i.pdsFocus.emit(e)};this.onInput=function(e){var t=e.target;if(t){if(i.maxLength&&t.value.length>i.maxLength){t.value=t.value.substring(0,i.maxLength)}i.value=t.value||""}i.emitInputChange(e);if(i.maxLength&&typeof ResizeObserver!=="undefined"){requestAnimationFrame((function(){i.updateCharacterCounterPosition()}))}};this.onTextareaChange=function(e){i.emitValueChange(e)};this.onKeyDown=function(e){i.pdsKeyDown.emit(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,i=e.pdsInput,t=e.debounce,a=e.originalPdsInput;this.pdsInput=t===undefined?a!==null&&a!==void 0?a:i:debounceEvent(i,t)};e.prototype.valueChanged=function(){var e=this.nativeTextarea;var i=this.getValue();if(e&&e.value!==i){e.value=i}this.updateFormValue();if(this.maxLength&&typeof ResizeObserver!=="undefined"){this.updateCharacterCounterPosition()}};e.prototype.maxLengthChanged=function(){if(this.resizeObserver){this.resizeObserver.disconnect()}if(this.maxLength&&this.nativeTextarea){this.setupResizeObserver()}if(this.internals&&this.internals.setValidity&&this.nativeTextarea){var e=this.nativeTextarea.value.length>(this.maxLength||0);this.internals.setValidity({tooLong:e},e?"Value exceeds maxLength":"",this.nativeTextarea)}};e.prototype.emitInputChange=function(e){var i=this.value;this.pdsInput.emit({value:i,event:e})};e.prototype.emitValueChange=function(e){var i=e.target;isRequired(i,this);var t=i.value;var a=t==null?t:t.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.disconnectedCallback=function(){if(this.resizeObserver){this.resizeObserver.disconnect()}};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(){var e=this;this.originalPdsInput=this.pdsInput;this.updateFormValue();this.setupResizeObserver();exposeTypeProperty(this.el,(function(){return e._type}))};e.prototype.setupResizeObserver=function(){var e=this;if(!this.maxLength||!this.nativeTextarea)return;if(typeof ResizeObserver!=="undefined"){this.resizeObserver=new ResizeObserver((function(){requestAnimationFrame((function(){e.updateCharacterCounterPosition()}))}));this.resizeObserver.observe(this.nativeTextarea);requestAnimationFrame((function(){e.updateCharacterCounterPosition()}))}};e.prototype.updateCharacterCounterPosition=function(){if(!this.characterCounter||!this.nativeTextarea)return;if(typeof ResizeObserver==="undefined")return;if(this.characterCounter.offsetWidth===0||this.characterCounter.offsetHeight===0){return}var e=this.nativeTextarea.offsetWidth;var i=this.nativeTextarea.offsetHeight;var t=this.characterCounter.offsetWidth;var a=this.characterCounter.offsetHeight;var r=e-t-8;var s=i-a-8;var n=Math.max(8,Math.min(r,e-t-8));var o=Math.max(8,Math.min(s,i-a-8));this.characterCounter.style.position="absolute";this.characterCounter.style.left="".concat(n,"px");this.characterCounter.style.top="".concat(o,"px");this.characterCounter.style.right="auto";this.characterCounter.style.bottom="auto"};e.prototype.renderCharacterCounter=function(){var e=this;if(!this.maxLength){return null}var i=this.getValue().length;return h("div",{class:"pds-textarea__character-counter",ref:function(i){return e.characterCounter=i},role:"status","aria-live":"polite","aria-label":"".concat(i," of ").concat(this.maxLength," characters")},i," / ",this.maxLength)};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 i=e.get(this.name);if(typeof i==="string"){this.value=i}}};e.prototype.render=function(){var e=this;var i=this.getValue();return h(Host,{key:"294f37b2751fd4fbc16e7b2cca62d1a5200b7f4e","aria-disabled":this.disabled?"true":null,"aria-readonly":this.readonly?"true":null,"has-action":this.hasAction&&!this.hideLabel?"true":null},h("div",{key:"b785c5740642dafcdb771f3a9ffb933d8ada3f4e",class:"pds-textarea"},this.label&&h("div",{key:"31ad1d39efe78fc7a29e48d4a8d228a97422eba9",class:"pds-textarea__label-wrapper"},h("label",{key:"e37a18d36bffa47f00d5d3376df45b3f35c3e8a3",htmlFor:this.componentId},h("span",{key:"fc2d376e1dc976c3004f6ab225c921ebc7e46dd4",class:this.hideLabel?"visually-hidden":""},this.label)),!this.hideLabel&&this.renderAction()),h("div",{key:"7b5db43c23fb9a2ddb3ebec0b684953a4b043ea1",class:"pds-textarea__field-wrapper"},h("textarea",Object.assign({key:"81355164c2b01ab7ef5d6adcb3f92a59eec2692f",ref:function(i){return e.nativeTextarea=i},"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,maxlength:this.maxLength,name:this.name,placeholder:this.placeholder,readOnly:this.readonly,required:this.required,rows:this.rows,onBlur:this.onBlur,onChange:this.onTextareaChange,onFocus:this.onFocus,onInput:this.onInput,onKeyDown:this.onKeyDown},this.inheritedAttributes),i),this.renderCharacterCounter()),this.helperMessage&&h("p",{key:"abcdf1ef2aa24d0057e5b0c212c06b5324f0dd9b",class:"pds-textarea__helper-message",id:messageId(this.componentId,"helper")},this.helperMessage),this.invalid&&h("p",{key:"1c526c2aae382caabe83ff5e3dadd7510371a656","aria-live":"assertive",class:"pds-textarea__error-message",id:messageId(this.componentId,"error")},h("pds-icon",{key:"e8a0960b0e2dbacfe46113b3f1162e35d301afac",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"],maxLength:["maxLengthChanged"]}},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,a as getElement}from"./index-DHPhrb5T.js";import{i as isRequired,e as exposeTypeProperty,a as assignDescription,m as messageId}from"./form-DwjNklzi.js";import{d as debounceEvent}from"./utils-tJa4KYNO.js";import{i as inheritAriaAttributes,a as inheritAttributes}from"./attributes-C0M1gTKv.js";import{b as danger}from"./index-DY8eSueV.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-block;width:100%}:host([aria-readonly=true]) textarea{background-color:var(--pine-color-background-container-disabled);color:var(--pine-color-text-readonly)}:host([highlight]:not([disabled]):not([aria-disabled=true]):not([aria-readonly=true])) .pds-textarea__field:not(.is-invalid){background-color:var(--pine-color-accent-disabled);border-color:var(--pine-color-accent);color:var(--pine-color-text-accent)}:host([highlight]:not([disabled]):not([aria-disabled=true]):not([aria-readonly=true])) .pds-textarea__field:not(.is-invalid):hover{border-color:var(--pine-color-accent-hover)}:host([highlight]:not([disabled]):not([aria-disabled=true]):not([aria-readonly=true])) .pds-textarea__field:not(.is-invalid):focus-visible{outline-color:var(--pine-color-focus-ring)}:host([highlight]:not([disabled]):not([aria-disabled=true]):not([aria-readonly=true])) .pds-textarea__field:not(.is-invalid)~.pds-textarea__character-counter{background:color-mix(in srgb, var(--pine-color-accent-disabled) 80%, transparent);color:var(--pine-color-text-accent)}.pds-textarea{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.pds-textarea__label-wrapper{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}.pds-textarea__action{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;gap:var(--pine-dimension-xs);-webkit-margin-start:var(--pine-dimension-xs);margin-inline-start:var(--pine-dimension-xs)}label{display:block;-webkit-margin-after:var(--pine-dimension-xs);margin-block-end:var(--pine-dimension-xs)}.pds-textarea__label-wrapper label{-webkit-margin-after:0;margin-block-end:0}.pds-textarea__helper-message{color:var(--pine-color-text-message);font:var(--pine-typography-body-sm-medium);-webkit-margin-before:var(--pine-dimension-2xs);margin-block-start:var(--pine-dimension-2xs)}.pds-textarea__error-message{color:var(--pine-color-text-message-danger);display:-ms-flexbox;display:flex;font:var(--pine-typography-body-sm-medium);gap:var(--pine-dimension-2xs);-webkit-margin-before:var(--pine-dimension-2xs);margin-block-start:var(--pine-dimension-2xs)}.pds-textarea__error-message pds-icon{-webkit-margin-before:var(--pine-dimension-025);margin-block-start:var(--pine-dimension-025)}.pds-textarea__field-wrapper{display:inline-block;position:relative;width:100%}.pds-textarea__field{background-color:var(--pine-color-background-container);border:var(--pine-border);border-radius:calc(var(--pine-dimension-xs) * 1.25);-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--pine-color-text);font:var(--pine-typography-body);letter-spacing:var(--pine-letter-spacing);min-height:calc(var(--pine-dimension-xl) * 2);min-width:calc(var(--pine-dimension-xl) * 2);padding:var(--pine-dimension-xs) var(--pine-dimension-sm);resize:both;width:100%}:host([max-length]) .pds-textarea__field{padding-bottom:calc(var(--pine-dimension-xs) + var(--pine-dimension-md))}.pds-textarea__field:hover:not(:disabled,.is-invalid){border:var(--pine-border-hover)}.pds-textarea__field:disabled{background-color:var(--pine-color-background-container-disabled);color:var(--pine-color-text-disabled);cursor:not-allowed}.pds-textarea__field:focus-visible{outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}.pds-textarea__field::-webkit-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-textarea__field::-moz-placeholder{color:var(--pine-color-text-placeholder)}.pds-textarea__field:-ms-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-textarea__field::-ms-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-textarea__field::placeholder{color:var(--pine-color-text-placeholder)}.pds-textarea__field.is-invalid{background-color:var(--pine-input-color-background-danger);border-color:var(--pine-color-border-danger)}:host-context([data-theme=dark]) .pds-textarea__field.is-invalid{background-color:var(--pine-color-red-950)}.pds-textarea__field.is-invalid:focus-visible{outline-color:var(--pine-color-focus-ring-danger)}.pds-textarea__character-counter{background:color-mix(in srgb, var(--pine-color-background-container) 80%, transparent);border-radius:calc(var(--pine-dimension-2xs) * 0.5);color:var(--pine-color-text-muted);font:var(--pine-typography-body-sm-medium);padding:calc(var(--pine-dimension-2xs) * 0.5) var(--pine-dimension-2xs);pointer-events:none;position:absolute;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;z-index:var(--pine-z-index)}:host([aria-disabled=true]) .pds-textarea__character-counter{background-color:var(--pine-color-background-container-disabled);color:var(--pine-color-text-disabled)}:host([aria-readonly=true]) .pds-textarea__character-counter{background-color:var(--pine-color-background-container-disabled);color:var(--pine-color-text-readonly)}.pds-textarea__field.is-invalid~.pds-textarea__character-counter{background-color:var(--pine-input-color-background-danger)}:host-context([data-theme=dark]) .pds-textarea__field.is-invalid~.pds-textarea__character-counter{background-color:var(--pine-color-red-950)}.visually-hidden{border:0;clip:rect(0 0 0 0);-webkit-clip-path:polygon(0 0, 0 0, 0 0);clip-path:polygon(0 0, 0 0, 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}";var PdsTextarea=function(){function e(e){var i=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.pdsKeyDown=createEvent(this,"pdsKeyDown");this.inheritedAttributes={};this._type="textarea";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){i.hasFocus=false;if(i.focusedValue!==i.value){i.emitValueChange(e)}i.pdsBlur.emit(e)};this.onFocus=function(e){i.hasFocus=true;i.focusedValue=i.value;i.pdsFocus.emit(e)};this.onInput=function(e){var t=e.target;if(t){if(i.maxLength&&t.value.length>i.maxLength){t.value=t.value.substring(0,i.maxLength)}i.value=t.value||""}i.emitInputChange(e);if(i.maxLength&&typeof ResizeObserver!=="undefined"){requestAnimationFrame((function(){i.updateCharacterCounterPosition()}))}};this.onTextareaChange=function(e){i.emitValueChange(e)};this.onKeyDown=function(e){i.pdsKeyDown.emit(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,i=e.pdsInput,t=e.debounce,a=e.originalPdsInput;this.pdsInput=t===undefined?a!==null&&a!==void 0?a:i:debounceEvent(i,t)};e.prototype.valueChanged=function(){var e=this.nativeTextarea;var i=this.getValue();if(e&&e.value!==i){e.value=i}this.updateFormValue();if(this.maxLength&&typeof ResizeObserver!=="undefined"){this.updateCharacterCounterPosition()}};e.prototype.maxLengthChanged=function(){if(this.resizeObserver){this.resizeObserver.disconnect()}if(this.maxLength&&this.nativeTextarea){this.setupResizeObserver()}if(this.internals&&this.internals.setValidity&&this.nativeTextarea){var e=this.nativeTextarea.value.length>(this.maxLength||0);this.internals.setValidity({tooLong:e},e?"Value exceeds maxLength":"",this.nativeTextarea)}};e.prototype.emitInputChange=function(e){var i=this.value;this.pdsInput.emit({value:i,event:e})};e.prototype.emitValueChange=function(e){var i=e.target;isRequired(i,this);var t=i.value;var a=t==null?t:t.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.internals=this.el.attachInternals()}};e.prototype.disconnectedCallback=function(){if(this.resizeObserver){this.resizeObserver.disconnect()}};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(){var e=this;this.originalPdsInput=this.pdsInput;this.updateFormValue();this.setupResizeObserver();exposeTypeProperty(this.el,(function(){return e._type}))};e.prototype.setupResizeObserver=function(){var e=this;if(!this.maxLength||!this.nativeTextarea)return;if(typeof ResizeObserver!=="undefined"){this.resizeObserver=new ResizeObserver((function(){requestAnimationFrame((function(){e.updateCharacterCounterPosition()}))}));this.resizeObserver.observe(this.nativeTextarea);requestAnimationFrame((function(){e.updateCharacterCounterPosition()}))}};e.prototype.updateCharacterCounterPosition=function(){if(!this.characterCounter||!this.nativeTextarea)return;if(typeof ResizeObserver==="undefined")return;if(this.characterCounter.offsetWidth===0||this.characterCounter.offsetHeight===0){return}var e=this.nativeTextarea.offsetWidth;var i=this.nativeTextarea.offsetHeight;var t=this.characterCounter.offsetWidth;var a=this.characterCounter.offsetHeight;var r=e-t-8;var s=i-a-8;var n=Math.max(8,Math.min(r,e-t-8));var o=Math.max(8,Math.min(s,i-a-8));this.characterCounter.style.position="absolute";this.characterCounter.style.left="".concat(n,"px");this.characterCounter.style.top="".concat(o,"px");this.characterCounter.style.right="auto";this.characterCounter.style.bottom="auto"};e.prototype.renderCharacterCounter=function(){var e=this;if(!this.maxLength){return null}var i=this.getValue().length;return h("div",{class:"pds-textarea__character-counter",ref:function(i){return e.characterCounter=i},role:"status","aria-live":"polite","aria-label":"".concat(i," of ").concat(this.maxLength," characters")},i," / ",this.maxLength)};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 i=e.get(this.name);if(typeof i==="string"){this.value=i}}};e.prototype.render=function(){var e=this;var i=this.getValue();return h(Host,{key:"89ecd4a781f49c6db2efcb993ea5ce2cdcabab95","aria-disabled":this.disabled?"true":null,"aria-readonly":this.readonly?"true":null,"has-action":this.hasAction&&!this.hideLabel?"true":null},h("div",{key:"3970d9a4d469103ea6355b79642a67ea6be748df",class:"pds-textarea"},this.label&&h("div",{key:"74763078aefb4130859e2dac108c09ec70b7c57e",class:"pds-textarea__label-wrapper"},h("label",{key:"b40e73f522b76424a69b8423544deb3442d3d508",htmlFor:this.componentId},h("span",{key:"176b4c9fc6e41e0744a9a5e384b25c29ff759d6f",class:this.hideLabel?"visually-hidden":""},this.label)),!this.hideLabel&&this.renderAction()),h("div",{key:"f2b0730430d5c3830193c5af859a5e5e6665017a",class:"pds-textarea__field-wrapper"},h("textarea",Object.assign({key:"293a1b5fd1c5f7c58077ecd7967d28001b8d423c",ref:function(i){return e.nativeTextarea=i},"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,maxlength:this.maxLength,name:this.name,placeholder:this.placeholder,readOnly:this.readonly,required:this.required,rows:this.rows,onBlur:this.onBlur,onChange:this.onTextareaChange,onFocus:this.onFocus,onInput:this.onInput,onKeyDown:this.onKeyDown},this.inheritedAttributes),i),this.renderCharacterCounter()),this.helperMessage&&h("p",{key:"e9e848434ad237c6aeef144dbf7e23dee57caf55",class:"pds-textarea__helper-message",id:messageId(this.componentId,"helper")},this.helperMessage),this.invalid&&h("p",{key:"f1069f927a6d475a6b7dfa0f17eedcb04ed821ad","aria-live":"assertive",class:"pds-textarea__error-message",id:messageId(this.componentId,"error")},h("pds-icon",{key:"ad1105ae8d86d760d981a2fe3f888b219eaaa91e",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"],maxLength:["maxLengthChanged"]}},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-block;\n width: 100%;\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:host([highlight]:not([disabled]):not([aria-disabled=\"true\"]):not([aria-readonly=\"true\"])) {\n .pds-textarea__field:not(.is-invalid) {\n background-color: var(--pine-color-accent-disabled);\n border-color: var(--pine-color-accent);\n color: var(--pine-color-text-accent);\n\n &:hover {\n border-color: var(--pine-color-accent-hover);\n }\n\n &:focus-visible {\n outline-color: var(--pine-color-focus-ring);\n }\n\n ~ .pds-textarea__character-counter {\n background: color-mix(in srgb, var(--pine-color-accent-disabled) 80%, transparent);\n color: var(--pine-color-text-accent);\n }\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__helper-message {\n color: var(--pine-color-text-message);\n font: var(--pine-typography-body-sm-medium);\n margin-block-start: var(--pine-dimension-2xs);\n}\n\n.pds-textarea__error-message {\n color: var(--pine-color-text-message-danger);\n display: flex;\n font: var(--pine-typography-body-sm-medium);\n gap: var(--pine-dimension-2xs);\n margin-block-start: var(--pine-dimension-2xs);\n\n pds-icon {\n margin-block-start: var(--pine-dimension-025);\n }\n}\n\n.pds-textarea__field-wrapper {\n display: inline-block;\n position: relative;\n width: 100%;\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 box-sizing: border-box;\n color: var(--pine-color-text);\n font: var(--pine-typography-body);\n letter-spacing: var(--pine-letter-spacing);\n min-height: calc(var(--pine-dimension-xl) * 2);\n min-width: calc(var(--pine-dimension-xl) * 2);\n padding: var(--pine-dimension-xs) var(--pine-dimension-sm);\n resize: both;\n width: 100%;\n\n // Add bottom padding when character counter is present\n :host([max-length]) & {\n padding-bottom: calc(var(--pine-dimension-xs) + var(--pine-dimension-md));\n }\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 :host-context([data-theme=\"dark\"]) & {\n background-color: var(--pine-color-red-950);\n }\n\n &:focus-visible {\n outline-color: var(--pine-color-focus-ring-danger);\n }\n }\n}\n\n.pds-textarea__character-counter {\n background: color-mix(in srgb, var(--pine-color-background-container) 80%, transparent);\n border-radius: calc(var(--pine-dimension-2xs) * 0.5);\n color: var(--pine-color-text-muted);\n font: var(--pine-typography-body-sm-medium);\n padding: calc(var(--pine-dimension-2xs) * 0.5) var(--pine-dimension-2xs);\n pointer-events: none;\n position: absolute;\n user-select: none;\n white-space: nowrap;\n z-index: var(--pine-z-index);\n\n // Match textarea disabled state\n :host([aria-disabled=\"true\"]) & {\n background-color: var(--pine-color-background-container-disabled);\n color: var(--pine-color-text-disabled);\n }\n\n // Match textarea readonly state\n :host([aria-readonly=\"true\"]) & {\n background-color: var(--pine-color-background-container-disabled);\n color: var(--pine-color-text-readonly);\n }\n\n // Match textarea invalid state - target when field has is-invalid class\n .pds-textarea__field.is-invalid ~ & {\n background-color: var(--pine-input-color-background-danger);\n\n :host-context([data-theme=\"dark\"]) & {\n background-color: var(--pine-color-red-950);\n }\n }\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, exposeTypeProperty } 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 private resizeObserver?: ResizeObserver;\n private characterCounter?: HTMLElement;\n private readonly _type = 'textarea' as const;\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 * Emitted when a key is pressed down in the textarea.\n */\n @Event() pdsKeyDown!: EventEmitter<KeyboardEvent>;\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 * Specifies the maximum number of characters allowed in the textarea. When set, displays a character counter.\n */\n @Prop({ reflect: true }) maxLength?: number;\n\n /**\n * Applies highlight styling to the textarea field.\n */\n @Prop({ reflect: true }) highlight?: boolean;\n\n /**\n * The value of the textarea.\n */\n @Prop({mutable: true}) value?: string | null = '';\n\n @State() hasFocus = false;\n\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 // Update character counter position in case content changes affect sizing\n if (this.maxLength && typeof ResizeObserver !== 'undefined') {\n this.updateCharacterCounterPosition();\n }\n }\n\n @Watch('maxLength')\n protected maxLengthChanged() {\n // Setup or teardown ResizeObserver based on maxLength\n if (this.resizeObserver) {\n this.resizeObserver.disconnect();\n }\n\n if (this.maxLength && this.nativeTextarea) {\n this.setupResizeObserver();\n }\n\n // Update ElementInternals validity when maxLength changes\n if (this.internals && this.internals.setValidity && this.nativeTextarea) {\n const isTooLong = this.nativeTextarea.value.length > (this.maxLength || 0);\n this.internals.setValidity(\n { tooLong: isTooLong },\n isTooLong ? 'Value exceeds maxLength' : '',\n this.nativeTextarea\n );\n }\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 // Handle maxLength validation\n if (this.maxLength && input.value.length > this.maxLength) {\n // Prevent input beyond maxLength\n input.value = input.value.substring(0, this.maxLength);\n }\n this.value = input.value || '';\n }\n this.emitInputChange(ev);\n\n // Update counter position when content changes\n if (this.maxLength && typeof ResizeObserver !== 'undefined') {\n // Use requestAnimationFrame to ensure DOM is updated\n requestAnimationFrame(() => {\n this.updateCharacterCounterPosition();\n });\n }\n };\n\n private onTextareaChange = (ev: Event) => {\n this.emitValueChange(ev);\n };\n\n private onKeyDown = (ev: KeyboardEvent) => {\n this.pdsKeyDown.emit(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 disconnectedCallback() {\n // Clean up ResizeObserver\n if (this.resizeObserver) {\n this.resizeObserver.disconnect();\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 // Setup ResizeObserver for character counter positioning\n this.setupResizeObserver();\n\n // Expose type property on the element instance to match native form element behavior\n exposeTypeProperty(this.el, () => this._type);\n }\n\n /**\n * Sets up ResizeObserver to track textarea resize for character counter positioning\n */\n private setupResizeObserver() {\n if (!this.maxLength || !this.nativeTextarea) return;\n\n // ResizeObserver may not be available in test environments\n if (typeof ResizeObserver !== 'undefined') {\n this.resizeObserver = new ResizeObserver(() => {\n // Use requestAnimationFrame to ensure DOM updates are complete\n requestAnimationFrame(() => {\n this.updateCharacterCounterPosition();\n });\n });\n\n this.resizeObserver.observe(this.nativeTextarea);\n\n // Initial positioning with a small delay to ensure counter is rendered\n requestAnimationFrame(() => {\n this.updateCharacterCounterPosition();\n });\n }\n }\n\n /**\n * Updates character counter position to stay within textarea boundaries during resize\n */\n private updateCharacterCounterPosition() {\n if (!this.characterCounter || !this.nativeTextarea) return;\n\n // Skip positioning in test environments where ResizeObserver isn't available\n if (typeof ResizeObserver === 'undefined') return;\n\n // Ensure the character counter has been rendered and has dimensions\n if (this.characterCounter.offsetWidth === 0 || this.characterCounter.offsetHeight === 0) {\n // Counter not ready or component hidden - return and let resize/input observers handle positioning later\n return;\n }\n\n // Position based on textarea's actual dimensions (which change during manual resize)\n const textareaWidth = this.nativeTextarea.offsetWidth;\n const textareaHeight = this.nativeTextarea.offsetHeight;\n const counterWidth = this.characterCounter.offsetWidth;\n const counterHeight = this.characterCounter.offsetHeight;\n\n // Calculate position within textarea boundaries with padding from edges\n const rightPosition = textareaWidth - counterWidth - 8;\n const bottomPosition = textareaHeight - counterHeight - 8;\n\n // Ensure counter stays within textarea boundaries even when resized very small\n const finalLeft = Math.max(8, Math.min(rightPosition, textareaWidth - counterWidth - 8));\n const finalTop = Math.max(8, Math.min(bottomPosition, textareaHeight - counterHeight - 8));\n\n // Apply absolute positioning within the field wrapper\n this.characterCounter.style.position = 'absolute';\n this.characterCounter.style.left = `${finalLeft}px`;\n this.characterCounter.style.top = `${finalTop}px`;\n this.characterCounter.style.right = 'auto';\n this.characterCounter.style.bottom = 'auto';\n }\n\n /**\n * Renders the character counter when maxLength is set\n */\n private renderCharacterCounter() {\n if (!this.maxLength) {\n return null;\n }\n\n const currentLength = this.getValue().length;\n return (\n <div\n class=\"pds-textarea__character-counter\"\n ref={(el) => this.characterCounter = el}\n role=\"status\"\n aria-live=\"polite\"\n aria-label={`${currentLength} of ${this.maxLength} characters`}\n >\n {currentLength} / {this.maxLength}\n </div>\n );\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 /**\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 <div class=\"pds-textarea__field-wrapper\">\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 maxlength={this.maxLength}\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 onKeyDown={this.onKeyDown}\n {...this.inheritedAttributes}\n >\n {value}\n </textarea>\n {this.renderCharacterCounter()}\n </div>\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={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A,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-block;\n width: 100%;\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:host([highlight]:not([disabled]):not([aria-disabled=\"true\"]):not([aria-readonly=\"true\"])) {\n .pds-textarea__field:not(.is-invalid) {\n background-color: var(--pine-color-accent-disabled);\n border-color: var(--pine-color-accent);\n color: var(--pine-color-text-accent);\n\n &:hover {\n border-color: var(--pine-color-accent-hover);\n }\n\n &:focus-visible {\n outline-color: var(--pine-color-focus-ring);\n }\n\n ~ .pds-textarea__character-counter {\n background: color-mix(in srgb, var(--pine-color-accent-disabled) 80%, transparent);\n color: var(--pine-color-text-accent);\n }\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__helper-message {\n color: var(--pine-color-text-message);\n font: var(--pine-typography-body-sm-medium);\n margin-block-start: var(--pine-dimension-2xs);\n}\n\n.pds-textarea__error-message {\n color: var(--pine-color-text-message-danger);\n display: flex;\n font: var(--pine-typography-body-sm-medium);\n gap: var(--pine-dimension-2xs);\n margin-block-start: var(--pine-dimension-2xs);\n\n pds-icon {\n margin-block-start: var(--pine-dimension-025);\n }\n}\n\n.pds-textarea__field-wrapper {\n display: inline-block;\n position: relative;\n width: 100%;\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 box-sizing: border-box;\n color: var(--pine-color-text);\n font: var(--pine-typography-body);\n letter-spacing: var(--pine-letter-spacing);\n min-height: calc(var(--pine-dimension-xl) * 2);\n min-width: calc(var(--pine-dimension-xl) * 2);\n padding: var(--pine-dimension-xs) var(--pine-dimension-sm);\n resize: both;\n width: 100%;\n\n // Add bottom padding when character counter is present\n :host([max-length]) & {\n padding-bottom: calc(var(--pine-dimension-xs) + var(--pine-dimension-md));\n }\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 :host-context([data-theme=\"dark\"]) & {\n background-color: var(--pine-color-red-950);\n }\n\n &:focus-visible {\n outline-color: var(--pine-color-focus-ring-danger);\n }\n }\n}\n\n.pds-textarea__character-counter {\n background: color-mix(in srgb, var(--pine-color-background-container) 80%, transparent);\n border-radius: calc(var(--pine-dimension-2xs) * 0.5);\n color: var(--pine-color-text-muted);\n font: var(--pine-typography-body-sm-medium);\n padding: calc(var(--pine-dimension-2xs) * 0.5) var(--pine-dimension-2xs);\n pointer-events: none;\n position: absolute;\n user-select: none;\n white-space: nowrap;\n z-index: var(--pine-z-index);\n\n // Match textarea disabled state\n :host([aria-disabled=\"true\"]) & {\n background-color: var(--pine-color-background-container-disabled);\n color: var(--pine-color-text-disabled);\n }\n\n // Match textarea readonly state\n :host([aria-readonly=\"true\"]) & {\n background-color: var(--pine-color-background-container-disabled);\n color: var(--pine-color-text-readonly);\n }\n\n // Match textarea invalid state - target when field has is-invalid class\n .pds-textarea__field.is-invalid ~ & {\n background-color: var(--pine-input-color-background-danger);\n\n :host-context([data-theme=\"dark\"]) & {\n background-color: var(--pine-color-red-950);\n }\n }\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, exposeTypeProperty } 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 private resizeObserver?: ResizeObserver;\n private characterCounter?: HTMLElement;\n private readonly _type = 'textarea' as const;\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 * Emitted when a key is pressed down in the textarea.\n */\n @Event() pdsKeyDown!: EventEmitter<KeyboardEvent>;\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 * Specifies the maximum number of characters allowed in the textarea. When set, displays a character counter.\n */\n @Prop({ reflect: true }) maxLength?: number;\n\n /**\n * Applies highlight styling to the textarea field.\n */\n @Prop({ reflect: true }) highlight?: boolean;\n\n /**\n * The value of the textarea.\n */\n @Prop({mutable: true}) value?: string | null = '';\n\n @State() hasFocus = false;\n\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 // Update character counter position in case content changes affect sizing\n if (this.maxLength && typeof ResizeObserver !== 'undefined') {\n this.updateCharacterCounterPosition();\n }\n }\n\n @Watch('maxLength')\n protected maxLengthChanged() {\n // Setup or teardown ResizeObserver based on maxLength\n if (this.resizeObserver) {\n this.resizeObserver.disconnect();\n }\n\n if (this.maxLength && this.nativeTextarea) {\n this.setupResizeObserver();\n }\n\n // Update ElementInternals validity when maxLength changes\n if (this.internals && this.internals.setValidity && this.nativeTextarea) {\n const isTooLong = this.nativeTextarea.value.length > (this.maxLength || 0);\n this.internals.setValidity(\n { tooLong: isTooLong },\n isTooLong ? 'Value exceeds maxLength' : '',\n this.nativeTextarea\n );\n }\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 // Handle maxLength validation\n if (this.maxLength && input.value.length > this.maxLength) {\n // Prevent input beyond maxLength\n input.value = input.value.substring(0, this.maxLength);\n }\n this.value = input.value || '';\n }\n this.emitInputChange(ev);\n\n // Update counter position when content changes\n if (this.maxLength && typeof ResizeObserver !== 'undefined') {\n // Use requestAnimationFrame to ensure DOM is updated\n requestAnimationFrame(() => {\n this.updateCharacterCounterPosition();\n });\n }\n };\n\n private onTextareaChange = (ev: Event) => {\n this.emitValueChange(ev);\n };\n\n private onKeyDown = (ev: KeyboardEvent) => {\n this.pdsKeyDown.emit(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 (only once per element instance)\n if (this.el.attachInternals && !this.internals) {\n this.internals = this.el.attachInternals();\n }\n }\n\n disconnectedCallback() {\n // Clean up ResizeObserver\n if (this.resizeObserver) {\n this.resizeObserver.disconnect();\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 // Setup ResizeObserver for character counter positioning\n this.setupResizeObserver();\n\n // Expose type property on the element instance to match native form element behavior\n exposeTypeProperty(this.el, () => this._type);\n }\n\n /**\n * Sets up ResizeObserver to track textarea resize for character counter positioning\n */\n private setupResizeObserver() {\n if (!this.maxLength || !this.nativeTextarea) return;\n\n // ResizeObserver may not be available in test environments\n if (typeof ResizeObserver !== 'undefined') {\n this.resizeObserver = new ResizeObserver(() => {\n // Use requestAnimationFrame to ensure DOM updates are complete\n requestAnimationFrame(() => {\n this.updateCharacterCounterPosition();\n });\n });\n\n this.resizeObserver.observe(this.nativeTextarea);\n\n // Initial positioning with a small delay to ensure counter is rendered\n requestAnimationFrame(() => {\n this.updateCharacterCounterPosition();\n });\n }\n }\n\n /**\n * Updates character counter position to stay within textarea boundaries during resize\n */\n private updateCharacterCounterPosition() {\n if (!this.characterCounter || !this.nativeTextarea) return;\n\n // Skip positioning in test environments where ResizeObserver isn't available\n if (typeof ResizeObserver === 'undefined') return;\n\n // Ensure the character counter has been rendered and has dimensions\n if (this.characterCounter.offsetWidth === 0 || this.characterCounter.offsetHeight === 0) {\n // Counter not ready or component hidden - return and let resize/input observers handle positioning later\n return;\n }\n\n // Position based on textarea's actual dimensions (which change during manual resize)\n const textareaWidth = this.nativeTextarea.offsetWidth;\n const textareaHeight = this.nativeTextarea.offsetHeight;\n const counterWidth = this.characterCounter.offsetWidth;\n const counterHeight = this.characterCounter.offsetHeight;\n\n // Calculate position within textarea boundaries with padding from edges\n const rightPosition = textareaWidth - counterWidth - 8;\n const bottomPosition = textareaHeight - counterHeight - 8;\n\n // Ensure counter stays within textarea boundaries even when resized very small\n const finalLeft = Math.max(8, Math.min(rightPosition, textareaWidth - counterWidth - 8));\n const finalTop = Math.max(8, Math.min(bottomPosition, textareaHeight - counterHeight - 8));\n\n // Apply absolute positioning within the field wrapper\n this.characterCounter.style.position = 'absolute';\n this.characterCounter.style.left = `${finalLeft}px`;\n this.characterCounter.style.top = `${finalTop}px`;\n this.characterCounter.style.right = 'auto';\n this.characterCounter.style.bottom = 'auto';\n }\n\n /**\n * Renders the character counter when maxLength is set\n */\n private renderCharacterCounter() {\n if (!this.maxLength) {\n return null;\n }\n\n const currentLength = this.getValue().length;\n return (\n <div\n class=\"pds-textarea__character-counter\"\n ref={(el) => this.characterCounter = el}\n role=\"status\"\n aria-live=\"polite\"\n aria-label={`${currentLength} of ${this.maxLength} characters`}\n >\n {currentLength} / {this.maxLength}\n </div>\n );\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 /**\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 <div class=\"pds-textarea__field-wrapper\">\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 maxlength={this.maxLength}\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 onKeyDown={this.onKeyDown}\n {...this.inheritedAttributes}\n >\n {value}\n </textarea>\n {this.renderCharacterCounter()}\n </div>\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,oxKAAoxK;;MCqB9xK,WAAW,GAAA,MAAA;AAVxB,IAAA,WAAA,CAAA,OAAA,EAAA;;;;;;;AAcU,QAAA,IAAmB,CAAA,mBAAA,GAAe,EAAE;AAK3B,QAAA,IAAK,CAAA,KAAA,GAAG,UAAmB;AAyD5C;;;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;AAiBxB;;AAEG;AACoB,QAAA,IAAK,CAAA,KAAA,GAAmB,EAAE;AAExC,QAAA,IAAQ,CAAA,QAAA,GAAG,KAAK;AAGzB;;AAEG;AACM,QAAA,IAAS,CAAA,SAAA,GAAG,KAAK;AA+ElB,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,IA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ACE,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,2 +1,2 @@
1
- import{__awaiter,__generator}from"tslib";import{r as registerInstance,c as createEvent,h,H as Host}from"./index-DHPhrb5T.js";var pdsToastCss=":host{--animation-duration:0.3s;--animation-timing:cubic-bezier(0.4, 0, 0.2, 1);--padding-inline:var(--pine-dimension-md);--padding-inline-desktop:var(--pine-dimension-2xl);--sizing-height-default:68px;--sizing-min-width:calc(var(--sizing-total-width) - (var(--padding-inline) * 2));--sizing-min-width-desktop:calc(var(--sizing-total-width) - (var(--padding-inline-desktop) * 2));--sizing-total-width:350px;-webkit-box-sizing:border-box;box-sizing:border-box;display:block;font:var(--pine-typography-body-medium)}.pds-toast{-ms-flex-align:center;align-items:center;-webkit-animation:pds-toast-animate-in var(--animation-duration) var(--animation-timing);animation:pds-toast-animate-in var(--animation-duration) var(--animation-timing);background-color:var(--pine-color-primary);border-radius:var(--pine-dimension-xs);-webkit-box-shadow:var(--pine-box-shadow);box-shadow:var(--pine-box-shadow);color:var(--pine-color-text-primary);display:-ms-flexbox;display:flex;height:var(--sizing-height-default);-ms-flex-pack:start;justify-content:flex-start;-webkit-margin-after:var(--pine-dimension-2xs);margin-block-end:var(--pine-dimension-2xs);max-width:90vw;min-width:var(--sizing-min-width);padding:0 var(--padding-inline);position:relative;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}@media screen and (max-width: 767px){.pds-toast{height:36px;max-width:calc(100vw - var(--pine-dimension-2xs) * 2);min-width:auto;padding-inline:var(--pine-dimension-2xs)}}.pds-toast--danger{background-color:var(--pine-color-danger)}.pds-toast--loading .pds-toast__loader{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-webkit-margin-end:var(--pine-dimension-sm);margin-inline-end:var(--pine-dimension-sm);position:relative}.pds-toast--loading .pds-toast__loader-spinner{-webkit-animation:pds-toast-rotate 2s linear infinite;animation:pds-toast-rotate 2s linear infinite;height:20px;width:20px}.pds-toast--loading .pds-toast__loader-path{-webkit-animation:pds-toast-dash 1.5s ease-in-out infinite;animation:pds-toast-dash 1.5s ease-in-out infinite;stroke-dasharray:1, 200;stroke-dashoffset:0;stroke-linecap:round}.pds-toast__icon{color:var(--pine-color-text-primary);display:-ms-inline-flexbox;display:inline-flex;-webkit-margin-end:var(--pine-dimension-sm);margin-inline-end:var(--pine-dimension-sm)}.pds-toast__message{font:var(--pine-typography-body-sm-medium);-webkit-margin-end:auto;margin-inline-end:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pds-toast__message ::slotted(a){color:var(--pine-color-text-primary);-webkit-margin-start:var(--pine-dimension-xs);margin-inline-start:var(--pine-dimension-xs);opacity:0.7;text-decoration:underline}.pds-toast__message ::slotted(a):hover,.pds-toast__message ::slotted(a):focus-visible{opacity:1}.pds-toast__message ::slotted(a):focus-visible{outline:2px solid var(--pine-color-text-primary);outline-offset:2px}.pds-toast__button{-ms-flex-align:center;align-items:center;background:none;border:0;border-radius:var(--pine-border-radius-full);color:inherit;cursor:pointer;display:-ms-inline-flexbox;display:inline-flex;-webkit-margin-start:var(--pine-dimension-md);margin-inline-start:var(--pine-dimension-md);opacity:0.7;padding:0;white-space:nowrap}.pds-toast__button:hover,.pds-toast__button:focus{opacity:1}.pds-toast__button:focus{outline:var(--pine-outline-focus);outline-offset:var(--pine-dimension-2xs)}@-webkit-keyframes pds-toast-animate-in{from{opacity:0;-webkit-transform:translateY(100%);transform:translateY(100%)}to{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes pds-toast-animate-in{from{opacity:0;-webkit-transform:translateY(100%);transform:translateY(100%)}to{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@-webkit-keyframes pds-toast-animate-out{from{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(100%);transform:translateY(100%)}}@keyframes pds-toast-animate-out{from{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(100%);transform:translateY(100%)}}@-webkit-keyframes pds-toast-rotate{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes pds-toast-rotate{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes pds-toast-dash{0%{stroke-dasharray:1, 200;stroke-dashoffset:0}50%{stroke-dasharray:89, 200;stroke-dashoffset:-35}100%{stroke-dasharray:89, 200;stroke-dashoffset:-124}}@keyframes pds-toast-dash{0%{stroke-dasharray:1, 200;stroke-dashoffset:0}50%{stroke-dasharray:89, 200;stroke-dashoffset:-35}100%{stroke-dasharray:89, 200;stroke-dashoffset:-124}}:host([hidden]) .pds-toast,.pds-toast--animating-out{-webkit-animation:pds-toast-animate-out var(--animation-duration) var(--animation-timing) forwards;animation:pds-toast-animate-out var(--animation-duration) var(--animation-timing) forwards;pointer-events:none;}";var PdsToast=function(){function t(t){registerInstance(this,t);this.pdsToastDismissed=createEvent(this,"pdsToastDismissed");this.dismissible=true;this.duration=4500;this.type="default";this.isVisible=true;this.isAnimatingOut=false}t.prototype.componentDidLoad=function(){if(this.duration>0){this.startDismissTimer()}};t.prototype.disconnectedCallback=function(){this.cleanup()};t.prototype.handleDurationChange=function(t){if(this.dismissTimer){window.clearTimeout(this.dismissTimer);this.dismissTimer=undefined}if(t>0){this.startDismissTimer()}};t.prototype.dismiss=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:this.isAnimatingOut=true;return[4,new Promise((function(t){return setTimeout(t,300)}))];case 1:t.sent();this.isVisible=false;this.cleanup();this.pdsToastDismissed.emit({componentId:this.componentId});return[2]}}))}))};t.prototype.cleanup=function(){if(this.dismissTimer){window.clearTimeout(this.dismissTimer);this.dismissTimer=undefined}};t.prototype.startDismissTimer=function(){var t=this;this.dismissTimer=window.setTimeout((function(){t.dismiss()}),this.duration)};t.prototype.renderIcon=function(){if(this.type==="loading"){return h("div",{class:"pds-toast__loader"},h("svg",{class:"pds-toast__loader-spinner",viewBox:"25 25 50 50","aria-hidden":"true"},h("circle",{class:"pds-toast__loader-path",cx:"50",cy:"50",r:"20",fill:"none",stroke:"currentColor","stroke-width":"4","stroke-linecap":"round"})))}return this.icon&&h("pds-icon",{name:this.icon,class:"pds-toast__icon"})};t.prototype.render=function(){var t;var a=this;return h(Host,{key:"ff9523170d34f742f8301e8d3ce3810bacb7d183",hidden:!this.isVisible},h("div",{key:"67e0639a0158eb8c325064a9c3f97aaa3b538d90",class:(t={"pds-toast":true},t["pds-toast--".concat(this.type)]=this.type!=="default",t["pds-toast--animating-out"]=this.isAnimatingOut,t),role:"alert","aria-live":"polite"},this.renderIcon(),h("span",{key:"5387b71901592b69a7465ec10c3f3508e170b1c1",class:"pds-toast__message"},h("slot",{key:"a9bb352ae8ad478fb65298c357bc20efa1877a6b"})),this.dismissible&&h("button",{key:"c1d15b41455304e689c3736ed3d3429321f8c1a7",type:"button",class:"pds-toast__button",onClick:function(){a.dismiss()},"aria-label":"Dismiss message"},h("pds-icon",{key:"0f9e43ed08a253531f3dc698c92f861ca1bd6063",name:"remove"}))))};Object.defineProperty(t,"watchers",{get:function(){return{duration:["handleDurationChange"]}},enumerable:false,configurable:true});return t}();PdsToast.style=pdsToastCss;export{PdsToast as pds_toast};
1
+ import{__awaiter,__generator}from"tslib";import{r as registerInstance,c as createEvent,h,H as Host}from"./index-DHPhrb5T.js";var pdsToastCss=":host{--animation-duration:0.3s;--animation-timing:cubic-bezier(0.4, 0, 0.2, 1);--padding-inline:var(--pine-dimension-md);--padding-inline-desktop:var(--pine-dimension-2xl);--sizing-height-default:68px;--sizing-min-width:calc(var(--sizing-total-width) - (var(--padding-inline) * 2));--sizing-min-width-desktop:calc(var(--sizing-total-width) - (var(--padding-inline-desktop) * 2));--sizing-total-width:350px;-webkit-box-sizing:border-box;box-sizing:border-box;display:block;font:var(--pine-typography-body-medium)}.pds-toast{-ms-flex-align:center;align-items:center;-webkit-animation:pds-toast-animate-in var(--animation-duration) var(--animation-timing);animation:pds-toast-animate-in var(--animation-duration) var(--animation-timing);background-color:var(--pine-color-primary);border-radius:var(--pine-dimension-xs);-webkit-box-shadow:var(--pine-box-shadow);box-shadow:var(--pine-box-shadow);color:var(--pine-color-text-primary);display:-ms-flexbox;display:flex;height:var(--sizing-height-default);-ms-flex-pack:start;justify-content:flex-start;-webkit-margin-after:var(--pine-dimension-2xs);margin-block-end:var(--pine-dimension-2xs);max-width:90vw;min-width:var(--sizing-min-width);padding:0 var(--padding-inline);position:relative;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}@media screen and (max-width: 767px){.pds-toast{height:36px;max-width:calc(100vw - var(--pine-dimension-2xs) * 2);min-width:auto;padding-inline:var(--pine-dimension-2xs)}}.pds-toast--danger{background-color:var(--pine-color-danger)}.pds-toast--loading .pds-toast__loader{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-webkit-margin-end:var(--pine-dimension-sm);margin-inline-end:var(--pine-dimension-sm);position:relative}.pds-toast--loading .pds-toast__loader-spinner{-webkit-animation:pds-toast-rotate 2s linear infinite;animation:pds-toast-rotate 2s linear infinite;height:20px;width:20px}.pds-toast--loading .pds-toast__loader-path{-webkit-animation:pds-toast-dash 1.5s ease-in-out infinite;animation:pds-toast-dash 1.5s ease-in-out infinite;stroke-dasharray:1, 200;stroke-dashoffset:0;stroke-linecap:round}.pds-toast__icon{color:var(--pine-color-text-primary);display:-ms-inline-flexbox;display:inline-flex;-webkit-margin-end:var(--pine-dimension-sm);margin-inline-end:var(--pine-dimension-sm)}.pds-toast__message{font:var(--pine-typography-body-sm-medium);-webkit-margin-end:auto;margin-inline-end:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pds-toast__message ::slotted(a){color:var(--pine-color-text-primary);-webkit-margin-start:var(--pine-dimension-xs);margin-inline-start:var(--pine-dimension-xs);opacity:0.7;text-decoration:underline}.pds-toast__message ::slotted(a):hover,.pds-toast__message ::slotted(a):focus-visible{opacity:1}.pds-toast__message ::slotted(a):focus-visible{outline:2px solid var(--pine-color-text-primary);outline-offset:2px}.pds-toast__button{-ms-flex-align:center;align-items:center;background:none;border:0;border-radius:var(--pine-border-radius-full);color:inherit;cursor:pointer;display:-ms-inline-flexbox;display:inline-flex;-webkit-margin-start:var(--pine-dimension-md);margin-inline-start:var(--pine-dimension-md);opacity:0.7;padding:0;white-space:nowrap}.pds-toast__button:hover,.pds-toast__button:focus{opacity:1}.pds-toast__button:focus{outline:var(--pine-outline-focus);outline-offset:var(--pine-dimension-2xs)}@-webkit-keyframes pds-toast-animate-in{from{opacity:0;-webkit-transform:translateY(100%);transform:translateY(100%)}to{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes pds-toast-animate-in{from{opacity:0;-webkit-transform:translateY(100%);transform:translateY(100%)}to{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@-webkit-keyframes pds-toast-animate-out{from{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(100%);transform:translateY(100%)}}@keyframes pds-toast-animate-out{from{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(100%);transform:translateY(100%)}}@-webkit-keyframes pds-toast-rotate{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes pds-toast-rotate{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes pds-toast-dash{0%{stroke-dasharray:1, 200;stroke-dashoffset:0}50%{stroke-dasharray:89, 200;stroke-dashoffset:-35}100%{stroke-dasharray:89, 200;stroke-dashoffset:-124}}@keyframes pds-toast-dash{0%{stroke-dasharray:1, 200;stroke-dashoffset:0}50%{stroke-dasharray:89, 200;stroke-dashoffset:-35}100%{stroke-dasharray:89, 200;stroke-dashoffset:-124}}:host([hidden]) .pds-toast,.pds-toast--animating-out{-webkit-animation:pds-toast-animate-out var(--animation-duration) var(--animation-timing) forwards;animation:pds-toast-animate-out var(--animation-duration) var(--animation-timing) forwards;pointer-events:none;}";var PdsToast=function(){function t(t){registerInstance(this,t);this.pdsToastDismissed=createEvent(this,"pdsToastDismissed");this.dismissible=true;this.duration=4500;this.type="default";this.isVisible=true;this.isAnimatingOut=false}t.prototype.componentDidLoad=function(){if(this.duration>0){this.startDismissTimer()}};t.prototype.disconnectedCallback=function(){this.cleanup()};t.prototype.handleDurationChange=function(t){if(this.dismissTimer){window.clearTimeout(this.dismissTimer);this.dismissTimer=undefined}if(t>0){this.startDismissTimer()}};t.prototype.dismiss=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:this.isAnimatingOut=true;return[4,new Promise((function(t){return setTimeout(t,300)}))];case 1:t.sent();this.isVisible=false;this.cleanup();this.pdsToastDismissed.emit({componentId:this.componentId});return[2]}}))}))};t.prototype.cleanup=function(){if(this.dismissTimer){window.clearTimeout(this.dismissTimer);this.dismissTimer=undefined}};t.prototype.startDismissTimer=function(){var t=this;this.dismissTimer=window.setTimeout((function(){t.dismiss()}),this.duration)};t.prototype.renderIcon=function(){if(this.type==="loading"){return h("div",{class:"pds-toast__loader"},h("svg",{class:"pds-toast__loader-spinner",viewBox:"25 25 50 50","aria-hidden":"true"},h("circle",{class:"pds-toast__loader-path",cx:"50",cy:"50",r:"20",fill:"none",stroke:"currentColor","stroke-width":"4","stroke-linecap":"round"})))}return this.icon&&h("pds-icon",{name:this.icon,class:"pds-toast__icon"})};t.prototype.render=function(){var t;var i=this;return h(Host,{key:"bcc7fe0ad3b7823a940249fccfce30edfc1e808d",hidden:!this.isVisible},h("div",{key:"5265cbbdf05278cbd565e34f63b6c9566ec14290",class:(t={"pds-toast":true},t["pds-toast--".concat(this.type)]=this.type!=="default",t["pds-toast--animating-out"]=this.isAnimatingOut,t),role:"alert","aria-live":"polite"},this.renderIcon(),h("span",{key:"d650b57fb5cddeb369d8245b239423575da63cd8",class:"pds-toast__message"},h("slot",{key:"d4e2d6b6136b75dfd97a37da4588c8c51ca4bcd0"})),this.dismissible&&h("button",{key:"c89170f321c47b83096a01aaa8012298dc3ca440",type:"button",class:"pds-toast__button",onClick:function(){i.dismiss()},"aria-label":"Dismiss message"},h("pds-icon",{key:"359c0c05ddd6db8e7711fc0212bf80569106ecf4",name:"remove"}))))};Object.defineProperty(t,"watchers",{get:function(){return{duration:["handleDurationChange"]}},enumerable:false,configurable:true});return t}();PdsToast.style=pdsToastCss;export{PdsToast as pds_toast};
2
2
  //# sourceMappingURL=pds-toast.entry.js.map
@@ -1,2 +1,2 @@
1
- import{__awaiter,__generator}from"tslib";import{r as registerInstance,h,H as Host,a as getElement}from"./index-DHPhrb5T.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:var(--pine-z-index-raised)}.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="var(--pine-z-index-nuclear)";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:"19cd2c26c96f21f39d0bca90d3b74f8c282e74e1",id:i,class:{"pds-tooltip--is-open":this.opened}},h("span",{key:"4288caabd5c37d90d4c82c430a9eb0a17653b2ad",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:"d937b6ee8a11c4a4d9f31daf147b598b5ab56c2d"})),h("div",{key:"6b31410657ddfce5275abc03a2e0a3c2692efc2a",class:"pds-tooltip__content-slot-wrapper",hidden:true},h("slot",{key:"2d5ed8babb0a44c1340028dfedc5ee8694da4bfc",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,a as getElement}from"./index-DHPhrb5T.js";import{c as computePosition,a as autoUpdate,o as offset,f as flip,s as shift}from"./floating-ui.dom-BO6p966C.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:var(--pine-z-index-raised)}.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="var(--pine-z-index-nuclear)";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:"41dffb4751c1e40789de07ec5b2f96202cedb82c",id:i,class:{"pds-tooltip--is-open":this.opened}},h("span",{key:"156d6e9d23d3194caa387db9de35226d2d5fd02f",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:"e67bae6e3c9726c39d193e5771c0e66818575c65"})),h("div",{key:"60ec7b351e574b2e2fc8b0b8c8b87f4977e6eed7",class:"pds-tooltip__content-slot-wrapper",hidden:true},h("slot",{key:"b66966dba3d142401e588b7437689c0f6386cfcd",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