@xplortech/apollo-core 2.5.0 → 2.7.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 (492) hide show
  1. package/.typings/apollo-components.html-data.json +1156 -115
  2. package/build/style.css +12151 -5333
  3. package/dist/apollo-core/apollo-core.css +68 -37
  4. package/dist/apollo-core/apollo-core.esm.js +1 -1
  5. package/dist/apollo-core/{p-f4c2626d.entry.js → p-084d26ed.entry.js} +1 -1
  6. package/dist/apollo-core/p-146d5d55.entry.js +1 -0
  7. package/dist/apollo-core/p-16742606.entry.js +1 -0
  8. package/dist/apollo-core/{p-0ac33b3a.entry.js → p-28d12fd3.entry.js} +1 -1
  9. package/dist/apollo-core/{p-7d245bf0.entry.js → p-3eb5eb7c.entry.js} +1 -1
  10. package/dist/apollo-core/p-4882f0bd.entry.js +1 -0
  11. package/dist/apollo-core/p-64b34268.entry.js +1 -0
  12. package/dist/apollo-core/p-6c956d4e.entry.js +1 -0
  13. package/dist/apollo-core/p-71b75f36.entry.js +1 -0
  14. package/dist/apollo-core/p-7eb86c63.entry.js +1 -0
  15. package/dist/apollo-core/{p-0e1877a2.entry.js → p-84254a24.entry.js} +1 -1
  16. package/dist/apollo-core/p-9f2a0321.entry.js +1 -0
  17. package/dist/apollo-core/p-C7bgJs6C.js +2 -0
  18. package/dist/apollo-core/p-cde83ab0.entry.js +1 -0
  19. package/dist/apollo-core/p-e7363036.entry.js +1 -0
  20. package/dist/cjs/apollo-core.cjs.js +3 -3
  21. package/dist/cjs/{index-D__N_vw2.js → index-BQ97-AWw.js} +149 -96
  22. package/dist/cjs/loader.cjs.js +2 -2
  23. package/dist/cjs/xpl-accordion.cjs.entry.js +5 -5
  24. package/dist/cjs/xpl-application-shell.cjs.entry.js +4 -4
  25. package/dist/cjs/{xpl-avatar_41.cjs.entry.js → xpl-avatar_61.cjs.entry.js} +9154 -1989
  26. package/dist/cjs/xpl-button-row.cjs.entry.js +4 -4
  27. package/dist/cjs/xpl-calendar.cjs.entry.js +4 -4
  28. package/dist/cjs/xpl-dynamic-table-cell.cjs.entry.js +5 -5
  29. package/dist/cjs/xpl-dynamic-table-row.cjs.entry.js +5 -5
  30. package/dist/cjs/xpl-dynamic-table.cjs.entry.js +4 -4
  31. package/dist/cjs/xpl-grid-item.cjs.entry.js +4 -4
  32. package/dist/cjs/xpl-grid.cjs.entry.js +4 -4
  33. package/dist/cjs/xpl-large-card.cjs.entry.js +4 -4
  34. package/dist/cjs/xpl-main-nav.cjs.entry.js +4 -4
  35. package/dist/cjs/xpl-toggle.cjs.entry.js +6 -6
  36. package/dist/cjs/xpl-toolbar.cjs.entry.js +5 -5
  37. package/dist/collection/collection-manifest.json +26 -8
  38. package/dist/collection/components/xpl-accordion/accordion.stories.js +4 -0
  39. package/dist/collection/components/xpl-accordion/xpl-accordion.js +3 -3
  40. package/dist/collection/components/xpl-application-shell/application-shell.stories.js +4 -0
  41. package/dist/collection/components/xpl-application-shell/xpl-application-shell.js +2 -2
  42. package/dist/collection/components/xpl-avatar/avatar.stories.js +122 -103
  43. package/dist/collection/components/xpl-avatar/xpl-avatar.js +250 -16
  44. package/dist/collection/components/xpl-backdrop/backdrop.stories.js +4 -0
  45. package/dist/collection/components/xpl-backdrop/xpl-backdrop.js +2 -2
  46. package/dist/collection/components/xpl-badge/badge.stories.js +76 -33
  47. package/dist/collection/components/xpl-badge/xpl-badge.js +122 -14
  48. package/dist/collection/components/xpl-banner/banner.stories.js +64 -0
  49. package/dist/collection/components/xpl-banner/xpl-banner.js +296 -0
  50. package/dist/collection/components/xpl-breadcrumbs/breadcrumbs.stories.js +4 -0
  51. package/dist/collection/components/xpl-breadcrumbs/xpl-breadcrumb-item/xpl-breadcrumb-item.js +2 -2
  52. package/dist/collection/components/xpl-breadcrumbs/xpl-breadcrumbs/xpl-breadcrumbs.js +2 -2
  53. package/dist/collection/components/xpl-button/button.stories.js +102 -98
  54. package/dist/collection/components/xpl-button/xpl-button.js +201 -93
  55. package/dist/collection/components/xpl-button-row/xpl-button-row.js +2 -2
  56. package/dist/collection/components/xpl-calendar/calendar.stories.js +4 -0
  57. package/dist/collection/components/xpl-calendar/xpl-calendar.js +2 -2
  58. package/dist/collection/components/xpl-checkbox/checkbox.stories.js +4 -0
  59. package/dist/collection/components/xpl-checkbox/xpl-checkbox.js +48 -26
  60. package/dist/collection/components/xpl-choicelist/choicelist.stories.js +4 -0
  61. package/dist/collection/components/xpl-choicelist/xpl-choicelist.js +2 -2
  62. package/dist/collection/components/xpl-content-area/xpl-content-area.js +2 -2
  63. package/dist/collection/components/xpl-dashboard/xpl-dashboard.js +2 -2
  64. package/dist/collection/components/xpl-data-card/data-card.stories.js +4 -0
  65. package/dist/collection/components/xpl-data-card/xpl-data-card.js +3 -3
  66. package/dist/collection/components/xpl-divider/divider.stories.js +4 -0
  67. package/dist/collection/components/xpl-divider/xpl-divider.js +2 -2
  68. package/dist/collection/components/xpl-dropdown/xpl-dropdown-group/xpl-dropdown-group.js +2 -2
  69. package/dist/collection/components/xpl-dropdown/xpl-dropdown-heading/xpl-dropdown-heading.js +2 -2
  70. package/dist/collection/components/xpl-dropdown/xpl-dropdown-option/xpl-dropdown-option.js +29 -4
  71. package/dist/collection/components/xpl-dropdown/xpl-dropdown.js +120 -79
  72. package/dist/collection/components/xpl-dynamic-table/xpl-dynamic-table.js +2 -2
  73. package/dist/collection/components/xpl-dynamic-table-cell/xpl-dynamic-table-cell.js +3 -3
  74. package/dist/collection/components/xpl-dynamic-table-row/xpl-dynamic-table-row.js +3 -3
  75. package/dist/collection/components/xpl-grid/xpl-grid.js +2 -2
  76. package/dist/collection/components/xpl-grid-item/xpl-grid-item.js +2 -2
  77. package/dist/collection/components/xpl-header-accordion/xpl-header-accordion.js +47 -54
  78. package/dist/collection/components/xpl-icon/xpl-icon.js +3 -3
  79. package/dist/collection/components/xpl-input/input.stories.js +170 -9
  80. package/dist/collection/components/xpl-input/xpl-input-color/xpl-input-color.js +9 -9
  81. package/dist/collection/components/xpl-input/xpl-input-date/xpl-input-date.js +55 -17
  82. package/dist/collection/components/xpl-input/xpl-input-file/xpl-input-file.js +5 -5
  83. package/dist/collection/components/xpl-input/xpl-input-phone/phone-country-data.js +58 -0
  84. package/dist/collection/components/xpl-input/xpl-input-phone/phone-format.js +219 -0
  85. package/dist/collection/components/xpl-input/xpl-input-phone/xpl-input-phone.js +469 -0
  86. package/dist/collection/components/xpl-input/xpl-input-search/xpl-input-search.js +485 -0
  87. package/dist/collection/components/xpl-input/xpl-input-time/xpl-input-time.js +3 -3
  88. package/dist/collection/components/xpl-input/xpl-input.js +223 -17
  89. package/dist/collection/components/xpl-large-card/large-card.stories.js +4 -0
  90. package/dist/collection/components/xpl-large-card/xpl-large-card.js +2 -2
  91. package/dist/collection/components/xpl-list/list.stories.js +300 -63
  92. package/dist/collection/components/xpl-list/xpl-list-item/xpl-list-item.js +818 -0
  93. package/dist/collection/components/xpl-list/xpl-list.js +580 -22
  94. package/dist/collection/components/xpl-main-nav/xpl-main-nav.js +2 -2
  95. package/dist/collection/components/xpl-modal/modal.stories.js +4 -0
  96. package/dist/collection/components/xpl-modal/xpl-modal.js +2 -2
  97. package/dist/collection/components/xpl-nav-item/xpl-nav-item.js +3 -3
  98. package/dist/collection/components/xpl-pagination/pagination.stories.js +4 -0
  99. package/dist/collection/components/xpl-pagination/xpl-pagination.js +4 -4
  100. package/dist/collection/components/xpl-panel/panel.stories.js +53 -0
  101. package/dist/collection/components/xpl-panel/xpl-panel.js +60 -0
  102. package/dist/collection/components/xpl-popover/popover.stories.js +4 -0
  103. package/dist/collection/components/xpl-popover/xpl-popover.js +5 -5
  104. package/dist/collection/components/xpl-progress-bar/progress-bar.stories.js +96 -0
  105. package/dist/collection/components/xpl-progress-bar/xpl-progress-bar.js +158 -0
  106. package/dist/collection/components/xpl-progress-indicator/progress-indicator.stories.js +118 -0
  107. package/dist/collection/components/xpl-progress-indicator/xpl-progress-indicator.js +171 -0
  108. package/dist/collection/components/xpl-radio/xpl-radio.js +4 -4
  109. package/dist/collection/components/xpl-secondary-nav/xpl-secondary-nav.js +2 -2
  110. package/dist/collection/components/xpl-select/xpl-select.js +7 -7
  111. package/dist/collection/components/xpl-side-nav/side-nav.stories.js +519 -0
  112. package/dist/collection/components/xpl-side-nav/xpl-side-nav-item/xpl-side-nav-item.js +259 -0
  113. package/dist/collection/components/xpl-side-nav/xpl-side-nav.js +32 -0
  114. package/dist/collection/components/xpl-skeleton/xpl-skeleton.js +2 -2
  115. package/dist/collection/components/xpl-slideout/xpl-slideout.js +2 -2
  116. package/dist/collection/components/xpl-spotlight/spotlight.stories.js +385 -0
  117. package/dist/collection/components/xpl-spotlight/xpl-spotlight.js +1085 -0
  118. package/dist/collection/components/xpl-tab/xpl-tab.js +262 -9
  119. package/dist/collection/components/xpl-tab-panel/xpl-tab-panel.js +23 -16
  120. package/dist/collection/components/xpl-table/table.stories.js +319 -67
  121. package/dist/collection/components/xpl-table/utils/move-row-dom.js +50 -0
  122. package/dist/collection/components/xpl-table/utils/table-internal.js +58 -0
  123. package/dist/collection/components/xpl-table/xpl-table-body/xpl-table-body.js +7 -0
  124. package/dist/collection/components/xpl-table/xpl-table-cell/xpl-table-cell.js +155 -0
  125. package/dist/collection/components/xpl-table/xpl-table-footer/xpl-table-footer.js +7 -0
  126. package/dist/collection/components/xpl-table/xpl-table-footer-cell/xpl-table-footer-cell.js +37 -0
  127. package/dist/collection/components/xpl-table/xpl-table-header/table-header.stories.js +131 -0
  128. package/dist/collection/components/xpl-table/xpl-table-header/xpl-table-header.js +7 -0
  129. package/dist/collection/components/xpl-table/xpl-table-header-cell/table-header-cell.stories.js +105 -0
  130. package/dist/collection/components/xpl-table/xpl-table-header-cell/xpl-table-header-cell.js +402 -0
  131. package/dist/collection/components/xpl-table/xpl-table-row/xpl-table-row.js +121 -0
  132. package/dist/collection/components/xpl-table/xpl-table.js +1449 -144
  133. package/dist/collection/components/xpl-tabs/segment-control.stories.js +31 -0
  134. package/dist/collection/components/xpl-tabs/tabs.shared.js +156 -0
  135. package/dist/collection/components/xpl-tabs/tabs.stories.js +10 -60
  136. package/dist/collection/components/xpl-tabs/xpl-tabs.js +339 -63
  137. package/dist/collection/components/xpl-tag/tag.stories.js +153 -0
  138. package/dist/collection/components/xpl-tag/xpl-tag.js +313 -10
  139. package/dist/collection/components/xpl-toast/xpl-toast.js +3 -3
  140. package/dist/collection/components/xpl-toggle/xpl-toggle.js +4 -4
  141. package/dist/collection/components/xpl-toolbar/xpl-toolbar.js +3 -3
  142. package/dist/collection/components/xpl-tooltip/xpl-tooltip.js +2 -2
  143. package/dist/collection/components/xpl-top-nav/top-nav.stories.js +625 -0
  144. package/dist/collection/components/xpl-top-nav/xpl-nav-header-menu/xpl-nav-header-menu.js +122 -0
  145. package/dist/collection/components/xpl-top-nav/xpl-top-nav-item/xpl-top-nav-item.js +481 -0
  146. package/dist/collection/components/xpl-top-nav/xpl-top-nav.js +433 -0
  147. package/dist/collection/components/xpl-utility-bar/xpl-utility-bar.js +2 -2
  148. package/dist/collection/utils/layout-ancestors.js +22 -0
  149. package/dist/collection/utils/lifecycle.js +79 -0
  150. package/dist/collection/utils/tab-a11y-ids.js +22 -0
  151. package/dist/components/floating-ui.dom.js +1 -0
  152. package/dist/components/index.js +1 -1
  153. package/dist/components/lifecycle.js +1 -0
  154. package/dist/components/tab-a11y-ids.js +1 -0
  155. package/dist/components/xpl-accordion.js +1 -1
  156. package/dist/components/xpl-application-shell.js +1 -1
  157. package/dist/components/xpl-avatar.js +1 -1
  158. package/dist/components/xpl-avatar2.js +1 -1
  159. package/dist/components/xpl-backdrop.js +1 -1
  160. package/dist/components/xpl-backdrop2.js +1 -1
  161. package/dist/components/xpl-badge.js +1 -1
  162. package/dist/components/xpl-badge2.js +1 -1
  163. package/dist/components/xpl-banner.d.ts +11 -0
  164. package/dist/components/xpl-banner.js +1 -0
  165. package/dist/components/xpl-breadcrumb-item.js +1 -1
  166. package/dist/components/xpl-breadcrumbs.js +1 -1
  167. package/dist/components/xpl-button-row.js +1 -1
  168. package/dist/components/xpl-button.js +1 -1
  169. package/dist/components/xpl-button2.js +1 -1
  170. package/dist/components/xpl-calendar.js +1 -1
  171. package/dist/components/xpl-checkbox.js +1 -1
  172. package/dist/components/xpl-checkbox2.js +1 -1
  173. package/dist/components/xpl-choicelist.js +1 -1
  174. package/dist/components/xpl-content-area.js +1 -1
  175. package/dist/components/xpl-dashboard.js +1 -1
  176. package/dist/components/xpl-data-card.js +1 -1
  177. package/dist/components/xpl-divider.js +1 -1
  178. package/dist/components/xpl-divider2.js +1 -1
  179. package/dist/components/xpl-dropdown-group.js +1 -1
  180. package/dist/components/xpl-dropdown-group2.js +1 -1
  181. package/dist/components/xpl-dropdown-heading.js +1 -1
  182. package/dist/components/xpl-dropdown-heading2.js +1 -1
  183. package/dist/components/xpl-dropdown-option.js +1 -1
  184. package/dist/components/xpl-dropdown-option2.js +1 -1
  185. package/dist/components/xpl-dropdown.js +1 -1
  186. package/dist/components/xpl-dropdown2.js +1 -1
  187. package/dist/components/xpl-dynamic-table-cell.js +1 -1
  188. package/dist/components/xpl-dynamic-table-row.js +1 -1
  189. package/dist/components/xpl-dynamic-table.js +1 -1
  190. package/dist/components/xpl-grid-item.js +1 -1
  191. package/dist/components/xpl-grid.js +1 -1
  192. package/dist/components/xpl-header-accordion.js +1 -1
  193. package/dist/components/xpl-icon.js +1 -1
  194. package/dist/components/xpl-icon2.js +1 -1
  195. package/dist/components/xpl-input-date.js +1 -1
  196. package/dist/components/xpl-input-date2.js +1 -1
  197. package/dist/components/xpl-input-file.js +1 -1
  198. package/dist/components/xpl-input-file2.js +1 -1
  199. package/dist/components/xpl-input-phone.d.ts +11 -0
  200. package/dist/components/xpl-input-phone.js +1 -0
  201. package/dist/components/xpl-input-search.d.ts +11 -0
  202. package/dist/components/xpl-input-search.js +1 -0
  203. package/dist/components/xpl-input-search2.js +1 -0
  204. package/dist/components/xpl-input-time.js +1 -1
  205. package/dist/components/xpl-input.js +1 -1
  206. package/dist/components/xpl-input2.js +1 -1
  207. package/dist/components/xpl-large-card.js +1 -1
  208. package/dist/components/{xpl-progress.d.ts → xpl-list-item.d.ts} +4 -4
  209. package/dist/components/xpl-list-item.js +1 -0
  210. package/dist/components/xpl-list-item2.js +1 -0
  211. package/dist/components/xpl-list.js +1 -1
  212. package/dist/components/xpl-main-nav.js +1 -1
  213. package/dist/components/xpl-modal.js +1 -1
  214. package/dist/components/xpl-nav-header-menu.d.ts +11 -0
  215. package/dist/components/xpl-nav-header-menu.js +1 -0
  216. package/dist/components/xpl-nav-item.js +1 -1
  217. package/dist/components/xpl-pagination.js +1 -1
  218. package/dist/components/xpl-panel.d.ts +11 -0
  219. package/dist/components/xpl-panel.js +1 -0
  220. package/dist/components/xpl-popover.js +1 -1
  221. package/dist/components/xpl-popover2.js +1 -1
  222. package/dist/components/xpl-progress-bar.d.ts +11 -0
  223. package/dist/components/xpl-progress-bar.js +1 -0
  224. package/dist/components/xpl-progress-indicator.d.ts +11 -0
  225. package/dist/components/xpl-progress-indicator.js +1 -0
  226. package/dist/components/xpl-radio.js +1 -1
  227. package/dist/components/xpl-radio2.js +1 -1
  228. package/dist/components/xpl-secondary-nav.js +1 -1
  229. package/dist/components/xpl-select.js +1 -1
  230. package/dist/components/xpl-select2.js +1 -1
  231. package/dist/components/xpl-side-nav-item.d.ts +11 -0
  232. package/dist/components/xpl-side-nav-item.js +1 -0
  233. package/dist/components/xpl-side-nav.d.ts +11 -0
  234. package/dist/components/xpl-side-nav.js +1 -0
  235. package/dist/components/xpl-skeleton.js +1 -1
  236. package/dist/components/xpl-slideout.js +1 -1
  237. package/dist/components/xpl-spotlight.d.ts +11 -0
  238. package/dist/components/xpl-spotlight.js +1 -0
  239. package/dist/components/xpl-tab-panel.js +1 -1
  240. package/dist/components/xpl-tab.js +1 -1
  241. package/dist/components/xpl-table-body.d.ts +11 -0
  242. package/dist/components/xpl-table-body.js +1 -0
  243. package/dist/components/xpl-table-cell.d.ts +11 -0
  244. package/dist/components/xpl-table-cell.js +1 -0
  245. package/dist/components/xpl-table-cell2.js +1 -0
  246. package/dist/components/xpl-table-footer-cell.d.ts +11 -0
  247. package/dist/components/xpl-table-footer-cell.js +1 -0
  248. package/dist/components/xpl-table-footer-cell2.js +1 -0
  249. package/dist/components/xpl-table-footer.d.ts +11 -0
  250. package/dist/components/xpl-table-footer.js +1 -0
  251. package/dist/components/xpl-table-header-cell.js +1 -1
  252. package/dist/components/xpl-table-header-cell2.js +1 -0
  253. package/dist/components/xpl-table-header.js +1 -1
  254. package/dist/components/xpl-table-row.d.ts +11 -0
  255. package/dist/components/xpl-table-row.js +1 -0
  256. package/dist/components/xpl-table.js +1 -1
  257. package/dist/components/xpl-tabs.js +1 -1
  258. package/dist/components/xpl-tag.js +1 -1
  259. package/dist/components/xpl-tag2.js +1 -1
  260. package/dist/components/xpl-toast.js +1 -1
  261. package/dist/components/xpl-toggle.js +1 -1
  262. package/dist/components/xpl-toolbar.js +1 -1
  263. package/dist/components/xpl-tooltip.js +1 -1
  264. package/dist/components/xpl-tooltip2.js +1 -1
  265. package/dist/components/xpl-top-nav-item.d.ts +11 -0
  266. package/dist/components/xpl-top-nav-item.js +1 -0
  267. package/dist/components/xpl-top-nav-item2.js +1 -0
  268. package/dist/components/xpl-top-nav.d.ts +11 -0
  269. package/dist/components/xpl-top-nav.js +1 -0
  270. package/dist/components/xpl-utility-bar.js +1 -1
  271. package/dist/docs/xpl-accordion/readme.md +4 -0
  272. package/dist/docs/xpl-avatar/readme.md +291 -12
  273. package/dist/docs/xpl-backdrop/readme.md +1 -1
  274. package/dist/docs/xpl-badge/readme.md +104 -6
  275. package/dist/docs/xpl-banner/readme.md +203 -0
  276. package/dist/docs/xpl-button/readme.md +161 -14
  277. package/dist/docs/xpl-button-row/readme.md +1 -0
  278. package/dist/docs/xpl-calendar/readme.md +2 -1
  279. package/dist/docs/xpl-checkbox/readme.md +19 -14
  280. package/dist/docs/xpl-choicelist/readme.md +1 -0
  281. package/dist/docs/xpl-data-card/readme.md +2 -2
  282. package/dist/docs/xpl-divider/readme.md +6 -4
  283. package/dist/docs/xpl-dropdown/readme.md +15 -12
  284. package/dist/docs/xpl-dropdown/xpl-dropdown-group/readme.md +1 -0
  285. package/dist/docs/xpl-dropdown/xpl-dropdown-option/readme.md +6 -0
  286. package/dist/docs/xpl-dynamic-table/readme.md +22 -19
  287. package/dist/docs/xpl-dynamic-table-cell/readme.md +20 -18
  288. package/dist/docs/xpl-dynamic-table-row/readme.md +21 -19
  289. package/dist/docs/xpl-icon/readme.md +27 -3
  290. package/dist/docs/xpl-input/readme.md +72 -37
  291. package/dist/docs/xpl-input/xpl-input-color/readme.md +5 -0
  292. package/dist/docs/xpl-input/xpl-input-phone/readme.md +168 -0
  293. package/dist/docs/xpl-input/xpl-input-search/readme.md +175 -0
  294. package/dist/docs/xpl-input/xpl-input-time/readme.md +5 -0
  295. package/dist/docs/xpl-large-card/readme.md +1 -1
  296. package/dist/docs/xpl-list/readme.md +320 -10
  297. package/dist/docs/xpl-list/xpl-list-item/readme.md +99 -0
  298. package/dist/docs/xpl-modal/readme.md +3 -0
  299. package/dist/docs/xpl-pagination/readme.md +4 -0
  300. package/dist/docs/xpl-panel/readme.md +174 -0
  301. package/dist/docs/xpl-popover/readme.md +3 -1
  302. package/dist/docs/xpl-progress-bar/readme.md +145 -0
  303. package/dist/docs/xpl-progress-indicator/readme.md +234 -0
  304. package/dist/docs/xpl-radio/readme.md +6 -4
  305. package/dist/docs/xpl-select/readme.md +3 -1
  306. package/dist/docs/xpl-side-nav/readme.md +71 -0
  307. package/dist/docs/xpl-side-nav/xpl-side-nav-item/readme.md +115 -0
  308. package/dist/docs/xpl-slideout/readme.md +2 -1
  309. package/dist/docs/xpl-spotlight/readme.md +235 -0
  310. package/dist/docs/xpl-tab/readme.md +43 -7
  311. package/dist/docs/xpl-tab-panel/readme.md +42 -0
  312. package/dist/docs/xpl-table/readme.md +110 -46
  313. package/dist/docs/xpl-table/xpl-table-body/readme.md +10 -0
  314. package/dist/docs/xpl-table/xpl-table-cell/readme.md +33 -0
  315. package/dist/docs/xpl-table/xpl-table-footer/readme.md +10 -0
  316. package/dist/docs/xpl-table/xpl-table-footer-cell/readme.md +30 -0
  317. package/dist/docs/{xpl-table-header → xpl-table/xpl-table-header}/readme.md +13 -13
  318. package/dist/docs/xpl-table/xpl-table-header-cell/readme.md +66 -0
  319. package/dist/docs/xpl-table/xpl-table-row/readme.md +19 -0
  320. package/dist/docs/xpl-tabs/readme.md +63 -8
  321. package/dist/docs/xpl-tag/readme.md +379 -4
  322. package/dist/docs/xpl-toast/readme.md +56 -1
  323. package/dist/docs/xpl-top-nav/readme.md +179 -0
  324. package/dist/docs/xpl-top-nav/xpl-nav-header-menu/readme.md +81 -0
  325. package/dist/docs/xpl-top-nav/xpl-top-nav-item/readme.md +87 -0
  326. package/dist/esm/apollo-core.js +4 -4
  327. package/dist/esm/{index-DhZas3eX.js → index-C7bgJs6C.js} +149 -97
  328. package/dist/esm/loader.js +3 -3
  329. package/dist/esm/xpl-accordion.entry.js +5 -5
  330. package/dist/esm/xpl-application-shell.entry.js +4 -4
  331. package/dist/esm/{xpl-avatar_41.entry.js → xpl-avatar_61.entry.js} +9087 -1942
  332. package/dist/esm/xpl-button-row.entry.js +4 -4
  333. package/dist/esm/xpl-calendar.entry.js +4 -4
  334. package/dist/esm/xpl-dynamic-table-cell.entry.js +5 -5
  335. package/dist/esm/xpl-dynamic-table-row.entry.js +5 -5
  336. package/dist/esm/xpl-dynamic-table.entry.js +4 -4
  337. package/dist/esm/xpl-grid-item.entry.js +4 -4
  338. package/dist/esm/xpl-grid.entry.js +4 -4
  339. package/dist/esm/xpl-large-card.entry.js +4 -4
  340. package/dist/esm/xpl-main-nav.entry.js +4 -4
  341. package/dist/esm/xpl-toggle.entry.js +6 -6
  342. package/dist/esm/xpl-toolbar.entry.js +5 -5
  343. package/dist/types/components/xpl-accordion/xpl-accordion.d.ts +1 -1
  344. package/dist/types/components/xpl-application-shell/application-shell.stories.d.ts +4 -0
  345. package/dist/types/components/xpl-application-shell/xpl-application-shell.d.ts +1 -1
  346. package/dist/types/components/xpl-avatar/avatar.stories.d.ts +90 -27
  347. package/dist/types/components/xpl-avatar/xpl-avatar.d.ts +30 -3
  348. package/dist/types/components/xpl-backdrop/backdrop.stories.d.ts +4 -0
  349. package/dist/types/components/xpl-backdrop/xpl-backdrop.d.ts +1 -1
  350. package/dist/types/components/xpl-badge/badge.stories.d.ts +47 -11
  351. package/dist/types/components/xpl-badge/xpl-badge.d.ts +9 -2
  352. package/dist/types/components/xpl-banner/banner.stories.d.ts +77 -0
  353. package/dist/types/components/xpl-banner/xpl-banner.d.ts +20 -0
  354. package/dist/types/components/xpl-breadcrumbs/breadcrumbs.stories.d.ts +4 -0
  355. package/dist/types/components/xpl-breadcrumbs/xpl-breadcrumb-item/xpl-breadcrumb-item.d.ts +1 -1
  356. package/dist/types/components/xpl-breadcrumbs/xpl-breadcrumbs/xpl-breadcrumbs.d.ts +1 -1
  357. package/dist/types/components/xpl-button/button.stories.d.ts +68 -30
  358. package/dist/types/components/xpl-button/xpl-button.d.ts +21 -8
  359. package/dist/types/components/xpl-button-row/xpl-button-row.d.ts +1 -1
  360. package/dist/types/components/xpl-calendar/calendar.stories.d.ts +4 -0
  361. package/dist/types/components/xpl-calendar/xpl-calendar.d.ts +1 -1
  362. package/dist/types/components/xpl-checkbox/checkbox.stories.d.ts +4 -0
  363. package/dist/types/components/xpl-checkbox/xpl-checkbox.d.ts +5 -4
  364. package/dist/types/components/xpl-choicelist/choicelist.stories.d.ts +4 -0
  365. package/dist/types/components/xpl-choicelist/xpl-choicelist.d.ts +1 -1
  366. package/dist/types/components/xpl-content-area/xpl-content-area.d.ts +1 -1
  367. package/dist/types/components/xpl-dashboard/xpl-dashboard.d.ts +1 -1
  368. package/dist/types/components/xpl-data-card/data-card.stories.d.ts +4 -0
  369. package/dist/types/components/xpl-data-card/xpl-data-card.d.ts +1 -1
  370. package/dist/types/components/xpl-divider/divider.stories.d.ts +4 -0
  371. package/dist/types/components/xpl-divider/xpl-divider.d.ts +1 -1
  372. package/dist/types/components/xpl-dropdown/dropdown-option.d.ts +1 -0
  373. package/dist/types/components/xpl-dropdown/dropdown.stories.d.ts +1 -1
  374. package/dist/types/components/xpl-dropdown/xpl-dropdown-group/xpl-dropdown-group.d.ts +1 -1
  375. package/dist/types/components/xpl-dropdown/xpl-dropdown-heading/xpl-dropdown-heading.d.ts +1 -1
  376. package/dist/types/components/xpl-dropdown/xpl-dropdown-option/xpl-dropdown-option.d.ts +3 -2
  377. package/dist/types/components/xpl-dropdown/xpl-dropdown.d.ts +11 -8
  378. package/dist/types/components/xpl-dynamic-table/xpl-dynamic-table.d.ts +1 -1
  379. package/dist/types/components/xpl-dynamic-table-cell/xpl-dynamic-table-cell.d.ts +1 -1
  380. package/dist/types/components/xpl-dynamic-table-row/xpl-dynamic-table-row.d.ts +1 -1
  381. package/dist/types/components/xpl-grid/xpl-grid.d.ts +1 -1
  382. package/dist/types/components/xpl-grid-item/xpl-grid-item.d.ts +1 -1
  383. package/dist/types/components/xpl-header-accordion/xpl-header-accordion.d.ts +10 -11
  384. package/dist/types/components/xpl-icon/xpl-icon.d.ts +1 -1
  385. package/dist/types/components/xpl-input/input.stories.d.ts +37 -7
  386. package/dist/types/components/xpl-input/xpl-input-color/xpl-input-color.d.ts +1 -1
  387. package/dist/types/components/xpl-input/xpl-input-date/xpl-input-date.d.ts +10 -3
  388. package/dist/types/components/xpl-input/xpl-input-file/xpl-input-file.d.ts +1 -1
  389. package/dist/types/components/xpl-input/xpl-input-phone/phone-country-data.d.ts +13 -0
  390. package/dist/types/components/xpl-input/xpl-input-phone/phone-format.d.ts +5 -0
  391. package/dist/types/components/xpl-input/xpl-input-phone/xpl-input-phone.d.ts +48 -0
  392. package/dist/types/components/xpl-input/xpl-input-search/xpl-input-search.d.ts +39 -0
  393. package/dist/types/components/xpl-input/xpl-input-time/xpl-input-time.d.ts +1 -1
  394. package/dist/types/components/xpl-input/xpl-input.d.ts +23 -5
  395. package/dist/types/components/xpl-large-card/large-card.stories.d.ts +4 -0
  396. package/dist/types/components/xpl-large-card/xpl-large-card.d.ts +1 -1
  397. package/dist/types/components/xpl-list/list.stories.d.ts +299 -13
  398. package/dist/types/components/xpl-list/listitem.d.ts +13 -0
  399. package/dist/types/components/xpl-list/xpl-list-item/xpl-list-item.d.ts +71 -0
  400. package/dist/types/components/xpl-list/xpl-list.d.ts +56 -3
  401. package/dist/types/components/xpl-main-nav/xpl-main-nav.d.ts +1 -1
  402. package/dist/types/components/xpl-modal/modal.stories.d.ts +4 -0
  403. package/dist/types/components/xpl-modal/xpl-modal.d.ts +1 -1
  404. package/dist/types/components/xpl-nav-item/xpl-nav-item.d.ts +1 -1
  405. package/dist/types/components/xpl-pagination/pagination.stories.d.ts +4 -0
  406. package/dist/types/components/xpl-pagination/xpl-pagination.d.ts +1 -1
  407. package/dist/types/components/xpl-panel/panel.stories.d.ts +22 -0
  408. package/dist/types/components/xpl-panel/xpl-panel.d.ts +5 -0
  409. package/dist/types/components/xpl-popover/xpl-popover.d.ts +1 -1
  410. package/dist/types/components/xpl-progress-bar/progress-bar.stories.d.ts +73 -0
  411. package/dist/types/components/xpl-progress-bar/xpl-progress-bar.d.ts +15 -0
  412. package/dist/types/components/xpl-progress-indicator/progress-indicator.stories.d.ts +62 -0
  413. package/dist/types/components/xpl-progress-indicator/xpl-progress-indicator.d.ts +11 -0
  414. package/dist/types/components/xpl-radio/xpl-radio.d.ts +1 -1
  415. package/dist/types/components/xpl-secondary-nav/xpl-secondary-nav.d.ts +1 -1
  416. package/dist/types/components/xpl-select/xpl-select.d.ts +1 -1
  417. package/dist/types/components/xpl-side-nav/side-nav.stories.d.ts +80 -0
  418. package/dist/types/components/xpl-side-nav/xpl-side-nav-item/xpl-side-nav-item.d.ts +20 -0
  419. package/dist/types/components/xpl-side-nav/xpl-side-nav.d.ts +4 -0
  420. package/dist/types/components/xpl-skeleton/xpl-skeleton.d.ts +1 -1
  421. package/dist/types/components/xpl-slideout/xpl-slideout.d.ts +1 -1
  422. package/dist/types/components/xpl-spotlight/spotlight.stories.d.ts +197 -0
  423. package/dist/types/components/xpl-spotlight/xpl-spotlight.d.ts +101 -0
  424. package/dist/types/components/xpl-tab/xpl-tab.d.ts +15 -2
  425. package/dist/types/components/xpl-tab-panel/xpl-tab-panel.d.ts +3 -2
  426. package/dist/types/components/xpl-table/table.stories.d.ts +161 -19
  427. package/dist/types/components/xpl-table/utils/move-row-dom.d.ts +3 -0
  428. package/dist/types/components/xpl-table/utils/table-internal.d.ts +8 -0
  429. package/dist/types/components/xpl-table/xpl-table-body/xpl-table-body.d.ts +3 -0
  430. package/dist/types/components/xpl-table/xpl-table-cell/xpl-table-cell.d.ts +11 -0
  431. package/dist/types/components/xpl-table/xpl-table-footer/xpl-table-footer.d.ts +3 -0
  432. package/dist/types/components/xpl-table/xpl-table-footer-cell/xpl-table-footer-cell.d.ts +4 -0
  433. package/dist/types/components/{xpl-table-header → xpl-table/xpl-table-header}/table-header.stories.d.ts +13 -16
  434. package/dist/types/components/xpl-table/xpl-table-header/xpl-table-header.d.ts +3 -0
  435. package/dist/types/components/{xpl-table-header-cell → xpl-table/xpl-table-header-cell}/table-header-cell.stories.d.ts +24 -20
  436. package/dist/types/components/xpl-table/xpl-table-header-cell/xpl-table-header-cell.d.ts +32 -0
  437. package/dist/types/components/xpl-table/xpl-table-row/xpl-table-row.d.ts +13 -0
  438. package/dist/types/components/xpl-table/xpl-table.d.ts +124 -22
  439. package/dist/types/components/xpl-tabs/segment-control.stories.d.ts +112 -0
  440. package/dist/types/components/xpl-tabs/tabs.shared.d.ts +156 -0
  441. package/dist/types/components/xpl-tabs/tabs.stories.d.ts +65 -12
  442. package/dist/types/components/xpl-tabs/xpl-tabs.d.ts +38 -19
  443. package/dist/types/components/xpl-tag/tag.stories.d.ts +65 -0
  444. package/dist/types/components/xpl-tag/xpl-tag.d.ts +37 -2
  445. package/dist/types/components/xpl-toast/xpl-toast.d.ts +1 -1
  446. package/dist/types/components/xpl-toggle/xpl-toggle.d.ts +1 -1
  447. package/dist/types/components/xpl-toolbar/xpl-toolbar.d.ts +1 -1
  448. package/dist/types/components/xpl-tooltip/xpl-tooltip.d.ts +1 -1
  449. package/dist/types/components/xpl-top-nav/top-nav.stories.d.ts +471 -0
  450. package/dist/types/components/xpl-top-nav/xpl-nav-header-menu/xpl-nav-header-menu.d.ts +18 -0
  451. package/dist/types/components/xpl-top-nav/xpl-top-nav-item/xpl-top-nav-item.d.ts +48 -0
  452. package/dist/types/components/xpl-top-nav/xpl-top-nav.d.ts +51 -0
  453. package/dist/types/components/xpl-utility-bar/xpl-utility-bar.d.ts +1 -1
  454. package/dist/types/components.d.ts +3059 -278
  455. package/dist/types/stencil-public-runtime.d.ts +23 -2
  456. package/dist/types/utils/layout-ancestors.d.ts +2 -0
  457. package/dist/types/utils/lifecycle.d.ts +16 -0
  458. package/dist/types/utils/tab-a11y-ids.d.ts +4 -0
  459. package/package.json +42 -28
  460. package/dist/apollo-core/p-1c2e4034.entry.js +0 -1
  461. package/dist/apollo-core/p-3b5f8989.entry.js +0 -1
  462. package/dist/apollo-core/p-4fab8172.entry.js +0 -1
  463. package/dist/apollo-core/p-576ce90f.entry.js +0 -1
  464. package/dist/apollo-core/p-5ec45742.entry.js +0 -1
  465. package/dist/apollo-core/p-77f0fd4a.entry.js +0 -1
  466. package/dist/apollo-core/p-7b7db57a.entry.js +0 -1
  467. package/dist/apollo-core/p-7c22b842.entry.js +0 -1
  468. package/dist/apollo-core/p-812bb0e4.entry.js +0 -1
  469. package/dist/apollo-core/p-845eef0d.entry.js +0 -1
  470. package/dist/apollo-core/p-9853028c.entry.js +0 -1
  471. package/dist/apollo-core/p-9d65ece7.entry.js +0 -1
  472. package/dist/apollo-core/p-DhZas3eX.js +0 -2
  473. package/dist/apollo-core/p-be292555.entry.js +0 -1
  474. package/dist/cjs/xpl-list.cjs.entry.js +0 -32
  475. package/dist/cjs/xpl-table-header-cell.cjs.entry.js +0 -57
  476. package/dist/cjs/xpl-table-header.cjs.entry.js +0 -14
  477. package/dist/collection/components/xpl-progress/progress.stories.js +0 -106
  478. package/dist/collection/components/xpl-progress/xpl-progress.js +0 -60
  479. package/dist/collection/components/xpl-table-header/table-header.stories.js +0 -126
  480. package/dist/collection/components/xpl-table-header/xpl-table-header.js +0 -7
  481. package/dist/collection/components/xpl-table-header-cell/table-header-cell.stories.js +0 -75
  482. package/dist/collection/components/xpl-table-header-cell/xpl-table-header-cell.js +0 -188
  483. package/dist/components/xpl-progress.js +0 -1
  484. package/dist/docs/xpl-progress/readme.md +0 -22
  485. package/dist/docs/xpl-table-header-cell/readme.md +0 -47
  486. package/dist/esm/xpl-list.entry.js +0 -30
  487. package/dist/esm/xpl-table-header-cell.entry.js +0 -55
  488. package/dist/esm/xpl-table-header.entry.js +0 -12
  489. package/dist/types/components/xpl-progress/progress.stories.d.ts +0 -38
  490. package/dist/types/components/xpl-progress/xpl-progress.d.ts +0 -6
  491. package/dist/types/components/xpl-table-header/xpl-table-header.d.ts +0 -3
  492. package/dist/types/components/xpl-table-header-cell/xpl-table-header-cell.d.ts +0 -13
