@aquera/nile-elements 1.6.7 → 1.6.9

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 (255) hide show
  1. package/README.md +12 -0
  2. package/dist/index.cjs.js +1 -1
  3. package/dist/index.esm.js +1 -1
  4. package/dist/index.js +1735 -495
  5. package/dist/internal/enum.cjs.js +1 -1
  6. package/dist/internal/enum.cjs.js.map +1 -1
  7. package/dist/internal/enum.esm.js +1 -1
  8. package/dist/nile-auto-complete/nile-auto-complete.cjs.js +1 -1
  9. package/dist/nile-auto-complete/nile-auto-complete.cjs.js.map +1 -1
  10. package/dist/nile-auto-complete/nile-auto-complete.esm.js +1 -1
  11. package/dist/nile-calendar/nile-calendar.cjs.js +1 -1
  12. package/dist/nile-calendar/nile-calendar.cjs.js.map +1 -1
  13. package/dist/nile-calendar/nile-calendar.css.cjs.js +1 -1
  14. package/dist/nile-calendar/nile-calendar.css.cjs.js.map +1 -1
  15. package/dist/nile-calendar/nile-calendar.css.esm.js +0 -3
  16. package/dist/nile-calendar/nile-calendar.esm.js +2 -2
  17. package/dist/nile-dropdown/nile-dropdown.cjs.js +1 -1
  18. package/dist/nile-dropdown/nile-dropdown.cjs.js.map +1 -1
  19. package/dist/nile-dropdown/nile-dropdown.esm.js +1 -1
  20. package/dist/nile-inline-sidebar/index.cjs.js +1 -1
  21. package/dist/nile-inline-sidebar/index.esm.js +1 -1
  22. package/dist/nile-inline-sidebar/nile-inline-sidebar.cjs.js +1 -1
  23. package/dist/nile-inline-sidebar/nile-inline-sidebar.cjs.js.map +1 -1
  24. package/dist/nile-inline-sidebar/nile-inline-sidebar.css.cjs.js +1 -1
  25. package/dist/nile-inline-sidebar/nile-inline-sidebar.css.cjs.js.map +1 -1
  26. package/dist/nile-inline-sidebar/nile-inline-sidebar.css.esm.js +76 -19
  27. package/dist/nile-inline-sidebar/nile-inline-sidebar.esm.js +42 -23
  28. package/dist/nile-inline-sidebar-group/nile-inline-sidebar-group.css.cjs.js +1 -1
  29. package/dist/nile-inline-sidebar-group/nile-inline-sidebar-group.css.cjs.js.map +1 -1
  30. package/dist/nile-inline-sidebar-group/nile-inline-sidebar-group.css.esm.js +8 -9
  31. package/dist/nile-inline-sidebar-item/index.cjs.js +1 -1
  32. package/dist/nile-inline-sidebar-item/index.esm.js +1 -1
  33. package/dist/nile-inline-sidebar-item/nile-inline-sidebar-item.cjs.js +1 -1
  34. package/dist/nile-inline-sidebar-item/nile-inline-sidebar-item.cjs.js.map +1 -1
  35. package/dist/nile-inline-sidebar-item/nile-inline-sidebar-item.css.cjs.js +1 -1
  36. package/dist/nile-inline-sidebar-item/nile-inline-sidebar-item.css.cjs.js.map +1 -1
  37. package/dist/nile-inline-sidebar-item/nile-inline-sidebar-item.css.esm.js +16 -18
  38. package/dist/nile-inline-sidebar-item/nile-inline-sidebar-item.esm.js +22 -4
  39. package/dist/nile-inline-sidebar-item-body/index.cjs.js +2 -0
  40. package/dist/nile-inline-sidebar-item-body/index.cjs.js.map +1 -0
  41. package/dist/nile-inline-sidebar-item-body/index.esm.js +1 -0
  42. package/dist/nile-inline-sidebar-item-body/nile-inline-sidebar-item-body.cjs.js +2 -0
  43. package/dist/nile-inline-sidebar-item-body/nile-inline-sidebar-item-body.cjs.js.map +1 -0
  44. package/dist/nile-inline-sidebar-item-body/nile-inline-sidebar-item-body.css.cjs.js +2 -0
  45. package/dist/nile-inline-sidebar-item-body/nile-inline-sidebar-item-body.css.cjs.js.map +1 -0
  46. package/dist/nile-inline-sidebar-item-body/nile-inline-sidebar-item-body.css.esm.js +53 -0
  47. package/dist/nile-inline-sidebar-item-body/nile-inline-sidebar-item-body.esm.js +13 -0
  48. package/dist/nile-inline-sidebar-item-header/index.cjs.js +2 -0
  49. package/dist/nile-inline-sidebar-item-header/index.cjs.js.map +1 -0
  50. package/dist/nile-inline-sidebar-item-header/index.esm.js +1 -0
  51. package/dist/nile-inline-sidebar-item-header/nile-inline-sidebar-item-header.cjs.js +2 -0
  52. package/dist/nile-inline-sidebar-item-header/nile-inline-sidebar-item-header.cjs.js.map +1 -0
  53. package/dist/nile-inline-sidebar-item-header/nile-inline-sidebar-item-header.css.cjs.js +2 -0
  54. package/dist/nile-inline-sidebar-item-header/nile-inline-sidebar-item-header.css.cjs.js.map +1 -0
  55. package/dist/nile-inline-sidebar-item-header/nile-inline-sidebar-item-header.css.esm.js +27 -0
  56. package/dist/nile-inline-sidebar-item-header/nile-inline-sidebar-item-header.esm.js +16 -0
  57. package/dist/nile-inline-sidebar-panel/index.cjs.js +2 -0
  58. package/dist/nile-inline-sidebar-panel/index.cjs.js.map +1 -0
  59. package/dist/nile-inline-sidebar-panel/index.esm.js +1 -0
  60. package/dist/nile-inline-sidebar-panel/nile-inline-sidebar-panel.cjs.js +2 -0
  61. package/dist/nile-inline-sidebar-panel/nile-inline-sidebar-panel.cjs.js.map +1 -0
  62. package/dist/nile-inline-sidebar-panel/nile-inline-sidebar-panel.css.cjs.js +2 -0
  63. package/dist/nile-inline-sidebar-panel/nile-inline-sidebar-panel.css.cjs.js.map +1 -0
  64. package/dist/nile-inline-sidebar-panel/nile-inline-sidebar-panel.css.esm.js +19 -0
  65. package/dist/nile-inline-sidebar-panel/nile-inline-sidebar-panel.esm.js +5 -0
  66. package/dist/nile-inline-sidebar-panel-group/index.cjs.js +2 -0
  67. package/dist/nile-inline-sidebar-panel-group/index.cjs.js.map +1 -0
  68. package/dist/nile-inline-sidebar-panel-group/index.esm.js +1 -0
  69. package/dist/nile-inline-sidebar-panel-group/nile-inline-sidebar-panel-group.cjs.js +2 -0
  70. package/dist/nile-inline-sidebar-panel-group/nile-inline-sidebar-panel-group.cjs.js.map +1 -0
  71. package/dist/nile-inline-sidebar-panel-group/nile-inline-sidebar-panel-group.css.cjs.js +2 -0
  72. package/dist/nile-inline-sidebar-panel-group/nile-inline-sidebar-panel-group.css.cjs.js.map +1 -0
  73. package/dist/nile-inline-sidebar-panel-group/nile-inline-sidebar-panel-group.css.esm.js +30 -0
  74. package/dist/nile-inline-sidebar-panel-group/nile-inline-sidebar-panel-group.esm.js +12 -0
  75. package/dist/nile-nav-tab/index.cjs.js +2 -0
  76. package/dist/nile-nav-tab/index.cjs.js.map +1 -0
  77. package/dist/nile-nav-tab/index.esm.js +1 -0
  78. package/dist/nile-nav-tab/nile-nav-tab.cjs.js +2 -0
  79. package/dist/nile-nav-tab/nile-nav-tab.cjs.js.map +1 -0
  80. package/dist/nile-nav-tab/nile-nav-tab.css.cjs.js +2 -0
  81. package/dist/nile-nav-tab/nile-nav-tab.css.cjs.js.map +1 -0
  82. package/dist/nile-nav-tab/nile-nav-tab.css.esm.js +190 -0
  83. package/dist/nile-nav-tab/nile-nav-tab.esm.js +36 -0
  84. package/dist/nile-nav-tab-group/index.cjs.js +2 -0
  85. package/dist/nile-nav-tab-group/index.cjs.js.map +1 -0
  86. package/dist/nile-nav-tab-group/index.esm.js +1 -0
  87. package/dist/nile-nav-tab-group/nile-nav-tab-group.cjs.js +4 -0
  88. package/dist/nile-nav-tab-group/nile-nav-tab-group.cjs.js.map +1 -0
  89. package/dist/nile-nav-tab-group/nile-nav-tab-group.css.cjs.js +2 -0
  90. package/dist/nile-nav-tab-group/nile-nav-tab-group.css.cjs.js.map +1 -0
  91. package/dist/nile-nav-tab-group/nile-nav-tab-group.css.esm.js +668 -0
  92. package/dist/nile-nav-tab-group/nile-nav-tab-group.esm.js +61 -0
  93. package/dist/nile-nav-tab-panel/index.cjs.js +2 -0
  94. package/dist/nile-nav-tab-panel/index.cjs.js.map +1 -0
  95. package/dist/nile-nav-tab-panel/index.esm.js +1 -0
  96. package/dist/nile-nav-tab-panel/nile-nav-tab-panel.cjs.js +2 -0
  97. package/dist/nile-nav-tab-panel/nile-nav-tab-panel.cjs.js.map +1 -0
  98. package/dist/nile-nav-tab-panel/nile-nav-tab-panel.css.cjs.js +2 -0
  99. package/dist/nile-nav-tab-panel/nile-nav-tab-panel.css.cjs.js.map +1 -0
  100. package/dist/nile-nav-tab-panel/nile-nav-tab-panel.css.esm.js +22 -0
  101. package/dist/nile-nav-tab-panel/nile-nav-tab-panel.esm.js +8 -0
  102. package/dist/nile-stepper-item/nile-stepper-item.cjs.js +1 -1
  103. package/dist/nile-stepper-item/nile-stepper-item.cjs.js.map +1 -1
  104. package/dist/nile-stepper-item/nile-stepper-item.esm.js +13 -13
  105. package/dist/nile-vertical-stepper-item/nile-vertical-stepper-item.cjs.js +1 -1
  106. package/dist/nile-vertical-stepper-item/nile-vertical-stepper-item.cjs.js.map +1 -1
  107. package/dist/nile-vertical-stepper-item/nile-vertical-stepper-item.esm.js +1 -1
  108. package/dist/src/index.d.ts +7 -0
  109. package/dist/src/index.js +7 -0
  110. package/dist/src/index.js.map +1 -1
  111. package/dist/src/internal/enum.d.ts +6 -0
  112. package/dist/src/internal/enum.js +7 -0
  113. package/dist/src/internal/enum.js.map +1 -1
  114. package/dist/src/nile-auto-complete/nile-auto-complete.js +1 -1
  115. package/dist/src/nile-auto-complete/nile-auto-complete.js.map +1 -1
  116. package/dist/src/nile-calendar/nile-calendar.css.js +0 -3
  117. package/dist/src/nile-calendar/nile-calendar.css.js.map +1 -1
  118. package/dist/src/nile-calendar/nile-calendar.js +2 -2
  119. package/dist/src/nile-calendar/nile-calendar.js.map +1 -1
  120. package/dist/src/nile-dropdown/nile-dropdown.d.ts +2 -0
  121. package/dist/src/nile-dropdown/nile-dropdown.js +21 -5
  122. package/dist/src/nile-dropdown/nile-dropdown.js.map +1 -1
  123. package/dist/src/nile-inline-sidebar/nile-inline-sidebar.css.d.ts +1 -0
  124. package/dist/src/nile-inline-sidebar/nile-inline-sidebar.css.js +75 -17
  125. package/dist/src/nile-inline-sidebar/nile-inline-sidebar.css.js.map +1 -1
  126. package/dist/src/nile-inline-sidebar/nile-inline-sidebar.d.ts +17 -1
  127. package/dist/src/nile-inline-sidebar/nile-inline-sidebar.js +147 -18
  128. package/dist/src/nile-inline-sidebar/nile-inline-sidebar.js.map +1 -1
  129. package/dist/src/nile-inline-sidebar-group/nile-inline-sidebar-group.css.d.ts +1 -0
  130. package/dist/src/nile-inline-sidebar-group/nile-inline-sidebar-group.css.js +7 -7
  131. package/dist/src/nile-inline-sidebar-group/nile-inline-sidebar-group.css.js.map +1 -1
  132. package/dist/src/nile-inline-sidebar-item/nile-inline-sidebar-item.css.d.ts +1 -1
  133. package/dist/src/nile-inline-sidebar-item/nile-inline-sidebar-item.css.js +15 -17
  134. package/dist/src/nile-inline-sidebar-item/nile-inline-sidebar-item.css.js.map +1 -1
  135. package/dist/src/nile-inline-sidebar-item/nile-inline-sidebar-item.d.ts +7 -1
  136. package/dist/src/nile-inline-sidebar-item/nile-inline-sidebar-item.js +63 -4
  137. package/dist/src/nile-inline-sidebar-item/nile-inline-sidebar-item.js.map +1 -1
  138. package/dist/src/nile-inline-sidebar-item-body/index.d.ts +1 -0
  139. package/dist/src/nile-inline-sidebar-item-body/index.js +2 -0
  140. package/dist/src/nile-inline-sidebar-item-body/index.js.map +1 -0
  141. package/dist/src/nile-inline-sidebar-item-body/nile-inline-sidebar-item-body.css.d.ts +9 -0
  142. package/dist/src/nile-inline-sidebar-item-body/nile-inline-sidebar-item-body.css.js +62 -0
  143. package/dist/src/nile-inline-sidebar-item-body/nile-inline-sidebar-item-body.css.js.map +1 -0
  144. package/dist/src/nile-inline-sidebar-item-body/nile-inline-sidebar-item-body.d.ts +45 -0
  145. package/dist/src/nile-inline-sidebar-item-body/nile-inline-sidebar-item-body.js +110 -0
  146. package/dist/src/nile-inline-sidebar-item-body/nile-inline-sidebar-item-body.js.map +1 -0
  147. package/dist/src/nile-inline-sidebar-item-header/index.d.ts +1 -0
  148. package/dist/src/nile-inline-sidebar-item-header/index.js +2 -0
  149. package/dist/src/nile-inline-sidebar-item-header/index.js.map +1 -0
  150. package/dist/src/nile-inline-sidebar-item-header/nile-inline-sidebar-item-header.css.d.ts +9 -0
  151. package/dist/src/nile-inline-sidebar-item-header/nile-inline-sidebar-item-header.css.js +36 -0
  152. package/dist/src/nile-inline-sidebar-item-header/nile-inline-sidebar-item-header.css.js.map +1 -0
  153. package/dist/src/nile-inline-sidebar-item-header/nile-inline-sidebar-item-header.d.ts +34 -0
  154. package/dist/src/nile-inline-sidebar-item-header/nile-inline-sidebar-item-header.js +68 -0
  155. package/dist/src/nile-inline-sidebar-item-header/nile-inline-sidebar-item-header.js.map +1 -0
  156. package/dist/src/nile-inline-sidebar-panel/index.d.ts +1 -0
  157. package/dist/src/nile-inline-sidebar-panel/index.js +2 -0
  158. package/dist/src/nile-inline-sidebar-panel/index.js.map +1 -0
  159. package/dist/src/nile-inline-sidebar-panel/nile-inline-sidebar-panel.css.d.ts +9 -0
  160. package/dist/src/nile-inline-sidebar-panel/nile-inline-sidebar-panel.css.js +28 -0
  161. package/dist/src/nile-inline-sidebar-panel/nile-inline-sidebar-panel.css.js.map +1 -0
  162. package/dist/src/nile-inline-sidebar-panel/nile-inline-sidebar-panel.d.ts +35 -0
  163. package/dist/src/nile-inline-sidebar-panel/nile-inline-sidebar-panel.js +55 -0
  164. package/dist/src/nile-inline-sidebar-panel/nile-inline-sidebar-panel.js.map +1 -0
  165. package/dist/src/nile-inline-sidebar-panel-group/index.d.ts +1 -0
  166. package/dist/src/nile-inline-sidebar-panel-group/index.js +2 -0
  167. package/dist/src/nile-inline-sidebar-panel-group/index.js.map +1 -0
  168. package/dist/src/nile-inline-sidebar-panel-group/nile-inline-sidebar-panel-group.css.d.ts +9 -0
  169. package/dist/src/nile-inline-sidebar-panel-group/nile-inline-sidebar-panel-group.css.js +39 -0
  170. package/dist/src/nile-inline-sidebar-panel-group/nile-inline-sidebar-panel-group.css.js.map +1 -0
  171. package/dist/src/nile-inline-sidebar-panel-group/nile-inline-sidebar-panel-group.d.ts +43 -0
  172. package/dist/src/nile-inline-sidebar-panel-group/nile-inline-sidebar-panel-group.js +93 -0
  173. package/dist/src/nile-inline-sidebar-panel-group/nile-inline-sidebar-panel-group.js.map +1 -0
  174. package/dist/src/nile-nav-tab/index.d.ts +1 -0
  175. package/dist/src/nile-nav-tab/index.js +2 -0
  176. package/dist/src/nile-nav-tab/index.js.map +1 -0
  177. package/dist/src/nile-nav-tab/nile-nav-tab.css.d.ts +9 -0
  178. package/dist/src/nile-nav-tab/nile-nav-tab.css.js +199 -0
  179. package/dist/src/nile-nav-tab/nile-nav-tab.css.js.map +1 -0
  180. package/dist/src/nile-nav-tab/nile-nav-tab.d.ts +50 -0
  181. package/dist/src/nile-nav-tab/nile-nav-tab.js +190 -0
  182. package/dist/src/nile-nav-tab/nile-nav-tab.js.map +1 -0
  183. package/dist/src/nile-nav-tab/nile-nav-tab.test.d.ts +1 -0
  184. package/dist/src/nile-nav-tab/nile-nav-tab.test.js +656 -0
  185. package/dist/src/nile-nav-tab/nile-nav-tab.test.js.map +1 -0
  186. package/dist/src/nile-nav-tab-group/index.d.ts +1 -0
  187. package/dist/src/nile-nav-tab-group/index.js +2 -0
  188. package/dist/src/nile-nav-tab-group/index.js.map +1 -0
  189. package/dist/src/nile-nav-tab-group/nile-nav-tab-group.css.d.ts +12 -0
  190. package/dist/src/nile-nav-tab-group/nile-nav-tab-group.css.js +680 -0
  191. package/dist/src/nile-nav-tab-group/nile-nav-tab-group.css.js.map +1 -0
  192. package/dist/src/nile-nav-tab-group/nile-nav-tab-group.d.ts +119 -0
  193. package/dist/src/nile-nav-tab-group/nile-nav-tab-group.js +765 -0
  194. package/dist/src/nile-nav-tab-group/nile-nav-tab-group.js.map +1 -0
  195. package/dist/src/nile-nav-tab-group/nile-nav-tab-group.test.d.ts +3 -0
  196. package/dist/src/nile-nav-tab-group/nile-nav-tab-group.test.js +838 -0
  197. package/dist/src/nile-nav-tab-group/nile-nav-tab-group.test.js.map +1 -0
  198. package/dist/src/nile-nav-tab-panel/index.d.ts +1 -0
  199. package/dist/src/nile-nav-tab-panel/index.js +2 -0
  200. package/dist/src/nile-nav-tab-panel/index.js.map +1 -0
  201. package/dist/src/nile-nav-tab-panel/nile-nav-tab-panel.css.d.ts +15 -0
  202. package/dist/src/nile-nav-tab-panel/nile-nav-tab-panel.css.js +37 -0
  203. package/dist/src/nile-nav-tab-panel/nile-nav-tab-panel.css.js.map +1 -0
  204. package/dist/src/nile-nav-tab-panel/nile-nav-tab-panel.d.ts +37 -0
  205. package/dist/src/nile-nav-tab-panel/nile-nav-tab-panel.js +75 -0
  206. package/dist/src/nile-nav-tab-panel/nile-nav-tab-panel.js.map +1 -0
  207. package/dist/src/nile-nav-tab-panel/nile-nav-tab-panel.test.d.ts +1 -0
  208. package/dist/src/nile-nav-tab-panel/nile-nav-tab-panel.test.js +534 -0
  209. package/dist/src/nile-nav-tab-panel/nile-nav-tab-panel.test.js.map +1 -0
  210. package/dist/src/nile-stepper-item/nile-stepper-item.js +1 -1
  211. package/dist/src/nile-stepper-item/nile-stepper-item.js.map +1 -1
  212. package/dist/src/nile-vertical-stepper-item/nile-vertical-stepper-item.js +1 -1
  213. package/dist/src/nile-vertical-stepper-item/nile-vertical-stepper-item.js.map +1 -1
  214. package/dist/src/version.js +1 -1
  215. package/dist/src/version.js.map +1 -1
  216. package/dist/tsconfig.tsbuildinfo +1 -1
  217. package/package.json +7 -2
  218. package/src/index.ts +7 -0
  219. package/src/internal/enum.ts +8 -1
  220. package/src/nile-auto-complete/nile-auto-complete.ts +1 -1
  221. package/src/nile-calendar/nile-calendar.css.ts +0 -3
  222. package/src/nile-calendar/nile-calendar.ts +2 -2
  223. package/src/nile-dropdown/nile-dropdown.ts +23 -5
  224. package/src/nile-inline-sidebar/nile-inline-sidebar.css.ts +75 -17
  225. package/src/nile-inline-sidebar/nile-inline-sidebar.ts +148 -18
  226. package/src/nile-inline-sidebar-group/nile-inline-sidebar-group.css.ts +7 -7
  227. package/src/nile-inline-sidebar-item/nile-inline-sidebar-item.css.ts +15 -17
  228. package/src/nile-inline-sidebar-item/nile-inline-sidebar-item.ts +74 -9
  229. package/src/nile-inline-sidebar-item-body/index.ts +1 -0
  230. package/src/nile-inline-sidebar-item-body/nile-inline-sidebar-item-body.css.ts +64 -0
  231. package/src/nile-inline-sidebar-item-body/nile-inline-sidebar-item-body.ts +110 -0
  232. package/src/nile-inline-sidebar-item-header/index.ts +1 -0
  233. package/src/nile-inline-sidebar-item-header/nile-inline-sidebar-item-header.css.ts +38 -0
  234. package/src/nile-inline-sidebar-item-header/nile-inline-sidebar-item-header.ts +69 -0
  235. package/src/nile-inline-sidebar-panel/index.ts +1 -0
  236. package/src/nile-inline-sidebar-panel/nile-inline-sidebar-panel.css.ts +30 -0
  237. package/src/nile-inline-sidebar-panel/nile-inline-sidebar-panel.ts +53 -0
  238. package/src/nile-inline-sidebar-panel-group/index.ts +1 -0
  239. package/src/nile-inline-sidebar-panel-group/nile-inline-sidebar-panel-group.css.ts +41 -0
  240. package/src/nile-inline-sidebar-panel-group/nile-inline-sidebar-panel-group.ts +101 -0
  241. package/src/nile-nav-tab/index.ts +1 -0
  242. package/src/nile-nav-tab/nile-nav-tab.css.ts +201 -0
  243. package/src/nile-nav-tab/nile-nav-tab.test.ts +768 -0
  244. package/src/nile-nav-tab/nile-nav-tab.ts +198 -0
  245. package/src/nile-nav-tab-group/index.ts +1 -0
  246. package/src/nile-nav-tab-group/nile-nav-tab-group.css.ts +682 -0
  247. package/src/nile-nav-tab-group/nile-nav-tab-group.test.ts +1009 -0
  248. package/src/nile-nav-tab-group/nile-nav-tab-group.ts +845 -0
  249. package/src/nile-nav-tab-panel/index.ts +1 -0
  250. package/src/nile-nav-tab-panel/nile-nav-tab-panel.css.ts +39 -0
  251. package/src/nile-nav-tab-panel/nile-nav-tab-panel.test.ts +797 -0
  252. package/src/nile-nav-tab-panel/nile-nav-tab-panel.ts +78 -0
  253. package/src/nile-stepper-item/nile-stepper-item.ts +1 -1
  254. package/src/nile-vertical-stepper-item/nile-vertical-stepper-item.ts +1 -1
  255. package/vscode-html-custom-data.json +273 -3
