@xplortech/apollo-core 3.2.1 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (494) hide show
  1. package/README.md +1 -1
  2. package/build/components/accordion.css +1 -1
  3. package/build/components/badge.css +1 -1
  4. package/build/components/banner.css +1 -1
  5. package/build/components/breadcrumbs.css +1 -1
  6. package/build/components/button.css +1 -1
  7. package/build/components/choicelist.css +1 -1
  8. package/build/components/data-card.css +1 -1
  9. package/build/components/divider.css +1 -1
  10. package/build/components/dropdown.css +1 -1
  11. package/build/components/dynamic-table-cell.css +1 -1
  12. package/build/components/header-accordion.css +1 -1
  13. package/build/components/input-color.css +1 -1
  14. package/build/components/input-file.css +1 -1
  15. package/build/components/input-search.css +1 -1
  16. package/build/components/input.css +1 -1
  17. package/build/components/label.css +1 -1
  18. package/build/components/large-card.css +1 -1
  19. package/build/components/list-item.css +1 -1
  20. package/build/components/main-nav.css +1 -1
  21. package/build/components/modal.css +1 -1
  22. package/build/components/pagination.css +1 -1
  23. package/build/components/secondary-nav.css +1 -1
  24. package/build/components/select.css +1 -1
  25. package/build/components/side-nav.css +1 -1
  26. package/build/components/slideout.css +1 -1
  27. package/build/components/spotlight.css +1 -1
  28. package/build/components/table-cell-base.css +1 -1
  29. package/build/components/table-header-cell.css +1 -1
  30. package/build/components/table.css +1 -1
  31. package/build/components/tag.css +1 -1
  32. package/build/components/toast.css +1 -1
  33. package/build/components/toggle.css +1 -1
  34. package/build/components/toolbar.css +1 -1
  35. package/build/components/tooltip.css +1 -1
  36. package/build/components/top-nav.css +1 -1
  37. package/build/core.css +1 -1
  38. package/build/style.css +1 -1
  39. package/build/typography.css +1 -1
  40. package/build/variables/apollo.css +30 -19
  41. package/build/variables/field-edge.css +32 -19
  42. package/dist/apollo-core/apollo-core.css +1 -1
  43. package/dist/apollo-core/apollo-core.esm.js +1 -1
  44. package/dist/apollo-core/p-01c55c74.entry.js +1 -0
  45. package/dist/apollo-core/{p-050a8bf2.entry.js → p-01ed2bb5.entry.js} +1 -1
  46. package/dist/apollo-core/{p-b3b4678b.entry.js → p-08ea8939.entry.js} +1 -1
  47. package/dist/apollo-core/{p-256ece8b.entry.js → p-0a7d57ab.entry.js} +1 -1
  48. package/dist/apollo-core/p-13253d8f.entry.js +1 -0
  49. package/dist/apollo-core/{p-8845106f.entry.js → p-14f5d98a.entry.js} +1 -1
  50. package/dist/apollo-core/{p-5c3be343.entry.js → p-17e38eaf.entry.js} +1 -1
  51. package/dist/apollo-core/{p-a0d3b7f8.entry.js → p-18486aba.entry.js} +1 -1
  52. package/dist/apollo-core/{p-49531864.entry.js → p-19fb0e5f.entry.js} +1 -1
  53. package/dist/apollo-core/p-1c2135e3.entry.js +1 -0
  54. package/dist/apollo-core/{p-7d70e089.entry.js → p-2111cc38.entry.js} +1 -1
  55. package/dist/apollo-core/p-2b813212.entry.js +1 -0
  56. package/dist/apollo-core/p-325a3b43.entry.js +1 -0
  57. package/dist/apollo-core/p-38a6a53d.entry.js +1 -0
  58. package/dist/apollo-core/{p-808f3d9c.entry.js → p-38fa8398.entry.js} +1 -1
  59. package/dist/apollo-core/{p-b64ed46d.entry.js → p-3d4a6de1.entry.js} +1 -1
  60. package/dist/apollo-core/{p-3713cd77.entry.js → p-3e3ab332.entry.js} +1 -1
  61. package/dist/apollo-core/p-3f8dc5b9.entry.js +1 -0
  62. package/dist/apollo-core/{p-ff16f574.entry.js → p-4249ee9b.entry.js} +1 -1
  63. package/dist/apollo-core/{p-715baae0.entry.js → p-439d5cdd.entry.js} +1 -1
  64. package/dist/apollo-core/{p-f384a990.entry.js → p-4b949aeb.entry.js} +1 -1
  65. package/dist/apollo-core/{p-eba654a3.entry.js → p-54053547.entry.js} +1 -1
  66. package/dist/apollo-core/p-620fc472.entry.js +1 -0
  67. package/dist/apollo-core/{p-9feaa8be.entry.js → p-651b49c3.entry.js} +1 -1
  68. package/dist/apollo-core/{p-9d731673.entry.js → p-6aee7d6b.entry.js} +1 -1
  69. package/dist/apollo-core/{p-d469bf5d.entry.js → p-6de10879.entry.js} +1 -1
  70. package/dist/apollo-core/p-73a1c68d.entry.js +1 -0
  71. package/dist/apollo-core/{p-8f8f4759.entry.js → p-79d306a2.entry.js} +1 -1
  72. package/dist/apollo-core/{p-f579e4b0.entry.js → p-7f00b542.entry.js} +1 -1
  73. package/dist/apollo-core/{p-bc821e69.entry.js → p-7fd3da3a.entry.js} +1 -1
  74. package/dist/apollo-core/p-890c641b.entry.js +1 -0
  75. package/dist/apollo-core/p-9832bc63.entry.js +1 -0
  76. package/dist/apollo-core/{p-7eb02cf3.entry.js → p-9955c4f2.entry.js} +1 -1
  77. package/dist/apollo-core/p-9b757459.entry.js +1 -0
  78. package/dist/apollo-core/p-9c41d07f.entry.js +1 -0
  79. package/dist/apollo-core/{p-ee68bed6.entry.js → p-9c7a0229.entry.js} +1 -1
  80. package/dist/apollo-core/{p-24fa8a03.entry.js → p-9d091b05.entry.js} +1 -1
  81. package/dist/apollo-core/p-CJABLO_1.js +3 -0
  82. package/dist/apollo-core/{p-14e86de8.entry.js → p-a149351a.entry.js} +1 -1
  83. package/dist/apollo-core/p-a2c3a38a.entry.js +1 -0
  84. package/dist/apollo-core/p-a5ddb3c4.entry.js +1 -0
  85. package/dist/apollo-core/{p-3417c1ce.entry.js → p-a73b0ca4.entry.js} +1 -1
  86. package/dist/apollo-core/{p-fcb17ff9.entry.js → p-aece2c3d.entry.js} +1 -1
  87. package/dist/apollo-core/{p-aeb2bcb8.entry.js → p-af188297.entry.js} +1 -1
  88. package/dist/apollo-core/{p-ca83003e.entry.js → p-b2dcdb19.entry.js} +1 -1
  89. package/dist/apollo-core/p-b55951a2.entry.js +1 -0
  90. package/dist/apollo-core/p-b7b91f27.entry.js +1 -0
  91. package/dist/apollo-core/{p-11914cd4.entry.js → p-b9c85394.entry.js} +1 -1
  92. package/dist/apollo-core/{p-64f5c129.entry.js → p-ba85f686.entry.js} +1 -1
  93. package/dist/apollo-core/p-c4fd031e.entry.js +1 -0
  94. package/dist/apollo-core/p-cab7d816.entry.js +1 -0
  95. package/dist/apollo-core/{p-45c872d2.entry.js → p-cca0f1a2.entry.js} +1 -1
  96. package/dist/apollo-core/{p-2971e2ec.entry.js → p-cd2d73ee.entry.js} +1 -1
  97. package/dist/apollo-core/p-cfb00d23.entry.js +1 -0
  98. package/dist/apollo-core/p-d060572b.entry.js +1 -0
  99. package/dist/apollo-core/p-d13a07ea.entry.js +1 -0
  100. package/dist/apollo-core/p-d1571245.entry.js +1 -0
  101. package/dist/apollo-core/p-d204ed1a.entry.js +1 -0
  102. package/dist/apollo-core/{p-9905c77c.entry.js → p-d3720611.entry.js} +1 -1
  103. package/dist/apollo-core/p-d9f78325.entry.js +1 -0
  104. package/dist/apollo-core/{p-df257cbf.entry.js → p-dad5d377.entry.js} +1 -1
  105. package/dist/apollo-core/{p-d3ada7d0.entry.js → p-e21af3d1.entry.js} +1 -1
  106. package/dist/apollo-core/{p-c5bc3b2c.entry.js → p-e7145461.entry.js} +1 -1
  107. package/dist/apollo-core/p-e99503a2.entry.js +1 -0
  108. package/dist/apollo-core/{p-e4d50301.entry.js → p-ec99c433.entry.js} +1 -1
  109. package/dist/apollo-core/{p-e09d8beb.entry.js → p-fc73497e.entry.js} +1 -1
  110. package/dist/apollo-core/{p-907bc21e.entry.js → p-fdd1b7da.entry.js} +1 -1
  111. package/dist/cjs/apollo-core.cjs.js +2 -2
  112. package/dist/cjs/{index-3cBvw409.js → index-EdmnG7t8.js} +52 -11
  113. package/dist/cjs/loader.cjs.js +1 -1
  114. package/dist/cjs/xpl-accordion.cjs.entry.js +3 -3
  115. package/dist/cjs/xpl-application-shell.cjs.entry.js +2 -2
  116. package/dist/cjs/xpl-avatar_3.cjs.entry.js +5 -5
  117. package/dist/cjs/xpl-backdrop.cjs.entry.js +2 -2
  118. package/dist/cjs/xpl-badge.cjs.entry.js +2 -2
  119. package/dist/cjs/xpl-banner.cjs.entry.js +3 -3
  120. package/dist/cjs/xpl-breadcrumb-item.cjs.entry.js +2 -2
  121. package/dist/cjs/xpl-breadcrumbs.cjs.entry.js +2 -2
  122. package/dist/cjs/xpl-button-row.cjs.entry.js +2 -2
  123. package/dist/cjs/xpl-button.cjs.entry.js +3 -3
  124. package/dist/cjs/xpl-calendar.cjs.entry.js +2 -2
  125. package/dist/cjs/xpl-checkbox.cjs.entry.js +4 -4
  126. package/dist/cjs/xpl-choicelist.cjs.entry.js +2 -2
  127. package/dist/cjs/xpl-content-area.cjs.entry.js +2 -2
  128. package/dist/cjs/xpl-dashboard.cjs.entry.js +2 -2
  129. package/dist/cjs/xpl-data-card.cjs.entry.js +3 -3
  130. package/dist/cjs/xpl-dropdown_4.cjs.entry.js +9 -9
  131. package/dist/cjs/xpl-dynamic-table-cell.cjs.entry.js +3 -3
  132. package/dist/cjs/xpl-dynamic-table-row.cjs.entry.js +3 -3
  133. package/dist/cjs/xpl-dynamic-table.cjs.entry.js +3 -3
  134. package/dist/cjs/xpl-grid-item.cjs.entry.js +2 -2
  135. package/dist/cjs/xpl-grid.cjs.entry.js +1 -1
  136. package/dist/cjs/xpl-header-accordion.cjs.entry.js +2 -2
  137. package/dist/cjs/xpl-icon.cjs.entry.js +1 -1
  138. package/dist/cjs/xpl-input-color.cjs.entry.js +1 -1
  139. package/dist/cjs/xpl-input-phone.cjs.entry.js +1 -1
  140. package/dist/cjs/xpl-input-time.cjs.entry.js +1 -1
  141. package/dist/cjs/xpl-input_4.cjs.entry.js +3 -3
  142. package/dist/cjs/xpl-large-card.cjs.entry.js +1 -1
  143. package/dist/cjs/xpl-list-item.cjs.entry.js +1 -1
  144. package/dist/cjs/xpl-list.cjs.entry.js +3 -3
  145. package/dist/cjs/xpl-main-nav.cjs.entry.js +2 -2
  146. package/dist/cjs/xpl-modal.cjs.entry.js +1 -1
  147. package/dist/cjs/xpl-nav-header-menu.cjs.entry.js +3 -3
  148. package/dist/cjs/xpl-nav-item.cjs.entry.js +3 -3
  149. package/dist/cjs/xpl-pagination.cjs.entry.js +1 -1
  150. package/dist/cjs/xpl-panel.cjs.entry.js +1 -1
  151. package/dist/cjs/xpl-popover.cjs.entry.js +5 -5
  152. package/dist/cjs/xpl-progress-bar.cjs.entry.js +1 -1
  153. package/dist/cjs/xpl-progress-indicator.cjs.entry.js +1 -1
  154. package/dist/cjs/xpl-secondary-nav.cjs.entry.js +2 -2
  155. package/dist/cjs/xpl-select_2.cjs.entry.js +10 -10
  156. package/dist/cjs/xpl-side-nav-header-item.cjs.entry.js +1 -1
  157. package/dist/cjs/xpl-side-nav-item.cjs.entry.js +3 -3
  158. package/dist/cjs/xpl-side-nav-section.cjs.entry.js +6 -6
  159. package/dist/cjs/xpl-side-nav.cjs.entry.js +1 -1
  160. package/dist/cjs/xpl-skeleton.cjs.entry.js +1 -1
  161. package/dist/cjs/xpl-slideout.cjs.entry.js +2 -2
  162. package/dist/cjs/xpl-spotlight.cjs.entry.js +1 -1
  163. package/dist/cjs/xpl-tab-panel.cjs.entry.js +1 -1
  164. package/dist/cjs/xpl-tab.cjs.entry.js +1 -1
  165. package/dist/cjs/xpl-table-body.cjs.entry.js +2 -2
  166. package/dist/cjs/xpl-table-cell_3.cjs.entry.js +5 -5
  167. package/dist/cjs/xpl-table-footer.cjs.entry.js +2 -2
  168. package/dist/cjs/xpl-table-header.cjs.entry.js +2 -2
  169. package/dist/cjs/xpl-table-row.cjs.entry.js +3 -3
  170. package/dist/cjs/xpl-table.cjs.entry.js +1 -1
  171. package/dist/cjs/xpl-tabs.cjs.entry.js +1 -1
  172. package/dist/cjs/xpl-toast.cjs.entry.js +3 -3
  173. package/dist/cjs/xpl-toggle.cjs.entry.js +1 -1
  174. package/dist/cjs/xpl-toolbar.cjs.entry.js +3 -3
  175. package/dist/cjs/xpl-tooltip.cjs.entry.js +2 -2
  176. package/dist/cjs/xpl-top-nav-item.cjs.entry.js +3 -3
  177. package/dist/cjs/xpl-top-nav-menu.cjs.entry.js +1 -1
  178. package/dist/cjs/xpl-top-nav.cjs.entry.js +1 -1
  179. package/dist/cjs/xpl-utility-bar.cjs.entry.js +2 -2
  180. package/dist/collection/collection-manifest.json +1 -1
  181. package/dist/collection/components/xpl-accordion/xpl-accordion.js +2 -2
  182. package/dist/collection/components/xpl-application-shell/xpl-application-shell.js +1 -1
  183. package/dist/collection/components/xpl-backdrop/xpl-backdrop.js +1 -1
  184. package/dist/collection/components/xpl-badge/xpl-badge.js +1 -1
  185. package/dist/collection/components/xpl-banner/xpl-banner.js +2 -2
  186. package/dist/collection/components/xpl-breadcrumbs/xpl-breadcrumb-item/xpl-breadcrumb-item.js +1 -1
  187. package/dist/collection/components/xpl-breadcrumbs/xpl-breadcrumbs/xpl-breadcrumbs.js +1 -1
  188. package/dist/collection/components/xpl-button/xpl-button.js +2 -2
  189. package/dist/collection/components/xpl-button-row/xpl-button-row.js +1 -1
  190. package/dist/collection/components/xpl-calendar/xpl-calendar.js +1 -1
  191. package/dist/collection/components/xpl-checkbox/xpl-checkbox.js +3 -3
  192. package/dist/collection/components/xpl-choicelist/xpl-choicelist.js +1 -1
  193. package/dist/collection/components/xpl-content-area/xpl-content-area.js +1 -1
  194. package/dist/collection/components/xpl-dashboard/xpl-dashboard.js +1 -1
  195. package/dist/collection/components/xpl-data-card/xpl-data-card.js +2 -2
  196. package/dist/collection/components/xpl-divider/xpl-divider.js +1 -1
  197. package/dist/collection/components/xpl-dropdown/xpl-dropdown-group/xpl-dropdown-group.js +1 -1
  198. package/dist/collection/components/xpl-dropdown/xpl-dropdown-heading/xpl-dropdown-heading.js +1 -1
  199. package/dist/collection/components/xpl-dropdown/xpl-dropdown-option/xpl-dropdown-option.js +2 -2
  200. package/dist/collection/components/xpl-dropdown/xpl-dropdown.js +7 -6
  201. package/dist/collection/components/xpl-dynamic-table/xpl-dynamic-table.js +2 -2
  202. package/dist/collection/components/xpl-dynamic-table-cell/xpl-dynamic-table-cell.js +2 -2
  203. package/dist/collection/components/xpl-dynamic-table-row/xpl-dynamic-table-row.js +2 -2
  204. package/dist/collection/components/xpl-grid-item/xpl-grid-item.js +1 -1
  205. package/dist/collection/components/xpl-header-accordion/xpl-header-accordion.js +1 -1
  206. package/dist/collection/components/xpl-input/xpl-input.js +2 -2
  207. package/dist/collection/components/xpl-list/xpl-list.js +2 -2
  208. package/dist/collection/components/xpl-main-nav/xpl-main-nav.js +1 -1
  209. package/dist/collection/components/xpl-nav-item/xpl-nav-item.js +2 -2
  210. package/dist/collection/components/xpl-popover/xpl-popover.js +4 -4
  211. package/dist/collection/components/xpl-radio/xpl-radio.js +3 -3
  212. package/dist/collection/components/xpl-secondary-nav/xpl-secondary-nav.js +1 -1
  213. package/dist/collection/components/xpl-select/xpl-select.js +7 -7
  214. package/dist/collection/components/xpl-side-nav/xpl-side-nav-item/xpl-side-nav-item.js +2 -2
  215. package/dist/collection/components/xpl-side-nav/xpl-side-nav-section/xpl-side-nav-section.js +5 -5
  216. package/dist/collection/components/xpl-slideout/xpl-slideout.js +1 -1
  217. package/dist/collection/components/xpl-table/xpl-table-body/xpl-table-body.js +1 -1
  218. package/dist/collection/components/xpl-table/xpl-table-cell/xpl-table-cell.js +2 -2
  219. package/dist/collection/components/xpl-table/xpl-table-footer/xpl-table-footer.js +1 -1
  220. package/dist/collection/components/xpl-table/xpl-table-footer-cell/xpl-table-footer-cell.js +2 -2
  221. package/dist/collection/components/xpl-table/xpl-table-row/xpl-table-row.js +2 -2
  222. package/dist/collection/components/xpl-table-header/xpl-table-header.js +1 -1
  223. package/dist/collection/components/xpl-tag/xpl-tag.js +2 -2
  224. package/dist/collection/components/xpl-toast/xpl-toast.js +2 -2
  225. package/dist/collection/components/xpl-toolbar/xpl-toolbar.js +2 -2
  226. package/dist/collection/components/xpl-tooltip/xpl-tooltip.js +1 -1
  227. package/dist/collection/components/xpl-top-nav/xpl-nav-header-menu/xpl-nav-header-menu.js +2 -2
  228. package/dist/collection/components/xpl-top-nav/xpl-top-nav-item/xpl-top-nav-item.js +2 -2
  229. package/dist/collection/components/xpl-utility-bar/xpl-utility-bar.js +1 -1
  230. package/dist/components/index.js +1 -1
  231. package/dist/components/p-2XxO7M15.js +1 -0
  232. package/dist/components/{p-D09sGbzs.js → p-3R1VKKds.js} +1 -1
  233. package/dist/components/p-BNOkHymY.js +1 -0
  234. package/dist/components/p-BWAytJnz.js +1 -0
  235. package/dist/components/{p-B7aaJikj.js → p-BZrSTAV1.js} +1 -1
  236. package/dist/components/{p-CQjJIHK6.js → p-Bh-U2qmp.js} +1 -1
  237. package/dist/components/{p-BOm_p_mz.js → p-BowQ58XR.js} +1 -1
  238. package/dist/components/p-BqhTjJWq.js +1 -0
  239. package/dist/components/{p-CFXvQqUO.js → p-CWXfIUHo.js} +1 -1
  240. package/dist/components/{p-CdRmVtIN.js → p-CZg3Gb0I.js} +1 -1
  241. package/dist/components/{p-ohy3NrgH.js → p-CcPrBo53.js} +1 -1
  242. package/dist/components/p-CetimlcM.js +1 -0
  243. package/dist/components/{p-CV5nn1zR.js → p-CfZI7bBe.js} +1 -1
  244. package/dist/components/{p-2cJsJK3-.js → p-CjzUVpyd.js} +1 -1
  245. package/dist/components/{p-DoVubWyd.js → p-ClLyaOG7.js} +1 -1
  246. package/dist/components/{p-rLxtqgsy.js → p-Cop4KmAG.js} +1 -1
  247. package/dist/components/{p-C0AbGd4t.js → p-DHxDWgLP.js} +1 -1
  248. package/dist/components/{p-CuVYRPvz.js → p-DORBnmT4.js} +1 -1
  249. package/dist/components/{p-CmbpWpb0.js → p-DbN9vTl7.js} +1 -1
  250. package/dist/components/{p-DTh_zemx.js → p-Dl__XgUD.js} +1 -1
  251. package/dist/components/{p-8zrW9vEC.js → p-JjlTuq8d.js} +1 -1
  252. package/dist/components/p-d4i2Qqvl.js +1 -0
  253. package/dist/components/{p-Btb2UkLz.js → p-n-yq7lf4.js} +1 -1
  254. package/dist/components/{p-1D7CWIJ-.js → p-rQFFXcXl.js} +1 -1
  255. package/dist/components/p-sjDW_E4p.js +1 -0
  256. package/dist/components/{p-B56GeUtW.js → p-yc1qXhah.js} +1 -1
  257. package/dist/components/xpl-accordion.js +1 -1
  258. package/dist/components/xpl-application-shell.js +1 -1
  259. package/dist/components/xpl-avatar.js +1 -1
  260. package/dist/components/xpl-backdrop.js +1 -1
  261. package/dist/components/xpl-badge.js +1 -1
  262. package/dist/components/xpl-banner.js +1 -1
  263. package/dist/components/xpl-breadcrumb-item.js +1 -1
  264. package/dist/components/xpl-breadcrumbs.js +1 -1
  265. package/dist/components/xpl-button-row.js +1 -1
  266. package/dist/components/xpl-button.js +1 -1
  267. package/dist/components/xpl-calendar.js +1 -1
  268. package/dist/components/xpl-checkbox.js +1 -1
  269. package/dist/components/xpl-choicelist.js +1 -1
  270. package/dist/components/xpl-content-area.js +1 -1
  271. package/dist/components/xpl-dashboard.js +1 -1
  272. package/dist/components/xpl-data-card.js +1 -1
  273. package/dist/components/xpl-divider.js +1 -1
  274. package/dist/components/xpl-dropdown-group.js +1 -1
  275. package/dist/components/xpl-dropdown-heading.js +1 -1
  276. package/dist/components/xpl-dropdown-option.js +1 -1
  277. package/dist/components/xpl-dropdown.js +1 -1
  278. package/dist/components/xpl-dynamic-table-cell.js +1 -1
  279. package/dist/components/xpl-dynamic-table-row.js +1 -1
  280. package/dist/components/xpl-dynamic-table.js +1 -1
  281. package/dist/components/xpl-grid-item.js +1 -1
  282. package/dist/components/xpl-grid.js +1 -1
  283. package/dist/components/xpl-header-accordion.js +1 -1
  284. package/dist/components/xpl-icon.js +1 -1
  285. package/dist/components/xpl-input-color.js +1 -1
  286. package/dist/components/xpl-input-date.js +1 -1
  287. package/dist/components/xpl-input-file.js +1 -1
  288. package/dist/components/xpl-input-phone.js +1 -1
  289. package/dist/components/xpl-input-search.js +1 -1
  290. package/dist/components/xpl-input-time.js +1 -1
  291. package/dist/components/xpl-input.js +1 -1
  292. package/dist/components/xpl-large-card.js +1 -1
  293. package/dist/components/xpl-list-item.js +1 -1
  294. package/dist/components/xpl-list.js +1 -1
  295. package/dist/components/xpl-main-nav.js +1 -1
  296. package/dist/components/xpl-modal.js +1 -1
  297. package/dist/components/xpl-nav-header-menu.js +1 -1
  298. package/dist/components/xpl-nav-item.js +1 -1
  299. package/dist/components/xpl-pagination.js +1 -1
  300. package/dist/components/xpl-panel.js +1 -1
  301. package/dist/components/xpl-popover.js +1 -1
  302. package/dist/components/xpl-progress-bar.js +1 -1
  303. package/dist/components/xpl-progress-indicator.js +1 -1
  304. package/dist/components/xpl-radio.js +1 -1
  305. package/dist/components/xpl-secondary-nav.js +1 -1
  306. package/dist/components/xpl-select.js +1 -1
  307. package/dist/components/xpl-side-nav-header-item.js +1 -1
  308. package/dist/components/xpl-side-nav-item.js +1 -1
  309. package/dist/components/xpl-side-nav-section.js +1 -1
  310. package/dist/components/xpl-side-nav.js +1 -1
  311. package/dist/components/xpl-skeleton.js +1 -1
  312. package/dist/components/xpl-slideout.js +1 -1
  313. package/dist/components/xpl-spotlight.js +1 -1
  314. package/dist/components/xpl-tab-panel.js +1 -1
  315. package/dist/components/xpl-tab.js +1 -1
  316. package/dist/components/xpl-table-body.js +1 -1
  317. package/dist/components/xpl-table-cell.js +1 -1
  318. package/dist/components/xpl-table-footer-cell.js +1 -1
  319. package/dist/components/xpl-table-footer.js +1 -1
  320. package/dist/components/xpl-table-header-cell.js +1 -1
  321. package/dist/components/xpl-table-header.js +1 -1
  322. package/dist/components/xpl-table-row.js +1 -1
  323. package/dist/components/xpl-table.js +1 -1
  324. package/dist/components/xpl-tabs.js +1 -1
  325. package/dist/components/xpl-tag.js +1 -1
  326. package/dist/components/xpl-toast.js +1 -1
  327. package/dist/components/xpl-toggle.js +1 -1
  328. package/dist/components/xpl-toolbar.js +1 -1
  329. package/dist/components/xpl-tooltip.js +1 -1
  330. package/dist/components/xpl-top-nav-item.js +1 -1
  331. package/dist/components/xpl-top-nav-menu.js +1 -1
  332. package/dist/components/xpl-top-nav.js +1 -1
  333. package/dist/components/xpl-utility-bar.js +1 -1
  334. package/dist/docs/xpl-accordion/readme.md +5 -4
  335. package/dist/docs/xpl-application-shell/readme.md +10 -0
  336. package/dist/docs/xpl-avatar/readme.md +7 -0
  337. package/dist/docs/xpl-badge/readme.md +7 -0
  338. package/dist/docs/xpl-breadcrumbs/xpl-breadcrumb-item/readme.md +1 -0
  339. package/dist/docs/xpl-breadcrumbs/xpl-breadcrumbs/readme.md +1 -0
  340. package/dist/docs/xpl-button/readme.md +7 -0
  341. package/dist/docs/xpl-checkbox/readme.md +7 -0
  342. package/dist/docs/xpl-content-area/readme.md +7 -0
  343. package/dist/docs/xpl-dashboard/readme.md +7 -0
  344. package/dist/docs/xpl-data-card/readme.md +1 -0
  345. package/dist/docs/xpl-divider/readme.md +7 -0
  346. package/dist/docs/xpl-dropdown/readme.md +8 -0
  347. package/dist/docs/xpl-dropdown/xpl-dropdown-group/readme.md +7 -0
  348. package/dist/docs/xpl-dropdown/xpl-dropdown-heading/readme.md +7 -0
  349. package/dist/docs/xpl-dropdown/xpl-dropdown-option/readme.md +7 -0
  350. package/dist/docs/xpl-dynamic-table/readme.md +8 -0
  351. package/dist/docs/xpl-dynamic-table-cell/readme.md +7 -0
  352. package/dist/docs/xpl-dynamic-table-row/readme.md +7 -0
  353. package/dist/docs/xpl-grid-item/readme.md +7 -0
  354. package/dist/docs/xpl-header-accordion/readme.md +8 -0
  355. package/dist/docs/xpl-icon/readme.md +1 -1
  356. package/dist/docs/xpl-input/readme.md +8 -0
  357. package/dist/docs/xpl-list/readme.md +7 -0
  358. package/dist/docs/xpl-list/xpl-list-item/readme.md +16 -0
  359. package/dist/docs/xpl-main-nav/readme.md +12 -0
  360. package/dist/docs/xpl-nav-item/readme.md +9 -0
  361. package/dist/docs/xpl-popover/readme.md +1 -0
  362. package/dist/docs/xpl-radio/readme.md +7 -0
  363. package/dist/docs/xpl-secondary-nav/readme.md +7 -0
  364. package/dist/docs/xpl-select/readme.md +7 -0
  365. package/dist/docs/xpl-side-nav/xpl-side-nav-item/readme.md +9 -0
  366. package/dist/docs/xpl-side-nav/xpl-side-nav-section/readme.md +8 -0
  367. package/dist/docs/xpl-slideout/readme.md +13 -0
  368. package/dist/docs/xpl-spotlight/readme.md +1 -0
  369. package/dist/docs/xpl-table/readme.md +12 -0
  370. package/dist/docs/xpl-table/xpl-table-body/readme.md +7 -0
  371. package/dist/docs/xpl-table/xpl-table-cell/readme.md +7 -0
  372. package/dist/docs/xpl-table/xpl-table-footer/readme.md +7 -0
  373. package/dist/docs/xpl-table/xpl-table-footer-cell/readme.md +7 -0
  374. package/dist/docs/xpl-table/xpl-table-header-cell/readme.md +59 -52
  375. package/dist/docs/xpl-table/xpl-table-row/readme.md +7 -0
  376. package/dist/docs/xpl-table-header/readme.md +7 -0
  377. package/dist/docs/xpl-tag/readme.md +9 -2
  378. package/dist/docs/xpl-toast/readme.md +8 -0
  379. package/dist/docs/xpl-toolbar/readme.md +8 -0
  380. package/dist/docs/xpl-tooltip/readme.md +7 -0
  381. package/dist/docs/xpl-top-nav/xpl-nav-header-menu/readme.md +1 -0
  382. package/dist/docs/xpl-top-nav/xpl-top-nav-item/readme.md +1 -0
  383. package/dist/docs/xpl-top-nav/xpl-top-nav-menu/readme.md +1 -0
  384. package/dist/docs/xpl-utility-bar/readme.md +8 -0
  385. package/dist/docs.json +770 -88
  386. package/dist/esm/apollo-core.js +3 -3
  387. package/dist/esm/{index-ukZKsqqq.js → index-CJABLO_1.js} +52 -11
  388. package/dist/esm/loader.js +2 -2
  389. package/dist/esm/xpl-accordion.entry.js +3 -3
  390. package/dist/esm/xpl-application-shell.entry.js +2 -2
  391. package/dist/esm/xpl-avatar_3.entry.js +5 -5
  392. package/dist/esm/xpl-backdrop.entry.js +2 -2
  393. package/dist/esm/xpl-badge.entry.js +2 -2
  394. package/dist/esm/xpl-banner.entry.js +3 -3
  395. package/dist/esm/xpl-breadcrumb-item.entry.js +2 -2
  396. package/dist/esm/xpl-breadcrumbs.entry.js +2 -2
  397. package/dist/esm/xpl-button-row.entry.js +2 -2
  398. package/dist/esm/xpl-button.entry.js +3 -3
  399. package/dist/esm/xpl-calendar.entry.js +2 -2
  400. package/dist/esm/xpl-checkbox.entry.js +4 -4
  401. package/dist/esm/xpl-choicelist.entry.js +2 -2
  402. package/dist/esm/xpl-content-area.entry.js +2 -2
  403. package/dist/esm/xpl-dashboard.entry.js +2 -2
  404. package/dist/esm/xpl-data-card.entry.js +3 -3
  405. package/dist/esm/xpl-dropdown_4.entry.js +9 -9
  406. package/dist/esm/xpl-dynamic-table-cell.entry.js +3 -3
  407. package/dist/esm/xpl-dynamic-table-row.entry.js +3 -3
  408. package/dist/esm/xpl-dynamic-table.entry.js +3 -3
  409. package/dist/esm/xpl-grid-item.entry.js +2 -2
  410. package/dist/esm/xpl-grid.entry.js +1 -1
  411. package/dist/esm/xpl-header-accordion.entry.js +2 -2
  412. package/dist/esm/xpl-icon.entry.js +1 -1
  413. package/dist/esm/xpl-input-color.entry.js +1 -1
  414. package/dist/esm/xpl-input-phone.entry.js +1 -1
  415. package/dist/esm/xpl-input-time.entry.js +1 -1
  416. package/dist/esm/xpl-input_4.entry.js +3 -3
  417. package/dist/esm/xpl-large-card.entry.js +1 -1
  418. package/dist/esm/xpl-list-item.entry.js +1 -1
  419. package/dist/esm/xpl-list.entry.js +3 -3
  420. package/dist/esm/xpl-main-nav.entry.js +2 -2
  421. package/dist/esm/xpl-modal.entry.js +1 -1
  422. package/dist/esm/xpl-nav-header-menu.entry.js +3 -3
  423. package/dist/esm/xpl-nav-item.entry.js +3 -3
  424. package/dist/esm/xpl-pagination.entry.js +1 -1
  425. package/dist/esm/xpl-panel.entry.js +1 -1
  426. package/dist/esm/xpl-popover.entry.js +5 -5
  427. package/dist/esm/xpl-progress-bar.entry.js +1 -1
  428. package/dist/esm/xpl-progress-indicator.entry.js +1 -1
  429. package/dist/esm/xpl-secondary-nav.entry.js +2 -2
  430. package/dist/esm/xpl-select_2.entry.js +10 -10
  431. package/dist/esm/xpl-side-nav-header-item.entry.js +1 -1
  432. package/dist/esm/xpl-side-nav-item.entry.js +3 -3
  433. package/dist/esm/xpl-side-nav-section.entry.js +6 -6
  434. package/dist/esm/xpl-side-nav.entry.js +1 -1
  435. package/dist/esm/xpl-skeleton.entry.js +1 -1
  436. package/dist/esm/xpl-slideout.entry.js +2 -2
  437. package/dist/esm/xpl-spotlight.entry.js +1 -1
  438. package/dist/esm/xpl-tab-panel.entry.js +1 -1
  439. package/dist/esm/xpl-tab.entry.js +1 -1
  440. package/dist/esm/xpl-table-body.entry.js +2 -2
  441. package/dist/esm/xpl-table-cell_3.entry.js +5 -5
  442. package/dist/esm/xpl-table-footer.entry.js +2 -2
  443. package/dist/esm/xpl-table-header.entry.js +2 -2
  444. package/dist/esm/xpl-table-row.entry.js +3 -3
  445. package/dist/esm/xpl-table.entry.js +1 -1
  446. package/dist/esm/xpl-tabs.entry.js +1 -1
  447. package/dist/esm/xpl-toast.entry.js +3 -3
  448. package/dist/esm/xpl-toggle.entry.js +1 -1
  449. package/dist/esm/xpl-toolbar.entry.js +3 -3
  450. package/dist/esm/xpl-tooltip.entry.js +2 -2
  451. package/dist/esm/xpl-top-nav-item.entry.js +3 -3
  452. package/dist/esm/xpl-top-nav-menu.entry.js +1 -1
  453. package/dist/esm/xpl-top-nav.entry.js +1 -1
  454. package/dist/esm/xpl-utility-bar.entry.js +2 -2
  455. package/dist/types/components.d.ts +3 -1
  456. package/dist/types/stencil-public-runtime.d.ts +12 -0
  457. package/hydrate/index.js +117 -98
  458. package/hydrate/index.mjs +117 -98
  459. package/loader/index.d.ts +1 -1
  460. package/package.json +13 -13
  461. package/dist/apollo-core/p-045a4538.entry.js +0 -1
  462. package/dist/apollo-core/p-08767607.entry.js +0 -1
  463. package/dist/apollo-core/p-194c0ccd.entry.js +0 -1
  464. package/dist/apollo-core/p-1c031055.entry.js +0 -1
  465. package/dist/apollo-core/p-24f7280a.entry.js +0 -1
  466. package/dist/apollo-core/p-386851a2.entry.js +0 -1
  467. package/dist/apollo-core/p-3cd1238b.entry.js +0 -1
  468. package/dist/apollo-core/p-4e3c6616.entry.js +0 -1
  469. package/dist/apollo-core/p-5b9fd96e.entry.js +0 -1
  470. package/dist/apollo-core/p-5cbf5d42.entry.js +0 -1
  471. package/dist/apollo-core/p-5ec2b180.entry.js +0 -1
  472. package/dist/apollo-core/p-65f6b66c.entry.js +0 -1
  473. package/dist/apollo-core/p-72e0455f.entry.js +0 -1
  474. package/dist/apollo-core/p-7ac7fbc0.entry.js +0 -1
  475. package/dist/apollo-core/p-7f4463ff.entry.js +0 -1
  476. package/dist/apollo-core/p-87582346.entry.js +0 -1
  477. package/dist/apollo-core/p-a6ecca68.entry.js +0 -1
  478. package/dist/apollo-core/p-a789c272.entry.js +0 -1
  479. package/dist/apollo-core/p-bd493c4a.entry.js +0 -1
  480. package/dist/apollo-core/p-bdcece21.entry.js +0 -1
  481. package/dist/apollo-core/p-bfb7a83a.entry.js +0 -1
  482. package/dist/apollo-core/p-c22f70f4.entry.js +0 -1
  483. package/dist/apollo-core/p-d3230277.entry.js +0 -1
  484. package/dist/apollo-core/p-d7f8ee34.entry.js +0 -1
  485. package/dist/apollo-core/p-d879c349.entry.js +0 -1
  486. package/dist/apollo-core/p-ea9cdd65.entry.js +0 -1
  487. package/dist/apollo-core/p-ukZKsqqq.js +0 -2
  488. package/dist/components/p-B6YLKDUX.js +0 -1
  489. package/dist/components/p-BSHdGbmH.js +0 -1
  490. package/dist/components/p-BZIZSovL.js +0 -1
  491. package/dist/components/p-CgemLtmL.js +0 -1
  492. package/dist/components/p-Dp62sBqX.js +0 -1
  493. package/dist/components/p-DqgnC_vS.js +0 -1
  494. package/dist/components/p-DtV4i45B.js +0 -1