@@ -1,15 +1,385 @@
1
1
  # xpl-tag
2
2
 
3
- Tags represent a set of interactive keywords that help label, organize, and categorize objects. Tags can be added or removed from an object by the user. Unlike Badges, Tags are clickable, draggable, used in dropdowns, multi-select, search bars, etc..
3
+ Tags represent a set of interactive keywords that help label, organize, and categorize objects. Tags can be added or removed from an object by the user. Unlike Badges, Tags are clickable, used in dropdowns, multi-select, search bars, etc.
4
+
5
+ ## Usage Examples
6
+
7
+ ### Basic tag with dismiss
8
+
9
+ ```html
10
+ <xpl-tag>Label</xpl-tag>
11
+ ```
12
+
13
+ ### Small size variant
14
+
15
+ ```html
16
+ <xpl-tag size="sm">Small Tag</xpl-tag>
17
+ ```
18
+
19
+ ### Non-dismissible tag (no close button)
20
+
21
+ ```html
22
+ <xpl-tag dismissible="false">Static Tag</xpl-tag>
23
+ ```
24
+
25
+ ### Disabled tag
26
+
27
+ ```html
28
+ <xpl-tag disabled>Disabled Tag</xpl-tag>
29
+ ```
30
+
31
+ ### Handling events
32
+
33
+ > **⚠️ Deprecation Notice:** The `close` event is **deprecated** and will be removed in a future major version. Use `tagRemove` for dismiss button clicks only.
34
+
35
+ #### Why This Change?
36
+
37
+ The `close` event name conflicts with a **native HTML event** used by `<dialog>` elements. The React wrapper's `isCoveredByReact()` function detects `onclose` as a native event and passes handlers to React's synthetic event system — but React doesn't actually handle `close` events this way, so handlers silently fail in React applications.
38
+
39
+ **Why `tagRemove` works:** `ontagremove` is not a native event, so the wrapper correctly falls back to `addEventListener`.
40
+
41
+ #### Event Behavior
42
+
43
+ | Interaction | `close` (deprecated) | `tagRemove` (use this) |
44
+ |-------------|------------------------|------------------------|
45
+ | Dismiss (×) button clicked | ✅ Fires | ✅ Fires |
46
+ | Content clicked (non-draggable) | ✅ Fires | ❌ Does NOT fire |
47
+ | Content clicked (draggable) | ❌ Does NOT fire | ❌ Does NOT fire |
48
+ | Keyboard Space/Enter on content (non-draggable) | ✅ Fires | ❌ Does NOT fire |
49
+ | Keyboard Space/Enter on draggable label | ❌ Does NOT fire | ❌ Does NOT fire |
50
+
51
+ #### Migration Examples
52
+
53
+ **Before (deprecated):**
54
+ ```tsx
55
+ // React — this may silently fail!
56
+ <XplTag onClose={() => tag.remove()}>Label</XplTag>
57
+
58
+ // Vanilla JS
59
+ const tag = document.querySelector('xpl-tag');
60
+ tag.addEventListener('close', () => tag.remove());
61
+ ```
62
+
63
+ **After (recommended):**
64
+ ```tsx
65
+ // React — works reliably
66
+ <XplTag onTagRemove={() => tag.remove()}>Label</XplTag>
67
+
68
+ // Vanilla JS — same pattern, clearer intent
69
+ const tag = document.querySelector('xpl-tag');
70
+ tag.addEventListener('tagRemove', () => tag.remove());
71
+ ```
72
+
73
+ **React with Refs (if you must use deprecated `close`):**
74
+ ```tsx
75
+ import { useEffect, useRef } from 'react';
76
+ import { XplTag } from '@xplortech/apollo-react';
77
+
78
+ function MyComponent() {
79
+ const tagRef = useRef<HTMLElement | null>(null);
80
+
81
+ useEffect(() => {
82
+ const el = tagRef.current;
83
+ if (!el) return;
84
+
85
+ const handleClose = () => el.remove();
86
+ el.addEventListener('close', handleClose);
87
+ return () => el.removeEventListener('close', handleClose);
88
+ }, []);
89
+
90
+ return <XplTag ref={tagRef}>Label</XplTag>;
91
+ }
92
+ ```
93
+
94
+ ## Drag and drop
95
+
96
+ Tags support **native HTML5 drag and drop**. Set the boolean prop **`isDraggable`** (HTML attribute **`is-draggable`**) to enable dragging. Optionally set **`tag-id`** so `dataTransfer` and `tagDragStart` / `tagDragEnd` detail carry a stable id.
97
+
98
+ ### How it works (important for handlers)
99
+
100
+ - The **drag source** is an inner **label** element (a `div` with `role="button"`), not the `<xpl-tag>` host. Browsers do not start drags reliably on the custom element host; the **`is-draggable`** prop does **not** mirror the native host **`draggable`** attribute (see the `isDraggable` prop docs below).
101
+ - On **`dragstart`**, the component uses **`setDragImage`** so the floating preview (“ghost”) looks like the **whole tag** (label + dismiss control), not only the label strip.
102
+ - **Start the drag from the label text**, not from the dismiss (×) button.
103
+ - In container listeners, **`dragstart`** may bubble with `event.target` equal to that inner node. Resolve the tag with:
104
+
105
+ ```js
106
+ const tag = event.target instanceof Element ? event.target.closest('xpl-tag') : null;
107
+ ```
108
+
109
+ ### Making a tag draggable
110
+
111
+ ```html
112
+ <xpl-tag is-draggable>Draggable tag</xpl-tag>
113
+
114
+ <xpl-tag is-draggable tag-id="my-tag-1">Design</xpl-tag>
115
+ ```
116
+
117
+ ### Reordering tags within a container
118
+
119
+ ```html
120
+ <div id="tag-container" style="display: flex; flex-wrap: wrap; gap: 8px">
121
+ <xpl-tag tag-id="t1" is-draggable>Design</xpl-tag>
122
+ <xpl-tag tag-id="t2" is-draggable>Development</xpl-tag>
123
+ <xpl-tag tag-id="t3" is-draggable>QA</xpl-tag>
124
+ </div>
125
+
126
+ <script>
127
+ const container = document.getElementById('tag-container');
128
+ let draggedEl = null;
129
+
130
+ container.addEventListener('dragstart', (e) => {
131
+ const tag = e.target instanceof Element ? e.target.closest('xpl-tag') : null;
132
+ if (tag) draggedEl = tag;
133
+ });
134
+
135
+ container.addEventListener('dragend', () => {
136
+ draggedEl = null;
137
+ });
138
+
139
+ container.addEventListener('dragover', (e) => {
140
+ e.preventDefault();
141
+ if (!draggedEl) return;
142
+ const afterEl = getDragAfterElement(container, e.clientX);
143
+ if (afterEl == null) container.appendChild(draggedEl);
144
+ else container.insertBefore(draggedEl, afterEl);
145
+ });
146
+
147
+ function getDragAfterElement(container, x) {
148
+ const tags = [...container.querySelectorAll('xpl-tag')].filter((el) => el !== draggedEl);
149
+ return tags.reduce(
150
+ (closest, child) => {
151
+ const box = child.getBoundingClientRect();
152
+ const offset = x - box.left - box.width / 2;
153
+ return offset < 0 && offset > closest.offset ? { offset, element: child } : closest;
154
+ },
155
+ { offset: Number.NEGATIVE_INFINITY },
156
+ ).element;
157
+ }
158
+ </script>
159
+ ```
160
+
161
+ ### Dragging tags between containers
162
+
163
+ ```html
164
+ <div
165
+ class="drop-zone"
166
+ style="display: flex; gap: 8px; padding: 16px; border: 2px dashed var(--xpl-border-default); border-radius: 8px"
167
+ >
168
+ <xpl-tag tag-id="a1" is-draggable>Frontend</xpl-tag>
169
+ <xpl-tag tag-id="a2" is-draggable>Backend</xpl-tag>
170
+ </div>
171
+
172
+ <div
173
+ class="drop-zone"
174
+ style="
175
+ display: flex;
176
+ gap: 8px;
177
+ padding: 16px;
178
+ border: 2px dashed var(--xpl-border-default);
179
+ border-radius: 8px;
180
+ margin-top: 8px;
181
+ "
182
+ >
183
+ <xpl-tag tag-id="b1" is-draggable>DevOps</xpl-tag>
184
+ </div>
185
+
186
+ <script>
187
+ document.querySelectorAll('.drop-zone').forEach((zone) => {
188
+ let draggedEl = null;
189
+
190
+ zone.addEventListener('dragstart', (e) => {
191
+ const tag = e.target instanceof Element ? e.target.closest('xpl-tag') : null;
192
+ if (tag) draggedEl = tag;
193
+ });
194
+
195
+ zone.addEventListener('dragend', () => {
196
+ draggedEl = null;
197
+ });
198
+
199
+ zone.addEventListener('dragover', (e) => e.preventDefault());
200
+
201
+ zone.addEventListener('drop', (e) => {
202
+ e.preventDefault();
203
+ if (draggedEl && draggedEl.parentNode !== zone) zone.appendChild(draggedEl);
204
+ });
205
+ });
206
+ </script>
207
+ ```
208
+
209
+ ### `tagDragStart` / `tagDragEnd` events
210
+
211
+ The component emits **`tagDragStart`** and **`tagDragEnd`** (Stencil camelCase). They bubble and are composed.
212
+
213
+ ```html
214
+ <xpl-tag is-draggable tag-id="my-tag">Drag me</xpl-tag>
215
+
216
+ <script>
217
+ const tag = document.querySelector('xpl-tag[tag-id="my-tag"]');
218
+
219
+ tag.addEventListener('tagDragStart', (e) => {
220
+ const { tagId, content, originalEvent } = e.detail;
221
+ });
222
+
223
+ tag.addEventListener('tagDragEnd', (e) => {
224
+ const { dropped, tagId, originalEvent } = e.detail;
225
+ if (dropped) {
226
+ /* dropEffect was 'move' */
227
+ }
228
+ });
229
+ </script>
230
+ ```
231
+
232
+ ### React (`@xplortech/apollo-react`)
233
+
234
+ Ensure the app loads Apollo **defineCustomElements** (see the main React package docs). Import **`XplTag`** and use **`isDraggable`**, **`tagId`**, and children for the label.
235
+
236
+ `HTMLXplTagElement` is provided by Apollo’s Stencil typings (the same setup that types `defineCustomElements`). If your editor cannot resolve it, use `useRef<HTMLElement | null>(null)` and attach listeners on `ref.current`.
237
+
238
+ `XplTag` is a thin wrapper around the web component. Custom events use the same names as in the DOM (`tagDragStart`, `tagDragEnd`, `tagRemove`). If your TypeScript definitions use different prop names for listeners, attach them with a **ref** (always works):
239
+
240
+ ```tsx
241
+ import { useEffect, useRef } from 'react';
242
+ import { XplTag } from '@xplortech/apollo-react';
243
+
244
+ function TagBoard() {
245
+ const tagRef = useRef<HTMLXplTagElement | null>(null);
246
+
247
+ useEffect(() => {
248
+ const el = tagRef.current;
249
+ if (!el) return;
250
+
251
+ const onDragStart = (e: CustomEvent) => {
252
+ const { tagId, content } = e.detail;
253
+ };
254
+ const onDragEnd = (e: CustomEvent) => {
255
+ const { dropped, tagId } = e.detail;
256
+ };
257
+ const onTagRemove = () => {
258
+ el.remove(); // Handle dismiss button click
259
+ };
260
+
261
+ el.addEventListener('tagDragStart', onDragStart as EventListener);
262
+ el.addEventListener('tagDragEnd', onDragEnd as EventListener);
263
+ el.addEventListener('tagRemove', onTagRemove);
264
+ return () => {
265
+ el.removeEventListener('tagDragStart', onDragStart as EventListener);
266
+ el.removeEventListener('tagDragEnd', onDragEnd as EventListener);
267
+ el.removeEventListener('tagRemove', onTagRemove);
268
+ };
269
+ }, []);
270
+
271
+ return (
272
+ <XplTag ref={tagRef} isDraggable tagId="react-1">
273
+ Movable
274
+ </XplTag>
275
+ );
276
+ }
277
+ ```
278
+
279
+ Reorder / multi-container logic is unchanged: listen for native `dragstart`, `dragover`, `drop` on a React parent `div` (use refs) and call `closest('xpl-tag')` as in the HTML examples.
280
+
281
+ ### `DataTransfer` payload
282
+
283
+ | MIME type | Value | Purpose |
284
+ |-----------|-------|---------|
285
+ | `application/x-tag-id` | `tag-id` prop, if set | Identify the tag in drop handlers |
286
+ | `text/plain` | Trimmed text content of the tag | Fallback for external targets |
287
+
288
+ `effectAllowed` is set to `move`.
289
+
290
+ **`originalEvent` in `tagDragStart` / `tagDragEnd`:** the native `DragEvent` is included for convenience, but browsers may clear `dataTransfer` after the synchronous handler completes. Use `tagId`, `content`, and `dropped` from the custom event detail for anything needed after the current turn; only read `originalEvent.dataTransfer` synchronously in the listener.
291
+
292
+ ### Disabled tags
293
+
294
+ `disabled` wins: the tag is not draggable and keep using a normal `<button>` label (no HTML5 drag on the host).
295
+
296
+ ```html
297
+ <xpl-tag is-draggable disabled>Cannot drag</xpl-tag>
298
+ ```
299
+
300
+ ## Design Tokens
301
+
302
+ | Property | Token |
303
+ |----------|-------|
304
+ | Border (default) | `var(--xpl-border-accent-information)` |
305
+ | Border (disabled) | `var(--xpl-border-accent-subtle)` |
306
+ | Background (default) | `var(--xpl-background-surface-default)` |
307
+ | Background (hover) | `var(--xpl-background-surface-information-bold)` |
308
+ | Background (disabled) | `var(--xpl-background-surface-subtle)` |
309
+ | Text | `var(--xpl-text-strong)` |
310
+ | Text (disabled) | `var(--xpl-text-disabled)` |
311
+ | Dismiss icon | `var(--xpl-icon-default)` |
312
+ | Dismiss icon (disabled) | `var(--xpl-icon-disabled)` |
313
+ | Spacing (default) | `var(--xpl-space-2)` vertical, `var(--xpl-space-12)` horizontal |
314
+ | Spacing (small) | `var(--xpl-space-2)` vertical, `var(--xpl-space-8)` horizontal |
315
+ | Height (default) | `var(--xpl-size-150)` (24px) |
316
+ | Height (small) | `var(--xpl-size-125)` (20px) |
317
+ | Border radius | `var(--xpl-border-radius-button)` |
318
+ | Typography (default) | `var(--xpl-font-size-body)` / `var(--xpl-font-weight-normal)` |
319
+ | Typography (small) | `var(--xpl-font-size-callout)` / `var(--xpl-font-weight-semibold)` |
320
+ | Background (dragging) | `var(--xpl-background-surface-information-bold)` |
321
+ | Cursor (draggable) | `cursor: grab` → `cursor: grabbing` while dragging |
322
+
323
+ ## Accessibility
324
+
325
+ ### Keyboard Navigation
326
+
327
+ | Key | Action |
328
+ |-----|--------|
329
+ | Tab | Focus tag content or dismiss button |
330
+ | Enter/Space | Activate the focused control: on **dismiss**, emits deprecated `close` and `tagRemove`; on **content**, emits deprecated `close` only when the tag is **not** in drag mode (native `<button>` behavior). |
331
+
332
+ ### Drag mode
333
+
334
+ - With `isDraggable`, focus moves to the **label** (`role="button"`). Enter/Space on the label does **not** dismiss the tag (same as click on draggable content).
335
+ - Start drags from the **label**; the dismiss control remains a separate focus stop and is not the drag handle.
336
+
337
+ ### ARIA Attributes
338
+
339
+ - Dismiss button sets `aria-label` to `Dismiss` plus the host element’s `textContent` (trimmed), or the word `tag` when empty, so multiple tags stay distinguishable in screen readers
340
+ - When `disabled={true}`, buttons have `disabled` attribute preventing interaction
341
+ - When `isDraggable` is set, **`aria-grabbed`** on the **label** reflects drag state (`"false"` at rest, `"true"` while dragging)
342
+
343
+ ### Icon Mapping
344
+
345
+ | Element | Icon |
346
+ |---------|------|
347
+ | Dismiss button | `xmark` (size 10) |
348
+
349
+ ## Backward Compatibility (CSS class aliases)
350
+
351
+ The refactored component preserves legacy CSS classes so existing consumer selectors keep working:
352
+
353
+ | Legacy class | Element | Replaces / alias for |
354
+ |---|---|---|
355
+ | `xpl-tag-container` | Host (`<xpl-tag>`) | Old root class — now an alias; styles come from `.xpl-tag` |
356
+ | `xpl-tag` | Content `<button>` / `<div>` | Old content selector (`button.xpl-tag`) — kept so `.xpl-tag-container .xpl-tag` selectors match |
357
+ | `xpl-tag__close` | Dismiss `<button>` | Old dismiss selector — alias for `.xpl-tag__dismiss` |
358
+
359
+ These aliases will be removed in a future major version. New code should target `.xpl-tag`, `.xpl-tag__content`, and `.xpl-tag__dismiss`.
4
360
 
