@aquera/nile-elements 2.0.22 → 2.0.24

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 (477) 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 +1929 -936
  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-filter-chip/nile-filter-chip.css.cjs.js +1 -1
  87. package/dist/nile-filter-chip/nile-filter-chip.css.cjs.js.map +1 -1
  88. package/dist/nile-filter-chip/nile-filter-chip.css.esm.js +2 -2
  89. package/dist/nile-form-group/nile-form-group.css.cjs.js +1 -1
  90. package/dist/nile-form-group/nile-form-group.css.cjs.js.map +1 -1
  91. package/dist/nile-form-group/nile-form-group.css.esm.js +3 -3
  92. package/dist/nile-inline-sidebar-item/nile-inline-sidebar-item.css.cjs.js +1 -1
  93. package/dist/nile-inline-sidebar-item/nile-inline-sidebar-item.css.cjs.js.map +1 -1
  94. package/dist/nile-inline-sidebar-item/nile-inline-sidebar-item.css.esm.js +20 -4
  95. package/dist/nile-inline-sidebar-item-body/nile-inline-sidebar-item-body.css.cjs.js +1 -1
  96. package/dist/nile-inline-sidebar-item-body/nile-inline-sidebar-item-body.css.cjs.js.map +1 -1
  97. package/dist/nile-inline-sidebar-item-body/nile-inline-sidebar-item-body.css.esm.js +3 -3
  98. package/dist/nile-inline-sidebar-item-header/nile-inline-sidebar-item-header.css.cjs.js +1 -1
  99. package/dist/nile-inline-sidebar-item-header/nile-inline-sidebar-item-header.css.cjs.js.map +1 -1
  100. package/dist/nile-inline-sidebar-item-header/nile-inline-sidebar-item-header.css.esm.js +3 -3
  101. package/dist/nile-markdown-editor/nile-markdown-editor.css.cjs.js +1 -1
  102. package/dist/nile-markdown-editor/nile-markdown-editor.css.cjs.js.map +1 -1
  103. package/dist/nile-markdown-editor/nile-markdown-editor.css.esm.js +4 -4
  104. package/dist/nile-menu/nile-menu.css.cjs.js +1 -1
  105. package/dist/nile-menu/nile-menu.css.cjs.js.map +1 -1
  106. package/dist/nile-menu/nile-menu.css.esm.js +1 -2
  107. package/dist/nile-menu-item/nile-menu-item.css.cjs.js +1 -1
  108. package/dist/nile-menu-item/nile-menu-item.css.cjs.js.map +1 -1
  109. package/dist/nile-menu-item/nile-menu-item.css.esm.js +6 -6
  110. package/dist/nile-nav-tab/nile-nav-tab.css.cjs.js +1 -1
  111. package/dist/nile-nav-tab/nile-nav-tab.css.cjs.js.map +1 -1
  112. package/dist/nile-nav-tab/nile-nav-tab.css.esm.js +3 -3
  113. package/dist/nile-nav-tab-group/nile-nav-tab-group.css.cjs.js +1 -1
  114. package/dist/nile-nav-tab-group/nile-nav-tab-group.css.cjs.js.map +1 -1
  115. package/dist/nile-nav-tab-group/nile-nav-tab-group.css.esm.js +15 -12
  116. package/dist/nile-option/nile-option.css.cjs.js +1 -1
  117. package/dist/nile-option/nile-option.css.cjs.js.map +1 -1
  118. package/dist/nile-option/nile-option.css.esm.js +2 -2
  119. package/dist/nile-pagination/nile-pagination.cjs.js +1 -1
  120. package/dist/nile-pagination/nile-pagination.cjs.js.map +1 -1
  121. package/dist/nile-pagination/nile-pagination.css.cjs.js +1 -1
  122. package/dist/nile-pagination/nile-pagination.css.cjs.js.map +1 -1
  123. package/dist/nile-pagination/nile-pagination.css.esm.js +10 -0
  124. package/dist/nile-pagination/nile-pagination.esm.js +14 -14
  125. package/dist/nile-side-bar/nile-side-bar.cjs.js +1 -1
  126. package/dist/nile-side-bar/nile-side-bar.cjs.js.map +1 -1
  127. package/dist/nile-side-bar/nile-side-bar.css.cjs.js +1 -1
  128. package/dist/nile-side-bar/nile-side-bar.css.cjs.js.map +1 -1
  129. package/dist/nile-side-bar/nile-side-bar.css.esm.js +16 -14
  130. package/dist/nile-side-bar/nile-side-bar.esm.js +2 -2
  131. package/dist/nile-side-bar-action-menu-item/nile-side-bar-action-menu-item.css.cjs.js +1 -1
  132. package/dist/nile-side-bar-action-menu-item/nile-side-bar-action-menu-item.css.cjs.js.map +1 -1
  133. package/dist/nile-side-bar-action-menu-item/nile-side-bar-action-menu-item.css.esm.js +11 -4
  134. package/dist/nile-side-bar-footer/nile-side-bar-footer.cjs.js.map +1 -1
  135. package/dist/nile-side-bar-footer/nile-side-bar-footer.css.cjs.js +1 -1
  136. package/dist/nile-side-bar-footer/nile-side-bar-footer.css.cjs.js.map +1 -1
  137. package/dist/nile-side-bar-footer/nile-side-bar-footer.css.esm.js +8 -3
  138. package/dist/nile-side-bar-footer-item/index.cjs.js +1 -1
  139. package/dist/nile-side-bar-footer-item/index.esm.js +1 -1
  140. package/dist/nile-side-bar-footer-item/nile-side-bar-footer-item.cjs.js +1 -1
  141. package/dist/nile-side-bar-footer-item/nile-side-bar-footer-item.cjs.js.map +1 -1
  142. package/dist/nile-side-bar-footer-item/nile-side-bar-footer-item.css.cjs.js +1 -1
  143. package/dist/nile-side-bar-footer-item/nile-side-bar-footer-item.css.cjs.js.map +1 -1
  144. package/dist/nile-side-bar-footer-item/nile-side-bar-footer-item.css.esm.js +181 -25
  145. package/dist/nile-side-bar-footer-item/nile-side-bar-footer-item.esm.js +10 -3
  146. package/dist/nile-side-bar-footer-text/nile-side-bar-footer-text.css.cjs.js +1 -1
  147. package/dist/nile-side-bar-footer-text/nile-side-bar-footer-text.css.cjs.js.map +1 -1
  148. package/dist/nile-side-bar-footer-text/nile-side-bar-footer-text.css.esm.js +10 -5
  149. package/dist/nile-side-bar-group/nile-side-bar-group.cjs.js +1 -1
  150. package/dist/nile-side-bar-group/nile-side-bar-group.cjs.js.map +1 -1
  151. package/dist/nile-side-bar-group/nile-side-bar-group.css.cjs.js +1 -1
  152. package/dist/nile-side-bar-group/nile-side-bar-group.css.cjs.js.map +1 -1
  153. package/dist/nile-side-bar-group/nile-side-bar-group.css.esm.js +52 -9
  154. package/dist/nile-side-bar-group/nile-side-bar-group.esm.js +4 -4
  155. package/dist/nile-side-bar-group-item/nile-side-bar-group-item.css.cjs.js +1 -1
  156. package/dist/nile-side-bar-group-item/nile-side-bar-group-item.css.cjs.js.map +1 -1
  157. package/dist/nile-side-bar-group-item/nile-side-bar-group-item.css.esm.js +53 -8
  158. package/dist/nile-side-bar-group-item-icon/nile-side-bar-group-item-icon.cjs.js +1 -1
  159. package/dist/nile-side-bar-group-item-icon/nile-side-bar-group-item-icon.cjs.js.map +1 -1
  160. package/dist/nile-side-bar-group-item-icon/nile-side-bar-group-item-icon.css.cjs.js +1 -1
  161. package/dist/nile-side-bar-group-item-icon/nile-side-bar-group-item-icon.css.cjs.js.map +1 -1
  162. package/dist/nile-side-bar-group-item-icon/nile-side-bar-group-item-icon.css.esm.js +13 -4
  163. package/dist/nile-side-bar-group-item-icon/nile-side-bar-group-item-icon.esm.js +4 -4
  164. package/dist/nile-side-bar-group-item-text/nile-side-bar-group-item-text.css.cjs.js +1 -1
  165. package/dist/nile-side-bar-group-item-text/nile-side-bar-group-item-text.css.cjs.js.map +1 -1
  166. package/dist/nile-side-bar-group-item-text/nile-side-bar-group-item-text.css.esm.js +9 -6
  167. package/dist/nile-side-bar-header/nile-side-bar-header.cjs.js.map +1 -1
  168. package/dist/nile-side-bar-header/nile-side-bar-header.css.cjs.js +1 -1
  169. package/dist/nile-side-bar-header/nile-side-bar-header.css.cjs.js.map +1 -1
  170. package/dist/nile-side-bar-header/nile-side-bar-header.css.esm.js +13 -6
  171. package/dist/nile-side-bar-header-switcher/index.cjs.js +2 -0
  172. package/dist/nile-side-bar-header-switcher/index.cjs.js.map +1 -0
  173. package/dist/nile-side-bar-header-switcher/index.esm.js +1 -0
  174. package/dist/nile-side-bar-header-switcher/nile-side-bar-header-switcher.cjs.js +2 -0
  175. package/dist/nile-side-bar-header-switcher/nile-side-bar-header-switcher.cjs.js.map +1 -0
  176. package/dist/nile-side-bar-header-switcher/nile-side-bar-header-switcher.css.cjs.js +2 -0
  177. package/dist/nile-side-bar-header-switcher/nile-side-bar-header-switcher.css.cjs.js.map +1 -0
  178. package/dist/nile-side-bar-header-switcher/nile-side-bar-header-switcher.css.esm.js +83 -0
  179. package/dist/nile-side-bar-header-switcher/nile-side-bar-header-switcher.esm.js +24 -0
  180. package/dist/nile-side-bar-search/index.cjs.js +2 -0
  181. package/dist/nile-side-bar-search/index.cjs.js.map +1 -0
  182. package/dist/nile-side-bar-search/index.esm.js +1 -0
  183. package/dist/nile-side-bar-search/nile-side-bar-search.cjs.js +2 -0
  184. package/dist/nile-side-bar-search/nile-side-bar-search.cjs.js.map +1 -0
  185. package/dist/nile-side-bar-search/nile-side-bar-search.css.cjs.js +2 -0
  186. package/dist/nile-side-bar-search/nile-side-bar-search.css.cjs.js.map +1 -0
  187. package/dist/nile-side-bar-search/nile-side-bar-search.css.esm.js +103 -0
  188. package/dist/nile-side-bar-search/nile-side-bar-search.esm.js +25 -0
  189. package/dist/nile-slide-toggle/nile-slide-toggle.css.cjs.js +1 -1
  190. package/dist/nile-slide-toggle/nile-slide-toggle.css.cjs.js.map +1 -1
  191. package/dist/nile-slide-toggle/nile-slide-toggle.css.esm.js +1 -1
  192. package/dist/nile-tooltip/nile-tooltip.css.cjs.js +1 -1
  193. package/dist/nile-tooltip/nile-tooltip.css.cjs.js.map +1 -1
  194. package/dist/nile-tooltip/nile-tooltip.css.esm.js +7 -5
  195. package/dist/nile-virtual-select/nile-virtual-select.css.cjs.js +1 -1
  196. package/dist/nile-virtual-select/nile-virtual-select.css.cjs.js.map +1 -1
  197. package/dist/nile-virtual-select/nile-virtual-select.css.esm.js +1 -1
  198. package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.cjs.js +1 -1
  199. package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.cjs.js.map +1 -1
  200. package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.css.cjs.js +1 -1
  201. package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.css.cjs.js.map +1 -1
  202. package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.css.esm.js +51 -2
  203. package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.esm.js +1 -1
  204. package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.css.cjs.js +1 -1
  205. package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.css.cjs.js.map +1 -1
  206. package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.css.esm.js +3 -3
  207. package/dist/src/index.d.ts +6 -0
  208. package/dist/src/index.js +6 -0
  209. package/dist/src/index.js.map +1 -1
  210. package/dist/src/nile-app-shell/nile-app-shell.css.js +70 -63
  211. package/dist/src/nile-app-shell/nile-app-shell.css.js.map +1 -1
  212. package/dist/src/nile-app-shell/nile-app-shell.d.ts +40 -7
  213. package/dist/src/nile-app-shell/nile-app-shell.js +192 -41
  214. package/dist/src/nile-app-shell/nile-app-shell.js.map +1 -1
  215. package/dist/src/nile-app-shell/nile-app-shell.test.d.ts +2 -0
  216. package/dist/src/nile-app-shell/nile-app-shell.test.js +272 -1020
  217. package/dist/src/nile-app-shell/nile-app-shell.test.js.map +1 -1
  218. package/dist/src/nile-app-shell/zz-layout.test.d.ts +15 -0
  219. package/dist/src/nile-app-shell/zz-layout.test.js +253 -0
  220. package/dist/src/nile-app-shell/zz-layout.test.js.map +1 -0
  221. package/dist/src/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.js +1 -1
  222. package/dist/src/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.js.map +1 -1
  223. package/dist/src/nile-app-shell-side-nav/nile-app-shell-side-nav.css.js +24 -6
  224. package/dist/src/nile-app-shell-side-nav/nile-app-shell-side-nav.css.js.map +1 -1
  225. package/dist/src/nile-app-shell-side-nav/nile-app-shell-side-nav.d.ts +8 -2
  226. package/dist/src/nile-app-shell-side-nav/nile-app-shell-side-nav.js +56 -2
  227. package/dist/src/nile-app-shell-side-nav/nile-app-shell-side-nav.js.map +1 -1
  228. package/dist/src/nile-button-filter/nile-button-filter.css.js +1 -1
  229. package/dist/src/nile-button-filter/nile-button-filter.css.js.map +1 -1
  230. package/dist/src/nile-button-filter/nile-button-filter.js +1 -3
  231. package/dist/src/nile-button-filter/nile-button-filter.js.map +1 -1
  232. package/dist/src/nile-calendar/nile-calendar.css.js +9 -8
  233. package/dist/src/nile-calendar/nile-calendar.css.js.map +1 -1
  234. package/dist/src/nile-color-picker/nile-color-picker.css.js +3 -3
  235. package/dist/src/nile-color-picker/nile-color-picker.css.js.map +1 -1
  236. package/dist/src/nile-combobox/nile-combobox.css.js +1 -1
  237. package/dist/src/nile-combobox/nile-combobox.css.js.map +1 -1
  238. package/dist/src/nile-command-menu-item/nile-command-menu-item.css.js +5 -1
  239. package/dist/src/nile-command-menu-item/nile-command-menu-item.css.js.map +1 -1
  240. package/dist/src/nile-context-menu/nile-context-menu.css.js +2 -4
  241. package/dist/src/nile-context-menu/nile-context-menu.css.js.map +1 -1
  242. package/dist/src/nile-dropdown-switcher/index.d.ts +1 -0
  243. package/dist/src/nile-dropdown-switcher/index.js +2 -0
  244. package/dist/src/nile-dropdown-switcher/index.js.map +1 -0
  245. package/dist/src/nile-dropdown-switcher/nile-dropdown-switcher.css.d.ts +10 -0
  246. package/dist/src/nile-dropdown-switcher/nile-dropdown-switcher.css.js +49 -0
  247. package/dist/src/nile-dropdown-switcher/nile-dropdown-switcher.css.js.map +1 -0
  248. package/dist/src/nile-dropdown-switcher/nile-dropdown-switcher.d.ts +101 -0
  249. package/dist/src/nile-dropdown-switcher/nile-dropdown-switcher.js +463 -0
  250. package/dist/src/nile-dropdown-switcher/nile-dropdown-switcher.js.map +1 -0
  251. package/dist/src/nile-dropdown-switcher/nile-dropdown-switcher.test.d.ts +4 -0
  252. package/dist/src/nile-dropdown-switcher/nile-dropdown-switcher.test.js +506 -0
  253. package/dist/src/nile-dropdown-switcher/nile-dropdown-switcher.test.js.map +1 -0
  254. package/dist/src/nile-dropdown-switcher-group/index.d.ts +1 -0
  255. package/dist/src/nile-dropdown-switcher-group/index.js +2 -0
  256. package/dist/src/nile-dropdown-switcher-group/index.js.map +1 -0
  257. package/dist/src/nile-dropdown-switcher-group/nile-dropdown-switcher-group.css.d.ts +12 -0
  258. package/dist/src/nile-dropdown-switcher-group/nile-dropdown-switcher-group.css.js +49 -0
  259. package/dist/src/nile-dropdown-switcher-group/nile-dropdown-switcher-group.css.js.map +1 -0
  260. package/dist/src/nile-dropdown-switcher-group/nile-dropdown-switcher-group.d.ts +37 -0
  261. package/dist/src/nile-dropdown-switcher-group/nile-dropdown-switcher-group.js +72 -0
  262. package/dist/src/nile-dropdown-switcher-group/nile-dropdown-switcher-group.js.map +1 -0
  263. package/dist/src/nile-dropdown-switcher-header/index.d.ts +1 -0
  264. package/dist/src/nile-dropdown-switcher-header/index.js +2 -0
  265. package/dist/src/nile-dropdown-switcher-header/index.js.map +1 -0
  266. package/dist/src/nile-dropdown-switcher-header/nile-dropdown-switcher-header.css.d.ts +12 -0
  267. package/dist/src/nile-dropdown-switcher-header/nile-dropdown-switcher-header.css.js +103 -0
  268. package/dist/src/nile-dropdown-switcher-header/nile-dropdown-switcher-header.css.js.map +1 -0
  269. package/dist/src/nile-dropdown-switcher-header/nile-dropdown-switcher-header.d.ts +46 -0
  270. package/dist/src/nile-dropdown-switcher-header/nile-dropdown-switcher-header.js +105 -0
  271. package/dist/src/nile-dropdown-switcher-header/nile-dropdown-switcher-header.js.map +1 -0
  272. package/dist/src/nile-dropdown-switcher-item/index.d.ts +1 -0
  273. package/dist/src/nile-dropdown-switcher-item/index.js +2 -0
  274. package/dist/src/nile-dropdown-switcher-item/index.js.map +1 -0
  275. package/dist/src/nile-dropdown-switcher-item/nile-dropdown-switcher-item.css.d.ts +10 -0
  276. package/dist/src/nile-dropdown-switcher-item/nile-dropdown-switcher-item.css.js +112 -0
  277. package/dist/src/nile-dropdown-switcher-item/nile-dropdown-switcher-item.css.js.map +1 -0
  278. package/dist/src/nile-dropdown-switcher-item/nile-dropdown-switcher-item.d.ts +55 -0
  279. package/dist/src/nile-dropdown-switcher-item/nile-dropdown-switcher-item.js +154 -0
  280. package/dist/src/nile-dropdown-switcher-item/nile-dropdown-switcher-item.js.map +1 -0
  281. package/dist/src/nile-filter-chip/nile-filter-chip.css.js +2 -2
  282. package/dist/src/nile-filter-chip/nile-filter-chip.css.js.map +1 -1
  283. package/dist/src/nile-form-group/nile-form-group.css.js +1 -1
  284. package/dist/src/nile-form-group/nile-form-group.css.js.map +1 -1
  285. package/dist/src/nile-inline-sidebar-item/nile-inline-sidebar-item.css.js +20 -4
  286. package/dist/src/nile-inline-sidebar-item/nile-inline-sidebar-item.css.js.map +1 -1
  287. package/dist/src/nile-inline-sidebar-item-body/nile-inline-sidebar-item-body.css.js +1 -1
  288. package/dist/src/nile-inline-sidebar-item-body/nile-inline-sidebar-item-body.css.js.map +1 -1
  289. package/dist/src/nile-inline-sidebar-item-header/nile-inline-sidebar-item-header.css.js +3 -3
  290. package/dist/src/nile-inline-sidebar-item-header/nile-inline-sidebar-item-header.css.js.map +1 -1
  291. package/dist/src/nile-markdown-editor/nile-markdown-editor.css.js +4 -4
  292. package/dist/src/nile-markdown-editor/nile-markdown-editor.css.js.map +1 -1
  293. package/dist/src/nile-menu/nile-menu.css.js +1 -2
  294. package/dist/src/nile-menu/nile-menu.css.js.map +1 -1
  295. package/dist/src/nile-menu-item/nile-menu-item.css.js +4 -4
  296. package/dist/src/nile-menu-item/nile-menu-item.css.js.map +1 -1
  297. package/dist/src/nile-nav-tab/nile-nav-tab.css.js +3 -3
  298. package/dist/src/nile-nav-tab/nile-nav-tab.css.js.map +1 -1
  299. package/dist/src/nile-nav-tab-group/nile-nav-tab-group.css.js +15 -12
  300. package/dist/src/nile-nav-tab-group/nile-nav-tab-group.css.js.map +1 -1
  301. package/dist/src/nile-nav-tab-group/nile-nav-tab-group.test.js +111 -0
  302. package/dist/src/nile-nav-tab-group/nile-nav-tab-group.test.js.map +1 -1
  303. package/dist/src/nile-option/nile-option.css.js +2 -2
  304. package/dist/src/nile-option/nile-option.css.js.map +1 -1
  305. package/dist/src/nile-pagination/nile-pagination.css.js +10 -0
  306. package/dist/src/nile-pagination/nile-pagination.css.js.map +1 -1
  307. package/dist/src/nile-pagination/nile-pagination.d.ts +2 -0
  308. package/dist/src/nile-pagination/nile-pagination.js +13 -9
  309. package/dist/src/nile-pagination/nile-pagination.js.map +1 -1
  310. package/dist/src/nile-side-bar/nile-side-bar.css.js +14 -12
  311. package/dist/src/nile-side-bar/nile-side-bar.css.js.map +1 -1
  312. package/dist/src/nile-side-bar/nile-side-bar.d.ts +17 -0
  313. package/dist/src/nile-side-bar/nile-side-bar.js +68 -12
  314. package/dist/src/nile-side-bar/nile-side-bar.js.map +1 -1
  315. package/dist/src/nile-side-bar/nile-side-bar.test.d.ts +23 -0
  316. package/dist/src/nile-side-bar/nile-side-bar.test.js +1614 -1
  317. package/dist/src/nile-side-bar/nile-side-bar.test.js.map +1 -1
  318. package/dist/src/nile-side-bar-action-menu-item/nile-side-bar-action-menu-item.css.js +11 -4
  319. package/dist/src/nile-side-bar-action-menu-item/nile-side-bar-action-menu-item.css.js.map +1 -1
  320. package/dist/src/nile-side-bar-footer/nile-side-bar-footer.css.js +8 -3
  321. package/dist/src/nile-side-bar-footer/nile-side-bar-footer.css.js.map +1 -1
  322. package/dist/src/nile-side-bar-footer/nile-side-bar-footer.d.ts +7 -5
  323. package/dist/src/nile-side-bar-footer/nile-side-bar-footer.js +7 -5
  324. package/dist/src/nile-side-bar-footer/nile-side-bar-footer.js.map +1 -1
  325. package/dist/src/nile-side-bar-footer-item/nile-side-bar-footer-item.css.js +179 -23
  326. package/dist/src/nile-side-bar-footer-item/nile-side-bar-footer-item.css.js.map +1 -1
  327. package/dist/src/nile-side-bar-footer-item/nile-side-bar-footer-item.d.ts +15 -0
  328. package/dist/src/nile-side-bar-footer-item/nile-side-bar-footer-item.js +82 -2
  329. package/dist/src/nile-side-bar-footer-item/nile-side-bar-footer-item.js.map +1 -1
  330. package/dist/src/nile-side-bar-footer-item/nile-side-bar-footer-item.test.d.ts +9 -0
  331. package/dist/src/nile-side-bar-footer-item/nile-side-bar-footer-item.test.js +201 -0
  332. package/dist/src/nile-side-bar-footer-item/nile-side-bar-footer-item.test.js.map +1 -0
  333. package/dist/src/nile-side-bar-footer-text/nile-side-bar-footer-text.css.js +8 -3
  334. package/dist/src/nile-side-bar-footer-text/nile-side-bar-footer-text.css.js.map +1 -1
  335. package/dist/src/nile-side-bar-group/nile-side-bar-group.css.js +50 -7
  336. package/dist/src/nile-side-bar-group/nile-side-bar-group.css.js.map +1 -1
  337. package/dist/src/nile-side-bar-group/nile-side-bar-group.d.ts +35 -0
  338. package/dist/src/nile-side-bar-group/nile-side-bar-group.js +90 -3
  339. package/dist/src/nile-side-bar-group/nile-side-bar-group.js.map +1 -1
  340. package/dist/src/nile-side-bar-group-item/nile-side-bar-group-item.css.js +52 -7
  341. package/dist/src/nile-side-bar-group-item/nile-side-bar-group-item.css.js.map +1 -1
  342. package/dist/src/nile-side-bar-group-item-icon/nile-side-bar-group-item-icon.css.js +11 -2
  343. package/dist/src/nile-side-bar-group-item-icon/nile-side-bar-group-item-icon.css.js.map +1 -1
  344. package/dist/src/nile-side-bar-group-item-icon/nile-side-bar-group-item-icon.d.ts +11 -2
  345. package/dist/src/nile-side-bar-group-item-icon/nile-side-bar-group-item-icon.js +21 -15
  346. package/dist/src/nile-side-bar-group-item-icon/nile-side-bar-group-item-icon.js.map +1 -1
  347. package/dist/src/nile-side-bar-group-item-text/nile-side-bar-group-item-text.css.js +7 -4
  348. package/dist/src/nile-side-bar-group-item-text/nile-side-bar-group-item-text.css.js.map +1 -1
  349. package/dist/src/nile-side-bar-header/nile-side-bar-app-shell.test.js +22 -17
  350. package/dist/src/nile-side-bar-header/nile-side-bar-app-shell.test.js.map +1 -1
  351. package/dist/src/nile-side-bar-header/nile-side-bar-header-surface.test.d.ts +4 -0
  352. package/dist/src/nile-side-bar-header/nile-side-bar-header-surface.test.js +143 -0
  353. package/dist/src/nile-side-bar-header/nile-side-bar-header-surface.test.js.map +1 -0
  354. package/dist/src/nile-side-bar-header/nile-side-bar-header.css.js +11 -4
  355. package/dist/src/nile-side-bar-header/nile-side-bar-header.css.js.map +1 -1
  356. package/dist/src/nile-side-bar-header/nile-side-bar-header.d.ts +7 -5
  357. package/dist/src/nile-side-bar-header/nile-side-bar-header.js +7 -5
  358. package/dist/src/nile-side-bar-header/nile-side-bar-header.js.map +1 -1
  359. package/dist/src/nile-side-bar-header-switcher/index.d.ts +1 -0
  360. package/dist/src/nile-side-bar-header-switcher/index.js +2 -0
  361. package/dist/src/nile-side-bar-header-switcher/index.js.map +1 -0
  362. package/dist/src/nile-side-bar-header-switcher/nile-side-bar-header-switcher.css.d.ts +14 -0
  363. package/dist/src/nile-side-bar-header-switcher/nile-side-bar-header-switcher.css.js +97 -0
  364. package/dist/src/nile-side-bar-header-switcher/nile-side-bar-header-switcher.css.js.map +1 -0
  365. package/dist/src/nile-side-bar-header-switcher/nile-side-bar-header-switcher.d.ts +38 -0
  366. package/dist/src/nile-side-bar-header-switcher/nile-side-bar-header-switcher.js +86 -0
  367. package/dist/src/nile-side-bar-header-switcher/nile-side-bar-header-switcher.js.map +1 -0
  368. package/dist/src/nile-side-bar-search/index.d.ts +1 -0
  369. package/dist/src/nile-side-bar-search/index.js +2 -0
  370. package/dist/src/nile-side-bar-search/index.js.map +1 -0
  371. package/dist/src/nile-side-bar-search/nile-side-bar-search.css.d.ts +15 -0
  372. package/dist/src/nile-side-bar-search/nile-side-bar-search.css.js +118 -0
  373. package/dist/src/nile-side-bar-search/nile-side-bar-search.css.js.map +1 -0
  374. package/dist/src/nile-side-bar-search/nile-side-bar-search.d.ts +56 -0
  375. package/dist/src/nile-side-bar-search/nile-side-bar-search.js +150 -0
  376. package/dist/src/nile-side-bar-search/nile-side-bar-search.js.map +1 -0
  377. package/dist/src/nile-side-bar-search/nile-side-bar-search.test.d.ts +3 -0
  378. package/dist/src/nile-side-bar-search/nile-side-bar-search.test.js +153 -0
  379. package/dist/src/nile-side-bar-search/nile-side-bar-search.test.js.map +1 -0
  380. package/dist/src/nile-slide-toggle/nile-slide-toggle.css.js +1 -1
  381. package/dist/src/nile-slide-toggle/nile-slide-toggle.css.js.map +1 -1
  382. package/dist/src/nile-tooltip/nile-tooltip.css.js +7 -5
  383. package/dist/src/nile-tooltip/nile-tooltip.css.js.map +1 -1
  384. package/dist/src/nile-virtual-select/nile-virtual-select.css.js +1 -1
  385. package/dist/src/nile-virtual-select/nile-virtual-select.css.js.map +1 -1
  386. package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.css.js +51 -2
  387. package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.css.js.map +1 -1
  388. package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.js +1 -1
  389. package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.js.map +1 -1
  390. package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.css.js +3 -3
  391. package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.css.js.map +1 -1
  392. package/dist/src/version.js +1 -1
  393. package/dist/src/version.js.map +1 -1
  394. package/dist/tsconfig.tsbuildinfo +1 -1
  395. package/dist/version.cjs.js +1 -1
  396. package/dist/version.cjs.js.map +1 -1
  397. package/dist/version.esm.js +1 -1
  398. package/docs/screenshots/wysiwyg-focus-state-focused.png +0 -0
  399. package/docs/screenshots/wysiwyg-focus-state-unfocused.png +0 -0
  400. package/package.json +1 -1
  401. package/src/index.ts +6 -0
  402. package/src/nile-app-shell/nile-app-shell.css.ts +70 -63
  403. package/src/nile-app-shell/nile-app-shell.test.ts +332 -1227
  404. package/src/nile-app-shell/nile-app-shell.ts +223 -44
  405. package/src/nile-app-shell/zz-layout.test.ts +271 -0
  406. package/src/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.ts +1 -5
  407. package/src/nile-app-shell-side-nav/nile-app-shell-side-nav.css.ts +24 -6
  408. package/src/nile-app-shell-side-nav/nile-app-shell-side-nav.ts +62 -2
  409. package/src/nile-button-filter/nile-button-filter.css.ts +1 -1
  410. package/src/nile-button-filter/nile-button-filter.ts +1 -3
  411. package/src/nile-calendar/nile-calendar.css.ts +9 -8
  412. package/src/nile-color-picker/nile-color-picker.css.ts +3 -3
  413. package/src/nile-combobox/nile-combobox.css.ts +1 -1
  414. package/src/nile-command-menu-item/nile-command-menu-item.css.ts +5 -1
  415. package/src/nile-context-menu/nile-context-menu.css.ts +2 -4
  416. package/src/nile-dropdown-switcher/index.ts +1 -0
  417. package/src/nile-dropdown-switcher/nile-dropdown-switcher.css.ts +51 -0
  418. package/src/nile-dropdown-switcher/nile-dropdown-switcher.test.ts +570 -0
  419. package/src/nile-dropdown-switcher/nile-dropdown-switcher.ts +502 -0
  420. package/src/nile-dropdown-switcher-group/index.ts +1 -0
  421. package/src/nile-dropdown-switcher-group/nile-dropdown-switcher-group.css.ts +51 -0
  422. package/src/nile-dropdown-switcher-group/nile-dropdown-switcher-group.ts +78 -0
  423. package/src/nile-dropdown-switcher-header/index.ts +1 -0
  424. package/src/nile-dropdown-switcher-header/nile-dropdown-switcher-header.css.ts +105 -0
  425. package/src/nile-dropdown-switcher-header/nile-dropdown-switcher-header.ts +105 -0
  426. package/src/nile-dropdown-switcher-item/index.ts +1 -0
  427. package/src/nile-dropdown-switcher-item/nile-dropdown-switcher-item.css.ts +114 -0
  428. package/src/nile-dropdown-switcher-item/nile-dropdown-switcher-item.ts +151 -0
  429. package/src/nile-filter-chip/nile-filter-chip.css.ts +2 -2
  430. package/src/nile-form-group/nile-form-group.css.ts +1 -1
  431. package/src/nile-inline-sidebar-item/nile-inline-sidebar-item.css.ts +20 -4
  432. package/src/nile-inline-sidebar-item-body/nile-inline-sidebar-item-body.css.ts +1 -1
  433. package/src/nile-inline-sidebar-item-header/nile-inline-sidebar-item-header.css.ts +3 -3
  434. package/src/nile-markdown-editor/nile-markdown-editor.css.ts +4 -4
  435. package/src/nile-menu/nile-menu.css.ts +1 -2
  436. package/src/nile-menu-item/nile-menu-item.css.ts +4 -4
  437. package/src/nile-nav-tab/nile-nav-tab.css.ts +3 -3
  438. package/src/nile-nav-tab-group/nile-nav-tab-group.css.ts +15 -12
  439. package/src/nile-nav-tab-group/nile-nav-tab-group.test.ts +130 -0
  440. package/src/nile-option/nile-option.css.ts +2 -2
  441. package/src/nile-pagination/nile-pagination.css.ts +10 -0
  442. package/src/nile-pagination/nile-pagination.ts +14 -9
  443. package/src/nile-side-bar/nile-side-bar.css.ts +14 -12
  444. package/src/nile-side-bar/nile-side-bar.test.ts +1854 -2
  445. package/src/nile-side-bar/nile-side-bar.ts +72 -15
  446. package/src/nile-side-bar-action-menu-item/nile-side-bar-action-menu-item.css.ts +11 -4
  447. package/src/nile-side-bar-footer/nile-side-bar-footer.css.ts +8 -3
  448. package/src/nile-side-bar-footer/nile-side-bar-footer.ts +7 -5
  449. package/src/nile-side-bar-footer-item/nile-side-bar-footer-item.css.ts +179 -23
  450. package/src/nile-side-bar-footer-item/nile-side-bar-footer-item.test.ts +219 -0
  451. package/src/nile-side-bar-footer-item/nile-side-bar-footer-item.ts +84 -2
  452. package/src/nile-side-bar-footer-text/nile-side-bar-footer-text.css.ts +8 -3
  453. package/src/nile-side-bar-group/nile-side-bar-group.css.ts +50 -7
  454. package/src/nile-side-bar-group/nile-side-bar-group.ts +100 -2
  455. package/src/nile-side-bar-group-item/nile-side-bar-group-item.css.ts +52 -7
  456. package/src/nile-side-bar-group-item-icon/nile-side-bar-group-item-icon.css.ts +11 -2
  457. package/src/nile-side-bar-group-item-icon/nile-side-bar-group-item-icon.ts +22 -19
  458. package/src/nile-side-bar-group-item-text/nile-side-bar-group-item-text.css.ts +7 -4
  459. package/src/nile-side-bar-header/nile-side-bar-app-shell.test.ts +22 -17
  460. package/src/nile-side-bar-header/nile-side-bar-header-surface.test.ts +175 -0
  461. package/src/nile-side-bar-header/nile-side-bar-header.css.ts +11 -4
  462. package/src/nile-side-bar-header/nile-side-bar-header.ts +7 -5
  463. package/src/nile-side-bar-header-switcher/index.ts +1 -0
  464. package/src/nile-side-bar-header-switcher/nile-side-bar-header-switcher.css.ts +99 -0
  465. package/src/nile-side-bar-header-switcher/nile-side-bar-header-switcher.ts +88 -0
  466. package/src/nile-side-bar-search/index.ts +1 -0
  467. package/src/nile-side-bar-search/nile-side-bar-search.css.ts +120 -0
  468. package/src/nile-side-bar-search/nile-side-bar-search.test.ts +175 -0
  469. package/src/nile-side-bar-search/nile-side-bar-search.ts +160 -0
  470. package/src/nile-slide-toggle/nile-slide-toggle.css.ts +1 -1
  471. package/src/nile-tooltip/nile-tooltip.css.ts +7 -5
  472. package/src/nile-virtual-select/nile-virtual-select.css.ts +1 -1
  473. package/src/nile-wysiwyg-editor/nile-wysiwyg-editor.css.ts +51 -2
  474. package/src/nile-wysiwyg-editor/nile-wysiwyg-editor.ts +1 -1
  475. package/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.css.ts +3 -3
  476. package/test-timings.json +0 -1
  477. package/vscode-html-custom-data.json +349 -22