@@ -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-BSHdGbmH.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-CV5nn1zR.js";import{d as g}from"./p-CQjJIHK6.js";const m=".xpl-spotlight__dismiss button, .xpl-spotlight__actions button";let x=0;const b={"top-left":"top-start","top-right":"top-end","bottom-left":"bottom-start","bottom-right":"bottom-end"},f={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=b[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=f[e]??f[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-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 +1 @@
1
- import{p as e,H as t,h as s,c as a,t as l}from"./p-BSHdGbmH.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-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 +1 @@
1
- import{p as t,H as s,d as e,h as i,c as a,t as n}from"./p-BSHdGbmH.js";import{g as l,t as r,a as o}from"./p-BQtbf88X.js";import{d as c}from"./p-CFXvQqUO.js";import{d as h}from"./p-CV5nn1zR.js";import{d}from"./p-CQjJIHK6.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=l(this.el),s=this.target??"";return{panelId:o(t,s),triggerId:r(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,n=this.selected?"true":"false",l={"xpl-tab":!0,"xpl-tab--selected":this.selected,"xpl-tab--segment":t,"xpl-tab--disabled":this.effectivelyDisabled};if(t)return i(a,{class:l},i("xpl-button",{controlAttrs:{id:e,role:"tab","aria-controls":s,"aria-selected":n},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 r=this.icon?i("xpl-icon",{class:"xpl-tab__icon",icon:this.icon,size:16}):null;return i(a,{class:l},i("button",{"aria-controls":s,"aria-selected":n,class:"xpl-tab__button",disabled:this.effectivelyDisabled,id:e,onClick:this.handleTabClick,role:"tab",type:"button"},"start"===this.iconPosition?r:null,i("slot",null),"end"===this.iconPosition?r: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(n(t))||customElements.define(n(t),b);break;case"xpl-badge":customElements.get(n(t))||c();break;case"xpl-button":customElements.get(n(t))||h();break;case"xpl-icon":customElements.get(n(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-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 +1 @@
1
- import{p as e,H as t,h as s,c as o,t as c}from"./p-BSHdGbmH.js";const l=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost()}render(){return s(o,{key:"e5934161758f0934269a09e4a1058f3fda919e9d",class:"xpl-table-body",role:"rowgroup"},s("slot",{key:"e042714dc35cbe4ecc83cff740f7a24de48feec1"}))}},[260,"xpl-table-body"]),a=l,d=function(){"undefined"!=typeof customElements&&["xpl-table-body"].forEach((e=>{"xpl-table-body"===e&&(customElements.get(c(e))||customElements.define(c(e),l))}))};export{a as XplTableBody,d as defineCustomElement}
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 +1 @@
1
- import{X as o,d as s}from"./p-B56GeUtW.js";const t=o,p=s;export{t as XplTableCell,p as defineCustomElement}
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 +1 @@
1
- import{X as o,d as s}from"./p-DqgnC_vS.js";const p=o,r=s;export{p as XplTableFooterCell,r as defineCustomElement}
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 +1 @@
1
- import{p as e,H as t,h as o,c as s,t as r}from"./p-BSHdGbmH.js";const f=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost()}render(){return o(s,{key:"57872baa33166a8146bd0c9b3d7af1597e1fb41e",class:"xpl-table-footer",role:"rowgroup"},o("slot",{key:"65def2bdfee1be95fa966f7f746dedc7176b91e6"}))}},[260,"xpl-table-footer"]),l=f,a=function(){"undefined"!=typeof customElements&&["xpl-table-footer"].forEach((e=>{"xpl-table-footer"===e&&(customElements.get(r(e))||customElements.define(r(e),f))}))};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-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 +1 @@
1
- import{T as o,d as s}from"./p-CdRmVtIN.js";const t=o,m=s;export{t as XplTableHeaderCell,m as defineCustomElement}
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 +1 @@
1
- import{p as e,H as t,h as a,c as s,t as r}from"./p-BSHdGbmH.js";const l=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost()}render(){return a(s,{key:"fb6c6d0ab301f41a22428583ffa0fea60a30719b",role:"row",class:"xpl-table-header"},a("slot",{key:"54b058d43266fa281e30d26a644ad93d6559408b"}))}},[260,"xpl-table-header"]),d=l,o=function(){"undefined"!=typeof customElements&&["xpl-table-header"].forEach((e=>{"xpl-table-header"===e&&(customElements.get(r(e))||customElements.define(r(e),l))}))};export{d as XplTableHeader,o as defineCustomElement}
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 +1 @@
1
- import{p as e,H as t,h as s,c as i,t as l}from"./p-BSHdGbmH.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:"8c49ba27b39d934cb774140b43e811e5ee2bb904",class:{"xpl-table-row":!0,"xpl-table-row--disabled":this.disabled,"xpl-table-row--selected":this.selected},role:"row"},s("slot",{key:"30788ce629c65d7eab04d268da978d46f0145e99"}))}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}]}]),d=a,n=function(){"undefined"!=typeof customElements&&["xpl-table-row"].forEach((e=>{"xpl-table-row"===e&&(customElements.get(l(e))||customElements.define(l(e),a))}))};export{d as XplTableRow,n as defineCustomElement}
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 +1 @@
1
- import{p as t,H as e,d as s,h as r,c as i,t as l}from"./p-BSHdGbmH.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-CdRmVtIN.js";import{d as p}from"./p-CuVYRPvz.js";import{d as b}from"./p-CQjJIHK6.js";import{d as f}from"./p-B56GeUtW.js";import{d as x}from"./p-DqgnC_vS.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-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 +1 @@
1
- import{p as t,H as s,d as e,h as i,c as a,t as n}from"./p-BSHdGbmH.js";import{d as o}from"./p-2cJsJK3-.js";import{d as h}from"./p-BZIZSovL.js";import{d as l}from"./p-Dp62sBqX.js";import{d as r}from"./p-C0AbGd4t.js";import{d}from"./p-CQjJIHK6.js";import{d as c}from"./p-rLxtqgsy.js";import{d as p}from"./p-B7aaJikj.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-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 +1 @@
1
- import{T as a,d as o}from"./p-B7aaJikj.js";const s=a,p=o;export{s as XplTag,p as defineCustomElement}
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 +1 @@
1
- import{p as s,H as e,h as t,c as i,t as a}from"./p-BSHdGbmH.js";import{d as o}from"./p-CV5nn1zR.js";import{d as c}from"./p-CQjJIHK6.js";let n=!1;const l=s(class extends e{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 t("xpl-icon",{size:24,icon:"octagon-warning"});case"success":return t("xpl-icon",{size:24,icon:"circle-check"});default:return t("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 t(i,{key:"d51d901c62de43e0ad248a626e0447a7849e50f3",class:"xpl-toast xpl-toast--"+this.variant,onAnimationEnd:this.handleAnimationEnd},t("div",{key:"e2e3585a43272f51f6ace1ce62544ae41464a3e5",class:"xpl-toast__left"},this.showIcon&&t("div",{key:"e3fd60595f205d8e15ed3ca1826e5e6d356e1a63",class:"xpl-toast__icon xpl-toast__icon--"+this.variant},this.getIcon()),t("div",{key:"49642e6ee5502c09deb32188b62a160f748bb564",class:"xpl-toast__notification"},t("p",{key:"f7176eea6e6e125bec0c4397b0399bb76e8554b7",class:"xpl-toast__title"},t("slot",{key:"d5dd0d0413ec4f8198d16f8689791614fea877bc",name:"title"})),""!==this.caption&&t("p",{key:"966112d3fe6dc1348341034685c606ca98e95d84",class:"xpl-toast__caption"},this.caption?.substring(0,85)))),t("div",{key:"c9ba66aaf64f191d5bab1c3290e0981a86a3ef91",class:"xpl-toast__action",ref:s=>{s&&(this.actionSlot=s)}},t("slot",{key:"faad90759fd343be3caa4540422c09d04642a217",name:"action"})),this.isDismissible&&t("div",{key:"25f1140170ec9a242e62c6665ebf0eb8aa1bae64",class:"xpl-toast__close"},t("xpl-button",{key:"635900d579bda4fb905c7280de700de1143d474b",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}]}]),d=l,h=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{d as XplToast,h as defineCustomElement}
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 +1 @@
1
- import{p as e,H as s,d as t,h as l,c as i,t as a}from"./p-BSHdGbmH.js";import{v as c}from"./p-CK3_k8jD.js";const d=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]}]),h=d,o=function(){"undefined"!=typeof customElements&&["xpl-toggle"].forEach((e=>{"xpl-toggle"===e&&(customElements.get(a(e))||customElements.define(a(e),d))}))};export{h 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-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 +1 @@
1
- import{p as e,H as t,h as s,c as o,t as c}from"./p-BSHdGbmH.js";const d=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 s(o,{key:"688ada0542f0634df6b447331833205149e88a94",class:{"xpl-toolbar":!0,dark:!0,hidden:0===this.selectedItemCount}},s("div",{key:"6b8c2990c354d2b9ee93225ad98fb8fbaf3dbaf7",class:"toolbar"},s("p",{key:"60923603e318d109fd794259863a684d749ed52b",class:"selected-item-count"},this.selectedItemCount," Selected"),s("div",{key:"77df55c910d8ce89a4ff2a0356bc7cf78120e49a",class:"actions"},s("slot",{key:"5de2e6bd168c31be133c55758acd2f95c56b715c",name:"actions-left"}),s("slot",{key:"3f8b3540adbd441c28771410f4d33e29d87d3be9",name:"actions-right"}))))}get el(){return this}},[260,"xpl-toolbar",{selectedItemCount:[2,"selected-item-count"]},[[8,"selectedItemCountChange","listenToSelectedItemCountChange"]]]),a=d,n=function(){"undefined"!=typeof customElements&&["xpl-toolbar"].forEach((e=>{"xpl-toolbar"===e&&(customElements.get(c(e))||customElements.define(c(e),d))}))};export{a as XplToolbar,n as defineCustomElement}
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 +1 @@
1
- import{T as o,d as s}from"./p-B6YLKDUX.js";const p=o,r=s;export{p as XplTooltip,r as defineCustomElement}
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 +1 @@
1
- import{T as o,d as s}from"./p-Btb2UkLz.js";const t=o,p=s;export{t as XplTopNavItem,p as defineCustomElement}
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 +1 @@
1
- import{p as t,H as e,h as s,c as n,t as i}from"./p-BSHdGbmH.js";import{T as a,i as o}from"./p-Dqb1pIRo.js";import{a as c,d as p}from"./p-Btb2UkLz.js";import{d as l}from"./p-CQjJIHK6.js";const r=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]}]),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}
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 +1 @@
1
- import{p as t,H as s,d as e,h as i,c as n,t as o}from"./p-BSHdGbmH.js";import{h as a}from"./p-DkqlawVY.js";import{i as l}from"./p-Dqb1pIRo.js";import{d as r}from"./p-CV5nn1zR.js";import{d as h}from"./p-CQjJIHK6.js";import{d as p}from"./p-DTh_zemx.js";import{d as c}from"./p-Btb2UkLz.js";const d=[".xpl-top-nav__brand-logo-slot",".xpl-top-nav__brand-bar"],v=".xpl-top-nav__user-menu-panel",u=[v,".xpl-top-nav__user-menu-stash"],b=[".xpl-top-nav__user-popover",".xpl-top-nav__user-menu-stash",".xpl-top-nav__right-user"],m=[v],x=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.brandClick=e(this,"brandClick",7),this.navOpen=e(this,"navOpen",7),this.slotProjectionDirty=!1,this.userPopoverDrawerSyncHost=null,this.brandLogoSlotPresent=!1,this.open=!1,this.slotProjectionNonce=0,this.userMenuSlotPresent=!1,this.userMenuTriggerSlotPresent=!1,this.focusNavControlAfterClose=()=>{void 0!==this.navControlFocusTimeoutId&&clearTimeout(this.navControlFocusTimeoutId),this.navControlFocusTimeoutId=setTimeout((()=>{this.navControlFocusTimeoutId=void 0,this.el.querySelector(".xpl-top-nav__nav-control")?.focus()}),0)},this.handleUserPopoverIsOpenChange=t=>{const{detail:s}=t;!0===s&&this.closeMobileDrawerWhenAccountMenuOpens()},this.onBrandNavItemClick=t=>{null==this.brandHref&&this.brandClick.emit(t.detail)},this.onDocKeyDownEscape=t=>{this.navControl&&this.open&&"Escape"===t.key&&(this.anyDescendantPopoverIsOpen()||this.el.querySelector("xpl-top-nav-item.xpl-top-nav-item--dropdown-open")||(t.preventDefault(),t.stopPropagation(),this.open=!1,this.navOpen.emit(!1),this.focusNavControlAfterClose()))},this.onDocClickOutsideDismiss=t=>{if(!this.navControl||!this.open)return;const s=t.target;null==s||this.anyDescendantPopoverIsOpen()||this.el.querySelector(".xpl-top-nav__left-primary")?.contains(s)||this.el.querySelector(".xpl-top-nav__nav-control")?.contains(s)||(this.open=!1,this.resetMobileCascade(),this.navOpen.emit(!1))},this.onNavToggle=()=>{const t=this.open;this.open=!this.open,this.navOpen.emit(this.open),t&&!this.open&&(this.resetMobileCascade(),this.focusNavControlAfterClose())},this.onUserPopoverInnerOpenClassChange=()=>{const t=this.userPopoverDrawerSyncHost;if(!t)return;const s=t.querySelector(".xpl-popover");s?.classList.contains("xpl-popover--is-open")&&this.closeMobileDrawerWhenAccountMenuOpens()},this.syncBrandLogoSlot=()=>{const t=a(this.el,"brand-logo",{hostTag:"xpl-top-nav",projectionRegionSelectors:d});t!==this.brandLogoSlotPresent&&(this.brandLogoSlotPresent=t)},this.syncUserMenuSlots=()=>{const t=a(this.el,"user-menu",{hostTag:"xpl-top-nav",projectionRegionSelectors:u}),s=a(this.el,"user-menu-trigger",{hostTag:"xpl-top-nav",projectionRegionSelectors:b,excludedRegionSelectors:m});t!==this.userMenuSlotPresent&&(this.userMenuSlotPresent=t),s!==this.userMenuTriggerSlotPresent&&(this.userMenuTriggerSlotPresent=s)}}onNavControlChanged(){this.syncOpenFromNavControl(),this.syncDocDismissListeners()}connectedCallback(){this.syncOpenFromNavControl(),this.syncDocDismissListeners(),this.syncBrandLogoSlot(),this.syncUserMenuSlots(),this.connectSlotContentObserver(),this.flushPendingSlotProjection()}disconnectedCallback(){void 0!==this.navControlFocusTimeoutId&&(clearTimeout(this.navControlFocusTimeoutId),this.navControlFocusTimeoutId=void 0),void 0!==this.deferredSlotContentObserverSyncTimeoutId&&(clearTimeout(this.deferredSlotContentObserverSyncTimeoutId),this.deferredSlotContentObserverSyncTimeoutId=void 0),this.removeDocDismissListeners(),this.disconnectSlotContentObserver(),this.disconnectUserPopoverDrawerSync()}componentWillLoad(){this.syncOpenFromNavControl(),this.syncBrandLogoSlot(),this.syncUserMenuSlots()}componentWillRender(){this.disconnectSlotContentObserver()}componentDidRender(){this.connectSlotContentObserver(),this.connectUserPopoverDrawerSync()}get childAccountLabelText(){return this.childAccountLabel?.trim()??""}get hasBrand(){const t=this.brandName?.trim()??"",s=this.brandLogo?.trim()??"";return t.length>0||s.length>0||this.brandLogoSlotPresent}get hasUserMenu(){return this.userMenuSlotPresent}get needsUserMenuSlotStash(){return!this.userMenuSlotPresent&&this.userMenuTriggerSlotPresent}get usesBuiltInChildAccountTrigger(){return this.hasUserMenu&&!this.userMenuTriggerSlotPresent}anyDescendantPopoverIsOpen(){const t=this.el.querySelectorAll("xpl-popover");for(let s=0;s<t.length;s+=1){const e=t[s].querySelector(".xpl-popover");if(e?.classList.contains("xpl-popover--is-open"))return!0}return!1}closeMobileDrawerWhenAccountMenuOpens(){this.navControl&&this.open&&(this.open=!1,this.navOpen.emit(!1))}connectSlotContentObserver(){this.disconnectSlotContentObserver(),"undefined"!=typeof MutationObserver&&(this.slotContentObserver=new MutationObserver((t=>{this.scheduleSlotContentSyncFromObserver(t)})),this.slotContentObserver.observe(this.el,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["slot"]}))}connectUserPopoverDrawerSync(){const t=this.hasUserMenu?this.el.querySelector("xpl-popover.xpl-top-nav__user-popover"):null;if(t===this.userPopoverDrawerSyncHost)return;if(this.disconnectUserPopoverDrawerSync(),!t)return;this.userPopoverDrawerSyncHost=t,t.addEventListener("isOpenChange",this.handleUserPopoverIsOpenChange);const s=t.querySelector(".xpl-popover");s&&"undefined"!=typeof MutationObserver&&(this.userPopoverDrawerOpenObserver=new MutationObserver((()=>{this.onUserPopoverInnerOpenClassChange()})),this.userPopoverDrawerOpenObserver.observe(s,{attributes:!0,attributeFilter:["class"]}),this.onUserPopoverInnerOpenClassChange())}disconnectSlotContentObserver(){this.slotContentObserver?.disconnect(),this.slotContentObserver=void 0}disconnectUserPopoverDrawerSync(){this.userPopoverDrawerSyncHost&&(this.userPopoverDrawerSyncHost.removeEventListener("isOpenChange",this.handleUserPopoverIsOpenChange),this.userPopoverDrawerSyncHost=null),this.userPopoverDrawerOpenObserver?.disconnect(),this.userPopoverDrawerOpenObserver=void 0}removeDocDismissListeners(){const t=this.el.ownerDocument;t.removeEventListener("keydown",this.onDocKeyDownEscape,!1),t.removeEventListener("click",this.onDocClickOutsideDismiss,!0)}resetMobileCascade(){const t=this.el.querySelector(".xpl-top-nav__left-primary > xpl-top-nav-item.xpl-top-nav-item--dropdown-open");t?.closeMenu().catch((()=>{}))}scheduleSlotContentSyncFromObserver(t){this.mutationsAffectHostSlotting(t)&&(this.slotProjectionDirty=!0),void 0!==this.deferredSlotContentObserverSyncTimeoutId&&clearTimeout(this.deferredSlotContentObserverSyncTimeoutId),this.deferredSlotContentObserverSyncTimeoutId=setTimeout((()=>{this.deferredSlotContentObserverSyncTimeoutId=void 0,this.el.isConnected&&(this.syncBrandLogoSlot(),this.syncUserMenuSlots(),this.flushPendingSlotProjection())}),0)}flushPendingSlotProjection(){this.slotProjectionDirty&&(this.slotProjectionDirty=!1,this.slotProjectionNonce+=1)}mutationsAffectHostSlotting(t){return t.some((t=>"attributes"===t.type||"childList"===t.type&&t.target===this.el))}syncDocDismissListeners(){if(this.removeDocDismissListeners(),l()&&this.navControl){const t=this.el.ownerDocument;t.addEventListener("keydown",this.onDocKeyDownEscape,!1),t.addEventListener("click",this.onDocClickOutsideDismiss,!0)}}syncOpenFromNavControl(){const t=this.open;this.open=!1,t&&!this.navControl&&(this.resetMobileCascade(),this.navOpen.emit(!1))}render(){return i(n,{key:"f51ed285523198b4ef39de7ea1e5dc025d5a308a",class:{"xpl-top-nav":!0,"xpl-top-nav--nav-control":!!this.navControl,"xpl-top-nav--open":this.open,"xpl-top-nav--has-child-account-label":this.childAccountLabelText.length>0,"xpl-top-nav--has-brand":this.hasBrand,"xpl-top-nav--has-user-menu":this.hasUserMenu,dark:!0}},i("nav",{key:"c2c14ed2ba975299efd76a391dfd6371b9214449","aria-label":this.label??"top-navigation-bar",class:"xpl-top-nav__bar"},i("div",{key:"c223b947ffbcb55c6c6a06fa3adaeaee7661b61e",class:"xpl-top-nav__inner-left"},this.navControl&&i("button",{key:"d364b6dd709d59730d40e7a0d41f9dd8fd55d40b",type:"button",class:"xpl-top-nav__nav-control","aria-expanded":this.open?"true":"false","aria-label":this.open?"Close navigation menu":"Open navigation menu",onClick:this.onNavToggle},i("xpl-icon",{key:"b84614dc20189f641b2f5a08eef1c76610135598",class:"xpl-top-nav__control-icon",icon:"menu",size:32})),this.hasBrand&&i("div",{key:"90b104133cbdea89643923fd06f54179978862a5",class:"xpl-top-nav__brand-bar"},i("xpl-top-nav-item",{key:"2b40b31ba1312a76231f7a89b1e95508a5a146a1",class:"xpl-top-nav__brand",href:this.brandHref,onNavItemClick:this.onBrandNavItemClick},this.brandLogo?.trim()?i("img",{class:"xpl-top-nav__brand-logo",src:this.brandLogo,alt:this.brandName?.trim()?this.brandName.trim():"Brand"}):this.brandLogoSlotPresent?i("span",{class:"xpl-top-nav__brand-logo-slot"},i("slot",{name:"brand-logo"})):null,this.brandName?.trim()?i("span",{class:"xpl-top-nav__brand-name"},this.brandName.trim()):null)),i("div",{key:"ca3e9b4501ab3756301b2079bcb9632734e56922",class:{"xpl-top-nav__aside":!0,"xpl-nav-left":!0}},i("div",{key:"f2674faf140853536150058d13a5d40c7399979e",class:"xpl-top-nav__left-primary",role:"list"},i("slot",{key:"29363ac15d3f3bf7a43b237a7f7e0622c5bd54c4",name:"left-aside"})))),i("div",{key:"7c83bd0a80649b9cbe9ed757ead1136b6fabd09c",class:{"xpl-top-nav__aside":!0,"xpl-nav-right":!0}},i("div",{key:"c67e6d3365d90cd7f7c55b08dcc4fa56dcb3e291",class:"xpl-nav-right__list"},i("div",{key:"46b9c3b0b010bf52a5632bc81b279310c0a54438",class:"xpl-top-nav__right-rail"},i("div",{key:"72279d15a5464dfabd9f92c04bc231e270ea04b9",class:"xpl-top-nav__right-lead"},i("slot",{key:"d8b44d01141f9cfbeb7d6b019345ffc8c94fd0c3",name:"right-aside"})),this.hasUserMenu?i("div",{class:"xpl-top-nav__right-user"},i("xpl-popover",{class:"xpl-top-nav__user-popover dark",position:"bottom-end",display:"menu"},this.userMenuTriggerSlotPresent?i("slot",{name:"user-menu-trigger",slot:"trigger"}):this.usesBuiltInChildAccountTrigger?i("xpl-button",{slot:"trigger",class:"xpl-top-nav__child-account-trigger",type:"button",variant:"tertiary",icon:"chevron-down",iconPosition:"end",iconOnly:0===this.childAccountLabelText.length,"aria-haspopup":"dialog","aria-label":this.childAccountLabelText.length>0?void 0:"Open account menu"},this.childAccountLabelText.length>0?this.childAccountLabelText:null):null,i("div",{class:"xpl-top-nav__user-menu-panel"},i("slot",{name:"user-menu"})))):null,this.needsUserMenuSlotStash?i("div",{class:"xpl-top-nav__user-menu-stash",hidden:!0,"aria-hidden":"true"},i("slot",{name:"user-menu-trigger"}),i("slot",{name:"user-menu"})):null)))))}get el(){return this}static get watchers(){return{navControl:[{onNavControlChanged:0}]}}},[260,"xpl-top-nav",{brandHref:[1,"brand-href"],brandLogo:[1,"brand-logo"],brandName:[1,"brand-name"],childAccountLabel:[1,"child-account-label"],label:[1],navControl:[516,"nav-control"],brandLogoSlotPresent:[32],open:[32],slotProjectionNonce:[32],userMenuSlotPresent:[32],userMenuTriggerSlotPresent:[32]},void 0,{navControl:[{onNavControlChanged:0}]}]),f=x,_=function(){"undefined"!=typeof customElements&&["xpl-top-nav","xpl-button","xpl-icon","xpl-popover","xpl-top-nav-item"].forEach((t=>{switch(t){case"xpl-top-nav":customElements.get(o(t))||customElements.define(o(t),x);break;case"xpl-button":customElements.get(o(t))||r();break;case"xpl-icon":customElements.get(o(t))||h();break;case"xpl-popover":customElements.get(o(t))||p();break;case"xpl-top-nav-item":customElements.get(o(t))||c()}}))};export{f as XplTopNav,_ as defineCustomElement}
1
+ import{p as t,H as s,d as e,h as i,c as n,t as o}from"./p-BqhTjJWq.js";import{h as a}from"./p-DkqlawVY.js";import{i as l}from"./p-Dqb1pIRo.js";import{d as r}from"./p-CfZI7bBe.js";import{d as h}from"./p-Bh-U2qmp.js";import{d as p}from"./p-Dl__XgUD.js";import{d as c}from"./p-n-yq7lf4.js";const d=[".xpl-top-nav__brand-logo-slot",".xpl-top-nav__brand-bar"],v=".xpl-top-nav__user-menu-panel",u=[v,".xpl-top-nav__user-menu-stash"],b=[".xpl-top-nav__user-popover",".xpl-top-nav__user-menu-stash",".xpl-top-nav__right-user"],m=[v],x=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.brandClick=e(this,"brandClick",7),this.navOpen=e(this,"navOpen",7),this.slotProjectionDirty=!1,this.userPopoverDrawerSyncHost=null,this.brandLogoSlotPresent=!1,this.open=!1,this.slotProjectionNonce=0,this.userMenuSlotPresent=!1,this.userMenuTriggerSlotPresent=!1,this.focusNavControlAfterClose=()=>{void 0!==this.navControlFocusTimeoutId&&clearTimeout(this.navControlFocusTimeoutId),this.navControlFocusTimeoutId=setTimeout((()=>{this.navControlFocusTimeoutId=void 0,this.el.querySelector(".xpl-top-nav__nav-control")?.focus()}),0)},this.handleUserPopoverIsOpenChange=t=>{const{detail:s}=t;!0===s&&this.closeMobileDrawerWhenAccountMenuOpens()},this.onBrandNavItemClick=t=>{null==this.brandHref&&this.brandClick.emit(t.detail)},this.onDocKeyDownEscape=t=>{this.navControl&&this.open&&"Escape"===t.key&&(this.anyDescendantPopoverIsOpen()||this.el.querySelector("xpl-top-nav-item.xpl-top-nav-item--dropdown-open")||(t.preventDefault(),t.stopPropagation(),this.open=!1,this.navOpen.emit(!1),this.focusNavControlAfterClose()))},this.onDocClickOutsideDismiss=t=>{if(!this.navControl||!this.open)return;const s=t.target;null==s||this.anyDescendantPopoverIsOpen()||this.el.querySelector(".xpl-top-nav__left-primary")?.contains(s)||this.el.querySelector(".xpl-top-nav__nav-control")?.contains(s)||(this.open=!1,this.resetMobileCascade(),this.navOpen.emit(!1))},this.onNavToggle=()=>{const t=this.open;this.open=!this.open,this.navOpen.emit(this.open),t&&!this.open&&(this.resetMobileCascade(),this.focusNavControlAfterClose())},this.onUserPopoverInnerOpenClassChange=()=>{const t=this.userPopoverDrawerSyncHost;if(!t)return;const s=t.querySelector(".xpl-popover");s?.classList.contains("xpl-popover--is-open")&&this.closeMobileDrawerWhenAccountMenuOpens()},this.syncBrandLogoSlot=()=>{const t=a(this.el,"brand-logo",{hostTag:"xpl-top-nav",projectionRegionSelectors:d});t!==this.brandLogoSlotPresent&&(this.brandLogoSlotPresent=t)},this.syncUserMenuSlots=()=>{const t=a(this.el,"user-menu",{hostTag:"xpl-top-nav",projectionRegionSelectors:u}),s=a(this.el,"user-menu-trigger",{hostTag:"xpl-top-nav",projectionRegionSelectors:b,excludedRegionSelectors:m});t!==this.userMenuSlotPresent&&(this.userMenuSlotPresent=t),s!==this.userMenuTriggerSlotPresent&&(this.userMenuTriggerSlotPresent=s)}}onNavControlChanged(){this.syncOpenFromNavControl(),this.syncDocDismissListeners()}connectedCallback(){this.syncOpenFromNavControl(),this.syncDocDismissListeners(),this.syncBrandLogoSlot(),this.syncUserMenuSlots(),this.connectSlotContentObserver(),this.flushPendingSlotProjection()}disconnectedCallback(){void 0!==this.navControlFocusTimeoutId&&(clearTimeout(this.navControlFocusTimeoutId),this.navControlFocusTimeoutId=void 0),void 0!==this.deferredSlotContentObserverSyncTimeoutId&&(clearTimeout(this.deferredSlotContentObserverSyncTimeoutId),this.deferredSlotContentObserverSyncTimeoutId=void 0),this.removeDocDismissListeners(),this.disconnectSlotContentObserver(),this.disconnectUserPopoverDrawerSync()}componentWillLoad(){this.syncOpenFromNavControl(),this.syncBrandLogoSlot(),this.syncUserMenuSlots()}componentWillRender(){this.disconnectSlotContentObserver()}componentDidRender(){this.connectSlotContentObserver(),this.connectUserPopoverDrawerSync()}get childAccountLabelText(){return this.childAccountLabel?.trim()??""}get hasBrand(){const t=this.brandName?.trim()??"",s=this.brandLogo?.trim()??"";return t.length>0||s.length>0||this.brandLogoSlotPresent}get hasUserMenu(){return this.userMenuSlotPresent}get needsUserMenuSlotStash(){return!this.userMenuSlotPresent&&this.userMenuTriggerSlotPresent}get usesBuiltInChildAccountTrigger(){return this.hasUserMenu&&!this.userMenuTriggerSlotPresent}anyDescendantPopoverIsOpen(){const t=this.el.querySelectorAll("xpl-popover");for(let s=0;s<t.length;s+=1){const e=t[s].querySelector(".xpl-popover");if(e?.classList.contains("xpl-popover--is-open"))return!0}return!1}closeMobileDrawerWhenAccountMenuOpens(){this.navControl&&this.open&&(this.open=!1,this.navOpen.emit(!1))}connectSlotContentObserver(){this.disconnectSlotContentObserver(),"undefined"!=typeof MutationObserver&&(this.slotContentObserver=new MutationObserver((t=>{this.scheduleSlotContentSyncFromObserver(t)})),this.slotContentObserver.observe(this.el,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["slot"]}))}connectUserPopoverDrawerSync(){const t=this.hasUserMenu?this.el.querySelector("xpl-popover.xpl-top-nav__user-popover"):null;if(t===this.userPopoverDrawerSyncHost)return;if(this.disconnectUserPopoverDrawerSync(),!t)return;this.userPopoverDrawerSyncHost=t,t.addEventListener("isOpenChange",this.handleUserPopoverIsOpenChange);const s=t.querySelector(".xpl-popover");s&&"undefined"!=typeof MutationObserver&&(this.userPopoverDrawerOpenObserver=new MutationObserver((()=>{this.onUserPopoverInnerOpenClassChange()})),this.userPopoverDrawerOpenObserver.observe(s,{attributes:!0,attributeFilter:["class"]}),this.onUserPopoverInnerOpenClassChange())}disconnectSlotContentObserver(){this.slotContentObserver?.disconnect(),this.slotContentObserver=void 0}disconnectUserPopoverDrawerSync(){this.userPopoverDrawerSyncHost&&(this.userPopoverDrawerSyncHost.removeEventListener("isOpenChange",this.handleUserPopoverIsOpenChange),this.userPopoverDrawerSyncHost=null),this.userPopoverDrawerOpenObserver?.disconnect(),this.userPopoverDrawerOpenObserver=void 0}removeDocDismissListeners(){const t=this.el.ownerDocument;t.removeEventListener("keydown",this.onDocKeyDownEscape,!1),t.removeEventListener("click",this.onDocClickOutsideDismiss,!0)}resetMobileCascade(){const t=this.el.querySelector(".xpl-top-nav__left-primary > xpl-top-nav-item.xpl-top-nav-item--dropdown-open");t?.closeMenu().catch((()=>{}))}scheduleSlotContentSyncFromObserver(t){this.mutationsAffectHostSlotting(t)&&(this.slotProjectionDirty=!0),void 0!==this.deferredSlotContentObserverSyncTimeoutId&&clearTimeout(this.deferredSlotContentObserverSyncTimeoutId),this.deferredSlotContentObserverSyncTimeoutId=setTimeout((()=>{this.deferredSlotContentObserverSyncTimeoutId=void 0,this.el.isConnected&&(this.syncBrandLogoSlot(),this.syncUserMenuSlots(),this.flushPendingSlotProjection())}),0)}flushPendingSlotProjection(){this.slotProjectionDirty&&(this.slotProjectionDirty=!1,this.slotProjectionNonce+=1)}mutationsAffectHostSlotting(t){return t.some((t=>"attributes"===t.type||"childList"===t.type&&t.target===this.el))}syncDocDismissListeners(){if(this.removeDocDismissListeners(),l()&&this.navControl){const t=this.el.ownerDocument;t.addEventListener("keydown",this.onDocKeyDownEscape,!1),t.addEventListener("click",this.onDocClickOutsideDismiss,!0)}}syncOpenFromNavControl(){const t=this.open;this.open=!1,t&&!this.navControl&&(this.resetMobileCascade(),this.navOpen.emit(!1))}render(){return i(n,{key:"f51ed285523198b4ef39de7ea1e5dc025d5a308a",class:{"xpl-top-nav":!0,"xpl-top-nav--nav-control":!!this.navControl,"xpl-top-nav--open":this.open,"xpl-top-nav--has-child-account-label":this.childAccountLabelText.length>0,"xpl-top-nav--has-brand":this.hasBrand,"xpl-top-nav--has-user-menu":this.hasUserMenu,dark:!0}},i("nav",{key:"c2c14ed2ba975299efd76a391dfd6371b9214449","aria-label":this.label??"top-navigation-bar",class:"xpl-top-nav__bar"},i("div",{key:"c223b947ffbcb55c6c6a06fa3adaeaee7661b61e",class:"xpl-top-nav__inner-left"},this.navControl&&i("button",{key:"d364b6dd709d59730d40e7a0d41f9dd8fd55d40b",type:"button",class:"xpl-top-nav__nav-control","aria-expanded":this.open?"true":"false","aria-label":this.open?"Close navigation menu":"Open navigation menu",onClick:this.onNavToggle},i("xpl-icon",{key:"b84614dc20189f641b2f5a08eef1c76610135598",class:"xpl-top-nav__control-icon",icon:"menu",size:32})),this.hasBrand&&i("div",{key:"90b104133cbdea89643923fd06f54179978862a5",class:"xpl-top-nav__brand-bar"},i("xpl-top-nav-item",{key:"2b40b31ba1312a76231f7a89b1e95508a5a146a1",class:"xpl-top-nav__brand",href:this.brandHref,onNavItemClick:this.onBrandNavItemClick},this.brandLogo?.trim()?i("img",{class:"xpl-top-nav__brand-logo",src:this.brandLogo,alt:this.brandName?.trim()?this.brandName.trim():"Brand"}):this.brandLogoSlotPresent?i("span",{class:"xpl-top-nav__brand-logo-slot"},i("slot",{name:"brand-logo"})):null,this.brandName?.trim()?i("span",{class:"xpl-top-nav__brand-name"},this.brandName.trim()):null)),i("div",{key:"ca3e9b4501ab3756301b2079bcb9632734e56922",class:{"xpl-top-nav__aside":!0,"xpl-nav-left":!0}},i("div",{key:"f2674faf140853536150058d13a5d40c7399979e",class:"xpl-top-nav__left-primary",role:"list"},i("slot",{key:"29363ac15d3f3bf7a43b237a7f7e0622c5bd54c4",name:"left-aside"})))),i("div",{key:"7c83bd0a80649b9cbe9ed757ead1136b6fabd09c",class:{"xpl-top-nav__aside":!0,"xpl-nav-right":!0}},i("div",{key:"c67e6d3365d90cd7f7c55b08dcc4fa56dcb3e291",class:"xpl-nav-right__list"},i("div",{key:"46b9c3b0b010bf52a5632bc81b279310c0a54438",class:"xpl-top-nav__right-rail"},i("div",{key:"72279d15a5464dfabd9f92c04bc231e270ea04b9",class:"xpl-top-nav__right-lead"},i("slot",{key:"d8b44d01141f9cfbeb7d6b019345ffc8c94fd0c3",name:"right-aside"})),this.hasUserMenu?i("div",{class:"xpl-top-nav__right-user"},i("xpl-popover",{class:"xpl-top-nav__user-popover dark",position:"bottom-end",display:"menu"},this.userMenuTriggerSlotPresent?i("slot",{name:"user-menu-trigger",slot:"trigger"}):this.usesBuiltInChildAccountTrigger?i("xpl-button",{slot:"trigger",class:"xpl-top-nav__child-account-trigger",type:"button",variant:"tertiary",icon:"chevron-down",iconPosition:"end",iconOnly:0===this.childAccountLabelText.length,"aria-haspopup":"dialog","aria-label":this.childAccountLabelText.length>0?void 0:"Open account menu"},this.childAccountLabelText.length>0?this.childAccountLabelText:null):null,i("div",{class:"xpl-top-nav__user-menu-panel"},i("slot",{name:"user-menu"})))):null,this.needsUserMenuSlotStash?i("div",{class:"xpl-top-nav__user-menu-stash",hidden:!0,"aria-hidden":"true"},i("slot",{name:"user-menu-trigger"}),i("slot",{name:"user-menu"})):null)))))}get el(){return this}static get watchers(){return{navControl:[{onNavControlChanged:0}]}}},[260,"xpl-top-nav",{brandHref:[1,"brand-href"],brandLogo:[1,"brand-logo"],brandName:[1,"brand-name"],childAccountLabel:[1,"child-account-label"],label:[1],navControl:[516,"nav-control"],brandLogoSlotPresent:[32],open:[32],slotProjectionNonce:[32],userMenuSlotPresent:[32],userMenuTriggerSlotPresent:[32]},void 0,{navControl:[{onNavControlChanged:0}]}]),f=x,_=function(){"undefined"!=typeof customElements&&["xpl-top-nav","xpl-button","xpl-icon","xpl-popover","xpl-top-nav-item"].forEach((t=>{switch(t){case"xpl-top-nav":customElements.get(o(t))||customElements.define(o(t),x);break;case"xpl-button":customElements.get(o(t))||r();break;case"xpl-icon":customElements.get(o(t))||h();break;case"xpl-popover":customElements.get(o(t))||p();break;case"xpl-top-nav-item":customElements.get(o(t))||c()}}))};export{f as XplTopNav,_ as defineCustomElement}
@@ -1 +1 @@
1
- import{p as t,H as s,d as a,h as i,c as e,t as n}from"./p-BSHdGbmH.js";import{d as l}from"./p-CQjJIHK6.js";const o=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.navOpen=a(this,"navOpen",7),this.open=!0}onNavToggle(){this.open=!this.open,this.navOpen.emit(this.open)}componentWillLoad(){this.open=void 0!==this.isNavOpenAtStartup?this.isNavOpenAtStartup:this.open}render(){return i(e,{key:"9bb4778368fca3035fc19b74ec3881b9c21ce856"},i("nav",{key:"909606f5baaef1a9c7402ac18107a607aa1df742","aria-label":"utility navigation bar",class:"xpl-utility-bar"},this.navControl?i("div",null,i("button",{class:"xpl-utility-bar__nav-control",onClick:()=>this.onNavToggle()},i("xpl-icon",{class:"xpl-utility-nav__bars",icon:"three-bars"})),i("slot",{name:"aside"})):i("slot",{name:"aside"}),i("slot",{key:"d6bce27702906a01823de67d63173406ceb06290",name:"main"})))}},[260,"xpl-utility-bar",{navControl:[4,"nav-control"],isNavOpenAtStartup:[4,"is-nav-open-at-startup"],open:[32]}]),c=o,r=function(){"undefined"!=typeof customElements&&["xpl-utility-bar","xpl-icon"].forEach((t=>{switch(t){case"xpl-utility-bar":customElements.get(n(t))||customElements.define(n(t),o);break;case"xpl-icon":customElements.get(n(t))||l()}}))};export{c as XplUtilityBar,r as defineCustomElement}
1
+ import{p as t,H as s,d as a,h as i,c as e,t as n}from"./p-BqhTjJWq.js";import{d as l}from"./p-Bh-U2qmp.js";const o=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.navOpen=a(this,"navOpen",7),this.open=!0}onNavToggle(){this.open=!this.open,this.navOpen.emit(this.open)}componentWillLoad(){this.open=void 0!==this.isNavOpenAtStartup?this.isNavOpenAtStartup:this.open}render(){return i(e,{key:"68d645d450da9bb09ab698b865cdb90643276b04"},i("nav",{key:"7c8e37a3c7029af28eea94f8c4db4a681f903fb7","aria-label":"utility navigation bar",class:"xpl-utility-bar"},this.navControl?i("div",null,i("button",{class:"xpl-utility-bar__nav-control",onClick:()=>this.onNavToggle()},i("xpl-icon",{class:"xpl-utility-nav__bars",icon:"three-bars"})),i("slot",{name:"aside"})):i("slot",{name:"aside"}),i("slot",{key:"36fd1261aeafbdcb52cee2b19b3f29ce7c3f7539",name:"main"})))}},[260,"xpl-utility-bar",{navControl:[4,"nav-control"],isNavOpenAtStartup:[4,"is-nav-open-at-startup"],open:[32]}]),c=o,r=function(){"undefined"!=typeof customElements&&["xpl-utility-bar","xpl-icon"].forEach((t=>{switch(t){case"xpl-utility-bar":customElements.get(n(t))||customElements.define(n(t),o);break;case"xpl-icon":customElements.get(n(t))||l()}}))};export{c as XplUtilityBar,r as defineCustomElement}
@@ -42,10 +42,11 @@ Type: `Promise<null>`
42
42
 
