@aquera/nile-elements 2.0.5 → 2.0.7

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 (237) hide show
  1. package/README.md +7 -0
  2. package/demo/nxtgen-classes.css +15 -12
  3. package/demo/nxtgen-dark.css +24 -24
  4. package/demo/nxtgen-properties.css +27 -24
  5. package/demo/nxtgen-utilities.css +39 -36
  6. package/demo/nxtgen.css +15 -12
  7. package/demo/utilities.css +3 -0
  8. package/demo/variables.css +3 -0
  9. package/dist/index.cjs.js +1 -1
  10. package/dist/index.esm.js +1 -1
  11. package/dist/index.js +1363 -340
  12. package/dist/internal/glyph.cjs.js +1 -1
  13. package/dist/internal/glyph.cjs.js.map +1 -1
  14. package/dist/internal/glyph.esm.js +6 -5
  15. package/dist/nile-app-shell/index.cjs.js +2 -0
  16. package/dist/nile-app-shell/index.cjs.js.map +1 -0
  17. package/dist/nile-app-shell/index.esm.js +1 -0
  18. package/dist/nile-app-shell/nile-app-shell.cjs.js +2 -0
  19. package/dist/nile-app-shell/nile-app-shell.cjs.js.map +1 -0
  20. package/dist/nile-app-shell/nile-app-shell.css.cjs.js +2 -0
  21. package/dist/nile-app-shell/nile-app-shell.css.cjs.js.map +1 -0
  22. package/dist/nile-app-shell/nile-app-shell.css.esm.js +554 -0
  23. package/dist/nile-app-shell/nile-app-shell.esm.js +155 -0
  24. package/dist/nile-app-shell/shell-controller.cjs.js +2 -0
  25. package/dist/nile-app-shell/shell-controller.cjs.js.map +1 -0
  26. package/dist/nile-app-shell/shell-controller.esm.js +1 -0
  27. package/dist/nile-app-shell-main/index.cjs.js +2 -0
  28. package/dist/nile-app-shell-main/index.cjs.js.map +1 -0
  29. package/dist/nile-app-shell-main/index.esm.js +1 -0
  30. package/dist/nile-app-shell-main/nile-app-shell-main.cjs.js +2 -0
  31. package/dist/nile-app-shell-main/nile-app-shell-main.cjs.js.map +1 -0
  32. package/dist/nile-app-shell-main/nile-app-shell-main.css.cjs.js +2 -0
  33. package/dist/nile-app-shell-main/nile-app-shell-main.css.cjs.js.map +1 -0
  34. package/dist/nile-app-shell-main/nile-app-shell-main.css.esm.js +18 -0
  35. package/dist/nile-app-shell-main/nile-app-shell-main.esm.js +1 -0
  36. package/dist/nile-app-shell-nav-toggle/index.cjs.js +2 -0
  37. package/dist/nile-app-shell-nav-toggle/index.cjs.js.map +1 -0
  38. package/dist/nile-app-shell-nav-toggle/index.esm.js +1 -0
  39. package/dist/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.cjs.js +2 -0
  40. package/dist/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.cjs.js.map +1 -0
  41. package/dist/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.css.cjs.js +2 -0
  42. package/dist/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.css.cjs.js.map +1 -0
  43. package/dist/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.css.esm.js +29 -0
  44. package/dist/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.esm.js +16 -0
  45. package/dist/nile-app-shell-panel/index.cjs.js +2 -0
  46. package/dist/nile-app-shell-panel/index.cjs.js.map +1 -0
  47. package/dist/nile-app-shell-panel/index.esm.js +1 -0
  48. package/dist/nile-app-shell-panel/nile-app-shell-panel.cjs.js +2 -0
  49. package/dist/nile-app-shell-panel/nile-app-shell-panel.cjs.js.map +1 -0
  50. package/dist/nile-app-shell-panel/nile-app-shell-panel.css.cjs.js +2 -0
  51. package/dist/nile-app-shell-panel/nile-app-shell-panel.css.cjs.js.map +1 -0
  52. package/dist/nile-app-shell-panel/nile-app-shell-panel.css.esm.js +103 -0
  53. package/dist/nile-app-shell-panel/nile-app-shell-panel.esm.js +33 -0
  54. package/dist/nile-app-shell-side-nav/index.cjs.js +2 -0
  55. package/dist/nile-app-shell-side-nav/index.cjs.js.map +1 -0
  56. package/dist/nile-app-shell-side-nav/index.esm.js +1 -0
  57. package/dist/nile-app-shell-side-nav/nile-app-shell-side-nav.cjs.js +2 -0
  58. package/dist/nile-app-shell-side-nav/nile-app-shell-side-nav.cjs.js.map +1 -0
  59. package/dist/nile-app-shell-side-nav/nile-app-shell-side-nav.css.cjs.js +2 -0
  60. package/dist/nile-app-shell-side-nav/nile-app-shell-side-nav.css.cjs.js.map +1 -0
  61. package/dist/nile-app-shell-side-nav/nile-app-shell-side-nav.css.esm.js +55 -0
  62. package/dist/nile-app-shell-side-nav/nile-app-shell-side-nav.esm.js +5 -0
  63. package/dist/nile-floating-panel/nile-floating-panel.cjs.js +1 -1
  64. package/dist/nile-floating-panel/nile-floating-panel.cjs.js.map +1 -1
  65. package/dist/nile-floating-panel/nile-floating-panel.css.cjs.js +1 -1
  66. package/dist/nile-floating-panel/nile-floating-panel.css.cjs.js.map +1 -1
  67. package/dist/nile-floating-panel/nile-floating-panel.css.esm.js +46 -8
  68. package/dist/nile-floating-panel/nile-floating-panel.esm.js +1 -1
  69. package/dist/nile-popover/nile-popover.cjs.js +1 -1
  70. package/dist/nile-popover/nile-popover.cjs.js.map +1 -1
  71. package/dist/nile-popover/nile-popover.css.cjs.js +1 -1
  72. package/dist/nile-popover/nile-popover.css.cjs.js.map +1 -1
  73. package/dist/nile-popover/nile-popover.css.esm.js +32 -17
  74. package/dist/nile-popover/nile-popover.esm.js +1 -1
  75. package/dist/nile-side-bar-footer/nile-side-bar-footer.cjs.js +1 -1
  76. package/dist/nile-side-bar-footer/nile-side-bar-footer.cjs.js.map +1 -1
  77. package/dist/nile-side-bar-footer/nile-side-bar-footer.css.cjs.js +1 -1
  78. package/dist/nile-side-bar-footer/nile-side-bar-footer.css.cjs.js.map +1 -1
  79. package/dist/nile-side-bar-footer/nile-side-bar-footer.css.esm.js +5 -0
  80. package/dist/nile-side-bar-footer/nile-side-bar-footer.esm.js +2 -2
  81. package/dist/nile-side-bar-header/nile-side-bar-header.cjs.js +1 -1
  82. package/dist/nile-side-bar-header/nile-side-bar-header.cjs.js.map +1 -1
  83. package/dist/nile-side-bar-header/nile-side-bar-header.css.cjs.js +1 -1
  84. package/dist/nile-side-bar-header/nile-side-bar-header.css.cjs.js.map +1 -1
  85. package/dist/nile-side-bar-header/nile-side-bar-header.css.esm.js +5 -0
  86. package/dist/nile-side-bar-header/nile-side-bar-header.esm.js +2 -2
  87. package/dist/nile-wysiwyg-editor/index.cjs.js +1 -1
  88. package/dist/nile-wysiwyg-editor/index.esm.js +1 -1
  89. package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.cjs.js +1 -1
  90. package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.esm.js +1 -1
  91. package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/index.cjs.js +1 -1
  92. package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/index.esm.js +1 -1
  93. package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.cjs.js +1 -1
  94. package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.esm.js +1 -1
  95. package/dist/nile-wysiwyg-editor/ui/bubble-menu.cjs.js +1 -1
  96. package/dist/nile-wysiwyg-editor/ui/bubble-menu.cjs.js.map +1 -1
  97. package/dist/nile-wysiwyg-editor/ui/bubble-menu.esm.js +1 -1
  98. package/dist/nile-wysiwyg-editor/ui/embed-menu.cjs.js +1 -1
  99. package/dist/nile-wysiwyg-editor/ui/embed-menu.cjs.js.map +1 -1
  100. package/dist/nile-wysiwyg-editor/ui/embed-menu.esm.js +2 -2
  101. package/dist/nile-wysiwyg-editor/ui/image-menu.cjs.js +1 -1
  102. package/dist/nile-wysiwyg-editor/ui/image-menu.cjs.js.map +1 -1
  103. package/dist/nile-wysiwyg-editor/ui/image-menu.esm.js +4 -4
  104. package/dist/nile-wysiwyg-editor/ui/table-menu.cjs.js +1 -1
  105. package/dist/nile-wysiwyg-editor/ui/table-menu.cjs.js.map +1 -1
  106. package/dist/nile-wysiwyg-editor/ui/table-menu.esm.js +1 -1
  107. package/dist/src/index.d.ts +7 -2
  108. package/dist/src/index.js +6 -1
  109. package/dist/src/index.js.map +1 -1
  110. package/dist/src/internal/glyph.d.ts +6 -1
  111. package/dist/src/internal/glyph.js +8 -1
  112. package/dist/src/internal/glyph.js.map +1 -1
  113. package/dist/src/nile-app-shell/index.d.ts +7 -0
  114. package/dist/src/nile-app-shell/index.js +8 -0
  115. package/dist/src/nile-app-shell/index.js.map +1 -0
  116. package/dist/src/nile-app-shell/nile-app-shell-regions.test.d.ts +4 -0
  117. package/dist/src/nile-app-shell/nile-app-shell-regions.test.js +177 -0
  118. package/dist/src/nile-app-shell/nile-app-shell-regions.test.js.map +1 -0
  119. package/dist/src/nile-app-shell/nile-app-shell.css.d.ts +18 -0
  120. package/dist/src/nile-app-shell/nile-app-shell.css.js +572 -0
  121. package/dist/src/nile-app-shell/nile-app-shell.css.js.map +1 -0
  122. package/dist/src/nile-app-shell/nile-app-shell.d.ts +292 -0
  123. package/dist/src/nile-app-shell/nile-app-shell.js +796 -0
  124. package/dist/src/nile-app-shell/nile-app-shell.js.map +1 -0
  125. package/dist/src/nile-app-shell/nile-app-shell.test.d.ts +3 -0
  126. package/dist/src/nile-app-shell/nile-app-shell.test.js +454 -0
  127. package/dist/src/nile-app-shell/nile-app-shell.test.js.map +1 -0
  128. package/dist/src/nile-app-shell/shell-controller.d.ts +34 -0
  129. package/dist/src/nile-app-shell/shell-controller.js +80 -0
  130. package/dist/src/nile-app-shell/shell-controller.js.map +1 -0
  131. package/dist/src/nile-app-shell-main/index.d.ts +7 -0
  132. package/dist/src/nile-app-shell-main/index.js +8 -0
  133. package/dist/src/nile-app-shell-main/index.js.map +1 -0
  134. package/dist/src/nile-app-shell-main/nile-app-shell-main.css.d.ts +9 -0
  135. package/dist/src/nile-app-shell-main/nile-app-shell-main.css.js +27 -0
  136. package/dist/src/nile-app-shell-main/nile-app-shell-main.css.js.map +1 -0
  137. package/dist/src/nile-app-shell-main/nile-app-shell-main.d.ts +38 -0
  138. package/dist/src/nile-app-shell-main/nile-app-shell-main.js +51 -0
  139. package/dist/src/nile-app-shell-main/nile-app-shell-main.js.map +1 -0
  140. package/dist/src/nile-app-shell-nav-toggle/index.d.ts +7 -0
  141. package/dist/src/nile-app-shell-nav-toggle/index.js +8 -0
  142. package/dist/src/nile-app-shell-nav-toggle/index.js.map +1 -0
  143. package/dist/src/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.css.d.ts +13 -0
  144. package/dist/src/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.css.js +42 -0
  145. package/dist/src/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.css.js.map +1 -0
  146. package/dist/src/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.d.ts +56 -0
  147. package/dist/src/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.js +126 -0
  148. package/dist/src/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.js.map +1 -0
  149. package/dist/src/nile-app-shell-panel/index.d.ts +7 -0
  150. package/dist/src/nile-app-shell-panel/index.js +8 -0
  151. package/dist/src/nile-app-shell-panel/index.js.map +1 -0
  152. package/dist/src/nile-app-shell-panel/nile-app-shell-panel.css.d.ts +9 -0
  153. package/dist/src/nile-app-shell-panel/nile-app-shell-panel.css.js +112 -0
  154. package/dist/src/nile-app-shell-panel/nile-app-shell-panel.css.js.map +1 -0
  155. package/dist/src/nile-app-shell-panel/nile-app-shell-panel.d.ts +73 -0
  156. package/dist/src/nile-app-shell-panel/nile-app-shell-panel.js +158 -0
  157. package/dist/src/nile-app-shell-panel/nile-app-shell-panel.js.map +1 -0
  158. package/dist/src/nile-app-shell-side-nav/index.d.ts +7 -0
  159. package/dist/src/nile-app-shell-side-nav/index.js +8 -0
  160. package/dist/src/nile-app-shell-side-nav/index.js.map +1 -0
  161. package/dist/src/nile-app-shell-side-nav/nile-app-shell-side-nav.css.d.ts +13 -0
  162. package/dist/src/nile-app-shell-side-nav/nile-app-shell-side-nav.css.js +68 -0
  163. package/dist/src/nile-app-shell-side-nav/nile-app-shell-side-nav.css.js.map +1 -0
  164. package/dist/src/nile-app-shell-side-nav/nile-app-shell-side-nav.d.ts +54 -0
  165. package/dist/src/nile-app-shell-side-nav/nile-app-shell-side-nav.js +83 -0
  166. package/dist/src/nile-app-shell-side-nav/nile-app-shell-side-nav.js.map +1 -0
  167. package/dist/src/nile-floating-panel/nile-floating-panel.css.js +46 -8
  168. package/dist/src/nile-floating-panel/nile-floating-panel.css.js.map +1 -1
  169. package/dist/src/nile-floating-panel/nile-floating-panel.js +13 -1
  170. package/dist/src/nile-floating-panel/nile-floating-panel.js.map +1 -1
  171. package/dist/src/nile-popover/nile-popover.css.js +30 -15
  172. package/dist/src/nile-popover/nile-popover.css.js.map +1 -1
  173. package/dist/src/nile-popover/nile-popover.js +1 -1
  174. package/dist/src/nile-popover/nile-popover.js.map +1 -1
  175. package/dist/src/nile-popover/nile-popover.test.js +1 -1
  176. package/dist/src/nile-popover/nile-popover.test.js.map +1 -1
  177. package/dist/src/nile-side-bar-footer/nile-side-bar-footer.css.js +5 -0
  178. package/dist/src/nile-side-bar-footer/nile-side-bar-footer.css.js.map +1 -1
  179. package/dist/src/nile-side-bar-footer/nile-side-bar-footer.d.ts +10 -0
  180. package/dist/src/nile-side-bar-footer/nile-side-bar-footer.js +17 -1
  181. package/dist/src/nile-side-bar-footer/nile-side-bar-footer.js.map +1 -1
  182. package/dist/src/nile-side-bar-footer/nile-side-bar-footer.test.d.ts +1 -0
  183. package/dist/src/nile-side-bar-footer/nile-side-bar-footer.test.js +42 -0
  184. package/dist/src/nile-side-bar-footer/nile-side-bar-footer.test.js.map +1 -0
  185. package/dist/src/nile-side-bar-header/nile-side-bar-app-shell.test.d.ts +4 -0
  186. package/dist/src/nile-side-bar-header/nile-side-bar-app-shell.test.js +68 -0
  187. package/dist/src/nile-side-bar-header/nile-side-bar-app-shell.test.js.map +1 -0
  188. package/dist/src/nile-side-bar-header/nile-side-bar-header.css.js +5 -0
  189. package/dist/src/nile-side-bar-header/nile-side-bar-header.css.js.map +1 -1
  190. package/dist/src/nile-side-bar-header/nile-side-bar-header.d.ts +9 -0
  191. package/dist/src/nile-side-bar-header/nile-side-bar-header.js +17 -1
  192. package/dist/src/nile-side-bar-header/nile-side-bar-header.js.map +1 -1
  193. package/dist/src/nile-side-bar-header/nile-side-bar-header.test.d.ts +1 -0
  194. package/dist/src/nile-side-bar-header/nile-side-bar-header.test.js +42 -0
  195. package/dist/src/nile-side-bar-header/nile-side-bar-header.test.js.map +1 -0
  196. package/dist/src/version.d.ts +11 -1
  197. package/dist/src/version.js +51 -8
  198. package/dist/src/version.js.map +1 -1
  199. package/dist/tsconfig.tsbuildinfo +1 -1
  200. package/dist/version.cjs.js +1 -1
  201. package/dist/version.cjs.js.map +1 -1
  202. package/dist/version.esm.js +1 -1
  203. package/package.json +7 -2
  204. package/src/index.ts +16 -4
  205. package/src/internal/glyph.ts +12 -1
  206. package/src/nile-app-shell/index.ts +8 -0
  207. package/src/nile-app-shell/nile-app-shell-regions.test.ts +215 -0
  208. package/src/nile-app-shell/nile-app-shell.css.ts +574 -0
  209. package/src/nile-app-shell/nile-app-shell.test.ts +536 -0
  210. package/src/nile-app-shell/nile-app-shell.ts +838 -0
  211. package/src/nile-app-shell/shell-controller.ts +100 -0
  212. package/src/nile-app-shell-main/index.ts +8 -0
  213. package/src/nile-app-shell-main/nile-app-shell-main.css.ts +29 -0
  214. package/src/nile-app-shell-main/nile-app-shell-main.ts +52 -0
  215. package/src/nile-app-shell-nav-toggle/index.ts +8 -0
  216. package/src/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.css.ts +44 -0
  217. package/src/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.ts +138 -0
  218. package/src/nile-app-shell-panel/index.ts +8 -0
  219. package/src/nile-app-shell-panel/nile-app-shell-panel.css.ts +114 -0
  220. package/src/nile-app-shell-panel/nile-app-shell-panel.ts +161 -0
  221. package/src/nile-app-shell-side-nav/index.ts +8 -0
  222. package/src/nile-app-shell-side-nav/nile-app-shell-side-nav.css.ts +70 -0
  223. package/src/nile-app-shell-side-nav/nile-app-shell-side-nav.ts +86 -0
  224. package/src/nile-floating-panel/nile-floating-panel.css.ts +46 -8
  225. package/src/nile-floating-panel/nile-floating-panel.ts +19 -1
  226. package/src/nile-popover/nile-popover.css.ts +30 -15
  227. package/src/nile-popover/nile-popover.test.ts +1 -1
  228. package/src/nile-popover/nile-popover.ts +1 -1
  229. package/src/nile-side-bar-footer/nile-side-bar-footer.css.ts +5 -0
  230. package/src/nile-side-bar-footer/nile-side-bar-footer.test.ts +55 -0
  231. package/src/nile-side-bar-footer/nile-side-bar-footer.ts +12 -1
  232. package/src/nile-side-bar-header/nile-side-bar-app-shell.test.ts +78 -0
  233. package/src/nile-side-bar-header/nile-side-bar-header.css.ts +5 -0
  234. package/src/nile-side-bar-header/nile-side-bar-header.test.ts +55 -0
  235. package/src/nile-side-bar-header/nile-side-bar-header.ts +10 -0
  236. package/src/version.ts +55 -7
  237. package/vscode-html-custom-data.json +246 -9