@@ -13,15 +13,20 @@ export const styles = css `
13
13
  display: block;
14
14
  }
15
15
 
16
+ /* NxtGen: a 40px item with 2px block padding so the row inside is 36px; enterprise keeps 208 x 38. */
16
17
  .group-item {
17
18
  display: flex;
18
19
  flex-direction: column;
20
+ box-sizing: border-box;
19
21
  height: var(--nile-height-38px, var(--ng-spacing-40px));
20
- width: var(--nile-width-208px, var(--ng-spacing-264));
22
+ width: 100%;
23
+ padding-top: var(--nile-spacing-none, var(--ng-spacing-xxs));
24
+ padding-bottom: var(--nile-spacing-none, var(--ng-spacing-xxs));
21
25
  overflow: hidden;
22
26
  }
23
27
 
24
28
  .item-link {
29
+ position: relative;
25
30
  display: flex;
26
31
  align-items: center;
27
32
  justify-content: flex-start;
@@ -38,29 +43,69 @@ export const styles = css `
38
43
  line-height: 1.4;
39
44
  box-sizing: border-box;
40
45
  font-weight: var(--nile-font-weight-regular, var(--ng-font-weight-semibold));
46
+ /* The same 8px radius in every state (rest, hover, selected, focus ring), not only once hovered or selected. */
47
+ border-radius: var(--nile-radius-sm, var(--ng-radius-md));
48
+ }
49
+
50
+ /* Default: text-secondary-700; the icon is fg-quaternary-400 (set on the nile-icon by nile-side-bar-group-item-icon). */
51
+ ::slotted(nile-side-bar-group-item-text) {
52
+ color: var(--nile-colors-dark-900, var(--ng-colors-text-secondary-700));
41
53
  }
