@pine-ds/core 3.1.0 → 3.3.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 (705) hide show
  1. package/components/index.d.ts +20 -0
  2. package/components/index.js +10 -0
  3. package/components/index.js.map +1 -1
  4. package/components/index2.js +1 -1
  5. package/components/index2.js.map +1 -1
  6. package/components/mock-pds-modal.d.ts +11 -0
  7. package/components/mock-pds-modal.js +108 -0
  8. package/components/mock-pds-modal.js.map +1 -0
  9. package/components/pds-alert.d.ts +11 -0
  10. package/components/pds-alert.js +107 -0
  11. package/components/pds-alert.js.map +1 -0
  12. package/components/pds-avatar.js +1 -1
  13. package/components/pds-box.js +1 -110
  14. package/components/pds-box.js.map +1 -1
  15. package/components/pds-box2.js +115 -0
  16. package/components/pds-box2.js.map +1 -0
  17. package/components/pds-button2.js +1 -1
  18. package/components/pds-button2.js.map +1 -1
  19. package/components/pds-checkbox2.js +3 -3
  20. package/components/pds-chip.js +21 -6
  21. package/components/pds-chip.js.map +1 -1
  22. package/components/pds-copytext.js +1 -1
  23. package/components/pds-divider.js +1 -1
  24. package/components/pds-dropdown-menu-item.d.ts +11 -0
  25. package/components/pds-dropdown-menu-item.js +117 -0
  26. package/components/pds-dropdown-menu-item.js.map +1 -0
  27. package/components/pds-dropdown-menu-separator.d.ts +11 -0
  28. package/components/pds-dropdown-menu-separator.js +44 -0
  29. package/components/pds-dropdown-menu-separator.js.map +1 -0
  30. package/components/pds-dropdown-menu.d.ts +11 -0
  31. package/components/pds-dropdown-menu.js +1600 -0
  32. package/components/pds-dropdown-menu.js.map +1 -0
  33. package/components/pds-image.js +2 -2
  34. package/components/pds-input.js +98 -21
  35. package/components/pds-input.js.map +1 -1
  36. package/components/pds-link.js +1 -67
  37. package/components/pds-link.js.map +1 -1
  38. package/components/pds-link2.js +85 -0
  39. package/components/pds-link2.js.map +1 -0
  40. package/components/pds-loader2.js +1 -1
  41. package/components/pds-modal-content.d.ts +11 -0
  42. package/components/pds-modal-content.js +111 -0
  43. package/components/pds-modal-content.js.map +1 -0
  44. package/components/pds-modal-footer.d.ts +11 -0
  45. package/components/pds-modal-footer.js +35 -0
  46. package/components/pds-modal-footer.js.map +1 -0
  47. package/components/pds-modal-header.d.ts +11 -0
  48. package/components/pds-modal-header.js +35 -0
  49. package/components/pds-modal-header.js.map +1 -0
  50. package/components/pds-modal.d.ts +11 -0
  51. package/components/pds-modal.js +278 -0
  52. package/components/pds-modal.js.map +1 -0
  53. package/components/pds-popover.js +33 -1
  54. package/components/pds-popover.js.map +1 -1
  55. package/components/pds-progress.js +1 -1
  56. package/components/pds-radio.js +3 -3
  57. package/components/pds-row.js +1 -1
  58. package/components/pds-select.js +3 -3
  59. package/components/pds-select.js.map +1 -1
  60. package/components/pds-sortable-item.js +1 -1
  61. package/components/pds-sortable.js +1 -1
  62. package/components/pds-switch.js +3 -3
  63. package/components/pds-tab.js +3 -3
  64. package/components/pds-table-body.js +1 -1
  65. package/components/pds-table-cell2.js +2 -2
  66. package/components/pds-table-head-cell2.js +2 -2
  67. package/components/pds-table-head.js +1 -1
  68. package/components/pds-table-row.js +1 -1
  69. package/components/pds-table.js +1 -1
  70. package/components/pds-tabpanel.js +1 -1
  71. package/components/pds-tabs.js +1 -1
  72. package/components/pds-text.js +1 -53
  73. package/components/pds-text.js.map +1 -1
  74. package/components/pds-text2.js +58 -0
  75. package/components/pds-text2.js.map +1 -0
  76. package/components/pds-textarea.js +4 -4
  77. package/components/pds-toast.d.ts +11 -0
  78. package/components/pds-toast.js +137 -0
  79. package/components/pds-toast.js.map +1 -0
  80. package/components/pds-tooltip.js +299 -81
  81. package/components/pds-tooltip.js.map +1 -1
  82. package/components/utils.js +3 -2
  83. package/components/utils.js.map +1 -1
  84. package/dist/cjs/{index-CG2Rr2io.js → index-B0qLG6KJ.js} +3 -3
  85. package/dist/cjs/index-B0qLG6KJ.js.map +1 -0
  86. package/dist/cjs/loader.cjs.js +1 -1
  87. package/dist/cjs/mock-pds-modal.cjs.entry.js +86 -0
  88. package/dist/cjs/mock-pds-modal.cjs.entry.js.map +1 -0
  89. package/dist/cjs/mock-pds-modal.entry.cjs.js.map +1 -0
  90. package/dist/cjs/pds-accordion.cjs.entry.js +1 -1
  91. package/dist/cjs/pds-alert.cjs.entry.js +66 -0
  92. package/dist/cjs/pds-alert.cjs.entry.js.map +1 -0
  93. package/dist/cjs/pds-alert.entry.cjs.js.map +1 -0
  94. package/dist/cjs/pds-avatar.cjs.entry.js +2 -2
  95. package/dist/cjs/pds-box.cjs.entry.js +2 -2
  96. package/dist/cjs/pds-box.cjs.entry.js.map +1 -1
  97. package/dist/cjs/pds-box.entry.cjs.js.map +1 -1
  98. package/dist/cjs/pds-button.cjs.entry.js +3 -3
  99. package/dist/cjs/pds-button.cjs.entry.js.map +1 -1
  100. package/dist/cjs/pds-button.entry.cjs.js.map +1 -1
  101. package/dist/cjs/pds-checkbox.cjs.entry.js +4 -4
  102. package/dist/cjs/pds-chip.cjs.entry.js +21 -7
  103. package/dist/cjs/pds-chip.cjs.entry.js.map +1 -1
  104. package/dist/cjs/pds-chip.entry.cjs.js.map +1 -1
  105. package/dist/cjs/pds-copytext.cjs.entry.js +2 -2
  106. package/dist/cjs/pds-divider.cjs.entry.js +1 -1
  107. package/dist/cjs/pds-dropdown-menu-item.cjs.entry.js +82 -0
  108. package/dist/cjs/pds-dropdown-menu-item.cjs.entry.js.map +1 -0
  109. package/dist/cjs/pds-dropdown-menu-item.entry.cjs.js.map +1 -0
  110. package/dist/cjs/pds-dropdown-menu-separator.cjs.entry.js +25 -0
  111. package/dist/cjs/pds-dropdown-menu-separator.cjs.entry.js.map +1 -0
  112. package/dist/cjs/pds-dropdown-menu-separator.entry.cjs.js.map +1 -0
  113. package/dist/cjs/pds-dropdown-menu.cjs.entry.js +1574 -0
  114. package/dist/cjs/pds-dropdown-menu.cjs.entry.js.map +1 -0
  115. package/dist/cjs/pds-dropdown-menu.entry.cjs.js.map +1 -0
  116. package/dist/cjs/pds-image.cjs.entry.js +2 -2
  117. package/dist/cjs/pds-input.cjs.entry.js +88 -21
  118. package/dist/cjs/pds-input.cjs.entry.js.map +1 -1
  119. package/dist/cjs/pds-input.entry.cjs.js.map +1 -1
  120. package/dist/cjs/pds-link.cjs.entry.js +16 -4
  121. package/dist/cjs/pds-link.cjs.entry.js.map +1 -1
  122. package/dist/cjs/pds-link.entry.cjs.js.map +1 -1
  123. package/dist/cjs/pds-loader.cjs.entry.js +1 -1
  124. package/dist/cjs/pds-modal-content.cjs.entry.js +93 -0
  125. package/dist/cjs/pds-modal-content.cjs.entry.js.map +1 -0
  126. package/dist/cjs/pds-modal-content.entry.cjs.js.map +1 -0
  127. package/dist/cjs/pds-modal-footer.cjs.entry.js +20 -0
  128. package/dist/cjs/pds-modal-footer.cjs.entry.js.map +1 -0
  129. package/dist/cjs/pds-modal-footer.entry.cjs.js.map +1 -0
  130. package/dist/cjs/pds-modal-header.cjs.entry.js +20 -0
  131. package/dist/cjs/pds-modal-header.cjs.entry.js.map +1 -0
  132. package/dist/cjs/pds-modal-header.entry.cjs.js.map +1 -0
  133. package/dist/cjs/pds-modal.cjs.entry.js +253 -0
  134. package/dist/cjs/pds-modal.cjs.entry.js.map +1 -0
  135. package/dist/cjs/pds-modal.entry.cjs.js.map +1 -0
  136. package/dist/cjs/pds-popover.cjs.entry.js +33 -1
  137. package/dist/cjs/pds-popover.cjs.entry.js.map +1 -1
  138. package/dist/cjs/pds-popover.entry.cjs.js.map +1 -1
  139. package/dist/cjs/pds-progress.cjs.entry.js +1 -1
  140. package/dist/cjs/pds-radio.cjs.entry.js +4 -4
  141. package/dist/cjs/pds-row.cjs.entry.js +1 -1
  142. package/dist/cjs/pds-select.cjs.entry.js +3 -4
  143. package/dist/cjs/pds-select.cjs.entry.js.map +1 -1
  144. package/dist/cjs/pds-select.entry.cjs.js.map +1 -1
  145. package/dist/cjs/pds-sortable-item.cjs.entry.js +2 -2
  146. package/dist/cjs/pds-sortable.cjs.entry.js +1 -1
  147. package/dist/cjs/pds-switch.cjs.entry.js +4 -4
  148. package/dist/cjs/pds-tab.cjs.entry.js +3 -3
  149. package/dist/cjs/pds-table-body.cjs.entry.js +1 -1
  150. package/dist/cjs/pds-table-cell.cjs.entry.js +2 -2
  151. package/dist/cjs/pds-table-head-cell.cjs.entry.js +3 -3
  152. package/dist/cjs/pds-table-head.cjs.entry.js +1 -1
  153. package/dist/cjs/pds-table-row.cjs.entry.js +1 -1
  154. package/dist/cjs/pds-table.cjs.entry.js +1 -1
  155. package/dist/cjs/pds-tabpanel.cjs.entry.js +1 -1
  156. package/dist/cjs/pds-tabs.cjs.entry.js +1 -1
  157. package/dist/cjs/pds-text.cjs.entry.js +2 -2
  158. package/dist/cjs/pds-text.cjs.entry.js.map +1 -1
  159. package/dist/cjs/pds-text.entry.cjs.js.map +1 -1
  160. package/dist/cjs/pds-textarea.cjs.entry.js +6 -6
  161. package/dist/cjs/pds-toast.cjs.entry.js +104 -0
  162. package/dist/cjs/pds-toast.cjs.entry.js.map +1 -0
  163. package/dist/cjs/pds-toast.entry.cjs.js.map +1 -0
  164. package/dist/cjs/pds-tooltip.cjs.entry.js +297 -79
  165. package/dist/cjs/pds-tooltip.cjs.entry.js.map +1 -1
  166. package/dist/cjs/pds-tooltip.entry.cjs.js.map +1 -1
  167. package/dist/cjs/pine-core.cjs.js +1 -1
  168. package/dist/cjs/{utils-CQKIgzWg.js → utils-jWx-Mf12.js} +5 -4
  169. package/dist/cjs/utils-jWx-Mf12.js.map +1 -0
  170. package/dist/collection/collection-manifest.json +10 -0
  171. package/dist/collection/components/pds-alert/pds-alert.css +108 -0
  172. package/dist/collection/components/pds-alert/pds-alert.js +198 -0
  173. package/dist/collection/components/pds-alert/pds-alert.js.map +1 -0
  174. package/dist/collection/components/pds-alert/pds-alert.tokens.css +32 -0
  175. package/dist/collection/components/pds-alert/stories/pds-alert.stories.js +97 -0
  176. package/dist/collection/components/pds-avatar/pds-avatar.js +1 -1
  177. package/dist/collection/components/pds-box/pds-box.js +8 -8
  178. package/dist/collection/components/pds-box/pds-box.js.map +1 -1
  179. package/dist/collection/components/pds-button/pds-button.css +17 -5
  180. package/dist/collection/components/pds-checkbox/pds-checkbox.js +3 -3
  181. package/dist/collection/components/pds-chip/pds-chip.css +48 -11
  182. package/dist/collection/components/pds-chip/pds-chip.js +42 -9
  183. package/dist/collection/components/pds-chip/pds-chip.js.map +1 -1
  184. package/dist/collection/components/pds-chip/stories/pds-chip.stories.js +18 -1
  185. package/dist/collection/components/pds-copytext/pds-copytext.js +1 -1
  186. package/dist/collection/components/pds-divider/pds-divider.js +1 -1
  187. package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-item/pds-dropdown-menu-item.css +68 -0
  188. package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-item/pds-dropdown-menu-item.js +219 -0
  189. package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-item/pds-dropdown-menu-item.js.map +1 -0
  190. package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-separator/pds-dropdown-menu-separator.css +4 -0
  191. package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-separator/pds-dropdown-menu-separator.js +72 -0
  192. package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-separator/pds-dropdown-menu-separator.js.map +1 -0
  193. package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu.css +16 -0
  194. package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu.js +328 -0
  195. package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu.js.map +1 -0
  196. package/dist/collection/components/pds-dropdown-menu/stories/pds-dropdown-menu.stories.js +44 -0
  197. package/dist/collection/components/pds-image/pds-image.js +2 -2
  198. package/dist/collection/components/pds-input/pds-input.css +167 -43
  199. package/dist/collection/components/pds-input/pds-input.js +212 -21
  200. package/dist/collection/components/pds-input/pds-input.js.map +1 -1
  201. package/dist/collection/components/pds-input/stories/pds-input.stories.js +84 -0
  202. package/dist/collection/components/pds-link/pds-link.css +20 -1
  203. package/dist/collection/components/pds-link/pds-link.js +33 -2
  204. package/dist/collection/components/pds-link/pds-link.js.map +1 -1
  205. package/dist/collection/components/pds-link/stories/pds-link.stories.js +15 -2
  206. package/dist/collection/components/pds-loader/pds-loader.js +1 -1
  207. package/dist/collection/components/pds-modal/pds-modal-content/pds-modal-content.css +27 -0
  208. package/dist/collection/components/pds-modal/pds-modal-content/pds-modal-content.js +125 -0
  209. package/dist/collection/components/pds-modal/pds-modal-content/pds-modal-content.js.map +1 -0
  210. package/dist/collection/components/pds-modal/pds-modal-footer/pds-modal-footer.css +8 -0
  211. package/dist/collection/components/pds-modal/pds-modal-footer/pds-modal-footer.js +18 -0
  212. package/dist/collection/components/pds-modal/pds-modal-footer/pds-modal-footer.js.map +1 -0
  213. package/dist/collection/components/pds-modal/pds-modal-header/pds-modal-header.css +8 -0
  214. package/dist/collection/components/pds-modal/pds-modal-header/pds-modal-header.js +18 -0
  215. package/dist/collection/components/pds-modal/pds-modal-header/pds-modal-header.js.map +1 -0
  216. package/dist/collection/components/pds-modal/pds-modal.css +79 -0
  217. package/dist/collection/components/pds-modal/pds-modal.js +426 -0
  218. package/dist/collection/components/pds-modal/pds-modal.js.map +1 -0
  219. package/dist/collection/components/pds-modal/stories/pds-modal.stories.js +415 -0
  220. package/dist/collection/components/pds-modal/test/mock-pds-modal.js +256 -0
  221. package/dist/collection/components/pds-modal/test/mock-pds-modal.js.map +1 -0
  222. package/dist/collection/components/pds-popover/pds-popover.js +33 -1
  223. package/dist/collection/components/pds-popover/pds-popover.js.map +1 -1
  224. package/dist/collection/components/pds-progress/pds-progress.js +1 -1
  225. package/dist/collection/components/pds-radio/pds-radio.js +3 -3
  226. package/dist/collection/components/pds-row/pds-row.js +1 -1
  227. package/dist/collection/components/pds-select/pds-select.css +34 -4
  228. package/dist/collection/components/pds-select/pds-select.js +20 -2
  229. package/dist/collection/components/pds-select/pds-select.js.map +1 -1
  230. package/dist/collection/components/pds-select/stories/pds-select.stories.js +2 -0
  231. package/dist/collection/components/pds-sortable/pds-sortable-item/pds-sortable-item.js +1 -1
  232. package/dist/collection/components/pds-sortable/pds-sortable.js +1 -1
  233. package/dist/collection/components/pds-switch/pds-switch.js +3 -3
  234. package/dist/collection/components/pds-table/pds-table-body/pds-table-body.js +1 -1
  235. package/dist/collection/components/pds-table/pds-table-cell/pds-table-cell.js +2 -2
  236. package/dist/collection/components/pds-table/pds-table-head/pds-table-head.js +1 -1
  237. package/dist/collection/components/pds-table/pds-table-head-cell/pds-table-head-cell.js +2 -2
  238. package/dist/collection/components/pds-table/pds-table-row/pds-table-row.js +1 -1
  239. package/dist/collection/components/pds-table/pds-table.js +1 -1
  240. package/dist/collection/components/pds-tabs/pds-tab/pds-tab.js +3 -3
  241. package/dist/collection/components/pds-tabs/pds-tabpanel/pds-tabpanel.js +1 -1
  242. package/dist/collection/components/pds-tabs/pds-tabs.js +1 -1
  243. package/dist/collection/components/pds-text/pds-text.js +2 -2
  244. package/dist/collection/components/pds-text/pds-text.js.map +1 -1
  245. package/dist/collection/components/pds-textarea/pds-textarea.js +4 -4
  246. package/dist/collection/components/pds-toast/pds-toast.css +153 -0
  247. package/dist/collection/components/pds-toast/pds-toast.js +263 -0
  248. package/dist/collection/components/pds-toast/pds-toast.js.map +1 -0
  249. package/dist/collection/components/pds-toast/stories/pds-toast.stories.js +103 -0
  250. package/dist/collection/components/pds-tooltip/pds-tooltip.css +2 -12
  251. package/dist/collection/components/pds-tooltip/pds-tooltip.js +227 -26
  252. package/dist/collection/components/pds-tooltip/pds-tooltip.js.map +1 -1
  253. package/dist/collection/components/pds-tooltip/stories/pds-tooltip.stories.js +7 -3
  254. package/dist/collection/utils/interfaces.js +2 -0
  255. package/dist/collection/utils/interfaces.js.map +1 -0
  256. package/dist/collection/utils/overlay.js +66 -49
  257. package/dist/collection/utils/overlay.js.map +1 -1
  258. package/dist/collection/utils/utils.js +3 -2
  259. package/dist/collection/utils/utils.js.map +1 -1
  260. package/dist/docs.json +1816 -200
  261. package/dist/esm/{index-_4gljHh-.js → index-DpOSrebJ.js} +3 -3
  262. package/dist/esm/index-DpOSrebJ.js.map +1 -0
  263. package/dist/esm/loader.js +1 -1
  264. package/dist/esm/mock-pds-modal.entry.js +84 -0
  265. package/dist/esm/mock-pds-modal.entry.js.map +1 -0
  266. package/dist/esm/pds-accordion.entry.js +1 -1
  267. package/dist/esm/pds-alert.entry.js +64 -0
  268. package/dist/esm/pds-alert.entry.js.map +1 -0
  269. package/dist/esm/pds-avatar.entry.js +2 -2
  270. package/dist/esm/pds-box.entry.js +2 -2
  271. package/dist/esm/pds-box.entry.js.map +1 -1
  272. package/dist/esm/pds-button.entry.js +3 -3
  273. package/dist/esm/pds-button.entry.js.map +1 -1
  274. package/dist/esm/pds-checkbox.entry.js +4 -4
  275. package/dist/esm/pds-chip.entry.js +21 -7
  276. package/dist/esm/pds-chip.entry.js.map +1 -1
  277. package/dist/esm/pds-copytext.entry.js +2 -2
  278. package/dist/esm/pds-divider.entry.js +1 -1
  279. package/dist/esm/pds-dropdown-menu-item.entry.js +80 -0
  280. package/dist/esm/pds-dropdown-menu-item.entry.js.map +1 -0
  281. package/dist/esm/pds-dropdown-menu-separator.entry.js +23 -0
  282. package/dist/esm/pds-dropdown-menu-separator.entry.js.map +1 -0
  283. package/dist/esm/pds-dropdown-menu.entry.js +1572 -0
  284. package/dist/esm/pds-dropdown-menu.entry.js.map +1 -0
  285. package/dist/esm/pds-image.entry.js +2 -2
  286. package/dist/esm/pds-input.entry.js +88 -21
  287. package/dist/esm/pds-input.entry.js.map +1 -1
  288. package/dist/esm/pds-link.entry.js +16 -4
  289. package/dist/esm/pds-link.entry.js.map +1 -1
  290. package/dist/esm/pds-loader.entry.js +1 -1
  291. package/dist/esm/pds-modal-content.entry.js +91 -0
  292. package/dist/esm/pds-modal-content.entry.js.map +1 -0
  293. package/dist/esm/pds-modal-footer.entry.js +18 -0
  294. package/dist/esm/pds-modal-footer.entry.js.map +1 -0
  295. package/dist/esm/pds-modal-header.entry.js +18 -0
  296. package/dist/esm/pds-modal-header.entry.js.map +1 -0
  297. package/dist/esm/pds-modal.entry.js +251 -0
  298. package/dist/esm/pds-modal.entry.js.map +1 -0
  299. package/dist/esm/pds-popover.entry.js +33 -1
  300. package/dist/esm/pds-popover.entry.js.map +1 -1
  301. package/dist/esm/pds-progress.entry.js +1 -1
  302. package/dist/esm/pds-radio.entry.js +4 -4
  303. package/dist/esm/pds-row.entry.js +1 -1
  304. package/dist/esm/pds-select.entry.js +3 -4
  305. package/dist/esm/pds-select.entry.js.map +1 -1
  306. package/dist/esm/pds-sortable-item.entry.js +2 -2
  307. package/dist/esm/pds-sortable.entry.js +1 -1
  308. package/dist/esm/pds-switch.entry.js +4 -4
  309. package/dist/esm/pds-tab.entry.js +3 -3
  310. package/dist/esm/pds-table-body.entry.js +1 -1
  311. package/dist/esm/pds-table-cell.entry.js +2 -2
  312. package/dist/esm/pds-table-head-cell.entry.js +3 -3
  313. package/dist/esm/pds-table-head.entry.js +1 -1
  314. package/dist/esm/pds-table-row.entry.js +1 -1
  315. package/dist/esm/pds-table.entry.js +1 -1
  316. package/dist/esm/pds-tabpanel.entry.js +1 -1
  317. package/dist/esm/pds-tabs.entry.js +1 -1
  318. package/dist/esm/pds-text.entry.js +2 -2
  319. package/dist/esm/pds-text.entry.js.map +1 -1
  320. package/dist/esm/pds-textarea.entry.js +6 -6
  321. package/dist/esm/pds-toast.entry.js +102 -0
  322. package/dist/esm/pds-toast.entry.js.map +1 -0
  323. package/dist/esm/pds-tooltip.entry.js +297 -79
  324. package/dist/esm/pds-tooltip.entry.js.map +1 -1
  325. package/dist/esm/pine-core.js +1 -1
  326. package/dist/esm/{utils-Dw9B1JDC.js → utils-DkabwBZT.js} +5 -4
  327. package/dist/esm/utils-DkabwBZT.js.map +1 -0
  328. package/dist/esm-es5/{index-_4gljHh-.js → index-DpOSrebJ.js} +1 -1
  329. package/dist/esm-es5/index-DpOSrebJ.js.map +1 -0
  330. package/dist/esm-es5/loader.js +1 -1
  331. package/dist/esm-es5/mock-pds-modal.entry.js +2 -0
  332. package/dist/esm-es5/mock-pds-modal.entry.js.map +1 -0
  333. package/dist/esm-es5/pds-accordion.entry.js +1 -1
  334. package/dist/esm-es5/pds-alert.entry.js +2 -0
  335. package/dist/esm-es5/pds-alert.entry.js.map +1 -0
  336. package/dist/esm-es5/pds-avatar.entry.js +1 -1
  337. package/dist/esm-es5/pds-box.entry.js +1 -1
  338. package/dist/esm-es5/pds-box.entry.js.map +1 -1
  339. package/dist/esm-es5/pds-button.entry.js +1 -1
  340. package/dist/esm-es5/pds-button.entry.js.map +1 -1
  341. package/dist/esm-es5/pds-checkbox.entry.js +1 -1
  342. package/dist/esm-es5/pds-chip.entry.js +1 -1
  343. package/dist/esm-es5/pds-chip.entry.js.map +1 -1
  344. package/dist/esm-es5/pds-copytext.entry.js +1 -1
  345. package/dist/esm-es5/pds-divider.entry.js +1 -1
  346. package/dist/esm-es5/pds-dropdown-menu-item.entry.js +2 -0
  347. package/dist/esm-es5/pds-dropdown-menu-item.entry.js.map +1 -0
  348. package/dist/esm-es5/pds-dropdown-menu-separator.entry.js +2 -0
  349. package/dist/esm-es5/pds-dropdown-menu-separator.entry.js.map +1 -0
  350. package/dist/esm-es5/pds-dropdown-menu.entry.js +2 -0
  351. package/dist/esm-es5/pds-dropdown-menu.entry.js.map +1 -0
  352. package/dist/esm-es5/pds-image.entry.js +1 -1
  353. package/dist/esm-es5/pds-input.entry.js +1 -1
  354. package/dist/esm-es5/pds-input.entry.js.map +1 -1
  355. package/dist/esm-es5/pds-link.entry.js +1 -1
  356. package/dist/esm-es5/pds-link.entry.js.map +1 -1
  357. package/dist/esm-es5/pds-loader.entry.js +1 -1
  358. package/dist/esm-es5/pds-modal-content.entry.js +2 -0
  359. package/dist/esm-es5/pds-modal-content.entry.js.map +1 -0
  360. package/dist/esm-es5/pds-modal-footer.entry.js +2 -0
  361. package/dist/esm-es5/pds-modal-footer.entry.js.map +1 -0
  362. package/dist/esm-es5/pds-modal-header.entry.js +2 -0
  363. package/dist/esm-es5/pds-modal-header.entry.js.map +1 -0
  364. package/dist/esm-es5/pds-modal.entry.js +2 -0
  365. package/dist/esm-es5/pds-modal.entry.js.map +1 -0
  366. package/dist/esm-es5/pds-popover.entry.js +1 -1
  367. package/dist/esm-es5/pds-popover.entry.js.map +1 -1
  368. package/dist/esm-es5/pds-progress.entry.js +1 -1
  369. package/dist/esm-es5/pds-radio.entry.js +1 -1
  370. package/dist/esm-es5/pds-row.entry.js +1 -1
  371. package/dist/esm-es5/pds-select.entry.js +1 -1
  372. package/dist/esm-es5/pds-select.entry.js.map +1 -1
  373. package/dist/esm-es5/pds-sortable-item.entry.js +1 -1
  374. package/dist/esm-es5/pds-sortable.entry.js +1 -1
  375. package/dist/esm-es5/pds-switch.entry.js +1 -1
  376. package/dist/esm-es5/pds-tab.entry.js +1 -1
  377. package/dist/esm-es5/pds-table-body.entry.js +1 -1
  378. package/dist/esm-es5/pds-table-cell.entry.js +1 -1
  379. package/dist/esm-es5/pds-table-head-cell.entry.js +1 -1
  380. package/dist/esm-es5/pds-table-head.entry.js +1 -1
  381. package/dist/esm-es5/pds-table-row.entry.js +1 -1
  382. package/dist/esm-es5/pds-table.entry.js +1 -1
  383. package/dist/esm-es5/pds-tabpanel.entry.js +1 -1
  384. package/dist/esm-es5/pds-tabs.entry.js +1 -1
  385. package/dist/esm-es5/pds-text.entry.js +1 -1
  386. package/dist/esm-es5/pds-text.entry.js.map +1 -1
  387. package/dist/esm-es5/pds-textarea.entry.js +1 -1
  388. package/dist/esm-es5/pds-toast.entry.js +2 -0
  389. package/dist/esm-es5/pds-toast.entry.js.map +1 -0
  390. package/dist/esm-es5/pds-tooltip.entry.js +1 -1
  391. package/dist/esm-es5/pds-tooltip.entry.js.map +1 -1
  392. package/dist/esm-es5/pine-core.js +1 -1
  393. package/dist/esm-es5/utils-DkabwBZT.js +2 -0
  394. package/dist/esm-es5/utils-DkabwBZT.js.map +1 -0
  395. package/dist/pine-core/mock-pds-modal.entry.esm.js.map +1 -0
  396. package/dist/pine-core/{p-BjCOR1Nn.system.js.map → p--YvWqEjm.system.js.map} +1 -1
  397. package/dist/pine-core/p-00599bd8.entry.js +2 -0
  398. package/dist/pine-core/p-00599bd8.entry.js.map +1 -0
  399. package/dist/pine-core/{p-a14c8ab4.system.entry.js → p-03d8cb4c.system.entry.js} +2 -2
  400. package/dist/pine-core/{p-f94703c9.entry.js → p-04195bdb.entry.js} +2 -2
  401. package/dist/pine-core/p-065208a1.system.entry.js +2 -0
  402. package/dist/pine-core/p-065208a1.system.entry.js.map +1 -0
  403. package/dist/pine-core/p-07f45626.entry.js +2 -0
  404. package/dist/pine-core/p-07f45626.entry.js.map +1 -0
  405. package/dist/pine-core/{p-0486ad57.entry.js → p-0a11384e.entry.js} +2 -2
  406. package/dist/pine-core/p-0a87e2fc.system.entry.js +2 -0
  407. package/dist/pine-core/p-0a87e2fc.system.entry.js.map +1 -0
  408. package/dist/pine-core/p-0c30661b.system.entry.js +2 -0
  409. package/dist/pine-core/p-0c30661b.system.entry.js.map +1 -0
  410. package/dist/pine-core/{p-82e05dcf.entry.js → p-10e2feff.entry.js} +2 -2
  411. package/dist/pine-core/{p-d2110923.system.entry.js → p-111e7da2.system.entry.js} +2 -2
  412. package/dist/pine-core/{p-1178485a.system.entry.js → p-13481ef5.system.entry.js} +2 -2
  413. package/dist/pine-core/{p-1178485a.system.entry.js.map → p-13481ef5.system.entry.js.map} +1 -1
  414. package/dist/pine-core/{p-68de979e.entry.js → p-19c01019.entry.js} +2 -2
  415. package/dist/pine-core/p-1d395d27.entry.js +2 -0
  416. package/dist/pine-core/p-1d395d27.entry.js.map +1 -0
  417. package/dist/pine-core/{p-4ff0838c.entry.js → p-2007a0b5.entry.js} +2 -2
  418. package/dist/pine-core/{p-fed4c0c0.system.entry.js → p-27c0ffda.system.entry.js} +2 -2
  419. package/dist/pine-core/p-35917a1a.entry.js +2 -0
  420. package/dist/pine-core/p-39a31730.system.entry.js +2 -0
  421. package/dist/pine-core/p-39a31730.system.entry.js.map +1 -0
  422. package/dist/pine-core/p-3D0orTx_.system.js.map +1 -0
  423. package/dist/pine-core/p-3ea415b0.entry.js +2 -0
  424. package/dist/pine-core/p-3ea415b0.entry.js.map +1 -0
  425. package/dist/pine-core/p-44f10d3c.entry.js +2 -0
  426. package/dist/pine-core/p-44f10d3c.entry.js.map +1 -0
  427. package/dist/pine-core/p-47a7a65b.entry.js +2 -0
  428. package/dist/pine-core/p-47a7a65b.entry.js.map +1 -0
  429. package/dist/pine-core/{p-ca09f86a.system.entry.js → p-4b2aab79.system.entry.js} +2 -2
  430. package/dist/pine-core/p-513c16c7.entry.js +2 -0
  431. package/dist/pine-core/p-513c16c7.entry.js.map +1 -0
  432. package/dist/pine-core/{p-950427b2.entry.js → p-51cc93b3.entry.js} +2 -2
  433. package/dist/pine-core/p-5367f477.system.entry.js +2 -0
  434. package/dist/pine-core/{p-ceb48b05.system.entry.js → p-593df966.system.entry.js} +2 -2
  435. package/dist/pine-core/p-5a437fcd.system.entry.js +2 -0
  436. package/dist/pine-core/p-5a437fcd.system.entry.js.map +1 -0
  437. package/dist/pine-core/p-5c4aceb7.entry.js +2 -0
  438. package/dist/pine-core/p-5c4aceb7.entry.js.map +1 -0
  439. package/dist/pine-core/{p-598ade79.entry.js → p-5e1e7762.entry.js} +2 -2
  440. package/dist/pine-core/{p-9cdd57de.entry.js → p-60fbeb1c.entry.js} +2 -2
  441. package/dist/pine-core/p-624db3d6.system.entry.js +2 -0
  442. package/dist/pine-core/p-624db3d6.system.entry.js.map +1 -0
  443. package/dist/pine-core/p-65a875f6.entry.js +2 -0
  444. package/dist/pine-core/p-65a875f6.entry.js.map +1 -0
  445. package/dist/pine-core/{p-c0f0b368.system.entry.js → p-6a7936e7.system.entry.js} +2 -2
  446. package/dist/pine-core/{p-a97952fc.system.entry.js → p-73412ca9.system.entry.js} +2 -2
  447. package/dist/pine-core/{p-a97952fc.system.entry.js.map → p-73412ca9.system.entry.js.map} +1 -1
  448. package/dist/pine-core/{p-b390c427.entry.js → p-76e35041.entry.js} +2 -2
  449. package/dist/pine-core/{p-12bee2e5.entry.js → p-76f7cf21.entry.js} +2 -2
  450. package/dist/pine-core/{p-103b62a1.system.entry.js → p-78327c08.system.entry.js} +2 -2
  451. package/dist/pine-core/{p-792355e6.entry.js → p-78f29270.entry.js} +2 -2
  452. package/dist/pine-core/p-79cb7835.system.entry.js +2 -0
  453. package/dist/pine-core/p-79cb7835.system.entry.js.map +1 -0
  454. package/dist/pine-core/{p-fd9aa739.system.entry.js → p-7bb3a5d4.system.entry.js} +2 -2
  455. package/dist/pine-core/{p-e88d58f4.entry.js → p-80f36506.entry.js} +2 -2
  456. package/dist/pine-core/{p-eda0dc79.entry.js → p-8180b641.entry.js} +2 -2
  457. package/dist/pine-core/{p-85073252.system.entry.js → p-833b2170.system.entry.js} +2 -2
  458. package/dist/pine-core/p-86329612.entry.js +2 -0
  459. package/dist/pine-core/p-86329612.entry.js.map +1 -0
  460. package/dist/pine-core/p-8b6b0db7.entry.js +2 -0
  461. package/dist/pine-core/p-8b6b0db7.entry.js.map +1 -0
  462. package/dist/pine-core/p-8f06b020.entry.js +2 -0
  463. package/dist/pine-core/p-8f06b020.entry.js.map +1 -0
  464. package/dist/pine-core/p-942fa145.system.entry.js +2 -0
  465. package/dist/pine-core/p-942fa145.system.entry.js.map +1 -0
  466. package/dist/pine-core/{p-1d92261f.system.entry.js → p-959c8247.system.entry.js} +2 -2
  467. package/dist/pine-core/{p-5763df39.system.entry.js → p-96e9774e.system.entry.js} +2 -2
  468. package/dist/pine-core/{p-e281ac09.entry.js → p-99b5e1a5.entry.js} +2 -2
  469. package/dist/pine-core/p-9c01e81b.system.entry.js +2 -0
  470. package/dist/pine-core/p-9c01e81b.system.entry.js.map +1 -0
  471. package/dist/pine-core/p-9db1f179.entry.js +2 -0
  472. package/dist/pine-core/p-9db1f179.entry.js.map +1 -0
  473. package/dist/pine-core/p-A4_UN20E.system.js.map +1 -0
  474. package/dist/pine-core/p-B2gfQpwn.system.js.map +1 -0
  475. package/dist/pine-core/{p-CDhmuxC9.system.js.map → p-B5JFBYFw.system.js.map} +1 -1
  476. package/dist/pine-core/p-B5LBNcOw.system.js.map +1 -0
  477. package/dist/pine-core/{p-BJyPFOn0.system.js.map → p-BE1qV1Jc.system.js.map} +1 -1
  478. package/dist/pine-core/p-BEYGfY83.system.js.map +1 -0
  479. package/dist/pine-core/{p-B46WXJMn.system.js.map → p-BHZ6CSg4.system.js.map} +1 -1
  480. package/dist/pine-core/p-BHp2IZGP.system.js.map +1 -0
  481. package/dist/pine-core/{p-BSINexOf.system.js.map → p-BISuGf0f.system.js.map} +1 -1
  482. package/dist/pine-core/p-BPQAcMLl.system.js.map +1 -0
  483. package/dist/pine-core/{p-9niWVsdd.system.js.map → p-BaAcO8Mz.system.js.map} +1 -1
  484. package/dist/pine-core/p-BcuE4ZrB.system.js.map +1 -0
  485. package/dist/pine-core/{p-C94EgDFz.system.js → p-BhPuKJbQ.system.js} +2 -2
  486. package/dist/pine-core/p-BhPuKJbQ.system.js.map +1 -0
  487. package/dist/pine-core/p-BsL2GDnH.system.js +1 -1
  488. package/dist/pine-core/{p-DEsea81X.system.js.map → p-BwHnCFqU.system.js.map} +1 -1
  489. package/dist/pine-core/{p-DVVPJPOu.system.js.map → p-BxBtA60x.system.js.map} +1 -1
  490. package/dist/pine-core/{p-kMnJefdU.system.js.map → p-C0oRS1F9.system.js.map} +1 -1
  491. package/dist/pine-core/{p-eKz-xVcI.system.js.map → p-C2d75seA.system.js.map} +1 -1
  492. package/dist/pine-core/{p-BgcVBzVE.system.js.map → p-CGABEyvz.system.js.map} +1 -1
  493. package/dist/pine-core/{p-DkJgkLjR.system.js.map → p-CIc_XeAg.system.js.map} +1 -1
  494. package/dist/pine-core/p-CNYB6FL-.system.js.map +1 -0
  495. package/dist/pine-core/{p-BW-n3jjz.system.js.map → p-CNkajx9x.system.js.map} +1 -1
  496. package/dist/pine-core/{p-Dz6toWDZ.system.js.map → p-CS2nVL5p.system.js.map} +1 -1
  497. package/dist/pine-core/{p-BFPxUBwH.system.js.map → p-CTPMEWZT.system.js.map} +1 -1
  498. package/dist/pine-core/{p-Cg0JSYH5.system.js.map → p-CTWkFhWu.system.js.map} +1 -1
  499. package/dist/pine-core/{p-BoNavS-S.system.js.map → p-CcsZC7UR.system.js.map} +1 -1
  500. package/dist/pine-core/{p-D8WAvG2e.system.js.map → p-CdzfTGbZ.system.js.map} +1 -1
  501. package/dist/pine-core/p-CkoeYrxa.system.js.map +1 -0
  502. package/dist/pine-core/p-ClVQjta4.system.js.map +1 -0
  503. package/dist/pine-core/{p-C0cdB2AV.system.js.map → p-D2UtaGL2.system.js.map} +1 -1
  504. package/dist/pine-core/{p-YuC61pNM.system.js.map → p-DGyATOIf.system.js.map} +1 -1
  505. package/dist/pine-core/p-DMeT5CsE.system.js.map +1 -0
  506. package/dist/pine-core/p-DVhX1_nD.system.js.map +1 -0
  507. package/dist/pine-core/p-DeW-6a7f.system.js.map +1 -0
  508. package/dist/pine-core/{p-Cj21y714.system.js.map → p-DgTp_KeO.system.js.map} +1 -1
  509. package/dist/pine-core/p-DjXmy34u.system.js.map +1 -0
  510. package/dist/pine-core/p-DkabwBZT.js +2 -0
  511. package/dist/pine-core/p-DkabwBZT.js.map +1 -0
  512. package/dist/pine-core/{p-_4gljHh-.js → p-DpOSrebJ.js} +1 -1
  513. package/dist/pine-core/p-DpOSrebJ.js.map +1 -0
  514. package/dist/pine-core/{p-B4W0_y2p.system.js → p-DyDReOdO.system.js} +1 -1
  515. package/dist/pine-core/p-DyDReOdO.system.js.map +1 -0
  516. package/dist/pine-core/{p-IK9NvSRG.system.js.map → p-EqAbQY8l.system.js.map} +1 -1
  517. package/dist/pine-core/p-Ke8SGZqs.system.js.map +1 -0
  518. package/dist/pine-core/{p-CmTz2SvK.system.js.map → p-Mqxw-gWj.system.js.map} +1 -1
  519. package/dist/pine-core/{p-BVNW4NmT.system.js.map → p-PPIMiuZX.system.js.map} +1 -1
  520. package/dist/pine-core/p-PkSWq78_.system.js.map +1 -0
  521. package/dist/pine-core/{p-w3zTyPF1.system.js.map → p-UhZHDNH2.system.js.map} +1 -1
  522. package/dist/pine-core/p-a52b1413.entry.js +2 -0
  523. package/dist/pine-core/p-a52b1413.entry.js.map +1 -0
  524. package/dist/pine-core/{p-7b6b354a.system.entry.js → p-a556a328.system.entry.js} +2 -2
  525. package/dist/pine-core/{p-c7d4f436.system.entry.js → p-a98cda38.system.entry.js} +2 -2
  526. package/dist/pine-core/{p-c838b6ef.system.entry.js → p-ab7e4700.system.entry.js} +2 -2
  527. package/dist/pine-core/{p-6147b1ea.system.entry.js → p-aeaae417.system.entry.js} +2 -2
  528. package/dist/pine-core/{p-b902f535.entry.js → p-b2820acd.entry.js} +2 -2
  529. package/dist/pine-core/{p-f439922f.entry.js → p-bf699bad.entry.js} +2 -2
  530. package/dist/pine-core/{p-f439922f.entry.js.map → p-bf699bad.entry.js.map} +1 -1
  531. package/dist/pine-core/p-c1909a5d.system.entry.js +2 -0
  532. package/dist/pine-core/{p-9d0c1b2e.system.entry.js.map → p-c1909a5d.system.entry.js.map} +1 -1
  533. package/dist/pine-core/{p-e045e337.system.entry.js → p-c551191a.system.entry.js} +2 -2
  534. package/dist/pine-core/p-c5e1ed09.system.entry.js +2 -0
  535. package/dist/pine-core/p-c5e1ed09.system.entry.js.map +1 -0
  536. package/dist/pine-core/{p-596e0292.system.entry.js → p-cc21ddcc.system.entry.js} +2 -2
  537. package/dist/pine-core/p-d0adaca0.system.entry.js +2 -0
  538. package/dist/pine-core/p-d0adaca0.system.entry.js.map +1 -0
  539. package/dist/pine-core/{p-6ad460a7.entry.js → p-d28768d1.entry.js} +2 -2
  540. package/dist/pine-core/{p-5c396e75.entry.js → p-d35b3494.entry.js} +2 -2
  541. package/dist/pine-core/{p-98181fa8.system.entry.js → p-d553e05c.system.entry.js} +2 -2
  542. package/dist/pine-core/{p-a952d40c.system.entry.js → p-d6d453d8.system.entry.js} +2 -2
  543. package/dist/pine-core/p-dcda4ff5.system.entry.js +2 -0
  544. package/dist/pine-core/p-dcda4ff5.system.entry.js.map +1 -0
  545. package/dist/pine-core/p-ddcc4932.entry.js +2 -0
  546. package/dist/pine-core/{p-ed8c3064.system.entry.js → p-de550d9e.system.entry.js} +2 -2
  547. package/dist/pine-core/p-dfd5a5b6.system.entry.js +2 -0
  548. package/dist/pine-core/p-dfd5a5b6.system.entry.js.map +1 -0
  549. package/dist/pine-core/p-e562ad73.system.entry.js +2 -0
  550. package/dist/pine-core/p-e562ad73.system.entry.js.map +1 -0
  551. package/dist/pine-core/p-e9f004c5.entry.js +2 -0
  552. package/dist/pine-core/p-e9f004c5.entry.js.map +1 -0
  553. package/dist/pine-core/p-ef9ed75a.system.entry.js +2 -0
  554. package/dist/pine-core/p-ef9ed75a.system.entry.js.map +1 -0
  555. package/dist/pine-core/{p-4b59cae8.entry.js → p-f256dd8a.entry.js} +2 -2
  556. package/dist/pine-core/{p-4b59cae8.entry.js.map → p-f256dd8a.entry.js.map} +1 -1
  557. package/dist/pine-core/{p-b68cb43d.system.entry.js → p-f46c4618.system.entry.js} +2 -2
  558. package/dist/pine-core/p-f4fff209.system.entry.js +2 -0
  559. package/dist/pine-core/p-f4fff209.system.entry.js.map +1 -0
  560. package/dist/pine-core/{p-3ce8eb9f.entry.js → p-f6b226df.entry.js} +2 -2
  561. package/dist/pine-core/{p-6a716bff.entry.js → p-f99c59a8.entry.js} +2 -2
  562. package/dist/pine-core/{p-1b81a8ec.entry.js → p-fb1eb0c4.entry.js} +2 -2
  563. package/dist/pine-core/{p-8305cd4d.entry.js → p-fb2fb435.entry.js} +2 -2
  564. package/dist/pine-core/p-fd1ef1e1.entry.js +2 -0
  565. package/dist/pine-core/p-fd1ef1e1.entry.js.map +1 -0
  566. package/dist/pine-core/p-fdf3a5ff.entry.js +2 -0
  567. package/dist/pine-core/{p-d5838288.entry.js.map → p-fdf3a5ff.entry.js.map} +1 -1
  568. package/dist/pine-core/p-fed5f55e.system.entry.js +2 -0
  569. package/dist/pine-core/pds-alert.entry.esm.js.map +1 -0
  570. package/dist/pine-core/pds-box.entry.esm.js.map +1 -1
  571. package/dist/pine-core/pds-button.entry.esm.js.map +1 -1
  572. package/dist/pine-core/pds-chip.entry.esm.js.map +1 -1
  573. package/dist/pine-core/pds-dropdown-menu-item.entry.esm.js.map +1 -0
  574. package/dist/pine-core/pds-dropdown-menu-separator.entry.esm.js.map +1 -0
  575. package/dist/pine-core/pds-dropdown-menu.entry.esm.js.map +1 -0
  576. package/dist/pine-core/pds-input.entry.esm.js.map +1 -1
  577. package/dist/pine-core/pds-link.entry.esm.js.map +1 -1
  578. package/dist/pine-core/pds-modal-content.entry.esm.js.map +1 -0
  579. package/dist/pine-core/pds-modal-footer.entry.esm.js.map +1 -0
  580. package/dist/pine-core/pds-modal-header.entry.esm.js.map +1 -0
  581. package/dist/pine-core/pds-modal.entry.esm.js.map +1 -0
  582. package/dist/pine-core/pds-popover.entry.esm.js.map +1 -1
  583. package/dist/pine-core/pds-select.entry.esm.js.map +1 -1
  584. package/dist/pine-core/pds-text.entry.esm.js.map +1 -1
  585. package/dist/pine-core/pds-toast.entry.esm.js.map +1 -0
  586. package/dist/pine-core/pds-tooltip.entry.esm.js.map +1 -1
  587. package/dist/pine-core/pine-core.esm.js +1 -1
  588. package/dist/types/components/pds-alert/pds-alert.d.ts +39 -0
  589. package/dist/types/components/pds-box/pds-box.d.ts +6 -6
  590. package/dist/types/components/pds-chip/pds-chip.d.ts +9 -1
  591. package/dist/types/components/pds-dropdown-menu/pds-dropdown-menu-item/pds-dropdown-menu-item.d.ts +43 -0
  592. package/dist/types/components/pds-dropdown-menu/pds-dropdown-menu-separator/pds-dropdown-menu-separator.d.ts +13 -0
  593. package/dist/types/components/pds-dropdown-menu/pds-dropdown-menu.d.ts +33 -0
  594. package/dist/types/components/pds-input/pds-input.d.ts +57 -9
  595. package/dist/types/components/pds-link/pds-link.d.ts +5 -0
  596. package/dist/types/components/pds-modal/pds-modal-content/pds-modal-content.d.ts +25 -0
  597. package/dist/types/components/pds-modal/pds-modal-footer/pds-modal-footer.d.ts +3 -0
  598. package/dist/types/components/pds-modal/pds-modal-header/pds-modal-header.d.ts +3 -0
  599. package/dist/types/components/pds-modal/pds-modal.d.ts +72 -0
  600. package/dist/types/components/pds-modal/test/mock-pds-modal.d.ts +63 -0
  601. package/dist/types/components/pds-select/pds-select.d.ts +4 -0
  602. package/dist/types/components/pds-toast/pds-toast.d.ts +57 -0
  603. package/dist/types/components/pds-tooltip/pds-tooltip.d.ts +31 -3
  604. package/dist/types/components.d.ts +609 -20
  605. package/dist/types/utils/interfaces.d.ts +6 -0
  606. package/dist/types/utils/overlay.d.ts +3 -3
  607. package/dist/types/utils/utils.d.ts +1 -1
  608. package/hydrate/index.js +3030 -280
  609. package/hydrate/index.mjs +3030 -280
  610. package/package.json +6 -2
  611. package/dist/cjs/index-CG2Rr2io.js.map +0 -1
  612. package/dist/cjs/utils-CQKIgzWg.js.map +0 -1
  613. package/dist/esm/index-_4gljHh-.js.map +0 -1
  614. package/dist/esm/utils-Dw9B1JDC.js.map +0 -1
  615. package/dist/esm-es5/index-_4gljHh-.js.map +0 -1
  616. package/dist/esm-es5/utils-Dw9B1JDC.js +0 -2
  617. package/dist/esm-es5/utils-Dw9B1JDC.js.map +0 -1
  618. package/dist/pine-core/p-13b9ed06.system.entry.js +0 -2
  619. package/dist/pine-core/p-1d690915.entry.js +0 -2
  620. package/dist/pine-core/p-294f9b1f.entry.js +0 -2
  621. package/dist/pine-core/p-38246e2f.entry.js +0 -2
  622. package/dist/pine-core/p-38246e2f.entry.js.map +0 -1
  623. package/dist/pine-core/p-38d2498e.system.entry.js +0 -2
  624. package/dist/pine-core/p-38d2498e.system.entry.js.map +0 -1
  625. package/dist/pine-core/p-433c6687.system.entry.js +0 -2
  626. package/dist/pine-core/p-433c6687.system.entry.js.map +0 -1
  627. package/dist/pine-core/p-4ccd2d5e.entry.js +0 -2
  628. package/dist/pine-core/p-4ccd2d5e.entry.js.map +0 -1
  629. package/dist/pine-core/p-4e7ca704.entry.js +0 -2
  630. package/dist/pine-core/p-4e7ca704.entry.js.map +0 -1
  631. package/dist/pine-core/p-6260135d.system.entry.js +0 -2
  632. package/dist/pine-core/p-6260135d.system.entry.js.map +0 -1
  633. package/dist/pine-core/p-82151ac5.entry.js +0 -2
  634. package/dist/pine-core/p-82151ac5.entry.js.map +0 -1
  635. package/dist/pine-core/p-8337c77c.entry.js +0 -2
  636. package/dist/pine-core/p-8337c77c.entry.js.map +0 -1
  637. package/dist/pine-core/p-953f619f.system.entry.js +0 -2
  638. package/dist/pine-core/p-9d0c1b2e.system.entry.js +0 -2
  639. package/dist/pine-core/p-B4W0_y2p.system.js.map +0 -1
  640. package/dist/pine-core/p-Bu94kuQa.system.js.map +0 -1
  641. package/dist/pine-core/p-C94EgDFz.system.js.map +0 -1
  642. package/dist/pine-core/p-CdkqpuKd.system.js.map +0 -1
  643. package/dist/pine-core/p-CnoLHUtr.system.js.map +0 -1
  644. package/dist/pine-core/p-Cz3zRtiB.system.js.map +0 -1
  645. package/dist/pine-core/p-DFmUOrRG.system.js.map +0 -1
  646. package/dist/pine-core/p-DhwO1z4v.system.js.map +0 -1
  647. package/dist/pine-core/p-Dv_jWtcr.system.js.map +0 -1
  648. package/dist/pine-core/p-Dw9B1JDC.js +0 -2
  649. package/dist/pine-core/p-Dw9B1JDC.js.map +0 -1
  650. package/dist/pine-core/p-_4gljHh-.js.map +0 -1
  651. package/dist/pine-core/p-d3ab594c.system.entry.js +0 -2
  652. package/dist/pine-core/p-d3ab594c.system.entry.js.map +0 -1
  653. package/dist/pine-core/p-d5838288.entry.js +0 -2
  654. package/dist/pine-core/p-d78bec50.system.entry.js +0 -2
  655. package/dist/pine-core/p-d78bec50.system.entry.js.map +0 -1
  656. package/dist/pine-core/p-d8e02aa9.system.entry.js +0 -2
  657. package/dist/pine-core/p-d8e02aa9.system.entry.js.map +0 -1
  658. package/dist/pine-core/p-f4898d4f.entry.js +0 -2
  659. package/dist/pine-core/p-f4898d4f.entry.js.map +0 -1
  660. /package/dist/pine-core/{p-a14c8ab4.system.entry.js.map → p-03d8cb4c.system.entry.js.map} +0 -0
  661. /package/dist/pine-core/{p-f94703c9.entry.js.map → p-04195bdb.entry.js.map} +0 -0
  662. /package/dist/pine-core/{p-0486ad57.entry.js.map → p-0a11384e.entry.js.map} +0 -0
  663. /package/dist/pine-core/{p-82e05dcf.entry.js.map → p-10e2feff.entry.js.map} +0 -0
  664. /package/dist/pine-core/{p-d2110923.system.entry.js.map → p-111e7da2.system.entry.js.map} +0 -0
  665. /package/dist/pine-core/{p-68de979e.entry.js.map → p-19c01019.entry.js.map} +0 -0
  666. /package/dist/pine-core/{p-4ff0838c.entry.js.map → p-2007a0b5.entry.js.map} +0 -0
  667. /package/dist/pine-core/{p-fed4c0c0.system.entry.js.map → p-27c0ffda.system.entry.js.map} +0 -0
  668. /package/dist/pine-core/{p-294f9b1f.entry.js.map → p-35917a1a.entry.js.map} +0 -0
  669. /package/dist/pine-core/{p-ca09f86a.system.entry.js.map → p-4b2aab79.system.entry.js.map} +0 -0
  670. /package/dist/pine-core/{p-950427b2.entry.js.map → p-51cc93b3.entry.js.map} +0 -0
  671. /package/dist/pine-core/{p-953f619f.system.entry.js.map → p-5367f477.system.entry.js.map} +0 -0
  672. /package/dist/pine-core/{p-ceb48b05.system.entry.js.map → p-593df966.system.entry.js.map} +0 -0
  673. /package/dist/pine-core/{p-598ade79.entry.js.map → p-5e1e7762.entry.js.map} +0 -0
  674. /package/dist/pine-core/{p-9cdd57de.entry.js.map → p-60fbeb1c.entry.js.map} +0 -0
  675. /package/dist/pine-core/{p-c0f0b368.system.entry.js.map → p-6a7936e7.system.entry.js.map} +0 -0
  676. /package/dist/pine-core/{p-b390c427.entry.js.map → p-76e35041.entry.js.map} +0 -0
  677. /package/dist/pine-core/{p-12bee2e5.entry.js.map → p-76f7cf21.entry.js.map} +0 -0
  678. /package/dist/pine-core/{p-103b62a1.system.entry.js.map → p-78327c08.system.entry.js.map} +0 -0
  679. /package/dist/pine-core/{p-792355e6.entry.js.map → p-78f29270.entry.js.map} +0 -0
  680. /package/dist/pine-core/{p-fd9aa739.system.entry.js.map → p-7bb3a5d4.system.entry.js.map} +0 -0
  681. /package/dist/pine-core/{p-e88d58f4.entry.js.map → p-80f36506.entry.js.map} +0 -0
  682. /package/dist/pine-core/{p-eda0dc79.entry.js.map → p-8180b641.entry.js.map} +0 -0
  683. /package/dist/pine-core/{p-85073252.system.entry.js.map → p-833b2170.system.entry.js.map} +0 -0
  684. /package/dist/pine-core/{p-1d92261f.system.entry.js.map → p-959c8247.system.entry.js.map} +0 -0
  685. /package/dist/pine-core/{p-5763df39.system.entry.js.map → p-96e9774e.system.entry.js.map} +0 -0
  686. /package/dist/pine-core/{p-e281ac09.entry.js.map → p-99b5e1a5.entry.js.map} +0 -0
  687. /package/dist/pine-core/{p-7b6b354a.system.entry.js.map → p-a556a328.system.entry.js.map} +0 -0
  688. /package/dist/pine-core/{p-c7d4f436.system.entry.js.map → p-a98cda38.system.entry.js.map} +0 -0
  689. /package/dist/pine-core/{p-c838b6ef.system.entry.js.map → p-ab7e4700.system.entry.js.map} +0 -0
  690. /package/dist/pine-core/{p-6147b1ea.system.entry.js.map → p-aeaae417.system.entry.js.map} +0 -0
  691. /package/dist/pine-core/{p-b902f535.entry.js.map → p-b2820acd.entry.js.map} +0 -0
  692. /package/dist/pine-core/{p-e045e337.system.entry.js.map → p-c551191a.system.entry.js.map} +0 -0
  693. /package/dist/pine-core/{p-596e0292.system.entry.js.map → p-cc21ddcc.system.entry.js.map} +0 -0
  694. /package/dist/pine-core/{p-6ad460a7.entry.js.map → p-d28768d1.entry.js.map} +0 -0
  695. /package/dist/pine-core/{p-5c396e75.entry.js.map → p-d35b3494.entry.js.map} +0 -0
  696. /package/dist/pine-core/{p-98181fa8.system.entry.js.map → p-d553e05c.system.entry.js.map} +0 -0
  697. /package/dist/pine-core/{p-a952d40c.system.entry.js.map → p-d6d453d8.system.entry.js.map} +0 -0
  698. /package/dist/pine-core/{p-1d690915.entry.js.map → p-ddcc4932.entry.js.map} +0 -0
  699. /package/dist/pine-core/{p-ed8c3064.system.entry.js.map → p-de550d9e.system.entry.js.map} +0 -0
  700. /package/dist/pine-core/{p-b68cb43d.system.entry.js.map → p-f46c4618.system.entry.js.map} +0 -0
  701. /package/dist/pine-core/{p-3ce8eb9f.entry.js.map → p-f6b226df.entry.js.map} +0 -0
  702. /package/dist/pine-core/{p-6a716bff.entry.js.map → p-f99c59a8.entry.js.map} +0 -0
  703. /package/dist/pine-core/{p-1b81a8ec.entry.js.map → p-fb1eb0c4.entry.js.map} +0 -0
  704. /package/dist/pine-core/{p-8305cd4d.entry.js.map → p-fb2fb435.entry.js.map} +0 -0
  705. /package/dist/pine-core/{p-13b9ed06.system.entry.js.map → p-fed5f55e.system.entry.js.map} +0 -0
