@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
@@ -0,0 +1,93 @@
1
+ :host {
2
+ align-items: center;
3
+ display: flex;
4
+ flex-direction: column;
5
+ gap: var(--pine-spacing-100);
6
+ }
7
+
8
+ :host(.pds-loader--hidden),
9
+ .pds-loader--hidden {
10
+ border-width: 0;
11
+ clip: rect(0, 0, 0, 0);
12
+ height: 1px;
13
+ margin: -1px;
14
+ overflow: hidden;
15
+ padding: 0;
16
+ position: absolute;
17
+ white-space: nowrap;
18
+ width: 1px;
19
+ }
20
+
21
+ .pds-loader--spinner svg {
22
+ --color-background-spinner: var(--pine-color-blue-300);
23
+ --number-spinner-timing: 2s;
24
+ --number-spinner-path-timing: 1.5s;
25
+ animation: rotate var(--number-spinner-timing) linear infinite;
26
+ block-size: var(--sizing-spinner);
27
+ color: var(--color-background-spinner);
28
+ inline-size: var(--sizing-spinner);
29
+ }
30
+
31
+ .pds-loader__spinner-path {
32
+ stroke-width: 8px;
33
+ }
34
+
35
+ @keyframes rotate {
36
+ 100% {
37
+ transform: rotate(360deg);
38
+ }
39
+ }
40
+ .pds-loader--typing {
41
+ --border-radius-typing: var(--pine-border-radius-200);
42
+ --border-radius-typing-dot: var(--pine-border-radius-round);
43
+ --box-shadow-typing: var(--pine-box-shadow-sm);
44
+ --color-background-typing-default: var(--pine-color-grey-200);
45
+ --color-background-typing-dot-default: var(--pine-color-grey-500);
46
+ --number-typing-timing: 1s;
47
+ --opacity-typing-dot-default: 0.4;
48
+ --opacity-typing-dot-active: 1;
49
+ --sizing-typing-dot: calc(var(--pine-spacing-150) / 2);
50
+ --spacing-typing-gap: var(--pine-spacing-050);
51
+ --spacing-typing-margin-block: var(--pine-spacing-0);
52
+ --spacing-typing-margin-inline: auto;
53
+ --spacing-typing-padding-block: 15px;
54
+ --spacing-typing-padding-inline: var(--pine-spacing-250);
55
+ align-items: center;
56
+ background-color: var(--color-background-typing-default);
57
+ border-radius: var(--border-radius-typing);
58
+ box-shadow: var(--box-shadow-typing);
59
+ display: inline-flex;
60
+ gap: var(--spacing-typing-gap);
61
+ margin-block: var(--spacing-typing-margin-block);
62
+ margin-inline: var(--spacing-typing-margin-inline);
63
+ padding-block: var(--spacing-typing-padding-block);
64
+ padding-inline: var(--spacing-typing-padding-inline);
65
+ position: relative;
66
+ }
67
+ .pds-loader--typing span {
68
+ background-color: var(--color-background-typing-dot-default);
69
+ block-size: var(--sizing-typing-dot);
70
+ border-radius: var(--border-radius-typing-dot);
71
+ inline-size: var(--sizing-typing-dot);
72
+ opacity: var(--opacity-typing-dot-default);
73
+ }
74
+ .pds-loader--typing span:nth-of-type(1) {
75
+ animation: var(--number-typing-timing) typing infinite 0.3333s;
76
+ }
77
+ .pds-loader--typing span:nth-of-type(2) {
78
+ animation: var(--number-typing-timing) typing infinite 0.6666s;
79
+ }
80
+ .pds-loader--typing span:nth-of-type(3) {
81
+ animation: var(--number-typing-timing) typing infinite 0.9999s;
82
+ }
83
+
84
+ @keyframes typing {
85
+ 50% {
86
+ opacity: var(--opacity-typing-dot-active);
87
+ transform: scale(1.2);
88
+ }
89
+ }
90
+ .pds-loader__label {
91
+ --typography-label-default: var(--pine-font-weight-semi-bold) var(--pine-font-size-100)/var(--pine-line-height-150) var(--pine-font-family-circular);
92
+ font: var(--typography-label-default);
93
+ }
@@ -0,0 +1,127 @@
1
+ import { Host, h } from "@stencil/core";
2
+ /**
3
+ * @slot label - Default slot for Loader label text.
4
+ */
5
+ export class PdsLoader {
6
+ constructor() {
7
+ this.style = () => {
8
+ if (this.size !== undefined) {
9
+ return {
10
+ height: this.loaderSize(),
11
+ width: this.loaderSize(),
12
+ };
13
+ }
14
+ };
15
+ this.isLoading = true;
16
+ this.showLabel = false;
17
+ this.size = 'md';
18
+ this.variant = 'spinner';
19
+ }
20
+ loaderSize() {
21
+ const sizes = {
22
+ xs: '24px',
23
+ sm: '32px',
24
+ md: '48px',
25
+ lg: '64px',
26
+ xl: '80px',
27
+ };
28
+ if (sizes[this.size]) {
29
+ return sizes[this.size];
30
+ }
31
+ else {
32
+ return this.size;
33
+ }
34
+ }
35
+ render() {
36
+ return (h(Host, { key: '325b4512d1455cb90d4897e91453c4ec2370ddcb', class: `pds-loader ${this.isLoading ? '' : 'pds-loader--hidden'}`, "aria-hidden": !this.isLoading, "aria-busy": this.isLoading, "aria-live": "polite" }, this.variant === 'spinner' && (h("div", { key: 'eed858cd8518769874e7ca6d5265f3e1e77164f3', class: "pds-loader--spinner" }, h("svg", { key: 'fc821517a5923628ef96c8e37b9987c0ba3b987b', style: this.style(), viewBox: "0 0 200 200", fill: "none" }, h("defs", { key: 'f477b8f7be973a6a5b068b6758d6f549404e64c4' }, h("linearGradient", { key: '4979634cfecdca7ef5818f23577b401aa8991389', id: "spinner-secondHalf" }, h("stop", { key: 'ae4667b10205baa8dec8b7affd34d78273ad9667', offset: "0%", "stop-opacity": "0", "stop-color": "currentColor" }), h("stop", { key: '3d66bc5180831487e9e2591cc2b436f9b8cc855e', offset: "100%", "stop-opacity": "0.5", "stop-color": "currentColor" })), h("linearGradient", { key: '1c99e9057a86d4b850348543826fb6da163f4eb9', id: "spinner-firstHalf" }, h("stop", { key: '271c14abb61bb9bc01ac72f43d1cc8580b89b6c0', offset: "0%", "stop-opacity": "1", "stop-color": "currentColor" }), h("stop", { key: '4b8de0ac98a1b44ec3bbba4aa0002957e44c976c', offset: "100%", "stop-opacity": "0.5", "stop-color": "currentColor" }))), h("g", { key: 'b12aaf6168c8428999d020b46c99faf918c45f07', class: "pds-loader__spinner-path" }, h("path", { key: '4443446af5cf8c73d3352fa90d580e914c469028', stroke: "url(#spinner-secondHalf)", d: "M 4 100 A 96 96 0 0 1 196 100" }), h("path", { key: 'ca4edec218d03a74d12ce43a86ef55fbedaea39f', stroke: "url(#spinner-firstHalf)", d: "M 196 100 A 96 96 0 0 1 4 100" }), h("path", { key: 'af6ed9732a9fdd2047f100d2465b27782d2a0b02', stroke: "currentColor", "stroke-linecap": "round", d: "M 4 100 A 96 96 0 0 1 4 98" }))))), this.variant === 'typing' && (h("div", { key: '96aa15066aa426d53481bddd5b665181d9bcd0bd', class: "pds-loader--typing" }, h("span", { key: 'a0bb9722a2dbaf843afc9a50a1f42c46758d1b5e' }), h("span", { key: '0efc9cf2f132f358f58561ccbc7027c57f252df2' }), h("span", { key: 'b8b73b864c7dfefe26ac3aa33099d2f2f3737614' }))), h("div", { key: '3c921244741289e7b67228caedf6e5e13fac1d63', class: `pds-loader__label ${this.showLabel ? '' : 'pds-loader--hidden'}` }, h("slot", { key: '423a30358e6f662a0b80cef445c4a20db3dd36f9', name: "label" }, "Loading..."))));
37
+ }
38
+ static get is() { return "pds-loader"; }
39
+ static get encapsulation() { return "shadow"; }
40
+ static get originalStyleUrls() {
41
+ return {
42
+ "$": ["pds-loader.scss"]
43
+ };
44
+ }
45
+ static get styleUrls() {
46
+ return {
47
+ "$": ["pds-loader.css"]
48
+ };
49
+ }
50
+ static get properties() {
51
+ return {
52
+ "isLoading": {
53
+ "type": "boolean",
54
+ "mutable": false,
55
+ "complexType": {
56
+ "original": "boolean",
57
+ "resolved": "boolean",
58
+ "references": {}
59
+ },
60
+ "required": false,
61
+ "optional": false,
62
+ "docs": {
63
+ "tags": [],
64
+ "text": "If false, the loader will be hidden."
65
+ },
66
+ "attribute": "is-loading",
67
+ "reflect": false,
68
+ "defaultValue": "true"
69
+ },
70
+ "showLabel": {
71
+ "type": "boolean",
72
+ "mutable": false,
73
+ "complexType": {
74
+ "original": "boolean",
75
+ "resolved": "boolean",
76
+ "references": {}
77
+ },
78
+ "required": false,
79
+ "optional": true,
80
+ "docs": {
81
+ "tags": [],
82
+ "text": "Determines whether the loader should display a label."
83
+ },
84
+ "attribute": "show-label",
85
+ "reflect": false,
86
+ "defaultValue": "false"
87
+ },
88
+ "size": {
89
+ "type": "string",
90
+ "mutable": false,
91
+ "complexType": {
92
+ "original": "| 'xs' // 24px\n | 'sm' // 32px\n | 'md' // 48px\n | 'lg' // 64px\n | 'xl' // 80px\n | string",
93
+ "resolved": "string",
94
+ "references": {}
95
+ },
96
+ "required": false,
97
+ "optional": true,
98
+ "docs": {
99
+ "tags": [],
100
+ "text": "Sets the size of the spinner loader. Value can be preset or custom."
101
+ },
102
+ "attribute": "size",
103
+ "reflect": true,
104
+ "defaultValue": "'md'"
105
+ },
106
+ "variant": {
107
+ "type": "string",
108
+ "mutable": false,
109
+ "complexType": {
110
+ "original": "'spinner' | 'typing'",
111
+ "resolved": "\"spinner\" | \"typing\"",
112
+ "references": {}
113
+ },
114
+ "required": false,
115
+ "optional": false,
116
+ "docs": {
117
+ "tags": [],
118
+ "text": "Determines the type of loader."
119
+ },
120
+ "attribute": "variant",
121
+ "reflect": false,
122
+ "defaultValue": "'spinner'"
123
+ }
124
+ };
125
+ }
126
+ }
127
+ //# sourceMappingURL=pds-loader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pds-loader.js","sourceRoot":"","sources":["../../../src/components/pds-loader/pds-loader.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAEzD;;GAEG;AAOH,MAAM,OAAO,SAAS;;QA2CZ,UAAK,GAAG,GAAG,EAAE;YACnB,IAAI,IAAI,C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,kBAAc,GAAG,gBAAY,cAAc,GAAG;4BAC/D,6DAAM,MAAM,EAAC,MAAM,kBAAc,KAAK,gBAAY,cAAc,GAAG,CACpD,CACZ;oBAEP,0DAAG,KAAK,EAAC,0BAA0B;wBACjC,6DAAM,MAAM,EAAC,0BAA0B,EAAC,CAAC,EAAC,+BAA+B,GAAG;wBAC5E,6DAAM,MAAM,EAAC,yBAAyB,EAAC,CAAC,EAAC,+BAA+B,GAAG;wBAE3E,6DAAM,MAAM,EAAC,cAAc,oBAAgB,OAAO,EAAC,CAAC,EAAC,4BAA4B,GAAG,CAClF,CACA,CACF,CACP;YAEA,IAAI,CAAC,OAAO,KAAK,QAAQ,IAAI,CAC5B,4DAAK,KAAK,EAAC,oBAAoB;gBAC7B,8DAAa;gBACb,8DAAa;gBACb,8DAAa,CACT,CACP;YAED,4DAAK,KAAK,EAAE,qBAAqB,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,oBAAoB,EAAE;gBAC3E,6DAAM,IAAI,EAAC,OAAO,iBAAkB,CAChC,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Prop } from '@stencil/core';\n\n/**\n * @slot label - Default slot for Loader label text.\n */\n\n@Component({\n tag: 'pds-loader',\n styleUrl: 'pds-loader.scss',\n shadow: true,\n})\nexport class PdsLoader {\n /**\n * If false, the loader will be hidden.\n */\n @Prop() isLoading: boolean = true;\n\n /**\n * Determines whether the loader should display a label.\n */\n @Prop() showLabel?: boolean = false;\n\n /**\n * Sets the size of the spinner loader. Value can be preset or custom.\n */\n @Prop({ reflect: true }) size?:\n | 'xs' // 24px\n | 'sm' // 32px\n | 'md' // 48px\n | 'lg' // 64px\n | 'xl' // 80px\n | string = 'md';\n\n /**\n * Determines the type of loader.\n */\n @Prop() variant: 'spinner' | 'typing' = 'spinner';\n\n private loaderSize() {\n const sizes: { [key: string]: string } = {\n xs: '24px',\n sm: '32px',\n md: '48px',\n lg: '64px',\n xl: '80px',\n };\n\n if (sizes[this.size]) {\n return sizes[this.size];\n } else {\n return this.size;\n }\n }\n\n private style = () => {\n if (this.size !== undefined) {\n return {\n height: this.loaderSize(),\n width: this.loaderSize(),\n };\n }\n };\n\n render() {\n return (\n <Host class={`pds-loader ${this.isLoading ? '' : 'pds-loader--hidden'}`} aria-hidden={!this.isLoading} aria-busy={this.isLoading} aria-live=\"polite\">\n {this.variant === 'spinner' && (\n <div class=\"pds-loader--spinner\">\n <svg style={this.style()} viewBox=\"0 0 200 200\" fill=\"none\">\n <defs>\n <linearGradient id=\"spinner-secondHalf\">\n <stop offset=\"0%\" stop-opacity=\"0\" stop-color=\"currentColor\" />\n <stop offset=\"100%\" stop-opacity=\"0.5\" stop-color=\"currentColor\" />\n </linearGradient>\n <linearGradient id=\"spinner-firstHalf\">\n <stop offset=\"0%\" stop-opacity=\"1\" stop-color=\"currentColor\" />\n <stop offset=\"100%\" stop-opacity=\"0.5\" stop-color=\"currentColor\" />\n </linearGradient>\n </defs>\n\n <g class=\"pds-loader__spinner-path\">\n <path stroke=\"url(#spinner-secondHalf)\" d=\"M 4 100 A 96 96 0 0 1 196 100\" />\n <path stroke=\"url(#spinner-firstHalf)\" d=\"M 196 100 A 96 96 0 0 1 4 100\" />\n\n <path stroke=\"currentColor\" stroke-linecap=\"round\" d=\"M 4 100 A 96 96 0 0 1 4 98\" />\n </g>\n </svg>\n </div>\n )}\n\n {this.variant === 'typing' && (\n <div class=\"pds-loader--typing\">\n <span></span>\n <span></span>\n <span></span>\n </div>\n )}\n\n <div class={`pds-loader__label ${this.showLabel ? '' : 'pds-loader--hidden'}`}>\n <slot name=\"label\">Loading...</slot>\n </div>\n </Host>\n );\n }\n}\n"]}
@@ -0,0 +1,36 @@
1
+ import { html } from 'lit';
2
+ import { extractArgTypes } from '@pxtrn/storybook-addon-docs-stencil';
3
+
4
+ export default {
5
+ argTypes: extractArgTypes('pds-loader'),
6
+ component: 'pds-loader',
7
+ title: 'components/Loader',
8
+ args: {
9
+ isLoading: true,
10
+ showLabel: false,
11
+ },
12
+ }
13
+
14
+ const BaseTemplate = (args) => html`
15
+ <pds-loader
16
+ is-loading="${args.isLoading}"
17
+ show-label="${args.showLabel}"
18
+ size="${args.size}"
19
+ variant="${args.variant}"
20
+ >
21
+ <span slot="label">${args.label}</span>
22
+ </pds-loader>
23
+ `;
24
+
25
+ export const Default = BaseTemplate.bind();
26
+ Default.args = {
27
+ size: '100px',
28
+ showLabel: true,
29
+ label: "Now loading...",
30
+ variant: 'spinner'
31
+ };
32
+
33
+ export const Typing = BaseTemplate.bind();
34
+ Typing.args = {
35
+ variant: 'typing'
36
+ };
@@ -9,7 +9,7 @@ export class PdsProgress {
9
9
  this.showPercent = false;
10
10
  }