42
54
 
43
55
  .item-link:hover {
44
- background: var(--nile-colors-neutral-400, var(--ng-colors-bg-primary-hover));
45
- border-radius: var(--nile-radius-sm, var(--ng-radius-sm));
56
+ background: var(--nile-colors-neutral-400, var(--ng-colors-bg-secondary-subtle));
57
+ border-radius: var(--nile-radius-sm, var(--ng-radius-md));
58
+ }
59
+
60
+ /* Hover: text-tertiary-hover label and fg-tertiary-hover icon. A selected item keeps its selected colours, so it is excluded from the icon rule. */
61
+ .item-link:hover ::slotted(nile-side-bar-group-item-text) {
62
+ color: var(--nile-colors-dark-800, var(--ng-colors-text-tertiary-hover));
63
+ }
64
+
65
+ :host(:not([active])) .item-link:hover ::slotted(nile-side-bar-group-item-icon) {
66
+ color: var(--nile-colors-dark-900, var(--ng-colors-fg-tertiary-hover));
46
67
  }
47
68
 
69
+ /* The icon is drawn in its own colour: fg-quaternary-400 by default, recoloured by the hover and selected rules above and below. */
48
70
  ::slotted(nile-side-bar-group-item-icon) {
49
71
  flex-shrink: 0;
72
+ color: var(--nile-colors-dark-900, var(--ng-colors-fg-quaternary-400));
50
73
  }