@@ -0,0 +1,253 @@
1
+ 'use strict';
2
+
3
+ var index = require('./index-CxX7ua5d.js');
4
+
5
+ const pdsModalCss = ".pds-modal__backdrop{-ms-flex-align:start;align-items:flex-start;background-color:rgba(0, 0, 0, 0.4);border:0;display:-ms-flexbox;display:flex;height:100%;inset:0;-ms-flex-pack:center;justify-content:center;margin:0;max-height:100%;max-width:100%;opacity:0;padding:0;position:fixed;-webkit-transition:opacity 0.2s ease, visibility 0.2s ease;transition:opacity 0.2s ease, visibility 0.2s ease;visibility:hidden;width:100%;z-index:1000}@supports ((-webkit-backdrop-filter: blur(3px)) or (backdrop-filter: blur(3px))){.pds-modal__backdrop{-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}}pds-modal .pds-modal__backdrop{z-index:1001}.pds-modal__backdrop::-webkit-backdrop{background:transparent}.pds-modal__backdrop::-ms-backdrop{background:transparent}.pds-modal__backdrop::backdrop{background:transparent}.pds-modal__backdrop.open{opacity:1;visibility:visible}.pds-modal{background:var(--pine-color-background-container);border-radius:var(--pine-dimension-sm);-webkit-box-shadow:var(--pine-box-shadow-400);box-shadow:var(--pine-box-shadow-400);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin:var(--pine-dimension-md);max-height:calc(100vh - (6vh + 96px));width:100%}@media (min-width: 992px){.pds-modal{-webkit-margin-before:6vh;margin-block-start:6vh}}@media (min-width: 1200px){.pds-modal{-webkit-margin-before:8vh;margin-block-start:8vh}}.pds-modal--sm{max-width:520px}.pds-modal--md{max-width:700px}.pds-modal--lg{max-width:900px}.pds-modal--fullscreen{border-radius:0;height:100%;margin:0;max-height:100vh;max-width:100%}.pds-modal--fullscreen .pds-modal-content{-ms-flex:1;flex:1}";
6
+
7
+ const PdsModal = class {
8
+ constructor(hostRef) {
9
+ index.registerInstance(this, hostRef);
10
+ this.pdsModalOpen = index.createEvent(this, "pdsModalOpen");
11
+ this.pdsModalClose = index.createEvent(this, "pdsModalClose");
12
+ this.focusableElements = [];
13
+ /**
14
+ * Whether the modal can be dismissed by clicking the backdrop
15
+ * @default true
16
+ */
17
+ this.backdropDismiss = true;
18
+ /**
19
+ * Whether the modal is open
20
+ * @default false
21
+ */
22
+ this.open = false;
23
+ /**
24
+ * The size of the modal
25
+ * @default 'md'
26
+ */
27
+ this.size = 'md';
28
+ /**
29
+ * Stores the list of focusable elements in the modal
30
+ */
31
+ this.focusableElementsArray = [];
32
+ this.handleBackdropClick = (e) => {
33
+ if (!this.backdropDismiss || !this.open)
34
+ return;
35
+ if (e.target.classList.contains('pds-modal__backdrop')) {
36
+ e.stopPropagation();
37
+ // Only close if this is the innermost modal
38
+ if (this.isInnermostModal()) {
39
+ this.hideModal();
40
+ }
41
+ }
42
+ };
43
+ this.handleKeyDown = (e) => {
44
+ // If the modal is not open, don't handle any keyboard events
45
+ if (!this.open)
46
+ return;
47
+ // Handle Escape key to close the modal
48
+ if (e.key === 'Escape') {
49
+ // Only close if this is the innermost modal
50
+ if (this.isInnermostModal()) {
51
+ e.preventDefault();
52
+ this.hideModal();
53
+ }
54
+ return;
55
+ }
56
+ // Handle Tab key for focus trapping
57
+ if (e.key === 'Tab') {
58
+ // If there are no focusable elements, do nothing
59
+ if (this.focusableElements.length === 0)
60
+ return;
61
+ // Get the first and last focusable elements
62
+ const firstFocusableElement = this.focusableElements[0];
63
+ const lastFocusableElement = this.focusableElements[this.focusableElements.length - 1];
64
+ // Get the current active element
65
+ const activeElement = document.activeElement;
66
+ // Check if we need to wrap focus
67
+ const isFirstElement = activeElement === firstFocusableElement ||
68
+ firstFocusableElement.contains(activeElement);
69
+ const isLastElement = activeElement === lastFocusableElement ||
70
+ lastFocusableElement.contains(activeElement);
71
+ // If shift + tab is pressed and focus is on the first element, move to the last element
72
+ if (e.shiftKey && isFirstElement) {
73
+ e.preventDefault();
74
+ this.focusElement(lastFocusableElement);
75
+ }
76
+ // If tab is pressed and focus is on the last element, move to the first element
77
+ else if (!e.shiftKey && isLastElement) {
78
+ e.preventDefault();
79
+ this.focusElement(firstFocusableElement);
80
+ }
81
+ }
82
+ };
83
+ }
84
+ componentDidLoad() {
85
+ this.modalRef = this.el.querySelector('.pds-modal__backdrop');
86
+ // Add keyboard event listener
87
+ document.addEventListener('keydown', this.handleKeyDown);
88
+ }
89
+ disconnectedCallback() {
90
+ // Clean up event listener
91
+ document.removeEventListener('keydown', this.handleKeyDown);
92
+ }
93
+ handleOpenChange(newValue) {
94
+ if (newValue) {
95
+ this.showModal();
96
+ }
97
+ else {
98
+ this.hideModal();
99
+ }
100
+ }
101
+ /**
102
+ * Updates the list of focusable elements in the modal
103
+ */
104
+ updateFocusableElements() {
105
+ if (!this.modalRef)
106
+ return;
107
+ // Get all focusable elements within the modal
108
+ const selector = [
109
+ 'a[href]',
110
+ 'button:not([disabled])',
111
+ 'input:not([disabled])',
112
+ 'select:not([disabled])',
113
+ 'textarea:not([disabled])',
114
+ '[tabindex]:not([tabindex="-1"])',
115
+ 'pds-button:not([disabled])',
116
+ 'pds-link:not([disabled])',
117
+ 'pds-input:not([disabled])',
118
+ 'pds-checkbox:not([disabled])',
119
+ 'pds-radio:not([disabled])',
120
+ 'pds-switch:not([disabled])',
121
+ 'pds-select:not([disabled])',
122
+ ].join(',');
123
+ this.focusableElements = Array.from(this.modalRef.querySelectorAll(selector));
124
+ // Filter out elements with display: none or visibility: hidden
125
+ this.focusableElements = this.focusableElements.filter(el => {
126
+ const style = window.getComputedStyle(el);
127
+ return style.display !== 'none' && style.visibility !== 'hidden';
128
+ });
129
+ }
130
+ /**
131
+ * Sets focus to the first focusable element in the modal
132
+ */
133
+ setInitialFocus() {
134
+ if (this.focusableElements.length === 0)
135
+ return;
136
+ // Focus the first focusable element
137
+ const firstElement = this.focusableElements[0];
138
+ // For web components, we need to ensure they're properly focused
139
+ this.focusElement(firstElement);
140
+ }
141
+ /**
142
+ * Helper method to focus an element, with special handling for web components
143
+ */
144
+ focusElement(element) {
145
+ if (!element)
146
+ return;
147
+ try {
148
+ // Try standard focus first
149
+ element.focus();
150
+ // Check if focus worked
151
+ setTimeout(() => {
152
+ if (document.activeElement !== element) {
153
+ // For web components, try to find a focusable element inside
154
+ if (element.shadowRoot) {
155
+ const focusableInShadow = element.shadowRoot.querySelector('button, [tabindex], input, a[href]');
156
+ if (focusableInShadow) {
157
+ focusableInShadow.focus();
158
+ }
159
+ }
160
+ }
161
+ }, 0);
162
+ }
163
+ catch (error) {
164
+ console.error('Error focusing element:', error);
165
+ }
166
+ }
167
+ /**
168
+ * Opens the modal
169
+ */
170
+ async showModal() {
171
+ if (this.modalRef) {
172
+ try {
173
+ // Store the currently focused element to restore focus when modal closes
174
+ this.previousActiveElement = document.activeElement;
175
+ // Use native dialog showModal method which makes the rest of the page inert
176
+ this.modalRef.showModal();
177
+ this.open = true;
178
+ // Update focusable elements and set initial focus
179
+ // Using a longer timeout to ensure all components are fully rendered
180
+ setTimeout(() => {
181
+ this.updateFocusableElements();
182
+ this.setInitialFocus();
183
+ this.pdsModalOpen.emit();
184
+ }, 100);
185
+ }
186
+ catch (error) {
187
+ console.error('Failed to show modal:', error);
188
+ }
189
+ }
190
+ }
191
+ /**
192
+ * Closes the modal
193
+ */
194
+ async hideModal() {
195
+ if (this.modalRef) {
196
+ try {
197
+ this.modalRef.close();
198
+ this.open = false;
199
+ // Restore focus to the element that was focused before the modal was opened
200
+ if (this.previousActiveElement && typeof this.previousActiveElement.focus === 'function') {
201
+ this.previousActiveElement.focus();
202
+ }
203
+ this.pdsModalClose.emit();
204
+ }
205
+ catch (error) {
206
+ console.error('Failed to hide modal:', error);
207
+ }
208
+ }
209
+ }
210
+ /**
211
+ * Gets the z-index of a modal's backdrop element
212
+ */
213
+ getBackdropZIndex(modal) {
214
+ const backdrop = modal.querySelector('.pds-modal__backdrop');
215
+ return backdrop ? parseInt(getComputedStyle(backdrop).zIndex, 10) : -1;
216
+ }
217
+ /**
218
+ * Checks if this modal is the innermost (highest z-index) modal
219
+ */
220
+ isInnermostModal() {
221
+ // Find all open modals
222
+ const openModals = Array.from(document.querySelectorAll('pds-modal')).filter(modal => modal.open);
223
+ if (openModals.length === 0)
224
+ return false;
225
+ // Get this modal's backdrop element
226
+ const thisBackdrop = this.el.querySelector('.pds-modal__backdrop');
227
+ if (!thisBackdrop)
228
+ return false;
229
+ // Get computed z-index of all open modal backdrops
230
+ const modalZIndexes = openModals.map(modal => this.getBackdropZIndex(modal));
231
+ // Get the highest z-index
232
+ const maxZIndex = Math.max(...modalZIndexes);
233
+ // Check if this modal's backdrop has the highest z-index
234
+ const thisZIndex = this.getBackdropZIndex(this.el);
235
+ return thisZIndex === maxZIndex;
236
+ }
237
+ render() {
238
+ return (index.h("dialog", { key: '6ec691cfcf4865baeeba14f097d5e647a3201dba', class: {
239
+ 'pds-modal__backdrop': true,
240
+ 'open': this.open
241
+ }, "aria-modal": "true", "aria-labelledby": `${this.componentId}-heading`, onClick: this.handleBackdropClick }, index.h("div", { key: 'b7c4681717bfc0d095653c7dcf1a0e42cf069e8b', class: `pds-modal pds-modal--${this.size} pds-modal--scrollable` }, index.h("slot", { key: '9ca7f711579587c2f49fd19f81a488192d62ce72' }))));
242
+ }
243
+ get el() { return index.getElement(this); }
244
+ static get watchers() { return {
245
+ "open": ["handleOpenChange"]
246
+ }; }
247
+ };
248
+ PdsModal.style = pdsModalCss;
249
+
250
+ exports.pds_modal = PdsModal;
251
+ //# sourceMappingURL=pds-modal.entry.cjs.js.map
252
+
253
+ //# sourceMappingURL=pds-modal.cjs.entry.js.map
@@ -0,0 +1 @@
1
+ {"file":"pds-modal.entry.cjs.js","mappings":";;;;AAAA,MAAM,WAAW,GAAG,smDAAsmD;;MCO7mD,QAAQ,GAAA,MAAA;AALrB,IAAA,WAAA,CAAA,OAAA,EAAA;;;;AAQU,QAAA,IAAiB,CAAA,iBAAA,GAAkB,EAAE;AAI7C;;;AAGG;AACK,QAAA,IAAe,CAAA,eAAA,GAAG,IAAI;AAO9B;;;AAGG;AACsB,QAAA,IAAI,CAAA,IAAA,GAAG,KAAK;AAErC;;;AAGG;AACK,QAAA,IAAI,CAAA,IAAA,GAAsC,IAAI;AActD;;AAEG;AACM,QAAA,IAAsB,CAAA,sBAAA,GAAkB,EAAE;AAoJ3C,QAAA,IAAA,CAAA,mBAAmB,GAAG,CAAC,CAAa,KAAI;YAC9C,IAAI,CAAC,IAAI,CAAC,eAAe,IAAI,CAAC,IAAI,CAAC,IAAI;gBAAE;YAEzC,IAAK,CAAC,CAAC,MAAsB,CAAC,SAAS,CAAC,QAAQ,CAAC,qBAAqB,CAAC,EAAE;gBACvE,CAAC,CAAC,eAAe,EAAE;;AAGnB,gBAAA,IAAI,IAAI,CAAC,gBAAgB,EAAE,EAAE;oBAC3B,IAAI,CAAC,SAAS,EAAE;;;AAGtB,SAAC;AAoCO,QAAA,IAAA,CAAA,aAAa,GAAG,CAAC,CAAgB,KAAI;;YAE3C,IAAI,CAAC,IAAI,CAAC,IAAI;gBAAE;;AAGhB,YAAA,IAAI,CAAC,CAAC,GAAG,KAAK,QAAQ,EAAE;;AAEtB,gBAAA,IAAI,IA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CAAC;aACd,EAAA,YAAA,EACU,MAAM,EAAA,iBAAA,EACA,CAAA,EAAG,IAAI,CAAC,WAAW,CAAA,QAAA,CAAU,EAC9C,OAAO,EAAE,IAAI,CAAC,mBAAmB,EAAA,EAEjCA,OAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAE,CAAA,qBAAA,EAAwB,IAAI,CAAC,IAAI,CAAwB,sBAAA,CAAA,EAAA,EAEhEA,OAAa,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACT,CACC;;;;;;;;;;;","names":["h"],"sources":["src/components/pds-modal/pds-modal.scss?tag=pds-modal","src/components/pds-modal/pds-modal.tsx"],"sourcesContent":[".pds-modal__backdrop {\n align-items: flex-start;\n background-color: rgba(0, 0, 0, 0.4);\n border: 0;\n display: flex;\n height: 100%;\n inset: 0;\n justify-content: center;\n margin: 0;\n max-height: 100%;\n max-width: 100%;\n opacity: 0;\n padding: 0;\n position: fixed;\n transition: opacity 0.2s ease, visibility 0.2s ease;\n visibility: hidden;\n width: 100%;\n z-index: 1000;\n\n @supports (backdrop-filter: blur(3px)) {\n backdrop-filter: blur(3px);\n }\n\n // Increase z-index for nested modals\n pds-modal & {\n z-index: 1001;\n }\n\n &::backdrop {\n background: transparent;\n }\n\n &.open {\n opacity: 1;\n visibility: visible;\n }\n}\n\n.pds-modal {\n background: var(--pine-color-background-container);\n border-radius: var(--pine-dimension-sm);\n box-shadow: var(--pine-box-shadow-400);\n display: flex;\n flex-direction: column;\n margin: var(--pine-dimension-md);\n max-height: calc(100vh - (calc(6vh + 96px)));\n width: 100%;\n\n @media (min-width: 992px) {\n margin-block-start: 6vh;\n }\n\n @media (min-width: 1200px) {\n margin-block-start: 8vh;\n }\n}\n\n.pds-modal--sm {\n max-width: 520px;\n}\n\n.pds-modal--md {\n max-width: 700px;\n}\n\n.pds-modal--lg {\n max-width: 900px;\n}\n\n.pds-modal--fullscreen {\n border-radius: 0;\n height: 100%;\n margin: 0;\n max-height: 100vh;\n max-width: 100%;\n}\n\n.pds-modal-content {\n .pds-modal--fullscreen & {\n flex: 1;\n }\n}\n\n","import { Component, Element, Event, EventEmitter, h, Method, Prop, State, Watch } from '@stencil/core';\n\n@Component({\n tag: 'pds-modal',\n styleUrl: 'pds-modal.scss',\n shadow: false\n})\nexport class PdsModal {\n private modalRef: HTMLDialogElement;\n private previousActiveElement: HTMLElement;\n private focusableElements: HTMLElement[] = [];\n\n @Element() el: HTMLPdsModalElement;\n\n /**\n * Whether the modal can be dismissed by clicking the backdrop\n * @default true\n */\n @Prop() backdropDismiss = true;\n\n /**\n * A unique identifier used for the underlying component `id` attribute.\n */\n @Prop() componentId: string;\n\n /**\n * Whether the modal is open\n * @default false\n */\n @Prop({ mutable: true }) open = false;\n\n /**\n * The size of the modal\n * @default 'md'\n */\n @Prop() size: 'sm' | 'md' | 'lg' | 'fullscreen' = 'md';\n\n // Modal content is always scrollable by default\n\n /**\n * Emitted when the modal is opened\n */\n @Event() pdsModalOpen: EventEmitter<void>;\n\n /**\n * Emitted when the modal is closed\n */\n @Event() pdsModalClose: EventEmitter<void>;\n\n /**\n * Stores the list of focusable elements in the modal\n */\n @State() focusableElementsArray: HTMLElement[] = [];\n\n componentDidLoad() {\n this.modalRef = this.el.querySelector('.pds-modal__backdrop') as HTMLDialogElement;\n // Add keyboard event listener\n document.addEventListener('keydown', this.handleKeyDown);\n }\n\n disconnectedCallback() {\n // Clean up event listener\n document.removeEventListener('keydown', this.handleKeyDown);\n }\n\n @Watch('open')\n handleOpenChange(newValue: boolean) {\n if (newValue) {\n this.showModal();\n } else {\n this.hideModal();\n }\n }\n\n /**\n * Updates the list of focusable elements in the modal\n */\n private updateFocusableElements() {\n if (!this.modalRef) return;\n\n // Get all focusable elements within the modal\n const selector = [\n 'a[href]',\n 'button:not([disabled])',\n 'input:not([disabled])',\n 'select:not([disabled])',\n 'textarea:not([disabled])',\n '[tabindex]:not([tabindex=\"-1\"])',\n 'pds-button:not([disabled])',\n 'pds-link:not([disabled])',\n 'pds-input:not([disabled])',\n 'pds-checkbox:not([disabled])',\n 'pds-radio:not([disabled])',\n 'pds-switch:not([disabled])',\n 'pds-select:not([disabled])',\n ].join(',');\n\n this.focusableElements = Array.from(\n this.modalRef.querySelectorAll(selector)\n ) as HTMLElement[];\n\n // Filter out elements with display: none or visibility: hidden\n this.focusableElements = this.focusableElements.filter(el => {\n const style = window.getComputedStyle(el);\n return style.display !== 'none' && style.visibility !== 'hidden';\n });\n }\n\n /**\n * Sets focus to the first focusable element in the modal\n */\n private setInitialFocus() {\n if (this.focusableElements.length === 0) return;\n\n // Focus the first focusable element\n const firstElement = this.focusableElements[0];\n\n // For web components, we need to ensure they're properly focused\n this.focusElement(firstElement);\n }\n\n /**\n * Helper method to focus an element, with special handling for web components\n */\n private focusElement(element: HTMLElement) {\n if (!element) return;\n\n try {\n // Try standard focus first\n element.focus();\n\n // Check if focus worked\n setTimeout(() => {\n if (document.activeElement !== element) {\n // For web components, try to find a focusable element inside\n if (element.shadowRoot) {\n const focusableInShadow = element.shadowRoot.querySelector(\n 'button, [tabindex], input, a[href]'\n ) as HTMLElement;\n\n if (focusableInShadow) {\n focusableInShadow.focus();\n }\n }\n }\n }, 0);\n } catch (error) {\n console.error('Error focusing element:', error);\n }\n }\n\n /**\n * Opens the modal\n */\n @Method()\n async showModal() {\n if (this.modalRef) {\n try {\n // Store the currently focused element to restore focus when modal closes\n this.previousActiveElement = document.activeElement as HTMLElement;\n\n // Use native dialog showModal method which makes the rest of the page inert\n this.modalRef.showModal();\n this.open = true;\n\n // Update focusable elements and set initial focus\n // Using a longer timeout to ensure all components are fully rendered\n setTimeout(() => {\n this.updateFocusableElements();\n this.setInitialFocus();\n this.pdsModalOpen.emit();\n }, 100);\n } catch (error) {\n console.error('Failed to show modal:', error);\n }\n }\n }\n\n /**\n * Closes the modal\n */\n @Method()\n async hideModal() {\n if (this.modalRef) {\n try {\n this.modalRef.close();\n this.open = false;\n\n // Restore focus to the element that was focused before the modal was opened\n if (this.previousActiveElement && typeof this.previousActiveElement.focus === 'function') {\n this.previousActiveElement.focus();\n }\n\n this.pdsModalClose.emit();\n } catch (error) {\n console.error('Failed to hide modal:', error);\n }\n }\n }\n\n private handleBackdropClick = (e: MouseEvent) => {\n if (!this.backdropDismiss || !this.open) return;\n\n if ((e.target as HTMLElement).classList.contains('pds-modal__backdrop')) {\n e.stopPropagation();\n\n // Only close if this is the innermost modal\n if (this.isInnermostModal()) {\n this.hideModal();\n }\n }\n };\n\n /**\n * Gets the z-index of a modal's backdrop element\n */\n private getBackdropZIndex(modal: Element): number {\n const backdrop = modal.querySelector('.pds-modal__backdrop');\n return backdrop ? parseInt(getComputedStyle(backdrop).zIndex, 10) : -1;\n }\n\n /**\n * Checks if this modal is the innermost (highest z-index) modal\n */\n private isInnermostModal(): boolean {\n // Find all open modals\n const openModals = Array.from(document.querySelectorAll('pds-modal')).filter(\n modal => modal.open\n );\n\n if (openModals.length === 0) return false;\n\n // Get this modal's backdrop element\n const thisBackdrop = this.el.querySelector('.pds-modal__backdrop');\n if (!thisBackdrop) return false;\n\n // Get computed z-index of all open modal backdrops\n const modalZIndexes = openModals.map(modal => this.getBackdropZIndex(modal));\n\n // Get the highest z-index\n const maxZIndex = Math.max(...modalZIndexes);\n\n // Check if this modal's backdrop has the highest z-index\n const thisZIndex = this.getBackdropZIndex(this.el);\n return thisZIndex === maxZIndex;\n }\n\n private handleKeyDown = (e: KeyboardEvent) => {\n // If the modal is not open, don't handle any keyboard events\n if (!this.open) return;\n\n // Handle Escape key to close the modal\n if (e.key === 'Escape') {\n // Only close if this is the innermost modal\n if (this.isInnermostModal()) {\n e.preventDefault();\n this.hideModal();\n }\n return;\n }\n\n // Handle Tab key for focus trapping\n if (e.key === 'Tab') {\n // If there are no focusable elements, do nothing\n if (this.focusableElements.length === 0) return;\n\n // Get the first and last focusable elements\n const firstFocusableElement = this.focusableElements[0];\n const lastFocusableElement = this.focusableElements[this.focusableElements.length - 1];\n\n // Get the current active element\n const activeElement = document.activeElement;\n\n // Check if we need to wrap focus\n const isFirstElement = activeElement === firstFocusableElement ||\n firstFocusableElement.contains(activeElement as Node);\n\n const isLastElement = activeElement === lastFocusableElement ||\n lastFocusableElement.contains(activeElement as Node);\n\n // If shift + tab is pressed and focus is on the first element, move to the last element\n if (e.shiftKey && isFirstElement) {\n e.preventDefault();\n this.focusElement(lastFocusableElement);\n }\n // If tab is pressed and focus is on the last element, move to the first element\n else if (!e.shiftKey && isLastElement) {\n e.preventDefault();\n this.focusElement(firstFocusableElement);\n }\n }\n };\n\n render() {\n return (\n <dialog\n class={{\n 'pds-modal__backdrop': true,\n 'open': this.open\n }}\n aria-modal=\"true\"\n aria-labelledby={`${this.componentId}-heading`}\n onClick={this.handleBackdropClick}\n >\n <div\n class={`pds-modal pds-modal--${this.size} pds-modal--scrollable`}\n >\n <slot></slot>\n </div>\n </dialog>\n );\n }\n}\n"],"version":3}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pds-modal.entry.cjs.js","sources":["src/components/pds-modal/pds-modal.scss?tag=pds-modal","src/components/pds-modal/pds-modal.tsx"],"sourcesContent":[".pds-modal__backdrop {\n align-items: flex-start;\n background-color: rgba(0, 0, 0, 0.4);\n border: 0;\n display: flex;\n height: 100%;\n inset: 0;\n justify-content: center;\n margin: 0;\n max-height: 100%;\n max-width: 100%;\n opacity: 0;\n padding: 0;\n position: fixed;\n transition: opacity 0.2s ease, visibility 0.2s ease;\n visibility: hidden;\n width: 100%;\n z-index: 1000;\n\n @supports (backdrop-filter: blur(3px)) {\n backdrop-filter: blur(3px);\n }\n\n // Increase z-index for nested modals\n pds-modal & {\n z-index: 1001;\n }\n\n &::backdrop {\n background: transparent;\n }\n\n &.open {\n opacity: 1;\n visibility: visible;\n }\n}\n\n.pds-modal {\n background: var(--pine-color-background-container);\n border-radius: var(--pine-dimension-sm);\n box-shadow: var(--pine-box-shadow-400);\n display: flex;\n flex-direction: column;\n margin: var(--pine-dimension-md);\n max-height: calc(100vh - (calc(6vh + 96px)));\n width: 100%;\n\n @media (min-width: 992px) {\n margin-block-start: 6vh;\n }\n\n @media (min-width: 1200px) {\n margin-block-start: 8vh;\n }\n}\n\n.pds-modal--sm {\n max-width: 520px;\n}\n\n.pds-modal--md {\n max-width: 700px;\n}\n\n.pds-modal--lg {\n max-width: 900px;\n}\n\n.pds-modal--fullscreen {\n border-radius: 0;\n height: 100%;\n margin: 0;\n max-height: 100vh;\n max-width: 100%;\n}\n\n.pds-modal-content {\n .pds-modal--fullscreen & {\n flex: 1;\n }\n}\n\n","import { Component, Element, Event, EventEmitter, h, Method, Prop, State, Watch } from '@stencil/core';\n\n@Component({\n tag: 'pds-modal',\n styleUrl: 'pds-modal.scss',\n shadow: false\n})\nexport class PdsModal {\n private modalRef: HTMLDialogElement;\n private previousActiveElement: HTMLElement;\n private focusableElements: HTMLElement[] = [];\n\n @Element() el: HTMLPdsModalElement;\n\n /**\n * Whether the modal can be dismissed by clicking the backdrop\n * @default true\n */\n @Prop() backdropDismiss = true;\n\n /**\n * A unique identifier used for the underlying component `id` attribute.\n */\n @Prop() componentId: string;\n\n /**\n * Whether the modal is open\n * @default false\n */\n @Prop({ mutable: true }) open = false;\n\n /**\n * The size of the modal\n * @default 'md'\n */\n @Prop() size: 'sm' | 'md' | 'lg' | 'fullscreen' = 'md';\n\n // Modal content is always scrollable by default\n\n /**\n * Emitted when the modal is opened\n */\n @Event() pdsModalOpen: EventEmitter<void>;\n\n /**\n * Emitted when the modal is closed\n */\n @Event() pdsModalClose: EventEmitter<void>;\n\n /**\n * Stores the list of focusable elements in the modal\n */\n @State() focusableElementsArray: HTMLElement[] = [];\n\n componentDidLoad() {\n this.modalRef = this.el.querySelector('.pds-modal__backdrop') as HTMLDialogElement;\n // Add keyboard event listener\n document.addEventListener('keydown', this.handleKeyDown);\n }\n\n disconnectedCallback() {\n // Clean up event listener\n document.removeEventListener('keydown', this.handleKeyDown);\n }\n\n @Watch('open')\n handleOpenChange(newValue: boolean) {\n if (newValue) {\n this.showModal();\n } else {\n this.hideModal();\n }\n }\n\n /**\n * Updates the list of focusable elements in the modal\n */\n private updateFocusableElements() {\n if (!this.modalRef) return;\n\n // Get all focusable elements within the modal\n const selector = [\n 'a[href]',\n 'button:not([disabled])',\n 'input:not([disabled])',\n 'select:not([disabled])',\n 'textarea:not([disabled])',\n '[tabindex]:not([tabindex=\"-1\"])',\n 'pds-button:not([disabled])',\n 'pds-link:not([disabled])',\n 'pds-input:not([disabled])',\n 'pds-checkbox:not([disabled])',\n 'pds-radio:not([disabled])',\n 'pds-switch:not([disabled])',\n 'pds-select:not([disabled])',\n ].join(',');\n\n this.focusableElements = Array.from(\n this.modalRef.querySelectorAll(selector)\n ) as HTMLElement[];\n\n // Filter out elements with display: none or visibility: hidden\n this.focusableElements = this.focusableElements.filter(el => {\n const style = window.getComputedStyle(el);\n return style.display !== 'none' && style.visibility !== 'hidden';\n });\n }\n\n /**\n * Sets focus to the first focusable element in the modal\n */\n private setInitialFocus() {\n if (this.focusableElements.length === 0) return;\n\n // Focus the first focusable element\n const firstElement = this.focusableElements[0];\n\n // For web components, we need to ensure they're properly focused\n this.focusElement(firstElement);\n }\n\n /**\n * Helper method to focus an element, with special handling for web components\n */\n private focusElement(element: HTMLElement) {\n if (!element) return;\n\n try {\n // Try standard focus first\n element.focus();\n\n // Check if focus worked\n setTimeout(() => {\n if (document.activeElement !== element) {\n // For web components, try to find a focusable element inside\n if (element.shadowRoot) {\n const focusableInShadow = element.shadowRoot.querySelector(\n 'button, [tabindex], input, a[href]'\n ) as HTMLElement;\n\n if (focusableInShadow) {\n focusableInShadow.focus();\n }\n }\n }\n }, 0);\n } catch (error) {\n console.error('Error focusing element:', error);\n }\n }\n\n /**\n * Opens the modal\n */\n @Method()\n async showModal() {\n if (this.modalRef) {\n try {\n // Store the currently focused element to restore focus when modal closes\n this.previousActiveElement = document.activeElement as HTMLElement;\n\n // Use native dialog showModal method which makes the rest of the page inert\n this.modalRef.showModal();\n this.open = true;\n\n // Update focusable elements and set initial focus\n // Using a longer timeout to ensure all components are fully rendered\n setTimeout(() => {\n this.updateFocusableElements();\n this.setInitialFocus();\n this.pdsModalOpen.emit();\n }, 100);\n } catch (error) {\n console.error('Failed to show modal:', error);\n }\n }\n }\n\n /**\n * Closes the modal\n */\n @Method()\n async hideModal() {\n if (this.modalRef) {\n try {\n this.modalRef.close();\n this.open = false;\n\n // Restore focus to the element that was focused before the modal was opened\n if (this.previousActiveElement && typeof this.previousActiveElement.focus === 'function') {\n this.previousActiveElement.focus();\n }\n\n this.pdsModalClose.emit();\n } catch (error) {\n console.error('Failed to hide modal:', error);\n }\n }\n }\n\n private handleBackdropClick = (e: MouseEvent) => {\n if (!this.backdropDismiss || !this.open) return;\n\n if ((e.target as HTMLElement).classList.contains('pds-modal__backdrop')) {\n e.stopPropagation();\n\n // Only close if this is the innermost modal\n if (this.isInnermostModal()) {\n this.hideModal();\n }\n }\n };\n\n /**\n * Gets the z-index of a modal's backdrop element\n */\n private getBackdropZIndex(modal: Element): number {\n const backdrop = modal.querySelector('.pds-modal__backdrop');\n return backdrop ? parseInt(getComputedStyle(backdrop).zIndex, 10) : -1;\n }\n\n /**\n * Checks if this modal is the innermost (highest z-index) modal\n */\n private isInnermostModal(): boolean {\n // Find all open modals\n const openModals = Array.from(document.querySelectorAll('pds-modal')).filter(\n modal => modal.open\n );\n\n if (openModals.length === 0) return false;\n\n // Get this modal's backdrop element\n const thisBackdrop = this.el.querySelector('.pds-modal__backdrop');\n if (!thisBackdrop) return false;\n\n // Get computed z-index of all open modal backdrops\n const modalZIndexes = openModals.map(modal => this.getBackdropZIndex(modal));\n\n // Get the highest z-index\n const maxZIndex = Math.max(...modalZIndexes);\n\n // Check if this modal's backdrop has the highest z-index\n const thisZIndex = this.getBackdropZIndex(this.el);\n return thisZIndex === maxZIndex;\n }\n\n private handleKeyDown = (e: KeyboardEvent) => {\n // If the modal is not open, don't handle any keyboard events\n if (!this.open) return;\n\n // Handle Escape key to close the modal\n if (e.key === 'Escape') {\n // Only close if this is the innermost modal\n if (this.isInnermostModal()) {\n e.preventDefault();\n this.hideModal();\n }\n return;\n }\n\n // Handle Tab key for focus trapping\n if (e.key === 'Tab') {\n // If there are no focusable elements, do nothing\n if (this.focusableElements.length === 0) return;\n\n // Get the first and last focusable elements\n const firstFocusableElement = this.focusableElements[0];\n const lastFocusableElement = this.focusableElements[this.focusableElements.length - 1];\n\n // Get the current active element\n const activeElement = document.activeElement;\n\n // Check if we need to wrap focus\n const isFirstElement = activeElement === firstFocusableElement ||\n firstFocusableElement.contains(activeElement as Node);\n\n const isLastElement = activeElement === lastFocusableElement ||\n lastFocusableElement.contains(activeElement as Node);\n\n // If shift + tab is pressed and focus is on the first element, move to the last element\n if (e.shiftKey && isFirstElement) {\n e.preventDefault();\n this.focusElement(lastFocusableElement);\n }\n // If tab is pressed and focus is on the last element, move to the first element\n else if (!e.shiftKey && isLastElement) {\n e.preventDefault();\n this.focusElement(firstFocusableElement);\n }\n }\n };\n\n render() {\n return (\n <dialog\n class={{\n 'pds-modal__backdrop': true,\n 'open': this.open\n }}\n aria-modal=\"true\"\n aria-labelledby={`${this.componentId}-heading`}\n onClick={this.handleBackdropClick}\n >\n <div\n class={`pds-modal pds-modal--${this.size} pds-modal--scrollable`}\n >\n <slot></slot>\n </div>\n </dialog>\n );\n }\n}\n"],"names":["h"],"mappings":";;;;AAAA,MAAM,WAAW,GAAG,smDAAsmD;;MCO7mD,QAAQ,GAAA,MAAA;AALrB,IAAA,WAAA,CAAA,OAAA,EAAA;;;;AAQU,QAAA,IAAiB,CAAA,iBAAA,GAAkB,EAAE;AAI7C;;;AAGG;AACK,QAAA,IAAe,CAAA,eAAA,GAAG,IAAI;AAO9B;;;AAGG;AACsB,QAAA,IAAI,CAAA,IAAA,GAAG,KAAK;AAErC;;;AAGG;AACK,QAAA,IAAI,CAAA,IAAA,GAAsC,IAAI;AActD;;AAEG;AACM,QAAA,IAAsB,CAAA,sBA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,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,sBAAsB,CAAC;AAClE,QAAA,IAAI,CAAC,YAAY;AAAE,YAAA,OAAO,KAAK;;AAG/B,QAAA,MAAM,aAAa,GAAG,UAAU,CAAC,GAAG,CAAC,KAAK,IAAI,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC;;QAG5E,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,aAAa,CAAC;;QAG5C,MAAM,UAAU,GAAG,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,EAAE,CAAC;QAClD,OAAO,UAAU,KAAK,SAAS;;IAiDjC,MAAM,GAAA;QACJ,QACEA,OACE,CAAA,QAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAE;AACL,gBAAA,qBAAqB,EAAE,IAAI;gBAC3B,MAAM,EAAE,IAAI,CAAC;aACd,EAAA,YAAA,EACU,MAAM,EAAA,iBAAA,EACA,CAAA,EAAG,IAAI,CAAC,WAAW,CAAA,QAAA,CAAU,EAC9C,OAAO,EAAE,IAAI,CAAC,mBAAmB,EAAA,EAEjCA,OAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAE,CAAA,qBAAA,EAAwB,IAAI,CAAC,IAAI,CAAwB,sBAAA,CAAA,EAAA,EAEhEA,OAAa,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACT,CACC;;;;;;;;;;;"}
@@ -56,27 +56,59 @@ const PdsPopover = class {
56
56
  const offset = 8;
57
57
  switch (this.placement) {
58
58
  case 'top':
59
+ top = triggerRect.top - popoverRect.height - offset;
60
+ left = triggerRect.left + (triggerRect.width - popoverRect.width) / 2;
61
+ break;
62
+ case 'top-start':
59
63
  top = triggerRect.top - popoverRect.height - offset;
60
64
  left = triggerRect.left;
61
65
  break;
66
+ case 'top-end':
67
+ top = triggerRect.top - popoverRect.height - offset;
68
+ left = triggerRect.right - popoverRect.width;
69
+ break;
62
70
  case 'right':
71
+ top = triggerRect.top + (triggerRect.height - popoverRect.height) / 2;
72
+ left = triggerRect.right + offset;
73
+ break;
74
+ case 'right-start':
63
75
  top = triggerRect.top;
64
76
  left = triggerRect.right + offset;
65
77
  break;
78
+ case 'right-end':
79
+ top = triggerRect.bottom - popoverRect.height;
80
+ left = triggerRect.right + offset;
81
+ break;
66
82
  case 'bottom':
83
+ top = triggerRect.bottom + offset;
84
+ left = triggerRect.left + (triggerRect.width - popoverRect.width) / 2;
85
+ break;
86
+ case 'bottom-start':
67
87
  top = triggerRect.bottom + offset;
68
88
  left = triggerRect.left;
69
89
  break;
90
+ case 'bottom-end':
91
+ top = triggerRect.bottom + offset;
92
+ left = triggerRect.right - popoverRect.width;
93
+ break;
70
94
  case 'left':
95
+ top = triggerRect.top + (triggerRect.height - popoverRect.height) / 2;
96
+ left = triggerRect.left - popoverRect.width - offset;
97
+ break;
98
+ case 'left-start':
71
99
  top = triggerRect.top;
72
100
  left = triggerRect.left - popoverRect.width - offset;
73
101
  break;
102
+ case 'left-end':
103
+ top = triggerRect.bottom - popoverRect.height;
104
+ left = triggerRect.left - popoverRect.width - offset;
105
+ break;
74
106
  }
75
107
  popoverEl.style.top = `${top}px`;
76
108
  popoverEl.style.left = `${left}px`;
77
109
  }
78
110
  render() {
79
- return (index.h(index.Host, { key: '3bed0c38e97500efb2bffcef8321a6b38215c434' }, index.h("button", { key: '0db59e1815568cb980ce0bbe5ef3502177015a1d', class: "pds-popover__trigger", popoverTarget: this.componentId, popoverTargetAction: this.popoverTargetAction, onClick: this.handleClick }, this.text), index.h("div", { key: 'd8c70cd36614cb3fc83669a843b00af0d18b03d4', class: `pds-popover ${this.active ? 'pds-popover--active' : ''}`, id: this.componentId, popover: this.popoverType, style: { maxWidth: `${this.maxWidth}px` } }, index.h("slot", { key: 'e7408b199525e88c0e975f9cc3e96200f82ea23e' }))));
111
+ return (index.h(index.Host, { key: '35e5f4c21884f02b17dcb920e5c7ba73b8bed849' }, index.h("button", { key: '586880a84a4ad659a00500206e5b3c6c5e7e1a37', class: "pds-popover__trigger", popoverTarget: this.componentId, popoverTargetAction: this.popoverTargetAction, onClick: this.handleClick }, this.text), index.h("div", { key: 'fcb97e9b4033eef58bdca4915572b986dabde43c', class: `pds-popover ${this.active ? 'pds-popover--active' : ''}`, id: this.componentId, popover: this.popoverType, style: { maxWidth: `${this.maxWidth}px` } }, index.h("slot", { key: '1ffb626c69e06f17379ebf4ff4d5498f030909e8' }))));
80
112
  }
81
113
  get el() { return index.getElement(this); }
82
114
  };
