@aquera/nile-elements 2.0.21 → 2.0.23

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 (502) hide show
  1. package/README.md +76 -34
  2. package/demo/nxtgen-classes.css +24 -4
  3. package/demo/nxtgen-dark.css +30 -16
  4. package/demo/nxtgen-properties.css +9 -2
  5. package/demo/nxtgen-utilities.css +31 -4
  6. package/demo/nxtgen.css +8 -4
  7. package/demo/utilities.css +2 -2
  8. package/demo/variables.css +2 -2
  9. package/dist/index.cjs.js +1 -1
  10. package/dist/index.esm.js +1 -1
  11. package/dist/index.js +1954 -937
  12. package/dist/nile-app-shell/index.cjs.js +1 -1
  13. package/dist/nile-app-shell/index.esm.js +1 -1
  14. package/dist/nile-app-shell/nile-app-shell.cjs.js +1 -1
  15. package/dist/nile-app-shell/nile-app-shell.cjs.js.map +1 -1
  16. package/dist/nile-app-shell/nile-app-shell.css.cjs.js +1 -1
  17. package/dist/nile-app-shell/nile-app-shell.css.cjs.js.map +1 -1
  18. package/dist/nile-app-shell/nile-app-shell.css.esm.js +72 -65
  19. package/dist/nile-app-shell/nile-app-shell.esm.js +60 -31
  20. package/dist/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.cjs.js +1 -1
  21. package/dist/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.cjs.js.map +1 -1
  22. package/dist/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.esm.js +1 -1
  23. package/dist/nile-app-shell-side-nav/nile-app-shell-side-nav.cjs.js +1 -1
  24. package/dist/nile-app-shell-side-nav/nile-app-shell-side-nav.cjs.js.map +1 -1
  25. package/dist/nile-app-shell-side-nav/nile-app-shell-side-nav.css.cjs.js +1 -1
  26. package/dist/nile-app-shell-side-nav/nile-app-shell-side-nav.css.cjs.js.map +1 -1
  27. package/dist/nile-app-shell-side-nav/nile-app-shell-side-nav.css.esm.js +25 -7
  28. package/dist/nile-app-shell-side-nav/nile-app-shell-side-nav.esm.js +2 -2
  29. package/dist/nile-button-filter/nile-button-filter.cjs.js +1 -1
  30. package/dist/nile-button-filter/nile-button-filter.cjs.js.map +1 -1
  31. package/dist/nile-button-filter/nile-button-filter.css.cjs.js +1 -1
  32. package/dist/nile-button-filter/nile-button-filter.css.cjs.js.map +1 -1
  33. package/dist/nile-button-filter/nile-button-filter.css.esm.js +1 -1
  34. package/dist/nile-button-filter/nile-button-filter.esm.js +2 -4
  35. package/dist/nile-calendar/nile-calendar.css.cjs.js +1 -1
  36. package/dist/nile-calendar/nile-calendar.css.cjs.js.map +1 -1
  37. package/dist/nile-calendar/nile-calendar.css.esm.js +9 -8
  38. package/dist/nile-color-picker/nile-color-picker.css.cjs.js +1 -1
  39. package/dist/nile-color-picker/nile-color-picker.css.cjs.js.map +1 -1
  40. package/dist/nile-color-picker/nile-color-picker.css.esm.js +1 -1
  41. package/dist/nile-combobox/nile-combobox.css.cjs.js +1 -1
  42. package/dist/nile-combobox/nile-combobox.css.cjs.js.map +1 -1
  43. package/dist/nile-combobox/nile-combobox.css.esm.js +1 -1
  44. package/dist/nile-command-menu-item/nile-command-menu-item.css.cjs.js +1 -1
  45. package/dist/nile-command-menu-item/nile-command-menu-item.css.cjs.js.map +1 -1
  46. package/dist/nile-command-menu-item/nile-command-menu-item.css.esm.js +5 -1
  47. package/dist/nile-context-menu/nile-context-menu.css.cjs.js +1 -1
  48. package/dist/nile-context-menu/nile-context-menu.css.cjs.js.map +1 -1
  49. package/dist/nile-context-menu/nile-context-menu.css.esm.js +2 -3
  50. package/dist/nile-dropdown-switcher/index.cjs.js +2 -0
  51. package/dist/nile-dropdown-switcher/index.cjs.js.map +1 -0
  52. package/dist/nile-dropdown-switcher/index.esm.js +1 -0
  53. package/dist/nile-dropdown-switcher/nile-dropdown-switcher.cjs.js +2 -0
  54. package/dist/nile-dropdown-switcher/nile-dropdown-switcher.cjs.js.map +1 -0
  55. package/dist/nile-dropdown-switcher/nile-dropdown-switcher.css.cjs.js +2 -0
  56. package/dist/nile-dropdown-switcher/nile-dropdown-switcher.css.cjs.js.map +1 -0
  57. package/dist/nile-dropdown-switcher/nile-dropdown-switcher.css.esm.js +39 -0
  58. package/dist/nile-dropdown-switcher/nile-dropdown-switcher.esm.js +1 -0
  59. package/dist/nile-dropdown-switcher-group/index.cjs.js +2 -0
  60. package/dist/nile-dropdown-switcher-group/index.cjs.js.map +1 -0
  61. package/dist/nile-dropdown-switcher-group/index.esm.js +1 -0
  62. package/dist/nile-dropdown-switcher-group/nile-dropdown-switcher-group.cjs.js +2 -0
  63. package/dist/nile-dropdown-switcher-group/nile-dropdown-switcher-group.cjs.js.map +1 -0
  64. package/dist/nile-dropdown-switcher-group/nile-dropdown-switcher-group.css.cjs.js +2 -0
  65. package/dist/nile-dropdown-switcher-group/nile-dropdown-switcher-group.css.cjs.js.map +1 -0
  66. package/dist/nile-dropdown-switcher-group/nile-dropdown-switcher-group.css.esm.js +37 -0
  67. package/dist/nile-dropdown-switcher-group/nile-dropdown-switcher-group.esm.js +8 -0
  68. package/dist/nile-dropdown-switcher-header/index.cjs.js +2 -0
  69. package/dist/nile-dropdown-switcher-header/index.cjs.js.map +1 -0
  70. package/dist/nile-dropdown-switcher-header/index.esm.js +1 -0
  71. package/dist/nile-dropdown-switcher-header/nile-dropdown-switcher-header.cjs.js +2 -0
  72. package/dist/nile-dropdown-switcher-header/nile-dropdown-switcher-header.cjs.js.map +1 -0
  73. package/dist/nile-dropdown-switcher-header/nile-dropdown-switcher-header.css.cjs.js +2 -0
  74. package/dist/nile-dropdown-switcher-header/nile-dropdown-switcher-header.css.cjs.js.map +1 -0
  75. package/dist/nile-dropdown-switcher-header/nile-dropdown-switcher-header.css.esm.js +91 -0
  76. package/dist/nile-dropdown-switcher-header/nile-dropdown-switcher-header.esm.js +33 -0
  77. package/dist/nile-dropdown-switcher-item/index.cjs.js +2 -0
  78. package/dist/nile-dropdown-switcher-item/index.cjs.js.map +1 -0
  79. package/dist/nile-dropdown-switcher-item/index.esm.js +1 -0
  80. package/dist/nile-dropdown-switcher-item/nile-dropdown-switcher-item.cjs.js +2 -0
  81. package/dist/nile-dropdown-switcher-item/nile-dropdown-switcher-item.cjs.js.map +1 -0
  82. package/dist/nile-dropdown-switcher-item/nile-dropdown-switcher-item.css.cjs.js +2 -0
  83. package/dist/nile-dropdown-switcher-item/nile-dropdown-switcher-item.css.cjs.js.map +1 -0
  84. package/dist/nile-dropdown-switcher-item/nile-dropdown-switcher-item.css.esm.js +102 -0
  85. package/dist/nile-dropdown-switcher-item/nile-dropdown-switcher-item.esm.js +35 -0
  86. package/dist/nile-empty-state/nile-empty-state.cjs.js +1 -1
  87. package/dist/nile-empty-state/nile-empty-state.cjs.js.map +1 -1
  88. package/dist/nile-empty-state/nile-empty-state.esm.js +4 -4
  89. package/dist/nile-filter-chip/nile-filter-chip.css.cjs.js +1 -1
  90. package/dist/nile-filter-chip/nile-filter-chip.css.cjs.js.map +1 -1
  91. package/dist/nile-filter-chip/nile-filter-chip.css.esm.js +2 -2
  92. package/dist/nile-form-group/nile-form-group.css.cjs.js +1 -1
  93. package/dist/nile-form-group/nile-form-group.css.cjs.js.map +1 -1
  94. package/dist/nile-form-group/nile-form-group.css.esm.js +3 -3
  95. package/dist/nile-inline-sidebar-item/nile-inline-sidebar-item.css.cjs.js +1 -1
  96. package/dist/nile-inline-sidebar-item/nile-inline-sidebar-item.css.cjs.js.map +1 -1
  97. package/dist/nile-inline-sidebar-item/nile-inline-sidebar-item.css.esm.js +20 -4
  98. package/dist/nile-inline-sidebar-item-body/nile-inline-sidebar-item-body.css.cjs.js +1 -1
  99. package/dist/nile-inline-sidebar-item-body/nile-inline-sidebar-item-body.css.cjs.js.map +1 -1
  100. package/dist/nile-inline-sidebar-item-body/nile-inline-sidebar-item-body.css.esm.js +3 -3
  101. package/dist/nile-inline-sidebar-item-header/nile-inline-sidebar-item-header.css.cjs.js +1 -1
  102. package/dist/nile-inline-sidebar-item-header/nile-inline-sidebar-item-header.css.cjs.js.map +1 -1
  103. package/dist/nile-inline-sidebar-item-header/nile-inline-sidebar-item-header.css.esm.js +3 -3
  104. package/dist/nile-markdown-editor/nile-markdown-editor.css.cjs.js +1 -1
  105. package/dist/nile-markdown-editor/nile-markdown-editor.css.cjs.js.map +1 -1
  106. package/dist/nile-markdown-editor/nile-markdown-editor.css.esm.js +4 -4
  107. package/dist/nile-menu/nile-menu.css.cjs.js +1 -1
  108. package/dist/nile-menu/nile-menu.css.cjs.js.map +1 -1
  109. package/dist/nile-menu/nile-menu.css.esm.js +1 -2
  110. package/dist/nile-menu-item/nile-menu-item.css.cjs.js +1 -1
  111. package/dist/nile-menu-item/nile-menu-item.css.cjs.js.map +1 -1
  112. package/dist/nile-menu-item/nile-menu-item.css.esm.js +6 -6
  113. package/dist/nile-nav-tab/nile-nav-tab.css.cjs.js +1 -1
  114. package/dist/nile-nav-tab/nile-nav-tab.css.cjs.js.map +1 -1
  115. package/dist/nile-nav-tab/nile-nav-tab.css.esm.js +3 -3
  116. package/dist/nile-nav-tab-group/nile-nav-tab-group.css.cjs.js +1 -1
  117. package/dist/nile-nav-tab-group/nile-nav-tab-group.css.cjs.js.map +1 -1
  118. package/dist/nile-nav-tab-group/nile-nav-tab-group.css.esm.js +15 -12
  119. package/dist/nile-option/nile-option.css.cjs.js +1 -1
  120. package/dist/nile-option/nile-option.css.cjs.js.map +1 -1
  121. package/dist/nile-option/nile-option.css.esm.js +2 -2
  122. package/dist/nile-pagination/nile-pagination.cjs.js +1 -1
  123. package/dist/nile-pagination/nile-pagination.cjs.js.map +1 -1
  124. package/dist/nile-pagination/nile-pagination.css.cjs.js +1 -1
  125. package/dist/nile-pagination/nile-pagination.css.cjs.js.map +1 -1
  126. package/dist/nile-pagination/nile-pagination.css.esm.js +10 -0
  127. package/dist/nile-pagination/nile-pagination.esm.js +14 -14
  128. package/dist/nile-side-bar/nile-side-bar.cjs.js +1 -1
  129. package/dist/nile-side-bar/nile-side-bar.cjs.js.map +1 -1
  130. package/dist/nile-side-bar/nile-side-bar.css.cjs.js +1 -1
  131. package/dist/nile-side-bar/nile-side-bar.css.cjs.js.map +1 -1
  132. package/dist/nile-side-bar/nile-side-bar.css.esm.js +16 -14
  133. package/dist/nile-side-bar/nile-side-bar.esm.js +2 -2
  134. package/dist/nile-side-bar-action-menu-item/nile-side-bar-action-menu-item.css.cjs.js +1 -1
  135. package/dist/nile-side-bar-action-menu-item/nile-side-bar-action-menu-item.css.cjs.js.map +1 -1
  136. package/dist/nile-side-bar-action-menu-item/nile-side-bar-action-menu-item.css.esm.js +11 -4
  137. package/dist/nile-side-bar-footer/nile-side-bar-footer.cjs.js.map +1 -1
  138. package/dist/nile-side-bar-footer/nile-side-bar-footer.css.cjs.js +1 -1
  139. package/dist/nile-side-bar-footer/nile-side-bar-footer.css.cjs.js.map +1 -1
  140. package/dist/nile-side-bar-footer/nile-side-bar-footer.css.esm.js +8 -3
  141. package/dist/nile-side-bar-footer-item/index.cjs.js +1 -1
  142. package/dist/nile-side-bar-footer-item/index.esm.js +1 -1
  143. package/dist/nile-side-bar-footer-item/nile-side-bar-footer-item.cjs.js +1 -1
  144. package/dist/nile-side-bar-footer-item/nile-side-bar-footer-item.cjs.js.map +1 -1
  145. package/dist/nile-side-bar-footer-item/nile-side-bar-footer-item.css.cjs.js +1 -1
  146. package/dist/nile-side-bar-footer-item/nile-side-bar-footer-item.css.cjs.js.map +1 -1
  147. package/dist/nile-side-bar-footer-item/nile-side-bar-footer-item.css.esm.js +181 -25
  148. package/dist/nile-side-bar-footer-item/nile-side-bar-footer-item.esm.js +10 -3
  149. package/dist/nile-side-bar-footer-text/nile-side-bar-footer-text.css.cjs.js +1 -1
  150. package/dist/nile-side-bar-footer-text/nile-side-bar-footer-text.css.cjs.js.map +1 -1
  151. package/dist/nile-side-bar-footer-text/nile-side-bar-footer-text.css.esm.js +10 -5
  152. package/dist/nile-side-bar-group/nile-side-bar-group.cjs.js +1 -1
  153. package/dist/nile-side-bar-group/nile-side-bar-group.cjs.js.map +1 -1
  154. package/dist/nile-side-bar-group/nile-side-bar-group.css.cjs.js +1 -1
  155. package/dist/nile-side-bar-group/nile-side-bar-group.css.cjs.js.map +1 -1
  156. package/dist/nile-side-bar-group/nile-side-bar-group.css.esm.js +52 -9
  157. package/dist/nile-side-bar-group/nile-side-bar-group.esm.js +4 -4
  158. package/dist/nile-side-bar-group-item/nile-side-bar-group-item.css.cjs.js +1 -1
  159. package/dist/nile-side-bar-group-item/nile-side-bar-group-item.css.cjs.js.map +1 -1
  160. package/dist/nile-side-bar-group-item/nile-side-bar-group-item.css.esm.js +53 -8
  161. package/dist/nile-side-bar-group-item-icon/nile-side-bar-group-item-icon.cjs.js +1 -1
  162. package/dist/nile-side-bar-group-item-icon/nile-side-bar-group-item-icon.cjs.js.map +1 -1
  163. package/dist/nile-side-bar-group-item-icon/nile-side-bar-group-item-icon.css.cjs.js +1 -1
  164. package/dist/nile-side-bar-group-item-icon/nile-side-bar-group-item-icon.css.cjs.js.map +1 -1
  165. package/dist/nile-side-bar-group-item-icon/nile-side-bar-group-item-icon.css.esm.js +13 -4
  166. package/dist/nile-side-bar-group-item-icon/nile-side-bar-group-item-icon.esm.js +4 -4
  167. package/dist/nile-side-bar-group-item-text/nile-side-bar-group-item-text.css.cjs.js +1 -1
  168. package/dist/nile-side-bar-group-item-text/nile-side-bar-group-item-text.css.cjs.js.map +1 -1
  169. package/dist/nile-side-bar-group-item-text/nile-side-bar-group-item-text.css.esm.js +9 -6
  170. package/dist/nile-side-bar-header/nile-side-bar-header.cjs.js.map +1 -1
  171. package/dist/nile-side-bar-header/nile-side-bar-header.css.cjs.js +1 -1
  172. package/dist/nile-side-bar-header/nile-side-bar-header.css.cjs.js.map +1 -1
  173. package/dist/nile-side-bar-header/nile-side-bar-header.css.esm.js +12 -5
  174. package/dist/nile-side-bar-header-switcher/index.cjs.js +2 -0
  175. package/dist/nile-side-bar-header-switcher/index.cjs.js.map +1 -0
  176. package/dist/nile-side-bar-header-switcher/index.esm.js +1 -0
  177. package/dist/nile-side-bar-header-switcher/nile-side-bar-header-switcher.cjs.js +2 -0
  178. package/dist/nile-side-bar-header-switcher/nile-side-bar-header-switcher.cjs.js.map +1 -0
  179. package/dist/nile-side-bar-header-switcher/nile-side-bar-header-switcher.css.cjs.js +2 -0
  180. package/dist/nile-side-bar-header-switcher/nile-side-bar-header-switcher.css.cjs.js.map +1 -0
  181. package/dist/nile-side-bar-header-switcher/nile-side-bar-header-switcher.css.esm.js +83 -0
  182. package/dist/nile-side-bar-header-switcher/nile-side-bar-header-switcher.esm.js +24 -0
  183. package/dist/nile-side-bar-search/index.cjs.js +2 -0
  184. package/dist/nile-side-bar-search/index.cjs.js.map +1 -0
  185. package/dist/nile-side-bar-search/index.esm.js +1 -0
  186. package/dist/nile-side-bar-search/nile-side-bar-search.cjs.js +2 -0
  187. package/dist/nile-side-bar-search/nile-side-bar-search.cjs.js.map +1 -0
  188. package/dist/nile-side-bar-search/nile-side-bar-search.css.cjs.js +2 -0
  189. package/dist/nile-side-bar-search/nile-side-bar-search.css.cjs.js.map +1 -0
  190. package/dist/nile-side-bar-search/nile-side-bar-search.css.esm.js +103 -0
  191. package/dist/nile-side-bar-search/nile-side-bar-search.esm.js +25 -0
  192. package/dist/nile-slide-toggle/nile-slide-toggle.css.cjs.js +1 -1
  193. package/dist/nile-slide-toggle/nile-slide-toggle.css.cjs.js.map +1 -1
  194. package/dist/nile-slide-toggle/nile-slide-toggle.css.esm.js +1 -1
  195. package/dist/nile-tooltip/nile-tooltip.css.cjs.js +1 -1
  196. package/dist/nile-tooltip/nile-tooltip.css.cjs.js.map +1 -1
  197. package/dist/nile-tooltip/nile-tooltip.css.esm.js +7 -5
  198. package/dist/nile-virtual-select/nile-virtual-select.css.cjs.js +1 -1
  199. package/dist/nile-virtual-select/nile-virtual-select.css.cjs.js.map +1 -1
  200. package/dist/nile-virtual-select/nile-virtual-select.css.esm.js +1 -1
  201. package/dist/nile-wysiwyg-editor/index.cjs.js +1 -1
  202. package/dist/nile-wysiwyg-editor/index.esm.js +1 -1
  203. package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.cjs.js +1 -1
  204. package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.cjs.js.map +1 -1
  205. package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.css.cjs.js +1 -1
  206. package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.css.cjs.js.map +1 -1
  207. package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.css.esm.js +75 -3
  208. package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.esm.js +3 -2
  209. package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.css.cjs.js +1 -1
  210. package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.css.cjs.js.map +1 -1
  211. package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.css.esm.js +3 -3
  212. package/dist/nile-wysiwyg-editor/types.cjs.js +1 -1
  213. package/dist/nile-wysiwyg-editor/types.cjs.js.map +1 -1
  214. package/dist/nile-wysiwyg-editor/types.esm.js +1 -1
  215. package/dist/src/index.d.ts +6 -0
  216. package/dist/src/index.js +6 -0
  217. package/dist/src/index.js.map +1 -1
  218. package/dist/src/nile-app-shell/nile-app-shell.css.js +70 -63
  219. package/dist/src/nile-app-shell/nile-app-shell.css.js.map +1 -1
  220. package/dist/src/nile-app-shell/nile-app-shell.d.ts +40 -7
  221. package/dist/src/nile-app-shell/nile-app-shell.js +192 -41
  222. package/dist/src/nile-app-shell/nile-app-shell.js.map +1 -1
  223. package/dist/src/nile-app-shell/nile-app-shell.test.d.ts +2 -0
  224. package/dist/src/nile-app-shell/nile-app-shell.test.js +272 -1020
  225. package/dist/src/nile-app-shell/nile-app-shell.test.js.map +1 -1
  226. package/dist/src/nile-app-shell/zz-layout.test.d.ts +15 -0
  227. package/dist/src/nile-app-shell/zz-layout.test.js +253 -0
  228. package/dist/src/nile-app-shell/zz-layout.test.js.map +1 -0
  229. package/dist/src/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.js +1 -1
  230. package/dist/src/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.js.map +1 -1
  231. package/dist/src/nile-app-shell-side-nav/nile-app-shell-side-nav.css.js +24 -6
  232. package/dist/src/nile-app-shell-side-nav/nile-app-shell-side-nav.css.js.map +1 -1
  233. package/dist/src/nile-app-shell-side-nav/nile-app-shell-side-nav.d.ts +8 -2
  234. package/dist/src/nile-app-shell-side-nav/nile-app-shell-side-nav.js +56 -2
  235. package/dist/src/nile-app-shell-side-nav/nile-app-shell-side-nav.js.map +1 -1
  236. package/dist/src/nile-button-filter/nile-button-filter.css.js +1 -1
  237. package/dist/src/nile-button-filter/nile-button-filter.css.js.map +1 -1
  238. package/dist/src/nile-button-filter/nile-button-filter.js +1 -3
  239. package/dist/src/nile-button-filter/nile-button-filter.js.map +1 -1
  240. package/dist/src/nile-calendar/nile-calendar.css.js +9 -8
  241. package/dist/src/nile-calendar/nile-calendar.css.js.map +1 -1
  242. package/dist/src/nile-color-picker/nile-color-picker.css.js +3 -3
  243. package/dist/src/nile-color-picker/nile-color-picker.css.js.map +1 -1
  244. package/dist/src/nile-combobox/nile-combobox.css.js +1 -1
  245. package/dist/src/nile-combobox/nile-combobox.css.js.map +1 -1
  246. package/dist/src/nile-command-menu-item/nile-command-menu-item.css.js +5 -1
  247. package/dist/src/nile-command-menu-item/nile-command-menu-item.css.js.map +1 -1
  248. package/dist/src/nile-context-menu/nile-context-menu.css.js +2 -4
  249. package/dist/src/nile-context-menu/nile-context-menu.css.js.map +1 -1
  250. package/dist/src/nile-dropdown-switcher/index.d.ts +1 -0
  251. package/dist/src/nile-dropdown-switcher/index.js +2 -0
  252. package/dist/src/nile-dropdown-switcher/index.js.map +1 -0
  253. package/dist/src/nile-dropdown-switcher/nile-dropdown-switcher.css.d.ts +10 -0
  254. package/dist/src/nile-dropdown-switcher/nile-dropdown-switcher.css.js +49 -0
  255. package/dist/src/nile-dropdown-switcher/nile-dropdown-switcher.css.js.map +1 -0
  256. package/dist/src/nile-dropdown-switcher/nile-dropdown-switcher.d.ts +101 -0
  257. package/dist/src/nile-dropdown-switcher/nile-dropdown-switcher.js +463 -0
  258. package/dist/src/nile-dropdown-switcher/nile-dropdown-switcher.js.map +1 -0
  259. package/dist/src/nile-dropdown-switcher/nile-dropdown-switcher.test.d.ts +4 -0
  260. package/dist/src/nile-dropdown-switcher/nile-dropdown-switcher.test.js +506 -0
  261. package/dist/src/nile-dropdown-switcher/nile-dropdown-switcher.test.js.map +1 -0
  262. package/dist/src/nile-dropdown-switcher-group/index.d.ts +1 -0
  263. package/dist/src/nile-dropdown-switcher-group/index.js +2 -0
  264. package/dist/src/nile-dropdown-switcher-group/index.js.map +1 -0
  265. package/dist/src/nile-dropdown-switcher-group/nile-dropdown-switcher-group.css.d.ts +12 -0
  266. package/dist/src/nile-dropdown-switcher-group/nile-dropdown-switcher-group.css.js +49 -0
  267. package/dist/src/nile-dropdown-switcher-group/nile-dropdown-switcher-group.css.js.map +1 -0
  268. package/dist/src/nile-dropdown-switcher-group/nile-dropdown-switcher-group.d.ts +37 -0
  269. package/dist/src/nile-dropdown-switcher-group/nile-dropdown-switcher-group.js +72 -0
  270. package/dist/src/nile-dropdown-switcher-group/nile-dropdown-switcher-group.js.map +1 -0
  271. package/dist/src/nile-dropdown-switcher-header/index.d.ts +1 -0
  272. package/dist/src/nile-dropdown-switcher-header/index.js +2 -0
  273. package/dist/src/nile-dropdown-switcher-header/index.js.map +1 -0
  274. package/dist/src/nile-dropdown-switcher-header/nile-dropdown-switcher-header.css.d.ts +12 -0
  275. package/dist/src/nile-dropdown-switcher-header/nile-dropdown-switcher-header.css.js +103 -0
  276. package/dist/src/nile-dropdown-switcher-header/nile-dropdown-switcher-header.css.js.map +1 -0
  277. package/dist/src/nile-dropdown-switcher-header/nile-dropdown-switcher-header.d.ts +46 -0
  278. package/dist/src/nile-dropdown-switcher-header/nile-dropdown-switcher-header.js +105 -0
  279. package/dist/src/nile-dropdown-switcher-header/nile-dropdown-switcher-header.js.map +1 -0
  280. package/dist/src/nile-dropdown-switcher-item/index.d.ts +1 -0
  281. package/dist/src/nile-dropdown-switcher-item/index.js +2 -0
  282. package/dist/src/nile-dropdown-switcher-item/index.js.map +1 -0
  283. package/dist/src/nile-dropdown-switcher-item/nile-dropdown-switcher-item.css.d.ts +10 -0
  284. package/dist/src/nile-dropdown-switcher-item/nile-dropdown-switcher-item.css.js +112 -0
  285. package/dist/src/nile-dropdown-switcher-item/nile-dropdown-switcher-item.css.js.map +1 -0
  286. package/dist/src/nile-dropdown-switcher-item/nile-dropdown-switcher-item.d.ts +55 -0
  287. package/dist/src/nile-dropdown-switcher-item/nile-dropdown-switcher-item.js +154 -0
  288. package/dist/src/nile-dropdown-switcher-item/nile-dropdown-switcher-item.js.map +1 -0
  289. package/dist/src/nile-empty-state/nile-empty-state.d.ts +5 -0
  290. package/dist/src/nile-empty-state/nile-empty-state.js +11 -2
  291. package/dist/src/nile-empty-state/nile-empty-state.js.map +1 -1
  292. package/dist/src/nile-empty-state/nile-empty-state.test.js +31 -0
  293. package/dist/src/nile-empty-state/nile-empty-state.test.js.map +1 -1
  294. package/dist/src/nile-filter-chip/nile-filter-chip.css.js +2 -2
  295. package/dist/src/nile-filter-chip/nile-filter-chip.css.js.map +1 -1
  296. package/dist/src/nile-form-group/nile-form-group.css.js +1 -1
  297. package/dist/src/nile-form-group/nile-form-group.css.js.map +1 -1
  298. package/dist/src/nile-inline-sidebar-item/nile-inline-sidebar-item.css.js +20 -4
  299. package/dist/src/nile-inline-sidebar-item/nile-inline-sidebar-item.css.js.map +1 -1
  300. package/dist/src/nile-inline-sidebar-item-body/nile-inline-sidebar-item-body.css.js +1 -1
  301. package/dist/src/nile-inline-sidebar-item-body/nile-inline-sidebar-item-body.css.js.map +1 -1
  302. package/dist/src/nile-inline-sidebar-item-header/nile-inline-sidebar-item-header.css.js +3 -3
  303. package/dist/src/nile-inline-sidebar-item-header/nile-inline-sidebar-item-header.css.js.map +1 -1
  304. package/dist/src/nile-markdown-editor/nile-markdown-editor.css.js +4 -4
  305. package/dist/src/nile-markdown-editor/nile-markdown-editor.css.js.map +1 -1
  306. package/dist/src/nile-menu/nile-menu.css.js +1 -2
  307. package/dist/src/nile-menu/nile-menu.css.js.map +1 -1
  308. package/dist/src/nile-menu-item/nile-menu-item.css.js +4 -4
  309. package/dist/src/nile-menu-item/nile-menu-item.css.js.map +1 -1
  310. package/dist/src/nile-nav-tab/nile-nav-tab.css.js +3 -3
  311. package/dist/src/nile-nav-tab/nile-nav-tab.css.js.map +1 -1
  312. package/dist/src/nile-nav-tab-group/nile-nav-tab-group.css.js +15 -12
  313. package/dist/src/nile-nav-tab-group/nile-nav-tab-group.css.js.map +1 -1
  314. package/dist/src/nile-nav-tab-group/nile-nav-tab-group.test.js +111 -0
  315. package/dist/src/nile-nav-tab-group/nile-nav-tab-group.test.js.map +1 -1
  316. package/dist/src/nile-option/nile-option.css.js +2 -2
  317. package/dist/src/nile-option/nile-option.css.js.map +1 -1
  318. package/dist/src/nile-pagination/nile-pagination.css.js +10 -0
  319. package/dist/src/nile-pagination/nile-pagination.css.js.map +1 -1
  320. package/dist/src/nile-pagination/nile-pagination.d.ts +2 -0
  321. package/dist/src/nile-pagination/nile-pagination.js +13 -9
  322. package/dist/src/nile-pagination/nile-pagination.js.map +1 -1
  323. package/dist/src/nile-side-bar/nile-side-bar.css.js +14 -12
  324. package/dist/src/nile-side-bar/nile-side-bar.css.js.map +1 -1
  325. package/dist/src/nile-side-bar/nile-side-bar.d.ts +17 -0
  326. package/dist/src/nile-side-bar/nile-side-bar.js +68 -12
  327. package/dist/src/nile-side-bar/nile-side-bar.js.map +1 -1
  328. package/dist/src/nile-side-bar/nile-side-bar.test.d.ts +23 -0
  329. package/dist/src/nile-side-bar/nile-side-bar.test.js +1614 -1
  330. package/dist/src/nile-side-bar/nile-side-bar.test.js.map +1 -1
  331. package/dist/src/nile-side-bar-action-menu-item/nile-side-bar-action-menu-item.css.js +11 -4
  332. package/dist/src/nile-side-bar-action-menu-item/nile-side-bar-action-menu-item.css.js.map +1 -1
  333. package/dist/src/nile-side-bar-footer/nile-side-bar-footer.css.js +8 -3
  334. package/dist/src/nile-side-bar-footer/nile-side-bar-footer.css.js.map +1 -1
  335. package/dist/src/nile-side-bar-footer/nile-side-bar-footer.d.ts +7 -5
  336. package/dist/src/nile-side-bar-footer/nile-side-bar-footer.js +7 -5
  337. package/dist/src/nile-side-bar-footer/nile-side-bar-footer.js.map +1 -1
  338. package/dist/src/nile-side-bar-footer-item/nile-side-bar-footer-item.css.js +179 -23
  339. package/dist/src/nile-side-bar-footer-item/nile-side-bar-footer-item.css.js.map +1 -1
  340. package/dist/src/nile-side-bar-footer-item/nile-side-bar-footer-item.d.ts +15 -0
  341. package/dist/src/nile-side-bar-footer-item/nile-side-bar-footer-item.js +82 -2
  342. package/dist/src/nile-side-bar-footer-item/nile-side-bar-footer-item.js.map +1 -1
  343. package/dist/src/nile-side-bar-footer-item/nile-side-bar-footer-item.test.d.ts +9 -0
  344. package/dist/src/nile-side-bar-footer-item/nile-side-bar-footer-item.test.js +201 -0
  345. package/dist/src/nile-side-bar-footer-item/nile-side-bar-footer-item.test.js.map +1 -0
  346. package/dist/src/nile-side-bar-footer-text/nile-side-bar-footer-text.css.js +8 -3
  347. package/dist/src/nile-side-bar-footer-text/nile-side-bar-footer-text.css.js.map +1 -1
  348. package/dist/src/nile-side-bar-group/nile-side-bar-group.css.js +50 -7
  349. package/dist/src/nile-side-bar-group/nile-side-bar-group.css.js.map +1 -1
  350. package/dist/src/nile-side-bar-group/nile-side-bar-group.d.ts +35 -0
  351. package/dist/src/nile-side-bar-group/nile-side-bar-group.js +90 -3
  352. package/dist/src/nile-side-bar-group/nile-side-bar-group.js.map +1 -1
  353. package/dist/src/nile-side-bar-group-item/nile-side-bar-group-item.css.js +52 -7
  354. package/dist/src/nile-side-bar-group-item/nile-side-bar-group-item.css.js.map +1 -1
  355. package/dist/src/nile-side-bar-group-item-icon/nile-side-bar-group-item-icon.css.js +11 -2
  356. package/dist/src/nile-side-bar-group-item-icon/nile-side-bar-group-item-icon.css.js.map +1 -1
  357. package/dist/src/nile-side-bar-group-item-icon/nile-side-bar-group-item-icon.d.ts +11 -2
  358. package/dist/src/nile-side-bar-group-item-icon/nile-side-bar-group-item-icon.js +21 -15
  359. package/dist/src/nile-side-bar-group-item-icon/nile-side-bar-group-item-icon.js.map +1 -1
  360. package/dist/src/nile-side-bar-group-item-text/nile-side-bar-group-item-text.css.js +7 -4
  361. package/dist/src/nile-side-bar-group-item-text/nile-side-bar-group-item-text.css.js.map +1 -1
  362. package/dist/src/nile-side-bar-header/nile-side-bar-app-shell.test.js +22 -17
  363. package/dist/src/nile-side-bar-header/nile-side-bar-app-shell.test.js.map +1 -1
  364. package/dist/src/nile-side-bar-header/nile-side-bar-header-surface.test.d.ts +4 -0
  365. package/dist/src/nile-side-bar-header/nile-side-bar-header-surface.test.js +143 -0
  366. package/dist/src/nile-side-bar-header/nile-side-bar-header-surface.test.js.map +1 -0
  367. package/dist/src/nile-side-bar-header/nile-side-bar-header.css.js +10 -3
  368. package/dist/src/nile-side-bar-header/nile-side-bar-header.css.js.map +1 -1
  369. package/dist/src/nile-side-bar-header/nile-side-bar-header.d.ts +7 -5
  370. package/dist/src/nile-side-bar-header/nile-side-bar-header.js +7 -5
  371. package/dist/src/nile-side-bar-header/nile-side-bar-header.js.map +1 -1
  372. package/dist/src/nile-side-bar-header-switcher/index.d.ts +1 -0
  373. package/dist/src/nile-side-bar-header-switcher/index.js +2 -0
  374. package/dist/src/nile-side-bar-header-switcher/index.js.map +1 -0
  375. package/dist/src/nile-side-bar-header-switcher/nile-side-bar-header-switcher.css.d.ts +14 -0
  376. package/dist/src/nile-side-bar-header-switcher/nile-side-bar-header-switcher.css.js +97 -0
  377. package/dist/src/nile-side-bar-header-switcher/nile-side-bar-header-switcher.css.js.map +1 -0
  378. package/dist/src/nile-side-bar-header-switcher/nile-side-bar-header-switcher.d.ts +38 -0
  379. package/dist/src/nile-side-bar-header-switcher/nile-side-bar-header-switcher.js +86 -0
  380. package/dist/src/nile-side-bar-header-switcher/nile-side-bar-header-switcher.js.map +1 -0
  381. package/dist/src/nile-side-bar-search/index.d.ts +1 -0
  382. package/dist/src/nile-side-bar-search/index.js +2 -0
  383. package/dist/src/nile-side-bar-search/index.js.map +1 -0
  384. package/dist/src/nile-side-bar-search/nile-side-bar-search.css.d.ts +15 -0
  385. package/dist/src/nile-side-bar-search/nile-side-bar-search.css.js +118 -0
  386. package/dist/src/nile-side-bar-search/nile-side-bar-search.css.js.map +1 -0
  387. package/dist/src/nile-side-bar-search/nile-side-bar-search.d.ts +56 -0
  388. package/dist/src/nile-side-bar-search/nile-side-bar-search.js +150 -0
  389. package/dist/src/nile-side-bar-search/nile-side-bar-search.js.map +1 -0
  390. package/dist/src/nile-side-bar-search/nile-side-bar-search.test.d.ts +3 -0
  391. package/dist/src/nile-side-bar-search/nile-side-bar-search.test.js +153 -0
  392. package/dist/src/nile-side-bar-search/nile-side-bar-search.test.js.map +1 -0
  393. package/dist/src/nile-slide-toggle/nile-slide-toggle.css.js +1 -1
  394. package/dist/src/nile-slide-toggle/nile-slide-toggle.css.js.map +1 -1
  395. package/dist/src/nile-tooltip/nile-tooltip.css.js +7 -5
  396. package/dist/src/nile-tooltip/nile-tooltip.css.js.map +1 -1
  397. package/dist/src/nile-virtual-select/nile-virtual-select.css.js +1 -1
  398. package/dist/src/nile-virtual-select/nile-virtual-select.css.js.map +1 -1
  399. package/dist/src/nile-wysiwyg-editor/index.d.ts +2 -1
  400. package/dist/src/nile-wysiwyg-editor/index.js +1 -1
  401. package/dist/src/nile-wysiwyg-editor/index.js.map +1 -1
  402. package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.css.js +77 -2
  403. package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.css.js.map +1 -1
  404. package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.d.ts +20 -0
  405. package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.js +37 -1
  406. package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.js.map +1 -1
  407. package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.test.js +108 -0
  408. package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.test.js.map +1 -1
  409. package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.css.js +3 -3
  410. package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.css.js.map +1 -1
  411. package/dist/src/nile-wysiwyg-editor/types.d.ts +8 -0
  412. package/dist/src/nile-wysiwyg-editor/types.js +50 -0
  413. package/dist/src/nile-wysiwyg-editor/types.js.map +1 -1
  414. package/dist/src/version.js +1 -1
  415. package/dist/src/version.js.map +1 -1
  416. package/dist/tsconfig.tsbuildinfo +1 -1
  417. package/dist/version.cjs.js +1 -1
  418. package/dist/version.cjs.js.map +1 -1
  419. package/dist/version.esm.js +1 -1
  420. package/package.json +1 -1
  421. package/src/index.ts +6 -0
  422. package/src/nile-app-shell/nile-app-shell.css.ts +70 -63
  423. package/src/nile-app-shell/nile-app-shell.test.ts +332 -1227
  424. package/src/nile-app-shell/nile-app-shell.ts +223 -44
  425. package/src/nile-app-shell/zz-layout.test.ts +271 -0
  426. package/src/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.ts +1 -5
  427. package/src/nile-app-shell-side-nav/nile-app-shell-side-nav.css.ts +24 -6
  428. package/src/nile-app-shell-side-nav/nile-app-shell-side-nav.ts +62 -2
  429. package/src/nile-button-filter/nile-button-filter.css.ts +1 -1
  430. package/src/nile-button-filter/nile-button-filter.ts +1 -3
  431. package/src/nile-calendar/nile-calendar.css.ts +9 -8
  432. package/src/nile-color-picker/nile-color-picker.css.ts +3 -3
  433. package/src/nile-combobox/nile-combobox.css.ts +1 -1
  434. package/src/nile-command-menu-item/nile-command-menu-item.css.ts +5 -1
  435. package/src/nile-context-menu/nile-context-menu.css.ts +2 -4
  436. package/src/nile-dropdown-switcher/index.ts +1 -0
  437. package/src/nile-dropdown-switcher/nile-dropdown-switcher.css.ts +51 -0
  438. package/src/nile-dropdown-switcher/nile-dropdown-switcher.test.ts +570 -0
  439. package/src/nile-dropdown-switcher/nile-dropdown-switcher.ts +502 -0
  440. package/src/nile-dropdown-switcher-group/index.ts +1 -0
  441. package/src/nile-dropdown-switcher-group/nile-dropdown-switcher-group.css.ts +51 -0
  442. package/src/nile-dropdown-switcher-group/nile-dropdown-switcher-group.ts +78 -0
  443. package/src/nile-dropdown-switcher-header/index.ts +1 -0
  444. package/src/nile-dropdown-switcher-header/nile-dropdown-switcher-header.css.ts +105 -0
  445. package/src/nile-dropdown-switcher-header/nile-dropdown-switcher-header.ts +105 -0
  446. package/src/nile-dropdown-switcher-item/index.ts +1 -0
  447. package/src/nile-dropdown-switcher-item/nile-dropdown-switcher-item.css.ts +114 -0
  448. package/src/nile-dropdown-switcher-item/nile-dropdown-switcher-item.ts +151 -0
  449. package/src/nile-empty-state/nile-empty-state.test.ts +24 -0
  450. package/src/nile-empty-state/nile-empty-state.ts +12 -2
  451. package/src/nile-filter-chip/nile-filter-chip.css.ts +2 -2
  452. package/src/nile-form-group/nile-form-group.css.ts +1 -1
  453. package/src/nile-inline-sidebar-item/nile-inline-sidebar-item.css.ts +20 -4
  454. package/src/nile-inline-sidebar-item-body/nile-inline-sidebar-item-body.css.ts +1 -1
  455. package/src/nile-inline-sidebar-item-header/nile-inline-sidebar-item-header.css.ts +3 -3
  456. package/src/nile-markdown-editor/nile-markdown-editor.css.ts +4 -4
  457. package/src/nile-menu/nile-menu.css.ts +1 -2
  458. package/src/nile-menu-item/nile-menu-item.css.ts +4 -4
  459. package/src/nile-nav-tab/nile-nav-tab.css.ts +3 -3
  460. package/src/nile-nav-tab-group/nile-nav-tab-group.css.ts +15 -12
  461. package/src/nile-nav-tab-group/nile-nav-tab-group.test.ts +130 -0
  462. package/src/nile-option/nile-option.css.ts +2 -2
  463. package/src/nile-pagination/nile-pagination.css.ts +10 -0
  464. package/src/nile-pagination/nile-pagination.ts +14 -9
  465. package/src/nile-side-bar/nile-side-bar.css.ts +14 -12
  466. package/src/nile-side-bar/nile-side-bar.test.ts +1854 -2
  467. package/src/nile-side-bar/nile-side-bar.ts +72 -15
  468. package/src/nile-side-bar-action-menu-item/nile-side-bar-action-menu-item.css.ts +11 -4
  469. package/src/nile-side-bar-footer/nile-side-bar-footer.css.ts +8 -3
  470. package/src/nile-side-bar-footer/nile-side-bar-footer.ts +7 -5
  471. package/src/nile-side-bar-footer-item/nile-side-bar-footer-item.css.ts +179 -23
  472. package/src/nile-side-bar-footer-item/nile-side-bar-footer-item.test.ts +219 -0
  473. package/src/nile-side-bar-footer-item/nile-side-bar-footer-item.ts +84 -2
  474. package/src/nile-side-bar-footer-text/nile-side-bar-footer-text.css.ts +8 -3
  475. package/src/nile-side-bar-group/nile-side-bar-group.css.ts +50 -7
  476. package/src/nile-side-bar-group/nile-side-bar-group.ts +100 -2
  477. package/src/nile-side-bar-group-item/nile-side-bar-group-item.css.ts +52 -7
  478. package/src/nile-side-bar-group-item-icon/nile-side-bar-group-item-icon.css.ts +11 -2
  479. package/src/nile-side-bar-group-item-icon/nile-side-bar-group-item-icon.ts +22 -19
  480. package/src/nile-side-bar-group-item-text/nile-side-bar-group-item-text.css.ts +7 -4
  481. package/src/nile-side-bar-header/nile-side-bar-app-shell.test.ts +22 -17
  482. package/src/nile-side-bar-header/nile-side-bar-header-surface.test.ts +175 -0
  483. package/src/nile-side-bar-header/nile-side-bar-header.css.ts +10 -3
  484. package/src/nile-side-bar-header/nile-side-bar-header.ts +7 -5
  485. package/src/nile-side-bar-header-switcher/index.ts +1 -0
  486. package/src/nile-side-bar-header-switcher/nile-side-bar-header-switcher.css.ts +99 -0
  487. package/src/nile-side-bar-header-switcher/nile-side-bar-header-switcher.ts +88 -0
  488. package/src/nile-side-bar-search/index.ts +1 -0
  489. package/src/nile-side-bar-search/nile-side-bar-search.css.ts +120 -0
  490. package/src/nile-side-bar-search/nile-side-bar-search.test.ts +175 -0
  491. package/src/nile-side-bar-search/nile-side-bar-search.ts +160 -0
  492. package/src/nile-slide-toggle/nile-slide-toggle.css.ts +1 -1
  493. package/src/nile-tooltip/nile-tooltip.css.ts +7 -5
  494. package/src/nile-virtual-select/nile-virtual-select.css.ts +1 -1
  495. package/src/nile-wysiwyg-editor/index.ts +2 -1
  496. package/src/nile-wysiwyg-editor/nile-wysiwyg-editor.css.ts +78 -2
  497. package/src/nile-wysiwyg-editor/nile-wysiwyg-editor.test.ts +132 -0
  498. package/src/nile-wysiwyg-editor/nile-wysiwyg-editor.ts +40 -1
  499. package/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.css.ts +3 -3
  500. package/src/nile-wysiwyg-editor/types.ts +52 -0
  501. package/test-timings.json +0 -1
  502. package/vscode-html-custom-data.json +372 -24