51
74
 
52
75
  ::slotted(nile-side-bar-group-item-text) {
53
76
  flex-grow: 1;
54
77
  }
55
78
 
79
+ /* Every selected item shows the same background/text/icon regardless of hover/focus state. */
56
80
  :host([active]) [part="link"] {
57
- background: var(--nile-colors-primary-100, var(--ng-colors-bg-brand-primary));
58
- border-radius: var(--nile-radius-sm, var(--ng-radius-sm));
81
+ background: var(--nile-colors-primary-100, var(--ng-colors-bg-primary));
82
+ border-radius: var(--nile-radius-sm, var(--ng-radius-md));
59
83
  }
60
84
 
85
+ :host([active]) ::slotted(nile-side-bar-group-item-text) {
86
+ color: var(--nile-colors-dark-900, var(--ng-colors-text-brand-secondary-700));
87
+ }
88
+
89
+ :host([active]) ::slotted(nile-side-bar-group-item-icon) {
90
+ color: var(--ng-colors-fg-brand-primary-600);
91
+ }
92
+
93
+ /* Focus-visible adds only the ring, independent of selection -- a safe no-op on enterprise. */
94
+ .item-link:focus-visible {
95
+ outline: none;
96
+ box-shadow: inset 0 0 0 var(--ng-border-width-2) var(--ng-colors-effects-focus-ring);
97
+ }
98
+
99
+ /* Collapsed: 40 x 40 (38 x 38 on enterprise), clipped. */
61
100
  :host([collapsed]) .group-item {
62
- height: 38px;
63
- width: 38px;
101
+ height: var(--nile-height-38px, var(--ng-spacing-40px));
102
+ width: var(--nile-width-38px, var(--ng-spacing-40px));
103
+ }
104
+
105
+ /* Collapsed NxtGen: the 12px side padding left the icon 2px right of the 40px item's centre (x=38 in a 72px rail). Zero it: the icon box then spans the item and centres its glyph at x=36, with the clipped label starting after it. Enterprise keeps its own padding. */
106
+ :host([collapsed]) .item-link {
107
+ padding-left: var(--nile-spacing-md, var(--ng-spacing-none));
108
+ padding-right: var(--nile-spacing-md, var(--ng-spacing-none));
64
109
  }
65
110
 
66
111
  :host([disabled]) .item-link {
@@ -1 +1 @@
1
- {"version":3,"file":"nile-side-bar-group-item.css.js","sourceRoot":"","sources":["../../../src/nile-side-bar-group-item/nile-side-bar-group-item.css.ts"],"names":[],"mappings":"AAAA;;;;;EAKE;AAEF,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4DxB,CAAC;AAEF,eAAe,CAAC,MAAM,CAAC,CAAC","sourcesContent":["/**\n* Copyright Aquera Inc 2023\n*\n* This source code is licensed under the BSD-3-Clause license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\nimport {css} from 'lit';\n\n/**\n * SideBarGroupItem CSS\n */\nexport const styles = css`\n :host {\n display: block;\n }\n\n .group-item {\n display: flex;\n flex-direction: column;\n height: var(--nile-height-38px, var(--ng-spacing-40px));\n width: var(--nile-width-208px, var(--ng-spacing-264));\n overflow: hidden;\n }\n\n .item-link {\n display: flex;\n align-items: center;\n justify-content: flex-start;\n height: 100%;\n width: 100%;\n padding-top: var(--nile-spacing-lg, var(--ng-spacing-md));\n padding-bottom: var(--nile-spacing-lg, var(--ng-spacing-md));\n padding-left: var(--nile-spacing-md, var(--ng-spacing-lg));\n padding-right: var(--nile-spacing-md, var(--ng-spacing-lg));\n cursor: pointer;\n color: var(--nile-colors-dark-900, var(--ng-colors-graylightmode-900));\n text-decoration: none;\n font-size: var(--nile-type-scale-3, var(--ng-font-size-text-md));\n line-height: 1.4;\n box-sizing: border-box;\n font-weight: var(--nile-font-weight-regular, var(--ng-font-weight-semibold));\n }\n\n .item-link:hover {\n background: var(--nile-colors-neutral-400, var(--ng-colors-bg-primary-hover));\n border-radius: var(--nile-radius-sm, var(--ng-radius-sm));\n }\n\n ::slotted(nile-side-bar-group-item-icon) {\n flex-shrink: 0;\n }\n\n ::slotted(nile-side-bar-group-item-text) {\n flex-grow: 1;\n }\n\n :host([active]) [part=\"link\"] {\n background: var(--nile-colors-primary-100, var(--ng-colors-bg-brand-primary));\n border-radius: var(--nile-radius-sm, var(--ng-radius-sm));\n }\n\n :host([collapsed]) .group-item {\n height: 38px;\n width: 38px;\n }\n\n :host([disabled]) .item-link {\n opacity: 0.5;\n pointer-events: none;\n cursor: not-allowed;\n }\n`;\n\nexport default [styles];\n"]}
1
+ {"version":3,"file":"nile-side-bar-group-item.css.js","sourceRoot":"","sources":["../../../src/nile-side-bar-group-item/nile-side-bar-group-item.css.ts"],"names":[],"mappings":"AAAA;;;;;EAKE;AAEF,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyGxB,CAAC;AAEF,eAAe,CAAC,MAAM,CAAC,CAAC","sourcesContent":["/**\n* Copyright Aquera Inc 2023\n*\n* This source code is licensed under the BSD-3-Clause license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\nimport {css} from 'lit';\n\n/**\n * SideBarGroupItem CSS\n */\nexport const styles = css`\n :host {\n display: block;\n }\n\n /* NxtGen: a 40px item with 2px block padding so the row inside is 36px; enterprise keeps 208 x 38. */\n .group-item {\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n height: var(--nile-height-38px, var(--ng-spacing-40px));\n width: 100%;\n padding-top: var(--nile-spacing-none, var(--ng-spacing-xxs));\n padding-bottom: var(--nile-spacing-none, var(--ng-spacing-xxs));\n overflow: hidden;\n }\n\n .item-link {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: flex-start;\n height: 100%;\n width: 100%;\n padding-top: var(--nile-spacing-lg, var(--ng-spacing-md));\n padding-bottom: var(--nile-spacing-lg, var(--ng-spacing-md));\n padding-left: var(--nile-spacing-md, var(--ng-spacing-lg));\n padding-right: var(--nile-spacing-md, var(--ng-spacing-lg));\n cursor: pointer;\n color: var(--nile-colors-dark-900, var(--ng-colors-graylightmode-900));\n text-decoration: none;\n font-size: var(--nile-type-scale-3, var(--ng-font-size-text-md));\n line-height: 1.4;\n box-sizing: border-box;\n font-weight: var(--nile-font-weight-regular, var(--ng-font-weight-semibold));\n /* The same 8px radius in every state (rest, hover, selected, focus ring), not only once hovered or selected. */\n border-radius: var(--nile-radius-sm, var(--ng-radius-md));\n }\n\n /* Default: text-secondary-700; the icon is fg-quaternary-400 (set on the nile-icon by nile-side-bar-group-item-icon). */\n ::slotted(nile-side-bar-group-item-text) {\n color: var(--nile-colors-dark-900, var(--ng-colors-text-secondary-700));\n }\n\n .item-link:hover {\n background: var(--nile-colors-neutral-400, var(--ng-colors-bg-secondary-subtle));\n border-radius: var(--nile-radius-sm, var(--ng-radius-md));\n }\n\n /* Hover: text-tertiary-hover label and fg-tertiary-hover icon. A selected item keeps its selected colours, so it is excluded from the icon rule. */\n .item-link:hover ::slotted(nile-side-bar-group-item-text) {\n color: var(--nile-colors-dark-800, var(--ng-colors-text-tertiary-hover));\n }\n\n :host(:not([active])) .item-link:hover ::slotted(nile-side-bar-group-item-icon) {\n color: var(--nile-colors-dark-900, var(--ng-colors-fg-tertiary-hover));\n }\n\n /* The icon is drawn in its own colour: fg-quaternary-400 by default, recoloured by the hover and selected rules above and below. */\n ::slotted(nile-side-bar-group-item-icon) {\n flex-shrink: 0;\n color: var(--nile-colors-dark-900, var(--ng-colors-fg-quaternary-400));\n }\n\n ::slotted(nile-side-bar-group-item-text) {\n flex-grow: 1;\n }\n\n /* Every selected item shows the same background/text/icon regardless of hover/focus state. */\n :host([active]) [part=\"link\"] {\n background: var(--nile-colors-primary-100, var(--ng-colors-bg-primary));\n border-radius: var(--nile-radius-sm, var(--ng-radius-md));\n }\n\n :host([active]) ::slotted(nile-side-bar-group-item-text) {\n color: var(--nile-colors-dark-900, var(--ng-colors-text-brand-secondary-700));\n }\n\n :host([active]) ::slotted(nile-side-bar-group-item-icon) {\n color: var(--ng-colors-fg-brand-primary-600);\n }\n\n /* Focus-visible adds only the ring, independent of selection -- a safe no-op on enterprise. */\n .item-link:focus-visible {\n outline: none;\n box-shadow: inset 0 0 0 var(--ng-border-width-2) var(--ng-colors-effects-focus-ring);\n }\n\n /* Collapsed: 40 x 40 (38 x 38 on enterprise), clipped. */\n :host([collapsed]) .group-item {\n height: var(--nile-height-38px, var(--ng-spacing-40px));\n width: var(--nile-width-38px, var(--ng-spacing-40px));\n }\n\n /* Collapsed NxtGen: the 12px side padding left the icon 2px right of the 40px item's centre (x=38 in a 72px rail). Zero it: the icon box then spans the item and centres its glyph at x=36, with the clipped label starting after it. Enterprise keeps its own padding. */\n :host([collapsed]) .item-link {\n padding-left: var(--nile-spacing-md, var(--ng-spacing-none));\n padding-right: var(--nile-spacing-md, var(--ng-spacing-none));\n }\n\n :host([disabled]) .item-link {\n opacity: 0.5;\n pointer-events: none;\n cursor: not-allowed;\n }\n`;\n\nexport default [styles];\n"]}
@@ -5,7 +5,8 @@ export const styles = css `
5
5
  align-items: center;
6
6
  justify-content: center;
7
7
  flex-shrink: 0;
8
- margin-right: 12px;
8
+ /* 8px to the label on NxtGen; enterprise keeps 12px. */
9
+ margin-right: var(--nile-spacing-lg, var(--ng-spacing-md));
9
10
  color: inherit;
10
11
  }
11
12
 
@@ -17,9 +18,17 @@ export const styles = css `
17
18
  }