@@ -1,4 +1,4 @@
1
- import{__decorate as t}from"tslib";import{html as i}from"lit";import{query as s,property as e,customElement as n}from"lit/decorators.js";import{s as o}from"./nile-dropdown.css.esm.js";import{s as h,a}from"../internal/animate.esm.js";import{classMap as r}from"lit/directives/class-map.js";import{s as l,g as d}from"../utilities/animation-registry.esm.js";import{g as p}from"../internal/tabbable.esm.js";import{w as c}from"../internal/event.esm.js";import{w as m}from"../internal/watch.esm.js";import{N as u}from"../internal/nile-element.esm.js";import"../nile-popup/nile-popup.esm.js";import{D as f}from"./portal-manager.esm.js";import{V as w}from"../utilities/visibility-manager.esm.js";import"../internal/accessibility/a11y.state.enum.esm.js";import"../internal/accessibility/a11y.property.enum.esm.js";import"../internal/accessibility/role.enum.esm.js";import"../floating-ui.dom-cc9126da.esm.js";import"../nile-popup/nile-popup.css.esm.js";import"./portal-utils.esm.js";let y=class extends u{constructor(){super(...arguments),this.open=!1,this.placement="bottom-start",this.disabled=!1,this.stayOpenOnSelect=!1,this.distance=0,this.noOpenOnClick=!1,this.skidding=0,this.hoist=!1,this.portal=!1,this.enableVisibilityEffect=!1,this.enableTabClose=!1,this.portalManager=null}connectedCallback(){super.connectedCallback(),this.handlePanelSelect=this.handlePanelSelect.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this.handleDocumentMouseDown=this.handleDocumentMouseDown.bind(this),this.containingElement||(this.containingElement=this),this.emit("nile-init"),requestAnimationFrame((()=>{this.portal&&!this.portalManager&&(this.portalManager=new f(this))}))}async firstUpdated(t){this.panel.hidden=!this.open,this.open&&(this.addOpenListeners(),this.popup.active=!0),await this.updateComplete;const i=this.trigger.assignedElements({flatten:!0})[0];this.visibilityManager=new w({host:this,target:i||null,enableVisibilityEffect:this.enableVisibilityEffect,enableTabClose:this.enableTabClose,isOpen:()=>this.open,onAnchorOutOfView:()=>{this.hide(),this.emit("nile-visibility-change",{visible:!1,reason:"anchor-out-of-view"})},onDocumentHidden:()=>{this.hide(),this.emit("nile-visibility-change",{visible:!1,reason:"document-hidden"})},emit:(t,i)=>this.emit(`nile-${t}`,i)})}disconnectedCallback(){super.disconnectedCallback(),this.visibilityManager?.cleanup(),this.removeOpenListeners(),this.hide(),this.emit("nile-destroy"),this.portalManager&&(this.portalManager.cleanupPortalAppend(),this.portalManager=null)}focusOnTrigger(){const t=this.trigger.assignedElements({flatten:!0})[0];"function"==typeof t?.focus&&t.focus()}getMenu(){return this.panel.assignedElements({flatten:!0}).find((t=>"nile-menu"===t.tagName.toLowerCase()))}handleKeyDown(t){this.open&&"Escape"===t.key&&(t.stopPropagation(),this.hide(),this.focusOnTrigger())}handleDocumentKeyDown(t){if("Escape"===t.key&&this.open)return t.stopPropagation(),this.focusOnTrigger(),void this.hide();if("Tab"===t.key){if(this.open&&"nile-menu-item"===document.activeElement?.tagName.toLowerCase())return t.preventDefault(),this.hide(),void this.focusOnTrigger();setTimeout((()=>{const t=this.containingElement?.getRootNode()instanceof ShadowRoot?document.activeElement?.shadowRoot?.activeElement:document.activeElement,i=this.containingElement&&t?.closest(this.containingElement.tagName.toLowerCase())===this.containingElement,s=this.portal&&this.portalManager?.portalContainerElement&&(t===this.portalManager.portalContainerElement||t?.closest(".nile-dropdown-portal-append")===this.portalManager.portalContainerElement);i||s||this.hide()}))}}handleDocumentMouseDown(t){const i=t.composedPath(),s=this.containingElement&&i.includes(this.containingElement),e=this.portal&&this.portalManager?.portalContainerElement&&i.includes(this.portalManager.portalContainerElement);s||e||this.hide()}handlePanelSelect(t){const i=t.target;this.stayOpenOnSelect||"nile-menu"!==i.tagName.toLowerCase()?this.stayOpenOnSelect&&"nile-menu"===i.tagName.toLowerCase()&&(this.show(),this.focusOnTrigger()):(this.hide(),this.focusOnTrigger())}handleTriggerClick(){this.noOpenOnClick||(this.open?this.hide():(this.show(),this.focusOnTrigger()))}handleTriggerKeyDown(t){const i=this.getMenu();if(i){const s=i.getAllItems(),e=s[0],n=s[s.length-1];["ArrowDown","ArrowUp","Home","End"].includes(t.key)&&(t.preventDefault(),this.open||this.show(),s.length>0&&this.updateComplete.then((()=>{"ArrowDown"!==t.key&&"Home"!==t.key||(i.setCurrentItem(e),e.focus()),"ArrowUp"!==t.key&&"End"!==t.key||(i.setCurrentItem(n),n.focus())})))}}handleTriggerKeyUp(t){" "===t.key&&t.preventDefault()}handleTriggerSlotChange(){this.updateAccessibleTrigger()}updateAccessibleTrigger(){const t=this.trigger.assignedElements({flatten:!0}).find((t=>p(t).start));let i;if(t){switch(t.tagName.toLowerCase()){case"nile-button":case"nile-icon-button":i=t.button;break;default:i=t}i.setAttribute("aria-haspopup","true"),i.setAttribute("aria-expanded",this.open?"true":"false")}}async show(){if(!this.open)return this.open=!0,c(this,"nile-after-show")}async hide(){if(this.open)return this.open=!1,c(this,"nile-after-hide")}reposition(){this.popup.reposition()}addOpenListeners(){this.panel.addEventListener("nile-select",this.handlePanelSelect),this.panel.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keydown",this.handleDocumentKeyDown),document.addEventListener("mousedown",this.handleDocumentMouseDown)}removeOpenListeners(){this.panel&&(this.panel.removeEventListener("nile-select",this.handlePanelSelect),this.panel.removeEventListener("keydown",this.handleKeyDown)),document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("mousedown",this.handleDocumentMouseDown)}updated(t){super.updated(t),t.has("portal")&&(this.portal&&!this.portalManager?(this.portalManager=new f(this),this.open&&this.portalManager.setupPortalAppend()):!this.portal&&this.portalManager&&(this.portalManager.cleanupPortalAppend(),this.portalManager=null)),t.has("disabled")&&this.updateTriggerDisabledState()}updateTriggerDisabledState(){const t=this.querySelector('[slot="trigger"]');if(!t)return;const i=t.hasAttribute("disabled");(this.disabled||i)&&(t.disabled=!0,this.disabled=!0)}async handleOpenChange(){if(this.visibilityManager?.setup(),this.disabled)this.open=!1;else if(this.updateAccessibleTrigger(),this.open){if(this.emit("nile-show"),this.addOpenListeners(),this.portal&&this.portalManager?this.portalManager.setupPortalAppend():this.portal&&!this.portalManager&&(this.portalManager=new f(this),this.portalManager.setupPortalAppend()),await h(this),!this.portal){this.panel.hidden=!1,this.popup.active=!0;const{keyframes:t,options:i}=d(this,"dropdown.show",{dir:""});await a(this.popup.popup,t,i)}this.emit("nile-after-show")}else{if(this.emit("nile-hide"),this.removeOpenListeners(),this.visibilityManager?.cleanup(),this.portal&&this.portalManager&&this.portalManager.cleanupPortalAppend(),await h(this),!this.portal){const{keyframes:t,options:i}=d(this,"dropdown.hide",{dir:""});await a(this.popup.popup,t,i),this.panel.hidden=!0,this.popup.active=!1}this.emit("nile-after-hide")}}render(){return i`
1
+ import{__decorate as t}from"tslib";import{html as i}from"lit";import{query as s,property as e,customElement as n}from"lit/decorators.js";import{s as o}from"./nile-dropdown.css.esm.js";import{s as h,a}from"../internal/animate.esm.js";import{classMap as r}from"lit/directives/class-map.js";import{s as l,g as d}from"../utilities/animation-registry.esm.js";import{g as p}from"../internal/tabbable.esm.js";import{w as c}from"../internal/event.esm.js";import{w as m}from"../internal/watch.esm.js";import{N as u}from"../internal/nile-element.esm.js";import"../nile-popup/nile-popup.esm.js";import{D as f}from"./portal-manager.esm.js";import{V as w}from"../utilities/visibility-manager.esm.js";import"../internal/accessibility/a11y.state.enum.esm.js";import"../internal/accessibility/a11y.property.enum.esm.js";import"../internal/accessibility/role.enum.esm.js";import"../floating-ui.dom-cc9126da.esm.js";import"../nile-popup/nile-popup.css.esm.js";import"./portal-utils.esm.js";let y=class extends u{constructor(){super(...arguments),this.open=!1,this.placement="bottom-start",this.disabled=!1,this.stayOpenOnSelect=!1,this.distance=0,this.noOpenOnClick=!1,this.skidding=0,this.hoist=!1,this.portal=!1,this.enableVisibilityEffect=!1,this.enableTabClose=!1,this.portalManager=null,this._triggerDisabledByDropdown=!1}connectedCallback(){super.connectedCallback(),this.handlePanelSelect=this.handlePanelSelect.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this.handleDocumentMouseDown=this.handleDocumentMouseDown.bind(this),this.containingElement||(this.containingElement=this),this.emit("nile-init"),requestAnimationFrame((()=>{this.portal&&!this.portalManager&&(this.portalManager=new f(this))}))}async firstUpdated(t){this.panel.hidden=!this.open,this.open&&(this.addOpenListeners(),this.popup.active=!0),await this.updateComplete;const i=this.trigger.assignedElements({flatten:!0})[0];this.visibilityManager=new w({host:this,target:i||null,enableVisibilityEffect:this.enableVisibilityEffect,enableTabClose:this.enableTabClose,isOpen:()=>this.open,onAnchorOutOfView:()=>{this.hide(),this.emit("nile-visibility-change",{visible:!1,reason:"anchor-out-of-view"})},onDocumentHidden:()=>{this.hide(),this.emit("nile-visibility-change",{visible:!1,reason:"document-hidden"})},emit:(t,i)=>this.emit(`nile-${t}`,i)})}disconnectedCallback(){super.disconnectedCallback(),this.visibilityManager?.cleanup(),this.removeOpenListeners(),this.hide(),this.emit("nile-destroy"),this.portalManager&&(this.portalManager.cleanupPortalAppend(),this.portalManager=null)}focusOnTrigger(){const t=this.trigger.assignedElements({flatten:!0})[0];"function"==typeof t?.focus&&t.focus()}getMenu(){return this.panel.assignedElements({flatten:!0}).find((t=>"nile-menu"===t.tagName.toLowerCase()))}handleKeyDown(t){this.open&&"Escape"===t.key&&(t.stopPropagation(),this.hide(),this.focusOnTrigger())}handleDocumentKeyDown(t){if("Escape"===t.key&&this.open)return t.stopPropagation(),this.focusOnTrigger(),void this.hide();if("Tab"===t.key){if(this.open&&"nile-menu-item"===document.activeElement?.tagName.toLowerCase())return t.preventDefault(),this.hide(),void this.focusOnTrigger();setTimeout((()=>{const t=this.containingElement?.getRootNode()instanceof ShadowRoot?document.activeElement?.shadowRoot?.activeElement:document.activeElement,i=this.containingElement&&t?.closest(this.containingElement.tagName.toLowerCase())===this.containingElement,s=this.portal&&this.portalManager?.portalContainerElement&&(t===this.portalManager.portalContainerElement||t?.closest(".nile-dropdown-portal-append")===this.portalManager.portalContainerElement);i||s||this.hide()}))}}handleDocumentMouseDown(t){const i=t.composedPath(),s=this.containingElement&&i.includes(this.containingElement),e=this.portal&&this.portalManager?.portalContainerElement&&i.includes(this.portalManager.portalContainerElement);s||e||this.hide()}handlePanelSelect(t){const i=t.target;this.stayOpenOnSelect||"nile-menu"!==i.tagName.toLowerCase()?this.stayOpenOnSelect&&"nile-menu"===i.tagName.toLowerCase()&&(this.show(),this.focusOnTrigger()):(this.hide(),this.focusOnTrigger())}handleTriggerClick(){this.noOpenOnClick||this.disabled||this.isTriggerDisabled()||(this.open?this.hide():(this.show(),this.focusOnTrigger()))}handleTriggerKeyDown(t){const i=this.getMenu();if(i){const s=i.getAllItems(),e=s[0],n=s[s.length-1];["ArrowDown","ArrowUp","Home","End"].includes(t.key)&&(t.preventDefault(),this.open||this.show(),s.length>0&&this.updateComplete.then((()=>{"ArrowDown"!==t.key&&"Home"!==t.key||(i.setCurrentItem(e),e.focus()),"ArrowUp"!==t.key&&"End"!==t.key||(i.setCurrentItem(n),n.focus())})))}}handleTriggerKeyUp(t){" "===t.key&&t.preventDefault()}handleTriggerSlotChange(){this.updateAccessibleTrigger()}isTriggerDisabled(){const t=this.querySelector('[slot="trigger"]');return t?.hasAttribute?.("disabled")}updateAccessibleTrigger(){const t=this.trigger.assignedElements({flatten:!0}).find((t=>p(t).start));let i;if(t){switch(t.tagName.toLowerCase()){case"nile-button":case"nile-icon-button":i=t.button;break;default:i=t}i.setAttribute("aria-haspopup","true"),i.setAttribute("aria-expanded",this.open?"true":"false")}}async show(){if(!(this.open||this.disabled||this.isTriggerDisabled()))return this.open=!0,c(this,"nile-after-show")}async hide(){if(this.open)return this.open=!1,c(this,"nile-after-hide")}reposition(){this.popup.reposition()}addOpenListeners(){this.panel.addEventListener("nile-select",this.handlePanelSelect),this.panel.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keydown",this.handleDocumentKeyDown),document.addEventListener("mousedown",this.handleDocumentMouseDown)}removeOpenListeners(){this.panel&&(this.panel.removeEventListener("nile-select",this.handlePanelSelect),this.panel.removeEventListener("keydown",this.handleKeyDown)),document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("mousedown",this.handleDocumentMouseDown)}updated(t){super.updated(t),t.has("portal")&&(this.portal&&!this.portalManager?(this.portalManager=new f(this),this.open&&this.portalManager.setupPortalAppend()):!this.portal&&this.portalManager&&(this.portalManager.cleanupPortalAppend(),this.portalManager=null)),t.has("disabled")&&(this.disabled&&this.open&&this.hide(),this.updateTriggerDisabledState())}updateTriggerDisabledState(){const t=this.querySelector('[slot="trigger"]');t&&(this.disabled?(t.disabled||(this._triggerDisabledByDropdown=!0),t.disabled=!0):this._triggerDisabledByDropdown&&(t.disabled=!1,this._triggerDisabledByDropdown=!1))}async handleOpenChange(){if(this.visibilityManager?.setup(),this.open&&(this.disabled||this.isTriggerDisabled()))this.open=!1;else if(this.updateAccessibleTrigger(),this.open){if(this.emit("nile-show"),this.addOpenListeners(),this.portal&&this.portalManager?this.portalManager.setupPortalAppend():this.portal&&!this.portalManager&&(this.portalManager=new f(this),this.portalManager.setupPortalAppend()),await h(this),!this.portal){this.panel.hidden=!1,this.popup.active=!0;const{keyframes:t,options:i}=d(this,"dropdown.show",{dir:""});await a(this.popup.popup,t,i)}this.emit("nile-after-show")}else{if(this.emit("nile-hide"),this.removeOpenListeners(),this.visibilityManager?.cleanup(),this.portal&&this.portalManager&&this.portalManager.cleanupPortalAppend(),await h(this),!this.portal){const{keyframes:t,options:i}=d(this,"dropdown.hide",{dir:""});await a(this.popup.popup,t,i),this.panel.hidden=!0,this.popup.active=!1}this.emit("nile-after-hide")}}render(){return i`
2
2
  <nile-popup
3
3
  part="base"
4
4
  id="dropdown"
@@ -1,2 +1,2 @@
1
- System.register(["./nile-inline-sidebar.cjs.js","tslib","lit","lit/decorators.js","./nile-inline-sidebar.css.cjs.js","../internal/nile-element.cjs.js","../internal/accessibility/a11y.state.enum.cjs.js","../internal/accessibility/a11y.property.enum.cjs.js","../internal/accessibility/role.enum.cjs.js"],function(_export,_context){"use strict";return{setters:[function(_nileInlineSidebarCjsJs){_export("NileInlineSidebar",_nileInlineSidebarCjsJs.N);},function(_tslib){},function(_lit){},function(_litDecoratorsJs){},function(_nileInlineSidebarCssCjsJs){},function(_internalNileElementCjsJs){},function(_internalAccessibilityA11yStateEnumCjsJs){},function(_internalAccessibilityA11yPropertyEnumCjsJs){},function(_internalAccessibilityRoleEnumCjsJs){}],execute:function execute(){}};});
1
+ System.register(["./nile-inline-sidebar.cjs.js","tslib","lit","lit/decorators.js","lit/directives/class-map.js","./nile-inline-sidebar.css.cjs.js","../internal/nile-element.cjs.js","../internal/accessibility/a11y.state.enum.cjs.js","../internal/accessibility/a11y.property.enum.cjs.js","../internal/accessibility/role.enum.cjs.js","../internal/drag.cjs.js","../internal/math.cjs.js"],function(_export,_context){"use strict";return{setters:[function(_nileInlineSidebarCjsJs){_export("NileInlineSidebar",_nileInlineSidebarCjsJs.N);},function(_tslib){},function(_lit){},function(_litDecoratorsJs){},function(_litDirectivesClassMapJs){},function(_nileInlineSidebarCssCjsJs){},function(_internalNileElementCjsJs){},function(_internalAccessibilityA11yStateEnumCjsJs){},function(_internalAccessibilityA11yPropertyEnumCjsJs){},function(_internalAccessibilityRoleEnumCjsJs){},function(_internalDragCjsJs){},function(_internalMathCjsJs){}],execute:function execute(){}};});
2
2
  //# sourceMappingURL=index.cjs.js.map
@@ -1 +1 @@
1
- export{N as NileInlineSidebar}from"./nile-inline-sidebar.esm.js";import"tslib";import"lit";import"lit/decorators.js";import"./nile-inline-sidebar.css.esm.js";import"../internal/nile-element.esm.js";import"../internal/accessibility/a11y.state.enum.esm.js";import"../internal/accessibility/a11y.property.enum.esm.js";import"../internal/accessibility/role.enum.esm.js";
1
+ export{N as NileInlineSidebar}from"./nile-inline-sidebar.esm.js";import"tslib";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"./nile-inline-sidebar.css.esm.js";import"../internal/nile-element.esm.js";import"../internal/accessibility/a11y.state.enum.esm.js";import"../internal/accessibility/a11y.property.enum.esm.js";import"../internal/accessibility/role.enum.esm.js";import"../internal/drag.esm.js";import"../internal/math.esm.js";
@@ -1,2 +1,2 @@
1
- function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["tslib","lit","lit/decorators.js","./nile-inline-sidebar.css.cjs.js","../internal/nile-element.cjs.js","../internal/accessibility/a11y.state.enum.cjs.js","../internal/accessibility/a11y.property.enum.cjs.js","../internal/accessibility/role.enum.cjs.js"],function(_export,_context){"use strict";var t,e,i,s,n,l,a,o,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,r;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t);}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _superPropGet(t,o,e,r){var p=_get(_getPrototypeOf(1&r?t.prototype:t),o,e);return 2&r&&"function"==typeof p?function(t){return p.apply(e,t);}:p;}function _get(){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var p=_superPropBase(e,t);if(p){var n=Object.getOwnPropertyDescriptor(p,t);return n.get?n.get.call(arguments.length<3?e:r):n.value;}},_get.apply(null,arguments);}function _superPropBase(t,o){for(;!{}.hasOwnProperty.call(t,o)&&null!==(t=_getPrototypeOf(t)););return t;}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},_getPrototypeOf(t);}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e);}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},_setPrototypeOf(t,e);}return{setters:[function(_tslib){t=_tslib.__decorate;},function(_lit){e=_lit.html;},function(_litDecoratorsJs){i=_litDecoratorsJs.property;s=_litDecoratorsJs.state;n=_litDecoratorsJs.query;l=_litDecoratorsJs.customElement;},function(_nileInlineSidebarCssCjsJs){a=_nileInlineSidebarCssCjsJs.s;},function(_internalNileElementCjsJs){o=_internalNileElementCjsJs.N;},function(_internalAccessibilityA11yStateEnumCjsJs){},function(_internalAccessibilityA11yPropertyEnumCjsJs){},function(_internalAccessibilityRoleEnumCjsJs){}],execute:function execute(){_export("N",r=/*#__PURE__*/function(_o){function r(){var _this;_classCallCheck(this,r);_this=_callSuper(this,r,arguments),_this.collapsed=!1,_this.fixed=!1,_this.showTooltip=!1,_this.placement="left",_this.activeIndex=-1,_this.handleKeyDown=function(t){if(_this.collapsed)return;var e=_this.focusableItems;if(!e.length)return;var i=_this.sidebarItems.find(function(t){var _this$shadowRoot;return t===document.activeElement||t===((_this$shadowRoot=_this.shadowRoot)===null||_this$shadowRoot===void 0?void 0:_this$shadowRoot.activeElement)||t.matches(":focus-within");}),s=i?e.indexOf(i):-1;var n=null;switch(t.key){case"ArrowDown":n=s<e.length-1?s+1:0;break;case"ArrowUp":n=s>0?s-1:e.length-1;break;case"Home":n=0;break;case"End":n=e.length-1;break;default:return;}t.preventDefault(),null!==n&&e[n]&&_this.focusItem(e[n]);},_this.handleItemSelect=function(t){var e=t.detail.item,i=_this.sidebarItems.indexOf(e);_this.sidebarItems.forEach(function(t,e){return t.active=e===i;}),_this.activeIndex=i,_this.updateTabIndices(),_this.dispatchEvent(new CustomEvent("nile-change",{detail:{selectedItem:e,index:i},bubbles:!0,composed:!0})),_this.requestUpdate();};return _this;}_inherits(r,_o);return _createClass(r,[{key:"sidebarItems",get:function get(){if(!this.defaultSlot)return[];return this.defaultSlot.assignedElements({flatten:!0}).flatMap(function(t){return"nile-inline-sidebar-item"===t.tagName.toLowerCase()?[t]:Array.from(t.querySelectorAll("nile-inline-sidebar-item"));});}},{key:"connectedCallback",value:function connectedCallback(){var _this2=this;_superPropGet(r,"connectedCallback",this,3)([]),this.addEventListener("nile-click",this.handleItemSelect),this.addEventListener("keydown",this.handleKeyDown),this.mutationObserver=new MutationObserver(function(){return _this2.syncActiveFromItems();});}},{key:"disconnectedCallback",value:function disconnectedCallback(){var _this$mutationObserve;_superPropGet(r,"disconnectedCallback",this,3)([]),(_this$mutationObserve=this.mutationObserver)!==null&&_this$mutationObserve!==void 0&&_this$mutationObserve.disconnect(),this.removeEventListener("nile-click",this.handleItemSelect),this.removeEventListener("keydown",this.handleKeyDown);}},{key:"firstUpdated",value:function firstUpdated(){this.observeSidebarItems(),this.syncActiveFromItems(),this.fixed&&(this.collapsed=!1);}},{key:"observeSidebarItems",value:function observeSidebarItems(){var _this$sidebarItems,_this3=this;((_this$sidebarItems=this.sidebarItems)===null||_this$sidebarItems===void 0?void 0:_this$sidebarItems.length)&&this.mutationObserver&&this.sidebarItems.forEach(function(t){return _this3.mutationObserver.observe(t,{attributes:!0,attributeFilter:["active"]});});}},{key:"syncActiveFromItems",value:function syncActiveFromItems(){var _this$sidebarItems2;if(!((_this$sidebarItems2=this.sidebarItems)!==null&&_this$sidebarItems2!==void 0&&_this$sidebarItems2.length))return;var t=this.sidebarItems.findIndex(function(t){return t.hasAttribute("active");});-1!==t&&t!==this.activeIndex&&(this.activeIndex=t,this.requestUpdate()),this.updateTabIndices();}},{key:"focusableItems",get:function get(){return this.sidebarItems.filter(function(t){return!t.hasAttribute("disabled");});}},{key:"updateTabIndices",value:function updateTabIndices(){var _this4=this;var t=this.sidebarItems;if(!t.length)return;var e=this.activeIndex>=0?t[this.activeIndex]:null;t.forEach(function(t){t.hasAttribute("disabled")?t.setAttribute("tabindex","-1"):t===e?t.setAttribute("tabindex","0"):e||t!==_this4.focusableItems[0]?t.setAttribute("tabindex","-1"):t.setAttribute("tabindex","0");});}},{key:"focusItem",value:function focusItem(t){this.sidebarItems.forEach(function(t){return t.setAttribute("tabindex","-1");}),t.setAttribute("tabindex","0"),t.focus();}},{key:"toggleCollapse",value:function toggleCollapse(){this.fixed||(this.collapsed=!this.collapsed,this.dispatchEvent(new CustomEvent("nile-toggle",{detail:{collapsed:this.collapsed},bubbles:!0,composed:!0})));}},{key:"handleMenuItemClick",value:function handleMenuItemClick(t){var _e$textContent;var e=this.sidebarItems[t];if(!e||e.hasAttribute("disabled"))return;this.sidebarItems.forEach(function(e,i){return e.active=i===t;}),this.activeIndex=t;var i=((_e$textContent=e.textContent)===null||_e$textContent===void 0?void 0:_e$textContent.trim())||"",s=e.href;this.dispatchEvent(new CustomEvent("nile-click",{detail:{item:e,href:s,text:i},bubbles:!0,composed:!0})),s&&(window.location.href=s),this.requestUpdate();}},{key:"menuItemsTemplate",get:function get(){var _this$sidebarItems3,_this5=this;if(!((_this$sidebarItems3=this.sidebarItems)!==null&&_this$sidebarItems3!==void 0&&_this$sidebarItems3.length))return null;var t="right"===this.placement?"left":"right";return this.sidebarItems.map(function(i,s){var _i$textContent;var n=i.tooltip,l=i.scrollWidth>i.clientWidth||i.scrollHeight>i.clientHeight,a=e(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <nile-side-bar-action-menu-item\n ?disabled=","\n ?active=","\n @click=","\n >\n ","\n </nile-side-bar-action-menu-item>\n "])),i.hasAttribute("disabled"),_this5.activeIndex===s,function(){return _this5.handleMenuItemClick(s);},i.textContent);return n||l?e(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n <nile-tooltip\n content=","\n hoist\n placement=","\n >\n ","\n </nile-tooltip>\n "])),((_i$textContent=i.textContent)===null||_i$textContent===void 0?void 0:_i$textContent.trim())||"",t,a):a;});}},{key:"render",value:function render(){var _this6=this;var t="right"===this.placement,i=t?"menu_open":"menu_close",s=t?"menu_close":"menu_open",n=t?"bottom-end":"bottom-start";return e(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n <div class=\"sidebar\" part=\"base\">\n <div class=\"sidebar-header\" part=\"header\">\n ","\n </div>\n\n <nav\n class=\"sidebar-nav\"\n role=\"navigation\"\n aria-label=\"Sidebar\"\n style=","\n part=\"nav-items\"\n >\n <slot\n @slotchange=","\n ></slot>\n </nav>\n </div>\n "])),this.fixed?null:this.collapsed?e(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n <nile-side-bar-action\n class=\"toggle-action\"\n placement=","\n hoist\n open\n triggerDropdown=\"hover\"\n >\n <nile-button\n slot=\"trigger\"\n class=\"toggle-btn\"\n variant=\"tertiary\"\n @click=","\n >\n <nile-icon name=","></nile-icon>\n </nile-button>\n <nile-side-bar-action-menu>\n ","\n </nile-side-bar-action-menu>\n </nile-side-bar-action>\n "])),n,this.toggleCollapse,i,this.menuItemsTemplate):e(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["\n <nile-button\n class=\"toggle-btn\"\n variant=\"tertiary\"\n @click=","\n >\n <nile-icon name=","></nile-icon>\n </nile-button>\n "])),this.toggleCollapse,s),this.collapsed?"display:none;":"",function(){_this6.requestUpdate(),_this6.observeSidebarItems(),_this6.syncActiveFromItems();});}}],[{key:"styles",get:function get(){return[a];}}]);}(o));t([i({type:Boolean,reflect:!0})],r.prototype,"collapsed",void 0),t([i({type:Boolean,reflect:!0,attribute:!0})],r.prototype,"fixed",void 0),t([i({type:Boolean,reflect:!0})],r.prototype,"showTooltip",void 0),t([i({type:String,reflect:!0})],r.prototype,"placement",void 0),t([s()],r.prototype,"activeIndex",void 0),t([n("slot")],r.prototype,"defaultSlot",void 0),_export("N",r=t([l("nile-inline-sidebar")],r));}};});
1
+ function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["tslib","lit","lit/decorators.js","lit/directives/class-map.js","./nile-inline-sidebar.css.cjs.js","../internal/nile-element.cjs.js","../internal/drag.cjs.js","../internal/math.cjs.js","../internal/accessibility/a11y.state.enum.cjs.js","../internal/accessibility/a11y.property.enum.cjs.js","../internal/accessibility/role.enum.cjs.js"],function(_export,_context){"use strict";var t,i,e,s,n,a,r,o,l,h,c,d,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,_templateObject8,b;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t);}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _superPropGet(t,o,e,r){var p=_get(_getPrototypeOf(1&r?t.prototype:t),o,e);return 2&r&&"function"==typeof p?function(t){return p.apply(e,t);}:p;}function _get(){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var p=_superPropBase(e,t);if(p){var n=Object.getOwnPropertyDescriptor(p,t);return n.get?n.get.call(arguments.length<3?e:r):n.value;}},_get.apply(null,arguments);}function _superPropBase(t,o){for(;!{}.hasOwnProperty.call(t,o)&&null!==(t=_getPrototypeOf(t)););return t;}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},_getPrototypeOf(t);}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e);}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},_setPrototypeOf(t,e);}return{setters:[function(_tslib){t=_tslib.__decorate;},function(_lit){i=_lit.nothing;e=_lit.html;},function(_litDecoratorsJs){s=_litDecoratorsJs.property;n=_litDecoratorsJs.state;a=_litDecoratorsJs.query;r=_litDecoratorsJs.customElement;},function(_litDirectivesClassMapJs){o=_litDirectivesClassMapJs.classMap;},function(_nileInlineSidebarCssCjsJs){l=_nileInlineSidebarCssCjsJs.s;},function(_internalNileElementCjsJs){h=_internalNileElementCjsJs.N;},function(_internalDragCjsJs){c=_internalDragCjsJs.d;},function(_internalMathCjsJs){d=_internalMathCjsJs.c;},function(_internalAccessibilityA11yStateEnumCjsJs){},function(_internalAccessibilityA11yPropertyEnumCjsJs){},function(_internalAccessibilityRoleEnumCjsJs){}],execute:function execute(){_export("N",b=/*#__PURE__*/function(_h){function b(){var _this;_classCallCheck(this,b);_this=_callSuper(this,b,arguments),_this.collapsed=!1,_this.fixed=!1,_this.showTooltip=!1,_this.placement="left",_this.resizable=!1,_this.sidebarWidth=216,_this.minSidebarWidth=120,_this.showToggleBtn=!0,_this.maxSidebarWidth=400,_this.variant="minimal",_this.activeIndex=-1,_this.handleKeyDown=function(t){if(_this.collapsed)return;var i=_this.focusableItems;if(!i.length)return;var e=_this.sidebarItems.find(function(t){var _this$shadowRoot;return t===document.activeElement||t===((_this$shadowRoot=_this.shadowRoot)===null||_this$shadowRoot===void 0?void 0:_this$shadowRoot.activeElement)||t.matches(":focus-within");}),s=e?i.indexOf(e):-1;var n=null;switch(t.key){case"ArrowDown":n=s<i.length-1?s+1:0;break;case"ArrowUp":n=s>0?s-1:i.length-1;break;case"Home":n=0;break;case"End":n=i.length-1;break;default:return;}t.preventDefault(),null!==n&&i[n]&&_this.focusItem(i[n]);},_this.handleItemSelect=function(t){var i=t.detail.item,e=_this.sidebarItems.indexOf(i);_this.sidebarItems.forEach(function(t,i){return t.active=i===e;}),_this.activeIndex=e,_this.updateTabIndices(),_this.dispatchEvent(new CustomEvent("nile-change",{detail:{selectedItem:i,index:e},bubbles:!0,composed:!0})),_this.requestUpdate();};return _this;}_inherits(b,_h);return _createClass(b,[{key:"sidebarItems",get:function get(){if(!this.defaultSlot)return[];return this.defaultSlot.assignedElements({flatten:!0}).flatMap(function(t){return"nile-inline-sidebar-item"===t.tagName.toLowerCase()?[t]:Array.from(t.querySelectorAll("nile-inline-sidebar-item"));});}},{key:"connectedCallback",value:function connectedCallback(){var _this2=this;_superPropGet(b,"connectedCallback",this,3)([]),this.addEventListener("nile-click",this.handleItemSelect),this.addEventListener("keydown",this.handleKeyDown),this.mutationObserver=new MutationObserver(function(){return _this2.syncActiveFromItems();});}},{key:"disconnectedCallback",value:function disconnectedCallback(){var _this$mutationObserve;_superPropGet(b,"disconnectedCallback",this,3)([]),(_this$mutationObserve=this.mutationObserver)!==null&&_this$mutationObserve!==void 0&&_this$mutationObserve.disconnect(),this.removeEventListener("nile-click",this.handleItemSelect),this.removeEventListener("keydown",this.handleKeyDown);}},{key:"firstUpdated",value:function firstUpdated(){this.observeSidebarItems(),this.syncActiveFromItems(),this.syncChildSidebarItemVariants(),this.fixed&&(this.collapsed=!1);}},{key:"updated",value:function updated(t){_superPropGet(b,"updated",this,3)([t]),t.has("variant")&&this.syncChildSidebarItemVariants();}},{key:"syncChildSidebarItemVariants",value:function syncChildSidebarItemVariants(){var _this$variant;var t=this.querySelectorAll("nile-inline-sidebar-item"),i=(_this$variant=this.variant)!==null&&_this$variant!==void 0?_this$variant:"minimal";t.forEach(function(t){t.variant=i;});}},{key:"observeSidebarItems",value:function observeSidebarItems(){var _this$sidebarItems,_this3=this;((_this$sidebarItems=this.sidebarItems)===null||_this$sidebarItems===void 0?void 0:_this$sidebarItems.length)&&this.mutationObserver&&this.sidebarItems.forEach(function(t){return _this3.mutationObserver.observe(t,{attributes:!0,attributeFilter:["active"]});});}},{key:"syncActiveFromItems",value:function syncActiveFromItems(){var _this$sidebarItems2;if(!((_this$sidebarItems2=this.sidebarItems)!==null&&_this$sidebarItems2!==void 0&&_this$sidebarItems2.length))return;var t=this.sidebarItems.findIndex(function(t){return t.hasAttribute("active");});-1!==t&&t!==this.activeIndex&&(this.activeIndex=t,this.requestUpdate()),this.updateTabIndices();}},{key:"focusableItems",get:function get(){return this.sidebarItems.filter(function(t){return!t.hasAttribute("disabled");});}},{key:"updateTabIndices",value:function updateTabIndices(){var _this4=this;var t=this.sidebarItems;if(!t.length)return;var i=this.activeIndex>=0?t[this.activeIndex]:null;t.forEach(function(t){t.hasAttribute("disabled")?t.setAttribute("tabindex","-1"):t===i?t.setAttribute("tabindex","0"):i||t!==_this4.focusableItems[0]?t.setAttribute("tabindex","-1"):t.setAttribute("tabindex","0");});}},{key:"focusItem",value:function focusItem(t){this.sidebarItems.forEach(function(t){return t.setAttribute("tabindex","-1");}),t.setAttribute("tabindex","0"),t.focus();}},{key:"toggleCollapse",value:function toggleCollapse(){this.fixed||(this.collapsed=!this.collapsed,this.dispatchEvent(new CustomEvent("nile-toggle",{detail:{collapsed:this.collapsed},bubbles:!0,composed:!0})));}},{key:"handleMenuItemClick",value:function handleMenuItemClick(t){var _i$textContent;var i=this.sidebarItems[t];if(!i||i.hasAttribute("disabled"))return;this.sidebarItems.forEach(function(i,e){return i.active=e===t;}),this.activeIndex=t;var e=((_i$textContent=i.textContent)===null||_i$textContent===void 0?void 0:_i$textContent.trim())||"",s=i.href;this.dispatchEvent(new CustomEvent("nile-click",{detail:{item:i,href:s,text:e},bubbles:!0,composed:!0})),s&&(window.location.href=s),this.requestUpdate();}},{key:"handleSeparatorDrag",value:function handleSeparatorDrag(t){var _this5=this;if(!this.resizable||this.collapsed)return;t.cancelable&&t.preventDefault();var i="right"===this.placement;this.style.setProperty("--sidebar-transition","none"),c(this,{onMove:function onMove(t){var e=_this5.getBoundingClientRect();var s;s=i?e.width-t:t,_this5.sidebarWidth=d(s,_this5.minSidebarWidth,_this5.maxSidebarWidth),_this5.emit("nile-sidebar-resize",{width:_this5.sidebarWidth});},onStop:function onStop(){_this5.style.removeProperty("--sidebar-transition");},initialEvent:t});}},{key:"handleSeparatorKeyDown",value:function handleSeparatorKeyDown(t){if(!this.resizable||this.collapsed)return;var i=t.shiftKey?10:1;var e=this.sidebarWidth;switch(t.key){case"ArrowLeft":e-=i;break;case"ArrowRight":e+=i;break;case"Home":e=this.minSidebarWidth;break;case"End":e=this.maxSidebarWidth;break;default:return;}t.preventDefault(),this.sidebarWidth=d(e,this.minSidebarWidth,this.maxSidebarWidth),this.emit("nile-sidebar-resize",{width:this.sidebarWidth});}},{key:"separatorTemplate",get:function get(){return!this.resizable||this.collapsed?i:e(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <div\n class=\"separator\"\n part=\"separator\"\n tabindex=\"0\"\n role=\"separator\"\n aria-valuenow=","\n aria-valuemin=","\n aria-valuemax=","\n aria-label=\"Resize sidebar\"\n @keydown=","\n @mousedown=","\n @touchstart=","\n ></div>\n "])),this.sidebarWidth,this.minSidebarWidth,this.maxSidebarWidth,this.handleSeparatorKeyDown,this.handleSeparatorDrag,this.handleSeparatorDrag);}},{key:"menuItemsTemplate",get:function get(){var _this$sidebarItems3,_this6=this;if(!((_this$sidebarItems3=this.sidebarItems)!==null&&_this$sidebarItems3!==void 0&&_this$sidebarItems3.length))return null;var t="right"===this.placement?"left":"right";return this.sidebarItems.map(function(i,s){var _i$textContent2;var n=i.tooltip,a=i.scrollWidth>i.clientWidth||i.scrollHeight>i.clientHeight,r=e(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n <nile-side-bar-action-menu-item\n ?disabled=","\n ?active=","\n @click=","\n >\n ","\n </nile-side-bar-action-menu-item>\n "])),i.hasAttribute("disabled"),_this6.activeIndex===s,function(){return _this6.handleMenuItemClick(s);},i.textContent);return n||a?e(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n <nile-tooltip\n content=","\n hoist\n placement=","\n >\n ","\n </nile-tooltip>\n "])),((_i$textContent2=i.textContent)===null||_i$textContent2===void 0?void 0:_i$textContent2.trim())||"",t,r):r;});}},{key:"render",value:function render(){var _this7=this;var t="right"===this.placement,s=t?"menu_open":"menu_close",n=t?"menu_close":"menu_open",a=t?"bottom-end":"bottom-start",r=this.collapsed?"":"width: ".concat(this.sidebarWidth,"px;");return e(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n <div class=\"sidebar\" part=\"base\" style=",">\n <div class=\"sidebar-header\" part=\"header\">\n ","\n </div>\n\n <nav\n class=","\n role=\"navigation\"\n aria-label=\"Sidebar\"\n style=","\n part=\"nav-items\"\n >\n <slot\n @slotchange=","\n ></slot>\n </nav>\n </div>\n ","\n "])),r,this.fixed?null:this.collapsed?e(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["\n <nile-side-bar-action\n class=\"toggle-action\"\n placement=","\n hoist\n open\n triggerDropdown=\"hover\"\n >\n ","\n <nile-side-bar-action-menu>\n ","\n </nile-side-bar-action-menu>\n </nile-side-bar-action>\n "])),a,this.showToggleBtn?e(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["\n <nile-button\n slot=\"trigger\"\n class=\"toggle-btn\"\n variant=\"tertiary\"\n @click=","\n >\n <nile-icon name=","></nile-icon>\n </nile-button>\n "])),this.toggleCollapse,s):i,this.menuItemsTemplate):e(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["\n ","\n "])),this.showToggleBtn?e(_templateObject8||(_templateObject8=_taggedTemplateLiteral([" \n <nile-button\n class=\"toggle-btn\"\n variant=\"tertiary\"\n @click=","\n >\n <nile-icon name=","></nile-icon>\n </nile-button>\n "])),this.toggleCollapse,n):i),o({"sidebar-nav":!0,"sidebar-nav--rich":"rich"===this.variant}),this.collapsed?"display:none;":"",function(){_this7.requestUpdate(),_this7.observeSidebarItems(),_this7.syncActiveFromItems(),_this7.syncChildSidebarItemVariants();},this.separatorTemplate);}}],[{key:"styles",get:function get(){return[l];}}]);}(h));t([s({type:Boolean,reflect:!0})],b.prototype,"collapsed",void 0),t([s({type:Boolean,reflect:!0,attribute:!0})],b.prototype,"fixed",void 0),t([s({type:Boolean,reflect:!0})],b.prototype,"showTooltip",void 0),t([s({type:String,reflect:!0})],b.prototype,"placement",void 0),t([s({type:Boolean,reflect:!0})],b.prototype,"resizable",void 0),t([s({type:Number,attribute:!0})],b.prototype,"sidebarWidth",void 0),t([s({type:Number,attribute:!0})],b.prototype,"minSidebarWidth",void 0),t([s({type:Boolean,attribute:!0})],b.prototype,"showToggleBtn",void 0),t([s({type:Number,attribute:!0})],b.prototype,"maxSidebarWidth",void 0),t([s({type:String,reflect:!0,attribute:!0})],b.prototype,"variant",void 0),t([n()],b.prototype,"activeIndex",void 0),t([a("slot")],b.prototype,"defaultSlot",void 0),_export("N",b=t([r("nile-inline-sidebar")],b));}};});
2
2
  //# sourceMappingURL=nile-inline-sidebar.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nile-inline-sidebar.cjs.js","sources":["../../../src/nile-inline-sidebar/nile-inline-sidebar.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2025\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, query, state } from 'lit/decorators.js';\nimport { styles } from './nile-inline-sidebar.css';\nimport NileElement from '../internal/nile-element';\n\n/**\n * Nile inline sidebar component.\n *\n * @tag nile-inline-sidebar\n */\n@customElement('nile-inline-sidebar')\nexport class NileInlineSidebar extends NileElement {\n @property({ type: Boolean, reflect: true }) collapsed = false;\n\n @property({ type: Boolean, reflect: true, attribute: true }) fixed = false;\n\n @property({ type: Boolean, reflect: true }) showTooltip = false;\n\n /** The side on which the sidebar is placed. */\n @property({ type: String, reflect: true }) placement: 'left' | 'right' = 'left';\n\n @state() private activeIndex: number = -1;\n\n @query('slot') private defaultSlot!: HTMLSlotElement;\n\n private mutationObserver?: MutationObserver;\n\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n private get sidebarItems(): HTMLElement[] {\n if (!this.defaultSlot) return [];\n const assigned = this.defaultSlot.assignedElements({ flatten: true });\n const items = assigned.flatMap(el =>\n el.tagName.toLowerCase() === 'nile-inline-sidebar-item'\n ? [el]\n : Array.from(el.querySelectorAll('nile-inline-sidebar-item'))\n );\n return items as HTMLElement[];\n }\n\n connectedCallback() {\n super.connectedCallback();\n this.addEventListener('nile-click', this.handleItemSelect);\n this.addEventListener('keydown', this.handleKeyDown);\n this.mutationObserver = new MutationObserver(() =>\n this.syncActiveFromItems()\n );\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.mutationObserver?.disconnect();\n this.removeEventListener('nile-click', this.handleItemSelect);\n this.removeEventListener('keydown', this.handleKeyDown);\n }\n\n firstUpdated() {\n this.observeSidebarItems();\n this.syncActiveFromItems();\n\n if (this.fixed) {\n this.collapsed = false;\n }\n }\n\n private observeSidebarItems() {\n if (!this.sidebarItems?.length || !this.mutationObserver) return;\n this.sidebarItems.forEach(item =>\n this.mutationObserver!.observe(item, {\n attributes: true,\n attributeFilter: ['active'],\n })\n );\n }\n\n private syncActiveFromItems() {\n if (!this.sidebarItems?.length) return;\n const activeIndex = this.sidebarItems.findIndex(item =>\n item.hasAttribute('active')\n );\n if (activeIndex !== -1 && activeIndex !== this.activeIndex) {\n this.activeIndex = activeIndex;\n this.requestUpdate();\n }\n this.updateTabIndices();\n }\n\n \n private get focusableItems(): HTMLElement[] {\n return this.sidebarItems.filter(\n item => !item.hasAttribute('disabled')\n );\n }\n\n private updateTabIndices() {\n const items = this.sidebarItems;\n if (!items.length) return;\n\n const focusTarget =\n this.activeIndex >= 0 ? items[this.activeIndex] : null;\n\n items.forEach(item => {\n if (item.hasAttribute('disabled')) {\n item.setAttribute('tabindex', '-1');\n } else if (item === focusTarget) {\n item.setAttribute('tabindex', '0');\n } else if (!focusTarget && item === this.focusableItems[0]) {\n item.setAttribute('tabindex', '0');\n } else {\n item.setAttribute('tabindex', '-1');\n }\n });\n }\n\n private focusItem(item: HTMLElement) {\n const items = this.sidebarItems;\n items.forEach(el => el.setAttribute('tabindex', '-1'));\n item.setAttribute('tabindex', '0');\n item.focus();\n }\n\n private handleKeyDown = (event: KeyboardEvent) => {\n if (this.collapsed) return;\n\n const focusable = this.focusableItems;\n if (!focusable.length) return;\n\n const currentFocus = this.sidebarItems.find(\n item =>\n item === document.activeElement ||\n item === this.shadowRoot?.activeElement ||\n item.matches(':focus-within')\n );\n\n const currentIndex = currentFocus\n ? focusable.indexOf(currentFocus)\n : -1;\n\n let nextIndex: number | null = null;\n\n switch (event.key) {\n case 'ArrowDown':\n nextIndex =\n currentIndex < focusable.length - 1 ? currentIndex + 1 : 0;\n break;\n\n case 'ArrowUp':\n nextIndex =\n currentIndex > 0 ? currentIndex - 1 : focusable.length - 1;\n break;\n\n case 'Home':\n nextIndex = 0;\n break;\n\n case 'End':\n nextIndex = focusable.length - 1;\n break;\n\n case 'Enter':\n case ' ':\n return;\n\n default:\n return;\n }\n\n event.preventDefault();\n\n if (nextIndex !== null && focusable[nextIndex]) {\n this.focusItem(focusable[nextIndex]);\n }\n };\n\n private handleItemSelect = (event: CustomEvent) => {\n const selectedItem = event.detail.item as HTMLElement;\n const index = this.sidebarItems.indexOf(selectedItem);\n\n this.sidebarItems.forEach(\n (item, i) => ((item as any).active = i === index)\n );\n this.activeIndex = index;\n this.updateTabIndices();\n\n this.dispatchEvent(\n new CustomEvent('nile-change', {\n detail: { selectedItem, index },\n bubbles: true,\n composed: true,\n })\n );\n\n this.requestUpdate();\n };\n\n private toggleCollapse() {\n if (this.fixed) return;\n this.collapsed = !this.collapsed;\n\n this.dispatchEvent(\n new CustomEvent('nile-toggle', {\n detail: { collapsed: this.collapsed },\n bubbles: true,\n composed: true,\n })\n );\n }\n\n private handleMenuItemClick(index: number) {\n const selectedItem = this.sidebarItems[index];\n if (!selectedItem || selectedItem.hasAttribute('disabled')) return;\n\n this.sidebarItems.forEach(\n (item, i) => ((item as any).active = i === index)\n );\n this.activeIndex = index;\n const text = selectedItem.textContent?.trim() || '';\n const href = (selectedItem as any).href;\n this.dispatchEvent(\n new CustomEvent('nile-click', {\n detail: { item: selectedItem, href, text },\n bubbles: true,\n composed: true,\n })\n );\n\n if (href) window.location.href = href;\n\n this.requestUpdate();\n }\n\n private get menuItemsTemplate() {\n if (!this.sidebarItems?.length) return null;\n\n const tooltipPlacement = this.placement === 'right' ? 'left' : 'right';\n\n return this.sidebarItems.map((item, index) => {\n const shouldShowTooltip = (item as any).tooltip;\n const isTruncated =\n item.scrollWidth > item.clientWidth ||\n item.scrollHeight > item.clientHeight;\n \n const content = html`\n <nile-side-bar-action-menu-item\n ?disabled=${item.hasAttribute('disabled')}\n ?active=${this.activeIndex === index}\n @click=${() => this.handleMenuItemClick(index)}\n >\n ${item.textContent}\n </nile-side-bar-action-menu-item>\n `;\n return shouldShowTooltip || isTruncated\n ? html`\n <nile-tooltip\n content=${item.textContent?.trim() || ''}\n hoist\n placement=${tooltipPlacement}\n >\n ${content}\n </nile-tooltip>\n `\n : content;\n });\n }\n \n \n \n\n public render(): TemplateResult {\n const isRight = this.placement === 'right';\n const collapsedIcon = isRight ? 'menu_open' : 'menu_close';\n const expandedIcon = isRight ? 'menu_close' : 'menu_open';\n const actionPlacement = isRight ? 'bottom-end' : 'bottom-start';\n\n return html`\n <div class=\"sidebar\" part=\"base\">\n <div class=\"sidebar-header\" part=\"header\">\n ${!this.fixed\n ? this.collapsed\n ? html`\n <nile-side-bar-action\n class=\"toggle-action\"\n placement=${actionPlacement}\n hoist\n open\n triggerDropdown=\"hover\"\n >\n <nile-button\n slot=\"trigger\"\n class=\"toggle-btn\"\n variant=\"tertiary\"\n @click=${this.toggleCollapse}\n >\n <nile-icon name=${collapsedIcon}></nile-icon>\n </nile-button>\n <nile-side-bar-action-menu>\n ${this.menuItemsTemplate}\n </nile-side-bar-action-menu>\n </nile-side-bar-action>\n `\n : html`\n <nile-button\n class=\"toggle-btn\"\n variant=\"tertiary\"\n @click=${this.toggleCollapse}\n >\n <nile-icon name=${expandedIcon}></nile-icon>\n </nile-button>\n `\n : null}\n </div>\n\n <nav\n class=\"sidebar-nav\"\n role=\"navigation\"\n aria-label=\"Sidebar\"\n style=${this.collapsed ? 'display:none;' : ''}\n part=\"nav-items\"\n >\n <slot\n @slotchange=${() => {\n this.requestUpdate();\n this.observeSidebarItems();\n this.syncActiveFromItems();\n }}\n ></slot>\n </nav>\n </div>\n `;\n }\n}\n\nexport default NileInlineSidebar;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-inline-sidebar': NileInlineSidebar;\n }\n}\n"],"names":["NileInlineSidebar","_o","r","this","collapsed","fixed","showTooltip","placement","activeIndex","handleKeyDown","event","focusable","focusableItems","length","currentFocus","sidebarItems","find","item","document","activeElement","shadowRoot","matches","currentIndex","indexOf","nextIndex","key","preventDefault","focusItem","handleItemSelect","selectedItem","detail","index","forEach","i","active","updateTabIndices","dispatchEvent","CustomEvent","bubbles","composed","requestUpdate","_this","_inherits","_createClass","get","defaultSlot","assignedElements","flatten","flatMap","el","tagName","toLowerCase","Array","from","querySelectorAll","value","connectedCallback","super","addEventListener","mutationObserver","MutationObserver","syncActiveFromItems","disconnectedCallback","disconnect","removeEventListener","firstUpdated","observeSidebarItems","observe","attributes","attributeFilter","_this$sidebarItems2","findIndex","hasAttribute","filter","_this4","items","focusTarget","setAttribute","focus","toggleCollapse","handleMenuItemClick","text","textContent","trim","href","window","location","_this$sidebarItems3","_this5","tooltipPlacement","map","_i$textContent","shouldShowTooltip","tooltip","isTruncated","scrollWidth","clientWidth","scrollHeight","clientHeight","content","html","_templateObject","_taggedTemplateLiteral","_templateObject2","render","isRight","collapsedIcon","expandedIcon","actionPlacement","_templateObject3","_templateObject4","menuItemsTemplate","_templateObject5","styles","NileElement","__decorate","property","type","Boolean","reflect","prototype","attribute","String","state","query","customElement"],"mappings":"2kIAkBaA,CAAN,uBAAAC,EAAA,EAAA,SAAAC,EAAA,qEACuCC,EAAAA,KAAAA,CAASC,SAAG,CAAA,CAAA,CAAA,CAEKD,KAAAA,CAAKE,KAAAA,CAAAA,CAAG,CAEzBF,CAAAA,KAAAA,CAAWG,WAAG,CAAA,CAAA,CAAA,CAGfH,KAAAA,CAASI,SAAAA,CAAqB,MAExDJ,CAAAA,KAAAA,CAAWK,WAAY,CAAA,CAAA,CAAA,CAsGhCL,KAAAA,CAAAM,aAAAA,CAAiBC,SAAAA,CACvB,CAAA,CAAA,GAAIP,KAAAA,CAAKC,SAAAA,CAAW,OAEpB,GAAMO,CAAAA,CAAYR,CAAAA,KAAAA,CAAKS,cACvB,CAAA,GAAA,CAAKD,CAAUE,CAAAA,MAAAA,CAAQ,OAEvB,GAAMC,CAAAA,CAAeX,CAAAA,KAAAA,CAAKY,YAAaC,CAAAA,IAAAA,CACrCC,SAAAA,CACEA,MAAAA,gBAAAA,OAAAA,CAAAA,CAAAA,GAASC,QAASC,CAAAA,aAAAA,EAClBF,CAASd,KAAAA,gBAAAA,CAAAA,KAAAA,CAAKiB,UAAYD,UAAAA,gBAAAA,iBAAjBhB,gBAAAA,CAAiBgB,aAAAA,GAC1BF,CAAKI,CAAAA,OAAAA,CAAQ,eAGXC,CAAAA,EAAAA,CAAAA,CAAAA,CAAAA,CAAeR,CACjBH,CAAAA,CAAAA,CAAUY,OAAQT,CAAAA,CAAAA,CAAAA,CAAAA,CACjB,CAEL,CAAA,GAAIU,CAAAA,CAA2B,CAAA,IAAA,CAE/B,OAAQd,CAAAA,CAAMe,GACZ,EAAA,IAAK,WACHD,CAAAA,CAAAA,CACEF,CAAeX,CAAAA,CAAAA,CAAUE,MAAS,CAAA,CAAA,CAAIS,CAAe,CAAA,CAAA,CAAI,CAC3D,CAAA,MAEF,IAAK,SAA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esContent":["/**\n * Copyright Aquera Inc 2025\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, nothing, PropertyValues } from 'lit';\nimport { customElement, property, query, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { styles } from './nile-inline-sidebar.css';\nimport NileElement from '../internal/nile-element';\nimport { drag } from '../internal/drag';\nimport { clamp } from '../internal/math';\nimport NileInlineSidebarItem from '../nile-inline-sidebar-item/nile-inline-sidebar-item';\n\n/**\n * Nile inline sidebar component.\n *\n * @tag nile-inline-sidebar\n */\n@customElement('nile-inline-sidebar')\nexport class NileInlineSidebar extends NileElement {\n @property({ type: Boolean, reflect: true }) collapsed = false;\n\n @property({ type: Boolean, reflect: true, attribute: true }) fixed = false;\n\n @property({ type: Boolean, reflect: true }) showTooltip = false;\n\n /** The side on which the sidebar is placed. */\n @property({ type: String, reflect: true }) placement: 'left' | 'right' = 'left';\n\n /** Enables a draggable resize handle on the sidebar's trailing edge. */\n @property({ type: Boolean, reflect: true }) resizable = false;\n\n /** Current sidebar width in pixels when resizable is enabled. */\n @property({ type: Number, attribute: true }) sidebarWidth = 216;\n\n /** Minimum sidebar width in pixels. */\n @property({ type: Number, attribute: true }) minSidebarWidth = 120;\n\n @property({ type: Boolean, attribute: true }) showToggleBtn = true;\n\n /** Maximum sidebar width in pixels. */\n @property({ type: Number, attribute: true}) maxSidebarWidth = 400;\n\n @property({ type: String, reflect: true, attribute: true }) variant?: 'minimal' | 'rich' = 'minimal';\n\n @state() private activeIndex: number = -1;\n\n @query('slot') private defaultSlot!: HTMLSlotElement;\n\n private mutationObserver?: MutationObserver;\n\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n private get sidebarItems(): HTMLElement[] {\n if (!this.defaultSlot) return [];\n const assigned = this.defaultSlot.assignedElements({ flatten: true });\n const items = assigned.flatMap(el =>\n el.tagName.toLowerCase() === 'nile-inline-sidebar-item'\n ? [el]\n : Array.from(el.querySelectorAll('nile-inline-sidebar-item'))\n );\n return items as HTMLElement[];\n }\n\n connectedCallback() {\n super.connectedCallback();\n this.addEventListener('nile-click', this.handleItemSelect);\n this.addEventListener('keydown', this.handleKeyDown);\n this.mutationObserver = new MutationObserver(() =>\n this.syncActiveFromItems()\n );\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.mutationObserver?.disconnect();\n this.removeEventListener('nile-click', this.handleItemSelect);\n this.removeEventListener('keydown', this.handleKeyDown);\n }\n\n firstUpdated() {\n this.observeSidebarItems();\n this.syncActiveFromItems();\n this.syncChildSidebarItemVariants();\n\n if (this.fixed) {\n this.collapsed = false;\n }\n }\n\n updated(changedProperties: PropertyValues) {\n super.updated(changedProperties);\n if (changedProperties.has('variant')) {\n this.syncChildSidebarItemVariants();\n }\n }\n\n /** Pushes sidebar `variant` onto each item (rich vs minimal) so layout stays in sync with slotted content. */\n private syncChildSidebarItemVariants() {\n const items = this.querySelectorAll(\n 'nile-inline-sidebar-item',\n ) as NodeListOf<NileInlineSidebarItem>;\n const v = this.variant ?? 'minimal';\n items.forEach(item => {\n item.variant = v;\n });\n }\n\n private observeSidebarItems() {\n if (!this.sidebarItems?.length || !this.mutationObserver) return;\n this.sidebarItems.forEach(item =>\n this.mutationObserver!.observe(item, {\n attributes: true,\n attributeFilter: ['active'],\n })\n );\n }\n\n private syncActiveFromItems() {\n if (!this.sidebarItems?.length) return;\n const activeIndex = this.sidebarItems.findIndex(item =>\n item.hasAttribute('active')\n );\n if (activeIndex !== -1 && activeIndex !== this.activeIndex) {\n this.activeIndex = activeIndex;\n this.requestUpdate();\n }\n this.updateTabIndices();\n }\n\n \n private get focusableItems(): HTMLElement[] {\n return this.sidebarItems.filter(\n item => !item.hasAttribute('disabled')\n );\n }\n\n private updateTabIndices() {\n const items = this.sidebarItems;\n if (!items.length) return;\n\n const focusTarget =\n this.activeIndex >= 0 ? items[this.activeIndex] : null;\n\n items.forEach(item => {\n if (item.hasAttribute('disabled')) {\n item.setAttribute('tabindex', '-1');\n } else if (item === focusTarget) {\n item.setAttribute('tabindex', '0');\n } else if (!focusTarget && item === this.focusableItems[0]) {\n item.setAttribute('tabindex', '0');\n } else {\n item.setAttribute('tabindex', '-1');\n }\n });\n }\n\n private focusItem(item: HTMLElement) {\n const items = this.sidebarItems;\n items.forEach(el => el.setAttribute('tabindex', '-1'));\n item.setAttribute('tabindex', '0');\n item.focus();\n }\n\n private handleKeyDown = (event: KeyboardEvent) => {\n if (this.collapsed) return;\n\n const focusable = this.focusableItems;\n if (!focusable.length) return;\n\n const currentFocus = this.sidebarItems.find(\n item =>\n item === document.activeElement ||\n item === this.shadowRoot?.activeElement ||\n item.matches(':focus-within')\n );\n\n const currentIndex = currentFocus\n ? focusable.indexOf(currentFocus)\n : -1;\n\n let nextIndex: number | null = null;\n\n switch (event.key) {\n case 'ArrowDown':\n nextIndex =\n currentIndex < focusable.length - 1 ? currentIndex + 1 : 0;\n break;\n\n case 'ArrowUp':\n nextIndex =\n currentIndex > 0 ? currentIndex - 1 : focusable.length - 1;\n break;\n\n case 'Home':\n nextIndex = 0;\n break;\n\n case 'End':\n nextIndex = focusable.length - 1;\n break;\n\n case 'Enter':\n case ' ':\n return;\n\n default:\n return;\n }\n\n event.preventDefault();\n\n if (nextIndex !== null && focusable[nextIndex]) {\n this.focusItem(focusable[nextIndex]);\n }\n };\n\n private handleItemSelect = (event: CustomEvent) => {\n const selectedItem = event.detail.item as HTMLElement;\n const index = this.sidebarItems.indexOf(selectedItem);\n\n this.sidebarItems.forEach(\n (item, i) => ((item as any).active = i === index)\n );\n this.activeIndex = index;\n this.updateTabIndices();\n\n this.dispatchEvent(\n new CustomEvent('nile-change', {\n detail: { selectedItem, index },\n bubbles: true,\n composed: true,\n })\n );\n\n this.requestUpdate();\n };\n\n private toggleCollapse() {\n if (this.fixed) return;\n this.collapsed = !this.collapsed;\n\n this.dispatchEvent(\n new CustomEvent('nile-toggle', {\n detail: { collapsed: this.collapsed },\n bubbles: true,\n composed: true,\n })\n );\n }\n\n private handleMenuItemClick(index: number) {\n const selectedItem = this.sidebarItems[index];\n if (!selectedItem || selectedItem.hasAttribute('disabled')) return;\n\n this.sidebarItems.forEach(\n (item, i) => ((item as any).active = i === index)\n );\n this.activeIndex = index;\n const text = selectedItem.textContent?.trim() || '';\n const href = (selectedItem as any).href;\n this.dispatchEvent(\n new CustomEvent('nile-click', {\n detail: { item: selectedItem, href, text },\n bubbles: true,\n composed: true,\n })\n );\n\n if (href) window.location.href = href;\n\n this.requestUpdate();\n }\n\n private handleSeparatorDrag(event: PointerEvent) {\n if (!this.resizable || this.collapsed) return;\n if (event.cancelable) event.preventDefault();\n\n const isRight = this.placement === 'right';\n\n this.style.setProperty('--sidebar-transition', 'none');\n\n drag(this, {\n onMove: (x: number) => {\n const hostRect = this.getBoundingClientRect();\n let newWidth: number;\n\n if (isRight) {\n newWidth = hostRect.width - x;\n } else {\n newWidth = x;\n }\n\n this.sidebarWidth = clamp(newWidth, this.minSidebarWidth, this.maxSidebarWidth);\n this.emit('nile-sidebar-resize', { width: this.sidebarWidth });\n },\n onStop: () => {\n this.style.removeProperty('--sidebar-transition');\n },\n initialEvent: event,\n });\n }\n\n private handleSeparatorKeyDown(event: KeyboardEvent) {\n if (!this.resizable || this.collapsed) return;\n\n const step = event.shiftKey ? 10 : 1;\n let newWidth = this.sidebarWidth;\n\n switch (event.key) {\n case 'ArrowLeft':\n newWidth -= step;\n break;\n case 'ArrowRight':\n newWidth += step;\n break;\n case 'Home':\n newWidth = this.minSidebarWidth;\n break;\n case 'End':\n newWidth = this.maxSidebarWidth;\n break;\n default:\n return;\n }\n\n event.preventDefault();\n this.sidebarWidth = clamp(newWidth, this.minSidebarWidth, this.maxSidebarWidth);\n this.emit('nile-sidebar-resize', { width: this.sidebarWidth });\n }\n\n private get separatorTemplate() {\n if (!this.resizable || this.collapsed) return nothing;\n\n return html`\n <div\n class=\"separator\"\n part=\"separator\"\n tabindex=\"0\"\n role=\"separator\"\n aria-valuenow=${this.sidebarWidth}\n aria-valuemin=${this.minSidebarWidth}\n aria-valuemax=${this.maxSidebarWidth}\n aria-label=\"Resize sidebar\"\n @keydown=${this.handleSeparatorKeyDown}\n @mousedown=${this.handleSeparatorDrag}\n @touchstart=${this.handleSeparatorDrag}\n ></div>\n `;\n }\n\n private get menuItemsTemplate() {\n if (!this.sidebarItems?.length) return null;\n\n const tooltipPlacement = this.placement === 'right' ? 'left' : 'right';\n\n return this.sidebarItems.map((item, index) => {\n const shouldShowTooltip = (item as any).tooltip;\n const isTruncated =\n item.scrollWidth > item.clientWidth ||\n item.scrollHeight > item.clientHeight;\n \n const content = html`\n <nile-side-bar-action-menu-item\n ?disabled=${item.hasAttribute('disabled')}\n ?active=${this.activeIndex === index}\n @click=${() => this.handleMenuItemClick(index)}\n >\n ${item.textContent}\n </nile-side-bar-action-menu-item>\n `;\n return shouldShowTooltip || isTruncated\n ? html`\n <nile-tooltip\n content=${item.textContent?.trim() || ''}\n hoist\n placement=${tooltipPlacement}\n >\n ${content}\n </nile-tooltip>\n `\n : content;\n });\n }\n \n \n \n\n public render(): TemplateResult {\n const isRight = this.placement === 'right';\n const collapsedIcon = isRight ? 'menu_open' : 'menu_close';\n const expandedIcon = isRight ? 'menu_close' : 'menu_open';\n const actionPlacement = isRight ? 'bottom-end' : 'bottom-start';\n\n const sidebarStyle = !this.collapsed\n ? `width: ${this.sidebarWidth}px;`\n : '';\n\n return html`\n <div class=\"sidebar\" part=\"base\" style=${sidebarStyle}>\n <div class=\"sidebar-header\" part=\"header\">\n ${!this.fixed\n ? this.collapsed\n ? html`\n <nile-side-bar-action\n class=\"toggle-action\"\n placement=${actionPlacement}\n hoist\n open\n triggerDropdown=\"hover\"\n >\n ${this.showToggleBtn\n ? html`\n <nile-button\n slot=\"trigger\"\n class=\"toggle-btn\"\n variant=\"tertiary\"\n @click=${this.toggleCollapse}\n >\n <nile-icon name=${collapsedIcon}></nile-icon>\n </nile-button>\n `\n : nothing}\n <nile-side-bar-action-menu>\n ${this.menuItemsTemplate}\n </nile-side-bar-action-menu>\n </nile-side-bar-action>\n `\n : html`\n ${this.showToggleBtn\n ? html` \n <nile-button\n class=\"toggle-btn\"\n variant=\"tertiary\"\n @click=${this.toggleCollapse}\n >\n <nile-icon name=${expandedIcon}></nile-icon>\n </nile-button>\n `\n : nothing}\n `\n : null}\n </div>\n\n <nav\n class=${classMap({ 'sidebar-nav': true, 'sidebar-nav--rich': this.variant === 'rich' })}\n role=\"navigation\"\n aria-label=\"Sidebar\"\n style=${this.collapsed ? 'display:none;' : ''}\n part=\"nav-items\"\n >\n <slot\n @slotchange=${() => {\n this.requestUpdate();\n this.observeSidebarItems();\n this.syncActiveFromItems();\n this.syncChildSidebarItemVariants();\n }}\n ></slot>\n </nav>\n </div>\n ${this.separatorTemplate}\n `;\n }\n}\n\nexport default NileInlineSidebar;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-inline-sidebar': NileInlineSidebar;\n }\n}\n"],"names":["NileInlineSidebar","b","this","collapsed","fixed","showTooltip","placement","resizable","sidebarWidth","minSidebarWidth","showToggleBtn","maxSidebarWidth","variant","activeIndex","handleKeyDown","event","focusable","focusableItems","length","currentFocus","sidebarItems","find","item","document","activeElement","shadowRoot","matches","currentIndex","indexOf","nextIndex","key","preventDefault","focusItem","handleItemSelect","selectedItem","detail","index","forEach","i","active","updateTabIndices","dispatchEvent","CustomEvent","bubbles","composed","requestUpdate","_this","_inherits","_h","_createClass","get","defaultSlot","assignedElements","flatten","flatMap","el","tagName","toLowerCase","Array","from","querySelectorAll","value","connectedCallback","super","addEventListener","mutationObserver","MutationObserver","syncActiveFromItems","disconnectedCallback","disconnect","removeEventListener","firstUpdated","observeSidebarItems","syncChildSidebarItemVariants","updated","changedProperties","has","_this$variant","items","v","observe","attributes","attributeFilter","findIndex","hasAttribute","filter","focusTarget","setAttribute","focus","toggleCollapse","handleMenuItemClick","_i$textContent","text","textContent","trim","href","window","location","handleSeparatorDrag","_this5","cancelable","isRight","style","setProperty","drag","onMove","x","hostRect","getBoundingClientRect","newWidth","width","clamp","emit","onStop","removeProperty","initialEvent","handleSeparatorKeyDown","step","shiftKey","nothing","html","_templateObject","_taggedTemplateLiteral","_this$sidebarItems3","_this6","tooltipPlacement","map","_i$textContent2","shouldShowTooltip","tooltip","isTruncated","scrollWidth","clientWidth","scrollHeight","clientHeight","content","_templateObject2","_templateObject3","render","collapsedIcon","expandedIcon","actionPlacement","sidebarStyle","concat","_templateObject4","_templateObject5","_templateObject6","menuItemsTemplate","_templateObject7","_templateObject8","classMap","separatorTemplate","styles","NileElement","__decorate","property","type","Boolean","reflect","prototype","attribute","String","Number","state","query","customElement"],"mappings":"45IAsBaA,CAAAA,uBAAAA,EAAAA,EAAN,SAAAC,EAAA,qEACuCC,EAAAA,KAAAA,CAASC,WAAG,CAEKD,CAAAA,KAAAA,CAAKE,OAAG,CAEzBF,CAAAA,KAAAA,CAAWG,aAAG,CAGfH,CAAAA,KAAAA,CAASI,SAAqB,CAAA,MAAA,CAG7BJ,KAAAA,CAASK,SAAG,CAAA,CAAA,CAAA,CAGXL,KAAAA,CAAYM,YAAAA,CAAG,IAGfN,KAAAA,CAAeO,eAAAA,CAAG,GAEjBP,CAAAA,KAAAA,CAAaQ,eAAG,CAGlBR,CAAAA,KAAAA,CAAeS,gBAAG,GAEFT,CAAAA,KAAAA,CAAOU,QAAwB,SAE1EV,CAAAA,KAAAA,CAAWW,WAAY,CAAA,CAAA,CAAA,CAyHhCX,KAAAA,CAAAY,aAAiBC,CAAAA,SAAAA,CAAAA,CAAAA,CACvB,GAAIb,KAAAA,CAAKC,UAAW,OAEpB,GAAMa,CAAAA,CAAYd,CAAAA,KAAAA,CAAKe,eACvB,GAAKD,CAAAA,CAAAA,CAAUE,OAAQ,OAEvB,GAAMC,CAAAA,EAAejB,KAAAA,CAAKkB,YAAAA,CAAaC,IACrCC,CAAAA,SAAAA,CAAAA,MAAAA,gBAAAA,OACEA,CAAAA,IAASC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AS,CAAA,CAAA,CAAA,CAAME,SAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAiDhK,CAAA+J,CAAAA,SAAAA,CAAA,SAAA,CAAA,IAAA,EAAA,CAAA,CAEpFL,EAAA,CAAhBS,CAAAA,CAAAA,CAAAA,CAAAA,CAAyCnK,CAAA+J,CAAAA,SAAAA,CAAA,aAAA,CAAA,IAAA,EAAA,CAAA,CAEnBL,CAAA,CAAA,CAAtBU,EAAM,MAA8CpK,CAAAA,CAAAA,CAAAA,CAAAA,CAAA+J,SAAA,CAAA,aAAA,CAAA,IAAA,gBA5B1C/J,CAAiB0J,CAAAA,CAAAA,CAAA,CAD7BW,CAAAA,CAAc,wBACFrK"}