11
11
  render() {
12
- return (h(Host, { key: '5ee3e8b3a4182384a2f70632f1b6420acd27e278', class: this.animated ? { 'is-animated': this.animated } : '' }, h("div", { key: 'd81206158817db4f806e3c804177614791f4d121', class: "pds-progress" }, h("label", { key: 'a308666ace23b903e256a71d6f3b65d53fbc6ed6', class: "pds-progress__label", htmlFor: this.componentId }, this.label), h("progress", { key: 'ded042f6761fe83c12e26f9bcbf191ff2ee66689', id: this.componentId, max: "100", style: this.fillColor ? { '--color-progress-fill': this.fillColor } : {}, value: this.percent })), this.showPercent && h("div", { key: 'bab83ee8ac34b7caea9ab7b906a1a16b72ee29fc', class: "pds-progress__percentage" }, this.percent, "%")));
12
+ return (h(Host, { key: 'a11c3d67af0621981d2f13ad673e11999926b3c1', class: this.animated ? { 'is-animated': this.animated } : '' }, h("div", { key: 'bb480c5ce1fc9c56fce1022a26783d5729eb30dc', class: "pds-progress" }, h("label", { key: '02fec27f268262889b514aef4d8344bbb9a9484c', class: "pds-progress__label", htmlFor: this.componentId }, this.label), h("progress", { key: '122d2639d7630f28fd98adf9bc003eeed6c9ebef', id: this.componentId, max: "100", style: this.fillColor ? { '--color-progress-fill': this.fillColor } : {}, value: this.percent })), this.showPercent && h("div", { key: 'ba7262e0627a2848b3da03a9a32882510bf2628c', class: "pds-progress__percentage" }, this.percent, "%")));
13
13
  }