@@ -1 +1 @@
1
- {"file":"pds-popover.entry.cjs.js","mappings":";;;;AAAA,MAAM,aAAa,GAAG,6/BAA6/B;;MCQtgC,UAAU,GAAA,MAAA;AALvB,IAAA,WAAA,CAAA,OAAA,EAAA;;AAWE;;;AAGG;AACM,QAAA,IAAM,CAAA,MAAA,GAAG,KAAK;AAEvB;;;AAGG;AACK,QAAA,IAAmB,CAAA,mBAAA,GAA+B,MAAM;AAEhE;;;AAGG;AACK,QAAA,IAAW,CAAA,WAAA,GAAsB,MAAM;AAY/C;;;AAGG;AACK,QAAA,IAAQ,CAAA,QAAA,GAAY,GAAG;AAE/B;;;AAGG;AACsB,QAAA,IAAS,CAAA,SAAA,GAAkB,OAAO;AAiF5D;IA/EC,mBAAmB,GAAA;QACjB,IAAI,CAAC,wBAAwB,EAAE;;IAMjC,WAAW,GAAA;AACT,QAAA,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,MAAM;;IAO5B,YAAY,GAAA;AACV,QAAA,IAAI,IAAI,CAAC,MAAM,EAAE;YACf,IAAI,CAAC,wBAAwB,EAAE;;;IAI3B,wBAAwB,GAAA;AAC9B,QAAA,MAAM,SAAS,GAAG,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,uBAAuB,CAAgB;AAC1F,QAAA,MAAM,SAAS,GAAG,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,aAAa,C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mBAAmB,EAC7C,OAAO,EAAE,IAAI,CAAC,WAAW,EAExB,EAAA,IAAI,CAAC,IAAI,CACH,EACTA,OAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAE,CAAA,YAAA,EAAe,IAAI,CAAC,MAAM,GAAG,qBAAqB,GAAG,EAAE,CAAA,CAAE,EAChE,EAAE,EAAE,IAAI,CAAC,WAAW,EACpB,OAAO,EAAE,IAAI,CAAC,WAAW,EACzB,KAAK,EAAE,EAAE,QAAQ,EAAE,CAAA,EAAG,IAAI,CAAC,QAAQ,CAAI,EAAA,CAAA,EAAE,EAAA,EAEzCA,OAAa,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACT,CACD;;;;;;;;","names":["h","Host"],"sources":["src/components/pds-popover/pds-popover.scss?tag=pds-popover&encapsulation=shadow","src/components/pds-popover/pds-popover.tsx"],"sourcesContent":[":host {\n --sizing-max-width-default: 352px;\n\n display: inline-block;\n\n [popover] {\n background-color: var(--pine-color-background-container);\n border: var(--pine-border);\n border-radius: var(--pine-dimension-125);\n box-shadow: var(--pine-box-shadow-200);\n margin: var(--pine-dimension-none);\n max-width: var(--sizing-max-width-default);\n padding: var(--pine-dimension-md);\n position: fixed;\n }\n\n button {\n align-items: center;\n background-color: var(--pine-color-secondary);\n border: var(--pine-border);\n border-radius: var(--pine-border-radius-full);\n color: var(--pine-color-text-secondary);\n display: flex;\n font: var(--pine-typography-body-medium);\n font-family: var(--pine-font-family-heading);\n letter-spacing: var(--pine-letter-spacing);\n min-height: 40px;\n padding: var(--pine-dimension-xs) var(--pine-dimension-sm);\n\n &:focus-visible {\n outline: var(--pine-outline-focus);\n outline-offset: var(--pine-border-width);\n }\n\n &:hover {\n background-color: var(--pine-color-secondary-hover);\n }\n }\n}\n","import { Component, Element, Host, Listen, h, Prop, State } from '@stencil/core';\nimport { PlacementType } from '@utils/types';\n\n@Component({\n tag: 'pds-popover',\n styleUrl: 'pds-popover.scss',\n shadow: true,\n})\nexport class PdsPopover {\n /**\n * Reference to the Host element\n */\n @Element() el: HTMLPdsPopoverElement;\n\n /**\n * Determines when the popover is active\n * @defaultValue false\n */\n @State() active = false;\n\n /**\n * Determines the action that triggers the popover. For manual popovers, the consumer is responsible for toggling this value.\n * @defaultValue \"show\"\n */\n @Prop() popoverTargetAction: 'show' | 'toggle' | 'hide' = 'show';\n\n /**\n * Determines the type of popover. Auto popovers can be \"light dismissed\" by clicking outside of the popover.\n * Manual popovers require the consumer to handle the visibility of the popover.\n */\n @Prop() popoverType: 'auto' | 'manual' = 'auto';\n\n /**\n * A unique identifier used for the underlying component `id` attribute.\n */\n @Prop() componentId: string;\n\n /**\n * Text that appears on the trigger element\n */\n @Prop() text: string;\n\n /**\n * Sets the maximum width of the popover content\n * @defaultValue 352\n */\n @Prop() maxWidth?: number = 352;\n\n /**\n * Determines the preferred position of the popover\n * @defaultValue \"right\"\n */\n @Prop({ reflect: true }) placement: PlacementType = 'right';\n\n componentWillRender() {\n this.handlePopoverPositioning();\n }\n\n @Listen('click', {\n capture: true\n })\n handleClick() {\n this.active = !this.active;\n }\n\n @Listen('scroll', {\n target: 'window',\n capture: true\n })\n handleScroll() {\n if (this.active) {\n this.handlePopoverPositioning();\n }\n }\n\n private handlePopoverPositioning() {\n const triggerEl = this.el.shadowRoot.querySelector('.pds-popover__trigger') as HTMLElement;\n const popoverEl = this.el.shadowRoot.querySelector('div[popover]') as HTMLElement;\n\n if (!triggerEl || !popoverEl) return;\n\n const triggerRect = triggerEl.getBoundingClientRect();\n const popoverRect = popoverEl.getBoundingClientRect();\n\n let top = 0;\n let left = 0;\n const offset = 8\n\n switch (this.placement) {\n case 'top':\n top = triggerRect.top - popoverRect.height - offset;\n left = triggerRect.left;\n break;\n case 'right':\n top = triggerRect.top;\n left = triggerRect.right + offset;\n break;\n case 'bottom':\n top = triggerRect.bottom + offset;\n left = triggerRect.left;\n break;\n case 'left':\n top = triggerRect.top;\n left = triggerRect.left - popoverRect.width - offset;\n break;\n }\n\n popoverEl.style.top = `${top}px`;\n popoverEl.style.left = `${left}px`;\n }\n\n render() {\n return (\n <Host>\n <button\n class=\"pds-popover__trigger\"\n popoverTarget={this.componentId}\n popoverTargetAction={this.popoverTargetAction}\n onClick={this.handleClick}\n >\n {this.text}\n </button>\n <div\n class={`pds-popover ${this.active ? 'pds-popover--active' : ''}`}\n id={this.componentId}\n popover={this.popoverType}\n style={{ maxWidth: `${this.maxWidth}px` }}\n >\n <slot></slot>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"pds-popover.entry.cjs.js","mappings":";;;;AAAA,MAAM,aAAa,GAAG,6/BAA6/B;;MCQtgC,UAAU,GAAA,MAAA;AALvB,IAAA,WAAA,CAAA,OAAA,EAAA;;AAWE;;;AAGG;AACM,QAAA,IAAM,CAAA,MAAA,GAAG,KAAK;AAEvB;;;AAGG;AACK,QAAA,IAAmB,CAAA,mBAAA,GAA+B,MAAM;AAEhE;;;AAGG;AACK,QAAA,IAAW,CAAA,WAAA,GAAsB,MAAM;AAY/C;;;AAGG;AACK,QAAA,IAAQ,CAAA,QAAA,GAAY,GAAG;AAE/B;;;AAGG;AACsB,QAAA,IAAS,CAAA,SAAA,GAAkB,OAAO;AAiH5D;IA/GC,mBAAmB,GAAA;QACjB,IAAI,CAAC,wBAAwB,EAAE;;IAMjC,WAAW,GAAA;AACT,QAAA,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,MAAM;;IAO5B,YAAY,GAAA;AACV,QAAA,IAAI,IAAI,CAAC,MAAM,EAAE;YACf,IAAI,CAAC,wBAAwB,EAAE;;;IAI3B,wBAAwB,GAAA;AAC9B,QAAA,MAAM,SAAS,GAAG,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,uBAAuB,CAAgB;AAC1F,QAAA,MAAM,SAAS,GAAG,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,cAAc,CAAgB;A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AA,EAAA,GAAA,EAAA,0CAAA,EAAA,EACHD,OACE,CAAA,QAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,sBAAsB,EAC5B,aAAa,EAAE,IAAI,CAAC,WAAW,EAC/B,mBAAmB,EAAE,IAAI,CAAC,mBAAmB,EAC7C,OAAO,EAAE,IAAI,CAAC,WAAW,EAExB,EAAA,IAAI,CAAC,IAAI,CACH,EACTA,OAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAE,CAAA,YAAA,EAAe,IAAI,CAAC,MAAM,GAAG,qBAAqB,GAAG,EAAE,CAAA,CAAE,EAChE,EAAE,EAAE,IAAI,CAAC,WAAW,EACpB,OAAO,EAAE,IAAI,CAAC,WAAW,EACzB,KAAK,EAAE,EAAE,QAAQ,EAAE,CAAA,EAAG,IAAI,CAAC,QAAQ,CAAI,EAAA,CAAA,EAAE,EAAA,EAEzCA,OAAa,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACT,CACD;;;;;;;;","names":["h","Host"],"sources":["src/components/pds-popover/pds-popover.scss?tag=pds-popover&encapsulation=shadow","src/components/pds-popover/pds-popover.tsx"],"sourcesContent":[":host {\n --sizing-max-width-default: 352px;\n\n display: inline-block;\n\n [popover] {\n background-color: var(--pine-color-background-container);\n border: var(--pine-border);\n border-radius: var(--pine-dimension-125);\n box-shadow: var(--pine-box-shadow-200);\n margin: var(--pine-dimension-none);\n max-width: var(--sizing-max-width-default);\n padding: var(--pine-dimension-md);\n position: fixed;\n }\n\n button {\n align-items: center;\n background-color: var(--pine-color-secondary);\n border: var(--pine-border);\n border-radius: var(--pine-border-radius-full);\n color: var(--pine-color-text-secondary);\n display: flex;\n font: var(--pine-typography-body-medium);\n font-family: var(--pine-font-family-heading);\n letter-spacing: var(--pine-letter-spacing);\n min-height: 40px;\n padding: var(--pine-dimension-xs) var(--pine-dimension-sm);\n\n &:focus-visible {\n outline: var(--pine-outline-focus);\n outline-offset: var(--pine-border-width);\n }\n\n &:hover {\n background-color: var(--pine-color-secondary-hover);\n }\n }\n}\n","import { Component, Element, Host, Listen, h, Prop, State } from '@stencil/core';\nimport { PlacementType } from '@utils/types';\n\n@Component({\n tag: 'pds-popover',\n styleUrl: 'pds-popover.scss',\n shadow: true,\n})\nexport class PdsPopover {\n /**\n * Reference to the Host element\n */\n @Element() el: HTMLPdsPopoverElement;\n\n /**\n * Determines when the popover is active\n * @defaultValue false\n */\n @State() active = false;\n\n /**\n * Determines the action that triggers the popover. For manual popovers, the consumer is responsible for toggling this value.\n * @defaultValue \"show\"\n */\n @Prop() popoverTargetAction: 'show' | 'toggle' | 'hide' = 'show';\n\n /**\n * Determines the type of popover. Auto popovers can be \"light dismissed\" by clicking outside of the popover.\n * Manual popovers require the consumer to handle the visibility of the popover.\n */\n @Prop() popoverType: 'auto' | 'manual' = 'auto';\n\n /**\n * A unique identifier used for the underlying component `id` attribute.\n */\n @Prop() componentId: string;\n\n /**\n * Text that appears on the trigger element\n */\n @Prop() text: string;\n\n /**\n * Sets the maximum width of the popover content\n * @defaultValue 352\n */\n @Prop() maxWidth?: number = 352;\n\n /**\n * Determines the preferred position of the popover\n * @defaultValue \"right\"\n */\n @Prop({ reflect: true }) placement: PlacementType = 'right';\n\n componentWillRender() {\n this.handlePopoverPositioning();\n }\n\n @Listen('click', {\n capture: true\n })\n handleClick() {\n this.active = !this.active;\n }\n\n @Listen('scroll', {\n target: 'window',\n capture: true\n })\n handleScroll() {\n if (this.active) {\n this.handlePopoverPositioning();\n }\n }\n\n private handlePopoverPositioning() {\n const triggerEl = this.el.shadowRoot.querySelector('.pds-popover__trigger') as HTMLElement;\n const popoverEl = this.el.shadowRoot.querySelector('div[popover]') as HTMLElement;\n\n if (!triggerEl || !popoverEl) return;\n\n const triggerRect = triggerEl.getBoundingClientRect();\n const popoverRect = popoverEl.getBoundingClientRect();\n\n let top = 0;\n let left = 0;\n const offset = 8\n\n switch (this.placement) {\n case 'top':\n top = triggerRect.top - popoverRect.height - offset;\n left = triggerRect.left + (triggerRect.width - popoverRect.width) / 2;\n break;\n case 'top-start':\n top = triggerRect.top - popoverRect.height - offset;\n left = triggerRect.left;\n break;\n case 'top-end':\n top = triggerRect.top - popoverRect.height - offset;\n left = triggerRect.right - popoverRect.width;\n break;\n case 'right':\n top = triggerRect.top + (triggerRect.height - popoverRect.height) / 2;\n left = triggerRect.right + offset;\n break;\n case 'right-start':\n top = triggerRect.top;\n left = triggerRect.right + offset;\n break;\n case 'right-end':\n top = triggerRect.bottom - popoverRect.height;\n left = triggerRect.right + offset;\n break;\n case 'bottom':\n top = triggerRect.bottom + offset;\n left = triggerRect.left + (triggerRect.width - popoverRect.width) / 2;\n break;\n case 'bottom-start':\n top = triggerRect.bottom + offset;\n left = triggerRect.left;\n break;\n case 'bottom-end':\n top = triggerRect.bottom + offset;\n left = triggerRect.right - popoverRect.width;\n break;\n case 'left':\n top = triggerRect.top + (triggerRect.height - popoverRect.height) / 2;\n left = triggerRect.left - popoverRect.width - offset;\n break;\n case 'left-start':\n top = triggerRect.top;\n left = triggerRect.left - popoverRect.width - offset;\n break;\n case 'left-end':\n top = triggerRect.bottom - popoverRect.height;\n left = triggerRect.left - popoverRect.width - offset;\n break;\n }\n\n popoverEl.style.top = `${top}px`;\n popoverEl.style.left = `${left}px`;\n }\n\n render() {\n return (\n <Host>\n <button\n class=\"pds-popover__trigger\"\n popoverTarget={this.componentId}\n popoverTargetAction={this.popoverTargetAction}\n onClick={this.handleClick}\n >\n {this.text}\n </button>\n <div\n class={`pds-popover ${this.active ? 'pds-popover--active' : ''}`}\n id={this.componentId}\n popover={this.popoverType}\n style={{ maxWidth: `${this.maxWidth}px` }}\n >\n <slot></slot>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -1 +1 @@
1
- {"version":3,"file":"pds-popover.entry.cjs.js","sources":["src/components/pds-popover/pds-popover.scss?tag=pds-popover&encapsulation=shadow","src/components/pds-popover/pds-popover.tsx"],"sourcesContent":[":host {\n --sizing-max-width-default: 352px;\n\n display: inline-block;\n\n [popover] {\n background-color: var(--pine-color-background-container);\n border: var(--pine-border);\n border-radius: var(--pine-dimension-125);\n box-shadow: var(--pine-box-shadow-200);\n margin: var(--pine-dimension-none);\n max-width: var(--sizing-max-width-default);\n padding: var(--pine-dimension-md);\n position: fixed;\n }\n\n button {\n align-items: center;\n background-color: var(--pine-color-secondary);\n border: var(--pine-border);\n border-radius: var(--pine-border-radius-full);\n color: var(--pine-color-text-secondary);\n display: flex;\n font: var(--pine-typography-body-medium);\n font-family: var(--pine-font-family-heading);\n letter-spacing: var(--pine-letter-spacing);\n min-height: 40px;\n padding: var(--pine-dimension-xs) var(--pine-dimension-sm);\n\n &:focus-visible {\n outline: var(--pine-outline-focus);\n outline-offset: var(--pine-border-width);\n }\n\n &:hover {\n background-color: var(--pine-color-secondary-hover);\n }\n }\n}\n","import { Component, Element, Host, Listen, h, Prop, State } from '@stencil/core';\nimport { PlacementType } from '@utils/types';\n\n@Component({\n tag: 'pds-popover',\n styleUrl: 'pds-popover.scss',\n shadow: true,\n})\nexport class PdsPopover {\n /**\n * Reference to the Host element\n */\n @Element() el: HTMLPdsPopoverElement;\n\n /**\n * Determines when the popover is active\n * @defaultValue false\n */\n @State() active = false;\n\n /**\n * Determines the action that triggers the popover. For manual popovers, the consumer is responsible for toggling this value.\n * @defaultValue \"show\"\n */\n @Prop() popoverTargetAction: 'show' | 'toggle' | 'hide' = 'show';\n\n /**\n * Determines the type of popover. Auto popovers can be \"light dismissed\" by clicking outside of the popover.\n * Manual popovers require the consumer to handle the visibility of the popover.\n */\n @Prop() popoverType: 'auto' | 'manual' = 'auto';\n\n /**\n * A unique identifier used for the underlying component `id` attribute.\n */\n @Prop() componentId: string;\n\n /**\n * Text that appears on the trigger element\n */\n @Prop() text: string;\n\n /**\n * Sets the maximum width of the popover content\n * @defaultValue 352\n */\n @Prop() maxWidth?: number = 352;\n\n /**\n * Determines the preferred position of the popover\n * @defaultValue \"right\"\n */\n @Prop({ reflect: true }) placement: PlacementType = 'right';\n\n componentWillRender() {\n this.handlePopoverPositioning();\n }\n\n @Listen('click', {\n capture: true\n })\n handleClick() {\n this.active = !this.active;\n }\n\n @Listen('scroll', {\n target: 'window',\n capture: true\n })\n handleScroll() {\n if (this.active) {\n this.handlePopoverPositioning();\n }\n }\n\n private handlePopoverPositioning() {\n const triggerEl = this.el.shadowRoot.querySelector('.pds-popover__trigger') as HTMLElement;\n const popoverEl = this.el.shadowRoot.querySelector('div[popover]') as HTMLElement;\n\n if (!triggerEl || !popoverEl) return;\n\n const triggerRect = triggerEl.getBoundingClientRect();\n const popoverRect = popoverEl.getBoundingClientRect();\n\n let top = 0;\n let left = 0;\n const offset = 8\n\n switch (this.placement) {\n case 'top':\n top = triggerRect.top - popoverRect.height - offset;\n left = triggerRect.left;\n break;\n case 'right':\n top = triggerRect.top;\n left = triggerRect.right + offset;\n break;\n case 'bottom':\n top = triggerRect.bottom + offset;\n left = triggerRect.left;\n break;\n case 'left':\n top = triggerRect.top;\n left = triggerRect.left - popoverRect.width - offset;\n break;\n }\n\n popoverEl.style.top = `${top}px`;\n popoverEl.style.left = `${left}px`;\n }\n\n render() {\n return (\n <Host>\n <button\n class=\"pds-popover__trigger\"\n popoverTarget={this.componentId}\n popoverTargetAction={this.popoverTargetAction}\n onClick={this.handleClick}\n >\n {this.text}\n </button>\n <div\n class={`pds-popover ${this.active ? 'pds-popover--active' : ''}`}\n id={this.componentId}\n popover={this.popoverType}\n style={{ maxWidth: `${this.maxWidth}px` }}\n >\n <slot></slot>\n </div>\n </Host>\n );\n }\n}\n"],"names":["h","Host"],"mappings":";;;;AAAA,MAAM,aAAa,GAAG,6/BAA6/B;;MCQtgC,UAAU,GAAA,MAAA;AALvB,IAAA,WAAA,CAAA,OAAA,EAAA;;AAWE;;;AAGG;AACM,QAAA,IAAM,CAAA,MAAA,GAAG,KAAK;AAEvB;;;AAGG;AACK,QAAA,IAAmB,CA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,QAAQ;AACX,gBAAA,GAAG,GAAG,WAAW,CAAC,MAAM,GAAG,MAAM;AACjC,gBAAA,IAAI,GAAG,WAAW,CAAC,IAAI;gBACvB;AACF,YAAA,KAAK,MAAM;AACT,gBAAA,GAAG,GAAG,WAAW,CAAC,GAAG;gBACrB,IAAI,GAAG,WAAW,CAAC,IAAI,GAAG,WAAW,CAAC,KAAK,GAAG,MAAM;gBACpD;;QAGJ,SAAS,CAAC,KAAK,CAAC,GAAG,GAAG,CAAG,EAAA,GAAG,IAAI;QAChC,SAAS,CAAC,KAAK,CAAC,IAAI,GAAG,CAAG,EAAA,IAAI,IAAI;;IAGpC,MAAM,GAAA;QACJ,QACEA,QAACC,UAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EACHD,OACE,CAAA,QAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,sBAAsB,EAC5B,aAAa,EAAE,IAAI,CAAC,WAAW,EAC/B,mBAAmB,EAAE,IAAI,CAAC,mBAAmB,EAC7C,OAAO,EAAE,IAAI,CAAC,WAAW,EAExB,EAAA,IAAI,CAAC,IAAI,CACH,EACTA,OAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAE,CAAA,YAAA,EAAe,IAAI,CAAC,MAAM,GAAG,qBAAqB,GAAG,EAAE,CAAA,CAAE,EAChE,EAAE,EAAE,IAAI,CAAC,WAAW,EACpB,OAAO,EAAE,IAAI,CAAC,WAAW,EACzB,KAAK,EAAE,EAAE,QAAQ,EAAE,CAAA,EAAG,IAAI,CAAC,QAAQ,CAAI,EAAA,CAAA,EAAE,EAAA,EAEzCA,OAAa,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACT,CACD;;;;;;;;"}
1
+ {"version":3,"file":"pds-popover.entry.cjs.js","sources":["src/components/pds-popover/pds-popover.scss?tag=pds-popover&encapsulation=shadow","src/components/pds-popover/pds-popover.tsx"],"sourcesContent":[":host {\n --sizing-max-width-default: 352px;\n\n display: inline-block;\n\n [popover] {\n background-color: var(--pine-color-background-container);\n border: var(--pine-border);\n border-radius: var(--pine-dimension-125);\n box-shadow: var(--pine-box-shadow-200);\n margin: var(--pine-dimension-none);\n max-width: var(--sizing-max-width-default);\n padding: var(--pine-dimension-md);\n position: fixed;\n }\n\n button {\n align-items: center;\n background-color: var(--pine-color-secondary);\n border: var(--pine-border);\n border-radius: var(--pine-border-radius-full);\n color: var(--pine-color-text-secondary);\n display: flex;\n font: var(--pine-typography-body-medium);\n font-family: var(--pine-font-family-heading);\n letter-spacing: var(--pine-letter-spacing);\n min-height: 40px;\n padding: var(--pine-dimension-xs) var(--pine-dimension-sm);\n\n &:focus-visible {\n outline: var(--pine-outline-focus);\n outline-offset: var(--pine-border-width);\n }\n\n &:hover {\n background-color: var(--pine-color-secondary-hover);\n }\n }\n}\n","import { Component, Element, Host, Listen, h, Prop, State } from '@stencil/core';\nimport { PlacementType } from '@utils/types';\n\n@Component({\n tag: 'pds-popover',\n styleUrl: 'pds-popover.scss',\n shadow: true,\n})\nexport class PdsPopover {\n /**\n * Reference to the Host element\n */\n @Element() el: HTMLPdsPopoverElement;\n\n /**\n * Determines when the popover is active\n * @defaultValue false\n */\n @State() active = false;\n\n /**\n * Determines the action that triggers the popover. For manual popovers, the consumer is responsible for toggling this value.\n * @defaultValue \"show\"\n */\n @Prop() popoverTargetAction: 'show' | 'toggle' | 'hide' = 'show';\n\n /**\n * Determines the type of popover. Auto popovers can be \"light dismissed\" by clicking outside of the popover.\n * Manual popovers require the consumer to handle the visibility of the popover.\n */\n @Prop() popoverType: 'auto' | 'manual' = 'auto';\n\n /**\n * A unique identifier used for the underlying component `id` attribute.\n */\n @Prop() componentId: string;\n\n /**\n * Text that appears on the trigger element\n */\n @Prop() text: string;\n\n /**\n * Sets the maximum width of the popover content\n * @defaultValue 352\n */\n @Prop() maxWidth?: number = 352;\n\n /**\n * Determines the preferred position of the popover\n * @defaultValue \"right\"\n */\n @Prop({ reflect: true }) placement: PlacementType = 'right';\n\n componentWillRender() {\n this.handlePopoverPositioning();\n }\n\n @Listen('click', {\n capture: true\n })\n handleClick() {\n this.active = !this.active;\n }\n\n @Listen('scroll', {\n target: 'window',\n capture: true\n })\n handleScroll() {\n if (this.active) {\n this.handlePopoverPositioning();\n }\n }\n\n private handlePopoverPositioning() {\n const triggerEl = this.el.shadowRoot.querySelector('.pds-popover__trigger') as HTMLElement;\n const popoverEl = this.el.shadowRoot.querySelector('div[popover]') as HTMLElement;\n\n if (!triggerEl || !popoverEl) return;\n\n const triggerRect = triggerEl.getBoundingClientRect();\n const popoverRect = popoverEl.getBoundingClientRect();\n\n let top = 0;\n let left = 0;\n const offset = 8\n\n switch (this.placement) {\n case 'top':\n top = triggerRect.top - popoverRect.height - offset;\n left = triggerRect.left + (triggerRect.width - popoverRect.width) / 2;\n break;\n case 'top-start':\n top = triggerRect.top - popoverRect.height - offset;\n left = triggerRect.left;\n break;\n case 'top-end':\n top = triggerRect.top - popoverRect.height - offset;\n left = triggerRect.right - popoverRect.width;\n break;\n case 'right':\n top = triggerRect.top + (triggerRect.height - popoverRect.height) / 2;\n left = triggerRect.right + offset;\n break;\n case 'right-start':\n top = triggerRect.top;\n left = triggerRect.right + offset;\n break;\n case 'right-end':\n top = triggerRect.bottom - popoverRect.height;\n left = triggerRect.right + offset;\n break;\n case 'bottom':\n top = triggerRect.bottom + offset;\n left = triggerRect.left + (triggerRect.width - popoverRect.width) / 2;\n break;\n case 'bottom-start':\n top = triggerRect.bottom + offset;\n left = triggerRect.left;\n break;\n case 'bottom-end':\n top = triggerRect.bottom + offset;\n left = triggerRect.right - popoverRect.width;\n break;\n case 'left':\n top = triggerRect.top + (triggerRect.height - popoverRect.height) / 2;\n left = triggerRect.left - popoverRect.width - offset;\n break;\n case 'left-start':\n top = triggerRect.top;\n left = triggerRect.left - popoverRect.width - offset;\n break;\n case 'left-end':\n top = triggerRect.bottom - popoverRect.height;\n left = triggerRect.left - popoverRect.width - offset;\n break;\n }\n\n popoverEl.style.top = `${top}px`;\n popoverEl.style.left = `${left}px`;\n }\n\n render() {\n return (\n <Host>\n <button\n class=\"pds-popover__trigger\"\n popoverTarget={this.componentId}\n popoverTargetAction={this.popoverTargetAction}\n onClick={this.handleClick}\n >\n {this.text}\n </button>\n <div\n class={`pds-popover ${this.active ? 'pds-popover--active' : ''}`}\n id={this.componentId}\n popover={this.popoverType}\n style={{ maxWidth: `${this.maxWidth}px` }}\n >\n <slot></slot>\n </div>\n </Host>\n );\n }\n}\n"],"names":["h","Host"],"mappings":";;;;AAAA,MAAM,aAAa,GAAG,6/BAA6/B;;MCQtgC,UAAU,GAAA,MAAA;AALvB,IAAA,WAAA,CAAA,OAAA,EAAA;;AAWE;;;AAGG;AACM,QAAA,IAAM,CAAA,MAAA,GAAG,KAAK;AAEvB;;;AAGG;AACK,QAAA,IAAmB,CAAA,mBAAA,GAA+B,MAAM;AAEhE;;;AAGG;AACK,QAAA,IAAW,CAAA,WAAA,GAAsB,MAAM;AAY/C;;;AAGG;AACK,QAAA,IAAQ,CAAA,QAAA,GAAY,GAAG;AAE/B;;;AAGG;AACsB,QAAA,IAAS,CAAA,SAAA,GAAkB,OAAO;AAiH5D;IA/GC,mBAAmB,GAAA;QACjB,IAAI,CAAC,wBAAwB,EAAE;;IAMjC,WAAW,GAAA;AACT,QAAA,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,MAAM;;IAO5B,YAAY,GAAA;AACV,QAAA,IAAI,IAAI,CAAC,MAAM,EAAE;YACf,IAAI,CAAC,wBAAwB,EAAE;;;IAI3B,wBAAwB,GAAA;AAC9B,QAAA,MAAM,SAAS,GAAG,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,uBAAuB,CAAgB;AAC1F,QAAA,MAAM,SAAS,GAAG,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,cAAc,CAAgB;AAEjF,QAAA,IAAI,CAAC,S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AA,EAAA,EACHD,OACE,CAAA,QAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,sBAAsB,EAC5B,aAAa,EAAE,IAAI,CAAC,WAAW,EAC/B,mBAAmB,EAAE,IAAI,CAAC,mBAAmB,EAC7C,OAAO,EAAE,IAAI,CAAC,WAAW,EAExB,EAAA,IAAI,CAAC,IAAI,CACH,EACTA,OAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAE,CAAA,YAAA,EAAe,IAAI,CAAC,MAAM,GAAG,qBAAqB,GAAG,EAAE,CAAA,CAAE,EAChE,EAAE,EAAE,IAAI,CAAC,WAAW,EACpB,OAAO,EAAE,IAAI,CAAC,WAAW,EACzB,KAAK,EAAE,EAAE,QAAQ,EAAE,CAAA,EAAG,IAAI,CAAC,QAAQ,CAAI,EAAA,CAAA,EAAE,EAAA,EAEzCA,OAAa,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACT,CACD;;;;;;;;"}
@@ -24,7 +24,7 @@ const PdsProgress = class {
24
24
  this.showPercent = false;
25
25
  }
26
26
  render() {
27
- return (index.h(index.Host, { key: 'a0a7cde165c1acc884366dfe7a368db5d7c4150e', class: this.animated ? { 'is-animated': this.animated } : '' }, index.h("div", { key: 'c2a8f262e0a6393448a0bc8a05dc49f30c451754', class: "pds-progress" }, index.h("label", { key: '422c51d5b06ef6d99e23cb2721b861ba9611b1df', class: "pds-progress__label", htmlFor: this.componentId }, this.label), index.h("progress", { key: '57081cc95c8bb44d6fa26cd7d1f7933108982165', id: this.componentId, max: "100", style: this.fillColor ? { '--color-progress-fill': this.fillColor } : {}, value: this.percent })), this.showPercent && index.h("div", { key: '37b88967a8584b43407314b0ba70faf4e43a9e5a', class: "pds-progress__percentage" }, this.percent, "%")));
27
+ return (index.h(index.Host, { key: '2a7768cc769f62579bfee6d8f9e6109d10df0aaf', class: this.animated ? { 'is-animated': this.animated } : '' }, index.h("div", { key: '1eef3758e8c6e470f8cdd170e8d6c49e25bf9aa3', class: "pds-progress" }, index.h("label", { key: '5b75150a747a15379fdf0ee23b1be561e6d990e7', class: "pds-progress__label", htmlFor: this.componentId }, this.label), index.h("progress", { key: 'e20ad7d705d97ac11173ae515332fc1620a96328', id: this.componentId, max: "100", style: this.fillColor ? { '--color-progress-fill': this.fillColor } : {}, value: this.percent })), this.showPercent && index.h("div", { key: '8bafb39b5976149b80e720952e625f60f1e3c73c', class: "pds-progress__percentage" }, this.percent, "%")));
28
28
  }
29
29
  };
30
30
  PdsProgress.style = pdsProgressCss;
@@ -2,7 +2,7 @@
2
2
 
3
3
  var index = require('./index-CxX7ua5d.js');
4
4
  var form = require('./form-Bx4nzJBo.js');
5
- var index$1 = require('./index-CG2Rr2io.js');
5
+ var index$1 = require('./index-B0qLG6KJ.js');
6
6
 
7
7
  const labelCss = ".sc-pds-radio-h{display:inline-block}[aria-disabled=true].sc-pds-radio-h label.sc-pds-radio{color:var(--pine-color-text-label-disabled)}[aria-readonly=true].sc-pds-radio-h label.sc-pds-radio{color:var(--pine-color-text-label-readonly)}label.sc-pds-radio{color:var(--pine-color-text-label);font:var(--pine-typography-body-medium);letter-spacing:var(--pine-letter-spacing)}";
8
8
 
@@ -52,9 +52,9 @@ const PdsRadio = class {
52
52
  return classNames.join(' ');
53
53
  }
54
54
  render() {
55
- return (index.h(index.Host, { key: '7366c979970c03d9c6b26d355ba2f14c2e040907', class: this.classNames() }, index.h("label", { key: 'c48405dc725f4d7b0a027e66c3b0b04e72843445', htmlFor: this.componentId }, index.h("input", { key: 'cd38a200a73572d2f07ada9bc1ec08cae0863044', "aria-describedby": form.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 }), index.h("span", { key: 'a21fb68b4326afb2bf25b08cf6022cd26f3c83ba', class: this.hideLabel ? 'visually-hidden' : '' }, this.label)), this.helperMessage &&
56
- index.h("div", { key: 'b4c201465e085096ac5fac05e43b01cee045310e', class: 'pds-radio__message', id: form.messageId(this.componentId, 'helper') }, this.helperMessage), this.errorMessage &&
57
- index.h("div", { key: '2c0475efbe1ebedd762de9d432864f5dab8f0448', class: `pds-radio__message pds-radio__message--error`, id: form.messageId(this.componentId, 'error'), "aria-live": "assertive" }, index.h("pds-icon", { key: '40ece3a429d9475c17f262d772cdb7332a7089b2', icon: index$1.danger, size: "small" }), this.errorMessage)));
55
+ return (index.h(index.Host, { key: '8c215fa4193cf8bd246cd83edf97b8316685714e', class: this.classNames() }, index.h("label", { key: '578530f26dd25f73ccbbb39c773290cd275920cf', htmlFor: this.componentId }, index.h("input", { key: '9ab61a2683246fae862feb5e432a0872288b7a87', "aria-describedby": form.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 }), index.h("span", { key: 'f48c47ddb347bf0d7388359665dbbf3abf1b4859', class: this.hideLabel ? 'visually-hidden' : '' }, this.label)), this.helperMessage &&
56
+ index.h("div", { key: 'b8dbb34af90eed82f69621ceaadd8da668f0b3de', class: 'pds-radio__message', id: form.messageId(this.componentId, 'helper') }, this.helperMessage), this.errorMessage &&
57
+ index.h("div", { key: 'e777e4f2397ba833aefb7e8cd4ab9a32ea93685a', class: `pds-radio__message pds-radio__message--error`, id: form.messageId(this.componentId, 'error'), "aria-live": "assertive" }, index.h("pds-icon", { key: '13bd73d91bb3d676757ac9f4dcfcef7d2a5fcc55', icon: index$1.danger, size: "small" }), this.errorMessage)));
58
58
  }
59
59
  };
60
60
  PdsRadio.style = labelCss + pdsRadioCss;
@@ -39,7 +39,7 @@ const PdsRow = class {
39
39
  })), (this.minHeight && {
40
40
  'min-height': this.minHeight,
41
41
  }));