5
361
  <!-- Auto Generated Below -->
6
362
 
7
363
 
364
+ ## Properties
365
+
366
+ | Property | Attribute | Description | Type | Default |
367
+ | ------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------- | ----------- |
368
+ | `disabled` | `disabled` | Whether the tag is disabled | `boolean` | `false` |
369
+ | `dismissible` | `dismissible` | Whether the tag shows a dismiss button | `boolean` | `true` |
370
+ | `isDraggable` | `is-draggable` | When true, the tag label uses native HTML5 drag (the inner label is the drag source). Named `isDraggable` so the Stencil prop does not collide with the native `HTMLElement.draggable` API. `reflect: false` avoids syncing a `draggable` attribute onto the host; the inner label remains the drag source. Host `onDragStart` still suppresses stray native drags from host chrome. | `boolean` | `false` |
371
+ | `size` | `size` | The size of the tag | `"default" \| "sm"` | `'default'` |
372
+ | `tagId` | `tag-id` | Optional stable id for the tag. When set, it is included in `tagDragStart` / `tagDragEnd` detail and written to `dataTransfer` as `application/x-tag-id`. | `string` | `undefined` |
373
+
374
+
8
375
  ## Events
9
376
 
10
- | Event | Description | Type |
11
- | ------- | --------------------------------------------------------------------- | ------------------ |
12
- | `close` | Callback function that is called when tag text or `x` icon is clicked | `CustomEvent<any>` |
377
+ | Event | Description | Type |
378
+ | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------- |
379
+ | `close` | <span style="color:red">**[DEPRECATED]**</span> Use `tagRemove` for dismiss button clicks only. The `close` event will be removed in a future major version.<br/><br/>Emitted when the tag is dismissed (content click when `isDraggable` is false, or dismiss button click). | `CustomEvent<void>` |
380
+ | `tagDragEnd` | Emitted when a drag operation ends. `event.detail`: `{ tagId?, dropped, originalEvent }`. `dropped` is `true` when `dataTransfer.dropEffect === 'move'`. `originalEvent` is the native `DragEvent`; browsers may clear `dataTransfer` after the synchronous handler runs — do not read `originalEvent.dataTransfer.getData(...)` asynchronously. | `CustomEvent<TagDragEndDetail>` |
381
+ | `tagDragStart` | Emitted when a drag operation starts (native `dragstart` on the inner label). `event.detail`: `{ tagId?, content, originalEvent }`. `originalEvent` is the native `DragEvent`; browsers may clear `dataTransfer` after the synchronous handler runs — do not read `originalEvent.dataTransfer.getData(...)` asynchronously. | `CustomEvent<TagDragStartDetail>` |
382
+ | `tagRemove` | Emitted when the tag dismiss (×) button is clicked | `CustomEvent<void>` |
13
383
 