18
19
 
19
20
 
21
+ /* NxtGen keeps the icon's x when the bar collapses; enterprise centers it in the rail item. */
20
22
  :host([collapsed]) {
21
- margin-right: 0;
23
+ margin-right: var(--nile-spacing-none, var(--ng-spacing-md));
22
24
  width: 100%;
25
+ min-width: var(--nile-spacing-none, var(--ng-height-20px));
26
+ justify-content: center;
27
+ }
28
+
29
+ :host([collapsed]) nile-lite-tooltip {
30
+ display: flex;
31
+ align-items: center;
23
32
  justify-content: center;
24
33
  }
25
34
 
@@ -1 +1 @@
1
- {"version":3,"file":"nile-side-bar-group-item-icon.css.js","sourceRoot":"","sources":["../../../src/nile-side-bar-group-item-icon/nile-side-bar-group-item-icon.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiCxB,CAAC;AAEF,eAAe,CAAC,MAAM,CAAC,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const styles = css`\n :host {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n margin-right: 12px;\n color: inherit;\n }\n\n ::slotted(nile-icon) {\n width: 100%;\n height: 100%;\n color: inherit;\n fill: currentColor;\n }\n\n \n :host([collapsed]) {\n margin-right: 0;\n width: 100%; \n justify-content: center;\n }\n\n nile-tooltip::part(body) {\n width: max-content;\n height: max-content;\n padding-top: var(--nile-spacing-xs, var(--ng-spacing-xs));\n padding-bottom: var(--nile-spacing-xs, var(--ng-spacing-xs));\n padding-left: var(--nile-spacing-sm, var(--ng-spacing-sm));\n padding-right: var(--nile-spacing-sm, var(--ng-spacing-sm));\n overflow-x: hidden;\n }\n`;\n\nexport default [styles];\n"]}
1
+ {"version":3,"file":"nile-side-bar-group-item-icon.css.js","sourceRoot":"","sources":["../../../src/nile-side-bar-group-item-icon/nile-side-bar-group-item-icon.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0CxB,CAAC;AAEF,eAAe,CAAC,MAAM,CAAC,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const styles = css`\n :host {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n /* 8px to the label on NxtGen; enterprise keeps 12px. */\n margin-right: var(--nile-spacing-lg, var(--ng-spacing-md));\n color: inherit;\n }\n\n ::slotted(nile-icon) {\n width: 100%;\n height: 100%;\n color: inherit;\n fill: currentColor;\n }\n\n \n /* NxtGen keeps the icon's x when the bar collapses; enterprise centers it in the rail item. */\n :host([collapsed]) {\n margin-right: var(--nile-spacing-none, var(--ng-spacing-md));\n width: 100%; \n min-width: var(--nile-spacing-none, var(--ng-height-20px));\n justify-content: center;\n }\n\n :host([collapsed]) nile-lite-tooltip {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n nile-tooltip::part(body) {\n width: max-content;\n height: max-content;\n padding-top: var(--nile-spacing-xs, var(--ng-spacing-xs));\n padding-bottom: var(--nile-spacing-xs, var(--ng-spacing-xs));\n padding-left: var(--nile-spacing-sm, var(--ng-spacing-sm));\n padding-right: var(--nile-spacing-sm, var(--ng-spacing-sm));\n overflow-x: hidden;\n }\n`;\n\nexport default [styles];\n"]}
@@ -15,6 +15,9 @@ import NileElement from '../internal/nile-element';
15
15
  * @attr tooltip - Tooltip text shown when sidebar is collapsed
16
16
  *
17
17
  * @slot - Optional slot to override the icon completely
18
+ *
19
+ * The icon is drawn in the host's `color`, which nile-side-bar-group-item sets: fg-quaternary-400 by
20
+ * default, fg-tertiary-hover on hover and text-brand-secondary-700 when selected.
18
21
  */
19
22
  export declare class NileSideBarGroupItemIcon extends NileElement {
20
23
  /**
@@ -26,13 +29,19 @@ export declare class NileSideBarGroupItemIcon extends NileElement {
26
29
  */
27
30
  tooltip: string;
28
31
  method: string;
32
+ /** Icon size: 14px on the enterprise sheet, 20px on NxtGen (the App Shell audit's menu icon), resolved by nile-icon from the theme tokens. */
29
33
  size: string;
30
34
  enableVisibilityEffect: boolean;
31
35
  duration: number;
32
- private sidebar;
33
36
  static get styles(): CSSResultArray;
37
+ /**
38
+ * The container (nile-side-bar or nile-app-shell-side-nav) sets `[collapsed]` on this element, so
39
+ * the tooltip follows that attribute rather than finding a parent sidebar. It has to re-render
40
+ * when the attribute changes, and it is not a reactive property.
41
+ */
42
+ static get observedAttributes(): string[];
43
+ attributeChangedCallback(name: string, old: string | null, value: string | null): void;
34
44
  connectedCallback(): void;
35
- disconnectedCallback(): void;
36
45
  private getSiblingText;
37
46
  render(): TemplateResult;
38
47
  }
@@ -18,6 +18,9 @@ import NileElement from '../internal/nile-element';
18
18
  * @attr tooltip - Tooltip text shown when sidebar is collapsed
19
19
  *
20
20
  * @slot - Optional slot to override the icon completely
21
+ *
22
+ * The icon is drawn in the host's `color`, which nile-side-bar-group-item sets: fg-quaternary-400 by
23
+ * default, fg-tertiary-hover on hover and text-brand-secondary-700 when selected.
21
24
  */