42
- return index.h(index.Host, { key: 'e898a1a24bbb1177b024d2c87d9388b136c8bde9', class: `pds-row ${rowClasses}`, style: rowInlineStyles });
42
+ return index.h(index.Host, { key: '7641ed5798525661b1a100bfbce60ed271e76887', class: `pds-row ${rowClasses}`, style: rowInlineStyles });
43
43
  }
44
44
  };
45
45
  PdsRow.style = pdsRowCss;
@@ -2,13 +2,13 @@
2
2
 
3
3
  var index = require('./index-CxX7ua5d.js');
4
4
  var form = require('./form-Bx4nzJBo.js');
5
- var index$1 = require('./index-CG2Rr2io.js');
5
+ var index$1 = require('./index-B0qLG6KJ.js');
6
6
 
7
7
  const pdsSelectTokensCss = ":host{--pine-select-color-background-danger:var(--pine-color-red-050)}";
8
8
 
9
9
  const labelCss = ":host{display:inline-block}:host([aria-disabled=true]) label{color:var(--pine-color-text-label-disabled)}:host([aria-readonly=true]) label{color:var(--pine-color-text-label-readonly)}label{color:var(--pine-color-text-label);font:var(--pine-typography-body-medium);letter-spacing:var(--pine-letter-spacing)}";
