@pine-ds/core 1.1.0 → 1.2.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 (497) hide show
  1. package/dist/cjs/closest-b45138d3.js +13 -0
  2. package/dist/cjs/closest-b45138d3.js.map +1 -0
  3. package/dist/cjs/{index-33465846.js → index-34f3258f.js} +2 -2
  4. package/dist/cjs/index-34f3258f.js.map +1 -0
  5. package/dist/cjs/{index-7d9c71f6.js → index-ed42e2ee.js} +34 -4
  6. package/dist/cjs/index-ed42e2ee.js.map +1 -0
  7. package/dist/cjs/loader.cjs.js +2 -2
  8. package/dist/cjs/pds-accordion.cjs.entry.js +2 -2
  9. package/dist/cjs/pds-avatar.cjs.entry.js +4 -4
  10. package/dist/cjs/pds-avatar.cjs.entry.js.map +1 -1
  11. package/dist/cjs/pds-box.cjs.entry.js +1 -1
  12. package/dist/cjs/pds-button.cjs.entry.js +2 -2
  13. package/dist/cjs/pds-checkbox.cjs.entry.js +75 -0
  14. package/dist/cjs/pds-checkbox.cjs.entry.js.map +1 -0
  15. package/dist/cjs/pds-chip.cjs.entry.js +2 -2
  16. package/dist/cjs/pds-copytext.cjs.entry.js +2 -2
  17. package/dist/cjs/pds-divider.cjs.entry.js +1 -1
  18. package/dist/cjs/pds-icon.cjs.entry.js +2 -2
  19. package/dist/cjs/pds-icon.cjs.entry.js.map +1 -1
  20. package/dist/cjs/pds-image.cjs.entry.js +1 -1
  21. package/dist/cjs/pds-input.cjs.entry.js +2 -2
  22. package/dist/cjs/{pds-label-5ebae56e.js → pds-label-15dd83ef.js} +2 -2
  23. package/dist/cjs/{pds-label-5ebae56e.js.map → pds-label-15dd83ef.js.map} +1 -1
  24. package/dist/cjs/pds-link.cjs.entry.js +2 -2
  25. package/dist/cjs/pds-loader.cjs.entry.js +49 -0
  26. package/dist/cjs/pds-loader.cjs.entry.js.map +1 -0
  27. package/dist/cjs/pds-progress.cjs.entry.js +2 -2
  28. package/dist/cjs/pds-radio.cjs.entry.js +5 -5
  29. package/dist/cjs/pds-row.cjs.entry.js +2 -2
  30. package/dist/cjs/pds-sortable-item.cjs.entry.js +3 -3
  31. package/dist/cjs/pds-sortable.cjs.entry.js +2 -2
  32. package/dist/cjs/pds-switch.cjs.entry.js +5 -5
  33. package/dist/cjs/pds-tab.cjs.entry.js +4 -4
  34. package/dist/cjs/pds-table-body.cjs.entry.js +2 -2
  35. package/dist/cjs/pds-table-cell.cjs.entry.js +58 -0
  36. package/dist/cjs/pds-table-cell.cjs.entry.js.map +1 -0
  37. package/dist/cjs/pds-table-head-cell.cjs.entry.js +5 -4
  38. package/dist/cjs/pds-table-head-cell.cjs.entry.js.map +1 -1
  39. package/dist/cjs/pds-table-head.cjs.entry.js +27 -2
  40. package/dist/cjs/pds-table-head.cjs.entry.js.map +1 -1
  41. package/dist/cjs/pds-table-row.cjs.entry.js +22 -6
  42. package/dist/cjs/pds-table-row.cjs.entry.js.map +1 -1
  43. package/dist/cjs/pds-table.cjs.entry.js +27 -3
  44. package/dist/cjs/pds-table.cjs.entry.js.map +1 -1
  45. package/dist/cjs/pds-tabpanel.cjs.entry.js +2 -2
  46. package/dist/cjs/pds-tabs.cjs.entry.js +2 -2
  47. package/dist/cjs/pds-textarea.cjs.entry.js +6 -6
  48. package/dist/cjs/pds-tooltip.cjs.entry.js +3 -3
  49. package/dist/cjs/pine-core.cjs.js +2 -2
  50. package/dist/collection/collection-manifest.json +1 -0
  51. package/dist/collection/components/pds-avatar/pds-avatar.js +2 -2
  52. package/dist/collection/components/pds-avatar/pds-avatar.js.map +1 -1
  53. package/dist/collection/components/pds-checkbox/pds-checkbox.css +15 -1
  54. package/dist/collection/components/pds-checkbox/pds-checkbox.js +44 -7
  55. package/dist/collection/components/pds-checkbox/pds-checkbox.js.map +1 -1
  56. package/dist/collection/components/pds-loader/pds-loader.css +93 -0
  57. package/dist/collection/components/pds-loader/pds-loader.js +127 -0
  58. package/dist/collection/components/pds-loader/pds-loader.js.map +1 -0
  59. package/dist/collection/components/pds-loader/stories/pds-loader.stories.js +36 -0
  60. package/dist/collection/components/pds-progress/pds-progress.js +1 -1
  61. package/dist/collection/components/pds-radio/pds-radio.js +3 -3
  62. package/dist/collection/components/pds-row/pds-row.js +1 -1
  63. package/dist/collection/components/pds-sortable/pds-sortable-item/pds-sortable-item.js +1 -1
  64. package/dist/collection/components/pds-sortable/pds-sortable.js +1 -1
  65. package/dist/collection/components/pds-switch/pds-switch.js +3 -3
  66. package/dist/collection/components/pds-table/pds-table-body/pds-table-body.js +1 -1
  67. package/dist/collection/components/pds-table/pds-table-cell/pds-table-cell.js +2 -2
  68. package/dist/collection/components/pds-table/pds-table-cell/pds-table-cell.js.map +1 -1
  69. package/dist/collection/components/pds-table/pds-table-head/pds-table-head.js +83 -1
  70. package/dist/collection/components/pds-table/pds-table-head/pds-table-head.js.map +1 -1
  71. package/dist/collection/components/pds-table/pds-table-head-cell/pds-table-head-cell.js +5 -3
  72. package/dist/collection/components/pds-table/pds-table-head-cell/pds-table-head-cell.js.map +1 -1
  73. package/dist/collection/components/pds-table/pds-table-row/pds-table-row.js +56 -7
  74. package/dist/collection/components/pds-table/pds-table-row/pds-table-row.js.map +1 -1
  75. package/dist/collection/components/pds-table/pds-table.css +6 -0
  76. package/dist/collection/components/pds-table/pds-table.js +68 -1
  77. package/dist/collection/components/pds-table/pds-table.js.map +1 -1
  78. package/dist/collection/components/pds-table/stories/pds-table.stories.js +1 -1
  79. package/dist/collection/components/pds-tabs/pds-tab/pds-tab.js +3 -3
  80. package/dist/collection/components/pds-tabs/pds-tabpanel/pds-tabpanel.js +1 -1
  81. package/dist/collection/components/pds-tabs/pds-tabs.js +1 -1
  82. package/dist/collection/components/pds-textarea/pds-textarea.js +4 -4
  83. package/dist/collection/components/pds-tooltip/pds-tooltip.js +2 -2
  84. package/dist/collection/utils/closest.js +8 -0
  85. package/dist/collection/utils/closest.js.map +1 -0
  86. package/dist/docs.json +299 -9
  87. package/dist/esm/closest-d2d192be.js +11 -0
  88. package/dist/esm/closest-d2d192be.js.map +1 -0
  89. package/{components/index2.js → dist/esm/index-852fd6bc.js} +2 -2
  90. package/dist/esm/index-852fd6bc.js.map +1 -0
  91. package/dist/esm/{index-6f0bb1b9.js → index-ca411ad2.js} +34 -4
  92. package/dist/esm/index-ca411ad2.js.map +1 -0
  93. package/dist/esm/loader.js +3 -3
  94. package/dist/esm/pds-accordion.entry.js +2 -2
  95. package/dist/esm/pds-avatar.entry.js +4 -4
  96. package/dist/esm/pds-avatar.entry.js.map +1 -1
  97. package/dist/esm/pds-box.entry.js +1 -1
  98. package/dist/esm/pds-button.entry.js +2 -2
  99. package/dist/esm/pds-checkbox.entry.js +71 -0
  100. package/dist/esm/pds-checkbox.entry.js.map +1 -0
  101. package/dist/esm/pds-chip.entry.js +2 -2
  102. package/dist/esm/pds-copytext.entry.js +2 -2
  103. package/dist/esm/pds-divider.entry.js +1 -1
  104. package/dist/esm/pds-icon.entry.js +2 -2
  105. package/dist/esm/pds-icon.entry.js.map +1 -1
  106. package/dist/esm/pds-image.entry.js +1 -1
  107. package/dist/esm/pds-input.entry.js +2 -2
  108. package/dist/esm/{pds-label-d7e11551.js → pds-label-bea9ee54.js} +2 -2
  109. package/dist/esm/{pds-label-d7e11551.js.map → pds-label-bea9ee54.js.map} +1 -1
  110. package/dist/esm/pds-link.entry.js +2 -2
  111. package/dist/esm/pds-loader.entry.js +45 -0
  112. package/dist/esm/pds-loader.entry.js.map +1 -0
  113. package/dist/esm/pds-progress.entry.js +2 -2
  114. package/dist/esm/pds-radio.entry.js +5 -5
  115. package/dist/esm/pds-row.entry.js +2 -2
  116. package/dist/esm/pds-sortable-item.entry.js +3 -3
  117. package/dist/esm/pds-sortable.entry.js +2 -2
  118. package/dist/esm/pds-switch.entry.js +5 -5
  119. package/dist/esm/pds-tab.entry.js +4 -4
  120. package/dist/esm/pds-table-body.entry.js +2 -2
  121. package/{components/pds-table-cell2.js → dist/esm/pds-table-cell.entry.js} +11 -29
  122. package/dist/esm/pds-table-cell.entry.js.map +1 -0
  123. package/dist/esm/pds-table-head-cell.entry.js +5 -4
  124. package/dist/esm/pds-table-head-cell.entry.js.map +1 -1
  125. package/dist/esm/pds-table-head.entry.js +27 -2
  126. package/dist/esm/pds-table-head.entry.js.map +1 -1
  127. package/dist/esm/pds-table-row.entry.js +22 -6
  128. package/dist/esm/pds-table-row.entry.js.map +1 -1
  129. package/dist/esm/pds-table.entry.js +27 -3
  130. package/dist/esm/pds-table.entry.js.map +1 -1
  131. package/dist/esm/pds-tabpanel.entry.js +2 -2
  132. package/dist/esm/pds-tabs.entry.js +2 -2
  133. package/dist/esm/pds-textarea.entry.js +6 -6
  134. package/dist/esm/pds-tooltip.entry.js +3 -3
  135. package/dist/esm/pine-core.js +3 -3
  136. package/dist/esm-es5/closest-d2d192be.js +2 -0
  137. package/dist/esm-es5/closest-d2d192be.js.map +1 -0
  138. package/dist/esm-es5/{index-bdeab80c.js → index-852fd6bc.js} +1 -1
  139. package/dist/esm-es5/index-852fd6bc.js.map +1 -0
  140. package/dist/esm-es5/index-ca411ad2.js +3 -0
  141. package/dist/esm-es5/index-ca411ad2.js.map +1 -0
  142. package/dist/esm-es5/loader.js +1 -1
  143. package/dist/esm-es5/loader.js.map +1 -1
  144. package/dist/esm-es5/pds-accordion.entry.js +1 -1
  145. package/dist/esm-es5/pds-avatar.entry.js +1 -1
  146. package/dist/esm-es5/pds-avatar.entry.js.map +1 -1
  147. package/dist/esm-es5/pds-box.entry.js +1 -1
  148. package/dist/esm-es5/pds-button.entry.js +1 -1
  149. package/dist/esm-es5/pds-checkbox.entry.js +2 -0
  150. package/dist/esm-es5/pds-checkbox.entry.js.map +1 -0
  151. package/dist/esm-es5/pds-chip.entry.js +1 -1
  152. package/dist/esm-es5/pds-copytext.entry.js +1 -1
  153. package/dist/esm-es5/pds-divider.entry.js +1 -1
  154. package/dist/esm-es5/pds-icon.entry.js +1 -1
  155. package/dist/esm-es5/pds-icon.entry.js.map +1 -1
  156. package/dist/esm-es5/pds-image.entry.js +1 -1
  157. package/dist/esm-es5/pds-input.entry.js +1 -1
  158. package/dist/esm-es5/{pds-label-d7e11551.js → pds-label-bea9ee54.js} +2 -2
  159. package/dist/esm-es5/pds-link.entry.js +1 -1
  160. package/dist/esm-es5/pds-loader.entry.js +2 -0
  161. package/dist/esm-es5/pds-loader.entry.js.map +1 -0
  162. package/dist/esm-es5/pds-progress.entry.js +1 -1
  163. package/dist/esm-es5/pds-radio.entry.js +1 -1
  164. package/dist/esm-es5/pds-row.entry.js +1 -1
  165. package/dist/esm-es5/pds-sortable-item.entry.js +1 -1
  166. package/dist/esm-es5/pds-sortable.entry.js +2 -2
  167. package/dist/esm-es5/pds-switch.entry.js +1 -1
  168. package/dist/esm-es5/pds-tab.entry.js +1 -1
  169. package/dist/esm-es5/pds-table-body.entry.js +1 -1
  170. package/dist/esm-es5/pds-table-cell.entry.js +2 -0
  171. package/dist/esm-es5/pds-table-cell.entry.js.map +1 -0
  172. package/dist/esm-es5/pds-table-head-cell.entry.js +1 -1
  173. package/dist/esm-es5/pds-table-head-cell.entry.js.map +1 -1
  174. package/dist/esm-es5/pds-table-head.entry.js +1 -1
  175. package/dist/esm-es5/pds-table-head.entry.js.map +1 -1
  176. package/dist/esm-es5/pds-table-row.entry.js +1 -1
  177. package/dist/esm-es5/pds-table-row.entry.js.map +1 -1
  178. package/dist/esm-es5/pds-table.entry.js +1 -1
  179. package/dist/esm-es5/pds-table.entry.js.map +1 -1
  180. package/dist/esm-es5/pds-tabpanel.entry.js +1 -1
  181. package/dist/esm-es5/pds-tabs.entry.js +1 -1
  182. package/dist/esm-es5/pds-textarea.entry.js +1 -1
  183. package/dist/esm-es5/pds-tooltip.entry.js +1 -1
  184. package/dist/esm-es5/pine-core.js +1 -1
  185. package/dist/esm-es5/pine-core.js.map +1 -1
  186. package/dist/pine-core/{p-320e4c53.system.entry.js → p-038065cf.system.entry.js} +2 -2
  187. package/dist/pine-core/p-05ee992c.js +3 -0
  188. package/dist/pine-core/p-05ee992c.js.map +1 -0
  189. package/dist/pine-core/p-0b77685e.js +2 -0
  190. package/dist/pine-core/p-0b77685e.js.map +1 -0
  191. package/dist/pine-core/{p-dacd68cf.system.entry.js → p-0f3ceb6c.system.entry.js} +2 -2
  192. package/dist/pine-core/p-10fe7be7.entry.js +2 -0
  193. package/dist/pine-core/p-10fe7be7.entry.js.map +1 -0
  194. package/dist/pine-core/{p-7f917c20.entry.js → p-1618833a.entry.js} +2 -2
  195. package/dist/pine-core/{p-ff9044ed.entry.js → p-1775b56f.entry.js} +2 -2
  196. package/dist/pine-core/{p-65a167b8.entry.js → p-19b44f85.entry.js} +2 -2
  197. package/dist/pine-core/{p-c721d912.system.entry.js → p-1a03a25f.system.entry.js} +2 -2
  198. package/dist/pine-core/p-224a435b.system.js +2 -0
  199. package/dist/pine-core/p-224a435b.system.js.map +1 -0
  200. package/dist/pine-core/{p-4d4bea0a.entry.js → p-23d24773.entry.js} +2 -2
  201. package/dist/pine-core/p-24441d11.system.entry.js +2 -0
  202. package/dist/pine-core/p-24441d11.system.entry.js.map +1 -0
  203. package/dist/pine-core/p-26626013.system.js +3 -0
  204. package/dist/pine-core/p-26626013.system.js.map +1 -0
  205. package/dist/pine-core/{p-478689a0.system.entry.js → p-286189e0.system.entry.js} +2 -2
  206. package/dist/pine-core/p-30dfdfdd.entry.js +2 -0
  207. package/dist/pine-core/{p-2e19ec3d.system.entry.js → p-319ced45.system.entry.js} +2 -2
  208. package/dist/pine-core/{p-2af2432d.system.entry.js → p-34a4c5ff.system.entry.js} +2 -2
  209. package/dist/pine-core/{p-e43fd36e.entry.js → p-3648779f.entry.js} +2 -2
  210. package/dist/pine-core/p-3dfbaa2a.entry.js +2 -0
  211. package/dist/pine-core/p-3dfbaa2a.entry.js.map +1 -0
  212. package/dist/pine-core/{p-bc3782a0.entry.js → p-3f1ca23f.entry.js} +2 -2
  213. package/dist/pine-core/p-3f1ca23f.entry.js.map +1 -0
  214. package/dist/pine-core/{p-3e527956.system.entry.js → p-3f78956d.system.entry.js} +2 -2
  215. package/dist/pine-core/{p-8c5e76d4.system.entry.js → p-4283f600.system.entry.js} +2 -2
  216. package/dist/pine-core/{p-019edcbb.entry.js → p-42cccfec.entry.js} +2 -2
  217. package/dist/pine-core/{p-77da68b4.system.entry.js → p-473037f0.system.entry.js} +2 -2
  218. package/dist/pine-core/p-4a7afca5.entry.js +2 -0
  219. package/dist/pine-core/p-4a7afca5.entry.js.map +1 -0
  220. package/dist/pine-core/{p-bb099830.system.entry.js → p-4da18aac.system.entry.js} +2 -2
  221. package/dist/pine-core/{p-b7897f94.js → p-4dec2648.js} +1 -1
  222. package/dist/pine-core/p-4dec2648.js.map +1 -0
  223. package/dist/pine-core/p-56c60cf8.system.entry.js +2 -0
  224. package/dist/pine-core/p-56c60cf8.system.entry.js.map +1 -0
  225. package/dist/pine-core/{p-737d5042.entry.js → p-59f634bc.entry.js} +2 -2
  226. package/dist/pine-core/{p-737d5042.entry.js.map → p-59f634bc.entry.js.map} +1 -1
  227. package/dist/pine-core/{p-30cb97ee.system.entry.js → p-5b032eb0.system.entry.js} +2 -2
  228. package/dist/pine-core/{p-9f8a1aa6.entry.js → p-5bcbdba7.entry.js} +2 -2
  229. package/dist/pine-core/{p-380e465b.entry.js → p-5ec5e6cc.entry.js} +2 -2
  230. package/dist/pine-core/{p-9e33f4fb.system.entry.js → p-60953292.system.entry.js} +3 -3
  231. package/dist/pine-core/{p-bd5135c3.entry.js → p-6663628f.entry.js} +2 -2
  232. package/dist/pine-core/{p-8144b8d8.system.entry.js → p-689137e6.system.entry.js} +2 -2
  233. package/dist/pine-core/p-6faa8c75.js +2 -0
  234. package/dist/pine-core/p-77b96720.system.js +2 -0
  235. package/dist/pine-core/p-77b96720.system.js.map +1 -0
  236. package/dist/pine-core/{p-30ca2db1.entry.js → p-7bf40997.entry.js} +2 -2
  237. package/dist/pine-core/{p-cf147dfc.system.entry.js → p-7ef962b2.system.entry.js} +2 -2
  238. package/dist/pine-core/{p-43783da1.system.entry.js → p-80024a08.system.entry.js} +2 -2
  239. package/dist/pine-core/{p-5073b1c0.entry.js → p-8dd63189.entry.js} +3 -3
  240. package/dist/pine-core/{p-327e1afa.system.entry.js → p-9028ed17.system.entry.js} +2 -2
  241. package/dist/pine-core/p-9087b22e.entry.js +2 -0
  242. package/dist/pine-core/p-9087b22e.entry.js.map +1 -0
  243. package/dist/pine-core/{p-0ec12306.system.js → p-927733f2.system.js} +2 -2
  244. package/dist/pine-core/{p-d99998a4.system.entry.js → p-97e67ec3.system.entry.js} +2 -2
  245. package/dist/pine-core/p-97e67ec3.system.entry.js.map +1 -0
  246. package/dist/pine-core/{p-2250dc45.entry.js → p-999c240c.entry.js} +2 -2
  247. package/dist/pine-core/p-a010a9e8.system.entry.js +2 -0
  248. package/dist/pine-core/p-a010a9e8.system.entry.js.map +1 -0
  249. package/dist/pine-core/{p-1330a135.entry.js → p-a1cf1db5.entry.js} +2 -2
  250. package/dist/pine-core/p-a1cf1db5.entry.js.map +1 -0
  251. package/dist/pine-core/{p-78ae6c93.system.entry.js → p-a4150f66.system.entry.js} +2 -2
  252. package/dist/pine-core/{p-5f9fa644.system.entry.js → p-a5a0ced9.system.entry.js} +2 -2
  253. package/dist/pine-core/p-a617a31d.system.entry.js +2 -0
  254. package/dist/pine-core/p-a617a31d.system.entry.js.map +1 -0
  255. package/dist/pine-core/p-a6a2fd34.entry.js +2 -0
  256. package/dist/pine-core/{p-afdfadb0.entry.js.map → p-a6a2fd34.entry.js.map} +1 -1
  257. package/dist/pine-core/p-a6eb294d.entry.js +2 -0
  258. package/dist/pine-core/p-a6eb294d.entry.js.map +1 -0
  259. package/dist/pine-core/{p-564e8159.entry.js → p-b2b8070b.entry.js} +2 -2
  260. package/dist/pine-core/{p-4f7ee11c.entry.js → p-b5ad8600.entry.js} +2 -2
  261. package/dist/pine-core/p-b8e27935.system.entry.js +2 -0
  262. package/dist/pine-core/p-b8e27935.system.entry.js.map +1 -0
  263. package/dist/pine-core/{p-51651124.entry.js → p-b924a6f7.entry.js} +2 -2
  264. package/dist/pine-core/p-bb55fb8d.system.entry.js +2 -0
  265. package/dist/pine-core/p-bb55fb8d.system.entry.js.map +1 -0
  266. package/dist/pine-core/p-c25d94c0.system.entry.js +2 -0
  267. package/dist/pine-core/p-c25d94c0.system.entry.js.map +1 -0
  268. package/dist/pine-core/{p-1922e07e.system.entry.js → p-c8f50955.system.entry.js} +2 -2
  269. package/dist/pine-core/{p-1922e07e.system.entry.js.map → p-c8f50955.system.entry.js.map} +1 -1
  270. package/dist/pine-core/p-ccbff59d.entry.js +2 -0
  271. package/dist/pine-core/{p-12e537ba.system.entry.js → p-cd001902.system.entry.js} +2 -2
  272. package/dist/pine-core/p-d1038811.entry.js +2 -0
  273. package/dist/pine-core/p-d1038811.entry.js.map +1 -0
  274. package/dist/pine-core/{p-edbc3b8d.entry.js → p-d1972e4b.entry.js} +2 -2
  275. package/dist/pine-core/{p-0af86d62.entry.js → p-da9c79a4.entry.js} +2 -2
  276. package/dist/pine-core/{p-825cdc06.entry.js → p-db38d613.entry.js} +2 -2
  277. package/dist/pine-core/{p-5ffec55d.system.js → p-e55f6789.system.js} +1 -1
  278. package/dist/pine-core/p-e55f6789.system.js.map +1 -0
  279. package/dist/pine-core/{p-ec56491f.system.entry.js → p-f1086b10.system.entry.js} +2 -2
  280. package/dist/pine-core/p-f3f00b4b.system.entry.js +2 -0
  281. package/dist/pine-core/pine-core.esm.js +1 -1
  282. package/dist/pine-core/pine-core.esm.js.map +1 -1
  283. package/dist/pine-core/pine-core.js +1 -1
  284. package/dist/pine-core/svg/bulb.svg +1 -0
  285. package/dist/pine-core/svg/course-filled.svg +1 -0
  286. package/dist/pine-core/svg/hd-video.svg +1 -1
  287. package/dist/pine-core/svg/mail.svg +1 -1
  288. package/dist/pine-core/svg/one-off-session.svg +1 -1
  289. package/dist/pine-core/svg/users-filled.svg +1 -0
  290. package/dist/types/components/pds-checkbox/pds-checkbox.d.ts +4 -1
  291. package/dist/types/components/pds-loader/pds-loader.d.ts +24 -0
  292. package/dist/types/components/pds-table/pds-table-cell/pds-table-cell.d.ts +1 -1
  293. package/dist/types/components/pds-table/pds-table-head/pds-table-head.d.ts +18 -1
  294. package/dist/types/components/pds-table/pds-table-head-cell/pds-table-head-cell.d.ts +5 -1
  295. package/dist/types/components/pds-table/pds-table-row/pds-table-row.d.ts +12 -6
  296. package/dist/types/components/pds-table/pds-table.d.ts +21 -1
  297. package/dist/types/components.d.ts +133 -1
  298. package/dist/types/utils/closest.d.ts +1 -0
  299. package/package.json +1 -1
  300. package/components/custom-elements.d.ts +0 -2
  301. package/components/index.d.ts +0 -92
  302. package/components/index.js +0 -32
  303. package/components/index.js.map +0 -1
  304. package/components/index2.js.map +0 -1
  305. package/components/package.json +0 -9
  306. package/components/pds-accordion.d.ts +0 -11
  307. package/components/pds-accordion.js +0 -68
  308. package/components/pds-accordion.js.map +0 -1
  309. package/components/pds-avatar.d.ts +0 -11
  310. package/components/pds-avatar.js +0 -103
  311. package/components/pds-avatar.js.map +0 -1
  312. package/components/pds-box.d.ts +0 -11
  313. package/components/pds-box.js +0 -124
  314. package/components/pds-box.js.map +0 -1
  315. package/components/pds-button.d.ts +0 -11
  316. package/components/pds-button.js +0 -8
  317. package/components/pds-button.js.map +0 -1
  318. package/components/pds-button2.js +0 -84
  319. package/components/pds-button2.js.map +0 -1
  320. package/components/pds-checkbox.d.ts +0 -11
  321. package/components/pds-checkbox.js +0 -8
  322. package/components/pds-checkbox.js.map +0 -1
  323. package/components/pds-checkbox2.js +0 -86
  324. package/components/pds-checkbox2.js.map +0 -1
  325. package/components/pds-chip.d.ts +0 -11
  326. package/components/pds-chip.js +0 -78
  327. package/components/pds-chip.js.map +0 -1
  328. package/components/pds-copytext.d.ts +0 -11
  329. package/components/pds-copytext.js +0 -88
  330. package/components/pds-copytext.js.map +0 -1
  331. package/components/pds-divider.d.ts +0 -11
  332. package/components/pds-divider.js +0 -54
  333. package/components/pds-divider.js.map +0 -1
  334. package/components/pds-icon.js +0 -8
  335. package/components/pds-icon.js.map +0 -1
  336. package/components/pds-icon2.js +0 -359
  337. package/components/pds-icon2.js.map +0 -1
  338. package/components/pds-image.d.ts +0 -11
  339. package/components/pds-image.js +0 -55
  340. package/components/pds-image.js.map +0 -1
  341. package/components/pds-input.d.ts +0 -11
  342. package/components/pds-input.js +0 -72
  343. package/components/pds-input.js.map +0 -1
  344. package/components/pds-label.js +0 -39
  345. package/components/pds-label.js.map +0 -1
  346. package/components/pds-link.d.ts +0 -11
  347. package/components/pds-link.js +0 -65
  348. package/components/pds-link.js.map +0 -1
  349. package/components/pds-progress.d.ts +0 -11
  350. package/components/pds-progress.js +0 -49
  351. package/components/pds-progress.js.map +0 -1
  352. package/components/pds-radio.d.ts +0 -11
  353. package/components/pds-radio.js +0 -78
  354. package/components/pds-radio.js.map +0 -1
  355. package/components/pds-row.d.ts +0 -11
  356. package/components/pds-row.js +0 -72
  357. package/components/pds-row.js.map +0 -1
  358. package/components/pds-sortable-item.d.ts +0 -11
  359. package/components/pds-sortable-item.js +0 -58
  360. package/components/pds-sortable-item.js.map +0 -1
  361. package/components/pds-sortable.d.ts +0 -11
  362. package/components/pds-sortable.js +0 -2722
  363. package/components/pds-sortable.js.map +0 -1
  364. package/components/pds-switch.d.ts +0 -11
  365. package/components/pds-switch.js +0 -82
  366. package/components/pds-switch.js.map +0 -1
  367. package/components/pds-tab.d.ts +0 -11
  368. package/components/pds-tab.js +0 -53
  369. package/components/pds-tab.js.map +0 -1
  370. package/components/pds-table-body.d.ts +0 -11
  371. package/components/pds-table-body.js +0 -36
  372. package/components/pds-table-body.js.map +0 -1
  373. package/components/pds-table-cell.d.ts +0 -11
  374. package/components/pds-table-cell.js +0 -8
  375. package/components/pds-table-cell.js.map +0 -1
  376. package/components/pds-table-cell2.js.map +0 -1
  377. package/components/pds-table-head-cell.d.ts +0 -11
  378. package/components/pds-table-head-cell.js +0 -8
  379. package/components/pds-table-head-cell.js.map +0 -1
  380. package/components/pds-table-head-cell2.js +0 -96
  381. package/components/pds-table-head-cell2.js.map +0 -1
  382. package/components/pds-table-head.d.ts +0 -11
  383. package/components/pds-table-head.js +0 -56
  384. package/components/pds-table-head.js.map +0 -1
  385. package/components/pds-table-row.d.ts +0 -11
  386. package/components/pds-table-row.js +0 -78
  387. package/components/pds-table-row.js.map +0 -1
  388. package/components/pds-table.d.ts +0 -11
  389. package/components/pds-table.js +0 -100
  390. package/components/pds-table.js.map +0 -1
  391. package/components/pds-tabpanel.d.ts +0 -11
  392. package/components/pds-tabpanel.js +0 -45
  393. package/components/pds-tabpanel.js.map +0 -1
  394. package/components/pds-tabs.d.ts +0 -11
  395. package/components/pds-tabs.js +0 -119
  396. package/components/pds-tabs.js.map +0 -1
  397. package/components/pds-textarea.d.ts +0 -11
  398. package/components/pds-textarea.js +0 -82
  399. package/components/pds-textarea.js.map +0 -1
  400. package/components/pds-tooltip.d.ts +0 -11
  401. package/components/pds-tooltip.js +0 -178
  402. package/components/pds-tooltip.js.map +0 -1
  403. package/dist/cjs/index-33465846.js.map +0 -1
  404. package/dist/cjs/index-7d9c71f6.js.map +0 -1
  405. package/dist/cjs/pds-checkbox_2.cjs.entry.js +0 -112
  406. package/dist/cjs/pds-checkbox_2.cjs.entry.js.map +0 -1
  407. package/dist/esm/index-6f0bb1b9.js.map +0 -1
  408. package/dist/esm/index-bdeab80c.js +0 -14
  409. package/dist/esm/index-bdeab80c.js.map +0 -1
  410. package/dist/esm/pds-checkbox_2.entry.js +0 -107
  411. package/dist/esm/pds-checkbox_2.entry.js.map +0 -1
  412. package/dist/esm-es5/index-6f0bb1b9.js +0 -3
  413. package/dist/esm-es5/index-6f0bb1b9.js.map +0 -1
  414. package/dist/esm-es5/index-bdeab80c.js.map +0 -1
  415. package/dist/esm-es5/pds-checkbox_2.entry.js +0 -2
  416. package/dist/esm-es5/pds-checkbox_2.entry.js.map +0 -1
  417. package/dist/pine-core/p-0a1e2528.system.entry.js +0 -2
  418. package/dist/pine-core/p-0a1e2528.system.entry.js.map +0 -1
  419. package/dist/pine-core/p-0a636312.system.entry.js +0 -2
  420. package/dist/pine-core/p-0a636312.system.entry.js.map +0 -1
  421. package/dist/pine-core/p-1330a135.entry.js.map +0 -1
  422. package/dist/pine-core/p-16e9d55b.entry.js +0 -2
  423. package/dist/pine-core/p-16e9d55b.entry.js.map +0 -1
  424. package/dist/pine-core/p-209bc3fd.entry.js +0 -2
  425. package/dist/pine-core/p-2f77dbd3.js +0 -3
  426. package/dist/pine-core/p-2f77dbd3.js.map +0 -1
  427. package/dist/pine-core/p-3caa5870.system.entry.js +0 -2
  428. package/dist/pine-core/p-3caa5870.system.entry.js.map +0 -1
  429. package/dist/pine-core/p-49a28a19.system.entry.js +0 -2
  430. package/dist/pine-core/p-5f2b3f57.entry.js +0 -2
  431. package/dist/pine-core/p-5f2b3f57.entry.js.map +0 -1
  432. package/dist/pine-core/p-5ffec55d.system.js.map +0 -1
  433. package/dist/pine-core/p-61ab207f.entry.js +0 -2
  434. package/dist/pine-core/p-61ab207f.entry.js.map +0 -1
  435. package/dist/pine-core/p-6370aa12.system.entry.js +0 -2
  436. package/dist/pine-core/p-6370aa12.system.entry.js.map +0 -1
  437. package/dist/pine-core/p-64b4cb70.system.js +0 -3
  438. package/dist/pine-core/p-64b4cb70.system.js.map +0 -1
  439. package/dist/pine-core/p-7611d073.system.js +0 -2
  440. package/dist/pine-core/p-7611d073.system.js.map +0 -1
  441. package/dist/pine-core/p-87c2ac18.entry.js +0 -2
  442. package/dist/pine-core/p-87c2ac18.entry.js.map +0 -1
  443. package/dist/pine-core/p-afdfadb0.entry.js +0 -2
  444. package/dist/pine-core/p-b7897f94.js.map +0 -1
  445. package/dist/pine-core/p-bc1cb8e2.entry.js +0 -2
  446. package/dist/pine-core/p-bc3782a0.entry.js.map +0 -1
  447. package/dist/pine-core/p-d99998a4.system.entry.js.map +0 -1
  448. package/dist/pine-core/p-e4f30321.js +0 -2
  449. package/dist/pine-core/p-ecbf0b15.system.entry.js +0 -2
  450. package/dist/pine-core/p-ecbf0b15.system.entry.js.map +0 -1
  451. package/hydrate/index.d.ts +0 -218
  452. package/hydrate/index.js +0 -13114
  453. package/hydrate/package.json +0 -6
  454. /package/dist/esm-es5/{pds-label-d7e11551.js.map → pds-label-bea9ee54.js.map} +0 -0
  455. /package/dist/pine-core/{p-320e4c53.system.entry.js.map → p-038065cf.system.entry.js.map} +0 -0
  456. /package/dist/pine-core/{p-dacd68cf.system.entry.js.map → p-0f3ceb6c.system.entry.js.map} +0 -0
  457. /package/dist/pine-core/{p-7f917c20.entry.js.map → p-1618833a.entry.js.map} +0 -0
  458. /package/dist/pine-core/{p-ff9044ed.entry.js.map → p-1775b56f.entry.js.map} +0 -0
  459. /package/dist/pine-core/{p-65a167b8.entry.js.map → p-19b44f85.entry.js.map} +0 -0
  460. /package/dist/pine-core/{p-c721d912.system.entry.js.map → p-1a03a25f.system.entry.js.map} +0 -0
  461. /package/dist/pine-core/{p-4d4bea0a.entry.js.map → p-23d24773.entry.js.map} +0 -0
  462. /package/dist/pine-core/{p-478689a0.system.entry.js.map → p-286189e0.system.entry.js.map} +0 -0
  463. /package/dist/pine-core/{p-bc1cb8e2.entry.js.map → p-30dfdfdd.entry.js.map} +0 -0
  464. /package/dist/pine-core/{p-2e19ec3d.system.entry.js.map → p-319ced45.system.entry.js.map} +0 -0
  465. /package/dist/pine-core/{p-2af2432d.system.entry.js.map → p-34a4c5ff.system.entry.js.map} +0 -0
  466. /package/dist/pine-core/{p-e43fd36e.entry.js.map → p-3648779f.entry.js.map} +0 -0
  467. /package/dist/pine-core/{p-3e527956.system.entry.js.map → p-3f78956d.system.entry.js.map} +0 -0
  468. /package/dist/pine-core/{p-8c5e76d4.system.entry.js.map → p-4283f600.system.entry.js.map} +0 -0
  469. /package/dist/pine-core/{p-019edcbb.entry.js.map → p-42cccfec.entry.js.map} +0 -0
  470. /package/dist/pine-core/{p-77da68b4.system.entry.js.map → p-473037f0.system.entry.js.map} +0 -0
  471. /package/dist/pine-core/{p-bb099830.system.entry.js.map → p-4da18aac.system.entry.js.map} +0 -0
  472. /package/dist/pine-core/{p-30cb97ee.system.entry.js.map → p-5b032eb0.system.entry.js.map} +0 -0
  473. /package/dist/pine-core/{p-9f8a1aa6.entry.js.map → p-5bcbdba7.entry.js.map} +0 -0
  474. /package/dist/pine-core/{p-380e465b.entry.js.map → p-5ec5e6cc.entry.js.map} +0 -0
  475. /package/dist/pine-core/{p-9e33f4fb.system.entry.js.map → p-60953292.system.entry.js.map} +0 -0
  476. /package/dist/pine-core/{p-bd5135c3.entry.js.map → p-6663628f.entry.js.map} +0 -0
  477. /package/dist/pine-core/{p-8144b8d8.system.entry.js.map → p-689137e6.system.entry.js.map} +0 -0
  478. /package/dist/pine-core/{p-e4f30321.js.map → p-6faa8c75.js.map} +0 -0
  479. /package/dist/pine-core/{p-30ca2db1.entry.js.map → p-7bf40997.entry.js.map} +0 -0
  480. /package/dist/pine-core/{p-cf147dfc.system.entry.js.map → p-7ef962b2.system.entry.js.map} +0 -0
  481. /package/dist/pine-core/{p-43783da1.system.entry.js.map → p-80024a08.system.entry.js.map} +0 -0
  482. /package/dist/pine-core/{p-5073b1c0.entry.js.map → p-8dd63189.entry.js.map} +0 -0
  483. /package/dist/pine-core/{p-327e1afa.system.entry.js.map → p-9028ed17.system.entry.js.map} +0 -0
  484. /package/dist/pine-core/{p-0ec12306.system.js.map → p-927733f2.system.js.map} +0 -0
  485. /package/dist/pine-core/{p-2250dc45.entry.js.map → p-999c240c.entry.js.map} +0 -0
  486. /package/dist/pine-core/{p-78ae6c93.system.entry.js.map → p-a4150f66.system.entry.js.map} +0 -0
  487. /package/dist/pine-core/{p-5f9fa644.system.entry.js.map → p-a5a0ced9.system.entry.js.map} +0 -0
  488. /package/dist/pine-core/{p-564e8159.entry.js.map → p-b2b8070b.entry.js.map} +0 -0
  489. /package/dist/pine-core/{p-4f7ee11c.entry.js.map → p-b5ad8600.entry.js.map} +0 -0
  490. /package/dist/pine-core/{p-51651124.entry.js.map → p-b924a6f7.entry.js.map} +0 -0
  491. /package/dist/pine-core/{p-209bc3fd.entry.js.map → p-ccbff59d.entry.js.map} +0 -0
  492. /package/dist/pine-core/{p-12e537ba.system.entry.js.map → p-cd001902.system.entry.js.map} +0 -0
  493. /package/dist/pine-core/{p-edbc3b8d.entry.js.map → p-d1972e4b.entry.js.map} +0 -0
  494. /package/dist/pine-core/{p-0af86d62.entry.js.map → p-da9c79a4.entry.js.map} +0 -0
  495. /package/dist/pine-core/{p-825cdc06.entry.js.map → p-db38d613.entry.js.map} +0 -0
  496. /package/dist/pine-core/{p-ec56491f.system.entry.js.map → p-f1086b10.system.entry.js.map} +0 -0
  497. /package/dist/pine-core/{p-49a28a19.system.entry.js.map → p-f3f00b4b.system.entry.js.map} +0 -0
