@xplortech/apollo-core 3.3.0 → 3.4.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 (370) hide show
  1. package/AGENTS.md +17 -0
  2. package/build/components/dropdown.css +1 -1
  3. package/build/components/icon.css +1 -1
  4. package/build/components/nav-item.css +1 -1
  5. package/build/components/secondary-nav.css +1 -1
  6. package/build/components/top-nav.css +1 -1
  7. package/build/core.css +1 -1
  8. package/build/style.css +1 -1
  9. package/build/variables/apollo.css +1 -0
  10. package/build/variables/field-edge.css +1 -0
  11. package/build/vendor/flatpickr.css +1 -1
  12. package/dist/apollo-core/apollo-core.css +1 -1
  13. package/dist/apollo-core/apollo-core.esm.js +1 -1
  14. package/dist/apollo-core/{p-18486aba.entry.js → p-00e96d61.entry.js} +1 -1
  15. package/dist/apollo-core/{p-439d5cdd.entry.js → p-02a2d1a3.entry.js} +1 -1
  16. package/dist/apollo-core/{p-d204ed1a.entry.js → p-035ed1ad.entry.js} +1 -1
  17. package/dist/apollo-core/{p-af188297.entry.js → p-066d3199.entry.js} +1 -1
  18. package/dist/apollo-core/{p-9955c4f2.entry.js → p-066eccd6.entry.js} +1 -1
  19. package/dist/apollo-core/{p-2b813212.entry.js → p-0e8514ff.entry.js} +1 -1
  20. package/dist/apollo-core/{p-a73b0ca4.entry.js → p-18115cd4.entry.js} +1 -1
  21. package/dist/apollo-core/{p-79d306a2.entry.js → p-19d22455.entry.js} +1 -1
  22. package/dist/apollo-core/{p-9d091b05.entry.js → p-1b00e924.entry.js} +1 -1
  23. package/dist/apollo-core/{p-19fb0e5f.entry.js → p-1ca46c11.entry.js} +1 -1
  24. package/dist/apollo-core/{p-7fd3da3a.entry.js → p-1e07745c.entry.js} +1 -1
  25. package/dist/apollo-core/{p-3e3ab332.entry.js → p-31cbb36f.entry.js} +1 -1
  26. package/dist/apollo-core/{p-cfb00d23.entry.js → p-321319c0.entry.js} +1 -1
  27. package/dist/apollo-core/{p-325a3b43.entry.js → p-3222e5a7.entry.js} +1 -1
  28. package/dist/apollo-core/{p-aece2c3d.entry.js → p-325466bf.entry.js} +1 -1
  29. package/dist/apollo-core/{p-cab7d816.entry.js → p-32ac676a.entry.js} +1 -1
  30. package/dist/apollo-core/{p-6de10879.entry.js → p-33063e8c.entry.js} +1 -1
  31. package/dist/apollo-core/{p-4249ee9b.entry.js → p-34d84be8.entry.js} +1 -1
  32. package/dist/apollo-core/{p-08ea8939.entry.js → p-36965939.entry.js} +1 -1
  33. package/dist/apollo-core/{p-2111cc38.entry.js → p-43fbf2aa.entry.js} +1 -1
  34. package/dist/apollo-core/{p-d1571245.entry.js → p-44a1fd8b.entry.js} +1 -1
  35. package/dist/apollo-core/{p-d9f78325.entry.js → p-462a804c.entry.js} +1 -1
  36. package/dist/apollo-core/{p-38fa8398.entry.js → p-47a4f0a8.entry.js} +1 -1
  37. package/dist/apollo-core/{p-01c55c74.entry.js → p-5cf30b9d.entry.js} +1 -1
  38. package/dist/apollo-core/{p-7f00b542.entry.js → p-606153e1.entry.js} +1 -1
  39. package/dist/apollo-core/{p-17e38eaf.entry.js → p-60e3a798.entry.js} +1 -1
  40. package/dist/apollo-core/{p-a149351a.entry.js → p-663e9521.entry.js} +1 -1
  41. package/dist/apollo-core/{p-b9c85394.entry.js → p-6e22ab86.entry.js} +1 -1
  42. package/dist/apollo-core/{p-fdd1b7da.entry.js → p-7781b569.entry.js} +1 -1
  43. package/dist/apollo-core/{p-73a1c68d.entry.js → p-787a361c.entry.js} +1 -1
  44. package/dist/apollo-core/{p-fc73497e.entry.js → p-7b46b656.entry.js} +1 -1
  45. package/dist/apollo-core/{p-9b757459.entry.js → p-7bfd9cfb.entry.js} +1 -1
  46. package/dist/apollo-core/{p-4b949aeb.entry.js → p-8127dd6b.entry.js} +1 -1
  47. package/dist/apollo-core/{p-3d4a6de1.entry.js → p-88367287.entry.js} +1 -1
  48. package/dist/apollo-core/{p-d13a07ea.entry.js → p-8a59605f.entry.js} +1 -1
  49. package/dist/apollo-core/p-8df2b9e8.entry.js +1 -0
  50. package/dist/apollo-core/{p-e99503a2.entry.js → p-9466f566.entry.js} +1 -1
  51. package/dist/apollo-core/{p-620fc472.entry.js → p-95b6e6e6.entry.js} +1 -1
  52. package/dist/apollo-core/{p-14f5d98a.entry.js → p-966f3702.entry.js} +1 -1
  53. package/dist/apollo-core/{p-cca0f1a2.entry.js → p-9d7ead72.entry.js} +1 -1
  54. package/dist/apollo-core/p-CgJEmBQY.js +3 -0
  55. package/dist/apollo-core/{p-b2dcdb19.entry.js → p-a21c7976.entry.js} +1 -1
  56. package/dist/apollo-core/{p-d060572b.entry.js → p-a30b51c8.entry.js} +1 -1
  57. package/dist/apollo-core/{p-b55951a2.entry.js → p-a3537a74.entry.js} +1 -1
  58. package/dist/apollo-core/{p-6aee7d6b.entry.js → p-ac105b6c.entry.js} +1 -1
  59. package/dist/apollo-core/{p-cd2d73ee.entry.js → p-adc14e6e.entry.js} +1 -1
  60. package/dist/apollo-core/{p-c4fd031e.entry.js → p-b41b7950.entry.js} +1 -1
  61. package/dist/apollo-core/{p-0a7d57ab.entry.js → p-b44a72e9.entry.js} +1 -1
  62. package/dist/apollo-core/{p-e21af3d1.entry.js → p-b6f20359.entry.js} +1 -1
  63. package/dist/apollo-core/{p-dad5d377.entry.js → p-b7f75498.entry.js} +1 -1
  64. package/dist/apollo-core/{p-890c641b.entry.js → p-b9136f21.entry.js} +1 -1
  65. package/dist/apollo-core/{p-e7145461.entry.js → p-c526f16d.entry.js} +1 -1
  66. package/dist/apollo-core/{p-3f8dc5b9.entry.js → p-c7b8a325.entry.js} +1 -1
  67. package/dist/apollo-core/{p-1c2135e3.entry.js → p-c9246567.entry.js} +1 -1
  68. package/dist/apollo-core/{p-b7b91f27.entry.js → p-cc04d4e7.entry.js} +1 -1
  69. package/dist/apollo-core/{p-13253d8f.entry.js → p-cc27a41f.entry.js} +1 -1
  70. package/dist/apollo-core/{p-01ed2bb5.entry.js → p-d58523b6.entry.js} +1 -1
  71. package/dist/apollo-core/{p-a5ddb3c4.entry.js → p-d7fba438.entry.js} +1 -1
  72. package/dist/apollo-core/p-db998e2a.entry.js +1 -0
  73. package/dist/apollo-core/{p-9c7a0229.entry.js → p-e1f095dd.entry.js} +1 -1
  74. package/dist/apollo-core/{p-651b49c3.entry.js → p-e30d204d.entry.js} +1 -1
  75. package/dist/apollo-core/{p-54053547.entry.js → p-e4649020.entry.js} +1 -1
  76. package/dist/apollo-core/{p-9c41d07f.entry.js → p-ebe6a1d6.entry.js} +1 -1
  77. package/dist/apollo-core/{p-d3720611.entry.js → p-f0897ee2.entry.js} +1 -1
  78. package/dist/apollo-core/{p-ba85f686.entry.js → p-f13e14bd.entry.js} +1 -1
  79. package/dist/apollo-core/{p-38a6a53d.entry.js → p-f88eefaf.entry.js} +1 -1
  80. package/dist/apollo-core/{p-9832bc63.entry.js → p-fd2e7bb0.entry.js} +1 -1
  81. package/dist/cjs/apollo-core.cjs.js +1 -1
  82. package/dist/cjs/{index-EdmnG7t8.js → index-CQbPtJas.js} +1 -154
  83. package/dist/cjs/loader.cjs.js +1 -1
  84. package/dist/cjs/xpl-accordion.cjs.entry.js +1 -1
  85. package/dist/cjs/xpl-application-shell.cjs.entry.js +1 -1
  86. package/dist/cjs/xpl-avatar_3.cjs.entry.js +1 -1
  87. package/dist/cjs/xpl-backdrop.cjs.entry.js +1 -1
  88. package/dist/cjs/xpl-badge.cjs.entry.js +1 -1
  89. package/dist/cjs/xpl-banner.cjs.entry.js +1 -1
  90. package/dist/cjs/xpl-breadcrumb-item.cjs.entry.js +1 -1
  91. package/dist/cjs/xpl-breadcrumbs.cjs.entry.js +1 -1
  92. package/dist/cjs/xpl-button-row.cjs.entry.js +1 -1
  93. package/dist/cjs/xpl-button.cjs.entry.js +1 -1
  94. package/dist/cjs/xpl-calendar.cjs.entry.js +2 -2
  95. package/dist/cjs/xpl-checkbox.cjs.entry.js +1 -1
  96. package/dist/cjs/xpl-choicelist.cjs.entry.js +1 -1
  97. package/dist/cjs/xpl-content-area.cjs.entry.js +1 -1
  98. package/dist/cjs/xpl-dashboard.cjs.entry.js +1 -1
  99. package/dist/cjs/xpl-data-card.cjs.entry.js +3 -3
  100. package/dist/cjs/xpl-dropdown_4.cjs.entry.js +1 -1
  101. package/dist/cjs/xpl-dynamic-table-cell.cjs.entry.js +1 -1
  102. package/dist/cjs/xpl-dynamic-table-row.cjs.entry.js +1 -1
  103. package/dist/cjs/xpl-dynamic-table.cjs.entry.js +1 -1
  104. package/dist/cjs/xpl-grid-item.cjs.entry.js +1 -1
  105. package/dist/cjs/xpl-grid.cjs.entry.js +1 -1
  106. package/dist/cjs/xpl-header-accordion.cjs.entry.js +1 -1
  107. package/dist/cjs/xpl-icon.cjs.entry.js +3 -6
  108. package/dist/cjs/xpl-input-color.cjs.entry.js +9 -9
  109. package/dist/cjs/xpl-input-phone.cjs.entry.js +1 -1
  110. package/dist/cjs/xpl-input-time.cjs.entry.js +1 -1
  111. package/dist/cjs/xpl-input_4.cjs.entry.js +4 -4
  112. package/dist/cjs/xpl-large-card.cjs.entry.js +2 -2
  113. package/dist/cjs/xpl-list-item.cjs.entry.js +1 -1
  114. package/dist/cjs/xpl-list.cjs.entry.js +3 -3
  115. package/dist/cjs/xpl-main-nav.cjs.entry.js +1 -1
  116. package/dist/cjs/xpl-modal.cjs.entry.js +1 -1
  117. package/dist/cjs/xpl-nav-header-menu.cjs.entry.js +3 -3
  118. package/dist/cjs/xpl-nav-item.cjs.entry.js +1 -1
  119. package/dist/cjs/xpl-pagination.cjs.entry.js +1 -1
  120. package/dist/cjs/xpl-panel.cjs.entry.js +1 -1
  121. package/dist/cjs/xpl-popover.cjs.entry.js +1 -1
  122. package/dist/cjs/xpl-progress-bar.cjs.entry.js +1 -1
  123. package/dist/cjs/xpl-progress-indicator.cjs.entry.js +1 -1
  124. package/dist/cjs/xpl-secondary-nav.cjs.entry.js +1 -1
  125. package/dist/cjs/xpl-select_2.cjs.entry.js +1 -1
  126. package/dist/cjs/xpl-side-nav-header-item.cjs.entry.js +1 -1
  127. package/dist/cjs/xpl-side-nav-item.cjs.entry.js +1 -1
  128. package/dist/cjs/xpl-side-nav-section.cjs.entry.js +1 -1
  129. package/dist/cjs/xpl-side-nav.cjs.entry.js +3 -3
  130. package/dist/cjs/xpl-skeleton.cjs.entry.js +1 -1
  131. package/dist/cjs/xpl-slideout.cjs.entry.js +1 -1
  132. package/dist/cjs/xpl-spotlight.cjs.entry.js +1 -1
  133. package/dist/cjs/xpl-tab-panel.cjs.entry.js +3 -3
  134. package/dist/cjs/xpl-tab.cjs.entry.js +1 -1
  135. package/dist/cjs/xpl-table-body.cjs.entry.js +1 -1
  136. package/dist/cjs/xpl-table-cell_3.cjs.entry.js +1 -1
  137. package/dist/cjs/xpl-table-footer.cjs.entry.js +1 -1
  138. package/dist/cjs/xpl-table-header.cjs.entry.js +1 -1
  139. package/dist/cjs/xpl-table-row.cjs.entry.js +1 -1
  140. package/dist/cjs/xpl-table.cjs.entry.js +1 -1
  141. package/dist/cjs/xpl-tabs.cjs.entry.js +1 -1
  142. package/dist/cjs/xpl-toast.cjs.entry.js +1 -1
  143. package/dist/cjs/xpl-toggle.cjs.entry.js +1 -1
  144. package/dist/cjs/xpl-toolbar.cjs.entry.js +1 -1
  145. package/dist/cjs/xpl-tooltip.cjs.entry.js +1 -1
  146. package/dist/cjs/xpl-top-nav-item.cjs.entry.js +3 -3
  147. package/dist/cjs/xpl-top-nav-menu.cjs.entry.js +3 -3
  148. package/dist/cjs/xpl-top-nav.cjs.entry.js +6 -6
  149. package/dist/cjs/xpl-utility-bar.cjs.entry.js +1 -1
  150. package/dist/collection/components/xpl-avatar/xpl-avatar.js +8 -8
  151. package/dist/collection/components/xpl-badge/xpl-badge.js +2 -2
  152. package/dist/collection/components/xpl-calendar/xpl-calendar.js +1 -1
  153. package/dist/collection/components/xpl-choicelist/xpl-choicelist.js +1 -1
  154. package/dist/collection/components/xpl-data-card/xpl-data-card.js +2 -2
  155. package/dist/collection/components/xpl-dropdown/xpl-dropdown-group/xpl-dropdown-group.js +1 -1
  156. package/dist/collection/components/xpl-dropdown/xpl-dropdown.js +6 -6
  157. package/dist/collection/components/xpl-icon/xpl-icon.js +2 -12
  158. package/dist/collection/components/xpl-input/xpl-input-color/xpl-input-color.js +8 -8
  159. package/dist/collection/components/xpl-input/xpl-input-date/xpl-input-date.js +3 -3
  160. package/dist/collection/components/xpl-large-card/xpl-large-card.js +1 -1
  161. package/dist/collection/components/xpl-list/xpl-list-item/xpl-list-item.js +2 -2
  162. package/dist/collection/components/xpl-list/xpl-list.js +4 -4
  163. package/dist/collection/components/xpl-popover/xpl-popover.js +2 -2
  164. package/dist/collection/components/xpl-select/xpl-select.js +1 -1
  165. package/dist/collection/components/xpl-side-nav/xpl-side-nav.js +2 -2
  166. package/dist/collection/components/xpl-spotlight/xpl-spotlight.js +4 -4
  167. package/dist/collection/components/xpl-tab/xpl-tab.js +2 -2
  168. package/dist/collection/components/xpl-tab-panel/xpl-tab-panel.js +3 -3
  169. package/dist/collection/components/xpl-table/xpl-table-header-cell/xpl-table-header-cell.js +2 -2
  170. package/dist/collection/components/xpl-table/xpl-table.js +4 -4
  171. package/dist/collection/components/xpl-tag/xpl-tag.js +4 -4
  172. package/dist/collection/components/xpl-top-nav/xpl-nav-header-menu/xpl-nav-header-menu.js +2 -2
  173. package/dist/collection/components/xpl-top-nav/xpl-top-nav-item/xpl-top-nav-item.js +2 -2
  174. package/dist/collection/components/xpl-top-nav/xpl-top-nav-menu/xpl-top-nav-menu.js +2 -2
  175. package/dist/collection/components/xpl-top-nav/xpl-top-nav.js +5 -5
  176. package/dist/components/index.js +1 -1
  177. package/dist/components/{p-Bh-U2qmp.js → p-6-DvgBzG.js} +1 -1
  178. package/dist/components/{p-DHxDWgLP.js → p-B54F4o_Z.js} +1 -1
  179. package/dist/components/{p-Cop4KmAG.js → p-BFUtaXqX.js} +1 -1
  180. package/dist/components/{p-3R1VKKds.js → p-BHRO2whA.js} +1 -1
  181. package/dist/components/{p-CZg3Gb0I.js → p-BKajYWw6.js} +1 -1
  182. package/dist/components/{p-rQFFXcXl.js → p-BU4pW_6c.js} +1 -1
  183. package/dist/components/p-B_6p2HCL.js +1 -0
  184. package/dist/components/{p-BowQ58XR.js → p-Biie85R2.js} +1 -1
  185. package/dist/components/{p-CetimlcM.js → p-CIcKTXQj.js} +1 -1
  186. package/dist/components/{p-n-yq7lf4.js → p-COq-vU2g.js} +1 -1
  187. package/dist/components/{p-ClLyaOG7.js → p-CTy7V3XS.js} +1 -1
  188. package/dist/components/{p-JjlTuq8d.js → p-Cq8V05oj.js} +1 -1
  189. package/dist/components/{p-BZrSTAV1.js → p-CthHapLu.js} +1 -1
  190. package/dist/components/{p-DbN9vTl7.js → p-DGxQJj8d.js} +1 -1
  191. package/dist/components/{p-CcPrBo53.js → p-Dn1Qsv0Y.js} +1 -1
  192. package/dist/components/{p-d4i2Qqvl.js → p-Dn6HsGUr.js} +1 -1
  193. package/dist/components/{p-BNOkHymY.js → p-DxjcChRd.js} +1 -1
  194. package/dist/components/{p-2XxO7M15.js → p-FS6KZMQV.js} +1 -1
  195. package/dist/components/{p-BWAytJnz.js → p-Fj_zi29t.js} +1 -1
  196. package/dist/components/{p-CjzUVpyd.js → p-L9wSxXlk.js} +1 -1
  197. package/dist/components/{p-DORBnmT4.js → p-ULcrhk_V.js} +1 -1
  198. package/dist/components/{p-Dl__XgUD.js → p-WTdJQHaL.js} +1 -1
  199. package/dist/components/{p-CWXfIUHo.js → p-fstojyQr.js} +1 -1
  200. package/dist/components/{p-CfZI7bBe.js → p-gs07oY0j.js} +1 -1
  201. package/dist/components/{p-sjDW_E4p.js → p-nRygucMK.js} +1 -1
  202. package/dist/components/{p-yc1qXhah.js → p-q4zX9LQ0.js} +1 -1
  203. package/dist/components/xpl-accordion.js +1 -1
  204. package/dist/components/xpl-application-shell.js +1 -1
  205. package/dist/components/xpl-avatar.js +1 -1
  206. package/dist/components/xpl-backdrop.js +1 -1
  207. package/dist/components/xpl-badge.js +1 -1
  208. package/dist/components/xpl-banner.js +1 -1
  209. package/dist/components/xpl-breadcrumb-item.js +1 -1
  210. package/dist/components/xpl-breadcrumbs.js +1 -1
  211. package/dist/components/xpl-button-row.js +1 -1
  212. package/dist/components/xpl-button.js +1 -1
  213. package/dist/components/xpl-calendar.js +1 -1
  214. package/dist/components/xpl-checkbox.js +1 -1
  215. package/dist/components/xpl-choicelist.js +1 -1
  216. package/dist/components/xpl-content-area.js +1 -1
  217. package/dist/components/xpl-dashboard.js +1 -1
  218. package/dist/components/xpl-data-card.js +1 -1
  219. package/dist/components/xpl-divider.js +1 -1
  220. package/dist/components/xpl-dropdown-group.js +1 -1
  221. package/dist/components/xpl-dropdown-heading.js +1 -1
  222. package/dist/components/xpl-dropdown-option.js +1 -1
  223. package/dist/components/xpl-dropdown.js +1 -1
  224. package/dist/components/xpl-dynamic-table-cell.js +1 -1
  225. package/dist/components/xpl-dynamic-table-row.js +1 -1
  226. package/dist/components/xpl-dynamic-table.js +1 -1
  227. package/dist/components/xpl-grid-item.js +1 -1
  228. package/dist/components/xpl-grid.js +1 -1
  229. package/dist/components/xpl-header-accordion.js +1 -1
  230. package/dist/components/xpl-icon.js +1 -1
  231. package/dist/components/xpl-input-color.js +1 -1
  232. package/dist/components/xpl-input-date.js +1 -1
  233. package/dist/components/xpl-input-file.js +1 -1
  234. package/dist/components/xpl-input-phone.js +1 -1
  235. package/dist/components/xpl-input-search.js +1 -1
  236. package/dist/components/xpl-input-time.js +1 -1
  237. package/dist/components/xpl-input.js +1 -1
  238. package/dist/components/xpl-large-card.js +1 -1
  239. package/dist/components/xpl-list-item.js +1 -1
  240. package/dist/components/xpl-list.js +1 -1
  241. package/dist/components/xpl-main-nav.js +1 -1
  242. package/dist/components/xpl-modal.js +1 -1
  243. package/dist/components/xpl-nav-header-menu.js +1 -1
  244. package/dist/components/xpl-nav-item.js +1 -1
  245. package/dist/components/xpl-pagination.js +1 -1
  246. package/dist/components/xpl-panel.js +1 -1
  247. package/dist/components/xpl-popover.js +1 -1
  248. package/dist/components/xpl-progress-bar.js +1 -1
  249. package/dist/components/xpl-progress-indicator.js +1 -1
  250. package/dist/components/xpl-radio.js +1 -1
  251. package/dist/components/xpl-secondary-nav.js +1 -1
  252. package/dist/components/xpl-select.js +1 -1
  253. package/dist/components/xpl-side-nav-header-item.js +1 -1
  254. package/dist/components/xpl-side-nav-item.js +1 -1
  255. package/dist/components/xpl-side-nav-section.js +1 -1
  256. package/dist/components/xpl-side-nav.js +1 -1
  257. package/dist/components/xpl-skeleton.js +1 -1
  258. package/dist/components/xpl-slideout.js +1 -1
  259. package/dist/components/xpl-spotlight.js +1 -1
  260. package/dist/components/xpl-tab-panel.js +1 -1
  261. package/dist/components/xpl-tab.js +1 -1
  262. package/dist/components/xpl-table-body.js +1 -1
  263. package/dist/components/xpl-table-cell.js +1 -1
  264. package/dist/components/xpl-table-footer-cell.js +1 -1
  265. package/dist/components/xpl-table-footer.js +1 -1
  266. package/dist/components/xpl-table-header-cell.js +1 -1
  267. package/dist/components/xpl-table-header.js +1 -1
  268. package/dist/components/xpl-table-row.js +1 -1
  269. package/dist/components/xpl-table.js +1 -1
  270. package/dist/components/xpl-tabs.js +1 -1
  271. package/dist/components/xpl-tag.js +1 -1
  272. package/dist/components/xpl-toast.js +1 -1
  273. package/dist/components/xpl-toggle.js +1 -1
  274. package/dist/components/xpl-toolbar.js +1 -1
  275. package/dist/components/xpl-tooltip.js +1 -1
  276. package/dist/components/xpl-top-nav-item.js +1 -1
  277. package/dist/components/xpl-top-nav-menu.js +1 -1
  278. package/dist/components/xpl-top-nav.js +1 -1
  279. package/dist/components/xpl-utility-bar.js +1 -1
  280. package/dist/docs/xpl-avatar/readme.md +1 -1
  281. package/dist/docs/xpl-dropdown/readme.md +10 -1
  282. package/dist/docs/xpl-list/readme.md +1 -1
  283. package/dist/docs/xpl-nav-item/readme.md +1 -1
  284. package/dist/docs/xpl-pagination/readme.md +1 -1
  285. package/dist/docs/xpl-secondary-nav/readme.md +4 -2
  286. package/dist/docs/xpl-toolbar/readme.md +1 -1
  287. package/dist/docs/xpl-top-nav/xpl-nav-header-menu/readme.md +1 -1
  288. package/dist/docs.json +168 -168
  289. package/dist/esm/apollo-core.js +2 -2
  290. package/dist/esm/{index-CJABLO_1.js → index-CgJEmBQY.js} +1 -154
  291. package/dist/esm/loader.js +2 -2
  292. package/dist/esm/xpl-accordion.entry.js +1 -1
  293. package/dist/esm/xpl-application-shell.entry.js +1 -1
  294. package/dist/esm/xpl-avatar_3.entry.js +1 -1
  295. package/dist/esm/xpl-backdrop.entry.js +1 -1
  296. package/dist/esm/xpl-badge.entry.js +1 -1
  297. package/dist/esm/xpl-banner.entry.js +1 -1
  298. package/dist/esm/xpl-breadcrumb-item.entry.js +1 -1
  299. package/dist/esm/xpl-breadcrumbs.entry.js +1 -1
  300. package/dist/esm/xpl-button-row.entry.js +1 -1
  301. package/dist/esm/xpl-button.entry.js +1 -1
  302. package/dist/esm/xpl-calendar.entry.js +2 -2
  303. package/dist/esm/xpl-checkbox.entry.js +1 -1
  304. package/dist/esm/xpl-choicelist.entry.js +1 -1
  305. package/dist/esm/xpl-content-area.entry.js +1 -1
  306. package/dist/esm/xpl-dashboard.entry.js +1 -1
  307. package/dist/esm/xpl-data-card.entry.js +3 -3
  308. package/dist/esm/xpl-dropdown_4.entry.js +1 -1
  309. package/dist/esm/xpl-dynamic-table-cell.entry.js +1 -1
  310. package/dist/esm/xpl-dynamic-table-row.entry.js +1 -1
  311. package/dist/esm/xpl-dynamic-table.entry.js +1 -1
  312. package/dist/esm/xpl-grid-item.entry.js +1 -1
  313. package/dist/esm/xpl-grid.entry.js +1 -1
  314. package/dist/esm/xpl-header-accordion.entry.js +1 -1
  315. package/dist/esm/xpl-icon.entry.js +3 -6
  316. package/dist/esm/xpl-input-color.entry.js +9 -9
  317. package/dist/esm/xpl-input-phone.entry.js +1 -1
  318. package/dist/esm/xpl-input-time.entry.js +1 -1
  319. package/dist/esm/xpl-input_4.entry.js +4 -4
  320. package/dist/esm/xpl-large-card.entry.js +2 -2
  321. package/dist/esm/xpl-list-item.entry.js +1 -1
  322. package/dist/esm/xpl-list.entry.js +3 -3
  323. package/dist/esm/xpl-main-nav.entry.js +1 -1
  324. package/dist/esm/xpl-modal.entry.js +1 -1
  325. package/dist/esm/xpl-nav-header-menu.entry.js +3 -3
  326. package/dist/esm/xpl-nav-item.entry.js +1 -1
  327. package/dist/esm/xpl-pagination.entry.js +1 -1
  328. package/dist/esm/xpl-panel.entry.js +1 -1
  329. package/dist/esm/xpl-popover.entry.js +1 -1
  330. package/dist/esm/xpl-progress-bar.entry.js +1 -1
  331. package/dist/esm/xpl-progress-indicator.entry.js +1 -1
  332. package/dist/esm/xpl-secondary-nav.entry.js +1 -1
  333. package/dist/esm/xpl-select_2.entry.js +1 -1
  334. package/dist/esm/xpl-side-nav-header-item.entry.js +1 -1
  335. package/dist/esm/xpl-side-nav-item.entry.js +1 -1
  336. package/dist/esm/xpl-side-nav-section.entry.js +1 -1
  337. package/dist/esm/xpl-side-nav.entry.js +3 -3
  338. package/dist/esm/xpl-skeleton.entry.js +1 -1
  339. package/dist/esm/xpl-slideout.entry.js +1 -1
  340. package/dist/esm/xpl-spotlight.entry.js +1 -1
  341. package/dist/esm/xpl-tab-panel.entry.js +3 -3
  342. package/dist/esm/xpl-tab.entry.js +1 -1
  343. package/dist/esm/xpl-table-body.entry.js +1 -1
  344. package/dist/esm/xpl-table-cell_3.entry.js +1 -1
  345. package/dist/esm/xpl-table-footer.entry.js +1 -1
  346. package/dist/esm/xpl-table-header.entry.js +1 -1
  347. package/dist/esm/xpl-table-row.entry.js +1 -1
  348. package/dist/esm/xpl-table.entry.js +1 -1
  349. package/dist/esm/xpl-tabs.entry.js +1 -1
  350. package/dist/esm/xpl-toast.entry.js +1 -1
  351. package/dist/esm/xpl-toggle.entry.js +1 -1
  352. package/dist/esm/xpl-toolbar.entry.js +1 -1
  353. package/dist/esm/xpl-tooltip.entry.js +1 -1
  354. package/dist/esm/xpl-top-nav-item.entry.js +3 -3
  355. package/dist/esm/xpl-top-nav-menu.entry.js +3 -3
  356. package/dist/esm/xpl-top-nav.entry.js +6 -6
  357. package/dist/esm/xpl-utility-bar.entry.js +1 -1
  358. package/hydrate/index.js +35 -145
  359. package/hydrate/index.mjs +35 -145
  360. package/package.json +11 -11
  361. package/dist/apollo-core/p-CJABLO_1.js +0 -3
  362. package/dist/apollo-core/p-a2c3a38a.entry.js +0 -1
  363. package/dist/apollo-core/p-ec99c433.entry.js +0 -1
  364. package/dist/collection/components/xpl-icon/xpl-icon.css +0 -5
  365. package/dist/components/p-BqhTjJWq.js +0 -1
  366. /package/dist/{utils → collection/utils}/form-bindings.js +0 -0
  367. /package/dist/{utils → collection/utils}/story-vrt.js +0 -0
  368. /package/dist/types/{third-party.d.ts → types/third-party.d.ts} +0 -0
  369. /package/dist/types/{home/runner/work/apollo/apollo/packages/apollo-core/.stencil/utils → utils}/form-bindings.d.ts +0 -0
  370. /package/dist/types/{home/runner/work/apollo/apollo/packages/apollo-core/.stencil/utils → utils}/story-vrt.d.ts +0 -0
