@aquera/nile-elements 1.3.8-beta-1.2 → 1.3.9-beta-1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (130) hide show
  1. package/demo/index.css +3 -0
  2. package/demo/index.html +184 -25
  3. package/demo/nxtgen.css +2 -0
  4. package/demo/variables.css +2 -1
  5. package/dist/index.cjs.js +1 -1
  6. package/dist/index.esm.js +1 -1
  7. package/dist/index.js +151 -124
  8. package/dist/nile-inline-sidebar/nile-inline-sidebar.cjs.js +1 -1
  9. package/dist/nile-inline-sidebar/nile-inline-sidebar.cjs.js.map +1 -1
  10. package/dist/nile-inline-sidebar/nile-inline-sidebar.css.cjs.js +1 -1
  11. package/dist/nile-inline-sidebar/nile-inline-sidebar.css.cjs.js.map +1 -1
  12. package/dist/nile-inline-sidebar/nile-inline-sidebar.css.esm.js +8 -2
  13. package/dist/nile-inline-sidebar/nile-inline-sidebar.esm.js +10 -6
  14. package/dist/nile-inline-sidebar-item/nile-inline-sidebar-item.cjs.js +1 -1
  15. package/dist/nile-inline-sidebar-item/nile-inline-sidebar-item.cjs.js.map +1 -1
  16. package/dist/nile-inline-sidebar-item/nile-inline-sidebar-item.css.cjs.js +1 -1
  17. package/dist/nile-inline-sidebar-item/nile-inline-sidebar-item.css.cjs.js.map +1 -1
  18. package/dist/nile-inline-sidebar-item/nile-inline-sidebar-item.css.esm.js +8 -2
  19. package/dist/nile-inline-sidebar-item/nile-inline-sidebar-item.esm.js +2 -2
  20. package/dist/nile-side-bar/nile-side-bar.cjs.js +1 -1
  21. package/dist/nile-side-bar/nile-side-bar.cjs.js.map +1 -1
  22. package/dist/nile-side-bar/nile-side-bar.css.cjs.js +1 -1
  23. package/dist/nile-side-bar/nile-side-bar.css.cjs.js.map +1 -1
  24. package/dist/nile-side-bar/nile-side-bar.css.esm.js +25 -30
  25. package/dist/nile-side-bar/nile-side-bar.esm.js +7 -1
  26. package/dist/nile-side-bar-expand/nile-side-bar-expand.cjs.js +1 -1
  27. package/dist/nile-side-bar-expand/nile-side-bar-expand.cjs.js.map +1 -1
  28. package/dist/nile-side-bar-expand/nile-side-bar-expand.css.cjs.js +1 -1
  29. package/dist/nile-side-bar-expand/nile-side-bar-expand.css.cjs.js.map +1 -1
  30. package/dist/nile-side-bar-expand/nile-side-bar-expand.css.esm.js +3 -5
  31. package/dist/nile-side-bar-expand/nile-side-bar-expand.esm.js +8 -8
  32. package/dist/nile-side-bar-footer/nile-side-bar-footer.css.cjs.js +1 -1
  33. package/dist/nile-side-bar-footer/nile-side-bar-footer.css.cjs.js.map +1 -1
  34. package/dist/nile-side-bar-footer/nile-side-bar-footer.css.esm.js +4 -4
  35. package/dist/nile-side-bar-footer-item/nile-side-bar-footer-item.cjs.js +1 -1
  36. package/dist/nile-side-bar-footer-item/nile-side-bar-footer-item.cjs.js.map +1 -1
  37. package/dist/nile-side-bar-footer-item/nile-side-bar-footer-item.css.cjs.js +1 -1
  38. package/dist/nile-side-bar-footer-item/nile-side-bar-footer-item.css.cjs.js.map +1 -1
  39. package/dist/nile-side-bar-footer-item/nile-side-bar-footer-item.css.esm.js +11 -6
  40. package/dist/nile-side-bar-footer-item/nile-side-bar-footer-item.esm.js +3 -3
  41. package/dist/nile-side-bar-group/nile-side-bar-group.css.cjs.js +1 -1
  42. package/dist/nile-side-bar-group/nile-side-bar-group.css.cjs.js.map +1 -1
  43. package/dist/nile-side-bar-group/nile-side-bar-group.css.esm.js +4 -7
  44. package/dist/nile-side-bar-group-item/nile-side-bar-group-item.css.cjs.js +1 -1
  45. package/dist/nile-side-bar-group-item/nile-side-bar-group-item.css.cjs.js.map +1 -1
  46. package/dist/nile-side-bar-group-item/nile-side-bar-group-item.css.esm.js +58 -56
  47. package/dist/nile-side-bar-header/nile-side-bar-header.css.cjs.js +1 -1
  48. package/dist/nile-side-bar-header/nile-side-bar-header.css.cjs.js.map +1 -1
  49. package/dist/nile-side-bar-header/nile-side-bar-header.css.esm.js +2 -4
  50. package/dist/nile-side-bar-panel/index.cjs.js +2 -0
  51. package/dist/nile-side-bar-panel/index.cjs.js.map +1 -0
  52. package/dist/nile-side-bar-panel/index.esm.js +1 -0
  53. package/dist/nile-side-bar-panel/nile-side-bar-panel.cjs.js +2 -0
  54. package/dist/nile-side-bar-panel/nile-side-bar-panel.cjs.js.map +1 -0
  55. package/dist/nile-side-bar-panel/nile-side-bar-panel.css.cjs.js +2 -0
  56. package/dist/nile-side-bar-panel/nile-side-bar-panel.css.cjs.js.map +1 -0
  57. package/dist/nile-side-bar-panel/nile-side-bar-panel.css.esm.js +8 -0
  58. package/dist/nile-side-bar-panel/nile-side-bar-panel.esm.js +3 -0
  59. package/dist/nile-slide-toggle/nile-slide-toggle.cjs.js +1 -1
  60. package/dist/nile-slide-toggle/nile-slide-toggle.cjs.js.map +1 -1
  61. package/dist/nile-slide-toggle/nile-slide-toggle.esm.js +9 -8
  62. package/dist/src/index.d.ts +1 -0
  63. package/dist/src/index.js +1 -0
  64. package/dist/src/index.js.map +1 -1
  65. package/dist/src/nile-inline-sidebar/nile-inline-sidebar.css.js +8 -2
  66. package/dist/src/nile-inline-sidebar/nile-inline-sidebar.css.js.map +1 -1
  67. package/dist/src/nile-inline-sidebar/nile-inline-sidebar.js +10 -3
  68. package/dist/src/nile-inline-sidebar/nile-inline-sidebar.js.map +1 -1
  69. package/dist/src/nile-inline-sidebar-item/nile-inline-sidebar-item.css.js +6 -0
  70. package/dist/src/nile-inline-sidebar-item/nile-inline-sidebar-item.css.js.map +1 -1
  71. package/dist/src/nile-inline-sidebar-item/nile-inline-sidebar-item.d.ts +1 -0
  72. package/dist/src/nile-inline-sidebar-item/nile-inline-sidebar-item.js +4 -0
  73. package/dist/src/nile-inline-sidebar-item/nile-inline-sidebar-item.js.map +1 -1
  74. package/dist/src/nile-side-bar/nile-side-bar.css.js +23 -28
  75. package/dist/src/nile-side-bar/nile-side-bar.css.js.map +1 -1
  76. package/dist/src/nile-side-bar/nile-side-bar.js +7 -1
  77. package/dist/src/nile-side-bar/nile-side-bar.js.map +1 -1
  78. package/dist/src/nile-side-bar-expand/nile-side-bar-expand.css.js +3 -5
  79. package/dist/src/nile-side-bar-expand/nile-side-bar-expand.css.js.map +1 -1
  80. package/dist/src/nile-side-bar-expand/nile-side-bar-expand.d.ts +2 -0
  81. package/dist/src/nile-side-bar-expand/nile-side-bar-expand.js +12 -4
  82. package/dist/src/nile-side-bar-expand/nile-side-bar-expand.js.map +1 -1
  83. package/dist/src/nile-side-bar-footer/nile-side-bar-footer.css.js +2 -2
  84. package/dist/src/nile-side-bar-footer/nile-side-bar-footer.css.js.map +1 -1
  85. package/dist/src/nile-side-bar-footer-item/nile-side-bar-footer-item.css.js +9 -4
  86. package/dist/src/nile-side-bar-footer-item/nile-side-bar-footer-item.css.js.map +1 -1
  87. package/dist/src/nile-side-bar-footer-item/nile-side-bar-footer-item.d.ts +1 -0
  88. package/dist/src/nile-side-bar-footer-item/nile-side-bar-footer-item.js +8 -1
  89. package/dist/src/nile-side-bar-footer-item/nile-side-bar-footer-item.js.map +1 -1
  90. package/dist/src/nile-side-bar-group/nile-side-bar-group.css.js +2 -5
  91. package/dist/src/nile-side-bar-group/nile-side-bar-group.css.js.map +1 -1
  92. package/dist/src/nile-side-bar-group-item/nile-side-bar-group-item.css.js +48 -46
  93. package/dist/src/nile-side-bar-group-item/nile-side-bar-group-item.css.js.map +1 -1
  94. package/dist/src/nile-side-bar-header/nile-side-bar-header.css.js +2 -4
  95. package/dist/src/nile-side-bar-header/nile-side-bar-header.css.js.map +1 -1
  96. package/dist/src/nile-side-bar-panel/index.d.ts +1 -0
  97. package/dist/src/nile-side-bar-panel/index.js +2 -0
  98. package/dist/src/nile-side-bar-panel/index.js.map +1 -0
  99. package/dist/src/nile-side-bar-panel/nile-side-bar-panel.css.d.ts +12 -0
  100. package/dist/src/nile-side-bar-panel/nile-side-bar-panel.css.js +20 -0
  101. package/dist/src/nile-side-bar-panel/nile-side-bar-panel.css.js.map +1 -0
  102. package/dist/src/nile-side-bar-panel/nile-side-bar-panel.d.ts +32 -0
  103. package/dist/src/nile-side-bar-panel/nile-side-bar-panel.js +43 -0
  104. package/dist/src/nile-side-bar-panel/nile-side-bar-panel.js.map +1 -0
  105. package/dist/src/nile-slide-toggle/nile-slide-toggle.js +6 -5
  106. package/dist/src/nile-slide-toggle/nile-slide-toggle.js.map +1 -1
  107. package/dist/src/version.js +1 -1
  108. package/dist/src/version.js.map +1 -1
  109. package/dist/tsconfig.tsbuildinfo +1 -1
  110. package/package.json +4 -3
  111. package/src/index.ts +2 -0
  112. package/src/nile-inline-sidebar/nile-inline-sidebar.css.ts +8 -2
  113. package/src/nile-inline-sidebar/nile-inline-sidebar.ts +16 -5
  114. package/src/nile-inline-sidebar-item/nile-inline-sidebar-item.css.ts +6 -0
  115. package/src/nile-inline-sidebar-item/nile-inline-sidebar-item.ts +1 -0
  116. package/src/nile-side-bar/nile-side-bar.css.ts +23 -28
  117. package/src/nile-side-bar/nile-side-bar.ts +8 -1
  118. package/src/nile-side-bar-expand/nile-side-bar-expand.css.ts +3 -5
  119. package/src/nile-side-bar-expand/nile-side-bar-expand.ts +6 -4
  120. package/src/nile-side-bar-footer/nile-side-bar-footer.css.ts +2 -2
  121. package/src/nile-side-bar-footer-item/nile-side-bar-footer-item.css.ts +9 -4
  122. package/src/nile-side-bar-footer-item/nile-side-bar-footer-item.ts +9 -1
  123. package/src/nile-side-bar-group/nile-side-bar-group.css.ts +2 -5
  124. package/src/nile-side-bar-group-item/nile-side-bar-group-item.css.ts +49 -47
  125. package/src/nile-side-bar-header/nile-side-bar-header.css.ts +2 -4
  126. package/src/nile-side-bar-panel/index.ts +1 -0
  127. package/src/nile-side-bar-panel/nile-side-bar-panel.css.ts +22 -0
  128. package/src/nile-side-bar-panel/nile-side-bar-panel.ts +54 -0
  129. package/src/nile-slide-toggle/nile-slide-toggle.ts +6 -5
  130. package/vscode-html-custom-data.json +25 -3