14
14
  static get is() { return "pds-progress"; }
15
15
  static get encapsulation() { return "shadow"; }
@@ -33,9 +33,9 @@ export class PdsRadio {
33
33
  return classNames.join(' ');
34
34
  }
35
35
  render() {
36
- return (h(Host, { key: 'e2fb2e853619e2dbcee43ba6141d6782f521a92d', class: this.classNames() }, h("input", { key: '944f31d74b9d54fad8d39ec4221bf76cb717c352', "aria-describedby": assignDescription(this.componentId, this.invalid, this.helperMessage), "aria-invalid": this.invalid ? "true" : undefined, type: "radio", id: this.componentId, name: this.name, value: this.value, checked: this.checked, required: this.required, disabled: this.disabled, onChange: this.handleRadioChange }), h(PdsLabel, { key: '4da032a55ddb9e8f92ddde9a8e5238836345ccde', htmlFor: this.componentId, text: this.label }), this.helperMessage &&
37
- h("div", { key: '529acc87ec6154e1d01877cff7f3977ed878c02b', class: 'pds-radio__message', id: messageId(this.componentId, 'helper') }, this.helperMessage), this.errorMessage &&
38
- h("div", { key: 'f5850864b0fa702cb129c79bee3770ea768c614d', class: `pds-radio__message pds-radio__message--error`, id: messageId(this.componentId, 'error'), "aria-live": "assertive" }, this.errorMessage)));
36
+ return (h(Host, { key: 'e23a00c8941dfce9d9d6a99a554654b7bd2259c4', class: this.classNames() }, h("input", { key: '571d2e6656cd94573253f54028b1926a3c5e1499', "aria-describedby": assignDescription(this.componentId, this.invalid, this.helperMessage), "aria-invalid": this.invalid ? "true" : undefined, type: "radio", id: this.componentId, name: this.name, value: this.value, checked: this.checked, required: this.required, disabled: this.disabled, onChange: this.handleRadioChange }), h(PdsLabel, { key: '42c2c95ed36e194f43367f2c28ed81660d82b096', htmlFor: this.componentId, text: this.label }), this.helperMessage &&
37
+ h("div", { key: '32be02934f23b2832c6c1d0e56c3dceda8c9ccc9', class: 'pds-radio__message', id: messageId(this.componentId, 'helper') }, this.helperMessage), this.errorMessage &&
38
+ h("div", { key: 'c670effc6a381f872800c8dd58095c2dce49016e', class: `pds-radio__message pds-radio__message--error`, id: messageId(this.componentId, 'error'), "aria-live": "assertive" }, this.errorMessage)));
39
39
  }