@@ -1,10 +1,20 @@
1
1
  import { Host, h } from "@stencil/core";
2
+ import { closest } from "../../../utils/closest";
2
3
  export class PdsTableRow {
3
4
  constructor() {
4
- this.handleCheckboxClick = () => {
5
+ this.handleClick = () => {
5
6
  this.isSelected = !this.isSelected; // Toggle the selected state
6
- const selectedIndex = Array.from(this.hostElement.parentNode.children).indexOf(this.hostElement);
7
- this.pdsTableRowSelected.emit({ rowIndex: selectedIndex, isSelected: this.isSelected });
7
+ this.handleSelect(this.isSelected);
8
+ };
9
+ this.handleSelect = (isSelected) => {
10
+ this.indeterminate = false;
11
+ if (!closest('pds-table-head', this.hostElement)) {
12
+ const rowIndex = Array.from(this.hostElement.parentNode.children).indexOf(this.hostElement);
13
+ this.pdsTableRowSelected.emit({
14
+ rowIndex,
15
+ isSelected,
16
+ });
17
+ }
8
18
  };
9
19
  this.generateUniqueId = () => {
10
20
  const randomString = Math.random().toString(36).substring(2, 8);
@@ -12,7 +22,8 @@ export class PdsTableRow {
12
22
  const uniqueId = `${randomString}-${timestamp}`;
13
23
  return uniqueId;
14
24
  };
15
- this.isSelected = false;
25
+ this.indeterminate = undefined;
26
+ this.isSelected = undefined;
16
27
  }
17
28
  classNames() {
18
29
  const classNames = [];
@@ -28,8 +39,13 @@ export class PdsTableRow {
28
39
  tableCell === null || tableCell === void 0 ? void 0 : tableCell.classList.add("is-fixed");
29
40
  }
30
41
  }
42
+ componentWillLoad() {
43
+ if (this.isSelected) {
44
+ this.handleSelect(this.isSelected);
45
+ }
46
+ }
31
47
  render() {
32
- return (h(Host, { key: '9ef478c127a101b918e3e444109a0a3b72d809d6', class: this.classNames(), role: "row" }, this.tableRef && this.tableRef.selectable && (h("pds-table-cell", { key: 'f7ecba3776fe1a5606ea66bc43f495e03635803f', part: this.tableRef.fixedColumn ? 'checkbox-cell' : '', class: this.tableRef.selectable ? 'has-checkbox' : '' }, h("pds-checkbox", { key: '6e4ebaa953542cb476f141818375b3ba8b490b2c', componentId: this.generateUniqueId(), onClick: this.handleCheckboxClick, label: "Select Row", labelHidden: true, checked: this.isSelected }))), h("slot", { key: '4ccbd6b1a81d420dec05acb4f7a404ee670959b3' })));
48
+ return (h(Host, { key: 'dbfba35e818a96281f5df7e51e60f0bbaf4d5527', class: this.classNames(), role: "row" }, this.tableRef && this.tableRef.selectable && (h("pds-table-cell", { key: 'a0d9118e63db0829f4352875cbacf76c11978fff', part: this.tableRef.fixedColumn ? 'checkbox-cell' : '', class: this.tableRef.selectable ? 'has-checkbox' : '' }, h("pds-checkbox", { key: '60ebde7bb2e745af55e3713b952f963d50396485', componentId: this.generateUniqueId(), onClick: this.handleClick, indeterminate: this.indeterminate, label: "Select Row", labelHidden: true, checked: this.isSelected }))), h("slot", { key: '97f90a8d36781f3b278f83b16c778d5e2b6e9bce' })));
33
49
  }
34
50
  static get is() { return "pds-table-row"; }
35
51
  static get encapsulation() { return "shadow"; }
@@ -43,9 +59,42 @@ export class PdsTableRow {
43
59
  "$": ["pds-table-row.css"]
44
60
  };
45
61
  }
46
- static get states() {
62
+ static get properties() {
47
63
  return {
48
- "isSelected": {}
64
+ "indeterminate": {
65
+ "type": "boolean",
66
+ "mutable": true,
67
+ "complexType": {
68
+ "original": "boolean",
69
+ "resolved": "boolean",
70
+ "references": {}
71
+ },
72
+ "required": false,
73
+ "optional": true,
74
+ "docs": {
75
+ "tags": [],
76
+ "text": "Indicates that the selection state is indeterminate."
77
+ },
78
+ "attribute": "indeterminate",
79
+ "reflect": false
80
+ },
81
+ "isSelected": {
82
+ "type": "boolean",
83
+ "mutable": true,
84
+ "complexType": {
85
+ "original": "boolean",
86
+ "resolved": "boolean",
87
+ "references": {}
88
+ },
89
+ "required": false,
90
+ "optional": true,
91
+ "docs": {
92
+ "tags": [],
93
+ "text": "A local state to track whether the row is currently selected."
94
+ },
95
+ "attribute": "is-selected",
96
+ "reflect": false
97
+ }
49
98
  };
50
99
  }
51
100
  static get events() {
@@ -1 +1 @@
1
- {"version":3,"file":"pds-table-row.js","sourceRoot":"","sources":["../../../../src/components/pds-table/pds-table-row/pds-table-row.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAgB,KAAK,EAAE,MAAM,eAAe,CAAC;AAOxF,MAAM,OAAO,WAAW;;QAcd,wBAAmB,GAAG,GAAG,EAAE;YACjC,IAAI,CAAC,UAAU,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,4BAA4B;YAChE,MAAM,aAAa,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YACjG,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,aAAa,EAAE,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC;QAC1F,CAAC,CAAA;QAqBO,qBAAgB,GAAG,GAAG,EAAE;YAC9B,MAAM,YAAY,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,C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,EAAE,IAAI,CAAC,gBAAgB,EAAE,EACpC,OAAO,EAAE,IAAI,CAAC,mBAAmB,EACjC,KAAK,EAAE,YAAY,EACnB,WAAW,EAAE,IAAI,EACjB,OAAO,EAAE,IAAI,CAAC,UAAU,GACxB,CACa,CAClB;YACD,8DAAa,CACR,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Host, h, Event, EventEmitter, State } from '@stencil/core';\n\n@Component({\n tag: 'pds-table-row',\n styleUrl: 'pds-table-row.scss',\n shadow: true,\n})\nexport class PdsTableRow {\n @Element() hostElement: HTMLPdsTableRowElement;\n tableRef: HTMLPdsTableElement;\n\n /**\n * Event that is emitted when the checkbox is clicked, carrying the selected value.\n */\n @Event() pdsTableRowSelected: EventEmitter<{ rowIndex: number; isSelected: boolean; }>;\n\n /**\n * A local state to track whether the row is currently selected.\n */\n @State() isSelected: boolean = false;\n\n private handleCheckboxClick = () => {\n this.isSelected = !this.isSelected; // Toggle the selected state\n const selectedIndex = Array.from(this.hostElement.parentNode.children).indexOf(this.hostElement);\n this.pdsTableRowSelected.emit({ rowIndex: selectedIndex, isSelected: this.isSelected });\n }\n\n private classNames() {\n const classNames = [];\n\n if (this.isSelected) {\n classNames.push(\"is-selected\");\n }\n\n return classNames.join(' ');\n }\n\n componentWillRender() {\n this.tableRef = this.hostElement.closest('pds-table') as HTMLPdsTableElement;\n\n if (this.tableRef && this.tableRef.fixedColumn) {\n const tableCell = this.hostElement.querySelector('pds-table-cell');\n tableCell?.classList.add(\"is-fixed\");\n }\n }\n\n private generateUniqueId = () => {\n const randomString = Math.random().toString(36).substring(2, 8);\n const timestamp = new Date().toISOString().replace(/[:.]/g, '-');\n const uniqueId = `${randomString}-${timestamp}`;\n\n return uniqueId;\n }\n\n render() {\n return (\n <Host\n class={this.classNames()}\n role=\"row\"\n >\n {this.tableRef && this.tableRef.selectable && (\n <pds-table-cell part={this.tableRef.fixedColumn ? 'checkbox-cell' : ''} class={this.tableRef.selectable ? 'has-checkbox' : ''} >\n <pds-checkbox\n componentId={this.generateUniqueId()}\n onClick={this.handleCheckboxClick}\n label={\"Select Row\"}\n labelHidden={true}\n checked={this.isSelected}\n />\n </pds-table-cell>\n )}\n <slot></slot>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"pds-table-row.js","sourceRoot":"","sources":["../../../../src/components/pds-table/pds-table-row/pds-table-row.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAgB,IAAI,EAAE,MAAM,eAAe,CAAC;AAEvF,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAOjD,MAAM,OAAO,WAAW;;QAmBd,gBAAW,GAAG,GAAG,EAAE;YACzB,IAAI,CAAC,UAAU,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,4BAA4B;YAChE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACrC,CAAC,CAAA;QAEO,iBAAY,GAAG,CAAC,UAAmB,EAAE,EAAE;YAC7C,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC;YAE3B,IAAI,CAAC,OAAO,CAAC,gBAAgB,EAAE,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC;gBACjD,MAAM,QAAQ,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;gBAC3F,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC;oBAC5B,QAAQ;oBACR,UAAU;iBACX,CAAC,CAAA;YACJ,CAAC;QACH,CAAC,CAAA;QA2BO,qBAAgB,GAAG,GAAG,EAAE;YAC9B,MAAM,YAAY,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,SAAS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C,eAAe,CAAC,CAAC,CAAC,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE;gBAC3H,qEACE,WAAW,EAAE,IAAI,CAAC,gBAAgB,EAAE,EACpC,OAAO,EAAE,IAAI,CAAC,WAAW,EACzB,aAAa,EAAE,IAAI,CAAC,aAAa,EACjC,KAAK,EAAE,YAAY,EACnB,WAAW,EAAE,IAAI,EACjB,OAAO,EAAE,IAAI,CAAC,UAAU,GACxB,CACa,CAClB;YACD,8DAAa,CACR,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Host, h, Event, EventEmitter, Prop } from '@stencil/core';\n\nimport { closest } from '../../../utils/closest';\n\n@Component({\n tag: 'pds-table-row',\n styleUrl: 'pds-table-row.scss',\n shadow: true,\n})\nexport class PdsTableRow {\n @Element() hostElement: HTMLPdsTableRowElement;\n private tableRef: HTMLPdsTableElement;\n\n /**\n * Indicates that the selection state is indeterminate.\n * */\n @Prop({ mutable: true }) indeterminate?: boolean\n\n /**\n * A local state to track whether the row is currently selected.\n */\n @Prop({ mutable: true }) isSelected?: boolean;\n\n /**\n * Event that is emitted when the checkbox is clicked, carrying the selected value.\n */\n @Event() pdsTableRowSelected: EventEmitter<{ rowIndex: number; isSelected: boolean; }>;\n\n private handleClick = () => {\n this.isSelected = !this.isSelected; // Toggle the selected state\n this.handleSelect(this.isSelected);\n }\n\n private handleSelect = (isSelected: boolean) => {\n this.indeterminate = false;\n\n if (!closest('pds-table-head', this.hostElement)) {\n const rowIndex = Array.from(this.hostElement.parentNode.children).indexOf(this.hostElement)\n this.pdsTableRowSelected.emit({\n rowIndex,\n isSelected,\n })\n }\n }\n\n private classNames() {\n const classNames = [];\n\n if (this.isSelected) {\n classNames.push(\"is-selected\");\n }\n\n return classNames.join(' ');\n }\n\n componentWillRender() {\n this.tableRef = this.hostElement.closest('pds-table') as HTMLPdsTableElement;\n\n if (this.tableRef && this.tableRef.fixedColumn) {\n const tableCell = this.hostElement.querySelector('pds-table-cell');\n tableCell?.classList.add(\"is-fixed\");\n }\n }\n\n componentWillLoad() {\n if (this.isSelected) {\n this.handleSelect(this.isSelected);\n }\n }\n\n private generateUniqueId = () => {\n const randomString = Math.random().toString(36).substring(2, 8);\n const timestamp = new Date().toISOString().replace(/[:.]/g, '-');\n const uniqueId = `${randomString}-${timestamp}`;\n\n return uniqueId;\n }\n\n render() {\n return (\n <Host\n class={this.classNames()}\n role=\"row\"\n >\n {this.tableRef && this.tableRef.selectable && (\n <pds-table-cell part={this.tableRef.fixedColumn ? 'checkbox-cell' : ''} class={this.tableRef.selectable ? 'has-checkbox' : ''} >\n <pds-checkbox\n componentId={this.generateUniqueId()}\n onClick={this.handleClick}\n indeterminate={this.indeterminate}\n label={\"Select Row\"}\n labelHidden={true}\n checked={this.isSelected}\n />\n </pds-table-cell>\n )}\n <slot></slot>\n </Host>\n );\n }\n}\n"]}
@@ -7,6 +7,12 @@
7
7
  width: 100%;
8
8
  }
9
9
 
10
+ :host(:focus-visible) {
11
+ --box-shadow-focus: 0 0 0 2px var(--pine-color-blue-200);
12
+ box-shadow: var(--box-shadow-focus);
13
+ outline: none;
14
+ }
15
+
10
16
  :host(.is-responsive) {
11
17
  background-attachment: local, local, scroll, scroll;
12
18
  background-image: linear-gradient(to right, var(--color-background-default), var(--color-background-default)), linear-gradient(to right, var(--color-background-default), var(--color-background-default)), linear-gradient(to right, rgba(0, 0, 0, 0.1), rgba(255, 255, 255, 0)), linear-gradient(to left, rgba(0, 0, 0, 0.1), rgba(255, 255, 255, 0));
@@ -57,8 +57,30 @@ export class PdsTable {
57
57
  this.sortingColumn = event.detail.column;
58
58
  this.sortingDirection = direction;
59
59
  }
60
+ handleTableSelectAll(event) {
61
+ if (event.defaultPrevented)
62
+ return;
63
+ const pdsTableBody = this.el.querySelector('pds-table-body');
64
+ const tableRows = Array.from(pdsTableBody.querySelectorAll('pds-table-row'));
65
+ tableRows.forEach((row) => {
66
+ row.isSelected = event.detail.isSelected;
67
+ });
68
+ }
69
+ async handleTableSelect(event) {
70
+ if (event.defaultPrevented)
71
+ return;
72
+ const allTableRows = this.el.querySelectorAll('pds-table-row');
73
+ const allSelectedRows = Array.from(allTableRows).every((row) => row.isSelected);
74
+ const noneSelectedRows = Array.from(allTableRows).every((row) => !row.isSelected);
75
+ const pdsTableHead = this.el.querySelector('pds-table-head');
76
+ if (!pdsTableHead)
77
+ return;
78
+ const headerCheckbox = pdsTableHead.shadowRoot.querySelector('pds-checkbox');
79
+ headerCheckbox.checked = allSelectedRows;
80
+ headerCheckbox.indeterminate = !allSelectedRows && !noneSelectedRows;
81
+ }
60
82
  render() {
61
- return (h(Host, { key: 'ce58b1bccc1ff7ee6e38198e63a19fd88f2877e6', class: this.classNames(), id: this.componentId, role: "grid", selectable: this.selectable }, h("slot", { key: 'b748a8befdd212d16c2e6780551a8c11b1843faf' })));
83
+ return (h(Host, { key: '95cc4db296681faa0fc046c9b1d6807d640b7730', class: this.classNames(), id: this.componentId, role: "grid", selectable: this.selectable, tabindex: "0" }, h("slot", { key: 'ecc9bc0761409d5a2819a05d72290c294e27454f' })));
62
84
  }
63
85
  static get is() { return "pds-table"; }
64
86
  static get encapsulation() { return "shadow"; }
@@ -167,6 +189,39 @@ export class PdsTable {
167
189
  "sortingDirection": {}
168
190
  };
169
191
  }
192
+ static get events() {
193
+ return [{
194
+ "method": "pdsTableSelect",
195
+ "name": "pdsTableSelect",
196
+ "bubbles": true,
197
+ "cancelable": true,
198
+ "composed": true,
199
+ "docs": {
200
+ "tags": [],
201
+ "text": "Event that is emitted when the checkbox is clicked, carrying the rowIndex and selected value."
202
+ },
203
+ "complexType": {
204
+ "original": "{ rowIndex: number; isSelected: boolean }",
205
+ "resolved": "{ rowIndex: number; isSelected: boolean; }",
206
+ "references": {}
207
+ }
208
+ }, {
209
+ "method": "pdsTableSelectAll",
210
+ "name": "pdsTableSelectAll",
211
+ "bubbles": true,
212
+ "cancelable": true,
213
+ "composed": true,
214
+ "docs": {
215
+ "tags": [],
216
+ "text": "Event that is emitted when the select all checkbox is clicked, carrying the selected value."
217
+ },
218
+ "complexType": {
219
+ "original": "{ isSelected: boolean }",
220
+ "resolved": "{ isSelected: boolean; }",
221
+ "references": {}
222
+ }
223
+ }];
224
+ }
170
225
  static get elementRef() { return "el"; }
171
226
  static get listeners() {
172
227
  return [{
@@ -175,6 +230,18 @@ export class PdsTable {
175
230
  "target": undefined,
176
231
  "capture": false,
177
232
  "passive": false
233
+ }, {
234
+ "name": "pdsTableSelectAll",
235
+ "method": "handleTableSelectAll",
236
+ "target": undefined,
237
+ "capture": false,
238
+ "passive": false
239
+ }, {
240
+ "name": "pdsTableRowSelected",
241
+ "method": "handleTableSelect",
242
+ "target": undefined,
243
+ "capture": false,
244
+ "passive": false
178
245
  }];
179
246
  }
180
247
  }
@@ -1 +1 @@
1
- {"version":3,"file":"pds-table.js","sourceRoot":"","sources":["../../../src/components/pds-table/pds-table.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAOjF,MAAM,OAAO,QAAQ;;;;;;;6BA6BqB,IAAI;gCACA,KAAK;;IAEjD,iBAAiB;QACf,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC;IAC5B,CAAC;IAEO,UAAU;QAChB,MAAM,UAAU,GAAG,CAAC,WAAW,CAAC,CAAC;QAEjC,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YACjB,UAAU,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAChC,CAAC;QAED,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;YACpB,UAAU,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QACnC,CAAC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O,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;YACtC,CAAC;QACH,CAAC,CAAC,CAAC;QAEH,0DAA0D;QAC1D,SAAS,CAAC,SAAS,GAAG,EAAE,CAAC;QACzB,SAAS,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;YACxB,SAAS,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;QAC7B,CAAC,CAAC,CAAC;IACL,CAAC;IAGD,eAAe,CAAC,KAAiE;QAC/E,MAAM,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC;QACnC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;QAC/C,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC;QACzC,IAAI,CAAC,gBAAgB,GAAG,SAAS,CAAC;IACpC,CAAC;IAED,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDACH,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,EACxB,EAAE,EAAE,IAAI,CAAC,WAAW,EACpB,IAAI,EAAC,MAAM,EACX,UAAU,EAAE,IAAI,CAAC,UAAU;YAE3B,8DAAa,CACR,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Host, h, Prop, State, Listen } from '@stencil/core';\n\n@Component({\n tag: 'pds-table',\n styleUrl: 'pds-table.scss',\n shadow: true,\n})\nexport class PdsTable {\n @Element() el: HTMLPdsTableElement;\n tableRef: HTMLElement;\n\n /**\n * Determines if table displays compact which reduces the spacing of table cells.\n */\n @Prop() compact: boolean;\n\n /**\n * A unique identifier used for the table `id` attribute.\n */\n @Prop() componentId!: string;\n\n /**\n * Enables the table to be responsive by horizontally scrolling on smaller screens.\n */\n @Prop() responsive: boolean;\n\n /**\n * Determines if table displays fixed column which fixes the first column of the table.\n */\n @Prop() fixedColumn: boolean;\n\n /**\n * Determines if table displays checkboxes for selectable rows.\n */\n @Prop() selectable: boolean;\n\n @State() sortingColumn: string | null = null;\n @State() sortingDirection: 'asc' | 'desc' = 'asc';\n\n componentWillLoad() {\n this.sortingColumn = null;\n }\n\n private classNames() {\n const classNames = ['pds-table'];\n\n if (this.compact) {\n classNames.push('is-compact');\n }\n\n if (this.responsive) {\n classNames.push('is-responsive');\n }\n\n return classNames.join(' ');\n }\n\n private sortTable(column: string, direction: 'asc' | 'desc') {\n const tableBody = this.el.querySelector('pds-table-body');\n\n // Get the rows in the table body\n const tableRows = Array.from(tableBody.querySelectorAll('pds-table-row'));\n\n // Find the column index based on the column name\n const columnHeaderCells: HTMLElement[] = Array.from(\n this.el.querySelectorAll('pds-table-head-cell[sortable]')\n );\n\n const columnHeaderCell = columnHeaderCells.find(\n (cell) => cell.innerText.trim() === column\n );\n\n if (!columnHeaderCell) {\n console.warn(`Column \"${column}\" not found.`);\n return;\n }\n\n const columnIndex = columnHeaderCells.indexOf(columnHeaderCell);\n\n // Sort the rows based on the content of the specified column\n tableRows.sort((a, b) => {\n const valueA = a.querySelector(`pds-table-cell:nth-child(${columnIndex + 1})`).textContent.trim();\n const valueB = b.querySelector(`pds-table-cell:nth-child(${columnIndex + 1})`).textContent.trim();\n\n if (direction === 'asc') {\n return valueA.localeCompare(valueB);\n } else {\n return valueB.localeCompare(valueA);\n }\n });\n\n // Clear and append the sorted rows back to the table body\n tableBody.innerHTML = '';\n tableRows.forEach((row) => {\n tableBody.appendChild(row);\n });\n }\n\n @Listen('pdsTableSort')\n handleTableSort(event: CustomEvent<{ column: string; direction: 'asc' | 'desc' }>) {\n const { direction } = event.detail;\n this.sortTable(event.detail.column, direction);\n this.sortingColumn = event.detail.column;\n this.sortingDirection = direction;\n }\n\n render() {\n return (\n <Host\n class={this.classNames()}\n id={this.componentId}\n role=\"grid\"\n selectable={this.selectable}\n >\n <slot></slot>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"pds-table.js","sourceRoot":"","sources":["../../../src/components/pds-table/pds-table.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAOtG,MAAM,OAAO,QAAQ;;;;;;;6BA4BqB,IAAI;gCACA,KAAK;;IAajD,iBAAiB;QACf,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC;IAC5B,CAAC;IAEO,UAAU;QAChB,MAAM,UAAU,GAAG,CAAC,WAAW,CAAC,CAAC;QAEjC,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YACjB,UAAU,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAChC,CAAC;QAED,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;YACpB,UAAU,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QACnC,CAAC;QAED,OAAO,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;IAEO,SAAS,CAAC,MAAc,EAAE,SAAyB;QACzD,MAAM,SAAS,GAAG,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC;QAE1D,iCAAiC;QACjC,MAAM,SAAS,GAAG,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,gBAAgB,CAAC,eAAe,CAAC,CAAC,CAAC;QAE1E,iDAAiD;QACjD,MAAM,iBAAiB,GAAkB,KAAK,CAAC,IAAI,CACjD,IAAI,CAAC,EAAE,CAAC,gBAAgB,CAAC,+BAA+B,CAAC,CAC1D,CAAC;QAEF,MAAM,gBAAgB,GAAG,iBAAiB,CAAC,IAAI,CAC7C,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,KAAK,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AAI,qDACH,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,EACxB,EAAE,EAAE,IAAI,CAAC,WAAW,EACpB,IAAI,EAAC,MAAM,EACX,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,QAAQ,EAAC,GAAG;YAEZ,8DAAa,CACR,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, Host, h, Prop, State, Listen } from '@stencil/core';\n\n@Component({\n tag: 'pds-table',\n styleUrl: 'pds-table.scss',\n shadow: true,\n})\nexport class PdsTable {\n @Element() el: HTMLPdsTableElement;\n\n /**\n * Determines if table displays compact which reduces the spacing of table cells.\n */\n @Prop() compact: boolean;\n\n /**\n * A unique identifier used for the table `id` attribute.\n */\n @Prop() componentId!: string;\n\n /**\n * Enables the table to be responsive by horizontally scrolling on smaller screens.\n */\n @Prop() responsive: boolean;\n\n /**\n * Determines if table displays fixed column which fixes the first column of the table.\n */\n @Prop() fixedColumn: boolean;\n\n /**\n * Determines if table displays checkboxes for selectable rows.\n */\n @Prop() selectable: boolean;\n\n @State() sortingColumn: string | null = null;\n @State() sortingDirection: 'asc' | 'desc' = 'asc';\n\n\n /**\n * Event that is emitted when the checkbox is clicked, carrying the rowIndex and selected value.\n */\n @Event() pdsTableSelect: EventEmitter<{ rowIndex: number; isSelected: boolean }>;\n\n /**\n * Event that is emitted when the select all checkbox is clicked, carrying the selected value.\n */\n @Event() pdsTableSelectAll: EventEmitter<{ isSelected: boolean }>;\n\n componentWillLoad() {\n this.sortingColumn = null;\n }\n\n private classNames() {\n const classNames = ['pds-table'];\n\n if (this.compact) {\n classNames.push('is-compact');\n }\n\n if (this.responsive) {\n classNames.push('is-responsive');\n }\n\n return classNames.join(' ');\n }\n\n private sortTable(column: string, direction: 'asc' | 'desc') {\n const tableBody = this.el.querySelector('pds-table-body');\n\n // Get the rows in the table body\n const tableRows = Array.from(tableBody.querySelectorAll('pds-table-row'));\n\n // Find the column index based on the column name\n const columnHeaderCells: HTMLElement[] = Array.from(\n this.el.querySelectorAll('pds-table-head-cell[sortable]')\n );\n\n const columnHeaderCell = columnHeaderCells.find(\n (cell) => cell.innerText.trim() === column\n );\n\n if (!columnHeaderCell) {\n console.warn(`Column \"${column}\" not found.`);\n return;\n }\n\n const columnIndex = columnHeaderCells.indexOf(columnHeaderCell);\n\n // Sort the rows based on the content of the specified column\n tableRows.sort((a, b) => {\n const valueA = a.querySelector(`pds-table-cell:nth-child(${columnIndex + 1})`).textContent.trim();\n const valueB = b.querySelector(`pds-table-cell:nth-child(${columnIndex + 1})`).textContent.trim();\n\n if (direction === 'asc') {\n return valueA.localeCompare(valueB);\n } else {\n return valueB.localeCompare(valueA);\n }\n });\n\n // Clear and append the sorted rows back to the table body\n tableBody.innerHTML = '';\n tableRows.forEach((row) => {\n tableBody.appendChild(row);\n });\n }\n\n @Listen('pdsTableSort')\n handleTableSort(event: CustomEvent<{ column: string; direction: 'asc' | 'desc' }>) {\n const { direction } = event.detail;\n this.sortTable(event.detail.column, direction);\n this.sortingColumn = event.detail.column;\n this.sortingDirection = direction;\n }\n\n @Listen('pdsTableSelectAll')\n handleTableSelectAll(event: CustomEvent<{ isSelected: boolean }>) {\n if (event.defaultPrevented) return;\n\n const pdsTableBody = this.el.querySelector('pds-table-body');\n const tableRows = Array.from(pdsTableBody.querySelectorAll('pds-table-row'));\n\n tableRows.forEach((row) => {\n row.isSelected = event.detail.isSelected;\n });\n }\n\n @Listen('pdsTableRowSelected')\n async handleTableSelect(event: CustomEvent<{ rowIndex: number; isSelected: boolean }>) {\n if (event.defaultPrevented) return;\n\n const allTableRows = this.el.querySelectorAll('pds-table-row');\n const allSelectedRows = Array.from(allTableRows).every((row) => row.isSelected);\n const noneSelectedRows = Array.from(allTableRows).every((row) => !row.isSelected);\n const pdsTableHead = this.el.querySelector('pds-table-head');\n if (!pdsTableHead) return;\n\n const headerCheckbox = pdsTableHead.shadowRoot.querySelector('pds-checkbox');\n headerCheckbox.checked = allSelectedRows;\n headerCheckbox.indeterminate = !allSelectedRows && !noneSelectedRows;\n }\n\n render() {\n return (\n <Host\n class={this.classNames()}\n id={this.componentId}\n role=\"grid\"\n selectable={this.selectable}\n tabindex=\"0\"\n >\n <slot></slot>\n </Host>\n );\n }\n}\n"]}
@@ -8,7 +8,7 @@ export default {
8
8
  decorators: [withActions],
9
9
  parameters: {
10
10
  actions: {
11
- handles: ['onclick', 'pdsTableRowSelected'],
11
+ handles: ['onclick', 'pdsTableRowSelected', 'onclick', 'pdsTableSelectAll'],
12
12
  },
13
13
  },
14
14
  title: 'components/Table',
@@ -11,9 +11,9 @@ export class PdsTab {
11
11
  this.pdsTabClick.emit([index, parentComponentId]);
12
12
  }
13
13
  render() {
14
- const availabilityTabEdgeInlineStart = (h("span", { key: 'c315c8920c12da7d1913db7e53dc075dc9734280', class: "pds-tab-edge", role: "presentation" }));
15
- const availabilityTabEdgeInlineEnd = (h("span", { key: '37dfaa651e87a0291d28c50fbdda9c1cfa70f41b', class: "pds-tab-edge pds-tab-edge--end", role: "presentation" }));
16
- return (h(Host, { key: '0aa73a4a6b1ff12fff6f212135f8f33c14e6ff5f', variant: this.variant, slot: "tabs", index: this.index }, h("button", { key: '72443536e14ddad4ac8e19c025165884de81697f', role: "tab", id: this.parentComponentId + "__" + this.name, "aria-controls": this.parentComponentId + "__" + this.name + "-panel", tabindex: this.selected ? "0" : "-1", "aria-selected": this.selected ? "true" : "false", class: this.selected ? "pds-tab is-active" : "pds-tab", onClick: this.onTabClick.bind(this, this.index, this.parentComponentId) }, this.variant === "availability" && availabilityTabEdgeInlineStart, this.variant === "availability" && availabilityTabEdgeInlineEnd, h("div", { key: '547a022cb0354b176a11e681e9103bb4486ab1ef', class: "pds-tab__content" }, h("slot", { key: 'db859b0d21de4e57a75e588d069a9b1b86d271c4' })))));
14
+ const availabilityTabEdgeInlineStart = (h("span", { key: '5ea7f20d14e906993c0cfbef0ae9a37b305be9fd', class: "pds-tab-edge", role: "presentation" }));
15
+ const availabilityTabEdgeInlineEnd = (h("span", { key: '9fc8287a57fd777472d9f909a451332b7edd8c39', class: "pds-tab-edge pds-tab-edge--end", role: "presentation" }));
16
+ return (h(Host, { key: '16d11c4bda123cbb698674c560dc7c826fe653ca', variant: this.variant, slot: "tabs", index: this.index }, h("button", { key: '63e18d48cd1206c87e520cbe85c09e7fbd8752f0', role: "tab", id: this.parentComponentId + "__" + this.name, "aria-controls": this.parentComponentId + "__" + this.name + "-panel", tabindex: this.selected ? "0" : "-1", "aria-selected": this.selected ? "true" : "false", class: this.selected ? "pds-tab is-active" : "pds-tab", onClick: this.onTabClick.bind(this, this.index, this.parentComponentId) }, this.variant === "availability" && availabilityTabEdgeInlineStart, this.variant === "availability" && availabilityTabEdgeInlineEnd, h("div", { key: '5db0ed6e01b1cfe58f47669b369bb72bd3caa033', class: "pds-tab__content" }, h("slot", { key: '1737f4b6a524cf165deb1eb1a2627ae834a76be2' })))));
17
17
  }
18
18
  static get is() { return "pds-tab"; }
19
19
  static get originalStyleUrls() {
@@ -7,7 +7,7 @@ export class PdsTabpanel {
7
7
  this.selected = false;
8
8
  }
9
9
  render() {
10
- return (h(Host, { key: 'b8619019429f7430c66df0cc41d177d40b59a6e6', slot: "tabpanels" }, h("div", { key: '10a9c2cbf35a60aec932287a839fcca456c41d4c', 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: '50593c1f0174dd44b2a51cc94e89cdd1cee7a8ab' }))));
10
+ return (h(Host, { key: 'b071d63a6211e70b09f11a18609d15728eb485c6', slot: "tabpanels" }, h("div", { key: 'ab8de65d7142136888c853170b7b8b190f21abcc', 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: '0cac8366d5502be7033d1b71b681bf564aa557e8' }))));
11
11
  }
12
12
  static get is() { return "pds-tabpanel"; }
13
13
  static get originalStyleUrls() {
@@ -83,7 +83,7 @@ export class PdsTabs {
83
83
  this.passPropsToChildren();
84
84
  }
85
85
  render() {
86
- return (h(Host, { key: '92748fc6123067ba04f9cc81ea949366fb1c2a8f', "active-tab-name": this.activeTabName, class: this.classNames(), id: this.componentId }, h("div", { key: '809cbe1ed4e973db39ea69be9e30ac54881564af', class: "pds-tabs__tablist", role: "tablist", "aria-label": this.tablistLabel }, h("slot", { key: 'b23af8a48dee0528cc9f7d2b84a42411e2b14e6d', name: "tabs" })), h("slot", { key: 'fdb46b7125f735531b13c1ac82a08f27998e7511', name: "tabpanels" })));
86
+ return (h(Host, { key: 'a36e242d5e746954f80778cf515879ca82258978', "active-tab-name": this.activeTabName, class: this.classNames(), id: this.componentId }, h("div", { key: 'd6d89fd90a9a534f249c549e34308ed245773f60', class: "pds-tabs__tablist", role: "tablist", "aria-label": this.tablistLabel }, h("slot", { key: '9b5e5268c27ecf2a5331cec64d2c7121cef366a1', name: "tabs" })), h("slot", { key: 'b835cf1befe68f54b1751a976846d271ce97634e', name: "tabpanels" })));
87
87
  }
88
88
  static get is() { return "pds-tabs"; }
89
89
  static get encapsulation() { return "shadow"; }
@@ -32,10 +32,10 @@ export class PdsTextarea {
32
32
  return classNames.join(' ');
33
33
  }
34
34
  render() {
35
- return (h(Host, { key: 'a6f6eb13665857ec8762d454d79ff216e2062a66', "aria-disabled": this.disabled ? 'true' : null }, h("div", { key: 'fa77f9c7c29f214ee4d8ddb8e1e48d4d16b6a47e', class: "pds-textarea" }, this.label &&
36
- h(PdsLabel, { key: '75c242138f5c2a33a82feaa775dae0c05843d2c1', htmlFor: this.componentId, text: this.label }), h("textarea", { key: '8bebb57b878c745e07ebfc18afd2aaf7d2da66a5', "aria-describedby": assignDescription(this.componentId, this.invalid, this.helperMessage), "aria-invalid": this.invalid ? "true" : undefined, class: this.textareaClassNames(), disabled: this.disabled, id: this.componentId, name: this.name, placeholder: this.placeholder, readOnly: this.readonly, required: this.required, rows: this.rows, onChange: this.onTextareaChange }, this.value), this.helperMessage &&
37
- h("p", { key: 'b9a83aeb83b0cf4232359154d36a8ec48b0a3638', class: "pds-textarea__helper-message", id: messageId(this.componentId, 'helper') }, this.helperMessage), this.invalid &&
38
- h("p", { key: 'ee70c7aa56b8a8e18de58394c04140065670f8db', "aria-live": "assertive", class: "pds-textarea__error-message", id: messageId(this.componentId, 'error') }, this.errorMessage))));
35
+ return (h(Host, { key: 'f58ccd5b20fc30c6e6153e04e98b27fe265040af', "aria-disabled": this.disabled ? 'true' : null }, h("div", { key: '480b51012d0f7a05d83fb8cb359d2bc3a4e82189', class: "pds-textarea" }, this.label &&
36
+ h(PdsLabel, { key: '0b34ee6ee8eec6891c00596f840d028ab6ac36bb', htmlFor: this.componentId, text: this.label }), h("textarea", { key: '6f066ce38aaec3257bddd69715118aa5740723c1', "aria-describedby": assignDescription(this.componentId, this.invalid, this.helperMessage), "aria-invalid": this.invalid ? "true" : undefined, class: this.textareaClassNames(), disabled: this.disabled, id: this.componentId, name: this.name, placeholder: this.placeholder, readOnly: this.readonly, required: this.required, rows: this.rows, onChange: this.onTextareaChange }, this.value), this.helperMessage &&
37
+ h("p", { key: '91c66558978cdbb3191c0af31c34c2647749c01a', class: "pds-textarea__helper-message", id: messageId(this.componentId, 'helper') }, this.helperMessage), this.invalid &&
38
+ h("p", { key: 'da8320d10ace733c7181ab3c6827da99d94d7ebd', "aria-live": "assertive", class: "pds-textarea__error-message", id: messageId(this.componentId, 'error') }, this.errorMessage))));
39
39
  }
40
40
  static get is() { return "pds-textarea"; }
41
41
  static get encapsulation() { return "shadow"; }
@@ -58,13 +58,13 @@ export class PdsTooltip {
58
58
  this.opened = false;
59
59
  }
60
60
  render() {
61
- return (h(Host, { key: '088766be31b8716e158cbffd4afc4ada0f14dc3d', onMouseEnter: this.handleShow, onMouseLeave: this.handleHide, onFocusin: this.handleShow, onFocusout: this.handleHide }, h("div", { key: 'c4fb29b5d5834a9e94f040ded6daf15cf3fcc6ff', class: `
61
+ return (h(Host, { key: '52999e010e83fb265a46867b0b29169f7363a496', onMouseEnter: this.handleShow, onMouseLeave: this.handleHide, onFocusin: this.handleShow, onFocusout: this.handleHide }, h("div", { key: '6bb63ba10eab04114ced7ead7079d46cc22cb72c', class: `
62
62
  pds-tooltip
63
63
  pds-tooltip--${this.placement}
64
64
  ${this.htmlContent ? 'pds-tooltip--has-html-content' : ''}
65
65
  ${this.opened ? 'pds-tooltip--is-open' : ''}
66
66
  ${this.hasArrow ? '' : 'pds-tooltip--no-arrow'}
67
- ` }, h("span", { key: '25a69f567a33df83ff784d36de5bce86874d6d1d', "aria-describedby": this.componentId, class: "pds-tooltip__trigger" }, h("slot", { key: 'eab3bbca9b913b04ef4dfe7a8e472c43d57c4979' })), h("div", { key: 'bdaa9f26f848b440a8432a44481f8a1059ae0689', class: "pds-tooltip__content", "aria-hidden": this.opened ? 'false' : 'true', "aria-live": this.opened ? 'polite' : 'off', id: this.componentId, ref: (el) => (this.contentEl = el), role: "tooltip" }, h("slot", { key: '0e62fe237e9a39208aa2146e2dc1d6df6b25b41d', name: "content" }), this.content))));
67
+ ` }, h("span", { key: '930c148c837912ad9d5ea57e92246e0211b355c4', "aria-describedby": this.componentId, class: "pds-tooltip__trigger" }, h("slot", { key: '813429e2865fae92050d779ca7f47072313db851' })), h("div", { key: '7f47e8b4ff3d6238f27e38986f032ece94f6b584', class: "pds-tooltip__content", "aria-hidden": this.opened ? 'false' : 'true', "aria-live": this.opened ? 'polite' : 'off', id: this.componentId, ref: (el) => (this.contentEl = el), role: "tooltip" }, h("slot", { key: '90b3f02974d250375d55ed332a9c525626ff5439', name: "content" }), this.content))));
68
68
  }
69
69
  static get is() { return "pds-tooltip"; }
70
70
  static get encapsulation() { return "shadow"; }
@@ -0,0 +1,8 @@
1
+ // This helper function is similar to Element.closest(),
2
+ // however it also traverses shadow DOM boundaries.
3
+ export const closest = (selector, el) => {
4
+ return (el &&
5
+ (('closest' in el && el.closest(selector)) ||
6
+ closest(selector, el.getRootNode().host)));
7
+ };
8
+ //# sourceMappingURL=closest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"closest.js","sourceRoot":"","sources":["../../src/utils/closest.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,mDAAmD;AACnD,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,QAAgB,EAAE,EAAsB,EAAE,EAAE;IAClE,OAAO,CACL,EAAE;QACF,CAAC,CAAC,SAAS,IAAI,EAAE,IAAI,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;YACxC,OAAO,CAAC,QAAQ,EAAG,EAAE,CAAC,WAAW,EAA4B,CAAC,IAAI,CAAC,CAAC,CACvE,CAAA;AACH,CAAC,CAAA","sourcesContent":["// This helper function is similar to Element.closest(),\n// however it also traverses shadow DOM boundaries.\nexport const closest = (selector: string, el: Element | Document) => {\n return (\n el &&\n (('closest' in el && el.closest(selector)) ||\n closest(selector, (el.getRootNode() as unknown as ShadowRoot).host))\n )\n}\n"]}