10
10
 
11
- const pdsSelectCss = ":host .hidden,:host :host([hidden]){display:none}.pds-select{display:grid;-ms-flex-direction:column;flex-direction:column;grid-template-areas:\"label label\" \"field field\" \"message message\";grid-template-columns:1fr minmax(2rem, -webkit-min-content);grid-template-columns:1fr minmax(2rem, min-content);grid-template-rows:-webkit-min-content -webkit-min-content -webkit-min-content;grid-template-rows:min-content min-content min-content;position:relative;width:100%}label{grid-area:label;-webkit-margin-after:var(--pine-dimension-2xs);margin-block-end:var(--pine-dimension-2xs)}select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:var(--pine-color-background-container);border:var(--pine-border);border-radius:var(--pine-dimension-125);font:var(--pine-typography-body);grid-area:field;letter-spacing:var(--pine-letter-spacing);padding:var(--pine-dimension-xs) var(--pine-dimension-150);-webkit-padding-end:var(--pine-dimension-450);padding-inline-end:var(--pine-dimension-450);position:relative}select:hover{border-color:var(--pine-color-border-hover);cursor:pointer}select:focus-visible{border-color:var(--pine-color-border-active);outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}select:disabled{background-color:var(--pine-color-background-container-disabled);border-color:var(--pine-color-border-disabled);color:var(--pine-color-text-disabled);cursor:not-allowed}select:has(~.pds-select__message .pds-select__error-message){background-color:var(--pine-select-color-background-danger);border-color:var(--pine-color-border-danger)}select:has(~.pds-select__message .pds-select__error-message):focus-visible{outline-color:var(--pine-color-focus-ring-danger)}:host(.is-invalid) select{background-color:var(--pine-select-color-background-danger);border-color:var(--pine-color-border-danger)}:host(.is-invalid) select:focus-visible{outline-color:var(--pine-color-focus-ring-danger)}.pds-select__error-message,.pds-select__helper-message{font:var(--pine-typography-body-sm-medium);-webkit-margin-after:0;margin-block-end:0;-webkit-margin-before:var(--pine-dimension-2xs);margin-block-start:var(--pine-dimension-2xs)}.pds-select__error-message{-ms-flex-align:center;align-items:center;color:var(--pine-color-text-message-danger);display:-ms-flexbox;display:flex;gap:var(--pine-dimension-2xs)}.pds-select__message{grid-area:message}.pds-select__select-icon{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;grid-column:-1/-2;grid-row:2/3;height:2.5rem;pointer-events:none;position:relative;z-index:1}";
11
+ const pdsSelectCss = ":host{--pds-select-background:var(--pine-color-background-container);--pds-select-border:var(--pine-border);--pds-select-border-radius:var(--pine-dimension-125);--pds-select-border-radius-start-end:var(--pine-dimension-125);--pds-select-border-radius-start-start:var(--pine-dimension-125);--pds-select-border-radius-end-end:var(--pine-dimension-125);--pds-select-border-radius-end-start:var(--pine-dimension-125);--pds-select-min-height:36px;--box-shadow-focus:0 0 0 1px #ffffff, 0 0 0 3px var(--pine-color-focus-ring);--box-shadow-focus-error:0 0 0 1px #ffffff, 0 0 0 3px var(--pine-color-focus-ring-danger)}:host .hidden,:host :host([hidden]){display:none}.pds-select{display:grid;-ms-flex-direction:column;flex-direction:column;grid-template-areas:\"label label\" \"field field\" \"message message\";grid-template-columns:1fr minmax(2rem, -webkit-min-content);grid-template-columns:1fr minmax(2rem, min-content);grid-template-rows:-webkit-min-content -webkit-min-content -webkit-min-content;grid-template-rows:min-content min-content min-content;position:relative;width:100%}label{grid-area:label;-webkit-margin-after:var(--pine-dimension-2xs);margin-block-end:var(--pine-dimension-2xs)}select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--pds-select-background);border:var(--pds-select-border);border-radius:var(--pds-select-border-radius);border-bottom-left-radius:var(--pds-select-border-radius-end-start, var(--pds-select-border-radius));border-bottom-right-radius:var(--pds-select-border-radius-end-end, var(--pds-select-border-radius));border-top-left-radius:var(--pds-select-border-radius-start-start, var(--pds-select-border-radius));border-top-right-radius:var(--pds-select-border-radius-start-end, var(--pds-select-border-radius));font:var(--pine-typography-body);grid-area:field;letter-spacing:var(--pine-letter-spacing);min-height:var(--pds-select-min-height);padding:var(--pine-dimension-xs) var(--pine-dimension-150);-webkit-padding-end:var(--pine-dimension-450);padding-inline-end:var(--pine-dimension-450);position:relative}select:hover{border-color:var(--pine-color-border-hover);cursor:pointer}select:focus-visible{border-color:var(--pine-color-border-active);outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}select:disabled{background-color:var(--pine-color-background-container-disabled);border-color:var(--pine-color-border-disabled);color:var(--pine-color-text-disabled);cursor:not-allowed}select:has(~.pds-select__message .pds-select__error-message){background-color:var(--pine-select-color-background-danger);border-color:var(--pine-color-border-danger)}select:has(~.pds-select__message .pds-select__error-message):focus-visible{outline-color:var(--pine-color-focus-ring-danger)}:host(.is-invalid) select{background-color:var(--pine-select-color-background-danger);border-color:var(--pine-color-border-danger)}:host(.is-invalid) select:focus-visible{outline-color:var(--pine-color-focus-ring-danger)}.pds-select__error-message,.pds-select__helper-message{font:var(--pine-typography-body-sm-medium);-webkit-margin-after:0;margin-block-end:0;-webkit-margin-before:var(--pine-dimension-2xs);margin-block-start:var(--pine-dimension-2xs)}.pds-select__error-message{-ms-flex-align:center;align-items:center;color:var(--pine-color-text-message-danger);display:-ms-flexbox;display:flex;gap:var(--pine-dimension-2xs)}.pds-select__message{grid-area:message}.pds-select__select-icon{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;grid-column:-1/-2;grid-row:2/3;height:var(--pds-select-min-height);pointer-events:none;position:relative;z-index:1}.visually-hidden{border:0;clip:rect(0 0 0 0);-webkit-clip-path:polygon(0 0, 0 0, 0 0);clip-path:polygon(0 0, 0 0, 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}";
12
12
 