40
40
  static get is() { return "pds-radio"; }
41
41
  static get encapsulation() { return "scoped"; }
@@ -32,7 +32,7 @@ export class PdsRow {
32
32
  })), (this.minHeight && {
33
33
  'min-height': this.minHeight,
34
34
  }));
35
- return h(Host, { key: '37046262dfc9a47b690bb5f642b718f298a7d180', class: `pds-row ${rowClasses}`, style: rowInlineStyles });
35
+ return h(Host, { key: 'b764491968a34ae8f1e3e329111cb4ba0887bdef', class: `pds-row ${rowClasses}`, style: rowInlineStyles });
36
36
  }
37
37
  static get is() { return "pds-row"; }
38
38
  static get originalStyleUrls() {
@@ -18,7 +18,7 @@ export class PdsSortableItem {
18
18
  }
19
19
  }
20
20
  render() {
21
- return (h(Host, { key: '61c57ebc93b66e4c8777fe52163c2c7f600361a5', class: "pds-sortable-item", id: this.componentId }, this.showHandle && (h("div", { key: 'f2bafa535db6cfa07113bd8f9a32d5b7a0bc694d', class: "pds-sortable-item__handle" }, h("pds-icon", { key: '9ead72e13f881f9cdbe4cb910de09173c42c96c5', icon: handleIcon }))), h("slot", { key: '7322ce5649cd2f7765d9275ec47317570854e5f9' }), this.enableActions && (h("div", { key: '709a91c4160407b491fb7ed44c7c7c0a9e980262', class: "pds-sortable-item__actions" }, h("slot", { key: '280ed68aec92927b2a79581f56d3905188a27f1a', name: "sortable-item-actions" })))));
21
+ return (h(Host, { key: '60214e183314736338f9b38cb93a9c5989e16cdf', class: "pds-sortable-item", id: this.componentId }, this.showHandle && (h("div", { key: '7cc252c99598f384a87518c101d0772a4ce344e4', class: "pds-sortable-item__handle" }, h("pds-icon", { key: 'e2b219927cf717fa53112066ba3fe0ac12688edd', icon: handleIcon }))), h("slot", { key: 'e259bfbf7e8c848567d07639e62adfe5781f29b8' }), this.enableActions && (h("div", { key: 'e83d28d55b6fee971575433a3e3f8b1d5b7e52fe', class: "pds-sortable-item__actions" }, h("slot", { key: '7ac52a8109e49cfff96cead45a3b318646c7f064', name: "sortable-item-actions" })))));
22
22
  }
23
23
  static get is() { return "pds-sortable-item"; }
24
24
  static get encapsulation() { return "scoped"; }
@@ -35,7 +35,7 @@ export class PdsSortable {
35
35
  Sortable.create(this.el, sortableOptions);
36
36
  }
37
37
  render() {
38
- return (h(Host, { key: 'f7a4d29675fcb46ca76dc014e8cc57ac243d07fa', class: this.classNames(), id: this.componentId }, h("slot", { key: '2c851fb0e61f3373345b1e170520c3327ab3fa0c' })));
38
+ return (h(Host, { key: '030286aa0de920f4b5ce4470f3d1b5ab14be2792', class: this.classNames(), id: this.componentId }, h("slot", { key: 'c38822d7c82273c2fbc28d09c919e4c179ebb49d' })));
39
39
  }
40
40
  static get is() { return "pds-sortable"; }
41
41
  static get encapsulation() { return "scoped"; }
@@ -34,9 +34,9 @@ export class PdsSwitch {
34
34
  this.value = undefined;
35
35
  }
36
36
  render() {
37
- return (h(Host, { key: 'f00007b5d1bde6895cb7f410b82e5c3669d75327', class: this.switchClassNames(), "aria-disabled": this.disabled ? 'true' : null }, h("input", { key: 'c6c0ae9576a198c9f0038ebd22b78df0c5a41794', "aria-describedby": assignDescription(this.componentId, this.invalid, this.helperMessage), "aria-invalid": this.invalid ? "true" : undefined, checked: this.checked, class: "pds-switch__input", disabled: this.disabled, id: this.componentId, name: this.name ? this.name : this.componentId, onChange: this.onSwitchUpdate, required: this.required, type: this.type, value: this.value }), h(PdsLabel, { key: 'd6c3b0c584d2c4fd6cc99507794a3e961fbf99a5', classNames: "pds-switch__label", htmlFor: this.componentId, text: this.label }), this.helperMessage &&
38
- h("div", { key: '4f9f581e9a01e67d076bafaf1d28fe52b87081fc', class: `pds-switch__message`, id: messageId(this.componentId, 'helper') }, this.helperMessage), this.errorMessage &&
39
- h("div", { key: 'aeca71b92664b2e7ef4c7fb0d103996a05c5318f', class: `pds-switch__message pds-switch__message--error`, id: messageId(this.componentId, 'error'), "aria-live": "assertive" }, this.errorMessage)));
37
+ return (h(Host, { key: '5c33e5bd4a42f187450a81faec033832524f1b29', class: this.switchClassNames(), "aria-disabled": this.disabled ? 'true' : null }, h("input", { key: 'cb2a8287cdb44f337b4ecae15968e823f314b4d1', "aria-describedby": assignDescription(this.componentId, this.invalid, this.helperMessage), "aria-invalid": this.invalid ? "true" : undefined, checked: this.checked, class: "pds-switch__input", disabled: this.disabled, id: this.componentId, name: this.name ? this.name : this.componentId, onChange: this.onSwitchUpdate, required: this.required, type: this.type, value: this.value }), h(PdsLabel, { key: '86c700a16a23513b3ba34f2add1775274ecc6784', classNames: "pds-switch__label", htmlFor: this.componentId, text: this.label }), this.helperMessage &&
38
+ h("div", { key: '30c8b18c990a54330bf3442d9cbbb35387de0ec3', class: `pds-switch__message`, id: messageId(this.componentId, 'helper') }, this.helperMessage), this.errorMessage &&
39
+ h("div", { key: '1eb57d78271d8c1fbe2fa680eeb88fd2fd1d35c9', class: `pds-switch__message pds-switch__message--error`, id: messageId(this.componentId, 'error'), "aria-live": "assertive" }, this.errorMessage)));
40
40
  }