14
384
 
15
385
  ## Dependencies
@@ -18,9 +388,14 @@ Tags represent a set of interactive keywords that help label, organize, and cate
18
388
 
19
389
  - [xpl-select](../xpl-select)
20
390
 
391
+ ### Depends on
392
+
393
+ - [xpl-icon](../xpl-icon)
394
+
21
395
  ### Graph
22
396
  ```mermaid
23
397
  graph TD;
398
+ xpl-tag --> xpl-icon
24
399
  xpl-select --> xpl-tag
25
400
  style xpl-tag fill:#f9f,stroke:#333,stroke-width:4px
26
401
  ```
@@ -8,7 +8,62 @@ When possible, Toasts should auto-dismiss after 8 seconds. When an action is pre
8
8
 
9
9
  Match your messaging with the sentiment of the toast. Most messages will have a neutral sentiment. Reserve negative sentiments for when an explicit failure has occurred. Give users the information they need to correct the issue.
10
10
 
11
- Toasts only support a single action and up to 85 characters. If multiple actions can be taken, or the message is longer than a few words, use a [Modal component](https://xplor-apollo.herokuapp.com/?path=/story/components-modal--modal) instead.
11
+ Toasts only support a single action and up to 85 characters. If multiple actions can be taken, or the message is longer than a few words, use a [Modal component](https://apollo.xplordocs.com/?path=/story/components-modal--modal) instead.
12
+
13
+ ## Positioning
14
+
15
+ The default position is arbitrarily set to `40px` from top and `40px` from right of the browser viewport on desktop and bottom-center on mobile. This position should be adjusted to ensure it's not covering your App's header. Apollo, by design, does not prescribe a position for toasts because this will be dependent on the app that it is being used in.
16
+
17
+ Positioning of toasts should be global to your app. For example, if it is decided that your app will always position the toast in the top right corner, then this convention should be followed throughout. It should not be positioned top-right on one screen and bottom-center on another.
18
+
19
+ *****Consult your designer for the best placement for your product.**
20
+
21
+ ### Overriding the default position
22
+
23
+ The toast uses `position: fixed` and can be repositioned by overriding the `.xpl-toast` CSS class in your app's stylesheet. Set `top`, `right`, `bottom`, and `left` as needed and use `unset` or `initial` to clear any defaults you don't want.
24
+
25
+ **Top-left example:**
26
+ ```css
27
+ .xpl-toast {
28
+ top: 24px;
29
+ right: unset;
30
+ left: 24px;
31
+ }
32
+ ```
33
+
34
+ **Bottom-right example:**
35
+ ```css
36
+ .xpl-toast {
37
+ top: unset;
38
+ right: 24px;
39
+ bottom: 24px;
40
+ }
41
+ ```
42
+
43
+ **Centered at the top:**
44
+ ```css
45
+ .xpl-toast {
46
+ top: 24px;
47
+ right: unset;
48
+ left: 50%;
49
+ transform: translateX(-50%);
50
+ }
51
+ ```
52
+
53
+ The mobile breakpoint (≤ 768px) resets the toast to bottom-center. If your app needs a different mobile position, override the media query as well:
54
+
55
+ ```css
56
+ @media screen and (max-width: 768px) {
57
+ .xpl-toast {
58
+ /* your mobile overrides */
59
+ bottom: 16px;
60
+ left: 50%;
61
+ transform: translateX(-50%);
62
+ }
63
+ }
64
+ ```
65
+
66
+ > **Tip:** Place these overrides in a global stylesheet so every toast in your app appears in the same location.
12
67
 
13
68
  <!-- Auto Generated Below -->
14
69
 
@@ -0,0 +1,179 @@
1
+ # xpl-top-nav
2
+
3
+ Top navigation shell for brand, primary navigation, right-side actions, and an optional account menu.
4
+
5
+ ## Usage
6
+
7
+ Use slots only for layout content. The component provides the internal wrappers for the right rail and user menu. The right side renders `right-aside` then the user menu (built-in trigger + panel). `left-aside` is intended for `xpl-top-nav-item` links (each item should use **`slot="left-aside"`** so they are direct children of the internal **`role="list"`** — avoid wrapping them in a single container with that slot). Set the **`child-account-label`** attribute (or **`childAccountLabel`** in React) for the built-in menu trigger label beside the chevron; use **`slot="user-menu-trigger"`** to replace that trigger entirely. If `brand-href` is set, the brand uses native link navigation. If not, the component emits `brandClick`.
8
+
9
+ ### Web component (typical layout)
10
+
11
+ ```html
12
+ <xpl-top-nav
13
+ brand-name="My App"
14
+ brand-href="/"
15
+ label="Main navigation"
16
+ child-account-label="Account"
17
+ nav-control
18
+ >
19
+ <xpl-top-nav-item slot="left-aside" label="Home" href="/" icon="house-4"></xpl-top-nav-item>
20
+ <xpl-top-nav-item slot="left-aside" label="Reports" href="/reports"></xpl-top-nav-item>
21
+
22
+ <xpl-button slot="right-aside" variant="secondary">Help</xpl-button>
23
+ <xpl-nav-header-menu slot="user-menu" username="Alex User" email="alex@example.com">
24
+ <xpl-top-nav-item slot="right-aside-mobile" label="Help" href="/help"></xpl-top-nav-item>
25
+ <xpl-top-nav-item label="Profile" href="/profile" icon="person-1"></xpl-top-nav-item>
26
+ <xpl-top-nav-item label="Sign out" href="/logout" icon="open-rect-arrow-out"></xpl-top-nav-item>
27
+ </xpl-nav-header-menu>
28
+ </xpl-top-nav>
29
+ ```
30
+
31
+ ### Logo from URL and SPA brand (no `brand-href`)
32
+
33
+ ```html
34
+ <xpl-top-nav brand-logo="https://example.com/logo.svg" brand-name="Apollo">
35
+ <xpl-top-nav-item slot="left-aside" label="Dashboard" href="#"></xpl-top-nav-item>
36
+ </xpl-top-nav>
37
+ ```
38
+
39
+ Listen for `brandClick` on the host when `brand-href` is omitted.
40
+
41
+ ### Plain HTML (static documentation)
42
+
43
+ Use the same tags in any HTML page that loads Apollo styles and the component bundle. Prefer slots and `xpl-top-nav-item` rather than copying internal BEM classes.
44
+
45
+ ## Responsive behavior
46
+
47
+ - `nav-control` enables the mobile drawer toggle. The control is only visible on **narrow viewports** (see **`top-nav.css`**: one pixel below Tailwind **`md`**; hidden from **`md`** / **768px** width upward at default Tailwind).
48
+ - Below **`md`**, **`slot="left-aside"`** (`.xpl-nav-left`) is **hidden** unless **`nav-control`** is set **and** the drawer is open (`xpl-top-nav--nav-control` + `xpl-top-nav--open`). **Without `nav-control` there is no mobile drawer** — primary links are not shown in the narrow bar (duplicate into **`xpl-nav-header-menu`** or widen the viewport if they must stay reachable).
49
+ - Pressing `Escape` closes nested dropdowns first, then closes the mobile drawer if it is still open (when `nav-control` is set). Focus then returns to the hamburger toggle. **Escape** is ignored for closing the drawer while **any** descendant **`xpl-popover`** is open (including the account menu or a consumer-slotted popover in **`left-aside`** / **`right-aside`**).
50
+ - Opening the built-in **account** popover while the mobile drawer is open **closes the drawer** and emits **`navOpen(false)`** so the two surfaces do not stack.
51
+ - On **narrow viewports**, **`slot="right-aside"`** is hidden in the bar. Duplicate those actions into **`xpl-nav-header-menu`** **`slot="right-aside-mobile"`** (narrow-only strip below profile, above the list) so they stay reachable from the account menu.
52
+ - On **`xpl-top-nav-item`**, use **`selected`** for the current page (**`aria-current="page"`**) and optional **`active`** for extra accent styling; see the item readme for modifier details.
53
+ - **`slot="dropdown"`** does not implement arrow-key roving focus; put focusable elements inside the panel or treat full “menu” keyboard behavior as a future enhancement.
54
+
55
+ ## Theming
56
+
57
+ - The host applies the Foundation `dark` scope so the bar and its slotted children resolve dark-mode purpose tokens automatically.
58
+ - Floating overlays rendered outside the host, such as teleported popover content, may need their own `dark` class if they should match the shell.
59
+
60
+ ## Icon Mapping
61
+
62
+ | Location | Icon name | Notes |
63
+ | -------- | --------- | ----- |
64
+ | Mobile nav toggle (`nav-control`) | `menu` | Shown inside the bar control when `nav-control` is set. |
65
+ | Built-in account trigger | `chevron-down` | `xpl-button` `icon` prop (end). |
66
+ | Dropdown row (`xpl-top-nav-item` with `slot="dropdown"`) | `chevron-down` | Trailing indicator on the row control. |
67
+
68
+ Consumer-provided `icon` props on `xpl-top-nav-item` use names from `@xplortech/apollo-icons`.
69
+
70
+ ## Token use
71
+
72
+ | Area | Token / variable |
73
+ | ---- | ---------------- |
74
+ | Bar surface | `var(--xpl-background-surface-default)` |
75
+ | Bar text (default) | `var(--xpl-text-subdued)` |
76
+ | Bar height | `var(--xpl-size-350)` |
77
+ | Bar padding | `var(--xpl-space-8)` / `var(--xpl-space-16)` |
78
+ | Bottom border | `var(--xpl-border-small)` `var(--xpl-border-default)` |
79
+ | Focus ring | `var(--xpl-border-focus)` with `outline-2` / `outline-offset-2` (see `top-nav.css`) |
80
+ | Panel / drawer width | `var(--xpl-top-nav-panel-width)` (component custom property in `top-nav.css`) |
81
+ | Account popover offset | `var(--xpl-space-16)` below bar (`margin-top` on menu content) |
82
+
83
+ ## Accessibility
84
+
85
+ - **`nav` landmark:** The `label` prop maps to `aria-label` on the inner `<nav>`. If omitted, it defaults to **`top-navigation-bar`**. Use a unique label when multiple navigation regions exist (e.g. side nav + top nav).
86
+ - **Mobile control:** With `nav-control`, the toggle is a native `<button>` with `aria-expanded` reflecting the drawer and an accessible name for open/close.
87
+ - **Account menu:** The built-in `xpl-button` trigger sets `aria-haspopup="dialog"` to match the internal `xpl-popover` trigger. Chevron-only mode (no `child-account-label` text) adds `aria-label="Open account menu"`. The popover's internal wrapper `<span>` is hidden via CSS `visibility: hidden` so the `xpl-button` is the **single tab stop** — click and keyboard events still bubble to the popover. Custom triggers via `slot="user-menu-trigger"` should set their own accessible name and `aria-haspopup`.
88
+ - **Primary links:** Brand and items use `xpl-top-nav-item` (native `<a>` or `role="button"`) with keyboard activation (Enter / Space where applicable).
89
+ - **Dropdown items:** Items with `slot="dropdown"` expose `aria-expanded` on the inner control; **Escape** closes the dropdown (document capture). **Escape** on the shell closes the mobile drawer only after dropdowns and **any** open descendant **`xpl-popover`** are closed (document capture vs bubble ordering). Arrow-key navigation within the dropdown panel is not built in.
90
+ - **Icon-only items:** With **`icon`** and no **`label`** or default-slot text, the inner control gets **`aria-label`** (**`item-aria-label`** to override, else **`Navigation item`**).
91
+ - **Lists:** `left-aside` is wrapped in `role="list"`; each primary link `xpl-top-nav-item` uses `role="listitem"`. The built-in brand row (`xpl-top-nav__brand`) omits `listitem` because it sits outside that list; `slot="right-aside-mobile"` rows omit it as well. `xpl-nav-header-menu` default-slot rows still use `listitem` (menu list contract).
92
+
93
+ <!-- Auto Generated Below -->
94
+
95
+
96
+ ## Overview
97
+
98
+ Horizontal top navigation with **`left-aside`** and a **right rail**: **`right-aside`** then **user menu**
99
+ (see **`.xpl-top-nav__right-rail`** in `render()`). The account menu uses an internal **`xpl-popover`** (**`bottom-end`**, **`display="menu"`**): built-in trigger uses **`child-account-label`** (prop / attribute) as the label beside a trailing **`chevron-down`** on **`xpl-button`** (**`icon`** / **`iconPosition="end"`**), or **`slot="user-menu-trigger"`** for a custom trigger; panel from **`slot="user-menu"`** (e.g. **`xpl-nav-header-menu`**).
100
+ Optional **`nav-control`** and **`navOpen`**. **`left-aside`** uses **`role="list"`** for primary **`xpl-top-nav-item`** rows (**`role="listitem"`** on each item host). The built-in **`xpl-top-nav__brand`** item omits **`listitem`** (it is not a child of that list). **`label`** maps to **`nav`** **`aria-label`**. Opening state is internal (not a prop) — use **`navOpen`** and host **`xpl-top-nav--open`** for styling.
101
+
102
+ **Escape:** With **`nav-control`**, **Escape** closes the mobile drawer and emits **`navOpen`** **`false`** (skips while **any** descendant **`xpl-popover`** is open — detected from each popover’s inner **`.xpl-popover--is-open`** marker — or when a **`xpl-top-nav-item`** dropdown is open — capture/bubble order). Focus returns to the nav toggle after the drawer closes (**Escape** or second toggle click).
103
+ **`xpl-top-nav-item`** **`slot="dropdown"`** uses document **capture** for **Escape** first; the shell uses **bubble**
104
+ on **`ownerDocument`** so nested dropdowns close before the drawer.
105
+
106
+ **Theming:** The host always includes Foundation’s **`dark`** class so **`--xpl-*`** purpose tokens under this subtree
107
+ resolve to dark-mode values even when the page root is light. Floating overlays (e.g. **`xpl-popover`** / **`xpl-dropdown`**
108
+ content teleported outside the host) do not inherit this scope — add **`dark`** on those panels if they should match.
109
+
110
+ **Layout:** **`right-aside`** and the user-menu region are wrapped internally (**`.xpl-top-nav__right-lead`**, etc.).
111
+ Consumers should not add those BEM classes — slot content only.
112
+
113
+ **Brand logo:** use **`brand-logo`** (URL) for a built-in **`<img>`**, or **`slot="brand-logo"`** for custom markup (e.g. **`xpl-icon`**, SVG). When the URL prop is set, it takes precedence and the slot is not used for the image. On **narrow viewports** (one pixel below Tailwind **`md`** — see **`top-nav.css`**), **`brand-name`** text is hidden in the bar (logo / slot mark only); keep a meaningful **`alt`** on **`brand-logo`** or accessible slotted mark for context.
114
+
115
+ **Narrow / mobile** (same breakpoint as above): **`slot="left-aside"`** is **hidden** in the bar until **`nav-control`**
116
+ is set **and** the drawer is open (floating panel per Figma). **Without **`nav-control`**, there is no mobile drawer** —
117
+ primary links remain hidden below **`md`** until the viewport is wide enough for the horizontal bar. The built-in **brand**
118
+ stays in the top bar (**hamburger → brand** when **`nav-control`** is set). **`right-aside`** is hidden in the bar on narrow
119
+ viewports (**`top-nav.css`**, one pixel below Tailwind **`md`**); duplicate those actions into **`xpl-nav-header-menu`**
120
+ **`slot="right-aside-mobile"`** (below profile, above the list; narrow-only CSS in **`top-nav.css`**) per Figma.
121
+
122
+ **Account menu vs drawer:** Opening the built-in account **`xpl-popover`** while the mobile drawer is open **closes the drawer**
123
+ and emits **`navOpen(false)`** so the two layers do not stack.
124
+
125
+ ## Properties
126
+
127
+ | Property | Attribute | Description | Type | Default |
128
+ | ------------------- | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | ----------- |
129
+ | `brandHref` | `brand-href` | Destination URL for the brand control when using native navigation (**`<a href>`**). When unset, the brand is a **`role="button"`** control and **`brandClick`** fires on activation instead. | `string` | `undefined` |
130
+ | `brandLogo` | `brand-logo` | Optional image URL for the brand mark (leading the brand row, before **`brand-name`** text). When set, renders **`<img class="xpl-top-nav__brand-logo">`** and ignores **`slot="brand-logo"`** for the mark. When unset, use **`slot="brand-logo"`** for custom logo content. | `string` | `undefined` |
131
+ | `brandName` | `brand-name` | Visible product / app name next to **`brand-logo`**. Omit for logo-only; provide **`brand-logo`** and/or this string to show the built-in brand row (**`left-aside`** is then primary nav links only). | `string` | `undefined` |
132
+ | `childAccountLabel` | `child-account-label` | Label text for the built-in account menu trigger (shown **before** the **`chevron-down`** icon) when **`slot="user-menu"`** is present and **`slot="user-menu-trigger"`** is not used. When empty or whitespace-only, the trigger shows only the chevron and uses **`aria-label="Open account menu"`** on the button. | `string` | `undefined` |
133
+ | `label` | `label` | Accessible name for the `<nav>` landmark (maps to `aria-label`). Use a unique label when the page has multiple navigation regions (e.g. side nav + top nav). When unset, defaults to `top-navigation-bar`. | `string` | `undefined` |
134
+ | `navControl` | `nav-control` | When true, renders the navigation control (hamburger) for toggling the left slot on small viewports. The control is **hidden from the Tailwind `md` breakpoint up**; collapse/show for **`left-aside`** uses **`max-width: calc(theme('screens.md') - 1px)`** in **`top-nav.css`** (Figma’s 767px at a 16px root and default **`screens.md`**). Reflected to the **`nav-control`** attribute so host updates (framework props) re-run **`@Watch`**: drawer state and document **Escape** handling stay in sync, the host **`xpl-top-nav--nav-control`** class toggles for **`top-nav.css`**, and **`navOpen(false)`** is emitted if **`nav-control`** is cleared while the drawer was open. | `boolean` | `undefined` |
135
+
136
+
137
+ ## Events
138
+
139
+ | Event | Description | Type |
140
+ | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------- |
141
+ | `brandClick` | Emitted when the brand control is activated and **`brandHref`** is **not** set (SPA / in-app navigation). **`detail`** is the **`MouseEvent`** from **`xpl-top-nav-item`** **`navItemClick`**. Not emitted when **`brandHref`** is set (use native link navigation). | `CustomEvent<MouseEvent>` |
142
+ | `navOpen` | Emitted when the mobile nav open state changes: hamburger toggle, or **Escape** closing the drawer (when **`nav-control`** is set and the bar was open). Detail is the new open state (**`true`** = open, **`false`** = closed). | `CustomEvent<boolean>` |
143
+
144
+
145
+ ## Slots
146
+
147
+ | Slot | Description |
148
+ | --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
149
+ | `"brand-logo"` | Custom brand mark when **`brand-logo`** URL is not set; placed before **`brand-name`** in the brand row. |
150
+ | `"left-aside"` | Primary navigation (**`xpl-top-nav-item`** links). After the brand on wide viewports; below **`md`**, visible only inside the **`nav-control`** drawer when open (otherwise hidden). |
151
+ | `"right-aside"` | Right-side actions before the user menu. Hidden on narrow viewports (**`top-nav.css`** below **`md`**). |
152
+ | `"user-menu"` | Account popover panel only (e.g. **`xpl-nav-header-menu`** with menu **`xpl-top-nav-item`** children). Trigger is **`slot="user-menu-trigger"`** or the built-in button (**`child-account-label`** text + chevron). Use **`slot="right-aside-mobile"`** on **`xpl-nav-header-menu`** for narrow-only duplicates of **`right-aside`** (below the profile block). |
153
+ | `"user-menu-trigger"` | Optional override for the popover trigger. When set, the built-in **`child-account-label`** trigger is ignored. |
154
+
155
+
156
+ ## Dependencies
157
+
158
+ ### Depends on
159
+
160
+ - [xpl-icon](../xpl-icon)
161
+ - [xpl-top-nav-item](xpl-top-nav-item)
162
+ - [xpl-popover](../xpl-popover)
163
+ - [xpl-button](../xpl-button)
164
+
165
+ ### Graph
166
+ ```mermaid
167
+ graph TD;
168
+ xpl-top-nav --> xpl-icon
169
+ xpl-top-nav --> xpl-top-nav-item
170
+ xpl-top-nav --> xpl-popover
171
+ xpl-top-nav --> xpl-button
172
+ xpl-top-nav-item --> xpl-icon
173
+ xpl-button --> xpl-icon
174
+ style xpl-top-nav fill:#f9f,stroke:#333,stroke-width:4px
175
+ ```
176
+
177
+ ----------------------------------------------
178
+
179
+ *Built with [StencilJS](https://stenciljs.com/)*