@@ -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"],function(_export,_context){"use strict";var t,e,i,s,n,l,o,a,_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){o=_nileInlineSidebarCssCjsJs.s;},function(_internalNileElementCjsJs){a=_internalNileElementCjsJs.N;}],execute:function execute(){_export("N",r=/*#__PURE__*/function(_a){function r(){var _this;_classCallCheck(this,r);_this=_callSuper(this,r,arguments),_this.collapsed=!1,_this.fixed=!1,_this.showTooltip=!1,_this.activeIndex=-1,_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.dispatchEvent(new CustomEvent("nile-change",{detail:{selectedItem:e,index:i},bubbles:!0,composed:!0})),_this.requestUpdate();};return _this;}_inherits(r,_a);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.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);}},{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());}},{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,_this4=this;return(_this$sidebarItems3=this.sidebarItems)!==null&&_this$sidebarItems3!==void 0&&_this$sidebarItems3.length?this.sidebarItems.map(function(t,i){var s=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 "])),t.hasAttribute("disabled"),_this4.activeIndex===i,function(){return _this4.handleMenuItemClick(i);},t.textContent);return _this4.showTooltip?e(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n <nile-tooltip content="," hoist placement=\"right\">\n ","\n </nile-tooltip>\n "])),t.textContent,s):s;}):null;}},{key:"render",value:function render(){var _this5=this;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 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=\"bottom-start\"\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=\"menu_close\"></nile-icon>\n </nile-button>\n <nile-side-bar-action-menu>\n ","\n </nile-side-bar-action-menu>\n </nile-side-bar-action>\n "])),this.toggleCollapse,this.menuItemsTemplate):e(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["\n <nile-button\n class=\"toggle-btn\"\n variant=\"tertiary\"\n @click=","\n >\n <nile-icon name=\"menu_open\"></nile-icon>\n </nile-button>\n "])),this.toggleCollapse),this.collapsed?"display:none;":"",function(){_this5.requestUpdate(),_this5.observeSidebarItems(),_this5.syncActiveFromItems();});}}],[{key:"styles",get:function get(){return[o];}}]);}(a));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([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","./nile-inline-sidebar.css.cjs.js","../internal/nile-element.cjs.js"],function(_export,_context){"use strict";var t,i,e,s,n,l,o,a,_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){i=_lit.html;},function(_litDecoratorsJs){e=_litDecoratorsJs.property;s=_litDecoratorsJs.state;n=_litDecoratorsJs.query;l=_litDecoratorsJs.customElement;},function(_nileInlineSidebarCssCjsJs){o=_nileInlineSidebarCssCjsJs.s;},function(_internalNileElementCjsJs){a=_internalNileElementCjsJs.N;}],execute:function execute(){_export("N",r=/*#__PURE__*/function(_a){function r(){var _this;_classCallCheck(this,r);_this=_callSuper(this,r,arguments),_this.collapsed=!1,_this.fixed=!1,_this.showTooltip=!1,_this.activeIndex=-1,_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.dispatchEvent(new CustomEvent("nile-change",{detail:{selectedItem:i,index:e},bubbles:!0,composed:!0})),_this.requestUpdate();};return _this;}_inherits(r,_a);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.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);}},{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());}},{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:"menuItemsTemplate",get:function get(){var _this$sidebarItems3,_this4=this;return(_this$sidebarItems3=this.sidebarItems)!==null&&_this$sidebarItems3!==void 0&&_this$sidebarItems3.length?this.sidebarItems.map(function(t,e){var _t$textContent;var s=t.tooltip,n=t.scrollWidth>t.clientWidth||t.scrollHeight>t.clientHeight,l=i(_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 "])),t.hasAttribute("disabled"),_this4.activeIndex===e,function(){return _this4.handleMenuItemClick(e);},t.textContent);return s||n?i(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n <nile-inline-tooltip\n content=","\n hoist\n placement=\"right\"\n >\n ","\n </nile-inline-tooltip>\n "])),((_t$textContent=t.textContent)===null||_t$textContent===void 0?void 0:_t$textContent.trim())||"",l):l;}):null;}},{key:"render",value:function render(){var _this5=this;return i(_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 style=","\n part=\"nav-items\"\n >\n <slot\n @slotchange=","\n ></slot>\n </nav>\n </div>\n "])),this.fixed?null:this.collapsed?i(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n <nile-side-bar-action\n class=\"toggle-action\"\n placement=\"bottom-start\"\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=\"menu_close\"></nile-icon>\n </nile-button>\n <nile-side-bar-action-menu>\n ","\n </nile-side-bar-action-menu>\n </nile-side-bar-action>\n "])),this.toggleCollapse,this.menuItemsTemplate):i(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["\n <nile-button\n class=\"toggle-btn\"\n variant=\"tertiary\"\n @click=","\n >\n <nile-icon name=\"menu_open\"></nile-icon>\n </nile-button>\n "])),this.toggleCollapse),this.collapsed?"display:none;":"",function(){_this5.requestUpdate(),_this5.observeSidebarItems(),_this5.syncActiveFromItems();});}}],[{key:"styles",get:function get(){return[o];}}]);}(a));t([e({type:Boolean,reflect:!0})],r.prototype,"collapsed",void 0),t([e({type:Boolean,reflect:!0,attribute:!0})],r.prototype,"fixed",void 0),t([e({type:Boolean,reflect:!0})],r.prototype,"showTooltip",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));}};});
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 @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.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 }\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 }\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\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 return this.sidebarItems.map((item, index) => {\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\n return this.showTooltip\n ? html`\n <nile-tooltip content=${item.textContent} hoist placement=\"right\">\n ${content}\n </nile-tooltip>\n `\n : content;\n });\n }\n\n public render(): TemplateResult {\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=\"bottom-start\"\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=\"menu_close\"></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=\"menu_open\"></nile-icon>\n </nile-button>\n `\n : null}\n </div>\n\n <nav\n class=\"sidebar-nav\"\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","r","constructor","this","collapsed","fixed","showTooltip","activeIndex","handleItemSelect","event","selectedItem","detail","item","index","sidebarItems","indexOf","forEach","i","active","dispatchEvent","CustomEvent","bubbles","composed","requestUpdate","_this","_inherits","_a","_createClass","key","get","defaultSlot","assignedElements","flatten","flatMap","el","tagName","toLowerCase","Array","from","querySelectorAll","value","connectedCallback","super","addEventListener","mutationObserver","MutationObserver","syncActiveFromItems","disconnectedCallback","disconnect","removeEventListener","firstUpdated","observeSidebarItems","length","observe","attributes","attributeFilter","_this$sidebarItems2","findIndex","hasAttribute","toggleCollapse","handleMenuItemClick","_e$textContent","text","textContent","trim","href","window","location","_this$sidebarItems3","_this4","map","content","html","_templateObject","_taggedTemplateLiteral","_templateObject2","render","_templateObject3","_templateObject4","menuItemsTemplate","_templateObject5","__decorate","styles","NileElement","property","type","Boolean","reflect","pr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CAAAA,CAAAA,CAAA,CAA5DG,CAAAA,CAAS,CAAEC,IAAAA,CAAMC,OAASC,CAAAA,OAAAA,CAAAA,CAAS,CAAME,CAAAA,SAAAA,CAAAA,CAAW,CAAsBzF,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAwF,SAAA,CAAA,OAAA,CAAA,IAAA,EAE/BP,CAAAA,CAAAA,CAAAA,CAAA,CAA3CG,CAAAA,CAAS,CAAEC,IAAMC,CAAAA,OAAAA,CAASC,OAAS,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAA4BvF,CAAAwF,CAAAA,SAAAA,CAAA,aAAA,CAAA,IAAA,EAAA,CAAA,CAE/CP,CAAA,CAAA,CAAhBS,CAAyC1F,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAwF,SAAA,CAAA,aAAA,CAAA,IAAA,EAEnBP,CAAAA,CAAAA,CAAAA,CAAA,CAAtBU,CAAAA,CAAM,MAA8C3F,CAAAA,CAAAA,CAAAA,CAAAA,CAAAwF,SAAA,CAAA,aAAA,CAAA,IAAA,EAT1CxF,CAAAA,CAAAA,OAAAA,KAAAA,CAAAA,CAAiBiF,CAAA,CAAA,CAD7BW,CAAc,CAAA,qBAAA,CAAA,CAAA,CACF5F"}
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 @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.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 }\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 }\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\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 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-inline-tooltip\n content=${item.textContent?.trim() || ''}\n hoist\n placement=\"right\"\n >\n ${content}\n </nile-inline-tooltip>\n `\n : content;\n });\n }\n \n \n \n\n public render(): TemplateResult {\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=\"bottom-start\"\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=\"menu_close\"></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=\"menu_open\"></nile-icon>\n </nile-button>\n `\n : null}\n </div>\n\n <nav\n class=\"sidebar-nav\"\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","r","this","collapsed","fixed","showTooltip","activeIndex","handleItemSelect","event","selectedItem","detail","item","index","sidebarItems","indexOf","forEach","i","active","dispatchEvent","CustomEvent","bubbles","composed","requestUpdate","_this","_inherits","_a","_createClass","key","get","defaultSlot","assignedElements","flatten","flatMap","el","tagName","toLowerCase","Array","from","querySelectorAll","value","connectedCallback","super","addEventListener","mutationObserver","MutationObserver","syncActiveFromItems","disconnectedCallback","disconnect","removeEventListener","firstUpdated","observeSidebarItems","length","observe","attributes","attributeFilter","findIndex","hasAttribute","toggleCollapse","handleMenuItemClick","_i$textContent","text","textContent","trim","href","window","location","_this$sidebarItems3","_this4","map","_t$textContent","shouldShowTooltip","tooltip","isTruncated","scrollWidth","clientWidth","scrollHeight","clientHeight","content","html","_templateObject","_taggedTemplateLiteral","_templateObject2","render","_templateObject3","_templateObject4","menuItemsTemplate","_templateObject5","__decorate","styles","NileElement","property","type","Boolean","reflect","prototype","attribute","state","query","customElement"],"mappings":"wxHAkBaA,CAAAA,uBAAAA,EAAAA,EAAN,SAAAC,EAAA,uEACuCC,KAAAA,CAASC,SAAAA,CAAAA,CAAG,CAEKD,CAAAA,KAAAA,CAAKE,OAAG,CAEzBF,CAAAA,KAAAA,CAAWG,WAAG,CAAA,CAAA,CAAA,CAEzCH,K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A,IAAA,EAEDP,CAAAA,CAAAA,CAAAA,CAAA,CAA5DG,CAAAA,CAAS,CAAEC,IAAAA,CAAMC,OAASC,CAAAA,OAAAA,CAAAA,CAAS,CAAME,CAAAA,SAAAA,CAAAA,CAAW,CAAsB/F,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAA8F,SAAA,CAAA,OAAA,CAAA,IAAA,EAE/BP,CAAAA,CAAAA,CAAAA,CAAA,CAA3CG,CAAAA,CAAS,CAAEC,IAAMC,CAAAA,OAAAA,CAASC,OAAS,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAA4B7F,CAAA8F,CAAAA,SAAAA,CAAA,aAAA,CAAA,IAAA,EAAA,CAAA,CAE/CP,CAAA,CAAA,CAAhBS,CAAyChG,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAA8F,SAAA,CAAA,aAAA,CAAA,IAAA,EAEnBP,CAAAA,CAAAA,CAAAA,CAAA,CAAtBU,CAAAA,CAAM,MAA8CjG,CAAAA,CAAAA,CAAAA,CAAAA,CAAA8F,SAAA,CAAA,aAAA,CAAA,IAAA,EAT1C9F,CAAAA,CAAAA,OAAAA,KAAAA,CAAAA,CAAiBuF,CAAA,CAAA,CAD7BW,CAAc,CAAA,qBAAA,CAAA,CAAA,CACFlG"}
@@ -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-2xl);\n padding-bottom: var(--nile-spacing-2xl);\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 }\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"]))));}};});
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"]))));}};});
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-2xl);\n padding-bottom: var(--nile-spacing-2xl);\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 }\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"],"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\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"],"names":["styles","css","_templateObject","_taggedTemplateLiteral"],"mappings":"oTASaA,CAAAA,CAASC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA"}
@@ -41,8 +41,8 @@ import{css as i}from"lit";const e=i`
41
41
  flex-direction: column;
42
42
  gap: var(--nile-spacing-xs);
43
43
  padding-right: var(--nile-spacing-xl);
44
- padding-top: var(--nile-spacing-2xl);
45
- padding-bottom: var(--nile-spacing-2xl);
44
+ padding-top: var(--nile-spacing-3xl);
45
+ padding-bottom: var(--nile-spacing-3xl);
46
46
  }
47
47
 
48
48
  nile-side-bar-action-menu {
@@ -63,6 +63,12 @@ import{css as i}from"lit";const e=i`
63
63
  margin-left: 0;