@@ -1,2 +1,2 @@
1
- System.register([],function(_export,_context){"use strict";return{setters:[],execute:function execute(){"undefined"!=typeof window&&(window.nileElementsVersion="__NILE_ELEMENTS_VERSION__",window.nileVersion="1.3.1",window.process=window.process||{env:{NODE_ENV:"production"}});}};});
1
+ System.register([],function(_export,_context){"use strict";var e;function n(){var _ref;return(_ref=function(){if("undefined"==typeof window||"function"!=typeof getComputedStyle)return null;try{return getComputedStyle(document.documentElement).getPropertyValue("--nile-version").trim().replace(/^["']|["']$/g,"")||null;}catch(_unused){return null;}}())!==null&&_ref!==void 0?_ref:"1.3.2";}return{setters:[],execute:function execute(){if("undefined"!=typeof window){window.nileElementsVersion="__NILE_ELEMENTS_VERSION__";e=null;Object.defineProperty(window,"nileVersion",{configurable:!0,get:function get(){return e!==null&&e!==void 0?e:n();},set:function set(n){e=n;}}),window.process=window.process||{env:{NODE_ENV:"production"}};}}};});
2
2
  //# sourceMappingURL=version.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.cjs.js","sources":["../../src/version.ts","../../nile/lib/version.js"],"sourcesContent":["// Version utility.\n//\n// NILE_ELEMENTS_VERSION is this package's own version and is still substituted\n// at build time by scripts/replace-version.cjs.\n//\n// NILE_VERSION is read from the installed @aquera/nile at runtime, so publishing\n// @aquera/nile on its own is enough to update window.nileVersion - consumers do\n// not need a rebuild of this package to pick up a new tokens version.\nimport { NILE_VERSION as INSTALLED_NILE_VERSION } from '@aquera/nile/lib/version.js';\n\nexport const NILE_ELEMENTS_VERSION = '__NILE_ELEMENTS_VERSION__';\nexport const NILE_VERSION = INSTALLED_NILE_VERSION;\n\n// Set global versions for runtime access\nif (typeof window !== 'undefined') {\n (window as any).nileElementsVersion = NILE_ELEMENTS_VERSION;\n (window as any).nileVersion = NILE_VERSION;\n window.process = window.process || { env: { NODE_ENV: 'production' } };\n}\n","// Generated by scripts/build-version.mjs - do not edit by hand.\nexport const NILE_VERSION = '1.3.1';\n"],"names":["window","nileElementsVersion","nileVersion","process","env","NODE_ENV"],"mappings":"wGAcsB,WAAA,EAAA,MAAXA,CAAAA,MACRA,GAAAA,MAAAA,CAAeC,mBALmB,CAAA,2BAAA,CAMlCD,OAAeE,WCfU,CAAA,OAAA,CDgB1BF,MAAOG,CAAAA,OAAAA,CAAUH,MAAOG,CAAAA,OAAAA,EAAW,CAAEC,GAAAA,CAAK,CAAEC,QAAU,CAAA,YAAA,CAAA,CAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"version.cjs.js","sources":["../../src/version.ts","../../nile/lib/version.js"],"sourcesContent":["// Version utility.\n//\n// NILE_ELEMENTS_VERSION is this package's own version and is still substituted\n// at build time by scripts/replace-version.cjs.\n//\n// The tokens version is read from the loaded Nile stylesheet's --nile-version\n// custom property (stamped by @aquera/nile's scripts/stamp-css-version.mjs),\n// falling back to the @aquera/nile installed alongside this package.\n//\n// Reading the stylesheet is what makes a tokens-only release visible. The\n// imported constant alone is not enough: rollup.config.js bundles\n// @aquera/nile/lib/version.js into dist/index.js, so on the CDN build it is\n// frozen at this package's build time. The stylesheet is the live source.\nimport { NILE_VERSION as BUILT_IN_NILE_VERSION } from '@aquera/nile/lib/version.js';\n\nexport const NILE_ELEMENTS_VERSION = '__NILE_ELEMENTS_VERSION__';\n\nfunction readStylesheetNileVersion(): string | null {\n if (typeof window === 'undefined' || typeof getComputedStyle !== 'function') {\n return null;\n }\n\n try {\n const value = getComputedStyle(document.documentElement)\n .getPropertyValue('--nile-version')\n .trim()\n .replace(/^[\"']|[\"']$/g, '');\n\n return value || null;\n } catch {\n return null;\n }\n}\n\n/**\n * The version of @aquera/nile (tokens/stylesheets) whose CSS is loaded in the\n * page, falling back to the @aquera/nile bundled into this package when no\n * stamped stylesheet is present.\n *\n * This is the canonical runtime API. It resolves on every call rather than\n * caching, so it is correct even when the Nile stylesheet is added to the page\n * after this module evaluates - which is the common case, and why no\n * module-evaluation-time snapshot of it is exported.\n */\nexport function getNileVersion(): string {\n return readStylesheetNileVersion() ?? BUILT_IN_NILE_VERSION;\n}\n\n// Set global versions for runtime access\nif (typeof window !== 'undefined') {\n (window as any).nileElementsVersion = NILE_ELEMENTS_VERSION;\n\n // A getter rather than a value, so window.nileVersion reflects whichever\n // stylesheet is loaded at read time regardless of script/style ordering.\n let override: string | null = null;\n Object.defineProperty(window, 'nileVersion', {\n configurable: true,\n get: () => override ?? getNileVersion(),\n set: (value: string) => {\n override = value;\n },\n });\n\n (window as any).process = (window as any).process || {\n env: { NODE_ENV: 'production' },\n };\n}\n","// Generated by scripts/build-version.mjs - do not edit by hand.\nexport const NILE_VERSION = '1.3.2';\n"],"names":["getNileVersion","n","_ref","window","getComputedStyle","document","documentElement","getPropertyValue","trim","replace","_unused","readStylesheetNileVersion","setters","execute","nileElementsVersion","override","Object","defineProperty","configurable","get","set","value","process","env","NODE_ENV"],"mappings":"yEA4CgBA,CAAAA,CACdC,CAAA,CAAA,KAAAC,IAAA,CAAA,OAAAA,IAAA,CA5BF,UACE,CAAA,GAAsB,WAAXC,EAAAA,MAAAA,CAAAA,MAAAA,EAAsD,UAArBC,EAAAA,MAAAA,CAAAA,gBAAAA,CAC1C,MAAO,KAAA,CAGT,GAME,CAAA,MALcA,CAAAA,iBAAiBC,QAASC,CAAAA,eAAAA,CAAAA,CACrCC,gBAAiB,CAAA,gBAAA,CAAA,CACjBC,IACAC,CAAAA,CAAAA,CAAAA,OAAAA,CAAQ,cAAgB,CAAA,EAAA,CAAA,EAEX,IACjB,EAAC,MAAAC,OAAA,CACA,CAAA,MAAO,KACR,EACH,CAaSC,CAAAA,CAAAA,UAAAA,IAAAA,UAAAA,IAAAA,CC5CmB,OD6C5B,EAGA,OAAAC,OAAA,IAAAC,OAAA,UAAAA,QAAA,KAAsB,WAAXV,EAAAA,MAAAA,CAAAA,MAAAA,CAAwB,CAChCA,MAAAA,CAAeW,mBAnCmB,CAAA,2BAAA,CAuC/BC,CAAAA,CAA0B,IAC9BC,CAAAA,MAAAA,CAAOC,cAAed,CAAAA,MAAAA,CAAQ,aAAe,CAAA,CAC3Ce,cAAc,CACdC,CAAAA,GAAAA,CAAK,QAALA,CAAAA,GAAAA,CAAAA,QAAWJ,CAAAA,CAAAA,SAAAA,CAAAA,UAAAA,CAAAA,CAAYf,CACvBoB,CAAAA,CAAAA,GAAAA,GAAAA,CAAMC,QAAND,CAAAA,GAAAA,CAAMC,CACJN,CAAAA,CAAAA,CAAAA,CAAWM,CAAK,EAInBlB,CAAAA,CAAAA,CAAAA,MAAAA,CAAemB,OAAWnB,CAAAA,MAAAA,CAAemB,OAAW,EAAA,CACnDC,GAAK,CAAA,CAAEC,SAAU,YAErB,CAAA,CAAA,EAAA"}
@@ -1 +1 @@
1
- "undefined"!=typeof window&&(window.nileElementsVersion="__NILE_ELEMENTS_VERSION__",window.nileVersion="1.3.1",window.process=window.process||{env:{NODE_ENV:"production"}});
1
+ function n(){return function(){if("undefined"==typeof window||"function"!=typeof getComputedStyle)return null;try{return getComputedStyle(document.documentElement).getPropertyValue("--nile-version").trim().replace(/^["']|["']$/g,"")||null}catch{return null}}()??"1.3.2"}if("undefined"!=typeof window){window.nileElementsVersion="__NILE_ELEMENTS_VERSION__";let e=null;Object.defineProperty(window,"nileVersion",{configurable:!0,get:()=>e??n(),set:n=>{e=n}}),window.process=window.process||{env:{NODE_ENV:"production"}}}
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Webcomponent nile-elements following open-wc recommendations",
4
4
  "license": "MIT",
5
5
  "author": "nile-elements",
6
- "version": "2.0.5",
6
+ "version": "2.0.7",
7
7
  "main": "dist/src/index.js",
8
8
  "type": "module",
9
9
  "module": "dist/src/index.js",
@@ -134,7 +134,12 @@
134
134
  "./nile-tree": "./dist/src/nile-tree/index.js",
135
135
  "./nile-tree-item": "./dist/src/nile-tree-item/index.js",
136
136
  "./nile-wysiwyg-editor": "./dist/src/nile-wysiwyg-editor/index.js",
137
- "./nile-wysiwyg-toolbar": "./dist/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/index.js"
137
+ "./nile-wysiwyg-toolbar": "./dist/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/index.js",
138
+ "./nile-app-shell": "./dist/src/nile-app-shell/index.js",
139
+ "./nile-app-shell-nav-toggle": "./dist/src/nile-app-shell-nav-toggle/index.js",
140
+ "./nile-app-shell-side-nav": "./dist/src/nile-app-shell-side-nav/index.js",
141
+ "./nile-app-shell-main": "./dist/src/nile-app-shell-main/index.js",
142
+ "./nile-app-shell-panel": "./dist/src/nile-app-shell-panel/index.js"
138
143
  },
139
144
  "scripts": {
140
145
  "analyze": "cem analyze --litelement",
package/src/index.ts CHANGED
@@ -88,7 +88,7 @@ export { NileToolbar } from './nile-toolbar';
88
88
  export { NileInlineEdit } from './nile-inline-edit';
89
89
  export { NileTable } from './nile-table';
90
90
  export { NileFilterChip } from './nile-filter-chip';
91
- export {NilePagination } from './nile-pagination';
91
+ export { NilePagination } from './nile-pagination';
92
92
  export { NileSlider } from './nile-slider';
93
93
  export { NileFileUpload } from './nile-file-upload';
94
94
  export { NileFilePreview } from './nile-file-preview';
@@ -101,12 +101,21 @@ export { NileGridCellItem } from './nile-grid/nile-grid-cell-item';
101
101
  export { NileGridHead } from './nile-grid/nile-grid-head';
102
102
  export { NileRichTextEditor } from './nile-rich-text-editor';
103
103
  export { NileColorPicker } from './nile-color-picker';
104
- export type { ColorPickerType, SwatchTooltip, PaletteEntry } from './nile-color-picker';
104
+ export type {
105
+ ColorPickerType,
106
+ SwatchTooltip,
107
+ PaletteEntry,
108
+ } from './nile-color-picker';
105
109
  export { NileColorSwatch } from './nile-color-swatch';
106
110
 
107
111
  // Import version utility to set nile version in window object
108
112
  import './version';
109
113
 
114
+ export { NileAppShell } from './nile-app-shell';
115
+ export { NileAppShellNavToggle } from './nile-app-shell-nav-toggle';
116
+ export { NileAppShellSideNav } from './nile-app-shell-side-nav';
117
+ export { NileAppShellMain } from './nile-app-shell-main';
118
+ export { NileAppShellPanel } from './nile-app-shell-panel';
110
119
  export { NileSideBar } from './nile-side-bar';
111
120
  export { NileSideBarHeader } from './nile-side-bar-header';
112
121
  export { NileSideBarLogo } from './nile-side-bar-logo';
@@ -146,7 +155,10 @@ export { NileMarkdown } from './nile-markdown';
146
155
  export { NileMarkdownEditor } from './nile-markdown-editor';
147
156
 
148
157
  // nile-wysiwyg-editor — ProseMirror-powered rich text editor
149
- export { NileWysiwygEditor, DEFAULT_TOOLBAR } from './nile-wysiwyg-editor/index';
158
+ export {
159
+ NileWysiwygEditor,
160
+ DEFAULT_TOOLBAR,
161
+ } from './nile-wysiwyg-editor/index';
150
162
  export type {
151
163
  WysiwygChangeDetail,
152
164
  WysiwygCommandDetail,
@@ -207,4 +219,4 @@ export type {
207
219
  CommandAttrs,
208
220
  Alignment,
209
221
  PrintOptions,
210
- } from './nile-wysiwyg-editor/engine';
222
+ } from './nile-wysiwyg-editor/engine';
@@ -1,13 +1,24 @@
1
1
  import { html, TemplateResult } from 'lit';
2
+ import { ifDefined } from 'lit/directives/if-defined.js';
2
3
 
3
4
  /**
4
5
  * Renders a design-system icon through nile-glyph. ng-prefixed names are
5
6
  * stroke-drawn in @aquera/nile-glyph's set; the rest are fill-drawn.
7
+ *
8
+ * Pass `color` to override nile-glyph's built-in default ink. Without it the
9
+ * element writes its own grey onto its inline style, which no parent rule can
10
+ * outrank — so `currentColor` is how an icon tracks the colour of the control
11
+ * it sits in.
6
12
  */
7
- export function renderGlyph(name: string, size: number): TemplateResult {
13
+ export function renderGlyph(
14
+ name: string,
15
+ size: number,
16
+ color?: string
17
+ ): TemplateResult {
8
18
  return html`<nile-glyph
9
19
  name=${name}
10
20
  size=${size}
11
21
  method=${name.startsWith('ng-') ? 'stroke' : 'fill'}
22
+ color=${ifDefined(color)}
12
23
  ></nile-glyph>`;
13
24
  }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Copyright Aquera Inc 2023
3
+ *
4
+ * This source code is licensed under the BSD-3-Clause license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ export * from './nile-app-shell';
@@ -0,0 +1,215 @@
1
+ import { expect, fixture, html, oneEvent, waitUntil } from '@open-wc/testing';
2
+ import './nile-app-shell';
3
+ import '../nile-app-shell-side-nav/nile-app-shell-side-nav';
4
+ import '../nile-app-shell-main/nile-app-shell-main';
5
+ import '../nile-app-shell-panel/nile-app-shell-panel';
6
+ import type { NileAppShell } from './nile-app-shell';
7
+ import type { NileAppShellSideNav } from '../nile-app-shell-side-nav/nile-app-shell-side-nav';
8
+ import type { NileAppShellMain } from '../nile-app-shell-main/nile-app-shell-main';
9
+ import type { NileAppShellPanel } from '../nile-app-shell-panel/nile-app-shell-panel';
10
+
11
+ /** The compositional form: one child element per region, no slot names. */
12
+ const composed = async (width = 1440, overlayBreakpoint = 0) => {
13
+ const el = await fixture<NileAppShell>(html`
14
+ <nile-app-shell
15
+ style="width: ${width}px; height: 600px;"
16
+ overlay-breakpoint=${overlayBreakpoint}
17
+ >
18
+ <nile-app-shell-side-nav>
19
+ <span slot="header">Aquera</span>
20
+ <nav>nav</nav>
21
+ <span slot="footer">account</span>
22
+ </nile-app-shell-side-nav>
23
+
24
+ <span slot="top-bar">Title</span>
25
+
26
+ <nile-app-shell-main>
27
+ <div class="page">page</div>
28
+ </nile-app-shell-main>
29
+
30
+ <nile-app-shell-panel label="Ask Aquera">
31
+ <div>answer</div>
32
+ <div slot="footer">composer</div>
33
+ </nile-app-shell-panel>
34
+ </nile-app-shell>
35
+ `);
36
+ await waitUntil(() => el.hasAttribute('has-panel'));
37
+ return el;
38
+ };
39
+
40
+ const region = <T extends Element>(el: NileAppShell, tag: string) =>
41
+ el.querySelector<T>(tag)!;
42
+
43
+ describe('Region components — slot assignment', () => {
44
+ it('1. each region claims the shell slot it belongs to', async () => {
45
+ const el = await composed();
46
+ expect(region(el, 'nile-app-shell-side-nav').getAttribute('slot')).to.equal(
47
+ 'side-nav'
48
+ );
49
+ expect(region(el, 'nile-app-shell-panel').getAttribute('slot')).to.equal(
50
+ 'panel'
51
+ );
52
+ // Main belongs to the default slot, so it must claim no slot at all.
53
+ expect(region(el, 'nile-app-shell-main').hasAttribute('slot')).to.be.false;
54
+ });
55
+
56
+ it('2. the shell sees all three regions as filled', async () => {
57
+ const el = await composed();
58
+ expect(el.hasAttribute('has-side-nav')).to.be.true;
59
+ expect(el.hasAttribute('has-panel')).to.be.true;
60
+ expect(el.panelAvailable).to.be.true;
61
+ });
62
+
63
+ it('3. an explicit slot placement is respected, not overwritten', async () => {
64
+ const el = await fixture<NileAppShell>(html`
65
+ <nile-app-shell style="width: 1440px; height: 600px;">
66
+ <nile-app-shell-panel slot="aside">detail</nile-app-shell-panel>
67
+ <nile-app-shell-main>page</nile-app-shell-main>
68
+ </nile-app-shell>
69
+ `);
70
+ await el.updateComplete;
71
+ expect(
72
+ el.querySelector('nile-app-shell-panel')!.getAttribute('slot')
73
+ ).to.equal('aside');
74
+ await waitUntil(() => el.hasAttribute('has-aside'));
75
+ expect(el.hasAttribute('has-panel')).to.be.false;
76
+ });
77
+ });
78
+
79
+ describe('nile-app-shell-side-nav', () => {
80
+ it('4. mirrors the shell rail state onto its own collapsed attribute', async () => {
81
+ const el = await composed();
82
+ const nav = region<NileAppShellSideNav>(el, 'nile-app-shell-side-nav');
83
+ expect(nav.collapsed).to.be.false;
84
+
85
+ el.collapseNav();
86
+ await el.updateComplete;
87
+ await nav.updateComplete;
88
+ expect(nav.hasAttribute('collapsed')).to.be.true;
89
+
90
+ el.expandNav();
91
+ await el.updateComplete;
92
+ await nav.updateComplete;
93
+ expect(nav.hasAttribute('collapsed')).to.be.false;
94
+ });
95
+
96
+ it('5. follows a rail the shell forces at narrow widths', async () => {
97
+ const el = await composed(1000);
98
+ const nav = region<NileAppShellSideNav>(el, 'nile-app-shell-side-nav');
99
+ el.openPanel();
100
+ await waitUntil(() => el.navLocked);
101
+ await nav.updateComplete;
102
+ expect(nav.hasAttribute('collapsed')).to.be.true;
103
+ expect(el.navCollapsed).to.be.false; // the lock, not a preference
104
+ });
105
+
106
+ it('6. renders header, body and footer regions', async () => {
107
+ const el = await composed();
108
+ const nav = region<NileAppShellSideNav>(el, 'nile-app-shell-side-nav');
109
+ ['header', 'body', 'footer'].forEach(part => {
110
+ expect(nav.shadowRoot!.querySelector(`[part~="${part}"]`)).to.exist;
111
+ });
112
+ });
113
+ });
114
+
115
+ describe('nile-app-shell-main', () => {
116
+ it('7. is the size query container page CSS sizes against', async () => {
117
+ const el = await composed();
118
+ const main = region<NileAppShellMain>(el, 'nile-app-shell-main');
119
+ expect(getComputedStyle(main).containerType).to.equal('inline-size');
120
+ });
121
+
122
+ it('8. no-container drops the containment', async () => {
123
+ const el = await composed();
124
+ const main = region<NileAppShellMain>(el, 'nile-app-shell-main');
125
+ main.noContainer = true;
126
+ await main.updateComplete;
127
+ expect(getComputedStyle(main).containerType).to.equal('normal');
128
+ });
129
+ });
130
+
131
+ describe('nile-app-shell-panel', () => {
132
+ it('9. takes over the panel chrome from the shell', async () => {
133
+ const el = await composed();
134
+ expect(el.getAttribute('panel-chrome')).to.equal('external');
135
+ // The shell's own header must not also render.
136
+ expect(el.shadowRoot!.querySelector('[part~="panel-header"]')).to.not.exist;
137
+
138
+ const panel = region<NileAppShellPanel>(el, 'nile-app-shell-panel');
139
+ expect(panel.shadowRoot!.querySelector('[part~="header"]')).to.exist;
140
+ expect(
141
+ panel.shadowRoot!.querySelector('[part~="title"]')!.textContent!.trim()
142
+ ).to.equal('Ask Aquera');
143
+ });
144
+
145
+ it('10. the shell keeps its own chrome for plain slotted content', async () => {
146
+ const el = await fixture<NileAppShell>(html`
147
+ <nile-app-shell style="width: 1440px; height: 600px;">
148
+ <div slot="panel">answer</div>
149
+ </nile-app-shell>
150
+ `);
151
+ await waitUntil(() => el.hasAttribute('has-panel'));
152
+ expect(el.getAttribute('panel-chrome')).to.equal('internal');
153
+ expect(el.shadowRoot!.querySelector('[part~="panel-header"]')).to.exist;
154
+ });
155
+
156
+ it('11. mirrors the shell panel mode', async () => {
157
+ const el = await composed(1000, 1280);
158
+ const panel = region<NileAppShellPanel>(el, 'nile-app-shell-panel');
159
+ await waitUntil(() => el.panelMode === 'overlay');
160
+ await panel.updateComplete;
161
+ expect(panel.getAttribute('mode')).to.equal('overlay');
162
+ });
163
+
164
+ it('12. its close button closes the panel through the shell', async () => {
165
+ const el = await composed();
166
+ el.openPanel();
167
+ await el.updateComplete;
168
+
169
+ const panel = region<NileAppShellPanel>(el, 'nile-app-shell-panel');
170
+ const close =
171
+ panel.shadowRoot!.querySelector<HTMLButtonElement>('[part~="close"]')!;
172
+ const closed = oneEvent(panel, 'nile-close');
173
+ close.click();
174
+ const event = await closed;
175
+ expect(event).to.exist;
176
+ await el.updateComplete;
177
+ expect(el.panelOpen).to.be.false;
178
+ });
179
+
180
+ it('13. no-close and no-header drop those controls', async () => {
181
+ const el = await composed();
182
+ const panel = region<NileAppShellPanel>(el, 'nile-app-shell-panel');
183
+ panel.noClose = true;
184
+ panel.noHeader = true;
185
+ await panel.updateComplete;
186
+ const close = panel.shadowRoot!.querySelector('[part~="close"]')!;
187
+ const header = panel.shadowRoot!.querySelector('[part~="header"]')!;
188
+ expect(getComputedStyle(close).display).to.equal('none');
189
+ expect(getComputedStyle(header).display).to.equal('none');
190
+ });
191
+
192
+ it('14. shows the footer only when something is slotted into it', async () => {
193
+ const el = await composed();
194
+ const panel = region<NileAppShellPanel>(el, 'nile-app-shell-panel');
195
+ expect(panel.hasAttribute('has-footer')).to.be.true;
196
+
197
+ panel.querySelector('[slot="footer"]')!.remove();
198
+ await waitUntil(() => !panel.hasAttribute('has-footer'));
199
+ expect(
200
+ getComputedStyle(panel.shadowRoot!.querySelector('[part~="footer"]')!)
201
+ .display
202
+ ).to.equal('none');
203
+ });
204
+
205
+ it('15. names the region for assistive tech from its label', async () => {
206
+ const el = await composed();
207
+ const panel = region<NileAppShellPanel>(el, 'nile-app-shell-panel');
208
+ expect(panel.getAttribute('role')).to.equal('complementary');
209
+ expect(panel.getAttribute('aria-label')).to.equal('Ask Aquera');
210
+
211
+ panel.label = 'Ask Nile';
212
+ await panel.updateComplete;
213
+ expect(panel.getAttribute('aria-label')).to.equal('Ask Nile');
214
+ });
215
+ });