41
41
  static get is() { return "pds-switch"; }
42
42
  static get encapsulation() { return "shadow"; }
@@ -1,7 +1,7 @@
1
1
  import { Host, h } from "@stencil/core";
2
2
  export class PdsTableBody {
3
3
  render() {
4
- return (h(Host, { key: '6d312a1c25591258df1f47699b2b7a3b74d85fe3', role: "rowgroup" }, h("slot", { key: '423f7e680e9eff6daf2d4a08544b619f2c420beb' })));
4
+ return (h(Host, { key: '53ae547e27857b0e8e11adcbab634979555b37ab', role: "rowgroup" }, h("slot", { key: 'ba94c5332cdb944a36eecfd8f16c63e1fd0c0c0c' })));
5
5
  }
6
6
  static get is() { return "pds-table-body"; }
7
7
  static get encapsulation() { return "shadow"; }
@@ -34,11 +34,11 @@ export class PdsTableCell {
34
34
  return classNames.join(' ');
35
35
  }
36
36
  render() {
37
- return (h(Host, { key: '7c7f228b3911eec633c6ffd817f22fbc6666be8a', class: this.classNames(), role: "gridcell", style: this.tableRef &&
37
+ return (h(Host, { key: '91ed20b4338792e6d72834d81d966c154fa2bc6d', class: this.classNames(), role: "gridcell", style: this.tableRef &&
38
38
  this.tableRef.fixedColumn &&
39
39
  this.tableRef.selectable
40
40
  ? { '--fixed-cell-position': '40px' }
41
- : {} }, h("slot", { key: '37c43f300478beffc41d2450bbb5a6e13099f58e' })));
41
+ : {} }, h("slot", { key: '40dafc4697ba077a121979b604100107f51e9ff1' })));
42
42
  }
43
43
  static get is() { return "pds-table-cell"; }
44
44
  static get encapsulation() { return "shadow"; }
@@ -1 +1 @@
1
- {"version":3,"file":"pds-table-cell.js","sourceRoot":"","sources":["../../../../src/components/pds-table/pds-table-cell/pds-table-cell.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAOzE,MAAM,OAAO,YAAY;;QAuCf,iBAAY,GAAG,GAAG,EAAE;YAC1B,IAAI,IAAI,CAAC,QAAQ,CAAC,UAAU,GAAG,CAAC,EAAE,CAAC;gBACjC,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;YAC7B,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC;YAC9B,CAAC;QACH,CAAC,CAAC;;8BA1ByC,KAAK;;IAfhD,mBAAmB;QACjB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,WAAW,CAAwB,CAAC;IAC/E,CAAC;IAED,gBAAgB;QACd,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC,UAAU,IAAI,IAAI,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC;YAC3E,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC,QAAQ,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;QAC9D,CAAC;IACH,CAAC;IASO,UAAU;QAChB,MAAM,UAAU,GAAG,EAAE,CAAC;QAEtB,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;YAC3C,UAAU,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAChC,CAAC;QAED,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAClB,UAAU,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QAClC,CAAC;QAED,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC,WAAW,IAAI,IAAI,CAAC,cAAc,EAAE,CAAC;YACtE,UAAU,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QAClC,CAAC;QAED,OAAO,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC9B,CAAC;IAUD,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDACH,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,EACxB,IAAI,EAAC,UAAU,EACf,KAAK,EACH,IAAI,CAAC,QAAQ;gBACb,IAAI,CAAC,QAAQ,CAAC,WAAW;gBACzB,IAAI,CAAC,QAAQ,CAAC,UAAU;gBACtB,CAAC,CAAC,EAAE,uBAAuB,EAAE,MAAM,EAAE;gBACrC,CAAC,CAAC,EAAE;YAGR,8DAAa,CACR,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Host, Prop, State, h } from '@stencil/core';\n\n@Component({\n tag: 'pds-table-cell',\n styleUrl: 'pds-table-cell.scss',\n shadow: true,\n})\nexport class PdsTableCell {\n @Element() hostElement: HTMLPdsTableCellElement;\n tableRef: HTMLPdsTableElement;\n\n componentWillRender() {\n this.tableRef = this.hostElement.closest('pds-table') as HTMLPdsTableElement;\n }\n\n componentDidLoad() {\n if (this.tableRef && this.tableRef.responsive && this.tableRef.fixedColumn) {\n this.tableRef.addEventListener('scroll', this.handleScroll);\n }\n }\n\n /**\n * Truncates content to a max width of 100px and adds an ellipsis.\n */\n @Prop() truncate: boolean;\n\n @State() private tableScrolling: boolean = false;\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.truncate) {\n classNames.push('is-truncated');\n }\n\n if (this.tableRef && this.tableRef.fixedColumn && this.tableScrolling) {\n classNames.push('has-scrolled');\n }\n\n return classNames.join(' ');\n }\n\n private handleScroll = () => {\n if (this.tableRef.scrollLeft > 0) {\n this.tableScrolling = true;\n } else {\n this.tableScrolling = false;\n }\n };\n\n render() {\n return (\n <Host\n class={this.classNames()}\n role=\"gridcell\"\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 </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"pds-table-cell.js","sourceRoot":"","sources":["../../../../src/components/pds-table/pds-table-cell/pds-table-cell.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAOzE,MAAM,OAAO,YAAY;;QAuCf,iBAAY,GAAG,GAAG,EAAE;YAC1B,IAAI,IAAI,CAAC,QAAQ,CAAC,UAAU,GAAG,CAAC,EAAE,CAAC;gBACjC,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;YAC7B,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC;YAC9B,CAAC;QACH,CAAC,CAAC;;8BA1ByC,KAAK;;IAfhD,mBAAmB;QACjB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,WAAW,CAAwB,CAAC;IAC/E,CAAC;IAED,gBAAgB;QACd,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC,UAAU,IAAI,IAAI,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC;YAC3E,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC,QAAQ,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;QAC9D,CAAC;IACH,CAAC;IASO,UAAU;QAChB,MAAM,UAAU,GAAG,EAAE,CAAC;QAEtB,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;YAC3C,UAAU,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAChC,CAAC;QAED,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAClB,UAAU,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QAClC,CAAC;QAED,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC,WAAW,IAAI,IAAI,CAAC,cAAc,EAAE,CAAC;YACtE,UAAU,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QAClC,CAAC;QAED,OAAO,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC9B,CAAC;IAUD,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDACH,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,EACxB,IAAI,EAAC,UAAU,EACf,KAAK,EACH,IAAI,CAAC,QAAQ;gBACb,IAAI,CAAC,QAAQ,CAAC,WAAW;gBACzB,IAAI,CAAC,QAAQ,CAAC,UAAU;gBACtB,CAAC,CAAC,EAAE,uBAAuB,EAAE,MAAM,EAAE;gBACrC,CAAC,CAAC,EAAE;YAGR,8DAAa,CACR,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Host, Prop, State, h } from '@stencil/core';\n\n@Component({\n tag: 'pds-table-cell',\n styleUrl: 'pds-table-cell.scss',\n shadow: true,\n})\nexport class PdsTableCell {\n @Element() hostElement: HTMLPdsTableCellElement;\n private tableRef: HTMLPdsTableElement;\n\n componentWillRender() {\n this.tableRef = this.hostElement.closest('pds-table') as HTMLPdsTableElement;\n }\n\n componentDidLoad() {\n if (this.tableRef && this.tableRef.responsive && this.tableRef.fixedColumn) {\n this.tableRef.addEventListener('scroll', this.handleScroll);\n }\n }\n\n /**\n * Truncates content to a max width of 100px and adds an ellipsis.\n */\n @Prop() truncate: boolean;\n\n @State() private tableScrolling: boolean = false;\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.truncate) {\n classNames.push('is-truncated');\n }\n\n if (this.tableRef && this.tableRef.fixedColumn && this.tableScrolling) {\n classNames.push('has-scrolled');\n }\n\n return classNames.join(' ');\n }\n\n private handleScroll = () => {\n if (this.tableRef.scrollLeft > 0) {\n this.tableScrolling = true;\n } else {\n this.tableScrolling = false;\n }\n };\n\n render() {\n return (\n <Host\n class={this.classNames()}\n role=\"gridcell\"\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 </Host>\n );\n }\n}\n"]}
@@ -1,5 +1,31 @@
1
1
  import { Host, h } from "@stencil/core";
2
+ import { closest } from "../../../utils/closest";
2
3
  export class PdsTableHead {
4
+ constructor() {
5
+ this.generateUniqueId = () => {
6
+ const randomString = Math.random().toString(36).substring(2, 8);
7
+ const timestamp = new Date().toISOString().replace(/[:.]/g, '-');
8
+ const uniqueId = `${randomString}-${timestamp}`;
9
+ return uniqueId;
10
+ };
11
+ this.handleInput = (ev) => {
12
+ this.isSelected = !ev.target.checked;
13
+ this.handleSelect(this.isSelected);
14
+ };
15
+ this.handleSelect = (isSelected) => {
16
+ this.indeterminate = false;
17
+ if (closest('pds-table-head', this.hostElement)) {
18
+ this.pdsTableSelectAll.emit({ isSelected });
19
+ }
20
+ };
21
+ this.indeterminate = undefined;
22
+ this.isSelected = undefined;
23
+ }
24
+ componentWillLoad() {
25
+ if (this.isSelected) {
26
+ this.handleSelect(this.isSelected);
27
+ }
28
+ }
3
29
  componentWillRender() {
4
30
  this.tableRef = this.hostElement.closest('pds-table');
5
31
  if (this.tableRef && this.tableRef.fixedColumn) {
@@ -8,7 +34,7 @@ export class PdsTableHead {
8
34
  }
9
35
  }
10
36
  render() {
11
- return (h(Host, { key: 'e92e19de602fa327f57b5577e346c6ac3c61a807', role: "row" }, this.tableRef && this.tableRef.selectable && (h("pds-table-head-cell", { key: '883511ea021dc59f29a5a354e6bbce7ad1eded86', part: this.tableRef.fixedColumn ? 'checkbox-cell' : '' })), h("slot", { key: 'bc39f9ea30696ee18dd4fafa744225e3e4b3fb9b' })));
37
+ return (h(Host, { key: '7729235908073cae63294e4ad641bae0403e2c34', role: "row" }, this.tableRef && this.tableRef.selectable && (h("pds-table-head-cell", { key: '2bb801124a3f8d1c9f18d03d1461953da4cdafc6', part: this.tableRef.selectable ? 'checkbox-cell' : '' }, h("pds-checkbox", { key: '2119be5b2db13a44add35fa9c9fc761a68a2b060', componentId: this.generateUniqueId(), indeterminate: this.indeterminate, onInput: this.handleInput, label: "Select All Rows", labelHidden: true, checked: this.isSelected }))), h("slot", { key: 'baa5b3af10a77e1a8aff537c3c731fbc59a54ca8' })));
12
38
  }
13
39
  static get is() { return "pds-table-head"; }
14
40
  static get encapsulation() { return "shadow"; }
@@ -22,6 +48,62 @@ export class PdsTableHead {
22
48
  "$": ["pds-table-head.css"]
23
49
  };
24
50
  }
51
+ static get properties() {
52
+ return {
53
+ "indeterminate": {
54
+ "type": "boolean",
55
+ "mutable": true,
56
+ "complexType": {
57
+ "original": "boolean",
58
+ "resolved": "boolean",
59
+ "references": {}
60
+ },
61
+ "required": false,
62
+ "optional": true,
63
+ "docs": {
64
+ "tags": [],
65
+ "text": "Indicates that the selection state is indeterminate."
66
+ },
67
+ "attribute": "indeterminate",
68
+ "reflect": false
69
+ },
70
+ "isSelected": {
71
+ "type": "boolean",
72
+ "mutable": true,
73
+ "complexType": {
74
+ "original": "boolean",
75
+ "resolved": "boolean",
76
+ "references": {}
77
+ },
78
+ "required": false,
79
+ "optional": false,
80
+ "docs": {
81
+ "tags": [],
82
+ "text": "A local state to track whether the row is currently selected."
83
+ },
84
+ "attribute": "is-selected",
85
+ "reflect": false
86
+ }
87
+ };
88
+ }
89
+ static get events() {
90
+ return [{
91
+ "method": "pdsTableSelectAll",
92
+ "name": "pdsTableSelectAll",
93
+ "bubbles": true,
94
+ "cancelable": true,
95
+ "composed": true,
96
+ "docs": {
97
+ "tags": [],
98
+ "text": "Event that is emitted when the select all checkbox is clicked, carrying the selected value."
99
+ },
100
+ "complexType": {
101
+ "original": "{ isSelected: boolean }",
102
+ "resolved": "{ isSelected: boolean; }",
103
+ "references": {}
104
+ }
105
+ }];
106
+ }
25
107
  static get elementRef() { return "hostElement"; }
26
108
  }
27
109
  //# sourceMappingURL=pds-table-head.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pds-table-head.js","sourceRoot":"","sources":["../../../../src/components/pds-table/pds-table-head/pds-table-head.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAO5D,MAAM,OAAO,YAAY;IAIvB,mBAAmB;QACjB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,WAAW,CAAwB,CAAC;QAE7E,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC;YAC/C,MAAM,SAAS,GAAG,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,iCAAiC,CAAC,CAAC;YACpF,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;QACvC,CAAC;IACH,CAAC;IACD,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDAAC,IAAI,EAAC,KAAK;YACb,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC,UAAU,IAAI,CAC5C,4EAAqB,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,GAAwB,CACpG;YACD,8DAAa,CACR,CACR,CAAC;IACJ,CAAC;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Host, h } from '@stencil/core';\n\n@Component({\n tag: 'pds-table-head',\n styleUrl: 'pds-table-head.scss',\n shadow: true,\n})\nexport class PdsTableHead {\n @Element() hostElement: HTMLPdsTableHeadElement;\n tableRef: HTMLPdsTableElement\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-head-cell:first-child');\n tableCell?.classList.add(\"is-fixed\");\n }\n }\n render() {\n return (\n <Host role=\"row\">\n {this.tableRef && this.tableRef.selectable && (\n <pds-table-head-cell part={this.tableRef.fixedColumn ? 'checkbox-cell' : ''}></pds-table-head-cell>\n )}\n <slot></slot>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"pds-table-head.js","sourceRoot":"","sources":["../../../../src/components/pds-table/pds-table-head/pds-table-head.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACvF,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAOzC,MAAM,OAAO,YAAY;;QAiBf,qBAAgB,GAAG,GAAG,EAAE;YAC9B,MAAM,YAAY,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;YAChE,MAAM,SAAS,GAAG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K;YACb,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC,UAAU,IAAI,CAC5C,4EAAqB,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE;gBACxE,qEACE,WAAW,EAAE,IAAI,CAAC,gBAAgB,EAAE,EACpC,aAAa,EAAE,IAAI,CAAC,aAAa,EACjC,OAAO,EAAE,IAAI,CAAC,WAAW,EACzB,KAAK,EAAE,iBAAiB,EACxB,WAAW,EAAE,IAAI,EACjB,OAAO,EAAE,IAAI,CAAC,UAAU,GACxB,CACkB,CACvB;YACD,8DAAa,CACR,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, Host, h, Prop } from '@stencil/core';\nimport { closest } from '@utils/closest';\n\n@Component({\n tag: 'pds-table-head',\n styleUrl: 'pds-table-head.scss',\n shadow: true,\n})\nexport class PdsTableHead {\n @Element() hostElement: HTMLPdsTableHeadElement;\n private tableRef: HTMLPdsTableElement\n\n /** Indicates that the selection state is indeterminate. */\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 select all checkbox is clicked, carrying the selected value.\n */\n @Event() pdsTableSelectAll: EventEmitter<{ isSelected: boolean }>;\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 private handleInput = (ev: Event) => {\n this.isSelected = !(ev.target as HTMLInputElement).checked\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 this.pdsTableSelectAll.emit({ isSelected });\n }\n }\n\n componentWillLoad() {\n if (this.isSelected) {\n this.handleSelect(this.isSelected)\n }\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-head-cell:first-child');\n tableCell?.classList.add(\"is-fixed\");\n }\n }\n\n render() {\n return (\n <Host role=\"row\">\n {this.tableRef && this.tableRef.selectable && (\n <pds-table-head-cell part={this.tableRef.selectable ? 'checkbox-cell' : ''}>\n <pds-checkbox\n componentId={this.generateUniqueId()}\n indeterminate={this.indeterminate}\n onInput={this.handleInput}\n label={\"Select All Rows\"}\n labelHidden={true}\n checked={this.isSelected}\n />\n </pds-table-head-cell>\n )}\n <slot></slot>\n </Host>\n );\n }\n}\n"]}
@@ -24,6 +24,7 @@ export class PdsTableHeadCell {
24
24
  this.sortable = undefined;
25
25
  this.sortingDirection = 'asc';
26
26
  this.tableScrolling = false;
27
+ this.isSelected = false;
27
28
  }
28
29
  componentWillRender() {
29
30
  this.tableRef = this.hostElement.closest('pds-table');
@@ -50,11 +51,11 @@ export class PdsTableHeadCell {
50
51
  return classNames.join(' ');
51
52
  }
52
53
  render() {
53
- return (h(Host, { key: 'b8b24eb690d19c1d6476fd44c69a3231b540d476', class: this.classNames(), role: "columnheader", onClick: this.toggleSort, style: this.tableRef &&
54
+ return (h(Host, { key: '72e242a22774d4b534b7a8653673606e0e9c6ef1', class: this.classNames(), role: "columnheader", onClick: this.toggleSort, style: this.tableRef &&
54
55
  this.tableRef.fixedColumn &&
55
56
  this.tableRef.selectable
56
57
  ? { '--fixed-cell-position': '40px' }
57
- : {} }, h("slot", { key: '831ea922b3fb2166852208f2a9520414c93f6954' }), this.sortable && (h("pds-icon", { key: '0afb8d56992327112c64e79d6bfc7c1d192d9732', icon: this.sortingDirection === 'asc' ? upSmall : downSmall }))));
58
+ : {} }, h("slot", { key: '08e1d5aab1761ed097e2669716884196c946bcc3' }), this.sortable && (h("pds-icon", { key: '43421a2b1401426878601468acee702ce45404bf', icon: this.sortingDirection === 'asc' ? upSmall : downSmall }))));
58
59
  }
59
60
  static get is() { return "pds-table-head-cell"; }
60
61
  static get encapsulation() { return "shadow"; }
@@ -92,7 +93,8 @@ export class PdsTableHeadCell {
92
93
  static get states() {
93
94
  return {
94
95
  "sortingDirection": {},
95
- "tableScrolling": {}
96
+ "tableScrolling": {},
97
+ "isSelected": {}
96
98
  };
97
99
  }
98
100
  static get events() {
@@ -1 +1 @@
1
- {"version":3,"file":"pds-table-head-cell.js","sourceRoot":"","sources":["../../../../src/components/pds-table/pds-table-head-cell/pds-table-head-cell.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAgB,KAAK,EAAE,MAAM,eAAe,CAAC;AAE9F,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAO1D,MAAM,OAAO,gBAAgB;;QA2BnB,iBAAY,GAAG,GAAG,EAAE;YAC1B,IAAI,IAAI,CAAC,QAAQ,CAAC,UAAU,GAAG,CAAC,EAAE,CAAC;gBACjC,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;YAC7B,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC;YAC9B,CAAC;QACH,CAAC,CAAC;QAEM,eAAU,GAAG,GAAG,EAAE;YACxB,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;gBAClB,MAAM,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;gBACjD,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,KAAK,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC;gBAEzE,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC,q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C,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC,WAAW,IAAI,IAAI,CAAC,cAAc,EAAE,CAAC;YACtE,UAAU,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QAClC,CAAC;QAED,OAAO,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;IAED,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDACH,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,EACxB,IAAI,EAAC,cAAc,EACnB,OAAO,EAAE,IAAI,CAAC,UAAU,EACxB,KAAK,EACH,IAAI,CAAC,QAAQ;gBACb,IAAI,CAAC,QAAQ,CAAC,WAAW;gBACzB,IAAI,CAAC,QAAQ,CAAC,UAAU;gBACtB,CAAC,CAAC,EAAE,uBAAuB,EAAE,MAAM,EAAE;gBACrC,CAAC,CAAC,EAAE;YAGR,8DAAa;YACZ,IAAI,CAAC,QAAQ,IAAI,CAChB,iEAAU,IAAI,EAAE,IAAI,CAAC,gBAAgB,KAAK,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,GAAI,CAC1E,CACI,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Host, Prop, h, Event, EventEmitter, State } from '@stencil/core';\n\nimport { downSmall, upSmall } from '@pine-ds/icons/icons';\n\n@Component({\n tag: 'pds-table-head-cell',\n styleUrl: 'pds-table-head-cell.scss',\n shadow: true,\n})\nexport class PdsTableHeadCell {\n @Element() hostElement: HTMLPdsTableHeadCellElement;\n tableRef: HTMLPdsTableElement;\n\n /**\n * Determines whether the table column is sortable when set to `true`.\n */\n @Prop() sortable: boolean;\n\n /**\n * Event emitted to signal that a table column header has been sorted, providing information about the sorted column's name and sorting direction.\n */\n @Event() pdsTableSort: EventEmitter<{ column: string; direction: string }>;\n\n @State() private sortingDirection: 'asc' | 'desc' = 'asc';\n @State() private tableScrolling: boolean = false;\n\n componentWillRender() {\n this.tableRef = this.hostElement.closest('pds-table') as HTMLPdsTableElement;\n }\n\n componentDidLoad() {\n if (this.tableRef && this.tableRef.responsive && this.tableRef.fixedColumn) {\n this.tableRef.addEventListener('scroll', this.handleScroll);\n }\n }\n\n private handleScroll = () => {\n if (this.tableRef.scrollLeft > 0) {\n this.tableScrolling = true;\n } else {\n this.tableScrolling = false;\n }\n };\n\n private toggleSort = () => {\n if (this.sortable) {\n const column = this.hostElement.innerText.trim();\n this.sortingDirection = this.sortingDirection === 'asc' ? 'desc' : 'asc';\n\n this.tableRef.querySelectorAll('pds-table-head-cell').forEach((headCell) => {\n headCell.classList.remove('is-active');\n });\n\n this.hostElement.classList.toggle('is-active');\n this.pdsTableSort.emit({ column, direction: this.sortingDirection });\n }\n }\n\n private classNames() {\n const classNames = [];\n\n if (this.tableRef && this.tableRef.compact) {\n classNames.push('is-compact');\n }\n\n if (this.sortable) {\n classNames.push('is-sortable');\n }\n\n if (this.sortable && this.sortingDirection !== null) {\n classNames.push('sort-' + this.sortingDirection);\n }\n\n if (this.tableRef && this.tableRef.fixedColumn && this.tableScrolling) {\n classNames.push('has-scrolled');\n }\n\n return classNames.join(' ');\n }\n\n render() {\n return (\n <Host\n class={this.classNames()}\n role=\"columnheader\"\n onClick={this.toggleSort}\n style={\n this.tableRef &&\n this.tableRef.fixedColumn &&\n this.tableRef.selectable\n ? { '--fixed-cell-position': '40px' }\n : {}\n }\n >\n <slot></slot>\n {this.sortable && (\n <pds-icon icon={this.sortingDirection === 'asc' ? upSmall : downSmall} />\n )}\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"pds-table-head-cell.js","sourceRoot":"","sources":["../../../../src/components/pds-table/pds-table-head-cell/pds-table-head-cell.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAgB,KAAK,EAAE,MAAM,eA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AAa;YACZ,IAAI,CAAC,QAAQ,IAAI,CAChB,iEAAU,IAAI,EAAE,IAAI,CAAC,gBAAgB,KAAK,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,GAAI,CAC1E,CACI,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Host, Prop, h, Event, EventEmitter, State } from '@stencil/core';\n\nimport { downSmall, upSmall } from '@pine-ds/icons/icons';\n\n@Component({\n tag: 'pds-table-head-cell',\n styleUrl: 'pds-table-head-cell.scss',\n shadow: true,\n})\nexport class PdsTableHeadCell {\n @Element() hostElement: HTMLPdsTableHeadCellElement;\n private tableRef: HTMLPdsTableElement;\n\n /**\n * Determines whether the table column is sortable when set to `true`.\n */\n @Prop() sortable: boolean;\n\n /**\n * Event emitted to signal that a table column header has been sorted, providing information about the sorted column's name and sorting direction.\n */\n @Event() pdsTableSort: EventEmitter<{ column: string; direction: string }>;\n\n @State() private sortingDirection: 'asc' | 'desc' = 'asc';\n @State() private tableScrolling: boolean = false;\n\n /**\n * A local state to track whether the row is currently selected.\n */\n @State() isSelected: boolean = false;\n\n componentWillRender() {\n this.tableRef = this.hostElement.closest('pds-table') as HTMLPdsTableElement;\n }\n\n componentDidLoad() {\n if (this.tableRef && this.tableRef.responsive && this.tableRef.fixedColumn) {\n this.tableRef.addEventListener('scroll', this.handleScroll);\n }\n }\n\n private handleScroll = () => {\n if (this.tableRef.scrollLeft > 0) {\n this.tableScrolling = true;\n } else {\n this.tableScrolling = false;\n }\n };\n\n private toggleSort = () => {\n if (this.sortable) {\n const column = this.hostElement.innerText.trim();\n this.sortingDirection = this.sortingDirection === 'asc' ? 'desc' : 'asc';\n\n this.tableRef.querySelectorAll('pds-table-head-cell').forEach((headCell) => {\n headCell.classList.remove('is-active');\n });\n\n this.hostElement.classList.toggle('is-active');\n this.pdsTableSort.emit({ column, direction: this.sortingDirection });\n }\n }\n\n private classNames() {\n const classNames = [];\n\n if (this.tableRef && this.tableRef.compact) {\n classNames.push('is-compact');\n }\n\n if (this.sortable) {\n classNames.push('is-sortable');\n }\n\n if (this.sortable && this.sortingDirection !== null) {\n classNames.push('sort-' + this.sortingDirection);\n }\n\n if (this.tableRef && this.tableRef.fixedColumn && this.tableScrolling) {\n classNames.push('has-scrolled');\n }\n\n return classNames.join(' ');\n }\n\n render() {\n return (\n <Host\n class={this.classNames()}\n role=\"columnheader\"\n onClick={this.toggleSort}\n style={\n this.tableRef &&\n this.tableRef.fixedColumn &&\n this.tableRef.selectable\n ? { '--fixed-cell-position': '40px' }\n : {}\n }\n >\n <slot></slot>\n {this.sortable && (\n <pds-icon icon={this.sortingDirection === 'asc' ? upSmall : downSmall} />\n )}\n </Host>\n );\n }\n}\n"]}