@@ -1,17 +1,18 @@
1
1
  import { expect, fixture, html, oneEvent, waitUntil } from '@open-wc/testing';
2
- import { setViewport } from '@web/test-runner-commands';
2
+ import { sendMouse, setViewport } from '@web/test-runner-commands';
3
3
  import './nile-app-shell';
4
4
  import '../nile-app-shell-nav-toggle/nile-app-shell-nav-toggle';
5
5
  import '../nile-app-shell-panel/nile-app-shell-panel';
6
6
  import '../nile-nav-tab-group/nile-nav-tab-group';
7
7
  import '../nile-nav-tab/nile-nav-tab';
8
8
  import '../nile-side-bar/nile-side-bar';
9
- // renderGlyph fails silently on an unknown name, so the glyph tests need the real element.
10
9
  import '@aquera/nile-glyph/nile-glyph';
11
10
  import type { NileAppShell } from './nile-app-shell';
12
11
  import type { NileAppShellNavToggle } from '../nile-app-shell-nav-toggle/nile-app-shell-nav-toggle';
12
+ import '../nile-app-shell-side-nav/nile-app-shell-side-nav';
13
+ import '../nile-app-shell-main/nile-app-shell-main';
14
+ import type { NileAppShellPanel } from '../nile-app-shell-panel/nile-app-shell-panel';
13
15
 