@@ -1 +1 @@
1
- import{p as t,H as e,d as s,f as i,h as a,c as o,t as n}from"./p-BqhTjJWq.js";import{i as h}from"./p-Dqb1pIRo.js";import{d}from"./p-BNOkHymY.js";import{d as c}from"./p-CfZI7bBe.js";import{d as r}from"./p-Bh-U2qmp.js";const l=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.openChange=s(this,"openChange",7),this.drawerClosing=!1,this.hasHeaderSlot=!1,this.open=!1,this.onViewportChange=()=>{this.clearCloseTransition(),this.syncDocKeyDownListener()},this.focusToggleAfterClose=()=>{this.isBelowMdBreakpoint()&&(void 0!==this.toggleFocusTimeoutId&&clearTimeout(this.toggleFocusTimeoutId),this.toggleFocusTimeoutId=setTimeout((()=>{this.toggleFocusTimeoutId=void 0,this.el.querySelector(".xpl-side-nav__toggle button")?.focus()}),0))},this.focusDrawerOnOpen=()=>{this.isBelowMdBreakpoint()&&(void 0!==this.drawerFocusTimeoutId&&clearTimeout(this.drawerFocusTimeoutId),this.drawerFocusTimeoutId=setTimeout((()=>{this.drawerFocusTimeoutId=void 0;const t=this.el.querySelector(".xpl-side-nav__wrapper"),e=t?this.getFocusableElements().find((e=>t.contains(e))):void 0,s=this.el.querySelector(".xpl-side-nav__toggle button");(e??s)?.focus()}),0))},this.onBackdropClick=()=>this.setOpenState(!1),this.onDocKeyDown=t=>{if(this.isMobileDrawerActive()&&!this.shouldYieldFocusToExternalModal())switch(t.key.toLowerCase()){case"escape":if(!this.open)return;if(this.anyDescendantPopoverIsOpen())return;return t.preventDefault(),t.stopPropagation(),void this.setOpenState(!1);case"tab":this.trapTabKey(t)}},this.onToggleClick=()=>this.setOpenState(!this.open)}onOpenChanged(t,e){e&&!t&&this.isBelowMdBreakpoint()?(this.drawerClosing=!0,void 0!==this.closeTransitionTimeoutId&&clearTimeout(this.closeTransitionTimeoutId),this.closeTransitionTimeoutId=setTimeout((()=>{this.closeTransitionTimeoutId=void 0,this.drawerClosing=!1,this.syncDocKeyDownListener()}),600)):this.clearCloseTransition(),this.syncDocKeyDownListener(),e&&!t&&this.focusToggleAfterClose(),!e&&t&&this.focusDrawerOnOpen()}connectedCallback(){h()&&"function"==typeof window.matchMedia&&(this.mobileMq=window.matchMedia("(max-width: 767px)"),this.mobileMq.addEventListener("change",this.onViewportChange)),this.syncDocKeyDownListener(),this.syncHeaderSlot(),this.connectHeaderSlotObserver()}componentWillLoad(){this.syncHeaderSlot()}componentWillRender(){this.disconnectHeaderSlotObserver()}componentDidRender(){this.scheduleHeaderSlotSync()}componentDidLoad(){this.open&&(this.syncDocKeyDownListener(),this.focusDrawerOnOpen())}disconnectedCallback(){void 0!==this.toggleFocusTimeoutId&&(clearTimeout(this.toggleFocusTimeoutId),this.toggleFocusTimeoutId=void 0),void 0!==this.drawerFocusTimeoutId&&(clearTimeout(this.drawerFocusTimeoutId),this.drawerFocusTimeoutId=void 0),this.clearCloseTransition(),this.mobileMq?.removeEventListener("change",this.onViewportChange),this.mobileMq=void 0,this.removeDocKeyDownListener(),void 0!==this.headerSlotSyncTimeoutId&&(clearTimeout(this.headerSlotSyncTimeoutId),this.headerSlotSyncTimeoutId=void 0),this.disconnectHeaderSlotObserver()}async toggle(){this.setOpenState(!this.open)}async setOpen(t){this.setOpenState(t)}removeDocKeyDownListener(){this.el.ownerDocument.removeEventListener("keydown",this.onDocKeyDown,!1)}syncDocKeyDownListener(){this.removeDocKeyDownListener(),this.isMobileDrawerActive()&&this.el.ownerDocument.addEventListener("keydown",this.onDocKeyDown,!1)}isBelowMdBreakpoint(){return this.mobileMq?.matches??!1}isMobileDrawerActive(){return(this.open||this.drawerClosing)&&this.isBelowMdBreakpoint()}clearCloseTransition(){void 0!==this.closeTransitionTimeoutId&&(clearTimeout(this.closeTransitionTimeoutId),this.closeTransitionTimeoutId=void 0),this.drawerClosing=!1}shouldYieldFocusToExternalModal(){const t=this.el.ownerDocument.activeElement;return!(!t||this.el.contains(t))&&null!==t.closest('[aria-modal="true"]')}anyDescendantPopoverIsOpen(){const t=this.el.querySelectorAll("xpl-popover");for(let e=0;e<t.length;e+=1){const s=t[e].querySelector(".xpl-popover");if(s?.classList.contains("xpl-popover--is-open"))return!0}return!1}setOpenState(t){const e=this.open;t!==e&&(this.open=t,this.openChange.emit(t),e&&!t&&this.focusToggleAfterClose())}getFocusableElements(){const t=this.el.ownerDocument.activeElement;return Array.from(this.el.querySelectorAll('button:not([disabled]), a[href]:not([tabindex="-1"]), input:not([disabled]), [tabindex]:not([tabindex="-1"])')).filter((e=>!e.closest("[inert]")&&(null!==e.offsetParent||e===t)))}trapTabKey(t){if(this.shouldYieldFocusToExternalModal())return;const e=this.getFocusableElements();if(0===e.length)return;const s=e[0],i=e[e.length-1],a=this.el.ownerDocument.activeElement;t.shiftKey?a!==s&&this.el.contains(a)||(t.preventDefault(),i.focus()):a!==i&&this.el.contains(a)||(t.preventDefault(),s.focus())}connectHeaderSlotObserver(){this.disconnectHeaderSlotObserver(),"undefined"!=typeof MutationObserver&&(this.headerSlotObserver=new MutationObserver((()=>{this.scheduleHeaderSlotSync()})),this.headerSlotObserver.observe(this.el,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["slot"]}))}disconnectHeaderSlotObserver(){this.headerSlotObserver?.disconnect(),this.headerSlotObserver=void 0}scheduleHeaderSlotSync(){void 0!==this.headerSlotSyncTimeoutId&&clearTimeout(this.headerSlotSyncTimeoutId),this.headerSlotSyncTimeoutId=setTimeout((()=>{this.headerSlotSyncTimeoutId=void 0,this.el.isConnected&&(this.syncHeaderSlot(),this.connectHeaderSlotObserver())}),0)}syncHeaderSlot(){const t=Array.from(this.el.querySelectorAll('[slot="nav-header"]')).filter((t=>t.closest("xpl-side-nav")===this.el&&(t.parentElement===this.el||null!==t.closest(".xpl-side-nav__header")))),e=t.length>0;e===this.hasHeaderSlot?e&&t.some((t=>t.parentElement===this.el))&&i(this):this.hasHeaderSlot=e}render(){return a(o,{key:"8cffb32c21217edd67117acb264f3df5587fa32d",class:{"xpl-side-nav":!0,"xpl-side-nav--open":this.open}},a("xpl-button",{key:"5a82bbc6a65690f550fe192aa6cd593efbf86bc8",class:"xpl-side-nav__toggle",variant:"tertiary",iconOnly:!0,icon:this.open?"sidebar-left-hide":"sidebar-left-show","aria-expanded":this.open?"true":"false","aria-label":this.open?"Close navigation menu":"Open navigation menu",onClick:this.onToggleClick}),a("div",{key:"1315f34c7a6e1c793cc347292117f2e5992f074d",class:"xpl-side-nav__wrapper"},a("nav",{key:"4b7446999c74b1554dae84d04c439a75b712b429",class:"xpl-side-nav__content","aria-label":this.label},a("div",{key:"bce43018bf61c73dde0adb053fa87d0789edd329",class:"xpl-side-nav__scroll-area"},this.hasHeaderSlot&&a("div",{key:"d70ecd07a6c71dd76ce162b9167d3b5a11ba4ea8",class:"xpl-side-nav__header"},a("slot",{key:"c9d10e57d77a69cf00e86c2a17a94eba5e54d23e",name:"nav-header"})),a("div",{key:"6873372f5eb854ee7ef88e6d3085d81be62fc508",class:"xpl-side-nav__section"},a("slot",{key:"b07fdb332e8ccaaa69db61ade9bb88e43d6f8753",name:"section"}))),a("div",{key:"f34e444c538cbf246aee52ebfe35657a8fa1d706",class:"xpl-side-nav__footer"},a("slot",{key:"da70c80d9378ad1e0dbf23d33d521021c346ee23",name:"nav-footer"})))),a("xpl-backdrop",{key:"769576cb0961b8a00308c748d0efbaa0ef2b3ca5",class:"xpl-side-nav__backdrop",onClick:this.onBackdropClick}))}get el(){return this}static get watchers(){return{open:[{onOpenChanged:0}]}}},[260,"xpl-side-nav",{label:[1],open:[1540],hasHeaderSlot:[32],toggle:[64],setOpen:[64]},void 0,{open:[{onOpenChanged:0}]}]),p=l,b=function(){"undefined"!=typeof customElements&&["xpl-side-nav","xpl-backdrop","xpl-button","xpl-icon"].forEach((t=>{switch(t){case"xpl-side-nav":customElements.get(n(t))||customElements.define(n(t),l);break;case"xpl-backdrop":customElements.get(n(t))||d();break;case"xpl-button":customElements.get(n(t))||c();break;case"xpl-icon":customElements.get(n(t))||r()}}))};export{p as XplSideNav,b as defineCustomElement}
1
+ import{p as t,H as e,d as s,f as i,h as a,c as o,t as n}from"./p-B_6p2HCL.js";import{i as h}from"./p-Dqb1pIRo.js";import{d}from"./p-DxjcChRd.js";import{d as c}from"./p-gs07oY0j.js";import{d as r}from"./p-6-DvgBzG.js";const l=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.openChange=s(this,"openChange",7),this.drawerClosing=!1,this.hasHeaderSlot=!1,this.open=!1,this.onViewportChange=()=>{this.clearCloseTransition(),this.syncDocKeyDownListener()},this.focusToggleAfterClose=()=>{this.isBelowMdBreakpoint()&&(void 0!==this.toggleFocusTimeoutId&&clearTimeout(this.toggleFocusTimeoutId),this.toggleFocusTimeoutId=setTimeout((()=>{this.toggleFocusTimeoutId=void 0,this.el.querySelector(".xpl-side-nav__toggle button")?.focus()}),0))},this.focusDrawerOnOpen=()=>{this.isBelowMdBreakpoint()&&(void 0!==this.drawerFocusTimeoutId&&clearTimeout(this.drawerFocusTimeoutId),this.drawerFocusTimeoutId=setTimeout((()=>{this.drawerFocusTimeoutId=void 0;const t=this.el.querySelector(".xpl-side-nav__wrapper"),e=t?this.getFocusableElements().find((e=>t.contains(e))):void 0,s=this.el.querySelector(".xpl-side-nav__toggle button");(e??s)?.focus()}),0))},this.onBackdropClick=()=>this.setOpenState(!1),this.onDocKeyDown=t=>{if(this.isMobileDrawerActive()&&!this.shouldYieldFocusToExternalModal())switch(t.key.toLowerCase()){case"escape":if(!this.open)return;if(this.anyDescendantPopoverIsOpen())return;return t.preventDefault(),t.stopPropagation(),void this.setOpenState(!1);case"tab":this.trapTabKey(t)}},this.onToggleClick=()=>this.setOpenState(!this.open)}onOpenChanged(t,e){e&&!t&&this.isBelowMdBreakpoint()?(this.drawerClosing=!0,void 0!==this.closeTransitionTimeoutId&&clearTimeout(this.closeTransitionTimeoutId),this.closeTransitionTimeoutId=setTimeout((()=>{this.closeTransitionTimeoutId=void 0,this.drawerClosing=!1,this.syncDocKeyDownListener()}),600)):this.clearCloseTransition(),this.syncDocKeyDownListener(),e&&!t&&this.focusToggleAfterClose(),!e&&t&&this.focusDrawerOnOpen()}connectedCallback(){h()&&"function"==typeof window.matchMedia&&(this.mobileMq=window.matchMedia("(max-width: 767px)"),this.mobileMq.addEventListener("change",this.onViewportChange)),this.syncDocKeyDownListener(),this.syncHeaderSlot(),this.connectHeaderSlotObserver()}componentWillLoad(){this.syncHeaderSlot()}componentWillRender(){this.disconnectHeaderSlotObserver()}componentDidRender(){this.scheduleHeaderSlotSync()}componentDidLoad(){this.open&&(this.syncDocKeyDownListener(),this.focusDrawerOnOpen())}disconnectedCallback(){void 0!==this.toggleFocusTimeoutId&&(clearTimeout(this.toggleFocusTimeoutId),this.toggleFocusTimeoutId=void 0),void 0!==this.drawerFocusTimeoutId&&(clearTimeout(this.drawerFocusTimeoutId),this.drawerFocusTimeoutId=void 0),this.clearCloseTransition(),this.mobileMq?.removeEventListener("change",this.onViewportChange),this.mobileMq=void 0,this.removeDocKeyDownListener(),void 0!==this.headerSlotSyncTimeoutId&&(clearTimeout(this.headerSlotSyncTimeoutId),this.headerSlotSyncTimeoutId=void 0),this.disconnectHeaderSlotObserver()}async toggle(){this.setOpenState(!this.open)}async setOpen(t){this.setOpenState(t)}removeDocKeyDownListener(){this.el.ownerDocument.removeEventListener("keydown",this.onDocKeyDown,!1)}syncDocKeyDownListener(){this.removeDocKeyDownListener(),this.isMobileDrawerActive()&&this.el.ownerDocument.addEventListener("keydown",this.onDocKeyDown,!1)}isBelowMdBreakpoint(){return this.mobileMq?.matches??!1}isMobileDrawerActive(){return(this.open||this.drawerClosing)&&this.isBelowMdBreakpoint()}clearCloseTransition(){void 0!==this.closeTransitionTimeoutId&&(clearTimeout(this.closeTransitionTimeoutId),this.closeTransitionTimeoutId=void 0),this.drawerClosing=!1}shouldYieldFocusToExternalModal(){const t=this.el.ownerDocument.activeElement;return!(!t||this.el.contains(t))&&null!==t.closest('[aria-modal="true"]')}anyDescendantPopoverIsOpen(){const t=this.el.querySelectorAll("xpl-popover");for(let e=0;e<t.length;e+=1){const s=t[e].querySelector(".xpl-popover");if(s?.classList.contains("xpl-popover--is-open"))return!0}return!1}setOpenState(t){const e=this.open;t!==e&&(this.open=t,this.openChange.emit(t),e&&!t&&this.focusToggleAfterClose())}getFocusableElements(){const t=this.el.ownerDocument.activeElement;return Array.from(this.el.querySelectorAll('button:not([disabled]), a[href]:not([tabindex="-1"]), input:not([disabled]), [tabindex]:not([tabindex="-1"])')).filter((e=>!e.closest("[inert]")&&(null!==e.offsetParent||e===t)))}trapTabKey(t){if(this.shouldYieldFocusToExternalModal())return;const e=this.getFocusableElements();if(0===e.length)return;const s=e[0],i=e[e.length-1],a=this.el.ownerDocument.activeElement;t.shiftKey?a!==s&&this.el.contains(a)||(t.preventDefault(),i.focus()):a!==i&&this.el.contains(a)||(t.preventDefault(),s.focus())}connectHeaderSlotObserver(){this.disconnectHeaderSlotObserver(),"undefined"!=typeof MutationObserver&&(this.headerSlotObserver=new MutationObserver((()=>{this.scheduleHeaderSlotSync()})),this.headerSlotObserver.observe(this.el,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["slot"]}))}disconnectHeaderSlotObserver(){this.headerSlotObserver?.disconnect(),this.headerSlotObserver=void 0}scheduleHeaderSlotSync(){void 0!==this.headerSlotSyncTimeoutId&&clearTimeout(this.headerSlotSyncTimeoutId),this.headerSlotSyncTimeoutId=setTimeout((()=>{this.headerSlotSyncTimeoutId=void 0,this.el.isConnected&&(this.syncHeaderSlot(),this.connectHeaderSlotObserver())}),0)}syncHeaderSlot(){const t=Array.from(this.el.querySelectorAll('[slot="nav-header"]')).filter((t=>t.closest("xpl-side-nav")===this.el&&(t.parentElement===this.el||null!==t.closest(".xpl-side-nav__header")))),e=t.length>0;e===this.hasHeaderSlot?e&&t.some((t=>t.parentElement===this.el))&&i(this):this.hasHeaderSlot=e}render(){return a(o,{key:"796d10dd1b98d02af5a72757db33adcbccc6ba8f",class:{"xpl-side-nav":!0,"xpl-side-nav--open":this.open}},a("xpl-button",{key:"94217602d9df6b196ff624d73c90cbd8d177c207",class:"xpl-side-nav__toggle",variant:"tertiary",iconOnly:!0,icon:this.open?"sidebar-left-hide":"sidebar-left-show","aria-expanded":this.open?"true":"false","aria-label":this.open?"Close navigation menu":"Open navigation menu",onClick:this.onToggleClick}),a("div",{key:"79cbb696b79ee474f95f50de939dc1b8abee1185",class:"xpl-side-nav__wrapper"},a("nav",{key:"3222db09f9172b69a7ff7a23bc62887f97dedc57",class:"xpl-side-nav__content","aria-label":this.label},a("div",{key:"b229c6451e0eac9c620215355209e8168b1a90b7",class:"xpl-side-nav__scroll-area"},this.hasHeaderSlot&&a("div",{key:"9c008d9a405726b0ea417158b9fc3f3037176d91",class:"xpl-side-nav__header"},a("slot",{key:"e63409cc07440d56fba5c07bce7ec1720a48c103",name:"nav-header"})),a("div",{key:"eed607668a9ee58af8a855d602d2bf71fea2ad2c",class:"xpl-side-nav__section"},a("slot",{key:"df7a877af24b54d9e8fdc885121c680b3e9b76e4",name:"section"}))),a("div",{key:"73302b7bc43f612ed0257f42ed5138238a8a1ebc",class:"xpl-side-nav__footer"},a("slot",{key:"fb71041ebb895e8030b1ac3984cbea67244b622b",name:"nav-footer"})))),a("xpl-backdrop",{key:"69487adfe2fc2e30d6640209693cb4b8e29ce1e6",class:"xpl-side-nav__backdrop",onClick:this.onBackdropClick}))}get el(){return this}static get watchers(){return{open:[{onOpenChanged:0}]}}},[260,"xpl-side-nav",{label:[1],open:[1540],hasHeaderSlot:[32],toggle:[64],setOpen:[64]},void 0,{open:[{onOpenChanged:0}]}]),p=l,b=function(){"undefined"!=typeof customElements&&["xpl-side-nav","xpl-backdrop","xpl-button","xpl-icon"].forEach((t=>{switch(t){case"xpl-side-nav":customElements.get(n(t))||customElements.define(n(t),l);break;case"xpl-backdrop":customElements.get(n(t))||d();break;case"xpl-button":customElements.get(n(t))||c();break;case"xpl-icon":customElements.get(n(t))||r()}}))};export{p as XplSideNav,b as defineCustomElement}
@@ -1 +1 @@
1
- import{p as s,H as e,h as t,t as l,c as i}from"./p-BqhTjJWq.js";const h=s(class extends e{constructor(s){super(),!1!==s&&this.__registerHost(),this.shape="rectangle",this.size="custom"}render(){return t(i,{key:"faa4173a2910d1dc3943fca5e7efbf5d1805aa9b",class:{"xpl-skeleton":!0,["xpl-skeleton--shape-"+this.shape]:!0,["xpl-skeleton--size-"+this.size]:!0,[this.classNames??""]:!!this.classNames,"xpl-skeleton--full-width":!!this.fullWidth},style:{width:this.width||void 0,height:this.height||void 0,margin:this.margin||void 0}})}},[0,"xpl-skeleton",{classNames:[1,"class-names"],fullWidth:[4,"full-width"],height:[1],width:[1],margin:[1],shape:[1],size:[1]}]),n=h,o=function(){"undefined"!=typeof customElements&&["xpl-skeleton"].forEach((s=>{"xpl-skeleton"===s&&(customElements.get(l(s))||customElements.define(l(s),h))}))};export{n as XplSkeleton,o as defineCustomElement}
1
+ import{p as s,H as e,h as t,t as l,c as i}from"./p-B_6p2HCL.js";const n=s(class extends e{constructor(s){super(),!1!==s&&this.__registerHost(),this.shape="rectangle",this.size="custom"}render(){return t(i,{key:"faa4173a2910d1dc3943fca5e7efbf5d1805aa9b",class:{"xpl-skeleton":!0,["xpl-skeleton--shape-"+this.shape]:!0,["xpl-skeleton--size-"+this.size]:!0,[this.classNames??""]:!!this.classNames,"xpl-skeleton--full-width":!!this.fullWidth},style:{width:this.width||void 0,height:this.height||void 0,margin:this.margin||void 0}})}},[0,"xpl-skeleton",{classNames:[1,"class-names"],fullWidth:[4,"full-width"],height:[1],width:[1],margin:[1],shape:[1],size:[1]}]),h=n,o=function(){"undefined"!=typeof customElements&&["xpl-skeleton"].forEach((s=>{"xpl-skeleton"===s&&(customElements.get(l(s))||customElements.define(l(s),n))}))};export{h as XplSkeleton,o as defineCustomElement}
@@ -1 +1 @@
1
- import{p as e,H as a,d as s,h as c,c as d,t}from"./p-BqhTjJWq.js";import{d as o}from"./p-BNOkHymY.js";import{d as i}from"./p-CfZI7bBe.js";import{d as b}from"./p-CetimlcM.js";import{d as l}from"./p-Bh-U2qmp.js";const r=e(class extends a{constructor(e){super(),!1!==e&&this.__registerHost(),this.isOpenChange=s(this,"isOpenChange",7),this.isOpen=!1,this.backdrop=!1,this.variant="default",this.showFooter=!0,this.handleClose=()=>{this.isOpen=!1}}watchPropHandler(e){this.isOpen=e,this.isOpenChange.emit(e)}handleScroll(){const e=this.el.querySelector(".content");e&&(e.scrollHeight>e.clientHeight?e.classList.add("has-shadow"):e.classList.remove("has-shadow"))}componentDidLoad(){this.handleScroll()}render(){return c(d,{key:"057b30a3213ae419e0a9bc94cae621cdf303d293",class:"xpl-slideout"},this.backdrop&&this.isOpen&&c("xpl-backdrop",{key:"940911dc6c07731fe40c0a4399cd81a3af7933ee",onClick:this.handleClose}),c("aside",{key:"b3432b92753b96999c528783cebfabd1488141be",class:"slideout slideout--"+(!this.isOpen&&"closed")},c("header",{key:"d87ec6cd3b3085131dd4bb6f2524e0ae39d36201",class:"header"},c("div",{key:"e2e3387ad686479d91810c022d657f44f97b1aeb",class:"title"},c("slot",{key:"c3accb74528dbd73140aa2b9b7c2e4e7f8013a6a",name:"title"}),c("xpl-button",{key:"ee486da9662bddb85e336edc01d878c2b4ade2cc",class:"close-button","icon-only":!0,variant:"tertiary",onClick:this.handleClose},c("xpl-icon",{key:"5e8b248e39e238e6ba2138641029bdde3160512e",icon:"xmark"}))),c("div",{key:"0bd2f149ba999ac0c8501d538298c2f5d4bfa687",class:"subtitle"},c("slot",{key:"0523c0ea9575ff905e78893723e7d6329befc9d9",name:"subtitle"})),c("div",{key:"d2de0a7b462fadfc9d80479db1153300abe0180f",class:"search"},c("slot",{key:"d0463af8f532856bdc273e306f06f7d837f41ffd",name:"search"}))),c("xpl-divider",{key:"9e3de6ccca99ab37bfeda29adbe343663f38ebef",tier:0,class:"divider top"}),c("article",{key:"0cf827d89aca95c2a0b0e5f037d12a00de651866",class:"content",tabIndex:0},c("slot",{key:"6738c288b5ccaa437efed62b8fd786cd58073b27",name:"content"})),this.showFooter&&c("footer",{key:"cf02d04cd0b1ce89e4783c5b4741e8b5fad739e8"},c("xpl-divider",{key:"9d79e51a52e5daed07bcb2ed7229f41926958594",tier:0,class:"divider bottom"}),c("div",{key:"fdbd1f126350e6b5b9bbad8a15bcc70cb9e562a3",class:"footer"},c("slot",{key:"994b27f63fab2d9ad45c50862c07239492a8404c",name:"tertiary"}),c("slot",{key:"ccd6bfc3f66e98dbb07a54a5e523b4365e8c1633",name:"secondary"}),c("slot",{key:"40dfa4f9fffecfd8a3c01be593de504b0d7e7f7e",name:"primary"})))))}get el(){return this}static get watchers(){return{isOpen:[{watchPropHandler:0}]}}},[260,"xpl-slideout",{isOpen:[1540,"is-open"],backdrop:[4],variant:[1],showFooter:[4,"show-footer"]},[[9,"scroll","handleScroll"]],{isOpen:[{watchPropHandler:0}]}]),n=r,f=function(){"undefined"!=typeof customElements&&["xpl-slideout","xpl-backdrop","xpl-button","xpl-divider","xpl-icon"].forEach((e=>{switch(e){case"xpl-slideout":customElements.get(t(e))||customElements.define(t(e),r);break;case"xpl-backdrop":customElements.get(t(e))||o();break;case"xpl-button":customElements.get(t(e))||i();break;case"xpl-divider":customElements.get(t(e))||b();break;case"xpl-icon":customElements.get(t(e))||l()}}))};export{n as XplSlideout,f as defineCustomElement}
1
+ import{p as e,H as a,d as s,h as c,c as d,t}from"./p-B_6p2HCL.js";import{d as o}from"./p-DxjcChRd.js";import{d as i}from"./p-gs07oY0j.js";import{d as b}from"./p-CIcKTXQj.js";import{d as l}from"./p-6-DvgBzG.js";const r=e(class extends a{constructor(e){super(),!1!==e&&this.__registerHost(),this.isOpenChange=s(this,"isOpenChange",7),this.isOpen=!1,this.backdrop=!1,this.variant="default",this.showFooter=!0,this.handleClose=()=>{this.isOpen=!1}}watchPropHandler(e){this.isOpen=e,this.isOpenChange.emit(e)}handleScroll(){const e=this.el.querySelector(".content");e&&(e.scrollHeight>e.clientHeight?e.classList.add("has-shadow"):e.classList.remove("has-shadow"))}componentDidLoad(){this.handleScroll()}render(){return c(d,{key:"057b30a3213ae419e0a9bc94cae621cdf303d293",class:"xpl-slideout"},this.backdrop&&this.isOpen&&c("xpl-backdrop",{key:"940911dc6c07731fe40c0a4399cd81a3af7933ee",onClick:this.handleClose}),c("aside",{key:"b3432b92753b96999c528783cebfabd1488141be",class:"slideout slideout--"+(!this.isOpen&&"closed")},c("header",{key:"d87ec6cd3b3085131dd4bb6f2524e0ae39d36201",class:"header"},c("div",{key:"e2e3387ad686479d91810c022d657f44f97b1aeb",class:"title"},c("slot",{key:"c3accb74528dbd73140aa2b9b7c2e4e7f8013a6a",name:"title"}),c("xpl-button",{key:"ee486da9662bddb85e336edc01d878c2b4ade2cc",class:"close-button","icon-only":!0,variant:"tertiary",onClick:this.handleClose},c("xpl-icon",{key:"5e8b248e39e238e6ba2138641029bdde3160512e",icon:"xmark"}))),c("div",{key:"0bd2f149ba999ac0c8501d538298c2f5d4bfa687",class:"subtitle"},c("slot",{key:"0523c0ea9575ff905e78893723e7d6329befc9d9",name:"subtitle"})),c("div",{key:"d2de0a7b462fadfc9d80479db1153300abe0180f",class:"search"},c("slot",{key:"d0463af8f532856bdc273e306f06f7d837f41ffd",name:"search"}))),c("xpl-divider",{key:"9e3de6ccca99ab37bfeda29adbe343663f38ebef",tier:0,class:"divider top"}),c("article",{key:"0cf827d89aca95c2a0b0e5f037d12a00de651866",class:"content",tabIndex:0},c("slot",{key:"6738c288b5ccaa437efed62b8fd786cd58073b27",name:"content"})),this.showFooter&&c("footer",{key:"cf02d04cd0b1ce89e4783c5b4741e8b5fad739e8"},c("xpl-divider",{key:"9d79e51a52e5daed07bcb2ed7229f41926958594",tier:0,class:"divider bottom"}),c("div",{key:"fdbd1f126350e6b5b9bbad8a15bcc70cb9e562a3",class:"footer"},c("slot",{key:"994b27f63fab2d9ad45c50862c07239492a8404c",name:"tertiary"}),c("slot",{key:"ccd6bfc3f66e98dbb07a54a5e523b4365e8c1633",name:"secondary"}),c("slot",{key:"40dfa4f9fffecfd8a3c01be593de504b0d7e7f7e",name:"primary"})))))}get el(){return this}static get watchers(){return{isOpen:[{watchPropHandler:0}]}}},[260,"xpl-slideout",{isOpen:[1540,"is-open"],backdrop:[4],variant:[1],showFooter:[4,"show-footer"]},[[9,"scroll","handleScroll"]],{isOpen:[{watchPropHandler:0}]}]),n=r,f=function(){"undefined"!=typeof customElements&&["xpl-slideout","xpl-backdrop","xpl-button","xpl-divider","xpl-icon"].forEach((e=>{switch(e){case"xpl-slideout":customElements.get(t(e))||customElements.define(t(e),r);break;case"xpl-backdrop":customElements.get(t(e))||o();break;case"xpl-button":customElements.get(t(e))||i();break;case"xpl-divider":customElements.get(t(e))||b();break;case"xpl-icon":customElements.get(t(e))||l()}}))};export{n as XplSlideout,f as defineCustomElement}
@@ -1 +1 @@
1
- import{p as t,H as i,d as s,f as h,h as o,c as e,t as n}from"./p-BqhTjJWq.js";import{i as l}from"./p-Dqb1pIRo.js";import{c as a,a as r,o as p,f as c,s as d}from"./p-1M1pu0C2.js";import{d as u}from"./p-CfZI7bBe.js";import{d as g}from"./p-Bh-U2qmp.js";const m=".xpl-spotlight__dismiss button, .xpl-spotlight__actions button";let f=0;const x={"top-left":"top-start","top-right":"top-end","bottom-left":"bottom-start","bottom-right":"bottom-end"},b={top:"bottom-left","top-start":"bottom-left","top-end":"bottom-right",bottom:"top-left","bottom-start":"top-left","bottom-end":"top-right",left:"top-right","left-start":"top-right","left-end":"bottom-right",right:"top-left","right-start":"top-left","right-end":"bottom-left"},y=t(class t extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.dismiss=s(this,"dismiss",7),this.primaryAction=s(this,"primaryAction",7),this.secondaryAction=s(this,"secondaryAction",7),this.targetClick=s(this,"targetClick",7),this.cleanupAutoUpdate=null,this.enterVisibleFrameId=null,this.focusFrameId=null,this.hasCompletedInitialLoad=!1,this.headingId=(f+=1,"xpl-spotlight-heading-"+f),this.pendingEnterTransitionAfterAnchor=!1,this.pendingEnterVisible=!1,this.positioningGeneration=0,this.previousFocus=null,this.referenceEl=null,this.shouldMoveFocusOnRender=!1,this.shouldReinitializeAfterReconnect=!1,this.slotContentObserver=null,this.hasBodySlotContent=!1,this.hasFloatingPosition=!1,this.hasImageSlotContent=!1,this.hasTitleSlotContent=!1,this.dialogLabelId=void 0,this.isVisible=!1,this.resolvedAnchorPosition="top-left",this.actionLayout="default",this.anchorPosition="top-left",this.currentStep=1,this.isDismissible=!0,this.isOpen=!0,this.primaryActionLabel="Next",this.secondaryActionLabel="Back",this.showActions=!0,this.showImage=!0,this.showSteps=!0,this.totalSteps=1,this.emitDismiss=()=>{this.dismiss.emit()},this.handleDismissClick=()=>{this.emitDismiss()},this.handlePrimaryClick=()=>{this.primaryAction.emit()},this.handleSecondaryClick=()=>{this.secondaryAction.emit()},this.handleTargetClick=()=>{this.targetClick.emit()},this.syncTitleSlotIds=()=>{const t=this.getFirstTitleSlottedElement();t&&!t.id&&(t.id=this.headingId)},this.handleBodySlotChange=()=>{this.refreshBodySlotState()},this.handleTitleSlotChange=()=>{this.refreshTitleSlotState(),this.syncTitleSlotIds()},this.handleImageSlotChange=()=>{this.refreshImageSlotState()},this.handleSlotContentMutation=()=>{this.refreshBodySlotState(),this.refreshImageSlotState(),this.refreshTitleSlotState(),this.syncTitleSlotIds()},this.updatePosition=async t=>{if(!l())return;const i=this.positioningGeneration;try{const s=x[this.anchorPosition],{x:h,y:o,placement:e,middlewareData:n}=await a(t,this.el,{strategy:"fixed",placement:s,middleware:[p(12),c({crossAxis:!1}),d({padding:8})]});if(i!==this.positioningGeneration)return;this.el.style.left=h+"px",this.el.style.top=o+"px";const l=n.shift?.x??0,r=n.shift?.y??0;this.el.style.setProperty("--xpl-spotlight-shift-x",-l+"px"),this.el.style.setProperty("--xpl-spotlight-shift-y",-r+"px"),this.hasFloatingPosition=!0;const u=b[e]??b[e.split("-")[0]??""];this.resolvedAnchorPosition=u??this.anchorPosition,this.pendingEnterTransitionAfterAnchor&&this.scheduleEnterTransition()}catch{if(i!==this.positioningGeneration)return;this.clearFloatingHostCoordinates(),this.isOpenEnabled&&(this.scheduleEnterTransition({skipAnchorWait:!0}),await h(this))}}}onAnchorPositionChange(){this.target&&this.referenceEl?this.updatePosition(this.referenceEl).catch((()=>{})):this.resolvedAnchorPosition=this.anchorPosition}onIsOpenChange(i){if(t.coerceBoolean(i))return this.capturePreviousFocus(),this.shouldMoveFocusOnRender=!0,this.isVisible=!1,this.refreshBodySlotState(),this.refreshTitleSlotState(),this.refreshImageSlotState(),this.target&&(this.cleanupAutoUpdate&&this.referenceEl&&this.el.ownerDocument.contains(this.referenceEl)?this.hasFloatingPosition=!1:this.startPositioning()),void this.scheduleEnterTransition();this.cancelEnterTransition(),this.cancelPendingFocusWait(),this.isVisible=!1,this.target||this.stopPositioning(),this.restoreFocus()}onTargetChange(){if(!this.target)return this.stopPositioning(),void(this.resolvedAnchorPosition=this.anchorPosition);this.startPositioning()}connectedCallback(){this.shouldReinitializeAfterReconnect&&(this.shouldReinitializeAfterReconnect=!1,this.startSlotContentObserver(),this.target&&this.startPositioning(),this.isOpenEnabled?(this.capturePreviousFocus(),this.shouldMoveFocusOnRender=!0,this.scheduleEnterTransition(),this.pendingEnterVisible&&Promise.resolve(h(this)).catch((()=>{}))):this.isVisible=!1)}disconnectedCallback(){this.cancelEnterTransition(),this.cancelPendingFocusWait(),this.stopSlotContentObserver(),this.stopPositioning(),this.hasCompletedInitialLoad&&(this.shouldReinitializeAfterReconnect=!0)}componentWillLoad(){this.resolvedAnchorPosition=this.anchorPosition,this.hasBodySlotContent=this.hasSlottedContent("body"),this.hasImageSlotContent=this.hasSlottedContent("image"),this.hasTitleSlotContent=this.hasSlottedContent("title"),this.dialogLabelId=this.getDialogLabelId(),this.isOpenEnabled&&!this.target&&(this.pendingEnterVisible=!0),this.shouldMoveFocusOnRender=this.isOpenEnabled}componentDidLoad(){this.hasCompletedInitialLoad=!0,this.startSlotContentObserver(),this.target&&this.startPositioning(),this.isOpenEnabled?this.target&&(this.scheduleEnterTransition(),this.pendingEnterVisible&&Promise.resolve(h(this)).catch((()=>{}))):this.isVisible=!1}componentDidRender(){this.isOpenEnabled&&this.syncTitleSlotIds();const t=this.getDialogLabelId();this.dialogLabelId!==t&&(this.dialogLabelId=t),this.pendingEnterVisible&&this.isOpenEnabled&&(this.pendingEnterVisible=!1,this.enterVisibleFrameId=requestAnimationFrame((()=>{this.enterVisibleFrameId=null,this.isOpenEnabled&&(this.isVisible=!0)}))),this.shouldMoveFocusOnRender&&this.isOpenEnabled&&(this.shouldMoveFocusOnRender=!1,this.capturePreviousFocus(),this.focusInitial())}handleKeyDown(t){"Escape"===t.key&&this.shouldHandleDismissKeyboardEvent()&&(t.preventDefault(),this.emitDismiss())}get effectiveTotalSteps(){return Math.max(1,this.totalSteps)}get effectiveCurrentStep(){return Math.min(this.effectiveTotalSteps,Math.max(1,this.currentStep))}get isDismissibleEnabled(){return t.coerceBoolean(this.isDismissible)}get isOpenEnabled(){return t.coerceBoolean(this.isOpen)}get isSingleActionLayout(){return"single"===this.actionLayout}get usesHiddenEdgeActions(){return"dual"===this.actionLayout}get isPrimaryStepActionDisabled(){return!this.usesHiddenEdgeActions&&this.showStepsEnabled&&this.effectiveCurrentStep>=this.effectiveTotalSteps}get isSecondaryStepActionDisabled(){return!this.usesHiddenEdgeActions&&this.showStepsEnabled&&this.effectiveCurrentStep<=1}get shouldShowPrimaryAction(){return!!this.isSingleActionLayout||!this.usesHiddenEdgeActions||!this.showStepsEnabled||this.effectiveCurrentStep<this.effectiveTotalSteps}get shouldShowSecondaryAction(){return!this.isSingleActionLayout&&(!this.usesHiddenEdgeActions||!this.showStepsEnabled||this.effectiveCurrentStep>1)}get hasRenderableFocusChrome(){return!!this.isDismissibleEnabled||!!this.showActionsEnabled&&(this.shouldShowPrimaryAction||this.shouldShowSecondaryAction)}get showActionsEnabled(){return t.coerceBoolean(this.showActions)}get showImageEnabled(){return t.coerceBoolean(this.showImage)}get showStepsEnabled(){return t.coerceBoolean(this.showSteps)}get headingPropHasText(){return!!this.heading?.trim()}get bodyPropHasText(){return!!this.body?.trim()}async focusInitial(){if(this.focusAbort?.abort(),this.focusAbort=new AbortController,!this.hasRenderableFocusChrome&&this.isOpenEnabled)return void(this.focusFrameId=requestAnimationFrame((()=>{this.focusFrameId=null,this.isOpenEnabled&&this.el.focus()})));const t=await function(t,i){const s=t.querySelector(m);return s?Promise.resolve(s):i?.signal?.aborted?Promise.resolve(null):"undefined"==typeof MutationObserver?function(t,i){return new Promise((s=>{if(i?.signal?.aborted)return void s(null);let h,o,e=0;const n=t=>{void 0!==h&&"undefined"!=typeof cancelAnimationFrame&&cancelAnimationFrame(h),void 0!==o&&clearTimeout(o),s(t)},l=()=>n(null);i?.signal?.addEventListener("abort",l,{once:!0});const a=t=>{"undefined"!=typeof requestAnimationFrame?h=requestAnimationFrame((()=>{h=void 0,t()})):o=setTimeout((()=>{o=void 0,t()}),0)},r=()=>{if(i?.signal?.aborted)return void n(null);const s=t.querySelector(m);return s?(i?.signal?.removeEventListener("abort",l),void n(s)):(e+=1,e>=120?(i?.signal?.removeEventListener("abort",l),void n(null)):void a(r))};a(r)}))}(t,i):new Promise((s=>{let h,o,e=!1;function n(t){e||(e=!0,o.disconnect(),void 0!==h&&clearTimeout(h),s(t))}o=new MutationObserver((()=>{const i=t.querySelector(m);i&&n(i)})),o.observe(t instanceof Node?t:document,{childList:!0,subtree:!0}),h=setTimeout((()=>n(null)),2500),i?.signal?.addEventListener("abort",(()=>{n(null)}),{once:!0})}))}(this.el,{signal:this.focusAbort.signal});t?t.focus():this.isOpenEnabled&&this.el.focus()}shouldHandleDismissKeyboardEvent(){if(!this.isDismissibleEnabled||!this.isOpenEnabled||!this.isVisible)return!1;const{activeElement:t}=document;return!!t&&(t===this.el||this.el.contains(t))}capturePreviousFocus(){l()&&(this.previousFocus=document.activeElement instanceof i?document.activeElement:null)}restoreFocus(){this.previousFocus?.isConnected&&this.previousFocus.focus()}cancelPendingFocusWait(){this.focusAbort?.abort(),null!=this.focusFrameId&&(cancelAnimationFrame(this.focusFrameId),this.focusFrameId=null)}cancelEnterTransition(){null!==this.enterVisibleFrameId&&(cancelAnimationFrame(this.enterVisibleFrameId),this.enterVisibleFrameId=null),this.pendingEnterVisible=!1}scheduleEnterTransition(t){this.cancelEnterTransition(),t?.skipAnchorWait||!this.target||!this.referenceEl||this.hasFloatingPosition?(this.pendingEnterTransitionAfterAnchor=!1,this.pendingEnterVisible=!0):this.pendingEnterTransitionAfterAnchor=!0}getFirstTitleSlottedElement(){const t=Array.from(this.el.children).find((t=>t.nodeType===Node.ELEMENT_NODE&&"title"===t.getAttribute("slot")));if(t)return t;const i=this.el.querySelector('slot[name="title"]');if(i&&"function"==typeof i.assignedNodes){const t=Array.from(i.assignedNodes({flatten:!0})).find((t=>t.nodeType===Node.ELEMENT_NODE));if(t)return t}return this.el.querySelector('[slot="title"]')??null}getDialogLabelId(){if(this.hasTitleSlotContent){const t=this.getFirstTitleSlottedElement();return t?.id?t.id:this.headingId}if(this.headingPropHasText)return this.headingId}refreshBodySlotState(){const t=this.hasSlottedContent("body");this.hasBodySlotContent!==t&&(this.hasBodySlotContent=t)}refreshTitleSlotState(){const t=this.hasSlottedContent("title");this.hasTitleSlotContent!==t&&(this.hasTitleSlotContent=t)}static coerceBoolean(t){return"string"==typeof t?"false"!==t.trim().toLowerCase():!!t}refreshImageSlotState(){const t=this.hasSlottedContent("image");this.hasImageSlotContent!==t&&(this.hasImageSlotContent=t)}startSlotContentObserver(){"undefined"==typeof MutationObserver||this.slotContentObserver||(this.slotContentObserver=new MutationObserver(this.handleSlotContentMutation),this.slotContentObserver.observe(this.el,{attributes:!0,attributeFilter:["slot"],childList:!0,subtree:!0}))}stopSlotContentObserver(){this.slotContentObserver?.disconnect(),this.slotContentObserver=null}hasSlottedContent(t){const i=this.el.querySelector(`slot[name="${t}"]`),s=this.el.querySelector(`[slot="${t}"]`),h=Array.from(this.el.children).some((i=>i.getAttribute("slot")===t)),o=!!i&&i.assignedNodes({flatten:!0}).some((t=>t.nodeType===Node.ELEMENT_NODE||t.nodeType===Node.TEXT_NODE&&t.textContent?.trim()));return!(!s&&!h)||o}startPositioning(){if(!l())return;if(!this.target)return;let t=null;try{t=this.el.ownerDocument.querySelector(this.target)}catch{return this.stopPositioning(),void(this.resolvedAnchorPosition=this.anchorPosition)}if(!t)return this.stopPositioning(),void(this.resolvedAnchorPosition=this.anchorPosition);this.detachFloatingUiListeners(),this.referenceEl=t,this.cleanupAutoUpdate=r(t,this.el,(()=>{this.updatePosition(t).catch((()=>{}))}))}detachFloatingUiListeners(){this.positioningGeneration+=1,this.cleanupAutoUpdate&&(this.cleanupAutoUpdate(),this.cleanupAutoUpdate=null)}resetFloatingHostPosition(){this.el.style.left="",this.el.style.top="",this.el.style.removeProperty("--xpl-spotlight-shift-x"),this.el.style.removeProperty("--xpl-spotlight-shift-y"),this.hasFloatingPosition=!1,this.pendingEnterTransitionAfterAnchor=!1,this.referenceEl=null}clearFloatingHostCoordinates(){this.el.style.left="",this.el.style.top="",this.el.style.removeProperty("--xpl-spotlight-shift-x"),this.el.style.removeProperty("--xpl-spotlight-shift-y"),this.hasFloatingPosition=!1,this.pendingEnterTransitionAfterAnchor=!1,this.resolvedAnchorPosition=this.anchorPosition}stopPositioning(){this.detachFloatingUiListeners(),this.resetFloatingHostPosition()}render(){if(!this.isOpenEnabled)return this.target?o(e,{class:{"xpl-spotlight":!0,"xpl-spotlight--target-only":!0,["xpl-spotlight--"+this.resolvedAnchorPosition]:!0,"xpl-spotlight--anchored":this.hasFloatingPosition}},o("button",{type:"button",class:"xpl-spotlight__target","aria-label":"Spotlight indicator",onClick:this.handleTargetClick},o("div",{class:"xpl-spotlight__target-outer"}),o("div",{class:"xpl-spotlight__target-inner"}))):o(e,{"aria-hidden":"true",class:{"xpl-spotlight":!0,"xpl-spotlight--closed":!0}});const{isSingleActionLayout:t,shouldShowPrimaryAction:i,shouldShowSecondaryAction:s,showActionsEnabled:h,showImageEnabled:n,showStepsEnabled:l}=this;return o(e,{class:{["xpl-spotlight--action-layout-"+this.actionLayout]:h,"xpl-spotlight":!0,["xpl-spotlight--"+this.resolvedAnchorPosition]:!0,"xpl-spotlight--anchored":this.hasFloatingPosition,"xpl-spotlight--no-image":!n,"xpl-spotlight--only-primary-action":h&&i&&!s,"xpl-spotlight--only-secondary-action":h&&s&&!i,"xpl-spotlight--visible":this.isVisible},role:"dialog","aria-modal":"false","aria-label":this.dialogLabelId?void 0:"Tour step","aria-labelledby":this.dialogLabelId,tabindex:-1},o("button",{type:"button",class:"xpl-spotlight__target","aria-label":"Spotlight indicator",onClick:this.handleTargetClick},o("div",{class:"xpl-spotlight__target-outer"}),o("div",{class:"xpl-spotlight__target-inner"})),this.isDismissibleEnabled&&o("div",{class:"xpl-spotlight__dismiss"},o("xpl-button",{variant:"secondary",size:"sm",iconOnly:!0,"aria-label":"Dismiss tour step",onClick:this.handleDismissClick},o("xpl-icon",{icon:"xmark",size:16}))),o("div",{class:"xpl-spotlight__frame"},o("div",{class:{"xpl-spotlight__image-container":!0,"xpl-spotlight__image-container--empty":!this.hasImageSlotContent,"xpl-spotlight__image-container--hidden":!n}},!this.hasImageSlotContent&&n&&o("div",{class:"xpl-spotlight__image-placeholder","aria-hidden":"true"},o("xpl-icon",{icon:"photo",size:24}),o("xpl-icon",{icon:"video",size:24})),o("slot",{name:"image",onSlotchange:this.handleImageSlotChange})),o("div",{class:"xpl-spotlight__content"},o("div",{class:"xpl-spotlight__header"},o("slot",{name:"title",onSlotchange:this.handleTitleSlotChange},!this.hasTitleSlotContent&&this.headingPropHasText&&o("span",{class:"xpl-spotlight__title",id:this.headingId},this.heading)),o("slot",{name:"body",onSlotchange:this.handleBodySlotChange},!this.hasBodySlotContent&&this.bodyPropHasText&&o("p",{class:"xpl-spotlight__body"},this.body))),h&&o("div",{class:{"xpl-spotlight__actions":!0,"xpl-spotlight__actions--dual":!t,"xpl-spotlight__actions--single":t,"xpl-spotlight__actions--with-steps":l,"xpl-spotlight__actions--only-primary":i&&!s,"xpl-spotlight__actions--only-secondary":s&&!i}},o("div",{class:"xpl-spotlight__action-slot xpl-spotlight__action-slot--secondary"},s&&o("xpl-button",{class:"xpl-spotlight__secondary-action",variant:"secondary",size:"default",disabled:this.isSecondaryStepActionDisabled,onClick:this.handleSecondaryClick},this.secondaryActionLabel)),l&&o("span",{class:"xpl-spotlight__step-text"},this.effectiveCurrentStep," of ",this.effectiveTotalSteps),o("div",{class:"xpl-spotlight__action-slot xpl-spotlight__action-slot--primary"},i&&o("xpl-button",{class:"xpl-spotlight__primary-action",variant:"primary",size:"default",disabled:this.isPrimaryStepActionDisabled,onClick:this.handlePrimaryClick},this.primaryActionLabel))))))}get el(){return this}static get watchers(){return{anchorPosition:[{onAnchorPositionChange:0}],isOpen:[{onIsOpenChange:0}],target:[{onTargetChange:0}]}}},[260,"xpl-spotlight",{actionLayout:[1,"action-layout"],anchorPosition:[1,"anchor-position"],body:[1],currentStep:[2,"current-step"],heading:[1],isDismissible:[4,"is-dismissible"],isOpen:[4,"is-open"],primaryActionLabel:[1,"primary-action-label"],secondaryActionLabel:[1,"secondary-action-label"],showActions:[4,"show-actions"],showImage:[4,"show-image"],showSteps:[4,"show-steps"],target:[1],totalSteps:[2,"total-steps"],hasBodySlotContent:[32],hasFloatingPosition:[32],hasImageSlotContent:[32],hasTitleSlotContent:[32],dialogLabelId:[32],isVisible:[32],resolvedAnchorPosition:[32]},[[4,"keydown","handleKeyDown"]],{anchorPosition:[{onAnchorPositionChange:0}],isOpen:[{onIsOpenChange:0}],target:[{onTargetChange:0}]}]),_=y,v=function(){"undefined"!=typeof customElements&&["xpl-spotlight","xpl-button","xpl-icon"].forEach((t=>{switch(t){case"xpl-spotlight":customElements.get(n(t))||customElements.define(n(t),y);break;case"xpl-button":customElements.get(n(t))||u();break;case"xpl-icon":customElements.get(n(t))||g()}}))};export{_ as XplSpotlight,v as defineCustomElement}
1
+ import{p as t,H as i,d as s,f as h,h as o,c as e,t as n}from"./p-B_6p2HCL.js";import{i as l}from"./p-Dqb1pIRo.js";import{c as a,a as r,o as p,f as c,s as d}from"./p-1M1pu0C2.js";import{d as g}from"./p-gs07oY0j.js";import{d as u}from"./p-6-DvgBzG.js";const m=".xpl-spotlight__dismiss button, .xpl-spotlight__actions button";let x=0;const f={"top-left":"top-start","top-right":"top-end","bottom-left":"bottom-start","bottom-right":"bottom-end"},b={top:"bottom-left","top-start":"bottom-left","top-end":"bottom-right",bottom:"top-left","bottom-start":"top-left","bottom-end":"top-right",left:"top-right","left-start":"top-right","left-end":"bottom-right",right:"top-left","right-start":"top-left","right-end":"bottom-left"},y=t(class t extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.dismiss=s(this,"dismiss",7),this.primaryAction=s(this,"primaryAction",7),this.secondaryAction=s(this,"secondaryAction",7),this.targetClick=s(this,"targetClick",7),this.cleanupAutoUpdate=null,this.enterVisibleFrameId=null,this.focusFrameId=null,this.hasCompletedInitialLoad=!1,this.headingId=(x+=1,"xpl-spotlight-heading-"+x),this.pendingEnterTransitionAfterAnchor=!1,this.pendingEnterVisible=!1,this.positioningGeneration=0,this.previousFocus=null,this.referenceEl=null,this.shouldMoveFocusOnRender=!1,this.shouldReinitializeAfterReconnect=!1,this.slotContentObserver=null,this.hasBodySlotContent=!1,this.hasFloatingPosition=!1,this.hasImageSlotContent=!1,this.hasTitleSlotContent=!1,this.dialogLabelId=void 0,this.isVisible=!1,this.resolvedAnchorPosition="top-left",this.actionLayout="default",this.anchorPosition="top-left",this.currentStep=1,this.isDismissible=!0,this.isOpen=!0,this.primaryActionLabel="Next",this.secondaryActionLabel="Back",this.showActions=!0,this.showImage=!0,this.showSteps=!0,this.totalSteps=1,this.emitDismiss=()=>{this.dismiss.emit()},this.handleDismissClick=()=>{this.emitDismiss()},this.handlePrimaryClick=()=>{this.primaryAction.emit()},this.handleSecondaryClick=()=>{this.secondaryAction.emit()},this.handleTargetClick=()=>{this.targetClick.emit()},this.syncTitleSlotIds=()=>{const t=this.getFirstTitleSlottedElement();t&&!t.id&&(t.id=this.headingId)},this.handleBodySlotChange=()=>{this.refreshBodySlotState()},this.handleTitleSlotChange=()=>{this.refreshTitleSlotState(),this.syncTitleSlotIds()},this.handleImageSlotChange=()=>{this.refreshImageSlotState()},this.handleSlotContentMutation=()=>{this.refreshBodySlotState(),this.refreshImageSlotState(),this.refreshTitleSlotState(),this.syncTitleSlotIds()},this.updatePosition=async t=>{if(!l())return;const i=this.positioningGeneration;try{const s=f[this.anchorPosition],{x:h,y:o,placement:e,middlewareData:n}=await a(t,this.el,{strategy:"fixed",placement:s,middleware:[p(12),c({crossAxis:!1}),d({padding:8})]});if(i!==this.positioningGeneration)return;this.el.style.left=h+"px",this.el.style.top=o+"px";const l=n.shift?.x??0,r=n.shift?.y??0;this.el.style.setProperty("--xpl-spotlight-shift-x",-l+"px"),this.el.style.setProperty("--xpl-spotlight-shift-y",-r+"px"),this.hasFloatingPosition=!0;const g=b[e]??b[e.split("-")[0]??""];this.resolvedAnchorPosition=g??this.anchorPosition,this.pendingEnterTransitionAfterAnchor&&this.scheduleEnterTransition()}catch{if(i!==this.positioningGeneration)return;this.clearFloatingHostCoordinates(),this.isOpenEnabled&&(this.scheduleEnterTransition({skipAnchorWait:!0}),await h(this))}}}onAnchorPositionChange(){this.target&&this.referenceEl?this.updatePosition(this.referenceEl).catch((()=>{})):this.resolvedAnchorPosition=this.anchorPosition}onIsOpenChange(i){if(t.coerceBoolean(i))return this.capturePreviousFocus(),this.shouldMoveFocusOnRender=!0,this.isVisible=!1,this.refreshBodySlotState(),this.refreshTitleSlotState(),this.refreshImageSlotState(),this.target&&(this.cleanupAutoUpdate&&this.referenceEl&&this.el.ownerDocument.contains(this.referenceEl)?this.hasFloatingPosition=!1:this.startPositioning()),void this.scheduleEnterTransition();this.cancelEnterTransition(),this.cancelPendingFocusWait(),this.isVisible=!1,this.target||this.stopPositioning(),this.restoreFocus()}onTargetChange(){if(!this.target)return this.stopPositioning(),void(this.resolvedAnchorPosition=this.anchorPosition);this.startPositioning()}connectedCallback(){this.shouldReinitializeAfterReconnect&&(this.shouldReinitializeAfterReconnect=!1,this.startSlotContentObserver(),this.target&&this.startPositioning(),this.isOpenEnabled?(this.capturePreviousFocus(),this.shouldMoveFocusOnRender=!0,this.scheduleEnterTransition(),this.pendingEnterVisible&&Promise.resolve(h(this)).catch((()=>{}))):this.isVisible=!1)}disconnectedCallback(){this.cancelEnterTransition(),this.cancelPendingFocusWait(),this.stopSlotContentObserver(),this.stopPositioning(),this.hasCompletedInitialLoad&&(this.shouldReinitializeAfterReconnect=!0)}componentWillLoad(){this.resolvedAnchorPosition=this.anchorPosition,this.hasBodySlotContent=this.hasSlottedContent("body"),this.hasImageSlotContent=this.hasSlottedContent("image"),this.hasTitleSlotContent=this.hasSlottedContent("title"),this.dialogLabelId=this.getDialogLabelId(),this.isOpenEnabled&&!this.target&&(this.pendingEnterVisible=!0),this.shouldMoveFocusOnRender=this.isOpenEnabled}componentDidLoad(){this.hasCompletedInitialLoad=!0,this.startSlotContentObserver(),this.target&&this.startPositioning(),this.isOpenEnabled?this.target&&(this.scheduleEnterTransition(),this.pendingEnterVisible&&Promise.resolve(h(this)).catch((()=>{}))):this.isVisible=!1}componentDidRender(){this.isOpenEnabled&&this.syncTitleSlotIds();const t=this.getDialogLabelId();this.dialogLabelId!==t&&(this.dialogLabelId=t),this.pendingEnterVisible&&this.isOpenEnabled&&(this.pendingEnterVisible=!1,this.enterVisibleFrameId=requestAnimationFrame((()=>{this.enterVisibleFrameId=null,this.isOpenEnabled&&(this.isVisible=!0)}))),this.shouldMoveFocusOnRender&&this.isOpenEnabled&&(this.shouldMoveFocusOnRender=!1,this.capturePreviousFocus(),this.focusInitial())}handleKeyDown(t){"Escape"===t.key&&this.shouldHandleDismissKeyboardEvent()&&(t.preventDefault(),this.emitDismiss())}get effectiveTotalSteps(){return Math.max(1,this.totalSteps)}get effectiveCurrentStep(){return Math.min(this.effectiveTotalSteps,Math.max(1,this.currentStep))}get isDismissibleEnabled(){return t.coerceBoolean(this.isDismissible)}get isOpenEnabled(){return t.coerceBoolean(this.isOpen)}get isSingleActionLayout(){return"single"===this.actionLayout}get usesHiddenEdgeActions(){return"dual"===this.actionLayout}get isPrimaryStepActionDisabled(){return!this.usesHiddenEdgeActions&&this.showStepsEnabled&&this.effectiveCurrentStep>=this.effectiveTotalSteps}get isSecondaryStepActionDisabled(){return!this.usesHiddenEdgeActions&&this.showStepsEnabled&&this.effectiveCurrentStep<=1}get shouldShowPrimaryAction(){return!!this.isSingleActionLayout||!this.usesHiddenEdgeActions||!this.showStepsEnabled||this.effectiveCurrentStep<this.effectiveTotalSteps}get shouldShowSecondaryAction(){return!this.isSingleActionLayout&&(!this.usesHiddenEdgeActions||!this.showStepsEnabled||this.effectiveCurrentStep>1)}get hasRenderableFocusChrome(){return!!this.isDismissibleEnabled||!!this.showActionsEnabled&&(this.shouldShowPrimaryAction||this.shouldShowSecondaryAction)}get showActionsEnabled(){return t.coerceBoolean(this.showActions)}get showImageEnabled(){return t.coerceBoolean(this.showImage)}get showStepsEnabled(){return t.coerceBoolean(this.showSteps)}get headingPropHasText(){return!!this.heading?.trim()}get bodyPropHasText(){return!!this.body?.trim()}async focusInitial(){if(this.focusAbort?.abort(),this.focusAbort=new AbortController,!this.hasRenderableFocusChrome&&this.isOpenEnabled)return void(this.focusFrameId=requestAnimationFrame((()=>{this.focusFrameId=null,this.isOpenEnabled&&this.el.focus()})));const t=await function(t,i){const s=t.querySelector(m);return s?Promise.resolve(s):i?.signal?.aborted?Promise.resolve(null):"undefined"==typeof MutationObserver?function(t,i){return new Promise((s=>{if(i?.signal?.aborted)return void s(null);let h,o,e=0;const n=t=>{void 0!==h&&"undefined"!=typeof cancelAnimationFrame&&cancelAnimationFrame(h),void 0!==o&&clearTimeout(o),s(t)},l=()=>n(null);i?.signal?.addEventListener("abort",l,{once:!0});const a=t=>{"undefined"!=typeof requestAnimationFrame?h=requestAnimationFrame((()=>{h=void 0,t()})):o=setTimeout((()=>{o=void 0,t()}),0)},r=()=>{if(i?.signal?.aborted)return void n(null);const s=t.querySelector(m);return s?(i?.signal?.removeEventListener("abort",l),void n(s)):(e+=1,e>=120?(i?.signal?.removeEventListener("abort",l),void n(null)):void a(r))};a(r)}))}(t,i):new Promise((s=>{let h,o,e=!1;function n(t){e||(e=!0,o.disconnect(),void 0!==h&&clearTimeout(h),s(t))}o=new MutationObserver((()=>{const i=t.querySelector(m);i&&n(i)})),o.observe(t instanceof Node?t:document,{childList:!0,subtree:!0}),h=setTimeout((()=>n(null)),2500),i?.signal?.addEventListener("abort",(()=>{n(null)}),{once:!0})}))}(this.el,{signal:this.focusAbort.signal});t?t.focus():this.isOpenEnabled&&this.el.focus()}shouldHandleDismissKeyboardEvent(){if(!this.isDismissibleEnabled||!this.isOpenEnabled||!this.isVisible)return!1;const{activeElement:t}=document;return!!t&&(t===this.el||this.el.contains(t))}capturePreviousFocus(){l()&&(this.previousFocus=document.activeElement instanceof i?document.activeElement:null)}restoreFocus(){this.previousFocus?.isConnected&&this.previousFocus.focus()}cancelPendingFocusWait(){this.focusAbort?.abort(),null!=this.focusFrameId&&(cancelAnimationFrame(this.focusFrameId),this.focusFrameId=null)}cancelEnterTransition(){null!==this.enterVisibleFrameId&&(cancelAnimationFrame(this.enterVisibleFrameId),this.enterVisibleFrameId=null),this.pendingEnterVisible=!1}scheduleEnterTransition(t){this.cancelEnterTransition(),t?.skipAnchorWait||!this.target||!this.referenceEl||this.hasFloatingPosition?(this.pendingEnterTransitionAfterAnchor=!1,this.pendingEnterVisible=!0):this.pendingEnterTransitionAfterAnchor=!0}getFirstTitleSlottedElement(){const t=Array.from(this.el.children).find((t=>t.nodeType===Node.ELEMENT_NODE&&"title"===t.getAttribute("slot")));if(t)return t;const i=this.el.querySelector('slot[name="title"]');if(i&&"function"==typeof i.assignedNodes){const t=Array.from(i.assignedNodes({flatten:!0})).find((t=>t.nodeType===Node.ELEMENT_NODE));if(t)return t}return this.el.querySelector('[slot="title"]')??null}getDialogLabelId(){if(this.hasTitleSlotContent){const t=this.getFirstTitleSlottedElement();return t?.id?t.id:this.headingId}if(this.headingPropHasText)return this.headingId}refreshBodySlotState(){const t=this.hasSlottedContent("body");this.hasBodySlotContent!==t&&(this.hasBodySlotContent=t)}refreshTitleSlotState(){const t=this.hasSlottedContent("title");this.hasTitleSlotContent!==t&&(this.hasTitleSlotContent=t)}static coerceBoolean(t){return"string"==typeof t?"false"!==t.trim().toLowerCase():!!t}refreshImageSlotState(){const t=this.hasSlottedContent("image");this.hasImageSlotContent!==t&&(this.hasImageSlotContent=t)}startSlotContentObserver(){"undefined"==typeof MutationObserver||this.slotContentObserver||(this.slotContentObserver=new MutationObserver(this.handleSlotContentMutation),this.slotContentObserver.observe(this.el,{attributes:!0,attributeFilter:["slot"],childList:!0,subtree:!0}))}stopSlotContentObserver(){this.slotContentObserver?.disconnect(),this.slotContentObserver=null}hasSlottedContent(t){const i=this.el.querySelector(`slot[name="${t}"]`),s=this.el.querySelector(`[slot="${t}"]`),h=Array.from(this.el.children).some((i=>i.getAttribute("slot")===t)),o=!!i&&i.assignedNodes({flatten:!0}).some((t=>t.nodeType===Node.ELEMENT_NODE||t.nodeType===Node.TEXT_NODE&&t.textContent?.trim()));return!(!s&&!h)||o}startPositioning(){if(!l())return;if(!this.target)return;let t=null;try{t=this.el.ownerDocument.querySelector(this.target)}catch{return this.stopPositioning(),void(this.resolvedAnchorPosition=this.anchorPosition)}if(!t)return this.stopPositioning(),void(this.resolvedAnchorPosition=this.anchorPosition);this.detachFloatingUiListeners(),this.referenceEl=t,this.cleanupAutoUpdate=r(t,this.el,(()=>{this.updatePosition(t).catch((()=>{}))}))}detachFloatingUiListeners(){this.positioningGeneration+=1,this.cleanupAutoUpdate&&(this.cleanupAutoUpdate(),this.cleanupAutoUpdate=null)}resetFloatingHostPosition(){this.el.style.left="",this.el.style.top="",this.el.style.removeProperty("--xpl-spotlight-shift-x"),this.el.style.removeProperty("--xpl-spotlight-shift-y"),this.hasFloatingPosition=!1,this.pendingEnterTransitionAfterAnchor=!1,this.referenceEl=null}clearFloatingHostCoordinates(){this.el.style.left="",this.el.style.top="",this.el.style.removeProperty("--xpl-spotlight-shift-x"),this.el.style.removeProperty("--xpl-spotlight-shift-y"),this.hasFloatingPosition=!1,this.pendingEnterTransitionAfterAnchor=!1,this.resolvedAnchorPosition=this.anchorPosition}stopPositioning(){this.detachFloatingUiListeners(),this.resetFloatingHostPosition()}render(){if(!this.isOpenEnabled)return this.target?o(e,{class:{"xpl-spotlight":!0,"xpl-spotlight--target-only":!0,["xpl-spotlight--"+this.resolvedAnchorPosition]:!0,"xpl-spotlight--anchored":this.hasFloatingPosition}},o("button",{type:"button",class:"xpl-spotlight__target","aria-label":"Spotlight indicator",onClick:this.handleTargetClick},o("div",{class:"xpl-spotlight__target-outer"}),o("div",{class:"xpl-spotlight__target-inner"}))):o(e,{"aria-hidden":"true",class:{"xpl-spotlight":!0,"xpl-spotlight--closed":!0}});const{isSingleActionLayout:t,shouldShowPrimaryAction:i,shouldShowSecondaryAction:s,showActionsEnabled:h,showImageEnabled:n,showStepsEnabled:l}=this;return o(e,{class:{["xpl-spotlight--action-layout-"+this.actionLayout]:h,"xpl-spotlight":!0,["xpl-spotlight--"+this.resolvedAnchorPosition]:!0,"xpl-spotlight--anchored":this.hasFloatingPosition,"xpl-spotlight--no-image":!n,"xpl-spotlight--only-primary-action":h&&i&&!s,"xpl-spotlight--only-secondary-action":h&&s&&!i,"xpl-spotlight--visible":this.isVisible},role:"dialog","aria-modal":"false","aria-label":this.dialogLabelId?void 0:"Tour step","aria-labelledby":this.dialogLabelId,tabindex:-1},o("button",{type:"button",class:"xpl-spotlight__target","aria-label":"Spotlight indicator",onClick:this.handleTargetClick},o("div",{class:"xpl-spotlight__target-outer"}),o("div",{class:"xpl-spotlight__target-inner"})),this.isDismissibleEnabled&&o("div",{class:"xpl-spotlight__dismiss"},o("xpl-button",{variant:"secondary",size:"sm",iconOnly:!0,"aria-label":"Dismiss tour step",onClick:this.handleDismissClick},o("xpl-icon",{icon:"xmark",size:16}))),o("div",{class:"xpl-spotlight__frame"},o("div",{class:{"xpl-spotlight__image-container":!0,"xpl-spotlight__image-container--empty":!this.hasImageSlotContent,"xpl-spotlight__image-container--hidden":!n}},!this.hasImageSlotContent&&n&&o("div",{class:"xpl-spotlight__image-placeholder","aria-hidden":"true"},o("xpl-icon",{icon:"photo",size:24}),o("xpl-icon",{icon:"video",size:24})),o("slot",{name:"image",onSlotchange:this.handleImageSlotChange})),o("div",{class:"xpl-spotlight__content"},o("div",{class:"xpl-spotlight__header"},o("slot",{name:"title",onSlotchange:this.handleTitleSlotChange},!this.hasTitleSlotContent&&this.headingPropHasText&&o("span",{class:"xpl-spotlight__title",id:this.headingId},this.heading)),o("slot",{name:"body",onSlotchange:this.handleBodySlotChange},!this.hasBodySlotContent&&this.bodyPropHasText&&o("p",{class:"xpl-spotlight__body"},this.body))),h&&o("div",{class:{"xpl-spotlight__actions":!0,"xpl-spotlight__actions--dual":!t,"xpl-spotlight__actions--single":t,"xpl-spotlight__actions--with-steps":l,"xpl-spotlight__actions--only-primary":i&&!s,"xpl-spotlight__actions--only-secondary":s&&!i}},o("div",{class:"xpl-spotlight__action-slot xpl-spotlight__action-slot--secondary"},s&&o("xpl-button",{class:"xpl-spotlight__secondary-action",variant:"secondary",size:"default",disabled:this.isSecondaryStepActionDisabled,onClick:this.handleSecondaryClick},this.secondaryActionLabel)),l&&o("span",{class:"xpl-spotlight__step-text"},this.effectiveCurrentStep," of ",this.effectiveTotalSteps),o("div",{class:"xpl-spotlight__action-slot xpl-spotlight__action-slot--primary"},i&&o("xpl-button",{class:"xpl-spotlight__primary-action",variant:"primary",size:"default",disabled:this.isPrimaryStepActionDisabled,onClick:this.handlePrimaryClick},this.primaryActionLabel))))))}get el(){return this}static get watchers(){return{anchorPosition:[{onAnchorPositionChange:0}],isOpen:[{onIsOpenChange:0}],target:[{onTargetChange:0}]}}},[260,"xpl-spotlight",{actionLayout:[1,"action-layout"],anchorPosition:[1,"anchor-position"],body:[1],currentStep:[2,"current-step"],heading:[1],isDismissible:[4,"is-dismissible"],isOpen:[4,"is-open"],primaryActionLabel:[1,"primary-action-label"],secondaryActionLabel:[1,"secondary-action-label"],showActions:[4,"show-actions"],showImage:[4,"show-image"],showSteps:[4,"show-steps"],target:[1],totalSteps:[2,"total-steps"],hasBodySlotContent:[32],hasFloatingPosition:[32],hasImageSlotContent:[32],hasTitleSlotContent:[32],dialogLabelId:[32],isVisible:[32],resolvedAnchorPosition:[32]},[[4,"keydown","handleKeyDown"]],{anchorPosition:[{onAnchorPositionChange:0}],isOpen:[{onIsOpenChange:0}],target:[{onTargetChange:0}]}]),_=y,v=function(){"undefined"!=typeof customElements&&["xpl-spotlight","xpl-button","xpl-icon"].forEach((t=>{switch(t){case"xpl-spotlight":customElements.get(n(t))||customElements.define(n(t),y);break;case"xpl-button":customElements.get(n(t))||g();break;case"xpl-icon":customElements.get(n(t))||u()}}))};export{_ as XplSpotlight,v as defineCustomElement}
@@ -1 +1 @@
1
- import{p as e,H as t,h as s,c as a,t as l}from"./p-BqhTjJWq.js";import{g as n,a as c,t as p}from"./p-BQtbf88X.js";const b=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.selected=!1}render(){const e=n(this.el),t=this.target??"",l=c(e,t),b=p(e,t);return s(a,{key:"ab151f12048635eb5e47f4cbafcd6f04637f7dfd","aria-labelledby":b,class:{"xpl-tab-panel":!0,"xpl-tab-panel--selected":this.selected},id:l,role:"tabpanel"},s("slot",{key:"81d82c0f3d8b019ec0abf6cbec34529b216b6533"}))}get el(){return this}},[260,"xpl-tab-panel",{selected:[4],target:[1]}]),r=b,o=function(){"undefined"!=typeof customElements&&["xpl-tab-panel"].forEach((e=>{"xpl-tab-panel"===e&&(customElements.get(l(e))||customElements.define(l(e),b))}))};export{r as XplTabPanel,o as defineCustomElement}
1
+ import{p as e,H as t,h as s,c as a,t as l}from"./p-B_6p2HCL.js";import{g as n,a as p,t as c}from"./p-BQtbf88X.js";const r=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.selected=!1}render(){const e=n(this.el),t=this.target??"",l=p(e,t),r=c(e,t);return s(a,{key:"854ea5f142d3710299dc6b35b08a721d79d67b02","aria-labelledby":r,class:{"xpl-tab-panel":!0,"xpl-tab-panel--selected":this.selected},id:l,role:"tabpanel"},s("slot",{key:"0b65b387574cd0058e12b7079494ce85c6f19a81"}))}get el(){return this}},[260,"xpl-tab-panel",{selected:[4],target:[1]}]),o=r,b=function(){"undefined"!=typeof customElements&&["xpl-tab-panel"].forEach((e=>{"xpl-tab-panel"===e&&(customElements.get(l(e))||customElements.define(l(e),r))}))};export{o as XplTabPanel,b as defineCustomElement}
@@ -1 +1 @@
1
- import{p as t,H as s,d as e,h as i,c as a,t as l}from"./p-BqhTjJWq.js";import{g as n,t as o,a as r}from"./p-BQtbf88X.js";import{d as h}from"./p-CWXfIUHo.js";import{d as c}from"./p-CfZI7bBe.js";import{d}from"./p-Bh-U2qmp.js";const b=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.tabChange=e(this,"tabChange",7),this.badgeVariant="purple",this.disabled=!1,this.fullWidth=!1,this.groupDisabled=!1,this.iconPosition="start",this.selected=!1,this.variant="tabs",this.handleTabClick=()=>{this.effectivelyDisabled||this.tabChange.emit(this.target)}}async getFocusableElement(){return this.el.querySelector(this.isSegment?"xpl-button button":".xpl-tab__button")}async setTabIndex(t){const s=await this.getFocusableElement();s&&(s.tabIndex=t)}async focusTrigger(){const t=await this.getFocusableElement();t?.focus()}get a11yIds(){const t=n(this.el),s=this.target??"";return{panelId:r(t,s),triggerId:o(t,s)}}get effectivelyDisabled(){return this.disabled||this.groupDisabled}get isSegment(){return"segment"===this.variant}get hasBadge(){return null!=this.badge&&this.badge.length>0}renderBadge(){return this.hasBadge?i("xpl-badge",{class:"xpl-tab__badge",dotOnly:!0,variant:this.badgeVariant},this.badge):null}render(){const t=this.isSegment,{panelId:s,triggerId:e}=this.a11yIds,l=this.selected?"true":"false",n={"xpl-tab":!0,"xpl-tab--selected":this.selected,"xpl-tab--segment":t,"xpl-tab--disabled":this.effectivelyDisabled};if(t)return i(a,{class:n},i("xpl-button",{controlAttrs:{id:e,role:"tab","aria-controls":s,"aria-selected":l},disabled:this.effectivelyDisabled,fullWidth:this.fullWidth,icon:this.icon??"",iconPosition:this.iconPosition,onClick:this.handleTabClick,size:"sm",type:"button",variant:this.selected?"primary":"tertiary"},i("slot",null),this.renderBadge()));const o=this.icon?i("xpl-icon",{class:"xpl-tab__icon",icon:this.icon,size:16}):null;return i(a,{class:n},i("button",{"aria-controls":s,"aria-selected":l,class:"xpl-tab__button",disabled:this.effectivelyDisabled,id:e,onClick:this.handleTabClick,role:"tab",type:"button"},"start"===this.iconPosition?o:null,i("slot",null),"end"===this.iconPosition?o:null,this.renderBadge()))}get el(){return this}},[260,"xpl-tab",{badge:[513],badgeVariant:[1,"badge-variant"],disabled:[516],fullWidth:[4,"full-width"],groupDisabled:[1540,"data-group-disabled"],icon:[513],iconPosition:[1,"icon-position"],selected:[4],target:[1],variant:[1],getFocusableElement:[64],setTabIndex:[64],focusTrigger:[64]}]),u=b,p=function(){"undefined"!=typeof customElements&&["xpl-tab","xpl-badge","xpl-button","xpl-icon"].forEach((t=>{switch(t){case"xpl-tab":customElements.get(l(t))||customElements.define(l(t),b);break;case"xpl-badge":customElements.get(l(t))||h();break;case"xpl-button":customElements.get(l(t))||c();break;case"xpl-icon":customElements.get(l(t))||d()}}))};export{u as XplTab,p as defineCustomElement}
1
+ import{p as t,H as s,d as e,h as i,c as a,t as l}from"./p-B_6p2HCL.js";import{g as n,t as o,a as r}from"./p-BQtbf88X.js";import{d as c}from"./p-fstojyQr.js";import{d as h}from"./p-gs07oY0j.js";import{d}from"./p-6-DvgBzG.js";const b=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.tabChange=e(this,"tabChange",7),this.badgeVariant="purple",this.disabled=!1,this.fullWidth=!1,this.groupDisabled=!1,this.iconPosition="start",this.selected=!1,this.variant="tabs",this.handleTabClick=()=>{this.effectivelyDisabled||this.tabChange.emit(this.target)}}async getFocusableElement(){return this.el.querySelector(this.isSegment?"xpl-button button":".xpl-tab__button")}async setTabIndex(t){const s=await this.getFocusableElement();s&&(s.tabIndex=t)}async focusTrigger(){const t=await this.getFocusableElement();t?.focus()}get a11yIds(){const t=n(this.el),s=this.target??"";return{panelId:r(t,s),triggerId:o(t,s)}}get effectivelyDisabled(){return this.disabled||this.groupDisabled}get isSegment(){return"segment"===this.variant}get hasBadge(){return null!=this.badge&&this.badge.length>0}renderBadge(){return this.hasBadge?i("xpl-badge",{class:"xpl-tab__badge",dotOnly:!0,variant:this.badgeVariant},this.badge):null}render(){const t=this.isSegment,{panelId:s,triggerId:e}=this.a11yIds,l=this.selected?"true":"false",n={"xpl-tab":!0,"xpl-tab--selected":this.selected,"xpl-tab--segment":t,"xpl-tab--disabled":this.effectivelyDisabled};if(t)return i(a,{class:n},i("xpl-button",{controlAttrs:{id:e,role:"tab","aria-controls":s,"aria-selected":l},disabled:this.effectivelyDisabled,fullWidth:this.fullWidth,icon:this.icon??"",iconPosition:this.iconPosition,onClick:this.handleTabClick,size:"sm",type:"button",variant:this.selected?"primary":"tertiary"},i("slot",null),this.renderBadge()));const o=this.icon?i("xpl-icon",{class:"xpl-tab__icon",icon:this.icon,size:16}):null;return i(a,{class:n},i("button",{"aria-controls":s,"aria-selected":l,class:"xpl-tab__button",disabled:this.effectivelyDisabled,id:e,onClick:this.handleTabClick,role:"tab",type:"button"},"start"===this.iconPosition?o:null,i("slot",null),"end"===this.iconPosition?o:null,this.renderBadge()))}get el(){return this}},[260,"xpl-tab",{badge:[513],badgeVariant:[1,"badge-variant"],disabled:[516],fullWidth:[4,"full-width"],groupDisabled:[1540,"data-group-disabled"],icon:[513],iconPosition:[1,"icon-position"],selected:[4],target:[1],variant:[1],getFocusableElement:[64],setTabIndex:[64],focusTrigger:[64]}]),u=b,p=function(){"undefined"!=typeof customElements&&["xpl-tab","xpl-badge","xpl-button","xpl-icon"].forEach((t=>{switch(t){case"xpl-tab":customElements.get(l(t))||customElements.define(l(t),b);break;case"xpl-badge":customElements.get(l(t))||c();break;case"xpl-button":customElements.get(l(t))||h();break;case"xpl-icon":customElements.get(l(t))||d()}}))};export{u as XplTab,p as defineCustomElement}
@@ -1 +1 @@
1
- import{p as e,H as t,h as s,c as o,t as b}from"./p-BqhTjJWq.js";const c=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost()}render(){return s(o,{key:"0a5e05dbbc4f089b7907464693943ce76e76cbc3",class:"xpl-table-body",role:"rowgroup"},s("slot",{key:"f8781515706b3843fd288f5be832cb9e9b78a971"}))}},[260,"xpl-table-body"]),l=c,r=function(){"undefined"!=typeof customElements&&["xpl-table-body"].forEach((e=>{"xpl-table-body"===e&&(customElements.get(b(e))||customElements.define(b(e),c))}))};export{l as XplTableBody,r as defineCustomElement}
1
+ import{p as e,H as t,h as s,c as o,t as b}from"./p-B_6p2HCL.js";const c=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost()}render(){return s(o,{key:"0a5e05dbbc4f089b7907464693943ce76e76cbc3",class:"xpl-table-body",role:"rowgroup"},s("slot",{key:"f8781515706b3843fd288f5be832cb9e9b78a971"}))}},[260,"xpl-table-body"]),l=c,r=function(){"undefined"!=typeof customElements&&["xpl-table-body"].forEach((e=>{"xpl-table-body"===e&&(customElements.get(b(e))||customElements.define(b(e),c))}))};export{l as XplTableBody,r as defineCustomElement}
@@ -1 +1 @@
1
- import{X as o,d as s}from"./p-yc1qXhah.js";const a=o,p=s;export{a as XplTableCell,p as defineCustomElement}
1
+ import{X as o,d as s}from"./p-q4zX9LQ0.js";const p=o,r=s;export{p as XplTableCell,r as defineCustomElement}
@@ -1 +1 @@
1
- import{X as o,d as s}from"./p-d4i2Qqvl.js";const p=o,r=s;export{p as XplTableFooterCell,r as defineCustomElement}
1
+ import{X as s,d as o}from"./p-Dn6HsGUr.js";const r=s,p=o;export{r as XplTableFooterCell,p as defineCustomElement}
@@ -1 +1 @@
1
- import{p as e,H as t,h as o,c as s,t as c}from"./p-BqhTjJWq.js";const r=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost()}render(){return o(s,{key:"1f6a7cae4df63c42c2c3c87bd3a531033d0e04b1",class:"xpl-table-footer",role:"rowgroup"},o("slot",{key:"2b2447283d8fcc7ebf9d48d44e30b98b2af58d9c"}))}},[260,"xpl-table-footer"]),l=r,a=function(){"undefined"!=typeof customElements&&["xpl-table-footer"].forEach((e=>{"xpl-table-footer"===e&&(customElements.get(c(e))||customElements.define(c(e),r))}))};export{l as XplTableFooter,a as defineCustomElement}
1
+ import{p as e,H as t,h as o,c as s,t as c}from"./p-B_6p2HCL.js";const r=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost()}render(){return o(s,{key:"1f6a7cae4df63c42c2c3c87bd3a531033d0e04b1",class:"xpl-table-footer",role:"rowgroup"},o("slot",{key:"2b2447283d8fcc7ebf9d48d44e30b98b2af58d9c"}))}},[260,"xpl-table-footer"]),l=r,a=function(){"undefined"!=typeof customElements&&["xpl-table-footer"].forEach((e=>{"xpl-table-footer"===e&&(customElements.get(c(e))||customElements.define(c(e),r))}))};export{l as XplTableFooter,a as defineCustomElement}
@@ -1 +1 @@
1
- import{T as o,d as s}from"./p-CZg3Gb0I.js";const p=o,r=s;export{p as XplTableHeaderCell,r as defineCustomElement}
1
+ import{T as o,d as s}from"./p-BKajYWw6.js";const a=o,p=s;export{a as XplTableHeaderCell,p as defineCustomElement}
@@ -1 +1 @@
1
- import{p as e,H as t,h as s,c as a,t as d}from"./p-BqhTjJWq.js";const r=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost()}render(){return s(a,{key:"79ac33f5bf3c86664a181dddba8dbb4f087b0b05",role:"row",class:"xpl-table-header"},s("slot",{key:"5fe1c6b9e117712b3af6b81dd37dc6775c67ed9d"}))}},[260,"xpl-table-header"]),c=r,l=function(){"undefined"!=typeof customElements&&["xpl-table-header"].forEach((e=>{"xpl-table-header"===e&&(customElements.get(d(e))||customElements.define(d(e),r))}))};export{c as XplTableHeader,l as defineCustomElement}
1
+ import{p as e,H as t,h as s,c as a,t as d}from"./p-B_6p2HCL.js";const r=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost()}render(){return s(a,{key:"79ac33f5bf3c86664a181dddba8dbb4f087b0b05",role:"row",class:"xpl-table-header"},s("slot",{key:"5fe1c6b9e117712b3af6b81dd37dc6775c67ed9d"}))}},[260,"xpl-table-header"]),c=r,l=function(){"undefined"!=typeof customElements&&["xpl-table-header"].forEach((e=>{"xpl-table-header"===e&&(customElements.get(d(e))||customElements.define(d(e),r))}))};export{c as XplTableHeader,l as defineCustomElement}
@@ -1 +1 @@
1
- import{p as e,H as t,h as s,c as i,t as l}from"./p-BqhTjJWq.js";function o(e){return"XPL-TABLE-CELL"===e.nodeName}const a=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.disabled=!1,this.selected=!1}onDisabledChange(){this.propagateDisabledToCells()}connectedCallback(){"undefined"!=typeof MutationObserver&&(this.cellObserver=new MutationObserver((e=>{e.forEach((e=>{"childList"===e.type&&e.addedNodes.forEach((e=>{o(e)&&(e.disabled=this.disabled)}))}))})),this.cellObserver.observe(this.el,{childList:!0}))}disconnectedCallback(){this.cellObserver?.disconnect(),this.cellObserver=void 0}componentDidLoad(){this.propagateDisabledToCells()}propagateDisabledToCells(){Array.from(this.el.children).filter(o).forEach((e=>{e.disabled=this.disabled}))}render(){return s(i,{key:"a743e3cf9f4761d990d4437390f5f3f4949c68b7",class:{"xpl-table-row":!0,"xpl-table-row--disabled":this.disabled,"xpl-table-row--selected":this.selected},role:"row"},s("slot",{key:"fc13f425ec75c16e0079733b789e7b68e1371f33"}))}get el(){return this}static get watchers(){return{disabled:[{onDisabledChange:0}]}}},[260,"xpl-table-row",{disabled:[516],rowId:[513,"row-id"],selected:[516]},void 0,{disabled:[{onDisabledChange:0}]}]),n=a,r=function(){"undefined"!=typeof customElements&&["xpl-table-row"].forEach((e=>{"xpl-table-row"===e&&(customElements.get(l(e))||customElements.define(l(e),a))}))};export{n as XplTableRow,r as defineCustomElement}
1
+ import{p as e,H as t,h as s,c as i,t as l}from"./p-B_6p2HCL.js";function o(e){return"XPL-TABLE-CELL"===e.nodeName}const a=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.disabled=!1,this.selected=!1}onDisabledChange(){this.propagateDisabledToCells()}connectedCallback(){"undefined"!=typeof MutationObserver&&(this.cellObserver=new MutationObserver((e=>{e.forEach((e=>{"childList"===e.type&&e.addedNodes.forEach((e=>{o(e)&&(e.disabled=this.disabled)}))}))})),this.cellObserver.observe(this.el,{childList:!0}))}disconnectedCallback(){this.cellObserver?.disconnect(),this.cellObserver=void 0}componentDidLoad(){this.propagateDisabledToCells()}propagateDisabledToCells(){Array.from(this.el.children).filter(o).forEach((e=>{e.disabled=this.disabled}))}render(){return s(i,{key:"a743e3cf9f4761d990d4437390f5f3f4949c68b7",class:{"xpl-table-row":!0,"xpl-table-row--disabled":this.disabled,"xpl-table-row--selected":this.selected},role:"row"},s("slot",{key:"fc13f425ec75c16e0079733b789e7b68e1371f33"}))}get el(){return this}static get watchers(){return{disabled:[{onDisabledChange:0}]}}},[260,"xpl-table-row",{disabled:[516],rowId:[513,"row-id"],selected:[516]},void 0,{disabled:[{onDisabledChange:0}]}]),n=a,r=function(){"undefined"!=typeof customElements&&["xpl-table-row"].forEach((e=>{"xpl-table-row"===e&&(customElements.get(l(e))||customElements.define(l(e),a))}))};export{n as XplTableRow,r as defineCustomElement}
@@ -1 +1 @@
1
- import{p as t,H as e,d as s,h as r,c as i,t as l}from"./p-BqhTjJWq.js";import{T as o}from"./p-Dqb1pIRo.js";import{R as n,S as a,c as h,g as c,a as d,d as u}from"./p-CZg3Gb0I.js";import{d as p}from"./p-DORBnmT4.js";import{d as b}from"./p-Bh-U2qmp.js";import{d as f}from"./p-yc1qXhah.js";import{d as x}from"./p-d4i2Qqvl.js";function w(t){const e=t.parentElement;if(!e)return null;const s=Array.from(e.children),r=s.indexOf(t);if(-1===r)return null;for(let t=r+1;t<s.length;t+=1){const e=s[t];if("xpl-table-row"===e.tagName.toLowerCase()&&!e.hasAttribute("hidden"))return e}return null}function y(t){return function(t){const e=t instanceof HTMLElement?t:null;if(!e)return null;const s=e.closest("xpl-table-row");return null!=s?s:null}(t)}function g(t){return("function"==typeof t.composedPath?t.composedPath():[]).find((t=>t instanceof e&&"xpl-table-row"===t.tagName.toLowerCase()))??y(t.target)}const m=t(class t extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.rowOrderChange=s(this,"rowOrderChange",3),this.rowSelectionChange=s(this,"rowSelectionChange",3),this.sortChanged=s(this,"sortChanged",3),this.tableSelect=s(this,"tableSelect",7),this.columnWidthsToken="",this.lastEmittedRowSelectionKey="",this.draggedRow=null,this.pendingDragRow=null,this.pointerUpClearPending=null,this.reorderKeyboardTimers=new o,this.onReorderHandleKeydown=t=>{this.handleReorderHandleKeyDown(t)},this.areAllSelected=!1,this.colCount=0,this.hasScrolled=!1,this.keyboardReorderRowId=null,this.reorderLiveMessage="",this.rowData=[],this.rowFooterData=[],this.selected=[],this.selectedRowIds=[],this.sortTypeArray=[],this.isSortable=!1,this.rowReorderable=!1,this.selectedValues=[],this.sortableColumns=[],this.onGridScroll=t=>{this.hasScrolled=t.target.scrollLeft>0},this.selectAll=t=>{const{target:e}=t;if(!(e instanceof HTMLInputElement))return;const{checked:s}=e;this.areAllSelected=s,this.selected=this.selectedValues&&this.selectedValues.length>0?Array.from(this.el.querySelectorAll("tbody td:first-child input")).map((t=>s?t?.value:s)):this.selected.map((()=>s)),this.onSelectionChange()},this.selectOne=(t,e)=>{const{target:s}=t;if(!(s instanceof HTMLInputElement))return;const{checked:r,value:i}=s;this.areAllSelected=!1,this.selected=this.selected.map(((t,s)=>s!==e?t:this.selectedValues&&this.selectedValues.length>0&&r?i:r)),this.onSelectionChange()},this.onSelectionChange=()=>{this.tableSelect.emit({selected:this.selected,areAllSelected:this.areAllSelected})},this.onLegacyScroll=()=>{this.hasScrolled=this.container.scrollLeft>0},this.sortBy=(t,e)=>{const s=(e,s)=>e[t].toLocaleLowerCase()<s[t].toLocaleLowerCase()?-1:e[t].toLocaleLowerCase()>s[t].toLocaleLowerCase()?1:0;switch(e[t]){case"asc":this.rowData.sort(((t,e)=>s(t,e)));break;case"desc":this.rowData.sort(((t,e)=>s(e,t)));break;default:this.rowData=void 0!==this.data?Array.from(this.data):[],this.sortTypeArray[t]=null}this.rowData=Array.from(this.rowData)},this.setData=()=>{this.rowData=void 0!==this.data?Array.from(this.data):[]},this.setFooterData=()=>{this.rowFooterData=void 0!==this.footer?Array.from(this.footer):[]}}watchColumns(){this.sortTypeArray=this.columns?this.columns.map((()=>null)):[]}watchData(){this.setData()}watchFooterData(){this.setFooterData()}watchReorderHandleIcon(){!this.isLegacyMode&&this.rowReorderable&&this.syncInjectedReorderHandleIcons()}watchReorderHandleIconKeyboard(){!this.isLegacyMode&&this.rowReorderable&&this.syncInjectedReorderHandleIcons()}watchRowReorderable(t){this.isLegacyMode||t||(this.keyboardReorderRowId=null,this.syncReorderHandleKeyboardA11y(null),this.removeManagedReorderCells(),this.draggedRow=null,this.pendingDragRow=null,this.clearPendingDragListeners(),this.reorderLiveMessage="",this.queryBodyRows().forEach((t=>{t.removeAttribute("draggable"),t.querySelector(".xpl-table__row-drag-handle")?.removeAttribute("draggable"),t.classList.remove("xpl-table-row--dragging","xpl-table-row--drag-over")})),this.colCount=0,this.columnWidthsToken="")}watchSelectable(t){this.isLegacyMode||t||(this.selectedRowIds=[],this.lastEmittedRowSelectionKey="",this.colCount=0,this.columnWidthsToken="",this.syncRowSelectedProps())}componentWillLoad(){this.isLegacyMode&&(this.ensureSelectAllValue(),this.areAllSelected=!1,this.setData(),this.setFooterData(),this.selected=Array(this.rowData.length).fill(!1),this.sortTypeArray=this.columns?this.columns.map((()=>null)):[])}ensureSelectAllValue(){if(void 0!==this.selectAllValue)return;const e=this.el.id?.trim();if(e)return void(this.selectAllValue=e+"-select-all");const s=this.el.getAttribute("data-select-all-value");s?this.selectAllValue=s:(t.selectAllSeq+=1,this.selectAllValue="select-all-"+t.selectAllSeq,this.el.setAttribute("data-select-all-value",this.selectAllValue))}componentDidLoad(){this.isLegacyMode||this.syncCompositionalLayout()}componentDidUpdate(){this.isLegacyMode||this.syncCompositionalLayout()}disconnectedCallback(){this.clearPendingDragListeners(),this.detachReorderHandleKeydownListeners(),this.reorderKeyboardTimers.dispose(),void 0!==this.reorderAnnounceRaf&&(cancelAnimationFrame(this.reorderAnnounceRaf),this.reorderAnnounceRaf=void 0)}handleHeaderCellColumnWidthsChange(t){if(this.isLegacyMode)return;const e=t.target;e instanceof Node&&this.el.contains(e)&&this.updateColumnWidths()}handleCompositionalCheckboxChange(s){if(this.isLegacyMode||!this.selectable)return;if(!this.isEventFromThisTable(s.target))return;const r=s.composedPath?.()??[];let i=(r.length>0?r:[s.target].filter((t=>null!=t))).find((t=>t instanceof e&&"xpl-checkbox"===t.tagName.toLowerCase()));if(!i&&s.target&&"function"==typeof s.target.closest&&(i=s.target.closest("xpl-checkbox")??void 0),!i||!this.el.contains(i))return;const l=i.closest("xpl-table-row");if(!l||!this.isDirectChildBodyRow(l))return;const o=i.closest("xpl-table-cell");if(!o)return;const n=this.getSelectionColumnIndex();if(null===n)return;if(t.getBodyRowCells(l).indexOf(o)!==n)return;s.stopPropagation();const a=t.getRowIdForRow(l);if(!a||l.disabled)return;const h=i.querySelector('input[type="checkbox"]');if(!h)return;const{checked:c}=h;c?this.selectedRowIds.includes(a)||(this.selectedRowIds=[...this.selectedRowIds,a]):this.selectedRowIds=this.selectedRowIds.filter((t=>t!==a)),this.applyHeaderCheckboxState(),this.syncRowSelectedProps(),this.emitCompositionalSelection()}handleCompositionalHeaderCheckboxChange(s){if(this.isLegacyMode||!this.selectable)return;if(!this.isEventFromThisTable(s.target))return;const r=s.composedPath?.()??[];let i=(r.length>0?r:[s.target].filter((t=>null!=t))).find((t=>t instanceof e&&"xpl-table-header-cell"===t.tagName.toLowerCase()&&"checkbox"===t.getAttribute("type")));if(!i&&s.target&&"function"==typeof s.target.closest){const t=s.target.closest('xpl-table-header-cell[type="checkbox"]');t instanceof e&&(i=t)}if(!i||!this.el.contains(i))return;if(!this.isCellInOurCompositionalHeader(i))return;if(!this.getCompositionalHeaderCells().includes(i))return;const l=!!s.detail,o=this.querySelectableBodyRows().map((e=>t.getRowIdForRow(e))).filter((t=>!!t));this.selectedRowIds=l?[...o]:[],this.applyBodyCheckboxStates(),this.syncRowSelectedProps(),this.emitCompositionalSelection()}handlePointerDownExitKeyboardReorder(t){if(this.isLegacyMode||!this.rowReorderable||null===this.keyboardReorderRowId)return;const e=t.target;if(!(e instanceof Node&&this.el.contains(e)))return;const s=e instanceof Element?e.closest("xpl-table-row"):null;s&&this.isDirectChildBodyRow(s)&&(this.keyboardReorderRowId=null,this.syncReorderHandleKeyboardA11y(null))}handleReorderHandleKeyDown(s){if(this.isLegacyMode||!this.rowReorderable)return;const r="function"==typeof s.composedPath?s.composedPath():[];let i=(r.length>0?r:s.target?[s.target]:[]).find((t=>t instanceof e&&t.classList.contains("xpl-table__row-drag-handle")));if(!i&&s.target instanceof e&&s.target.classList.contains("xpl-table__row-drag-handle")&&(i=s.target),!i||!this.el.contains(i))return;const l=i.closest("xpl-table-row");if(!l||!this.isDirectChildBodyRow(l))return;const o=t.getRowIdForRow(l)??"";if(!o)return;const n=this.keyboardReorderRowId===o,a="Escape"===s.key||"Esc"===s.key||"Escape"===s.code||27===s.keyCode;l.disabled?a&&n&&(s.preventDefault(),this.keyboardReorderRowId=null,this.syncReorderHandleKeyboardA11y(null)):a?n&&(s.preventDefault(),this.keyboardReorderRowId=null,this.syncReorderHandleKeyboardA11y(null)):n?"ArrowUp"!==s.key&&"ArrowDown"!==s.key||(s.preventDefault(),this.performKeyboardRowReorder(o,"ArrowUp"===s.key?"up":"down")):"Enter"!==s.key&&" "!==s.key||(s.preventDefault(),this.keyboardReorderRowId=o,this.syncReorderHandleKeyboardA11y(o))}handleRowReorderPointerDown(t){if(this.isLegacyMode||!this.rowReorderable)return;const s=function(t){return("function"==typeof t.composedPath?t.composedPath():[]).find((t=>t instanceof e&&t.classList.contains("xpl-table__row-drag-handle")))??null}(t);if(!s)return;if(s.closest("xpl-table")!==this.el)return;const r=y(s);if(!r||r.disabled)return;const i=this.getDirectChildTableSection("xpl-table-body");if(!i||r.parentElement!==i)return;this.clearPendingDragListeners(),this.pendingDragRow=r;const l=()=>{this.clearPendingDragListeners(),this.pendingDragRow=null};document.addEventListener("pointerup",l,!0),document.addEventListener("pointercancel",l,!0),this.pointerUpClearPending=()=>{document.removeEventListener("pointerup",l,!0),document.removeEventListener("pointercancel",l,!0)}}handleRowReorderDragStart(e){if(this.isLegacyMode||!this.rowReorderable)return;const s=g(e);if(!s)return;if(s.closest("xpl-table")!==this.el)return;const r=this.getDirectChildTableSection("xpl-table-body");r&&s.parentElement===r&&(s.disabled||this.pendingDragRow!==s?e.preventDefault():(this.keyboardReorderRowId=null,this.syncReorderHandleKeyboardA11y(null),this.clearPendingDragListeners(),this.pendingDragRow=null,this.draggedRow=s,e.dataTransfer&&(e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/plain",t.getRowIdForRow(s)??"")),s.classList.add("xpl-table-row--dragging")))}handleRowReorderDragEnd(t){if(this.isLegacyMode||!this.rowReorderable)return;const e=g(t);e&&e.closest("xpl-table")===this.el&&(e.classList.remove("xpl-table-row--dragging"),this.clearReorderDragOverClasses(),this.draggedRow=null)}handleRowReorderDragOver(t){if(this.isLegacyMode||!this.rowReorderable)return;const e=g(t);if(!e||e.closest("xpl-table")!==this.el)return;const s=this.getDirectChildTableSection("xpl-table-body");s&&e.parentElement===s&&!e.disabled&&(t.preventDefault(),t.dataTransfer&&(t.dataTransfer.dropEffect="move"))}handleRowReorderDragEnter(t){if(this.isLegacyMode||!this.rowReorderable)return;const e=g(t);if(!e||e.closest("xpl-table")!==this.el)return;const s=this.getDirectChildTableSection("xpl-table-body");s&&e.parentElement===s&&!e.disabled&&(t.preventDefault(),e.classList.add("xpl-table-row--drag-over"))}handleRowReorderDragLeave(t){if(this.isLegacyMode||!this.rowReorderable)return;const e=g(t);if(!e||e.closest("xpl-table")!==this.el)return;const s=t.relatedTarget;s&&e.contains(s)||e.classList.remove("xpl-table-row--drag-over")}handleRowReorderDrop(e){if(this.isLegacyMode||!this.rowReorderable)return;e.preventDefault();const s=g(e);if(!s||s.closest("xpl-table")!==this.el)return;const r=this.getDirectChildTableSection("xpl-table-body");if(!r||s.parentElement!==r||s.disabled)return;const i=this.draggedRow;if(!i||i.disabled)return this.draggedRow=null,void this.clearReorderDragOverClasses();if(i===s)return void this.clearReorderDragOverClasses();const l=this.getVisibleBodyRowsForReorder(),o=l.indexOf(i),n=l.indexOf(s);if(-1===o||-1===n)return void this.clearReorderDragOverClasses();const a=o>n?"up":"down",h=t.getRowIdForRow(i)??"";!function(t,e,s){if(e===s||e.parentElement!==t)return;if(s.parentElement!==t)return;const r=Array.from(t.children).filter((t=>"xpl-table-row"===t.tagName.toLowerCase()&&!t.hasAttribute("hidden"))),i=r.indexOf(e),l=r.indexOf(s);if(-1!==i&&-1!==l&&i!==l)if(i<l){const r=w(s);t.insertBefore(e,r||null)}else t.insertBefore(e,s)}(r,i,s);const c=this.getVisibleBodyRowsForReorder().map((e=>t.getRowIdForRow(e)??""));this.rowOrderChange.emit({rowId:h,direction:a,orderedRowIds:c,fromIndex:o,toIndex:n}),this.announceRowReorder(h,c),this.clearReorderDragOverClasses(),this.selectable&&(this.applyBodyCheckboxStates(),this.applyHeaderCheckboxState(),this.syncRowSelectedProps()),this.updateColumnWidths()}get isLegacyMode(){return void 0!==this.columns||void 0!==this.data||void 0!==this.footer}ensureTableInstanceId(){this.tableInstanceId||(this.tableInstanceId="undefined"!=typeof crypto&&crypto.randomUUID?crypto.randomUUID():Math.random().toString(36).slice(2))}generateRowId(){return this.ensureTableInstanceId(),"undefined"!=typeof crypto&&crypto.randomUUID?`${this.tableInstanceId}-${crypto.randomUUID()}`:`${this.tableInstanceId}-${Math.random().toString(36).slice(2)}`}syncCompositionalLayout(){this.isLegacyMode||(this.rowReorderable?this.syncReorderColumn():this.removeManagedReorderCells(),this.selectable&&(this.ensureTableInstanceId(),this.pruneStaleSelectedRowIds(),this.ensureBodyRowIds(),this.applyBodyCheckboxStates(),this.applyHeaderCheckboxState(),this.syncRowSelectedProps()),this.rowReorderable&&this.selectable&&this.normalizeManagedColumnsOrder(),this.updateColumnWidths())}getDirectChildTableSection(t){return Array.from(this.el.children).find((e=>e.tagName.toLowerCase()===t))??null}isDirectChildBodyRow(t){const e=this.getDirectChildTableSection("xpl-table-body");return null!==e&&t.parentElement===e}isCellInOurCompositionalHeader(t){const e=t.closest("xpl-table-header");return null!==e&&e.parentElement===this.el}getSelectionColumnIndex(){const t=this.getCompositionalHeaderCells().findIndex((t=>"checkbox"===t.getAttribute("type")));return t>=0?t:null}static getBodyRowCells(t){return Array.from(t.children).filter((t=>"xpl-table-cell"===t.tagName.toLowerCase()))}queryBodyRows(){const t=this.getDirectChildTableSection("xpl-table-body");return t?Array.from(t.children).filter((t=>"xpl-table-row"===t.tagName.toLowerCase())):[]}querySelectableBodyRows(){return this.queryBodyRows().filter((t=>!t.disabled))}static getRowIdForRow(t){const e=t.getAttribute("row-id")?.trim();return e||null}ensureBodyRowIds(){this.queryBodyRows().forEach((e=>{t.getRowIdForRow(e)||e.setAttribute("row-id",this.generateRowId())}))}removeManagedReorderCells(){this.el.querySelectorAll(`[${n}]`).forEach((t=>{t instanceof Element&&t.closest("xpl-table")===this.el&&t.parentElement?.removeChild(t)}))}getSelectionSlotCellForReorderOrder(t){const e=this.getSelectionColumnIndex();if(null===e)return null;const s=Array.from(t.children)[e];if(!s)return null;const r=s.tagName.toLowerCase();return"xpl-table-header-cell"===r?"checkbox"===s.getAttribute("type")?s:null:"xpl-table-cell"===r?s.hasAttribute(a)||s.querySelector("xpl-checkbox")?s:null:"xpl-table-footer-cell"===r?s:null}normalizeManagedColumnsOrder(){const t=t=>{const e=t.querySelector(`:scope > [${n}]`),s=this.getSelectionSlotCellForReorderOrder(t);if(!e||!s)return;const r=Array.from(t.children);r.indexOf(e)>r.indexOf(s)&&t.insertBefore(e,s)},e=Array.from(this.el.children).find((t=>"xpl-table-header"===t.tagName.toLowerCase()))??null;if(e){const s=Array.from(e.children).find((t=>"xpl-table-row"===t.tagName.toLowerCase()));t(s??e)}this.queryBodyRows().forEach((e=>t(e)));const s=this.getDirectChildTableSection("xpl-table-footer");s&&Array.from(s.children).filter((t=>"xpl-table-row"===t.tagName.toLowerCase())).forEach((e=>t(e)))}syncReorderColumn(){this.rowReorderable&&!this.isLegacyMode&&(this.ensureBodyRowIds(),this.ensureHeaderReorderCell(),this.ensureBodyReorderCells(),this.ensureFooterReorderCells(),this.applyReorderRowDraggableState())}ensureHeaderReorderCell(){const t=Array.from(this.el.children).find((t=>"xpl-table-header"===t.tagName.toLowerCase()))??null;if(!t)return;const e=Array.from(t.children).find((t=>"xpl-table-row"===t.tagName.toLowerCase()))??t;if(Array.from(e.children).some((t=>"xpl-table-header-cell"===t.tagName.toLowerCase()&&t.hasAttribute(n))))return;const s=document.createElement("xpl-table-header-cell");s.setAttribute(n,""),s.setAttribute("type","empty"),s.setAttribute("width","48"),s.setAttribute("align","center"),e.insertBefore(s,e.firstChild)}ensureBodyReorderCells(){this.queryBodyRows().forEach((e=>{const s=Array.from(e.children).filter((t=>"xpl-table-cell"===t.tagName.toLowerCase()&&t.hasAttribute(n)));if(s.length>1)for(let t=1;t<s.length;t+=1)s[t].remove();let r=s[0];if(r)r.setAttribute("align","center");else{const s=document.createElement("xpl-table-cell");s.setAttribute(n,""),s.setAttribute("width","48"),s.setAttribute("align","center");const i=document.createElement("button");i.type="button",i.className="xpl-table__row-drag-handle",i.setAttribute("aria-label","Reorder row"),i.setAttribute("aria-pressed","false");const l=this.getResolvedIconForRow(t.getRowIdForRow(e)??"");if(l){const t=document.createElement("xpl-icon");t.setAttribute("icon",l),t.setAttribute("size","16"),i.appendChild(t)}s.appendChild(i),e.insertBefore(s,e.firstChild),r=s}const i=r.querySelector(".xpl-table__row-drag-handle");i&&(i.disabled=e.disabled)})),this.syncInjectedReorderHandleIcons(),this.attachReorderHandleKeydownListeners()}getResolvedIconForRow(t){return null!==this.keyboardReorderRowId&&""!==t&&t===this.keyboardReorderRowId?""===this.reorderHandleIconKeyboard?null:this.reorderHandleIconKeyboard??"caret-expand-y":""===this.reorderHandleIcon?null:this.reorderHandleIcon??"grip-dots-vertical"}syncInjectedReorderHandleIcons(){this.queryBodyRows().forEach((e=>{const s=e.querySelector(".xpl-table__row-drag-handle");if(!s)return;const r=t.getRowIdForRow(e)??"",i=this.getResolvedIconForRow(r);if(s.querySelectorAll("xpl-icon").forEach((t=>t.remove())),i){const t=document.createElement("xpl-icon");t.setAttribute("icon",i),t.setAttribute("size","16"),s.appendChild(t)}}))}syncReorderHandleKeyboardA11y(e){!this.isLegacyMode&&this.rowReorderable&&(this.queryBodyRows().forEach((s=>{const r=s.querySelector(".xpl-table__row-drag-handle");if(!r)return;const i=t.getRowIdForRow(s)??"",l=null!==e&&i===e;r.classList.toggle("xpl-table__row-drag-handle--keyboard-mode",l),r.setAttribute("aria-pressed",l?"true":"false"),r.setAttribute("aria-label",l?"Press arrow up or down to reorder, Escape to exit":"Press Enter or Space to activate keyboard reorder mode, or drag to reorder")})),this.syncInjectedReorderHandleIcons())}attachReorderHandleKeydownListeners(){!this.isLegacyMode&&this.rowReorderable&&this.queryBodyRows().forEach((t=>{const e=t.querySelector(".xpl-table__row-drag-handle");e&&"true"!==e.dataset.xplReorderKbdBound&&(e.dataset.xplReorderKbdBound="true",e.addEventListener("keydown",this.onReorderHandleKeydown))}))}detachReorderHandleKeydownListeners(){this.el&&this.el.querySelectorAll('.xpl-table__row-drag-handle[data-xpl-reorder-kbd-bound="true"]').forEach((t=>{t.removeEventListener("keydown",this.onReorderHandleKeydown),delete t.dataset.xplReorderKbdBound}))}performKeyboardRowReorder(e,s){const r=this.getDirectChildTableSection("xpl-table-body");if(!r)return!1;const i=this.getVisibleBodyRowsForReorder(),l=i.findIndex((s=>t.getRowIdForRow(s)===e));if(-1===l)return!1;const o="up"===s?l-1:l+1;if(o<0||o>=i.length)return!1;const n=l,a=i[l],h=i[o];if("up"===s)r.insertBefore(a,h);else{const t=w(h);t?r.insertBefore(a,t):r.appendChild(a)}const c=this.getVisibleBodyRowsForReorder().map((e=>t.getRowIdForRow(e)??"")),d=c.indexOf(e);return this.rowOrderChange.emit({rowId:e,direction:s,orderedRowIds:c,fromIndex:n,toIndex:d}),this.announceRowReorder(e,c),this.clearReorderDragOverClasses(),this.selectable&&(this.applyBodyCheckboxStates(),this.applyHeaderCheckboxState(),this.syncRowSelectedProps()),this.updateColumnWidths(),this.reorderKeyboardTimers.requestAnimationFrame((()=>{if(!this.el.isConnected)return;const s=this.getVisibleBodyRowsForReorder().find((s=>t.getRowIdForRow(s)===e)),r=s?.querySelector(".xpl-table__row-drag-handle");r?.focus()})),!0}ensureFooterReorderCells(){const t=this.getDirectChildTableSection("xpl-table-footer");t&&Array.from(t.children).filter((t=>"xpl-table-row"===t.tagName.toLowerCase())).forEach((t=>{if(Array.from(t.children).some((t=>"xpl-table-footer-cell"===t.tagName.toLowerCase()&&t.hasAttribute(n))))return;const e=document.createElement("xpl-table-footer-cell");e.setAttribute(n,""),e.setAttribute("width","48"),e.setAttribute("align","center"),t.insertBefore(e,t.firstChild)}))}static supportsSubgridBodyRow(){return"undefined"!=typeof CSS&&"function"==typeof CSS.supports&&CSS.supports("grid-template-columns","subgrid")}applyReorderRowDraggableState(){const e=t.supportsSubgridBodyRow();this.queryBodyRows().forEach((t=>{const s=t.querySelector(".xpl-table__row-drag-handle");s?.removeAttribute("draggable"),t.removeAttribute("draggable"),this.rowReorderable&&!t.disabled&&s&&(e?t.setAttribute("draggable","true"):s.setAttribute("draggable","true"))}))}getVisibleBodyRowsForReorder(){return this.queryBodyRows().filter((t=>!t.hasAttribute("hidden")))}clearReorderDragOverClasses(){this.queryBodyRows().forEach((t=>t.classList.remove("xpl-table-row--drag-over")))}clearPendingDragListeners(){this.pointerUpClearPending&&(this.pointerUpClearPending(),this.pointerUpClearPending=null)}announceRowReorder(t,e){if(!this.rowReorderable||!t)return;const s=e.indexOf(t);s<0||(this.reorderLiveMessage="",void 0!==this.reorderAnnounceRaf&&cancelAnimationFrame(this.reorderAnnounceRaf),this.reorderAnnounceRaf=requestAnimationFrame((()=>{this.reorderAnnounceRaf=void 0,this.el.isConnected&&(this.reorderLiveMessage=`Row ${t}, now position ${s+1} of ${e.length}`)})))}pruneStaleSelectedRowIds(){const e=new Set(this.queryBodyRows().map((e=>t.getRowIdForRow(e))).filter((t=>!!t))),s=this.selectedRowIds.filter((t=>e.has(t)));s.length!==this.selectedRowIds.length&&(this.selectedRowIds=s,this.applyBodyCheckboxStates(),this.applyHeaderCheckboxState(),this.syncRowSelectedProps(),this.emitCompositionalSelection())}static getBodyRowCheckboxAriaLabel(e,s){const r=t.getBodyRowCells(e),i=r.find(((t,e)=>(null===s||e!==s)&&!t.hasAttribute(n)))??r[0];if(!i)return"Select row";const l=i.textContent?.replace(/\s+/g," ").trim()??"";return l?"Select row, "+(l.length>100?l.slice(0,100)+"…":l):"Select row"}applyBodyCheckboxStates(){const e=this.getSelectionColumnIndex();null!==e&&this.queryBodyRows().forEach((s=>{const r=t.getRowIdForRow(s),i=t.getBodyRowCells(s)[e],l=i?.querySelector("xpl-checkbox");l&&r&&(l.checked=this.selectedRowIds.includes(r),l.disabled=s.disabled,l.value=r,l.setAttribute("aria-label",t.getBodyRowCheckboxAriaLabel(s,e)))}))}getHeaderCheckboxCell(){const t=this.getSelectionColumnIndex();if(null===t)return null;const e=this.getCompositionalHeaderCells()[t];return e&&"checkbox"===e.getAttribute("type")?e:null}applyHeaderCheckboxState(){const e=this.getHeaderCheckboxCell();if(!e)return;const s=this.querySelectableBodyRows().map((e=>t.getRowIdForRow(e))).filter((t=>!!t)),r=s.filter((t=>this.selectedRowIds.includes(t))).length,i=s.length>0&&r===s.length,l=r>0&&!i;e.checked=i,e.indeterminate=l}syncRowSelectedProps(){this.queryBodyRows().forEach((e=>{const s=t.getRowIdForRow(e),r=!!s&&this.selectedRowIds.includes(s);e.selected=r}))}emitCompositionalSelection(){const t=this.selectedRowIds,e=t.join("");e!==this.lastEmittedRowSelectionKey&&(this.lastEmittedRowSelectionKey=e,this.rowSelectionChange.emit({selectedRowIds:[...t]}))}isEventFromThisTable(t){if(null==t||"object"!=typeof t)return!1;const e="closest"in t&&"function"==typeof t.closest?t:"parentElement"in t?t.parentElement:null;return!!e&&e.closest("xpl-table")===this.el}static sortKeyFromHeaderCell(t,e){const s=(t.sortKey??t.label??"").trim();return s.length>0?s.replace(/ /g,"-").toLowerCase():"column-"+e}handleCompositionalHeaderSort(e){if(this.isLegacyMode)return;if(!this.isEventFromThisTable(e.target))return;e.stopPropagation();const s=e.target,r=s.closest("xpl-table-header xpl-table-row")??s.closest("xpl-table-row");if(!r||!this.el.contains(r))return;const i=Array.from(r.querySelectorAll("xpl-table-header-cell")),{columnIndex:l}=e.detail,o=i[l];if(!o?.sortable)return;const n=h(o.sortDirection);i.forEach(((t,e)=>{t.sortable&&(t.sortDirection=e===l?n:null)}));const a={};i.forEach(((e,s)=>{const r=e;r.sortable&&(a[t.sortKeyFromHeaderCell(r,s)]=r.sortDirection??null)}));const c=i.map((t=>t.sortable?t.sortDirection??null:null)),d=t.sortKeyFromHeaderCell(i[l],l),u={...a,colNum:l,colName:d,sortTypeArr:c};this.sortChanged.emit(u)}legacySortStatePayload(){const t={};return this.columns?.length?(this.columns.forEach(((e,s)=>{const r=e.replace(/ /g,"-").toLowerCase();t[r]=this.sortTypeArray[s]??null})),t):t}legacySortChangedDetail(t){return{...this.legacySortStatePayload(),colNum:t,colName:(this.columns?.[t]??"").replace(/ /g,"-").toLowerCase(),sortTypeArr:[...this.sortTypeArray]}}getCompositionalHeaderCells(){const t=Array.from(this.el.children).find((t=>"xpl-table-header"===t.tagName.toLowerCase()))??null;if(!t)return[];const e=Array.from(t.children).find((t=>"xpl-table-row"===t.tagName.toLowerCase()));return Array.from((e??t).children).filter((t=>"xpl-table-header-cell"===t.tagName.toLowerCase()))}updateColumnWidths(){const t=this.getCompositionalHeaderCells(),e=t.map((t=>c(t))).join(" "),s=t.length;s===this.colCount&&this.colCount>0&&this.columnWidthsToken===e||(this.el.style.setProperty("--column-widths",e),this.colCount=s,this.columnWidthsToken=e)}handleSort(t,e,s){t.preventDefault(),t.stopPropagation(),e&&(this.sortTypeArray=this.sortTypeArray.map(((t,e)=>{if(e!==s)return null;switch(t){case"asc":return"desc";case"desc":return null;default:return"asc"}})),this.sortChanged.emit(this.legacySortChangedDetail(s)).defaultPrevented||this.sortBy(s,this.sortTypeArray))}renderLegacy(){return!this.columns||this.sortTypeArray&&this.sortTypeArray.length===this.columns.length||(this.sortTypeArray=this.columns.map((()=>null))),r(i,null,r("div",{class:"xpl-table-container",onScroll:this.onLegacyScroll,ref:t=>{t&&(this.container=t)}},r("table",{class:{"xpl-table":!0,"xpl-table--legacy":!0,"xpl-table--striped":!!this.striped,"xpl-table--freeze":!!this.freeze,"xpl-table--has-scrolled":this.hasScrolled}},this.columns&&r("thead",null,this.columns.map(((t,e)=>{const s=d(this.sortTypeArray?.[e]??null),i=!(!this.isSortable||!this.sortableColumns?.[e]);return r("th",null,r("label",{onClick:t=>this.handleSort(t,i,e),class:i?"cursor-pointer":""},this.multiselect&&0===e&&r("input",{checked:this.areAllSelected,id:"__xpl-table-th",indeterminate:!this.areAllSelected&&this.selected.some((t=>t)),onClick:t=>{t.stopPropagation(),this.selectAll(t)},type:"checkbox",value:this.selectAllValue}),t,i&&!!this.sortTypeArray[e]&&r("xpl-icon",{icon:s,size:16})))}))),r("tbody",null,this.rowData.map(((t,e)=>r("tr",{class:this.selected&&this.selected[e]?"xpl-table-row-selected":""},t.map(((t,s)=>r("td",null,this.multiselect&&0===s?r("label",{htmlFor:"__xpl-table-row-"+e},r("input",{id:"__xpl-table-row-"+e,checked:!!this.selected[e],type:"checkbox",onChange:t=>this.selectOne(t,e),value:this.selectedValues&&this.selectedValues.length>0?this.selectedValues[e]:"xpl-table-checkbox-"+e}),r("div",{innerHTML:t})):r("div",{innerHTML:t})))))))),this.rowFooterData?.length>0&&r("tfoot",null,this.rowFooterData.map((t=>r("tr",null,t.map((t=>r("td",null,r("div",{innerHTML:t})))))))))))}renderCompositional(){const t=this.selectedRowIds.length;return r(i,{role:"grid","aria-label":this.label,"aria-colcount":this.colCount>0?this.colCount:void 0,class:{"xpl-table":!0,"xpl-table--striped":!!this.striped,"xpl-table--freeze":!!this.freeze,"xpl-table--has-scrolled":this.hasScrolled,"xpl-table--selectable":!!this.selectable,"xpl-table--selection-active":!!this.selectable&&this.selectedRowIds.length>0,"xpl-table--row-reorderable":!!this.rowReorderable},onScroll:this.onGridScroll},this.rowReorderable&&r("div",{class:"xpl-table__reorder-live","aria-live":"assertive","aria-atomic":"true"},this.reorderLiveMessage),this.selectable&&r("div",{class:{"xpl-toolbar":!0,hidden:0===t,"xpl-table__toolbar":!0}},r("div",{class:"toolbar"},r("p",{class:"selected-item-count"},t," Selected"),r("div",{class:"actions"},r("slot",{name:"toolbar-actions-left"}),r("slot",{name:"toolbar-actions-right"})))),r("slot",null))}render(){return this.isLegacyMode?this.renderLegacy():this.renderCompositional()}get el(){return this}static get watchers(){return{columns:[{watchColumns:0}],data:[{watchData:0}],footer:[{watchFooterData:0}],reorderHandleIcon:[{watchReorderHandleIcon:0}],reorderHandleIconKeyboard:[{watchReorderHandleIconKeyboard:0}],rowReorderable:[{watchRowReorderable:0}],selectable:[{watchSelectable:0}]}}},[260,"xpl-table",{columns:[16],data:[16],footer:[16],freeze:[4],isSortable:[4,"is-sortable"],label:[1],multiselect:[4],reorderHandleIcon:[1,"reorder-handle-icon"],reorderHandleIconKeyboard:[1,"reorder-handle-icon-keyboard"],rowReorderable:[4,"row-reorderable"],selectable:[4],selectedValues:[16],sortableColumns:[16],striped:[4],areAllSelected:[32],colCount:[32],hasScrolled:[32],keyboardReorderRowId:[32],reorderLiveMessage:[32],rowData:[32],rowFooterData:[32],selected:[32],selectedRowIds:[32],sortTypeArray:[32]},[[0,"xplTableColumnWidthsChange","handleHeaderCellColumnWidthsChange"],[0,"checkboxChange","handleCompositionalCheckboxChange"],[0,"headerCheckboxChange","handleCompositionalHeaderCheckboxChange"],[3,"pointerdown","handlePointerDownExitKeyboardReorder"],[3,"pointerdown","handleRowReorderPointerDown"],[3,"dragstart","handleRowReorderDragStart"],[3,"dragend","handleRowReorderDragEnd"],[2,"dragover","handleRowReorderDragOver"],[2,"dragenter","handleRowReorderDragEnter"],[3,"dragleave","handleRowReorderDragLeave"],[2,"drop","handleRowReorderDrop"],[0,"headerSortChange","handleCompositionalHeaderSort"]],{columns:[{watchColumns:0}],data:[{watchData:0}],footer:[{watchFooterData:0}],reorderHandleIcon:[{watchReorderHandleIcon:0}],reorderHandleIconKeyboard:[{watchReorderHandleIconKeyboard:0}],rowReorderable:[{watchRowReorderable:0}],selectable:[{watchSelectable:0}]}]);m.selectAllSeq=0;const R=m,C=function(){"undefined"!=typeof customElements&&["xpl-table","xpl-checkbox","xpl-icon","xpl-table-cell","xpl-table-footer-cell","xpl-table-header-cell"].forEach((t=>{switch(t){case"xpl-table":customElements.get(l(t))||customElements.define(l(t),m);break;case"xpl-checkbox":customElements.get(l(t))||p();break;case"xpl-icon":customElements.get(l(t))||b();break;case"xpl-table-cell":customElements.get(l(t))||f();break;case"xpl-table-footer-cell":customElements.get(l(t))||x();break;case"xpl-table-header-cell":customElements.get(l(t))||u()}}))};export{R as XplTable,C as defineCustomElement}
1
+ import{p as t,H as e,d as s,h as r,c as i,t as l}from"./p-B_6p2HCL.js";import{T as o}from"./p-Dqb1pIRo.js";import{R as n,S as a,c as h,g as c,a as d,d as u}from"./p-BKajYWw6.js";import{d as p}from"./p-ULcrhk_V.js";import{d as b}from"./p-6-DvgBzG.js";import{d as f}from"./p-q4zX9LQ0.js";import{d as x}from"./p-Dn6HsGUr.js";function w(t){const e=t.parentElement;if(!e)return null;const s=Array.from(e.children),r=s.indexOf(t);if(-1===r)return null;for(let t=r+1;t<s.length;t+=1){const e=s[t];if("xpl-table-row"===e.tagName.toLowerCase()&&!e.hasAttribute("hidden"))return e}return null}function y(t){return function(t){const e=t instanceof HTMLElement?t:null;if(!e)return null;const s=e.closest("xpl-table-row");return null!=s?s:null}(t)}function g(t){return("function"==typeof t.composedPath?t.composedPath():[]).find((t=>t instanceof e&&"xpl-table-row"===t.tagName.toLowerCase()))??y(t.target)}const m=t(class t extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.rowOrderChange=s(this,"rowOrderChange",3),this.rowSelectionChange=s(this,"rowSelectionChange",3),this.sortChanged=s(this,"sortChanged",3),this.tableSelect=s(this,"tableSelect",7),this.columnWidthsToken="",this.lastEmittedRowSelectionKey="",this.draggedRow=null,this.pendingDragRow=null,this.pointerUpClearPending=null,this.reorderKeyboardTimers=new o,this.onReorderHandleKeydown=t=>{this.handleReorderHandleKeyDown(t)},this.areAllSelected=!1,this.colCount=0,this.hasScrolled=!1,this.keyboardReorderRowId=null,this.reorderLiveMessage="",this.rowData=[],this.rowFooterData=[],this.selected=[],this.selectedRowIds=[],this.sortTypeArray=[],this.isSortable=!1,this.rowReorderable=!1,this.selectedValues=[],this.sortableColumns=[],this.onGridScroll=t=>{this.hasScrolled=t.target.scrollLeft>0},this.selectAll=t=>{const{target:e}=t;if(!(e instanceof HTMLInputElement))return;const{checked:s}=e;this.areAllSelected=s,this.selected=this.selectedValues&&this.selectedValues.length>0?Array.from(this.el.querySelectorAll("tbody td:first-child input")).map((t=>s?t?.value:s)):this.selected.map((()=>s)),this.onSelectionChange()},this.selectOne=(t,e)=>{const{target:s}=t;if(!(s instanceof HTMLInputElement))return;const{checked:r,value:i}=s;this.areAllSelected=!1,this.selected=this.selected.map(((t,s)=>s!==e?t:this.selectedValues&&this.selectedValues.length>0&&r?i:r)),this.onSelectionChange()},this.onSelectionChange=()=>{this.tableSelect.emit({selected:this.selected,areAllSelected:this.areAllSelected})},this.onLegacyScroll=()=>{this.hasScrolled=this.container.scrollLeft>0},this.sortBy=(t,e)=>{const s=(e,s)=>e[t].toLocaleLowerCase()<s[t].toLocaleLowerCase()?-1:e[t].toLocaleLowerCase()>s[t].toLocaleLowerCase()?1:0;switch(e[t]){case"asc":this.rowData.sort(((t,e)=>s(t,e)));break;case"desc":this.rowData.sort(((t,e)=>s(e,t)));break;default:this.rowData=void 0!==this.data?Array.from(this.data):[],this.sortTypeArray[t]=null}this.rowData=Array.from(this.rowData)},this.setData=()=>{this.rowData=void 0!==this.data?Array.from(this.data):[]},this.setFooterData=()=>{this.rowFooterData=void 0!==this.footer?Array.from(this.footer):[]}}watchColumns(){this.sortTypeArray=this.columns?this.columns.map((()=>null)):[]}watchData(){this.setData()}watchFooterData(){this.setFooterData()}watchReorderHandleIcon(){!this.isLegacyMode&&this.rowReorderable&&this.syncInjectedReorderHandleIcons()}watchReorderHandleIconKeyboard(){!this.isLegacyMode&&this.rowReorderable&&this.syncInjectedReorderHandleIcons()}watchRowReorderable(t){this.isLegacyMode||t||(this.keyboardReorderRowId=null,this.syncReorderHandleKeyboardA11y(null),this.removeManagedReorderCells(),this.draggedRow=null,this.pendingDragRow=null,this.clearPendingDragListeners(),this.reorderLiveMessage="",this.queryBodyRows().forEach((t=>{t.removeAttribute("draggable"),t.querySelector(".xpl-table__row-drag-handle")?.removeAttribute("draggable"),t.classList.remove("xpl-table-row--dragging","xpl-table-row--drag-over")})),this.colCount=0,this.columnWidthsToken="")}watchSelectable(t){this.isLegacyMode||t||(this.selectedRowIds=[],this.lastEmittedRowSelectionKey="",this.colCount=0,this.columnWidthsToken="",this.syncRowSelectedProps())}componentWillLoad(){this.isLegacyMode&&(this.ensureSelectAllValue(),this.areAllSelected=!1,this.setData(),this.setFooterData(),this.selected=Array(this.rowData.length).fill(!1),this.sortTypeArray=this.columns?this.columns.map((()=>null)):[])}ensureSelectAllValue(){if(void 0!==this.selectAllValue)return;const e=this.el.id?.trim();if(e)return void(this.selectAllValue=e+"-select-all");const s=this.el.getAttribute("data-select-all-value");s?this.selectAllValue=s:(t.selectAllSeq+=1,this.selectAllValue="select-all-"+t.selectAllSeq,this.el.setAttribute("data-select-all-value",this.selectAllValue))}componentDidLoad(){this.isLegacyMode||this.syncCompositionalLayout()}componentDidUpdate(){this.isLegacyMode||this.syncCompositionalLayout()}disconnectedCallback(){this.clearPendingDragListeners(),this.detachReorderHandleKeydownListeners(),this.reorderKeyboardTimers.dispose(),void 0!==this.reorderAnnounceRaf&&(cancelAnimationFrame(this.reorderAnnounceRaf),this.reorderAnnounceRaf=void 0)}handleHeaderCellColumnWidthsChange(t){if(this.isLegacyMode)return;const e=t.target;e instanceof Node&&this.el.contains(e)&&this.updateColumnWidths()}handleCompositionalCheckboxChange(s){if(this.isLegacyMode||!this.selectable)return;if(!this.isEventFromThisTable(s.target))return;const r=s.composedPath?.()??[];let i=(r.length>0?r:[s.target].filter((t=>null!=t))).find((t=>t instanceof e&&"xpl-checkbox"===t.tagName.toLowerCase()));if(!i&&s.target&&"function"==typeof s.target.closest&&(i=s.target.closest("xpl-checkbox")??void 0),!i||!this.el.contains(i))return;const l=i.closest("xpl-table-row");if(!l||!this.isDirectChildBodyRow(l))return;const o=i.closest("xpl-table-cell");if(!o)return;const n=this.getSelectionColumnIndex();if(null===n)return;if(t.getBodyRowCells(l).indexOf(o)!==n)return;s.stopPropagation();const a=t.getRowIdForRow(l);if(!a||l.disabled)return;const h=i.querySelector('input[type="checkbox"]');if(!h)return;const{checked:c}=h;c?this.selectedRowIds.includes(a)||(this.selectedRowIds=[...this.selectedRowIds,a]):this.selectedRowIds=this.selectedRowIds.filter((t=>t!==a)),this.applyHeaderCheckboxState(),this.syncRowSelectedProps(),this.emitCompositionalSelection()}handleCompositionalHeaderCheckboxChange(s){if(this.isLegacyMode||!this.selectable)return;if(!this.isEventFromThisTable(s.target))return;const r=s.composedPath?.()??[];let i=(r.length>0?r:[s.target].filter((t=>null!=t))).find((t=>t instanceof e&&"xpl-table-header-cell"===t.tagName.toLowerCase()&&"checkbox"===t.getAttribute("type")));if(!i&&s.target&&"function"==typeof s.target.closest){const t=s.target.closest('xpl-table-header-cell[type="checkbox"]');t instanceof e&&(i=t)}if(!i||!this.el.contains(i))return;if(!this.isCellInOurCompositionalHeader(i))return;if(!this.getCompositionalHeaderCells().includes(i))return;const l=!!s.detail,o=this.querySelectableBodyRows().map((e=>t.getRowIdForRow(e))).filter((t=>!!t));this.selectedRowIds=l?[...o]:[],this.applyBodyCheckboxStates(),this.syncRowSelectedProps(),this.emitCompositionalSelection()}handlePointerDownExitKeyboardReorder(t){if(this.isLegacyMode||!this.rowReorderable||null===this.keyboardReorderRowId)return;const e=t.target;if(!(e instanceof Node&&this.el.contains(e)))return;const s=e instanceof Element?e.closest("xpl-table-row"):null;s&&this.isDirectChildBodyRow(s)&&(this.keyboardReorderRowId=null,this.syncReorderHandleKeyboardA11y(null))}handleReorderHandleKeyDown(s){if(this.isLegacyMode||!this.rowReorderable)return;const r="function"==typeof s.composedPath?s.composedPath():[];let i=(r.length>0?r:s.target?[s.target]:[]).find((t=>t instanceof e&&t.classList.contains("xpl-table__row-drag-handle")));if(!i&&s.target instanceof e&&s.target.classList.contains("xpl-table__row-drag-handle")&&(i=s.target),!i||!this.el.contains(i))return;const l=i.closest("xpl-table-row");if(!l||!this.isDirectChildBodyRow(l))return;const o=t.getRowIdForRow(l)??"";if(!o)return;const n=this.keyboardReorderRowId===o,a="Escape"===s.key||"Esc"===s.key||"Escape"===s.code||27===s.keyCode;l.disabled?a&&n&&(s.preventDefault(),this.keyboardReorderRowId=null,this.syncReorderHandleKeyboardA11y(null)):a?n&&(s.preventDefault(),this.keyboardReorderRowId=null,this.syncReorderHandleKeyboardA11y(null)):n?"ArrowUp"!==s.key&&"ArrowDown"!==s.key||(s.preventDefault(),this.performKeyboardRowReorder(o,"ArrowUp"===s.key?"up":"down")):"Enter"!==s.key&&" "!==s.key||(s.preventDefault(),this.keyboardReorderRowId=o,this.syncReorderHandleKeyboardA11y(o))}handleRowReorderPointerDown(t){if(this.isLegacyMode||!this.rowReorderable)return;const s=function(t){return("function"==typeof t.composedPath?t.composedPath():[]).find((t=>t instanceof e&&t.classList.contains("xpl-table__row-drag-handle")))??null}(t);if(!s)return;if(s.closest("xpl-table")!==this.el)return;const r=y(s);if(!r||r.disabled)return;const i=this.getDirectChildTableSection("xpl-table-body");if(!i||r.parentElement!==i)return;this.clearPendingDragListeners(),this.pendingDragRow=r;const l=()=>{this.clearPendingDragListeners(),this.pendingDragRow=null};document.addEventListener("pointerup",l,!0),document.addEventListener("pointercancel",l,!0),this.pointerUpClearPending=()=>{document.removeEventListener("pointerup",l,!0),document.removeEventListener("pointercancel",l,!0)}}handleRowReorderDragStart(e){if(this.isLegacyMode||!this.rowReorderable)return;const s=g(e);if(!s)return;if(s.closest("xpl-table")!==this.el)return;const r=this.getDirectChildTableSection("xpl-table-body");r&&s.parentElement===r&&(s.disabled||this.pendingDragRow!==s?e.preventDefault():(this.keyboardReorderRowId=null,this.syncReorderHandleKeyboardA11y(null),this.clearPendingDragListeners(),this.pendingDragRow=null,this.draggedRow=s,e.dataTransfer&&(e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/plain",t.getRowIdForRow(s)??"")),s.classList.add("xpl-table-row--dragging")))}handleRowReorderDragEnd(t){if(this.isLegacyMode||!this.rowReorderable)return;const e=g(t);e&&e.closest("xpl-table")===this.el&&(e.classList.remove("xpl-table-row--dragging"),this.clearReorderDragOverClasses(),this.draggedRow=null)}handleRowReorderDragOver(t){if(this.isLegacyMode||!this.rowReorderable)return;const e=g(t);if(!e||e.closest("xpl-table")!==this.el)return;const s=this.getDirectChildTableSection("xpl-table-body");s&&e.parentElement===s&&!e.disabled&&(t.preventDefault(),t.dataTransfer&&(t.dataTransfer.dropEffect="move"))}handleRowReorderDragEnter(t){if(this.isLegacyMode||!this.rowReorderable)return;const e=g(t);if(!e||e.closest("xpl-table")!==this.el)return;const s=this.getDirectChildTableSection("xpl-table-body");s&&e.parentElement===s&&!e.disabled&&(t.preventDefault(),e.classList.add("xpl-table-row--drag-over"))}handleRowReorderDragLeave(t){if(this.isLegacyMode||!this.rowReorderable)return;const e=g(t);if(!e||e.closest("xpl-table")!==this.el)return;const s=t.relatedTarget;s&&e.contains(s)||e.classList.remove("xpl-table-row--drag-over")}handleRowReorderDrop(e){if(this.isLegacyMode||!this.rowReorderable)return;e.preventDefault();const s=g(e);if(!s||s.closest("xpl-table")!==this.el)return;const r=this.getDirectChildTableSection("xpl-table-body");if(!r||s.parentElement!==r||s.disabled)return;const i=this.draggedRow;if(!i||i.disabled)return this.draggedRow=null,void this.clearReorderDragOverClasses();if(i===s)return void this.clearReorderDragOverClasses();const l=this.getVisibleBodyRowsForReorder(),o=l.indexOf(i),n=l.indexOf(s);if(-1===o||-1===n)return void this.clearReorderDragOverClasses();const a=o>n?"up":"down",h=t.getRowIdForRow(i)??"";!function(t,e,s){if(e===s||e.parentElement!==t)return;if(s.parentElement!==t)return;const r=Array.from(t.children).filter((t=>"xpl-table-row"===t.tagName.toLowerCase()&&!t.hasAttribute("hidden"))),i=r.indexOf(e),l=r.indexOf(s);if(-1!==i&&-1!==l&&i!==l)if(i<l){const r=w(s);t.insertBefore(e,r||null)}else t.insertBefore(e,s)}(r,i,s);const c=this.getVisibleBodyRowsForReorder().map((e=>t.getRowIdForRow(e)??""));this.rowOrderChange.emit({rowId:h,direction:a,orderedRowIds:c,fromIndex:o,toIndex:n}),this.announceRowReorder(h,c),this.clearReorderDragOverClasses(),this.selectable&&(this.applyBodyCheckboxStates(),this.applyHeaderCheckboxState(),this.syncRowSelectedProps()),this.updateColumnWidths()}get isLegacyMode(){return void 0!==this.columns||void 0!==this.data||void 0!==this.footer}ensureTableInstanceId(){this.tableInstanceId||(this.tableInstanceId="undefined"!=typeof crypto&&crypto.randomUUID?crypto.randomUUID():Math.random().toString(36).slice(2))}generateRowId(){return this.ensureTableInstanceId(),"undefined"!=typeof crypto&&crypto.randomUUID?`${this.tableInstanceId}-${crypto.randomUUID()}`:`${this.tableInstanceId}-${Math.random().toString(36).slice(2)}`}syncCompositionalLayout(){this.isLegacyMode||(this.rowReorderable?this.syncReorderColumn():this.removeManagedReorderCells(),this.selectable&&(this.ensureTableInstanceId(),this.pruneStaleSelectedRowIds(),this.ensureBodyRowIds(),this.applyBodyCheckboxStates(),this.applyHeaderCheckboxState(),this.syncRowSelectedProps()),this.rowReorderable&&this.selectable&&this.normalizeManagedColumnsOrder(),this.updateColumnWidths())}getDirectChildTableSection(t){return Array.from(this.el.children).find((e=>e.tagName.toLowerCase()===t))??null}isDirectChildBodyRow(t){const e=this.getDirectChildTableSection("xpl-table-body");return null!==e&&t.parentElement===e}isCellInOurCompositionalHeader(t){const e=t.closest("xpl-table-header");return null!==e&&e.parentElement===this.el}getSelectionColumnIndex(){const t=this.getCompositionalHeaderCells().findIndex((t=>"checkbox"===t.getAttribute("type")));return t>=0?t:null}static getBodyRowCells(t){return Array.from(t.children).filter((t=>"xpl-table-cell"===t.tagName.toLowerCase()))}queryBodyRows(){const t=this.getDirectChildTableSection("xpl-table-body");return t?Array.from(t.children).filter((t=>"xpl-table-row"===t.tagName.toLowerCase())):[]}querySelectableBodyRows(){return this.queryBodyRows().filter((t=>!t.disabled))}static getRowIdForRow(t){const e=t.getAttribute("row-id")?.trim();return e||null}ensureBodyRowIds(){this.queryBodyRows().forEach((e=>{t.getRowIdForRow(e)||e.setAttribute("row-id",this.generateRowId())}))}removeManagedReorderCells(){this.el.querySelectorAll(`[${n}]`).forEach((t=>{t instanceof Element&&t.closest("xpl-table")===this.el&&t.parentElement?.removeChild(t)}))}getSelectionSlotCellForReorderOrder(t){const e=this.getSelectionColumnIndex();if(null===e)return null;const s=Array.from(t.children)[e];if(!s)return null;const r=s.tagName.toLowerCase();return"xpl-table-header-cell"===r?"checkbox"===s.getAttribute("type")?s:null:"xpl-table-cell"===r?s.hasAttribute(a)||s.querySelector("xpl-checkbox")?s:null:"xpl-table-footer-cell"===r?s:null}normalizeManagedColumnsOrder(){const t=t=>{const e=t.querySelector(`:scope > [${n}]`),s=this.getSelectionSlotCellForReorderOrder(t);if(!e||!s)return;const r=Array.from(t.children);r.indexOf(e)>r.indexOf(s)&&t.insertBefore(e,s)},e=Array.from(this.el.children).find((t=>"xpl-table-header"===t.tagName.toLowerCase()))??null;if(e){const s=Array.from(e.children).find((t=>"xpl-table-row"===t.tagName.toLowerCase()));t(s??e)}this.queryBodyRows().forEach((e=>t(e)));const s=this.getDirectChildTableSection("xpl-table-footer");s&&Array.from(s.children).filter((t=>"xpl-table-row"===t.tagName.toLowerCase())).forEach((e=>t(e)))}syncReorderColumn(){this.rowReorderable&&!this.isLegacyMode&&(this.ensureBodyRowIds(),this.ensureHeaderReorderCell(),this.ensureBodyReorderCells(),this.ensureFooterReorderCells(),this.applyReorderRowDraggableState())}ensureHeaderReorderCell(){const t=Array.from(this.el.children).find((t=>"xpl-table-header"===t.tagName.toLowerCase()))??null;if(!t)return;const e=Array.from(t.children).find((t=>"xpl-table-row"===t.tagName.toLowerCase()))??t;if(Array.from(e.children).some((t=>"xpl-table-header-cell"===t.tagName.toLowerCase()&&t.hasAttribute(n))))return;const s=document.createElement("xpl-table-header-cell");s.setAttribute(n,""),s.setAttribute("type","empty"),s.setAttribute("width","48"),s.setAttribute("align","center"),e.insertBefore(s,e.firstChild)}ensureBodyReorderCells(){this.queryBodyRows().forEach((e=>{const s=Array.from(e.children).filter((t=>"xpl-table-cell"===t.tagName.toLowerCase()&&t.hasAttribute(n)));if(s.length>1)for(let t=1;t<s.length;t+=1)s[t].remove();let r=s[0];if(r)r.setAttribute("align","center");else{const s=document.createElement("xpl-table-cell");s.setAttribute(n,""),s.setAttribute("width","48"),s.setAttribute("align","center");const i=document.createElement("button");i.type="button",i.className="xpl-table__row-drag-handle",i.setAttribute("aria-label","Reorder row"),i.setAttribute("aria-pressed","false");const l=this.getResolvedIconForRow(t.getRowIdForRow(e)??"");if(l){const t=document.createElement("xpl-icon");t.setAttribute("icon",l),t.setAttribute("size","16"),i.appendChild(t)}s.appendChild(i),e.insertBefore(s,e.firstChild),r=s}const i=r.querySelector(".xpl-table__row-drag-handle");i&&(i.disabled=e.disabled)})),this.syncInjectedReorderHandleIcons(),this.attachReorderHandleKeydownListeners()}getResolvedIconForRow(t){return null!==this.keyboardReorderRowId&&""!==t&&t===this.keyboardReorderRowId?""===this.reorderHandleIconKeyboard?null:this.reorderHandleIconKeyboard??"caret-expand-y":""===this.reorderHandleIcon?null:this.reorderHandleIcon??"grip-dots-vertical"}syncInjectedReorderHandleIcons(){this.queryBodyRows().forEach((e=>{const s=e.querySelector(".xpl-table__row-drag-handle");if(!s)return;const r=t.getRowIdForRow(e)??"",i=this.getResolvedIconForRow(r);if(s.querySelectorAll("xpl-icon").forEach((t=>t.remove())),i){const t=document.createElement("xpl-icon");t.setAttribute("icon",i),t.setAttribute("size","16"),s.appendChild(t)}}))}syncReorderHandleKeyboardA11y(e){!this.isLegacyMode&&this.rowReorderable&&(this.queryBodyRows().forEach((s=>{const r=s.querySelector(".xpl-table__row-drag-handle");if(!r)return;const i=t.getRowIdForRow(s)??"",l=null!==e&&i===e;r.classList.toggle("xpl-table__row-drag-handle--keyboard-mode",l),r.setAttribute("aria-pressed",l?"true":"false"),r.setAttribute("aria-label",l?"Press arrow up or down to reorder, Escape to exit":"Press Enter or Space to activate keyboard reorder mode, or drag to reorder")})),this.syncInjectedReorderHandleIcons())}attachReorderHandleKeydownListeners(){!this.isLegacyMode&&this.rowReorderable&&this.queryBodyRows().forEach((t=>{const e=t.querySelector(".xpl-table__row-drag-handle");e&&"true"!==e.dataset.xplReorderKbdBound&&(e.dataset.xplReorderKbdBound="true",e.addEventListener("keydown",this.onReorderHandleKeydown))}))}detachReorderHandleKeydownListeners(){this.el&&this.el.querySelectorAll('.xpl-table__row-drag-handle[data-xpl-reorder-kbd-bound="true"]').forEach((t=>{t.removeEventListener("keydown",this.onReorderHandleKeydown),delete t.dataset.xplReorderKbdBound}))}performKeyboardRowReorder(e,s){const r=this.getDirectChildTableSection("xpl-table-body");if(!r)return!1;const i=this.getVisibleBodyRowsForReorder(),l=i.findIndex((s=>t.getRowIdForRow(s)===e));if(-1===l)return!1;const o="up"===s?l-1:l+1;if(o<0||o>=i.length)return!1;const n=l,a=i[l],h=i[o];if("up"===s)r.insertBefore(a,h);else{const t=w(h);t?r.insertBefore(a,t):r.appendChild(a)}const c=this.getVisibleBodyRowsForReorder().map((e=>t.getRowIdForRow(e)??"")),d=c.indexOf(e);return this.rowOrderChange.emit({rowId:e,direction:s,orderedRowIds:c,fromIndex:n,toIndex:d}),this.announceRowReorder(e,c),this.clearReorderDragOverClasses(),this.selectable&&(this.applyBodyCheckboxStates(),this.applyHeaderCheckboxState(),this.syncRowSelectedProps()),this.updateColumnWidths(),this.reorderKeyboardTimers.requestAnimationFrame((()=>{if(!this.el.isConnected)return;const s=this.getVisibleBodyRowsForReorder().find((s=>t.getRowIdForRow(s)===e)),r=s?.querySelector(".xpl-table__row-drag-handle");r?.focus()})),!0}ensureFooterReorderCells(){const t=this.getDirectChildTableSection("xpl-table-footer");t&&Array.from(t.children).filter((t=>"xpl-table-row"===t.tagName.toLowerCase())).forEach((t=>{if(Array.from(t.children).some((t=>"xpl-table-footer-cell"===t.tagName.toLowerCase()&&t.hasAttribute(n))))return;const e=document.createElement("xpl-table-footer-cell");e.setAttribute(n,""),e.setAttribute("width","48"),e.setAttribute("align","center"),t.insertBefore(e,t.firstChild)}))}static supportsSubgridBodyRow(){return"undefined"!=typeof CSS&&"function"==typeof CSS.supports&&CSS.supports("grid-template-columns","subgrid")}applyReorderRowDraggableState(){const e=t.supportsSubgridBodyRow();this.queryBodyRows().forEach((t=>{const s=t.querySelector(".xpl-table__row-drag-handle");s?.removeAttribute("draggable"),t.removeAttribute("draggable"),this.rowReorderable&&!t.disabled&&s&&(e?t.setAttribute("draggable","true"):s.setAttribute("draggable","true"))}))}getVisibleBodyRowsForReorder(){return this.queryBodyRows().filter((t=>!t.hasAttribute("hidden")))}clearReorderDragOverClasses(){this.queryBodyRows().forEach((t=>t.classList.remove("xpl-table-row--drag-over")))}clearPendingDragListeners(){this.pointerUpClearPending&&(this.pointerUpClearPending(),this.pointerUpClearPending=null)}announceRowReorder(t,e){if(!this.rowReorderable||!t)return;const s=e.indexOf(t);s<0||(this.reorderLiveMessage="",void 0!==this.reorderAnnounceRaf&&cancelAnimationFrame(this.reorderAnnounceRaf),this.reorderAnnounceRaf=requestAnimationFrame((()=>{this.reorderAnnounceRaf=void 0,this.el.isConnected&&(this.reorderLiveMessage=`Row ${t}, now position ${s+1} of ${e.length}`)})))}pruneStaleSelectedRowIds(){const e=new Set(this.queryBodyRows().map((e=>t.getRowIdForRow(e))).filter((t=>!!t))),s=this.selectedRowIds.filter((t=>e.has(t)));s.length!==this.selectedRowIds.length&&(this.selectedRowIds=s,this.applyBodyCheckboxStates(),this.applyHeaderCheckboxState(),this.syncRowSelectedProps(),this.emitCompositionalSelection())}static getBodyRowCheckboxAriaLabel(e,s){const r=t.getBodyRowCells(e),i=r.find(((t,e)=>(null===s||e!==s)&&!t.hasAttribute(n)))??r[0];if(!i)return"Select row";const l=i.textContent?.replace(/\s+/g," ").trim()??"";return l?"Select row, "+(l.length>100?l.slice(0,100)+"…":l):"Select row"}applyBodyCheckboxStates(){const e=this.getSelectionColumnIndex();null!==e&&this.queryBodyRows().forEach((s=>{const r=t.getRowIdForRow(s),i=t.getBodyRowCells(s)[e],l=i?.querySelector("xpl-checkbox");l&&r&&(l.checked=this.selectedRowIds.includes(r),l.disabled=s.disabled,l.value=r,l.setAttribute("aria-label",t.getBodyRowCheckboxAriaLabel(s,e)))}))}getHeaderCheckboxCell(){const t=this.getSelectionColumnIndex();if(null===t)return null;const e=this.getCompositionalHeaderCells()[t];return e&&"checkbox"===e.getAttribute("type")?e:null}applyHeaderCheckboxState(){const e=this.getHeaderCheckboxCell();if(!e)return;const s=this.querySelectableBodyRows().map((e=>t.getRowIdForRow(e))).filter((t=>!!t)),r=s.filter((t=>this.selectedRowIds.includes(t))).length,i=s.length>0&&r===s.length,l=r>0&&!i;e.checked=i,e.indeterminate=l}syncRowSelectedProps(){this.queryBodyRows().forEach((e=>{const s=t.getRowIdForRow(e),r=!!s&&this.selectedRowIds.includes(s);e.selected=r}))}emitCompositionalSelection(){const t=this.selectedRowIds,e=t.join("");e!==this.lastEmittedRowSelectionKey&&(this.lastEmittedRowSelectionKey=e,this.rowSelectionChange.emit({selectedRowIds:[...t]}))}isEventFromThisTable(t){if(null==t||"object"!=typeof t)return!1;const e="closest"in t&&"function"==typeof t.closest?t:"parentElement"in t?t.parentElement:null;return!!e&&e.closest("xpl-table")===this.el}static sortKeyFromHeaderCell(t,e){const s=(t.sortKey??t.label??"").trim();return s.length>0?s.replace(/ /g,"-").toLowerCase():"column-"+e}handleCompositionalHeaderSort(e){if(this.isLegacyMode)return;if(!this.isEventFromThisTable(e.target))return;e.stopPropagation();const s=e.target,r=s.closest("xpl-table-header xpl-table-row")??s.closest("xpl-table-row");if(!r||!this.el.contains(r))return;const i=Array.from(r.querySelectorAll("xpl-table-header-cell")),{columnIndex:l}=e.detail,o=i[l];if(!o?.sortable)return;const n=h(o.sortDirection);i.forEach(((t,e)=>{t.sortable&&(t.sortDirection=e===l?n:null)}));const a={};i.forEach(((e,s)=>{const r=e;r.sortable&&(a[t.sortKeyFromHeaderCell(r,s)]=r.sortDirection??null)}));const c=i.map((t=>t.sortable?t.sortDirection??null:null)),d=t.sortKeyFromHeaderCell(i[l],l),u={...a,colNum:l,colName:d,sortTypeArr:c};this.sortChanged.emit(u)}legacySortStatePayload(){const t={};return this.columns?.length?(this.columns.forEach(((e,s)=>{const r=e.replace(/ /g,"-").toLowerCase();t[r]=this.sortTypeArray[s]??null})),t):t}legacySortChangedDetail(t){return{...this.legacySortStatePayload(),colNum:t,colName:(this.columns?.[t]??"").replace(/ /g,"-").toLowerCase(),sortTypeArr:[...this.sortTypeArray]}}getCompositionalHeaderCells(){const t=Array.from(this.el.children).find((t=>"xpl-table-header"===t.tagName.toLowerCase()))??null;if(!t)return[];const e=Array.from(t.children).find((t=>"xpl-table-row"===t.tagName.toLowerCase()));return Array.from((e??t).children).filter((t=>"xpl-table-header-cell"===t.tagName.toLowerCase()))}updateColumnWidths(){const t=this.getCompositionalHeaderCells(),e=t.map((t=>c(t))).join(" "),s=t.length;s===this.colCount&&this.colCount>0&&this.columnWidthsToken===e||(this.el.style.setProperty("--column-widths",e),this.colCount=s,this.columnWidthsToken=e)}handleSort(t,e,s){t.preventDefault(),t.stopPropagation(),e&&(this.sortTypeArray=this.sortTypeArray.map(((t,e)=>{if(e!==s)return null;switch(t){case"asc":return"desc";case"desc":return null;default:return"asc"}})),this.sortChanged.emit(this.legacySortChangedDetail(s)).defaultPrevented||this.sortBy(s,this.sortTypeArray))}renderLegacy(){return!this.columns||this.sortTypeArray&&this.sortTypeArray.length===this.columns.length||(this.sortTypeArray=this.columns.map((()=>null))),r(i,null,r("div",{class:"xpl-table-container",onScroll:this.onLegacyScroll,ref:t=>{t&&(this.container=t)}},r("table",{class:{"xpl-table":!0,"xpl-table--legacy":!0,"xpl-table--striped":!!this.striped,"xpl-table--freeze":!!this.freeze,"xpl-table--has-scrolled":this.hasScrolled}},this.columns&&r("thead",null,this.columns.map(((t,e)=>{const s=d(this.sortTypeArray?.[e]??null),i=!(!this.isSortable||!this.sortableColumns?.[e]);return r("th",null,r("label",{onClick:t=>this.handleSort(t,i,e),class:i?"cursor-pointer":""},this.multiselect&&0===e&&r("input",{checked:this.areAllSelected,id:"__xpl-table-th",indeterminate:!this.areAllSelected&&this.selected.some((t=>t)),onClick:t=>{t.stopPropagation(),this.selectAll(t)},type:"checkbox",value:this.selectAllValue}),t,i&&!!this.sortTypeArray[e]&&r("xpl-icon",{icon:s,size:16})))}))),r("tbody",null,this.rowData.map(((t,e)=>r("tr",{class:this.selected&&this.selected[e]?"xpl-table-row-selected":""},t.map(((t,s)=>r("td",null,this.multiselect&&0===s?r("label",{htmlFor:"__xpl-table-row-"+e},r("input",{id:"__xpl-table-row-"+e,checked:!!this.selected[e],type:"checkbox",onChange:t=>this.selectOne(t,e),value:this.selectedValues&&this.selectedValues.length>0?this.selectedValues[e]:"xpl-table-checkbox-"+e}),r("div",{innerHTML:t})):r("div",{innerHTML:t})))))))),this.rowFooterData?.length>0&&r("tfoot",null,this.rowFooterData.map((t=>r("tr",null,t.map((t=>r("td",null,r("div",{innerHTML:t})))))))))))}renderCompositional(){const t=this.selectedRowIds.length;return r(i,{role:"grid","aria-label":this.label,"aria-colcount":this.colCount>0?this.colCount:void 0,class:{"xpl-table":!0,"xpl-table--striped":!!this.striped,"xpl-table--freeze":!!this.freeze,"xpl-table--has-scrolled":this.hasScrolled,"xpl-table--selectable":!!this.selectable,"xpl-table--selection-active":!!this.selectable&&this.selectedRowIds.length>0,"xpl-table--row-reorderable":!!this.rowReorderable},onScroll:this.onGridScroll},this.rowReorderable&&r("div",{class:"xpl-table__reorder-live","aria-live":"assertive","aria-atomic":"true"},this.reorderLiveMessage),this.selectable&&r("div",{class:{"xpl-toolbar":!0,hidden:0===t,"xpl-table__toolbar":!0}},r("div",{class:"toolbar"},r("p",{class:"selected-item-count"},t," Selected"),r("div",{class:"actions"},r("slot",{name:"toolbar-actions-left"}),r("slot",{name:"toolbar-actions-right"})))),r("slot",null))}render(){return this.isLegacyMode?this.renderLegacy():this.renderCompositional()}get el(){return this}static get watchers(){return{columns:[{watchColumns:0}],data:[{watchData:0}],footer:[{watchFooterData:0}],reorderHandleIcon:[{watchReorderHandleIcon:0}],reorderHandleIconKeyboard:[{watchReorderHandleIconKeyboard:0}],rowReorderable:[{watchRowReorderable:0}],selectable:[{watchSelectable:0}]}}},[260,"xpl-table",{columns:[16],data:[16],footer:[16],freeze:[4],isSortable:[4,"is-sortable"],label:[1],multiselect:[4],reorderHandleIcon:[1,"reorder-handle-icon"],reorderHandleIconKeyboard:[1,"reorder-handle-icon-keyboard"],rowReorderable:[4,"row-reorderable"],selectable:[4],selectedValues:[16],sortableColumns:[16],striped:[4],areAllSelected:[32],colCount:[32],hasScrolled:[32],keyboardReorderRowId:[32],reorderLiveMessage:[32],rowData:[32],rowFooterData:[32],selected:[32],selectedRowIds:[32],sortTypeArray:[32]},[[0,"xplTableColumnWidthsChange","handleHeaderCellColumnWidthsChange"],[0,"checkboxChange","handleCompositionalCheckboxChange"],[0,"headerCheckboxChange","handleCompositionalHeaderCheckboxChange"],[3,"pointerdown","handlePointerDownExitKeyboardReorder"],[3,"pointerdown","handleRowReorderPointerDown"],[3,"dragstart","handleRowReorderDragStart"],[3,"dragend","handleRowReorderDragEnd"],[2,"dragover","handleRowReorderDragOver"],[2,"dragenter","handleRowReorderDragEnter"],[3,"dragleave","handleRowReorderDragLeave"],[2,"drop","handleRowReorderDrop"],[0,"headerSortChange","handleCompositionalHeaderSort"]],{columns:[{watchColumns:0}],data:[{watchData:0}],footer:[{watchFooterData:0}],reorderHandleIcon:[{watchReorderHandleIcon:0}],reorderHandleIconKeyboard:[{watchReorderHandleIconKeyboard:0}],rowReorderable:[{watchRowReorderable:0}],selectable:[{watchSelectable:0}]}]);m.selectAllSeq=0;const R=m,C=function(){"undefined"!=typeof customElements&&["xpl-table","xpl-checkbox","xpl-icon","xpl-table-cell","xpl-table-footer-cell","xpl-table-header-cell"].forEach((t=>{switch(t){case"xpl-table":customElements.get(l(t))||customElements.define(l(t),m);break;case"xpl-checkbox":customElements.get(l(t))||p();break;case"xpl-icon":customElements.get(l(t))||b();break;case"xpl-table-cell":customElements.get(l(t))||f();break;case"xpl-table-footer-cell":customElements.get(l(t))||x();break;case"xpl-table-header-cell":customElements.get(l(t))||u()}}))};export{R as XplTable,C as defineCustomElement}
@@ -1 +1 @@
1
- import{p as t,H as s,d as e,h as i,c as a,t as n}from"./p-BqhTjJWq.js";import{d as o}from"./p-CjzUVpyd.js";import{d as h}from"./p-2XxO7M15.js";import{d as l}from"./p-BWAytJnz.js";import{d as r}from"./p-DHxDWgLP.js";import{d}from"./p-Bh-U2qmp.js";import{d as c}from"./p-Cop4KmAG.js";import{d as p}from"./p-BZrSTAV1.js";let b=0;function u(t){const e=t.querySelector("xpl-button button");if(e){const t=e.cloneNode(!0);if(t instanceof s){t.querySelectorAll(".xpl-button__icon, xpl-icon, xpl-badge").forEach((t=>t.remove()));const s=t.textContent?.replace(/\s+/g," ").trim();if(s)return s}}const i=t.querySelector(".xpl-tab__button");if(i){const t=Array.from(i.childNodes).filter((t=>t.nodeType===Node.TEXT_NODE)).map((t=>(t.textContent??"").trim())).join(" ").replace(/\s+/g," ").trim();if(t)return t}return t.getAttribute("target")??""}const f=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.tabChange=e(this,"tabChange",7),this.tabHeadings=[],this.tabPanels=[],this.tablistKeydownBound=!1,this.activeBarPosition={left:0,width:0},this.choicesTick=1,this.isMobileSelectChange=!1,this.selectedValue="",this.disabled=!1,this.fullWidth=!1,this.type="tabs",this.handleTabChange=t=>{this.applySelection(t)},this.onTablistKeydown=async t=>{if(this.disabled)return;const s=t.target?.closest?.("xpl-tab");if(!s||!this.tabHeadings.includes(s))return;const{key:e}=t;let i=!1,a=!1;this.isTablistRtl()?"ArrowLeft"===e||"ArrowDown"===e?i=!0:"ArrowRight"!==e&&"ArrowUp"!==e||(a=!0):"ArrowRight"===e||"ArrowDown"===e?i=!0:"ArrowLeft"!==e&&"ArrowUp"!==e||(a=!0);const n=i||a,o="Home"===e;if(!n&&!o&&"End"!==e)return;const h=this.getEnabledTabHeadingsSync();if(0===h.length)return;const l=h.indexOf(s);if(-1===l)return;let r;r=n?i?(l+1)%h.length:(l-1+h.length)%h.length:o?0:h.length-1;const d=h[r],c=d?.getAttribute("target");if(!c)return;const p=s.getAttribute("target");t.preventDefault(),c!==p&&(this.applySelection(c),await d.focusTrigger(),this.tabChange.emit(c))}}onDisabledChanged(){this.syncGroupDisabledOnTabs(),this.disabled||this.syncRovingTabindex()}onFullWidthChanged(){this.syncFullWidthOnTabs()}onTypeChanged(){this.syncVariantOnTabs()}onValueChanged(t){this.applySelection(t)}connectedCallback(){this.el.hasAttribute("data-tabs-instance-id")||(b+=1,this.el.setAttribute("data-tabs-instance-id","xpl-tg-"+b)),"undefined"!=typeof MutationObserver&&(this.observer=new MutationObserver((()=>{this.collectTabs(!0)})),this.observer.observe(this.el,{childList:!0,subtree:!0}))}disconnectedCallback(){this.observer?.disconnect(),this.headingsContainerRef&&this.tablistKeydownBound&&(this.headingsContainerRef.removeEventListener("keydown",this.onTablistKeydown),this.tablistKeydownBound=!1),void 0!==this.rafId&&(cancelAnimationFrame(this.rafId),this.rafId=void 0)}componentWillLoad(){this.selectedValue=this.getDefaultValue()}componentDidLoad(){this.collectTabs(!1),this.attachTablistKeydown()}componentDidUpdate(){this.updateActiveBarPosition(),this.syncRovingTabindex()}componentDidRender(){!this.tablistKeydownBound&&this.headingsContainerRef&&this.attachTablistKeydown()}onWindowResize(){this.updateActiveBarPosition()}syncGroupDisabledOnTabs(){this.tabHeadings.forEach((t=>{this.disabled?t.setAttribute("data-group-disabled",""):t.removeAttribute("data-group-disabled")}))}applySelection(t){this.tabHeadings.forEach((s=>{t===s.getAttribute("target")?s.setAttribute("selected",""):s.removeAttribute("selected")})),this.tabPanels.forEach((s=>{t===s.getAttribute("target")?s.setAttribute("selected",""):s.removeAttribute("selected")})),this.syncGroupDisabledOnTabs(),void 0!==this.rafId&&cancelAnimationFrame(this.rafId),this.rafId=requestAnimationFrame((()=>{this.rafId=void 0,this.selectedValue=t,this.updateActiveBarPosition(),this.syncRovingTabindex()}))}isOwnedTabOrPanel(t){return t.closest("xpl-tabs")===this.el}collectTabs(t){this.tabHeadings=Array.from(this.el.querySelectorAll("xpl-tab")).filter((t=>this.isOwnedTabOrPanel(t))),this.tabPanels=Array.from(this.el.querySelectorAll("xpl-tab-panel")).filter((t=>this.isOwnedTabOrPanel(t))),this.syncVariantOnTabs(),this.syncFullWidthOnTabs(),this.applySelection(this.getDefaultValue()),t&&(this.choicesTick+=1)}syncVariantOnTabs(){this.tabHeadings.forEach((t=>{t.variant=this.type}))}syncFullWidthOnTabs(){this.tabHeadings.forEach((t=>{t.fullWidth=this.fullWidth}))}getDefaultValue(){return this.value||this.tabHeadings?.[0]?.getAttribute("target")||""}async syncRovingTabindex(){this.disabled||await Promise.all(this.tabHeadings.map((async t=>{const s=(t.getAttribute("target")??"")===this.selectedValue;await t.setTabIndex(s?0:-1)})))}getEnabledTabHeadingsSync(){return this.tabHeadings.filter((t=>{if(this.disabled||t.hasAttribute("disabled"))return!1;const s=t.querySelector("segment"===t.variant?"xpl-button button":".xpl-tab__button");return!(!s||s.disabled)}))}attachTablistKeydown(){const t=this.headingsContainerRef;t&&!this.tablistKeydownBound&&(t.addEventListener("keydown",this.onTablistKeydown),this.tablistKeydownBound=!0)}isTablistRtl(){const t=this.headingsContainerRef;return!!t&&"rtl"===getComputedStyle(t).direction}renderChoices(){return this.tabHeadings.map((t=>{const s=t.getAttribute("target")??"",e=this.disabled||t.hasAttribute("disabled"),i=t.getAttribute("icon")||void 0;return{label:u(t),value:s,isDisabled:e,...i?{icon:i}:{}}}))}updateActiveBarPosition(){if("segment"===this.type)return;const t=this.tabHeadings.find((t=>t.getAttribute("target")===this.selectedValue));if(!this.headingsContainerRef||!t)return;const s=t.getBoundingClientRect(),e=this.headingsContainerRef.getBoundingClientRect(),i=s.left-e.left,a=s.width;this.activeBarPosition.left===i&&this.activeBarPosition.width===a||(this.activeBarPosition={left:i,width:a})}mobileSelectClassNames(){const t="xpl-tabs__mobile-select";return"segment"===this.type?t+" xpl-tabs__mobile-select--segment":t}render(){const t="segment"===this.type;return i(a,{key:"0bb77237fce464cc536ce4efabb29249fa14ef4a",class:{"xpl-tabs":!0,"xpl-tabs--full-width":this.fullWidth,"xpl-tabs--segment":t},"data-choices-tick":this.choicesTick},i("xpl-select",{key:"fbcc113cc9a308df73bf99f6c941612725e49ddb",classNames:this.mobileSelectClassNames(),choices:this.renderChoices(),disabled:this.disabled,selectedValues:this.selectedValue,onDropdownStateChange:t=>{t.detail&&(this.isMobileSelectChange=!0)},onChangeEvent:t=>{if(this.isMobileSelectChange){const s=""+t.detail;this.handleTabChange(s),this.tabChange.emit(s),this.isMobileSelectChange=!1}}}),i("nav",{key:"1b93068116c5ff0ac94d5139e147daffc1157c73","aria-orientation":"horizontal",class:"xpl-tabs__headings",role:"tablist",ref:t=>{this.headingsContainerRef=t},onTabChange:t=>{t.stopPropagation(),this.isMobileSelectChange=!1,this.handleTabChange(t.detail),this.tabChange.emit(t.detail)}},!t&&i("div",{key:"38a88df2520d308e3a22b4cd70ff274af7403616",class:"xpl-tabs__active-bar",style:{transform:`translateX(${this.activeBarPosition.left}px)`,width:this.activeBarPosition.width+"px"}}),i("slot",{key:"dc30ab2123d7c1c8b6591ac0129af44da3795977",name:"heading"})),i("div",{key:"36c1fc45216499d4af87b8fc536df3ea6af666ab",class:"xpl-tabs__panels"},i("slot",{key:"a660913c7d2fce500da666490b600b4c7fc93746",name:"panel"})))}get el(){return this}static get watchers(){return{disabled:[{onDisabledChanged:0}],fullWidth:[{onFullWidthChanged:0}],type:[{onTypeChanged:0}],value:[{onValueChanged:0}]}}},[260,"xpl-tabs",{disabled:[4],fullWidth:[4,"full-width"],type:[513],value:[1],activeBarPosition:[32],choicesTick:[32],isMobileSelectChange:[32],selectedValue:[32]},[[9,"resize","onWindowResize"]],{disabled:[{onDisabledChanged:0}],fullWidth:[{onFullWidthChanged:0}],type:[{onTypeChanged:0}],value:[{onValueChanged:0}]}]),m=f,g=function(){"undefined"!=typeof customElements&&["xpl-tabs","xpl-dropdown","xpl-dropdown-group","xpl-dropdown-heading","xpl-dropdown-option","xpl-icon","xpl-select","xpl-tag"].forEach((t=>{switch(t){case"xpl-tabs":customElements.get(n(t))||customElements.define(n(t),f);break;case"xpl-dropdown":customElements.get(n(t))||o();break;case"xpl-dropdown-group":customElements.get(n(t))||h();break;case"xpl-dropdown-heading":customElements.get(n(t))||l();break;case"xpl-dropdown-option":customElements.get(n(t))||r();break;case"xpl-icon":customElements.get(n(t))||d();break;case"xpl-select":customElements.get(n(t))||c();break;case"xpl-tag":customElements.get(n(t))||p()}}))};export{m as XplTabs,g as defineCustomElement}
1
+ import{p as t,H as s,d as e,h as i,c as a,t as n}from"./p-B_6p2HCL.js";import{d as o}from"./p-L9wSxXlk.js";import{d as h}from"./p-FS6KZMQV.js";import{d as l}from"./p-Fj_zi29t.js";import{d as r}from"./p-B54F4o_Z.js";import{d as c}from"./p-6-DvgBzG.js";import{d}from"./p-BFUtaXqX.js";import{d as p}from"./p-CthHapLu.js";let b=0;function u(t){const e=t.querySelector("xpl-button button");if(e){const t=e.cloneNode(!0);if(t instanceof s){t.querySelectorAll(".xpl-button__icon, xpl-icon, xpl-badge").forEach((t=>t.remove()));const s=t.textContent?.replace(/\s+/g," ").trim();if(s)return s}}const i=t.querySelector(".xpl-tab__button");if(i){const t=Array.from(i.childNodes).filter((t=>t.nodeType===Node.TEXT_NODE)).map((t=>(t.textContent??"").trim())).join(" ").replace(/\s+/g," ").trim();if(t)return t}return t.getAttribute("target")??""}const f=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.tabChange=e(this,"tabChange",7),this.tabHeadings=[],this.tabPanels=[],this.tablistKeydownBound=!1,this.activeBarPosition={left:0,width:0},this.choicesTick=1,this.isMobileSelectChange=!1,this.selectedValue="",this.disabled=!1,this.fullWidth=!1,this.type="tabs",this.handleTabChange=t=>{this.applySelection(t)},this.onTablistKeydown=async t=>{if(this.disabled)return;const s=t.target?.closest?.("xpl-tab");if(!s||!this.tabHeadings.includes(s))return;const{key:e}=t;let i=!1,a=!1;this.isTablistRtl()?"ArrowLeft"===e||"ArrowDown"===e?i=!0:"ArrowRight"!==e&&"ArrowUp"!==e||(a=!0):"ArrowRight"===e||"ArrowDown"===e?i=!0:"ArrowLeft"!==e&&"ArrowUp"!==e||(a=!0);const n=i||a,o="Home"===e;if(!n&&!o&&"End"!==e)return;const h=this.getEnabledTabHeadingsSync();if(0===h.length)return;const l=h.indexOf(s);if(-1===l)return;let r;r=n?i?(l+1)%h.length:(l-1+h.length)%h.length:o?0:h.length-1;const c=h[r],d=c?.getAttribute("target");if(!d)return;const p=s.getAttribute("target");t.preventDefault(),d!==p&&(this.applySelection(d),await c.focusTrigger(),this.tabChange.emit(d))}}onDisabledChanged(){this.syncGroupDisabledOnTabs(),this.disabled||this.syncRovingTabindex()}onFullWidthChanged(){this.syncFullWidthOnTabs()}onTypeChanged(){this.syncVariantOnTabs()}onValueChanged(t){this.applySelection(t)}connectedCallback(){this.el.hasAttribute("data-tabs-instance-id")||(b+=1,this.el.setAttribute("data-tabs-instance-id","xpl-tg-"+b)),"undefined"!=typeof MutationObserver&&(this.observer=new MutationObserver((()=>{this.collectTabs(!0)})),this.observer.observe(this.el,{childList:!0,subtree:!0}))}disconnectedCallback(){this.observer?.disconnect(),this.headingsContainerRef&&this.tablistKeydownBound&&(this.headingsContainerRef.removeEventListener("keydown",this.onTablistKeydown),this.tablistKeydownBound=!1),void 0!==this.rafId&&(cancelAnimationFrame(this.rafId),this.rafId=void 0)}componentWillLoad(){this.selectedValue=this.getDefaultValue()}componentDidLoad(){this.collectTabs(!1),this.attachTablistKeydown()}componentDidUpdate(){this.updateActiveBarPosition(),this.syncRovingTabindex()}componentDidRender(){!this.tablistKeydownBound&&this.headingsContainerRef&&this.attachTablistKeydown()}onWindowResize(){this.updateActiveBarPosition()}syncGroupDisabledOnTabs(){this.tabHeadings.forEach((t=>{this.disabled?t.setAttribute("data-group-disabled",""):t.removeAttribute("data-group-disabled")}))}applySelection(t){this.tabHeadings.forEach((s=>{t===s.getAttribute("target")?s.setAttribute("selected",""):s.removeAttribute("selected")})),this.tabPanels.forEach((s=>{t===s.getAttribute("target")?s.setAttribute("selected",""):s.removeAttribute("selected")})),this.syncGroupDisabledOnTabs(),void 0!==this.rafId&&cancelAnimationFrame(this.rafId),this.rafId=requestAnimationFrame((()=>{this.rafId=void 0,this.selectedValue=t,this.updateActiveBarPosition(),this.syncRovingTabindex()}))}isOwnedTabOrPanel(t){return t.closest("xpl-tabs")===this.el}collectTabs(t){this.tabHeadings=Array.from(this.el.querySelectorAll("xpl-tab")).filter((t=>this.isOwnedTabOrPanel(t))),this.tabPanels=Array.from(this.el.querySelectorAll("xpl-tab-panel")).filter((t=>this.isOwnedTabOrPanel(t))),this.syncVariantOnTabs(),this.syncFullWidthOnTabs(),this.applySelection(this.getDefaultValue()),t&&(this.choicesTick+=1)}syncVariantOnTabs(){this.tabHeadings.forEach((t=>{t.variant=this.type}))}syncFullWidthOnTabs(){this.tabHeadings.forEach((t=>{t.fullWidth=this.fullWidth}))}getDefaultValue(){return this.value||this.tabHeadings?.[0]?.getAttribute("target")||""}async syncRovingTabindex(){this.disabled||await Promise.all(this.tabHeadings.map((async t=>{const s=(t.getAttribute("target")??"")===this.selectedValue;await t.setTabIndex(s?0:-1)})))}getEnabledTabHeadingsSync(){return this.tabHeadings.filter((t=>{if(this.disabled||t.hasAttribute("disabled"))return!1;const s=t.querySelector("segment"===t.variant?"xpl-button button":".xpl-tab__button");return!(!s||s.disabled)}))}attachTablistKeydown(){const t=this.headingsContainerRef;t&&!this.tablistKeydownBound&&(t.addEventListener("keydown",this.onTablistKeydown),this.tablistKeydownBound=!0)}isTablistRtl(){const t=this.headingsContainerRef;return!!t&&"rtl"===getComputedStyle(t).direction}renderChoices(){return this.tabHeadings.map((t=>{const s=t.getAttribute("target")??"",e=this.disabled||t.hasAttribute("disabled"),i=t.getAttribute("icon")||void 0;return{label:u(t),value:s,isDisabled:e,...i?{icon:i}:{}}}))}updateActiveBarPosition(){if("segment"===this.type)return;const t=this.tabHeadings.find((t=>t.getAttribute("target")===this.selectedValue));if(!this.headingsContainerRef||!t)return;const s=t.getBoundingClientRect(),e=this.headingsContainerRef.getBoundingClientRect(),i=s.left-e.left,a=s.width;this.activeBarPosition.left===i&&this.activeBarPosition.width===a||(this.activeBarPosition={left:i,width:a})}mobileSelectClassNames(){const t="xpl-tabs__mobile-select";return"segment"===this.type?t+" xpl-tabs__mobile-select--segment":t}render(){const t="segment"===this.type;return i(a,{key:"0bb77237fce464cc536ce4efabb29249fa14ef4a",class:{"xpl-tabs":!0,"xpl-tabs--full-width":this.fullWidth,"xpl-tabs--segment":t},"data-choices-tick":this.choicesTick},i("xpl-select",{key:"fbcc113cc9a308df73bf99f6c941612725e49ddb",classNames:this.mobileSelectClassNames(),choices:this.renderChoices(),disabled:this.disabled,selectedValues:this.selectedValue,onDropdownStateChange:t=>{t.detail&&(this.isMobileSelectChange=!0)},onChangeEvent:t=>{if(this.isMobileSelectChange){const s=""+t.detail;this.handleTabChange(s),this.tabChange.emit(s),this.isMobileSelectChange=!1}}}),i("nav",{key:"1b93068116c5ff0ac94d5139e147daffc1157c73","aria-orientation":"horizontal",class:"xpl-tabs__headings",role:"tablist",ref:t=>{this.headingsContainerRef=t},onTabChange:t=>{t.stopPropagation(),this.isMobileSelectChange=!1,this.handleTabChange(t.detail),this.tabChange.emit(t.detail)}},!t&&i("div",{key:"38a88df2520d308e3a22b4cd70ff274af7403616",class:"xpl-tabs__active-bar",style:{transform:`translateX(${this.activeBarPosition.left}px)`,width:this.activeBarPosition.width+"px"}}),i("slot",{key:"dc30ab2123d7c1c8b6591ac0129af44da3795977",name:"heading"})),i("div",{key:"36c1fc45216499d4af87b8fc536df3ea6af666ab",class:"xpl-tabs__panels"},i("slot",{key:"a660913c7d2fce500da666490b600b4c7fc93746",name:"panel"})))}get el(){return this}static get watchers(){return{disabled:[{onDisabledChanged:0}],fullWidth:[{onFullWidthChanged:0}],type:[{onTypeChanged:0}],value:[{onValueChanged:0}]}}},[260,"xpl-tabs",{disabled:[4],fullWidth:[4,"full-width"],type:[513],value:[1],activeBarPosition:[32],choicesTick:[32],isMobileSelectChange:[32],selectedValue:[32]},[[9,"resize","onWindowResize"]],{disabled:[{onDisabledChanged:0}],fullWidth:[{onFullWidthChanged:0}],type:[{onTypeChanged:0}],value:[{onValueChanged:0}]}]),m=f,g=function(){"undefined"!=typeof customElements&&["xpl-tabs","xpl-dropdown","xpl-dropdown-group","xpl-dropdown-heading","xpl-dropdown-option","xpl-icon","xpl-select","xpl-tag"].forEach((t=>{switch(t){case"xpl-tabs":customElements.get(n(t))||customElements.define(n(t),f);break;case"xpl-dropdown":customElements.get(n(t))||o();break;case"xpl-dropdown-group":customElements.get(n(t))||h();break;case"xpl-dropdown-heading":customElements.get(n(t))||l();break;case"xpl-dropdown-option":customElements.get(n(t))||r();break;case"xpl-icon":customElements.get(n(t))||c();break;case"xpl-select":customElements.get(n(t))||d();break;case"xpl-tag":customElements.get(n(t))||p()}}))};export{m as XplTabs,g as defineCustomElement}
@@ -1 +1 @@
1
- import{T as o,d as r}from"./p-BZrSTAV1.js";const s=o,p=r;export{s as XplTag,p as defineCustomElement}
1
+ import{T as o,d as p}from"./p-CthHapLu.js";const s=o,t=p;export{s as XplTag,t as defineCustomElement}
@@ -1 +1 @@
1
- import{p as s,H as t,h as e,c as i,t as a}from"./p-BqhTjJWq.js";import{d as c}from"./p-CfZI7bBe.js";import{d as o}from"./p-Bh-U2qmp.js";let n=!1;const l=s(class extends t{constructor(s){super(),!1!==s&&this.__registerHost(),this.caption="",this.dismissible=!0,this.showIcon=!0,this.timeout=8e3,this.variant="neutral",this.handleAnimationEnd=()=>{this.el?.classList.contains("xpl-toast--dismissed")&&this.el?.remove()},this.getIcon=()=>{switch(this.variant){case"warning":return e("xpl-icon",{size:24,icon:"octagon-warning"});case"success":return e("xpl-icon",{size:24,icon:"circle-check"});default:return e("xpl-icon",{size:24,icon:"message-writing"})}},this.dismiss=()=>{this.el?.classList.add("xpl-toast--dismissed")}}handleDismissableChange(){void 0!==this.dismissable&&(n||(n=!0,console.warn('[xpl-toast] The "dismissable" prop is deprecated (misspelled). Use "dismissible" instead.')))}handleTimeoutChange(){this.scheduleAutoDismiss()}disconnectedCallback(){this.clearAutoDismissTimer()}componentWillLoad(){this.handleDismissableChange()}componentDidLoad(){this.scheduleAutoDismiss()}get isDismissible(){return this.dismissable??this.dismissible}clearAutoDismissTimer(){void 0!==this.dismissTimerId&&(clearTimeout(this.dismissTimerId),this.dismissTimerId=void 0)}scheduleAutoDismiss(){this.clearAutoDismissTimer(),(this.actionSlot?.children?.length??0)<1&&this.timeout>0&&(this.dismissTimerId=setTimeout((()=>{this.dismiss()}),this.timeout))}render(){return e(i,{key:"75b3b05b745ac16a614f752cf83380428b1a4f9a",class:"xpl-toast xpl-toast--"+this.variant,onAnimationEnd:this.handleAnimationEnd},e("div",{key:"997a55f5deb3016410ea517e89b369368a6c44d7",class:"xpl-toast__left"},this.showIcon&&e("div",{key:"6d60772a0b8f7f9839c59150a3f5f388553e7572",class:"xpl-toast__icon xpl-toast__icon--"+this.variant},this.getIcon()),e("div",{key:"f813c6fc2abb9f3ab1ca730be25537292f414963",class:"xpl-toast__notification"},e("p",{key:"067e06ef8702892d3c1c513c47c0e03d1e025843",class:"xpl-toast__title"},e("slot",{key:"24c8844bb360cc53f189c816789d4c112dee4bb2",name:"title"})),""!==this.caption&&e("p",{key:"8b1e9e9342187c2b5c6158679f42c98073b9f369",class:"xpl-toast__caption"},this.caption?.substring(0,85)))),e("div",{key:"016cc84afb7161149c321cd73bc40272e59f0e01",class:"xpl-toast__action",ref:s=>{s&&(this.actionSlot=s)}},e("slot",{key:"e3491fe293e3ee7b3b30483a8e7b19d7c584794e",name:"action"})),this.isDismissible&&e("div",{key:"dd7e8aa57d116045287f13b164ae63e603a81f01",class:"xpl-toast__close"},e("xpl-button",{key:"e1af234f5991651a039eba58f21c58e76d3d75eb",variant:"tertiary",size:"sm",iconOnly:!0,icon:"xmark",type:"button","aria-label":"Dismiss notification",onClick:this.dismiss})))}get el(){return this}static get watchers(){return{dismissable:[{handleDismissableChange:0}],timeout:[{handleTimeoutChange:0}]}}},[260,"xpl-toast",{caption:[1],dismissable:[4],dismissible:[4],showIcon:[4,"show-icon"],timeout:[2],variant:[1]},void 0,{dismissable:[{handleDismissableChange:0}],timeout:[{handleTimeoutChange:0}]}]),h=l,d=function(){"undefined"!=typeof customElements&&["xpl-toast","xpl-button","xpl-icon"].forEach((s=>{switch(s){case"xpl-toast":customElements.get(a(s))||customElements.define(a(s),l);break;case"xpl-button":customElements.get(a(s))||c();break;case"xpl-icon":customElements.get(a(s))||o()}}))};export{h as XplToast,d as defineCustomElement}
1
+ import{p as s,H as t,h as e,c as i,t as a}from"./p-B_6p2HCL.js";import{d as o}from"./p-gs07oY0j.js";import{d as c}from"./p-6-DvgBzG.js";let n=!1;const l=s(class extends t{constructor(s){super(),!1!==s&&this.__registerHost(),this.caption="",this.dismissible=!0,this.showIcon=!0,this.timeout=8e3,this.variant="neutral",this.handleAnimationEnd=()=>{this.el?.classList.contains("xpl-toast--dismissed")&&this.el?.remove()},this.getIcon=()=>{switch(this.variant){case"warning":return e("xpl-icon",{size:24,icon:"octagon-warning"});case"success":return e("xpl-icon",{size:24,icon:"circle-check"});default:return e("xpl-icon",{size:24,icon:"message-writing"})}},this.dismiss=()=>{this.el?.classList.add("xpl-toast--dismissed")}}handleDismissableChange(){void 0!==this.dismissable&&(n||(n=!0,console.warn('[xpl-toast] The "dismissable" prop is deprecated (misspelled). Use "dismissible" instead.')))}handleTimeoutChange(){this.scheduleAutoDismiss()}disconnectedCallback(){this.clearAutoDismissTimer()}componentWillLoad(){this.handleDismissableChange()}componentDidLoad(){this.scheduleAutoDismiss()}get isDismissible(){return this.dismissable??this.dismissible}clearAutoDismissTimer(){void 0!==this.dismissTimerId&&(clearTimeout(this.dismissTimerId),this.dismissTimerId=void 0)}scheduleAutoDismiss(){this.clearAutoDismissTimer(),(this.actionSlot?.children?.length??0)<1&&this.timeout>0&&(this.dismissTimerId=setTimeout((()=>{this.dismiss()}),this.timeout))}render(){return e(i,{key:"75b3b05b745ac16a614f752cf83380428b1a4f9a",class:"xpl-toast xpl-toast--"+this.variant,onAnimationEnd:this.handleAnimationEnd},e("div",{key:"997a55f5deb3016410ea517e89b369368a6c44d7",class:"xpl-toast__left"},this.showIcon&&e("div",{key:"6d60772a0b8f7f9839c59150a3f5f388553e7572",class:"xpl-toast__icon xpl-toast__icon--"+this.variant},this.getIcon()),e("div",{key:"f813c6fc2abb9f3ab1ca730be25537292f414963",class:"xpl-toast__notification"},e("p",{key:"067e06ef8702892d3c1c513c47c0e03d1e025843",class:"xpl-toast__title"},e("slot",{key:"24c8844bb360cc53f189c816789d4c112dee4bb2",name:"title"})),""!==this.caption&&e("p",{key:"8b1e9e9342187c2b5c6158679f42c98073b9f369",class:"xpl-toast__caption"},this.caption?.substring(0,85)))),e("div",{key:"016cc84afb7161149c321cd73bc40272e59f0e01",class:"xpl-toast__action",ref:s=>{s&&(this.actionSlot=s)}},e("slot",{key:"e3491fe293e3ee7b3b30483a8e7b19d7c584794e",name:"action"})),this.isDismissible&&e("div",{key:"dd7e8aa57d116045287f13b164ae63e603a81f01",class:"xpl-toast__close"},e("xpl-button",{key:"e1af234f5991651a039eba58f21c58e76d3d75eb",variant:"tertiary",size:"sm",iconOnly:!0,icon:"xmark",type:"button","aria-label":"Dismiss notification",onClick:this.dismiss})))}get el(){return this}static get watchers(){return{dismissable:[{handleDismissableChange:0}],timeout:[{handleTimeoutChange:0}]}}},[260,"xpl-toast",{caption:[1],dismissable:[4],dismissible:[4],showIcon:[4,"show-icon"],timeout:[2],variant:[1]},void 0,{dismissable:[{handleDismissableChange:0}],timeout:[{handleTimeoutChange:0}]}]),h=l,d=function(){"undefined"!=typeof customElements&&["xpl-toast","xpl-button","xpl-icon"].forEach((s=>{switch(s){case"xpl-toast":customElements.get(a(s))||customElements.define(a(s),l);break;case"xpl-button":customElements.get(a(s))||o();break;case"xpl-icon":customElements.get(a(s))||c()}}))};export{h as XplToast,d as defineCustomElement}
@@ -1 +1 @@
1
- import{p as e,H as s,d as t,h as l,c as i,t as a}from"./p-BqhTjJWq.js";import{v as c}from"./p-CK3_k8jD.js";const h=e(class extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.toggleChange=t(this,"toggleChange",7),this.variant="default",this.id=c(),this.onChange=e=>{this.toggleChange.emit(e.target.checked)}}render(){let e="xpl-toggle-container";this.disabled&&(e+=" xpl-toggle-container--disabled");let s="xpl-toggle";return"small"===this.variant&&(s+=" xpl-toggle--small"),l(i,{key:"79915f2091093b5440ca3a8e63584e448137f479",class:e},(this.heading||this.description)&&l("label",{key:"6660a95ec66eec9ed33016efcf58aaf0940f6f47",class:{"xpl-label":!0,"xpl-label--disabled":!!this.disabled},htmlFor:this.id},this.heading,this.description&&l("small",{key:"160f0a90739142bc37779af28725183979de5a4c",class:{"xpl-description":!0,"xpl-description--disabled":!!this.disabled}},this.description)),l("input",{key:"b136188b1de98d1ede875bf9f80b97c9ee66321d",class:s,type:"checkbox",checked:this.checked,disabled:this.disabled,id:this.id,name:this.name,onChange:this.onChange}),this.label&&l("label",{key:"0329f2badfa3b3e8c1153c2e5baa4ee76e40ac5d",htmlFor:this.id},this.label))}},[0,"xpl-toggle",{checked:[4],description:[1],disabled:[4],heading:[1],label:[1],name:[1],variant:[1],id:[32]}]),d=h,o=function(){"undefined"!=typeof customElements&&["xpl-toggle"].forEach((e=>{"xpl-toggle"===e&&(customElements.get(a(e))||customElements.define(a(e),h))}))};export{d as XplToggle,o as defineCustomElement}
1
+ import{p as e,H as s,d as t,h as l,c as i,t as a}from"./p-B_6p2HCL.js";import{v as c}from"./p-CK3_k8jD.js";const h=e(class extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.toggleChange=t(this,"toggleChange",7),this.variant="default",this.id=c(),this.onChange=e=>{this.toggleChange.emit(e.target.checked)}}render(){let e="xpl-toggle-container";this.disabled&&(e+=" xpl-toggle-container--disabled");let s="xpl-toggle";return"small"===this.variant&&(s+=" xpl-toggle--small"),l(i,{key:"79915f2091093b5440ca3a8e63584e448137f479",class:e},(this.heading||this.description)&&l("label",{key:"6660a95ec66eec9ed33016efcf58aaf0940f6f47",class:{"xpl-label":!0,"xpl-label--disabled":!!this.disabled},htmlFor:this.id},this.heading,this.description&&l("small",{key:"160f0a90739142bc37779af28725183979de5a4c",class:{"xpl-description":!0,"xpl-description--disabled":!!this.disabled}},this.description)),l("input",{key:"b136188b1de98d1ede875bf9f80b97c9ee66321d",class:s,type:"checkbox",checked:this.checked,disabled:this.disabled,id:this.id,name:this.name,onChange:this.onChange}),this.label&&l("label",{key:"0329f2badfa3b3e8c1153c2e5baa4ee76e40ac5d",htmlFor:this.id},this.label))}},[0,"xpl-toggle",{checked:[4],description:[1],disabled:[4],heading:[1],label:[1],name:[1],variant:[1],id:[32]}]),d=h,o=function(){"undefined"!=typeof customElements&&["xpl-toggle"].forEach((e=>{"xpl-toggle"===e&&(customElements.get(a(e))||customElements.define(a(e),h))}))};export{d as XplToggle,o as defineCustomElement}
@@ -1 +1 @@
1
- import{p as e,H as t,h as a,c,t as s}from"./p-BqhTjJWq.js";const o=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.selectedItemCount=0}componentDidLoad(){const e=this.el.querySelector('[slot="actions-right"]');null!==e&&(e.style.marginLeft="auto")}listenToSelectedItemCountChange(e){this.selectedItemCount=e.detail.length}render(){return a(c,{key:"627eed07ad6f3c06145126cad4b9780a3bec7258",class:{"xpl-toolbar":!0,dark:!0,hidden:0===this.selectedItemCount}},a("div",{key:"ccae2ca6612e91c87bae43479bc7aa4bf8731ad3",class:"toolbar"},a("p",{key:"360658d3ed621e4d6d5920baf41c63f8649a7a9f",class:"selected-item-count"},this.selectedItemCount," Selected"),a("div",{key:"386e61abd7294286aca11f0e365f24b466193088",class:"actions"},a("slot",{key:"4999110aaf0762dd60fdb4fbc3540040dadac003",name:"actions-left"}),a("slot",{key:"621b28dcb128f6a89d8ca3f7ec54503c3660a5bc",name:"actions-right"}))))}get el(){return this}},[260,"xpl-toolbar",{selectedItemCount:[2,"selected-item-count"]},[[8,"selectedItemCountChange","listenToSelectedItemCountChange"]]]),n=o,d=function(){"undefined"!=typeof customElements&&["xpl-toolbar"].forEach((e=>{"xpl-toolbar"===e&&(customElements.get(s(e))||customElements.define(s(e),o))}))};export{n as XplToolbar,d as defineCustomElement}
1
+ import{p as e,H as t,h as a,c,t as s}from"./p-B_6p2HCL.js";const o=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.selectedItemCount=0}componentDidLoad(){const e=this.el.querySelector('[slot="actions-right"]');null!==e&&(e.style.marginLeft="auto")}listenToSelectedItemCountChange(e){this.selectedItemCount=e.detail.length}render(){return a(c,{key:"627eed07ad6f3c06145126cad4b9780a3bec7258",class:{"xpl-toolbar":!0,dark:!0,hidden:0===this.selectedItemCount}},a("div",{key:"ccae2ca6612e91c87bae43479bc7aa4bf8731ad3",class:"toolbar"},a("p",{key:"360658d3ed621e4d6d5920baf41c63f8649a7a9f",class:"selected-item-count"},this.selectedItemCount," Selected"),a("div",{key:"386e61abd7294286aca11f0e365f24b466193088",class:"actions"},a("slot",{key:"4999110aaf0762dd60fdb4fbc3540040dadac003",name:"actions-left"}),a("slot",{key:"621b28dcb128f6a89d8ca3f7ec54503c3660a5bc",name:"actions-right"}))))}get el(){return this}},[260,"xpl-toolbar",{selectedItemCount:[2,"selected-item-count"]},[[8,"selectedItemCountChange","listenToSelectedItemCountChange"]]]),n=o,d=function(){"undefined"!=typeof customElements&&["xpl-toolbar"].forEach((e=>{"xpl-toolbar"===e&&(customElements.get(s(e))||customElements.define(s(e),o))}))};export{n as XplToolbar,d as defineCustomElement}
@@ -1 +1 @@
1
- import{T as s,d as o}from"./p-sjDW_E4p.js";const p=s,r=o;export{p as XplTooltip,r as defineCustomElement}
1
+ import{T as o,d as s}from"./p-nRygucMK.js";const p=o,r=s;export{p as XplTooltip,r as defineCustomElement}
@@ -1 +1 @@
1
- import{T as o,d as s}from"./p-n-yq7lf4.js";const p=o,r=s;export{p as XplTopNavItem,r as defineCustomElement}
1
+ import{T as o,d as s}from"./p-COq-vU2g.js";const p=o,r=s;export{p as XplTopNavItem,r as defineCustomElement}
@@ -1 +1 @@
1
- import{p as t,H as e,h as s,c as n,t as i}from"./p-BqhTjJWq.js";import{T as a,i as o}from"./p-Dqb1pIRo.js";import{a as c,d as p}from"./p-n-yq7lf4.js";import{d as l}from"./p-Bh-U2qmp.js";const h=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.timers=new a,this.isMobileCascade=!1,this.onViewportChange=()=>{this.isMobileCascade=this.mobileMq?.matches??!1},this.handleBackClick=async()=>{const t=this.el.closest("xpl-top-nav-item");t&&(await t.closeMenu(),t.querySelector(".xpl-top-nav-item__inner")?.focus())}}connectedCallback(){o()&&"function"==typeof window.matchMedia&&(this.mobileMq=window.matchMedia(c),this.mobileMq.addEventListener("change",this.onViewportChange),this.isMobileCascade=this.mobileMq.matches),this.connectParentOpenObserver()}disconnectedCallback(){this.timers.dispose(),this.mobileMq?.removeEventListener("change",this.onViewportChange),this.mobileMq=void 0,this.disconnectParentOpenObserver()}connectParentOpenObserver(){this.disconnectParentOpenObserver();const t=this.el.parentElement;t&&"undefined"!=typeof MutationObserver&&(this.parentOpenObserver=new MutationObserver((()=>{this.scheduleParentOpenCheck()})),this.parentOpenObserver.observe(t,{attributes:!0,attributeFilter:["class"]}))}disconnectParentOpenObserver(){this.parentOpenObserver?.disconnect(),this.parentOpenObserver=void 0}scheduleParentOpenCheck(){this.timers.scheduleCoalesced("parentOpenCheck",(()=>{this.el.isConnected&&this.focusBackRowIfJustOpenedOnMobile()}))}focusBackRowIfJustOpenedOnMobile(){if(!this.isMobileCascade)return;const t=this.el.parentElement;t?.classList.contains("xpl-top-nav-item--dropdown-open")&&this.el.querySelector(".xpl-top-nav-menu__back .xpl-top-nav-item__inner")?.focus()}renderBackRow(){return this.isMobileCascade&&this.label?.trim()?s("xpl-top-nav-item",{class:"xpl-top-nav-menu__back",label:this.label,onNavItemClick:this.handleBackClick},s("xpl-icon",{slot:"leading-icon",icon:"chevron-left",size:24})):null}render(){return s(n,{key:"10a844d721713b72f636a8a3a3e266139b9c0193",class:{"xpl-top-nav-menu":!0,dark:!0},role:"list","aria-label":this.label||void 0},this.renderBackRow(),s("slot",{key:"e7db1c580f34bf388658f6baacfc325322e2670e"}))}get el(){return this}},[260,"xpl-top-nav-menu",{label:[1],isMobileCascade:[32]}]),r=h,m=function(){"undefined"!=typeof customElements&&["xpl-top-nav-menu","xpl-icon","xpl-top-nav-item"].forEach((t=>{switch(t){case"xpl-top-nav-menu":customElements.get(i(t))||customElements.define(i(t),h);break;case"xpl-icon":customElements.get(i(t))||l();break;case"xpl-top-nav-item":customElements.get(i(t))||p()}}))};export{r as XplTopNavMenu,m as defineCustomElement}
1
+ import{p as t,H as e,h as s,c as n,t as i}from"./p-B_6p2HCL.js";import{T as o,i as a}from"./p-Dqb1pIRo.js";import{a as c,d as p}from"./p-COq-vU2g.js";import{d as l}from"./p-6-DvgBzG.js";const r=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.timers=new o,this.isMobileCascade=!1,this.onViewportChange=()=>{this.isMobileCascade=this.mobileMq?.matches??!1},this.handleBackClick=async()=>{const t=this.el.closest("xpl-top-nav-item");t&&(await t.closeMenu(),t.querySelector(".xpl-top-nav-item__inner")?.focus())}}connectedCallback(){a()&&"function"==typeof window.matchMedia&&(this.mobileMq=window.matchMedia(c),this.mobileMq.addEventListener("change",this.onViewportChange),this.isMobileCascade=this.mobileMq.matches),this.connectParentOpenObserver()}disconnectedCallback(){this.timers.dispose(),this.mobileMq?.removeEventListener("change",this.onViewportChange),this.mobileMq=void 0,this.disconnectParentOpenObserver()}connectParentOpenObserver(){this.disconnectParentOpenObserver();const t=this.el.parentElement;t&&"undefined"!=typeof MutationObserver&&(this.parentOpenObserver=new MutationObserver((()=>{this.scheduleParentOpenCheck()})),this.parentOpenObserver.observe(t,{attributes:!0,attributeFilter:["class"]}))}disconnectParentOpenObserver(){this.parentOpenObserver?.disconnect(),this.parentOpenObserver=void 0}scheduleParentOpenCheck(){this.timers.scheduleCoalesced("parentOpenCheck",(()=>{this.el.isConnected&&this.focusBackRowIfJustOpenedOnMobile()}))}focusBackRowIfJustOpenedOnMobile(){if(!this.isMobileCascade)return;const t=this.el.parentElement;t?.classList.contains("xpl-top-nav-item--dropdown-open")&&this.el.querySelector(".xpl-top-nav-menu__back .xpl-top-nav-item__inner")?.focus()}renderBackRow(){return this.isMobileCascade&&this.label?.trim()?s("xpl-top-nav-item",{class:"xpl-top-nav-menu__back",label:this.label,onNavItemClick:this.handleBackClick},s("xpl-icon",{slot:"leading-icon",icon:"chevron-left",size:24})):null}render(){return s(n,{key:"e5d2cbfdf4186ee69b7e2ffcc26bc44f372923e2",class:{"xpl-top-nav-menu":!0,dark:!0},role:"list","aria-label":this.label||void 0},this.renderBackRow(),s("slot",{key:"5c22ca998d86f7eb2ff89eb8bd0bf0b38b02dd31"}))}get el(){return this}},[260,"xpl-top-nav-menu",{label:[1],isMobileCascade:[32]}]),h=r,m=function(){"undefined"!=typeof customElements&&["xpl-top-nav-menu","xpl-icon","xpl-top-nav-item"].forEach((t=>{switch(t){case"xpl-top-nav-menu":customElements.get(i(t))||customElements.define(i(t),r);break;case"xpl-icon":customElements.get(i(t))||l();break;case"xpl-top-nav-item":customElements.get(i(t))||p()}}))};export{h as XplTopNavMenu,m as defineCustomElement}