@@ -1,2 +1,2 @@
1
- System.register(["lit"],function(_export,_context){"use strict";var i,_templateObject,e;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}return{setters:[function(_lit){i=_lit.css;}],execute:function execute(){_export("s",e=i(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n :host {\n display: block;\n height: 100%;\n }\n .sidebar {\n display: flex;\n flex-direction: column;\n height: 100%;\n background: white;\n border-right: 1px solid var(--nile-colors-neutral-400);\n transition: width 0.3s ease;\n position: relative;\n }\n .toggle-btn {\n position: absolute;\n top: var(--nile-spacing-2xl);\n right: -14px;\n z-index: 10;\n }\n\n nile-button.toggle-btn::part(base) {\n width: 30px;\n height: 30px;\n }\n :host(:not([collapsed])) .sidebar {\n width: 216px;\n }\n :host([collapsed]) .sidebar {\n width: 0px;\n }\n :host([collapsed]) .sidebar-nav {\n display: none;\n }\n .sidebar-header {\n display: flex;\n justify-content: flex-end;\n }\n .sidebar-nav {\n display: flex;\n flex-direction: column;\n gap: var(--nile-spacing-xs);\n padding-right: var(--nile-spacing-xl);\n padding-top: var(--nile-spacing-3xl);\n padding-bottom: var(--nile-spacing-3xl);\n }\n\n nile-side-bar-action-menu {\n width: fit-content;\n max-width: 400px;\n min-width: 200px;\n }\n\n nile-side-bar-action-menu::part(menu__items-wrapper) {\n width: 100%;\n max-width: 400px;\n padding-top: var(--nile-spacing-lg);\n padding-bottom: var(--nile-spacing-lg);\n }\n\n nile-side-bar-action-menu-item::part(base) {\n width: 100%;\n margin-left: 0;\n margin-right: 0;\n border-radius: 0;\n color: black;\n }\n\n nile-side-bar-action-menu-item[active]::part(base):hover {\n background: var(--nile-colors-primary-100);\n color: black;\n }\n\n nile-side-bar-action-menu-item::part(label) {\n display: block;\n width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n /* Transition for sidebar button when it is closed and opened */\n nile-side-bar-action::part(panel),\n nile-side-bar-action-menu {\n opacity: 0;\n pointer-events: none;\n transition: opacity 0.2s ease-in;\n transition-delay: 50ms;\n }\n\n nile-side-bar-action:hover::part(panel),\n nile-side-bar-action:hover nile-side-bar-action-menu {\n opacity: 1;\n pointer-events: auto;\n transition-delay: 0ms;\n }\n\n :host([placement='right']) .sidebar {\n border-right: none;\n border-left: 1px solid var(--nile-colors-neutral-400);\n }\n\n :host([placement='right']) .toggle-btn {\n right: auto;\n left: -14px;\n }\n\n :host([placement='right']) .sidebar-header {\n justify-content: flex-start;\n }\n\n :host([placement='right']) .sidebar-nav {\n padding-right: 0;\n padding-left: var(--nile-spacing-xl);\n }\n"]))));}};});
1
+ System.register(["lit"],function(_export,_context){"use strict";var e,_templateObject,r;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}return{setters:[function(_lit){e=_lit.css;}],execute:function execute(){_export("s",r=e(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n :host {\n display: flex;\n height: 100%;\n\n --separator-width: 1px;\n --separator-hit-area: 12px;\n --separator-color: var(--nile-colors-neutral-400, var(--ng-colors-border-neutral));\n }\n .sidebar {\n display: flex;\n flex-direction: column;\n height: 100%;\n background: var(--nile-colors-white-base, var(--ng-colors-bg-primary));\n border-right: 1px solid var(--nile-colors-neutral-400, var(--ng-colors-border-neutral));\n transition: var(--sidebar-transition, width 0.3s ease);\n position: relative;\n }\n .toggle-btn {\n position: absolute;\n top: var(--nile-spacing-2xl, var(--ng-spacing-2xl));\n right: -14px;\n z-index: 10;\n }\n\n nile-button.toggle-btn::part(base) {\n width: 30px;\n height: 30px;\n }\n nile-button.toggle-btn::part(base) {\n border-color: var(--nile-colors-neutral-500, var(--ng-colors-border-primary));\n }\n :host(:not([collapsed]):not([resizable])) .sidebar {\n width: 216px;\n }\n :host([collapsed]) .sidebar {\n width: 0px;\n }\n :host([collapsed]) .sidebar-nav {\n display: none;\n }\n .sidebar-header {\n display: flex;\n justify-content: flex-end;\n }\n .sidebar-nav {\n display: flex;\n flex-direction: column;\n gap: var(--nile-spacing-xs, var(--ng-spacing-xs));\n padding-right: var(--nile-spacing-xl, var(--ng-spacing-xl));\n padding-top: var(--nile-spacing-3xl, var(--ng-spacing-3xl));\n padding-bottom: var(--nile-spacing-3xl, var(--ng-spacing-3xl));\n }\n .sidebar-nav--rich {\n padding-right: 0px;\n }\n\n /* Resizable separator */\n .separator {\n flex: 0 0 var(--separator-width);\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: var(--separator-color);\n cursor: col-resize;\n position: relative;\n z-index: 1;\n user-select: none;\n touch-action: none;\n }\n\n .separator:focus {\n outline: none;\n }\n\n .separator:focus-visible {\n background-color: var(--nile-colors-blue-500, var(--ng-componentcolors-utility-brand-50));\n }\n\n .separator::after {\n content: '';\n position: absolute;\n height: 100%;\n left: calc(var(--separator-hit-area) / -2 + var(--separator-width) / 2);\n width: var(--separator-hit-area);\n }\n\n :host([resizable]:not([collapsed])) .sidebar {\n border-right: none;\n }\n\n :host([resizable][placement='right']:not([collapsed])) .sidebar {\n border-left: none;\n }\n\n :host([collapsed]) .separator {\n display: none;\n }\n\n :host([placement='right']) .separator {\n order: -1;\n }\n\n nile-side-bar-action-menu {\n width: fit-content;\n max-width: 400px;\n min-width: 200px;\n }\n\n nile-side-bar-action-menu::part(menu__items-wrapper) {\n width: 100%;\n max-width: 400px;\n padding-top: var(--nile-spacing-lg, var(--ng-spacing-lg));\n padding-bottom: var(--nile-spacing-lg, var(--ng-spacing-lg));\n }\n\n nile-side-bar-action-menu-item::part(base) {\n width: 100%;\n margin-left: 0;\n margin-right: 0;\n border-radius: 0;\n color: var(--nile-colors-dark-900, var(--ng-colors-text-primary-900));\n }\n\n nile-side-bar-action-menu-item[active]::part(base):hover {\n background: var(--nile-colors-primary-100, var(--ng-colors-bg-brand-secondary));\n color: var(--nile-colors-dark-900, var(--ng-colors-text-primary-900));\n }\n\n nile-side-bar-action-menu-item::part(label) {\n display: block;\n width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n /* Transition for sidebar button when it is closed and opened */\n nile-side-bar-action::part(panel),\n nile-side-bar-action-menu {\n opacity: 0;\n pointer-events: none;\n transition: opacity 0.2s ease-in;\n transition-delay: 50ms;\n }\n\n nile-side-bar-action:hover::part(panel),\n nile-side-bar-action:hover nile-side-bar-action-menu {\n opacity: 1;\n pointer-events: auto;\n transition-delay: 0ms;\n }\n\n :host([placement='right']) .sidebar {\n border-right: none;\n border-left: 1px solid var(--nile-colors-neutral-400, var(--ng-colors-border-neutral));\n order: 0;\n }\n\n :host([placement='right']) .toggle-btn {\n right: auto;\n left: -14px;\n }\n\n :host([placement='right']) .sidebar-header {\n justify-content: flex-start;\n }\n\n :host([placement='right']) .sidebar-nav {\n padding-right: 0;\n padding-left: var(--nile-spacing-xl, var(--ng-spacing-xl));\n }\n"]))));}};});
2
2
  //# sourceMappingURL=nile-inline-sidebar.css.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nile-inline-sidebar.css.cjs.js","sources":["../../../src/nile-inline-sidebar/nile-inline-sidebar.css.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2025\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\nexport const styles = css`\n :host {\n display: block;\n height: 100%;\n }\n .sidebar {\n display: flex;\n flex-direction: column;\n height: 100%;\n background: white;\n border-right: 1px solid var(--nile-colors-neutral-400);\n transition: width 0.3s ease;\n position: relative;\n }\n .toggle-btn {\n position: absolute;\n top: var(--nile-spacing-2xl);\n right: -14px;\n z-index: 10;\n }\n\n nile-button.toggle-btn::part(base) {\n width: 30px;\n height: 30px;\n }\n :host(:not([collapsed])) .sidebar {\n width: 216px;\n }\n :host([collapsed]) .sidebar {\n width: 0px;\n }\n :host([collapsed]) .sidebar-nav {\n display: none;\n }\n .sidebar-header {\n display: flex;\n justify-content: flex-end;\n }\n .sidebar-nav {\n display: flex;\n flex-direction: column;\n gap: var(--nile-spacing-xs);\n padding-right: var(--nile-spacing-xl);\n padding-top: var(--nile-spacing-3xl);\n padding-bottom: var(--nile-spacing-3xl);\n }\n\n nile-side-bar-action-menu {\n width: fit-content;\n max-width: 400px;\n min-width: 200px;\n }\n\n nile-side-bar-action-menu::part(menu__items-wrapper) {\n width: 100%;\n max-width: 400px;\n padding-top: var(--nile-spacing-lg);\n padding-bottom: var(--nile-spacing-lg);\n }\n\n nile-side-bar-action-menu-item::part(base) {\n width: 100%;\n margin-left: 0;\n margin-right: 0;\n border-radius: 0;\n color: black;\n }\n\n nile-side-bar-action-menu-item[active]::part(base):hover {\n background: var(--nile-colors-primary-100);\n color: black;\n }\n\n nile-side-bar-action-menu-item::part(label) {\n display: block;\n width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n /* Transition for sidebar button when it is closed and opened */\n nile-side-bar-action::part(panel),\n nile-side-bar-action-menu {\n opacity: 0;\n pointer-events: none;\n transition: opacity 0.2s ease-in;\n transition-delay: 50ms;\n }\n\n nile-side-bar-action:hover::part(panel),\n nile-side-bar-action:hover nile-side-bar-action-menu {\n opacity: 1;\n pointer-events: auto;\n transition-delay: 0ms;\n }\n\n :host([placement='right']) .sidebar {\n border-right: none;\n border-left: 1px solid var(--nile-colors-neutral-400);\n }\n\n :host([placement='right']) .toggle-btn {\n right: auto;\n left: -14px;\n }\n\n :host([placement='right']) .sidebar-header {\n justify-content: flex-start;\n }\n\n :host([placement='right']) .sidebar-nav {\n padding-right: 0;\n padding-left: var(--nile-spacing-xl);\n }\n`;\n"],"names":["styles","css","_templateObject","_taggedTemplateLiteral"],"mappings":"oTASaA,CAAAA,CAASC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA"}
1
+ {"version":3,"file":"nile-inline-sidebar.css.cjs.js","sources":["../../../src/nile-inline-sidebar/nile-inline-sidebar.css.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2025\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/** Enterprise (`--nile-*`) primary, NxtGen (`--ng-*`) fallback. */\nexport const styles = css`\n :host {\n display: flex;\n height: 100%;\n\n --separator-width: 1px;\n --separator-hit-area: 12px;\n --separator-color: var(--nile-colors-neutral-400, var(--ng-colors-border-neutral));\n }\n .sidebar {\n display: flex;\n flex-direction: column;\n height: 100%;\n background: var(--nile-colors-white-base, var(--ng-colors-bg-primary));\n border-right: 1px solid var(--nile-colors-neutral-400, var(--ng-colors-border-neutral));\n transition: var(--sidebar-transition, width 0.3s ease);\n position: relative;\n }\n .toggle-btn {\n position: absolute;\n top: var(--nile-spacing-2xl, var(--ng-spacing-2xl));\n right: -14px;\n z-index: 10;\n }\n\n nile-button.toggle-btn::part(base) {\n width: 30px;\n height: 30px;\n }\n nile-button.toggle-btn::part(base) {\n border-color: var(--nile-colors-neutral-500, var(--ng-colors-border-primary));\n }\n :host(:not([collapsed]):not([resizable])) .sidebar {\n width: 216px;\n }\n :host([collapsed]) .sidebar {\n width: 0px;\n }\n :host([collapsed]) .sidebar-nav {\n display: none;\n }\n .sidebar-header {\n display: flex;\n justify-content: flex-end;\n }\n .sidebar-nav {\n display: flex;\n flex-direction: column;\n gap: var(--nile-spacing-xs, var(--ng-spacing-xs));\n padding-right: var(--nile-spacing-xl, var(--ng-spacing-xl));\n padding-top: var(--nile-spacing-3xl, var(--ng-spacing-3xl));\n padding-bottom: var(--nile-spacing-3xl, var(--ng-spacing-3xl));\n }\n .sidebar-nav--rich {\n padding-right: 0px;\n }\n\n /* Resizable separator */\n .separator {\n flex: 0 0 var(--separator-width);\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: var(--separator-color);\n cursor: col-resize;\n position: relative;\n z-index: 1;\n user-select: none;\n touch-action: none;\n }\n\n .separator:focus {\n outline: none;\n }\n\n .separator:focus-visible {\n background-color: var(--nile-colors-blue-500, var(--ng-componentcolors-utility-brand-50));\n }\n\n .separator::after {\n content: '';\n position: absolute;\n height: 100%;\n left: calc(var(--separator-hit-area) / -2 + var(--separator-width) / 2);\n width: var(--separator-hit-area);\n }\n\n :host([resizable]:not([collapsed])) .sidebar {\n border-right: none;\n }\n\n :host([resizable][placement='right']:not([collapsed])) .sidebar {\n border-left: none;\n }\n\n :host([collapsed]) .separator {\n display: none;\n }\n\n :host([placement='right']) .separator {\n order: -1;\n }\n\n nile-side-bar-action-menu {\n width: fit-content;\n max-width: 400px;\n min-width: 200px;\n }\n\n nile-side-bar-action-menu::part(menu__items-wrapper) {\n width: 100%;\n max-width: 400px;\n padding-top: var(--nile-spacing-lg, var(--ng-spacing-lg));\n padding-bottom: var(--nile-spacing-lg, var(--ng-spacing-lg));\n }\n\n nile-side-bar-action-menu-item::part(base) {\n width: 100%;\n margin-left: 0;\n margin-right: 0;\n border-radius: 0;\n color: var(--nile-colors-dark-900, var(--ng-colors-text-primary-900));\n }\n\n nile-side-bar-action-menu-item[active]::part(base):hover {\n background: var(--nile-colors-primary-100, var(--ng-colors-bg-brand-secondary));\n color: var(--nile-colors-dark-900, var(--ng-colors-text-primary-900));\n }\n\n nile-side-bar-action-menu-item::part(label) {\n display: block;\n width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n /* Transition for sidebar button when it is closed and opened */\n nile-side-bar-action::part(panel),\n nile-side-bar-action-menu {\n opacity: 0;\n pointer-events: none;\n transition: opacity 0.2s ease-in;\n transition-delay: 50ms;\n }\n\n nile-side-bar-action:hover::part(panel),\n nile-side-bar-action:hover nile-side-bar-action-menu {\n opacity: 1;\n pointer-events: auto;\n transition-delay: 0ms;\n }\n\n :host([placement='right']) .sidebar {\n border-right: none;\n border-left: 1px solid var(--nile-colors-neutral-400, var(--ng-colors-border-neutral));\n order: 0;\n }\n\n :host([placement='right']) .toggle-btn {\n right: auto;\n left: -14px;\n }\n\n :host([placement='right']) .sidebar-header {\n justify-content: flex-start;\n }\n\n :host([placement='right']) .sidebar-nav {\n padding-right: 0;\n padding-left: var(--nile-spacing-xl, var(--ng-spacing-xl));\n }\n`;\n"],"names":["styles","css","_templateObject","_taggedTemplateLiteral"],"mappings":"oTAUaA,CAAAA,CAASC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA"}
@@ -1,20 +1,24 @@
1
- import{css as i}from"lit";const e=i`
1
+ import{css as e}from"lit";const r=e`
2
2
  :host {
3
- display: block;
3
+ display: flex;
4
4
  height: 100%;
5
+
6
+ --separator-width: 1px;
7
+ --separator-hit-area: 12px;
8
+ --separator-color: var(--nile-colors-neutral-400, var(--ng-colors-border-neutral));
5
9
  }
6
10
  .sidebar {
7
11
  display: flex;
8
12
  flex-direction: column;
9
13
  height: 100%;
10
- background: white;
11
- border-right: 1px solid var(--nile-colors-neutral-400);
12
- transition: width 0.3s ease;
14
+ background: var(--nile-colors-white-base, var(--ng-colors-bg-primary));
15
+ border-right: 1px solid var(--nile-colors-neutral-400, var(--ng-colors-border-neutral));
16
+ transition: var(--sidebar-transition, width 0.3s ease);
13
17
  position: relative;
14
18
  }
15
19
  .toggle-btn {
16
20
  position: absolute;
17
- top: var(--nile-spacing-2xl);
21
+ top: var(--nile-spacing-2xl, var(--ng-spacing-2xl));
18
22
  right: -14px;
19
23
  z-index: 10;
20
24
  }
@@ -23,7 +27,10 @@ import{css as i}from"lit";const e=i`
23
27
  width: 30px;
24
28
  height: 30px;
25
29
  }
26
- :host(:not([collapsed])) .sidebar {
30
+ nile-button.toggle-btn::part(base) {
31
+ border-color: var(--nile-colors-neutral-500, var(--ng-colors-border-primary));
32
+ }
33
+ :host(:not([collapsed]):not([resizable])) .sidebar {
27
34
  width: 216px;
28
35
  }
29
36
  :host([collapsed]) .sidebar {
@@ -39,10 +46,59 @@ import{css as i}from"lit";const e=i`
39
46
  .sidebar-nav {
40
47
  display: flex;
41
48
  flex-direction: column;
42
- gap: var(--nile-spacing-xs);
43
- padding-right: var(--nile-spacing-xl);
44
- padding-top: var(--nile-spacing-3xl);
45
- padding-bottom: var(--nile-spacing-3xl);
49
+ gap: var(--nile-spacing-xs, var(--ng-spacing-xs));
50
+ padding-right: var(--nile-spacing-xl, var(--ng-spacing-xl));
51
+ padding-top: var(--nile-spacing-3xl, var(--ng-spacing-3xl));
52
+ padding-bottom: var(--nile-spacing-3xl, var(--ng-spacing-3xl));
53
+ }
54
+ .sidebar-nav--rich {
55
+ padding-right: 0px;
56
+ }
57
+
58
+ /* Resizable separator */
59
+ .separator {
60
+ flex: 0 0 var(--separator-width);
61
+ display: flex;
62
+ align-items: center;
63
+ justify-content: center;
64
+ background-color: var(--separator-color);
65
+ cursor: col-resize;
66
+ position: relative;
67
+ z-index: 1;
68
+ user-select: none;
69
+ touch-action: none;
70
+ }
71
+
72
+ .separator:focus {
73
+ outline: none;
74
+ }
75
+
76
+ .separator:focus-visible {
77
+ background-color: var(--nile-colors-blue-500, var(--ng-componentcolors-utility-brand-50));
78
+ }
79
+
80
+ .separator::after {
81
+ content: '';
82
+ position: absolute;
83
+ height: 100%;
84
+ left: calc(var(--separator-hit-area) / -2 + var(--separator-width) / 2);
85
+ width: var(--separator-hit-area);
86
+ }
87
+
88
+ :host([resizable]:not([collapsed])) .sidebar {
89
+ border-right: none;
90
+ }
91
+
92
+ :host([resizable][placement='right']:not([collapsed])) .sidebar {
93
+ border-left: none;
94
+ }
95
+
96
+ :host([collapsed]) .separator {
97
+ display: none;
98
+ }
99
+
100
+ :host([placement='right']) .separator {
101
+ order: -1;
46
102
  }
47
103
 
48
104
  nile-side-bar-action-menu {
@@ -54,8 +110,8 @@ import{css as i}from"lit";const e=i`
54
110
  nile-side-bar-action-menu::part(menu__items-wrapper) {
55
111
  width: 100%;
56
112
  max-width: 400px;
57
- padding-top: var(--nile-spacing-lg);
58
- padding-bottom: var(--nile-spacing-lg);
113
+ padding-top: var(--nile-spacing-lg, var(--ng-spacing-lg));
114
+ padding-bottom: var(--nile-spacing-lg, var(--ng-spacing-lg));
59
115
  }
60
116
 
61
117
  nile-side-bar-action-menu-item::part(base) {
@@ -63,12 +119,12 @@ import{css as i}from"lit";const e=i`
63
119
  margin-left: 0;
64
120
  margin-right: 0;
65
121
  border-radius: 0;
66
- color: black;
122
+ color: var(--nile-colors-dark-900, var(--ng-colors-text-primary-900));
67
123
  }
68
124
 
69
125
  nile-side-bar-action-menu-item[active]::part(base):hover {
70
- background: var(--nile-colors-primary-100);
71
- color: black;
126
+ background: var(--nile-colors-primary-100, var(--ng-colors-bg-brand-secondary));
127
+ color: var(--nile-colors-dark-900, var(--ng-colors-text-primary-900));
72
128
  }
73
129
 
74
130
  nile-side-bar-action-menu-item::part(label) {
@@ -97,7 +153,8 @@ import{css as i}from"lit";const e=i`
97
153
 
98
154
  :host([placement='right']) .sidebar {
99
155
  border-right: none;
100
- border-left: 1px solid var(--nile-colors-neutral-400);
156
+ border-left: 1px solid var(--nile-colors-neutral-400, var(--ng-colors-border-neutral));
157
+ order: 0;
101
158
  }
102
159
 
103
160
  :host([placement='right']) .toggle-btn {
@@ -111,6 +168,6 @@ import{css as i}from"lit";const e=i`
111
168
 
112
169
  :host([placement='right']) .sidebar-nav {
113
170
  padding-right: 0;
114
- padding-left: var(--nile-spacing-xl);
171
+ padding-left: var(--nile-spacing-xl, var(--ng-spacing-xl));
115
172
  }
116
- `;export{e as s};
173
+ `;export{r as s};
@@ -1,4 +1,18 @@
1
- import{__decorate as t}from"tslib";import{html as e}from"lit";import{property as i,state as s,query as n,customElement as l}from"lit/decorators.js";import{s as a}from"./nile-inline-sidebar.css.esm.js";import{N as o}from"../internal/nile-element.esm.js";import"../internal/accessibility/a11y.state.enum.esm.js";import"../internal/accessibility/a11y.property.enum.esm.js";import"../internal/accessibility/role.enum.esm.js";let r=class extends o{constructor(){super(...arguments),this.collapsed=!1,this.fixed=!1,this.showTooltip=!1,this.placement="left",this.activeIndex=-1,this.handleKeyDown=t=>{if(this.collapsed)return;const e=this.focusableItems;if(!e.length)return;const i=this.sidebarItems.find((t=>t===document.activeElement||t===this.shadowRoot?.activeElement||t.matches(":focus-within"))),s=i?e.indexOf(i):-1;let n=null;switch(t.key){case"ArrowDown":n=s<e.length-1?s+1:0;break;case"ArrowUp":n=s>0?s-1:e.length-1;break;case"Home":n=0;break;case"End":n=e.length-1;break;default:return}t.preventDefault(),null!==n&&e[n]&&this.focusItem(e[n])},this.handleItemSelect=t=>{const e=t.detail.item,i=this.sidebarItems.indexOf(e);this.sidebarItems.forEach(((t,e)=>t.active=e===i)),this.activeIndex=i,this.updateTabIndices(),this.dispatchEvent(new CustomEvent("nile-change",{detail:{selectedItem:e,index:i},bubbles:!0,composed:!0})),this.requestUpdate()}}static get styles(){return[a]}get sidebarItems(){if(!this.defaultSlot)return[];return this.defaultSlot.assignedElements({flatten:!0}).flatMap((t=>"nile-inline-sidebar-item"===t.tagName.toLowerCase()?[t]:Array.from(t.querySelectorAll("nile-inline-sidebar-item"))))}connectedCallback(){super.connectedCallback(),this.addEventListener("nile-click",this.handleItemSelect),this.addEventListener("keydown",this.handleKeyDown),this.mutationObserver=new MutationObserver((()=>this.syncActiveFromItems()))}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),this.removeEventListener("nile-click",this.handleItemSelect),this.removeEventListener("keydown",this.handleKeyDown)}firstUpdated(){this.observeSidebarItems(),this.syncActiveFromItems(),this.fixed&&(this.collapsed=!1)}observeSidebarItems(){this.sidebarItems?.length&&this.mutationObserver&&this.sidebarItems.forEach((t=>this.mutationObserver.observe(t,{attributes:!0,attributeFilter:["active"]})))}syncActiveFromItems(){if(!this.sidebarItems?.length)return;const t=this.sidebarItems.findIndex((t=>t.hasAttribute("active")));-1!==t&&t!==this.activeIndex&&(this.activeIndex=t,this.requestUpdate()),this.updateTabIndices()}get focusableItems(){return this.sidebarItems.filter((t=>!t.hasAttribute("disabled")))}updateTabIndices(){const t=this.sidebarItems;if(!t.length)return;const e=this.activeIndex>=0?t[this.activeIndex]:null;t.forEach((t=>{t.hasAttribute("disabled")?t.setAttribute("tabindex","-1"):t===e?t.setAttribute("tabindex","0"):e||t!==this.focusableItems[0]?t.setAttribute("tabindex","-1"):t.setAttribute("tabindex","0")}))}focusItem(t){this.sidebarItems.forEach((t=>t.setAttribute("tabindex","-1"))),t.setAttribute("tabindex","0"),t.focus()}toggleCollapse(){this.fixed||(this.collapsed=!this.collapsed,this.dispatchEvent(new CustomEvent("nile-toggle",{detail:{collapsed:this.collapsed},bubbles:!0,composed:!0})))}handleMenuItemClick(t){const e=this.sidebarItems[t];if(!e||e.hasAttribute("disabled"))return;this.sidebarItems.forEach(((e,i)=>e.active=i===t)),this.activeIndex=t;const i=e.textContent?.trim()||"",s=e.href;this.dispatchEvent(new CustomEvent("nile-click",{detail:{item:e,href:s,text:i},bubbles:!0,composed:!0})),s&&(window.location.href=s),this.requestUpdate()}get menuItemsTemplate(){if(!this.sidebarItems?.length)return null;const t="right"===this.placement?"left":"right";return this.sidebarItems.map(((i,s)=>{const n=i.tooltip,l=i.scrollWidth>i.clientWidth||i.scrollHeight>i.clientHeight,a=e`
1
+ import{__decorate as t}from"tslib";import{nothing as i,html as e}from"lit";import{property as s,state as n,query as a,customElement as r}from"lit/decorators.js";import{classMap as o}from"lit/directives/class-map.js";import{s as l}from"./nile-inline-sidebar.css.esm.js";import{N as h}from"../internal/nile-element.esm.js";import{d}from"../internal/drag.esm.js";import{c}from"../internal/math.esm.js";import"../internal/accessibility/a11y.state.enum.esm.js";import"../internal/accessibility/a11y.property.enum.esm.js";import"../internal/accessibility/role.enum.esm.js";let b=class extends h{constructor(){super(...arguments),this.collapsed=!1,this.fixed=!1,this.showTooltip=!1,this.placement="left",this.resizable=!1,this.sidebarWidth=216,this.minSidebarWidth=120,this.showToggleBtn=!0,this.maxSidebarWidth=400,this.variant="minimal",this.activeIndex=-1,this.handleKeyDown=t=>{if(this.collapsed)return;const i=this.focusableItems;if(!i.length)return;const e=this.sidebarItems.find((t=>t===document.activeElement||t===this.shadowRoot?.activeElement||t.matches(":focus-within"))),s=e?i.indexOf(e):-1;let n=null;switch(t.key){case"ArrowDown":n=s<i.length-1?s+1:0;break;case"ArrowUp":n=s>0?s-1:i.length-1;break;case"Home":n=0;break;case"End":n=i.length-1;break;default:return}t.preventDefault(),null!==n&&i[n]&&this.focusItem(i[n])},this.handleItemSelect=t=>{const i=t.detail.item,e=this.sidebarItems.indexOf(i);this.sidebarItems.forEach(((t,i)=>t.active=i===e)),this.activeIndex=e,this.updateTabIndices(),this.dispatchEvent(new CustomEvent("nile-change",{detail:{selectedItem:i,index:e},bubbles:!0,composed:!0})),this.requestUpdate()}}static get styles(){return[l]}get sidebarItems(){if(!this.defaultSlot)return[];return this.defaultSlot.assignedElements({flatten:!0}).flatMap((t=>"nile-inline-sidebar-item"===t.tagName.toLowerCase()?[t]:Array.from(t.querySelectorAll("nile-inline-sidebar-item"))))}connectedCallback(){super.connectedCallback(),this.addEventListener("nile-click",this.handleItemSelect),this.addEventListener("keydown",this.handleKeyDown),this.mutationObserver=new MutationObserver((()=>this.syncActiveFromItems()))}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),this.removeEventListener("nile-click",this.handleItemSelect),this.removeEventListener("keydown",this.handleKeyDown)}firstUpdated(){this.observeSidebarItems(),this.syncActiveFromItems(),this.syncChildSidebarItemVariants(),this.fixed&&(this.collapsed=!1)}updated(t){super.updated(t),t.has("variant")&&this.syncChildSidebarItemVariants()}syncChildSidebarItemVariants(){const t=this.querySelectorAll("nile-inline-sidebar-item"),i=this.variant??"minimal";t.forEach((t=>{t.variant=i}))}observeSidebarItems(){this.sidebarItems?.length&&this.mutationObserver&&this.sidebarItems.forEach((t=>this.mutationObserver.observe(t,{attributes:!0,attributeFilter:["active"]})))}syncActiveFromItems(){if(!this.sidebarItems?.length)return;const t=this.sidebarItems.findIndex((t=>t.hasAttribute("active")));-1!==t&&t!==this.activeIndex&&(this.activeIndex=t,this.requestUpdate()),this.updateTabIndices()}get focusableItems(){return this.sidebarItems.filter((t=>!t.hasAttribute("disabled")))}updateTabIndices(){const t=this.sidebarItems;if(!t.length)return;const i=this.activeIndex>=0?t[this.activeIndex]:null;t.forEach((t=>{t.hasAttribute("disabled")?t.setAttribute("tabindex","-1"):t===i?t.setAttribute("tabindex","0"):i||t!==this.focusableItems[0]?t.setAttribute("tabindex","-1"):t.setAttribute("tabindex","0")}))}focusItem(t){this.sidebarItems.forEach((t=>t.setAttribute("tabindex","-1"))),t.setAttribute("tabindex","0"),t.focus()}toggleCollapse(){this.fixed||(this.collapsed=!this.collapsed,this.dispatchEvent(new CustomEvent("nile-toggle",{detail:{collapsed:this.collapsed},bubbles:!0,composed:!0})))}handleMenuItemClick(t){const i=this.sidebarItems[t];if(!i||i.hasAttribute("disabled"))return;this.sidebarItems.forEach(((i,e)=>i.active=e===t)),this.activeIndex=t;const e=i.textContent?.trim()||"",s=i.href;this.dispatchEvent(new CustomEvent("nile-click",{detail:{item:i,href:s,text:e},bubbles:!0,composed:!0})),s&&(window.location.href=s),this.requestUpdate()}handleSeparatorDrag(t){if(!this.resizable||this.collapsed)return;t.cancelable&&t.preventDefault();const i="right"===this.placement;this.style.setProperty("--sidebar-transition","none"),d(this,{onMove:t=>{const e=this.getBoundingClientRect();let s;s=i?e.width-t:t,this.sidebarWidth=c(s,this.minSidebarWidth,this.maxSidebarWidth),this.emit("nile-sidebar-resize",{width:this.sidebarWidth})},onStop:()=>{this.style.removeProperty("--sidebar-transition")},initialEvent:t})}handleSeparatorKeyDown(t){if(!this.resizable||this.collapsed)return;const i=t.shiftKey?10:1;let e=this.sidebarWidth;switch(t.key){case"ArrowLeft":e-=i;break;case"ArrowRight":e+=i;break;case"Home":e=this.minSidebarWidth;break;case"End":e=this.maxSidebarWidth;break;default:return}t.preventDefault(),this.sidebarWidth=c(e,this.minSidebarWidth,this.maxSidebarWidth),this.emit("nile-sidebar-resize",{width:this.sidebarWidth})}get separatorTemplate(){return!this.resizable||this.collapsed?i:e`
2
+ <div
3
+ class="separator"
4
+ part="separator"
5
+ tabindex="0"
6
+ role="separator"
7
+ aria-valuenow=${this.sidebarWidth}
8
+ aria-valuemin=${this.minSidebarWidth}
9
+ aria-valuemax=${this.maxSidebarWidth}
10
+ aria-label="Resize sidebar"
11
+ @keydown=${this.handleSeparatorKeyDown}
12
+ @mousedown=${this.handleSeparatorDrag}
13
+ @touchstart=${this.handleSeparatorDrag}
14
+ ></div>
15
+ `}get menuItemsTemplate(){if(!this.sidebarItems?.length)return null;const t="right"===this.placement?"left":"right";return this.sidebarItems.map(((i,s)=>{const n=i.tooltip,a=i.scrollWidth>i.clientWidth||i.scrollHeight>i.clientHeight,r=e`
2
16
  <nile-side-bar-action-menu-item
3
17
  ?disabled=${i.hasAttribute("disabled")}
4
18
  ?active=${this.activeIndex===s}
@@ -6,58 +20,63 @@ import{__decorate as t}from"tslib";import{html as e}from"lit";import{property as
6
20
  >
7
21
  ${i.textContent}
8
22
  </nile-side-bar-action-menu-item>
9
- `;return n||l?e`
23
+ `;return n||a?e`
10
24
  <nile-tooltip
11
25
  content=${i.textContent?.trim()||""}
12
26
  hoist
13
27
  placement=${t}
14
28
  >
15
- ${a}
29
+ ${r}
16
30
  </nile-tooltip>
17
- `:a}))}render(){const t="right"===this.placement,i=t?"menu_open":"menu_close",s=t?"menu_close":"menu_open",n=t?"bottom-end":"bottom-start";return e`
18
- <div class="sidebar" part="base">
31
+ `:r}))}render(){const t="right"===this.placement,s=t?"menu_open":"menu_close",n=t?"menu_close":"menu_open",a=t?"bottom-end":"bottom-start",r=this.collapsed?"":`width: ${this.sidebarWidth}px;`;return e`
32
+ <div class="sidebar" part="base" style=${r}>
19
33
  <div class="sidebar-header" part="header">
20
34
  ${this.fixed?null:this.collapsed?e`
21
35
  <nile-side-bar-action
22
36
  class="toggle-action"
23
- placement=${n}
37
+ placement=${a}
24
38
  hoist
25
39
  open
26
40
  triggerDropdown="hover"
27
41
  >
42
+ ${this.showToggleBtn?e`
43
+ <nile-button
44
+ slot="trigger"
45
+ class="toggle-btn"
46
+ variant="tertiary"
47
+ @click=${this.toggleCollapse}
48
+ >
49
+ <nile-icon name=${s}></nile-icon>
50
+ </nile-button>
51
+ `:i}
52
+ <nile-side-bar-action-menu>
53
+ ${this.menuItemsTemplate}
54
+ </nile-side-bar-action-menu>
55
+ </nile-side-bar-action>
56
+ `:e`
57
+ ${this.showToggleBtn?e`
28
58
  <nile-button
29
- slot="trigger"
30
59
  class="toggle-btn"
31
60
  variant="tertiary"
32
61
  @click=${this.toggleCollapse}
33
62
  >
34
- <nile-icon name=${i}></nile-icon>
63
+ <nile-icon name=${n}></nile-icon>
35
64
  </nile-button>
36
- <nile-side-bar-action-menu>
37
- ${this.menuItemsTemplate}
38
- </nile-side-bar-action-menu>
39
- </nile-side-bar-action>
40
- `:e`
41
- <nile-button
42
- class="toggle-btn"
43
- variant="tertiary"
44
- @click=${this.toggleCollapse}
45
- >
46
- <nile-icon name=${s}></nile-icon>
47
- </nile-button>
65
+ `:i}
48
66
  `}
49
67
  </div>
50
68
 
51
69
  <nav
52
- class="sidebar-nav"
70
+ class=${o({"sidebar-nav":!0,"sidebar-nav--rich":"rich"===this.variant})}
53
71
  role="navigation"
54
72
  aria-label="Sidebar"
55
73
  style=${this.collapsed?"display:none;":""}
56
74
  part="nav-items"
57
75
  >
58
76
  <slot
59
- @slotchange=${()=>{this.requestUpdate(),this.observeSidebarItems(),this.syncActiveFromItems()}}
77
+ @slotchange=${()=>{this.requestUpdate(),this.observeSidebarItems(),this.syncActiveFromItems(),this.syncChildSidebarItemVariants()}}
60
78
  ></slot>
61
79
  </nav>
62
80
  </div>
63
- `}};t([i({type:Boolean,reflect:!0})],r.prototype,"collapsed",void 0),t([i({type:Boolean,reflect:!0,attribute:!0})],r.prototype,"fixed",void 0),t([i({type:Boolean,reflect:!0})],r.prototype,"showTooltip",void 0),t([i({type:String,reflect:!0})],r.prototype,"placement",void 0),t([s()],r.prototype,"activeIndex",void 0),t([n("slot")],r.prototype,"defaultSlot",void 0),r=t([l("nile-inline-sidebar")],r);export{r as N};
81
+ ${this.separatorTemplate}
82
+ `}};t([s({type:Boolean,reflect:!0})],b.prototype,"collapsed",void 0),t([s({type:Boolean,reflect:!0,attribute:!0})],b.prototype,"fixed",void 0),t([s({type:Boolean,reflect:!0})],b.prototype,"showTooltip",void 0),t([s({type:String,reflect:!0})],b.prototype,"placement",void 0),t([s({type:Boolean,reflect:!0})],b.prototype,"resizable",void 0),t([s({type:Number,attribute:!0})],b.prototype,"sidebarWidth",void 0),t([s({type:Number,attribute:!0})],b.prototype,"minSidebarWidth",void 0),t([s({type:Boolean,attribute:!0})],b.prototype,"showToggleBtn",void 0),t([s({type:Number,attribute:!0})],b.prototype,"maxSidebarWidth",void 0),t([s({type:String,reflect:!0,attribute:!0})],b.prototype,"variant",void 0),t([n()],b.prototype,"activeIndex",void 0),t([a("slot")],b.prototype,"defaultSlot",void 0),b=t([r("nile-inline-sidebar")],b);export{b as N};
@@ -1,2 +1,2 @@
1
- System.register(["lit"],function(_export,_context){"use strict";var e,_templateObject,i;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}return{setters:[function(_lit){e=_lit.css;}],execute:function execute(){_export("s",i=e(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n:host {\n display: block;\n}\n\n.group {\n display: flex;\n flex-direction: column;\n gap: var(--nile-spacing-xs);\n}\n\n\n:host([divider=\"false\"]) .group {\n border-bottom: none;\n margin-bottom: 0;\n padding-bottom: 0;\n}\n\n.group-label {\n font-size: var(--nile-type-scale-3);\n font-weight: var(--nile-font-weight-semibold);\n text-transform: uppercase;\n color: var(--nile-colors-neutral-500); \n margin: var(--nile-spacing-xs) 0 var(--nile-spacing-xs) var(--nile-spacing-md);\n letter-spacing: 0.05em;\n}\n\n.group-items {\n display: flex;\n flex-direction: column;\n gap: var(--nile-spacing-xs);\n}\n"]))));}};});
1
+ System.register(["lit"],function(_export,_context){"use strict";var n,_templateObject,a;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}return{setters:[function(_lit){n=_lit.css;}],execute:function execute(){_export("s",a=n(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n:host {\n display: block;\n}\n\n.group {\n display: flex;\n flex-direction: column;\n gap: var(--nile-spacing-xs, var(--ng-spacing-xs));\n}\n\n:host([divider=\"false\"]) .group {\n border-bottom: none;\n margin-bottom: 0;\n padding-bottom: 0;\n}\n\n.group-label {\n font-size: var(--nile-type-scale-3, var(--ng-font-size-text-sm));\n font-weight: var(--nile-font-weight-semibold, var(--ng-font-weight-semibold));\n text-transform: uppercase;\n color: var(--nile-colors-neutral-500, var(--ng-colors-text-disabled));\n margin: var(--nile-spacing-xs, var(--ng-spacing-xs)) 0 var(--nile-spacing-xs, var(--ng-spacing-xs)) var(--nile-spacing-md, var(--ng-spacing-md));\n letter-spacing: 0.05em;\n}\n\n.group-items {\n display: flex;\n flex-direction: column;\n gap: var(--nile-spacing-xs, var(--ng-spacing-xs));\n}\n"]))));}};});
2
2
  //# sourceMappingURL=nile-inline-sidebar-group.css.cjs.js.map