13
13
  const PdsSelect = class {
14
14
  constructor(hostRef) {
@@ -124,8 +124,7 @@ const PdsSelect = class {
124
124
  return classNames.join(' ');
125
125
  }
126
126
  render() {
127
- return (index.h(index.Host, { key: '6eea9a5492e4b7e415922bce0aa8f2295792a9e4', "aria-disabled": this.disabled ? 'true' : null, class: this.classNames() }, index.h("div", { key: '3180e1eff494f846f395d9db6730926d86d1e54a', class: "pds-select" }, this.label &&
128
- index.h("label", { key: '90dc521ef10b81a9f58a0f0a2cfa4bc685312119', htmlFor: this.componentId }, this.label), index.h("select", { key: 'd6576d25601de6c41893568927b64e530bf9f266', autocomplete: this.autocomplete || undefined, class: "pds-select__field", disabled: this.disabled, id: this.componentId, multiple: this.multiple, name: this.name, onChange: this.onSelectUpdate, required: this.required, ref: (el) => (this.selectEl = el) }), index.h("div", { key: '87c53bb7bf315e170f60e5b58afcbf623d1aa65c', "aria-hidden": "true", class: "hidden", ref: (el) => (this.slotContainer = el) }, index.h("slot", { key: '8cafbc8cc8e23de0ab69b9d6b7d23c896df530b6', onSlotchange: this.handleSlotChange })), this.renderMessages(), !this.multiple && index.h("pds-icon", { key: '48758d321edbd38ff6bd31ddd1902627202e196e', class: "pds-select__select-icon", icon: index$1.enlarge }))));
127
+ return (index.h(index.Host, { key: 'c0a0b391e6b5c35d5d3d7fce9d1f92583c582aa5', "aria-disabled": this.disabled ? 'true' : null, class: this.classNames() }, index.h("div", { key: '4f91cfcfcc570cf79d8e6a2f86d741f471489591', class: "pds-select" }, !this.hideLabel && (index.h("label", { key: '21fa83cfdad6a46be1efa22ebc4df696ca49b7b1', htmlFor: this.componentId }, index.h("span", { key: '760e46f98327c3b8e9ceb48ee158202ce42b8bb6', class: this.hideLabel ? 'visually-hidden' : '' }, this.label))), index.h("select", { key: '78d92779624d84df9ae73515bbda74d9d44a8919', "aria-label": this.hideLabel ? this.label : undefined, autocomplete: this.autocomplete || undefined, class: "pds-select__field", disabled: this.disabled, id: this.componentId, multiple: this.multiple, name: this.name, onChange: this.onSelectUpdate, part: "select", required: this.required, ref: (el) => (this.selectEl = el) }), index.h("div", { key: '9a75bf791747df08018d59de49855410c6dc2312', "aria-hidden": "true", class: "hidden", ref: (el) => (this.slotContainer = el) }, index.h("slot", { key: '1a974b4e171971e922aa04e9a56d6e6f26635724', onSlotchange: this.handleSlotChange })), this.renderMessages(), !this.multiple && index.h("pds-icon", { key: '9cbc569418617092229d660b34b2c17a2826c878', class: "pds-select__select-icon", icon: index$1.enlarge }))));
129
128
  }
130
129
  static get watchers() { return {
131
130
  "value": ["valueChanged"]