22
25
  let NileSideBarGroupItemIcon = class NileSideBarGroupItemIcon extends NileElement {
23
26
  constructor() {
@@ -31,29 +34,32 @@ let NileSideBarGroupItemIcon = class NileSideBarGroupItemIcon extends NileElemen
31
34
  */
32
35
  this.tooltip = '';
33
36
  this.method = 'fill';
34
- this.size = '14';
37
+ /** Icon size: 14px on the enterprise sheet, 20px on NxtGen (the App Shell audit's menu icon), resolved by nile-icon from the theme tokens. */
38
+ this.size = 'var(--nile-icon-size-14, var(--ng-height-20px))';
35
39
  this.enableVisibilityEffect = false;
36
40
  this.duration = 200;
37
- this.sidebar = null;
38
41
  }
39
42
  static get styles() {
40
43
  return [styles];
41
44
  }
45
+ /**
46
+ * The container (nile-side-bar or nile-app-shell-side-nav) sets `[collapsed]` on this element, so
47
+ * the tooltip follows that attribute rather than finding a parent sidebar. It has to re-render
48
+ * when the attribute changes, and it is not a reactive property.
49
+ */
50
+ static get observedAttributes() {
51
+ return [...super.observedAttributes, 'collapsed'];
52
+ }
53
+ attributeChangedCallback(name, old, value) {
54
+ super.attributeChangedCallback(name, old, value);
55
+ if (name === 'collapsed')
56
+ this.requestUpdate();
57
+ }
42
58
  connectedCallback() {
43
59
  if (!this.hasAttribute('slot')) {
44
60
  this.setAttribute('slot', 'icon');
45
61
  }
46
62
  super.connectedCallback();
47
- this.sidebar = this.closest('nile-side-bar');
48
- if (this.sidebar) {
49
- const observer = new MutationObserver(() => this.requestUpdate());
50
- observer.observe(this.sidebar, { attributes: true, attributeFilter: ['collapsed'] });
51
- this._observer = observer;
52
- }
53
- }
54
- disconnectedCallback() {
55
- super.disconnectedCallback();
56
- this._observer?.disconnect();
57
63
  }
58
64
  getSiblingText() {
59
65
  const parent = this.parentElement;
@@ -61,14 +67,14 @@ let NileSideBarGroupItemIcon = class NileSideBarGroupItemIcon extends NileElemen
61
67
  return textEl?.textContent?.trim() ?? '';
62
68
  }
63
69
  render() {
64
- const isCollapsed = !!this.sidebar?.collapsed;
70
+ const isCollapsed = this.hasAttribute('collapsed');
65
71
  const text = this.tooltip || this.getSiblingText();
66
72
  if (isCollapsed && text) {
67
73
  return html `
68
74
 
69
75
  <slot>
70
76
  <nile-lite-tooltip hoist distance="18" content=${text} placement="right" enableVisibilityEffect=${this.enableVisibilityEffect} duration=${this.duration}>
71
- ${this.icon ? html `<nile-icon size=${this.size} color="var(--nile-colors-dark-900,var(--ng-colors-fg-quaternary-400))" name=${this.icon} method=${this.method}></nile-icon>` : null}
77
+ ${this.icon ? html `<nile-icon size=${this.size} color="currentColor" name=${this.icon} method=${this.method}></nile-icon>` : null}
72
78
  </nile-lite-tooltip>
73
79
  </slot>
74
80
 
@@ -76,7 +82,7 @@ let NileSideBarGroupItemIcon = class NileSideBarGroupItemIcon extends NileElemen
76
82
  }
77
83
  return html `
78
84
  <slot>
79
- ${this.icon ? html `<nile-icon size=${this.size} color="var(--nile-colors-dark-900,var(--ng-colors-fg-quaternary-400))" size="14" name=${this.icon} method=${this.method}></nile-icon>` : null}
85
+ ${this.icon ? html `<nile-icon size=${this.size} color="currentColor" name=${this.icon} method=${this.method}></nile-icon>` : null}
80
86
  </slot>
81
87
  `;
82
88
  }
@@ -1 +1 @@
1
- {"version":3,"file":"nile-side-bar-group-item-icon.js","sourceRoot":"","sources":["../../../src/nile-side-bar-group-item-icon/nile-side-bar-group-item-icon.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAE,IAAI,EAAkC,MAAM,KAAK,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAC7D,OAAO,WAAW,MAAM,0BAA0B,CAAC;AAGnD;;;;;;;;;GASG;AAEI,IAAM,wBAAwB,GAA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C,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;0DAAwB;AArBvE,wBAAwB;IADpC,aAAa,CAAC,+BAA+B,CAAC;GAClC,wBAAwB,CA4EpC;;AAED,eAAe,wBAAwB,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { html, CSSResultArray, TemplateResult } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { styles } from './nile-side-bar-group-item-icon.css';\nimport NileElement from '../internal/nile-element';\nimport type { NileSideBar } from '../nile-side-bar/nile-side-bar';\n\n/**\n * Nile side-bar-group-item-icon component.\n *\n * @tag nile-side-bar-group-item-icon\n *\n * @attr icon - The name of the icon to render inside <nile-icon>\n * @attr tooltip - Tooltip text shown when sidebar is collapsed\n *\n * @slot - Optional slot to override the icon completely\n */\n@customElement('nile-side-bar-group-item-icon')\nexport class NileSideBarGroupItemIcon extends NileElement {\n /**\n * Name of the icon (passed to <nile-icon name=\"\">)\n */\n @property({ type: String, reflect: true })\n icon: string = '';\n\n /**\n * Tooltip text (auto-synced from sibling text if available)\n */\n @property({ type: String })\n tooltip: string = '';\n\n @property({ type: String })\n method: string = 'fill';\n\n @property({ type: String })\n size: string = '14';\n\n @property ({type: Boolean, attribute: true, reflect: true}) enableVisibilityEffect: boolean = false;\n\n @property ({type: Number, attribute: true, reflect: true}) duration: number = 200;\n\n private sidebar: NileSideBar | null = null;\n\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n connectedCallback(): void {\n\tif (!this.hasAttribute('slot')) {\n\t\tthis.setAttribute('slot', 'icon');\n\t }\n\t \n super.connectedCallback();\n this.sidebar = this.closest('nile-side-bar') as NileSideBar | null;\n if (this.sidebar) {\n const observer = new MutationObserver(() => this.requestUpdate());\n observer.observe(this.sidebar, { attributes: true, attributeFilter: ['collapsed'] });\n (this as any)._observer = observer;\n }\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n (this as any)._observer?.disconnect();\n }\n\n private getSiblingText(): string {\n const parent = this.parentElement;\n const textEl = parent?.querySelector('nile-side-bar-group-item-text');\n return textEl?.textContent?.trim() ?? '';\n }\n\n public render(): TemplateResult {\n const isCollapsed = !!this.sidebar?.collapsed;\n const text = this.tooltip || this.getSiblingText();\n\n if (isCollapsed && text) {\n return html`\n\n <slot>\n <nile-lite-tooltip hoist distance=\"18\" content=${text} placement=\"right\" enableVisibilityEffect=${this.enableVisibilityEffect} duration=${this.duration}>\n ${this.icon ? html`<nile-icon size=${this.size} color=\"var(--nile-colors-dark-900,var(--ng-colors-fg-quaternary-400))\" name=${this.icon} method=${this.method}></nile-icon>` : null}\n </nile-lite-tooltip>\n </slot>\n\n `;\n }\n\n return html`\n <slot>\n ${this.icon ? html`<nile-icon size=${this.size} color=\"var(--nile-colors-dark-900,var(--ng-colors-fg-quaternary-400))\" size=\"14\" name=${this.icon} method=${this.method}></nile-icon>` : null}\n </slot>\n `;\n }\n}\n\nexport default NileSideBarGroupItemIcon;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-side-bar-group-item-icon': NileSideBarGroupItemIcon;\n }\n}\n"]}
1
+ {"version":3,"file":"nile-side-bar-group-item-icon.js","sourceRoot":"","sources":["../../../src/nile-side-bar-group-item-icon/nile-side-bar-group-item-icon.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAE,IAAI,EAAkC,MAAM,KAAK,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAC7D,OAAO,WAAW,MAAM,0BAA0B,CAAC;AAEnD;;;;;;;;;;;;GAYG;AAEI,IAAM,wBAAwB,GAA9B,MAAM,wBAAyB,SAAQ,WAAW;IAAlD;;QACL;;WAEG;QAEH,SAAI,GAAW,EAA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IAAI,CAAA;;;2DAG0C,IAAI,6CAA6C,IAAI,CAAC,sBAAsB,aAAa,IAAI,CAAC,QAAQ;cACnJ,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAA,mBAAmB,IAAI,CAAC,IAAI,+BAA+B,IAAI,CAAC,IAAI,WAAW,IAAI,CAAC,MAAM,eAAe,CAAC,CAAC,CAAC,IAAI;;;;OAIvI,CAAC;QACJ,CAAC;QAED,OAAO,IAAI,CAAA;;UAEL,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAA,mBAAmB,IAAI,CAAC,IAAI,8BAA8B,IAAI,CAAC,IAAI,WAAW,IAAI,CAAC,MAAM,eAAe,CAAC,CAAC,CAAC,IAAI;;KAEpI,CAAC;IACJ,CAAC;CACF,CAAA;AAxEC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;sDACxB;AAMlB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yDACN;AAGrB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;wDACH;AAIxB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;sDACsC;AAEL;IAA3D,QAAQ,CAAE,EAAC,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;wEAAyC;AAEzC;IAA1D,QAAQ,CAAE,EAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;0DAAwB;AAtBvE,wBAAwB;IADpC,aAAa,CAAC,+BAA+B,CAAC;GAClC,wBAAwB,CA6EpC;;AAED,eAAe,wBAAwB,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { html, CSSResultArray, TemplateResult } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { styles } from './nile-side-bar-group-item-icon.css';\nimport NileElement from '../internal/nile-element';\n\n/**\n * Nile side-bar-group-item-icon component.\n *\n * @tag nile-side-bar-group-item-icon\n *\n * @attr icon - The name of the icon to render inside <nile-icon>\n * @attr tooltip - Tooltip text shown when sidebar is collapsed\n *\n * @slot - Optional slot to override the icon completely\n *\n * The icon is drawn in the host's `color`, which nile-side-bar-group-item sets: fg-quaternary-400 by\n * default, fg-tertiary-hover on hover and text-brand-secondary-700 when selected.\n */\n@customElement('nile-side-bar-group-item-icon')\nexport class NileSideBarGroupItemIcon extends NileElement {\n /**\n * Name of the icon (passed to <nile-icon name=\"\">)\n */\n @property({ type: String, reflect: true })\n icon: string = '';\n\n /**\n * Tooltip text (auto-synced from sibling text if available)\n */\n @property({ type: String })\n tooltip: string = '';\n\n @property({ type: String })\n method: string = 'fill';\n\n /** Icon size: 14px on the enterprise sheet, 20px on NxtGen (the App Shell audit's menu icon), resolved by nile-icon from the theme tokens. */\n @property({ type: String })\n size: string = 'var(--nile-icon-size-14, var(--ng-height-20px))';\n\n @property ({type: Boolean, attribute: true, reflect: true}) enableVisibilityEffect: boolean = false;\n\n @property ({type: Number, attribute: true, reflect: true}) duration: number = 200;\n\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n /**\n * The container (nile-side-bar or nile-app-shell-side-nav) sets `[collapsed]` on this element, so\n * the tooltip follows that attribute rather than finding a parent sidebar. It has to re-render\n * when the attribute changes, and it is not a reactive property.\n */\n static get observedAttributes(): string[] {\n return [...super.observedAttributes, 'collapsed'];\n }\n\n attributeChangedCallback(name: string, old: string | null, value: string | null): void {\n super.attributeChangedCallback(name, old, value);\n if (name === 'collapsed') this.requestUpdate();\n }\n\n connectedCallback(): void {\n\tif (!this.hasAttribute('slot')) {\n\t\tthis.setAttribute('slot', 'icon');\n\t }\n super.connectedCallback();\n }\n\n private getSiblingText(): string {\n const parent = this.parentElement;\n const textEl = parent?.querySelector('nile-side-bar-group-item-text');\n return textEl?.textContent?.trim() ?? '';\n }\n\n public render(): TemplateResult {\n const isCollapsed = this.hasAttribute('collapsed');\n const text = this.tooltip || this.getSiblingText();\n\n if (isCollapsed && text) {\n return html`\n\n <slot>\n <nile-lite-tooltip hoist distance=\"18\" content=${text} placement=\"right\" enableVisibilityEffect=${this.enableVisibilityEffect} duration=${this.duration}>\n ${this.icon ? html`<nile-icon size=${this.size} color=\"currentColor\" name=${this.icon} method=${this.method}></nile-icon>` : null}\n </nile-lite-tooltip>\n </slot>\n\n `;\n }\n\n return html`\n <slot>\n ${this.icon ? html`<nile-icon size=${this.size} color=\"currentColor\" name=${this.icon} method=${this.method}></nile-icon>` : null}\n </slot>\n `;\n }\n}\n\nexport default NileSideBarGroupItemIcon;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-side-bar-group-item-icon': NileSideBarGroupItemIcon;\n }\n}\n"]}
@@ -7,9 +7,10 @@ export const styles = css `
7
7
  display: block;
8
8
  flex: 1 1 auto;
9
9
  min-width: 0;
10
- font-size: var(--nile-type-scale-3, var(--ng-font-size-text-md));
11
- line-height: var(--nile-line-height-small);
12
- font-weight: var(--nile-font-weight-medium, var(--ng-font-weight-medium));
10
+ /* NxtGen: Text sm/Semibold, 14/20; enterprise is unchanged. */
11
+ font-size: var(--nile-type-scale-3, var(--ng-font-size-text-sm));
12
+ line-height: var(--nile-line-height-small, var(--ng-line-height-text-sm));
13
+ font-weight: var(--nile-font-weight-medium, var(--ng-font-weight-semibold));
13
14
  font-family: var(--nile-font-family-serif, var(--ng-font-family-body));
14
15
  color: var(--nile-colors-dark-900, var(--ng-colors-text-secondary-700));
15
16
  white-space: nowrap;
@@ -21,8 +22,10 @@ export const styles = css `
21
22
  font: inherit;
22
23
  color: inherit;
23
24
  }
25
+ /* Enterprise hides the label in the rail. NxtGen keeps it laid out at full width and lets the 40px item clip it, as the Figma rail does. */
24
26
  :host([collapsed]) {
25
- display: none;
27
+ display: var(--nile-display-none, block);
28
+ flex: 0 0 auto;
26
29
  }