64
64
  margin-right: 0;
65
65
  border-radius: 0;
66
+ color: black;
67
+ }
68
+
69
+ nile-side-bar-action-menu-item[active]::part(base):hover {
70
+ background: var(--nile-colors-primary-100);
71
+ color: black;
66
72
  }
67
73
 
68
74
  nile-side-bar-action-menu-item::part(label) {
@@ -1,4 +1,4 @@
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 o}from"./nile-inline-sidebar.css.esm.js";import{N as a}from"../internal/nile-element.esm.js";let r=class extends a{constructor(){super(...arguments),this.collapsed=!1,this.fixed=!1,this.showTooltip=!1,this.activeIndex=-1,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.dispatchEvent(new CustomEvent("nile-change",{detail:{selectedItem:e,index:i},bubbles:!0,composed:!0})),this.requestUpdate()}}static get styles(){return[o]}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.mutationObserver=new MutationObserver((()=>this.syncActiveFromItems()))}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),this.removeEventListener("nile-click",this.handleItemSelect)}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())}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(){return this.sidebarItems?.length?this.sidebarItems.map(((t,i)=>{const s=e`
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 o}from"./nile-inline-sidebar.css.esm.js";import{N as a}from"../internal/nile-element.esm.js";let r=class extends a{constructor(){super(...arguments),this.collapsed=!1,this.fixed=!1,this.showTooltip=!1,this.activeIndex=-1,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.dispatchEvent(new CustomEvent("nile-change",{detail:{selectedItem:e,index:i},bubbles:!0,composed:!0})),this.requestUpdate()}}static get styles(){return[o]}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.mutationObserver=new MutationObserver((()=>this.syncActiveFromItems()))}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),this.removeEventListener("nile-click",this.handleItemSelect)}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())}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(){return this.sidebarItems?.length?this.sidebarItems.map(((t,i)=>{const s=t.tooltip,n=t.scrollWidth>t.clientWidth||t.scrollHeight>t.clientHeight,l=e`
2
2
  <nile-side-bar-action-menu-item
3
3
  ?disabled=${t.hasAttribute("disabled")}
4
4
  ?active=${this.activeIndex===i}
@@ -6,11 +6,15 @@ import{__decorate as t}from"tslib";import{html as e}from"lit";import{property as
6
6
  >
7
7
  ${t.textContent}
8
8
  </nile-side-bar-action-menu-item>
9
- `;return this.showTooltip?e`
10
- <nile-tooltip content=${t.textContent} hoist placement="right">
11
- ${s}
12
- </nile-tooltip>
13
- `:s})):null}render(){return e`
9
+ `;return s||n?e`
10
+ <nile-inline-tooltip
11
+ content=${t.textContent?.trim()||""}
12
+ hoist
13
+ placement="right"
14
+ >
15
+ ${l}
16
+ </nile-inline-tooltip>
17
+ `:l})):null}render(){return e`
14
18
  <div class="sidebar" part="base">
15
19
  <div class="sidebar-header" part="header">
16
20
  ${this.fixed?null:this.collapsed?e`
@@ -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-item.css.cjs.js","../internal/nile-element.cjs.js"],function(_export,_context){"use strict";var i,t,e,s,l,r,_templateObject,_templateObject2,_templateObject3,o;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 _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){i=_tslib.__decorate;},function(_lit){t=_lit.html;},function(_litDecoratorsJs){e=_litDecoratorsJs.property;s=_litDecoratorsJs.customElement;},function(_nileInlineSidebarItemCssCjsJs){l=_nileInlineSidebarItemCssCjsJs.s;},function(_internalNileElementCjsJs){r=_internalNileElementCjsJs.N;}],execute:function execute(){_export("N",o=/*#__PURE__*/function(_r){function o(){var _this;_classCallCheck(this,o);_this=_callSuper(this,o,arguments),_this.active=!1,_this.disabled=!1;return _this;}_inherits(o,_r);return _createClass(o,[{key:"handleClick",value:function handleClick(i){var _this2=this,_this$textContent;if(this.disabled)return i.preventDefault(),void i.stopPropagation();var t=this.closest("nile-inline-sidebar");if(t){t.querySelectorAll("nile-inline-sidebar-item").forEach(function(i){return i.active=i===_this2;});}var e=((_this$textContent=this.textContent)===null||_this$textContent===void 0?void 0:_this$textContent.trim())||"";this.dispatchEvent(new CustomEvent("nile-click",{detail:{item:this,href:this.href,text:e},bubbles:!0,composed:!0})),this.href&&(window.location.href=this.href);}},{key:"render",value:function render(){return t(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <div class=\"item\" @click="," role=\"button\" tabindex=\"0\">\n ","\n </div>\n "])),this.handleClick,this.href?t(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<a href="," @click=","><slot></slot></a>"])),this.href,function(i){return i.preventDefault();}):t(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["<slot></slot>"]))));}}],[{key:"styles",get:function get(){return[l];}}]);}(r));i([e({type:Boolean,reflect:!0})],o.prototype,"active",void 0),i([e({type:Boolean,reflect:!0})],o.prototype,"disabled",void 0),i([e({type:String})],o.prototype,"href",void 0),_export("N",o=i([s("nile-inline-sidebar-item")],o));}};});
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-item.css.cjs.js","../internal/nile-element.cjs.js"],function(_export,_context){"use strict";var i,t,e,s,o,l,_templateObject,_templateObject2,_templateObject3,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 _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){i=_tslib.__decorate;},function(_lit){t=_lit.html;},function(_litDecoratorsJs){e=_litDecoratorsJs.property;s=_litDecoratorsJs.customElement;},function(_nileInlineSidebarItemCssCjsJs){o=_nileInlineSidebarItemCssCjsJs.s;},function(_internalNileElementCjsJs){l=_internalNileElementCjsJs.N;}],execute:function execute(){_export("N",r=/*#__PURE__*/function(_l){function r(){var _this;_classCallCheck(this,r);_this=_callSuper(this,r,arguments),_this.active=!1,_this.disabled=!1,_this.tooltip=!1;return _this;}_inherits(r,_l);return _createClass(r,[{key:"handleClick",value:function handleClick(i){var _this2=this,_this$textContent;if(this.disabled)return i.preventDefault(),void i.stopPropagation();var t=this.closest("nile-inline-sidebar");if(t){t.querySelectorAll("nile-inline-sidebar-item").forEach(function(i){return i.active=i===_this2;});}var e=((_this$textContent=this.textContent)===null||_this$textContent===void 0?void 0:_this$textContent.trim())||"";this.dispatchEvent(new CustomEvent("nile-click",{detail:{item:this,href:this.href,text:e},bubbles:!0,composed:!0})),this.href&&(window.location.href=this.href);}},{key:"render",value:function render(){return t(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <div class=\"item\" @click="," role=\"button\" tabindex=\"0\">\n ","\n </div>\n "])),this.handleClick,this.href?t(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<a href="," @click=","><slot></slot></a>"])),this.href,function(i){return i.preventDefault();}):t(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["<slot></slot>"]))));}}],[{key:"styles",get:function get(){return[o];}}]);}(l));i([e({type:Boolean,reflect:!0})],r.prototype,"active",void 0),i([e({type:Boolean,reflect:!0})],r.prototype,"disabled",void 0),i([e({type:String})],r.prototype,"href",void 0),i([e({type:Boolean,reflect:!0})],r.prototype,"tooltip",void 0),_export("N",r=i([s("nile-inline-sidebar-item")],r));}};});
2
2
  //# sourceMappingURL=nile-inline-sidebar-item.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nile-inline-sidebar-item.cjs.js","sources":["../../../src/nile-inline-sidebar-item/nile-inline-sidebar-item.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 } from 'lit/decorators.js';\nimport { styles } from './nile-inline-sidebar-item.css';\nimport NileElement from '../internal/nile-element';\n\n/**\n * Nile inline sidebar item.\n *\n * @tag nile-inlinesidebar-item\n *\n * @attr active - Marks the item as active (selected).\n * @attr disabled - Marks the item as disabled (non-interactive).\n * @attr href - Optional URL to navigate to when the item is clicked.\n *\n * @slot - Default slot for the item text or content.\n *\n * @fires nile-select - Emitted when the item is clicked (not disabled).\n * detail: { item: this, href?: string }\n */\n@customElement('nile-inline-sidebar-item')\nexport class NileInlineSidebarItem extends NileElement {\n @property({ type: Boolean, reflect: true }) active = false;\n @property({ type: Boolean, reflect: true }) disabled = false;\n @property({ type: String }) href?: string;\n\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n private handleClick(e: Event) {\n if (this.disabled) {\n e.preventDefault();\n e.stopPropagation();\n return;\n }\n \n const parent = this.closest('nile-inline-sidebar');\n if (parent) {\n const allItems = parent.querySelectorAll('nile-inline-sidebar-item');\n allItems.forEach((item) => (item as NileInlineSidebarItem).active = item === this);\n }\n \n const text = this.textContent?.trim() || '';\n \n this.dispatchEvent(\n new CustomEvent('nile-click', {\n detail: { item: this, href: this.href, text },\n bubbles: true,\n composed: true,\n }),\n );\n \n if (this.href) {\n window.location.href = this.href;\n }\n }\n \n\n public render(): TemplateResult {\n return html`\n <div class=\"item\" @click=${this.handleClick} role=\"button\" tabindex=\"0\">\n ${this.href\n ? html`<a href=${this.href} @click=${(e: Event) => e.preventDefault()}><slot></slot></a>`\n : html`<slot></slot>`}\n </div>\n `;\n }\n}\n\nexport default NileInlineSidebarItem;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-inline-sidebar-item': NileInlineSidebarItem;\n }\n}\n"],"names":["NileInlineSidebarItem","_r","o","constructor","this","active","disabled","_this","_inherits","_createClass","key","value","handleClick","e","preventDefault","stopPropagation","parent","closest","querySelectorAll","forEach","item","text","textContent","trim","dispatchEvent","CustomEvent","detail","href","bubbles","composed","window","location","render","html","_templateObject","_taggedTemplateLiteral","_templateObject2","_templateObject3","get","styles","NileElement","__decorate","property","type","Boolean","reflect","prototype","String","customElement"],"mappings":"gsGA2BaA,CAAN,uBAAAC,EAAA,EAAA,SAAAC,EAAA,CAAAC,KAAAA,KAAAA,CAAAA,eAAAA,MAAAA,CAAAA,mCACuCC,EAAAA,KAAAA,CAAMC,QAAG,CACTD,CAAAA,KAAAA,CAAQE,UAAG,CA6CxD,QAAAC,KAAA,EA1CQC,SAAA,CAAAN,CAAA,CAAAD,EAAA,SAAAQ,YAAA,CAAAP,CAAA,GAAAQ,GAAA,eAAAC,KAAA,CAIC,SAAAC,WAAAA,CAAYC,CAAAA,CAAAA,KAAAA,MAAAA,MAAAA,iBAAAA,CAClB,GAAIT,IAAKE,CAAAA,QAAAA,CAGP,MAFAO,CAAAA,CAAEC,CAAAA,cAAAA,CAAAA,CAAAA,CAAAA,IACFD,CAAAA,EAAEE,eAIJ,CAAA,CAAA,CAAA,GAAMC,CAAAA,CAASZ,CAAAA,IAAAA,CAAKa,OAAQ,CAAA,qBAAA,CAAA,CAC5B,GAAID,CAAQ,CAAA,CACOA,EAAOE,gBAAiB,CAAA,0BAAA,CAAA,CAChCC,QAASC,SAAAA,CAAUA,QAAAA,CAAAA,CAAAA,CAA+Bf,OAASe,CAAShB,GAAAA,MAAAA,EAAAA,CAC9E,EAED,GAAMiB,CAAAA,CAAAA,CAAOjB,EAAAA,iBAAAA,MAAKkB,WAAaC,UAAAA,iBAAAA,iBAAlBnB,iBAAAA,CAAkBmB,IAAAA,CAAAA,CAAAA,GAAU,GAEzCnB,IAAKoB,CAAAA,aAAAA,CACH,GAAIC,CAAAA,WAAAA,CAAY,YAAc,CAAA,CAC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A,CAAA,WAAA,EAH/B9C,CAAAA,CAAAA,OAAAA,KAAAA,CAAAA,CAAqByC,EAAA,CADjCO,CAAAA,CAAc,6BACFhD"}
1
+ {"version":3,"file":"nile-inline-sidebar-item.cjs.js","sources":["../../../src/nile-inline-sidebar-item/nile-inline-sidebar-item.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 } from 'lit/decorators.js';\nimport { styles } from './nile-inline-sidebar-item.css';\nimport NileElement from '../internal/nile-element';\n\n/**\n * Nile inline sidebar item.\n *\n * @tag nile-inlinesidebar-item\n *\n * @attr active - Marks the item as active (selected).\n * @attr disabled - Marks the item as disabled (non-interactive).\n * @attr href - Optional URL to navigate to when the item is clicked.\n *\n * @slot - Default slot for the item text or content.\n *\n * @fires nile-select - Emitted when the item is clicked (not disabled).\n * detail: { item: this, href?: string }\n */\n@customElement('nile-inline-sidebar-item')\nexport class NileInlineSidebarItem extends NileElement {\n @property({ type: Boolean, reflect: true }) active = false;\n @property({ type: Boolean, reflect: true }) disabled = false;\n @property({ type: String }) href?: string;\n @property({ type: Boolean, reflect: true }) tooltip = false;\n\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n private handleClick(e: Event) {\n if (this.disabled) {\n e.preventDefault();\n e.stopPropagation();\n return;\n }\n \n const parent = this.closest('nile-inline-sidebar');\n if (parent) {\n const allItems = parent.querySelectorAll('nile-inline-sidebar-item');\n allItems.forEach((item) => (item as NileInlineSidebarItem).active = item === this);\n }\n \n const text = this.textContent?.trim() || '';\n \n this.dispatchEvent(\n new CustomEvent('nile-click', {\n detail: { item: this, href: this.href, text },\n bubbles: true,\n composed: true,\n }),\n );\n \n if (this.href) {\n window.location.href = this.href;\n }\n }\n \n\n public render(): TemplateResult {\n return html`\n <div class=\"item\" @click=${this.handleClick} role=\"button\" tabindex=\"0\">\n ${this.href\n ? html`<a href=${this.href} @click=${(e: Event) => e.preventDefault()}><slot></slot></a>`\n : html`<slot></slot>`}\n </div>\n `;\n }\n}\n\nexport default NileInlineSidebarItem;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-inline-sidebar-item': NileInlineSidebarItem;\n }\n}\n"],"names":["NileInlineSidebarItem","_l","r","constructor","this","active","disabled","tooltip","_this","_inherits","_createClass","key","value","handleClick","e","preventDefault","stopPropagation","parent","closest","querySelectorAll","forEach","item","text","textContent","trim","dispatchEvent","CustomEvent","detail","href","bubbles","composed","window","location","render","html","_templateObject","_taggedTemplateLiteral","_templateObject2","_templateObject3","__decorate","get","styles","NileElement","property","type","Boolean","reflect","prototype","String","_export","customElement"],"mappings":"gsGA2BaA,CAAN,uBAAAC,EAAA,EAAA,SAAAC,EAAA,CAAAC,KAAAA,KAAAA,CAAAA,eAAAA,MAAAA,CAAAA,mCACuCC,EAAAA,KAAAA,CAAMC,MAAG,CAAA,CAAA,CAAA,CACTD,KAAAA,CAAQE,QAAAA,CAAAA,CAAG,EAEXF,KAAAA,CAAOG,OAAAA,CAAAA,CAAG,CA4CvD,QAAAC,KAAA,EA1CQC,SAAA,CAAAP,CAAA,CAAAD,EAAA,SAAAS,YAAA,CAAAR,CAAA,GAAAS,GAAA,eAAAC,KAAA,CAIC,SAAAC,WAAAA,CAAYC,qCAClB,GAAIV,IAAAA,CAAKE,SAGP,MAFAQ,CAAAA,CAAAA,CAAEC,qBACFD,CAAAA,CAAEE,CAAAA,eAAAA,CAAAA,CAAAA,CAIJ,GAAMC,CAAAA,CAAAA,CAASb,IAAKc,CAAAA,OAAAA,CAAQ,uBAC5B,GAAID,CAAAA,CAAQ,CACOA,CAAOE,CAAAA,gBAAAA,CAAiB,4BAChCC,OAASC,CAAAA,SAAAA,CAAAA,QAAUA,CAAAA,EAA+BhB,MAASgB,CAAAA,CAAAA,GAASjB,SAC9E,EAED,GAAMkB,CAAAA,EAAOlB,EAAAA,iBAAAA,K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A,CAAA+C,SAAA,CAAA,UAAA,CAAA,IAAA,EACjCR,CAAAA,CAAAA,CAAAA,CAAA,CAA3BI,CAAS,CAAA,CAAEC,IAAMI,CAAAA,MAAAA,CAAAA,CAAAA,CAAAA,CAAwBhD,CAAA+C,CAAAA,SAAAA,CAAA,WAAA,EACER,CAAAA,CAAAA,CAAAA,CAAA,CAA3CI,CAAAA,CAAS,CAAEC,IAAAA,CAAMC,QAASC,OAAS,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAwB9C,CAAA+C,CAAAA,SAAAA,CAAA,SAAA,CAAA,IAAA,EAAA,CAAA,CAAAE,OAAA,KAJjDjD,EAAqBuC,CAAA,CAAA,CADjCW,CAAc,CAAA,0BAAA,CAAA,CAAA,CACFlD"}
@@ -1,2 +1,2 @@
1
- System.register(["lit"],function(_export,_context){"use strict";var o,_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){o=_lit.css;}],execute:function execute(){_export("s",e=o(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n:host {\n display: block;\n font-family: var(--nile-font-family-sans-serif);\n font-size: var(--nile-type-scale-3);\n color: var(--nile-colors-dark-900);\n cursor: pointer;\n user-select: none;\n}\n\n.item {\n padding: var(--nile-spacing-lg) var(--nile-spacing-md);\n border-radius: var(--nile-radius-sm);\n transition: background 0.2s, color 0.2s;\n}\n\n \n:host(:not([disabled])) .item:hover {\n background: var(--nile-colors-neutral-400);\n}\n\n \n:host([active]) .item {\n background: var(--nile-colors-primary-100);\n font-weight: 500;\n}\n\n \n:host([disabled]) {\n color: var(--nile-colors-neutral-500); \n cursor: not-allowed;\n}\n\n:host([disabled]) .item {\n pointer-events: none;\n}\na {\n color: inherit;\n text-decoration: none;\n display: block;\n width: 100%;\n height: 100%;\n }\n\n a:visited,\n a:hover,\n a:active,\n a:focus {\n color: inherit;\n text-decoration: none;\n }\n\n"]))));}};});
1
+ System.register(["lit"],function(_export,_context){"use strict";var o,_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){o=_lit.css;}],execute:function execute(){_export("s",r=o(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n:host {\n display: block;\n font-family: var(--nile-font-family-sans-serif);\n font-size: var(--nile-type-scale-3);\n color: var(--nile-colors-dark-900);\n cursor: pointer;\n user-select: none;\n}\n\n.item {\n padding: var(--nile-spacing-lg) var(--nile-spacing-md);\n border-radius: var(--nile-radius-sm);\n transition: background 0.2s, color 0.2s;\n}\n\n \n:host(:not([disabled])) .item:hover {\n background: var(--nile-colors-neutral-400);\n}\n\n \n:host([active]) .item {\n background: var(--nile-colors-primary-100);\n font-weight: 500;\n}\n\n:host([active]) .item:hover {\n background: var(--nile-colors-primary-100);\n}\n\n \n:host([disabled]) {\n color: var(--nile-colors-neutral-500); \n cursor: not-allowed;\n}\n\n:host([disabled]) .item {\n pointer-events: none;\n}\na {\n color: inherit;\n text-decoration: none;\n display: block;\n width: 100%;\n height: 100%;\n }\n\n a:visited,\n a:hover,\n a:active,\n a:focus {\n color: inherit;\n text-decoration: none;\n }\n\n \n\n"]))));}};});
2
2
  //# sourceMappingURL=nile-inline-sidebar-item.css.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nile-inline-sidebar-item.css.cjs.js","sources":["../../../src/nile-inline-sidebar-item/nile-inline-sidebar-item.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/**\n * InlinesidebarItem CSS\n */\nexport const styles = css`\n:host {\n display: block;\n font-family: var(--nile-font-family-sans-serif);\n font-size: var(--nile-type-scale-3);\n color: var(--nile-colors-dark-900);\n cursor: pointer;\n user-select: none;\n}\n\n.item {\n padding: var(--nile-spacing-lg) var(--nile-spacing-md);\n border-radius: var(--nile-radius-sm);\n transition: background 0.2s, color 0.2s;\n}\n\n \n:host(:not([disabled])) .item:hover {\n background: var(--nile-colors-neutral-400);\n}\n\n \n:host([active]) .item {\n background: var(--nile-colors-primary-100);\n font-weight: 500;\n}\n\n \n:host([disabled]) {\n color: var(--nile-colors-neutral-500); \n cursor: not-allowed;\n}\n\n:host([disabled]) .item {\n pointer-events: none;\n}\na {\n color: inherit;\n text-decoration: none;\n display: block;\n width: 100%;\n height: 100%;\n }\n\n a:visited,\n a:hover,\n a:active,\n a:focus {\n color: inherit;\n text-decoration: none;\n }\n\n`;\n"],"names":["styles","css","_templateObject","_taggedTemplateLiteral"],"mappings":"oTAYaA,CAAAA,CAASC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA"}
1
+ {"version":3,"file":"nile-inline-sidebar-item.css.cjs.js","sources":["../../../src/nile-inline-sidebar-item/nile-inline-sidebar-item.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/**\n * InlinesidebarItem CSS\n */\nexport const styles = css`\n:host {\n display: block;\n font-family: var(--nile-font-family-sans-serif);\n font-size: var(--nile-type-scale-3);\n color: var(--nile-colors-dark-900);\n cursor: pointer;\n user-select: none;\n}\n\n.item {\n padding: var(--nile-spacing-lg) var(--nile-spacing-md);\n border-radius: var(--nile-radius-sm);\n transition: background 0.2s, color 0.2s;\n}\n\n \n:host(:not([disabled])) .item:hover {\n background: var(--nile-colors-neutral-400);\n}\n\n \n:host([active]) .item {\n background: var(--nile-colors-primary-100);\n font-weight: 500;\n}\n\n:host([active]) .item:hover {\n background: var(--nile-colors-primary-100);\n}\n\n \n:host([disabled]) {\n color: var(--nile-colors-neutral-500); \n cursor: not-allowed;\n}\n\n:host([disabled]) .item {\n pointer-events: none;\n}\na {\n color: inherit;\n text-decoration: none;\n display: block;\n width: 100%;\n height: 100%;\n }\n\n a:visited,\n a:hover,\n a:active,\n a:focus {\n color: inherit;\n text-decoration: none;\n }\n\n \n\n`;\n"],"names":["styles","css","_templateObject","_taggedTemplateLiteral"],"mappings":"oTAYaA,CAAAA,CAASC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA"}
@@ -1,4 +1,4 @@
1
- import{css as o}from"lit";const e=o`
1
+ import{css as o}from"lit";const r=o`
2
2
  :host {
3
3
  display: block;
4
4
  font-family: var(--nile-font-family-sans-serif);
@@ -25,6 +25,10 @@ import{css as o}from"lit";const e=o`
25
25
  font-weight: 500;
26
26
  }
27
27
 
28
+ :host([active]) .item:hover {
29
+ background: var(--nile-colors-primary-100);
30
+ }
31
+
28
32
 
29
33
  :host([disabled]) {
30
34
  color: var(--nile-colors-neutral-500);
@@ -50,4 +54,6 @@ a {
50
54
  text-decoration: none;
51
55
  }
52
56
 
53
- `;export{e as s};
57
+
58
+
59
+ `;export{r as s};
@@ -1,5 +1,5 @@
1
- import{__decorate as i}from"tslib";import{html as t}from"lit";import{property as e,customElement as s}from"lit/decorators.js";import{s as l}from"./nile-inline-sidebar-item.css.esm.js";import{N as r}from"../internal/nile-element.esm.js";let o=class extends r{constructor(){super(...arguments),this.active=!1,this.disabled=!1}static get styles(){return[l]}handleClick(i){if(this.disabled)return i.preventDefault(),void i.stopPropagation();const t=this.closest("nile-inline-sidebar");if(t){t.querySelectorAll("nile-inline-sidebar-item").forEach((i=>i.active=i===this))}const e=this.textContent?.trim()||"";this.dispatchEvent(new CustomEvent("nile-click",{detail:{item:this,href:this.href,text:e},bubbles:!0,composed:!0})),this.href&&(window.location.href=this.href)}render(){return t`
1
+ import{__decorate as i}from"tslib";import{html as t}from"lit";import{property as e,customElement as s}from"lit/decorators.js";import{s as o}from"./nile-inline-sidebar-item.css.esm.js";import{N as l}from"../internal/nile-element.esm.js";let r=class extends l{constructor(){super(...arguments),this.active=!1,this.disabled=!1,this.tooltip=!1}static get styles(){return[o]}handleClick(i){if(this.disabled)return i.preventDefault(),void i.stopPropagation();const t=this.closest("nile-inline-sidebar");if(t){t.querySelectorAll("nile-inline-sidebar-item").forEach((i=>i.active=i===this))}const e=this.textContent?.trim()||"";this.dispatchEvent(new CustomEvent("nile-click",{detail:{item:this,href:this.href,text:e},bubbles:!0,composed:!0})),this.href&&(window.location.href=this.href)}render(){return t`
2
2
  <div class="item" @click=${this.handleClick} role="button" tabindex="0">
3
3
  ${this.href?t`<a href=${this.href} @click=${i=>i.preventDefault()}><slot></slot></a>`:t`<slot></slot>`}
4
4
  </div>
5
- `}};i([e({type:Boolean,reflect:!0})],o.prototype,"active",void 0),i([e({type:Boolean,reflect:!0})],o.prototype,"disabled",void 0),i([e({type:String})],o.prototype,"href",void 0),o=i([s("nile-inline-sidebar-item")],o);export{o as N};
5
+ `}};i([e({type:Boolean,reflect:!0})],r.prototype,"active",void 0),i([e({type:Boolean,reflect:!0})],r.prototype,"disabled",void 0),i([e({type:String})],r.prototype,"href",void 0),i([e({type:Boolean,reflect:!0})],r.prototype,"tooltip",void 0),r=i([s("nile-inline-sidebar-item")],r);export{r as N};
@@ -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-side-bar.css.cjs.js","../internal/nile-element.cjs.js"],function(_export,_context){"use strict";var t,e,i,s,r,l,_templateObject,o;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.customElement;},function(_nileSideBarCssCjsJs){r=_nileSideBarCssCjsJs.s;},function(_internalNileElementCjsJs){l=_internalNileElementCjsJs.N;}],execute:function execute(){_export("N",o=/*#__PURE__*/function(_l){function o(){var _this;_classCallCheck(this,o);_this=_callSuper(this,o,arguments),_this.position="left",_this.collapsed=!1,_this.fullHeight=!1,_this.width=null,_this.collapsedWidth=null;return _this;}_inherits(o,_l);return _createClass(o,[{key:"updated",value:function updated(t){var _this2=this;_superPropGet(o,"updated",this,3)([t]),t.has("collapsed")&&this.querySelectorAll("nile-side-bar-footer-item, nile-side-bar-group-item, nile-side-bar-group").forEach(function(t){return t.toggleAttribute("collapsed",_this2.collapsed);}),t.has("width")&&null!==this.width&&this.style.setProperty("--sidebar-width","".concat(this.width,"px")),t.has("collapsedWidth")&&null!==this.collapsedWidth&&this.style.setProperty("--sidebar-collapsed-width","".concat(this.collapsedWidth,"px"));}},{key:"render",value:function render(){return e(_templateObject||(_templateObject=_taggedTemplateLiteral(["<slot></slot>"])));}}],[{key:"styles",get:function get(){return[r];}}]);}(l));t([i({type:String,reflect:!0,attribute:!0})],o.prototype,"position",void 0),t([i({type:Boolean,reflect:!0,attribute:!0})],o.prototype,"collapsed",void 0),t([i({type:Boolean,reflect:!0,attribute:!0})],o.prototype,"fullHeight",void 0),t([i({type:Number,attribute:!0})],o.prototype,"width",void 0),t([i({type:Number,attribute:!0})],o.prototype,"collapsedWidth",void 0),_export("N",o=t([s("nile-side-bar")],o));}};});
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-side-bar.css.cjs.js","../internal/nile-element.cjs.js"],function(_export,_context){"use strict";var t,e,i,s,l,r,_templateObject,o;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.customElement;},function(_nileSideBarCssCjsJs){l=_nileSideBarCssCjsJs.s;},function(_internalNileElementCjsJs){r=_internalNileElementCjsJs.N;}],execute:function execute(){_export("N",o=/*#__PURE__*/function(_r){function o(){var _this;_classCallCheck(this,o);_this=_callSuper(this,o,arguments),_this.position="left",_this.collapsed=!1,_this.fullHeight=!1,_this.width=null,_this.collapsedWidth=null;return _this;}_inherits(o,_r);return _createClass(o,[{key:"updated",value:function updated(t){var _this2=this;_superPropGet(o,"updated",this,3)([t]),t.has("collapsed")&&this.querySelectorAll("nile-side-bar-footer-item, nile-side-bar-group-item, nile-side-bar-group").forEach(function(t){return t.toggleAttribute("collapsed",_this2.collapsed);}),t.has("width")&&null!==this.width&&this.style.setProperty("--sidebar-width","".concat(this.width,"px")),t.has("collapsedWidth")&&null!==this.collapsedWidth&&this.style.setProperty("--sidebar-collapsed-width","".concat(this.collapsedWidth,"px"));}},{key:"render",value:function render(){return e(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <slot name=\"header\"></slot>\n <div class=\"scroll-container\">\n <slot></slot>\n </div>\n <slot name=\"footer\"></slot>\n "])));}}],[{key:"styles",get:function get(){return[l];}}]);}(r));t([i({type:String,reflect:!0,attribute:!0})],o.prototype,"position",void 0),t([i({type:Boolean,reflect:!0,attribute:!0})],o.prototype,"collapsed",void 0),t([i({type:Boolean,reflect:!0,attribute:!0})],o.prototype,"fullHeight",void 0),t([i({type:Number,attribute:!0})],o.prototype,"width",void 0),t([i({type:Number,attribute:!0})],o.prototype,"collapsedWidth",void 0),_export("N",o=t([s("nile-side-bar")],o));}};});
2
2
  //# sourceMappingURL=nile-side-bar.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nile-side-bar.cjs.js","sources":["../../../src/nile-side-bar/nile-side-bar.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { html, CSSResultArray, TemplateResult } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { styles } from './nile-side-bar.css';\nimport NileElement from '../internal/nile-element';\n\n/**\n * Nile side-bar component.\n *\n * @tag nile-side-bar\n *\n * @attr position - Position of the sidebar (\"left\" | \"right\"). Defaults to \"left\".\n * @attr width - Expanded width of the sidebar (px).\n * @attr collapsed-width - Collapsed width of the sidebar (px).\n */\n@customElement('nile-side-bar')\nexport class NileSideBar extends NileElement {\n @property({ type: String, reflect: true, attribute: true })position: 'left' | 'right' = 'left';\n\n @property({ type: Boolean, reflect: true, attribute: true })collapsed: boolean = false;\n\n @property({ type: Boolean, reflect: true, attribute: true })fullHeight: boolean = false;\n \n @property({ type: Number, attribute: true })width: number | null = null;\n\n \n @property({ type: Number, attribute: true })collapsedWidth: number | null = null;\n\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n protected updated(changedProps: Map<string, unknown>) {\n super.updated(changedProps);\n\n if (changedProps.has('collapsed')) {\n this.querySelectorAll<NileElement>(\n 'nile-side-bar-footer-item, nile-side-bar-group-item, nile-side-bar-group'\n ).forEach(el => el.toggleAttribute('collapsed', this.collapsed));\n }\n\n if (changedProps.has('width') && this.width !== null) {\n this.style.setProperty('--sidebar-width', `${this.width}px`);\n }\n if (changedProps.has('collapsedWidth') && this.collapsedWidth !== null) {\n this.style.setProperty('--sidebar-collapsed-width', `${this.collapsedWidth}px`);\n }\n }\n\n public render(): TemplateResult {\n return html`<slot></slot>`;\n }\n}\n\nexport default NileSideBar;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-side-bar': NileSideBar;\n }\n}\n"],"names":["NileSideBar","_l","o","this","position","collapsed","fullHeight","width","collapsedWidth","_this","_inherits","_createClass","key","value","updated","changedProps","super","has","querySelectorAll","forEach","el","toggleAttribute","style","setProperty","concat","render","html","_templateObject","_taggedTemplateLiteral","__decorate","get","styles","NileElement","property","type","String","reflect","attribute","prototype","Boolean","Number","customElement"],"mappings":"4oHAsBaA,CAAN,uBAAAC,EAAA,EAAA,SAAAC,EAAA,uEACsDC,KAAAA,CAAQC,QAAAA,CAAqB,OAE5BD,KAAAA,CAASE,SAAAA,CAAAA,CAAY,CAErBF,CAAAA,KAAAA,CAAUG,YAAY,CAEtCH,CAAAA,KAAAA,CAAKI,KAAkB,CAAA,IAAA,CAGvBJ,KAAAA,CAAcK,cAAkB,CAAA,IA0B7E,QAAAC,KAAA,EAxBQC,SAAA,CAAAR,CAAA,CAAAD,EAAA,SAAAU,YAAA,CAAAT,CAAA,GAAAU,GAAA,WAAAC,KAAA,CAIG,SAAAC,OAAAA,CAAQC,CAChBC,CAAAA,KAAAA,MAAAA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C,UAAA,WAAA,CAAA,IAAA,EAAA,CAAA,CAE3BT,EAAA,CAA3DI,CAAAA,CAAS,CAAEC,IAAAA,CAAMK,QAASH,OAAS,CAAA,CAAA,CAAA,CAAMC,SAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAmCrC,EAAAsC,SAAA,CAAA,YAAA,CAAA,IAAA,EAE5CT,CAAAA,CAAAA,CAAAA,CAAA,CAA3CI,CAAS,CAAA,CAAEC,KAAMM,MAAQH,CAAAA,SAAAA,CAAAA,CAAW,KAAmCrC,CAAAsC,CAAAA,SAAAA,CAAA,OAAA,CAAA,IAAA,EAAA,CAAA,CAG5BT,EAAA,CAA3CI,CAAAA,CAAS,CAAEC,IAAAA,CAAMM,OAAQH,SAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAA4CrC,CAAAsC,CAAAA,SAAAA,CAAA,qBAAA,EAVtEtC,CAAAA,CAAAA,OAAAA,KAAAA,CAAAA,CAAW6B,EAAA,CADvBY,CAAAA,CAAc,kBACFzC"}
1
+ {"version":3,"file":"nile-side-bar.cjs.js","sources":["../../../src/nile-side-bar/nile-side-bar.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { html, CSSResultArray, TemplateResult } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { styles } from './nile-side-bar.css';\nimport NileElement from '../internal/nile-element';\n\n/**\n * Nile side-bar component.\n *\n * @tag nile-side-bar\n *\n * @attr position - Position of the sidebar (\"left\" | \"right\"). Defaults to \"left\".\n * @attr width - Expanded width of the sidebar (px).\n * @attr collapsed-width - Collapsed width of the sidebar (px).\n */\n@customElement('nile-side-bar')\nexport class NileSideBar extends NileElement {\n @property({ type: String, reflect: true, attribute: true })position: 'left' | 'right' = 'left';\n\n @property({ type: Boolean, reflect: true, attribute: true })collapsed: boolean = false;\n\n @property({ type: Boolean, reflect: true, attribute: true })fullHeight: boolean = false;\n \n @property({ type: Number, attribute: true })width: number | null = null;\n\n \n @property({ type: Number, attribute: true })collapsedWidth: number | null = null;\n\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n protected updated(changedProps: Map<string, unknown>) {\n super.updated(changedProps);\n\n if (changedProps.has('collapsed')) {\n this.querySelectorAll<NileElement>(\n 'nile-side-bar-footer-item, nile-side-bar-group-item, nile-side-bar-group'\n ).forEach(el => el.toggleAttribute('collapsed', this.collapsed));\n }\n\n if (changedProps.has('width') && this.width !== null) {\n this.style.setProperty('--sidebar-width', `${this.width}px`);\n }\n if (changedProps.has('collapsedWidth') && this.collapsedWidth !== null) {\n this.style.setProperty('--sidebar-collapsed-width', `${this.collapsedWidth}px`);\n }\n }\n\n public render(): TemplateResult {\n return html`\n <slot name=\"header\"></slot>\n <div class=\"scroll-container\">\n <slot></slot>\n </div>\n <slot name=\"footer\"></slot>\n `;\n }\n \n}\n\nexport default NileSideBar;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-side-bar': NileSideBar;\n }\n}\n"],"names":["NileSideBar","o","this","position","collapsed","fullHeight","width","collapsedWidth","_this","_inherits","_r","_createClass","key","value","updated","changedProps","super","has","querySelectorAll","forEach","el","toggleAttribute","style","setProperty","concat","render","html","_templateObject","_taggedTemplateLiteral","get","styles","NileElement","__decorate","property","type","String","reflect","attribute","prototype","Boolean","Number","customElement"],"mappings":"4oHAsBaA,CAAAA,uBAAAA,EAAAA,EAAN,SAAAC,EAAA,uEACsDC,KAAAA,CAAQC,QAAqB,CAAA,MAAA,CAE5BD,KAAAA,CAASE,SAAAA,CAAAA,CAAY,EAErBF,KAAAA,CAAUG,UAAAA,CAAAA,CAAY,EAEtCH,KAAAA,CAAKI,KAAAA,CAAkB,KAGvBJ,KAAAA,CAAcK,cAAAA,CAAkB,IAiC7E,QAAAC,KAAA,EA/BQC,SAAA,CAAAR,CAAA,CAAAS,EAAA,SAAAC,YAAA,CAAAV,CAAA,GAAAW,GA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,CAAAA,CAAAA,CAAAA,CAAAsC,SAAA,CAAA,WAAA,CAAA,IAAA,IAE3BN,CAAA,CAAA,CAA3DC,CAAS,CAAA,CAAEC,KAAMK,OAASH,CAAAA,OAAAA,CAAAA,CAAS,CAAMC,CAAAA,SAAAA,CAAAA,CAAW,CAAmCrC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAsC,SAAA,CAAA,YAAA,CAAA,IAAA,IAE5CN,CAAA,CAAA,CAA3CC,CAAS,CAAA,CAAEC,KAAMM,MAAQH,CAAAA,SAAAA,CAAAA,CAAW,CAAmCrC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAsC,UAAA,OAAA,CAAA,IAAA,EAAA,CAAA,CAG5BN,CAAA,CAAA,CAA3CC,CAAS,CAAA,CAAEC,IAAMM,CAAAA,MAAAA,CAAQH,WAAW,CAA4CrC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAsC,SAAA,CAAA,gBAAA,CAAA,IAAA,gBAVtEtC,CAAWgC,CAAAA,CAAAA,CAAA,CADvBS,CAAAA,CAAc,kBACFzC"}
@@ -1,2 +1,2 @@
1
- System.register(["lit"],function(_export,_context){"use strict";var t,_templateObject,o;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}return{setters:[function(_lit){t=_lit.css;}],execute:function execute(){_export("s",o=t(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n :host {\n --sidebar-width: 240px;\n --sidebar-collapsed-width: 70px;\n top: 0;\n width: var(--sidebar-width);\n display: flex;\n flex-direction: column;\n background-color: var(--nile-colors-neutral-100);\n overflow: auto;\n transition: width 0.25s ease, transform 0.25s ease;\n z-index: 1000;\n}\n\n \n:host([position='left']) {\n left: 0;\n border-right: 1px solid var(--nile-colors-neutral-400);\n}\n\n:host([position='right']) {\n right: 0;\n border-left: 1px solid var(--nile-colors-neutral-400);\n}\n\n \n:host([collapsed]) {\n width: var(--sidebar-collapsed-width);\n}\n\n \n:host([position='right'][collapsed]) {\n transform: translateX(calc(var(--sidebar-width) - var(--sidebar-collapsed-width)));\n}\n\n \n \n::slotted(*) {\n display: block;\n min-width: 0;\n /* padding: var(--nile-spacing-xl) */\n}\n\n \n:host {\n scrollbar-width: thin;\n scrollbar-color: #64748b transparent;\n}\n\n:host::-webkit-scrollbar {\n width: 6px;\n}\n:host::-webkit-scrollbar-track {\n background: transparent;\n}\n:host::-webkit-scrollbar-thumb {\n background-color: #64748b;\n border-radius: 10px;\n}\n:host([fullheight]) {\n position: fixed;\n top: 0;\n height: 100dvh;\n}\n\n:host(:not([fullheight])) {\n position: relative;\n height: 100%;\n}\n::slotted(nile-side-bar-footer) {\n margin-top: auto; \n flex-shrink: 0; \n}\n:host([collapsed]) ::slotted(nile-side-bar-footer-item) .footer-item {\n justify-content: center;\n padding: 0;\n}\n\n:host([collapsed]) ::slotted(nile-side-bar-footer-item) ::slotted([slot='text']),\n:host([collapsed]) ::slotted(nile-side-bar-footer-item) ::slotted([slot='action']) {\n display: none;\n}\n\n\n\n\n\n"]))));}};});
1
+ System.register(["lit"],function(_export,_context){"use strict";var o,_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){o=_lit.css;}],execute:function execute(){_export("s",r=o(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n :host {\n --sidebar-width: 240px;\n --sidebar-collapsed-width: 70px;\n top: 0;\n width: var(--sidebar-width);\n display: flex;\n flex-direction: column;\n background-color: var(--nile-colors-neutral-100, var(--ng-colors-bg-primary));\n height: 100%;\n overflow: hidden; \n transition: width 0.25s ease, transform 0.25s ease;\n z-index: 1000;\n}\n\n \n:host([position='left']) {\n left: 0;\n border-right: 1px solid var(--nile-colors-neutral-400);\n}\n\n:host([position='right']) {\n right: 0;\n border-left: 1px solid var(--nile-colors-neutral-400);\n}\n\n \n:host([collapsed]) {\n width: var(--sidebar-collapsed-width);\n}\n\n \n:host([position='right'][collapsed]) {\n transform: translateX(calc(var(--sidebar-width) - var(--sidebar-collapsed-width)));\n}\n\n:host {\n scrollbar-width: thin;\n scrollbar-color: #64748b transparent;\n}\n\n:host::-webkit-scrollbar {\n width: 6px;\n}\n:host::-webkit-scrollbar-track {\n background: transparent;\n}\n:host::-webkit-scrollbar-thumb {\n background-color: #64748b;\n border-radius: 10px;\n}\n\n \n.scroll-container {\n flex: 1;\n overflow-y: auto;\n overflow-x: hidden;\n display: flex;\n flex-direction: column;\n}\n\n \n::slotted(nile-side-bar-header) {\n flex-shrink: 0;\n}\n\n::slotted(nile-side-bar-footer) {\n flex-shrink: 0;\n position: sticky;\n bottom: 0;\n margin-top: auto;\n}\n\n \n \n\n\n\n\n\n\n\n"]))));}};});
2
2
  //# sourceMappingURL=nile-side-bar.css.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nile-side-bar.css.cjs.js","sources":["../../../src/nile-side-bar/nile-side-bar.css.ts"],"sourcesContent":["/**\n* Copyright Aquera Inc 2023\n*\n* This source code is licensed under the BSD-3-Clause license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\nimport {css} from 'lit';\n\n/**\n * SideBar CSS\n */\nexport const styles = css`\n :host {\n --sidebar-width: 240px;\n --sidebar-collapsed-width: 70px;\n top: 0;\n width: var(--sidebar-width);\n display: flex;\n flex-direction: column;\n background-color: var(--nile-colors-neutral-100);\n overflow: auto;\n transition: width 0.25s ease, transform 0.25s ease;\n z-index: 1000;\n}\n\n \n:host([position='left']) {\n left: 0;\n border-right: 1px solid var(--nile-colors-neutral-400);\n}\n\n:host([position='right']) {\n right: 0;\n border-left: 1px solid var(--nile-colors-neutral-400);\n}\n\n \n:host([collapsed]) {\n width: var(--sidebar-collapsed-width);\n}\n\n \n:host([position='right'][collapsed]) {\n transform: translateX(calc(var(--sidebar-width) - var(--sidebar-collapsed-width)));\n}\n\n \n \n::slotted(*) {\n display: block;\n min-width: 0;\n /* padding: var(--nile-spacing-xl) */\n}\n\n \n:host {\n scrollbar-width: thin;\n scrollbar-color: #64748b transparent;\n}\n\n:host::-webkit-scrollbar {\n width: 6px;\n}\n:host::-webkit-scrollbar-track {\n background: transparent;\n}\n:host::-webkit-scrollbar-thumb {\n background-color: #64748b;\n border-radius: 10px;\n}\n:host([fullheight]) {\n position: fixed;\n top: 0;\n height: 100dvh;\n}\n\n:host(:not([fullheight])) {\n position: relative;\n height: 100%;\n}\n::slotted(nile-side-bar-footer) {\n margin-top: auto; \n flex-shrink: 0; \n}\n:host([collapsed]) ::slotted(nile-side-bar-footer-item) .footer-item {\n justify-content: center;\n padding: 0;\n}\n\n:host([collapsed]) ::slotted(nile-side-bar-footer-item) ::slotted([slot='text']),\n:host([collapsed]) ::slotted(nile-side-bar-footer-item) ::slotted([slot='action']) {\n display: none;\n}\n\n\n\n\n\n`;\n\nexport default [styles];"],"names":["styles","css","_templateObject","_taggedTemplateLiteral"],"mappings":"oTAYaA,CAAAA,CAASC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA"}
1
+ {"version":3,"file":"nile-side-bar.css.cjs.js","sources":["../../../src/nile-side-bar/nile-side-bar.css.ts"],"sourcesContent":["/**\n* Copyright Aquera Inc 2023\n*\n* This source code is licensed under the BSD-3-Clause license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\nimport {css} from 'lit';\n\n/**\n * SideBar CSS\n */\nexport const styles = css`\n :host {\n --sidebar-width: 240px;\n --sidebar-collapsed-width: 70px;\n top: 0;\n width: var(--sidebar-width);\n display: flex;\n flex-direction: column;\n background-color: var(--nile-colors-neutral-100, var(--ng-colors-bg-primary));\n height: 100%;\n overflow: hidden; \n transition: width 0.25s ease, transform 0.25s ease;\n z-index: 1000;\n}\n\n \n:host([position='left']) {\n left: 0;\n border-right: 1px solid var(--nile-colors-neutral-400);\n}\n\n:host([position='right']) {\n right: 0;\n border-left: 1px solid var(--nile-colors-neutral-400);\n}\n\n \n:host([collapsed]) {\n width: var(--sidebar-collapsed-width);\n}\n\n \n:host([position='right'][collapsed]) {\n transform: translateX(calc(var(--sidebar-width) - var(--sidebar-collapsed-width)));\n}\n\n:host {\n scrollbar-width: thin;\n scrollbar-color: #64748b transparent;\n}\n\n:host::-webkit-scrollbar {\n width: 6px;\n}\n:host::-webkit-scrollbar-track {\n background: transparent;\n}\n:host::-webkit-scrollbar-thumb {\n background-color: #64748b;\n border-radius: 10px;\n}\n\n \n.scroll-container {\n flex: 1;\n overflow-y: auto;\n overflow-x: hidden;\n display: flex;\n flex-direction: column;\n}\n\n \n::slotted(nile-side-bar-header) {\n flex-shrink: 0;\n}\n\n::slotted(nile-side-bar-footer) {\n flex-shrink: 0;\n position: sticky;\n bottom: 0;\n margin-top: auto;\n}\n\n \n \n\n\n\n\n\n\n\n`;\n\nexport default [styles];"],"names":["styles","css","_templateObject","_taggedTemplateLiteral"],"mappings":"oTAYaA,CAAAA,CAASC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA"}
@@ -1,4 +1,4 @@
1
- import{css as t}from"lit";const o=t`
1
+ import{css as o}from"lit";const r=o`
2
2
  :host {
3
3
  --sidebar-width: 240px;
4
4
  --sidebar-collapsed-width: 70px;
@@ -6,8 +6,9 @@ import{css as t}from"lit";const o=t`
6
6
  width: var(--sidebar-width);
7
7
  display: flex;
8
8
  flex-direction: column;
9
- background-color: var(--nile-colors-neutral-100);
10
- overflow: auto;
9
+ background-color: var(--nile-colors-neutral-100, var(--ng-colors-bg-primary));
10
+ height: 100%;
11
+ overflow: hidden;
11
12
  transition: width 0.25s ease, transform 0.25s ease;
12
13
  z-index: 1000;
13
14
  }
@@ -33,15 +34,6 @@ import{css as t}from"lit";const o=t`
33
34
  transform: translateX(calc(var(--sidebar-width) - var(--sidebar-collapsed-width)));
34
35
  }
35
36
 
36
-
37
-
38
- ::slotted(*) {
39
- display: block;
40
- min-width: 0;
41
- /* padding: var(--nile-spacing-xl) */
42
- }
43
-
44
-
45
37
  :host {
46
38
  scrollbar-width: thin;
47
39
  scrollbar-color: #64748b transparent;
@@ -57,32 +49,35 @@ import{css as t}from"lit";const o=t`
57
49
  background-color: #64748b;
58
50
  border-radius: 10px;
59
51
  }
60
- :host([fullheight]) {
61
- position: fixed;
62
- top: 0;
63
- height: 100dvh;
52
+
53
+
54
+ .scroll-container {
55
+ flex: 1;
56
+ overflow-y: auto;
57
+ overflow-x: hidden;
58
+ display: flex;
59
+ flex-direction: column;
64
60
  }
65
61
 
66
- :host(:not([fullheight])) {
67
- position: relative;
68
- height: 100%;
62
+
63
+ ::slotted(nile-side-bar-header) {
64
+ flex-shrink: 0;
69
65
  }
66
+
70
67
  ::slotted(nile-side-bar-footer) {
71
- margin-top: auto;
72
- flex-shrink: 0;
73
- }
74
- :host([collapsed]) ::slotted(nile-side-bar-footer-item) .footer-item {
75
- justify-content: center;
76
- padding: 0;
68
+ flex-shrink: 0;
69
+ position: sticky;
70
+ bottom: 0;
71
+ margin-top: auto;
77
72
  }
78
73
 
79
- :host([collapsed]) ::slotted(nile-side-bar-footer-item) ::slotted([slot='text']),
80
- :host([collapsed]) ::slotted(nile-side-bar-footer-item) ::slotted([slot='action']) {
81
- display: none;
82
- }
74
+
75
+
76
+
77
+
83
78
 
84
79
 
85
80
 
86
81
 
87
82
 
88
- `;export{o as s};
83
+ `;export{r as s};
@@ -1 +1,7 @@
1
- import{__decorate as t}from"tslib";import{html as e}from"lit";import{property as i,customElement as s}from"lit/decorators.js";import{s as r}from"./nile-side-bar.css.esm.js";import{N as l}from"../internal/nile-element.esm.js";let o=class extends l{constructor(){super(...arguments),this.position="left",this.collapsed=!1,this.fullHeight=!1,this.width=null,this.collapsedWidth=null}static get styles(){return[r]}updated(t){super.updated(t),t.has("collapsed")&&this.querySelectorAll("nile-side-bar-footer-item, nile-side-bar-group-item, nile-side-bar-group").forEach((t=>t.toggleAttribute("collapsed",this.collapsed))),t.has("width")&&null!==this.width&&this.style.setProperty("--sidebar-width",`${this.width}px`),t.has("collapsedWidth")&&null!==this.collapsedWidth&&this.style.setProperty("--sidebar-collapsed-width",`${this.collapsedWidth}px`)}render(){return e`<slot></slot>`}};t([i({type:String,reflect:!0,attribute:!0})],o.prototype,"position",void 0),t([i({type:Boolean,reflect:!0,attribute:!0})],o.prototype,"collapsed",void 0),t([i({type:Boolean,reflect:!0,attribute:!0})],o.prototype,"fullHeight",void 0),t([i({type:Number,attribute:!0})],o.prototype,"width",void 0),t([i({type:Number,attribute:!0})],o.prototype,"collapsedWidth",void 0),o=t([s("nile-side-bar")],o);export{o as N};
1
+ import{__decorate as t}from"tslib";import{html as e}from"lit";import{property as i,customElement as s}from"lit/decorators.js";import{s as l}from"./nile-side-bar.css.esm.js";import{N as r}from"../internal/nile-element.esm.js";let o=class extends r{constructor(){super(...arguments),this.position="left",this.collapsed=!1,this.fullHeight=!1,this.width=null,this.collapsedWidth=null}static get styles(){return[l]}updated(t){super.updated(t),t.has("collapsed")&&this.querySelectorAll("nile-side-bar-footer-item, nile-side-bar-group-item, nile-side-bar-group").forEach((t=>t.toggleAttribute("collapsed",this.collapsed))),t.has("width")&&null!==this.width&&this.style.setProperty("--sidebar-width",`${this.width}px`),t.has("collapsedWidth")&&null!==this.collapsedWidth&&this.style.setProperty("--sidebar-collapsed-width",`${this.collapsedWidth}px`)}render(){return e`
2
+ <slot name="header"></slot>
3
+ <div class="scroll-container">
4
+ <slot></slot>
5
+ </div>
6
+ <slot name="footer"></slot>
7
+ `}};t([i({type:String,reflect:!0,attribute:!0})],o.prototype,"position",void 0),t([i({type:Boolean,reflect:!0,attribute:!0})],o.prototype,"collapsed",void 0),t([i({type:Boolean,reflect:!0,attribute:!0})],o.prototype,"fullHeight",void 0),t([i({type:Number,attribute:!0})],o.prototype,"width",void 0),t([i({type:Number,attribute:!0})],o.prototype,"collapsedWidth",void 0),o=t([s("nile-side-bar")],o);export{o as N};
@@ -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-side-bar-expand.css.cjs.js","../internal/nile-element.cjs.js"],function(_export,_context){"use strict";var e,t,i,n,o,s,_templateObject,_templateObject2,_templateObject3,l;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){e=_tslib.__decorate;},function(_lit){t=_lit.html;},function(_litDecoratorsJs){i=_litDecoratorsJs.property;n=_litDecoratorsJs.customElement;},function(_nileSideBarExpandCssCjsJs){o=_nileSideBarExpandCssCjsJs.s;},function(_internalNileElementCjsJs){s=_internalNileElementCjsJs.N;}],execute:function execute(){_export("N",l=/*#__PURE__*/function(_s){function l(){var _this;_classCallCheck(this,l);_this=_callSuper(this,l,arguments),_this.collapsed=!1;return _this;}_inherits(l,_s);return _createClass(l,[{key:"connectedCallback",value:function connectedCallback(){_superPropGet(l,"connectedCallback",this,3)([]);var e=this.closest("nile-side-bar");e&&(this.collapsed=e.hasAttribute("collapsed"));}},{key:"toggleSidebar",value:function toggleSidebar(){var e=this.closest("nile-side-bar");if(!e)return;e.hasAttribute("collapsed")?(e.removeAttribute("collapsed"),this.collapsed=!1):(e.setAttribute("collapsed",""),this.collapsed=!0);}},{key:"render",value:function render(){return t(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <button class=\"expand-btn\" @click=",">\n ","\n </button>\n "])),this.toggleSidebar,this.collapsed?t(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n <nile-tooltip placement=\"right\" hoist content=\"Expand Sidebar\">\n <span part=\"icon\"><nile-icon name=\"moveright\"></nile-icon></span>\n </nile-tooltip>\n "]))):t(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n <nile-tooltip placement=\"right\" hoist content=\"Collapse Sidebar\">\n <span part=\"icon\"><nile-icon name=\"moveleft\"></nile-icon></span>\n </nile-tooltip>\n "]))));}}],[{key:"styles",get:function get(){return[o];}}]);}(s));e([i({type:Boolean,reflect:!0})],l.prototype,"collapsed",void 0),_export("N",l=e([n("nile-side-bar-expand")],l));}};});
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-side-bar-expand.css.cjs.js","../internal/nile-element.cjs.js"],function(_export,_context){"use strict";var t,e,i,l,o,n,_templateObject,_templateObject2,_templateObject3,s;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;l=_litDecoratorsJs.customElement;},function(_nileSideBarExpandCssCjsJs){o=_nileSideBarExpandCssCjsJs.s;},function(_internalNileElementCjsJs){n=_internalNileElementCjsJs.N;}],execute:function execute(){_export("N",s=/*#__PURE__*/function(_n){function s(){var _this;_classCallCheck(this,s);_this=_callSuper(this,s,arguments),_this.collapsed=!1,_this.expandTooltipText="Expand Sidebar",_this.collapseTooltipText="Collapse Sidebar";return _this;}_inherits(s,_n);return _createClass(s,[{key:"connectedCallback",value:function connectedCallback(){_superPropGet(s,"connectedCallback",this,3)([]);var t=this.closest("nile-side-bar");t&&(this.collapsed=t.hasAttribute("collapsed"));}},{key:"toggleSidebar",value:function toggleSidebar(){var t=this.closest("nile-side-bar");if(!t)return;t.hasAttribute("collapsed")?(t.removeAttribute("collapsed"),this.collapsed=!1):(t.setAttribute("collapsed",""),this.collapsed=!0);}},{key:"render",value:function render(){return e(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <button class=\"expand-btn\" @click=",">\n ","\n </button>\n "])),this.toggleSidebar,this.collapsed?e(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n <nile-lite-tooltip placement=\"right\" hoist content=",">\n <span part=\"icon\"><nile-icon name=\"moveright\"></nile-icon></span>\n </nile-lite-tooltip>\n "])),this.expandTooltipText):e(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n <nile-lite-tooltip placement=\"right\" hoist content=",">\n <span part=\"icon\"><nile-icon name=\"moveleft\"></nile-icon></span>\n </nile-lite-tooltip>\n "])),this.collapseTooltipText));}}],[{key:"styles",get:function get(){return[o];}}]);}(n));t([i({type:Boolean,reflect:!0})],s.prototype,"collapsed",void 0),t([i({type:String,reflect:!0,attribute:!0})],s.prototype,"expandTooltipText",void 0),t([i({type:String,reflect:!0,attribute:!0})],s.prototype,"collapseTooltipText",void 0),_export("N",s=t([l("nile-side-bar-expand")],s));}};});
2
2
  //# sourceMappingURL=nile-side-bar-expand.cjs.js.map