14
- // Sizes the host explicitly and waits for the ResizeObserver to land.
15
16
  const sized = async (width: number) => {
16
17
  const el = await fixture<NileAppShell>(html`
17
18
  <nile-app-shell style="width: ${width}px; height: 600px;">
@@ -71,53 +72,8 @@ describe('NileAppShell — regions', () => {
71
72
  expect(el.rail).to.be.false;
72
73
  });
73
74
 
74
- it('2. mounts only the regions that have slotted content', async () => {
75
- const el = await sized(1440);
76
- expect(el.hasAttribute('has-side-nav')).to.be.true;
77
- expect(el.hasAttribute('has-top-bar')).to.be.true;
78
- expect(el.hasAttribute('has-panel')).to.be.true;
79
- expect(el.hasAttribute('has-banner')).to.be.false;
80
- expect(el.hasAttribute('has-aside')).to.be.false;
81
- });
82
-
83
- it('3. reports no panel when the panel slot is empty', async () => {
84
- const el = await fixture<NileAppShell>(
85
- html`<nile-app-shell><p>page</p></nile-app-shell>`
86
- );
87
- expect(el.panelAvailable).to.be.false;
88
- expect(el.hasAttribute('has-panel')).to.be.false;
89
- });
90
-
91
- it('4. renders the top bar inside the container by default', async () => {
92
- const el = await sized(1440);
93
- expect(part(el, 'container')!.contains(part(el, 'top-bar'))).to.be.true;
94
75
  });
95
76
 
96
- it('5. spans the shell with the top bar when asked', async () => {
97
- const el = await sized(1440);
98
- el.topBarPlacement = 'shell';
99
- await el.updateComplete;
100
- const bar = part(el, 'top-bar')!;
101
- expect(bar.classList.contains('shell-top-bar')).to.be.true;
102
- expect(part(el, 'container')!.contains(bar)).to.be.false;
103
- });
104
- });
105
-
106
- /**
107
- * The name the control's glyph asks for, once nile-glyph has resolved it to
108
- * real path data. An unknown name leaves an empty <svg>, so this fails loudly
109
- * rather than letting a missing icon ship as a blank box.
110
- */
111
- const drawnGlyph = async (control: Element) => {
112
- const glyph = control.querySelector('nile-glyph')!;
113
- expect(glyph, 'the control renders a nile-glyph').to.exist;
114
- await waitUntil(
115
- () => (glyph.shadowRoot?.querySelector('svg')?.childElementCount ?? 0) > 0,
116
- `${glyph.getAttribute('name')} draws no paths — is it in the nile-glyph set?`
117
- );
118
- return glyph.getAttribute('name');
119
- };
120
-
121
77
  describe('NileAppShell — nav', () => {
122
78
  it('6. collapseNav()/expandNav() drive the rail and reflect it', async () => {
123
79
  const el = await sized(1440);
@@ -173,14 +129,6 @@ describe('NileAppShell — nav', () => {
173
129
  expect(el.hasAttribute('rail')).to.be.true;
174
130
  });
175
131
 
176
- it('62. the built-in toggle draws a real glyph in both states', async () => {
177
- const el = await sized(1440);
178
- expect(await drawnGlyph(part(el, 'nav-toggle')!)).to.equal('ng-panel-left');
179
-
180
- el.collapseNav();
181
- await el.updateComplete;
182
- expect(await drawnGlyph(part(el, 'nav-toggle')!)).to.equal('ng-panel-right');
183
- });
184
132
  });
185
133
 
186
134
  describe('NileAppShell — Ask Aquera panel', () => {
@@ -232,12 +180,6 @@ describe('NileAppShell — Ask Aquera panel', () => {
232
180
  }
233
181
  });
234
182
 
235
- it("14b. overlays below an author's breakpoint when one is set", async () => {
236
- const el = await overlaying(1000);
237
- await waitUntil(() => el.panelMode === 'overlay');
238
- expect(el.getAttribute('panel-mode')).to.equal('overlay');
239
- });
240
-
241
183
  it('15. an open docked panel forces the rail below the docked breakpoint', async () => {
242
184
  const el = await sized(1360);
243
185
  await waitUntil(() => el.panelMode === 'docked');
@@ -261,61 +203,6 @@ describe('NileAppShell — Ask Aquera panel', () => {
261
203
  expect(el.panelOpen).to.be.false;
262
204
  });
263
205
 
264
- it('17. labels the panel and its default heading from panel-label', async () => {
265
- const el = await sized(1440);
266
- el.panelLabel = 'Ask Aquera';
267
- await el.updateComplete;
268
- expect(part(el, 'panel')!.getAttribute('aria-label')).to.equal(
269
- 'Ask Aquera'
270
- );
271
- expect(part(el, 'panel-title')!.textContent!.trim()).to.equal('Ask Aquera');
272
- });
273
-
274
- // Amendment A (A-8): Figma's Assistant Title is Text lg/Semibold, 18/28; the shell sets it on the title it renders itself.
275
- it('17b. sets its own panel title at 18/28 in text-primary-900', async () => {
276
- const tokens =
277
- '--ng-font-size-text-lg: 18px; --ng-line-height-text-lg: 28px; --ng-font-weight-semibold: 600; --ng-colors-text-primary-900: rgb(24, 29, 39)';
278
- const el = await sized(1440);
279
- el.setAttribute('style', `${el.getAttribute('style')}; ${tokens}`);
280
- el.openPanel();
281
- await el.updateComplete;
282
- const own = getComputedStyle(part(el, 'panel-title')!);
283
- expect(own.fontSize).to.equal('18px');
284
- expect(own.lineHeight).to.equal('28px');
285
- expect(own.fontWeight).to.equal('600');
286
- expect(own.color).to.equal('rgb(24, 29, 39)');
287
- });
288
-
289
- // A-8: a slotted nile-app-shell-panel (part of App Shell) draws the same Figma title: 18/28 SemiBold, text-primary-900.
290
- it('17c. sets the nile-app-shell-panel title at 18/28 in text-primary-900', async () => {
291
- const tokens =
292
- '--ng-font-size-text-sm: 14px; --ng-font-size-text-lg: 18px; --ng-line-height-text-lg: 28px; --ng-font-weight-semibold: 600; --ng-colors-text-primary-900: rgb(24, 29, 39)';
293
- const slotted = await fixture<HTMLElement>(html`
294
- <nile-app-shell-panel label="Ask Aquera" style="${tokens}"></nile-app-shell-panel>
295
- `);
296
- await (slotted as unknown as { updateComplete: Promise<unknown> }).updateComplete;
297
- const style = getComputedStyle(slotted.shadowRoot!.querySelector('.title') as HTMLElement);
298
- expect(style.fontSize).to.equal('18px');
299
- expect(style.lineHeight).to.equal('28px');
300
- expect(style.fontWeight).to.equal('600');
301
- expect(style.color).to.equal('rgb(24, 29, 39)');
302
- });
303
-
304
- // The enterprise sheet keeps its own panel title: --nile-type-scale-3 and an inherited line height, exactly as before.
305
- // Enterprise defines no --ng-* tokens, so the NxtGen line height does not apply there.
306
- it('17d. leaves the enterprise nile-app-shell-panel title as it was', async () => {
307
- const slotted = await fixture<HTMLElement>(html`
308
- <nile-app-shell-panel
309
- label="Ask Aquera"
310
- style="--nile-type-scale-3: 14px; line-height: 20px"
311
- ></nile-app-shell-panel>
312
- `);
313
- await (slotted as unknown as { updateComplete: Promise<unknown> }).updateComplete;
314
- const style = getComputedStyle(slotted.shadowRoot!.querySelector('.title') as HTMLElement);
315
- expect(style.fontSize).to.equal('14px');
316
- expect(style.lineHeight).to.equal('20px');
317
- });
318
-
319
206
  it('18. Cmd/Ctrl+J toggles the panel', async () => {
320
207
  const el = await sized(1440);
321
208
  document.dispatchEvent(
@@ -342,32 +229,6 @@ describe('NileAppShell — Ask Aquera panel', () => {
342
229
  expect(overlay.panelOpen).to.be.false;
343
230
  });
344
231
 
345
- it('20. no-panel-shortcut drops the keyboard handling', async () => {
346
- const el = await sized(1440);
347
- el.noPanelShortcut = true;
348
- await el.updateComplete;
349
- document.dispatchEvent(
350
- new KeyboardEvent('keydown', { key: 'j', metaKey: true })
351
- );
352
- await el.updateComplete;
353
- expect(el.panelOpen).to.be.false;
354
- });
355
- });
356
-
357
- describe('NileAppShell — content container', () => {
358
- it('23. content-container makes the slotted page root a size container', async () => {
359
- const el = await fixture<NileAppShell>(html`
360
- <nile-app-shell style="width: 1440px; height: 600px;" content-container>
361
- <div class="page">page</div>
362
- </nile-app-shell>
363
- `);
364
- const page = el.querySelector('.page')!;
365
- expect(getComputedStyle(page).containerType).to.equal('inline-size');
366
-
367
- el.contentContainer = false;
368
- await el.updateComplete;
369
- expect(getComputedStyle(page).containerType).to.equal('normal');
370
- });
371
232
  });
372
233
 
373
234
  describe('NileAppShellNavToggle', () => {
@@ -422,268 +283,9 @@ describe('NileAppShellNavToggle', () => {
422
283
  ).to.be.true;
423
284
  });
424
285
 
425
- it('63. draws a real glyph in both states', async () => {
426
- const el = await fixture<NileAppShell>(html`
427
- <nile-app-shell style="width: 1440px; height: 600px;" no-nav-toggle>
428
- <nav slot="side-nav">nav</nav>
429
- <nile-app-shell-nav-toggle slot="top-bar"></nile-app-shell-nav-toggle>
430
- <p>page</p>
431
- </nile-app-shell>
432
- `);
433
- const toggle = el.querySelector<NileAppShellNavToggle>(
434
- 'nile-app-shell-nav-toggle'
435
- )!;
436
- await waitUntil(() => toggle.appShell === el);
437
- const button = () => toggle.shadowRoot!.querySelector('[part~="button"]')!;
438
- expect(await drawnGlyph(button())).to.equal('ng-panel-left');
439
-
440
- (button() as HTMLElement).click();
441
- await el.updateComplete;
442
- await toggle.updateComplete;
443
- expect(await drawnGlyph(button())).to.equal('ng-panel-right');
444
- });
445
- });
446
-
447
- // The nav track is theme-dependent, so tests load one token pair or the other explicitly.
448
- const ENTERPRISE_NAV = '--nile-width-240px: 240px; --nile-width-70px: 70px;';
449
- const NXTGEN_NAV = '--ng-spacing-296: 296px; --ng-spacing-68: 68px;';
450
-
451
- describe('NileAppShell — the content row never overflows', () => {
452
- const withAside = async (width: number) => {
453
- const el = await fixture<NileAppShell>(html`
454
- <nile-app-shell style="width: ${width}px; height: 600px;" panel-open>
455
- <nav slot="side-nav">nav</nav>
456
- <span slot="top-bar">Title</span>
457
- <p>page</p>
458
- <div slot="aside">aside</div>
459
- <div slot="panel">assistant</div>
460
- </nile-app-shell>
461
- `);
462
- await waitUntil(() => el.hasAttribute('has-aside'));
463
- return el;
464
- };
465
-
466
- /** Overflow of the flex row past the box that clips it. */
467
- const overflow = (el: NileAppShell) => {
468
- const section = el.shadowRoot!.querySelector('.content-section')!;
469
- return (
470
- section.scrollWidth - Math.round(section.getBoundingClientRect().width)
471
- );
472
- };
473
-
474
- it('23. tightens the side columns rather than covering the page', async () => {
475
- // Short of what the row prefers, so the panel and aside give width back while the page stays beside the panel.
476
- const el = await withAside(1500);
477
- await waitUntil(() => el.navLocked);
478
- await settled(el);
479
- expect(el.panelMode).to.equal('docked');
480
- const panel = el.shadowRoot!.querySelector('.panel')!;
481
- const width = panel.getBoundingClientRect().width;
482
- expect(width).to.be.below(480);
483
- expect(width).to.be.at.least(360);
484
- expect(overflow(el)).to.equal(0);
485
- });
486
-
487
- it('24. rails the nav rather than clip the row', async () => {
488
- // 1600 fits the docked panel over a rail, not over the expanded track.
489
- const el = await withAside(1600);
490
- await waitUntil(() => el.navLocked);
491
- await settled(el);
492
- expect(el.panelMode).to.equal('docked');
493
- expect(overflow(el)).to.equal(0);
494
- });
495
-
496
- it('25. holds the container floor while the row has room for it', async () => {
497
- const el = await withAside(1800);
498
- await waitUntil(() => el.panelMode === 'docked');
499
- await settled(el);
500
- const container = el.shadowRoot!.querySelector('.container')!;
501
- expect(container.getBoundingClientRect().width).to.be.at.least(640);
502
- expect(el.navLocked).to.be.false;
503
- expect(overflow(el)).to.equal(0);
504
- });
505
-
506
- it('26. asks the page for room last, and only after the floors are met', async () => {
507
- const el = await withAside(820);
508
- await waitUntil(() => el.navLocked);
509
- await settled(el);
510
- const px = (sel: string) =>
511
- el.shadowRoot!.querySelector(sel)!.getBoundingClientRect().width;
512
- // Both side columns sit on their floors before the page gives anything.
513
- expect(Math.round(px('.panel'))).to.equal(360);
514
- expect(Math.round(px('.aside'))).to.equal(240);
515
- expect(px('.container')).to.be.below(640);
516
- expect(overflow(el)).to.equal(0);
517
- });
518
-
519
- it('27. keeps the page above its floor at ordinary widths', async () => {
520
- const el = await sized(1300);
521
- el.openPanel();
522
- await el.updateComplete;
523
- await settled(el);
524
- expect(el.panelMode).to.equal('docked');
525
- const container = el.shadowRoot!.querySelector('.container')!;
526
- expect(container.getBoundingClientRect().width).to.be.at.least(640);
527
- expect(overflow(el)).to.equal(0);
528
- });
529
-
530
- // Pins the stylesheet defaults to the JS geometry fallbacks so the two copies cannot drift apart.
531
- it('71. the stylesheet defaults still match the JS geometry fallbacks', async () => {
532
- const el = await fixture<NileAppShell>(html`
533
- <nile-app-shell
534
- style="width: 1440px; height: 600px; --nile-spacing-xs: 4px;"
535
- >
536
- <nav slot="side-nav">nav</nav>
537
- <p>page</p>
538
- </nile-app-shell>
539
- `);
540
- await el.updateComplete;
541
- const value = (name: string) =>
542
- parseFloat(getComputedStyle(el).getPropertyValue(name));
543
-
544
- // No theme sheet here, so the nav track falls to its own enterprise-pair literals, which is what _geometry() carries too.
545
- expect(value('--nile-app-shell-side-nav-width')).to.equal(240);
546
- expect(value('--nile-app-shell-side-nav-rail-width')).to.equal(70);
547
- expect(value('--nile-app-shell-gutter')).to.equal(4);
548
- expect(value('--nile-app-shell-content-min-width')).to.equal(640);
549
- expect(value('--nile-app-shell-aside-width')).to.equal(320);
550
- expect(value('--nile-app-shell-panel-width')).to.equal(480);
551
- });
552
-
553
- // The nav track mirrors nile-side-bar's token expressions and resolves per theme.
554
- it('78. resolves the nav track per theme, as nile-side-bar does', async () => {
555
- const track = async (tokens: string) => {
556
- const el = await fixture<NileAppShell>(html`
557
- <nile-app-shell style="width: 1440px; height: 600px; ${tokens}">
558
- <nav slot="side-nav">nav</nav>
559
- <p>page</p>
560
- </nile-app-shell>
561
- `);
562
- await el.updateComplete;
563
- const read = (name: string) =>
564
- parseFloat(getComputedStyle(el).getPropertyValue(name));
565
- return [
566
- read('--nile-app-shell-side-nav-width'),
567
- read('--nile-app-shell-side-nav-rail-width'),
568
- ];
569
- };
570
-
571
- expect(
572
- await track('--nile-width-240px: 240px; --nile-width-70px: 70px;'),
573
- 'enterprise'
574
- ).to.deep.equal([240, 70]);
575
-
576
- expect(
577
- await track('--ng-spacing-296: 296px; --ng-spacing-68: 68px;'),
578
- 'nxtgen'
579
- ).to.deep.equal([296, 68]);
580
- });
581
-
582
- // The nav rails at the row's own theme-dependent width requirement (enterprise 1368, nxtgen 1424), with docked-rail-breakpoint at 0 so the measured value governs.
583
- it('72. rails the nav at the row’s own width requirement, not a gutter early', async () => {
584
- const at = async (width: number, tokens = ENTERPRISE_NAV) => {
585
- const el = await fixture<NileAppShell>(html`
586
- <nile-app-shell
587
- style="width: ${width}px; height: 600px; ${tokens}"
588
- docked-rail-breakpoint="0"
589
- >
590
- <nav slot="side-nav">nav</nav>
591
- <p>page</p>
592
- <div slot="panel">assistant</div>
593
- </nile-app-shell>
594
- `);
595
- await waitUntil(() => el.hasAttribute('has-panel'));
596
- el.openPanel();
597
- await el.updateComplete;
598
- await settled(el);
599
- return el.navLocked;
600
- };
601
-
602
- // Exactly the requirement: the row fits, so the nav keeps its width.
603
- expect(await at(1368)).to.be.false;
604
- // One pixel under: the track is what the row cannot afford.
605
- expect(await at(1367)).to.be.true;
606
- expect(await at(1370)).to.be.false;
607
-
608
- // NxtGen's wider track moves the same boundary up by 56px, following whatever the side bar measures.
609
- expect(await at(1424, NXTGEN_NAV)).to.be.false;
610
- expect(await at(1423, NXTGEN_NAV)).to.be.true;
611
- // And the enterprise boundary is comfortably inside NxtGen's requirement.
612
- expect(await at(1368, NXTGEN_NAV)).to.be.true;
613
- });
614
286
  });
615
287
 
616
288
  // An empty flex item still takes the row's gap, pulling the bar's content short of its padding edge.
617
- describe('NileAppShell — the top bar reaches its padding edge', () => {
618
- it('28. an empty actions group reserves no gap', async () => {
619
- const el = await sized(1440);
620
- // The Ask button lives in that group, so drop it to leave it truly empty.
621
- el.noAsk = true;
622
- await settled(el);
623
- expect(el.hasAttribute('has-top-bar-actions')).to.be.false;
624
- expect(el.hasAttribute('has-ask')).to.be.false;
625
- const bar = el.shadowRoot!.querySelector('.top-bar') as HTMLElement;
626
- const content = el.shadowRoot!.querySelector('.top-bar-content')!;
627
- const padEnd = parseFloat(getComputedStyle(bar).paddingInlineEnd);
628
- const shortfall =
629
- bar.getBoundingClientRect().right - content.getBoundingClientRect().right;
630
- expect(Math.round(shortfall)).to.equal(Math.round(padEnd));
631
- });
632
-
633
- it('29. slotted actions mount the group', async () => {
634
- const el = await fixture<NileAppShell>(html`
635
- <nile-app-shell style="width: 1440px; height: 600px;">
636
- <nav slot="side-nav">nav</nav>
637
- <span slot="top-bar">Title</span>
638
- <button slot="top-bar-actions">Save</button>
639
- <p>page</p>
640
- </nile-app-shell>
641
- `);
642
- await waitUntil(() => el.hasAttribute('has-top-bar-actions'));
643
- const actions = el.shadowRoot!.querySelector('.top-bar-actions')!;
644
- expect(getComputedStyle(actions).display).to.not.equal('none');
645
- expect(actions.getBoundingClientRect().width).to.be.greaterThan(0);
646
- });
647
-
648
- // The rule that separates the nav toggle from the header's content follows both a filled slot and a title block.
649
- it('76. draws the toggle rule for a title block, not just a filled slot', async () => {
650
- const rule = (el: NileAppShell) => part(el, 'rule');
651
-
652
- const slotted = await fixture<NileAppShell>(html`
653
- <nile-app-shell style="width: 1440px; height: 600px;">
654
- <nav slot="side-nav">nav</nav>
655
- <span slot="top-bar">Title</span>
656
- <p>page</p>
657
- </nile-app-shell>
658
- `);
659
- await waitUntil(() => slotted.hasAttribute('has-top-bar'));
660
- expect(rule(slotted)).to.exist;
661
-
662
- // The same heading through pageTitle, top-bar slot empty.
663
- const titled = await fixture<NileAppShell>(html`
664
- <nile-app-shell
665
- style="width: 1440px; height: 600px;"
666
- pageTitle="Applications"
667
- >
668
- <nav slot="side-nav">nav</nav>
669
- <p>page</p>
670
- </nile-app-shell>
671
- `);
672
- await titled.updateComplete;
673
- expect(titled.hasAttribute('has-top-bar')).to.be.true;
674
- expect(rule(titled), 'a title block earns the rule too').to.exist;
675
-
676
- // Neither: the toggle stands alone, so there is nothing to separate.
677
- const bare = await fixture<NileAppShell>(html`
678
- <nile-app-shell style="width: 1440px; height: 600px;">
679
- <nav slot="side-nav">nav</nav>
680
- <p>page</p>
681
- </nile-app-shell>
682
- `);
683
- await bare.updateComplete;
684
- expect(rule(bare)).to.be.null;
685
- });
686
- });
687
289
 
688
290
  // The built-in Ask button turns on whether a panel is mounted for this route and calls openPanel().
689
291
  describe('NileAppShell — the built-in Ask button', () => {
@@ -718,118 +320,6 @@ describe('NileAppShell — the built-in Ask button', () => {
718
320
  expect(ask(el)).to.be.null;
719
321
  });
720
322
 
721
- it('33. takes its label from ask-label', async () => {
722
- const el = await sized(1440);
723
- el.askLabel = 'Ask Aquera';
724
- await el.updateComplete;
725
- expect(ask(el)!.textContent!.trim()).to.equal('Ask Aquera');
726
- });
727
-
728
- it('34. keeps the actions group mounted on its own', async () => {
729
- const el = await sized(1440);
730
- await settled(el);
731
- // Nothing is slotted into top-bar-actions, but the Ask button lives there.
732
- expect(el.hasAttribute('has-top-bar-actions')).to.be.false;
733
- expect(el.hasAttribute('has-ask')).to.be.true;
734
- const actions = el.shadowRoot!.querySelector('.top-bar-actions')!;
735
- expect(getComputedStyle(actions).display).to.not.equal('none');
736
- expect(actions.getBoundingClientRect().width).to.be.greaterThan(0);
737
- });
738
-
739
- // Amendment A (M8): the design's Ask is the secondary button, not the filled primary.
740
- it('34b. renders Ask as the secondary variant', async () => {
741
- const el = await sized(1440);
742
- expect(ask(el)!.getAttribute('variant')).to.equal('secondary');
743
- });
744
-
745
- // Amendment A (M9, M10): app actions, a 16px divider, then Ask, 16px apart; with no app actions, no divider.
746
- it('34c. draws a divider before Ask only when the page slots actions, 16px from both', async () => {
747
- const alone = await sized(1440);
748
- await settled(alone);
749
- expect(part(alone, 'ask-rule')).to.be.null;
750
-
751
- const el = await fixture<NileAppShell>(html`
752
- <nile-app-shell style="width: 1440px; height: 600px; --ng-spacing-xl: 16px;">
753
- <nav slot="side-nav">nav</nav>
754
- <span slot="top-bar">Title</span>
755
- <button slot="top-bar-actions" id="one">One</button>
756
- <button slot="top-bar-actions" id="two">Two</button>
757
- <p>page</p>
758
- <div slot="panel">assistant</div>
759
- </nile-app-shell>
760
- `);
761
- await waitUntil(() => el.hasAttribute('has-top-bar-actions'));
762
- await el.updateComplete;
763
-
764
- const rule = part(el, 'ask-rule')!;
765
- expect(rule).to.exist;
766
- const one = el.querySelector('#one')!.getBoundingClientRect();
767
- const two = el.querySelector('#two')!.getBoundingClientRect();
768
- const ruleBox = rule.getBoundingClientRect();
769
- const askBox = ask(el)!.getBoundingClientRect();
770
-
771
- expect(Math.round(ruleBox.height)).to.equal(16);
772
- expect(Math.round(two.left - one.right)).to.equal(16);
773
- expect(Math.round(ruleBox.left - two.right)).to.equal(16);
774
- expect(Math.round(askBox.left - ruleBox.left)).to.equal(16);
775
-
776
- // Order: the page's actions, the divider, then Ask.
777
- /* eslint-disable-next-line no-bitwise */
778
- const ruleBeforeAsk = rule.compareDocumentPosition(ask(el)!) & Node.DOCUMENT_POSITION_FOLLOWING;
779
- expect(ruleBeforeAsk).to.be.greaterThan(0);
780
-
781
- el.noAsk = true;
782
- await el.updateComplete;
783
- expect(part(el, 'ask-rule'), 'no Ask, no divider').to.be.null;
784
- });
785
-
786
- // The shell draws its icon controls as bare glyphs via ::part(base), overriding nile-button's circle and ghost surface.
787
- const utilityBase = (el: NileAppShell, name: string) =>
788
- part(el, name)!.shadowRoot!.querySelector('[part~="base"]') as HTMLElement;
789
-
790
- it('35. draws its icon controls with no resting surface', async () => {
791
- const el = await sized(1440);
792
- el.openPanel();
793
- await el.updateComplete;
794
-
795
- for (const name of ['nav-toggle', 'panel-close']) {
796
- const base = utilityBase(el, name);
797
- expect(getComputedStyle(base).backgroundColor).to.equal(
798
- 'rgba(0, 0, 0, 0)'
799
- );
800
- }
801
- });
802
-
803
- it('36. sizes its icon controls to the utility box, not the button circle', async () => {
804
- const el = await sized(1440);
805
- el.openPanel();
806
- await el.updateComplete;
807
-
808
- for (const name of ['nav-toggle', 'panel-close']) {
809
- const box = utilityBase(el, name).getBoundingClientRect();
810
- expect(box.width).to.equal(32);
811
- expect(box.height).to.equal(32);
812
- }
813
- });
814
-
815
- it('37. holds the panel back control until panelBack asks for it', async () => {
816
- const el = await sized(1440);
817
- el.openPanel();
818
- await el.updateComplete;
819
- const mark = el.shadowRoot!.querySelector('.panel-mark')!;
820
- // Not rendered at all in the root view, so no stylesheet override can surface it.
821
- expect(part(el, 'panel-back')).to.not.exist;
822
- expect(getComputedStyle(mark).display).to.not.equal('none');
823
-
824
- el.panelBack = true;
825
- await el.updateComplete;
826
- const back = part(el, 'panel-back')!;
827
- expect(back).to.exist;
828
- expect(getComputedStyle(back).display).to.not.equal('none');
829
- // The back control stands where the brand mark stands in the root view.
830
- expect(getComputedStyle(mark).display).to.equal('none');
831
- });
832
-
833
323
  it('38. emits nile-panel-back and takes its label from panelBackLabel', async () => {
834
324
  const el = await sized(1440);
835
325
  el.panelBack = true;
@@ -847,18 +337,6 @@ describe('NileAppShell — the built-in Ask button', () => {
847
337
  expect(el.panelOpen).to.be.true;
848
338
  });
849
339
 
850
- it('81. goBackPanel() emits nile-panel-back, and goBack() stays its alias', async () => {
851
- const el = await sized(1440);
852
-
853
- const named = oneEvent(el, 'nile-panel-back');
854
- el.goBackPanel();
855
- expect(await named).to.exist;
856
-
857
- // Deprecated, but still the same event: existing callers keep working.
858
- const aliased = oneEvent(el, 'nile-panel-back');
859
- el.goBack();
860
- expect(await aliased).to.exist;
861
- });
862
340
  });
863
341
 
864
342
  describe('NileAppShell — the tab strip', () => {
@@ -882,12 +360,6 @@ describe('NileAppShell — the tab strip', () => {
882
360
  const strip = (el: NileAppShell) =>
883
361
  el.shadowRoot!.querySelector('.tabs') as HTMLElement;
884
362
 
885
- it('39. mounts the strip for a filled slot', async () => {
886
- const el = await tabbed();
887
- expect(el.tabsVisible).to.be.true;
888
- expect(getComputedStyle(strip(el)).display).to.not.equal('none');
889
- });
890
-
891
363
  it('40. noTabs hides the strip without emptying the slot', async () => {
892
364
  const el = await tabbed();
893
365
  el.noTabs = true;
@@ -906,116 +378,7 @@ describe('NileAppShell — the tab strip', () => {
906
378
  expect(getComputedStyle(strip(el)).display).to.not.equal('none');
907
379
  });
908
380
 
909
- // has-tabs advertises the visible strip, not the filled slot, matching has-panel and has-ask.
910
- it('68. has-tabs follows the visible strip, not the filled slot', async () => {
911
- // Slotted, not switched off: the strip is up and the flag is on.
912
- const el = await tabbed();
913
- expect(el.tabsVisible).to.be.true;
914
- expect(el.hasAttribute('has-tabs')).to.be.true;
915
-
916
- // Slotted, switched off: the slot stays filled, the flag goes with the strip.
917
- el.noTabs = true;
918
- await el.updateComplete;
919
- expect(el.querySelector('nile-nav-tab-group')).to.exist;
920
- expect(el.hasAttribute('has-tabs')).to.be.false;
921
- expect(getComputedStyle(strip(el)).display).to.equal('none');
922
-
923
- // And back, so the flag is not a one-way latch.
924
- el.noTabs = false;
925
- await el.updateComplete;
926
- expect(el.hasAttribute('has-tabs')).to.be.true;
927
-
928
- // Nothing slotted: no strip, no flag, whatever noTabs says.
929
- const bare = await sized(1440);
930
- await settled(bare);
931
- expect(bare.hasAttribute('has-tabs')).to.be.false;
932
- bare.noTabs = true;
933
- await bare.updateComplete;
934
- expect(bare.hasAttribute('has-tabs')).to.be.false;
935
- });
936
-
937
- it('41. leaves the strip off when the slot is empty', async () => {
938
- const el = await sized(1440);
939
- await settled(el);
940
- expect(el.hasAttribute('has-tabs')).to.be.false;
941
- expect(el.tabsVisible).to.be.false;
942
- });
943
-
944
- it('77. sizes bare slotted tab controls to their labels, not the strip', async () => {
945
- const el = await fixture<NileAppShell>(html`
946
- <nile-app-shell style="width: 1176px; height: 600px; ${HEADER_TOKENS}">
947
- <nav slot="side-nav">nav</nav>
948
- <span slot="top-bar">Title</span>
949
- <button slot="tabs" id="short">A</button>
950
- <button slot="tabs" id="long">A considerably longer tab label</button>
951
- <p>page</p>
952
- </nile-app-shell>
953
- `);
954
- await waitUntil(() => el.hasAttribute('has-tabs'));
955
- await settled(el);
956
-
957
- const short = el.querySelector('#short')!.getBoundingClientRect().width;
958
- const long = el.querySelector('#long')!.getBoundingClientRect().width;
959
- // Stretched, they would be equal; sized to content they are not close.
960
- expect(long).to.be.greaterThan(short * 2);
961
- });
962
-
963
- it('43. leaves the slotted strip one rule, edge to edge', async () => {
964
- const el = await tabbed();
965
- const group = el.querySelector('nile-nav-tab-group') as HTMLElement;
966
- const groupStyle = getComputedStyle(group);
967
-
968
- expect(groupStyle.getPropertyValue('--track-width').trim()).to.equal('0px');
969
- expect(groupStyle.alignSelf).to.equal('flex-end');
970
-
971
- // The region's rule is as wide as the container it closes, padding and all.
972
- const container = el.shadowRoot!.querySelector('.container') as HTMLElement;
973
- const stripWidth = strip(el).getBoundingClientRect().width;
974
- const inner =
975
- container.getBoundingClientRect().width -
976
- parseFloat(getComputedStyle(container).borderLeftWidth) -
977
- parseFloat(getComputedStyle(container).borderRightWidth);
978
- expect(Math.round(stripWidth)).to.equal(Math.round(inner));
979
-
980
- // The group is wholly inside the region, and ends where the rule is.
981
- const strippedBottom = strip(el).getBoundingClientRect().bottom;
982
- const groupBottom = group.getBoundingClientRect().bottom;
983
- expect(strippedBottom - groupBottom).to.be.lessThan(2);
984
- });
985
-
986
- // The Header Bar draws no rule of its own; the one divider belongs to the tab rail, so switching the strip off leaves the header with no rule.
987
- it('42. draws the header rule on the strip only, never on the bar', async () => {
988
- const el = await tabbed();
989
- const bar = el.shadowRoot!.querySelector(
990
- '.container > .top-bar'
991
- ) as HTMLElement;
992
-
993
- expect(parseFloat(getComputedStyle(bar).borderBottomWidth)).to.equal(0);
994
- expect(
995
- parseFloat(getComputedStyle(strip(el)).borderBottomWidth)
996
- ).to.be.greaterThan(0);
997
- expect(getComputedStyle(strip(el)).borderBottomColor).to.not.equal(
998
- 'rgba(0, 0, 0, 0)'
999
- );
1000
-
1001
- // No tabs, no rule anywhere in the header block.
1002
- el.noTabs = true;
1003
- await el.updateComplete;
1004
- expect(parseFloat(getComputedStyle(bar).borderBottomWidth)).to.equal(0);
1005
- });
1006
-
1007
- // The bar and the strip sit flush, with the stroke as the separation, not space.
1008
- it('62. leaves no vertical gap between the bar and the strip', async () => {
1009
- const el = await tabbed();
1010
- const bar = el.shadowRoot!.querySelector(
1011
- '.container > .top-bar'
1012
- ) as HTMLElement;
1013
- const gap =
1014
- strip(el).getBoundingClientRect().top -
1015
- bar.getBoundingClientRect().bottom;
1016
- expect(Math.abs(gap)).to.be.lessThan(0.5);
1017
- });
1018
- });
381
+ });
1019
382
 
1020
383
  // The test page loads no theme sheet, so the header fixtures carry the nxtgen token values the title block and tab row read.
1021
384
  const HEADER_TOKENS = [
@@ -1029,6 +392,7 @@ const HEADER_TOKENS = [
1029
392
  '--ng-spacing-lg: 12px',
1030
393
  '--ng-spacing-xl: 16px',
1031
394
  '--ng-spacing-3xl: 24px',
395
+ '--ng-height-36px: 36px',
1032
396
  '--ng-font-size-text-xs: 12px',
1033
397
  '--ng-line-height-text-xs: 18px',
1034
398
  '--ng-font-size-text-sm: 14px',
@@ -1092,61 +456,6 @@ const header = async (axes: HeaderAxes = {}) => {
1092
456
 
1093
457
  // The header title block: the shell's own heading, the Leading axis, the badge and the description line.
1094
458
  describe('NileAppShell — the header title block', () => {
1095
- it('44. draws no title block at all until an axis asks for one', async () => {
1096
- const el = await header();
1097
- expect(el.headerBack).to.be.false;
1098
- expect(el.hasAttribute('has-app-icon')).to.be.false;
1099
- expect(part(el, 'title-area')).to.be.null;
1100
- expect(part(el, 'page-title')).to.be.null;
1101
- expect(part(el, 'description')).to.be.null;
1102
- expect(part(el, 'badge')).to.be.null;
1103
- expect(el.hasAttribute('has-description')).to.be.false;
1104
- });
1105
-
1106
- // description and badge are modifiers on the page title, so neither mounts the title block by itself.
1107
- it('73. does not mount a title block for a description or badge alone', async () => {
1108
- for (const axes of [
1109
- { description: 'Manage the apps connected to this tenant' },
1110
- { badge: '94 apps' },
1111
- { description: 'Manage the apps', badge: '94 apps' },
1112
- ]) {
1113
- const el = await header(axes);
1114
- const label = JSON.stringify(axes);
1115
-
1116
- expect(part(el, 'title-area'), label).to.be.null;
1117
- expect(part(el, 'description'), label).to.be.null;
1118
- expect(part(el, 'badge'), label).to.be.null;
1119
- // And no height is reserved for the line that cannot render.
1120
- expect(el.hasAttribute('has-description'), label).to.be.false;
1121
- }
1122
- });
1123
-
1124
- it('74. brings both back as soon as there is a title to hang them on', async () => {
1125
- const el = await header({
1126
- description: 'Manage the apps connected to this tenant',
1127
- badge: '94 apps',
1128
- });
1129
- expect(part(el, 'title-area')).to.be.null;
1130
-
1131
- el.pageTitle = 'Applications';
1132
- await el.updateComplete;
1133
-
1134
- expect(part(el, 'title-area')).to.exist;
1135
- expect(part(el, 'description')).to.exist;
1136
- expect(part(el, 'badge')).to.exist;
1137
- expect(el.hasAttribute('has-description')).to.be.true;
1138
- });
1139
-
1140
- // The back arrow is the exception: it stands on its own but brings no empty title stack.
1141
- it('75. mounts the back arrow on its own, without an empty title stack', async () => {
1142
- const el = await header({ leading: 'back' });
1143
-
1144
- expect(part(el, 'title-area')).to.exist;
1145
- expect(part(el, 'back')).to.exist;
1146
- expect(part(el, 'page-title')).to.be.null;
1147
- expect(el.shadowRoot!.querySelector('.title-stack')).to.be.null;
1148
- expect(el.shadowRoot!.querySelector('.title-row')).to.be.null;
1149
- });
1150
459
 
1151
460
  it('45. renders pageTitle as the header’s own heading', async () => {
1152
461
  const el = await header({ pageTitle: 'Applications' });
@@ -1180,78 +489,6 @@ describe('NileAppShell — the header title block', () => {
1180
489
  expect(part(marked, 'page-title')!.getAttribute('aria-level')).to.equal('3');
1181
490
  });
1182
491
 
1183
- it('80. clamps an invalid heading level to a safe aria-level', async () => {
1184
- const el = await header({ pageTitle: 'Applications' });
1185
- const cases: [unknown, string][] = [
1186
- [0, '1'],
1187
- [-3, '1'],
1188
- [7, '6'],
1189
- [2.7, '2'],
1190
- [NaN, '1'],
1191
- ['abc', '1'],
1192
- [undefined, '1'],
1193
- ];
1194
- for (const [value, expected] of cases) {
1195
- (el as unknown as { headingLevel: unknown }).headingLevel = value;
1196
- await el.updateComplete;
1197
- expect(
1198
- part(el, 'page-title')!.getAttribute('aria-level'),
1199
- String(value)
1200
- ).to.equal(expected);
1201
- }
1202
-
1203
- // From markup too: a non-numeric attribute still leaves a level-1 heading.
1204
- const marked = await fixture<NileAppShell>(html`
1205
- <nile-app-shell pageTitle="Applications" headingLevel="nope">
1206
- <p>page</p>
1207
- </nile-app-shell>
1208
- `);
1209
- await marked.updateComplete;
1210
- expect(part(marked, 'page-title')!.getAttribute('aria-level')).to.equal('1');
1211
- expect(part(marked, 'page-title')!.textContent!.trim()).to.equal(
1212
- 'Applications'
1213
- );
1214
- });
1215
-
1216
- // The title block renders before the top-bar slot, so a page slotting its own title keeps its output.
1217
- it('46. renders the block before whatever the page slots into top-bar', async () => {
1218
- const el = await fixture<NileAppShell>(html`
1219
- <nile-app-shell style="width: 1176px; height: 800px;" pageTitle="Apps">
1220
- <nav slot="side-nav">nav</nav>
1221
- <span slot="top-bar" id="own">the page’s own bar</span>
1222
- <p>page</p>
1223
- </nile-app-shell>
1224
- `);
1225
- await el.updateComplete;
1226
-
1227
- const area = part(el, 'title-area')!;
1228
- const slot = el.shadowRoot!.querySelector(
1229
- 'slot[name="top-bar"]'
1230
- ) as HTMLElement;
1231
- expect(el.querySelector('#own')!.assignedSlot).to.equal(slot);
1232
- /* eslint-disable-next-line no-bitwise */
1233
- const areaIsFirst =
1234
- area.compareDocumentPosition(slot) & Node.DOCUMENT_POSITION_FOLLOWING;
1235
- expect(areaIsFirst).to.be.greaterThan(0);
1236
- });
1237
-
1238
- it('47. mounts the top bar for a title block on its own', async () => {
1239
- const el = await fixture<NileAppShell>(html`
1240
- <nile-app-shell
1241
- style="width: 1176px; height: 800px;"
1242
- pageTitle="Applications"
1243
- no-nav-toggle
1244
- >
1245
- <p>page</p>
1246
- </nile-app-shell>
1247
- `);
1248
- await el.updateComplete;
1249
- // Nothing is slotted anywhere, and there is no nav toggle to mount it.
1250
- expect(el.hasAttribute('has-side-nav')).to.be.false;
1251
- expect(el.hasAttribute('has-top-bar')).to.be.true;
1252
- expect(part(el, 'page-title')).to.exist;
1253
- });
1254
-
1255
492
  it('48. renders a badge after the title, and only when set', async () => {
1256
493
  const plain = await header({ pageTitle: 'Applications' });
1257
494
  expect(part(plain, 'badge')).to.be.null;
@@ -1267,89 +504,6 @@ describe('NileAppShell — the header title block', () => {
1267
504
  expect(titleIsFirst).to.be.greaterThan(0);
1268
505
  });
1269
506
 
1270
- // The badge's surface tokens must resolve on both the enterprise and nxtgen sheets, so each test pins one sheet on its own.
1271
- const badged = (tokens: string) =>
1272
- fixture<NileAppShell>(html`
1273
- <nile-app-shell
1274
- style="width: 1176px; height: 800px; ${tokens}"
1275
- pageTitle="Applications"
1276
- badge="Beta"
1277
- >
1278
- <nav slot="side-nav">nav</nav>
1279
- <p>page</p>
1280
- </nile-app-shell>
1281
- `);
1282
-
1283
- it('69. resolves the badge on the enterprise sheet alone', async () => {
1284
- const el = await badged(
1285
- [
1286
- '--nile-border-width-1: 1px',
1287
- '--nile-colors-neutral-100: #FAFAFA',
1288
- '--nile-colors-neutral-400: #E6E9EB',
1289
- '--nile-colors-dark-500: #636363',
1290
- // The ink the badge must not fall back to by inheriting the title's.
1291
- '--nile-colors-dark-900: #000000',
1292
- ].join('; ')
1293
- );
1294
- const style = getComputedStyle(part(el, 'badge')!);
1295
-
1296
- expect(style.backgroundColor).to.equal('rgb(250, 250, 250)');
1297
- expect(style.borderTopColor).to.equal('rgb(230, 233, 235)');
1298
- expect(style.borderTopWidth).to.equal('1px');
1299
- expect(style.color).to.equal('rgb(99, 99, 99)');
1300
- });
1301
-
1302
- it('70. resolves the badge on the nxtgen sheet alone', async () => {
1303
- const el = await badged(
1304
- [
1305
- '--ng-border-width-1: 1px',
1306
- '--ng-componentcolors-utility-gray-50: #FAFAFAFF',
1307
- '--ng-componentcolors-utility-gray-200: #E9EAEBFF',
1308
- '--ng-componentcolors-utility-gray-700: #414651FF',
1309
- '--ng-colors-text-primary-900: #181D27FF',
1310
- ].join('; ')
1311
- );
1312
- const style = getComputedStyle(part(el, 'badge')!);
1313
-
1314
- expect(style.backgroundColor).to.equal('rgb(250, 250, 250)');
1315
- expect(style.borderTopColor).to.equal('rgb(233, 234, 235)');
1316
- expect(style.borderTopWidth).to.equal('1px');
1317
- expect(style.color).to.equal('rgb(65, 70, 81)');
1318
- });
1319
-
1320
- it('49. renders a description line, and reserves nothing without one', async () => {
1321
- const off = await header({ pageTitle: 'Applications' });
1322
- expect(off.hasAttribute('has-description')).to.be.false;
1323
- expect(part(off, 'description')).to.be.null;
1324
-
1325
- const el = await header({
1326
- pageTitle: 'Applications',
1327
- description: 'Manage the apps connected to this tenant',
1328
- });
1329
- const line = part(el, 'description')!;
1330
- expect(el.hasAttribute('has-description')).to.be.true;
1331
- expect(line).to.exist;
1332
- expect(line.textContent!.trim()).to.equal(
1333
- 'Manage the apps connected to this tenant'
1334
- );
1335
-
1336
- // Clearing the string takes the axis back off.
1337
- el.description = '';
1338
- await el.updateComplete;
1339
- expect(el.hasAttribute('has-description')).to.be.false;
1340
- expect(part(el, 'description')).to.be.null;
1341
- });
1342
-
1343
- it('50. headerBack defaults to false and draws no arrow, and no slotted icon draws no icon', async () => {
1344
- const el = await header({ pageTitle: 'Applications' });
1345
- expect(el.headerBack).to.be.false;
1346
- expect(el.hasAttribute('headerback')).to.be.false;
1347
- expect(part(el, 'back')).to.be.null;
1348
- expect(el.hasAttribute('has-app-icon')).to.be.false;
1349
- expect(getComputedStyle(part(el, 'app-icon')!).display).to.equal('none');
1350
- expect(el.shadowRoot!.querySelector('.crumb-divider')).to.be.null;
1351
- });
1352
-
1353
507
  // Amendment A: the back control is the arrow alone, with no previous-page label and no slash.
1354
508
  it('51. headerBack draws the narrow-left arrow only, then the title', async () => {
1355
509
  const el = await header({ pageTitle: 'Applications', leading: 'back' });
@@ -1378,38 +532,12 @@ describe('NileAppShell — the header title block', () => {
1378
532
  expect(back.getBoundingClientRect().width).to.be.greaterThan(0);
1379
533
  });
1380
534
 
1381
- // camelCase property, attribute: true + reflect: true — the title-block pattern.
1382
- it('51b. headerBack and headerBackLabel work from markup and reflect to their attributes', async () => {
1383
- const marked = await fixture<NileAppShell>(html`
1384
- <nile-app-shell pageTitle="Applications" headerBack headerBackLabel="Retour">
1385
- <p>page</p>
1386
- </nile-app-shell>
1387
- `);
1388
- await marked.updateComplete;
1389
- expect(marked.headerBack).to.be.true;
1390
- expect(marked.headerBackLabel).to.equal('Retour');
1391
- expect(part(marked, 'back')).to.exist;
1392
-
1393
- const el = await header({ pageTitle: 'Applications' });
1394
- el.headerBack = true;
1395
- el.headerBackLabel = 'Go back';
1396
- await el.updateComplete;
1397
- expect(el.hasAttribute('headerback')).to.be.true;
1398
- expect(el.getAttribute('headerbacklabel')).to.equal('Go back');
1399
- expect(part(el, 'back')).to.exist;
1400
-
1401
- el.headerBack = false;
1402
- await el.updateComplete;
1403
- expect(el.hasAttribute('headerback')).to.be.false;
1404
- expect(part(el, 'back')).to.be.null;
1405
- });
1406
-
1407
535
  // headerBackLabel names the control for assistive tech and is never drawn as text.
1408
536
  it('52. headerBackLabel is the accessible name only, never visible text', async () => {
1409
537
  const el = await header({ pageTitle: 'Applications', leading: 'back' });
1410
538
  const back = part(el, 'back')!;
1411
539
  expect(back.getAttribute('aria-label')).to.equal('Back');
1412
- expect(back.getAttribute('title')).to.equal('Back');
540
+ expect((back.closest('nile-lite-tooltip') as HTMLElement & { content: string }).content).to.equal('Back');
1413
541
  expect(back.querySelector('nile-glyph')!.getAttribute('aria-hidden')).to.not.equal('false');
1414
542
 
1415
543
  el.headerBackLabel = 'Integrations';
@@ -1451,262 +579,6 @@ describe('NileAppShell — the header title block', () => {
1451
579
  expect(el.panelOpen).to.be.false;
1452
580
  });
1453
581
 
1454
- // A nile-click bubbling up from page content must not read as the header back press.
1455
- it('53b. a nile-click from slotted content is distinguishable by its target', async () => {
1456
- const el = await header({ pageTitle: 'Applications', leading: 'back' });
1457
- const page = el.querySelector('p')!;
1458
- const seen: EventTarget[] = [];
1459
- el.addEventListener('nile-click', e => seen.push(e.target!));
1460
- page.dispatchEvent(
1461
- new CustomEvent('nile-click', {
1462
- bubbles: true,
1463
- composed: true,
1464
- detail: { value: 'back' },
1465
- })
1466
- );
1467
- (part(el, 'back') as HTMLButtonElement).click();
1468
- expect(seen).to.deep.equal([page, el]);
1469
- });
1470
-
1471
- // The four combinations are independent; with an app icon the description sits under the icon, otherwise under the title.
1472
- it('63. aligns the description under the app icon when there is one, else the title', async () => {
1473
- for (const leading of LEADINGS) {
1474
- const el = await header({
1475
- pageTitle: 'Applications',
1476
- description: 'Manage the apps connected to this tenant',
1477
- leading,
1478
- });
1479
-
1480
- const anchor = hasIcon(leading) ? part(el, 'app-icon')! : part(el, 'page-title')!;
1481
- const description = part(el, 'description')!.getBoundingClientRect();
1482
- expect(Math.round(description.left), leading).to.equal(
1483
- Math.round(anchor.getBoundingClientRect().left)
1484
- );
1485
- }
1486
- });
1487
-
1488
- // The arrow sits beside the stack; the app icon is the first thing in the title row.
1489
- it('64. renders the arrow beside the title stack and the app icon inside the title row', async () => {
1490
- for (const leading of LEADINGS) {
1491
- const el = await header({ pageTitle: 'Applications', leading });
1492
- const row = el.shadowRoot!.querySelector('.title-row') as HTMLElement;
1493
- const area = part(el, 'title-area')!;
1494
- const back = part(el, 'back');
1495
- const icon = part(el, 'app-icon')!;
1496
-
1497
- expect(!!back, `${leading} back`).to.equal(hasBack(leading));
1498
- expect(el.hasAttribute('has-app-icon'), `${leading} icon`).to.equal(hasIcon(leading));
1499
- if (back) {
1500
- expect(row.contains(back), leading).to.be.false;
1501
- expect(area.contains(back), leading).to.be.true;
1502
- }
1503
- expect(row.contains(icon), leading).to.be.true;
1504
- if (hasIcon(leading)) {
1505
- expect(row.firstElementChild, leading).to.equal(icon);
1506
- }
1507
- }
1508
- });
1509
-
1510
- // The arrow sits on the title's row, and its offset does not move when a description appears.
1511
- it('65. sits the back arrow on the title row, description or not', async () => {
1512
- for (const leading of ['back', 'back+app-icon'] as const) {
1513
- for (const description of ['', 'Manage the apps connected here']) {
1514
- const el = await header({
1515
- pageTitle: 'Applications',
1516
- leading,
1517
- description,
1518
- });
1519
-
1520
- const title = part(el, 'page-title')!.getBoundingClientRect();
1521
- const box = el.shadowRoot!.querySelector('.back-line') as HTMLElement;
1522
- const label = `${leading} description=${!!description}`;
1523
-
1524
- // The line box is the title's own, and it starts where the title does.
1525
- expect(Math.round(box.getBoundingClientRect().top), label).to.equal(
1526
- Math.round(title.top)
1527
- );
1528
- expect(Math.round(box.getBoundingClientRect().height), label).to.equal(
1529
- 24
1530
- );
1531
- }
1532
- }
1533
- });
1534
-
1535
- // Figma Title Area: arrow → 16px → [icon → 8px → title]; Breadcrumb / 01: toggle glyph → 16px → divider (16px tall) → 16px.
1536
- it('65b. spaces the toggle, divider, arrow, icon and title as the design does', async () => {
1537
- const el = await header({ pageTitle: 'Applications', leading: 'back+app-icon' });
1538
- const toggle = part(el, 'nav-toggle')!;
1539
- const glyph = toggle.querySelector('nile-glyph') ?? toggle;
1540
- const rule = part(el, 'rule')!.getBoundingClientRect();
1541
- const backGlyph = part(el, 'back')!.querySelector('nile-glyph')!.getBoundingClientRect();
1542
- const icon = part(el, 'app-icon')!.getBoundingClientRect();
1543
- const title = part(el, 'page-title')!.getBoundingClientRect();
1544
- const toggleGlyph = glyph.getBoundingClientRect();
1545
-
1546
- expect(Math.round(rule.height)).to.equal(16);
1547
- expect(Math.round(rule.left - toggleGlyph.right)).to.equal(16);
1548
- expect(Math.round(backGlyph.left - rule.left)).to.equal(16);
1549
- expect(Math.round(backGlyph.width)).to.equal(20);
1550
- expect(Math.round(icon.left - backGlyph.right)).to.equal(16);
1551
- expect(Math.round(title.left - icon.right)).to.equal(8);
1552
-
1553
- // Without an icon the title takes the icon's place, 16px after the arrow.
1554
- const plain = await header({ pageTitle: 'Applications', leading: 'back' });
1555
- const plainArrow = part(plain, 'back')!.querySelector('nile-glyph')!.getBoundingClientRect();
1556
- const plainTitle = part(plain, 'page-title')!.getBoundingClientRect();
1557
- expect(Math.round(plainTitle.left - plainArrow.right)).to.equal(16);
1558
- });
1559
-
1560
- // The app-icon slot works with or without headerBack, and with or without a title.
1561
- it('65c. shows a slotted app icon independently of headerBack', async () => {
1562
- const iconOnly = await header({ pageTitle: 'Applications', leading: 'app-icon' });
1563
- expect(part(iconOnly, 'back')).to.be.null;
1564
- expect(part(iconOnly, 'app-icon')!.getBoundingClientRect().width).to.equal(20);
1565
-
1566
- // An icon on its own still mounts the title block.
1567
- const bare = await fixture<NileAppShell>(html`
1568
- <nile-app-shell style="width: 1176px; height: 800px; ${HEADER_TOKENS}">
1569
- <nav slot="side-nav">nav</nav>
1570
- <span slot="app-icon" id="mark">A</span>
1571
- <p>page</p>
1572
- </nile-app-shell>
1573
- `);
1574
- await waitUntil(() => bare.hasAttribute('has-app-icon'));
1575
- await bare.updateComplete;
1576
- expect(part(bare, 'title-area')).to.exist;
1577
- expect(part(bare, 'app-icon')!.getBoundingClientRect().width).to.equal(20);
1578
-
1579
- // Removing the mark takes the icon (and the block it alone mounted) away again.
1580
- bare.querySelector('#mark')!.remove();
1581
- await waitUntil(() => !bare.hasAttribute('has-app-icon'));
1582
- await bare.updateComplete;
1583
- expect(part(bare, 'title-area')).to.be.null;
1584
- });
1585
-
1586
- // Amendment A (M11): the inactive tab colour is scoped to the shell's strip; a standalone group keeps its defaults.
1587
- it('65e. colours the inactive header tabs through the shell only', async () => {
1588
- const colours = [
1589
- '--ng-colors-fg-brand-primary-alt: rgb(21, 94, 239)',
1590
- '--ng-colors-text-brand-secondary-700: rgb(0, 78, 235)',
1591
- '--ng-colors-text-quaternary-500: rgb(113, 118, 128)',
1592
- '--ng-colors-text-secondary-700: rgb(65, 70, 81)',
1593
- ].join('; ');
1594
- const el = await header({ pageTitle: 'Applications', tabs: true });
1595
- el.setAttribute('style', `${el.getAttribute('style')}; ${colours}`);
1596
- await el.updateComplete;
1597
-
1598
- const group = el.querySelector('nile-nav-tab-group') as HTMLElement;
1599
- const inactive = el.querySelectorAll('nile-nav-tab')[1] as HTMLElement;
1600
- // Known limitation (M12, A-7): the shell sets no indicator colour, because nile-nav-tab-group's top indicator
1601
- // hard-codes its token in its own shadow tree; the indicator keeps the group's default.
1602
- const indicatorOf = (g: HTMLElement) =>
1603
- getComputedStyle(g.shadowRoot!.querySelector('.nav-tab-group__indicator') as HTMLElement)
1604
- .borderBottomColor;
1605
- expect(indicatorOf(group)).to.equal('rgb(0, 78, 235)');
1606
- // The inactive label is remapped inside the shell only: nile-nav-tab itself is unchanged and still paints
1607
- // var(--nile-colors-dark-500, var(--ng-colors-text-secondary-700)); the shell points that fallback token at quaternary-500.
1608
- // (The painted ink sits inside nile-link, which this runner does not render; it is checked in the browser instead.)
1609
- const secondaryOf = (node: HTMLElement) =>
1610
- getComputedStyle(node).getPropertyValue('--ng-colors-text-secondary-700').trim();
1611
- expect(secondaryOf(inactive)).to.equal('rgb(113, 118, 128)');
1612
- type Sheets = { cssText: string } | { cssText: string }[];
1613
- const sheets = (customElements.get('nile-nav-tab') as unknown as { styles: Sheets }).styles;
1614
- const tabStyles = ([] as { cssText: string }[]).concat(sheets).map(sheet => sheet.cssText).join('\n');
1615
- expect(tabStyles).to.include(
1616
- 'color: var(--nile-colors-dark-500, var(--ng-colors-text-secondary-700));'
1617
- );
1618
- expect(tabStyles, 'no new hook on the shared component').to.not.include('--nile-nav-tab-text-color:');
1619
- // Nothing else in the shell's tree is remapped.
1620
- expect(secondaryOf(el)).to.equal('rgb(65, 70, 81)');
1621
-
1622
- // Outside the shell nothing changes.
1623
- const standalone = await fixture<HTMLElement>(html`
1624
- <nile-nav-tab-group style="${colours}">
1625
- <nile-nav-tab slot="nav" panel="apps" active>Connected</nile-nav-tab>
1626
- <nile-nav-tab slot="nav" panel="approvals">Approvals</nile-nav-tab>
1627
- </nile-nav-tab-group>
1628
- `);
1629
- const loneTab = standalone.querySelectorAll('nile-nav-tab')[1] as HTMLElement;
1630
- expect(secondaryOf(loneTab), 'the global default is untouched').to.equal('rgb(65, 70, 81)');
1631
- await (standalone as unknown as { updateComplete: Promise<unknown> }).updateComplete;
1632
- expect(indicatorOf(standalone), 'a standalone group paints its own default').to.equal(
1633
- 'rgb(0, 78, 235)'
1634
- );
1635
- });
1636
-
1637
- it('65d. colours the description text-quaternary-500', async () => {
1638
- const el = await header({
1639
- pageTitle: 'Applications',
1640
- description: 'Manage the apps connected here',
1641
- });
1642
- el.style.setProperty('--ng-colors-text-quaternary-500', 'rgb(113, 118, 128)');
1643
- el.style.setProperty('--ng-colors-text-tertiary-600', 'rgb(1, 2, 3)');
1644
- expect(getComputedStyle(part(el, 'description')!).color).to.equal(
1645
- 'rgb(113, 118, 128)'
1646
- );
1647
- });
1648
-
1649
- it('66. centres a 20px app icon in the 24px title row, two pixels down', async () => {
1650
- const el = await header({
1651
- pageTitle: 'Applications',
1652
- leading: 'app-icon',
1653
- description: 'Manage the apps connected here',
1654
- });
1655
-
1656
- const title = part(el, 'page-title')!.getBoundingClientRect();
1657
- const icon = part(el, 'app-icon')!.getBoundingClientRect();
1658
- // (24 - 20) / 2 — structural, not an offset written anywhere.
1659
- expect(Math.round(icon.top - title.top)).to.equal(2);
1660
- });
1661
-
1662
- // The app icon is sized apart from the utility controls, so retuning one cannot move the other.
1663
- it('67. sizes the app icon independently of the utility controls', async () => {
1664
- const el = await header({ pageTitle: 'Applications', leading: 'app-icon' });
1665
- const host = getComputedStyle(el);
1666
-
1667
- expect(host.getPropertyValue('--nile-app-shell-app-icon-size').trim()).to.equal(
1668
- '20px'
1669
- );
1670
- expect(host.getPropertyValue('--nile-app-shell-utility-size').trim()).to.equal(
1671
- '32px'
1672
- );
1673
-
1674
- el.style.setProperty('--nile-app-shell-app-icon-size', '28px');
1675
- await el.updateComplete;
1676
- expect(part(el, 'app-icon')!.getBoundingClientRect().width).to.equal(28);
1677
- // The nav toggle is untouched by that.
1678
- const toggle = part(el, 'nav-toggle')!;
1679
- const base = toggle.shadowRoot!.querySelector(
1680
- '[part~="base"]'
1681
- ) as HTMLElement;
1682
- expect(base.getBoundingClientRect().width).to.equal(32);
1683
- });
1684
-
1685
- it('54. a slotted app icon draws a 20px block around the mark', async () => {
1686
- const el = await header({ pageTitle: 'Applications', leading: 'app-icon' });
1687
- const box = part(el, 'app-icon')!;
1688
- expect(box).to.exist;
1689
- expect(part(el, 'back')).to.be.null;
1690
-
1691
- const rect = box.getBoundingClientRect();
1692
- // Its own size, not the 32px utility control box the nav toggle uses.
1693
- expect(rect.width).to.equal(20);
1694
- expect(rect.height).to.equal(20);
1695
-
1696
- // The page's mark is assigned into the shell's box.
1697
- const slot = box.querySelector('slot[name="app-icon"]') as HTMLSlotElement;
1698
- expect(slot).to.exist;
1699
- expect(slot.assignedElements()).to.deep.equal([
1700
- el.querySelector('#mark') as Element,
1701
- ]);
1702
-
1703
- // The block sits before the title, not after it.
1704
- /* eslint-disable-next-line no-bitwise */
1705
- const boxIsFirst =
1706
- box.compareDocumentPosition(part(el, 'page-title')!) &
1707
- Node.DOCUMENT_POSITION_FOLLOWING;
1708
- expect(boxIsFirst).to.be.greaterThan(0);
1709
- });
1710
582
  });
1711
583
 
1712
584
  // The four header heights are viewport-height sensitive, so these tests set a viewport where the spec numbers apply.
@@ -1737,53 +609,6 @@ describe('NileAppShell — the four header heights', () => {
1737
609
  return bottom - top;
1738
610
  };
1739
611
 
1740
- it('55. is 68px with neither axis on, whatever the leading', async () => {
1741
- for (const leading of LEADINGS) {
1742
- const el = await header({ pageTitle: 'Applications', leading });
1743
- expect(bar(el).getBoundingClientRect().height, leading).to.equal(68);
1744
- // The leading axis changes what is in the bar, never how tall it is.
1745
- const area = part(el, 'title-area')!.getBoundingClientRect().height;
1746
- expect(area, leading).to.be.at.most(bar(el).clientHeight);
1747
- }
1748
- });
1749
-
1750
- // A description adds its own line (24 title + 2 gap + 18 description = 44) in a 76px bar; asserted as the lines' own boxes.
1751
- it('56. is 76px with a description, and the second line fits it', async () => {
1752
- const el = await header({
1753
- pageTitle: 'Applications',
1754
- description: 'Manage the apps connected to this tenant',
1755
- });
1756
-
1757
- expect(bar(el).getBoundingClientRect().height).to.equal(76);
1758
-
1759
- const stack = el.shadowRoot!.querySelector('.title-stack') as HTMLElement;
1760
- expect(part(el, 'page-title')!.getBoundingClientRect().height).to.equal(24);
1761
- expect(part(el, 'description')!.getBoundingClientRect().height).to.equal(
1762
- 18
1763
- );
1764
- expect(stack.getBoundingClientRect().height).to.equal(44);
1765
-
1766
- // Nothing is clipped: the stack sits wholly inside the bar's box.
1767
- const barBox = bar(el).getBoundingClientRect();
1768
- const stackBox = stack.getBoundingClientRect();
1769
- expect(stackBox.top).to.be.at.least(barBox.top);
1770
- expect(stackBox.bottom).to.be.at.most(barBox.bottom);
1771
- });
1772
-
1773
- it('57. adds a 33px strip for tabs: 101px, and 109px with a description', async () => {
1774
- const tabbed = await header({ pageTitle: 'Applications', tabs: true });
1775
- expect(strip(tabbed).getBoundingClientRect().height).to.equal(33);
1776
- expect(headerBlock(tabbed)).to.equal(101);
1777
-
1778
- const described = await header({
1779
- pageTitle: 'Applications',
1780
- description: 'Manage the apps connected to this tenant',
1781
- tabs: true,
1782
- });
1783
- expect(strip(described).getBoundingClientRect().height).to.equal(33);
1784
- expect(headerBlock(described)).to.equal(109);
1785
- });
1786
-
1787
612
  // The three axes are independent, so all twelve combinations land on one of the four heights.
1788
613
  it('58. resolves every variant to exactly the four heights', async () => {
1789
614
  for (const leading of LEADINGS) {
@@ -1805,66 +630,346 @@ describe('NileAppShell — the four header heights', () => {
1805
630
  });
1806
631
 
1807
632
  // The strip is a control row plus its rule; the row shrinks to fit via the group's own padding hook, staying shorter than the standalone group.
1808
- it('59. shrinks the slotted tab row to fit the strip, rather than crop it', async () => {
1809
- const el = await header({ pageTitle: 'Applications', tabs: true });
1810
- const standalone = await fixture<HTMLElement>(html`
1811
- <nile-nav-tab-group style="${HEADER_TOKENS}">
633
+ it('62b. is not a fixed height: a tall slotted description grows the bar, unclipped, and moves the tabs and page down', async () => {
634
+ const make = async (tall: boolean) => {
635
+ const el = await fixture<NileAppShell>(html`
636
+ <nile-app-shell style="width: 1176px; height: 900px; ${HEADER_TOKENS}" .pageTitle=${'Applications'}>
637
+ <nav slot="side-nav">nav</nav>
638
+ ${tall
639
+ ? html`<div slot="description" id="desc" style="height: 120px">Multi-line description</div>`
640
+ : html`<span slot="description" id="desc">Manage apps</span>`}
641
+ <nile-nav-tab-group slot="tabs">
1812
642
  <nile-nav-tab slot="nav" panel="apps" active>Connected</nile-nav-tab>
1813
- <nile-nav-tab slot="nav" panel="approvals">Approvals</nile-nav-tab>
1814
643
  </nile-nav-tab-group>
644
+ <p>page</p>
645
+ </nile-app-shell>
1815
646
  `);
647
+ await waitUntil(() => el.hasAttribute('has-tabs') && el.hasAttribute('has-description'));
648
+ await el.updateComplete;
649
+ return el;
650
+ };
651
+ const normal = await make(false);
652
+ const tall = await make(true);
1816
653
 
1817
- const stripBox = strip(el).getBoundingClientRect();
1818
- const slottedRow = (
1819
- el.querySelector('nile-nav-tab-group') as HTMLElement
1820
- ).getBoundingClientRect();
1821
- const loneRow = standalone.getBoundingClientRect();
1822
-
1823
- // The design's row: 0 + 20px label + 12px = 32, in a 33px strip.
1824
- expect(slottedRow.height).to.equal(32);
1825
- expect(stripBox.height).to.equal(33);
654
+ expect(bar(normal).getBoundingClientRect().height).to.equal(76);
655
+ const grown = bar(tall).getBoundingClientRect();
656
+ expect(grown.height, 'one 120px slot: 16 + 24 + 2 + 120 + 16').to.equal(178);
1826
657
 
1827
- // The shell's hook is load-bearing: the same group is taller on its own.
1828
- expect(loneRow.height).to.be.greaterThan(slottedRow.height);
1829
- expect(loneRow.height).to.be.greaterThan(stripBox.height);
658
+ const desc = (tall.querySelector('#desc') as HTMLElement).getBoundingClientRect();
659
+ expect(desc.height, 'the slot keeps its own height, uncropped').to.equal(120);
660
+ expect(grown.bottom - desc.bottom, 'bottom padding intact').to.equal(16);
661
+ const title = part(tall, 'page-title')!.getBoundingClientRect();
662
+ expect(title.top - grown.top, 'top padding intact').to.equal(16);
1830
663
 
1831
- // Nothing is cropped and there is no slack: the row fills the strip above the rule it sits on.
1832
- expect(slottedRow.top).to.be.at.least(stripBox.top);
1833
- expect(slottedRow.bottom).to.be.at.most(stripBox.bottom);
1834
- expect(slottedRow.top - stripBox.top).to.equal(0);
664
+ expect(strip(tall).getBoundingClientRect().top, 'tabs sit directly under the grown bar').to.equal(grown.bottom);
665
+ const main = tall.shadowRoot!.querySelector('.main') as HTMLElement;
666
+ expect(main.getBoundingClientRect().top).to.be.at.least(strip(tall).getBoundingClientRect().bottom);
667
+ expect(headerBlock(tall) - headerBlock(normal)).to.equal(178 - 76);
1835
668
  });
1836
669
 
1837
- it('60. drives the row through the group’s own padding hook', async () => {
670
+ it('60b. draws one rule under the tabs: the strip\'s, with the group\'s own track at zero height', async () => {
1838
671
  const el = await header({ pageTitle: 'Applications', tabs: true });
1839
672
  const group = el.querySelector('nile-nav-tab-group') as HTMLElement;
1840
- const padding = getComputedStyle(group)
1841
- .getPropertyValue('--nile-nav-tab-padding')
1842
- .split(/\s+/)
1843
- .filter(Boolean);
673
+ const track = group.shadowRoot!.querySelector('.nav-tab-group__indicator__path') as HTMLElement;
674
+ expect(getComputedStyle(track).height).to.equal('0px');
675
+ expect(getComputedStyle(strip(el)).borderBottomWidth).to.equal('1px');
676
+ });
677
+
678
+ });
679
+
680
+ // App shell audit (2026-10-01): the non-sidebar header and container items, asserted on NxtGen tokens with the enterprise values pinned.
681
+
682
+ describe('nile-app-shell breadcrumb slot', () => {
683
+ const shellWith = async (title: string, crumb: boolean, description = '') => {
684
+ const el = await fixture<NileAppShell>(html`
685
+ <nile-app-shell
686
+ style="width: 1176px; height: 800px; ${HEADER_TOKENS}"
687
+ .pageTitle=${title}
688
+ .description=${description}
689
+ >
690
+ ${crumb ? html`<nav slot="breadcrumb" id="crumb">Home / Settings</nav>` : ''}
691
+ <main>page</main>
692
+ </nile-app-shell>
693
+ `);
694
+ await el.updateComplete;
695
+ await new Promise(resolve => requestAnimationFrame(() => resolve(null)));
696
+ await el.updateComplete;
697
+ return el;
698
+ };
699
+ const row = (el: NileAppShell) =>
700
+ el.shadowRoot!.querySelector('[part~="breadcrumb"]') as HTMLElement;
701
+
702
+ const topBar = (el: NileAppShell) =>
703
+ el.shadowRoot!.querySelector('.top-bar') as HTMLElement;
704
+ const titleTop = (el: NileAppShell) =>
705
+ (el.shadowRoot!.querySelector('[part~="page-title"]') as HTMLElement).getBoundingClientRect().top;
706
+
707
+ it('shows the slotted breadcrumb above the page title and grows the bar', async () => {
708
+ const el = await shellWith('Applications', true);
709
+ expect(el.hasAttribute('has-breadcrumb')).to.be.true;
710
+ const crumb = el.querySelector('#crumb') as HTMLElement;
711
+ expect(crumb.getBoundingClientRect().bottom).to.be.at.most(titleTop(el));
712
+ expect(topBar(el).getBoundingClientRect().height).to.be.greaterThan(64);
713
+ });
714
+
715
+ });
716
+
717
+ describe('NileAppShell — page-title and description slots', () => {
718
+ interface SlotAxes {
719
+ pageTitle?: string;
720
+ description?: string;
721
+ titleSlot?: string;
722
+ descriptionSlot?: ReturnType<typeof html> | string;
723
+ headingLevel?: number;
724
+ }
1844
725
 
1845
- // The tab node's padding is 0 / 4 / 12 / 4, the 12px bottom being the active indicator's band.
1846
- expect(padding).to.deep.equal(['0px', '4px', '12px', '4px']);
726
+ const frame = () => new Promise(resolve => requestAnimationFrame(() => resolve(null)));
1847
727
 
1848
- // The inter-tab gap is the group's own 12px and is deliberately untouched.
728
+ const build = async (axes: SlotAxes = {}) => {
729
+ const el = await fixture<NileAppShell>(html`
730
+ <nile-app-shell
731
+ style="width: 1176px; height: 800px; ${HEADER_TOKENS}"
732
+ .pageTitle=${axes.pageTitle ?? ''}
733
+ .description=${axes.description ?? ''}
734
+ .headingLevel=${axes.headingLevel ?? 1}
735
+ >
736
+ <nav slot="side-nav">nav</nav>
737
+ ${axes.titleSlot
738
+ ? html`<span slot="page-title" id="slotted-title">${axes.titleSlot}</span>`
739
+ : ''}
740
+ ${axes.descriptionSlot
741
+ ? html`<div slot="description" id="slotted-description">${axes.descriptionSlot}</div>`
742
+ : ''}
743
+ <p>page</p>
744
+ </nile-app-shell>
745
+ `);
746
+ await frame();
747
+ await el.updateComplete;
748
+ await frame();
749
+ await el.updateComplete;
750
+ return el;
751
+ };
752
+
753
+ const bar = (el: NileAppShell) =>
754
+ el.shadowRoot!.querySelector('.top-bar') as HTMLElement;
755
+ const heading = (el: NileAppShell) => part(el, 'page-title') as HTMLElement | null;
756
+ const desc = (el: NileAppShell) => part(el, 'description') as HTMLElement | null;
757
+ const slotIn = (host: Element | null, name: string) =>
758
+ host?.querySelector(`slot[name="${name}"]`) as HTMLSlotElement | null;
759
+
760
+ it('renders a property-only page title in the heading wrapper', async () => {
761
+ const el = await build({ pageTitle: 'Applications' });
762
+ expect(heading(el)!.getAttribute('role')).to.equal('heading');
763
+ expect(heading(el)!.textContent!.trim()).to.equal('Applications');
764
+ expect(slotIn(heading(el), 'page-title')!.assignedNodes()).to.have.length(0);
765
+ });
766
+
767
+ it('lets the slot win when the property and the slot are both set', async () => {
768
+ const el = await build({
769
+ pageTitle: 'Property title',
770
+ description: 'Property description',
771
+ titleSlot: 'Slotted title',
772
+ descriptionSlot: 'Slotted description',
773
+ });
774
+ expect(slotIn(heading(el), 'page-title')!.assignedElements()[0].id).to.equal('slotted-title');
775
+ expect(slotIn(desc(el), 'description')!.assignedElements()[0].id).to.equal(
776
+ 'slotted-description'
777
+ );
778
+ });
779
+
780
+ });
781
+
782
+ describe('NileAppShell — tooltips', () => {
783
+ type Tip = HTMLElement & { content: string; disabled: boolean };
784
+ const LONG = 'A very long page title that cannot possibly fit in a narrow header bar';
785
+ const LONG_DESC = 'A very long description that cannot possibly fit in a narrow header bar either, however wide it is';
786
+
787
+ const build = async (attrs: { width?: number; disableTooltip?: boolean; description?: string; slotDescription?: boolean } = {}) => {
788
+ const el = await fixture<NileAppShell>(html`
789
+ <nile-app-shell
790
+ style="width: ${attrs.width ?? 520}px; height: 600px; ${HEADER_TOKENS}"
791
+ .pageTitle=${LONG}
792
+ .description=${attrs.slotDescription ? '' : attrs.description ?? ''}
793
+ ?disableTooltip=${attrs.disableTooltip === true}
794
+ headerBack
795
+ >
796
+ <nav slot="side-nav">nav</nav>
797
+ ${attrs.slotDescription ? html`<span slot="description">${LONG_DESC}</span>` : ''}
798
+ <p>page</p>
799
+ </nile-app-shell>
800
+ `);
801
+ await el.updateComplete;
802
+ await new Promise(r => setTimeout(r, 100));
803
+ await el.updateComplete;
804
+ return el;
805
+ };
806
+ const tipAround = (el: NileAppShell, selector: string) =>
807
+ (el.shadowRoot!.querySelector(selector) as HTMLElement).closest('nile-lite-tooltip') as Tip;
808
+
809
+ it('wraps the nav toggle and the back arrow in a lite tooltip carrying their label', async () => {
810
+ const el = await build();
811
+ expect(tipAround(el, '.nav-toggle').content).to.equal('Collapse navigation');
812
+ expect(tipAround(el, '.nav-toggle').disabled).to.be.false;
813
+ expect(tipAround(el, '.back').content).to.equal('Back');
814
+ expect(el.shadowRoot!.querySelector('.nav-toggle')!.hasAttribute('title')).to.be.false;
815
+
816
+ el.collapseNav();
817
+ await el.updateComplete;
818
+ expect(tipAround(el, '.nav-toggle').content).to.equal('Expand navigation');
819
+ });
820
+
821
+ it('shows the title and description in a tooltip only while the ellipsis is cutting them off', async () => {
822
+ const narrow = await build({ description: LONG_DESC });
823
+ const title = tipAround(narrow, '.page-title');
824
+ expect(title.content).to.equal(LONG);
825
+ expect(title.disabled).to.be.false;
826
+ expect(tipAround(narrow, '.description').content).to.equal(LONG_DESC);
827
+
828
+ const el = narrow.shadowRoot!.querySelector('.page-title') as HTMLElement;
829
+ expect(el.scrollWidth).to.be.greaterThan(el.clientWidth);
830
+
831
+ narrow.style.width = '1400px';
832
+ await new Promise(r => setTimeout(r, 200));
833
+ await narrow.updateComplete;
834
+ expect(tipAround(narrow, '.page-title').disabled, 'the title now fits, so no tooltip').to.be.true;
835
+ });
836
+
837
+ it('gives a slotted, wrapping description no tooltip, since nothing is cut off', async () => {
838
+ const el = await build({ slotDescription: true });
839
+ expect(tipAround(el, '.description').disabled).to.be.true;
840
+ });
841
+
842
+ it('disableTooltip turns every shell tooltip off, even for clipped text', async () => {
843
+ const el = await build({ description: LONG_DESC, disableTooltip: true });
844
+ expect(el.disableTooltip).to.be.true;
845
+ const tips = Array.from(el.shadowRoot!.querySelectorAll('nile-lite-tooltip.tip')) as Tip[];
846
+ expect(tips.length).to.be.greaterThan(3);
847
+ expect(tips.every(t => t.disabled)).to.be.true;
848
+ });
849
+ });
850
+
851
+ {
852
+ /** The compositional form: one child element per region, no slot names. */
853
+ const composed = async (width = 1440, overlayBreakpoint = 0) => {
854
+ const el = await fixture<NileAppShell>(html`
855
+ <nile-app-shell
856
+ style="width: ${width}px; height: 600px;"
857
+ overlay-breakpoint=${overlayBreakpoint}
858
+ >
859
+ <nile-app-shell-side-nav>
860
+ <span slot="header">Aquera</span>
861
+ <nav>nav</nav>
862
+ <span slot="footer">account</span>
863
+ </nile-app-shell-side-nav>
864
+
865
+ <span slot="top-bar">Title</span>
866
+
867
+ <nile-app-shell-main>
868
+ <div class="page">page</div>
869
+ </nile-app-shell-main>
870
+
871
+ <nile-app-shell-panel label="Ask Aquera">
872
+ <div>answer</div>
873
+ <div slot="footer">composer</div>
874
+ </nile-app-shell-panel>
875
+ </nile-app-shell>
876
+ `);
877
+ await waitUntil(() => el.hasAttribute('has-panel'));
878
+ return el;
879
+ };
880
+
881
+ const region = <T extends Element>(el: NileAppShell, tag: string) =>
882
+ el.querySelector<T>(tag)!;
883
+
884
+ describe('Region components — slot assignment', () => {
885
+ it('1. each region claims the shell slot it belongs to', async () => {
886
+ const el = await composed();
887
+ expect(region(el, 'nile-app-shell-side-nav').getAttribute('slot')).to.equal(
888
+ 'side-nav'
889
+ );
890
+ expect(region(el, 'nile-app-shell-panel').getAttribute('slot')).to.equal(
891
+ 'panel'
892
+ );
893
+ // Main belongs to the default slot, so it must claim no slot at all.
894
+ expect(region(el, 'nile-app-shell-main').hasAttribute('slot')).to.be.false;
895
+ });
896
+
897
+ });
898
+
899
+ describe('nile-app-shell-panel', () => {
900
+ it('9. takes over the panel chrome from the shell', async () => {
901
+ const el = await composed();
902
+ expect(el.getAttribute('panel-chrome')).to.equal('external');
903
+ // The shell's own header must not also render.
904
+ expect(el.shadowRoot!.querySelector('[part~="panel-header"]')).to.not.exist;
905
+
906
+ const panel = region<NileAppShellPanel>(el, 'nile-app-shell-panel');
907
+ expect(panel.shadowRoot!.querySelector('[part~="header"]')).to.exist;
1849
908
  expect(
1850
- getComputedStyle(group).getPropertyValue('--tab-gap').trim()
1851
- ).to.equal('12px');
909
+ panel.shadowRoot!.querySelector('[part~="title"]')!.textContent!.trim()
910
+ ).to.equal('Ask Aquera');
1852
911
  });
1853
912
 
1854
- // The compression under a short viewport is documented behaviour, asserted here to keep the resize honest.
1855
- it('61. compresses to 56/64px under 600px of viewport height', async () => {
1856
- await setViewport(SHORT);
1857
- try {
1858
- const plain = await header({ pageTitle: 'Applications' });
1859
- expect(bar(plain).getBoundingClientRect().height).to.equal(56);
913
+ it('12. its close button closes the panel through the shell', async () => {
914
+ const el = await composed();
915
+ el.openPanel();
916
+ await el.updateComplete;
1860
917
 
1861
- const described = await header({
1862
- pageTitle: 'Applications',
1863
- description: 'Manage connected apps',
1864
- });
1865
- expect(bar(described).getBoundingClientRect().height).to.equal(64);
1866
- } finally {
1867
- await setViewport(TALL);
1868
- }
918
+ const panel = region<NileAppShellPanel>(el, 'nile-app-shell-panel');
919
+ const close =
920
+ panel.shadowRoot!.querySelector<HTMLButtonElement>('[part~="close"]')!;
921
+ const closed = oneEvent(panel, 'nile-close');
922
+ close.click();
923
+ const event = await closed;
924
+ expect(event).to.exist;
925
+ await el.updateComplete;
926
+ expect(el.panelOpen).to.be.false;
927
+ });
928
+
929
+ // Birat's review: a page listening on the shell for nile-panel-back must not go deaf when it slots this panel.
930
+ it('82. its back control also emits nile-panel-back, once, and it reaches the shell', async () => {
931
+ const el = await composed();
932
+ el.openPanel();
933
+ await el.updateComplete;
934
+
935
+ const panel = region<NileAppShellPanel>(el, 'nile-app-shell-panel');
936
+ panel.back = true;
937
+ await panel.updateComplete;
938
+
939
+ const order: string[] = [];
940
+ const log = (e: Event) => order.push(e.type);
941
+ el.addEventListener('nile-back', log);
942
+ el.addEventListener('nile-panel-back', log);
943
+
944
+ const reached = oneEvent(el, 'nile-panel-back');
945
+ panel.shadowRoot!.querySelector<HTMLButtonElement>('[part~="back"]')!.click();
946
+ const event = await reached;
947
+
948
+ // Bubbles and composed, so a listener outside the shadow roots hears it.
949
+ expect(event.bubbles).to.be.true;
950
+ expect(event.composed).to.be.true;
951
+ // One press: nile-back then nile-panel-back, each exactly once.
952
+ expect(order).to.deep.equal(['nile-back', 'nile-panel-back']);
953
+
954
+ order.length = 0;
955
+ panel.goBack();
956
+ expect(order).to.deep.equal(['nile-back', 'nile-panel-back']);
1869
957
  });
958
+
1870
959
  });
960
+
961
+ // The shell's nav track mirrors nile-side-bar's per-theme width, so ::slotted width:100% remains only so a raw nav still fills the track.
962
+
963
+ /*
964
+ * The HTML API, driven from markup. pageTitle, headerBack, headerBackLabel,
965
+ * noTabs, panelBack and panelBackLabel declare no kebab `attribute:` option, so Lit
966
+ * observes the lowercased property name (pagetitle, notabs, ...) and markup
967
+ * writes them camelCase — HTML lowercases `pageTitle=` to match.
968
+ *
969
+ * Every other test in this suite sets these as JS properties, which works no
970
+ * matter what the attribute is called — so if a kebab `attribute:` option is
971
+ * added back, nothing else fails and `<nile-app-shell pageTitle="...">`
972
+ * silently does nothing. This fixture is markup-only on purpose: it is the
973
+ * one that breaks if that happens.
974
+ */
975
+ }