27
30
  `;
28
31
  export default [styles];
@@ -1 +1 @@
1
- {"version":3,"file":"nile-side-bar-group-item-text.css.js","sourceRoot":"","sources":["../../../src/nile-side-bar-group-item-text/nile-side-bar-group-item-text.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;CAsBxB,CAAC;AAEF,eAAe,CAAC,MAAM,CAAC,CAAC","sourcesContent":["import { css } from 'lit';\n\n/**\n * SideBarGroupItemText CSS\n */\nexport const styles = css`\n :host {\n display: block;\n flex: 1 1 auto; \n min-width: 0; \n font-size: var(--nile-type-scale-3, var(--ng-font-size-text-md)); \n line-height: var(--nile-line-height-small);\n font-weight: var(--nile-font-weight-medium, var(--ng-font-weight-medium));\n font-family: var(--nile-font-family-serif, var(--ng-font-family-body));\n color: var(--nile-colors-dark-900, var(--ng-colors-text-secondary-700));\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n ::slotted(*) {\n font: inherit;\n color: inherit;\n }\n :host([collapsed]) {\n display: none;\n }\n`;\n\nexport default [styles];\n"]}
1
+ {"version":3,"file":"nile-side-bar-group-item-text.css.js","sourceRoot":"","sources":["../../../src/nile-side-bar-group-item-text/nile-side-bar-group-item-text.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;CAyBxB,CAAC;AAEF,eAAe,CAAC,MAAM,CAAC,CAAC","sourcesContent":["import { css } from 'lit';\n\n/**\n * SideBarGroupItemText CSS\n */\nexport const styles = css`\n :host {\n display: block;\n flex: 1 1 auto; \n min-width: 0; \n /* NxtGen: Text sm/Semibold, 14/20; enterprise is unchanged. */\n font-size: var(--nile-type-scale-3, var(--ng-font-size-text-sm));\n line-height: var(--nile-line-height-small, var(--ng-line-height-text-sm));\n font-weight: var(--nile-font-weight-medium, var(--ng-font-weight-semibold));\n font-family: var(--nile-font-family-serif, var(--ng-font-family-body));\n color: var(--nile-colors-dark-900, var(--ng-colors-text-secondary-700));\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n ::slotted(*) {\n font: inherit;\n color: inherit;\n }\n /* Enterprise hides the label in the rail. NxtGen keeps it laid out at full width and lets the 40px item clip it, as the Figma rail does. */\n :host([collapsed]) {\n display: var(--nile-display-none, block);\n flex: 0 0 auto;\n }\n`;\n\nexport default [styles];\n"]}
@@ -6,18 +6,19 @@ import '../nile-side-bar-footer/nile-side-bar-footer';
6
6
  const TRANSPARENT = 'rgba(0, 0, 0, 0)';
7
7
  const SURFACE = 'rgb(1, 2, 3)';
8
8
  /**
9
- * nile-app-shell owns the nav track's surface, so it forces the slotted
10
- * sidebar's own background off:
9
+ * nile-app-shell owns the nav track's surface, so it sets the slotted
10
+ * sidebar's background to the sidebar's own bg-tertiary
11
+ * token:
11
12
  *
12
13
  * ::slotted([slot='side-nav']) {
13
- * background: var(--nile-app-shell-side-nav-bg, transparent) !important;
14
+ * background: var(--nile-colors-neutral-100, var(--ng-colors-bg-tertiary));
14
15
  * }
15
16
  *
16
17
  * That reaches the `nile-side-bar` only. The header and footer live one level
17
18
  * deeper — they are light-DOM children of the sidebar, slotted into ITS shadow
18
- * root — so the shell cannot see them, and their own surface color survives.
19
- * These tests pin that boundary down, because it is the whole reason
20
- * `background="transparent"` exists.
19
+ * root — so the shell cannot see them. The sidebar itself makes them paint nothing
20
+ * by default (`::slotted(nile-side-bar-header / -footer)`), so they show the sidebar
21
+ * surface with no `background` attribute. These tests pin that down.
21
22
  */
22
23
  async function shellWithSidebar(headerBg, footerBg) {
23
24
  const el = await fixture(html `
@@ -44,25 +45,29 @@ async function shellWithSidebar(headerBg, footerBg) {
44
45
  }
45
46
  const bg = (el) => getComputedStyle(el).backgroundColor;
46
47
  describe('side-bar header/footer inside nile-app-shell', () => {
47
- it('1. the shell strips the sidebar\'s own background', async () => {
48
+ it('1. the shell gives the sidebar the sidebar surface token (the same colour as the shell behind it)', async () => {
48
49
  const { sidebar } = await shellWithSidebar();
49
- expect(bg(sidebar)).to.equal(TRANSPARENT);
50
+ expect(bg(sidebar)).to.equal(SURFACE);
50
51
  });
51
- it('2. without the new property the header/footer keep painting a surface, which is the seam', async () => {
52
- const { header, footer } = await shellWithSidebar();
53
- expect(bg(header)).to.equal(SURFACE);
54
- expect(bg(footer)).to.equal(SURFACE);
52
+ it('2. with no property the header and footer paint nothing and follow the sidebar surface, so there is no seam', async () => {
53
+ const { sidebar, header, footer } = await shellWithSidebar();
54
+ expect(bg(sidebar)).to.equal(SURFACE);
55
+ expect(bg(header)).to.equal(TRANSPARENT);
56
+ expect(bg(footer)).to.equal(TRANSPARENT);
55
57
  });
56
58
  it('3. background="transparent" closes the seam — nav track is one flat surface', async () => {
57
59
  const { sidebar, header, footer } = await shellWithSidebar('transparent', 'transparent');
58
- expect(bg(sidebar)).to.equal(TRANSPARENT);
60
+ expect(bg(sidebar)).to.equal(SURFACE);
59
61
  expect(bg(header)).to.equal(TRANSPARENT);
60
62
  expect(bg(footer)).to.equal(TRANSPARENT);
61
63
  });
62
- it('4. the shell\'s !important rule does not override the header/footer either way', async () => {
63
- const { header, footer } = await shellWithSidebar('default', 'transparent');
64
- expect(bg(header)).to.equal(SURFACE);
65
- expect(bg(footer)).to.equal(TRANSPARENT);
64
+ it('4. every header/footer background value gives the same visible surface inside the sidebar', async () => {
65
+ for (const [headerBg, footerBg] of [['default', 'transparent'], ['transparent', 'default'], ['transparent', 'transparent']]) {
66
+ const { sidebar, header, footer } = await shellWithSidebar(headerBg, footerBg);
67
+ expect(bg(sidebar), `${headerBg}/${footerBg}`).to.equal(SURFACE);
68
+ expect(bg(header), `header ${headerBg}`).to.equal(TRANSPARENT);
69
+ expect(bg(footer), `footer ${footerBg}`).to.equal(TRANSPARENT);
70
+ }
66
71
  });
67
72
  });
68
73
  //# sourceMappingURL=nile-side-bar-app-shell.test.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nile-side-bar-app-shell.test.js","sourceRoot":"","sources":["../../../src/nile-side-bar-header/nile-side-bar-app-shell.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,kCAAkC,CAAC;AAC1C,OAAO,gCAAgC,CAAC;AACxC,OAAO,wBAAwB,CAAC;AAChC,OAAO,8CAA8C,CAAC;AAKtD,MAAM,WAAW,GAAG,kBAAkB,CAAC;AACvC,MAAM,OAAO,GAAG,cAAc,CAAC;AAE/B;;;;;;;;;;;;;GAaG;AACH,KAAK,UAAU,gBAAgB,CAAC,QAAiB,EAAE,QAAiB;IAClE,MAAM,EAAE,GAAG,MAAM,OAAO,CAAe,IAAI,CAAA;sFACyC,OAAO;;0DAEnC,QAAQ,IAAI,SAAS;;;0DAGrB,QAAQ,IAAI,SAAS;;;;;;;GAO5E,CAAC,CAAC;IACH,MAAM,SAAS,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,YAAY,CAAC,cAAc,CAAC,CAAC,CAAC;IAEvD,MAAM,OAAO,GAAG,EAAE,CAAC,aAAa,CAAC,eAAe,CAAgB,CAAC;IACjE,MAAM,MAAM,GAAG,EAAE,CAAC,aAAa,CAAC,sBAAsB,CAAsB,CAAC;IAC7E,MAAM,MAAM,GAAG,EAAE,CAAC,aAAa,CAAC,sBAAsB,CAAsB,CAAC;IAC7E,MAAM,MAAM,CAAC,cAAc,CAAC;IAC5B,MAAM,MAAM,CAAC,cAAc,CAAC;IAC5B,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;AACzC,CAAC;AAED,M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IAAI,EAAE;QAC9F,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,gBAAgB,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC;QAC5E,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACrC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;IAC3C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { expect, fixture, html, waitUntil } from '@open-wc/testing';\nimport '../nile-app-shell/nile-app-shell';\nimport '../nile-side-bar/nile-side-bar';\nimport './nile-side-bar-header';\nimport '../nile-side-bar-footer/nile-side-bar-footer';\nimport type { NileAppShell } from '../nile-app-shell/nile-app-shell';\nimport type { NileSideBarHeader } from './nile-side-bar-header';\nimport type { NileSideBarFooter } from '../nile-side-bar-footer/nile-side-bar-footer';\n\nconst TRANSPARENT = 'rgba(0, 0, 0, 0)';\nconst SURFACE = 'rgb(1, 2, 3)';\n\n/**\n * nile-app-shell owns the nav track's surface, so it forces the slotted\n * sidebar's own background off:\n *\n * ::slotted([slot='side-nav']) {\n * background: var(--nile-app-shell-side-nav-bg, transparent) !important;\n * }\n *\n * That reaches the `nile-side-bar` only. The header and footer live one level\n * deeper — they are light-DOM children of the sidebar, slotted into ITS shadow\n * root — so the shell cannot see them, and their own surface color survives.\n * These tests pin that boundary down, because it is the whole reason\n * `background=\"transparent\"` exists.\n */\nasync function shellWithSidebar(headerBg?: string, footerBg?: string) {\n const el = await fixture<NileAppShell>(html`\n <nile-app-shell style=\"width: 1400px; height: 600px; --nile-colors-neutral-100: ${SURFACE};\">\n <nile-side-bar slot=\"side-nav\">\n <nile-side-bar-header slot=\"header\" background=\"${headerBg ?? 'default'}\">\n <span slot=\"logo\">Logo</span>\n </nile-side-bar-header>\n <nile-side-bar-footer slot=\"footer\" background=\"${footerBg ?? 'default'}\">\n <span>Help</span>\n </nile-side-bar-footer>\n </nile-side-bar>\n <span slot=\"top-bar\">Title</span>\n <p>page</p>\n </nile-app-shell>\n `);\n await waitUntil(() => el.hasAttribute('has-side-nav'));\n\n const sidebar = el.querySelector('nile-side-bar') as HTMLElement;\n const header = el.querySelector('nile-side-bar-header') as NileSideBarHeader;\n const footer = el.querySelector('nile-side-bar-footer') as NileSideBarFooter;\n await header.updateComplete;\n await footer.updateComplete;\n return { el, sidebar, header, footer };\n}\n\nconst bg = (el: HTMLElement) => getComputedStyle(el).backgroundColor;\n\ndescribe('side-bar header/footer inside nile-app-shell', () => {\n it('1. the shell strips the sidebar\\'s own background', async () => {\n const { sidebar } = await shellWithSidebar();\n expect(bg(sidebar)).to.equal(TRANSPARENT);\n });\n\n it('2. without the new property the header/footer keep painting a surface, which is the seam', async () => {\n const { header, footer } = await shellWithSidebar();\n expect(bg(header)).to.equal(SURFACE);\n expect(bg(footer)).to.equal(SURFACE);\n });\n\n it('3. background=\"transparent\" closes the seam — nav track is one flat surface', async () => {\n const { sidebar, header, footer } = await shellWithSidebar('transparent', 'transparent');\n expect(bg(sidebar)).to.equal(TRANSPARENT);\n expect(bg(header)).to.equal(TRANSPARENT);\n expect(bg(footer)).to.equal(TRANSPARENT);\n });\n\n it('4. the shell\\'s !important rule does not override the header/footer either way', async () => {\n const { header, footer } = await shellWithSidebar('default', 'transparent');\n expect(bg(header)).to.equal(SURFACE);\n expect(bg(footer)).to.equal(TRANSPARENT);\n });\n});\n"]}
1
+ {"version":3,"file":"nile-side-bar-app-shell.test.js","sourceRoot":"","sources":["../../../src/nile-side-bar-header/nile-side-bar-app-shell.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,kCAAkC,CAAC;AAC1C,OAAO,gCAAgC,CAAC;AACxC,OAAO,wBAAwB,CAAC;AAChC,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EAAE,CAAC,OAAO,CAAC,EAAE,GAAG,QAAQ,IAAI,QAAQ,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;YACjE,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,UAAU,QAAQ,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;YAC/D,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,UAAU,QAAQ,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;QACjE,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { expect, fixture, html, waitUntil } from '@open-wc/testing';\nimport '../nile-app-shell/nile-app-shell';\nimport '../nile-side-bar/nile-side-bar';\nimport './nile-side-bar-header';\nimport '../nile-side-bar-footer/nile-side-bar-footer';\nimport type { NileAppShell } from '../nile-app-shell/nile-app-shell';\nimport type { NileSideBarHeader } from './nile-side-bar-header';\nimport type { NileSideBarFooter } from '../nile-side-bar-footer/nile-side-bar-footer';\n\nconst TRANSPARENT = 'rgba(0, 0, 0, 0)';\nconst SURFACE = 'rgb(1, 2, 3)';\n\n/**\n * nile-app-shell owns the nav track's surface, so it sets the slotted\n * sidebar's background to the sidebar's own bg-tertiary\n * token:\n *\n * ::slotted([slot='side-nav']) {\n * background: var(--nile-colors-neutral-100, var(--ng-colors-bg-tertiary));\n * }\n *\n * That reaches the `nile-side-bar` only. The header and footer live one level\n * deeper — they are light-DOM children of the sidebar, slotted into ITS shadow\n * root — so the shell cannot see them. The sidebar itself makes them paint nothing\n * by default (`::slotted(nile-side-bar-header / -footer)`), so they show the sidebar\n * surface with no `background` attribute. These tests pin that down.\n */\nasync function shellWithSidebar(headerBg?: string, footerBg?: string) {\n const el = await fixture<NileAppShell>(html`\n <nile-app-shell style=\"width: 1400px; height: 600px; --nile-colors-neutral-100: ${SURFACE};\">\n <nile-side-bar slot=\"side-nav\">\n <nile-side-bar-header slot=\"header\" background=\"${headerBg ?? 'default'}\">\n <span slot=\"logo\">Logo</span>\n </nile-side-bar-header>\n <nile-side-bar-footer slot=\"footer\" background=\"${footerBg ?? 'default'}\">\n <span>Help</span>\n </nile-side-bar-footer>\n </nile-side-bar>\n <span slot=\"top-bar\">Title</span>\n <p>page</p>\n </nile-app-shell>\n `);\n await waitUntil(() => el.hasAttribute('has-side-nav'));\n\n const sidebar = el.querySelector('nile-side-bar') as HTMLElement;\n const header = el.querySelector('nile-side-bar-header') as NileSideBarHeader;\n const footer = el.querySelector('nile-side-bar-footer') as NileSideBarFooter;\n await header.updateComplete;\n await footer.updateComplete;\n return { el, sidebar, header, footer };\n}\n\nconst bg = (el: HTMLElement) => getComputedStyle(el).backgroundColor;\n\ndescribe('side-bar header/footer inside nile-app-shell', () => {\n it('1. the shell gives the sidebar the sidebar surface token (the same colour as the shell behind it)', async () => {\n const { sidebar } = await shellWithSidebar();\n expect(bg(sidebar)).to.equal(SURFACE);\n });\n\n it('2. with no property the header and footer paint nothing and follow the sidebar surface, so there is no seam', async () => {\n const { sidebar, header, footer } = await shellWithSidebar();\n expect(bg(sidebar)).to.equal(SURFACE);\n expect(bg(header)).to.equal(TRANSPARENT);\n expect(bg(footer)).to.equal(TRANSPARENT);\n });\n\n it('3. background=\"transparent\" closes the seam — nav track is one flat surface', async () => {\n const { sidebar, header, footer } = await shellWithSidebar('transparent', 'transparent');\n expect(bg(sidebar)).to.equal(SURFACE);\n expect(bg(header)).to.equal(TRANSPARENT);\n expect(bg(footer)).to.equal(TRANSPARENT);\n });\n\n it('4. every header/footer background value gives the same visible surface inside the sidebar', async () => {\n for (const [headerBg, footerBg] of [['default', 'transparent'], ['transparent', 'default'], ['transparent', 'transparent']]) {\n const { sidebar, header, footer } = await shellWithSidebar(headerBg, footerBg);\n expect(bg(sidebar), `${headerBg}/${footerBg}`).to.equal(SURFACE);\n expect(bg(header), `header ${headerBg}`).to.equal(TRANSPARENT);\n expect(bg(footer), `footer ${footerBg}`).to.equal(TRANSPARENT);\n }\n });\n});\n"]}
@@ -0,0 +1,4 @@
1
+ import '../nile-side-bar/nile-side-bar';
2
+ import './nile-side-bar-header';
3
+ import '../nile-side-bar-footer/nile-side-bar-footer';
4
+ import '../nile-side-bar-group/nile-side-bar-group';
@@ -0,0 +1,143 @@
1
+ import { expect, fixture, html } from '@open-wc/testing';
2
+ import { ifDefined } from 'lit/directives/if-defined.js';
3
+ import '../nile-side-bar/nile-side-bar';
4
+ import './nile-side-bar-header';
5
+ import '../nile-side-bar-footer/nile-side-bar-footer';
6
+ import '../nile-side-bar-group/nile-side-bar-group';
7
+ const TRANSPARENT = 'rgba(0, 0, 0, 0)';
8
+ const loadSheet = (href) => new Promise((resolveLoad, reject) => {
9
+ const link = document.createElement('link');
10
+ link.rel = 'stylesheet';
11
+ link.href = href;
12
+ link.onload = () => resolveLoad(link);
13
+ link.onerror = () => reject(new Error(`could not load ${href}`));
14
+ document.head.append(link);
15
+ });
16
+ // A token's colour as the browser resolves it, so no hex value is written in this file.
17
+ const resolve = (token) => {
18
+ const probe = document.createElement('div');
19
+ probe.style.backgroundColor = `var(${token})`;
20
+ document.body.append(probe);
21
+ const colour = getComputedStyle(probe).backgroundColor;
22
+ probe.remove();
23
+ return colour;
24
+ };
25
+ const mount = async ({ background, collapsed, style } = {}) => {
26
+ const bar = await fixture(html `
27
+ <nile-side-bar ?collapsed=${collapsed} style="transition: none">
28
+ <nile-side-bar-header background=${ifDefined(background)} style=${ifDefined(style)}>
29
+ <span slot="logo">Aquera</span>
30
+ </nile-side-bar-header>
31
+ <nile-side-bar-group></nile-side-bar-group>
32
+ <nile-side-bar-footer background=${ifDefined(background)} style=${ifDefined(style)}></nile-side-bar-footer>
33
+ </nile-side-bar>
34
+ `);
35
+ const header = bar.querySelector('nile-side-bar-header');
36
+ const footer = bar.querySelector('nile-side-bar-footer');
37
+ await header.updateComplete;
38
+ await footer.updateComplete;
39
+ await bar.updateComplete;
40
+ return { bar, header, footer };
41
+ };
42
+ const bgOf = (el) => getComputedStyle(el).backgroundColor;
43
+ /** The header paints nothing, so what shows through it is the sidebar's own surface. */
44
+ const expectOneSurface = (bar, header, surface, label) => {
45
+ expect(bgOf(header), `${label}: header paints nothing`).to.equal(TRANSPARENT);
46
+ const footer = bar.querySelector('nile-side-bar-footer');
47
+ expect(bgOf(footer), `${label}: footer paints nothing`).to.equal(TRANSPARENT);
48
+ expect(bgOf(bar), `${label}: sidebar surface`).to.equal(surface);
49
+ };
50
+ for (const theme of ['light', 'dark']) {
51
+ describe(`nile-side-bar-header surface (NxtGen ${theme})`, () => {
52
+ let sheet;
53
+ before(async () => {
54
+ sheet = await loadSheet('/demo/nxtgen-dark.css');
55
+ });
56
+ after(() => {
57
+ sheet.remove();
58
+ document.documentElement.removeAttribute('data-theme');
59
+ });
60
+ beforeEach(() => document.documentElement.setAttribute('data-theme', theme));
61
+ it('follows the sidebar bg-tertiary with no background attribute, expanded and collapsed', async () => {
62
+ for (const collapsed of [false, true]) {
63
+ const { bar, header } = await mount({ collapsed });
64
+ expectOneSurface(bar, header, resolve('--ng-colors-bg-tertiary'), collapsed ? 'collapsed' : 'expanded');
65
+ }
66
+ });
67
+ it('is not the old bg-primary default', async () => {
68
+ const { header } = await mount();
69
+ expect(bgOf(header)).to.not.equal(resolve('--ng-colors-bg-primary'));
70
+ });
71
+ it('reflects background="default" and still follows the sidebar', async () => {
72
+ const { bar, header } = await mount();
73
+ expect(header.getAttribute('background')).to.equal('default');
74
+ expectOneSurface(bar, header, resolve('--ng-colors-bg-tertiary'), 'default');
75
+ });
76
+ it('keeps background="transparent" working', async () => {
77
+ const { bar, header } = await mount({ background: 'transparent' });
78
+ expectOneSurface(bar, header, resolve('--ng-colors-bg-tertiary'), 'transparent');
79
+ });
80
+ it('lets an author rule on the header win over the sidebar default', async () => {
81
+ const { header, footer } = await mount({ style: 'background: rgb(9, 8, 7)' });
82
+ expect(bgOf(header)).to.equal('rgb(9, 8, 7)');
83
+ expect(bgOf(footer)).to.equal('rgb(9, 8, 7)');
84
+ });
85
+ it('a header on its own keeps painting bg-primary, and transparent still removes it', async () => {
86
+ const alone = await fixture(html `<nile-side-bar-header></nile-side-bar-header>`);
87
+ expect(bgOf(alone)).to.equal(resolve('--ng-colors-bg-primary'));
88
+ const bare = await fixture(html `<nile-side-bar-header background="transparent"></nile-side-bar-header>`);
89
+ expect(bgOf(bare)).to.equal(TRANSPARENT);
90
+ const footer = await fixture(html `<nile-side-bar-footer></nile-side-bar-footer>`);
91
+ expect(bgOf(footer), 'a footer on its own keeps bg-primary').to.equal(resolve('--ng-colors-bg-primary'));
92
+ const bareFooter = await fixture(html `<nile-side-bar-footer background="transparent"></nile-side-bar-footer>`);
93
+ expect(bgOf(bareFooter)).to.equal(TRANSPARENT);
94
+ });
95
+ it('changes no sidebar border, width or header spacing', async () => {
96
+ const expanded = await mount();
97
+ expect(getComputedStyle(expanded.bar).borderRightWidth, 'no NxtGen right border').to.equal('0px');
98
+ expect(expanded.bar.getBoundingClientRect().width).to.equal(260);
99
+ const style = getComputedStyle(expanded.header);
100
+ expect([style.paddingTop, style.paddingLeft, style.paddingRight, style.paddingBottom]).to.deep.equal([
101
+ '12px',
102
+ '16px',
103
+ '16px',
104
+ '16px',
105
+ ]);
106
+ const collapsed = await mount({ collapsed: true });
107
+ expect(collapsed.bar.getBoundingClientRect().width).to.equal(72);
108
+ expect(getComputedStyle(collapsed.bar).borderRightWidth).to.equal('0px');
109
+ });
110
+ });
111
+ }
112
+ describe('nile-side-bar-header surface (Enterprise)', () => {
113
+ let sheet;
114
+ before(async () => {
115
+ sheet = await loadSheet('/demo/variables.css');
116
+ });
117
+ after(() => sheet.remove());
118
+ it('follows the enterprise sidebar surface (neutral-100) with no background attribute, expanded and collapsed', async () => {
119
+ for (const collapsed of [false, true]) {
120
+ const { bar, header } = await mount({ collapsed });
121
+ expectOneSurface(bar, header, resolve('--nile-colors-neutral-100'), collapsed ? 'collapsed' : 'expanded');
122
+ }
123
+ });
124
+ it('leaves the enterprise sidebar border and size as they were', async () => {
125
+ const { bar } = await mount();
126
+ expect(getComputedStyle(bar).borderRightWidth).to.equal('1px');
127
+ // 240px of width plus the 1px enterprise border (content-box), unchanged by the header.
128
+ expect(bar.getBoundingClientRect().width).to.equal(241);
129
+ const collapsed = await mount({ collapsed: true });
130
+ expect(collapsed.bar.getBoundingClientRect().width).to.equal(71);
131
+ });
132
+ it('keeps background="transparent" working', async () => {
133
+ const { bar, header } = await mount({ background: 'transparent' });
134
+ expectOneSurface(bar, header, resolve('--nile-colors-neutral-100'), 'transparent');
135
+ });
136
+ it('a header or footer on its own keeps painting neutral-100', async () => {
137
+ const alone = await fixture(html `<nile-side-bar-header></nile-side-bar-header>`);
138
+ expect(bgOf(alone)).to.equal(resolve('--nile-colors-neutral-100'));
139
+ const footer = await fixture(html `<nile-side-bar-footer></nile-side-bar-footer>`);
140
+ expect(bgOf(footer)).to.equal(resolve('--nile-colors-neutral-100'));
141
+ });
142
+ });
143
+ //# sourceMappingURL=nile-side-bar-header-surface.test.js.map