43
43
  ## Slots
44
44
 
45
- | Slot | Description |
46
- | ----------- | ----------------------------------------------------------------- |
47
- | `"content"` | Content rendered inside of the collapsible body of the accordion. |
48
- | `"heading"` | The header for the accordion component |
45
+ | Slot | Description |
46
+ | --------------- | --------------------------------------------------------------------------------- |
47
+ | `"content"` | Content rendered inside of the collapsible body of the accordion. |
48
+ | `"description"` | Additional text displayed under the header. Falls back to the `description` prop. |
49
+ | `"heading"` | The header for the accordion component |
49
50
 
50
51
 
51
52
  ## Dependencies
@@ -48,6 +48,16 @@ The nav rail widths / transforms (`74px`, `112px`, `240px`) drive the CSS-only o
48
48
  | `withUtility` | `with-utility` | | `boolean` | `true` |
49
49
 
50
50
 
51
+ ## Slots
52
+
53
+ | Slot | Description |
54
+ | ----------- | -------------------------------------------------------------------- |
55
+ | `"content"` | The main page content area. |
56
+ | `"nav"` | The primary navigation area (e.g. `xpl-main-nav` or `xpl-side-nav`). |
57
+ | `"subnav"` | The secondary navigation area (e.g. `xpl-secondary-nav`). |
58
+ | `"utility"` | The utility bar area (e.g. `xpl-utility-bar`). |
59
+
60
+
51
61
  ## Dependencies
52
62
 
53
63
  ### Depends on